sneakoscope 7.0.2 → 7.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -7
- package/config/codex-releases/{rust-v0.144.5.json → rust-v0.145.0.json} +14 -8
- 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-manifest-lite.js +1 -2
- package/dist/cli/command-registry.js +0 -4
- package/dist/cli/global-mode-router.js +5 -12
- package/dist/cli/install-helpers-codex-lb-chain.js +24 -2
- package/dist/cli/install-helpers-codex-lb-config.js +10 -25
- 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-install-support.js +1 -2
- package/dist/cli/install-helpers.js +83 -99
- package/dist/cli/router.js +22 -31
- package/dist/commands/codex-app.js +20 -2
- package/dist/commands/codex-lb.js +176 -22
- package/dist/commands/codex.js +3 -8
- package/dist/commands/conflicts.js +26 -3
- package/dist/commands/doctor.js +26 -31
- 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 +7 -10
- package/dist/core/agents/agent-orchestrator.js +0 -4
- package/dist/core/agents/agent-proof-evidence.js +0 -2
- package/dist/core/agents/agent-roster.js +6 -5
- package/dist/core/agents/agent-runner-ollama.js +0 -3
- package/dist/core/agents/agent-scheduler.js +7 -10
- package/dist/core/agents/agent-schema.js +3 -1
- package/dist/core/agents/agent-task-graph.js +4 -1
- package/dist/core/agents/agent-work-partition.js +4 -2
- 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 +8 -14
- 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/codex-startup-config-postcheck.js +5 -0
- package/dist/core/codex/official-goal-mode.js +0 -2
- package/dist/core/codex-app/codex-agent-type-probe.js +31 -24
- 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/glm-model-profile.js +1 -1
- package/dist/core/codex-app/glm-profile-installer.js +40 -41
- package/dist/core/codex-app/glm-profile-schema.js +7 -11
- package/dist/core/codex-app/menubar/constants.js +1 -0
- package/dist/core/codex-app/menubar/launch-agent.js +37 -1
- package/dist/core/codex-app/openrouter-activate.js +152 -0
- package/dist/core/codex-app/openrouter-provider.js +82 -0
- package/dist/core/codex-app/sks-menubar.js +0 -1
- package/dist/core/codex-app.js +14 -32
- package/dist/core/codex-compat/codex-capability-matrix.js +208 -0
- 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-compat/codex-release-manifest.js +15 -8
- package/dist/core/codex-compat/codex-version-policy.js +77 -15
- package/dist/core/codex-control/codex-0144-capability.js +1 -1
- 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 +133 -24
- 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 +3 -3
- package/dist/core/commands/agent-bridge-command.js +28 -8
- package/dist/core/commands/basic-cli.js +89 -42
- 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 +55 -208
- package/dist/core/commands/naruto-command.js +55 -21
- 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/command-alias-cleanup.js +37 -9
- package/dist/core/doctor/current-project-guidance.js +6 -3
- package/dist/core/doctor/doctor-codex-startup-repair.js +0 -3
- package/dist/core/doctor/doctor-dirty-planner.js +1 -1
- 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-auto-review-config.js +9 -1
- package/dist/core/doctor/retired-managed-residue-private.js +5 -4
- package/dist/core/doctor/retired-managed-residue-runtime.js +9 -1
- package/dist/core/doctor/skill-legacy-surface.js +351 -0
- package/dist/core/doctor/supabase-mcp-repair.js +0 -11
- package/dist/core/evaluation.js +3 -0
- package/dist/core/feature-fixture-executor.js +0 -48
- package/dist/core/feature-fixtures.js +0 -6
- package/dist/core/fsx.js +11 -12
- package/dist/core/harness-conflicts.js +177 -18
- 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 +369 -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 +275 -540
- 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 +248 -75
- package/dist/core/init.js +19 -45
- 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 +18 -11
- 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 +7 -19
- package/dist/core/preflight/parallel-preflight-engine.js +1 -12
- 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/openrouter/openrouter-client.js +2 -2
- package/dist/core/providers/openrouter/openrouter-provider-health.js +1 -1
- package/dist/core/providers/{glm/glm-request-cache.js → openrouter/openrouter-request-cache.js} +5 -6
- package/dist/core/providers/openrouter/openrouter-secret-store.js +0 -1
- package/dist/core/providers/openrouter/openrouter-stream.js +2 -4
- package/dist/core/questions.js +3 -3
- package/dist/core/release/gate-manifest.js +0 -5
- package/dist/core/release/package-size-budget.js +2 -2
- 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-contract.js +0 -7
- package/dist/core/release/release-gate-hermetic-env.js +0 -5
- package/dist/core/release/release-pack-receipt.js +1 -0
- 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/model-mode-router.js +10 -19
- package/dist/core/routes.js +91 -17
- 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 +3 -2
- package/dist/core/subagents/naruto-proof-projection.js +580 -12
- package/dist/core/subagents/official-subagent-config.js +256 -40
- package/dist/core/subagents/official-subagent-preparation.js +11 -7
- package/dist/core/subagents/official-subagent-prompt.js +29 -0
- package/dist/core/subagents/official-subagent-runner.js +379 -39
- package/dist/core/subagents/subagent-evidence.js +378 -9
- package/dist/core/subagents/terminology.js +11 -6
- package/dist/core/subagents/thread-budget.js +6 -3
- 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 +113 -61
- package/dist/core/update-check.js +2 -14
- package/dist/core/version-manager.js +43 -4
- 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-fake-adapter.js +16 -0
- 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 +35 -35
- 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-pane-proof.js +3 -3
- 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 +6 -16
- 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/DiagnosticsViewController.swift +61 -2
- package/dist/native/sks-menubar/Sources/MCPServersViewController.swift +10 -3
- package/dist/native/sks-menubar/Sources/OverviewViewController.swift +55 -3
- package/dist/native/sks-menubar/Sources/ProvidersOpenRouter.swift +76 -0
- package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +273 -54
- package/dist/native/sks-menubar/Sources/RemoteTelegramViewController.swift +5 -1
- package/dist/native/sks-menubar/Sources/SettingsViewController.swift +2 -2
- package/dist/native/sks-menubar/Sources/StatusItemController.swift +28 -2
- package/dist/native/sks-menubar/Sources/UpdatesViewController.swift +96 -13
- 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-app-server-v2-check.js +5 -5
- 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-command-surface-check.js +1 -1
- package/dist/scripts/current-surface-update-e2e-check.js +2 -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 +7 -7
- package/dist/scripts/doctor-fastpath-check.js +0 -1
- package/dist/scripts/doctor-fix-production-blackbox.js +1 -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/doctor-startup-config-repair-blackbox.js +1 -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 +4 -2
- 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 -2
- 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 +2 -3
- 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 +6 -7
- package/release-gates.v2.json +426 -93
- package/schemas/codex/app-server-0.145/codex_app_server_protocol.v2.schemas.json +19611 -0
- package/dist/core/commands/glm-command.js +0 -93
- package/dist/core/providers/glm/bench/glm-bench-comparison.js +0 -47
- package/dist/core/providers/glm/bench/glm-bench-fixture.js +0 -64
- package/dist/core/providers/glm/bench/glm-bench-model-lock-proof.js +0 -52
- package/dist/core/providers/glm/bench/glm-bench-report.js +0 -74
- package/dist/core/providers/glm/bench/glm-benchmark-runner.js +0 -243
- package/dist/core/providers/glm/bench/glm-benchmark-types.js +0 -1
- package/dist/core/providers/glm/bench/glm-direct-bench-runner.js +0 -72
- package/dist/core/providers/glm/glm-52-profile.js +0 -82
- package/dist/core/providers/glm/glm-52-request.js +0 -73
- package/dist/core/providers/glm/glm-52-response-guard.js +0 -32
- package/dist/core/providers/glm/glm-52-settings.js +0 -67
- package/dist/core/providers/glm/glm-context-budget.js +0 -14
- package/dist/core/providers/glm/glm-context-cache.js +0 -8
- package/dist/core/providers/glm/glm-direct-run.js +0 -140
- package/dist/core/providers/glm/glm-interactive-launch.js +0 -4
- package/dist/core/providers/glm/glm-latency-trace.js +0 -39
- package/dist/core/providers/glm/glm-loop-guard.js +0 -30
- package/dist/core/providers/glm/glm-mad-launch.js +0 -128
- package/dist/core/providers/glm/glm-mad-mode.js +0 -269
- package/dist/core/providers/glm/glm-model-meta-cache.js +0 -18
- package/dist/core/providers/glm/glm-patch-apply.js +0 -72
- package/dist/core/providers/glm/glm-patch-parser.js +0 -18
- package/dist/core/providers/glm/glm-profile-resolver.js +0 -168
- package/dist/core/providers/glm/glm-readiness.js +0 -4
- package/dist/core/providers/glm/glm-reasoning-policy.js +0 -14
- package/dist/core/providers/glm/glm-run-controller.js +0 -65
- package/dist/core/providers/glm/glm-run-state.js +0 -10
- package/dist/core/providers/glm/glm-run-timeout.js +0 -30
- package/dist/core/providers/glm/glm-speed-context.js +0 -81
- package/dist/core/providers/glm/glm-speed-gate.js +0 -39
- package/dist/core/providers/glm/glm-speed-output-parser.js +0 -39
- package/dist/core/providers/glm/glm-tool-schema-cache.js +0 -18
- package/dist/core/providers/glm/naruto/glm-naruto-apply-transaction.js +0 -135
- package/dist/core/providers/glm/naruto/glm-naruto-artifacts.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-bench.js +0 -6
- package/dist/core/providers/glm/naruto/glm-naruto-budget.js +0 -44
- package/dist/core/providers/glm/naruto/glm-naruto-combined-patch.js +0 -48
- package/dist/core/providers/glm/naruto/glm-naruto-command.js +0 -101
- package/dist/core/providers/glm/naruto/glm-naruto-concurrency-governor.js +0 -37
- package/dist/core/providers/glm/naruto/glm-naruto-conflict-graph.js +0 -79
- package/dist/core/providers/glm/naruto/glm-naruto-critical-path.js +0 -50
- package/dist/core/providers/glm/naruto/glm-naruto-decomposer.js +0 -148
- package/dist/core/providers/glm/naruto/glm-naruto-file-lease.js +0 -22
- package/dist/core/providers/glm/naruto/glm-naruto-final-seal.js +0 -81
- package/dist/core/providers/glm/naruto/glm-naruto-finalizer.js +0 -22
- package/dist/core/providers/glm/naruto/glm-naruto-hunk-conflict.js +0 -15
- package/dist/core/providers/glm/naruto/glm-naruto-hunk-parser.js +0 -35
- package/dist/core/providers/glm/naruto/glm-naruto-isolation-policy.js +0 -37
- package/dist/core/providers/glm/naruto/glm-naruto-judge.js +0 -83
- package/dist/core/providers/glm/naruto/glm-naruto-merge-planner.js +0 -61
- package/dist/core/providers/glm/naruto/glm-naruto-metrics.js +0 -33
- package/dist/core/providers/glm/naruto/glm-naruto-orchestrator.js +0 -486
- package/dist/core/providers/glm/naruto/glm-naruto-parallelism-summary.js +0 -54
- package/dist/core/providers/glm/naruto/glm-naruto-patch-candidate-gate.js +0 -41
- package/dist/core/providers/glm/naruto/glm-naruto-patch-candidate-parser.js +0 -61
- package/dist/core/providers/glm/naruto/glm-naruto-patch-envelope.js +0 -54
- package/dist/core/providers/glm/naruto/glm-naruto-quorum.js +0 -36
- package/dist/core/providers/glm/naruto/glm-naruto-rate-limiter.js +0 -17
- package/dist/core/providers/glm/naruto/glm-naruto-repair-wave.js +0 -20
- package/dist/core/providers/glm/naruto/glm-naruto-requirement-coverage.js +0 -108
- package/dist/core/providers/glm/naruto/glm-naruto-requirement-ledger.js +0 -57
- package/dist/core/providers/glm/naruto/glm-naruto-scoreboard.js +0 -74
- package/dist/core/providers/glm/naruto/glm-naruto-secret-audit.js +0 -90
- package/dist/core/providers/glm/naruto/glm-naruto-session-id.js +0 -9
- package/dist/core/providers/glm/naruto/glm-naruto-shard-planner.js +0 -31
- package/dist/core/providers/glm/naruto/glm-naruto-stage-scheduler.js +0 -84
- package/dist/core/providers/glm/naruto/glm-naruto-targeted-checks.js +0 -75
- package/dist/core/providers/glm/naruto/glm-naruto-task-size-classifier.js +0 -11
- package/dist/core/providers/glm/naruto/glm-naruto-terminal.js +0 -43
- package/dist/core/providers/glm/naruto/glm-naruto-trace.js +0 -173
- package/dist/core/providers/glm/naruto/glm-naruto-types.js +0 -36
- package/dist/core/providers/glm/naruto/glm-naruto-usage-extractor.js +0 -30
- package/dist/core/providers/glm/naruto/glm-naruto-verifier-output.js +0 -30
- package/dist/core/providers/glm/naruto/glm-naruto-work-graph.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-worker-artifacts.js +0 -55
- package/dist/core/providers/glm/naruto/glm-naruto-worker-pool.js +0 -275
- package/dist/core/providers/glm/naruto/glm-naruto-worker-runtime.js +0 -421
- package/dist/core/providers/glm/naruto/glm-naruto-worker-scheduler.js +0 -177
- package/dist/core/providers/glm/naruto/glm-naruto-worker.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-worktree-cleanup.js +0 -19
- package/dist/core/providers/glm/naruto/glm-naruto-worktree-manager.js +0 -71
- package/dist/core/providers/glm/naruto/glm-naruto-worktree-worker.js +0 -73
- package/dist/core/providers/glm/naruto/glm-naruto-worktree.js +0 -62
- package/schemas/codex/app-server-0.144/codex_app_server_protocol.v2.schemas.json +0 -1
|
@@ -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 = [];
|
|
@@ -35,10 +35,15 @@ export async function postcheckCodexStartupConfig(input) {
|
|
|
35
35
|
relative_config_files: [],
|
|
36
36
|
unsupported_managed_role_fields: false,
|
|
37
37
|
official_subagent_config: {
|
|
38
|
+
enabled: officialConfig.enabled,
|
|
38
39
|
max_threads: officialConfig.maxThreads,
|
|
40
|
+
max_concurrent_threads_per_session: officialConfig.maxThreads,
|
|
39
41
|
max_depth: officialConfig.maxDepth,
|
|
40
42
|
job_max_runtime_seconds: officialConfig.jobMaxRuntimeSeconds,
|
|
41
43
|
interrupt_message: officialConfig.interruptMessage,
|
|
44
|
+
default_subagent_model: officialConfig.defaultSubagentModel,
|
|
45
|
+
default_subagent_reasoning_effort: officialConfig.defaultSubagentReasoningEffort,
|
|
46
|
+
multi_agent_v2: officialConfig.multiAgentV2,
|
|
42
47
|
sources: officialConfig.sources,
|
|
43
48
|
warnings: officialConfig.warnings
|
|
44
49
|
},
|
|
@@ -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);
|
|
@@ -97,7 +97,7 @@ async function probeHelp(codexBin, env) {
|
|
|
97
97
|
const text = `${run?.stdout || ''}${run?.stderr || ''}`;
|
|
98
98
|
if (!run || run.code !== 0 || !text)
|
|
99
99
|
return unknownProbe(['codex_help_unavailable']);
|
|
100
|
-
const
|
|
100
|
+
const multiAgentV2 = /\bmulti_agent_v2\b/.test(text);
|
|
101
101
|
const supported = /\bagent_type\b/.test(text) && /\bspawn_agent\b/.test(text);
|
|
102
102
|
return {
|
|
103
103
|
schema: 'sks.codex-agent-type-probe.v1',
|
|
@@ -107,11 +107,13 @@ async function probeHelp(codexBin, env) {
|
|
|
107
107
|
source: supported ? 'codex-help' : 'unknown',
|
|
108
108
|
spawn_tool_name: supported ? 'spawn_agent' : 'unknown',
|
|
109
109
|
schema_path: supported ? 'codex --help' : null,
|
|
110
|
-
evidence:
|
|
110
|
+
evidence: [
|
|
111
|
+
...(supported ? ['help_mentions_agent_type', 'help_mentions_spawn_agent'] : []),
|
|
112
|
+
...(multiAgentV2 ? ['help_mentions_multi_agent_v2'] : [])
|
|
113
|
+
],
|
|
111
114
|
blockers: [],
|
|
112
115
|
warnings: [
|
|
113
|
-
...(supported ? [] : ['agent_type_not_found_in_help'])
|
|
114
|
-
...(legacyV2 ? ['legacy_multi_agent_v2_ignored_use_spawn_agent_subagents'] : [])
|
|
116
|
+
...(supported ? [] : ['agent_type_not_found_in_help'])
|
|
115
117
|
]
|
|
116
118
|
};
|
|
117
119
|
}
|
|
@@ -157,48 +159,53 @@ function probeSchema(value, source, schemaPath) {
|
|
|
157
159
|
spawn_tool_name: found.tool,
|
|
158
160
|
schema_path: found.path || schemaPath,
|
|
159
161
|
evidence: found.supported
|
|
160
|
-
? [`agent_type:${found.path || 'found'}`]
|
|
161
|
-
:
|
|
162
|
-
? ['legacy_multi_agent_v2_ignored']
|
|
163
|
-
: ['agent_type_absent'],
|
|
162
|
+
? [`agent_type:${found.path || 'found'}`, ...(found.multi_agent_v2_path ? [`multi_agent_v2:${found.multi_agent_v2_path}`] : [])]
|
|
163
|
+
: ['agent_type_absent'],
|
|
164
164
|
blockers: [],
|
|
165
165
|
warnings: [
|
|
166
|
-
...(found.supported ? [] : ['agent_type_not_supported_message_role_fallback'])
|
|
167
|
-
...(found.legacy_path ? [`legacy_multi_agent_v2_ignored:${found.legacy_path}`] : [])
|
|
166
|
+
...(found.supported ? [] : ['agent_type_not_supported_message_role_fallback'])
|
|
168
167
|
]
|
|
169
168
|
};
|
|
170
169
|
}
|
|
171
170
|
function findAgentType(value, trail = []) {
|
|
172
171
|
if (Array.isArray(value)) {
|
|
173
|
-
let
|
|
172
|
+
let multiAgentPath = null;
|
|
174
173
|
for (let index = 0; index < value.length; index += 1) {
|
|
175
174
|
const found = findAgentType(value[index], [...trail, String(index)]);
|
|
176
175
|
if (found.supported)
|
|
177
176
|
return found;
|
|
178
|
-
if (!
|
|
179
|
-
|
|
177
|
+
if (!multiAgentPath && found.multi_agent_v2_path)
|
|
178
|
+
multiAgentPath = found.multi_agent_v2_path;
|
|
180
179
|
}
|
|
181
|
-
return { supported: false, tool: 'unknown', path: null,
|
|
180
|
+
return { supported: false, tool: 'unknown', path: null, multi_agent_v2_path: multiAgentPath };
|
|
182
181
|
}
|
|
183
182
|
if (!isRecord(value))
|
|
184
183
|
return { supported: false, tool: 'unknown', path: null };
|
|
185
184
|
const name = String(value.name || value.tool || value.id || '');
|
|
186
|
-
const
|
|
185
|
+
const multiAgentV2 = name.includes('multi_agent_v2');
|
|
187
186
|
const tool = name.includes('spawn_agent') ? 'spawn_agent' : 'unknown';
|
|
188
187
|
if ('agent_type' in value || isRecord(value.properties) && 'agent_type' in value.properties) {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
return {
|
|
189
|
+
supported: true,
|
|
190
|
+
tool: tool === 'unknown' ? 'spawn_agent' : tool,
|
|
191
|
+
path: [...trail, 'agent_type'].join('.'),
|
|
192
|
+
multi_agent_v2_path: multiAgentV2 ? trail.join('.') || 'multi_agent_v2' : null
|
|
193
|
+
};
|
|
192
194
|
}
|
|
193
|
-
let
|
|
195
|
+
let multiAgentPath = multiAgentV2 ? trail.join('.') || 'multi_agent_v2' : null;
|
|
194
196
|
for (const [key, entry] of Object.entries(value)) {
|
|
195
197
|
const found = findAgentType(entry, [...trail, key]);
|
|
196
|
-
if (found.supported)
|
|
197
|
-
return {
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
if (found.supported) {
|
|
199
|
+
return {
|
|
200
|
+
...found,
|
|
201
|
+
tool: found.tool === 'unknown' && tool !== 'unknown' ? tool : found.tool,
|
|
202
|
+
multi_agent_v2_path: found.multi_agent_v2_path || multiAgentPath
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
if (!multiAgentPath && found.multi_agent_v2_path)
|
|
206
|
+
multiAgentPath = found.multi_agent_v2_path;
|
|
200
207
|
}
|
|
201
|
-
return { supported: false, tool, path: null,
|
|
208
|
+
return { supported: false, tool, path: null, multi_agent_v2_path: multiAgentPath };
|
|
202
209
|
}
|
|
203
210
|
function unknownProbe(blockers) {
|
|
204
211
|
return {
|
|
@@ -6,9 +6,6 @@ import { assertCodexAppUiMutationAllowed } from './codex-app-ui-clobber-guard.js
|
|
|
6
6
|
import { codexProviderModelUiStatus } from '../codex-app.js';
|
|
7
7
|
import { cleanupCodexConfigBackups } from '../codex/codex-config-toml.js';
|
|
8
8
|
export const CODEX_APP_FAST_UI_REPAIR_SCHEMA = 'sks.codex-app-fast-ui-repair.v1';
|
|
9
|
-
// `service_tier = "fast"` and `[features].fast_mode = true` are capability
|
|
10
|
-
// signals. Removing either would turn Fast off rather than restore native UI.
|
|
11
|
-
// Only provenance-backed SKS global provider/model/reasoning locks are removed.
|
|
12
9
|
const FAST_UI_TOP_LEVEL_RE = /^\s*(?:model_provider|model|model_reasoning_effort)\s*=/;
|
|
13
10
|
const FAST_UI_LEGACY_TABLES = new Set(['user.fast_mode', 'profiles.sks-fast-high']);
|
|
14
11
|
export async function repairCodexAppFastUi(root = process.cwd(), input = {}) {
|
|
@@ -81,6 +78,7 @@ export async function repairCodexAppFastUi(root = process.cwd(), input = {}) {
|
|
|
81
78
|
const applied = actions.some((action) => action.status === 'repaired');
|
|
82
79
|
const pending = actions.some((action) => action.changed && action.status !== 'repaired');
|
|
83
80
|
const requiresConfirmation = unsafeReasons.length > 0 && input.force !== true;
|
|
81
|
+
const chatgptOauthInactive = after.indicators.chat_surface === 'chatgpt_oauth_inactive';
|
|
84
82
|
const selectedProviderBlockers = Array.isArray(providerModelUi.selected_provider_blockers)
|
|
85
83
|
? providerModelUi.selected_provider_blockers
|
|
86
84
|
: [];
|
|
@@ -114,7 +112,10 @@ export async function repairCodexAppFastUi(root = process.cwd(), input = {}) {
|
|
|
114
112
|
actions,
|
|
115
113
|
before_fast_selector: before.indicators.fast_selector,
|
|
116
114
|
after_fast_selector: after.indicators.fast_selector,
|
|
117
|
-
|
|
115
|
+
auth_mode: after.indicators.auth_mode,
|
|
116
|
+
chat_surface: after.indicators.chat_surface,
|
|
117
|
+
chatgpt_oauth_backup_available: after.indicators.chatgpt_oauth_backup_available,
|
|
118
|
+
next_action: requiresConfirmation ? 'Run `sks doctor --fix --repair-codex-app-ui` after reviewing the repair plan.' : manual && safeAutoApply ? 'Run `sks doctor --fix` to apply the safe Codex App UI repair.' : manual ? 'Run `sks doctor --fix --repair-codex-app-ui` after reviewing the repair plan.' : chatgptOauthInactive ? 'Run `sks codex-lb use-oauth --restart-app` to restore the Codex App Chat/Pro surface. This explicit switch leaves saved codex-lb credentials available for later reuse.' : changed ? 'Restart Codex App if the selector was already hidden.' : 'No Codex App UI repair needed.',
|
|
118
119
|
blockers
|
|
119
120
|
};
|
|
120
121
|
if (input.reportPath)
|
|
@@ -165,9 +166,6 @@ function stripProjectLocalForbiddenKeys(text) {
|
|
|
165
166
|
}
|
|
166
167
|
function stripSksCausedHostOwnedLines(text) {
|
|
167
168
|
const sourceLines = String(text || '').split(/\r?\n/);
|
|
168
|
-
// An active, contract-shaped codex-lb selection is a runtime provider choice,
|
|
169
|
-
// not a Fast UI lock. Preserve it so Desktop keeps GPT-5.6/tool exposure after
|
|
170
|
-
// project→global config migration markers are present.
|
|
171
169
|
const preserveCodexLbSelection = hasActiveCodexLbProviderSelection(text);
|
|
172
170
|
const stripped = stripMatchingLines(text, (line, table, _previous, _next, index) => {
|
|
173
171
|
const isLegacyFastTable = table ? FAST_UI_LEGACY_TABLES.has(table) : false;
|
|
@@ -26,6 +26,7 @@ export async function snapshotCodexAppUiState(root = process.cwd(), input = {})
|
|
|
26
26
|
const home = codexHome(input);
|
|
27
27
|
const files = await snapshotConfigFiles(resolvedRoot, home);
|
|
28
28
|
const authMetadata = await readAuthMetadata(path.join(home, 'auth.json'));
|
|
29
|
+
const authBackupMetadata = await readAuthMetadata(path.join(home, 'auth.chatgpt-backup.json'));
|
|
29
30
|
const appPreferenceFiles = await discoverAppPreferenceFiles(home);
|
|
30
31
|
const sksManagedBlocks = files.flatMap((file) => findSksManagedBlocks(file));
|
|
31
32
|
const projectLocalForbiddenKeys = files.flatMap((file) => file.forbidden_project_local_keys || []);
|
|
@@ -45,13 +46,19 @@ export async function snapshotCodexAppUiState(root = process.cwd(), input = {})
|
|
|
45
46
|
return true;
|
|
46
47
|
if (signal.key_path.startsWith('user.fast_mode') && /hidden|fixed|disabled|false/i.test(signal.value_preview))
|
|
47
48
|
return true;
|
|
48
|
-
// Active contract-valid codex-lb selection is a provider choice, not a Fast UI lock.
|
|
49
49
|
if (signal.key_path === 'model_provider' && activeCodexLbSelection)
|
|
50
50
|
return false;
|
|
51
51
|
if (SKS_GLOBAL_UI_LOCK_KEYS.has(signal.key_path) && signal.sks_related)
|
|
52
52
|
return true;
|
|
53
53
|
return false;
|
|
54
54
|
});
|
|
55
|
+
const authMode = authMetadataMode(authMetadata);
|
|
56
|
+
const chatgptOauthBackupAvailable = authMetadataMode(authBackupMetadata) === 'chatgpt_oauth';
|
|
57
|
+
const chatSurface = authMode === 'chatgpt_oauth' || authMode === 'browser_marker'
|
|
58
|
+
? 'available'
|
|
59
|
+
: authMode === 'apikey' && chatgptOauthBackupAvailable
|
|
60
|
+
? 'chatgpt_oauth_inactive'
|
|
61
|
+
: 'unknown';
|
|
55
62
|
return {
|
|
56
63
|
schema: CODEX_APP_UI_STATE_SNAPSHOT_SCHEMA,
|
|
57
64
|
generated_at: nowIso(),
|
|
@@ -59,6 +66,7 @@ export async function snapshotCodexAppUiState(root = process.cwd(), input = {})
|
|
|
59
66
|
codex_home: redactHome(home),
|
|
60
67
|
files,
|
|
61
68
|
auth_metadata: authMetadata,
|
|
69
|
+
auth_backup_metadata: authBackupMetadata,
|
|
62
70
|
app_preference_files: appPreferenceFiles,
|
|
63
71
|
sks_managed_blocks: sksManagedBlocks,
|
|
64
72
|
indicators: {
|
|
@@ -67,7 +75,10 @@ export async function snapshotCodexAppUiState(root = process.cwd(), input = {})
|
|
|
67
75
|
provider_signals: providerSignals,
|
|
68
76
|
host_owned_signal_count: hostOwnedSignals.length,
|
|
69
77
|
project_local_forbidden_keys: [...new Set(projectLocalForbiddenKeys)],
|
|
70
|
-
secret_leak_suspected: JSON.stringify({ files, authMetadata }).match(/sk-[A-Za-z0-9_-]{16,}|CODEX_LB_API_KEY\s*=\s*["'][^"']+/) != null
|
|
78
|
+
secret_leak_suspected: JSON.stringify({ files, authMetadata, authBackupMetadata }).match(/sk-[A-Za-z0-9_-]{16,}|CODEX_LB_API_KEY\s*=\s*["'][^"']+/) != null,
|
|
79
|
+
auth_mode: authMode,
|
|
80
|
+
chatgpt_oauth_backup_available: chatgptOauthBackupAvailable,
|
|
81
|
+
chat_surface: chatSurface
|
|
71
82
|
}
|
|
72
83
|
};
|
|
73
84
|
}
|
|
@@ -149,8 +160,11 @@ export function isSksOwnedGlobalUiLock(lines, index) {
|
|
|
149
160
|
const candidate = String(lines[cursor] || '').trim();
|
|
150
161
|
if (!candidate)
|
|
151
162
|
continue;
|
|
152
|
-
if (candidate.startsWith('#'))
|
|
153
|
-
|
|
163
|
+
if (candidate.startsWith('#')) {
|
|
164
|
+
if (isSksGlobalUiLockMarker(candidate))
|
|
165
|
+
return true;
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
154
168
|
if (/^\s*\[/.test(candidate))
|
|
155
169
|
return false;
|
|
156
170
|
const previousKey = candidate.match(/^([A-Za-z0-9_-]+)\s*=/)?.[1] || '';
|
|
@@ -232,13 +246,37 @@ function sanitizeAuthMetadata(value) {
|
|
|
232
246
|
return { type: typeof value };
|
|
233
247
|
const record = value;
|
|
234
248
|
const keys = Object.keys(record).sort();
|
|
249
|
+
const authMode = normalizeAuthMode(record);
|
|
235
250
|
return {
|
|
236
251
|
keys,
|
|
237
|
-
|
|
238
|
-
|
|
252
|
+
auth_mode: authMode,
|
|
253
|
+
has_chatgpt_auth: authMode === 'chatgpt_oauth' || authMode === 'browser_marker',
|
|
254
|
+
has_api_key_material: authMode === 'apikey',
|
|
239
255
|
redacted: Object.fromEntries(keys.map((key) => [key, SECRET_KEY_RE.test(key) ? '<redacted>' : summarizeMetadataValue(record[key])]))
|
|
240
256
|
};
|
|
241
257
|
}
|
|
258
|
+
function authMetadataMode(value) {
|
|
259
|
+
if (value == null)
|
|
260
|
+
return 'missing';
|
|
261
|
+
const mode = String(value.auth_mode || '');
|
|
262
|
+
return ['chatgpt_oauth', 'apikey', 'browser_marker'].includes(mode)
|
|
263
|
+
? mode
|
|
264
|
+
: 'unknown';
|
|
265
|
+
}
|
|
266
|
+
function normalizeAuthMode(record) {
|
|
267
|
+
const rawMode = String(record.auth_mode || record.authMode || record.mode || '').trim().toLowerCase();
|
|
268
|
+
const tokens = record.tokens && typeof record.tokens === 'object' ? record.tokens : null;
|
|
269
|
+
const hasOauthTokens = Boolean(tokens && Object.keys(tokens).some((key) => /access|refresh|id[_-]?token/i.test(key)))
|
|
270
|
+
|| Object.keys(record).some((key) => /^(?:access|refresh|id)[_-]?token$/i.test(key));
|
|
271
|
+
const hasApiKey = Object.keys(record).some((key) => /^(?:openai_)?api[_-]?key$|^key$/i.test(key));
|
|
272
|
+
if (/chatgpt|oauth/.test(rawMode) || hasOauthTokens)
|
|
273
|
+
return 'chatgpt_oauth';
|
|
274
|
+
if (rawMode === 'browser')
|
|
275
|
+
return 'browser_marker';
|
|
276
|
+
if (/api[-_]?key|apikey/.test(rawMode) || hasApiKey)
|
|
277
|
+
return 'apikey';
|
|
278
|
+
return 'unknown';
|
|
279
|
+
}
|
|
242
280
|
function summarizeMetadataValue(value) {
|
|
243
281
|
if (value == null)
|
|
244
282
|
return null;
|
|
@@ -289,7 +327,6 @@ function hasActiveCodexLbProviderSelectionSignals(signals) {
|
|
|
289
327
|
return false;
|
|
290
328
|
const has = (key, value) => signals.some((signal) => signal.key_path === key && signal.value_preview === value);
|
|
291
329
|
const present = (key) => signals.some((signal) => signal.key_path === key);
|
|
292
|
-
// env_key / requires_openai_auth previews are redacted by SECRET_KEY_RE ("key"/"auth").
|
|
293
330
|
return has('model_providers.codex-lb.name', 'openai')
|
|
294
331
|
&& has('model_providers.codex-lb.wire_api', 'responses')
|
|
295
332
|
&& present('model_providers.codex-lb.env_key')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GLM_CODEX_APP_PROFILE_ID, GLM_CODEX_APP_PROFILE_LABEL, GLM_CODEX_CONFIG_PROFILE_ID, GLM_CODEX_CONFIG_PROVIDER_ID, GLM_CODEX_CONFIG_REASONING_PROFILES, GLM_CODEX_SELECTABLE_REASONING_EFFORTS, buildGlmCodexAppModelProfile } from '
|
|
1
|
+
export { GLM_CODEX_APP_PROFILE_ID, GLM_CODEX_APP_PROFILE_LABEL, GLM_CODEX_CONFIG_PROFILE_ID, GLM_CODEX_CONFIG_PROVIDER_ID, GLM_CODEX_CONFIG_REASONING_PROFILES, GLM_CODEX_SELECTABLE_REASONING_EFFORTS, OPENROUTER_DEFAULT_MODEL, OPENROUTER_PROVIDER_ID, buildGlmCodexAppModelProfile, normalizeOpenRouterModelId } from './openrouter-provider.js';
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { codexLbConfigPath, ensureGlobalCodexAppGlmProfile } from '../../cli/install-helpers.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { validateGlmCodexAppModelProfile } from './glm-profile-schema.js';
|
|
3
|
+
import { readText, writeJsonAtomic, nowIso, rmrf } from '../fsx.js';
|
|
4
|
+
import { OPENROUTER_DEFAULT_PROFILE_ID, OPENROUTER_PROVIDER_ID, RETIRED_GLM_DESKTOP_CONFIG_PROFILE_IDS, buildGlmCodexAppModelProfile } from './openrouter-provider.js';
|
|
6
5
|
import { resolveOpenRouterApiKey } from '../providers/openrouter/openrouter-secret-store.js';
|
|
7
|
-
import { GLM_52_OPENROUTER_MODEL } from '../providers/glm/glm-52-settings.js';
|
|
8
6
|
export async function installCodexAppGlmProfile(input) {
|
|
9
7
|
const root = path.resolve(input.root);
|
|
10
8
|
const profile = buildGlmCodexAppModelProfile();
|
|
@@ -15,54 +13,63 @@ export async function installCodexAppGlmProfile(input) {
|
|
|
15
13
|
const configWrite = input.apply === false
|
|
16
14
|
? null
|
|
17
15
|
: await ensureGlobalCodexAppGlmProfile({ home, configPath: input.configPath });
|
|
16
|
+
if (input.apply !== false) {
|
|
17
|
+
await rmrf(profilePath).catch(() => undefined);
|
|
18
|
+
await rmrf(reportPath).catch(() => undefined);
|
|
19
|
+
}
|
|
18
20
|
const configStatus = input.apply === false
|
|
19
21
|
? await previewCodexAppGlmConfigStatus({ home, configPath: input.configPath })
|
|
20
|
-
: await
|
|
22
|
+
: await inspectCodexAppOpenRouterConfig({ home, configPath: input.configPath });
|
|
21
23
|
const configWriteBlockers = configWrite?.ok === false
|
|
22
24
|
? [`glm_codex_app_config_${configWrite.status || 'failed'}`]
|
|
23
25
|
: [];
|
|
24
26
|
const blockers = input.apply === false ? [] : [...configWriteBlockers, ...configStatus.blockers];
|
|
25
27
|
const warnings = [
|
|
26
28
|
...key.warnings,
|
|
27
|
-
...(key.key ? [] : ['
|
|
28
|
-
...(input.apply === false ? ['
|
|
29
|
+
...(key.key ? [] : ['openrouter_key_missing_until_sks_codex_app_set_openrouter_key']),
|
|
30
|
+
...(input.apply === false ? ['codex_desktop_openrouter_config_not_written_apply_false'] : []),
|
|
31
|
+
'glm_desktop_profiles_retired_use_openrouter'
|
|
29
32
|
];
|
|
30
|
-
if (input.apply !== false)
|
|
31
|
-
await writeJsonAtomic(profilePath, profile);
|
|
32
33
|
const result = {
|
|
33
34
|
schema: 'sks.codex-app-glm-profile-result.v1',
|
|
34
35
|
generated_at: nowIso(),
|
|
35
36
|
ok: blockers.length === 0,
|
|
36
|
-
status: blockers.length === 0
|
|
37
|
+
status: blockers.length === 0
|
|
38
|
+
? input.apply === false
|
|
39
|
+
? 'valid'
|
|
40
|
+
: 'removed'
|
|
41
|
+
: 'blocked',
|
|
37
42
|
profile,
|
|
38
43
|
profile_path: '.sneakoscope/codex-app/glm-model-profile.json',
|
|
39
44
|
report_path: '.sneakoscope/reports/codex-app-glm-profile.json',
|
|
40
45
|
config_path: configStatus.config_path,
|
|
41
|
-
codex_config_profile:
|
|
42
|
-
codex_reasoning_profiles:
|
|
46
|
+
codex_config_profile: OPENROUTER_DEFAULT_PROFILE_ID,
|
|
47
|
+
codex_reasoning_profiles: [],
|
|
43
48
|
config_write: configWrite,
|
|
44
49
|
config_status: configStatus,
|
|
45
50
|
openrouter_key_source: key.source,
|
|
46
51
|
blockers,
|
|
47
52
|
warnings
|
|
48
53
|
};
|
|
49
|
-
await writeJsonAtomic(reportPath, result).catch(() => undefined);
|
|
50
54
|
return result;
|
|
51
55
|
}
|
|
52
56
|
export async function doctorCodexAppGlmProfile(input) {
|
|
53
57
|
const root = path.resolve(input.root);
|
|
54
58
|
const profilePath = path.join(root, '.sneakoscope', 'codex-app', 'glm-model-profile.json');
|
|
55
59
|
const reportPath = path.join(root, '.sneakoscope', 'reports', 'codex-app-glm-profile.json');
|
|
56
|
-
const existing = await readJson(profilePath, null);
|
|
57
|
-
const validation = validateGlmCodexAppModelProfile(existing);
|
|
58
60
|
const key = await resolveOpenRouterApiKey({ env: input.env || process.env });
|
|
59
|
-
const profile =
|
|
61
|
+
const profile = buildGlmCodexAppModelProfile();
|
|
60
62
|
const home = input.home || input.env?.HOME;
|
|
61
|
-
const configStatus = await
|
|
62
|
-
const
|
|
63
|
+
const configStatus = await inspectCodexAppOpenRouterConfig({ home, configPath: input.configPath });
|
|
64
|
+
const leftoverMeta = await readText(profilePath, '').catch(() => '');
|
|
65
|
+
const blockers = [
|
|
66
|
+
...configStatus.blockers,
|
|
67
|
+
...(leftoverMeta.trim() ? ['retired_glm_model_profile_metadata_present'] : [])
|
|
68
|
+
];
|
|
63
69
|
const warnings = [
|
|
64
70
|
...key.warnings,
|
|
65
|
-
...(key.key ? [] : ['
|
|
71
|
+
...(key.key ? [] : ['openrouter_key_missing_until_sks_codex_app_set_openrouter_key']),
|
|
72
|
+
'glm_desktop_profiles_retired_use_openrouter'
|
|
66
73
|
];
|
|
67
74
|
const result = {
|
|
68
75
|
schema: 'sks.codex-app-glm-profile-result.v1',
|
|
@@ -73,8 +80,8 @@ export async function doctorCodexAppGlmProfile(input) {
|
|
|
73
80
|
profile_path: '.sneakoscope/codex-app/glm-model-profile.json',
|
|
74
81
|
report_path: '.sneakoscope/reports/codex-app-glm-profile.json',
|
|
75
82
|
config_path: configStatus.config_path,
|
|
76
|
-
codex_config_profile:
|
|
77
|
-
codex_reasoning_profiles:
|
|
83
|
+
codex_config_profile: OPENROUTER_DEFAULT_PROFILE_ID,
|
|
84
|
+
codex_reasoning_profiles: [],
|
|
78
85
|
config_write: null,
|
|
79
86
|
config_status: configStatus,
|
|
80
87
|
openrouter_key_source: key.source,
|
|
@@ -93,13 +100,14 @@ async function previewCodexAppGlmConfigStatus(input) {
|
|
|
93
100
|
provider_present: false,
|
|
94
101
|
profiles_present: [],
|
|
95
102
|
profiles_missing: [],
|
|
103
|
+
retired_profiles_remaining: [],
|
|
96
104
|
blockers: []
|
|
97
105
|
};
|
|
98
106
|
}
|
|
99
|
-
async function
|
|
107
|
+
async function inspectCodexAppOpenRouterConfig(input) {
|
|
100
108
|
const configPath = input.configPath || codexLbConfigPath(input.home);
|
|
101
109
|
const text = await readText(configPath, '').catch(() => '');
|
|
102
|
-
const providerBody = tomlTableBody(text, `model_providers.${
|
|
110
|
+
const providerBody = tomlTableBody(text, `model_providers.${OPENROUTER_PROVIDER_ID}`);
|
|
103
111
|
const providerPresent = Boolean(providerBody);
|
|
104
112
|
const blockers = [];
|
|
105
113
|
if (!providerPresent) {
|
|
@@ -113,30 +121,21 @@ async function inspectCodexAppGlmConfig(input) {
|
|
|
113
121
|
if (!hasTomlString(providerBody, 'env_key', 'OPENROUTER_API_KEY'))
|
|
114
122
|
blockers.push('glm_codex_app_config_invalid_openrouter_env_key');
|
|
115
123
|
}
|
|
116
|
-
const
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
profilesMissing.push(profile.id);
|
|
122
|
-
blockers.push(`glm_codex_app_config_missing_profile:${profile.id}`);
|
|
123
|
-
continue;
|
|
124
|
+
const retiredRemaining = [];
|
|
125
|
+
for (const profileId of RETIRED_GLM_DESKTOP_CONFIG_PROFILE_IDS) {
|
|
126
|
+
if (tomlTableBody(text, `profiles.${profileId}`)) {
|
|
127
|
+
retiredRemaining.push(profileId);
|
|
128
|
+
blockers.push(`retired_glm_desktop_profile_present:${profileId}`);
|
|
124
129
|
}
|
|
125
|
-
profilesPresent.push(profile.id);
|
|
126
|
-
if (!hasTomlString(body, 'model_provider', GLM_CODEX_CONFIG_PROVIDER_ID))
|
|
127
|
-
blockers.push(`glm_codex_app_config_invalid_profile_provider:${profile.id}`);
|
|
128
|
-
if (!hasTomlString(body, 'model', GLM_52_OPENROUTER_MODEL))
|
|
129
|
-
blockers.push(`glm_codex_app_config_invalid_profile_model:${profile.id}`);
|
|
130
|
-
if (!hasTomlString(body, 'model_reasoning_effort', profile.reasoning_effort))
|
|
131
|
-
blockers.push(`glm_codex_app_config_invalid_profile_reasoning:${profile.id}`);
|
|
132
130
|
}
|
|
133
131
|
return {
|
|
134
132
|
schema: 'sks.codex-app-glm-config-status.v1',
|
|
135
133
|
ok: blockers.length === 0,
|
|
136
134
|
config_path: configPath,
|
|
137
135
|
provider_present: providerPresent,
|
|
138
|
-
profiles_present:
|
|
139
|
-
profiles_missing:
|
|
136
|
+
profiles_present: [],
|
|
137
|
+
profiles_missing: [],
|
|
138
|
+
retired_profiles_remaining: retiredRemaining,
|
|
140
139
|
blockers
|
|
141
140
|
};
|
|
142
141
|
}
|
|
@@ -160,5 +159,5 @@ function hasTomlString(text, key, value) {
|
|
|
160
159
|
return pattern.test(text);
|
|
161
160
|
}
|
|
162
161
|
function escapeRegExp(value) {
|
|
163
|
-
return
|
|
162
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
164
163
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { GLM_52_OPENROUTER_MODEL, GLM_MAD_MODE } from '../providers/glm/glm-52-settings.js';
|
|
1
|
+
import { OPENROUTER_DEFAULT_PROFILE_ID, OPENROUTER_PROVIDER_ID, GLM_CODEX_SELECTABLE_REASONING_EFFORTS, GLM_CODEX_CONFIG_REASONING_PROFILES, GLM_52_OPENROUTER_MODEL, buildGlmCodexAppModelProfile } from './openrouter-provider.js';
|
|
3
2
|
export function validateGlmCodexAppModelProfile(value) {
|
|
4
3
|
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
5
4
|
return { ok: false, blockers: ['glm_codex_app_profile_missing'], profile: null };
|
|
@@ -8,15 +7,15 @@ export function validateGlmCodexAppModelProfile(value) {
|
|
|
8
7
|
const expected = buildGlmCodexAppModelProfile();
|
|
9
8
|
const blockers = [
|
|
10
9
|
profile.schema === expected.schema ? null : 'glm_codex_app_profile_invalid_schema',
|
|
11
|
-
profile.id ===
|
|
10
|
+
profile.id === OPENROUTER_DEFAULT_PROFILE_ID ? null : 'glm_codex_app_profile_invalid_id',
|
|
12
11
|
profile.provider === 'openrouter' ? null : 'glm_codex_app_profile_invalid_provider',
|
|
13
12
|
profile.model === GLM_52_OPENROUTER_MODEL ? null : 'glm_codex_app_profile_invalid_model',
|
|
14
|
-
profile.codexConfigProvider ===
|
|
15
|
-
profile.codexConfigProfile ===
|
|
13
|
+
profile.codexConfigProvider === OPENROUTER_PROVIDER_ID ? null : 'glm_codex_app_profile_invalid_codex_config_provider',
|
|
14
|
+
profile.codexConfigProfile === OPENROUTER_DEFAULT_PROFILE_ID ? null : 'glm_codex_app_profile_invalid_codex_config_profile',
|
|
16
15
|
hasExpectedReasoningEfforts(profile.supportedReasoningEfforts) ? null : 'glm_codex_app_profile_invalid_reasoning_efforts',
|
|
17
16
|
hasExpectedReasoningProfiles(profile.reasoningProfiles) ? null : 'glm_codex_app_profile_invalid_reasoning_profiles',
|
|
18
|
-
profile.mode ===
|
|
19
|
-
profile.strictModelLock ===
|
|
17
|
+
profile.mode === 'openrouter-desktop' ? null : 'glm_codex_app_profile_invalid_mode',
|
|
18
|
+
profile.strictModelLock === false ? null : 'glm_codex_app_profile_unexpected_strict_lock',
|
|
20
19
|
profile.gptFallbackAllowed === false ? null : 'glm_codex_app_profile_allows_gpt_fallback',
|
|
21
20
|
profile.defaultProfile === 'speed' ? null : 'glm_codex_app_profile_default_not_speed',
|
|
22
21
|
profile.defaultSettings?.tool_choice === 'none' ? null : 'glm_codex_app_profile_default_tools_not_omitted',
|
|
@@ -39,8 +38,5 @@ function hasExpectedReasoningProfiles(value) {
|
|
|
39
38
|
if (!Array.isArray(value)) {
|
|
40
39
|
return false;
|
|
41
40
|
}
|
|
42
|
-
return
|
|
43
|
-
typeof item === 'object' &&
|
|
44
|
-
item.id === expected.id &&
|
|
45
|
-
item.reasoning_effort === expected.reasoning_effort));
|
|
41
|
+
return value.length === 0 && GLM_CODEX_CONFIG_REASONING_PROFILES.length === 0;
|
|
46
42
|
}
|
|
@@ -19,6 +19,7 @@ export const NATIVE_SOURCE_FILES = [
|
|
|
19
19
|
'UpdatesViewController.swift',
|
|
20
20
|
'MCPServersViewController.swift',
|
|
21
21
|
'ProvidersViewController.swift',
|
|
22
|
+
'ProvidersOpenRouter.swift',
|
|
22
23
|
'RemoteTelegramViewController.swift',
|
|
23
24
|
'DiagnosticsViewController.swift',
|
|
24
25
|
'SettingsViewController.swift',
|