sneakoscope 8.0.2 → 8.0.4
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 +150 -37
- package/config/skills-hash-ledger.v1.json +1 -1
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/bin/fast-inline.js +55 -27
- package/dist/bin/install.js +6 -32
- package/dist/bin/sks-dispatch.js +1 -1
- package/dist/cli/args.js +0 -2
- package/dist/cli/cli-theme.js +18 -9
- package/dist/cli/command-manifest-lite.js +6 -6
- package/dist/cli/command-registry.js +6 -6
- package/dist/cli/feature-commands.js +9 -7
- package/dist/cli/install-helpers-codex-lb-chain.js +198 -7
- package/dist/cli/install-helpers-codex-lb-config.js +78 -10
- package/dist/cli/install-helpers-install-support.js +9 -6
- package/dist/cli/install-helpers.js +101 -49
- package/dist/cli/install-tool-helpers.js +2 -82
- package/dist/cli/output.js +6 -1
- package/dist/cli/router.js +101 -2
- package/dist/commands/codex-lb.js +119 -19
- package/dist/commands/doctor-profile.js +1 -1
- package/dist/commands/doctor.js +727 -144
- package/dist/commands/mad-sks.js +1 -5
- package/dist/config/skills-manifest.json +4 -2
- package/dist/core/agents/agent-codex-cockpit.js +0 -3
- package/dist/core/agents/agent-effort-policy.js +5 -5
- package/dist/core/agents/agent-janitor.js +0 -20
- package/dist/core/agents/agent-orchestrator.js +9 -56
- package/dist/core/agents/agent-output-validator.js +2 -3
- package/dist/core/agents/agent-patch-schema.js +2 -2
- package/dist/core/agents/agent-proof-evidence.js +0 -65
- package/dist/core/agents/agent-recursion-guard.js +1 -1
- package/dist/core/agents/agent-runner-codex-exec.js +5 -3
- package/dist/core/agents/agent-scheduler.js +327 -85
- package/dist/core/agents/agent-schema.js +1 -1
- package/dist/core/agents/agent-trust-report.js +0 -36
- package/dist/core/agents/agent-worker-pipeline.js +0 -1
- package/dist/core/agents/fast-mode-policy.js +1 -3
- package/dist/core/agents/native-cli-worker-runtime-proof.js +1 -1
- package/dist/core/agents/native-cli-worker-runtime.js +69 -647
- package/dist/core/agents/native-cli-worker.js +6 -7
- package/dist/core/agents/native-worker-backend-router.js +2 -32
- package/dist/core/agents/no-subagent-scaling-policy.js +1 -1
- package/dist/core/agents/parallel-runtime-proof.js +1 -6
- package/dist/core/agents/runtime-proof-summary.js +1 -35
- package/dist/core/architecture-hardening/contracts/contracts.js +193 -0
- package/dist/core/architecture-hardening/migration/migration.js +111 -0
- package/dist/core/architecture-hardening/state/state-service.js +155 -0
- package/dist/core/artifact-schemas.js +0 -3
- package/dist/core/codex/codex-config-guard.js +238 -52
- package/dist/core/codex-adapter.js +5 -3
- package/dist/core/codex-app/auxiliary-oauth-policy.js +36 -0
- package/dist/core/codex-app/catalog-compat/catalog-service.js +104 -0
- package/dist/core/codex-app/child-policy/child-policy.js +35 -0
- package/dist/core/codex-app/codex-app-handoff.js +0 -1
- package/dist/core/codex-app/codex-hook-lifecycle.js +1 -1
- package/dist/core/codex-app/codex-init-deep.js +1 -1
- package/dist/core/codex-app/menubar/app-bundle.js +2 -0
- package/dist/core/codex-app/menubar/constants.js +14 -1
- package/dist/core/codex-app/menubar/global-install.js +288 -0
- package/dist/core/codex-app/menubar/installer.js +79 -14
- package/dist/core/codex-app/menubar/launch-agent.js +267 -45
- package/dist/core/codex-app/menubar/paths.js +3 -0
- package/dist/core/codex-app/menubar/rollback.js +55 -7
- package/dist/core/codex-app/menubar/status.js +75 -4
- package/dist/core/codex-app/provider-child-policy.js +64 -0
- package/dist/core/codex-app/provider-mode.js +91 -0
- package/dist/core/codex-app/provider-operation-stages.js +20 -0
- package/dist/core/codex-app/provider-session-policy.js +85 -0
- package/dist/core/codex-app/session-policy/session-pinning.js +68 -0
- package/dist/core/codex-app.js +3 -2
- package/dist/core/codex-control/codex-0139-image-path-real-probe.js +3 -1
- package/dist/core/codex-control/codex-0139-web-search-probe.js +3 -1
- package/dist/core/codex-control/codex-app-server-runtime-env.js +13 -4
- package/dist/core/codex-control/codex-app-server-v2-client.js +3 -3
- package/dist/core/codex-control/codex-control-proof.js +0 -1
- package/dist/core/codex-control/codex-task-runner.js +1 -4
- package/dist/core/codex-exec-output-schema.js +4 -1
- package/dist/core/codex-lb/codex-lb-env.js +63 -72
- package/dist/core/codex-lb/codex-lb-setup.js +15 -2
- package/dist/core/codex-lb/desktop-bridge/header-policy.js +6 -0
- package/dist/core/codex-lb/desktop-bridge/http-forward.js +48 -6
- package/dist/core/codex-lb/desktop-bridge/security.js +134 -0
- package/dist/core/codex-lb/desktop-bridge/server.js +9 -3
- package/dist/core/codex-lb/desktop-bridge/state.js +26 -6
- package/dist/core/codex-lb/desktop-bridge/types.js +1 -0
- package/dist/core/codex-lb/desktop-center-credentials.js +517 -58
- package/dist/core/codex-lb/desktop-controller.js +177 -56
- package/dist/core/codex-lb/desktop-service.js +179 -40
- package/dist/core/codex-lb/legacy-migration.js +1 -3
- package/dist/core/codex-lb/native-openai-transport/transport.js +68 -0
- package/dist/core/codex-lb/probes/cli-image-tool-probe.js +1 -1
- package/dist/core/codex-lb/provider-routing/provider-router.js +58 -0
- package/dist/core/codex-lb/routing-truth.js +327 -0
- package/dist/core/codex-native/codex-native-feature-broker.js +4 -0
- package/dist/core/codex-native/codex-native-pattern-analysis.js +1 -2
- package/dist/core/codex-native/core-skill-manifest.js +1 -1
- package/dist/core/codex-plugins/codex-plugin-json.js +26 -6
- package/dist/core/codex-plugins/codex-plugin-repair.js +32 -6
- package/dist/core/commands/basic-cli.js +9 -7
- package/dist/core/commands/computer-use-command.js +1 -1
- package/dist/core/commands/image-ux-review-command.js +16 -9
- package/dist/core/commands/install-package-command.js +105 -0
- package/dist/core/commands/intent-normalization/normalizer.js +96 -0
- package/dist/core/commands/mad-sks-command.js +23 -274
- package/dist/core/commands/mad-sks-headless.js +11 -30
- package/dist/core/commands/naruto-command.js +0 -25
- package/dist/core/commands/qa-loop-command.js +104 -22
- package/dist/core/commands/remote-command.js +2 -2
- package/dist/core/commands/research-command.js +10 -5
- package/dist/core/commands/telegram-command.js +407 -0
- package/dist/core/config-adopt/config-adopt-command.js +35 -0
- package/dist/core/config-adopt/config-adopt.js +346 -0
- package/dist/core/config-adopt/index.js +3 -0
- package/dist/core/doctor/command-alias-cleanup.js +4 -1
- package/dist/core/doctor/current-project-guidance-nested.js +37 -6
- package/dist/core/doctor/current-project-guidance.js +15 -9
- package/dist/core/doctor/doctor-dirty-planner.js +1 -4
- package/dist/core/doctor/doctor-readiness-matrix.js +15 -18
- package/dist/core/doctor/retired-managed-residue-private.js +4 -3
- package/dist/core/doctor/retired-managed-residue-runtime.js +2 -2
- package/dist/core/doctor/skill-legacy-surface.js +11 -10
- package/dist/core/doctor/sks-menubar-doctor.js +4 -0
- package/dist/core/evaluation.js +0 -19
- package/dist/core/evidence/v2/evidence-key.js +105 -0
- package/dist/core/feature-fixtures.js +12 -7
- package/dist/core/feature-registry.js +52 -21
- package/dist/core/hooks-runtime/hook-context.js +9 -0
- package/dist/core/hooks-runtime/managed-skill-admission.js +54 -4
- package/dist/core/hooks-runtime/official-subagent-lifecycle.js +69 -52
- package/dist/core/hooks-runtime/stop-finalization.js +226 -0
- package/dist/core/hooks-runtime/stop-repeat-guard.js +21 -2
- package/dist/core/hooks-runtime/subagent-skill-availability-contract.js +2 -2
- package/dist/core/hooks-runtime/subagent-skill-availability-evidence.js +3 -3
- package/dist/core/hooks-runtime/subagent-skill-availability-guards.js +43 -5
- package/dist/core/hooks-runtime/subagent-skill-availability.js +64 -30
- package/dist/core/hooks-runtime/subagent-stop-hook.js +15 -2
- package/dist/core/hooks-runtime.js +179 -212
- package/dist/core/image/reference-evidence/reference-registry.js +145 -0
- package/dist/core/image-ux-review/imagegen-adapter.js +21 -9
- package/dist/core/image-ux-review/reference-policy/reference-policy.js +9 -0
- package/dist/core/imagegen/codex-lb-imagegen-target.js +8 -0
- package/dist/core/imagegen/imagegen-capability.js +59 -2
- package/dist/core/imagegen/require-imagegen.js +2 -2
- package/dist/core/init/skills.js +17 -3
- package/dist/core/init.js +3 -3
- package/dist/core/install/installed-package-smoke.js +23 -5
- package/dist/core/json/canonical.js +9 -0
- package/dist/core/locks/file-lock.js +0 -1
- package/dist/core/loops/loop-continuation-enforcer.js +65 -7
- package/dist/core/loops/loop-decomposer.js +0 -1
- package/dist/core/loops/loop-gate-runner.js +65 -4
- package/dist/core/loops/loop-gate-selector.js +0 -2
- package/dist/core/loops/loop-proof-validation.js +38 -0
- package/dist/core/loops/loop-risk-classifier.js +1 -1
- package/dist/core/loops/loop-runtime.js +14 -2
- package/dist/core/loops/loop-scheduler.js +7 -2
- package/dist/core/loops/loop-worker-runtime.js +0 -15
- package/dist/core/loops/loop-worktree-runtime.js +52 -4
- package/dist/core/managed-assets/managed-assets-manifest.js +14 -14
- package/dist/core/naruto/hardware-capacity-probe.js +9 -6
- package/dist/core/naruto/naruto-active-pool.js +2 -14
- package/dist/core/naruto/naruto-concurrency-governor.js +71 -31
- package/dist/core/naruto/naruto-loop-worker-router.js +0 -2
- package/dist/core/naruto/naruto-verification-dag.js +0 -1
- package/dist/core/naruto/naruto-write-e2e.js +1 -2
- package/dist/core/naruto/resource-pressure-monitor.js +0 -4
- package/dist/core/observability/architecture-hardening/safe-projection.js +65 -0
- package/dist/core/perf/import-graph-budget.js +0 -1
- package/dist/core/perf/release-latency-slo.js +3 -2
- package/dist/core/preflight/parallel-preflight-engine.js +2 -15
- package/dist/core/product-design-app-server.js +13 -1
- package/dist/core/proof/fake-real-proof-policy.js +2 -17
- package/dist/core/proof/route-proof-gate.js +2 -10
- package/dist/core/proof/route-proof-policy.js +1 -1
- package/dist/core/proof/runtime-evidence-policy.js +185 -0
- package/dist/core/proof/runtime-truth-matrix.js +64 -39
- package/dist/core/proof/validation.js +27 -11
- package/dist/core/provider/provider-context.js +18 -2
- package/dist/core/providers/openrouter/openrouter-account.js +3 -2
- package/dist/core/python-tools/python-tool-runner.js +1 -1
- package/dist/core/qa-loop/qa-execution-control.js +57 -0
- package/dist/core/questions.js +1 -1
- package/dist/core/release/extreme-parallel-scheduler.js +0 -3
- package/dist/core/release/gate-manifest.js +3 -7
- package/dist/core/release/gate-pack-manifest.js +3 -7
- package/dist/core/release/package-size-budget.js +2 -2
- package/dist/core/release/physical-release-gates.js +189 -0
- package/dist/core/release/publish-preflight.js +113 -0
- package/dist/core/release/release-gate-affected-selector.js +0 -2
- package/dist/core/release/release-gate-batch-runner.js +1 -1
- package/dist/core/release/release-gate-node.js +0 -1
- package/dist/core/release/release-gate-resource-governor.js +0 -1
- package/dist/core/release/release-pack-receipt.js +5 -8
- package/dist/core/release/release-real-contract.js +0 -6
- package/dist/core/release/resource-class-budget.js +0 -1
- package/dist/core/release/stage-publish.js +178 -36
- package/dist/core/research/research-adversarial-review.js +103 -9
- package/dist/core/research.js +1 -1
- package/dist/core/retention.js +0 -1
- package/dist/core/routes/constants.js +1 -1
- package/dist/core/routes/diagnostic-allowlist.js +0 -1
- package/dist/core/routes/dollar-manifest-lite.js +1 -1
- package/dist/core/routes.js +46 -15
- package/dist/core/runtime/execution-control.js +226 -0
- package/dist/core/runtime/progress-recovery/progress-recovery.js +89 -0
- package/dist/core/runtime/task-profile.js +10 -4
- package/dist/core/runtime/verification-budget.js +10 -1
- package/dist/core/safety/intent-contract/intent-contract.js +94 -0
- package/dist/core/safety/mutation-guard.js +0 -2
- package/dist/core/safety/mutation-ledger.js +0 -2
- package/dist/core/safety/requested-scope-contract.js +0 -0
- package/dist/core/search-visibility/discovery.js +1 -1
- package/dist/core/search-visibility/index.js +12 -0
- package/dist/core/search-visibility/verifier.js +112 -3
- package/dist/core/security/private-credential-file.js +209 -0
- package/dist/core/session/project-namespace.js +0 -5
- package/dist/core/skills/skill-agent-metadata.js +1 -3
- package/dist/core/strategy/adhd-orchestrating-gate.js +0 -1
- package/dist/core/subagents/agent-catalog.js +19 -34
- package/dist/core/subagents/model-policy.js +65 -24
- package/dist/core/subagents/naruto-help-contract.js +8 -8
- package/dist/core/subagents/naruto-host-credentials.js +13 -0
- package/dist/core/subagents/official-subagent-config.js +16 -6
- package/dist/core/subagents/official-subagent-preparation.js +35 -16
- package/dist/core/subagents/official-subagent-prompt.js +7 -7
- package/dist/core/subagents/official-subagent-runner.js +27 -4
- package/dist/core/subagents/role-model-preferences.js +1 -1
- package/dist/core/subagents/thread-budget.js +19 -12
- package/dist/core/subagents/wave-lifecycle.js +18 -6
- package/dist/core/telegram/access.js +58 -0
- package/dist/core/telegram/client.js +157 -0
- package/dist/core/telegram/confirmation.js +37 -0
- package/dist/core/telegram/doctor.js +154 -0
- package/dist/core/telegram/index.js +9 -0
- package/dist/core/telegram/keychain.js +317 -0
- package/dist/core/telegram/liveness.js +118 -0
- package/dist/core/telegram/poller.js +90 -0
- package/dist/core/telegram/redaction.js +15 -0
- package/dist/core/telegram/state-lock.js +416 -0
- package/dist/core/telegram/types.js +1 -0
- package/dist/core/text/strings.js +3 -0
- package/dist/core/triwiki/context-graph/store/evidence-write-lock.js +29 -0
- package/dist/core/triwiki/context-graph/store/fragment-cache.js +24 -0
- package/dist/core/triwiki/context-graph/store/snapshot-store.js +69 -21
- package/dist/core/triwiki/triwiki-gate-impact-map.js +2 -2
- package/dist/core/triwiki/triwiki-module-card.js +1 -2
- package/dist/core/update/installed-cli-resolution.js +170 -0
- package/dist/core/update/update-diagnostics.js +52 -0
- package/dist/core/update/update-migration-state.js +30 -12
- package/dist/core/update/update-operation.js +2 -1
- package/dist/core/update/update-stage-diagnostics.js +38 -0
- package/dist/core/update/update-status.js +2 -9
- package/dist/core/update-check.js +279 -91
- package/dist/core/version.js +1 -1
- package/dist/native/sks-menubar/Sources/AppDelegate.swift +19 -1
- package/dist/native/sks-menubar/Sources/AppIdentity.swift +7 -0
- package/dist/native/sks-menubar/Sources/ControlCenterWindowController.swift +6 -2
- package/dist/native/sks-menubar/Sources/OperationCoordinator.swift +159 -92
- package/dist/native/sks-menubar/Sources/OperationModels.swift +389 -0
- package/dist/native/sks-menubar/Sources/OverviewViewController.swift +57 -0
- package/dist/native/sks-menubar/Sources/ProcessClient.swift +3 -1
- package/dist/native/sks-menubar/Sources/ProvidersConnectTest.swift +115 -0
- package/dist/native/sks-menubar/Sources/ProvidersFastMode.swift +17 -0
- package/dist/native/sks-menubar/Sources/ProvidersMultiProvider.swift +3 -0
- package/dist/native/sks-menubar/Sources/ProvidersOpenRouter.swift +58 -17
- package/dist/native/sks-menubar/Sources/ProvidersReliability.swift +302 -0
- package/dist/native/sks-menubar/Sources/ProvidersRoleModels.swift +5 -0
- package/dist/native/sks-menubar/Sources/ProvidersRoutingTruth.swift +190 -0
- package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +158 -126
- package/dist/native/sks-menubar/Sources/RemoteCodingViewController.swift +462 -26
- package/dist/native/sks-menubar/Sources/SKSKeychainStore.swift +344 -0
- package/dist/native/sks-menubar/Sources/SecureProcessEnvelope.swift +27 -0
- package/dist/native/sks-menubar/Sources/SingletonInstanceGuard.swift +328 -0
- package/dist/native/sks-menubar/Sources/StatusItemController.swift +10 -2
- package/dist/native/sks-menubar/Sources/TelegramPrivateFileStore.swift +498 -0
- package/dist/native/sks-menubar/Sources/TelegramPrivateFileSupport.swift +236 -0
- package/dist/native/sks-menubar/Sources/TelegramProcessGateway.swift +454 -0
- package/dist/native/sks-menubar/Sources/TelegramRuntimeSupport.swift +56 -0
- package/dist/native/sks-menubar/Sources/TelegramStateLock.swift +448 -0
- package/dist/native/sks-menubar/Sources/TelegramSupport.swift +187 -0
- package/dist/native/sks-menubar/Sources/TelegramTransport.swift +499 -0
- package/dist/native/sks-menubar/Sources/main.swift +15 -1
- package/dist/scripts/all-feature-deep-completion-check.js +5 -1
- package/dist/scripts/check-publish-tag.js +56 -0
- package/dist/scripts/codex-lb-fast-mode-truth-check.js +10 -3
- package/dist/scripts/codex-lb-fast-ui-preservation-check.js +12 -3
- package/dist/scripts/codex-lb-gpt56-fast-profile-check.js +4 -2
- package/dist/scripts/codex-native-agent-role-content-check.js +3 -3
- package/dist/scripts/codex-native-gate-lib.js +14 -7
- package/dist/scripts/current-command-surface-check.js +7 -7
- package/dist/scripts/current-surface-update-e2e-check.js +4 -3
- package/dist/scripts/current-upgrade-matrix-check.js +5 -24
- package/dist/scripts/docs-truthfulness-check.js +17 -13
- package/dist/scripts/gate-lib.js +0 -2
- package/dist/scripts/gate-policy-audit-check.js +3 -2
- package/dist/scripts/harness-benchmark-check.js +1 -1
- package/dist/scripts/init-deep-backup-retention-check.js +1 -1
- package/dist/scripts/lib/codex-sdk-gate-lib.js +1 -2
- package/dist/scripts/loop-directive-check-lib.js +28 -38
- package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +14 -180
- package/dist/scripts/mad-sks-launch-sql-plane-boundary-check.js +2 -11
- package/dist/scripts/official-subagent-workflow-check.js +1 -1
- package/dist/scripts/packlist-performance-check.js +1 -2
- package/dist/scripts/prepublish-release-check-or-fast.js +32 -0
- package/dist/scripts/publish-preflight.js +12 -0
- package/dist/scripts/release-affected-selector-check.js +2 -2
- package/dist/scripts/release-gate-batch-runner-check.js +2 -2
- package/dist/scripts/release-metadata-check.js +8 -12
- package/dist/scripts/release-real-check.js +2 -54
- package/dist/scripts/runtime-domain-gate-lib.js +2 -96
- package/dist/scripts/runtime-proof-summary-check.js +2 -6
- package/dist/scripts/search-visibility-gate-lib.js +0 -1
- package/dist/scripts/sks-cli-gate-lib.js +1 -1
- package/dist/scripts/typed-routing-gate-lib.js +7 -59
- package/docs/demo.tape +1 -1
- package/infra-harness-gates.json +1 -1456
- package/package.json +10 -7
- package/release-gates.v2.json +0 -1
- package/schemas/agents/parallel-runtime-proof.schema.json +0 -2
- package/schemas/codex/agent-result.schema.json +0 -6
- package/schemas/naruto/naruto-concurrency-governor.schema.json +1 -3
- package/schemas/release/release-gate-node.schema.json +1 -1
- package/dist/commands/zellij-lane.js +0 -22
- package/dist/commands/zellij-monitor-pane.js +0 -26
- package/dist/commands/zellij-slot-column-anchor.js +0 -22
- package/dist/commands/zellij-slot-pane.js +0 -80
- package/dist/commands/zellij-viewport-pane.js +0 -57
- package/dist/commands/zellij.js +0 -422
- package/dist/core/agents/agent-runner-zellij.js +0 -164
- package/dist/core/agents/agent-slot-pane-binding-proof.js +0 -96
- package/dist/core/agents/parallel-write-fixture.js +0 -305
- package/dist/core/agents/worker-pane-communication-contract.js +0 -100
- package/dist/core/agents/zellij-lane-supervisor.js +0 -428
- package/dist/core/agents/zellij-right-lane-cockpit.js +0 -66
- package/dist/core/doctor/doctor-zellij-repair.js +0 -40
- package/dist/core/ops/upgrade-migration-fixtures.js +0 -119
- package/dist/core/proof/route-finalizer-fixtures.js +0 -21
- package/dist/core/zellij/homebrew-policy.js +0 -43
- package/dist/core/zellij/zellij-capability.js +0 -126
- package/dist/core/zellij/zellij-clipboard-config.js +0 -52
- package/dist/core/zellij/zellij-command.js +0 -149
- package/dist/core/zellij/zellij-fake-adapter.js +0 -186
- package/dist/core/zellij/zellij-lane-renderer.js +0 -706
- package/dist/core/zellij/zellij-lane-runtime.js +0 -189
- package/dist/core/zellij/zellij-launcher.js +0 -268
- package/dist/core/zellij/zellij-layout-builder.js +0 -191
- package/dist/core/zellij/zellij-monitor-renderer.js +0 -52
- package/dist/core/zellij/zellij-official-subagent-activity.js +0 -526
- package/dist/core/zellij/zellij-official-subagent-telemetry.js +0 -258
- package/dist/core/zellij/zellij-pane-proof.js +0 -226
- package/dist/core/zellij/zellij-right-column-manager.js +0 -308
- package/dist/core/zellij/zellij-screen-proof.js +0 -120
- package/dist/core/zellij/zellij-self-heal-types.js +0 -44
- package/dist/core/zellij/zellij-self-heal.js +0 -408
- package/dist/core/zellij/zellij-slot-column-anchor.js +0 -304
- package/dist/core/zellij/zellij-slot-pane-renderer.js +0 -521
- package/dist/core/zellij/zellij-slot-telemetry.js +0 -384
- package/dist/core/zellij/zellij-theme.js +0 -66
- package/dist/core/zellij/zellij-ui-mode.js +0 -34
- package/dist/core/zellij/zellij-update.js +0 -348
- package/dist/core/zellij/zellij-viewport-binder.js +0 -61
- package/dist/core/zellij/zellij-worker-pane-manager.js +0 -881
- package/dist/core/zellij/zellij-worker-pane-summary.js +0 -64
- package/dist/native/sks-menubar/Tests/AppRuntimeTestSupport.swift +0 -26
- package/dist/native/sks-menubar/Tests/OperationCoordinatorTests.swift +0 -174
- package/dist/native/sks-menubar/Tests/ProcessClientTests.swift +0 -20
- package/dist/native/sks-menubar/Tests/ProvidersViewControllerTests.swift +0 -142
- package/dist/scripts/zellij-pane-proof-check.js +0 -88
- package/dist/scripts/zellij-real-session-cleanup-check.js +0 -139
- package/dist/scripts/zellij-real-session-launch-check.js +0 -126
- package/dist/scripts/zellij-screen-proof-check.js +0 -43
- package/schemas/zellij/zellij-right-column-state.schema.json +0 -40
- package/schemas/zellij/zellij-slot-telemetry.schema.json +0 -89
- package/schemas/zellij/zellij-worker-pane.schema.json +0 -53
- package/scripts/build-clean-atomic.mjs +0 -323
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import Cocoa
|
|
2
2
|
|
|
3
3
|
final class AppDelegate: NSObject, NSApplicationDelegate {
|
|
4
|
+
private let singletonGuard: SingletonInstanceGuard
|
|
4
5
|
private var processClient: ProcessClient!
|
|
5
6
|
private var operations: OperationCoordinator!
|
|
6
7
|
private var notifications: NotificationCoordinator!
|
|
7
8
|
private var controlCenter: ControlCenterWindowController!
|
|
8
9
|
private var statusItemController: StatusItemController!
|
|
10
|
+
private var telegramService: TelegramMenuBarService?
|
|
11
|
+
|
|
12
|
+
init(singletonGuard: SingletonInstanceGuard) {
|
|
13
|
+
self.singletonGuard = singletonGuard
|
|
14
|
+
super.init()
|
|
15
|
+
}
|
|
9
16
|
|
|
10
17
|
func applicationDidFinishLaunching(_ notification: Notification) {
|
|
11
18
|
NSApp.setActivationPolicy(.accessory)
|
|
@@ -14,12 +21,19 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
|
|
|
14
21
|
// never reaches NSTextField/NSTextView responders without an explicit menu.
|
|
15
22
|
AppIdentity.installStandardEditMenu()
|
|
16
23
|
processClient = ProcessClient(actionScript: AppRuntime.actionScript, logPath: AppRuntime.lastActionLogPath, projectRoot: AppRuntime.projectRoot)
|
|
24
|
+
let residentTelegramService = TelegramRuntimeFactory.make(
|
|
25
|
+
processClient: processClient,
|
|
26
|
+
canonicalProjectRoot: AppRuntime.canonicalProjectRoot
|
|
27
|
+
)
|
|
28
|
+
telegramService = residentTelegramService
|
|
29
|
+
_ = residentTelegramService.start()
|
|
17
30
|
operations = OperationCoordinator(directory: AppRuntime.operationDirectory)
|
|
18
31
|
notifications = NotificationCoordinator()
|
|
19
32
|
controlCenter = ControlCenterWindowController(
|
|
20
33
|
processClient: processClient,
|
|
21
34
|
operations: operations,
|
|
22
|
-
notifications: notifications
|
|
35
|
+
notifications: notifications,
|
|
36
|
+
telegramService: residentTelegramService
|
|
23
37
|
)
|
|
24
38
|
statusItemController = StatusItemController(
|
|
25
39
|
processClient: processClient,
|
|
@@ -39,8 +53,12 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
|
|
|
39
53
|
}
|
|
40
54
|
|
|
41
55
|
func applicationWillTerminate(_ notification: Notification) {
|
|
56
|
+
if telegramService?.stopAndWait(timeout: 2) == false {
|
|
57
|
+
fputs("SKS Telegram bounded stop timed out; liveness will become stale.\n", stderr)
|
|
58
|
+
}
|
|
42
59
|
statusItemController?.stop()
|
|
43
60
|
processClient?.terminateAll()
|
|
61
|
+
singletonGuard.releaseRuntimeStateIfOwned()
|
|
44
62
|
}
|
|
45
63
|
|
|
46
64
|
func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import Cocoa
|
|
2
2
|
|
|
3
3
|
enum AppIdentity {
|
|
4
|
+
static let bundleIdentifier = "com.sneakoscope.sks-menubar"
|
|
5
|
+
|
|
6
|
+
static var buildVersion: String {
|
|
7
|
+
Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String
|
|
8
|
+
?? AppRuntime.packageVersion
|
|
9
|
+
}
|
|
10
|
+
|
|
4
11
|
static func configure() {
|
|
5
12
|
if let url = Bundle.main.url(forResource: "AppIcon", withExtension: "icns"),
|
|
6
13
|
let image = NSImage(contentsOf: url) {
|
|
@@ -11,7 +11,8 @@ final class ControlCenterWindowController: NSWindowController, NSTableViewDataSo
|
|
|
11
11
|
init(
|
|
12
12
|
processClient: ProcessClient,
|
|
13
13
|
operations: OperationCoordinator,
|
|
14
|
-
notifications: NotificationCoordinator
|
|
14
|
+
notifications: NotificationCoordinator,
|
|
15
|
+
telegramService: TelegramMenuBarService
|
|
15
16
|
) {
|
|
16
17
|
let overview = OverviewViewController(processClient: processClient, operations: operations)
|
|
17
18
|
overviewController = overview
|
|
@@ -28,7 +29,10 @@ final class ControlCenterWindowController: NSWindowController, NSTableViewDataSo
|
|
|
28
29
|
.updates: UpdatesViewController(processClient: processClient, operations: operations, notifications: notifications),
|
|
29
30
|
.mcpServers: MCPServersViewController(processClient: processClient, operations: operations, notifications: notifications),
|
|
30
31
|
.providers: ProvidersViewController(processClient: processClient, operations: operations),
|
|
31
|
-
.remoteCoding: RemoteCodingViewController(
|
|
32
|
+
.remoteCoding: RemoteCodingViewController(
|
|
33
|
+
processClient: processClient,
|
|
34
|
+
telegramService: telegramService
|
|
35
|
+
),
|
|
32
36
|
.diagnostics: DiagnosticsViewController(processClient: processClient, operations: operations),
|
|
33
37
|
.settings: SettingsViewController(notifications: notifications)
|
|
34
38
|
]
|
|
@@ -1,102 +1,16 @@
|
|
|
1
1
|
import Foundation
|
|
2
2
|
|
|
3
|
-
// SKS CLI timestamps come from JavaScript Date.toISOString() and carry
|
|
4
|
-
// fractional seconds ("2026-07-24T00:00:00.000Z"), which the default
|
|
5
|
-
// ISO8601DateFormatter options cannot parse. Try fractional first, then plain.
|
|
6
|
-
enum SKSTimestamp {
|
|
7
|
-
private static let fractional: ISO8601DateFormatter = {
|
|
8
|
-
let formatter = ISO8601DateFormatter()
|
|
9
|
-
formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds]
|
|
10
|
-
return formatter
|
|
11
|
-
}()
|
|
12
|
-
private static let plain = ISO8601DateFormatter()
|
|
13
|
-
|
|
14
|
-
static func date(from value: String) -> Date? {
|
|
15
|
-
fractional.date(from: value) ?? plain.date(from: value)
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
enum OperationState: String, Codable {
|
|
20
|
-
case queued, running, waitingForConfirmation, succeeded, failed, cancelled, terminalUncertain
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
struct OperationSnapshot: Codable {
|
|
24
|
-
let schema: String
|
|
25
|
-
let id: String
|
|
26
|
-
let kind: String
|
|
27
|
-
let state: OperationState
|
|
28
|
-
let stage: String?
|
|
29
|
-
let progress: Double?
|
|
30
|
-
let startedAt: String
|
|
31
|
-
let updatedAt: String
|
|
32
|
-
let publicSummary: String
|
|
33
|
-
let logPath: String?
|
|
34
|
-
let retryable: Bool
|
|
35
|
-
let targetVersion: String?
|
|
36
|
-
let projectRoot: String?
|
|
37
|
-
let registry: String?
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
struct UpdateOperationStageSnapshot: Codable {
|
|
41
|
-
let id: String
|
|
42
|
-
let ok: Bool
|
|
43
|
-
let status: String
|
|
44
|
-
let updatedAt: String
|
|
45
|
-
|
|
46
|
-
enum CodingKeys: String, CodingKey {
|
|
47
|
-
case id, ok, status
|
|
48
|
-
case updatedAt = "updated_at"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
struct UpdateOperationReceiptSnapshot: Codable {
|
|
53
|
-
let schema: String
|
|
54
|
-
let id: String
|
|
55
|
-
let kind: String
|
|
56
|
-
let state: String
|
|
57
|
-
let currentStage: String?
|
|
58
|
-
let startedAt: String
|
|
59
|
-
let updatedAt: String
|
|
60
|
-
let fromVersion: String
|
|
61
|
-
let targetVersion: String?
|
|
62
|
-
let previousVersion: String
|
|
63
|
-
let projectRoot: String?
|
|
64
|
-
let registry: String?
|
|
65
|
-
let rollbackCommand: String
|
|
66
|
-
let sideEffectsStarted: Bool
|
|
67
|
-
let stages: [UpdateOperationStageSnapshot]
|
|
68
|
-
let resultStatus: String?
|
|
69
|
-
let publicError: String?
|
|
70
|
-
let receiptPath: String
|
|
71
|
-
|
|
72
|
-
enum CodingKeys: String, CodingKey {
|
|
73
|
-
case schema, id, kind, state, stages
|
|
74
|
-
case currentStage = "current_stage"
|
|
75
|
-
case startedAt = "started_at"
|
|
76
|
-
case updatedAt = "updated_at"
|
|
77
|
-
case fromVersion = "from_version"
|
|
78
|
-
case targetVersion = "target_version"
|
|
79
|
-
case previousVersion = "previous_version"
|
|
80
|
-
case projectRoot = "project_root"
|
|
81
|
-
case registry
|
|
82
|
-
case rollbackCommand = "rollback_command"
|
|
83
|
-
case sideEffectsStarted = "side_effects_started"
|
|
84
|
-
case resultStatus = "result_status"
|
|
85
|
-
case publicError = "public_error"
|
|
86
|
-
case receiptPath = "receipt_path"
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
3
|
final class OperationCoordinator {
|
|
91
4
|
static let updateStageOrder = [
|
|
92
5
|
"preflight", "download_or_registry_check", "temporary_install_smoke", "global_install",
|
|
93
6
|
"resolve_new_binary", "version_probe", "new_version_doctor", "hook_trust_repair",
|
|
94
7
|
"project_receipt", "global_skills_reconcile", "native_capability_setup", "menubar_rebuild",
|
|
95
|
-
"menubar_signature_verify", "
|
|
8
|
+
"menubar_signature_verify", "menubar_version_probe", "update_finalize_doctor",
|
|
9
|
+
"final_self_verification", "snapshot_refresh"
|
|
96
10
|
]
|
|
97
11
|
static let postUpdateReconciliationStages = [
|
|
98
12
|
"hook_trust_repair", "project_receipt", "global_skills_reconcile",
|
|
99
|
-
"native_capability_setup", "update_finalize_doctor", "final_self_verification",
|
|
13
|
+
"native_capability_setup", "menubar_version_probe", "update_finalize_doctor", "final_self_verification",
|
|
100
14
|
"snapshot_refresh"
|
|
101
15
|
]
|
|
102
16
|
private let directory: URL
|
|
@@ -115,7 +29,8 @@ final class OperationCoordinator {
|
|
|
115
29
|
summary: String,
|
|
116
30
|
targetVersion: String? = nil,
|
|
117
31
|
projectRoot: String? = nil,
|
|
118
|
-
registry: String? = nil
|
|
32
|
+
registry: String? = nil,
|
|
33
|
+
providerApply: ProviderApplyProjection? = nil
|
|
119
34
|
) -> OperationSnapshot? {
|
|
120
35
|
queue.sync {
|
|
121
36
|
if mutationGroup != nil, activeMutation != nil { return nil }
|
|
@@ -125,7 +40,7 @@ final class OperationCoordinator {
|
|
|
125
40
|
state: .queued, stage: "queued", progress: 0, startedAt: now,
|
|
126
41
|
updatedAt: now, publicSummary: summary, logPath: AppRuntime.lastActionLogPath,
|
|
127
42
|
retryable: true, targetVersion: targetVersion, projectRoot: projectRoot,
|
|
128
|
-
registry: registry
|
|
43
|
+
registry: registry, recovery: nil, providerApply: providerApply
|
|
129
44
|
)
|
|
130
45
|
if let group = mutationGroup { activeMutation = (snapshot.id, group) }
|
|
131
46
|
write(snapshot)
|
|
@@ -149,7 +64,8 @@ final class OperationCoordinator {
|
|
|
149
64
|
updatedAt: ISO8601DateFormatter().string(from: Date()),
|
|
150
65
|
publicSummary: summary, logPath: snapshot.logPath, retryable: retryable,
|
|
151
66
|
targetVersion: snapshot.targetVersion, projectRoot: snapshot.projectRoot,
|
|
152
|
-
registry: snapshot.registry
|
|
67
|
+
registry: snapshot.registry, recovery: snapshot.recovery,
|
|
68
|
+
providerApply: snapshot.providerApply
|
|
153
69
|
)
|
|
154
70
|
write(next)
|
|
155
71
|
if releaseMutationGuard, [.succeeded, .failed, .cancelled, .terminalUncertain].contains(state) {
|
|
@@ -178,6 +94,147 @@ final class OperationCoordinator {
|
|
|
178
94
|
}
|
|
179
95
|
}
|
|
180
96
|
|
|
97
|
+
/// Records the public recovery decision in the existing private operation
|
|
98
|
+
/// receipt. No request body, credential, account identifier, or secret-derived
|
|
99
|
+
/// fingerprint is accepted by this API.
|
|
100
|
+
func recordRecovery(
|
|
101
|
+
_ snapshot: OperationSnapshot,
|
|
102
|
+
status: OperationRecoveryStatus,
|
|
103
|
+
summary: String
|
|
104
|
+
) -> OperationSnapshot {
|
|
105
|
+
queue.sync {
|
|
106
|
+
let nextState: OperationState
|
|
107
|
+
switch status.state {
|
|
108
|
+
case .autoResumePending: nextState = .running
|
|
109
|
+
case .pausedResumable: nextState = .waitingForConfirmation
|
|
110
|
+
default: nextState = snapshot.state
|
|
111
|
+
}
|
|
112
|
+
let next = OperationSnapshot(
|
|
113
|
+
schema: snapshot.schema, id: snapshot.id, kind: snapshot.kind,
|
|
114
|
+
state: nextState, stage: snapshot.stage, progress: snapshot.progress,
|
|
115
|
+
startedAt: snapshot.startedAt,
|
|
116
|
+
updatedAt: ISO8601DateFormatter().string(from: Date()),
|
|
117
|
+
publicSummary: summary, logPath: snapshot.logPath,
|
|
118
|
+
retryable: status.state == .autoResumePending || status.state == .pausedResumable,
|
|
119
|
+
targetVersion: snapshot.targetVersion, projectRoot: snapshot.projectRoot,
|
|
120
|
+
registry: snapshot.registry, recovery: status,
|
|
121
|
+
providerApply: snapshot.providerApply
|
|
122
|
+
)
|
|
123
|
+
write(next)
|
|
124
|
+
if status.state == .pausedResumable, activeMutation?.id == snapshot.id {
|
|
125
|
+
activeMutation = nil
|
|
126
|
+
}
|
|
127
|
+
return next
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
func recordProviderApplyStage(
|
|
132
|
+
_ snapshot: OperationSnapshot,
|
|
133
|
+
stage: ProviderApplyStageName,
|
|
134
|
+
status: ProviderApplyStageState,
|
|
135
|
+
reasonCode: String? = nil
|
|
136
|
+
) throws -> OperationSnapshot {
|
|
137
|
+
try queue.sync {
|
|
138
|
+
guard let current = snapshot.providerApply else {
|
|
139
|
+
throw ProviderApplyProjectionError.invalidProjection
|
|
140
|
+
}
|
|
141
|
+
let projection = try current.transitioning(stage: stage, to: status, reasonCode: reasonCode)
|
|
142
|
+
let nextState: OperationState
|
|
143
|
+
if projection.failedStage != nil { nextState = .waitingForConfirmation }
|
|
144
|
+
else if projection.allSucceeded { nextState = .succeeded }
|
|
145
|
+
else { nextState = .running }
|
|
146
|
+
let next = OperationSnapshot(
|
|
147
|
+
schema: snapshot.schema, id: snapshot.id, kind: snapshot.kind,
|
|
148
|
+
state: nextState, stage: stage.rawValue,
|
|
149
|
+
progress: Double(projection.stages.filter { $0.status == .succeeded }.count) / Double(ProviderApplyStageName.allCases.count),
|
|
150
|
+
startedAt: snapshot.startedAt,
|
|
151
|
+
updatedAt: ISO8601DateFormatter().string(from: Date()),
|
|
152
|
+
publicSummary: providerApplySummary(projection), logPath: snapshot.logPath,
|
|
153
|
+
retryable: projection.failedStage != nil,
|
|
154
|
+
targetVersion: snapshot.targetVersion, projectRoot: snapshot.projectRoot,
|
|
155
|
+
registry: snapshot.registry, recovery: snapshot.recovery,
|
|
156
|
+
providerApply: projection
|
|
157
|
+
)
|
|
158
|
+
write(next)
|
|
159
|
+
if (nextState == .waitingForConfirmation || nextState == .succeeded)
|
|
160
|
+
&& activeMutation?.id == snapshot.id {
|
|
161
|
+
activeMutation = nil
|
|
162
|
+
}
|
|
163
|
+
return next
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/// Executes one caller-declared retry-safe operation. The exact same closure
|
|
168
|
+
/// may be re-entered only for a transient network classification and at most
|
|
169
|
+
/// twice. Authentication, provider mode, account binding, external settings,
|
|
170
|
+
/// and unknown causes are preserved as a manual resumable pause.
|
|
171
|
+
func executeWithRecovery(
|
|
172
|
+
_ snapshot: OperationSnapshot,
|
|
173
|
+
pinnedMode: String?,
|
|
174
|
+
pinnedModel: String?,
|
|
175
|
+
retryDelay: TimeInterval = 0.25,
|
|
176
|
+
attempt: @escaping (_ attemptNumber: Int, _ finish: @escaping (OperationRecoveryAttemptOutcome) -> Void) -> Void,
|
|
177
|
+
onStatus: @escaping (OperationSnapshot) -> Void,
|
|
178
|
+
completion: @escaping (_ succeeded: Bool, _ snapshot: OperationSnapshot) -> Void
|
|
179
|
+
) {
|
|
180
|
+
var sameNetworkCauseRetries = 0
|
|
181
|
+
var currentSnapshot = snapshot
|
|
182
|
+
var runAttempt: (() -> Void)!
|
|
183
|
+
runAttempt = { [weak self] in
|
|
184
|
+
guard let self = self else { return }
|
|
185
|
+
attempt(sameNetworkCauseRetries) { outcome in
|
|
186
|
+
DispatchQueue.main.async {
|
|
187
|
+
if outcome.succeeded {
|
|
188
|
+
let active = OperationRecoveryPolicy.evaluate(
|
|
189
|
+
cause: nil,
|
|
190
|
+
sameCauseRetryCount: sameNetworkCauseRetries,
|
|
191
|
+
progressSignal: outcome.progressSignal,
|
|
192
|
+
progressObserved: true,
|
|
193
|
+
secondsWithoutProgress: 0,
|
|
194
|
+
warningAfter: 1,
|
|
195
|
+
pinnedMode: pinnedMode,
|
|
196
|
+
pinnedModel: pinnedModel
|
|
197
|
+
)
|
|
198
|
+
currentSnapshot = self.recordRecovery(
|
|
199
|
+
currentSnapshot,
|
|
200
|
+
status: active,
|
|
201
|
+
summary: "Progress observed · \(outcome.progressSignal.rawValue)"
|
|
202
|
+
)
|
|
203
|
+
onStatus(currentSnapshot)
|
|
204
|
+
completion(true, currentSnapshot)
|
|
205
|
+
return
|
|
206
|
+
}
|
|
207
|
+
let cause = outcome.cause ?? .unknown
|
|
208
|
+
let decision = OperationRecoveryPolicy.evaluate(
|
|
209
|
+
cause: cause,
|
|
210
|
+
sameCauseRetryCount: sameNetworkCauseRetries,
|
|
211
|
+
progressSignal: outcome.progressSignal,
|
|
212
|
+
progressObserved: false,
|
|
213
|
+
secondsWithoutProgress: 0,
|
|
214
|
+
warningAfter: 1,
|
|
215
|
+
pinnedMode: pinnedMode,
|
|
216
|
+
pinnedModel: pinnedModel
|
|
217
|
+
)
|
|
218
|
+
currentSnapshot = self.recordRecovery(
|
|
219
|
+
currentSnapshot,
|
|
220
|
+
status: decision,
|
|
221
|
+
summary: decision.nextAction
|
|
222
|
+
)
|
|
223
|
+
onStatus(currentSnapshot)
|
|
224
|
+
guard decision.state == .autoResumePending else {
|
|
225
|
+
completion(false, currentSnapshot)
|
|
226
|
+
return
|
|
227
|
+
}
|
|
228
|
+
sameNetworkCauseRetries = decision.retryCount
|
|
229
|
+
DispatchQueue.main.asyncAfter(deadline: .now() + max(0, retryDelay)) {
|
|
230
|
+
runAttempt()
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
runAttempt()
|
|
236
|
+
}
|
|
237
|
+
|
|
181
238
|
func latestUpdateReceipt() -> UpdateOperationReceiptSnapshot? {
|
|
182
239
|
queue.sync { readUpdateReceipt(directory.appendingPathComponent("update-latest.json")) }
|
|
183
240
|
}
|
|
@@ -333,6 +390,16 @@ final class OperationCoordinator {
|
|
|
333
390
|
}
|
|
334
391
|
}
|
|
335
392
|
|
|
393
|
+
private func providerApplySummary(_ projection: ProviderApplyProjection) -> String {
|
|
394
|
+
if let failed = projection.failedStage {
|
|
395
|
+
return "Provider apply paused at \(failed.stage.rawValue) · \(failed.reasonCode ?? "provider_apply_failed")"
|
|
396
|
+
}
|
|
397
|
+
let completed = projection.stages.filter { $0.status == .succeeded }.count
|
|
398
|
+
return projection.allSucceeded
|
|
399
|
+
? "Provider apply complete · new sessions use \(projection.newSessionDefault.mode) / \(projection.newSessionDefault.model)"
|
|
400
|
+
: "Provider apply stage \(completed)/\(ProviderApplyStageName.allCases.count)"
|
|
401
|
+
}
|
|
402
|
+
|
|
336
403
|
private func readUpdateReceipt(_ url: URL) -> UpdateOperationReceiptSnapshot? {
|
|
337
404
|
let permissions = (try? FileManager.default.attributesOfItem(atPath: url.path)[.posixPermissions] as? NSNumber)?.intValue
|
|
338
405
|
guard let values = try? url.resourceValues(forKeys: [.isRegularFileKey, .isSymbolicLinkKey, .fileSizeKey]),
|