@agentdock/wire 0.0.90 → 0.0.92
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/activityPreferences.js +1 -2
- package/dist/agentCapabilities.d.ts +2 -0
- package/dist/agentCapabilities.js +1 -199
- package/dist/agentCommonEnv.js +1 -20
- package/dist/agentInstallGuide.js +1 -81
- package/dist/bgTask.js +1 -128
- package/dist/checkpointSchemas.d.ts +142 -98
- package/dist/checkpointSchemas.js +1 -46
- package/dist/controlLevel.js +1 -11
- package/dist/edition.js +1 -13
- package/dist/envelope.d.ts +5668 -563
- package/dist/envelope.js +1 -77
- package/dist/errorMessage.js +1 -6
- package/dist/events.d.ts +2053 -324
- package/dist/events.js +1 -107
- package/dist/features.d.ts +3 -1
- package/dist/features.js +1 -123
- package/dist/feedback.d.ts +2 -2
- package/dist/feedback.js +1 -61
- package/dist/fileWhitelist.js +1 -189
- package/dist/inboundEvents.d.ts +531 -0
- package/dist/inboundEvents.js +1 -0
- package/dist/index.d.ts +11 -5
- package/dist/index.js +1 -73
- package/dist/interactionEvents.d.ts +153 -106
- package/dist/interactionEvents.js +1 -111
- package/dist/legacyProtocol.d.ts +512 -272
- package/dist/legacyProtocol.js +1 -30
- package/dist/license.js +1 -28
- package/dist/machine.d.ts +108 -62
- package/dist/machine.js +1 -66
- package/dist/messageMeta.d.ts +34 -28
- package/dist/messageMeta.js +1 -60
- package/dist/messages.d.ts +34900 -1862
- package/dist/messages.js +1 -35
- package/dist/notification.d.ts +48 -0
- package/dist/notification.js +1 -0
- package/dist/ops.d.ts +165 -122
- package/dist/ops.js +1 -74
- package/dist/pairing.d.ts +4 -4
- package/dist/pairing.js +1 -150
- package/dist/permissionSubject.js +1 -68
- package/dist/protocol.js +1 -7
- package/dist/rpc.d.ts +749 -189
- package/dist/rpc.js +1 -269
- package/dist/scheduledTasks.d.ts +619 -304
- package/dist/scheduledTasks.js +1 -188
- package/dist/semver.js +1 -60
- package/dist/sessionResult.d.ts +31 -17
- package/dist/sessionResult.js +1 -23
- package/dist/socketEvents.d.ts +7 -0
- package/dist/socketEvents.js +1 -55
- package/dist/sourceMetadata.d.ts +44 -0
- package/dist/sourceMetadata.js +1 -0
- package/dist/spawnError.d.ts +21 -17
- package/dist/spawnError.js +1 -31
- package/dist/stats.d.ts +73 -73
- package/dist/stats.js +1 -117
- package/dist/sync.d.ts +2165 -819
- package/dist/sync.js +1 -99
- package/dist/taskResult.js +1 -113
- package/dist/telemetry.d.ts +120 -64
- package/dist/telemetry.js +1 -115
- package/dist/utils.js +1 -2
- package/package.json +1 -1
- package/dist/activityPreferences.d.ts.map +0 -1
- package/dist/activityPreferences.js.map +0 -1
- package/dist/agentCapabilities.d.ts.map +0 -1
- package/dist/agentCapabilities.js.map +0 -1
- package/dist/agentCommonEnv.d.ts.map +0 -1
- package/dist/agentCommonEnv.js.map +0 -1
- package/dist/agentInstallGuide.d.ts.map +0 -1
- package/dist/agentInstallGuide.js.map +0 -1
- package/dist/bgTask.d.ts.map +0 -1
- package/dist/bgTask.js.map +0 -1
- package/dist/checkpointSchemas.d.ts.map +0 -1
- package/dist/checkpointSchemas.js.map +0 -1
- package/dist/controlLevel.d.ts.map +0 -1
- package/dist/controlLevel.js.map +0 -1
- package/dist/edition.d.ts.map +0 -1
- package/dist/edition.js.map +0 -1
- package/dist/envelope.d.ts.map +0 -1
- package/dist/envelope.js.map +0 -1
- package/dist/errorMessage.d.ts.map +0 -1
- package/dist/errorMessage.js.map +0 -1
- package/dist/events.d.ts.map +0 -1
- package/dist/events.js.map +0 -1
- package/dist/features.d.ts.map +0 -1
- package/dist/features.js.map +0 -1
- package/dist/feedback.d.ts.map +0 -1
- package/dist/feedback.js.map +0 -1
- package/dist/fileWhitelist.d.ts.map +0 -1
- package/dist/fileWhitelist.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/interactionEvents.d.ts.map +0 -1
- package/dist/interactionEvents.js.map +0 -1
- package/dist/legacyProtocol.d.ts.map +0 -1
- package/dist/legacyProtocol.js.map +0 -1
- package/dist/license.d.ts.map +0 -1
- package/dist/license.js.map +0 -1
- package/dist/machine.d.ts.map +0 -1
- package/dist/machine.js.map +0 -1
- package/dist/messageMeta.d.ts.map +0 -1
- package/dist/messageMeta.js.map +0 -1
- package/dist/messages.d.ts.map +0 -1
- package/dist/messages.js.map +0 -1
- package/dist/ops.d.ts.map +0 -1
- package/dist/ops.js.map +0 -1
- package/dist/pairing.d.ts.map +0 -1
- package/dist/pairing.js.map +0 -1
- package/dist/permissionSubject.d.ts.map +0 -1
- package/dist/permissionSubject.js.map +0 -1
- package/dist/protocol.d.ts.map +0 -1
- package/dist/protocol.js.map +0 -1
- package/dist/rpc.d.ts.map +0 -1
- package/dist/rpc.js.map +0 -1
- package/dist/scheduledTasks.d.ts.map +0 -1
- package/dist/scheduledTasks.js.map +0 -1
- package/dist/semver.d.ts.map +0 -1
- package/dist/semver.js.map +0 -1
- package/dist/sessionResult.d.ts.map +0 -1
- package/dist/sessionResult.js.map +0 -1
- package/dist/socketEvents.d.ts.map +0 -1
- package/dist/socketEvents.js.map +0 -1
- package/dist/spawnError.d.ts.map +0 -1
- package/dist/spawnError.js.map +0 -1
- package/dist/stats.d.ts.map +0 -1
- package/dist/stats.js.map +0 -1
- package/dist/sync.d.ts.map +0 -1
- package/dist/sync.js.map +0 -1
- package/dist/taskResult.d.ts.map +0 -1
- package/dist/taskResult.js.map +0 -1
- package/dist/telemetry.d.ts.map +0 -1
- package/dist/telemetry.js.map +0 -1
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js.map +0 -1
package/dist/legacyProtocol.js
CHANGED
|
@@ -1,30 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Legacy protocol.
|
|
3
|
-
*
|
|
4
|
-
* Defines UserMessage and AgentMessage for backward compatibility.
|
|
5
|
-
*/
|
|
6
|
-
import { z } from 'zod';
|
|
7
|
-
import { MessageMetaSchema } from './messageMeta.js';
|
|
8
|
-
export const UserMessageSchema = z.object({
|
|
9
|
-
role: z.literal('user'),
|
|
10
|
-
content: z.object({
|
|
11
|
-
type: z.literal('text'),
|
|
12
|
-
text: z.string(),
|
|
13
|
-
}),
|
|
14
|
-
localKey: z.string().optional(),
|
|
15
|
-
meta: MessageMetaSchema.optional(),
|
|
16
|
-
});
|
|
17
|
-
export const AgentMessageSchema = z.object({
|
|
18
|
-
role: z.literal('agent'),
|
|
19
|
-
content: z
|
|
20
|
-
.object({
|
|
21
|
-
type: z.string(),
|
|
22
|
-
})
|
|
23
|
-
.passthrough(),
|
|
24
|
-
meta: MessageMetaSchema.optional(),
|
|
25
|
-
});
|
|
26
|
-
export const LegacyMessageContentSchema = z.discriminatedUnion('role', [
|
|
27
|
-
UserMessageSchema,
|
|
28
|
-
AgentMessageSchema,
|
|
29
|
-
]);
|
|
30
|
-
//# sourceMappingURL=legacyProtocol.js.map
|
|
1
|
+
"use strict";import{z as e}from"zod";import{MessageMetaSchema as t}from"./messageMeta.js";export const UserMessageSchema=e.object({role:e.literal("user"),content:e.object({type:e.literal("text"),text:e.string()}),localKey:e.string().optional(),meta:t.optional()}).passthrough(),AgentMessageSchema=e.object({role:e.literal("agent"),content:e.object({type:e.string()}).passthrough(),meta:t.optional()}).passthrough(),LegacyMessageContentSchema=e.discriminatedUnion("role",[UserMessageSchema,AgentMessageSchema]);
|
package/dist/license.js
CHANGED
|
@@ -1,28 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
const BaseLicenseSchema = z.object({
|
|
3
|
-
licensee: z.string().min(1),
|
|
4
|
-
expiresAt: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
5
|
-
issuedAt: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
6
|
-
});
|
|
7
|
-
export const EnterpriseLicenseSchema = BaseLicenseSchema.extend({
|
|
8
|
-
edition: z.literal('enterprise'),
|
|
9
|
-
maxUsers: z.number().int().positive(),
|
|
10
|
-
suffix: z
|
|
11
|
-
.string()
|
|
12
|
-
.min(1)
|
|
13
|
-
.max(32)
|
|
14
|
-
.regex(/^[a-z0-9_-]+$/),
|
|
15
|
-
});
|
|
16
|
-
export const PrivateLicenseSchema = BaseLicenseSchema.extend({
|
|
17
|
-
edition: z.literal('personal'),
|
|
18
|
-
domain: z.string().min(1),
|
|
19
|
-
});
|
|
20
|
-
export const LicensePayloadSchema = z.discriminatedUnion('edition', [
|
|
21
|
-
EnterpriseLicenseSchema,
|
|
22
|
-
PrivateLicenseSchema,
|
|
23
|
-
]);
|
|
24
|
-
export const LicenseFileSchema = z.discriminatedUnion('edition', [
|
|
25
|
-
EnterpriseLicenseSchema.extend({ signature: z.string().min(1) }),
|
|
26
|
-
PrivateLicenseSchema.extend({ signature: z.string().min(1) }),
|
|
27
|
-
]);
|
|
28
|
-
//# sourceMappingURL=license.js.map
|
|
1
|
+
"use strict";import{z as e}from"zod";const i=e.object({licensee:e.string().min(1),expiresAt:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),issuedAt:e.string().regex(/^\d{4}-\d{2}-\d{2}$/)});export const EnterpriseLicenseSchema=i.extend({edition:e.literal("enterprise"),maxUsers:e.number().int().positive(),suffix:e.string().min(1).max(32).regex(/^[a-z0-9_-]+$/)}),PrivateLicenseSchema=i.extend({edition:e.literal("personal"),domain:e.string().min(1)}),LicensePayloadSchema=e.discriminatedUnion("edition",[EnterpriseLicenseSchema,PrivateLicenseSchema]),LicenseFileSchema=e.discriminatedUnion("edition",[EnterpriseLicenseSchema.extend({signature:e.string().min(1)}),PrivateLicenseSchema.extend({signature:e.string().min(1)})]);
|
package/dist/machine.d.ts
CHANGED
|
@@ -44,55 +44,93 @@ export declare const MachineSummarySchema: z.ZodObject<{
|
|
|
44
44
|
derivationVersion: z.ZodOptional<z.ZodNumber>;
|
|
45
45
|
/** Whether the user has enabled automatic daemon upgrades when idle. */
|
|
46
46
|
autoUpgradeDaemon: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
/** Whether this machine has a Feishu webhook configured (RFC-067). */
|
|
48
|
+
notifyFeishu: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
+
/** Whether this machine has a DingTalk webhook configured (RFC-067). */
|
|
50
|
+
notifyDingtalk: z.ZodOptional<z.ZodBoolean>;
|
|
47
51
|
/** Last daemon heartbeat timestamp (epoch ms). Updated every 30s while connected. */
|
|
48
52
|
lastHeartbeat: z.ZodOptional<z.ZodNumber>;
|
|
49
|
-
}, "
|
|
50
|
-
id:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
hasTerminal
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
53
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
54
|
+
id: z.ZodString;
|
|
55
|
+
hostname: z.ZodString;
|
|
56
|
+
platform: z.ZodEnum<["darwin", "linux", "win32"]>;
|
|
57
|
+
arch: z.ZodOptional<z.ZodString>;
|
|
58
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
59
|
+
daemonVersion: z.ZodOptional<z.ZodString>;
|
|
60
|
+
active: z.ZodBoolean;
|
|
61
|
+
activeAt: z.ZodNumber;
|
|
62
|
+
createdAt: z.ZodNumber;
|
|
63
|
+
/** Whether this machine has an active terminal-server tunnel. */
|
|
64
|
+
hasTerminal: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
+
/** Number of active sessions on this machine. */
|
|
66
|
+
activeSessions: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
/** Total number of sessions on this machine. */
|
|
68
|
+
totalSessions: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
/** Agent types available on this machine (persisted on each daemon connect). */
|
|
70
|
+
availableAgents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
71
|
+
/** Agent versions keyed by agent type name (e.g. { claude: "1.2.3" }). */
|
|
72
|
+
agentVersions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
73
|
+
/** RPC methods this machine's daemon has registered (RFC-035). */
|
|
74
|
+
supportedMethods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
75
|
+
/** Why the machine disconnected — 'upgrade-required' triggers UI upgrade prompts (RFC-037). */
|
|
76
|
+
disconnectReason: z.ZodOptional<z.ZodEnum<["normal", "upgrade-required"]>>;
|
|
77
|
+
/** Current upgrade state reported by the daemon (RFC-042). 'ready' = downloaded, swap pending. */
|
|
78
|
+
upgradeStatus: z.ZodOptional<z.ZodEnum<["idle", "preflight", "downloading", "ready", "switching", "failed"]>>;
|
|
79
|
+
/** Error message when upgradeStatus is 'failed' (RFC-042). */
|
|
80
|
+
upgradeError: z.ZodOptional<z.ZodString>;
|
|
81
|
+
/** True when this machine has been replaced by a new one (container rebuild). */
|
|
82
|
+
superseded: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
/** Content derivation version: 0=Happy EnCoder (legacy), 1=CCPark EnCoder. */
|
|
84
|
+
derivationVersion: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
/** Whether the user has enabled automatic daemon upgrades when idle. */
|
|
86
|
+
autoUpgradeDaemon: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
/** Whether this machine has a Feishu webhook configured (RFC-067). */
|
|
88
|
+
notifyFeishu: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
+
/** Whether this machine has a DingTalk webhook configured (RFC-067). */
|
|
90
|
+
notifyDingtalk: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
+
/** Last daemon heartbeat timestamp (epoch ms). Updated every 30s while connected. */
|
|
92
|
+
lastHeartbeat: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
94
|
+
id: z.ZodString;
|
|
95
|
+
hostname: z.ZodString;
|
|
96
|
+
platform: z.ZodEnum<["darwin", "linux", "win32"]>;
|
|
97
|
+
arch: z.ZodOptional<z.ZodString>;
|
|
98
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
99
|
+
daemonVersion: z.ZodOptional<z.ZodString>;
|
|
100
|
+
active: z.ZodBoolean;
|
|
101
|
+
activeAt: z.ZodNumber;
|
|
102
|
+
createdAt: z.ZodNumber;
|
|
103
|
+
/** Whether this machine has an active terminal-server tunnel. */
|
|
104
|
+
hasTerminal: z.ZodOptional<z.ZodBoolean>;
|
|
105
|
+
/** Number of active sessions on this machine. */
|
|
106
|
+
activeSessions: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
/** Total number of sessions on this machine. */
|
|
108
|
+
totalSessions: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
/** Agent types available on this machine (persisted on each daemon connect). */
|
|
110
|
+
availableAgents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
111
|
+
/** Agent versions keyed by agent type name (e.g. { claude: "1.2.3" }). */
|
|
112
|
+
agentVersions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
113
|
+
/** RPC methods this machine's daemon has registered (RFC-035). */
|
|
114
|
+
supportedMethods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
115
|
+
/** Why the machine disconnected — 'upgrade-required' triggers UI upgrade prompts (RFC-037). */
|
|
116
|
+
disconnectReason: z.ZodOptional<z.ZodEnum<["normal", "upgrade-required"]>>;
|
|
117
|
+
/** Current upgrade state reported by the daemon (RFC-042). 'ready' = downloaded, swap pending. */
|
|
118
|
+
upgradeStatus: z.ZodOptional<z.ZodEnum<["idle", "preflight", "downloading", "ready", "switching", "failed"]>>;
|
|
119
|
+
/** Error message when upgradeStatus is 'failed' (RFC-042). */
|
|
120
|
+
upgradeError: z.ZodOptional<z.ZodString>;
|
|
121
|
+
/** True when this machine has been replaced by a new one (container rebuild). */
|
|
122
|
+
superseded: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
/** Content derivation version: 0=Happy EnCoder (legacy), 1=CCPark EnCoder. */
|
|
124
|
+
derivationVersion: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
/** Whether the user has enabled automatic daemon upgrades when idle. */
|
|
126
|
+
autoUpgradeDaemon: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
/** Whether this machine has a Feishu webhook configured (RFC-067). */
|
|
128
|
+
notifyFeishu: z.ZodOptional<z.ZodBoolean>;
|
|
129
|
+
/** Whether this machine has a DingTalk webhook configured (RFC-067). */
|
|
130
|
+
notifyDingtalk: z.ZodOptional<z.ZodBoolean>;
|
|
131
|
+
/** Last daemon heartbeat timestamp (epoch ms). Updated every 30s while connected. */
|
|
132
|
+
lastHeartbeat: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
96
134
|
export type MachineSummary = z.infer<typeof MachineSummarySchema>;
|
|
97
135
|
export declare const MachineRegisterResultSchema: z.ZodObject<{
|
|
98
136
|
ok: z.ZodBoolean;
|
|
@@ -100,30 +138,38 @@ export declare const MachineRegisterResultSchema: z.ZodObject<{
|
|
|
100
138
|
latestVersion: z.ZodOptional<z.ZodString>;
|
|
101
139
|
labsSettings: z.ZodOptional<z.ZodObject<{
|
|
102
140
|
historySessionSync: z.ZodDefault<z.ZodBoolean>;
|
|
103
|
-
}, "
|
|
141
|
+
}, "strict", z.ZodTypeAny, {
|
|
104
142
|
historySessionSync: boolean;
|
|
105
143
|
}, {
|
|
106
144
|
historySessionSync?: boolean | undefined;
|
|
107
145
|
}>>;
|
|
108
|
-
}, "
|
|
109
|
-
ok:
|
|
110
|
-
error
|
|
111
|
-
latestVersion
|
|
112
|
-
labsSettings
|
|
146
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
147
|
+
ok: z.ZodBoolean;
|
|
148
|
+
error: z.ZodOptional<z.ZodString>;
|
|
149
|
+
latestVersion: z.ZodOptional<z.ZodString>;
|
|
150
|
+
labsSettings: z.ZodOptional<z.ZodObject<{
|
|
151
|
+
historySessionSync: z.ZodDefault<z.ZodBoolean>;
|
|
152
|
+
}, "strict", z.ZodTypeAny, {
|
|
113
153
|
historySessionSync: boolean;
|
|
114
|
-
}
|
|
115
|
-
}, {
|
|
116
|
-
ok: boolean;
|
|
117
|
-
error?: string | undefined;
|
|
118
|
-
latestVersion?: string | undefined;
|
|
119
|
-
labsSettings?: {
|
|
154
|
+
}, {
|
|
120
155
|
historySessionSync?: boolean | undefined;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
156
|
+
}>>;
|
|
157
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
158
|
+
ok: z.ZodBoolean;
|
|
159
|
+
error: z.ZodOptional<z.ZodString>;
|
|
160
|
+
latestVersion: z.ZodOptional<z.ZodString>;
|
|
161
|
+
labsSettings: z.ZodOptional<z.ZodObject<{
|
|
162
|
+
historySessionSync: z.ZodDefault<z.ZodBoolean>;
|
|
163
|
+
}, "strict", z.ZodTypeAny, {
|
|
164
|
+
historySessionSync: boolean;
|
|
165
|
+
}, {
|
|
166
|
+
historySessionSync?: boolean | undefined;
|
|
167
|
+
}>>;
|
|
168
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
123
169
|
export type MachineRegisterResult = z.infer<typeof MachineRegisterResultSchema>;
|
|
124
170
|
export declare const SetDefaultMachineBodySchema: z.ZodObject<{
|
|
125
171
|
machineId: z.ZodNullable<z.ZodString>;
|
|
126
|
-
}, "
|
|
172
|
+
}, "strict", z.ZodTypeAny, {
|
|
127
173
|
machineId: string | null;
|
|
128
174
|
}, {
|
|
129
175
|
machineId: string | null;
|
package/dist/machine.js
CHANGED
|
@@ -1,66 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Machine and session status schemas for Dashboard & Machine Management.
|
|
3
|
-
*
|
|
4
|
-
* MachineSummary — device info returned by GET /v1/machines.
|
|
5
|
-
* SessionStatus — real-time session state indicator.
|
|
6
|
-
* Platform — OS platform enum matching Node's process.platform.
|
|
7
|
-
*/
|
|
8
|
-
import { z } from 'zod';
|
|
9
|
-
import { LabsSettingsSchema } from './rpc.js';
|
|
10
|
-
export const PlatformSchema = z.enum(['darwin', 'linux', 'win32']);
|
|
11
|
-
export const SessionStatusSchema = z.enum([
|
|
12
|
-
'idle',
|
|
13
|
-
'thinking',
|
|
14
|
-
'tool_running',
|
|
15
|
-
'permission_required',
|
|
16
|
-
'disconnected',
|
|
17
|
-
]);
|
|
18
|
-
export const MachineSummarySchema = z.object({
|
|
19
|
-
id: z.string(),
|
|
20
|
-
hostname: z.string(),
|
|
21
|
-
platform: PlatformSchema,
|
|
22
|
-
arch: z.string().optional(),
|
|
23
|
-
displayName: z.string().optional(),
|
|
24
|
-
daemonVersion: z.string().optional(),
|
|
25
|
-
active: z.boolean(),
|
|
26
|
-
activeAt: z.number(),
|
|
27
|
-
createdAt: z.number(),
|
|
28
|
-
/** Whether this machine has an active terminal-server tunnel. */
|
|
29
|
-
hasTerminal: z.boolean().optional(),
|
|
30
|
-
/** Number of active sessions on this machine. */
|
|
31
|
-
activeSessions: z.number().optional(),
|
|
32
|
-
/** Total number of sessions on this machine. */
|
|
33
|
-
totalSessions: z.number().optional(),
|
|
34
|
-
/** Agent types available on this machine (persisted on each daemon connect). */
|
|
35
|
-
availableAgents: z.array(z.string()).optional(),
|
|
36
|
-
/** Agent versions keyed by agent type name (e.g. { claude: "1.2.3" }). */
|
|
37
|
-
agentVersions: z.record(z.string()).optional(),
|
|
38
|
-
/** RPC methods this machine's daemon has registered (RFC-035). */
|
|
39
|
-
supportedMethods: z.array(z.string()).optional(),
|
|
40
|
-
/** Why the machine disconnected — 'upgrade-required' triggers UI upgrade prompts (RFC-037). */
|
|
41
|
-
disconnectReason: z.enum(['normal', 'upgrade-required']).optional(),
|
|
42
|
-
/** Current upgrade state reported by the daemon (RFC-042). 'ready' = downloaded, swap pending. */
|
|
43
|
-
upgradeStatus: z
|
|
44
|
-
.enum(['idle', 'preflight', 'downloading', 'ready', 'switching', 'failed'])
|
|
45
|
-
.optional(),
|
|
46
|
-
/** Error message when upgradeStatus is 'failed' (RFC-042). */
|
|
47
|
-
upgradeError: z.string().optional(),
|
|
48
|
-
/** True when this machine has been replaced by a new one (container rebuild). */
|
|
49
|
-
superseded: z.boolean().optional(),
|
|
50
|
-
/** Content derivation version: 0=Happy EnCoder (legacy), 1=CCPark EnCoder. */
|
|
51
|
-
derivationVersion: z.number().int().min(0).optional(),
|
|
52
|
-
/** Whether the user has enabled automatic daemon upgrades when idle. */
|
|
53
|
-
autoUpgradeDaemon: z.boolean().optional(),
|
|
54
|
-
/** Last daemon heartbeat timestamp (epoch ms). Updated every 30s while connected. */
|
|
55
|
-
lastHeartbeat: z.number().optional(),
|
|
56
|
-
});
|
|
57
|
-
export const MachineRegisterResultSchema = z.object({
|
|
58
|
-
ok: z.boolean(),
|
|
59
|
-
error: z.string().optional(),
|
|
60
|
-
latestVersion: z.string().optional(),
|
|
61
|
-
labsSettings: LabsSettingsSchema.optional(),
|
|
62
|
-
});
|
|
63
|
-
export const SetDefaultMachineBodySchema = z.object({
|
|
64
|
-
machineId: z.string().nullable(),
|
|
65
|
-
});
|
|
66
|
-
//# sourceMappingURL=machine.js.map
|
|
1
|
+
"use strict";import{z as o}from"zod";import{LabsSettingsSchema as n}from"./rpc.js";export const PlatformSchema=o.enum(["darwin","linux","win32"]),SessionStatusSchema=o.enum(["idle","thinking","tool_running","permission_required","disconnected"]),MachineSummarySchema=o.object({id:o.string(),hostname:o.string(),platform:PlatformSchema,arch:o.string().optional(),displayName:o.string().optional(),daemonVersion:o.string().optional(),active:o.boolean(),activeAt:o.number(),createdAt:o.number(),hasTerminal:o.boolean().optional(),activeSessions:o.number().optional(),totalSessions:o.number().optional(),availableAgents:o.array(o.string()).optional(),agentVersions:o.record(o.string()).optional(),supportedMethods:o.array(o.string()).optional(),disconnectReason:o.enum(["normal","upgrade-required"]).optional(),upgradeStatus:o.enum(["idle","preflight","downloading","ready","switching","failed"]).optional(),upgradeError:o.string().optional(),superseded:o.boolean().optional(),derivationVersion:o.number().int().min(0).optional(),autoUpgradeDaemon:o.boolean().optional(),notifyFeishu:o.boolean().optional(),notifyDingtalk:o.boolean().optional(),lastHeartbeat:o.number().optional()}).passthrough(),MachineRegisterResultSchema=o.object({ok:o.boolean(),error:o.string().optional(),latestVersion:o.string().optional(),labsSettings:n.optional()}).passthrough(),SetDefaultMachineBodySchema=o.object({machineId:o.string().nullable()}).strict();
|
package/dist/messageMeta.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare const CLI_AGENT_TYPES: readonly ["claude", "copilot", "opencode",
|
|
|
11
11
|
export type CliAgentType = (typeof CLI_AGENT_TYPES)[number];
|
|
12
12
|
export declare const MessageMetaSchema: z.ZodObject<{
|
|
13
13
|
sentFrom: z.ZodOptional<z.ZodString>;
|
|
14
|
-
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "auto", "autoEdit", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo", "suggest", "auto-edit", "full-auto"]>>;
|
|
14
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "auto", "autoEdit", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo", "suggest", "auto-edit", "full-auto", "never", "untrusted", "on-failure", "on-request", "build"]>>;
|
|
15
15
|
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
16
|
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
17
|
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -25,33 +25,39 @@ export declare const MessageMetaSchema: z.ZodObject<{
|
|
|
25
25
|
startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
26
26
|
/** Session status for info display. */
|
|
27
27
|
sessionStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<["running", "idle", "completed", "failed", "cancelled"]>>>;
|
|
28
|
-
}, "
|
|
29
|
-
sentFrom
|
|
30
|
-
permissionMode
|
|
31
|
-
model
|
|
32
|
-
fallbackModel
|
|
33
|
-
customSystemPrompt
|
|
34
|
-
appendSystemPrompt
|
|
35
|
-
allowedTools
|
|
36
|
-
disallowedTools
|
|
37
|
-
displayText
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
28
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
29
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
30
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "auto", "autoEdit", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo", "suggest", "auto-edit", "full-auto", "never", "untrusted", "on-failure", "on-request", "build"]>>;
|
|
31
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
35
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
36
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
37
|
+
displayText: z.ZodOptional<z.ZodString>;
|
|
38
|
+
/** Agent type for UI differentiation (avatar, colors). */
|
|
39
|
+
agentType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>>>;
|
|
40
|
+
/** Session start timestamp (Unix ms). */
|
|
41
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
42
|
+
/** Session status for info display. */
|
|
43
|
+
sessionStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<["running", "idle", "completed", "failed", "cancelled"]>>>;
|
|
44
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
45
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
46
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "auto", "autoEdit", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo", "suggest", "auto-edit", "full-auto", "never", "untrusted", "on-failure", "on-request", "build"]>>;
|
|
47
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
52
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
53
|
+
displayText: z.ZodOptional<z.ZodString>;
|
|
54
|
+
/** Agent type for UI differentiation (avatar, colors). */
|
|
55
|
+
agentType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>>>;
|
|
56
|
+
/** Session start timestamp (Unix ms). */
|
|
57
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
58
|
+
/** Session status for info display. */
|
|
59
|
+
sessionStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<["running", "idle", "completed", "failed", "cancelled"]>>>;
|
|
60
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
55
61
|
export type MessageMeta = z.infer<typeof MessageMetaSchema>;
|
|
56
62
|
/** Hardcoded per-agent image support. UX-driven: hides image button immediately on agent selection.
|
|
57
63
|
* Updated when agents add ACP promptCapabilities.image support. */
|
package/dist/messageMeta.js
CHANGED
|
@@ -1,60 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PermissionModeSchema } from './interactionEvents.js';
|
|
3
|
-
/** Supported agent types for avatar and UI differentiation. */
|
|
4
|
-
export const AgentTypeSchema = z.enum([
|
|
5
|
-
'claude',
|
|
6
|
-
'copilot',
|
|
7
|
-
'codex',
|
|
8
|
-
'gemini',
|
|
9
|
-
'opencode',
|
|
10
|
-
'hermes',
|
|
11
|
-
'openclaw',
|
|
12
|
-
'custom',
|
|
13
|
-
]);
|
|
14
|
-
/** All agent type values derived from the schema (single source of truth). */
|
|
15
|
-
export const AGENT_TYPES = AgentTypeSchema.options;
|
|
16
|
-
/** Agent types that can be spawned as sessions (excludes 'custom'). */
|
|
17
|
-
export const SPAWNABLE_AGENTS = AGENT_TYPES.filter((a) => a !== 'custom');
|
|
18
|
-
/** CLI identifiers accepted by spawn-session RPC. */
|
|
19
|
-
export const CLI_AGENT_TYPES = [
|
|
20
|
-
'claude',
|
|
21
|
-
'copilot',
|
|
22
|
-
'opencode',
|
|
23
|
-
'codex',
|
|
24
|
-
'gemini',
|
|
25
|
-
'hermes',
|
|
26
|
-
'openclaw',
|
|
27
|
-
];
|
|
28
|
-
export const MessageMetaSchema = z.object({
|
|
29
|
-
sentFrom: z.string().optional(),
|
|
30
|
-
permissionMode: PermissionModeSchema.optional(),
|
|
31
|
-
model: z.string().nullable().optional(),
|
|
32
|
-
fallbackModel: z.string().nullable().optional(),
|
|
33
|
-
customSystemPrompt: z.string().nullable().optional(),
|
|
34
|
-
appendSystemPrompt: z.string().nullable().optional(),
|
|
35
|
-
allowedTools: z.array(z.string()).nullable().optional(),
|
|
36
|
-
disallowedTools: z.array(z.string()).nullable().optional(),
|
|
37
|
-
displayText: z.string().optional(),
|
|
38
|
-
/** Agent type for UI differentiation (avatar, colors). */
|
|
39
|
-
agentType: AgentTypeSchema.nullable().optional(),
|
|
40
|
-
/** Session start timestamp (Unix ms). */
|
|
41
|
-
startedAt: z.number().nullable().optional(),
|
|
42
|
-
/** Session status for info display. */
|
|
43
|
-
sessionStatus: z
|
|
44
|
-
.enum(['running', 'idle', 'completed', 'failed', 'cancelled'])
|
|
45
|
-
.nullable()
|
|
46
|
-
.optional(),
|
|
47
|
-
});
|
|
48
|
-
/** Hardcoded per-agent image support. UX-driven: hides image button immediately on agent selection.
|
|
49
|
-
* Updated when agents add ACP promptCapabilities.image support. */
|
|
50
|
-
export const AGENT_SUPPORTS_IMAGES = {
|
|
51
|
-
claude: true,
|
|
52
|
-
copilot: true,
|
|
53
|
-
codex: false, // Only supports URL/localPath, not base64
|
|
54
|
-
gemini: true,
|
|
55
|
-
opencode: true,
|
|
56
|
-
hermes: false, // ACP: promptCapabilities.image = false
|
|
57
|
-
openclaw: false, // ACP: promptCapabilities.image = false
|
|
58
|
-
custom: true, // Unknown, assume yes
|
|
59
|
-
};
|
|
60
|
-
//# sourceMappingURL=messageMeta.js.map
|
|
1
|
+
"use strict";import{z as e}from"zod";import{PermissionModeSchema as l}from"./interactionEvents.js";export const AgentTypeSchema=e.enum(["claude","copilot","codex","gemini","opencode","hermes","openclaw","custom"]),AGENT_TYPES=AgentTypeSchema.options,SPAWNABLE_AGENTS=AGENT_TYPES.filter(o=>o!=="custom"),CLI_AGENT_TYPES=["claude","copilot","opencode","codex","gemini","hermes","openclaw"],MessageMetaSchema=e.object({sentFrom:e.string().optional(),permissionMode:l.optional(),model:e.string().nullable().optional(),fallbackModel:e.string().nullable().optional(),customSystemPrompt:e.string().nullable().optional(),appendSystemPrompt:e.string().nullable().optional(),allowedTools:e.array(e.string()).nullable().optional(),disallowedTools:e.array(e.string()).nullable().optional(),displayText:e.string().optional(),agentType:AgentTypeSchema.nullable().optional(),startedAt:e.number().nullable().optional(),sessionStatus:e.enum(["running","idle","completed","failed","cancelled"]).nullable().optional()}).passthrough(),AGENT_SUPPORTS_IMAGES={claude:!0,copilot:!0,codex:!1,gemini:!0,opencode:!0,hermes:!1,openclaw:!1,custom:!0};
|