@userreason/cli 0.1.1 → 0.2.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.
Files changed (44) hide show
  1. package/README.md +207 -0
  2. package/dist/bin.js +93 -8
  3. package/dist/catalog.js +29 -3
  4. package/dist/client.d.ts +8 -2
  5. package/dist/client.js +26 -11
  6. package/dist/first-survey-preparation.d.ts +8 -0
  7. package/dist/first-survey-preparation.js +29 -0
  8. package/dist/first-survey-source.d.ts +60 -0
  9. package/dist/first-survey-source.js +289 -0
  10. package/dist/first-survey-terminal.d.ts +5 -0
  11. package/dist/first-survey-terminal.js +16 -0
  12. package/dist/first-survey.d.ts +88 -0
  13. package/dist/first-survey.js +227 -0
  14. package/dist/help.js +6 -6
  15. package/dist/index.d.ts +14 -0
  16. package/dist/index.js +14 -0
  17. package/dist/profile.js +1 -1
  18. package/dist/recommended-surveys.d.ts +30 -0
  19. package/dist/recommended-surveys.js +201 -0
  20. package/dist/setup-executor.d.ts +35 -0
  21. package/dist/setup-executor.js +329 -0
  22. package/dist/setup-files.d.ts +11 -0
  23. package/dist/setup-files.js +96 -0
  24. package/dist/setup-runner.d.ts +14 -0
  25. package/dist/setup-runner.js +142 -0
  26. package/dist/setup-source.d.ts +31 -0
  27. package/dist/setup-source.js +48 -0
  28. package/dist/setup-store.d.ts +37 -0
  29. package/dist/setup-store.js +256 -0
  30. package/dist/setup-terminal.d.ts +3 -0
  31. package/dist/setup-terminal.js +6 -0
  32. package/dist/setup-wire.d.ts +1237 -0
  33. package/dist/setup-wire.js +175 -0
  34. package/dist/setup.d.ts +1223 -0
  35. package/dist/setup.js +258 -0
  36. package/dist/starter-survey.d.ts +22 -0
  37. package/dist/starter-survey.js +457 -0
  38. package/dist/telemetry.d.ts +67 -0
  39. package/dist/telemetry.js +304 -0
  40. package/dist/workos.d.ts +1 -1
  41. package/dist/workos.js +4 -2
  42. package/package.json +3 -2
  43. package/skills/userreason/SKILL.md +43 -0
  44. package/skills/userreason/references/management.md +6 -0
@@ -0,0 +1,1223 @@
1
+ import { SetupError, type StoredSetup } from './setup-store.js';
2
+ import { parseSetupStartResult, type SetupCapabilities, type SetupSessionView } from './setup-wire.js';
3
+ export interface SetupTransportOptions {
4
+ fetcher?: typeof fetch;
5
+ signal?: AbortSignal;
6
+ now?: () => number;
7
+ sleep?: (ms: number) => Promise<void>;
8
+ onProgress?: (state: 'waiting' | 'retrying') => void;
9
+ /** Suppress optional server-side setup milestones as well as local measurement. */
10
+ measurementDisabled?: boolean;
11
+ }
12
+ export declare class BrowserSetupUnavailable extends SetupError {
13
+ constructor();
14
+ }
15
+ export declare function discoverBrowserSetup(origin: string, options?: SetupTransportOptions): Promise<{
16
+ schema_version: 1;
17
+ browser_setup: {
18
+ versions: 1[];
19
+ enabled: boolean;
20
+ source_analysis: boolean;
21
+ draft_creation: boolean;
22
+ sample_read: boolean;
23
+ } & {};
24
+ } & {}>;
25
+ export declare function validateSetupBrowserUrl(value: ReturnType<typeof parseSetupStartResult>, expectedOrigin: string, challenge: string, now: number): string;
26
+ /** The handshake never installs packages, edits source or grants management access. */
27
+ export declare function connectBrowserSetup(origin: string, input: {
28
+ directory: string;
29
+ capabilities: SetupCapabilities;
30
+ browserOrigin?: string;
31
+ }, onBrowser: (url: string, code: string) => Promise<void>, options?: SetupTransportOptions): Promise<{
32
+ client: BrowserSetupClient;
33
+ session: SetupSessionView;
34
+ }>;
35
+ export declare function resumeBrowserSetup(origin: string, setupId: string, directory: string, options?: SetupTransportOptions): Promise<{
36
+ client: BrowserSetupClient;
37
+ session: {
38
+ phase: "expired" | "cancelled" | "analyzing" | "configuring" | "awaiting_local_approval" | "applying" | "ready_for_recommendations" | "selecting_drafts" | "creating_drafts" | "agent_test" | "complete";
39
+ revision: string;
40
+ workspace_id: string | null;
41
+ site_id: string | null;
42
+ project_fingerprint: string;
43
+ choices: {
44
+ install_sdk: boolean;
45
+ install_skill: boolean;
46
+ footer_badge: boolean;
47
+ } & {};
48
+ capabilities: {
49
+ framework: string;
50
+ package_manager: string;
51
+ install_packages: boolean;
52
+ initialize_sdk: boolean;
53
+ install_skill: boolean;
54
+ insert_footer: boolean;
55
+ source_review: boolean;
56
+ sample_read: boolean;
57
+ } & {
58
+ project_name?: string | undefined;
59
+ terminal?: ({
60
+ platform: string;
61
+ app: string;
62
+ } & {}) | undefined;
63
+ };
64
+ local_plan: ({
65
+ project_fingerprint: string;
66
+ choices_digest: string;
67
+ effects: import("./setup-wire.js").SetupEffect[];
68
+ } & {
69
+ manual_steps?: ({
70
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
71
+ code: string;
72
+ } & {})[] | undefined;
73
+ }) | null;
74
+ plan_digest: string | null;
75
+ commands: ({
76
+ operation_id: string;
77
+ sequence: number;
78
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
79
+ expected_revision: string;
80
+ input: import("./setup-wire.js").SetupEffect;
81
+ input_digest: string;
82
+ approval_digest: string;
83
+ status: "approved" | "manual" | "cancelled" | "failed" | "outcome_unknown" | "prepared" | "leased" | "running" | "succeeded";
84
+ executor_generation: number | null;
85
+ lease_generation: number;
86
+ lease_expires_at: string | null;
87
+ result: ({
88
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown";
89
+ } & {
90
+ verified?: boolean | undefined;
91
+ }) | null;
92
+ result_digest: string | null;
93
+ created_at: string;
94
+ started_at: string | null;
95
+ finished_at: string | null;
96
+ updated_at: string;
97
+ } & {})[];
98
+ executor_generation: number;
99
+ connection: string;
100
+ heartbeat_at: string | null;
101
+ sample: {
102
+ status: string;
103
+ first_received_at: string | null;
104
+ latest_received_at: string | null;
105
+ latest_request_id: string | null;
106
+ } & {};
107
+ draft_outcomes: ({
108
+ candidate_id: string;
109
+ status: string;
110
+ prompt_id: string;
111
+ request_id: string;
112
+ revision: string | null;
113
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown" | null;
114
+ } & {})[];
115
+ bound_at: string;
116
+ last_activity_at: string;
117
+ idle_expires_at: string;
118
+ absolute_expires_at: string;
119
+ terminal_at: string | null;
120
+ schema_version: 1;
121
+ setup_id: string;
122
+ } & {
123
+ source?: ({
124
+ preparation_id: string;
125
+ status: string;
126
+ packet_digest: string;
127
+ provider_fingerprint: string;
128
+ authorized_at: string | null;
129
+ expires_at: string;
130
+ error_code: "operation_failed" | "planning_unavailable" | "planning_paused" | "planning_daily_budget" | "planning_allowance_exhausted" | "planning_provider_unavailable" | "planning_policy_changed" | "planning_consent_expired" | "planning_input_budget" | "planning_invalid_output" | "planning_timeout" | "source_changed" | "source_unavailable" | "recommendations_no_source" | null;
131
+ } & {}) | null | undefined;
132
+ recommendation_digest?: string | null | undefined;
133
+ selected_candidates?: string[] | undefined;
134
+ };
135
+ }>;
136
+ export declare class BrowserSetupClient {
137
+ #private;
138
+ constructor(stored: Extract<StoredSetup, {
139
+ state: 'connected';
140
+ }>, options?: SetupTransportOptions);
141
+ /** Nonsecret identity for the local executor journal; never exposes the bearer. */
142
+ get identity(): {
143
+ setup_id: string;
144
+ api_url: string;
145
+ project_fingerprint: string;
146
+ expires_at: string;
147
+ };
148
+ private call;
149
+ private scoped;
150
+ private view;
151
+ poll(): Promise<{
152
+ phase: "expired" | "cancelled" | "analyzing" | "configuring" | "awaiting_local_approval" | "applying" | "ready_for_recommendations" | "selecting_drafts" | "creating_drafts" | "agent_test" | "complete";
153
+ revision: string;
154
+ workspace_id: string | null;
155
+ site_id: string | null;
156
+ project_fingerprint: string;
157
+ choices: {
158
+ install_sdk: boolean;
159
+ install_skill: boolean;
160
+ footer_badge: boolean;
161
+ } & {};
162
+ capabilities: {
163
+ framework: string;
164
+ package_manager: string;
165
+ install_packages: boolean;
166
+ initialize_sdk: boolean;
167
+ install_skill: boolean;
168
+ insert_footer: boolean;
169
+ source_review: boolean;
170
+ sample_read: boolean;
171
+ } & {
172
+ project_name?: string | undefined;
173
+ terminal?: ({
174
+ platform: string;
175
+ app: string;
176
+ } & {}) | undefined;
177
+ };
178
+ local_plan: ({
179
+ project_fingerprint: string;
180
+ choices_digest: string;
181
+ effects: import("./setup-wire.js").SetupEffect[];
182
+ } & {
183
+ manual_steps?: ({
184
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
185
+ code: string;
186
+ } & {})[] | undefined;
187
+ }) | null;
188
+ plan_digest: string | null;
189
+ commands: ({
190
+ operation_id: string;
191
+ sequence: number;
192
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
193
+ expected_revision: string;
194
+ input: import("./setup-wire.js").SetupEffect;
195
+ input_digest: string;
196
+ approval_digest: string;
197
+ status: "approved" | "manual" | "cancelled" | "failed" | "outcome_unknown" | "prepared" | "leased" | "running" | "succeeded";
198
+ executor_generation: number | null;
199
+ lease_generation: number;
200
+ lease_expires_at: string | null;
201
+ result: ({
202
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown";
203
+ } & {
204
+ verified?: boolean | undefined;
205
+ }) | null;
206
+ result_digest: string | null;
207
+ created_at: string;
208
+ started_at: string | null;
209
+ finished_at: string | null;
210
+ updated_at: string;
211
+ } & {})[];
212
+ executor_generation: number;
213
+ connection: string;
214
+ heartbeat_at: string | null;
215
+ sample: {
216
+ status: string;
217
+ first_received_at: string | null;
218
+ latest_received_at: string | null;
219
+ latest_request_id: string | null;
220
+ } & {};
221
+ draft_outcomes: ({
222
+ candidate_id: string;
223
+ status: string;
224
+ prompt_id: string;
225
+ request_id: string;
226
+ revision: string | null;
227
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown" | null;
228
+ } & {})[];
229
+ bound_at: string;
230
+ last_activity_at: string;
231
+ idle_expires_at: string;
232
+ absolute_expires_at: string;
233
+ terminal_at: string | null;
234
+ schema_version: 1;
235
+ setup_id: string;
236
+ } & {
237
+ source?: ({
238
+ preparation_id: string;
239
+ status: string;
240
+ packet_digest: string;
241
+ provider_fingerprint: string;
242
+ authorized_at: string | null;
243
+ expires_at: string;
244
+ error_code: "operation_failed" | "planning_unavailable" | "planning_paused" | "planning_daily_budget" | "planning_allowance_exhausted" | "planning_provider_unavailable" | "planning_policy_changed" | "planning_consent_expired" | "planning_input_budget" | "planning_invalid_output" | "planning_timeout" | "source_changed" | "source_unavailable" | "recommendations_no_source" | null;
245
+ } & {}) | null | undefined;
246
+ recommendation_digest?: string | null | undefined;
247
+ selected_candidates?: string[] | undefined;
248
+ }>;
249
+ discovery(): Promise<{
250
+ schema_version: 1;
251
+ browser_setup: {
252
+ versions: 1[];
253
+ enabled: boolean;
254
+ source_analysis: boolean;
255
+ draft_creation: boolean;
256
+ sample_read: boolean;
257
+ } & {};
258
+ } & {}>;
259
+ sourceInfo(): Promise<{
260
+ schema_version: 1;
261
+ session: {
262
+ phase: "expired" | "cancelled" | "analyzing" | "configuring" | "awaiting_local_approval" | "applying" | "ready_for_recommendations" | "selecting_drafts" | "creating_drafts" | "agent_test" | "complete";
263
+ revision: string;
264
+ workspace_id: string | null;
265
+ site_id: string | null;
266
+ project_fingerprint: string;
267
+ choices: {
268
+ install_sdk: boolean;
269
+ install_skill: boolean;
270
+ footer_badge: boolean;
271
+ } & {};
272
+ capabilities: {
273
+ framework: string;
274
+ package_manager: string;
275
+ install_packages: boolean;
276
+ initialize_sdk: boolean;
277
+ install_skill: boolean;
278
+ insert_footer: boolean;
279
+ source_review: boolean;
280
+ sample_read: boolean;
281
+ } & {
282
+ project_name?: string | undefined;
283
+ terminal?: ({
284
+ platform: string;
285
+ app: string;
286
+ } & {}) | undefined;
287
+ };
288
+ local_plan: ({
289
+ project_fingerprint: string;
290
+ choices_digest: string;
291
+ effects: import("./setup-wire.js").SetupEffect[];
292
+ } & {
293
+ manual_steps?: ({
294
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
295
+ code: string;
296
+ } & {})[] | undefined;
297
+ }) | null;
298
+ plan_digest: string | null;
299
+ commands: ({
300
+ operation_id: string;
301
+ sequence: number;
302
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
303
+ expected_revision: string;
304
+ input: import("./setup-wire.js").SetupEffect;
305
+ input_digest: string;
306
+ approval_digest: string;
307
+ status: "approved" | "manual" | "cancelled" | "failed" | "outcome_unknown" | "prepared" | "leased" | "running" | "succeeded";
308
+ executor_generation: number | null;
309
+ lease_generation: number;
310
+ lease_expires_at: string | null;
311
+ result: ({
312
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown";
313
+ } & {
314
+ verified?: boolean | undefined;
315
+ }) | null;
316
+ result_digest: string | null;
317
+ created_at: string;
318
+ started_at: string | null;
319
+ finished_at: string | null;
320
+ updated_at: string;
321
+ } & {})[];
322
+ executor_generation: number;
323
+ connection: string;
324
+ heartbeat_at: string | null;
325
+ sample: {
326
+ status: string;
327
+ first_received_at: string | null;
328
+ latest_received_at: string | null;
329
+ latest_request_id: string | null;
330
+ } & {};
331
+ draft_outcomes: ({
332
+ candidate_id: string;
333
+ status: string;
334
+ prompt_id: string;
335
+ request_id: string;
336
+ revision: string | null;
337
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown" | null;
338
+ } & {})[];
339
+ bound_at: string;
340
+ last_activity_at: string;
341
+ idle_expires_at: string;
342
+ absolute_expires_at: string;
343
+ terminal_at: string | null;
344
+ schema_version: 1;
345
+ setup_id: string;
346
+ } & {
347
+ source?: ({
348
+ preparation_id: string;
349
+ status: string;
350
+ packet_digest: string;
351
+ provider_fingerprint: string;
352
+ authorized_at: string | null;
353
+ expires_at: string;
354
+ error_code: "operation_failed" | "planning_unavailable" | "planning_paused" | "planning_daily_budget" | "planning_allowance_exhausted" | "planning_provider_unavailable" | "planning_policy_changed" | "planning_consent_expired" | "planning_input_budget" | "planning_invalid_output" | "planning_timeout" | "source_changed" | "source_unavailable" | "recommendations_no_source" | null;
355
+ } & {}) | null | undefined;
356
+ recommendation_digest?: string | null | undefined;
357
+ selected_candidates?: string[] | undefined;
358
+ };
359
+ preparation: ({
360
+ preparation_id: string;
361
+ manifest: {
362
+ packet_digest: string;
363
+ snapshot_id: string;
364
+ files: ({
365
+ path: string;
366
+ file_hash: string;
367
+ excerpt_hash: string;
368
+ bytes: number;
369
+ start_line: number;
370
+ end_line: number;
371
+ } & {})[];
372
+ omitted_files: number;
373
+ truncated: boolean;
374
+ git_included: false;
375
+ } & {};
376
+ packages: ({
377
+ name: string;
378
+ version: string;
379
+ } & {})[];
380
+ configuration: {
381
+ configuration_fingerprint: string;
382
+ providers: ({
383
+ role: string;
384
+ destination: string;
385
+ model: string;
386
+ prices: {
387
+ input_microUSD_per_million: string;
388
+ output_microUSD_per_million: string;
389
+ } & {};
390
+ } & {})[];
391
+ policy: string;
392
+ retention: "private-plan-7-days;source-not-stored;store-false";
393
+ limits: {
394
+ input_tokens: number;
395
+ output_tokens: number;
396
+ deadline_ms: number;
397
+ } & {};
398
+ } & {};
399
+ } & {}) | null;
400
+ } & {}>;
401
+ sourcePlan(input: unknown): Promise<{
402
+ phase: "expired" | "cancelled" | "analyzing" | "configuring" | "awaiting_local_approval" | "applying" | "ready_for_recommendations" | "selecting_drafts" | "creating_drafts" | "agent_test" | "complete";
403
+ revision: string;
404
+ workspace_id: string | null;
405
+ site_id: string | null;
406
+ project_fingerprint: string;
407
+ choices: {
408
+ install_sdk: boolean;
409
+ install_skill: boolean;
410
+ footer_badge: boolean;
411
+ } & {};
412
+ capabilities: {
413
+ framework: string;
414
+ package_manager: string;
415
+ install_packages: boolean;
416
+ initialize_sdk: boolean;
417
+ install_skill: boolean;
418
+ insert_footer: boolean;
419
+ source_review: boolean;
420
+ sample_read: boolean;
421
+ } & {
422
+ project_name?: string | undefined;
423
+ terminal?: ({
424
+ platform: string;
425
+ app: string;
426
+ } & {}) | undefined;
427
+ };
428
+ local_plan: ({
429
+ project_fingerprint: string;
430
+ choices_digest: string;
431
+ effects: import("./setup-wire.js").SetupEffect[];
432
+ } & {
433
+ manual_steps?: ({
434
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
435
+ code: string;
436
+ } & {})[] | undefined;
437
+ }) | null;
438
+ plan_digest: string | null;
439
+ commands: ({
440
+ operation_id: string;
441
+ sequence: number;
442
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
443
+ expected_revision: string;
444
+ input: import("./setup-wire.js").SetupEffect;
445
+ input_digest: string;
446
+ approval_digest: string;
447
+ status: "approved" | "manual" | "cancelled" | "failed" | "outcome_unknown" | "prepared" | "leased" | "running" | "succeeded";
448
+ executor_generation: number | null;
449
+ lease_generation: number;
450
+ lease_expires_at: string | null;
451
+ result: ({
452
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown";
453
+ } & {
454
+ verified?: boolean | undefined;
455
+ }) | null;
456
+ result_digest: string | null;
457
+ created_at: string;
458
+ started_at: string | null;
459
+ finished_at: string | null;
460
+ updated_at: string;
461
+ } & {})[];
462
+ executor_generation: number;
463
+ connection: string;
464
+ heartbeat_at: string | null;
465
+ sample: {
466
+ status: string;
467
+ first_received_at: string | null;
468
+ latest_received_at: string | null;
469
+ latest_request_id: string | null;
470
+ } & {};
471
+ draft_outcomes: ({
472
+ candidate_id: string;
473
+ status: string;
474
+ prompt_id: string;
475
+ request_id: string;
476
+ revision: string | null;
477
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown" | null;
478
+ } & {})[];
479
+ bound_at: string;
480
+ last_activity_at: string;
481
+ idle_expires_at: string;
482
+ absolute_expires_at: string;
483
+ terminal_at: string | null;
484
+ schema_version: 1;
485
+ setup_id: string;
486
+ } & {
487
+ source?: ({
488
+ preparation_id: string;
489
+ status: string;
490
+ packet_digest: string;
491
+ provider_fingerprint: string;
492
+ authorized_at: string | null;
493
+ expires_at: string;
494
+ error_code: "operation_failed" | "planning_unavailable" | "planning_paused" | "planning_daily_budget" | "planning_allowance_exhausted" | "planning_provider_unavailable" | "planning_policy_changed" | "planning_consent_expired" | "planning_input_budget" | "planning_invalid_output" | "planning_timeout" | "source_changed" | "source_unavailable" | "recommendations_no_source" | null;
495
+ } & {}) | null | undefined;
496
+ recommendation_digest?: string | null | undefined;
497
+ selected_candidates?: string[] | undefined;
498
+ }>;
499
+ sourceUpload(input: unknown): Promise<{
500
+ phase: "expired" | "cancelled" | "analyzing" | "configuring" | "awaiting_local_approval" | "applying" | "ready_for_recommendations" | "selecting_drafts" | "creating_drafts" | "agent_test" | "complete";
501
+ revision: string;
502
+ workspace_id: string | null;
503
+ site_id: string | null;
504
+ project_fingerprint: string;
505
+ choices: {
506
+ install_sdk: boolean;
507
+ install_skill: boolean;
508
+ footer_badge: boolean;
509
+ } & {};
510
+ capabilities: {
511
+ framework: string;
512
+ package_manager: string;
513
+ install_packages: boolean;
514
+ initialize_sdk: boolean;
515
+ install_skill: boolean;
516
+ insert_footer: boolean;
517
+ source_review: boolean;
518
+ sample_read: boolean;
519
+ } & {
520
+ project_name?: string | undefined;
521
+ terminal?: ({
522
+ platform: string;
523
+ app: string;
524
+ } & {}) | undefined;
525
+ };
526
+ local_plan: ({
527
+ project_fingerprint: string;
528
+ choices_digest: string;
529
+ effects: import("./setup-wire.js").SetupEffect[];
530
+ } & {
531
+ manual_steps?: ({
532
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
533
+ code: string;
534
+ } & {})[] | undefined;
535
+ }) | null;
536
+ plan_digest: string | null;
537
+ commands: ({
538
+ operation_id: string;
539
+ sequence: number;
540
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
541
+ expected_revision: string;
542
+ input: import("./setup-wire.js").SetupEffect;
543
+ input_digest: string;
544
+ approval_digest: string;
545
+ status: "approved" | "manual" | "cancelled" | "failed" | "outcome_unknown" | "prepared" | "leased" | "running" | "succeeded";
546
+ executor_generation: number | null;
547
+ lease_generation: number;
548
+ lease_expires_at: string | null;
549
+ result: ({
550
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown";
551
+ } & {
552
+ verified?: boolean | undefined;
553
+ }) | null;
554
+ result_digest: string | null;
555
+ created_at: string;
556
+ started_at: string | null;
557
+ finished_at: string | null;
558
+ updated_at: string;
559
+ } & {})[];
560
+ executor_generation: number;
561
+ connection: string;
562
+ heartbeat_at: string | null;
563
+ sample: {
564
+ status: string;
565
+ first_received_at: string | null;
566
+ latest_received_at: string | null;
567
+ latest_request_id: string | null;
568
+ } & {};
569
+ draft_outcomes: ({
570
+ candidate_id: string;
571
+ status: string;
572
+ prompt_id: string;
573
+ request_id: string;
574
+ revision: string | null;
575
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown" | null;
576
+ } & {})[];
577
+ bound_at: string;
578
+ last_activity_at: string;
579
+ idle_expires_at: string;
580
+ absolute_expires_at: string;
581
+ terminal_at: string | null;
582
+ schema_version: 1;
583
+ setup_id: string;
584
+ } & {
585
+ source?: ({
586
+ preparation_id: string;
587
+ status: string;
588
+ packet_digest: string;
589
+ provider_fingerprint: string;
590
+ authorized_at: string | null;
591
+ expires_at: string;
592
+ error_code: "operation_failed" | "planning_unavailable" | "planning_paused" | "planning_daily_budget" | "planning_allowance_exhausted" | "planning_provider_unavailable" | "planning_policy_changed" | "planning_consent_expired" | "planning_input_budget" | "planning_invalid_output" | "planning_timeout" | "source_changed" | "source_unavailable" | "recommendations_no_source" | null;
593
+ } & {}) | null | undefined;
594
+ recommendation_digest?: string | null | undefined;
595
+ selected_candidates?: string[] | undefined;
596
+ }>;
597
+ plan(input: unknown): Promise<{
598
+ phase: "expired" | "cancelled" | "analyzing" | "configuring" | "awaiting_local_approval" | "applying" | "ready_for_recommendations" | "selecting_drafts" | "creating_drafts" | "agent_test" | "complete";
599
+ revision: string;
600
+ workspace_id: string | null;
601
+ site_id: string | null;
602
+ project_fingerprint: string;
603
+ choices: {
604
+ install_sdk: boolean;
605
+ install_skill: boolean;
606
+ footer_badge: boolean;
607
+ } & {};
608
+ capabilities: {
609
+ framework: string;
610
+ package_manager: string;
611
+ install_packages: boolean;
612
+ initialize_sdk: boolean;
613
+ install_skill: boolean;
614
+ insert_footer: boolean;
615
+ source_review: boolean;
616
+ sample_read: boolean;
617
+ } & {
618
+ project_name?: string | undefined;
619
+ terminal?: ({
620
+ platform: string;
621
+ app: string;
622
+ } & {}) | undefined;
623
+ };
624
+ local_plan: ({
625
+ project_fingerprint: string;
626
+ choices_digest: string;
627
+ effects: import("./setup-wire.js").SetupEffect[];
628
+ } & {
629
+ manual_steps?: ({
630
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
631
+ code: string;
632
+ } & {})[] | undefined;
633
+ }) | null;
634
+ plan_digest: string | null;
635
+ commands: ({
636
+ operation_id: string;
637
+ sequence: number;
638
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
639
+ expected_revision: string;
640
+ input: import("./setup-wire.js").SetupEffect;
641
+ input_digest: string;
642
+ approval_digest: string;
643
+ status: "approved" | "manual" | "cancelled" | "failed" | "outcome_unknown" | "prepared" | "leased" | "running" | "succeeded";
644
+ executor_generation: number | null;
645
+ lease_generation: number;
646
+ lease_expires_at: string | null;
647
+ result: ({
648
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown";
649
+ } & {
650
+ verified?: boolean | undefined;
651
+ }) | null;
652
+ result_digest: string | null;
653
+ created_at: string;
654
+ started_at: string | null;
655
+ finished_at: string | null;
656
+ updated_at: string;
657
+ } & {})[];
658
+ executor_generation: number;
659
+ connection: string;
660
+ heartbeat_at: string | null;
661
+ sample: {
662
+ status: string;
663
+ first_received_at: string | null;
664
+ latest_received_at: string | null;
665
+ latest_request_id: string | null;
666
+ } & {};
667
+ draft_outcomes: ({
668
+ candidate_id: string;
669
+ status: string;
670
+ prompt_id: string;
671
+ request_id: string;
672
+ revision: string | null;
673
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown" | null;
674
+ } & {})[];
675
+ bound_at: string;
676
+ last_activity_at: string;
677
+ idle_expires_at: string;
678
+ absolute_expires_at: string;
679
+ terminal_at: string | null;
680
+ schema_version: 1;
681
+ setup_id: string;
682
+ } & {
683
+ source?: ({
684
+ preparation_id: string;
685
+ status: string;
686
+ packet_digest: string;
687
+ provider_fingerprint: string;
688
+ authorized_at: string | null;
689
+ expires_at: string;
690
+ error_code: "operation_failed" | "planning_unavailable" | "planning_paused" | "planning_daily_budget" | "planning_allowance_exhausted" | "planning_provider_unavailable" | "planning_policy_changed" | "planning_consent_expired" | "planning_input_budget" | "planning_invalid_output" | "planning_timeout" | "source_changed" | "source_unavailable" | "recommendations_no_source" | null;
691
+ } & {}) | null | undefined;
692
+ recommendation_digest?: string | null | undefined;
693
+ selected_candidates?: string[] | undefined;
694
+ }>;
695
+ claim(input: unknown): Promise<{
696
+ schema_version: 1;
697
+ command: ({
698
+ operation_id: string;
699
+ sequence: number;
700
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
701
+ expected_revision: string;
702
+ input: import("./setup-wire.js").SetupEffect;
703
+ input_digest: string;
704
+ approval_digest: string;
705
+ status: "approved" | "manual" | "cancelled" | "failed" | "outcome_unknown" | "prepared" | "leased" | "running" | "succeeded";
706
+ executor_generation: number | null;
707
+ lease_generation: number;
708
+ lease_expires_at: string | null;
709
+ result: ({
710
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown";
711
+ } & {
712
+ verified?: boolean | undefined;
713
+ }) | null;
714
+ result_digest: string | null;
715
+ created_at: string;
716
+ started_at: string | null;
717
+ finished_at: string | null;
718
+ updated_at: string;
719
+ } & {}) | null;
720
+ session: {
721
+ phase: "expired" | "cancelled" | "analyzing" | "configuring" | "awaiting_local_approval" | "applying" | "ready_for_recommendations" | "selecting_drafts" | "creating_drafts" | "agent_test" | "complete";
722
+ revision: string;
723
+ workspace_id: string | null;
724
+ site_id: string | null;
725
+ project_fingerprint: string;
726
+ choices: {
727
+ install_sdk: boolean;
728
+ install_skill: boolean;
729
+ footer_badge: boolean;
730
+ } & {};
731
+ capabilities: {
732
+ framework: string;
733
+ package_manager: string;
734
+ install_packages: boolean;
735
+ initialize_sdk: boolean;
736
+ install_skill: boolean;
737
+ insert_footer: boolean;
738
+ source_review: boolean;
739
+ sample_read: boolean;
740
+ } & {
741
+ project_name?: string | undefined;
742
+ terminal?: ({
743
+ platform: string;
744
+ app: string;
745
+ } & {}) | undefined;
746
+ };
747
+ local_plan: ({
748
+ project_fingerprint: string;
749
+ choices_digest: string;
750
+ effects: import("./setup-wire.js").SetupEffect[];
751
+ } & {
752
+ manual_steps?: ({
753
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
754
+ code: string;
755
+ } & {})[] | undefined;
756
+ }) | null;
757
+ plan_digest: string | null;
758
+ commands: ({
759
+ operation_id: string;
760
+ sequence: number;
761
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
762
+ expected_revision: string;
763
+ input: import("./setup-wire.js").SetupEffect;
764
+ input_digest: string;
765
+ approval_digest: string;
766
+ status: "approved" | "manual" | "cancelled" | "failed" | "outcome_unknown" | "prepared" | "leased" | "running" | "succeeded";
767
+ executor_generation: number | null;
768
+ lease_generation: number;
769
+ lease_expires_at: string | null;
770
+ result: ({
771
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown";
772
+ } & {
773
+ verified?: boolean | undefined;
774
+ }) | null;
775
+ result_digest: string | null;
776
+ created_at: string;
777
+ started_at: string | null;
778
+ finished_at: string | null;
779
+ updated_at: string;
780
+ } & {})[];
781
+ executor_generation: number;
782
+ connection: string;
783
+ heartbeat_at: string | null;
784
+ sample: {
785
+ status: string;
786
+ first_received_at: string | null;
787
+ latest_received_at: string | null;
788
+ latest_request_id: string | null;
789
+ } & {};
790
+ draft_outcomes: ({
791
+ candidate_id: string;
792
+ status: string;
793
+ prompt_id: string;
794
+ request_id: string;
795
+ revision: string | null;
796
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown" | null;
797
+ } & {})[];
798
+ bound_at: string;
799
+ last_activity_at: string;
800
+ idle_expires_at: string;
801
+ absolute_expires_at: string;
802
+ terminal_at: string | null;
803
+ schema_version: 1;
804
+ setup_id: string;
805
+ } & {
806
+ source?: ({
807
+ preparation_id: string;
808
+ status: string;
809
+ packet_digest: string;
810
+ provider_fingerprint: string;
811
+ authorized_at: string | null;
812
+ expires_at: string;
813
+ error_code: "operation_failed" | "planning_unavailable" | "planning_paused" | "planning_daily_budget" | "planning_allowance_exhausted" | "planning_provider_unavailable" | "planning_policy_changed" | "planning_consent_expired" | "planning_input_budget" | "planning_invalid_output" | "planning_timeout" | "source_changed" | "source_unavailable" | "recommendations_no_source" | null;
814
+ } & {}) | null | undefined;
815
+ recommendation_digest?: string | null | undefined;
816
+ selected_candidates?: string[] | undefined;
817
+ };
818
+ } & {}>;
819
+ startCommand(input: unknown): Promise<{
820
+ phase: "expired" | "cancelled" | "analyzing" | "configuring" | "awaiting_local_approval" | "applying" | "ready_for_recommendations" | "selecting_drafts" | "creating_drafts" | "agent_test" | "complete";
821
+ revision: string;
822
+ workspace_id: string | null;
823
+ site_id: string | null;
824
+ project_fingerprint: string;
825
+ choices: {
826
+ install_sdk: boolean;
827
+ install_skill: boolean;
828
+ footer_badge: boolean;
829
+ } & {};
830
+ capabilities: {
831
+ framework: string;
832
+ package_manager: string;
833
+ install_packages: boolean;
834
+ initialize_sdk: boolean;
835
+ install_skill: boolean;
836
+ insert_footer: boolean;
837
+ source_review: boolean;
838
+ sample_read: boolean;
839
+ } & {
840
+ project_name?: string | undefined;
841
+ terminal?: ({
842
+ platform: string;
843
+ app: string;
844
+ } & {}) | undefined;
845
+ };
846
+ local_plan: ({
847
+ project_fingerprint: string;
848
+ choices_digest: string;
849
+ effects: import("./setup-wire.js").SetupEffect[];
850
+ } & {
851
+ manual_steps?: ({
852
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
853
+ code: string;
854
+ } & {})[] | undefined;
855
+ }) | null;
856
+ plan_digest: string | null;
857
+ commands: ({
858
+ operation_id: string;
859
+ sequence: number;
860
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
861
+ expected_revision: string;
862
+ input: import("./setup-wire.js").SetupEffect;
863
+ input_digest: string;
864
+ approval_digest: string;
865
+ status: "approved" | "manual" | "cancelled" | "failed" | "outcome_unknown" | "prepared" | "leased" | "running" | "succeeded";
866
+ executor_generation: number | null;
867
+ lease_generation: number;
868
+ lease_expires_at: string | null;
869
+ result: ({
870
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown";
871
+ } & {
872
+ verified?: boolean | undefined;
873
+ }) | null;
874
+ result_digest: string | null;
875
+ created_at: string;
876
+ started_at: string | null;
877
+ finished_at: string | null;
878
+ updated_at: string;
879
+ } & {})[];
880
+ executor_generation: number;
881
+ connection: string;
882
+ heartbeat_at: string | null;
883
+ sample: {
884
+ status: string;
885
+ first_received_at: string | null;
886
+ latest_received_at: string | null;
887
+ latest_request_id: string | null;
888
+ } & {};
889
+ draft_outcomes: ({
890
+ candidate_id: string;
891
+ status: string;
892
+ prompt_id: string;
893
+ request_id: string;
894
+ revision: string | null;
895
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown" | null;
896
+ } & {})[];
897
+ bound_at: string;
898
+ last_activity_at: string;
899
+ idle_expires_at: string;
900
+ absolute_expires_at: string;
901
+ terminal_at: string | null;
902
+ schema_version: 1;
903
+ setup_id: string;
904
+ } & {
905
+ source?: ({
906
+ preparation_id: string;
907
+ status: string;
908
+ packet_digest: string;
909
+ provider_fingerprint: string;
910
+ authorized_at: string | null;
911
+ expires_at: string;
912
+ error_code: "operation_failed" | "planning_unavailable" | "planning_paused" | "planning_daily_budget" | "planning_allowance_exhausted" | "planning_provider_unavailable" | "planning_policy_changed" | "planning_consent_expired" | "planning_input_budget" | "planning_invalid_output" | "planning_timeout" | "source_changed" | "source_unavailable" | "recommendations_no_source" | null;
913
+ } & {}) | null | undefined;
914
+ recommendation_digest?: string | null | undefined;
915
+ selected_candidates?: string[] | undefined;
916
+ }>;
917
+ report(input: unknown): Promise<{
918
+ phase: "expired" | "cancelled" | "analyzing" | "configuring" | "awaiting_local_approval" | "applying" | "ready_for_recommendations" | "selecting_drafts" | "creating_drafts" | "agent_test" | "complete";
919
+ revision: string;
920
+ workspace_id: string | null;
921
+ site_id: string | null;
922
+ project_fingerprint: string;
923
+ choices: {
924
+ install_sdk: boolean;
925
+ install_skill: boolean;
926
+ footer_badge: boolean;
927
+ } & {};
928
+ capabilities: {
929
+ framework: string;
930
+ package_manager: string;
931
+ install_packages: boolean;
932
+ initialize_sdk: boolean;
933
+ install_skill: boolean;
934
+ insert_footer: boolean;
935
+ source_review: boolean;
936
+ sample_read: boolean;
937
+ } & {
938
+ project_name?: string | undefined;
939
+ terminal?: ({
940
+ platform: string;
941
+ app: string;
942
+ } & {}) | undefined;
943
+ };
944
+ local_plan: ({
945
+ project_fingerprint: string;
946
+ choices_digest: string;
947
+ effects: import("./setup-wire.js").SetupEffect[];
948
+ } & {
949
+ manual_steps?: ({
950
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
951
+ code: string;
952
+ } & {})[] | undefined;
953
+ }) | null;
954
+ plan_digest: string | null;
955
+ commands: ({
956
+ operation_id: string;
957
+ sequence: number;
958
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
959
+ expected_revision: string;
960
+ input: import("./setup-wire.js").SetupEffect;
961
+ input_digest: string;
962
+ approval_digest: string;
963
+ status: "approved" | "manual" | "cancelled" | "failed" | "outcome_unknown" | "prepared" | "leased" | "running" | "succeeded";
964
+ executor_generation: number | null;
965
+ lease_generation: number;
966
+ lease_expires_at: string | null;
967
+ result: ({
968
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown";
969
+ } & {
970
+ verified?: boolean | undefined;
971
+ }) | null;
972
+ result_digest: string | null;
973
+ created_at: string;
974
+ started_at: string | null;
975
+ finished_at: string | null;
976
+ updated_at: string;
977
+ } & {})[];
978
+ executor_generation: number;
979
+ connection: string;
980
+ heartbeat_at: string | null;
981
+ sample: {
982
+ status: string;
983
+ first_received_at: string | null;
984
+ latest_received_at: string | null;
985
+ latest_request_id: string | null;
986
+ } & {};
987
+ draft_outcomes: ({
988
+ candidate_id: string;
989
+ status: string;
990
+ prompt_id: string;
991
+ request_id: string;
992
+ revision: string | null;
993
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown" | null;
994
+ } & {})[];
995
+ bound_at: string;
996
+ last_activity_at: string;
997
+ idle_expires_at: string;
998
+ absolute_expires_at: string;
999
+ terminal_at: string | null;
1000
+ schema_version: 1;
1001
+ setup_id: string;
1002
+ } & {
1003
+ source?: ({
1004
+ preparation_id: string;
1005
+ status: string;
1006
+ packet_digest: string;
1007
+ provider_fingerprint: string;
1008
+ authorized_at: string | null;
1009
+ expires_at: string;
1010
+ error_code: "operation_failed" | "planning_unavailable" | "planning_paused" | "planning_daily_budget" | "planning_allowance_exhausted" | "planning_provider_unavailable" | "planning_policy_changed" | "planning_consent_expired" | "planning_input_budget" | "planning_invalid_output" | "planning_timeout" | "source_changed" | "source_unavailable" | "recommendations_no_source" | null;
1011
+ } & {}) | null | undefined;
1012
+ recommendation_digest?: string | null | undefined;
1013
+ selected_candidates?: string[] | undefined;
1014
+ }>;
1015
+ heartbeat(input: unknown): Promise<{
1016
+ phase: "expired" | "cancelled" | "analyzing" | "configuring" | "awaiting_local_approval" | "applying" | "ready_for_recommendations" | "selecting_drafts" | "creating_drafts" | "agent_test" | "complete";
1017
+ revision: string;
1018
+ workspace_id: string | null;
1019
+ site_id: string | null;
1020
+ project_fingerprint: string;
1021
+ choices: {
1022
+ install_sdk: boolean;
1023
+ install_skill: boolean;
1024
+ footer_badge: boolean;
1025
+ } & {};
1026
+ capabilities: {
1027
+ framework: string;
1028
+ package_manager: string;
1029
+ install_packages: boolean;
1030
+ initialize_sdk: boolean;
1031
+ install_skill: boolean;
1032
+ insert_footer: boolean;
1033
+ source_review: boolean;
1034
+ sample_read: boolean;
1035
+ } & {
1036
+ project_name?: string | undefined;
1037
+ terminal?: ({
1038
+ platform: string;
1039
+ app: string;
1040
+ } & {}) | undefined;
1041
+ };
1042
+ local_plan: ({
1043
+ project_fingerprint: string;
1044
+ choices_digest: string;
1045
+ effects: import("./setup-wire.js").SetupEffect[];
1046
+ } & {
1047
+ manual_steps?: ({
1048
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
1049
+ code: string;
1050
+ } & {})[] | undefined;
1051
+ }) | null;
1052
+ plan_digest: string | null;
1053
+ commands: ({
1054
+ operation_id: string;
1055
+ sequence: number;
1056
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
1057
+ expected_revision: string;
1058
+ input: import("./setup-wire.js").SetupEffect;
1059
+ input_digest: string;
1060
+ approval_digest: string;
1061
+ status: "approved" | "manual" | "cancelled" | "failed" | "outcome_unknown" | "prepared" | "leased" | "running" | "succeeded";
1062
+ executor_generation: number | null;
1063
+ lease_generation: number;
1064
+ lease_expires_at: string | null;
1065
+ result: ({
1066
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown";
1067
+ } & {
1068
+ verified?: boolean | undefined;
1069
+ }) | null;
1070
+ result_digest: string | null;
1071
+ created_at: string;
1072
+ started_at: string | null;
1073
+ finished_at: string | null;
1074
+ updated_at: string;
1075
+ } & {})[];
1076
+ executor_generation: number;
1077
+ connection: string;
1078
+ heartbeat_at: string | null;
1079
+ sample: {
1080
+ status: string;
1081
+ first_received_at: string | null;
1082
+ latest_received_at: string | null;
1083
+ latest_request_id: string | null;
1084
+ } & {};
1085
+ draft_outcomes: ({
1086
+ candidate_id: string;
1087
+ status: string;
1088
+ prompt_id: string;
1089
+ request_id: string;
1090
+ revision: string | null;
1091
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown" | null;
1092
+ } & {})[];
1093
+ bound_at: string;
1094
+ last_activity_at: string;
1095
+ idle_expires_at: string;
1096
+ absolute_expires_at: string;
1097
+ terminal_at: string | null;
1098
+ schema_version: 1;
1099
+ setup_id: string;
1100
+ } & {
1101
+ source?: ({
1102
+ preparation_id: string;
1103
+ status: string;
1104
+ packet_digest: string;
1105
+ provider_fingerprint: string;
1106
+ authorized_at: string | null;
1107
+ expires_at: string;
1108
+ error_code: "operation_failed" | "planning_unavailable" | "planning_paused" | "planning_daily_budget" | "planning_allowance_exhausted" | "planning_provider_unavailable" | "planning_policy_changed" | "planning_consent_expired" | "planning_input_budget" | "planning_invalid_output" | "planning_timeout" | "source_changed" | "source_unavailable" | "recommendations_no_source" | null;
1109
+ } & {}) | null | undefined;
1110
+ recommendation_digest?: string | null | undefined;
1111
+ selected_candidates?: string[] | undefined;
1112
+ }>;
1113
+ reconcile(input: unknown): Promise<{
1114
+ phase: "expired" | "cancelled" | "analyzing" | "configuring" | "awaiting_local_approval" | "applying" | "ready_for_recommendations" | "selecting_drafts" | "creating_drafts" | "agent_test" | "complete";
1115
+ revision: string;
1116
+ workspace_id: string | null;
1117
+ site_id: string | null;
1118
+ project_fingerprint: string;
1119
+ choices: {
1120
+ install_sdk: boolean;
1121
+ install_skill: boolean;
1122
+ footer_badge: boolean;
1123
+ } & {};
1124
+ capabilities: {
1125
+ framework: string;
1126
+ package_manager: string;
1127
+ install_packages: boolean;
1128
+ initialize_sdk: boolean;
1129
+ install_skill: boolean;
1130
+ insert_footer: boolean;
1131
+ source_review: boolean;
1132
+ sample_read: boolean;
1133
+ } & {
1134
+ project_name?: string | undefined;
1135
+ terminal?: ({
1136
+ platform: string;
1137
+ app: string;
1138
+ } & {}) | undefined;
1139
+ };
1140
+ local_plan: ({
1141
+ project_fingerprint: string;
1142
+ choices_digest: string;
1143
+ effects: import("./setup-wire.js").SetupEffect[];
1144
+ } & {
1145
+ manual_steps?: ({
1146
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
1147
+ code: string;
1148
+ } & {})[] | undefined;
1149
+ }) | null;
1150
+ plan_digest: string | null;
1151
+ commands: ({
1152
+ operation_id: string;
1153
+ sequence: number;
1154
+ kind: "install_packages" | "initialize_sdk" | "install_skill" | "insert_footer";
1155
+ expected_revision: string;
1156
+ input: import("./setup-wire.js").SetupEffect;
1157
+ input_digest: string;
1158
+ approval_digest: string;
1159
+ status: "approved" | "manual" | "cancelled" | "failed" | "outcome_unknown" | "prepared" | "leased" | "running" | "succeeded";
1160
+ executor_generation: number | null;
1161
+ lease_generation: number;
1162
+ lease_expires_at: string | null;
1163
+ result: ({
1164
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown";
1165
+ } & {
1166
+ verified?: boolean | undefined;
1167
+ }) | null;
1168
+ result_digest: string | null;
1169
+ created_at: string;
1170
+ started_at: string | null;
1171
+ finished_at: string | null;
1172
+ updated_at: string;
1173
+ } & {})[];
1174
+ executor_generation: number;
1175
+ connection: string;
1176
+ heartbeat_at: string | null;
1177
+ sample: {
1178
+ status: string;
1179
+ first_received_at: string | null;
1180
+ latest_received_at: string | null;
1181
+ latest_request_id: string | null;
1182
+ } & {};
1183
+ draft_outcomes: ({
1184
+ candidate_id: string;
1185
+ status: string;
1186
+ prompt_id: string;
1187
+ request_id: string;
1188
+ revision: string | null;
1189
+ code: "cancelled" | "skipped" | "already_present" | "unsupported" | "operation_failed" | "verified" | "review_required" | "dependency_failed" | "outcome_unknown" | null;
1190
+ } & {})[];
1191
+ bound_at: string;
1192
+ last_activity_at: string;
1193
+ idle_expires_at: string;
1194
+ absolute_expires_at: string;
1195
+ terminal_at: string | null;
1196
+ schema_version: 1;
1197
+ setup_id: string;
1198
+ } & {
1199
+ source?: ({
1200
+ preparation_id: string;
1201
+ status: string;
1202
+ packet_digest: string;
1203
+ provider_fingerprint: string;
1204
+ authorized_at: string | null;
1205
+ expires_at: string;
1206
+ error_code: "operation_failed" | "planning_unavailable" | "planning_paused" | "planning_daily_budget" | "planning_allowance_exhausted" | "planning_provider_unavailable" | "planning_policy_changed" | "planning_consent_expired" | "planning_input_budget" | "planning_invalid_output" | "planning_timeout" | "source_changed" | "source_unavailable" | "recommendations_no_source" | null;
1207
+ } & {}) | null | undefined;
1208
+ recommendation_digest?: string | null | undefined;
1209
+ selected_candidates?: string[] | undefined;
1210
+ }>;
1211
+ sample(requestId?: string): Promise<{
1212
+ sample: true;
1213
+ dataset_version: "setup-sample-v1";
1214
+ received_at: string;
1215
+ answers: ({
1216
+ id: string;
1217
+ question: string;
1218
+ answer: string;
1219
+ } & {})[];
1220
+ schema_version: 1;
1221
+ setup_id: string;
1222
+ } & {}>;
1223
+ }