@hypercli.com/sdk 2026.6.21 → 2026.7.31
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/README.md +82 -1
- package/dist/agent.d.ts +19 -2
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +24 -0
- package/dist/agent.js.map +1 -1
- package/dist/agents.d.ts +561 -41
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +2016 -106
- package/dist/agents.js.map +1 -1
- package/dist/browser.d.ts +3 -1
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +9 -2
- package/dist/browser.js.map +1 -1
- package/dist/channels.d.ts +156 -0
- package/dist/channels.d.ts.map +1 -0
- package/dist/channels.js +110 -0
- package/dist/channels.js.map +1 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +9 -3
- package/dist/client.js.map +1 -1
- package/dist/connectors.d.ts +79 -0
- package/dist/connectors.d.ts.map +1 -0
- package/dist/connectors.js +2 -0
- package/dist/connectors.js.map +1 -0
- package/dist/http.d.ts +10 -3
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +135 -61
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +12 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/keys.d.ts +6 -1
- package/dist/keys.d.ts.map +1 -1
- package/dist/keys.js +8 -1
- package/dist/keys.js.map +1 -1
- package/dist/openclaw/channels.d.ts +86 -0
- package/dist/openclaw/channels.d.ts.map +1 -0
- package/dist/openclaw/channels.js +290 -0
- package/dist/openclaw/channels.js.map +1 -0
- package/dist/openclaw/connectors.d.ts +61 -0
- package/dist/openclaw/connectors.d.ts.map +1 -0
- package/dist/openclaw/connectors.js +174 -0
- package/dist/openclaw/connectors.js.map +1 -0
- package/dist/openclaw/gateway.d.ts +733 -15
- package/dist/openclaw/gateway.d.ts.map +1 -1
- package/dist/openclaw/gateway.js +1720 -181
- package/dist/openclaw/gateway.js.map +1 -1
- package/dist/openclaw/skills.d.ts +106 -0
- package/dist/openclaw/skills.d.ts.map +1 -0
- package/dist/openclaw/skills.js +575 -0
- package/dist/openclaw/skills.js.map +1 -0
- package/dist/openclaw/slack.d.ts +818 -0
- package/dist/openclaw/slack.d.ts.map +1 -0
- package/dist/openclaw/slack.js +536 -0
- package/dist/openclaw/slack.js.map +1 -0
- package/dist/openclaw/whatsapp.d.ts +63 -0
- package/dist/openclaw/whatsapp.d.ts.map +1 -0
- package/dist/openclaw/whatsapp.js +264 -0
- package/dist/openclaw/whatsapp.js.map +1 -0
- package/dist/renders.js +11 -11
- package/dist/renders.js.map +1 -1
- package/dist/skills.d.ts +126 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +2 -0
- package/dist/skills.js.map +1 -0
- package/dist/user.d.ts +15 -2
- package/dist/user.d.ts.map +1 -1
- package/dist/user.js +51 -4
- package/dist/user.js.map +1 -1
- package/dist/voice-session.d.ts +74 -0
- package/dist/voice-session.d.ts.map +1 -0
- package/dist/voice-session.js +255 -0
- package/dist/voice-session.js.map +1 -0
- package/dist/voice.d.ts +27 -3
- package/dist/voice.d.ts.map +1 -1
- package/dist/voice.js +89 -6
- package/dist/voice.js.map +1 -1
- package/dist/workspaces.d.ts +181 -0
- package/dist/workspaces.d.ts.map +1 -0
- package/dist/workspaces.js +495 -0
- package/dist/workspaces.js.map +1 -0
- package/dist/x402.d.ts.map +1 -1
- package/dist/x402.js +1 -2
- package/dist/x402.js.map +1 -1
- package/package.json +38 -2
package/dist/agents.d.ts
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
|
-
import { HTTPClient } from './http.js';
|
|
2
|
-
import { GatewayClient, type ChatAttachment, type ChatEvent, type GatewayOptions, type GatewayWaitReadyOptions, type OpenClawConfigSchemaResponse } from './openclaw/gateway.js';
|
|
3
|
-
|
|
1
|
+
import { HTTPClient, type RequestOverrides } from './http.js';
|
|
2
|
+
import { GatewayClient, type ChatAttachment, type ChatEvent, type GatewayIntegrationAuthStartParams, type GatewayIntegrationAuthStartResult, type GatewayIntegrationAuthStatusParams, type GatewayIntegrationAuthStatusResult, type GatewayIntegrationDisconnectParams, type GatewayIntegrationDisconnectResult, type GatewayIntegrationStatusParams, type GatewayIntegrationStatusResult, type GatewayOptions, type GatewaySessionsListResult, type GatewayWebLoginStartOptions, type GatewayWebLoginStartResult, type GatewayWebLoginWaitOptions, type GatewayWebLoginWaitResult, type GatewayWaitReadyOptions, type OpenClawConfigSchemaResponse, type OpenClawSlackRelayOptions } from './openclaw/gateway.js';
|
|
3
|
+
import type { OpenClawTelegramConfigPatch, OpenClawWhatsAppConfigPatch } from './openclaw/channels.js';
|
|
4
|
+
import type { OpenClawSlackHttpConfiguration, OpenClawSlackRelayConfiguration, OpenClawSlackSocketConfiguration } from './openclaw/slack.js';
|
|
5
|
+
export declare const DEFAULT_OPENCLAW_IMAGE = "ghcr.io/hypercli/hypercli-openclaw:pro-latest";
|
|
6
|
+
export declare const DEFAULT_OPENCLAW_PRO_IMAGE = "ghcr.io/hypercli/hypercli-openclaw:pro-latest";
|
|
7
|
+
export declare const DEFAULT_OPENCODE_IMAGE = "ghcr.io/hypercli/hypercli-opencode:latest";
|
|
8
|
+
export declare const DEFAULT_CODEX_IMAGE = "ghcr.io/hypercli/hypercli-codex:latest";
|
|
9
|
+
export declare const DEFAULT_CLAUDE_CODE_IMAGE = "ghcr.io/hypercli/hypercli-claude-code:latest";
|
|
10
|
+
export declare const DEFAULT_GOOSE_IMAGE = "ghcr.io/hypercli/hypercli-goose:latest";
|
|
11
|
+
export declare const DEFAULT_KIMI_CODE_IMAGE = "ghcr.io/hypercli/hypercli-kimi-code:latest";
|
|
12
|
+
export declare const DEFAULT_BUZZ_OPENCODE_IMAGE = "ghcr.io/hypercli/hypercli-buzz-opencode:latest";
|
|
13
|
+
export declare const DEFAULT_BUZZ_CODEX_IMAGE = "ghcr.io/hypercli/hypercli-buzz-codex:latest";
|
|
14
|
+
export declare const DEFAULT_BUZZ_CLAUDE_CODE_IMAGE = "ghcr.io/hypercli/hypercli-buzz-claude:latest";
|
|
15
|
+
export declare const DEFAULT_BUZZ_GOOSE_IMAGE = "ghcr.io/hypercli/hypercli-buzz-goose:latest";
|
|
16
|
+
export declare const DEFAULT_BUZZ_KIMI_CODE_IMAGE = "ghcr.io/hypercli/hypercli-buzz-kimi-code:latest";
|
|
17
|
+
export declare const DEFAULT_CODING_AGENT_SYNC_ROOT = "/home/node";
|
|
18
|
+
export type ManagedAgentRuntime = 'generic' | 'openclaw' | 'openclaw-pro' | 'opencode' | 'codex' | 'claude-code' | 'goose' | 'kimi-code';
|
|
19
|
+
export type CodingAgentRuntime = Extract<ManagedAgentRuntime, 'opencode' | 'codex' | 'claude-code' | 'goose' | 'kimi-code'>;
|
|
20
|
+
export declare const DEFAULT_CODING_AGENT_IMAGES: Readonly<Record<CodingAgentRuntime, string>>;
|
|
21
|
+
export declare const DEFAULT_BUZZ_CODING_AGENT_IMAGES: Readonly<Record<CodingAgentRuntime, string>>;
|
|
22
|
+
export declare const DEFAULT_BUZZ_RUST_LOG = "buzz_acp=info,pool::prompt=info,acp::stream=off";
|
|
23
|
+
export declare const OPENCLAW_MEMORY_SEARCH_ENV_DEFAULTS: {
|
|
24
|
+
readonly OPENCLAW_MEMORY_SEARCH_ENABLED: "1";
|
|
25
|
+
readonly OPENCLAW_MEMORY_SEARCH_SYNC_ON_SESSION_START: "0";
|
|
26
|
+
readonly OPENCLAW_MEMORY_SEARCH_SYNC_ON_SEARCH: "0";
|
|
27
|
+
readonly OPENCLAW_MEMORY_SEARCH_SYNC_WATCH: "0";
|
|
28
|
+
readonly OPENCLAW_MEMORY_SEARCH_SYNC_WATCH_DEBOUNCE_MS: "30000";
|
|
29
|
+
readonly OPENCLAW_MEMORY_SEARCH_SYNC_INTERVAL_MINUTES: "0";
|
|
30
|
+
};
|
|
31
|
+
export declare const OPENCLAW_WORKSPACES_SYNC_ENV_DEFAULTS: {
|
|
32
|
+
readonly HYPER_WORKSPACES_BOOT_SYNC: "1";
|
|
33
|
+
readonly HYPER_WORKSPACES_DIR: "/home/node/workspaces";
|
|
34
|
+
readonly HYPER_WORKSPACES_SYNC_READY_ONLY: "1";
|
|
35
|
+
};
|
|
4
36
|
export declare const AGENT_FILE_MAX_BYTES: number;
|
|
5
37
|
export declare const AGENT_FILE_TRANSFER_CHUNK_BYTES: number;
|
|
6
38
|
export declare const AGENT_FILE_OPERATION_TIMEOUT_MS = 300000;
|
|
@@ -16,6 +48,10 @@ export interface AgentTokenResponse {
|
|
|
16
48
|
jwt?: string;
|
|
17
49
|
expires_at?: string | null;
|
|
18
50
|
}
|
|
51
|
+
export interface BrowserDesktopUrlOptions {
|
|
52
|
+
redirect?: string | null;
|
|
53
|
+
resize?: string | null;
|
|
54
|
+
}
|
|
19
55
|
export interface AgentGatewayContext {
|
|
20
56
|
agent_id?: string;
|
|
21
57
|
hostname?: string | null;
|
|
@@ -24,6 +60,7 @@ export interface AgentGatewayContext {
|
|
|
24
60
|
export interface GatewayContextWaitOptions {
|
|
25
61
|
timeoutMs?: number;
|
|
26
62
|
retryIntervalMs?: number;
|
|
63
|
+
signal?: AbortSignal;
|
|
27
64
|
}
|
|
28
65
|
export interface AgentShellTokenResponse {
|
|
29
66
|
agent_id?: string;
|
|
@@ -33,12 +70,135 @@ export interface AgentShellTokenResponse {
|
|
|
33
70
|
shell?: string | null;
|
|
34
71
|
dry_run?: boolean;
|
|
35
72
|
}
|
|
73
|
+
export interface AgentShellConnectOptions {
|
|
74
|
+
signal?: AbortSignal;
|
|
75
|
+
tokenTimeoutMs?: number;
|
|
76
|
+
openTimeoutMs?: number;
|
|
77
|
+
}
|
|
36
78
|
export interface AgentLogsTokenResponse {
|
|
37
79
|
agent_id?: string;
|
|
38
80
|
jwt: string;
|
|
39
81
|
expires_at?: string | null;
|
|
40
82
|
ws_url?: string;
|
|
41
83
|
}
|
|
84
|
+
export interface AgentRelayKey {
|
|
85
|
+
key_id?: string | null;
|
|
86
|
+
key_name?: string | null;
|
|
87
|
+
tags?: string[];
|
|
88
|
+
api_key?: string | null;
|
|
89
|
+
api_key_preview?: string | null;
|
|
90
|
+
last4?: string | null;
|
|
91
|
+
[key: string]: any;
|
|
92
|
+
}
|
|
93
|
+
export interface AgentProfileImageUploadResult {
|
|
94
|
+
id: string;
|
|
95
|
+
avatar_url: string | null;
|
|
96
|
+
s3_key: string | null;
|
|
97
|
+
}
|
|
98
|
+
export interface BootstrapInferenceMessage {
|
|
99
|
+
role: 'system' | 'user' | 'assistant';
|
|
100
|
+
content: string;
|
|
101
|
+
}
|
|
102
|
+
export interface BootstrapInferenceResponseFormat {
|
|
103
|
+
type: 'text' | 'json_object' | 'json_schema';
|
|
104
|
+
json_schema?: {
|
|
105
|
+
name: string;
|
|
106
|
+
description?: string;
|
|
107
|
+
strict?: boolean;
|
|
108
|
+
schema: Record<string, unknown>;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
export interface BootstrapInferenceResult {
|
|
112
|
+
model: string;
|
|
113
|
+
content: string;
|
|
114
|
+
finish_reason: string | null;
|
|
115
|
+
usage: {
|
|
116
|
+
prompt_tokens: number;
|
|
117
|
+
completion_tokens: number;
|
|
118
|
+
total_tokens: number;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
export interface ListAgentsOptions extends RequestOverrides {
|
|
122
|
+
state?: string | null;
|
|
123
|
+
handle?: string | null;
|
|
124
|
+
name?: string | null;
|
|
125
|
+
query?: string | null;
|
|
126
|
+
includeDeleted?: boolean | null;
|
|
127
|
+
}
|
|
128
|
+
export interface SlackOAuthStartOptions {
|
|
129
|
+
relayBaseUrl: string;
|
|
130
|
+
token: string;
|
|
131
|
+
}
|
|
132
|
+
export interface SlackOAuthStartResult {
|
|
133
|
+
authorizeUrl: string;
|
|
134
|
+
expiresAt?: string | null;
|
|
135
|
+
}
|
|
136
|
+
export interface SlackInstallStatusOptions {
|
|
137
|
+
relayBaseUrl: string;
|
|
138
|
+
token: string;
|
|
139
|
+
}
|
|
140
|
+
export interface SlackInstallStatus {
|
|
141
|
+
connected: boolean;
|
|
142
|
+
teamId?: string | null;
|
|
143
|
+
teamName?: string | null;
|
|
144
|
+
botUserId?: string | null;
|
|
145
|
+
installerUserId?: string | null;
|
|
146
|
+
updatedAt?: string | null;
|
|
147
|
+
}
|
|
148
|
+
export interface SlackDirectoryOptions {
|
|
149
|
+
relayBaseUrl: string;
|
|
150
|
+
token: string;
|
|
151
|
+
cursor?: string | null;
|
|
152
|
+
limit?: number | null;
|
|
153
|
+
}
|
|
154
|
+
export interface SlackDirectoryConversationsOptions extends SlackDirectoryOptions {
|
|
155
|
+
types?: string | null;
|
|
156
|
+
}
|
|
157
|
+
export interface SlackDirectoryConversation {
|
|
158
|
+
id: string;
|
|
159
|
+
name?: string | null;
|
|
160
|
+
isChannel?: boolean | null;
|
|
161
|
+
isGroup?: boolean | null;
|
|
162
|
+
isIm?: boolean | null;
|
|
163
|
+
isMpim?: boolean | null;
|
|
164
|
+
isMember?: boolean | null;
|
|
165
|
+
isPrivate?: boolean | null;
|
|
166
|
+
}
|
|
167
|
+
export interface SlackDirectoryUser {
|
|
168
|
+
id: string;
|
|
169
|
+
name?: string | null;
|
|
170
|
+
realName?: string | null;
|
|
171
|
+
teamId?: string | null;
|
|
172
|
+
isBot?: boolean | null;
|
|
173
|
+
deleted?: boolean | null;
|
|
174
|
+
}
|
|
175
|
+
export interface SlackDirectoryConversationsResult {
|
|
176
|
+
conversations: SlackDirectoryConversation[];
|
|
177
|
+
nextCursor?: string | null;
|
|
178
|
+
}
|
|
179
|
+
export interface SlackDirectoryUsersResult {
|
|
180
|
+
users: SlackDirectoryUser[];
|
|
181
|
+
nextCursor?: string | null;
|
|
182
|
+
}
|
|
183
|
+
export interface AttachSlackRelayAgentOptions {
|
|
184
|
+
relayBaseUrl: string;
|
|
185
|
+
token: string;
|
|
186
|
+
agentId: string;
|
|
187
|
+
}
|
|
188
|
+
export interface AttachSlackRelayAgentResult {
|
|
189
|
+
connected: boolean;
|
|
190
|
+
agentId: string;
|
|
191
|
+
gatewayId: string;
|
|
192
|
+
config: Record<string, unknown>;
|
|
193
|
+
restartRequired: boolean;
|
|
194
|
+
teamId?: string | null;
|
|
195
|
+
teamName?: string | null;
|
|
196
|
+
botUserId?: string | null;
|
|
197
|
+
}
|
|
198
|
+
export interface AttachDeploymentSlackRelayAgentOptions {
|
|
199
|
+
relayBaseUrl: string;
|
|
200
|
+
token?: string;
|
|
201
|
+
}
|
|
42
202
|
export interface BraveWebSearchOptions {
|
|
43
203
|
count?: number;
|
|
44
204
|
country?: string;
|
|
@@ -61,6 +221,13 @@ export interface AgentRouteConfig {
|
|
|
61
221
|
strip_prefix?: boolean;
|
|
62
222
|
[key: string]: any;
|
|
63
223
|
}
|
|
224
|
+
export type LaunchConfigFlatMap = Record<string, unknown>;
|
|
225
|
+
export interface AgentDesktopConfigSource {
|
|
226
|
+
launchConfig?: unknown;
|
|
227
|
+
launch_config?: unknown;
|
|
228
|
+
routes?: unknown;
|
|
229
|
+
ports?: unknown;
|
|
230
|
+
}
|
|
64
231
|
export interface RegistryAuth {
|
|
65
232
|
username?: string;
|
|
66
233
|
password?: string;
|
|
@@ -80,10 +247,13 @@ export interface BuildAgentConfigOptions {
|
|
|
80
247
|
syncGid?: number | null;
|
|
81
248
|
registryUrl?: string | null;
|
|
82
249
|
registryAuth?: RegistryAuth | null;
|
|
250
|
+
restart?: boolean | null;
|
|
83
251
|
gatewayToken?: string | null;
|
|
84
252
|
heartbeat?: OpenClawHeartbeatConfig | null;
|
|
85
253
|
/** Disable to avoid automatically locking browser control UI access to globalThis.location.origin. */
|
|
86
254
|
controlUiOriginLock?: boolean | null;
|
|
255
|
+
/** Internal launch behavior; coding runtimes do not use the OpenClaw gateway. */
|
|
256
|
+
injectGatewayToken?: boolean;
|
|
87
257
|
}
|
|
88
258
|
export interface OpenClawRouteOptions {
|
|
89
259
|
includeGateway?: boolean;
|
|
@@ -95,6 +265,20 @@ export interface OpenClawRouteOptions {
|
|
|
95
265
|
gatewayPrefix?: string;
|
|
96
266
|
desktopPrefix?: string;
|
|
97
267
|
}
|
|
268
|
+
export interface OpenClawMemoryIndexOptions {
|
|
269
|
+
enabled?: boolean | null;
|
|
270
|
+
onSessionStart?: boolean | null;
|
|
271
|
+
onSearch?: boolean | null;
|
|
272
|
+
watch?: boolean | null;
|
|
273
|
+
watchDebounceMs?: number | null;
|
|
274
|
+
intervalMinutes?: number | null;
|
|
275
|
+
}
|
|
276
|
+
export interface OpenClawWorkspacesSyncOptions {
|
|
277
|
+
enabled?: boolean | null;
|
|
278
|
+
outputDir?: string | null;
|
|
279
|
+
readyOnly?: boolean | null;
|
|
280
|
+
workspace?: string | null;
|
|
281
|
+
}
|
|
98
282
|
export interface OpenClawHeartbeatConfig {
|
|
99
283
|
every?: string;
|
|
100
284
|
model?: string;
|
|
@@ -176,12 +360,30 @@ export interface OpenClawModelProviderConfig {
|
|
|
176
360
|
export type OpenClawModelProviderPatch = Partial<Omit<OpenClawModelProviderConfig, 'baseUrl'>> & Pick<OpenClawModelProviderConfig, 'baseUrl'>;
|
|
177
361
|
export interface CreateAgentOptions extends BuildAgentConfigOptions {
|
|
178
362
|
name?: string;
|
|
363
|
+
handle?: string | null;
|
|
179
364
|
size?: string;
|
|
180
365
|
config?: Record<string, any>;
|
|
181
366
|
meta?: AgentMeta | null;
|
|
182
367
|
tags?: string[];
|
|
183
368
|
dryRun?: boolean;
|
|
184
369
|
start?: boolean;
|
|
370
|
+
runtime?: ManagedAgentRuntime;
|
|
371
|
+
}
|
|
372
|
+
export interface CreateExternalAgentOptions {
|
|
373
|
+
name: string;
|
|
374
|
+
displayName?: string | null;
|
|
375
|
+
handle?: string | null;
|
|
376
|
+
runtime?: string;
|
|
377
|
+
status?: string;
|
|
378
|
+
meta?: Record<string, any> | null;
|
|
379
|
+
}
|
|
380
|
+
export interface UpdateExternalAgentOptions {
|
|
381
|
+
name?: string | null;
|
|
382
|
+
displayName?: string | null;
|
|
383
|
+
handle?: string | null;
|
|
384
|
+
runtime?: 'openclaw' | null;
|
|
385
|
+
status?: 'active' | 'inactive' | 'error' | null;
|
|
386
|
+
meta?: Record<string, any> | null;
|
|
185
387
|
}
|
|
186
388
|
export interface StartAgentOptions extends BuildAgentConfigOptions {
|
|
187
389
|
config?: Record<string, any>;
|
|
@@ -189,17 +391,67 @@ export interface StartAgentOptions extends BuildAgentConfigOptions {
|
|
|
189
391
|
}
|
|
190
392
|
export interface UpdateAgentOptions {
|
|
191
393
|
name?: string;
|
|
394
|
+
handle?: string | null;
|
|
192
395
|
size?: string;
|
|
396
|
+
launchConfig?: Record<string, any> | null;
|
|
193
397
|
refreshFromLagoon?: boolean;
|
|
194
398
|
lastError?: string | null;
|
|
195
399
|
}
|
|
196
400
|
export interface OpenClawCreateAgentOptions extends CreateAgentOptions {
|
|
197
401
|
openClawRoutes?: OpenClawRouteOptions | null;
|
|
198
402
|
heartbeat?: OpenClawHeartbeatConfig | null;
|
|
403
|
+
memoryIndex?: OpenClawMemoryIndexOptions | null;
|
|
404
|
+
workspacesSync?: OpenClawWorkspacesSyncOptions | boolean | null;
|
|
199
405
|
}
|
|
200
406
|
export interface OpenClawStartAgentOptions extends StartAgentOptions {
|
|
201
407
|
openClawRoutes?: OpenClawRouteOptions | null;
|
|
202
408
|
heartbeat?: OpenClawHeartbeatConfig | null;
|
|
409
|
+
memoryIndex?: OpenClawMemoryIndexOptions | null;
|
|
410
|
+
workspacesSync?: OpenClawWorkspacesSyncOptions | boolean | null;
|
|
411
|
+
}
|
|
412
|
+
export interface CodingAgentCreateOptions extends Omit<CreateAgentOptions, 'runtime' | 'injectGatewayToken'> {
|
|
413
|
+
workspacesSync?: OpenClawWorkspacesSyncOptions | boolean | null;
|
|
414
|
+
/** @deprecated Use the typed `buzz` launch contract. */
|
|
415
|
+
buzzEnabled?: boolean;
|
|
416
|
+
/** Launch Buzz ACP with runtime-specific harness and MCP defaults. */
|
|
417
|
+
buzz?: BuzzLaunchConfig | null;
|
|
418
|
+
}
|
|
419
|
+
export interface BuzzLaunchConfig {
|
|
420
|
+
privateKeyNsec: string;
|
|
421
|
+
relayUrl: string;
|
|
422
|
+
authTag?: string | null;
|
|
423
|
+
systemPrompt?: string | null;
|
|
424
|
+
model?: string | null;
|
|
425
|
+
idleTimeoutSeconds?: number | null;
|
|
426
|
+
maxTurnDurationSeconds?: number | null;
|
|
427
|
+
parallelism?: number;
|
|
428
|
+
respondTo?: string | null;
|
|
429
|
+
respondToAllowlist?: string[];
|
|
430
|
+
sessionTitle?: string | null;
|
|
431
|
+
rustLog?: string;
|
|
432
|
+
restart?: boolean;
|
|
433
|
+
}
|
|
434
|
+
export interface RuntimeAuthMethod {
|
|
435
|
+
id: string;
|
|
436
|
+
name: string;
|
|
437
|
+
description: string;
|
|
438
|
+
kind: string;
|
|
439
|
+
command: string[];
|
|
440
|
+
metadata: Record<string, unknown>;
|
|
441
|
+
}
|
|
442
|
+
export interface RuntimeAuthStatus {
|
|
443
|
+
authenticated: boolean;
|
|
444
|
+
provider?: string | null;
|
|
445
|
+
account?: string | null;
|
|
446
|
+
method?: string | null;
|
|
447
|
+
detail: Record<string, unknown>;
|
|
448
|
+
}
|
|
449
|
+
export interface RuntimeAuthLoginOptions {
|
|
450
|
+
method?: string;
|
|
451
|
+
provider?: string;
|
|
452
|
+
providerMethod?: string;
|
|
453
|
+
email?: string;
|
|
454
|
+
challengeTimeoutMs?: number;
|
|
203
455
|
}
|
|
204
456
|
export interface AgentExecOptions {
|
|
205
457
|
timeout?: number;
|
|
@@ -211,9 +463,92 @@ export interface AgentFileEntry {
|
|
|
211
463
|
type: 'file' | 'directory';
|
|
212
464
|
size?: number;
|
|
213
465
|
size_formatted?: string;
|
|
466
|
+
mime_type?: string;
|
|
467
|
+
mimeType?: string;
|
|
468
|
+
content_type?: string;
|
|
469
|
+
contentType?: string;
|
|
214
470
|
last_modified?: string;
|
|
471
|
+
checksum?: string;
|
|
472
|
+
checksum_algorithm?: string;
|
|
473
|
+
checksumAlgorithm?: string;
|
|
474
|
+
hash?: string;
|
|
475
|
+
hash_algorithm?: string;
|
|
476
|
+
hashAlgorithm?: string;
|
|
477
|
+
sha256?: string;
|
|
478
|
+
sha_256?: string;
|
|
479
|
+
md5?: string;
|
|
480
|
+
etag?: string;
|
|
481
|
+
version_id?: string;
|
|
482
|
+
versionId?: string;
|
|
483
|
+
source?: AgentFileSource;
|
|
215
484
|
[key: string]: any;
|
|
216
485
|
}
|
|
486
|
+
export interface AgentFileReadOptions {
|
|
487
|
+
maxBytes?: number;
|
|
488
|
+
signal?: AbortSignal;
|
|
489
|
+
}
|
|
490
|
+
export interface AgentFileReadBytesResult {
|
|
491
|
+
content: Uint8Array;
|
|
492
|
+
mimeType?: string;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* The three file-access paths for an OpenClaw agent, each with its own root —
|
|
496
|
+
* the SDK owns the roots so a workspace-relative path (e.g. `"AGENTS.md"`) hits
|
|
497
|
+
* the same file on all three:
|
|
498
|
+
* - `agent` — the files API on the agent's live pod filesystem. A
|
|
499
|
+
* workspace-relative path resolves under the workspace, while an
|
|
500
|
+
* absolute `/…` path can be listed/read anywhere on the pod.
|
|
501
|
+
* Writes under the sync root are supported. (wire `source=pod`)
|
|
502
|
+
* - `backup` — the S3 backup of the sync root (`/home/node`); served when the
|
|
503
|
+
* pod is stopped. Scoped to the sync root. (wire `source=s3`)
|
|
504
|
+
* - `gateway`— the operator-WebSocket `agents.files.*` RPC; scoped to the
|
|
505
|
+
* `.openclaw/workspace` (name-addressed; no delete). Works on any
|
|
506
|
+
* gateway, self-hosted included.
|
|
507
|
+
* - `auto` — backend default: the agent while running, else the backup.
|
|
508
|
+
*
|
|
509
|
+
* `pod`/`s3` are accepted as deprecated aliases of `agent`/`backup`.
|
|
510
|
+
*/
|
|
511
|
+
export type AgentFileSource = 'auto' | 'agent' | 'backup' | 'gateway' | 'pod' | 's3';
|
|
512
|
+
/** @deprecated Alias of {@link AgentFileSource}; gateway is a base capability now. */
|
|
513
|
+
export type OpenClawFileSource = AgentFileSource;
|
|
514
|
+
/** The backend (non-gateway) file sources — the deployment HTTP files store. */
|
|
515
|
+
export type AgentFileBackendSource = Exclude<AgentFileSource, 'gateway'>;
|
|
516
|
+
/** The value the deployment HTTP API accepts on the wire (`source`/`destination`). */
|
|
517
|
+
export type AgentFileWireSource = 'auto' | 'pod' | 's3';
|
|
518
|
+
/** The agent's sync root and workspace, owned by the SDK so paths are unambiguous. */
|
|
519
|
+
export declare const OPENCLAW_SYNC_ROOT = "/home/node";
|
|
520
|
+
export declare const OPENCLAW_WORKSPACE_PREFIX = ".openclaw/workspace";
|
|
521
|
+
/** Map the friendly `agent`/`backup` names to their on-the-wire `pod`/`s3` values. */
|
|
522
|
+
export declare function toWireFileSource(source: AgentFileBackendSource): AgentFileWireSource;
|
|
523
|
+
/** Hooks an OpenClaw agent provides so AgentFiles can reach its gateway. */
|
|
524
|
+
export interface AgentFilesGatewayHooks {
|
|
525
|
+
withGateway<T>(fn: (client: GatewayClient) => Promise<T>): Promise<T>;
|
|
526
|
+
resolveAgentId(client: GatewayClient): Promise<string>;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* ONE client wrapping all three agent file-access paths behind a single `source`
|
|
530
|
+
* switch (`agent` | `backup` | `gateway`, plus `auto`). The SDK owns the roots,
|
|
531
|
+
* so a workspace-relative path is the same file on every source; `agent` also
|
|
532
|
+
* takes absolute `/…` paths for read-only full-filesystem browsing. The
|
|
533
|
+
* underlying APIs are left as-is — this only wraps them.
|
|
534
|
+
*/
|
|
535
|
+
export declare class AgentFiles {
|
|
536
|
+
private readonly agent;
|
|
537
|
+
private readonly deployments;
|
|
538
|
+
private readonly gatewayHooks?;
|
|
539
|
+
constructor(agent: Agent, deployments: Deployments, gatewayHooks?: AgentFilesGatewayHooks | undefined);
|
|
540
|
+
private requireGateway;
|
|
541
|
+
list(path?: string, source?: OpenClawFileSource): Promise<AgentFileEntry[]>;
|
|
542
|
+
readBytes(path: string, source?: OpenClawFileSource, options?: AgentFileReadOptions): Promise<Uint8Array>;
|
|
543
|
+
readBytesWithMetadata(path: string, source?: OpenClawFileSource, options?: AgentFileReadOptions): Promise<AgentFileReadBytesResult>;
|
|
544
|
+
read(path: string, source?: OpenClawFileSource, options?: AgentFileReadOptions): Promise<string>;
|
|
545
|
+
writeBytes(path: string, content: Uint8Array | ArrayBuffer | string, source?: OpenClawFileSource): Promise<Record<string, any>>;
|
|
546
|
+
write(path: string, content: string, source?: OpenClawFileSource): Promise<Record<string, any>>;
|
|
547
|
+
delete(path: string, options?: {
|
|
548
|
+
recursive?: boolean;
|
|
549
|
+
source?: OpenClawFileSource;
|
|
550
|
+
}): Promise<Record<string, any>>;
|
|
551
|
+
}
|
|
217
552
|
export interface AgentDirectoryListing {
|
|
218
553
|
type: 'directory';
|
|
219
554
|
prefix: string;
|
|
@@ -222,13 +557,24 @@ export interface AgentDirectoryListing {
|
|
|
222
557
|
truncated?: boolean;
|
|
223
558
|
[key: string]: any;
|
|
224
559
|
}
|
|
560
|
+
export type AgentState = 'PENDING' | 'RESTORING' | 'RESTORE_FAILED' | 'SYNCING' | 'SYNC_FAILED' | 'STARTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'FAILED' | (string & {});
|
|
225
561
|
export interface AgentStateFields {
|
|
226
562
|
id: string;
|
|
227
563
|
userId: string;
|
|
228
564
|
podId: string;
|
|
229
565
|
podName: string;
|
|
230
|
-
state:
|
|
566
|
+
state: AgentState;
|
|
231
567
|
name?: string | null;
|
|
568
|
+
handle?: string | null;
|
|
569
|
+
displayName?: string | null;
|
|
570
|
+
avatarUrl?: string | null;
|
|
571
|
+
displayIdentity?: Record<string, any> | null;
|
|
572
|
+
runtime?: string | null;
|
|
573
|
+
managed?: boolean | null;
|
|
574
|
+
isLaunchable?: boolean;
|
|
575
|
+
gatewayId?: string | null;
|
|
576
|
+
runtimeKeyAlias?: string | null;
|
|
577
|
+
relayKey?: AgentRelayKey | null;
|
|
232
578
|
cpu: number;
|
|
233
579
|
memory: number;
|
|
234
580
|
hostname?: string | null;
|
|
@@ -253,8 +599,18 @@ export interface AgentHydrationData {
|
|
|
253
599
|
user_id?: string;
|
|
254
600
|
pod_id?: string;
|
|
255
601
|
pod_name?: string;
|
|
256
|
-
state?:
|
|
602
|
+
state?: AgentState;
|
|
257
603
|
name?: string | null;
|
|
604
|
+
handle?: string | null;
|
|
605
|
+
display_name?: string | null;
|
|
606
|
+
avatar_url?: string | null;
|
|
607
|
+
display_identity?: Record<string, any> | null;
|
|
608
|
+
runtime?: string | null;
|
|
609
|
+
managed?: boolean | null;
|
|
610
|
+
is_launchable?: boolean;
|
|
611
|
+
gateway_id?: string | null;
|
|
612
|
+
runtime_key_alias?: string | null;
|
|
613
|
+
relay_key?: AgentRelayKey | null;
|
|
258
614
|
cpu?: number;
|
|
259
615
|
memory?: number;
|
|
260
616
|
hostname?: string | null;
|
|
@@ -280,12 +636,26 @@ export interface AgentHydrationData {
|
|
|
280
636
|
gateway_token?: string | null;
|
|
281
637
|
[key: string]: any;
|
|
282
638
|
}
|
|
639
|
+
export declare function flattenLaunchConfig(launchConfig: unknown): LaunchConfigFlatMap;
|
|
640
|
+
export declare function getLaunchConfigValue(launchConfig: unknown, path: string | Array<string | number>): unknown;
|
|
641
|
+
export declare function routesHaveDesktop(routes: unknown): boolean;
|
|
642
|
+
export declare function portsHaveDesktop(ports: unknown): boolean;
|
|
643
|
+
export declare function launchConfigHasDesktop(launchConfig: unknown): boolean;
|
|
644
|
+
export declare function agentConfigHasDesktop(source: AgentDesktopConfigSource | null | undefined): boolean;
|
|
645
|
+
export declare function buildBrowserDesktopUrl(desktopBaseUrl: string, token: string, options?: BrowserDesktopUrlOptions): string;
|
|
283
646
|
export declare function resolveAgentsApiBase(apiBase: string): string;
|
|
284
647
|
export declare function buildAgentConfig(config?: Record<string, any>, options?: BuildAgentConfigOptions): {
|
|
285
648
|
config: Record<string, any>;
|
|
286
649
|
gatewayToken: string;
|
|
287
650
|
};
|
|
651
|
+
export declare function startSlackOAuth(options: SlackOAuthStartOptions): Promise<SlackOAuthStartResult>;
|
|
652
|
+
export declare function getSlackInstallStatus(options: SlackInstallStatusOptions): Promise<SlackInstallStatus>;
|
|
653
|
+
export declare function listSlackDirectoryConversations(options: SlackDirectoryConversationsOptions): Promise<SlackDirectoryConversationsResult>;
|
|
654
|
+
export declare function listSlackDirectoryUsers(options: SlackDirectoryOptions): Promise<SlackDirectoryUsersResult>;
|
|
655
|
+
export declare function attachSlackRelayAgent(options: AttachSlackRelayAgentOptions): Promise<AttachSlackRelayAgentResult>;
|
|
288
656
|
export declare function buildOpenClawRoutes(options?: OpenClawRouteOptions): Record<string, AgentRouteConfig>;
|
|
657
|
+
export declare function buildOpenClawMemoryIndexEnv(memoryIndex?: OpenClawMemoryIndexOptions | null): Record<string, string>;
|
|
658
|
+
export declare function buildOpenClawWorkspacesSyncEnv(workspacesSync?: OpenClawWorkspacesSyncOptions | boolean | null): Record<string, string>;
|
|
289
659
|
export declare class Agent {
|
|
290
660
|
readonly id: string;
|
|
291
661
|
readonly userId: string;
|
|
@@ -293,6 +663,16 @@ export declare class Agent {
|
|
|
293
663
|
readonly podName: string;
|
|
294
664
|
readonly state: string;
|
|
295
665
|
readonly name: string | null;
|
|
666
|
+
readonly handle: string | null;
|
|
667
|
+
readonly displayName: string | null;
|
|
668
|
+
readonly avatarUrl: string | null;
|
|
669
|
+
readonly displayIdentity: Record<string, any> | null;
|
|
670
|
+
readonly runtime: string | null;
|
|
671
|
+
readonly managed: boolean | null;
|
|
672
|
+
readonly isLaunchable: boolean;
|
|
673
|
+
readonly gatewayId: string | null;
|
|
674
|
+
readonly runtimeKeyAlias: string | null;
|
|
675
|
+
readonly relayKey: AgentRelayKey | null;
|
|
296
676
|
readonly cpu: number;
|
|
297
677
|
readonly memory: number;
|
|
298
678
|
readonly hostname: string | null;
|
|
@@ -319,9 +699,11 @@ export declare class Agent {
|
|
|
319
699
|
routeUrl(routeName: string, defaultPrefix?: string | null): string | null;
|
|
320
700
|
get desktopUrl(): string | null;
|
|
321
701
|
get vncUrl(): string | null;
|
|
702
|
+
browserDesktopUrl(token: string, options?: BrowserDesktopUrlOptions): string | null;
|
|
322
703
|
get shellUrl(): string | null;
|
|
323
704
|
get executorUrl(): string | null;
|
|
324
705
|
get isRunning(): boolean;
|
|
706
|
+
get hasDesktop(): boolean;
|
|
325
707
|
protected requireDeployments(): Deployments;
|
|
326
708
|
routeRequiresAuth(routeName: string, defaultValue?: boolean): boolean;
|
|
327
709
|
refreshToken(): Promise<AgentTokenResponse>;
|
|
@@ -331,17 +713,87 @@ export declare class Agent {
|
|
|
331
713
|
env(): Promise<Record<string, string>>;
|
|
332
714
|
exec(command: string, options?: AgentExecOptions): Promise<AgentExecResult>;
|
|
333
715
|
health(): Promise<Record<string, any>>;
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
716
|
+
/**
|
|
717
|
+
* The gateway file writer a subclass supplies — the seam that enables the
|
|
718
|
+
* `gateway` source. The base agent has none (gateway calls throw); an agent
|
|
719
|
+
* type that speaks a gateway file protocol (e.g. OpenClaw's `agents.files.*`)
|
|
720
|
+
* overloads this. Kept on the base so the *calling* is standardized through
|
|
721
|
+
* the superclass even though each agent's gateway differs.
|
|
722
|
+
*/
|
|
723
|
+
protected gatewayFileHooks(): AgentFilesGatewayHooks | undefined;
|
|
724
|
+
/**
|
|
725
|
+
* The single file client for this agent — one `source` switch (`agent` |
|
|
726
|
+
* `backup` | `gateway`) routes to the three underlying APIs (pod sidecar / S3
|
|
727
|
+
* backup / gateway), with the SDK owning the roots. One implementation; a
|
|
728
|
+
* subclass only supplies its gateway via {@link gatewayFileHooks}.
|
|
729
|
+
*/
|
|
730
|
+
get files(): AgentFiles;
|
|
731
|
+
filesList(path?: string, source?: AgentFileSource): Promise<AgentFileEntry[]>;
|
|
732
|
+
fileReadBytes(path: string, source?: AgentFileSource, options?: AgentFileReadOptions): Promise<Uint8Array>;
|
|
733
|
+
fileReadBytesWithMetadata(path: string, source?: AgentFileSource, options?: AgentFileReadOptions): Promise<AgentFileReadBytesResult>;
|
|
734
|
+
fileRead(path: string, source?: AgentFileSource, options?: AgentFileReadOptions): Promise<string>;
|
|
735
|
+
fileWriteBytes(path: string, content: Uint8Array | ArrayBuffer | string, destination?: AgentFileSource): Promise<Record<string, any>>;
|
|
736
|
+
fileWrite(path: string, content: string, destination?: AgentFileSource): Promise<Record<string, any>>;
|
|
339
737
|
fileDelete(path: string, options?: {
|
|
340
738
|
recursive?: boolean;
|
|
739
|
+
source?: AgentFileSource;
|
|
341
740
|
}): Promise<Record<string, any>>;
|
|
342
741
|
cpTo(localPath: string, remotePath: string): Promise<Record<string, any>>;
|
|
343
742
|
cpFrom(remotePath: string, localPath: string): Promise<string>;
|
|
344
|
-
shellConnect(shell?: string): Promise<WebSocket>;
|
|
743
|
+
shellConnect(shell?: string, options?: AgentShellConnectOptions): Promise<WebSocket>;
|
|
744
|
+
}
|
|
745
|
+
export declare class RuntimeLoginSession {
|
|
746
|
+
private readonly authClient;
|
|
747
|
+
readonly socket: WebSocket;
|
|
748
|
+
output: string;
|
|
749
|
+
verificationUrl: string | null;
|
|
750
|
+
userCode: string | null;
|
|
751
|
+
interactiveRequired: boolean;
|
|
752
|
+
private exitCode;
|
|
753
|
+
private readonly marker;
|
|
754
|
+
private readonly completion;
|
|
755
|
+
private readonly ready;
|
|
756
|
+
private complete;
|
|
757
|
+
private markReady;
|
|
758
|
+
private constructor();
|
|
759
|
+
static start(authClient: RuntimeAuthClient, command: string[], challengeTimeoutMs?: number): Promise<RuntimeLoginSession>;
|
|
760
|
+
private consume;
|
|
761
|
+
send(text: string): void;
|
|
762
|
+
wait(timeoutMs?: number): Promise<RuntimeAuthStatus>;
|
|
763
|
+
cancel(): void;
|
|
764
|
+
}
|
|
765
|
+
export declare class RuntimeAuthClient {
|
|
766
|
+
readonly agent: CodingAgent;
|
|
767
|
+
private readonly config;
|
|
768
|
+
constructor(agent: CodingAgent);
|
|
769
|
+
methods(): Promise<RuntimeAuthMethod[]>;
|
|
770
|
+
status(): Promise<RuntimeAuthStatus>;
|
|
771
|
+
login(options?: RuntimeAuthLoginOptions): Promise<RuntimeLoginSession>;
|
|
772
|
+
logout(provider?: string): Promise<RuntimeAuthStatus>;
|
|
773
|
+
}
|
|
774
|
+
export declare class CodingAgent extends Agent {
|
|
775
|
+
readonly runtime: CodingAgentRuntime;
|
|
776
|
+
get auth(): RuntimeAuthClient;
|
|
777
|
+
}
|
|
778
|
+
export declare class OpenCodeAgent extends CodingAgent {
|
|
779
|
+
readonly runtime: 'opencode';
|
|
780
|
+
static fromDict(data: AgentHydrationData): OpenCodeAgent;
|
|
781
|
+
}
|
|
782
|
+
export declare class CodexAgent extends CodingAgent {
|
|
783
|
+
readonly runtime: 'codex';
|
|
784
|
+
static fromDict(data: AgentHydrationData): CodexAgent;
|
|
785
|
+
}
|
|
786
|
+
export declare class ClaudeCodeAgent extends CodingAgent {
|
|
787
|
+
readonly runtime: 'claude-code';
|
|
788
|
+
static fromDict(data: AgentHydrationData): ClaudeCodeAgent;
|
|
789
|
+
}
|
|
790
|
+
export declare class GooseAgent extends CodingAgent {
|
|
791
|
+
readonly runtime: 'goose';
|
|
792
|
+
static fromDict(data: AgentHydrationData): GooseAgent;
|
|
793
|
+
}
|
|
794
|
+
export declare class KimiCodeAgent extends CodingAgent {
|
|
795
|
+
readonly runtime: 'kimi-code';
|
|
796
|
+
static fromDict(data: AgentHydrationData): KimiCodeAgent;
|
|
345
797
|
}
|
|
346
798
|
export declare class OpenClawAgent extends Agent {
|
|
347
799
|
gatewayUrl: string | null;
|
|
@@ -351,7 +803,7 @@ export declare class OpenClawAgent extends Agent {
|
|
|
351
803
|
gatewayToken?: string | null;
|
|
352
804
|
});
|
|
353
805
|
static fromDict(data: AgentHydrationData): OpenClawAgent;
|
|
354
|
-
|
|
806
|
+
protected static gatewayUrlFromHostname(hostname: string | null | undefined): string | null;
|
|
355
807
|
private currentGatewayHostname;
|
|
356
808
|
/**
|
|
357
809
|
* Resolve gateway context through the deployment record plus `/env`.
|
|
@@ -365,32 +817,64 @@ export declare class OpenClawAgent extends Agent {
|
|
|
365
817
|
resolveGatewayToken(): Promise<string | null>;
|
|
366
818
|
gateway(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): GatewayClient;
|
|
367
819
|
connect(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<GatewayClient>;
|
|
820
|
+
/** Run a fn against a connected gateway client, then close it. */
|
|
821
|
+
private withGateway;
|
|
822
|
+
private _gatewayAgentId?;
|
|
823
|
+
/**
|
|
824
|
+
* The in-gateway agent id for `agents.files.*` — NOT the deployment id. A
|
|
825
|
+
* deployment's gateway hosts an agent named `main` (or a named agent);
|
|
826
|
+
* matches the existing fileGet/fileSet/workspaceFiles convention.
|
|
827
|
+
*/
|
|
828
|
+
private resolveGatewayAgentId;
|
|
829
|
+
/**
|
|
830
|
+
* Overload the base gateway seam with OpenClaw's `agents.files.*` — the actual
|
|
831
|
+
* OpenClaw gateway file methods. The base `files`/`fileX` calling surface is
|
|
832
|
+
* inherited unchanged; only the gateway writer is supplied here.
|
|
833
|
+
*/
|
|
834
|
+
protected gatewayFileHooks(): AgentFilesGatewayHooks;
|
|
368
835
|
gatewayStatus(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<Record<string, any>>;
|
|
369
836
|
waitReady(timeoutMs?: number, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & GatewayWaitReadyOptions): Promise<Record<string, any>>;
|
|
370
837
|
configGet(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<Record<string, any>>;
|
|
371
838
|
configSchema(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<OpenClawConfigSchemaResponse>;
|
|
372
839
|
configPatch(patch: Record<string, any>, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<void>;
|
|
840
|
+
configureSlackRelay(options: (Omit<OpenClawSlackRelayOptions, 'gatewayId'> & {
|
|
841
|
+
gatewayId?: string;
|
|
842
|
+
}) | OpenClawSlackRelayConfiguration, gatewayOptions?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & {
|
|
843
|
+
accountId?: string;
|
|
844
|
+
}): Promise<void>;
|
|
845
|
+
configureSlackSocket(config: OpenClawSlackSocketConfiguration, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & {
|
|
846
|
+
accountId?: string;
|
|
847
|
+
}): Promise<void>;
|
|
848
|
+
configureSlackHttp(config: OpenClawSlackHttpConfiguration, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & {
|
|
849
|
+
accountId?: string;
|
|
850
|
+
}): Promise<void>;
|
|
851
|
+
configureTelegram(config: OpenClawTelegramConfigPatch, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & {
|
|
852
|
+
accountId?: string;
|
|
853
|
+
}): Promise<void>;
|
|
854
|
+
configureWhatsapp(config: OpenClawWhatsAppConfigPatch, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & {
|
|
855
|
+
accountId?: string;
|
|
856
|
+
}): Promise<void>;
|
|
373
857
|
configApply(config: Record<string, any>, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<void>;
|
|
374
858
|
modelsList(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<any[]>;
|
|
375
859
|
sessionsList(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<any[]>;
|
|
860
|
+
sessionsListResult(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<GatewaySessionsListResult>;
|
|
376
861
|
chatSend(message: string, sessionKey: string, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & {
|
|
377
862
|
attachments?: ChatAttachment[];
|
|
378
863
|
}): AsyncGenerator<ChatEvent>;
|
|
379
864
|
channelsStatus(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & {
|
|
380
865
|
probe?: boolean;
|
|
381
866
|
timeoutMs?: number;
|
|
867
|
+
channel?: string;
|
|
382
868
|
}): Promise<Record<string, any>>;
|
|
869
|
+
channelsStart(channel: string, accountId?: string, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<Record<string, any>>;
|
|
870
|
+
channelsStop(channel: string, accountId?: string, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<Record<string, any>>;
|
|
383
871
|
channelsLogout(channel: string, accountId?: string, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<Record<string, any>>;
|
|
384
|
-
webLoginStart(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> &
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
webLoginWait(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & {
|
|
391
|
-
timeoutMs?: number;
|
|
392
|
-
accountId?: string;
|
|
393
|
-
}): Promise<Record<string, any>>;
|
|
872
|
+
webLoginStart(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & GatewayWebLoginStartOptions): Promise<GatewayWebLoginStartResult>;
|
|
873
|
+
webLoginWait(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & GatewayWebLoginWaitOptions): Promise<GatewayWebLoginWaitResult>;
|
|
874
|
+
integrationsAuthStart(params: GatewayIntegrationAuthStartParams, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<GatewayIntegrationAuthStartResult>;
|
|
875
|
+
integrationsAuthStatus(params: GatewayIntegrationAuthStatusParams, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<GatewayIntegrationAuthStatusResult>;
|
|
876
|
+
integrationsStatus(params?: GatewayIntegrationStatusParams, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<GatewayIntegrationStatusResult>;
|
|
877
|
+
integrationsDisconnect(params: GatewayIntegrationDisconnectParams, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<GatewayIntegrationDisconnectResult>;
|
|
394
878
|
workspaceFiles(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<{
|
|
395
879
|
agentId: string;
|
|
396
880
|
files: any[];
|
|
@@ -432,6 +916,12 @@ export declare class OpenClawAgent extends Agent {
|
|
|
432
916
|
accountId?: string;
|
|
433
917
|
}): Promise<Record<string, any>>;
|
|
434
918
|
cronList(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<any[]>;
|
|
919
|
+
cronAdd(job: Record<string, any>, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<any>;
|
|
920
|
+
cronRemove(jobId: string, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<void>;
|
|
921
|
+
cronRun(jobId: string, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<any>;
|
|
922
|
+
}
|
|
923
|
+
export declare class OpenClawProAgent extends OpenClawAgent {
|
|
924
|
+
static fromDict(data: AgentHydrationData): OpenClawProAgent;
|
|
435
925
|
}
|
|
436
926
|
export declare class Deployments {
|
|
437
927
|
private readonly http;
|
|
@@ -439,50 +929,80 @@ export declare class Deployments {
|
|
|
439
929
|
private readonly apiBase;
|
|
440
930
|
private readonly agentsWsUrl;
|
|
441
931
|
private readonly agentHttp;
|
|
442
|
-
constructor(http: HTTPClient, agentApiKey?: string, agentApiBase?: string, agentsWsUrl?: string);
|
|
932
|
+
constructor(http: HTTPClient, agentApiKey?: string, agentApiBase?: string, agentsWsUrl?: string, requestTimeout?: number);
|
|
443
933
|
get agentApiKey(): string;
|
|
444
934
|
get agentApiBase(): string;
|
|
445
935
|
private hydrateAgent;
|
|
936
|
+
private getById;
|
|
937
|
+
resolveAgent(agentIdOrName: string, requestOptions?: RequestOverrides): Promise<Agent>;
|
|
938
|
+
resolveAgentId(agentIdOrName: string, requestOptions?: RequestOverrides): Promise<string>;
|
|
446
939
|
private agentIdFor;
|
|
447
940
|
private fetchRaw;
|
|
448
941
|
create(options?: CreateAgentOptions): Promise<Agent>;
|
|
449
942
|
createOpenClaw(options?: OpenClawCreateAgentOptions): Promise<Agent>;
|
|
943
|
+
createOpenClawPro(options?: OpenClawCreateAgentOptions): Promise<Agent>;
|
|
944
|
+
private createCodingAgent;
|
|
945
|
+
createOpenCode(options?: CodingAgentCreateOptions): Promise<OpenCodeAgent>;
|
|
946
|
+
createCodex(options?: CodingAgentCreateOptions): Promise<CodexAgent>;
|
|
947
|
+
createClaudeCode(options?: CodingAgentCreateOptions): Promise<ClaudeCodeAgent>;
|
|
948
|
+
createGoose(options?: CodingAgentCreateOptions): Promise<GooseAgent>;
|
|
949
|
+
createKimiCode(options?: CodingAgentCreateOptions): Promise<KimiCodeAgent>;
|
|
450
950
|
budget(): Promise<Record<string, any>>;
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
951
|
+
bootstrapInference(messages: BootstrapInferenceMessage[], responseFormat?: BootstrapInferenceResponseFormat, requestOptions?: RequestOverrides): Promise<BootstrapInferenceResult>;
|
|
952
|
+
metrics(agentIdOrName: string): Promise<Record<string, any>>;
|
|
953
|
+
list(options?: ListAgentsOptions): Promise<Agent[]>;
|
|
954
|
+
get(agentIdOrName: string, requestOptions?: RequestOverrides): Promise<Agent>;
|
|
955
|
+
createExternalAgent(options: CreateExternalAgentOptions): Promise<Agent>;
|
|
956
|
+
updateExternalAgent(externalAgentId: string, options: UpdateExternalAgentOptions): Promise<Agent>;
|
|
957
|
+
getExternalAgent(externalAgentId: string): Promise<Agent>;
|
|
958
|
+
uploadExternalAgentProfileImage(externalAgentId: string, content: Blob | ArrayBuffer | ArrayBufferView, contentType?: string): Promise<AgentProfileImageUploadResult>;
|
|
959
|
+
deleteExternalAgentProfileImage(externalAgentId: string): Promise<AgentProfileImageUploadResult>;
|
|
960
|
+
rotateExternalAgentKey(agentIdOrName: string): Promise<Record<string, any>>;
|
|
961
|
+
attachSlackRelayAgent(agentIdOrName: string, options: AttachDeploymentSlackRelayAgentOptions): Promise<AttachSlackRelayAgentResult>;
|
|
962
|
+
waitRunning(agentIdOrName: string, timeoutMs?: number, pollIntervalMs?: number): Promise<Agent>;
|
|
963
|
+
start(agentIdOrName: string, options?: StartAgentOptions): Promise<Agent>;
|
|
964
|
+
startOpenClaw(agentIdOrName: string, options?: OpenClawStartAgentOptions): Promise<Agent>;
|
|
965
|
+
startOpenClawPro(agentIdOrName: string, options?: OpenClawStartAgentOptions): Promise<Agent>;
|
|
966
|
+
update(agentIdOrName: string, options?: UpdateAgentOptions): Promise<Agent>;
|
|
967
|
+
uploadProfileImage(agentId: string, content: Blob | ArrayBuffer | ArrayBufferView, contentType?: string): Promise<AgentProfileImageUploadResult>;
|
|
968
|
+
deleteProfileImage(agentId: string): Promise<AgentProfileImageUploadResult>;
|
|
458
969
|
resize(agentId: string, options: Pick<UpdateAgentOptions, 'size'>): Promise<Agent>;
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
970
|
+
/**
|
|
971
|
+
* Request an agent stop.
|
|
972
|
+
*
|
|
973
|
+
* The returned agent remains `STOPPING` while runtime cleanup is in
|
|
974
|
+
* progress. Fetch it again until it becomes `STOPPED` before treating its
|
|
975
|
+
* deployment slot as released.
|
|
976
|
+
*/
|
|
977
|
+
stop(agentIdOrName: string): Promise<Agent>;
|
|
978
|
+
delete(agentIdOrName: string): Promise<Record<string, any>>;
|
|
979
|
+
refreshToken(agentIdOrName: string): Promise<AgentTokenResponse>;
|
|
980
|
+
createScopedKey(agentIdOrName: string, name?: string): Promise<Record<string, any>>;
|
|
463
981
|
webSearch(query: string, options?: BraveWebSearchOptions): Promise<BraveWebSearchResponse>;
|
|
464
|
-
logsToken(
|
|
465
|
-
env(
|
|
982
|
+
logsToken(agentIdOrName: string): Promise<AgentLogsTokenResponse>;
|
|
983
|
+
env(agentIdOrName: string, requestOptions?: RequestOverrides): Promise<{
|
|
466
984
|
agent_id: string;
|
|
467
985
|
env: Record<string, string>;
|
|
468
986
|
}>;
|
|
469
987
|
exec(target: Agent | string, command: string, options?: AgentExecOptions): Promise<AgentExecResult>;
|
|
470
988
|
health(target: Agent): Promise<Record<string, any>>;
|
|
471
989
|
filesList(target: Agent | string, path?: string, source?: 'auto' | 'pod' | 's3'): Promise<AgentFileEntry[]>;
|
|
472
|
-
|
|
473
|
-
|
|
990
|
+
fileReadBytesWithMetadata(target: Agent | string, path: string, source?: 'auto' | 'pod' | 's3', options?: AgentFileReadOptions): Promise<AgentFileReadBytesResult>;
|
|
991
|
+
fileReadBytes(target: Agent | string, path: string, source?: 'auto' | 'pod' | 's3', options?: AgentFileReadOptions): Promise<Uint8Array>;
|
|
992
|
+
fileRead(target: Agent | string, path: string, source?: 'auto' | 'pod' | 's3', options?: AgentFileReadOptions): Promise<string>;
|
|
474
993
|
fileWriteBytes(target: Agent | string, path: string, content: Uint8Array | ArrayBuffer | string, destination?: 'auto' | 'pod' | 's3'): Promise<Record<string, any>>;
|
|
475
994
|
fileWrite(target: Agent | string, path: string, content: string, destination?: 'auto' | 'pod' | 's3'): Promise<Record<string, any>>;
|
|
476
995
|
fileDelete(target: Agent | string, path: string, options?: {
|
|
477
996
|
recursive?: boolean;
|
|
997
|
+
source?: 'auto' | 'pod' | 's3';
|
|
478
998
|
}): Promise<Record<string, any>>;
|
|
479
999
|
cpTo(target: Agent | string, localPath: string, remotePath: string): Promise<Record<string, any>>;
|
|
480
1000
|
cpFrom(target: Agent | string, remotePath: string, localPath: string): Promise<string>;
|
|
481
|
-
logsConnect(
|
|
1001
|
+
logsConnect(agentIdOrName: string, options?: {
|
|
482
1002
|
tailLines?: number;
|
|
483
1003
|
container?: string;
|
|
484
1004
|
}): Promise<WebSocket>;
|
|
485
|
-
shellToken(
|
|
486
|
-
shellConnect(
|
|
1005
|
+
shellToken(agentIdOrName: string, shell?: string, dryRun?: boolean, requestOptions?: RequestOverrides): Promise<AgentShellTokenResponse>;
|
|
1006
|
+
shellConnect(agentIdOrName: string, shell?: string, options?: AgentShellConnectOptions): Promise<WebSocket>;
|
|
487
1007
|
}
|
|
488
1008
|
//# sourceMappingURL=agents.d.ts.map
|