sneakoscope 7.0.2 → 7.0.3
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 +7 -5
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/bin/sks-dispatch.js +0 -3
- package/dist/cli/command-registry.js +0 -2
- package/dist/cli/install-helpers-codex-lb-chain.js +24 -2
- package/dist/cli/install-helpers-codex-lb-config.js +0 -7
- package/dist/cli/install-helpers-codex-lb-selftest-chain.js +0 -3
- package/dist/cli/install-helpers-codex-lb-selftest.js +0 -17
- package/dist/cli/install-helpers.js +81 -96
- package/dist/cli/router.js +0 -22
- package/dist/commands/codex-lb.js +176 -22
- package/dist/commands/codex.js +3 -8
- package/dist/commands/doctor.js +4 -14
- package/dist/commands/perf.js +5 -1
- package/dist/commands/zellij-slot-column-anchor.js +0 -2
- package/dist/commands/zellij-slot-pane.js +0 -7
- package/dist/commands/zellij.js +0 -2
- package/dist/config/skills-manifest.json +52 -52
- package/dist/core/agent-bridge/agent-manifest.js +192 -1
- package/dist/core/agent-bridge/agent-mode.js +0 -5
- package/dist/core/agent-bridge/host-capability-policy.js +189 -0
- package/dist/core/agent-bridge/host-capability-runtime.js +1395 -0
- package/dist/core/agent-bridge/mcp-server.js +1 -11
- package/dist/core/agents/agent-effort-policy.js +0 -3
- package/dist/core/agents/agent-orchestrator.js +0 -4
- package/dist/core/agents/agent-proof-evidence.js +0 -2
- package/dist/core/agents/agent-runner-ollama.js +0 -3
- package/dist/core/agents/agent-scheduler.js +0 -5
- package/dist/core/agents/native-cli-worker-runtime.js +5 -17
- package/dist/core/agents/work-partition/repo-inventory.js +0 -2
- package/dist/core/auto-review.js +0 -13
- package/dist/core/bench.js +0 -14
- package/dist/core/code-structure.js +0 -3
- package/dist/core/codex/agent-config-file-repair.js +0 -8
- package/dist/core/codex/codex-cli-update.js +122 -20
- package/dist/core/codex/codex-config-eperm-repair.js +0 -4
- package/dist/core/codex/codex-config-guard.js +0 -3
- package/dist/core/codex/codex-config-readability.js +0 -13
- package/dist/core/codex/codex-project-config-policy.js +0 -33
- package/dist/core/codex/official-goal-mode.js +0 -2
- package/dist/core/codex-app/codex-app-fast-ui-repair.js +5 -7
- package/dist/core/codex-app/codex-app-ui-state-snapshot.js +44 -7
- package/dist/core/codex-app/sks-menubar.js +0 -1
- package/dist/core/codex-app.js +0 -9
- package/dist/core/codex-compat/codex-hook-output-builders.js +9 -1
- package/dist/core/codex-compat/codex-hook-output-normalizer.js +1 -1
- package/dist/core/codex-compat/codex-hook-semantic-validator.js +3 -2
- package/dist/core/codex-compat/codex-hook-warning-detector.js +10 -2
- package/dist/core/codex-control/codex-lb-launch-recovery.js +0 -3
- package/dist/core/codex-control/codex-reliability-shield.js +0 -8
- package/dist/core/codex-control/codex-sdk-adapter.js +0 -3
- package/dist/core/codex-control/codex-sdk-config-policy.js +0 -2
- package/dist/core/codex-control/codex-sdk-env-policy.js +61 -16
- package/dist/core/codex-control/codex-task-runner.js +0 -7
- package/dist/core/codex-control/codex-thread-registry.js +0 -4
- package/dist/core/codex-lb/codex-lb-env.js +118 -20
- package/dist/core/codex-lb/codex-lb-tool-catalog.js +0 -4
- package/dist/core/codex-lb/codex-lb-tool-output-recovery.js +1 -1
- package/dist/core/codex-model-guard.js +0 -14
- package/dist/core/codex-native/codex-native-feature-broker.js +67 -22
- package/dist/core/codex-native/codex-native-interop-policy.js +81 -9
- package/dist/core/codex-native/confined-report-writer.js +21 -0
- package/dist/core/codex-native/core-skill-integrity.js +169 -20
- package/dist/core/codex-native/project-skill-dedupe.js +55 -13
- package/dist/core/codex-native/skill-registry-ledger.js +137 -16
- package/dist/core/codex-native/sks-skill-paths.js +185 -0
- package/dist/core/codex-runtime/codex-desktop-config-policy.js +0 -2
- package/dist/core/commands/agent-bridge-command.js +28 -8
- package/dist/core/commands/basic-cli.js +67 -26
- package/dist/core/commands/bench-command.js +5 -1
- package/dist/core/commands/command-utils.js +0 -5
- package/dist/core/commands/image-ux-review-command.js +0 -9
- package/dist/core/commands/mad-sks-command.js +0 -38
- package/dist/core/commands/naruto-command.js +46 -12
- package/dist/core/commands/ppt-command.js +0 -9
- package/dist/core/commands/run-command.js +8 -2
- package/dist/core/commands/seo-command.js +0 -6
- package/dist/core/commands/wiki-command.js +0 -14
- package/dist/core/computer-use-live-evidence.js +0 -5
- package/dist/core/config/secret-preservation.js +0 -11
- package/dist/core/daemon/sksd-hook-daemon-entrypoint.js +0 -2
- package/dist/core/daemon/sksd-hook-daemon.js +1 -29
- package/dist/core/daemon/sksd-hook-dispatch.js +0 -17
- package/dist/core/db-safety.js +0 -7
- package/dist/core/doctor/browser-use-repair.js +0 -2
- package/dist/core/doctor/doctor-codex-startup-repair.js +0 -3
- package/dist/core/doctor/doctor-readiness-matrix.js +12 -0
- package/dist/core/doctor/doctor-skill-reconcile.js +32 -0
- package/dist/core/doctor/imagegen-repair.js +0 -2
- package/dist/core/doctor/mcp-transport-collision-repair.js +0 -3
- package/dist/core/doctor/retired-managed-residue-private.js +0 -1
- package/dist/core/doctor/supabase-mcp-repair.js +0 -11
- package/dist/core/feature-fixture-executor.js +0 -48
- package/dist/core/feature-fixtures.js +0 -5
- package/dist/core/fsx.js +11 -12
- package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +0 -5
- package/dist/core/hooks-runtime/hook-context.js +202 -0
- package/dist/core/hooks-runtime/hook-io.js +1 -12
- package/dist/core/hooks-runtime/light-turn.js +0 -2
- package/dist/core/hooks-runtime/naruto-decision-gate.js +4 -1
- package/dist/core/hooks-runtime/naruto-terminal-finalization.js +91 -0
- package/dist/core/hooks-runtime/official-subagent-lifecycle.js +370 -0
- package/dist/core/hooks-runtime/standalone-parent-host-capability.js +98 -0
- package/dist/core/hooks-runtime/subagent-context.js +59 -0
- package/dist/core/hooks-runtime/subagent-skill-availability-contract.js +29 -0
- package/dist/core/hooks-runtime/subagent-skill-availability-evidence.js +195 -0
- package/dist/core/hooks-runtime/subagent-skill-availability-guards.js +316 -0
- package/dist/core/hooks-runtime/subagent-skill-availability.js +217 -0
- package/dist/core/hooks-runtime.js +259 -535
- package/dist/core/image-ux-review/codex-app-generated-image-discovery.js +0 -17
- package/dist/core/image-ux-review/imagegen-adapter.js +0 -14
- package/dist/core/imagegen/imagegen-auth-readiness.js +0 -9
- package/dist/core/imagegen/imagegen-capability.js +0 -3
- package/dist/core/init/managed-skill-install.js +42 -0
- package/dist/core/init/skills.js +247 -74
- package/dist/core/init.js +15 -40
- package/dist/core/lean-engineering-policy.js +0 -2
- package/dist/core/locks/file-lock.js +0 -21
- package/dist/core/loops/loop-planner.js +0 -6
- package/dist/core/loops/loop-runtime.js +0 -1
- package/dist/core/loops/loop-worker-runtime.js +0 -19
- package/dist/core/mad-sks/executors/db-write-executor.js +0 -4
- package/dist/core/mad-sks/executors/executor-base.js +0 -10
- package/dist/core/mad-sks/immutable-harness-guard.js +0 -5
- package/dist/core/mad-sks/sql-plane/coordinator.js +0 -5
- package/dist/core/mad-sks/sql-plane/ledger.js +0 -4
- package/dist/core/mad-sks/sql-plane/lock.js +0 -4
- package/dist/core/mad-sks/sql-plane/mcp-executor.js +0 -9
- package/dist/core/mad-sks/sql-plane/policy-resolver.js +0 -2
- package/dist/core/mad-sks/sql-plane/postconditions.js +0 -4
- package/dist/core/mad-sks/sql-plane/recovery.js +0 -2
- package/dist/core/mad-sks/sql-plane/runtime-profile.js +0 -8
- package/dist/core/managed-assets/managed-assets-manifest.js +1 -7
- package/dist/core/mcp-config/health-check.js +10 -3
- package/dist/core/migration/migration-transaction-journal.js +0 -8
- package/dist/core/mission.js +0 -2
- package/dist/core/naruto/naruto-active-pool.js +0 -2
- package/dist/core/naruto/naruto-concurrency-governor.js +0 -1
- package/dist/core/naruto/naruto-real-write-proof.js +0 -4
- package/dist/core/naruto/naruto-write-e2e.js +0 -1
- package/dist/core/perf/perf-budget.js +0 -5
- package/dist/core/permission-gates.js +0 -2
- package/dist/core/pipeline-internals/runtime-core.js +15 -5
- package/dist/core/pipeline-internals/runtime-gates.js +0 -12
- package/dist/core/preflight/parallel-preflight-engine.js +0 -11
- package/dist/core/proof/evidence-collector.js +0 -2
- package/dist/core/proof/route-finalizer.js +0 -1
- package/dist/core/proof/selftest-proof-fixtures.js +0 -5
- package/dist/core/providers/glm/bench/glm-benchmark-runner.js +0 -2
- package/dist/core/providers/glm/glm-request-cache.js +0 -3
- package/dist/core/providers/glm/naruto/glm-naruto-command.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-decomposer.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-orchestrator.js +0 -6
- package/dist/core/providers/glm/naruto/glm-naruto-trace.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-worker-pool.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-worktree.js +0 -1
- package/dist/core/providers/openrouter/openrouter-secret-store.js +0 -1
- package/dist/core/providers/openrouter/openrouter-stream.js +0 -2
- package/dist/core/questions.js +3 -3
- package/dist/core/release/gate-manifest.js +0 -5
- package/dist/core/release/package-size-budget.js +1 -1
- package/dist/core/release/release-gate-batch-runner.js +11 -2
- package/dist/core/release/release-gate-cache-v2.js +0 -4
- package/dist/core/release/release-gate-hermetic-env.js +0 -5
- package/dist/core/release-parallel-full-coverage.js +0 -2
- package/dist/core/remote/ssh-worker-client.js +0 -3
- package/dist/core/research/research-adversarial-review.js +6 -2
- package/dist/core/responses-retry-policy.js +0 -10
- package/dist/core/retention.js +0 -7
- package/dist/core/routes/constants.js +0 -3
- package/dist/core/routes.js +89 -15
- package/dist/core/safety/command-contract/contracts.js +2 -0
- package/dist/core/safety/mutation-guard.js +0 -25
- package/dist/core/safety/mutation-ledger.js +0 -9
- package/dist/core/safety/requested-scope-contract.js +0 -0
- package/dist/core/security/high-risk-contracts.js +0 -1
- package/dist/core/skills/core-skill-card.js +0 -0
- package/dist/core/skills/core-skill-deployment.js +0 -13
- package/dist/core/skills/core-skill-epoch.js +0 -11
- package/dist/core/skills/core-skill-meta-update.js +0 -6
- package/dist/core/skills/core-skill-patch-apply.js +0 -7
- package/dist/core/skills/core-skill-patch.js +0 -8
- package/dist/core/skills/core-skill-reflection.js +0 -16
- package/dist/core/skills/core-skill-runtime.js +0 -6
- package/dist/core/skills/core-skill-scorer.js +0 -7
- package/dist/core/skills/core-skill-trainer.js +0 -11
- package/dist/core/skills/core-skill-types.js +0 -9
- package/dist/core/skills/core-skill-validation.js +0 -5
- package/dist/core/skills/rejected-skill-patch-buffer.js +0 -2
- package/dist/core/stop-gate/stop-gate-check.js +0 -8
- package/dist/core/stop-gate/stop-gate-resolver.js +0 -7
- package/dist/core/stop-gate/stop-gate-writer.js +0 -5
- package/dist/core/subagents/model-policy.js +0 -7
- package/dist/core/subagents/naruto-help-contract.js +1 -1
- package/dist/core/subagents/naruto-proof-projection.js +580 -12
- package/dist/core/subagents/official-subagent-config.js +0 -8
- package/dist/core/subagents/official-subagent-preparation.js +6 -5
- package/dist/core/subagents/official-subagent-prompt.js +29 -0
- package/dist/core/subagents/official-subagent-runner.js +343 -37
- package/dist/core/subagents/subagent-evidence.js +378 -9
- package/dist/core/subagents/thread-budget.js +5 -2
- package/dist/core/subagents/triwiki-attention.js +0 -4
- package/dist/core/subagents/wave-parent-guidance.js +54 -9
- package/dist/core/telegram/runtime.js +0 -1
- package/dist/core/triwiki/code-index-scanner.js +0 -3
- package/dist/core/triwiki/code-pack-head-freshness.js +0 -10
- package/dist/core/triwiki/code-pack.js +0 -2
- package/dist/core/triwiki/triwiki-cache-key.js +0 -1
- package/dist/core/triwiki/triwiki-proof-bank.js +0 -1
- package/dist/core/triwiki-attention.js +0 -10
- package/dist/core/triwiki-provenance.js +0 -5
- package/dist/core/triwiki-runtime.js +0 -12
- package/dist/core/triwiki-wrongness/wrongness-ledger.js +0 -7
- package/dist/core/triwiki-wrongness/wrongness-schema.js +0 -3
- package/dist/core/trust-kernel/trust-report.js +0 -7
- package/dist/core/update/update-migration-state.js +21 -39
- package/dist/core/update-check.js +2 -14
- package/dist/core/version-manager.js +2 -0
- package/dist/core/version.js +1 -1
- package/dist/core/work-order-ledger.js +0 -17
- package/dist/core/zellij/zellij-clipboard-config.js +0 -18
- package/dist/core/zellij/zellij-lane-renderer.js +5 -46
- package/dist/core/zellij/zellij-lane-runtime.js +0 -1
- package/dist/core/zellij/zellij-launcher.js +0 -26
- package/dist/core/zellij/zellij-official-subagent-activity.js +0 -5
- package/dist/core/zellij/zellij-official-subagent-telemetry.js +0 -5
- package/dist/core/zellij/zellij-screen-proof.js +0 -7
- package/dist/core/zellij/zellij-slot-column-anchor.js +0 -1
- package/dist/core/zellij/zellij-slot-pane-renderer.js +0 -9
- package/dist/core/zellij/zellij-slot-telemetry.js +0 -12
- package/dist/core/zellij/zellij-ui-mode.js +0 -7
- package/dist/core/zellij/zellij-update.js +0 -29
- package/dist/core/zellij/zellij-worker-pane-manager.js +0 -39
- package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +213 -27
- package/dist/native/sks-menubar/Sources/UpdatesViewController.swift +95 -12
- package/dist/scripts/agent-message-bus-reader-check.js +0 -1
- package/dist/scripts/all-feature-deep-completion-check.js +0 -1
- package/dist/scripts/appshots-thread-attachment-discovery-check.js +0 -1
- package/dist/scripts/architecture-guard-check.js +0 -1
- package/dist/scripts/build-dist.js +0 -1
- package/dist/scripts/build-once-runner-check.js +0 -1
- package/dist/scripts/canonical-test-runner.js +0 -2
- package/dist/scripts/certificate-sla-check.js +0 -1
- package/dist/scripts/changelog-check.js +0 -1
- package/dist/scripts/check-cli-entrypoint.js +0 -1
- package/dist/scripts/check-command-module-budget.js +0 -7
- package/dist/scripts/check-feature-quality.js +0 -1
- package/dist/scripts/check-legacy-free.js +0 -1
- package/dist/scripts/check-pipeline-runtime.js +0 -1
- package/dist/scripts/check-runtime-schemas.js +0 -1
- package/dist/scripts/codex-0-134-runner-truth-check.js +0 -1
- package/dist/scripts/codex-0-137-compat-check.js +0 -1
- package/dist/scripts/codex-0138-capability-artifact-check.js +0 -1
- package/dist/scripts/codex-0138-capability-check.js +0 -1
- package/dist/scripts/codex-0138-doctor-check.js +0 -1
- package/dist/scripts/codex-0138-feature-probes-check.js +0 -1
- package/dist/scripts/codex-0144-core-real-probes-check.js +0 -1
- package/dist/scripts/codex-app-handoff-check.js +0 -1
- package/dist/scripts/codex-app-handoff-launch-check.js +0 -1
- package/dist/scripts/codex-config-load-probe.js +0 -5
- package/dist/scripts/codex-control-all-pipelines-check.js +0 -1
- package/dist/scripts/codex-control-event-stream-ledger-check.js +0 -1
- package/dist/scripts/codex-control-tool-output-continuity-audit-check.js +0 -1
- package/dist/scripts/codex-permission-profiles-check.js +0 -1
- package/dist/scripts/codex-plugin-app-template-policy-check.js +0 -1
- package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -1
- package/dist/scripts/codex-sdk-all-pipelines-check.js +0 -1
- package/dist/scripts/codex-sdk-backend-router-check.js +0 -1
- package/dist/scripts/codex-sdk-capability-check.js +0 -1
- package/dist/scripts/codex-sdk-event-stream-ledger-check.js +0 -1
- package/dist/scripts/codex-sdk-real-smoke-check.js +0 -1
- package/dist/scripts/concurrent-session-collision-check.js +9 -0
- package/dist/scripts/context7-evidence-dedupe-check.js +0 -1
- package/dist/scripts/core-skill-card-schema-check.js +0 -11
- package/dist/scripts/core-skill-deployment-snapshot-check.js +0 -10
- package/dist/scripts/core-skill-heldout-validation-check.js +0 -11
- package/dist/scripts/core-skill-no-inference-optimizer-check.js +0 -11
- package/dist/scripts/core-skill-patch-check.js +0 -11
- package/dist/scripts/core-skill-route-runtime-integration-check.js +0 -11
- package/dist/scripts/current-surface-update-e2e-check.js +0 -4
- package/dist/scripts/current-upgrade-matrix-check.js +0 -1
- package/dist/scripts/dfix-fixture-check.js +0 -1
- package/dist/scripts/dfix-patch-handoff-check.js +0 -1
- package/dist/scripts/dfix-verification-check.js +0 -1
- package/dist/scripts/dfix-verification-recommendation-check.js +0 -1
- package/dist/scripts/docs-truthfulness-check.js +3 -3
- package/dist/scripts/doctor-fastpath-check.js +0 -1
- package/dist/scripts/doctor-fix-proves-codex-read-check.js +0 -11
- package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +0 -4
- package/dist/scripts/doctor-idempotence-check.js +0 -1
- package/dist/scripts/doctor-ops-semantics-check.js +0 -1
- package/dist/scripts/ensure-bin-executable.js +0 -1
- package/dist/scripts/evidence-flagship-coverage-check.js +0 -1
- package/dist/scripts/fast-codex-service-tier-proof-check.js +0 -1
- package/dist/scripts/fixtures/fake-codex-config-loader.js +0 -5
- package/dist/scripts/fsx-hotpath-check.js +0 -1
- package/dist/scripts/gate-policy-audit-check.js +1 -1
- package/dist/scripts/geo-claim-evidence-check.js +0 -1
- package/dist/scripts/geo-cli-blackbox-check.js +0 -1
- package/dist/scripts/geo-crawler-policy-check.js +0 -1
- package/dist/scripts/git-worktree-diff-envelope-check.js +0 -1
- package/dist/scripts/git-worktree-dirty-lock-check.js +0 -1
- package/dist/scripts/git-worktree-dirty-main-detection-check.js +0 -1
- package/dist/scripts/git-worktree-integration-primary-check.js +0 -1
- package/dist/scripts/git-worktree-manifest-append-check.js +0 -1
- package/dist/scripts/git-worktree-untracked-diff-check.js +0 -1
- package/dist/scripts/high-risk-contracts-check.js +0 -1
- package/dist/scripts/hook-latency-budget-check.js +0 -1
- package/dist/scripts/hook-latency-quantum-check.js +0 -1
- package/dist/scripts/image-artifact-path-contract-check.js +0 -1
- package/dist/scripts/imagegen-real-smoke-check.js +0 -1
- package/dist/scripts/import-graph-budget-check.js +0 -1
- package/dist/scripts/installed-package-smoke-check.js +0 -1
- package/dist/scripts/legacy-gate-purge-check.js +0 -1
- package/dist/scripts/lib/codex-sdk-gate-lib.js +0 -3
- package/dist/scripts/lib/ensure-dist-fresh.js +0 -1
- package/dist/scripts/lib/valid-png-fixture.js +0 -1
- package/dist/scripts/local-collab-all-pipelines-final-gpt-check.js +0 -1
- package/dist/scripts/loop-directive-check-lib.js +0 -1
- package/dist/scripts/loop-worker-fixture-child.js +0 -1
- package/dist/scripts/mad-preflight-blocks-unreadable-config-check.js +0 -10
- package/dist/scripts/mad-sks-sql-plane-lifecycle-hook-decision-check.js +0 -1
- package/dist/scripts/mad-sks-sql-plane-result-lifecycle-check.js +0 -1
- package/dist/scripts/mcp-plugin-inventory-check.js +0 -1
- package/dist/scripts/mcp-tool-naming-parity-check.js +0 -1
- package/dist/scripts/model-call-concurrency-check.js +0 -1
- package/dist/scripts/mutation-callsite-coverage-check.js +0 -5
- package/dist/scripts/naruto-codex-e2e-check.js +0 -1
- package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -1
- package/dist/scripts/official-subagent-workflow-check.js +3 -1
- package/dist/scripts/ops-diagnostics-bundle-check.js +0 -1
- package/dist/scripts/packlist-performance-check.js +1 -3
- package/dist/scripts/perf-budget-check.js +0 -1
- package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -1
- package/dist/scripts/ppt-real-export-adapter-check.js +0 -1
- package/dist/scripts/ppt-real-imagegen-smoke-check.js +0 -1
- package/dist/scripts/ppt-real-imagegen-wiring-check.js +0 -1
- package/dist/scripts/ppt-reexport-rereview-check.js +0 -1
- package/dist/scripts/prepublish-fast-check.js +0 -23
- package/dist/scripts/prepublish-release-check-or-fast.js +0 -7
- package/dist/scripts/probe-memoization-check.js +0 -1
- package/dist/scripts/product-design-plugin-routing-check.js +0 -1
- package/dist/scripts/project-skill-dedupe-blackbox.js +36 -9
- package/dist/scripts/prompt-placeholder-guard-check.js +0 -1
- package/dist/scripts/python-codex-sdk-all-pipelines-check.js +0 -3
- package/dist/scripts/qa-loop-app-handoff-capability-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-cli-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-confirmation-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-gate-lifecycle-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-launch-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-status-lifecycle-check.js +0 -1
- package/dist/scripts/qa-loop-budget-policy-check.js +0 -1
- package/dist/scripts/qa-loop-effort-escalation-check.js +0 -1
- package/dist/scripts/qa-loop-image-path-exposure-check.js +0 -1
- package/dist/scripts/qa-loop-image-path-prompt-injection-check.js +0 -1
- package/dist/scripts/release-cache-glob-hashing-check.js +0 -1
- package/dist/scripts/release-cache-input-classifier-check.js +0 -1
- package/dist/scripts/release-cache-neutralization-report-check.js +0 -1
- package/dist/scripts/release-cache-version-neutral-fixture-check.js +0 -1
- package/dist/scripts/release-check-stamp.js +0 -4
- package/dist/scripts/release-dist-freshness-check.js +0 -1
- package/dist/scripts/release-full-parallelism-blackbox.js +3 -3
- package/dist/scripts/release-gate-batch-runner-check.js +22 -0
- package/dist/scripts/release-gate-budget-check.js +0 -6
- package/dist/scripts/release-gate-dag-runner-check.js +0 -1
- package/dist/scripts/release-latency-slo-check.js +0 -1
- package/dist/scripts/release-metadata-1-19-check.js +0 -1
- package/dist/scripts/release-metadata-check.js +0 -3
- package/dist/scripts/release-parallel-speed-budget-check.js +0 -5
- package/dist/scripts/release-proof-truth-check.js +0 -1
- package/dist/scripts/release-provenance-check.js +0 -1
- package/dist/scripts/release-real-check.js +0 -1
- package/dist/scripts/release-runtime-truth-matrix-check.js +0 -1
- package/dist/scripts/release-version-truth-check.js +0 -1
- package/dist/scripts/research-blueprint-densifier-check.js +0 -1
- package/dist/scripts/research-claim-builder-check.js +0 -1
- package/dist/scripts/research-complete-package-fixture-check.js +0 -1
- package/dist/scripts/research-final-reviewer-blackbox.js +0 -1
- package/dist/scripts/responses-retry-policy-centralized-check.js +0 -1
- package/dist/scripts/retention-apply-smoke-check.js +0 -1
- package/dist/scripts/retention-budget-check.js +0 -1
- package/dist/scripts/retention-dry-run-check.js +0 -1
- package/dist/scripts/rollback-recovery-smoke-check.js +0 -1
- package/dist/scripts/route-intent-regression-check.js +0 -1
- package/dist/scripts/runtime-current-terminal-check.js +0 -1
- package/dist/scripts/runtime-dist-parity-check.js +0 -1
- package/dist/scripts/runtime-no-src-mjs-check.js +0 -1
- package/dist/scripts/runtime-proof-summary-check.js +0 -1
- package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -15
- package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -1
- package/dist/scripts/scheduler-batch-dispatch-check.js +0 -1
- package/dist/scripts/scheduler-parallel-proof-consistency-check.js +0 -1
- package/dist/scripts/scheduler-utilization-integral-check.js +0 -1
- package/dist/scripts/search-visibility-gate-lib.js +0 -1
- package/dist/scripts/seo-audit-fixture-check.js +0 -1
- package/dist/scripts/seo-cli-blackbox-check.js +0 -1
- package/dist/scripts/seo-geo-geo-disambiguation-check.js +0 -1
- package/dist/scripts/seo-geo-route-identity-check.js +0 -1
- package/dist/scripts/seo-geo-skill-rich-content-check.js +0 -1
- package/dist/scripts/seo-marketing-truthfulness-check.js +0 -1
- package/dist/scripts/seo-metadata-sync-check.js +0 -1
- package/dist/scripts/seo-no-mutation-by-default-check.js +0 -1
- package/dist/scripts/shared-memory-fixture-check.js +0 -1
- package/dist/scripts/side-effect-runtime-report-check.js +0 -1
- package/dist/scripts/sizecheck.js +0 -1
- package/dist/scripts/sks-1-11-gate-lib.js +0 -1
- package/dist/scripts/sks-1-12-real-execution-check-lib.js +0 -1
- package/dist/scripts/sks-1-18-gate-lib.js +0 -1
- package/dist/scripts/sks-menubar-install-check.js +0 -3
- package/dist/scripts/sksd-daemon-check.js +0 -1
- package/dist/scripts/super-search-live-smoke-check.js +0 -1
- package/dist/scripts/super-search-local-http-smoke-check.js +0 -1
- package/dist/scripts/super-search-offline-contract-check.js +0 -1
- package/dist/scripts/super-search-provider-interface-check.js +0 -1
- package/dist/scripts/triwiki-cache-key-check.js +0 -1
- package/dist/scripts/triwiki-proof-bank-blackbox.js +0 -1
- package/dist/scripts/triwiki-proof-bank-check.js +0 -1
- package/dist/scripts/triwiki-proof-card-check.js +0 -1
- package/dist/scripts/trust-fixture-check.js +0 -1
- package/dist/scripts/ultra-router-auto-router-check.js +0 -1
- package/dist/scripts/update-fastpath-check.js +0 -1
- package/dist/scripts/upgrade-migration-matrix-check.js +0 -1
- package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +0 -1
- package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -1
- package/dist/scripts/ux-review-patch-diff-recheck-check.js +0 -1
- package/dist/scripts/ux-review-real-imagegen-smoke-check.js +0 -1
- package/dist/scripts/ux-review-run-wires-imagegen-check.js +0 -1
- package/dist/scripts/write-build-manifest.js +0 -1
- package/dist/scripts/wrongness-fixture-check.js +0 -1
- package/dist/scripts/zellij-capability-check.js +0 -1
- package/dist/scripts/zellij-developer-controls-check.js +0 -1
- package/dist/scripts/zellij-doctor-readiness-check.js +0 -13
- package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -1
- package/dist/scripts/zellij-fake-adapter-check.js +0 -1
- package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -1
- package/dist/scripts/zellij-lane-renderer-check.js +0 -1
- package/dist/scripts/zellij-launch-command-truth-check.js +0 -12
- package/dist/scripts/zellij-layout-valid-check.js +0 -1
- package/dist/scripts/zellij-pane-creation-lock-metrics-check.js +0 -1
- package/dist/scripts/zellij-pane-lock-concurrency-blackbox.js +0 -1
- package/dist/scripts/zellij-pane-lock-does-not-block-worker-check.js +0 -1
- package/dist/scripts/zellij-pane-lock-open-worker-integration-blackbox.js +0 -1
- package/dist/scripts/zellij-pane-proof-check.js +0 -1
- package/dist/scripts/zellij-qa-app-handoff-status-check.js +0 -1
- package/dist/scripts/zellij-real-session-cleanup-check.js +0 -1
- package/dist/scripts/zellij-real-session-launch-check.js +0 -1
- package/dist/scripts/zellij-right-column-geometry-proof.js +0 -1
- package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -1
- package/dist/scripts/zellij-right-column-manager-check.js +0 -1
- package/dist/scripts/zellij-screen-proof-check.js +0 -1
- package/dist/scripts/zellij-slot-only-ui-check.js +0 -1
- package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -1
- package/dist/scripts/zellij-slot-pane-stale-detection-check.js +0 -7
- package/dist/scripts/zellij-slot-telemetry-incremental-check.js +0 -1
- package/dist/scripts/zellij-slot-telemetry-live-flush-check.js +0 -1
- package/dist/scripts/zellij-slot-telemetry-performance-check.js +0 -1
- package/dist/scripts/zellij-stacked-capability-routing-check.js +0 -1
- package/dist/scripts/zellij-stacked-fallback-integration-blackbox.js +0 -1
- package/dist/scripts/zellij-stacked-version-matrix-check.js +0 -1
- package/dist/scripts/zellij-stacked-version-parser-check.js +0 -1
- package/dist/scripts/zellij-ui-design-check.js +0 -12
- package/dist/scripts/zellij-update-prompt-matrix-check.js +0 -1
- package/dist/scripts/zellij-update-prompt-mode-check.js +0 -1
- package/dist/scripts/zellij-update-prompt-safety-check.js +0 -1
- package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -2
- package/package.json +1 -1
|
@@ -41,7 +41,6 @@ export function buildCodePack(root, index, tokenBudget = DEFAULT_CODE_PACK_TOKEN
|
|
|
41
41
|
}
|
|
42
42
|
function buildEntryForModule(card) {
|
|
43
43
|
const citations = collectCitations(card);
|
|
44
|
-
// openwiki principle: an entry with no real repository citation is worse than no entry at all
|
|
45
44
|
if (!citations.length)
|
|
46
45
|
return null;
|
|
47
46
|
const text = summarizeModule(card);
|
|
@@ -102,7 +101,6 @@ function summarizeDependencies(dependencyEdges) {
|
|
|
102
101
|
return `Depends on: ${preview.join(', ')}${suffix}.`;
|
|
103
102
|
}
|
|
104
103
|
function computeTrustScore(card) {
|
|
105
|
-
// more citable surface (entry points, real exports) correlates with a more reliably summarizable module
|
|
106
104
|
let score = 0.5;
|
|
107
105
|
if (card.entry_points.length > 0)
|
|
108
106
|
score += 0.2;
|
|
@@ -191,7 +191,6 @@ function listFiles(root, start) {
|
|
|
191
191
|
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
192
192
|
}
|
|
193
193
|
catch (error) {
|
|
194
|
-
// dir can vanish or become unreadable between stack push and pop (TOCTOU) — contribute zero files, not a crash
|
|
195
194
|
if (isMissingOrInaccessible(error))
|
|
196
195
|
continue;
|
|
197
196
|
throw error;
|
|
@@ -237,20 +237,10 @@ function uniqueAttentionRows(rows = [], max = 4) {
|
|
|
237
237
|
}
|
|
238
238
|
return out;
|
|
239
239
|
}
|
|
240
|
-
/** Ranks code-pack entries (LLM-consumable, source-cited codebase summaries — see
|
|
241
|
-
* src/core/triwiki/code-pack.ts) by trust_score into a dedicated attention sub-budget,
|
|
242
|
-
* independent of the policy-claim RGBA/geometric selection above: code entries carry
|
|
243
|
-
* no meaningful mission-coordinate proximity, so competing them against policy claims
|
|
244
|
-
* for the same fixed slot budget would make their appearance arbitrary. Each surviving
|
|
245
|
-
* high-trust, clean entry becomes a use_first row (bare id, no fabricated RGBA).
|
|
246
|
-
* Lower-trust or wrongness-linked entries are hydrate-only so negative evidence can
|
|
247
|
-
* never be promoted into the high-trust fast path. Citation-backed hydrate rows tell
|
|
248
|
-
* consumers which real files must be read before relying on a summary. */
|
|
249
240
|
function codePackAttentionRows(codePackEntries = [], tokenBudget = 2000, wrongnessByModule = {}) {
|
|
250
241
|
const moduleWrongness = (entryId) => Number(wrongnessByModule[String(entryId || '').replace(/^code:/, '')] || 0);
|
|
251
242
|
const sorted = [...(codePackEntries || [])]
|
|
252
243
|
.filter((entry) => entry && typeof entry.id === 'string')
|
|
253
|
-
// Modules SKS has been wrong about before are worth re-reading first, then rank by trust.
|
|
254
244
|
.sort((a, b) => (moduleWrongness(b.id) - moduleWrongness(a.id)) || (Number(b.trust_score || 0) - Number(a.trust_score || 0)));
|
|
255
245
|
const useFirst = [];
|
|
256
246
|
const hydrateFirst = [];
|
|
@@ -56,11 +56,6 @@ function authoritativeCitations(pack) {
|
|
|
56
56
|
.map((value) => value.trim());
|
|
57
57
|
return [...new Set(normalized)].sort((a, b) => a.localeCompare(b));
|
|
58
58
|
}
|
|
59
|
-
/**
|
|
60
|
-
* Bounded byte manifest for the exact local hydration citations carried by a
|
|
61
|
-
* context pack. Runtime/generated state is intentionally excluded so ordinary
|
|
62
|
-
* mission/report churn cannot invalidate otherwise-current source memory.
|
|
63
|
-
*/
|
|
64
59
|
export function buildTriWikiSourceManifest(pack, root) {
|
|
65
60
|
const citations = authoritativeCitations(pack);
|
|
66
61
|
const includedCitations = [];
|
|
@@ -2,10 +2,6 @@ import path from 'node:path';
|
|
|
2
2
|
import { ensureDir, readJson, writeJsonAtomic } from './fsx.js';
|
|
3
3
|
import { validateWikiCoordinateIndex } from './wiki-coordinate.js';
|
|
4
4
|
import { validateTriWikiContextPackProvenance } from './triwiki-provenance.js';
|
|
5
|
-
// Inference-path TriWiki consumption. Routes/the agent kernel READ the deployed
|
|
6
|
-
// context pack written by `sks wiki refresh|pack` (the SSOT); they never rebuild
|
|
7
|
-
// it on the hot path. This is the seam that turns the TriWiki engine from an
|
|
8
|
-
// advisory prompt note into an actually-consulted, proof-referenced context source.
|
|
9
5
|
export const TRIWIKI_CONTEXT_PACK_REL = '.sneakoscope/wiki/context-pack.json';
|
|
10
6
|
export const TRIWIKI_RUNTIME_SCHEMA = 'sks.triwiki-runtime-context.v1';
|
|
11
7
|
function emptyContext(file, warning = 'no_triwiki_context_pack (run `sks wiki refresh` to populate the project memory pack)') {
|
|
@@ -23,11 +19,6 @@ function emptyContext(file, warning = 'no_triwiki_context_pack (run `sks wiki re
|
|
|
23
19
|
warning
|
|
24
20
|
};
|
|
25
21
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Load the deployed TriWiki context pack for a project root. Read-only; tolerant
|
|
28
|
-
* of an absent/corrupt pack (returns present:false + a warning so the route still
|
|
29
|
-
* runs as a graceful fallback). Never invokes pack rebuild or any model call.
|
|
30
|
-
*/
|
|
31
22
|
export async function loadTriWikiRuntimeContext(root) {
|
|
32
23
|
const file = path.join(path.resolve(root), TRIWIKI_CONTEXT_PACK_REL);
|
|
33
24
|
let pack = null;
|
|
@@ -69,7 +60,6 @@ export async function loadTriWikiRuntimeContext(root) {
|
|
|
69
60
|
warning: null
|
|
70
61
|
};
|
|
71
62
|
}
|
|
72
|
-
/** Compact instruction block injected into read-only agents / route additionalContext. */
|
|
73
63
|
export function triWikiContextBlock(ctx) {
|
|
74
64
|
if (!ctx.present)
|
|
75
65
|
return `TriWiki unavailable: ${ctx.warning || 'context pack missing or invalid'}; do not rely on cached project memory.`;
|
|
@@ -82,7 +72,6 @@ export function triWikiContextBlock(ctx) {
|
|
|
82
72
|
hyd.length ? `hydrate_first (verify source before risky/user-visible actions): ${hyd.join(', ')}` : 'hydrate_first: none'
|
|
83
73
|
].join('\n');
|
|
84
74
|
}
|
|
85
|
-
/** Proof fields recorded by the kernel/route so its proof references the wiki it acted on. */
|
|
86
75
|
export function triWikiProofRecord(ctx) {
|
|
87
76
|
return {
|
|
88
77
|
triwiki_context_consulted: ctx.present,
|
|
@@ -95,7 +84,6 @@ export function triWikiProofRecord(ctx) {
|
|
|
95
84
|
warning: ctx.warning
|
|
96
85
|
};
|
|
97
86
|
}
|
|
98
|
-
/** Persist the consulted TriWiki context as a per-mission proof artifact. */
|
|
99
87
|
export async function writeTriWikiContextArtifact(ledgerRoot, ctx) {
|
|
100
88
|
const file = path.join(path.resolve(ledgerRoot), 'agent-triwiki-context.json');
|
|
101
89
|
await ensureDir(path.dirname(file));
|
|
@@ -65,10 +65,6 @@ async function writeWrongnessLedgerUnlocked(root, ledger) {
|
|
|
65
65
|
export async function readCombinedWrongnessRecords(root, missionId = null) {
|
|
66
66
|
const project = await readWrongnessLedger(root, null);
|
|
67
67
|
const mission = missionId ? await readWrongnessLedger(root, missionId) : emptyWrongnessLedger('mission', missionId);
|
|
68
|
-
// The project ledger is also the cross-mission index, so it contains copies
|
|
69
|
-
// of mission-scoped records. A mission proof must inherit only truly global
|
|
70
|
-
// project records plus rows owned by that mission; otherwise unrelated old
|
|
71
|
-
// missions can block every future route forever.
|
|
72
68
|
const projectRecords = missionId
|
|
73
69
|
? project.records.filter((record) => !record.mission_id || record.mission_id === missionId)
|
|
74
70
|
: project.records;
|
|
@@ -115,9 +111,6 @@ export async function resolveWrongnessRecord(root, id, reason = 'Resolved after
|
|
|
115
111
|
const changedMissions = new Set();
|
|
116
112
|
let updated = 0;
|
|
117
113
|
for (const missionId of scopes) {
|
|
118
|
-
// Mutations must start from the writable base ledger. The project reader also
|
|
119
|
-
// overlays shared shards, and writing that combined view would duplicate every
|
|
120
|
-
// shared record into the project ledger.
|
|
121
114
|
const ledger = await readBaseWrongnessLedger(root, missionId);
|
|
122
115
|
let changed = false;
|
|
123
116
|
const records = ledger.records.map((record) => {
|
|
@@ -149,9 +149,6 @@ export function createWrongnessRecord(input = {}) {
|
|
|
149
149
|
...(row.compiled_rule_id === undefined ? {} : { compiled_rule_id: stringOrNull(row.compiled_rule_id) })
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
/** Best-effort module attribution from the wrongness's linked files. Excludes the
|
|
153
|
-
* 'unknown' sentinel moduleIdsForPath returns for unmapped paths, so a record only
|
|
154
|
-
* carries module_ids when at least one file maps to a real TriWiki module. */
|
|
155
152
|
function moduleIdsForWrongness(files) {
|
|
156
153
|
const ids = new Set();
|
|
157
154
|
for (const file of files) {
|
|
@@ -54,13 +54,6 @@ export async function latestTrustReport(root, missionArg = 'latest') {
|
|
|
54
54
|
return staleTrustReport(report, temporalIssues);
|
|
55
55
|
}
|
|
56
56
|
if (!proof) {
|
|
57
|
-
// Persist this computed report even though it's a blocked result: `trust report`
|
|
58
|
-
// is expected to leave a durable trust-report.json behind for anyone (a human or
|
|
59
|
-
// a later `sks trust report <mission>` call) to inspect, the same way the
|
|
60
|
-
// completion-proof-present path below does via writeTrustArtifactsForProof(). An
|
|
61
|
-
// in-memory-only "blocked" result that vanishes after this call returns is
|
|
62
|
-
// surprising and was the reason `sks trust report latest --json` could exit 0
|
|
63
|
-
// with a blocked status yet leave no artifact on disk.
|
|
64
57
|
const report = {
|
|
65
58
|
schema: TRUST_REPORT_SCHEMA,
|
|
66
59
|
...trustKernelMetadata(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fsp from 'node:fs/promises';
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import { ensureDir, exists, globalSksRoot, nowIso, packageRoot, PACKAGE_VERSION, projectRoot, readJson, readText, runProcess, sha256, which, writeJsonAtomic, writeReceiptRotated, writeTextAtomic } from '../fsx.js';
|
|
4
|
+
import { ensureDir, exists, globalSksRoot, nowIso, packageRoot, PACKAGE_VERSION, projectRoot, readJson, readText, runProcess, sameFilesystemPath, sha256, which, writeJsonAtomic, writeReceiptRotated, writeTextAtomic } from '../fsx.js';
|
|
5
5
|
import { MANAGED_ASSET_VERSION } from '../managed-assets/managed-assets-manifest.js';
|
|
6
6
|
import { enforceRetention } from '../retention.js';
|
|
7
7
|
import { COMMANDS } from '../../cli/command-registry.js';
|
|
@@ -83,8 +83,6 @@ export async function writePendingUpdateMigration(input) {
|
|
|
83
83
|
return receipt;
|
|
84
84
|
}
|
|
85
85
|
export async function clearPendingUpdateMigration() {
|
|
86
|
-
// v2 keeps a persistent installation epoch; project receipts are compared
|
|
87
|
-
// independently and one project must not consume global migration state.
|
|
88
86
|
}
|
|
89
87
|
export async function writeProjectUpdateMigrationReceipt(input) {
|
|
90
88
|
const receiptPath = projectUpdateMigrationReceiptPath(input.root);
|
|
@@ -341,10 +339,23 @@ async function runSessionStateSplitStage(root) {
|
|
|
341
339
|
}
|
|
342
340
|
async function runSkillsReconcileStage(root) {
|
|
343
341
|
const home = path.resolve(process.env.HOME || os.homedir());
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
const
|
|
342
|
+
const globalTarget = path.resolve(home, '.agents', 'skills');
|
|
343
|
+
const projectTarget = path.resolve(root, '.agents', 'skills');
|
|
344
|
+
const global = await reconcileSkills({ targetDir: globalTarget, scope: 'global', fix: true })
|
|
347
345
|
.catch((err) => ({ ok: false, error: err?.message || String(err) }));
|
|
346
|
+
const sameSkillRoot = await sameFilesystemPath(projectTarget, globalTarget);
|
|
347
|
+
const project = sameSkillRoot
|
|
348
|
+
? {
|
|
349
|
+
schema: 'sks.skill-reconcile.v1',
|
|
350
|
+
ok: true,
|
|
351
|
+
scope: 'project',
|
|
352
|
+
target_dir: projectTarget,
|
|
353
|
+
fix: true,
|
|
354
|
+
skipped: true,
|
|
355
|
+
reason: 'same_as_authoritative_global_skill_root'
|
|
356
|
+
}
|
|
357
|
+
: await reconcileSkills({ targetDir: projectTarget, scope: 'project', fix: true })
|
|
358
|
+
.catch((err) => ({ ok: false, error: err?.message || String(err) }));
|
|
348
359
|
const globalRemaining = Number(global.retired_residue?.remaining_count || 0);
|
|
349
360
|
const projectRemaining = Number(project.retired_residue?.remaining_count || 0);
|
|
350
361
|
const blockers = [
|
|
@@ -356,7 +367,10 @@ async function runSkillsReconcileStage(root) {
|
|
|
356
367
|
return {
|
|
357
368
|
ok: blockers.length === 0,
|
|
358
369
|
status: blockers.length ? 'failed' : 'ok',
|
|
359
|
-
actions: [
|
|
370
|
+
actions: [
|
|
371
|
+
'reconciled_global_skills',
|
|
372
|
+
sameSkillRoot ? 'skipped_project_skills_same_as_global' : 'reconciled_project_skills'
|
|
373
|
+
],
|
|
360
374
|
blockers,
|
|
361
375
|
warnings: [],
|
|
362
376
|
detail: {
|
|
@@ -500,11 +514,6 @@ function insertTopLevelTomlKey(text, line) {
|
|
|
500
514
|
return `${raw.slice(0, firstTable).trimEnd()}\n${line}\n\n${raw.slice(firstTable).trimStart()}`.trim() + '\n';
|
|
501
515
|
}
|
|
502
516
|
function normalizeLegacyFastModeConfigForUpdate(text) {
|
|
503
|
-
// 2026-07 ChatGPT desktop merge: default_profile, [user.fast_mode], and
|
|
504
|
-
// [profiles.<name>] tables left the Codex config schema. This migration now
|
|
505
|
-
// STRIPS the stamps older SKS versions wrote instead of normalizing them, and
|
|
506
|
-
// preserves a legacy "fast default" semantically by writing the documented
|
|
507
|
-
// top-level service_tier = "fast" in their place.
|
|
508
517
|
let next = String(text || '');
|
|
509
518
|
const actions = [];
|
|
510
519
|
const misplaced = tomlTableString(next, 'user.fast_mode', 'default_profile');
|
|
@@ -652,17 +661,9 @@ export async function ensureCurrentMigrationBeforeCommand(input) {
|
|
|
652
661
|
if (input.skipMigrationGate === true || commandSkipsMigrationGate(command)) {
|
|
653
662
|
return { ...empty, ok: true, status: 'skipped', receipt: null, doctor: null, failed_stage_id: null, blockers: [], warnings: [`skip_migration_gate_command:${command}`] };
|
|
654
663
|
}
|
|
655
|
-
// projectRoot() falls back to the raw cwd when no project marker is found.
|
|
656
|
-
// launchd-spawned callers (the SKS menu bar app) run with cwd=/ — there is
|
|
657
|
-
// no project to migrate there, and proceeding would mkdir /.sneakoscope and
|
|
658
|
-
// crash the whole command before it starts.
|
|
659
664
|
if (root === path.parse(root).root) {
|
|
660
665
|
return { ...empty, ok: true, status: 'skipped', receipt: null, doctor: null, failed_stage_id: null, blockers: [], warnings: ['no_project_workspace_at_filesystem_root'] };
|
|
661
666
|
}
|
|
662
|
-
// A git repository is not automatically an SKS project. Global Codex skills
|
|
663
|
-
// (including DFix) may run in ordinary repositories, and route-local state or
|
|
664
|
-
// a stale failed migration receipt can leave a partial `.sneakoscope` folder
|
|
665
|
-
// behind. Only strong installed-project markers authorize project migration.
|
|
666
667
|
if (!(await hasSksProjectMigrationMarker(root))) {
|
|
667
668
|
return { ...empty, ok: true, status: 'skipped', receipt: null, doctor: null, failed_stage_id: null, blockers: [], warnings: ['non_sks_workspace_migration_gate_skipped'] };
|
|
668
669
|
}
|
|
@@ -970,10 +971,6 @@ export async function resolveInstalledSksEntrypoint(input = {}) {
|
|
|
970
971
|
}
|
|
971
972
|
return which('sks');
|
|
972
973
|
}
|
|
973
|
-
// 20차 P2-2: was 20s — --help now bypasses this gate entirely (cli/router.ts),
|
|
974
|
-
// so this timeout only affects commands that genuinely need the migration
|
|
975
|
-
// gate; 5s is enough to cooperate with a sibling in-flight migration without
|
|
976
|
-
// making every gated command absorb a 20s worst case.
|
|
977
974
|
const MIGRATION_LOCK_WAIT_MS = 5_000;
|
|
978
975
|
const MIGRATION_LOCK_POLL_MS = 150;
|
|
979
976
|
const MIGRATION_LOCK_PROGRESS_INTERVAL_MS = 1_000;
|
|
@@ -986,8 +983,6 @@ async function withUpdateMigrationLock(root, base, fn, options = {}) {
|
|
|
986
983
|
await ensureDir(path.dirname(lockPath));
|
|
987
984
|
}
|
|
988
985
|
catch (err) {
|
|
989
|
-
// An unwritable root (read-only mount, cwd outside any workspace) must fail
|
|
990
|
-
// the gate with a reportable blocker, not crash the whole CLI dispatch.
|
|
991
986
|
return { ...base, ok: false, status: 'blocked', receipt: null, doctor: null, failed_stage_id: 'migration-lock', blockers: [`update_migration_lock_dir_unwritable:${err?.message || String(err)}`], warnings: [] };
|
|
992
987
|
}
|
|
993
988
|
const recheck = options.recheck ?? null;
|
|
@@ -1004,19 +999,15 @@ async function withUpdateMigrationLock(root, base, fn, options = {}) {
|
|
|
1004
999
|
if (err?.code !== 'EEXIST') {
|
|
1005
1000
|
return { ...base, ok: false, status: 'blocked', receipt: null, doctor: null, failed_stage_id: 'migration-lock', blockers: [`update_migration_lock_error:${err?.message || String(err)}`], warnings: [] };
|
|
1006
1001
|
}
|
|
1007
|
-
// The lock is held by a concurrent process. Cooperate instead of failing fast:
|
|
1008
|
-
// 1) a sibling may have already completed the migration we need.
|
|
1009
1002
|
if (recheck) {
|
|
1010
1003
|
const done = await recheck();
|
|
1011
1004
|
if (done)
|
|
1012
1005
|
return done;
|
|
1013
1006
|
}
|
|
1014
|
-
// 2) reap a genuinely stale lock (dead holder or older than the stale threshold).
|
|
1015
1007
|
if (!reapedStale && await removeStaleMigrationLock(lockPath)) {
|
|
1016
1008
|
reapedStale = true;
|
|
1017
1009
|
continue;
|
|
1018
1010
|
}
|
|
1019
|
-
// 3) wait for the in-flight holder to finish, then retry acquisition.
|
|
1020
1011
|
if (Date.now() < deadline) {
|
|
1021
1012
|
const now = Date.now();
|
|
1022
1013
|
if (now - lastProgressAt >= MIGRATION_LOCK_PROGRESS_INTERVAL_MS) {
|
|
@@ -1026,7 +1017,6 @@ async function withUpdateMigrationLock(root, base, fn, options = {}) {
|
|
|
1026
1017
|
await delay(MIGRATION_LOCK_POLL_MS);
|
|
1027
1018
|
continue;
|
|
1028
1019
|
}
|
|
1029
|
-
// 4) gave up waiting on a live holder.
|
|
1030
1020
|
return { ...base, ok: false, status: 'blocked', receipt: null, doctor: null, failed_stage_id: 'migration-lock', blockers: ['update_migration_lock_held'], warnings: [] };
|
|
1031
1021
|
}
|
|
1032
1022
|
try {
|
|
@@ -1044,14 +1034,6 @@ async function withUpdateMigrationLock(root, base, fn, options = {}) {
|
|
|
1044
1034
|
}
|
|
1045
1035
|
const DOCTOR_MIGRATION_REPORT_KEEP_COUNT = 10;
|
|
1046
1036
|
const DOCTOR_MIGRATION_REPORT_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1000;
|
|
1047
|
-
// A now-unused legacy naming scheme (doctor-migration-<epoch>.json per run,
|
|
1048
|
-
// one per migration-gate doctor invocation) left ~80 files/several MB of
|
|
1049
|
-
// dead weight in .sneakoscope/update/ with nothing ever removing them
|
|
1050
|
-
// (20차 P2-5c) — the current code writes a single fixed doctor-migration.json
|
|
1051
|
-
// instead, but any leftovers from before that change, or from any other
|
|
1052
|
-
// path that reintroduces per-run naming, are pruned here: keep the most
|
|
1053
|
-
// recent DOCTOR_MIGRATION_REPORT_KEEP_COUNT, and nothing older than
|
|
1054
|
-
// DOCTOR_MIGRATION_REPORT_MAX_AGE_MS regardless of count.
|
|
1055
1037
|
async function pruneLegacyDoctorMigrationReports(root) {
|
|
1056
1038
|
const dir = path.join(root, '.sneakoscope', 'update');
|
|
1057
1039
|
const entries = await fsp.readdir(dir, { withFileTypes: true }).catch(() => []);
|
|
@@ -784,12 +784,6 @@ export function menuBarInstallIsTerminalUncertain(result) {
|
|
|
784
784
|
}
|
|
785
785
|
async function runUpdateGlobalSkillsReconcile(stage, opts = {}) {
|
|
786
786
|
const targetDir = path.join(opts.env?.HOME || os.homedir(), '.agents', 'skills');
|
|
787
|
-
// reconcileSkills stamps ~/.agents/skills/.sks-generated.json with the
|
|
788
|
-
// PACKAGE_VERSION compiled into whichever module runs it. This function
|
|
789
|
-
// executes inside the OLD (driver) binary, so after a real version install
|
|
790
|
-
// an in-process reconcile would overwrite the manifest the new binary's
|
|
791
|
-
// migration doctor just wrote and make final self-verification report
|
|
792
|
-
// skills_manifest stale forever. Delegate to the freshly installed package.
|
|
793
787
|
if (opts.newPackageRoot) {
|
|
794
788
|
const moduleHref = pathToFileURL(path.join(opts.newPackageRoot, 'dist', 'core', 'init', 'skills.js')).href;
|
|
795
789
|
const script = [
|
|
@@ -810,7 +804,7 @@ async function runUpdateGlobalSkillsReconcile(stage, opts = {}) {
|
|
|
810
804
|
parsed = JSON.parse(line);
|
|
811
805
|
break;
|
|
812
806
|
}
|
|
813
|
-
catch {
|
|
807
|
+
catch { }
|
|
814
808
|
}
|
|
815
809
|
const ok = run.code === 0 && parsed?.ok !== false && !parsed?.error;
|
|
816
810
|
stage('global_skills_reconcile', ok, ok ? 'reconciled' : 'failed', {
|
|
@@ -844,9 +838,6 @@ async function runUpdateNativeCapabilitySetup(stage, opts) {
|
|
|
844
838
|
}
|
|
845
839
|
const root = opts.root;
|
|
846
840
|
const moduleHref = (rel) => pathToFileURL(path.join(opts.newPackageRoot, 'dist', 'core', 'doctor', rel)).href;
|
|
847
|
-
// Same as global_skills_reconcile above: run the newly installed package's own
|
|
848
|
-
// modules in a subprocess rather than in-process, so an old (pre-update) driver
|
|
849
|
-
// binary never runs post-update repair logic with stale compiled-in behavior.
|
|
850
841
|
const script = [
|
|
851
842
|
`const [{ repairCodexImagegen }, { repairComputerUse }, { repairBrowserUse }] = await Promise.all([import(${JSON.stringify(moduleHref('imagegen-repair.js'))}), import(${JSON.stringify(moduleHref('computer-use-repair.js'))}), import(${JSON.stringify(moduleHref('browser-use-repair.js'))})]);`,
|
|
852
843
|
`const root = ${JSON.stringify(root)};`,
|
|
@@ -867,13 +858,10 @@ async function runUpdateNativeCapabilitySetup(stage, opts) {
|
|
|
867
858
|
parsed = JSON.parse(line);
|
|
868
859
|
break;
|
|
869
860
|
}
|
|
870
|
-
catch {
|
|
861
|
+
catch { }
|
|
871
862
|
}
|
|
872
863
|
const summarize = (r) => (r?.recovered === true || r?.ok === true ? 'ok' : r?.attempted ? 'blocked' : 'not-needed');
|
|
873
864
|
const ok = run.code === 0 && Boolean(parsed);
|
|
874
|
-
// A repair reporting 'blocked' (e.g. no verified CLI subcommand for a plugin
|
|
875
|
-
// install) is a valid, honest terminal state for this stage, not a stage
|
|
876
|
-
// failure — the update itself must not be blocked on a manual-only step.
|
|
877
865
|
stage('native_capability_setup', ok, ok ? 'completed' : 'failed', {
|
|
878
866
|
via: 'new_package_binary',
|
|
879
867
|
summary: ok
|
|
@@ -358,6 +358,8 @@ async function syncSourcePackageVersion(root, version) {
|
|
|
358
358
|
{
|
|
359
359
|
rel: 'docs/release-readiness.md',
|
|
360
360
|
replace: (text) => text
|
|
361
|
+
.replace(/^# SKS \d+\.\d+\.\d+ Release Readiness$/m, `# SKS ${version} Release Readiness`)
|
|
362
|
+
.replace(/(`sneakoscope`\r?\n)\d+\.\d+\.\d+\. The current package version on this branch is \d+\.\d+\.\d+\./m, (_match, prefix) => `${prefix}${version}. The current package version on this branch is ${version}.`)
|
|
361
363
|
.replace(/^SKS \d+\.\d+\.\d+ is ready/m, `SKS ${version} is ready`)
|
|
362
364
|
.replace(/^Codex 0\.142 references later in this document are historical release records and cannot authorize the \d+\.\d+\.\d+ release\./m, `Codex 0.142 references later in this document are historical release records and cannot authorize the ${version} release.`)
|
|
363
365
|
.replace(/^\d+\.\d+\.\d+ release readiness requires/m, `${version} release readiness requires`)
|
package/dist/core/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = '7.0.
|
|
1
|
+
export const PACKAGE_VERSION = '7.0.3';
|
|
@@ -89,11 +89,6 @@ export function updateWorkOrderItem(ledger, id, patch = {}) {
|
|
|
89
89
|
})
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
/**
|
|
93
|
-
* Parses a free-form work-order prompt into WO-001..N ledger items (via
|
|
94
|
-
* promptRequirementItems) and persists the ledger at mission creation time,
|
|
95
|
-
* so every item is registered verbatim before any execution starts.
|
|
96
|
-
*/
|
|
97
92
|
export async function createAndWriteWorkOrderLedgerForPrompt(dir, { missionId, route, prompt } = {}) {
|
|
98
93
|
const parsed = semanticSliceRequirementItems(String(prompt || '')) || promptRequirementItems(String(prompt || ''));
|
|
99
94
|
const { items, truncated } = parsed;
|
|
@@ -264,22 +259,10 @@ function stripSliceMarker(text) {
|
|
|
264
259
|
.replace(/\s+/g, ' ')
|
|
265
260
|
.trim();
|
|
266
261
|
}
|
|
267
|
-
/**
|
|
268
|
-
* Closes out every item in a mission's ledger to a terminal state once the
|
|
269
|
-
* route's own gate has decided ok/not-ok, so evaluateStop's coverage gate
|
|
270
|
-
* (which blocks stop while any item sits in 'pending') can never wait
|
|
271
|
-
* forever: an item is either verified (route succeeded) or honestly
|
|
272
|
-
* blocked (route failed, real blockers recorded), never left hanging.
|
|
273
|
-
* This is coarser than true per-item tracking, but it closes the loop.
|
|
274
|
-
*/
|
|
275
262
|
export async function closeWorkOrderLedgerForRouteResult(dir, { ok, blockers = [], allowAttachmentBulkClose = false }) {
|
|
276
263
|
const ledger = await readWorkOrderLedger(dir);
|
|
277
264
|
if (!ledger || !Array.isArray(ledger.items) || ledger.items.length === 0)
|
|
278
265
|
return null;
|
|
279
|
-
// Attachment-backed ledgers can represent a release work order with many
|
|
280
|
-
// independently authorized and independently verified requirements. A
|
|
281
|
-
// single route gate is not evidence that every attachment slice passed (or
|
|
282
|
-
// that post-main/2FA work occurred), so preserve per-item truth by default.
|
|
283
266
|
if (!allowAttachmentBulkClose && ledger.items.some((item) => item?.source?.type === 'attachment')) {
|
|
284
267
|
return ledger;
|
|
285
268
|
}
|
|
@@ -1,22 +1,9 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { ensureDir, nowIso, writeTextAtomic } from '../fsx.js';
|
|
3
|
-
// Single source of truth for the Zellij clipboard pipeline used by `sks --mad`
|
|
4
|
-
// (and any other SKS-launched Zellij session). By default Zellij copies via the
|
|
5
|
-
// OSC 52 escape sequence, which several macOS terminals (Terminal.app always,
|
|
6
|
-
// some iTerm2 configs) silently drop. Setting copy_command="pbcopy" keeps
|
|
7
|
-
// Zellij's copy action wired to the macOS clipboard.
|
|
8
|
-
//
|
|
9
|
-
// Keep Zellij mouse_mode on by default so trackpad/wheel gestures are handled by
|
|
10
|
-
// Zellij pane scrollback instead of being translated into prompt-history input
|
|
11
|
-
// inside the focused Codex TUI. Copy remains wired through copy_command/pbcopy
|
|
12
|
-
// plus copy_on_select; users who need terminal-native selection can hold Shift
|
|
13
|
-
// or opt out with SKS_ZELLIJ_MOUSE_MODE=0.
|
|
14
3
|
export const ZELLIJ_CLIPBOARD_CONFIG_SCHEMA = 'sks.zellij-clipboard-config.v1';
|
|
15
|
-
/** Pick the platform-correct clipboard command. macOS is the primary target. */
|
|
16
4
|
export function resolveCopyCommand(platform = process.platform, env = process.env) {
|
|
17
5
|
if (platform === 'darwin')
|
|
18
6
|
return 'pbcopy';
|
|
19
|
-
// Wayland sessions prefer wl-copy; fall back to xclip on X11. pbcopy is darwin-only.
|
|
20
7
|
if (env.WAYLAND_DISPLAY)
|
|
21
8
|
return 'wl-copy';
|
|
22
9
|
return 'xclip -selection clipboard';
|
|
@@ -24,7 +11,6 @@ export function resolveCopyCommand(platform = process.platform, env = process.en
|
|
|
24
11
|
function kdlString(value) {
|
|
25
12
|
return JSON.stringify(String(value || ''));
|
|
26
13
|
}
|
|
27
|
-
/** Render a minimal, valid Zellij config.kdl that enables clipboard copy. */
|
|
28
14
|
export function buildZellijClipboardKdl(cfg) {
|
|
29
15
|
return [
|
|
30
16
|
'// Generated by Sneakoscope (sks) so launched Zellij sessions copy to the OS clipboard.',
|
|
@@ -49,10 +35,6 @@ export async function writeZellijClipboardConfig(root, missionId, platform = pro
|
|
|
49
35
|
copy_clipboard,
|
|
50
36
|
copy_on_select,
|
|
51
37
|
mouse_mode,
|
|
52
|
-
// Appended AFTER `--default-layout <path>` in the create command. Zellij treats
|
|
53
|
-
// --copy-command as mutually exclusive with --copy-clipboard (OSC52 target), so
|
|
54
|
-
// only pass the command and copy-on-select flags on the CLI. The generated KDL
|
|
55
|
-
// still records copy_clipboard for config-file consumers that use OSC52.
|
|
56
38
|
optionFlags: ['--copy-command', copy_command, '--copy-on-select', String(copy_on_select), '--mouse-mode', String(mouse_mode)],
|
|
57
39
|
config_path,
|
|
58
40
|
generated_at: nowIso()
|
|
@@ -3,26 +3,14 @@ import { open, readdir, stat } from 'node:fs/promises';
|
|
|
3
3
|
import { appendJsonl, ensureDir, exists, nowIso, readJson, readText, writeJsonAtomic, writeTextAtomic } from '../fsx.js';
|
|
4
4
|
import { resolveFastModePolicy } from '../agents/fast-mode-policy.js';
|
|
5
5
|
export const ZELLIJ_LANE_RENDER_SCHEMA = 'sks.zellij-lane-render.v1';
|
|
6
|
-
// Default render width. Zellij panes are commonly 80/100/120 columns; the frame
|
|
7
|
-
// must stay readable (no wraps, no overflow) across that range.
|
|
8
6
|
export const ZELLIJ_LANE_DEFAULT_WIDTH = 80;
|
|
9
7
|
export const ZELLIJ_LANE_MAX_BLOCKERS = 3;
|
|
10
|
-
// Footer command palette. Every `sks ...` token here MUST be a real command
|
|
11
|
-
// (enforced by scripts/zellij-ui-design-check.mjs). `Ctrl+q` is a Zellij keybind.
|
|
12
8
|
export const ZELLIJ_LANE_FOOTER_KEYS = [
|
|
13
9
|
'Ctrl+q detach',
|
|
14
10
|
'sks doctor --fix',
|
|
15
11
|
'sks zellij status',
|
|
16
12
|
'sks naruto status'
|
|
17
13
|
];
|
|
18
|
-
// Canonical lane section sets (1.20.2 Area 5.2).
|
|
19
|
-
// ZELLIJ_LANE_SECTIONS is the full composed-frame superset the UI-design fixture
|
|
20
|
-
// gate enforces. ZELLIJ_SCREEN_SCRAPEABLE_SECTIONS is the strict SUBSET that the
|
|
21
|
-
// runtime screen-proof reliably scrapes from a live terminal — the 7 extra
|
|
22
|
-
// sections (Fast, Codex child, Work, Patch, Lease, Protected, Rollback) are
|
|
23
|
-
// detail rows that may be elided/wrapped on a real pane, so requiring them in
|
|
24
|
-
// the live screen-proof would make it flaky. The subset relationship is asserted
|
|
25
|
-
// by zellij:doctor-readiness so the two layers can never silently diverge.
|
|
26
14
|
export const ZELLIJ_LANE_SECTIONS = [
|
|
27
15
|
'SKS Lane', 'Mission', 'Mode', 'Fast', 'Workers', 'Codex child', 'Work', 'Current',
|
|
28
16
|
'Queue', 'Patch', 'Safety', 'Lease', 'Protected', 'Rollback', 'Blockers', 'Reports', 'Keys:'
|
|
@@ -31,10 +19,10 @@ export const ZELLIJ_SCREEN_SCRAPEABLE_SECTIONS = [
|
|
|
31
19
|
'SKS Lane', 'Mission', 'Mode', 'Workers', 'Current', 'Queue', 'Safety', 'Blockers', 'Reports', 'Keys:'
|
|
32
20
|
];
|
|
33
21
|
const STATUS_COLORS = {
|
|
34
|
-
ok: '[32m',
|
|
35
|
-
active: '[36m',
|
|
36
|
-
warning: '[33m',
|
|
37
|
-
blocked: '[31m'
|
|
22
|
+
ok: '[32m',
|
|
23
|
+
active: '[36m',
|
|
24
|
+
warning: '[33m',
|
|
25
|
+
blocked: '[31m'
|
|
38
26
|
};
|
|
39
27
|
const RESET = '[0m';
|
|
40
28
|
function colorEnabled(opts) {
|
|
@@ -49,8 +37,6 @@ function paint(text, status, enabled) {
|
|
|
49
37
|
return text;
|
|
50
38
|
return `${STATUS_COLORS[status]}${text}${RESET}`;
|
|
51
39
|
}
|
|
52
|
-
// Shorten a string to fit `max` visible chars, keeping head and tail (so long
|
|
53
|
-
// file paths stay recognizable). Pure on the visible (ANSI-free) string.
|
|
54
40
|
export function middleEllipsis(value, max) {
|
|
55
41
|
const text = String(value ?? '');
|
|
56
42
|
if (max <= 1)
|
|
@@ -59,7 +45,7 @@ export function middleEllipsis(value, max) {
|
|
|
59
45
|
return text;
|
|
60
46
|
if (max <= 3)
|
|
61
47
|
return text.slice(0, max);
|
|
62
|
-
const keep = max - 1;
|
|
48
|
+
const keep = max - 1;
|
|
63
49
|
const head = Math.ceil(keep / 2);
|
|
64
50
|
const tail = Math.floor(keep / 2);
|
|
65
51
|
return `${text.slice(0, head)}…${text.slice(text.length - tail)}`;
|
|
@@ -78,15 +64,6 @@ function statusFor(value) {
|
|
|
78
64
|
return 'ok';
|
|
79
65
|
return null;
|
|
80
66
|
}
|
|
81
|
-
/**
|
|
82
|
-
* Compose the lane frame from a plain view object. Pure (no IO) so gates can
|
|
83
|
-
* render it deterministically at multiple widths. Guarantees:
|
|
84
|
-
* - no rendered line exceeds `width`
|
|
85
|
-
* - long paths use middle-ellipsis
|
|
86
|
-
* - at most `maxBlockers` blockers shown; the rest point at the report artifact
|
|
87
|
-
* - color is applied only to status tokens, and only when enabled
|
|
88
|
-
* - readable with color stripped (screen-proof strips ANSI)
|
|
89
|
-
*/
|
|
90
67
|
export function composeLaneFrame(view, opts = {}) {
|
|
91
68
|
const width = Math.max(40, Number(opts.width || ZELLIJ_LANE_DEFAULT_WIDTH));
|
|
92
69
|
const maxBlockers = Math.max(1, Number(opts.maxBlockers || ZELLIJ_LANE_MAX_BLOCKERS));
|
|
@@ -136,7 +113,6 @@ export function composeLaneFrame(view, opts = {}) {
|
|
|
136
113
|
section('Reports');
|
|
137
114
|
lines.push(middleEllipsis(` proof: ${view.reports}`, width));
|
|
138
115
|
section('Keys');
|
|
139
|
-
// Footer: real commands only. Wrap onto multiple lines if needed for width.
|
|
140
116
|
let current = 'Keys:';
|
|
141
117
|
for (const key of ZELLIJ_LANE_FOOTER_KEYS) {
|
|
142
118
|
const candidate = current === 'Keys:' ? `${current} ${key}` : `${current} · ${key}`;
|
|
@@ -166,14 +142,6 @@ export async function renderZellijLaneFrame(opts) {
|
|
|
166
142
|
const laneJson = await readJson(path.join(laneDir, 'lane.json'), null);
|
|
167
143
|
const laneMd = await readText(path.join(laneDir, 'lane.md'), '');
|
|
168
144
|
const commandBus = await processZellijLaneCommandBus(root, slot);
|
|
169
|
-
// The persistent MAD/Naruto lane watches its OWN mission ledger, but the
|
|
170
|
-
// the internal worker runtime writes scheduler state to
|
|
171
|
-
// a separate mission ledger. When this lane's own ledger has no live scheduler
|
|
172
|
-
// state, mirror the most-recent active agent mission so the lane reflects real
|
|
173
|
-
// parallel work instead of a permanent "Workers idle". Artifacts/heartbeat still
|
|
174
|
-
// write to the requested `root` so launch/heartbeat gates are unaffected; only the
|
|
175
|
-
// displayed lane state is sourced from `dataRoot`. Disable with
|
|
176
|
-
// SKS_LANE_FOLLOW_ACTIVE_MISSION=0.
|
|
177
145
|
const dataRoot = await resolveActiveLedgerRoot(root);
|
|
178
146
|
const laneState = await buildLaneState(dataRoot, slot, laneJson);
|
|
179
147
|
const baseLaneNote = laneMd
|
|
@@ -353,14 +321,12 @@ async function buildLaneState(root, slot, laneJson) {
|
|
|
353
321
|
firstPatchFile(apply),
|
|
354
322
|
firstPatchFile(verify)
|
|
355
323
|
]) || 'none';
|
|
356
|
-
// Mode: Work / MAD-SKS / Naruto. Prefer explicit lane/scheduler hints.
|
|
357
324
|
const mode = firstString([
|
|
358
325
|
laneJson?.mode,
|
|
359
326
|
scheduler?.mode,
|
|
360
327
|
scheduler?.naruto_mode ? 'Naruto' : null,
|
|
361
328
|
runtime?.mode
|
|
362
329
|
]) || 'Work';
|
|
363
|
-
// Fast service tier.
|
|
364
330
|
const projectRoot = inferProjectRootFromLedgerRoot(root);
|
|
365
331
|
const policy = resolveFastModePolicy({ root: projectRoot });
|
|
366
332
|
const serviceTier = firstString([
|
|
@@ -380,7 +346,6 @@ async function buildLaneState(root, slot, laneJson) {
|
|
|
380
346
|
const fast = serviceTier === 'fast' || fastMode === true
|
|
381
347
|
? `on · service_tier=${serviceTier || 'fast'}`
|
|
382
348
|
: `off · service_tier=${serviceTier || 'standard'}`;
|
|
383
|
-
// Workers: live active/target plus the bounded worker total.
|
|
384
349
|
const workerTotal = numberOf([scheduler?.workers, scheduler?.worker_count, runtime?.workers]);
|
|
385
350
|
const activeWorkers = numberOf([scheduler?.active_worker_count, scheduler?.active_slot_count]);
|
|
386
351
|
const workers = [
|
|
@@ -389,7 +354,6 @@ async function buildLaneState(root, slot, laneJson) {
|
|
|
389
354
|
workerTotal ? `workers ${pad3(activeWorkers || 0)}/${pad3(workerTotal)}` : null,
|
|
390
355
|
scheduler ? `pending ${scheduler.pending_count ?? 'n/a'}` : null
|
|
391
356
|
].filter(Boolean).join(' · ') || 'idle';
|
|
392
|
-
// Codex child sessions.
|
|
393
357
|
const sessions = arrayFrom(runtime, ['sessions', 'workers', 'items']);
|
|
394
358
|
const codexChild = worker
|
|
395
359
|
? `live ${worker.status || 'observed'} · result ${worker.result_status || 'pending'}`
|
|
@@ -628,11 +592,6 @@ function firstDefined(values) {
|
|
|
628
592
|
}
|
|
629
593
|
return undefined;
|
|
630
594
|
}
|
|
631
|
-
// Follow the freshest ledger that has actual native worker session data. A lane's
|
|
632
|
-
// own mission can have a scheduler placeholder while the native/Naruto worker
|
|
633
|
-
// runtime writes logs into a sibling agent ledger; showing the placeholder makes
|
|
634
|
-
// the right panes look disconnected. Pure read; never mutates. Returns the
|
|
635
|
-
// original root when nothing better is found or when disabled.
|
|
636
595
|
async function resolveActiveLedgerRoot(ledgerRoot) {
|
|
637
596
|
if (process.env.SKS_LANE_FOLLOW_ACTIVE_MISSION === '0')
|
|
638
597
|
return ledgerRoot;
|
|
@@ -172,7 +172,6 @@ export function extractZellijPaneIdFromOutput(text) {
|
|
|
172
172
|
return String(paneId).trim();
|
|
173
173
|
}
|
|
174
174
|
catch {
|
|
175
|
-
// Fall through to line-based parsing.
|
|
176
175
|
}
|
|
177
176
|
const lines = raw.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
|
|
178
177
|
for (const line of lines.slice().reverse()) {
|