@youdie006/prodex 0.16.2 → 0.16.4

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.
Files changed (66) hide show
  1. package/dist/banner.js +0 -1
  2. package/dist/bundle.js +0 -1
  3. package/dist/chatgpt-browser.js +34 -6
  4. package/dist/cli-args.js +0 -1
  5. package/dist/cli-help.js +2 -2
  6. package/dist/cli-ledger.js +0 -1
  7. package/dist/cli-pro.js +24 -13
  8. package/dist/cli-server.js +0 -1
  9. package/dist/cli-shared.js +0 -1
  10. package/dist/cli.js +7 -5
  11. package/dist/config.js +0 -1
  12. package/dist/http-mcp.js +6 -2
  13. package/dist/index.js +0 -1
  14. package/dist/mcp-tools.js +0 -1
  15. package/dist/mcp.js +15 -2
  16. package/dist/registry.js +0 -1
  17. package/dist/repo-write.js +0 -1
  18. package/dist/repo.js +0 -1
  19. package/dist/safe-file.js +0 -1
  20. package/dist/schema.js +0 -1
  21. package/dist/store.js +0 -1
  22. package/package.json +1 -1
  23. package/scripts/release-check.mjs +23 -2
  24. package/scripts/release-pack.mjs +5 -2
  25. package/dist/banner.d.ts +0 -5
  26. package/dist/banner.js.map +0 -1
  27. package/dist/bundle.d.ts +0 -15
  28. package/dist/bundle.js.map +0 -1
  29. package/dist/chatgpt-browser.d.ts +0 -252
  30. package/dist/chatgpt-browser.js.map +0 -1
  31. package/dist/cli-args.d.ts +0 -54
  32. package/dist/cli-args.js.map +0 -1
  33. package/dist/cli-help.d.ts +0 -20
  34. package/dist/cli-help.js.map +0 -1
  35. package/dist/cli-ledger.d.ts +0 -22
  36. package/dist/cli-ledger.js.map +0 -1
  37. package/dist/cli-pro.d.ts +0 -157
  38. package/dist/cli-pro.js.map +0 -1
  39. package/dist/cli-server.d.ts +0 -42
  40. package/dist/cli-server.js.map +0 -1
  41. package/dist/cli-shared.d.ts +0 -68
  42. package/dist/cli-shared.js.map +0 -1
  43. package/dist/cli.d.ts +0 -14
  44. package/dist/cli.js.map +0 -1
  45. package/dist/config.d.ts +0 -110
  46. package/dist/config.js.map +0 -1
  47. package/dist/http-mcp.d.ts +0 -20
  48. package/dist/http-mcp.js.map +0 -1
  49. package/dist/index.d.ts +0 -8
  50. package/dist/index.js.map +0 -1
  51. package/dist/mcp-tools.d.ts +0 -395
  52. package/dist/mcp-tools.js.map +0 -1
  53. package/dist/mcp.d.ts +0 -57
  54. package/dist/mcp.js.map +0 -1
  55. package/dist/registry.d.ts +0 -8
  56. package/dist/registry.js.map +0 -1
  57. package/dist/repo-write.d.ts +0 -47
  58. package/dist/repo-write.js.map +0 -1
  59. package/dist/repo.d.ts +0 -28
  60. package/dist/repo.js.map +0 -1
  61. package/dist/safe-file.d.ts +0 -25
  62. package/dist/safe-file.js.map +0 -1
  63. package/dist/schema.d.ts +0 -402
  64. package/dist/schema.js.map +0 -1
  65. package/dist/store.d.ts +0 -165
  66. package/dist/store.js.map +0 -1
package/dist/schema.d.ts DELETED
@@ -1,402 +0,0 @@
1
- import { z } from "zod";
2
- export declare const SCHEMA_VERSION = 1;
3
- export declare const AdapterSchema: z.ZodEnum<["cli", "mcp", "manual", "oracle", "chatgpt-control"]>;
4
- export declare const TaskStatusSchema: z.ZodEnum<["new", "claimed", "done", "blocked"]>;
5
- export declare const ResultStatusSchema: z.ZodEnum<["done", "blocked"]>;
6
- export declare const SourceSchema: z.ZodEnum<["chatgpt_project", "codex", "claude", "manual"]>;
7
- export declare const ReceiptKindSchema: z.ZodEnum<["task_created", "task_claimed", "task_completed", "consult_preview", "consult_answer_saved", "repo_write_dry_run", "repo_write_applied", "repo_stage_reviewed_paths"]>;
8
- export declare const ReceiptIntegritySchema: z.ZodObject<{
9
- algorithm: z.ZodLiteral<"hmac-sha256">;
10
- digest: z.ZodString;
11
- }, "strip", z.ZodTypeAny, {
12
- algorithm: "hmac-sha256";
13
- digest: string;
14
- }, {
15
- algorithm: "hmac-sha256";
16
- digest: string;
17
- }>;
18
- export declare const ProvenanceSchema: z.ZodObject<{
19
- adapter: z.ZodEnum<["cli", "mcp", "manual", "oracle", "chatgpt-control"]>;
20
- session_id: z.ZodOptional<z.ZodString>;
21
- thread: z.ZodOptional<z.ZodString>;
22
- project: z.ZodOptional<z.ZodString>;
23
- warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
24
- }, "strip", z.ZodTypeAny, {
25
- adapter: "cli" | "mcp" | "manual" | "oracle" | "chatgpt-control";
26
- warnings: string[];
27
- session_id?: string | undefined;
28
- thread?: string | undefined;
29
- project?: string | undefined;
30
- }, {
31
- adapter: "cli" | "mcp" | "manual" | "oracle" | "chatgpt-control";
32
- session_id?: string | undefined;
33
- thread?: string | undefined;
34
- project?: string | undefined;
35
- warnings?: string[] | undefined;
36
- }>;
37
- export declare const BridgeFileSchema: z.ZodObject<{
38
- path: z.ZodString;
39
- role: z.ZodDefault<z.ZodEnum<["context", "artifact", "result"]>>;
40
- bytes: z.ZodOptional<z.ZodNumber>;
41
- sha256: z.ZodOptional<z.ZodString>;
42
- }, "strip", z.ZodTypeAny, {
43
- path: string;
44
- role: "context" | "artifact" | "result";
45
- bytes?: number | undefined;
46
- sha256?: string | undefined;
47
- }, {
48
- path: string;
49
- role?: "context" | "artifact" | "result" | undefined;
50
- bytes?: number | undefined;
51
- sha256?: string | undefined;
52
- }>;
53
- export declare const BlockerSchema: z.ZodObject<{
54
- code: z.ZodString;
55
- message: z.ZodString;
56
- retryable: z.ZodDefault<z.ZodBoolean>;
57
- next_step: z.ZodOptional<z.ZodString>;
58
- }, "strip", z.ZodTypeAny, {
59
- code: string;
60
- message: string;
61
- retryable: boolean;
62
- next_step?: string | undefined;
63
- }, {
64
- code: string;
65
- message: string;
66
- retryable?: boolean | undefined;
67
- next_step?: string | undefined;
68
- }>;
69
- export declare const TaskSchema: z.ZodObject<{
70
- schema_version: z.ZodLiteral<1>;
71
- id: z.ZodString;
72
- source: z.ZodEnum<["chatgpt_project", "codex", "claude", "manual"]>;
73
- status: z.ZodEnum<["new", "claimed", "done", "blocked"]>;
74
- title: z.ZodString;
75
- prompt: z.ZodString;
76
- repo_id: z.ZodDefault<z.ZodString>;
77
- files: z.ZodDefault<z.ZodArray<z.ZodObject<{
78
- path: z.ZodString;
79
- role: z.ZodDefault<z.ZodEnum<["context", "artifact", "result"]>>;
80
- bytes: z.ZodOptional<z.ZodNumber>;
81
- sha256: z.ZodOptional<z.ZodString>;
82
- }, "strip", z.ZodTypeAny, {
83
- path: string;
84
- role: "context" | "artifact" | "result";
85
- bytes?: number | undefined;
86
- sha256?: string | undefined;
87
- }, {
88
- path: string;
89
- role?: "context" | "artifact" | "result" | undefined;
90
- bytes?: number | undefined;
91
- sha256?: string | undefined;
92
- }>, "many">>;
93
- provenance: z.ZodObject<{
94
- adapter: z.ZodEnum<["cli", "mcp", "manual", "oracle", "chatgpt-control"]>;
95
- session_id: z.ZodOptional<z.ZodString>;
96
- thread: z.ZodOptional<z.ZodString>;
97
- project: z.ZodOptional<z.ZodString>;
98
- warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
99
- }, "strip", z.ZodTypeAny, {
100
- adapter: "cli" | "mcp" | "manual" | "oracle" | "chatgpt-control";
101
- warnings: string[];
102
- session_id?: string | undefined;
103
- thread?: string | undefined;
104
- project?: string | undefined;
105
- }, {
106
- adapter: "cli" | "mcp" | "manual" | "oracle" | "chatgpt-control";
107
- session_id?: string | undefined;
108
- thread?: string | undefined;
109
- project?: string | undefined;
110
- warnings?: string[] | undefined;
111
- }>;
112
- claimed_by: z.ZodOptional<z.ZodString>;
113
- claimed_at: z.ZodOptional<z.ZodString>;
114
- blocker: z.ZodOptional<z.ZodObject<{
115
- code: z.ZodString;
116
- message: z.ZodString;
117
- retryable: z.ZodDefault<z.ZodBoolean>;
118
- next_step: z.ZodOptional<z.ZodString>;
119
- }, "strip", z.ZodTypeAny, {
120
- code: string;
121
- message: string;
122
- retryable: boolean;
123
- next_step?: string | undefined;
124
- }, {
125
- code: string;
126
- message: string;
127
- retryable?: boolean | undefined;
128
- next_step?: string | undefined;
129
- }>>;
130
- result_path: z.ZodOptional<z.ZodString>;
131
- manifest_path: z.ZodOptional<z.ZodString>;
132
- created_at: z.ZodString;
133
- updated_at: z.ZodString;
134
- }, "strip", z.ZodTypeAny, {
135
- status: "new" | "claimed" | "done" | "blocked";
136
- schema_version: 1;
137
- id: string;
138
- source: "manual" | "chatgpt_project" | "codex" | "claude";
139
- title: string;
140
- prompt: string;
141
- repo_id: string;
142
- files: {
143
- path: string;
144
- role: "context" | "artifact" | "result";
145
- bytes?: number | undefined;
146
- sha256?: string | undefined;
147
- }[];
148
- provenance: {
149
- adapter: "cli" | "mcp" | "manual" | "oracle" | "chatgpt-control";
150
- warnings: string[];
151
- session_id?: string | undefined;
152
- thread?: string | undefined;
153
- project?: string | undefined;
154
- };
155
- created_at: string;
156
- updated_at: string;
157
- claimed_by?: string | undefined;
158
- claimed_at?: string | undefined;
159
- blocker?: {
160
- code: string;
161
- message: string;
162
- retryable: boolean;
163
- next_step?: string | undefined;
164
- } | undefined;
165
- result_path?: string | undefined;
166
- manifest_path?: string | undefined;
167
- }, {
168
- status: "new" | "claimed" | "done" | "blocked";
169
- schema_version: 1;
170
- id: string;
171
- source: "manual" | "chatgpt_project" | "codex" | "claude";
172
- title: string;
173
- prompt: string;
174
- provenance: {
175
- adapter: "cli" | "mcp" | "manual" | "oracle" | "chatgpt-control";
176
- session_id?: string | undefined;
177
- thread?: string | undefined;
178
- project?: string | undefined;
179
- warnings?: string[] | undefined;
180
- };
181
- created_at: string;
182
- updated_at: string;
183
- repo_id?: string | undefined;
184
- files?: {
185
- path: string;
186
- role?: "context" | "artifact" | "result" | undefined;
187
- bytes?: number | undefined;
188
- sha256?: string | undefined;
189
- }[] | undefined;
190
- claimed_by?: string | undefined;
191
- claimed_at?: string | undefined;
192
- blocker?: {
193
- code: string;
194
- message: string;
195
- retryable?: boolean | undefined;
196
- next_step?: string | undefined;
197
- } | undefined;
198
- result_path?: string | undefined;
199
- manifest_path?: string | undefined;
200
- }>;
201
- export declare const ResultSchema: z.ZodObject<{
202
- schema_version: z.ZodLiteral<1>;
203
- task_id: z.ZodString;
204
- status: z.ZodEnum<["done", "blocked"]>;
205
- summary: z.ZodString;
206
- artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
207
- path: z.ZodString;
208
- role: z.ZodDefault<z.ZodEnum<["context", "artifact", "result"]>>;
209
- bytes: z.ZodOptional<z.ZodNumber>;
210
- sha256: z.ZodOptional<z.ZodString>;
211
- }, "strip", z.ZodTypeAny, {
212
- path: string;
213
- role: "context" | "artifact" | "result";
214
- bytes?: number | undefined;
215
- sha256?: string | undefined;
216
- }, {
217
- path: string;
218
- role?: "context" | "artifact" | "result" | undefined;
219
- bytes?: number | undefined;
220
- sha256?: string | undefined;
221
- }>, "many">>;
222
- commands: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
223
- warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
224
- blocker: z.ZodOptional<z.ZodObject<{
225
- code: z.ZodString;
226
- message: z.ZodString;
227
- retryable: z.ZodDefault<z.ZodBoolean>;
228
- next_step: z.ZodOptional<z.ZodString>;
229
- }, "strip", z.ZodTypeAny, {
230
- code: string;
231
- message: string;
232
- retryable: boolean;
233
- next_step?: string | undefined;
234
- }, {
235
- code: string;
236
- message: string;
237
- retryable?: boolean | undefined;
238
- next_step?: string | undefined;
239
- }>>;
240
- created_at: z.ZodString;
241
- }, "strip", z.ZodTypeAny, {
242
- status: "done" | "blocked";
243
- warnings: string[];
244
- schema_version: 1;
245
- created_at: string;
246
- task_id: string;
247
- summary: string;
248
- artifacts: {
249
- path: string;
250
- role: "context" | "artifact" | "result";
251
- bytes?: number | undefined;
252
- sha256?: string | undefined;
253
- }[];
254
- commands: string[];
255
- blocker?: {
256
- code: string;
257
- message: string;
258
- retryable: boolean;
259
- next_step?: string | undefined;
260
- } | undefined;
261
- }, {
262
- status: "done" | "blocked";
263
- schema_version: 1;
264
- created_at: string;
265
- task_id: string;
266
- summary: string;
267
- warnings?: string[] | undefined;
268
- blocker?: {
269
- code: string;
270
- message: string;
271
- retryable?: boolean | undefined;
272
- next_step?: string | undefined;
273
- } | undefined;
274
- artifacts?: {
275
- path: string;
276
- role?: "context" | "artifact" | "result" | undefined;
277
- bytes?: number | undefined;
278
- sha256?: string | undefined;
279
- }[] | undefined;
280
- commands?: string[] | undefined;
281
- }>;
282
- export declare const SessionSchema: z.ZodObject<{
283
- schema_version: z.ZodLiteral<1>;
284
- id: z.ZodString;
285
- direction: z.ZodEnum<["codex_to_chatgpt", "chatgpt_to_codex", "claude_to_codex"]>;
286
- backend: z.ZodEnum<["cli", "mcp", "manual", "oracle", "chatgpt-control"]>;
287
- project: z.ZodOptional<z.ZodString>;
288
- thread: z.ZodOptional<z.ZodString>;
289
- task_id: z.ZodOptional<z.ZodString>;
290
- status: z.ZodDefault<z.ZodEnum<["preview", "running", "done", "blocked"]>>;
291
- blocker: z.ZodOptional<z.ZodObject<{
292
- code: z.ZodString;
293
- message: z.ZodString;
294
- retryable: z.ZodDefault<z.ZodBoolean>;
295
- next_step: z.ZodOptional<z.ZodString>;
296
- }, "strip", z.ZodTypeAny, {
297
- code: string;
298
- message: string;
299
- retryable: boolean;
300
- next_step?: string | undefined;
301
- }, {
302
- code: string;
303
- message: string;
304
- retryable?: boolean | undefined;
305
- next_step?: string | undefined;
306
- }>>;
307
- warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
308
- created_at: z.ZodString;
309
- last_used_at: z.ZodString;
310
- }, "strip", z.ZodTypeAny, {
311
- status: "done" | "blocked" | "preview" | "running";
312
- warnings: string[];
313
- schema_version: 1;
314
- id: string;
315
- created_at: string;
316
- direction: "codex_to_chatgpt" | "chatgpt_to_codex" | "claude_to_codex";
317
- backend: "cli" | "mcp" | "manual" | "oracle" | "chatgpt-control";
318
- last_used_at: string;
319
- thread?: string | undefined;
320
- project?: string | undefined;
321
- blocker?: {
322
- code: string;
323
- message: string;
324
- retryable: boolean;
325
- next_step?: string | undefined;
326
- } | undefined;
327
- task_id?: string | undefined;
328
- }, {
329
- schema_version: 1;
330
- id: string;
331
- created_at: string;
332
- direction: "codex_to_chatgpt" | "chatgpt_to_codex" | "claude_to_codex";
333
- backend: "cli" | "mcp" | "manual" | "oracle" | "chatgpt-control";
334
- last_used_at: string;
335
- status?: "done" | "blocked" | "preview" | "running" | undefined;
336
- thread?: string | undefined;
337
- project?: string | undefined;
338
- warnings?: string[] | undefined;
339
- blocker?: {
340
- code: string;
341
- message: string;
342
- retryable?: boolean | undefined;
343
- next_step?: string | undefined;
344
- } | undefined;
345
- task_id?: string | undefined;
346
- }>;
347
- export declare const ReceiptSchema: z.ZodObject<{
348
- schema_version: z.ZodLiteral<1>;
349
- id: z.ZodString;
350
- kind: z.ZodEnum<["task_created", "task_claimed", "task_completed", "consult_preview", "consult_answer_saved", "repo_write_dry_run", "repo_write_applied", "repo_stage_reviewed_paths"]>;
351
- task_id: z.ZodOptional<z.ZodString>;
352
- session_id: z.ZodOptional<z.ZodString>;
353
- summary: z.ZodString;
354
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
355
- integrity: z.ZodOptional<z.ZodObject<{
356
- algorithm: z.ZodLiteral<"hmac-sha256">;
357
- digest: z.ZodString;
358
- }, "strip", z.ZodTypeAny, {
359
- algorithm: "hmac-sha256";
360
- digest: string;
361
- }, {
362
- algorithm: "hmac-sha256";
363
- digest: string;
364
- }>>;
365
- created_at: z.ZodString;
366
- }, "strip", z.ZodTypeAny, {
367
- schema_version: 1;
368
- id: string;
369
- created_at: string;
370
- summary: string;
371
- kind: "task_created" | "task_claimed" | "task_completed" | "consult_preview" | "consult_answer_saved" | "repo_write_dry_run" | "repo_write_applied" | "repo_stage_reviewed_paths";
372
- metadata: Record<string, unknown>;
373
- session_id?: string | undefined;
374
- task_id?: string | undefined;
375
- integrity?: {
376
- algorithm: "hmac-sha256";
377
- digest: string;
378
- } | undefined;
379
- }, {
380
- schema_version: 1;
381
- id: string;
382
- created_at: string;
383
- summary: string;
384
- kind: "task_created" | "task_claimed" | "task_completed" | "consult_preview" | "consult_answer_saved" | "repo_write_dry_run" | "repo_write_applied" | "repo_stage_reviewed_paths";
385
- session_id?: string | undefined;
386
- task_id?: string | undefined;
387
- metadata?: Record<string, unknown> | undefined;
388
- integrity?: {
389
- algorithm: "hmac-sha256";
390
- digest: string;
391
- } | undefined;
392
- }>;
393
- export type BridgeFile = z.infer<typeof BridgeFileSchema>;
394
- export type Task = z.infer<typeof TaskSchema>;
395
- export type Result = z.infer<typeof ResultSchema>;
396
- export type Session = z.infer<typeof SessionSchema>;
397
- export type Receipt = z.infer<typeof ReceiptSchema>;
398
- export type Provenance = z.infer<typeof ProvenanceSchema>;
399
- export type Blocker = z.infer<typeof BlockerSchema>;
400
- export declare function nowIso(): string;
401
- export declare function slugify(input: string): string;
402
- export declare function makeBridgeId(prefix: "task" | "sess" | "receipt", title: string, date?: Date): string;
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAEhC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAC3F,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAC9D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,OAAO,EAAE,QA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AE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChB,OAAO,IAAI,IAAI,MAAM,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAmC,EAAE,KAAa,EAAE,IAAI,GAAG,IAAI,IAAI,EAAE;IAChG,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC7F,OAAO,GAAG,MAAM,IAAI,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;AAChD,CAAC"}
package/dist/store.d.ts DELETED
@@ -1,165 +0,0 @@
1
- import { type BridgeFile, type Blocker, type Provenance, type Receipt, type Result, type Session, type SourceSchema, type Task } from "./schema.js";
2
- import type { z } from "zod";
3
- type Source = z.infer<typeof SourceSchema>;
4
- type BridgeStorageKind = "tasks" | "results" | "sessions" | "artifacts" | "receipts";
5
- type BridgeRecordKind = Exclude<BridgeStorageKind, "artifacts">;
6
- export type BridgeStoreTestHooks = {
7
- beforeRecordTempCleanup?: (kind: BridgeRecordKind, filePath: string) => Promise<void> | void;
8
- beforeRecordRename?: (kind: BridgeRecordKind, filePath: string) => Promise<void> | void;
9
- afterReceiptKeyReadMiss?: () => Promise<void> | void;
10
- disableDirectoryFdPaths?: boolean;
11
- };
12
- export declare function setBridgeStoreTestHooks(hooks: BridgeStoreTestHooks): void;
13
- export declare const MAX_FETCHABLE_RESULT_ARTIFACT_BYTES = 100000;
14
- export interface CreateTaskInput {
15
- source: Source;
16
- title: string;
17
- prompt: string;
18
- repo_id?: string;
19
- files?: BridgeFile[];
20
- provenance: Provenance;
21
- }
22
- export interface CompleteTaskInput {
23
- status: "done" | "blocked";
24
- summary: string;
25
- artifacts?: BridgeFile[];
26
- commands?: string[];
27
- warnings?: string[];
28
- blocker?: Blocker;
29
- provenance?: Partial<Provenance>;
30
- }
31
- export type WriteReceiptInput = Omit<Receipt, "schema_version" | "id" | "created_at" | "metadata" | "integrity"> & {
32
- metadata?: Record<string, unknown>;
33
- };
34
- export interface WriteSessionInput {
35
- id?: string;
36
- direction: Session["direction"];
37
- backend: Session["backend"];
38
- project?: string;
39
- thread?: string;
40
- task_id?: string;
41
- status?: Session["status"];
42
- blocker?: Blocker;
43
- warnings?: string[];
44
- }
45
- export interface ListReceiptsInput {
46
- kind?: Receipt["kind"];
47
- task_id?: string;
48
- }
49
- export interface ResealResultOutput {
50
- result: Result;
51
- receipt: Receipt;
52
- }
53
- export declare class BridgeStore {
54
- readonly root: string;
55
- readonly bridgeDir: string;
56
- constructor(root?: string);
57
- ensure(): Promise<void>;
58
- dir(kind: BridgeStorageKind): string;
59
- private receiptIntegrityKeyPath;
60
- createTask(input: CreateTaskInput): Promise<Task>;
61
- listTasks(status?: Task["status"]): Promise<Task[]>;
62
- listTasksReadOnly(status?: Task["status"]): Promise<Task[]>;
63
- getTask(taskId: string): Promise<Task>;
64
- getTaskReadOnly(taskId: string): Promise<Task>;
65
- claimTask(taskId: string, claimedBy: string): Promise<Task>;
66
- private writeClaimedTask;
67
- completeTask(taskId: string, input: CompleteTaskInput): Promise<Result>;
68
- listResults(): Promise<Result[]>;
69
- listResultsReadOnly(): Promise<Result[]>;
70
- listFinalizedResultsReadOnly(): Promise<Result[]>;
71
- getResult(taskId: string): Promise<Result>;
72
- getResultReadOnly(taskId: string): Promise<Result>;
73
- getFinalizedResultReadOnly(taskId: string): Promise<Result>;
74
- resealResult(taskId: string): Promise<ResealResultOutput>;
75
- readFinalizedResultArtifactText(taskId: string, artifactPath?: string, options?: {
76
- maxBytes?: number;
77
- }): Promise<{
78
- artifact: BridgeFile;
79
- content: string;
80
- }>;
81
- readResultArtifactText(taskId: string, artifactPath?: string, options?: {
82
- maxBytes?: number;
83
- readOnly?: boolean;
84
- }): Promise<{
85
- artifact: BridgeFile;
86
- content: string;
87
- }>;
88
- private withResultArtifactHashes;
89
- private assertResultArtifactsUnchanged;
90
- writeSession(input: WriteSessionInput): Promise<Session>;
91
- getSession(sessionId: string): Promise<Session>;
92
- cancelSession(sessionId: string): Promise<Session>;
93
- getSessionReadOnly(sessionId: string): Promise<Session>;
94
- listSessions(status?: Session["status"]): Promise<Session[]>;
95
- listSessionsReadOnly(status?: Session["status"]): Promise<Session[]>;
96
- getReceipt(receiptId: string): Promise<Receipt>;
97
- getTrustedReceipt(receiptId: string): Promise<Receipt>;
98
- deleteReceiptIfPresent(receiptId: string): Promise<void>;
99
- getReceiptReadOnly(receiptId: string): Promise<Receipt>;
100
- listReceipts(input?: ListReceiptsInput): Promise<Receipt[]>;
101
- listReceiptsReadOnly(input?: ListReceiptsInput): Promise<Receipt[]>;
102
- getReceiptForDisplay(receiptId: string): Promise<Receipt>;
103
- getReceiptForDisplayReadOnly(receiptId: string): Promise<Receipt>;
104
- private hasTrustedTaskCompletionReceipt;
105
- private assertTrustedTaskCompletionReceiptReadOnly;
106
- private assertReceiptsTrustCompletion;
107
- private writeTaskCompletionReceipt;
108
- private writeTaskCompletionReceiptOrRestoreTask;
109
- private assertHasTrustedLegacyCompletionReceiptForReseal;
110
- writeArtifactText(relativePath: string, content: string): Promise<string>;
111
- hasArtifactText(relativePath: string): Promise<boolean>;
112
- deleteArtifactTextIfPresent(relativePath: string): Promise<void>;
113
- readArtifactText(relativePath: string, options?: {
114
- maxBytes?: number;
115
- }): Promise<string>;
116
- writeReceipt(input: WriteReceiptInput): Promise<Receipt>;
117
- private assertReceiptIntegrity;
118
- private redactReceiptForDisplay;
119
- private receiptIntegrityInspectionStatus;
120
- private receiptDigest;
121
- private receiptDigestMatches;
122
- rotateReceiptIntegrityKey(): Promise<{
123
- keys: number;
124
- }>;
125
- private ensureReceiptIntegrityKey;
126
- private readReceiptIntegrityKeys;
127
- private ensureBridgeGitignore;
128
- hasReadyBridgeStorageReadOnly(): Promise<boolean>;
129
- private hasReadyStorageDirReadOnly;
130
- private createWithUniqueId;
131
- private pathFor;
132
- private readAll;
133
- private parseRecord;
134
- private readRecordJson;
135
- private writeRecordJson;
136
- private writeNewRecordJson;
137
- private writeJson;
138
- private writeJsonIfAbsent;
139
- private writeTextByRename;
140
- private writeTextByCreateExclusive;
141
- private deleteRecordIfPresent;
142
- private writeTextByStableStorageRename;
143
- private writeTextByStableStorageLinkIfAbsent;
144
- private cleanupRecordTempHardLinks;
145
- private resolveArtifactPath;
146
- private relativeToRoot;
147
- private assertArtifactTargetInside;
148
- private assertArtifactsDirIsRealDirectory;
149
- private ensureArtifactParentDirectory;
150
- private assertArtifactParentDirectory;
151
- private walkArtifactParentDirectory;
152
- private ensureRealDirectorySegment;
153
- private assertRealDirectorySegment;
154
- private assertBridgeDirIsRealDirectory;
155
- private assertBridgeGitignoreTargetSafe;
156
- private assertReceiptIntegrityKeyTargetSafe;
157
- private assertStorageDirsAreRealDirectories;
158
- private assertStorageDirIsRealDirectory;
159
- private assertRecordTargetInside;
160
- private assertRecordTargetInsideIfExists;
161
- private assertArtifactTargetInsideIfExists;
162
- private assertRealPathInsideArtifacts;
163
- private assertRealPathInsideStorageDir;
164
- }
165
- export {};