sneakoscope 1.12.0 → 1.14.0
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 +22 -3
- 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/bin/sks.js +1 -1
- package/dist/build-manifest.json +72 -1
- package/dist/cli/command-registry.d.ts +2 -0
- package/dist/cli/command-registry.js +1 -0
- package/dist/cli/feature-commands.js +74 -4
- package/dist/cli/hermes-command.d.ts +2 -0
- package/dist/cli/hermes-command.js +99 -0
- package/dist/cli/install-helpers.js +13 -3
- package/dist/commands/dfix.d.ts +122 -18
- package/dist/commands/hermes.d.ts +2 -0
- package/dist/commands/hermes.js +5 -0
- package/dist/commands/image-ux-review.d.ts +13 -41
- package/dist/core/codex-compat/codex-0-132.js +1 -1
- package/dist/core/codex-compat/codex-0-133.d.ts +56 -0
- package/dist/core/codex-compat/codex-0-133.js +155 -0
- package/dist/core/codex-compat/codex-compat-report.d.ts +53 -13
- package/dist/core/codex-compat/codex-compat-report.js +10 -3
- package/dist/core/codex-compat/codex-config-policy.d.ts +30 -0
- package/dist/core/codex-compat/codex-config-policy.js +185 -9
- package/dist/core/codex-compat/codex-hook-events.d.ts +7 -0
- package/dist/core/codex-compat/codex-hook-events.js +64 -0
- package/dist/core/codex-compat/codex-hook-output-builders.d.ts +10 -0
- package/dist/core/codex-compat/codex-hook-output-builders.js +18 -2
- package/dist/core/codex-compat/codex-hook-schema.js +3 -12
- package/dist/core/codex-compat/codex-hook-semantic-validator.d.ts +2 -0
- package/dist/core/codex-compat/codex-hook-semantic-validator.js +24 -7
- package/dist/core/codex-compat/codex-hook-warning-detector.d.ts +14 -2
- package/dist/core/codex-compat/codex-hook-warning-detector.js +12 -5
- package/dist/core/codex-compat/codex-schema-snapshot.d.ts +10 -5
- package/dist/core/codex-compat/codex-schema-snapshot.js +17 -41
- package/dist/core/codex-compat/codex-version-policy.d.ts +4 -4
- package/dist/core/codex-compat/codex-version-policy.js +4 -4
- package/dist/core/codex-hooks/codex-hook-actual-discovery.d.ts +67 -0
- package/dist/core/codex-hooks/codex-hook-actual-discovery.js +326 -0
- package/dist/core/codex-hooks/codex-hook-config-writer.d.ts +13 -0
- package/dist/core/codex-hooks/codex-hook-config-writer.js +56 -0
- package/dist/core/codex-hooks/codex-hook-hash.d.ts +15 -0
- package/dist/core/codex-hooks/codex-hook-hash.js +42 -0
- package/dist/core/codex-hooks/codex-hook-managed-install.d.ts +33 -0
- package/dist/core/codex-hooks/codex-hook-managed-install.js +102 -0
- package/dist/core/codex-hooks/codex-hook-official-parity.d.ts +148 -0
- package/dist/core/codex-hooks/codex-hook-official-parity.js +126 -0
- package/dist/core/codex-hooks/codex-hook-state-writer.d.ts +42 -0
- package/dist/core/codex-hooks/codex-hook-state-writer.js +93 -0
- package/dist/core/codex-hooks/codex-hook-trust-doctor.d.ts +83 -0
- package/dist/core/codex-hooks/codex-hook-trust-doctor.js +71 -0
- package/dist/core/codex-hooks/codex-hook-trust-state.d.ts +27 -0
- package/dist/core/codex-hooks/codex-hook-trust-state.js +89 -0
- package/dist/core/commands/dfix-command.d.ts +122 -18
- package/dist/core/commands/dfix-command.js +3 -1
- package/dist/core/commands/image-ux-review-command.d.ts +13 -41
- package/dist/core/commands/image-ux-review-command.js +18 -15
- package/dist/core/dfix/codex-handoff.d.ts +37 -0
- package/dist/core/dfix/codex-handoff.js +36 -0
- package/dist/core/dfix/dfix-cache.d.ts +20 -0
- package/dist/core/dfix/dfix-cache.js +63 -0
- package/dist/core/dfix/error-signature.d.ts +17 -0
- package/dist/core/dfix/error-signature.js +97 -0
- package/dist/core/dfix/patch-runner.d.ts +6 -0
- package/dist/core/dfix/patch-runner.js +101 -0
- package/dist/core/dfix/patch-templates.d.ts +34 -0
- package/dist/core/dfix/patch-templates.js +47 -0
- package/dist/core/dfix/path-decision.d.ts +25 -0
- package/dist/core/dfix/path-decision.js +47 -0
- package/dist/core/dfix/performance.d.ts +28 -0
- package/dist/core/dfix/performance.js +28 -0
- package/dist/core/dfix/root-cause-ranking.d.ts +55 -0
- package/dist/core/dfix/root-cause-ranking.js +57 -0
- package/dist/core/dfix/verification-runner.d.ts +2 -0
- package/dist/core/dfix/verification-runner.js +46 -0
- package/dist/core/dfix/verification-selector.d.ts +37 -0
- package/dist/core/dfix/verification-selector.js +72 -0
- package/dist/core/dfix.d.ts +133 -18
- package/dist/core/dfix.js +104 -55
- package/dist/core/feature-fixture-runner.d.ts +1 -0
- package/dist/core/feature-fixture-runner.js +42 -5
- package/dist/core/feature-fixtures.js +4 -2
- package/dist/core/feature-registry.js +3 -3
- package/dist/core/fsx.d.ts +1 -1
- package/dist/core/fsx.js +1 -1
- package/dist/core/goal-workflow.d.ts +1 -0
- package/dist/core/goal-workflow.js +1 -0
- package/dist/core/hermes.d.ts +23 -0
- package/dist/core/hermes.js +180 -0
- package/dist/core/hooks-runtime.js +17 -1
- package/dist/core/image-ux-review/imagegen-adapter.d.ts +2 -1
- package/dist/core/image-ux-review/imagegen-adapter.js +196 -1
- package/dist/core/image-ux-review/real-callout-extractor.d.ts +36 -0
- package/dist/core/image-ux-review/real-callout-extractor.js +52 -1
- package/dist/core/image-ux-review.d.ts +24 -44
- package/dist/core/image-ux-review.js +7 -4
- package/dist/core/imagegen/gpt-image-2-request-validator.d.ts +55 -0
- package/dist/core/imagegen/gpt-image-2-request-validator.js +53 -0
- package/dist/core/imagegen/imagegen-capability.d.ts +37 -0
- package/dist/core/imagegen/imagegen-capability.js +64 -0
- package/dist/core/init.js +14 -28
- package/dist/core/memory-summary.d.ts +1 -0
- package/dist/core/memory-summary.js +1 -0
- package/dist/core/ppt-review/index.js +1 -0
- package/dist/core/ppt-review/slide-imagegen-review.js +15 -5
- package/dist/core/ppt-review/slide-issue-extraction.d.ts +4 -4
- package/dist/core/ppt-review/slide-issue-extraction.js +27 -2
- package/dist/core/routes.d.ts +1 -1
- package/dist/core/routes.js +4 -3
- package/dist/core/structured-output-adapter.js +1 -1
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/dist/vendor/openai-codex/latest/hooks/permission-request.command.input.schema.json +61 -0
- package/dist/vendor/openai-codex/latest/hooks/permission-request.command.output.schema.json +105 -0
- package/dist/vendor/openai-codex/latest/hooks/post-compact.command.input.schema.json +52 -0
- package/dist/vendor/openai-codex/latest/hooks/post-compact.command.output.schema.json +24 -0
- package/dist/vendor/openai-codex/latest/hooks/post-tool-use.command.input.schema.json +67 -0
- package/dist/vendor/openai-codex/latest/hooks/post-tool-use.command.output.schema.json +86 -0
- package/dist/vendor/openai-codex/latest/hooks/pre-compact.command.input.schema.json +52 -0
- package/dist/vendor/openai-codex/latest/hooks/pre-compact.command.output.schema.json +24 -0
- package/dist/vendor/openai-codex/latest/hooks/pre-tool-use.command.input.schema.json +65 -0
- package/dist/vendor/openai-codex/latest/hooks/pre-tool-use.command.output.schema.json +107 -0
- package/dist/vendor/openai-codex/latest/hooks/session-start.command.input.schema.json +60 -0
- package/dist/vendor/openai-codex/latest/hooks/session-start.command.output.schema.json +65 -0
- package/dist/vendor/openai-codex/latest/hooks/snapshot-metadata.json +27 -0
- package/dist/vendor/openai-codex/latest/hooks/stop.command.input.schema.json +63 -0
- package/dist/vendor/openai-codex/latest/hooks/stop.command.output.schema.json +45 -0
- package/dist/vendor/openai-codex/latest/hooks/subagent-start.command.input.schema.json +63 -0
- package/dist/vendor/openai-codex/latest/hooks/subagent-start.command.output.schema.json +65 -0
- package/dist/vendor/openai-codex/latest/hooks/subagent-stop.command.input.schema.json +75 -0
- package/dist/vendor/openai-codex/latest/hooks/subagent-stop.command.output.schema.json +45 -0
- package/dist/vendor/openai-codex/latest/hooks/user-prompt-submit.command.input.schema.json +59 -0
- package/dist/vendor/openai-codex/latest/hooks/user-prompt-submit.command.output.schema.json +83 -0
- package/package.json +25 -3
- package/schemas/codex/image-ux-issue-ledger.schema.json +20 -2
- package/schemas/codex/ppt-slide-extraction-report.schema.json +7 -2
- package/schemas/codex/ppt-slide-issue-ledger.schema.json +12 -3
package/README.md
CHANGED
|
@@ -10,13 +10,15 @@ SKS does not try to clone every other harness. It focuses on one thing: making C
|
|
|
10
10
|
|
|
11
11
|
## Current Release
|
|
12
12
|
|
|
13
|
-
SKS **1.
|
|
13
|
+
SKS **1.14.0** focuses on Codex hook trust parity and real imagegen route hardening: hooks now prefer managed installs when official hashes are unavailable, `trust-doctor --actual` reports real config state, and UX/PPT image routes validate gpt-image-2 requests before generation while fake blackbox checks stay explicitly mock-like.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
sks features complete --json
|
|
17
17
|
sks ux-review run --image <path> --generate-callouts --json
|
|
18
18
|
sks ppt fixture --mock --json
|
|
19
19
|
sks dfix fixture --json
|
|
20
|
+
sks hooks trust-doctor --actual --json
|
|
21
|
+
sks hooks install --managed --json
|
|
20
22
|
```
|
|
21
23
|
|
|
22
24
|
Detailed release history lives in [CHANGELOG.md](CHANGELOG.md). Current release gate status lives in [docs/release-readiness.md](docs/release-readiness.md).
|
|
@@ -114,7 +116,7 @@ sks selftest --mock
|
|
|
114
116
|
|
|
115
117
|
## What Sneakoscope Adds
|
|
116
118
|
|
|
117
|
-
`sks` adds a tmux Codex CLI runtime, Codex App `$` commands, Team/QA/PPT/Research/DB/GX/Wiki routes, OpenClaw skill generation, Context7-gated current docs, TriWiki context packs, DB safety, design SSOT policy, skill dreaming, release checks, and Honest Mode.
|
|
119
|
+
`sks` adds a tmux Codex CLI runtime, Codex App `$` commands, Team/QA/PPT/Research/DB/GX/Wiki routes, OpenClaw and Hermes skill generation, Context7-gated current docs, TriWiki context packs, DB safety, design SSOT policy, skill dreaming, release checks, and Honest Mode.
|
|
118
120
|
|
|
119
121
|
## Report-Only Planning Surfaces
|
|
120
122
|
|
|
@@ -408,7 +410,7 @@ SKS does not install Git pre-commit hooks. Release metadata is changed only by e
|
|
|
408
410
|
|
|
409
411
|
TriWiki is intentionally sparse: `sks wiki sweep` records demote, soft-forget, archive, delete, promote-to-skill, and promote-to-rule candidates instead of injecting every old claim into future prompts. `sks harness fixture` validates the broader Harness Growth Factory contract: deliberate forgetting fixtures, skill card metadata, experiment schema, tool-error taxonomy, permission profiles, MultiAgentV2 defaults, and tmux cockpit view coverage. `sks code-structure scan` flags handwritten files above 1000/2000/3000-line thresholds so new logic can be extracted before command files become harder to maintain.
|
|
410
412
|
|
|
411
|
-
## OpenClaw Agent Usage
|
|
413
|
+
## OpenClaw And Hermes Agent Usage
|
|
412
414
|
|
|
413
415
|
Sneakoscope can generate an OpenClaw skill package for agents that need to operate SKS-enabled repositories.
|
|
414
416
|
|
|
@@ -429,6 +431,23 @@ SKS_OPENCLAW=1 sks proof-field scan --intent "small CLI change" --changed src/cl
|
|
|
429
431
|
|
|
430
432
|
If OpenClaw runs in a sandbox, grant shell execution only for trusted workspaces. Database, migration, and destructive work still follows SKS safety routes.
|
|
431
433
|
|
|
434
|
+
Sneakoscope can also generate a Hermes Agent skill package for the Hermes `/skills` surface.
|
|
435
|
+
|
|
436
|
+
```sh
|
|
437
|
+
sks hermes install
|
|
438
|
+
sks hermes status --json
|
|
439
|
+
sks hermes path
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
By default this writes `~/.hermes/skills/sneakoscope-codex/` with `SKILL.md`, a README, `hermes-config.example.yaml`, and `skill-bundle.example.yaml`. Set `HERMES_HOME` or pass `--dir` for a custom location. Hermes agents should invoke `/sneakoscope-codex` with the terminal toolset enabled and run shell commands with `SKS_HERMES=1`; this enables non-interactive dependency/update prompts while leaving SKS DB, migration, and destructive-operation safety routes intact. If you use Hermes `skills.external_dirs`, remember writable external directories can be updated by Hermes, so protect shared skill folders with filesystem permissions when needed.
|
|
443
|
+
|
|
444
|
+
```sh
|
|
445
|
+
SKS_HERMES=1 sks root --json
|
|
446
|
+
SKS_HERMES=1 sks commands --json
|
|
447
|
+
SKS_HERMES=1 sks dollar-commands --json
|
|
448
|
+
SKS_HERMES=1 sks status --json
|
|
449
|
+
```
|
|
450
|
+
|
|
432
451
|
## Prompt `$` Commands
|
|
433
452
|
|
|
434
453
|
Use these inside Codex App or another agent prompt. They are prompt commands, not terminal commands.
|
|
@@ -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.
|
|
7
|
+
Some("--version") => println!("sks-rs 1.14.0"),
|
|
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
package/dist/build-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "sks.dist-build.v2",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"typescript": true,
|
|
5
5
|
"mjs_runtime_files": 0,
|
|
6
6
|
"files": [
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
"cli/feature-commands.js",
|
|
19
19
|
"cli/help-fast.d.ts",
|
|
20
20
|
"cli/help-fast.js",
|
|
21
|
+
"cli/hermes-command.d.ts",
|
|
22
|
+
"cli/hermes-command.js",
|
|
21
23
|
"cli/install-helpers.d.ts",
|
|
22
24
|
"cli/install-helpers.js",
|
|
23
25
|
"cli/main.d.ts",
|
|
@@ -92,6 +94,8 @@
|
|
|
92
94
|
"commands/harness.js",
|
|
93
95
|
"commands/help.d.ts",
|
|
94
96
|
"commands/help.js",
|
|
97
|
+
"commands/hermes.d.ts",
|
|
98
|
+
"commands/hermes.js",
|
|
95
99
|
"commands/hook.d.ts",
|
|
96
100
|
"commands/hook.js",
|
|
97
101
|
"commands/hooks.d.ts",
|
|
@@ -186,10 +190,14 @@
|
|
|
186
190
|
"core/codex-app.js",
|
|
187
191
|
"core/codex-compat/codex-0-132.d.ts",
|
|
188
192
|
"core/codex-compat/codex-0-132.js",
|
|
193
|
+
"core/codex-compat/codex-0-133.d.ts",
|
|
194
|
+
"core/codex-compat/codex-0-133.js",
|
|
189
195
|
"core/codex-compat/codex-compat-report.d.ts",
|
|
190
196
|
"core/codex-compat/codex-compat-report.js",
|
|
191
197
|
"core/codex-compat/codex-config-policy.d.ts",
|
|
192
198
|
"core/codex-compat/codex-config-policy.js",
|
|
199
|
+
"core/codex-compat/codex-hook-events.d.ts",
|
|
200
|
+
"core/codex-compat/codex-hook-events.js",
|
|
193
201
|
"core/codex-compat/codex-hook-issues.d.ts",
|
|
194
202
|
"core/codex-compat/codex-hook-issues.js",
|
|
195
203
|
"core/codex-compat/codex-hook-output-builders.d.ts",
|
|
@@ -210,6 +218,22 @@
|
|
|
210
218
|
"core/codex-compat/codex-version.js",
|
|
211
219
|
"core/codex-exec-output-schema.d.ts",
|
|
212
220
|
"core/codex-exec-output-schema.js",
|
|
221
|
+
"core/codex-hooks/codex-hook-actual-discovery.d.ts",
|
|
222
|
+
"core/codex-hooks/codex-hook-actual-discovery.js",
|
|
223
|
+
"core/codex-hooks/codex-hook-config-writer.d.ts",
|
|
224
|
+
"core/codex-hooks/codex-hook-config-writer.js",
|
|
225
|
+
"core/codex-hooks/codex-hook-hash.d.ts",
|
|
226
|
+
"core/codex-hooks/codex-hook-hash.js",
|
|
227
|
+
"core/codex-hooks/codex-hook-managed-install.d.ts",
|
|
228
|
+
"core/codex-hooks/codex-hook-managed-install.js",
|
|
229
|
+
"core/codex-hooks/codex-hook-official-parity.d.ts",
|
|
230
|
+
"core/codex-hooks/codex-hook-official-parity.js",
|
|
231
|
+
"core/codex-hooks/codex-hook-state-writer.d.ts",
|
|
232
|
+
"core/codex-hooks/codex-hook-state-writer.js",
|
|
233
|
+
"core/codex-hooks/codex-hook-trust-doctor.d.ts",
|
|
234
|
+
"core/codex-hooks/codex-hook-trust-doctor.js",
|
|
235
|
+
"core/codex-hooks/codex-hook-trust-state.d.ts",
|
|
236
|
+
"core/codex-hooks/codex-hook-trust-state.js",
|
|
213
237
|
"core/codex-lb-circuit.d.ts",
|
|
214
238
|
"core/codex-lb-circuit.js",
|
|
215
239
|
"core/codex-lb/codex-lb-env.d.ts",
|
|
@@ -306,6 +330,26 @@
|
|
|
306
330
|
"core/decision-lattice.js",
|
|
307
331
|
"core/dfix.d.ts",
|
|
308
332
|
"core/dfix.js",
|
|
333
|
+
"core/dfix/codex-handoff.d.ts",
|
|
334
|
+
"core/dfix/codex-handoff.js",
|
|
335
|
+
"core/dfix/dfix-cache.d.ts",
|
|
336
|
+
"core/dfix/dfix-cache.js",
|
|
337
|
+
"core/dfix/error-signature.d.ts",
|
|
338
|
+
"core/dfix/error-signature.js",
|
|
339
|
+
"core/dfix/patch-runner.d.ts",
|
|
340
|
+
"core/dfix/patch-runner.js",
|
|
341
|
+
"core/dfix/patch-templates.d.ts",
|
|
342
|
+
"core/dfix/patch-templates.js",
|
|
343
|
+
"core/dfix/path-decision.d.ts",
|
|
344
|
+
"core/dfix/path-decision.js",
|
|
345
|
+
"core/dfix/performance.d.ts",
|
|
346
|
+
"core/dfix/performance.js",
|
|
347
|
+
"core/dfix/root-cause-ranking.d.ts",
|
|
348
|
+
"core/dfix/root-cause-ranking.js",
|
|
349
|
+
"core/dfix/verification-runner.d.ts",
|
|
350
|
+
"core/dfix/verification-runner.js",
|
|
351
|
+
"core/dfix/verification-selector.d.ts",
|
|
352
|
+
"core/dfix/verification-selector.js",
|
|
309
353
|
"core/dogfood-loop.d.ts",
|
|
310
354
|
"core/dogfood-loop.js",
|
|
311
355
|
"core/effort-orchestrator.d.ts",
|
|
@@ -374,6 +418,8 @@
|
|
|
374
418
|
"core/harness-conflicts.js",
|
|
375
419
|
"core/harness-guard.d.ts",
|
|
376
420
|
"core/harness-guard.js",
|
|
421
|
+
"core/hermes.d.ts",
|
|
422
|
+
"core/hermes.js",
|
|
377
423
|
"core/hooks-runtime.d.ts",
|
|
378
424
|
"core/hooks-runtime.js",
|
|
379
425
|
"core/hproof.d.ts",
|
|
@@ -394,6 +440,10 @@
|
|
|
394
440
|
"core/image-ux-review/real-callout-extractor.js",
|
|
395
441
|
"core/image-ux-review/recapture.d.ts",
|
|
396
442
|
"core/image-ux-review/recapture.js",
|
|
443
|
+
"core/imagegen/gpt-image-2-request-validator.d.ts",
|
|
444
|
+
"core/imagegen/gpt-image-2-request-validator.js",
|
|
445
|
+
"core/imagegen/imagegen-capability.d.ts",
|
|
446
|
+
"core/imagegen/imagegen-capability.js",
|
|
397
447
|
"core/init.d.ts",
|
|
398
448
|
"core/init.js",
|
|
399
449
|
"core/json-schema-validator.d.ts",
|
|
@@ -701,6 +751,27 @@
|
|
|
701
751
|
"core/wiki-image/visual-anchor.js",
|
|
702
752
|
"core/work-order-ledger.d.ts",
|
|
703
753
|
"core/work-order-ledger.js",
|
|
754
|
+
"vendor/openai-codex/latest/hooks/permission-request.command.input.schema.json",
|
|
755
|
+
"vendor/openai-codex/latest/hooks/permission-request.command.output.schema.json",
|
|
756
|
+
"vendor/openai-codex/latest/hooks/post-compact.command.input.schema.json",
|
|
757
|
+
"vendor/openai-codex/latest/hooks/post-compact.command.output.schema.json",
|
|
758
|
+
"vendor/openai-codex/latest/hooks/post-tool-use.command.input.schema.json",
|
|
759
|
+
"vendor/openai-codex/latest/hooks/post-tool-use.command.output.schema.json",
|
|
760
|
+
"vendor/openai-codex/latest/hooks/pre-compact.command.input.schema.json",
|
|
761
|
+
"vendor/openai-codex/latest/hooks/pre-compact.command.output.schema.json",
|
|
762
|
+
"vendor/openai-codex/latest/hooks/pre-tool-use.command.input.schema.json",
|
|
763
|
+
"vendor/openai-codex/latest/hooks/pre-tool-use.command.output.schema.json",
|
|
764
|
+
"vendor/openai-codex/latest/hooks/session-start.command.input.schema.json",
|
|
765
|
+
"vendor/openai-codex/latest/hooks/session-start.command.output.schema.json",
|
|
766
|
+
"vendor/openai-codex/latest/hooks/snapshot-metadata.json",
|
|
767
|
+
"vendor/openai-codex/latest/hooks/stop.command.input.schema.json",
|
|
768
|
+
"vendor/openai-codex/latest/hooks/stop.command.output.schema.json",
|
|
769
|
+
"vendor/openai-codex/latest/hooks/subagent-start.command.input.schema.json",
|
|
770
|
+
"vendor/openai-codex/latest/hooks/subagent-start.command.output.schema.json",
|
|
771
|
+
"vendor/openai-codex/latest/hooks/subagent-stop.command.input.schema.json",
|
|
772
|
+
"vendor/openai-codex/latest/hooks/subagent-stop.command.output.schema.json",
|
|
773
|
+
"vendor/openai-codex/latest/hooks/user-prompt-submit.command.input.schema.json",
|
|
774
|
+
"vendor/openai-codex/latest/hooks/user-prompt-submit.command.output.schema.json",
|
|
704
775
|
"vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.input.schema.json",
|
|
705
776
|
"vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.output.schema.json",
|
|
706
777
|
"vendor/openai-codex/rust-v0.131.0/hooks/post-compact.command.input.schema.json",
|
|
@@ -47,6 +47,7 @@ export declare const COMMANDS: {
|
|
|
47
47
|
auth: CommandEntry;
|
|
48
48
|
hooks: CommandEntry;
|
|
49
49
|
openclaw: CommandEntry;
|
|
50
|
+
hermes: CommandEntry;
|
|
50
51
|
tmux: CommandEntry;
|
|
51
52
|
mad: CommandEntry;
|
|
52
53
|
'mad-sks': CommandEntry;
|
|
@@ -132,6 +133,7 @@ export declare const TYPED_COMMANDS: {
|
|
|
132
133
|
auth: CommandEntry;
|
|
133
134
|
hooks: CommandEntry;
|
|
134
135
|
openclaw: CommandEntry;
|
|
136
|
+
hermes: CommandEntry;
|
|
135
137
|
tmux: CommandEntry;
|
|
136
138
|
mad: CommandEntry;
|
|
137
139
|
'mad-sks': CommandEntry;
|
|
@@ -100,6 +100,7 @@ export const COMMANDS = {
|
|
|
100
100
|
auth: entry('beta', 'Alias for codex-lb auth commands', 'dist/commands/codex-lb.js', directCommand(() => import('../commands/codex-lb.js'), 'dist/commands/codex-lb.js')),
|
|
101
101
|
hooks: entry('beta', 'Explain and inspect Codex hooks', 'dist/commands/hooks.js', directCommand(() => import('../commands/hooks.js'), 'dist/commands/hooks.js')),
|
|
102
102
|
openclaw: entry('labs', 'Create OpenClaw skill package', 'dist/commands/openclaw.js', directCommand(() => import('../commands/openclaw.js'), 'dist/commands/openclaw.js')),
|
|
103
|
+
hermes: entry('labs', 'Create Hermes Agent skill package', 'dist/commands/hermes.js', directCommand(() => import('../commands/hermes.js'), 'dist/commands/hermes.js')),
|
|
103
104
|
tmux: entry('beta', 'Open/check SKS tmux UI', 'dist/commands/tmux.js', directCommand(() => import('../commands/tmux.js'), 'dist/commands/tmux.js')),
|
|
104
105
|
mad: entry('beta', 'MAD-SKS tmux permission launcher', 'dist/commands/mad-sks.js', directCommand(() => import('../commands/mad-sks.js'), 'dist/commands/mad-sks.js')),
|
|
105
106
|
'mad-sks': entry('beta', 'MAD-SKS scoped permission modifier', 'dist/commands/mad-sks.js', directCommand(() => import('../commands/mad-sks.js'), 'dist/commands/mad-sks.js')),
|
|
@@ -10,6 +10,10 @@ import { recordHookPolicyMismatchWrongness } from '../core/triwiki-wrongness/wro
|
|
|
10
10
|
import { codexSchemaSnapshotReport } from '../core/codex-compat/codex-schema-snapshot.js';
|
|
11
11
|
import { validateCodexFixtureOutputs } from '../core/codex-compat/codex-hook-schema.js';
|
|
12
12
|
import { codexHookWarningCheck } from '../core/codex-compat/codex-hook-warning-detector.js';
|
|
13
|
+
import { codexHookTrustDoctor } from '../core/codex-hooks/codex-hook-trust-doctor.js';
|
|
14
|
+
import { writeTrustedHashStateForHooksFile } from '../core/codex-hooks/codex-hook-state-writer.js';
|
|
15
|
+
import { installManagedCodexHooks } from '../core/codex-hooks/codex-hook-managed-install.js';
|
|
16
|
+
import { writeCodexHookOfficialParityReport } from '../core/codex-hooks/codex-hook-official-parity.js';
|
|
13
17
|
const flag = (args, name) => args.includes(name);
|
|
14
18
|
export async function featuresCommand(sub = 'list', args = []) {
|
|
15
19
|
const action = sub || 'list';
|
|
@@ -119,6 +123,54 @@ export async function hooksCommand(sub = 'explain', args = []) {
|
|
|
119
123
|
console.log(`- ${event.event}: ${event.command}`);
|
|
120
124
|
return;
|
|
121
125
|
}
|
|
126
|
+
if (action === 'doctor' || action === 'trust-doctor') {
|
|
127
|
+
const report = await codexHookTrustDoctor(root, { fix: flag(args, '--fix'), managed: flag(args, '--managed'), actual: flag(args, '--actual') });
|
|
128
|
+
if (flag(args, '--json'))
|
|
129
|
+
return console.log(JSON.stringify(report, null, 2));
|
|
130
|
+
console.log(`Hooks trust doctor: ${report.ok ? 'ok' : 'blocked'}`);
|
|
131
|
+
for (const warning of report.warnings)
|
|
132
|
+
console.log(`- ${warning}`);
|
|
133
|
+
if (!report.ok)
|
|
134
|
+
process.exitCode = 1;
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (action === 'trust-state') {
|
|
138
|
+
const report = await codexHookTrustDoctor(root, { managed: flag(args, '--managed'), actual: flag(args, '--actual') });
|
|
139
|
+
const anyReport = report;
|
|
140
|
+
if (flag(args, '--json'))
|
|
141
|
+
return console.log(JSON.stringify({ schema: flag(args, '--actual') ? 'sks.codex-hook-trust-state-command.v2' : 'sks.codex-hook-trust-state-command.v1', ok: report.ok, actual: flag(args, '--actual'), entries: report.entries, trust: report.trust, sources: anyReport.sources || [], managed_dirs: anyReport.managed_dirs || [], blockers: anyReport.blockers || [] }, null, 2));
|
|
142
|
+
console.log(`Hook trust entries: ${report.entries.length}`);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
if (action === 'trust-fix') {
|
|
146
|
+
const report = await codexHookTrustDoctor(root, { fix: true, managed: flag(args, '--managed') });
|
|
147
|
+
if (flag(args, '--json'))
|
|
148
|
+
return console.log(JSON.stringify(report, null, 2));
|
|
149
|
+
console.log(`Hooks trust fix: ${report.ok ? 'ok' : 'blocked'}`);
|
|
150
|
+
if (!report.ok)
|
|
151
|
+
process.exitCode = 1;
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (action === 'install') {
|
|
155
|
+
const report = flag(args, '--managed')
|
|
156
|
+
? await installManagedCodexHooks(root)
|
|
157
|
+
: await writeTrustedHashStateForHooksFile(root, undefined, undefined, { allowSksHashFallback: flag(args, '--trusted'), reason: 'Use --managed unless you intentionally accept SKS-only trusted_hash fallback with --trusted.' });
|
|
158
|
+
if (flag(args, '--json'))
|
|
159
|
+
return console.log(JSON.stringify({ ...report, schema: flag(args, '--managed') ? 'sks.codex-hooks-managed-install.v1' : 'sks.codex-hook-install-command.v2', mode: flag(args, '--managed') ? 'managed' : flag(args, '--project') ? 'project' : 'trust-state-only', trusted: flag(args, '--trusted') }, null, 2));
|
|
160
|
+
console.log(flag(args, '--managed') ? `Hooks managed install: ${report.ok ? 'ok' : 'blocked'}` : `Hooks install trust state: ${report.ok ? 'ok' : 'blocked'}`);
|
|
161
|
+
if (!report.ok)
|
|
162
|
+
process.exitCode = 1;
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
if (action === 'actual-parity' || action === 'official-parity') {
|
|
166
|
+
const report = await writeCodexHookOfficialParityReport(root);
|
|
167
|
+
if (flag(args, '--json'))
|
|
168
|
+
return console.log(JSON.stringify(report, null, 2));
|
|
169
|
+
console.log(`Hooks official parity: ${report.ok ? 'ok' : 'blocked'} (${report.path})`);
|
|
170
|
+
if (!report.ok)
|
|
171
|
+
process.exitCode = 1;
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
122
174
|
if (action === 'replay') {
|
|
123
175
|
const fixture = args.find((arg) => !String(arg).startsWith('--'));
|
|
124
176
|
const report = await hooksReplayReport(root, fixture);
|
|
@@ -168,7 +220,7 @@ export async function hooksCommand(sub = 'explain', args = []) {
|
|
|
168
220
|
return;
|
|
169
221
|
}
|
|
170
222
|
if (action !== 'explain') {
|
|
171
|
-
console.error('Usage: sks hooks explain|status|trust-report|replay <fixture.json>|codex-schema|codex-validate|warning-check|replay-codex-fixtures [--json]');
|
|
223
|
+
console.error('Usage: sks hooks explain|status|doctor|trust-report|trust-state|trust-doctor|trust-fix|install|actual-parity|official-parity|replay <fixture.json>|codex-schema|codex-validate|warning-check|replay-codex-fixtures [--json]');
|
|
172
224
|
process.exitCode = 1;
|
|
173
225
|
return;
|
|
174
226
|
}
|
|
@@ -205,17 +257,25 @@ async function hooksStatusReport(root) {
|
|
|
205
257
|
}
|
|
206
258
|
async function hooksTrustReport(root) {
|
|
207
259
|
const status = await hooksStatusReport(root);
|
|
260
|
+
const trust = await codexHookTrustDoctor(root).catch(() => null);
|
|
208
261
|
return redactSecrets({
|
|
209
262
|
schema: 'sks.hooks-trust-report.v1',
|
|
210
263
|
hooks_files: status.hooks_files.map((file) => file.path),
|
|
211
264
|
events: [
|
|
265
|
+
{ event: 'SessionStart', command: 'sks hook session-start', writes: ['.sneakoscope/state'], network: false, secret_policy: 'redacted', risk: 'low' },
|
|
212
266
|
{ event: 'PreToolUse', command: 'sks hook pre-tool', writes: ['.sneakoscope/bus/tool-events.jsonl'], network: false, secret_policy: 'redacted', risk: 'medium' },
|
|
213
267
|
{ event: 'PermissionRequest', command: 'sks hook permission-request', writes: ['.sneakoscope/state'], network: false, secret_policy: 'redacted', risk: 'medium' },
|
|
268
|
+
{ event: 'PostToolUse', command: 'sks hook post-tool', writes: ['.sneakoscope/missions'], network: false, secret_policy: 'redacted', risk: 'medium' },
|
|
269
|
+
{ event: 'PreCompact', command: 'sks hook pre-compact', writes: ['.sneakoscope/state'], network: false, secret_policy: 'redacted', risk: 'low' },
|
|
270
|
+
{ event: 'PostCompact', command: 'sks hook post-compact', writes: ['.sneakoscope/state'], network: false, secret_policy: 'redacted', risk: 'low' },
|
|
214
271
|
{ event: 'UserPromptSubmit', command: 'sks hook user-prompt-submit', writes: ['.sneakoscope/missions'], network: false, secret_policy: 'redacted', risk: 'medium' },
|
|
272
|
+
{ event: 'SubagentStart', command: 'sks hook subagent-start', writes: ['.sneakoscope/missions'], network: false, secret_policy: 'redacted', risk: 'low' },
|
|
273
|
+
{ event: 'SubagentStop', command: 'sks hook subagent-stop', writes: ['.sneakoscope/missions'], network: false, secret_policy: 'redacted', risk: 'low' },
|
|
215
274
|
{ event: 'Stop', command: 'sks hook stop', writes: ['.sneakoscope/missions', '.sneakoscope/proof'], network: false, secret_policy: 'redacted', risk: 'high' }
|
|
216
275
|
],
|
|
217
|
-
|
|
218
|
-
|
|
276
|
+
trust,
|
|
277
|
+
ok: status.ok && (trust?.ok ?? true),
|
|
278
|
+
warnings: [...(status.ok ? [] : ['no hooks.json file found in project or user config']), ...(trust?.warnings || [])]
|
|
219
279
|
});
|
|
220
280
|
}
|
|
221
281
|
async function hooksReplayReport(root, fixturePath) {
|
|
@@ -315,6 +375,16 @@ function normalizeReplayHookName(event = '') {
|
|
|
315
375
|
return 'user-prompt-submit';
|
|
316
376
|
if (normalized.includes('posttool') || normalized.includes('post-tool'))
|
|
317
377
|
return 'post-tool';
|
|
378
|
+
if (normalized.includes('sessionstart') || normalized.includes('session-start'))
|
|
379
|
+
return 'session-start';
|
|
380
|
+
if (normalized.includes('subagentstart') || normalized.includes('subagent-start'))
|
|
381
|
+
return 'subagent-start';
|
|
382
|
+
if (normalized.includes('subagentstop') || normalized.includes('subagent-stop'))
|
|
383
|
+
return 'subagent-stop';
|
|
384
|
+
if (normalized.includes('precompact') || normalized.includes('pre-compact'))
|
|
385
|
+
return 'pre-compact';
|
|
386
|
+
if (normalized.includes('postcompact') || normalized.includes('post-compact'))
|
|
387
|
+
return 'post-compact';
|
|
318
388
|
if (normalized.includes('stop'))
|
|
319
389
|
return 'stop';
|
|
320
390
|
return normalized || 'pre-tool';
|
|
@@ -332,7 +402,7 @@ export function hooksExplainReport() {
|
|
|
332
402
|
feature_key: 'features.hooks',
|
|
333
403
|
deprecated_feature_alias: 'features.codex_hooks',
|
|
334
404
|
config_paths: ['~/.codex/hooks.json', '~/.codex/config.toml', '<repo>/.codex/hooks.json', '<repo>/.codex/config.toml'],
|
|
335
|
-
events: ['
|
|
405
|
+
events: ['PreToolUse', 'PermissionRequest', 'PostToolUse', 'PreCompact', 'PostCompact', 'SessionStart', 'UserPromptSubmit', 'SubagentStart', 'SubagentStop', 'Stop'],
|
|
336
406
|
handlers: {
|
|
337
407
|
supported: ['command'],
|
|
338
408
|
parsed_but_skipped: ['prompt', 'agent'],
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { HERMES_SKILL_NAME, buildHermesSkillFiles, defaultHermesSkillDir, installHermesSkill } from '../core/hermes.js';
|
|
3
|
+
import { exists } from '../core/fsx.js';
|
|
4
|
+
const flag = (args, name) => args.includes(name);
|
|
5
|
+
function readFlagValue(args, name, fallback) {
|
|
6
|
+
const i = args.indexOf(name);
|
|
7
|
+
return i >= 0 && args[i + 1] ? args[i + 1] : fallback;
|
|
8
|
+
}
|
|
9
|
+
function positionalArgs(args = []) {
|
|
10
|
+
const out = [];
|
|
11
|
+
const valueFlags = new Set(['--dir']);
|
|
12
|
+
for (let i = 0; i < args.length; i++) {
|
|
13
|
+
const arg = String(args[i]);
|
|
14
|
+
if (valueFlags.has(arg)) {
|
|
15
|
+
i++;
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
if (!arg.startsWith('--'))
|
|
19
|
+
out.push(arg);
|
|
20
|
+
}
|
|
21
|
+
return out;
|
|
22
|
+
}
|
|
23
|
+
export async function hermesCommand(args = []) {
|
|
24
|
+
const action = args[0] || 'help';
|
|
25
|
+
const targetDir = readFlagValue(args, '--dir', defaultHermesSkillDir());
|
|
26
|
+
const resultOptions = {
|
|
27
|
+
targetDir,
|
|
28
|
+
force: flag(args, '--force'),
|
|
29
|
+
dryRun: flag(args, '--dry-run')
|
|
30
|
+
};
|
|
31
|
+
if (action === 'path') {
|
|
32
|
+
const result = { skill: HERMES_SKILL_NAME, target_dir: path.resolve(targetDir) };
|
|
33
|
+
if (flag(args, '--json'))
|
|
34
|
+
return console.log(JSON.stringify(result, null, 2));
|
|
35
|
+
console.log(result.target_dir);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (action === 'status') {
|
|
39
|
+
const files = buildHermesSkillFiles();
|
|
40
|
+
const target = path.resolve(targetDir);
|
|
41
|
+
const installed = await exists(path.join(target, 'SKILL.md'));
|
|
42
|
+
const result = {
|
|
43
|
+
schema: 'sks.hermes-skill-status.v1',
|
|
44
|
+
ok: true,
|
|
45
|
+
skill: HERMES_SKILL_NAME,
|
|
46
|
+
target_dir: target,
|
|
47
|
+
installed,
|
|
48
|
+
expected_files: Object.keys(files),
|
|
49
|
+
env_mode: 'SKS_HERMES=1',
|
|
50
|
+
slash_command: `/${HERMES_SKILL_NAME}`
|
|
51
|
+
};
|
|
52
|
+
if (flag(args, '--json'))
|
|
53
|
+
return console.log(JSON.stringify(result, null, 2));
|
|
54
|
+
console.log(`Hermes skill: ${installed ? 'installed' : 'not installed'} ${target}`);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (action === 'print') {
|
|
58
|
+
const files = buildHermesSkillFiles();
|
|
59
|
+
const file = (positionalArgs(args.slice(1))[0] || 'SKILL.md');
|
|
60
|
+
if (!files[file]) {
|
|
61
|
+
console.error(`Unknown Hermes skill file: ${file}`);
|
|
62
|
+
console.error(`Files: ${Object.keys(files).join(', ')}`);
|
|
63
|
+
process.exitCode = 1;
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
console.log(files[file]);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (action === 'install') {
|
|
70
|
+
const result = await installHermesSkill(resultOptions);
|
|
71
|
+
if (flag(args, '--json'))
|
|
72
|
+
return console.log(JSON.stringify(result, null, 2));
|
|
73
|
+
if (!result.ok) {
|
|
74
|
+
console.error(`Hermes skill install blocked: ${result.reason}`);
|
|
75
|
+
console.error(`Target: ${result.target_dir}`);
|
|
76
|
+
process.exitCode = 1;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
console.log(`Hermes skill ${result.status}: ${result.target_dir}`);
|
|
80
|
+
console.log(`Use it in Hermes as /${HERMES_SKILL_NAME} and run SKS shell commands with SKS_HERMES=1.`);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
console.log(`Hermes
|
|
84
|
+
|
|
85
|
+
Usage:
|
|
86
|
+
sks hermes install [--dir path] [--force] [--dry-run] [--json]
|
|
87
|
+
sks hermes status [--dir path] [--json]
|
|
88
|
+
sks hermes path [--dir path] [--json]
|
|
89
|
+
sks hermes print [SKILL.md|README.md|hermes-config.example.yaml|skill-bundle.example.yaml]
|
|
90
|
+
|
|
91
|
+
Default skill: ${HERMES_SKILL_NAME}
|
|
92
|
+
Default path: ${defaultHermesSkillDir()}
|
|
93
|
+
|
|
94
|
+
After install, open Hermes and invoke:
|
|
95
|
+
|
|
96
|
+
/${HERMES_SKILL_NAME} Use SKS in this repository.
|
|
97
|
+
`);
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=hermes-command.js.map
|
|
@@ -2063,7 +2063,7 @@ export async function maybePromptCodexUpdateForLaunch(args = [], opts = {}) {
|
|
|
2063
2063
|
return installCodexLatest(command, latest.version, current);
|
|
2064
2064
|
}
|
|
2065
2065
|
export function shouldAutoApproveInstall(args = [], env = process.env) {
|
|
2066
|
-
return hasFlag(args, '--yes') || hasFlag(args, '-y') ||
|
|
2066
|
+
return hasFlag(args, '--yes') || hasFlag(args, '-y') || isAgentRuntime(env);
|
|
2067
2067
|
}
|
|
2068
2068
|
function canAskYesNo() {
|
|
2069
2069
|
return Boolean(input.isTTY && output.isTTY && process.env.CI !== 'true');
|
|
@@ -2071,8 +2071,18 @@ function canAskYesNo() {
|
|
|
2071
2071
|
function hasFlag(args = [], name) {
|
|
2072
2072
|
return args.includes(name);
|
|
2073
2073
|
}
|
|
2074
|
-
function
|
|
2075
|
-
return [
|
|
2074
|
+
function isAgentRuntime(env = process.env) {
|
|
2075
|
+
return [
|
|
2076
|
+
'SKS_OPENCLAW',
|
|
2077
|
+
'OPENCLAW',
|
|
2078
|
+
'OPENCLAW_AGENT',
|
|
2079
|
+
'OPENCLAW_RUN_ID',
|
|
2080
|
+
'OPENCLAW_SESSION_ID',
|
|
2081
|
+
'SKS_HERMES',
|
|
2082
|
+
'HERMES_AGENT',
|
|
2083
|
+
'HERMES_RUN_ID',
|
|
2084
|
+
'HERMES_SESSION_ID'
|
|
2085
|
+
]
|
|
2076
2086
|
.some((key) => /^(1|true|yes|y)$/i.test(String(env[key] || '').trim()));
|
|
2077
2087
|
}
|
|
2078
2088
|
async function installCodexLatest(command, latestVersion, previousVersion = null) {
|