@codetreker/daynight 0.31.0 → 0.37.2
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/README.md +237 -44
- package/config.example.yml +10 -3
- package/dist/api/client.d.ts +7 -1
- package/dist/api/client.js +117 -21
- package/dist/api/client.js.map +1 -1
- package/dist/api/json-source.d.ts +3 -0
- package/dist/api/json-source.js +113 -0
- package/dist/api/json-source.js.map +1 -0
- package/dist/api/parse.d.ts +2 -1
- package/dist/api/parse.js +16 -1
- package/dist/api/parse.js.map +1 -1
- package/dist/api/thread.d.ts +6 -0
- package/dist/api/thread.js +79 -0
- package/dist/api/thread.js.map +1 -0
- package/dist/api/types.d.ts +50 -0
- package/dist/cli/agent-cli-aliases.d.ts +21 -0
- package/dist/cli/agent-cli-aliases.js +57 -0
- package/dist/cli/agent-cli-aliases.js.map +1 -0
- package/dist/cli/application.js +17 -2
- package/dist/cli/application.js.map +1 -1
- package/dist/cli/cancellation.d.ts +1 -1
- package/dist/cli/cancellation.js.map +1 -1
- package/dist/cli/codex-agent-environment.d.ts +5 -0
- package/dist/cli/codex-agent-environment.js +28 -0
- package/dist/cli/codex-agent-environment.js.map +1 -0
- package/dist/cli/commands.js +1 -0
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/context.d.ts +9 -1
- package/dist/cli/context.js +3 -1
- package/dist/cli/context.js.map +1 -1
- package/dist/cli/schema.d.ts +5 -1
- package/dist/cli/schema.js +10 -10
- package/dist/cli/schema.js.map +1 -1
- package/dist/commands/controller/archive-upload.d.ts +9 -0
- package/dist/commands/controller/archive-upload.js +137 -0
- package/dist/commands/controller/archive-upload.js.map +1 -0
- package/dist/commands/controller/definition.d.ts +1 -0
- package/dist/commands/controller/definition.js +9 -1
- package/dist/commands/controller/definition.js.map +1 -1
- package/dist/commands/controller/independent-archive.d.ts +7 -0
- package/dist/commands/controller/independent-archive.js +71 -0
- package/dist/commands/controller/independent-archive.js.map +1 -0
- package/dist/commands/controller/independent.js +20 -10
- package/dist/commands/controller/independent.js.map +1 -1
- package/dist/commands/controller/index.js +14 -1
- package/dist/commands/controller/index.js.map +1 -1
- package/dist/commands/controller/journal-format.js +25 -1
- package/dist/commands/controller/journal-format.js.map +1 -1
- package/dist/commands/controller/launch-ticket.js +3 -2
- package/dist/commands/controller/launch-ticket.js.map +1 -1
- package/dist/commands/controller/lifecycle-store.js +19 -7
- package/dist/commands/controller/lifecycle-store.js.map +1 -1
- package/dist/commands/controller/local-content.d.ts +2 -2
- package/dist/commands/controller/local-content.js +22 -20
- package/dist/commands/controller/local-content.js.map +1 -1
- package/dist/commands/controller/paths.d.ts +2 -0
- package/dist/commands/controller/paths.js +34 -0
- package/dist/commands/controller/paths.js.map +1 -0
- package/dist/commands/controller/pending-content.d.ts +20 -0
- package/dist/commands/controller/pending-content.js +159 -0
- package/dist/commands/controller/pending-content.js.map +1 -0
- package/dist/commands/controller/providers/codex.js +5 -1
- package/dist/commands/controller/providers/codex.js.map +1 -1
- package/dist/commands/controller/providers/projection.js +12 -0
- package/dist/commands/controller/providers/projection.js.map +1 -1
- package/dist/commands/controller/providers/types.d.ts +4 -0
- package/dist/commands/controller/resume.js +3 -2
- package/dist/commands/controller/resume.js.map +1 -1
- package/dist/commands/controller/runtime.js +11 -1
- package/dist/commands/controller/runtime.js.map +1 -1
- package/dist/commands/controller/sqlite/journal/006-pending-content.sql +12 -0
- package/dist/commands/project/definition.js +1 -1
- package/dist/commands/project/definition.js.map +1 -1
- package/dist/commands/review/definition.js +3 -3
- package/dist/commands/review/definition.js.map +1 -1
- package/dist/commands/server/runtime.d.ts +10 -1
- package/dist/commands/server/runtime.js +24 -7
- package/dist/commands/server/runtime.js.map +1 -1
- package/dist/commands/skill/read.d.ts +2 -0
- package/dist/commands/skill/read.js +36 -0
- package/dist/commands/skill/read.js.map +1 -0
- package/dist/commands/skill/skills/using-daynight/SKILL.md +4 -2
- package/dist/commands/skill/skills/using-daynight/references/authorization.md +2 -1
- package/dist/commands/skill/skills/using-daynight/references/goal.md +33 -8
- package/dist/commands/skill/skills/using-daynight/references/handbook.md +4 -1
- package/dist/commands/skill/skills/using-daynight/references/run-task.md +1 -1
- package/dist/commands/skill/skills/using-daynight/references/task-content.md +8 -4
- package/dist/commands/skill/skills/using-daynight/references/task-management.md +56 -6
- package/dist/commands/skill/skills/using-daynight/references/write-safety.md +22 -3
- package/dist/commands/skill/usage.md +237 -0
- package/dist/commands/task/command.js +26 -3
- package/dist/commands/task/command.js.map +1 -1
- package/dist/commands/task/definition.js +41 -7
- package/dist/commands/task/definition.js.map +1 -1
- package/dist/commands/task/rendering.js +4 -0
- package/dist/commands/task/rendering.js.map +1 -1
- package/dist/commands/task/thread-diagnostics.d.ts +5 -0
- package/dist/commands/task/thread-diagnostics.js +32 -0
- package/dist/commands/task/thread-diagnostics.js.map +1 -0
- package/dist/commands/task/thread-rendering.d.ts +8 -0
- package/dist/commands/task/thread-rendering.js +80 -0
- package/dist/commands/task/thread-rendering.js.map +1 -0
- package/dist/commands/task/thread.d.ts +11 -0
- package/dist/commands/task/thread.js +74 -0
- package/dist/commands/task/thread.js.map +1 -0
- package/dist/commands/worker/backends/web-process.js +5 -8
- package/dist/commands/worker/backends/web-process.js.map +1 -1
- package/dist/commands/worker/backends/web-store.d.ts +1 -0
- package/dist/commands/worker/backends/web-store.js +1 -0
- package/dist/commands/worker/backends/web-store.js.map +1 -1
- package/dist/commands/worker/backends/web.d.ts +1 -0
- package/dist/commands/worker/backends/web.js +8 -0
- package/dist/commands/worker/backends/web.js.map +1 -1
- package/dist/commands/worker/coordinator.js +14 -0
- package/dist/commands/worker/coordinator.js.map +1 -1
- package/dist/commands/worker/definition.js +2 -2
- package/dist/commands/worker/definition.js.map +1 -1
- package/dist/commands/worker/herdr/agents.d.ts +3 -0
- package/dist/commands/worker/herdr/agents.js +14 -3
- package/dist/commands/worker/herdr/agents.js.map +1 -1
- package/dist/commands/worker/herdr/arguments.d.ts +4 -0
- package/dist/commands/worker/herdr/arguments.js +17 -0
- package/dist/commands/worker/herdr/arguments.js.map +1 -1
- package/dist/commands/worker/herdr/codex-config.d.ts +8 -0
- package/dist/commands/worker/herdr/codex-config.js +75 -0
- package/dist/commands/worker/herdr/codex-config.js.map +1 -0
- package/dist/commands/worker/herdr/preflight.js +1 -18
- package/dist/commands/worker/herdr/preflight.js.map +1 -1
- package/dist/commands/worker/herdr.d.ts +4 -0
- package/dist/commands/worker/herdr.js +3 -2
- package/dist/commands/worker/herdr.js.map +1 -1
- package/dist/commands/worker/remote.js +3 -4
- package/dist/commands/worker/remote.js.map +1 -1
- package/dist/commands/worker/remove-worktree-contents.d.ts +3 -0
- package/dist/commands/worker/remove-worktree-contents.js +106 -0
- package/dist/commands/worker/remove-worktree-contents.js.map +1 -0
- package/dist/commands/worker/runtime.js +60 -4
- package/dist/commands/worker/runtime.js.map +1 -1
- package/dist/commands/worker/worktrees.js +69 -23
- package/dist/commands/worker/worktrees.js.map +1 -1
- package/dist/config/agent-cli-aliases.d.ts +5 -0
- package/dist/config/agent-cli-aliases.js +37 -0
- package/dist/config/agent-cli-aliases.js.map +1 -0
- package/dist/config/paths.d.ts +1 -1
- package/dist/config/paths.js +6 -2
- package/dist/config/paths.js.map +1 -1
- package/dist/platform/diagnostics.d.ts +5 -0
- package/dist/platform/diagnostics.js +12 -0
- package/dist/platform/diagnostics.js.map +1 -1
- package/dist/platform/sqlite-format.d.ts +1 -1
- package/dist/platform/sqlite-format.js +1 -1
- package/dist/platform/sqlite-format.js.map +1 -1
- package/dist/session/archive.d.ts +25 -0
- package/dist/session/archive.js +100 -0
- package/dist/session/archive.js.map +1 -0
- package/dist/session/codex-subagent-activity.d.ts +4 -0
- package/dist/session/codex-subagent-activity.js +13 -0
- package/dist/session/codex-subagent-activity.js.map +1 -0
- package/dist/session/v2/archive.d.ts +6 -0
- package/dist/session/v2/archive.js +163 -0
- package/dist/session/v2/archive.js.map +1 -0
- package/dist/session/v2/protocol.d.ts +19 -0
- package/dist/session/v2/protocol.js +260 -0
- package/dist/session/v2/protocol.js.map +1 -0
- package/dist/session/v2/responsibility.d.ts +3 -0
- package/dist/session/v2/responsibility.js +12 -0
- package/dist/session/v2/responsibility.js.map +1 -0
- package/dist/session/v2/types.d.ts +293 -0
- package/dist/session/v2/types.js +2 -0
- package/dist/session/v2/types.js.map +1 -0
- package/dist/session/v2/values.d.ts +59 -0
- package/dist/session/v2/values.js +201 -0
- package/dist/session/v2/values.js.map +1 -0
- package/package.json +5 -3
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import type { SessionSnapshot } from "../protocol.js";
|
|
2
|
+
import type { SessionV2ErrorCode, SESSION_V2_PROTOCOL } from "./values.js";
|
|
3
|
+
export type TerminalBinding = {
|
|
4
|
+
instanceId: string;
|
|
5
|
+
sessionId: string;
|
|
6
|
+
workspaceId: string;
|
|
7
|
+
paneId: string | number;
|
|
8
|
+
terminalId: string;
|
|
9
|
+
nativeSessionId: string | null;
|
|
10
|
+
};
|
|
11
|
+
export type SessionV2Owner = {
|
|
12
|
+
projectId: string;
|
|
13
|
+
taskId: string;
|
|
14
|
+
workerId: string;
|
|
15
|
+
worktreeId: string;
|
|
16
|
+
ownerUserId: string;
|
|
17
|
+
serverOrigin: string;
|
|
18
|
+
provider: "codex" | "claude" | "copilot";
|
|
19
|
+
};
|
|
20
|
+
export type TerminalStyledRun = {
|
|
21
|
+
text: string;
|
|
22
|
+
foreground: string | null;
|
|
23
|
+
background: string | null;
|
|
24
|
+
bold: boolean;
|
|
25
|
+
italic: boolean;
|
|
26
|
+
underline: boolean;
|
|
27
|
+
inverse: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type TerminalFrame = {
|
|
30
|
+
frameSeq: string;
|
|
31
|
+
capturedAt: string;
|
|
32
|
+
elapsedMs: string;
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
full: true;
|
|
36
|
+
rows: TerminalStyledRun[][];
|
|
37
|
+
};
|
|
38
|
+
export type SessionV2ProcessProof = {
|
|
39
|
+
role: "shell" | "agent";
|
|
40
|
+
pid: number;
|
|
41
|
+
birthToken: string;
|
|
42
|
+
bootId: string;
|
|
43
|
+
};
|
|
44
|
+
export type SessionV2StopProof = {
|
|
45
|
+
recordId: string;
|
|
46
|
+
executionGeneration: string;
|
|
47
|
+
binding: TerminalBinding;
|
|
48
|
+
bootId: string;
|
|
49
|
+
stoppedAt: string;
|
|
50
|
+
method: "instances_exited" | "boot_changed";
|
|
51
|
+
terminalStopped: true;
|
|
52
|
+
processes: SessionV2ProcessProof[];
|
|
53
|
+
};
|
|
54
|
+
export type SessionV2Run = {
|
|
55
|
+
executionGeneration: string;
|
|
56
|
+
owner: SessionV2Owner;
|
|
57
|
+
binding: TerminalBinding;
|
|
58
|
+
startedAt: string;
|
|
59
|
+
stoppedAt: string | null;
|
|
60
|
+
stopProof: SessionV2StopProof | null;
|
|
61
|
+
segmentIds: string[];
|
|
62
|
+
};
|
|
63
|
+
export type SessionV2Lease = {
|
|
64
|
+
leaseId: string;
|
|
65
|
+
holderUserId: string;
|
|
66
|
+
browserClientId: string;
|
|
67
|
+
controlEpoch: string;
|
|
68
|
+
expiresAt: string;
|
|
69
|
+
};
|
|
70
|
+
export type SessionV2Action = "acquire_control" | "renew_control" | "release_control" | "resume_automation" | "paste" | "keys";
|
|
71
|
+
export type SessionV2Key = "Enter" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "Tab" | "Backspace" | "Delete" | "Home" | "End" | "PageUp" | "PageDown" | "Ctrl+C" | "Ctrl+D" | "Ctrl+U";
|
|
72
|
+
export type SessionV2Completeness = "complete" | "partial";
|
|
73
|
+
export type SessionV2UnavailableReason = "recording_not_enabled" | "ended_before_first_sample";
|
|
74
|
+
export type SessionV2UnavailableEvidence = {
|
|
75
|
+
recordingEnabled: boolean;
|
|
76
|
+
selectedFrameCount: string;
|
|
77
|
+
registeredFrameCount: string;
|
|
78
|
+
captureError: SessionV2ErrorCode | null;
|
|
79
|
+
};
|
|
80
|
+
export type SessionV2Receipt = {
|
|
81
|
+
finalizationId: string;
|
|
82
|
+
disposition: "ready" | "unavailable";
|
|
83
|
+
dispositionDigest: string;
|
|
84
|
+
reason: SessionV2UnavailableReason | null;
|
|
85
|
+
sha256: string | null;
|
|
86
|
+
byteLength: string | null;
|
|
87
|
+
completeness: SessionV2Completeness | null;
|
|
88
|
+
evidence: SessionV2UnavailableEvidence | null;
|
|
89
|
+
};
|
|
90
|
+
export type SessionV2Payloads = {
|
|
91
|
+
registration: {
|
|
92
|
+
registrationId: string;
|
|
93
|
+
mode: "register" | "reconnect";
|
|
94
|
+
owner: SessionV2Owner;
|
|
95
|
+
binding: TerminalBinding;
|
|
96
|
+
connectionEpoch: string | null;
|
|
97
|
+
capabilities: {
|
|
98
|
+
observe: boolean;
|
|
99
|
+
control: boolean;
|
|
100
|
+
archive: boolean;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
registration_ack: {
|
|
104
|
+
registrationId: string;
|
|
105
|
+
connectionEpoch: string;
|
|
106
|
+
};
|
|
107
|
+
snapshot: {
|
|
108
|
+
connectionEpoch: string;
|
|
109
|
+
segmentId: string;
|
|
110
|
+
segmentOrdinal: string;
|
|
111
|
+
binding: TerminalBinding;
|
|
112
|
+
frame: TerminalFrame;
|
|
113
|
+
recorded: boolean;
|
|
114
|
+
};
|
|
115
|
+
control_state: {
|
|
116
|
+
connectionEpoch: string;
|
|
117
|
+
controlEpoch: string;
|
|
118
|
+
state: "automation" | "manual" | "suspended" | "closing" | "closed";
|
|
119
|
+
lease: SessionV2Lease | null;
|
|
120
|
+
initialAssignment: "pending" | "dispatching" | "transport_completed" | "unknown" | "unconfirmed";
|
|
121
|
+
availableActions: SessionV2Action[];
|
|
122
|
+
unavailableReason: SessionV2ErrorCode | null;
|
|
123
|
+
};
|
|
124
|
+
control_request: {
|
|
125
|
+
operationId: string;
|
|
126
|
+
connectionEpoch: string;
|
|
127
|
+
controlEpoch: string;
|
|
128
|
+
action: "acquire_control" | "renew_control" | "release_control" | "resume_automation";
|
|
129
|
+
browserClientId: string;
|
|
130
|
+
leaseId: string | null;
|
|
131
|
+
draftHandled: boolean;
|
|
132
|
+
initialUnknownDisposition: "delivered_continue" | null;
|
|
133
|
+
};
|
|
134
|
+
control_dispatch: {
|
|
135
|
+
actorUserId: string;
|
|
136
|
+
requestDigest: string;
|
|
137
|
+
request: SessionV2Payloads["control_request"];
|
|
138
|
+
};
|
|
139
|
+
control_ack: {
|
|
140
|
+
requestDigest: string;
|
|
141
|
+
durable: true;
|
|
142
|
+
controlState: SessionV2Payloads["control_state"];
|
|
143
|
+
result: SessionV2Payloads["operation_result"];
|
|
144
|
+
};
|
|
145
|
+
recording_responsibility: {
|
|
146
|
+
responsibilityId: string;
|
|
147
|
+
recordingEnabled: boolean;
|
|
148
|
+
};
|
|
149
|
+
recording_evidence: {
|
|
150
|
+
responsibilityId: string;
|
|
151
|
+
evidenceId: string;
|
|
152
|
+
revision: string;
|
|
153
|
+
selectedFrameCount: string;
|
|
154
|
+
registeredFrameCount: string;
|
|
155
|
+
captureError: SessionV2ErrorCode | null;
|
|
156
|
+
closed: boolean;
|
|
157
|
+
journalSha256: string;
|
|
158
|
+
sourceSha256: string;
|
|
159
|
+
};
|
|
160
|
+
operation: {
|
|
161
|
+
operationId: string;
|
|
162
|
+
connectionEpoch: string;
|
|
163
|
+
segmentId: string;
|
|
164
|
+
binding: TerminalBinding;
|
|
165
|
+
controlEpoch: string;
|
|
166
|
+
leaseId: string;
|
|
167
|
+
leaseSeq: string;
|
|
168
|
+
} & ({
|
|
169
|
+
kind: "paste";
|
|
170
|
+
payload: {
|
|
171
|
+
text: string;
|
|
172
|
+
};
|
|
173
|
+
} | {
|
|
174
|
+
kind: "keys";
|
|
175
|
+
payload: {
|
|
176
|
+
key: SessionV2Key;
|
|
177
|
+
};
|
|
178
|
+
});
|
|
179
|
+
operation_result: {
|
|
180
|
+
operationId: string;
|
|
181
|
+
state: "queued" | "dispatching" | "transport_completed" | "rejected" | "unknown";
|
|
182
|
+
errorCode: SessionV2ErrorCode | null;
|
|
183
|
+
};
|
|
184
|
+
generation_ledger: {
|
|
185
|
+
runs: SessionV2Run[];
|
|
186
|
+
finalizationId: string | null;
|
|
187
|
+
};
|
|
188
|
+
finalization: {
|
|
189
|
+
finalizationId: string;
|
|
190
|
+
claimTerminal: true;
|
|
191
|
+
runs: SessionV2Run[];
|
|
192
|
+
};
|
|
193
|
+
archive_status: {
|
|
194
|
+
state: "pending" | "ready" | "failed" | "unavailable";
|
|
195
|
+
sha256: string | null;
|
|
196
|
+
byteLength: string | null;
|
|
197
|
+
completeness: SessionV2Completeness | null;
|
|
198
|
+
errorCode: SessionV2ErrorCode | null;
|
|
199
|
+
finalizationId: string | null;
|
|
200
|
+
};
|
|
201
|
+
receipt: SessionV2Receipt;
|
|
202
|
+
native_snapshot: SessionSnapshot;
|
|
203
|
+
};
|
|
204
|
+
export type SessionV2Envelope = {
|
|
205
|
+
protocol: typeof SESSION_V2_PROTOCOL;
|
|
206
|
+
schemaVersion: 2;
|
|
207
|
+
projectionVersion: 1;
|
|
208
|
+
sessionId: string;
|
|
209
|
+
claimId: string;
|
|
210
|
+
executionGeneration: string;
|
|
211
|
+
};
|
|
212
|
+
export type SessionV2Message = {
|
|
213
|
+
[K in keyof SessionV2Payloads]: SessionV2Envelope & {
|
|
214
|
+
type: K;
|
|
215
|
+
payload: SessionV2Payloads[K];
|
|
216
|
+
} & (K extends "native_snapshot" ? {
|
|
217
|
+
agentControlMode: "web";
|
|
218
|
+
contentKind: "native_timeline";
|
|
219
|
+
} : {
|
|
220
|
+
agentControlMode: "herdr";
|
|
221
|
+
contentKind: "terminal_recording";
|
|
222
|
+
});
|
|
223
|
+
}[keyof SessionV2Payloads];
|
|
224
|
+
export type SessionV2Segment = {
|
|
225
|
+
segmentId: string;
|
|
226
|
+
segmentOrdinal: string;
|
|
227
|
+
executionGeneration: string;
|
|
228
|
+
binding: TerminalBinding;
|
|
229
|
+
startedAt: string;
|
|
230
|
+
endedAt: string;
|
|
231
|
+
durationMs: string;
|
|
232
|
+
};
|
|
233
|
+
export type SessionV2FrameFile = {
|
|
234
|
+
fileId: string;
|
|
235
|
+
segmentId: string;
|
|
236
|
+
frameSeq: string;
|
|
237
|
+
sha256: string;
|
|
238
|
+
byteLength: string;
|
|
239
|
+
data: string;
|
|
240
|
+
};
|
|
241
|
+
export type SessionV2FrameIndex = {
|
|
242
|
+
segmentId: string;
|
|
243
|
+
frameSeq: string;
|
|
244
|
+
fileId: string;
|
|
245
|
+
firstElapsedMs: string;
|
|
246
|
+
lastElapsedMs: string;
|
|
247
|
+
};
|
|
248
|
+
export type SessionV2IntervalGap = {
|
|
249
|
+
segmentId: string;
|
|
250
|
+
reason: "restart" | "read_interrupted" | "recording_limit" | "checkpoint_lost";
|
|
251
|
+
startElapsedMs: string;
|
|
252
|
+
endElapsedMs: string | null;
|
|
253
|
+
};
|
|
254
|
+
export type SessionV2BoundaryEndpoint = {
|
|
255
|
+
executionGeneration: string;
|
|
256
|
+
segmentId: string | null;
|
|
257
|
+
};
|
|
258
|
+
export type SessionV2BoundaryGap = {
|
|
259
|
+
kind: "boundary";
|
|
260
|
+
reason: "restart";
|
|
261
|
+
from: SessionV2BoundaryEndpoint;
|
|
262
|
+
to: SessionV2BoundaryEndpoint;
|
|
263
|
+
};
|
|
264
|
+
export type SessionV2Gap = SessionV2IntervalGap | SessionV2BoundaryGap;
|
|
265
|
+
export type SessionV2UnavailableRun = {
|
|
266
|
+
executionGeneration: string;
|
|
267
|
+
reason: SessionV2UnavailableReason;
|
|
268
|
+
evidence: SessionV2UnavailableEvidence;
|
|
269
|
+
};
|
|
270
|
+
export type SessionV2Archive = {
|
|
271
|
+
schemaVersion: 2;
|
|
272
|
+
projectionVersion: 1;
|
|
273
|
+
contentKind: "terminal_recording";
|
|
274
|
+
agentControlMode: "herdr";
|
|
275
|
+
sessionId: string;
|
|
276
|
+
claimId: string;
|
|
277
|
+
executionGeneration: string;
|
|
278
|
+
owner: SessionV2Owner;
|
|
279
|
+
finalizationId: string;
|
|
280
|
+
startedAt: string;
|
|
281
|
+
endedAt: string;
|
|
282
|
+
completeness: SessionV2Completeness;
|
|
283
|
+
policy: {
|
|
284
|
+
sampleIntervalMs: 350;
|
|
285
|
+
checkpointIntervalMs: 5000;
|
|
286
|
+
};
|
|
287
|
+
runs: SessionV2Run[];
|
|
288
|
+
segments: SessionV2Segment[];
|
|
289
|
+
files: SessionV2FrameFile[];
|
|
290
|
+
index: SessionV2FrameIndex[];
|
|
291
|
+
gaps: SessionV2Gap[];
|
|
292
|
+
unavailableRuns: SessionV2UnavailableRun[];
|
|
293
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/session/v2/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export declare const SESSION_V2_PROTOCOL: "daynight.session.v2";
|
|
2
|
+
export declare const SESSION_PROTOCOL_HEADER: "Daynight-Session-Protocol";
|
|
3
|
+
export declare const SESSION_V2_LIMITS: {
|
|
4
|
+
readonly leaseTtlMs: 30000;
|
|
5
|
+
readonly leaseRenewMs: 10000;
|
|
6
|
+
readonly inputMaxBytes: number;
|
|
7
|
+
readonly inputTimeoutMs: 10000;
|
|
8
|
+
readonly archiveMaxBytes: number;
|
|
9
|
+
readonly recordingMaxBytes: number;
|
|
10
|
+
readonly metadataMaxBytes: number;
|
|
11
|
+
readonly maxRuns: 1000;
|
|
12
|
+
readonly maxRowBytes: number;
|
|
13
|
+
readonly maxTextRuns: 1000;
|
|
14
|
+
readonly frameMaxBytes: number;
|
|
15
|
+
readonly maxFrames: 100000;
|
|
16
|
+
readonly maxSegments: 1000;
|
|
17
|
+
readonly maxGaps: 1000;
|
|
18
|
+
readonly maxDimension: 1000;
|
|
19
|
+
readonly sampleIntervalMs: 350;
|
|
20
|
+
readonly checkpointIntervalMs: 5000;
|
|
21
|
+
readonly maxRetainedWorktrees: 20;
|
|
22
|
+
readonly pendingSourceMaxBytes: number;
|
|
23
|
+
readonly minimumFreeBytes: number;
|
|
24
|
+
readonly viewerPendingFrames: 1;
|
|
25
|
+
readonly viewerStallMs: 10000;
|
|
26
|
+
readonly uploadRetryMinMs: 5000;
|
|
27
|
+
readonly uploadRetryMaxMs: 300000;
|
|
28
|
+
};
|
|
29
|
+
export type SessionV2ErrorCode = "permission_denied" | "stale_fence" | "target_changed" | "lease_expired" | "input_busy" | "automation_suspended" | "unsupported_protocol" | "unsupported_content_kind" | "input_unknown" | "recording_limit" | "source_corrupt" | "stop_unknown" | "archive_pending" | "recording_not_enabled" | "ended_before_first_sample" | "upload_failed" | "invalid_payload";
|
|
30
|
+
export declare const ERROR_CODES: readonly SessionV2ErrorCode[];
|
|
31
|
+
export declare class SessionV2Error extends Error {
|
|
32
|
+
readonly code: SessionV2ErrorCode;
|
|
33
|
+
constructor(code?: SessionV2ErrorCode);
|
|
34
|
+
}
|
|
35
|
+
export declare const fail: (code?: SessionV2ErrorCode) => never;
|
|
36
|
+
export declare const utf8: import("util").TextEncoder;
|
|
37
|
+
export declare const exact: (value: unknown, keys: readonly string[]) => Record<string, unknown>;
|
|
38
|
+
export declare const text: (value: unknown, maxBytes?: number, allowEmpty?: boolean) => string;
|
|
39
|
+
export declare const nativeText: (value: unknown) => string;
|
|
40
|
+
export declare const uuid: (value: unknown) => string;
|
|
41
|
+
export declare const seq: (value: unknown, zero?: boolean) => string;
|
|
42
|
+
export declare const integer: (value: unknown, min: number, max: number) => number;
|
|
43
|
+
export declare const bool: (value: unknown) => boolean;
|
|
44
|
+
export declare const literal: <T extends string | number | boolean>(value: unknown, expected: T) => T;
|
|
45
|
+
export declare const choice: <T extends string>(value: unknown, choices: readonly T[]) => T;
|
|
46
|
+
export declare const nullable: <T>(value: unknown, parse: (value: unknown) => T) => T | null;
|
|
47
|
+
export declare const list: <T>(value: unknown, parse: (value: unknown) => T, max?: number, min?: number) => T[];
|
|
48
|
+
export declare const unique: <T>(values: T[], key: (value: T) => string) => T[];
|
|
49
|
+
export declare const hash: (value: unknown) => string;
|
|
50
|
+
export declare const timestamp: (value: unknown) => string;
|
|
51
|
+
export declare const errorCode: (value: unknown) => SessionV2ErrorCode;
|
|
52
|
+
export declare const byteLength: (value: unknown, max?: number) => string;
|
|
53
|
+
export declare const origin: (value: unknown) => string;
|
|
54
|
+
export declare const selectSessionProtocol: (selection: string | null | undefined) => "daynight.session.v1" | typeof SESSION_V2_PROTOCOL;
|
|
55
|
+
/** Reject duplicate decoded keys, invalid Unicode and non-JSON values before object parsing. */
|
|
56
|
+
export declare const decodeStrictSessionJson: (input: string | Uint8Array, maxBytes?: number) => unknown;
|
|
57
|
+
/** v2 object keys are ASCII; arrays retain their protocol ordering. */
|
|
58
|
+
export declare const canonicalSessionJson: (value: unknown) => string;
|
|
59
|
+
export declare const hashSessionBytes: (input: string | Uint8Array) => Promise<string>;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
// Browser-safe values shared by producers and readers. v1 retains its own parser.
|
|
2
|
+
export const SESSION_V2_PROTOCOL = "daynight.session.v2";
|
|
3
|
+
export const SESSION_PROTOCOL_HEADER = "Daynight-Session-Protocol";
|
|
4
|
+
export const SESSION_V2_LIMITS = {
|
|
5
|
+
leaseTtlMs: 30_000, leaseRenewMs: 10_000, inputMaxBytes: 16 * 1024, inputTimeoutMs: 10_000,
|
|
6
|
+
archiveMaxBytes: 64 * 1024 * 1024, recordingMaxBytes: 60 * 1024 * 1024, metadataMaxBytes: 4 * 1024 * 1024,
|
|
7
|
+
maxRuns: 1000, maxRowBytes: 16 * 1024, maxTextRuns: 1000,
|
|
8
|
+
frameMaxBytes: 256 * 1024, maxFrames: 100_000, maxSegments: 1000, maxGaps: 1000, maxDimension: 1000,
|
|
9
|
+
sampleIntervalMs: 350, checkpointIntervalMs: 5000, maxRetainedWorktrees: 20,
|
|
10
|
+
pendingSourceMaxBytes: 2 * 1024 * 1024 * 1024, minimumFreeBytes: 1024 * 1024 * 1024,
|
|
11
|
+
viewerPendingFrames: 1, viewerStallMs: 10_000, uploadRetryMinMs: 5000, uploadRetryMaxMs: 300_000,
|
|
12
|
+
};
|
|
13
|
+
export const ERROR_CODES = ["permission_denied", "stale_fence", "target_changed", "lease_expired", "input_busy", "automation_suspended", "unsupported_protocol", "unsupported_content_kind", "input_unknown", "recording_limit", "source_corrupt", "stop_unknown", "archive_pending", "recording_not_enabled", "ended_before_first_sample", "upload_failed", "invalid_payload"];
|
|
14
|
+
export class SessionV2Error extends Error {
|
|
15
|
+
code;
|
|
16
|
+
constructor(code = "invalid_payload") {
|
|
17
|
+
super(`Invalid Daynight Session v2 value: ${code}.`);
|
|
18
|
+
this.code = code;
|
|
19
|
+
this.name = "SessionV2Error";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export const fail = (code) => { throw new SessionV2Error(code); };
|
|
23
|
+
export const utf8 = new TextEncoder();
|
|
24
|
+
export const exact = (value, keys) => {
|
|
25
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
26
|
+
return fail();
|
|
27
|
+
const data = value;
|
|
28
|
+
if (Object.keys(data).length !== keys.length || keys.some(key => !Object.hasOwn(data, key)))
|
|
29
|
+
return fail();
|
|
30
|
+
return data;
|
|
31
|
+
};
|
|
32
|
+
export const text = (value, maxBytes = 256, allowEmpty = false) => {
|
|
33
|
+
if (typeof value !== "string" || !value.isWellFormed() || (!allowEmpty && !value.length) || utf8.encode(value).length > maxBytes)
|
|
34
|
+
return fail();
|
|
35
|
+
return value;
|
|
36
|
+
};
|
|
37
|
+
export const nativeText = (value) => { const result = text(value); return /\p{Cc}/u.test(result) || !result.trim() ? fail() : result; };
|
|
38
|
+
export const uuid = (value) => typeof value === "string" && /^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/.test(value) ? value : fail();
|
|
39
|
+
export const seq = (value, zero = false) => typeof value === "string" && /^(0|[1-9][0-9]{0,18})$/.test(value) && (zero || value !== "0") && BigInt(value) <= 9223372036854775807n ? value : fail();
|
|
40
|
+
export const integer = (value, min, max) => typeof value === "number" && Number.isSafeInteger(value) && value >= min && value <= max ? value : fail();
|
|
41
|
+
export const bool = (value) => typeof value === "boolean" ? value : fail();
|
|
42
|
+
export const literal = (value, expected) => value === expected ? expected : fail();
|
|
43
|
+
export const choice = (value, choices) => typeof value === "string" && choices.includes(value) ? value : fail();
|
|
44
|
+
export const nullable = (value, parse) => value === null ? null : parse(value);
|
|
45
|
+
export const list = (value, parse, max = 1000, min = 0) => Array.isArray(value) && value.length >= min && value.length <= max ? value.map(parse) : fail();
|
|
46
|
+
export const unique = (values, key) => new Set(values.map(key)).size === values.length ? values : fail();
|
|
47
|
+
export const hash = (value) => typeof value === "string" && /^[0-9a-f]{64}$/.test(value) ? value : fail();
|
|
48
|
+
export const timestamp = (value) => {
|
|
49
|
+
const result = text(value, 24);
|
|
50
|
+
if (!/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.\d{1,3})?Z$/.test(result))
|
|
51
|
+
return fail();
|
|
52
|
+
const date = new Date(result);
|
|
53
|
+
if (!Number.isFinite(date.getTime()) || date.toISOString().slice(0, 19) !== result.slice(0, 19))
|
|
54
|
+
return fail();
|
|
55
|
+
return result;
|
|
56
|
+
};
|
|
57
|
+
export const errorCode = (value) => choice(value, ERROR_CODES);
|
|
58
|
+
export const byteLength = (value, max = SESSION_V2_LIMITS.archiveMaxBytes) => { const result = seq(value); return BigInt(result) <= BigInt(max) ? result : fail(); };
|
|
59
|
+
export const origin = (value) => {
|
|
60
|
+
const result = text(value, 2048);
|
|
61
|
+
let url;
|
|
62
|
+
try {
|
|
63
|
+
url = new URL(result);
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
return fail();
|
|
67
|
+
}
|
|
68
|
+
return ["http:", "https:"].includes(url.protocol) && url.origin === result && (/^[a-z0-9._-]+$/.test(url.hostname) || /^\[[0-9a-f:]+\]$/.test(url.hostname)) ? result : fail();
|
|
69
|
+
};
|
|
70
|
+
export const selectSessionProtocol = (selection) => {
|
|
71
|
+
if (selection === null || selection === undefined)
|
|
72
|
+
return "daynight.session.v1";
|
|
73
|
+
if (selection === "daynight.session.v1" || selection === SESSION_V2_PROTOCOL)
|
|
74
|
+
return selection;
|
|
75
|
+
return fail("unsupported_protocol");
|
|
76
|
+
};
|
|
77
|
+
/** Reject duplicate decoded keys, invalid Unicode and non-JSON values before object parsing. */
|
|
78
|
+
export const decodeStrictSessionJson = (input, maxBytes = SESSION_V2_LIMITS.archiveMaxBytes) => {
|
|
79
|
+
let source;
|
|
80
|
+
if (typeof input === "string") {
|
|
81
|
+
if (!input.isWellFormed() || utf8.encode(input).length > maxBytes)
|
|
82
|
+
return fail();
|
|
83
|
+
source = input;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
if (input.length > maxBytes)
|
|
87
|
+
return fail();
|
|
88
|
+
try {
|
|
89
|
+
source = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(input);
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return fail();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
let at = 0;
|
|
96
|
+
const space = () => { while (/[\x20\t\r\n]/.test(source[at] ?? "") && at < source.length)
|
|
97
|
+
at++; };
|
|
98
|
+
const string = () => {
|
|
99
|
+
const begin = at++;
|
|
100
|
+
while (at < source.length) {
|
|
101
|
+
const c = source[at++];
|
|
102
|
+
if (c === '"') {
|
|
103
|
+
let parsed;
|
|
104
|
+
try {
|
|
105
|
+
parsed = JSON.parse(source.slice(begin, at));
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
return fail();
|
|
109
|
+
}
|
|
110
|
+
return text(parsed, maxBytes, true);
|
|
111
|
+
}
|
|
112
|
+
if (c === "\\")
|
|
113
|
+
at++;
|
|
114
|
+
}
|
|
115
|
+
return fail();
|
|
116
|
+
};
|
|
117
|
+
const value = (depth) => {
|
|
118
|
+
if (depth > 64)
|
|
119
|
+
return fail();
|
|
120
|
+
space();
|
|
121
|
+
const c = source[at];
|
|
122
|
+
if (c === '"')
|
|
123
|
+
return string();
|
|
124
|
+
if (c === "{") {
|
|
125
|
+
at++;
|
|
126
|
+
space();
|
|
127
|
+
const out = Object.create(null);
|
|
128
|
+
if (source[at] === "}") {
|
|
129
|
+
at++;
|
|
130
|
+
return out;
|
|
131
|
+
}
|
|
132
|
+
for (;;) {
|
|
133
|
+
space();
|
|
134
|
+
if (source[at] !== '"')
|
|
135
|
+
return fail();
|
|
136
|
+
const key = string();
|
|
137
|
+
if (Object.hasOwn(out, key))
|
|
138
|
+
return fail();
|
|
139
|
+
space();
|
|
140
|
+
if (source[at++] !== ":")
|
|
141
|
+
return fail();
|
|
142
|
+
out[key] = value(depth + 1);
|
|
143
|
+
space();
|
|
144
|
+
const end = source[at++];
|
|
145
|
+
if (end === "}")
|
|
146
|
+
return out;
|
|
147
|
+
if (end !== ",")
|
|
148
|
+
return fail();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (c === "[") {
|
|
152
|
+
at++;
|
|
153
|
+
space();
|
|
154
|
+
const out = [];
|
|
155
|
+
if (source[at] === "]") {
|
|
156
|
+
at++;
|
|
157
|
+
return out;
|
|
158
|
+
}
|
|
159
|
+
for (;;) {
|
|
160
|
+
out.push(value(depth + 1));
|
|
161
|
+
space();
|
|
162
|
+
const end = source[at++];
|
|
163
|
+
if (end === "]")
|
|
164
|
+
return out;
|
|
165
|
+
if (end !== ",")
|
|
166
|
+
return fail();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
const token = /^(?:true|false|null|-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?)/.exec(source.slice(at));
|
|
170
|
+
if (!token)
|
|
171
|
+
return fail();
|
|
172
|
+
at += token[0].length;
|
|
173
|
+
const parsed = JSON.parse(token[0]);
|
|
174
|
+
return typeof parsed === "number" && !Number.isFinite(parsed) ? fail() : parsed;
|
|
175
|
+
};
|
|
176
|
+
const result = value(0);
|
|
177
|
+
space();
|
|
178
|
+
if (at !== source.length)
|
|
179
|
+
return fail();
|
|
180
|
+
return result;
|
|
181
|
+
};
|
|
182
|
+
/** v2 object keys are ASCII; arrays retain their protocol ordering. */
|
|
183
|
+
export const canonicalSessionJson = (value) => {
|
|
184
|
+
if (value === null || typeof value === "boolean")
|
|
185
|
+
return JSON.stringify(value);
|
|
186
|
+
if (typeof value === "string")
|
|
187
|
+
return JSON.stringify(text(value, SESSION_V2_LIMITS.archiveMaxBytes, true));
|
|
188
|
+
if (typeof value === "number")
|
|
189
|
+
return String(integer(value, Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER));
|
|
190
|
+
if (Array.isArray(value))
|
|
191
|
+
return `[${value.map(canonicalSessionJson).join(",")}]`;
|
|
192
|
+
if (!value || typeof value !== "object")
|
|
193
|
+
return fail();
|
|
194
|
+
const record = value;
|
|
195
|
+
return `{${Object.keys(record).sort().map(key => `${JSON.stringify(key)}:${canonicalSessionJson(record[key])}`).join(",")}}`;
|
|
196
|
+
};
|
|
197
|
+
export const hashSessionBytes = async (input) => {
|
|
198
|
+
const bytes = typeof input === "string" ? utf8.encode(input) : Uint8Array.from(input);
|
|
199
|
+
return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256", bytes)), b => b.toString(16).padStart(2, "0")).join("");
|
|
200
|
+
};
|
|
201
|
+
//# sourceMappingURL=values.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"values.js","sourceRoot":"","sources":["../../../src/session/v2/values.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAA8B,CAAC;AAClE,MAAM,CAAC,MAAM,uBAAuB,GAAG,2BAAoC,CAAC;AAC5E,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa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+1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codetreker/daynight",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.2",
|
|
4
4
|
"description": "A client command toolkit for development workflows",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
"test": "pnpm run build && vitest run",
|
|
26
26
|
"test:apfs": "DAYNIGHT_TEST_APFS=1 vitest run test/commands/review/apfs.test.ts",
|
|
27
27
|
"acceptance": "pnpm run build && vitest run --config vitest.acceptance.config.ts",
|
|
28
|
-
"completion:acceptance": "pnpm run build && python3 -u test/acceptance/shell-completion.py"
|
|
28
|
+
"completion:acceptance": "pnpm run build && python3 -u test/acceptance/shell-completion.py",
|
|
29
|
+
"test:stress": "pnpm run build && vitest run --config vitest.stress.config.ts",
|
|
30
|
+
"test:stress:budgets": "bash ../daynight-server/scripts/check.sh --stress-budgets"
|
|
29
31
|
},
|
|
30
32
|
"dependencies": {
|
|
31
33
|
"@anthropic-ai/claude-agent-sdk": "0.3.247",
|
|
@@ -54,5 +56,5 @@
|
|
|
54
56
|
"vite": "8.3.4",
|
|
55
57
|
"vitest": "5.0.5"
|
|
56
58
|
},
|
|
57
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "f8c2acbd8d728dd8450fd36a2031a53d5b39105c"
|
|
58
60
|
}
|