feat: fix API Key authentication and payload alignment
- Update openclaw.plugin.json: replace challengeUuid with apiKey (optional) - Fix tsconfig: use CommonJS module to avoid import.meta.url issues - Fix plugin/index.ts: remove ESM-specific code, use __dirname - Fix telemetry.mjs: - Add loadavg to os imports, remove require() call - Replace challengeUuid with apiKey in config - Update endpoint to heartbeat-v2 - Add X-API-Key header when apiKey is configured - Fix payload field names: agents, load_avg (array), uptime_seconds - Change missing apiKey from error to warning
This commit is contained in:
24
plugin/index.d.ts
vendored
Normal file
24
plugin/index.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
interface PluginConfig {
|
||||
enabled?: boolean;
|
||||
backendUrl?: string;
|
||||
identifier?: string;
|
||||
apiKey?: string;
|
||||
reportIntervalSec?: number;
|
||||
httpFallbackIntervalSec?: number;
|
||||
logLevel?: 'debug' | 'info' | 'warn' | 'error';
|
||||
}
|
||||
interface PluginAPI {
|
||||
logger: {
|
||||
info: (...args: any[]) => void;
|
||||
error: (...args: any[]) => void;
|
||||
debug: (...args: any[]) => void;
|
||||
warn: (...args: any[]) => void;
|
||||
};
|
||||
version?: string;
|
||||
isRunning?: () => boolean;
|
||||
on: (event: string, handler: () => void) => void;
|
||||
registerTool: (factory: (ctx: any) => any) => void;
|
||||
}
|
||||
export default function register(api: PluginAPI, config: PluginConfig): void;
|
||||
export {};
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
Reference in New Issue
Block a user