@treeseed/sdk 0.8.3 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/capacity.d.ts +33 -0
  2. package/dist/fixture-support.d.ts +1 -1
  3. package/dist/fixture-support.js +5 -5
  4. package/dist/managed-dependencies.js +132 -10
  5. package/dist/operations/services/bootstrap-runner.js +7 -1
  6. package/dist/operations/services/config-runtime.js +13 -4
  7. package/dist/operations/services/github-actions-verification.d.ts +3 -0
  8. package/dist/operations/services/github-actions-verification.js +3 -0
  9. package/dist/operations/services/github-api.d.ts +4 -1
  10. package/dist/operations/services/github-api.js +26 -8
  11. package/dist/operations/services/github-automation.d.ts +14 -5
  12. package/dist/operations/services/github-automation.js +45 -11
  13. package/dist/operations/services/hub-provider-launch.js +9 -8
  14. package/dist/operations/services/project-platform.d.ts +93 -210
  15. package/dist/operations/services/project-platform.js +74 -34
  16. package/dist/operations/services/railway-deploy.d.ts +25 -2
  17. package/dist/operations/services/railway-deploy.js +312 -20
  18. package/dist/operations/services/repository-save-orchestrator.d.ts +8 -0
  19. package/dist/operations/services/repository-save-orchestrator.js +40 -3
  20. package/dist/operations/services/runtime-paths.d.ts +1 -0
  21. package/dist/operations/services/runtime-paths.js +3 -1
  22. package/dist/operations/services/runtime-tools.d.ts +1 -0
  23. package/dist/operations/services/runtime-tools.js +2 -0
  24. package/dist/operations/services/template-registry.js +3 -0
  25. package/dist/platform/contracts.d.ts +9 -0
  26. package/dist/platform/deploy-config.js +28 -0
  27. package/dist/platform/env.yaml +1 -745
  28. package/dist/platform/environment.js +69 -9
  29. package/dist/reconcile/builtin-adapters.js +7 -2
  30. package/dist/scripts/install-managed-dependencies.js +12 -0
  31. package/dist/scripts/tenant-workflow-action.js +11 -9
  32. package/dist/scripts/test-scaffold.js +3 -1
  33. package/dist/scripts/workflow-commands.test.js +10 -6
  34. package/dist/scripts/workspace-command-e2e.js +1 -1
  35. package/dist/treeseed/template-catalog/templates/starter-basic/template/package.json +1 -0
  36. package/dist/treeseed/template-catalog/templates/starter-basic/template/src/api/server.js +1 -1
  37. package/dist/treeseed/template-catalog/templates/starter-basic/template/treeseed.site.yaml +7 -6
  38. package/dist/treeseed/template-catalog/templates/starter-basic/template.config.json +6 -0
  39. package/dist/workflow/operations.d.ts +41 -8
  40. package/dist/workflow/operations.js +119 -24
  41. package/dist/workflow/runs.js +31 -0
  42. package/package.json +1 -1
  43. package/templates/github/deploy-processing.workflow.yml +115 -0
  44. package/templates/github/deploy-web.workflow.yml +111 -0
  45. package/templates/github/hosted-project.workflow.yml +4 -4
  46. package/templates/github/deploy.managed.workflow.yml +0 -208
  47. package/templates/github/deploy.workflow.yml +0 -746
@@ -26,15 +26,28 @@ const TREESEED_ENVIRONMENT_STORAGE = ["scoped", "shared"];
26
26
  const TREESEED_CONFIG_STARTUP_PROFILES = ["core", "optional", "advanced"];
27
27
  const TREESEED_ENVIRONMENT_VISIBILITY = ["user", "system"];
28
28
  const moduleDir = dirname(fileURLToPath(import.meta.url));
29
- function resolveCoreEnvironmentPath() {
29
+ function firstExistingPath(candidates) {
30
+ return candidates.find((candidate) => existsSync(candidate)) ?? candidates[0];
31
+ }
32
+ function resolveSdkEnvironmentPath() {
30
33
  const candidates = [
31
34
  resolve(moduleDir, "env.yaml"),
32
35
  resolve(moduleDir, "../src/platform/env.yaml"),
33
36
  resolve(moduleDir, "../dist/platform/env.yaml")
34
37
  ];
35
- return candidates.find((candidate) => existsSync(candidate)) ?? candidates[0];
36
- }
37
- const CORE_ENVIRONMENT_PATH = resolveCoreEnvironmentPath();
38
+ return firstExistingPath(candidates);
39
+ }
40
+ function resolveSiblingPackageEnvironmentPath(packageDir) {
41
+ return firstExistingPath([
42
+ resolve(moduleDir, `../../../${packageDir}/src/env.yaml`),
43
+ resolve(moduleDir, `../../../${packageDir}/dist/env.yaml`),
44
+ resolve(moduleDir, `../../${packageDir}/src/env.yaml`),
45
+ resolve(moduleDir, `../../${packageDir}/dist/env.yaml`)
46
+ ]);
47
+ }
48
+ const SDK_ENVIRONMENT_PATH = resolveSdkEnvironmentPath();
49
+ const CORE_ENVIRONMENT_PATH = resolveSiblingPackageEnvironmentPath("core");
50
+ const AGENT_ENVIRONMENT_PATH = resolveSiblingPackageEnvironmentPath("agent");
38
51
  const TENANT_ENVIRONMENT_OVERLAY_PATH = "src/env.yaml";
39
52
  const DEFAULT_TREESEED_MARKET_BASE_URL = "https://api.treeseed.ai";
40
53
  function loadOptionalTenantConfig() {
@@ -53,19 +66,53 @@ function smtpEnabled(context) {
53
66
  function platformSurfaceEnabled(context, surface) {
54
67
  return context.deployConfig.surfaces?.[surface]?.enabled !== false;
55
68
  }
69
+ function activeWorkflowPlane() {
70
+ const plane = process.env.TREESEED_WORKFLOW_PLANE;
71
+ return plane === "web" || plane === "processing" ? plane : null;
72
+ }
73
+ function workflowPlaneAllows(plane) {
74
+ const activePlane = activeWorkflowPlane();
75
+ return activePlane === null || activePlane === plane;
76
+ }
56
77
  function managedServiceEnabled(context, service) {
57
78
  return context.deployConfig.services?.[service]?.enabled !== false;
58
79
  }
59
80
  function webSurfaceEnabled(context) {
81
+ if (!workflowPlaneAllows("web")) {
82
+ return false;
83
+ }
60
84
  return platformSurfaceEnabled(context, "web");
61
85
  }
62
86
  function apiSurfaceEnabled(context) {
63
- return platformSurfaceEnabled(context, "api") && managedServiceEnabled(context, "api");
87
+ if (!workflowPlaneAllows("processing")) {
88
+ return false;
89
+ }
90
+ const apiSurfaceExplicitlyEnabled = context.deployConfig.surfaces?.api?.enabled === true;
91
+ const apiServiceConfigured = context.deployConfig.services?.api != null && managedServiceEnabled(context, "api");
92
+ return (apiSurfaceExplicitlyEnabled || apiServiceConfigured) && managedServiceEnabled(context, "api");
93
+ }
94
+ function processingPlaneEnabled(context) {
95
+ if (!workflowPlaneAllows("processing")) {
96
+ return false;
97
+ }
98
+ const mode = context.deployConfig.processing?.mode ?? "market-assigned";
99
+ if (mode === "team-owned" || mode === "project-owned" || mode === "local") {
100
+ return true;
101
+ }
102
+ return Object.entries(context.deployConfig.services ?? {}).some(
103
+ ([service, config]) => ["api", "manager", "worker", "workerRunner", "workdayStart", "workdayReport"].includes(service) && config && config.enabled !== false
104
+ );
64
105
  }
65
106
  function formsEnabled(context) {
66
107
  return webSurfaceEnabled(context) && (context.deployConfig.providers?.forms ?? "store_only") !== "none";
67
108
  }
68
109
  function railwayManagedEnabled(context) {
110
+ if (!workflowPlaneAllows("processing")) {
111
+ return false;
112
+ }
113
+ if (!processingPlaneEnabled(context)) {
114
+ return false;
115
+ }
69
116
  if (context.deployConfig.runtime?.mode === "treeseed_managed") {
70
117
  return true;
71
118
  }
@@ -284,6 +331,7 @@ const PREDICATES = {
284
331
  smtpNonLocal: (context, scope) => smtpEnabled(context) && scope !== "local",
285
332
  webSurfaceEnabled: (context) => webSurfaceEnabled(context),
286
333
  apiSurfaceEnabled: (context) => apiSurfaceEnabled(context),
334
+ processingPlaneEnabled: (context) => processingPlaneEnabled(context),
287
335
  formsEnabled: (context) => formsEnabled(context),
288
336
  railwayManagedEnabled: (context) => railwayManagedEnabled(context),
289
337
  hubTreeseedHosted: (context) => resolveHubMode(context) === "treeseed_hosted",
@@ -395,11 +443,23 @@ function mergeEntryYaml(baseEntry, id, override) {
395
443
  }
396
444
  function collectOverlaySources(context) {
397
445
  const sources = [];
398
- const coreOverlay = readYamlOverlayIfPresent(CORE_ENVIRONMENT_PATH);
399
- if (!coreOverlay) {
400
- throw new Error(`Treeseed core environment registry file was not found at ${CORE_ENVIRONMENT_PATH}.`);
446
+ const sdkOverlay = readYamlOverlayIfPresent(SDK_ENVIRONMENT_PATH);
447
+ if (!sdkOverlay) {
448
+ throw new Error(`Treeseed SDK environment registry file was not found at ${SDK_ENVIRONMENT_PATH}.`);
449
+ }
450
+ sources.push({ label: SDK_ENVIRONMENT_PATH, overlay: sdkOverlay });
451
+ if (webSurfaceEnabled(context)) {
452
+ const coreOverlay = readYamlOverlayIfPresent(CORE_ENVIRONMENT_PATH);
453
+ if (coreOverlay) {
454
+ sources.push({ label: CORE_ENVIRONMENT_PATH, overlay: coreOverlay });
455
+ }
456
+ }
457
+ if (apiSurfaceEnabled(context) || processingPlaneEnabled(context)) {
458
+ const agentOverlay = readYamlOverlayIfPresent(AGENT_ENVIRONMENT_PATH);
459
+ if (agentOverlay) {
460
+ sources.push({ label: AGENT_ENVIRONMENT_PATH, overlay: agentOverlay });
461
+ }
401
462
  }
402
- sources.push({ label: CORE_ENVIRONMENT_PATH, overlay: coreOverlay });
403
463
  for (const pluginEntry of context.plugins) {
404
464
  const fileOverlay = readPluginEnvironmentOverlay(pluginEntry.baseDir);
405
465
  if (fileOverlay) {
@@ -1540,8 +1540,13 @@ function collectRailwayEnvironmentSync(input) {
1540
1540
  if (typeof values.CLOUDFLARE_ACCOUNT_ID === "string" && values.CLOUDFLARE_ACCOUNT_ID.length > 0) {
1541
1541
  variables.CLOUDFLARE_ACCOUNT_ID = values.CLOUDFLARE_ACCOUNT_ID;
1542
1542
  }
1543
- const apiD1DatabaseId = state.d1Databases?.SITE_DATA_DB?.databaseId;
1544
- if (typeof apiD1DatabaseId === "string" && apiD1DatabaseId.length > 0) {
1543
+ const siteDataDb = state.d1Databases?.SITE_DATA_DB;
1544
+ let apiD1DatabaseId = siteDataDb?.databaseId;
1545
+ if (!hasLiveResourceId(apiD1DatabaseId)) {
1546
+ const liveDatabase = findCloudflareD1ByName(input, buildCloudflareEnv(input), siteDataDb?.databaseName, { attempts: 3, delayMs: 250 });
1547
+ apiD1DatabaseId = liveDatabase?.uuid ?? liveDatabase?.id ?? apiD1DatabaseId;
1548
+ }
1549
+ if (hasLiveResourceId(apiD1DatabaseId)) {
1545
1550
  variables.TREESEED_API_D1_DATABASE_ID = apiD1DatabaseId;
1546
1551
  }
1547
1552
  return { scope, secrets, variables };
@@ -0,0 +1,12 @@
1
+ import { formatTreeseedDependencyFailureDetails, installTreeseedDependencies } from '../managed-dependencies.js';
2
+ const force = process.argv.includes('--force');
3
+ const result = await installTreeseedDependencies({
4
+ tenantRoot: process.cwd(),
5
+ force,
6
+ env: process.env,
7
+ });
8
+ process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
9
+ if (!result.ok) {
10
+ process.stderr.write(`Treeseed dependency initialization failed:\n- ${formatTreeseedDependencyFailureDetails(result)}\n`);
11
+ process.exit(1);
12
+ }
@@ -4,12 +4,11 @@ import { resolveScope, runProjectPlatformAction, } from '../operations/services/
4
4
  const tenantRoot = process.cwd();
5
5
  function parseArgs(argv) {
6
6
  const parsed = {
7
- action: 'deploy_code',
7
+ action: 'deploy_web',
8
8
  environment: null,
9
9
  projectId: null,
10
10
  previewId: null,
11
11
  dryRun: false,
12
- skipProvision: false,
13
12
  };
14
13
  const rest = [...argv];
15
14
  while (rest.length) {
@@ -17,11 +16,11 @@ function parseArgs(argv) {
17
16
  if (!current)
18
17
  continue;
19
18
  if (current === '--action') {
20
- parsed.action = (rest.shift() ?? parsed.action);
19
+ parsed.action = parseAction(rest.shift() ?? parsed.action);
21
20
  continue;
22
21
  }
23
22
  if (current.startsWith('--action=')) {
24
- parsed.action = (current.split('=', 2)[1] ?? parsed.action);
23
+ parsed.action = parseAction(current.split('=', 2)[1] ?? parsed.action);
25
24
  continue;
26
25
  }
27
26
  if (current === '--environment') {
@@ -52,16 +51,20 @@ function parseArgs(argv) {
52
51
  parsed.dryRun = true;
53
52
  continue;
54
53
  }
55
- if (current === '--skip-provision') {
56
- parsed.skipProvision = true;
57
- continue;
58
- }
59
54
  throw new Error(`Unknown workflow action argument: ${current}`);
60
55
  }
61
56
  return parsed;
62
57
  }
58
+ function parseAction(value) {
59
+ if (value === 'deploy_web' || value === 'deploy_processing' || value === 'publish_content' || value === 'monitor') {
60
+ return value;
61
+ }
62
+ throw new Error(`Unsupported workflow action "${value}". Expected deploy_web, deploy_processing, publish_content, or monitor.`);
63
+ }
63
64
  async function main() {
64
65
  const options = parseArgs(process.argv.slice(2));
66
+ process.env.TREESEED_WORKFLOW_ACTION = options.action;
67
+ process.env.TREESEED_WORKFLOW_PLANE ||= options.action === 'deploy_processing' ? 'processing' : 'web';
65
68
  const scope = resolveScope(options.environment);
66
69
  const result = await runProjectPlatformAction(options.action, {
67
70
  tenantRoot,
@@ -69,7 +72,6 @@ async function main() {
69
72
  projectId: options.projectId ?? process.env.TREESEED_PROJECT_ID ?? null,
70
73
  previewId: options.previewId,
71
74
  dryRun: options.dryRun,
72
- skipProvision: options.skipProvision,
73
75
  });
74
76
  if (result !== undefined) {
75
77
  process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
@@ -171,7 +171,9 @@ function linkTreeseedBins(siteRoot) {
171
171
  mkdirSync(binRoot, { recursive: true });
172
172
  for (const [name, relativeTarget] of [
173
173
  ['treeseed', '../@treeseed/cli/dist/cli/main.js'],
174
- ['treeseed-agents', '../@treeseed/core/dist/agents/cli.js'],
174
+ ['treeseed-agents', '../@treeseed/agent/dist/agents/cli.js'],
175
+ ['treeseed-agent-api', '../@treeseed/agent/dist/scripts/treeseed-agent-api.js'],
176
+ ['treeseed-agent-service', '../@treeseed/agent/dist/scripts/treeseed-agent-service.js'],
175
177
  ]) {
176
178
  symlinkSync(relativeTarget, resolve(binRoot, name));
177
179
  }
@@ -6,7 +6,7 @@ import {
6
6
  deployTargetLabel,
7
7
  loadDeployState,
8
8
  } from '../dist/scripts/deploy-lib.js';
9
- import { renderDeployWorkflow } from '../dist/scripts/github-automation-lib.js';
9
+ import { renderDeployProcessingWorkflow, renderDeployWebWorkflow } from '../dist/operations/services/github-automation.js';
10
10
  import { incrementVersion } from '../dist/scripts/workspace-save-lib.js';
11
11
  import { makeTenantRoot } from './cli-test-fixtures.js';
12
12
 
@@ -25,11 +25,15 @@ test('branch preview state derives branch-specific worker names', () => {
25
25
  assert.equal(state.previewEnabled, true);
26
26
  });
27
27
 
28
- test('deploy workflow targets staging and main branches', () => {
29
- const workflow = renderDeployWorkflow({ workingDirectory: '.' });
30
- assert.match(workflow, /- staging/);
31
- assert.match(workflow, /- main/);
32
- assert.match(workflow, /--environment \$\{\{ github\.ref_name == 'main' && 'prod' \|\| 'staging' \}\}/);
28
+ test('deploy workflows expose final web and processing actions', () => {
29
+ const webWorkflow = renderDeployWebWorkflow({ workingDirectory: '.' });
30
+ const processingWorkflow = renderDeployProcessingWorkflow({ workingDirectory: '.' });
31
+ assert.match(webWorkflow, /default: deploy_web/);
32
+ assert.match(webWorkflow, /- publish_content/);
33
+ assert.doesNotMatch(webWorkflow, /RAILWAY_API_TOKEN/);
34
+ assert.match(processingWorkflow, /default: deploy_processing/);
35
+ assert.match(processingWorkflow, /RAILWAY_API_TOKEN/);
36
+ assert.match(processingWorkflow, /TREESEED_CAPACITY_PROVIDER_ID/);
33
37
  });
34
38
 
35
39
  test('version bump utility supports major, minor, and patch', () => {
@@ -359,7 +359,7 @@ function cloneLocalWorkspace() {
359
359
  run('git', ['config', 'user.email', 'e2e@treeseed.dev'], { cwd: cloneRoot });
360
360
  const workflow = ensureDeployWorkflow(workingRoot);
361
361
  if (workflow.changed) {
362
- run('git', ['add', 'docs/.github/workflows/deploy.yml'], { cwd: cloneRoot });
362
+ run('git', ['add', 'docs/.github/workflows/deploy-web.yml'], { cwd: cloneRoot });
363
363
  run('git', ['commit', '-m', 'test: sync deploy workflow for no-op save guard'], { cwd: cloneRoot });
364
364
  }
365
365
  return {
@@ -26,6 +26,7 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@treeseed/cli": "__CLI_VERSION__",
29
+ "@treeseed/agent": "__AGENT_VERSION__",
29
30
  "@treeseed/core": "__CORE_VERSION__",
30
31
  "@treeseed/sdk": "__SDK_VERSION__",
31
32
  "yaml": "^2.8.1"
@@ -1,4 +1,4 @@
1
- import { createRailwayTreeseedApiServer } from '@treeseed/core/api';
1
+ import { createRailwayTreeseedApiServer } from '@treeseed/agent/api';
2
2
 
3
3
  const server = await createRailwayTreeseedApiServer();
4
4
  console.log(`Treeseed project API listening on ${server.url}`);
@@ -45,8 +45,9 @@ services:
45
45
  publicBaseUrl: https://__SITE_SLUG__-api.up.railway.app
46
46
  railway:
47
47
  serviceName: __SITE_SLUG__-api
48
- buildCommand: npm run build
49
- startCommand: node ./src/api/server.js
48
+ buildCommand: npm run build:api
49
+ startCommand: npm run build:api && node ./src/api/server.js
50
+ healthcheckTimeoutSeconds: 120
50
51
  environments:
51
52
  local:
52
53
  baseUrl: http://127.0.0.1:3000
@@ -56,16 +57,16 @@ services:
56
57
  railway:
57
58
  serviceName: __SITE_SLUG__-workday-manager
58
59
  rootDir: .
59
- buildCommand: npm run build
60
- startCommand: node ./node_modules/@treeseed/core/dist/services/workday-manager.js
60
+ buildCommand: npm run build:api
61
+ startCommand: npm run build:api && node ./packages/agent/dist/services/workday-manager.js
61
62
  schedule: '0 9 * * 1-5'
62
63
  workerRunner:
63
64
  enabled: true
64
65
  provider: railway
65
66
  railway:
66
67
  rootDir: .
67
- buildCommand: npm run build
68
- startCommand: node ./node_modules/@treeseed/core/dist/services/worker.js
68
+ buildCommand: npm run build:api
69
+ startCommand: npm run build:api && node ./packages/agent/dist/services/worker.js
69
70
  plugins:
70
71
  - package: '@treeseed/core/plugin-default'
71
72
  providers:
@@ -65,6 +65,12 @@
65
65
  "deriveFrom": "coreVersion",
66
66
  "required": true
67
67
  },
68
+ {
69
+ "name": "Agent version",
70
+ "token": "__AGENT_VERSION__",
71
+ "deriveFrom": "agentVersion",
72
+ "required": true
73
+ },
68
74
  {
69
75
  "name": "SDK version",
70
76
  "token": "__SDK_VERSION__",
@@ -1,4 +1,5 @@
1
1
  import { type ReleaseCandidateReport } from '../operations/services/release-candidate.ts';
2
+ import { type RepositorySaveReport } from '../operations/services/repository-save-orchestrator.ts';
2
3
  import { type DevTagBranchScope } from '../operations/services/package-reference-policy.ts';
3
4
  import { resolveTreeseedWorkflowState, type TreeseedWorkflowStatusOptions } from '../workflow-state.ts';
4
5
  import { type TreeseedWorkflowRunCommand, type TreeseedWorkflowRunJournal } from './runs.ts';
@@ -372,8 +373,8 @@ export declare function workflowSave(helpers: WorkflowOperationHelpers, input: T
372
373
  branchSync: {
373
374
  pushed: boolean;
374
375
  };
375
- repos: import("../operations/services/repository-save-orchestrator.ts").RepositorySaveReport[];
376
- rootRepo: import("../operations/services/repository-save-orchestrator.ts").RepositorySaveReport;
376
+ repos: RepositorySaveReport[];
377
+ rootRepo: RepositorySaveReport;
377
378
  waves: string[][];
378
379
  plannedVersions: Record<string, string>;
379
380
  partialFailure: null;
@@ -515,8 +516,8 @@ export declare function workflowClose(helpers: WorkflowOperationHelpers, input:
515
516
  branchSync: {
516
517
  pushed: boolean;
517
518
  };
518
- repos: import("../operations/services/repository-save-orchestrator.ts").RepositorySaveReport[];
519
- rootRepo: import("../operations/services/repository-save-orchestrator.ts").RepositorySaveReport;
519
+ repos: RepositorySaveReport[];
520
+ rootRepo: RepositorySaveReport;
520
521
  waves: string[][];
521
522
  plannedVersions: Record<string, string>;
522
523
  partialFailure: null;
@@ -699,8 +700,8 @@ export declare function workflowStage(helpers: WorkflowOperationHelpers, input:
699
700
  branchSync: {
700
701
  pushed: boolean;
701
702
  };
702
- repos: import("../operations/services/repository-save-orchestrator.ts").RepositorySaveReport[];
703
- rootRepo: import("../operations/services/repository-save-orchestrator.ts").RepositorySaveReport;
703
+ repos: RepositorySaveReport[];
704
+ rootRepo: RepositorySaveReport;
704
705
  waves: string[][];
705
706
  plannedVersions: Record<string, string>;
706
707
  partialFailure: null;
@@ -936,6 +937,22 @@ export declare function workflowRelease(helpers: WorkflowOperationHelpers, input
936
937
  repos: never[];
937
938
  rootRepo: WorkflowRepoReport;
938
939
  releaseCandidate: ReleaseCandidateReport | null;
940
+ stagingWorkflowGates: Record<string, unknown>[] | {
941
+ name: string;
942
+ repository: string | null;
943
+ workflow: string;
944
+ branch: string;
945
+ headSha: string;
946
+ status: string;
947
+ reason: string;
948
+ conclusion: null;
949
+ runId: null;
950
+ url: null;
951
+ createdAt: null;
952
+ updatedAt: null;
953
+ timeoutSeconds: number | null;
954
+ cached: boolean;
955
+ }[];
939
956
  releaseBackMerge: {
940
957
  status: string;
941
958
  merged: boolean;
@@ -962,7 +979,7 @@ export declare function workflowRelease(helpers: WorkflowOperationHelpers, input
962
979
  };
963
980
  workspaceLinks: import("../operations/services/workspace-dependency-mode.ts").WorkspaceDependencyModeReport;
964
981
  ciMode: "hosted" | "off";
965
- workflowGates: Record<string, unknown>[] | {
982
+ workflowGates: (Record<string, unknown> | {
966
983
  name: string;
967
984
  repository: string | null;
968
985
  workflow: string;
@@ -977,7 +994,7 @@ export declare function workflowRelease(helpers: WorkflowOperationHelpers, input
977
994
  updatedAt: null;
978
995
  timeoutSeconds: number | null;
979
996
  cached: boolean;
980
- }[];
997
+ })[];
981
998
  hostingAudit: import("../workflow-support.ts").TreeseedHostingAuditReport | null;
982
999
  } & {
983
1000
  finalState?: WorkflowStatePayload;
@@ -1067,6 +1084,22 @@ export declare function workflowRelease(helpers: WorkflowOperationHelpers, input
1067
1084
  repos: WorkflowRepoReport[];
1068
1085
  rootRepo: WorkflowRepoReport;
1069
1086
  releaseCandidate: ReleaseCandidateReport | null;
1087
+ stagingWorkflowGates: Record<string, unknown>[] | {
1088
+ name: string;
1089
+ repository: string | null;
1090
+ workflow: string;
1091
+ branch: string;
1092
+ headSha: string;
1093
+ status: string;
1094
+ reason: string;
1095
+ conclusion: null;
1096
+ runId: null;
1097
+ url: null;
1098
+ createdAt: null;
1099
+ updatedAt: null;
1100
+ timeoutSeconds: number | null;
1101
+ cached: boolean;
1102
+ }[];
1070
1103
  releaseBackMerge: {
1071
1104
  status: string;
1072
1105
  merged: boolean;