@getmarrow/mcp 3.9.102 → 3.9.106

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.
Files changed (152) hide show
  1. package/README.md +71 -24
  2. package/dist/approval-reply.d.ts +2 -0
  3. package/dist/approval-reply.d.ts.map +1 -0
  4. package/dist/approval-reply.js +18 -0
  5. package/dist/approval-reply.js.map +1 -0
  6. package/dist/cli.js +1716 -1644
  7. package/dist/cli.js.map +1 -1
  8. package/dist/codex-plugin-pins.d.ts +19 -0
  9. package/dist/codex-plugin-pins.d.ts.map +1 -0
  10. package/dist/codex-plugin-pins.js +61 -0
  11. package/dist/codex-plugin-pins.js.map +1 -0
  12. package/dist/codex-plugins.d.ts +34 -0
  13. package/dist/codex-plugins.d.ts.map +1 -0
  14. package/dist/codex-plugins.js +240 -0
  15. package/dist/codex-plugins.js.map +1 -0
  16. package/dist/env.d.ts +8 -0
  17. package/dist/env.d.ts.map +1 -1
  18. package/dist/env.js +83 -4
  19. package/dist/env.js.map +1 -1
  20. package/dist/hook-context.d.ts.map +1 -1
  21. package/dist/hook-context.js +25 -0
  22. package/dist/hook-context.js.map +1 -1
  23. package/dist/hook-contract.d.ts +4 -3
  24. package/dist/hook-contract.d.ts.map +1 -1
  25. package/dist/hook-contract.js +43 -5
  26. package/dist/hook-contract.js.map +1 -1
  27. package/dist/hook-pre-action.d.ts +80 -3
  28. package/dist/hook-pre-action.d.ts.map +1 -1
  29. package/dist/hook-pre-action.js +435 -29
  30. package/dist/hook-pre-action.js.map +1 -1
  31. package/dist/hook-tool-policy.d.ts +73 -4
  32. package/dist/hook-tool-policy.d.ts.map +1 -1
  33. package/dist/hook-tool-policy.js +287 -18
  34. package/dist/hook-tool-policy.js.map +1 -1
  35. package/dist/hook.d.ts +1 -1
  36. package/dist/hook.d.ts.map +1 -1
  37. package/dist/hook.js +15 -7
  38. package/dist/hook.js.map +1 -1
  39. package/dist/host-approval-state.d.ts +7 -0
  40. package/dist/host-approval-state.d.ts.map +1 -1
  41. package/dist/host-approval-state.js +15 -0
  42. package/dist/host-approval-state.js.map +1 -1
  43. package/dist/host-approval.d.ts +22 -1
  44. package/dist/host-approval.d.ts.map +1 -1
  45. package/dist/host-approval.js +65 -4
  46. package/dist/host-approval.js.map +1 -1
  47. package/dist/host-session.d.ts +11 -0
  48. package/dist/host-session.d.ts.map +1 -1
  49. package/dist/host-session.js +49 -0
  50. package/dist/host-session.js.map +1 -1
  51. package/dist/index.d.ts +5 -1
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +23 -11
  54. package/dist/index.js.map +1 -1
  55. package/dist/keyless-server.d.ts +53 -0
  56. package/dist/keyless-server.d.ts.map +1 -0
  57. package/dist/keyless-server.js +230 -0
  58. package/dist/keyless-server.js.map +1 -0
  59. package/dist/normalized-action.d.ts +31 -6
  60. package/dist/normalized-action.d.ts.map +1 -1
  61. package/dist/normalized-action.js +550 -105
  62. package/dist/normalized-action.js.map +1 -1
  63. package/dist/own-server-identity.d.ts +142 -0
  64. package/dist/own-server-identity.d.ts.map +1 -0
  65. package/dist/own-server-identity.js +1123 -0
  66. package/dist/own-server-identity.js.map +1 -0
  67. package/dist/own-tool.d.ts +21 -9
  68. package/dist/own-tool.d.ts.map +1 -1
  69. package/dist/own-tool.js +25 -10
  70. package/dist/own-tool.js.map +1 -1
  71. package/dist/redact.d.ts +23 -0
  72. package/dist/redact.d.ts.map +1 -1
  73. package/dist/redact.js +181 -8
  74. package/dist/redact.js.map +1 -1
  75. package/dist/seatbelt/classifier-pin.d.ts +15 -0
  76. package/dist/seatbelt/classifier-pin.d.ts.map +1 -0
  77. package/dist/seatbelt/classifier-pin.js +26 -0
  78. package/dist/seatbelt/classifier-pin.js.map +1 -0
  79. package/dist/seatbelt/env-dump.d.ts +45 -0
  80. package/dist/seatbelt/env-dump.d.ts.map +1 -0
  81. package/dist/seatbelt/env-dump.js +308 -0
  82. package/dist/seatbelt/env-dump.js.map +1 -0
  83. package/dist/seatbelt/fallback-copy.d.ts +16 -0
  84. package/dist/seatbelt/fallback-copy.d.ts.map +1 -0
  85. package/dist/seatbelt/fallback-copy.js +68 -0
  86. package/dist/seatbelt/fallback-copy.js.map +1 -0
  87. package/dist/seatbelt/guards.d.ts +10 -0
  88. package/dist/seatbelt/guards.d.ts.map +1 -0
  89. package/dist/seatbelt/guards.js +509 -0
  90. package/dist/seatbelt/guards.js.map +1 -0
  91. package/dist/seatbelt/hook.d.ts +91 -0
  92. package/dist/seatbelt/hook.d.ts.map +1 -0
  93. package/dist/seatbelt/hook.js +396 -0
  94. package/dist/seatbelt/hook.js.map +1 -0
  95. package/dist/seatbelt/longopts.d.ts +68 -0
  96. package/dist/seatbelt/longopts.d.ts.map +1 -0
  97. package/dist/seatbelt/longopts.js +377 -0
  98. package/dist/seatbelt/longopts.js.map +1 -0
  99. package/dist/seatbelt/mapper.d.ts +83 -0
  100. package/dist/seatbelt/mapper.d.ts.map +1 -0
  101. package/dist/seatbelt/mapper.js +10581 -0
  102. package/dist/seatbelt/mapper.js.map +1 -0
  103. package/dist/seatbelt/record.d.ts +94 -0
  104. package/dist/seatbelt/record.d.ts.map +1 -0
  105. package/dist/seatbelt/record.js +776 -0
  106. package/dist/seatbelt/record.js.map +1 -0
  107. package/dist/seatbelt/tables.d.ts +82 -0
  108. package/dist/seatbelt/tables.d.ts.map +1 -0
  109. package/dist/seatbelt/tables.js +352 -0
  110. package/dist/seatbelt/tables.js.map +1 -0
  111. package/dist/seatbelt-deploy.d.ts +100 -0
  112. package/dist/seatbelt-deploy.d.ts.map +1 -0
  113. package/dist/seatbelt-deploy.js +393 -0
  114. package/dist/seatbelt-deploy.js.map +1 -0
  115. package/dist/seatbelt-fs.d.ts +30 -0
  116. package/dist/seatbelt-fs.d.ts.map +1 -0
  117. package/dist/seatbelt-fs.js +94 -0
  118. package/dist/seatbelt-fs.js.map +1 -0
  119. package/dist/seatbelt-git.d.ts +212 -0
  120. package/dist/seatbelt-git.d.ts.map +1 -0
  121. package/dist/seatbelt-git.js +844 -0
  122. package/dist/seatbelt-git.js.map +1 -0
  123. package/dist/seatbelt-mode.d.ts +77 -0
  124. package/dist/seatbelt-mode.d.ts.map +1 -0
  125. package/dist/seatbelt-mode.js +496 -0
  126. package/dist/seatbelt-mode.js.map +1 -0
  127. package/dist/seatbelt-path.d.ts +123 -0
  128. package/dist/seatbelt-path.d.ts.map +1 -0
  129. package/dist/seatbelt-path.js +482 -0
  130. package/dist/seatbelt-path.js.map +1 -0
  131. package/dist/seatbelt-scripts.d.ts +109 -0
  132. package/dist/seatbelt-scripts.d.ts.map +1 -0
  133. package/dist/seatbelt-scripts.js +1060 -0
  134. package/dist/seatbelt-scripts.js.map +1 -0
  135. package/dist/secret-paths.d.ts +17 -0
  136. package/dist/secret-paths.d.ts.map +1 -0
  137. package/dist/secret-paths.js +32 -0
  138. package/dist/secret-paths.js.map +1 -0
  139. package/dist/session-loop-guard.d.ts.map +1 -1
  140. package/dist/session-loop-guard.js +15 -5
  141. package/dist/session-loop-guard.js.map +1 -1
  142. package/dist/tool-catalog.js +2 -2
  143. package/dist/tool-catalog.js.map +1 -1
  144. package/dist/types.d.ts +2 -1
  145. package/dist/types.d.ts.map +1 -1
  146. package/package.json +3 -2
  147. package/server.json +3 -3
  148. package/vendor/classifier/MANIFEST.json +25 -0
  149. package/vendor/classifier/classifier.js +1356 -0
  150. package/vendor/classifier/policy-baseline.js +187 -0
  151. package/vendor/classifier/redact.js +59 -0
  152. package/vendor/classifier/shell-parse.js +455 -0
@@ -0,0 +1,396 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SETUP_UNCONFIRMED_TEXT = exports.CLAIMED_NO_KEY_TEXT = exports.HOOK_BUDGET_MS = exports.SEATBELT_ROLLOUT = void 0;
4
+ exports.seatbeltStopText = seatbeltStopText;
5
+ exports.accountFloorStops = accountFloorStops;
6
+ exports.hostMapperFs = hostMapperFs;
7
+ exports.hostSeatbeltGit = hostSeatbeltGit;
8
+ exports.keylessSeatbelt = keylessSeatbelt;
9
+ exports.seatbeltStatus = seatbeltStatus;
10
+ exports.accountFloor = accountFloor;
11
+ exports.outageRisk = outageRisk;
12
+ const fallback_copy_1 = require("./fallback-copy");
13
+ /**
14
+ * Compiled-in rollout table. Not env, not a file: changing a value is a one-line, reviewed code
15
+ * change. `keyless: 'off'` makes every keyless machine `claimed_no_key` (3.9.103 holds plus the
16
+ * floor). `account_floor: 'on'` enforces the S0-S5 floor before the server flow.
17
+ */
18
+ exports.SEATBELT_ROLLOUT = Object.freeze({
19
+ keyless: 'on',
20
+ account_floor: 'watch',
21
+ });
22
+ /** One wall-clock budget for the whole seatbelt path (mode resolution and mapper). Over it: stop. */
23
+ exports.HOOK_BUDGET_MS = 300;
24
+ exports.CLAIMED_NO_KEY_TEXT = 'Marrow is linked to an account but has no working key; owner: run `npx -y @getmarrow/install@latest doctor`.';
25
+ /**
26
+ * `claimed_no_key` with no account evidence and no rejected key: a fallback because the machine's
27
+ * setup could not be confirmed (an evidence dir others can write, an unreadable probe, a home
28
+ * mismatch, strict mode). Same holds as CLAIMED_NO_KEY_TEXT, but it never claims an account exists.
29
+ * This constant is the generic wording; a hold names its reason (setupUnconfirmedText, fallback-copy.ts).
30
+ */
31
+ exports.SETUP_UNCONFIRMED_TEXT = (0, fallback_copy_1.setupUnconfirmedText)(fallback_copy_1.FALLBACK_OTHER);
32
+ const LABELS = {
33
+ S0: 'a change to Marrow seatbelt settings or an owner-only command',
34
+ S1: 'force-push or delete of a protected branch',
35
+ S2: 'production deploy',
36
+ S3: 'package publish',
37
+ S4: 'reading, copying or writing secrets (like .env files or private keys)',
38
+ S5: 'recursive delete outside the workspace',
39
+ Sx: 'obfuscated execution',
40
+ hook: 'a safety check that could not finish',
41
+ };
42
+ const CODE = /^[A-Za-z0-9_.:-]{1,64}$/;
43
+ function codes(list) {
44
+ return Array.isArray(list) ? list.filter((item) => typeof item === 'string' && CODE.test(item)).slice(0, 16) : [];
45
+ }
46
+ /** What the agent and the person read after the label, in every stop. */
47
+ const STOP_ADVICE = 'If you (the person at this machine) meant it, run it yourself in your own terminal. Agent: do not retry it another way and do not edit Marrow settings; tell the user it was stopped.';
48
+ /** Keyless (no account): the way to approval prompts. The plugin path is the one the plugin's own docs give. */
49
+ const KEYLESS_KEY_ADVICE = 'For approval prompts instead of stops, add a Marrow key: getmarrow.ai/docs#start-here (Claude Code plugin: put MARROW_API_KEY in ~/.marrow/env, chmod 600, then /reload-plugins).';
50
+ /** The label of a stop. A script Marrow could not read is named as such: it is not known to be what its name says. */
51
+ function stopLabel(category, reason) {
52
+ const label = LABELS[category] || LABELS.hook;
53
+ return reason === 'script_unreadable' ? `a script Marrow could not read (treated as ${label})` : label;
54
+ }
55
+ /** `modeReason`: the fixed code that explains a fallback (pickFallbackReason); only read when the machine is not account-linked. */
56
+ function seatbeltStopText(category, rule, reason, mode, accountLinked = true, modeReason) {
57
+ const head = `MARROW SEATBELT stopped this action: ${stopLabel(category, reason)}. ${STOP_ADVICE}`;
58
+ const code = `Code: ${CODE.test(rule) ? rule : 'unknown'}/${CODE.test(reason) ? reason : 'unknown'}`;
59
+ if (mode === 'account')
60
+ return `${head} ${code}.`;
61
+ if (mode === 'seatbelt')
62
+ return `${head} ${KEYLESS_KEY_ADVICE} ${code}.`;
63
+ return accountLinked
64
+ ? `${head} ${exports.CLAIMED_NO_KEY_TEXT} ${code}.`
65
+ : `${head} ${(0, fallback_copy_1.fallbackSentence)(modeReason)} ${code}; mode: ${(0, fallback_copy_1.fallbackCode)(modeReason)}.`;
66
+ }
67
+ /** §4.2: an S0-S5 floor stop is lifted only by an enforced server allow (a verified permit); an advisory allow never lifts it. */
68
+ function accountFloorStops(rollout, floor, server) {
69
+ if (rollout !== 'on' || !floor || floor.decision !== 'stop')
70
+ return false;
71
+ return server !== 'enforced_allow';
72
+ }
73
+ /** The event as the receipt writer may use it: to derive enums and keyed hashes only, never stored. */
74
+ function recordContext(event, home) {
75
+ return { tool_name: event.tool_name, tool_input: event.tool_input, cwd: event.cwd, session: event.session, truncated: event.truncated, home };
76
+ }
77
+ function record(entry, event, home) {
78
+ try {
79
+ require('./record').recordSeatbeltDecision(entry, recordContext(event, home));
80
+ }
81
+ catch { /* the record hook never changes a decision */ }
82
+ }
83
+ function gone(error) {
84
+ const code = error?.code;
85
+ return code === 'ENOENT' || code === 'ENOTDIR';
86
+ }
87
+ function unreadable(error) {
88
+ const code = error?.code;
89
+ return code === 'EACCES' || code === 'EPERM';
90
+ }
91
+ /** The mapper's file view over the host. Missing: null. A failure the mapper must not guess about throws (it stops on fs_error). */
92
+ function hostMapperFs(fs3) {
93
+ const fs = require('node:fs');
94
+ const realpath = (p) => {
95
+ try {
96
+ return fs.realpathSync(p);
97
+ }
98
+ catch (error) {
99
+ if (gone(error))
100
+ return null;
101
+ throw error;
102
+ }
103
+ };
104
+ return {
105
+ realpath,
106
+ readFile(p, maxBytes) {
107
+ const real = realpath(p);
108
+ if (real === null)
109
+ return null;
110
+ try {
111
+ return fs3.readFile(real, maxBytes);
112
+ }
113
+ catch (error) {
114
+ if (gone(error) || unreadable(error))
115
+ return null;
116
+ throw error;
117
+ }
118
+ },
119
+ readdir(p) {
120
+ try {
121
+ return fs.readdirSync(p);
122
+ }
123
+ catch (error) {
124
+ if (gone(error) || unreadable(error))
125
+ return null;
126
+ throw error;
127
+ }
128
+ },
129
+ };
130
+ }
131
+ const BRANCH_NAME = /^[A-Za-z0-9._/+@-]+$/;
132
+ /**
133
+ * The git view the mapper gets (r4 contract). `currentBranch` is read at every call, never cached;
134
+ * anything unclear is null. `getAll` throws when the config cannot be read in full.
135
+ */
136
+ function hostSeatbeltGit(fs3, home, env) {
137
+ const G = require('../seatbelt-git');
138
+ const P = require('../seatbelt-path');
139
+ const gitEnv = () => Object.keys(env).some((name) => name.startsWith('GIT_'));
140
+ const configEnv = { ...env };
141
+ // git reads $HOME; when it is the trusted home under another spelling (a symlink) it is the same files.
142
+ if (typeof env.HOME === 'string' && env.HOME !== home) {
143
+ const real = P.realPath(fs3, env.HOME, { followFinal: true });
144
+ if (real.status === 'resolved' && real.exists && real.path === home)
145
+ configEnv.HOME = home;
146
+ }
147
+ // The work tree that holds the `.git` entry nearest to cwd; null when none; 'unknown' when unclear.
148
+ const worktree = (cwd) => {
149
+ const real = P.realPath(fs3, cwd, { followFinal: true });
150
+ if (real.status !== 'resolved' || !real.exists)
151
+ return 'unknown';
152
+ let dir = real.path;
153
+ for (;;) {
154
+ const entry = fs3.lstat(dir === '/' ? '/.git' : `${dir}/.git`);
155
+ if (entry && (entry.type === 'dir' || entry.type === 'file'))
156
+ return dir;
157
+ if (entry)
158
+ return 'unknown';
159
+ if (dir === '/')
160
+ return null;
161
+ dir = dir.slice(0, dir.lastIndexOf('/')) || '/';
162
+ }
163
+ };
164
+ const dirsOf = (cwd) => {
165
+ const dirs = G.discoverGitDirs(fs3, cwd, configEnv);
166
+ if (dirs === 'unknown')
167
+ throw new Error('git_dirs_unknown');
168
+ return dirs;
169
+ };
170
+ const refExists = (commonDir, branch) => {
171
+ const loose = fs3.lstat(`${commonDir}/refs/heads/${branch}`);
172
+ if (loose && loose.type === 'file')
173
+ return true;
174
+ if (loose)
175
+ return false;
176
+ const packedEntry = fs3.lstat(`${commonDir}/packed-refs`);
177
+ if (!packedEntry)
178
+ return false;
179
+ if (packedEntry.type !== 'file')
180
+ return false;
181
+ const packed = fs3.readFile(`${commonDir}/packed-refs`, G.MAX_GIT_CONFIG_BYTES);
182
+ return packed !== null && packed.split('\n').some((line) => line.endsWith(` refs/heads/${branch}`));
183
+ };
184
+ return {
185
+ toplevel(cwd) {
186
+ if (gitEnv())
187
+ throw new Error('git_env');
188
+ const top = worktree(cwd);
189
+ if (top === 'unknown')
190
+ throw new Error('git_toplevel_unknown');
191
+ return top;
192
+ },
193
+ getAll(cwd, key) {
194
+ const dirs = dirsOf(cwd);
195
+ const config = G.loadGitConfig(fs3, { home, dirs, env: configEnv });
196
+ if (config.incomplete)
197
+ throw new Error('git_config_unreadable');
198
+ return G.gitConfigValues(config, key);
199
+ },
200
+ currentBranch(cwd) {
201
+ if (gitEnv())
202
+ return null;
203
+ try {
204
+ const top = worktree(cwd);
205
+ if (top === null || top === 'unknown')
206
+ return null;
207
+ const dirs = G.discoverGitDirs(fs3, cwd, configEnv);
208
+ if (dirs === null || dirs === 'unknown')
209
+ return null;
210
+ for (const marker of ['rebase-merge', 'rebase-apply', 'BISECT_LOG'])
211
+ if (fs3.lstat(`${dirs.gitDir}/${marker}`))
212
+ return null;
213
+ const head = G.readGitHead(fs3, dirs);
214
+ if (head.kind !== 'branch')
215
+ return null;
216
+ const name = head.branch;
217
+ if (!BRANCH_NAME.test(name) || name.startsWith('-') || name.startsWith('/') || name.endsWith('/')
218
+ || name.includes('..') || name.includes('//') || name.endsWith('.lock'))
219
+ return null;
220
+ return refExists(dirs.commonDir, name) ? name : null;
221
+ }
222
+ catch {
223
+ return null;
224
+ }
225
+ },
226
+ remoteHead(cwd, remote) {
227
+ const dirs = dirsOf(cwd);
228
+ if (!dirs)
229
+ return null;
230
+ const head = G.readRemoteDefaultBranch(fs3, dirs, remote);
231
+ if (head === 'unknown')
232
+ throw new Error('remote_head_unknown');
233
+ return head;
234
+ },
235
+ };
236
+ }
237
+ const TEMP_ROOTS = /^\/(?:tmp|var\/tmp|private\/tmp|var\/folders|private\/var\/folders)(?:\/|$)/;
238
+ /** $TMPDIR only when it resolves under a system temp root: the environment can only narrow the workspace. */
239
+ function trustedTmpdir() {
240
+ try {
241
+ const real = require('node:fs').realpathSync(require('node:os').tmpdir());
242
+ return TEMP_ROOTS.test(real) && real !== '/' ? real : undefined;
243
+ }
244
+ catch {
245
+ return undefined;
246
+ }
247
+ }
248
+ function mapperEnv(home, cwd, budgetMs) {
249
+ const fs3 = require('../seatbelt-fs').nodeSeatbeltFs();
250
+ return {
251
+ cwd: typeof cwd === 'string' && cwd.startsWith('/') ? cwd : null,
252
+ home,
253
+ tmpdir: trustedTmpdir(),
254
+ platform: process.platform,
255
+ fs: hostMapperFs(fs3),
256
+ git: hostSeatbeltGit(fs3, home, process.env),
257
+ budgetMs: Math.max(0, budgetMs),
258
+ };
259
+ }
260
+ function evaluate(event, home, budgetMs) {
261
+ const { evaluateSeatbelt } = require('./mapper');
262
+ return evaluateSeatbelt({ tool_name: String(event.tool_name || ''), tool_input: event.tool_input }, mapperEnv(home, event.cwd, budgetMs));
263
+ }
264
+ function passwdHome() {
265
+ try {
266
+ const home = require('node:os').userInfo().homedir;
267
+ return typeof home === 'string' && home.startsWith('/') ? home : null;
268
+ }
269
+ catch {
270
+ return null;
271
+ }
272
+ }
273
+ /** The keyless branch of the hook: mode (U4), then the mapper (U2) with the U3 resolvers. Never throws. */
274
+ function keylessSeatbelt(harness, event) {
275
+ const started = Date.now();
276
+ let mode = 'claimed_no_key';
277
+ let accountLinked = false;
278
+ // A resolution that fails or has no reason keeps the generic code.
279
+ let modeReason = fallback_copy_1.FALLBACK_OTHER;
280
+ let trustedHome;
281
+ const stop = (reason) => {
282
+ record({ v: 1, mode, enforcement: 'enforce', harness, decision: 'stop', category: 'hook', rule: 'U5.fail_closed', reasons: [reason], flags: [], parse: 'unparsed', latency_ms: Date.now() - started }, event, trustedHome);
283
+ return { mode, accountLinked, recognized: true, modeReason, stopText: seatbeltStopText('hook', 'U5.fail_closed', reason, mode, accountLinked, modeReason) };
284
+ };
285
+ try {
286
+ const { resolveSeatbeltModeOnHost } = require('../seatbelt-mode');
287
+ const resolution = resolveSeatbeltModeOnHost();
288
+ mode = resolution.mode === 'seatbelt' && exports.SEATBELT_ROLLOUT.keyless === 'on' ? 'seatbelt' : 'claimed_no_key';
289
+ accountLinked = resolution.reasons.includes('account_evidence') || resolution.reasons.includes('key_rejected');
290
+ modeReason = (0, fallback_copy_1.pickFallbackReason)(resolution.reasons);
291
+ if (event.truncated)
292
+ return stop('input_truncated');
293
+ const home = resolution.homes[0] || passwdHome() || '/nonexistent-home';
294
+ trustedHome = home;
295
+ const decision = evaluate(event, home, exports.HOOK_BUDGET_MS - (Date.now() - started));
296
+ if (Date.now() - started > exports.HOOK_BUDGET_MS)
297
+ return stop('hook_budget');
298
+ const reasons = codes(decision.reasons);
299
+ record({
300
+ v: 1, mode, enforcement: 'enforce', harness, decision: decision.decision === 'pass' ? 'pass' : 'stop',
301
+ category: CODE.test(decision.category) ? decision.category : 'unknown', rule: CODE.test(decision.rule) ? decision.rule : 'unknown',
302
+ reasons, flags: codes(decision.flags), parse: CODE.test(decision.parse) ? decision.parse : 'unknown', latency_ms: Date.now() - started,
303
+ }, event, home);
304
+ if (decision.decision === 'pass')
305
+ return { mode, accountLinked, recognized: decision.recognized === true, modeReason, stopText: null };
306
+ return { mode, accountLinked, recognized: true, modeReason, stopText: seatbeltStopText(decision.category, decision.rule, reasons[0] || 'unspecified', mode, accountLinked, modeReason) };
307
+ }
308
+ catch {
309
+ return stop('hook_error');
310
+ }
311
+ }
312
+ /** The reason codes mode resolution can emit (src/seatbelt-mode.ts), the only ones the status line may print. */
313
+ const STATUS_REASONS = ['strict', 'key_rejected', 'home_unknown', 'home_unusable', 'env_home_unusable', 'home_mismatch', 'account_evidence', 'evidence_unknown'];
314
+ /**
315
+ * What `marrow-mcp seatbelt-status` prints (the installer's doctor reads it): the mode this machine's
316
+ * hook would be in right now, from the same resolution the keyless hook runs (same key lookup, same
317
+ * rollout table), and the resolver's reason codes that are on a closed list. Reads only; writes no file
318
+ * or state, opens no connection, and names no key, path, user or environment value. Throws when the
319
+ * resolution does (the caller prints the unknown line).
320
+ */
321
+ function seatbeltStatus() {
322
+ const { resolveSeatbeltModeOnHost } = require('../seatbelt-mode');
323
+ const resolution = resolveSeatbeltModeOnHost({ argv: [] });
324
+ const mode = resolution.mode === 'seatbelt' && exports.SEATBELT_ROLLOUT.keyless !== 'on' ? 'claimed_no_key' : resolution.mode;
325
+ const reasons = STATUS_REASONS.filter((code) => resolution.reasons.includes(code));
326
+ return { mode, reasons };
327
+ }
328
+ /**
329
+ * The account floor. `watch`: computed after the answer, for the record only; it never throws and
330
+ * never writes output. `on` (not active): run before the server flow; a returned text is a stop.
331
+ */
332
+ function accountFloor(harness, event, deadlineAt) {
333
+ const started = Date.now();
334
+ try {
335
+ const budget = Math.min(exports.HOOK_BUDGET_MS, (Number.isFinite(deadlineAt) ? deadlineAt : Number.POSITIVE_INFINITY) - started - 200);
336
+ const enforcement = exports.SEATBELT_ROLLOUT.account_floor === 'on' ? 'enforce' : 'watch';
337
+ if (!(budget >= 20)) {
338
+ record({ v: 1, mode: 'account', enforcement, harness, decision: 'skipped', category: 'none', rule: 'none', reasons: ['floor_no_budget'], flags: [], parse: 'ok', latency_ms: 0 }, event);
339
+ return enforcement === 'enforce' ? seatbeltStopText('hook', 'U5.fail_closed', 'hook_budget', 'account') : null;
340
+ }
341
+ const decision = event.truncated ? null : evaluate(event, passwdHome() || '/nonexistent-home', budget);
342
+ const stopped = decision === null || decision.decision === 'stop' || Date.now() - started > budget;
343
+ record({
344
+ v: 1, mode: 'account', enforcement, harness, decision: stopped ? 'stop' : 'pass',
345
+ category: decision && CODE.test(decision.category) ? decision.category : 'hook', rule: decision && CODE.test(decision.rule) ? decision.rule : 'U5.fail_closed',
346
+ reasons: decision ? codes(decision.reasons) : ['input_truncated'], flags: decision ? codes(decision.flags) : [],
347
+ parse: decision && CODE.test(decision.parse) ? decision.parse : 'unparsed', latency_ms: Date.now() - started,
348
+ }, event);
349
+ if (!accountFloorStops(exports.SEATBELT_ROLLOUT.account_floor, { decision: stopped ? 'stop' : 'pass' }, 'none'))
350
+ return null;
351
+ return decision && decision.decision === 'stop'
352
+ ? seatbeltStopText(decision.category, decision.rule, codes(decision.reasons)[0] || 'unspecified', 'account')
353
+ : seatbeltStopText('hook', 'U5.fail_closed', decision ? 'hook_budget' : 'input_truncated', 'account');
354
+ }
355
+ catch {
356
+ return exports.SEATBELT_ROLLOUT.account_floor === 'on' ? seatbeltStopText('hook', 'U5.fail_closed', 'hook_error', 'account') : null;
357
+ }
358
+ }
359
+ // Hits that only mean the mapper could not finish (load, an internal error): not a reading of the action.
360
+ const UNFINISHED_HIT = /^(?:budget_[a-z_]+|mapper_error|fs_error)$/;
361
+ /**
362
+ * I3: how the mapper reads an action for the outage hold (Marrow unreachable). `high`: an S0-S5/S-x hit
363
+ * or a program on the outage list (git push, publish, deploy, remote delete), a dynamic subcommand of a
364
+ * listed program included. `not_high`: the mapper read all of it and found neither. `unknown`: it could
365
+ * not (budget, error, unparsed or dynamic text, truncated input, a tool it does not recognise); the hook
366
+ * then keeps the client classifier's answer. `shell`: the event ran a shell command. Never throws;
367
+ * writes no receipt or output.
368
+ */
369
+ function outageRisk(event, deadlineAt) {
370
+ const started = Date.now();
371
+ try {
372
+ const budget = Math.min(exports.HOOK_BUDGET_MS, (Number.isFinite(deadlineAt) ? deadlineAt : Number.POSITIVE_INFINITY) - started - 200);
373
+ if (!(budget >= 20) || event.truncated)
374
+ return { shell: false, risk: 'unknown' };
375
+ const decision = evaluate(event, passwdHome() || '/nonexistent-home', budget);
376
+ const shell = decision.shell === true;
377
+ if (Date.now() - started > budget)
378
+ return { shell, risk: 'unknown' };
379
+ // T-3: a command that only prints its help or version is never held in an outage.
380
+ if (decision.outageHelpOnly === true && decision.parse === 'ok' && decision.recognized === true)
381
+ return { shell, risk: 'not_high' };
382
+ // A real hit or a listed program is high even where the rest of the text could not be read; a listed
383
+ // program whose subcommand word is dynamic (`unknown`) may be the listed one, so it is high too.
384
+ if (decision.hits.some((h) => !UNFINISHED_HIT.test(h.reason)))
385
+ return { shell, risk: 'high' };
386
+ if (decision.risk.length)
387
+ return { shell, risk: 'high' };
388
+ if (decision.decision === 'stop' || decision.parse !== 'ok' || decision.recognized !== true)
389
+ return { shell, risk: 'unknown' };
390
+ return { shell, risk: 'not_high' };
391
+ }
392
+ catch {
393
+ return { shell: false, risk: 'unknown' };
394
+ }
395
+ }
396
+ //# sourceMappingURL=hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hook.js","sourceRoot":"","sources":["../../src/seatbelt/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E,CAAC;IAC3C,CAAC;AACH,CAAC"}
@@ -0,0 +1,68 @@
1
+ /** n: no value. v: a value, `--name=value` or the next word. o: an optional value, `--name=value` only. a: any of these (long lists whose modes do not matter). */
2
+ export type LongMode = 'n' | 'v' | 'o' | 'a';
3
+ export type LongList = ReadonlyMap<string, LongMode>;
4
+ /** A word of a command line; a null text is a word the mapper cannot read. */
5
+ export interface OptWord {
6
+ readonly text: string | null;
7
+ }
8
+ /**
9
+ * Builds a list from text. Tokens are separated by spaces: `name` (no value), `name=` (a value), `name[=]` (an
10
+ * optional value), `name~` (any form). A leading `[no-]` adds the `no-name` form (no value).
11
+ */
12
+ export declare function longList(text: string): LongList;
13
+ /**
14
+ * The indexes of the long options in `words` that are not on `list` (exact name; `=value` only where the option
15
+ * takes one); empty when every long option is on it. A bare `--` ends the options when `honourEnd` is set. A value
16
+ * word that belongs to a listed option (`--name value`) is skipped. `dashes` is 2 for `--name`; find writes its
17
+ * options as `-name` (1), where `=` is never part of an option. A word with no readable text is not a long option here
18
+ * (each parser already treats it on its own).
19
+ */
20
+ export declare function unknownLongAll(words: readonly OptWord[], list: LongList, dashes?: 1 | 2, honourEnd?: boolean): number[];
21
+ /** The index of the first long option that is not on `list` (see unknownLongAll), or -1. */
22
+ export declare function unknownLong(words: readonly OptWord[], list: LongList, dashes?: 1 | 2, honourEnd?: boolean): number;
23
+ /** True for a word that is exactly `--name` of a listed option that takes its value as the next word. */
24
+ export declare function takesNextWord(text: string, list: LongList): boolean;
25
+ /** The text after `=` of a `--name=value` word, or null when there is none. */
26
+ export declare function longValue(text: string): string | null;
27
+ export declare const NO_LONG: LongList;
28
+ export declare const CP_LONG: LongList;
29
+ export declare const MV_LONG: LongList;
30
+ export declare const LN_LONG: LongList;
31
+ export declare const INSTALL_LONG: LongList;
32
+ export declare const TAR_LONG: LongList;
33
+ export declare const SED_LONG: LongList;
34
+ export declare const CURL_LONG: LongList;
35
+ export declare const WGET_LONG: LongList;
36
+ export declare const RSYNC_LONG: LongList;
37
+ export declare const SCP_LONG: LongList;
38
+ export declare const CAT_LONG: LongList;
39
+ export declare const HEAD_LONG: LongList;
40
+ export declare const TAIL_LONG: LongList;
41
+ export declare const WC_LONG: LongList;
42
+ export declare const STAT_LONG: LongList;
43
+ export declare const LS_LONG: LongList;
44
+ export declare const DU_LONG: LongList;
45
+ export declare const DIFF_LONG: LongList;
46
+ export declare const CMP_LONG: LongList;
47
+ export declare const FILE_LONG: LongList;
48
+ export declare const GREP_LONG: LongList;
49
+ export declare const CHECKSUM_LONG: LongList;
50
+ export declare const JQ_LONG: LongList;
51
+ export declare const YQ_LONG: LongList;
52
+ export declare const BAT_LONG: LongList;
53
+ export declare const LESS_LONG: LongList;
54
+ export declare const MORE_LONG: LongList;
55
+ export declare const RG_LONG: LongList;
56
+ export declare const TREE_LONG: LongList;
57
+ export declare const PRETTIER_LONG: LongList;
58
+ export declare const ZIP_LONG: LongList;
59
+ export declare const ENV_LONG: LongList;
60
+ export declare const SUDO_LONG: LongList;
61
+ export declare const DOAS_LONG: LongList;
62
+ export declare const GIT_READ_LONG: LongList;
63
+ export declare const GIT_GLOBAL_LONG: LongList;
64
+ export declare const GIT_RESET_LONG: LongList;
65
+ export declare const GIT_RM_LONG: LongList;
66
+ export declare const GIT_RESTORE_LONG: LongList;
67
+ export declare const FIND_LONG: LongList;
68
+ //# sourceMappingURL=longopts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"longopts.d.ts","sourceRoot":"","sources":["../../src/seatbelt/longopts.ts"],"names":[],"mappings":"AAkBA,mKAAmK;AACnK,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAC7C,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAErD,8EAA8E;AAC9E,MAAM,WAAW,OAAO;IAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;AAEzD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