@rosthq/cli 0.7.42 → 0.7.44

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,5 +1,5 @@
1
1
  import { type StepLedger } from "./step-ledger.js";
2
- export declare const MODEL_SPAWN_ENV_ALLOWLIST: readonly ["PATH", "HOME", "LANG", "LC_ALL", "TMPDIR", "SHELL", "NODE_OPTIONS"];
2
+ export declare const MODEL_SPAWN_ENV_ALLOWLIST: readonly ["PATH", "HOME", "USER", "LANG", "LC_ALL", "TMPDIR", "SHELL", "NODE_OPTIONS"];
3
3
  export declare function buildModelSpawnEnv(base: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
4
4
  export type ForgeCredential = {
5
5
  token: string;
@@ -60,5 +60,51 @@ export type ForgePullRequest = {
60
60
  adopted: boolean;
61
61
  };
62
62
  export declare function openDraftPullRequest(options: OpenDraftPullRequestOptions): Promise<ForgePullRequest>;
63
+ export type ForgePullRequestState = {
64
+ number: number;
65
+ nodeId: string;
66
+ merged: boolean;
67
+ draft: boolean;
68
+ mergeable: boolean | null;
69
+ mergeableState: string;
70
+ headSha: string;
71
+ mergedSha: string | null;
72
+ };
73
+ export type ForgeMergeReadiness = "already_merged" | "mergeable" | "conflicted" | "draft" | "blocked" | "behind" | "unknown";
74
+ export declare function classifyMergeReadiness(state: ForgePullRequestState): ForgeMergeReadiness;
75
+ export type MergeTurnRepo = {
76
+ owner: string;
77
+ name: string;
78
+ };
79
+ export declare function fetchPullRequestState(options: {
80
+ repo: MergeTurnRepo;
81
+ prNumber: number;
82
+ credential: ForgeCredential;
83
+ fetchImpl?: typeof fetch;
84
+ apiBaseUrl?: string;
85
+ }): Promise<ForgePullRequestState>;
86
+ export type ForgeMergeOutcome = {
87
+ status: "merged";
88
+ mergedSha: string | null;
89
+ } | {
90
+ status: "queued";
91
+ };
92
+ export declare function mergePullRequest(options: {
93
+ repo: MergeTurnRepo;
94
+ state: ForgePullRequestState;
95
+ credential: ForgeCredential;
96
+ fetchImpl?: typeof fetch;
97
+ apiBaseUrl?: string;
98
+ }): Promise<ForgeMergeOutcome>;
99
+ export declare function enablePullRequestAutoMerge(options: {
100
+ repo: MergeTurnRepo;
101
+ nodeId: string;
102
+ credential: ForgeCredential;
103
+ fetchImpl?: typeof fetch;
104
+ apiBaseUrl?: string;
105
+ }): Promise<void>;
106
+ export declare function forcePushWithLease(ws: ForgeWorkspace, credential: ForgeCredential): Promise<{
107
+ commitSha: string;
108
+ }>;
63
109
  export declare function removeWorkspace(ws: ForgeWorkspace): Promise<void>;
64
110
  //# sourceMappingURL=forge-workspace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"forge-workspace.d.ts","sourceRoot":"","sources":["../src/forge-workspace.ts"],"names":[],"mappings":"AA2CA,OAAO,EAAqB,KAAK,UAAU,EAAiB,MAAM,kBAAkB,CAAC;AASrF,eAAO,MAAM,yBAAyB,gFAQ5B,CAAC;AAEX,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAW7E;AAID,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAG3B,QAAQ,EAAE,MAAM,CAAC;IAGjB,WAAW,EAAE,MAAM,CAAC;IAGpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAKlB,OAAO,EAAE,MAAM,CAAC;IAIhB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEvD,MAAM,MAAM,4BAA4B,GAAG;IAEzC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE;QAAE,EAAE,EAAE,MAAM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C;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAwC7B;AAID,wBAAsB,0BAA0B,CAAC,OAAO,EAAE;IACxD,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,eAAe,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBhB;AAMD,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,GAAG,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAoBxH;AAiBD,wBAAsB,eAAe,CAAC,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAOvE"}
package/dist/index.js CHANGED
@@ -42491,7 +42491,10 @@ var softwareDeveloperTeamRoleSchema = external_exports.enum([
42491
42491
  "plan_conformance_reviewer",
42492
42492
  "security_reviewer",
42493
42493
  "qa_release",
42494
- "fold_memory"
42494
+ "fold_memory",
42495
+ // DER-1339 (T1.8): the 7th role. Carries the "Forge merge" authority preset and owns the
42496
+ // merge_or_deploy_gate under policy-gated autonomous merge. Staffs the runner lane.
42497
+ "release_manager"
42495
42498
  ]);
42496
42499
  var softwareDeveloperTeamLaneSchema = external_exports.enum(["runner", "cloud"]);
42497
42500
  var softwareDeveloperTeamLaneOverridesSchema = external_exports.object({
@@ -42501,7 +42504,8 @@ var softwareDeveloperTeamLaneOverridesSchema = external_exports.object({
42501
42504
  plan_conformance_reviewer: softwareDeveloperTeamLaneSchema.optional(),
42502
42505
  security_reviewer: softwareDeveloperTeamLaneSchema.optional(),
42503
42506
  qa_release: softwareDeveloperTeamLaneSchema.optional(),
42504
- fold_memory: softwareDeveloperTeamLaneSchema.optional()
42507
+ fold_memory: softwareDeveloperTeamLaneSchema.optional(),
42508
+ release_manager: softwareDeveloperTeamLaneSchema.optional()
42505
42509
  }).strict();
42506
42510
  var softwareEnvironmentSchema = external_exports.enum(["development", "preview", "production"]);
42507
42511
  var softwareGrantStatusSchema = external_exports.enum(["active", "revoked"]);
@@ -45266,7 +45270,7 @@ External connectors are being rolled out provider by provider, conservatively (r
45266
45270
  order: 48,
45267
45271
  title: "CLI and MCP installation guide",
45268
45272
  summary: "Install the public CLI, register remote token-backed MCP clients, and find the full command and tool catalog.",
45269
- version: "2026-07-05.5",
45273
+ version: "2026-07-05.6",
45270
45274
  public: true,
45271
45275
  audiences: ["human", "cli", "mcp", "in_app_agent"],
45272
45276
  stages: ["company_setup", "staffing"],
@@ -46003,21 +46007,21 @@ Several rows here are seat-operating commands (\`task.create\`, the \`signal.*\`
46003
46007
  | \`rost_create_a_forge_authority_profile\` | \`software_factory.authority_profile.create\` | Define a Forge authority profile (a named seat capability preset). Owner-only; defaults to the read_only preset. | Tenant-admin | Call with \`{"name":"Builder","preset":"contributor"}\`. |
46004
46008
  | \`rost_grant_forge_seat_authority\` | \`software_factory.authority.grant\` | Grant a seat a Forge authority profile on a project (seat \u2192 project \u2192 profile). Owner-only and human-gated; emits a durable authority-change event. | Tenant-admin | Call with \`{"software_project_id":"<project-id>","seat_id":"<seat-id>","authority_profile_id":"<profile-id>"}\`; non-interactive callers receive a confirmation handoff. |
46005
46009
  | \`rost_revoke_forge_seat_authority\` | \`software_factory.authority.revoke\` | Revoke a Forge authority grant (teardown). Owner-only and human-gated. | Tenant-admin | Call with \`{"grant_id":"<grant-id>"}\`; non-interactive callers receive a confirmation handoff. |
46006
- | \`rost_install_forge_developer_team\` | \`software_factory.developer_team.install\` | Install AND activate the governed Forge Developer Team: Forge Lead (human) plus Planner, Builder, plan reviewer, security reviewer, QA/release, and Fold/Memory seats with draft Charters, first-party Forge Skills, and authority presets. Approving ALSO auto-staffs the 6 agent seats as live occupancies at a pull-request-only, observe-first posture (open pull requests, never merge/deploy without a human), steward-chained to the human lead, each with a signed manifest + passed sandbox dry-run; the 6 agent seats staff the runner lane and go live in a PARKED state \u2014 they become claimable once a runner pairs and cannot claim work before then; it sets a conservative default token budget (only if none) and, for a supplied project, a default pr_only GitHub automation policy (only if none \u2014 never widening a stricter one). Entitlement-gated and human-gated. | Tenant-admin | Call with \`{"steward_seat_id":"<human-steward-seat-id>"}\` \u2014 \`software_project_id\` is optional (when supplied it scopes authority grants to that project; the team installs tenant-wide either way). If the company autonomy ceiling is more permissive than the observe-first envelope, add \`{"acknowledge_autonomy_ceiling":true}\` to activate. Add \`{"lane_overrides":{"qa_release":"cloud"}}\` to pin a role to the cloud lane instead of the default runner lane. Non-interactive callers receive a confirmation handoff. |
46010
+ | \`rost_install_forge_developer_team\` | \`software_factory.developer_team.install\` | Install AND activate the governed Forge Developer Team: Forge Lead (human) plus Planner, Builder, plan reviewer, security reviewer, QA/release, Fold/Memory, and Release Manager seats with draft Charters, first-party Forge Skills, and authority presets. Approving ALSO auto-staffs the 7 agent seats as live occupancies at a pull-request-only, observe-first posture (open pull requests, never merge/deploy without a human \u2014 the Release Manager auto-merges only after a human raises the automation-mode ceiling), steward-chained to the human lead, each with a signed manifest + passed sandbox dry-run; the 7 agent seats staff the runner lane and go live in a PARKED state \u2014 they become claimable once a runner pairs and cannot claim work before then; it sets a conservative default token budget (only if none) and, for a supplied project, a default pr_only GitHub automation policy (only if none \u2014 never widening a stricter one). Entitlement-gated and human-gated. | Tenant-admin | Call with \`{"steward_seat_id":"<human-steward-seat-id>"}\` \u2014 \`software_project_id\` is optional (when supplied it scopes authority grants to that project; the team installs tenant-wide either way). If the company autonomy ceiling is more permissive than the observe-first envelope, add \`{"acknowledge_autonomy_ceiling":true}\` to activate. Add \`{"lane_overrides":{"qa_release":"cloud"}}\` to pin a role to the cloud lane instead of the default runner lane. Non-interactive callers receive a confirmation handoff. |
46007
46011
  | \`rost_uninstall_forge_developer_team\` | \`software_factory.developer_team.uninstall\` | Tear down the governed Forge Developer Team (teardown \u2014 ADR-0018 \xA76): end the auto-staffed agent occupancies in a no-orphan-safe order, decommission the agents, and revoke the team's project authority and secret grants. The human Forge Lead seat is left intact; re-installing re-staffs the team. The entitlement-lapse variant runs the same teardown path without re-checking the Forge paywall. Owner-only and human-gated. | Tenant-admin | Call with \`{}\` (optionally \`{"reason":"offboarding"}\`); non-interactive callers receive a confirmation handoff. |
46008
46012
  | \`rost_list_forge_config\` | \`software_factory.config.list\` | List active Forge configuration entries. Plain values may be returned only when they passed the non-secret guard; secret refs appear as metadata and never include the ref value. | Tenant | Call with \`{}\` or \`{"software_project_id":"<project-id>","environment":"preview"}\`. |
46009
46013
  | \`rost_set_forge_config\` | \`software_factory.config.set\` | Human-gated config create/rotation for plain values or secret refs. Secret refs store only a vault pointer and raw secret-shaped plain values are rejected. | Tenant-admin | Call with \`{"software_project_id":"<project-id>","environment":"preview","key_name":"PUBLIC_BASE_URL","value_kind":"plain","plain_value":"https://preview.example.com"}\`. |
46010
46014
  | \`rost_list_forge_secret_requests\` | \`software_factory.secret_request.list\` | List missing-secret requests and their approval Task ids/statuses. It returns request metadata only \u2014 no secret values and no vault refs. | Tenant | Call with \`{}\` or \`{"status":"pending"}\`. |
46011
46015
  | \`rost_grant_a_forge_secret\` | \`software_factory.secret.grant\` | A human grants a seat scoped access to a project secret by vault ref (Postgres stores only the pointer, never secret material). Owner-only and human-gated. | Tenant-admin | Call with \`{"software_project_id":"<project-id>","environment":"production","seat_id":"<seat-id>","action":"vercel.env.sync","key_name":"OPENAI_API_KEY","vault_ref":"infisical://prod/OPENAI_API_KEY"}\`. |
46012
46016
  | \`rost_revoke_a_forge_secret_grant\` | \`software_factory.secret.revoke\` | Revoke a Forge secret grant (teardown \u2014 cut a compromised seat's access immediately). Owner-only and human-gated. | Tenant-admin | Call with \`{"grant_id":"<grant-id>"}\`; non-interactive callers receive a confirmation handoff. |
46013
- | \`rost_set_a_forge_github_automation_policy\` | \`software_factory.github.policy.upsert\` | Set the server-side GitHub automation policy: allowed actions, automation-mode ceiling, and operations requiring humans. The allowed-actions and human-gated-actions lists are stored server-side as structured JSON arrays. Owner-only and human-gated. | Tenant-admin | Call with \`{"software_project_id":"<project-id>","automation_mode_ceiling":"pr_only","allowed_actions":["webhook_intake","installation_token"],"requires_human_for":["deploy_production"]}\`. |
46017
+ | \`rost_set_a_forge_github_automation_policy\` | \`software_factory.github.policy.upsert\` | Set the server-side GitHub automation policy: allowed actions, automation-mode ceiling, and operations requiring humans. The allowed-actions and human-gated-actions lists are stored server-side as structured JSON arrays. Owner-only and human-gated. Raising the ceiling to a merge-capable mode (merge_after_checks or higher) first verifies the bound repository has required status checks on its default branch and refuses otherwise. | Tenant-admin | Call with \`{"software_project_id":"<project-id>","automation_mode_ceiling":"pr_only","allowed_actions":["webhook_intake","installation_token"],"requires_human_for":["deploy_production"]}\`. |
46014
46018
  | \`rost_create_a_forge_github_installation_token\` | \`software_factory.github.installation_token.create\` | Mint a short-lived GitHub App installation token for one bound repository after policy evaluation. The token is returned once and never stored. | Tenant | Call with \`{"software_project_id":"<project-id>","repository_id":789,"requested_actions":["read"],"requested_automation_mode":"plan_only"}\`. |
46015
46019
  | \`rost_list_forge_github_installations\` | \`software_factory.github.installation.list\` | List connected GitHub App installations and each repository's bind state (connected or active) with the Forge project it maps to. Read-only. | Tenant | Call with \`{}\`; a \`connected\` repository is verified but not yet bound to a project. |
46016
46020
  | \`rost_list_forge_vercel_links\` | \`software_factory.vercel.project.list\` | List connected Vercel accounts/teams and linked existing Vercel projects. Read-only; no OAuth tokens or vault refs are returned. | Tenant | Call with \`{}\`; tenant admins connect/link from \`/forge/settings/vercel\`. |
46017
46021
  | \`rost_create_a_forge_vercel_preview_deployment\` | \`software_factory.vercel.deploy_preview\` | Create a Vercel preview deployment for a linked project after Forge deploy-preview authority, the Vercel OAuth vault-ref connection, and required preview secret/config grants are verified. | Tenant | Call with \`{"software_project_id":"<project-id>","commit_sha":"<sha>","git_ref":"feature/example","seat_id":"<seat-id>"}\`; returns deployment metadata, not tokens. |
46018
46022
  | \`rost_list_forge_runner_capacity\` | \`software_factory.capacity.list\` | List Forge runner capacity observations (advisory scheduling input only, never an authority input). Read-only; requires the Forge add-on. | Tenant | Call with \`{}\` or \`{"runner_id":"<runner-id>"}\`. |
46019
46023
 
46020
- The web Forge control room at \`/forge\` uses the same command path for project selection, build request creation/list/detail reads, request pause/cancel/resume controls, runner capacity, configuration status, and Developer Team install. A request detail page shows phase history, open gates, plan progress, loop/time/cost ceilings, and latest plan-review questions from \`software_factory.request.show\`; answering a clarification, approving a plan, rejecting it, pausing, canceling, or resuming calls the same Forge commands exposed over CLI/MCP. Lifecycle controls deliberately stage pending confirmations before changing runner state. The install button also stages a pending confirmation before durable seats, Skills, authority grants, or live agent activation are applied; the install page states plainly that approving activates the 6 agents at a pull-request-only, observe-first posture and surfaces the company autonomy ceiling.
46024
+ The web Forge control room at \`/forge\` uses the same command path for project selection, build request creation/list/detail reads, request pause/cancel/resume controls, runner capacity, configuration status, and Developer Team install. A request detail page shows phase history, open gates, plan progress, loop/time/cost ceilings, and latest plan-review questions from \`software_factory.request.show\`; answering a clarification, approving a plan, rejecting it, pausing, canceling, or resuming calls the same Forge commands exposed over CLI/MCP. Lifecycle controls deliberately stage pending confirmations before changing runner state. The install button also stages a pending confirmation before durable seats, Skills, authority grants, or live agent activation are applied; the install page states plainly that approving activates the 7 agents at a pull-request-only, observe-first posture and surfaces the company autonomy ceiling.
46021
46025
 
46022
46026
  #### Forge GitHub App access
46023
46027
 
@@ -49228,14 +49232,14 @@ var COMMAND_MANIFEST = [
49228
49232
  { "id": "software_factory.config.list", "namespace": "software_factory", "action": "config.list", "title": "List Forge config", "description": "List active Forge config metadata for project environments. Plain config values may be returned; secret refs are represented only as has_secret_ref.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "software_project_id", "flag": "software-project-id", "type": "string", "required": false }, { "name": "environment", "flag": "environment", "type": "enum", "required": false, "enumValues": ["development", "preview", "production"] }], "hasComplexInput": false, "help": "List active Forge config entries. Plain config may be shown; secret refs are represented only as metadata." },
49229
49233
  { "id": "software_factory.config.set", "namespace": "software_factory", "action": "config.set", "title": "Set Forge config", "description": "Create or rotate a Forge project config entry. Secret config stores only a vault ref pointer; raw values are never accepted for secret_ref entries.", "requiredScope": "tenant_admin", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "software_project_id", "flag": "software-project-id", "type": "string", "required": true }, { "name": "environment", "flag": "environment", "type": "enum", "required": true, "enumValues": ["development", "preview", "production"] }, { "name": "key_name", "flag": "key-name", "type": "string", "required": true }, { "name": "value_kind", "flag": "value-kind", "type": "enum", "required": true, "enumValues": ["plain", "secret_ref"] }, { "name": "plain_value", "flag": "plain-value", "type": "string", "required": false }, { "name": "vault_ref", "flag": "vault-ref", "type": "string", "required": false }], "hasComplexInput": false, "help": "Set or rotate a Forge project config key. Secret entries store only vault refs and are human-gated." },
49230
49234
  { "id": "software_factory.conformance.record_findings", "namespace": "software_factory", "action": "conformance.record_findings", "title": "Record Forge conformance findings", "description": "The plan-conformance reviewer records one or more findings against a build request; open findings route the request back to implementation. Recording is evidence, not a decision \u2014 accepting a gap is a separate human gate. Requires the Forge add-on.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "build_request_id", "flag": "build-request-id", "type": "string", "required": true }, { "name": "phase_run_id", "flag": "phase-run-id", "type": "string", "required": false }], "hasComplexInput": true, "help": "Record structured Forge plan-conformance findings as reviewer evidence. Open findings route the request back to implementation; accepting a gap remains a separate human gate." },
49231
- { "id": "software_factory.developer_team.install", "namespace": "software_factory", "action": "developer_team.install", "title": "Install Forge Developer Team", "description": "Install AND activate the governed Forge Developer Team: 7 seats (1 human lead + 6 agents), first-party skills, authority presets, and a conservative token budget. Approving this ACTIVATES the 6 agents as live occupancies at a pr_only, observe-first posture: they open pull requests but never merge or deploy without a human. Entitlement-gated and human-confirmed.", "requiredScope": "tenant_admin", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "steward_seat_id", "flag": "steward-seat-id", "type": "string", "required": true }, { "name": "software_project_id", "flag": "software-project-id", "type": "string", "required": false }, { "name": "assign_skills", "flag": "assign-skills", "type": "boolean", "required": false }, { "name": "acknowledge_autonomy_ceiling", "flag": "acknowledge-autonomy-ceiling", "type": "boolean", "required": false }], "hasComplexInput": true, "help": "Install the governed Forge Developer Team template with seats, draft Charters, skills, project authority grants, and audit records. Tenant-admin and human-gated; creates no live agent occupancy." },
49235
+ { "id": "software_factory.developer_team.install", "namespace": "software_factory", "action": "developer_team.install", "title": "Install Forge Developer Team", "description": "Install AND activate the governed Forge Developer Team: 8 seats (1 human lead + 7 agents), first-party skills, authority presets, and a conservative token budget. Approving this ACTIVATES the 7 agents as live occupancies at a pr_only, observe-first posture: they open pull requests but never merge or deploy without a human (the Release Manager auto-merges only after a human raises the automation-mode ceiling). Entitlement-gated and human-confirmed.", "requiredScope": "tenant_admin", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "steward_seat_id", "flag": "steward-seat-id", "type": "string", "required": true }, { "name": "software_project_id", "flag": "software-project-id", "type": "string", "required": false }, { "name": "assign_skills", "flag": "assign-skills", "type": "boolean", "required": false }, { "name": "acknowledge_autonomy_ceiling", "flag": "acknowledge-autonomy-ceiling", "type": "boolean", "required": false }], "hasComplexInput": true, "help": "Install the governed Forge Developer Team template with seats, draft Charters, skills, project authority grants, and audit records. Tenant-admin and human-gated; creates no live agent occupancy." },
49232
49236
  { "id": "software_factory.developer_team.uninstall", "namespace": "software_factory", "action": "developer_team.uninstall", "title": "Uninstall Forge Developer Team", "description": "Tear down the governed Forge Developer Team (ADR-0018 \xA76): end the auto-staffed agent occupancies in a no-orphan-safe order, decommission the agents, and revoke the team's project authority and secret grants. The human Forge Lead seat is left intact; re-installing re-staffs the team. The entitlement-lapse variant runs the same teardown path without re-checking the Forge paywall. Owner-only, human-gated, and audited.", "requiredScope": "tenant_admin", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "reason", "flag": "reason", "type": "string", "required": false }, { "name": "trigger", "flag": "trigger", "type": "enum", "required": false, "enumValues": ["manual", "entitlement_lapse"] }], "hasComplexInput": false, "help": "Tear down the Forge Developer Team (teardown \u2014 ADR-0018 \xA76): end the agent occupancies in a no-orphan-safe order, decommission the agents, and revoke the team's authority and secret grants. The human Forge Lead seat stays. Owner-only and human-gated; the entitlement-lapse variant runs the same teardown path." },
49233
49237
  { "id": "software_factory.gate.decide", "namespace": "software_factory", "action": "gate.decide", "title": "Decide a Forge gate", "description": "A human approves or rejects a Forge gate. The resolver is recorded (never an agent \u2014 invariant #7); sensitive gates (security sign-off, merge/deploy, authority change, production deploy) also write a linked human decision. Requires confirmation.", "requiredScope": "tenant_admin", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "gate_id", "flag": "gate-id", "type": "string", "required": true }, { "name": "decision", "flag": "decision", "type": "enum", "required": true, "enumValues": ["approve", "reject"] }, { "name": "rationale", "flag": "rationale", "type": "string", "required": false }], "hasComplexInput": false, "help": "A human approves or rejects a Forge gate; an agent caller routes to /approvals and can never self-approve. Sensitive gates record a human decision." },
49234
49238
  { "id": "software_factory.github.installation_token.create", "namespace": "software_factory", "action": "github.installation_token.create", "title": "Create a Forge GitHub installation token", "description": "Mint a short-lived GitHub App installation token for one bound repository after server-side policy evaluation. The token is returned once and never persisted.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "software_project_id", "flag": "software-project-id", "type": "string", "required": true }, { "name": "repository_id", "flag": "repository-id", "type": "integer", "required": true }, { "name": "requested_actions", "flag": "requested-actions", "type": "array", "required": true, "itemType": "string" }, { "name": "requested_automation_mode", "flag": "requested-automation-mode", "type": "enum", "required": false, "enumValues": ["plan_only", "pr_only", "merge_after_checks", "deploy_preview", "deploy_production"] }, { "name": "seat_id", "flag": "seat-id", "type": "string", "required": false }], "hasComplexInput": false, "help": "Mint a short-lived GitHub App installation token for one bound repository after policy evaluation; token material is returned once and never stored." },
49235
49239
  { "id": "software_factory.github.installation.bind", "namespace": "software_factory", "action": "github.installation.bind", "title": "Bind Forge GitHub repositories to projects", "description": "Bind already-connected GitHub repositories to Forge projects. Owner-only and human-gated; operates on repositories already verified and connected in this tenant, so no GitHub re-authorization is required. Available any time, add or re-map bindings.", "requiredScope": "tenant_admin", "confirmation": "human_required", "exposeOverMcp": false, "fields": [{ "name": "app_slug", "flag": "app-slug", "type": "string", "required": false }, { "name": "installation_id", "flag": "installation-id", "type": "integer", "required": true }], "hasComplexInput": true, "help": "Bind already-connected GitHub repositories to Forge projects from the Forge GitHub settings flow. Owner-only and human-gated; no GitHub re-authorization required." },
49236
49240
  { "id": "software_factory.github.installation.connect", "namespace": "software_factory", "action": "github.installation.connect", "title": "Connect a Forge GitHub installation", "description": "Record a proven GitHub App installation and its verified repositories as connected (unbound) so they can be bound to Forge projects later. Owner-only and human-gated; starts from the authenticated Forge GitHub settings flow. Idempotent \u2014 re-connecting reconciles metadata and never unbinds an already-bound repository.", "requiredScope": "tenant_admin", "confirmation": "human_required", "exposeOverMcp": false, "fields": [{ "name": "app_slug", "flag": "app-slug", "type": "string", "required": false }, { "name": "installation_id", "flag": "installation-id", "type": "integer", "required": true }, { "name": "account_login", "flag": "account-login", "type": "string", "required": true }, { "name": "account_id", "flag": "account-id", "type": "integer", "required": true }, { "name": "account_type", "flag": "account-type", "type": "string", "required": true }], "hasComplexInput": true, "help": "Record a verified GitHub App installation and its repositories as connected (unbound) so they can be bound to Forge projects later. Owner-only and human-gated." },
49237
49241
  { "id": "software_factory.github.installation.list", "namespace": "software_factory", "action": "github.installation.list", "title": "List Forge GitHub installations", "description": "List connected GitHub App installations and their repositories with bind state (connected or active) and the Forge project each bound repository maps to. Read-only; requires the Forge add-on.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "app_slug", "flag": "app-slug", "type": "string", "required": false }], "hasComplexInput": false, "help": "List connected GitHub App installations and each repository's bind state (connected or active) with the Forge project it maps to. Read-only." },
49238
- { "id": "software_factory.github.policy.upsert", "namespace": "software_factory", "action": "github.policy.upsert", "title": "Set a Forge GitHub automation policy", "description": "Set the server-side policy for GitHub actions and automation-mode ceilings. Owner-only and human-gated; production deploy remains human-gated.", "requiredScope": "tenant_admin", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "software_project_id", "flag": "software-project-id", "type": "string", "required": true }, { "name": "authority_profile_id", "flag": "authority-profile-id", "type": "string", "required": false }, { "name": "automation_mode_ceiling", "flag": "automation-mode-ceiling", "type": "enum", "required": false, "enumValues": ["plan_only", "pr_only", "merge_after_checks", "deploy_preview", "deploy_production"] }, { "name": "allowed_actions", "flag": "allowed-actions", "type": "array", "required": true, "itemType": "string" }, { "name": "requires_human_for", "flag": "requires-human-for", "type": "array", "required": true, "itemType": "string" }], "hasComplexInput": false, "help": "Set Forge's server-side GitHub automation policy for actions, mode ceilings, and human-gated operations." },
49242
+ { "id": "software_factory.github.policy.upsert", "namespace": "software_factory", "action": "github.policy.upsert", "title": "Set a Forge GitHub automation policy", "description": "Set the server-side policy for GitHub actions and automation-mode ceilings. Owner-only and human-gated; production deploy remains human-gated. Raising the ceiling to a merge-capable mode (merge_after_checks or higher) first verifies the bound repository has required status checks configured \u2014 it refuses otherwise.", "requiredScope": "tenant_admin", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "software_project_id", "flag": "software-project-id", "type": "string", "required": true }, { "name": "authority_profile_id", "flag": "authority-profile-id", "type": "string", "required": false }, { "name": "automation_mode_ceiling", "flag": "automation-mode-ceiling", "type": "enum", "required": false, "enumValues": ["plan_only", "pr_only", "merge_after_checks", "deploy_preview", "deploy_production"] }, { "name": "allowed_actions", "flag": "allowed-actions", "type": "array", "required": true, "itemType": "string" }, { "name": "requires_human_for", "flag": "requires-human-for", "type": "array", "required": true, "itemType": "string" }], "hasComplexInput": false, "help": "Set Forge's server-side GitHub automation policy for actions, mode ceilings, and human-gated operations." },
49239
49243
  { "id": "software_factory.github.repository.unbind", "namespace": "software_factory", "action": "github.repository.unbind", "title": "Unbind a Forge GitHub repository", "description": "Remove a GitHub repository's Forge project binding. By default the repository stays connected (unbound) and can be re-bound later; pass disconnect to remove it entirely. Owner-only and human-gated.", "requiredScope": "tenant_admin", "confirmation": "human_required", "exposeOverMcp": false, "fields": [{ "name": "app_slug", "flag": "app-slug", "type": "string", "required": false }, { "name": "installation_id", "flag": "installation-id", "type": "integer", "required": true }, { "name": "repository_id", "flag": "repository-id", "type": "integer", "required": true }, { "name": "disconnect", "flag": "disconnect", "type": "boolean", "required": false }], "hasComplexInput": false, "help": "Remove a GitHub repository's Forge project binding; the repository stays connected for re-binding unless disconnect is set. Owner-only and human-gated." },
49240
49244
  { "id": "software_factory.phase.advance", "namespace": "software_factory", "action": "phase.advance", "title": "Advance a Forge build request phase", "description": "Advance a build request to the next phase, enforcing the closed phase state machine server-side (an illegal transition is rejected). Writes a phase-run row and updates the current phase. Entitlement-gated.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "build_request_id", "flag": "build-request-id", "type": "string", "required": true }, { "name": "to_phase", "flag": "to-phase", "type": "enum", "required": true, "enumValues": ["intake", "discovery_scoping", "plan_review", "implementation", "plan_conformance_review", "security_review", "qa_verification", "release_preview", "merge_or_deploy_gate", "closeout"] }, { "name": "owning_seat_id", "flag": "owning-seat-id", "type": "string", "required": false }, { "name": "note", "flag": "note", "type": "string", "required": false }], "hasComplexInput": false, "help": "Advance a build request to its next phase; the server enforces the closed phase state machine and rejects an illegal transition." },
49241
49245
  { "id": "software_factory.plan.approve", "namespace": "software_factory", "action": "plan.approve", "title": "Approve a Forge plan", "description": "A human approves the current plan at the plan_review gate; records a human decision and advances the request to implementation. Owner-only and human-gated (invariant #7).", "requiredScope": "tenant_admin", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "build_request_id", "flag": "build-request-id", "type": "string", "required": true }, { "name": "rationale", "flag": "rationale", "type": "string", "required": false }], "hasComplexInput": false, "help": "A human approves the current plan at the plan_review gate; records a human decision and advances the request to implementation. Owner-only and human-gated." },
@@ -51878,6 +51882,12 @@ var execFile3 = promisify3(execFileCallback3);
51878
51882
  var MODEL_SPAWN_ENV_ALLOWLIST = [
51879
51883
  "PATH",
51880
51884
  "HOME",
51885
+ // Claude Code resolves its stored login by the `$USER` account name — the macOS
51886
+ // Keychain item is keyed on it (`security find-generic-password -a "$USER" -s
51887
+ // "Claude Code-credentials"`). Without USER a spawned `claude` reports "Not logged in"
51888
+ // even on a host that has `claude` installed and logged in, breaking the "npm install +
51889
+ // login, no terminal steps" runner UX (DER-1311). USER is an identity var, not a secret.
51890
+ "USER",
51881
51891
  "LANG",
51882
51892
  "LC_ALL",
51883
51893
  "TMPDIR",
@@ -53110,7 +53120,11 @@ async function executeClaimedUnit(fetchImpl, appUrl2, state, config2, io, runtim
53110
53120
  }
53111
53121
  const reported = await post2(fetchImpl, appUrl2, input.resultPath(id), {
53112
53122
  status: result.ok ? "succeeded" : "failed",
53113
- summary: result.summary,
53123
+ // Cap to the result route's summary limit (see capResultSummary / RESULT_SUMMARY_MAX). A
53124
+ // real turn summary can exceed it; without the cap the server's Zod `.max()` 400s the
53125
+ // report, and because the loop treats a throw as "transient (continuing)" the phase
53126
+ // zombies in `running` until its lease grace. Truncating keeps a successful turn a success.
53127
+ summary: capResultSummary(result.summary),
53114
53128
  log_ref: input.logRef(id),
53115
53129
  model: (turnRuntime ?? runtime) === "codex" ? "codex-cli" : "claude-cli",
53116
53130
  // Artifact-bearing result fields (T1.5) — only sent when the harness produced them, so
@@ -53128,11 +53142,34 @@ async function executeClaimedUnit(fetchImpl, appUrl2, state, config2, io, runtim
53128
53142
  ...input.kind === "work_order" && result.transcript ? { transcript: result.transcript } : {}
53129
53143
  }, state.runner_secret);
53130
53144
  if (reported.status !== 200) {
53145
+ if (reported.status >= 400 && reported.status < 500) {
53146
+ const fallback = await post2(fetchImpl, appUrl2, input.resultPath(id), {
53147
+ status: "failed",
53148
+ summary: capResultSummary(
53149
+ `Runner result rejected by server (${reported.status}). Original outcome: ${result.ok ? "succeeded" : "failed"}. ${redactForLog(JSON.stringify(reported.json))}`
53150
+ ),
53151
+ log_ref: input.logRef(id),
53152
+ model: (turnRuntime ?? runtime) === "codex" ? "codex-cli" : "claude-cli"
53153
+ }, state.runner_secret);
53154
+ if (fallback.status === 200) {
53155
+ io.stdout.write(`${input.idField}=${id} status=failed (result rejected ${reported.status}; reported terminal failure)
53156
+ `);
53157
+ return;
53158
+ }
53159
+ }
53131
53160
  throw new Error(`${claimedUnitLabel(input.kind)} result failed ${reported.status}: ${redactForLog(JSON.stringify(reported.json))}`);
53132
53161
  }
53133
53162
  io.stdout.write(`${input.idField}=${id} status=${result.ok ? "succeeded" : "failed"}
53134
53163
  `);
53135
53164
  }
53165
+ var RESULT_SUMMARY_MAX = 12e3;
53166
+ function capResultSummary(summary) {
53167
+ const trimmed = summary.trim();
53168
+ if (trimmed.length === 0) {
53169
+ return "(no summary reported)";
53170
+ }
53171
+ return trimmed.length <= RESULT_SUMMARY_MAX ? trimmed : `${trimmed.slice(0, RESULT_SUMMARY_MAX - 1)}\u2026`;
53172
+ }
53136
53173
  function claimedUnitLabel(kind) {
53137
53174
  return kind === "work_order" ? "work order" : "turn execution";
53138
53175
  }