@blxzer/pactile 0.6.0-beta.2 → 0.6.0-beta.5
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/README.md +93 -84
- package/README.zh-CN.md +90 -81
- package/dist/bin/compat-warning.d.ts +2 -0
- package/dist/bin/compat-warning.d.ts.map +1 -0
- package/dist/bin/compat-warning.js +8 -0
- package/dist/bin/compat-warning.js.map +1 -0
- package/dist/bin/cstl.d.ts +3 -0
- package/dist/bin/cstl.d.ts.map +1 -0
- package/{bin → dist/bin}/cstl.js +2 -3
- package/dist/bin/cstl.js.map +1 -0
- package/dist/bin/pactile.d.ts +3 -0
- package/dist/bin/pactile.d.ts.map +1 -0
- package/dist/bin/pactile.js +4 -0
- package/dist/bin/pactile.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +77 -17
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/capability.d.ts +3 -0
- package/dist/commands/capability.d.ts.map +1 -0
- package/dist/commands/capability.js +129 -0
- package/dist/commands/capability.js.map +1 -0
- package/dist/commands/codex.d.ts.map +1 -1
- package/dist/commands/codex.js +54 -6
- package/dist/commands/codex.js.map +1 -1
- package/dist/commands/context.d.ts +2 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +367 -41
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/detach.d.ts.map +1 -1
- package/dist/commands/detach.js +5 -4
- package/dist/commands/detach.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +615 -259
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/legacy-task.d.ts +3 -0
- package/dist/commands/legacy-task.d.ts.map +1 -0
- package/dist/commands/legacy-task.js +295 -0
- package/dist/commands/legacy-task.js.map +1 -0
- package/dist/commands/pi.d.ts +3 -2
- package/dist/commands/pi.d.ts.map +1 -1
- package/dist/commands/pi.js +333 -10
- package/dist/commands/pi.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +148 -24
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/task-schedule.d.ts +17 -0
- package/dist/commands/task-schedule.d.ts.map +1 -0
- package/dist/commands/task-schedule.js +395 -0
- package/dist/commands/task-schedule.js.map +1 -0
- package/dist/commands/task-verify-plan.d.ts +3 -0
- package/dist/commands/task-verify-plan.d.ts.map +1 -0
- package/dist/commands/task-verify-plan.js +503 -0
- package/dist/commands/task-verify-plan.js.map +1 -0
- package/dist/commands/task-worktree-close.d.ts +4 -0
- package/dist/commands/task-worktree-close.d.ts.map +1 -0
- package/dist/commands/task-worktree-close.js +81 -0
- package/dist/commands/task-worktree-close.js.map +1 -0
- package/dist/commands/task.d.ts +3 -0
- package/dist/commands/task.d.ts.map +1 -1
- package/dist/commands/task.js +1373 -184
- package/dist/commands/task.js.map +1 -1
- package/dist/commands/tile-selection.d.ts +3 -0
- package/dist/commands/tile-selection.d.ts.map +1 -0
- package/dist/commands/tile-selection.js +174 -0
- package/dist/commands/tile-selection.js.map +1 -0
- package/dist/commands/update.d.ts +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +80 -55
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/worktree.d.ts +4 -0
- package/dist/commands/worktree.d.ts.map +1 -0
- package/dist/commands/worktree.js +198 -0
- package/dist/commands/worktree.js.map +1 -0
- package/dist/configurators/shared.js +1 -1
- package/dist/configurators/shared.js.map +1 -1
- package/dist/core/compat/environment.d.ts +0 -1
- package/dist/core/compat/environment.d.ts.map +1 -1
- package/dist/core/compat/environment.js +1 -9
- package/dist/core/compat/environment.js.map +1 -1
- package/dist/core/pactile/bounded-capabilities.d.ts +127 -0
- package/dist/core/pactile/bounded-capabilities.d.ts.map +1 -0
- package/dist/core/pactile/bounded-capabilities.js +188 -0
- package/dist/core/pactile/bounded-capabilities.js.map +1 -0
- package/dist/core/pactile/index.d.ts +1 -0
- package/dist/core/pactile/index.d.ts.map +1 -1
- package/dist/core/pactile/index.js +1 -0
- package/dist/core/pactile/index.js.map +1 -1
- package/dist/core/task/index.d.ts +4 -2
- package/dist/core/task/index.d.ts.map +1 -1
- package/dist/core/task/index.js +2 -1
- package/dist/core/task/index.js.map +1 -1
- package/dist/core/task/kernel-cli.d.ts +14 -1
- package/dist/core/task/kernel-cli.d.ts.map +1 -1
- package/dist/core/task/kernel-cli.js +128 -0
- package/dist/core/task/kernel-cli.js.map +1 -1
- package/dist/core/task/kernel-contract.d.ts +6 -3
- package/dist/core/task/kernel-contract.d.ts.map +1 -1
- package/dist/core/task/kernel-contract.js +71 -23
- package/dist/core/task/kernel-contract.js.map +1 -1
- package/dist/core/task/kernel-store.d.ts +6 -0
- package/dist/core/task/kernel-store.d.ts.map +1 -1
- package/dist/core/task/kernel-store.js +54 -2
- package/dist/core/task/kernel-store.js.map +1 -1
- package/dist/core/task/legacy-task-migration-reader.d.ts +137 -0
- package/dist/core/task/legacy-task-migration-reader.d.ts.map +1 -0
- package/dist/core/task/legacy-task-migration-reader.js +512 -0
- package/dist/core/task/legacy-task-migration-reader.js.map +1 -0
- package/dist/core/task/legacy-task-migration.d.ts +105 -0
- package/dist/core/task/legacy-task-migration.d.ts.map +1 -0
- package/dist/core/task/legacy-task-migration.js +562 -0
- package/dist/core/task/legacy-task-migration.js.map +1 -0
- package/dist/core/task/legacy-task-overlay-durable-io.d.ts +18 -0
- package/dist/core/task/legacy-task-overlay-durable-io.d.ts.map +1 -0
- package/dist/core/task/legacy-task-overlay-durable-io.js +66 -0
- package/dist/core/task/legacy-task-overlay-durable-io.js.map +1 -0
- package/dist/core/task/legacy-task-reconciliation-reader.d.ts +26 -0
- package/dist/core/task/legacy-task-reconciliation-reader.d.ts.map +1 -0
- package/dist/core/task/legacy-task-reconciliation-reader.js +324 -0
- package/dist/core/task/legacy-task-reconciliation-reader.js.map +1 -0
- package/dist/core/task/legacy-task-v2-import.d.ts +67 -0
- package/dist/core/task/legacy-task-v2-import.d.ts.map +1 -0
- package/dist/core/task/legacy-task-v2-import.js +1046 -0
- package/dist/core/task/legacy-task-v2-import.js.map +1 -0
- package/dist/core/task/project-file-observer.d.ts +46 -0
- package/dist/core/task/project-file-observer.d.ts.map +1 -0
- package/dist/core/task/project-file-observer.js +618 -0
- package/dist/core/task/project-file-observer.js.map +1 -0
- package/dist/core/task/start-authority.d.ts +14 -0
- package/dist/core/task/start-authority.d.ts.map +1 -0
- package/dist/core/task/start-authority.js +146 -0
- package/dist/core/task/start-authority.js.map +1 -0
- package/dist/core/task/strategy.d.ts +24 -0
- package/dist/core/task/strategy.d.ts.map +1 -0
- package/dist/core/task/strategy.js +136 -0
- package/dist/core/task/strategy.js.map +1 -0
- package/dist/core/task/task-candidate-observer.d.ts +111 -0
- package/dist/core/task/task-candidate-observer.d.ts.map +1 -0
- package/dist/core/task/task-candidate-observer.js +762 -0
- package/dist/core/task/task-candidate-observer.js.map +1 -0
- package/dist/core/task/task-kernel-close.d.ts +5 -0
- package/dist/core/task/task-kernel-close.d.ts.map +1 -0
- package/dist/core/task/task-kernel-close.js +367 -0
- package/dist/core/task/task-kernel-close.js.map +1 -0
- package/dist/core/task/task-kernel-dependencies.d.ts +3 -0
- package/dist/core/task/task-kernel-dependencies.d.ts.map +1 -0
- package/dist/core/task/task-kernel-dependencies.js +24 -0
- package/dist/core/task/task-kernel-dependencies.js.map +1 -0
- package/dist/core/task/task-kernel-host.d.ts +5 -0
- package/dist/core/task/task-kernel-host.d.ts.map +1 -0
- package/dist/core/task/task-kernel-host.js +136 -0
- package/dist/core/task/task-kernel-host.js.map +1 -0
- package/dist/core/task/task-kernel-paths.d.ts +19 -0
- package/dist/core/task/task-kernel-paths.d.ts.map +1 -0
- package/dist/core/task/task-kernel-paths.js +237 -0
- package/dist/core/task/task-kernel-paths.js.map +1 -0
- package/dist/core/task/task-kernel-reviews.d.ts +3 -0
- package/dist/core/task/task-kernel-reviews.d.ts.map +1 -0
- package/dist/core/task/task-kernel-reviews.js +100 -0
- package/dist/core/task/task-kernel-reviews.js.map +1 -0
- package/dist/core/task/task-kernel-runs.d.ts +5 -0
- package/dist/core/task/task-kernel-runs.d.ts.map +1 -0
- package/dist/core/task/task-kernel-runs.js +196 -0
- package/dist/core/task/task-kernel-runs.js.map +1 -0
- package/dist/core/task/task-kernel-schema.d.ts +29 -0
- package/dist/core/task/task-kernel-schema.d.ts.map +1 -0
- package/dist/core/task/task-kernel-schema.js +1169 -0
- package/dist/core/task/task-kernel-schema.js.map +1 -0
- package/dist/core/task/task-kernel-store-v2.d.ts +33 -0
- package/dist/core/task/task-kernel-store-v2.d.ts.map +1 -0
- package/dist/core/task/task-kernel-store-v2.js +574 -0
- package/dist/core/task/task-kernel-store-v2.js.map +1 -0
- package/dist/core/task/task-kernel-types.d.ts +585 -0
- package/dist/core/task/task-kernel-types.d.ts.map +1 -0
- package/dist/core/task/task-kernel-types.js +31 -0
- package/dist/core/task/task-kernel-types.js.map +1 -0
- package/dist/core/task/task-kernel-workspaces.d.ts +10 -0
- package/dist/core/task/task-kernel-workspaces.d.ts.map +1 -0
- package/dist/core/task/task-kernel-workspaces.js +250 -0
- package/dist/core/task/task-kernel-workspaces.js.map +1 -0
- package/dist/core/task/task-kernel-write-set.d.ts +3 -0
- package/dist/core/task/task-kernel-write-set.d.ts.map +1 -0
- package/dist/core/task/task-kernel-write-set.js +12 -0
- package/dist/core/task/task-kernel-write-set.js.map +1 -0
- package/dist/core/task/task-kernel.d.ts +19 -0
- package/dist/core/task/task-kernel.d.ts.map +1 -0
- package/dist/core/task/task-kernel.js +17 -0
- package/dist/core/task/task-kernel.js.map +1 -0
- package/dist/core/task/task-pull-request-observer.d.ts +25 -0
- package/dist/core/task/task-pull-request-observer.d.ts.map +1 -0
- package/dist/core/task/task-pull-request-observer.js +187 -0
- package/dist/core/task/task-pull-request-observer.js.map +1 -0
- package/dist/core/task/task-review-evidence.d.ts +27 -0
- package/dist/core/task/task-review-evidence.d.ts.map +1 -0
- package/dist/core/task/task-review-evidence.js +383 -0
- package/dist/core/task/task-review-evidence.js.map +1 -0
- package/dist/migrations/index.d.ts +1 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +5 -3
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/manifests/0.6.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.5.json +9 -0
- package/dist/pactile/artifacts/documents.d.ts +72 -0
- package/dist/pactile/artifacts/documents.d.ts.map +1 -0
- package/dist/pactile/artifacts/documents.js +406 -0
- package/dist/pactile/artifacts/documents.js.map +1 -0
- package/dist/pactile/artifacts/index.d.ts +6 -0
- package/dist/pactile/artifacts/index.d.ts.map +1 -0
- package/dist/pactile/artifacts/index.js +6 -0
- package/dist/pactile/artifacts/index.js.map +1 -0
- package/dist/pactile/artifacts/projection.d.ts +50 -0
- package/dist/pactile/artifacts/projection.d.ts.map +1 -0
- package/dist/pactile/artifacts/projection.js +139 -0
- package/dist/pactile/artifacts/projection.js.map +1 -0
- package/dist/pactile/artifacts/reader.d.ts +20 -0
- package/dist/pactile/artifacts/reader.d.ts.map +1 -0
- package/dist/pactile/artifacts/reader.js +559 -0
- package/dist/pactile/artifacts/reader.js.map +1 -0
- package/dist/pactile/artifacts/schema.d.ts +4 -0
- package/dist/pactile/artifacts/schema.d.ts.map +1 -0
- package/dist/pactile/artifacts/schema.js +217 -0
- package/dist/pactile/artifacts/schema.js.map +1 -0
- package/dist/pactile/artifacts/types.d.ts +66 -0
- package/dist/pactile/artifacts/types.d.ts.map +1 -0
- package/dist/pactile/artifacts/types.js +45 -0
- package/dist/pactile/artifacts/types.js.map +1 -0
- package/dist/pactile/capabilities/claim.d.ts +3 -0
- package/dist/pactile/capabilities/claim.d.ts.map +1 -0
- package/dist/pactile/capabilities/claim.js +97 -0
- package/dist/pactile/capabilities/claim.js.map +1 -0
- package/dist/pactile/capabilities/command.d.ts +6 -0
- package/dist/pactile/capabilities/command.d.ts.map +1 -0
- package/dist/pactile/capabilities/command.js +253 -0
- package/dist/pactile/capabilities/command.js.map +1 -0
- package/dist/pactile/capabilities/discover.d.ts +6 -0
- package/dist/pactile/capabilities/discover.d.ts.map +1 -0
- package/dist/pactile/capabilities/discover.js +48 -0
- package/dist/pactile/capabilities/discover.js.map +1 -0
- package/dist/pactile/capabilities/node.d.ts +15 -0
- package/dist/pactile/capabilities/node.d.ts.map +1 -0
- package/dist/pactile/capabilities/node.js +292 -0
- package/dist/pactile/capabilities/node.js.map +1 -0
- package/dist/pactile/capabilities/read.d.ts +6 -0
- package/dist/pactile/capabilities/read.d.ts.map +1 -0
- package/dist/pactile/capabilities/read.js +100 -0
- package/dist/pactile/capabilities/read.js.map +1 -0
- package/dist/pactile/capabilities/receipts.d.ts +17 -0
- package/dist/pactile/capabilities/receipts.d.ts.map +1 -0
- package/dist/pactile/capabilities/receipts.js +90 -0
- package/dist/pactile/capabilities/receipts.js.map +1 -0
- package/dist/pactile/capabilities/search.d.ts +6 -0
- package/dist/pactile/capabilities/search.d.ts.map +1 -0
- package/dist/pactile/capabilities/search.js +181 -0
- package/dist/pactile/capabilities/search.js.map +1 -0
- package/dist/pactile/capabilities/shared.d.ts +29 -0
- package/dist/pactile/capabilities/shared.d.ts.map +1 -0
- package/dist/pactile/capabilities/shared.js +134 -0
- package/dist/pactile/capabilities/shared.js.map +1 -0
- package/dist/pactile/capabilities/workspace.d.ts +19 -0
- package/dist/pactile/capabilities/workspace.d.ts.map +1 -0
- package/dist/pactile/capabilities/workspace.js +273 -0
- package/dist/pactile/capabilities/workspace.js.map +1 -0
- package/dist/pactile/codex/bridge.d.ts +105 -2
- package/dist/pactile/codex/bridge.d.ts.map +1 -1
- package/dist/pactile/codex/bridge.js +1266 -92
- package/dist/pactile/codex/bridge.js.map +1 -1
- package/dist/pactile/codex/dispatch-stop-proof.d.ts +43 -0
- package/dist/pactile/codex/dispatch-stop-proof.d.ts.map +1 -0
- package/dist/pactile/codex/dispatch-stop-proof.js +177 -0
- package/dist/pactile/codex/dispatch-stop-proof.js.map +1 -0
- package/dist/pactile/codex/host-stop.d.ts +47 -0
- package/dist/pactile/codex/host-stop.d.ts.map +1 -0
- package/dist/pactile/codex/host-stop.js +344 -0
- package/dist/pactile/codex/host-stop.js.map +1 -0
- package/dist/pactile/coordination/index.d.ts +4 -0
- package/dist/pactile/coordination/index.d.ts.map +1 -0
- package/dist/pactile/coordination/index.js +4 -0
- package/dist/pactile/coordination/index.js.map +1 -0
- package/dist/pactile/coordination/journal.d.ts +10 -0
- package/dist/pactile/coordination/journal.d.ts.map +1 -0
- package/dist/pactile/coordination/journal.js +255 -0
- package/dist/pactile/coordination/journal.js.map +1 -0
- package/dist/pactile/coordination/kernel-resume.d.ts +8 -0
- package/dist/pactile/coordination/kernel-resume.d.ts.map +1 -0
- package/dist/pactile/coordination/kernel-resume.js +87 -0
- package/dist/pactile/coordination/kernel-resume.js.map +1 -0
- package/dist/pactile/coordination/model.d.ts +553 -0
- package/dist/pactile/coordination/model.d.ts.map +1 -0
- package/dist/pactile/coordination/model.js +239 -0
- package/dist/pactile/coordination/model.js.map +1 -0
- package/dist/pactile/coordination/state.d.ts +46 -0
- package/dist/pactile/coordination/state.d.ts.map +1 -0
- package/dist/pactile/coordination/state.js +301 -0
- package/dist/pactile/coordination/state.js.map +1 -0
- package/dist/pactile/coordination/store.d.ts +94 -0
- package/dist/pactile/coordination/store.d.ts.map +1 -0
- package/dist/pactile/coordination/store.js +396 -0
- package/dist/pactile/coordination/store.js.map +1 -0
- package/dist/pactile/index.d.ts +7 -1
- package/dist/pactile/index.d.ts.map +1 -1
- package/dist/pactile/index.js +7 -1
- package/dist/pactile/index.js.map +1 -1
- package/dist/pactile/jev/contracts.d.ts +104 -0
- package/dist/pactile/jev/contracts.d.ts.map +1 -0
- package/dist/pactile/jev/contracts.js +53 -0
- package/dist/pactile/jev/contracts.js.map +1 -0
- package/dist/pactile/jev/decision.d.ts +58 -0
- package/dist/pactile/jev/decision.d.ts.map +1 -0
- package/dist/pactile/jev/decision.js +149 -0
- package/dist/pactile/jev/decision.js.map +1 -0
- package/dist/pactile/jev/http.d.ts +25 -0
- package/dist/pactile/jev/http.d.ts.map +1 -0
- package/dist/pactile/jev/http.js +234 -0
- package/dist/pactile/jev/http.js.map +1 -0
- package/dist/pactile/jev/index.d.ts +8 -0
- package/dist/pactile/jev/index.d.ts.map +1 -0
- package/dist/pactile/jev/index.js +4 -0
- package/dist/pactile/jev/index.js.map +1 -0
- package/dist/pactile/jev/outbound.d.ts +15 -0
- package/dist/pactile/jev/outbound.d.ts.map +1 -0
- package/dist/pactile/jev/outbound.js +264 -0
- package/dist/pactile/jev/outbound.js.map +1 -0
- package/dist/pactile/jev/project-policy.d.ts +10 -0
- package/dist/pactile/jev/project-policy.d.ts.map +1 -0
- package/dist/pactile/jev/project-policy.js +53 -0
- package/dist/pactile/jev/project-policy.js.map +1 -0
- package/dist/pactile/jev/response.d.ts +17 -0
- package/dist/pactile/jev/response.d.ts.map +1 -0
- package/dist/pactile/jev/response.js +280 -0
- package/dist/pactile/jev/response.js.map +1 -0
- package/dist/pactile/jev/scheduler-advice.d.ts +92 -0
- package/dist/pactile/jev/scheduler-advice.d.ts.map +1 -0
- package/dist/pactile/jev/scheduler-advice.js +323 -0
- package/dist/pactile/jev/scheduler-advice.js.map +1 -0
- package/dist/pactile/jev/transport.d.ts +6 -0
- package/dist/pactile/jev/transport.d.ts.map +1 -0
- package/dist/pactile/jev/transport.js +87 -0
- package/dist/pactile/jev/transport.js.map +1 -0
- package/dist/pactile/lifecycle/deferred-live.d.ts +17 -0
- package/dist/pactile/lifecycle/deferred-live.d.ts.map +1 -0
- package/dist/pactile/lifecycle/deferred-live.js +173 -0
- package/dist/pactile/lifecycle/deferred-live.js.map +1 -0
- package/dist/pactile/lifecycle/legacy-import.d.ts +1 -1
- package/dist/pactile/lifecycle/legacy-import.js +3 -3
- package/dist/pactile/lifecycle/legacy-import.js.map +1 -1
- package/dist/pactile/lifecycle/project-files.d.ts.map +1 -1
- package/dist/pactile/lifecycle/project-files.js +1 -0
- package/dist/pactile/lifecycle/project-files.js.map +1 -1
- package/dist/pactile/migration/legacy-task-batch-generation.d.ts +23 -0
- package/dist/pactile/migration/legacy-task-batch-generation.d.ts.map +1 -0
- package/dist/pactile/migration/legacy-task-batch-generation.js +102 -0
- package/dist/pactile/migration/legacy-task-batch-generation.js.map +1 -0
- package/dist/pactile/migration/legacy-task-batch-io.d.ts +9 -0
- package/dist/pactile/migration/legacy-task-batch-io.d.ts.map +1 -0
- package/dist/pactile/migration/legacy-task-batch-io.js +208 -0
- package/dist/pactile/migration/legacy-task-batch-io.js.map +1 -0
- package/dist/pactile/migration/legacy-task-batch-journal.d.ts +6 -0
- package/dist/pactile/migration/legacy-task-batch-journal.d.ts.map +1 -0
- package/dist/pactile/migration/legacy-task-batch-journal.js +121 -0
- package/dist/pactile/migration/legacy-task-batch-journal.js.map +1 -0
- package/dist/pactile/migration/legacy-task-batch-orchestrator.d.ts +18 -0
- package/dist/pactile/migration/legacy-task-batch-orchestrator.d.ts.map +1 -0
- package/dist/pactile/migration/legacy-task-batch-orchestrator.js +634 -0
- package/dist/pactile/migration/legacy-task-batch-orchestrator.js.map +1 -0
- package/dist/pactile/migration/legacy-task-batch-source.d.ts +8 -0
- package/dist/pactile/migration/legacy-task-batch-source.d.ts.map +1 -0
- package/dist/pactile/migration/legacy-task-batch-source.js +158 -0
- package/dist/pactile/migration/legacy-task-batch-source.js.map +1 -0
- package/dist/pactile/migration/legacy-task-batch-types.d.ts +127 -0
- package/dist/pactile/migration/legacy-task-batch-types.d.ts.map +1 -0
- package/dist/pactile/migration/legacy-task-batch-types.js +127 -0
- package/dist/pactile/migration/legacy-task-batch-types.js.map +1 -0
- package/dist/pactile/migration/legacy-task-batch.d.ts +3 -0
- package/dist/pactile/migration/legacy-task-batch.d.ts.map +1 -0
- package/dist/pactile/migration/legacy-task-batch.js +2 -0
- package/dist/pactile/migration/legacy-task-batch.js.map +1 -0
- package/dist/pactile/migration/legacy-task-held-source-reader.d.ts +27 -0
- package/dist/pactile/migration/legacy-task-held-source-reader.d.ts.map +1 -0
- package/dist/pactile/migration/legacy-task-held-source-reader.js +261 -0
- package/dist/pactile/migration/legacy-task-held-source-reader.js.map +1 -0
- package/dist/pactile/migration/legacy-task-reconciliation.d.ts +46 -0
- package/dist/pactile/migration/legacy-task-reconciliation.d.ts.map +1 -0
- package/dist/pactile/migration/legacy-task-reconciliation.js +589 -0
- package/dist/pactile/migration/legacy-task-reconciliation.js.map +1 -0
- package/dist/pactile/migration/legacy-task-update.d.ts +19 -0
- package/dist/pactile/migration/legacy-task-update.d.ts.map +1 -0
- package/dist/pactile/migration/legacy-task-update.js +164 -0
- package/dist/pactile/migration/legacy-task-update.js.map +1 -0
- package/dist/pactile/parallel/batch.d.ts +21 -2
- package/dist/pactile/parallel/batch.d.ts.map +1 -1
- package/dist/pactile/parallel/batch.js +271 -50
- package/dist/pactile/parallel/batch.js.map +1 -1
- package/dist/pactile/parallel/policy.d.ts +1 -1
- package/dist/pactile/parallel/policy.d.ts.map +1 -1
- package/dist/pactile/parallel/policy.js +130 -102
- package/dist/pactile/parallel/policy.js.map +1 -1
- package/dist/pactile/pi/bridge.d.ts +139 -2
- package/dist/pactile/pi/bridge.d.ts.map +1 -1
- package/dist/pactile/pi/bridge.js +1317 -106
- package/dist/pactile/pi/bridge.js.map +1 -1
- package/dist/pactile/pi/rpc.d.ts +23 -4
- package/dist/pactile/pi/rpc.d.ts.map +1 -1
- package/dist/pactile/pi/rpc.js +243 -42
- package/dist/pactile/pi/rpc.js.map +1 -1
- package/dist/pactile/pi/v2-dispatch.d.ts +113 -0
- package/dist/pactile/pi/v2-dispatch.d.ts.map +1 -0
- package/dist/pactile/pi/v2-dispatch.js +919 -0
- package/dist/pactile/pi/v2-dispatch.js.map +1 -0
- package/dist/pactile/projection/planner.js +1 -1
- package/dist/pactile/projection/planner.js.map +1 -1
- package/dist/pactile/registry.d.ts +63 -1
- package/dist/pactile/registry.d.ts.map +1 -1
- package/dist/pactile/registry.js +633 -4
- package/dist/pactile/registry.js.map +1 -1
- package/dist/pactile/retrieval/index.d.ts +1 -0
- package/dist/pactile/retrieval/index.d.ts.map +1 -1
- package/dist/pactile/retrieval/index.js +1 -0
- package/dist/pactile/retrieval/index.js.map +1 -1
- package/dist/pactile/retrieval/jev-planning.d.ts +28 -0
- package/dist/pactile/retrieval/jev-planning.d.ts.map +1 -0
- package/dist/pactile/retrieval/jev-planning.js +96 -0
- package/dist/pactile/retrieval/jev-planning.js.map +1 -0
- package/dist/pactile/review/contract.d.ts +232 -0
- package/dist/pactile/review/contract.d.ts.map +1 -0
- package/dist/pactile/review/contract.js +695 -0
- package/dist/pactile/review/contract.js.map +1 -0
- package/dist/pactile/review/escalation-artifacts.d.ts +41 -0
- package/dist/pactile/review/escalation-artifacts.d.ts.map +1 -0
- package/dist/pactile/review/escalation-artifacts.js +415 -0
- package/dist/pactile/review/escalation-artifacts.js.map +1 -0
- package/dist/pactile/review/escalation-contract.d.ts +115 -0
- package/dist/pactile/review/escalation-contract.d.ts.map +1 -0
- package/dist/pactile/review/escalation-contract.js +151 -0
- package/dist/pactile/review/escalation-contract.js.map +1 -0
- package/dist/pactile/review/escalation-finalize.d.ts +14 -0
- package/dist/pactile/review/escalation-finalize.d.ts.map +1 -0
- package/dist/pactile/review/escalation-finalize.js +319 -0
- package/dist/pactile/review/escalation-finalize.js.map +1 -0
- package/dist/pactile/review/escalation-reply.d.ts +10 -0
- package/dist/pactile/review/escalation-reply.d.ts.map +1 -0
- package/dist/pactile/review/escalation-reply.js +61 -0
- package/dist/pactile/review/escalation-reply.js.map +1 -0
- package/dist/pactile/review/escalation-transport.d.ts +32 -0
- package/dist/pactile/review/escalation-transport.d.ts.map +1 -0
- package/dist/pactile/review/escalation-transport.js +216 -0
- package/dist/pactile/review/escalation-transport.js.map +1 -0
- package/dist/pactile/review/escalation.d.ts +7 -0
- package/dist/pactile/review/escalation.d.ts.map +1 -0
- package/dist/pactile/review/escalation.js +6 -0
- package/dist/pactile/review/escalation.js.map +1 -0
- package/dist/pactile/review/evidence.d.ts +25 -0
- package/dist/pactile/review/evidence.d.ts.map +1 -0
- package/dist/pactile/review/evidence.js +58 -0
- package/dist/pactile/review/evidence.js.map +1 -0
- package/dist/pactile/review/jev-escalation-advice.d.ts +77 -0
- package/dist/pactile/review/jev-escalation-advice.d.ts.map +1 -0
- package/dist/pactile/review/jev-escalation-advice.js +358 -0
- package/dist/pactile/review/jev-escalation-advice.js.map +1 -0
- package/dist/pactile/scheduler/index.d.ts +6 -0
- package/dist/pactile/scheduler/index.d.ts.map +1 -0
- package/dist/pactile/scheduler/index.js +5 -0
- package/dist/pactile/scheduler/index.js.map +1 -0
- package/dist/pactile/scheduler/project-lease-store.d.ts +35 -0
- package/dist/pactile/scheduler/project-lease-store.d.ts.map +1 -0
- package/dist/pactile/scheduler/project-lease-store.js +189 -0
- package/dist/pactile/scheduler/project-lease-store.js.map +1 -0
- package/dist/pactile/scheduler/scheduler.d.ts +91 -0
- package/dist/pactile/scheduler/scheduler.d.ts.map +1 -0
- package/dist/pactile/scheduler/scheduler.js +589 -0
- package/dist/pactile/scheduler/scheduler.js.map +1 -0
- package/dist/pactile/scheduler/task-kernel-admission.d.ts +173 -0
- package/dist/pactile/scheduler/task-kernel-admission.d.ts.map +1 -0
- package/dist/pactile/scheduler/task-kernel-admission.js +1560 -0
- package/dist/pactile/scheduler/task-kernel-admission.js.map +1 -0
- package/dist/pactile/scheduler/task-kernel-wave-dispatch.d.ts +184 -0
- package/dist/pactile/scheduler/task-kernel-wave-dispatch.d.ts.map +1 -0
- package/dist/pactile/scheduler/task-kernel-wave-dispatch.js +952 -0
- package/dist/pactile/scheduler/task-kernel-wave-dispatch.js.map +1 -0
- package/dist/pactile/scheduler/task-map-scheduler.d.ts +116 -0
- package/dist/pactile/scheduler/task-map-scheduler.d.ts.map +1 -0
- package/dist/pactile/scheduler/task-map-scheduler.js +1448 -0
- package/dist/pactile/scheduler/task-map-scheduler.js.map +1 -0
- package/dist/pactile/scheduler/task-run-dispatch-state.d.ts +7 -0
- package/dist/pactile/scheduler/task-run-dispatch-state.d.ts.map +1 -0
- package/dist/pactile/scheduler/task-run-dispatch-state.js +69 -0
- package/dist/pactile/scheduler/task-run-dispatch-state.js.map +1 -0
- package/dist/pactile/task/authorization.d.ts +3 -0
- package/dist/pactile/task/authorization.d.ts.map +1 -0
- package/dist/pactile/task/authorization.js +43 -0
- package/dist/pactile/task/authorization.js.map +1 -0
- package/dist/pactile/task/creation.d.ts +22 -0
- package/dist/pactile/task/creation.d.ts.map +1 -0
- package/dist/pactile/task/creation.js +95 -0
- package/dist/pactile/task/creation.js.map +1 -0
- package/dist/pactile/task/guards.d.ts +1 -4
- package/dist/pactile/task/guards.d.ts.map +1 -1
- package/dist/pactile/task/guards.js +5 -57
- package/dist/pactile/task/guards.js.map +1 -1
- package/dist/pactile/task/session-jev-receipt.d.ts +58 -0
- package/dist/pactile/task/session-jev-receipt.d.ts.map +1 -0
- package/dist/pactile/task/session-jev-receipt.js +375 -0
- package/dist/pactile/task/session-jev-receipt.js.map +1 -0
- package/dist/pactile/task/session-jev.d.ts +7 -0
- package/dist/pactile/task/session-jev.d.ts.map +1 -0
- package/dist/pactile/task/session-jev.js +217 -0
- package/dist/pactile/task/session-jev.js.map +1 -0
- package/dist/pactile/task/session-pack.d.ts.map +1 -1
- package/dist/pactile/task/session-pack.js +155 -16
- package/dist/pactile/task/session-pack.js.map +1 -1
- package/dist/pactile/task/session-retrieval-jev-receipt.d.ts +49 -0
- package/dist/pactile/task/session-retrieval-jev-receipt.d.ts.map +1 -0
- package/dist/pactile/task/session-retrieval-jev-receipt.js +97 -0
- package/dist/pactile/task/session-retrieval-jev-receipt.js.map +1 -0
- package/dist/pactile/task/session-retrieval-jev.d.ts +8 -0
- package/dist/pactile/task/session-retrieval-jev.d.ts.map +1 -0
- package/dist/pactile/task/session-retrieval-jev.js +352 -0
- package/dist/pactile/task/session-retrieval-jev.js.map +1 -0
- package/dist/pactile/task/strategy.d.ts +1 -23
- package/dist/pactile/task/strategy.d.ts.map +1 -1
- package/dist/pactile/task/strategy.js +2 -135
- package/dist/pactile/task/strategy.js.map +1 -1
- package/dist/pactile/tiles/jev-selection.d.ts +44 -0
- package/dist/pactile/tiles/jev-selection.d.ts.map +1 -0
- package/dist/pactile/tiles/jev-selection.js +210 -0
- package/dist/pactile/tiles/jev-selection.js.map +1 -0
- package/dist/pactile/tiles/safe-yaml.d.ts +5 -1
- package/dist/pactile/tiles/safe-yaml.d.ts.map +1 -1
- package/dist/pactile/tiles/safe-yaml.js +8 -8
- package/dist/pactile/tiles/safe-yaml.js.map +1 -1
- package/dist/pactile/tiles/selection-receipts.d.ts +71 -0
- package/dist/pactile/tiles/selection-receipts.d.ts.map +1 -0
- package/dist/pactile/tiles/selection-receipts.js +319 -0
- package/dist/pactile/tiles/selection-receipts.js.map +1 -0
- package/dist/pactile/tiles/selection.d.ts +185 -0
- package/dist/pactile/tiles/selection.d.ts.map +1 -0
- package/dist/pactile/tiles/selection.js +985 -0
- package/dist/pactile/tiles/selection.js.map +1 -0
- package/dist/pactile/verification/git-observer.d.ts +3 -0
- package/dist/pactile/verification/git-observer.d.ts.map +1 -0
- package/dist/pactile/verification/git-observer.js +3 -0
- package/dist/pactile/verification/git-observer.js.map +1 -0
- package/dist/pactile/verification/index.d.ts +11 -0
- package/dist/pactile/verification/index.d.ts.map +1 -0
- package/dist/pactile/verification/index.js +6 -0
- package/dist/pactile/verification/index.js.map +1 -0
- package/dist/pactile/verification/jev-advice.d.ts +78 -0
- package/dist/pactile/verification/jev-advice.d.ts.map +1 -0
- package/dist/pactile/verification/jev-advice.js +397 -0
- package/dist/pactile/verification/jev-advice.js.map +1 -0
- package/dist/pactile/verification/planner.d.ts +15 -0
- package/dist/pactile/verification/planner.d.ts.map +1 -0
- package/dist/pactile/verification/planner.js +412 -0
- package/dist/pactile/verification/planner.js.map +1 -0
- package/dist/pactile/verification/receipt.d.ts +101 -0
- package/dist/pactile/verification/receipt.d.ts.map +1 -0
- package/dist/pactile/verification/receipt.js +400 -0
- package/dist/pactile/verification/receipt.js.map +1 -0
- package/dist/pactile/verification/types.d.ts +72 -0
- package/dist/pactile/verification/types.d.ts.map +1 -0
- package/dist/pactile/verification/types.js +21 -0
- package/dist/pactile/verification/types.js.map +1 -0
- package/dist/pactile/worktree/git-probe.d.ts +32 -0
- package/dist/pactile/worktree/git-probe.d.ts.map +1 -0
- package/dist/pactile/worktree/git-probe.js +336 -0
- package/dist/pactile/worktree/git-probe.js.map +1 -0
- package/dist/pactile/worktree/git-removal.d.ts +3 -0
- package/dist/pactile/worktree/git-removal.d.ts.map +1 -0
- package/dist/pactile/worktree/git-removal.js +11 -0
- package/dist/pactile/worktree/git-removal.js.map +1 -0
- package/dist/pactile/worktree/index.d.ts +2 -0
- package/dist/pactile/worktree/index.d.ts.map +1 -0
- package/dist/pactile/worktree/index.js +2 -0
- package/dist/pactile/worktree/index.js.map +1 -0
- package/dist/pactile/worktree/integration-evidence.d.ts +80 -0
- package/dist/pactile/worktree/integration-evidence.d.ts.map +1 -0
- package/dist/pactile/worktree/integration-evidence.js +166 -0
- package/dist/pactile/worktree/integration-evidence.js.map +1 -0
- package/dist/pactile/worktree/manager-core.d.ts +50 -0
- package/dist/pactile/worktree/manager-core.d.ts.map +1 -0
- package/dist/pactile/worktree/manager-core.js +359 -0
- package/dist/pactile/worktree/manager-core.js.map +1 -0
- package/dist/pactile/worktree/manager-provenance.d.ts +32 -0
- package/dist/pactile/worktree/manager-provenance.d.ts.map +1 -0
- package/dist/pactile/worktree/manager-provenance.js +409 -0
- package/dist/pactile/worktree/manager-provenance.js.map +1 -0
- package/dist/pactile/worktree/manager-types.d.ts +84 -0
- package/dist/pactile/worktree/manager-types.d.ts.map +1 -0
- package/dist/pactile/worktree/manager-types.js +11 -0
- package/dist/pactile/worktree/manager-types.js.map +1 -0
- package/dist/pactile/worktree/manager.d.ts +10 -0
- package/dist/pactile/worktree/manager.d.ts.map +1 -0
- package/dist/pactile/worktree/manager.js +6 -0
- package/dist/pactile/worktree/manager.js.map +1 -0
- package/dist/pactile/worktree/run-workspace-cleanup.d.ts +10 -0
- package/dist/pactile/worktree/run-workspace-cleanup.d.ts.map +1 -0
- package/dist/pactile/worktree/run-workspace-cleanup.js +695 -0
- package/dist/pactile/worktree/run-workspace-cleanup.js.map +1 -0
- package/dist/pactile/worktree/run-workspace-lifecycle.d.ts +65 -0
- package/dist/pactile/worktree/run-workspace-lifecycle.d.ts.map +1 -0
- package/dist/pactile/worktree/run-workspace-lifecycle.js +276 -0
- package/dist/pactile/worktree/run-workspace-lifecycle.js.map +1 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-hooks.md +1 -1
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/generated-files.md +1 -1
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/hooks-and-settings.md +1 -1
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/overview.md +1 -1
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/platform-map.md +1 -1
- package/dist/templates/common/bundled-skills/smart-search-cli/SKILL.md +2 -0
- package/dist/templates/common/skills/brainstorm.md +19 -13
- package/dist/templates/markdown/agents.md +2 -2
- package/dist/templates/markdown/framework/execution-strategy.md.txt +1 -1
- package/dist/templates/markdown/framework/index.md.txt +1 -1
- package/dist/templates/markdown/framework/parallel-first-execution.md.txt +17 -105
- package/dist/templates/markdown/framework/prd-grill-frontier.md.txt +3 -3
- package/dist/templates/markdown/framework/release-boundary.md.txt +9 -10
- package/dist/templates/markdown/framework/retrieval-daily-guide.md.txt +1 -1
- package/dist/templates/pactile/CONTEXT.md +48 -36
- package/dist/templates/pactile/modules/approval-personal/contract.md +12 -24
- package/dist/templates/pactile/modules/close-basic/contract.md +15 -18
- package/dist/templates/pactile/modules/debug-recovery/contract.md +4 -4
- package/dist/templates/pactile/modules/define-basic/contract.md +15 -19
- package/dist/templates/pactile/modules/define-extended/contract.md +3 -3
- package/dist/templates/pactile/modules/execute-agent/contract.md +11 -19
- package/dist/templates/pactile/modules/intake-basic/contract.md +16 -13
- package/dist/templates/pactile/modules/verify-basic/contract.md +11 -20
- package/dist/templates/pactile/tasks/templates/release-execution/design.md +5 -5
- package/dist/templates/pactile/tasks/templates/release-readiness/design.md +6 -6
- package/dist/templates/pactile/tasks/templates/release-readiness/handoff-template.md +8 -2
- package/dist/templates/pactile/workflow.md +37 -41
- package/dist/templates/template-utils.d.ts +1 -2
- package/dist/templates/template-utils.d.ts.map +1 -1
- package/dist/templates/template-utils.js +2 -13
- package/dist/templates/template-utils.js.map +1 -1
- package/dist/types/ai-tools.d.ts +1 -1
- package/dist/types/ai-tools.js +1 -1
- package/dist/utils/manifest-prune.js +1 -1
- package/dist/utils/manifest-prune.js.map +1 -1
- package/dist/utils/p36-upgrade.d.ts +2 -2
- package/dist/utils/p36-upgrade.d.ts.map +1 -1
- package/dist/utils/p36-upgrade.js +2 -10
- package/dist/utils/p36-upgrade.js.map +1 -1
- package/dist/utils/post-update-smoke.js +1 -1
- package/dist/utils/post-update-smoke.js.map +1 -1
- package/dist/utils/readiness.d.ts +2 -2
- package/dist/utils/readiness.js +2 -2
- package/dist/utils/uninstall-scrubbers.js +1 -1
- package/dist/utils/workflow-dir.d.ts +1 -1
- package/dist/utils/workflow-dir.d.ts.map +1 -1
- package/dist/utils/workflow-dir.js +1 -1
- package/dist/utils/workflow-dir.js.map +1 -1
- package/package.json +42 -37
- package/CHANGELOG.md +0 -651
- package/bin/compat-warning.js +0 -11
- package/bin/pactile.js +0 -3
- package/bin/smart-search.js +0 -38
- package/dist/migrations/manifests/0.1.0.json +0 -9
- package/dist/migrations/manifests/0.1.1.json +0 -9
- package/dist/migrations/manifests/0.1.2.json +0 -9
- package/dist/migrations/manifests/0.1.3.json +0 -9
- package/dist/migrations/manifests/0.1.4.json +0 -9
- package/dist/migrations/manifests/0.2.1.json +0 -9
- package/dist/migrations/manifests/0.2.10.json +0 -374
- package/dist/migrations/manifests/0.2.2.json +0 -9
- package/dist/migrations/manifests/0.2.3.json +0 -9
- package/dist/migrations/manifests/0.2.4.json +0 -9
- package/dist/migrations/manifests/0.2.5.json +0 -9
- package/dist/migrations/manifests/0.2.6.json +0 -9
- package/dist/migrations/manifests/0.2.7.json +0 -9
- package/dist/migrations/manifests/0.2.8.json +0 -9
- package/dist/migrations/manifests/0.2.9.json +0 -9
- package/dist/migrations/manifests/0.3.0.json +0 -89
- package/dist/migrations/manifests/0.3.1.json +0 -32
- package/dist/migrations/manifests/0.3.2.json +0 -16
- package/dist/migrations/manifests/0.3.3.json +0 -9
- package/dist/migrations/manifests/0.3.4.json +0 -9
- package/dist/migrations/manifests/0.3.5.json +0 -9
- package/dist/migrations/manifests/0.3.6.json +0 -9
- package/dist/migrations/manifests/0.4.0.json +0 -9
- package/dist/migrations/manifests/0.4.1.json +0 -9
- package/dist/migrations/manifests/0.4.2.json +0 -9
- package/dist/migrations/manifests/0.4.3.json +0 -9
- package/dist/migrations/manifests/0.5.0-beta.0.json +0 -9
- package/dist/migrations/manifests/0.5.0-beta.1.json +0 -9
- package/dist/migrations/manifests/0.5.0-beta.2.json +0 -9
- package/dist/migrations/manifests/0.5.0-beta.3.json +0 -9
- package/dist/migrations/manifests/0.5.0-beta.4.json +0 -9
- package/dist/migrations/manifests/0.5.0-beta.5.json +0 -9
- package/dist/migrations/manifests/0.5.0.json +0 -9
- package/dist/pactile/compat/retired-alternate-client.d.ts +0 -42
- package/dist/pactile/compat/retired-alternate-client.d.ts.map +0 -1
- package/dist/pactile/compat/retired-alternate-client.js +0 -153
- package/dist/pactile/compat/retired-alternate-client.js.map +0 -1
- package/dist/pactile/compat/update-residue.d.ts +0 -4
- package/dist/pactile/compat/update-residue.d.ts.map +0 -1
- package/dist/pactile/compat/update-residue.js +0 -55
- package/dist/pactile/compat/update-residue.js.map +0 -1
- package/dist/utils/cursor-retrieval-env.d.ts +0 -17
- package/dist/utils/cursor-retrieval-env.d.ts.map +0 -1
- package/dist/utils/cursor-retrieval-env.js +0 -19
- package/dist/utils/cursor-retrieval-env.js.map +0 -1
- package/dist/utils/proxy.d.ts +0 -25
- package/dist/utils/proxy.d.ts.map +0 -1
- package/dist/utils/proxy.js +0 -60
- package/dist/utils/proxy.js.map +0 -1
- package/scripts/postinstall.js +0 -6
|
@@ -0,0 +1,618 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
export const PROJECT_FILE_BASELINE_SOURCE = "pactile-project-file-baseline-v1";
|
|
5
|
+
export const PROJECT_FILE_SNAPSHOT_POLICY = "project-files-bounded-v1";
|
|
6
|
+
export const PROJECT_FILE_CANDIDATE_OBSERVER_VERSION = "project-files-v1";
|
|
7
|
+
export const PROJECT_FILE_CANDIDATE_ENTRY_REF = "pactile:verification:project-files-v1";
|
|
8
|
+
export const PROJECT_FILE_SNAPSHOT_MAX_FILES = 4_096;
|
|
9
|
+
export const PROJECT_FILE_SNAPSHOT_MAX_FILE_BYTES = 2 * 1024 * 1024;
|
|
10
|
+
export const PROJECT_FILE_SNAPSHOT_MAX_TOTAL_BYTES = 32 * 1024 * 1024;
|
|
11
|
+
export const PROJECT_FILE_SNAPSHOT_MAX_DIRECTORY_ENTRIES = 4_096;
|
|
12
|
+
export const PROJECT_FILE_SNAPSHOT_MAX_DIRECTORIES = 4_096;
|
|
13
|
+
export const PROJECT_FILE_SNAPSHOT_MAX_ENTRIES = 8_192;
|
|
14
|
+
const MAX_AFFECTED_PATHS = 1_000;
|
|
15
|
+
const MAX_PATH_LENGTH = 4_096;
|
|
16
|
+
export const PROJECT_FILE_SNAPSHOT_EXCLUDED_DIRECTORIES = [
|
|
17
|
+
".git",
|
|
18
|
+
".pactile",
|
|
19
|
+
".tmp",
|
|
20
|
+
".tools",
|
|
21
|
+
".codegraph",
|
|
22
|
+
".cache",
|
|
23
|
+
".pnpm-store",
|
|
24
|
+
".pytest_cache",
|
|
25
|
+
".mypy_cache",
|
|
26
|
+
".ruff_cache",
|
|
27
|
+
".tox",
|
|
28
|
+
".nox",
|
|
29
|
+
".venv",
|
|
30
|
+
".next",
|
|
31
|
+
".nuxt",
|
|
32
|
+
".turbo",
|
|
33
|
+
".svelte-kit",
|
|
34
|
+
".ssh",
|
|
35
|
+
".aws",
|
|
36
|
+
".azure",
|
|
37
|
+
".kube",
|
|
38
|
+
".gnupg",
|
|
39
|
+
"node_modules",
|
|
40
|
+
"vendor",
|
|
41
|
+
"venv",
|
|
42
|
+
"dist",
|
|
43
|
+
"build",
|
|
44
|
+
"out",
|
|
45
|
+
"coverage",
|
|
46
|
+
"__pycache__",
|
|
47
|
+
"target",
|
|
48
|
+
];
|
|
49
|
+
export const PROJECT_FILE_SNAPSHOT_EXCLUDED_FILE_RULES = [
|
|
50
|
+
".env",
|
|
51
|
+
".env.*",
|
|
52
|
+
"*.pem",
|
|
53
|
+
"*.key",
|
|
54
|
+
"*.p12",
|
|
55
|
+
"*.pfx",
|
|
56
|
+
"id_rsa*",
|
|
57
|
+
"id_ed25519*",
|
|
58
|
+
];
|
|
59
|
+
const EXCLUDED_DIRECTORY_NAMES = new Set(PROJECT_FILE_SNAPSHOT_EXCLUDED_DIRECTORIES.map((name) => name.toLowerCase()));
|
|
60
|
+
const SECRET_FILE_SUFFIXES = [".pem", ".key", ".p12", ".pfx"];
|
|
61
|
+
function compareProjectPaths(left, right) {
|
|
62
|
+
const normalize = (value) => process.platform === "win32" ? value.toLowerCase() : value;
|
|
63
|
+
const a = normalize(left);
|
|
64
|
+
const b = normalize(right);
|
|
65
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
66
|
+
}
|
|
67
|
+
export class ProjectFileObservationError extends Error {
|
|
68
|
+
code;
|
|
69
|
+
constructor(code, message) {
|
|
70
|
+
super(message);
|
|
71
|
+
this.name = "ProjectFileObservationError";
|
|
72
|
+
this.code = code;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function sha256(value) {
|
|
76
|
+
return createHash("sha256").update(value).digest("hex");
|
|
77
|
+
}
|
|
78
|
+
function stableFingerprint(value) {
|
|
79
|
+
return sha256(JSON.stringify(value));
|
|
80
|
+
}
|
|
81
|
+
function samePath(left, right) {
|
|
82
|
+
const normalize = (value) => process.platform === "win32" ? value.toLowerCase() : value;
|
|
83
|
+
return normalize(path.resolve(left)) === normalize(path.resolve(right));
|
|
84
|
+
}
|
|
85
|
+
function isWithinRoot(root, candidate) {
|
|
86
|
+
const relative = path.relative(root, candidate);
|
|
87
|
+
return (relative === "" ||
|
|
88
|
+
(relative !== ".." &&
|
|
89
|
+
!relative.startsWith(`..${path.sep}`) &&
|
|
90
|
+
!path.isAbsolute(relative)));
|
|
91
|
+
}
|
|
92
|
+
function statFingerprint(stat) {
|
|
93
|
+
return [
|
|
94
|
+
stat.dev,
|
|
95
|
+
stat.ino,
|
|
96
|
+
stat.mode,
|
|
97
|
+
stat.size,
|
|
98
|
+
stat.mtimeMs,
|
|
99
|
+
stat.ctimeMs,
|
|
100
|
+
].join(":");
|
|
101
|
+
}
|
|
102
|
+
function readDirectoryNames(absoluteDirectory, relativeDirectory) {
|
|
103
|
+
let directory;
|
|
104
|
+
try {
|
|
105
|
+
directory = fs.opendirSync(absoluteDirectory);
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
throw new ProjectFileObservationError("candidate-mismatch", `Project directory ${relativeDirectory || "."} cannot be scanned.`);
|
|
109
|
+
}
|
|
110
|
+
const names = [];
|
|
111
|
+
let failure;
|
|
112
|
+
try {
|
|
113
|
+
for (;;) {
|
|
114
|
+
const entry = directory.readSync();
|
|
115
|
+
if (entry === null)
|
|
116
|
+
break;
|
|
117
|
+
names.push(entry.name);
|
|
118
|
+
if (names.length > PROJECT_FILE_SNAPSHOT_MAX_DIRECTORY_ENTRIES) {
|
|
119
|
+
throw new ProjectFileObservationError("observation-limit-exceeded", `Project directory ${relativeDirectory || "."} exceeds the ${PROJECT_FILE_SNAPSHOT_MAX_DIRECTORY_ENTRIES}-entry limit.`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
failure = error;
|
|
125
|
+
}
|
|
126
|
+
try {
|
|
127
|
+
directory.closeSync();
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
failure ??= error;
|
|
131
|
+
}
|
|
132
|
+
if (failure instanceof ProjectFileObservationError)
|
|
133
|
+
throw failure;
|
|
134
|
+
if (failure !== undefined) {
|
|
135
|
+
throw new ProjectFileObservationError("candidate-mismatch", `Project directory ${relativeDirectory || "."} cannot be scanned.`);
|
|
136
|
+
}
|
|
137
|
+
return names.sort();
|
|
138
|
+
}
|
|
139
|
+
function sameStat(left, right) {
|
|
140
|
+
return statFingerprint(left) === statFingerprint(right);
|
|
141
|
+
}
|
|
142
|
+
function safeRelativePath(value, label) {
|
|
143
|
+
const normalized = value.replace(/\\/g, "/");
|
|
144
|
+
const segments = normalized.split("/");
|
|
145
|
+
if (normalized.length === 0 ||
|
|
146
|
+
normalized.length > MAX_PATH_LENGTH ||
|
|
147
|
+
normalized.startsWith("/") ||
|
|
148
|
+
/^[A-Za-z]:/.test(normalized) ||
|
|
149
|
+
segments.some((segment) => segment.length === 0 ||
|
|
150
|
+
segment === "." ||
|
|
151
|
+
segment === ".." ||
|
|
152
|
+
[...segment].some((character) => {
|
|
153
|
+
const code = character.charCodeAt(0);
|
|
154
|
+
return code <= 0x1f || code === 0x7f;
|
|
155
|
+
}))) {
|
|
156
|
+
throw new ProjectFileObservationError("invalid-write-set", `${label} must be a safe project-relative path.`);
|
|
157
|
+
}
|
|
158
|
+
return segments.join("/");
|
|
159
|
+
}
|
|
160
|
+
function excludedFileName(name) {
|
|
161
|
+
const lower = name.toLowerCase();
|
|
162
|
+
return (lower === ".env" ||
|
|
163
|
+
lower.startsWith(".env.") ||
|
|
164
|
+
SECRET_FILE_SUFFIXES.some((suffix) => lower.endsWith(suffix)) ||
|
|
165
|
+
lower.startsWith("id_rsa") ||
|
|
166
|
+
lower.startsWith("id_ed25519"));
|
|
167
|
+
}
|
|
168
|
+
export function isExcludedProjectPath(repositoryPath) {
|
|
169
|
+
let normalized;
|
|
170
|
+
try {
|
|
171
|
+
normalized = safeRelativePath(repositoryPath, "project path");
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
const segments = normalized.split("/");
|
|
177
|
+
return (segments.some((segment) => EXCLUDED_DIRECTORY_NAMES.has(segment.toLowerCase())) || excludedFileName(segments.at(-1) ?? ""));
|
|
178
|
+
}
|
|
179
|
+
function normalizeWriteSet(paths) {
|
|
180
|
+
const exactPaths = [];
|
|
181
|
+
const directoryPrefixes = [];
|
|
182
|
+
if (paths.length > MAX_AFFECTED_PATHS) {
|
|
183
|
+
throw new ProjectFileObservationError("observation-limit-exceeded", `Run write set exceeds the ${MAX_AFFECTED_PATHS}-path limit.`);
|
|
184
|
+
}
|
|
185
|
+
for (const entry of paths) {
|
|
186
|
+
if (typeof entry !== "string") {
|
|
187
|
+
throw new ProjectFileObservationError("invalid-write-set", "Run write-set entries must be strings.");
|
|
188
|
+
}
|
|
189
|
+
const isDirectory = /[\\/]$/.test(entry);
|
|
190
|
+
const repositoryPath = safeRelativePath(isDirectory ? entry.slice(0, -1) : entry, "Run write-set path");
|
|
191
|
+
if (isExcludedProjectPath(repositoryPath)) {
|
|
192
|
+
throw new ProjectFileObservationError("invalid-write-set", `Run write set includes excluded project path ${repositoryPath}.`);
|
|
193
|
+
}
|
|
194
|
+
(isDirectory ? directoryPrefixes : exactPaths).push(repositoryPath);
|
|
195
|
+
}
|
|
196
|
+
if (new Set([...exactPaths, ...directoryPrefixes].map((value) => process.platform === "win32" ? value.toLowerCase() : value)).size !== exactPaths.length + directoryPrefixes.length) {
|
|
197
|
+
throw new ProjectFileObservationError("invalid-write-set", "Run write-set paths must be unique after platform path normalization.");
|
|
198
|
+
}
|
|
199
|
+
const normalize = (values) => [...values].sort(compareProjectPaths);
|
|
200
|
+
return {
|
|
201
|
+
exactPaths: normalize(exactPaths),
|
|
202
|
+
directoryPrefixes: normalize(directoryPrefixes),
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
function pathIsAllowed(repositoryPath, writeSet) {
|
|
206
|
+
const normalize = (value) => process.platform === "win32" ? value.toLowerCase() : value;
|
|
207
|
+
const candidate = normalize(repositoryPath);
|
|
208
|
+
return (writeSet.exactPaths.some((entry) => normalize(entry) === candidate) ||
|
|
209
|
+
writeSet.directoryPrefixes.some((entry) => {
|
|
210
|
+
const prefix = normalize(entry);
|
|
211
|
+
return candidate === prefix || candidate.startsWith(`${prefix}/`);
|
|
212
|
+
}));
|
|
213
|
+
}
|
|
214
|
+
function writeSetTouchesExcludedPath(repositoryPath, writeSet) {
|
|
215
|
+
const normalize = (value) => process.platform === "win32" ? value.toLowerCase() : value;
|
|
216
|
+
const excluded = normalize(repositoryPath);
|
|
217
|
+
return (pathIsAllowed(repositoryPath, writeSet) ||
|
|
218
|
+
writeSet.exactPaths.some((entry) => normalize(entry).startsWith(`${excluded}/`)) ||
|
|
219
|
+
writeSet.directoryPrefixes.some((entry) => {
|
|
220
|
+
const prefix = normalize(entry);
|
|
221
|
+
return (prefix === excluded ||
|
|
222
|
+
prefix.startsWith(`${excluded}/`) ||
|
|
223
|
+
excluded.startsWith(`${prefix}/`));
|
|
224
|
+
}));
|
|
225
|
+
}
|
|
226
|
+
function assertNoExcludedWriteSetOverlap(excludedPaths, writeSet) {
|
|
227
|
+
const overlap = excludedPaths.find((repositoryPath) => writeSetTouchesExcludedPath(repositoryPath, writeSet));
|
|
228
|
+
if (overlap) {
|
|
229
|
+
throw new ProjectFileObservationError("invalid-write-set", `Run write set overlaps excluded project path ${overlap}.`);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
function ensureNoGitMetadata(root) {
|
|
233
|
+
if (!hasGitMetadataAtProjectRoot(root))
|
|
234
|
+
return;
|
|
235
|
+
throw new ProjectFileObservationError("candidate-mismatch", "Project gained Git metadata after its non-Git Run baseline was captured.");
|
|
236
|
+
}
|
|
237
|
+
export function hasGitMetadataAtProjectRoot(rootPath) {
|
|
238
|
+
const gitPath = path.join(rootPath, ".git");
|
|
239
|
+
try {
|
|
240
|
+
fs.lstatSync(gitPath);
|
|
241
|
+
return true;
|
|
242
|
+
}
|
|
243
|
+
catch (error) {
|
|
244
|
+
if (error.code === "ENOENT")
|
|
245
|
+
return false;
|
|
246
|
+
throw new ProjectFileObservationError("invalid-root", "Cannot determine whether the project root contains Git metadata.");
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function resolveProjectRoot(rootPath) {
|
|
250
|
+
let rootStat;
|
|
251
|
+
try {
|
|
252
|
+
rootStat = fs.lstatSync(rootPath);
|
|
253
|
+
}
|
|
254
|
+
catch {
|
|
255
|
+
throw new ProjectFileObservationError("invalid-root", "Project root cannot be inspected.");
|
|
256
|
+
}
|
|
257
|
+
if (!rootStat.isDirectory() || rootStat.isSymbolicLink()) {
|
|
258
|
+
throw new ProjectFileObservationError("invalid-root", "Non-Git project root must be a real directory, not a symlink.");
|
|
259
|
+
}
|
|
260
|
+
let root;
|
|
261
|
+
try {
|
|
262
|
+
root = fs.realpathSync(rootPath);
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
throw new ProjectFileObservationError("invalid-root", "Project root cannot be resolved.");
|
|
266
|
+
}
|
|
267
|
+
if (!samePath(rootPath, root)) {
|
|
268
|
+
throw new ProjectFileObservationError("invalid-root", "Project root must not resolve through a symlink.");
|
|
269
|
+
}
|
|
270
|
+
ensureNoGitMetadata(root);
|
|
271
|
+
return {
|
|
272
|
+
root,
|
|
273
|
+
identity: sha256(process.platform === "win32" ? root.toLowerCase() : root),
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
function assertNoSymlinkSegments(root, repositoryPath) {
|
|
277
|
+
let current = root;
|
|
278
|
+
const segments = repositoryPath.split("/");
|
|
279
|
+
for (const [index, segment] of segments.entries()) {
|
|
280
|
+
current = path.join(current, segment);
|
|
281
|
+
let stat;
|
|
282
|
+
try {
|
|
283
|
+
stat = fs.lstatSync(current);
|
|
284
|
+
}
|
|
285
|
+
catch {
|
|
286
|
+
throw new ProjectFileObservationError("candidate-mismatch", `Project path ${repositoryPath} changed or disappeared during observation.`);
|
|
287
|
+
}
|
|
288
|
+
if (stat.isSymbolicLink()) {
|
|
289
|
+
throw new ProjectFileObservationError("unsafe-path", `Project path ${repositoryPath} crosses a symbolic link.`);
|
|
290
|
+
}
|
|
291
|
+
if (index < segments.length - 1 && !stat.isDirectory()) {
|
|
292
|
+
throw new ProjectFileObservationError("unsafe-path", `Project path ${repositoryPath} crosses a non-directory.`);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
let realPath;
|
|
296
|
+
try {
|
|
297
|
+
realPath = fs.realpathSync(current);
|
|
298
|
+
}
|
|
299
|
+
catch {
|
|
300
|
+
throw new ProjectFileObservationError("candidate-mismatch", `Project path ${repositoryPath} changed during observation.`);
|
|
301
|
+
}
|
|
302
|
+
if (!isWithinRoot(root, realPath)) {
|
|
303
|
+
throw new ProjectFileObservationError("unsafe-path", `Project path ${repositoryPath} escapes the project root.`);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
function readRegularFile(root, repositoryPath, expectedStat, totalBytes) {
|
|
307
|
+
const absolutePath = path.join(root, ...repositoryPath.split("/"));
|
|
308
|
+
assertNoSymlinkSegments(root, repositoryPath);
|
|
309
|
+
const before = fs.lstatSync(absolutePath);
|
|
310
|
+
if (!before.isFile() || before.isSymbolicLink()) {
|
|
311
|
+
throw new ProjectFileObservationError("unsafe-path", `Project path ${repositoryPath} is not a regular file.`);
|
|
312
|
+
}
|
|
313
|
+
if (!sameStat(expectedStat, before)) {
|
|
314
|
+
throw new ProjectFileObservationError("candidate-mismatch", `Project file ${repositoryPath} changed during traversal.`);
|
|
315
|
+
}
|
|
316
|
+
if (before.size > PROJECT_FILE_SNAPSHOT_MAX_FILE_BYTES) {
|
|
317
|
+
throw new ProjectFileObservationError("observation-limit-exceeded", `Project file ${repositoryPath} exceeds the ${PROJECT_FILE_SNAPSHOT_MAX_FILE_BYTES}-byte limit.`);
|
|
318
|
+
}
|
|
319
|
+
if (totalBytes.value + before.size > PROJECT_FILE_SNAPSHOT_MAX_TOTAL_BYTES) {
|
|
320
|
+
throw new ProjectFileObservationError("observation-limit-exceeded", `Project snapshot exceeds the ${PROJECT_FILE_SNAPSHOT_MAX_TOTAL_BYTES}-byte total limit.`);
|
|
321
|
+
}
|
|
322
|
+
const flags = fs.constants.O_RDONLY | (fs.constants.O_NOFOLLOW ?? 0);
|
|
323
|
+
let fd;
|
|
324
|
+
try {
|
|
325
|
+
fd = fs.openSync(absolutePath, flags);
|
|
326
|
+
}
|
|
327
|
+
catch {
|
|
328
|
+
throw new ProjectFileObservationError("candidate-mismatch", `Project file ${repositoryPath} cannot be opened safely.`);
|
|
329
|
+
}
|
|
330
|
+
let bytes;
|
|
331
|
+
try {
|
|
332
|
+
const descriptorBefore = fs.fstatSync(fd);
|
|
333
|
+
if (!descriptorBefore.isFile() ||
|
|
334
|
+
descriptorBefore.isSymbolicLink() ||
|
|
335
|
+
!sameStat(before, descriptorBefore)) {
|
|
336
|
+
throw new ProjectFileObservationError("candidate-mismatch", `Project file ${repositoryPath} changed before it could be read.`);
|
|
337
|
+
}
|
|
338
|
+
const first = fs.readFileSync(fd);
|
|
339
|
+
const descriptorAfterFirst = fs.fstatSync(fd);
|
|
340
|
+
const second = fs.readFileSync(absolutePath);
|
|
341
|
+
const descriptorAfterSecond = fs.fstatSync(fd);
|
|
342
|
+
if (!sameStat(descriptorBefore, descriptorAfterFirst) ||
|
|
343
|
+
!sameStat(descriptorBefore, descriptorAfterSecond) ||
|
|
344
|
+
!first.equals(second)) {
|
|
345
|
+
throw new ProjectFileObservationError("candidate-mismatch", `Project file ${repositoryPath} changed while it was read.`);
|
|
346
|
+
}
|
|
347
|
+
bytes = first;
|
|
348
|
+
}
|
|
349
|
+
finally {
|
|
350
|
+
fs.closeSync(fd);
|
|
351
|
+
}
|
|
352
|
+
assertNoSymlinkSegments(root, repositoryPath);
|
|
353
|
+
const after = fs.lstatSync(absolutePath);
|
|
354
|
+
if (!sameStat(before, after) || bytes.byteLength !== after.size) {
|
|
355
|
+
throw new ProjectFileObservationError("candidate-mismatch", `Project file ${repositoryPath} changed after it was read.`);
|
|
356
|
+
}
|
|
357
|
+
totalBytes.value += bytes.byteLength;
|
|
358
|
+
return {
|
|
359
|
+
path: repositoryPath,
|
|
360
|
+
sizeBytes: bytes.byteLength,
|
|
361
|
+
sha256: sha256(bytes),
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
function scanProjectOnce(rootInput) {
|
|
365
|
+
const { root, identity } = resolveProjectRoot(rootInput);
|
|
366
|
+
const files = [];
|
|
367
|
+
const directoryStates = [];
|
|
368
|
+
const excludedPaths = [];
|
|
369
|
+
const seenPaths = new Set();
|
|
370
|
+
const totalBytes = { value: 0 };
|
|
371
|
+
let totalEntries = 0;
|
|
372
|
+
let scannedDirectories = 0;
|
|
373
|
+
const visit = (absoluteDirectory, relativeDirectory) => {
|
|
374
|
+
if (relativeDirectory) {
|
|
375
|
+
scannedDirectories += 1;
|
|
376
|
+
if (scannedDirectories > PROJECT_FILE_SNAPSHOT_MAX_DIRECTORIES) {
|
|
377
|
+
throw new ProjectFileObservationError("observation-limit-exceeded", `Project snapshot exceeds the ${PROJECT_FILE_SNAPSHOT_MAX_DIRECTORIES}-directory limit.`);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
const before = fs.lstatSync(absoluteDirectory);
|
|
381
|
+
if (!before.isDirectory() || before.isSymbolicLink()) {
|
|
382
|
+
throw new ProjectFileObservationError("unsafe-path", `Project directory ${relativeDirectory || "."} is not a real directory.`);
|
|
383
|
+
}
|
|
384
|
+
const realDirectory = fs.realpathSync(absoluteDirectory);
|
|
385
|
+
if (!isWithinRoot(root, realDirectory)) {
|
|
386
|
+
throw new ProjectFileObservationError("unsafe-path", `Project directory ${relativeDirectory || "."} escapes the project root.`);
|
|
387
|
+
}
|
|
388
|
+
const names = readDirectoryNames(absoluteDirectory, relativeDirectory);
|
|
389
|
+
const stateIndex = directoryStates.length;
|
|
390
|
+
directoryStates.push(`${relativeDirectory}\0${statFingerprint(before)}\0${names.join("\0")}`);
|
|
391
|
+
for (const name of names) {
|
|
392
|
+
totalEntries += 1;
|
|
393
|
+
if (totalEntries > PROJECT_FILE_SNAPSHOT_MAX_ENTRIES) {
|
|
394
|
+
throw new ProjectFileObservationError("observation-limit-exceeded", `Project snapshot exceeds the ${PROJECT_FILE_SNAPSHOT_MAX_ENTRIES}-entry limit.`);
|
|
395
|
+
}
|
|
396
|
+
if (name.length === 0 ||
|
|
397
|
+
name === "." ||
|
|
398
|
+
name === ".." ||
|
|
399
|
+
name.includes("/") ||
|
|
400
|
+
name.includes("\\") ||
|
|
401
|
+
[...name].some((character) => {
|
|
402
|
+
const code = character.charCodeAt(0);
|
|
403
|
+
return code <= 0x1f || code === 0x7f;
|
|
404
|
+
})) {
|
|
405
|
+
throw new ProjectFileObservationError("unsafe-path", "Project contains a path name that cannot be represented safely.");
|
|
406
|
+
}
|
|
407
|
+
const repositoryPath = safeRelativePath(relativeDirectory ? `${relativeDirectory}/${name}` : name, "scanned project path");
|
|
408
|
+
const pathKey = process.platform === "win32"
|
|
409
|
+
? repositoryPath.toLowerCase()
|
|
410
|
+
: repositoryPath;
|
|
411
|
+
if (seenPaths.has(pathKey)) {
|
|
412
|
+
throw new ProjectFileObservationError("unsafe-path", `Project path ${repositoryPath} collides after platform path normalization.`);
|
|
413
|
+
}
|
|
414
|
+
seenPaths.add(pathKey);
|
|
415
|
+
const absolutePath = path.join(absoluteDirectory, name);
|
|
416
|
+
let entryStat;
|
|
417
|
+
try {
|
|
418
|
+
entryStat = fs.lstatSync(absolutePath);
|
|
419
|
+
}
|
|
420
|
+
catch {
|
|
421
|
+
throw new ProjectFileObservationError("candidate-mismatch", `Project path ${repositoryPath} changed during scanning.`);
|
|
422
|
+
}
|
|
423
|
+
if (entryStat.isSymbolicLink()) {
|
|
424
|
+
throw new ProjectFileObservationError("unsafe-path", `Project path ${repositoryPath} is a symbolic link.`);
|
|
425
|
+
}
|
|
426
|
+
if (entryStat.isDirectory()) {
|
|
427
|
+
if (EXCLUDED_DIRECTORY_NAMES.has(name.toLowerCase())) {
|
|
428
|
+
excludedPaths.push(repositoryPath);
|
|
429
|
+
continue;
|
|
430
|
+
}
|
|
431
|
+
visit(absolutePath, repositoryPath);
|
|
432
|
+
continue;
|
|
433
|
+
}
|
|
434
|
+
if (!entryStat.isFile()) {
|
|
435
|
+
throw new ProjectFileObservationError("unsafe-path", `Project path ${repositoryPath} is not a regular file or directory.`);
|
|
436
|
+
}
|
|
437
|
+
if (excludedFileName(name)) {
|
|
438
|
+
excludedPaths.push(repositoryPath);
|
|
439
|
+
continue;
|
|
440
|
+
}
|
|
441
|
+
if (files.length >= PROJECT_FILE_SNAPSHOT_MAX_FILES) {
|
|
442
|
+
throw new ProjectFileObservationError("observation-limit-exceeded", `Project snapshot exceeds the ${PROJECT_FILE_SNAPSHOT_MAX_FILES}-file limit.`);
|
|
443
|
+
}
|
|
444
|
+
files.push(readRegularFile(root, repositoryPath, entryStat, totalBytes));
|
|
445
|
+
}
|
|
446
|
+
const after = fs.lstatSync(absoluteDirectory);
|
|
447
|
+
const namesAfter = readDirectoryNames(absoluteDirectory, relativeDirectory);
|
|
448
|
+
if (!sameStat(before, after) || names.join("\0") !== namesAfter.join("\0")) {
|
|
449
|
+
throw new ProjectFileObservationError("candidate-mismatch", `Project directory ${relativeDirectory || "."} changed during scanning.`);
|
|
450
|
+
}
|
|
451
|
+
directoryStates[stateIndex] =
|
|
452
|
+
`${relativeDirectory}\0${statFingerprint(after)}\0${namesAfter.join("\0")}`;
|
|
453
|
+
};
|
|
454
|
+
visit(root, "");
|
|
455
|
+
files.sort((a, b) => compareProjectPaths(a.path, b.path));
|
|
456
|
+
excludedPaths.sort(compareProjectPaths);
|
|
457
|
+
return { root, rootIdentitySha256: identity, files, directoryStates, excludedPaths };
|
|
458
|
+
}
|
|
459
|
+
function stableProjectScan(root) {
|
|
460
|
+
const first = scanProjectOnce(root);
|
|
461
|
+
const second = scanProjectOnce(root);
|
|
462
|
+
const content = (scan) => ({
|
|
463
|
+
rootIdentitySha256: scan.rootIdentitySha256,
|
|
464
|
+
files: scan.files,
|
|
465
|
+
directoryStates: scan.directoryStates,
|
|
466
|
+
excludedPaths: scan.excludedPaths,
|
|
467
|
+
});
|
|
468
|
+
if (stableFingerprint(content(first)) !== stableFingerprint(content(second))) {
|
|
469
|
+
throw new ProjectFileObservationError("candidate-mismatch", "Project files changed between bounded snapshot passes; retry after the tree is stable.");
|
|
470
|
+
}
|
|
471
|
+
return second;
|
|
472
|
+
}
|
|
473
|
+
function baselineBody(input) {
|
|
474
|
+
return {
|
|
475
|
+
schemaVersion: 1,
|
|
476
|
+
source: PROJECT_FILE_BASELINE_SOURCE,
|
|
477
|
+
policy: PROJECT_FILE_SNAPSHOT_POLICY,
|
|
478
|
+
rootIdentitySha256: input.rootIdentitySha256,
|
|
479
|
+
files: input.files.map((file) => ({ ...file })),
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
export function verifyProjectFileBaseline(baseline) {
|
|
483
|
+
try {
|
|
484
|
+
if (baseline.schemaVersion !== 1 ||
|
|
485
|
+
baseline.source !== PROJECT_FILE_BASELINE_SOURCE ||
|
|
486
|
+
baseline.policy !== PROJECT_FILE_SNAPSHOT_POLICY ||
|
|
487
|
+
!/^[a-f0-9]{64}$/.test(baseline.rootIdentitySha256) ||
|
|
488
|
+
!Array.isArray(baseline.files) ||
|
|
489
|
+
baseline.files.length > PROJECT_FILE_SNAPSHOT_MAX_FILES) {
|
|
490
|
+
return false;
|
|
491
|
+
}
|
|
492
|
+
const seen = new Set();
|
|
493
|
+
let totalBytes = 0;
|
|
494
|
+
let previous = "";
|
|
495
|
+
for (const entry of baseline.files) {
|
|
496
|
+
const repositoryPath = safeRelativePath(entry.path, "baseline path");
|
|
497
|
+
const key = process.platform === "win32"
|
|
498
|
+
? repositoryPath.toLowerCase()
|
|
499
|
+
: repositoryPath;
|
|
500
|
+
if (isExcludedProjectPath(repositoryPath) ||
|
|
501
|
+
seen.has(key) ||
|
|
502
|
+
(previous && compareProjectPaths(previous, repositoryPath) > 0) ||
|
|
503
|
+
!Number.isSafeInteger(entry.sizeBytes) ||
|
|
504
|
+
entry.sizeBytes < 0 ||
|
|
505
|
+
entry.sizeBytes > PROJECT_FILE_SNAPSHOT_MAX_FILE_BYTES ||
|
|
506
|
+
!/^[a-f0-9]{64}$/.test(entry.sha256)) {
|
|
507
|
+
return false;
|
|
508
|
+
}
|
|
509
|
+
seen.add(key);
|
|
510
|
+
previous = repositoryPath;
|
|
511
|
+
totalBytes += entry.sizeBytes;
|
|
512
|
+
if (totalBytes > PROJECT_FILE_SNAPSHOT_MAX_TOTAL_BYTES)
|
|
513
|
+
return false;
|
|
514
|
+
}
|
|
515
|
+
return stableFingerprint(baselineBody(baseline)) === baseline.fingerprint;
|
|
516
|
+
}
|
|
517
|
+
catch {
|
|
518
|
+
return false;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
/** Record a bounded, secret-safe regular-file baseline for a non-Git Run. */
|
|
522
|
+
export function captureProjectFileBaseline(root, writeSetSnapshot) {
|
|
523
|
+
const writeSet = normalizeWriteSet(writeSetSnapshot);
|
|
524
|
+
const scan = stableProjectScan(root);
|
|
525
|
+
assertNoExcludedWriteSetOverlap(scan.excludedPaths, writeSet);
|
|
526
|
+
const body = baselineBody(scan);
|
|
527
|
+
return { ...body, fingerprint: stableFingerprint(body) };
|
|
528
|
+
}
|
|
529
|
+
/** Re-scan a non-Git project and compare every included file with the Run baseline. */
|
|
530
|
+
export function observeProjectFileCandidate(input) {
|
|
531
|
+
const { root, baseline, writeSetSnapshot } = input;
|
|
532
|
+
if (!verifyProjectFileBaseline(baseline)) {
|
|
533
|
+
throw new ProjectFileObservationError("candidate-mismatch", "Non-Git Run baseline is missing or has an invalid fingerprint.");
|
|
534
|
+
}
|
|
535
|
+
const writeSet = normalizeWriteSet(writeSetSnapshot);
|
|
536
|
+
const scan = stableProjectScan(root);
|
|
537
|
+
if (scan.rootIdentitySha256 !== baseline.rootIdentitySha256) {
|
|
538
|
+
throw new ProjectFileObservationError("candidate-mismatch", "Project root identity changed after the Run baseline was captured.");
|
|
539
|
+
}
|
|
540
|
+
assertNoExcludedWriteSetOverlap(scan.excludedPaths, writeSet);
|
|
541
|
+
const baselineFiles = new Map(baseline.files.map((file) => [file.path, file]));
|
|
542
|
+
const currentFilesByPath = new Map(scan.files.map((file) => [file.path, file]));
|
|
543
|
+
const allPaths = [...new Set([...baselineFiles.keys(), ...currentFilesByPath.keys()])].sort(compareProjectPaths);
|
|
544
|
+
const affectedPaths = allPaths.filter((repositoryPath) => {
|
|
545
|
+
const before = baselineFiles.get(repositoryPath);
|
|
546
|
+
const after = currentFilesByPath.get(repositoryPath);
|
|
547
|
+
return (before?.sizeBytes !== after?.sizeBytes ||
|
|
548
|
+
before?.sha256 !== after?.sha256);
|
|
549
|
+
});
|
|
550
|
+
if (affectedPaths.length > MAX_AFFECTED_PATHS) {
|
|
551
|
+
throw new ProjectFileObservationError("observation-limit-exceeded", `Affected path count exceeded the ${MAX_AFFECTED_PATHS}-path limit.`);
|
|
552
|
+
}
|
|
553
|
+
const inScopePaths = affectedPaths.filter((repositoryPath) => pathIsAllowed(repositoryPath, writeSet));
|
|
554
|
+
const outOfScopePaths = affectedPaths.filter((repositoryPath) => !pathIsAllowed(repositoryPath, writeSet));
|
|
555
|
+
const observationPaths = [
|
|
556
|
+
...new Set([...inScopePaths, ...writeSet.exactPaths]),
|
|
557
|
+
].sort(compareProjectPaths);
|
|
558
|
+
const candidateFiles = observationPaths.map((repositoryPath) => {
|
|
559
|
+
const current = currentFilesByPath.get(repositoryPath);
|
|
560
|
+
return current
|
|
561
|
+
? {
|
|
562
|
+
path: repositoryPath,
|
|
563
|
+
kind: "regular-file",
|
|
564
|
+
sizeBytes: current.sizeBytes,
|
|
565
|
+
sha256: current.sha256,
|
|
566
|
+
}
|
|
567
|
+
: {
|
|
568
|
+
path: repositoryPath,
|
|
569
|
+
kind: "missing",
|
|
570
|
+
sizeBytes: 0,
|
|
571
|
+
sha256: null,
|
|
572
|
+
};
|
|
573
|
+
});
|
|
574
|
+
const scopeStatus = outOfScopePaths.length
|
|
575
|
+
? "out-of-scope"
|
|
576
|
+
: "within-write-set";
|
|
577
|
+
const fingerprintInput = {
|
|
578
|
+
rootIdentitySha256: scan.rootIdentitySha256,
|
|
579
|
+
baselineFingerprint: baseline.fingerprint,
|
|
580
|
+
allowedWriteSet: writeSet,
|
|
581
|
+
affectedPaths,
|
|
582
|
+
inScopePaths,
|
|
583
|
+
outOfScopePaths,
|
|
584
|
+
currentFiles: candidateFiles,
|
|
585
|
+
scopeStatus,
|
|
586
|
+
};
|
|
587
|
+
return {
|
|
588
|
+
schemaVersion: 1,
|
|
589
|
+
source: PROJECT_FILE_CANDIDATE_OBSERVER_VERSION,
|
|
590
|
+
repositoryRoot: scan.root,
|
|
591
|
+
observedAt: new Date().toISOString(),
|
|
592
|
+
...fingerprintInput,
|
|
593
|
+
fingerprint: stableFingerprint(fingerprintInput),
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
export function verifyProjectFileCandidateObservation(observation) {
|
|
597
|
+
try {
|
|
598
|
+
const { rootIdentitySha256, baselineFingerprint, allowedWriteSet, affectedPaths, inScopePaths, outOfScopePaths, currentFiles, scopeStatus, } = observation;
|
|
599
|
+
return (observation.schemaVersion === 1 &&
|
|
600
|
+
observation.source === PROJECT_FILE_CANDIDATE_OBSERVER_VERSION &&
|
|
601
|
+
/^[a-f0-9]{64}$/.test(rootIdentitySha256) &&
|
|
602
|
+
/^[a-f0-9]{64}$/.test(baselineFingerprint) &&
|
|
603
|
+
stableFingerprint({
|
|
604
|
+
rootIdentitySha256,
|
|
605
|
+
baselineFingerprint,
|
|
606
|
+
allowedWriteSet,
|
|
607
|
+
affectedPaths,
|
|
608
|
+
inScopePaths,
|
|
609
|
+
outOfScopePaths,
|
|
610
|
+
currentFiles,
|
|
611
|
+
scopeStatus,
|
|
612
|
+
}) === observation.fingerprint);
|
|
613
|
+
}
|
|
614
|
+
catch {
|
|
615
|
+
return false;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
//# sourceMappingURL=project-file-observer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-file-observer.js","sourceRoot":"","sources":["../../../src/core/task/project-file-observer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAY7B,MAAM,CAAC,MAAM,4BAA4B,GACvC,kCAA2C,CAAC;AAC9C,MAAM,CAAC,MAAM,4BAA4B,GAAG,0BAAmC,CAAC;AAChF,MAAM,CAAC,MAAM,uCAAuC,GAClD,kBAA2B,CAAC;AAC9B,MAAM,CAAC,MAAM,gCAAgC,GAC3C,uCAAuC,CAAC;AAE1C,MAAM,CAAC,MAAM,+BAA+B,GAAG,KAAK,CAAC;AACrD,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AACpE,MAAM,CAAC,MAAM,qCAAqC,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACtE,MAAM,CAAC,MAAM,2CAA2C,GAAG,KAAK,CAAC;AACjE,MAAM,CAAC,MAAM,qCAAqC,GAAG,KAAK,CAAC;AAC3D,MAAM,CAAC,MAAM,iCAAiC,GAAG,KAAK,CAAC;AACvD,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACjC,MAAM,eAA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