@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,158 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const NativeModelSelectionSchema: z.ZodObject<{
|
|
3
|
+
provider: z.ZodString;
|
|
4
|
+
model: z.ZodString;
|
|
5
|
+
}, z.core.$strict>;
|
|
6
|
+
/**
|
|
7
|
+
* How a refusal names the model it refused.
|
|
8
|
+
*
|
|
9
|
+
* A refusal that named only the field — "modelSelection.model is wrong or missing" — sent a
|
|
10
|
+
* consumer looking for a malformed request twice, because nothing in it said which value was
|
|
11
|
+
* rejected. The value is safe to say: it is the key the caller just sent and the catalog already
|
|
12
|
+
* publishes. What stays unsaid is everything behind it — recipe, endpoint, credential — which this
|
|
13
|
+
* echo never touches.
|
|
14
|
+
*/
|
|
15
|
+
export declare const modelSelectionLabel: (selection: {
|
|
16
|
+
provider: string;
|
|
17
|
+
model: string;
|
|
18
|
+
}) => string;
|
|
19
|
+
export declare const NativeTurnOptionsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
20
|
+
runtime: z.ZodLiteral<"custom">;
|
|
21
|
+
model: z.ZodObject<{
|
|
22
|
+
provider: z.ZodString;
|
|
23
|
+
model: z.ZodString;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
26
|
+
runtime: z.ZodLiteral<"claude">;
|
|
27
|
+
model: z.ZodObject<{
|
|
28
|
+
provider: z.ZodString;
|
|
29
|
+
model: z.ZodString;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
33
|
+
runtime: z.ZodLiteral<"codex">;
|
|
34
|
+
model: z.ZodObject<{
|
|
35
|
+
provider: z.ZodString;
|
|
36
|
+
model: z.ZodString;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
mode: z.ZodEnum<{
|
|
39
|
+
default: "default";
|
|
40
|
+
plan: "plan";
|
|
41
|
+
}>;
|
|
42
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
44
|
+
runtime: z.ZodLiteral<"opencode">;
|
|
45
|
+
model: z.ZodObject<{
|
|
46
|
+
provider: z.ZodString;
|
|
47
|
+
model: z.ZodString;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
50
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
52
|
+
runtime: z.ZodLiteral<"antigravity">;
|
|
53
|
+
model: z.ZodObject<{
|
|
54
|
+
provider: z.ZodString;
|
|
55
|
+
model: z.ZodString;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strict>], "runtime">;
|
|
59
|
+
export type NativeModelSelection = z.infer<typeof NativeModelSelectionSchema>;
|
|
60
|
+
export type NativeTurnOptions = z.infer<typeof NativeTurnOptionsSchema>;
|
|
61
|
+
export declare const AcceptedTurnOptionsSchema: z.ZodObject<{
|
|
62
|
+
revision: z.ZodNumber;
|
|
63
|
+
options: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
64
|
+
runtime: z.ZodLiteral<"custom">;
|
|
65
|
+
model: z.ZodObject<{
|
|
66
|
+
provider: z.ZodString;
|
|
67
|
+
model: z.ZodString;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
70
|
+
runtime: z.ZodLiteral<"claude">;
|
|
71
|
+
model: z.ZodObject<{
|
|
72
|
+
provider: z.ZodString;
|
|
73
|
+
model: z.ZodString;
|
|
74
|
+
}, z.core.$strict>;
|
|
75
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
77
|
+
runtime: z.ZodLiteral<"codex">;
|
|
78
|
+
model: z.ZodObject<{
|
|
79
|
+
provider: z.ZodString;
|
|
80
|
+
model: z.ZodString;
|
|
81
|
+
}, z.core.$strict>;
|
|
82
|
+
mode: z.ZodEnum<{
|
|
83
|
+
default: "default";
|
|
84
|
+
plan: "plan";
|
|
85
|
+
}>;
|
|
86
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
87
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
88
|
+
runtime: z.ZodLiteral<"opencode">;
|
|
89
|
+
model: z.ZodObject<{
|
|
90
|
+
provider: z.ZodString;
|
|
91
|
+
model: z.ZodString;
|
|
92
|
+
}, z.core.$strict>;
|
|
93
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
94
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
96
|
+
runtime: z.ZodLiteral<"antigravity">;
|
|
97
|
+
model: z.ZodObject<{
|
|
98
|
+
provider: z.ZodString;
|
|
99
|
+
model: z.ZodString;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, z.core.$strict>], "runtime">;
|
|
103
|
+
}, z.core.$strict>;
|
|
104
|
+
export type AcceptedTurnOptions = z.infer<typeof AcceptedTurnOptionsSchema>;
|
|
105
|
+
export declare const NativeSelectionEvidenceSchema: z.ZodObject<{
|
|
106
|
+
model: z.ZodObject<{
|
|
107
|
+
provider: z.ZodString;
|
|
108
|
+
model: z.ZodString;
|
|
109
|
+
}, z.core.$strict>;
|
|
110
|
+
options: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
111
|
+
runtime: z.ZodLiteral<"custom">;
|
|
112
|
+
model: z.ZodObject<{
|
|
113
|
+
provider: z.ZodString;
|
|
114
|
+
model: z.ZodString;
|
|
115
|
+
}, z.core.$strict>;
|
|
116
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
117
|
+
runtime: z.ZodLiteral<"claude">;
|
|
118
|
+
model: z.ZodObject<{
|
|
119
|
+
provider: z.ZodString;
|
|
120
|
+
model: z.ZodString;
|
|
121
|
+
}, z.core.$strict>;
|
|
122
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
123
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
124
|
+
runtime: z.ZodLiteral<"codex">;
|
|
125
|
+
model: z.ZodObject<{
|
|
126
|
+
provider: z.ZodString;
|
|
127
|
+
model: z.ZodString;
|
|
128
|
+
}, z.core.$strict>;
|
|
129
|
+
mode: z.ZodEnum<{
|
|
130
|
+
default: "default";
|
|
131
|
+
plan: "plan";
|
|
132
|
+
}>;
|
|
133
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
135
|
+
runtime: z.ZodLiteral<"opencode">;
|
|
136
|
+
model: z.ZodObject<{
|
|
137
|
+
provider: z.ZodString;
|
|
138
|
+
model: z.ZodString;
|
|
139
|
+
}, z.core.$strict>;
|
|
140
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
141
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
142
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
143
|
+
runtime: z.ZodLiteral<"antigravity">;
|
|
144
|
+
model: z.ZodObject<{
|
|
145
|
+
provider: z.ZodString;
|
|
146
|
+
model: z.ZodString;
|
|
147
|
+
}, z.core.$strict>;
|
|
148
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
149
|
+
}, z.core.$strict>], "runtime">>;
|
|
150
|
+
source: z.ZodEnum<{
|
|
151
|
+
admission: "admission";
|
|
152
|
+
assistant: "assistant";
|
|
153
|
+
reroute: "reroute";
|
|
154
|
+
settings: "settings";
|
|
155
|
+
}>;
|
|
156
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
157
|
+
}, z.core.$strict>;
|
|
158
|
+
export type NativeSelectionEvidence = z.infer<typeof NativeSelectionEvidenceSchema>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const FiniteWorkloadsSchema: z.ZodObject<{
|
|
3
|
+
launcherBin: z.ZodString;
|
|
4
|
+
profileFile: z.ZodString;
|
|
5
|
+
}, z.core.$strict>;
|
|
6
|
+
export type FiniteWorkloads = z.infer<typeof FiniteWorkloadsSchema>;
|
|
7
|
+
export declare const WorkloadOutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8
|
+
schema: z.ZodLiteral<"node-workload-result/v1">;
|
|
9
|
+
status: z.ZodLiteral<"completed">;
|
|
10
|
+
admissionId: z.ZodUUID;
|
|
11
|
+
exitCode: z.ZodNullable<z.ZodInt>;
|
|
12
|
+
signal: z.ZodNullable<z.ZodString>;
|
|
13
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
14
|
+
failures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
15
|
+
source: z.ZodEnum<{
|
|
16
|
+
monitor: "monitor";
|
|
17
|
+
payload: "payload";
|
|
18
|
+
}>;
|
|
19
|
+
message: z.ZodString;
|
|
20
|
+
detail: z.ZodString;
|
|
21
|
+
}, z.core.$strict>>>;
|
|
22
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
23
|
+
schema: z.ZodLiteral<"node-workload-result/v1">;
|
|
24
|
+
status: z.ZodLiteral<"refused">;
|
|
25
|
+
reason: z.ZodString;
|
|
26
|
+
detail: z.ZodString;
|
|
27
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
28
|
+
schema: z.ZodLiteral<"node-workload-result/v1">;
|
|
29
|
+
status: z.ZodLiteral<"failed">;
|
|
30
|
+
reason: z.ZodString;
|
|
31
|
+
detail: z.ZodString;
|
|
32
|
+
}, z.core.$strict>], "status">;
|
|
33
|
+
export type WorkloadOutcome = z.infer<typeof WorkloadOutcomeSchema>;
|
|
34
|
+
/** What `<launcher> --describe` prints: the protocol this adapter speaks. */
|
|
35
|
+
export declare const WorkloadProtocolSchema: z.ZodObject<{
|
|
36
|
+
schema: z.ZodLiteral<"node-workload-protocol/v1">;
|
|
37
|
+
command: z.ZodLiteral<"node-workload-run">;
|
|
38
|
+
platform: z.ZodLiteral<"linux">;
|
|
39
|
+
mode: z.ZodLiteral<"disposable">;
|
|
40
|
+
supervisor: z.ZodLiteral<"direct-parent-process-instance">;
|
|
41
|
+
}, z.core.$loose>;
|
|
42
|
+
/**
|
|
43
|
+
* The launcher's own exit code for an outcome, protocol v1: refused 125, failed 126, completed the
|
|
44
|
+
* payload's code — and a payload that ended by a signal has no code, which the launcher reports as 1.
|
|
45
|
+
* A different exit means the result file and the process disagree, so neither is trusted.
|
|
46
|
+
*/
|
|
47
|
+
export declare function launcherExitCode(outcome: WorkloadOutcome): number;
|
|
48
|
+
/**
|
|
49
|
+
* Cancellation is SIGTERM, which the launcher answers by taking the payload tree down. A launcher
|
|
50
|
+
* that does not finish within this grace is killed outright: a bounded cancel that leaves cleanup to
|
|
51
|
+
* the launcher's own supervisor beats a cancel that never returns.
|
|
52
|
+
*/
|
|
53
|
+
export declare const WORKLOAD_CANCEL_GRACE_MS = 5000;
|
|
54
|
+
/** Stale request directories older than any workload's deadline plus grace are swept at start. */
|
|
55
|
+
export declare const WORKLOAD_DIRECTORY_PREFIX = "stitchmux-finite-";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Session } from "../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* The process boundary of one session: which processes are its own, so a build or test an agent
|
|
5
|
+
* starts can be told apart from the other sessions' and named after the session that started it.
|
|
6
|
+
*
|
|
7
|
+
* On Linux every session runs in its own transient systemd scope, `stitchmux-session-<uuid>-<start>.scope`:
|
|
8
|
+
* a cgroup survives a daemonised grandchild, which a parent chain does not. On macOS there is no
|
|
9
|
+
* such unit; the boundary is the session's root processes, each with the instance that tells it from
|
|
10
|
+
* a reused PID.
|
|
11
|
+
*
|
|
12
|
+
* Temporary until Stitchkit's launch-in-boundary primitive
|
|
13
|
+
* (`max-listov/stitchkit-dev:2026-11-27-launch-work-in-its-own-boundary-and-declare-its-owner.md`).
|
|
14
|
+
*/
|
|
15
|
+
export declare const SessionBoundarySchema: z.ZodObject<{
|
|
16
|
+
unit: z.ZodNullable<z.ZodString>;
|
|
17
|
+
roots: z.ZodArray<z.ZodObject<{
|
|
18
|
+
pid: z.ZodNumber;
|
|
19
|
+
instance: z.ZodNullable<z.ZodObject<{
|
|
20
|
+
platform: z.ZodEnum<{
|
|
21
|
+
darwin: "darwin";
|
|
22
|
+
linux: "linux";
|
|
23
|
+
}>;
|
|
24
|
+
bootId: z.ZodString;
|
|
25
|
+
namespace: z.ZodString;
|
|
26
|
+
startId: z.ZodString;
|
|
27
|
+
}, z.core.$strict>>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
export type SessionBoundary = z.infer<typeof SessionBoundarySchema>;
|
|
31
|
+
export declare function systemdScopeArgs(platform?: NodeJS.Platform, uid?: number | undefined, which?: (bin: string) => string | null, exists?: (path: string) => boolean, works?: (args: string[]) => boolean): string[] | null;
|
|
32
|
+
/** Forget the probe; for tests that decide the platform themselves. */
|
|
33
|
+
export declare function resetSystemdScopeProbe(): void;
|
|
34
|
+
/**
|
|
35
|
+
* `cmd` started in the session's own scope where systemd offers one, otherwise unchanged. The unit
|
|
36
|
+
* name carries the session's uuid and the start time, so a restart never collides with a scope of
|
|
37
|
+
* the previous run that is still draining.
|
|
38
|
+
*/
|
|
39
|
+
export declare function launchInBoundary(s: Pick<Session, 'uuid'>, cmd: readonly string[], scope?: string[] | null, now?: number): string[];
|
|
40
|
+
/** The unit a Linux process's cgroup names (`….scope`/`….service`), or null. */
|
|
41
|
+
export declare function cgroupUnitOf(pid: number, read?: (path: string) => string): string | null;
|
|
42
|
+
/** Observe the boundary of a session whose root processes are `roots`. */
|
|
43
|
+
export declare function observeSessionBoundary(roots: readonly number[], platform?: NodeJS.Platform): Promise<SessionBoundary | null>;
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The project a directory's repository says it belongs to. Described in the schema itself: a
|
|
4
|
+
* consumer that reads by `--schema` learns there what form the value has and when it is absent.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DeclaredProjectSchema: z.ZodString;
|
|
7
|
+
/** One conversation a session has lived in. A session keeps its name while the provider moves it to
|
|
8
|
+
* a new id — after a `/clear`, a fork or a compaction — so the ids are a list, not a value. */
|
|
9
|
+
export declare const SessionLifeSchema: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
current: z.ZodBoolean;
|
|
12
|
+
firstAt: z.ZodNullable<z.ZodISODateTime>;
|
|
13
|
+
lastAt: z.ZodNullable<z.ZodISODateTime>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type SessionLife = z.infer<typeof SessionLifeSchema>;
|
|
16
|
+
export declare const SessionIdentitySchema: z.ZodObject<{
|
|
17
|
+
address: z.ZodString;
|
|
18
|
+
machine: z.ZodString;
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
provider: z.ZodEnum<{
|
|
21
|
+
antigravity: "antigravity";
|
|
22
|
+
claude: "claude";
|
|
23
|
+
codex: "codex";
|
|
24
|
+
custom: "custom";
|
|
25
|
+
opencode: "opencode";
|
|
26
|
+
}>;
|
|
27
|
+
title: z.ZodString;
|
|
28
|
+
dir: z.ZodString;
|
|
29
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
30
|
+
project: z.ZodOptional<z.ZodString>;
|
|
31
|
+
checkouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
32
|
+
dir: z.ZodString;
|
|
33
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
34
|
+
role: z.ZodString;
|
|
35
|
+
current: z.ZodBoolean;
|
|
36
|
+
}, z.core.$strip>>>;
|
|
37
|
+
archived: z.ZodBoolean;
|
|
38
|
+
running: z.ZodNullable<z.ZodBoolean>;
|
|
39
|
+
sleeping: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
conversation: z.ZodString;
|
|
42
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
current: z.ZodBoolean;
|
|
45
|
+
firstAt: z.ZodNullable<z.ZodISODateTime>;
|
|
46
|
+
lastAt: z.ZodNullable<z.ZodISODateTime>;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
49
|
+
lastActivityAt: z.ZodNullable<z.ZodISODateTime>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export type SessionIdentity = z.infer<typeof SessionIdentitySchema>;
|
|
52
|
+
/** A conversation no managed session reads or has read: where it is, and what it calls itself. */
|
|
53
|
+
export declare const StrayConversationSchema: z.ZodObject<{
|
|
54
|
+
provider: z.ZodEnum<{
|
|
55
|
+
claude: "claude";
|
|
56
|
+
codex: "codex";
|
|
57
|
+
}>;
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
machine: z.ZodString;
|
|
60
|
+
address: z.ZodString;
|
|
61
|
+
title: z.ZodNullable<z.ZodString>;
|
|
62
|
+
dir: z.ZodNullable<z.ZodString>;
|
|
63
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
64
|
+
project: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export type StrayConversation = z.infer<typeof StrayConversationSchema>;
|
|
67
|
+
export declare const WhoisMachineSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
68
|
+
machine: z.ZodString;
|
|
69
|
+
status: z.ZodLiteral<"asked">;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
machine: z.ZodString;
|
|
72
|
+
status: z.ZodLiteral<"unavailable">;
|
|
73
|
+
error: z.ZodString;
|
|
74
|
+
}, z.core.$strip>]>;
|
|
75
|
+
export type WhoisMachine = z.infer<typeof WhoisMachineSchema>;
|
|
76
|
+
/** How the question was matched to a session. */
|
|
77
|
+
export declare const WhoisBySchema: z.ZodEnum<{
|
|
78
|
+
address: "address";
|
|
79
|
+
conversation: "conversation";
|
|
80
|
+
title: "title";
|
|
81
|
+
}>;
|
|
82
|
+
export type WhoisBy = z.infer<typeof WhoisBySchema>;
|
|
83
|
+
export declare const WhoisCandidateSchema: z.ZodObject<{
|
|
84
|
+
by: z.ZodEnum<{
|
|
85
|
+
address: "address";
|
|
86
|
+
conversation: "conversation";
|
|
87
|
+
title: "title";
|
|
88
|
+
}>;
|
|
89
|
+
session: z.ZodObject<{
|
|
90
|
+
address: z.ZodString;
|
|
91
|
+
machine: z.ZodString;
|
|
92
|
+
name: z.ZodString;
|
|
93
|
+
provider: z.ZodEnum<{
|
|
94
|
+
antigravity: "antigravity";
|
|
95
|
+
claude: "claude";
|
|
96
|
+
codex: "codex";
|
|
97
|
+
custom: "custom";
|
|
98
|
+
opencode: "opencode";
|
|
99
|
+
}>;
|
|
100
|
+
title: z.ZodString;
|
|
101
|
+
dir: z.ZodString;
|
|
102
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
103
|
+
project: z.ZodOptional<z.ZodString>;
|
|
104
|
+
checkouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
105
|
+
dir: z.ZodString;
|
|
106
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
107
|
+
role: z.ZodString;
|
|
108
|
+
current: z.ZodBoolean;
|
|
109
|
+
}, z.core.$strip>>>;
|
|
110
|
+
archived: z.ZodBoolean;
|
|
111
|
+
running: z.ZodNullable<z.ZodBoolean>;
|
|
112
|
+
sleeping: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
conversation: z.ZodString;
|
|
115
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
116
|
+
id: z.ZodString;
|
|
117
|
+
current: z.ZodBoolean;
|
|
118
|
+
firstAt: z.ZodNullable<z.ZodISODateTime>;
|
|
119
|
+
lastAt: z.ZodNullable<z.ZodISODateTime>;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
122
|
+
lastActivityAt: z.ZodNullable<z.ZodISODateTime>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
export type WhoisCandidate = z.infer<typeof WhoisCandidateSchema>;
|
|
126
|
+
/**
|
|
127
|
+
* The answer to one question.
|
|
128
|
+
*
|
|
129
|
+
* `found` says which of the fields below carries it: `session` — exactly one managed session;
|
|
130
|
+
* `conversation` — a provider id that exists on a machine but belongs to no managed session;
|
|
131
|
+
* `ambiguous` — the question fits several sessions and none is chosen;
|
|
132
|
+
* `none` — nothing on the machines that were asked. A machine that was not asked is in `machines`,
|
|
133
|
+
* so `none` beside an unavailable machine is not "no such session". `candidates` is every session
|
|
134
|
+
* the question fits, however many: one beside `session`, several beside `ambiguous`.
|
|
135
|
+
*/
|
|
136
|
+
export declare const WhoisAnswerSchema: z.ZodObject<{
|
|
137
|
+
query: z.ZodString;
|
|
138
|
+
found: z.ZodEnum<{
|
|
139
|
+
ambiguous: "ambiguous";
|
|
140
|
+
conversation: "conversation";
|
|
141
|
+
none: "none";
|
|
142
|
+
session: "session";
|
|
143
|
+
}>;
|
|
144
|
+
by: z.ZodNullable<z.ZodEnum<{
|
|
145
|
+
address: "address";
|
|
146
|
+
conversation: "conversation";
|
|
147
|
+
title: "title";
|
|
148
|
+
}>>;
|
|
149
|
+
session: z.ZodNullable<z.ZodObject<{
|
|
150
|
+
address: z.ZodString;
|
|
151
|
+
machine: z.ZodString;
|
|
152
|
+
name: z.ZodString;
|
|
153
|
+
provider: z.ZodEnum<{
|
|
154
|
+
antigravity: "antigravity";
|
|
155
|
+
claude: "claude";
|
|
156
|
+
codex: "codex";
|
|
157
|
+
custom: "custom";
|
|
158
|
+
opencode: "opencode";
|
|
159
|
+
}>;
|
|
160
|
+
title: z.ZodString;
|
|
161
|
+
dir: z.ZodString;
|
|
162
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
163
|
+
project: z.ZodOptional<z.ZodString>;
|
|
164
|
+
checkouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
165
|
+
dir: z.ZodString;
|
|
166
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
167
|
+
role: z.ZodString;
|
|
168
|
+
current: z.ZodBoolean;
|
|
169
|
+
}, z.core.$strip>>>;
|
|
170
|
+
archived: z.ZodBoolean;
|
|
171
|
+
running: z.ZodNullable<z.ZodBoolean>;
|
|
172
|
+
sleeping: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
174
|
+
conversation: z.ZodString;
|
|
175
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
176
|
+
id: z.ZodString;
|
|
177
|
+
current: z.ZodBoolean;
|
|
178
|
+
firstAt: z.ZodNullable<z.ZodISODateTime>;
|
|
179
|
+
lastAt: z.ZodNullable<z.ZodISODateTime>;
|
|
180
|
+
}, z.core.$strip>>;
|
|
181
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
182
|
+
lastActivityAt: z.ZodNullable<z.ZodISODateTime>;
|
|
183
|
+
}, z.core.$strip>>;
|
|
184
|
+
conversation: z.ZodNullable<z.ZodObject<{
|
|
185
|
+
provider: z.ZodEnum<{
|
|
186
|
+
claude: "claude";
|
|
187
|
+
codex: "codex";
|
|
188
|
+
}>;
|
|
189
|
+
id: z.ZodString;
|
|
190
|
+
machine: z.ZodString;
|
|
191
|
+
address: z.ZodString;
|
|
192
|
+
title: z.ZodNullable<z.ZodString>;
|
|
193
|
+
dir: z.ZodNullable<z.ZodString>;
|
|
194
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
195
|
+
project: z.ZodOptional<z.ZodString>;
|
|
196
|
+
}, z.core.$strip>>;
|
|
197
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
198
|
+
by: z.ZodEnum<{
|
|
199
|
+
address: "address";
|
|
200
|
+
conversation: "conversation";
|
|
201
|
+
title: "title";
|
|
202
|
+
}>;
|
|
203
|
+
session: z.ZodObject<{
|
|
204
|
+
address: z.ZodString;
|
|
205
|
+
machine: z.ZodString;
|
|
206
|
+
name: z.ZodString;
|
|
207
|
+
provider: z.ZodEnum<{
|
|
208
|
+
antigravity: "antigravity";
|
|
209
|
+
claude: "claude";
|
|
210
|
+
codex: "codex";
|
|
211
|
+
custom: "custom";
|
|
212
|
+
opencode: "opencode";
|
|
213
|
+
}>;
|
|
214
|
+
title: z.ZodString;
|
|
215
|
+
dir: z.ZodString;
|
|
216
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
217
|
+
project: z.ZodOptional<z.ZodString>;
|
|
218
|
+
checkouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
219
|
+
dir: z.ZodString;
|
|
220
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
221
|
+
role: z.ZodString;
|
|
222
|
+
current: z.ZodBoolean;
|
|
223
|
+
}, z.core.$strip>>>;
|
|
224
|
+
archived: z.ZodBoolean;
|
|
225
|
+
running: z.ZodNullable<z.ZodBoolean>;
|
|
226
|
+
sleeping: z.ZodOptional<z.ZodBoolean>;
|
|
227
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
+
conversation: z.ZodString;
|
|
229
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
230
|
+
id: z.ZodString;
|
|
231
|
+
current: z.ZodBoolean;
|
|
232
|
+
firstAt: z.ZodNullable<z.ZodISODateTime>;
|
|
233
|
+
lastAt: z.ZodNullable<z.ZodISODateTime>;
|
|
234
|
+
}, z.core.$strip>>;
|
|
235
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
236
|
+
lastActivityAt: z.ZodNullable<z.ZodISODateTime>;
|
|
237
|
+
}, z.core.$strip>;
|
|
238
|
+
}, z.core.$strip>>;
|
|
239
|
+
machines: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
240
|
+
machine: z.ZodString;
|
|
241
|
+
status: z.ZodLiteral<"asked">;
|
|
242
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
243
|
+
machine: z.ZodString;
|
|
244
|
+
status: z.ZodLiteral<"unavailable">;
|
|
245
|
+
error: z.ZodString;
|
|
246
|
+
}, z.core.$strip>]>>;
|
|
247
|
+
}, z.core.$strip>;
|
|
248
|
+
export type WhoisAnswer = z.infer<typeof WhoisAnswerSchema>;
|
|
249
|
+
export declare const WhoisListSchema: z.ZodObject<{
|
|
250
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
251
|
+
address: z.ZodString;
|
|
252
|
+
machine: z.ZodString;
|
|
253
|
+
name: z.ZodString;
|
|
254
|
+
provider: z.ZodEnum<{
|
|
255
|
+
antigravity: "antigravity";
|
|
256
|
+
claude: "claude";
|
|
257
|
+
codex: "codex";
|
|
258
|
+
custom: "custom";
|
|
259
|
+
opencode: "opencode";
|
|
260
|
+
}>;
|
|
261
|
+
title: z.ZodString;
|
|
262
|
+
dir: z.ZodString;
|
|
263
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
264
|
+
project: z.ZodOptional<z.ZodString>;
|
|
265
|
+
checkouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
266
|
+
dir: z.ZodString;
|
|
267
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
268
|
+
role: z.ZodString;
|
|
269
|
+
current: z.ZodBoolean;
|
|
270
|
+
}, z.core.$strip>>>;
|
|
271
|
+
archived: z.ZodBoolean;
|
|
272
|
+
running: z.ZodNullable<z.ZodBoolean>;
|
|
273
|
+
sleeping: z.ZodOptional<z.ZodBoolean>;
|
|
274
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
+
conversation: z.ZodString;
|
|
276
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
277
|
+
id: z.ZodString;
|
|
278
|
+
current: z.ZodBoolean;
|
|
279
|
+
firstAt: z.ZodNullable<z.ZodISODateTime>;
|
|
280
|
+
lastAt: z.ZodNullable<z.ZodISODateTime>;
|
|
281
|
+
}, z.core.$strip>>;
|
|
282
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
283
|
+
lastActivityAt: z.ZodNullable<z.ZodISODateTime>;
|
|
284
|
+
}, z.core.$strip>>;
|
|
285
|
+
machines: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
286
|
+
machine: z.ZodString;
|
|
287
|
+
status: z.ZodLiteral<"asked">;
|
|
288
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
289
|
+
machine: z.ZodString;
|
|
290
|
+
status: z.ZodLiteral<"unavailable">;
|
|
291
|
+
error: z.ZodString;
|
|
292
|
+
}, z.core.$strip>]>>;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
export type WhoisList = z.infer<typeof WhoisListSchema>;
|
|
295
|
+
/**
|
|
296
|
+
* One line of `whois --follow`. `session` is a session as it now is — sent once for each when its
|
|
297
|
+
* machine first answers, and again whenever anything but its activity times changes; `gone` is a
|
|
298
|
+
* session that left its machine's registry; `machine` says a machine has been read, or that it was
|
|
299
|
+
* not and why — its sessions are then not known to be gone.
|
|
300
|
+
*/
|
|
301
|
+
export declare const WhoisEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
302
|
+
event: z.ZodLiteral<"session">;
|
|
303
|
+
session: z.ZodObject<{
|
|
304
|
+
address: z.ZodString;
|
|
305
|
+
machine: z.ZodString;
|
|
306
|
+
name: z.ZodString;
|
|
307
|
+
provider: z.ZodEnum<{
|
|
308
|
+
antigravity: "antigravity";
|
|
309
|
+
claude: "claude";
|
|
310
|
+
codex: "codex";
|
|
311
|
+
custom: "custom";
|
|
312
|
+
opencode: "opencode";
|
|
313
|
+
}>;
|
|
314
|
+
title: z.ZodString;
|
|
315
|
+
dir: z.ZodString;
|
|
316
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
317
|
+
project: z.ZodOptional<z.ZodString>;
|
|
318
|
+
checkouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
319
|
+
dir: z.ZodString;
|
|
320
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
321
|
+
role: z.ZodString;
|
|
322
|
+
current: z.ZodBoolean;
|
|
323
|
+
}, z.core.$strip>>>;
|
|
324
|
+
archived: z.ZodBoolean;
|
|
325
|
+
running: z.ZodNullable<z.ZodBoolean>;
|
|
326
|
+
sleeping: z.ZodOptional<z.ZodBoolean>;
|
|
327
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
328
|
+
conversation: z.ZodString;
|
|
329
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
330
|
+
id: z.ZodString;
|
|
331
|
+
current: z.ZodBoolean;
|
|
332
|
+
firstAt: z.ZodNullable<z.ZodISODateTime>;
|
|
333
|
+
lastAt: z.ZodNullable<z.ZodISODateTime>;
|
|
334
|
+
}, z.core.$strip>>;
|
|
335
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
336
|
+
lastActivityAt: z.ZodNullable<z.ZodISODateTime>;
|
|
337
|
+
}, z.core.$strip>;
|
|
338
|
+
}, z.core.$strip>, ...(z.ZodObject<{
|
|
339
|
+
machine: z.ZodString;
|
|
340
|
+
status: z.ZodLiteral<"unavailable">;
|
|
341
|
+
error: z.ZodString;
|
|
342
|
+
event: z.ZodLiteral<"machine">;
|
|
343
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
344
|
+
machine: z.ZodString;
|
|
345
|
+
status: z.ZodLiteral<"asked">;
|
|
346
|
+
event: z.ZodLiteral<"machine">;
|
|
347
|
+
}, z.core.$strip>)[], z.ZodObject<{
|
|
348
|
+
event: z.ZodLiteral<"gone">;
|
|
349
|
+
address: z.ZodString;
|
|
350
|
+
machine: z.ZodString;
|
|
351
|
+
name: z.ZodString;
|
|
352
|
+
}, z.core.$strip>]>;
|
|
353
|
+
export type WhoisEvent = z.infer<typeof WhoisEventSchema>;
|