@hypercli.com/sdk 2026.6.26 → 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 +78 -0
- 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 +534 -43
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +1890 -110
- 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 +650 -15
- package/dist/openclaw/gateway.d.ts.map +1 -1
- package/dist/openclaw/gateway.js +1708 -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,7 +1,25 @@
|
|
|
1
|
-
import { HTTPClient } 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 GatewayWaitReadyOptions, type OpenClawConfigSchemaResponse } from './openclaw/gateway.js';
|
|
3
|
-
|
|
4
|
-
|
|
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";
|
|
5
23
|
export declare const OPENCLAW_MEMORY_SEARCH_ENV_DEFAULTS: {
|
|
6
24
|
readonly OPENCLAW_MEMORY_SEARCH_ENABLED: "1";
|
|
7
25
|
readonly OPENCLAW_MEMORY_SEARCH_SYNC_ON_SESSION_START: "0";
|
|
@@ -10,6 +28,11 @@ export declare const OPENCLAW_MEMORY_SEARCH_ENV_DEFAULTS: {
|
|
|
10
28
|
readonly OPENCLAW_MEMORY_SEARCH_SYNC_WATCH_DEBOUNCE_MS: "30000";
|
|
11
29
|
readonly OPENCLAW_MEMORY_SEARCH_SYNC_INTERVAL_MINUTES: "0";
|
|
12
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
|
+
};
|
|
13
36
|
export declare const AGENT_FILE_MAX_BYTES: number;
|
|
14
37
|
export declare const AGENT_FILE_TRANSFER_CHUNK_BYTES: number;
|
|
15
38
|
export declare const AGENT_FILE_OPERATION_TIMEOUT_MS = 300000;
|
|
@@ -25,6 +48,10 @@ export interface AgentTokenResponse {
|
|
|
25
48
|
jwt?: string;
|
|
26
49
|
expires_at?: string | null;
|
|
27
50
|
}
|
|
51
|
+
export interface BrowserDesktopUrlOptions {
|
|
52
|
+
redirect?: string | null;
|
|
53
|
+
resize?: string | null;
|
|
54
|
+
}
|
|
28
55
|
export interface AgentGatewayContext {
|
|
29
56
|
agent_id?: string;
|
|
30
57
|
hostname?: string | null;
|
|
@@ -33,6 +60,7 @@ export interface AgentGatewayContext {
|
|
|
33
60
|
export interface GatewayContextWaitOptions {
|
|
34
61
|
timeoutMs?: number;
|
|
35
62
|
retryIntervalMs?: number;
|
|
63
|
+
signal?: AbortSignal;
|
|
36
64
|
}
|
|
37
65
|
export interface AgentShellTokenResponse {
|
|
38
66
|
agent_id?: string;
|
|
@@ -42,12 +70,135 @@ export interface AgentShellTokenResponse {
|
|
|
42
70
|
shell?: string | null;
|
|
43
71
|
dry_run?: boolean;
|
|
44
72
|
}
|
|
73
|
+
export interface AgentShellConnectOptions {
|
|
74
|
+
signal?: AbortSignal;
|
|
75
|
+
tokenTimeoutMs?: number;
|
|
76
|
+
openTimeoutMs?: number;
|
|
77
|
+
}
|
|
45
78
|
export interface AgentLogsTokenResponse {
|
|
46
79
|
agent_id?: string;
|
|
47
80
|
jwt: string;
|
|
48
81
|
expires_at?: string | null;
|
|
49
82
|
ws_url?: string;
|
|
50
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
|
+
}
|
|
51
202
|
export interface BraveWebSearchOptions {
|
|
52
203
|
count?: number;
|
|
53
204
|
country?: string;
|
|
@@ -70,6 +221,13 @@ export interface AgentRouteConfig {
|
|
|
70
221
|
strip_prefix?: boolean;
|
|
71
222
|
[key: string]: any;
|
|
72
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
|
+
}
|
|
73
231
|
export interface RegistryAuth {
|
|
74
232
|
username?: string;
|
|
75
233
|
password?: string;
|
|
@@ -89,10 +247,13 @@ export interface BuildAgentConfigOptions {
|
|
|
89
247
|
syncGid?: number | null;
|
|
90
248
|
registryUrl?: string | null;
|
|
91
249
|
registryAuth?: RegistryAuth | null;
|
|
250
|
+
restart?: boolean | null;
|
|
92
251
|
gatewayToken?: string | null;
|
|
93
252
|
heartbeat?: OpenClawHeartbeatConfig | null;
|
|
94
253
|
/** Disable to avoid automatically locking browser control UI access to globalThis.location.origin. */
|
|
95
254
|
controlUiOriginLock?: boolean | null;
|
|
255
|
+
/** Internal launch behavior; coding runtimes do not use the OpenClaw gateway. */
|
|
256
|
+
injectGatewayToken?: boolean;
|
|
96
257
|
}
|
|
97
258
|
export interface OpenClawRouteOptions {
|
|
98
259
|
includeGateway?: boolean;
|
|
@@ -112,6 +273,12 @@ export interface OpenClawMemoryIndexOptions {
|
|
|
112
273
|
watchDebounceMs?: number | null;
|
|
113
274
|
intervalMinutes?: number | null;
|
|
114
275
|
}
|
|
276
|
+
export interface OpenClawWorkspacesSyncOptions {
|
|
277
|
+
enabled?: boolean | null;
|
|
278
|
+
outputDir?: string | null;
|
|
279
|
+
readyOnly?: boolean | null;
|
|
280
|
+
workspace?: string | null;
|
|
281
|
+
}
|
|
115
282
|
export interface OpenClawHeartbeatConfig {
|
|
116
283
|
every?: string;
|
|
117
284
|
model?: string;
|
|
@@ -193,12 +360,30 @@ export interface OpenClawModelProviderConfig {
|
|
|
193
360
|
export type OpenClawModelProviderPatch = Partial<Omit<OpenClawModelProviderConfig, 'baseUrl'>> & Pick<OpenClawModelProviderConfig, 'baseUrl'>;
|
|
194
361
|
export interface CreateAgentOptions extends BuildAgentConfigOptions {
|
|
195
362
|
name?: string;
|
|
363
|
+
handle?: string | null;
|
|
196
364
|
size?: string;
|
|
197
365
|
config?: Record<string, any>;
|
|
198
366
|
meta?: AgentMeta | null;
|
|
199
367
|
tags?: string[];
|
|
200
368
|
dryRun?: boolean;
|
|
201
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;
|
|
202
387
|
}
|
|
203
388
|
export interface StartAgentOptions extends BuildAgentConfigOptions {
|
|
204
389
|
config?: Record<string, any>;
|
|
@@ -206,7 +391,9 @@ export interface StartAgentOptions extends BuildAgentConfigOptions {
|
|
|
206
391
|
}
|
|
207
392
|
export interface UpdateAgentOptions {
|
|
208
393
|
name?: string;
|
|
394
|
+
handle?: string | null;
|
|
209
395
|
size?: string;
|
|
396
|
+
launchConfig?: Record<string, any> | null;
|
|
210
397
|
refreshFromLagoon?: boolean;
|
|
211
398
|
lastError?: string | null;
|
|
212
399
|
}
|
|
@@ -214,11 +401,57 @@ export interface OpenClawCreateAgentOptions extends CreateAgentOptions {
|
|
|
214
401
|
openClawRoutes?: OpenClawRouteOptions | null;
|
|
215
402
|
heartbeat?: OpenClawHeartbeatConfig | null;
|
|
216
403
|
memoryIndex?: OpenClawMemoryIndexOptions | null;
|
|
404
|
+
workspacesSync?: OpenClawWorkspacesSyncOptions | boolean | null;
|
|
217
405
|
}
|
|
218
406
|
export interface OpenClawStartAgentOptions extends StartAgentOptions {
|
|
219
407
|
openClawRoutes?: OpenClawRouteOptions | null;
|
|
220
408
|
heartbeat?: OpenClawHeartbeatConfig | null;
|
|
221
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;
|
|
222
455
|
}
|
|
223
456
|
export interface AgentExecOptions {
|
|
224
457
|
timeout?: number;
|
|
@@ -230,9 +463,92 @@ export interface AgentFileEntry {
|
|
|
230
463
|
type: 'file' | 'directory';
|
|
231
464
|
size?: number;
|
|
232
465
|
size_formatted?: string;
|
|
466
|
+
mime_type?: string;
|
|
467
|
+
mimeType?: string;
|
|
468
|
+
content_type?: string;
|
|
469
|
+
contentType?: string;
|
|
233
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;
|
|
234
484
|
[key: string]: any;
|
|
235
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
|
+
}
|
|
236
552
|
export interface AgentDirectoryListing {
|
|
237
553
|
type: 'directory';
|
|
238
554
|
prefix: string;
|
|
@@ -241,13 +557,24 @@ export interface AgentDirectoryListing {
|
|
|
241
557
|
truncated?: boolean;
|
|
242
558
|
[key: string]: any;
|
|
243
559
|
}
|
|
560
|
+
export type AgentState = 'PENDING' | 'RESTORING' | 'RESTORE_FAILED' | 'SYNCING' | 'SYNC_FAILED' | 'STARTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'FAILED' | (string & {});
|
|
244
561
|
export interface AgentStateFields {
|
|
245
562
|
id: string;
|
|
246
563
|
userId: string;
|
|
247
564
|
podId: string;
|
|
248
565
|
podName: string;
|
|
249
|
-
state:
|
|
566
|
+
state: AgentState;
|
|
250
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;
|
|
251
578
|
cpu: number;
|
|
252
579
|
memory: number;
|
|
253
580
|
hostname?: string | null;
|
|
@@ -272,8 +599,18 @@ export interface AgentHydrationData {
|
|
|
272
599
|
user_id?: string;
|
|
273
600
|
pod_id?: string;
|
|
274
601
|
pod_name?: string;
|
|
275
|
-
state?:
|
|
602
|
+
state?: AgentState;
|
|
276
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;
|
|
277
614
|
cpu?: number;
|
|
278
615
|
memory?: number;
|
|
279
616
|
hostname?: string | null;
|
|
@@ -299,13 +636,26 @@ export interface AgentHydrationData {
|
|
|
299
636
|
gateway_token?: string | null;
|
|
300
637
|
[key: string]: any;
|
|
301
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;
|
|
302
646
|
export declare function resolveAgentsApiBase(apiBase: string): string;
|
|
303
647
|
export declare function buildAgentConfig(config?: Record<string, any>, options?: BuildAgentConfigOptions): {
|
|
304
648
|
config: Record<string, any>;
|
|
305
649
|
gatewayToken: string;
|
|
306
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>;
|
|
307
656
|
export declare function buildOpenClawRoutes(options?: OpenClawRouteOptions): Record<string, AgentRouteConfig>;
|
|
308
657
|
export declare function buildOpenClawMemoryIndexEnv(memoryIndex?: OpenClawMemoryIndexOptions | null): Record<string, string>;
|
|
658
|
+
export declare function buildOpenClawWorkspacesSyncEnv(workspacesSync?: OpenClawWorkspacesSyncOptions | boolean | null): Record<string, string>;
|
|
309
659
|
export declare class Agent {
|
|
310
660
|
readonly id: string;
|
|
311
661
|
readonly userId: string;
|
|
@@ -313,6 +663,16 @@ export declare class Agent {
|
|
|
313
663
|
readonly podName: string;
|
|
314
664
|
readonly state: string;
|
|
315
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;
|
|
316
676
|
readonly cpu: number;
|
|
317
677
|
readonly memory: number;
|
|
318
678
|
readonly hostname: string | null;
|
|
@@ -339,9 +699,11 @@ export declare class Agent {
|
|
|
339
699
|
routeUrl(routeName: string, defaultPrefix?: string | null): string | null;
|
|
340
700
|
get desktopUrl(): string | null;
|
|
341
701
|
get vncUrl(): string | null;
|
|
702
|
+
browserDesktopUrl(token: string, options?: BrowserDesktopUrlOptions): string | null;
|
|
342
703
|
get shellUrl(): string | null;
|
|
343
704
|
get executorUrl(): string | null;
|
|
344
705
|
get isRunning(): boolean;
|
|
706
|
+
get hasDesktop(): boolean;
|
|
345
707
|
protected requireDeployments(): Deployments;
|
|
346
708
|
routeRequiresAuth(routeName: string, defaultValue?: boolean): boolean;
|
|
347
709
|
refreshToken(): Promise<AgentTokenResponse>;
|
|
@@ -351,17 +713,87 @@ export declare class Agent {
|
|
|
351
713
|
env(): Promise<Record<string, string>>;
|
|
352
714
|
exec(command: string, options?: AgentExecOptions): Promise<AgentExecResult>;
|
|
353
715
|
health(): Promise<Record<string, any>>;
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
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>>;
|
|
359
737
|
fileDelete(path: string, options?: {
|
|
360
738
|
recursive?: boolean;
|
|
739
|
+
source?: AgentFileSource;
|
|
361
740
|
}): Promise<Record<string, any>>;
|
|
362
741
|
cpTo(localPath: string, remotePath: string): Promise<Record<string, any>>;
|
|
363
742
|
cpFrom(remotePath: string, localPath: string): Promise<string>;
|
|
364
|
-
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;
|
|
365
797
|
}
|
|
366
798
|
export declare class OpenClawAgent extends Agent {
|
|
367
799
|
gatewayUrl: string | null;
|
|
@@ -371,7 +803,7 @@ export declare class OpenClawAgent extends Agent {
|
|
|
371
803
|
gatewayToken?: string | null;
|
|
372
804
|
});
|
|
373
805
|
static fromDict(data: AgentHydrationData): OpenClawAgent;
|
|
374
|
-
|
|
806
|
+
protected static gatewayUrlFromHostname(hostname: string | null | undefined): string | null;
|
|
375
807
|
private currentGatewayHostname;
|
|
376
808
|
/**
|
|
377
809
|
* Resolve gateway context through the deployment record plus `/env`.
|
|
@@ -385,32 +817,60 @@ export declare class OpenClawAgent extends Agent {
|
|
|
385
817
|
resolveGatewayToken(): Promise<string | null>;
|
|
386
818
|
gateway(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): GatewayClient;
|
|
387
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;
|
|
388
835
|
gatewayStatus(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<Record<string, any>>;
|
|
389
836
|
waitReady(timeoutMs?: number, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & GatewayWaitReadyOptions): Promise<Record<string, any>>;
|
|
390
837
|
configGet(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<Record<string, any>>;
|
|
391
838
|
configSchema(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<OpenClawConfigSchemaResponse>;
|
|
392
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>;
|
|
393
857
|
configApply(config: Record<string, any>, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<void>;
|
|
394
858
|
modelsList(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<any[]>;
|
|
395
859
|
sessionsList(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<any[]>;
|
|
860
|
+
sessionsListResult(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<GatewaySessionsListResult>;
|
|
396
861
|
chatSend(message: string, sessionKey: string, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & {
|
|
397
862
|
attachments?: ChatAttachment[];
|
|
398
863
|
}): AsyncGenerator<ChatEvent>;
|
|
399
864
|
channelsStatus(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & {
|
|
400
865
|
probe?: boolean;
|
|
401
866
|
timeoutMs?: number;
|
|
867
|
+
channel?: string;
|
|
402
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>>;
|
|
403
871
|
channelsLogout(channel: string, accountId?: string, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<Record<string, any>>;
|
|
404
|
-
webLoginStart(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> &
|
|
405
|
-
|
|
406
|
-
timeoutMs?: number;
|
|
407
|
-
verbose?: boolean;
|
|
408
|
-
accountId?: string;
|
|
409
|
-
}): Promise<Record<string, any>>;
|
|
410
|
-
webLoginWait(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & {
|
|
411
|
-
timeoutMs?: number;
|
|
412
|
-
accountId?: string;
|
|
413
|
-
}): 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>;
|
|
414
874
|
integrationsAuthStart(params: GatewayIntegrationAuthStartParams, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<GatewayIntegrationAuthStartResult>;
|
|
415
875
|
integrationsAuthStatus(params: GatewayIntegrationAuthStatusParams, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<GatewayIntegrationAuthStatusResult>;
|
|
416
876
|
integrationsStatus(params?: GatewayIntegrationStatusParams, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<GatewayIntegrationStatusResult>;
|
|
@@ -456,6 +916,9 @@ export declare class OpenClawAgent extends Agent {
|
|
|
456
916
|
accountId?: string;
|
|
457
917
|
}): Promise<Record<string, any>>;
|
|
458
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>;
|
|
459
922
|
}
|
|
460
923
|
export declare class OpenClawProAgent extends OpenClawAgent {
|
|
461
924
|
static fromDict(data: AgentHydrationData): OpenClawProAgent;
|
|
@@ -466,52 +929,80 @@ export declare class Deployments {
|
|
|
466
929
|
private readonly apiBase;
|
|
467
930
|
private readonly agentsWsUrl;
|
|
468
931
|
private readonly agentHttp;
|
|
469
|
-
constructor(http: HTTPClient, agentApiKey?: string, agentApiBase?: string, agentsWsUrl?: string);
|
|
932
|
+
constructor(http: HTTPClient, agentApiKey?: string, agentApiBase?: string, agentsWsUrl?: string, requestTimeout?: number);
|
|
470
933
|
get agentApiKey(): string;
|
|
471
934
|
get agentApiBase(): string;
|
|
472
935
|
private hydrateAgent;
|
|
936
|
+
private getById;
|
|
937
|
+
resolveAgent(agentIdOrName: string, requestOptions?: RequestOverrides): Promise<Agent>;
|
|
938
|
+
resolveAgentId(agentIdOrName: string, requestOptions?: RequestOverrides): Promise<string>;
|
|
473
939
|
private agentIdFor;
|
|
474
940
|
private fetchRaw;
|
|
475
941
|
create(options?: CreateAgentOptions): Promise<Agent>;
|
|
476
942
|
createOpenClaw(options?: OpenClawCreateAgentOptions): Promise<Agent>;
|
|
477
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>;
|
|
478
950
|
budget(): Promise<Record<string, any>>;
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
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>;
|
|
487
969
|
resize(agentId: string, options: Pick<UpdateAgentOptions, 'size'>): Promise<Agent>;
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
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>>;
|
|
492
981
|
webSearch(query: string, options?: BraveWebSearchOptions): Promise<BraveWebSearchResponse>;
|
|
493
|
-
logsToken(
|
|
494
|
-
env(
|
|
982
|
+
logsToken(agentIdOrName: string): Promise<AgentLogsTokenResponse>;
|
|
983
|
+
env(agentIdOrName: string, requestOptions?: RequestOverrides): Promise<{
|
|
495
984
|
agent_id: string;
|
|
496
985
|
env: Record<string, string>;
|
|
497
986
|
}>;
|
|
498
987
|
exec(target: Agent | string, command: string, options?: AgentExecOptions): Promise<AgentExecResult>;
|
|
499
988
|
health(target: Agent): Promise<Record<string, any>>;
|
|
500
989
|
filesList(target: Agent | string, path?: string, source?: 'auto' | 'pod' | 's3'): Promise<AgentFileEntry[]>;
|
|
501
|
-
|
|
502
|
-
|
|
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>;
|
|
503
993
|
fileWriteBytes(target: Agent | string, path: string, content: Uint8Array | ArrayBuffer | string, destination?: 'auto' | 'pod' | 's3'): Promise<Record<string, any>>;
|
|
504
994
|
fileWrite(target: Agent | string, path: string, content: string, destination?: 'auto' | 'pod' | 's3'): Promise<Record<string, any>>;
|
|
505
995
|
fileDelete(target: Agent | string, path: string, options?: {
|
|
506
996
|
recursive?: boolean;
|
|
997
|
+
source?: 'auto' | 'pod' | 's3';
|
|
507
998
|
}): Promise<Record<string, any>>;
|
|
508
999
|
cpTo(target: Agent | string, localPath: string, remotePath: string): Promise<Record<string, any>>;
|
|
509
1000
|
cpFrom(target: Agent | string, remotePath: string, localPath: string): Promise<string>;
|
|
510
|
-
logsConnect(
|
|
1001
|
+
logsConnect(agentIdOrName: string, options?: {
|
|
511
1002
|
tailLines?: number;
|
|
512
1003
|
container?: string;
|
|
513
1004
|
}): Promise<WebSocket>;
|
|
514
|
-
shellToken(
|
|
515
|
-
shellConnect(
|
|
1005
|
+
shellToken(agentIdOrName: string, shell?: string, dryRun?: boolean, requestOptions?: RequestOverrides): Promise<AgentShellTokenResponse>;
|
|
1006
|
+
shellConnect(agentIdOrName: string, shell?: string, options?: AgentShellConnectOptions): Promise<WebSocket>;
|
|
516
1007
|
}
|
|
517
1008
|
//# sourceMappingURL=agents.d.ts.map
|