@hypercli.com/sdk 2026.7.31 → 2026.8.11

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.
Files changed (52) hide show
  1. package/README.md +113 -11
  2. package/dist/agent-slots.d.ts +17 -0
  3. package/dist/agent-slots.d.ts.map +1 -0
  4. package/dist/agent-slots.js +18 -0
  5. package/dist/agent-slots.js.map +1 -0
  6. package/dist/agent.d.ts +48 -10
  7. package/dist/agent.d.ts.map +1 -1
  8. package/dist/agent.js +196 -28
  9. package/dist/agent.js.map +1 -1
  10. package/dist/agents.d.ts +168 -51
  11. package/dist/agents.d.ts.map +1 -1
  12. package/dist/agents.js +801 -211
  13. package/dist/agents.js.map +1 -1
  14. package/dist/browser.d.ts +2 -2
  15. package/dist/browser.d.ts.map +1 -1
  16. package/dist/browser.js +1 -1
  17. package/dist/browser.js.map +1 -1
  18. package/dist/client.d.ts.map +1 -1
  19. package/dist/client.js +5 -1
  20. package/dist/client.js.map +1 -1
  21. package/dist/config.d.ts +1 -1
  22. package/dist/config.js +2 -2
  23. package/dist/config.js.map +1 -1
  24. package/dist/errors.d.ts +4 -1
  25. package/dist/errors.d.ts.map +1 -1
  26. package/dist/errors.js +9 -2
  27. package/dist/errors.js.map +1 -1
  28. package/dist/hermes/gateway.d.ts +194 -0
  29. package/dist/hermes/gateway.d.ts.map +1 -0
  30. package/dist/hermes/gateway.js +209 -0
  31. package/dist/hermes/gateway.js.map +1 -0
  32. package/dist/http.d.ts +6 -0
  33. package/dist/http.d.ts.map +1 -1
  34. package/dist/http.js +84 -25
  35. package/dist/http.js.map +1 -1
  36. package/dist/index.d.ts +6 -4
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +6 -3
  39. package/dist/index.js.map +1 -1
  40. package/dist/job/base.d.ts +6 -0
  41. package/dist/job/base.d.ts.map +1 -1
  42. package/dist/job/base.js +7 -1
  43. package/dist/job/base.js.map +1 -1
  44. package/dist/keys.d.ts +15 -4
  45. package/dist/keys.d.ts.map +1 -1
  46. package/dist/keys.js +55 -3
  47. package/dist/keys.js.map +1 -1
  48. package/dist/openclaw/gateway.d.ts +32 -1
  49. package/dist/openclaw/gateway.d.ts.map +1 -1
  50. package/dist/openclaw/gateway.js +101 -21
  51. package/dist/openclaw/gateway.js.map +1 -1
  52. package/package.json +6 -2
package/dist/agents.d.ts CHANGED
@@ -1,23 +1,30 @@
1
+ import { type AgentSlot, type AgentSlotInventory } from './agent-slots.js';
2
+ export { agentSlotFromDict, type AgentSlot, type AgentSlotInventory, type AgentSlotSize, } from './agent-slots.js';
1
3
  import { HTTPClient, type RequestOverrides } from './http.js';
2
4
  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
5
  import type { OpenClawTelegramConfigPatch, OpenClawWhatsAppConfigPatch } from './openclaw/channels.js';
4
6
  import type { OpenClawSlackHttpConfiguration, OpenClawSlackRelayConfiguration, OpenClawSlackSocketConfiguration } from './openclaw/slack.js';
7
+ import { HermesApiClient } from './hermes/gateway.js';
5
8
  export declare const DEFAULT_OPENCLAW_IMAGE = "ghcr.io/hypercli/hypercli-openclaw:pro-latest";
6
9
  export declare const DEFAULT_OPENCLAW_PRO_IMAGE = "ghcr.io/hypercli/hypercli-openclaw:pro-latest";
10
+ export declare const DEFAULT_HERMES_AGENT_IMAGE = "ghcr.io/hypercli/hypercli-hermes-agent:latest";
7
11
  export declare const DEFAULT_OPENCODE_IMAGE = "ghcr.io/hypercli/hypercli-opencode:latest";
8
12
  export declare const DEFAULT_CODEX_IMAGE = "ghcr.io/hypercli/hypercli-codex:latest";
9
13
  export declare const DEFAULT_CLAUDE_CODE_IMAGE = "ghcr.io/hypercli/hypercli-claude-code:latest";
10
14
  export declare const DEFAULT_GOOSE_IMAGE = "ghcr.io/hypercli/hypercli-goose:latest";
11
15
  export declare const DEFAULT_KIMI_CODE_IMAGE = "ghcr.io/hypercli/hypercli-kimi-code:latest";
16
+ export declare const DEFAULT_BUZZ_AGENT_IMAGE = "ghcr.io/hypercli/hypercli-buzz-agent:latest";
12
17
  export declare const DEFAULT_BUZZ_OPENCODE_IMAGE = "ghcr.io/hypercli/hypercli-buzz-opencode:latest";
13
18
  export declare const DEFAULT_BUZZ_CODEX_IMAGE = "ghcr.io/hypercli/hypercli-buzz-codex:latest";
14
19
  export declare const DEFAULT_BUZZ_CLAUDE_CODE_IMAGE = "ghcr.io/hypercli/hypercli-buzz-claude:latest";
15
20
  export declare const DEFAULT_BUZZ_GOOSE_IMAGE = "ghcr.io/hypercli/hypercli-buzz-goose:latest";
16
21
  export declare const DEFAULT_BUZZ_KIMI_CODE_IMAGE = "ghcr.io/hypercli/hypercli-buzz-kimi-code:latest";
22
+ export declare const DEFAULT_AGENT_RUNTIME_SCOPES: readonly string[];
17
23
  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'>;
24
+ export type ManagedAgentRuntime = 'generic' | 'openclaw' | 'openclaw-pro' | 'hermes-agent' | 'buzz-agent' | 'opencode' | 'codex' | 'claude-code' | 'goose' | 'kimi-code';
25
+ export type CodingAgentRuntime = Extract<ManagedAgentRuntime, 'buzz-agent' | 'opencode' | 'codex' | 'claude-code' | 'goose' | 'kimi-code'>;
20
26
  export declare const DEFAULT_CODING_AGENT_IMAGES: Readonly<Record<CodingAgentRuntime, string>>;
27
+ export declare const DEFAULT_CODING_AGENT_SYNC_INCLUDES: Readonly<Record<CodingAgentRuntime, readonly string[]>>;
21
28
  export declare const DEFAULT_BUZZ_CODING_AGENT_IMAGES: Readonly<Record<CodingAgentRuntime, string>>;
22
29
  export declare const DEFAULT_BUZZ_RUST_LOG = "buzz_acp=info,pool::prompt=info,acp::stream=off";
23
30
  export declare const OPENCLAW_MEMORY_SEARCH_ENV_DEFAULTS: {
@@ -30,9 +37,12 @@ export declare const OPENCLAW_MEMORY_SEARCH_ENV_DEFAULTS: {
30
37
  };
31
38
  export declare const OPENCLAW_WORKSPACES_SYNC_ENV_DEFAULTS: {
32
39
  readonly HYPER_WORKSPACES_BOOT_SYNC: "1";
33
- readonly HYPER_WORKSPACES_DIR: "/home/node/workspaces";
40
+ readonly HYPER_WORKSPACES_DIR: "/home/node/shared";
34
41
  readonly HYPER_WORKSPACES_SYNC_READY_ONLY: "1";
35
42
  };
43
+ export declare const DEFAULT_HERMES_AGENT_SYNC_ROOT = "/opt/data";
44
+ export declare const DEFAULT_HERMES_AGENT_SYNC_UID = 10000;
45
+ export declare const DEFAULT_HERMES_AGENT_SYNC_GID = 10000;
36
46
  export declare const AGENT_FILE_MAX_BYTES: number;
37
47
  export declare const AGENT_FILE_TRANSFER_CHUNK_BYTES: number;
38
48
  export declare const AGENT_FILE_OPERATION_TIMEOUT_MS = 300000;
@@ -43,7 +53,6 @@ export interface AgentExecResult {
43
53
  }
44
54
  export interface AgentTokenResponse {
45
55
  agent_id?: string;
46
- pod_id?: string;
47
56
  token?: string;
48
57
  jwt?: string;
49
58
  expires_at?: string | null;
@@ -53,15 +62,38 @@ export interface BrowserDesktopUrlOptions {
53
62
  resize?: string | null;
54
63
  }
55
64
  export interface AgentGatewayContext {
56
- agent_id?: string;
57
- hostname?: string | null;
58
- gateway_token?: string | null;
65
+ agent_id: string;
66
+ gateway_url: string;
67
+ gateway_token: string;
68
+ launch_epoch: number;
69
+ }
70
+ export interface AgentEnvResponse {
71
+ agent_id: string;
72
+ env: Record<string, string>;
73
+ launch_epoch: number;
74
+ }
75
+ export interface AgentSecretNamesResponse {
76
+ agent_id: string;
77
+ names: string[];
78
+ launch_epoch: number;
79
+ }
80
+ export interface AgentSecretResponse {
81
+ agent_id: string;
82
+ key: string;
83
+ value: string;
84
+ launch_epoch: number;
59
85
  }
60
86
  export interface GatewayContextWaitOptions {
61
87
  timeoutMs?: number;
62
88
  retryIntervalMs?: number;
63
89
  signal?: AbortSignal;
64
90
  }
91
+ export interface OpenClawOperationsSnapshot {
92
+ sessions: GatewaySessionsListResult | null;
93
+ cronJobs: any[] | null;
94
+ failures: Partial<Record<'sessions' | 'cron', string>>;
95
+ capturedAt: number;
96
+ }
65
97
  export interface AgentShellTokenResponse {
66
98
  agent_id?: string;
67
99
  jwt: string;
@@ -125,6 +157,15 @@ export interface ListAgentsOptions extends RequestOverrides {
125
157
  query?: string | null;
126
158
  includeDeleted?: boolean | null;
127
159
  }
160
+ export interface AgentCapacity {
161
+ items: Agent[];
162
+ totalAgents: number;
163
+ maxAgentsPerAccount: number;
164
+ runningAgents: number;
165
+ slots: Record<string, AgentSlotInventory>;
166
+ agentSlots: AgentSlot[];
167
+ pooledTpd: number;
168
+ }
128
169
  export interface SlackOAuthStartOptions {
129
170
  relayBaseUrl: string;
130
171
  token: string;
@@ -218,15 +259,17 @@ export interface AgentRouteConfig {
218
259
  port: number;
219
260
  prefix?: string;
220
261
  auth?: boolean;
221
- strip_prefix?: boolean;
222
- [key: string]: any;
262
+ }
263
+ export interface AgentRoutesState {
264
+ agentId: string;
265
+ routes: Record<string, AgentRouteConfig>;
266
+ routeStatuses: Record<string, Record<string, unknown>>;
223
267
  }
224
268
  export type LaunchConfigFlatMap = Record<string, unknown>;
225
269
  export interface AgentDesktopConfigSource {
226
270
  launchConfig?: unknown;
227
271
  launch_config?: unknown;
228
272
  routes?: unknown;
229
- ports?: unknown;
230
273
  }
231
274
  export interface RegistryAuth {
232
275
  username?: string;
@@ -236,18 +279,20 @@ export interface RegistryAuth {
236
279
  }
237
280
  export interface BuildAgentConfigOptions {
238
281
  env?: Record<string, string>;
239
- ports?: Record<string, any>[] | null;
282
+ secrets?: Record<string, string>;
240
283
  routes?: Record<string, AgentRouteConfig> | null;
241
284
  command?: string[] | null;
242
285
  entrypoint?: string[] | null;
243
286
  image?: string | null;
244
287
  syncRoot?: string | null;
245
- syncEnabled?: boolean | null;
288
+ syncInclude?: readonly string[] | null;
289
+ syncExclude?: readonly string[] | null;
246
290
  syncUid?: number | null;
247
291
  syncGid?: number | null;
248
292
  registryUrl?: string | null;
249
293
  registryAuth?: RegistryAuth | null;
250
294
  restart?: boolean | null;
295
+ runtimeScopes?: readonly string[] | null;
251
296
  gatewayToken?: string | null;
252
297
  heartbeat?: OpenClawHeartbeatConfig | null;
253
298
  /** Disable to avoid automatically locking browser control UI access to globalThis.location.origin. */
@@ -265,6 +310,11 @@ export interface OpenClawRouteOptions {
265
310
  gatewayPrefix?: string;
266
311
  desktopPrefix?: string;
267
312
  }
313
+ export interface HermesAgentRouteOptions {
314
+ port?: number;
315
+ auth?: boolean;
316
+ prefix?: string;
317
+ }
268
318
  export interface OpenClawMemoryIndexOptions {
269
319
  enabled?: boolean | null;
270
320
  onSessionStart?: boolean | null;
@@ -275,7 +325,6 @@ export interface OpenClawMemoryIndexOptions {
275
325
  }
276
326
  export interface OpenClawWorkspacesSyncOptions {
277
327
  enabled?: boolean | null;
278
- outputDir?: string | null;
279
328
  readyOnly?: boolean | null;
280
329
  workspace?: string | null;
281
330
  }
@@ -304,7 +353,6 @@ export interface AgentUiAvatarMeta {
304
353
  }
305
354
  export interface AgentUiMeta {
306
355
  avatar?: AgentUiAvatarMeta | null;
307
- [key: string]: any;
308
356
  }
309
357
  export interface AgentMeta {
310
358
  ui?: AgentUiMeta | null;
@@ -395,7 +443,7 @@ export interface UpdateAgentOptions {
395
443
  size?: string;
396
444
  launchConfig?: Record<string, any> | null;
397
445
  refreshFromLagoon?: boolean;
398
- lastError?: string | null;
446
+ error?: string | null;
399
447
  }
400
448
  export interface OpenClawCreateAgentOptions extends CreateAgentOptions {
401
449
  openClawRoutes?: OpenClawRouteOptions | null;
@@ -409,6 +457,16 @@ export interface OpenClawStartAgentOptions extends StartAgentOptions {
409
457
  memoryIndex?: OpenClawMemoryIndexOptions | null;
410
458
  workspacesSync?: OpenClawWorkspacesSyncOptions | boolean | null;
411
459
  }
460
+ export interface HermesAgentCreateOptions extends CreateAgentOptions {
461
+ hermesRoute?: HermesAgentRouteOptions | null;
462
+ /** Explicit inbound Hermes API credential; a fresh 32-byte key is generated when omitted. */
463
+ apiServerKey?: string | null;
464
+ }
465
+ export interface HermesAgentStartOptions extends StartAgentOptions {
466
+ hermesRoute?: HermesAgentRouteOptions | null;
467
+ /** Explicit inbound Hermes API credential; a fresh 32-byte key is generated when omitted. */
468
+ apiServerKey?: string | null;
469
+ }
412
470
  export interface CodingAgentCreateOptions extends Omit<CreateAgentOptions, 'runtime' | 'injectGatewayToken'> {
413
471
  workspacesSync?: OpenClawWorkspacesSyncOptions | boolean | null;
414
472
  /** @deprecated Use the typed `buzz` launch contract. */
@@ -427,9 +485,11 @@ export interface BuzzLaunchConfig {
427
485
  parallelism?: number;
428
486
  respondTo?: string | null;
429
487
  respondToAllowlist?: string[];
488
+ displayName?: string | null;
489
+ textMentions?: boolean;
490
+ requireReply?: boolean;
430
491
  sessionTitle?: string | null;
431
492
  rustLog?: string;
432
- restart?: boolean;
433
493
  }
434
494
  export interface RuntimeAuthMethod {
435
495
  id: string;
@@ -557,12 +617,33 @@ export interface AgentDirectoryListing {
557
617
  truncated?: boolean;
558
618
  [key: string]: any;
559
619
  }
560
- export type AgentState = 'PENDING' | 'RESTORING' | 'RESTORE_FAILED' | 'SYNCING' | 'SYNC_FAILED' | 'STARTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'FAILED' | (string & {});
620
+ export type AgentState = 'CREATING' | 'STARTING' | 'RESTORING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'ARCHIVING' | 'ARCHIVED' | 'FAILED' | 'DELETED' | (string & {});
621
+ /** Canonical states understood by this SDK. AgentState remains forward-open. */
622
+ export declare const CANONICAL_AGENT_STATES: readonly ["CREATING", "STARTING", "RESTORING", "RUNNING", "STOPPING", "STOPPED", "ARCHIVING", "ARCHIVED", "FAILED", "DELETED"];
623
+ export declare const AGENT_TRANSITIONAL_STATES: ReadonlySet<AgentState>;
624
+ export declare const AGENT_RUNTIME_INACTIVE_STATES: ReadonlySet<AgentState>;
625
+ export declare function isAgentTransitionalState(state: string): boolean;
626
+ export declare function isAgentRuntimeInactiveState(state: string): boolean;
627
+ export interface DeploymentTransitionEvent {
628
+ type: 'deployment.transition';
629
+ agent_id: string;
630
+ state?: AgentState;
631
+ reason?: string | null;
632
+ error?: string | null;
633
+ message?: string | null;
634
+ launch_epoch?: number;
635
+ resources_exist?: boolean;
636
+ namespace_exists?: boolean;
637
+ }
638
+ export type DeploymentEvent = DeploymentTransitionEvent;
639
+ export interface DeploymentSubscribeOptions {
640
+ signal?: AbortSignal;
641
+ /** Runs after socket authentication and before transition frames are read. */
642
+ onReady?: () => void | Promise<void>;
643
+ }
561
644
  export interface AgentStateFields {
562
645
  id: string;
563
646
  userId: string;
564
- podId: string;
565
- podName: string;
566
647
  state: AgentState;
567
648
  name?: string | null;
568
649
  handle?: string | null;
@@ -583,7 +664,9 @@ export interface AgentStateFields {
583
664
  jwtExpiresAt?: Date | null;
584
665
  startedAt?: Date | null;
585
666
  stoppedAt?: Date | null;
586
- lastError?: string | null;
667
+ archivedAt?: Date | null;
668
+ clusterId?: string | null;
669
+ launchEpoch?: number;
587
670
  createdAt?: Date | null;
588
671
  updatedAt?: Date | null;
589
672
  launchConfig?: Record<string, any> | null;
@@ -591,14 +674,11 @@ export interface AgentStateFields {
591
674
  routes: Record<string, AgentRouteConfig>;
592
675
  command: string[];
593
676
  entrypoint: string[];
594
- ports: Record<string, any>[];
595
677
  dryRun: boolean;
596
678
  }
597
679
  export interface AgentHydrationData {
598
680
  id?: string;
599
681
  user_id?: string;
600
- pod_id?: string;
601
- pod_name?: string;
602
682
  state?: AgentState;
603
683
  name?: string | null;
604
684
  handle?: string | null;
@@ -619,7 +699,9 @@ export interface AgentHydrationData {
619
699
  jwt_expires_at?: string | null;
620
700
  started_at?: string | null;
621
701
  stopped_at?: string | null;
622
- last_error?: string | null;
702
+ archived_at?: string | null;
703
+ cluster_id?: string | null;
704
+ launch_epoch?: number;
623
705
  created_at?: string | null;
624
706
  updated_at?: string | null;
625
707
  launch_config?: Record<string, any> | null;
@@ -629,24 +711,21 @@ export interface AgentHydrationData {
629
711
  routes?: Record<string, AgentRouteConfig> | null;
630
712
  command?: string[] | null;
631
713
  entrypoint?: string[] | null;
632
- ports?: Record<string, any>[] | null;
633
714
  dry_run?: boolean;
634
715
  openclaw_url?: string | null;
635
716
  gateway_url?: string | null;
636
- gateway_token?: string | null;
637
717
  [key: string]: any;
638
718
  }
639
719
  export declare function flattenLaunchConfig(launchConfig: unknown): LaunchConfigFlatMap;
640
720
  export declare function getLaunchConfigValue(launchConfig: unknown, path: string | Array<string | number>): unknown;
641
721
  export declare function routesHaveDesktop(routes: unknown): boolean;
642
- export declare function portsHaveDesktop(ports: unknown): boolean;
643
722
  export declare function launchConfigHasDesktop(launchConfig: unknown): boolean;
644
723
  export declare function agentConfigHasDesktop(source: AgentDesktopConfigSource | null | undefined): boolean;
645
724
  export declare function buildBrowserDesktopUrl(desktopBaseUrl: string, token: string, options?: BrowserDesktopUrlOptions): string;
646
725
  export declare function resolveAgentsApiBase(apiBase: string): string;
647
726
  export declare function buildAgentConfig(config?: Record<string, any>, options?: BuildAgentConfigOptions): {
648
727
  config: Record<string, any>;
649
- gatewayToken: string;
728
+ gatewayToken: string | null;
650
729
  };
651
730
  export declare function startSlackOAuth(options: SlackOAuthStartOptions): Promise<SlackOAuthStartResult>;
652
731
  export declare function getSlackInstallStatus(options: SlackInstallStatusOptions): Promise<SlackInstallStatus>;
@@ -654,13 +733,12 @@ export declare function listSlackDirectoryConversations(options: SlackDirectoryC
654
733
  export declare function listSlackDirectoryUsers(options: SlackDirectoryOptions): Promise<SlackDirectoryUsersResult>;
655
734
  export declare function attachSlackRelayAgent(options: AttachSlackRelayAgentOptions): Promise<AttachSlackRelayAgentResult>;
656
735
  export declare function buildOpenClawRoutes(options?: OpenClawRouteOptions): Record<string, AgentRouteConfig>;
736
+ export declare function buildHermesAgentRoutes(options?: HermesAgentRouteOptions): Record<string, AgentRouteConfig>;
657
737
  export declare function buildOpenClawMemoryIndexEnv(memoryIndex?: OpenClawMemoryIndexOptions | null): Record<string, string>;
658
738
  export declare function buildOpenClawWorkspacesSyncEnv(workspacesSync?: OpenClawWorkspacesSyncOptions | boolean | null): Record<string, string>;
659
739
  export declare class Agent {
660
740
  readonly id: string;
661
741
  readonly userId: string;
662
- readonly podId: string;
663
- readonly podName: string;
664
742
  readonly state: string;
665
743
  readonly name: string | null;
666
744
  readonly handle: string | null;
@@ -681,7 +759,9 @@ export declare class Agent {
681
759
  jwtExpiresAt: Date | null;
682
760
  readonly startedAt: Date | null;
683
761
  readonly stoppedAt: Date | null;
684
- readonly lastError: string | null;
762
+ readonly archivedAt: Date | null;
763
+ readonly clusterId: string | null;
764
+ readonly launchEpoch: number;
685
765
  readonly createdAt: Date | null;
686
766
  readonly updatedAt: Date | null;
687
767
  launchConfig: Record<string, any> | null;
@@ -689,7 +769,6 @@ export declare class Agent {
689
769
  routes: Record<string, AgentRouteConfig>;
690
770
  command: string[];
691
771
  entrypoint: string[];
692
- ports: Record<string, any>[];
693
772
  readonly dryRun: boolean;
694
773
  _deployments: Deployments | null;
695
774
  constructor(fields: AgentStateFields);
@@ -701,8 +780,12 @@ export declare class Agent {
701
780
  get vncUrl(): string | null;
702
781
  browserDesktopUrl(token: string, options?: BrowserDesktopUrlOptions): string | null;
703
782
  get shellUrl(): string | null;
704
- get executorUrl(): string | null;
705
783
  get isRunning(): boolean;
784
+ get isTransitioning(): boolean;
785
+ /** True when the agent is cold-restorable from its verified archive. */
786
+ get isArchived(): boolean;
787
+ /** True only for an explicitly included deletion tombstone. */
788
+ get isDeleted(): boolean;
706
789
  get hasDesktop(): boolean;
707
790
  protected requireDeployments(): Deployments;
708
791
  routeRequiresAuth(routeName: string, defaultValue?: boolean): boolean;
@@ -711,8 +794,9 @@ export declare class Agent {
711
794
  update(options: UpdateAgentOptions): Promise<Agent>;
712
795
  resize(options: Pick<UpdateAgentOptions, 'size'>): Promise<Agent>;
713
796
  env(): Promise<Record<string, string>>;
797
+ secretNames(): Promise<string[]>;
798
+ secret(key: string): Promise<string>;
714
799
  exec(command: string, options?: AgentExecOptions): Promise<AgentExecResult>;
715
- health(): Promise<Record<string, any>>;
716
800
  /**
717
801
  * The gateway file writer a subclass supplies — the seam that enables the
718
802
  * `gateway` source. The base agent has none (gateway calls throw); an agent
@@ -745,10 +829,12 @@ export declare class Agent {
745
829
  export declare class RuntimeLoginSession {
746
830
  private readonly authClient;
747
831
  readonly socket: WebSocket;
832
+ private readonly requiresDeviceChallenge;
748
833
  output: string;
749
834
  verificationUrl: string | null;
750
835
  userCode: string | null;
751
836
  interactiveRequired: boolean;
837
+ private rawOutput;
752
838
  private exitCode;
753
839
  private readonly marker;
754
840
  private readonly completion;
@@ -756,7 +842,7 @@ export declare class RuntimeLoginSession {
756
842
  private complete;
757
843
  private markReady;
758
844
  private constructor();
759
- static start(authClient: RuntimeAuthClient, command: string[], challengeTimeoutMs?: number): Promise<RuntimeLoginSession>;
845
+ static start(authClient: RuntimeAuthClient, command: string[], challengeTimeoutMs?: number, requiresDeviceChallenge?: boolean): Promise<RuntimeLoginSession>;
760
846
  private consume;
761
847
  send(text: string): void;
762
848
  wait(timeoutMs?: number): Promise<RuntimeAuthStatus>;
@@ -773,28 +859,56 @@ export declare class RuntimeAuthClient {
773
859
  }
774
860
  export declare class CodingAgent extends Agent {
775
861
  readonly runtime: CodingAgentRuntime;
862
+ static readonly defaultSyncInclude: readonly string[] | null;
776
863
  get auth(): RuntimeAuthClient;
777
864
  }
865
+ export declare class BuzzAgent extends CodingAgent {
866
+ readonly runtime: 'buzz-agent';
867
+ static readonly defaultSyncInclude: readonly string[];
868
+ static fromDict(data: AgentHydrationData): BuzzAgent;
869
+ }
778
870
  export declare class OpenCodeAgent extends CodingAgent {
779
871
  readonly runtime: 'opencode';
872
+ static readonly defaultSyncInclude: readonly string[];
780
873
  static fromDict(data: AgentHydrationData): OpenCodeAgent;
781
874
  }
782
875
  export declare class CodexAgent extends CodingAgent {
783
876
  readonly runtime: 'codex';
877
+ static readonly defaultSyncInclude: readonly string[];
784
878
  static fromDict(data: AgentHydrationData): CodexAgent;
785
879
  }
786
880
  export declare class ClaudeCodeAgent extends CodingAgent {
787
881
  readonly runtime: 'claude-code';
882
+ static readonly defaultSyncInclude: readonly string[];
788
883
  static fromDict(data: AgentHydrationData): ClaudeCodeAgent;
789
884
  }
790
885
  export declare class GooseAgent extends CodingAgent {
791
886
  readonly runtime: 'goose';
887
+ static readonly defaultSyncInclude: readonly string[];
792
888
  static fromDict(data: AgentHydrationData): GooseAgent;
793
889
  }
794
890
  export declare class KimiCodeAgent extends CodingAgent {
795
891
  readonly runtime: 'kimi-code';
892
+ static readonly defaultSyncInclude: readonly string[];
796
893
  static fromDict(data: AgentHydrationData): KimiCodeAgent;
797
894
  }
895
+ export declare class HermesAgent extends Agent {
896
+ readonly runtime: 'hermes-agent';
897
+ readonly apiUrl: string | null;
898
+ readonly openaiBaseUrl: string | null;
899
+ /** Available only on the instance returned by createHermesAgent/startHermesAgent. */
900
+ apiServerKey: string | null;
901
+ constructor(fields: AgentStateFields & {
902
+ apiUrl?: string | null;
903
+ apiServerKey?: string | null;
904
+ });
905
+ static fromDict(data: AgentHydrationData): HermesAgent;
906
+ /** Create a client for this agent's authenticated Hermes API. */
907
+ get api(): HermesApiClient | null;
908
+ /** Require a ready URL and the one-time SDK-retained API server key. */
909
+ apiClient(): HermesApiClient;
910
+ waitRunning(timeoutMs?: number, pollIntervalMs?: number): Promise<HermesAgent>;
911
+ }
798
912
  export declare class OpenClawAgent extends Agent {
799
913
  gatewayUrl: string | null;
800
914
  gatewayToken: string | null;
@@ -804,15 +918,7 @@ export declare class OpenClawAgent extends Agent {
804
918
  });
805
919
  static fromDict(data: AgentHydrationData): OpenClawAgent;
806
920
  protected static gatewayUrlFromHostname(hostname: string | null | undefined): string | null;
807
- private currentGatewayHostname;
808
- /**
809
- * Resolve gateway context through the deployment record plus `/env`.
810
- *
811
- * Agent startup is eventually consistent: the deployment record may lag
812
- * behind hostname attachment, and runtime env can lag behind both. The SDK
813
- * derives the gateway URL from the attached hostname and reads the gateway
814
- * token from `OPENCLAW_GATEWAY_TOKEN` in the agent env route.
815
- */
921
+ /** Resolve OpenClaw connection context from the generic Agent and Secret APIs. */
816
922
  waitForGatewayContext(options?: GatewayContextWaitOptions): Promise<AgentGatewayContext>;
817
923
  resolveGatewayToken(): Promise<string | null>;
818
924
  gateway(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): GatewayClient;
@@ -858,6 +964,7 @@ export declare class OpenClawAgent extends Agent {
858
964
  modelsList(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<any[]>;
859
965
  sessionsList(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<any[]>;
860
966
  sessionsListResult(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<GatewaySessionsListResult>;
967
+ operationsSnapshot(options?: Omit<Partial<GatewayOptions>, 'url' | 'token'>): Promise<OpenClawOperationsSnapshot>;
861
968
  chatSend(message: string, sessionKey: string, options?: Omit<Partial<GatewayOptions>, 'url' | 'token'> & {
862
969
  attachments?: ChatAttachment[];
863
970
  }): AsyncGenerator<ChatEvent>;
@@ -935,14 +1042,16 @@ export declare class Deployments {
935
1042
  private hydrateAgent;
936
1043
  private getById;
937
1044
  resolveAgent(agentIdOrName: string, requestOptions?: RequestOverrides): Promise<Agent>;
938
- resolveAgentId(agentIdOrName: string, requestOptions?: RequestOverrides): Promise<string>;
1045
+ resolveAgentId(agentIdOrName: string, requestOptions?: RequestOverrides, allowSelf?: boolean): Promise<string>;
939
1046
  private agentIdFor;
940
1047
  private fetchRaw;
941
1048
  create(options?: CreateAgentOptions): Promise<Agent>;
942
1049
  createOpenClaw(options?: OpenClawCreateAgentOptions): Promise<Agent>;
1050
+ createHermesAgent(options?: HermesAgentCreateOptions): Promise<HermesAgent>;
943
1051
  createOpenClawPro(options?: OpenClawCreateAgentOptions): Promise<Agent>;
944
1052
  private createCodingAgent;
945
1053
  createOpenCode(options?: CodingAgentCreateOptions): Promise<OpenCodeAgent>;
1054
+ createBuzzAgent(options?: CodingAgentCreateOptions): Promise<BuzzAgent>;
946
1055
  createCodex(options?: CodingAgentCreateOptions): Promise<CodexAgent>;
947
1056
  createClaudeCode(options?: CodingAgentCreateOptions): Promise<ClaudeCodeAgent>;
948
1057
  createGoose(options?: CodingAgentCreateOptions): Promise<GooseAgent>;
@@ -951,6 +1060,7 @@ export declare class Deployments {
951
1060
  bootstrapInference(messages: BootstrapInferenceMessage[], responseFormat?: BootstrapInferenceResponseFormat, requestOptions?: RequestOverrides): Promise<BootstrapInferenceResult>;
952
1061
  metrics(agentIdOrName: string): Promise<Record<string, any>>;
953
1062
  list(options?: ListAgentsOptions): Promise<Agent[]>;
1063
+ listWithCapacity(options?: ListAgentsOptions): Promise<AgentCapacity>;
954
1064
  get(agentIdOrName: string, requestOptions?: RequestOverrides): Promise<Agent>;
955
1065
  createExternalAgent(options: CreateExternalAgentOptions): Promise<Agent>;
956
1066
  updateExternalAgent(externalAgentId: string, options: UpdateExternalAgentOptions): Promise<Agent>;
@@ -959,9 +1069,12 @@ export declare class Deployments {
959
1069
  deleteExternalAgentProfileImage(externalAgentId: string): Promise<AgentProfileImageUploadResult>;
960
1070
  rotateExternalAgentKey(agentIdOrName: string): Promise<Record<string, any>>;
961
1071
  attachSlackRelayAgent(agentIdOrName: string, options: AttachDeploymentSlackRelayAgentOptions): Promise<AttachSlackRelayAgentResult>;
962
- waitRunning(agentIdOrName: string, timeoutMs?: number, pollIntervalMs?: number): Promise<Agent>;
1072
+ subscribe(handler: (event: DeploymentEvent) => void | Promise<void>, options?: DeploymentSubscribeOptions): Promise<void>;
1073
+ waitForState(agentIdOrName: string, states: readonly AgentState[], timeoutMs?: number, failureStates?: readonly AgentState[], minimumLaunchEpoch?: number, pollIntervalMs?: number): Promise<Agent>;
1074
+ waitRunning(agentIdOrName: string, timeoutMs?: number, pollIntervalMs?: number, minimumLaunchEpoch?: number): Promise<Agent>;
963
1075
  start(agentIdOrName: string, options?: StartAgentOptions): Promise<Agent>;
964
1076
  startOpenClaw(agentIdOrName: string, options?: OpenClawStartAgentOptions): Promise<Agent>;
1077
+ startHermesAgent(agentIdOrName: string, options?: HermesAgentStartOptions): Promise<HermesAgent>;
965
1078
  startOpenClawPro(agentIdOrName: string, options?: OpenClawStartAgentOptions): Promise<Agent>;
966
1079
  update(agentIdOrName: string, options?: UpdateAgentOptions): Promise<Agent>;
967
1080
  uploadProfileImage(agentId: string, content: Blob | ArrayBuffer | ArrayBufferView, contentType?: string): Promise<AgentProfileImageUploadResult>;
@@ -975,17 +1088,21 @@ export declare class Deployments {
975
1088
  * deployment slot as released.
976
1089
  */
977
1090
  stop(agentIdOrName: string): Promise<Agent>;
1091
+ /** Restore durable storage. The accepted snapshot is `RESTORING`; completion is `STOPPED`. */
1092
+ restore(agentIdOrName: string): Promise<Agent>;
1093
+ getRoutes(agentIdOrName: string): Promise<AgentRoutesState>;
1094
+ setRoutes(agentIdOrName: string, routes: Record<string, AgentRouteConfig>): Promise<AgentRoutesState>;
1095
+ setRoute(agentIdOrName: string, name: string, route: AgentRouteConfig): Promise<AgentRoutesState>;
1096
+ removeRoute(agentIdOrName: string, name: string): Promise<AgentRoutesState>;
978
1097
  delete(agentIdOrName: string): Promise<Record<string, any>>;
979
1098
  refreshToken(agentIdOrName: string): Promise<AgentTokenResponse>;
980
1099
  createScopedKey(agentIdOrName: string, name?: string): Promise<Record<string, any>>;
981
1100
  webSearch(query: string, options?: BraveWebSearchOptions): Promise<BraveWebSearchResponse>;
982
1101
  logsToken(agentIdOrName: string): Promise<AgentLogsTokenResponse>;
983
- env(agentIdOrName: string, requestOptions?: RequestOverrides): Promise<{
984
- agent_id: string;
985
- env: Record<string, string>;
986
- }>;
1102
+ env(agentIdOrName: string, requestOptions?: RequestOverrides): Promise<AgentEnvResponse>;
1103
+ secretNames(agentIdOrName: string, requestOptions?: RequestOverrides): Promise<AgentSecretNamesResponse>;
1104
+ secret(agentIdOrName: string, key: string, requestOptions?: RequestOverrides): Promise<AgentSecretResponse>;
987
1105
  exec(target: Agent | string, command: string, options?: AgentExecOptions): Promise<AgentExecResult>;
988
- health(target: Agent): Promise<Record<string, any>>;
989
1106
  filesList(target: Agent | string, path?: string, source?: 'auto' | 'pod' | 's3'): Promise<AgentFileEntry[]>;
990
1107
  fileReadBytesWithMetadata(target: Agent | string, path: string, source?: 'auto' | 'pod' | 's3', options?: AgentFileReadOptions): Promise<AgentFileReadBytesResult>;
991
1108
  fileReadBytes(target: Agent | string, path: string, source?: 'auto' | 'pod' | 's3', options?: AgentFileReadOptions): Promise<Uint8Array>;