@stitchmux/client 0.0.0-stage → 0.96.0

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 (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -2
  3. package/dist/chunk-szdg2ww3.js +714 -0
  4. package/dist/index.js +4070 -0
  5. package/dist/monitoring.js +279 -0
  6. package/native-stream.json +8 -0
  7. package/package.json +36 -4
  8. package/types/src/agent/claude/native/commandSchema.d.ts +14 -0
  9. package/types/src/agent/custom/config.d.ts +159 -0
  10. package/types/src/agent/custom/endpoint.d.ts +26 -0
  11. package/types/src/agent/transcript/messageSchema.d.ts +153 -0
  12. package/types/src/attachments/reference.d.ts +56 -0
  13. package/types/src/attachments/schema.d.ts +512 -0
  14. package/types/src/chat/communicationAuthorizationSchema.d.ts +77 -0
  15. package/types/src/chat/communicationReceiptSchema.d.ts +82 -0
  16. package/types/src/chat/feedSchema.d.ts +641 -0
  17. package/types/src/chat/holdKind.d.ts +26 -0
  18. package/types/src/chat/identity.d.ts +55 -0
  19. package/types/src/chat/identitySchema.d.ts +121 -0
  20. package/types/src/chat/letterRequestSchema.d.ts +35 -0
  21. package/types/src/chat/messageOperationSchema.d.ts +277 -0
  22. package/types/src/chat/messageSchema.d.ts +284 -0
  23. package/types/src/chat/originSchema.d.ts +67 -0
  24. package/types/src/chat/sentLetterSchema.d.ts +79 -0
  25. package/types/src/client.d.ts +16 -0
  26. package/types/src/config/claudeProfileSchema.d.ts +22 -0
  27. package/types/src/config/launchSchema.d.ts +136 -0
  28. package/types/src/config/location.d.ts +6 -0
  29. package/types/src/config/machineSchema.d.ts +320 -0
  30. package/types/src/config/modelSelectionFlags.d.ts +4 -0
  31. package/types/src/config/paths.d.ts +87 -0
  32. package/types/src/config/remoteTransport.d.ts +12 -0
  33. package/types/src/content/schema.d.ts +312 -0
  34. package/types/src/content/toolSchema.d.ts +36 -0
  35. package/types/src/context/corpusSearchSchema.d.ts +578 -0
  36. package/types/src/context/exactMessageSchema.d.ts +54 -0
  37. package/types/src/context/messageSenderSchema.d.ts +14 -0
  38. package/types/src/context/schema.d.ts +176 -0
  39. package/types/src/context/searchFrames.d.ts +225 -0
  40. package/types/src/context/searchRequestSchema.d.ts +47 -0
  41. package/types/src/context/transcriptJsonSchema.d.ts +210 -0
  42. package/types/src/control/schema/context.d.ts +188 -0
  43. package/types/src/control/schema/contract.d.ts +7142 -0
  44. package/types/src/control/schema/core.d.ts +722 -0
  45. package/types/src/control/schema/directory.d.ts +34 -0
  46. package/types/src/control/schema/eventsContract.d.ts +1423 -0
  47. package/types/src/control/schema/externalList.d.ts +96 -0
  48. package/types/src/control/schema/message.d.ts +280 -0
  49. package/types/src/control/schema/model.d.ts +128 -0
  50. package/types/src/control/schema/native.d.ts +664 -0
  51. package/types/src/control/schema/nativeStreamContract.d.ts +155 -0
  52. package/types/src/control/schema/performance.d.ts +85 -0
  53. package/types/src/control/schema/public.d.ts +48 -0
  54. package/types/src/control/schema/reading.d.ts +24 -0
  55. package/types/src/control/schema/refusals.d.ts +433 -0
  56. package/types/src/control/schema/runtimeOps.d.ts +724 -0
  57. package/types/src/control/schema/searchContract.d.ts +258 -0
  58. package/types/src/control/schema/selection.d.ts +124 -0
  59. package/types/src/control/schema/session.d.ts +272 -0
  60. package/types/src/control/schema/terminalPrompt.d.ts +102 -0
  61. package/types/src/control/transport/boundary.d.ts +7137 -0
  62. package/types/src/control/transport/client.d.ts +10838 -0
  63. package/types/src/control/transport/connection.d.ts +13 -0
  64. package/types/src/control/transport/socketPath.d.ts +3 -0
  65. package/types/src/control-client.d.ts +9 -0
  66. package/types/src/delegation/applicationSchema.d.ts +132 -0
  67. package/types/src/delegation/schema.d.ts +267 -0
  68. package/types/src/events/schema.d.ts +155 -0
  69. package/types/src/external/contentSchema.d.ts +145 -0
  70. package/types/src/external/messageSchema.d.ts +131 -0
  71. package/types/src/external/residentFrames.d.ts +130 -0
  72. package/types/src/external/residentSchema.d.ts +144 -0
  73. package/types/src/external/sessionSchema.d.ts +427 -0
  74. package/types/src/external/turnSchema.d.ts +55 -0
  75. package/types/src/fleet/fleetSchema.d.ts +937 -0
  76. package/types/src/inventory/listSchema.d.ts +442 -0
  77. package/types/src/monitoring/nativeFile.d.ts +7 -0
  78. package/types/src/monitoring/nativeRead.d.ts +14 -0
  79. package/types/src/monitoring/performanceSchema.d.ts +28 -0
  80. package/types/src/monitoring/schema.d.ts +410 -0
  81. package/types/src/monitoring/validate.d.ts +5 -0
  82. package/types/src/monitoring-reader.d.ts +4 -0
  83. package/types/src/policy/reference.d.ts +93 -0
  84. package/types/src/policy/runtimeProfile.d.ts +24 -0
  85. package/types/src/policy/schema.d.ts +177 -0
  86. package/types/src/runtime/capabilities.d.ts +124 -0
  87. package/types/src/runtime/modes.d.ts +47 -0
  88. package/types/src/runtime/permissionScope.d.ts +22 -0
  89. package/types/src/runtime/planLimitsSchema.d.ts +55 -0
  90. package/types/src/runtime/projectionSchema.d.ts +539 -0
  91. package/types/src/runtime/rewindSchema.d.ts +16 -0
  92. package/types/src/runtime/selectionSchema.d.ts +158 -0
  93. package/types/src/runtime/workloadContract.d.ts +55 -0
  94. package/types/src/session/boundary.d.ts +43 -0
  95. package/types/src/session/identitySchema.d.ts +353 -0
  96. package/types/src/session/schema.d.ts +341 -0
  97. package/types/src/session/sleep/schema.d.ts +283 -0
  98. package/types/src/steering/schema.d.ts +197 -0
  99. package/types/src/types.d.ts +48 -0
  100. package/types/src/usage/schema.d.ts +978 -0
  101. package/types/src/util/home.d.ts +9 -0
  102. package/types/src/util/preview.d.ts +13 -0
  103. package/types/src/util/version.d.ts +3 -0
@@ -0,0 +1,55 @@
1
+ import type { ChatPrincipal, ChatTarget, CliPrincipal, CodexAppPeer, ExternalTarget, ManagedPeer, OwnerTarget, Session } from "../types.js";
2
+ /** Durable peer key for cursors, acks and equality. Every routing-relevant field participates. */
3
+ export declare function managedPeerKey(peer: ManagedPeer): string;
4
+ export declare function managedPeer(machine: string, session: Session): ManagedPeer;
5
+ export declare function cliPrincipal(machine: string): CliPrincipal;
6
+ export declare function servicePrincipal(machine: string, transport: 'local' | 'declared-service'): ChatPrincipal;
7
+ export declare function codexAppPeer(machine: string, threadId: string, name: string | null): CodexAppPeer;
8
+ export declare const CODEX_APP_PREFIX = "app/";
9
+ export declare function isCodexAppToken(token: string): boolean;
10
+ export declare function codexAppThreadId(token: string): string;
11
+ export declare function codexAppAddress(threadId: string): string;
12
+ export declare function ownerTarget(): OwnerTarget;
13
+ /** The address form a person types and reads: `owner/<name>`. It SAYS the route — this party is
14
+ * reached through the owner — and it carries no colon, so it can never be mistaken for
15
+ * `<machine>:<session>`. */
16
+ export declare const EXTERNAL_PREFIX = "owner/";
17
+ export declare function externalTarget(name: string): ExternalTarget;
18
+ export declare function externalAddress(name: string): string;
19
+ export declare function chatPrincipalKey(principal: ChatPrincipal): string;
20
+ export declare function chatTargetKey(target: ChatTarget): string;
21
+ export declare function samePrincipal(left: ChatPrincipal, right: ChatPrincipal): boolean;
22
+ /**
23
+ * The sender as a NAMED SESSION rather than one of its lives.
24
+ *
25
+ * A managed principal carries the conversation uuid, and that uuid is an instance: restart, renew or
26
+ * a fresh conversation gives the same `machine:session` a new one. Retracting a letter matched on it
27
+ * therefore worked only until the sender's next restart, after which nobody could — the sender was
28
+ * gone and the new life of the same session was a stranger to its own outstanding mail. Measured:
29
+ * a letter sent by `<session>` four days earlier could not be withdrawn by `<session>`.
30
+ *
31
+ * The runtime stays in the key. A name freed and taken by another provider is a different sender,
32
+ * and inheriting the previous owner's mail is the failure this granularity avoids on the other side.
33
+ * Nothing else about a session's identity varies across its lives.
34
+ */
35
+ export declare function senderKey(principal: ChatPrincipal): string;
36
+ export declare function sameSender(left: ChatPrincipal, right: ChatPrincipal): boolean;
37
+ export declare function sameTarget(left: ChatTarget, right: ChatTarget): boolean;
38
+ export declare function principalLabel(principal: ChatPrincipal): string;
39
+ export declare function targetLabel(target: ChatTarget): string;
40
+ /**
41
+ * The same endpoint written for a PERSON rather than for an agent.
42
+ *
43
+ * `principalLabel` above is an address something replies to: it carries the provider and the full
44
+ * thread uuid so a peer can answer the exact conversation. That is the right shape in a pane, where
45
+ * an agent reads the tag and copies the reply command out of it.
46
+ *
47
+ * It is the wrong shape in a phone notification. There the uuids are more than half the line and
48
+ * nobody will ever type one — the mirror is one-way, so there is nothing to reply to from that side.
49
+ * `machine:session` is already unique across the fleet (that is what fleet addressing is for), and a
50
+ * managed session pins exactly one thread at creation, so the uuid distinguishes nothing a reader
51
+ * needs. The provider is metadata here, not part of the address.
52
+ */
53
+ export declare function humanLabel(principal: ChatPrincipal): string;
54
+ /** A human-facing recipient. Mail addressed to the owner says so in their own words. */
55
+ export declare function humanTargetLabel(target: ChatTarget): string;
@@ -0,0 +1,121 @@
1
+ import { z } from 'zod';
2
+ /** Session selectors exclude whitespace and delimiters used by exact routing. */
3
+ export declare const SESSION_NAME_RE: RegExp;
4
+ /** Machine identity is an extensible lowercase slug, not a fixed fleet enum. */
5
+ export declare const RC_PREFIX_RE: RegExp;
6
+ /** Execution runtime is independent of the selected model provider. */
7
+ export declare const AgentKindSchema: z.ZodEnum<{
8
+ antigravity: "antigravity";
9
+ claude: "claude";
10
+ codex: "codex";
11
+ custom: "custom";
12
+ opencode: "opencode";
13
+ }>;
14
+ export declare const ManagedPeerSchema: z.ZodObject<{
15
+ kind: z.ZodLiteral<"managed">;
16
+ source: z.ZodLiteral<"stitchmux">;
17
+ machine: z.ZodString;
18
+ agent: z.ZodEnum<{
19
+ antigravity: "antigravity";
20
+ claude: "claude";
21
+ codex: "codex";
22
+ custom: "custom";
23
+ opencode: "opencode";
24
+ }>;
25
+ session: z.ZodString;
26
+ threadId: z.ZodUUID;
27
+ }, z.core.$strict>;
28
+ export declare const CliPrincipalSchema: z.ZodObject<{
29
+ kind: z.ZodLiteral<"cli">;
30
+ source: z.ZodLiteral<"stitchmux">;
31
+ machine: z.ZodString;
32
+ }, z.core.$strict>;
33
+ export declare const ServicePrincipalSchema: z.ZodObject<{
34
+ kind: z.ZodLiteral<"service">;
35
+ source: z.ZodLiteral<"stitchmux">;
36
+ machine: z.ZodString;
37
+ transport: z.ZodEnum<{
38
+ "declared-service": "declared-service";
39
+ local: "local";
40
+ }>;
41
+ }, z.core.$strict>;
42
+ export declare const CodexAppPeerSchema: z.ZodObject<{
43
+ kind: z.ZodLiteral<"codex-app">;
44
+ source: z.ZodLiteral<"codex-app">;
45
+ machine: z.ZodString;
46
+ agent: z.ZodLiteral<"codex">;
47
+ threadId: z.ZodUUID;
48
+ name: z.ZodNullable<z.ZodString>;
49
+ }, z.core.$strict>;
50
+ /** Sender identifies ingress; it does not authenticate an attributed human. */
51
+ export declare const ChatPrincipalSchema: z.ZodUnion<readonly [z.ZodObject<{
52
+ kind: z.ZodLiteral<"managed">;
53
+ source: z.ZodLiteral<"stitchmux">;
54
+ machine: z.ZodString;
55
+ agent: z.ZodEnum<{
56
+ antigravity: "antigravity";
57
+ claude: "claude";
58
+ codex: "codex";
59
+ custom: "custom";
60
+ opencode: "opencode";
61
+ }>;
62
+ session: z.ZodString;
63
+ threadId: z.ZodUUID;
64
+ }, z.core.$strict>, z.ZodObject<{
65
+ kind: z.ZodLiteral<"codex-app">;
66
+ source: z.ZodLiteral<"codex-app">;
67
+ machine: z.ZodString;
68
+ agent: z.ZodLiteral<"codex">;
69
+ threadId: z.ZodUUID;
70
+ name: z.ZodNullable<z.ZodString>;
71
+ }, z.core.$strict>, z.ZodObject<{
72
+ kind: z.ZodLiteral<"cli">;
73
+ source: z.ZodLiteral<"stitchmux">;
74
+ machine: z.ZodString;
75
+ }, z.core.$strict>, z.ZodObject<{
76
+ kind: z.ZodLiteral<"service">;
77
+ source: z.ZodLiteral<"stitchmux">;
78
+ machine: z.ZodString;
79
+ transport: z.ZodEnum<{
80
+ "declared-service": "declared-service";
81
+ local: "local";
82
+ }>;
83
+ }, z.core.$strict>]>;
84
+ /** Out-of-band destinations never masquerade as managed sessions. */
85
+ export declare const OwnerTargetSchema: z.ZodObject<{
86
+ kind: z.ZodLiteral<"owner">;
87
+ }, z.core.$strict>;
88
+ export declare const ExternalTargetSchema: z.ZodObject<{
89
+ kind: z.ZodLiteral<"external">;
90
+ source: z.ZodLiteral<"stitchmux">;
91
+ name: z.ZodString;
92
+ }, z.core.$strict>;
93
+ export declare const ChatTargetSchema: z.ZodUnion<readonly [z.ZodObject<{
94
+ kind: z.ZodLiteral<"managed">;
95
+ source: z.ZodLiteral<"stitchmux">;
96
+ machine: z.ZodString;
97
+ agent: z.ZodEnum<{
98
+ antigravity: "antigravity";
99
+ claude: "claude";
100
+ codex: "codex";
101
+ custom: "custom";
102
+ opencode: "opencode";
103
+ }>;
104
+ session: z.ZodString;
105
+ threadId: z.ZodUUID;
106
+ }, z.core.$strict>, z.ZodObject<{
107
+ kind: z.ZodLiteral<"codex-app">;
108
+ source: z.ZodLiteral<"codex-app">;
109
+ machine: z.ZodString;
110
+ agent: z.ZodLiteral<"codex">;
111
+ threadId: z.ZodUUID;
112
+ name: z.ZodNullable<z.ZodString>;
113
+ }, z.core.$strict>, z.ZodObject<{
114
+ kind: z.ZodLiteral<"owner">;
115
+ }, z.core.$strict>, z.ZodObject<{
116
+ kind: z.ZodLiteral<"external">;
117
+ source: z.ZodLiteral<"stitchmux">;
118
+ name: z.ZodString;
119
+ }, z.core.$strict>]>;
120
+ export type ChatPrincipal = z.infer<typeof ChatPrincipalSchema>;
121
+ export type ChatTarget = z.infer<typeof ChatTargetSchema>;
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * One letter, as `stitchmux msg` and the `letter.send` operation both ask for it.
4
+ *
5
+ * The command reads its flags into this; a program sends it as the operation's input. Both reach
6
+ * `sendLetter`, so the two roads cannot differ in who may send, where a name resolves, or what the
7
+ * receipt says.
8
+ */
9
+ export declare const LetterRequestSchema: z.ZodObject<{
10
+ to: z.ZodString;
11
+ body: z.ZodString;
12
+ task: z.ZodDefault<z.ZodNullable<z.ZodString>>;
13
+ interrupt: z.ZodDefault<z.ZodBoolean>;
14
+ onBehalfOf: z.ZodDefault<z.ZodNullable<z.ZodString>>;
15
+ afterSeconds: z.ZodDefault<z.ZodNullable<z.ZodInt>>;
16
+ toAgent: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
17
+ antigravity: "antigravity";
18
+ claude: "claude";
19
+ codex: "codex";
20
+ custom: "custom";
21
+ opencode: "opencode";
22
+ }>>>;
23
+ toThread: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
24
+ communicationAuthorization: z.ZodOptional<z.ZodObject<{
25
+ whyThisCommunicationIsNecessaryAndWithinTheUserAuthorizedScope: z.ZodOptional<z.ZodString>;
26
+ userAuthorizationQuote: z.ZodOptional<z.ZodString>;
27
+ sourceMessageRef: z.ZodString;
28
+ basis: z.ZodEnum<{
29
+ "peer-letter": "peer-letter";
30
+ "thread-continuation": "thread-continuation";
31
+ "user-instruction": "user-instruction";
32
+ }>;
33
+ }, z.core.$strict>>;
34
+ }, z.core.$strict>;
35
+ export type LetterRequest = z.output<typeof LetterRequestSchema>;
@@ -0,0 +1,277 @@
1
+ import { z } from 'zod';
2
+ export declare const MESSAGE_OPERATION_LIMITS: {
3
+ records: number;
4
+ bytes: number;
5
+ terminalTtlMs: number;
6
+ };
7
+ export declare const NativeContinuationSchema: z.ZodObject<{
8
+ requestId: z.ZodString;
9
+ parentTurnId: z.ZodString;
10
+ responseOperationId: z.ZodUUID;
11
+ responseFingerprint: z.ZodString;
12
+ turnId: z.ZodString;
13
+ decision: z.ZodEnum<{
14
+ accept: "accept";
15
+ decline: "decline";
16
+ }>;
17
+ }, z.core.$strict>;
18
+ export declare const NativePendingApprovalSchema: z.ZodObject<{
19
+ requestId: z.ZodString;
20
+ turnId: z.ZodString;
21
+ callId: z.ZodString;
22
+ }, z.core.$strict>;
23
+ export declare const NativeContinuationsSchema: z.ZodArray<z.ZodObject<{
24
+ requestId: z.ZodString;
25
+ parentTurnId: z.ZodString;
26
+ responseOperationId: z.ZodUUID;
27
+ responseFingerprint: z.ZodString;
28
+ turnId: z.ZodString;
29
+ decision: z.ZodEnum<{
30
+ accept: "accept";
31
+ decline: "decline";
32
+ }>;
33
+ }, z.core.$strict>>;
34
+ export type NativeContinuation = z.infer<typeof NativeContinuationSchema>;
35
+ export declare const MessageOperationReadSchema: z.ZodObject<{
36
+ target: z.ZodObject<{
37
+ kind: z.ZodLiteral<"managed">;
38
+ source: z.ZodLiteral<"stitchmux">;
39
+ machine: z.ZodString;
40
+ agent: z.ZodEnum<{
41
+ antigravity: "antigravity";
42
+ claude: "claude";
43
+ codex: "codex";
44
+ custom: "custom";
45
+ opencode: "opencode";
46
+ }>;
47
+ session: z.ZodString;
48
+ threadId: z.ZodUUID;
49
+ }, z.core.$strict>;
50
+ registrationGeneration: z.ZodUUID;
51
+ messageId: z.ZodUUID;
52
+ }, z.core.$strict>;
53
+ export declare const MessageOperationStateSchema: z.ZodEnum<{
54
+ admitted: "admitted";
55
+ completed: "completed";
56
+ failed: "failed";
57
+ interrupted: "interrupted";
58
+ queued: "queued";
59
+ uncertain: "uncertain";
60
+ }>;
61
+ export declare const MessageOperationEvidenceSchema: z.ZodObject<{
62
+ turnId: z.ZodNullable<z.ZodString>;
63
+ continuations: z.ZodDefault<z.ZodArray<z.ZodObject<{
64
+ requestId: z.ZodString;
65
+ parentTurnId: z.ZodString;
66
+ responseOperationId: z.ZodUUID;
67
+ responseFingerprint: z.ZodString;
68
+ turnId: z.ZodString;
69
+ decision: z.ZodEnum<{
70
+ accept: "accept";
71
+ decline: "decline";
72
+ }>;
73
+ }, z.core.$strict>>>;
74
+ pendingApprovals: z.ZodDefault<z.ZodArray<z.ZodObject<{
75
+ requestId: z.ZodString;
76
+ turnId: z.ZodString;
77
+ callId: z.ZodString;
78
+ }, z.core.$strict>>>;
79
+ observedAt: z.ZodISODateTime;
80
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
81
+ state: z.ZodEnum<{
82
+ admitted: "admitted";
83
+ completed: "completed";
84
+ failed: "failed";
85
+ interrupted: "interrupted";
86
+ queued: "queued";
87
+ uncertain: "uncertain";
88
+ }>;
89
+ nativeSession: z.ZodObject<{
90
+ runtime: z.ZodEnum<{
91
+ antigravity: "antigravity";
92
+ claude: "claude";
93
+ codex: "codex";
94
+ custom: "custom";
95
+ opencode: "opencode";
96
+ }>;
97
+ id: z.ZodString;
98
+ }, z.core.$strict>;
99
+ hold: z.ZodDefault<z.ZodNullable<z.ZodObject<{
100
+ kind: z.ZodEnum<{
101
+ "human-typing": "human-typing";
102
+ "input-busy": "input-busy";
103
+ menu: "menu";
104
+ "not-drawn": "not-drawn";
105
+ "not-settled": "not-settled";
106
+ other: "other";
107
+ "queued-input": "queued-input";
108
+ "rate-limited": "rate-limited";
109
+ sleeping: "sleeping";
110
+ working: "working";
111
+ }>;
112
+ text: z.ZodString;
113
+ heldForMs: z.ZodNumber;
114
+ }, z.core.$strict>>>;
115
+ }, z.core.$strict>;
116
+ export declare const MessageOperationResultSchema: z.ZodObject<{
117
+ target: z.ZodObject<{
118
+ kind: z.ZodLiteral<"managed">;
119
+ source: z.ZodLiteral<"stitchmux">;
120
+ machine: z.ZodString;
121
+ agent: z.ZodEnum<{
122
+ antigravity: "antigravity";
123
+ claude: "claude";
124
+ codex: "codex";
125
+ custom: "custom";
126
+ opencode: "opencode";
127
+ }>;
128
+ session: z.ZodString;
129
+ threadId: z.ZodUUID;
130
+ }, z.core.$strict>;
131
+ registrationGeneration: z.ZodUUID;
132
+ messageId: z.ZodUUID;
133
+ outcome: z.ZodEnum<{
134
+ available: "available";
135
+ expired: "expired";
136
+ unavailable: "unavailable";
137
+ }>;
138
+ evidence: z.ZodNullable<z.ZodObject<{
139
+ turnId: z.ZodNullable<z.ZodString>;
140
+ continuations: z.ZodDefault<z.ZodArray<z.ZodObject<{
141
+ requestId: z.ZodString;
142
+ parentTurnId: z.ZodString;
143
+ responseOperationId: z.ZodUUID;
144
+ responseFingerprint: z.ZodString;
145
+ turnId: z.ZodString;
146
+ decision: z.ZodEnum<{
147
+ accept: "accept";
148
+ decline: "decline";
149
+ }>;
150
+ }, z.core.$strict>>>;
151
+ pendingApprovals: z.ZodDefault<z.ZodArray<z.ZodObject<{
152
+ requestId: z.ZodString;
153
+ turnId: z.ZodString;
154
+ callId: z.ZodString;
155
+ }, z.core.$strict>>>;
156
+ observedAt: z.ZodISODateTime;
157
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
158
+ state: z.ZodEnum<{
159
+ admitted: "admitted";
160
+ completed: "completed";
161
+ failed: "failed";
162
+ interrupted: "interrupted";
163
+ queued: "queued";
164
+ uncertain: "uncertain";
165
+ }>;
166
+ nativeSession: z.ZodObject<{
167
+ runtime: z.ZodEnum<{
168
+ antigravity: "antigravity";
169
+ claude: "claude";
170
+ codex: "codex";
171
+ custom: "custom";
172
+ opencode: "opencode";
173
+ }>;
174
+ id: z.ZodString;
175
+ }, z.core.$strict>;
176
+ hold: z.ZodDefault<z.ZodNullable<z.ZodObject<{
177
+ kind: z.ZodEnum<{
178
+ "human-typing": "human-typing";
179
+ "input-busy": "input-busy";
180
+ menu: "menu";
181
+ "not-drawn": "not-drawn";
182
+ "not-settled": "not-settled";
183
+ other: "other";
184
+ "queued-input": "queued-input";
185
+ "rate-limited": "rate-limited";
186
+ sleeping: "sleeping";
187
+ working: "working";
188
+ }>;
189
+ text: z.ZodString;
190
+ heldForMs: z.ZodNumber;
191
+ }, z.core.$strict>>>;
192
+ }, z.core.$strict>>;
193
+ }, z.core.$strict>;
194
+ export declare const MessageOperationRecordSchema: z.ZodObject<{
195
+ turnId: z.ZodNullable<z.ZodString>;
196
+ continuations: z.ZodDefault<z.ZodArray<z.ZodObject<{
197
+ requestId: z.ZodString;
198
+ parentTurnId: z.ZodString;
199
+ responseOperationId: z.ZodUUID;
200
+ responseFingerprint: z.ZodString;
201
+ turnId: z.ZodString;
202
+ decision: z.ZodEnum<{
203
+ accept: "accept";
204
+ decline: "decline";
205
+ }>;
206
+ }, z.core.$strict>>>;
207
+ pendingApprovals: z.ZodDefault<z.ZodArray<z.ZodObject<{
208
+ requestId: z.ZodString;
209
+ turnId: z.ZodString;
210
+ callId: z.ZodString;
211
+ }, z.core.$strict>>>;
212
+ observedAt: z.ZodISODateTime;
213
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
214
+ messageId: z.ZodUUID;
215
+ principal: z.ZodString;
216
+ fingerprint: z.ZodString;
217
+ phase: z.ZodEnum<{
218
+ admitted: "admitted";
219
+ completed: "completed";
220
+ failed: "failed";
221
+ interrupted: "interrupted";
222
+ preparing: "preparing";
223
+ queued: "queued";
224
+ uncertain: "uncertain";
225
+ }>;
226
+ }, z.core.$strict>;
227
+ export declare const MessageOperationJournalSchema: z.ZodObject<{
228
+ registrationGeneration: z.ZodUUID;
229
+ nativeSession: z.ZodObject<{
230
+ runtime: z.ZodEnum<{
231
+ antigravity: "antigravity";
232
+ claude: "claude";
233
+ codex: "codex";
234
+ custom: "custom";
235
+ opencode: "opencode";
236
+ }>;
237
+ id: z.ZodString;
238
+ }, z.core.$strict>;
239
+ records: z.ZodArray<z.ZodObject<{
240
+ turnId: z.ZodNullable<z.ZodString>;
241
+ continuations: z.ZodDefault<z.ZodArray<z.ZodObject<{
242
+ requestId: z.ZodString;
243
+ parentTurnId: z.ZodString;
244
+ responseOperationId: z.ZodUUID;
245
+ responseFingerprint: z.ZodString;
246
+ turnId: z.ZodString;
247
+ decision: z.ZodEnum<{
248
+ accept: "accept";
249
+ decline: "decline";
250
+ }>;
251
+ }, z.core.$strict>>>;
252
+ pendingApprovals: z.ZodDefault<z.ZodArray<z.ZodObject<{
253
+ requestId: z.ZodString;
254
+ turnId: z.ZodString;
255
+ callId: z.ZodString;
256
+ }, z.core.$strict>>>;
257
+ observedAt: z.ZodISODateTime;
258
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
259
+ messageId: z.ZodUUID;
260
+ principal: z.ZodString;
261
+ fingerprint: z.ZodString;
262
+ phase: z.ZodEnum<{
263
+ admitted: "admitted";
264
+ completed: "completed";
265
+ failed: "failed";
266
+ interrupted: "interrupted";
267
+ preparing: "preparing";
268
+ queued: "queued";
269
+ uncertain: "uncertain";
270
+ }>;
271
+ }, z.core.$strict>>;
272
+ }, z.core.$strict>;
273
+ export type MessageOperationRecord = z.output<typeof MessageOperationRecordSchema>;
274
+ export type MessageOperationJournal = z.output<typeof MessageOperationJournalSchema>;
275
+ export type MessageOperationRead = z.output<typeof MessageOperationReadSchema>;
276
+ export type MessageOperationResult = z.output<typeof MessageOperationResultSchema>;
277
+ export type MessageOperationEvidence = z.output<typeof MessageOperationEvidenceSchema>;