@userreason/cli 0.1.1 → 0.2.1

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