sneakoscope 1.21.4 → 1.21.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -5
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/crates/sks-core/src/main.rs +1 -1
- package/dist/.sks-build-stamp.json +4 -4
- package/dist/bin/sks.js +1 -1
- package/dist/build-manifest.json +15 -9
- package/dist/cli/command-registry.d.ts +4 -0
- package/dist/cli/command-registry.js +2 -0
- package/dist/cli/install-helpers.js +8 -1
- package/dist/cli/xai-command.d.ts +9 -0
- package/dist/cli/xai-command.js +175 -0
- package/dist/commands/doctor.js +9 -2
- package/dist/commands/image-ux-review.d.ts +16 -0
- package/dist/commands/mad-sks.d.ts +7 -0
- package/dist/commands/ppt.d.ts +14 -0
- package/dist/commands/zellij.js +74 -2
- package/dist/core/agents/agent-orchestrator.d.ts +14 -0
- package/dist/core/agents/agent-proof-evidence.d.ts +7 -0
- package/dist/core/agents/agent-proof-evidence.js +20 -0
- package/dist/core/agents/agent-roster.js +28 -18
- package/dist/core/agents/agent-runner-zellij.js +21 -1
- package/dist/core/agents/agent-trust-report.d.ts +7 -0
- package/dist/core/agents/agent-trust-report.js +12 -0
- package/dist/core/agents/route-collaboration-ledger.d.ts +14 -0
- package/dist/core/agents/zellij-lane-supervisor.d.ts +25 -0
- package/dist/core/agents/zellij-lane-supervisor.js +187 -28
- package/dist/core/auto-review.js +2 -2
- package/dist/core/codex/official-goal-mode.d.ts +3 -0
- package/dist/core/codex/official-goal-mode.js +9 -2
- package/dist/core/codex-app.d.ts +11 -0
- package/dist/core/codex-app.js +5 -7
- package/dist/core/commands/image-ux-review-command.d.ts +16 -0
- package/dist/core/commands/image-ux-review-command.js +4 -3
- package/dist/core/commands/mad-sks-command.d.ts +46 -0
- package/dist/core/commands/mad-sks-command.js +177 -2
- package/dist/core/commands/ppt-command.d.ts +14 -0
- package/dist/core/commands/team-command.d.ts +1 -0
- package/dist/core/commands/team-command.js +11 -6
- package/dist/core/feature-fixtures.js +1 -0
- package/dist/core/fsx.d.ts +1 -1
- package/dist/core/fsx.js +1 -1
- package/dist/core/hooks-runtime.js +62 -6
- package/dist/core/image-ux-review/imagegen-adapter.js +15 -4
- package/dist/core/image-ux-review.d.ts +3 -0
- package/dist/core/image-ux-review.js +27 -19
- package/dist/core/perf-bench.d.ts +1 -0
- package/dist/core/pipeline-internals/runtime-core.d.ts +2 -0
- package/dist/core/pipeline-internals/runtime-core.js +19 -4
- package/dist/core/pipeline-internals/runtime-gates.js +8 -1
- package/dist/core/proof/auto-finalize.js +4 -2
- package/dist/core/release/gate-manifest.js +5 -1
- package/dist/core/release-parallel-full-coverage.js +1 -0
- package/dist/core/routes.d.ts +2 -1
- package/dist/core/routes.js +50 -9
- package/dist/core/safety/ssot-guard.d.ts +42 -0
- package/dist/core/safety/ssot-guard.js +173 -0
- package/dist/core/verification/verification-worker-pool.js +13 -8
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/dist/core/zellij/zellij-clipboard-config.js +17 -5
- package/dist/core/zellij/zellij-lane-renderer.d.ts +11 -0
- package/dist/core/zellij/zellij-lane-renderer.js +116 -2
- package/dist/core/zellij/zellij-lane-runtime.d.ts +107 -0
- package/dist/core/zellij/zellij-lane-runtime.js +191 -0
- package/dist/core/zellij/zellij-launcher.d.ts +21 -0
- package/dist/core/zellij/zellij-layout-builder.d.ts +13 -0
- package/dist/core/zellij/zellij-layout-builder.js +30 -5
- package/dist/core/zellij/zellij-pane-proof.d.ts +7 -0
- package/dist/core/zellij/zellij-pane-proof.js +12 -0
- package/dist/scripts/release-parallel-check.js +1 -0
- package/package.json +3 -2
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.21.
|
|
19
|
+
SKS **1.21.5** restores Codex App compatibility for Codex CLI 0.135-era routing and readiness checks. User prompts that mix frustration/question marks with explicit implementation or release work now route to `$Team` instead of `$Answer`, bare `context7 mcp` wording no longer falls into the `$DB` route, and Codex App Git Actions readiness now trusts the `codex remote-control` command/version capability instead of the removed `remote_control` feature flag. Active-route follow-up prompts now re-evaluate substantive analysis, research, and code work for fresh Team/Research-style native sessions instead of collapsing into the previous single active context; plain "keep going" continuations still resume the current route, and commit-only prompts stay lightweight. `sks --mad` now starts a same-mission native agent swarm before opening the cockpit lanes, `sks-fast-high` no longer forces `workspace-write` over the Codex App Full Access selector, and `$Goal` official-mode detection also reads `codex features list`. This keeps Commit, Push, Commit and Push, PR, MAD cockpit, Goal bridge, and repeated Team-route hook checks green on modern Codex when the corresponding Codex capabilities are present. It carries forward the 1.21.4 Zellij lane, Naruto, and terminal scrollback improvements.
|
|
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
|
|
|
@@ -89,6 +89,32 @@ npm run release:readiness
|
|
|
89
89
|
|
|
90
90
|
Detailed release history lives in [CHANGELOG.md](CHANGELOG.md); every version-facing change should be recorded there before release. Current release gate status lives in [docs/release-readiness.md](docs/release-readiness.md).
|
|
91
91
|
|
|
92
|
+
## Parallelism, UX, And Integrations
|
|
93
|
+
|
|
94
|
+
- **Extreme parallel fan-out (`$Naruto` / native agents).** Each clone is a separate CLI worker that spends almost all of its wall-clock awaiting the Codex API, so live concurrency scales by **memory and the provider rate limit, not CPU cores** — a capable host can run up to 100 workers in parallel. The 429/rate-limit backoff is handled by the centralized responses retry policy. Tune it with `SKS_NARUTO_MAX_CONCURRENCY` (hard cap, 1–100), `SKS_NARUTO_GB_PER_WORKER` (memory budget per worker), and `SKS_NARUTO_MIN_CONCURRENCY` (low-free-memory floor).
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
sks naruto run "refactor the data layer" --clones 100 --json
|
|
98
|
+
SKS_NARUTO_MAX_CONCURRENCY=48 sks naruto run "sweep the test suite" --clones 48
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
- **Zellij trackpad scroll.** SKS-launched Zellij sessions enable `mouse_mode` so the trackpad wheel scrolls the pane under the cursor (the conversation/transcript) instead of the focused prompt input. Copy still works via `copy_command=pbcopy` + `copy_on_select`; set `SKS_ZELLIJ_MOUSE_MODE=0` to opt out.
|
|
102
|
+
|
|
103
|
+
- **Live MAD / Naruto cockpit lanes.** `sks --mad` starts a same-mission native agent swarm and opens the right-pane cockpit against that ledger, so fan-out work shows up live instead of a permanent "Workers idle". Tune MAD fan-out with `--mad-agents`, `--mad-swarm-work-items`, and `--mad-swarm-backend`; use `--no-mad-swarm` only when you intentionally want the old UI-only launch. Each Zellij lane now has per-slot SKS state, a nonblocking JSONL command bus, dynamic pane-id reconciliation from `zellij action list-panes --json --all`, and `nice`/dispatch-throttle metadata so later lane coordination does not fall back to a single synthetic pane. If a lane's own mission ledger is idle, the renderer can still mirror the most-recent active agent mission; disable that follow behavior with `SKS_LANE_FOLLOW_ACTIVE_MISSION=0`.
|
|
104
|
+
|
|
105
|
+
- **Image generation under codex-lb.** `gpt-image-2` routes through the same Codex `/responses` backend the load balancer already proxies, so `$imagegen` works when you are authenticated only through codex-lb (no direct `OPENAI_API_KEY`). The official Codex App `$imagegen` surface stays primary; the codex-lb/OpenAI API path is the fallback. Opt out with `SKS_IMAGEGEN_ALLOW_CODEX_LB_API_FALLBACK=0`.
|
|
106
|
+
|
|
107
|
+
- **xAI / Grok search.** Wire xAI Live Search into source intelligence as an MCP provider:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
sks xai check
|
|
111
|
+
sks xai setup --scope project --command "npx" --arg "-y" --arg "<your-grok-search-mcp>"
|
|
112
|
+
export XAI_API_KEY=xai-...
|
|
113
|
+
sks xai docs
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
- **Quieter update prompts.** The "update available" choice is shown once per conversation and then stays quiet for a short window (default 8 min, `SKS_UPDATE_OFFER_THROTTLE_MS`) instead of repeating on every prompt.
|
|
117
|
+
|
|
92
118
|
## Retention And Cleanup
|
|
93
119
|
|
|
94
120
|
SKS keeps durable learning context separate from disposable route work files. Durable context includes `.sneakoscope/memory/**`, shared TriWiki records, `.sneakoscope/wiki/context-pack.json`, wrongness memory, image voxels, avoidance rules, route Completion Proof, trust reports, evidence indexes, reflections, and agent proof summaries. These files are treated as the long-term learning and audit chain.
|
|
@@ -401,9 +427,9 @@ sks --mad
|
|
|
401
427
|
sks --mad --allow-package-install --allow-service-control --allow-network --yes
|
|
402
428
|
```
|
|
403
429
|
|
|
404
|
-
This syncs existing codex-lb provider auth, creates/uses the `sks-mad-high` high-power maintenance profile, opens the MAD-SKS permission gate for that Zellij run, and launches a Codex CLI layout. Bare `sks --mad` grants target-project file and shell scope only; add explicit `--allow-*` flags for packages, services, network, Computer Use, browser use, generated assets, file permissions, DB writes, or other high-risk scopes. MAD-SKS is not a DB-only unlock: it is explicit user authorization to widen approved target-project scopes. Catastrophic database wipe/all-row/project-management safeguards remain active, and the pipeline contract still forbids unrequested fallback implementation code.
|
|
430
|
+
This syncs existing codex-lb provider auth, creates/uses the `sks-mad-high` high-power maintenance profile, opens the MAD-SKS permission gate for that Zellij run, starts a same-mission read-only native agent swarm, and launches a Codex CLI layout whose right-side lanes read that MAD ledger. Bare `sks --mad` grants target-project file and shell scope only; add explicit `--allow-*` flags for packages, services, network, Computer Use, browser use, generated assets, file permissions, DB writes, or other high-risk scopes. MAD-SKS is not a DB-only unlock: it is explicit user authorization to widen approved target-project scopes. Catastrophic database wipe/all-row/project-management safeguards remain active, and the pipeline contract still forbids unrequested fallback implementation code.
|
|
405
431
|
|
|
406
|
-
Before launching, SKS checks npm for a newer `sneakoscope`; answer `y` to update or `n` to continue. Use `--yes` to approve missing dependency installs automatically.
|
|
432
|
+
Before launching, SKS checks npm for a newer `sneakoscope`; answer `y` to update or `n` to continue. Use `--yes` to approve missing dependency installs automatically. Tune MAD swarm startup with `--mad-agents <n>`, `--mad-swarm-work-items <n>`, and `--mad-swarm-backend <backend>`; `--no-mad-swarm` keeps only the cockpit UI if you need a temporary fallback.
|
|
407
433
|
|
|
408
434
|
### Team Missions
|
|
409
435
|
|
|
@@ -533,7 +559,7 @@ For headless remotely controllable Codex App/server sessions on Codex CLI 0.130.
|
|
|
533
559
|
sks codex-app remote-control -- --help
|
|
534
560
|
```
|
|
535
561
|
|
|
536
|
-
`sks codex-app check` reports whether the installed Codex CLI is new enough, whether the required app flags are visible, whether Fast/speed-selector config is unlocked, whether Codex App Git Actions can use Commit, Push, Commit and Push, and PR flows, whether the Codex Chrome Extension path is ready for web/browser/webapp verification, and whether installed OpenAI default plugins such as Browser, Chrome, Computer Use, Documents, Presentations, Spreadsheets, and LaTeX are enabled. `sks codex-app chrome-extension --json` is the rapid preflight for web QA/UX/browser routes. When codex-lb is configured, SKS keeps it selected as the top-level Codex App provider while still preserving required app flags and plugin settings. Codex CLI 0.130.0+ app-server/remote-control threads can pick up config changes live; older CLI/TUI sessions should still be restarted after `.codex/config.toml` or MCP/plugin changes.
|
|
562
|
+
`sks codex-app check` reports whether the installed Codex CLI is new enough, whether the required app flags are visible, whether Fast/speed-selector config is unlocked, whether Codex App Git Actions can use Commit, Push, Commit and Push, and PR flows, whether the Codex Chrome Extension path is ready for web/browser/webapp verification, and whether installed OpenAI default plugins such as Browser, Chrome, Computer Use, Documents, Presentations, Spreadsheets, and LaTeX are enabled. `sks-fast-high` intentionally does not pin `sandbox_mode`, so the Codex App/IDE permissions selector owns Full Access vs workspace-write while SKS supplies the model, Fast service tier, approval, and reasoning defaults. `sks codex-app chrome-extension --json` is the rapid preflight for web QA/UX/browser routes. When codex-lb is configured, SKS keeps it selected as the top-level Codex App provider while still preserving required app flags and plugin settings. Codex CLI 0.130.0+ app-server/remote-control threads can pick up config changes live; older CLI/TUI sessions should still be restarted after `.codex/config.toml` or MCP/plugin changes.
|
|
537
563
|
|
|
538
564
|
For web-related verification, SKS follows the official Codex Chrome Extension setup path first: https://developers.openai.com/codex/app/chrome-extension. `$QA-LOOP`, `$UX-Review`, `$Image-UX-Review`, browser smoke, authenticated web checks, localhost checks, and web visual review must halt quickly if that extension is missing or disabled. Only after the user says the extension setup is complete should the pipeline resume. Codex Computer Use is for native Mac/non-web targets only; it must not be used as browser/web-app verification evidence.
|
|
539
565
|
|
|
@@ -694,7 +720,7 @@ sks doctor --fix
|
|
|
694
720
|
sks codex-app check
|
|
695
721
|
```
|
|
696
722
|
|
|
697
|
-
`sks codex-app check` now prints `Git Actions`. It should be `ok` for Codex App Commit, Push, Commit and Push, and PR buttons to bypass SKS route gates. If it is blocked, repair config with `sks doctor --fix`; if the blocker mentions remote-control, update Codex CLI to `0.130.0` or newer and restart older app-server/TUI sessions.
|
|
723
|
+
`sks codex-app check` now prints `Git Actions`. It should be `ok` for Codex App Commit, Push, Commit and Push, and PR buttons to bypass SKS route gates. Recent Codex builds expose remote control through the `codex remote-control` command rather than a `remote_control` feature flag, so SKS checks the command/version capability directly. If it is blocked, repair config with `sks doctor --fix`; if the blocker mentions remote-control, update Codex CLI to `0.130.0` or newer and restart older app-server/TUI sessions.
|
|
698
724
|
|
|
699
725
|
### Codex App UI looks stale after codex-lb changes
|
|
700
726
|
|
|
@@ -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.21.
|
|
7
|
+
Some("--version") => println!("sks-rs 1.21.5"),
|
|
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.21.
|
|
5
|
-
"source_digest": "
|
|
6
|
-
"source_file_count":
|
|
7
|
-
"built_at_source_time":
|
|
4
|
+
"package_version": "1.21.5",
|
|
5
|
+
"source_digest": "2fb1d498e53bcbf76f7619c1ea8f3fbef564ddf96d97d2b88b743c51f12450e7",
|
|
6
|
+
"source_file_count": 1765,
|
|
7
|
+
"built_at_source_time": 1780379909190
|
|
8
8
|
}
|
package/dist/bin/sks.js
CHANGED
package/dist/build-manifest.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "sks.dist-build.v2",
|
|
3
|
-
"version": "1.21.
|
|
4
|
-
"package_version": "1.21.
|
|
3
|
+
"version": "1.21.5",
|
|
4
|
+
"package_version": "1.21.5",
|
|
5
5
|
"typescript": true,
|
|
6
6
|
"mjs_runtime_files": 0,
|
|
7
|
-
"compiled_file_count":
|
|
8
|
-
"compiled_js_count":
|
|
9
|
-
"compiled_dts_count":
|
|
10
|
-
"source_digest": "
|
|
11
|
-
"source_file_count":
|
|
12
|
-
"source_files_hash": "
|
|
13
|
-
"source_list_hash": "
|
|
7
|
+
"compiled_file_count": 1028,
|
|
8
|
+
"compiled_js_count": 514,
|
|
9
|
+
"compiled_dts_count": 514,
|
|
10
|
+
"source_digest": "2fb1d498e53bcbf76f7619c1ea8f3fbef564ddf96d97d2b88b743c51f12450e7",
|
|
11
|
+
"source_file_count": 1765,
|
|
12
|
+
"source_files_hash": "24cbdb061915eb66608252400a9c6feba71d0fb99480bf683049fe5e59792c89",
|
|
13
|
+
"source_list_hash": "24cbdb061915eb66608252400a9c6feba71d0fb99480bf683049fe5e59792c89",
|
|
14
14
|
"src_mjs_runtime_files": 0,
|
|
15
15
|
"dist_stamp_schema": "sks.dist-build-stamp.v1",
|
|
16
16
|
"files": [
|
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
"cli/recallpulse-command.js",
|
|
43
43
|
"cli/router.d.ts",
|
|
44
44
|
"cli/router.js",
|
|
45
|
+
"cli/xai-command.d.ts",
|
|
46
|
+
"cli/xai-command.js",
|
|
45
47
|
"commands/aliases.d.ts",
|
|
46
48
|
"commands/aliases.js",
|
|
47
49
|
"commands/all-features.d.ts",
|
|
@@ -863,6 +865,8 @@
|
|
|
863
865
|
"core/safety/requested-scope-contract.js",
|
|
864
866
|
"core/safety/side-effect-runtime-report.d.ts",
|
|
865
867
|
"core/safety/side-effect-runtime-report.js",
|
|
868
|
+
"core/safety/ssot-guard.d.ts",
|
|
869
|
+
"core/safety/ssot-guard.js",
|
|
866
870
|
"core/secret-redaction.d.ts",
|
|
867
871
|
"core/secret-redaction.js",
|
|
868
872
|
"core/session/project-namespace.d.ts",
|
|
@@ -1027,6 +1031,8 @@
|
|
|
1027
1031
|
"core/zellij/zellij-command.js",
|
|
1028
1032
|
"core/zellij/zellij-lane-renderer.d.ts",
|
|
1029
1033
|
"core/zellij/zellij-lane-renderer.js",
|
|
1034
|
+
"core/zellij/zellij-lane-runtime.d.ts",
|
|
1035
|
+
"core/zellij/zellij-lane-runtime.js",
|
|
1030
1036
|
"core/zellij/zellij-launcher.d.ts",
|
|
1031
1037
|
"core/zellij/zellij-launcher.js",
|
|
1032
1038
|
"core/zellij/zellij-layout-builder.d.ts",
|
|
@@ -76,6 +76,8 @@ export declare const COMMANDS: {
|
|
|
76
76
|
'computer-use': CommandEntry;
|
|
77
77
|
cu: CommandEntry;
|
|
78
78
|
context7: CommandEntry;
|
|
79
|
+
xai: CommandEntry;
|
|
80
|
+
grok: CommandEntry;
|
|
79
81
|
recallpulse: CommandEntry;
|
|
80
82
|
pipeline: CommandEntry;
|
|
81
83
|
guard: CommandEntry;
|
|
@@ -165,6 +167,8 @@ export declare const TYPED_COMMANDS: {
|
|
|
165
167
|
'computer-use': CommandEntry;
|
|
166
168
|
cu: CommandEntry;
|
|
167
169
|
context7: CommandEntry;
|
|
170
|
+
xai: CommandEntry;
|
|
171
|
+
grok: CommandEntry;
|
|
168
172
|
recallpulse: CommandEntry;
|
|
169
173
|
pipeline: CommandEntry;
|
|
170
174
|
guard: CommandEntry;
|
|
@@ -129,6 +129,8 @@ export const COMMANDS = {
|
|
|
129
129
|
'computer-use': entry('beta', 'Record native Mac/non-web Computer Use visual evidence', 'dist/core/commands/computer-use-command.js', commandArgsCommand(() => import('../core/commands/computer-use-command.js'), 'computerUseCommand', 'dist/core/commands/computer-use-command.js')),
|
|
130
130
|
cu: entry('beta', 'Alias for native Computer Use', 'dist/core/commands/computer-use-command.js', commandArgsCommand(() => import('../core/commands/computer-use-command.js'), 'computerUseCommand', 'dist/core/commands/computer-use-command.js')),
|
|
131
131
|
context7: entry('beta', 'Context7 checks and docs', 'dist/cli/context7-command.js', subcommand(() => import('./context7-command.js'), 'context7Command', 'dist/cli/context7-command.js', 'check')),
|
|
132
|
+
xai: entry('beta', 'Set up and check xAI/Grok search MCP integration', 'dist/cli/xai-command.js', subcommand(() => import('./xai-command.js'), 'xaiCommand', 'dist/cli/xai-command.js', 'check')),
|
|
133
|
+
grok: entry('beta', 'Alias for xAI/Grok search setup', 'dist/cli/xai-command.js', subcommand(() => import('./xai-command.js'), 'xaiCommand', 'dist/cli/xai-command.js', 'check')),
|
|
132
134
|
recallpulse: entry('labs', 'RecallPulse evidence route', 'dist/commands/recallpulse.js', directCommand(() => import('../commands/recallpulse.js'), 'dist/commands/recallpulse.js')),
|
|
133
135
|
pipeline: entry('beta', 'Inspect pipeline missions', 'dist/commands/pipeline.js', directCommand(() => import('../commands/pipeline.js'), 'dist/commands/pipeline.js')),
|
|
134
136
|
guard: entry('beta', 'Check harness guard', 'dist/commands/guard.js', directCommand(() => import('../commands/guard.js'), 'dist/commands/guard.js')),
|
|
@@ -63,6 +63,10 @@ export async function postinstall({ bootstrap, args = [] }) {
|
|
|
63
63
|
console.log(`Context7 MCP: skipped (${context7Install.reason}).`);
|
|
64
64
|
else if (context7Install.status === 'failed')
|
|
65
65
|
console.log(`Context7 MCP: auto setup failed. Run \`sks context7 setup --scope global\` or \`sks setup\`. ${context7Install.error || ''}`.trim());
|
|
66
|
+
// xAI/Grok web search is an optional source-intelligence provider. It needs a
|
|
67
|
+
// user-chosen MCP server + XAI_API_KEY, so we never auto-configure it — just make
|
|
68
|
+
// it discoverable (the integration the operator otherwise can't find at install).
|
|
69
|
+
console.log('xAI/Grok search (optional): add Grok Live Search with `sks xai setup` (then `export XAI_API_KEY=...`); see `sks xai docs`.');
|
|
66
70
|
const fastModeRepair = await ensureGlobalCodexFastModeDuringInstall();
|
|
67
71
|
if (fastModeRepair.status === 'updated')
|
|
68
72
|
console.log(`Codex App Fast mode: updated ${fastModeRepair.config_path}${fastModeRepair.backup_path ? ` (backup ${fastModeRepair.backup_path})` : ''}.`);
|
|
@@ -1544,7 +1548,10 @@ function normalizeCodexFastModeUiConfigOnce(text = '', opts = {}) {
|
|
|
1544
1548
|
next = upsertTomlTableKey(next, 'profiles.sks-fast-high', 'model = "gpt-5.5"');
|
|
1545
1549
|
next = upsertTomlTableKey(next, 'profiles.sks-fast-high', 'service_tier = "fast"');
|
|
1546
1550
|
next = upsertTomlTableKey(next, 'profiles.sks-fast-high', 'approval_policy = "on-request"');
|
|
1547
|
-
|
|
1551
|
+
// Do not force a sandbox from the Codex App fast profile. The App/IDE
|
|
1552
|
+
// permissions selector owns full-access vs workspace-write; this profile only
|
|
1553
|
+
// supplies SKS's model, speed, approval, and reasoning defaults.
|
|
1554
|
+
next = removeTomlTableKey(next, 'profiles.sks-fast-high', 'sandbox_mode');
|
|
1548
1555
|
next = upsertTomlTableKey(next, 'profiles.sks-fast-high', 'model_reasoning_effort = "high"');
|
|
1549
1556
|
// Plugin auto-enable is OPT-IN only. Force-writing `[plugins."name@marketplace"] enabled =
|
|
1550
1557
|
// true` for marketplace plugins the App may not have installed (different build/channel)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function xaiCommand(sub?: string, args?: string[]): Promise<void>;
|
|
2
|
+
export declare function xaiMcpToml(opts: {
|
|
3
|
+
name: string;
|
|
4
|
+
url?: string | null;
|
|
5
|
+
command?: string | null;
|
|
6
|
+
commandArgs?: string[];
|
|
7
|
+
envKey?: string;
|
|
8
|
+
}): string;
|
|
9
|
+
//# sourceMappingURL=xai-command.d.ts.map
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { ensureDir, projectRoot, readText, runProcess, sksRoot, writeTextAtomic } from '../core/fsx.js';
|
|
3
|
+
import { getCodexInfo } from '../core/codex-adapter.js';
|
|
4
|
+
import { detectXaiMcp } from '../core/mcp/xai-mcp-detector.js';
|
|
5
|
+
// `sks xai` — wire up xAI/Grok web search (Live Search) as a Codex MCP server so
|
|
6
|
+
// SKS source-intelligence can fan out to Grok alongside Context7 and Codex web
|
|
7
|
+
// search. SKS detects xAI via an MCP server whose name matches xai/grok/x-ai and
|
|
8
|
+
// that exposes a search/web/query tool (see core/mcp/xai-mcp-detector.ts), so
|
|
9
|
+
// `setup` registers that MCP server and points the operator at XAI_API_KEY.
|
|
10
|
+
//
|
|
11
|
+
// xAI reference (https://api.x.ai/v1): OpenAI-compatible Responses API with the
|
|
12
|
+
// `web_search` / `x_search` tools, model family `grok-4.x`, auth via XAI_API_KEY.
|
|
13
|
+
const XAI_DOCS_URL = 'https://docs.x.ai/developers/tools/web-search';
|
|
14
|
+
const XAI_API_BASE = 'https://api.x.ai/v1';
|
|
15
|
+
const DEFAULT_SERVER_NAME = 'grok-search';
|
|
16
|
+
const flag = (args, name) => args.includes(name);
|
|
17
|
+
export async function xaiCommand(sub = 'check', args = []) {
|
|
18
|
+
const action = sub || 'check';
|
|
19
|
+
if (action === 'check' || action === 'status')
|
|
20
|
+
return xaiCheck(args);
|
|
21
|
+
if (action === 'setup')
|
|
22
|
+
return xaiSetup(args);
|
|
23
|
+
if (action === 'docs' || action === 'help' || action === '--help' || action === '-h')
|
|
24
|
+
return xaiDocs(args);
|
|
25
|
+
throw new Error(`Unknown xai command: ${action}. Use: sks xai check | setup | status | docs`);
|
|
26
|
+
}
|
|
27
|
+
async function xaiCheck(args) {
|
|
28
|
+
const root = await projectRoot().catch(() => process.cwd());
|
|
29
|
+
const detection = await detectXaiMcp({ root });
|
|
30
|
+
if (flag(args, '--json'))
|
|
31
|
+
return console.log(JSON.stringify(detection, null, 2));
|
|
32
|
+
console.log('SKS xAI / Grok search MCP\n');
|
|
33
|
+
console.log(`Status: ${describeStatus(detection.status)}`);
|
|
34
|
+
console.log(`Configured: ${detection.configured ? 'yes' : 'no'}`);
|
|
35
|
+
console.log(`Search-capable: ${detection.search_capable ? 'yes' : detection.configured_but_unverified ? 'configured (tools unverified at runtime)' : 'no'}`);
|
|
36
|
+
if (detection.servers.length) {
|
|
37
|
+
for (const server of detection.servers) {
|
|
38
|
+
console.log(` • ${server.raw_name} (${server.source})${server.tools.length ? ` tools: ${server.tools.join(', ')}` : ''}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
console.log(`Checked: ${detection.config_paths_checked.join(', ') || 'none'}`);
|
|
42
|
+
if (!detection.configured) {
|
|
43
|
+
console.log('\nNot configured. Run: sks xai setup --scope project --command "<your-xai-mcp-server>"');
|
|
44
|
+
console.log('Then export your key: export XAI_API_KEY=xai-...');
|
|
45
|
+
console.log(`Docs: ${XAI_DOCS_URL}`);
|
|
46
|
+
}
|
|
47
|
+
else if (detection.status === 'configured_but_unverified') {
|
|
48
|
+
console.log('\nServer is registered; tool capability is verified when Codex lists its tools at runtime.');
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async function xaiSetup(args) {
|
|
52
|
+
const scope = readOption(args, '--scope', flag(args, '--global') ? 'global' : 'project');
|
|
53
|
+
if (!['project', 'global'].includes(scope))
|
|
54
|
+
throw new Error('Invalid xAI scope. Use --scope project or --scope global.');
|
|
55
|
+
const name = sanitizeServerName(readOption(args, '--name', DEFAULT_SERVER_NAME));
|
|
56
|
+
const url = readOption(args, '--url', null);
|
|
57
|
+
const command = readOption(args, '--command', null);
|
|
58
|
+
const commandArgs = readRepeatedOption(args, '--arg');
|
|
59
|
+
const envKey = readOption(args, '--api-key-env', 'XAI_API_KEY');
|
|
60
|
+
if (!url && !command) {
|
|
61
|
+
// Nothing to install yet: print a ready-to-paste config + the exact next steps
|
|
62
|
+
// instead of writing a broken/guessed server entry.
|
|
63
|
+
printSetupGuidance(scope, name, envKey);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (scope === 'global') {
|
|
67
|
+
const codex = await getCodexInfo();
|
|
68
|
+
if (!codex.bin)
|
|
69
|
+
throw new Error('Codex CLI missing. Install @openai/codex or set SKS_CODEX_BIN, then re-run.');
|
|
70
|
+
const cmdArgs = url
|
|
71
|
+
? ['mcp', 'add', name, '--url', url]
|
|
72
|
+
: ['mcp', 'add', name, '--', command, ...commandArgs];
|
|
73
|
+
const result = await runProcess(codex.bin, cmdArgs, { timeoutMs: 30000, maxOutputBytes: 64 * 1024 });
|
|
74
|
+
if (flag(args, '--json'))
|
|
75
|
+
return console.log(JSON.stringify({ scope, name, command: `${codex.bin} ${cmdArgs.join(' ')}`, result }, null, 2));
|
|
76
|
+
if (result.code !== 0)
|
|
77
|
+
throw new Error(result.stderr || result.stdout || 'codex mcp add failed');
|
|
78
|
+
console.log(`xAI/Grok MCP "${name}" registered globally.`);
|
|
79
|
+
console.log(`Set your key: export ${envKey}=xai-... (docs: ${XAI_DOCS_URL})`);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const root = await projectRoot().catch(() => sksRoot());
|
|
83
|
+
const changed = await ensureProjectXaiMcpConfig(root, { name, url, command, commandArgs, envKey });
|
|
84
|
+
const detection = await detectXaiMcp({ root });
|
|
85
|
+
if (flag(args, '--json'))
|
|
86
|
+
return console.log(JSON.stringify({ scope, name, changed, detection }, null, 2));
|
|
87
|
+
console.log(`xAI/Grok MCP "${name}" ${changed ? 'configured' : 'already configured'} in .codex/config.toml`);
|
|
88
|
+
console.log(`Detected: ${detection.configured ? 'yes' : 'no'} (${detection.status})`);
|
|
89
|
+
console.log(`Set your key: export ${envKey}=xai-... (docs: ${XAI_DOCS_URL})`);
|
|
90
|
+
}
|
|
91
|
+
async function xaiDocs(_args) {
|
|
92
|
+
console.log('SKS xAI / Grok search integration\n');
|
|
93
|
+
console.log(`API base: ${XAI_API_BASE}`);
|
|
94
|
+
console.log('Auth: XAI_API_KEY (Bearer)');
|
|
95
|
+
console.log('Model: grok-4.x (OpenAI-compatible Responses API)');
|
|
96
|
+
console.log('Tools: web_search, x_search (agentic Live Search)');
|
|
97
|
+
console.log(`Reference: ${XAI_DOCS_URL}\n`);
|
|
98
|
+
console.log('Wire it into SKS source-intelligence with an MCP server:');
|
|
99
|
+
console.log(' sks xai setup --scope project --command "npx" --arg "-y" --arg "<your-grok-search-mcp>"');
|
|
100
|
+
console.log(' sks xai setup --scope global --url "https://<your-grok-mcp-endpoint>"');
|
|
101
|
+
console.log(' export XAI_API_KEY=xai-...');
|
|
102
|
+
console.log(' sks xai check');
|
|
103
|
+
}
|
|
104
|
+
function printSetupGuidance(scope, name, envKey) {
|
|
105
|
+
console.log('SKS xAI / Grok search setup\n');
|
|
106
|
+
console.log('Specify the MCP server to register. Examples:');
|
|
107
|
+
console.log(` sks xai setup --scope ${scope} --command "npx" --arg "-y" --arg "<your-grok-search-mcp>"`);
|
|
108
|
+
console.log(` sks xai setup --scope ${scope} --url "https://<your-grok-mcp-endpoint>"`);
|
|
109
|
+
console.log('\nReady-to-paste .codex/config.toml block (edit command/args for your server):\n');
|
|
110
|
+
console.log(xaiMcpToml({ name, command: 'npx', commandArgs: ['-y', '<your-grok-search-mcp>'], envKey }).trim());
|
|
111
|
+
console.log(`\nThen set your key: export ${envKey}=xai-...`);
|
|
112
|
+
console.log(`Docs: ${XAI_DOCS_URL}`);
|
|
113
|
+
}
|
|
114
|
+
export function xaiMcpToml(opts) {
|
|
115
|
+
const name = sanitizeServerName(opts.name || DEFAULT_SERVER_NAME);
|
|
116
|
+
const envKey = opts.envKey || 'XAI_API_KEY';
|
|
117
|
+
const lines = [`[mcp_servers.${name}]`];
|
|
118
|
+
if (opts.url) {
|
|
119
|
+
lines.push(`url = ${JSON.stringify(opts.url)}`);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
lines.push(`command = ${JSON.stringify(opts.command || 'npx')}`);
|
|
123
|
+
const argv = (opts.commandArgs && opts.commandArgs.length) ? opts.commandArgs : ['-y', '<your-grok-search-mcp>'];
|
|
124
|
+
lines.push(`args = [${argv.map((a) => JSON.stringify(a)).join(', ')}]`);
|
|
125
|
+
}
|
|
126
|
+
lines.push(`env = { ${envKey} = ${JSON.stringify(`\${${envKey}}`)} }`);
|
|
127
|
+
lines.push('');
|
|
128
|
+
return lines.join('\n');
|
|
129
|
+
}
|
|
130
|
+
async function ensureProjectXaiMcpConfig(root, opts) {
|
|
131
|
+
const configPath = path.join(root, '.codex', 'config.toml');
|
|
132
|
+
await ensureDir(path.dirname(configPath));
|
|
133
|
+
const current = await readText(configPath, '');
|
|
134
|
+
const block = xaiMcpToml(opts).trim();
|
|
135
|
+
const existingRe = new RegExp(`(^|\\n)\\[mcp_servers\\.${escapeRegExp(opts.name)}\\]\\n[\\s\\S]*?(?=\\n\\[[^\\]]+\\]|\\s*$)`);
|
|
136
|
+
if (existingRe.test(current)) {
|
|
137
|
+
const next = current.replace(existingRe, `$1${block}\n`);
|
|
138
|
+
if (next === current)
|
|
139
|
+
return false;
|
|
140
|
+
await writeTextAtomic(configPath, next.endsWith('\n') ? next : `${next}\n`);
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
const text = String(current);
|
|
144
|
+
await writeTextAtomic(configPath, `${text.trimEnd()}${text.trim() ? '\n\n' : ''}${block}\n`);
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
function describeStatus(status) {
|
|
148
|
+
switch (status) {
|
|
149
|
+
case 'search_capable': return 'search-capable (ready)';
|
|
150
|
+
case 'configured_but_unverified': return 'configured (verify tools at runtime)';
|
|
151
|
+
case 'configured_no_search': return 'configured but no search tool detected';
|
|
152
|
+
case 'missing': return 'not configured';
|
|
153
|
+
default: return status;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function sanitizeServerName(value) {
|
|
157
|
+
const cleaned = String(value || DEFAULT_SERVER_NAME).trim().replace(/[^A-Za-z0-9._-]+/g, '-').replace(/^-+|-+$/g, '');
|
|
158
|
+
return cleaned || DEFAULT_SERVER_NAME;
|
|
159
|
+
}
|
|
160
|
+
function readOption(args, name, fallback) {
|
|
161
|
+
const i = args.indexOf(name);
|
|
162
|
+
return i >= 0 && args[i + 1] && !String(args[i + 1]).startsWith('--') ? args[i + 1] : fallback;
|
|
163
|
+
}
|
|
164
|
+
function readRepeatedOption(args, name) {
|
|
165
|
+
const out = [];
|
|
166
|
+
for (let i = 0; i < args.length; i += 1) {
|
|
167
|
+
if (args[i] === name && args[i + 1])
|
|
168
|
+
out.push(String(args[i + 1]));
|
|
169
|
+
}
|
|
170
|
+
return out;
|
|
171
|
+
}
|
|
172
|
+
function escapeRegExp(value) {
|
|
173
|
+
return String(value).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=xai-command.js.map
|
package/dist/commands/doctor.js
CHANGED
|
@@ -5,7 +5,7 @@ import { getCodexInfo } from '../core/codex-adapter.js';
|
|
|
5
5
|
import { rustInfo } from '../core/rust-accelerator.js';
|
|
6
6
|
import { codexAppIntegrationStatus } from '../core/codex-app.js';
|
|
7
7
|
import { codexLbMetrics, readCodexLbCircuit } from '../core/codex-lb-circuit.js';
|
|
8
|
-
import { ensureGlobalCodexSkillsDuringInstall } from '../cli/install-helpers.js';
|
|
8
|
+
import { ensureGlobalCodexSkillsDuringInstall, ensureGlobalCodexFastModeDuringInstall } from '../cli/install-helpers.js';
|
|
9
9
|
import { normalizeInstallScope } from '../core/init.js';
|
|
10
10
|
import { inspectCodexConfigReadability } from '../core/codex/codex-config-readability.js';
|
|
11
11
|
import { repairCodexConfigEperm } from '../core/codex/codex-config-eperm-repair.js';
|
|
@@ -36,7 +36,14 @@ export async function run(_command, args = []) {
|
|
|
36
36
|
config_backup_path: preFixBackup,
|
|
37
37
|
global_skills: installScope === 'global' && !flag(args, '--local-only')
|
|
38
38
|
? await ensureGlobalCodexSkillsDuringInstall({ force: true })
|
|
39
|
-
: { status: 'skipped', reason: 'project or local-only repair' }
|
|
39
|
+
: { status: 'skipped', reason: 'project or local-only repair' },
|
|
40
|
+
// Re-seed the Codex App Fast-mode UI table ([user.fast_mode] visible/enabled/
|
|
41
|
+
// default_profile) in the global ~/.codex/config.toml so existing installs whose
|
|
42
|
+
// config predates the Fast-mode UI keys get the App speed selector back. Safe:
|
|
43
|
+
// backs up + parse-validates before writing, no-op when already present.
|
|
44
|
+
codex_app_fast_mode: flag(args, '--local-only')
|
|
45
|
+
? { status: 'skipped', reason: 'local-only repair' }
|
|
46
|
+
: await ensureGlobalCodexFastModeDuringInstall().catch((err) => ({ status: 'failed', error: err?.message || String(err) }))
|
|
40
47
|
};
|
|
41
48
|
}
|
|
42
49
|
const root = await projectRoot();
|
|
@@ -131,6 +131,7 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
131
131
|
planned_reviews: any;
|
|
132
132
|
generated_count: any;
|
|
133
133
|
real_generated_count: any;
|
|
134
|
+
non_real_generated_count: any;
|
|
134
135
|
required_count: any;
|
|
135
136
|
text_only_count: any;
|
|
136
137
|
generated_image_file_evidence_checked: boolean;
|
|
@@ -710,6 +711,13 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
710
711
|
zellij_lane_manifest: string;
|
|
711
712
|
zellij_lane_persistence: {
|
|
712
713
|
supervisor: string;
|
|
714
|
+
runtime_manifest: string | null;
|
|
715
|
+
dispatch_mode: "jsonl_nonblocking";
|
|
716
|
+
fifo_policy: "disabled_to_avoid_writer_blocking";
|
|
717
|
+
resource_throttle_ms: any;
|
|
718
|
+
nice_level: number;
|
|
719
|
+
runtime_policy_ok: boolean;
|
|
720
|
+
pane_id_source_ok: boolean;
|
|
713
721
|
no_flicker_verified: boolean;
|
|
714
722
|
pane_survival_checked: boolean;
|
|
715
723
|
unexpected_close_count: number;
|
|
@@ -1007,6 +1015,13 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
1007
1015
|
zellij_lane_manifest_ok: boolean;
|
|
1008
1016
|
zellij_lane_supervisor: string;
|
|
1009
1017
|
lane_supervisor_integrated: boolean;
|
|
1018
|
+
zellij_lane_runtime_manifest: string | null;
|
|
1019
|
+
zellij_lane_runtime_policy_ok: boolean;
|
|
1020
|
+
zellij_lane_dispatch_mode: "jsonl_nonblocking";
|
|
1021
|
+
zellij_lane_fifo_policy: "disabled_to_avoid_writer_blocking";
|
|
1022
|
+
zellij_lane_resource_throttle_ms: any;
|
|
1023
|
+
zellij_lane_nice_level: number;
|
|
1024
|
+
zellij_lane_pane_id_source_ok: boolean;
|
|
1010
1025
|
zellij_lane_no_flicker_verified: boolean;
|
|
1011
1026
|
zellij_lane_survival_checked: boolean;
|
|
1012
1027
|
zellij_lane_unexpected_close_count: number;
|
|
@@ -1204,6 +1219,7 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
1204
1219
|
planned_reviews: any;
|
|
1205
1220
|
generated_count: any;
|
|
1206
1221
|
real_generated_count: any;
|
|
1222
|
+
non_real_generated_count: any;
|
|
1207
1223
|
required_count: any;
|
|
1208
1224
|
text_only_count: any;
|
|
1209
1225
|
generated_image_file_evidence_checked: boolean;
|
|
@@ -47,6 +47,13 @@ export declare function run(_command: any, args?: any): Promise<void | {
|
|
|
47
47
|
main_command_ok: boolean;
|
|
48
48
|
lane_count_ok: boolean;
|
|
49
49
|
geometry_distinct: boolean | null;
|
|
50
|
+
pane_id_reconciliation: {
|
|
51
|
+
schema: string;
|
|
52
|
+
ok: boolean;
|
|
53
|
+
changed: boolean;
|
|
54
|
+
matched_count: number;
|
|
55
|
+
lane_count: number;
|
|
56
|
+
} | null;
|
|
50
57
|
panes: any[];
|
|
51
58
|
command: any[];
|
|
52
59
|
command_result: import("../core/zellij/zellij-command.js").ZellijCommandResult | null;
|
package/dist/commands/ppt.d.ts
CHANGED
|
@@ -559,6 +559,13 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
559
559
|
zellij_lane_manifest: string;
|
|
560
560
|
zellij_lane_persistence: {
|
|
561
561
|
supervisor: string;
|
|
562
|
+
runtime_manifest: string | null;
|
|
563
|
+
dispatch_mode: "jsonl_nonblocking";
|
|
564
|
+
fifo_policy: "disabled_to_avoid_writer_blocking";
|
|
565
|
+
resource_throttle_ms: any;
|
|
566
|
+
nice_level: number;
|
|
567
|
+
runtime_policy_ok: boolean;
|
|
568
|
+
pane_id_source_ok: boolean;
|
|
562
569
|
no_flicker_verified: boolean;
|
|
563
570
|
pane_survival_checked: boolean;
|
|
564
571
|
unexpected_close_count: number;
|
|
@@ -856,6 +863,13 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
856
863
|
zellij_lane_manifest_ok: boolean;
|
|
857
864
|
zellij_lane_supervisor: string;
|
|
858
865
|
lane_supervisor_integrated: boolean;
|
|
866
|
+
zellij_lane_runtime_manifest: string | null;
|
|
867
|
+
zellij_lane_runtime_policy_ok: boolean;
|
|
868
|
+
zellij_lane_dispatch_mode: "jsonl_nonblocking";
|
|
869
|
+
zellij_lane_fifo_policy: "disabled_to_avoid_writer_blocking";
|
|
870
|
+
zellij_lane_resource_throttle_ms: any;
|
|
871
|
+
zellij_lane_nice_level: number;
|
|
872
|
+
zellij_lane_pane_id_source_ok: boolean;
|
|
859
873
|
zellij_lane_no_flicker_verified: boolean;
|
|
860
874
|
zellij_lane_survival_checked: boolean;
|
|
861
875
|
zellij_lane_unexpected_close_count: number;
|