clearotron 0.5.1 → 0.6.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +7 -7
- package/INSTALL.md +10 -10
- package/QUICKSTART.md +6 -6
- package/README.md +2 -2
- package/THIRD-PARTY-NOTICES.md +4 -4
- package/bin/README.md +2 -2
- package/bin/clearotron.mjs +1 -1
- package/bin/connect.mjs +1 -1
- package/bin/disconnect.mjs +1 -1
- package/bin/example.mjs +2 -2
- package/bin/grant.mjs +1 -1
- package/bin/onboard.mjs +78 -23
- package/bin/start.mjs +49 -18
- package/bin/update.mjs +13 -3
- package/build-info.json +2 -2
- package/docs/DELIVERY.md +1 -1
- package/docs/PORTAL.md +1 -1
- package/docs/RELEASES.md +1 -1
- package/docs/architecture/02-architecture.md +10 -2
- package/docs/architecture/03-run-lifecycle.md +6 -2
- package/docs/architecture/04-configuration-reference.md +3 -3
- package/docs/architecture/05-config-governance.md +5 -4
- package/docs/architecture/08-development-guide.md +4 -4
- package/docs/architecture/09-security-and-data.md +1 -1
- package/{driver/skills/clearance-search/SKILL.md → docs/architecture/retired-manuals/clearance-search-spine.md} +17 -30
- package/{driver/skills/clearance-search/templates/email/generic.md → docs/architecture/retired-manuals/email-generic.md} +1 -1
- package/{driver/skills/clearance-search → docs/architecture/retired-manuals}/template-formatting.md +3 -4
- package/docs/configuration.md +1 -1
- package/docs/decisions/0002-no-dark-functionality.md +5 -0
- package/driver/CHANGELOG.md +60 -0
- package/driver/README.md +11 -1
- package/driver/accepted-order.mjs +13 -5
- package/driver/attempt-rows.mjs +64 -0
- package/driver/attributed-span.mjs +1 -1
- package/driver/authority-trees.mjs +1 -1
- package/driver/best-draft.mjs +3 -3
- package/driver/blind-frame-record.mjs +2 -2
- package/driver/cancel.mjs +3 -2
- package/driver/carry-through.mjs +2 -2
- package/driver/citation-census.json +3 -3
- package/driver/clearance-variants-record.mjs +4 -10
- package/driver/common-law-coverage-status.mjs +3 -3
- package/driver/common-law-receipts.mjs +2 -2
- package/driver/compare.mjs +1 -1
- package/driver/config-inventory.mjs +6 -79
- package/driver/consumption-ledger.mjs +2 -1
- package/driver/contract-dictation-registry.mjs +5 -0
- package/driver/contract-e3-backlog.mjs +45 -66
- package/driver/contract-e3-baseline.json +16 -16
- package/driver/contract-vocabulary.mjs +8 -6
- package/driver/corrections-feedforward.mjs +3 -1
- package/driver/coverage-form-io.mjs +7 -8
- package/driver/coverage-tool.mjs +1 -1
- package/driver/declination-tool.mjs +2 -2
- package/driver/degraded-parts.mjs +9 -9
- package/driver/demo-container.mjs +5 -4
- package/driver/deploy-live-run-guard.mjs +19 -7
- package/driver/derived-state.mjs +2 -2
- package/driver/dev-portal.mjs +2 -1
- package/driver/dispatch-record.mjs +1 -1
- package/driver/disposition-tool.mjs +2 -1
- package/driver/doubt-closure-tool.mjs +2 -2
- package/driver/driver.config.mjs +35 -724
- package/driver/e2e-rounds.mjs +3 -4
- package/driver/engine/CONTRACT.md +3 -0
- package/driver/engine/README.md +2 -0
- package/driver/engine/anthropic-agent.mjs +8 -37
- package/driver/engine/auth.mjs +74 -0
- package/driver/engine/child-record.mjs +1 -1
- package/driver/engine/deny-authority-write.mjs +2 -2
- package/driver/engine/jx-turn.mjs +10 -2
- package/driver/engine/mcp/README.md +1 -1
- package/driver/engine/mcp/band-server.mjs +6 -6
- package/driver/engine/mcp/codex-config.mjs +1 -1
- package/driver/engine/mcp/declination-server.mjs +2 -3
- package/driver/engine/mcp/dispositions-server.mjs +3 -3
- package/driver/engine/mcp/gather-config.mjs +24 -19
- package/driver/engine/mcp/grid-provenance.mjs +1 -1
- package/driver/engine/mcp/held-answers.mjs +5 -5
- package/driver/engine/mcp/perplexity-server.mjs +16 -7
- package/driver/engine/mcp/recording-server.mjs +7 -6
- package/driver/engine/mcp/register-server.mjs +29 -0
- package/driver/engine/mcp/stdio-server.mjs +5 -5
- package/driver/engine/mcp/supplemental.mjs +9 -9
- package/driver/engine/openai-agent.mjs +5 -2
- package/driver/engine/registry.mjs +103 -0
- package/driver/engine/run-choices.mjs +162 -0
- package/driver/engine/stamps.mjs +35 -0
- package/driver/enqueue-schema.mjs +4 -4
- package/driver/envelope-settle.mjs +3 -2
- package/driver/feedback-issues.mjs +1 -1
- package/driver/feedback-mint.mjs +3 -2
- package/driver/feedback-store.mjs +3 -2
- package/driver/findings-model.mjs +1 -1
- package/driver/flag-snapshot.mjs +5 -4
- package/driver/floor-duty.mjs +3 -3
- package/driver/foreign-record-links.mjs +1 -1
- package/driver/frame-diff-record.mjs +2 -8
- package/driver/framework.mjs +1 -1
- package/driver/gate-metrics.mjs +10 -11
- package/driver/gateway.mjs +220 -839
- package/driver/goods-evidence.mjs +10 -6
- package/driver/jx-lanes.mjs +3 -3
- package/driver/jx-units.mjs +31 -37
- package/driver/jx.mjs +44 -59
- package/driver/knockout-assess-record.mjs +3 -3
- package/driver/knockout-caveats.mjs +21 -0
- package/driver/knockout-correction-record.mjs +58 -28
- package/driver/knockout-frame-record.mjs +2 -2
- package/driver/knockout-register-read.mjs +38 -21
- package/driver/knockout-register-record.mjs +5 -6
- package/driver/knockout-review-record.mjs +12 -11
- package/driver/ladder/model-gauge.mjs +88 -0
- package/driver/ladder/next-rung.mjs +296 -0
- package/driver/ladder/rescue.mjs +146 -0
- package/driver/ladder/stage-tools.mjs +57 -0
- package/driver/ladder/turn-failure.mjs +166 -0
- package/driver/log.mjs +2 -2
- package/driver/matter-frame-record.mjs +4 -4
- package/driver/methodology-witness.mjs +2 -2
- package/driver/narrative-refutation-record.mjs +145 -42
- package/driver/one-build-per-run.mjs +62 -0
- package/driver/outbox-backoff.mjs +4 -4
- package/driver/owner-screen.mjs +0 -10
- package/driver/owner-use-check.mjs +2 -28
- package/driver/package.json +1 -1
- package/driver/partial-payload-baseline.json +1 -1
- package/driver/parts-not-completed.mjs +1 -1
- package/driver/pipeline-knockout.mjs +1015 -1001
- package/driver/pipeline.mjs +511 -9265
- package/driver/placement-decisions.mjs +2 -2
- package/driver/placement-form-io.mjs +7 -9
- package/driver/placement-union.mjs +0 -6
- package/driver/plan-stability.mjs +7 -10
- package/driver/portal-acks.mjs +3 -2
- package/driver/portal-confirmation.mjs +48 -0
- package/driver/portal-families.mjs +3 -2
- package/driver/portal-local-auth.mjs +1 -2
- package/driver/portal-routes/README.md +24 -0
- package/driver/portal-routes/admin.mjs +425 -0
- package/driver/portal-routes/compose.mjs +66 -0
- package/driver/portal-routes/config.mjs +118 -0
- package/driver/portal-routes/connect.mjs +283 -0
- package/driver/portal-routes/feedback.mjs +178 -0
- package/driver/portal-routes/me.mjs +165 -0
- package/driver/portal-routes/queue.mjs +64 -0
- package/driver/portal-routes/report.mjs +106 -0
- package/driver/portal-routes/run.mjs +508 -0
- package/driver/portal-routes/runs.mjs +127 -0
- package/driver/portal-routes/usage.mjs +82 -0
- package/driver/portal-runs.mjs +588 -0
- package/driver/portal-service.mjs +78 -2592
- package/driver/portal-static.mjs +3 -1
- package/driver/predelivery-lint.mjs +92 -9
- package/driver/production-pool-guard.mjs +1 -1
- package/driver/profiles.mjs +5 -4
- package/driver/progress.mjs +29 -24
- package/driver/publish/README.md +10 -5
- package/driver/publish/archive-tags.mjs +3 -2
- package/driver/publish/demo-marking.mjs +2 -2
- package/driver/publish/index.mjs +215 -140
- package/driver/publish/knockout.mjs +153 -107
- package/driver/publish/office-record-links.mjs +22 -0
- package/driver/publish/parse.mjs +20 -5
- package/driver/publish/pool-admin.mjs +9 -3
- package/driver/publish/render.mjs +11 -3
- package/driver/publish/report-dates.mjs +3 -4
- package/driver/publish/report-registry.mjs +7 -10
- package/driver/publish/seed-pool.mjs +3 -2
- package/driver/publish/shell.mjs +106 -0
- package/driver/publish/templates/report.css +3 -1
- package/driver/queue-order.mjs +4 -3
- package/driver/record-carry.mjs +0 -9
- package/driver/record-discard.mjs +1 -4
- package/driver/record-fold.mjs +3 -3
- package/driver/record-goods.mjs +5 -5
- package/driver/reference-score.mjs +2 -3
- package/driver/register-capabilities.mjs +0 -6
- package/driver/register-count.mjs +3 -2
- package/driver/register-digest-record.mjs +7 -7
- package/driver/register-fixture-marker.mjs +3 -3
- package/driver/register-plan.mjs +2 -2
- package/driver/register-records.mjs +2 -2
- package/driver/register-taint.mjs +3 -3
- package/driver/register-unit-record.mjs +48 -9
- package/driver/register-unreachable.mjs +4 -3
- package/driver/registry-fidelity.mjs +79 -34
- package/driver/repair-composers.mjs +14 -9
- package/driver/repair-digest.mjs +4 -6
- package/driver/repair-scope.mjs +3 -3
- package/driver/repair-targets.mjs +24 -9
- package/driver/repairs.mjs +44 -58
- package/driver/replay-archive.mjs +7 -7
- package/driver/report-card-record.mjs +3 -3
- package/driver/report-overview-record.mjs +4 -4
- package/driver/research-answers.mjs +38 -6
- package/driver/research-checks.mjs +4 -4
- package/driver/result-noun-fields.mjs +28 -11
- package/driver/review-addresses.mjs +163 -0
- package/driver/rule-shape.mjs +1 -1
- package/driver/run-delivered.mjs +340 -0
- package/driver/run-economics.mjs +8 -26
- package/driver/run-failed.mjs +545 -0
- package/driver/run-integrity.mjs +1 -1
- package/driver/run-outcome.mjs +314 -0
- package/driver/run-park.mjs +23 -0
- package/driver/run-quote.mjs +32 -0
- package/driver/run-record.mjs +352 -0
- package/driver/run-requirements.mjs +22 -0
- package/driver/run-shell.mjs +55 -0
- package/driver/runner.mjs +71 -33
- package/driver/saved-register-pages.mjs +4 -4
- package/driver/score-redaction.mjs +2 -2
- package/driver/search-policy.mjs +12 -13
- package/driver/settle-stamp.mjs +4 -3
- package/driver/skeptic-record.mjs +2 -2
- package/driver/skeptic-search.mjs +1 -1
- package/driver/skills/README.md +7 -7
- package/driver/skills/blind-frame/SKILL.md +1 -2
- package/driver/skills/case-law-citation/SKILL.md +9 -37
- package/driver/skills/case-law-citation/sources/courtlistener.md +1 -3
- package/driver/skills/case-law-citation/sources/eurlex.md +8 -11
- package/driver/skills/case-law-citation/sources/legaldatahunter.md +1 -1
- package/driver/skills/clearance-common-law/SKILL.md +45 -111
- package/driver/skills/clearance-common-law/perplexity-prompts.md +7 -79
- package/driver/skills/clearance-register/SKILL.md +15 -33
- package/driver/skills/clearance-register/digest.md +31 -92
- package/driver/skills/clearance-register/providers/clarivate.md +2 -2
- package/driver/skills/clearance-register/providers/corsearch.md +5 -5
- package/driver/skills/clearance-register/providers/euipo.md +1 -2
- package/driver/skills/clearance-register/providers/free-tier.md +0 -19
- package/driver/skills/clearance-register/providers/signa.md +6 -25
- package/driver/skills/clearance-register/providers/uspto-local.md +0 -24
- package/driver/skills/clearance-register/register-recipes.md +8 -15
- package/driver/skills/clearance-register/status-rules.md +6 -24
- package/driver/skills/clearance-register/unit.md +11 -20
- package/driver/skills/clearance-search/delivery-contract.md +24 -120
- package/driver/skills/clearance-search/field-doctrine-pharma.md +1 -5
- package/driver/skills/clearance-search/firm-wide-reasoning.md +24 -43
- package/driver/skills/clearance-search/phase2-execution.md +29 -77
- package/driver/skills/clearance-search/report-prose.md +3 -4
- package/driver/skills/clearance-search/risk-framework-demo.md +1 -1
- package/driver/skills/clearance-search/risk-framework-triage.manifest.json +3 -3
- package/driver/skills/clearance-search/risk-framework-triage.md +7 -9
- package/driver/skills/clearance-search/risk-framework.manifest.json +1 -1
- package/driver/skills/clearance-search/risk-framework.md +1 -1
- package/driver/skills/clearance-search/synthesis-rules.md +30 -107
- package/driver/skills/clearance-search/worked-examples.md +5 -5
- package/driver/skills/clearance-variants/SKILL.md +46 -45
- package/driver/skills/clearance-variants/transliteration-scripts.md +4 -4
- package/driver/skills/frame-diff/SKILL.md +1 -1
- package/driver/skills/knockout-assess/SKILL.md +6 -14
- package/driver/skills/knockout-frame/SKILL.md +1 -1
- package/driver/skills/matter-frame/SKILL.md +7 -12
- package/driver/skills/matter-frame/watchlist-reference.md +1 -4
- package/driver/skills/narrative-refutation/SKILL.md +20 -30
- package/driver/skills/placement-inquiry/SKILL.md +8 -18
- package/driver/skills-store-provenance.mjs +1 -1
- package/driver/stage-context.mjs +32 -35
- package/driver/stage-freshness.mjs +127 -11
- package/driver/stages-knockout.mjs +49 -22
- package/driver/stages.mjs +88 -283
- package/driver/status-snapshot.mjs +2 -1
- package/driver/steps/correction-cycle.mjs +311 -0
- package/driver/steps/corrections.mjs +644 -0
- package/driver/steps/delivery.mjs +1287 -0
- package/driver/steps/frame-comparison.mjs +922 -0
- package/driver/steps/intake.mjs +84 -0
- package/driver/steps/open-run.mjs +419 -0
- package/driver/steps/overview-and-cards.mjs +899 -0
- package/driver/steps/placement-and-digest.mjs +23 -0
- package/driver/steps/register-sweep.mjs +1563 -0
- package/driver/steps/skeptic-and-follow-up.mjs +831 -0
- package/driver/steps/synthesis.mjs +261 -0
- package/driver/steps/verdict-gate.mjs +968 -0
- package/driver/suite-census.json +403 -91
- package/driver/surface-exit-verdict.mjs +0 -8
- package/driver/synthesis-record.mjs +72 -6
- package/driver/terminal-clamp.mjs +10 -0
- package/driver/tokens.mjs +8 -62
- package/driver/tool-calls.mjs +2 -2
- package/driver/unit-state-verdict.mjs +1 -1
- package/driver/usage-ledger.mjs +2 -1
- package/driver/verify-knockout.mjs +20 -35
- package/driver/verify.mjs +47 -36
- package/driver/web-grid.mjs +3 -4
- package/driver/whatif-memo-run.mjs +2 -2
- package/driver/whatif-queue.mjs +4 -3
- package/driver/withheld-families.mjs +14 -15
- package/driver/worker-heartbeat.mjs +3 -2
- package/driver/write-up-form.mjs +0 -3
- package/mcp-server/CHANGELOG.md +4 -0
- package/mcp-server/http-server.mjs +1 -1
- package/mcp-server/lib/brief.mjs +22 -4
- package/mcp-server/lib/events.mjs +2 -2
- package/mcp-server/lib/evidence.mjs +3 -2
- package/mcp-server/lib/findings.mjs +2 -1
- package/mcp-server/lib/knockout.mjs +9 -10
- package/mcp-server/lib/ops.mjs +9 -9
- package/mcp-server/lib/runs.mjs +9 -10
- package/mcp-server/lib/trace.mjs +1 -1
- package/mcp-server/lib/whatif.mjs +2 -3
- package/mcp-server/package.json +1 -1
- package/mcp-server/server.mjs +5 -5
- package/package.json +2 -1
- package/portal-ui/dist/assets/{index-fPqAU0sx.js → index-D5rkCjDc.js} +26 -14
- package/portal-ui/dist/index.html +1 -1
- package/portal-ui/package.json +3 -3
- package/providers/README.md +1 -1
- package/providers/_shared/answer-memory.mjs +4 -5
- package/providers/_shared/execute-plan.mjs +48 -1
- package/providers/_shared/records-from-search.mjs +46 -0
- package/providers/clarivate/README.md +2 -2
- package/providers/clarivate/src/adapter.js +147 -0
- package/providers/clarivate/src/core.js +1 -14
- package/{driver/engine/mcp/clarivate-server.mjs → providers/clarivate/src/mount.js} +5 -10
- package/providers/corsearch/README.md +3 -3
- package/providers/corsearch/src/adapter.js +80 -0
- package/providers/corsearch/src/core.js +14 -11
- package/{driver/engine/mcp/corsearch-server.mjs → providers/corsearch/src/mount.js} +5 -10
- package/providers/euipo/README.md +2 -2
- package/providers/euipo/src/adapter.js +85 -0
- package/providers/euipo/src/core.js +1 -1
- package/providers/euipo/src/euipo-client.js +1 -2
- package/{driver/engine/mcp/euipo-server.mjs → providers/euipo/src/mount.js} +5 -10
- package/providers/free-tier/README.md +2 -2
- package/providers/free-tier/src/adapter.js +127 -0
- package/{driver/engine/mcp/free-tier-server.mjs → providers/free-tier/src/mount.js} +5 -10
- package/providers/jx-subclass/coverage.mjs +1 -6
- package/providers/jx-subclass/score-truth.mjs +2 -1
- package/providers/oauth-mcp-bridge/CHANGELOG.md +4 -0
- package/providers/oauth-mcp-bridge/package.json +1 -1
- package/providers/perplexity/src/core.js +2 -2
- package/providers/signa/README.md +2 -2
- package/providers/signa/src/adapter.js +157 -0
- package/providers/signa/src/capabilities.js +0 -3
- package/providers/signa/src/core.js +2 -2
- package/{driver/engine/mcp/signa-server.mjs → providers/signa/src/mount.js} +7 -12
- package/providers/signa/src/offices.generated.js +17 -15
- package/providers/uspto-local/README.md +1 -1
- package/providers/uspto-local/bin/verify-index.mjs +1 -1
- package/providers/uspto-local/src/adapter.js +75 -0
- package/{driver/engine/mcp/uspto-local-server.mjs → providers/uspto-local/src/mount.js} +5 -10
- package/scripts/band-shape-probe.mjs +2 -2
- package/scripts/citation-line-check.mjs +7 -7
- package/scripts/compare.mjs +1 -1
- package/scripts/dead-names.mjs +2 -2
- package/scripts/e2e-first-time.mjs +19 -7
- package/scripts/e2e.mjs +13 -13
- package/scripts/engine-probe.mjs +1 -1
- package/scripts/env-audit.mjs +7 -4
- package/scripts/env-classify.mjs +5 -1
- package/scripts/feedback-mint.mjs +1 -1
- package/scripts/freeze-example-run.mjs +7 -7
- package/scripts/mint-suite-census.mjs +2 -2
- package/scripts/nightly-notice.mjs +1 -1
- package/scripts/release-cut-decision.mjs +7 -2
- package/scripts/release-note-required.mjs +26 -9
- package/scripts/release-notes-lint.mjs +3 -2
- package/scripts/release-version-pr-checks.mjs +1 -1
- package/scripts/settings-render-check.mjs +23 -3
- package/scripts/test-run.mjs +5 -5
- package/scripts/travelling-predicates.mjs +1 -1
- package/scripts/undeclared-field-census.mjs +1 -1
- package/scripts/unexecuted-asserts.mjs +1 -1
- package/scripts/verify-publishable.mjs +1 -1
- package/shared/client-door.mjs +1 -1
- package/shared/connect-clients.mjs +1 -1
- package/shared/connector-signin-probe.mjs +1 -1
- package/shared/env-aliases.mjs +1 -1
- package/shared/invocation.mjs +14 -2
- package/shared/names-in-force.mjs +2 -0
- package/shared/register-selection.mjs +2 -2
- package/shared/store-in-repo.mjs +3 -3
- package/shared/summary-blocks.mjs +0 -3
- package/shared/trigger-lane.mjs +1 -1
- package/shared/vacuous-pass.mjs +2 -2
- package/shared/verb-shim.mjs +4 -2
- package/node_modules/exceljs/README.md +0 -3023
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
// from a clean accept and reads differently to the next reader.
|
|
18
18
|
import { readFileSync, writeFileSync, mkdirSync, appendFileSync } from "node:fs";
|
|
19
19
|
import { join, basename } from "node:path";
|
|
20
|
-
import { driverDir, ensureDriverDir } from "../shared/driver-dir.mjs"; // — one definition of where `_driver/` is
|
|
21
20
|
import { acceptDeclinationCall, MAX_DECLINATIONS_PER_CALL, PAGE_KEY_PREFIX } from "./declination-call.mjs";
|
|
22
21
|
import { normalizeRecordUri } from "./registry-fidelity.mjs";
|
|
23
22
|
import { citedFindingNumbers } from "./finding-citations.mjs"; // the findings a ground cites, recorded with it
|
|
24
23
|
import { idSetHash, priorCallWithIdSet, listGeneration } from "./call-repeat.mjs"; //
|
|
25
24
|
import { PARK_AFTER_REFUSALS, parkedIds, refusalCountsBy } from "./refusal-bound.mjs"; //
|
|
25
|
+
import { driverDir, ensureDriverDir, readJson } from "./run-record.mjs"; // — one definition of where `_driver/` is
|
|
26
26
|
|
|
27
27
|
const CALLS_DIR = "declination-calls";
|
|
28
28
|
export const DECLINATION_LEDGER_NAME = "declinations.json";
|
|
@@ -84,7 +84,7 @@ export function callsSoFar(runDir) {
|
|
|
84
84
|
export function readDeclinations(runDir) {
|
|
85
85
|
const { ledger } = declinationCallPaths(runDir, 0);
|
|
86
86
|
try {
|
|
87
|
-
const raw =
|
|
87
|
+
const raw = readJson(ledger);
|
|
88
88
|
const byUri = new Map();
|
|
89
89
|
const byPage = new Map(); // a page the web notes marked, keyed by its normalised address
|
|
90
90
|
for (const d of Array.isArray(raw?.declinations) ? raw.declinations : []) {
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
// are PRODUCTION, into anything that imports it.
|
|
25
25
|
import { readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
26
26
|
import { join } from "node:path";
|
|
27
|
-
import { driverDir, labelOfDriverFile } from "../shared/driver-dir.mjs"; // a card's label carries a colon, which Windows writes %3A
|
|
28
27
|
import { deferralCoverageRow } from "./deferral-row.mjs";
|
|
29
28
|
import { PUBLISH_INPUTS, readStore } from "./publish/publish-inputs.mjs";
|
|
30
29
|
import { readPartNotCompleted } from "./parts-not-completed.mjs";
|
|
30
|
+
import { driverDir, labelOfDriverFile, paths, readJson } from "./run-record.mjs"; // a card's label carries a colon, which Windows writes %3A
|
|
31
31
|
|
|
32
32
|
// The name each part is given: a label the report or the workbook already prints. Never a new phrase.
|
|
33
33
|
export const PART_NAMES = {
|
|
@@ -196,7 +196,7 @@ function register(runDir, log) {
|
|
|
196
196
|
(searches.disclosed_axes ?? []).length ? `the pass on ${searches.disclosed_axes.join(", ")} timed out, read as it stands with its clean claims open` : "",
|
|
197
197
|
].filter(Boolean).join("; ") + `: ${searches.reason ?? "no cause recorded"}` }, "the searches"]);
|
|
198
198
|
let reopen = null;
|
|
199
|
-
try { reopen =
|
|
199
|
+
try { reopen = readJson(paths(runDir).frameReopenReceipt); } catch { reopen = null; }
|
|
200
200
|
if (reopen?.dominant_element_gap === true && reopen?.domClosed !== true)
|
|
201
201
|
failed.push([{ fail: "the omission the blind frame comparison flagged was not closed by the reopen pass" }, "the dominant-element crowd"]);
|
|
202
202
|
if (!failed.length) return null;
|
|
@@ -286,7 +286,7 @@ export function recordsState(runDir) {
|
|
|
286
286
|
if (!files.length) return "absent";
|
|
287
287
|
for (const f of files) {
|
|
288
288
|
try {
|
|
289
|
-
const body =
|
|
289
|
+
const body = readJson(join(runDir, "_records", f));
|
|
290
290
|
if (body && typeof body === "object" && !Array.isArray(body)) return "read";
|
|
291
291
|
} catch { /* the next file */ }
|
|
292
292
|
}
|
|
@@ -325,7 +325,7 @@ function coverageRows(runDir, log) {
|
|
|
325
325
|
function evidenceStamps(runDir, log) {
|
|
326
326
|
const threw = failedStep(log, "basis-derivation", "basis-derivation-failed");
|
|
327
327
|
let record = null;
|
|
328
|
-
try { record =
|
|
328
|
+
try { record = readJson(paths(runDir).basisDerivation); } catch { record = null; }
|
|
329
329
|
const standing = threw ? 0 : Number(record?.unwritable) || 0;
|
|
330
330
|
if (!threw && !standing) return null;
|
|
331
331
|
return { part: "evidence-stamps", name: RULED_WORDS.officialRecords, reason: NOT_COMPLETED,
|
|
@@ -342,7 +342,7 @@ const CHECKS = [assessment, overview, courtDecisions, searchLog, register, local
|
|
|
342
342
|
* already carries that input's failure. PURE apart from reading `runDir`.
|
|
343
343
|
*/
|
|
344
344
|
export function degradedParts(runDir, opts = {}) {
|
|
345
|
-
const log = readJsonl(
|
|
345
|
+
const log = readJsonl(paths(runDir).run);
|
|
346
346
|
return CHECKS.map((check) => check(runDir, log, opts)).filter(Boolean);
|
|
347
347
|
}
|
|
348
348
|
|
|
@@ -375,7 +375,7 @@ export function writeDegradedParts(runDir, parts) {
|
|
|
375
375
|
/** The rows written at delivery, or [] for a run that wrote none (every run before this change). */
|
|
376
376
|
export function readDegradedPartRows(runDir) {
|
|
377
377
|
try {
|
|
378
|
-
const rows =
|
|
378
|
+
const rows = readJson(driverDir(runDir, DEGRADED_PARTS_FILE))?.rows;
|
|
379
379
|
return Array.isArray(rows) ? rows.filter((r) => r && typeof r.area === "string" && typeof r.note === "string") : [];
|
|
380
380
|
} catch { return []; }
|
|
381
381
|
}
|
|
@@ -439,7 +439,7 @@ export function storeStates(base) {
|
|
|
439
439
|
/** The store states delivery recorded, or null for a run delivered before it recorded them. */
|
|
440
440
|
export function readDeliveredStores(runDir) {
|
|
441
441
|
try {
|
|
442
|
-
const stores =
|
|
442
|
+
const stores = readJson(driverDir(runDir, DEGRADED_PARTS_FILE))?.stores;
|
|
443
443
|
return stores && typeof stores === "object" && !Array.isArray(stores) ? stores : null;
|
|
444
444
|
} catch { return null; }
|
|
445
445
|
}
|
|
@@ -478,11 +478,11 @@ export function mergeDegradedRows(...lists) {
|
|
|
478
478
|
// The listing of filings and the owner lookups each end in one run-log event, a success or a failure, and
|
|
479
479
|
// the last of the pair is the step's state at delivery, so a resume that succeeded clears it. The
|
|
480
480
|
// plain-language review logs its outcome; the three that ship the rater's wording unreviewed are failures.
|
|
481
|
-
const REVIEW_FAILED = ["stage-failed", "artifact-unreadable", "rewrite-refused-by-the-merged-gate", "correction-failed", "correction-refused-by-the-merged-gate", "
|
|
481
|
+
const REVIEW_FAILED = ["stage-failed", "artifact-unreadable", "rewrite-refused-by-the-merged-gate", "correction-failed", "correction-refused-by-the-merged-gate", "recheck-failed"];
|
|
482
482
|
|
|
483
483
|
/** Which of the knockout's whole steps ended failed, each with its raw cause for the run's record. */
|
|
484
484
|
export function knockoutStepFailures(runDir) {
|
|
485
|
-
const log = readJsonl(
|
|
485
|
+
const log = readJsonl(paths(runDir).run);
|
|
486
486
|
const listing = lastEvent(log, ["knockout-register-records", "knockout-register-records-refused", "knockout-register-records-failed"]);
|
|
487
487
|
const owners = failedStep(log, "knockout-owner-checks", "knockout-owner-checks-failed");
|
|
488
488
|
const review = lastEvent(log, ["knockout-review"]);
|
|
@@ -23,10 +23,11 @@
|
|
|
23
23
|
// stage apart. This module is the single answer. `cut/` cannot import it (that directory does not travel
|
|
24
24
|
// and this one does), so the pack gate restates the disjunction and its own test pins the two together.
|
|
25
25
|
|
|
26
|
-
import { cpSync, existsSync, mkdirSync, mkdtempSync, readdirSync,
|
|
26
|
+
import { cpSync, existsSync, mkdirSync, mkdtempSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
27
27
|
import { tmpdir } from "node:os";
|
|
28
28
|
import { basename, dirname, join, resolve, sep } from "node:path"; import { studioDirFor } from "../shared/pre-rename-spellings.mjs";
|
|
29
29
|
import { config } from "./driver.config.mjs"; // — the install's own default agent, never a literal
|
|
30
|
+
import { readJson } from "./run-record.mjs";
|
|
30
31
|
|
|
31
32
|
/** The entry file each lane's publisher reads as its source, in the order a child is probed for one. */
|
|
32
33
|
export const ENTRY_FILES = Object.freeze(["report.md", "knockout-findings.json"]);
|
|
@@ -91,7 +92,7 @@ export function prepareSample(dir, { repoRoot, tmp } = {}) {
|
|
|
91
92
|
if (!isFrozen(dir)) return { name, why: NOT_FROZEN };
|
|
92
93
|
const manifest = join(dir, "meta.json");
|
|
93
94
|
let meta;
|
|
94
|
-
try { meta =
|
|
95
|
+
try { meta = readJson(manifest); } catch (e) { return { name, why: `its meta.json could not be read (${why(e)})` }; }
|
|
95
96
|
if (!meta?.runId) return { name, why: `${manifest} names no runId, so it is not a frozen demo manifest` };
|
|
96
97
|
try { return { sample: { dir, meta, name, publishFrom: publishSource(dir, { repoRoot, ...(tmp ? { tmp } : {}) }) } }; }
|
|
97
98
|
catch (e) { return { name, why: `it could not be copied to publish from (${why(e)})` }; }
|
|
@@ -199,7 +200,7 @@ export function seedDemoRuns({ workspace, examplesDir, portalOrigin = null }) {
|
|
|
199
200
|
for (const name of demoChildren(examplesDir)) {
|
|
200
201
|
const run = join(examplesDir, name, "run");
|
|
201
202
|
let s;
|
|
202
|
-
try { s =
|
|
203
|
+
try { s = readJson(join(run, "status.json")); } catch { continue; }
|
|
203
204
|
if (!s?.slug || !s?.codename || !s?.date) continue;
|
|
204
205
|
// THE FALLBACK IS THE INSTALL'S OWN DEFAULT AGENT, not a literal (ruling 563). It fires only for a
|
|
205
206
|
// sample whose status.json carries no agent; all four shipped samples carry one.
|
|
@@ -231,7 +232,7 @@ export const reportRoute = (runId) => `/portal/report/${encodeURIComponent(runId
|
|
|
231
232
|
*/
|
|
232
233
|
export function stampReportLinks(statusFile, origin) {
|
|
233
234
|
let s;
|
|
234
|
-
try { s =
|
|
235
|
+
try { s = readJson(statusFile); } catch { return false; }
|
|
235
236
|
if (!s?.runId) return false;
|
|
236
237
|
const base = String(origin).replace(/\/+$/, "");
|
|
237
238
|
const local = (url) => {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
import { readdirSync, readFileSync } from "node:fs";
|
|
27
27
|
import { join } from "node:path";
|
|
28
28
|
import { claimerIsAlive, parseClaimSidecar } from "./claim-liveness.mjs";
|
|
29
|
+
import { liveQueueState } from "./queue-markers.mjs";
|
|
29
30
|
|
|
30
31
|
/** A directory that is not there yet holds nothing; one we may not READ is a different answer entirely. */
|
|
31
32
|
function listDir(dir) {
|
|
@@ -42,17 +43,26 @@ function listDir(dir) {
|
|
|
42
43
|
* real, and a guard that reads one of them passes over work sitting in
|
|
43
44
|
* the other.
|
|
44
45
|
* @param {string} a.lockDir the run-slot lock dir — a slot file is held for the life of a pipeline.
|
|
45
|
-
* @
|
|
46
|
+
* @param {Array<{codename: string, runDir: string}>} a.parkedRunDirs run folders the runner will resume on its
|
|
47
|
+
* own (runner.mjs `parkedRunDirOrphans`), passed in so this module stays light.
|
|
48
|
+
* @returns {{queued, claimed, stale, parked, slots, unreadable}} — plain arrays, safe to print.
|
|
49
|
+
*
|
|
50
|
+
* A PARKED RUN HOLDS THE DEPLOYMENT. It is part-way through a search and comes back on its own, and the owner's ruling
|
|
51
|
+
* of 2026-11-09 is that a search is not upgraded part-way: an update waits for it, as it waits for a running one.
|
|
46
52
|
*/
|
|
47
|
-
export function liveRunHolds({ queueDirs = [], lockDir = null, isAlive = claimerIsAlive } = {}) {
|
|
48
|
-
const queued = [], claimed = [], stale = [], slots = [], unreadable = [];
|
|
53
|
+
export function liveRunHolds({ queueDirs = [], lockDir = null, parkedRunDirs = [], isAlive = claimerIsAlive } = {}) {
|
|
54
|
+
const queued = [], claimed = [], stale = [], parked = [], slots = [], unreadable = [];
|
|
49
55
|
|
|
50
56
|
for (const q of (Array.isArray(queueDirs) ? queueDirs : []).filter(Boolean)) {
|
|
51
57
|
const { names, error } = listDir(q);
|
|
52
58
|
if (error) { unreadable.push({ path: q, error }); continue; }
|
|
53
59
|
for (const n of names) {
|
|
54
|
-
|
|
55
|
-
if (
|
|
60
|
+
const state = n.endsWith(".tmp") ? null : liveQueueState(n);
|
|
61
|
+
if (state === "json") { queued.push({ queue: q, id: n.replace(/\.json$/, "") }); continue; }
|
|
62
|
+
if (state === "postponed") { parked.push({ queue: q, id: n.replace(/\.postponed$/, "") }); continue; }
|
|
63
|
+
if (state !== "processing") continue;
|
|
64
|
+
// The claim lock is a `.processing` mid-rename, with no sidecar of its own yet: held, as the next line holds one with none.
|
|
65
|
+
if (!n.endsWith(".processing")) { claimed.push({ queue: q, id: n.replace(/\.processing\.claimed-\S+$/, ""), pid: null }); continue; }
|
|
56
66
|
const id = n.replace(/\.processing$/, "");
|
|
57
67
|
let rec = null;
|
|
58
68
|
try { rec = parseClaimSidecar(readFileSync(join(q, `${n}.pid`), "utf8")); } catch { /* legacy claim, no sidecar */ }
|
|
@@ -79,7 +89,9 @@ export function liveRunHolds({ queueDirs = [], lockDir = null, isAlive = claimer
|
|
|
79
89
|
}
|
|
80
90
|
}
|
|
81
91
|
|
|
82
|
-
|
|
92
|
+
for (const r of Array.isArray(parkedRunDirs) ? parkedRunDirs : []) parked.push({ runDir: r.runDir, id: r.codename });
|
|
93
|
+
|
|
94
|
+
return { queued, claimed, stale, parked, slots, unreadable };
|
|
83
95
|
}
|
|
84
96
|
|
|
85
97
|
/**
|
|
@@ -106,7 +118,7 @@ export function deployRefusal(holds, { override = "" } = {}) {
|
|
|
106
118
|
const name = (rows, what) => rows?.length
|
|
107
119
|
? `${rows.length} ${what}: ${rows.slice(0, 6).map((r) => r.id ?? r.file ?? r.path).join(", ")}${rows.length > 6 ? `, +${rows.length - 6} more` : ""}`
|
|
108
120
|
: null;
|
|
109
|
-
for (const [rows, what] of [[h.queued, "QUEUED"], [h.claimed, "CLAIMED and live"], [h.stale, "CLAIMED by a dead pid (a takeover will resume it)"], [h.slots, "run slot(s) held by a live pid"]]) {
|
|
121
|
+
for (const [rows, what] of [[h.queued, "QUEUED"], [h.claimed, "CLAIMED and live"], [h.stale, "CLAIMED by a dead pid (a takeover will resume it)"], [h.parked, "PARKED and resuming on their own"], [h.slots, "run slot(s) held by a live pid"]]) {
|
|
110
122
|
const s = name(rows, what);
|
|
111
123
|
if (s) parts.push(s);
|
|
112
124
|
}
|
package/driver/derived-state.mjs
CHANGED
|
@@ -22,7 +22,7 @@ import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
|
22
22
|
import { createHash } from "node:crypto";
|
|
23
23
|
import { join, relative } from "node:path";
|
|
24
24
|
import { CONTEXT_DERIVATIONS, derivationsFor } from "./stage-context.mjs";
|
|
25
|
-
import {
|
|
25
|
+
import { paths } from "./run-record.mjs";
|
|
26
26
|
|
|
27
27
|
/** A file's identity by content, or a directory's by its entries' names and sizes, recursively. `sha` null when absent. */
|
|
28
28
|
function identityOf(path, runDir) {
|
|
@@ -65,7 +65,7 @@ const sameFiles = (a, b) => Array.isArray(a) && Array.isArray(b) && a.length ===
|
|
|
65
65
|
/** The derived state recorded on the run's last dispatch of `label` with this trigger, or null when none was recorded. */
|
|
66
66
|
export function recordedDerivedState(runDir, label, trigger = "fresh") {
|
|
67
67
|
let rows = [];
|
|
68
|
-
try { rows = readFileSync(
|
|
68
|
+
try { rows = readFileSync(paths(runDir).run, "utf8").split("\n"); } catch { return null; }
|
|
69
69
|
let found = null;
|
|
70
70
|
for (const line of rows) {
|
|
71
71
|
if (!line.includes('"derivedState"')) continue;
|
package/driver/dev-portal.mjs
CHANGED
|
@@ -44,6 +44,7 @@ import { readFlagSnapshot, registerTerritoriesFor } from "./flag-snapshot.mjs";
|
|
|
44
44
|
import { builtFor, registerCanCountFor } from "./flag-snapshot.mjs";
|
|
45
45
|
import { productAvailability, UNAVAILABLE_NOTE, PRODUCT_POLICIES } from "./search-policy.mjs";
|
|
46
46
|
import { isEntrypoint } from "../shared/is-entrypoint.mjs"; // — one entry-point test, all spellings
|
|
47
|
+
import { readJson } from "./run-record.mjs";
|
|
47
48
|
|
|
48
49
|
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
49
50
|
const LOOPBACK = new Set(["127.0.0.1", "::1"]);
|
|
@@ -142,7 +143,7 @@ function scanRuns(workspaceRoot) {
|
|
|
142
143
|
const out = [];
|
|
143
144
|
const readRun = (dir, slug, runName, archived) => {
|
|
144
145
|
try {
|
|
145
|
-
const s =
|
|
146
|
+
const s = readJson(join(dir, "status.json"));
|
|
146
147
|
out.push({ runId: s.runId ?? `${slug}-${runName}`, slug: s.slug ?? slug, codename: s.codename ?? null,
|
|
147
148
|
agent: s.agent ?? null, state: s.state ?? null, stepN: s.stepN ?? null, stepLabel: s.stepLabel ?? null,
|
|
148
149
|
stepTotal: s.stepTotal ?? null, signoff: s.review?.signoff ?? s.verdict ?? null, tier: s.tier ?? null, sendPending: s.sendPending ?? null,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
import { createHash } from "node:crypto";
|
|
38
38
|
import { mkdirSync, readFileSync, renameSync, writeFileSync, existsSync } from "node:fs";
|
|
39
39
|
import { join } from "node:path";
|
|
40
|
-
import { driverDir, driverFileName } from "
|
|
40
|
+
import { driverDir, driverFileName } from "./run-record.mjs"; //
|
|
41
41
|
|
|
42
42
|
export const DISPATCH_SUFFIX = "dispatch.txt";
|
|
43
43
|
|
|
@@ -40,6 +40,7 @@ import { connotationObligations, obligationRows, parsePrRiskResults, parseDispos
|
|
|
40
40
|
import { unionDispositionForm, formSidecarPath } from "./disposition-union.mjs";
|
|
41
41
|
import { validateDispositionCall, callAnswer, addressableRows, evidenceSatisfiable, MAX_ROWS_PER_CALL } from "./disposition-call.mjs";
|
|
42
42
|
import { PARK_AFTER_REFUSALS, parkedIds, refusalCountsBy } from "./refusal-bound.mjs"; //
|
|
43
|
+
import { readJson } from "./run-record.mjs";
|
|
43
44
|
|
|
44
45
|
const CALLS_DIR = "disposition-calls";
|
|
45
46
|
|
|
@@ -65,7 +66,7 @@ export function obligationsSidecarPath(outputPath) {
|
|
|
65
66
|
*/
|
|
66
67
|
export function toldRowIds(outputPath) {
|
|
67
68
|
try {
|
|
68
|
-
const told =
|
|
69
|
+
const told = readJson(obligationsSidecarPath(outputPath))?.rowsTold;
|
|
69
70
|
return Array.isArray(told) && told.length ? told.map((x) => String(x ?? "").trim()) : null;
|
|
70
71
|
} catch { return null; }
|
|
71
72
|
}
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
// Writing a second application path would be the second writer, one artifact earlier.
|
|
50
50
|
import { readFileSync, writeFileSync, mkdirSync, appendFileSync, readdirSync } from "node:fs";
|
|
51
51
|
import { join, basename } from "node:path";
|
|
52
|
-
import { driverDir } from "../shared/driver-dir.mjs"; //
|
|
53
52
|
import { acceptClosureCall, toClosureLines, MAX_CLOSURES_PER_CALL } from "./doubt-closure-call.mjs";
|
|
54
53
|
import { idSetHash as idSetHashOf, priorCallWithIdSet as priorCallWithIdSetIn } from "./call-repeat.mjs"; //
|
|
54
|
+
import { driverDir, readJson } from "./run-record.mjs";
|
|
55
55
|
|
|
56
56
|
const CALLS_DIR = "doubt-closure-calls";
|
|
57
57
|
const ARTIFACT = "doubt-closure.md"; // conversion 6 — the driver's render, read by validators.doubtClosure
|
|
@@ -294,7 +294,7 @@ export function readAcceptedClosures(runDir) {
|
|
|
294
294
|
try { names = readdirSync(dir).filter((f) => /^accepted-\d+\.json$/.test(f)).sort(); } catch { return out; }
|
|
295
295
|
for (const n of names) {
|
|
296
296
|
try {
|
|
297
|
-
const doc =
|
|
297
|
+
const doc = readJson(join(dir, n));
|
|
298
298
|
if (Array.isArray(doc?.lines?.doubt)) out.doubt.push(...doc.lines.doubt);
|
|
299
299
|
if (Array.isArray(doc?.lines?.ask)) out.ask.push(...doc.lines.ask);
|
|
300
300
|
out.files++;
|