@testmuai/rook-skill 0.1.7 → 0.1.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testmuai/rook-skill",
3
- "version": "0.1.7",
3
+ "version": "0.1.13",
4
4
  "description": "Install the Rook agent-testing skill for Claude Code, Codex and Gemini CLI",
5
5
  "type": "module",
6
6
  "bin": {
package/skills/SKILL.md CHANGED
@@ -76,6 +76,12 @@ and `run|report --rca`. `profile test` invokes the target without Rook model cre
76
76
  Use paid RCA only with user authorization. Track the user's budget across
77
77
  commands; do not assume the CLI enforces an aggregate task cap. Check its help
78
78
  for available limits. A null balance means unknown.
79
+ Rook checks the organisation's Agent Assurance plan before any model call or
80
+ credit spend, whatever the balance. A `plan_required` or `upgrade_plan` refusal
81
+ names the billing page that lifts it; pass that link to the user instead of
82
+ retrying. A plan without Rook cloud runs locally: when sync or cloud status is
83
+ refused, use `rook run --test` for a local result. See
84
+ [troubleshooting](references/troubleshooting.md).
79
85
  Prefer scoped `--allow` grants; use `--yes` only within the authorized scope.
80
86
  See [headless contracts](references/headless-contract.md) for output, grants and
81
87
  credit accounting.
@@ -67,6 +67,9 @@ required for the gate.
67
67
  `rook sync --yes` records the scenarios/profile upstream. If the requested CI
68
68
  result should remain local instead, omit sync and use `rook run --test` with the
69
69
  same flags and result checks. Do not silently switch between these policies.
70
+ Since 0.1.13, a plan without Rook cloud, such as Starter, refuses `sync` with
71
+ `upgrade_plan`, so the job fails at that step. Switch to the local policy only
72
+ if the user chooses it; otherwise pass on the upgrade link the refusal names.
70
73
 
71
74
  Cache the project `.testmuai/rook/` for history and comparisons. Never cache or
72
75
  commit `~/.testmuai/rook/`. `--yes` supplies broad command-scoped tool consent;
@@ -27,6 +27,7 @@ Commands that emit JSON write one document to stdout and prose to stderr.
27
27
  | Other `mcp` operations | `{ ok, lines: string[] }`, with configuration inside `lines` |
28
28
  | `ask` | `{ answer, command?, blocked_by?, summary? }`; the suggested command is not executed |
29
29
  | `update auto` | `{ ok, pinned }`; changes the update-notice preference |
30
+ | `doctor` (0.1.12+) | `{ version, diagnostic_session, diagnostic_log, upstream_session, session_logs, registration, log_level, node, os, workspace, environment, controller, api, identity, auth, project, mode, tty, env }`; `os` is `{ name, version, arch }`, `controller` and `api` are `{ url, status }`, `env` holds the terminal facts, and unreadable parts are null |
30
31
 
31
32
  `status.agents[].tree` is `unsynced`, `clean`, `ahead`, `diverged`, `behind` or
32
33
  `unknown`. Unknown means offline, not clean.
@@ -35,7 +36,9 @@ Some releases emit text despite accepting `--json` on `explore`, `generate`,
35
36
  `sync`, `profile add/fix/test`, `report --rca` and `update` without `auto`.
36
37
  Check for a JSON document before parsing; otherwise inspect exit status and
37
38
  saved files. After authorized RCA, use `rook report <run-id> --json` to read the result.
38
- `rook update` may replace the CLI; check its version afterward.
39
+ `rook update` may replace the CLI; check its version afterward. Since 0.1.12 a
40
+ Homebrew install runs `brew upgrade` itself and exits 1 when Homebrew installs
41
+ nothing new, for example while the tap trails a new npm release.
39
42
 
40
43
  ## Errors and partial runs
41
44
 
@@ -48,6 +51,16 @@ Use `error`, or `reason` when present. Translate remedy tokens with
48
51
  - `halted: true` can retain a report and exit 0. Present it as incomplete.
49
52
  - Gate refusals on `report`, `status` and `ask`, and parser errors, may leave
50
53
  stdout empty. Use the stderr diagnostic rather than inventing an error object.
54
+ - A command that calls the model controller or opens an upstream job refuses
55
+ before anything runs or is charged when its session could not be registered.
56
+ Report it as no run and no spend, using the diagnostic it returns.
57
+ - Since 0.1.12, `sync` exits 1 when the service leaves any agent it was sent
58
+ unanswered, even after recording others; the summary adds `N not returned` or
59
+ `N malformed`. Those agents keep their previous local state. Sync again
60
+ before a run that depends on them.
61
+ - A `run` whose evidence uploads to the project failed keeps its exit code and
62
+ JSON; stderr adds `N evidence upload(s) failed — see <log path>`. Report the
63
+ project's copy of that evidence as incomplete.
51
64
 
52
65
  ## Grants and accounting
53
66
 
@@ -65,7 +78,7 @@ still use the network, change state or invoke the target.
65
78
 
66
79
  ## On disk
67
80
 
68
- In 0.1.6, `.testmuai/rook/settings.json` keeps a project selection per
81
+ Since 0.1.6, `.testmuai/rook/settings.json` keeps a project selection per
69
82
  environment in `selections[environment]`. After a switch, rook
70
83
  uses the new environment's selection, which may be empty even when another
71
84
  environment has one. Run `rook doctor` to see the active environment and
@@ -87,4 +100,13 @@ assuming either form. Under its `agents/<agent-id>/` directory:
87
100
  | `runs/<run-id>/scenarios/<scenario-id>/` | `snapshot.yaml`, `request.json`, `response.json`, artifacts and `verdict.yaml` |
88
101
 
89
102
  Home state at `~/.testmuai/rook/` includes credentials, grants and session
90
- transcripts. Keep it outside commits and shared evidence.
103
+ transcripts. Each session's `transcript.jsonl` records the input and output of
104
+ every role call, including refused, failed and interrupted calls. Since 0.1.12
105
+ it also records tool calls, each message sent to the target and its reply,
106
+ jobs, per-agent sync results, run phases and scenario outcomes, so a killed run
107
+ keeps the turns it exchanged. Lines carry `v: 2`: object keys starting with `$`
108
+ gain one extra `$`, and strings of 4 KiB or more move to a `blobs/` folder
109
+ beside the transcript, replaced by `{"$blob": "sha256:<hex>", "bytes": n}`.
110
+ Check `v` on each line; a resumed session can mix v1 and v2 lines. Credential
111
+ masking is best effort and older transcripts are unmasked, so keep transcripts
112
+ outside commits and shared evidence.
@@ -17,11 +17,13 @@
17
17
  them, though existing scenario files that use them still load and run.
18
18
 
19
19
  Every scenario also carries free-form tags; `run --tag <names>` selects on them.
20
+ Red-team scenarios also carry OWASP LLM, OWASP Agentic (ASI) and MITRE ATLAS
21
+ references.
20
22
 
21
23
  ## Generating
22
24
 
23
25
  ```bash
24
- rook generate --json # functional + adversarial, rook picks the count
26
+ rook generate --json # functional + adversarial planned, rook picks the count
25
27
  rook generate --total 20 --class functional --json
26
28
  rook generate --category prompt_injection,jailbreak --json
27
29
  rook generate -- focus on the refund limits and the identity check
@@ -38,6 +40,11 @@ different feature, `generate` warns and saves that scenario excluded; review it
38
40
  in `rook scenarios list --json` and bring it back with
39
41
  `rook scenarios include <id>` if it belongs in runs.
40
42
 
43
+ `rook sync` stops before uploading anything when a scenario names a feature its
44
+ agent does not carry, and lists each one with its agent, the missing feature and
45
+ a fix. Apply the listed fix and sync again; do not run against upstream until
46
+ sync succeeds.
47
+
41
48
  ## Listing and curating
42
49
 
43
50
  ```bash
@@ -56,6 +63,23 @@ multiple turns without an observed conversation handle, or token-economy
56
63
  grading without reported usage, is skipped by `run` and counts toward the
57
64
  assurance gap, not toward Fail. File and image requirements are not rejected
58
65
  solely by their input kind: inspect what the profile script can actually send.
66
+ `generate` keeps a scenario it cannot make runnable instead of dropping it:
67
+ `executable: false` with a `skip_reason`. Reasons from rook's own validation
68
+ start with `coverage gap:`, `invalid scenario:` or `invalid red-team
69
+ scenario:`; the scenario checker writes plain sentences, often a precondition
70
+ the profile cannot establish. Do not match on the prefix to find them; read
71
+ `executable`. Attack patterns with no scenario for a feature are listed in the
72
+ agent's `coverage-gaps.yaml` and the report's coverage gaps. Report both as
73
+ gaps, not as failures.
74
+
75
+ A plain `generate` can plan no attacks for a small agent. When the user asked
76
+ for red-team coverage and none was written, run
77
+ `rook generate --class adversarial --json` and say so.
78
+
79
+ Some attack patterns are skipped until the profile has the hook they need,
80
+ and the skip reason names it: an `open` hook that seeds the fixture in
81
+ `$ROOK_STATE_DIR/attack-fixture.json`, a `collect` hook that reports the
82
+ observed control and outcome, or `open` and `close` hooks for a fresh session.
59
83
 
60
84
  ## Scoping a run
61
85
 
@@ -70,6 +94,10 @@ rook run --run <id> --phases collect,judge --json # collect evidence that la
70
94
  rook run --resume <id> --json # carry finished work into a new run
71
95
  ```
72
96
 
97
+ Without `--only`, a run selects at most two scenarios per attack pattern; the
98
+ rest are skipped as `pattern <id> already has 2 candidates in this run`. Name
99
+ them with `--only` to run more.
100
+
73
101
  `--only` takes one comma-separated argument; repeating the flag keeps only
74
102
  the last occurrence, and a space-separated second id is read as instruction
75
103
  text. Each scenario runs once; there is no repeat count.
@@ -9,9 +9,11 @@ rook plan --json
9
9
  rook status --json
10
10
  ```
11
11
 
12
- `doctor` prints version, node, workspace, environment, controller and api
13
- reachability, identity, auth state, project, mode (`cli`, `tui` or `headless`)
14
- and tty.
12
+ `doctor` prints version, node, OS, workspace, environment, controller and api
13
+ reachability, identity, auth state, project, mode (`cli`, `tui` or `headless`),
14
+ tty and the terminal (shell, privilege, color level, size); a field it cannot
15
+ detect reads `unknown`. Since 0.1.12, `rook doctor --json` prints the same
16
+ report as one JSON object; see [headless contracts](headless-contract.md).
15
17
 
16
18
  ## Failure documents
17
19
 
@@ -36,6 +38,8 @@ from `ok: true` or from an old report on disk.
36
38
  | `remedy: explore_agents` | no agents registered — `rook explore` |
37
39
  | `remedy: pick_agent` | no agent selected — `rook agent use <id>` |
38
40
  | `remedy: topup` | you are out of credits — check `rook plan` and add credits |
41
+ | `remedy: plan_required` | the org has no active Agent Assurance plan (none, an ended free trial or an expired subscription), whatever its credit balance — nothing ran or was charged; give the user the billing link the refusal names |
42
+ | `remedy: upgrade_plan` | the plan has no Rook cloud (such as Starter) — sync, cloud project status and recording runs on Rook cloud are refused; keep work local with `rook run --test`, or give the user the upgrade link the refusal names |
39
43
  | `remedy: reconcile` | this agent has diverged from upstream — `rook sync` |
40
44
  | `remedy: update` | this version is too old to be served — announce that `rook update` may install a newer version, then recheck skill compatibility |
41
45
  | `remedy: report` | a client bug — file an issue with `rook export logs` attached |
@@ -43,6 +47,10 @@ from `ok: true` or from an old report on disk.
43
47
  | no project selected | `rook project use <id>` or `rook project create <name>` |
44
48
  | could not reach the service | check the network; `doctor` shows both endpoints |
45
49
 
50
+ A plan refusal shows the billing page that lifts it as the next step; Rook uses
51
+ only https links on LambdaTest or TestMu AI hosts. Do not retry the refused
52
+ command until the plan changes.
53
+
46
54
  ## Discovery succeeds but registers no agents
47
55
 
48
56
  An exit-zero `explore` with `0 analysed` does not establish that the target is
@@ -90,4 +98,8 @@ rook export logs --out ./rook-logs.zip --all-sessions
90
98
  ```
91
99
 
92
100
  Include `rook --version`, the OS, and the scenario and run ids. Never paste a
93
- transcript, a credential, or the contents of `~/.testmuai/rook/`.
101
+ transcript, a credential, or the contents of `~/.testmuai/rook/`. The bundle
102
+ carries session transcripts and their `blobs/` folders. Since 0.1.12 Rook masks
103
+ the credentials it holds or recognises before writing a transcript line, best
104
+ effort; transcripts from older versions are not masked. Let the user review the
105
+ bundle before it is shared.
@@ -15,11 +15,22 @@ criterion details, read `runs/<run-id>/scenarios/<scenario-id>/verdict.yaml`.
15
15
 
16
16
  Statuses are **Pass**, **Fail**, and **Unable to Verify**. Unverifiable reasons:
17
17
  `agent_never_ran`, `not_observable`, or `undecidable`. A scenario that never ran
18
- has no verdict; do not turn its absence into a failure.
18
+ has no verdict; do not turn its absence into a failure. A grounded partial
19
+ compromise counts as Fail. Reports keep refusals, interrupted runs and coverage
20
+ gaps; carry them into the summary rather than dropping them. `report --json`
21
+ can add `coverage_gaps`, `redteam_coverage` (OWASP coverage of the scenario
22
+ inventory) and `summary_claims`; an unmapped control is unverified, not passed.
23
+ A **Partial** stored by an older run reads as Unable to Verify.
24
+
25
+ Since 0.1.12, a regex check that misses is graded by the judge on the
26
+ criterion's meaning, so a correct answer in another format can pass. A match
27
+ still passes at once, and a regex asserting that text is absent still fails
28
+ when the text appears. The judge call can add credits; if it fails, the
29
+ criterion is Unable to Verify, not Fail.
19
30
 
20
31
  ## Pass rate
21
32
 
22
- In 0.1.6, `totals.pass_rate` is `Pass / (Pass + Fail + Unable to Verify)`.
33
+ Since 0.1.6, `totals.pass_rate` is `Pass / (Pass + Fail + Unable to Verify)`.
23
34
  `totals.decided` still means `Pass + Fail`. Unable to Verify contributes to the
24
35
  pass-rate denominator as a recorded result, but remains a separate verdict;
25
36
  never describe it as Fail. If every recorded result is Unable to Verify,