openclaw-openagent 1.0.1 → 1.0.3
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/index.d.ts +25 -0
- package/dist/index.js +105 -0
- package/dist/src/app/channel-tools.d.ts +28 -0
- package/dist/src/app/channel-tools.js +251 -0
- package/dist/src/app/discovery-tools.d.ts +35 -0
- package/dist/src/app/discovery-tools.js +243 -0
- package/dist/src/app/download-file-tool.d.ts +10 -0
- package/dist/src/app/download-file-tool.js +104 -0
- package/dist/src/app/hooks.d.ts +14 -0
- package/dist/src/app/hooks.js +118 -0
- package/dist/src/app/index.d.ts +13 -0
- package/dist/src/app/index.js +44 -0
- package/dist/src/app/messaging-tools.d.ts +11 -0
- package/dist/src/app/messaging-tools.js +79 -0
- package/dist/src/app/ops-tools.d.ts +21 -0
- package/dist/src/app/ops-tools.js +158 -0
- package/dist/src/app/remote-agent-tool.d.ts +27 -0
- package/dist/src/app/remote-agent-tool.js +461 -0
- package/dist/src/app/types.d.ts +61 -0
- package/dist/src/app/types.js +11 -0
- package/dist/src/app/upload-file-tool.d.ts +16 -0
- package/dist/src/app/upload-file-tool.js +353 -0
- package/dist/src/app/verbose-preflight.d.ts +2 -0
- package/dist/src/app/verbose-preflight.js +145 -0
- package/dist/src/auth/config.d.ts +79 -0
- package/dist/src/auth/config.js +133 -0
- package/dist/src/auth/credential-manager.d.ts +65 -0
- package/dist/src/auth/credential-manager.js +122 -0
- package/dist/src/auth/index.d.ts +6 -0
- package/dist/src/auth/index.js +6 -0
- package/dist/src/auth/verify.d.ts +42 -0
- package/dist/src/auth/verify.js +60 -0
- package/dist/src/channel.d.ts +269 -0
- package/dist/src/channel.js +488 -0
- package/dist/src/compat.d.ts +37 -0
- package/dist/src/compat.js +70 -0
- package/dist/src/config/config-schema.d.ts +56 -0
- package/dist/src/config/config-schema.js +34 -0
- package/dist/src/messaging/aggregator.d.ts +25 -0
- package/dist/src/messaging/aggregator.js +90 -0
- package/dist/src/messaging/collector.d.ts +27 -0
- package/dist/src/messaging/collector.js +76 -0
- package/dist/src/messaging/executor.d.ts +14 -0
- package/dist/src/messaging/executor.js +59 -0
- package/dist/src/messaging/inbound.d.ts +97 -0
- package/dist/src/messaging/inbound.js +63 -0
- package/dist/src/messaging/index.d.ts +10 -0
- package/dist/src/messaging/index.js +9 -0
- package/dist/src/messaging/mention-protocol.d.ts +42 -0
- package/dist/src/messaging/mention-protocol.js +74 -0
- package/dist/src/messaging/process-c2c-request.d.ts +55 -0
- package/dist/src/messaging/process-c2c-request.js +445 -0
- package/dist/src/messaging/process-message.d.ts +62 -0
- package/dist/src/messaging/process-message.js +282 -0
- package/dist/src/messaging/scheduler.d.ts +17 -0
- package/dist/src/messaging/scheduler.js +47 -0
- package/dist/src/messaging/types.d.ts +34 -0
- package/dist/src/messaging/types.js +4 -0
- package/dist/src/plugin-ui/assets/openagent-override.js +9278 -0
- package/dist/src/plugin-ui/index.d.ts +13 -0
- package/dist/src/plugin-ui/index.js +16 -0
- package/dist/src/plugin-ui/ui-extension-loader/backup.d.ts +23 -0
- package/dist/src/plugin-ui/ui-extension-loader/backup.js +82 -0
- package/dist/src/plugin-ui/ui-extension-loader/index.d.ts +28 -0
- package/dist/src/plugin-ui/ui-extension-loader/index.js +240 -0
- package/dist/src/plugin-ui/ui-extension-loader/locator.d.ts +35 -0
- package/dist/src/plugin-ui/ui-extension-loader/locator.js +129 -0
- package/dist/src/plugin-ui/ui-extension-loader/manifest.d.ts +26 -0
- package/dist/src/plugin-ui/ui-extension-loader/manifest.js +45 -0
- package/dist/src/plugin-ui/ui-extension-loader/registry-regex.d.ts +9 -0
- package/dist/src/plugin-ui/ui-extension-loader/registry-regex.js +724 -0
- package/dist/src/plugin-ui/ui-extension-loader/removed-extensions.d.ts +8 -0
- package/dist/src/plugin-ui/ui-extension-loader/removed-extensions.js +58 -0
- package/dist/src/plugin-ui/ui-extension-loader/types.d.ts +55 -0
- package/dist/src/plugin-ui/ui-extension-loader/types.js +23 -0
- package/dist/src/proxy/auth-proxy.d.ts +20 -0
- package/dist/src/proxy/auth-proxy.js +337 -0
- package/dist/src/runtime/account.d.ts +156 -0
- package/dist/src/runtime/account.js +491 -0
- package/dist/src/runtime/index.d.ts +5 -0
- package/dist/src/runtime/index.js +6 -0
- package/dist/src/runtime/plugin-runtime.d.ts +40 -0
- package/dist/src/runtime/plugin-runtime.js +72 -0
- package/dist/src/runtime/registry.d.ts +41 -0
- package/dist/src/runtime/registry.js +60 -0
- package/dist/src/sdk/CLASS_MAP.md +143 -0
- package/dist/src/sdk/index.d.ts +126 -0
- package/dist/src/sdk/index.js +23990 -0
- package/dist/src/sdk/modules/cloud-search-module.js +1117 -0
- package/dist/src/sdk/modules/follow-module.js +1069 -0
- package/dist/src/sdk/modules/group-module.js +7397 -0
- package/dist/src/sdk/modules/relationship-module.js +2269 -0
- package/dist/src/sdk/modules/signaling-module.js +1468 -0
- package/dist/src/sdk/modules/tim-upload-plugin.js +730 -0
- package/dist/src/sdk/node-env/http-request.js +90 -0
- package/dist/src/sdk/node-env/index.js +57 -0
- package/dist/src/sdk/node-env/storage.js +114 -0
- package/dist/src/sdk/package.json +10 -0
- package/dist/src/sdk/sdk/CLASS_MAP.md +143 -0
- package/dist/src/sdk/sdk/index.d.ts +126 -0
- package/dist/src/sdk/sdk/index.js +23990 -0
- package/dist/src/sdk/sdk/modules/cloud-search-module.js +1117 -0
- package/dist/src/sdk/sdk/modules/follow-module.js +1069 -0
- package/dist/src/sdk/sdk/modules/group-module.js +7397 -0
- package/dist/src/sdk/sdk/modules/relationship-module.js +2269 -0
- package/dist/src/sdk/sdk/modules/signaling-module.js +1468 -0
- package/dist/src/sdk/sdk/modules/tim-upload-plugin.js +730 -0
- package/dist/src/sdk/sdk/node-env/http-request.js +90 -0
- package/dist/src/sdk/sdk/node-env/index.js +57 -0
- package/dist/src/sdk/sdk/node-env/storage.js +114 -0
- package/dist/src/sdk/sdk/package.json +10 -0
- package/dist/src/sdk/sdk/tsconfig.json +16 -0
- package/dist/src/sdk/tsconfig.json +16 -0
- package/dist/src/state/pending-invocation-store.d.ts +26 -0
- package/dist/src/state/pending-invocation-store.js +39 -0
- package/dist/src/state/store.d.ts +165 -0
- package/dist/src/state/store.js +535 -0
- package/dist/src/tim/c2c.d.ts +83 -0
- package/dist/src/tim/c2c.js +318 -0
- package/dist/src/tim/channels.d.ts +95 -0
- package/dist/src/tim/channels.js +279 -0
- package/dist/src/tim/client.d.ts +54 -0
- package/dist/src/tim/client.js +268 -0
- package/dist/src/tim/index.d.ts +6 -0
- package/dist/src/tim/index.js +6 -0
- package/dist/src/tim/messages.d.ts +50 -0
- package/dist/src/tim/messages.js +104 -0
- package/dist/src/tim/sdk-logger-init.d.ts +13 -0
- package/dist/src/tim/sdk-logger-init.js +46 -0
- package/dist/src/tools.d.ts +9 -0
- package/dist/src/tools.js +8 -0
- package/dist/src/transport/factory.d.ts +63 -0
- package/dist/src/transport/factory.js +54 -0
- package/dist/src/transport/oasn/index.d.ts +12 -0
- package/dist/src/transport/oasn/index.js +9 -0
- package/dist/src/transport/oasn/oasn-agent-card.d.ts +38 -0
- package/dist/src/transport/oasn/oasn-agent-card.js +102 -0
- package/dist/src/transport/oasn/oasn-discovery.d.ts +33 -0
- package/dist/src/transport/oasn/oasn-discovery.js +97 -0
- package/dist/src/transport/oasn/oasn-files.d.ts +64 -0
- package/dist/src/transport/oasn/oasn-files.js +174 -0
- package/dist/src/transport/oasn/oasn-http.d.ts +98 -0
- package/dist/src/transport/oasn/oasn-http.js +362 -0
- package/dist/src/transport/oasn/oasn-invocation.d.ts +154 -0
- package/dist/src/transport/oasn/oasn-invocation.js +432 -0
- package/dist/src/transport/oasn/oasn-normalize.d.ts +6 -0
- package/dist/src/transport/oasn/oasn-normalize.js +112 -0
- package/dist/src/transport/oasn/oasn-register.d.ts +19 -0
- package/dist/src/transport/oasn/oasn-register.js +24 -0
- package/dist/src/transport/oasn/oasn-transport.d.ts +114 -0
- package/dist/src/transport/oasn/oasn-transport.js +230 -0
- package/dist/src/transport/oasn/oasn-types.d.ts +331 -0
- package/dist/src/transport/oasn/oasn-types.js +44 -0
- package/dist/src/transport/tim/index.d.ts +7 -0
- package/dist/src/transport/tim/index.js +6 -0
- package/dist/src/transport/tim/tim-transport.d.ts +122 -0
- package/dist/src/transport/tim/tim-transport.js +402 -0
- package/dist/src/transport/types.d.ts +450 -0
- package/dist/src/transport/types.js +38 -0
- package/dist/src/util/http.d.ts +21 -0
- package/dist/src/util/http.js +93 -0
- package/dist/src/util/logger.d.ts +20 -0
- package/dist/src/util/logger.js +100 -0
- package/dist/src/util/url-resolver.d.ts +7 -0
- package/dist/src/util/url-resolver.js +20 -0
- package/index.ts +11 -0
- package/openclaw.plugin.json +9 -0
- package/package.json +7 -4
- package/src/app/download-file-tool.ts +133 -0
- package/src/app/hooks.ts +89 -5
- package/src/app/index.ts +6 -0
- package/src/app/remote-agent-tool.ts +46 -0
- package/src/app/types.ts +1 -0
- package/src/app/upload-file-tool.ts +411 -0
- package/src/plugin-ui/assets/openagent-override.js +15 -66
- package/src/plugin-ui/modules/agent-book/panel/agent-book.js +0 -61
- package/src/plugin-ui/modules/agent-book/panel/agent-data.js +0 -1
- package/src/plugin-ui/modules/agent-book/panel/inject-ui.js +14 -3
- package/src/plugin-ui/ui-extension-loader/registry-regex.ts +102 -63
- package/src/runtime/account.ts +0 -23
- package/src/transport/oasn/oasn-files.ts +5 -5
- package/src/transport/oasn/oasn-invocation.ts +44 -2
- package/src/transport/oasn/oasn-normalize.ts +0 -26
- package/src/transport/oasn/oasn-register.ts +8 -81
- package/src/transport/oasn/oasn-transport.ts +9 -32
- package/src/transport/oasn/oasn-types.ts +53 -6
- package/src/transport/types.ts +33 -36
- package/src/util/url-resolver.ts +17 -0
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAgent Channel Adapter — OpenClaw channel plugin interface
|
|
3
|
+
*
|
|
4
|
+
* Assembles the v3 modular architecture:
|
|
5
|
+
* auth/ → runtime/ → tim/ → messaging/ → tools
|
|
6
|
+
*
|
|
7
|
+
* Gateway lifecycle uses AccountRuntime with transaction-style
|
|
8
|
+
* start/stop and RuntimeRegistry enforcement.
|
|
9
|
+
*/
|
|
10
|
+
export declare const openagentPlugin: {
|
|
11
|
+
id: string;
|
|
12
|
+
meta: {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
selectionLabel: string;
|
|
16
|
+
detailLabel: string;
|
|
17
|
+
docsPath: string;
|
|
18
|
+
docsLabel: string;
|
|
19
|
+
blurb: string;
|
|
20
|
+
aliases: string[];
|
|
21
|
+
order: number;
|
|
22
|
+
quickstartAllowFrom: boolean;
|
|
23
|
+
};
|
|
24
|
+
capabilities: {
|
|
25
|
+
chatTypes: string[];
|
|
26
|
+
media: boolean;
|
|
27
|
+
reactions: boolean;
|
|
28
|
+
threads: boolean;
|
|
29
|
+
polls: boolean;
|
|
30
|
+
nativeCommands: boolean;
|
|
31
|
+
};
|
|
32
|
+
reload: {
|
|
33
|
+
configPrefixes: string[];
|
|
34
|
+
};
|
|
35
|
+
config: {
|
|
36
|
+
listAccountIds: (cfgOrCtx: Record<string, unknown>) => string[];
|
|
37
|
+
resolveAccount: (cfg: Record<string, unknown>, accountId: string) => import("./auth/config.js").OpenagentAccountConfig;
|
|
38
|
+
defaultAccountId: (cfgOrCtx: Record<string, unknown>) => string;
|
|
39
|
+
setAccountEnabled: ({ cfg, enabled }: {
|
|
40
|
+
cfg: Record<string, unknown>;
|
|
41
|
+
enabled: boolean;
|
|
42
|
+
}) => {
|
|
43
|
+
channels: {
|
|
44
|
+
openagent: {
|
|
45
|
+
enabled: boolean;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
deleteAccount: ({ cfg }: {
|
|
50
|
+
cfg: Record<string, unknown>;
|
|
51
|
+
}) => {
|
|
52
|
+
channels: {
|
|
53
|
+
[x: string]: unknown;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
isConfigured: (account: {
|
|
57
|
+
configured: boolean;
|
|
58
|
+
}) => boolean;
|
|
59
|
+
describeAccount: (account: {
|
|
60
|
+
accountId: string;
|
|
61
|
+
name: string;
|
|
62
|
+
enabled: boolean;
|
|
63
|
+
configured: boolean;
|
|
64
|
+
transport?: string;
|
|
65
|
+
status?: string;
|
|
66
|
+
}) => {
|
|
67
|
+
accountId: string;
|
|
68
|
+
name: string;
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
configured: boolean;
|
|
71
|
+
tokenStatus: string;
|
|
72
|
+
transport: string;
|
|
73
|
+
claimStatus: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
security: {
|
|
77
|
+
resolveDmPolicy: () => {
|
|
78
|
+
policy: string;
|
|
79
|
+
allowFrom: string[];
|
|
80
|
+
policyPath: string;
|
|
81
|
+
allowFromPath: string;
|
|
82
|
+
normalizeEntry: (raw: string) => string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
groups: {
|
|
86
|
+
resolveRequireMention: () => boolean;
|
|
87
|
+
};
|
|
88
|
+
threading: {
|
|
89
|
+
resolveReplyToMode: () => string;
|
|
90
|
+
};
|
|
91
|
+
messaging: {
|
|
92
|
+
normalizeTarget: (raw: string) => string | undefined;
|
|
93
|
+
targetResolver: {
|
|
94
|
+
looksLikeId: (raw: string) => boolean;
|
|
95
|
+
hint: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
outbound: {
|
|
99
|
+
deliveryMode: string;
|
|
100
|
+
chunkerMode: string;
|
|
101
|
+
textChunkLimit: number;
|
|
102
|
+
sendText: ({ to, text }: {
|
|
103
|
+
cfg: unknown;
|
|
104
|
+
to: string;
|
|
105
|
+
text: string;
|
|
106
|
+
accountId?: string;
|
|
107
|
+
}) => Promise<{
|
|
108
|
+
channel: string;
|
|
109
|
+
ok: boolean;
|
|
110
|
+
messageId: string;
|
|
111
|
+
error: Error;
|
|
112
|
+
} | {
|
|
113
|
+
channel: string;
|
|
114
|
+
ok: boolean;
|
|
115
|
+
messageId: string;
|
|
116
|
+
error?: undefined;
|
|
117
|
+
}>;
|
|
118
|
+
};
|
|
119
|
+
status: {
|
|
120
|
+
defaultRuntime: {
|
|
121
|
+
accountId: string;
|
|
122
|
+
running: boolean;
|
|
123
|
+
lastStartAt: number | null;
|
|
124
|
+
lastStopAt: number | null;
|
|
125
|
+
lastError: string | null;
|
|
126
|
+
};
|
|
127
|
+
buildChannelSummary: ({ snapshot }: {
|
|
128
|
+
snapshot: Record<string, unknown>;
|
|
129
|
+
}) => {
|
|
130
|
+
configured: {};
|
|
131
|
+
running: {};
|
|
132
|
+
connected: {};
|
|
133
|
+
transport: {};
|
|
134
|
+
claimStatus: {};
|
|
135
|
+
claimUrl: {};
|
|
136
|
+
lastStartAt: {} | null;
|
|
137
|
+
lastStopAt: {} | null;
|
|
138
|
+
lastError: {} | null;
|
|
139
|
+
lastInboundAt: {} | null;
|
|
140
|
+
lastOutboundAt: {} | null;
|
|
141
|
+
};
|
|
142
|
+
probeAccount: () => Promise<{
|
|
143
|
+
ok: boolean;
|
|
144
|
+
}>;
|
|
145
|
+
buildAccountSnapshot: ({ account, runtime }: {
|
|
146
|
+
account: {
|
|
147
|
+
accountId: string;
|
|
148
|
+
name: string;
|
|
149
|
+
enabled: boolean;
|
|
150
|
+
configured: boolean;
|
|
151
|
+
transport?: string;
|
|
152
|
+
status?: string;
|
|
153
|
+
claimUrl?: string;
|
|
154
|
+
};
|
|
155
|
+
runtime?: {
|
|
156
|
+
running?: boolean;
|
|
157
|
+
lastStartAt?: number;
|
|
158
|
+
lastStopAt?: number;
|
|
159
|
+
lastError?: string;
|
|
160
|
+
};
|
|
161
|
+
}) => {
|
|
162
|
+
accountId: string;
|
|
163
|
+
name: string;
|
|
164
|
+
enabled: boolean;
|
|
165
|
+
configured: boolean;
|
|
166
|
+
tokenStatus: string;
|
|
167
|
+
transport: string;
|
|
168
|
+
claimStatus: string | undefined;
|
|
169
|
+
claimUrl: string;
|
|
170
|
+
running: boolean;
|
|
171
|
+
connected: boolean;
|
|
172
|
+
lastStartAt: number | null;
|
|
173
|
+
lastStopAt: number | null;
|
|
174
|
+
lastError: string | null;
|
|
175
|
+
};
|
|
176
|
+
sendText: () => Promise<{
|
|
177
|
+
ok: boolean;
|
|
178
|
+
}>;
|
|
179
|
+
sendMedia: () => Promise<{
|
|
180
|
+
ok: boolean;
|
|
181
|
+
}>;
|
|
182
|
+
};
|
|
183
|
+
gateway: {
|
|
184
|
+
startAccount: (ctx: {
|
|
185
|
+
account: {
|
|
186
|
+
accountId: string;
|
|
187
|
+
agentId: string;
|
|
188
|
+
apiBase: string;
|
|
189
|
+
accessApiBase?: string;
|
|
190
|
+
apiKey: string;
|
|
191
|
+
configured: boolean;
|
|
192
|
+
config: Record<string, unknown>;
|
|
193
|
+
};
|
|
194
|
+
cfg: Record<string, unknown>;
|
|
195
|
+
abortSignal?: AbortSignal;
|
|
196
|
+
log?: {
|
|
197
|
+
info?: (msg: string) => void;
|
|
198
|
+
warn?: (msg: string) => void;
|
|
199
|
+
error?: (msg: string) => void;
|
|
200
|
+
};
|
|
201
|
+
setStatus: (status: Record<string, unknown>) => void;
|
|
202
|
+
}) => Promise<void>;
|
|
203
|
+
stopAccount: (ctx: {
|
|
204
|
+
account: {
|
|
205
|
+
accountId: string;
|
|
206
|
+
};
|
|
207
|
+
setStatus: (status: Record<string, unknown>) => void;
|
|
208
|
+
}) => Promise<void>;
|
|
209
|
+
};
|
|
210
|
+
onboarding: {
|
|
211
|
+
channel: string;
|
|
212
|
+
getStatus: ({ cfg }: {
|
|
213
|
+
cfg: Record<string, unknown>;
|
|
214
|
+
}) => Promise<{
|
|
215
|
+
channel: string;
|
|
216
|
+
configured: boolean;
|
|
217
|
+
statusLines: string[];
|
|
218
|
+
selectionHint: string;
|
|
219
|
+
quickstartScore: number;
|
|
220
|
+
}>;
|
|
221
|
+
configure: ({ cfg, prompter }: {
|
|
222
|
+
cfg: Record<string, unknown>;
|
|
223
|
+
prompter: {
|
|
224
|
+
text: (opts: {
|
|
225
|
+
message: string;
|
|
226
|
+
validate: (v: string) => string | undefined;
|
|
227
|
+
}) => Promise<string>;
|
|
228
|
+
};
|
|
229
|
+
}) => Promise<{
|
|
230
|
+
cfg: {
|
|
231
|
+
channels: {
|
|
232
|
+
openagent: {
|
|
233
|
+
enabled: boolean;
|
|
234
|
+
transport: string;
|
|
235
|
+
api_base: string;
|
|
236
|
+
access_api_base: string;
|
|
237
|
+
accounts: {
|
|
238
|
+
default: Record<string, unknown>;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
accountId: string;
|
|
244
|
+
} | {
|
|
245
|
+
cfg: {
|
|
246
|
+
channels: {
|
|
247
|
+
openagent: {
|
|
248
|
+
enabled: boolean;
|
|
249
|
+
accounts: {
|
|
250
|
+
default: {
|
|
251
|
+
agent_id: string;
|
|
252
|
+
api_key: string;
|
|
253
|
+
api_base: string;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
accountId: string;
|
|
260
|
+
}>;
|
|
261
|
+
disable: (cfg: Record<string, unknown>) => {
|
|
262
|
+
channels: {
|
|
263
|
+
openagent: {
|
|
264
|
+
enabled: boolean;
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
};
|