@agentdock/wire 0.0.94 → 0.0.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/accountLanguage.d.ts +2 -8
  2. package/dist/activityPreferences.d.ts +0 -2
  3. package/dist/agentCapabilities.d.ts +16 -46
  4. package/dist/agentCommonEnv.d.ts +0 -9
  5. package/dist/agentInstallGuide.d.ts +0 -7
  6. package/dist/agentRuntimeSettings.d.ts +1 -2
  7. package/dist/bgTask.d.ts +13 -24
  8. package/dist/checkpointSchemas.d.ts +1 -2
  9. package/dist/controlLevel.d.ts +1 -9
  10. package/dist/edition.d.ts +0 -1
  11. package/dist/enterpriseGateway.d.ts +1 -2
  12. package/dist/enterprisePolicy.d.ts +1599 -0
  13. package/dist/enterprisePolicy.js +1 -0
  14. package/dist/enterprisePolicyExports.d.ts +2 -0
  15. package/dist/enterprisePolicyExports.js +1 -0
  16. package/dist/enterpriseRuntime.d.ts +317 -0
  17. package/dist/enterpriseRuntime.js +1 -0
  18. package/dist/envelope.d.ts +18 -30
  19. package/dist/errorMessage.d.ts +0 -1
  20. package/dist/events.d.ts +55 -71
  21. package/dist/features.d.ts +14 -29
  22. package/dist/feedback.d.ts +3 -4
  23. package/dist/fileWhitelist.d.ts +7 -39
  24. package/dist/gateway.d.ts +841 -43
  25. package/dist/gateway.js +1 -1
  26. package/dist/goals.d.ts +0 -1
  27. package/dist/handoffBrief.d.ts +1 -2
  28. package/dist/inboundEvents.d.ts +32 -75
  29. package/dist/index.d.ts +7 -6
  30. package/dist/index.js +1 -1
  31. package/dist/interactionEvents.d.ts +49 -57
  32. package/dist/legacyProtocol.d.ts +0 -6
  33. package/dist/license.d.ts +36 -37
  34. package/dist/machine.d.ts +48 -56
  35. package/dist/messageMeta.d.ts +15 -17
  36. package/dist/messages.d.ts +13 -20
  37. package/dist/notification.d.ts +2 -3
  38. package/dist/ops.d.ts +9 -27
  39. package/dist/pairing.d.ts +9 -49
  40. package/dist/permissionSubject.d.ts +3 -26
  41. package/dist/protocol.d.ts +0 -6
  42. package/dist/rpc.d.ts +118 -162
  43. package/dist/rpc.js +1 -1
  44. package/dist/scheduledTasks.d.ts +9 -10
  45. package/dist/semver.d.ts +3 -22
  46. package/dist/sessionBtw.d.ts +4 -5
  47. package/dist/sessionBtw.js +1 -1
  48. package/dist/sessionResult.d.ts +21 -27
  49. package/dist/sessionTitle.d.ts +2 -9
  50. package/dist/socketEvents.d.ts +4 -5
  51. package/dist/sourceMetadata.d.ts +1 -14
  52. package/dist/spawnError.d.ts +7 -14
  53. package/dist/stats.d.ts +13 -20
  54. package/dist/sync.d.ts +75 -156
  55. package/dist/taskResult.d.ts +3 -20
  56. package/dist/telemetry.d.ts +1 -11
  57. package/dist/utils.d.ts +0 -1
  58. package/dist/workItems.d.ts +6 -30
  59. package/package.json +1 -1
package/dist/gateway.js CHANGED
@@ -1 +1 @@
1
- "use strict";import{z as e}from"zod";const a=e.string().url().refine(r=>{const t=r.replace(/^[a-z][a-z\d+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??"",o=t.indexOf("]"),n=(t.startsWith("[")&&o>0?t.slice(1,o):t.split(":",1)[0]??"").toLowerCase();return n!=="localhost"&&n!=="::1"&&!n.startsWith("127.")&&!n.startsWith("10.")&&!n.startsWith("192.168.")&&!n.startsWith("169.254.")&&!/^172\.(1[6-9]|2\d|3[0-1])\./.test(n)},"gateway upstream must not target a local or private address");export const GatewayRouteStatusSchema=e.enum(["draft","validating","active","disabled","error"]),GatewayProtocolSchema=e.enum(["anthropic_messages","openai_responses","openai_chat"]),GatewayErrorCodeSchema=e.enum(["unauthorized","route-not-found","route-disabled","connection-disabled","protocol-not-supported","request-too-large","upstream-timeout","upstream-unavailable","client-aborted","model-not-allowed","invalid-request"]);const i=e.object({status:e.enum(["active","disabled"]),messagesUrl:e.string().url(),apiKey:e.string().min(1),authScheme:e.enum(["x-api-key","bearer"])}).strict();export const GatewayRouteSchema=e.object({id:e.string().min(1),alias:e.string().min(1),enterpriseId:e.string().min(1),agent:e.enum(["claude","codex","opencode"]),provider:e.string().min(1).default("unknown"),model:e.string().min(1),requestProtocol:GatewayProtocolSchema,upstreamProtocol:GatewayProtocolSchema,status:GatewayRouteStatusSchema,tokenGeneration:e.number().int().nonnegative(),connection:i}).strict(),GatewayTokenClaimsSchema=e.object({enterpriseId:e.string().min(1),userId:e.string().min(1),machineId:e.string().min(1),routeAlias:e.string().min(1),tokenGeneration:e.number().int().nonnegative()}).strict(),GatewayConnectionCreateSchema=e.object({name:e.string().min(1).max(100),baseUrl:a,credentialRef:e.string().min(1).max(200)}).strict(),GatewayConnectionUpdateSchema=e.object({name:e.string().min(1).max(100).optional(),baseUrl:a.optional(),credentialRef:e.string().min(1).max(200).optional(),status:e.enum(["active","disabled"]).optional()}).strict();const s=e.object({connectionId:e.string().min(1),userId:e.string().min(1),machineId:e.string().min(1),agent:e.literal("claude"),model:e.string().min(1).max(200),requestProtocol:e.literal("anthropic_messages"),upstreamProtocol:e.literal("anthropic_messages"),provider:e.string().min(1).max(100),alias:e.string().min(1).max(100).regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/)}).strict(),m=e.object({connectionId:e.string().min(1),userId:e.string().min(1),machineId:e.string().min(1),agent:e.literal("codex"),model:e.string().min(1).max(200),requestProtocol:e.literal("openai_responses"),upstreamProtocol:e.literal("openai_responses"),provider:e.string().min(1).max(100),alias:e.string().min(1).max(100).regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/)}).strict();export const GatewayRouteCreateSchema=e.discriminatedUnion("agent",[s,m]),GatewayRouteUpdateSchema=e.object({model:e.string().min(1).max(200).optional(),provider:e.string().min(1).max(100).optional(),status:e.enum(["disabled","error"]).optional()}).strict(),GatewayRequestListQuerySchema=e.object({from:e.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),to:e.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),userId:e.string().optional(),machineId:e.string().optional(),routeId:e.string().optional(),agent:e.string().optional(),model:e.string().optional(),provider:e.string().optional(),outcome:e.string().optional(),limit:e.number().int().min(1).max(200),offset:e.number().int().min(0),cursor:e.string().optional()}).strict(),GatewayUsageSummarySchema=e.object({requestCount:e.number().int().nonnegative(),inputTokens:e.number().nonnegative(),outputTokens:e.number().nonnegative(),cacheReadTokens:e.number().nonnegative(),cacheWriteTokens:e.number().nonnegative(),reasoningTokens:e.number().nonnegative(),totalTokens:e.number().nonnegative(),costMicros:e.number().nullable(),pricedCount:e.number().int().nonnegative(),unpricedCount:e.number().int().nonnegative(),errorCount:e.number().int().nonnegative(),errorRate:e.number().min(0).max(1),latencyMs:e.object({p50:e.number().nullable(),p95:e.number().nullable()}).strict(),breakdown:e.array(e.object({agent:e.string().nullable(),model:e.string().nullable(),provider:e.string().nullable(),requestCount:e.number().int().nonnegative(),inputTokens:e.number().nonnegative(),outputTokens:e.number().nonnegative(),totalTokens:e.number().nonnegative(),costMicros:e.number().nullable()}).strict())}).strict(),GatewayDailyUsageSchema=e.object({day:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),agent:e.string().nullable(),model:e.string().nullable(),provider:e.string().nullable(),requestCount:e.number().int().nonnegative(),inputTokens:e.number().nonnegative(),outputTokens:e.number().nonnegative(),cacheReadTokens:e.number().nonnegative(),cacheWriteTokens:e.number().nonnegative(),totalTokens:e.number().nonnegative(),costMicros:e.number().nullable(),currency:e.string().nullable()}).strict();
1
+ "use strict";import{z as e}from"zod";const t=e.string().url();export const GatewayRouteStatusSchema=e.enum(["draft","validating","active","disabled","error"]),GatewayProtocolSchema=e.enum(["anthropic_messages","openai_responses","openai_chat"]),GatewayErrorCodeSchema=e.enum(["unauthorized","route-not-found","route-disabled","connection-disabled","protocol-not-supported","request-too-large","upstream-timeout","upstream-unavailable","client-aborted","model-not-allowed","invalid-request"]);const n=e.object({status:e.enum(["active","disabled"]),baseUrl:e.string().url(),apiKey:e.string().min(1),authScheme:e.enum(["x-api-key","bearer"])}).strict();export const GatewayRouteSchema=e.object({id:e.string().min(1),alias:e.string().min(1),enterpriseId:e.string().min(1),agent:e.enum(["claude","codex","opencode"]),provider:e.string().min(1).default("unknown"),model:e.string().min(1),requestProtocol:GatewayProtocolSchema,upstreamProtocol:GatewayProtocolSchema,status:GatewayRouteStatusSchema,connection:n}).strict(),GatewayTokenClaimsSchema=e.object({enterpriseId:e.string().min(1),userId:e.string().min(1)}).strict(),GatewayConnectionCreateSchema=e.object({name:e.string().min(1).max(100),baseUrl:t,apiKeys:e.array(e.string().trim().min(1).max(2e3)).min(1).max(20)}).strict(),GatewayConnectionUpdateSchema=e.object({name:e.string().min(1).max(100).optional(),baseUrl:t.optional(),apiKeys:e.array(e.string().trim().min(1).max(2e3)).min(1).max(20).optional(),status:e.enum(["active","disabled"]).optional()}).strict(),GatewayConnectionKeyAddSchema=e.object({apiKey:e.string().trim().min(1).max(2e3)}).strict(),GatewayConnectionViewSchema=e.object({id:e.string().min(1),enterpriseId:e.string().min(1),name:e.string().min(1),baseUrl:e.string().url(),apiKeyCount:e.number().int().nonnegative(),apiKeys:e.array(e.object({fingerprint:e.string().regex(/^[a-f0-9]{16}$/),masked:e.string().min(1)}).strict()),status:e.enum(["active","disabled"]),metadata:e.unknown(),createdAt:e.string().datetime(),updatedAt:e.string().datetime()}).strict(),GatewayConnectionViewResponseSchema=e.object({ok:e.literal(!0),data:e.array(GatewayConnectionViewSchema)}).strict(),GatewayConnectionMutationResponseSchema=e.object({ok:e.literal(!0),data:GatewayConnectionViewSchema}).strict(),GatewayCapabilityViewSchema=e.object({connectionId:e.string().min(1),connectionName:e.string().min(1),agent:e.enum(["claude","codex"]),requestProtocol:e.enum(["anthropic_messages","openai_responses"]),models:e.array(e.string().min(1)),status:e.enum(["ready","unknown","unavailable","unsupported"])}).strict(),GatewayCapabilityViewResponseSchema=e.object({ok:e.literal(!0),data:e.array(GatewayCapabilityViewSchema)}).strict(),GatewayConnectionKeyFingerprintSchema=e.string().regex(/^[a-f0-9]{16}$/,"invalid gateway key fingerprint");const a=e.object({connectionId:e.string().min(1),userId:e.string().min(1),machineId:e.string().min(1),agent:e.literal("claude"),model:e.string().min(1).max(200),requestProtocol:e.literal("anthropic_messages"),upstreamProtocol:e.literal("anthropic_messages"),provider:e.string().min(1).max(100),alias:e.string().min(1).max(100).regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/)}).strict(),i=e.object({connectionId:e.string().min(1),userId:e.string().min(1),machineId:e.string().min(1),agent:e.literal("codex"),model:e.string().min(1).max(200),requestProtocol:e.literal("openai_responses"),upstreamProtocol:e.literal("openai_responses"),provider:e.string().min(1).max(100),alias:e.string().min(1).max(100).regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/)}).strict();export const GatewayRouteCreateSchema=e.discriminatedUnion("agent",[a,i]),GatewayRouteUpdateSchema=e.object({model:e.string().min(1).max(200).optional(),provider:e.string().min(1).max(100).optional(),status:e.enum(["disabled","error"]).optional()}).strict(),GatewayRouteViewSchema=e.object({id:e.string().min(1),enterpriseId:e.string().min(1),alias:e.string().min(1),agent:e.enum(["claude","codex","opencode"]),provider:e.string().min(1),model:e.string().min(1),requestProtocol:GatewayProtocolSchema,upstreamProtocol:GatewayProtocolSchema,status:GatewayRouteStatusSchema,connection:e.object({id:e.string().min(1),name:e.string().min(1),status:e.enum(["active","disabled"])}).strict().optional()}).strict().extend({connectionId:e.string().min(1),lastValidationAt:e.string().datetime().nullable(),lastErrorCode:e.string().min(1).nullable(),runtimeBinding:e.object({id:e.string().min(1),status:e.enum(["active","expired","revoked"]),expiresAt:e.string().datetime().nullable()}).strict().nullable()}),GatewayRouteViewResponseSchema=e.object({ok:e.literal(!0),data:e.array(GatewayRouteViewSchema)}).strict(),GatewayRouteMutationResponseSchema=e.object({ok:e.literal(!0),data:e.object({route:GatewayRouteViewSchema}).strict()}).strict(),EnterpriseNativeModelCatalogEntrySchema=e.object({model:e.string().min(1),provider:e.string().min(1),mode:e.string().min(1),inputCostPerToken:e.number().nullable(),outputCostPerToken:e.number().nullable(),maxInputTokens:e.number().int().nullable(),maxOutputTokens:e.number().int().nullable(),source:e.enum(["github","custom"])}).strict(),EnterpriseNativeModelCatalogResponseSchema=e.object({ok:e.literal(!0),data:e.array(EnterpriseNativeModelCatalogEntrySchema)}).strict(),GatewayRequestListQuerySchema=e.object({from:e.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),to:e.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),userId:e.string().optional(),machineId:e.string().optional(),routeId:e.string().optional(),agent:e.string().optional(),model:e.string().optional(),provider:e.string().optional(),outcome:e.string().optional(),limit:e.number().int().min(1).max(200),offset:e.number().int().min(0),cursor:e.string().optional()}).strict(),GatewayUsageSummarySchema=e.object({requestCount:e.number().int().nonnegative(),inputTokens:e.number().nonnegative(),outputTokens:e.number().nonnegative(),cacheReadTokens:e.number().nonnegative(),cacheWriteTokens:e.number().nonnegative(),reasoningTokens:e.number().nonnegative(),totalTokens:e.number().nonnegative(),costMicros:e.number().nullable(),pricedCount:e.number().int().nonnegative(),unpricedCount:e.number().int().nonnegative(),errorCount:e.number().int().nonnegative(),errorRate:e.number().min(0).max(1),latencyMs:e.object({p50:e.number().nullable(),p95:e.number().nullable()}).strict(),breakdown:e.array(e.object({agent:e.string().nullable(),model:e.string().nullable(),provider:e.string().nullable(),requestCount:e.number().int().nonnegative(),inputTokens:e.number().nonnegative(),outputTokens:e.number().nonnegative(),totalTokens:e.number().nonnegative(),costMicros:e.number().nullable()}).strict())}).strict(),GatewayDailyUsageSchema=e.object({day:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),agent:e.string().nullable(),model:e.string().nullable(),provider:e.string().nullable(),requestCount:e.number().int().nonnegative(),inputTokens:e.number().nonnegative(),outputTokens:e.number().nonnegative(),cacheReadTokens:e.number().nonnegative(),cacheWriteTokens:e.number().nonnegative(),totalTokens:e.number().nonnegative(),costMicros:e.number().nullable(),currency:e.string().nullable()}).strict();
package/dist/goals.d.ts CHANGED
@@ -827,4 +827,3 @@ export declare const GoalDetailSchema: z.ZodObject<{
827
827
  }[];
828
828
  }>;
829
829
  export type GoalDetail = z.infer<typeof GoalDetailSchema>;
830
- //# sourceMappingURL=goals.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import type { AccountLanguage } from './accountLanguage.js';
3
3
  export declare const HANDOFF_BRIEF_TEMPLATE = "## Current status\nDescribe what is true now and what the next Agent should understand first.\n\n## Completed\n- List work that is actually done.\n\n## Verification\n- List checks, tests, or observations and their results.\n\n## Open issues and risks\n- List unfinished work, uncertainty, or say \"None known\".\n\n## Next steps\n- List the next concrete actions, including any user decision needed.";
4
- /** Simplified-Chinese brief template. Section headings must match the SECTION_ALIASES aliases below. */
4
+
5
5
  export declare const HANDOFF_BRIEF_TEMPLATE_ZH = "## \u5F53\u524D\u72B6\u6001\n\u63CF\u8FF0\u73B0\u5728\u7684\u60C5\u51B5\uFF0C\u4EE5\u53CA\u4E0B\u4E00\u4F4D Agent \u9996\u5148\u9700\u8981\u7406\u89E3\u7684\u5185\u5BB9\u3002\n\n## \u5DF2\u5B8C\u6210\n- \u5217\u51FA\u5B9E\u9645\u5DF2\u5B8C\u6210\u7684\u5DE5\u4F5C\u3002\n\n## \u9A8C\u8BC1\u7ED3\u679C\n- \u5217\u51FA\u68C0\u67E5\u3001\u6D4B\u8BD5\u6216\u89C2\u5BDF\u53CA\u5176\u7ED3\u679C\u3002\n\n## \u672A\u5B8C\u6210\u4E0E\u98CE\u9669\n- \u5217\u51FA\u672A\u5B8C\u6210\u7684\u5DE5\u4F5C\u3001\u4E0D\u786E\u5B9A\u6027\uFF0C\u6216\u5199\u300C\u6682\u65E0\u300D\u3002\n\n## \u4E0B\u4E00\u6B65\n- \u5217\u51FA\u63A5\u4E0B\u6765\u8981\u91C7\u53D6\u7684\u5177\u4F53\u884C\u52A8\uFF0C\u5305\u62EC\u9700\u8981\u7528\u6237\u51B3\u5B9A\u7684\u4E8B\u9879\u3002";
6
6
  export declare const HANDOFF_BRIEF_REQUIREMENTS = "The brief must contain non-empty sections for Current status, Completed, Verification, Open issues and risks, and Next steps. Markdown inside each section is unrestricted.";
7
7
  export declare const HANDOFF_SOURCE_REFERENCE_GUIDANCE = "Source reference rules:\n- Include at least one file path or resource identifier directly relevant to this handoff.\n- Prefer files actually changed, tests or configuration used for verification, and the relevant design document.\n- Each reference must let the next Agent locate context; do not use project names, directories, \"source code\", or \"tests\" as stand-ins.\n- References are navigation pointers, not proof of a claim or an acceptance result. Put commands and their results in Verification.\n- Do not include unrelated files just to make the list longer.\n\nGood: [\"packages/web/src/pages/SessionDetailPage.tsx\", \"packages/web/test/SessionDetailPage.test.tsx\"]\nBad: [\"packages/web\", \"source code\", \"tests\"]";
@@ -11,4 +11,3 @@ export declare function sessionDeliveryTemplate(language: AccountLanguage): stri
11
11
  export declare const SESSION_DELIVERY_REQUIREMENTS = "The delivery must contain all five session delivery sections.";
12
12
  export declare function getMissingHandoffBriefSections(brief: string): readonly string[];
13
13
  export declare const HandoffBriefSchema: z.ZodEffects<z.ZodString, string, string>;
14
- //# sourceMappingURL=handoffBrief.d.ts.map
@@ -1,26 +1,5 @@
1
- /**
2
- * Inbound Socket.IO event payload schemas (daemon/web → server).
3
- *
4
- * These validate the HIGHEST-FREQUENCY channel in the system: every session
5
- * create / state change / message / machine register flows through here. Unlike
6
- * REST bodies (validated by `.strict()` schemas in their own modules), these
7
- * events were historically validated by hand-written `is*` type predicates in
8
- * server's `sessionPayloads.ts` — which drift from the wire contract silently.
9
- *
10
- * Mode choice — `.passthrough()`, NOT `.strict()`:
11
- * The daemon runs on the user's machine and upgrades lag the server. A newer
12
- * daemon may add fields an older server hasn't learned yet; strict rejection
13
- * would fail the whole session-create over an additive field. Passthrough lets
14
- * additive fields ride along while still enforcing that REQUIRED fields exist
15
- * with the right type — which is the actual defense against silent drops.
16
- * Same principle already applied in envelope.ts / machine.ts.
17
- *
18
- * When a field is intentionally NOT consumed by the server (daemon-only
19
- * bookkeeping), that's fine — passthrough carries it. Required fields the server
20
- * relies on are listed explicitly below.
21
- */
22
1
  import { z } from 'zod';
23
- /** session-create — createSession() in daemon serverClient. */
2
+
24
3
  export declare const SessionCreatePayloadSchema: z.ZodObject<{
25
4
  tag: z.ZodString;
26
5
  metadata: z.ZodOptional<z.ZodString>;
@@ -28,11 +7,11 @@ export declare const SessionCreatePayloadSchema: z.ZodObject<{
28
7
  source: z.ZodOptional<z.ZodString>;
29
8
  claudeSessionId: z.ZodOptional<z.ZodString>;
30
9
  projectPath: z.ZodOptional<z.ZodString>;
31
- /** RFC-075: identifies one currently-running CLI process. */
10
+
32
11
  ownerInstanceId: z.ZodOptional<z.ZodString>;
33
- /** RFC-084: session-level handoff switch (persisted for resume). */
12
+
34
13
  handoffEnabled: z.ZodOptional<z.ZodBoolean>;
35
- /** RFC-084: delivery (proposal) IDs this session inherited from. */
14
+
36
15
  inheritedFrom: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
37
16
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
38
17
  tag: z.ZodString;
@@ -41,11 +20,11 @@ export declare const SessionCreatePayloadSchema: z.ZodObject<{
41
20
  source: z.ZodOptional<z.ZodString>;
42
21
  claudeSessionId: z.ZodOptional<z.ZodString>;
43
22
  projectPath: z.ZodOptional<z.ZodString>;
44
- /** RFC-075: identifies one currently-running CLI process. */
23
+
45
24
  ownerInstanceId: z.ZodOptional<z.ZodString>;
46
- /** RFC-084: session-level handoff switch (persisted for resume). */
25
+
47
26
  handoffEnabled: z.ZodOptional<z.ZodBoolean>;
48
- /** RFC-084: delivery (proposal) IDs this session inherited from. */
27
+
49
28
  inheritedFrom: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
50
29
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
51
30
  tag: z.ZodString;
@@ -54,15 +33,15 @@ export declare const SessionCreatePayloadSchema: z.ZodObject<{
54
33
  source: z.ZodOptional<z.ZodString>;
55
34
  claudeSessionId: z.ZodOptional<z.ZodString>;
56
35
  projectPath: z.ZodOptional<z.ZodString>;
57
- /** RFC-075: identifies one currently-running CLI process. */
36
+
58
37
  ownerInstanceId: z.ZodOptional<z.ZodString>;
59
- /** RFC-084: session-level handoff switch (persisted for resume). */
38
+
60
39
  handoffEnabled: z.ZodOptional<z.ZodBoolean>;
61
- /** RFC-084: delivery (proposal) IDs this session inherited from. */
40
+
62
41
  inheritedFrom: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
63
42
  }, z.ZodTypeAny, "passthrough">>;
64
43
  export type SessionCreatePayload = z.infer<typeof SessionCreatePayloadSchema>;
65
- /** update-metadata — optimistic-concurrency metadata write. */
44
+
66
45
  export declare const UpdateMetadataPayloadSchema: z.ZodObject<{
67
46
  sessionId: z.ZodString;
68
47
  metadata: z.ZodString;
@@ -77,7 +56,7 @@ export declare const UpdateMetadataPayloadSchema: z.ZodObject<{
77
56
  expectedVersion: z.ZodNumber;
78
57
  }, z.ZodTypeAny, "passthrough">>;
79
58
  export type UpdateMetadataPayload = z.infer<typeof UpdateMetadataPayloadSchema>;
80
- /** context-usage-update — best-effort context-usage snapshot write (no CAS). */
59
+
81
60
  export declare const ContextUsageUpdatePayloadSchema: z.ZodObject<{
82
61
  sessionId: z.ZodString;
83
62
  contextUsage: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -89,7 +68,7 @@ export declare const ContextUsageUpdatePayloadSchema: z.ZodObject<{
89
68
  contextUsage: z.ZodRecord<z.ZodString, z.ZodUnknown>;
90
69
  }, z.ZodTypeAny, "passthrough">>;
91
70
  export type ContextUsageUpdatePayload = z.infer<typeof ContextUsageUpdatePayloadSchema>;
92
- /** update-state — optimistic-concurrency agent-state write. */
71
+
93
72
  export declare const UpdateStatePayloadSchema: z.ZodObject<{
94
73
  sessionId: z.ZodString;
95
74
  agentState: z.ZodString;
@@ -104,11 +83,11 @@ export declare const UpdateStatePayloadSchema: z.ZodObject<{
104
83
  expectedVersion: z.ZodNumber;
105
84
  }, z.ZodTypeAny, "passthrough">>;
106
85
  export type UpdateStatePayload = z.infer<typeof UpdateStatePayloadSchema>;
107
- /** session-alive optionally consumes a server-issued resume takeover reservation. */
86
+
108
87
  export declare const SessionAlivePayloadSchema: z.ZodObject<{
109
88
  sessionId: z.ZodString;
110
89
  takeoverToken: z.ZodOptional<z.ZodString>;
111
- /** RFC-075 proof for same-CLI Socket.IO reconnects. */
90
+
112
91
  ownerInstanceId: z.ZodOptional<z.ZodString>;
113
92
  reconnectKey: z.ZodOptional<z.ZodString>;
114
93
  ownerEpoch: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -117,7 +96,7 @@ export declare const SessionAlivePayloadSchema: z.ZodObject<{
117
96
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
118
97
  sessionId: z.ZodString;
119
98
  takeoverToken: z.ZodOptional<z.ZodString>;
120
- /** RFC-075 proof for same-CLI Socket.IO reconnects. */
99
+
121
100
  ownerInstanceId: z.ZodOptional<z.ZodString>;
122
101
  reconnectKey: z.ZodOptional<z.ZodString>;
123
102
  ownerEpoch: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -126,7 +105,7 @@ export declare const SessionAlivePayloadSchema: z.ZodObject<{
126
105
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
127
106
  sessionId: z.ZodString;
128
107
  takeoverToken: z.ZodOptional<z.ZodString>;
129
- /** RFC-075 proof for same-CLI Socket.IO reconnects. */
108
+
130
109
  ownerInstanceId: z.ZodOptional<z.ZodString>;
131
110
  reconnectKey: z.ZodOptional<z.ZodString>;
132
111
  ownerEpoch: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -134,7 +113,7 @@ export declare const SessionAlivePayloadSchema: z.ZodObject<{
134
113
  runtimeStatus: z.ZodOptional<z.ZodEnum<["idle", "thinking", "tool_running", "permission_required", "disconnected"]>>;
135
114
  }, z.ZodTypeAny, "passthrough">>;
136
115
  export type SessionAlivePayload = z.infer<typeof SessionAlivePayloadSchema>;
137
- /** Read-only web query for the server's short-lived daemon runtime snapshot. */
116
+
138
117
  export declare const GetSessionRuntimeStatusPayloadSchema: z.ZodObject<{
139
118
  sessionId: z.ZodString;
140
119
  }, "strict", z.ZodTypeAny, {
@@ -151,7 +130,7 @@ export declare const SessionDeletePayloadSchema: z.ZodObject<{
151
130
  sessionId: z.ZodString;
152
131
  }, z.ZodTypeAny, "passthrough">>;
153
132
  export type SessionDeletePayload = z.infer<typeof SessionDeletePayloadSchema>;
154
- /** session-end — carries optional summary (was silently dropped by old predicate). */
133
+
155
134
  export declare const SessionEndPayloadSchema: z.ZodObject<{
156
135
  sessionId: z.ZodString;
157
136
  summary: z.ZodOptional<z.ZodString>;
@@ -163,7 +142,7 @@ export declare const SessionEndPayloadSchema: z.ZodObject<{
163
142
  summary: z.ZodOptional<z.ZodString>;
164
143
  }, z.ZodTypeAny, "passthrough">>;
165
144
  export type SessionEndPayload = z.infer<typeof SessionEndPayloadSchema>;
166
- /** User-scoped, explicit terminal action for an unrecoverable managed session. */
145
+
167
146
  export declare const SessionTerminatePayloadSchema: z.ZodObject<{
168
147
  sessionId: z.ZodString;
169
148
  }, "strict", z.ZodTypeAny, {
@@ -172,7 +151,7 @@ export declare const SessionTerminatePayloadSchema: z.ZodObject<{
172
151
  sessionId: string;
173
152
  }>;
174
153
  export type SessionTerminatePayload = z.infer<typeof SessionTerminatePayloadSchema>;
175
- /** rename-session. */
154
+
176
155
  export declare const RenameSessionPayloadSchema: z.ZodObject<{
177
156
  sessionId: z.ZodString;
178
157
  displayName: z.ZodEffects<z.ZodString, string, string>;
@@ -200,7 +179,7 @@ export declare const ClaimAutoSessionTitlePayloadSchema: z.ZodObject<{
200
179
  sessionId: z.ZodString;
201
180
  }, z.ZodTypeAny, "passthrough">>;
202
181
  export type ClaimAutoSessionTitlePayload = z.infer<typeof ClaimAutoSessionTitlePayloadSchema>;
203
- /** message — single message insert. `content` shape validated downstream. */
182
+
204
183
  export declare const MessagePayloadSchema: z.ZodEffects<z.ZodObject<{
205
184
  sessionId: z.ZodString;
206
185
  localId: z.ZodString;
@@ -292,14 +271,14 @@ export declare const BatchMessagePayloadSchema: z.ZodObject<{
292
271
  skipBroadcast: z.ZodOptional<z.ZodBoolean>;
293
272
  }, z.ZodTypeAny, "passthrough">>;
294
273
  export type BatchMessagePayload = z.infer<typeof BatchMessagePayloadSchema>;
295
- /** get-messages — paginated read. */
274
+
296
275
  export declare const GetMessagesPayloadSchema: z.ZodObject<{
297
276
  sessionId: z.ZodString;
298
277
  fromSeq: z.ZodOptional<z.ZodNumber>;
299
278
  beforeSeq: z.ZodOptional<z.ZodNumber>;
300
279
  order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
301
280
  limit: z.ZodOptional<z.ZodNumber>;
302
- /** Use the latest projected clear/compact boundary as the query floor. */
281
+
303
282
  contextCycle: z.ZodOptional<z.ZodLiteral<"latest">>;
304
283
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
305
284
  sessionId: z.ZodString;
@@ -307,7 +286,7 @@ export declare const GetMessagesPayloadSchema: z.ZodObject<{
307
286
  beforeSeq: z.ZodOptional<z.ZodNumber>;
308
287
  order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
309
288
  limit: z.ZodOptional<z.ZodNumber>;
310
- /** Use the latest projected clear/compact boundary as the query floor. */
289
+
311
290
  contextCycle: z.ZodOptional<z.ZodLiteral<"latest">>;
312
291
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
313
292
  sessionId: z.ZodString;
@@ -315,27 +294,11 @@ export declare const GetMessagesPayloadSchema: z.ZodObject<{
315
294
  beforeSeq: z.ZodOptional<z.ZodNumber>;
316
295
  order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
317
296
  limit: z.ZodOptional<z.ZodNumber>;
318
- /** Use the latest projected clear/compact boundary as the query floor. */
297
+
319
298
  contextCycle: z.ZodOptional<z.ZodLiteral<"latest">>;
320
299
  }, z.ZodTypeAny, "passthrough">>;
321
300
  export type GetMessagesPayload = z.infer<typeof GetMessagesPayloadSchema>;
322
- /**
323
- * session-status — daemon's fire-and-forget status ping.
324
- *
325
- * NOTE: `status` here is a free string, NOT the `SessionStatusSchema` enum in
326
- * machine.ts — that enum omits `turn-completed`, which the daemon DOES send.
327
- * The set below is the daemon's actual vocabulary.
328
- *
329
- * SECURITY — this schema is `.strict()` ON PURPOSE (the only inbound schema that
330
- * is). IM notifications derived from this event are delivered to third-party
331
- * webhooks (Feishu/DingTalk). This channel must carry NOTHING but the two fields
332
- * below — no conversation content, no summary, no message text, no future field
333
- * that might smuggle sensitive data out. `.strict()` REJECTS any extra field
334
- * (loudly, not silently), so the day someone tries to attach `summary` /
335
- * `context` / `lastMessage` / anything else, their code fails here and they are
336
- * forced to ask "can this field leave the machine?". Default-deny, then allow.
337
- * Do NOT relax this to `.passthrough()`. See docs/spec/notification-im.md.
338
- */
301
+
339
302
  export declare const INBOUND_SESSION_STATUSES: readonly ["idle", "thinking", "tool_running", "permission_required", "disconnected", "turn-completed"];
340
303
  export declare const SessionStatusPayloadSchema: z.ZodObject<{
341
304
  sessionId: z.ZodString;
@@ -348,12 +311,7 @@ export declare const SessionStatusPayloadSchema: z.ZodObject<{
348
311
  sessionId: string;
349
312
  }>;
350
313
  export type SessionStatusPayload = z.infer<typeof SessionStatusPayloadSchema>;
351
- /**
352
- * machine-register — daemon reports its identity + capabilities on connect.
353
- * Mirrors daemon's MachineRegisterInfo; only hostname/platform are required.
354
- * All capability fields are optional and additive (passthrough tolerates new
355
- * ones a newer daemon may add).
356
- */
314
+
357
315
  export declare const MachineRegisterPayloadSchema: z.ZodObject<{
358
316
  hostname: z.ZodString;
359
317
  platform: z.ZodString;
@@ -397,7 +355,7 @@ export declare const MachineRegisterPayloadSchema: z.ZodObject<{
397
355
  id: z.ZodString;
398
356
  label: z.ZodString;
399
357
  }, z.ZodTypeAny, "passthrough">>, "many">>>;
400
- /** Daemon feature flags (RFC-081 `account-language`, etc.). Additive — server gates feature injection on these. */
358
+
401
359
  capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
402
360
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
403
361
  hostname: z.ZodString;
@@ -442,7 +400,7 @@ export declare const MachineRegisterPayloadSchema: z.ZodObject<{
442
400
  id: z.ZodString;
443
401
  label: z.ZodString;
444
402
  }, z.ZodTypeAny, "passthrough">>, "many">>>;
445
- /** Daemon feature flags (RFC-081 `account-language`, etc.). Additive — server gates feature injection on these. */
403
+
446
404
  capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
447
405
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
448
406
  hostname: z.ZodString;
@@ -487,11 +445,11 @@ export declare const MachineRegisterPayloadSchema: z.ZodObject<{
487
445
  id: z.ZodString;
488
446
  label: z.ZodString;
489
447
  }, z.ZodTypeAny, "passthrough">>, "many">>>;
490
- /** Daemon feature flags (RFC-081 `account-language`, etc.). Additive — server gates feature injection on these. */
448
+
491
449
  capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
492
450
  }, z.ZodTypeAny, "passthrough">>;
493
451
  export type MachineRegisterPayload = z.infer<typeof MachineRegisterPayloadSchema>;
494
- /** register-history-sessions — RFC-016 history sync batch. */
452
+
495
453
  export declare const HistorySessionEntrySchema: z.ZodObject<{
496
454
  claudeSessionId: z.ZodString;
497
455
  projectPath: z.ZodString;
@@ -598,4 +556,3 @@ export declare const RegisterHistorySessionsPayloadSchema: z.ZodObject<{
598
556
  }, z.ZodTypeAny, "passthrough">>, "many">;
599
557
  }, z.ZodTypeAny, "passthrough">>;
600
558
  export type RegisterHistorySessionsPayload = z.infer<typeof RegisterHistorySessionsPayloadSchema>;
601
- //# sourceMappingURL=inboundEvents.d.ts.map
package/dist/index.d.ts CHANGED
@@ -19,17 +19,18 @@ export { UserMessageSchema, AgentMessageSchema, LegacyMessageContentSchema, } fr
19
19
  export type { UserMessage, AgentMessage, LegacyMessageContent } from './legacyProtocol.js';
20
20
  export { VersionedEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VersionedMachineEncryptedValueSchema, UpdateNewMessageBodySchema, UpdateSessionBodySchema, UpdateMachineBodySchema, UpdateSessionResetBodySchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, } from './sync.js';
21
21
  export type { VersionedEncryptedValue, VersionedNullableEncryptedValue, VersionedMachineEncryptedValue, UpdateNewMessageBody, UpdateSessionBody, UpdateMachineBody, UpdateSessionResetBody, CoreUpdateBody, CoreUpdateContainer, } from './sync.js';
22
- export { RpcMethod, type RpcMethodType, SESSION_RPC_METHODS, MACHINE_RPC_METHODS, DAEMON_REQUIRED_RPC_METHODS, RpcCallSchema, RpcResultSchema, SpawnSessionParamsSchema, GetMessagesParamsSchema, GetMessagesResponseSchema, MachineInfoResponseSchema, CheckPathParamsSchema, AGENT_ENV_NONE, AgentEnvConfigSchema, AgentEnvConfigSetSchema, AgentSettingsSchema, SetAgentSettingsSchema, LabsSettingsSchema, CustomModelSchema, SkillDefinitionSchema, AiHelperConfigSchema, LocalAiHelperConfigSchema, LocalAgentSettingsSchema, AiHelperPayloadSchema, AiHelperDecryptedPayloadSchema, AiHelperParamsSchema, } from './rpc.js';
22
+ export { RpcMethod, type RpcMethodType, SESSION_RPC_METHODS, MACHINE_RPC_METHODS, DAEMON_REQUIRED_RPC_METHODS, RpcCallSchema, RpcResultSchema, SpawnSessionParamsSchema, GetMessagesParamsSchema, GetMessagesResponseSchema, MachineInfoResponseSchema, CheckPathParamsSchema, AGENT_ENV_NONE, AgentEnvConfigSchema, AgentEnvConfigSetSchema, AgentSettingsSchema, SetAgentSettingsSchema, LabsSettingsSchema, CustomModelSchema, SkillDefinitionSchema, AiHelperConfigSchema, LocalAiHelperConfigSchema, LocalAgentSettingsSchema, AiHelperPayloadSchema, AiHelperDecryptedPayloadSchema, AiHelperParamsSchema, AiHelperCancelParamsSchema, } from './rpc.js';
23
23
  export { HANDOFF_BRIEF_TEMPLATE, HANDOFF_BRIEF_TEMPLATE_ZH, HANDOFF_BRIEF_REQUIREMENTS, HANDOFF_SOURCE_REFERENCE_GUIDANCE, SESSION_DELIVERY_TEMPLATE, SESSION_DELIVERY_TEMPLATE_ZH, sessionDeliveryTemplate, SESSION_DELIVERY_REQUIREMENTS, HandoffBriefSchema, getMissingHandoffBriefSections, } from './handoffBrief.js';
24
24
  export { SESSION_HANDOFF_CAPABILITY, HandoffProposalContentSchema, HandoffProposalCreateSchema, HandoffProposalStatusSchema, HandoffProposalContentEnvelopeSchema, HandoffProposalRecordSchema, InheritedDeliverySummarySchema, SessionHandoffContextSchema, AccountDeliveryRowSchema, AccountDeliveryPageSchema, DeliveryConsumerSchema, } from './workItems.js';
25
25
  export type { HandoffProposalContent, HandoffProposalCreate, HandoffProposalRecord, HandoffProposalStatus, HandoffProposalContentEnvelope, InheritedDeliverySummary, SessionHandoffContext, AccountDeliveryRow, AccountDeliveryPage, DeliveryConsumer, } from './workItems.js';
26
- export type { RpcCall, RpcResult, SpawnSessionParams, CheckPathParams, GetMessagesParams, GetMessagesResponse, MachineInfoResponse, AgentEnvConfig, AgentSettings, LabsSettings, CustomModel, SkillDefinition, AiHelperConfig, LocalAiHelperConfig, LocalAgentSettings, AiHelperParams, } from './rpc.js';
26
+ export type { RpcCall, RpcResult, SpawnSessionParams, CheckPathParams, GetMessagesParams, GetMessagesResponse, MachineInfoResponse, AgentEnvConfig, AgentSettings, LabsSettings, CustomModel, SkillDefinition, AiHelperConfig, LocalAiHelperConfig, LocalAgentSettings, AiHelperParams, AiHelperCancelParams, } from './rpc.js';
27
+ export * from './enterprisePolicyExports.js';
27
28
  export { AGENT_CAPABILITIES, getAgentCapability, updateDynamicModes, getDynamicModes, normalizeModelId, NATIVE_MODE_TO_POLICY, resolvePolicyMode, } from './agentCapabilities.js';
28
29
  export type { AgentCapability, AgentPermissionMode, AgentModelOption, ModelSource, } from './agentCapabilities.js';
29
30
  export { ModelUsageEntrySchema, DailyActivitySchema, DailyModelTokensSchema, LongestSessionSchema, ClaudeStatsDataSchema, ProjectSummarySchema, StatsOverviewSchema, AgentTypeUsageSchema, AgentSessionUsageEntrySchema, AgentSessionUsageResponseSchema, ActivityUploadSchema, UsageReportSchema, TokenTrendPointSchema, ModelBreakdownEntrySchema, QuotaConfigSchema, } from './stats.js';
30
- export type { StatsOverview, ClaudeStatsData, ProjectSummary, ModelUsageEntry as WireModelUsageEntry, // AS-CAST-OK: export alias renames type, not a type assertion
31
- DailyActivity as WireDailyActivity, // AS-CAST-OK: export alias renames type, not a type assertion
32
- LongestSession as WireLongestSession, // AS-CAST-OK: export alias renames type, not a type assertion
31
+ export type { StatsOverview, ClaudeStatsData, ProjectSummary, ModelUsageEntry as WireModelUsageEntry,
32
+ DailyActivity as WireDailyActivity,
33
+ LongestSession as WireLongestSession,
33
34
  AgentTypeUsage, AgentSessionUsageEntry, AgentSessionUsageResponse, ActivityUpload, UsageReport, TokenTrendPoint, ModelBreakdownEntry, QuotaConfig, QuotaStatusSchema, QuotaStatus, } from './stats.js';
34
35
  export { ControlLevel } from './controlLevel.js';
35
36
  export type { ControlLevelType } from './controlLevel.js';
@@ -69,6 +70,7 @@ export * from './checkpointSchemas.js';
69
70
  export { SourceMetadataSchema } from './sourceMetadata.js';
70
71
  export type { SourceMetadata } from './sourceMetadata.js';
71
72
  export * from './gateway.js';
73
+ export * from './enterpriseRuntime.js';
72
74
  export { OpsRpcMessageSchema, OpsMethodSchema, OpsRpcTypeSchema, DockerImageRefSchema, FileEntrySchema, FileStatSchema, StorageUsageSchema, SyncUserSchema, SyncFullPayloadSchema, SyncUserCreatedPayloadSchema, SyncContainerStatusPayloadSchema, SyncUserPairedPayloadSchema, type OpsRpcMessage, type OpsMethod, type OpsRpcType, type DockerImageRef, type OpsTunnelMetrics, type FileEntry, type FileStat, type StorageUsage, type SyncUser, type SyncFullPayload, type SyncUserCreatedPayload, type SyncContainerStatusPayload, type SyncUserPairedPayload, } from './ops.js';
73
75
  export * from './edition.js';
74
76
  export { LicensePayloadSchema, LicenseFileSchema, EnterpriseLicenseSchema, PrivateLicenseSchema, } from './license.js';
@@ -82,4 +84,3 @@ export interface SetupProgress {
82
84
  readonly user: boolean;
83
85
  }
84
86
  export type { ActivityPreferences } from './activityPreferences.js';
85
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";export{ACCOUNT_LANGUAGES,DEFAULT_ACCOUNT_LANGUAGE,ACCOUNT_LANGUAGE_CAPABILITY,AccountLanguageSchema,AccountLanguageRequestSchema,AccountLanguageResponseSchema,isAccountLanguage}from"./accountLanguage.js";export{parseSessionTitleFromTag,resolveSessionTitle,stripSessionTitleShortId}from"./sessionTitle.js";export{SessionTextEventSchema,SessionServiceEventSchema,SessionToolCallStartEventSchema,SessionToolCallEndEventSchema,SessionFileEventSchema,SessionTurnStartEventSchema,SessionTurnEndEventSchema,SessionTurnEndStatusSchema,TurnUsageSchema,SessionStartEventSchema,SessionStopEventSchema,SessionEventSchema,SessionPermissionResolvedEventSchema,PermissionActionSchema,SessionImageEventSchema,ImageAttachmentSchema,SessionContextUsageEventSchema,SessionCompactBoundaryEventSchema,emptyContextUsageSnapshot}from"./events.js";export{QuestionOptionSchema,SessionQuestionEventSchema,SessionPermissionRequestEventSchema,SessionAnswerEventSchema,AnswerQuestionParamsSchema,ApprovePermissionParamsSchema,DenyPermissionParamsSchema,PermissionModeSchema}from"./interactionEvents.js";export{SessionRoleSchema,SessionEnvelopeSchema,createEnvelope}from"./envelope.js";export{NotificationEventTypeSchema,DispatchNotificationParamsSchema}from"./notification.js";export{AgentTypeSchema,MessageMetaSchema,AGENT_TYPES,SPAWNABLE_AGENTS,CLI_AGENT_TYPES}from"./messageMeta.js";export{AGENT_SUPPORTS_IMAGES,AGENT_DISPLAY_NAMES}from"./messageMeta.js";export{SessionContextBoundaryKindSchema,getSessionContextBoundary,SessionMessageContentSchema,SessionMessageSchema,SessionProtocolMessageSchema,MessageContentSchema}from"./messages.js";export*from"./sessionBtw.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,AgentEnvConfigSetSchema,AgentSettingsSchema,SetAgentSettingsSchema,LabsSettingsSchema,CustomModelSchema,SkillDefinitionSchema,AiHelperConfigSchema,LocalAiHelperConfigSchema,LocalAgentSettingsSchema,AiHelperPayloadSchema,AiHelperDecryptedPayloadSchema,AiHelperParamsSchema}from"./rpc.js";export{HANDOFF_BRIEF_TEMPLATE,HANDOFF_BRIEF_TEMPLATE_ZH,HANDOFF_BRIEF_REQUIREMENTS,HANDOFF_SOURCE_REFERENCE_GUIDANCE,SESSION_DELIVERY_TEMPLATE,SESSION_DELIVERY_TEMPLATE_ZH,sessionDeliveryTemplate,SESSION_DELIVERY_REQUIREMENTS,HandoffBriefSchema,getMissingHandoffBriefSections}from"./handoffBrief.js";export{SESSION_HANDOFF_CAPABILITY,HandoffProposalContentSchema,HandoffProposalCreateSchema,HandoffProposalStatusSchema,HandoffProposalContentEnvelopeSchema,HandoffProposalRecordSchema,InheritedDeliverySummarySchema,SessionHandoffContextSchema,AccountDeliveryRowSchema,AccountDeliveryPageSchema,DeliveryConsumerSchema}from"./workItems.js";export{AGENT_CAPABILITIES,getAgentCapability,updateDynamicModes,getDynamicModes,normalizeModelId,NATIVE_MODE_TO_POLICY,resolvePolicyMode}from"./agentCapabilities.js";export{ModelUsageEntrySchema,DailyActivitySchema,DailyModelTokensSchema,LongestSessionSchema,ClaudeStatsDataSchema,ProjectSummarySchema,StatsOverviewSchema,AgentTypeUsageSchema,AgentSessionUsageEntrySchema,AgentSessionUsageResponseSchema,ActivityUploadSchema,UsageReportSchema,TokenTrendPointSchema,ModelBreakdownEntrySchema,QuotaConfigSchema}from"./stats.js";export{ControlLevel}from"./controlLevel.js";export{TEXT_EXTS,CODE_EXTS,DOC_EXTS,IMG_EXTS,FILE_CATEGORY_MAX_SIZE,BLOCKED_EXTS,ALLOWED_EXTENSIONS,FILE_SIGNATURES,getFileExt,resolveFileCategory,verifyMagicBytes}from"./fileWhitelist.js";export{PairingState,PairingRequestSchema,PairingResponseSchema,PairingExchangeSchema,PairingDeliverSchema,PairingStatusSchema,parseVersionByte,encodeVersionByte,CURRENT_DERIVATION_VERSION}from"./pairing.js";export{PlatformSchema,SessionStatusSchema,MachineSummarySchema,MachineRegisterResultSchema}from"./machine.js";export{SessionCreatePayloadSchema,UpdateMetadataPayloadSchema,UpdateStatePayloadSchema,ContextUsageUpdatePayloadSchema,SessionAlivePayloadSchema,GetSessionRuntimeStatusPayloadSchema,SessionDeletePayloadSchema,SessionEndPayloadSchema,SessionTerminatePayloadSchema,RenameSessionPayloadSchema,SessionContextResetPayloadSchema,ClaimAutoSessionTitlePayloadSchema,MessagePayloadSchema,BatchMessagePayloadSchema,GetMessagesPayloadSchema,SessionStatusPayloadSchema,MachineRegisterPayloadSchema,RegisterHistorySessionsPayloadSchema,HistorySessionEntrySchema,INBOUND_SESSION_STATUSES}from"./inboundEvents.js";export{FEATURE_REGISTRY,isFeatureAvailable,getUnavailableFeatures,isSubFeatureAvailable,getSubFeatureMinVersion,getFeatureMinVersion}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,TaskTriggerTypeSchema,TaskResultSchema,TaskStatsSchema,TaskExecutionBarSchema,TaskCardStatsSchema,CreateScheduledTaskSchema,UpdateScheduledTaskSchema,ScheduledTaskSummarySchema,TaskExecutionSchema,TriggerCallSchema,TriggerExecutionSchema,RegenerateTokenResponseSchema,CRON_RE}from"./scheduledTasks.js";export{TASK_RESULT_PREFIX,serializeTaskResult,parseTaskResultPayload,extractTaskResultFromText}from"./taskResult.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{BG_TASK_PREFIX,encodeBgTask,parseBgTask,isBgTaskLifecycleLine}from"./bgTask.js";export{BASH_TOOL_NAMES,isBashToolName,extractCommandSubject,MIN_SUBJECT_LENGTH}from"./permissionSubject.js";export{SOCKET_EVENTS}from"./socketEvents.js";export{TelemetryEventTypeSchema,TelemetryEventSchema,TelemetryReportPayloadSchema,sanitizeContext}from"./telemetry.js";export*from"./checkpointSchemas.js";export{SourceMetadataSchema}from"./sourceMetadata.js";export*from"./gateway.js";export{OpsRpcMessageSchema,OpsMethodSchema,OpsRpcTypeSchema,DockerImageRefSchema,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,RunModeSchema,RunModesSchema,BugFieldsSchema,SettingsSnapshotSchema}from"./feedback.js";
1
+ "use strict";export{ACCOUNT_LANGUAGES,DEFAULT_ACCOUNT_LANGUAGE,ACCOUNT_LANGUAGE_CAPABILITY,AccountLanguageSchema,AccountLanguageRequestSchema,AccountLanguageResponseSchema,isAccountLanguage}from"./accountLanguage.js";export{parseSessionTitleFromTag,resolveSessionTitle,stripSessionTitleShortId}from"./sessionTitle.js";export{SessionTextEventSchema,SessionServiceEventSchema,SessionToolCallStartEventSchema,SessionToolCallEndEventSchema,SessionFileEventSchema,SessionTurnStartEventSchema,SessionTurnEndEventSchema,SessionTurnEndStatusSchema,TurnUsageSchema,SessionStartEventSchema,SessionStopEventSchema,SessionEventSchema,SessionPermissionResolvedEventSchema,PermissionActionSchema,SessionImageEventSchema,ImageAttachmentSchema,SessionContextUsageEventSchema,SessionCompactBoundaryEventSchema,emptyContextUsageSnapshot}from"./events.js";export{QuestionOptionSchema,SessionQuestionEventSchema,SessionPermissionRequestEventSchema,SessionAnswerEventSchema,AnswerQuestionParamsSchema,ApprovePermissionParamsSchema,DenyPermissionParamsSchema,PermissionModeSchema}from"./interactionEvents.js";export{SessionRoleSchema,SessionEnvelopeSchema,createEnvelope}from"./envelope.js";export{NotificationEventTypeSchema,DispatchNotificationParamsSchema}from"./notification.js";export{AgentTypeSchema,MessageMetaSchema,AGENT_TYPES,SPAWNABLE_AGENTS,CLI_AGENT_TYPES}from"./messageMeta.js";export{AGENT_SUPPORTS_IMAGES,AGENT_DISPLAY_NAMES}from"./messageMeta.js";export{SessionContextBoundaryKindSchema,getSessionContextBoundary,SessionMessageContentSchema,SessionMessageSchema,SessionProtocolMessageSchema,MessageContentSchema}from"./messages.js";export*from"./sessionBtw.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,AgentEnvConfigSetSchema,AgentSettingsSchema,SetAgentSettingsSchema,LabsSettingsSchema,CustomModelSchema,SkillDefinitionSchema,AiHelperConfigSchema,LocalAiHelperConfigSchema,LocalAgentSettingsSchema,AiHelperPayloadSchema,AiHelperDecryptedPayloadSchema,AiHelperParamsSchema,AiHelperCancelParamsSchema}from"./rpc.js";export{HANDOFF_BRIEF_TEMPLATE,HANDOFF_BRIEF_TEMPLATE_ZH,HANDOFF_BRIEF_REQUIREMENTS,HANDOFF_SOURCE_REFERENCE_GUIDANCE,SESSION_DELIVERY_TEMPLATE,SESSION_DELIVERY_TEMPLATE_ZH,sessionDeliveryTemplate,SESSION_DELIVERY_REQUIREMENTS,HandoffBriefSchema,getMissingHandoffBriefSections}from"./handoffBrief.js";export{SESSION_HANDOFF_CAPABILITY,HandoffProposalContentSchema,HandoffProposalCreateSchema,HandoffProposalStatusSchema,HandoffProposalContentEnvelopeSchema,HandoffProposalRecordSchema,InheritedDeliverySummarySchema,SessionHandoffContextSchema,AccountDeliveryRowSchema,AccountDeliveryPageSchema,DeliveryConsumerSchema}from"./workItems.js";export*from"./enterprisePolicyExports.js";export{AGENT_CAPABILITIES,getAgentCapability,updateDynamicModes,getDynamicModes,normalizeModelId,NATIVE_MODE_TO_POLICY,resolvePolicyMode}from"./agentCapabilities.js";export{ModelUsageEntrySchema,DailyActivitySchema,DailyModelTokensSchema,LongestSessionSchema,ClaudeStatsDataSchema,ProjectSummarySchema,StatsOverviewSchema,AgentTypeUsageSchema,AgentSessionUsageEntrySchema,AgentSessionUsageResponseSchema,ActivityUploadSchema,UsageReportSchema,TokenTrendPointSchema,ModelBreakdownEntrySchema,QuotaConfigSchema}from"./stats.js";export{ControlLevel}from"./controlLevel.js";export{TEXT_EXTS,CODE_EXTS,DOC_EXTS,IMG_EXTS,FILE_CATEGORY_MAX_SIZE,BLOCKED_EXTS,ALLOWED_EXTENSIONS,FILE_SIGNATURES,getFileExt,resolveFileCategory,verifyMagicBytes}from"./fileWhitelist.js";export{PairingState,PairingRequestSchema,PairingResponseSchema,PairingExchangeSchema,PairingDeliverSchema,PairingStatusSchema,parseVersionByte,encodeVersionByte,CURRENT_DERIVATION_VERSION}from"./pairing.js";export{PlatformSchema,SessionStatusSchema,MachineSummarySchema,MachineRegisterResultSchema}from"./machine.js";export{SessionCreatePayloadSchema,UpdateMetadataPayloadSchema,UpdateStatePayloadSchema,ContextUsageUpdatePayloadSchema,SessionAlivePayloadSchema,GetSessionRuntimeStatusPayloadSchema,SessionDeletePayloadSchema,SessionEndPayloadSchema,SessionTerminatePayloadSchema,RenameSessionPayloadSchema,SessionContextResetPayloadSchema,ClaimAutoSessionTitlePayloadSchema,MessagePayloadSchema,BatchMessagePayloadSchema,GetMessagesPayloadSchema,SessionStatusPayloadSchema,MachineRegisterPayloadSchema,RegisterHistorySessionsPayloadSchema,HistorySessionEntrySchema,INBOUND_SESSION_STATUSES}from"./inboundEvents.js";export{FEATURE_REGISTRY,isFeatureAvailable,getUnavailableFeatures,isSubFeatureAvailable,getSubFeatureMinVersion,getFeatureMinVersion}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,TaskTriggerTypeSchema,TaskResultSchema,TaskStatsSchema,TaskExecutionBarSchema,TaskCardStatsSchema,CreateScheduledTaskSchema,UpdateScheduledTaskSchema,ScheduledTaskSummarySchema,TaskExecutionSchema,TriggerCallSchema,TriggerExecutionSchema,RegenerateTokenResponseSchema,CRON_RE}from"./scheduledTasks.js";export{TASK_RESULT_PREFIX,serializeTaskResult,parseTaskResultPayload,extractTaskResultFromText}from"./taskResult.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{BG_TASK_PREFIX,encodeBgTask,parseBgTask,isBgTaskLifecycleLine}from"./bgTask.js";export{BASH_TOOL_NAMES,isBashToolName,extractCommandSubject,MIN_SUBJECT_LENGTH}from"./permissionSubject.js";export{SOCKET_EVENTS}from"./socketEvents.js";export{TelemetryEventTypeSchema,TelemetryEventSchema,TelemetryReportPayloadSchema,sanitizeContext}from"./telemetry.js";export*from"./checkpointSchemas.js";export{SourceMetadataSchema}from"./sourceMetadata.js";export*from"./gateway.js";export*from"./enterpriseRuntime.js";export{OpsRpcMessageSchema,OpsMethodSchema,OpsRpcTypeSchema,DockerImageRefSchema,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,RunModeSchema,RunModesSchema,BugFieldsSchema,SettingsSnapshotSchema}from"./feedback.js";