@workclaw/openclaw-workclaw 1.0.25 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +4 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +379 -0
- package/dist/channel-DSvR6Irx.js +50017 -0
- package/dist/cron-tasks-handler-C-mP3VmV.js +152 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2088 -0
- package/dist/jiti-4i2h0FGP.js +4814 -0
- package/dist/setup-entry.d.ts +3 -0
- package/dist/setup-entry.d.ts.map +1 -0
- package/dist/setup-entry.js +182 -0
- package/dist/src/accounts.d.ts +67 -0
- package/dist/src/accounts.d.ts.map +1 -0
- package/dist/src/api/accounts-api.d.ts +3 -0
- package/dist/src/api/accounts-api.d.ts.map +1 -0
- package/dist/src/api/prompts-api.d.ts +3 -0
- package/dist/src/api/prompts-api.d.ts.map +1 -0
- package/dist/src/api/session-api.d.ts +3 -0
- package/dist/src/api/session-api.d.ts.map +1 -0
- package/dist/src/api/skills-api.d.ts +3 -0
- package/dist/src/api/skills-api.d.ts.map +1 -0
- package/dist/src/api/workspace.d.ts +4 -0
- package/dist/src/api/workspace.d.ts.map +1 -0
- package/dist/src/channel.d.ts +12 -0
- package/dist/src/channel.d.ts.map +1 -0
- package/dist/src/config-schema.d.ts +88 -0
- package/dist/src/config-schema.d.ts.map +1 -0
- package/dist/src/connection/workclaw-client.d.ts +149 -0
- package/dist/src/connection/workclaw-client.d.ts.map +1 -0
- package/dist/src/gateway/agent-handlers.d.ts +13 -0
- package/dist/src/gateway/agent-handlers.d.ts.map +1 -0
- package/dist/src/gateway/config-writer.d.ts +72 -0
- package/dist/src/gateway/config-writer.d.ts.map +1 -0
- package/dist/src/gateway/cron-tasks-handler.d.ts +20 -0
- package/dist/src/gateway/cron-tasks-handler.d.ts.map +1 -0
- package/dist/src/gateway/message-context.d.ts +81 -0
- package/dist/src/gateway/message-context.d.ts.map +1 -0
- package/dist/src/gateway/message-dispatcher.d.ts +17 -0
- package/dist/src/gateway/message-dispatcher.d.ts.map +1 -0
- package/dist/src/gateway/reconnect.d.ts +25 -0
- package/dist/src/gateway/reconnect.d.ts.map +1 -0
- package/dist/src/gateway/skills-handler.d.ts +30 -0
- package/dist/src/gateway/skills-handler.d.ts.map +1 -0
- package/dist/src/gateway/skills-list-handler.d.ts +28 -0
- package/dist/src/gateway/skills-list-handler.d.ts.map +1 -0
- package/dist/src/gateway/tools-list-handler.d.ts +31 -0
- package/dist/src/gateway/tools-list-handler.d.ts.map +1 -0
- package/dist/src/gateway/workclaw-gateway.d.ts +11 -0
- package/dist/src/gateway/workclaw-gateway.d.ts.map +1 -0
- package/dist/src/media/upload.d.ts +14 -0
- package/dist/src/media/upload.d.ts.map +1 -0
- package/dist/src/outbound/index.d.ts +39 -0
- package/dist/src/outbound/index.d.ts.map +1 -0
- package/dist/src/outbound/workclaw-sender.d.ts +38 -0
- package/dist/src/outbound/workclaw-sender.d.ts.map +1 -0
- package/dist/src/runtime.d.ts +118 -0
- package/dist/src/runtime.d.ts.map +1 -0
- package/dist/src/secret-contract-api.d.ts +5 -0
- package/dist/src/secret-contract-api.d.ts.map +1 -0
- package/{src/send.ts → dist/src/send.d.ts} +2 -1
- package/dist/src/send.d.ts.map +1 -0
- package/dist/src/setup-api.d.ts +4 -0
- package/dist/src/setup-api.d.ts.map +1 -0
- package/dist/src/setup-core.d.ts +4 -0
- package/dist/src/setup-core.d.ts.map +1 -0
- package/dist/src/setup-surface.d.ts +8 -0
- package/dist/src/setup-surface.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/api/index.d.ts +91 -0
- package/dist/src/tools/openclaw-workclaw-cron/api/index.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/index.d.ts +11 -0
- package/dist/src/tools/openclaw-workclaw-cron/index.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/add/params.d.ts +14 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/add/params.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/add/sync.d.ts +16 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/add/sync.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/params.d.ts +12 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/params.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/sync.d.ts +12 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/sync.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/params.d.ts +12 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/params.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/sync.d.ts +12 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/sync.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/notify/sync.d.ts +13 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/notify/sync.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/params.d.ts +12 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/params.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/sync.d.ts +12 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/sync.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/update/params.d.ts +15 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/update/params.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/update/sync.d.ts +16 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/update/sync.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/types/index.d.ts +53 -0
- package/dist/src/tools/openclaw-workclaw-cron/types/index.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/utils/index.d.ts +41 -0
- package/dist/src/tools/openclaw-workclaw-cron/utils/index.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-system/index.d.ts +11 -0
- package/dist/src/tools/openclaw-workclaw-system/index.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-system/src/get/index.d.ts +6 -0
- package/dist/src/tools/openclaw-workclaw-system/src/get/index.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-system/src/token/index.d.ts +6 -0
- package/dist/src/tools/openclaw-workclaw-system/src/token/index.d.ts.map +1 -0
- package/dist/src/types.d.ts +39 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/utils/content.d.ts +16 -0
- package/dist/src/utils/content.d.ts.map +1 -0
- package/openclaw.plugin.json +11 -0
- package/package.json +69 -45
- package/api.ts +0 -3
- package/index.ts +0 -325
- package/setup-entry.ts +0 -13
- package/src/accounts.ts +0 -360
- package/src/api/accounts-api.ts +0 -156
- package/src/api/prompts-api.ts +0 -122
- package/src/api/session-api.ts +0 -246
- package/src/api/skills-api.ts +0 -74
- package/src/api/workspace.ts +0 -45
- package/src/channel.ts +0 -226
- package/src/config-schema.ts +0 -60
- package/src/connection/workclaw-client.ts +0 -618
- package/src/gateway/agent-handlers.ts +0 -551
- package/src/gateway/config-writer.ts +0 -378
- package/src/gateway/cron-tasks-handler.ts +0 -230
- package/src/gateway/message-context.ts +0 -645
- package/src/gateway/message-dispatcher.ts +0 -688
- package/src/gateway/reconnect.ts +0 -260
- package/src/gateway/skills-handler.ts +0 -805
- package/src/gateway/skills-list-handler.ts +0 -332
- package/src/gateway/tools-list-handler.ts +0 -161
- package/src/gateway/workclaw-gateway.ts +0 -304
- package/src/media/upload.ts +0 -168
- package/src/outbound/index.ts +0 -191
- package/src/outbound/workclaw-sender.ts +0 -161
- package/src/runtime.ts +0 -520
- package/src/secret-contract-api.ts +0 -4
- package/src/setup-api.ts +0 -3
- package/src/setup-core.ts +0 -25
- package/src/setup-surface.ts +0 -498
- package/src/tools/openclaw-workclaw-cron/api/index.ts +0 -326
- package/src/tools/openclaw-workclaw-cron/index.ts +0 -39
- package/src/tools/openclaw-workclaw-cron/src/add/params.ts +0 -177
- package/src/tools/openclaw-workclaw-cron/src/add/sync.ts +0 -188
- package/src/tools/openclaw-workclaw-cron/src/disable/params.ts +0 -100
- package/src/tools/openclaw-workclaw-cron/src/disable/sync.ts +0 -127
- package/src/tools/openclaw-workclaw-cron/src/enable/params.ts +0 -100
- package/src/tools/openclaw-workclaw-cron/src/enable/sync.ts +0 -127
- package/src/tools/openclaw-workclaw-cron/src/notify/sync.ts +0 -148
- package/src/tools/openclaw-workclaw-cron/src/remove/params.ts +0 -109
- package/src/tools/openclaw-workclaw-cron/src/remove/sync.ts +0 -127
- package/src/tools/openclaw-workclaw-cron/src/update/params.ts +0 -195
- package/src/tools/openclaw-workclaw-cron/src/update/sync.ts +0 -161
- package/src/tools/openclaw-workclaw-cron/types/index.ts +0 -55
- package/src/tools/openclaw-workclaw-cron/utils/index.ts +0 -141
- package/src/tools/openclaw-workclaw-system/index.ts +0 -17
- package/src/tools/openclaw-workclaw-system/src/get/index.ts +0 -77
- package/src/tools/openclaw-workclaw-system/src/token/index.ts +0 -93
- package/src/types.ts +0 -50
- package/src/utils/content.ts +0 -40
- package/tsconfig.json +0 -34
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Writer - handles writing account config to openclaw.json
|
|
3
|
+
*
|
|
4
|
+
* NOTE: Only agent creation/initialization writes to openclaw.json via writeConfigFile.
|
|
5
|
+
* Runtime dynamic data (openConversationId) is stored in a separate state file
|
|
6
|
+
* to avoid triggering openclaw's config watcher, which would re-parse env vars
|
|
7
|
+
* and potentially overwrite already-resolved values like ${MODEL_API_KEY}.
|
|
8
|
+
*/
|
|
9
|
+
interface ConfigLogger {
|
|
10
|
+
info?: (msg: string) => void;
|
|
11
|
+
error?: (msg: string) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Write a new config to the openclaw.json file.
|
|
15
|
+
*/
|
|
16
|
+
export declare function writeConfigFile(newConfig: any, cfg: any, log?: ConfigLogger): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Load openConversationId from the separate state file.
|
|
19
|
+
*
|
|
20
|
+
* Key format: accountId:userId
|
|
21
|
+
*
|
|
22
|
+
* Called at runtime to restore openConversationId after process restart,
|
|
23
|
+
* since cfg is reloaded from openclaw.json which does not contain this value.
|
|
24
|
+
*/
|
|
25
|
+
export declare function loadOpenConversationId(accountId: string, userId: string): string | null;
|
|
26
|
+
/**
|
|
27
|
+
* Save openConversationId to a separate state file (with write throttling).
|
|
28
|
+
*
|
|
29
|
+
* Key format: accountId:userId
|
|
30
|
+
* Throttling: if called multiple times within 1 second, only the last value is saved.
|
|
31
|
+
* This avoids excessive disk writes from high-frequency messages.
|
|
32
|
+
*
|
|
33
|
+
* Stored in ~/.openclaw/workclaw-state/conversations.json (separate from openclaw.json)
|
|
34
|
+
* to avoid triggering openclaw's config watcher which would re-parse env vars.
|
|
35
|
+
*/
|
|
36
|
+
export declare function saveOpenConversationId(accountId: string, userId: string, openConversationId: string, cfg: any, log?: ConfigLogger): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Initialize workclaw agent config in one shot (hardware device init).
|
|
39
|
+
*
|
|
40
|
+
* Sets apiKey, agentId, userId and persists to openclaw.json in a single write.
|
|
41
|
+
*
|
|
42
|
+
* NOTE: If apiKey already contains a SecretRef (type: "env"|"file"|"exec"),
|
|
43
|
+
* it is preserved and NOT overwritten, since OpenClaw handles SecretRef resolution.
|
|
44
|
+
*/
|
|
45
|
+
export declare function initWorkclawAgent(params: {
|
|
46
|
+
apiKey?: string;
|
|
47
|
+
agentId?: string;
|
|
48
|
+
userId?: string;
|
|
49
|
+
accountId?: string;
|
|
50
|
+
}, cfg: any, log?: ConfigLogger): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Save userId to cfg memory and persist to openclaw.json.
|
|
53
|
+
*
|
|
54
|
+
* Used during hardware device initialization to persist the default userId.
|
|
55
|
+
*/
|
|
56
|
+
export declare function saveWorkClawUserId(accountId: string, userId: string | number, cfg: any, log?: ConfigLogger): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Save agentId to cfg memory and persist to openclaw.json.
|
|
59
|
+
*
|
|
60
|
+
* Used during hardware device initialization to persist the default agentId.
|
|
61
|
+
*/
|
|
62
|
+
export declare function saveWorkClawAgentId(accountId: string, agentId: string | number, cfg: any, log?: ConfigLogger): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Save apiKey to cfg memory only.
|
|
65
|
+
*
|
|
66
|
+
* Does NOT write to openclaw.json to avoid triggering openclaw's config watcher,
|
|
67
|
+
* which would re-parse env vars (e.g. ${MODEL_API_KEY}) and potentially
|
|
68
|
+
* overwrite resolved values in the runtime cfg.
|
|
69
|
+
*/
|
|
70
|
+
export declare function saveWorkClawApiKey(apiKey: string, cfg: any, log?: ConfigLogger): Promise<void>;
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=config-writer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-writer.d.ts","sourceRoot":"","sources":["../../../src/gateway/config-writer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiBH,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B;AAwCD;;GAEG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,GAAG,EACd,GAAG,EAAE,GAAG,EACR,GAAG,CAAC,EAAE,YAAY,GACjB,OAAO,CAAC,IAAI,CAAC,CAcf;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAavF;AAED;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,MAAM,EAC1B,GAAG,EAAE,GAAG,EACR,GAAG,CAAC,EAAE,YAAY,GACjB,OAAO,CAAC,IAAI,CAAC,CAmBf;AA4DD;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE;IACN,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,EACD,GAAG,EAAE,GAAG,EACR,GAAG,CAAC,EAAE,YAAY,GACjB,OAAO,CAAC,IAAI,CAAC,CA+Cf;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,GAAG,EAAE,GAAG,EACR,GAAG,CAAC,EAAE,YAAY,GACjB,OAAO,CAAC,IAAI,CAAC,CAef;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GAAG,MAAM,EACxB,GAAG,EAAE,GAAG,EACR,GAAG,CAAC,EAAE,YAAY,GACjB,OAAO,CAAC,IAAI,CAAC,CAmCf;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,GAAG,EACR,GAAG,CAAC,EAAE,YAAY,GACjB,OAAO,CAAC,IAAI,CAAC,CAkBf"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ParsedTaskData {
|
|
2
|
+
clawJobId?: string | null;
|
|
3
|
+
agentIds: string[];
|
|
4
|
+
dotype: 'add' | 'remove' | 'edit' | 'search';
|
|
5
|
+
name: string;
|
|
6
|
+
expr: string;
|
|
7
|
+
mainId: string;
|
|
8
|
+
userId: string;
|
|
9
|
+
}
|
|
10
|
+
interface Logger {
|
|
11
|
+
info?: (msg: string) => void;
|
|
12
|
+
warn?: (msg: string) => void;
|
|
13
|
+
error?: (msg: string) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function handleCronTaskEvent(backendEvent: {
|
|
16
|
+
dotype: string;
|
|
17
|
+
data: any;
|
|
18
|
+
}, token: string, baseUrl: string, appKey: string, log?: Logger): Promise<void>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=cron-tasks-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cron-tasks-handler.d.ts","sourceRoot":"","sources":["../../../src/gateway/cron-tasks-handler.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAA;IAC5C,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf;AAED,UAAU,MAAM;IACd,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B;AA6LD,wBAAsB,mBAAmB,CACvC,YAAY,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAAE,EAC3C,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAcf"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { PluginRuntime } from 'openclaw/plugin-sdk';
|
|
2
|
+
export interface Attachment {
|
|
3
|
+
url: string;
|
|
4
|
+
fileId: string;
|
|
5
|
+
type: 'image' | 'file';
|
|
6
|
+
name?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Channel/plugin name constant */
|
|
9
|
+
export declare const OPENCLAW_WORKCLAW_CHANNEL = "openclaw-workclaw";
|
|
10
|
+
export interface InboundMessage {
|
|
11
|
+
text: string;
|
|
12
|
+
to: string;
|
|
13
|
+
from: string;
|
|
14
|
+
chatType: 'dm' | 'group';
|
|
15
|
+
messageId: string;
|
|
16
|
+
rawPayload: string;
|
|
17
|
+
timestamp: number;
|
|
18
|
+
attachments?: Attachment[];
|
|
19
|
+
}
|
|
20
|
+
export interface InboundContextPayload {
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
Body: string;
|
|
23
|
+
BodyForAgent: string;
|
|
24
|
+
RawBody: string;
|
|
25
|
+
From: string;
|
|
26
|
+
To: string;
|
|
27
|
+
ChatType: 'dm' | 'group';
|
|
28
|
+
Provider: string;
|
|
29
|
+
Surface: string;
|
|
30
|
+
Timestamp: number;
|
|
31
|
+
AccountId: string;
|
|
32
|
+
AgentId?: string;
|
|
33
|
+
MessageSid?: string;
|
|
34
|
+
OriginatingChannel: string;
|
|
35
|
+
OriginatingTo: string;
|
|
36
|
+
}
|
|
37
|
+
export type WorkClawMessageType = 'agent_message' | 'ping' | 'disconnect' | 'agent_created' | 'agent_updated' | 'agent_deleted' | 'tools_list' | 'skills_list' | 'skills_event' | 'init_agent' | 'ignored' | 'cron_task_event';
|
|
38
|
+
export interface ParseWorkClawResult {
|
|
39
|
+
type: WorkClawMessageType;
|
|
40
|
+
message?: {
|
|
41
|
+
text: string;
|
|
42
|
+
userId: string;
|
|
43
|
+
openConversationId: string;
|
|
44
|
+
messageId: string;
|
|
45
|
+
agentId?: string | number;
|
|
46
|
+
attachments?: Attachment[];
|
|
47
|
+
};
|
|
48
|
+
pongData?: any;
|
|
49
|
+
eventData?: any;
|
|
50
|
+
cronTaskEvent?: {
|
|
51
|
+
dotype: string;
|
|
52
|
+
data: any;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export declare function parseInboundMessage(data: string, allowRawJsonPayload?: boolean): Partial<InboundMessage>;
|
|
56
|
+
export declare function parseWorkClawMessage(data: string, log?: {
|
|
57
|
+
info?: (msg: string) => void;
|
|
58
|
+
warn?: (msg: string) => void;
|
|
59
|
+
error?: (msg: string) => void;
|
|
60
|
+
}): ParseWorkClawResult | null;
|
|
61
|
+
/**
|
|
62
|
+
* Build inbound context for WorkClaw channel.
|
|
63
|
+
*
|
|
64
|
+
* When pluginRuntime is provided, performs full session handling:
|
|
65
|
+
* - resolveStorePath, readSessionUpdatedAt, formatInboundEnvelope
|
|
66
|
+
* - finalizeInboundContext, recordInboundSession
|
|
67
|
+
*
|
|
68
|
+
* @param message - The inbound message
|
|
69
|
+
* @param accountId - Account ID
|
|
70
|
+
* @param config - Account config (WorkclawConfig)
|
|
71
|
+
* @param agentId - Target agent ID (optional)
|
|
72
|
+
* @param pluginRuntime - OpenClaw plugin runtime (optional, enables full session handling)
|
|
73
|
+
* @param recordSession - Whether to record session (default true)
|
|
74
|
+
* @param log - Optional logger
|
|
75
|
+
*/
|
|
76
|
+
export declare function buildInboundContext(message: InboundMessage, accountId: string, config: any, agentId?: string, pluginRuntime?: PluginRuntime, recordSession?: boolean, log?: {
|
|
77
|
+
info?: (msg: string) => void;
|
|
78
|
+
warn?: (msg: string) => void;
|
|
79
|
+
error?: (msg: string) => void;
|
|
80
|
+
}): Promise<InboundContextPayload>;
|
|
81
|
+
//# sourceMappingURL=message-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-context.d.ts","sourceRoot":"","sources":["../../../src/gateway/message-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;A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KAAK,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,GAClG,OAAO,CAAC,qBAAqB,CAAC,CAqKhC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ResolvedWorkclawAccount, WorkClawAccountConfig, WorkClawBaseConfig } from '../types.js';
|
|
2
|
+
export interface MessageDispatcherContext {
|
|
3
|
+
accountId: string;
|
|
4
|
+
account: ResolvedWorkclawAccount;
|
|
5
|
+
cfg: any;
|
|
6
|
+
baseConfig: WorkClawBaseConfig;
|
|
7
|
+
accountConfig: WorkClawAccountConfig;
|
|
8
|
+
log?: {
|
|
9
|
+
info?: (msg: string) => void;
|
|
10
|
+
warn?: (msg: string) => void;
|
|
11
|
+
error?: (msg: string) => void;
|
|
12
|
+
debug?: (msg: string) => void;
|
|
13
|
+
};
|
|
14
|
+
scheduleReconnect: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function dispatchWorkclawMessage(data: string, ctx: MessageDispatcherContext): Promise<void>;
|
|
17
|
+
//# sourceMappingURL=message-dispatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-dispatcher.d.ts","sourceRoot":"","sources":["../../../src/gateway/message-dispatcher.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAkBrG,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,uBAAuB,CAAA;IAChC,GAAG,EAAE,GAAG,CAAA;IACR,UAAU,EAAE,kBAAkB,CAAA;IAC9B,aAAa,EAAE,qBAAqB,CAAA;IACpC,GAAG,CAAC,EAAE;QACJ,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;QAC5B,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;QAC5B,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;QAC7B,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAC9B,CAAA;IACD,iBAAiB,EAAE,MAAM,IAAI,CAAA;CAC9B;AA2eD,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,wBAAwB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAyDf"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { WorkClawBaseConfig } from '../types.js';
|
|
2
|
+
import { WebSocket } from 'undici';
|
|
3
|
+
export interface ReconnectSchedulerOptions {
|
|
4
|
+
/** Key for WebSocket storage (appKey) */
|
|
5
|
+
key: string;
|
|
6
|
+
config: WorkClawBaseConfig;
|
|
7
|
+
log?: {
|
|
8
|
+
info?: (msg: string) => void;
|
|
9
|
+
warn?: (msg: string) => void;
|
|
10
|
+
error?: (msg: string) => void;
|
|
11
|
+
debug?: (msg: string) => void;
|
|
12
|
+
};
|
|
13
|
+
onMessage: (data: string) => void;
|
|
14
|
+
onReconnectSuccess?: () => void;
|
|
15
|
+
/** Called when connection closes (after initial connect), to trigger reconnect */
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
/** Called after WebSocket is registered (before onopen), useful for lock release */
|
|
18
|
+
onConnectingStarted?: (ws: WebSocket) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function createReconnectScheduler(options: ReconnectSchedulerOptions): {
|
|
21
|
+
connect: () => Promise<void>;
|
|
22
|
+
scheduleReconnect: () => void;
|
|
23
|
+
stopReconnect: () => void;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=reconnect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconnect.d.ts","sourceRoot":"","sources":["../../../src/gateway/reconnect.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAS,SAAS,EAAE,MAAM,QAAQ,CAAA;AAKzC,MAAM,WAAW,yBAAyB;IACxC,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,kBAAkB,CAAA;IAC1B,GAAG,CAAC,EAAE;QACJ,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;QAC5B,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;QAC5B,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;QAC7B,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAC9B,CAAA;IACD,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC/B,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,oFAAoF;IACpF,mBAAmB,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,KAAK,IAAI,CAAA;CAC9C;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,GAAG;IAC5E,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,aAAa,EAAE,MAAM,IAAI,CAAA;CAC1B,CAmOA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skills 事件处理器
|
|
3
|
+
* 处理云端下发的 skills 相关 EVENT 消息
|
|
4
|
+
* 通过 HTTP 回调返回结果
|
|
5
|
+
*/
|
|
6
|
+
export interface SkillsEventData {
|
|
7
|
+
topic: string;
|
|
8
|
+
requestId: string;
|
|
9
|
+
callbackUrl: string;
|
|
10
|
+
authToken?: string;
|
|
11
|
+
data: any;
|
|
12
|
+
}
|
|
13
|
+
export interface CallbackResponse {
|
|
14
|
+
userId?: string;
|
|
15
|
+
agentId?: string;
|
|
16
|
+
agentIds?: string[];
|
|
17
|
+
appKey?: string;
|
|
18
|
+
dotype?: string;
|
|
19
|
+
doStatus?: boolean;
|
|
20
|
+
doErrorMsg?: string;
|
|
21
|
+
dataList?: any[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 处理 skills 事件
|
|
25
|
+
*/
|
|
26
|
+
export declare function handleSkillsEvent(eventData: SkillsEventData, token: string, baseUrl: string, appKey: string, log?: {
|
|
27
|
+
info?: (msg: string) => void;
|
|
28
|
+
error?: (msg: string) => void;
|
|
29
|
+
}): Promise<void>;
|
|
30
|
+
//# sourceMappingURL=skills-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills-handler.d.ts","sourceRoot":"","sources":["../../../src/gateway/skills-handler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,GAAG,CAAA;CACV;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAA;CACjB;AAYD;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,eAAe,EAC1B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,GAAG,CAAC,EAAE;IACJ,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B,GACA,OAAO,CAAC,IAAI,CAAC,CAoGf"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface SkillsListEvent {
|
|
2
|
+
agentId: string | number;
|
|
3
|
+
userId: string | number;
|
|
4
|
+
}
|
|
5
|
+
export interface SkillItem {
|
|
6
|
+
typeStr: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SkillsListCallbackPayload {
|
|
11
|
+
userId: number;
|
|
12
|
+
agentId: number;
|
|
13
|
+
dataList: SkillItem[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 处理 SKILLS_LIST 事件
|
|
17
|
+
* @param event - 事件数据
|
|
18
|
+
* @param baseUrl - 回调基础 URL
|
|
19
|
+
* @param token - 鉴权 token
|
|
20
|
+
* @param log 日志对象(可选)
|
|
21
|
+
* @param {Function} [log.info] - 信息日志函数
|
|
22
|
+
* @param {Function} [log.error] - 错误日志函数
|
|
23
|
+
*/
|
|
24
|
+
export declare function handleSkillsListEvent(event: SkillsListEvent, baseUrl: string, token: string, log?: {
|
|
25
|
+
info?: (msg: string) => void;
|
|
26
|
+
error?: (msg: string) => void;
|
|
27
|
+
}): Promise<void>;
|
|
28
|
+
//# sourceMappingURL=skills-list-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills-list-handler.d.ts","sourceRoot":"","sources":["../../../src/gateway/skills-list-handler.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,SAAS,EAAE,CAAA;CACtB;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,GAAG,CAAC,EAAE;IACJ,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B,GACA,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tools List 事件处理器
|
|
3
|
+
* 处理云端下发的 TOOLS_LIST EVENT 消息
|
|
4
|
+
* 从 OpenClaw 获取 tools 列表并通过 HTTP 回调返回
|
|
5
|
+
*/
|
|
6
|
+
export interface ToolsListEvent {
|
|
7
|
+
agentId: string | number;
|
|
8
|
+
userId: string | number;
|
|
9
|
+
}
|
|
10
|
+
export interface ToolItem {
|
|
11
|
+
typeStr: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ToolsListCallbackPayload {
|
|
16
|
+
userId: number;
|
|
17
|
+
agentId: number;
|
|
18
|
+
dataList: ToolItem[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 处理 TOOLS_LIST 事件
|
|
22
|
+
* @param event 事件数据
|
|
23
|
+
* @param baseUrl 回调基础 URL
|
|
24
|
+
* @param token 鉴权 token
|
|
25
|
+
* @param log 日志函数
|
|
26
|
+
*/
|
|
27
|
+
export declare function handleToolsListEvent(event: ToolsListEvent, baseUrl: string, token: string, log?: {
|
|
28
|
+
info?: (msg: string) => void;
|
|
29
|
+
error?: (msg: string) => void;
|
|
30
|
+
}): Promise<void>;
|
|
31
|
+
//# sourceMappingURL=tools-list-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools-list-handler.d.ts","sourceRoot":"","sources":["../../../src/gateway/tools-list-handler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,QAAQ,EAAE,CAAA;CACrB;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,GAAG,CAAC,EAAE;IACJ,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B,GACA,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PartialWorkclawLogger } from '../runtime.js';
|
|
2
|
+
import { ResolvedWorkclawAccount } from '../types.js';
|
|
3
|
+
export interface WorkclawGatewayOptions {
|
|
4
|
+
accountId: string;
|
|
5
|
+
account: ResolvedWorkclawAccount;
|
|
6
|
+
cfg: any;
|
|
7
|
+
log?: PartialWorkclawLogger;
|
|
8
|
+
}
|
|
9
|
+
export declare function startWorkclawGateway(options: WorkclawGatewayOptions): Promise<void>;
|
|
10
|
+
export declare function stopWorkclawGateway(accountId: string): void;
|
|
11
|
+
//# sourceMappingURL=workclaw-gateway.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workclaw-gateway.d.ts","sourceRoot":"","sources":["../../../src/gateway/workclaw-gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAA6D,MAAM,aAAa,CAAA;AA0BrH,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,uBAAuB,CAAA;IAChC,GAAG,EAAE,GAAG,CAAA;IACR,GAAG,CAAC,EAAE,qBAAqB,CAAA;CAC5B;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAOzF;AAmPD,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAiB3D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function isLocalMediaSource(value: string): boolean;
|
|
2
|
+
export declare function resolveLocalPath(input: string): string;
|
|
3
|
+
export interface UploadLocalMediaParams {
|
|
4
|
+
uploadUrl: string;
|
|
5
|
+
filePath: string;
|
|
6
|
+
uploadFieldName?: string;
|
|
7
|
+
uploadHeaders?: Record<string, string>;
|
|
8
|
+
uploadFormFields?: Record<string, string | number | boolean>;
|
|
9
|
+
uploadResponseUrlPath?: string;
|
|
10
|
+
requestTimeout: number;
|
|
11
|
+
allowInsecureTls?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function uploadLocalMedia(params: UploadLocalMediaParams): Promise<string>;
|
|
14
|
+
//# sourceMappingURL=upload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/media/upload.ts"],"names":[],"mappings":"AAMA,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CASzD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQtD;AA2DD,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;IAC5D,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,cAAc,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CAwEtF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { OpenClawConfig } from 'openclaw/plugin-sdk';
|
|
2
|
+
import { WorkclawSendResult } from '../types.js';
|
|
3
|
+
export interface SendWorkclawMessageParams {
|
|
4
|
+
cfg: OpenClawConfig;
|
|
5
|
+
to: string;
|
|
6
|
+
text: string;
|
|
7
|
+
mediaUrl?: string;
|
|
8
|
+
replyToMessageId?: string;
|
|
9
|
+
accountId?: string;
|
|
10
|
+
openConversationId?: string;
|
|
11
|
+
agentId?: string | number;
|
|
12
|
+
/**
|
|
13
|
+
* 消息类型:
|
|
14
|
+
* - "reply": 回复消息(用户触发)
|
|
15
|
+
* - "push": 主动推送(定时任务触发)
|
|
16
|
+
*/
|
|
17
|
+
messageType?: 'reply' | 'push';
|
|
18
|
+
msgType?: string;
|
|
19
|
+
last?: boolean;
|
|
20
|
+
/** 来源:deliver=流式响应回调,sendText=框架直接发送,after_tool_call=工具执行结果推送 */
|
|
21
|
+
source?: 'deliver' | 'sendText' | 'after_tool_call';
|
|
22
|
+
}
|
|
23
|
+
export declare function sendMessageWorkclaw(params: SendWorkclawMessageParams): Promise<WorkclawSendResult>;
|
|
24
|
+
export declare function getMessageWorkclaw(_params: {
|
|
25
|
+
cfg: OpenClawConfig;
|
|
26
|
+
messageId: string;
|
|
27
|
+
accountId?: string;
|
|
28
|
+
}): Promise<null>;
|
|
29
|
+
/**
|
|
30
|
+
* 发送主动推送消息(定时任务使用)
|
|
31
|
+
* 使用 pushEndpoint 配置的端口
|
|
32
|
+
*/
|
|
33
|
+
export declare function sendPushMessageWorkclaw(params: Omit<SendWorkclawMessageParams, 'messageType'>): Promise<WorkclawSendResult>;
|
|
34
|
+
/**
|
|
35
|
+
* 发送回复消息(用户触发)
|
|
36
|
+
* 使用 replyEndpoint 配置的端口
|
|
37
|
+
*/
|
|
38
|
+
export declare function sendReplyMessageWorkclaw(params: Omit<SendWorkclawMessageParams, 'messageType'>): Promise<WorkclawSendResult>;
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/outbound/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAkB,kBAAkB,EAAE,MAAM,aAAa,CAAA;AA+BrE,MAAM,WAAW,yBAAyB;IACxC,GAAG,EAAE,cAAc,CAAA;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,iEAAiE;IACjE,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,iBAAiB,CAAA;CACpD;AAwCD,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,kBAAkB,CAAC,CA+D7B;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE;IAChD,GAAG,EAAE,cAAc,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhB;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,IAAI,CAAC,yBAAyB,EAAE,aAAa,CAAC,GACrD,OAAO,CAAC,kBAAkB,CAAC,CAK7B;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,IAAI,CAAC,yBAAyB,EAAE,aAAa,CAAC,GACrD,OAAO,CAAC,kBAAkB,CAAC,CAK7B"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { WorkclawFullAccountConfig } from '../types.js';
|
|
2
|
+
export interface WorkClawSenderParams {
|
|
3
|
+
cacheKey: string;
|
|
4
|
+
to: string;
|
|
5
|
+
text: string;
|
|
6
|
+
mediaUrl?: string;
|
|
7
|
+
replyToMessageId?: string;
|
|
8
|
+
openConversationId?: string;
|
|
9
|
+
agentId?: string | number;
|
|
10
|
+
config: WorkclawFullAccountConfig;
|
|
11
|
+
/**
|
|
12
|
+
* 消息类型:
|
|
13
|
+
* - "reply": 回复消息(用户触发)
|
|
14
|
+
* - "push": 主动推送(定时任务触发)
|
|
15
|
+
*/
|
|
16
|
+
messageType?: 'reply' | 'push';
|
|
17
|
+
msgType?: string;
|
|
18
|
+
last?: boolean;
|
|
19
|
+
source?: 'deliver' | 'sendText' | 'after_tool_call';
|
|
20
|
+
}
|
|
21
|
+
export declare function sendWorkclawOutboundMessage(params: WorkClawSenderParams): Promise<{
|
|
22
|
+
messageId: string;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* 发送主动推送消息(定时任务使用)
|
|
26
|
+
* POST /im/v1/messages
|
|
27
|
+
*/
|
|
28
|
+
export declare function sendWorkClawPushMessage(params: Omit<WorkClawSenderParams, 'messageType'>): Promise<{
|
|
29
|
+
messageId: string;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* 发送回复消息(用户触发)
|
|
33
|
+
* POST /im/v1/messages/{messageId}/reply
|
|
34
|
+
*/
|
|
35
|
+
export declare function sendWorkclawReplyMessage(params: Omit<WorkClawSenderParams, 'messageType'>): Promise<{
|
|
36
|
+
messageId: string;
|
|
37
|
+
}>;
|
|
38
|
+
//# sourceMappingURL=workclaw-sender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workclaw-sender.d.ts","sourceRoot":"","sources":["../../../src/outbound/workclaw-sender.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAS5D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,MAAM,EAAE,yBAAyB,CAAA;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,iBAAiB,CAAA;CACpD;AAED,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAsGhC;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC,GAChD,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAKhC;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC,GAChD,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAKhC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { PluginRuntime } from 'openclaw/plugin-sdk';
|
|
2
|
+
import { WebSocket } from 'undici';
|
|
3
|
+
export declare function setWorkclawRuntime(next: PluginRuntime): void;
|
|
4
|
+
export declare function getWorkclawRuntime(): PluginRuntime;
|
|
5
|
+
export interface WorkclawLogger {
|
|
6
|
+
info: (msg: string, ...args: any[]) => void;
|
|
7
|
+
warn: (msg: string, ...args: any[]) => void;
|
|
8
|
+
error: (msg: string, ...args: any[]) => void;
|
|
9
|
+
debug: (msg: string, ...args: any[]) => void;
|
|
10
|
+
}
|
|
11
|
+
export type PartialWorkclawLogger = Partial<WorkclawLogger>;
|
|
12
|
+
/** Store the gateway's log into runtime. Called from startAccount. */
|
|
13
|
+
export declare function setWorkclawLoggerFromContext(log: WorkclawLogger): void;
|
|
14
|
+
/** Get the shared logger. Returns ctx.log from gateway if set, otherwise a console fallback. */
|
|
15
|
+
export declare function getWorkclawLogger(): WorkclawLogger;
|
|
16
|
+
/**
|
|
17
|
+
* Wrap a logger with a prefix automatically prepended to every message.
|
|
18
|
+
* All messages logged via the returned logger will have the prefix attached.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createLogger(prefix: string, log?: PartialWorkclawLogger): WorkclawLogger;
|
|
21
|
+
export declare function setWorkclawWsConnection(key: string, ws: WebSocket): void;
|
|
22
|
+
export declare function clearWorkclawWsConnection(key: string): void;
|
|
23
|
+
export declare function getWorkclawWsConnection(key: string): WebSocket | undefined;
|
|
24
|
+
export declare function setLastInboundAt(key: string, timestamp: number): void;
|
|
25
|
+
export declare function getLastInboundAt(key: string): number | undefined;
|
|
26
|
+
export declare function setWorkclawConnectionConfig(accountId: string, config: {
|
|
27
|
+
appKey: string;
|
|
28
|
+
appSecret: string;
|
|
29
|
+
baseUrl?: string;
|
|
30
|
+
websocketUrl?: string;
|
|
31
|
+
localIp?: string;
|
|
32
|
+
allowInsecureTls?: boolean;
|
|
33
|
+
requestTimeout?: number;
|
|
34
|
+
}): void;
|
|
35
|
+
export declare function getWorkclawConnectionConfig(accountId: string): {
|
|
36
|
+
appKey: string;
|
|
37
|
+
appSecret: string;
|
|
38
|
+
baseUrl: string;
|
|
39
|
+
websocketUrl?: string;
|
|
40
|
+
localIp?: string;
|
|
41
|
+
allowInsecureTls?: boolean;
|
|
42
|
+
requestTimeout?: number;
|
|
43
|
+
} | undefined;
|
|
44
|
+
export declare function clearWorkclawConnectionConfig(accountId: string): void;
|
|
45
|
+
export declare function setLastOutboundAt(key: string, timestamp: number): void;
|
|
46
|
+
export declare function getLastOutboundAt(key: string): number | undefined;
|
|
47
|
+
export declare function registerAccountContext(appKey: string, accountId: string, ctx: any): void;
|
|
48
|
+
export declare function unregisterAccountContext(appKey: string, accountId: string): void;
|
|
49
|
+
export declare function getAccountIdsByAppKey(appKey: string): string[];
|
|
50
|
+
export declare function getAppKeyByAccountId(accountId: string): string | undefined;
|
|
51
|
+
export declare function getDispatcherByAppKeyAndAccountId(appKey: string, accountId: string): {
|
|
52
|
+
ctx: any;
|
|
53
|
+
} | undefined;
|
|
54
|
+
export declare function getAllDispatchersByAppKey(appKey: string): Map<string, {
|
|
55
|
+
ctx: any;
|
|
56
|
+
}> | undefined;
|
|
57
|
+
export declare function setReconnectScheduler(appKey: string, scheduler: any): void;
|
|
58
|
+
export declare function getReconnectScheduler(appKey: string): any | undefined;
|
|
59
|
+
export declare function clearReconnectScheduler(appKey: string): void;
|
|
60
|
+
export interface TryStartConnectingResult {
|
|
61
|
+
isConnector: boolean;
|
|
62
|
+
/** 如果 ws 已建立完成(非连接中),返回该 ws;否则 undefined */
|
|
63
|
+
existingWs: WebSocket | undefined;
|
|
64
|
+
/** 等待连接完成的 Promise:成功时 resolve(ws),失败时 resolve(null) */
|
|
65
|
+
connectingPromise: Promise<WebSocket | null>;
|
|
66
|
+
}
|
|
67
|
+
export declare function tryStartConnecting(appKey: string): TryStartConnectingResult;
|
|
68
|
+
export declare function finishConnecting(appKey: string, ws?: WebSocket): void;
|
|
69
|
+
export interface ToolContext {
|
|
70
|
+
target: string;
|
|
71
|
+
replyToMessageId: string;
|
|
72
|
+
openConversationId: string;
|
|
73
|
+
accountId: string;
|
|
74
|
+
agentId: string;
|
|
75
|
+
sessionKey: string;
|
|
76
|
+
}
|
|
77
|
+
export declare function getToolContext(runId: string): ToolContext | undefined;
|
|
78
|
+
export declare function setToolContext(runId: string, ctx: ToolContext): void;
|
|
79
|
+
export declare function setToolCallIdToRunIdMapping(toolCallId: string, runId: string): void;
|
|
80
|
+
export declare function getRunIdByToolCallId(toolCallId: string): string | undefined;
|
|
81
|
+
export declare function deleteToolContext(runId: string): void;
|
|
82
|
+
export declare function clearAllToolContexts(): void;
|
|
83
|
+
export declare function spawnSubAgent(params: {
|
|
84
|
+
agentId: string;
|
|
85
|
+
task: string;
|
|
86
|
+
label?: string;
|
|
87
|
+
model?: string;
|
|
88
|
+
}): Promise<{
|
|
89
|
+
ok: boolean;
|
|
90
|
+
sessionKey?: string;
|
|
91
|
+
summary?: string;
|
|
92
|
+
error?: string;
|
|
93
|
+
}>;
|
|
94
|
+
export declare const __openclaw_workclaw_runtime_emitted = true;
|
|
95
|
+
export interface ToolInfo {
|
|
96
|
+
emoji: string;
|
|
97
|
+
title: string;
|
|
98
|
+
hint: string;
|
|
99
|
+
aliases: string[];
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* 获取工具执行开始的提示(用于 onToolStart)
|
|
103
|
+
*/
|
|
104
|
+
export declare function getToolStartHint(toolName: string | undefined): string;
|
|
105
|
+
/**
|
|
106
|
+
* 获取工具执行完成的提示(用于 after_tool_call)
|
|
107
|
+
*/
|
|
108
|
+
export declare function getToolResultHint(toolName: string | undefined): string;
|
|
109
|
+
/**
|
|
110
|
+
* 获取 Workclaw 渠道密钥
|
|
111
|
+
* 这是 setup 向导必需的接口
|
|
112
|
+
*/
|
|
113
|
+
export declare function getWorkclawSecrets(params: {
|
|
114
|
+
appKey?: string;
|
|
115
|
+
appSecret?: string;
|
|
116
|
+
accountId?: string;
|
|
117
|
+
}): Promise<Record<string, string>>;
|
|
118
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAgBvC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAE5D;AAED,wBAAgB,kBAAkB,IAAI,aAAa,CAKlD;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IAC3C,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IAC3C,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAA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EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAqClF;AAED,eAAO,MAAM,mCAAmC,OAAO,CAAA;AAEvD,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAqErE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAqEtE;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAYlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret-contract-api.d.ts","sourceRoot":"","sources":["../../src/secret-contract-api.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;CAG1B,CAAA"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { getMessageWorkclaw, sendMessageWorkclaw } from './outbound/index.js'
|
|
1
|
+
export { getMessageWorkclaw, sendMessageWorkclaw } from './outbound/index.js';
|
|
2
|
+
//# sourceMappingURL=send.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../src/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-api.d.ts","sourceRoot":"","sources":["../../src/setup-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ChannelSetupAdapter, OpenClawConfig } from 'openclaw/plugin-sdk/setup';
|
|
2
|
+
export declare function setWorkclawNamedAccountEnabled(cfg: OpenClawConfig, accountId: string, enabled: boolean): OpenClawConfig;
|
|
3
|
+
export declare const workclawSetupAdapter: ChannelSetupAdapter;
|
|
4
|
+
//# sourceMappingURL=setup-core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-core.d.ts","sourceRoot":"","sources":["../../src/setup-core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AASpF,wBAAgB,8BAA8B,CAC5C,GAAG,EAAE,cAAc,EACnB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,GACf,cAAc,CAEhB;AAED,eAAO,MAAM,oBAAoB,EAAE,mBAOlC,CAAA"}
|