@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.
- package/LICENSE +21 -0
- package/README.md +45 -2
- package/dist/chunk-szdg2ww3.js +714 -0
- package/dist/index.js +4070 -0
- package/dist/monitoring.js +279 -0
- package/native-stream.json +8 -0
- package/package.json +36 -4
- package/types/src/agent/claude/native/commandSchema.d.ts +14 -0
- package/types/src/agent/custom/config.d.ts +159 -0
- package/types/src/agent/custom/endpoint.d.ts +26 -0
- package/types/src/agent/transcript/messageSchema.d.ts +153 -0
- package/types/src/attachments/reference.d.ts +56 -0
- package/types/src/attachments/schema.d.ts +512 -0
- package/types/src/chat/communicationAuthorizationSchema.d.ts +77 -0
- package/types/src/chat/communicationReceiptSchema.d.ts +82 -0
- package/types/src/chat/feedSchema.d.ts +641 -0
- package/types/src/chat/holdKind.d.ts +26 -0
- package/types/src/chat/identity.d.ts +55 -0
- package/types/src/chat/identitySchema.d.ts +121 -0
- package/types/src/chat/letterRequestSchema.d.ts +35 -0
- package/types/src/chat/messageOperationSchema.d.ts +277 -0
- package/types/src/chat/messageSchema.d.ts +284 -0
- package/types/src/chat/originSchema.d.ts +67 -0
- package/types/src/chat/sentLetterSchema.d.ts +79 -0
- package/types/src/client.d.ts +16 -0
- package/types/src/config/claudeProfileSchema.d.ts +22 -0
- package/types/src/config/launchSchema.d.ts +136 -0
- package/types/src/config/location.d.ts +6 -0
- package/types/src/config/machineSchema.d.ts +320 -0
- package/types/src/config/modelSelectionFlags.d.ts +4 -0
- package/types/src/config/paths.d.ts +87 -0
- package/types/src/config/remoteTransport.d.ts +12 -0
- package/types/src/content/schema.d.ts +312 -0
- package/types/src/content/toolSchema.d.ts +36 -0
- package/types/src/context/corpusSearchSchema.d.ts +578 -0
- package/types/src/context/exactMessageSchema.d.ts +54 -0
- package/types/src/context/messageSenderSchema.d.ts +14 -0
- package/types/src/context/schema.d.ts +176 -0
- package/types/src/context/searchFrames.d.ts +225 -0
- package/types/src/context/searchRequestSchema.d.ts +47 -0
- package/types/src/context/transcriptJsonSchema.d.ts +210 -0
- package/types/src/control/schema/context.d.ts +188 -0
- package/types/src/control/schema/contract.d.ts +7142 -0
- package/types/src/control/schema/core.d.ts +722 -0
- package/types/src/control/schema/directory.d.ts +34 -0
- package/types/src/control/schema/eventsContract.d.ts +1423 -0
- package/types/src/control/schema/externalList.d.ts +96 -0
- package/types/src/control/schema/message.d.ts +280 -0
- package/types/src/control/schema/model.d.ts +128 -0
- package/types/src/control/schema/native.d.ts +664 -0
- package/types/src/control/schema/nativeStreamContract.d.ts +155 -0
- package/types/src/control/schema/performance.d.ts +85 -0
- package/types/src/control/schema/public.d.ts +48 -0
- package/types/src/control/schema/reading.d.ts +24 -0
- package/types/src/control/schema/refusals.d.ts +433 -0
- package/types/src/control/schema/runtimeOps.d.ts +724 -0
- package/types/src/control/schema/searchContract.d.ts +258 -0
- package/types/src/control/schema/selection.d.ts +124 -0
- package/types/src/control/schema/session.d.ts +272 -0
- package/types/src/control/schema/terminalPrompt.d.ts +102 -0
- package/types/src/control/transport/boundary.d.ts +7137 -0
- package/types/src/control/transport/client.d.ts +10838 -0
- package/types/src/control/transport/connection.d.ts +13 -0
- package/types/src/control/transport/socketPath.d.ts +3 -0
- package/types/src/control-client.d.ts +9 -0
- package/types/src/delegation/applicationSchema.d.ts +132 -0
- package/types/src/delegation/schema.d.ts +267 -0
- package/types/src/events/schema.d.ts +155 -0
- package/types/src/external/contentSchema.d.ts +145 -0
- package/types/src/external/messageSchema.d.ts +131 -0
- package/types/src/external/residentFrames.d.ts +130 -0
- package/types/src/external/residentSchema.d.ts +144 -0
- package/types/src/external/sessionSchema.d.ts +427 -0
- package/types/src/external/turnSchema.d.ts +55 -0
- package/types/src/fleet/fleetSchema.d.ts +937 -0
- package/types/src/inventory/listSchema.d.ts +442 -0
- package/types/src/monitoring/nativeFile.d.ts +7 -0
- package/types/src/monitoring/nativeRead.d.ts +14 -0
- package/types/src/monitoring/performanceSchema.d.ts +28 -0
- package/types/src/monitoring/schema.d.ts +410 -0
- package/types/src/monitoring/validate.d.ts +5 -0
- package/types/src/monitoring-reader.d.ts +4 -0
- package/types/src/policy/reference.d.ts +93 -0
- package/types/src/policy/runtimeProfile.d.ts +24 -0
- package/types/src/policy/schema.d.ts +177 -0
- package/types/src/runtime/capabilities.d.ts +124 -0
- package/types/src/runtime/modes.d.ts +47 -0
- package/types/src/runtime/permissionScope.d.ts +22 -0
- package/types/src/runtime/planLimitsSchema.d.ts +55 -0
- package/types/src/runtime/projectionSchema.d.ts +539 -0
- package/types/src/runtime/rewindSchema.d.ts +16 -0
- package/types/src/runtime/selectionSchema.d.ts +158 -0
- package/types/src/runtime/workloadContract.d.ts +55 -0
- package/types/src/session/boundary.d.ts +43 -0
- package/types/src/session/identitySchema.d.ts +353 -0
- package/types/src/session/schema.d.ts +341 -0
- package/types/src/session/sleep/schema.d.ts +283 -0
- package/types/src/steering/schema.d.ts +197 -0
- package/types/src/types.d.ts +48 -0
- package/types/src/usage/schema.d.ts +978 -0
- package/types/src/util/home.d.ts +9 -0
- package/types/src/util/preview.d.ts +13 -0
- package/types/src/util/version.d.ts +3 -0
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One immutable v2 chat envelope. `task` is an optional pointer so the channel stays a phone call
|
|
3
|
+
* (details live in the task). There are deliberately no defaults: mixed/old wire shapes fail. */
|
|
4
|
+
/**
|
|
5
|
+
* Generation of the chat record format. It lives IN the record, not in a file name: a reader can
|
|
6
|
+
* then refuse a foreign record by name ("generation 1, this build reads 2") instead of complaining
|
|
7
|
+
* about a field shape — and the files keep canonical names across every future generation. Encoding
|
|
8
|
+
* it in the filename instead was the mistake this replaces: `chat-v2.jsonl` is a lie the moment
|
|
9
|
+
* there is a 3, and it puts a dead archive right beside live state under a near-identical name.
|
|
10
|
+
*/
|
|
11
|
+
export declare const CHAT_GENERATION = 2;
|
|
12
|
+
export declare const ChatMessageSchema: z.ZodObject<{
|
|
13
|
+
v: z.ZodLiteral<2>;
|
|
14
|
+
id: z.ZodUUID;
|
|
15
|
+
ts: z.ZodString;
|
|
16
|
+
from: z.ZodUnion<readonly [z.ZodObject<{
|
|
17
|
+
kind: z.ZodLiteral<"managed">;
|
|
18
|
+
source: z.ZodLiteral<"stitchmux">;
|
|
19
|
+
machine: z.ZodString;
|
|
20
|
+
agent: z.ZodEnum<{
|
|
21
|
+
antigravity: "antigravity";
|
|
22
|
+
claude: "claude";
|
|
23
|
+
codex: "codex";
|
|
24
|
+
custom: "custom";
|
|
25
|
+
opencode: "opencode";
|
|
26
|
+
}>;
|
|
27
|
+
session: z.ZodString;
|
|
28
|
+
threadId: z.ZodUUID;
|
|
29
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
30
|
+
kind: z.ZodLiteral<"codex-app">;
|
|
31
|
+
source: z.ZodLiteral<"codex-app">;
|
|
32
|
+
machine: z.ZodString;
|
|
33
|
+
agent: z.ZodLiteral<"codex">;
|
|
34
|
+
threadId: z.ZodUUID;
|
|
35
|
+
name: z.ZodNullable<z.ZodString>;
|
|
36
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
37
|
+
kind: z.ZodLiteral<"cli">;
|
|
38
|
+
source: z.ZodLiteral<"stitchmux">;
|
|
39
|
+
machine: z.ZodString;
|
|
40
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
41
|
+
kind: z.ZodLiteral<"service">;
|
|
42
|
+
source: z.ZodLiteral<"stitchmux">;
|
|
43
|
+
machine: z.ZodString;
|
|
44
|
+
transport: z.ZodEnum<{
|
|
45
|
+
"declared-service": "declared-service";
|
|
46
|
+
local: "local";
|
|
47
|
+
}>;
|
|
48
|
+
}, z.core.$strict>]>;
|
|
49
|
+
to: z.ZodUnion<readonly [z.ZodObject<{
|
|
50
|
+
kind: z.ZodLiteral<"managed">;
|
|
51
|
+
source: z.ZodLiteral<"stitchmux">;
|
|
52
|
+
machine: z.ZodString;
|
|
53
|
+
agent: z.ZodEnum<{
|
|
54
|
+
antigravity: "antigravity";
|
|
55
|
+
claude: "claude";
|
|
56
|
+
codex: "codex";
|
|
57
|
+
custom: "custom";
|
|
58
|
+
opencode: "opencode";
|
|
59
|
+
}>;
|
|
60
|
+
session: z.ZodString;
|
|
61
|
+
threadId: z.ZodUUID;
|
|
62
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"codex-app">;
|
|
64
|
+
source: z.ZodLiteral<"codex-app">;
|
|
65
|
+
machine: z.ZodString;
|
|
66
|
+
agent: z.ZodLiteral<"codex">;
|
|
67
|
+
threadId: z.ZodUUID;
|
|
68
|
+
name: z.ZodNullable<z.ZodString>;
|
|
69
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
70
|
+
kind: z.ZodLiteral<"owner">;
|
|
71
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
72
|
+
kind: z.ZodLiteral<"external">;
|
|
73
|
+
source: z.ZodLiteral<"stitchmux">;
|
|
74
|
+
name: z.ZodString;
|
|
75
|
+
}, z.core.$strict>]>;
|
|
76
|
+
origin: z.ZodOptional<z.ZodObject<{
|
|
77
|
+
ingress: z.ZodEnum<{
|
|
78
|
+
cli: "cli";
|
|
79
|
+
"codex-app": "codex-app";
|
|
80
|
+
"local-control": "local-control";
|
|
81
|
+
managed: "managed";
|
|
82
|
+
service: "service";
|
|
83
|
+
unknown: "unknown";
|
|
84
|
+
}>;
|
|
85
|
+
actor: z.ZodEnum<{
|
|
86
|
+
agent: "agent";
|
|
87
|
+
application: "application";
|
|
88
|
+
human: "human";
|
|
89
|
+
unknown: "unknown";
|
|
90
|
+
}>;
|
|
91
|
+
assurance: z.ZodEnum<{
|
|
92
|
+
"application-attested": "application-attested";
|
|
93
|
+
"runtime-identity": "runtime-identity";
|
|
94
|
+
unknown: "unknown";
|
|
95
|
+
}>;
|
|
96
|
+
application: z.ZodNullable<z.ZodObject<{
|
|
97
|
+
applicationId: z.ZodString;
|
|
98
|
+
channelId: z.ZodString;
|
|
99
|
+
actor: z.ZodEnum<{
|
|
100
|
+
agent: "agent";
|
|
101
|
+
application: "application";
|
|
102
|
+
human: "human";
|
|
103
|
+
}>;
|
|
104
|
+
revision: z.ZodString;
|
|
105
|
+
digest: z.ZodString;
|
|
106
|
+
}, z.core.$strict>>;
|
|
107
|
+
}, z.core.$strict>>;
|
|
108
|
+
communicationAuthorization: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
basis: z.ZodOptional<z.ZodEnum<{
|
|
110
|
+
"peer-letter": "peer-letter";
|
|
111
|
+
"thread-continuation": "thread-continuation";
|
|
112
|
+
"user-instruction": "user-instruction";
|
|
113
|
+
}>>;
|
|
114
|
+
whyThisCommunicationIsNecessaryAndWithinTheUserAuthorizedScope: z.ZodOptional<z.ZodString>;
|
|
115
|
+
userAuthorizationQuote: z.ZodOptional<z.ZodString>;
|
|
116
|
+
sourceMessageRef: z.ZodString;
|
|
117
|
+
}, z.core.$strict>>;
|
|
118
|
+
communicationReceipt: z.ZodOptional<z.ZodObject<{
|
|
119
|
+
rootMessageId: z.ZodUUID;
|
|
120
|
+
authorization: z.ZodObject<{
|
|
121
|
+
basis: z.ZodOptional<z.ZodEnum<{
|
|
122
|
+
"peer-letter": "peer-letter";
|
|
123
|
+
"thread-continuation": "thread-continuation";
|
|
124
|
+
"user-instruction": "user-instruction";
|
|
125
|
+
}>>;
|
|
126
|
+
whyThisCommunicationIsNecessaryAndWithinTheUserAuthorizedScope: z.ZodOptional<z.ZodString>;
|
|
127
|
+
userAuthorizationQuote: z.ZodOptional<z.ZodString>;
|
|
128
|
+
sourceMessageRef: z.ZodString;
|
|
129
|
+
}, z.core.$strict>;
|
|
130
|
+
sourceLetter: z.ZodNullable<z.ZodObject<{
|
|
131
|
+
id: z.ZodUUID;
|
|
132
|
+
ts: z.ZodString;
|
|
133
|
+
from: z.ZodUnion<readonly [z.ZodObject<{
|
|
134
|
+
kind: z.ZodLiteral<"managed">;
|
|
135
|
+
source: z.ZodLiteral<"stitchmux">;
|
|
136
|
+
machine: z.ZodString;
|
|
137
|
+
agent: z.ZodEnum<{
|
|
138
|
+
antigravity: "antigravity";
|
|
139
|
+
claude: "claude";
|
|
140
|
+
codex: "codex";
|
|
141
|
+
custom: "custom";
|
|
142
|
+
opencode: "opencode";
|
|
143
|
+
}>;
|
|
144
|
+
session: z.ZodString;
|
|
145
|
+
threadId: z.ZodUUID;
|
|
146
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
147
|
+
kind: z.ZodLiteral<"codex-app">;
|
|
148
|
+
source: z.ZodLiteral<"codex-app">;
|
|
149
|
+
machine: z.ZodString;
|
|
150
|
+
agent: z.ZodLiteral<"codex">;
|
|
151
|
+
threadId: z.ZodUUID;
|
|
152
|
+
name: z.ZodNullable<z.ZodString>;
|
|
153
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
154
|
+
kind: z.ZodLiteral<"cli">;
|
|
155
|
+
source: z.ZodLiteral<"stitchmux">;
|
|
156
|
+
machine: z.ZodString;
|
|
157
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
158
|
+
kind: z.ZodLiteral<"service">;
|
|
159
|
+
source: z.ZodLiteral<"stitchmux">;
|
|
160
|
+
machine: z.ZodString;
|
|
161
|
+
transport: z.ZodEnum<{
|
|
162
|
+
"declared-service": "declared-service";
|
|
163
|
+
local: "local";
|
|
164
|
+
}>;
|
|
165
|
+
}, z.core.$strict>]>;
|
|
166
|
+
to: z.ZodUnion<readonly [z.ZodObject<{
|
|
167
|
+
kind: z.ZodLiteral<"managed">;
|
|
168
|
+
source: z.ZodLiteral<"stitchmux">;
|
|
169
|
+
machine: z.ZodString;
|
|
170
|
+
agent: z.ZodEnum<{
|
|
171
|
+
antigravity: "antigravity";
|
|
172
|
+
claude: "claude";
|
|
173
|
+
codex: "codex";
|
|
174
|
+
custom: "custom";
|
|
175
|
+
opencode: "opencode";
|
|
176
|
+
}>;
|
|
177
|
+
session: z.ZodString;
|
|
178
|
+
threadId: z.ZodUUID;
|
|
179
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
180
|
+
kind: z.ZodLiteral<"codex-app">;
|
|
181
|
+
source: z.ZodLiteral<"codex-app">;
|
|
182
|
+
machine: z.ZodString;
|
|
183
|
+
agent: z.ZodLiteral<"codex">;
|
|
184
|
+
threadId: z.ZodUUID;
|
|
185
|
+
name: z.ZodNullable<z.ZodString>;
|
|
186
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
187
|
+
kind: z.ZodLiteral<"owner">;
|
|
188
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
189
|
+
kind: z.ZodLiteral<"external">;
|
|
190
|
+
source: z.ZodLiteral<"stitchmux">;
|
|
191
|
+
name: z.ZodString;
|
|
192
|
+
}, z.core.$strict>]>;
|
|
193
|
+
task: z.ZodNullable<z.ZodString>;
|
|
194
|
+
body: z.ZodString;
|
|
195
|
+
}, z.core.$strict>>;
|
|
196
|
+
}, z.core.$strict>>;
|
|
197
|
+
notification: z.ZodOptional<z.ZodEnum<{
|
|
198
|
+
conversation: "conversation";
|
|
199
|
+
owner: "owner";
|
|
200
|
+
}>>;
|
|
201
|
+
registrationGeneration: z.ZodOptional<z.ZodUUID>;
|
|
202
|
+
body: z.ZodString;
|
|
203
|
+
task: z.ZodNullable<z.ZodString>;
|
|
204
|
+
defer: z.ZodBoolean;
|
|
205
|
+
onBehalfOf: z.ZodNullable<z.ZodString>;
|
|
206
|
+
notBefore: z.ZodNullable<z.ZodString>;
|
|
207
|
+
turnOptions: z.ZodOptional<z.ZodObject<{
|
|
208
|
+
revision: z.ZodNumber;
|
|
209
|
+
options: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
210
|
+
runtime: z.ZodLiteral<"custom">;
|
|
211
|
+
model: z.ZodObject<{
|
|
212
|
+
provider: z.ZodString;
|
|
213
|
+
model: z.ZodString;
|
|
214
|
+
}, z.core.$strict>;
|
|
215
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
216
|
+
runtime: z.ZodLiteral<"claude">;
|
|
217
|
+
model: z.ZodObject<{
|
|
218
|
+
provider: z.ZodString;
|
|
219
|
+
model: z.ZodString;
|
|
220
|
+
}, z.core.$strict>;
|
|
221
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
222
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
223
|
+
runtime: z.ZodLiteral<"codex">;
|
|
224
|
+
model: z.ZodObject<{
|
|
225
|
+
provider: z.ZodString;
|
|
226
|
+
model: z.ZodString;
|
|
227
|
+
}, z.core.$strict>;
|
|
228
|
+
mode: z.ZodEnum<{
|
|
229
|
+
default: "default";
|
|
230
|
+
plan: "plan";
|
|
231
|
+
}>;
|
|
232
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
233
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
234
|
+
runtime: z.ZodLiteral<"opencode">;
|
|
235
|
+
model: z.ZodObject<{
|
|
236
|
+
provider: z.ZodString;
|
|
237
|
+
model: z.ZodString;
|
|
238
|
+
}, z.core.$strict>;
|
|
239
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
240
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
241
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
242
|
+
runtime: z.ZodLiteral<"antigravity">;
|
|
243
|
+
model: z.ZodObject<{
|
|
244
|
+
provider: z.ZodString;
|
|
245
|
+
model: z.ZodString;
|
|
246
|
+
}, z.core.$strict>;
|
|
247
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
248
|
+
}, z.core.$strict>], "runtime">;
|
|
249
|
+
}, z.core.$strict>>;
|
|
250
|
+
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
251
|
+
id: z.ZodUUID;
|
|
252
|
+
digest: z.ZodString;
|
|
253
|
+
mediaType: z.ZodEnum<{
|
|
254
|
+
"image/jpeg": "image/jpeg";
|
|
255
|
+
"image/png": "image/png";
|
|
256
|
+
}>;
|
|
257
|
+
bytes: z.ZodNumber;
|
|
258
|
+
width: z.ZodNumber;
|
|
259
|
+
height: z.ZodNumber;
|
|
260
|
+
}, z.core.$strict>>>;
|
|
261
|
+
controlFingerprint: z.ZodOptional<z.ZodString>;
|
|
262
|
+
}, z.core.$strict>;
|
|
263
|
+
/** Delivery/read bookkeeping, kept OUT of the append-only ledger. `read[managedPeerKey]` = the ledger
|
|
264
|
+
* LENGTH a recipient has read its inbox up to (unread = TO-me messages at/after that index).
|
|
265
|
+
* Grows with delivery sinks (pane/telegram) in later phases; the daemon is the single writer. */
|
|
266
|
+
export declare const ChatCursorsSchema: z.ZodObject<{
|
|
267
|
+
read: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
268
|
+
delivered: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
269
|
+
pickups: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
270
|
+
messageId: z.ZodUUID;
|
|
271
|
+
injectedAt: z.ZodISODateTime;
|
|
272
|
+
ledgerIndex: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
273
|
+
conditional: z.ZodDefault<z.ZodBoolean>;
|
|
274
|
+
transcriptLine: z.ZodOptional<z.ZodNumber>;
|
|
275
|
+
native: z.ZodOptional<z.ZodObject<{
|
|
276
|
+
phase: z.ZodEnum<{
|
|
277
|
+
accepted: "accepted";
|
|
278
|
+
intent: "intent";
|
|
279
|
+
}>;
|
|
280
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
281
|
+
}, z.core.$strict>>;
|
|
282
|
+
}, z.core.$strict>>>;
|
|
283
|
+
telegram: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
284
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AttributedActorSchema: z.ZodEnum<{
|
|
3
|
+
agent: "agent";
|
|
4
|
+
application: "application";
|
|
5
|
+
human: "human";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const MessageAttributionSchema: z.ZodObject<{
|
|
8
|
+
applicationId: z.ZodString;
|
|
9
|
+
channelId: z.ZodString;
|
|
10
|
+
actor: z.ZodEnum<{
|
|
11
|
+
agent: "agent";
|
|
12
|
+
application: "application";
|
|
13
|
+
human: "human";
|
|
14
|
+
}>;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
export declare const MessageApplicationsSchema: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
17
|
+
revision: z.ZodString;
|
|
18
|
+
callers: z.ZodArray<z.ZodString>;
|
|
19
|
+
channels: z.ZodArray<z.ZodString>;
|
|
20
|
+
actors: z.ZodArray<z.ZodEnum<{
|
|
21
|
+
agent: "agent";
|
|
22
|
+
application: "application";
|
|
23
|
+
human: "human";
|
|
24
|
+
}>>;
|
|
25
|
+
ownerNotifications: z.ZodDefault<z.ZodBoolean>;
|
|
26
|
+
}, z.core.$strict>>>;
|
|
27
|
+
export declare const MessageOriginSchema: z.ZodObject<{
|
|
28
|
+
ingress: z.ZodEnum<{
|
|
29
|
+
cli: "cli";
|
|
30
|
+
"codex-app": "codex-app";
|
|
31
|
+
"local-control": "local-control";
|
|
32
|
+
managed: "managed";
|
|
33
|
+
service: "service";
|
|
34
|
+
unknown: "unknown";
|
|
35
|
+
}>;
|
|
36
|
+
actor: z.ZodEnum<{
|
|
37
|
+
agent: "agent";
|
|
38
|
+
application: "application";
|
|
39
|
+
human: "human";
|
|
40
|
+
unknown: "unknown";
|
|
41
|
+
}>;
|
|
42
|
+
assurance: z.ZodEnum<{
|
|
43
|
+
"application-attested": "application-attested";
|
|
44
|
+
"runtime-identity": "runtime-identity";
|
|
45
|
+
unknown: "unknown";
|
|
46
|
+
}>;
|
|
47
|
+
application: z.ZodNullable<z.ZodObject<{
|
|
48
|
+
applicationId: z.ZodString;
|
|
49
|
+
channelId: z.ZodString;
|
|
50
|
+
actor: z.ZodEnum<{
|
|
51
|
+
agent: "agent";
|
|
52
|
+
application: "application";
|
|
53
|
+
human: "human";
|
|
54
|
+
}>;
|
|
55
|
+
revision: z.ZodString;
|
|
56
|
+
digest: z.ZodString;
|
|
57
|
+
}, z.core.$strict>>;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
export declare const NotificationAudienceSchema: z.ZodEnum<{
|
|
60
|
+
conversation: "conversation";
|
|
61
|
+
owner: "owner";
|
|
62
|
+
}>;
|
|
63
|
+
export type MessageOrigin = z.infer<typeof MessageOriginSchema>;
|
|
64
|
+
export type MessageAttribution = z.infer<typeof MessageAttributionSchema>;
|
|
65
|
+
export type NotificationAudience = z.infer<typeof NotificationAudienceSchema>;
|
|
66
|
+
/** Missing historical evidence is not permission to infer an author or notify a human. */
|
|
67
|
+
export declare function unknownMessageOrigin(): MessageOrigin;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { ChatMessage } from "../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* - `accepted` — in the recipient's ledger. It is shown to the recipient at its next turn boundary
|
|
5
|
+
* (at once when idle, or when `notBefore` comes); `stitchmux msg pending` says whether that happened.
|
|
6
|
+
* - `held` — not accepted yet: the recipient's machine was not reached, or answered no; the letter
|
|
7
|
+
* is recorded here and tried again for the retry window. The note carries what was answered.
|
|
8
|
+
* - `refused` — the recipient's side will refuse it identically however often it is sent; settled.
|
|
9
|
+
* - `recorded` — addressed somewhere stitchmux does not deliver; mirrored to the owner, who carries it.
|
|
10
|
+
* - `undelivered` — held past the retry window. Only a look back can say this.
|
|
11
|
+
*/
|
|
12
|
+
export declare const SentLetterStateSchema: z.ZodEnum<{
|
|
13
|
+
accepted: "accepted";
|
|
14
|
+
held: "held";
|
|
15
|
+
recorded: "recorded";
|
|
16
|
+
refused: "refused";
|
|
17
|
+
undelivered: "undelivered";
|
|
18
|
+
}>;
|
|
19
|
+
export type SentLetterState = z.infer<typeof SentLetterStateSchema>;
|
|
20
|
+
export declare const SentLetterSchema: z.ZodObject<{
|
|
21
|
+
ref: z.ZodNullable<z.ZodString>;
|
|
22
|
+
state: z.ZodEnum<{
|
|
23
|
+
accepted: "accepted";
|
|
24
|
+
held: "held";
|
|
25
|
+
recorded: "recorded";
|
|
26
|
+
refused: "refused";
|
|
27
|
+
undelivered: "undelivered";
|
|
28
|
+
}>;
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
thread: z.ZodNullable<z.ZodString>;
|
|
31
|
+
to: z.ZodString;
|
|
32
|
+
task: z.ZodNullable<z.ZodString>;
|
|
33
|
+
ts: z.ZodString;
|
|
34
|
+
preview: z.ZodString;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type SentLetter = z.infer<typeof SentLetterSchema>;
|
|
37
|
+
export declare function sentLetter(message: ChatMessage, state: SentLetterState): SentLetter;
|
|
38
|
+
/** The answer of `stitchmux msg sent --json`. */
|
|
39
|
+
export declare const SentListSchema: z.ZodObject<{
|
|
40
|
+
sender: z.ZodString;
|
|
41
|
+
sent: z.ZodArray<z.ZodObject<{
|
|
42
|
+
ref: z.ZodNullable<z.ZodString>;
|
|
43
|
+
state: z.ZodEnum<{
|
|
44
|
+
accepted: "accepted";
|
|
45
|
+
held: "held";
|
|
46
|
+
recorded: "recorded";
|
|
47
|
+
refused: "refused";
|
|
48
|
+
undelivered: "undelivered";
|
|
49
|
+
}>;
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
thread: z.ZodNullable<z.ZodString>;
|
|
52
|
+
to: z.ZodString;
|
|
53
|
+
task: z.ZodNullable<z.ZodString>;
|
|
54
|
+
ts: z.ZodString;
|
|
55
|
+
preview: z.ZodString;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
fromEarlierLives: z.ZodInt;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
/** The answer of `stitchmux msg <to> <text> --json`: the one letter, and who it is from. */
|
|
60
|
+
export declare const SendReceiptSchema: z.ZodObject<{
|
|
61
|
+
ref: z.ZodNullable<z.ZodString>;
|
|
62
|
+
state: z.ZodEnum<{
|
|
63
|
+
accepted: "accepted";
|
|
64
|
+
held: "held";
|
|
65
|
+
recorded: "recorded";
|
|
66
|
+
refused: "refused";
|
|
67
|
+
undelivered: "undelivered";
|
|
68
|
+
}>;
|
|
69
|
+
id: z.ZodString;
|
|
70
|
+
thread: z.ZodNullable<z.ZodString>;
|
|
71
|
+
to: z.ZodString;
|
|
72
|
+
task: z.ZodNullable<z.ZodString>;
|
|
73
|
+
ts: z.ZodString;
|
|
74
|
+
preview: z.ZodString;
|
|
75
|
+
from: z.ZodString;
|
|
76
|
+
notBefore: z.ZodNullable<z.ZodString>;
|
|
77
|
+
note: z.ZodNullable<z.ZodString>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
export type SendReceipt = z.infer<typeof SendReceiptSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@stitchmux/client`: the one Stitchmux client. Typed control operations over either transport —
|
|
3
|
+
* `createControlClient` connects to the local daemon's socket, `createInjectedControlClient` runs the
|
|
4
|
+
* same contract over a transport the caller supplies (a Stitchwire service caller, a test double) —
|
|
5
|
+
* with the schemas, the refusal catalog and the resident status frames both share. Monitoring
|
|
6
|
+
* snapshots are read from `@stitchmux/client/monitoring`.
|
|
7
|
+
*/
|
|
8
|
+
export type { OperationEffect } from 'stitchkit/contract';
|
|
9
|
+
export { ControlTargetSchema } from "./control/schema/core.js";
|
|
10
|
+
export { ControlActionReceiptSchema, ControlInterruptSchema, ControlKeysSchema, type ControlMessage, ControlMessageReceiptSchema, ControlMessageSchema, ControlStopReceiptSchema, } from "./control/schema/message.js";
|
|
11
|
+
export { ControlNativeStreamCursorSchema, ControlNativeStreamFrameSchema, type ControlNativeStreamRequest, ControlNativeStreamRequestSchema, controlNativeStreamFrame, createStitchmuxNativeStreamProfile, encodeControlNativeStreamCursor, readControlNativeStreamCursor, STITCHMUX_NATIVE_STREAM_COMMAND, STITCHMUX_NATIVE_STREAM_HEARTBEAT_MS, STITCHMUX_NATIVE_STREAM_MAX_FRAME_BYTES, STITCHMUX_NATIVE_STREAM_MAX_INPUT_BYTES, STITCHMUX_NATIVE_STREAM_PROFILE, StitchmuxNativeStreamProfileSchema, } from "./control/schema/nativeStreamContract.js";
|
|
12
|
+
export { ControlWaitResultSchema } from "./control/schema/runtimeOps.js";
|
|
13
|
+
export { createInjectedControlClient } from "./control/transport/boundary.js";
|
|
14
|
+
export * from "./control-client.js";
|
|
15
|
+
export { EXTERNAL_CONTENT_LIMITS, ExternalContentCapabilitiesSchema, type ExternalContentRead, ExternalContentReadSchema, type ExternalContentResult, ExternalContentResultSchema, ExternalContentSelectorSchema, type ExternalContentTarget, ExternalContentTargetSchema, } from "./external/contentSchema.js";
|
|
16
|
+
export { type ExternalMessageAuthorship, ExternalMessageAuthorshipSchema, type ExternalMessageRead, ExternalMessageReadSchema, type ExternalMessageResult, ExternalMessageResultSchema, ExternalMessageSchema, } from "./external/messageSchema.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ProfileNameSchema: z.ZodString;
|
|
3
|
+
export declare const ProfileDirectorySchema: z.ZodString;
|
|
4
|
+
/** The implicit Claude login and an explicit directory are different provider contexts. */
|
|
5
|
+
export declare const ClaudeProfileBindingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
source: z.ZodLiteral<"default">;
|
|
7
|
+
name: z.ZodLiteral<"default">;
|
|
8
|
+
configDir: z.ZodNull;
|
|
9
|
+
accountDigest: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
configDir: z.ZodString;
|
|
13
|
+
accountDigest: z.ZodOptional<z.ZodString>;
|
|
14
|
+
source: z.ZodLiteral<"machine">;
|
|
15
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
configDir: z.ZodString;
|
|
18
|
+
accountDigest: z.ZodOptional<z.ZodString>;
|
|
19
|
+
source: z.ZodLiteral<"claude-multiprofile">;
|
|
20
|
+
registryPath: z.ZodString;
|
|
21
|
+
}, z.core.$strict>], "source">;
|
|
22
|
+
export type ClaudeProfileBinding = z.infer<typeof ClaudeProfileBindingSchema>;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Any Claude Code permission mode (matches `claude --permission-mode` choices).
|
|
3
|
+
* Shared by the machine default and the per-session override so the two can't drift. */
|
|
4
|
+
export declare const PermissionModeSchema: z.ZodEnum<{
|
|
5
|
+
acceptEdits: "acceptEdits";
|
|
6
|
+
auto: "auto";
|
|
7
|
+
bypassPermissions: "bypassPermissions";
|
|
8
|
+
dontAsk: "dontAsk";
|
|
9
|
+
manual: "manual";
|
|
10
|
+
plan: "plan";
|
|
11
|
+
}>;
|
|
12
|
+
/** Provider continuation is not the managed registration UUID. */
|
|
13
|
+
export declare const NativeSessionSchema: z.ZodObject<{
|
|
14
|
+
runtime: z.ZodEnum<{
|
|
15
|
+
antigravity: "antigravity";
|
|
16
|
+
claude: "claude";
|
|
17
|
+
custom: "custom";
|
|
18
|
+
opencode: "opencode";
|
|
19
|
+
}>;
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
version: z.ZodString;
|
|
22
|
+
}, z.core.$strict>;
|
|
23
|
+
/** Public-safe identity of an execution-host launch recipe. The reference contains no path,
|
|
24
|
+
* command, environment value or provider credential. */
|
|
25
|
+
export declare const LaunchRecipeIdSchema: z.ZodString;
|
|
26
|
+
export declare const LaunchRecipeRevisionSchema: z.ZodString;
|
|
27
|
+
export declare const LaunchRecipeCapabilitySchema: z.ZodString;
|
|
28
|
+
/** Native provider collaboration modes that a host recipe may pin. The public caller never sends
|
|
29
|
+
* the mode or its settings; it selects only the immutable recipe reference. */
|
|
30
|
+
export declare const CodexCollaborationModeSchema: z.ZodEnum<{
|
|
31
|
+
default: "default";
|
|
32
|
+
plan: "plan";
|
|
33
|
+
}>;
|
|
34
|
+
export declare const LaunchRecipeReferenceSchema: z.ZodObject<{
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
revision: z.ZodString;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export declare const ModelSelectionSchema: z.ZodObject<{
|
|
39
|
+
provider: z.ZodString;
|
|
40
|
+
model: z.ZodString;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
export declare const LaunchRecipeMetadataSchema: z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
revision: z.ZodString;
|
|
45
|
+
digest: z.ZodString;
|
|
46
|
+
capabilities: z.ZodArray<z.ZodString>;
|
|
47
|
+
collaborationMode: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
default: "default";
|
|
49
|
+
plan: "plan";
|
|
50
|
+
}>>;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
/** Private host configuration. Values stay on the execution host; only LaunchRecipeMetadata is
|
|
53
|
+
* projected through control APIs. `environment` names capabilities the recipe requires without
|
|
54
|
+
* carrying their values, and `flags` goes through the existing owned App Server allowlist. */
|
|
55
|
+
export declare const MachineLaunchRecipeSchema: z.ZodObject<{
|
|
56
|
+
revision: z.ZodString;
|
|
57
|
+
envFile: z.ZodOptional<z.ZodString>;
|
|
58
|
+
flags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
59
|
+
environment: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
60
|
+
capabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
61
|
+
collaborationMode: z.ZodOptional<z.ZodEnum<{
|
|
62
|
+
default: "default";
|
|
63
|
+
plan: "plan";
|
|
64
|
+
}>>;
|
|
65
|
+
custom: z.ZodOptional<z.ZodObject<{
|
|
66
|
+
provider: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
67
|
+
kind: z.ZodLiteral<"openrouter">;
|
|
68
|
+
credentialEnv: z.ZodString;
|
|
69
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
70
|
+
kind: z.ZodLiteral<"local">;
|
|
71
|
+
endpoint: z.ZodString;
|
|
72
|
+
credentialEnv: z.ZodOptional<z.ZodString>;
|
|
73
|
+
label: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strict>], "kind">;
|
|
75
|
+
models: z.ZodArray<z.ZodObject<{
|
|
76
|
+
selection: z.ZodObject<{
|
|
77
|
+
provider: z.ZodString;
|
|
78
|
+
model: z.ZodString;
|
|
79
|
+
}, z.core.$strict>;
|
|
80
|
+
contextWindow: z.ZodNumber;
|
|
81
|
+
capabilities: z.ZodArray<z.ZodEnum<{
|
|
82
|
+
files: "files";
|
|
83
|
+
reasoning: "reasoning";
|
|
84
|
+
tools: "tools";
|
|
85
|
+
vision: "vision";
|
|
86
|
+
}>>;
|
|
87
|
+
}, z.core.$strict>>;
|
|
88
|
+
defaultModel: z.ZodObject<{
|
|
89
|
+
provider: z.ZodString;
|
|
90
|
+
model: z.ZodString;
|
|
91
|
+
}, z.core.$strict>;
|
|
92
|
+
trustedRoots: z.ZodArray<z.ZodString>;
|
|
93
|
+
resources: z.ZodArray<z.ZodObject<{
|
|
94
|
+
id: z.ZodString;
|
|
95
|
+
path: z.ZodString;
|
|
96
|
+
sha256: z.ZodString;
|
|
97
|
+
kind: z.ZodEnum<{
|
|
98
|
+
instruction: "instruction";
|
|
99
|
+
resource: "resource";
|
|
100
|
+
skill: "skill";
|
|
101
|
+
}>;
|
|
102
|
+
}, z.core.$strict>>;
|
|
103
|
+
tools: z.ZodArray<z.ZodEnum<{
|
|
104
|
+
edit_file: "edit_file";
|
|
105
|
+
glob: "glob";
|
|
106
|
+
list_directory: "list_directory";
|
|
107
|
+
read_file: "read_file";
|
|
108
|
+
read_output: "read_output";
|
|
109
|
+
read_resource: "read_resource";
|
|
110
|
+
run_command: "run_command";
|
|
111
|
+
search_files: "search_files";
|
|
112
|
+
write_file: "write_file";
|
|
113
|
+
}>>;
|
|
114
|
+
approvalTools: z.ZodArray<z.ZodEnum<{
|
|
115
|
+
edit_file: "edit_file";
|
|
116
|
+
glob: "glob";
|
|
117
|
+
list_directory: "list_directory";
|
|
118
|
+
read_file: "read_file";
|
|
119
|
+
read_output: "read_output";
|
|
120
|
+
read_resource: "read_resource";
|
|
121
|
+
run_command: "run_command";
|
|
122
|
+
search_files: "search_files";
|
|
123
|
+
write_file: "write_file";
|
|
124
|
+
}>>;
|
|
125
|
+
services: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
126
|
+
id: z.ZodString;
|
|
127
|
+
command: z.ZodString;
|
|
128
|
+
args: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
129
|
+
credentialEnv: z.ZodOptional<z.ZodString>;
|
|
130
|
+
tools: z.ZodArray<z.ZodString>;
|
|
131
|
+
}, z.core.$strict>>>;
|
|
132
|
+
approvalSecretEnv: z.ZodString;
|
|
133
|
+
executables: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
134
|
+
commandEnvironment: z.ZodArray<z.ZodString>;
|
|
135
|
+
}, z.core.$strict>>;
|
|
136
|
+
}, z.core.$strict>;
|