@getmarrow/mcp 3.9.100 → 3.9.102
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 +53 -16
- package/dist/cli.d.ts +2 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +67 -1000
- package/dist/cli.js.map +1 -1
- package/dist/env.d.ts +2 -0
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +229 -39
- package/dist/env.js.map +1 -1
- package/dist/hook-contract.d.ts +41 -3
- package/dist/hook-contract.d.ts.map +1 -1
- package/dist/hook-contract.js +119 -16
- package/dist/hook-contract.js.map +1 -1
- package/dist/hook-pre-action.d.ts +3 -2
- package/dist/hook-pre-action.d.ts.map +1 -1
- package/dist/hook-pre-action.js +13 -7
- package/dist/hook-pre-action.js.map +1 -1
- package/dist/hook-tool-policy.d.ts +3 -3
- package/dist/hook-tool-policy.d.ts.map +1 -1
- package/dist/hook-tool-policy.js +6 -22
- package/dist/hook-tool-policy.js.map +1 -1
- package/dist/hook.d.ts +1 -1
- package/dist/hook.d.ts.map +1 -1
- package/dist/hook.js +1 -0
- package/dist/hook.js.map +1 -1
- package/dist/host-approval-state.d.ts +9 -0
- package/dist/host-approval-state.d.ts.map +1 -1
- package/dist/host-approval-state.js +4 -0
- package/dist/host-approval-state.js.map +1 -1
- package/dist/host-approval.d.ts +6 -0
- package/dist/host-approval.d.ts.map +1 -1
- package/dist/host-approval.js +3 -1
- package/dist/host-approval.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/dist/normalized-action.d.ts.map +1 -1
- package/dist/normalized-action.js +6 -2
- package/dist/normalized-action.js.map +1 -1
- package/dist/own-tool.d.ts +83 -0
- package/dist/own-tool.d.ts.map +1 -0
- package/dist/own-tool.js +165 -0
- package/dist/own-tool.js.map +1 -0
- package/dist/tool-catalog.d.ts +6852 -0
- package/dist/tool-catalog.d.ts.map +1 -0
- package/dist/tool-catalog.js +999 -0
- package/dist/tool-catalog.js.map +1 -0
- package/package.json +1 -1
- package/server.json +9 -2
package/dist/cli.js
CHANGED
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
* Exposes pre-action governance, intent capture, outcome closure, and fleet evidence.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
* npx @getmarrow/mcp (reads MARROW_API_KEY from env)
|
|
9
|
-
* npx @getmarrow/mcp --
|
|
10
|
-
* MARROW_API_KEY=mrw_abc123 npx @getmarrow/mcp
|
|
8
|
+
* npx @getmarrow/mcp (reads MARROW_API_KEY from env or an owner-only ~/.marrow/env)
|
|
9
|
+
* npx @getmarrow/mcp --help
|
|
11
10
|
*/
|
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
12
|
const node_crypto_1 = require("node:crypto");
|
|
14
|
-
const
|
|
13
|
+
const tool_catalog_1 = require("./tool-catalog");
|
|
15
14
|
const index_1 = require("./index");
|
|
16
15
|
const control_state_1 = require("./control-state");
|
|
17
16
|
const hook_1 = require("./hook");
|
|
@@ -42,6 +41,9 @@ function parseArgs() {
|
|
|
42
41
|
result.apiKey = args[i + 1];
|
|
43
42
|
i++;
|
|
44
43
|
}
|
|
44
|
+
if (args[i] === '--help' || args[i] === '-h') {
|
|
45
|
+
result.help = true;
|
|
46
|
+
}
|
|
45
47
|
if (args[i] === 'setup' || args[i] === '--setup') {
|
|
46
48
|
result.setup = true;
|
|
47
49
|
}
|
|
@@ -158,6 +160,7 @@ async function runPingCommand() {
|
|
|
158
160
|
return;
|
|
159
161
|
}
|
|
160
162
|
const baseUrl = (0, index_1.validateBaseUrl)(resolved.baseUrl || 'https://api.getmarrow.ai');
|
|
163
|
+
const endpointHost = (0, env_1.nonDefaultBaseUrlHost)(baseUrl);
|
|
161
164
|
const controller = new AbortController();
|
|
162
165
|
const timer = setTimeout(() => controller.abort(), (0, ping_state_1.resolvePingTimeoutMs)(process.env.MARROW_PING_TIMEOUT_MS));
|
|
163
166
|
timer.unref?.();
|
|
@@ -175,6 +178,7 @@ async function runPingCommand() {
|
|
|
175
178
|
sample_count: history.sample_count,
|
|
176
179
|
last_success_at: history.last_success_at,
|
|
177
180
|
lifecycle_spool: reportLifecycleSpool({ apiKey: resolved.apiKey, baseUrl, agentId: resolved.agentId }),
|
|
181
|
+
...(endpointHost ? { endpoint_host: endpointHost } : {}),
|
|
178
182
|
}, null, 2) + '\n');
|
|
179
183
|
}
|
|
180
184
|
catch (error) {
|
|
@@ -188,6 +192,7 @@ async function runPingCommand() {
|
|
|
188
192
|
sample_count: history.sample_count,
|
|
189
193
|
last_success_at: history.last_success_at,
|
|
190
194
|
lifecycle_spool: reportLifecycleSpool({ apiKey: resolved.apiKey, baseUrl, agentId: resolved.agentId }),
|
|
195
|
+
...(endpointHost ? { endpoint_host: endpointHost } : {}),
|
|
191
196
|
}, null, 2) + '\n');
|
|
192
197
|
process.exitCode = 1;
|
|
193
198
|
}
|
|
@@ -221,10 +226,43 @@ async function runSpoolCommand(drain) {
|
|
|
221
226
|
if (outcome.exitCode !== 0)
|
|
222
227
|
process.exitCode = outcome.exitCode;
|
|
223
228
|
}
|
|
229
|
+
const GET_A_KEY_URL = 'https://getmarrow.ai/signup';
|
|
230
|
+
const ACTIVATE_COMMAND = 'npx -y @getmarrow/install@latest activate';
|
|
231
|
+
const ENFORCEMENT_SENTENCE = 'On the 30-day evaluation and Business, deploys and publishes are held in hooks and the governed runner. Team and Free warn. If Marrow is unreachable, hooks let actions run with a warning, and the governed runner stops protected actions it cannot verify. Over MCP, the agent gets the decision and is expected to follow it.';
|
|
232
|
+
const HELP_TEXT = `Marrow MCP server and hook commands (@getmarrow/mcp)
|
|
233
|
+
|
|
234
|
+
Day one:
|
|
235
|
+
1. Create a key at ${GET_A_KEY_URL} (dashboard -> API keys).
|
|
236
|
+
2. Make the key available as MARROW_API_KEY (environment or an owner-only ~/.marrow/env), then run:
|
|
237
|
+
${ACTIVATE_COMMAND}
|
|
238
|
+
Fallback if you cannot set it first (a key typed on a command line stays in shell history):
|
|
239
|
+
MARROW_API_KEY=<your_key> ${ACTIVATE_COMMAND}
|
|
240
|
+
3. Restart the agent host and review/enable its hook trust.
|
|
241
|
+
4. Verify: npx -y @getmarrow/install@latest doctor --self-test
|
|
242
|
+
|
|
243
|
+
Commands:
|
|
244
|
+
(none) start the MCP server on stdio (needs MARROW_API_KEY)
|
|
245
|
+
setup hooks-only setup; needs the key first and writes nothing without it
|
|
246
|
+
ping check live read latency, last success and local backlog
|
|
247
|
+
spool-status show the local lifecycle spool
|
|
248
|
+
drain-spool deliver the local lifecycle spool
|
|
249
|
+
loop-guard-self-test offline check of the local session loop guard
|
|
250
|
+
keys <create|list|get|rotate|revoke|audit> manage API keys
|
|
251
|
+
--help, -h show this text (works without a key)
|
|
252
|
+
|
|
253
|
+
${ENFORCEMENT_SENTENCE}
|
|
254
|
+
Hooks run inside the agent host and are not an external execution boundary: an agent or person who edits the host settings or runs outside the host is not held.
|
|
255
|
+
`;
|
|
224
256
|
// ─── Setup command: inject Marrow instructions into CLAUDE.md ───
|
|
225
257
|
function runSetup() {
|
|
226
258
|
const fs = require('fs');
|
|
227
259
|
const path = require('path');
|
|
260
|
+
// Hooks without a key deny protected actions, so write nothing until a key exists.
|
|
261
|
+
// Same trusted resolution the installed hooks use: project .env files and non-private owner files cannot supply the key.
|
|
262
|
+
if (!(0, env_1.resolveMarrowEnv)({ trustedOnly: true }).apiKey) {
|
|
263
|
+
process.stderr.write(`Marrow needs your API key before setup can write hooks, so nothing was written.\nCreate a key at ${GET_A_KEY_URL}, make it available as MARROW_API_KEY (environment or an owner-only ~/.marrow/env), then run:\n ${ACTIVATE_COMMAND}\nFallback: MARROW_API_KEY=<your_key> ${ACTIVATE_COMMAND} (a key typed on a command line stays in shell history)\n`);
|
|
264
|
+
process.exit(2);
|
|
265
|
+
}
|
|
228
266
|
const MARROW_BLOCK_START = '<!-- marrow:start -->';
|
|
229
267
|
const MARROW_BLOCK_END = '<!-- marrow:end -->';
|
|
230
268
|
const marrowInstructions = `${MARROW_BLOCK_START}
|
|
@@ -289,6 +327,7 @@ ${MARROW_BLOCK_END}`;
|
|
|
289
327
|
fs.writeFileSync(claudeMdPath, marrowInstructions + '\n');
|
|
290
328
|
process.stdout.write(`Added Marrow instructions to ${claudeMdPath}\n`);
|
|
291
329
|
}
|
|
330
|
+
const matcherRepair = (0, hook_contract_1.localHookRepairStatus)(process.cwd());
|
|
292
331
|
const hookInstall = (0, hook_1.installPostToolUseHook)(process.cwd());
|
|
293
332
|
if (hookInstall.installed) {
|
|
294
333
|
process.stdout.write('Configured PostToolUse hook. Activity is client-self-reported and does not certify action-result coverage.\n');
|
|
@@ -331,6 +370,13 @@ ${MARROW_BLOCK_END}`;
|
|
|
331
370
|
else {
|
|
332
371
|
process.stdout.write(`Grok native hook configuration is present at ${grokHookInstall.settingsPath}. Restart Grok and inspect /hooks before relying on it. Activity remains client-self-reported and does not certify observed coverage.\n`);
|
|
333
372
|
}
|
|
373
|
+
if (matcherRepair.needs_repair) {
|
|
374
|
+
const events = [...new Set(matcherRepair.stale_matchers.map((entry) => entry.event))].join(', ');
|
|
375
|
+
const repaired = (0, hook_contract_1.localHookRepairStatus)(process.cwd());
|
|
376
|
+
process.stdout.write(repaired.needs_repair
|
|
377
|
+
? `Marrow ${events} hooks still use an outdated tool matcher that skips some MCP tools. Fix the settings file and run setup again.\n`
|
|
378
|
+
: `Repaired Marrow ${events} hooks that used an outdated tool matcher (it skipped unregistered mcp__marrow__ tools).\n`);
|
|
379
|
+
}
|
|
334
380
|
process.stdout.write(`Hook settings: ${hookInstall.settingsPath}\n`);
|
|
335
381
|
process.stdout.write('Configured private local session loop guard for supported native hook events. It becomes active only after host restart/trust review and an actual hook invocation; setup alone does not prove enforcement.\n');
|
|
336
382
|
process.stdout.write('Offline verification: marrow-mcp loop-guard-self-test (uses isolated temporary state and does not touch the user ledger).\n');
|
|
@@ -341,6 +387,11 @@ ${MARROW_BLOCK_END}`;
|
|
|
341
387
|
process.exit(0);
|
|
342
388
|
}
|
|
343
389
|
const cliArgs = parseArgs();
|
|
390
|
+
// Never for a hook entrypoint: a hook that sees -h must still run its check.
|
|
391
|
+
if (cliArgs.help && !(cliArgs.hook || cliArgs.contextHook || cliArgs.preActionHook || cliArgs.sessionHook || cliArgs.permissionRequestHook || cliArgs.backgroundNudge)) {
|
|
392
|
+
process.stdout.write(HELP_TEXT);
|
|
393
|
+
process.exit(0);
|
|
394
|
+
}
|
|
344
395
|
function formatKeyMaterialWarning() {
|
|
345
396
|
return 'Copy this key now. Marrow will only show the full plaintext key once.';
|
|
346
397
|
}
|
|
@@ -478,6 +529,8 @@ if (process.argv[2] !== 'keys') {
|
|
|
478
529
|
// [SECURITY #3] Validate BASE_URL — require HTTPS to prevent SSRF / credential leakage
|
|
479
530
|
const rawBaseUrl = resolvedEnv.baseUrl || 'https://api.getmarrow.ai';
|
|
480
531
|
const BASE_URL = (0, index_1.validateBaseUrl)(rawBaseUrl);
|
|
532
|
+
// A non-default endpoint receives every action; name its host wherever status is shown.
|
|
533
|
+
const ENDPOINT_HOST = (0, env_1.nonDefaultBaseUrlHost)(BASE_URL);
|
|
481
534
|
const SESSION_ID = resolvedEnv.sessionId || undefined;
|
|
482
535
|
// One identity must bind headers, bodies, queries, cache, and lifecycle events.
|
|
483
536
|
// resolveMarrowEnv already gives MARROW_FLEET_AGENT_ID precedence over MARROW_AGENT_ID.
|
|
@@ -488,10 +541,12 @@ if (process.argv[2] !== 'keys') {
|
|
|
488
541
|
if (!API_KEY) {
|
|
489
542
|
process.stderr.write('Error: MARROW_API_KEY environment variable is required\n');
|
|
490
543
|
process.stderr.write(`${resolvedEnv.exactFix}\n`);
|
|
491
|
-
process.stderr.write(
|
|
492
|
-
process.stderr.write(' or: npx @getmarrow/mcp --key mrw_yourkey\n');
|
|
544
|
+
process.stderr.write(`Get a key: ${GET_A_KEY_URL}. Day-one steps and commands: npx @getmarrow/mcp --help\n`);
|
|
493
545
|
process.exit(1);
|
|
494
546
|
}
|
|
547
|
+
if (ENDPOINT_HOST) {
|
|
548
|
+
process.stderr.write(`[marrow] Using a non-default Marrow endpoint: ${ENDPOINT_HOST} (MARROW_BASE_URL).\n`);
|
|
549
|
+
}
|
|
495
550
|
// [SECURITY #12] Warn if API key is visible in process args
|
|
496
551
|
if (cliArgs.apiKey) {
|
|
497
552
|
process.stderr.write('[marrow] Warning: --key flag exposes API key in process list. Use MARROW_API_KEY env var for production.\n');
|
|
@@ -754,6 +809,7 @@ if (process.argv[2] !== 'keys') {
|
|
|
754
809
|
legacy_namespaces: spool.other_namespaces?.count || 0,
|
|
755
810
|
},
|
|
756
811
|
mcp_tool_profile: mcpToolProfileStatus(payload),
|
|
812
|
+
marrow_endpoint: { host: ENDPOINT_HOST || 'api.getmarrow.ai', non_default: Boolean(ENDPOINT_HOST) },
|
|
757
813
|
};
|
|
758
814
|
}
|
|
759
815
|
// [FIX #9] Runtime validation helper for required string params
|
|
@@ -1000,995 +1056,6 @@ if (process.argv[2] !== 'keys') {
|
|
|
1000
1056
|
const json = await safeMemoryResponse(res);
|
|
1001
1057
|
return json.data;
|
|
1002
1058
|
}
|
|
1003
|
-
// Tool definitions (unchanged)
|
|
1004
|
-
const TOOLS = [
|
|
1005
|
-
{
|
|
1006
|
-
name: 'marrow_orient',
|
|
1007
|
-
description: 'Call at session start or before meaningful work. ' +
|
|
1008
|
-
'Returns authorized prior lessons and failure warnings for the current account or agent. ' +
|
|
1009
|
-
'If shouldPause=true, stop and review the lesson before acting. ' +
|
|
1010
|
-
'Use marrow_agent_runtime for the policy gate before a consequential side effect.',
|
|
1011
|
-
inputSchema: {
|
|
1012
|
-
type: 'object',
|
|
1013
|
-
properties: {
|
|
1014
|
-
taskType: {
|
|
1015
|
-
type: 'string',
|
|
1016
|
-
enum: ['implementation', 'security', 'architecture', 'process', 'general'],
|
|
1017
|
-
description: 'Optional: filter warnings to a specific task type you are about to perform',
|
|
1018
|
-
},
|
|
1019
|
-
autoWarn: {
|
|
1020
|
-
type: 'boolean',
|
|
1021
|
-
description: 'Enable active intervention: scans recent failures, returns HIGH/MEDIUM/LOW severity warnings with recommendations. Recommended: true.',
|
|
1022
|
-
},
|
|
1023
|
-
},
|
|
1024
|
-
required: [],
|
|
1025
|
-
},
|
|
1026
|
-
},
|
|
1027
|
-
{
|
|
1028
|
-
name: 'marrow_think',
|
|
1029
|
-
description: 'Record intent and retrieve authorized governance intelligence before acting. ' +
|
|
1030
|
-
'Returns a decision_id for outcome closure plus relevant patterns, prior outcomes, and recommendedNext. ' +
|
|
1031
|
-
'Pass previous_outcome to auto-commit the last decision and open a new one. ' +
|
|
1032
|
-
'Response MAY include: onboarding_hint (new accounts), intelligence.collective (cross-account patterns), intelligence.team_context (recent decisions from other sessions).',
|
|
1033
|
-
inputSchema: {
|
|
1034
|
-
type: 'object',
|
|
1035
|
-
properties: {
|
|
1036
|
-
idempotency_key: { type: 'string', description: 'Original privacy-safe pending receipt key when resuming the identical think request.' },
|
|
1037
|
-
request_hash: { type: 'string', description: 'Pending receipt request_hash; validates unchanged arguments, credentials, agent and session before resuming.' },
|
|
1038
|
-
action: { type: 'string', description: 'What the agent is about to do' },
|
|
1039
|
-
type: {
|
|
1040
|
-
type: 'string',
|
|
1041
|
-
enum: ['implementation', 'security', 'architecture', 'process', 'general'],
|
|
1042
|
-
description: 'Type of action (default: general)',
|
|
1043
|
-
},
|
|
1044
|
-
context: { type: 'object', description: 'Optional metadata about the current situation' },
|
|
1045
|
-
previous_decision_id: { type: 'string', description: 'decision_id from previous think() call — auto-commits that session' },
|
|
1046
|
-
previous_success: { type: 'boolean', description: 'Did the previous action succeed?' },
|
|
1047
|
-
previous_outcome: { type: 'string', description: 'What happened in the previous action (required if previous_decision_id provided)' },
|
|
1048
|
-
checkLoop: { type: 'boolean', description: 'Enable loop detection: warns if you are about to retry a failed approach. Recommended: true.' },
|
|
1049
|
-
source_kind: {
|
|
1050
|
-
type: 'string',
|
|
1051
|
-
enum: ['human_directed', 'agent_autonomous', 'scheduled', 'integration', 'system', 'unknown'],
|
|
1052
|
-
description: 'Optional provenance source. Defaults to agent_autonomous for MCP calls.',
|
|
1053
|
-
},
|
|
1054
|
-
human_directed: { type: 'boolean', description: 'True only when the action is directly requested by the owner/user.' },
|
|
1055
|
-
instruction_ref: { type: 'string', description: 'Optional privacy-safe opaque reference. Dates, long digit runs, provider IDs, addresses, and domains are rejected locally; valid values are preserved exactly.' },
|
|
1056
|
-
source_meta: { type: 'object', description: 'Optional provenance metadata. PII and raw provider IDs are rejected by the API.' },
|
|
1057
|
-
},
|
|
1058
|
-
required: ['action'],
|
|
1059
|
-
},
|
|
1060
|
-
},
|
|
1061
|
-
{
|
|
1062
|
-
name: 'marrow_commit',
|
|
1063
|
-
description: 'Close a recorded action with success/failure, a specific outcome, and required proof. ' +
|
|
1064
|
-
'decision_id comes from marrow_think, marrow_auto, or a runtime that actually created a decision. ' +
|
|
1065
|
-
'Use the gate receipt from marrow_agent_runtime for consequential work. ' +
|
|
1066
|
-
'A held action closes trusted only after the server records its approval (the operator in the host\'s own prompt, or the account owner); never write or claim an approval in proof. ' +
|
|
1067
|
-
'The exact non-authorizing outcome_observation_only runtime correlation may submit an observed_unverified result, but is never sent as receipt evidence and never authorizes action or trusted learning. ' +
|
|
1068
|
-
'Only committed:true closes trusted outcome learning.',
|
|
1069
|
-
inputSchema: {
|
|
1070
|
-
type: 'object',
|
|
1071
|
-
properties: {
|
|
1072
|
-
decision_id: { type: 'string', description: 'decision_id from marrow_think, marrow_auto, or a runtime that created a decision' },
|
|
1073
|
-
success: { type: 'boolean', description: 'Did the action succeed?' },
|
|
1074
|
-
outcome: { type: 'string', description: 'What happened — be specific, this trains the hive' },
|
|
1075
|
-
caused_by: { type: 'string', description: 'Optional: what caused this action' },
|
|
1076
|
-
proof: {
|
|
1077
|
-
type: 'object',
|
|
1078
|
-
description: 'Optional required proof pack for gated work: summary, checks, outcome, blockers, commits_prs_shas, rollback_target, handoff_result_file, deployment_and_smoke.',
|
|
1079
|
-
},
|
|
1080
|
-
gate_receipt_id: { type: 'string', description: 'Canonical receipt id from marrow_agent_runtime.runtime_authorization.id for risky work.' },
|
|
1081
|
-
arbitration_receipt_id: { type: 'string', description: 'Required for arbitrated work: use marrow_arbitrate.arbitration.receipt_id from the same runtime response.' },
|
|
1082
|
-
owner_approval_receipt_id: { type: 'string', description: 'Single-use owner approval receipt that Marrow issued for this hold. Optional for an ordinary held gate receipt (the gate_receipt_id alone finds the recorded approval); required for review_required arbitration. Chat text is not an approval receipt.' },
|
|
1083
|
-
action: { type: 'string', description: 'Optional exact original action for post-action observation lookup. This lookup cannot renew execution authority.' },
|
|
1084
|
-
target: { type: 'string', description: 'Exact original target, if supplied when the decision was created.' },
|
|
1085
|
-
type: { type: 'string', description: 'Exact original action type for observation lookup; defaults to general.' },
|
|
1086
|
-
surfaces: { type: 'array', items: { type: 'string' }, description: 'Exact original surfaces for observation lookup; omitted and empty both mean no surfaces.' },
|
|
1087
|
-
auto_gate: { type: 'boolean', description: 'If true/default and action is provided, fetch runtime truth bound to this existing decision. Authorizing receipts preserve normal closure; exact outcome_observation_only correlation can submit only an observed_unverified result and is omitted from receipt evidence.' },
|
|
1088
|
-
model_usage: { type: 'object', properties: model_usage_1.MODEL_USAGE_EVIDENCE_PROPERTIES, additionalProperties: false, description: 'Optional compact token/cost/latency counts. Do not include raw prompts or completions.' },
|
|
1089
|
-
},
|
|
1090
|
-
required: ['decision_id', 'success', 'outcome'],
|
|
1091
|
-
},
|
|
1092
|
-
},
|
|
1093
|
-
{
|
|
1094
|
-
name: 'marrow_model_usage',
|
|
1095
|
-
description: 'Record compact model token usage for value proof. Use when the harness exposes provider/model token counts. Do not send raw prompts, completions, tool logs, secrets, or customer content.',
|
|
1096
|
-
inputSchema: {
|
|
1097
|
-
type: 'object',
|
|
1098
|
-
properties: {
|
|
1099
|
-
...model_usage_1.MODEL_USAGE_EVIDENCE_PROPERTIES,
|
|
1100
|
-
provider: { type: 'string', description: 'Model provider, e.g. openai, anthropic, google, xai, qwen, deepseek.' },
|
|
1101
|
-
model: { type: 'string', description: 'Model name.' },
|
|
1102
|
-
input_tokens: { type: 'number' },
|
|
1103
|
-
output_tokens: { type: 'number' },
|
|
1104
|
-
cached_tokens: { type: 'number' },
|
|
1105
|
-
total_tokens: { type: 'number' },
|
|
1106
|
-
cost_usd: { type: 'number' },
|
|
1107
|
-
latency_ms: { type: 'number' },
|
|
1108
|
-
task_type: { type: 'string' },
|
|
1109
|
-
action_type: { type: 'string' },
|
|
1110
|
-
marrow_intervention: { type: 'string', description: 'runtime_gate, risk_gate, prior_lesson, proof_pack, before_you_act, fleet_lesson, or other compact reason.' },
|
|
1111
|
-
estimated_tokens_saved: { type: 'number' },
|
|
1112
|
-
estimated_cost_saved_usd: { type: 'number' },
|
|
1113
|
-
estimated_minutes_saved: { type: 'number' },
|
|
1114
|
-
decision_id: { type: 'string' },
|
|
1115
|
-
workflow_id: { type: 'string' },
|
|
1116
|
-
success: { type: 'boolean' },
|
|
1117
|
-
},
|
|
1118
|
-
required: [],
|
|
1119
|
-
},
|
|
1120
|
-
},
|
|
1121
|
-
{
|
|
1122
|
-
name: 'marrow_run',
|
|
1123
|
-
description: 'Governed outcome capture. Records intent, obtains a gate for risky work, and closes only with an explicit measured result.',
|
|
1124
|
-
inputSchema: {
|
|
1125
|
-
type: 'object',
|
|
1126
|
-
properties: {
|
|
1127
|
-
description: { type: 'string', description: 'What the agent did' },
|
|
1128
|
-
success: { type: 'boolean', description: 'Whether it succeeded' },
|
|
1129
|
-
outcome: { type: 'string', description: 'One-line summary of what happened' },
|
|
1130
|
-
type: {
|
|
1131
|
-
type: 'string',
|
|
1132
|
-
enum: ['implementation', 'security', 'architecture', 'process', 'general'],
|
|
1133
|
-
description: 'Type of action (default: general)',
|
|
1134
|
-
},
|
|
1135
|
-
proof: { type: 'object', description: 'Measured evidence required to close high-risk work.' },
|
|
1136
|
-
gate_receipt_id: { type: 'string', description: 'Fresh receipt returned by marrow_agent_runtime.' },
|
|
1137
|
-
},
|
|
1138
|
-
required: ['description', 'success', 'outcome'],
|
|
1139
|
-
},
|
|
1140
|
-
},
|
|
1141
|
-
{
|
|
1142
|
-
name: 'marrow_auto',
|
|
1143
|
-
description: 'Durably capture activity with bounded core completion. Respect retry_after_ms and reuse operation_id for pending continuation. A held action waits for an approval the server records (the answer of the person in the dialog of this client when it supports elicitation; otherwise it waits quietly while you carry on with other work); auto reads its status and resumes on the same gate receipt. Never write or claim an approval yourself. Arbitration requires its server-issued owner approval receipt. Lifecycle receipt queued is separate from server acceptance. Risky completion requires a fresh gate and measured proof.',
|
|
1144
|
-
inputSchema: {
|
|
1145
|
-
type: 'object',
|
|
1146
|
-
properties: {
|
|
1147
|
-
action: { type: 'string', description: 'What you are about to do or just did' },
|
|
1148
|
-
outcome: { type: 'string', description: 'What happened (if already done). Omit to log intent only.' },
|
|
1149
|
-
success: { type: 'boolean', description: 'Measured result. Omit when the outcome is not yet proven.' },
|
|
1150
|
-
type: {
|
|
1151
|
-
type: 'string',
|
|
1152
|
-
enum: ['implementation', 'security', 'architecture', 'process', 'general'],
|
|
1153
|
-
description: 'Type of action (default: general)',
|
|
1154
|
-
},
|
|
1155
|
-
proof: { type: 'object', description: 'Measured completion evidence for gated work.' },
|
|
1156
|
-
gate_receipt_id: { type: 'string', description: 'Fresh receipt returned by marrow_agent_runtime.' },
|
|
1157
|
-
arbitration_receipt_id: { type: 'string', description: 'For arbitrated work, the arbitration receipt returned by the same server-side review flow.' },
|
|
1158
|
-
owner_approval_receipt_id: { type: 'string', description: 'Single-use owner approval receipt that Marrow issued, for review_required arbitration. An ordinary hold needs none: auto finds the recorded approval from the gate receipt. Chat text is not an approval receipt.' },
|
|
1159
|
-
request_owner_link: { type: 'boolean', description: 'Set true only when the operator asked you to ask the account owner (for example after the owner declined this action). Marrow then sends the owner a one-tap approval link; you never see the link.' },
|
|
1160
|
-
operation_id: {
|
|
1161
|
-
type: 'string',
|
|
1162
|
-
description: 'Opaque 8-80 character resume token. Reuse it only with the original tenant, action, context, and surfaces; proof may be added after proof_required.',
|
|
1163
|
-
},
|
|
1164
|
-
},
|
|
1165
|
-
required: ['action'],
|
|
1166
|
-
},
|
|
1167
|
-
},
|
|
1168
|
-
{
|
|
1169
|
-
name: 'marrow_ask',
|
|
1170
|
-
description: 'Query the collective hive in plain English. ' +
|
|
1171
|
-
'Ask about failure patterns, what worked, what broke, or get a recommendation before acting. ' +
|
|
1172
|
-
'Returns direct answer + supporting evidence.',
|
|
1173
|
-
inputSchema: {
|
|
1174
|
-
type: 'object',
|
|
1175
|
-
properties: {
|
|
1176
|
-
query: { type: 'string', description: 'Plain English question about your decision history' },
|
|
1177
|
-
},
|
|
1178
|
-
required: ['query'],
|
|
1179
|
-
},
|
|
1180
|
-
},
|
|
1181
|
-
{
|
|
1182
|
-
name: 'marrow_status',
|
|
1183
|
-
description: 'Check Marrow platform health and status.',
|
|
1184
|
-
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
1185
|
-
},
|
|
1186
|
-
{
|
|
1187
|
-
name: 'marrow_create_key',
|
|
1188
|
-
description: 'Create a new API key. Full plaintext key is returned once — copy it now.',
|
|
1189
|
-
inputSchema: {
|
|
1190
|
-
type: 'object',
|
|
1191
|
-
properties: {
|
|
1192
|
-
name: { type: 'string', description: 'Human-readable key name' },
|
|
1193
|
-
key_type: { type: 'string', enum: ['live', 'test'], description: 'Key type (default: live)' },
|
|
1194
|
-
scopes: { type: 'array', items: { type: 'string' }, description: 'Allowed scopes' },
|
|
1195
|
-
agent_ids: { type: 'array', items: { type: 'string' }, description: 'Optional agent bindings' },
|
|
1196
|
-
expires_at: { type: 'string', description: 'Optional ISO-8601 expiry' },
|
|
1197
|
-
},
|
|
1198
|
-
required: ['name'],
|
|
1199
|
-
},
|
|
1200
|
-
},
|
|
1201
|
-
{
|
|
1202
|
-
name: 'marrow_list_keys',
|
|
1203
|
-
description: 'List API keys. Keys are masked here by design.',
|
|
1204
|
-
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
1205
|
-
},
|
|
1206
|
-
{
|
|
1207
|
-
name: 'marrow_get_key',
|
|
1208
|
-
description: 'Get a single API key by ID. The key value is masked after creation.',
|
|
1209
|
-
inputSchema: {
|
|
1210
|
-
type: 'object',
|
|
1211
|
-
properties: {
|
|
1212
|
-
id: { type: 'string', description: 'API key ID' },
|
|
1213
|
-
},
|
|
1214
|
-
required: ['id'],
|
|
1215
|
-
},
|
|
1216
|
-
},
|
|
1217
|
-
{
|
|
1218
|
-
name: 'marrow_revoke_key',
|
|
1219
|
-
description: 'Revoke an API key by ID.',
|
|
1220
|
-
inputSchema: {
|
|
1221
|
-
type: 'object',
|
|
1222
|
-
properties: {
|
|
1223
|
-
id: { type: 'string', description: 'API key ID' },
|
|
1224
|
-
},
|
|
1225
|
-
required: ['id'],
|
|
1226
|
-
},
|
|
1227
|
-
},
|
|
1228
|
-
{
|
|
1229
|
-
name: 'marrow_rotate_key',
|
|
1230
|
-
description: 'Rotate an API key by ID. Full plaintext key is returned once — copy it now.',
|
|
1231
|
-
inputSchema: {
|
|
1232
|
-
type: 'object',
|
|
1233
|
-
properties: {
|
|
1234
|
-
id: { type: 'string', description: 'API key ID' },
|
|
1235
|
-
},
|
|
1236
|
-
required: ['id'],
|
|
1237
|
-
},
|
|
1238
|
-
},
|
|
1239
|
-
{
|
|
1240
|
-
name: 'marrow_list_memories',
|
|
1241
|
-
description: 'List memories with optional filters (status, query, limit, agent_id for shared memories).',
|
|
1242
|
-
inputSchema: {
|
|
1243
|
-
type: 'object',
|
|
1244
|
-
properties: {
|
|
1245
|
-
status: { type: 'string', enum: ['active', 'outdated', 'deleted'], description: 'Filter by status' },
|
|
1246
|
-
query: { type: 'string', description: 'Search query' },
|
|
1247
|
-
limit: { type: 'number', description: 'Max results (default: 20)' },
|
|
1248
|
-
agentId: { type: 'string', description: 'Agent ID for shared memories' },
|
|
1249
|
-
},
|
|
1250
|
-
required: [],
|
|
1251
|
-
},
|
|
1252
|
-
},
|
|
1253
|
-
{
|
|
1254
|
-
name: 'marrow_get_memory',
|
|
1255
|
-
description: 'Get a single memory by ID.',
|
|
1256
|
-
inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Memory ID' } }, required: ['id'] },
|
|
1257
|
-
},
|
|
1258
|
-
{
|
|
1259
|
-
name: 'marrow_update_memory',
|
|
1260
|
-
description: 'Update memory text, tags, or metadata.',
|
|
1261
|
-
inputSchema: {
|
|
1262
|
-
type: 'object',
|
|
1263
|
-
properties: {
|
|
1264
|
-
id: { type: 'string', description: 'Memory ID' },
|
|
1265
|
-
text: { type: 'string', description: 'New text' },
|
|
1266
|
-
source: { type: 'string', description: 'Source' },
|
|
1267
|
-
tags: { type: 'array', items: { type: 'string' }, description: 'Tags' },
|
|
1268
|
-
actor: { type: 'string', description: 'Actor name' },
|
|
1269
|
-
note: { type: 'string', description: 'Audit note' },
|
|
1270
|
-
},
|
|
1271
|
-
required: ['id'],
|
|
1272
|
-
},
|
|
1273
|
-
},
|
|
1274
|
-
{
|
|
1275
|
-
name: 'marrow_delete_memory',
|
|
1276
|
-
description: 'Soft delete a memory.',
|
|
1277
|
-
inputSchema: {
|
|
1278
|
-
type: 'object',
|
|
1279
|
-
properties: {
|
|
1280
|
-
id: { type: 'string', description: 'Memory ID' },
|
|
1281
|
-
actor: { type: 'string', description: 'Actor name' },
|
|
1282
|
-
note: { type: 'string', description: 'Audit note' },
|
|
1283
|
-
},
|
|
1284
|
-
required: ['id'],
|
|
1285
|
-
},
|
|
1286
|
-
},
|
|
1287
|
-
{
|
|
1288
|
-
name: 'marrow_mark_outdated',
|
|
1289
|
-
description: 'Mark a memory as outdated.',
|
|
1290
|
-
inputSchema: {
|
|
1291
|
-
type: 'object',
|
|
1292
|
-
properties: {
|
|
1293
|
-
id: { type: 'string', description: 'Memory ID' },
|
|
1294
|
-
actor: { type: 'string', description: 'Actor name' },
|
|
1295
|
-
note: { type: 'string', description: 'Audit note' },
|
|
1296
|
-
},
|
|
1297
|
-
required: ['id'],
|
|
1298
|
-
},
|
|
1299
|
-
},
|
|
1300
|
-
{
|
|
1301
|
-
name: 'marrow_supersede_memory',
|
|
1302
|
-
description: 'Atomically replace a memory with a new version.',
|
|
1303
|
-
inputSchema: {
|
|
1304
|
-
type: 'object',
|
|
1305
|
-
properties: {
|
|
1306
|
-
id: { type: 'string', description: 'Memory ID to supersede' },
|
|
1307
|
-
text: { type: 'string', description: 'New memory text' },
|
|
1308
|
-
source: { type: 'string', description: 'Source' },
|
|
1309
|
-
tags: { type: 'array', items: { type: 'string' }, description: 'Tags' },
|
|
1310
|
-
actor: { type: 'string', description: 'Actor name' },
|
|
1311
|
-
note: { type: 'string', description: 'Audit note' },
|
|
1312
|
-
},
|
|
1313
|
-
required: ['id', 'text'],
|
|
1314
|
-
},
|
|
1315
|
-
},
|
|
1316
|
-
{
|
|
1317
|
-
name: 'marrow_share_memory',
|
|
1318
|
-
description: 'Share a memory with specific agents.',
|
|
1319
|
-
inputSchema: {
|
|
1320
|
-
type: 'object',
|
|
1321
|
-
properties: {
|
|
1322
|
-
id: { type: 'string', description: 'Memory ID' },
|
|
1323
|
-
agentIds: { type: 'array', items: { type: 'string' }, description: 'Agent IDs to share with' },
|
|
1324
|
-
actor: { type: 'string', description: 'Actor name' },
|
|
1325
|
-
},
|
|
1326
|
-
required: ['id', 'agentIds'],
|
|
1327
|
-
},
|
|
1328
|
-
},
|
|
1329
|
-
{
|
|
1330
|
-
name: 'marrow_export_memories',
|
|
1331
|
-
description: 'Export memories to JSON or CSV.',
|
|
1332
|
-
inputSchema: {
|
|
1333
|
-
type: 'object',
|
|
1334
|
-
properties: {
|
|
1335
|
-
format: { type: 'string', enum: ['json', 'csv'], description: 'Export format' },
|
|
1336
|
-
status: { type: 'string', enum: ['active', 'all'], description: 'Filter by status' },
|
|
1337
|
-
tags: { type: 'string', description: 'Comma-separated tags' },
|
|
1338
|
-
},
|
|
1339
|
-
required: [],
|
|
1340
|
-
},
|
|
1341
|
-
},
|
|
1342
|
-
{
|
|
1343
|
-
name: 'marrow_import_memories',
|
|
1344
|
-
description: 'Import memories with merge (dedup) or replace mode.',
|
|
1345
|
-
inputSchema: {
|
|
1346
|
-
type: 'object',
|
|
1347
|
-
properties: {
|
|
1348
|
-
memories: { type: 'array', items: { type: 'object', properties: { text: { type: 'string' }, source: { type: 'string' }, tags: { type: 'array', items: { type: 'string' } } } }, description: 'Memories to import' },
|
|
1349
|
-
mode: { type: 'string', enum: ['merge', 'replace'], description: 'Import mode' },
|
|
1350
|
-
},
|
|
1351
|
-
required: ['memories', 'mode'],
|
|
1352
|
-
},
|
|
1353
|
-
},
|
|
1354
|
-
{
|
|
1355
|
-
name: 'marrow_retrieve_memories',
|
|
1356
|
-
description: 'Full-text search memories with filters (from, to, tags, source, status, shared).',
|
|
1357
|
-
inputSchema: {
|
|
1358
|
-
type: 'object',
|
|
1359
|
-
properties: {
|
|
1360
|
-
query: { type: 'string', description: 'Search query' },
|
|
1361
|
-
limit: { type: 'number', description: 'Max results' },
|
|
1362
|
-
from: { type: 'string', description: 'From date (ISO-8601)' },
|
|
1363
|
-
to: { type: 'string', description: 'To date (ISO-8601)' },
|
|
1364
|
-
tags: { type: 'string', description: 'Comma-separated tags' },
|
|
1365
|
-
source: { type: 'string', description: 'Source filter' },
|
|
1366
|
-
status: { type: 'string', enum: ['active', 'outdated', 'deleted'], description: 'Status filter' },
|
|
1367
|
-
shared: { type: 'boolean', description: 'Include shared memories' },
|
|
1368
|
-
},
|
|
1369
|
-
required: ['query'],
|
|
1370
|
-
},
|
|
1371
|
-
},
|
|
1372
|
-
{
|
|
1373
|
-
name: 'marrow_workflow',
|
|
1374
|
-
description: 'Interact with Marrow Workflow Registry. Register, start, and advance multi-step workflows. ' +
|
|
1375
|
-
'Actions: register (create workflow template), list (show all), get (details), start (begin instance), ' +
|
|
1376
|
-
'advance (complete a step), instances (list runs).',
|
|
1377
|
-
inputSchema: {
|
|
1378
|
-
type: 'object',
|
|
1379
|
-
properties: {
|
|
1380
|
-
action: { type: 'string', enum: ['register', 'list', 'get', 'update', 'start', 'advance', 'instances'], description: 'Workflow action to perform' },
|
|
1381
|
-
workflowId: { type: 'string', description: 'Workflow ID (required for get/start/advance/instances)' },
|
|
1382
|
-
instanceId: { type: 'string', description: 'Instance ID (required for advance)' },
|
|
1383
|
-
name: { type: 'string', description: 'Workflow name (for register)' },
|
|
1384
|
-
description: { type: 'string', description: 'Workflow description (for register/update)' },
|
|
1385
|
-
steps: { type: 'array', description: 'Step definitions (for register)', items: { type: 'object', properties: { step: { type: 'number', description: 'Step order (1, 2, 3...)' }, agent_role: { type: 'string', description: 'Expected agent role (e.g., "builder", "auditor")' }, action_type: { type: 'string', description: 'Action type (e.g., "build", "audit", "patch")' }, description: { type: 'string', description: 'Step description' } }, required: ['step', 'description'] } },
|
|
1386
|
-
tags: { type: 'array', items: { type: 'string' }, description: 'Tags (for register)' },
|
|
1387
|
-
agentId: { type: 'string', description: 'Agent ID starting the workflow (for start)' },
|
|
1388
|
-
context: { type: 'object', description: 'Workflow context (for start)' },
|
|
1389
|
-
inputs: { type: 'object', description: 'Workflow inputs (for start)' },
|
|
1390
|
-
stepCompleted: { type: 'number', description: 'Step number completed (for advance)' },
|
|
1391
|
-
outcome: { type: 'string', description: 'Step outcome (for advance)' },
|
|
1392
|
-
nextAgentId: { type: 'string', description: 'Next agent for the following step (for advance)' },
|
|
1393
|
-
contextUpdate: { type: 'object', description: 'Context changes (for advance)' },
|
|
1394
|
-
status: { type: 'string', enum: ['running', 'completed', 'failed', 'cancelled', 'active', 'archived'], description: 'Filter by status (for list/instances)' },
|
|
1395
|
-
},
|
|
1396
|
-
required: ['action'],
|
|
1397
|
-
},
|
|
1398
|
-
},
|
|
1399
|
-
{
|
|
1400
|
-
name: 'marrow_dashboard',
|
|
1401
|
-
description: 'Get operator dashboard — account health, top failures, workflow status, recent activity, Marrow\'s saves metric. ' +
|
|
1402
|
-
'One call returns everything an operator needs to see.',
|
|
1403
|
-
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
1404
|
-
},
|
|
1405
|
-
{
|
|
1406
|
-
name: 'marrow_digest',
|
|
1407
|
-
description: 'Get periodic summary of agent activity and Marrow impact (default 7-day period). ' +
|
|
1408
|
-
'Shows decision counts, success rate trend vs previous period, saves, top improvements and risks.',
|
|
1409
|
-
inputSchema: {
|
|
1410
|
-
type: 'object',
|
|
1411
|
-
properties: {
|
|
1412
|
-
period: { type: 'string', description: 'Time period: 7d (default), 14d, or 30d' },
|
|
1413
|
-
},
|
|
1414
|
-
required: [],
|
|
1415
|
-
},
|
|
1416
|
-
},
|
|
1417
|
-
{
|
|
1418
|
-
name: 'marrow_agent_status',
|
|
1419
|
-
description: 'Check whether Marrow is passively active for this agent or fleet. ' +
|
|
1420
|
-
'Returns connected state, signal quality, non-sensitive proof, and next actions. ' +
|
|
1421
|
-
'Use at session start or before owner reporting to prove Marrow is working without a dashboard.',
|
|
1422
|
-
inputSchema: {
|
|
1423
|
-
type: 'object',
|
|
1424
|
-
properties: {
|
|
1425
|
-
period: { type: 'string', description: 'Time period: 7d (default), 14d, or 30d' },
|
|
1426
|
-
agentId: { type: 'string', description: 'Optional agent_id/session_id filter. Defaults to the canonical fleet-bound agent identity.' },
|
|
1427
|
-
},
|
|
1428
|
-
required: [],
|
|
1429
|
-
},
|
|
1430
|
-
},
|
|
1431
|
-
{
|
|
1432
|
-
name: 'marrow_runtime_status',
|
|
1433
|
-
description: 'Read live Marrow runtime hook diagnostics from /v1/agent/status. ' +
|
|
1434
|
-
'Use this when an agent needs exact passive hook, token-capture, outcome-closure, client-update, and repair-command status.',
|
|
1435
|
-
inputSchema: {
|
|
1436
|
-
type: 'object',
|
|
1437
|
-
properties: {
|
|
1438
|
-
fast: { type: 'boolean', description: 'Use fast cached summary path when available. Defaults to true.' },
|
|
1439
|
-
},
|
|
1440
|
-
required: [],
|
|
1441
|
-
},
|
|
1442
|
-
},
|
|
1443
|
-
{
|
|
1444
|
-
name: 'marrow_value_report',
|
|
1445
|
-
description: 'Get owner-ready proof of Marrow value for this agent or fleet. ' +
|
|
1446
|
-
'Returns summary, decision metrics, saves, active agents, top risks, recommendations, and improvement data without raw decision text.',
|
|
1447
|
-
inputSchema: {
|
|
1448
|
-
type: 'object',
|
|
1449
|
-
properties: {
|
|
1450
|
-
period: { type: 'string', description: 'Time period: 7d (default), 14d, 30d, or a day count up to 90.' },
|
|
1451
|
-
agentId: { type: 'string', description: 'Optional agent_id/session_id filter. Defaults to the canonical fleet-bound agent identity.' },
|
|
1452
|
-
},
|
|
1453
|
-
required: [],
|
|
1454
|
-
},
|
|
1455
|
-
},
|
|
1456
|
-
{
|
|
1457
|
-
name: 'marrow_decision_brief',
|
|
1458
|
-
description: 'One pre-action call before meaningful or risky work. Returns risk level, workflow/playbook steps, ' +
|
|
1459
|
-
'handoff requirements, freshness/source-of-truth checks, minimum verification checks, proof-pack fields, ' +
|
|
1460
|
-
'and next actions. Use this before deploys, publishes, merges, audits, patches, secret changes, or production work.',
|
|
1461
|
-
inputSchema: {
|
|
1462
|
-
type: 'object',
|
|
1463
|
-
properties: {
|
|
1464
|
-
action: { type: 'string', description: 'What the agent is about to do.' },
|
|
1465
|
-
type: { type: 'string', description: 'Decision type, e.g. deploy, audit, patch, review.' },
|
|
1466
|
-
role: { type: 'string', description: 'Agent role/playbook: deploy, audit, patch, review, or general.' },
|
|
1467
|
-
agentId: { type: 'string', description: 'Optional agent_id filter. Defaults to the canonical fleet-bound agent identity.' },
|
|
1468
|
-
sessionId: { type: 'string', description: 'Optional session id. Defaults to MARROW_SESSION_ID.' },
|
|
1469
|
-
surfaces: {
|
|
1470
|
-
type: 'array',
|
|
1471
|
-
items: { type: 'string' },
|
|
1472
|
-
description: 'Surfaces to keep current, e.g. github, npm, docs, production, secrets.',
|
|
1473
|
-
},
|
|
1474
|
-
period: { type: 'number', description: 'Lookback period in days, default 7, max 90.' },
|
|
1475
|
-
},
|
|
1476
|
-
required: ['action'],
|
|
1477
|
-
},
|
|
1478
|
-
},
|
|
1479
|
-
{
|
|
1480
|
-
name: 'marrow_first_value',
|
|
1481
|
-
description: 'First-run Marrow value proof. Returns what is captured, whether outcome closure/runtime gate are active, ' +
|
|
1482
|
-
'a plain-English first useful lesson, and a five-minute try-this-now prompt for agents and owners.',
|
|
1483
|
-
inputSchema: {
|
|
1484
|
-
type: 'object',
|
|
1485
|
-
properties: {
|
|
1486
|
-
action: { type: 'string', description: 'Optional action to test. Defaults to a production deploy safety prompt.' },
|
|
1487
|
-
type: { type: 'string', description: 'Decision type, e.g. deploy, audit, patch, review.' },
|
|
1488
|
-
role: { type: 'string', description: 'Agent role/playbook: deploy, audit, patch, review, or general.' },
|
|
1489
|
-
agentId: { type: 'string', description: 'Optional agent_id filter. Defaults to the canonical fleet-bound agent identity.' },
|
|
1490
|
-
sessionId: { type: 'string', description: 'Optional session id. Defaults to MARROW_SESSION_ID.' },
|
|
1491
|
-
surfaces: { type: 'array', items: { type: 'string' }, description: 'Surfaces to test, e.g. production, deploy, github, npm.' },
|
|
1492
|
-
context: { type: 'object', description: 'Optional non-sensitive metadata.' },
|
|
1493
|
-
proof: { type: 'object', description: 'Optional proof fields already collected.' },
|
|
1494
|
-
},
|
|
1495
|
-
required: [],
|
|
1496
|
-
},
|
|
1497
|
-
},
|
|
1498
|
-
{
|
|
1499
|
-
name: 'marrow_agent_runtime',
|
|
1500
|
-
description: 'One-call agent-native Marrow loop. Returns passive status, decision brief, risk gate, relevant lessons, ' +
|
|
1501
|
-
'template suggestion, required proof pack, before-you-act instruction, and exact next action. ' +
|
|
1502
|
-
'Its runtime_authorization is the authoritative gate receipt; it returns decision_id only when runtime actually creates a decision. ' +
|
|
1503
|
-
'Reuse its server-created decision_id for outcome closure; use marrow_auto or marrow_think only when the completion contract requires decision creation. ' +
|
|
1504
|
-
'A review_required hold does not permit the action: wait until the server records an approval, then commit with the same gate receipt. ' +
|
|
1505
|
-
'Use this before meaningful work when you want Marrow to guide the whole action in one call.',
|
|
1506
|
-
inputSchema: {
|
|
1507
|
-
type: 'object',
|
|
1508
|
-
properties: {
|
|
1509
|
-
action: { type: 'string', description: 'What the agent is about to do.' },
|
|
1510
|
-
type: { type: 'string', description: 'Decision type, e.g. deploy, audit, patch, review.' },
|
|
1511
|
-
role: { type: 'string', description: 'Agent role/playbook: deploy, audit, patch, review, or general.' },
|
|
1512
|
-
agentId: { type: 'string', description: 'Optional agent_id filter. Defaults to the canonical fleet-bound agent identity.' },
|
|
1513
|
-
sessionId: { type: 'string', description: 'Optional session id. Defaults to MARROW_SESSION_ID.' },
|
|
1514
|
-
surfaces: {
|
|
1515
|
-
type: 'array',
|
|
1516
|
-
items: { type: 'string' },
|
|
1517
|
-
description: 'Surfaces to keep current, e.g. github, npm, docs, production, secrets.',
|
|
1518
|
-
},
|
|
1519
|
-
context: { type: 'object', description: 'Optional non-sensitive metadata.' },
|
|
1520
|
-
proof: { type: 'object', description: 'Optional proof fields already collected, such as checks, rollback_target, smoke_result.' },
|
|
1521
|
-
period: { type: 'number', description: 'Lookback period in days, default 7, max 90.' },
|
|
1522
|
-
},
|
|
1523
|
-
required: ['action'],
|
|
1524
|
-
},
|
|
1525
|
-
},
|
|
1526
|
-
{
|
|
1527
|
-
name: 'marrow_arbitrate',
|
|
1528
|
-
description: 'Resolve conflicting next-step proposals from two or more tenant agents before execution. ' +
|
|
1529
|
-
'Uses the existing Marrow runtime gate and returns a durable arbitration receipt with the selected, ' +
|
|
1530
|
-
'synthesized, review-required, or blocked action and exactly why it changed.',
|
|
1531
|
-
inputSchema: {
|
|
1532
|
-
type: 'object',
|
|
1533
|
-
properties: {
|
|
1534
|
-
objective: { type: 'string', description: 'The shared owner or workflow objective.' },
|
|
1535
|
-
ownerIntent: { type: 'string', description: 'Optional bounded owner intent used for deterministic alignment.' },
|
|
1536
|
-
conflictType: {
|
|
1537
|
-
type: 'string',
|
|
1538
|
-
enum: ['action_conflict', 'policy_conflict', 'evidence_conflict', 'authority_conflict', 'risk_conflict'],
|
|
1539
|
-
},
|
|
1540
|
-
proposals: {
|
|
1541
|
-
type: 'array',
|
|
1542
|
-
minItems: 2,
|
|
1543
|
-
maxItems: 8,
|
|
1544
|
-
items: {
|
|
1545
|
-
type: 'object',
|
|
1546
|
-
properties: {
|
|
1547
|
-
proposal_id: { type: 'string', description: 'Stable opaque proposal id.' },
|
|
1548
|
-
agent_id: { type: 'string', description: 'Existing agent id in this Marrow account.' },
|
|
1549
|
-
action: { type: 'string', description: 'Proposed next action.' },
|
|
1550
|
-
rationale: { type: 'string', description: 'Optional concise rationale; redacted before transport.' },
|
|
1551
|
-
confidence: { type: 'number', minimum: 0, maximum: 1 },
|
|
1552
|
-
risk_level: { type: 'string', enum: ['low', 'medium', 'high'] },
|
|
1553
|
-
requires_owner_approval: { type: 'boolean' },
|
|
1554
|
-
evidence: {
|
|
1555
|
-
type: 'array',
|
|
1556
|
-
maxItems: 8,
|
|
1557
|
-
items: {
|
|
1558
|
-
type: 'object',
|
|
1559
|
-
properties: {
|
|
1560
|
-
kind: { type: 'string' },
|
|
1561
|
-
reference: { type: 'string', description: 'Opaque identifier only; no URL, path, or raw evidence.' },
|
|
1562
|
-
},
|
|
1563
|
-
required: ['kind', 'reference'],
|
|
1564
|
-
},
|
|
1565
|
-
},
|
|
1566
|
-
},
|
|
1567
|
-
required: ['proposal_id', 'agent_id', 'action'],
|
|
1568
|
-
},
|
|
1569
|
-
},
|
|
1570
|
-
action: { type: 'string', description: 'Optional runtime action label.' },
|
|
1571
|
-
type: { type: 'string', description: 'Optional runtime action type. Defaults to coordination.' },
|
|
1572
|
-
agentId: { type: 'string', description: 'Requesting agent id. Defaults to the canonical fleet-bound agent identity.' },
|
|
1573
|
-
sessionId: { type: 'string', description: 'Optional workflow session id.' },
|
|
1574
|
-
surfaces: { type: 'array', items: { type: 'string' } },
|
|
1575
|
-
context: { type: 'object', description: 'Optional non-sensitive runtime metadata.' },
|
|
1576
|
-
proof: { type: 'object', description: 'Optional proof already available to the runtime gate.' },
|
|
1577
|
-
},
|
|
1578
|
-
required: ['objective', 'proposals'],
|
|
1579
|
-
},
|
|
1580
|
-
},
|
|
1581
|
-
{
|
|
1582
|
-
name: 'marrow_coordinate',
|
|
1583
|
-
description: 'Coordinate tenant agents without sharing transcripts. Acquire or release a bounded resource lease, ' +
|
|
1584
|
-
'list current leases, or create/list compact evidence-backed child proof packets for a parent agent.',
|
|
1585
|
-
inputSchema: {
|
|
1586
|
-
type: 'object',
|
|
1587
|
-
properties: {
|
|
1588
|
-
action: {
|
|
1589
|
-
type: 'string',
|
|
1590
|
-
enum: ['list_leases', 'acquire_lease', 'release_lease', 'list_proof_packets', 'create_proof_packet'],
|
|
1591
|
-
},
|
|
1592
|
-
resource_type: { type: 'string', enum: ['file', 'directory', 'service', 'workflow', 'deployment', 'custom'] },
|
|
1593
|
-
resource: { type: 'string', maxLength: 160, description: 'Bounded tenant-visible resource label. Do not send secrets.' },
|
|
1594
|
-
workflow_id: { type: 'string' },
|
|
1595
|
-
ttl_seconds: { type: 'number', minimum: 30, maximum: 3600 },
|
|
1596
|
-
lease_id: { type: 'string' },
|
|
1597
|
-
lease_token: { type: 'string', description: 'One-time lease capability returned by acquire_lease.' },
|
|
1598
|
-
status: { type: 'string', enum: ['active', 'released', 'expired', 'incomplete', 'complete', 'failed'] },
|
|
1599
|
-
limit: { type: 'number', minimum: 1, maximum: 100 },
|
|
1600
|
-
decision_id: { type: 'string' },
|
|
1601
|
-
proof_pack_id: { type: 'string' },
|
|
1602
|
-
summary: { type: 'string', maxLength: 280, description: 'Compact result summary; no raw transcript.' },
|
|
1603
|
-
evidence_refs: {
|
|
1604
|
-
type: 'array', maxItems: 20, items: { type: 'string' },
|
|
1605
|
-
description: 'Opaque durable evidence identifiers only.',
|
|
1606
|
-
},
|
|
1607
|
-
},
|
|
1608
|
-
required: ['action'],
|
|
1609
|
-
},
|
|
1610
|
-
},
|
|
1611
|
-
{
|
|
1612
|
-
name: 'marrow_replay_compare',
|
|
1613
|
-
description: 'Compare two already-recorded outcomes for the same tenant task using durable proof. ' +
|
|
1614
|
-
'This does not run a model or replay customer content; it returns complete or insufficient_evidence.',
|
|
1615
|
-
inputSchema: {
|
|
1616
|
-
type: 'object',
|
|
1617
|
-
additionalProperties: false,
|
|
1618
|
-
properties: {
|
|
1619
|
-
comparison_id: { type: 'string', minLength: 1, description: 'Fetch a prior replay comparison by id.' },
|
|
1620
|
-
source_decision_id: {
|
|
1621
|
-
type: 'string', minLength: 1, maxLength: 128, pattern: '^[A-Za-z0-9._:-]{1,128}$',
|
|
1622
|
-
description: 'Original task decision used to bind the comparison.',
|
|
1623
|
-
},
|
|
1624
|
-
workspace_binding_id: {
|
|
1625
|
-
type: 'string', minLength: 34, maxLength: 34, pattern: '^workspace_[a-f0-9]{24}$',
|
|
1626
|
-
description: 'Optional privacy-safe workspace binding from runtime.',
|
|
1627
|
-
},
|
|
1628
|
-
constraints: {
|
|
1629
|
-
type: 'object',
|
|
1630
|
-
additionalProperties: false,
|
|
1631
|
-
maxProperties: 7,
|
|
1632
|
-
description: 'Allowlisted comparison labels only; prompts, code, transcripts, credentials, and nested content are rejected.',
|
|
1633
|
-
properties: {
|
|
1634
|
-
environment: { type: 'string', maxLength: 80 },
|
|
1635
|
-
tests: { type: 'string', maxLength: 80 },
|
|
1636
|
-
policy_profile_id: { type: 'string', maxLength: 80 },
|
|
1637
|
-
workflow_type: { type: 'string', maxLength: 80 },
|
|
1638
|
-
task_type: { type: 'string', maxLength: 80 },
|
|
1639
|
-
required_proof: { type: 'boolean' },
|
|
1640
|
-
same_workspace: { type: 'boolean' },
|
|
1641
|
-
},
|
|
1642
|
-
},
|
|
1643
|
-
baseline: {
|
|
1644
|
-
type: 'object',
|
|
1645
|
-
additionalProperties: false,
|
|
1646
|
-
maxProperties: 2,
|
|
1647
|
-
properties: {
|
|
1648
|
-
label: { type: 'string', minLength: 1, maxLength: 80, pattern: '^[A-Za-z0-9._:-]{1,80}$' },
|
|
1649
|
-
decision_id: { type: 'string', minLength: 1, maxLength: 128, pattern: '^[A-Za-z0-9._:-]{1,128}$' },
|
|
1650
|
-
},
|
|
1651
|
-
required: ['decision_id'],
|
|
1652
|
-
},
|
|
1653
|
-
candidate: {
|
|
1654
|
-
type: 'object',
|
|
1655
|
-
additionalProperties: false,
|
|
1656
|
-
maxProperties: 2,
|
|
1657
|
-
properties: {
|
|
1658
|
-
label: { type: 'string', minLength: 1, maxLength: 80, pattern: '^[A-Za-z0-9._:-]{1,80}$' },
|
|
1659
|
-
decision_id: { type: 'string', minLength: 1, maxLength: 128, pattern: '^[A-Za-z0-9._:-]{1,128}$' },
|
|
1660
|
-
},
|
|
1661
|
-
required: ['decision_id'],
|
|
1662
|
-
},
|
|
1663
|
-
},
|
|
1664
|
-
oneOf: [
|
|
1665
|
-
{
|
|
1666
|
-
required: ['comparison_id'],
|
|
1667
|
-
not: {
|
|
1668
|
-
anyOf: [
|
|
1669
|
-
{ required: ['source_decision_id'] },
|
|
1670
|
-
{ required: ['workspace_binding_id'] },
|
|
1671
|
-
{ required: ['constraints'] },
|
|
1672
|
-
{ required: ['baseline'] },
|
|
1673
|
-
{ required: ['candidate'] },
|
|
1674
|
-
],
|
|
1675
|
-
},
|
|
1676
|
-
},
|
|
1677
|
-
{
|
|
1678
|
-
required: ['source_decision_id', 'baseline', 'candidate'],
|
|
1679
|
-
not: { required: ['comparison_id'] },
|
|
1680
|
-
},
|
|
1681
|
-
],
|
|
1682
|
-
},
|
|
1683
|
-
},
|
|
1684
|
-
{
|
|
1685
|
-
name: 'marrow_governance_control_plane',
|
|
1686
|
-
description: 'Return Marrow control-plane proof: governance, runtime gates, proof packs, fleet intelligence, supported harnesses, and exact next action.',
|
|
1687
|
-
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
1688
|
-
},
|
|
1689
|
-
{
|
|
1690
|
-
name: 'marrow_hermes_integration',
|
|
1691
|
-
description: 'Return the Hermes Agent integration guide mapping /goal, verification evidence, /learn, /journey, and background subagents into Marrow proof and outcome workflows.',
|
|
1692
|
-
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
1693
|
-
},
|
|
1694
|
-
{
|
|
1695
|
-
name: 'marrow_completion_contracts',
|
|
1696
|
-
description: 'List Marrow completion contracts for deploy, merge, publish, database migration, security change, support response, and Hermes goal workflows.',
|
|
1697
|
-
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
1698
|
-
},
|
|
1699
|
-
{
|
|
1700
|
-
name: 'marrow_evaluate_completion_contract',
|
|
1701
|
-
description: 'Evaluate whether an agent has enough proof to mark work complete. Returns complete, missing_proof, review_required, or blocked with missing proof fields.',
|
|
1702
|
-
inputSchema: {
|
|
1703
|
-
type: 'object',
|
|
1704
|
-
properties: {
|
|
1705
|
-
action: { type: 'string', description: 'Action/workflow being completed, e.g. deploy, publish, db_migration, hermes_goal.' },
|
|
1706
|
-
workflow_type: { type: 'string', description: 'Optional workflow type if action is not supplied.' },
|
|
1707
|
-
risk_level: { type: 'string', enum: ['low', 'medium', 'high'], description: 'Optional risk override.' },
|
|
1708
|
-
evidence: { type: 'object', description: 'Non-sensitive proof fields already collected.' },
|
|
1709
|
-
},
|
|
1710
|
-
required: [],
|
|
1711
|
-
},
|
|
1712
|
-
},
|
|
1713
|
-
{
|
|
1714
|
-
name: 'marrow_governance_timeline',
|
|
1715
|
-
description: 'Return the recent fleet governance timeline across decisions, risk gates, and proof-pack events.',
|
|
1716
|
-
inputSchema: {
|
|
1717
|
-
type: 'object',
|
|
1718
|
-
properties: {
|
|
1719
|
-
agentId: { type: 'string', description: 'Optional agent filter. Defaults to the canonical fleet-bound agent identity.' },
|
|
1720
|
-
limit: { type: 'number', description: 'Max events to return, default 25, max 100.' },
|
|
1721
|
-
},
|
|
1722
|
-
required: [],
|
|
1723
|
-
},
|
|
1724
|
-
},
|
|
1725
|
-
{
|
|
1726
|
-
name: 'marrow_decision_trace',
|
|
1727
|
-
description: 'Inspect the tenant-scoped path behind one governed decision and return its owner-readable intervention receipt with gate, required workflow, permit follow-through, proof, and observed outcome.',
|
|
1728
|
-
inputSchema: {
|
|
1729
|
-
type: 'object',
|
|
1730
|
-
properties: {
|
|
1731
|
-
decisionId: { type: 'string', description: 'Decision ID owned by this account and agent scope.' },
|
|
1732
|
-
},
|
|
1733
|
-
required: ['decisionId'],
|
|
1734
|
-
},
|
|
1735
|
-
},
|
|
1736
|
-
{
|
|
1737
|
-
name: 'marrow_buyer_proof',
|
|
1738
|
-
description: 'Return buyer-grade value proof: failures avoided, risky actions reviewed, proofs completed, token/time saved, failure classes, agent leaderboard, and reliability score.',
|
|
1739
|
-
inputSchema: {
|
|
1740
|
-
type: 'object',
|
|
1741
|
-
properties: {
|
|
1742
|
-
agentId: { type: 'string', description: 'Optional agent filter. Defaults to the canonical fleet-bound agent identity.' },
|
|
1743
|
-
periodDays: { type: 'number', description: 'Lookback period in days, default 30, max 90.' },
|
|
1744
|
-
},
|
|
1745
|
-
required: [],
|
|
1746
|
-
},
|
|
1747
|
-
},
|
|
1748
|
-
{
|
|
1749
|
-
name: 'marrow_mode_recommend',
|
|
1750
|
-
description: 'Recommend passive, pilot, or enforce mode from project/workflow signals. Marrow never auto-switches here; the agent/user must accept or override.',
|
|
1751
|
-
inputSchema: {
|
|
1752
|
-
type: 'object',
|
|
1753
|
-
properties: {
|
|
1754
|
-
project: { type: 'object', description: 'Project signals: name, type, frameworks, signals, package_scripts, config_files.' },
|
|
1755
|
-
workflow: { type: 'object', description: 'Workflow context: action, type, branch, environment.' },
|
|
1756
|
-
agent: { type: 'object', description: 'Agent context: id and role.' },
|
|
1757
|
-
selected_mode: { type: 'string', enum: ['passive', 'pilot', 'enforce'], description: 'Optional final user-selected mode to log.' },
|
|
1758
|
-
selection_source: { type: 'string', enum: ['accepted', 'overridden', 'ignored', 'system'], description: 'How the final mode was selected.' },
|
|
1759
|
-
},
|
|
1760
|
-
required: [],
|
|
1761
|
-
},
|
|
1762
|
-
},
|
|
1763
|
-
{
|
|
1764
|
-
name: 'marrow_policy_profiles',
|
|
1765
|
-
description: 'List saved Marrow governance policy profiles for this account. Returns default-business when none are saved.',
|
|
1766
|
-
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
1767
|
-
},
|
|
1768
|
-
{
|
|
1769
|
-
name: 'marrow_create_policy_profile',
|
|
1770
|
-
description: 'Create or update an explicit governance policy profile. Mutating call; requires a key with full scope.',
|
|
1771
|
-
inputSchema: {
|
|
1772
|
-
type: 'object',
|
|
1773
|
-
properties: {
|
|
1774
|
-
name: { type: 'string', description: 'Profile name, e.g. default-business or production-agents.' },
|
|
1775
|
-
description: { type: 'string', description: 'Optional profile description.' },
|
|
1776
|
-
rules: { type: 'array', items: { type: 'object' }, description: 'Rules with match fields and mode passive/pilot/enforce.' },
|
|
1777
|
-
},
|
|
1778
|
-
required: ['name'],
|
|
1779
|
-
},
|
|
1780
|
-
},
|
|
1781
|
-
{
|
|
1782
|
-
name: 'marrow_assign_project_policy_profile',
|
|
1783
|
-
description: 'Assign an active governance policy profile to a project key. Mutating call; requires a key with full scope.',
|
|
1784
|
-
inputSchema: {
|
|
1785
|
-
type: 'object',
|
|
1786
|
-
properties: {
|
|
1787
|
-
project_key: { type: 'string', description: 'Stable project key, e.g. marrow-api or clinic-api.' },
|
|
1788
|
-
profile_id: { type: 'string', description: 'Active policy profile id.' },
|
|
1789
|
-
},
|
|
1790
|
-
required: ['project_key', 'profile_id'],
|
|
1791
|
-
},
|
|
1792
|
-
},
|
|
1793
|
-
{
|
|
1794
|
-
name: 'marrow_policy_resolve',
|
|
1795
|
-
description: 'Resolve the explicit mode for a project/workflow from saved policy profiles, falling back to recommendation. Does not auto-apply.',
|
|
1796
|
-
inputSchema: {
|
|
1797
|
-
type: 'object',
|
|
1798
|
-
properties: {
|
|
1799
|
-
profile_id: { type: 'string', description: 'Optional policy profile id.' },
|
|
1800
|
-
profile_name: { type: 'string', description: 'Optional policy profile name.' },
|
|
1801
|
-
project: { type: 'object', description: 'Project signals: name, type, frameworks, signals, package_scripts, config_files.' },
|
|
1802
|
-
workflow: { type: 'object', description: 'Workflow context: action, type, branch, environment.' },
|
|
1803
|
-
agent: { type: 'object', description: 'Agent context: id and role.' },
|
|
1804
|
-
},
|
|
1805
|
-
required: [],
|
|
1806
|
-
},
|
|
1807
|
-
},
|
|
1808
|
-
{
|
|
1809
|
-
name: 'marrow_workflow_gate',
|
|
1810
|
-
description: 'Pre-action risk gate for deploys, publishes, merges, DB migrations, key rotation, destructive commands, and production work. ' +
|
|
1811
|
-
'Returns allow, warn, review_required, or block plus prior lessons/playbooks.',
|
|
1812
|
-
inputSchema: {
|
|
1813
|
-
type: 'object',
|
|
1814
|
-
properties: {
|
|
1815
|
-
action: { type: 'string', description: 'What the agent is about to do.' },
|
|
1816
|
-
description: { type: 'string', description: 'Optional extra context for the action.' },
|
|
1817
|
-
riskTolerance: { type: 'string', enum: ['low', 'medium', 'high'], description: 'Default high. Use medium/low for stricter gates.' },
|
|
1818
|
-
requiresApproval: { type: 'boolean', description: 'Set true when owner approval is required before proceeding.' },
|
|
1819
|
-
context: { type: 'object', description: 'Optional metadata. Do not include secrets or raw payloads.' },
|
|
1820
|
-
},
|
|
1821
|
-
required: ['action'],
|
|
1822
|
-
},
|
|
1823
|
-
},
|
|
1824
|
-
{
|
|
1825
|
-
name: 'marrow_agent_performance',
|
|
1826
|
-
description: 'Get agent-facing fleet value metrics: avoided mistakes, reused winning decisions, failed patterns, token/time saved estimate, reliability score, and next improvements.',
|
|
1827
|
-
inputSchema: {
|
|
1828
|
-
type: 'object',
|
|
1829
|
-
properties: {
|
|
1830
|
-
period: { type: 'string', description: 'Time period: 7d (default), 14d, 30d, or day count up to 90.' },
|
|
1831
|
-
agentId: { type: 'string', description: 'Optional agent_id/session_id filter. Defaults to the canonical fleet-bound agent identity.' },
|
|
1832
|
-
},
|
|
1833
|
-
required: [],
|
|
1834
|
-
},
|
|
1835
|
-
},
|
|
1836
|
-
{
|
|
1837
|
-
name: 'marrow_fleet_lessons',
|
|
1838
|
-
description: 'Retrieve ranked reusable fleet lessons before similar work. Use before deploys, handoffs, migrations, audits, and repeated task types.',
|
|
1839
|
-
inputSchema: {
|
|
1840
|
-
type: 'object',
|
|
1841
|
-
properties: {
|
|
1842
|
-
query: { type: 'string', description: 'Search phrase for similar work.' },
|
|
1843
|
-
type: { type: 'string', enum: ['success', 'failure', 'deploy', 'incident', 'handoff', 'general'] },
|
|
1844
|
-
agentId: { type: 'string', description: 'Optional agent filter.' },
|
|
1845
|
-
limit: { type: 'number', description: 'Max lessons to return, default 10.' },
|
|
1846
|
-
},
|
|
1847
|
-
required: [],
|
|
1848
|
-
},
|
|
1849
|
-
},
|
|
1850
|
-
{
|
|
1851
|
-
name: 'marrow_record_deployment_memory',
|
|
1852
|
-
description: 'Record deploy or incident memory: PR, commit, tests, smoke result, rollback plan, production health, and incident notes.',
|
|
1853
|
-
inputSchema: {
|
|
1854
|
-
type: 'object',
|
|
1855
|
-
properties: {
|
|
1856
|
-
release_id: { type: 'string' },
|
|
1857
|
-
pr_url: { type: 'string' },
|
|
1858
|
-
commit_sha: { type: 'string' },
|
|
1859
|
-
environment: { type: 'string' },
|
|
1860
|
-
status: { type: 'string', enum: ['planned', 'dry_run', 'deployed', 'verified', 'rolled_back', 'incident'] },
|
|
1861
|
-
tests: { type: 'array', items: { type: 'string' } },
|
|
1862
|
-
smoke_result: { type: 'string' },
|
|
1863
|
-
rollback_plan: { type: 'string' },
|
|
1864
|
-
prod_health: { type: 'string' },
|
|
1865
|
-
incident_summary: { type: 'string' },
|
|
1866
|
-
},
|
|
1867
|
-
required: [],
|
|
1868
|
-
},
|
|
1869
|
-
},
|
|
1870
|
-
{
|
|
1871
|
-
name: 'marrow_create_handoff',
|
|
1872
|
-
description: 'Create a structured cross-agent handoff that Marrow can track for pending, stale, blocked, and complete states.',
|
|
1873
|
-
inputSchema: {
|
|
1874
|
-
type: 'object',
|
|
1875
|
-
properties: {
|
|
1876
|
-
to_agent_id: { type: 'string' },
|
|
1877
|
-
task: { type: 'string' },
|
|
1878
|
-
workflow_id: { type: 'string' },
|
|
1879
|
-
from_agent_id: { type: 'string' },
|
|
1880
|
-
checkpoint: { type: 'string' },
|
|
1881
|
-
stale_after_seconds: { type: 'number' },
|
|
1882
|
-
},
|
|
1883
|
-
required: ['to_agent_id', 'task'],
|
|
1884
|
-
},
|
|
1885
|
-
},
|
|
1886
|
-
{
|
|
1887
|
-
name: 'marrow_update_handoff',
|
|
1888
|
-
description: 'Update a Marrow handoff checkpoint/status when an agent accepts, blocks, completes, or needs review.',
|
|
1889
|
-
inputSchema: {
|
|
1890
|
-
type: 'object',
|
|
1891
|
-
properties: {
|
|
1892
|
-
handoffId: { type: 'string' },
|
|
1893
|
-
status: { type: 'string', enum: ['pending', 'accepted', 'working', 'blocked', 'complete', 'stale', 'cancelled'] },
|
|
1894
|
-
checkpoint: { type: 'string' },
|
|
1895
|
-
result_summary: { type: 'string' },
|
|
1896
|
-
},
|
|
1897
|
-
required: ['handoffId'],
|
|
1898
|
-
},
|
|
1899
|
-
},
|
|
1900
|
-
{
|
|
1901
|
-
name: 'marrow_handoff_status',
|
|
1902
|
-
description: 'Ask who is pending, stuck, stale, blocked, or complete across the agent fleet.',
|
|
1903
|
-
inputSchema: {
|
|
1904
|
-
type: 'object',
|
|
1905
|
-
properties: {
|
|
1906
|
-
status: { type: 'string' },
|
|
1907
|
-
agentId: { type: 'string' },
|
|
1908
|
-
limit: { type: 'number' },
|
|
1909
|
-
},
|
|
1910
|
-
required: [],
|
|
1911
|
-
},
|
|
1912
|
-
},
|
|
1913
|
-
{
|
|
1914
|
-
name: 'marrow_session_end',
|
|
1915
|
-
description: 'Explicitly end the current session. Optionally auto-commits any open decision. ' +
|
|
1916
|
-
'Prevents orphaned decisions when an agent finishes a task.',
|
|
1917
|
-
inputSchema: {
|
|
1918
|
-
type: 'object',
|
|
1919
|
-
properties: {
|
|
1920
|
-
autoCommitOpen: { type: 'boolean', description: 'Whether to auto-commit any open decision (default: true)' },
|
|
1921
|
-
},
|
|
1922
|
-
required: [],
|
|
1923
|
-
},
|
|
1924
|
-
},
|
|
1925
|
-
{
|
|
1926
|
-
name: 'marrow_accept_detected',
|
|
1927
|
-
description: 'Convert a detected decision pattern into an enforced workflow. ' +
|
|
1928
|
-
'The pattern ID comes from suggested_workflows in the orient() response.',
|
|
1929
|
-
inputSchema: {
|
|
1930
|
-
type: 'object',
|
|
1931
|
-
properties: {
|
|
1932
|
-
detectedId: { type: 'string', description: 'ID of the detected pattern to accept' },
|
|
1933
|
-
},
|
|
1934
|
-
required: ['detectedId'],
|
|
1935
|
-
},
|
|
1936
|
-
},
|
|
1937
|
-
{
|
|
1938
|
-
name: 'marrow_list_templates',
|
|
1939
|
-
description: 'Browse pre-built workflow templates. Filter by industry (insurance, healthcare, ecommerce, legal, saas, fintech, media, enterprise) or category. ' +
|
|
1940
|
-
'Use to discover available workflows before installing.',
|
|
1941
|
-
inputSchema: {
|
|
1942
|
-
type: 'object',
|
|
1943
|
-
properties: {
|
|
1944
|
-
industry: { type: 'string', description: 'Filter by industry (e.g., insurance, healthcare, saas)' },
|
|
1945
|
-
category: { type: 'string', description: 'Filter by category (e.g., claims, engineering, support)' },
|
|
1946
|
-
limit: { type: 'number', description: 'Max results (default: 20)' },
|
|
1947
|
-
},
|
|
1948
|
-
required: [],
|
|
1949
|
-
},
|
|
1950
|
-
},
|
|
1951
|
-
{
|
|
1952
|
-
name: 'marrow_install_template',
|
|
1953
|
-
description: 'Install a workflow template into your fleet as an active workflow. ' +
|
|
1954
|
-
'Use after marrow_list_templates to pick one.',
|
|
1955
|
-
inputSchema: {
|
|
1956
|
-
type: 'object',
|
|
1957
|
-
properties: {
|
|
1958
|
-
slug: { type: 'string', description: 'Template slug to install (e.g., code-review-deploy, claims-triage)' },
|
|
1959
|
-
},
|
|
1960
|
-
required: ['slug'],
|
|
1961
|
-
},
|
|
1962
|
-
},
|
|
1963
|
-
];
|
|
1964
|
-
const CORE_TOOL_NAMES = new Set([
|
|
1965
|
-
'marrow_agent_runtime',
|
|
1966
|
-
'marrow_think',
|
|
1967
|
-
'marrow_commit',
|
|
1968
|
-
'marrow_ask',
|
|
1969
|
-
'marrow_status',
|
|
1970
|
-
'marrow_auto',
|
|
1971
|
-
'marrow_handoff_status',
|
|
1972
|
-
]);
|
|
1973
|
-
const PRIMARY_TOOL_NAMES = new Set([
|
|
1974
|
-
'marrow_agent_runtime',
|
|
1975
|
-
'marrow_arbitrate',
|
|
1976
|
-
'marrow_coordinate',
|
|
1977
|
-
'marrow_replay_compare',
|
|
1978
|
-
'marrow_decision_brief',
|
|
1979
|
-
'marrow_think',
|
|
1980
|
-
'marrow_commit',
|
|
1981
|
-
'marrow_workflow_gate',
|
|
1982
|
-
'marrow_completion_contracts',
|
|
1983
|
-
'marrow_evaluate_completion_contract',
|
|
1984
|
-
'marrow_agent_status',
|
|
1985
|
-
'marrow_value_report',
|
|
1986
|
-
'marrow_buyer_proof',
|
|
1987
|
-
'marrow_governance_timeline',
|
|
1988
|
-
'marrow_decision_trace',
|
|
1989
|
-
'marrow_fleet_lessons',
|
|
1990
|
-
'marrow_model_usage',
|
|
1991
|
-
]);
|
|
1992
1059
|
function activeToolProfile() {
|
|
1993
1060
|
const configured = process.env.MARROW_TOOL_PROFILE;
|
|
1994
1061
|
if (configured === undefined || configured === 'primary')
|
|
@@ -2000,9 +1067,9 @@ if (process.argv[2] !== 'keys') {
|
|
|
2000
1067
|
}
|
|
2001
1068
|
function toolsForProfile(profile) {
|
|
2002
1069
|
if (profile === 'full')
|
|
2003
|
-
return TOOLS;
|
|
2004
|
-
const visibleNames = profile === 'primary' ? PRIMARY_TOOL_NAMES : CORE_TOOL_NAMES;
|
|
2005
|
-
return TOOLS.filter((tool) => visibleNames.has(tool.name));
|
|
1070
|
+
return tool_catalog_1.TOOLS;
|
|
1071
|
+
const visibleNames = profile === 'primary' ? tool_catalog_1.PRIMARY_TOOL_NAMES : tool_catalog_1.CORE_TOOL_NAMES;
|
|
1072
|
+
return tool_catalog_1.TOOLS.filter((tool) => visibleNames.has(tool.name));
|
|
2006
1073
|
}
|
|
2007
1074
|
function advertisedTools() {
|
|
2008
1075
|
return toolsForProfile(activeToolProfile());
|
|
@@ -2023,7 +1090,7 @@ if (process.argv[2] !== 'keys') {
|
|
|
2023
1090
|
const evidence = recordValue(projection?.entitlement_evidence);
|
|
2024
1091
|
const counts = recordValue(projection?.counts);
|
|
2025
1092
|
const tools = projection?.tools;
|
|
2026
|
-
const expectedNames = [...PRIMARY_TOOL_NAMES];
|
|
1093
|
+
const expectedNames = [...tool_catalog_1.PRIMARY_TOOL_NAMES];
|
|
2027
1094
|
if (!projection
|
|
2028
1095
|
|| projection.profile !== 'primary'
|
|
2029
1096
|
|| (projection.current_plan !== null && typeof projection.current_plan !== 'string')
|
|
@@ -2254,7 +1321,7 @@ Marrow is not a replacement agent or a standalone memory app. Context and prior
|
|
|
2254
1321
|
const toolName = params?.name;
|
|
2255
1322
|
const args = (params?.arguments || {});
|
|
2256
1323
|
if (!toolAllowedByActiveProfile(toolName)) {
|
|
2257
|
-
const repair = toolName && PRIMARY_TOOL_NAMES.has(toolName)
|
|
1324
|
+
const repair = toolName && tool_catalog_1.PRIMARY_TOOL_NAMES.has(toolName)
|
|
2258
1325
|
? 'Unset MARROW_TOOL_PROFILE or set MARROW_TOOL_PROFILE=primary, then restart MCP.'
|
|
2259
1326
|
: 'Set MARROW_TOOL_PROFILE=full, then restart MCP for the complete advanced/legacy catalog.';
|
|
2260
1327
|
error(id, -32601, `Tool is not available in the active Marrow tool profile. ${repair}`);
|