@warpgogol/forge 9.1.1 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/bin/cli.ts +5 -3
- package/dist/bin/cli.js +5 -3
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.d.ts +6 -0
- package/dist/os/adr/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.js +23 -15
- package/dist/os/adr/handlers/implement-stamp.js.map +1 -1
- package/dist/os/checks/handlers/counters-journal.d.ts.map +1 -1
- package/dist/os/checks/handlers/counters-journal.js +9 -1
- package/dist/os/checks/handlers/counters-journal.js.map +1 -1
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +32 -39
- package/dist/os/core/core.module.js.map +1 -1
- package/dist/os/core/lock-holder.d.ts +32 -0
- package/dist/os/core/lock-holder.d.ts.map +1 -0
- package/dist/os/core/lock-holder.js +81 -0
- package/dist/os/core/lock-holder.js.map +1 -0
- package/dist/os/core/stamp-lock.d.ts +30 -0
- package/dist/os/core/stamp-lock.d.ts.map +1 -0
- package/dist/os/core/stamp-lock.js +112 -0
- package/dist/os/core/stamp-lock.js.map +1 -0
- package/dist/os/flow/branch-name.d.ts +56 -0
- package/dist/os/flow/branch-name.d.ts.map +1 -0
- package/dist/os/flow/branch-name.js +108 -0
- package/dist/os/flow/branch-name.js.map +1 -0
- package/dist/os/flow/digest.d.ts +92 -0
- package/dist/os/flow/digest.d.ts.map +1 -0
- package/dist/os/flow/digest.js +663 -0
- package/dist/os/flow/digest.js.map +1 -0
- package/dist/os/flow/flow.module.d.ts +3 -0
- package/dist/os/flow/flow.module.d.ts.map +1 -0
- package/dist/os/flow/flow.module.js +771 -0
- package/dist/os/flow/flow.module.js.map +1 -0
- package/dist/os/flow/git.d.ts +68 -0
- package/dist/os/flow/git.d.ts.map +1 -0
- package/dist/os/flow/git.js +257 -0
- package/dist/os/flow/git.js.map +1 -0
- package/dist/os/flow/guard-files.d.ts +50 -0
- package/dist/os/flow/guard-files.d.ts.map +1 -0
- package/dist/os/flow/guard-files.js +147 -0
- package/dist/os/flow/guard-files.js.map +1 -0
- package/dist/os/flow/handlers/flow-backmerge.d.ts +27 -0
- package/dist/os/flow/handlers/flow-backmerge.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-backmerge.js +332 -0
- package/dist/os/flow/handlers/flow-backmerge.js.map +1 -0
- package/dist/os/flow/handlers/flow-check.d.ts +42 -0
- package/dist/os/flow/handlers/flow-check.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-check.js +347 -0
- package/dist/os/flow/handlers/flow-check.js.map +1 -0
- package/dist/os/flow/handlers/flow-cut.d.ts +71 -0
- package/dist/os/flow/handlers/flow-cut.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-cut.js +722 -0
- package/dist/os/flow/handlers/flow-cut.js.map +1 -0
- package/dist/os/flow/handlers/flow-digest.d.ts +5 -0
- package/dist/os/flow/handlers/flow-digest.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-digest.js +116 -0
- package/dist/os/flow/handlers/flow-digest.js.map +1 -0
- package/dist/os/flow/handlers/flow-discard.d.ts +22 -0
- package/dist/os/flow/handlers/flow-discard.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-discard.js +204 -0
- package/dist/os/flow/handlers/flow-discard.js.map +1 -0
- package/dist/os/flow/handlers/flow-fix.d.ts +47 -0
- package/dist/os/flow/handlers/flow-fix.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-fix.js +532 -0
- package/dist/os/flow/handlers/flow-fix.js.map +1 -0
- package/dist/os/flow/handlers/flow-hold.d.ts +32 -0
- package/dist/os/flow/handlers/flow-hold.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-hold.js +359 -0
- package/dist/os/flow/handlers/flow-hold.js.map +1 -0
- package/dist/os/flow/handlers/flow-install.d.ts +92 -0
- package/dist/os/flow/handlers/flow-install.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-install.js +883 -0
- package/dist/os/flow/handlers/flow-install.js.map +1 -0
- package/dist/os/flow/handlers/flow-integrate.d.ts +35 -0
- package/dist/os/flow/handlers/flow-integrate.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-integrate.js +436 -0
- package/dist/os/flow/handlers/flow-integrate.js.map +1 -0
- package/dist/os/flow/handlers/flow-open.d.ts +63 -0
- package/dist/os/flow/handlers/flow-open.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-open.js +294 -0
- package/dist/os/flow/handlers/flow-open.js.map +1 -0
- package/dist/os/flow/handlers/flow-publication-retire.d.ts +17 -0
- package/dist/os/flow/handlers/flow-publication-retire.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-publication-retire.js +132 -0
- package/dist/os/flow/handlers/flow-publication-retire.js.map +1 -0
- package/dist/os/flow/handlers/flow-push.d.ts +29 -0
- package/dist/os/flow/handlers/flow-push.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-push.js +397 -0
- package/dist/os/flow/handlers/flow-push.js.map +1 -0
- package/dist/os/flow/handlers/flow-status.d.ts +65 -0
- package/dist/os/flow/handlers/flow-status.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-status.js +193 -0
- package/dist/os/flow/handlers/flow-status.js.map +1 -0
- package/dist/os/flow/handlers/flow-unhold.d.ts +20 -0
- package/dist/os/flow/handlers/flow-unhold.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-unhold.js +158 -0
- package/dist/os/flow/handlers/flow-unhold.js.map +1 -0
- package/dist/os/flow/handlers/flow-version.d.ts +39 -0
- package/dist/os/flow/handlers/flow-version.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-version.js +122 -0
- package/dist/os/flow/handlers/flow-version.js.map +1 -0
- package/dist/os/flow/index.d.ts +30 -0
- package/dist/os/flow/index.d.ts.map +1 -0
- package/dist/os/flow/index.js +83 -0
- package/dist/os/flow/index.js.map +1 -0
- package/dist/os/flow/line-version.d.ts +23 -0
- package/dist/os/flow/line-version.d.ts.map +1 -0
- package/dist/os/flow/line-version.js +83 -0
- package/dist/os/flow/line-version.js.map +1 -0
- package/dist/os/flow/locks.d.ts +39 -0
- package/dist/os/flow/locks.d.ts.map +1 -0
- package/dist/os/flow/locks.js +177 -0
- package/dist/os/flow/locks.js.map +1 -0
- package/dist/os/flow/markers.d.ts +49 -0
- package/dist/os/flow/markers.d.ts.map +1 -0
- package/dist/os/flow/markers.js +112 -0
- package/dist/os/flow/markers.js.map +1 -0
- package/dist/os/flow/publication-order.d.ts +25 -0
- package/dist/os/flow/publication-order.d.ts.map +1 -0
- package/dist/os/flow/publication-order.js +75 -0
- package/dist/os/flow/publication-order.js.map +1 -0
- package/dist/os/flow/publish.d.ts +46 -0
- package/dist/os/flow/publish.d.ts.map +1 -0
- package/dist/os/flow/publish.js +209 -0
- package/dist/os/flow/publish.js.map +1 -0
- package/dist/os/flow/registry.d.ts +142 -0
- package/dist/os/flow/registry.d.ts.map +1 -0
- package/dist/os/flow/registry.js +199 -0
- package/dist/os/flow/registry.js.map +1 -0
- package/dist/os/flow/release-level.d.ts +23 -0
- package/dist/os/flow/release-level.d.ts.map +1 -0
- package/dist/os/flow/release-level.js +102 -0
- package/dist/os/flow/release-level.js.map +1 -0
- package/dist/os/flow/release-lines.d.ts +25 -0
- package/dist/os/flow/release-lines.d.ts.map +1 -0
- package/dist/os/flow/release-lines.js +172 -0
- package/dist/os/flow/release-lines.js.map +1 -0
- package/dist/os/flow/release-tags.d.ts +73 -0
- package/dist/os/flow/release-tags.d.ts.map +1 -0
- package/dist/os/flow/release-tags.js +167 -0
- package/dist/os/flow/release-tags.js.map +1 -0
- package/dist/os/flow/repo-kind.d.ts +41 -0
- package/dist/os/flow/repo-kind.d.ts.map +1 -0
- package/dist/os/flow/repo-kind.js +92 -0
- package/dist/os/flow/repo-kind.js.map +1 -0
- package/dist/os/flow/scripts.d.ts +20 -0
- package/dist/os/flow/scripts.d.ts.map +1 -0
- package/dist/os/flow/scripts.js +50 -0
- package/dist/os/flow/scripts.js.map +1 -0
- package/dist/os/flow/semver.d.ts +21 -0
- package/dist/os/flow/semver.d.ts.map +1 -0
- package/dist/os/flow/semver.js +73 -0
- package/dist/os/flow/semver.js.map +1 -0
- package/dist/os/flow/task-files.d.ts +11 -0
- package/dist/os/flow/task-files.d.ts.map +1 -0
- package/dist/os/flow/task-files.js +51 -0
- package/dist/os/flow/task-files.js.map +1 -0
- package/dist/os/flow/tests/helpers.d.ts +55 -0
- package/dist/os/flow/tests/helpers.d.ts.map +1 -0
- package/dist/os/flow/tests/helpers.js +193 -0
- package/dist/os/flow/tests/helpers.js.map +1 -0
- package/dist/os/flow/version-files.d.ts +21 -0
- package/dist/os/flow/version-files.d.ts.map +1 -0
- package/dist/os/flow/version-files.js +94 -0
- package/dist/os/flow/version-files.js.map +1 -0
- package/dist/os/flow/worktree-path.d.ts +31 -0
- package/dist/os/flow/worktree-path.d.ts.map +1 -0
- package/dist/os/flow/worktree-path.js +80 -0
- package/dist/os/flow/worktree-path.js.map +1 -0
- package/dist/os/mission/handlers/archive.d.ts.map +1 -1
- package/dist/os/mission/handlers/archive.js +44 -51
- package/dist/os/mission/handlers/archive.js.map +1 -1
- package/dist/os/mission/lockfile.d.ts +21 -0
- package/dist/os/mission/lockfile.d.ts.map +1 -0
- package/dist/os/mission/lockfile.js +76 -0
- package/dist/os/mission/lockfile.js.map +1 -0
- package/dist/os/mission/mission.module.d.ts.map +1 -1
- package/dist/os/mission/mission.module.js +2 -1
- package/dist/os/mission/mission.module.js.map +1 -1
- package/dist/os/program/handlers/seal.d.ts.map +1 -1
- package/dist/os/program/handlers/seal.js +1 -1
- package/dist/os/program/handlers/seal.js.map +1 -1
- package/dist/os/program/handlers/validate.d.ts.map +1 -1
- package/dist/os/program/handlers/validate.js +1 -1
- package/dist/os/program/handlers/validate.js.map +1 -1
- package/dist/os/program/program.module.d.ts.map +1 -1
- package/dist/os/program/program.module.js +2 -1
- package/dist/os/program/program.module.js.map +1 -1
- package/dist/os/program/schemas.d.ts +4 -6
- package/dist/os/program/schemas.d.ts.map +1 -1
- package/dist/os/program/schemas.js +16 -6
- package/dist/os/program/schemas.js.map +1 -1
- package/dist/os/program/state.d.ts +0 -1
- package/dist/os/program/state.d.ts.map +1 -1
- package/dist/os/program/state.js +1 -7
- package/dist/os/program/state.js.map +1 -1
- package/dist/os/rfc/acceptance.d.ts +21 -0
- package/dist/os/rfc/acceptance.d.ts.map +1 -1
- package/dist/os/rfc/acceptance.js +62 -13
- package/dist/os/rfc/acceptance.js.map +1 -1
- package/dist/os/rfc/frontmatter-io.d.ts +19 -0
- package/dist/os/rfc/frontmatter-io.d.ts.map +1 -1
- package/dist/os/rfc/frontmatter-io.js +65 -12
- package/dist/os/rfc/frontmatter-io.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts +6 -0
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +24 -19
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts +2 -5
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +10 -8
- package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
- package/dist/os/rfc/handlers/validate.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate.js +15 -5
- package/dist/os/rfc/handlers/validate.js.map +1 -1
- package/dist/os/rfc/index.d.ts +2 -2
- package/dist/os/rfc/index.d.ts.map +1 -1
- package/dist/os/rfc/index.js +5 -2
- package/dist/os/rfc/index.js.map +1 -1
- package/dist/os/rfc/probe-batch.d.ts +71 -0
- package/dist/os/rfc/probe-batch.d.ts.map +1 -0
- package/dist/os/rfc/probe-batch.js +251 -0
- package/dist/os/rfc/probe-batch.js.map +1 -0
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +16 -2
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
- package/dist/os/rfc/verification-evidence.js +21 -10
- package/dist/os/rfc/verification-evidence.js.map +1 -1
- package/dist/os/rfc/verification-refresh.d.ts.map +1 -1
- package/dist/os/rfc/verification-refresh.js +20 -13
- package/dist/os/rfc/verification-refresh.js.map +1 -1
- package/dist/os/system/handlers/outbox-validate.d.ts +8 -0
- package/dist/os/system/handlers/outbox-validate.d.ts.map +1 -0
- package/dist/os/system/handlers/outbox-validate.js +102 -0
- package/dist/os/system/handlers/outbox-validate.js.map +1 -0
- package/dist/os/system/handlers/system-map-validate.d.ts +13 -0
- package/dist/os/system/handlers/system-map-validate.d.ts.map +1 -0
- package/dist/os/system/handlers/system-map-validate.js +78 -0
- package/dist/os/system/handlers/system-map-validate.js.map +1 -0
- package/dist/os/system/handlers/system-outbox-scan.d.ts +10 -0
- package/dist/os/system/handlers/system-outbox-scan.d.ts.map +1 -0
- package/dist/os/system/handlers/system-outbox-scan.js +195 -0
- package/dist/os/system/handlers/system-outbox-scan.js.map +1 -0
- package/dist/os/system/handlers/system-task-collect.d.ts +13 -0
- package/dist/os/system/handlers/system-task-collect.d.ts.map +1 -0
- package/dist/os/system/handlers/system-task-collect.js +238 -0
- package/dist/os/system/handlers/system-task-collect.js.map +1 -0
- package/dist/os/system/handlers/system-task-create.d.ts +32 -0
- package/dist/os/system/handlers/system-task-create.d.ts.map +1 -0
- package/dist/os/system/handlers/system-task-create.js +216 -0
- package/dist/os/system/handlers/system-task-create.js.map +1 -0
- package/dist/os/system/handlers/system-task-dispatch.d.ts +14 -0
- package/dist/os/system/handlers/system-task-dispatch.d.ts.map +1 -0
- package/dist/os/system/handlers/system-task-dispatch.js +290 -0
- package/dist/os/system/handlers/system-task-dispatch.js.map +1 -0
- package/dist/os/system/handlers/system-task-move.d.ts +12 -0
- package/dist/os/system/handlers/system-task-move.d.ts.map +1 -0
- package/dist/os/system/handlers/system-task-move.js +217 -0
- package/dist/os/system/handlers/system-task-move.js.map +1 -0
- package/dist/os/system/handlers/system-task-status.d.ts +20 -0
- package/dist/os/system/handlers/system-task-status.d.ts.map +1 -0
- package/dist/os/system/handlers/system-task-status.js +139 -0
- package/dist/os/system/handlers/system-task-status.js.map +1 -0
- package/dist/os/system/handlers/system-versionset-record.d.ts +12 -0
- package/dist/os/system/handlers/system-versionset-record.d.ts.map +1 -0
- package/dist/os/system/handlers/system-versionset-record.js +332 -0
- package/dist/os/system/handlers/system-versionset-record.js.map +1 -0
- package/dist/os/system/index.d.ts +6 -0
- package/dist/os/system/index.d.ts.map +1 -0
- package/dist/os/system/index.js +18 -0
- package/dist/os/system/index.js.map +1 -0
- package/dist/os/system/outbox-schema.d.ts +30 -0
- package/dist/os/system/outbox-schema.d.ts.map +1 -0
- package/dist/os/system/outbox-schema.js +29 -0
- package/dist/os/system/outbox-schema.js.map +1 -0
- package/dist/os/system/repo.d.ts +64 -0
- package/dist/os/system/repo.d.ts.map +1 -0
- package/dist/os/system/repo.js +364 -0
- package/dist/os/system/repo.js.map +1 -0
- package/dist/os/system/scenario-schemas.d.ts +26 -0
- package/dist/os/system/scenario-schemas.d.ts.map +1 -0
- package/dist/os/system/scenario-schemas.js +53 -0
- package/dist/os/system/scenario-schemas.js.map +1 -0
- package/dist/os/system/schemas.d.ts +63 -0
- package/dist/os/system/schemas.d.ts.map +1 -0
- package/dist/os/system/schemas.js +83 -0
- package/dist/os/system/schemas.js.map +1 -0
- package/dist/os/system/system.module.d.ts +3 -0
- package/dist/os/system/system.module.d.ts.map +1 -0
- package/dist/os/system/system.module.js +429 -0
- package/dist/os/system/system.module.js.map +1 -0
- package/dist/os/system/task-schemas.d.ts +108 -0
- package/dist/os/system/task-schemas.d.ts.map +1 -0
- package/dist/os/system/task-schemas.js +152 -0
- package/dist/os/system/task-schemas.js.map +1 -0
- package/dist/os/system/task-store.d.ts +41 -0
- package/dist/os/system/task-store.d.ts.map +1 -0
- package/dist/os/system/task-store.js +142 -0
- package/dist/os/system/task-store.js.map +1 -0
- package/dist/os/system/tests/helpers.d.ts +30 -0
- package/dist/os/system/tests/helpers.d.ts.map +1 -0
- package/dist/os/system/tests/helpers.js +178 -0
- package/dist/os/system/tests/helpers.js.map +1 -0
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +21 -7
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js.map +1 -1
- package/dist/os/werkstatt/werkstatt.module.d.ts.map +1 -1
- package/dist/os/werkstatt/werkstatt.module.js +2 -82
- package/dist/os/werkstatt/werkstatt.module.js.map +1 -1
- package/dist/src/config/forge-config.d.ts +0 -3
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +2 -4
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/onboarding/agents-generate.d.ts.map +1 -1
- package/dist/src/onboarding/agents-generate.js +49 -4
- package/dist/src/onboarding/agents-generate.js.map +1 -1
- package/dist/src/onboarding/create.d.ts +13 -0
- package/dist/src/onboarding/create.d.ts.map +1 -1
- package/dist/src/onboarding/create.js +95 -9
- package/dist/src/onboarding/create.js.map +1 -1
- package/dist/src/onboarding/doctor.d.ts.map +1 -1
- package/dist/src/onboarding/doctor.js +2 -47
- package/dist/src/onboarding/doctor.js.map +1 -1
- package/dist/src/onboarding/upgrade.d.ts +5 -0
- package/dist/src/onboarding/upgrade.d.ts.map +1 -1
- package/dist/src/onboarding/upgrade.js +70 -1
- package/dist/src/onboarding/upgrade.js.map +1 -1
- package/dist/src/types.d.ts +9 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +2 -2
- package/docs/branch-model.md +98 -0
- package/docs/maintainers/publishing.md +10 -8
- package/docs/reference/cli.md +0 -3
- package/os/adr/handlers/implement-stamp-lock.test.ts +90 -0
- package/os/adr/handlers/implement-stamp.ts +29 -20
- package/os/checks/handlers/counters-journal.test.ts +10 -0
- package/os/checks/handlers/counters-journal.ts +8 -1
- package/os/core/core.module.ts +38 -39
- package/os/core/lock-holder.ts +88 -0
- package/os/core/stamp-lock.ts +142 -0
- package/os/flow/assets/flow-guard.sh +176 -0
- package/os/flow/branch-name.ts +139 -0
- package/os/flow/digest.ts +803 -0
- package/os/flow/flow.module.ts +796 -0
- package/os/flow/git.ts +342 -0
- package/os/flow/guard-files.ts +172 -0
- package/os/flow/handlers/flow-backmerge.ts +488 -0
- package/os/flow/handlers/flow-check.ts +450 -0
- package/os/flow/handlers/flow-cut.ts +1025 -0
- package/os/flow/handlers/flow-digest.ts +130 -0
- package/os/flow/handlers/flow-discard.ts +310 -0
- package/os/flow/handlers/flow-fix.ts +703 -0
- package/os/flow/handlers/flow-hold.ts +500 -0
- package/os/flow/handlers/flow-install.ts +1185 -0
- package/os/flow/handlers/flow-integrate.ts +623 -0
- package/os/flow/handlers/flow-open.ts +447 -0
- package/os/flow/handlers/flow-publication-retire.ts +156 -0
- package/os/flow/handlers/flow-push.ts +488 -0
- package/os/flow/handlers/flow-status.ts +283 -0
- package/os/flow/handlers/flow-unhold.ts +220 -0
- package/os/flow/handlers/flow-version.ts +196 -0
- package/os/flow/index.ts +102 -0
- package/os/flow/line-version.ts +113 -0
- package/os/flow/locks.ts +227 -0
- package/os/flow/markers.ts +135 -0
- package/os/flow/publication-order.ts +99 -0
- package/os/flow/publish.ts +272 -0
- package/os/flow/registry.ts +269 -0
- package/os/flow/release-level.ts +139 -0
- package/os/flow/release-lines.ts +208 -0
- package/os/flow/release-tags.ts +232 -0
- package/os/flow/repo-kind.ts +117 -0
- package/os/flow/scripts.ts +75 -0
- package/os/flow/semver.ts +82 -0
- package/os/flow/task-files.ts +59 -0
- package/os/flow/tests/branch-name.test.ts +136 -0
- package/os/flow/tests/fixtures/branch-names.yaml +56 -0
- package/os/flow/tests/flow-backmerge.test.ts +267 -0
- package/os/flow/tests/flow-check-version.test.ts +138 -0
- package/os/flow/tests/flow-check.test.ts +213 -0
- package/os/flow/tests/flow-cut-prepare.test.ts +298 -0
- package/os/flow/tests/flow-cut.rerun.test.ts +95 -0
- package/os/flow/tests/flow-cut.test.ts +323 -0
- package/os/flow/tests/flow-digest.test.ts +313 -0
- package/os/flow/tests/flow-discard.test.ts +220 -0
- package/os/flow/tests/flow-fix.test.ts +359 -0
- package/os/flow/tests/flow-guard-merge.test.ts +100 -0
- package/os/flow/tests/flow-guard-parity.test.ts +115 -0
- package/os/flow/tests/flow-guard-push.test.ts +100 -0
- package/os/flow/tests/flow-guard.test.ts +135 -0
- package/os/flow/tests/flow-hold.test.ts +465 -0
- package/os/flow/tests/flow-install-baseline.rerun.test.ts +73 -0
- package/os/flow/tests/flow-install-baseline.test.ts +164 -0
- package/os/flow/tests/flow-install-markers.test.ts +161 -0
- package/os/flow/tests/flow-install.rerun.test.ts +212 -0
- package/os/flow/tests/flow-install.test.ts +330 -0
- package/os/flow/tests/flow-integrate.rerun.test.ts +92 -0
- package/os/flow/tests/flow-integrate.test.ts +229 -0
- package/os/flow/tests/flow-open.test.ts +200 -0
- package/os/flow/tests/flow-publication-retire.test.ts +191 -0
- package/os/flow/tests/flow-push-publish.test.ts +282 -0
- package/os/flow/tests/flow-push-supersede.test.ts +221 -0
- package/os/flow/tests/flow-push.test.ts +160 -0
- package/os/flow/tests/flow-stale.test.ts +136 -0
- package/os/flow/tests/flow-status.test.ts +93 -0
- package/os/flow/tests/flow-task-files.test.ts +59 -0
- package/os/flow/tests/flow-version-level.test.ts +116 -0
- package/os/flow/tests/flow-version.test.ts +169 -0
- package/os/flow/tests/helpers.ts +239 -0
- package/os/flow/tests/is-flow-adopted.test.ts +71 -0
- package/os/flow/tests/locks.test.ts +219 -0
- package/os/flow/tests/publication-order.test.ts +102 -0
- package/os/flow/tests/registry.test.ts +150 -0
- package/os/flow/tests/repository-line-version.test.ts +100 -0
- package/os/flow/tests/scripts.test.ts +97 -0
- package/os/flow/tests/state-roots.test.ts +127 -0
- package/os/flow/tests/version-files.test.ts +145 -0
- package/os/flow/version-files.ts +115 -0
- package/os/flow/worktree-path.ts +107 -0
- package/os/mission/handlers/archive.test.ts +108 -36
- package/os/mission/handlers/archive.ts +46 -51
- package/os/mission/lockfile.ts +84 -0
- package/os/mission/mission.module.ts +2 -1
- package/os/program/handlers/seal.ts +1 -1
- package/os/program/handlers/validate.ts +1 -1
- package/os/program/program.module.ts +2 -1
- package/os/program/schemas.ts +51 -34
- package/os/program/state.ts +1 -9
- package/os/rfc/acceptance.ts +84 -19
- package/os/rfc/frontmatter-io.ts +78 -12
- package/os/rfc/handlers/implement-stamp-lock.test.ts +133 -0
- package/os/rfc/handlers/implement-stamp-stale.test.ts +22 -0
- package/os/rfc/handlers/implement-stamp.ts +30 -24
- package/os/rfc/handlers/validate-rules.test.ts +9 -6
- package/os/rfc/handlers/validate-rules.ts +12 -10
- package/os/rfc/handlers/validate.ts +17 -5
- package/os/rfc/index.ts +13 -1
- package/os/rfc/probe-batch.ts +329 -0
- package/os/rfc/rfc.module.ts +19 -2
- package/os/rfc/verification-emit-check.test.ts +22 -0
- package/os/rfc/verification-emit-freshness.test.ts +22 -0
- package/os/rfc/verification-emit.test.ts +22 -0
- package/os/rfc/verification-evidence.ts +21 -16
- package/os/rfc/verification-refresh.test.ts +22 -0
- package/os/rfc/verification-refresh.ts +20 -18
- package/os/rfc/verifier/rfc-1333/imp12-binding.acceptance.test.ts +9 -0
- package/os/system/handlers/outbox-validate.ts +120 -0
- package/os/system/handlers/system-map-validate.ts +107 -0
- package/os/system/handlers/system-outbox-scan.ts +320 -0
- package/os/system/handlers/system-task-collect.ts +305 -0
- package/os/system/handlers/system-task-create.ts +271 -0
- package/os/system/handlers/system-task-dispatch.ts +387 -0
- package/os/system/handlers/system-task-move.ts +353 -0
- package/os/system/handlers/system-task-status.ts +176 -0
- package/os/system/handlers/system-versionset-record.ts +476 -0
- package/os/system/index.ts +47 -0
- package/os/system/outbox-schema.ts +47 -0
- package/os/system/repo.ts +451 -0
- package/os/system/scenario-schemas.ts +62 -0
- package/os/system/schemas.ts +102 -0
- package/os/system/system.module.ts +449 -0
- package/os/system/task-schemas.ts +190 -0
- package/os/system/task-store.ts +184 -0
- package/os/system/tests/helpers.ts +189 -0
- package/os/system/tests/outbox-validate.test.ts +92 -0
- package/os/system/tests/system-map-validate.test.ts +321 -0
- package/os/system/tests/system-outbox-scan.test.ts +273 -0
- package/os/system/tests/system-profile.test.ts +90 -0
- package/os/system/tests/system-task-collect.test.ts +293 -0
- package/os/system/tests/system-task-dispatch.test.ts +279 -0
- package/os/system/tests/system-task-status.test.ts +153 -0
- package/os/system/tests/system-task.test.ts +330 -0
- package/os/system/tests/system-versionset.test.ts +314 -0
- package/os/werkstatt/handlers/werkstatt-lock-recover.ts +22 -5
- package/os/werkstatt/handlers/werkstatt-operation-validate.ts +1 -1
- package/os/werkstatt/werkstatt.module.ts +2 -85
- package/package.json +49 -1
- package/profiles/forge-shell.yaml +22 -10
- package/profiles/godot-game.yaml +24 -13
- package/profiles/knowledge.yaml +19 -0
- package/profiles/phaser-game.yaml +25 -13
- package/profiles/site-workshop.yaml +27 -10
- package/profiles/system.yaml +650 -0
- package/profiles/typescript.yaml +26 -9
- package/skills/fo/fo-outbox/SKILL.md +71 -0
- package/skills/fo/fo-session-retro/SKILL.md +18 -7
- package/skills/fo/fo-step-commit/SKILL.md +2 -1
- package/skills/fo/fo-system-dispatch/SKILL.md +65 -0
- package/skills/fo/fo-task-run/SKILL.md +75 -0
- package/src/config/forge-config.ts +2 -6
- package/src/index.ts +19 -4
- package/src/onboarding/agents-generate.ts +49 -5
- package/src/onboarding/create.ts +101 -9
- package/src/onboarding/doctor.ts +2 -51
- package/src/onboarding/upgrade.ts +86 -1
- package/src/tests/agents-generate-flow.test.ts +132 -0
- package/src/tests/create-flow.test.ts +114 -0
- package/src/tests/create.test.ts +22 -21
- package/src/tests/doctor-autonomy.test.ts +2 -1
- package/src/tests/fixtures/agents-generate-business-before.txt +6 -0
- package/src/tests/implement-stamp.test.ts +26 -3
- package/src/tests/profile-flow-hooks.test.ts +77 -0
- package/src/tests/profile-schema.test.ts +2 -1
- package/src/tests/program-schemas.test.ts +66 -6
- package/src/tests/program-spec-node.test.ts +1 -5
- package/src/tests/rfc-evidence-sync.test.ts +22 -0
- package/src/tests/rfc-implement-stamp-governance.test.ts +25 -1
- package/src/tests/rfc-verification-verdict-ingest.test.ts +22 -0
- package/src/tests/upgrade-flow.test.ts +174 -0
- package/src/types.ts +11 -2
- package/dist/os/werkstatt/handlers/session-close.d.ts +0 -13
- package/dist/os/werkstatt/handlers/session-close.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/session-close.js +0 -56
- package/dist/os/werkstatt/handlers/session-close.js.map +0 -1
- package/dist/os/werkstatt/handlers/session-engine.d.ts +0 -3
- package/dist/os/werkstatt/handlers/session-engine.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/session-engine.js +0 -28
- package/dist/os/werkstatt/handlers/session-engine.js.map +0 -1
- package/dist/os/werkstatt/handlers/session-open.d.ts +0 -10
- package/dist/os/werkstatt/handlers/session-open.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/session-open.js +0 -46
- package/dist/os/werkstatt/handlers/session-open.js.map +0 -1
- package/dist/os/werkstatt/handlers/session-status.d.ts +0 -9
- package/dist/os/werkstatt/handlers/session-status.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/session-status.js +0 -34
- package/dist/os/werkstatt/handlers/session-status.js.map +0 -1
- package/os/werkstatt/handlers/session-close.ts +0 -82
- package/os/werkstatt/handlers/session-engine.ts +0 -34
- package/os/werkstatt/handlers/session-open.ts +0 -68
- package/os/werkstatt/handlers/session-status.ts +0 -55
|
@@ -9,12 +9,15 @@ Unit tests for archive covering mission.archive. It also guards the documented p
|
|
|
9
9
|
</MODULE_CONTRACT>
|
|
10
10
|
<CHANGE_SUMMARY>
|
|
11
11
|
<item>RFC-1311: Compass header sweep — declares the archive suite's contract for test-file scaffold coverage.</item>
|
|
12
|
+
<item>RFC-1505: steps 3-5 — tracked lockfile restore, no side-effect commits</item>
|
|
13
|
+
<item>RFC-1505: review r1 — durable projections and lockfile restore hardening</item>
|
|
14
|
+
<item>RFC-1505: review r2 — clone-only sternsystem enumeration and mission-gated lockfile net</item>
|
|
12
15
|
</CHANGE_SUMMARY>
|
|
13
16
|
*/
|
|
14
17
|
|
|
15
18
|
import { test, expect, describe, beforeEach, afterEach, vi } from "vitest";
|
|
16
19
|
import fs from "node:fs/promises";
|
|
17
|
-
import { existsSync } from "node:fs";
|
|
20
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
18
21
|
import path from "node:path";
|
|
19
22
|
import os from "node:os";
|
|
20
23
|
import { runMissionArchive } from "./archive.ts";
|
|
@@ -25,9 +28,14 @@ vi.mock("../../../src/utils/fs-trash.ts", () => ({
|
|
|
25
28
|
}));
|
|
26
29
|
|
|
27
30
|
const execSyncMock = vi.fn<(cmd: string, opts?: Record<string, unknown>) => string | Buffer>();
|
|
31
|
+
const execFileSyncMock = vi.fn<
|
|
32
|
+
(cmd: string, args?: string[], opts?: Record<string, unknown>) => string | Buffer
|
|
33
|
+
>();
|
|
28
34
|
|
|
29
35
|
vi.mock("node:child_process", () => ({
|
|
30
36
|
execSync: (cmd: string, opts?: Record<string, unknown>) => execSyncMock(cmd, opts),
|
|
37
|
+
execFileSync: (cmd: string, args?: string[], opts?: Record<string, unknown>) =>
|
|
38
|
+
execFileSyncMock(cmd, args, opts),
|
|
31
39
|
}));
|
|
32
40
|
|
|
33
41
|
function makeContext(workspaceRoot: string): ForgeRuntimeContext {
|
|
@@ -77,6 +85,10 @@ beforeEach(async () => {
|
|
|
77
85
|
tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "mission-archive-test-"));
|
|
78
86
|
missionsDir = path.join(tmpDir, "missions");
|
|
79
87
|
await fs.mkdir(missionsDir, { recursive: true });
|
|
88
|
+
execSyncMock.mockReset();
|
|
89
|
+
execSyncMock.mockReturnValue("");
|
|
90
|
+
execFileSyncMock.mockReset();
|
|
91
|
+
execFileSyncMock.mockReturnValue("");
|
|
80
92
|
});
|
|
81
93
|
|
|
82
94
|
afterEach(async () => {
|
|
@@ -435,31 +447,91 @@ describe("mission.archive", () => {
|
|
|
435
447
|
expect(installCall![1]).toMatchObject({ cwd: tmpDir });
|
|
436
448
|
});
|
|
437
449
|
|
|
438
|
-
test("RFC-
|
|
450
|
+
test("RFC-1505 AC-4: install churn on pnpm-lock.yaml is restored from HEAD, never committed", async () => {
|
|
451
|
+
const tracked = "lockfileVersion: '9.0'\n\nimporters: {}\n";
|
|
452
|
+
const churned = `${tracked}\n missions/test-m018/workpiece: {}\n`;
|
|
453
|
+
const lockfilePath = path.join(tmpDir, "pnpm-lock.yaml");
|
|
454
|
+
writeFileSync(lockfilePath, tracked);
|
|
439
455
|
execSyncMock.mockReset();
|
|
440
|
-
// pnpm install succeeds, git status shows dirty lockfile, git add/commit succeed
|
|
441
456
|
execSyncMock.mockImplementation((cmd: string) => {
|
|
442
|
-
if (cmd.startsWith("pnpm install"))
|
|
443
|
-
|
|
457
|
+
if (cmd.startsWith("pnpm install")) {
|
|
458
|
+
writeFileSync(lockfilePath, churned);
|
|
459
|
+
return "";
|
|
460
|
+
}
|
|
461
|
+
return "";
|
|
462
|
+
});
|
|
463
|
+
execFileSyncMock.mockReset();
|
|
464
|
+
execFileSyncMock.mockImplementation((cmd: string, args?: string[]) => {
|
|
465
|
+
if (cmd === "git" && args?.[0] === "show") return tracked;
|
|
444
466
|
return "";
|
|
445
467
|
});
|
|
446
468
|
await writeMissionManifest(missionsDir, "test-m018", "closed");
|
|
447
469
|
|
|
448
470
|
await runMissionArchive(makeInput(), makeContext(tmpDir));
|
|
449
471
|
|
|
450
|
-
|
|
451
|
-
|
|
472
|
+
expect(readFileSync(lockfilePath, "utf-8")).toBe(tracked);
|
|
473
|
+
// maxBuffer must cover real lockfiles (>10 MiB) — the 1 MiB execFileSync
|
|
474
|
+
// default would ENOBUFS-kill `git show` and leave the churn in place.
|
|
475
|
+
expect(execFileSyncMock).toHaveBeenCalledWith(
|
|
476
|
+
"git",
|
|
477
|
+
["show", "HEAD:pnpm-lock.yaml"],
|
|
478
|
+
expect.objectContaining({ cwd: tmpDir, maxBuffer: 64 * 1024 * 1024 }),
|
|
479
|
+
);
|
|
480
|
+
const gitWrites = execSyncMock.mock.calls.filter(
|
|
481
|
+
(c) =>
|
|
482
|
+
typeof c[0] === "string" &&
|
|
483
|
+
(c[0].startsWith("git add") ||
|
|
484
|
+
c[0].startsWith("git rm") ||
|
|
485
|
+
c[0].startsWith("git commit") ||
|
|
486
|
+
c[0].startsWith("git status")),
|
|
452
487
|
);
|
|
453
|
-
expect(
|
|
454
|
-
expect(commitCall![0]).toContain("refresh pnpm-lock.yaml after mission.archive");
|
|
488
|
+
expect(gitWrites).toEqual([]);
|
|
455
489
|
});
|
|
456
490
|
|
|
457
|
-
test("RFC-
|
|
491
|
+
test("RFC-1505 AC-4: no tracked lockfile at HEAD → churn left in place, no git calls", async () => {
|
|
492
|
+
const churned = "lockfileVersion: '9.0'\n# local churn\n";
|
|
493
|
+
const lockfilePath = path.join(tmpDir, "pnpm-lock.yaml");
|
|
458
494
|
execSyncMock.mockReset();
|
|
459
495
|
execSyncMock.mockImplementation((cmd: string) => {
|
|
460
|
-
if (cmd.startsWith("pnpm install"))
|
|
496
|
+
if (cmd.startsWith("pnpm install")) {
|
|
497
|
+
writeFileSync(lockfilePath, churned);
|
|
498
|
+
return "";
|
|
499
|
+
}
|
|
461
500
|
return "";
|
|
462
501
|
});
|
|
502
|
+
execFileSyncMock.mockReset();
|
|
503
|
+
execFileSyncMock.mockImplementation(() => {
|
|
504
|
+
throw Object.assign(new Error("fatal: path does not exist"), { status: 128 });
|
|
505
|
+
});
|
|
506
|
+
await writeMissionManifest(missionsDir, "test-m018b", "closed");
|
|
507
|
+
|
|
508
|
+
const data = unwrap(await runMissionArchive(makeInput(), makeContext(tmpDir)));
|
|
509
|
+
|
|
510
|
+
expect(data.moved).toHaveLength(1);
|
|
511
|
+
expect(readFileSync(lockfilePath, "utf-8")).toBe(churned);
|
|
512
|
+
const gitCalls = execSyncMock.mock.calls.filter(
|
|
513
|
+
(c) => typeof c[0] === "string" && c[0].startsWith("git"),
|
|
514
|
+
);
|
|
515
|
+
expect(gitCalls).toEqual([]);
|
|
516
|
+
});
|
|
517
|
+
|
|
518
|
+
test("RFC-0804: pnpm install failure is non-fatal and still restores the lockfile", async () => {
|
|
519
|
+
const tracked = "lockfileVersion: '9.0'\n\nimporters: {}\n";
|
|
520
|
+
const churned = `${tracked}\n missions/test-m019/workpiece: {}\n`;
|
|
521
|
+
const lockfilePath = path.join(tmpDir, "pnpm-lock.yaml");
|
|
522
|
+
execSyncMock.mockReset();
|
|
523
|
+
execSyncMock.mockImplementation((cmd: string) => {
|
|
524
|
+
if (cmd.startsWith("pnpm install")) {
|
|
525
|
+
writeFileSync(lockfilePath, churned);
|
|
526
|
+
throw new Error("ECONNREFUSED");
|
|
527
|
+
}
|
|
528
|
+
return "";
|
|
529
|
+
});
|
|
530
|
+
execFileSyncMock.mockReset();
|
|
531
|
+
execFileSyncMock.mockImplementation((cmd: string, args?: string[]) => {
|
|
532
|
+
if (cmd === "git" && args?.[0] === "show") return tracked;
|
|
533
|
+
throw Object.assign(new Error("unexpected"), { status: 1 });
|
|
534
|
+
});
|
|
463
535
|
await writeMissionManifest(missionsDir, "test-m019", "closed");
|
|
464
536
|
|
|
465
537
|
const data = unwrap(await runMissionArchive(makeInput(), makeContext(tmpDir)));
|
|
@@ -467,6 +539,8 @@ describe("mission.archive", () => {
|
|
|
467
539
|
expect(data.moved).toHaveLength(1);
|
|
468
540
|
expect(data.moved[0].missionId).toBe("test-m019");
|
|
469
541
|
expect(existsSync(path.join(missionsDir, "archive", "closed", "test-m019"))).toBe(true);
|
|
542
|
+
// A failed install still leaves churn — restore must run regardless.
|
|
543
|
+
expect(readFileSync(lockfilePath, "utf-8")).toBe(tracked);
|
|
470
544
|
});
|
|
471
545
|
|
|
472
546
|
test("RFC-0804: dry-run skips lockfile refresh", async () => {
|
|
@@ -624,52 +698,50 @@ describe("mission.archive", () => {
|
|
|
624
698
|
expect(data.skipped[0].reason).toContain("use --clean-orphans");
|
|
625
699
|
});
|
|
626
700
|
|
|
627
|
-
test("RFC-
|
|
701
|
+
test("RFC-1505: archive never stages or commits mission moves — no git calls at all", async () => {
|
|
628
702
|
execSyncMock.mockReset();
|
|
629
703
|
execSyncMock.mockImplementation((cmd: string) => {
|
|
630
704
|
if (cmd.startsWith("pnpm install")) return "";
|
|
631
|
-
if (cmd.startsWith("git status --porcelain pnpm-lock.yaml")) return "M pnpm-lock.yaml";
|
|
632
|
-
// git check-ignore exits 0 → path is ignored (missions/ is gitignored)
|
|
633
|
-
if (cmd.startsWith("git check-ignore")) return "";
|
|
634
705
|
return "";
|
|
635
706
|
});
|
|
707
|
+
execFileSyncMock.mockReset();
|
|
708
|
+
execFileSyncMock.mockReturnValue("tracked\n");
|
|
636
709
|
await writeMissionManifest(missionsDir, "test-r1138-01", "closed");
|
|
637
710
|
|
|
638
|
-
await runMissionArchive(makeInput(), makeContext(tmpDir));
|
|
639
|
-
|
|
640
|
-
const checkIgnoreCall = execSyncMock.mock.calls.find(
|
|
641
|
-
(c) => typeof c[0] === "string" && c[0].startsWith("git check-ignore"),
|
|
642
|
-
);
|
|
643
|
-
expect(checkIgnoreCall).toBeDefined();
|
|
711
|
+
const data = unwrap(await runMissionArchive(makeInput(), makeContext(tmpDir)));
|
|
644
712
|
|
|
645
|
-
|
|
646
|
-
|
|
713
|
+
expect(data.moved).toHaveLength(1);
|
|
714
|
+
expect(existsSync(path.join(missionsDir, "archive", "closed", "test-r1138-01"))).toBe(
|
|
715
|
+
true,
|
|
647
716
|
);
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
// Lockfile itself is still staged + committed
|
|
651
|
-
const lockfileAdd = execSyncMock.mock.calls.find(
|
|
652
|
-
(c) => typeof c[0] === "string" && c[0] === "git add pnpm-lock.yaml",
|
|
717
|
+
const gitCalls = execSyncMock.mock.calls.filter(
|
|
718
|
+
(c) => typeof c[0] === "string" && c[0].startsWith("git"),
|
|
653
719
|
);
|
|
654
|
-
expect(
|
|
720
|
+
expect(gitCalls).toEqual([]);
|
|
655
721
|
});
|
|
656
722
|
|
|
657
|
-
test("RFC-
|
|
723
|
+
test("RFC-1505: restore runs on any branch — no protected-branch check remains", async () => {
|
|
658
724
|
execSyncMock.mockReset();
|
|
659
725
|
execSyncMock.mockImplementation((cmd: string) => {
|
|
660
726
|
if (cmd.startsWith("pnpm install")) return "";
|
|
661
|
-
if (cmd.startsWith("git status --porcelain pnpm-lock.yaml")) return "M pnpm-lock.yaml";
|
|
662
|
-
// git check-ignore exits 1 → not ignored → execSync throws
|
|
663
|
-
if (cmd.startsWith("git check-ignore")) throw new Error("exit 1");
|
|
664
727
|
return "";
|
|
665
728
|
});
|
|
729
|
+
execFileSyncMock.mockReset();
|
|
730
|
+
execFileSyncMock.mockImplementation((cmd: string, args?: string[]) => {
|
|
731
|
+
if (cmd === "git" && args?.[0] === "show") return "tracked\n";
|
|
732
|
+
return "";
|
|
733
|
+
});
|
|
734
|
+
// A flow-adopted checkout on a protected branch — RFC-1505 removes the
|
|
735
|
+
// branch check entirely: no symbolic-ref probe, no staging, no commits.
|
|
736
|
+
await fs.mkdir(path.join(tmpDir, "hooks"), { recursive: true });
|
|
737
|
+
await fs.writeFile(path.join(tmpDir, "hooks", "flow-guard.sh"), "#!/bin/sh\n");
|
|
666
738
|
await writeMissionManifest(missionsDir, "test-r1138-02", "closed");
|
|
667
739
|
|
|
668
740
|
await runMissionArchive(makeInput(), makeContext(tmpDir));
|
|
669
741
|
|
|
670
|
-
const
|
|
671
|
-
(c) => typeof c[0] === "string" && c[0].startsWith("git
|
|
742
|
+
const gitCalls = execSyncMock.mock.calls.filter(
|
|
743
|
+
(c) => typeof c[0] === "string" && c[0].startsWith("git"),
|
|
672
744
|
);
|
|
673
|
-
expect(
|
|
745
|
+
expect(gitCalls).toEqual([]);
|
|
674
746
|
});
|
|
675
747
|
});
|
|
@@ -13,14 +13,12 @@ archive subdirectories back to missions/.
|
|
|
13
13
|
</non-goals>
|
|
14
14
|
</MODULE_CONTRACT>
|
|
15
15
|
<CHANGE_SUMMARY>
|
|
16
|
-
<item>RFC-1097: sweep — packages/forge + services clean
|
|
17
|
-
|
|
18
|
-
Sweep batch 2: real KEY_DECISIONS on 10 files, expanded purposes (CONTRACT-02/PURPOSE-02), headers on mission/index + gen-upstreams, sanitizeItemText in summary.record (literal Compass tags corrupted history), excludedPaths for wrangler types, test-fixtures testPattern. forge+services now 0 diagnostics under --mode error.</item>
|
|
19
|
-
<item>RFC-1138: pipeline hygiene — module-scoped exempt entries, archive gitignore guard, dns upsert to deploy phases, promote auto-sync, rfc.create claim protocol, siteHasRuntime filter</item>
|
|
20
|
-
<item>RFC-1397: ship-in-flight guard — per-candidate isShipInFlight check in both move phases; SHIP-INFLIGHT-01 skip, SHIP-INFLIGHT-02 stale warn, --ship-op self-exemption for the ship's own terminal archive step.</item>
|
|
21
|
-
<item>warpgogol-m000175 fo-fix: deferred-release guard — closed missions without releaseId keep workpiece node_modules on archive (archived dirs fall outside the pnpm-workspace glob, so deps cannot be reinstalled in place and release.prepare would fail on WORKPIECE-IMPORTS-01); released missions still get full service-folder cleanup.</item>
|
|
22
16
|
<item>RFC-1397: harden ship-in-flight guard per independent review (RFC-1397)</item>
|
|
23
|
-
<
|
|
17
|
+
<item>RFC-1495: step 1 - forge state roots</item>
|
|
18
|
+
<item>RFC-1505: steps 3-5 — tracked lockfile restore, no side-effect commits</item>
|
|
19
|
+
<item>RFC-1505: review r1 — durable projections and lockfile restore hardening</item>
|
|
20
|
+
<item>RFC-1505: review r2 — clone-only sternsystem enumeration and mission-gated lockfile net</item>
|
|
21
|
+
<history>RFC-0573, RFC-0733, RFC-0801, RFC-0804, RFC-0982, RFC-1097, RFC-1138, RFC-1397, warpgogol-m000175</history>
|
|
24
22
|
</CHANGE_SUMMARY>
|
|
25
23
|
*/
|
|
26
24
|
|
|
@@ -35,6 +33,7 @@ import type {
|
|
|
35
33
|
ForgeRuntimeContext,
|
|
36
34
|
} from "../../../src/types.ts";
|
|
37
35
|
import { trashPath } from "../../../src/utils/fs-trash.ts";
|
|
36
|
+
import { writeFileIfChanged } from "../../../src/utils/fs-idempotent.ts";
|
|
38
37
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
39
38
|
// @ts-ignore — workspace dep, may not be installed when forge is used standalone from npm
|
|
40
39
|
import type { ShipInflightResult } from "@warpgogol/werkstatt-shared/kernel/ship-inflight";
|
|
@@ -48,6 +47,8 @@ import {
|
|
|
48
47
|
type MissionArchiveResult,
|
|
49
48
|
} from "../types.ts";
|
|
50
49
|
import { loadPinnedManifest, isPinned, isIntraDirMove } from "../../core/handlers/pinned-check.ts";
|
|
50
|
+
import { restoreTrackedLockfile, execFileSyncAdapter } from "../lockfile.ts";
|
|
51
|
+
import { resolveStateRoots } from "../../flow/worktree-path.ts";
|
|
51
52
|
|
|
52
53
|
const SERVICE_FOLDERS = [
|
|
53
54
|
"node_modules",
|
|
@@ -289,6 +290,16 @@ export async function runMissionArchive(
|
|
|
289
290
|
// marker, never passed by hand).
|
|
290
291
|
const shipOp = typeof input.flags["ship-op"] === "string" ? input.flags["ship-op"] : undefined;
|
|
291
292
|
const io: WorkspaceIO = context.io ?? fs;
|
|
293
|
+
|
|
294
|
+
// RFC-1495: open missions live in the worktree they were opened in, but the
|
|
295
|
+
// archive is durable state — it belongs to the primary checkout. In a
|
|
296
|
+
// single-worktree repo both roots coincide and nothing changes.
|
|
297
|
+
const stateRoots = await resolveStateRoots(workspaceRoot, io).catch(() => ({
|
|
298
|
+
worktreeRoot: workspaceRoot,
|
|
299
|
+
primaryRoot: workspaceRoot,
|
|
300
|
+
isPrimary: true,
|
|
301
|
+
}));
|
|
302
|
+
const archiveRoot = path.join(stateRoots.primaryRoot, MISSIONS_DIR, ARCHIVE_DIR_NAME);
|
|
292
303
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
293
304
|
// @ts-ignore — workspace dep, may not be installed when forge is used standalone from npm
|
|
294
305
|
let shipInflightMod: typeof import("@warpgogol/werkstatt-shared/kernel/ship-inflight") | null =
|
|
@@ -485,7 +496,7 @@ export async function runMissionArchive(
|
|
|
485
496
|
}
|
|
486
497
|
}
|
|
487
498
|
|
|
488
|
-
const targetDir = path.join(
|
|
499
|
+
const targetDir = path.join(archiveRoot, state);
|
|
489
500
|
const targetPath = path.join(targetDir, missionId);
|
|
490
501
|
const targetRel = `${MISSIONS_DIR}/${ARCHIVE_DIR_NAME}/${state}/${missionId}`;
|
|
491
502
|
|
|
@@ -527,7 +538,7 @@ export async function runMissionArchive(
|
|
|
527
538
|
}
|
|
528
539
|
|
|
529
540
|
// Phase 2: Scan missions/archive/<state>/ for non-terminal missions to move back
|
|
530
|
-
const archivePath =
|
|
541
|
+
const archivePath = archiveRoot;
|
|
531
542
|
if (existsSync(archivePath)) {
|
|
532
543
|
const stateDirs = await fs.readdir(archivePath);
|
|
533
544
|
const stateDirNames = stateDirs.filter((e) => e.isDirectory).map((e) => e.name);
|
|
@@ -638,59 +649,43 @@ export async function runMissionArchive(
|
|
|
638
649
|
}
|
|
639
650
|
}
|
|
640
651
|
|
|
641
|
-
// RFC-0804: Post-move
|
|
652
|
+
// RFC-0804: Post-move dependency prune. RFC-1505: the local install may churn
|
|
653
|
+
// pnpm-lock.yaml — that churn is mission-local state and is never committed;
|
|
654
|
+
// the tracked lockfile is restored to HEAD bytes instead.
|
|
642
655
|
if (!dryRun && moved.length > 0) {
|
|
643
656
|
try {
|
|
657
|
+
// maxBuffer matches restoreTrackedLockfile's adapter — install output on
|
|
658
|
+
// a pruned workspace can exceed the ~1 MiB execSync default.
|
|
644
659
|
execSync("pnpm install", {
|
|
645
660
|
cwd: workspaceRoot,
|
|
646
661
|
stdio: ["pipe", "pipe", "pipe"],
|
|
647
662
|
timeout: 120_000,
|
|
663
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
648
664
|
});
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
});
|
|
669
|
-
targetIgnored = true;
|
|
670
|
-
} catch {
|
|
671
|
-
targetIgnored = false;
|
|
672
|
-
}
|
|
673
|
-
if (!targetIgnored) {
|
|
674
|
-
execSync(`git add -A ${JSON.stringify(m.to)}`, {
|
|
675
|
-
cwd: workspaceRoot,
|
|
676
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
677
|
-
});
|
|
678
|
-
}
|
|
679
|
-
if (existsSync(m.from)) continue;
|
|
680
|
-
execSync(`git rm -r --cached --ignore-unmatch ${JSON.stringify(m.from)}`, {
|
|
681
|
-
cwd: workspaceRoot,
|
|
682
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
683
|
-
});
|
|
684
|
-
}
|
|
685
|
-
execSync(
|
|
686
|
-
`git commit -m ${JSON.stringify(`chore: refresh pnpm-lock.yaml after mission.archive (${moved.length} moved)`)}`,
|
|
687
|
-
{ cwd: workspaceRoot, stdio: ["pipe", "pipe", "pipe"] },
|
|
665
|
+
} catch (installErr) {
|
|
666
|
+
logger.warn(
|
|
667
|
+
` pnpm install failed after archive — dependencies may be stale. Run 'pnpm install' manually: ${installErr instanceof Error ? installErr.message : String(installErr)}`,
|
|
668
|
+
);
|
|
669
|
+
}
|
|
670
|
+
try {
|
|
671
|
+
// Restore runs even when install failed — a partially-rewritten
|
|
672
|
+
// lockfile is still mission-local churn, never tracked bytes.
|
|
673
|
+
const restored = await restoreTrackedLockfile(workspaceRoot, {
|
|
674
|
+
...execFileSyncAdapter(),
|
|
675
|
+
writeFile: async (target, content) => {
|
|
676
|
+
await writeFileIfChanged(target, content);
|
|
677
|
+
},
|
|
678
|
+
});
|
|
679
|
+
if (restored) {
|
|
680
|
+
logger.info(" Restored pnpm-lock.yaml to HEAD bytes (install churn discarded)");
|
|
681
|
+
} else {
|
|
682
|
+
logger.warn(
|
|
683
|
+
" No tracked pnpm-lock.yaml at HEAD — install churn left in place; nothing to restore",
|
|
688
684
|
);
|
|
689
|
-
logger.info(` Committed pnpm-lock.yaml refresh (${moved.length} missions archived)`);
|
|
690
685
|
}
|
|
691
686
|
} catch (refreshErr) {
|
|
692
687
|
logger.warn(
|
|
693
|
-
` Lockfile
|
|
688
|
+
` Lockfile restore failed after archive — lockfile may be stale. Run 'pnpm install' manually: ${refreshErr instanceof Error ? refreshErr.message : String(refreshErr)}`,
|
|
694
689
|
);
|
|
695
690
|
}
|
|
696
691
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>
|
|
4
|
+
Tracked lockfile restoration — after a mission lifecycle step runs `pnpm install`
|
|
5
|
+
for dependency pruning, the local install may rewrite `pnpm-lock.yaml`. That churn
|
|
6
|
+
is local mission state and must never land in tracked artifacts: this helper
|
|
7
|
+
restores the file committed at HEAD so the worktree returns clean.
|
|
8
|
+
</purpose>
|
|
9
|
+
<non-goals>
|
|
10
|
+
<item>Does not commit, stage, or delete the lockfile — only restores tracked bytes.</item>
|
|
11
|
+
<item>Does not synthesize a lockfile when HEAD carries none — returns false and changes nothing.</item>
|
|
12
|
+
</non-goals>
|
|
13
|
+
</MODULE_CONTRACT>
|
|
14
|
+
<CHANGE_SUMMARY>
|
|
15
|
+
<item>RFC-1505: step 3 — tracked lockfile restore helper</item>
|
|
16
|
+
<item>RFC-1505: steps 3-5 — tracked lockfile restore, no side-effect commits</item>
|
|
17
|
+
<item>RFC-1505: review r1 — durable projections and lockfile restore hardening</item>
|
|
18
|
+
<item>RFC-1505: review r2 — clone-only sternsystem enumeration and mission-gated lockfile net</item>
|
|
19
|
+
</CHANGE_SUMMARY>
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import path from "node:path";
|
|
23
|
+
import { execFileSync } from "../../src/utils/sync-fs.ts";
|
|
24
|
+
import type { ExecOptions, ExecResult, WorkspaceIO } from "../../src/types.ts";
|
|
25
|
+
|
|
26
|
+
const LOCKFILE_NAME = "pnpm-lock.yaml";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Restore `pnpm-lock.yaml` to the bytes committed at HEAD.
|
|
30
|
+
*
|
|
31
|
+
* Runs `git show HEAD:pnpm-lock.yaml` in `root`. On exit 0 the stdout is written
|
|
32
|
+
* back over `root/pnpm-lock.yaml` and the call returns `true`. On a non-zero
|
|
33
|
+
* exit (no such file at HEAD, not a git repository) it returns `false` and
|
|
34
|
+
* changes nothing. Spawn failures (missing git binary) propagate.
|
|
35
|
+
* `root` is the repository root — git resolves `HEAD:pnpm-lock.yaml` against
|
|
36
|
+
* the enclosing repo's top level, so passing a nested directory of a larger
|
|
37
|
+
* repo would restore that repo's root lockfile instead.
|
|
38
|
+
*/
|
|
39
|
+
export async function restoreTrackedLockfile(
|
|
40
|
+
root: string,
|
|
41
|
+
io: Pick<WorkspaceIO, "exec" | "writeFile">,
|
|
42
|
+
): Promise<boolean> {
|
|
43
|
+
const res = await io.exec("git", ["show", `HEAD:${LOCKFILE_NAME}`], { cwd: root });
|
|
44
|
+
if (res.exitCode !== 0) return false;
|
|
45
|
+
await io.writeFile(path.join(root, LOCKFILE_NAME), res.stdout);
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Sync-world adapter for `io.exec` — wraps `execFileSync` so handlers that still
|
|
51
|
+
* run on `execSync`/`execFileSync` (e.g. mission.archive) can call
|
|
52
|
+
* `restoreTrackedLockfile` without duplicating its logic. A non-zero exit maps
|
|
53
|
+
* to `exitCode`; a spawn failure (missing binary) keeps throwing.
|
|
54
|
+
*/
|
|
55
|
+
export function execFileSyncAdapter(): Pick<WorkspaceIO, "exec"> {
|
|
56
|
+
return {
|
|
57
|
+
exec(command: string, args: string[], opts?: ExecOptions): Promise<ExecResult> {
|
|
58
|
+
try {
|
|
59
|
+
const stdout = execFileSync(command, args, {
|
|
60
|
+
cwd: opts?.cwd,
|
|
61
|
+
encoding: "utf-8",
|
|
62
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
63
|
+
timeout: opts?.timeoutMs,
|
|
64
|
+
// Real pnpm-lock.yaml files exceed the 1 MiB default many times over —
|
|
65
|
+
// an ENOBUFS kill carries status null and would rethrow below.
|
|
66
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
67
|
+
});
|
|
68
|
+
return Promise.resolve({ exitCode: 0, stdout, stderr: "" });
|
|
69
|
+
} catch (err) {
|
|
70
|
+
const e = err as {
|
|
71
|
+
status?: number | null;
|
|
72
|
+
stdout?: Buffer | string;
|
|
73
|
+
stderr?: Buffer | string;
|
|
74
|
+
};
|
|
75
|
+
if (e.status === undefined || e.status === null) throw err;
|
|
76
|
+
return Promise.resolve({
|
|
77
|
+
exitCode: e.status,
|
|
78
|
+
stdout: e.stdout?.toString() ?? "",
|
|
79
|
+
stderr: e.stderr?.toString() ?? "",
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
<item>RFC-0573: initial forgeMissionModule registering mission.archive command.</item>
|
|
10
10
|
<item>RFC-0982: add --clean-orphans flag for trashing orphaned remnant directories.</item>
|
|
11
11
|
<item>RFC-1397: declare internal --ship-op flag — ship's own opId marker for the terminal archive step exemption.</item>
|
|
12
|
+
<item>RFC-1505: review r2 — clone-only sternsystem enumeration and mission-gated lockfile net</item>
|
|
12
13
|
</CHANGE_SUMMARY>
|
|
13
14
|
*/
|
|
14
15
|
|
|
@@ -33,7 +34,7 @@ export async function createForgeMissionModule(): Promise<ForgeModule> {
|
|
|
33
34
|
"Prefer the docs.archive umbrella command unless you need to archive only missions.",
|
|
34
35
|
scope: "workspace",
|
|
35
36
|
mutatesState: true,
|
|
36
|
-
writes: ["missions/*", "missions/archive/**"],
|
|
37
|
+
writes: ["missions/*", "missions/archive/**", "pnpm-lock.yaml"],
|
|
37
38
|
generates: [],
|
|
38
39
|
reads: ["missions/**"],
|
|
39
40
|
cacheable: false,
|
|
@@ -11,6 +11,7 @@ to sealed, and records the seal in the program manifest (RFC-0856).</purpose>
|
|
|
11
11
|
<CHANGE_SUMMARY>
|
|
12
12
|
<item>RFC-0856: initial seal command handler.</item>
|
|
13
13
|
<item>RFC-0857: reciprocal specRef/materializedAs mapping verification for spec-node packets (AC-7).</item>
|
|
14
|
+
<item>RFC-1499: step 3 — program manifests drop branch; legacy branch key stripped at parse</item>
|
|
14
15
|
</CHANGE_SUMMARY>
|
|
15
16
|
*/
|
|
16
17
|
|
|
@@ -154,7 +155,6 @@ export async function runSeal(
|
|
|
154
155
|
|
|
155
156
|
// Validate transition
|
|
156
157
|
const violations = validateSealTransition(manifest, entry, packet, {
|
|
157
|
-
branch,
|
|
158
158
|
head,
|
|
159
159
|
isClean,
|
|
160
160
|
hasActiveLease,
|
|
@@ -10,6 +10,7 @@ machine rules (RFC-0856).</purpose>
|
|
|
10
10
|
</MODULE_CONTRACT>
|
|
11
11
|
<CHANGE_SUMMARY>
|
|
12
12
|
<item>RFC-0856: initial validate command handler.</item>
|
|
13
|
+
<item>RFC-1499: step 3 — program manifests drop branch; legacy branch key stripped at parse</item>
|
|
13
14
|
</CHANGE_SUMMARY>
|
|
14
15
|
*/
|
|
15
16
|
|
|
@@ -162,7 +163,6 @@ export async function runValidate(
|
|
|
162
163
|
}
|
|
163
164
|
|
|
164
165
|
const sealViolations = validateSealTransition(manifest, entry, packet, {
|
|
165
|
-
branch,
|
|
166
166
|
head,
|
|
167
167
|
isClean,
|
|
168
168
|
hasActiveLease,
|
|
@@ -15,6 +15,7 @@ Mechanical sweep: the field only ever gated --all argv acceptance; fan-out
|
|
|
15
15
|
follows the parsed selector. Guard renamed assertAllSitesAllowed ->
|
|
16
16
|
assertAllFlagAccepted, message updated. 417 declaration sites + type
|
|
17
17
|
surfaces (KernelCommandMetadata, ForgeCommandMetadata) in one atomic pass.</item>
|
|
18
|
+
<item>RFC-1499: step 3 — program manifests drop branch; legacy branch key stripped at parse</item>
|
|
18
19
|
</CHANGE_SUMMARY>
|
|
19
20
|
*/
|
|
20
21
|
|
|
@@ -41,7 +42,7 @@ export async function createForgeProgramModule(): Promise<ForgeModule> {
|
|
|
41
42
|
contract: "program",
|
|
42
43
|
rules: [],
|
|
43
44
|
description:
|
|
44
|
-
"Validate a program packet against schema, source hashes,
|
|
45
|
+
"Validate a program packet against schema, source hashes, head, " +
|
|
45
46
|
"and state machine rules. Read-only. " +
|
|
46
47
|
"Usage: program.packet.validate --program=RFC-XXXX --packet=NNN-foo --phase=draft --json",
|
|
47
48
|
scope: "workspace",
|
package/os/program/schemas.ts
CHANGED
|
@@ -11,6 +11,7 @@ reject unknown fields (RFC-0856).</purpose>
|
|
|
11
11
|
<CHANGE_SUMMARY>
|
|
12
12
|
<item>RFC-0856: initial program control-plane schemas.</item>
|
|
13
13
|
<item>RFC-0857: phase-aware lease schema (preparation | execution) and preparation report schema.</item>
|
|
14
|
+
<item>RFC-1499: step 3 — program manifests drop branch; legacy branch key stripped at parse</item>
|
|
14
15
|
</CHANGE_SUMMARY>
|
|
15
16
|
*/
|
|
16
17
|
|
|
@@ -36,6 +37,18 @@ export const programLeasePhaseSchema = z.enum(["preparation", "execution"]);
|
|
|
36
37
|
// Program manifest: forge/program@1
|
|
37
38
|
// ---------------------------------------------------------------------------
|
|
38
39
|
|
|
40
|
+
// RFC-1499: `branch` was removed from both schemas — under the fixed branch
|
|
41
|
+
// model work happens on per-session auto/* branches, so a pinned program
|
|
42
|
+
// branch can never match. Legacy manifests that still carry `branch` parse:
|
|
43
|
+
// the key is stripped before the strict object runs (ignored, not rejected).
|
|
44
|
+
function stripLegacyBranch(value: unknown): unknown {
|
|
45
|
+
if (typeof value === "object" && value !== null && "branch" in value) {
|
|
46
|
+
const { branch: _dropped, ...rest } = value as Record<string, unknown>;
|
|
47
|
+
return rest;
|
|
48
|
+
}
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
|
|
39
52
|
export const programPacketIndexEntrySchema = z.object({
|
|
40
53
|
order: z.number().int().min(0),
|
|
41
54
|
packetId: z.string().min(1),
|
|
@@ -50,20 +63,22 @@ export const programPacketIndexEntrySchema = z.object({
|
|
|
50
63
|
completion: z.string().nullable(),
|
|
51
64
|
});
|
|
52
65
|
|
|
53
|
-
export const programManifestSchema = z
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
export const programManifestSchema = z.preprocess(
|
|
67
|
+
stripLegacyBranch,
|
|
68
|
+
z
|
|
69
|
+
.object({
|
|
70
|
+
schema: z.literal("forge/program@1"),
|
|
71
|
+
program: z.string().min(1),
|
|
72
|
+
title: z.string().min(1),
|
|
73
|
+
state: programStateSchema,
|
|
74
|
+
currentPacket: z.string().min(1),
|
|
75
|
+
steward: programActorSchema,
|
|
76
|
+
sequential: z.literal(true),
|
|
77
|
+
parallelism: z.literal(1),
|
|
78
|
+
packets: z.array(programPacketIndexEntrySchema).min(1),
|
|
79
|
+
})
|
|
80
|
+
.strict(),
|
|
81
|
+
);
|
|
67
82
|
|
|
68
83
|
// ---------------------------------------------------------------------------
|
|
69
84
|
// Program packet: forge/program-packet@1
|
|
@@ -80,26 +95,28 @@ export const requiredValidationSchema = z.object({
|
|
|
80
95
|
expectedDiagnostics: z.array(z.string()),
|
|
81
96
|
});
|
|
82
97
|
|
|
83
|
-
export const programPacketSchema = z
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
export const programPacketSchema = z.preprocess(
|
|
99
|
+
stripLegacyBranch,
|
|
100
|
+
z
|
|
101
|
+
.object({
|
|
102
|
+
schema: z.literal("forge/program-packet@1"),
|
|
103
|
+
program: z.string().min(1),
|
|
104
|
+
packetId: z.string().min(1),
|
|
105
|
+
state: z.enum(["draft", "sealed"]),
|
|
106
|
+
governingDecision: z.string().min(1),
|
|
107
|
+
decisionKind: z.enum(["rfc", "spec-amendment", "spec-node"]),
|
|
108
|
+
resolvedRfc: z.string().nullable(),
|
|
109
|
+
dependsOnPacket: z.string().nullable(),
|
|
110
|
+
baseCommit: z.string().nullable(),
|
|
111
|
+
steward: programActorSchema,
|
|
112
|
+
normativeSources: z.array(normativeSourceSchema),
|
|
113
|
+
allowedFiles: z.array(z.string().min(1)).min(1),
|
|
114
|
+
forbiddenFiles: z.array(z.string().min(1)),
|
|
115
|
+
permittedTransitionDiagnostics: z.array(z.string()),
|
|
116
|
+
requiredValidations: z.array(requiredValidationSchema),
|
|
117
|
+
})
|
|
118
|
+
.strict(),
|
|
119
|
+
);
|
|
103
120
|
|
|
104
121
|
// ---------------------------------------------------------------------------
|
|
105
122
|
// Program packet lease: forge/program-packet-lease@1
|