@agentdock/wire 0.0.47 → 0.0.48
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/README.md +1 -1
- package/dist/envelope.d.ts +1 -1
- package/dist/events.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/legacyProtocol.d.ts +1 -1
- package/dist/license.d.ts +100 -11
- package/dist/license.js +1 -1
- package/dist/machine.d.ts +4 -0
- package/dist/machine.js +1 -1
- package/dist/messages.d.ts +1 -1
- package/dist/pairing.d.ts +10 -0
- package/dist/pairing.js +1 -1
- package/dist/socketEvents.d.ts +2 -0
- package/dist/socketEvents.js +1 -1
- package/dist/sync.d.ts +47 -1
- package/dist/sync.js +1 -1
- package/dist/telemetry.d.ts +9 -9
- package/dist/telemetry.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -146,7 +146,7 @@ pnpm --filter @agentdock/wire typecheck
|
|
|
146
146
|
|
|
147
147
|
## 设计决策
|
|
148
148
|
|
|
149
|
-
-
|
|
149
|
+
- **字段命名规范**:`call`/`name`/`args`(非 `toolId`/`toolName`/`params`),确保协议兼容
|
|
150
150
|
- **cuid2 作为 ID**:`subagent` 字段用 cuid2 验证,`id` 用 `createId()` 生成
|
|
151
151
|
- **Unix number 时间戳**:`time`/`createdAt`/`updatedAt` 都是 Unix 毫秒数,非 ISO string
|
|
152
152
|
- **discriminated union**:`SessionEventSchema` 用 `t` 字段做类型判别,而非 `type`
|
package/dist/envelope.d.ts
CHANGED
package/dist/events.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export { ModelUsageEntrySchema, DailyActivitySchema, DailyModelTokensSchema, Lon
|
|
|
21
21
|
export type { StatsOverview, ClaudeStatsData, ProjectSummary, ModelUsageEntry as WireModelUsageEntry, DailyActivity as WireDailyActivity, LongestSession as WireLongestSession, AgentTypeUsage, ActivityUpload, UsageReport, TokenTrendPoint, ModelBreakdownEntry, QuotaConfig, QuotaStatusSchema, QuotaStatus, } from './stats.js';
|
|
22
22
|
export { ControlLevel } from './controlLevel.js';
|
|
23
23
|
export type { ControlLevelType } from './controlLevel.js';
|
|
24
|
-
export { PairingState, PairingRequestSchema, PairingResponseSchema, PairingExchangeSchema, PairingDeliverSchema, PairingStatusSchema, } from './pairing.js';
|
|
24
|
+
export { PairingState, PairingRequestSchema, PairingResponseSchema, PairingExchangeSchema, PairingDeliverSchema, PairingStatusSchema, parseVersionByte, } from './pairing.js';
|
|
25
25
|
export type { PairingRequest, PairingResponse, PairingExchange, PairingDeliver, PairingStatus, } from './pairing.js';
|
|
26
26
|
export { PlatformSchema, SessionStatusSchema, MachineSummarySchema, MachineRegisterResultSchema, } from './machine.js';
|
|
27
27
|
export type { Platform, SessionStatus, MachineSummary, MachineRegisterResult } from './machine.js';
|
|
@@ -48,8 +48,8 @@ export type { TelemetryEventType, TelemetryEvent, TelemetryReportPayload } from
|
|
|
48
48
|
export * from './checkpointSchemas.js';
|
|
49
49
|
export { OpsRpcMessageSchema, OpsMethodSchema, OpsRpcTypeSchema, FileEntrySchema, FileStatSchema, StorageUsageSchema, SyncUserSchema, SyncFullPayloadSchema, SyncUserCreatedPayloadSchema, SyncContainerStatusPayloadSchema, SyncUserPairedPayloadSchema, type OpsRpcMessage, type OpsMethod, type OpsRpcType, type OpsTunnelMetrics, type FileEntry, type FileStat, type StorageUsage, type SyncUser, type SyncFullPayload, type SyncUserCreatedPayload, type SyncContainerStatusPayload, type SyncUserPairedPayload, } from './ops.js';
|
|
50
50
|
export * from './edition.js';
|
|
51
|
-
export { LicensePayloadSchema, LicenseFileSchema } from './license.js';
|
|
52
|
-
export type { LicensePayload, LicenseFile } from './license.js';
|
|
51
|
+
export { LicensePayloadSchema, LicenseFileSchema, EnterpriseLicenseSchema, PrivateLicenseSchema, } from './license.js';
|
|
52
|
+
export type { LicensePayload, LicenseFile, EnterpriseLicensePayload, PrivateLicensePayload, } from './license.js';
|
|
53
53
|
export { FeedbackTypeSchema, FeedbackStatusSchema, DeviceInfoSchema, MachineSnapshotSchema, CreateFeedbackSchema, UpdateFeedbackSchema, } from './feedback.js';
|
|
54
54
|
export type { FeedbackType, FeedbackStatus, DeviceInfo, MachineSnapshot, CreateFeedback, UpdateFeedback, } from './feedback.js';
|
|
55
55
|
export interface SetupProgress {
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{SessionTextEventSchema,SessionServiceEventSchema,SessionToolCallStartEventSchema,SessionToolCallEndEventSchema,SessionFileEventSchema,SessionTurnStartEventSchema,SessionTurnEndEventSchema,SessionTurnEndStatusSchema,TurnUsageSchema,SessionStartEventSchema,SessionStopEventSchema,SessionEventSchema,SessionPermissionResolvedEventSchema,PermissionActionSchema,SessionImageEventSchema,ImageAttachmentSchema}from"./events.js";export{QuestionOptionSchema,SessionQuestionEventSchema,SessionPermissionRequestEventSchema,SessionAnswerEventSchema,AnswerQuestionParamsSchema,ApprovePermissionParamsSchema,DenyPermissionParamsSchema,PermissionModeSchema}from"./interactionEvents.js";export{SessionRoleSchema,SessionEnvelopeSchema,createEnvelope}from"./envelope.js";export{AgentTypeSchema,MessageMetaSchema,AGENT_TYPES,SPAWNABLE_AGENTS,CLI_AGENT_TYPES}from"./messageMeta.js";export{AGENT_SUPPORTS_IMAGES}from"./messageMeta.js";export{SessionMessageContentSchema,SessionMessageSchema,SessionProtocolMessageSchema,MessageContentSchema}from"./messages.js";export{UserMessageSchema,AgentMessageSchema,LegacyMessageContentSchema}from"./legacyProtocol.js";export{VersionedEncryptedValueSchema,VersionedNullableEncryptedValueSchema,VersionedMachineEncryptedValueSchema,UpdateNewMessageBodySchema,UpdateSessionBodySchema,UpdateMachineBodySchema,UpdateSessionResetBodySchema,CoreUpdateBodySchema,CoreUpdateContainerSchema}from"./sync.js";export{RpcMethod,SESSION_RPC_METHODS,MACHINE_RPC_METHODS,DAEMON_REQUIRED_RPC_METHODS,RpcCallSchema,RpcResultSchema,SpawnSessionParamsSchema,GetMessagesParamsSchema,GetMessagesResponseSchema,MachineInfoResponseSchema,CheckPathParamsSchema,AGENT_ENV_NONE,AgentEnvConfigSchema,AgentSettingsSchema,LabsSettingsSchema,CustomModelSchema,SkillDefinitionSchema}from"./rpc.js";export{AGENT_CAPABILITIES,getAgentCapability,updateDynamicModes,getDynamicModes,normalizeModelId}from"./agentCapabilities.js";export{ModelUsageEntrySchema,DailyActivitySchema,DailyModelTokensSchema,LongestSessionSchema,ClaudeStatsDataSchema,ProjectSummarySchema,StatsOverviewSchema,AgentTypeUsageSchema,ActivityUploadSchema,UsageReportSchema,TokenTrendPointSchema,ModelBreakdownEntrySchema,QuotaConfigSchema}from"./stats.js";export{ControlLevel}from"./controlLevel.js";export{PairingState,PairingRequestSchema,PairingResponseSchema,PairingExchangeSchema,PairingDeliverSchema,PairingStatusSchema}from"./pairing.js";export{PlatformSchema,SessionStatusSchema,MachineSummarySchema,MachineRegisterResultSchema}from"./machine.js";export{FEATURE_REGISTRY,isFeatureAvailable,getUnavailableFeatures,isSubFeatureAvailable,getSubFeatureMinVersion}from"./features.js";export{SessionResultSchema}from"./sessionResult.js";export{SpawnErrorCodeSchema,SpawnErrorSchema,createSpawnError}from"./spawnError.js";export{AGENT_INSTALL_GUIDE}from"./agentInstallGuide.js";export{AGENT_COMMON_ENV_VARS}from"./agentCommonEnv.js";export{RetryPolicySchema,MissedRunPolicySchema,ScheduledSpawnParamsSchema,TaskExecutionStatusSchema,TaskExecutionTriggerSchema,CreateScheduledTaskSchema,UpdateScheduledTaskSchema,ScheduledTaskSummarySchema,TaskExecutionSchema,CRON_RE}from"./scheduledTasks.js";export{PROTOCOL_VERSION}from"./protocol.js";export{parseSemver,compareVersions,satisfiesMin}from"./semver.js";export{createId}from"./utils.js";export{errorMessage}from"./errorMessage.js";export{SOCKET_EVENTS}from"./socketEvents.js";export{TelemetryEventTypeSchema,TelemetryEventSchema,TelemetryReportPayloadSchema,sanitizeContext}from"./telemetry.js";export*from"./checkpointSchemas.js";export{OpsRpcMessageSchema,OpsMethodSchema,OpsRpcTypeSchema,FileEntrySchema,FileStatSchema,StorageUsageSchema,SyncUserSchema,SyncFullPayloadSchema,SyncUserCreatedPayloadSchema,SyncContainerStatusPayloadSchema,SyncUserPairedPayloadSchema}from"./ops.js";export*from"./edition.js";export{LicensePayloadSchema,LicenseFileSchema}from"./license.js";export{FeedbackTypeSchema,FeedbackStatusSchema,DeviceInfoSchema,MachineSnapshotSchema,CreateFeedbackSchema,UpdateFeedbackSchema}from"./feedback.js";
|
|
1
|
+
"use strict";export{SessionTextEventSchema,SessionServiceEventSchema,SessionToolCallStartEventSchema,SessionToolCallEndEventSchema,SessionFileEventSchema,SessionTurnStartEventSchema,SessionTurnEndEventSchema,SessionTurnEndStatusSchema,TurnUsageSchema,SessionStartEventSchema,SessionStopEventSchema,SessionEventSchema,SessionPermissionResolvedEventSchema,PermissionActionSchema,SessionImageEventSchema,ImageAttachmentSchema}from"./events.js";export{QuestionOptionSchema,SessionQuestionEventSchema,SessionPermissionRequestEventSchema,SessionAnswerEventSchema,AnswerQuestionParamsSchema,ApprovePermissionParamsSchema,DenyPermissionParamsSchema,PermissionModeSchema}from"./interactionEvents.js";export{SessionRoleSchema,SessionEnvelopeSchema,createEnvelope}from"./envelope.js";export{AgentTypeSchema,MessageMetaSchema,AGENT_TYPES,SPAWNABLE_AGENTS,CLI_AGENT_TYPES}from"./messageMeta.js";export{AGENT_SUPPORTS_IMAGES}from"./messageMeta.js";export{SessionMessageContentSchema,SessionMessageSchema,SessionProtocolMessageSchema,MessageContentSchema}from"./messages.js";export{UserMessageSchema,AgentMessageSchema,LegacyMessageContentSchema}from"./legacyProtocol.js";export{VersionedEncryptedValueSchema,VersionedNullableEncryptedValueSchema,VersionedMachineEncryptedValueSchema,UpdateNewMessageBodySchema,UpdateSessionBodySchema,UpdateMachineBodySchema,UpdateSessionResetBodySchema,CoreUpdateBodySchema,CoreUpdateContainerSchema}from"./sync.js";export{RpcMethod,SESSION_RPC_METHODS,MACHINE_RPC_METHODS,DAEMON_REQUIRED_RPC_METHODS,RpcCallSchema,RpcResultSchema,SpawnSessionParamsSchema,GetMessagesParamsSchema,GetMessagesResponseSchema,MachineInfoResponseSchema,CheckPathParamsSchema,AGENT_ENV_NONE,AgentEnvConfigSchema,AgentSettingsSchema,LabsSettingsSchema,CustomModelSchema,SkillDefinitionSchema}from"./rpc.js";export{AGENT_CAPABILITIES,getAgentCapability,updateDynamicModes,getDynamicModes,normalizeModelId}from"./agentCapabilities.js";export{ModelUsageEntrySchema,DailyActivitySchema,DailyModelTokensSchema,LongestSessionSchema,ClaudeStatsDataSchema,ProjectSummarySchema,StatsOverviewSchema,AgentTypeUsageSchema,ActivityUploadSchema,UsageReportSchema,TokenTrendPointSchema,ModelBreakdownEntrySchema,QuotaConfigSchema}from"./stats.js";export{ControlLevel}from"./controlLevel.js";export{PairingState,PairingRequestSchema,PairingResponseSchema,PairingExchangeSchema,PairingDeliverSchema,PairingStatusSchema,parseVersionByte}from"./pairing.js";export{PlatformSchema,SessionStatusSchema,MachineSummarySchema,MachineRegisterResultSchema}from"./machine.js";export{FEATURE_REGISTRY,isFeatureAvailable,getUnavailableFeatures,isSubFeatureAvailable,getSubFeatureMinVersion}from"./features.js";export{SessionResultSchema}from"./sessionResult.js";export{SpawnErrorCodeSchema,SpawnErrorSchema,createSpawnError}from"./spawnError.js";export{AGENT_INSTALL_GUIDE}from"./agentInstallGuide.js";export{AGENT_COMMON_ENV_VARS}from"./agentCommonEnv.js";export{RetryPolicySchema,MissedRunPolicySchema,ScheduledSpawnParamsSchema,TaskExecutionStatusSchema,TaskExecutionTriggerSchema,CreateScheduledTaskSchema,UpdateScheduledTaskSchema,ScheduledTaskSummarySchema,TaskExecutionSchema,CRON_RE}from"./scheduledTasks.js";export{PROTOCOL_VERSION}from"./protocol.js";export{parseSemver,compareVersions,satisfiesMin}from"./semver.js";export{createId}from"./utils.js";export{errorMessage}from"./errorMessage.js";export{SOCKET_EVENTS}from"./socketEvents.js";export{TelemetryEventTypeSchema,TelemetryEventSchema,TelemetryReportPayloadSchema,sanitizeContext}from"./telemetry.js";export*from"./checkpointSchemas.js";export{OpsRpcMessageSchema,OpsMethodSchema,OpsRpcTypeSchema,FileEntrySchema,FileStatSchema,StorageUsageSchema,SyncUserSchema,SyncFullPayloadSchema,SyncUserCreatedPayloadSchema,SyncContainerStatusPayloadSchema,SyncUserPairedPayloadSchema}from"./ops.js";export*from"./edition.js";export{LicensePayloadSchema,LicenseFileSchema,EnterpriseLicenseSchema,PrivateLicenseSchema}from"./license.js";export{FeedbackTypeSchema,FeedbackStatusSchema,DeviceInfoSchema,MachineSnapshotSchema,CreateFeedbackSchema,UpdateFeedbackSchema}from"./feedback.js";
|
package/dist/legacyProtocol.d.ts
CHANGED
package/dist/license.d.ts
CHANGED
|
@@ -1,52 +1,141 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const EnterpriseLicenseSchema: z.ZodObject<{
|
|
3
3
|
licensee: z.ZodString;
|
|
4
|
-
edition: z.ZodLiteral<"enterprise">;
|
|
5
|
-
maxUsers: z.ZodNumber;
|
|
6
4
|
expiresAt: z.ZodString;
|
|
7
5
|
issuedAt: z.ZodString;
|
|
6
|
+
} & {
|
|
7
|
+
edition: z.ZodLiteral<"enterprise">;
|
|
8
|
+
maxUsers: z.ZodNumber;
|
|
8
9
|
suffix: z.ZodString;
|
|
9
10
|
}, "strip", z.ZodTypeAny, {
|
|
10
11
|
licensee: string;
|
|
12
|
+
expiresAt: string;
|
|
13
|
+
issuedAt: string;
|
|
11
14
|
edition: "enterprise";
|
|
12
15
|
maxUsers: number;
|
|
16
|
+
suffix: string;
|
|
17
|
+
}, {
|
|
18
|
+
licensee: string;
|
|
13
19
|
expiresAt: string;
|
|
14
20
|
issuedAt: string;
|
|
21
|
+
edition: "enterprise";
|
|
22
|
+
maxUsers: number;
|
|
15
23
|
suffix: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const PrivateLicenseSchema: z.ZodObject<{
|
|
26
|
+
licensee: z.ZodString;
|
|
27
|
+
expiresAt: z.ZodString;
|
|
28
|
+
issuedAt: z.ZodString;
|
|
29
|
+
} & {
|
|
30
|
+
edition: z.ZodLiteral<"personal">;
|
|
31
|
+
domain: z.ZodString;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
licensee: string;
|
|
34
|
+
expiresAt: string;
|
|
35
|
+
issuedAt: string;
|
|
36
|
+
edition: "personal";
|
|
37
|
+
domain: string;
|
|
16
38
|
}, {
|
|
17
39
|
licensee: string;
|
|
40
|
+
expiresAt: string;
|
|
41
|
+
issuedAt: string;
|
|
42
|
+
edition: "personal";
|
|
43
|
+
domain: string;
|
|
44
|
+
}>;
|
|
45
|
+
export declare const LicensePayloadSchema: z.ZodDiscriminatedUnion<"edition", [z.ZodObject<{
|
|
46
|
+
licensee: z.ZodString;
|
|
47
|
+
expiresAt: z.ZodString;
|
|
48
|
+
issuedAt: z.ZodString;
|
|
49
|
+
} & {
|
|
50
|
+
edition: z.ZodLiteral<"enterprise">;
|
|
51
|
+
maxUsers: z.ZodNumber;
|
|
52
|
+
suffix: z.ZodString;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
licensee: string;
|
|
55
|
+
expiresAt: string;
|
|
56
|
+
issuedAt: string;
|
|
18
57
|
edition: "enterprise";
|
|
19
58
|
maxUsers: number;
|
|
59
|
+
suffix: string;
|
|
60
|
+
}, {
|
|
61
|
+
licensee: string;
|
|
20
62
|
expiresAt: string;
|
|
21
63
|
issuedAt: string;
|
|
64
|
+
edition: "enterprise";
|
|
65
|
+
maxUsers: number;
|
|
22
66
|
suffix: string;
|
|
23
|
-
}
|
|
67
|
+
}>, z.ZodObject<{
|
|
68
|
+
licensee: z.ZodString;
|
|
69
|
+
expiresAt: z.ZodString;
|
|
70
|
+
issuedAt: z.ZodString;
|
|
71
|
+
} & {
|
|
72
|
+
edition: z.ZodLiteral<"personal">;
|
|
73
|
+
domain: z.ZodString;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
licensee: string;
|
|
76
|
+
expiresAt: string;
|
|
77
|
+
issuedAt: string;
|
|
78
|
+
edition: "personal";
|
|
79
|
+
domain: string;
|
|
80
|
+
}, {
|
|
81
|
+
licensee: string;
|
|
82
|
+
expiresAt: string;
|
|
83
|
+
issuedAt: string;
|
|
84
|
+
edition: "personal";
|
|
85
|
+
domain: string;
|
|
86
|
+
}>]>;
|
|
24
87
|
export type LicensePayload = z.infer<typeof LicensePayloadSchema>;
|
|
25
|
-
export
|
|
88
|
+
export type EnterpriseLicensePayload = z.infer<typeof EnterpriseLicenseSchema>;
|
|
89
|
+
export type PrivateLicensePayload = z.infer<typeof PrivateLicenseSchema>;
|
|
90
|
+
export declare const LicenseFileSchema: z.ZodDiscriminatedUnion<"edition", [z.ZodObject<{
|
|
26
91
|
licensee: z.ZodString;
|
|
27
|
-
edition: z.ZodLiteral<"enterprise">;
|
|
28
|
-
maxUsers: z.ZodNumber;
|
|
29
92
|
expiresAt: z.ZodString;
|
|
30
93
|
issuedAt: z.ZodString;
|
|
94
|
+
} & {
|
|
95
|
+
edition: z.ZodLiteral<"enterprise">;
|
|
96
|
+
maxUsers: z.ZodNumber;
|
|
31
97
|
suffix: z.ZodString;
|
|
32
98
|
} & {
|
|
33
99
|
signature: z.ZodString;
|
|
34
100
|
}, "strip", z.ZodTypeAny, {
|
|
35
101
|
licensee: string;
|
|
36
|
-
edition: "enterprise";
|
|
37
|
-
maxUsers: number;
|
|
38
102
|
expiresAt: string;
|
|
39
103
|
issuedAt: string;
|
|
104
|
+
edition: "enterprise";
|
|
105
|
+
maxUsers: number;
|
|
40
106
|
suffix: string;
|
|
41
107
|
signature: string;
|
|
42
108
|
}, {
|
|
43
109
|
licensee: string;
|
|
110
|
+
expiresAt: string;
|
|
111
|
+
issuedAt: string;
|
|
44
112
|
edition: "enterprise";
|
|
45
113
|
maxUsers: number;
|
|
114
|
+
suffix: string;
|
|
115
|
+
signature: string;
|
|
116
|
+
}>, z.ZodObject<{
|
|
117
|
+
licensee: z.ZodString;
|
|
118
|
+
expiresAt: z.ZodString;
|
|
119
|
+
issuedAt: z.ZodString;
|
|
120
|
+
} & {
|
|
121
|
+
edition: z.ZodLiteral<"personal">;
|
|
122
|
+
domain: z.ZodString;
|
|
123
|
+
} & {
|
|
124
|
+
signature: z.ZodString;
|
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
licensee: string;
|
|
46
127
|
expiresAt: string;
|
|
47
128
|
issuedAt: string;
|
|
48
|
-
|
|
129
|
+
edition: "personal";
|
|
130
|
+
domain: string;
|
|
49
131
|
signature: string;
|
|
50
|
-
}
|
|
132
|
+
}, {
|
|
133
|
+
licensee: string;
|
|
134
|
+
expiresAt: string;
|
|
135
|
+
issuedAt: string;
|
|
136
|
+
edition: "personal";
|
|
137
|
+
domain: string;
|
|
138
|
+
signature: string;
|
|
139
|
+
}>]>;
|
|
51
140
|
export type LicenseFile = z.infer<typeof LicenseFileSchema>;
|
|
52
141
|
//# sourceMappingURL=license.d.ts.map
|
package/dist/license.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{z as e}from"zod";
|
|
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
|
@@ -40,6 +40,8 @@ export declare const MachineSummarySchema: z.ZodObject<{
|
|
|
40
40
|
upgradeError: z.ZodOptional<z.ZodString>;
|
|
41
41
|
/** True when this machine has been replaced by a new one (container rebuild). */
|
|
42
42
|
superseded: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
/** Content derivation version: 0=Happy EnCoder (legacy), 1=CCPark EnCoder. */
|
|
44
|
+
derivationVersion: z.ZodOptional<z.ZodNumber>;
|
|
43
45
|
}, "strip", z.ZodTypeAny, {
|
|
44
46
|
id: string;
|
|
45
47
|
createdAt: number;
|
|
@@ -60,6 +62,7 @@ export declare const MachineSummarySchema: z.ZodObject<{
|
|
|
60
62
|
upgradeStatus?: "idle" | "failed" | "preflight" | "downloading" | "switching" | undefined;
|
|
61
63
|
upgradeError?: string | undefined;
|
|
62
64
|
superseded?: boolean | undefined;
|
|
65
|
+
derivationVersion?: number | undefined;
|
|
63
66
|
}, {
|
|
64
67
|
id: string;
|
|
65
68
|
createdAt: number;
|
|
@@ -80,6 +83,7 @@ export declare const MachineSummarySchema: z.ZodObject<{
|
|
|
80
83
|
upgradeStatus?: "idle" | "failed" | "preflight" | "downloading" | "switching" | undefined;
|
|
81
84
|
upgradeError?: string | undefined;
|
|
82
85
|
superseded?: boolean | undefined;
|
|
86
|
+
derivationVersion?: number | undefined;
|
|
83
87
|
}>;
|
|
84
88
|
export type MachineSummary = z.infer<typeof MachineSummarySchema>;
|
|
85
89
|
export declare const MachineRegisterResultSchema: z.ZodObject<{
|
package/dist/machine.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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","switching","failed"]).optional(),upgradeError:o.string().optional(),superseded:o.boolean().optional()}),MachineRegisterResultSchema=o.object({ok:o.boolean(),error:o.string().optional(),latestVersion:o.string().optional(),labsSettings:n.optional()}),SetDefaultMachineBodySchema=o.object({machineId:o.string().nullable()});
|
|
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","switching","failed"]).optional(),upgradeError:o.string().optional(),superseded:o.boolean().optional(),derivationVersion:o.number().int().min(0).optional()}),MachineRegisterResultSchema=o.object({ok:o.boolean(),error:o.string().optional(),latestVersion:o.string().optional(),labsSettings:n.optional()}),SetDefaultMachineBodySchema=o.object({machineId:o.string().nullable()});
|
package/dist/messages.d.ts
CHANGED
package/dist/pairing.d.ts
CHANGED
|
@@ -130,4 +130,14 @@ export type PairingResponse = z.infer<typeof PairingResponseSchema>;
|
|
|
130
130
|
export type PairingExchange = z.infer<typeof PairingExchangeSchema>;
|
|
131
131
|
export type PairingDeliver = z.infer<typeof PairingDeliverSchema>;
|
|
132
132
|
export type PairingStatus = z.infer<typeof PairingStatusSchema>;
|
|
133
|
+
/**
|
|
134
|
+
* Parse derivation version from decrypted pairing payload.
|
|
135
|
+
* Version 1+: payload = [version_byte, ...masterSecret] (33 bytes)
|
|
136
|
+
* Version 0 (legacy): payload = masterSecret (32 bytes, no prefix)
|
|
137
|
+
* Returns null for unknown versions or unexpected lengths.
|
|
138
|
+
*/
|
|
139
|
+
export declare function parseVersionByte(rawPayload: Uint8Array): {
|
|
140
|
+
masterSecret: Uint8Array;
|
|
141
|
+
derivationVersion: number;
|
|
142
|
+
} | null;
|
|
133
143
|
//# sourceMappingURL=pairing.d.ts.map
|
package/dist/pairing.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{z as e}from"zod";const o=e.string().regex(/^\d{6}$/,"PIN must be exactly 6 digits");export const PairingState=e.enum(["pending","exchange","authorized","expired"]);function
|
|
1
|
+
"use strict";import{z as e}from"zod";const o=e.string().regex(/^\d{6}$/,"PIN must be exactly 6 digits");export const PairingState=e.enum(["pending","exchange","authorized","expired"]);function a(t,c){if(!/^[A-Za-z0-9+/\-_]+=*$/.test(t))return!1;const i=t.replace(/-/g,"+").replace(/_/g,"/"),r=i.padEnd(i.length+(4-i.length%4)%4,"="),s=(r.match(/=+$/)??[""])[0].length;return r.length/4*3-s===c}const n=e.string().min(1).refine(t=>a(t,32),{message:"publicKey must be a base64-encoded 32-byte Curve25519 key"});export const PairingRequestSchema=e.object({publicKey:n,pin:o.optional(),label:e.string().max(100).optional(),type:e.enum(["join","invite"]).optional()}),PairingResponseSchema=e.object({publicKey:n,encryptedPayload:e.string().min(1)}),PairingExchangeSchema=e.object({daemonPublicKey:n,devicePublicKey:n}),PairingDeliverSchema=e.object({publicKey:n,encryptedPayload:e.string().min(1)});const g=e.object({state:e.literal("pending"),publicKey:e.string().min(1)}),l=e.object({state:e.literal("exchange"),publicKey:e.string().min(1),devicePublicKey:e.string().min(1)}),u=e.object({state:e.literal("authorized"),publicKey:e.string().min(1),encryptedPayload:e.string().min(1),token:e.string().min(1)}),p=e.object({state:e.literal("expired"),publicKey:e.string().min(1)});export const PairingStatusSchema=e.discriminatedUnion("state",[g,l,u,p]);const m=new Set([0,1]);export function parseVersionByte(t){return t.length===33&&t[0]!==void 0?m.has(t[0])?{masterSecret:t.slice(1),derivationVersion:t[0]}:null:t.length===32?{masterSecret:t,derivationVersion:0}:null}
|
package/dist/socketEvents.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare const SOCKET_EVENTS: Readonly<{
|
|
|
13
13
|
readonly EPHEMERAL: "ephemeral";
|
|
14
14
|
readonly ENTERPRISE_ALERT: "enterprise-alert";
|
|
15
15
|
readonly ACTIVITY_PREFERENCES_CHANGED: "activity-preferences-changed";
|
|
16
|
+
readonly IMPROVEMENT_PREFERENCES_CHANGED: "improvement-preferences-changed";
|
|
16
17
|
readonly SESSION_CREATE: "session-create";
|
|
17
18
|
readonly LIST_SESSIONS: "list-sessions";
|
|
18
19
|
readonly UPDATE_METADATA: "update-metadata";
|
|
@@ -21,6 +22,7 @@ export declare const SOCKET_EVENTS: Readonly<{
|
|
|
21
22
|
readonly PROVISION_SESSION_DEK: "provision-session-dek";
|
|
22
23
|
readonly RENAME_SESSION: "rename-session";
|
|
23
24
|
readonly SESSION_END: "session-end";
|
|
25
|
+
readonly SESSION_DELETE: "delete-session";
|
|
24
26
|
readonly SESSION_SUMMARY: "session-summary";
|
|
25
27
|
readonly GET_MESSAGES: "get-messages";
|
|
26
28
|
readonly MESSAGE: "message";
|
package/dist/socketEvents.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export const SOCKET_EVENTS=Object.freeze({SESSION_STATUS:"session-status",PERMISSION_RESOLVED:"permission-resolved",CORE_UPDATE:"core-update",USAGE_REPORT:"usage-report",RPC_REQUEST:"rpc-request",HISTORY_SYNC_RESULT:"history-sync-result",BACKFILL_PROGRESS:"backfill-progress",MACHINE_STATUS_UPDATE:"machine-status-update",DYNAMIC_MODES_UPDATED:"dynamic-modes-updated",TELEMETRY_REPORT:"telemetry-report",UPDATE:"update",EPHEMERAL:"ephemeral",ENTERPRISE_ALERT:"enterprise-alert",ACTIVITY_PREFERENCES_CHANGED:"activity-preferences-changed",SESSION_CREATE:"session-create",LIST_SESSIONS:"list-sessions",UPDATE_METADATA:"update-metadata",UPDATE_STATE:"update-state",SESSION_ALIVE:"session-alive",PROVISION_SESSION_DEK:"provision-session-dek",RENAME_SESSION:"rename-session",SESSION_END:"session-end",SESSION_SUMMARY:"session-summary",GET_MESSAGES:"get-messages",MESSAGE:"message",BATCH_MESSAGE:"batch-message",RPC_REGISTER:"rpc-register",RPC_UNREGISTER:"rpc-unregister",RPC_CALL:"rpc-call",CLIENT_VISIBILITY:"client-visibility",MACHINE_REGISTER:"machine-register",MACHINE_HEARTBEAT:"machine-heartbeat",GET_KNOWN_CLAUDE_SESSIONS:"get-known-claude-sessions",REGISTER_HISTORY_SESSIONS:"register-history-sessions",UPDATE_SYNC_STATUS:"update-sync-status"});
|
|
1
|
+
"use strict";export const SOCKET_EVENTS=Object.freeze({SESSION_STATUS:"session-status",PERMISSION_RESOLVED:"permission-resolved",CORE_UPDATE:"core-update",USAGE_REPORT:"usage-report",RPC_REQUEST:"rpc-request",HISTORY_SYNC_RESULT:"history-sync-result",BACKFILL_PROGRESS:"backfill-progress",MACHINE_STATUS_UPDATE:"machine-status-update",DYNAMIC_MODES_UPDATED:"dynamic-modes-updated",TELEMETRY_REPORT:"telemetry-report",UPDATE:"update",EPHEMERAL:"ephemeral",ENTERPRISE_ALERT:"enterprise-alert",ACTIVITY_PREFERENCES_CHANGED:"activity-preferences-changed",IMPROVEMENT_PREFERENCES_CHANGED:"improvement-preferences-changed",SESSION_CREATE:"session-create",LIST_SESSIONS:"list-sessions",UPDATE_METADATA:"update-metadata",UPDATE_STATE:"update-state",SESSION_ALIVE:"session-alive",PROVISION_SESSION_DEK:"provision-session-dek",RENAME_SESSION:"rename-session",SESSION_END:"session-end",SESSION_DELETE:"delete-session",SESSION_SUMMARY:"session-summary",GET_MESSAGES:"get-messages",MESSAGE:"message",BATCH_MESSAGE:"batch-message",RPC_REGISTER:"rpc-register",RPC_UNREGISTER:"rpc-unregister",RPC_CALL:"rpc-call",CLIENT_VISIBILITY:"client-visibility",MACHINE_REGISTER:"machine-register",MACHINE_HEARTBEAT:"machine-heartbeat",GET_KNOWN_CLAUDE_SESSIONS:"get-known-claude-sessions",REGISTER_HISTORY_SESSIONS:"register-history-sessions",UPDATE_SYNC_STATUS:"update-sync-status"});
|
package/dist/sync.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Sync update protocol
|
|
2
|
+
* Sync update protocol.
|
|
3
3
|
*
|
|
4
4
|
* Defines CoreUpdateContainer and its body types for real-time state sync.
|
|
5
5
|
*/
|
|
@@ -210,6 +210,7 @@ export declare const UpdateMachineBodySchema: z.ZodObject<{
|
|
|
210
210
|
upgradeStatus: z.ZodOptional<z.ZodEnum<["idle", "preflight", "downloading", "switching", "failed"]>>;
|
|
211
211
|
upgradeError: z.ZodOptional<z.ZodString>;
|
|
212
212
|
superseded: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
+
derivationVersion: z.ZodOptional<z.ZodNumber>;
|
|
213
214
|
}, "strip", z.ZodTypeAny, {
|
|
214
215
|
t: "update-machine";
|
|
215
216
|
machineId: string;
|
|
@@ -226,6 +227,7 @@ export declare const UpdateMachineBodySchema: z.ZodObject<{
|
|
|
226
227
|
upgradeStatus?: "idle" | "failed" | "preflight" | "downloading" | "switching" | undefined;
|
|
227
228
|
upgradeError?: string | undefined;
|
|
228
229
|
superseded?: boolean | undefined;
|
|
230
|
+
derivationVersion?: number | undefined;
|
|
229
231
|
metadata?: {
|
|
230
232
|
value: string;
|
|
231
233
|
version: number;
|
|
@@ -250,6 +252,7 @@ export declare const UpdateMachineBodySchema: z.ZodObject<{
|
|
|
250
252
|
upgradeStatus?: "idle" | "failed" | "preflight" | "downloading" | "switching" | undefined;
|
|
251
253
|
upgradeError?: string | undefined;
|
|
252
254
|
superseded?: boolean | undefined;
|
|
255
|
+
derivationVersion?: number | undefined;
|
|
253
256
|
metadata?: {
|
|
254
257
|
value: string;
|
|
255
258
|
version: number;
|
|
@@ -271,6 +274,17 @@ export declare const UpdateSessionResetBodySchema: z.ZodObject<{
|
|
|
271
274
|
sessionId: string;
|
|
272
275
|
}>;
|
|
273
276
|
export type UpdateSessionResetBody = z.infer<typeof UpdateSessionResetBodySchema>;
|
|
277
|
+
export declare const UpdateDeleteSessionBodySchema: z.ZodObject<{
|
|
278
|
+
t: z.ZodLiteral<"delete-session">;
|
|
279
|
+
id: z.ZodString;
|
|
280
|
+
}, "strip", z.ZodTypeAny, {
|
|
281
|
+
t: "delete-session";
|
|
282
|
+
id: string;
|
|
283
|
+
}, {
|
|
284
|
+
t: "delete-session";
|
|
285
|
+
id: string;
|
|
286
|
+
}>;
|
|
287
|
+
export type UpdateDeleteSessionBody = z.infer<typeof UpdateDeleteSessionBodySchema>;
|
|
274
288
|
export declare const CoreUpdateBodySchema: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
|
|
275
289
|
t: z.ZodLiteral<"new-message">;
|
|
276
290
|
sid: z.ZodString;
|
|
@@ -440,6 +454,7 @@ export declare const CoreUpdateBodySchema: z.ZodDiscriminatedUnion<"t", [z.ZodOb
|
|
|
440
454
|
upgradeStatus: z.ZodOptional<z.ZodEnum<["idle", "preflight", "downloading", "switching", "failed"]>>;
|
|
441
455
|
upgradeError: z.ZodOptional<z.ZodString>;
|
|
442
456
|
superseded: z.ZodOptional<z.ZodBoolean>;
|
|
457
|
+
derivationVersion: z.ZodOptional<z.ZodNumber>;
|
|
443
458
|
}, "strip", z.ZodTypeAny, {
|
|
444
459
|
t: "update-machine";
|
|
445
460
|
machineId: string;
|
|
@@ -456,6 +471,7 @@ export declare const CoreUpdateBodySchema: z.ZodDiscriminatedUnion<"t", [z.ZodOb
|
|
|
456
471
|
upgradeStatus?: "idle" | "failed" | "preflight" | "downloading" | "switching" | undefined;
|
|
457
472
|
upgradeError?: string | undefined;
|
|
458
473
|
superseded?: boolean | undefined;
|
|
474
|
+
derivationVersion?: number | undefined;
|
|
459
475
|
metadata?: {
|
|
460
476
|
value: string;
|
|
461
477
|
version: number;
|
|
@@ -480,6 +496,7 @@ export declare const CoreUpdateBodySchema: z.ZodDiscriminatedUnion<"t", [z.ZodOb
|
|
|
480
496
|
upgradeStatus?: "idle" | "failed" | "preflight" | "downloading" | "switching" | undefined;
|
|
481
497
|
upgradeError?: string | undefined;
|
|
482
498
|
superseded?: boolean | undefined;
|
|
499
|
+
derivationVersion?: number | undefined;
|
|
483
500
|
metadata?: {
|
|
484
501
|
value: string;
|
|
485
502
|
version: number;
|
|
@@ -497,6 +514,15 @@ export declare const CoreUpdateBodySchema: z.ZodDiscriminatedUnion<"t", [z.ZodOb
|
|
|
497
514
|
}, {
|
|
498
515
|
t: "session-reset";
|
|
499
516
|
sessionId: string;
|
|
517
|
+
}>, z.ZodObject<{
|
|
518
|
+
t: z.ZodLiteral<"delete-session">;
|
|
519
|
+
id: z.ZodString;
|
|
520
|
+
}, "strip", z.ZodTypeAny, {
|
|
521
|
+
t: "delete-session";
|
|
522
|
+
id: string;
|
|
523
|
+
}, {
|
|
524
|
+
t: "delete-session";
|
|
525
|
+
id: string;
|
|
500
526
|
}>]>;
|
|
501
527
|
export type CoreUpdateBody = z.infer<typeof CoreUpdateBodySchema>;
|
|
502
528
|
export declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
@@ -671,6 +697,7 @@ export declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
671
697
|
upgradeStatus: z.ZodOptional<z.ZodEnum<["idle", "preflight", "downloading", "switching", "failed"]>>;
|
|
672
698
|
upgradeError: z.ZodOptional<z.ZodString>;
|
|
673
699
|
superseded: z.ZodOptional<z.ZodBoolean>;
|
|
700
|
+
derivationVersion: z.ZodOptional<z.ZodNumber>;
|
|
674
701
|
}, "strip", z.ZodTypeAny, {
|
|
675
702
|
t: "update-machine";
|
|
676
703
|
machineId: string;
|
|
@@ -687,6 +714,7 @@ export declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
687
714
|
upgradeStatus?: "idle" | "failed" | "preflight" | "downloading" | "switching" | undefined;
|
|
688
715
|
upgradeError?: string | undefined;
|
|
689
716
|
superseded?: boolean | undefined;
|
|
717
|
+
derivationVersion?: number | undefined;
|
|
690
718
|
metadata?: {
|
|
691
719
|
value: string;
|
|
692
720
|
version: number;
|
|
@@ -711,6 +739,7 @@ export declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
711
739
|
upgradeStatus?: "idle" | "failed" | "preflight" | "downloading" | "switching" | undefined;
|
|
712
740
|
upgradeError?: string | undefined;
|
|
713
741
|
superseded?: boolean | undefined;
|
|
742
|
+
derivationVersion?: number | undefined;
|
|
714
743
|
metadata?: {
|
|
715
744
|
value: string;
|
|
716
745
|
version: number;
|
|
@@ -728,6 +757,15 @@ export declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
728
757
|
}, {
|
|
729
758
|
t: "session-reset";
|
|
730
759
|
sessionId: string;
|
|
760
|
+
}>, z.ZodObject<{
|
|
761
|
+
t: z.ZodLiteral<"delete-session">;
|
|
762
|
+
id: z.ZodString;
|
|
763
|
+
}, "strip", z.ZodTypeAny, {
|
|
764
|
+
t: "delete-session";
|
|
765
|
+
id: string;
|
|
766
|
+
}, {
|
|
767
|
+
t: "delete-session";
|
|
768
|
+
id: string;
|
|
731
769
|
}>]>;
|
|
732
770
|
createdAt: z.ZodNumber;
|
|
733
771
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -781,6 +819,7 @@ export declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
781
819
|
upgradeStatus?: "idle" | "failed" | "preflight" | "downloading" | "switching" | undefined;
|
|
782
820
|
upgradeError?: string | undefined;
|
|
783
821
|
superseded?: boolean | undefined;
|
|
822
|
+
derivationVersion?: number | undefined;
|
|
784
823
|
metadata?: {
|
|
785
824
|
value: string;
|
|
786
825
|
version: number;
|
|
@@ -792,6 +831,9 @@ export declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
792
831
|
} | {
|
|
793
832
|
t: "session-reset";
|
|
794
833
|
sessionId: string;
|
|
834
|
+
} | {
|
|
835
|
+
t: "delete-session";
|
|
836
|
+
id: string;
|
|
795
837
|
};
|
|
796
838
|
}, {
|
|
797
839
|
id: string;
|
|
@@ -844,6 +886,7 @@ export declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
844
886
|
upgradeStatus?: "idle" | "failed" | "preflight" | "downloading" | "switching" | undefined;
|
|
845
887
|
upgradeError?: string | undefined;
|
|
846
888
|
superseded?: boolean | undefined;
|
|
889
|
+
derivationVersion?: number | undefined;
|
|
847
890
|
metadata?: {
|
|
848
891
|
value: string;
|
|
849
892
|
version: number;
|
|
@@ -855,6 +898,9 @@ export declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
855
898
|
} | {
|
|
856
899
|
t: "session-reset";
|
|
857
900
|
sessionId: string;
|
|
901
|
+
} | {
|
|
902
|
+
t: "delete-session";
|
|
903
|
+
id: string;
|
|
858
904
|
};
|
|
859
905
|
}>;
|
|
860
906
|
export type CoreUpdateContainer = z.infer<typeof CoreUpdateContainerSchema>;
|
package/dist/sync.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{z as e}from"zod";import{SessionMessageSchema as t}from"./messages.js";import{PlatformSchema as o}from"./machine.js";export const VersionedEncryptedValueSchema=e.object({version:e.number(),value:e.string()}),VersionedNullableEncryptedValueSchema=e.object({version:e.number(),value:e.string().nullable()}),VersionedMachineEncryptedValueSchema=e.object({version:e.number(),value:e.string()}),UpdateNewMessageBodySchema=e.object({t:e.literal("new-message"),sid:e.string(),message:t}),UpdateSessionBodySchema=e.object({t:e.literal("update-session"),id:e.string(),tag:e.string().optional(),displayName:e.string().nullish(),machineId:e.string().optional(),metadata:VersionedEncryptedValueSchema.nullish(),agentState:VersionedNullableEncryptedValueSchema.nullish(),active:e.boolean().optional(),source:e.enum(["managed","history","scheduled"]).optional(),dataEncryptionKey:e.string().nullish()}),UpdateMachineBodySchema=e.object({t:e.literal("update-machine"),machineId:e.string(),metadata:VersionedMachineEncryptedValueSchema.nullish(),daemonState:VersionedMachineEncryptedValueSchema.nullish(),active:e.boolean().optional(),activeAt:e.number().optional(),hostname:e.string().optional(),platform:o.optional(),arch:e.string().optional(),daemonVersion:e.string().optional(),displayName:e.string().optional(),availableAgents:e.array(e.string()).optional(),supportedMethods:e.array(e.string()).optional(),disconnectReason:e.enum(["normal","upgrade-required"]).optional(),upgradeStatus:e.enum(["idle","preflight","downloading","switching","failed"]).optional(),upgradeError:e.string().optional(),superseded:e.boolean().optional()}),UpdateSessionResetBodySchema=e.object({t:e.literal("session-reset"),sessionId:e.string()}),CoreUpdateBodySchema=e.discriminatedUnion("t",[UpdateNewMessageBodySchema,UpdateSessionBodySchema,UpdateMachineBodySchema,UpdateSessionResetBodySchema]),CoreUpdateContainerSchema=e.object({id:e.string(),seq:e.number(),body:CoreUpdateBodySchema,createdAt:e.number()});
|
|
1
|
+
"use strict";import{z as e}from"zod";import{SessionMessageSchema as t}from"./messages.js";import{PlatformSchema as o}from"./machine.js";export const VersionedEncryptedValueSchema=e.object({version:e.number(),value:e.string()}),VersionedNullableEncryptedValueSchema=e.object({version:e.number(),value:e.string().nullable()}),VersionedMachineEncryptedValueSchema=e.object({version:e.number(),value:e.string()}),UpdateNewMessageBodySchema=e.object({t:e.literal("new-message"),sid:e.string(),message:t}),UpdateSessionBodySchema=e.object({t:e.literal("update-session"),id:e.string(),tag:e.string().optional(),displayName:e.string().nullish(),machineId:e.string().optional(),metadata:VersionedEncryptedValueSchema.nullish(),agentState:VersionedNullableEncryptedValueSchema.nullish(),active:e.boolean().optional(),source:e.enum(["managed","history","scheduled"]).optional(),dataEncryptionKey:e.string().nullish()}),UpdateMachineBodySchema=e.object({t:e.literal("update-machine"),machineId:e.string(),metadata:VersionedMachineEncryptedValueSchema.nullish(),daemonState:VersionedMachineEncryptedValueSchema.nullish(),active:e.boolean().optional(),activeAt:e.number().optional(),hostname:e.string().optional(),platform:o.optional(),arch:e.string().optional(),daemonVersion:e.string().optional(),displayName:e.string().optional(),availableAgents:e.array(e.string()).optional(),supportedMethods:e.array(e.string()).optional(),disconnectReason:e.enum(["normal","upgrade-required"]).optional(),upgradeStatus:e.enum(["idle","preflight","downloading","switching","failed"]).optional(),upgradeError:e.string().optional(),superseded:e.boolean().optional(),derivationVersion:e.number().int().min(0).optional()}),UpdateSessionResetBodySchema=e.object({t:e.literal("session-reset"),sessionId:e.string()}),UpdateDeleteSessionBodySchema=e.object({t:e.literal("delete-session"),id:e.string()}),CoreUpdateBodySchema=e.discriminatedUnion("t",[UpdateNewMessageBodySchema,UpdateSessionBodySchema,UpdateMachineBodySchema,UpdateSessionResetBodySchema,UpdateDeleteSessionBodySchema]),CoreUpdateContainerSchema=e.object({id:e.string(),seq:e.number(),body:CoreUpdateBodySchema,createdAt:e.number()});
|
package/dist/telemetry.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const TelemetryEventTypeSchema: z.ZodEnum<["scanner.format_mismatch", "scanner.parse_error", "scanner.version_unknown", "session.start_failed", "session.crash", "rpc.call_failed", "upgrade.failed", "protocol.incompatible"]>;
|
|
2
|
+
export declare const TelemetryEventTypeSchema: z.ZodEnum<["scanner.format_mismatch", "scanner.parse_error", "scanner.version_unknown", "session.start_failed", "session.crash", "rpc.call_failed", "upgrade.failed", "protocol.incompatible", "daemon.log", "daemon.crash"]>;
|
|
3
3
|
export type TelemetryEventType = z.infer<typeof TelemetryEventTypeSchema>;
|
|
4
4
|
export declare function sanitizeContext(type: TelemetryEventType, ctx: Record<string, unknown> | undefined): Record<string, unknown> | undefined;
|
|
5
5
|
export declare const TelemetryEventSchema: z.ZodObject<{
|
|
6
|
-
type: z.ZodEnum<["scanner.format_mismatch", "scanner.parse_error", "scanner.version_unknown", "session.start_failed", "session.crash", "rpc.call_failed", "upgrade.failed", "protocol.incompatible"]>;
|
|
6
|
+
type: z.ZodEnum<["scanner.format_mismatch", "scanner.parse_error", "scanner.version_unknown", "session.start_failed", "session.crash", "rpc.call_failed", "upgrade.failed", "protocol.incompatible", "daemon.log", "daemon.crash"]>;
|
|
7
7
|
timestamp: z.ZodString;
|
|
8
8
|
agentType: z.ZodOptional<z.ZodString>;
|
|
9
9
|
agentVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -14,7 +14,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
15
|
code: string;
|
|
16
16
|
message: string;
|
|
17
|
-
type: "scanner.format_mismatch" | "scanner.parse_error" | "scanner.version_unknown" | "session.start_failed" | "session.crash" | "rpc.call_failed" | "upgrade.failed" | "protocol.incompatible";
|
|
17
|
+
type: "scanner.format_mismatch" | "scanner.parse_error" | "scanner.version_unknown" | "session.start_failed" | "session.crash" | "rpc.call_failed" | "upgrade.failed" | "protocol.incompatible" | "daemon.log" | "daemon.crash";
|
|
18
18
|
daemonVersion: string;
|
|
19
19
|
timestamp: string;
|
|
20
20
|
agentType?: string | undefined;
|
|
@@ -23,7 +23,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
23
23
|
}, {
|
|
24
24
|
code: string;
|
|
25
25
|
message: string;
|
|
26
|
-
type: "scanner.format_mismatch" | "scanner.parse_error" | "scanner.version_unknown" | "session.start_failed" | "session.crash" | "rpc.call_failed" | "upgrade.failed" | "protocol.incompatible";
|
|
26
|
+
type: "scanner.format_mismatch" | "scanner.parse_error" | "scanner.version_unknown" | "session.start_failed" | "session.crash" | "rpc.call_failed" | "upgrade.failed" | "protocol.incompatible" | "daemon.log" | "daemon.crash";
|
|
27
27
|
daemonVersion: string;
|
|
28
28
|
timestamp: string;
|
|
29
29
|
agentType?: string | undefined;
|
|
@@ -34,7 +34,7 @@ export type TelemetryEvent = z.infer<typeof TelemetryEventSchema>;
|
|
|
34
34
|
export declare const TelemetryReportPayloadSchema: z.ZodObject<{
|
|
35
35
|
machineId: z.ZodString;
|
|
36
36
|
events: z.ZodArray<z.ZodObject<{
|
|
37
|
-
type: z.ZodEnum<["scanner.format_mismatch", "scanner.parse_error", "scanner.version_unknown", "session.start_failed", "session.crash", "rpc.call_failed", "upgrade.failed", "protocol.incompatible"]>;
|
|
37
|
+
type: z.ZodEnum<["scanner.format_mismatch", "scanner.parse_error", "scanner.version_unknown", "session.start_failed", "session.crash", "rpc.call_failed", "upgrade.failed", "protocol.incompatible", "daemon.log", "daemon.crash"]>;
|
|
38
38
|
timestamp: z.ZodString;
|
|
39
39
|
agentType: z.ZodOptional<z.ZodString>;
|
|
40
40
|
agentVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -45,7 +45,7 @@ export declare const TelemetryReportPayloadSchema: z.ZodObject<{
|
|
|
45
45
|
}, "strip", z.ZodTypeAny, {
|
|
46
46
|
code: string;
|
|
47
47
|
message: string;
|
|
48
|
-
type: "scanner.format_mismatch" | "scanner.parse_error" | "scanner.version_unknown" | "session.start_failed" | "session.crash" | "rpc.call_failed" | "upgrade.failed" | "protocol.incompatible";
|
|
48
|
+
type: "scanner.format_mismatch" | "scanner.parse_error" | "scanner.version_unknown" | "session.start_failed" | "session.crash" | "rpc.call_failed" | "upgrade.failed" | "protocol.incompatible" | "daemon.log" | "daemon.crash";
|
|
49
49
|
daemonVersion: string;
|
|
50
50
|
timestamp: string;
|
|
51
51
|
agentType?: string | undefined;
|
|
@@ -54,7 +54,7 @@ export declare const TelemetryReportPayloadSchema: z.ZodObject<{
|
|
|
54
54
|
}, {
|
|
55
55
|
code: string;
|
|
56
56
|
message: string;
|
|
57
|
-
type: "scanner.format_mismatch" | "scanner.parse_error" | "scanner.version_unknown" | "session.start_failed" | "session.crash" | "rpc.call_failed" | "upgrade.failed" | "protocol.incompatible";
|
|
57
|
+
type: "scanner.format_mismatch" | "scanner.parse_error" | "scanner.version_unknown" | "session.start_failed" | "session.crash" | "rpc.call_failed" | "upgrade.failed" | "protocol.incompatible" | "daemon.log" | "daemon.crash";
|
|
58
58
|
daemonVersion: string;
|
|
59
59
|
timestamp: string;
|
|
60
60
|
agentType?: string | undefined;
|
|
@@ -66,7 +66,7 @@ export declare const TelemetryReportPayloadSchema: z.ZodObject<{
|
|
|
66
66
|
events: {
|
|
67
67
|
code: string;
|
|
68
68
|
message: string;
|
|
69
|
-
type: "scanner.format_mismatch" | "scanner.parse_error" | "scanner.version_unknown" | "session.start_failed" | "session.crash" | "rpc.call_failed" | "upgrade.failed" | "protocol.incompatible";
|
|
69
|
+
type: "scanner.format_mismatch" | "scanner.parse_error" | "scanner.version_unknown" | "session.start_failed" | "session.crash" | "rpc.call_failed" | "upgrade.failed" | "protocol.incompatible" | "daemon.log" | "daemon.crash";
|
|
70
70
|
daemonVersion: string;
|
|
71
71
|
timestamp: string;
|
|
72
72
|
agentType?: string | undefined;
|
|
@@ -78,7 +78,7 @@ export declare const TelemetryReportPayloadSchema: z.ZodObject<{
|
|
|
78
78
|
events: {
|
|
79
79
|
code: string;
|
|
80
80
|
message: string;
|
|
81
|
-
type: "scanner.format_mismatch" | "scanner.parse_error" | "scanner.version_unknown" | "session.start_failed" | "session.crash" | "rpc.call_failed" | "upgrade.failed" | "protocol.incompatible";
|
|
81
|
+
type: "scanner.format_mismatch" | "scanner.parse_error" | "scanner.version_unknown" | "session.start_failed" | "session.crash" | "rpc.call_failed" | "upgrade.failed" | "protocol.incompatible" | "daemon.log" | "daemon.crash";
|
|
82
82
|
daemonVersion: string;
|
|
83
83
|
timestamp: string;
|
|
84
84
|
agentType?: string | undefined;
|
package/dist/telemetry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{z as e}from"zod";export const TelemetryEventTypeSchema=e.enum(["scanner.format_mismatch","scanner.parse_error","scanner.version_unknown","session.start_failed","session.crash","rpc.call_failed","upgrade.failed","protocol.incompatible"]);const
|
|
1
|
+
"use strict";import{z as e}from"zod";export const TelemetryEventTypeSchema=e.enum(["scanner.format_mismatch","scanner.parse_error","scanner.version_unknown","session.start_failed","session.crash","rpc.call_failed","upgrade.failed","protocol.incompatible","daemon.log","daemon.crash"]);const d={"scanner.format_mismatch":["filePath","totalLines","parsedLines","errorCount","unknownLines","samples"],"scanner.parse_error":["filePath","totalLines","errorCount","error","lineNumber"],"scanner.version_unknown":["detectedVersion","supportedRange"],"session.start_failed":["cwd","agentBinary","exitCode","stderr"],"session.crash":["exitCode","signal","stderr","agentType","sessionId","pid","durationMs"],"rpc.call_failed":["method","error"],"upgrade.failed":["fromVersion","toVersion","stage","error"],"protocol.incompatible":["clientVersion","serverVersion","minRequired"],"daemon.log":["module","hostname","platform","arch","stack"],"daemon.crash":["crashType","hostname","platform","arch","stack"]},c=/\b(?:\d{1,3}\.){3}\d{1,3}\b|[\w.+-]+@[\w.-]+\.\w+|\b(?:Bearer|token|sk-|api[_-]?key)\s*[:=]?\s*\S+/gi;function a(r){if(typeof r=="string")return r.replace(c,"[REDACTED]");if(Array.isArray(r))return r.map(a);if(typeof r=="number"||typeof r=="boolean"||r===null)return r}export function sanitizeContext(r,t){if(!t)return;const s=d[r];if(!s)return;const n={};for(const o of s)if(o in t){const i=a(t[o]);i!==void 0&&(n[o]=i)}return typeof n.stderr=="string"&&n.stderr.length>500&&(n.stderr=n.stderr.slice(0,500)),Object.keys(n).length>0?n:void 0}export const TelemetryEventSchema=e.object({type:TelemetryEventTypeSchema,timestamp:e.string(),agentType:e.string().optional(),agentVersion:e.string().optional(),daemonVersion:e.string(),code:e.string(),message:e.string(),context:e.record(e.unknown()).optional()}),TelemetryReportPayloadSchema=e.object({machineId:e.string(),events:e.array(TelemetryEventSchema).max(100)});
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentdock/wire",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.48",
|
|
4
4
|
"description": "Protocol definitions for AgentDock — Zod schemas, message formats, RPC types",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
-
"author": "
|
|
6
|
+
"author": "CCPark",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|