@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
@@ -947,9 +947,9 @@ export declare const TaskExecutionSchema: z.ZodObject<{
947
947
  error: z.ZodNullable<z.ZodString>;
948
948
  retryCount: z.ZodNumber;
949
949
  reworkCount: z.ZodNumber;
950
- /** Takeover state (自动→人工介入): "none" | "pending" | "done". */
950
+
951
951
  takeoverState: z.ZodOptional<z.ZodString>;
952
- /** Managed session id produced by takeover (set when takeoverState='done'). */
952
+
953
953
  takeoverSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
954
954
  summary: z.ZodNullable<z.ZodString>;
955
955
  resultData: z.ZodNullable<z.ZodObject<{
@@ -990,9 +990,9 @@ export declare const TaskExecutionSchema: z.ZodObject<{
990
990
  error: z.ZodNullable<z.ZodString>;
991
991
  retryCount: z.ZodNumber;
992
992
  reworkCount: z.ZodNumber;
993
- /** Takeover state (自动→人工介入): "none" | "pending" | "done". */
993
+
994
994
  takeoverState: z.ZodOptional<z.ZodString>;
995
- /** Managed session id produced by takeover (set when takeoverState='done'). */
995
+
996
996
  takeoverSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
997
997
  summary: z.ZodNullable<z.ZodString>;
998
998
  resultData: z.ZodNullable<z.ZodObject<{
@@ -1033,9 +1033,9 @@ export declare const TaskExecutionSchema: z.ZodObject<{
1033
1033
  error: z.ZodNullable<z.ZodString>;
1034
1034
  retryCount: z.ZodNumber;
1035
1035
  reworkCount: z.ZodNumber;
1036
- /** Takeover state (自动→人工介入): "none" | "pending" | "done". */
1036
+
1037
1037
  takeoverState: z.ZodOptional<z.ZodString>;
1038
- /** Managed session id produced by takeover (set when takeoverState='done'). */
1038
+
1039
1039
  takeoverSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1040
1040
  summary: z.ZodNullable<z.ZodString>;
1041
1041
  resultData: z.ZodNullable<z.ZodObject<{
@@ -1066,7 +1066,7 @@ export declare const TaskExecutionSchema: z.ZodObject<{
1066
1066
  createdAt: z.ZodString;
1067
1067
  }, z.ZodTypeAny, "passthrough">>;
1068
1068
  export type TaskExecution = z.infer<typeof TaskExecutionSchema>;
1069
- /** POST /v1/triggers/:token request body */
1069
+
1070
1070
  export declare const TriggerCallSchema: z.ZodObject<{
1071
1071
  context: z.ZodOptional<z.ZodString>;
1072
1072
  }, "strict", z.ZodTypeAny, {
@@ -1075,7 +1075,7 @@ export declare const TriggerCallSchema: z.ZodObject<{
1075
1075
  context?: string | undefined;
1076
1076
  }>;
1077
1077
  export type TriggerCall = z.infer<typeof TriggerCallSchema>;
1078
- /** GET /v1/triggers/:token/execution response */
1078
+
1079
1079
  export declare const TriggerExecutionSchema: z.ZodObject<{
1080
1080
  executionId: z.ZodString;
1081
1081
  status: z.ZodEnum<["pending", "running", "completed", "failed", "lost", "skipped", "cancelled"]>;
@@ -1099,7 +1099,7 @@ export declare const TriggerExecutionSchema: z.ZodObject<{
1099
1099
  error: z.ZodNullable<z.ZodString>;
1100
1100
  }, z.ZodTypeAny, "passthrough">>;
1101
1101
  export type TriggerExecution = z.infer<typeof TriggerExecutionSchema>;
1102
- /** POST /v1/scheduled-tasks/:id/regenerate-token response */
1102
+
1103
1103
  export declare const RegenerateTokenResponseSchema: z.ZodObject<{
1104
1104
  triggerToken: z.ZodString;
1105
1105
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -1108,4 +1108,3 @@ export declare const RegenerateTokenResponseSchema: z.ZodObject<{
1108
1108
  triggerToken: z.ZodString;
1109
1109
  }, z.ZodTypeAny, "passthrough">>;
1110
1110
  export type RegenerateTokenResponse = z.infer<typeof RegenerateTokenResponseSchema>;
1111
- //# sourceMappingURL=scheduledTasks.d.ts.map
package/dist/semver.d.ts CHANGED
@@ -1,31 +1,12 @@
1
- /**
2
- * Minimal semver comparison utility.
3
- *
4
- * Handles standard semver (major.minor.patch) plus optional pre-release
5
- * suffixes like `-alpha.1`. No npm dependency needed.
6
- */
7
- /** Parsed semver components. */
8
1
  export interface SemverParts {
9
2
  readonly major: number;
10
3
  readonly minor: number;
11
4
  readonly patch: number;
12
5
  readonly prerelease: string | undefined;
13
6
  }
14
- /**
15
- * Parse a version string into its components.
16
- *
17
- * @returns SemverParts or null if the string doesn't contain a valid version.
18
- */
7
+
19
8
  export declare function parseSemver(version: string): SemverParts | null;
20
- /**
21
- * Compare two semver version strings.
22
- *
23
- * @returns -1 if a < b, 0 if a === b, 1 if a > b.
24
- * Returns 0 if either version cannot be parsed.
25
- */
9
+
26
10
  export declare function compareVersions(a: string, b: string): -1 | 0 | 1;
27
- /**
28
- * Check if version `a` satisfies `>= minVersion`.
29
- */
11
+
30
12
  export declare function satisfiesMin(version: string, minVersion: string): boolean;
31
- //# sourceMappingURL=semver.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const SessionBtwStatusSchema: z.ZodEnum<["pending", "succeeded", "failed"]>;
3
- export declare const SessionBtwErrorCodeSchema: z.ZodEnum<["context-history-unavailable", "context-too-large", "ai-helper-not-enabled", "ai-helper-config-invalid", "ai-helper-dek-unavailable", "authentication-failed", "quota-exceeded", "timeout", "protocol-incompatible", "upstream-failed", "execution-failed", "empty-response"]>;
3
+ export declare const SessionBtwErrorCodeSchema: z.ZodEnum<["context-history-unavailable", "context-too-large", "ai-helper-not-enabled", "ai-helper-config-invalid", "ai-helper-dek-unavailable", "authentication-failed", "quota-exceeded", "timeout", "protocol-incompatible", "upstream-failed", "execution-failed", "cancelled", "empty-response"]>;
4
4
  export declare const SessionBtwRecordSchema: z.ZodObject<{
5
5
  id: z.ZodString;
6
6
  sessionId: z.ZodString;
@@ -138,16 +138,15 @@ export declare const SessionBtwOutcomeSchema: z.ZodDiscriminatedUnion<"kind", [z
138
138
  }>, z.ZodObject<{
139
139
  format: z.ZodLiteral<1>;
140
140
  kind: z.ZodLiteral<"error">;
141
- code: z.ZodEnum<["context-history-unavailable", "context-too-large", "ai-helper-not-enabled", "ai-helper-config-invalid", "ai-helper-dek-unavailable", "authentication-failed", "quota-exceeded", "timeout", "protocol-incompatible", "upstream-failed", "execution-failed", "empty-response"]>;
141
+ code: z.ZodEnum<["context-history-unavailable", "context-too-large", "ai-helper-not-enabled", "ai-helper-config-invalid", "ai-helper-dek-unavailable", "authentication-failed", "quota-exceeded", "timeout", "protocol-incompatible", "upstream-failed", "execution-failed", "cancelled", "empty-response"]>;
142
142
  }, "strict", z.ZodTypeAny, {
143
- code: "timeout" | "context-history-unavailable" | "context-too-large" | "ai-helper-not-enabled" | "ai-helper-config-invalid" | "ai-helper-dek-unavailable" | "authentication-failed" | "quota-exceeded" | "protocol-incompatible" | "upstream-failed" | "execution-failed" | "empty-response";
143
+ code: "cancelled" | "timeout" | "context-history-unavailable" | "context-too-large" | "ai-helper-not-enabled" | "ai-helper-config-invalid" | "ai-helper-dek-unavailable" | "authentication-failed" | "quota-exceeded" | "protocol-incompatible" | "upstream-failed" | "execution-failed" | "empty-response";
144
144
  format: 1;
145
145
  kind: "error";
146
146
  }, {
147
- code: "timeout" | "context-history-unavailable" | "context-too-large" | "ai-helper-not-enabled" | "ai-helper-config-invalid" | "ai-helper-dek-unavailable" | "authentication-failed" | "quota-exceeded" | "protocol-incompatible" | "upstream-failed" | "execution-failed" | "empty-response";
147
+ code: "cancelled" | "timeout" | "context-history-unavailable" | "context-too-large" | "ai-helper-not-enabled" | "ai-helper-config-invalid" | "ai-helper-dek-unavailable" | "authentication-failed" | "quota-exceeded" | "protocol-incompatible" | "upstream-failed" | "execution-failed" | "empty-response";
148
148
  format: 1;
149
149
  kind: "error";
150
150
  }>]>;
151
151
  export type SessionBtwRecord = z.infer<typeof SessionBtwRecordSchema>;
152
152
  export type SessionBtwErrorCode = z.infer<typeof SessionBtwErrorCodeSchema>;
153
- //# sourceMappingURL=sessionBtw.d.ts.map
@@ -1 +1 @@
1
- "use strict";import{z as e}from"zod";export const SessionBtwStatusSchema=e.enum(["pending","succeeded","failed"]),SessionBtwErrorCodeSchema=e.enum(["context-history-unavailable","context-too-large","ai-helper-not-enabled","ai-helper-config-invalid","ai-helper-dek-unavailable","authentication-failed","quota-exceeded","timeout","protocol-incompatible","upstream-failed","execution-failed","empty-response"]),SessionBtwRecordSchema=e.object({id:e.string().min(1),sessionId:e.string().min(1).max(128),operationId:e.string().uuid(),anchorSeq:e.number().int().nonnegative().nullable(),questionCiphertext:e.string().min(1).max(1e5),outcomeCiphertext:e.string().min(1).max(1e5).nullable(),status:SessionBtwStatusSchema,createdAt:e.string().datetime(),updatedAt:e.string().datetime()}).strict(),SessionBtwListSchema=e.object({sessionId:e.string().min(1).max(128),anchorAtOrAfter:e.number().int().nonnegative().optional(),anchorAtOrBefore:e.number().int().nonnegative().optional(),includeUnanchored:e.boolean().optional(),cursor:e.string().min(1).max(256).optional(),limit:e.number().int().min(1).max(100).default(100)}).strict().refine(t=>t.anchorAtOrAfter===void 0||t.anchorAtOrBefore===void 0||t.anchorAtOrAfter<=t.anchorAtOrBefore,{message:"anchor range is invalid"}),SessionBtwCreateSchema=e.object({sessionId:e.string().min(1).max(128),operationId:e.string().uuid(),anchorSeq:e.number().int().nonnegative().nullable(),questionCiphertext:e.string().min(1).max(1e5)}).strict(),SessionBtwCompleteSchema=e.object({id:e.string().min(1),sessionId:e.string().min(1).max(128),operationId:e.string().uuid(),status:e.enum(["succeeded","failed"]),outcomeCiphertext:e.string().min(1).max(1e5)}).strict(),SessionBtwDeleteSchema=e.object({id:e.string().min(1),sessionId:e.string().min(1).max(128)}).strict(),SessionBtwQuestionSchema=e.object({format:e.literal(1),question:e.string().min(1).max(2e3)}).strict(),SessionBtwOutcomeSchema=e.discriminatedUnion("kind",[e.object({format:e.literal(1),kind:e.literal("success"),text:e.string().min(1).max(5e4)}).strict(),e.object({format:e.literal(1),kind:e.literal("error"),code:SessionBtwErrorCodeSchema}).strict()]);
1
+ "use strict";import{z as e}from"zod";export const SessionBtwStatusSchema=e.enum(["pending","succeeded","failed"]),SessionBtwErrorCodeSchema=e.enum(["context-history-unavailable","context-too-large","ai-helper-not-enabled","ai-helper-config-invalid","ai-helper-dek-unavailable","authentication-failed","quota-exceeded","timeout","protocol-incompatible","upstream-failed","execution-failed","cancelled","empty-response"]),SessionBtwRecordSchema=e.object({id:e.string().min(1),sessionId:e.string().min(1).max(128),operationId:e.string().uuid(),anchorSeq:e.number().int().nonnegative().nullable(),questionCiphertext:e.string().min(1).max(1e5),outcomeCiphertext:e.string().min(1).max(1e5).nullable(),status:SessionBtwStatusSchema,createdAt:e.string().datetime(),updatedAt:e.string().datetime()}).strict(),SessionBtwListSchema=e.object({sessionId:e.string().min(1).max(128),anchorAtOrAfter:e.number().int().nonnegative().optional(),anchorAtOrBefore:e.number().int().nonnegative().optional(),includeUnanchored:e.boolean().optional(),cursor:e.string().min(1).max(256).optional(),limit:e.number().int().min(1).max(100).default(100)}).strict().refine(t=>t.anchorAtOrAfter===void 0||t.anchorAtOrBefore===void 0||t.anchorAtOrAfter<=t.anchorAtOrBefore,{message:"anchor range is invalid"}),SessionBtwCreateSchema=e.object({sessionId:e.string().min(1).max(128),operationId:e.string().uuid(),anchorSeq:e.number().int().nonnegative().nullable(),questionCiphertext:e.string().min(1).max(1e5)}).strict(),SessionBtwCompleteSchema=e.object({id:e.string().min(1),sessionId:e.string().min(1).max(128),operationId:e.string().uuid(),status:e.enum(["succeeded","failed"]),outcomeCiphertext:e.string().min(1).max(1e5)}).strict(),SessionBtwDeleteSchema=e.object({id:e.string().min(1),sessionId:e.string().min(1).max(128)}).strict(),SessionBtwQuestionSchema=e.object({format:e.literal(1),question:e.string().min(1).max(2e3)}).strict(),SessionBtwOutcomeSchema=e.discriminatedUnion("kind",[e.object({format:e.literal(1),kind:e.literal("success"),text:e.string().min(1).max(5e4)}).strict(),e.object({format:e.literal(1),kind:e.literal("error"),code:SessionBtwErrorCodeSchema}).strict()]);
@@ -1,54 +1,48 @@
1
- /**
2
- * Session result schema — data from Claude's `result` event.
3
- *
4
- * Emitted once per conversation turn, contains token usage, cost, and timing.
5
- */
6
1
  import { z } from 'zod';
7
2
  export declare const SessionResultSchema: z.ZodObject<{
8
- /** Total cost in USD for this turn. */
3
+
9
4
  totalCostUsd: z.ZodOptional<z.ZodNumber>;
10
- /** Input token count. */
5
+
11
6
  inputTokens: z.ZodOptional<z.ZodNumber>;
12
- /** Output token count. */
7
+
13
8
  outputTokens: z.ZodOptional<z.ZodNumber>;
14
- /** Duration in milliseconds. */
9
+
15
10
  durationMs: z.ZodOptional<z.ZodNumber>;
16
- /** Claude-internal session ID. */
11
+
17
12
  cliSessionId: z.ZodOptional<z.ZodString>;
18
- /** Whether the result represents an error. */
13
+
19
14
  isError: z.ZodOptional<z.ZodBoolean>;
20
- /** Number of conversation turns. */
15
+
21
16
  numTurns: z.ZodOptional<z.ZodNumber>;
22
17
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
23
- /** Total cost in USD for this turn. */
18
+
24
19
  totalCostUsd: z.ZodOptional<z.ZodNumber>;
25
- /** Input token count. */
20
+
26
21
  inputTokens: z.ZodOptional<z.ZodNumber>;
27
- /** Output token count. */
22
+
28
23
  outputTokens: z.ZodOptional<z.ZodNumber>;
29
- /** Duration in milliseconds. */
24
+
30
25
  durationMs: z.ZodOptional<z.ZodNumber>;
31
- /** Claude-internal session ID. */
26
+
32
27
  cliSessionId: z.ZodOptional<z.ZodString>;
33
- /** Whether the result represents an error. */
28
+
34
29
  isError: z.ZodOptional<z.ZodBoolean>;
35
- /** Number of conversation turns. */
30
+
36
31
  numTurns: z.ZodOptional<z.ZodNumber>;
37
32
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
38
- /** Total cost in USD for this turn. */
33
+
39
34
  totalCostUsd: z.ZodOptional<z.ZodNumber>;
40
- /** Input token count. */
35
+
41
36
  inputTokens: z.ZodOptional<z.ZodNumber>;
42
- /** Output token count. */
37
+
43
38
  outputTokens: z.ZodOptional<z.ZodNumber>;
44
- /** Duration in milliseconds. */
39
+
45
40
  durationMs: z.ZodOptional<z.ZodNumber>;
46
- /** Claude-internal session ID. */
41
+
47
42
  cliSessionId: z.ZodOptional<z.ZodString>;
48
- /** Whether the result represents an error. */
43
+
49
44
  isError: z.ZodOptional<z.ZodBoolean>;
50
- /** Number of conversation turns. */
45
+
51
46
  numTurns: z.ZodOptional<z.ZodNumber>;
52
47
  }, z.ZodTypeAny, "passthrough">>;
53
48
  export type SessionResult = z.infer<typeof SessionResultSchema>;
54
- //# sourceMappingURL=sessionResult.d.ts.map
@@ -1,16 +1,9 @@
1
- /** Shared session-title resolution for server projections and Web display. */
2
- /** Strip the generated trailing short-id from a session name. */
3
1
  export declare function stripSessionTitleShortId(name: string): string;
4
- /** Extract the human-readable portion of a daemon session tag. */
2
+
5
3
  export declare function parseSessionTitleFromTag(tag: string): string;
6
- /**
7
- * Resolve a session's current display title consistently across packages.
8
- * User renames win over automatic metadata titles, which win over tag-derived
9
- * names. Callers provide a context-specific final fallback when this is null.
10
- */
4
+
11
5
  export declare function resolveSessionTitle(opts: {
12
6
  displayName?: string | null;
13
7
  metadataTitle?: string | null;
14
8
  tag: string;
15
9
  }): string | null;
16
- //# sourceMappingURL=sessionTitle.d.ts.map
@@ -21,11 +21,11 @@ export declare const SOCKET_EVENTS: Readonly<{
21
21
  readonly UPDATE_STATE: "update-state";
22
22
  readonly CONTEXT_USAGE_UPDATE: "context-usage-update";
23
23
  readonly SESSION_ALIVE: "session-alive";
24
- /** Read the short-lived daemon-reported state for one session after a web refresh. */
24
+
25
25
  readonly GET_SESSION_RUNTIME_STATUS: "get-session-runtime-status";
26
- /** Side-effect-free ownership check used before spawning a resumed CLI. */
26
+
27
27
  readonly SESSION_RESUME_CHECK: "session-resume-check";
28
- /** Explicit resume takeover: stop the old owner and reserve the replacement claim. */
28
+
29
29
  readonly SESSION_RESUME_TAKEOVER: "session-resume-takeover";
30
30
  readonly LIVENESS_HEARTBEAT: "liveness-heartbeat";
31
31
  readonly PROVISION_SESSION_DEK: "provision-session-dek";
@@ -33,7 +33,7 @@ export declare const SOCKET_EVENTS: Readonly<{
33
33
  readonly SESSION_CONTEXT_RESET: "session-context-reset";
34
34
  readonly CLAIM_AUTO_SESSION_TITLE: "claim-auto-session-title";
35
35
  readonly SESSION_END: "session-end";
36
- /** User explicitly ends a recovering session and revokes its old CLI owner. */
36
+
37
37
  readonly SESSION_TERMINATE: "session-terminate";
38
38
  readonly SESSION_DELETE: "delete-session";
39
39
  readonly SESSION_SUMMARY: "session-summary";
@@ -60,4 +60,3 @@ export declare const SOCKET_EVENTS: Readonly<{
60
60
  readonly GET_HISTORY_BLOCKLIST: "get-history-blocklist";
61
61
  }>;
62
62
  export type SocketEventName = (typeof SOCKET_EVENTS)[keyof typeof SOCKET_EVENTS];
63
- //# sourceMappingURL=socketEvents.d.ts.map
@@ -1,17 +1,5 @@
1
1
  import { z } from 'zod';
2
- /**
3
- * Acquisition-source metadata persisted on account creation.
4
- *
5
- * Written from a PUBLIC, UNAUTHENTICATED endpoint (`POST /v1/auth/verify`),
6
- * so the client-supplied portion is fully attacker-controlled. This schema is
7
- * the trust boundary: it whitelists exactly the attribution fields we store,
8
- * caps each value's length, and DROPS everything else — including prototype-
9
- * pollution keys (`__proto__`, `constructor`) and arbitrary attacker payload.
10
- *
11
- * `.strip()` is intentional and safe here: unknown keys are untrusted and must
12
- * be discarded, not preserved (.passthrough) nor rejected (.strict) — a
13
- * malformed metadata bag should never fail an otherwise-valid login.
14
- */
2
+
15
3
  export declare const SourceMetadataSchema: z.ZodObject<{
16
4
  userAgent: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
17
5
  referer: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
@@ -41,4 +29,3 @@ export declare const SourceMetadataSchema: z.ZodObject<{
41
29
  utmContent?: unknown;
42
30
  }>;
43
31
  export type SourceMetadata = z.infer<typeof SourceMetadataSchema>;
44
- //# sourceMappingURL=sourceMetadata.d.ts.map
@@ -1,17 +1,11 @@
1
- /**
2
- * Structured spawn errors for agent CLI processes.
3
- *
4
- * Replaces opaque stderr dumps with actionable, machine-readable errors.
5
- * Lives in wire so the web UI can render structured error cards.
6
- */
7
1
  import { z } from 'zod';
8
2
  export declare const SpawnErrorCodeSchema: z.ZodEnum<["agent-not-found", "agent-version-too-old", "agent-spawn-failed", "agent-spawn-timeout"]>;
9
3
  export type SpawnErrorCode = z.infer<typeof SpawnErrorCodeSchema>;
10
4
  export declare const SpawnErrorSchema: z.ZodObject<{
11
5
  code: z.ZodEnum<["agent-not-found", "agent-version-too-old", "agent-spawn-failed", "agent-spawn-timeout"]>;
12
- /** User-facing message, e.g. "Claude CLI not found". */
6
+
13
7
  message: z.ZodString;
14
- /** Actionable detail, e.g. "Install: npm i -g @anthropic-ai/claude-code". */
8
+
15
9
  detail: z.ZodString;
16
10
  agentType: z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>;
17
11
  platform: z.ZodEnum<["darwin", "linux", "win32"]>;
@@ -19,9 +13,9 @@ export declare const SpawnErrorSchema: z.ZodObject<{
19
13
  minVersion: z.ZodOptional<z.ZodString>;
20
14
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
21
15
  code: z.ZodEnum<["agent-not-found", "agent-version-too-old", "agent-spawn-failed", "agent-spawn-timeout"]>;
22
- /** User-facing message, e.g. "Claude CLI not found". */
16
+
23
17
  message: z.ZodString;
24
- /** Actionable detail, e.g. "Install: npm i -g @anthropic-ai/claude-code". */
18
+
25
19
  detail: z.ZodString;
26
20
  agentType: z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>;
27
21
  platform: z.ZodEnum<["darwin", "linux", "win32"]>;
@@ -29,9 +23,9 @@ export declare const SpawnErrorSchema: z.ZodObject<{
29
23
  minVersion: z.ZodOptional<z.ZodString>;
30
24
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
31
25
  code: z.ZodEnum<["agent-not-found", "agent-version-too-old", "agent-spawn-failed", "agent-spawn-timeout"]>;
32
- /** User-facing message, e.g. "Claude CLI not found". */
26
+
33
27
  message: z.ZodString;
34
- /** Actionable detail, e.g. "Install: npm i -g @anthropic-ai/claude-code". */
28
+
35
29
  detail: z.ZodString;
36
30
  agentType: z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>;
37
31
  platform: z.ZodEnum<["darwin", "linux", "win32"]>;
@@ -39,6 +33,5 @@ export declare const SpawnErrorSchema: z.ZodObject<{
39
33
  minVersion: z.ZodOptional<z.ZodString>;
40
34
  }, z.ZodTypeAny, "passthrough">>;
41
35
  export type SpawnError = z.infer<typeof SpawnErrorSchema>;
42
- /** Create a SpawnError object. */
36
+
43
37
  export declare function createSpawnError(fields: SpawnError): SpawnError;
44
- //# sourceMappingURL=spawnError.d.ts.map
package/dist/stats.d.ts CHANGED
@@ -1,9 +1,3 @@
1
- /**
2
- * Stats schemas for OBS-2 Activity Dashboard.
3
- *
4
- * Defines Zod schemas matching daemon ingest types,
5
- * enabling type-safe RPC between web and daemon.
6
- */
7
1
  import { z } from 'zod';
8
2
  export declare const ModelUsageEntrySchema: z.ZodObject<{
9
3
  inputTokens: z.ZodNumber;
@@ -200,15 +194,15 @@ export declare const ProjectSummarySchema: z.ZodObject<{
200
194
  subagentSessionCount: number;
201
195
  totalTokens?: number | undefined;
202
196
  }>;
203
- /** Per-agent-type usage summary for multi-agent stats. */
197
+
204
198
  export declare const AgentTypeUsageSchema: z.ZodObject<{
205
199
  agentType: z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>;
206
200
  totalSessions: z.ZodNumber;
207
201
  totalMessages: z.ZodNumber;
208
202
  totalTokens: z.ZodNumber;
209
- /** True when the agent cannot report token data (e.g. Copilot ACP). */
203
+
210
204
  tokensUnavailable: z.ZodOptional<z.ZodBoolean>;
211
- /** Full stats breakdown for this agent type (enables per-agent charts). */
205
+
212
206
  stats: z.ZodOptional<z.ZodNullable<z.ZodObject<{
213
207
  version: z.ZodNumber;
214
208
  totalSessions: z.ZodNumber;
@@ -330,7 +324,7 @@ export declare const AgentTypeUsageSchema: z.ZodObject<{
330
324
  firstSessionDate: string | null;
331
325
  hourCounts: Record<string, number>;
332
326
  }>>>;
333
- /** Per-agent project summaries (sessions belonging to this agent only). */
327
+
334
328
  projects: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
335
329
  projectPath: z.ZodString;
336
330
  sessionCount: z.ZodNumber;
@@ -571,15 +565,15 @@ export declare const StatsOverviewSchema: z.ZodObject<{
571
565
  costEstimates: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
572
566
  totalEstimatedCost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
573
567
  agentType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>>>;
574
- /** Per-agent-type breakdown (multi-agent stats). */
568
+
575
569
  agentTypeUsage: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
576
570
  agentType: z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>;
577
571
  totalSessions: z.ZodNumber;
578
572
  totalMessages: z.ZodNumber;
579
573
  totalTokens: z.ZodNumber;
580
- /** True when the agent cannot report token data (e.g. Copilot ACP). */
574
+
581
575
  tokensUnavailable: z.ZodOptional<z.ZodBoolean>;
582
- /** Full stats breakdown for this agent type (enables per-agent charts). */
576
+
583
577
  stats: z.ZodOptional<z.ZodNullable<z.ZodObject<{
584
578
  version: z.ZodNumber;
585
579
  totalSessions: z.ZodNumber;
@@ -701,7 +695,7 @@ export declare const StatsOverviewSchema: z.ZodObject<{
701
695
  firstSessionDate: string | null;
702
696
  hourCounts: Record<string, number>;
703
697
  }>>>;
704
- /** Per-agent project summaries (sessions belonging to this agent only). */
698
+
705
699
  projects: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
706
700
  projectPath: z.ZodString;
707
701
  sessionCount: z.ZodNumber;
@@ -971,7 +965,7 @@ export type ModelUsageEntry = z.infer<typeof ModelUsageEntrySchema>;
971
965
  export type DailyActivity = z.infer<typeof DailyActivitySchema>;
972
966
  export type LongestSession = z.infer<typeof LongestSessionSchema>;
973
967
  export type AgentTypeUsage = z.infer<typeof AgentTypeUsageSchema>;
974
- /** Account-wide session counts used to rank agent selectors. */
968
+
975
969
  export declare const AgentSessionUsageEntrySchema: z.ZodObject<{
976
970
  agentType: z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>;
977
971
  sessionCount: z.ZodNumber;
@@ -1152,15 +1146,15 @@ export declare const ActivityUploadSchema: z.ZodObject<{
1152
1146
  costEstimates: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
1153
1147
  totalEstimatedCost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1154
1148
  agentType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>>>;
1155
- /** Per-agent-type breakdown (multi-agent stats). */
1149
+
1156
1150
  agentTypeUsage: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
1157
1151
  agentType: z.ZodEnum<["claude", "copilot", "codex", "gemini", "opencode", "hermes", "openclaw", "custom"]>;
1158
1152
  totalSessions: z.ZodNumber;
1159
1153
  totalMessages: z.ZodNumber;
1160
1154
  totalTokens: z.ZodNumber;
1161
- /** True when the agent cannot report token data (e.g. Copilot ACP). */
1155
+
1162
1156
  tokensUnavailable: z.ZodOptional<z.ZodBoolean>;
1163
- /** Full stats breakdown for this agent type (enables per-agent charts). */
1157
+
1164
1158
  stats: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1165
1159
  version: z.ZodNumber;
1166
1160
  totalSessions: z.ZodNumber;
@@ -1282,7 +1276,7 @@ export declare const ActivityUploadSchema: z.ZodObject<{
1282
1276
  firstSessionDate: string | null;
1283
1277
  hourCounts: Record<string, number>;
1284
1278
  }>>>;
1285
- /** Per-agent project summaries (sessions belonging to this agent only). */
1279
+
1286
1280
  projects: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
1287
1281
  projectPath: z.ZodString;
1288
1282
  sessionCount: z.ZodNumber;
@@ -1825,4 +1819,3 @@ export declare const QuotaStatusSchema: z.ZodObject<{
1825
1819
  monthlyLimit: z.ZodNullable<z.ZodNumber>;
1826
1820
  }, z.ZodTypeAny, "passthrough">>;
1827
1821
  export type QuotaStatus = z.infer<typeof QuotaStatusSchema>;
1828
- //# sourceMappingURL=stats.d.ts.map