approval-md 0.4.5 → 0.4.7

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 (83) hide show
  1. package/SPEC.md +24 -3
  2. package/dist/src/channels/contract.d.ts +15 -0
  3. package/dist/src/channels/contract.js +23 -1
  4. package/dist/src/channels/contract.js.map +1 -1
  5. package/dist/src/channels/telegram.d.ts +180 -33
  6. package/dist/src/channels/telegram.js +256 -87
  7. package/dist/src/channels/telegram.js.map +1 -1
  8. package/dist/src/cli/channel-telegram.d.ts +114 -35
  9. package/dist/src/cli/channel-telegram.js +259 -120
  10. package/dist/src/cli/channel-telegram.js.map +1 -1
  11. package/dist/src/cli/doctor.js +33 -13
  12. package/dist/src/cli/doctor.js.map +1 -1
  13. package/dist/src/cli/help.d.ts +2 -0
  14. package/dist/src/cli/help.js +39 -3
  15. package/dist/src/cli/help.js.map +1 -1
  16. package/dist/src/cli/hook-exec-code.d.ts +150 -0
  17. package/dist/src/cli/hook-exec-code.js +357 -0
  18. package/dist/src/cli/hook-exec-code.js.map +1 -0
  19. package/dist/src/cli/hook.d.ts +154 -1
  20. package/dist/src/cli/hook.js +2344 -111
  21. package/dist/src/cli/hook.js.map +1 -1
  22. package/dist/src/cli/instructions.js +9 -6
  23. package/dist/src/cli/instructions.js.map +1 -1
  24. package/dist/src/cli/main.js +9 -0
  25. package/dist/src/cli/main.js.map +1 -1
  26. package/dist/src/cli/study.d.ts +22 -0
  27. package/dist/src/cli/study.js +153 -0
  28. package/dist/src/cli/study.js.map +1 -0
  29. package/dist/src/cli/verb-registry.d.ts +14 -0
  30. package/dist/src/cli/verb-registry.js +37 -0
  31. package/dist/src/cli/verb-registry.js.map +1 -1
  32. package/dist/src/cli/wordmark.d.ts +2 -2
  33. package/dist/src/cli/wordmark.js +2 -2
  34. package/dist/src/core/command-class.d.ts +349 -1
  35. package/dist/src/core/command-class.js +2347 -87
  36. package/dist/src/core/command-class.js.map +1 -1
  37. package/dist/src/core/exec-code.d.ts +77 -0
  38. package/dist/src/core/exec-code.js +60 -0
  39. package/dist/src/core/exec-code.js.map +1 -0
  40. package/dist/src/core/gate.d.ts +38 -0
  41. package/dist/src/core/gate.js +26 -0
  42. package/dist/src/core/gate.js.map +1 -1
  43. package/dist/src/core/git-push-argv.d.ts +111 -0
  44. package/dist/src/core/git-push-argv.js +375 -0
  45. package/dist/src/core/git-push-argv.js.map +1 -0
  46. package/dist/src/core/harness-version.d.ts +71 -30
  47. package/dist/src/core/harness-version.js +101 -34
  48. package/dist/src/core/harness-version.js.map +1 -1
  49. package/dist/src/core/policy-load.d.ts +8 -0
  50. package/dist/src/core/policy-load.js.map +1 -1
  51. package/dist/src/core/sender-identity.d.ts +13 -1
  52. package/dist/src/core/sender-identity.js +15 -0
  53. package/dist/src/core/sender-identity.js.map +1 -1
  54. package/dist/src/core/study-withdraw.d.ts +137 -0
  55. package/dist/src/core/study-withdraw.js +280 -0
  56. package/dist/src/core/study-withdraw.js.map +1 -0
  57. package/dist/src/daemon/git-evidence.d.ts +2 -2
  58. package/dist/src/daemon/git-evidence.js +1 -1
  59. package/dist/src/mcp/server.js +1 -1
  60. package/dist/src/mcp/server.js.map +1 -1
  61. package/docs/README-extended.md +3 -2
  62. package/docs/cli-reference.md +83 -7
  63. package/package.json +2 -2
  64. package/schema/event.schema.json +213 -1
  65. package/schema/fixtures/event/invalid/approval-granted-study.json +23 -0
  66. package/schema/fixtures/event/invalid/approval-rejected-looks-wrong-cli-channel.json +23 -0
  67. package/schema/fixtures/event/invalid/approval-rejected-looks-wrong-operator.json +24 -0
  68. package/schema/fixtures/event/invalid/approval-rejected-study-extra-key.json +24 -0
  69. package/schema/fixtures/event/invalid/approval-rejected-study-unknown-reason.json +23 -0
  70. package/schema/fixtures/event/invalid/approval-rejected-study-withdrawn-email-operator.json +20 -0
  71. package/schema/fixtures/event/invalid/approval-rejected-study-withdrawn-no-operator.json +19 -0
  72. package/schema/fixtures/event/invalid/approval-rejected-study-withdrawn-no-ref.json +19 -0
  73. package/schema/fixtures/event/invalid/approval-rejected-study-withdrawn-wrong-actor.json +20 -0
  74. package/schema/fixtures/event/invalid/approval-rejected-study-withdrawn-wrong-channel.json +20 -0
  75. package/schema/fixtures/event/invalid/approval-revoked-study.json +20 -0
  76. package/schema/fixtures/event/valid/approval-rejected-looks-wrong.json +23 -0
  77. package/schema/fixtures/event/valid/approval-rejected-study-withdrawn.json +20 -0
  78. package/schema/fixtures/policy/invalid/exec-code-custody-boolean.json +11 -0
  79. package/schema/fixtures/policy/invalid/exec-code-execute-code-value.json +11 -0
  80. package/schema/fixtures/policy/invalid/exec-code-unknown-key.json +12 -0
  81. package/schema/fixtures/policy/valid/exec-code-both.json +17 -0
  82. package/schema/fixtures/policy/valid/exec-code-custody.json +11 -0
  83. package/schema/policy.schema.json +23 -0
@@ -0,0 +1,280 @@
1
+ /**
2
+ * The study operator's withdraw (APRV-527, amended SPEC.md §8, the study record).
3
+ *
4
+ * A hosted operator running a study may DENY one request that is still pending,
5
+ * before it can run. It is never a grant, never an edit of a decision and never
6
+ * a reopening: the verb calls the gate's `decide` with the constant `reject`,
7
+ * under the constant actor `human:study-team` on the constant channel `study`,
8
+ * and the record carries `payload.study {reason: "study_withdrawn", operator,
9
+ * ref}`. Every reader that ignores the field reads an ordinary rejection, so the
10
+ * requester's `wait` exits 1, the queue drops the request, and nothing executes.
11
+ *
12
+ * Four properties are load-bearing, and each is enforced here rather than by
13
+ * whoever calls this:
14
+ *
15
+ * 1. **Off is a no-op.** Unless the process environment holds
16
+ * `APPROVAL_STUDY_MODE` exactly `1`, the verb refuses `study-mode-off` before
17
+ * it opens the log. The value is read from the environment and never from a
18
+ * policy, because nothing an agent can propose into a policy file may switch
19
+ * it on.
20
+ * 2. **Pending only.** The verified log must derive `requested` for the key at
21
+ * this instant; anything else (granted, rejected, revoked, expired, withdrawn,
22
+ * never requested) is `not-pending`. `decide` then re-derives the state under
23
+ * its own head-moved retry, so a resident's tap that lands between this read
24
+ * and the append wins and the withdraw becomes `not-pending` too.
25
+ * 3. **A too-late withdraw is on the record.** Like `approval reject`, a
26
+ * refused attempt that names one request appends ONE `audit.decision_refused`
27
+ * (`recordRefusedDecision`, under `human:study-team` on channel `study`, with
28
+ * the gate's own code): the study team's attempt is a decision a person made,
29
+ * and an invisible refusal would be a gap in the study's own record. Nothing
30
+ * is appended when study mode is off, on a replay, on an ambiguous ref, on a
31
+ * ref or key naming no request, or on a log fault. (The gate's own lazy
32
+ * `approval.expired` can also land when a TTL lapses inside the read-to-append
33
+ * window; see SPEC.md §11.2's preamble.)
34
+ * 4. **Replay-safe.** The `ref` the operator supplies is matched against the
35
+ * verified log first, and again after a lost race, so a concurrent retry of
36
+ * the same `ref` (a control plane's retry after its own timeout) answers
37
+ * `idempotent` and appends nothing rather than a false refusal.
38
+ *
39
+ * The verb is human-only in the verb registry, so neither `approval serve` nor
40
+ * the MCP wrapper publishes it, and its one intended caller is a root exec on
41
+ * the box running as the store's own uid.
42
+ */
43
+ import { createHash } from "node:crypto";
44
+ import { decide, readGatePolicy, readGateRecords, } from "./gate.js";
45
+ import { tick } from "./clock.js";
46
+ import { recordRefusedDecision } from "./decision-refusal.js";
47
+ import { requestState } from "./state.js";
48
+ /** The environment variable that switches study mode on, read from the process alone. */
49
+ export const STUDY_MODE_ENV = "APPROVAL_STUDY_MODE";
50
+ /** Study mode is on only when {@link STUDY_MODE_ENV} is exactly `1`. */
51
+ export function studyModeOn(env) {
52
+ return env[STUDY_MODE_ENV] === "1";
53
+ }
54
+ /** The actor every study withdrawal is recorded under (the schema pins it). */
55
+ export const STUDY_TEAM_ACTOR = "human:study-team";
56
+ /** The record's `channel` for a study withdrawal (the schema pins it). */
57
+ export const STUDY_CHANNEL = "study";
58
+ /** The record's `payload.note` for a study withdrawal. */
59
+ export const STUDY_WITHDRAW_NOTE = "withdrawn by the study team";
60
+ /**
61
+ * The operator id: 8 lowercase hex the control plane derives from the staff email with a key it
62
+ * alone holds (an HMAC, so a staff list cannot reverse it). Never the email; core checks the shape only.
63
+ */
64
+ export const STUDY_OPERATOR_PATTERN = /^[0-9a-f]{8}$/u;
65
+ /** The withdraw's replay reference, minted once by the operator's tool. */
66
+ export const STUDY_REF_PATTERN = /^[A-Za-z0-9_-]{16,64}$/u;
67
+ /** How many hex characters of the key's sha256 an action ref carries. */
68
+ export const STUDY_ACTION_REF_HEX = 12;
69
+ /** An action ref: the first {@link STUDY_ACTION_REF_HEX} hex of sha256(action key). */
70
+ export const STUDY_ACTION_REF_PATTERN = /^[0-9a-f]{12}$/u;
71
+ /**
72
+ * The short reference an operator names a request by, so that no action key
73
+ * (which can carry text an agent wrote) ever has to leave the box. It is the
74
+ * same 12 hex the Telegram listener's "Looks wrong" line prints
75
+ * (`studyLogRefOf`, a prefix of the callback's `actionRefOf`), so one operator
76
+ * vocabulary covers both study surfaces.
77
+ */
78
+ export function studyActionRefOf(actionKey) {
79
+ return createHash("sha256").update(actionKey, "utf8").digest("hex").slice(0, STUDY_ACTION_REF_HEX);
80
+ }
81
+ /**
82
+ * Every way the study withdraw refuses on its own (SPEC.md §11.1 invariant 6,
83
+ * §11.2 `study_withdraw_refusal_codes`), in evaluation order. Only
84
+ * `not-pending` on a request that exists appends, and it appends one
85
+ * `audit.decision_refused`. A log that cannot be read or written reaches the
86
+ * caller under the gate's own code (`log-unreadable`, `log-torn-tail`,
87
+ * `log-corrupt`, `append-failed`), appends nothing, and is not a member here.
88
+ */
89
+ export const STUDY_WITHDRAW_REFUSAL_CODES = [
90
+ /** The process was not launched with `APPROVAL_STUDY_MODE=1`. Nothing was read. */
91
+ "study-mode-off",
92
+ /** The request is not pending: decided, expired, withdrawn, never requested, or lost a race. */
93
+ "not-pending",
94
+ /** An action ref names more than one pending request. Nothing was decided. */
95
+ "action-ref-ambiguous",
96
+ ];
97
+ /** The gate codes that say the LOG could not be read or written: passed through, never `not-pending`. */
98
+ const LOG_FAULT_CODES = new Set([
99
+ "log-unreadable",
100
+ "log-torn-tail",
101
+ "log-corrupt",
102
+ "append-failed",
103
+ ]);
104
+ function refusal(code, message, extra = {}) {
105
+ return { ok: false, code, message, ...extra };
106
+ }
107
+ function payloadOf(record) {
108
+ const payload = record.payload;
109
+ return typeof payload === "object" && payload !== null ? payload : {};
110
+ }
111
+ function studyOf(record) {
112
+ const study = payloadOf(record)["study"];
113
+ return typeof study === "object" && study !== null && !Array.isArray(study)
114
+ ? study
115
+ : null;
116
+ }
117
+ /** Does the target name this key? A ref matches by its hash prefix. */
118
+ function targets(target, actionKey) {
119
+ return "actionKey" in target
120
+ ? target.actionKey === actionKey
121
+ : studyActionRefOf(actionKey) === target.actionRef;
122
+ }
123
+ /** The earlier withdrawal this `ref` made of the target, if any. */
124
+ function replayOf(records, target, ref) {
125
+ for (const record of records) {
126
+ if (record.event !== "approval.rejected")
127
+ continue;
128
+ if (typeof record.action_key !== "string" || !targets(target, record.action_key))
129
+ continue;
130
+ const study = studyOf(record);
131
+ if (study === null)
132
+ continue;
133
+ if (study["reason"] === "study_withdrawn" && study["ref"] === ref)
134
+ return record;
135
+ }
136
+ return null;
137
+ }
138
+ /**
139
+ * The gate's own code for a request that exists and is not pending: the code
140
+ * `decide` would answer, derived without calling it (a call would also write the
141
+ * gate's lazy expiry record).
142
+ */
143
+ function gateCodeOf(state) {
144
+ if (state === "expired")
145
+ return "expired";
146
+ if (state === "withdrawn")
147
+ return "request-withdrawn";
148
+ return "already-decided";
149
+ }
150
+ /** Every key that has an `approval.requested`, in first-seen order. */
151
+ function requestedKeys(records) {
152
+ const keys = [];
153
+ const seen = new Set();
154
+ for (const record of records) {
155
+ if (record.event !== "approval.requested")
156
+ continue;
157
+ const key = record.action_key;
158
+ if (typeof key !== "string" || key.length === 0 || seen.has(key))
159
+ continue;
160
+ seen.add(key);
161
+ keys.push(key);
162
+ }
163
+ return keys;
164
+ }
165
+ const NOTHING = "Nothing was appended.";
166
+ /**
167
+ * Withdraw one pending request for the study team. See the module header for
168
+ * the four properties; the order of checks is normative (SPEC.md §11.2).
169
+ */
170
+ export function studyWithdraw(logPath, input, options = {}) {
171
+ // 1. The switch, before anything is read.
172
+ if (!studyModeOn(options.env ?? process.env)) {
173
+ return refusal("study-mode-off", `study mode is off: this process was not launched with ${STUDY_MODE_ENV}=1, so no study withdrawal can be recorded. ${NOTHING}`);
174
+ }
175
+ // 2. The verified log. A read fault is the log's, never "not pending".
176
+ const read = readGateRecords(logPath, options.schemaDir);
177
+ if (!read.ok)
178
+ return refusal(read.code, read.message);
179
+ // 3. Replay: the same ref already withdrew this request.
180
+ const earlier = replayOf(read.records, input.target, input.ref);
181
+ if (earlier !== null) {
182
+ return {
183
+ ok: true,
184
+ idempotent: true,
185
+ seq: earlier.seq,
186
+ actionKey: earlier.action_key,
187
+ };
188
+ }
189
+ // 4. Pending, at this instant, under the policy's TTL (the same derivation
190
+ // `approval queue` and the gate use). A lapsed request is `not-pending` with
191
+ // the gate's code `expired`; the gate's lazy expiry record is not written for
192
+ // it here (only the audit record is).
193
+ const ts = tick(options);
194
+ const load = readGatePolicy(options);
195
+ const ttlMs = load.ok ? load.durations.approvalTtlMs : null;
196
+ // The one key the target names. A ref is resolved over every requested key:
197
+ // the pending ones first (so a decided card that shares a ref never shadows a
198
+ // pending one), then all of them, so a too-late withdraw by ref still learns
199
+ // which request it was too late for and can be put on the record.
200
+ let actionKey;
201
+ if ("actionKey" in input.target) {
202
+ actionKey = input.target.actionKey;
203
+ }
204
+ else {
205
+ const target = input.target;
206
+ const named = requestedKeys(read.records).filter((key) => studyActionRefOf(key) === target.actionRef);
207
+ const pending = named.filter((key) => requestState(read.records, key, ts, ttlMs).state === "requested");
208
+ if (pending.length > 1) {
209
+ return refusal("action-ref-ambiguous", `${String(pending.length)} pending requests carry this action ref, so it names no single request. Nothing was decided. ${NOTHING}`, { matches: pending.length });
210
+ }
211
+ if (pending.length === 1) {
212
+ actionKey = pending[0];
213
+ }
214
+ else if (named.length === 1) {
215
+ actionKey = named[0];
216
+ }
217
+ else {
218
+ // No request, or several settled ones (a 48-bit collision among decided
219
+ // cards): there is no one request to account the attempt to.
220
+ return refusal("not-pending", `no pending request carries this action ref; a study withdrawal reaches only a request still awaiting a decision. ${NOTHING}`, { state: "none" });
221
+ }
222
+ }
223
+ const derivation = requestState(read.records, actionKey, ts, ttlMs);
224
+ if (derivation.state === "none") {
225
+ return refusal("not-pending", `no request carries this action key; a study withdrawal reaches only a request still awaiting a decision. ${NOTHING}`, { state: "none" });
226
+ }
227
+ if (derivation.state !== "requested") {
228
+ const gateCode = gateCodeOf(derivation.state);
229
+ return refusedOnRecord(logPath, actionKey, gateCode, `the request is not pending (state ${derivation.state}); a study withdrawal reaches only a request still awaiting a decision`, derivation.state, options);
230
+ }
231
+ // 5. The deny, through the gate's own path: human-only check, fresh
232
+ // derivation under the head-moved retry, schema at the write boundary,
233
+ // compare-and-append. The decision is a constant.
234
+ const decided = decide(logPath, actionKey, "reject", STUDY_TEAM_ACTOR, {
235
+ ...options,
236
+ channel: STUDY_CHANNEL,
237
+ note: STUDY_WITHDRAW_NOTE,
238
+ study: { reason: "study_withdrawn", operator: input.operator, ref: input.ref },
239
+ });
240
+ if (!decided.ok) {
241
+ if (LOG_FAULT_CODES.has(decided.code))
242
+ return refusal(decided.code, decided.message);
243
+ // A concurrent run of this same ref may be what won the race (a control
244
+ // plane retrying after its own timeout): that is this withdrawal, already
245
+ // done, and it answers as the replay it is, with nothing written.
246
+ const again = readGateRecords(logPath, options.schemaDir);
247
+ if (!again.ok)
248
+ return refusal(again.code, again.message);
249
+ const won = replayOf(again.records, { actionKey }, input.ref);
250
+ if (won !== null)
251
+ return { ok: true, idempotent: true, seq: won.seq, actionKey };
252
+ // The one record the gate itself can leave here is the lazy
253
+ // `approval.expired` of a TTL that lapsed inside the window.
254
+ const lapse = decided.record === undefined
255
+ ? ""
256
+ : ` (the gate recorded the lapse it derived: ${decided.record.event}, seq ${String(decided.record.seq)})`;
257
+ return refusedOnRecord(logPath, actionKey, decided.code, `the gate refused the withdrawal (${decided.code}): the request stopped being decidable before the study team's answer could be recorded${lapse}`, decided.state, options, decided.drift);
258
+ }
259
+ return { ok: true, idempotent: false, seq: decided.record.seq, actionKey };
260
+ }
261
+ /**
262
+ * A `not-pending` refusal for a request that exists, put on the record as
263
+ * `approval reject` puts one (cli/gate.ts `commandDecide`): ONE
264
+ * `audit.decision_refused` by the gate, naming `human:study-team` on channel
265
+ * `study` and the gate's own code. Best effort, as there: the refusal stands
266
+ * whatever the write does, and a write that failed is said in the message.
267
+ */
268
+ function refusedOnRecord(logPath, actionKey, gateCode, why, state, options, drift) {
269
+ const recorded = recordRefusedDecision(logPath, { actionKey, decision: "reject", actor: STUDY_TEAM_ACTOR, channel: STUDY_CHANNEL }, { code: gateCode, message: why, ...(drift === undefined ? {} : { drift }) }, options);
270
+ const audit = recorded.ok ? recorded.audit : null;
271
+ const left = audit === null
272
+ ? "The refused attempt could not be put on the record."
273
+ : `The refused attempt is on the record (audit.decision_refused, seq ${String(audit.seq)}).`;
274
+ return refusal("not-pending", `${why}. ${left}`, {
275
+ gateCode,
276
+ ...(state === undefined ? {} : { state }),
277
+ ...(audit === null ? {} : { auditSeq: audit.seq }),
278
+ });
279
+ }
280
+ //# sourceMappingURL=study-withdraw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"study-withdraw.js","sourceRoot":"","sources":["../../../src/core/study-withdraw.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,cAAc,EACd,eAAe,GAGhB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAqB,MAAM,YAAY,CAAC;AAE7D,yFAAyF;AACzF,MAAM,CAAC,MAAM,cAAc,GA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GAAG,KAAK,IAAI,EAAE,EAAE;QAC/C,QAAQ;QACR,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;QACzC,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC;KACnD,CAAC,CAAC;AACL,CAAC"}
@@ -71,9 +71,9 @@ import type { LogHead } from "../core/log.js";
71
71
  * because a module that resolves its own package root differs between the source
72
72
  * tree and the build output for no benefit at all.
73
73
  */
74
- export declare const APPROVALD_VERSION = "0.4.5";
74
+ export declare const APPROVALD_VERSION = "0.4.7";
75
75
  /** `user.name` on every commit this module makes. */
76
- export declare const GIT_EVIDENCE_AUTHOR_NAME = "approvald 0.4.5";
76
+ export declare const GIT_EVIDENCE_AUTHOR_NAME = "approvald 0.4.7";
77
77
  /** `user.email` on every commit: fixed, and deliberately undeliverable. */
78
78
  export declare const GIT_EVIDENCE_AUTHOR_EMAIL = "approvald@noreply.approval.md";
79
79
  /**
@@ -75,7 +75,7 @@ import { PAYLOAD_STORE_DIRNAME } from "../core/payload-store.js";
75
75
  * because a module that resolves its own package root differs between the source
76
76
  * tree and the build output for no benefit at all.
77
77
  */
78
- export const APPROVALD_VERSION = "0.4.5";
78
+ export const APPROVALD_VERSION = "0.4.7";
79
79
  /** `user.name` on every commit this module makes. */
80
80
  export const GIT_EVIDENCE_AUTHOR_NAME = `approvald ${APPROVALD_VERSION}`;
81
81
  /** `user.email` on every commit: fixed, and deliberately undeliverable. */
@@ -593,7 +593,7 @@ export function createApprovalMcpServer(options) {
593
593
  const name = request.params.name;
594
594
  const spec = byName.get(name);
595
595
  if (spec === undefined) {
596
- const human = VERB_REGISTRY.find((candidate) => toolName(candidate) === name && candidate.human_only);
596
+ const human = VERB_REGISTRY.find((candidate) => toolName(candidate) === name && candidate.human_only && candidate.operator_only !== true);
597
597
  if (human !== undefined) {
598
598
  // Checked FIRST, and the same answer for a guest as for anyone else:
599
599
  // this verb records a human's authority, which is true of no session on
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAEnE,OAAO,EACL,qBAAqB,EACrB,SAAS,EACT,sBAAsB,EACtB,QAAQ,GAGT,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAgB,MAAM,gBAAgB,CAAC;AACpD,OAAO,EACL,aAAa,EACb,SAAS,GAGV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAgC,IAAI,GAAG,CAAC;IACjE;QACE,SAAS;QACT,kMAAkM;KACnM;IACD;QACE,aAAa;QACb,qpBAAqpB;KACtpB;IACD;QACE,YAAY;QACZ,4PAA4P;KAC7P;IACD;QACE,kBAAkB;QAClB,4SAA4S;KAC7S;IACD;QACE,aAAa;QACb,mTAAmT;KACpT;IACD;QACE,YAAY;QACZ,iUAAiU;KAClU;IACD;QACE,WAAW;QAC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C,CAAC,SAAS,CAAC;YACd,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC3B,MAAM,IAAI,QAAQ,CAChB,SAAS,CAAC,aAAa,EACvB,oCAAoC,SAAS,CAAC,QAAQ,CAAC,yGAAyG,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,8KAA8K,CAC5W,CAAC;YACJ,CAAC;YAED,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,aAAa,EAAE,gBAAgB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACtF,CAAC;QAED,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACjE,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;YACd,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,aAAa,EAAE,GAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACjF,CAAC;QAED,OAAO,UAAU,CAAC,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,+EAA+E;AAC/E,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,OAAsB,EACtB,SAAoB;IAEpB,MAAM,MAAM,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAChD,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -341,6 +341,7 @@ semantics: SPEC.md section 5.
341
341
  | `audit.skew_tolerance` | How far a gate-typed event's timestamp may step back before verification reports an anomaly. Report-only; default 2 seconds (§8). |
342
342
  | `audit.checkpoint_keys` | Public halves of the Ed25519 keys permitted to sign a `log.checkpoint`, base64 DER SPKI. The private halves live in the vault and never in this file. A list, so a retired key stays listed: a checkpoint signed by a key the list does not carry is refused. Absent, empty or unreadable means verification skips the checkpoint check with a reason and never reports it as a pass (§9, APRV-220). |
343
343
  | `delegation` | The judge's bounds (a pinned model that may later review samples, advise on cards and decide manual cards in named classes). RESERVED in 0.4.2: the block is validated and loads only in its off form (`model: null`, every list empty, `max_autonomy: manual`, `daily_cap: 0`, `advice: false`; `{}` is the same), which changes nothing. Any other value fails the policy closed with `delegation-not-supported`, so every class resolves `manual`. Absent means no judge, exactly as before the key existed. Cores before 0.4.2 refuse the key outright (§5.2 proposed, APRV-500; `docs/cli-reference.md`, policy check). |
344
+ | `exec` | What the operator attests about opaque agent code (`python3 -c`, `node -e`, `deno eval` and kin, an interpreter running a file that is not a skill script, Hermes `execute_code`). `exec.code.custody: attested` opens the `exec.code` class, which then resolves like any class and is recorded by the program's SHA-256 and length, never its text; `exec.code.execute_code: hooked` beside it opens Hermes `execute_code`. Absent, those calls are refused exactly as before the key existed; a policy that names `exec.code` without custody refuses `hook-exec-code-custody-unattested`. Cores before 0.4.5 refuse the key and fail the policy closed (§5.2 and §7 proposed, APRV-510; `docs/hermes-hook.md`). |
344
345
  | `delegation.model` | The judge identity, `model:<name>@<major>.<minor>.<patch>`, or `null`. Reserved: non-null is `delegation-not-supported` (APRV-500). |
345
346
  | `delegation.classes` | Exact keys of `classes` the judge may act on: no wildcard, not `human-only`, not `autonomous`. Reserved: non-empty is `delegation-not-supported` (APRV-500). |
346
347
  | `delegation.max_autonomy` | `manual` (default), `supervised-live` or `supervised-retro`: a pin, so every delegated class must declare an autonomy at least as strict. Reserved: anything but `manual` is `delegation-not-supported` (APRV-500). |
@@ -740,9 +741,9 @@ and the reference phone channel is one app, Telegram.
740
741
  | [`backlog/`](../backlog/) | Implementation work and remaining acceptance criteria. A task's existence is not a shipped feature. |
741
742
  | [`index.html`](../index.html), [`features/`](../features/), [`llms.txt`](../llms.txt), [`llms-full.txt`](../llms-full.txt) | The website and its machine-readable companions. |
742
743
  | [`metrics/`](../metrics/), [`brand/`](../brand/) | Agent-hour badge data and visual assets. Badge activity is not an adoption or security certification. |
743
- | [`hosted/`](../hosted/README.md), [`judgy/`](../judgy/README.md) | Hosting scaffolding and reviewer/demo pages; separate from the core runtime contract. |
744
+ | [`hosted/`](../hosted/README.md) | Hosting scaffolding; separate from the core runtime contract. |
744
745
 
745
- The hosted directory contains a policy builder and tenant launcher, not a complete account system or managed multi-tenant control plane. Judgy's pages render supplied data and retain simulated/replay/not-run provenance labels; a visualization is not a new authorization path. Neither should be advertised as a finished service merely because its directory exists.
746
+ The hosted directory contains a policy builder and tenant launcher, not a complete account system or managed multi-tenant control plane. It should not be advertised as a finished service merely because its directory exists. The judgy reviewer pages that used to sit beside it left the repository under APRV-393; commit `49574e4d` is the last one that holds them.
746
747
 
747
748
  ### Running the checks
748
749
 
@@ -2089,6 +2089,69 @@ success {"ok":true,"task":"...","action_key":"...","state":"withdrawn",
2089
2089
  refusal {"ok":false,"error":{"code":"...","message":"...","state"?:"..."}}
2090
2090
  ```
2091
2091
 
2092
+ ## study withdraw
2093
+
2094
+ A hosted study operator DENIES one request that is still pending, before it can
2095
+ run (SPEC.md §8, the study record). It is the only way a `study_withdrawn`
2096
+ record is written: a channel may pass `looks_wrong` and nothing else.
2097
+
2098
+ **Off unless switched on at launch.** The verb refuses `study-mode-off` before it
2099
+ opens the log unless the process environment holds `APPROVAL_STUDY_MODE`
2100
+ exactly `1`. The switch is never read from a policy, because nothing an agent
2101
+ can propose into a policy file may turn it on. `--help` answers either way, so a
2102
+ control plane can probe whether the installed CLI has the verb.
2103
+
2104
+ **Deny-only, constant identity.** There is no `--as`, no decision flag and no
2105
+ note. The record is one `approval.rejected` by `human:study-team` on channel
2106
+ `study`, with `payload.note` "withdrawn by the study team" and `payload.study`
2107
+ `{reason: "study_withdrawn", operator, ref}`. `--operator` is 8 lowercase hex: a
2108
+ pseudonymous id the control plane derives from the operator's staff email under
2109
+ a key it alone holds (an HMAC), never the email. Core checks only its shape.
2110
+
2111
+ **Pending-only, and a too-late withdrawal is on the record.** A request that is
2112
+ granted, rejected, revoked, expired, withdrawn or never requested is refused
2113
+ `not-pending`. The gate's `decide` re-derives the state under its head-moved
2114
+ retry, so a resident's tap that lands between the verb's read and its append
2115
+ wins and the withdrawal becomes `not-pending`. The gate's own code
2116
+ (`already-decided`, `expired`, `request-withdrawn`, or what `decide` answered)
2117
+ rides as `gate_code`. As with `approval reject`, a refusal for a request that
2118
+ exists appends ONE `audit.decision_refused` by `system:gate`, naming
2119
+ `human:study-team` on channel `study` and that code, so the study's own record
2120
+ shows the attempt. It carries no operator id (the operator is in the control
2121
+ plane's log line). Nothing is appended for `study-mode-off`, a replay, an
2122
+ `action-ref-ambiguous`, a key or ref naming no request, or a log fault.
2123
+
2124
+ **Replay-safe.** The `--ref` is matched against the verified log first, and
2125
+ again when the gate refuses after a lost race, so a concurrent retry of the same
2126
+ ref (a control plane retrying after its own timeout) is not mistaken for a
2127
+ too-late one. The same ref again for the same request answers
2128
+ `idempotent: true` with the earlier record's seq, and appends nothing. A ref is
2129
+ unique per withdrawal by convention (the operator's tool mints a fresh one):
2130
+ the same ref on a different request is a new withdrawal.
2131
+
2132
+ **Name by key or by ref.** `--action-ref` is the first 12 hex of the SHA-256 of
2133
+ the action key (the same 12 hex the Telegram listener's "Looks wrong" line
2134
+ prints), so a control plane never has to carry an action key off the box. More
2135
+ than one pending request under one ref is `action-ref-ambiguous`. A ref that
2136
+ names no pending request but exactly one settled one is resolved to it, so a
2137
+ too-late withdrawal by ref is recorded against that request.
2138
+
2139
+ **Not published.** The registry marks the verb human-only, so neither `approval
2140
+ serve` nor `approval mcp serve` offers it, and operator-only, so the agent's
2141
+ guide (`approval instructions`, its `--json` and `--schemas`) does not list it. Its caller is a root exec running as
2142
+ the store's own uid. The Telegram listener edits the resident's card on its next
2143
+ cycle to "WITHDRAWN BY THE STUDY TEAM" with "withdrawn by the study team at
2144
+ HH:MM UTC · nothing ran", and takes the buttons away. The requester's `wait`
2145
+ exits 1 (rejected).
2146
+
2147
+ **`--json`** (one line; the action key is never printed):
2148
+
2149
+ ```
2150
+ success {"ok":true,"idempotent":false,"seq":12}
2151
+ refusal {"ok":false,"error":{"code":"not-pending","message":"...",
2152
+ "state"?:"...","gate_code"?:"...","matches"?:2}}
2153
+ ```
2154
+
2092
2155
  ## expire
2093
2156
 
2094
2157
  No identity is accepted or resolved: no human decides an expiry, the clock does,
@@ -3424,9 +3487,13 @@ The checks, at length:
3424
3487
  **fail-closed version floor** (a build at or after `main` `118984d7` of
3425
3488
  2026-09-20) FAILS, because `v0.21.3` ignores `fail_closed` silently and every
3426
3489
  broken hook on it proceeds. That half is read from `hermes --version` rather than
3427
- from a record — Hermes prints its build stamp behind a non-ASCII separator the
3428
- write boundary refuses, so no record can carry it — and it compares the build
3429
- date and the upstream commit, because the two builds report the same semver.
3490
+ from a record, because a record keeps only the printable-ASCII prefix of
3491
+ Hermes's line (APRV-419): the build date survives and the upstream commit
3492
+ behind the non-ASCII separator does not. It compares the build date and the
3493
+ upstream commit, because the two builds report the same semver. Since APRV-419
3494
+ the unverified-change half compares Hermes like any other harness: the prefix,
3495
+ for example `Hermes Agent v0.21.3 (2026.9.14)`, on the newest hook record
3496
+ against the prefix of what `hermes --version` prints now.
3430
3497
  - **live-draw** — whether a daemon is answering `supervised-live` draws for this
3431
3498
  log (APRV-208). SKIP when the policy declares no live class: no draw is ever
3432
3499
  made, and a missing socket is nothing. It FAILS in three shapes, all of them
@@ -4595,7 +4662,7 @@ to.
4595
4662
 
4596
4663
  | Command | What it does |
4597
4664
  | -------- | ------------ |
4598
- | `/queue` | Replies with the summary and a numbered list of every pending request (action key, task, class, age), marking the one this listener has selected. Derived from the verified log at reply time, and it works while a request is selected. |
4665
+ | `/queue` | Replies with the count line and a numbered list of every pending request (the agent's summary and its age, no action key or task id), marking the one this listener has selected. Derived from the verified log at reply time, and it works while a request is selected. |
4599
4666
  | `/skip` | Selects the next request; the skipped one goes to the BACK of this process's order and comes round again after the rest, with a fresh card when it does. |
4600
4667
  | `/next` | Selects the next request; this process does not offer the passed-over one again, and sends no further card for it. |
4601
4668
 
@@ -4609,7 +4676,7 @@ it away from you.
4609
4676
  **`/queue` is a list, and it says so** (APRV-256). The reply carries no decision
4610
4677
  buttons of its own, and it names no position for the ones it points at: a
4611
4678
  request is decided on its own approval card, wherever that card has ended up in
4612
- the chat. The marker on the selected line reads `selected — card sent earlier`,
4679
+ the chat. The marker on the selected line reads `sent to you earlier`,
4613
4680
  because that is the whole of what the listener knows. Delivery bookkeeping
4614
4681
  records that a send returned success; the Bot API never reports that a message
4615
4682
  is still there, and a card can be deleted, buried, or lost with the chat
@@ -5652,7 +5719,11 @@ semantic-version-shaped tag, `tag <name>`, `--tags`, or `--follow-tags` is
5652
5719
  that DELETES a remote ref — `--delete`, `-d`, or a colon refspec such as
5653
5720
  `:refs/heads/x` — is `vcs.ref.delete` with the ref names bound (APRV-352), and a
5654
5721
  tag deletion keeps `release.publish`; ordinary branch pushes retain their branch
5655
- or trunk class.
5722
+ or trunk class. Flags are read the way git's option parser reads them, short
5723
+ bundles (`-ud`) and unique-prefix abbreviations (`--del`, `--m`) included, and
5724
+ `--prune` is a deletion too (APRV-517); a push git would refuse, or one naming
5725
+ a far-side program (`--exec`, `--receive-pack`), is `opaque`, and a word the
5726
+ shell may expand is `vcs.history.rewrite`.
5656
5727
 
5657
5728
  `git tag` splits on its flags since APRV-397: a LISTING (`-l`, `--list`, `-n`,
5658
5729
  `-n<num>`, `--contains`, `--points-at`, `--merged`, `--sort`, `--format`,
@@ -5715,7 +5786,12 @@ its own flags are not parsed as this verb's.
5715
5786
  ONE inline script is classified by that script since APRV-380, so
5716
5787
  `zsh -lc 'git push origin main'` is `vcs.push.main`; a script file, an extra
5717
5788
  word, a redirection on the wrapper, an assignment prefix and a nested shell
5718
- all stay opaque.
5789
+ all stay opaque. So does a shell that is not the system's, named as written
5790
+ (APRV-523): one spelled by a path outside `/bin`, `/usr/bin`,
5791
+ `/usr/local/bin`, `/sbin` and `/usr/sbin` (a relative path, a Homebrew
5792
+ shell under `/opt`), or by a word with an expansion or a backslash in it.
5793
+ An assignment-shaped shell word with a quoted or escaped name is
5794
+ `hook-unclassified`.
5719
5795
  - `hook-unparseable` — the command line could not be tokenized.
5720
5796
  - `hook-rejected` — a human said no.
5721
5797
  - `hook-revoked` — a granted approval was withdrawn.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "approval-md",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "Human approval for agent actions. CLI runtime for the approval.md convention (pre-release).",
5
5
  "type": "module",
6
6
  "bin": {
@@ -59,5 +59,5 @@
59
59
  "better-sqlite3": "12.11.1",
60
60
  "yaml": "2.9.0"
61
61
  },
62
- "gitHead": "2b8aeb3341d59c66f55730b57f1d1991cc512d67"
62
+ "gitHead": "eaa762237b6d8303ca791f70dcf9d6831dece5aa"
63
63
  }