@getmarrow/install 0.1.19 → 0.1.21
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 +44 -89
- package/bin/marrow-install.js +1 -1
- package/package.json +1 -3
- package/src/governed-runner.js +486 -23
- package/src/installer.js +80 -333
package/README.md
CHANGED
|
@@ -11,66 +11,22 @@ npx @getmarrow/install --repair
|
|
|
11
11
|
npx @getmarrow/install doctor
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
## What's New in v0.1.
|
|
14
|
+
## What's New in v0.1.21
|
|
15
15
|
|
|
16
|
-
v0.1.
|
|
16
|
+
v0.1.21 makes token value proof part of the default install path.
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
18
|
+
- Generated passive runtimes enable compact model-usage capture by default with `captureModelUsage`.
|
|
19
|
+
- First-run self-test calls `/v1/agent/value/proof` and prints a `Token value proof` block.
|
|
20
|
+
- Fresh accounts show token capture as active and warming up; accounts with observed model calls show calls, tokens, estimated savings, confidence, and next action.
|
|
21
|
+
- Provider usage capture stores compact metadata only: provider, model, token counts, latency, cost estimate, workflow/decision linkage, and Marrow intervention type.
|
|
22
|
+
- Marrow does not store prompts, completions, tool stdout/stderr, plaintext API keys, or raw model output for this feature.
|
|
23
|
+
- Disable only when required with `MARROW_PASSIVE_TOKEN_USAGE=false`.
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
Business value: new users should see from day one whether Marrow is capturing the signals needed to prove token/time savings over workflows, tasks, and builds.
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
## Governed Runner
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
- Marrow remains a thin governance layer. It does not replace your model or harness; it wraps the command your agent already runs with pre-action risk gates, proof requirements, and automatic outcome closure.
|
|
30
|
-
- Detection stays recommendation-first. Marrow uses local config, instruction, CI, and MCP markers to suggest the safest path, then the user or owner accepts, overrides, or saves a policy profile.
|
|
31
|
-
- Cursor is treated as a development workflow surface. Marrow can govern Cursor-backed code review, edits, tests, deploys, and release steps through MCP setup, project rules, or the governed command wrapper.
|
|
32
|
-
- If a harness is not detected yet, use **Custom command** or `npx @getmarrow/install run -- <your-agent-command>` to govern it immediately.
|
|
33
|
-
|
|
34
|
-
Business value: teams can add Marrow to the agent stack they already use instead of migrating to a new agent host. Codex, Claude Code, Cursor, Cline, Gemini, Grok, DeepSeek, Minimax, Kimi/Moonshot, Hermes, GLM, Qwen, OpenClaw, OpenCode, MCP clients, and CI scripts can all be brought under the same governance loop.
|
|
35
|
-
|
|
36
|
-
## What's New in v0.1.14
|
|
37
|
-
|
|
38
|
-
v0.1.14 adds adaptive governance mode recommendations without silent auto-switching.
|
|
39
|
-
|
|
40
|
-
- `npx @getmarrow/install govern` now detects project signals such as `package.json`, deploy/publish scripts, platform config files, GitHub workflows, migrations, Cursor/Codex/Claude files, and MCP config.
|
|
41
|
-
- When `MARROW_API_KEY` is present, the TUI asks Marrow for a recommended mode: `passive`, `pilot`, or `enforce`.
|
|
42
|
-
- The TUI shows the exact reasons, confidence, and selected command before the user applies anything.
|
|
43
|
-
- User choice is explicit. Marrow logs whether the recommendation was accepted or overridden, but it does not silently switch modes.
|
|
44
|
-
- Policy profiles are supported by the backend/SDK/MCP so businesses can define rules like local=passive, staging=pilot, production deploys=enforce.
|
|
45
|
-
|
|
46
|
-
Example recommendation:
|
|
47
|
-
|
|
48
|
-
```text
|
|
49
|
-
Recommended mode: pilot
|
|
50
|
-
Reason:
|
|
51
|
-
- Node project detected
|
|
52
|
-
- Edge service detected
|
|
53
|
-
- GitHub workflow detected
|
|
54
|
-
- No owner approval policy configured yet
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## What's New in v0.1.13
|
|
58
|
-
|
|
59
|
-
v0.1.13 turns `npx @getmarrow/install govern` into an interactive terminal setup flow when run in a real TTY.
|
|
60
|
-
|
|
61
|
-
- Select Codex, Claude Code, Cursor, OpenCode, OpenClaw, CI scripts, or a custom command with arrow keys.
|
|
62
|
-
- Choose passive setup, governed pilot mode, or governed enforce mode.
|
|
63
|
-
- Run passive setup + self-test from the TUI after explicit confirmation.
|
|
64
|
-
- Check Marrow status and test the before-action gate from the same screen.
|
|
65
|
-
- Print the exact command for the selected harness/mode so users know what to run next.
|
|
66
|
-
- Exit cleanly with `q`, `Esc`, or `Ctrl+C`.
|
|
67
|
-
- CI/non-TTY usage remains stable with `npx @getmarrow/install govern --no-interactive`.
|
|
68
|
-
|
|
69
|
-
This keeps Marrow passive-first: install once, verify Marrow is active, then let agents use the runtime/gate path automatically for risky work.
|
|
70
|
-
|
|
71
|
-
## What's New in v0.1.12
|
|
72
|
-
|
|
73
|
-
v0.1.12 adds the Marrow governed runner for businesses that want agent governance without replacing their existing harness.
|
|
29
|
+
The Marrow governed runner is for businesses that want agent governance without replacing their existing harness.
|
|
74
30
|
|
|
75
31
|
- `npx @getmarrow/install govern` prints a setup panel for detected harnesses and recommended protected commands.
|
|
76
32
|
- `npx @getmarrow/install run --agent <agent-id> -- <command>` wraps existing agent, deploy, merge, publish, migration, and verification commands with Marrow's pre-action runtime gate.
|
|
@@ -89,12 +45,6 @@ Preview the detected harnesses and protected command examples:
|
|
|
89
45
|
npx @getmarrow/install govern
|
|
90
46
|
```
|
|
91
47
|
|
|
92
|
-
In a real terminal, this opens the interactive setup flow. In CI or scripts, use:
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
npx @getmarrow/install govern --no-interactive
|
|
96
|
-
```
|
|
97
|
-
|
|
98
48
|
Run a harmless command through Marrow:
|
|
99
49
|
|
|
100
50
|
```bash
|
|
@@ -104,7 +54,7 @@ MARROW_API_KEY=mrw_live_xxx npx @getmarrow/install run --agent codex-prod --prof
|
|
|
104
54
|
Gate a production action before the agent executes it:
|
|
105
55
|
|
|
106
56
|
```bash
|
|
107
|
-
MARROW_API_KEY=mrw_live_xxx npx @getmarrow/install gate "deploy production
|
|
57
|
+
MARROW_API_KEY=mrw_live_xxx npx @getmarrow/install gate "deploy production worker after tests pass"
|
|
108
58
|
```
|
|
109
59
|
|
|
110
60
|
Wrap a real deploy, publish, merge, or migration command only after the agent has the required proof:
|
|
@@ -115,20 +65,11 @@ MARROW_API_KEY=mrw_live_xxx npx @getmarrow/install run \
|
|
|
115
65
|
--type deploy \
|
|
116
66
|
--profile production \
|
|
117
67
|
--policy enforce \
|
|
118
|
-
--
|
|
68
|
+
-- wrangler deploy
|
|
119
69
|
```
|
|
120
70
|
|
|
121
71
|
Use `--policy warn` for pilot mode and `--fail-open` only for non-production local workflows where Marrow should never block execution.
|
|
122
72
|
|
|
123
|
-
## What's New in v0.1.10
|
|
124
|
-
|
|
125
|
-
- First-run output now explains the value in agent/user language: your agent is no longer starting from zero.
|
|
126
|
-
- Self-test prints first proof: setup decision captured, outcome closed, runtime gate active, and risky work now gets a pre-action brief.
|
|
127
|
-
- Fresh accounts get a guided prompt to try immediately: "I am about to deploy to production. What should I check first?"
|
|
128
|
-
- Existing accounts/fleets show stronger proof when available: avoided mistakes, reused winning decisions, prevented risky actions, and token/time savings.
|
|
129
|
-
- Generated SDK passive runtime now fails soft if `@getmarrow/sdk` is missing and the installer prints the exact dependency fix.
|
|
130
|
-
- Docs now make the universal installer the default path; SDK and MCP are advanced/manual integration paths.
|
|
131
|
-
|
|
132
73
|
## Which Install Path Should I Use?
|
|
133
74
|
|
|
134
75
|
Start here unless you already know you need a lower-level integration:
|
|
@@ -161,7 +102,9 @@ Expected result:
|
|
|
161
102
|
- `/v1/agent/status` confirms capture health and missing hooks.
|
|
162
103
|
- `/v1/agent/runtime` verifies the one-call runtime gate and returns the before-action intervention contract.
|
|
163
104
|
- `/v1/agent/first-value` returns the five-minute proof payload used by installer, SDK, and MCP clients.
|
|
105
|
+
- `/v1/agent/value/proof` returns token value proof from passive model-usage capture.
|
|
164
106
|
- The installer prints: "Your agent is no longer starting from zero."
|
|
107
|
+
- The installer prints: "Token value proof" with capture status, observed model calls, token totals, estimated savings, confidence, and exact next action.
|
|
165
108
|
- Fresh accounts get a first useful action to try immediately.
|
|
166
109
|
- Accounts with history get proof such as avoided mistakes, reused winning decisions, prevented risky actions, or estimated time/token savings.
|
|
167
110
|
|
|
@@ -181,18 +124,10 @@ Marrow should answer with `proceed`, `warn`, `block`, or `owner_approval_require
|
|
|
181
124
|
- Codex/agent instruction files such as `AGENTS.md`
|
|
182
125
|
- Claude Code settings and hooks
|
|
183
126
|
- Cursor project folders
|
|
184
|
-
- Gemini, Grok, DeepSeek, Minimax, Kimi/Moonshot, Hermes, GLM, and Qwen project marker files when present
|
|
185
127
|
- MCP config files
|
|
186
|
-
- CI workflow/script markers
|
|
187
128
|
- Node projects
|
|
188
129
|
- Python projects
|
|
189
130
|
|
|
190
|
-
The detector is intentionally conservative. If Marrow cannot identify the harness from local files, it still supports the workflow through the custom command path:
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
MARROW_API_KEY=mrw_live_xxx npx @getmarrow/install run --agent research-agent -- <your-agent-command>
|
|
194
|
-
```
|
|
195
|
-
|
|
196
131
|
## Install Modes
|
|
197
132
|
|
|
198
133
|
```bash
|
|
@@ -215,7 +150,7 @@ npx @getmarrow/install --md --dry-run
|
|
|
215
150
|
|
|
216
151
|
## Self-Test
|
|
217
152
|
|
|
218
|
-
When `MARROW_API_KEY` is present, the installer creates a harmless test decision, commits the outcome, reads `/v1/agent/status`, calls the one-call runtime, and prints the first useful Marrow signal.
|
|
153
|
+
When `MARROW_API_KEY` is present, the installer creates a harmless test decision, commits the outcome, reads `/v1/agent/status`, calls the one-call runtime, reads `/v1/agent/value/proof`, and prints the first useful Marrow signal plus token value proof.
|
|
219
154
|
|
|
220
155
|
```bash
|
|
221
156
|
MARROW_API_KEY=mrw_live_xxx npx @getmarrow/install --yes
|
|
@@ -233,14 +168,6 @@ Doctor check:
|
|
|
233
168
|
MARROW_API_KEY=mrw_live_xxx npx @getmarrow/install doctor
|
|
234
169
|
```
|
|
235
170
|
|
|
236
|
-
Deep doctor with harmless write/outcome verification:
|
|
237
|
-
|
|
238
|
-
```bash
|
|
239
|
-
MARROW_API_KEY=mrw_live_xxx npx @getmarrow/install doctor --self-test
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
Expected healthy output includes `key valid: yes`, `write test event: passed`, and `outcome closed: passed`.
|
|
243
|
-
|
|
244
171
|
Repair missing hooks/config:
|
|
245
172
|
|
|
246
173
|
```bash
|
|
@@ -257,6 +184,34 @@ npm install @getmarrow/sdk
|
|
|
257
184
|
|
|
258
185
|
The generated runtime now fails soft with an explicit warning if the SDK package is missing, so onboarding does not crash a user process.
|
|
259
186
|
|
|
187
|
+
## Passive Token Value Proof
|
|
188
|
+
|
|
189
|
+
Token value proof is default-on when the installer writes `.marrow/passive-runtime.mjs`.
|
|
190
|
+
|
|
191
|
+
In supported Node/TypeScript agents, the SDK passive runtime wraps outbound model-provider `fetch` responses and captures compact `usage` blocks when providers return them. MCP and harness integrations can also attach `model_usage` to `marrow_commit` or call `marrow_model_usage` when the harness exposes usage metadata.
|
|
192
|
+
|
|
193
|
+
Captured fields are intentionally narrow:
|
|
194
|
+
|
|
195
|
+
- provider and model
|
|
196
|
+
- input, output, cached, and total token counts
|
|
197
|
+
- optional cost and latency estimates
|
|
198
|
+
- agent, workflow, session, and decision linkage
|
|
199
|
+
- Marrow intervention type, such as `runtime_gate`, `proof_pack`, or `before_you_act`
|
|
200
|
+
|
|
201
|
+
Marrow does not capture prompt text, completion text, raw tool output, command output, full environment values, or plaintext secrets for token value proof.
|
|
202
|
+
|
|
203
|
+
Disable capture only when a project requires it:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
MARROW_PASSIVE_TOKEN_USAGE=false
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Day-one behavior:
|
|
210
|
+
|
|
211
|
+
- Fresh install: `Token usage capture is ready; no model calls have been reported yet.`
|
|
212
|
+
- After observed usage: Marrow reports model calls, total tokens, estimated tokens saved, confidence, trend, and next action.
|
|
213
|
+
- After workflows complete: agents should show the returned `token_value_signal` or value proof in owner updates so users see savings without opening a dashboard.
|
|
214
|
+
|
|
260
215
|
|
|
261
216
|
## Trust and Data Boundaries
|
|
262
217
|
|
package/bin/marrow-install.js
CHANGED
|
@@ -4,7 +4,7 @@ const installer = require('../src/installer');
|
|
|
4
4
|
const governedRunner = require('../src/governed-runner');
|
|
5
5
|
|
|
6
6
|
const argv = process.argv.slice(2);
|
|
7
|
-
const governedCommands = new Set(['run', 'gate', 'proof', 'status', 'govern']);
|
|
7
|
+
const governedCommands = new Set(['run', 'gate', 'proof', 'status', 'govern', 'fleet']);
|
|
8
8
|
const runCli = governedCommands.has(argv[0]) ? governedRunner.runCli : installer.runCli;
|
|
9
9
|
|
|
10
10
|
runCli(argv).catch((error) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getmarrow/install",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "Universal installer for Marrow passive agent setup.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"marrow-install": "bin/marrow-install.js"
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
"marrow",
|
|
16
16
|
"mcp",
|
|
17
17
|
"installer",
|
|
18
|
-
"governance",
|
|
19
|
-
"runner",
|
|
20
18
|
"passive-runtime"
|
|
21
19
|
],
|
|
22
20
|
"repository": {
|