sneakoscope 1.20.5 → 1.21.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 (59) hide show
  1. package/README.md +1 -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/.sks-build-stamp.json +4 -4
  6. package/dist/bin/sks.js +1 -1
  7. package/dist/build-manifest.json +11 -9
  8. package/dist/cli/install-helpers.js +7 -10
  9. package/dist/commands/mad-sks.d.ts +14 -1
  10. package/dist/core/agents/agent-codex-cockpit.d.ts +1 -1
  11. package/dist/core/agents/agent-command-surface.d.ts +1 -1
  12. package/dist/core/agents/agent-command-surface.js +2 -1
  13. package/dist/core/agents/agent-orchestrator.js +2 -2
  14. package/dist/core/agents/agent-plan.d.ts +1 -1
  15. package/dist/core/agents/agent-plan.js +1 -1
  16. package/dist/core/agents/fast-mode-policy.d.ts +5 -0
  17. package/dist/core/agents/fast-mode-policy.js +12 -1
  18. package/dist/core/auto-review.d.ts +10 -0
  19. package/dist/core/auto-review.js +58 -0
  20. package/dist/core/codex/codex-cli-syntax-builder.d.ts +1 -1
  21. package/dist/core/codex/codex-cli-syntax-builder.js +11 -2
  22. package/dist/core/codex/codex-config-eperm-repair.d.ts +1 -0
  23. package/dist/core/codex/codex-project-config-policy.d.ts +1 -0
  24. package/dist/core/codex/codex-project-config-policy.js +26 -5
  25. package/dist/core/commands/fast-mode-command.js +4 -4
  26. package/dist/core/commands/mad-sks-command.d.ts +14 -1
  27. package/dist/core/commands/mad-sks-command.js +13 -3
  28. package/dist/core/commands/naruto-command.js +27 -2
  29. package/dist/core/commands/research-command.js +6 -3
  30. package/dist/core/commands/run-command.js +3 -3
  31. package/dist/core/commands/team-command.d.ts +7 -6
  32. package/dist/core/commands/team-command.js +60 -13
  33. package/dist/core/fsx.d.ts +1 -1
  34. package/dist/core/fsx.js +1 -1
  35. package/dist/core/hooks-runtime.js +4 -4
  36. package/dist/core/init.js +7 -21
  37. package/dist/core/mad-sks/immutable-harness-guard.d.ts +6 -1
  38. package/dist/core/mad-sks/immutable-harness-guard.js +33 -2
  39. package/dist/core/perf-bench.d.ts +3 -2
  40. package/dist/core/pipeline-internals/runtime-core.d.ts +6 -4
  41. package/dist/core/pipeline-internals/runtime-core.js +22 -21
  42. package/dist/core/pipeline-internals/runtime-gates.js +3 -3
  43. package/dist/core/preflight/parallel-preflight-engine.d.ts +1 -0
  44. package/dist/core/preflight/parallel-preflight-engine.js +9 -2
  45. package/dist/core/routes.js +7 -7
  46. package/dist/core/team-dag.js +1 -1
  47. package/dist/core/team-live.js +4 -4
  48. package/dist/core/version-manager.js +32 -11
  49. package/dist/core/version.d.ts +1 -1
  50. package/dist/core/version.js +1 -1
  51. package/dist/core/zellij/zellij-clipboard-config.d.ts +21 -0
  52. package/dist/core/zellij/zellij-clipboard-config.js +54 -0
  53. package/dist/core/zellij/zellij-launcher.d.ts +44 -4
  54. package/dist/core/zellij/zellij-launcher.js +41 -14
  55. package/dist/core/zellij/zellij-layout-builder.d.ts +6 -0
  56. package/dist/core/zellij/zellij-layout-builder.js +34 -2
  57. package/dist/core/zellij/zellij-pane-proof.d.ts +6 -0
  58. package/dist/core/zellij/zellij-pane-proof.js +20 -0
  59. package/package.json +1 -1
package/README.md CHANGED
@@ -16,7 +16,7 @@ Set up this agent project with Sneakoscope Codex. Use [[mandarange/Sneakoscope-C
16
16
 
17
17
  ## Current Release
18
18
 
19
- SKS **1.20.5** makes `sks --mad` actually open the Zellij session. Previous releases only *created* a detached background session and printed an `Attach with: ...` hint, so nothing opened in the operator's terminal. SKS now performs the follow-up foreground attach automatically when launched in an interactive TTY (using the same `ZELLIJ_SOCKET_DIR` namespace as the background session), and falls back to printing the manual attach command if attach fails. Auto-attach is skipped for `--json`, non-TTY/piped launches, when already inside a Zellij session, or with `--no-attach` / `SKS_NO_ZELLIJ_ATTACH=1`; `--attach` forces it.
19
+ SKS **1.21.1** fixes three `sks --mad` launch problems. **(1) Launch speed:** the launch no longer SHA-256-hashes the entire protected core (~1,900 files) on every invocation — the never-compared launch snapshot now uses a cheap metadata digest, and the redundant live `codex exec` config probe is skipped on the launch hot path (restore with `SKS_LAUNCH_FULL_CODEX_PROBE=1`); the immutable-harness integrity gates still use full content hashing. **(2) Zellij clipboard:** sessions now set `copy_command "pbcopy"` + `copy_on_select true` so selected text reaches the macOS clipboard instead of relying on OSC 52 (which Terminal.app drops); Shift+drag remains the native-selection fallback. **(3) Codex legacy-profile warning:** SKS migrated its config profiles to Codex 0.134+ per-file `$CODEX_HOME/<name>.config.toml` overlays the project-config splitter now drops the deprecated `[profiles.*]` tables / `profile=` selector instead of relocating them into the home config, so Codex stops warning at startup. The Codex App fast-mode `[profiles.sks-fast-high]` table and `default_profile` are preserved.
20
20
 
21
21
  SKS **1.20.4** is a targeted `sks --mad` / codex-lb Zellij usability patch: when a background MAD Zellij session launches successfully, SKS now prints the exact `Attach with: ZELLIJ_SOCKET_DIR=... zellij attach ...` command so operators can enter the fresh session without manually reconstructing the socket namespace.
22
22
 
@@ -76,7 +76,7 @@ dependencies = [
76
76
 
77
77
  [[package]]
78
78
  name = "sks-core"
79
- version = "1.20.5"
79
+ version = "1.21.1"
80
80
  dependencies = [
81
81
  "serde_json",
82
82
  ]
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "1.20.5"
3
+ version = "1.21.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 1.20.5"),
7
+ Some("--version") => println!("sks-rs 1.21.1"),
8
8
  Some("compact-info") => {
9
9
  let mut input = String::new();
10
10
  let _ = io::stdin().read_to_string(&mut input);
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema": "sks.dist-build-stamp.v1",
3
3
  "package_name": "sneakoscope",
4
- "package_version": "1.20.5",
5
- "source_digest": "4ba5f14a828460ed0146c7109f59e53e148d6b1ffb42e8c01b00e64086da827e",
6
- "source_file_count": 1750,
7
- "built_at_source_time": 1780287464818
4
+ "package_version": "1.21.1",
5
+ "source_digest": "a0c970633ae67e63cd3667675e1a590e0d0e26caefd55f7f812764c7f8b8f869",
6
+ "source_file_count": 1752,
7
+ "built_at_source_time": 1780307630901
8
8
  }
package/dist/bin/sks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const FAST_PACKAGE_VERSION = '1.20.5';
2
+ const FAST_PACKAGE_VERSION = '1.21.1';
3
3
  const args = process.argv.slice(2);
4
4
  try {
5
5
  if (args[0] === '--agent' && args[1] === 'worker') {
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "schema": "sks.dist-build.v2",
3
- "version": "1.20.5",
4
- "package_version": "1.20.5",
3
+ "version": "1.21.1",
4
+ "package_version": "1.21.1",
5
5
  "typescript": true,
6
6
  "mjs_runtime_files": 0,
7
- "compiled_file_count": 1020,
8
- "compiled_js_count": 510,
9
- "compiled_dts_count": 510,
10
- "source_digest": "4ba5f14a828460ed0146c7109f59e53e148d6b1ffb42e8c01b00e64086da827e",
11
- "source_file_count": 1750,
12
- "source_files_hash": "de93b15a72352d00481b958333ed964bf083563809e3beddfe4e64046720df75",
13
- "source_list_hash": "de93b15a72352d00481b958333ed964bf083563809e3beddfe4e64046720df75",
7
+ "compiled_file_count": 1022,
8
+ "compiled_js_count": 511,
9
+ "compiled_dts_count": 511,
10
+ "source_digest": "a0c970633ae67e63cd3667675e1a590e0d0e26caefd55f7f812764c7f8b8f869",
11
+ "source_file_count": 1752,
12
+ "source_files_hash": "6b8e7de7bcab2c6ddd83d31e15d7219e9d3f595813a1ec8173936208d3c877ef",
13
+ "source_list_hash": "6b8e7de7bcab2c6ddd83d31e15d7219e9d3f595813a1ec8173936208d3c877ef",
14
14
  "src_mjs_runtime_files": 0,
15
15
  "dist_stamp_schema": "sks.dist-build-stamp.v1",
16
16
  "files": [
@@ -1021,6 +1021,8 @@
1021
1021
  "core/work-order-ledger.js",
1022
1022
  "core/zellij/zellij-capability.d.ts",
1023
1023
  "core/zellij/zellij-capability.js",
1024
+ "core/zellij/zellij-clipboard-config.d.ts",
1025
+ "core/zellij/zellij-clipboard-config.js",
1024
1026
  "core/zellij/zellij-command.d.ts",
1025
1027
  "core/zellij/zellij-command.js",
1026
1028
  "core/zellij/zellij-lane-renderer.d.ts",
@@ -1525,21 +1525,18 @@ function normalizeCodexFastModeUiConfigOnce(text = '') {
1525
1525
  next = upsertTomlTableKeyIfAbsent(next, 'user.fast_mode', 'visible = true');
1526
1526
  next = upsertTomlTableKeyIfAbsent(next, 'user.fast_mode', 'enabled = true');
1527
1527
  next = upsertTomlTableKeyIfAbsent(next, 'user.fast_mode', 'default_profile = "sks-fast-high"');
1528
+ // Keep ONLY the sks-fast-high config-profile table: the Codex App fast-mode
1529
+ // (`[user.fast_mode] default_profile = "sks-fast-high"`) and the
1530
+ // codex-app:ui-preservation gate still expect it. The other SKS config profiles are
1531
+ // no longer written as `[profiles.sks-*]` tables here (Codex 0.134+ deprecates them);
1532
+ // they are managed as per-file `<name>.config.toml` overlays by
1533
+ // migrateSksProfilesToPerFile (src/core/auto-review.ts), which also writes the
1534
+ // sks-fast-high overlay for CLI `--profile` use.
1528
1535
  next = upsertTomlTableKey(next, 'profiles.sks-fast-high', 'model = "gpt-5.5"');
1529
1536
  next = upsertTomlTableKey(next, 'profiles.sks-fast-high', 'service_tier = "fast"');
1530
1537
  next = upsertTomlTableKey(next, 'profiles.sks-fast-high', 'approval_policy = "on-request"');
1531
1538
  next = upsertTomlTableKey(next, 'profiles.sks-fast-high', 'sandbox_mode = "workspace-write"');
1532
1539
  next = upsertTomlTableKey(next, 'profiles.sks-fast-high', 'model_reasoning_effort = "high"');
1533
- next = upsertTomlTableKey(next, 'profiles.sks-research-xhigh', 'model = "gpt-5.5"');
1534
- next = upsertTomlTableKey(next, 'profiles.sks-research-xhigh', 'service_tier = "fast"');
1535
- next = upsertTomlTableKey(next, 'profiles.sks-research-xhigh', 'approval_policy = "on-request"');
1536
- next = upsertTomlTableKey(next, 'profiles.sks-research-xhigh', 'sandbox_mode = "workspace-write"');
1537
- next = upsertTomlTableKey(next, 'profiles.sks-research-xhigh', 'model_reasoning_effort = "xhigh"');
1538
- next = upsertTomlTableKey(next, 'profiles.sks-research', 'model = "gpt-5.5"');
1539
- next = upsertTomlTableKey(next, 'profiles.sks-research', 'service_tier = "fast"');
1540
- next = upsertTomlTableKey(next, 'profiles.sks-research', 'approval_policy = "never"');
1541
- next = upsertTomlTableKey(next, 'profiles.sks-research', 'sandbox_mode = "workspace-write"');
1542
- next = upsertTomlTableKey(next, 'profiles.sks-research', 'model_reasoning_effort = "xhigh"');
1543
1540
  // Plugin auto-enable is OPT-IN only. Force-writing `[plugins."name@marketplace"] enabled =
1544
1541
  // true` for marketplace plugins the App may not have installed (different build/channel)
1545
1542
  // makes the App reference plugins it cannot load -> broken/blocked plugin UI. It also
@@ -2,7 +2,7 @@ export declare function run(_command: any, args?: any): Promise<void | {
2
2
  schema: string;
3
3
  generated_at: string;
4
4
  ok: boolean;
5
- kind: "agent" | "team" | "mad";
5
+ kind: "agent" | "team" | "mad" | "naruto";
6
6
  mission_id: string;
7
7
  session_name: string;
8
8
  root: string;
@@ -10,6 +10,13 @@ export declare function run(_command: any, args?: any): Promise<void | {
10
10
  ledger_root: string;
11
11
  layout_path: string;
12
12
  layout_artifact: string;
13
+ main_pane_kind: "codex_interactive" | "status_shell";
14
+ codex_pane: {
15
+ enabled: boolean;
16
+ args: string[];
17
+ launch_env_keys: string[];
18
+ bin: string;
19
+ };
13
20
  command: string[];
14
21
  launch_command: string[];
15
22
  launch_command_with_env: string;
@@ -17,8 +24,11 @@ export declare function run(_command: any, args?: any): Promise<void | {
17
24
  background_command_with_env: string;
18
25
  attach_command: string;
19
26
  attach_command_with_env: string;
27
+ attach_requested: boolean;
20
28
  zellij_socket_dir: string | null;
21
29
  zellij_socket_dir_source: import("../core/zellij/zellij-command.js").ZellijSocketDirSource;
30
+ clipboard_config_path: string;
31
+ clipboard_copy_command: string;
22
32
  pane_proof_path: string;
23
33
  pane_proof: {
24
34
  schema: string;
@@ -32,6 +42,8 @@ export declare function run(_command: any, args?: any): Promise<void | {
32
42
  main_pane: any;
33
43
  lane_panes: any[];
34
44
  expected_lane_count: number;
45
+ expected_main_command_includes: string | null;
46
+ main_command_ok: boolean;
35
47
  lane_count_ok: boolean;
36
48
  geometry_distinct: boolean | null;
37
49
  panes: any[];
@@ -109,6 +121,7 @@ export declare function run(_command: any, args?: any): Promise<void | {
109
121
  };
110
122
  moved_keys: string[];
111
123
  moved_tables: string[];
124
+ removed_legacy_profiles: string[];
112
125
  deprecated_approval_policy_fixed: boolean;
113
126
  actions: string[];
114
127
  parse_smoke: {
@@ -5,7 +5,7 @@ export declare const AGENT_LIVE_SUMMARY_JSON = "agent-live-summary.json";
5
5
  export declare const AGENT_PROGRESS_TIMELINE_MD = "agent-progress-timeline.md";
6
6
  export declare const AGENT_CODEX_COCKPIT_EVENTS = "agent-codex-cockpit-events.jsonl";
7
7
  export type CodexCockpitHookPayload = {
8
- hook_event_name: 'SubagentStart' | 'SubagentStop';
8
+ hook_event_name: 'NativeSessionStart' | 'NativeSessionStop' | 'SubagentStart' | 'SubagentStop';
9
9
  agent_id?: string;
10
10
  agent_type?: string;
11
11
  session_id?: string;
@@ -19,7 +19,7 @@ export declare function parseAgentCommandArgs(command: string, args?: string[]):
19
19
  dryRunPatches: boolean;
20
20
  maxWriteAgents: number;
21
21
  fastMode: boolean | undefined;
22
- serviceTier: string | undefined;
22
+ serviceTier: import("./fast-mode-policy.js").AgentServiceTier | undefined;
23
23
  noFast: boolean;
24
24
  apply: boolean;
25
25
  dryRun: boolean;
@@ -1,4 +1,5 @@
1
1
  import { DEFAULT_AGENT_COUNT } from './agent-schema.js';
2
+ import { normalizeServiceTier } from './fast-mode-policy.js';
2
3
  export function parseAgentCommandArgs(command, args = []) {
3
4
  const first = args[0] && !String(args[0]).startsWith('--') ? String(args[0]) : '';
4
5
  const actions = new Set(['run', 'worker', 'status', 'plan', 'spawn', 'watch', 'dashboard', 'cockpit', 'lane', 'board', 'ledger', 'collect', 'consensus', 'close', 'cleanup', 'proof', 'explain', 'rollback-patches']);
@@ -22,7 +23,7 @@ export function parseAgentCommandArgs(command, args = []) {
22
23
  const dryRunPatches = hasFlag(args, '--dry-run-patches') || hasFlag(args, '--dryrun-patches');
23
24
  const maxWriteAgents = Number(readOption(args, '--max-write-agents', Math.max(1, Math.min(concurrency, agents))));
24
25
  const explicitServiceTier = String(readOption(args, '--service-tier', '') || '');
25
- const serviceTier = explicitServiceTier === 'standard' || explicitServiceTier === 'fast' ? explicitServiceTier : undefined;
26
+ const serviceTier = normalizeServiceTier(explicitServiceTier, null) || undefined;
26
27
  const fastMode = hasFlag(args, '--no-fast') || serviceTier === 'standard' ? false : hasFlag(args, '--fast') ? true : undefined;
27
28
  const noFast = hasFlag(args, '--no-fast');
28
29
  const apply = hasFlag(args, '--apply');
@@ -264,7 +264,7 @@ export async function runNativeAgentOrchestrator(opts = {}) {
264
264
  await openAgentSession(ledgerRoot, agent);
265
265
  await heartbeatAgentSession(ledgerRoot, agent);
266
266
  await appendAgentCodexCockpitHookEvent(dir, {
267
- hook_event_name: 'SubagentStart',
267
+ hook_event_name: 'NativeSessionStart',
268
268
  agent_id: agent.id,
269
269
  agent_type: agent.role || agent.persona_id || 'agent',
270
270
  session_id: agent.session_id,
@@ -310,7 +310,7 @@ export async function runNativeAgentOrchestrator(opts = {}) {
310
310
  await completeAgentSession(ledgerRoot, agent);
311
311
  await closeAgentSession(ledgerRoot, agent, result.status === 'done' ? 'closed' : result.status);
312
312
  await appendAgentCodexCockpitHookEvent(dir, {
313
- hook_event_name: 'SubagentStop',
313
+ hook_event_name: 'NativeSessionStop',
314
314
  agent_id: agent.id,
315
315
  agent_type: agent.role || agent.persona_id || 'agent',
316
316
  session_id: agent.session_id,
@@ -11,7 +11,7 @@ export declare function agentPipelineStage(policy?: any): {
11
11
  id: string;
12
12
  goal: string;
13
13
  agent_count: number;
14
- max_parallel_subagents: number;
14
+ max_parallel_native_sessions: number;
15
15
  backend: string;
16
16
  read_only: boolean;
17
17
  write_policy: string;
@@ -33,7 +33,7 @@ export function agentPipelineStage(policy = {}) {
33
33
  id: AGENT_INTAKE_STAGE_ID,
34
34
  goal: 'Run native multi-session agent intake with non-overlapping leases and proof evidence.',
35
35
  agent_count: required ? Number(policy.agent_count || DEFAULT_AGENT_COUNT) : 0,
36
- max_parallel_subagents: Number(policy.agent_count || DEFAULT_AGENT_COUNT),
36
+ max_parallel_native_sessions: Number(policy.agent_count || DEFAULT_AGENT_COUNT),
37
37
  backend: 'native-agent-kernel',
38
38
  read_only: true,
39
39
  write_policy: 'read-only analysis; parent-owned integration',
@@ -2,12 +2,14 @@ export declare const FAST_MODE_POLICY_SCHEMA = "sks.fast-mode-policy.v1";
2
2
  export declare const FAST_MODE_PROPAGATION_PROOF_SCHEMA = "sks.fast-mode-propagation-proof.v1";
3
3
  export declare const FAST_MODE_PREFERENCE_SCHEMA = "sks.fast-mode-preference.v1";
4
4
  export type AgentServiceTier = 'fast' | 'standard';
5
+ export type CodexDesktopServiceTier = 'priority' | 'default';
5
6
  export type FastModePreferenceMode = AgentServiceTier;
6
7
  export interface FastModePolicy {
7
8
  schema: typeof FAST_MODE_POLICY_SCHEMA;
8
9
  generated_at: string;
9
10
  fast_mode: boolean;
10
11
  service_tier: AgentServiceTier;
12
+ codex_desktop_service_tier: CodexDesktopServiceTier;
11
13
  default_fast_mode: true;
12
14
  disabled_by: 'none' | 'no-fast' | 'service-tier-standard' | 'preference-standard';
13
15
  explicit_fast: boolean;
@@ -23,6 +25,7 @@ export interface FastModePreference {
23
25
  mode: FastModePreferenceMode;
24
26
  fast_mode: boolean;
25
27
  service_tier: AgentServiceTier;
28
+ codex_desktop_service_tier: CodexDesktopServiceTier;
26
29
  source: string;
27
30
  }
28
31
  export declare function resolveFastModePolicy(input?: any): FastModePolicy;
@@ -65,4 +68,6 @@ export declare function writeFastModePropagationProof(root: string, input?: {
65
68
  artifacts: string[];
66
69
  blockers: string[];
67
70
  }>;
71
+ export declare function normalizeServiceTier(value: unknown, fallback?: AgentServiceTier | null): AgentServiceTier | null;
72
+ export declare function codexDesktopServiceTier(tier: AgentServiceTier): CodexDesktopServiceTier;
68
73
  //# sourceMappingURL=fast-mode-policy.d.ts.map
@@ -24,6 +24,7 @@ export function resolveFastModePolicy(input = {}) {
24
24
  generated_at: nowIso(),
25
25
  fast_mode: serviceTier === 'fast',
26
26
  service_tier: serviceTier,
27
+ codex_desktop_service_tier: codexDesktopServiceTier(serviceTier),
27
28
  default_fast_mode: true,
28
29
  disabled_by: explicitNoFast ? 'no-fast' : explicitTier === 'standard' ? 'service-tier-standard' : preference?.mode === 'standard' ? 'preference-standard' : 'none',
29
30
  explicit_fast: explicitFast,
@@ -69,6 +70,7 @@ export async function writeFastModePreference(root = process.cwd(), mode, source
69
70
  mode: normalized,
70
71
  fast_mode: normalized === 'fast',
71
72
  service_tier: normalized,
73
+ codex_desktop_service_tier: codexDesktopServiceTier(normalized),
72
74
  source
73
75
  };
74
76
  await writeJsonAtomic(file, preference);
@@ -84,6 +86,7 @@ export function fastModeEnv(policy) {
84
86
  return {
85
87
  SKS_FAST_MODE: policy.fast_mode ? '1' : '0',
86
88
  SKS_SERVICE_TIER: policy.service_tier,
89
+ SKS_CODEX_DESKTOP_SERVICE_TIER: policy.codex_desktop_service_tier,
87
90
  SKS_REASONING_PROFILE_SUFFIX: policy.fast_mode ? 'fast' : 'standard'
88
91
  };
89
92
  }
@@ -164,12 +167,19 @@ export async function writeFastModePropagationProof(root, input = { policy: reso
164
167
  await writeJsonAtomic(path.join(root, 'fast-mode-propagation-proof.json'), report);
165
168
  return report;
166
169
  }
167
- function normalizeServiceTier(value, fallback = 'fast') {
170
+ export function normalizeServiceTier(value, fallback = 'fast') {
168
171
  const text = String(value || '').toLowerCase();
169
172
  if (text === 'fast' || text === 'standard')
170
173
  return text;
174
+ if (text === 'priority')
175
+ return 'fast';
176
+ if (text === 'default')
177
+ return 'standard';
171
178
  return fallback;
172
179
  }
180
+ export function codexDesktopServiceTier(tier) {
181
+ return tier === 'fast' ? 'priority' : 'default';
182
+ }
173
183
  function normalizeFastModePreference(parsed, file) {
174
184
  const mode = normalizeServiceTier(parsed?.mode ?? parsed?.service_tier, 'fast') || 'fast';
175
185
  return {
@@ -178,6 +188,7 @@ function normalizeFastModePreference(parsed, file) {
178
188
  mode,
179
189
  fast_mode: mode === 'fast',
180
190
  service_tier: mode,
191
+ codex_desktop_service_tier: codexDesktopServiceTier(mode),
181
192
  source: typeof parsed?.source === 'string' ? parsed.source : 'unknown',
182
193
  path: file
183
194
  };
@@ -74,6 +74,16 @@ export declare function enableAutoReview(opts?: any): Promise<{
74
74
  dynamic_effort: "parent assigns high effort to safety/integrator lanes and medium or higher to verification lanes when proof risk is present";
75
75
  }>;
76
76
  }>;
77
+ export declare const SKS_CONFIG_PROFILES: Array<{
78
+ name: string;
79
+ stripTable: boolean;
80
+ block: string;
81
+ }>;
82
+ export declare function migrateSksProfilesToPerFile(opts?: any): Promise<{
83
+ config_path: any;
84
+ profiles_written: string[];
85
+ tables_stripped: string[];
86
+ }>;
77
87
  export declare function enableMadHighProfile(opts?: any): Promise<{
78
88
  config_path: any;
79
89
  profile_config_path: string;
@@ -92,8 +92,63 @@ export async function enableAutoReview(opts = {}) {
92
92
  launch_args: ['--profile', autoReviewProfileName({ high })]
93
93
  };
94
94
  }
95
+ // Canonical registry of every SKS config profile. Codex 0.134+ deprecated the
96
+ // `[profiles.*]` tables / top-level `profile=` selector (warns at startup) in favor of
97
+ // per-file `$CODEX_HOME/<name>.config.toml` overlays loaded by `--profile <name>`.
98
+ // `stripTable: true` => remove the legacy `[profiles.<name>]` table from the home
99
+ // config during migration. sks-fast-high keeps its table because the Codex App
100
+ // fast-mode (`[user.fast_mode] default_profile = "sks-fast-high"`) and the
101
+ // codex-app:ui-preservation gate still expect it; its per-file overlay is also written
102
+ // so CLI `--profile sks-fast-high` works too.
103
+ export const SKS_CONFIG_PROFILES = [
104
+ { name: 'sks-task-low', stripTable: true, block: sksProfileFileBlock({ effort: 'low' }) },
105
+ { name: 'sks-task-medium', stripTable: true, block: sksProfileFileBlock({ effort: 'medium' }) },
106
+ { name: 'sks-logic-high', stripTable: true, block: sksProfileFileBlock({ effort: 'high' }) },
107
+ { name: 'sks-fast-high', stripTable: false, block: sksProfileFileBlock({ effort: 'high', serviceTier: 'fast' }) },
108
+ { name: 'sks-research-xhigh', stripTable: true, block: sksProfileFileBlock({ effort: 'xhigh' }) },
109
+ { name: 'sks-research', stripTable: true, block: sksProfileFileBlock({ effort: 'xhigh', approvalPolicy: 'never' }) },
110
+ { name: 'sks-team', stripTable: true, block: sksProfileFileBlock({ effort: 'medium' }) },
111
+ { name: MAD_HIGH_PROFILE, stripTable: true, block: sksProfileFileBlock({ effort: 'high', approvalPolicy: 'never', sandboxMode: 'danger-full-access', reviewer: AUTO_REVIEW_REVIEWER }) },
112
+ { name: 'sks-default', stripTable: true, block: sksProfileFileBlock({ effort: 'high' }) }
113
+ ];
114
+ function sksProfileFileBlock(opts = {}) {
115
+ return [
116
+ 'model = "gpt-5.5"',
117
+ `service_tier = "${opts.serviceTier || 'fast'}"`,
118
+ `approval_policy = "${opts.approvalPolicy || 'on-request'}"`,
119
+ ...(opts.reviewer ? [`approvals_reviewer = "${opts.reviewer}"`] : []),
120
+ `sandbox_mode = "${opts.sandboxMode || 'workspace-write'}"`,
121
+ `model_reasoning_effort = "${opts.effort || 'medium'}"`
122
+ ].join('\n');
123
+ }
124
+ // Migrate every SKS config profile to a per-file `<name>.config.toml` overlay in
125
+ // CODEX_HOME and strip the deprecated legacy `[profiles.sks-*]` tables / `profile=`
126
+ // selectors from the home config. Idempotent (second run is a no-op). This is the
127
+ // step that clears the Codex deprecation warning on `sks --mad`.
128
+ export async function migrateSksProfilesToPerFile(opts = {}) {
129
+ const configPath = opts.configPath || codexConfigPath(opts.env || process.env);
130
+ await ensureDir(path.dirname(configPath));
131
+ const current = await readText(configPath, '');
132
+ let next = String(current || '');
133
+ for (const profile of SKS_CONFIG_PROFILES) {
134
+ if (profile.stripTable)
135
+ next = removeLegacyProfileConfig(next, profile.name);
136
+ }
137
+ if (next && !next.endsWith('\n'))
138
+ next += '\n';
139
+ if (next !== String(current || ''))
140
+ await writeTextAtomic(configPath, next);
141
+ for (const profile of SKS_CONFIG_PROFILES)
142
+ await writeProfileConfig(configPath, profile.name, profile.block);
143
+ return {
144
+ config_path: configPath,
145
+ profiles_written: SKS_CONFIG_PROFILES.map((profile) => profile.name),
146
+ tables_stripped: SKS_CONFIG_PROFILES.filter((profile) => profile.stripTable).map((profile) => profile.name)
147
+ };
148
+ }
95
149
  export async function enableMadHighProfile(opts = {}) {
96
150
  const configPath = opts.configPath || codexConfigPath(opts.env || process.env);
151
+ const env = opts.env || process.env;
97
152
  await ensureDir(path.dirname(configPath));
98
153
  const current = await readText(configPath, '');
99
154
  let next = removeLegacyProfileConfig(current, MAD_HIGH_PROFILE);
@@ -101,6 +156,9 @@ export async function enableMadHighProfile(opts = {}) {
101
156
  if (!next.endsWith('\n'))
102
157
  next += '\n';
103
158
  await writeTextAtomic(configPath, next);
159
+ // Convert all SKS profiles to per-file overlays and strip the deprecated tables /
160
+ // selectors so Codex stops warning about the legacy config profile on launch.
161
+ await migrateSksProfilesToPerFile({ configPath, env });
104
162
  await writeProfileConfig(configPath, MAD_HIGH_PROFILE, profileConfigBlock({
105
163
  effort: 'high',
106
164
  approvalPolicy: 'never',
@@ -1,5 +1,5 @@
1
1
  export type CodexSandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';
2
- export type CodexServiceTier = 'fast' | 'standard' | 'default' | 'flex' | 'auto';
2
+ export type CodexServiceTier = 'fast' | 'standard';
3
3
  export type BuildCodexExecArgsOptions = {
4
4
  json?: boolean;
5
5
  outputSchema?: string | null;
@@ -34,9 +34,18 @@ export function buildCodexExecArgs(opts) {
34
34
  args.push('--dangerously-bypass-approvals-and-sandbox');
35
35
  else if (opts.sandbox)
36
36
  args.push('--sandbox', opts.sandbox);
37
- if (opts.serviceTier)
38
- args.push('-c', `service_tier=${opts.serviceTier}`);
37
+ const serviceTier = normalizeCodexServiceTier(opts.serviceTier);
38
+ if (serviceTier)
39
+ args.push('-c', `service_tier=${serviceTier}`);
39
40
  args.push(opts.prompt);
40
41
  return args;
41
42
  }
43
+ function normalizeCodexServiceTier(value) {
44
+ const text = String(value || '').toLowerCase();
45
+ if (text === 'fast' || text === 'priority')
46
+ return 'fast';
47
+ if (text === 'standard' || text === 'default')
48
+ return 'standard';
49
+ return null;
50
+ }
42
51
  //# sourceMappingURL=codex-cli-syntax-builder.js.map
@@ -40,6 +40,7 @@ export declare function repairCodexConfigEperm(rootInput?: string, opts?: any):
40
40
  };
41
41
  moved_keys: string[];
42
42
  moved_tables: string[];
43
+ removed_legacy_profiles: string[];
43
44
  deprecated_approval_policy_fixed: boolean;
44
45
  actions: string[];
45
46
  parse_smoke: {
@@ -32,6 +32,7 @@ export declare function splitCodexProjectConfigPolicy(rootInput?: string, opts?:
32
32
  };
33
33
  moved_keys: string[];
34
34
  moved_tables: string[];
35
+ removed_legacy_profiles: string[];
35
36
  deprecated_approval_policy_fixed: boolean;
36
37
  actions: string[];
37
38
  parse_smoke: {
@@ -4,8 +4,6 @@ import path from 'node:path';
4
4
  import { ensureDir, nowIso, readText, writeJsonAtomic, writeTextAtomic } from '../fsx.js';
5
5
  export const CODEX_PROJECT_CONFIG_POLICY_SCHEMA = 'sks.codex-project-config-policy.v1';
6
6
  const MACHINE_LOCAL_TOP_LEVEL_KEYS = new Set([
7
- 'profile',
8
- 'profiles',
9
7
  'model_provider',
10
8
  'model_providers',
11
9
  'openai_base_url',
@@ -20,13 +18,23 @@ const MACHINE_LOCAL_TOP_LEVEL_KEYS = new Set([
20
18
  'telemetry'
21
19
  ]);
22
20
  const MACHINE_LOCAL_TABLE_PREFIXES = [
23
- 'profiles',
24
21
  'model_providers',
25
22
  'notify',
26
23
  'otel',
27
24
  'telemetry',
28
25
  'experimental_telemetry'
29
26
  ];
27
+ // Codex 0.134+ removed the legacy config-profile consumers: `--profile NAME` now
28
+ // layers `$CODEX_HOME/<name>.config.toml` over the base config and the top-level
29
+ // `profile = "..."` selector / `[profiles.*]` tables are deprecated and warned about
30
+ // at startup. So these are NO LONGER machine-local-and-moved-to-home — they are
31
+ // DROPPED from the project config entirely. The per-file profiles are owned by
32
+ // migrateSksProfilesToPerFile (src/core/auto-review.ts), which runs on `sks --mad`.
33
+ const DEPRECATED_LEGACY_PROFILE_TOP_LEVEL_KEYS = new Set(['profile', 'profiles']);
34
+ const DEPRECATED_LEGACY_PROFILE_TABLE_PREFIXES = ['profiles'];
35
+ function isDeprecatedLegacyProfileTable(table) {
36
+ return DEPRECATED_LEGACY_PROFILE_TABLE_PREFIXES.some((prefix) => table === prefix || table.startsWith(`${prefix}.`));
37
+ }
30
38
  export async function splitCodexProjectConfigPolicy(rootInput = process.cwd(), opts = {}) {
31
39
  const root = path.resolve(rootInput || process.cwd());
32
40
  const configPath = path.resolve(opts.configPath || path.join(root, '.codex', 'config.toml'));
@@ -124,6 +132,7 @@ export async function splitCodexProjectConfigPolicy(rootInput = process.cwd(), o
124
132
  },
125
133
  moved_keys: split.moved_keys,
126
134
  moved_tables: split.moved_tables,
135
+ removed_legacy_profiles: split.removed_legacy_profiles,
127
136
  deprecated_approval_policy_fixed: split.deprecated_approval_policy_fixed,
128
137
  actions,
129
138
  parse_smoke: parseSmoke,
@@ -250,10 +259,17 @@ function splitProjectToml(text) {
250
259
  const machineBlocks = [];
251
260
  const movedKeys = [];
252
261
  const movedTables = [];
262
+ const removedLegacyProfiles = [];
253
263
  const blockers = [];
254
264
  let profileName = null;
255
265
  let deprecatedFixed = false;
256
266
  for (const block of blocks) {
267
+ // Deprecated legacy config profiles are DROPPED, not moved to the home config
268
+ // (Codex 0.134+ warns about `[profiles.*]` tables and the `profile=` selector).
269
+ if (block.table && isDeprecatedLegacyProfileTable(block.table)) {
270
+ removedLegacyProfiles.push(block.table);
271
+ continue;
272
+ }
257
273
  if (block.table && isMachineLocalTable(block.table)) {
258
274
  if (block.array) {
259
275
  kept.push(block.text);
@@ -270,11 +286,15 @@ function splitProjectToml(text) {
270
286
  const moveLines = [];
271
287
  for (const line of block.text.split('\n')) {
272
288
  const key = topLevelKey(line);
289
+ if (key && DEPRECATED_LEGACY_PROFILE_TOP_LEVEL_KEYS.has(key)) {
290
+ if (key === 'profile')
291
+ profileName = tomlStringValue(line);
292
+ removedLegacyProfiles.push(`top_level:${key}`);
293
+ continue;
294
+ }
273
295
  if (key && MACHINE_LOCAL_TOP_LEVEL_KEYS.has(key)) {
274
296
  moveLines.push(line);
275
297
  movedKeys.push(key);
276
- if (key === 'profile')
277
- profileName = tomlStringValue(line);
278
298
  continue;
279
299
  }
280
300
  const fixed = fixDeprecatedApprovalPolicy(line);
@@ -302,6 +322,7 @@ function splitProjectToml(text) {
302
322
  machine_blocks: machineBlocks,
303
323
  moved_keys: [...new Set(movedKeys)],
304
324
  moved_tables: [...new Set(movedTables)],
325
+ removed_legacy_profiles: [...new Set(removedLegacyProfiles)],
305
326
  kept_keys: [],
306
327
  profile_name: profileName,
307
328
  deprecated_approval_policy_fixed: deprecatedFixed,
@@ -57,17 +57,17 @@ export async function fastModeCommand(args = []) {
57
57
  else if (action === 'clear')
58
58
  console.log(`Cleared: ${removed ? 'yes' : 'already default'}`);
59
59
  else if (!preference)
60
- console.log('Preference: default fast');
60
+ console.log('Preference: implicit fast');
61
61
  console.log('Dollar: $Fast-On | $Fast-Off | $Fast-Mode');
62
62
  return result;
63
63
  }
64
64
  function normalizeFastModeAction(value) {
65
65
  const text = String(value || 'status').toLowerCase();
66
- if (['on', 'enable', 'enabled', 'fast'].includes(text))
66
+ if (['on', 'enable', 'enabled', 'fast', 'priority'].includes(text))
67
67
  return 'on';
68
- if (['off', 'disable', 'disabled', 'standard', 'slow'].includes(text))
68
+ if (['off', 'disable', 'disabled', 'standard', 'slow', 'default'].includes(text))
69
69
  return 'off';
70
- if (['clear', 'default', 'reset'].includes(text))
70
+ if (['clear', 'reset'].includes(text))
71
71
  return 'clear';
72
72
  return 'status';
73
73
  }
@@ -2,7 +2,7 @@ export declare function madHighCommand(args?: any, deps?: any): Promise<void | {
2
2
  schema: string;
3
3
  generated_at: string;
4
4
  ok: boolean;
5
- kind: "agent" | "team" | "mad";
5
+ kind: "agent" | "team" | "mad" | "naruto";
6
6
  mission_id: string;
7
7
  session_name: string;
8
8
  root: string;
@@ -10,6 +10,13 @@ export declare function madHighCommand(args?: any, deps?: any): Promise<void | {
10
10
  ledger_root: string;
11
11
  layout_path: string;
12
12
  layout_artifact: string;
13
+ main_pane_kind: "codex_interactive" | "status_shell";
14
+ codex_pane: {
15
+ enabled: boolean;
16
+ args: string[];
17
+ launch_env_keys: string[];
18
+ bin: string;
19
+ };
13
20
  command: string[];
14
21
  launch_command: string[];
15
22
  launch_command_with_env: string;
@@ -17,8 +24,11 @@ export declare function madHighCommand(args?: any, deps?: any): Promise<void | {
17
24
  background_command_with_env: string;
18
25
  attach_command: string;
19
26
  attach_command_with_env: string;
27
+ attach_requested: boolean;
20
28
  zellij_socket_dir: string | null;
21
29
  zellij_socket_dir_source: import("../zellij/zellij-command.js").ZellijSocketDirSource;
30
+ clipboard_config_path: string;
31
+ clipboard_copy_command: string;
22
32
  pane_proof_path: string;
23
33
  pane_proof: {
24
34
  schema: string;
@@ -32,6 +42,8 @@ export declare function madHighCommand(args?: any, deps?: any): Promise<void | {
32
42
  main_pane: any;
33
43
  lane_panes: any[];
34
44
  expected_lane_count: number;
45
+ expected_main_command_includes: string | null;
46
+ main_command_ok: boolean;
35
47
  lane_count_ok: boolean;
36
48
  geometry_distinct: boolean | null;
37
49
  panes: any[];
@@ -109,6 +121,7 @@ export declare function madHighCommand(args?: any, deps?: any): Promise<void | {
109
121
  };
110
122
  moved_keys: string[];
111
123
  moved_tables: string[];
124
+ removed_legacy_profiles: string[];
112
125
  deprecated_approval_policy_fixed: boolean;
113
126
  actions: string[];
114
127
  parse_smoke: {