@treeseed/sdk 0.4.11 → 0.4.13

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.
@@ -1,9 +1,10 @@
1
- import { checkTreeseedProviderConnections } from '../operations/services/config-runtime.ts';
2
1
  import { resolveTreeseedWorkflowState } from '../workflow-state.ts';
3
- import type { TreeseedCloseInput, TreeseedConfigInput, TreeseedDestroyInput, TreeseedExportInput, TreeseedReleaseInput, TreeseedSaveInput, TreeseedStageInput, TreeseedSwitchInput, TreeseedTaskBranchMetadata, TreeseedWorkflowContext, TreeseedWorkflowDevInput, TreeseedWorkflowNextStep, TreeseedWorkflowOperationId, TreeseedWorkflowResult } from '../workflow.ts';
2
+ import { type TreeseedWorkflowRunCommand, type TreeseedWorkflowRunJournal } from './runs.ts';
3
+ import { type TreeseedWorkflowMode } from './session.ts';
4
+ import type { TreeseedCloseInput, TreeseedConfigInput, TreeseedDestroyInput, TreeseedExportInput, TreeseedReleaseInput, TreeseedRecoverInput, TreeseedResumeInput, TreeseedSaveInput, TreeseedStageInput, TreeseedSwitchInput, TreeseedTaskBranchMetadata, TreeseedWorkflowContext, TreeseedWorkflowDevInput, TreeseedWorkflowOperationId, TreeseedWorkflowResult } from '../workflow.ts';
4
5
  type WorkflowWrite = NonNullable<TreeseedWorkflowContext['write']>;
5
6
  type WorkflowStatePayload = ReturnType<typeof resolveTreeseedWorkflowState>;
6
- export type TreeseedWorkflowErrorCode = 'validation_failed' | 'merge_conflict' | 'missing_runtime_auth' | 'deployment_timeout' | 'confirmation_required' | 'unsupported_transport' | 'unsupported_state';
7
+ export type TreeseedWorkflowErrorCode = 'validation_failed' | 'merge_conflict' | 'missing_runtime_auth' | 'deployment_timeout' | 'confirmation_required' | 'unsupported_transport' | 'unsupported_state' | 'workflow_locked' | 'resume_unavailable' | 'workflow_contract_missing';
7
8
  export declare class TreeseedWorkflowError extends Error {
8
9
  code: TreeseedWorkflowErrorCode;
9
10
  operation: TreeseedWorkflowOperationId;
@@ -23,6 +24,24 @@ export type WorkflowOperationHelpers = {
23
24
  tasks: TreeseedTaskBranchMetadata[];
24
25
  }>>;
25
26
  };
27
+ type WorkflowRepoReport = {
28
+ name: string;
29
+ path: string;
30
+ branch: string | null;
31
+ dirty: boolean;
32
+ created: boolean;
33
+ resumed: boolean;
34
+ merged: boolean;
35
+ verified: boolean;
36
+ committed: boolean;
37
+ pushed: boolean;
38
+ deletedLocal: boolean;
39
+ deletedRemote: boolean;
40
+ tagName: string | null;
41
+ commitSha: string | null;
42
+ skippedReason: string | null;
43
+ publishWait: Record<string, unknown> | null;
44
+ };
26
45
  export declare function workflowStatus(helpers: WorkflowOperationHelpers): Promise<TreeseedWorkflowResult<import("../workflow-state.ts").TreeseedWorkflowState>>;
27
46
  export declare function workflowTasks(helpers: WorkflowOperationHelpers): Promise<TreeseedWorkflowResult<{
28
47
  tasks: TreeseedTaskBranchMetadata[];
@@ -31,8 +50,24 @@ export declare function workflowConfig(helpers: WorkflowOperationHelpers, input?
31
50
  mode: string;
32
51
  scopes: ("local" | "staging" | "prod")[];
33
52
  sync: "none" | "cloudflare" | "railway" | "github" | "all";
34
- configPath: string;
35
- keyPath: string;
53
+ secretsRevealed: boolean;
54
+ reports: {
55
+ scope: "local" | "staging" | "prod";
56
+ environment: {
57
+ scope: "local" | "staging" | "prod";
58
+ revealSecrets: boolean;
59
+ entries: any;
60
+ };
61
+ provider: {
62
+ scope: string;
63
+ ok: boolean;
64
+ checks: {
65
+ provider: any;
66
+ ready: any;
67
+ detail: any;
68
+ }[];
69
+ };
70
+ }[];
36
71
  repairs: import("../operations/services/config-runtime.ts").TreeseedRepairAction[];
37
72
  preflight: {
38
73
  ok: boolean;
@@ -68,189 +103,74 @@ export declare function workflowConfig(helpers: WorkflowOperationHelpers, input?
68
103
  actVerificationReady: any;
69
104
  remediation: string[];
70
105
  };
71
- context: import("../operations/services/config-runtime.ts").TreeseedCollectedConfigContext;
72
- result: {
73
- scopes: ("local" | "staging" | "prod")[];
74
- synced: Record<string, unknown>;
75
- initialized: Array<{
76
- scope: import("../operations/services/config-runtime.ts").TreeseedConfigScope;
77
- secrets: number;
78
- target: string;
79
- }>;
80
- connectionChecks: ReturnType<typeof checkTreeseedProviderConnections>[];
81
- validationByScope: Record<import("../operations/services/config-runtime.ts").TreeseedConfigScope, ReturnType<typeof import("../platform/environment.ts").validateTreeseedEnvironmentValues>>;
82
- readinessByScope: Record<import("../operations/services/config-runtime.ts").TreeseedConfigScope, {
83
- configured: boolean;
84
- provisioned: boolean;
85
- deployable: boolean;
86
- checks: Record<string, unknown>;
87
- }>;
88
- updated: {
89
- scope: import("../operations/services/config-runtime.ts").TreeseedConfigScope | "shared";
90
- id: string;
91
- reused: boolean;
92
- cleared: boolean;
93
- }[];
94
- envFiles: {
95
- envLocalPath: string;
96
- devVarsPath: string;
97
- } | null;
98
- };
99
- reports: {
100
- scope: "local" | "staging" | "prod";
101
- environment: {
102
- scope: "local" | "staging" | "prod";
103
- revealSecrets: boolean;
104
- entries: any;
105
- };
106
- provider: {
107
- scope: string;
108
- ok: boolean;
109
- checks: {
110
- provider: any;
111
- ready: any;
112
- detail: any;
113
- }[];
114
- };
115
- }[];
116
- state: import("../workflow-state.ts").TreeseedWorkflowState;
117
- readiness: {
118
- local: {
119
- ready: boolean;
120
- blockers: string[];
121
- warnings: string[];
122
- };
123
- staging: {
124
- ready: boolean;
125
- blockers: string[];
126
- warnings: string[];
127
- };
128
- prod: {
129
- ready: boolean;
130
- blockers: string[];
131
- warnings: string[];
132
- };
133
- };
134
106
  } & {
135
- finalState: WorkflowStatePayload;
136
- }> | {
137
- ok: true;
138
- operation: "config";
139
- payload: {
140
- mode: string;
141
- scopes: ("local" | "staging" | "prod")[];
142
- sync: "none" | "cloudflare" | "railway" | "github" | "all";
143
- secretsRevealed: boolean;
144
- reports: {
145
- scope: "local" | "staging" | "prod";
146
- environment: {
147
- scope: "local" | "staging" | "prod";
148
- revealSecrets: boolean;
149
- entries: any;
150
- };
151
- provider: {
152
- scope: string;
153
- ok: boolean;
154
- checks: {
155
- provider: any;
156
- ready: any;
157
- detail: any;
158
- }[];
159
- };
160
- }[];
161
- repairs: import("../operations/services/config-runtime.ts").TreeseedRepairAction[];
162
- preflight: {
163
- ok: boolean;
164
- requireAuth: boolean;
165
- missingCommands: string[];
166
- failingAuth: string[];
167
- checks: {
168
- commands: {
169
- [k: string]: {
170
- installed: boolean;
171
- path: string | null;
172
- };
107
+ finalState?: WorkflowStatePayload;
108
+ }> | TreeseedWorkflowResult<{
109
+ mode: string;
110
+ scopes: ("local" | "staging" | "prod")[];
111
+ sync: "none" | "cloudflare" | "railway" | "github" | "all";
112
+ keyPath: string;
113
+ repairs: import("../operations/services/config-runtime.ts").TreeseedRepairAction[];
114
+ preflight: {
115
+ ok: boolean;
116
+ requireAuth: boolean;
117
+ missingCommands: string[];
118
+ failingAuth: string[];
119
+ checks: {
120
+ commands: {
121
+ [k: string]: {
122
+ installed: boolean;
123
+ path: string | null;
173
124
  };
174
- auth: {};
175
125
  };
126
+ auth: {};
176
127
  };
177
- toolHealth: {
178
- githubCli: {
179
- name: any;
180
- available: any;
181
- detail: any;
182
- };
183
- ghActExtension: {
184
- name: any;
185
- available: any;
186
- detail: any;
187
- };
188
- dockerDaemon: {
189
- name: any;
190
- available: any;
191
- detail: any;
192
- };
193
- actVerificationReady: any;
194
- remediation: string[];
195
- };
196
- keyPath?: undefined;
197
128
  };
198
- nextSteps: TreeseedWorkflowNextStep[];
199
- } | {
200
- ok: true;
201
- operation: "config";
202
- payload: {
203
- mode: string;
204
- scopes: ("local" | "staging" | "prod")[];
205
- sync: "none" | "cloudflare" | "railway" | "github" | "all";
206
- keyPath: string;
207
- repairs: import("../operations/services/config-runtime.ts").TreeseedRepairAction[];
208
- preflight: {
209
- ok: boolean;
210
- requireAuth: boolean;
211
- missingCommands: string[];
212
- failingAuth: string[];
213
- checks: {
214
- commands: {
215
- [k: string]: {
216
- installed: boolean;
217
- path: string | null;
218
- };
219
- };
220
- auth: {};
221
- };
129
+ toolHealth: {
130
+ githubCli: {
131
+ name: any;
132
+ available: any;
133
+ detail: any;
222
134
  };
223
- toolHealth: {
224
- githubCli: {
225
- name: any;
226
- available: any;
227
- detail: any;
228
- };
229
- ghActExtension: {
230
- name: any;
231
- available: any;
232
- detail: any;
233
- };
234
- dockerDaemon: {
235
- name: any;
236
- available: any;
237
- detail: any;
238
- };
239
- actVerificationReady: any;
240
- remediation: string[];
135
+ ghActExtension: {
136
+ name: any;
137
+ available: any;
138
+ detail: any;
241
139
  };
242
- secretsRevealed?: undefined;
243
- reports?: undefined;
140
+ dockerDaemon: {
141
+ name: any;
142
+ available: any;
143
+ detail: any;
144
+ };
145
+ actVerificationReady: any;
146
+ remediation: string[];
244
147
  };
245
- nextSteps: TreeseedWorkflowNextStep[];
246
- }>;
148
+ } & {
149
+ finalState?: WorkflowStatePayload;
150
+ }>>;
247
151
  export declare function workflowExport(helpers: WorkflowOperationHelpers, input?: TreeseedExportInput): Promise<TreeseedWorkflowResult<import("../operations/services/export-runtime.ts").TreeseedExportResult & {
248
- finalState: WorkflowStatePayload;
152
+ finalState?: WorkflowStatePayload;
249
153
  }>>;
250
154
  export declare function workflowSwitch(helpers: WorkflowOperationHelpers, input: TreeseedSwitchInput): Promise<TreeseedWorkflowResult<{
155
+ mode: TreeseedWorkflowMode;
156
+ branchName: string;
157
+ rootRepo: WorkflowRepoReport;
158
+ repos: WorkflowRepoReport[];
159
+ previewRequested: boolean;
160
+ blockers: string[];
161
+ plannedSteps: {
162
+ id: string;
163
+ description: string;
164
+ }[];
165
+ } & {
166
+ finalState?: WorkflowStatePayload;
167
+ }> | TreeseedWorkflowResult<{
168
+ mode: TreeseedWorkflowMode;
251
169
  branchName: string;
252
170
  created: boolean;
253
171
  resumed: boolean;
172
+ repos: WorkflowRepoReport[];
173
+ rootRepo: WorkflowRepoReport;
254
174
  previewRequested: boolean;
255
175
  preview: {
256
176
  enabled: boolean;
@@ -263,7 +183,7 @@ export declare function workflowSwitch(helpers: WorkflowOperationHelpers, input:
263
183
  baseBranch: string;
264
184
  };
265
185
  } & {
266
- finalState: WorkflowStatePayload;
186
+ finalState?: WorkflowStatePayload;
267
187
  }>>;
268
188
  export declare function workflowDev(helpers: WorkflowOperationHelpers, input?: TreeseedWorkflowDevInput): Promise<TreeseedWorkflowResult<{
269
189
  watch: boolean;
@@ -284,7 +204,7 @@ export declare function workflowDev(helpers: WorkflowOperationHelpers, input?: T
284
204
  warnings: string[];
285
205
  };
286
206
  } & {
287
- finalState: WorkflowStatePayload;
207
+ finalState?: WorkflowStatePayload;
288
208
  }> | TreeseedWorkflowResult<{
289
209
  watch: boolean;
290
210
  background: boolean;
@@ -304,9 +224,25 @@ export declare function workflowDev(helpers: WorkflowOperationHelpers, input?: T
304
224
  warnings: string[];
305
225
  };
306
226
  } & {
307
- finalState: WorkflowStatePayload;
227
+ finalState?: WorkflowStatePayload;
308
228
  }>>;
309
229
  export declare function workflowSave(helpers: WorkflowOperationHelpers, input: TreeseedSaveInput): Promise<TreeseedWorkflowResult<{
230
+ mode: TreeseedWorkflowMode;
231
+ branch: string;
232
+ scope: string;
233
+ hotfix: boolean;
234
+ message: string;
235
+ repos: WorkflowRepoReport[];
236
+ rootRepo: WorkflowRepoReport;
237
+ blockers: string[];
238
+ plannedSteps: {
239
+ id: string;
240
+ description: string;
241
+ }[];
242
+ } & {
243
+ finalState?: WorkflowStatePayload;
244
+ }> | TreeseedWorkflowResult<{
245
+ mode: TreeseedWorkflowMode;
310
246
  branch: string;
311
247
  scope: string;
312
248
  hotfix: boolean;
@@ -321,16 +257,50 @@ export declare function workflowSave(helpers: WorkflowOperationHelpers, input: T
321
257
  createdRemoteBranch: boolean;
322
258
  conflicts: boolean;
323
259
  };
260
+ repos: WorkflowRepoReport[];
261
+ rootRepo: WorkflowRepoReport;
262
+ partialFailure: null;
324
263
  previewAction: Record<string, unknown>;
325
264
  mergeConflict: null;
326
265
  } & {
327
- finalState: WorkflowStatePayload;
266
+ finalState?: WorkflowStatePayload;
328
267
  }>>;
329
268
  export declare function workflowClose(helpers: WorkflowOperationHelpers, input: TreeseedCloseInput): Promise<TreeseedWorkflowResult<{
269
+ mode: TreeseedWorkflowMode;
270
+ branchName: string | null;
271
+ message: string;
272
+ autoSaveRequired: boolean;
273
+ repos: WorkflowRepoReport[];
274
+ rootRepo: WorkflowRepoReport;
275
+ blockers: string[];
276
+ plannedSteps: {
277
+ id: string;
278
+ description: string;
279
+ }[];
280
+ } & {
281
+ finalState?: WorkflowStatePayload;
282
+ }> | TreeseedWorkflowResult<{
283
+ mode: TreeseedWorkflowMode;
330
284
  branchName: string;
331
285
  message: string;
332
286
  autoSaved: boolean;
333
287
  autoSaveResult: ({
288
+ mode: TreeseedWorkflowMode;
289
+ branch: string;
290
+ scope: string;
291
+ hotfix: boolean;
292
+ message: string;
293
+ repos: WorkflowRepoReport[];
294
+ rootRepo: WorkflowRepoReport;
295
+ blockers: string[];
296
+ plannedSteps: {
297
+ id: string;
298
+ description: string;
299
+ }[];
300
+ } & {
301
+ finalState?: WorkflowStatePayload;
302
+ }) | ({
303
+ mode: TreeseedWorkflowMode;
334
304
  branch: string;
335
305
  scope: string;
336
306
  hotfix: boolean;
@@ -345,15 +315,20 @@ export declare function workflowClose(helpers: WorkflowOperationHelpers, input:
345
315
  createdRemoteBranch: boolean;
346
316
  conflicts: boolean;
347
317
  };
318
+ repos: WorkflowRepoReport[];
319
+ rootRepo: WorkflowRepoReport;
320
+ partialFailure: null;
348
321
  previewAction: Record<string, unknown>;
349
322
  mergeConflict: null;
350
323
  } & {
351
- finalState: WorkflowStatePayload;
324
+ finalState?: WorkflowStatePayload;
352
325
  }) | null;
353
326
  deprecatedTag: {
354
327
  tagName: string;
355
328
  head: string;
356
329
  };
330
+ repos: WorkflowRepoReport[];
331
+ rootRepo: WorkflowRepoReport;
357
332
  previewCleanup: {
358
333
  performed: boolean;
359
334
  state: any;
@@ -364,14 +339,48 @@ export declare function workflowClose(helpers: WorkflowOperationHelpers, input:
364
339
  localDeleted: boolean;
365
340
  finalBranch: string;
366
341
  } & {
367
- finalState: WorkflowStatePayload;
342
+ finalState?: WorkflowStatePayload;
368
343
  }>>;
369
344
  export declare function workflowStage(helpers: WorkflowOperationHelpers, input: TreeseedStageInput): Promise<TreeseedWorkflowResult<{
345
+ mode: TreeseedWorkflowMode;
346
+ branchName: string | null;
347
+ mergeTarget: string;
348
+ mergeStrategy: string;
349
+ message: string;
350
+ autoSaveRequired: boolean;
351
+ blockers: string[];
352
+ rootRepo: WorkflowRepoReport;
353
+ repos: WorkflowRepoReport[];
354
+ plannedSteps: {
355
+ id: string;
356
+ description: string;
357
+ }[];
358
+ } & {
359
+ finalState?: WorkflowStatePayload;
360
+ }> | TreeseedWorkflowResult<{
361
+ mode: TreeseedWorkflowMode;
370
362
  branchName: string;
371
363
  mergeTarget: string;
364
+ mergeStrategy: string;
372
365
  message: string;
373
366
  autoSaved: boolean;
374
367
  autoSaveResult: ({
368
+ mode: TreeseedWorkflowMode;
369
+ branch: string;
370
+ scope: string;
371
+ hotfix: boolean;
372
+ message: string;
373
+ repos: WorkflowRepoReport[];
374
+ rootRepo: WorkflowRepoReport;
375
+ blockers: string[];
376
+ plannedSteps: {
377
+ id: string;
378
+ description: string;
379
+ }[];
380
+ } & {
381
+ finalState?: WorkflowStatePayload;
382
+ }) | ({
383
+ mode: TreeseedWorkflowMode;
375
384
  branch: string;
376
385
  scope: string;
377
386
  hotfix: boolean;
@@ -386,15 +395,20 @@ export declare function workflowStage(helpers: WorkflowOperationHelpers, input:
386
395
  createdRemoteBranch: boolean;
387
396
  conflicts: boolean;
388
397
  };
398
+ repos: WorkflowRepoReport[];
399
+ rootRepo: WorkflowRepoReport;
400
+ partialFailure: null;
389
401
  previewAction: Record<string, unknown>;
390
402
  mergeConflict: null;
391
403
  } & {
392
- finalState: WorkflowStatePayload;
404
+ finalState?: WorkflowStatePayload;
393
405
  }) | null;
394
406
  deprecatedTag: {
395
407
  tagName: string;
396
408
  head: string;
397
409
  };
410
+ repos: WorkflowRepoReport[];
411
+ rootRepo: WorkflowRepoReport;
398
412
  stagingWait: {
399
413
  status: string;
400
414
  reason: string;
@@ -414,9 +428,28 @@ export declare function workflowStage(helpers: WorkflowOperationHelpers, input:
414
428
  localDeleted: boolean;
415
429
  finalBranch: string;
416
430
  } & {
417
- finalState: WorkflowStatePayload;
431
+ finalState?: WorkflowStatePayload;
418
432
  }>>;
419
433
  export declare function workflowRelease(helpers: WorkflowOperationHelpers, input: TreeseedReleaseInput): Promise<TreeseedWorkflowResult<{
434
+ mode: TreeseedWorkflowMode;
435
+ mergeStrategy: string;
436
+ level: "patch" | "major" | "minor";
437
+ stagingBranch: string;
438
+ productionBranch: string;
439
+ packageSelection: import("./session.ts").TreeseedWorkflowPackageSelection;
440
+ plannedVersions: any;
441
+ repos: WorkflowRepoReport[];
442
+ rootRepo: WorkflowRepoReport;
443
+ plannedSteps: {
444
+ id: string;
445
+ description: string;
446
+ }[];
447
+ blockers: string[];
448
+ } & {
449
+ finalState?: WorkflowStatePayload;
450
+ }> | TreeseedWorkflowResult<{
451
+ mode: "root-only";
452
+ mergeStrategy: string;
420
453
  level: "patch" | "major" | "minor";
421
454
  rootVersion: string;
422
455
  releaseTag: string;
@@ -424,6 +457,14 @@ export declare function workflowRelease(helpers: WorkflowOperationHelpers, input
424
457
  stagingBranch: string;
425
458
  productionBranch: string;
426
459
  touchedPackages: unknown[];
460
+ packageSelection: {
461
+ changed: never[];
462
+ dependents: never[];
463
+ selected: never[];
464
+ };
465
+ publishWait: never[];
466
+ repos: never[];
467
+ rootRepo: WorkflowRepoReport;
427
468
  finalBranch: string;
428
469
  pushStatus: {
429
470
  stagingPushed: boolean;
@@ -431,91 +472,301 @@ export declare function workflowRelease(helpers: WorkflowOperationHelpers, input
431
472
  tagPushed: boolean;
432
473
  };
433
474
  } & {
434
- finalState: WorkflowStatePayload;
475
+ finalState?: WorkflowStatePayload;
476
+ }> | TreeseedWorkflowResult<{
477
+ mode: "recursive-workspace";
478
+ mergeStrategy: string;
479
+ level: "patch" | "major" | "minor";
480
+ rootVersion: string;
481
+ releaseTag: string;
482
+ releasedCommit: string;
483
+ stagingBranch: string;
484
+ productionBranch: string;
485
+ touchedPackages: string[];
486
+ packageSelection: import("./session.ts").TreeseedWorkflowPackageSelection;
487
+ publishWait: Record<string, unknown>[];
488
+ repos: WorkflowRepoReport[];
489
+ rootRepo: WorkflowRepoReport;
490
+ finalBranch: string;
491
+ pushStatus: {
492
+ stagingPushed: boolean;
493
+ productionPushed: boolean;
494
+ tagPushed: boolean;
495
+ };
496
+ } & {
497
+ finalState?: WorkflowStatePayload;
435
498
  }>>;
436
- export declare function workflowDestroy(helpers: WorkflowOperationHelpers, input: TreeseedDestroyInput): Promise<{
437
- ok: boolean;
438
- operation: string;
439
- payload: {
499
+ export declare function workflowResume(helpers: WorkflowOperationHelpers, input: TreeseedResumeInput): Promise<TreeseedWorkflowResult<{
500
+ mode: TreeseedWorkflowMode;
501
+ branch: string;
502
+ scope: string;
503
+ hotfix: boolean;
504
+ message: string;
505
+ repos: WorkflowRepoReport[];
506
+ rootRepo: WorkflowRepoReport;
507
+ blockers: string[];
508
+ plannedSteps: {
509
+ id: string;
510
+ description: string;
511
+ }[];
512
+ } & {
513
+ finalState?: WorkflowStatePayload;
514
+ }> | TreeseedWorkflowResult<{
515
+ mode: TreeseedWorkflowMode;
516
+ branch: string;
517
+ scope: string;
518
+ hotfix: boolean;
519
+ message: string;
520
+ commitSha: string;
521
+ commitCreated: boolean;
522
+ noChanges: boolean;
523
+ branchSync: {
524
+ remoteBranchExisted: boolean;
525
+ pulledRebase: boolean;
526
+ pushed: boolean;
527
+ createdRemoteBranch: boolean;
528
+ conflicts: boolean;
529
+ };
530
+ repos: WorkflowRepoReport[];
531
+ rootRepo: WorkflowRepoReport;
532
+ partialFailure: null;
533
+ previewAction: Record<string, unknown>;
534
+ mergeConflict: null;
535
+ } & {
536
+ finalState?: WorkflowStatePayload;
537
+ }> | TreeseedWorkflowResult<{
538
+ mode: TreeseedWorkflowMode;
539
+ branchName: string;
540
+ rootRepo: WorkflowRepoReport;
541
+ repos: WorkflowRepoReport[];
542
+ previewRequested: boolean;
543
+ blockers: string[];
544
+ plannedSteps: {
545
+ id: string;
546
+ description: string;
547
+ }[];
548
+ } & {
549
+ finalState?: WorkflowStatePayload;
550
+ }> | TreeseedWorkflowResult<{
551
+ mode: TreeseedWorkflowMode;
552
+ branchName: string;
553
+ created: boolean;
554
+ resumed: boolean;
555
+ repos: WorkflowRepoReport[];
556
+ rootRepo: WorkflowRepoReport;
557
+ previewRequested: boolean;
558
+ preview: {
559
+ enabled: boolean;
560
+ url: string | null;
561
+ lastDeploymentTimestamp: string | null;
562
+ };
563
+ previewResult: Record<string, unknown> | null;
564
+ preconditions: {
565
+ cleanWorktreeRequired: boolean;
566
+ baseBranch: string;
567
+ };
568
+ } & {
569
+ finalState?: WorkflowStatePayload;
570
+ }> | TreeseedWorkflowResult<{
571
+ mode: TreeseedWorkflowMode;
572
+ branchName: string | null;
573
+ message: string;
574
+ autoSaveRequired: boolean;
575
+ repos: WorkflowRepoReport[];
576
+ rootRepo: WorkflowRepoReport;
577
+ blockers: string[];
578
+ plannedSteps: {
579
+ id: string;
580
+ description: string;
581
+ }[];
582
+ } & {
583
+ finalState?: WorkflowStatePayload;
584
+ }> | TreeseedWorkflowResult<{
585
+ mode: TreeseedWorkflowMode;
586
+ branchName: string;
587
+ message: string;
588
+ autoSaved: boolean;
589
+ autoSaveResult: ({
590
+ mode: TreeseedWorkflowMode;
591
+ branch: string;
440
592
  scope: string;
441
- dryRun: boolean;
442
- force: boolean;
443
- destroyRemote: boolean;
444
- destroyLocal: boolean;
445
- removeBuildArtifacts: boolean;
446
- expectedConfirmation: string;
447
- stateSummary: {
448
- workerName: any;
449
- lastDeploymentTimestamp: any;
593
+ hotfix: boolean;
594
+ message: string;
595
+ repos: WorkflowRepoReport[];
596
+ rootRepo: WorkflowRepoReport;
597
+ blockers: string[];
598
+ plannedSteps: {
599
+ id: string;
600
+ description: string;
601
+ }[];
602
+ } & {
603
+ finalState?: WorkflowStatePayload;
604
+ }) | ({
605
+ mode: TreeseedWorkflowMode;
606
+ branch: string;
607
+ scope: string;
608
+ hotfix: boolean;
609
+ message: string;
610
+ commitSha: string;
611
+ commitCreated: boolean;
612
+ noChanges: boolean;
613
+ branchSync: {
614
+ remoteBranchExisted: boolean;
615
+ pulledRebase: boolean;
616
+ pushed: boolean;
617
+ createdRemoteBranch: boolean;
618
+ conflicts: boolean;
450
619
  };
451
- remoteResult: {
452
- target: {
453
- kind: string;
454
- scope: string;
455
- } | {
456
- kind: string;
457
- branchName: string;
458
- };
459
- summary: {
460
- target: any;
461
- workerName: any;
462
- siteUrl: any;
463
- accountId: any;
464
- pages: any;
465
- formGuardKv: any;
466
- sessionKv: any;
467
- siteDataDb: any;
468
- queue: any;
469
- content: any;
470
- };
471
- operations: {
472
- worker: {
473
- status: string;
474
- name: any;
475
- };
476
- formGuard: {
477
- status: string;
478
- id: any;
479
- preview?: undefined;
480
- } | {
481
- status: string;
482
- id: any;
483
- preview: boolean;
484
- };
485
- formGuardPreview: {
486
- status: string;
487
- id: any;
488
- preview?: undefined;
489
- } | {
490
- status: string;
491
- id: any;
492
- preview: boolean;
493
- } | null;
494
- session: {
495
- status: string;
496
- id: any;
497
- preview?: undefined;
498
- } | {
499
- status: string;
500
- id: any;
501
- preview: boolean;
502
- };
503
- sessionPreview: {
504
- status: string;
505
- id: any;
506
- preview?: undefined;
507
- } | {
508
- status: string;
509
- id: any;
510
- preview: boolean;
511
- } | null;
512
- database: {
513
- status: string;
514
- name: any;
515
- };
516
- };
620
+ repos: WorkflowRepoReport[];
621
+ rootRepo: WorkflowRepoReport;
622
+ partialFailure: null;
623
+ previewAction: Record<string, unknown>;
624
+ mergeConflict: null;
625
+ } & {
626
+ finalState?: WorkflowStatePayload;
627
+ }) | null;
628
+ deprecatedTag: {
629
+ tagName: string;
630
+ head: string;
631
+ };
632
+ repos: WorkflowRepoReport[];
633
+ rootRepo: WorkflowRepoReport;
634
+ previewCleanup: {
635
+ performed: boolean;
636
+ state: any;
637
+ } | {
638
+ performed: boolean;
639
+ };
640
+ remoteDeleted: boolean;
641
+ localDeleted: boolean;
642
+ finalBranch: string;
643
+ } & {
644
+ finalState?: WorkflowStatePayload;
645
+ }> | TreeseedWorkflowResult<{
646
+ mode: TreeseedWorkflowMode;
647
+ mergeStrategy: string;
648
+ level: "patch" | "major" | "minor";
649
+ stagingBranch: string;
650
+ productionBranch: string;
651
+ packageSelection: import("./session.ts").TreeseedWorkflowPackageSelection;
652
+ plannedVersions: any;
653
+ repos: WorkflowRepoReport[];
654
+ rootRepo: WorkflowRepoReport;
655
+ plannedSteps: {
656
+ id: string;
657
+ description: string;
658
+ }[];
659
+ blockers: string[];
660
+ } & {
661
+ finalState?: WorkflowStatePayload;
662
+ }> | TreeseedWorkflowResult<{
663
+ mode: "root-only";
664
+ mergeStrategy: string;
665
+ level: "patch" | "major" | "minor";
666
+ rootVersion: string;
667
+ releaseTag: string;
668
+ releasedCommit: string;
669
+ stagingBranch: string;
670
+ productionBranch: string;
671
+ touchedPackages: unknown[];
672
+ packageSelection: {
673
+ changed: never[];
674
+ dependents: never[];
675
+ selected: never[];
676
+ };
677
+ publishWait: never[];
678
+ repos: never[];
679
+ rootRepo: WorkflowRepoReport;
680
+ finalBranch: string;
681
+ pushStatus: {
682
+ stagingPushed: boolean;
683
+ productionPushed: boolean;
684
+ tagPushed: boolean;
685
+ };
686
+ } & {
687
+ finalState?: WorkflowStatePayload;
688
+ }> | TreeseedWorkflowResult<{
689
+ mode: "recursive-workspace";
690
+ mergeStrategy: string;
691
+ level: "patch" | "major" | "minor";
692
+ rootVersion: string;
693
+ releaseTag: string;
694
+ releasedCommit: string;
695
+ stagingBranch: string;
696
+ productionBranch: string;
697
+ touchedPackages: string[];
698
+ packageSelection: import("./session.ts").TreeseedWorkflowPackageSelection;
699
+ publishWait: Record<string, unknown>[];
700
+ repos: WorkflowRepoReport[];
701
+ rootRepo: WorkflowRepoReport;
702
+ finalBranch: string;
703
+ pushStatus: {
704
+ stagingPushed: boolean;
705
+ productionPushed: boolean;
706
+ tagPushed: boolean;
707
+ };
708
+ } & {
709
+ finalState?: WorkflowStatePayload;
710
+ }> | TreeseedWorkflowResult<{
711
+ dryRun: boolean;
712
+ remoteResult: Record<string, unknown> | null;
713
+ scope: string;
714
+ force: boolean;
715
+ destroyRemote: boolean;
716
+ destroyLocal: boolean;
717
+ removeBuildArtifacts: boolean;
718
+ expectedConfirmation: string;
719
+ stateSummary: {
720
+ workerName: any;
721
+ lastDeploymentTimestamp: any;
722
+ };
723
+ plannedSteps: {
724
+ id: string;
725
+ description: string;
726
+ }[];
727
+ } & {
728
+ finalState?: WorkflowStatePayload;
729
+ }>>;
730
+ export declare function workflowRecover(helpers: WorkflowOperationHelpers, input?: TreeseedRecoverInput): Promise<TreeseedWorkflowResult<{
731
+ lock: import("./runs.ts").TreeseedWorkflowLockInspection;
732
+ interruptedRuns: {
733
+ runId: string;
734
+ command: TreeseedWorkflowRunCommand;
735
+ status: import("./runs.ts").TreeseedWorkflowRunStatus;
736
+ createdAt: string;
737
+ updatedAt: string;
738
+ nextStep: string | null;
739
+ failure: {
740
+ code: string;
741
+ message: string;
742
+ details: Record<string, unknown> | null;
743
+ at: string;
517
744
  } | null;
745
+ resumeCommand: string;
746
+ }[];
747
+ selectedRun: TreeseedWorkflowRunJournal | null;
748
+ runCount: number;
749
+ } & {
750
+ finalState?: WorkflowStatePayload;
751
+ }>>;
752
+ export declare function workflowDestroy(helpers: WorkflowOperationHelpers, input: TreeseedDestroyInput): Promise<TreeseedWorkflowResult<{
753
+ dryRun: boolean;
754
+ remoteResult: Record<string, unknown> | null;
755
+ scope: string;
756
+ force: boolean;
757
+ destroyRemote: boolean;
758
+ destroyLocal: boolean;
759
+ removeBuildArtifacts: boolean;
760
+ expectedConfirmation: string;
761
+ stateSummary: {
762
+ workerName: any;
763
+ lastDeploymentTimestamp: any;
518
764
  };
519
- nextSteps: TreeseedWorkflowNextStep[];
520
- }>;
765
+ plannedSteps: {
766
+ id: string;
767
+ description: string;
768
+ }[];
769
+ } & {
770
+ finalState?: WorkflowStatePayload;
771
+ }>>;
521
772
  export {};