sneakoscope 7.0.0 → 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 +69 -17
- 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 +74 -6
- 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 +582 -14
- 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 +351 -38
- 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/AlertFactory.swift +21 -2
- package/dist/native/sks-menubar/Sources/AppDelegate.swift +3 -0
- package/dist/native/sks-menubar/Sources/AppIdentity.swift +25 -0
- package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +254 -21
- 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
|
@@ -5,9 +5,6 @@ import { exists, runProcess } from '../fsx.js';
|
|
|
5
5
|
import { commandContract, outputCapFor, timeoutFor, validateJsonSchema } from '../safety/command-contract/index.js';
|
|
6
6
|
const MCP_SERVER_NAME = 'sks-mcp-server';
|
|
7
7
|
const MCP_SERVER_VERSION = '1.0.0';
|
|
8
|
-
// Same dynamic-import trick as the MAD-SKS SQL-plane MCP executor: avoids TS
|
|
9
|
-
// bundling the SDK's ESM entrypoints as a static import target this file must
|
|
10
|
-
// resolve at compile time, while still using the real installed SDK.
|
|
11
8
|
async function loadMcpSdk() {
|
|
12
9
|
const dynamicImport = new Function('specifier', 'return import(specifier)');
|
|
13
10
|
const [{ Server }, { StdioServerTransport }, types] = await Promise.all([
|
|
@@ -40,8 +37,6 @@ function toMcpToolDescriptor(entry) {
|
|
|
40
37
|
};
|
|
41
38
|
}
|
|
42
39
|
async function resolveSksEntrypoint() {
|
|
43
|
-
// Mirrors src/core/commands/run-command.ts's runSks() bin resolution: prefer the
|
|
44
|
-
// packaged dist entrypoint, fall back to the source-tree relative path in dev.
|
|
45
40
|
const packedBin = fileURLToPath(new URL('../../bin/sks.js', import.meta.url));
|
|
46
41
|
const sourceBin = fileURLToPath(new URL('../../../bin/sks.js', import.meta.url));
|
|
47
42
|
return (await exists(packedBin)) ? packedBin : sourceBin;
|
|
@@ -108,8 +103,6 @@ export async function runMcpServer(opts = {}) {
|
|
|
108
103
|
const toolName = String(request?.params?.name || '');
|
|
109
104
|
const manifest = buildAgentManifest();
|
|
110
105
|
const allowed = exposedTools(manifest.tools, exposeExec);
|
|
111
|
-
// Never spawn a child process for a name the caller invented; only names present
|
|
112
|
-
// in the (possibly exec-filtered) manifest are legitimate `sks <name>` invocations.
|
|
113
106
|
const entry = allowed.find((candidate) => candidate.name === toolName);
|
|
114
107
|
if (!entry) {
|
|
115
108
|
return mcpToolErrorResult(`Unknown or unexposed tool: ${toolName}`);
|
|
@@ -137,9 +130,6 @@ export async function runMcpServer(opts = {}) {
|
|
|
137
130
|
const transport = new StdioServerTransport(input, output);
|
|
138
131
|
await server.connect(transport);
|
|
139
132
|
}
|
|
140
|
-
/** Round-trips initialize -> tools/list over in-memory streams and returns, instead of
|
|
141
|
-
* staying resident on real stdio — this is what `sks mcp-server --probe` runs, so a
|
|
142
|
-
* fixture/CI check can prove the server actually works without hanging on a real client. */
|
|
143
133
|
export async function probeMcpServer(opts = {}) {
|
|
144
134
|
const { PassThrough } = await import('node:stream');
|
|
145
135
|
const clientToServer = new PassThrough();
|
|
@@ -156,7 +146,7 @@ export async function probeMcpServer(opts = {}) {
|
|
|
156
146
|
try {
|
|
157
147
|
responses.push(JSON.parse(line));
|
|
158
148
|
}
|
|
159
|
-
catch {
|
|
149
|
+
catch { }
|
|
160
150
|
}
|
|
161
151
|
}
|
|
162
152
|
});
|
|
@@ -62,9 +62,6 @@ export function decideAgentEffort(input = {}) {
|
|
|
62
62
|
]
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
// Official Codex subagents use one of four fixed profiles: Luna Max for tiny
|
|
66
|
-
// mechanical work, Sol High for ordinary implementation, Sol Max for
|
|
67
|
-
// judgment, and Terra Medium for long-context or Codex-tool execution.
|
|
68
65
|
export function decideOfficialSubagentModel(input = {}) {
|
|
69
66
|
const persona = input.persona || {};
|
|
70
67
|
const prompt = String(input.prompt || '');
|
|
@@ -83,8 +83,6 @@ export async function runNativeAgentOrchestrator(opts = {}) {
|
|
|
83
83
|
await setCurrent(root, { mission_id: missionId, mode: 'WORKER_RUNTIME', phase: 'WORKER_RUNTIME_UNSUPPORTED_ARGUMENT', route_command: routeCommand, requested_backend: requestedBackend, updated_at: nowIso() }, { sessionKey });
|
|
84
84
|
return unsupportedBackendRun({ root, missionId, dir, route, routeCommand, routeBlackboxKind, requestedBackend });
|
|
85
85
|
}
|
|
86
|
-
// Route start: consult this route's deployed Core Skill snapshot (read-only).
|
|
87
|
-
// Graceful fallback when none is deployed — zero-risk, never invokes the optimizer.
|
|
88
86
|
const routeSkillSelection = await selectRouteSkill(root, route, routeSkillId(route)).catch(() => null);
|
|
89
87
|
const selectedCoreSkill = routeSkillSelection ? skillProofRecord(routeSkillSelection) : null;
|
|
90
88
|
const namespace = await buildProjectNamespace({ root, missionId });
|
|
@@ -227,8 +225,6 @@ export async function runNativeAgentOrchestrator(opts = {}) {
|
|
|
227
225
|
}
|
|
228
226
|
await runAgentJanitor({ missionDir: dir, missionId, projectHash: namespace.root_hash });
|
|
229
227
|
const ledgerRoot = await initializeAgentCentralLedger(dir, { missionId, roster, partition, route, prompt, dynamicScheduler: true });
|
|
230
|
-
// Consult the TriWiki context pack (read-only) before dispatching workers, and
|
|
231
|
-
// persist it as a proof artifact so the kernel proof references the wiki it acted on.
|
|
232
228
|
const triwikiContext = await loadTriWikiRuntimeContext(root);
|
|
233
229
|
await writeTriWikiContextArtifact(ledgerRoot, triwikiContext);
|
|
234
230
|
if (opts.narutoWorkGraph?.work_items?.length) {
|
|
@@ -233,8 +233,6 @@ export async function writeAgentProofEvidence(root, input) {
|
|
|
233
233
|
backend: input.backend,
|
|
234
234
|
route,
|
|
235
235
|
route_command: routeCommand,
|
|
236
|
-
// Deployed Core Skill snapshot consulted at route start (read-only; never
|
|
237
|
-
// confers mutation rights). Null when no snapshot is deployed for this route.
|
|
238
236
|
selected_core_skill: input.selectedCoreSkill || null,
|
|
239
237
|
git_worktree_runtime: gitWorktreeRuntime,
|
|
240
238
|
route_blackbox_kind: input.routeBlackboxKind || (realRouteCommandUsed ? 'actual_route_command' : 'internal_worker_runtime'),
|
|
@@ -142,9 +142,6 @@ export function classifyOllamaWorkerSlice(slice, input = {}) {
|
|
|
142
142
|
const collection = /\b(collect|gather|extract|inventory|list|scan|grep|tail|summarize|catalog)\b|수집|추출|목록|스캔|인벤토리/i.test(text);
|
|
143
143
|
const coding = /\b(code|implement|patch|write|edit|fix|mechanical|simple)\b|코드|작성|수정|구현|패치|단순/i.test(text);
|
|
144
144
|
const banned = /\b(strategy|strategize|planning|plan|architecture|architect|design|review|verify|verification|audit|inspect|safety|risk|consensus|debate|orchestrate|policy|decide|decision|migration|database|schema)\b|전략|기획|설계|디자인|검증|검수|리뷰|감사|안전|위험|합의|토론|결정|마이그레이션|데이터베이스/i.test(text);
|
|
145
|
-
// Web research / external lookup must run on GPT, never on the local model:
|
|
146
|
-
// local LLMs hallucinate sources and cannot browse. This wins even over the
|
|
147
|
-
// collection allowlist (e.g. "web research and collect docs" stays on GPT).
|
|
148
145
|
const research = /\b(web|research|browse|browser|crawl|fetch docs|websearch|web search|search the web|investigate|context7)\b|웹|리서치|조사|웹서치|웹 ?검색|검색/i.test(text);
|
|
149
146
|
const allowed = !bannedRole && !banned && !research && (writePaths.length > 0 || collection || coding);
|
|
150
147
|
const blockers = [
|
|
@@ -144,11 +144,6 @@ export async function runAgentScheduler(input) {
|
|
|
144
144
|
batch_id: batchId,
|
|
145
145
|
meta: { launch_count: launches.length, active_count_before: active.size }
|
|
146
146
|
}).catch(() => undefined);
|
|
147
|
-
// Telemetry appends run concurrently across launches (per-slot ordering
|
|
148
|
-
// preserved inside each async chain). Awaiting these file writes in
|
|
149
|
-
// series before each dispatch serialized worker launch by 2 disk writes
|
|
150
|
-
// per slot — with 20 slots that is 40 sequential appends before the last
|
|
151
|
-
// worker even started.
|
|
152
147
|
const dispatchTelemetryWrites = [];
|
|
153
148
|
for (const launch of launches) {
|
|
154
149
|
const { slot, openedSlot, generation, agent, workItem } = launch;
|
|
@@ -170,6 +170,10 @@ class NativeCliWorkerRuntimeRecorder {
|
|
|
170
170
|
},
|
|
171
171
|
stdio: ['ignore', 'pipe', 'pipe']
|
|
172
172
|
});
|
|
173
|
+
const exitPromise = new Promise((resolve) => {
|
|
174
|
+
child.once('close', (code, signal) => resolve({ code, signal }));
|
|
175
|
+
child.once('error', () => resolve({ code: 1, signal: null }));
|
|
176
|
+
});
|
|
173
177
|
record.pid = child.pid || null;
|
|
174
178
|
record.process_id = child.pid || null;
|
|
175
179
|
const loopHandle = await registerLoopWorkerHandle({
|
|
@@ -202,10 +206,7 @@ class NativeCliWorkerRuntimeRecorder {
|
|
|
202
206
|
await this.record(record);
|
|
203
207
|
child.stdout?.pipe(stdout);
|
|
204
208
|
child.stderr?.pipe(stderr);
|
|
205
|
-
const exit = await
|
|
206
|
-
child.on('close', (code, signal) => resolve({ code, signal }));
|
|
207
|
-
child.on('error', () => resolve({ code: 1, signal: null }));
|
|
208
|
-
});
|
|
209
|
+
const exit = await exitPromise;
|
|
209
210
|
stdout.end();
|
|
210
211
|
stderr.end();
|
|
211
212
|
if (child.pid)
|
|
@@ -628,14 +629,6 @@ class NativeCliWorkerRuntimeRecorder {
|
|
|
628
629
|
artifacts: [...new Set([...(Array.isArray(parsed.artifacts) ? parsed.artifacts : []), input.stdoutRel, input.stderrRel, path.join(input.workerDirRel, 'zellij-worker-pane.json')])]
|
|
629
630
|
});
|
|
630
631
|
}
|
|
631
|
-
// Root-cause-2 fix: a fixed 2-minute wall-clock result timeout killed live codex-sdk
|
|
632
|
-
// workers (real runs exceed 2 min), marking false zellij_worker_result_timeout failures and
|
|
633
|
-
// freezing the UI while the worker kept running. Replace it with an activity-aware wait: keep
|
|
634
|
-
// waiting as long as ANY worker artifact (heartbeat, stdout/stderr, sdk event jsonl) was touched
|
|
635
|
-
// recently. Only give up after SKS_ZELLIJ_WORKER_INACTIVITY_TIMEOUT_MS of silence (default 5min)
|
|
636
|
-
// OR an absolute cap SKS_ZELLIJ_WORKER_RESULT_TIMEOUT_MS (default 1h; 0 = no cap). While waiting,
|
|
637
|
-
// emit a heartbeat telemetry event every ~10s so the SLOTS snapshot updated_at stays fresh from
|
|
638
|
-
// the orchestrator side too.
|
|
639
632
|
async waitForWorkerResultWithActivity(input) {
|
|
640
633
|
const inactivityTimeoutMs = Math.max(1000, Number(process.env.SKS_ZELLIJ_WORKER_INACTIVITY_TIMEOUT_MS || 300000));
|
|
641
634
|
const absoluteCapRaw = Number(process.env.SKS_ZELLIJ_WORKER_RESULT_TIMEOUT_MS ?? 3600000);
|
|
@@ -738,10 +731,6 @@ class NativeCliWorkerRuntimeRecorder {
|
|
|
738
731
|
summary() {
|
|
739
732
|
const closed = this.records.filter((row) => row.status === 'closed');
|
|
740
733
|
const processIds = this.records.map((row) => row.pid).filter((pid) => Number.isFinite(Number(pid)));
|
|
741
|
-
// Both pane-backed primitives count as zellij pane worker sessions: the
|
|
742
|
-
// worker command can run inside the pane (full-debug) or headless behind a
|
|
743
|
-
// live slot renderer pane (compact-slots default). Counting only the
|
|
744
|
-
// former under-reported pane sessions as 0 in the default UI mode.
|
|
745
734
|
const paneBackedRecords = this.records.filter((row) => row.scaling_primitive === 'native_cli_process_in_zellij_worker_pane'
|
|
746
735
|
|| row.scaling_primitive === 'native_cli_process_with_zellij_slot_renderer');
|
|
747
736
|
return {
|
|
@@ -848,7 +837,6 @@ async function newestMtimeMs(files) {
|
|
|
848
837
|
newest = mtime;
|
|
849
838
|
}
|
|
850
839
|
catch {
|
|
851
|
-
// missing file: no activity signal from it
|
|
852
840
|
}
|
|
853
841
|
}
|
|
854
842
|
return newest;
|
|
@@ -20,8 +20,6 @@ export async function collectRepoInventory(root, opts = {}) {
|
|
|
20
20
|
seen.add(file);
|
|
21
21
|
files.push(file);
|
|
22
22
|
};
|
|
23
|
-
// Seed representative source/test/docs entries before any large tree can
|
|
24
|
-
// exhaust the cap, then expand the priority roots in a stable order.
|
|
25
23
|
for (const name of REPRESENTATIVE_DIRS) {
|
|
26
24
|
const representative = await firstFile(root, path.join(root, name));
|
|
27
25
|
if (representative)
|
package/dist/core/auto-review.js
CHANGED
|
@@ -102,13 +102,6 @@ export async function enableAutoReview(opts = {}) {
|
|
|
102
102
|
launch_args: ['--profile', autoReviewProfileName({ high })]
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
// Canonical registry of every SKS config profile. Codex 0.134+ deprecated the
|
|
106
|
-
// `[profiles.*]` tables / top-level `profile=` selector (warns at startup) in favor of
|
|
107
|
-
// per-file `$CODEX_HOME/<name>.config.toml` overlays loaded by `--profile <name>`.
|
|
108
|
-
// `stripTable: true` => remove the legacy `[profiles.<name>]` table from the home
|
|
109
|
-
// config during migration. Fast mode now persists through top-level
|
|
110
|
-
// `service_tier = "fast"` and per-file overlays; `[user.fast_mode]`,
|
|
111
|
-
// `default_profile`, and `[profiles.sks-fast-high]` are stripped as legacy schema.
|
|
112
105
|
export const SKS_CONFIG_PROFILES = [
|
|
113
106
|
{ name: 'sks-task-low', stripTable: true, block: sksProfileFileBlock({ effort: 'low' }) },
|
|
114
107
|
{ name: 'sks-task-medium', stripTable: true, block: sksProfileFileBlock({ effort: 'medium' }) },
|
|
@@ -128,10 +121,6 @@ function sksProfileFileBlock(opts = {}) {
|
|
|
128
121
|
`model_reasoning_effort = "${opts.effort || 'medium'}"`
|
|
129
122
|
].join('\n');
|
|
130
123
|
}
|
|
131
|
-
// Migrate every SKS config profile to a per-file `<name>.config.toml` overlay in
|
|
132
|
-
// CODEX_HOME and strip the deprecated legacy `[profiles.sks-*]` tables / `profile=`
|
|
133
|
-
// selectors from the home config. Idempotent (second run is a no-op). This is the
|
|
134
|
-
// step that clears the Codex deprecation warning on `sks --mad`.
|
|
135
124
|
export async function migrateSksProfilesToPerFile(opts = {}) {
|
|
136
125
|
const configPath = opts.configPath || codexConfigPath(opts.env || process.env);
|
|
137
126
|
await ensureDir(path.dirname(configPath));
|
|
@@ -252,8 +241,6 @@ export async function ensureMadHighProfileForSetupOrRepair(opts = {}) {
|
|
|
252
241
|
cause: 'mad-high-profile-setup',
|
|
253
242
|
mutate: () => next
|
|
254
243
|
});
|
|
255
|
-
// Convert all SKS profiles to per-file overlays and strip the deprecated tables /
|
|
256
|
-
// selectors so Codex stops warning about the legacy config profile on launch.
|
|
257
244
|
await migrateSksProfilesToPerFile({ configPath, env });
|
|
258
245
|
await writeProfileConfig(configPath, MAD_HIGH_PROFILE, profileConfigBlock({
|
|
259
246
|
effort: 'xhigh',
|
package/dist/core/bench.js
CHANGED
|
@@ -121,14 +121,6 @@ export async function runCoreBench(root = process.cwd(), { iterations = 3, tier
|
|
|
121
121
|
for (const [label, args, commandRoot] of coreCommands(benchTrustMission)) {
|
|
122
122
|
const values = [];
|
|
123
123
|
const failures = [];
|
|
124
|
-
// TRUST_VALIDATE_BENCH_COMMAND measures latency of `sks trust validate` against a
|
|
125
|
-
// mock fixture mission. A --mock `$Naruto` run can never satisfy the real agent
|
|
126
|
-
// gate, so `sks trust validate` legitimately exits 1 (report.ok === false,
|
|
127
|
-
// status: 'blocked') every time regardless of environment. This row exists to
|
|
128
|
-
// measure command latency, not to assert the mock mission's trust status, so a
|
|
129
|
-
// well-formed trust-validation report (valid JSON with the expected schema) is
|
|
130
|
-
// accepted even on a nonzero exit; only a crash/unparseable-output counts as a
|
|
131
|
-
// bench failure for this specific command.
|
|
132
124
|
const acceptNonZeroExit = label === TRUST_VALIDATE_BENCH_COMMAND;
|
|
133
125
|
for (let i = 0; i < CORE_BENCH_WARMUP_ITERATIONS; i += 1) {
|
|
134
126
|
const result = await runBenchProcess(commandRoot || root, script, args);
|
|
@@ -182,12 +174,6 @@ function isWellFormedTrustValidation(stdout) {
|
|
|
182
174
|
}
|
|
183
175
|
async function ensureBenchTrustMission(root, script) {
|
|
184
176
|
const benchRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-core-bench-trust-')).catch(() => root);
|
|
185
|
-
// `sks run` blocks the agent gate (and skips writing completion-proof.json) when
|
|
186
|
-
// its cwd is not a git repo (git_collaboration.status -> not_git_repo). The bench
|
|
187
|
-
// trust-mission scratch dir must be a git repo so completion-proof.json/
|
|
188
|
-
// trust-report.json/run-classification.json actually get written and
|
|
189
|
-
// hasBenchTrustArtifacts() can find a usable mission instead of falling back to
|
|
190
|
-
// a nonexistent 'bench-fixture-missing' id (which always fails trust validate).
|
|
191
177
|
await runProcess('git', ['init', '-q', '.'], { cwd: benchRoot, timeoutMs: 10_000 }).catch(() => null);
|
|
192
178
|
const beforeMissionIds = await listMissionIds(benchRoot);
|
|
193
179
|
const result = await runProcess(process.execPath, [script, 'run', 'fixture', '--mock', '--json'], {
|
|
@@ -194,9 +194,6 @@ async function collectChangedScope(root, opts) {
|
|
|
194
194
|
async function listSourceFiles(root, dir = root, out = []) {
|
|
195
195
|
const entries = await fsp.readdir(dir, { withFileTypes: true }).catch(() => []);
|
|
196
196
|
for (const entry of entries) {
|
|
197
|
-
// Hidden runtime/worktree directories can contain complete repository copies.
|
|
198
|
-
// Only .agents is a source-bearing project directory; all other hidden trees
|
|
199
|
-
// are state, caches, or external workspaces and must stay outside this scan.
|
|
200
197
|
if (entry.name.startsWith('.') && entry.name !== '.agents')
|
|
201
198
|
continue;
|
|
202
199
|
const full = path.join(dir, entry.name);
|
|
@@ -3,11 +3,6 @@ import path from 'node:path';
|
|
|
3
3
|
import { nowIso, readJson, writeJsonAtomic } from '../fsx.js';
|
|
4
4
|
import { backupInvalidToml, inspectOfficialSubagentToml, mergeOfficialSubagentConfig, officialSubagentConfigOwnershipProof, officialSubagentConfigWarnings, readInheritedOfficialSubagentConfigText } from '../subagents/official-subagent-config.js';
|
|
5
5
|
import { writeCodexConfigGuarded } from './codex-config-guard.js';
|
|
6
|
-
/**
|
|
7
|
-
* Compatibility entrypoint retained for doctor callers. It repairs the
|
|
8
|
-
* official project [agents] settings and removes only exact legacy SKS child
|
|
9
|
-
* tables after ownership has been proven. User-authored child tables remain.
|
|
10
|
-
*/
|
|
11
6
|
export async function repairAgentConfigFileReferences(input) {
|
|
12
7
|
const root = path.resolve(input.root);
|
|
13
8
|
const configPath = path.join(root, '.codex', 'config.toml');
|
|
@@ -113,9 +108,6 @@ export async function repairAgentConfigFileReferences(input) {
|
|
|
113
108
|
};
|
|
114
109
|
return writeReport(input.reportPath, root, report);
|
|
115
110
|
}
|
|
116
|
-
// Retained for compatibility with the startup postcheck API. Official custom
|
|
117
|
-
// agents are discovered from .codex/agents and do not require config_file
|
|
118
|
-
// references; legacy references are intentionally ignored and preserved.
|
|
119
111
|
export async function missingAgentConfigFiles(_text) {
|
|
120
112
|
return [];
|
|
121
113
|
}
|
|
@@ -2,23 +2,27 @@ import fsp from 'node:fs/promises';
|
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { ensureDir, exists, packageRoot, readJson, runProcess, writeJsonAtomic } from '../fsx.js';
|
|
5
|
+
import { redactString } from '../secret-redaction.js';
|
|
5
6
|
export const CODEX_CLI_UPDATE_STATUS_SCHEMA = 'sks.codex-cli-update-status.v1';
|
|
6
7
|
export const CODEX_CLI_UPDATE_RESULT_SCHEMA = 'sks.codex-cli-update-result.v1';
|
|
7
8
|
const DEFAULT_CACHE_TTL_MS = 60 * 60 * 1000;
|
|
9
|
+
const CODEX_CLI_UPDATE_JSON_OUTPUT_LIMIT_BYTES = 60 * 1024;
|
|
10
|
+
const CODEX_CLI_UPDATE_RAW_OUTPUT_LIMIT_BYTES = 20 * 1024;
|
|
11
|
+
const CODEX_CLI_UPDATE_ARRAY_LIMIT = 12;
|
|
12
|
+
const CODEX_CLI_UPDATE_ARRAY_ITEM_LIMIT_BYTES = 768;
|
|
8
13
|
const CODEX_STANDALONE_INSTALLER_URL = 'https://chatgpt.com/codex/install.sh';
|
|
9
14
|
const CODEX_STANDALONE_INSTALLER_PS1_URL = 'https://chatgpt.com/codex/install.ps1';
|
|
15
|
+
export function codexCliUpdateConsoleLines(result) {
|
|
16
|
+
return [
|
|
17
|
+
`Codex CLI update: ${safeUpdateText(result.status, 64)}${result.after_version ? ` (${safeUpdateText(result.before_version || 'unknown', 128)} -> ${safeUpdateText(result.after_version, 128)})` : ''}`,
|
|
18
|
+
...(result.raw_output_truncated ? ['- updater diagnostics were redacted and truncated; use --json for the bounded structured result.'] : []),
|
|
19
|
+
...safeUpdateStringArray(result.blockers).map((blocker) => `- blocker: ${blocker}`),
|
|
20
|
+
...safeUpdateStringArray(result.guidance).map((line) => `- ${line}`)
|
|
21
|
+
];
|
|
22
|
+
}
|
|
10
23
|
export function codexCliUpdateCachePath(home = process.env.HOME || os.homedir()) {
|
|
11
24
|
return path.join(String(home || os.homedir()), '.sneakoscope', 'cache', 'codex-cli-update.json');
|
|
12
25
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Resolve the operator's Codex CLI for menu status/self-update operations.
|
|
15
|
-
*
|
|
16
|
-
* This is intentionally separate from resolveCodexRuntime/getCodexInfo. Runtime
|
|
17
|
-
* execution may use the @openai/codex dependency bundled under Sneakoscope, but
|
|
18
|
-
* self-update must never mutate that package-owned dependency. Explicit operator
|
|
19
|
-
* overrides are considered first, followed by every executable on PATH; any
|
|
20
|
-
* candidate owned by this Sneakoscope package is rejected and resolution continues.
|
|
21
|
-
*/
|
|
22
26
|
export async function resolveOperatorCodexCli(opts = {}) {
|
|
23
27
|
const env = opts.env || process.env;
|
|
24
28
|
const run = opts.deps?.runProcessImpl || runProcess;
|
|
@@ -690,25 +694,123 @@ function unavailableStatus(codex, now, cachePath, warning) {
|
|
|
690
694
|
};
|
|
691
695
|
}
|
|
692
696
|
function updateResult(input) {
|
|
693
|
-
|
|
697
|
+
const base = {
|
|
694
698
|
schema: CODEX_CLI_UPDATE_RESULT_SCHEMA,
|
|
695
699
|
ok: input.ok,
|
|
696
700
|
status: input.status,
|
|
697
|
-
command: input.command,
|
|
701
|
+
command: input.command ? safeUpdateText(input.command, 512) : null,
|
|
698
702
|
update_method: input.updateMethod,
|
|
699
|
-
bin: input.before.path,
|
|
700
|
-
cli_path: input.before.path,
|
|
703
|
+
bin: input.before.path ? safeUpdateText(input.before.path, 2 * 1024) : null,
|
|
704
|
+
cli_path: input.before.path ? safeUpdateText(input.before.path, 2 * 1024) : null,
|
|
701
705
|
cli_source: input.before.source,
|
|
702
|
-
post_update_cli_path: input.after?.path
|
|
706
|
+
post_update_cli_path: input.after?.path ? safeUpdateText(input.after.path, 2 * 1024) : null,
|
|
703
707
|
post_update_cli_source: input.after?.source || 'unavailable',
|
|
704
|
-
before_version: input.before.version,
|
|
705
|
-
after_version: input.after?.version
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
708
|
+
before_version: input.before.version ? safeUpdateText(input.before.version, 128) : null,
|
|
709
|
+
after_version: input.after?.version ? safeUpdateText(input.after.version, 128) : null,
|
|
710
|
+
update_status: sanitizeCodexCliUpdateStatus(input.updateStatus),
|
|
711
|
+
blockers: safeUpdateStringArray(input.blockers),
|
|
712
|
+
guidance: safeUpdateStringArray(input.guidance)
|
|
713
|
+
};
|
|
714
|
+
const rawOutput = boundedCodexCliUpdateRawOutput(input.rawOutput);
|
|
715
|
+
return boundCodexCliUpdateResult({
|
|
716
|
+
...base,
|
|
717
|
+
raw_output: rawOutput.value,
|
|
718
|
+
raw_output_truncated: rawOutput.truncated
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
function boundedCodexCliUpdateRawOutput(value) {
|
|
722
|
+
const original = String(value || '');
|
|
723
|
+
const sanitized = sanitizeUpdateControlCharacters(redactString(original));
|
|
724
|
+
const bounded = boundUtf8Text(sanitized, CODEX_CLI_UPDATE_RAW_OUTPUT_LIMIT_BYTES, true);
|
|
725
|
+
return {
|
|
726
|
+
value: bounded.value,
|
|
727
|
+
truncated: bounded.truncated || sanitized !== original
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
function sanitizeCodexCliUpdateStatus(value) {
|
|
731
|
+
if (!value)
|
|
732
|
+
return null;
|
|
733
|
+
return {
|
|
734
|
+
schema: CODEX_CLI_UPDATE_STATUS_SCHEMA,
|
|
735
|
+
ok: value.ok === true,
|
|
736
|
+
status: value.status,
|
|
737
|
+
installed: value.installed === true,
|
|
738
|
+
bin: value.bin ? safeUpdateText(value.bin, 2 * 1024) : null,
|
|
739
|
+
cli_path: value.cli_path ? safeUpdateText(value.cli_path, 2 * 1024) : null,
|
|
740
|
+
cli_source: value.cli_source,
|
|
741
|
+
current_version: value.current_version ? safeUpdateText(value.current_version, 128) : null,
|
|
742
|
+
raw_version: value.raw_version ? safeUpdateText(value.raw_version, 1024) : null,
|
|
743
|
+
latest_version: value.latest_version ? safeUpdateText(value.latest_version, 128) : null,
|
|
744
|
+
update_available: typeof value.update_available === 'boolean' ? value.update_available : null,
|
|
745
|
+
update_command: 'sks codex update',
|
|
746
|
+
source: value.source,
|
|
747
|
+
checked_at: safeUpdateText(value.checked_at, 128),
|
|
748
|
+
cache_path: safeUpdateText(value.cache_path, 2 * 1024),
|
|
749
|
+
warnings: safeUpdateStringArray(value.warnings),
|
|
750
|
+
blockers: safeUpdateStringArray(value.blockers),
|
|
751
|
+
guidance: safeUpdateStringArray(value.guidance)
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
function boundCodexCliUpdateResult(result) {
|
|
755
|
+
if (codexCliUpdateSerializedBytes(result) <= CODEX_CLI_UPDATE_JSON_OUTPUT_LIMIT_BYTES)
|
|
756
|
+
return result;
|
|
757
|
+
const withoutRaw = {
|
|
758
|
+
...result,
|
|
759
|
+
raw_output: '',
|
|
760
|
+
raw_output_truncated: true
|
|
761
|
+
};
|
|
762
|
+
if (codexCliUpdateSerializedBytes(withoutRaw) <= CODEX_CLI_UPDATE_JSON_OUTPUT_LIMIT_BYTES)
|
|
763
|
+
return withoutRaw;
|
|
764
|
+
const withoutNestedStatus = {
|
|
765
|
+
...withoutRaw,
|
|
766
|
+
update_status: null,
|
|
767
|
+
blockers: safeUpdateStringArray(withoutRaw.blockers, 6, 384),
|
|
768
|
+
guidance: safeUpdateStringArray(withoutRaw.guidance, 6, 384)
|
|
769
|
+
};
|
|
770
|
+
if (codexCliUpdateSerializedBytes(withoutNestedStatus) <= CODEX_CLI_UPDATE_JSON_OUTPUT_LIMIT_BYTES)
|
|
771
|
+
return withoutNestedStatus;
|
|
772
|
+
return {
|
|
773
|
+
...withoutNestedStatus,
|
|
774
|
+
command: withoutNestedStatus.command ? safeUpdateText(withoutNestedStatus.command, 256) : null,
|
|
775
|
+
bin: withoutNestedStatus.bin ? safeUpdateText(withoutNestedStatus.bin, 512) : null,
|
|
776
|
+
cli_path: withoutNestedStatus.cli_path ? safeUpdateText(withoutNestedStatus.cli_path, 512) : null,
|
|
777
|
+
post_update_cli_path: withoutNestedStatus.post_update_cli_path ? safeUpdateText(withoutNestedStatus.post_update_cli_path, 512) : null,
|
|
778
|
+
blockers: safeUpdateStringArray(withoutNestedStatus.blockers, 4, 256),
|
|
779
|
+
guidance: safeUpdateStringArray(withoutNestedStatus.guidance, 4, 256)
|
|
710
780
|
};
|
|
711
781
|
}
|
|
782
|
+
function codexCliUpdateSerializedBytes(value) {
|
|
783
|
+
return Buffer.byteLength(`${JSON.stringify(value, null, 2)}\n`, 'utf8');
|
|
784
|
+
}
|
|
785
|
+
function safeUpdateStringArray(values = [], maxItems = CODEX_CLI_UPDATE_ARRAY_LIMIT, maxBytes = CODEX_CLI_UPDATE_ARRAY_ITEM_LIMIT_BYTES) {
|
|
786
|
+
return values.slice(0, maxItems).map((value) => safeUpdateText(value, maxBytes));
|
|
787
|
+
}
|
|
788
|
+
function safeUpdateText(value, maxBytes) {
|
|
789
|
+
const sanitized = sanitizeUpdateControlCharacters(redactString(String(value || '')));
|
|
790
|
+
return boundUtf8Text(sanitized, Math.max(0, maxBytes), false).value;
|
|
791
|
+
}
|
|
792
|
+
function sanitizeUpdateControlCharacters(value) {
|
|
793
|
+
return value
|
|
794
|
+
.replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g, ' ')
|
|
795
|
+
.replace(/[ \t]+\n/g, '\n');
|
|
796
|
+
}
|
|
797
|
+
function boundUtf8Text(value, maxBytes, keepTail) {
|
|
798
|
+
if (Buffer.byteLength(value, 'utf8') <= maxBytes)
|
|
799
|
+
return { value, truncated: false };
|
|
800
|
+
const codePoints = Array.from(value);
|
|
801
|
+
let low = 0;
|
|
802
|
+
let high = codePoints.length;
|
|
803
|
+
while (low < high) {
|
|
804
|
+
const midpoint = Math.floor((low + high + 1) / 2);
|
|
805
|
+
const candidate = keepTail ? codePoints.slice(codePoints.length - midpoint).join('') : codePoints.slice(0, midpoint).join('');
|
|
806
|
+
if (Buffer.byteLength(candidate, 'utf8') <= maxBytes)
|
|
807
|
+
low = midpoint;
|
|
808
|
+
else
|
|
809
|
+
high = midpoint - 1;
|
|
810
|
+
}
|
|
811
|
+
const bounded = keepTail ? codePoints.slice(codePoints.length - low).join('') : codePoints.slice(0, low).join('');
|
|
812
|
+
return { value: bounded, truncated: true };
|
|
813
|
+
}
|
|
712
814
|
function failedProcessResult(err) {
|
|
713
815
|
return {
|
|
714
816
|
code: 1,
|
|
@@ -13,10 +13,6 @@ export async function repairCodexConfigEperm(rootInput = process.cwd(), opts = {
|
|
|
13
13
|
const codexHome = path.resolve(opts.codexHome || process.env.CODEX_HOME || path.join(process.env.HOME || os.homedir(), '.codex'));
|
|
14
14
|
const codexHomeConfigPath = path.join(codexHome, 'config.toml');
|
|
15
15
|
const before = await inspectCodexConfigReadability(root, { ...opts, configPath, writeReport: false });
|
|
16
|
-
// Structural recovery FIRST: hoist machine-local keys that a prior buggy move
|
|
17
|
-
// absorbed into a table back to the root, on both the project config and the
|
|
18
|
-
// global CODEX_HOME config (the file Codex actually loads). Runs before the
|
|
19
|
-
// splitter so recovered keys can then be migrated cleanly.
|
|
20
16
|
const structureRepairs = [];
|
|
21
17
|
if (opts.fix === true) {
|
|
22
18
|
structureRepairs.push({ scope: 'project', ...(await repairCodexConfigStructure(configPath, { apply: true })) });
|
|
@@ -4,7 +4,6 @@ import { randomBytes } from 'node:crypto';
|
|
|
4
4
|
import { appendJsonl, ensureDir, nowIso, readText, sha256, writeTextAtomic } from '../fsx.js';
|
|
5
5
|
import { diffCodexAppUiSnapshots, snapshotCodexAppUiState } from '../codex-app/codex-app-ui-state-snapshot.js';
|
|
6
6
|
import { cleanupCodexConfigBackups, validateCodexConfigRoundTrip } from './codex-config-toml.js';
|
|
7
|
-
// fast_mode_ui was removed from the [features] schema in the 2026-07 renewal.
|
|
8
7
|
const FAST_FEATURE_KEYS = ['fast_mode'];
|
|
9
8
|
export async function writeCodexConfigGuarded(input) {
|
|
10
9
|
const configPath = path.resolve(input.configPath);
|
|
@@ -372,8 +371,6 @@ function isSksModeLockMarker(value = '') {
|
|
|
372
371
|
function mergeLostFastUiKeys(before, nextInput) {
|
|
373
372
|
let next = String(nextInput || '');
|
|
374
373
|
const keys = [];
|
|
375
|
-
// [user.fast_mode] left the config schema in the 2026-07 renewal — it is no
|
|
376
|
-
// longer restored when lost; SKS strips it everywhere else.
|
|
377
374
|
for (const key of FAST_FEATURE_KEYS) {
|
|
378
375
|
const line = tomlTableKeyLine(before, 'features', key);
|
|
379
376
|
if (line && !hasTomlTableKey(next, 'features', key)) {
|
|
@@ -22,13 +22,6 @@ export async function inspectCodexConfigReadability(rootInput = process.cwd(), o
|
|
|
22
22
|
for (const dir of parentDirsFor(root, configPath)) {
|
|
23
23
|
add(await accessCheck('parent_traverse', dir, fs.constants.X_OK));
|
|
24
24
|
}
|
|
25
|
-
// Fresh project: the managed config simply does not exist yet. Every downstream check
|
|
26
|
-
// (stat, symlink, macOS ACL/flags/xattr, node/child read, codex config load) would
|
|
27
|
-
// operate on a nonexistent path and fail with ENOENT, turning the single real cause —
|
|
28
|
-
// a missing config — into a misleading cascade (`macos_acl_ls_le_failed`,
|
|
29
|
-
// `macos_flags_ls_lO_failed`, `spawned_child_read_failed`, ...). Skip them and report
|
|
30
|
-
// only the honest `missing_config` / `missing_codex_dir` blocker so the caller can
|
|
31
|
-
// regenerate the managed config instead of chasing phantom ACL/permission problems.
|
|
32
25
|
const configMissing = projectConfigExists.error?.code === 'ENOENT';
|
|
33
26
|
if (!configMissing) {
|
|
34
27
|
const lstatCheck = await statCheck('config_lstat', configPath, 'lstat');
|
|
@@ -55,8 +48,6 @@ export async function inspectCodexConfigReadability(rootInput = process.cwd(), o
|
|
|
55
48
|
childReadCheck(configPath, root),
|
|
56
49
|
codexCliConfigLoadCheck(root, configPath, opts)
|
|
57
50
|
]);
|
|
58
|
-
// These are independent read-only metadata probes. Running them serially
|
|
59
|
-
// multiplied a single TCC/ACL timeout by three on the MAD launch path.
|
|
60
51
|
const macChecksPromise = process.platform === 'darwin'
|
|
61
52
|
? Promise.all([
|
|
62
53
|
commandCheck('macos_acl_ls_le', 'ls', ['-le', configPath], root),
|
|
@@ -224,7 +215,6 @@ function errorDetail(err) {
|
|
|
224
215
|
return { name: err?.name || 'Error', code: err?.code || '', message: err?.message || String(err) };
|
|
225
216
|
}
|
|
226
217
|
function resolveCodexConfigLoadProbe() {
|
|
227
|
-
// The probe ships as executable runtime JS under dist/scripts.
|
|
228
218
|
const candidates = [
|
|
229
219
|
path.join(packageRoot(), 'dist', 'scripts', 'codex-config-load-probe.js')
|
|
230
220
|
];
|
|
@@ -234,7 +224,6 @@ function resolveCodexConfigLoadProbe() {
|
|
|
234
224
|
return candidate;
|
|
235
225
|
}
|
|
236
226
|
catch {
|
|
237
|
-
// ignore and try the next candidate
|
|
238
227
|
}
|
|
239
228
|
}
|
|
240
229
|
return null;
|
|
@@ -250,8 +239,6 @@ async function codexCliConfigLoadCheck(root, configPath, opts = {}) {
|
|
|
250
239
|
}
|
|
251
240
|
const script = resolveCodexConfigLoadProbe();
|
|
252
241
|
if (!script) {
|
|
253
|
-
// The probe ships in dist/scripts; if it is genuinely absent (packaging gap),
|
|
254
|
-
// do not block MAD preflight on an unverifiable check — degrade gracefully.
|
|
255
242
|
return {
|
|
256
243
|
name: 'actual_codex_cli_config_load',
|
|
257
244
|
ok: true,
|
|
@@ -26,16 +26,6 @@ const MACHINE_LOCAL_TABLE_PREFIXES = [
|
|
|
26
26
|
'telemetry',
|
|
27
27
|
'experimental_telemetry'
|
|
28
28
|
];
|
|
29
|
-
// Codex 0.134+ removed the legacy config-profile consumers: `--profile NAME` now
|
|
30
|
-
// layers `$CODEX_HOME/<name>.config.toml` over the base config and the top-level
|
|
31
|
-
// `profile = "..."` selector / `[profiles.*]` tables are deprecated and warned about
|
|
32
|
-
// at startup. So these are NO LONGER machine-local-and-moved-to-home — they are
|
|
33
|
-
// DROPPED from the project config entirely. The per-file profiles are owned by
|
|
34
|
-
// migrateSksProfilesToPerFile (src/core/auto-review.ts), which runs on `sks --mad`.
|
|
35
|
-
// 2026-07 ChatGPT desktop merge: `default_profile` and `[user.fast_mode]` left the
|
|
36
|
-
// config schema entirely (alongside the already-removed [profiles.*] tables), so
|
|
37
|
-
// they are DROPPED from project configs, not relocated to the home config.
|
|
38
|
-
// `service_tier` remains a real, machine-local top-level key and still moves home.
|
|
39
29
|
const DEPRECATED_LEGACY_PROFILE_TOP_LEVEL_KEYS = new Set(['profile', 'profiles', 'default_profile']);
|
|
40
30
|
const DEPRECATED_LEGACY_PROFILE_TABLE_PREFIXES = ['profiles', 'user.fast_mode'];
|
|
41
31
|
const FAST_MODE_GLOBAL_TOP_LEVEL_KEYS = new Set(['service_tier']);
|
|
@@ -52,10 +42,6 @@ export async function splitCodexProjectConfigPolicy(rootInput = process.cwd(), o
|
|
|
52
42
|
const codexHome = path.resolve(opts.codexHome || process.env.CODEX_HOME || path.join(process.env.HOME || os.homedir(), '.codex'));
|
|
53
43
|
const reportPath = opts.reportPath || path.join(root, '.sneakoscope', 'reports', 'codex-project-config-policy.json');
|
|
54
44
|
const codexHomeConfigPath = path.join(codexHome, 'config.toml');
|
|
55
|
-
// Guard: never split the global Codex home config against itself. When `sks`
|
|
56
|
-
// runs from (or near) the home directory the project config can resolve to the
|
|
57
|
-
// same file as the move target. Splitting it would strip machine-local keys and
|
|
58
|
-
// re-append them, corrupting the file. Treat this as a no-op.
|
|
59
45
|
if (await isSameFile(configPath, codexHomeConfigPath)) {
|
|
60
46
|
const report = {
|
|
61
47
|
schema: CODEX_PROJECT_CONFIG_POLICY_SCHEMA,
|
|
@@ -195,13 +181,6 @@ export async function splitCodexProjectConfigPolicy(rootInput = process.cwd(), o
|
|
|
195
181
|
await writeJsonAtomic(reportPath, { ...report, report_path: reportPath });
|
|
196
182
|
return report;
|
|
197
183
|
}
|
|
198
|
-
// Recovery pass for already-corrupted configs. The pre-fix mover appended
|
|
199
|
-
// machine-local top-level keys after the last [table], so TOML absorbed them
|
|
200
|
-
// into that table (e.g. `notify`/`model_provider` landing inside
|
|
201
|
-
// `[mcp_servers.*.env]`, which Codex rejects with
|
|
202
|
-
// `invalid type: sequence, expected a string`). The splitter cannot recover this
|
|
203
|
-
// because it now sees those lines as table members, not top-level keys. This pass
|
|
204
|
-
// hoists them back above the first table so Codex can load the config again.
|
|
205
184
|
export async function repairCodexConfigStructure(configPathInput, opts = {}) {
|
|
206
185
|
const configPath = path.resolve(configPathInput);
|
|
207
186
|
const original = await readText(configPath, null);
|
|
@@ -262,9 +241,6 @@ function hoistMisplacedMachineLocalKeys(text) {
|
|
|
262
241
|
}
|
|
263
242
|
const lines = block.text.split('\n');
|
|
264
243
|
const header = lines[0];
|
|
265
|
-
// `mcp_servers.*` / `*.env` tables never legitimately contain machine-local
|
|
266
|
-
// Codex root keys; treat keys found there (or anything after an absorbed
|
|
267
|
-
// SKS-moved comment) as misplaced.
|
|
268
244
|
const corruptionProne = /^mcp_servers(\.|$)/.test(block.table) || /\.env$/.test(block.table) || block.table === 'env';
|
|
269
245
|
const kept = [header];
|
|
270
246
|
let sawMovedComment = false;
|
|
@@ -297,8 +273,6 @@ function hoistMisplacedMachineLocalKeys(text) {
|
|
|
297
273
|
const sections = [head, ...tables.map((table) => table.trim())].filter(Boolean);
|
|
298
274
|
return { changed: true, text: normalizeProjectText(sections.join('\n\n')), hoisted_keys: [...new Set(hoistedKeys)] };
|
|
299
275
|
}
|
|
300
|
-
// Capture a TOML assignment that may span multiple lines (multiline arrays
|
|
301
|
-
// `[ ... ]` or triple-quoted strings) so hoisting never splits a value.
|
|
302
276
|
function captureAssignmentSpan(lines, start) {
|
|
303
277
|
const first = lines[start] ?? '';
|
|
304
278
|
const collected = [first];
|
|
@@ -338,8 +312,6 @@ function splitProjectToml(text) {
|
|
|
338
312
|
let profileName = null;
|
|
339
313
|
let deprecatedFixed = false;
|
|
340
314
|
for (const block of blocks) {
|
|
341
|
-
// Deprecated legacy config profiles are DROPPED, not moved to the home config
|
|
342
|
-
// (Codex 0.134+ warns about `[profiles.*]` tables and the `profile=` selector).
|
|
343
315
|
if (block.table && isFastModeGlobalTable(block.table)) {
|
|
344
316
|
moved.push(block.text);
|
|
345
317
|
machineBlocks.push(block);
|
|
@@ -513,11 +485,6 @@ async function isSameFile(a, b) {
|
|
|
513
485
|
return false;
|
|
514
486
|
}
|
|
515
487
|
}
|
|
516
|
-
// Merge machine-local Codex config into the user (CODEX_HOME) config while
|
|
517
|
-
// preserving TOML structure: bare top-level keys must appear before any
|
|
518
|
-
// `[table]` header, otherwise they are parsed as members of the preceding
|
|
519
|
-
// table. Appending moved keys blindly at end-of-file corrupted configs
|
|
520
|
-
// (e.g. `notify`/`model_provider` landing inside `[mcp_servers.*.env]`).
|
|
521
488
|
function mergeMachineLocalIntoUserConfig(userText, machineText, commentLine) {
|
|
522
489
|
const preamble = [];
|
|
523
490
|
const tables = [];
|
|
@@ -31,8 +31,6 @@ export async function detectOfficialGoalMode(opts = {}) {
|
|
|
31
31
|
warnings: official ? [] : ['official_goal_unavailable_no_fallback']
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
// Capability evidence for non-Goal routes. This records whether the active
|
|
35
|
-
// Codex runtime exposes native Goal; it never creates or controls a goal.
|
|
36
34
|
export async function writeOfficialGoalModeArtifact(dir, detection) {
|
|
37
35
|
const artifact = path.join(dir, 'goal-mode-applied.json');
|
|
38
36
|
await writeJsonAtomic(artifact, detection);
|