sneakoscope 7.0.2 → 7.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/bin/sks-dispatch.js +0 -3
- package/dist/cli/command-registry.js +0 -2
- package/dist/cli/install-helpers-codex-lb-chain.js +24 -2
- package/dist/cli/install-helpers-codex-lb-config.js +0 -7
- package/dist/cli/install-helpers-codex-lb-selftest-chain.js +0 -3
- package/dist/cli/install-helpers-codex-lb-selftest.js +0 -17
- package/dist/cli/install-helpers.js +81 -96
- package/dist/cli/router.js +0 -22
- package/dist/commands/codex-lb.js +176 -22
- package/dist/commands/codex.js +3 -8
- package/dist/commands/doctor.js +4 -14
- package/dist/commands/perf.js +5 -1
- package/dist/commands/zellij-slot-column-anchor.js +0 -2
- package/dist/commands/zellij-slot-pane.js +0 -7
- package/dist/commands/zellij.js +0 -2
- package/dist/config/skills-manifest.json +52 -52
- package/dist/core/agent-bridge/agent-manifest.js +192 -1
- package/dist/core/agent-bridge/agent-mode.js +0 -5
- package/dist/core/agent-bridge/host-capability-policy.js +189 -0
- package/dist/core/agent-bridge/host-capability-runtime.js +1395 -0
- package/dist/core/agent-bridge/mcp-server.js +1 -11
- package/dist/core/agents/agent-effort-policy.js +0 -3
- package/dist/core/agents/agent-orchestrator.js +0 -4
- package/dist/core/agents/agent-proof-evidence.js +0 -2
- package/dist/core/agents/agent-runner-ollama.js +0 -3
- package/dist/core/agents/agent-scheduler.js +0 -5
- package/dist/core/agents/native-cli-worker-runtime.js +5 -17
- package/dist/core/agents/work-partition/repo-inventory.js +0 -2
- package/dist/core/auto-review.js +0 -13
- package/dist/core/bench.js +0 -14
- package/dist/core/code-structure.js +0 -3
- package/dist/core/codex/agent-config-file-repair.js +0 -8
- package/dist/core/codex/codex-cli-update.js +122 -20
- package/dist/core/codex/codex-config-eperm-repair.js +0 -4
- package/dist/core/codex/codex-config-guard.js +0 -3
- package/dist/core/codex/codex-config-readability.js +0 -13
- package/dist/core/codex/codex-project-config-policy.js +0 -33
- package/dist/core/codex/official-goal-mode.js +0 -2
- package/dist/core/codex-app/codex-app-fast-ui-repair.js +5 -7
- package/dist/core/codex-app/codex-app-ui-state-snapshot.js +44 -7
- package/dist/core/codex-app/sks-menubar.js +0 -1
- package/dist/core/codex-app.js +0 -9
- package/dist/core/codex-compat/codex-hook-output-builders.js +9 -1
- package/dist/core/codex-compat/codex-hook-output-normalizer.js +1 -1
- package/dist/core/codex-compat/codex-hook-semantic-validator.js +3 -2
- package/dist/core/codex-compat/codex-hook-warning-detector.js +10 -2
- package/dist/core/codex-control/codex-lb-launch-recovery.js +0 -3
- package/dist/core/codex-control/codex-reliability-shield.js +0 -8
- package/dist/core/codex-control/codex-sdk-adapter.js +0 -3
- package/dist/core/codex-control/codex-sdk-config-policy.js +0 -2
- package/dist/core/codex-control/codex-sdk-env-policy.js +61 -16
- package/dist/core/codex-control/codex-task-runner.js +0 -7
- package/dist/core/codex-control/codex-thread-registry.js +0 -4
- package/dist/core/codex-lb/codex-lb-env.js +118 -20
- package/dist/core/codex-lb/codex-lb-tool-catalog.js +0 -4
- package/dist/core/codex-lb/codex-lb-tool-output-recovery.js +1 -1
- package/dist/core/codex-model-guard.js +0 -14
- package/dist/core/codex-native/codex-native-feature-broker.js +67 -22
- package/dist/core/codex-native/codex-native-interop-policy.js +81 -9
- package/dist/core/codex-native/confined-report-writer.js +21 -0
- package/dist/core/codex-native/core-skill-integrity.js +169 -20
- package/dist/core/codex-native/project-skill-dedupe.js +55 -13
- package/dist/core/codex-native/skill-registry-ledger.js +137 -16
- package/dist/core/codex-native/sks-skill-paths.js +185 -0
- package/dist/core/codex-runtime/codex-desktop-config-policy.js +0 -2
- package/dist/core/commands/agent-bridge-command.js +28 -8
- package/dist/core/commands/basic-cli.js +67 -26
- package/dist/core/commands/bench-command.js +5 -1
- package/dist/core/commands/command-utils.js +0 -5
- package/dist/core/commands/image-ux-review-command.js +0 -9
- package/dist/core/commands/mad-sks-command.js +0 -38
- package/dist/core/commands/naruto-command.js +46 -12
- package/dist/core/commands/ppt-command.js +0 -9
- package/dist/core/commands/run-command.js +8 -2
- package/dist/core/commands/seo-command.js +0 -6
- package/dist/core/commands/wiki-command.js +0 -14
- package/dist/core/computer-use-live-evidence.js +0 -5
- package/dist/core/config/secret-preservation.js +0 -11
- package/dist/core/daemon/sksd-hook-daemon-entrypoint.js +0 -2
- package/dist/core/daemon/sksd-hook-daemon.js +1 -29
- package/dist/core/daemon/sksd-hook-dispatch.js +0 -17
- package/dist/core/db-safety.js +0 -7
- package/dist/core/doctor/browser-use-repair.js +0 -2
- package/dist/core/doctor/doctor-codex-startup-repair.js +0 -3
- package/dist/core/doctor/doctor-readiness-matrix.js +12 -0
- package/dist/core/doctor/doctor-skill-reconcile.js +32 -0
- package/dist/core/doctor/imagegen-repair.js +0 -2
- package/dist/core/doctor/mcp-transport-collision-repair.js +0 -3
- package/dist/core/doctor/retired-managed-residue-private.js +0 -1
- package/dist/core/doctor/supabase-mcp-repair.js +0 -11
- package/dist/core/feature-fixture-executor.js +0 -48
- package/dist/core/feature-fixtures.js +0 -5
- package/dist/core/fsx.js +11 -12
- package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +0 -5
- package/dist/core/hooks-runtime/hook-context.js +202 -0
- package/dist/core/hooks-runtime/hook-io.js +1 -12
- package/dist/core/hooks-runtime/light-turn.js +0 -2
- package/dist/core/hooks-runtime/naruto-decision-gate.js +4 -1
- package/dist/core/hooks-runtime/naruto-terminal-finalization.js +91 -0
- package/dist/core/hooks-runtime/official-subagent-lifecycle.js +370 -0
- package/dist/core/hooks-runtime/standalone-parent-host-capability.js +98 -0
- package/dist/core/hooks-runtime/subagent-context.js +59 -0
- package/dist/core/hooks-runtime/subagent-skill-availability-contract.js +29 -0
- package/dist/core/hooks-runtime/subagent-skill-availability-evidence.js +195 -0
- package/dist/core/hooks-runtime/subagent-skill-availability-guards.js +316 -0
- package/dist/core/hooks-runtime/subagent-skill-availability.js +217 -0
- package/dist/core/hooks-runtime.js +259 -535
- package/dist/core/image-ux-review/codex-app-generated-image-discovery.js +0 -17
- package/dist/core/image-ux-review/imagegen-adapter.js +0 -14
- package/dist/core/imagegen/imagegen-auth-readiness.js +0 -9
- package/dist/core/imagegen/imagegen-capability.js +0 -3
- package/dist/core/init/managed-skill-install.js +42 -0
- package/dist/core/init/skills.js +247 -74
- package/dist/core/init.js +15 -40
- package/dist/core/lean-engineering-policy.js +0 -2
- package/dist/core/locks/file-lock.js +0 -21
- package/dist/core/loops/loop-planner.js +0 -6
- package/dist/core/loops/loop-runtime.js +0 -1
- package/dist/core/loops/loop-worker-runtime.js +0 -19
- package/dist/core/mad-sks/executors/db-write-executor.js +0 -4
- package/dist/core/mad-sks/executors/executor-base.js +0 -10
- package/dist/core/mad-sks/immutable-harness-guard.js +0 -5
- package/dist/core/mad-sks/sql-plane/coordinator.js +0 -5
- package/dist/core/mad-sks/sql-plane/ledger.js +0 -4
- package/dist/core/mad-sks/sql-plane/lock.js +0 -4
- package/dist/core/mad-sks/sql-plane/mcp-executor.js +0 -9
- package/dist/core/mad-sks/sql-plane/policy-resolver.js +0 -2
- package/dist/core/mad-sks/sql-plane/postconditions.js +0 -4
- package/dist/core/mad-sks/sql-plane/recovery.js +0 -2
- package/dist/core/mad-sks/sql-plane/runtime-profile.js +0 -8
- package/dist/core/managed-assets/managed-assets-manifest.js +1 -7
- package/dist/core/mcp-config/health-check.js +10 -3
- package/dist/core/migration/migration-transaction-journal.js +0 -8
- package/dist/core/mission.js +0 -2
- package/dist/core/naruto/naruto-active-pool.js +0 -2
- package/dist/core/naruto/naruto-concurrency-governor.js +0 -1
- package/dist/core/naruto/naruto-real-write-proof.js +0 -4
- package/dist/core/naruto/naruto-write-e2e.js +0 -1
- package/dist/core/perf/perf-budget.js +0 -5
- package/dist/core/permission-gates.js +0 -2
- package/dist/core/pipeline-internals/runtime-core.js +15 -5
- package/dist/core/pipeline-internals/runtime-gates.js +0 -12
- package/dist/core/preflight/parallel-preflight-engine.js +0 -11
- package/dist/core/proof/evidence-collector.js +0 -2
- package/dist/core/proof/route-finalizer.js +0 -1
- package/dist/core/proof/selftest-proof-fixtures.js +0 -5
- package/dist/core/providers/glm/bench/glm-benchmark-runner.js +0 -2
- package/dist/core/providers/glm/glm-request-cache.js +0 -3
- package/dist/core/providers/glm/naruto/glm-naruto-command.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-decomposer.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-orchestrator.js +0 -6
- package/dist/core/providers/glm/naruto/glm-naruto-trace.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-worker-pool.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-worktree.js +0 -1
- package/dist/core/providers/openrouter/openrouter-secret-store.js +0 -1
- package/dist/core/providers/openrouter/openrouter-stream.js +0 -2
- package/dist/core/questions.js +3 -3
- package/dist/core/release/gate-manifest.js +0 -5
- package/dist/core/release/package-size-budget.js +1 -1
- package/dist/core/release/release-gate-batch-runner.js +11 -2
- package/dist/core/release/release-gate-cache-v2.js +0 -4
- package/dist/core/release/release-gate-hermetic-env.js +0 -5
- package/dist/core/release-parallel-full-coverage.js +0 -2
- package/dist/core/remote/ssh-worker-client.js +0 -3
- package/dist/core/research/research-adversarial-review.js +6 -2
- package/dist/core/responses-retry-policy.js +0 -10
- package/dist/core/retention.js +0 -7
- package/dist/core/routes/constants.js +0 -3
- package/dist/core/routes.js +89 -15
- package/dist/core/safety/command-contract/contracts.js +2 -0
- package/dist/core/safety/mutation-guard.js +0 -25
- package/dist/core/safety/mutation-ledger.js +0 -9
- package/dist/core/safety/requested-scope-contract.js +0 -0
- package/dist/core/security/high-risk-contracts.js +0 -1
- package/dist/core/skills/core-skill-card.js +0 -0
- package/dist/core/skills/core-skill-deployment.js +0 -13
- package/dist/core/skills/core-skill-epoch.js +0 -11
- package/dist/core/skills/core-skill-meta-update.js +0 -6
- package/dist/core/skills/core-skill-patch-apply.js +0 -7
- package/dist/core/skills/core-skill-patch.js +0 -8
- package/dist/core/skills/core-skill-reflection.js +0 -16
- package/dist/core/skills/core-skill-runtime.js +0 -6
- package/dist/core/skills/core-skill-scorer.js +0 -7
- package/dist/core/skills/core-skill-trainer.js +0 -11
- package/dist/core/skills/core-skill-types.js +0 -9
- package/dist/core/skills/core-skill-validation.js +0 -5
- package/dist/core/skills/rejected-skill-patch-buffer.js +0 -2
- package/dist/core/stop-gate/stop-gate-check.js +0 -8
- package/dist/core/stop-gate/stop-gate-resolver.js +0 -7
- package/dist/core/stop-gate/stop-gate-writer.js +0 -5
- package/dist/core/subagents/model-policy.js +0 -7
- package/dist/core/subagents/naruto-help-contract.js +1 -1
- package/dist/core/subagents/naruto-proof-projection.js +580 -12
- package/dist/core/subagents/official-subagent-config.js +0 -8
- package/dist/core/subagents/official-subagent-preparation.js +6 -5
- package/dist/core/subagents/official-subagent-prompt.js +29 -0
- package/dist/core/subagents/official-subagent-runner.js +343 -37
- package/dist/core/subagents/subagent-evidence.js +378 -9
- package/dist/core/subagents/thread-budget.js +5 -2
- package/dist/core/subagents/triwiki-attention.js +0 -4
- package/dist/core/subagents/wave-parent-guidance.js +54 -9
- package/dist/core/telegram/runtime.js +0 -1
- package/dist/core/triwiki/code-index-scanner.js +0 -3
- package/dist/core/triwiki/code-pack-head-freshness.js +0 -10
- package/dist/core/triwiki/code-pack.js +0 -2
- package/dist/core/triwiki/triwiki-cache-key.js +0 -1
- package/dist/core/triwiki/triwiki-proof-bank.js +0 -1
- package/dist/core/triwiki-attention.js +0 -10
- package/dist/core/triwiki-provenance.js +0 -5
- package/dist/core/triwiki-runtime.js +0 -12
- package/dist/core/triwiki-wrongness/wrongness-ledger.js +0 -7
- package/dist/core/triwiki-wrongness/wrongness-schema.js +0 -3
- package/dist/core/trust-kernel/trust-report.js +0 -7
- package/dist/core/update/update-migration-state.js +21 -39
- package/dist/core/update-check.js +2 -14
- package/dist/core/version-manager.js +2 -0
- package/dist/core/version.js +1 -1
- package/dist/core/work-order-ledger.js +0 -17
- package/dist/core/zellij/zellij-clipboard-config.js +0 -18
- package/dist/core/zellij/zellij-lane-renderer.js +5 -46
- package/dist/core/zellij/zellij-lane-runtime.js +0 -1
- package/dist/core/zellij/zellij-launcher.js +0 -26
- package/dist/core/zellij/zellij-official-subagent-activity.js +0 -5
- package/dist/core/zellij/zellij-official-subagent-telemetry.js +0 -5
- package/dist/core/zellij/zellij-screen-proof.js +0 -7
- package/dist/core/zellij/zellij-slot-column-anchor.js +0 -1
- package/dist/core/zellij/zellij-slot-pane-renderer.js +0 -9
- package/dist/core/zellij/zellij-slot-telemetry.js +0 -12
- package/dist/core/zellij/zellij-ui-mode.js +0 -7
- package/dist/core/zellij/zellij-update.js +0 -29
- package/dist/core/zellij/zellij-worker-pane-manager.js +0 -39
- package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +213 -27
- package/dist/native/sks-menubar/Sources/UpdatesViewController.swift +95 -12
- package/dist/scripts/agent-message-bus-reader-check.js +0 -1
- package/dist/scripts/all-feature-deep-completion-check.js +0 -1
- package/dist/scripts/appshots-thread-attachment-discovery-check.js +0 -1
- package/dist/scripts/architecture-guard-check.js +0 -1
- package/dist/scripts/build-dist.js +0 -1
- package/dist/scripts/build-once-runner-check.js +0 -1
- package/dist/scripts/canonical-test-runner.js +0 -2
- package/dist/scripts/certificate-sla-check.js +0 -1
- package/dist/scripts/changelog-check.js +0 -1
- package/dist/scripts/check-cli-entrypoint.js +0 -1
- package/dist/scripts/check-command-module-budget.js +0 -7
- package/dist/scripts/check-feature-quality.js +0 -1
- package/dist/scripts/check-legacy-free.js +0 -1
- package/dist/scripts/check-pipeline-runtime.js +0 -1
- package/dist/scripts/check-runtime-schemas.js +0 -1
- package/dist/scripts/codex-0-134-runner-truth-check.js +0 -1
- package/dist/scripts/codex-0-137-compat-check.js +0 -1
- package/dist/scripts/codex-0138-capability-artifact-check.js +0 -1
- package/dist/scripts/codex-0138-capability-check.js +0 -1
- package/dist/scripts/codex-0138-doctor-check.js +0 -1
- package/dist/scripts/codex-0138-feature-probes-check.js +0 -1
- package/dist/scripts/codex-0144-core-real-probes-check.js +0 -1
- package/dist/scripts/codex-app-handoff-check.js +0 -1
- package/dist/scripts/codex-app-handoff-launch-check.js +0 -1
- package/dist/scripts/codex-config-load-probe.js +0 -5
- package/dist/scripts/codex-control-all-pipelines-check.js +0 -1
- package/dist/scripts/codex-control-event-stream-ledger-check.js +0 -1
- package/dist/scripts/codex-control-tool-output-continuity-audit-check.js +0 -1
- package/dist/scripts/codex-permission-profiles-check.js +0 -1
- package/dist/scripts/codex-plugin-app-template-policy-check.js +0 -1
- package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -1
- package/dist/scripts/codex-sdk-all-pipelines-check.js +0 -1
- package/dist/scripts/codex-sdk-backend-router-check.js +0 -1
- package/dist/scripts/codex-sdk-capability-check.js +0 -1
- package/dist/scripts/codex-sdk-event-stream-ledger-check.js +0 -1
- package/dist/scripts/codex-sdk-real-smoke-check.js +0 -1
- package/dist/scripts/concurrent-session-collision-check.js +9 -0
- package/dist/scripts/context7-evidence-dedupe-check.js +0 -1
- package/dist/scripts/core-skill-card-schema-check.js +0 -11
- package/dist/scripts/core-skill-deployment-snapshot-check.js +0 -10
- package/dist/scripts/core-skill-heldout-validation-check.js +0 -11
- package/dist/scripts/core-skill-no-inference-optimizer-check.js +0 -11
- package/dist/scripts/core-skill-patch-check.js +0 -11
- package/dist/scripts/core-skill-route-runtime-integration-check.js +0 -11
- package/dist/scripts/current-surface-update-e2e-check.js +0 -4
- package/dist/scripts/current-upgrade-matrix-check.js +0 -1
- package/dist/scripts/dfix-fixture-check.js +0 -1
- package/dist/scripts/dfix-patch-handoff-check.js +0 -1
- package/dist/scripts/dfix-verification-check.js +0 -1
- package/dist/scripts/dfix-verification-recommendation-check.js +0 -1
- package/dist/scripts/docs-truthfulness-check.js +3 -3
- package/dist/scripts/doctor-fastpath-check.js +0 -1
- package/dist/scripts/doctor-fix-proves-codex-read-check.js +0 -11
- package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +0 -4
- package/dist/scripts/doctor-idempotence-check.js +0 -1
- package/dist/scripts/doctor-ops-semantics-check.js +0 -1
- package/dist/scripts/ensure-bin-executable.js +0 -1
- package/dist/scripts/evidence-flagship-coverage-check.js +0 -1
- package/dist/scripts/fast-codex-service-tier-proof-check.js +0 -1
- package/dist/scripts/fixtures/fake-codex-config-loader.js +0 -5
- package/dist/scripts/fsx-hotpath-check.js +0 -1
- package/dist/scripts/gate-policy-audit-check.js +1 -1
- package/dist/scripts/geo-claim-evidence-check.js +0 -1
- package/dist/scripts/geo-cli-blackbox-check.js +0 -1
- package/dist/scripts/geo-crawler-policy-check.js +0 -1
- package/dist/scripts/git-worktree-diff-envelope-check.js +0 -1
- package/dist/scripts/git-worktree-dirty-lock-check.js +0 -1
- package/dist/scripts/git-worktree-dirty-main-detection-check.js +0 -1
- package/dist/scripts/git-worktree-integration-primary-check.js +0 -1
- package/dist/scripts/git-worktree-manifest-append-check.js +0 -1
- package/dist/scripts/git-worktree-untracked-diff-check.js +0 -1
- package/dist/scripts/high-risk-contracts-check.js +0 -1
- package/dist/scripts/hook-latency-budget-check.js +0 -1
- package/dist/scripts/hook-latency-quantum-check.js +0 -1
- package/dist/scripts/image-artifact-path-contract-check.js +0 -1
- package/dist/scripts/imagegen-real-smoke-check.js +0 -1
- package/dist/scripts/import-graph-budget-check.js +0 -1
- package/dist/scripts/installed-package-smoke-check.js +0 -1
- package/dist/scripts/legacy-gate-purge-check.js +0 -1
- package/dist/scripts/lib/codex-sdk-gate-lib.js +0 -3
- package/dist/scripts/lib/ensure-dist-fresh.js +0 -1
- package/dist/scripts/lib/valid-png-fixture.js +0 -1
- package/dist/scripts/local-collab-all-pipelines-final-gpt-check.js +0 -1
- package/dist/scripts/loop-directive-check-lib.js +0 -1
- package/dist/scripts/loop-worker-fixture-child.js +0 -1
- package/dist/scripts/mad-preflight-blocks-unreadable-config-check.js +0 -10
- package/dist/scripts/mad-sks-sql-plane-lifecycle-hook-decision-check.js +0 -1
- package/dist/scripts/mad-sks-sql-plane-result-lifecycle-check.js +0 -1
- package/dist/scripts/mcp-plugin-inventory-check.js +0 -1
- package/dist/scripts/mcp-tool-naming-parity-check.js +0 -1
- package/dist/scripts/model-call-concurrency-check.js +0 -1
- package/dist/scripts/mutation-callsite-coverage-check.js +0 -5
- package/dist/scripts/naruto-codex-e2e-check.js +0 -1
- package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -1
- package/dist/scripts/official-subagent-workflow-check.js +3 -1
- package/dist/scripts/ops-diagnostics-bundle-check.js +0 -1
- package/dist/scripts/packlist-performance-check.js +1 -3
- package/dist/scripts/perf-budget-check.js +0 -1
- package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -1
- package/dist/scripts/ppt-real-export-adapter-check.js +0 -1
- package/dist/scripts/ppt-real-imagegen-smoke-check.js +0 -1
- package/dist/scripts/ppt-real-imagegen-wiring-check.js +0 -1
- package/dist/scripts/ppt-reexport-rereview-check.js +0 -1
- package/dist/scripts/prepublish-fast-check.js +0 -23
- package/dist/scripts/prepublish-release-check-or-fast.js +0 -7
- package/dist/scripts/probe-memoization-check.js +0 -1
- package/dist/scripts/product-design-plugin-routing-check.js +0 -1
- package/dist/scripts/project-skill-dedupe-blackbox.js +36 -9
- package/dist/scripts/prompt-placeholder-guard-check.js +0 -1
- package/dist/scripts/python-codex-sdk-all-pipelines-check.js +0 -3
- package/dist/scripts/qa-loop-app-handoff-capability-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-cli-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-confirmation-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-gate-lifecycle-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-launch-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-status-lifecycle-check.js +0 -1
- package/dist/scripts/qa-loop-budget-policy-check.js +0 -1
- package/dist/scripts/qa-loop-effort-escalation-check.js +0 -1
- package/dist/scripts/qa-loop-image-path-exposure-check.js +0 -1
- package/dist/scripts/qa-loop-image-path-prompt-injection-check.js +0 -1
- package/dist/scripts/release-cache-glob-hashing-check.js +0 -1
- package/dist/scripts/release-cache-input-classifier-check.js +0 -1
- package/dist/scripts/release-cache-neutralization-report-check.js +0 -1
- package/dist/scripts/release-cache-version-neutral-fixture-check.js +0 -1
- package/dist/scripts/release-check-stamp.js +0 -4
- package/dist/scripts/release-dist-freshness-check.js +0 -1
- package/dist/scripts/release-full-parallelism-blackbox.js +3 -3
- package/dist/scripts/release-gate-batch-runner-check.js +22 -0
- package/dist/scripts/release-gate-budget-check.js +0 -6
- package/dist/scripts/release-gate-dag-runner-check.js +0 -1
- package/dist/scripts/release-latency-slo-check.js +0 -1
- package/dist/scripts/release-metadata-1-19-check.js +0 -1
- package/dist/scripts/release-metadata-check.js +0 -3
- package/dist/scripts/release-parallel-speed-budget-check.js +0 -5
- package/dist/scripts/release-proof-truth-check.js +0 -1
- package/dist/scripts/release-provenance-check.js +0 -1
- package/dist/scripts/release-real-check.js +0 -1
- package/dist/scripts/release-runtime-truth-matrix-check.js +0 -1
- package/dist/scripts/release-version-truth-check.js +0 -1
- package/dist/scripts/research-blueprint-densifier-check.js +0 -1
- package/dist/scripts/research-claim-builder-check.js +0 -1
- package/dist/scripts/research-complete-package-fixture-check.js +0 -1
- package/dist/scripts/research-final-reviewer-blackbox.js +0 -1
- package/dist/scripts/responses-retry-policy-centralized-check.js +0 -1
- package/dist/scripts/retention-apply-smoke-check.js +0 -1
- package/dist/scripts/retention-budget-check.js +0 -1
- package/dist/scripts/retention-dry-run-check.js +0 -1
- package/dist/scripts/rollback-recovery-smoke-check.js +0 -1
- package/dist/scripts/route-intent-regression-check.js +0 -1
- package/dist/scripts/runtime-current-terminal-check.js +0 -1
- package/dist/scripts/runtime-dist-parity-check.js +0 -1
- package/dist/scripts/runtime-no-src-mjs-check.js +0 -1
- package/dist/scripts/runtime-proof-summary-check.js +0 -1
- package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -15
- package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -1
- package/dist/scripts/scheduler-batch-dispatch-check.js +0 -1
- package/dist/scripts/scheduler-parallel-proof-consistency-check.js +0 -1
- package/dist/scripts/scheduler-utilization-integral-check.js +0 -1
- package/dist/scripts/search-visibility-gate-lib.js +0 -1
- package/dist/scripts/seo-audit-fixture-check.js +0 -1
- package/dist/scripts/seo-cli-blackbox-check.js +0 -1
- package/dist/scripts/seo-geo-geo-disambiguation-check.js +0 -1
- package/dist/scripts/seo-geo-route-identity-check.js +0 -1
- package/dist/scripts/seo-geo-skill-rich-content-check.js +0 -1
- package/dist/scripts/seo-marketing-truthfulness-check.js +0 -1
- package/dist/scripts/seo-metadata-sync-check.js +0 -1
- package/dist/scripts/seo-no-mutation-by-default-check.js +0 -1
- package/dist/scripts/shared-memory-fixture-check.js +0 -1
- package/dist/scripts/side-effect-runtime-report-check.js +0 -1
- package/dist/scripts/sizecheck.js +0 -1
- package/dist/scripts/sks-1-11-gate-lib.js +0 -1
- package/dist/scripts/sks-1-12-real-execution-check-lib.js +0 -1
- package/dist/scripts/sks-1-18-gate-lib.js +0 -1
- package/dist/scripts/sks-menubar-install-check.js +0 -3
- package/dist/scripts/sksd-daemon-check.js +0 -1
- package/dist/scripts/super-search-live-smoke-check.js +0 -1
- package/dist/scripts/super-search-local-http-smoke-check.js +0 -1
- package/dist/scripts/super-search-offline-contract-check.js +0 -1
- package/dist/scripts/super-search-provider-interface-check.js +0 -1
- package/dist/scripts/triwiki-cache-key-check.js +0 -1
- package/dist/scripts/triwiki-proof-bank-blackbox.js +0 -1
- package/dist/scripts/triwiki-proof-bank-check.js +0 -1
- package/dist/scripts/triwiki-proof-card-check.js +0 -1
- package/dist/scripts/trust-fixture-check.js +0 -1
- package/dist/scripts/ultra-router-auto-router-check.js +0 -1
- package/dist/scripts/update-fastpath-check.js +0 -1
- package/dist/scripts/upgrade-migration-matrix-check.js +0 -1
- package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +0 -1
- package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -1
- package/dist/scripts/ux-review-patch-diff-recheck-check.js +0 -1
- package/dist/scripts/ux-review-real-imagegen-smoke-check.js +0 -1
- package/dist/scripts/ux-review-run-wires-imagegen-check.js +0 -1
- package/dist/scripts/write-build-manifest.js +0 -1
- package/dist/scripts/wrongness-fixture-check.js +0 -1
- package/dist/scripts/zellij-capability-check.js +0 -1
- package/dist/scripts/zellij-developer-controls-check.js +0 -1
- package/dist/scripts/zellij-doctor-readiness-check.js +0 -13
- package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -1
- package/dist/scripts/zellij-fake-adapter-check.js +0 -1
- package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -1
- package/dist/scripts/zellij-lane-renderer-check.js +0 -1
- package/dist/scripts/zellij-launch-command-truth-check.js +0 -12
- package/dist/scripts/zellij-layout-valid-check.js +0 -1
- package/dist/scripts/zellij-pane-creation-lock-metrics-check.js +0 -1
- package/dist/scripts/zellij-pane-lock-concurrency-blackbox.js +0 -1
- package/dist/scripts/zellij-pane-lock-does-not-block-worker-check.js +0 -1
- package/dist/scripts/zellij-pane-lock-open-worker-integration-blackbox.js +0 -1
- package/dist/scripts/zellij-pane-proof-check.js +0 -1
- package/dist/scripts/zellij-qa-app-handoff-status-check.js +0 -1
- package/dist/scripts/zellij-real-session-cleanup-check.js +0 -1
- package/dist/scripts/zellij-real-session-launch-check.js +0 -1
- package/dist/scripts/zellij-right-column-geometry-proof.js +0 -1
- package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -1
- package/dist/scripts/zellij-right-column-manager-check.js +0 -1
- package/dist/scripts/zellij-screen-proof-check.js +0 -1
- package/dist/scripts/zellij-slot-only-ui-check.js +0 -1
- package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -1
- package/dist/scripts/zellij-slot-pane-stale-detection-check.js +0 -7
- package/dist/scripts/zellij-slot-telemetry-incremental-check.js +0 -1
- package/dist/scripts/zellij-slot-telemetry-live-flush-check.js +0 -1
- package/dist/scripts/zellij-slot-telemetry-performance-check.js +0 -1
- package/dist/scripts/zellij-stacked-capability-routing-check.js +0 -1
- package/dist/scripts/zellij-stacked-fallback-integration-blackbox.js +0 -1
- package/dist/scripts/zellij-stacked-version-matrix-check.js +0 -1
- package/dist/scripts/zellij-stacked-version-parser-check.js +0 -1
- package/dist/scripts/zellij-ui-design-check.js +0 -12
- package/dist/scripts/zellij-update-prompt-matrix-check.js +0 -1
- package/dist/scripts/zellij-update-prompt-mode-check.js +0 -1
- package/dist/scripts/zellij-update-prompt-safety-check.js +0 -1
- package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -2
- package/package.json +1 -1
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import Cocoa
|
|
2
2
|
|
|
3
3
|
final class ProvidersViewController: NSViewController, ControlCenterPage {
|
|
4
|
+
private struct CodexLbReadiness {
|
|
5
|
+
let selected: Bool
|
|
6
|
+
let providerReady: Bool
|
|
7
|
+
let authRoutingCoherent: Bool
|
|
8
|
+
let sharedOpenAiRoutingSafe: Bool
|
|
9
|
+
|
|
10
|
+
var ready: Bool {
|
|
11
|
+
selected && providerReady && authRoutingCoherent && sharedOpenAiRoutingSafe
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
4
15
|
private let processClient: ProcessClient
|
|
5
16
|
private let operations: OperationCoordinator
|
|
6
17
|
private let providerStatus = NativeView.detail("Provider status unchecked.")
|
|
@@ -19,7 +30,7 @@ final class ProvidersViewController: NSViewController, ControlCenterPage {
|
|
|
19
30
|
let setDomain = NativeView.button("Set Domain and Key…", target: self, action: #selector(setDomainAndKey))
|
|
20
31
|
let replace = NativeView.button("Replace Key…", target: self, action: #selector(replaceKey))
|
|
21
32
|
let testConnection = NativeView.button("Test Connection", target: self, action: #selector(testConnection))
|
|
22
|
-
let useOAuth = NativeView.button("
|
|
33
|
+
let useOAuth = NativeView.button("Restore Chat / Pro (OAuth)", target: self, action: #selector(useOAuth))
|
|
23
34
|
let useLb = NativeView.button("Use codex-lb", target: self, action: #selector(useCodexLb))
|
|
24
35
|
let fastOn = NativeView.button("Fast Mode On", target: self, action: #selector(fastOn))
|
|
25
36
|
let fastOff = NativeView.button("Fast Mode Off", target: self, action: #selector(fastOff))
|
|
@@ -30,7 +41,7 @@ final class ProvidersViewController: NSViewController, ControlCenterPage {
|
|
|
30
41
|
buttons.orientation = .horizontal; buttons.spacing = 8
|
|
31
42
|
view = NativeView.stack([
|
|
32
43
|
NativeView.title("Providers"),
|
|
33
|
-
NativeView.detail("
|
|
44
|
+
NativeView.detail("Saving stores credentials only. Use codex-lb activates them with a routing guard so sk-clb keys cannot reach api.openai.com. Keys travel through stdin and stay out of logs."),
|
|
34
45
|
credentials, providerStatus, fastStatus, buttons
|
|
35
46
|
])
|
|
36
47
|
refresh()
|
|
@@ -86,25 +97,23 @@ final class ProvidersViewController: NSViewController, ControlCenterPage {
|
|
|
86
97
|
}
|
|
87
98
|
|
|
88
99
|
private func describeProviderStatus(_ json: [String: Any]) -> String {
|
|
89
|
-
let
|
|
90
|
-
let
|
|
91
|
-
let
|
|
92
|
-
let
|
|
93
|
-
let
|
|
94
|
-
let
|
|
95
|
-
let routingSafe = routing?["safe"] as? Bool
|
|
96
|
-
let keyInShared = json["codex_lb_key_in_shared_auth"] as? Bool == true
|
|
100
|
+
let codexLb = codexLbPayload(json)
|
|
101
|
+
let configured = codexLb["provider_configured"] as? Bool == true
|
|
102
|
+
let readiness = codexLbReadiness(codexLb)
|
|
103
|
+
let ok = codexLb["ok"] as? Bool == true
|
|
104
|
+
let authMode = codexLb["auth_mode"] as? String ?? "unknown"
|
|
105
|
+
let keyInShared = codexLb["codex_lb_key_in_shared_auth"] as? Bool == true
|
|
97
106
|
|
|
98
107
|
if !configured {
|
|
99
108
|
return "Codex LB: not configured. Use Set Domain and Key, then Use codex-lb."
|
|
100
109
|
}
|
|
101
|
-
if
|
|
110
|
+
if !readiness.sharedOpenAiRoutingSafe || (keyInShared && !readiness.authRoutingCoherent) {
|
|
102
111
|
return "Codex LB: routing unsafe — shared key can hit api.openai.com. Click Use codex-lb to repair."
|
|
103
112
|
}
|
|
104
|
-
if
|
|
105
|
-
return "Codex LB: active (auth=\(authMode), routing guarded)."
|
|
113
|
+
if readiness.ready && ok {
|
|
114
|
+
return "Codex LB: active (auth=\(authMode), routing guarded). Restore Chat / Pro switches to ChatGPT OAuth."
|
|
106
115
|
}
|
|
107
|
-
if selected && !ok {
|
|
116
|
+
if readiness.selected && (!readiness.providerReady || !ok) {
|
|
108
117
|
return "Codex LB: selected but not ready. Click Use codex-lb or Test Connection."
|
|
109
118
|
}
|
|
110
119
|
if keyInShared {
|
|
@@ -113,6 +122,125 @@ final class ProvidersViewController: NSViewController, ControlCenterPage {
|
|
|
113
122
|
return "Codex LB: credentials stored, not selected (auth=\(authMode)). Click Use codex-lb to activate."
|
|
114
123
|
}
|
|
115
124
|
|
|
125
|
+
private func codexLbPayload(_ json: [String: Any]) -> [String: Any] {
|
|
126
|
+
if let codexLb = json["codex_lb"] as? [String: Any] { return codexLb }
|
|
127
|
+
return json
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
private func codexLbReadiness(_ codexLb: [String: Any]) -> CodexLbReadiness {
|
|
131
|
+
let sharedOpenAiRouting = codexLb["shared_openai_routing"] as? [String: Any]
|
|
132
|
+
return CodexLbReadiness(
|
|
133
|
+
selected: codexLb["selected"] as? Bool == true,
|
|
134
|
+
providerReady: codexLb["provider_ready"] as? Bool == true,
|
|
135
|
+
authRoutingCoherent: codexLb["auth_routing_coherent"] as? Bool == true,
|
|
136
|
+
sharedOpenAiRoutingSafe: sharedOpenAiRouting?["safe"] as? Bool == true
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
private func modelSelectionSummary(_ json: [String: Any]) -> String? {
|
|
141
|
+
guard let modelSelection = json["model_selection"] as? [String: Any] else { return nil }
|
|
142
|
+
let model = modelSelection["model"] as? String
|
|
143
|
+
let source = modelSelection["source"] as? String
|
|
144
|
+
if let model = model, !model.isEmpty, let source = source, !source.isEmpty {
|
|
145
|
+
return "model \(model) via \(source)"
|
|
146
|
+
}
|
|
147
|
+
if let model = model, !model.isEmpty { return "model \(model)" }
|
|
148
|
+
return nil
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
private func structuredReason(_ json: [String: Any], codexLb: [String: Any], readiness: CodexLbReadiness) -> String {
|
|
152
|
+
if codexLb["env_key_configured"] as? Bool != true { return "API key is missing" }
|
|
153
|
+
if (codexLb["base_url"] as? String)?.isEmpty != false { return "base URL is missing" }
|
|
154
|
+
if let status = json["status"] as? String,
|
|
155
|
+
["transport_blocked", "first_request_failed", "missing_response_id", "second_request_failed", "previous_response_not_found", "tool_output_recovery_blocked"].contains(status) {
|
|
156
|
+
return status.replacingOccurrences(of: "_", with: " ")
|
|
157
|
+
}
|
|
158
|
+
if !readiness.selected { return "saved credentials are not selected" }
|
|
159
|
+
if !readiness.providerReady { return "provider configuration is not ready" }
|
|
160
|
+
if !readiness.authRoutingCoherent { return "provider and authentication routing disagree" }
|
|
161
|
+
if !readiness.sharedOpenAiRoutingSafe { return "shared OpenAI routing guard is unsafe" }
|
|
162
|
+
if let reason = json["reason"] as? String, !reason.isEmpty { return reason.replacingOccurrences(of: "_", with: " ") }
|
|
163
|
+
return "response-chain verification did not pass"
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
private func nextAction(status: String, codexLb: [String: Any], readiness: CodexLbReadiness) -> String {
|
|
167
|
+
let credentialsSaved = codexLb["env_key_configured"] as? Bool == true
|
|
168
|
+
&& (codexLb["base_url"] as? String)?.isEmpty == false
|
|
169
|
+
if status == "not_configured" {
|
|
170
|
+
return credentialsSaved
|
|
171
|
+
? "click Use codex-lb to activate the saved credentials"
|
|
172
|
+
: "click Set Domain and Key"
|
|
173
|
+
}
|
|
174
|
+
if status == "missing_env_key" || status == "missing_base_url" || !credentialsSaved {
|
|
175
|
+
return "click Set Domain and Key"
|
|
176
|
+
}
|
|
177
|
+
if status == "model_unselected" { return "select a Codex model, then retry" }
|
|
178
|
+
if !readiness.ready { return "click Use codex-lb; if it still fails, open Diagnostics" }
|
|
179
|
+
return "verify the domain, key, and network, then retry"
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
private func describeConnectionResult(_ json: [String: Any], processCode: Int32) -> (ok: Bool, message: String) {
|
|
183
|
+
let codexLb = codexLbPayload(json)
|
|
184
|
+
let readiness = codexLbReadiness(codexLb)
|
|
185
|
+
let chainOk = processCode == 0 && json["ok"] as? Bool == true
|
|
186
|
+
let status = json["status"] as? String ?? (processCode == 0 ? "unknown" : "command_failed")
|
|
187
|
+
let model = modelSelectionSummary(json).map { " · \($0)" } ?? ""
|
|
188
|
+
if chainOk {
|
|
189
|
+
if readiness.ready {
|
|
190
|
+
return (true, "Connection test passed (\(status)) · provider ready · routing safe\(model).")
|
|
191
|
+
}
|
|
192
|
+
return (true, "Connection test passed (\(status)) · saved credentials reached codex-lb\(model) · Activation required: click Use codex-lb.")
|
|
193
|
+
}
|
|
194
|
+
let reason = structuredReason(json, codexLb: codexLb, readiness: readiness)
|
|
195
|
+
let next = nextAction(status: status, codexLb: codexLb, readiness: readiness)
|
|
196
|
+
return (false, "Connection test: \(status) · Reason: \(reason) · Next: \(next)\(model).")
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
private func describeActivationResult(_ activation: [String: Any]?, status: [String: Any]?, activationCode: Int32, statusCode: Int32) -> (ok: Bool, message: String) {
|
|
200
|
+
let authoritative = status ?? activation ?? [:]
|
|
201
|
+
let codexLb = codexLbPayload(authoritative)
|
|
202
|
+
let readiness = codexLbReadiness(codexLb)
|
|
203
|
+
let activationOk = activationCode == 0 && activation?["ok"] as? Bool == true
|
|
204
|
+
let postRestart = activation?["post_restart"] as? [String: Any]
|
|
205
|
+
let activationStatus = postRestart?["status"] as? String
|
|
206
|
+
?? activation?["status"] as? String
|
|
207
|
+
?? (activationCode == 0 ? "unknown" : "command_failed")
|
|
208
|
+
let postStatusOk = status == nil ? activationOk : statusCode == 0
|
|
209
|
+
let ready = activationOk && postStatusOk && readiness.ready
|
|
210
|
+
if ready {
|
|
211
|
+
return (true, "Use codex-lb: active after restart · provider, auth, and routing ready.")
|
|
212
|
+
}
|
|
213
|
+
let reason = structuredReason(authoritative, codexLb: codexLb, readiness: readiness)
|
|
214
|
+
let next = nextAction(status: activationStatus, codexLb: codexLb, readiness: readiness)
|
|
215
|
+
return (false, "Use codex-lb: \(activationStatus) · Reason: \(reason) · Next: \(next).")
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
private func describeOAuthResult(_ json: [String: Any]?, processCode: Int32) -> (ok: Bool, message: String) {
|
|
219
|
+
let noSwitch = "No OAuth switch was assumed."
|
|
220
|
+
guard let json = json else {
|
|
221
|
+
return (false, "Restore Chat / Pro failed · Invalid JSON. Retry or open Diagnostics. \(noSwitch)")
|
|
222
|
+
}
|
|
223
|
+
let status = json["status"] as? String ?? (processCode == 0 ? "unknown" : "command_failed")
|
|
224
|
+
let mode = json["mode"] as? String
|
|
225
|
+
let restartRequired = json["restart_required"] as? Bool == true
|
|
226
|
+
let restartPerformed = json["restart_performed"] as? Bool == true
|
|
227
|
+
let commandOk = processCode == 0 && json["ok"] as? Bool == true
|
|
228
|
+
let ok = commandOk && mode == "oauth" && restartRequired && restartPerformed
|
|
229
|
+
if ok {
|
|
230
|
+
return (true, "Chat / Pro restored with ChatGPT OAuth · Codex App restarted · codex-lb credentials kept.")
|
|
231
|
+
}
|
|
232
|
+
if status == "no_backup" {
|
|
233
|
+
return (false, "Restore Chat / Pro failed (no_backup) · Run codex login, then retry. \(noSwitch)")
|
|
234
|
+
}
|
|
235
|
+
if status == "auth_in_use" {
|
|
236
|
+
return (false, "Restore Chat / Pro failed (auth_in_use) · Open Diagnostics; auth was not replaced. \(noSwitch)")
|
|
237
|
+
}
|
|
238
|
+
if !restartPerformed {
|
|
239
|
+
return (false, "Restore Chat / Pro failed (restart_not_performed) · Retry, then reopen Codex App. \(noSwitch)")
|
|
240
|
+
}
|
|
241
|
+
return (false, "Restore Chat / Pro failed (\(status)) · Retry or open Diagnostics. \(noSwitch)")
|
|
242
|
+
}
|
|
243
|
+
|
|
116
244
|
private func refreshFastStatus() {
|
|
117
245
|
if !busy { fastStatus.stringValue = "Fast Mode: checking current desktop setting…" }
|
|
118
246
|
processClient.run(["fast-mode", "status", "--json"], timeout: NativeView.statusTimeout) { [weak self] result in
|
|
@@ -204,27 +332,85 @@ final class ProvidersViewController: NSViewController, ControlCenterPage {
|
|
|
204
332
|
processClient.run(["codex-lb", "health", "--json"], timeout: NativeView.mutationTimeout) { [weak self] result in
|
|
205
333
|
guard let self = self else { return }
|
|
206
334
|
self.setBusy(false)
|
|
207
|
-
let
|
|
208
|
-
let
|
|
209
|
-
|
|
335
|
+
let parsed = self.json(result.output)
|
|
336
|
+
let outcome = parsed.map { self.describeConnectionResult($0, processCode: result.code) }
|
|
337
|
+
?? (ok: false, message: "Connection test: invalid response · Reason: health output was not structured JSON · Next: retry or open Diagnostics.")
|
|
210
338
|
_ = self.operations.update(
|
|
211
339
|
snapshot,
|
|
212
|
-
state: ok ? .succeeded : .failed,
|
|
340
|
+
state: outcome.ok ? .succeeded : .failed,
|
|
213
341
|
stage: "complete",
|
|
214
342
|
progress: 1,
|
|
215
|
-
summary: ok ? "Codex LB connection
|
|
343
|
+
summary: outcome.ok ? "Codex LB connection ready" : "Codex LB connection needs action"
|
|
216
344
|
)
|
|
217
|
-
|
|
218
|
-
self.providerStatus.stringValue = "Connection test passed (\(status))."
|
|
219
|
-
} else {
|
|
220
|
-
self.providerStatus.stringValue = "Connection test failed (\(status)) · \(NativeView.redactPreview(result.output))"
|
|
221
|
-
}
|
|
222
|
-
self.refresh()
|
|
345
|
+
self.providerStatus.stringValue = outcome.message
|
|
223
346
|
}
|
|
224
347
|
}
|
|
225
348
|
|
|
226
|
-
@objc private func useOAuth() {
|
|
227
|
-
|
|
349
|
+
@objc private func useOAuth() {
|
|
350
|
+
guard !busy else {
|
|
351
|
+
providerStatus.stringValue = "Another provider action is already running."
|
|
352
|
+
return
|
|
353
|
+
}
|
|
354
|
+
guard let snapshot = operations.begin(kind: "codex-lb-use-oauth", mutationGroup: "codex-config", summary: "Restore Chat / Pro") else {
|
|
355
|
+
providerStatus.stringValue = "Another guarded mutation is already running. Wait or open Diagnostics."
|
|
356
|
+
return
|
|
357
|
+
}
|
|
358
|
+
setBusy(true)
|
|
359
|
+
providerStatus.stringValue = "Restoring Chat / Pro with ChatGPT OAuth and restarting Codex App…"
|
|
360
|
+
_ = operations.update(snapshot, state: .running, stage: "switching", progress: nil, summary: "Restore Chat / Pro")
|
|
361
|
+
processClient.run(["codex-lb", "use-oauth", "--restart-app", "--json"], timeout: NativeView.mutationTimeout) { [weak self] result in
|
|
362
|
+
guard let self = self else { return }
|
|
363
|
+
self.setBusy(false)
|
|
364
|
+
let outcome = self.describeOAuthResult(self.json(result.output), processCode: result.code)
|
|
365
|
+
_ = self.operations.update(
|
|
366
|
+
snapshot,
|
|
367
|
+
state: outcome.ok ? .succeeded : .failed,
|
|
368
|
+
stage: "complete",
|
|
369
|
+
progress: 1,
|
|
370
|
+
summary: outcome.ok ? "Chat / Pro restored after restart" : "Chat / Pro restore needs action"
|
|
371
|
+
)
|
|
372
|
+
self.providerStatus.stringValue = outcome.message
|
|
373
|
+
self.refreshFastStatus()
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
@objc private func useCodexLb() {
|
|
377
|
+
guard !busy else {
|
|
378
|
+
providerStatus.stringValue = "Another provider action is already running."
|
|
379
|
+
return
|
|
380
|
+
}
|
|
381
|
+
guard let snapshot = operations.begin(kind: "codex-lb-use-lb", mutationGroup: "codex-config", summary: "Use codex-lb") else {
|
|
382
|
+
providerStatus.stringValue = "Another guarded mutation is already running. Wait or open Diagnostics."
|
|
383
|
+
return
|
|
384
|
+
}
|
|
385
|
+
setBusy(true)
|
|
386
|
+
providerStatus.stringValue = "Activating codex-lb and restarting Codex App…"
|
|
387
|
+
_ = operations.update(snapshot, state: .running, stage: "activating", progress: nil, summary: "Use codex-lb")
|
|
388
|
+
processClient.run(["codex-lb", "use-codex-lb", "--restart-app", "--json"], timeout: NativeView.mutationTimeout) { [weak self] activationResult in
|
|
389
|
+
guard let self = self else { return }
|
|
390
|
+
let activationJson = self.json(activationResult.output)
|
|
391
|
+
_ = self.operations.update(snapshot, state: .running, stage: "verifying", progress: nil, summary: "Verify codex-lb after restart")
|
|
392
|
+
self.providerStatus.stringValue = "Verifying codex-lb readiness after restart…"
|
|
393
|
+
self.processClient.run(["codex-lb", "status", "--json"], timeout: NativeView.statusTimeout) { [weak self] statusResult in
|
|
394
|
+
guard let self = self else { return }
|
|
395
|
+
self.setBusy(false)
|
|
396
|
+
let statusJson = self.json(statusResult.output)
|
|
397
|
+
let outcome = self.describeActivationResult(
|
|
398
|
+
activationJson,
|
|
399
|
+
status: statusJson,
|
|
400
|
+
activationCode: activationResult.code,
|
|
401
|
+
statusCode: statusResult.code
|
|
402
|
+
)
|
|
403
|
+
_ = self.operations.update(
|
|
404
|
+
snapshot,
|
|
405
|
+
state: outcome.ok ? .succeeded : .failed,
|
|
406
|
+
stage: "complete",
|
|
407
|
+
progress: 1,
|
|
408
|
+
summary: outcome.ok ? "codex-lb active after restart" : "codex-lb activation needs action"
|
|
409
|
+
)
|
|
410
|
+
self.providerStatus.stringValue = outcome.message
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
228
414
|
@objc private func fastOn() { run(["fast-mode", "on", "--json"], title: "Fast Mode On", kind: "fast-mode-on", group: "codex-config", timeout: NativeView.statusTimeout) { [weak self] in self?.refreshFastStatus() } }
|
|
229
415
|
@objc private func fastOff() { run(["fast-mode", "off", "--json"], title: "Fast Mode Off", kind: "fast-mode-off", group: "codex-config", timeout: NativeView.statusTimeout) { [weak self] in self?.refreshFastStatus() } }
|
|
230
416
|
}
|
|
@@ -6,13 +6,16 @@ final class UpdatesViewController: NSViewController, ControlCenterPage {
|
|
|
6
6
|
private let operations: OperationCoordinator
|
|
7
7
|
private let notifications: NotificationCoordinator
|
|
8
8
|
private let status = NativeView.detail("Update status has not been checked yet.")
|
|
9
|
+
private let codexUpdateStatus = NativeView.detail("Codex CLI update has not been run yet.")
|
|
9
10
|
private let stageStatus = NativeView.detail("Update stages: no update receipt recorded yet.")
|
|
10
11
|
private let remediation = NativeView.detail("Remediation and rollback guidance will appear here when needed.")
|
|
11
12
|
private let progress = NSProgressIndicator()
|
|
12
13
|
private var receiptTimer: Timer?
|
|
13
14
|
private var activeReceiptId: String?
|
|
14
15
|
private var checkButton: NSButton!
|
|
16
|
+
private var codexUpdateButton: NSButton!
|
|
15
17
|
private var reviewButton: NSButton!
|
|
18
|
+
private var refreshSharedSnapshotOnNextReload = false
|
|
16
19
|
private var busy = false
|
|
17
20
|
|
|
18
21
|
init(processClient: ProcessClient, operations: OperationCoordinator, notifications: NotificationCoordinator) {
|
|
@@ -26,13 +29,16 @@ final class UpdatesViewController: NSViewController, ControlCenterPage {
|
|
|
26
29
|
progress.controlSize = .small
|
|
27
30
|
progress.isHidden = true
|
|
28
31
|
checkButton = NativeView.button("Check Now", target: self, action: #selector(checkNow))
|
|
32
|
+
codexUpdateButton = NativeView.button("Update Codex CLI", target: self, action: #selector(updateCodexCLI))
|
|
33
|
+
codexUpdateButton.setAccessibilityHelp("Update the operator Codex CLI using its verified installation method.")
|
|
29
34
|
reviewButton = NativeView.button("Review and Update", target: self, action: #selector(reviewAndUpdate))
|
|
30
|
-
|
|
35
|
+
codexUpdateStatus.setAccessibilityLabel("Codex CLI update result")
|
|
36
|
+
let buttons = NSStackView(views: [checkButton, codexUpdateButton, reviewButton, progress])
|
|
31
37
|
buttons.orientation = .horizontal; buttons.spacing = 8
|
|
32
38
|
view = NativeView.stack([
|
|
33
39
|
NativeView.title("Updates"),
|
|
34
40
|
NativeView.detail("SKS, Codex CLI, and Menu Bar status share one local snapshot. Network refresh only runs on demand or after expiry."),
|
|
35
|
-
status, stageStatus, remediation, buttons,
|
|
41
|
+
status, codexUpdateStatus, stageStatus, remediation, buttons,
|
|
36
42
|
NativeView.detail("Rollback guidance and the previous Menu Bar app remain available if final verification fails. The update receipt records the exact recovery command and stage state.")
|
|
37
43
|
])
|
|
38
44
|
loadCached()
|
|
@@ -49,11 +55,21 @@ final class UpdatesViewController: NSViewController, ControlCenterPage {
|
|
|
49
55
|
private func setBusy(_ value: Bool) {
|
|
50
56
|
busy = value
|
|
51
57
|
checkButton?.isEnabled = !value
|
|
58
|
+
codexUpdateButton?.isEnabled = !value
|
|
52
59
|
reviewButton?.isEnabled = !value
|
|
53
60
|
}
|
|
54
61
|
|
|
55
62
|
@objc private func checkNow() { run(["update", "status", "--refresh", "--json"], kind: "update-status", group: nil) }
|
|
56
63
|
|
|
64
|
+
@objc private func updateCodexCLI() {
|
|
65
|
+
run(["codex", "update", "--json"], kind: "codex-cli-update", group: "update") { [weak self] result in
|
|
66
|
+
guard let self = self else { return }
|
|
67
|
+
self.renderCodexUpdate(result: result)
|
|
68
|
+
self.refreshSharedSnapshotOnNextReload = true
|
|
69
|
+
self.reloadSnapshot()
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
57
73
|
@objc private func reviewAndUpdate() {
|
|
58
74
|
run(["update", "review", "--json"], kind: "update-review", group: nil) { [weak self] result in
|
|
59
75
|
guard let self = self else { return }
|
|
@@ -99,12 +115,13 @@ final class UpdatesViewController: NSViewController, ControlCenterPage {
|
|
|
99
115
|
_ = operations.update(operation, state: .running, stage: "running", progress: nil, summary: status.stringValue)
|
|
100
116
|
if kind == "update" { startReceiptPolling(for: operation) }
|
|
101
117
|
let environment = kind == "update" ? Self.controlCenterUpdateEnvironment : [:]
|
|
102
|
-
let timeout: TimeInterval? = kind == "update" ? nil : NativeView.mutationTimeout
|
|
118
|
+
let timeout: TimeInterval? = kind == "update" || kind == "codex-cli-update" ? nil : NativeView.mutationTimeout
|
|
103
119
|
processClient.run(args, environment: environment, timeout: timeout) { [weak self] result in
|
|
104
120
|
guard let self = self else { return }
|
|
105
121
|
self.stopReceiptPolling()
|
|
106
122
|
self.progress.stopAnimation(nil); self.progress.isHidden = true
|
|
107
123
|
self.setBusy(false)
|
|
124
|
+
let codexUpdateSucceeded = kind == "codex-cli-update" && self.codexUpdateResultIsSuccessful(result)
|
|
108
125
|
var authoritativeState: OperationState?
|
|
109
126
|
var restartMenuBarAfterCompletion = false
|
|
110
127
|
if kind == "update" {
|
|
@@ -129,10 +146,20 @@ final class UpdatesViewController: NSViewController, ControlCenterPage {
|
|
|
129
146
|
self.remediation.stringValue = "Remediation: open the last operation log and run sks update status --refresh --json before retrying or rolling back."
|
|
130
147
|
}
|
|
131
148
|
} else {
|
|
132
|
-
let state: OperationState
|
|
133
|
-
|
|
149
|
+
let state: OperationState
|
|
150
|
+
if kind == "update-review" && result.code == 0 { state = .waitingForConfirmation }
|
|
151
|
+
else if kind == "codex-cli-update" { state = codexUpdateSucceeded ? .succeeded : .failed }
|
|
152
|
+
else { state = result.code == 0 ? .succeeded : .failed }
|
|
153
|
+
let summary = state == .waitingForConfirmation
|
|
154
|
+
? "Update review is waiting for confirmation"
|
|
155
|
+
: state == .succeeded ? "Update operation completed" : "Update operation failed"
|
|
156
|
+
_ = self.operations.update(operation, state: state, stage: state == .waitingForConfirmation ? "confirmation" : "complete", progress: 1, summary: summary)
|
|
134
157
|
if result.code != 0 {
|
|
135
|
-
self.status.stringValue =
|
|
158
|
+
self.status.stringValue = kind == "codex-cli-update"
|
|
159
|
+
? "Codex CLI update failed. Structured guidance is shown below."
|
|
160
|
+
: "\(kind.replacingOccurrences(of: "-", with: " ").capitalized) failed · \(NativeView.redactPreview(result.output))"
|
|
161
|
+
} else if kind == "codex-cli-update" && !codexUpdateSucceeded {
|
|
162
|
+
self.status.stringValue = "Codex CLI update returned an unreadable or unsuccessful result. No success state was assumed."
|
|
136
163
|
} else if state == .waitingForConfirmation {
|
|
137
164
|
self.status.stringValue = "Review ready. Confirm to continue, or cancel to leave the current install unchanged."
|
|
138
165
|
}
|
|
@@ -140,7 +167,9 @@ final class UpdatesViewController: NSViewController, ControlCenterPage {
|
|
|
140
167
|
let updateOutput = kind == "update-status" ? result.output : nil
|
|
141
168
|
let approvalRequired = kind == "update-review" && result.code == 0
|
|
142
169
|
let updateAvailable = updateOutput != nil && NotificationCoordinator.updateIsAvailable(in: result.output)
|
|
143
|
-
let authoritativeFailure = kind == "update"
|
|
170
|
+
let authoritativeFailure = kind == "update"
|
|
171
|
+
? authoritativeState != .succeeded
|
|
172
|
+
: kind == "codex-cli-update" ? !codexUpdateSucceeded : result.code != 0
|
|
144
173
|
let terminalUncertain = kind == "update" && authoritativeState == .terminalUncertain
|
|
145
174
|
let notificationTitle: String
|
|
146
175
|
let notificationBody: String
|
|
@@ -154,11 +183,15 @@ final class UpdatesViewController: NSViewController, ControlCenterPage {
|
|
|
154
183
|
notificationTitle = "SKS update outcome is uncertain"
|
|
155
184
|
notificationBody = "The authoritative update receipt could not confirm completion. Open Control Center before retrying or rolling back."
|
|
156
185
|
} else if authoritativeFailure {
|
|
157
|
-
notificationTitle = "SKS update needs attention"
|
|
158
|
-
notificationBody =
|
|
186
|
+
notificationTitle = kind == "codex-cli-update" ? "Codex CLI update needs attention" : "SKS update needs attention"
|
|
187
|
+
notificationBody = kind == "codex-cli-update"
|
|
188
|
+
? "The Codex CLI update did not complete successfully. Open Control Center for structured guidance."
|
|
189
|
+
: "The authoritative update state did not complete successfully. Open Control Center for redacted remediation."
|
|
159
190
|
} else {
|
|
160
|
-
notificationTitle = "SKS update operation completed"
|
|
161
|
-
notificationBody =
|
|
191
|
+
notificationTitle = kind == "codex-cli-update" ? "Codex CLI update completed" : "SKS update operation completed"
|
|
192
|
+
notificationBody = kind == "codex-cli-update"
|
|
193
|
+
? "The operator Codex CLI update completed and its shared update status is refreshing."
|
|
194
|
+
: "The authoritative update receipt confirmed completion."
|
|
162
195
|
}
|
|
163
196
|
self.notifications.send(PublicNotificationEvent(
|
|
164
197
|
category: NotificationCoordinator.categoryIdentifier(updateStatusOutput: updateOutput, failed: authoritativeFailure, actionRequired: approvalRequired),
|
|
@@ -192,7 +225,57 @@ final class UpdatesViewController: NSViewController, ControlCenterPage {
|
|
|
192
225
|
}
|
|
193
226
|
|
|
194
227
|
private func reloadSnapshot() {
|
|
195
|
-
|
|
228
|
+
let args = refreshSharedSnapshotOnNextReload
|
|
229
|
+
? ["update", "status", "--refresh", "--json"]
|
|
230
|
+
: ["update", "status", "--json"]
|
|
231
|
+
refreshSharedSnapshotOnNextReload = false
|
|
232
|
+
let timeout = args.contains("--refresh") ? NativeView.mutationTimeout : NativeView.statusTimeout
|
|
233
|
+
processClient.run(args, timeout: timeout) { [weak self] result in self?.render(statusResult: result) }
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
private func codexUpdateResultIsSuccessful(_ result: ProcessResult) -> Bool {
|
|
237
|
+
guard result.code == 0,
|
|
238
|
+
!result.truncated,
|
|
239
|
+
let data = result.output.data(using: .utf8),
|
|
240
|
+
let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any],
|
|
241
|
+
json["schema"] as? String == "sks.codex-cli-update-result.v1" else { return false }
|
|
242
|
+
return json["ok"] as? Bool == true
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
private func renderCodexUpdate(result: ProcessResult) {
|
|
246
|
+
guard !result.truncated,
|
|
247
|
+
let data = result.output.data(using: .utf8),
|
|
248
|
+
let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any],
|
|
249
|
+
json["schema"] as? String == "sks.codex-cli-update-result.v1" else {
|
|
250
|
+
codexUpdateStatus.stringValue = result.code == 0
|
|
251
|
+
? "Codex CLI update returned invalid structured output. No success state was assumed."
|
|
252
|
+
: "Codex CLI update failed without readable structured guidance. Open Diagnostics for the redacted log."
|
|
253
|
+
return
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
let ok = result.code == 0 && json["ok"] as? Bool == true
|
|
257
|
+
let resultStatus = (json["status"] as? String ?? "unknown").replacingOccurrences(of: "_", with: " ")
|
|
258
|
+
let method = (json["update_method"] as? String ?? "unknown").replacingOccurrences(of: "-", with: " ")
|
|
259
|
+
let before = json["before_version"] as? String
|
|
260
|
+
let after = json["after_version"] as? String
|
|
261
|
+
let blockers = json["blockers"] as? [String] ?? []
|
|
262
|
+
let guidance = json["guidance"] as? [String] ?? []
|
|
263
|
+
var lines: [String] = []
|
|
264
|
+
|
|
265
|
+
if ok {
|
|
266
|
+
let version: String
|
|
267
|
+
if let before = before, let after = after, before != after { version = "\(before) → \(after)" }
|
|
268
|
+
else { version = after ?? before ?? "version unavailable" }
|
|
269
|
+
lines.append("Codex CLI update: \(resultStatus) · \(version) · method \(method).")
|
|
270
|
+
if !guidance.isEmpty { lines.append("Follow-up: \(guidance.joined(separator: " "))") }
|
|
271
|
+
} else {
|
|
272
|
+
lines.append("Codex CLI update: \(resultStatus) · no success state was assumed.")
|
|
273
|
+
if !blockers.isEmpty { lines.append("Blockers: \(blockers.joined(separator: "; "))") }
|
|
274
|
+
lines.append(guidance.isEmpty
|
|
275
|
+
? "Next step: open Diagnostics for the redacted log before retrying."
|
|
276
|
+
: "Next steps: \(guidance.joined(separator: " "))")
|
|
277
|
+
}
|
|
278
|
+
codexUpdateStatus.stringValue = lines.joined(separator: "\n")
|
|
196
279
|
}
|
|
197
280
|
|
|
198
281
|
private func render(statusResult result: ProcessResult) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
import { assertGate, emitGate, importDist, readText } from './sks-1-18-gate-lib.js';
|
|
3
2
|
const src = readText('src/core/build/build-once-runner.ts');
|
|
4
3
|
assertGate(src.includes('.sks-build-proof.json') && src.includes('build:incremental'), 'build-once runner must write dist proof and use incremental build', src.slice(0, 500));
|
|
@@ -55,8 +55,6 @@ const cleanup = async () => {
|
|
|
55
55
|
do {
|
|
56
56
|
lastError = removeScratchSync();
|
|
57
57
|
if (!lastError) {
|
|
58
|
-
// A just-terminated test descendant can recreate its temp directory a
|
|
59
|
-
// moment after the first rm. Require a short no-recreation window.
|
|
60
58
|
await delay(100);
|
|
61
59
|
if (!fs.existsSync(scratch))
|
|
62
60
|
return null;
|
|
@@ -37,13 +37,6 @@ console.log('Command module budget check passed');
|
|
|
37
37
|
function changedFileStats() {
|
|
38
38
|
const out = new Map();
|
|
39
39
|
const headFiles = new Set(gitLines(['ls-tree', '-r', '--name-only', 'HEAD', '--', 'src/core/commands']));
|
|
40
|
-
// One numstat process gives us enough information to reconstruct the
|
|
41
|
-
// baseline line count for every tracked command module. The old per-file
|
|
42
|
-
// `git show` loop spawned roughly sixty processes and could exceed the
|
|
43
|
-
// 15-second gate timeout when the canonical test runner was saturated.
|
|
44
|
-
// Disable rename collapsing so the current destination remains an exact
|
|
45
|
-
// path. A destination absent from HEAD is conservatively treated as new,
|
|
46
|
-
// matching the old `git show HEAD:<path>` behavior.
|
|
47
40
|
for (const line of gitLines(['diff', '--no-renames', '--numstat', 'HEAD', '--', 'src/core/commands'])) {
|
|
48
41
|
const [addedRaw, deletedRaw, ...pathParts] = line.split('\t');
|
|
49
42
|
const relPath = normalize(pathParts.join('\t'));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
2
|
import { buildFeatureRegistry, runtimeRoutesNotStaticContract } from '../core/feature-registry.js';
|
|
4
3
|
import { FEATURE_QUALITY_LEVELS, validateFeatureFixtures } from '../core/feature-fixtures.js';
|
|
5
4
|
import { packageRoot } from '../core/fsx.js';
|