@agentdock/wire 0.0.94 → 0.0.95
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/dist/accountLanguage.d.ts +2 -8
- package/dist/activityPreferences.d.ts +0 -2
- package/dist/agentCapabilities.d.ts +16 -46
- package/dist/agentCommonEnv.d.ts +0 -9
- package/dist/agentInstallGuide.d.ts +0 -7
- package/dist/agentRuntimeSettings.d.ts +1 -2
- package/dist/bgTask.d.ts +13 -24
- package/dist/checkpointSchemas.d.ts +1 -2
- package/dist/controlLevel.d.ts +1 -9
- package/dist/edition.d.ts +0 -1
- package/dist/enterpriseGateway.d.ts +1 -2
- package/dist/enterprisePolicy.d.ts +1599 -0
- package/dist/enterprisePolicy.js +1 -0
- package/dist/enterprisePolicyExports.d.ts +2 -0
- package/dist/enterprisePolicyExports.js +1 -0
- package/dist/enterpriseRuntime.d.ts +317 -0
- package/dist/enterpriseRuntime.js +1 -0
- package/dist/envelope.d.ts +18 -30
- package/dist/errorMessage.d.ts +0 -1
- package/dist/events.d.ts +55 -71
- package/dist/features.d.ts +14 -29
- package/dist/feedback.d.ts +3 -4
- package/dist/fileWhitelist.d.ts +7 -39
- package/dist/gateway.d.ts +841 -43
- package/dist/gateway.js +1 -1
- package/dist/goals.d.ts +0 -1
- package/dist/handoffBrief.d.ts +1 -2
- package/dist/inboundEvents.d.ts +32 -75
- package/dist/index.d.ts +7 -6
- package/dist/index.js +1 -1
- package/dist/interactionEvents.d.ts +49 -57
- package/dist/legacyProtocol.d.ts +0 -6
- package/dist/license.d.ts +36 -37
- package/dist/machine.d.ts +48 -56
- package/dist/messageMeta.d.ts +15 -17
- package/dist/messages.d.ts +13 -20
- package/dist/notification.d.ts +2 -3
- package/dist/ops.d.ts +9 -27
- package/dist/pairing.d.ts +9 -49
- package/dist/permissionSubject.d.ts +3 -26
- package/dist/protocol.d.ts +0 -6
- package/dist/rpc.d.ts +118 -162
- package/dist/rpc.js +1 -1
- package/dist/scheduledTasks.d.ts +9 -10
- package/dist/semver.d.ts +3 -22
- package/dist/sessionBtw.d.ts +4 -5
- package/dist/sessionBtw.js +1 -1
- package/dist/sessionResult.d.ts +21 -27
- package/dist/sessionTitle.d.ts +2 -9
- package/dist/socketEvents.d.ts +4 -5
- package/dist/sourceMetadata.d.ts +1 -14
- package/dist/spawnError.d.ts +7 -14
- package/dist/stats.d.ts +13 -20
- package/dist/sync.d.ts +75 -156
- package/dist/taskResult.d.ts +3 -20
- package/dist/telemetry.d.ts +1 -11
- package/dist/utils.d.ts +0 -1
- package/dist/workItems.d.ts +6 -30
- package/package.json +1 -1
package/dist/messageMeta.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
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
|
-
|
|
5
|
+
|
|
6
6
|
export declare const AGENT_TYPES: ["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"];
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
export declare const SPAWNABLE_AGENTS: ("hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw")[];
|
|
9
|
-
|
|
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
|
-
|
|
22
|
+
|
|
23
23
|
agentType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>>>;
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
26
|
-
|
|
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
|
-
|
|
38
|
+
|
|
39
39
|
agentType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>>>;
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
42
|
-
|
|
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
|
-
|
|
54
|
+
|
|
55
55
|
agentType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>>>;
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
58
|
-
|
|
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
|
-
|
|
63
|
-
* Updated when agents add ACP promptCapabilities.image support. */
|
|
62
|
+
|
|
64
63
|
export declare const AGENT_SUPPORTS_IMAGES: Readonly<Record<AgentType, boolean>>;
|
|
65
|
-
|
|
64
|
+
|
|
66
65
|
export declare const AGENT_DISPLAY_NAMES: Readonly<Record<AgentType, string>>;
|
|
67
|
-
//# sourceMappingURL=messageMeta.d.ts.map
|
package/dist/messages.d.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
package/dist/notification.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
package/dist/protocol.d.ts
CHANGED