@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,12 +1,12 @@
1
1
  import { z } from 'zod';
2
- /** Supported agent types for avatar and UI differentiation. */
2
+
3
3
  export declare const AgentTypeSchema: z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>;
4
4
  export type AgentType = z.infer<typeof AgentTypeSchema>;
5
- /** All agent type values derived from the schema (single source of truth). */
5
+
6
6
  export declare const AGENT_TYPES: ["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"];
7
- /** Agent types that can be spawned as sessions (excludes 'custom'). */
7
+
8
8
  export declare const SPAWNABLE_AGENTS: ("hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw")[];
9
- /** CLI identifiers accepted by spawn-session RPC. */
9
+
10
10
  export declare const CLI_AGENT_TYPES: readonly ["claude", "copilot", "opencode", "codex", "gemini", "hermes", "openclaw"];
11
11
  export type CliAgentType = (typeof CLI_AGENT_TYPES)[number];
12
12
  export declare const MessageMetaSchema: z.ZodObject<{
@@ -19,11 +19,11 @@ export declare const MessageMetaSchema: z.ZodObject<{
19
19
  allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
20
20
  disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
21
21
  displayText: z.ZodOptional<z.ZodString>;
22
- /** Agent type for UI differentiation (avatar, colors). */
22
+
23
23
  agentType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>>>;
24
- /** Session start timestamp (Unix ms). */
24
+
25
25
  startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
26
- /** Session status for info display. */
26
+
27
27
  sessionStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<["running", "idle", "completed", "failed", "cancelled"]>>>;
28
28
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
29
29
  sentFrom: z.ZodOptional<z.ZodString>;
@@ -35,11 +35,11 @@ export declare const MessageMetaSchema: z.ZodObject<{
35
35
  allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
36
36
  disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
37
37
  displayText: z.ZodOptional<z.ZodString>;
38
- /** Agent type for UI differentiation (avatar, colors). */
38
+
39
39
  agentType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>>>;
40
- /** Session start timestamp (Unix ms). */
40
+
41
41
  startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
42
- /** Session status for info display. */
42
+
43
43
  sessionStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<["running", "idle", "completed", "failed", "cancelled"]>>>;
44
44
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
45
45
  sentFrom: z.ZodOptional<z.ZodString>;
@@ -51,17 +51,15 @@ export declare const MessageMetaSchema: z.ZodObject<{
51
51
  allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
52
52
  disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
53
53
  displayText: z.ZodOptional<z.ZodString>;
54
- /** Agent type for UI differentiation (avatar, colors). */
54
+
55
55
  agentType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>>>;
56
- /** Session start timestamp (Unix ms). */
56
+
57
57
  startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
58
- /** Session status for info display. */
58
+
59
59
  sessionStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<["running", "idle", "completed", "failed", "cancelled"]>>>;
60
60
  }, z.ZodTypeAny, "passthrough">>;
61
61
  export type MessageMeta = z.infer<typeof MessageMetaSchema>;
62
- /** Hardcoded per-agent image support. UX-driven: hides image button immediately on agent selection.
63
- * Updated when agents add ACP promptCapabilities.image support. */
62
+
64
63
  export declare const AGENT_SUPPORTS_IMAGES: Readonly<Record<AgentType, boolean>>;
65
- /** 固定品牌显示名(不随界面语言变化)。单一来源:消费方(web/daemon/admin-panel)从此导入,禁止本地再写一份。 */
64
+
66
65
  export declare const AGENT_DISPLAY_NAMES: Readonly<Record<AgentType, string>>;
67
- //# sourceMappingURL=messageMeta.d.ts.map
@@ -1,29 +1,23 @@
1
- /**
2
- * Message schemas.
3
- *
4
- * SessionMessage: encrypted content container.
5
- * Timestamps are Unix numbers (milliseconds).
6
- */
7
1
  import { z } from 'zod';
8
2
  import { SessionEnvelopeSchema } from './envelope.js';
9
3
  export declare const SessionContextBoundaryKindSchema: z.ZodEnum<["clear", "compact"]>;
10
4
  export type SessionContextBoundaryKind = z.infer<typeof SessionContextBoundaryKindSchema>;
11
- /** Derive the non-sensitive query projection from a decrypted envelope. */
5
+
12
6
  export declare function getSessionContextBoundary(envelope: z.infer<typeof SessionEnvelopeSchema>): SessionContextBoundaryKind | undefined;
13
7
  export declare const SessionMessageContentSchema: z.ZodObject<{
14
8
  c: z.ZodString;
15
9
  t: z.ZodEnum<["encrypted", "plaintext"]>;
16
- /** Non-sensitive projection; message body and compact summary remain encrypted. */
10
+
17
11
  contextBoundary: z.ZodOptional<z.ZodEnum<["clear", "compact"]>>;
18
12
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
19
13
  c: z.ZodString;
20
14
  t: z.ZodEnum<["encrypted", "plaintext"]>;
21
- /** Non-sensitive projection; message body and compact summary remain encrypted. */
15
+
22
16
  contextBoundary: z.ZodOptional<z.ZodEnum<["clear", "compact"]>>;
23
17
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
24
18
  c: z.ZodString;
25
19
  t: z.ZodEnum<["encrypted", "plaintext"]>;
26
- /** Non-sensitive projection; message body and compact summary remain encrypted. */
20
+
27
21
  contextBoundary: z.ZodOptional<z.ZodEnum<["clear", "compact"]>>;
28
22
  }, z.ZodTypeAny, "passthrough">>;
29
23
  export type SessionMessageContent = z.infer<typeof SessionMessageContentSchema>;
@@ -35,17 +29,17 @@ export declare const SessionMessageSchema: z.ZodObject<{
35
29
  content: z.ZodObject<{
36
30
  c: z.ZodString;
37
31
  t: z.ZodEnum<["encrypted", "plaintext"]>;
38
- /** Non-sensitive projection; message body and compact summary remain encrypted. */
32
+
39
33
  contextBoundary: z.ZodOptional<z.ZodEnum<["clear", "compact"]>>;
40
34
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
41
35
  c: z.ZodString;
42
36
  t: z.ZodEnum<["encrypted", "plaintext"]>;
43
- /** Non-sensitive projection; message body and compact summary remain encrypted. */
37
+
44
38
  contextBoundary: z.ZodOptional<z.ZodEnum<["clear", "compact"]>>;
45
39
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
46
40
  c: z.ZodString;
47
41
  t: z.ZodEnum<["encrypted", "plaintext"]>;
48
- /** Non-sensitive projection; message body and compact summary remain encrypted. */
42
+
49
43
  contextBoundary: z.ZodOptional<z.ZodEnum<["clear", "compact"]>>;
50
44
  }, z.ZodTypeAny, "passthrough">>;
51
45
  createdAt: z.ZodNumber;
@@ -58,17 +52,17 @@ export declare const SessionMessageSchema: z.ZodObject<{
58
52
  content: z.ZodObject<{
59
53
  c: z.ZodString;
60
54
  t: z.ZodEnum<["encrypted", "plaintext"]>;
61
- /** Non-sensitive projection; message body and compact summary remain encrypted. */
55
+
62
56
  contextBoundary: z.ZodOptional<z.ZodEnum<["clear", "compact"]>>;
63
57
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
64
58
  c: z.ZodString;
65
59
  t: z.ZodEnum<["encrypted", "plaintext"]>;
66
- /** Non-sensitive projection; message body and compact summary remain encrypted. */
60
+
67
61
  contextBoundary: z.ZodOptional<z.ZodEnum<["clear", "compact"]>>;
68
62
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
69
63
  c: z.ZodString;
70
64
  t: z.ZodEnum<["encrypted", "plaintext"]>;
71
- /** Non-sensitive projection; message body and compact summary remain encrypted. */
65
+
72
66
  contextBoundary: z.ZodOptional<z.ZodEnum<["clear", "compact"]>>;
73
67
  }, z.ZodTypeAny, "passthrough">>;
74
68
  createdAt: z.ZodNumber;
@@ -81,17 +75,17 @@ export declare const SessionMessageSchema: z.ZodObject<{
81
75
  content: z.ZodObject<{
82
76
  c: z.ZodString;
83
77
  t: z.ZodEnum<["encrypted", "plaintext"]>;
84
- /** Non-sensitive projection; message body and compact summary remain encrypted. */
78
+
85
79
  contextBoundary: z.ZodOptional<z.ZodEnum<["clear", "compact"]>>;
86
80
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
87
81
  c: z.ZodString;
88
82
  t: z.ZodEnum<["encrypted", "plaintext"]>;
89
- /** Non-sensitive projection; message body and compact summary remain encrypted. */
83
+
90
84
  contextBoundary: z.ZodOptional<z.ZodEnum<["clear", "compact"]>>;
91
85
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
92
86
  c: z.ZodString;
93
87
  t: z.ZodEnum<["encrypted", "plaintext"]>;
94
- /** Non-sensitive projection; message body and compact summary remain encrypted. */
88
+
95
89
  contextBoundary: z.ZodOptional<z.ZodEnum<["clear", "compact"]>>;
96
90
  }, z.ZodTypeAny, "passthrough">>;
97
91
  createdAt: z.ZodNumber;
@@ -35256,4 +35250,3 @@ export declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.Zo
35256
35250
  }, z.ZodTypeAny, "passthrough">>>;
35257
35251
  }, z.ZodTypeAny, "passthrough">>]>;
35258
35252
  export type MessageContent = z.infer<typeof MessageContentSchema>;
35259
- //# sourceMappingURL=messages.d.ts.map
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
- /** Event categories accepted by the daemon's local notification dispatcher. */
2
+
3
3
  export declare const NotificationEventTypeSchema: z.ZodEnum<["completed", "error", "task_completed", "task_failed", "budget_warning", "daemon_disconnected"]>;
4
4
  export type NotificationEventType = z.infer<typeof NotificationEventTypeSchema>;
5
- /** Server-to-daemon RPC payload for dispatching a local IM notification. */
5
+
6
6
  export declare const DispatchNotificationParamsSchema: z.ZodObject<{
7
7
  type: z.ZodEnum<["completed", "error", "task_completed", "task_failed", "budget_warning", "daemon_disconnected"]>;
8
8
  title: z.ZodString;
@@ -45,4 +45,3 @@ export declare const DispatchNotificationParamsSchema: z.ZodObject<{
45
45
  machineHostname?: string | undefined;
46
46
  }>;
47
47
  export type DispatchNotificationParams = z.infer<typeof DispatchNotificationParamsSchema>;
48
- //# sourceMappingURL=notification.d.ts.map
package/dist/ops.d.ts CHANGED
@@ -1,30 +1,13 @@
1
1
  import { z } from 'zod';
2
- /**
3
- * Ops RPC method naming convention: namespace.action
4
- * - file.* — RFC-033 file management
5
- * - sync.* — RFC-034 data sync (Ops Agent → Server)
6
- * - config.* — RFC-034 policy push (Server → Ops Agent)
7
- */
2
+
8
3
  export declare const OpsMethodSchema: z.ZodString;
9
4
  export type OpsMethod = z.infer<typeof OpsMethodSchema>;
10
5
  export declare const OpsRpcTypeSchema: z.ZodEnum<["request", "response", "event"]>;
11
6
  export type OpsRpcType = z.infer<typeof OpsRpcTypeSchema>;
12
- /**
13
- * Docker image reference — used for system-upgrade imageTag validation.
14
- *
15
- * SECURITY (2026-07-27 #M1): the imageTag flows enterprise-admin → Ops Agent →
16
- * `prepareSharedSystem` → `execAsync(\`docker create ... "${image}"\`)` which runs
17
- * via a shell. Without a whitelist, an authenticated enterprise admin can inject
18
- * `$(...)` / backticks inside the double quotes and achieve RCE on the Ops Agent
19
- * host. This regex is an ALLOW-list of the only characters a valid image ref can
20
- * contain (`registry[:port]/namespace/name[:tag][@digest]`); every shell
21
- * metacharacter (`$` `` ` `` `"` `'` space `;` `|` `&` `(` `)` `<` `>` `\`) is
22
- * excluded, so a passing value is safe to interpolate. Fail-closed: reject on any
23
- * non-matching character rather than sanitizing.
24
- */
7
+
25
8
  export declare const DockerImageRefSchema: z.ZodString;
26
9
  export type DockerImageRef = z.infer<typeof DockerImageRefSchema>;
27
- /** Unified RPC message over the ops-upstream tunnel. */
10
+
28
11
  export declare const OpsRpcMessageSchema: z.ZodObject<{
29
12
  id: z.ZodString;
30
13
  type: z.ZodEnum<["request", "response", "event"]>;
@@ -42,7 +25,7 @@ export declare const OpsRpcMessageSchema: z.ZodObject<{
42
25
  payload: z.ZodUnknown;
43
26
  }, z.ZodTypeAny, "passthrough">>;
44
27
  export type OpsRpcMessage = z.infer<typeof OpsRpcMessageSchema>;
45
- /** Metrics tracked per ops tunnel connection (RFC-034 R7). */
28
+
46
29
  export interface OpsTunnelMetrics {
47
30
  readonly enterpriseId: string;
48
31
  readonly connectedAt: Date | null;
@@ -111,7 +94,7 @@ export declare const StorageUsageSchema: z.ZodObject<{
111
94
  fileCount: z.ZodNumber;
112
95
  }, z.ZodTypeAny, "passthrough">>;
113
96
  export type StorageUsage = z.infer<typeof StorageUsageSchema>;
114
- /** A single user record in a full sync push. */
97
+
115
98
  export declare const SyncUserSchema: z.ZodObject<{
116
99
  username: z.ZodString;
117
100
  displayName: z.ZodString;
@@ -135,7 +118,7 @@ export declare const SyncUserSchema: z.ZodObject<{
135
118
  enabled: z.ZodBoolean;
136
119
  }, z.ZodTypeAny, "passthrough">>;
137
120
  export type SyncUser = z.infer<typeof SyncUserSchema>;
138
- /** sync.full — all users pushed on tunnel connect/reconnect. */
121
+
139
122
  export declare const SyncFullPayloadSchema: z.ZodObject<{
140
123
  users: z.ZodArray<z.ZodObject<{
141
124
  username: z.ZodString;
@@ -207,7 +190,7 @@ export declare const SyncFullPayloadSchema: z.ZodObject<{
207
190
  }, z.ZodTypeAny, "passthrough">>, "many">;
208
191
  }, z.ZodTypeAny, "passthrough">>;
209
192
  export type SyncFullPayload = z.infer<typeof SyncFullPayloadSchema>;
210
- /** sync.user-created — single user just created. */
193
+
211
194
  export declare const SyncUserCreatedPayloadSchema: z.ZodObject<{
212
195
  username: z.ZodString;
213
196
  displayName: z.ZodString;
@@ -219,7 +202,7 @@ export declare const SyncUserCreatedPayloadSchema: z.ZodObject<{
219
202
  displayName: z.ZodString;
220
203
  }, z.ZodTypeAny, "passthrough">>;
221
204
  export type SyncUserCreatedPayload = z.infer<typeof SyncUserCreatedPayloadSchema>;
222
- /** sync.container-status — container state change. */
205
+
223
206
  export declare const SyncContainerStatusPayloadSchema: z.ZodObject<{
224
207
  username: z.ZodString;
225
208
  containerStatus: z.ZodString;
@@ -234,7 +217,7 @@ export declare const SyncContainerStatusPayloadSchema: z.ZodObject<{
234
217
  healthStatus: z.ZodOptional<z.ZodNullable<z.ZodString>>;
235
218
  }, z.ZodTypeAny, "passthrough">>;
236
219
  export type SyncContainerStatusPayload = z.infer<typeof SyncContainerStatusPayloadSchema>;
237
- /** sync.user-paired — daemon pairing detected, machineId available. */
220
+
238
221
  export declare const SyncUserPairedPayloadSchema: z.ZodObject<{
239
222
  username: z.ZodString;
240
223
  machineId: z.ZodString;
@@ -246,4 +229,3 @@ export declare const SyncUserPairedPayloadSchema: z.ZodObject<{
246
229
  machineId: z.ZodString;
247
230
  }, z.ZodTypeAny, "passthrough">>;
248
231
  export type SyncUserPairedPayload = z.infer<typeof SyncUserPairedPayloadSchema>;
249
- //# sourceMappingURL=ops.d.ts.map
package/dist/pairing.d.ts CHANGED
@@ -1,24 +1,7 @@
1
- /**
2
- * Pairing protocol schemas.
3
- *
4
- * Defines the wire format for device pairing:
5
- * - PairingRequest: CLI sends publicKey + optional PIN to server
6
- * - PairingResponse: Web sends encrypted payload back via server
7
- * - PairingStatus: Polling response — discriminated union on state
8
- *
9
- * Security: Uses NaCl Box (Curve25519 + XSalsa20-Poly1305) for key exchange.
10
- * PIN code provides iOS PWA fallback where QR scanning is unreliable.
11
- */
12
1
  import { z } from 'zod';
13
- /** Pairing state machine. */
2
+
14
3
  export declare const PairingState: z.ZodEnum<["pending", "exchange", "authorized", "expired"]>;
15
- /**
16
- * CLI → Server: initiate a pairing request.
17
- *
18
- * publicKey: base64-encoded Curve25519 public key (32 bytes)
19
- * pin: optional 6-digit PIN for manual entry (iOS PWA fallback)
20
- * label: optional human-readable device label
21
- */
4
+
22
5
  export declare const PairingRequestSchema: z.ZodObject<{
23
6
  publicKey: z.ZodEffects<z.ZodString, string, string>;
24
7
  pin: z.ZodOptional<z.ZodString>;
@@ -35,12 +18,7 @@ export declare const PairingRequestSchema: z.ZodObject<{
35
18
  label?: string | undefined;
36
19
  pin?: string | undefined;
37
20
  }>;
38
- /**
39
- * Web → Server: approve pairing with encrypted key material.
40
- *
41
- * publicKey: identifies which pairing request to respond to (32-byte Curve25519 key)
42
- * encryptedPayload: NaCl Box encrypted data (base64) containing the DEK
43
- */
21
+
44
22
  export declare const PairingResponseSchema: z.ZodObject<{
45
23
  publicKey: z.ZodEffects<z.ZodString, string, string>;
46
24
  encryptedPayload: z.ZodString;
@@ -51,10 +29,7 @@ export declare const PairingResponseSchema: z.ZodObject<{
51
29
  publicKey: string;
52
30
  encryptedPayload: string;
53
31
  }>;
54
- /**
55
- * New device → Server: submit device's temporary Curve25519 public key.
56
- * Used in invite flow when a new device joins an existing account.
57
- */
32
+
58
33
  export declare const PairingExchangeSchema: z.ZodObject<{
59
34
  daemonPublicKey: z.ZodEffects<z.ZodString, string, string>;
60
35
  devicePublicKey: z.ZodEffects<z.ZodString, string, string>;
@@ -65,10 +40,7 @@ export declare const PairingExchangeSchema: z.ZodObject<{
65
40
  daemonPublicKey: string;
66
41
  devicePublicKey: string;
67
42
  }>;
68
- /**
69
- * Daemon → Server: deliver encrypted master secret to new device.
70
- * Requires Bearer auth. Encrypted via NaCl Box using device's public key.
71
- */
43
+
72
44
  export declare const PairingDeliverSchema: z.ZodObject<{
73
45
  publicKey: z.ZodEffects<z.ZodString, string, string>;
74
46
  encryptedPayload: z.ZodString;
@@ -130,26 +102,14 @@ export type PairingResponse = z.infer<typeof PairingResponseSchema>;
130
102
  export type PairingExchange = z.infer<typeof PairingExchangeSchema>;
131
103
  export type PairingDeliver = z.infer<typeof PairingDeliverSchema>;
132
104
  export type PairingStatus = z.infer<typeof PairingStatusSchema>;
133
- /** Known derivation versions (whitelist). */
105
+
134
106
  export declare const KNOWN_DERIVATION_VERSIONS: Set<number>;
135
- /**
136
- * Current derivation version for newly created identities.
137
- * 0 = legacy ('Happy EnCoder'), 1 = CCPark ('CCPark EnCoder').
138
- */
107
+
139
108
  export declare const CURRENT_DERIVATION_VERSION = 1;
140
- /**
141
- * Encode a master secret with its derivation version as a pairing payload.
142
- * Inverse of {@link parseVersionByte}: produces [version_byte, ...masterSecret] (33 bytes).
143
- */
109
+
144
110
  export declare function encodeVersionByte(masterSecret: Uint8Array, version: number): Uint8Array;
145
- /**
146
- * Parse derivation version from decrypted pairing payload.
147
- * Version 1+: payload = [version_byte, ...masterSecret] (33 bytes)
148
- * Version 0 (legacy): payload = masterSecret (32 bytes, no prefix)
149
- * Returns null for unknown versions or unexpected lengths.
150
- */
111
+
151
112
  export declare function parseVersionByte(rawPayload: Uint8Array): {
152
113
  masterSecret: Uint8Array;
153
114
  derivationVersion: number;
154
115
  } | null;
155
- //# sourceMappingURL=pairing.d.ts.map
@@ -1,30 +1,7 @@
1
- /**
2
- * Raw agent tool names whose input carries a `command` field. These are the
3
- * ORIGINAL agent-emitted names (NOT normalized): Claude `Bash`, OpenCode/Hermes/
4
- * OpenClaw `execute`, Codex `shell`. The permission-request event and the danger
5
- * detector both see raw names, so this set is matched against raw names.
6
- */
7
1
  export declare const BASH_TOOL_NAMES: ReadonlySet<string>;
8
- /** True when `toolName` (a raw agent name) is a Bash-like command tool. */
2
+
9
3
  export declare function isBashToolName(toolName: string): boolean;
10
- /**
11
- * Extract the prefix subject from a Bash-like command string:
12
- * trim → first token (quote-aware so `"C:\Program Files\..."` isn't split on
13
- * spaces) → basename (`.../pwsh.exe` → `pwsh.exe`).
14
- *
15
- * Returns '' ONLY for an empty/blank command. When the first token ends in a
16
- * path separator its basename is empty; we fall back to the un-split token
17
- * rather than '' — an empty subject makes every command match
18
- * (`x.startsWith('')` is always true), the Bug 2 security hole.
19
- */
4
+
20
5
  export declare function extractCommandSubject(command: string): string;
21
- /**
22
- * Minimum length for a command subject to be used in a prefix rule.
23
- * Single-char subjects (e.g. `#` from a comment line, `.` from a dotfile)
24
- * are too broad — they effectively wildcard-match every command that starts
25
- * with that character.
26
- *
27
- * Used by the front-end to reject overly broad rules before they are stored.
28
- */
6
+
29
7
  export declare const MIN_SUBJECT_LENGTH = 2;
30
- //# sourceMappingURL=permissionSubject.d.ts.map
@@ -1,7 +1 @@
1
- /**
2
- * Wire protocol version.
3
- * Increment ONLY on breaking schema changes (new enum values, renamed events, required fields).
4
- * See RFC-021 for the full versioning strategy.
5
- */
6
1
  export declare const PROTOCOL_VERSION = 1;
7
- //# sourceMappingURL=protocol.d.ts.map