@agentdock/wire 0.0.92 → 0.0.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/accountLanguage.d.ts +32 -0
  2. package/dist/accountLanguage.js +1 -0
  3. package/dist/agentCapabilities.d.ts +26 -0
  4. package/dist/agentCapabilities.js +1 -1
  5. package/dist/agentRuntimeSettings.d.ts +140 -0
  6. package/dist/agentRuntimeSettings.js +1 -0
  7. package/dist/enterpriseGateway.d.ts +215 -0
  8. package/dist/enterpriseGateway.js +1 -0
  9. package/dist/envelope.d.ts +45 -30
  10. package/dist/events.d.ts +24 -12
  11. package/dist/events.js +1 -1
  12. package/dist/features.d.ts +7 -3
  13. package/dist/features.js +1 -1
  14. package/dist/feedback.d.ts +18 -18
  15. package/dist/gateway.d.ts +386 -0
  16. package/dist/gateway.js +1 -0
  17. package/dist/handoffBrief.d.ts +14 -0
  18. package/dist/handoffBrief.js +52 -0
  19. package/dist/inboundEvents.d.ts +70 -0
  20. package/dist/inboundEvents.js +1 -1
  21. package/dist/index.d.ts +20 -12
  22. package/dist/index.js +1 -1
  23. package/dist/interactionEvents.d.ts +2 -2
  24. package/dist/legacyProtocol.d.ts +36 -36
  25. package/dist/machine.d.ts +9 -0
  26. package/dist/machine.js +1 -1
  27. package/dist/messageMeta.d.ts +6 -4
  28. package/dist/messageMeta.js +1 -1
  29. package/dist/messages.d.ts +338 -216
  30. package/dist/messages.js +1 -1
  31. package/dist/notification.d.ts +1 -1
  32. package/dist/notification.js +1 -1
  33. package/dist/rpc.d.ts +884 -84
  34. package/dist/rpc.js +1 -1
  35. package/dist/scheduledTasks.d.ts +50 -50
  36. package/dist/sessionBtw.d.ts +153 -0
  37. package/dist/sessionBtw.js +1 -0
  38. package/dist/sessionTitle.d.ts +16 -0
  39. package/dist/sessionTitle.js +1 -0
  40. package/dist/socketEvents.d.ts +9 -0
  41. package/dist/socketEvents.js +1 -1
  42. package/dist/sourceMetadata.d.ts +2 -2
  43. package/dist/stats.d.ts +87 -49
  44. package/dist/stats.js +1 -1
  45. package/dist/sync.d.ts +315 -0
  46. package/dist/sync.js +1 -1
  47. package/dist/workItems.d.ts +345 -0
  48. package/dist/workItems.js +1 -0
  49. package/package.json +1 -1
package/dist/events.d.ts CHANGED
@@ -1070,22 +1070,28 @@ export declare const SessionContextUsageEventSchema: z.ZodObject<{
1070
1070
  /** Real-time compact boundary from Claude CLI after context compaction. */
1071
1071
  export declare const SessionCompactBoundaryEventSchema: z.ZodObject<{
1072
1072
  t: z.ZodLiteral<"compact-boundary">;
1073
- trigger: z.ZodEnum<["manual", "auto"]>;
1074
- preTokens: z.ZodNumber;
1073
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
1074
+ preTokens: z.ZodOptional<z.ZodNumber>;
1075
1075
  postTokens: z.ZodOptional<z.ZodNumber>;
1076
1076
  durationMs: z.ZodOptional<z.ZodNumber>;
1077
+ /** Claude's compacted context. The containing envelope is E2EE encrypted. */
1078
+ summary: z.ZodOptional<z.ZodString>;
1077
1079
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1078
1080
  t: z.ZodLiteral<"compact-boundary">;
1079
- trigger: z.ZodEnum<["manual", "auto"]>;
1080
- preTokens: z.ZodNumber;
1081
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
1082
+ preTokens: z.ZodOptional<z.ZodNumber>;
1081
1083
  postTokens: z.ZodOptional<z.ZodNumber>;
1082
1084
  durationMs: z.ZodOptional<z.ZodNumber>;
1085
+ /** Claude's compacted context. The containing envelope is E2EE encrypted. */
1086
+ summary: z.ZodOptional<z.ZodString>;
1083
1087
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1084
1088
  t: z.ZodLiteral<"compact-boundary">;
1085
- trigger: z.ZodEnum<["manual", "auto"]>;
1086
- preTokens: z.ZodNumber;
1089
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
1090
+ preTokens: z.ZodOptional<z.ZodNumber>;
1087
1091
  postTokens: z.ZodOptional<z.ZodNumber>;
1088
1092
  durationMs: z.ZodOptional<z.ZodNumber>;
1093
+ /** Claude's compacted context. The containing envelope is E2EE encrypted. */
1094
+ summary: z.ZodOptional<z.ZodString>;
1089
1095
  }, z.ZodTypeAny, "passthrough">>;
1090
1096
  export declare const SessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
1091
1097
  t: z.ZodLiteral<"text">;
@@ -2220,22 +2226,28 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObje
2220
2226
  }, z.ZodTypeAny, "passthrough">>>;
2221
2227
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
2222
2228
  t: z.ZodLiteral<"compact-boundary">;
2223
- trigger: z.ZodEnum<["manual", "auto"]>;
2224
- preTokens: z.ZodNumber;
2229
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
2230
+ preTokens: z.ZodOptional<z.ZodNumber>;
2225
2231
  postTokens: z.ZodOptional<z.ZodNumber>;
2226
2232
  durationMs: z.ZodOptional<z.ZodNumber>;
2233
+ /** Claude's compacted context. The containing envelope is E2EE encrypted. */
2234
+ summary: z.ZodOptional<z.ZodString>;
2227
2235
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2228
2236
  t: z.ZodLiteral<"compact-boundary">;
2229
- trigger: z.ZodEnum<["manual", "auto"]>;
2230
- preTokens: z.ZodNumber;
2237
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
2238
+ preTokens: z.ZodOptional<z.ZodNumber>;
2231
2239
  postTokens: z.ZodOptional<z.ZodNumber>;
2232
2240
  durationMs: z.ZodOptional<z.ZodNumber>;
2241
+ /** Claude's compacted context. The containing envelope is E2EE encrypted. */
2242
+ summary: z.ZodOptional<z.ZodString>;
2233
2243
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2234
2244
  t: z.ZodLiteral<"compact-boundary">;
2235
- trigger: z.ZodEnum<["manual", "auto"]>;
2236
- preTokens: z.ZodNumber;
2245
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
2246
+ preTokens: z.ZodOptional<z.ZodNumber>;
2237
2247
  postTokens: z.ZodOptional<z.ZodNumber>;
2238
2248
  durationMs: z.ZodOptional<z.ZodNumber>;
2249
+ /** Claude's compacted context. The containing envelope is E2EE encrypted. */
2250
+ summary: z.ZodOptional<z.ZodString>;
2239
2251
  }, z.ZodTypeAny, "passthrough">>]>;
2240
2252
  export type SessionEvent = z.infer<typeof SessionEventSchema>;
2241
2253
  /** Real-time context window usage breakdown. */
package/dist/events.js CHANGED
@@ -1 +1 @@
1
- "use strict";import{z as e}from"zod";import{SessionQuestionEventSchema as o,SessionPermissionRequestEventSchema as s,SessionAnswerEventSchema as r,SessionPermissionResolvedEventSchema as a}from"./interactionEvents.js";export const SessionTextEventSchema=e.object({t:e.literal("text"),text:e.string(),thinking:e.boolean().optional(),images:e.array(e.object({data:e.string(),mediaType:e.string()})).optional()}).passthrough(),SessionServiceEventSchema=e.object({t:e.literal("service"),text:e.string()}).passthrough(),SessionToolCallStartEventSchema=e.object({t:e.literal("tool-call-start"),call:e.string(),name:e.string(),title:e.string(),description:e.string(),args:e.record(e.string(),e.unknown())}).passthrough(),SessionToolCallEndEventSchema=e.object({t:e.literal("tool-call-end"),call:e.string(),result:e.string().optional(),error:e.boolean().optional()}).passthrough(),SessionFileEventSchema=e.object({t:e.literal("file"),ref:e.string(),name:e.string(),size:e.number(),image:e.object({width:e.number(),height:e.number(),thumbhash:e.string()}).optional()}).passthrough(),SessionTurnStartEventSchema=e.object({t:e.literal("turn-start")}).passthrough(),SessionTurnEndStatusSchema=e.enum(["completed","failed","cancelled"]),TurnUsageSchema=e.object({inputTokens:e.number().int().nonnegative(),outputTokens:e.number().int().nonnegative(),cacheReadTokens:e.number().int().nonnegative().optional(),cacheWriteTokens:e.number().int().nonnegative().optional()}).passthrough(),SessionTurnEndEventSchema=e.object({t:e.literal("turn-end"),status:SessionTurnEndStatusSchema,usage:TurnUsageSchema.optional(),model:e.string().optional(),durationMs:e.number().int().nonnegative().optional(),compact:e.boolean().optional()}).passthrough(),SessionStartEventSchema=e.object({t:e.literal("start"),title:e.string().optional(),taskId:e.string().optional()}).passthrough(),SessionStopEventSchema=e.object({t:e.literal("stop")}).passthrough(),SessionImageEventSchema=e.object({t:e.literal("image"),data:e.string(),mediaType:e.string()}).passthrough(),SessionContextUsageEventSchema=e.object({t:e.literal("context-usage"),categories:e.array(e.object({name:e.string(),tokens:e.number(),color:e.string()}).passthrough()),totalTokens:e.number(),maxTokens:e.number(),percentage:e.number(),gridRows:e.array(e.array(e.object({color:e.string(),isFilled:e.boolean(),categoryName:e.string(),tokens:e.number(),percentage:e.number(),squareFullness:e.number()}).passthrough())),model:e.string(),memoryFiles:e.array(e.object({path:e.string(),type:e.string(),tokens:e.number()}).passthrough()),mcpTools:e.array(e.object({name:e.string(),serverName:e.string(),tokens:e.number(),isLoaded:e.boolean().optional()}).passthrough()),deferredBuiltinTools:e.array(e.object({name:e.string(),tokens:e.number(),isLoaded:e.boolean()}).passthrough()).optional(),systemTools:e.array(e.object({name:e.string(),tokens:e.number()}).passthrough()).optional(),systemPromptSections:e.array(e.object({name:e.string(),tokens:e.number()}).passthrough()).optional(),agents:e.array(e.object({agentType:e.string(),source:e.string(),tokens:e.number()})),slashCommands:e.object({totalCommands:e.number(),includedCommands:e.number(),tokens:e.number()}).passthrough().optional(),skills:e.object({totalSkills:e.number(),includedSkills:e.number(),tokens:e.number(),skillFrontmatter:e.array(e.record(e.unknown()))}).passthrough().optional(),messageBreakdown:e.object({toolCallTokens:e.number(),toolResultTokens:e.number(),attachmentTokens:e.number(),assistantMessageTokens:e.number(),userMessageTokens:e.number(),redirectedContextTokens:e.number().optional(),unattributedTokens:e.number().optional(),toolCallsByType:e.array(e.object({name:e.string(),callTokens:e.number(),resultTokens:e.number()}).passthrough()).optional(),attachmentsByType:e.array(e.object({name:e.string(),tokens:e.number()}).passthrough()).optional()}).passthrough().optional(),apiUsage:e.object({input_tokens:e.number(),output_tokens:e.number(),cache_creation_input_tokens:e.number(),cache_read_input_tokens:e.number()}).passthrough().nullable()}).passthrough(),SessionCompactBoundaryEventSchema=e.object({t:e.literal("compact-boundary"),trigger:e.enum(["manual","auto"]),preTokens:e.number(),postTokens:e.number().optional(),durationMs:e.number().optional()}).passthrough(),SessionEventSchema=e.discriminatedUnion("t",[SessionTextEventSchema,SessionServiceEventSchema,SessionToolCallStartEventSchema,SessionToolCallEndEventSchema,SessionFileEventSchema,SessionTurnStartEventSchema,SessionTurnEndEventSchema,SessionStartEventSchema,SessionStopEventSchema,o,s,r,a,SessionImageEventSchema,SessionContextUsageEventSchema,SessionCompactBoundaryEventSchema]);export function emptyContextUsageSnapshot(t="",n=0){return{t:"context-usage",categories:[],totalTokens:0,maxTokens:n,percentage:0,gridRows:[],model:t,memoryFiles:[],mcpTools:[],agents:[],apiUsage:null}}export{SessionQuestionEventSchema,SessionPermissionRequestEventSchema,SessionAnswerEventSchema,SessionPermissionResolvedEventSchema,PermissionActionSchema,ImageAttachmentSchema}from"./interactionEvents.js";
1
+ "use strict";import{z as e}from"zod";import{SessionQuestionEventSchema as o,SessionPermissionRequestEventSchema as s,SessionAnswerEventSchema as r,SessionPermissionResolvedEventSchema as a}from"./interactionEvents.js";export const SessionTextEventSchema=e.object({t:e.literal("text"),text:e.string(),thinking:e.boolean().optional(),images:e.array(e.object({data:e.string(),mediaType:e.string()})).optional()}).passthrough(),SessionServiceEventSchema=e.object({t:e.literal("service"),text:e.string()}).passthrough(),SessionToolCallStartEventSchema=e.object({t:e.literal("tool-call-start"),call:e.string(),name:e.string(),title:e.string(),description:e.string(),args:e.record(e.string(),e.unknown())}).passthrough(),SessionToolCallEndEventSchema=e.object({t:e.literal("tool-call-end"),call:e.string(),result:e.string().optional(),error:e.boolean().optional()}).passthrough(),SessionFileEventSchema=e.object({t:e.literal("file"),ref:e.string(),name:e.string(),size:e.number(),image:e.object({width:e.number(),height:e.number(),thumbhash:e.string()}).optional()}).passthrough(),SessionTurnStartEventSchema=e.object({t:e.literal("turn-start")}).passthrough(),SessionTurnEndStatusSchema=e.enum(["completed","failed","cancelled"]),TurnUsageSchema=e.object({inputTokens:e.number().int().nonnegative(),outputTokens:e.number().int().nonnegative(),cacheReadTokens:e.number().int().nonnegative().optional(),cacheWriteTokens:e.number().int().nonnegative().optional()}).passthrough(),SessionTurnEndEventSchema=e.object({t:e.literal("turn-end"),status:SessionTurnEndStatusSchema,usage:TurnUsageSchema.optional(),model:e.string().optional(),durationMs:e.number().int().nonnegative().optional(),compact:e.boolean().optional()}).passthrough(),SessionStartEventSchema=e.object({t:e.literal("start"),title:e.string().optional(),taskId:e.string().optional()}).passthrough(),SessionStopEventSchema=e.object({t:e.literal("stop")}).passthrough(),SessionImageEventSchema=e.object({t:e.literal("image"),data:e.string(),mediaType:e.string()}).passthrough(),SessionContextUsageEventSchema=e.object({t:e.literal("context-usage"),categories:e.array(e.object({name:e.string(),tokens:e.number(),color:e.string()}).passthrough()),totalTokens:e.number(),maxTokens:e.number(),percentage:e.number(),gridRows:e.array(e.array(e.object({color:e.string(),isFilled:e.boolean(),categoryName:e.string(),tokens:e.number(),percentage:e.number(),squareFullness:e.number()}).passthrough())),model:e.string(),memoryFiles:e.array(e.object({path:e.string(),type:e.string(),tokens:e.number()}).passthrough()),mcpTools:e.array(e.object({name:e.string(),serverName:e.string(),tokens:e.number(),isLoaded:e.boolean().optional()}).passthrough()),deferredBuiltinTools:e.array(e.object({name:e.string(),tokens:e.number(),isLoaded:e.boolean()}).passthrough()).optional(),systemTools:e.array(e.object({name:e.string(),tokens:e.number()}).passthrough()).optional(),systemPromptSections:e.array(e.object({name:e.string(),tokens:e.number()}).passthrough()).optional(),agents:e.array(e.object({agentType:e.string(),source:e.string(),tokens:e.number()})),slashCommands:e.object({totalCommands:e.number(),includedCommands:e.number(),tokens:e.number()}).passthrough().optional(),skills:e.object({totalSkills:e.number(),includedSkills:e.number(),tokens:e.number(),skillFrontmatter:e.array(e.record(e.unknown()))}).passthrough().optional(),messageBreakdown:e.object({toolCallTokens:e.number(),toolResultTokens:e.number(),attachmentTokens:e.number(),assistantMessageTokens:e.number(),userMessageTokens:e.number(),redirectedContextTokens:e.number().optional(),unattributedTokens:e.number().optional(),toolCallsByType:e.array(e.object({name:e.string(),callTokens:e.number(),resultTokens:e.number()}).passthrough()).optional(),attachmentsByType:e.array(e.object({name:e.string(),tokens:e.number()}).passthrough()).optional()}).passthrough().optional(),apiUsage:e.object({input_tokens:e.number(),output_tokens:e.number(),cache_creation_input_tokens:e.number(),cache_read_input_tokens:e.number()}).passthrough().nullable()}).passthrough(),SessionCompactBoundaryEventSchema=e.object({t:e.literal("compact-boundary"),trigger:e.enum(["manual","auto","unknown"]),preTokens:e.number().optional(),postTokens:e.number().optional(),durationMs:e.number().optional(),summary:e.string().optional()}).passthrough(),SessionEventSchema=e.discriminatedUnion("t",[SessionTextEventSchema,SessionServiceEventSchema,SessionToolCallStartEventSchema,SessionToolCallEndEventSchema,SessionFileEventSchema,SessionTurnStartEventSchema,SessionTurnEndEventSchema,SessionStartEventSchema,SessionStopEventSchema,o,s,r,a,SessionImageEventSchema,SessionContextUsageEventSchema,SessionCompactBoundaryEventSchema]);export function emptyContextUsageSnapshot(t="",n=0){return{t:"context-usage",categories:[],totalTokens:0,maxTokens:n,percentage:0,gridRows:[],model:t,memoryFiles:[],mcpTools:[],agents:[],apiUsage:null}}export{SessionQuestionEventSchema,SessionPermissionRequestEventSchema,SessionAnswerEventSchema,SessionPermissionResolvedEventSchema,PermissionActionSchema,ImageAttachmentSchema}from"./interactionEvents.js";
@@ -10,6 +10,8 @@ export interface FeatureDefinition {
10
10
  readonly id: string;
11
11
  /** RPC method names required for this feature to work. */
12
12
  readonly requiredMethods: readonly string[];
13
+ /** Daemon capability flags required for this feature. */
14
+ readonly requiredCapabilities?: readonly string[];
13
15
  /** Version where this feature was first introduced. */
14
16
  readonly sinceVersion: string;
15
17
  /** How a machine's availability should be determined. Defaults to registered RPC methods. */
@@ -28,20 +30,22 @@ export declare const FEATURE_REGISTRY: readonly FeatureDefinition[];
28
30
  * Check whether a specific feature is available given the set of supported methods.
29
31
  * A feature is available when ALL its required methods are present.
30
32
  */
31
- export declare function isFeatureAvailable(featureId: string, supportedMethods: readonly string[], daemonVersion?: string): boolean;
33
+ export declare function isFeatureAvailable(featureId: string, supportedMethods: readonly string[], daemonVersion?: string, capabilities?: readonly string[]): boolean;
32
34
  /**
33
35
  * Check whether a sub-feature is available given supported methods and daemon version.
34
36
  * Requires the parent feature to be available AND the daemon version to satisfy the sub-feature minimum.
35
37
  */
36
- export declare function isSubFeatureAvailable(featureId: string, subFeatureId: string, supportedMethods: readonly string[], daemonVersion: string | undefined): boolean;
38
+ export declare function isSubFeatureAvailable(featureId: string, subFeatureId: string, supportedMethods: readonly string[], daemonVersion: string | undefined, capabilities?: readonly string[]): boolean;
37
39
  /** Look up the minimum version required for a sub-feature. */
38
40
  export declare function getSubFeatureMinVersion(featureId: string, subFeatureId: string): string | undefined;
41
+ /** Look up the minimum version required for a feature. */
42
+ export declare function getFeatureMinVersion(featureId: string): string | undefined;
39
43
  /**
40
44
  * Return all features (and sub-features) that are NOT available.
41
45
  * Sub-features are returned as "parentId/subId" when the parent is available
42
46
  * but the daemon version is too low for the sub-feature.
43
47
  */
44
- export declare function getUnavailableFeatures(supportedMethods: readonly string[], daemonVersion?: string): readonly {
48
+ export declare function getUnavailableFeatures(supportedMethods: readonly string[], daemonVersion?: string, capabilities?: readonly string[]): readonly {
45
49
  id: string;
46
50
  sinceVersion: string;
47
51
  }[];
package/dist/features.js CHANGED
@@ -1 +1 @@
1
- "use strict";import{satisfiesMin as a}from"./semver.js";export const FEATURE_REGISTRY=[{id:"agent-settings",requiredMethods:["get-agent-settings","set-agent-settings"],sinceVersion:"0.0.4",subFeatures:[{id:"startup-scripts",sinceVersion:"0.0.30"}]},{id:"labs-settings",requiredMethods:["get-labs-settings","set-labs-settings"],sinceVersion:"0.0.12"},{id:"history-sync",requiredMethods:["backfill-history-session"],sinceVersion:"0.0.12"},{id:"check-path",requiredMethods:["check-path"],sinceVersion:"0.0.7"},{id:"remote-upgrade",requiredMethods:["trigger-upgrade"],sinceVersion:"0.0.30"},{id:"checkpoint",requiredMethods:["checkpoint-list","checkpoint-diff","checkpoint-rollback"],sinceVersion:"0.0.30",subFeatures:[{id:"conversation-rollback",sinceVersion:"0.0.32"}]},{id:"scheduled-tasks",requiredMethods:["spawn-session"],sinceVersion:"0.0.35"},{id:"auto-upgrade-daemon",requiredMethods:["set-auto-upgrade-daemon"],sinceVersion:"0.0.31"},{id:"file-upload",requiredMethods:["file-relay-receive"],sinceVersion:"0.0.36",edition:"personal"},{id:"context-usage",requiredMethods:["get-context-usage"],sinceVersion:"0.0.91",availability:"daemon-version"}];export function isFeatureAvailable(o,t,r){const e=FEATURE_REGISTRY.find(n=>n.id===o);if(!e)return!1;if(e.availability==="daemon-version")return r!=null&&a(r,e.sinceVersion);const i=new Set(t);return e.requiredMethods.every(n=>i.has(n))}export function isSubFeatureAvailable(o,t,r,e){const i=FEATURE_REGISTRY.find(s=>s.id===o);if(!i||!isFeatureAvailable(o,r))return!1;const n=i.subFeatures?.find(s=>s.id===t);if(!n||!e||!a(e,n.sinceVersion))return!1;if(n.requiredMethods){const s=new Set(r);return n.requiredMethods.every(d=>s.has(d))}return!0}export function getSubFeatureMinVersion(o,t){return FEATURE_REGISTRY.find(e=>e.id===o)?.subFeatures?.find(e=>e.id===t)?.sinceVersion}export function getUnavailableFeatures(o,t){const r=[],e=new Set(o);for(const i of FEATURE_REGISTRY)if(!(i.availability==="daemon-version"?t!=null&&a(t,i.sinceVersion):i.requiredMethods.every(s=>e.has(s))))r.push({id:i.id,sinceVersion:i.sinceVersion});else if(i.subFeatures&&t)for(const s of i.subFeatures){const d=!a(t,s.sinceVersion),u=s.requiredMethods!=null&&!s.requiredMethods.every(c=>e.has(c));(d||u)&&r.push({id:`${i.id}/${s.id}`,sinceVersion:s.sinceVersion})}return r}
1
+ "use strict";import{satisfiesMin as a}from"./semver.js";import{SESSION_HANDOFF_CAPABILITY as f}from"./workItems.js";export const FEATURE_REGISTRY=[{id:"agent-settings",requiredMethods:["get-agent-settings","set-agent-settings"],sinceVersion:"0.0.4",subFeatures:[{id:"startup-scripts",sinceVersion:"0.0.30"}]},{id:"labs-settings",requiredMethods:["get-labs-settings","set-labs-settings"],sinceVersion:"0.0.12"},{id:"history-sync",requiredMethods:["backfill-history-session"],sinceVersion:"0.0.12"},{id:"check-path",requiredMethods:["check-path"],sinceVersion:"0.0.7"},{id:"remote-upgrade",requiredMethods:["trigger-upgrade"],sinceVersion:"0.0.30"},{id:"checkpoint",requiredMethods:["checkpoint-list","checkpoint-diff","checkpoint-rollback"],sinceVersion:"0.0.30",subFeatures:[{id:"conversation-rollback",sinceVersion:"0.0.32"}]},{id:"scheduled-tasks",requiredMethods:["spawn-session"],sinceVersion:"0.0.35"},{id:"auto-upgrade-daemon",requiredMethods:["set-auto-upgrade-daemon"],sinceVersion:"0.0.31"},{id:"file-upload",requiredMethods:["file-relay-receive"],sinceVersion:"0.0.36",edition:"personal"},{id:"context-usage",requiredMethods:["get-context-usage"],sinceVersion:"0.0.91",availability:"daemon-version"},{id:"ai-helper",requiredMethods:["ai-helper"],sinceVersion:"0.0.94"},{id:"session-handoff",requiredMethods:["spawn-session"],requiredCapabilities:[f],sinceVersion:"0.0.94"}];export function isFeatureAvailable(n,s,o,r){const t=FEATURE_REGISTRY.find(e=>e.id===n);if(!t)return!1;if(t.availability==="daemon-version")return o!=null&&a(o,t.sinceVersion);const i=new Set(s),u=new Set(r);return t.requiredMethods.every(e=>i.has(e))&&(t.requiredCapabilities?.every(e=>u.has(e))??!0)&&(o==null||a(o,t.sinceVersion))}export function isSubFeatureAvailable(n,s,o,r,t){const i=FEATURE_REGISTRY.find(e=>e.id===n);if(!i||!isFeatureAvailable(n,o,r,t))return!1;const u=i.subFeatures?.find(e=>e.id===s);if(!u||!r||!a(r,u.sinceVersion))return!1;if(u.requiredMethods){const e=new Set(o);return u.requiredMethods.every(d=>e.has(d))}return!0}export function getSubFeatureMinVersion(n,s){return FEATURE_REGISTRY.find(r=>r.id===n)?.subFeatures?.find(r=>r.id===s)?.sinceVersion}export function getFeatureMinVersion(n){return FEATURE_REGISTRY.find(s=>s.id===n)?.sinceVersion}export function getUnavailableFeatures(n,s,o){const r=[],t=new Set(n);for(const i of FEATURE_REGISTRY)if(!(i.availability==="daemon-version"?s!=null&&a(s,i.sinceVersion):i.requiredMethods.every(e=>t.has(e))&&(i.requiredCapabilities?.every(e=>o?.includes(e))??!0)&&(s==null||a(s,i.sinceVersion))))r.push({id:i.id,sinceVersion:i.sinceVersion});else if(i.subFeatures&&s)for(const e of i.subFeatures){const d=!a(s,e.sinceVersion),c=e.requiredMethods!=null&&!e.requiredMethods.every(l=>t.has(l));(d||c)&&r.push({id:`${i.id}/${e.id}`,sinceVersion:e.sinceVersion})}return r}
@@ -29,13 +29,13 @@ export declare const SettingsSnapshotSchema: z.ZodObject<{
29
29
  viewport: z.ZodString;
30
30
  language: z.ZodString;
31
31
  }, "strip", z.ZodTypeAny, {
32
+ language: string;
32
33
  userAgent: string;
33
34
  viewport: string;
34
- language: string;
35
35
  }, {
36
+ language: string;
36
37
  userAgent: string;
37
38
  viewport: string;
38
- language: string;
39
39
  }>>;
40
40
  /** Per-machine diagnostics: platform, arch, daemonVersion, availableAgents, agentCliPaths */
41
41
  machines: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -43,18 +43,18 @@ export declare const SettingsSnapshotSchema: z.ZodObject<{
43
43
  labs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
44
44
  }, "strip", z.ZodTypeAny, {
45
45
  browser?: {
46
+ language: string;
46
47
  userAgent: string;
47
48
  viewport: string;
48
- language: string;
49
49
  } | undefined;
50
50
  machines?: Record<string, Record<string, unknown>> | undefined;
51
51
  preferences?: Record<string, unknown> | undefined;
52
52
  labs?: Record<string, unknown> | undefined;
53
53
  }, {
54
54
  browser?: {
55
+ language: string;
55
56
  userAgent: string;
56
57
  viewport: string;
57
- language: string;
58
58
  } | undefined;
59
59
  machines?: Record<string, Record<string, unknown>> | undefined;
60
60
  preferences?: Record<string, unknown> | undefined;
@@ -126,13 +126,13 @@ export declare const DeviceInfoSchema: z.ZodObject<{
126
126
  viewport: z.ZodString;
127
127
  language: z.ZodString;
128
128
  }, "strip", z.ZodTypeAny, {
129
+ language: string;
129
130
  userAgent: string;
130
131
  viewport: string;
131
- language: string;
132
132
  }, {
133
+ language: string;
133
134
  userAgent: string;
134
135
  viewport: string;
135
- language: string;
136
136
  }>>;
137
137
  /** Per-machine diagnostics: platform, arch, daemonVersion, availableAgents, agentCliPaths */
138
138
  machines: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -140,18 +140,18 @@ export declare const DeviceInfoSchema: z.ZodObject<{
140
140
  labs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
141
141
  }, "strip", z.ZodTypeAny, {
142
142
  browser?: {
143
+ language: string;
143
144
  userAgent: string;
144
145
  viewport: string;
145
- language: string;
146
146
  } | undefined;
147
147
  machines?: Record<string, Record<string, unknown>> | undefined;
148
148
  preferences?: Record<string, unknown> | undefined;
149
149
  labs?: Record<string, unknown> | undefined;
150
150
  }, {
151
151
  browser?: {
152
+ language: string;
152
153
  userAgent: string;
153
154
  viewport: string;
154
- language: string;
155
155
  } | undefined;
156
156
  machines?: Record<string, Record<string, unknown>> | undefined;
157
157
  preferences?: Record<string, unknown> | undefined;
@@ -171,9 +171,9 @@ export declare const DeviceInfoSchema: z.ZodObject<{
171
171
  appVersion?: string | undefined;
172
172
  settingsSnapshot?: {
173
173
  browser?: {
174
+ language: string;
174
175
  userAgent: string;
175
176
  viewport: string;
176
- language: string;
177
177
  } | undefined;
178
178
  machines?: Record<string, Record<string, unknown>> | undefined;
179
179
  preferences?: Record<string, unknown> | undefined;
@@ -193,9 +193,9 @@ export declare const DeviceInfoSchema: z.ZodObject<{
193
193
  appVersion?: string | undefined;
194
194
  settingsSnapshot?: {
195
195
  browser?: {
196
+ language: string;
196
197
  userAgent: string;
197
198
  viewport: string;
198
- language: string;
199
199
  } | undefined;
200
200
  machines?: Record<string, Record<string, unknown>> | undefined;
201
201
  preferences?: Record<string, unknown> | undefined;
@@ -243,13 +243,13 @@ export declare const CreateFeedbackSchema: z.ZodObject<{
243
243
  viewport: z.ZodString;
244
244
  language: z.ZodString;
245
245
  }, "strip", z.ZodTypeAny, {
246
+ language: string;
246
247
  userAgent: string;
247
248
  viewport: string;
248
- language: string;
249
249
  }, {
250
+ language: string;
250
251
  userAgent: string;
251
252
  viewport: string;
252
- language: string;
253
253
  }>>;
254
254
  /** Per-machine diagnostics: platform, arch, daemonVersion, availableAgents, agentCliPaths */
255
255
  machines: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -257,18 +257,18 @@ export declare const CreateFeedbackSchema: z.ZodObject<{
257
257
  labs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
258
258
  }, "strip", z.ZodTypeAny, {
259
259
  browser?: {
260
+ language: string;
260
261
  userAgent: string;
261
262
  viewport: string;
262
- language: string;
263
263
  } | undefined;
264
264
  machines?: Record<string, Record<string, unknown>> | undefined;
265
265
  preferences?: Record<string, unknown> | undefined;
266
266
  labs?: Record<string, unknown> | undefined;
267
267
  }, {
268
268
  browser?: {
269
+ language: string;
269
270
  userAgent: string;
270
271
  viewport: string;
271
- language: string;
272
272
  } | undefined;
273
273
  machines?: Record<string, Record<string, unknown>> | undefined;
274
274
  preferences?: Record<string, unknown> | undefined;
@@ -288,9 +288,9 @@ export declare const CreateFeedbackSchema: z.ZodObject<{
288
288
  appVersion?: string | undefined;
289
289
  settingsSnapshot?: {
290
290
  browser?: {
291
+ language: string;
291
292
  userAgent: string;
292
293
  viewport: string;
293
- language: string;
294
294
  } | undefined;
295
295
  machines?: Record<string, Record<string, unknown>> | undefined;
296
296
  preferences?: Record<string, unknown> | undefined;
@@ -310,9 +310,9 @@ export declare const CreateFeedbackSchema: z.ZodObject<{
310
310
  appVersion?: string | undefined;
311
311
  settingsSnapshot?: {
312
312
  browser?: {
313
+ language: string;
313
314
  userAgent: string;
314
315
  viewport: string;
315
- language: string;
316
316
  } | undefined;
317
317
  machines?: Record<string, Record<string, unknown>> | undefined;
318
318
  preferences?: Record<string, unknown> | undefined;
@@ -355,9 +355,9 @@ export declare const CreateFeedbackSchema: z.ZodObject<{
355
355
  appVersion?: string | undefined;
356
356
  settingsSnapshot?: {
357
357
  browser?: {
358
+ language: string;
358
359
  userAgent: string;
359
360
  viewport: string;
360
- language: string;
361
361
  } | undefined;
362
362
  machines?: Record<string, Record<string, unknown>> | undefined;
363
363
  preferences?: Record<string, unknown> | undefined;
@@ -391,9 +391,9 @@ export declare const CreateFeedbackSchema: z.ZodObject<{
391
391
  appVersion?: string | undefined;
392
392
  settingsSnapshot?: {
393
393
  browser?: {
394
+ language: string;
394
395
  userAgent: string;
395
396
  viewport: string;
396
- language: string;
397
397
  } | undefined;
398
398
  machines?: Record<string, Record<string, unknown>> | undefined;
399
399
  preferences?: Record<string, unknown> | undefined;