@cassiomc1/forgeloop 1.13.0 → 2.0.0-rc.2
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/AGENT_COMPATIBILITY.md +8 -0
- package/CONTRIBUTING.md +11 -7
- package/DOCS_INDEX.md +37 -4
- package/ENG/c-development-eng.md +2 -2
- package/ENG/cpp-development-eng.md +2 -2
- package/ENG/dotnet-aspnetcore-development-eng.md +7 -1
- package/ENG/flutter-development-eng.md +4 -2
- package/ENG/go-development-eng.md +2 -2
- package/ENG/java-development-eng.md +3 -3
- package/ENG/nodejs-backend-development-eng.md +10 -6
- package/ENG/php-development-eng.md +3 -3
- package/ENG/python-development-eng.md +205 -0
- package/ENG/rust-development-eng.md +42 -1
- package/ENG/sec-code-eng.md +7 -7
- package/ENG/sql-development-eng.md +4 -4
- package/ENG/swift-development-eng.md +5 -4
- package/ENG/test-code-eng.md +1 -1
- package/ENG/typescript-development-eng.md +4 -4
- package/EXECUTION_STATE.md +12 -0
- package/GUIDE_ROUTER.md +6 -0
- package/LICENSE +133 -21
- package/LOOP_ENGINEERING.md +28 -2
- package/LOOP_SYSTEM_DESIGN.md +10 -10
- package/ORCHESTRATOR_INTEGRATION.md +9 -5
- package/PROTOCOL_INTEGRATION.md +55 -2
- package/README.md +63 -59
- package/TERMINOLOGY.md +2 -0
- package/THIRD_PARTY_NOTICES.md +3 -4
- package/THREAT_MODEL.md +140 -1
- package/completions/_forgeloop +29 -3
- package/completions/forgeloop.bash +55 -3
- package/completions/forgeloop.fish +183 -1
- package/docs/ADVISORY_CONTEXT.md +25 -0
- package/docs/AGENT_BROWSER_ADAPTER.md +81 -0
- package/docs/AGENT_BROWSER_VERIFICATION.md +6 -0
- package/docs/AGENT_PROTOCOL_SUMMARY.md +74 -39
- package/docs/AGENT_SKILL.md +66 -0
- package/docs/ARTIFACT_REFERENCE.md +171 -35
- package/docs/AUDIT_UX.md +46 -0
- package/docs/BROWSER_VERIFICATION.md +136 -0
- package/docs/CLI_REFERENCE.md +512 -8
- package/docs/CODE_ATTESTATION.md +2 -2
- package/docs/DOCUMENTATION_GUIDE.md +34 -11
- package/docs/GETTING_STARTED.md +3 -3
- package/docs/JEV_BENCHMARKS.md +31 -0
- package/docs/MODEL_ROUTING.md +37 -0
- package/docs/OPENSRC_ADAPTER.md +241 -0
- package/docs/PACKAGE_CONTENTS.md +46 -18
- package/docs/PROVIDERS.md +126 -0
- package/docs/PROVIDER_ARCHITECTURE.md +199 -0
- package/docs/RECIPES.md +9 -0
- package/docs/RELEASE_CHECKLIST.md +116 -12
- package/docs/SECURITY_REVIEW.md +71 -0
- package/docs/SELF_HOSTED_TESTS.md +121 -0
- package/docs/SEMANTIC_DECISION_PLANE.md +71 -0
- package/docs/TEST_INTELLIGENCE.md +29 -0
- package/docs/TEST_PRUNING.md +14 -0
- package/docs/TROUBLESHOOTING.md +198 -1
- package/docs/UNIVERSAL_INTEGRATION.md +31 -0
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +2 -2
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +5 -5
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +1 -1
- package/docs/assets/diagrams/forgeloop-engineering-flow.html +39 -26
- package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
- package/docs/assets/diagrams/forgeloop-engineering-flow.svg +26 -26
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +2 -1
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +5 -5
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +1 -1
- package/docs/diagrams/README.md +13 -9
- package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +1 -1
- package/docs/diagrams/forgeloop-engineering-flow.workflow.json +24 -19
- package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +1 -0
- package/docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json +4 -4
- package/docs/diagrams/reviews/forgeloop-engineering-flow.review.json +4 -4
- package/docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json +4 -4
- package/docs/documentation-manifest.json +774 -16
- package/docs/protocol-requirements.json +24 -0
- package/package.json +43 -11
- package/schemas/config.schema.json +14 -0
- package/schemas/context-plan.schema.json +18 -0
- package/schemas/semantic-decision.schema.json +46 -0
- package/schemas/task-bundle.schema.json +7 -2
- package/schemas/test-utility.schema.json +44 -0
- package/scripts/CI_VALIDATORS.md +6 -6
- package/scripts/benchmark-jev.mjs +5 -0
- package/scripts/benchmark-test-intelligence.mjs +4 -0
- package/scripts/generate-agent-protocol-summary.mjs +6 -3
- package/scripts/generate-forgeloop-skill.mjs +133 -0
- package/scripts/jev-smoke.mjs +19 -0
- package/scripts/run-mcp-clean-tests.mjs +30 -0
- package/skills/forgeloop/README.md +9 -0
- package/skills/forgeloop/SKILL.md +77 -0
- package/skills/forgeloop/references/lifecycle.md +9 -0
- package/skills/forgeloop/references/recovery.md +7 -0
- package/skills/forgeloop/references/verification.md +7 -0
- package/src/adapters/agent-browser/assertions.js +47 -0
- package/src/adapters/agent-browser/commands.js +54 -0
- package/src/adapters/agent-browser/index.js +3 -0
- package/src/adapters/agent-browser/locator.js +40 -0
- package/src/adapters/agent-browser/process.js +215 -0
- package/src/adapters/agent-browser/provider.js +316 -0
- package/src/adapters/emulated-services/constants.js +24 -0
- package/src/adapters/emulated-services/index.js +7 -0
- package/src/adapters/emulated-services/process.js +162 -0
- package/src/adapters/emulated-services/provider.js +289 -0
- package/src/adapters/opensrc/normalize.js +90 -0
- package/src/adapters/opensrc/process.js +248 -0
- package/src/adapters/opensrc/provider.js +338 -0
- package/src/adapters/opensrc/search.js +264 -0
- package/src/adapters/temporary-paths.js +18 -0
- package/src/adapters/typesafe/client.js +28 -0
- package/src/adapters/typesafe/engine.js +63 -0
- package/src/adapters/typesafe/normalize.js +41 -0
- package/src/cli.js +218 -174
- package/src/commands/action-show.js +5 -2
- package/src/commands/advance.js +5 -1
- package/src/commands/baseline.js +13 -11
- package/src/commands/checkpoint-revalidate.js +192 -0
- package/src/commands/complete.js +19 -3
- package/src/commands/context-plan.js +38 -0
- package/src/commands/contract-create.js +266 -0
- package/src/commands/contract-revise.js +236 -0
- package/src/commands/decision-show.js +14 -0
- package/src/commands/decision-status.js +22 -0
- package/src/commands/discover.js +41 -0
- package/src/commands/doctor.js +51 -13
- package/src/commands/gate-record.js +194 -0
- package/src/commands/gate-revalidate.js +135 -0
- package/src/commands/handoff-list.js +6 -1
- package/src/commands/handoff-show.js +6 -1
- package/src/commands/migrate-protocol.js +2 -2
- package/src/commands/model-route.js +40 -0
- package/src/commands/next.js +7 -1
- package/src/commands/policy-diff.js +25 -4
- package/src/commands/progress.js +17 -11
- package/src/commands/record-diagnosis.js +3 -0
- package/src/commands/route.js +146 -18
- package/src/commands/semantic-plan.js +41 -0
- package/src/commands/status.js +6 -1
- package/src/commands/storage-backup.js +15 -0
- package/src/commands/storage-migrate.js +5 -0
- package/src/commands/storage-migration-resume.js +5 -0
- package/src/commands/storage-migration-status.js +44 -0
- package/src/commands/storage-restore-resume.js +7 -0
- package/src/commands/storage-restore.js +8 -0
- package/src/commands/task-abandon.js +224 -0
- package/src/commands/task-list.js +8 -43
- package/src/commands/task-migrate-contract-bootstrap-repair.js +288 -0
- package/src/commands/task-migrate.js +3 -3
- package/src/commands/task-recover.js +10 -2
- package/src/commands/task-repair-contract-bootstrap.js +263 -0
- package/src/commands/task-scope.js +18 -2
- package/src/commands/task-show.js +16 -2
- package/src/commands/test-inventory.js +5 -0
- package/src/commands/test-prune-plan.js +5 -0
- package/src/commands/test-prune-probe.js +5 -0
- package/src/commands/test-utility.js +5 -0
- package/src/commands/validate-protocol.js +39 -15
- package/src/commands/validate-receipt.js +8 -1
- package/src/config/guides.json +4 -0
- package/src/core/action-ledger-projection.js +10 -3
- package/src/core/actions.js +38 -75
- package/src/core/activation.js +11 -3
- package/src/core/approvals.js +17 -51
- package/src/core/artifact-registry.js +83 -2
- package/src/core/artifacts.js +81 -27
- package/src/core/attachment-paths.js +45 -0
- package/src/core/attestation-coverage.js +6 -1
- package/src/core/attestation-verifier.js +21 -2
- package/src/core/attestation.js +17 -6
- package/src/core/audit-ux.js +514 -0
- package/src/core/audit.js +6 -1
- package/src/core/browser-verification/constants.js +149 -0
- package/src/core/browser-verification/normalize.js +254 -0
- package/src/core/browser-verification/provider.js +519 -0
- package/src/core/browser-verification/service.js +115 -0
- package/src/core/bundles.js +160 -66
- package/src/core/checkpoint-revalidation.js +321 -0
- package/src/core/cli-command-definitions.js +350 -7
- package/src/core/code-manifest.js +9 -3
- package/src/core/command-executors.js +274 -108
- package/src/core/command-input.js +136 -44
- package/src/core/completion-artifacts.js +85 -34
- package/src/core/completion-ownership.js +19 -8
- package/src/core/completion-recovery-rebind.js +11 -1
- package/src/core/completion.js +64 -15
- package/src/core/config.js +3 -0
- package/src/core/conformance.js +2 -1
- package/src/core/context-compiler/budget.js +9 -0
- package/src/core/context-compiler/candidates.js +39 -0
- package/src/core/context-compiler/compiler.js +63 -0
- package/src/core/context-compiler/fingerprint.js +11 -0
- package/src/core/context-compiler/policy.js +13 -0
- package/src/core/context-compiler/result.js +23 -0
- package/src/core/continuity-lint.js +13 -2
- package/src/core/continuity-reconciliation.js +16 -3
- package/src/core/continuity.js +16 -8
- package/src/core/contract-bootstrap-recovery.js +656 -0
- package/src/core/contract-revision.js +209 -0
- package/src/core/decision/artifact.js +70 -0
- package/src/core/decision/benchmarks.js +103 -0
- package/src/core/decision/cache.js +27 -0
- package/src/core/decision/constants.js +58 -0
- package/src/core/decision/cutover.js +34 -0
- package/src/core/decision/engine.js +22 -0
- package/src/core/decision/errors.js +68 -0
- package/src/core/decision/events.js +104 -0
- package/src/core/decision/freshness.js +19 -0
- package/src/core/decision/normalizers/index.js +115 -0
- package/src/core/decision/policy.js +18 -0
- package/src/core/decision/projection.js +16 -0
- package/src/core/decision/question-registry.js +201 -0
- package/src/core/decision/request.js +26 -0
- package/src/core/decision/resolver.js +138 -0
- package/src/core/decision/result.js +58 -0
- package/src/core/decision/service.js +181 -0
- package/src/core/decision/state-builder.js +65 -0
- package/src/core/decision/task-bindings.js +35 -0
- package/src/core/decision/test-provider.js +32 -0
- package/src/core/decision/thresholds.js +15 -0
- package/src/core/diagnosis-model.js +11 -0
- package/src/core/diagnosis.js +10 -1
- package/src/core/diagnostic-projection.js +29 -12
- package/src/core/diagnostic-record.js +28 -3
- package/src/core/efficiency.js +6 -1
- package/src/core/error-codes.js +278 -0
- package/src/core/events.js +535 -147
- package/src/core/evidence-readiness.js +9 -0
- package/src/core/execution-prerequisites.js +36 -13
- package/src/core/execution-profile.js +63 -38
- package/src/core/execution.js +26 -40
- package/src/core/filesystem.js +11 -0
- package/src/core/gate-artifact.js +105 -19
- package/src/core/gate-provenance.js +125 -0
- package/src/core/handoff.js +26 -14
- package/src/core/history.js +39 -35
- package/src/core/hypothesis-projection.js +32 -0
- package/src/core/information-gain-projection.js +104 -100
- package/src/core/inspect.js +12 -3
- package/src/core/integration-invocation-policy.js +37 -4
- package/src/core/integration-resources.js +119 -87
- package/src/core/ledger-event-collection.js +189 -0
- package/src/core/ledger-relations.js +23 -0
- package/src/core/model-router/constants.js +10 -0
- package/src/core/model-router/policy.js +103 -0
- package/src/core/model-router/router.js +37 -0
- package/src/core/native-storage.js +12 -0
- package/src/core/next-action-continuity.js +31 -9
- package/src/core/next-action-model.js +58 -0
- package/src/core/next-action-phases.js +131 -43
- package/src/core/next-action-refresh.js +43 -9
- package/src/core/next-action-review-phase.js +9 -4
- package/src/core/next-action-verification-phase.js +2 -1
- package/src/core/next-action.js +56 -9
- package/src/core/phase.js +266 -103
- package/src/core/policy-engine.js +12 -13
- package/src/core/preflight-consistency.js +89 -62
- package/src/core/preflight-loaders.js +48 -9
- package/src/core/preflight-model.js +6 -1
- package/src/core/preflight.js +29 -12
- package/src/core/progress.js +21 -10
- package/src/core/protocol-info.js +68 -0
- package/src/core/protocol-migration.js +7 -6
- package/src/core/protocol.js +20 -0
- package/src/core/reconcile-closure.js +281 -67
- package/src/core/recovery-history.js +67 -47
- package/src/core/reflection.js +72 -77
- package/src/core/responsibility.js +25 -13
- package/src/core/resumability.js +154 -44
- package/src/core/route-artifact.js +28 -4
- package/src/core/router.js +67 -1
- package/src/core/runtime-context.js +123 -61
- package/src/core/schema-validation.js +11 -3
- package/src/core/security-review/constants.js +64 -0
- package/src/core/security-review/normalize.js +245 -0
- package/src/core/security-review/provider.js +204 -0
- package/src/core/security-review/service.js +134 -0
- package/src/core/semantic-planning/constants.js +19 -0
- package/src/core/semantic-planning/projection.js +94 -0
- package/src/core/semantic-planning/service.js +15 -0
- package/src/core/settlement.js +12 -1
- package/src/core/signing/bundle-file.js +53 -0
- package/src/core/signing/bundle-reference.js +15 -0
- package/src/core/signing/sigstore.js +60 -33
- package/src/core/signing/statement-file.js +27 -0
- package/src/core/sources.js +37 -0
- package/src/core/storage-runtime-registry.js +41 -0
- package/src/core/structural-quality/artifacts.js +20 -14
- package/src/core/structural-quality/service.js +81 -56
- package/src/core/target-layout.js +1 -1
- package/src/core/task-claim-state.js +249 -15
- package/src/core/task-command.js +21 -1
- package/src/core/task-conflict-inspection.js +133 -102
- package/src/core/task-descriptor.js +29 -22
- package/src/core/task-discovery.js +288 -90
- package/src/core/task-lock.js +66 -306
- package/src/core/task-migration-validation.js +5 -5
- package/src/core/task-migration.js +17 -287
- package/src/core/task-paths.js +13 -0
- package/src/core/task-recovery.js +1 -0
- package/src/core/task-snapshot.js +51 -8
- package/src/core/task-storage-migration.js +18 -0
- package/src/core/templates.js +23 -8
- package/src/core/test-intelligence/benchmarks.js +68 -0
- package/src/core/test-intelligence/inventory.js +73 -0
- package/src/core/test-intelligence/prune.js +94 -0
- package/src/core/test-intelligence/semantic-state.js +15 -0
- package/src/core/test-intelligence/service.js +40 -0
- package/src/core/test-intelligence/utility.js +50 -0
- package/src/core/trace.js +164 -105
- package/src/core/trajectory-evaluation.js +15 -3
- package/src/core/trajectory-metrics.js +47 -32
- package/src/core/transaction.js +16 -287
- package/src/core/verification-scope.js +20 -12
- package/src/core/work-state.js +100 -59
- package/src/integration.d.ts +492 -0
- package/src/integration.js +54 -0
- package/src/providers/README.md +47 -0
- package/src/providers/capabilities.js +46 -0
- package/src/providers/errors.js +15 -0
- package/src/providers/index.js +29 -0
- package/src/providers/json-snapshot.js +105 -0
- package/src/providers/registry.js +152 -0
- package/src/repository-index/binary-manager.js +7 -5
- package/src/storage/artifact-bytes.js +22 -0
- package/src/storage/attachment-binding.js +11 -0
- package/src/storage/attachment-files.js +82 -0
- package/src/storage/attachment-references.js +36 -0
- package/src/storage/backup.js +53 -0
- package/src/storage/capabilities.js +31 -0
- package/src/storage/connection-owner.js +119 -0
- package/src/storage/connection.js +376 -0
- package/src/storage/existing-project-scope.js +45 -0
- package/src/storage/export-destination.js +44 -0
- package/src/storage/exporter.js +284 -0
- package/src/storage/file-durability.js +46 -0
- package/src/storage/importer.js +461 -0
- package/src/storage/index.js +74 -0
- package/src/storage/leases.js +63 -0
- package/src/storage/ledger-event-snapshot.js +150 -0
- package/src/storage/ledger-relations.js +220 -0
- package/src/storage/legacy-maintenance-boundary.js +18 -0
- package/src/storage/legacy-signature.js +115 -0
- package/src/storage/maintenance-handoff.js +129 -0
- package/src/storage/maintenance-owner.js +42 -0
- package/src/storage/maintenance.js +310 -0
- package/src/storage/metadata-json.js +35 -0
- package/src/storage/migration-activate.js +59 -0
- package/src/storage/migration-archive.js +57 -0
- package/src/storage/migration-attachment-root.js +61 -0
- package/src/storage/migration-candidate.js +398 -0
- package/src/storage/migration-publication.js +143 -0
- package/src/storage/migration-rollback-admission.js +54 -0
- package/src/storage/migration-rollback-preparation.js +132 -0
- package/src/storage/migration-rollback-publication.js +183 -0
- package/src/storage/migration-rollback-release.js +66 -0
- package/src/storage/migration-rollback-source-stage.js +103 -0
- package/src/storage/migration-rollback.js +43 -0
- package/src/storage/migration-source-partition.js +56 -0
- package/src/storage/migration-source.js +255 -0
- package/src/storage/migration-terminal.js +39 -0
- package/src/storage/migration-validation.js +75 -0
- package/src/storage/migration.js +43 -0
- package/src/storage/operational-attachments.js +49 -0
- package/src/storage/operational-context.js +50 -0
- package/src/storage/project-backup.js +98 -0
- package/src/storage/project-bootstrap.js +24 -0
- package/src/storage/project-boundary.js +79 -0
- package/src/storage/project-read-snapshot.js +18 -0
- package/src/storage/project-replacement.js +137 -0
- package/src/storage/project-restore.js +203 -0
- package/src/storage/record-definitions.js +45 -0
- package/src/storage/repository.js +507 -0
- package/src/storage/restore-journal.js +62 -0
- package/src/storage/restore-layout.js +30 -0
- package/src/storage/restore-preparation.js +84 -0
- package/src/storage/restore-replacement-archive.js +162 -0
- package/src/storage/restore-replacement-owner.js +31 -0
- package/src/storage/restore-replacement-preparation.js +128 -0
- package/src/storage/restore-replacement.js +142 -0
- package/src/storage/restore-terminal.js +32 -0
- package/src/storage/runtime.js +31 -0
- package/src/storage/schema.js +214 -0
- package/src/storage/singleton-import.js +84 -0
- package/src/storage/snapshot-continuity.js +16 -0
- package/src/storage/snapshot.js +36 -0
- package/src/storage/storage-marker.js +79 -0
- package/src/storage/task-guards.js +107 -0
- package/src/storage/topology.js +42 -0
- package/src/storage/transaction.js +179 -0
- package/src/storage/unit-of-work.js +663 -0
- package/src/storage/windows-process-incarnation.js +206 -0
- package/.forgeloop/forgeloop.gitignore +0 -4
- package/LICENSE-DOCS.md +0 -13
- package/src/core/transaction-maintenance.js +0 -70
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# Provider Extension Architecture
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
Provider extensions are a provider-neutral, experimental capability family in
|
|
6
|
+
Protocol v1. The capability vocabulary is public and versioned; the generic
|
|
7
|
+
provider registry is internal and is not a supported package API.
|
|
8
|
+
|
|
9
|
+
## Scope
|
|
10
|
+
|
|
11
|
+
This document explains the common boundary around provider observations. It
|
|
12
|
+
does not add generic provider registration to `createForgeLoopContext()`; the
|
|
13
|
+
dedicated runtime-only `browserVerificationProviders` and
|
|
14
|
+
`securityReviewProviders` registrations are the exceptions documented by
|
|
15
|
+
their dedicated contracts. They do not add CLI
|
|
16
|
+
provider commands, automatic installation, lifecycle authority, or completion
|
|
17
|
+
authority.
|
|
18
|
+
|
|
19
|
+
## Why ForgeLoop Uses Providers
|
|
20
|
+
|
|
21
|
+
Providers allow a host to connect bounded observations or execution services to
|
|
22
|
+
ForgeLoop without making a vendor, model, browser, scanner, or presentation
|
|
23
|
+
tool canonical. A provider result is an input to ForgeLoop-owned validation,
|
|
24
|
+
not a replacement for it.
|
|
25
|
+
|
|
26
|
+
## Provider-Neutral Design
|
|
27
|
+
|
|
28
|
+
The public `providerExtensions` capability advertises architecture and
|
|
29
|
+
compatibility semantics only. It is provider-neutral, experimental, lazy at
|
|
30
|
+
the host boundary, and deliberately separate from the existing dedicated
|
|
31
|
+
`advisoryContextProviders` Integration API capability.
|
|
32
|
+
|
|
33
|
+
The generic registry is currently an internal implementation module. It is
|
|
34
|
+
not exported as `@cassiomc1/forgeloop/providers`, and capability advertising
|
|
35
|
+
does not imply a public registration or installation API.
|
|
36
|
+
|
|
37
|
+
## Provider Kinds
|
|
38
|
+
|
|
39
|
+
The five kinds are derived from the canonical `PROVIDER_KINDS` source:
|
|
40
|
+
|
|
41
|
+
| Kind | Contract |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| `ADVISORY_CONTEXT` | Optional, non-authoritative context. It is never canonical state, evidence, completion authority, or executable instruction. |
|
|
44
|
+
| `VERIFICATION_EXECUTION` | A bounded execution boundary that may produce observations, but never completion truth. |
|
|
45
|
+
| `BROWSER_VERIFICATION` | Browser-driven observation and assertion collection. No vendor is canonical. |
|
|
46
|
+
| `SECURITY_REVIEW` | Bounded security findings, observation-oriented unless a future explicit gate contract exists. |
|
|
47
|
+
| `PRESENTATION` | Read-only presentation or rendering. It must never mutate protocol state. |
|
|
48
|
+
|
|
49
|
+
Every kind denies lifecycle, completion, and evidence authority. Providers do
|
|
50
|
+
not acquire installation authority.
|
|
51
|
+
|
|
52
|
+
### Presentation vocabulary and Audit UX
|
|
53
|
+
|
|
54
|
+
`PRESENTATION` remains a provider-kind vocabulary slot for future bounded
|
|
55
|
+
renderers; it does not require a concrete provider in the completed roadmap.
|
|
56
|
+
The current Audit UX need is already served by `task/audit-view`, a canonical
|
|
57
|
+
read-only Integration API projection composed from ForgeLoop-owned resolvers.
|
|
58
|
+
Audit UX is not a provider, does not register through the provider boundary,
|
|
59
|
+
and cannot mutate protocol state, establish evidence, release claims, or
|
|
60
|
+
authorize completion.
|
|
61
|
+
|
|
62
|
+
## Invocation Lifecycle
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
HOST
|
|
66
|
+
│
|
|
67
|
+
▼
|
|
68
|
+
provider selection
|
|
69
|
+
│
|
|
70
|
+
▼
|
|
71
|
+
registry lookup
|
|
72
|
+
│
|
|
73
|
+
▼
|
|
74
|
+
lazy factory resolution
|
|
75
|
+
│
|
|
76
|
+
▼
|
|
77
|
+
provider validation
|
|
78
|
+
│
|
|
79
|
+
▼
|
|
80
|
+
bounded invocation
|
|
81
|
+
│
|
|
82
|
+
▼
|
|
83
|
+
strict JSON normalization
|
|
84
|
+
│
|
|
85
|
+
▼
|
|
86
|
+
authority validation
|
|
87
|
+
│
|
|
88
|
+
▼
|
|
89
|
+
immutable observation
|
|
90
|
+
│
|
|
91
|
+
▼
|
|
92
|
+
ForgeLoop consumer
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The result boundary is:
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
provider result
|
|
99
|
+
↓
|
|
100
|
+
normalized observation
|
|
101
|
+
↓
|
|
102
|
+
ForgeLoop-owned validation
|
|
103
|
+
↓
|
|
104
|
+
optional canonical evidence/use
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
A provider must never bypass ForgeLoop-owned validation.
|
|
108
|
+
|
|
109
|
+
Browser verification is an explicit Integration API operation, not a generic
|
|
110
|
+
provider command. Its registry is inert during context construction, its
|
|
111
|
+
factory and verify call share one deadline and cooperative `AbortSignal`, and
|
|
112
|
+
its final status is derived by ForgeLoop from the requested assertion results.
|
|
113
|
+
The origin allowlist validates observations but is not a network sandbox.
|
|
114
|
+
|
|
115
|
+
Security review is likewise an explicit Integration API operation through
|
|
116
|
+
`runSecurityReview`. Its host-injected registry is inert during context
|
|
117
|
+
construction. Requests and results are bounded strict snapshots, and provider
|
|
118
|
+
findings remain observation-only, non-evidence, and non-executable.
|
|
119
|
+
|
|
120
|
+
## Trust Boundary
|
|
121
|
+
|
|
122
|
+
Provider output is untrusted input. It cannot establish lifecycle state,
|
|
123
|
+
completion truth, canonical evidence, next-action authority, or installation
|
|
124
|
+
authority. Provider identity and availability are descriptive and must not be
|
|
125
|
+
treated as proof of executable identity or trust.
|
|
126
|
+
|
|
127
|
+
## Strict JSON Snapshot Boundary
|
|
128
|
+
|
|
129
|
+
Provider input and output use detached, deeply frozen snapshots. Allowed values
|
|
130
|
+
are `null`, booleans, finite numbers, strings, arrays, and plain objects.
|
|
131
|
+
|
|
132
|
+
The boundary rejects `undefined`, functions, symbols, bigints, non-finite
|
|
133
|
+
numbers, dates, maps, sets, promises, proxies, custom classes, accessors,
|
|
134
|
+
cycles, sparse or extended arrays, and hidden non-enumerable payload data.
|
|
135
|
+
Provider payloads are bounded by byte, depth, and node limits.
|
|
136
|
+
|
|
137
|
+
## Timeout and Cancellation
|
|
138
|
+
|
|
139
|
+
Factory resolution and operation execution share one timeout budget and one
|
|
140
|
+
invocation context. The `AbortSignal` is propagated and cancellation is
|
|
141
|
+
cooperative. A late factory resolution cannot start an operation after the
|
|
142
|
+
deadline. Synchronous JavaScript cannot be preempted by a timer, so providers
|
|
143
|
+
that own subprocesses, browsers, requests, or sockets must clean them up when
|
|
144
|
+
the signal is aborted.
|
|
145
|
+
|
|
146
|
+
## Error Normalization
|
|
147
|
+
|
|
148
|
+
Provider exceptions are normalized to ForgeLoop provider execution failures;
|
|
149
|
+
provider-supplied ForgeLoop-shaped error codes are not trusted. Validation and
|
|
150
|
+
timeout failures are generated outside the provider call boundary.
|
|
151
|
+
|
|
152
|
+
## Authority Restrictions
|
|
153
|
+
|
|
154
|
+
The following public capability fields remain false: `autoInstall`,
|
|
155
|
+
`lifecycleAuthority`, `completionAuthority`, and `evidenceAuthority`.
|
|
156
|
+
Providers observe. ForgeLoop validates, owns lifecycle transitions, and decides
|
|
157
|
+
whether an observation can contribute to canonical evidence.
|
|
158
|
+
|
|
159
|
+
## Evidence Conversion Boundary
|
|
160
|
+
|
|
161
|
+
An observation can become usable evidence only through the relevant
|
|
162
|
+
ForgeLoop-owned validation and evidence contract. Provider output is never
|
|
163
|
+
itself a completion claim or canonical evidence record.
|
|
164
|
+
|
|
165
|
+
## Internal vs Public Surfaces
|
|
166
|
+
|
|
167
|
+
Public and versioned:
|
|
168
|
+
|
|
169
|
+
- `protocol-info --json` and `features.providerExtensions`.
|
|
170
|
+
- This architecture document and [`PROVIDERS.md`](./PROVIDERS.md).
|
|
171
|
+
|
|
172
|
+
Internal and experimental:
|
|
173
|
+
|
|
174
|
+
- `src/providers/index.js` and the generic registry implementation.
|
|
175
|
+
- Provider capability implementation details not included in the public
|
|
176
|
+
Integration API contract.
|
|
177
|
+
|
|
178
|
+
`@cassiomc1/forgeloop/providers` remains unexported.
|
|
179
|
+
|
|
180
|
+
## Compatibility
|
|
181
|
+
|
|
182
|
+
Protocol version, Schema version, and Integration API version remain `1`.
|
|
183
|
+
`providerExtensions` is capability version `1`; consumers must feature-detect
|
|
184
|
+
it and may continue using the core protocol when they do not understand it.
|
|
185
|
+
|
|
186
|
+
## Future Provider Adapters
|
|
187
|
+
|
|
188
|
+
Future adapters may implement a provider kind only after a provider-neutral
|
|
189
|
+
contract defines its input, output, resource bounds, trust treatment, and
|
|
190
|
+
ForgeLoop-owned validation boundary. Vendor-specific adapters remain optional
|
|
191
|
+
and must not become a competing source of protocol truth.
|
|
192
|
+
|
|
193
|
+
## Security Considerations
|
|
194
|
+
|
|
195
|
+
Provider output can be malicious, oversized, mutable, delayed, or misleading.
|
|
196
|
+
Strict JSON snapshots, bounded invocation, cooperative cancellation, error
|
|
197
|
+
normalization, recursive authority checks, and no automatic installation keep
|
|
198
|
+
the boundary fail-closed. See [`THREAT_MODEL.md`](../THREAT_MODEL.md) for the
|
|
199
|
+
security ownership table.
|
package/docs/RECIPES.md
CHANGED
|
@@ -353,6 +353,10 @@ forgeloop baseline --record --policy-reset-authorized --json
|
|
|
353
353
|
# 1. Inspect deterministic classification and structured next action
|
|
354
354
|
forgeloop next --task task-001 --json
|
|
355
355
|
|
|
356
|
+
# 1a. If the active task is intentionally no longer valid, explicitly abandon
|
|
357
|
+
# it; do not use clear-state or task-recover to bypass ownership
|
|
358
|
+
forgeloop task-abandon --task task-001 --acknowledge-abandonment --json
|
|
359
|
+
|
|
356
360
|
# 2. RECOVERABLE must use reconcile-closure; do not use task-recover
|
|
357
361
|
forgeloop reconcile-closure --task task-001 --id <verification-id> \
|
|
358
362
|
--requirement "<exact verification text>" -- <verification-command>
|
|
@@ -378,6 +382,11 @@ artifact against the complete ledger history. If `next` returns
|
|
|
378
382
|
`RESOLVE_RECOVERY_INCONSISTENCY`, run `validate-protocol`; do not create, edit,
|
|
379
383
|
or delete `recovery.json` manually.
|
|
380
384
|
|
|
385
|
+
`task-abandon` is only for an explicit active non-terminal abandonment. It
|
|
386
|
+
records `TASK_ABANDONED`, leaves the phase unchanged, and releases claims as
|
|
387
|
+
`RELEASED_BY_RECOVERY`; it never proves completion. `clear-state` removes only
|
|
388
|
+
the checkpoint and is not a claim-release mechanism.
|
|
389
|
+
|
|
381
390
|
---
|
|
382
391
|
|
|
383
392
|
### Recipe 16 — Execute a Durable External Action Safely
|
|
@@ -1,13 +1,81 @@
|
|
|
1
1
|
# ForgeLoop Release Checklist
|
|
2
2
|
|
|
3
|
-
This is the current release checklist for
|
|
4
|
-
preparation and verification checklist;
|
|
3
|
+
This is the current release checklist for the PolyForm Noncommercial-licensed
|
|
4
|
+
`@cassiomc1/forgeloop` package. It is a preparation and verification checklist;
|
|
5
|
+
it does not authorize publication.
|
|
5
6
|
|
|
6
|
-
##
|
|
7
|
+
## Bounded 2.0.0-rc.2 publication
|
|
7
8
|
|
|
8
|
-
The
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
The owner approved short verification and an RC fallback on 2026-10-13. This
|
|
10
|
+
candidate is published only to npm `next`; stable `latest` remains blocked while
|
|
11
|
+
`soleSQLiteWriter` is false. A release candidate does not assert completed
|
|
12
|
+
migration acceptance or production readiness.
|
|
13
|
+
|
|
14
|
+
After npm rejected restricted RC1 publication with `E402`, the owner authorized
|
|
15
|
+
public core-package access. RC2 preserves the immutable RC1 tag; the MCP
|
|
16
|
+
companion is not published and retains restricted access.
|
|
17
|
+
|
|
18
|
+
`npm run release:quick` is the RC PR and publishing check. Each check group has
|
|
19
|
+
an enforced three-minute timeout; timeout or failure refuses release. It runs
|
|
20
|
+
source equivalence, writer inventory drift detection, essential SQLite boundary
|
|
21
|
+
and package-policy tests, lint, dependency policy, documentation conformance,
|
|
22
|
+
packed CLI/API/MCP smoke checks, hygiene, and secret scanning. This approved RC
|
|
23
|
+
path replaces a new local `verify:prepush` run. It does not replace the ordinary
|
|
24
|
+
or stable-release validation policy.
|
|
25
|
+
|
|
26
|
+
`scripts/check-rc-release.mjs` requires all 593 runtime/schema/integration files
|
|
27
|
+
to match baseline `14008f58f8ad255692997ce3fff359591fb695d1`. Root package
|
|
28
|
+
metadata may change only its RC version, the three approved RC scripts, and owner-authorized public access.
|
|
29
|
+
Resolved dependency locks must be unchanged apart from local package versions;
|
|
30
|
+
MCP metadata may only admit the explicit RC peer and bind the local core version.
|
|
31
|
+
Changed runtime or dependency bytes refuse this fast path.
|
|
32
|
+
|
|
33
|
+
The baseline Windows full-suite receipt is GitHub run `38483385848`, successful
|
|
34
|
+
on that exact source. Publishing verifies its repository, workflow, source SHA,
|
|
35
|
+
and completed success status through the authenticated GitHub API. Current
|
|
36
|
+
Linux/packaged smoke and local macOS short checks are separate evidence. No new
|
|
37
|
+
full-coverage, full-platform, physical power-loss, or statistically qualified
|
|
38
|
+
p95 result is claimed by the short path. The existing 1,000-task parity run
|
|
39
|
+
`38483369676` is retained for review; no fresh 200-repeat benchmark is dispatched.
|
|
40
|
+
|
|
41
|
+
The writer inventory covers every current `src` JavaScript module and records
|
|
42
|
+
imports plus potential write sites. Alias, computed-path, external-caller, and
|
|
43
|
+
transitive-authority review remain incomplete. The inventory explicitly keeps
|
|
44
|
+
`wholeConsumerClosure: false`; it prevents drift and does not authorize setting
|
|
45
|
+
`soleSQLiteWriter` to true.
|
|
46
|
+
|
|
47
|
+
RC release sequence: reviewed PR checks pass, merge preserving baseline
|
|
48
|
+
ancestry, tag `v2.0.0-rc.2`, dispatch `npm-publish.yml` with channel `next` and
|
|
49
|
+
confirmation `PUBLISH PUBLIC PACKAGE`, then verify npm version, Git commit,
|
|
50
|
+
tarball integrity, and provenance. Stable publishing retains full checks and
|
|
51
|
+
additionally refuses incomplete sole-writer acceptance.
|
|
52
|
+
|
|
53
|
+
## ForgeLoop 2.0.0 candidate scope
|
|
54
|
+
|
|
55
|
+
The 2.0.0 candidate is not release-ready while SQLite migration plan §10 has
|
|
56
|
+
open consumer-closure, current-source performance, or platform evidence. Keep
|
|
57
|
+
all acceptance boxes open until their evidence is bound to the exact candidate
|
|
58
|
+
revision.
|
|
59
|
+
|
|
60
|
+
The 2.0.0 candidate carries the SQLite storage transition alongside the
|
|
61
|
+
existing protocol, routing, provider, documentation, and package surfaces. The
|
|
62
|
+
existing checklist remains applicable to those surfaces; SQLite release
|
|
63
|
+
acceptance additionally requires every item below:
|
|
64
|
+
|
|
65
|
+
- [ ] All plan §9 acceptance rows are current for the exact candidate SHA,
|
|
66
|
+
including an accepted 1,000-task hosted parity run with exact output,
|
|
67
|
+
validated workers, clean observer admission, cleanup, and lower native
|
|
68
|
+
p95 for both operations.
|
|
69
|
+
- [ ] Plan §10 consumer closure is complete and `soleSQLiteWriter` is true
|
|
70
|
+
based on source audit and tests; fail-closed migration boundaries remain
|
|
71
|
+
in place until that evidence exists.
|
|
72
|
+
- [ ] Migration, crash recovery, legacy-unbound handoff, attachment recovery,
|
|
73
|
+
backup, restore, rollback, and SQLite integrity checks pass on the exact
|
|
74
|
+
candidate.
|
|
75
|
+
- [ ] Required Linux, macOS, Windows, supported Node runtime, MCP, API, and
|
|
76
|
+
package workflows pass at the exact candidate SHA.
|
|
77
|
+
- [ ] Release identity and npm version availability are verified, and the
|
|
78
|
+
matching tag workflow completes its verification job before publishing.
|
|
11
79
|
|
|
12
80
|
- [ ] README catalog and architecture fallback identify
|
|
13
81
|
`ENG/flutter-development-eng.md` and explain that the specialist is
|
|
@@ -41,13 +109,26 @@ boundaries explicit:
|
|
|
41
109
|
- [ ] Lifecycle, evidence, completion, and publication remain independent of
|
|
42
110
|
Repository Index and persistent-host health.
|
|
43
111
|
|
|
44
|
-
This
|
|
45
|
-
|
|
46
|
-
|
|
112
|
+
This checklist does not authorize publication by itself. The owner authorized
|
|
113
|
+
conditional npm publication through the GitHub workflow; the action remains
|
|
114
|
+
prohibited until every release gate passes. Tagging, GitHub Release,
|
|
115
|
+
deployment, and live data migration remain separate actions.
|
|
47
116
|
|
|
48
117
|
## CI minimization validation
|
|
49
118
|
|
|
119
|
+
- [ ] `npm run skill:check` passes and generated Skill frontmatter, protocol
|
|
120
|
+
synchronization, safety boundaries, and package coverage remain valid.
|
|
121
|
+
|
|
50
122
|
- [ ] `npm run verify:fast` passes for edit-time feedback.
|
|
123
|
+
- [ ] `npm run repository:hygiene` passes: no tracked mutable ForgeLoop state,
|
|
124
|
+
unexpected root reports, orphan visual assets, unapproved benchmark run
|
|
125
|
+
sets, or scratch outputs.
|
|
126
|
+
- [ ] The documentation manifest and review matrix cover every maintained and
|
|
127
|
+
packaged document with origin, currency, package, action, and canonical
|
|
128
|
+
source metadata.
|
|
129
|
+
- [ ] Diagram source, generated output, receipts, and review bindings are
|
|
130
|
+
current; a changed source is not approved until its visual review is
|
|
131
|
+
renewed.
|
|
51
132
|
- [ ] `npm run verify:prepush` passes before the release pull request; MCP
|
|
52
133
|
setup, when needed, was run explicitly with `npm run mcp:setup`.
|
|
53
134
|
- [ ] Ordinary PR validation uses `.github/workflows/pr-core.yml` with the
|
|
@@ -64,7 +145,9 @@ actions.
|
|
|
64
145
|
## Contract and package identity
|
|
65
146
|
|
|
66
147
|
- [ ] `package.json` and `package-lock.json` contain the same package version.
|
|
67
|
-
- [ ] The package metadata declares the intended
|
|
148
|
+
- [ ] The package metadata declares the intended license
|
|
149
|
+
(`PolyForm-Noncommercial-1.0.0`), includes the official license text,
|
|
150
|
+
and retains public core-package publication access.
|
|
68
151
|
- [ ] `PROTOCOL_VERSION` and the integration API version remain compatible.
|
|
69
152
|
- [ ] `npm run release:identity` passes for the candidate version.
|
|
70
153
|
- [ ] No release tag or registry version collision exists.
|
|
@@ -86,7 +169,27 @@ actions.
|
|
|
86
169
|
- [ ] `protocol-info` and the Integration API capability contracts agree.
|
|
87
170
|
- [ ] `canonicalHandoffs` v2 is advertised consistently.
|
|
88
171
|
- [ ] `advisoryContextProviders` v1 is advertised consistently.
|
|
172
|
+
- [ ] `providerExtensions` v1 is consistent, provider-neutral, experimental,
|
|
173
|
+
and retains false lifecycle/completion/evidence authority.
|
|
174
|
+
- [ ] Generic provider registry export remains absent and auto-install remains
|
|
175
|
+
false.
|
|
89
176
|
- [ ] Advisory context remains Integration-API-only.
|
|
177
|
+
- [ ] OpenSrc requires an explicit absolute executable path and lazily qualified expected version.
|
|
178
|
+
- [ ] OpenSrc cache remains outside the target project and returned source paths are containment-validated.
|
|
179
|
+
- [ ] OpenSrc recall remains advisory, non-evidence, and non-persisted by ForgeLoop.
|
|
180
|
+
- [ ] No OpenSrc binary or cache ships in npm.
|
|
181
|
+
- [ ] Optional Agent Browser uses a host-supplied absolute executable, has no
|
|
182
|
+
runtime dependency, and keeps browser observations non-authoritative.
|
|
183
|
+
- [ ] Optional Emulated Services uses a host-supplied absolute `0.11.2`
|
|
184
|
+
executable, has no runtime dependency or PATH discovery, bounds argv
|
|
185
|
+
execution/readiness/output/cleanup, keeps state outside the target, and
|
|
186
|
+
returns observation-only loopback results.
|
|
187
|
+
- [ ] Optional Security Review is host-injected through `securityReviewProviders`,
|
|
188
|
+
has no auto-install or scanner discovery, and keeps findings
|
|
189
|
+
observation-only, non-evidence, non-lifecycle, and non-completion.
|
|
190
|
+
- [ ] Security Review request/result bounds, strict snapshot validation,
|
|
191
|
+
shared timeout, and cooperative cancellation are covered by focused tests
|
|
192
|
+
and the public TypeScript declarations.
|
|
90
193
|
- [ ] `next`, `status`, and `task/context` invoke zero advisory providers.
|
|
91
194
|
- [ ] Advisory request budgets are normalized before provider invocation.
|
|
92
195
|
- [ ] Advisory results are never persisted by ForgeLoop.
|
|
@@ -97,8 +200,9 @@ actions.
|
|
|
97
200
|
- [ ] Stale contract/route identity rejects handoff creation or acceptance.
|
|
98
201
|
- [ ] An invalid event ledger projects `INCONSISTENT`.
|
|
99
202
|
- [ ] Continuity lint remains non-authoritative and non-evidence.
|
|
100
|
-
- [ ] `npm run dependency:policy` passes with only the approved exact
|
|
101
|
-
|
|
203
|
+
- [ ] `npm run dependency:policy` passes with only the approved exact
|
|
204
|
+
`@typesafe-ai/sdk` and `smol-toml` runtime dependencies and approved
|
|
205
|
+
development dependencies.
|
|
102
206
|
- [ ] `npm run lint` passes.
|
|
103
207
|
- [ ] `npm test` passes.
|
|
104
208
|
- [ ] `npm run benchmark:profiles:check` passes; absent provider/host history
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Security Review Provider
|
|
2
|
+
|
|
3
|
+
The Security Review provider is an optional, host-injected Integration API
|
|
4
|
+
capability for bounded, observation-only security findings. It is deliberately
|
|
5
|
+
separate from ForgeLoop lifecycle, evidence, completion, claim, ownership,
|
|
6
|
+
installation, command, and transaction authority.
|
|
7
|
+
|
|
8
|
+
## Registration
|
|
9
|
+
|
|
10
|
+
Register providers on `createForgeLoopContext({ securityReviewProviders })`.
|
|
11
|
+
The registry accepts an object or `Map`, and each value is either a provider
|
|
12
|
+
or a lazy factory. Registration validates provider identity but does not invoke
|
|
13
|
+
factories, scan the project, start a process, access the network, install a
|
|
14
|
+
tool, or mutate `.forgeloop` state.
|
|
15
|
+
|
|
16
|
+
Provider IDs are lower-case portable identifiers. A provider must expose the
|
|
17
|
+
same `id` as its registry key and a `review(request)` function. The host owns
|
|
18
|
+
the provider implementation and any scanner or executable it uses; ForgeLoop
|
|
19
|
+
does not discover tools or search `PATH`.
|
|
20
|
+
|
|
21
|
+
## Invocation
|
|
22
|
+
|
|
23
|
+
Call `runSecurityReview({ projectPath, taskId, providerName, reviewId, ... })`
|
|
24
|
+
through `@cassiomc1/forgeloop/integration`. Requests are detached and deeply
|
|
25
|
+
frozen before invocation. The request supports `FULL`, `CHANGED`, or
|
|
26
|
+
`SELECTED` scope, bounded relative paths, categories, requirements, an
|
|
27
|
+
optional revision binding, and a timeout capped by ForgeLoop.
|
|
28
|
+
|
|
29
|
+
Factory resolution and `review()` share one deadline and one cooperative
|
|
30
|
+
`AbortSignal`. A caller may provide its own signal. Timeout, cancellation,
|
|
31
|
+
provider absence, invalid providers, malformed results, output limits, and
|
|
32
|
+
provider failures have stable `E_SECURITY_REVIEW_*` error codes. Provider
|
|
33
|
+
exceptions are normalized so provider code cannot spoof ForgeLoop errors.
|
|
34
|
+
|
|
35
|
+
## Result contract
|
|
36
|
+
|
|
37
|
+
Results are detached, deeply frozen JSON observations with bounded findings,
|
|
38
|
+
diagnostics, and summary counts. The raw provider snapshot is also bounded
|
|
39
|
+
before schema projection: nesting is limited to 32 levels, traversal to 4096
|
|
40
|
+
nodes, and snapshot strings/keys to 524288 characters. Exceeding any bound
|
|
41
|
+
fails closed with `E_SECURITY_REVIEW_OUTPUT_LIMIT`.
|
|
42
|
+
|
|
43
|
+
Each finding has a portable relative path, bounded title/summary/rule/category/
|
|
44
|
+
severity/confidence fields, and no secret-like content. For `SELECTED` scope,
|
|
45
|
+
each finding path must equal or be a descendant of one of the requested paths;
|
|
46
|
+
`CHANGED` applies the same rule when an explicit changed-path set is supplied.
|
|
47
|
+
Containment uses normalized `/` separators and path-component boundaries, so
|
|
48
|
+
`src/auth.js` does not authorize `src/authentication.js`. `FULL` scope has no
|
|
49
|
+
requested-path restriction beyond normal safe-path validation. Results carry
|
|
50
|
+
trust metadata stating that they are observation-only and non-evidence.
|
|
51
|
+
|
|
52
|
+
Provider output is not a pass/fail lifecycle decision. It cannot create or
|
|
53
|
+
modify contracts, routes, gates, events, transactions, receipts, claims,
|
|
54
|
+
ownership, completion, executable commands, shell operations, credentials, or
|
|
55
|
+
installation state. Any future use as canonical evidence requires a separate
|
|
56
|
+
ForgeLoop-owned validation and evidence contract.
|
|
57
|
+
|
|
58
|
+
## Operational rules
|
|
59
|
+
|
|
60
|
+
- Keep registration lazy and explicit.
|
|
61
|
+
- Use a host-owned provider and a bounded request.
|
|
62
|
+
- Treat findings as advisory observations, not proof of `VALID`, `COMPLETE`,
|
|
63
|
+
or any lifecycle phase.
|
|
64
|
+
- Handle timeout and cancellation cooperatively and clean up resources owned by
|
|
65
|
+
the provider.
|
|
66
|
+
- Do not persist provider output as ForgeLoop task state unless a future
|
|
67
|
+
canonical evidence contract explicitly defines that boundary.
|
|
68
|
+
|
|
69
|
+
See [`PROVIDER_ARCHITECTURE.md`](./PROVIDER_ARCHITECTURE.md),
|
|
70
|
+
[`PROVIDERS.md`](./PROVIDERS.md), and [`THREAT_MODEL.md`](../THREAT_MODEL.md)
|
|
71
|
+
for shared provider and security-boundary rules.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Self-hosted Node validation
|
|
2
|
+
|
|
3
|
+
Node validation uses the following repository-specific runners. Platform and
|
|
4
|
+
Node-version matrix rows remain explicit; moving a job does not remove a check.
|
|
5
|
+
|
|
6
|
+
| Platform | Runner label | Execution location |
|
|
7
|
+
| --- | --- | --- |
|
|
8
|
+
| macOS arm64 | `forgeloop-macos-local` | Local macOS LaunchAgent |
|
|
9
|
+
| Windows x64 | `forgeloop-windows-remote` | Windows service on the requested remote host |
|
|
10
|
+
| Linux x64 | `forgeloop-linux-remote` | Docker Linux container on that Windows host |
|
|
11
|
+
|
|
12
|
+
Publishing jobs retain their existing hosted execution and manual confirmation.
|
|
13
|
+
Their Node tests run in a preceding remote `verify` job. Classification and the
|
|
14
|
+
final PR result aggregation remain hosted; they do not run the product test
|
|
15
|
+
suite. CodeQL, dependency review and release-note publication retain their
|
|
16
|
+
existing execution locations.
|
|
17
|
+
|
|
18
|
+
`PR Core` also supports manual dispatch on a pushed candidate branch. Dispatch
|
|
19
|
+
selects every validation category, so validation does not require a PR event
|
|
20
|
+
or revision-range payload. PR invocations keep their existing path routing.
|
|
21
|
+
The native Repository Index matrix waits for the preceding Linux checks to
|
|
22
|
+
finish and runs one platform row at a time. Expanded Node compatibility waits
|
|
23
|
+
for its minimum-runtime check and also runs one row at a time. Native rows still
|
|
24
|
+
run after an earlier test failure to retain diagnostic coverage; final required
|
|
25
|
+
validation reports preceding failures.
|
|
26
|
+
|
|
27
|
+
Dispatch Windows full suite, expanded Node compatibility, and PR Core
|
|
28
|
+
sequentially when validating the shared Windows/Linux host. The Windows job
|
|
29
|
+
checks that the requested host IP is present and logs only the Docker runner's
|
|
30
|
+
container ID, image ID, running state and hostname. Core Linux jobs record their
|
|
31
|
+
platform, architecture, hostname and checked-out revision. Match the Linux
|
|
32
|
+
hostname to the Windows Docker inspection before claiming the requested
|
|
33
|
+
execution location. These identity checks remain unverified until the candidate
|
|
34
|
+
workflows actually execute.
|
|
35
|
+
|
|
36
|
+
PR repository-hygiene validation runs in the guarded remote Linux `lint` job,
|
|
37
|
+
including documentation-only changes. Its checkout and Node prerequisites run
|
|
38
|
+
for every admitted PR; JavaScript lint and dependency installation retain their
|
|
39
|
+
path conditions. Hosted classification computes routing outputs only.
|
|
40
|
+
|
|
41
|
+
Required ruleset check names remain unchanged. The historical
|
|
42
|
+
`tarball smoke (ubuntu-latest)` context now executes in the remote Linux
|
|
43
|
+
container; the check name is retained for ruleset compatibility.
|
|
44
|
+
|
|
45
|
+
## Admission
|
|
46
|
+
|
|
47
|
+
This is a public repository. An operator-owned copy of
|
|
48
|
+
`scripts/ci-runner-admission.mjs` runs through
|
|
49
|
+
`ACTIONS_RUNNER_HOOK_JOB_STARTED` before checkout. The shell wrappers and admission
|
|
50
|
+
module live outside the job checkout and runner application directory. Keep
|
|
51
|
+
those deployed copies synchronized when changing the policy.
|
|
52
|
+
|
|
53
|
+
Admission requires matching repository metadata and allows only `push`,
|
|
54
|
+
`workflow_dispatch`, `schedule`, `release`, and pull requests whose base and head
|
|
55
|
+
both belong to this repository. Fork pull requests, `pull_request_target`,
|
|
56
|
+
unknown events, missing metadata and invalid event files fail before job steps.
|
|
57
|
+
Workflow job conditions independently exclude fork pull requests. Fork test
|
|
58
|
+
validation requires a separate isolated execution environment; these machines
|
|
59
|
+
do not run fork contributions.
|
|
60
|
+
|
|
61
|
+
The hook does not sandbox admitted code. Repository write access is therefore a
|
|
62
|
+
trust boundary. The Linux runner container has no Windows filesystem mounts or
|
|
63
|
+
Docker socket mount. Its workspace and GitHub-managed runner credentials stay
|
|
64
|
+
inside the dedicated container. Native macOS and Windows jobs run with their
|
|
65
|
+
configured local accounts.
|
|
66
|
+
|
|
67
|
+
## Installed locations and status
|
|
68
|
+
|
|
69
|
+
Local macOS:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
cd /Users/cassio/.local/share/forgeloop-ci/macos
|
|
73
|
+
./svc.sh status
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Windows PowerShell:
|
|
77
|
+
|
|
78
|
+
```powershell
|
|
79
|
+
Get-Service actions.runner.cassiomc1-forgeloop.forgeloop-windows-remote
|
|
80
|
+
docker inspect forgeloop-linux-remote --format '{{json .State}}'
|
|
81
|
+
docker logs --tail 40 forgeloop-linux-remote
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The Windows runner is installed at `C:\forgeloop-ci\windows`. Its deployed hook
|
|
85
|
+
is `C:\forgeloop-ci\hooks\windows-admission.ps1`. Isolated runtimes live below
|
|
86
|
+
`C:\forgeloop-ci\runtime`; the runner environment includes portable Node, Git,
|
|
87
|
+
Bash and unzip. Runner service credentials are managed by Windows; no account
|
|
88
|
+
password belongs in repository files, job logs or shell scripts.
|
|
89
|
+
|
|
90
|
+
The Linux image is built from `.github/runner/Dockerfile` using the repository
|
|
91
|
+
root as its build context:
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
docker build -f .github/runner/Dockerfile -t forgeloop-actions-linux:2.337.0 .
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The Node base image is pinned by digest. The GitHub runner archive is checked
|
|
98
|
+
against its published SHA-256 before extraction. System dependency packages are
|
|
99
|
+
resolved by the official runner dependency installer at build time; rebuilding
|
|
100
|
+
is not a claim of byte-identical package resolution. The deployed image and
|
|
101
|
+
runner version must be recorded with validation evidence.
|
|
102
|
+
|
|
103
|
+
Docker Desktop credential helpers can fail in a noninteractive WinRM session.
|
|
104
|
+
The dedicated `C:\forgeloop-ci\docker-config` uses an empty public Docker Hub auth
|
|
105
|
+
entry and the already-installed Docker Desktop CLI plugin directory. Commands
|
|
106
|
+
using that configuration target the existing Linux engine explicitly. They do
|
|
107
|
+
not modify the user's Docker credential store.
|
|
108
|
+
|
|
109
|
+
Registration tokens expire and must be obtained through an authorized GitHub
|
|
110
|
+
operator. Pass them transiently through `ACTIONS_RUNNER_INPUT_TOKEN`; do not
|
|
111
|
+
store registration tokens in Docker image layers, repository scripts or a
|
|
112
|
+
container's persistent environment. A stopped or offline runner is not evidence
|
|
113
|
+
that its checks passed.
|
|
114
|
+
|
|
115
|
+
## Verification boundary
|
|
116
|
+
|
|
117
|
+
Runner registration, admission probes, a native SQLite smoke, quick suites,
|
|
118
|
+
full core suites, MCP/package checks and GitHub workflow execution are separate
|
|
119
|
+
evidence dimensions. Record the source fingerprint and exact command for each
|
|
120
|
+
run. A workflow routing edit becomes externally verified only after GitHub
|
|
121
|
+
executes the affected jobs on these runners.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Semantic Decision Plane
|
|
2
|
+
|
|
3
|
+
ForgeLoop uses the pinned TypeSafe Jev model `jev-1.13.0` for bounded semantic decisions. The SDK version is exact-pinned in `package.json` and credentials are read only from `TYPESAFE_API_KEY`; credentials are never persisted in ForgeLoop artifacts, event details, diagnostics, or logs.
|
|
4
|
+
|
|
5
|
+
Jev output has `SEMANTIC_DECISION` authority and `NONE` evidence authority. It cannot advance lifecycle, change ownership, satisfy gates, record verification, mark completion, install dependencies, execute commands, or delete tests. ForgeLoop remains the deterministic authority for state, claims, locks, schemas, event chronology, evidence, recovery, and completion.
|
|
6
|
+
|
|
7
|
+
The decision registry contains versioned question sets for intake, contract
|
|
8
|
+
applicability, route, execution profile, context, model routing, failure triage,
|
|
9
|
+
diagnosis, review, task overlap, test utility, and test pruning. Current route,
|
|
10
|
+
context, and test-utility mutations also use bounded dynamic candidate question
|
|
11
|
+
sets: `route-candidates-v1`, `context-candidates-v1`, and
|
|
12
|
+
`test-utility-candidates-v1`. Failure triage, diagnosis prioritization, and review planning
|
|
13
|
+
remain advisory projections: deterministic mandatory review signals are always
|
|
14
|
+
unioned into the plan, unknown semantic output escalates, and no projection can
|
|
15
|
+
record evidence or authorize an action.
|
|
16
|
+
|
|
17
|
+
Decision freshness separates canonical lifecycle state from semantic request
|
|
18
|
+
state. Persisted artifacts retain both fingerprints and their combined request
|
|
19
|
+
fingerprint, so lifecycle mutations cannot be mistaken for semantic changes
|
|
20
|
+
and semantic changes cannot be hidden by a stable lifecycle revision. The
|
|
21
|
+
lifecycle, event ledger, claims, and artifact validators remain authoritative.
|
|
22
|
+
|
|
23
|
+
Test utility analysis uses the bounded `test-utility-candidates-v1` question set
|
|
24
|
+
for the current command path; `test-utility-v1` remains a registered base
|
|
25
|
+
question set. The analysis is persisted separately from
|
|
26
|
+
completion evidence. Protected, contract-linked, public-API, security, and
|
|
27
|
+
protocol tests remain keep-required or keep-risk-guard candidates; unknown
|
|
28
|
+
utility is blocked and no command performs deletion.
|
|
29
|
+
|
|
30
|
+
Context plans send bounded, sanitized actual candidates to Jev. The candidate-set
|
|
31
|
+
fingerprint is bound to the persisted decision, and Jev returns candidate ranking
|
|
32
|
+
and exclusion judgments consumed by the context compiler. Deterministic required
|
|
33
|
+
and mandatory candidates remain selected; prompt-injection candidates are never
|
|
34
|
+
given semantic authority. Token values are `UNKNOWN` unless the provider or host
|
|
35
|
+
reports them.
|
|
36
|
+
|
|
37
|
+
Route execution records intake, route relevance, and execution-profile decisions
|
|
38
|
+
before persisting the route. The deterministic router remains the eligibility
|
|
39
|
+
and safety floor; Jev may rank or exclude only eligible non-mandatory guides and
|
|
40
|
+
may raise the execution profile, never lower a deterministic safety floor.
|
|
41
|
+
Mandatory safety protection is derived from the canonical deterministic route
|
|
42
|
+
reasons already produced by the router (`isMandatorySafetyGuide` reads the
|
|
43
|
+
`MANDATORY_SAFETY_REASONS` set — `SURFACE_AUTH` plus the trust-boundary risk
|
|
44
|
+
reasons `RISK_UNTRUSTED_INPUT`, `RISK_PERSONAL_DATA`, `RISK_SECRETS`,
|
|
45
|
+
`RISK_EXTERNAL_SERVICE`, `RISK_PUBLICATION`), so a security guide selected for an
|
|
46
|
+
external-service boundary cannot be removed by Jev and retains an explicit
|
|
47
|
+
`MANDATORY_SAFETY_GUIDE` reason. Mandatory safety guides and low-confidence
|
|
48
|
+
exclusions remain selected. A missing live decision fails closed.
|
|
49
|
+
|
|
50
|
+
The semantic provider is injected into repository tests through an internal
|
|
51
|
+
loader only. There is no production environment switch that turns semantic
|
|
52
|
+
decisions into fixture results; packaged commands without the pinned provider
|
|
53
|
+
fail closed.
|
|
54
|
+
|
|
55
|
+
`npm run jev:smoke` performs only a tiny health request when credentials are configured. A missing credential reports `NOT_RUN`; an unavailable or rate-limited service is a failed live check, never a fabricated success. Provider failures are classified into stable error codes (authentication, unsupported model, rate limit, timeout, result normalization) and, for live maintainer diagnostics, the smoke result additionally reports only safe metadata (HTTP status, provider error type, request id, network class) — never credentials, headers, or raw request bodies. Inspection, recovery, and completion validation do not require a live Jev call, but a semantic-required mutation fails closed when its canonical decision is missing or stale.
|
|
56
|
+
|
|
57
|
+
The `INTAKE` and `CONTRACT_APPLICABILITY` checkpoints are observation-only in
|
|
58
|
+
this version. Their immutable decisions are recorded, fingerprinted, and
|
|
59
|
+
available for review and follow-up consumption, but their result does not
|
|
60
|
+
currently alter the route or create, skip, or weaken the contract: Jev never
|
|
61
|
+
removes user or deterministic signals, and a semantic `applicable: false` can
|
|
62
|
+
never suppress a deterministic contract requirement. A narrow additive consumer
|
|
63
|
+
was evaluated and deferred because it changes behavior across every provider
|
|
64
|
+
mode without a validated benefit; semantic consumption is tracked as a
|
|
65
|
+
follow-up task, not claimed as current routing quality.
|
|
66
|
+
|
|
67
|
+
Semantic-required operations use fail-closed cutover semantics: an unavailable,
|
|
68
|
+
stale, malformed, or unsupported decision cannot silently authorize a mutation.
|
|
69
|
+
Offline inspection, recovery, and deterministic completion validation remain
|
|
70
|
+
usable without a live Jev request. Cached decisions may be used only when their
|
|
71
|
+
existing fingerprint/freshness validators accept them.
|