@stitchmux/client 0.0.0-stage → 0.96.1
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-wddwdvbj.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,320 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Optional Telegram sink for explicit owner notices — a group, a
|
|
3
|
+
* DM, or a specific forum topic. Any stitchmux user drops in their own @BotFather token + target;
|
|
4
|
+
* absent → no mirroring (fail-soft). Set in machine.json. */
|
|
5
|
+
export declare const TelegramConfigSchema: z.ZodObject<{
|
|
6
|
+
botToken: z.ZodString;
|
|
7
|
+
chatId: z.ZodString;
|
|
8
|
+
topicId: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
/**
|
|
11
|
+
* Per-machine config: the ONE-artifact / many-configs split. Everything that
|
|
12
|
+
* differs between local/dev/prod lives here, never in code.
|
|
13
|
+
*/
|
|
14
|
+
export declare const MachineConfigSchema: z.ZodObject<{
|
|
15
|
+
finiteWorkloads: z.ZodOptional<z.ZodObject<{
|
|
16
|
+
launcherBin: z.ZodString;
|
|
17
|
+
profileFile: z.ZodString;
|
|
18
|
+
}, z.core.$strict>>;
|
|
19
|
+
claudeBin: z.ZodString;
|
|
20
|
+
claudeProfiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
21
|
+
codexBin: z.ZodOptional<z.ZodString>;
|
|
22
|
+
opencodeBin: z.ZodOptional<z.ZodString>;
|
|
23
|
+
antigravityBin: z.ZodOptional<z.ZodString>;
|
|
24
|
+
antigravityDataDir: z.ZodOptional<z.ZodString>;
|
|
25
|
+
antigravityMcpServers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
26
|
+
name: z.ZodString;
|
|
27
|
+
command: z.ZodString;
|
|
28
|
+
args: z.ZodArray<z.ZodString>;
|
|
29
|
+
env: z.ZodArray<z.ZodObject<{
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
value: z.ZodString;
|
|
32
|
+
}, z.core.$strict>>;
|
|
33
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
34
|
+
type: z.ZodEnum<{
|
|
35
|
+
http: "http";
|
|
36
|
+
sse: "sse";
|
|
37
|
+
}>;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
url: z.ZodURL;
|
|
40
|
+
headers: z.ZodArray<z.ZodObject<{
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
value: z.ZodString;
|
|
43
|
+
}, z.core.$strict>>;
|
|
44
|
+
}, z.core.$strict>]>>>;
|
|
45
|
+
claudeNativeRuntime: z.ZodDefault<z.ZodBoolean>;
|
|
46
|
+
claudeNativeSdk: z.ZodOptional<z.ZodString>;
|
|
47
|
+
tmuxBin: z.ZodString;
|
|
48
|
+
tmuxSocket: z.ZodOptional<z.ZodString>;
|
|
49
|
+
remoteControl: z.ZodDefault<z.ZodBoolean>;
|
|
50
|
+
projectsDir: z.ZodString;
|
|
51
|
+
codexSessionsDir: z.ZodOptional<z.ZodString>;
|
|
52
|
+
codexHome: z.ZodOptional<z.ZodString>;
|
|
53
|
+
codexCorrelationTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
54
|
+
launchRecipes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
55
|
+
revision: z.ZodString;
|
|
56
|
+
envFile: z.ZodOptional<z.ZodString>;
|
|
57
|
+
flags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
58
|
+
environment: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
59
|
+
capabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
60
|
+
collaborationMode: z.ZodOptional<z.ZodEnum<{
|
|
61
|
+
default: "default";
|
|
62
|
+
plan: "plan";
|
|
63
|
+
}>>;
|
|
64
|
+
custom: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
provider: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
66
|
+
kind: z.ZodLiteral<"openrouter">;
|
|
67
|
+
credentialEnv: z.ZodString;
|
|
68
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
69
|
+
kind: z.ZodLiteral<"local">;
|
|
70
|
+
endpoint: z.ZodString;
|
|
71
|
+
credentialEnv: z.ZodOptional<z.ZodString>;
|
|
72
|
+
label: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, z.core.$strict>], "kind">;
|
|
74
|
+
models: z.ZodArray<z.ZodObject<{
|
|
75
|
+
selection: z.ZodObject<{
|
|
76
|
+
provider: z.ZodString;
|
|
77
|
+
model: z.ZodString;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
contextWindow: z.ZodNumber;
|
|
80
|
+
capabilities: z.ZodArray<z.ZodEnum<{
|
|
81
|
+
files: "files";
|
|
82
|
+
reasoning: "reasoning";
|
|
83
|
+
tools: "tools";
|
|
84
|
+
vision: "vision";
|
|
85
|
+
}>>;
|
|
86
|
+
}, z.core.$strict>>;
|
|
87
|
+
defaultModel: z.ZodObject<{
|
|
88
|
+
provider: z.ZodString;
|
|
89
|
+
model: z.ZodString;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
trustedRoots: z.ZodArray<z.ZodString>;
|
|
92
|
+
resources: z.ZodArray<z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
path: z.ZodString;
|
|
95
|
+
sha256: z.ZodString;
|
|
96
|
+
kind: z.ZodEnum<{
|
|
97
|
+
instruction: "instruction";
|
|
98
|
+
resource: "resource";
|
|
99
|
+
skill: "skill";
|
|
100
|
+
}>;
|
|
101
|
+
}, z.core.$strict>>;
|
|
102
|
+
tools: z.ZodArray<z.ZodEnum<{
|
|
103
|
+
edit_file: "edit_file";
|
|
104
|
+
glob: "glob";
|
|
105
|
+
list_directory: "list_directory";
|
|
106
|
+
read_file: "read_file";
|
|
107
|
+
read_output: "read_output";
|
|
108
|
+
read_resource: "read_resource";
|
|
109
|
+
run_command: "run_command";
|
|
110
|
+
search_files: "search_files";
|
|
111
|
+
write_file: "write_file";
|
|
112
|
+
}>>;
|
|
113
|
+
approvalTools: z.ZodArray<z.ZodEnum<{
|
|
114
|
+
edit_file: "edit_file";
|
|
115
|
+
glob: "glob";
|
|
116
|
+
list_directory: "list_directory";
|
|
117
|
+
read_file: "read_file";
|
|
118
|
+
read_output: "read_output";
|
|
119
|
+
read_resource: "read_resource";
|
|
120
|
+
run_command: "run_command";
|
|
121
|
+
search_files: "search_files";
|
|
122
|
+
write_file: "write_file";
|
|
123
|
+
}>>;
|
|
124
|
+
services: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
125
|
+
id: z.ZodString;
|
|
126
|
+
command: z.ZodString;
|
|
127
|
+
args: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
128
|
+
credentialEnv: z.ZodOptional<z.ZodString>;
|
|
129
|
+
tools: z.ZodArray<z.ZodString>;
|
|
130
|
+
}, z.core.$strict>>>;
|
|
131
|
+
approvalSecretEnv: z.ZodString;
|
|
132
|
+
executables: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
133
|
+
commandEnvironment: z.ZodArray<z.ZodString>;
|
|
134
|
+
}, z.core.$strict>>;
|
|
135
|
+
}, z.core.$strict>>>;
|
|
136
|
+
agentPolicies: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
137
|
+
revision: z.ZodString;
|
|
138
|
+
trustedRoots: z.ZodArray<z.ZodString>;
|
|
139
|
+
runtime: z.ZodLiteral<"codex">;
|
|
140
|
+
instructionSources: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
path: z.ZodString;
|
|
143
|
+
sha256: z.ZodString;
|
|
144
|
+
}, z.core.$strict>>>;
|
|
145
|
+
skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
146
|
+
id: z.ZodString;
|
|
147
|
+
path: z.ZodString;
|
|
148
|
+
sha256: z.ZodString;
|
|
149
|
+
name: z.ZodString;
|
|
150
|
+
}, z.core.$strict>>>;
|
|
151
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
152
|
+
revision: z.ZodString;
|
|
153
|
+
trustedRoots: z.ZodArray<z.ZodString>;
|
|
154
|
+
runtime: z.ZodLiteral<"opencode">;
|
|
155
|
+
agent: z.ZodObject<{
|
|
156
|
+
name: z.ZodString;
|
|
157
|
+
source: z.ZodObject<{
|
|
158
|
+
id: z.ZodString;
|
|
159
|
+
path: z.ZodString;
|
|
160
|
+
sha256: z.ZodString;
|
|
161
|
+
}, z.core.$strict>;
|
|
162
|
+
}, z.core.$strict>;
|
|
163
|
+
denyTools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
164
|
+
}, z.core.$strict>], "runtime">>>;
|
|
165
|
+
applicationDelegationAuthorities: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
166
|
+
binding: z.ZodObject<{
|
|
167
|
+
applicationId: z.ZodString;
|
|
168
|
+
channelId: z.ZodString;
|
|
169
|
+
actor: z.ZodLiteral<"agent">;
|
|
170
|
+
revision: z.ZodString;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
policy: z.ZodObject<{
|
|
173
|
+
access: z.ZodEnum<{
|
|
174
|
+
"read-only": "read-only";
|
|
175
|
+
"workspace-write": "workspace-write";
|
|
176
|
+
}>;
|
|
177
|
+
readScope: z.ZodLiteral<"host">;
|
|
178
|
+
workspace: z.ZodString;
|
|
179
|
+
network: z.ZodLiteral<false>;
|
|
180
|
+
}, z.core.$strict>;
|
|
181
|
+
leaseMs: z.ZodNumber;
|
|
182
|
+
lifetimeMs: z.ZodNumber;
|
|
183
|
+
}, z.core.$strict>>>;
|
|
184
|
+
delegationAuthorities: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
185
|
+
parent: z.ZodObject<{
|
|
186
|
+
target: z.ZodUnion<readonly [z.ZodObject<{
|
|
187
|
+
kind: z.ZodLiteral<"managed">;
|
|
188
|
+
source: z.ZodLiteral<"stitchmux">;
|
|
189
|
+
machine: z.ZodString;
|
|
190
|
+
agent: z.ZodEnum<{
|
|
191
|
+
antigravity: "antigravity";
|
|
192
|
+
claude: "claude";
|
|
193
|
+
codex: "codex";
|
|
194
|
+
custom: "custom";
|
|
195
|
+
opencode: "opencode";
|
|
196
|
+
}>;
|
|
197
|
+
session: z.ZodString;
|
|
198
|
+
threadId: z.ZodUUID;
|
|
199
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
200
|
+
kind: z.ZodLiteral<"application">;
|
|
201
|
+
machine: z.ZodString;
|
|
202
|
+
applicationId: z.ZodString;
|
|
203
|
+
authorityId: z.ZodUUID;
|
|
204
|
+
}, z.core.$strict>]>;
|
|
205
|
+
registrationGeneration: z.ZodUUID;
|
|
206
|
+
}, z.core.$strict>;
|
|
207
|
+
policy: z.ZodObject<{
|
|
208
|
+
access: z.ZodEnum<{
|
|
209
|
+
"full-access": "full-access";
|
|
210
|
+
"read-only": "read-only";
|
|
211
|
+
"workspace-write": "workspace-write";
|
|
212
|
+
}>;
|
|
213
|
+
readScope: z.ZodLiteral<"host">;
|
|
214
|
+
workspace: z.ZodString;
|
|
215
|
+
network: z.ZodLiteral<false>;
|
|
216
|
+
}, z.core.$strict>;
|
|
217
|
+
deadlineAt: z.ZodOptional<z.ZodISODateTime>;
|
|
218
|
+
}, z.core.$strict>>>;
|
|
219
|
+
messageApplications: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
220
|
+
revision: z.ZodString;
|
|
221
|
+
callers: z.ZodArray<z.ZodString>;
|
|
222
|
+
channels: z.ZodArray<z.ZodString>;
|
|
223
|
+
actors: z.ZodArray<z.ZodEnum<{
|
|
224
|
+
agent: "agent";
|
|
225
|
+
application: "application";
|
|
226
|
+
human: "human";
|
|
227
|
+
}>>;
|
|
228
|
+
ownerNotifications: z.ZodDefault<z.ZodBoolean>;
|
|
229
|
+
}, z.core.$strict>>>;
|
|
230
|
+
rcPrefix: z.ZodString;
|
|
231
|
+
fleet: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
232
|
+
sessionEvents: z.ZodDefault<z.ZodBoolean>;
|
|
233
|
+
externals: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
234
|
+
remoteTransport: z.ZodOptional<z.ZodObject<{
|
|
235
|
+
kind: z.ZodLiteral<"stitchwire">;
|
|
236
|
+
peers: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
237
|
+
trustedAncestor: z.ZodOptional<z.ZodObject<{
|
|
238
|
+
executable: z.ZodString;
|
|
239
|
+
argument: z.ZodString;
|
|
240
|
+
}, z.core.$strict>>;
|
|
241
|
+
agentSocket: z.ZodOptional<z.ZodString>;
|
|
242
|
+
serviceDirectory: z.ZodOptional<z.ZodString>;
|
|
243
|
+
}, z.core.$strict>>;
|
|
244
|
+
transitPreflight: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
245
|
+
stateDir: z.ZodString;
|
|
246
|
+
ensureInterval: z.ZodDefault<z.ZodNumber>;
|
|
247
|
+
idleSleep: z.ZodDefault<z.ZodObject<{
|
|
248
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
249
|
+
idleAfterMinutes: z.ZodDefault<z.ZodNumber>;
|
|
250
|
+
minAwakePerProfile: z.ZodDefault<z.ZodNumber>;
|
|
251
|
+
checkIntervalSeconds: z.ZodDefault<z.ZodNumber>;
|
|
252
|
+
}, z.core.$strict>>;
|
|
253
|
+
oomScoreAdj: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
254
|
+
permissionMode: z.ZodDefault<z.ZodEnum<{
|
|
255
|
+
acceptEdits: "acceptEdits";
|
|
256
|
+
auto: "auto";
|
|
257
|
+
bypassPermissions: "bypassPermissions";
|
|
258
|
+
dontAsk: "dontAsk";
|
|
259
|
+
manual: "manual";
|
|
260
|
+
plan: "plan";
|
|
261
|
+
}>>;
|
|
262
|
+
allowEscalatedUnderRoot: z.ZodDefault<z.ZodBoolean>;
|
|
263
|
+
chatEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
264
|
+
externalInventory: z.ZodDefault<z.ZodBoolean>;
|
|
265
|
+
bootLabel: z.ZodString;
|
|
266
|
+
tmuxBootLabel: z.ZodOptional<z.ZodString>;
|
|
267
|
+
macosBundleId: z.ZodOptional<z.ZodString>;
|
|
268
|
+
releaseUrl: z.ZodOptional<z.ZodURL>;
|
|
269
|
+
releaseAllowPrivateHosts: z.ZodDefault<z.ZodBoolean>;
|
|
270
|
+
releaseTrustKeys: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
271
|
+
autoUpdate: z.ZodDefault<z.ZodBoolean>;
|
|
272
|
+
updateCheckInterval: z.ZodDefault<z.ZodNumber>;
|
|
273
|
+
autoUpdateSettleSeconds: z.ZodDefault<z.ZodNumber>;
|
|
274
|
+
extraFlags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
275
|
+
logLevel: z.ZodDefault<z.ZodEnum<{
|
|
276
|
+
debug: "debug";
|
|
277
|
+
error: "error";
|
|
278
|
+
info: "info";
|
|
279
|
+
warn: "warn";
|
|
280
|
+
}>>;
|
|
281
|
+
resumePicker: z.ZodDefault<z.ZodEnum<{
|
|
282
|
+
full: "full";
|
|
283
|
+
off: "off";
|
|
284
|
+
summary: "summary";
|
|
285
|
+
}>>;
|
|
286
|
+
trustPrompt: z.ZodDefault<z.ZodEnum<{
|
|
287
|
+
declared: "declared";
|
|
288
|
+
folder: "folder";
|
|
289
|
+
off: "off";
|
|
290
|
+
}>>;
|
|
291
|
+
quota: z.ZodDefault<z.ZodObject<{
|
|
292
|
+
probe: z.ZodDefault<z.ZodEnum<{
|
|
293
|
+
auto: "auto";
|
|
294
|
+
off: "off";
|
|
295
|
+
}>>;
|
|
296
|
+
refreshMinutes: z.ZodDefault<z.ZodNumber>;
|
|
297
|
+
}, z.core.$strip>>;
|
|
298
|
+
telegram: z.ZodOptional<z.ZodObject<{
|
|
299
|
+
botToken: z.ZodString;
|
|
300
|
+
chatId: z.ZodString;
|
|
301
|
+
topicId: z.ZodOptional<z.ZodNumber>;
|
|
302
|
+
}, z.core.$strip>>;
|
|
303
|
+
ownerLang: z.ZodOptional<z.ZodString>;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
/**
|
|
306
|
+
* Remote release descriptor for `update` — replaces a VERSION/NOTES text dance.
|
|
307
|
+
* The version regex only VALIDATES a known shape; it never parses unknown data.
|
|
308
|
+
*
|
|
309
|
+
* These are the fields every stitchmux reads, the install script and earlier daemons included. The same
|
|
310
|
+
* `release.json` is also a signed stitchkit `CliBuildManifest` (`name`, `commit`, `builtAt`,
|
|
311
|
+
* `assets`, `signature`), which is what a current stitchmux installs from; `url` and `sha256` here name
|
|
312
|
+
* the same bundle as its assets do.
|
|
313
|
+
*/
|
|
314
|
+
export declare const ReleaseSchema: z.ZodObject<{
|
|
315
|
+
version: z.ZodString;
|
|
316
|
+
notes: z.ZodDefault<z.ZodString>;
|
|
317
|
+
sha256: z.ZodString;
|
|
318
|
+
url: z.ZodURL;
|
|
319
|
+
releasedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
320
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { MachineConfig } from "../types.js";
|
|
2
|
+
/** Durable: the registry, the chat ledger and its cursors, the outbox, per-session status, the log.
|
|
3
|
+
* `STITCHMUX_STATE_DIR` is the single knob an isolated instance flips to get its own. */
|
|
4
|
+
export declare const STATE_DIR: string;
|
|
5
|
+
/** Durable: the code itself. The bundle used to live in the cache root under the reasoning that
|
|
6
|
+
* losing it "costs exactly one `stitchmux update`". That reasoning was wrong in a way only an incident
|
|
7
|
+
* makes obvious: `stitchmux update` IS the deleted file, and the boot unit's ExecStart points at it too,
|
|
8
|
+
* so a wiped cache left a machine whose CLI could not run and whose daemon could not be restarted —
|
|
9
|
+
* alive only as an already-loaded process. A directory whose contract invites deletion must not hold
|
|
10
|
+
* the one artifact that deletion makes unrecoverable. */
|
|
11
|
+
export declare const DEFAULT_DATA_DIR: string;
|
|
12
|
+
export declare const DATA_DIR: string;
|
|
13
|
+
/** Disposable: a locally staged build and downloaded releases. Both are re-derivable WITHOUT the
|
|
14
|
+
* tool being intact — a stage command or a fresh download — so deleting them really does cost
|
|
15
|
+
* nothing but time. */
|
|
16
|
+
export declare const CACHE_DIR: string;
|
|
17
|
+
/** The bundle and the routed programs laid down beside it (`boot/routedPrograms.ts`). */
|
|
18
|
+
export declare const APP_DIR: string;
|
|
19
|
+
/** The bundle the boot daemon and the `stitchmux` command run; `stitchmux update` swaps it atomically. */
|
|
20
|
+
export declare const APP_BUNDLE: string;
|
|
21
|
+
/** Stitchkit's Darwin native backend, where its loader looks relative to the bundle (`app/../native`). */
|
|
22
|
+
export declare const NATIVE_BACKEND_DIR: string;
|
|
23
|
+
/** A local dev build; `stitchmux update` prefers it over a remote release ("test before publishing"). */
|
|
24
|
+
export declare const STAGED_BUNDLE: string;
|
|
25
|
+
/** A published release (bundle + manifest) the daemon pulls from the configured release URL. */
|
|
26
|
+
export declare const RELEASES_DIR: string;
|
|
27
|
+
export declare const RELEASE_BUNDLE: string;
|
|
28
|
+
export declare const RELEASE_MANIFEST: string;
|
|
29
|
+
/** Boot-loop guard counter (see util/bootGuard.ts) — daemon start attempts since the last good pass. */
|
|
30
|
+
export declare const BOOT_ATTEMPTS: string;
|
|
31
|
+
/** Per-session structured status (agent hooks + statusLine tee): lifecycle, metrics, chat holds and
|
|
32
|
+
* launch stamps — so `list`/TUI read authoritative state instead of scraping the pane. */
|
|
33
|
+
export declare const STATUS_DIR: string;
|
|
34
|
+
/**
|
|
35
|
+
* The state files a given MachineConfig points at.
|
|
36
|
+
*
|
|
37
|
+
* They take the directory from the config rather than from the module constant so a test — or an
|
|
38
|
+
* instance constructed in-process — gets its own set by building one config object, without
|
|
39
|
+
* touching process-wide environment. `stateDir` is always filled in by the loader.
|
|
40
|
+
*/
|
|
41
|
+
export declare const sessionsPath: (m: MachineConfig) => string;
|
|
42
|
+
export declare const pendingSessionsPath: (m: MachineConfig) => string;
|
|
43
|
+
export declare const sessionRegistryLockPath: (m: MachineConfig) => string;
|
|
44
|
+
export declare const lifecycleBlockPath: (m: MachineConfig, name: string) => string;
|
|
45
|
+
export declare const chatLedgerPath: (m: MachineConfig) => string;
|
|
46
|
+
export declare const chatCursorsPath: (m: MachineConfig) => string;
|
|
47
|
+
export declare const chatAckPath: (m: MachineConfig) => string;
|
|
48
|
+
export declare const outboxPath: (m: MachineConfig) => string;
|
|
49
|
+
/** Which way each peer was last reached — advisory, so a held route is logged on change only. */
|
|
50
|
+
export declare const routeStatePath: (m: MachineConfig) => string;
|
|
51
|
+
export declare const outboxAckPath: (m: MachineConfig) => string;
|
|
52
|
+
/** The session event feed — what HAPPENED, as opposed to what IS. Rotated like the log, because it
|
|
53
|
+
* is a stream with no natural end, and read by outside surfaces that must not have to know the
|
|
54
|
+
* file layout (that is what `stitchmux events` is for). */
|
|
55
|
+
export declare const eventsPath: (m: MachineConfig) => string;
|
|
56
|
+
/** Every `search` asked on this machine, who asked it and what came of it (`context/searchJournal.ts`). */
|
|
57
|
+
export declare const searchJournalPath: (m: Pick<MachineConfig, 'stateDir'>) => string;
|
|
58
|
+
/** Bounded read-only monitoring projection published by the existing observation loop. */
|
|
59
|
+
export declare const monitoringStatusPath: (m: Pick<MachineConfig, 'stateDir'>) => string;
|
|
60
|
+
/** The daemon's published inventory, relayed by `list --json`; see `events/inventory.ts`. */
|
|
61
|
+
export declare const inventoryPath: (m: Pick<MachineConfig, 'stateDir'>) => string;
|
|
62
|
+
/**
|
|
63
|
+
* When each session's pane was last seen doing work.
|
|
64
|
+
*
|
|
65
|
+
* A machine-wide map rather than a file per session: the supervisor rewrites the whole thing once
|
|
66
|
+
* per observation pass, and readers want "was THIS one alive recently" answered by one open.
|
|
67
|
+
*
|
|
68
|
+
* It is here, on disk, because the fact it records is the one thing a single glance cannot supply.
|
|
69
|
+
* A transcript's mtime is persisted, so any process can ask how long a session has been quiet; a
|
|
70
|
+
* spinner is instantaneous, so a process that looks once sees only this moment. `stitchmux wait` is a
|
|
71
|
+
* fresh process every time and its FIRST look is the dangerous one — no memory of its own can help
|
|
72
|
+
* there, which is what makes this a written fact rather than a variable.
|
|
73
|
+
*/
|
|
74
|
+
export declare const paneActivityPath: (m: MachineConfig) => string;
|
|
75
|
+
/**
|
|
76
|
+
* What this machine last learned about the newest published release.
|
|
77
|
+
*
|
|
78
|
+
* The supervisor asks on every tick and used to throw the answer away, so a fleet view could show
|
|
79
|
+
* which version each machine RUNS and nothing about whether that is the right one. Written here, the
|
|
80
|
+
* machine can answer both halves itself — including "nobody has been able to check", which is a
|
|
81
|
+
* different state from "up to date" and must never be drawn as one.
|
|
82
|
+
*/
|
|
83
|
+
export declare const releaseCheckPath: (m: MachineConfig) => string;
|
|
84
|
+
/** Superseded state, kept readable but out of the way. One directory, so "what here is dead?" is
|
|
85
|
+
* answered by the path instead of by remembering which name came first. */
|
|
86
|
+
export declare const archiveDir: (m: MachineConfig) => string;
|
|
87
|
+
export declare const chatAuthPath: (m: MachineConfig, sessionName: string) => string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** The machine's route to its peers: the Stitchwire agent on this machine. */
|
|
3
|
+
export declare const RemoteTransportSchema: z.ZodObject<{
|
|
4
|
+
kind: z.ZodLiteral<"stitchwire">;
|
|
5
|
+
peers: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
6
|
+
trustedAncestor: z.ZodOptional<z.ZodObject<{
|
|
7
|
+
executable: z.ZodString;
|
|
8
|
+
argument: z.ZodString;
|
|
9
|
+
}, z.core.$strict>>;
|
|
10
|
+
agentSocket: z.ZodOptional<z.ZodString>;
|
|
11
|
+
serviceDirectory: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strict>;
|