@agentdock/wire 0.0.94 → 0.0.96

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 (73) hide show
  1. package/dist/accountLanguage.d.ts +2 -8
  2. package/dist/activityPreferences.d.ts +0 -2
  3. package/dist/agentCapabilities.d.ts +16 -46
  4. package/dist/agentCommonEnv.d.ts +0 -9
  5. package/dist/agentInstallGuide.d.ts +0 -7
  6. package/dist/agentRuntimeSettings.d.ts +1 -2
  7. package/dist/bgTask.d.ts +13 -24
  8. package/dist/checkpointSchemas.d.ts +1 -2
  9. package/dist/controlLevel.d.ts +1 -9
  10. package/dist/edition.d.ts +0 -1
  11. package/dist/enterpriseCurrency.d.ts +120 -0
  12. package/dist/enterpriseCurrency.js +1 -0
  13. package/dist/enterpriseDirectory.d.ts +636 -0
  14. package/dist/enterpriseDirectory.js +1 -0
  15. package/dist/enterpriseGateway.d.ts +1 -2
  16. package/dist/enterpriseGatewayExports.d.ts +4 -0
  17. package/dist/enterpriseGatewayExports.js +1 -0
  18. package/dist/enterpriseOverview.d.ts +423 -0
  19. package/dist/enterpriseOverview.js +1 -0
  20. package/dist/enterprisePolicy.d.ts +1393 -0
  21. package/dist/enterprisePolicy.js +1 -0
  22. package/dist/enterprisePolicyExports.d.ts +2 -0
  23. package/dist/enterprisePolicyExports.js +1 -0
  24. package/dist/enterpriseRange.d.ts +19 -0
  25. package/dist/enterpriseRange.js +1 -0
  26. package/dist/enterpriseRuntime.d.ts +420 -0
  27. package/dist/enterpriseRuntime.js +1 -0
  28. package/dist/envelope.d.ts +18 -30
  29. package/dist/errorMessage.d.ts +0 -1
  30. package/dist/events.d.ts +55 -71
  31. package/dist/features.d.ts +14 -29
  32. package/dist/feedback.d.ts +3 -4
  33. package/dist/fileWhitelist.d.ts +7 -39
  34. package/dist/gateway.d.ts +1643 -328
  35. package/dist/gateway.js +1 -1
  36. package/dist/gatewayBodyRetention.d.ts +149 -0
  37. package/dist/gatewayBodyRetention.js +2 -0
  38. package/dist/gatewayUsage.d.ts +3232 -0
  39. package/dist/gatewayUsage.js +1 -0
  40. package/dist/goals.d.ts +0 -1
  41. package/dist/handoffBrief.d.ts +1 -2
  42. package/dist/inboundEvents.d.ts +32 -75
  43. package/dist/index.d.ts +11 -7
  44. package/dist/index.js +1 -1
  45. package/dist/interactionEvents.d.ts +49 -57
  46. package/dist/legacyProtocol.d.ts +0 -6
  47. package/dist/license.d.ts +36 -37
  48. package/dist/machine.d.ts +48 -56
  49. package/dist/messageMeta.d.ts +15 -17
  50. package/dist/messages.d.ts +13 -20
  51. package/dist/notification.d.ts +2 -3
  52. package/dist/ops.d.ts +9 -27
  53. package/dist/pairing.d.ts +9 -49
  54. package/dist/permissionSubject.d.ts +3 -26
  55. package/dist/protocol.d.ts +0 -6
  56. package/dist/rpc.d.ts +118 -162
  57. package/dist/rpc.js +1 -1
  58. package/dist/scheduledTasks.d.ts +9 -10
  59. package/dist/semver.d.ts +3 -22
  60. package/dist/sessionBtw.d.ts +6 -7
  61. package/dist/sessionBtw.js +1 -1
  62. package/dist/sessionResult.d.ts +21 -27
  63. package/dist/sessionTitle.d.ts +2 -9
  64. package/dist/socketEvents.d.ts +4 -5
  65. package/dist/sourceMetadata.d.ts +1 -14
  66. package/dist/spawnError.d.ts +7 -14
  67. package/dist/stats.d.ts +13 -20
  68. package/dist/sync.d.ts +75 -156
  69. package/dist/taskResult.d.ts +3 -20
  70. package/dist/telemetry.d.ts +1 -11
  71. package/dist/utils.d.ts +0 -1
  72. package/dist/workItems.d.ts +6 -30
  73. package/package.json +1 -1
@@ -1,13 +1,8 @@
1
1
  import { z } from 'zod';
2
- /** Account-wide UI and generated-response language preference. */
2
+
3
3
  export declare const ACCOUNT_LANGUAGES: readonly ["en", "zh-Hans"];
4
4
  export declare const DEFAULT_ACCOUNT_LANGUAGE = "en";
5
- /**
6
- * Daemon capability flag (RFC-081 rolling-upgrade gate). The server only injects
7
- * `responseLanguage` into spawn-session/ai-helper RPC params when the target
8
- * daemon declared this capability at machine-register. Older daemons whose
9
- * `SpawnSessionParamsSchema` is `.strict()` reject the unknown field outright.
10
- */
5
+
11
6
  export declare const ACCOUNT_LANGUAGE_CAPABILITY = "account-language";
12
7
  export declare const AccountLanguageSchema: z.ZodEnum<["en", "zh-Hans"]>;
13
8
  export type AccountLanguage = z.infer<typeof AccountLanguageSchema>;
@@ -29,4 +24,3 @@ export declare const AccountLanguageResponseSchema: z.ZodObject<{
29
24
  language: "en" | "zh-Hans";
30
25
  initialized: boolean;
31
26
  }>;
32
- //# sourceMappingURL=accountLanguage.d.ts.map
@@ -1,5 +1,3 @@
1
- /** Activity tracking preferences — shared type used by server, web, and daemon. */
2
1
  export interface ActivityPreferences {
3
2
  enabled: boolean;
4
3
  }
5
- //# sourceMappingURL=activityPreferences.d.ts.map
@@ -1,9 +1,3 @@
1
- /**
2
- * Agent capability matrix — static mapping of which features each CLI agent supports.
3
- *
4
- * Web UI uses this to conditionally show/hide spawn parameters
5
- * (model, systemPrompt, tools, permissions, etc.) based on the selected agent.
6
- */
7
1
  import type { ControlLevelType } from './controlLevel.js';
8
2
  export interface AgentPermissionMode {
9
3
  readonly value: string;
@@ -13,7 +7,7 @@ export interface AgentModelOption {
13
7
  readonly value: string;
14
8
  readonly label: string;
15
9
  }
16
- /** 模型来源标签 */
10
+
17
11
  export type ModelSource = 'builtin' | 'acp' | 'env' | 'custom';
18
12
  export interface AgentCapability {
19
13
  readonly controlLevel: ControlLevelType;
@@ -21,67 +15,43 @@ export interface AgentCapability {
21
15
  readonly supportsSystemPrompt: boolean;
22
16
  readonly supportsToolConfig: boolean;
23
17
  readonly supportsMcpConfig: boolean;
24
- /** Whether the agent can receive a daemon-injected MCP server (session MCP
25
- * injection, e.g. the handoff tool). Distinct from `supportsMcpConfig`, which is
26
- * about the user filling a `--mcp-config` CLI flag. */
18
+
27
19
  readonly supportsMcpInjection: boolean;
28
20
  readonly supportsPermissionMode: boolean;
29
21
  readonly supportsResume: boolean;
30
22
  readonly supportsMaxTurns: boolean;
31
23
  readonly supportsSlashClear: boolean;
32
24
  readonly supportsSlashCompact: boolean;
33
- /** Whether the agent supports switching model mid-session (without restart). */
25
+
34
26
  readonly supportsInSessionModelSwitch: boolean;
35
- /** Whether the agent supports switching permission mode mid-session (without restart). */
27
+
36
28
  readonly supportsInSessionModeSwitch: boolean;
37
- /**
38
- * Whether dynamically-discovered agent-native ACP modes (e.g. hermes
39
- * accept_edits, opencode build/plan, copilot URL IDs) can be forwarded to
40
- * the agent's own mode mechanism (session/set_config_option / session/set_mode).
41
- * Agents with this=false never expose runtime native modes in the permission
42
- * pill (their reported "modes" are not permission modes, e.g. openclaw
43
- * thinking levels). Codex routes its modes via its own policy instead.
44
- */
29
+
45
30
  readonly supportsNativeModeForward: boolean;
46
- /** Whether the agent supports real-time context window usage queries (getContextUsage). */
31
+
47
32
  readonly supportsContextUsageQuery: boolean;
48
- /** ACP agent — model/mode lists come from daemon cache, not static config. */
33
+
49
34
  readonly usesAcpConfig: boolean;
50
- /** Static model options for non-ACP agents (Claude, Codex). Empty = use server catalog or ACP. */
35
+
51
36
  readonly staticModels: readonly AgentModelOption[];
52
- /** Permission modes available for this agent. Empty = no selector. */
37
+
53
38
  readonly permissionModes: readonly AgentPermissionMode[];
54
- /** Default permission mode value for this agent. */
39
+
55
40
  readonly defaultPermissionMode: string;
56
41
  }
57
- /**
58
- * Semantic mapping of known agent-native mode IDs to AgentDock policy values.
59
- * Only for native modes that ARE approval strategies (hermes). Unmapped/unknown
60
- * native modes fall through to the open native channel (forwarded) — no schema
61
- * or capability change needed for future agent modes.
62
- */
42
+
63
43
  export declare const NATIVE_MODE_TO_POLICY: Readonly<Record<string, Readonly<Record<string, string>>>>;
64
- /**
65
- * Resolve a permission-mode value to the AgentDock policy value the daemon
66
- * should enforce, or null when the value is an agent-native mode to forward.
67
- * Agent-aware: codex's native approval policies count as policy for codex.
68
- */
44
+
69
45
  export declare function resolvePolicyMode(agentType: string, mode: string): string | null;
70
46
  export declare const AGENT_CAPABILITIES: Readonly<Record<string, AgentCapability>>;
71
- /** Update dynamic modes for an ACP agent (called by daemon when session reports modes). */
47
+
72
48
  export declare function updateDynamicModes(agentType: string, modes: readonly {
73
49
  id: string;
74
50
  label: string;
75
51
  }[]): void;
76
- /** Get dynamic modes for an agent, or null if none reported. */
52
+
77
53
  export declare function getDynamicModes(agentType: string): readonly AgentPermissionMode[] | null;
78
- /** Get capability for an agent, falling back to minimal (Level 0) for unknown agents. */
54
+
79
55
  export declare function getAgentCapability(agentType: string): AgentCapability;
80
- /**
81
- * Normalize a Claude model ID so that dot-separated versions (e.g. `claude-opus-4.6`)
82
- * match the hyphen-separated form returned by the API (e.g. `claude-opus-4-6`).
83
- *
84
- * Safe to call on any string — non-Claude IDs pass through unchanged.
85
- */
56
+
86
57
  export declare function normalizeModelId(id: string): string;
87
- //# sourceMappingURL=agentCapabilities.d.ts.map
@@ -1,15 +1,6 @@
1
- /**
2
- * Common environment variables for each agent.
3
- *
4
- * Only agents that use a single-provider API key are listed here.
5
- * Multi-provider agents (opencode, hermes, openclaw) configure keys
6
- * through their own config files, so they are intentionally omitted.
7
- * Copilot authenticates via OAuth (`gh auth login`), not env vars.
8
- */
9
1
  import type { AgentType } from './messageMeta.js';
10
2
  export interface AgentEnvVarHint {
11
3
  readonly key: string;
12
4
  readonly placeholder: string;
13
5
  }
14
6
  export declare const AGENT_COMMON_ENV_VARS: Partial<Record<AgentType, readonly AgentEnvVarHint[]>>;
15
- //# sourceMappingURL=agentCommonEnv.d.ts.map
@@ -1,9 +1,3 @@
1
- /**
2
- * Per-agent install instructions for the web UI.
3
- *
4
- * Display-only data — the actual gating logic lives in daemon's registry.
5
- * Wire only has the strings so the web can render install/upgrade instructions.
6
- */
7
1
  import type { AgentType } from './messageMeta.js';
8
2
  import type { Platform } from './machine.js';
9
3
  export interface AgentInstallInfo {
@@ -12,4 +6,3 @@ export interface AgentInstallInfo {
12
6
  readonly upgradeUrl: string;
13
7
  }
14
8
  export declare const AGENT_INSTALL_GUIDE: Readonly<Record<AgentType, AgentInstallInfo>>;
15
- //# sourceMappingURL=agentInstallGuide.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const RuntimeAgentSchema: z.ZodEnum<["claude", "codex", "opencode"]>;
3
3
  export type RuntimeAgent = z.infer<typeof RuntimeAgentSchema>;
4
- /** Versioned, credential-free settings delivered to an enterprise container. */
4
+
5
5
  export declare const AgentRuntimeSettingsSchema: z.ZodObject<{
6
6
  agent: z.ZodEnum<["claude", "codex", "opencode"]>;
7
7
  routeId: z.ZodString;
@@ -137,4 +137,3 @@ export declare const AgentRuntimeSettingsListSchema: z.ZodArray<z.ZodObject<{
137
137
  forced: Record<string, unknown>;
138
138
  userOverrides: Record<string, unknown>;
139
139
  }>, "many">;
140
- //# sourceMappingURL=agentRuntimeSettings.d.ts.map
package/dist/bgTask.d.ts CHANGED
@@ -1,27 +1,26 @@
1
- /** Common prefix for every bg-task service envelope. */
2
1
  export declare const BG_TASK_PREFIX = "bg-task:";
3
- /** All bg-task lifecycle actions. */
2
+
4
3
  export type BgTaskAction = 'started' | 'progress' | 'completed' | 'failed' | 'stopped';
5
- /** Parsed bg-task line. `taskId` is already URI-decoded. */
4
+
6
5
  export interface ParsedBgTask {
7
6
  readonly action: BgTaskAction;
8
- /** URI-decoded Claude taskId (falls back to the raw encoded value if decode fails). */
7
+
9
8
  readonly taskId: string;
10
- /** started: task description. */
9
+
11
10
  readonly desc?: string;
12
- /** progress / failed: latest summary text. */
11
+
13
12
  readonly summary?: string;
14
- /** completed / failed / stopped: background task total token usage (0 when absent). */
13
+
15
14
  readonly totalTokens?: number;
16
- /** completed / failed / stopped: wall-clock duration in ms (0 when absent). */
15
+
17
16
  readonly durationMs?: number;
18
- /** completed / failed / stopped: number of tool calls made by the task (0 when absent). */
17
+
19
18
  readonly toolUses?: number;
20
19
  }
21
- /** Fields accepted by {@link encodeBgTask}. */
20
+
22
21
  export interface EncodeBgTaskInput {
23
22
  readonly action: BgTaskAction;
24
- /** Raw (un-encoded) Claude taskId. */
23
+
25
24
  readonly taskId: string;
26
25
  readonly desc?: string;
27
26
  readonly summary?: string;
@@ -29,19 +28,9 @@ export interface EncodeBgTaskInput {
29
28
  readonly durationMs?: number;
30
29
  readonly toolUses?: number;
31
30
  }
32
- /**
33
- * Encode a bg-task lifecycle event into its service-envelope text form.
34
- * taskId is URI-encoded so its (rare) colons never break the fixed-segment parser.
35
- */
31
+
36
32
  export declare function encodeBgTask(input: EncodeBgTaskInput): string;
37
- /**
38
- * Parse a bg-task service-envelope text back into structured fields.
39
- * Returns null when `text` is not a recognized bg-task line.
40
- *
41
- * Pure decoding only — business rules (e.g. "empty progress summary must not
42
- * overwrite the started desc") stay in the caller.
43
- */
33
+
44
34
  export declare function parseBgTask(text: string): ParsedBgTask | null;
45
- /** True when `text` is a started or progress line (internal lifecycle, hidden from the flow). */
35
+
46
36
  export declare function isBgTaskLifecycleLine(text: string): boolean;
47
- //# sourceMappingURL=bgTask.d.ts.map
@@ -166,7 +166,7 @@ export declare const CheckpointRollbackParamsSchema: z.ZodObject<{
166
166
  timestamp: z.ZodOptional<z.ZodString>;
167
167
  mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["code", "conversation", "both"]>>>;
168
168
  force: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
169
- /** Sent by web PWA to identify the specific tool call for rollback. */
169
+
170
170
  toolCallId: z.ZodOptional<z.ZodString>;
171
171
  }, "strict", z.ZodTypeAny, {
172
172
  mode: "code" | "conversation" | "both";
@@ -216,4 +216,3 @@ export type FileDiffEntry = z.infer<typeof FileDiffEntrySchema>;
216
216
  export type CheckpointDiffResult = z.infer<typeof CheckpointDiffResultSchema>;
217
217
  export type CheckpointRollbackParams = z.infer<typeof CheckpointRollbackParamsSchema>;
218
218
  export type CheckpointRollbackResult = z.infer<typeof CheckpointRollbackResultSchema>;
219
- //# sourceMappingURL=checkpointSchemas.d.ts.map
@@ -1,12 +1,4 @@
1
1
  import { z } from 'zod';
2
- /**
3
- * Control depth level for CLI tools.
4
- *
5
- * Level 3: Full control — bidirectional ACP, per-tool permissions, resume (Claude Code, OpenCode)
6
- * Level 2: High control — JSONL + resume + pre-configured permissions (Codex CLI)
7
- * Level 1: Read-only monitoring — JSONL + no resume + binary permissions (Gemini, Qwen)
8
- * Level 0: Minimal — plain text + no multi-turn (Aider, not recommended)
9
- */
2
+
10
3
  export declare const ControlLevel: z.ZodUnion<[z.ZodLiteral<3>, z.ZodLiteral<2>, z.ZodLiteral<1>, z.ZodLiteral<0>]>;
11
4
  export type ControlLevelType = z.infer<typeof ControlLevel>;
12
- //# sourceMappingURL=controlLevel.d.ts.map
package/dist/edition.d.ts CHANGED
@@ -2,4 +2,3 @@ export declare const EDITIONS: readonly ["personal", "enterprise"];
2
2
  export type Edition = (typeof EDITIONS)[number];
3
3
  export declare function getEdition(): Edition;
4
4
  export declare function isEnterprise(): boolean;
5
- //# sourceMappingURL=edition.d.ts.map
@@ -0,0 +1,120 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const ENTERPRISE_CURRENCIES: readonly ["USD", "CNY"];
4
+ export type EnterpriseCurrencyCode = (typeof ENTERPRISE_CURRENCIES)[number];
5
+ export declare const EnterpriseCurrencyCodeSchema: z.ZodEnum<["USD", "CNY"]>;
6
+ export declare const DisplayCurrencyConfigSchema: z.ZodObject<{
7
+
8
+ code: z.ZodString;
9
+ symbol: z.ZodString;
10
+
11
+ rate: z.ZodNumber;
12
+
13
+ fxRates: z.ZodRecord<z.ZodString, z.ZodNumber>;
14
+ }, "strict", z.ZodTypeAny, {
15
+ symbol: string;
16
+ code: string;
17
+ rate: number;
18
+ fxRates: Record<string, number>;
19
+ }, {
20
+ symbol: string;
21
+ code: string;
22
+ rate: number;
23
+ fxRates: Record<string, number>;
24
+ }>;
25
+ export type DisplayCurrencyConfig = z.infer<typeof DisplayCurrencyConfigSchema>;
26
+
27
+ export declare const DisplayCurrencySettingsResponseSchema: z.ZodObject<{
28
+ ok: z.ZodLiteral<true>;
29
+ currency: z.ZodObject<{
30
+
31
+ code: z.ZodString;
32
+ symbol: z.ZodString;
33
+
34
+ rate: z.ZodNumber;
35
+
36
+ fxRates: z.ZodRecord<z.ZodString, z.ZodNumber>;
37
+ }, "strict", z.ZodTypeAny, {
38
+ symbol: string;
39
+ code: string;
40
+ rate: number;
41
+ fxRates: Record<string, number>;
42
+ }, {
43
+ symbol: string;
44
+ code: string;
45
+ rate: number;
46
+ fxRates: Record<string, number>;
47
+ }>;
48
+
49
+ missing: z.ZodArray<z.ZodString, "many">;
50
+ }, "strict", z.ZodTypeAny, {
51
+ ok: true;
52
+ currency: {
53
+ symbol: string;
54
+ code: string;
55
+ rate: number;
56
+ fxRates: Record<string, number>;
57
+ };
58
+ missing: string[];
59
+ }, {
60
+ ok: true;
61
+ currency: {
62
+ symbol: string;
63
+ code: string;
64
+ rate: number;
65
+ fxRates: Record<string, number>;
66
+ };
67
+ missing: string[];
68
+ }>;
69
+ export type DisplayCurrencySettings = z.infer<typeof DisplayCurrencySettingsResponseSchema>;
70
+
71
+ export declare const DisplayCurrencyConfigResponseSchema: z.ZodObject<{
72
+ ok: z.ZodLiteral<true>;
73
+ currency: z.ZodObject<{
74
+
75
+ code: z.ZodString;
76
+ symbol: z.ZodString;
77
+
78
+ rate: z.ZodNumber;
79
+
80
+ fxRates: z.ZodRecord<z.ZodString, z.ZodNumber>;
81
+ }, "strict", z.ZodTypeAny, {
82
+ symbol: string;
83
+ code: string;
84
+ rate: number;
85
+ fxRates: Record<string, number>;
86
+ }, {
87
+ symbol: string;
88
+ code: string;
89
+ rate: number;
90
+ fxRates: Record<string, number>;
91
+ }>;
92
+ }, "strict", z.ZodTypeAny, {
93
+ ok: true;
94
+ currency: {
95
+ symbol: string;
96
+ code: string;
97
+ rate: number;
98
+ fxRates: Record<string, number>;
99
+ };
100
+ }, {
101
+ ok: true;
102
+ currency: {
103
+ symbol: string;
104
+ code: string;
105
+ rate: number;
106
+ fxRates: Record<string, number>;
107
+ };
108
+ }>;
109
+
110
+ export declare const UpdateDisplayCurrencyBodySchema: z.ZodObject<{
111
+ code: z.ZodEnum<["USD", "CNY"]>;
112
+ fxRates: z.ZodRecord<z.ZodEnum<["USD", "CNY"]>, z.ZodNumber>;
113
+ }, "strict", z.ZodTypeAny, {
114
+ code: "USD" | "CNY";
115
+ fxRates: Partial<Record<"USD" | "CNY", number>>;
116
+ }, {
117
+ code: "USD" | "CNY";
118
+ fxRates: Partial<Record<"USD" | "CNY", number>>;
119
+ }>;
120
+ export type UpdateDisplayCurrencyBody = z.infer<typeof UpdateDisplayCurrencyBodySchema>;
@@ -0,0 +1 @@
1
+ "use strict";import{z as e}from"zod";export const ENTERPRISE_CURRENCIES=["USD","CNY"],EnterpriseCurrencyCodeSchema=e.enum(ENTERPRISE_CURRENCIES),DisplayCurrencyConfigSchema=e.object({code:e.string().regex(/^[A-Z]{3}$/),symbol:e.string(),rate:e.number().positive().finite(),fxRates:e.record(e.string().regex(/^[A-Z]{3}$/),e.number().positive().finite())}).strict(),DisplayCurrencySettingsResponseSchema=e.object({ok:e.literal(!0),currency:DisplayCurrencyConfigSchema,missing:e.array(e.string().regex(/^[A-Z]{3}$/))}).strict(),DisplayCurrencyConfigResponseSchema=e.object({ok:e.literal(!0),currency:DisplayCurrencyConfigSchema}).strict(),UpdateDisplayCurrencyBodySchema=e.object({code:EnterpriseCurrencyCodeSchema,fxRates:e.record(EnterpriseCurrencyCodeSchema,e.number().positive().finite())}).strict();