@latchet/spec 0.1.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.
@@ -0,0 +1,441 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://latchet.dev/schema/task-ledger.schema.json",
4
+ "title": "Latchet Task Event",
5
+ "type": "object",
6
+ "required": [
7
+ "id",
8
+ "task_id",
9
+ "timestamp",
10
+ "actor",
11
+ "source",
12
+ "type",
13
+ "payload"
14
+ ],
15
+ "properties": {
16
+ "id": {
17
+ "type": "string",
18
+ "minLength": 1
19
+ },
20
+ "task_id": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ },
24
+ "timestamp": {
25
+ "type": "string",
26
+ "format": "date-time"
27
+ },
28
+ "actor": {
29
+ "type": "object",
30
+ "required": [
31
+ "kind"
32
+ ],
33
+ "properties": {
34
+ "kind": {
35
+ "type": "string",
36
+ "enum": [
37
+ "user",
38
+ "assistant",
39
+ "tool",
40
+ "system"
41
+ ]
42
+ },
43
+ "name": {
44
+ "type": "string"
45
+ },
46
+ "id": {
47
+ "type": "string"
48
+ },
49
+ "provider": {
50
+ "type": "string"
51
+ }
52
+ },
53
+ "additionalProperties": false
54
+ },
55
+ "source": {
56
+ "type": "object",
57
+ "required": [
58
+ "kind"
59
+ ],
60
+ "properties": {
61
+ "kind": {
62
+ "type": "string",
63
+ "enum": [
64
+ "manual",
65
+ "cli",
66
+ "mcp",
67
+ "session",
68
+ "conversation",
69
+ "file",
70
+ "command",
71
+ "telemetry",
72
+ "import"
73
+ ]
74
+ },
75
+ "provider": {
76
+ "type": "string"
77
+ },
78
+ "reference": {
79
+ "type": "string"
80
+ },
81
+ "uri": {
82
+ "type": "string"
83
+ }
84
+ },
85
+ "additionalProperties": false
86
+ },
87
+ "type": {
88
+ "type": "string",
89
+ "enum": [
90
+ "decision",
91
+ "attempt",
92
+ "failure",
93
+ "env_quirk",
94
+ "constraint",
95
+ "artifact_ref",
96
+ "open_question",
97
+ "next_action",
98
+ "status_change",
99
+ "note",
100
+ "evidence"
101
+ ]
102
+ },
103
+ "payload": {
104
+ "type": "object",
105
+ "additionalProperties": true
106
+ },
107
+ "supersedes": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "string"
111
+ }
112
+ },
113
+ "refs": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "object",
117
+ "required": [
118
+ "kind",
119
+ "value"
120
+ ],
121
+ "properties": {
122
+ "kind": {
123
+ "type": "string",
124
+ "enum": [
125
+ "event",
126
+ "file",
127
+ "command",
128
+ "conversation",
129
+ "url",
130
+ "commit",
131
+ "issue",
132
+ "pull_request"
133
+ ]
134
+ },
135
+ "value": {
136
+ "type": "string"
137
+ },
138
+ "label": {
139
+ "type": "string"
140
+ }
141
+ },
142
+ "additionalProperties": false
143
+ }
144
+ },
145
+ "verification": {
146
+ "type": "object",
147
+ "required": [
148
+ "status"
149
+ ],
150
+ "properties": {
151
+ "status": {
152
+ "type": "string",
153
+ "enum": [
154
+ "verified",
155
+ "user_asserted",
156
+ "model_inferred",
157
+ "speculative",
158
+ "rejected"
159
+ ]
160
+ },
161
+ "note": {
162
+ "type": "string"
163
+ }
164
+ },
165
+ "additionalProperties": false
166
+ },
167
+ "redaction": {
168
+ "type": "object",
169
+ "properties": {
170
+ "contains_sensitive": {
171
+ "type": "boolean"
172
+ },
173
+ "fields": {
174
+ "type": "array",
175
+ "items": {
176
+ "type": "string"
177
+ }
178
+ },
179
+ "note": {
180
+ "type": "string"
181
+ }
182
+ },
183
+ "additionalProperties": false
184
+ }
185
+ },
186
+ "additionalProperties": false,
187
+ "allOf": [
188
+ {
189
+ "if": {
190
+ "properties": {
191
+ "type": { "const": "decision" }
192
+ }
193
+ },
194
+ "then": {
195
+ "properties": {
196
+ "payload": {
197
+ "type": "object",
198
+ "required": ["summary"],
199
+ "properties": {
200
+ "summary": { "type": "string", "minLength": 1 },
201
+ "reason": { "type": "string" },
202
+ "status": {
203
+ "type": "string",
204
+ "enum": ["proposed", "accepted", "rejected", "superseded"]
205
+ }
206
+ },
207
+ "additionalProperties": false
208
+ }
209
+ }
210
+ }
211
+ },
212
+ {
213
+ "if": {
214
+ "properties": {
215
+ "type": { "const": "attempt" }
216
+ }
217
+ },
218
+ "then": {
219
+ "properties": {
220
+ "payload": {
221
+ "type": "object",
222
+ "required": ["summary"],
223
+ "properties": {
224
+ "summary": { "type": "string", "minLength": 1 },
225
+ "outcome": { "type": "string" },
226
+ "result": {
227
+ "type": "string",
228
+ "enum": ["success", "failure", "partial"]
229
+ }
230
+ },
231
+ "additionalProperties": false
232
+ }
233
+ }
234
+ }
235
+ },
236
+ {
237
+ "if": {
238
+ "properties": {
239
+ "type": { "const": "failure" }
240
+ }
241
+ },
242
+ "then": {
243
+ "properties": {
244
+ "payload": {
245
+ "type": "object",
246
+ "required": ["summary"],
247
+ "properties": {
248
+ "summary": { "type": "string", "minLength": 1 },
249
+ "error": { "type": "string" },
250
+ "suspected_cause": { "type": "string" },
251
+ "status": {
252
+ "type": "string",
253
+ "enum": ["open", "resolved"]
254
+ }
255
+ },
256
+ "additionalProperties": false
257
+ }
258
+ }
259
+ }
260
+ },
261
+ {
262
+ "if": {
263
+ "properties": {
264
+ "type": { "const": "env_quirk" }
265
+ }
266
+ },
267
+ "then": {
268
+ "properties": {
269
+ "payload": {
270
+ "type": "object",
271
+ "required": ["summary"],
272
+ "properties": {
273
+ "summary": { "type": "string", "minLength": 1 },
274
+ "impact": { "type": "string" },
275
+ "workaround": { "type": "string" }
276
+ },
277
+ "additionalProperties": false
278
+ }
279
+ }
280
+ }
281
+ },
282
+ {
283
+ "if": {
284
+ "properties": {
285
+ "type": { "const": "constraint" }
286
+ }
287
+ },
288
+ "then": {
289
+ "properties": {
290
+ "payload": {
291
+ "type": "object",
292
+ "required": ["summary"],
293
+ "properties": {
294
+ "summary": { "type": "string", "minLength": 1 }
295
+ },
296
+ "additionalProperties": false
297
+ }
298
+ }
299
+ }
300
+ },
301
+ {
302
+ "if": {
303
+ "properties": {
304
+ "type": { "const": "artifact_ref" }
305
+ }
306
+ },
307
+ "then": {
308
+ "properties": {
309
+ "payload": {
310
+ "type": "object",
311
+ "required": ["path"],
312
+ "properties": {
313
+ "path": { "type": "string", "minLength": 1 },
314
+ "revision": { "type": "string" },
315
+ "exists": { "type": "boolean" },
316
+ "note": { "type": "string" }
317
+ },
318
+ "additionalProperties": false
319
+ }
320
+ }
321
+ }
322
+ },
323
+ {
324
+ "if": {
325
+ "properties": {
326
+ "type": { "const": "open_question" }
327
+ }
328
+ },
329
+ "then": {
330
+ "properties": {
331
+ "payload": {
332
+ "type": "object",
333
+ "required": ["question"],
334
+ "properties": {
335
+ "question": { "type": "string", "minLength": 1 },
336
+ "owner": { "type": "string" }
337
+ },
338
+ "additionalProperties": false
339
+ }
340
+ }
341
+ }
342
+ },
343
+ {
344
+ "if": {
345
+ "properties": {
346
+ "type": { "const": "next_action" }
347
+ }
348
+ },
349
+ "then": {
350
+ "properties": {
351
+ "payload": {
352
+ "type": "object",
353
+ "required": ["summary"],
354
+ "properties": {
355
+ "summary": { "type": "string", "minLength": 1 },
356
+ "priority": {
357
+ "type": "string",
358
+ "enum": ["low", "medium", "high"]
359
+ },
360
+ "prerequisites": {
361
+ "type": "array",
362
+ "items": { "type": "string" }
363
+ }
364
+ },
365
+ "additionalProperties": false
366
+ }
367
+ }
368
+ }
369
+ },
370
+ {
371
+ "if": {
372
+ "properties": {
373
+ "type": { "const": "status_change" }
374
+ }
375
+ },
376
+ "then": {
377
+ "properties": {
378
+ "payload": {
379
+ "type": "object",
380
+ "required": ["to"],
381
+ "properties": {
382
+ "to": {
383
+ "type": "string",
384
+ "enum": ["todo", "in_progress", "blocked", "done"]
385
+ },
386
+ "from": {
387
+ "type": "string",
388
+ "enum": ["todo", "in_progress", "blocked", "done"]
389
+ },
390
+ "reason": { "type": "string" }
391
+ },
392
+ "additionalProperties": false
393
+ }
394
+ }
395
+ }
396
+ },
397
+ {
398
+ "if": {
399
+ "properties": {
400
+ "type": { "const": "note" }
401
+ }
402
+ },
403
+ "then": {
404
+ "properties": {
405
+ "payload": {
406
+ "type": "object",
407
+ "required": ["summary"],
408
+ "properties": {
409
+ "summary": { "type": "string", "minLength": 1 }
410
+ },
411
+ "additionalProperties": false
412
+ }
413
+ }
414
+ }
415
+ },
416
+ {
417
+ "if": {
418
+ "properties": {
419
+ "type": { "const": "evidence" }
420
+ }
421
+ },
422
+ "then": {
423
+ "properties": {
424
+ "payload": {
425
+ "type": "object",
426
+ "required": ["summary"],
427
+ "properties": {
428
+ "summary": { "type": "string", "minLength": 1 },
429
+ "kind": {
430
+ "type": "string",
431
+ "enum": ["log", "otel", "test", "command", "session"]
432
+ },
433
+ "details": { "type": "string" }
434
+ },
435
+ "additionalProperties": false
436
+ }
437
+ }
438
+ }
439
+ }
440
+ ]
441
+ }
@@ -0,0 +1,167 @@
1
+ export declare const TASK_LEDGER_VERSION = "0.1.0";
2
+ export declare const HANDOFF_FORMAT = "state-handoff/v1";
3
+ export type TaskStatus = "todo" | "in_progress" | "blocked" | "done";
4
+ export type EventType = "decision" | "attempt" | "failure" | "env_quirk" | "constraint" | "artifact_ref" | "open_question" | "next_action" | "status_change" | "note" | "evidence";
5
+ export type VerificationStatus = "verified" | "user_asserted" | "model_inferred" | "speculative" | "rejected";
6
+ export type FailureStatus = "open" | "resolved";
7
+ export type DecisionStatus = "proposed" | "accepted" | "rejected" | "superseded";
8
+ export type AttemptResult = "success" | "failure" | "partial";
9
+ export type Priority = "low" | "medium" | "high";
10
+ export interface GitSnapshot {
11
+ root?: string;
12
+ branch?: string;
13
+ commit?: string;
14
+ dirty?: boolean;
15
+ }
16
+ export interface TaskMetadata {
17
+ id: string;
18
+ title: string;
19
+ goal: string;
20
+ status: TaskStatus;
21
+ created_at: string;
22
+ updated_at: string;
23
+ workspace_root?: string;
24
+ git?: GitSnapshot;
25
+ }
26
+ export interface ProjectConfig {
27
+ version: string;
28
+ created_at: string;
29
+ project_name?: string;
30
+ current_task_id?: string;
31
+ }
32
+ export interface EventActor {
33
+ kind: "user" | "assistant" | "tool" | "system";
34
+ name?: string;
35
+ id?: string;
36
+ provider?: string;
37
+ }
38
+ export interface EventSource {
39
+ kind: "manual" | "cli" | "mcp" | "session" | "conversation" | "file" | "command" | "telemetry" | "import";
40
+ provider?: string;
41
+ reference?: string;
42
+ uri?: string;
43
+ }
44
+ export interface EventReference {
45
+ kind: "event" | "file" | "command" | "conversation" | "url" | "commit" | "issue" | "pull_request";
46
+ value: string;
47
+ label?: string;
48
+ }
49
+ export interface VerificationState {
50
+ status: VerificationStatus;
51
+ note?: string;
52
+ }
53
+ export interface RedactionConfig {
54
+ contains_sensitive?: boolean;
55
+ fields?: string[];
56
+ note?: string;
57
+ }
58
+ export interface DecisionPayload {
59
+ summary: string;
60
+ reason?: string;
61
+ status?: DecisionStatus;
62
+ }
63
+ export interface AttemptPayload {
64
+ summary: string;
65
+ outcome?: string;
66
+ result?: AttemptResult;
67
+ }
68
+ export interface FailurePayload {
69
+ summary: string;
70
+ error?: string;
71
+ suspected_cause?: string;
72
+ status?: FailureStatus;
73
+ }
74
+ export interface EnvQuirkPayload {
75
+ summary: string;
76
+ impact?: string;
77
+ workaround?: string;
78
+ }
79
+ export interface ConstraintPayload {
80
+ summary: string;
81
+ }
82
+ export interface ArtifactRefPayload {
83
+ path: string;
84
+ revision?: string;
85
+ exists?: boolean;
86
+ note?: string;
87
+ }
88
+ export interface OpenQuestionPayload {
89
+ question: string;
90
+ owner?: string;
91
+ }
92
+ export interface NextActionPayload {
93
+ summary: string;
94
+ priority?: Priority;
95
+ prerequisites?: string[];
96
+ }
97
+ export interface StatusChangePayload {
98
+ from?: TaskStatus;
99
+ to: TaskStatus;
100
+ reason?: string;
101
+ }
102
+ export interface NotePayload {
103
+ summary: string;
104
+ }
105
+ export interface EvidencePayload {
106
+ summary: string;
107
+ kind?: "log" | "otel" | "test" | "command" | "session";
108
+ details?: string;
109
+ }
110
+ export type EventPayload = DecisionPayload | AttemptPayload | FailurePayload | EnvQuirkPayload | ConstraintPayload | ArtifactRefPayload | OpenQuestionPayload | NextActionPayload | StatusChangePayload | NotePayload | EvidencePayload;
111
+ export interface LedgerEvent<TPayload extends EventPayload = EventPayload> {
112
+ id: string;
113
+ task_id: string;
114
+ timestamp: string;
115
+ actor: EventActor;
116
+ source: EventSource;
117
+ type: EventType;
118
+ payload: TPayload;
119
+ supersedes?: string[];
120
+ refs?: EventReference[];
121
+ verification?: VerificationState;
122
+ redaction?: RedactionConfig;
123
+ }
124
+ export interface FreshnessCheck {
125
+ kind: "git_branch" | "git_commit" | "git_dirty" | "artifact_exists" | "workspace_git" | "workspace_root";
126
+ ok: boolean;
127
+ message: string;
128
+ }
129
+ export interface FreshnessReport {
130
+ ok: boolean;
131
+ checks: FreshnessCheck[];
132
+ }
133
+ export interface TaskState {
134
+ version: string;
135
+ generated_at: string;
136
+ task: TaskMetadata;
137
+ counts: {
138
+ total_events: number;
139
+ active_decisions: number;
140
+ open_failures: number;
141
+ env_quirks: number;
142
+ open_questions: number;
143
+ };
144
+ active_constraints: LedgerEvent<ConstraintPayload>[];
145
+ active_decisions: LedgerEvent<DecisionPayload>[];
146
+ recent_attempts: LedgerEvent<AttemptPayload>[];
147
+ recent_failures: LedgerEvent<FailurePayload>[];
148
+ active_env_quirks: LedgerEvent<EnvQuirkPayload>[];
149
+ open_questions: LedgerEvent<OpenQuestionPayload>[];
150
+ next_action: LedgerEvent<NextActionPayload> | null;
151
+ blockers: string[];
152
+ artifact_refs: LedgerEvent<ArtifactRefPayload>[];
153
+ notes: LedgerEvent<NotePayload>[];
154
+ freshness?: FreshnessReport;
155
+ integrity?: {
156
+ event_log_hash: string;
157
+ };
158
+ }
159
+ export interface HandoffPack {
160
+ version: string;
161
+ format: string;
162
+ exported_at: string;
163
+ task: TaskMetadata;
164
+ state: TaskState;
165
+ events?: LedgerEvent[];
166
+ }
167
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1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CAAC;IACrD,gBAAgB,EAAE,WAAW,CAAC,eAAe,CAAC,EAAE,CAAC;IACjD,eAAe,EAAE,WAAW,CAAC,cAAc,CAAC,EAAE,CAAC;IAC/C,eAAe,EAAE,WAAW,CAAC,cAAc,CAAC,EAAE,CAAC;IAC/C,iBAAiB,EAAE,WAAW,CAAC,eAAe,CAAC,EAAE,CAAC;IAClD,cAAc,EAAE,WAAW,CAAC,mBAAmB,CAAC,EAAE,CAAC;IACnD,WAAW,EAAE,WAAW,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;IACnD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,EAAE,WAAW,CAAC,kBAAkB,CAAC,EAAE,CAAC;IACjD,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC;IAClC,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,SAAS,CAAC,EAAE;QACV,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;CACxB"}
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ export const TASK_LEDGER_VERSION = "0.1.0";
2
+ export const HANDOFF_FORMAT = "state-handoff/v1";
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAC3C,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@latchet/spec",
3
+ "version": "0.1.0",
4
+ "description": "Canonical schema and TypeScript types for Latchet task ledgers.",
5
+ "license": "MIT",
6
+ "engines": {
7
+ "node": ">=22.12.0"
8
+ },
9
+ "type": "module",
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "files": [
13
+ "dist",
14
+ "src/schema/task-ledger.schema.json"
15
+ ],
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "default": "./dist/index.js"
23
+ },
24
+ "./schema": "./dist/schema/task-ledger.schema.json"
25
+ }
26
+ }