sneakoscope 4.0.15 → 4.1.1

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.
Files changed (64) hide show
  1. package/README.md +20 -1
  2. package/crates/sks-core/Cargo.lock +1 -1
  3. package/crates/sks-core/Cargo.toml +1 -1
  4. package/crates/sks-core/src/main.rs +1 -1
  5. package/dist/bin/sks.js +1 -1
  6. package/dist/cli/install-helpers.js +12 -0
  7. package/dist/cli/router.js +13 -0
  8. package/dist/commands/doctor.js +355 -146
  9. package/dist/core/agents/agent-role-config.js +18 -41
  10. package/dist/core/codex/agent-config-file-repair.js +43 -2
  11. package/dist/core/codex-app/codex-agent-role-sync.js +4 -4
  12. package/dist/core/codex-control/codex-0142-capability.js +51 -6
  13. package/dist/core/codex-control/codex-app-server-v2-client.js +2 -2
  14. package/dist/core/codex-native/codex-native-feature-broker.js +113 -10
  15. package/dist/core/codex-native/codex-native-feature-matrix.js +11 -2
  16. package/dist/core/codex-native/native-capability-postcheck.js +59 -16
  17. package/dist/core/codex-native/native-capability-repair-matrix.js +77 -13
  18. package/dist/core/commands/basic-cli.js +9 -0
  19. package/dist/core/commands/mad-sks-command.js +36 -30
  20. package/dist/core/doctor/codex-doctor-bridge.js +135 -21
  21. package/dist/core/doctor/doctor-dirty-planner.js +52 -8
  22. package/dist/core/doctor/doctor-native-capability-repair.js +42 -7
  23. package/dist/core/doctor/doctor-readiness-matrix.js +121 -5
  24. package/dist/core/doctor/doctor-repair-postcheck.js +13 -3
  25. package/dist/core/doctor/doctor-transaction.js +11 -4
  26. package/dist/core/fsx.js +1 -1
  27. package/dist/core/init.js +2 -2
  28. package/dist/core/managed-assets/managed-assets-manifest.js +116 -0
  29. package/dist/core/providers/glm/bench/glm-benchmark-runner.js +4 -3
  30. package/dist/core/providers/glm/bench/glm-benchmark-types.js +1 -1
  31. package/dist/core/routes.js +8 -4
  32. package/dist/core/update/update-migration-state.js +495 -0
  33. package/dist/core/update-check.js +151 -4
  34. package/dist/core/version.js +1 -1
  35. package/dist/core/zellij/zellij-launcher.js +17 -5
  36. package/dist/scripts/codex-0142-doctor-wiring-check.js +21 -0
  37. package/dist/scripts/codex-0142-manifest-check.js +1 -1
  38. package/dist/scripts/config-managed-merge-callsite-coverage-check.js +6 -0
  39. package/dist/scripts/doctor-dirty-plan-check.js +1 -1
  40. package/dist/scripts/doctor-fix-production-blackbox.js +4 -4
  41. package/dist/scripts/doctor-plain-fix-native-assets-check.js +12 -0
  42. package/dist/scripts/doctor-post-repair-authoritative-check.js +39 -0
  43. package/dist/scripts/doctor-transaction-engine-check.js +1 -0
  44. package/dist/scripts/doctor-transaction-owns-mutations-check.js +14 -0
  45. package/dist/scripts/doctor-warning-only-not-blocker-check.js +56 -0
  46. package/dist/scripts/loop-directive-check-lib.js +2 -1
  47. package/dist/scripts/machine-local-evidence-zero-check.js +22 -0
  48. package/dist/scripts/mad-sks-zellij-launch-check.js +7 -1
  49. package/dist/scripts/managed-role-manifest-parity-check.js +23 -0
  50. package/dist/scripts/naruto-real-parallelism-blackbox.js +17 -4
  51. package/dist/scripts/native-capability-postcheck-check.js +1 -0
  52. package/dist/scripts/native-capability-repair-matrix-check.js +2 -0
  53. package/dist/scripts/native-chrome-web-review-repair-check.js +1 -0
  54. package/dist/scripts/native-computer-use-repair-check.js +1 -0
  55. package/dist/scripts/postinstall-global-doctor-blackbox.js +12 -0
  56. package/dist/scripts/sks-3-1-5-directive-check-lib.js +1 -1
  57. package/dist/scripts/sks-401-all-feature-regression-blackbox.js +1 -1
  58. package/dist/scripts/update-concurrent-lock-check.js +11 -0
  59. package/dist/scripts/update-doctor-lifecycle-check.js +13 -0
  60. package/dist/scripts/update-first-command-migration-check.js +14 -0
  61. package/dist/scripts/update-new-binary-reexec-check.js +12 -0
  62. package/package.json +14 -1
  63. package/schemas/doctor-status-v2.schema.json +42 -0
  64. package/schemas/update-migration.schema.json +47 -0
package/README.md CHANGED
@@ -35,7 +35,26 @@ Set up this agent project with Sneakoscope Codex. Use [[mandarange/Sneakoscope-C
35
35
 
36
36
  ## 🚀 Current Release
37
37
 
38
- SKS **4.0.15** prepares the Codex `rust-v0.142.0` compatibility surface while preserving the existing GPT/Codex/MAD `sks --mad` route. The release pins `@openai/codex-sdk` to `0.142.0`, records a Codex release manifest, resolves one Codex binary identity per mission, isolates SDK child environment variables, and restores the published tarball script contract by shipping the verification scripts that package metadata exposes.
38
+ SKS **4.1.1** tightens the 4.1 readiness path for publishing and first-command migration. Doctor now keeps optional native surfaces route-gated, writes v2 project migration receipts tied to an installation epoch, and keeps the migration profile fast enough for update gates.
39
+
40
+ What changed in 4.1.1:
41
+
42
+ - **Core vs route readiness.** Computer Use and Chrome/web review are manual-required route gates, not core blockers for ordinary Doctor/update readiness.
43
+ - **Migration receipt v2.** First-command migration writes project receipts with installation epoch, project hash, required blockers, and optional warnings so stale locks or optional capabilities do not block normal commands.
44
+ - **Fast migration Doctor.** `sks doctor --fix --profile migration --machine-only` skips optional Codex App, Zellij, provider, native, and deep diagnostic work while preserving core readiness checks.
45
+ - **MAD bootstrap latency.** MAD defers update prompts, provider setup, UI snapshots, pane proof, and native swarm proof until the route actually needs them.
46
+ - **Release metadata truth.** Package, CLI version constants, Rust crate metadata, README, changelog, and release checks all point at 4.1.1.
47
+
48
+ What changed in 4.1.0:
49
+
50
+ SKS **4.1.0** turns the Codex `rust-v0.142.0` compatibility surface into the authoritative Doctor/update readiness path. Doctor now consumes structured Codex Doctor semantics, separates pre-repair observation from post-repair truth, repairs managed native assets from plain `sks doctor --fix`, and gates update completion on a current project migration receipt.
51
+
52
+ - **Semantic Doctor readiness.** Warning-only Codex Doctor output stays ready, blocking checks block readiness, and unknown non-zero/unparseable Doctor output fails closed.
53
+ - **Post-repair authority.** `sks doctor --fix` records pre-repair Codex Doctor output but bases readiness on the final post-repair Doctor run.
54
+ - **Managed native assets.** Skills, agent roles, hooks, and Context7 transport share the 4.1.0 managed manifest; stale directive markers no longer appear in generated role content.
55
+ - **Codex 0.142 wiring.** The native feature broker exposes multi-agent mode, rollout budget strategy, indexed web search, current time, app-server overload, MCP reconnect, plugin refresh, thread search, remote native environment, and terminal subagent error handling as current capabilities.
56
+ - **Update lifecycle receipts.** `sks update now` runs old-version Doctor preflight, installs through the guarded npm path, re-resolves the new package-local binary, runs new-version global Doctor, and writes a project migration receipt before reporting `updated`.
57
+ - **Local evidence hygiene.** Machine-local `.sneakoscope` runtime evidence is ignored and guarded so release commits do not carry host paths, secrets, or transient proof logs.
39
58
 
40
59
  What changed in 4.0.15:
41
60
 
@@ -76,7 +76,7 @@ dependencies = [
76
76
 
77
77
  [[package]]
78
78
  name = "sks-core"
79
- version = "4.0.15"
79
+ version = "4.1.1"
80
80
  dependencies = [
81
81
  "serde_json",
82
82
  ]
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "4.0.15"
3
+ version = "4.1.1"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
@@ -4,7 +4,7 @@ use std::io::{self, Read, Seek, SeekFrom};
4
4
  fn main() {
5
5
  let mut args = std::env::args().skip(1);
6
6
  match args.next().as_deref() {
7
- Some("--version") => println!("sks-rs 4.0.15"),
7
+ Some("--version") => println!("sks-rs 4.1.1"),
8
8
  Some("compact-info") => {
9
9
  let mut input = String::new();
10
10
  let _ = io::stdin().read_to_string(&mut input);
package/dist/bin/sks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const FAST_PACKAGE_VERSION = '4.0.15';
2
+ const FAST_PACKAGE_VERSION = '4.1.1';
3
3
  const args = process.argv.slice(2);
4
4
  try {
5
5
  if (args[0] === '--agent' && args[1] === 'worker') {
@@ -15,6 +15,7 @@ import { reconcileCodexAppUpgradeProcesses } from '../core/codex-app.js';
15
15
  import { recordCodexLbHealthEvent } from '../core/codex-lb-circuit.js';
16
16
  import { loadCodexLbEnv, writeCodexLbKeychain, codexLbMetadataPath } from '../core/codex-lb/codex-lb-env.js';
17
17
  import { buildCodexLbSetupPlan, codexLbPersistenceSummary, installCodexLbShellProfileSnippet, selectedCodexLbPersistenceModes } from '../core/codex-lb/codex-lb-setup.js';
18
+ import { runPostinstallGlobalDoctorAndMarkPending } from '../core/update/update-migration-state.js';
18
19
  const DEFAULT_CODEX_APP_PLUGINS = [
19
20
  ['browser', 'openai-bundled'],
20
21
  ['chrome', 'openai-bundled'],
@@ -80,6 +81,17 @@ export async function postinstall({ bootstrap, args = [] }) {
80
81
  console.log(`Codex App Fast mode: skipped (${fastModeRepair.reason}).`);
81
82
  else if (fastModeRepair.status === 'failed')
82
83
  console.log(`Codex App Fast mode: auto repair failed. Run \`sks setup\`. ${fastModeRepair.error || ''}`.trim());
84
+ const postinstallDoctor = await runPostinstallGlobalDoctorAndMarkPending().catch((err) => ({
85
+ ok: false,
86
+ doctor: null,
87
+ pending: null,
88
+ blockers: [err?.message || String(err)],
89
+ warnings: []
90
+ }));
91
+ if (postinstallDoctor.ok)
92
+ console.log('SKS update migration: global Doctor ran; project receipt will be finalized on first normal command.');
93
+ else
94
+ console.log(`SKS update migration: global Doctor did not complete; first normal command will retry. ${(postinstallDoctor.blockers || []).join(', ')}`.trim());
83
95
  // Terminating a third-party app's processes during `npm i` is unsafe by default; opt-in only.
84
96
  const appProcessRepair = process.env.SKS_POSTINSTALL_RECONCILE_APP_PROCESSES === '1'
85
97
  ? await reconcileCodexAppUpgradeProcesses()
@@ -1,5 +1,6 @@
1
1
  import { COMMAND_ALIASES, COMMANDS, } from './command-registry.js';
2
2
  import { detectGlobalMode, glmWithoutMadResult } from './global-mode-router.js';
3
+ import { ensureCurrentMigrationBeforeCommand } from '../core/update/update-migration-state.js';
3
4
  export function isCommandName(value) {
4
5
  return Object.prototype.hasOwnProperty.call(COMMANDS, value);
5
6
  }
@@ -48,6 +49,18 @@ export async function dispatch(args) {
48
49
  return result;
49
50
  }
50
51
  const entry = COMMANDS[command];
52
+ const migrationGate = await ensureCurrentMigrationBeforeCommand({ command, args: rest });
53
+ if (!migrationGate.ok) {
54
+ console.error('SKS project migration blocked.');
55
+ for (const blocker of migrationGate.blockers)
56
+ console.error(`Required blocker: ${blocker}`);
57
+ for (const warning of migrationGate.warnings)
58
+ console.error(`Optional warning: ${warning}`);
59
+ console.error(`Receipt: ${migrationGate.receipt_path}`);
60
+ console.error('Run: sks doctor --fix --yes');
61
+ process.exitCode = 1;
62
+ return migrationGate;
63
+ }
51
64
  const mod = await entry.lazy();
52
65
  if (typeof mod.run !== 'function')
53
66
  throw new Error(`Command ${command} must export run(command, args)`);