@getmarrow/install 0.1.9 → 0.1.10
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 +2 -1
- package/package.json +1 -1
- package/src/installer.js +51 -4
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ 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.10
|
|
15
15
|
|
|
16
16
|
- First-run output now explains the value in agent/user language: your agent is no longer starting from zero.
|
|
17
17
|
- Self-test prints first proof: setup decision captured, outcome closed, runtime gate active, and risky work now gets a pre-action brief.
|
|
@@ -51,6 +51,7 @@ Expected result:
|
|
|
51
51
|
- A harmless setup decision is created and its outcome is committed.
|
|
52
52
|
- `/v1/agent/status` confirms capture health and missing hooks.
|
|
53
53
|
- `/v1/agent/runtime` verifies the one-call runtime gate.
|
|
54
|
+
- `/v1/agent/first-value` returns the five-minute proof payload used by installer, SDK, and MCP clients.
|
|
54
55
|
- The installer prints: "Your agent is no longer starting from zero."
|
|
55
56
|
- Fresh accounts get a first useful action to try immediately.
|
|
56
57
|
- Accounts with history get proof such as avoided mistakes, reused winning decisions, prevented risky actions, or estimated time/token savings.
|
package/package.json
CHANGED
package/src/installer.js
CHANGED
|
@@ -610,8 +610,25 @@ async function runSelfTest(options) {
|
|
|
610
610
|
ok: false,
|
|
611
611
|
error: error instanceof Error ? error.message : String(error),
|
|
612
612
|
}));
|
|
613
|
-
const
|
|
614
|
-
|
|
613
|
+
const firstValue = await requestJson(`${baseUrl}/v1/agent/first-value`, {
|
|
614
|
+
method: 'POST',
|
|
615
|
+
headers,
|
|
616
|
+
body: JSON.stringify({
|
|
617
|
+
action: 'I am about to deploy to production. What should I check first?',
|
|
618
|
+
type: 'deploy',
|
|
619
|
+
role: 'deploy',
|
|
620
|
+
surfaces: ['production', 'deploy'],
|
|
621
|
+
proof: {
|
|
622
|
+
checks: ['installer first-value self-test'],
|
|
623
|
+
outcome: 'first-value endpoint reached',
|
|
624
|
+
},
|
|
625
|
+
}),
|
|
626
|
+
}).catch((error) => ({
|
|
627
|
+
ok: false,
|
|
628
|
+
error: error instanceof Error ? error.message : String(error),
|
|
629
|
+
}));
|
|
630
|
+
const firstValueSignal = buildFirstValueSignal(status, runtime, performance, firstValue);
|
|
631
|
+
const installValueMoment = buildInstallValueMoment(firstValueSignal, status, runtime, performance, firstValue);
|
|
615
632
|
return {
|
|
616
633
|
skipped: false,
|
|
617
634
|
decision_id: decisionId,
|
|
@@ -624,6 +641,7 @@ async function runSelfTest(options) {
|
|
|
624
641
|
runtime_active: Boolean(runtime && runtime.ok !== false),
|
|
625
642
|
runtime_exact_next_action: runtime.exact_next_action || null,
|
|
626
643
|
runtime_before_you_act: runtime.before_you_act || null,
|
|
644
|
+
first_value: firstValue && firstValue.ok !== false ? firstValue : null,
|
|
627
645
|
first_value_signal: firstValueSignal,
|
|
628
646
|
install_value_moment: installValueMoment,
|
|
629
647
|
performance_proof: performance && performance.ok !== false ? {
|
|
@@ -637,7 +655,18 @@ async function runSelfTest(options) {
|
|
|
637
655
|
};
|
|
638
656
|
}
|
|
639
657
|
|
|
640
|
-
function buildInstallValueMoment(firstValueSignal = {}, status = {}, runtime = {}, performance = {}) {
|
|
658
|
+
function buildInstallValueMoment(firstValueSignal = {}, status = {}, runtime = {}, performance = {}, firstValue = {}) {
|
|
659
|
+
if (firstValue && firstValue.ok !== false && firstValue.first_value) {
|
|
660
|
+
return {
|
|
661
|
+
headline: firstValue.headline || firstValue.first_value.headline || 'Your agent is no longer starting from zero.',
|
|
662
|
+
proof: Array.isArray(firstValue.first_value.proof) ? firstValue.first_value.proof : [],
|
|
663
|
+
fleet_signal: firstValue.history_signal?.summary || 'Fresh account: Marrow will build fleet memory from this first captured outcome.',
|
|
664
|
+
try_this_now: firstValue.first_value.try_this_now || 'Ask your agent: "I am about to deploy to production. What should I check first?"',
|
|
665
|
+
expected_response: firstValue.first_value.expected_response || 'Marrow should answer with a risk gate, required proof, and any matching fleet lessons before the agent acts.',
|
|
666
|
+
first_lesson: firstValue.first_value.first_lesson || null,
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
|
|
641
670
|
const proof = firstValueSignal.value_proof || [];
|
|
642
671
|
const hasFleetSignal = proof.length > 0;
|
|
643
672
|
const runtimeLesson = runtime.before_you_act
|
|
@@ -662,7 +691,25 @@ function buildInstallValueMoment(firstValueSignal = {}, status = {}, runtime = {
|
|
|
662
691
|
};
|
|
663
692
|
}
|
|
664
693
|
|
|
665
|
-
function buildFirstValueSignal(status, runtime, performance) {
|
|
694
|
+
function buildFirstValueSignal(status, runtime, performance, firstValue = {}) {
|
|
695
|
+
if (firstValue && firstValue.ok !== false && firstValue.first_value) {
|
|
696
|
+
const capture = firstValue.capture || {};
|
|
697
|
+
const proof = firstValue.value_proof || {};
|
|
698
|
+
const proofBits = [];
|
|
699
|
+
if (Number(proof.avoided_mistakes || 0) > 0) proofBits.push(`${proof.avoided_mistakes} avoided mistake(s)`);
|
|
700
|
+
if (Number(proof.reused_winning_decisions || 0) > 0) proofBits.push(`${proof.reused_winning_decisions} reused winning decision(s)`);
|
|
701
|
+
if (Number(proof.prevented_bad_actions || 0) > 0) proofBits.push(`${proof.prevented_bad_actions} prevented risky action(s)`);
|
|
702
|
+
if (Number(proof.estimated_tokens_saved || 0) > 0) proofBits.push(`~${proof.estimated_tokens_saved} tokens saved`);
|
|
703
|
+
return {
|
|
704
|
+
active: Boolean(firstValue.active),
|
|
705
|
+
headline: `Marrow active: ${(capture.surfaces || ['decisions']).join(', ')} captured.`,
|
|
706
|
+
captured: capture.surfaces || ['decisions'],
|
|
707
|
+
first_lesson: firstValue.first_value.first_lesson,
|
|
708
|
+
value_proof: proofBits,
|
|
709
|
+
next_action: firstValue.next_action?.reason || 'Keep working; Marrow will capture outcomes and reuse lessons automatically.',
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
|
|
666
713
|
const capture = status.capture_coverage || {};
|
|
667
714
|
const closure = status.auto_outcome_closure || {};
|
|
668
715
|
const captured = [];
|