approval-md 0.4.6 → 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.
- package/SPEC.md +11 -1
- package/dist/src/channels/contract.d.ts +15 -0
- package/dist/src/channels/contract.js +23 -1
- package/dist/src/channels/contract.js.map +1 -1
- package/dist/src/channels/telegram.d.ts +75 -2
- package/dist/src/channels/telegram.js +99 -6
- package/dist/src/channels/telegram.js.map +1 -1
- package/dist/src/cli/channel-telegram.d.ts +14 -0
- package/dist/src/cli/channel-telegram.js +44 -2
- package/dist/src/cli/channel-telegram.js.map +1 -1
- package/dist/src/cli/help.d.ts +2 -0
- package/dist/src/cli/help.js +36 -0
- package/dist/src/cli/help.js.map +1 -1
- package/dist/src/cli/hook.d.ts +29 -0
- package/dist/src/cli/hook.js +178 -15
- package/dist/src/cli/hook.js.map +1 -1
- package/dist/src/cli/instructions.js +9 -6
- package/dist/src/cli/instructions.js.map +1 -1
- package/dist/src/cli/main.js +9 -0
- package/dist/src/cli/main.js.map +1 -1
- package/dist/src/cli/study.d.ts +22 -0
- package/dist/src/cli/study.js +153 -0
- package/dist/src/cli/study.js.map +1 -0
- package/dist/src/cli/verb-registry.d.ts +14 -0
- package/dist/src/cli/verb-registry.js +37 -0
- package/dist/src/cli/verb-registry.js.map +1 -1
- package/dist/src/cli/wordmark.d.ts +2 -2
- package/dist/src/cli/wordmark.js +2 -2
- package/dist/src/core/gate.d.ts +38 -0
- package/dist/src/core/gate.js +26 -0
- package/dist/src/core/gate.js.map +1 -1
- package/dist/src/core/sender-identity.d.ts +13 -1
- package/dist/src/core/sender-identity.js +15 -0
- package/dist/src/core/sender-identity.js.map +1 -1
- package/dist/src/core/study-withdraw.d.ts +137 -0
- package/dist/src/core/study-withdraw.js +280 -0
- package/dist/src/core/study-withdraw.js.map +1 -0
- package/dist/src/daemon/git-evidence.d.ts +2 -2
- package/dist/src/daemon/git-evidence.js +1 -1
- package/dist/src/mcp/server.js +1 -1
- package/dist/src/mcp/server.js.map +1 -1
- package/docs/cli-reference.md +63 -0
- package/package.json +2 -2
- package/schema/event.schema.json +212 -0
- package/schema/fixtures/event/invalid/approval-granted-study.json +23 -0
- package/schema/fixtures/event/invalid/approval-rejected-looks-wrong-cli-channel.json +23 -0
- package/schema/fixtures/event/invalid/approval-rejected-looks-wrong-operator.json +24 -0
- package/schema/fixtures/event/invalid/approval-rejected-study-extra-key.json +24 -0
- package/schema/fixtures/event/invalid/approval-rejected-study-unknown-reason.json +23 -0
- package/schema/fixtures/event/invalid/approval-rejected-study-withdrawn-email-operator.json +20 -0
- package/schema/fixtures/event/invalid/approval-rejected-study-withdrawn-no-operator.json +19 -0
- package/schema/fixtures/event/invalid/approval-rejected-study-withdrawn-no-ref.json +19 -0
- package/schema/fixtures/event/invalid/approval-rejected-study-withdrawn-wrong-actor.json +20 -0
- package/schema/fixtures/event/invalid/approval-rejected-study-withdrawn-wrong-channel.json +20 -0
- package/schema/fixtures/event/invalid/approval-revoked-study.json +20 -0
- package/schema/fixtures/event/valid/approval-rejected-looks-wrong.json +23 -0
- package/schema/fixtures/event/valid/approval-rejected-study-withdrawn.json +20 -0
package/SPEC.md
CHANGED
|
@@ -359,6 +359,7 @@ For `record.*` classes, grant means adoption: the action proposes a write to a s
|
|
|
359
359
|
- **The writing daemon.** A record appended by a daemon MAY carry `daemon`, the id of the daemon instance that wrote it, so that a log hosted by one party for another states which host process acted. The value is the id declared in that process's launch environment or one derived from the instance the log belongs to; it is stamped by the runtime at the write boundary and is never a caller's parameter. It is OPTIONAL and additive: a record written without it validates and verifies unchanged, and its absence is absence rather than a claim that no daemon wrote the record. An implementation MAY let an attested policy list the ids permitted to append (`daemons`, §5.2) and MUST then refuse an append from an unlisted id at the write boundary with a distinct code (`daemon-not-allowed` in the reference runtime), leaving the file byte-identical. The id is self-reported, so §11.1 invariant 4 binds it completely: an implementation MUST NOT let a listed id reduce any scrutiny, and MUST NOT read the field as an input to a verdict, an autonomy, a budget, a floor, a sampling draw or a token. (Amended APRV-383.)
|
|
360
360
|
- **The policy a harness start was resolved under.** An `execution.started` that a harness path records (`execution: "harness"`) carries `payload.policy_sha256`, the SHA-256 of the attested policy bytes the write boundary re-checked the action's class against when it recorded the start, taken from the same attestation check and the same single read of the policy file that the write boundary's class resolution used. The runtime writes it at the write boundary, as it writes `ts`, and no caller parameter, option or field of the action's payload supplies it; a value of that name arriving by any of those routes is ignored. A start under a policy that is not attested, or whose bytes changed since attestation, is refused before anything is appended, so no stamp names bytes nobody attested. A policy-authorized start (autonomous, supervised, an unselected supervised-live draw) has no other record naming its policy, and the field lets a reader of the start alone say which rules were in force when it was recorded. A granted start, which could already recover its policy through `grant_seq`, carries it from the same code path, and there it equals the grant's own pin wherever the grant carries one, since a spend under a different attested policy is refused `policy-drift`. Where a harness adapter computes its verdict from an earlier read of the policy than the write boundary's, a re-attestation between the two leaves the stamp naming the policy in force at the append; an implementation SHOULD carry the verdict's attested hash to the write boundary and refuse a mismatch. It authorizes nothing: no verdict, budget, draw, loop floor or refusal reads it back, so §11.1 invariant 4 is untouched. It is covered by the record hash like every other payload field. It is OPTIONAL and additive: every record written before the field existed still validates and still verifies, a start written by a non-harness path (`approval run`, an adapter's `act`) records none at v0.1, and a reader treats absence as the pre-amendment behaviour, reconstructing the policy from the latest `policy.updated` before the record's seq. (Amended APRV-447.)
|
|
361
361
|
- A harness `execution.started` whose class came from the policy's tool mapping (a `tools` entry, or `harness.tool.unmapped`) MAY carry `payload.harness_tool`, the tool name, so that several tools sharing one class remain distinguishable. It is the name only: the call's arguments are bound by `payload_hash` and MUST NOT be written to the log. (Amended APRV-499, pending sign-off.)
|
|
362
|
+
- **The study record.** An `approval.rejected` MAY carry `payload.study`, which says why a study denied a request; no other event may carry it. It is a closed object whose `reason` is one of two values. `study_withdrawn` means a hosted operator withdrew a still-pending request before it could run: the record names the operator as `operator` (8 lowercase hex: a pseudonymous id the operator's control plane derives from the staff email with a key it alone holds, never the email, so a list of staff emails cannot reverse it) and the withdraw's replay reference as `ref`, its `actor` is `human:study-team` and its `channel` is `study`, so a reader can always tell it from a person's own answer. `looks_wrong` means the approver flagged the card as a suspected study card and denied it: it is the approver's ordinary reject on `telegram`, under the actor the sender mapping resolved, with no `operator` and no `ref`. A hosted operator may DENY a pending request, never grant, alter or reopen one, and the record names it: the field exists on the one decision that denies, a request that is not pending cannot be withdrawn, and a decision surface may write only `looks_wrong` (any other reason is refused `study-reason-not-channel`, §11.2, and nothing is appended). It is a record and never an input: no enforcement path reads it, budgets charge nothing for it as for any reject, and a reader that ignores it reads an ordinary rejection. (Amended APRV-528, pending attestation.)
|
|
362
363
|
- Events MUST validate against the JSON Schemas in `schema/` before append. Validation at the write boundary is itself a control: an agent physically cannot request execution without declaring a class, key, and cost estimate.
|
|
363
364
|
- Every record MUST carry an explicit hash-scheme identifier, `alg`. Version 0.1 defines exactly one value: `sha256/jcs`, meaning SHA-256 over the RFC 8785 (JCS) canonical serialization of the record with `prev` included. Verifiers MUST reject records whose `alg` is missing or unrecognized. Records with different `alg` values MAY coexist in one log, so a future scheme change is a migration, never a schism.
|
|
364
365
|
- Actor identifiers use exactly three prefixes: `human:` for decisions made by a person, `agent:` for actions proposed or performed by an agent, and `system:` for runtime-originated events such as `approval.expired`. Verifiers MUST reject unrecognized prefixes.
|
|
@@ -689,7 +690,7 @@ The following hold across every surface of the runtime. They are implicit accept
|
|
|
689
690
|
|
|
690
691
|
Invariant 6 above freezes six refusal unions as public API and pins each with a test. It does not say what any member means, and a frozen vocabulary whose triggers are folklore is a vocabulary a second implementation has to guess at. This registry states, for every member of every union, the condition under which that member fires. It is normative, and it is the source the conformance suite's `failure_class` assignments are drawn from (§13): a refusal for the wrong reason is a conformance failure, so the mapping has to live somewhere other than in the reference implementation's source. (Amended APRV-137.)
|
|
691
692
|
|
|
692
|
-
This registry covers the six gate-facing unions. A verb-local refusal union outside them is still bound by invariant 6: it is exported, frozen, and pinned by a test in the verb's own suite. (Amended APRV-215.) It also covers `channel_decision_refusal_codes`, which is not gate-facing and is registered here anyway: the refusals a decision surface makes are answers a human reads on their phone, and a vocabulary a second implementation has to guess at is exactly what this registry exists to stop. (Amended APRV-324.) It also covers `relay_refusal_codes` (amended APRV-455): the authenticated relay is a transport whose other end is a second implementation (an operator's control plane) that branches on these strings.
|
|
693
|
+
This registry covers the six gate-facing unions. A verb-local refusal union outside them is still bound by invariant 6: it is exported, frozen, and pinned by a test in the verb's own suite. (Amended APRV-215.) It also covers `channel_decision_refusal_codes`, which is not gate-facing and is registered here anyway: the refusals a decision surface makes are answers a human reads on their phone, and a vocabulary a second implementation has to guess at is exactly what this registry exists to stop. (Amended APRV-324.) It also covers `relay_refusal_codes` (amended APRV-455): the authenticated relay is a transport whose other end is a second implementation (an operator's control plane) that branches on these strings. It also covers `study_withdraw_refusal_codes` (amended APRV-527, the study record), for the same reason: the study operator's withdraw is run on the box by that control plane.
|
|
693
694
|
|
|
694
695
|
Three properties bind the whole registry. A code fires for exactly the condition named and never as a catch-all. Where two conditions could both apply, the order in which an implementation evaluates them is itself normative and is stated with the condition. And a refusal leaves the log untouched unless its row says otherwise: `budget-exceeded` appends a `budget.exceeded` record beside its refusal, `expired` materialises the `approval.expired` record a reader could already derive, and nothing else writes. (Amended APRV-137.)
|
|
695
696
|
|
|
@@ -817,6 +818,7 @@ Three properties bind the whole registry. A code fires for exactly the condition
|
|
|
817
818
|
| `sender-ambiguous` | The policy in force maps the supplied sender to more than one approver. A policy carrying this does not load (§5.2), so the code is reachable only where a caller supplies a policy that never passed a load; the runtime refuses rather than choosing between two people, and appends the same single audit record. |
|
|
818
819
|
| `sender-key-unavailable` | The attested policy maps that channel's senders in the KEYED form of §5.2 and the deciding process holds no key, so no digest can be computed and no account on the channel can be resolved. It refuses the WHOLE channel, including entries written raw beside keyed ones: the roster's ambiguity check cannot be run over a half nobody can read, and ambiguity resolves to the stricter path (§11.1). An implementation MUST NOT fall back to comparing the observed id against the raw entries. Distinct from `sender-unmapped`, which says the policy answered and did not name this account; this says nothing about the account and everything about the process, and its repair is the key in the environment rather than an amendment. The same single `audit.decision_refused` is appended, carrying the observed id in the RAW form, because there is no key to hash it with and a record naming no account at all would leave an operator unable to say who was in front of a gate that had lost its key. (Amended APRV-370.) |
|
|
819
820
|
| `attest-requires-terminal` | An attestation answer arrived with a sender, and the policy IN FORCE cannot say whether that account may sign for this amendment: either its bytes are not recoverable (an attestation records only their digest), or the amendment changes the `senders` mapping and the policy in force maps no sender for this channel. Attestation answers alone; evaluated before the answer is recorded, so nothing is attested and nothing is declined. The repair is a terminal, which supplies no sender. It is distinct from `sender-unmapped`, which says the policy in force answered and did not name this account. |
|
|
821
|
+
| `study-reason-not-channel` | A decision surface reported a gesture carrying a study reason other than `looks_wrong` (§8, the study record). A channel may flag an approver's deny `looks_wrong` and nothing else; `study_withdrawn` is written only by the study operator's withdraw path. Evaluated before the gate's verbs and before any sender is resolved, so nothing is decided and nothing is appended. (Amended APRV-528.) |
|
|
820
822
|
|
|
821
823
|
**`relay_refusal_codes`** — every way the authenticated relay (`approval channel relay`, §10.3) can refuse a post, in evaluation order: secret, duplicate header, URL, path, method, body size, JSON, shape, sender, freshness, nonce, then the gesture. None appends to the log. (Amended APRV-455.)
|
|
822
824
|
|
|
@@ -837,6 +839,14 @@ Three properties bind the whole registry. A code fires for exactly the condition
|
|
|
837
839
|
| `relay-policy-mismatch` | `propose` names a hash that is not the policy file on disk. HTTP 409. |
|
|
838
840
|
| `relay-handler-failed` | Applying the gesture threw. HTTP 500. |
|
|
839
841
|
|
|
842
|
+
**`study_withdraw_refusal_codes`** — every way the study operator's withdraw (`approval study withdraw`, §8 the study record) refuses on its own, in evaluation order: the switch, then the replay of the same `ref` (which answers success, appending nothing), then the request's state, then the gate. Only `not-pending` writes, and only as its row says: the study team's too-late attempt is a decision a person made, so it is put on the record as `approval reject`'s is. A log that cannot be read or written reaches the caller under the gate's own code, appends nothing, and is not a member here. Registered for the reason `relay_refusal_codes` is: the control plane that runs the verb on the box is a second implementation that branches on these strings. (Amended APRV-527, pending attestation.)
|
|
843
|
+
|
|
844
|
+
| code | fires when |
|
|
845
|
+
|---|---|
|
|
846
|
+
| `study-mode-off` | The process was not launched with `APPROVAL_STUDY_MODE` exactly `1`. Evaluated before the log is read; the switch is never read from a policy. |
|
|
847
|
+
| `not-pending` | The request named is not awaiting a decision at this instant (granted, rejected, revoked, expired, withdrawn, or never requested), or the gate refused the deny because the request stopped being decidable between the read and the append (a person answered it first). The gate's own code rides beside it (`already-decided`, `expired`, `request-withdrawn`, or what the gate answered). An action ref that names no pending request but exactly one settled one names that request. A study withdrawal never alters, reopens or repeats a decision. When the request exists, the refusal appends ONE `audit.decision_refused` (§5.2) naming `human:study-team` on channel `study` and the gate's code, and on the gate's own refusal it may also leave the lazy `approval.expired` under the preamble's rule; when no request is named, it appends nothing. Before writing, a refusal after the gate re-reads the log: if the same `ref` withdrew the request in the window (a concurrent retry), the answer is the replay's success and nothing is appended. |
|
|
848
|
+
| `action-ref-ambiguous` | The request was named by its action ref (the first 12 hex of the SHA-256 of its key) and more than one pending request carries that ref. Nothing is decided. |
|
|
849
|
+
|
|
840
850
|
**`append_error_codes`** — every way the write boundary itself can refuse an append, in definition order. Every one of them leaves the file byte-identical. (Amended APRV-137.)
|
|
841
851
|
|
|
842
852
|
| code | fires when |
|
|
@@ -512,6 +512,21 @@ export interface ChannelDecision {
|
|
|
512
512
|
* channel's own screen, never an input to a decision.
|
|
513
513
|
*/
|
|
514
514
|
rendering?: PromptRendering;
|
|
515
|
+
/**
|
|
516
|
+
* The study flag on this gesture (amended SPEC.md §8), recorded as
|
|
517
|
+
* `payload.study` on the `approval.rejected` it produces.
|
|
518
|
+
*
|
|
519
|
+
* A channel may set `looks_wrong` and nothing else: the resident flagged the
|
|
520
|
+
* card as a suspected study card and skipped it. Any other value, including
|
|
521
|
+
* `study_withdrawn`, is refused `study-reason-not-channel` before the gate is
|
|
522
|
+
* called, and nothing is appended. `study_withdrawn` is the study team's
|
|
523
|
+
* withdraw verb's, which no channel can reach. Like `rendering`, a record of
|
|
524
|
+
* what the person did and never an input: every check a Deny passes, this
|
|
525
|
+
* passes too.
|
|
526
|
+
*/
|
|
527
|
+
study?: {
|
|
528
|
+
reason: "looks_wrong";
|
|
529
|
+
};
|
|
515
530
|
}
|
|
516
531
|
/**
|
|
517
532
|
* What the runtime tells the channel became of a reported decision.
|
|
@@ -396,12 +396,34 @@ export function recordChannelDecision(logPath, decision, actorOptions, gateOptio
|
|
|
396
396
|
// The routing lives here rather than in each channel runner for the reason
|
|
397
397
|
// this function exists at all: there is one place a reported gesture becomes a
|
|
398
398
|
// log event, and adding a second would be adding a second decision path.
|
|
399
|
+
// Amended SPEC.md §8 (the study record), first and before anything is read
|
|
400
|
+
// or appended: a channel may flag a gesture `looks_wrong` and nothing else.
|
|
401
|
+
// The value arrives from a channel, so it is checked as data rather than
|
|
402
|
+
// trusted as a type; anything else, `study_withdrawn` above all, is refused
|
|
403
|
+
// with no record, because the only writer of a withdrawal is the study
|
|
404
|
+
// team's own verb.
|
|
405
|
+
if (decision.study !== undefined &&
|
|
406
|
+
decision.study.reason !== "looks_wrong") {
|
|
407
|
+
return {
|
|
408
|
+
outcome: {
|
|
409
|
+
ok: false,
|
|
410
|
+
code: "study-reason-not-channel",
|
|
411
|
+
message: `decision on ${decision.action_key} refused: a channel may record only the looks_wrong study reason. A study withdrawal is written by the study team's withdraw verb alone, never by a channel. Nothing was decided and nothing was recorded.`,
|
|
412
|
+
},
|
|
413
|
+
};
|
|
414
|
+
}
|
|
399
415
|
if (isAttestationActionKey(decision.action_key)) {
|
|
400
416
|
return recordAttestationDecision(logPath, decision, actorOptions, gateOptions);
|
|
401
417
|
}
|
|
402
|
-
|
|
418
|
+
// The study record comes from the gesture alone: a `study` the runtime's own
|
|
419
|
+
// gate options carry is dropped here, so the one value that reaches the gate
|
|
420
|
+
// is the one checked above.
|
|
421
|
+
const { study: _runtimeStudy, ...runtimeOptions } = gateOptions;
|
|
422
|
+
const options = { ...runtimeOptions };
|
|
403
423
|
if (decision.note !== undefined)
|
|
404
424
|
options.note = decision.note;
|
|
425
|
+
if (decision.study !== undefined)
|
|
426
|
+
options.study = { reason: "looks_wrong" };
|
|
405
427
|
if (decision.batchDeliveryId !== undefined) {
|
|
406
428
|
options.batchDeliveryId = decision.batchDeliveryId;
|
|
407
429
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../src/channels/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EACL,MAAM,EACN,cAAc,GAGf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,cAAc,EACd,4BAA4B,EAC5B,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,aAAa,GAKd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,GAEnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAIxD,OAAO,EAAE,mBAAmB,EAAqB,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,8EAA8E;AAC9E,kBAAkB;AAClB,8EAA8E;AAE9E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,yDAAyD;IACzD,KAAK;IACL,0FAA0F;IAC1F,cAAc;IACd,sDAAsD;IACtD,SAAS;IACT,kEAAkE;IAClE,aAAa;IACb;;;;OAIG;IACH,aAAa;IACb,4EAA4E;IAC5E,iBAAiB;IACjB;;;;;;;;;OASG;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J,CAAC"}
|
|
@@ -392,6 +392,29 @@ export declare const TELEGRAM_TERMINAL_HEADLINES: {
|
|
|
392
392
|
readonly expired: "✗ EXPIRED — the approval window closed";
|
|
393
393
|
readonly withdrawn: "WITHDRAWN — no decision is needed";
|
|
394
394
|
};
|
|
395
|
+
/**
|
|
396
|
+
* The headline a "Looks wrong" tap settles its card on (amended SPEC.md §8,
|
|
397
|
+
* the study record). The record underneath is an ordinary `approval.rejected`;
|
|
398
|
+
* this says, in the resident's words, that the card was skipped because they
|
|
399
|
+
* flagged it. Emoji-free like every other headline here.
|
|
400
|
+
*/
|
|
401
|
+
export declare const TELEGRAM_LOOKS_WRONG_HEADLINE = "SKIPPED \u2014 you flagged this as looks wrong";
|
|
402
|
+
/**
|
|
403
|
+
* The label of the study-mode button (amended SPEC.md §8, the study record).
|
|
404
|
+
* Drawn only while the listener was launched with `APPROVAL_STUDY_MODE=1`, on a
|
|
405
|
+
* row of its own under Approve and Reject. Its verb is `w`, a reject with the
|
|
406
|
+
* `looks_wrong` flag.
|
|
407
|
+
*/
|
|
408
|
+
export declare const TELEGRAM_LOOKS_WRONG_LABEL = "\uD83D\uDEA9 Looks wrong";
|
|
409
|
+
/**
|
|
410
|
+
* The headline a card settles on when the study team withdrew its request
|
|
411
|
+
* (amended SPEC.md §8, the study record: an `approval.rejected` carrying
|
|
412
|
+
* `payload.study.reason` `study_withdrawn`). It replaces "✗ REJECTED" for that
|
|
413
|
+
* record only, so the resident reads that nobody they know said no and that
|
|
414
|
+
* nothing ran. The operator id in the record is never shown. Emoji-free like
|
|
415
|
+
* every other headline here.
|
|
416
|
+
*/
|
|
417
|
+
export declare const TELEGRAM_STUDY_WITHDRAWN_HEADLINE = "WITHDRAWN BY THE STUDY TEAM";
|
|
395
418
|
/** A state {@link TELEGRAM_TERMINAL_HEADLINES} has a word for. */
|
|
396
419
|
export type TelegramTerminalState = keyof typeof TELEGRAM_TERMINAL_HEADLINES;
|
|
397
420
|
/** Whether a derived request state is one an annotation can settle a message on. */
|
|
@@ -551,6 +574,21 @@ export interface TelegramConfig {
|
|
|
551
574
|
* nothing else: no policy key and nothing in an update can set it.
|
|
552
575
|
*/
|
|
553
576
|
staleCopy?: boolean;
|
|
577
|
+
/**
|
|
578
|
+
* Study mode (amended SPEC.md §8, the study record). Off unless exactly
|
|
579
|
+
* `true`.
|
|
580
|
+
*
|
|
581
|
+
* On, every per-request card (technical and minimal) carries a second row
|
|
582
|
+
* with one "Looks wrong" button, and the `w` callback it carries is parsed as
|
|
583
|
+
* a reject flagged `looks_wrong`. Off, the cards and the callback parser are
|
|
584
|
+
* exactly what they were before the key existed: no second row, and `w:` is
|
|
585
|
+
* a malformed callback. Digest cards never carry the button.
|
|
586
|
+
*
|
|
587
|
+
* Launch configuration and nothing else, for {@link staleCopy}'s reason: the
|
|
588
|
+
* verb sets it from `APPROVAL_STUDY_MODE` once, at prepare. No policy key and
|
|
589
|
+
* nothing in an update can set it.
|
|
590
|
+
*/
|
|
591
|
+
study?: boolean;
|
|
554
592
|
/**
|
|
555
593
|
* Which layout a prompt is drawn in (APRV-489), from
|
|
556
594
|
* `channels.telegram.prompt.style`. Passed in by the verb, which has already
|
|
@@ -1108,6 +1146,15 @@ export declare function renderDigest(digest: DigestState): {
|
|
|
1108
1146
|
*/
|
|
1109
1147
|
export declare const ACTION_REF_HEX = 16;
|
|
1110
1148
|
export declare function actionRefOf(actionKey: string): string;
|
|
1149
|
+
/** How many hex characters of the key's sha256 a study log line carries. */
|
|
1150
|
+
export declare const STUDY_LOG_REF_HEX = 12;
|
|
1151
|
+
/**
|
|
1152
|
+
* The short reference a "Looks wrong" detection line names (amended SPEC.md
|
|
1153
|
+
* §8): the first {@link STUDY_LOG_REF_HEX} hex of the key's sha256, a prefix of
|
|
1154
|
+
* {@link actionRefOf}, so an operator holding the key can match the line and a
|
|
1155
|
+
* reader holding the line cannot recover the key.
|
|
1156
|
+
*/
|
|
1157
|
+
export declare function studyLogRefOf(actionKey: string): string;
|
|
1111
1158
|
/**
|
|
1112
1159
|
* `callback_data` for one button: `<g|r>:<nonce>:<action ref>`.
|
|
1113
1160
|
*
|
|
@@ -1118,7 +1165,7 @@ export declare function actionRefOf(actionKey: string): string;
|
|
|
1118
1165
|
* for the copy whose nonce this process never issued, and {@link actionRefOf}
|
|
1119
1166
|
* states the bound on what that fallback may reach.
|
|
1120
1167
|
*/
|
|
1121
|
-
export declare function callbackData(verb: "g" | "r", nonce: string, actionKey: string): string;
|
|
1168
|
+
export declare function callbackData(verb: "g" | "r" | "w", nonce: string, actionKey: string): string;
|
|
1122
1169
|
/**
|
|
1123
1170
|
* `callback_data` for a digest's "all" button: `<G|R>:<nonce>` (APRV-115).
|
|
1124
1171
|
*
|
|
@@ -1182,8 +1229,13 @@ interface ParsedCallback {
|
|
|
1182
1229
|
nonce: string;
|
|
1183
1230
|
/** {@link actionRefOf} of the action this button was drawn for, when present. */
|
|
1184
1231
|
actionRef: string | null;
|
|
1232
|
+
/**
|
|
1233
|
+
* Set by the study-mode `w` verb alone (amended SPEC.md §8): the resident
|
|
1234
|
+
* tapped "Looks wrong", which is a reject with this flag recorded.
|
|
1235
|
+
*/
|
|
1236
|
+
flag?: "looks_wrong";
|
|
1185
1237
|
}
|
|
1186
|
-
export declare function parseCallbackData(data: unknown): ParsedCallback | null;
|
|
1238
|
+
export declare function parseCallbackData(data: unknown, study?: boolean): ParsedCallback | null;
|
|
1187
1239
|
/**
|
|
1188
1240
|
* The headline of a retrospective review card.
|
|
1189
1241
|
*
|
|
@@ -1829,6 +1881,11 @@ export declare class TelegramChannel implements TestableChannel {
|
|
|
1829
1881
|
* carries can change it.
|
|
1830
1882
|
*/
|
|
1831
1883
|
private readonly staleCopy;
|
|
1884
|
+
/**
|
|
1885
|
+
* Study mode (amended SPEC.md §8). Fixed at construction from
|
|
1886
|
+
* {@link TelegramConfig.study}; nothing an update carries can change it.
|
|
1887
|
+
*/
|
|
1888
|
+
private readonly study;
|
|
1832
1889
|
/**
|
|
1833
1890
|
* Where a `nonce-not-issued` refusal is recorded (APRV-456). The runtime's,
|
|
1834
1891
|
* like every other handler here; absent, the refusal still happens and only
|
|
@@ -1961,6 +2018,8 @@ export declare class TelegramChannel implements TestableChannel {
|
|
|
1961
2018
|
* copies still decide when they do not.
|
|
1962
2019
|
*/
|
|
1963
2020
|
staleCopyEnabled(): boolean;
|
|
2021
|
+
/** Whether study mode is on (amended SPEC.md §8): fixed at construction. */
|
|
2022
|
+
studyModeEnabled(): boolean;
|
|
1964
2023
|
/**
|
|
1965
2024
|
* Register what to do with a checkpoint tap (APRV-257).
|
|
1966
2025
|
*
|
|
@@ -2100,6 +2159,20 @@ export declare class TelegramChannel implements TestableChannel {
|
|
|
2100
2159
|
* exactly two things: the heading, and whether anything is armed.
|
|
2101
2160
|
*/
|
|
2102
2161
|
private sendPrompt;
|
|
2162
|
+
/**
|
|
2163
|
+
* The study-mode row under a per-request card (amended SPEC.md §8): one
|
|
2164
|
+
* "Looks wrong" button on a row of its own, so the Approve/Reject row keeps
|
|
2165
|
+
* its bytes and layout. Empty when study mode is off, which leaves the
|
|
2166
|
+
* keyboard exactly as it was before study mode existed.
|
|
2167
|
+
*
|
|
2168
|
+
* Empty on a policy attestation prompt too (APRV-528). Such a prompt is
|
|
2169
|
+
* answered by attesting or declining, and `channels/contract.ts` routes its
|
|
2170
|
+
* gesture to the attestation path, which records no study reason: a flag
|
|
2171
|
+
* drawn there would be counted by the detection line yet held by no log
|
|
2172
|
+
* record. The prompt is known by its `policy_diff` and, as the contract
|
|
2173
|
+
* routes it, by its `policy.attest:` key.
|
|
2174
|
+
*/
|
|
2175
|
+
private studyRows;
|
|
2103
2176
|
private deliverOne;
|
|
2104
2177
|
/**
|
|
2105
2178
|
* Send `request` as ONE minimal card (APRV-489), or report why it was not.
|
|
@@ -227,6 +227,7 @@ import { GLOSS_UNVERIFIED_SUFFIX, refusedDecisionLine } from "./contract.js";
|
|
|
227
227
|
// §11.1 invariant 10's guard scans the modules that decide, which this is not.
|
|
228
228
|
import { REACTIONS } from "../core/audit.js";
|
|
229
229
|
import { DEFAULT_PROMPT_STYLE, TELEGRAM_PROMPT_LAYOUT, } from "../core/prompt-layout.js";
|
|
230
|
+
import { isAttestationActionKey } from "../core/policy-proposal.js";
|
|
230
231
|
import { commandPayloadView, payloadRegionText } from "./payload-view.js";
|
|
231
232
|
import { MINIMAL_DENY_LABEL, renderTelegramMinimal } from "./telegram-minimal.js";
|
|
232
233
|
// ---------------------------------------------------------------------------
|
|
@@ -418,6 +419,29 @@ export const TELEGRAM_TERMINAL_HEADLINES = {
|
|
|
418
419
|
expired: "✗ EXPIRED — the approval window closed",
|
|
419
420
|
withdrawn: "WITHDRAWN — no decision is needed",
|
|
420
421
|
};
|
|
422
|
+
/**
|
|
423
|
+
* The headline a "Looks wrong" tap settles its card on (amended SPEC.md §8,
|
|
424
|
+
* the study record). The record underneath is an ordinary `approval.rejected`;
|
|
425
|
+
* this says, in the resident's words, that the card was skipped because they
|
|
426
|
+
* flagged it. Emoji-free like every other headline here.
|
|
427
|
+
*/
|
|
428
|
+
export const TELEGRAM_LOOKS_WRONG_HEADLINE = "SKIPPED — you flagged this as looks wrong";
|
|
429
|
+
/**
|
|
430
|
+
* The label of the study-mode button (amended SPEC.md §8, the study record).
|
|
431
|
+
* Drawn only while the listener was launched with `APPROVAL_STUDY_MODE=1`, on a
|
|
432
|
+
* row of its own under Approve and Reject. Its verb is `w`, a reject with the
|
|
433
|
+
* `looks_wrong` flag.
|
|
434
|
+
*/
|
|
435
|
+
export const TELEGRAM_LOOKS_WRONG_LABEL = "🚩 Looks wrong";
|
|
436
|
+
/**
|
|
437
|
+
* The headline a card settles on when the study team withdrew its request
|
|
438
|
+
* (amended SPEC.md §8, the study record: an `approval.rejected` carrying
|
|
439
|
+
* `payload.study.reason` `study_withdrawn`). It replaces "✗ REJECTED" for that
|
|
440
|
+
* record only, so the resident reads that nobody they know said no and that
|
|
441
|
+
* nothing ran. The operator id in the record is never shown. Emoji-free like
|
|
442
|
+
* every other headline here.
|
|
443
|
+
*/
|
|
444
|
+
export const TELEGRAM_STUDY_WITHDRAWN_HEADLINE = "WITHDRAWN BY THE STUDY TEAM";
|
|
421
445
|
/** Whether a derived request state is one an annotation can settle a message on. */
|
|
422
446
|
export function isTelegramTerminalState(state) {
|
|
423
447
|
return Object.prototype.hasOwnProperty.call(TELEGRAM_TERMINAL_HEADLINES, state);
|
|
@@ -1333,6 +1357,17 @@ export const ACTION_REF_HEX = 16;
|
|
|
1333
1357
|
export function actionRefOf(actionKey) {
|
|
1334
1358
|
return createHash("sha256").update(actionKey, "utf8").digest("hex").slice(0, ACTION_REF_HEX);
|
|
1335
1359
|
}
|
|
1360
|
+
/** How many hex characters of the key's sha256 a study log line carries. */
|
|
1361
|
+
export const STUDY_LOG_REF_HEX = 12;
|
|
1362
|
+
/**
|
|
1363
|
+
* The short reference a "Looks wrong" detection line names (amended SPEC.md
|
|
1364
|
+
* §8): the first {@link STUDY_LOG_REF_HEX} hex of the key's sha256, a prefix of
|
|
1365
|
+
* {@link actionRefOf}, so an operator holding the key can match the line and a
|
|
1366
|
+
* reader holding the line cannot recover the key.
|
|
1367
|
+
*/
|
|
1368
|
+
export function studyLogRefOf(actionKey) {
|
|
1369
|
+
return actionRefOf(actionKey).slice(0, STUDY_LOG_REF_HEX);
|
|
1370
|
+
}
|
|
1336
1371
|
/**
|
|
1337
1372
|
* `callback_data` for one button: `<g|r>:<nonce>:<action ref>`.
|
|
1338
1373
|
*
|
|
@@ -1439,13 +1474,23 @@ const CALLBACK_VERBS = {
|
|
|
1439
1474
|
G: { decision: "grant", scope: "all" },
|
|
1440
1475
|
R: { decision: "reject", scope: "all" },
|
|
1441
1476
|
};
|
|
1442
|
-
|
|
1477
|
+
/**
|
|
1478
|
+
* The study-mode verb (amended SPEC.md §8), in a table of its own so that the
|
|
1479
|
+
* base vocabulary above is untouched. Consulted only when the caller passes
|
|
1480
|
+
* `study`, which a listener does only when it was launched with
|
|
1481
|
+
* `APPROVAL_STUDY_MODE=1`; otherwise `w:` is no verb at all and the callback is
|
|
1482
|
+
* malformed, exactly as before the verb existed.
|
|
1483
|
+
*/
|
|
1484
|
+
const STUDY_CALLBACK_VERB = { decision: "reject", scope: "one", flag: "looks_wrong" };
|
|
1485
|
+
export function parseCallbackData(data, study = false) {
|
|
1443
1486
|
if (typeof data !== "string")
|
|
1444
1487
|
return null;
|
|
1445
1488
|
const first = data.indexOf(":");
|
|
1446
1489
|
if (first === -1)
|
|
1447
1490
|
return null;
|
|
1448
|
-
const
|
|
1491
|
+
const head = data.slice(0, first);
|
|
1492
|
+
const studyVerb = study && head === "w";
|
|
1493
|
+
const verb = studyVerb ? STUDY_CALLBACK_VERB : CALLBACK_VERBS[head];
|
|
1449
1494
|
if (verb === undefined)
|
|
1450
1495
|
return null;
|
|
1451
1496
|
const rest = data.slice(first + 1);
|
|
@@ -1458,6 +1503,7 @@ export function parseCallbackData(data) {
|
|
|
1458
1503
|
scope: verb.scope,
|
|
1459
1504
|
nonce,
|
|
1460
1505
|
actionRef: second === -1 ? null : rest.slice(second + 1),
|
|
1506
|
+
...(studyVerb ? { flag: STUDY_CALLBACK_VERB.flag } : {}),
|
|
1461
1507
|
};
|
|
1462
1508
|
}
|
|
1463
1509
|
// ---------------------------------------------------------------------------
|
|
@@ -2153,6 +2199,11 @@ export class TelegramChannel {
|
|
|
2153
2199
|
* carries can change it.
|
|
2154
2200
|
*/
|
|
2155
2201
|
staleCopy;
|
|
2202
|
+
/**
|
|
2203
|
+
* Study mode (amended SPEC.md §8). Fixed at construction from
|
|
2204
|
+
* {@link TelegramConfig.study}; nothing an update carries can change it.
|
|
2205
|
+
*/
|
|
2206
|
+
study;
|
|
2156
2207
|
/**
|
|
2157
2208
|
* Where a `nonce-not-issued` refusal is recorded (APRV-456). The runtime's,
|
|
2158
2209
|
* like every other handler here; absent, the refusal still happens and only
|
|
@@ -2311,6 +2362,8 @@ export class TelegramChannel {
|
|
|
2311
2362
|
// APRV-456. Only an explicit `true` or an absent key leaves the fallback on;
|
|
2312
2363
|
// anything else a caller passes turns it off, the stricter direction.
|
|
2313
2364
|
this.staleCopy = config.staleCopy === undefined || config.staleCopy === true;
|
|
2365
|
+
// Only an explicit `true` turns study mode on; anything else is off.
|
|
2366
|
+
this.study = config.study === true;
|
|
2314
2367
|
this.makeNonce =
|
|
2315
2368
|
config.nonce ??
|
|
2316
2369
|
(() => {
|
|
@@ -2348,6 +2401,10 @@ export class TelegramChannel {
|
|
|
2348
2401
|
staleCopyEnabled() {
|
|
2349
2402
|
return this.staleCopy;
|
|
2350
2403
|
}
|
|
2404
|
+
/** Whether study mode is on (amended SPEC.md §8): fixed at construction. */
|
|
2405
|
+
studyModeEnabled() {
|
|
2406
|
+
return this.study;
|
|
2407
|
+
}
|
|
2351
2408
|
/**
|
|
2352
2409
|
* Register what to do with a checkpoint tap (APRV-257).
|
|
2353
2410
|
*
|
|
@@ -2741,6 +2798,27 @@ export class TelegramChannel {
|
|
|
2741
2798
|
},
|
|
2742
2799
|
};
|
|
2743
2800
|
}
|
|
2801
|
+
/**
|
|
2802
|
+
* The study-mode row under a per-request card (amended SPEC.md §8): one
|
|
2803
|
+
* "Looks wrong" button on a row of its own, so the Approve/Reject row keeps
|
|
2804
|
+
* its bytes and layout. Empty when study mode is off, which leaves the
|
|
2805
|
+
* keyboard exactly as it was before study mode existed.
|
|
2806
|
+
*
|
|
2807
|
+
* Empty on a policy attestation prompt too (APRV-528). Such a prompt is
|
|
2808
|
+
* answered by attesting or declining, and `channels/contract.ts` routes its
|
|
2809
|
+
* gesture to the attestation path, which records no study reason: a flag
|
|
2810
|
+
* drawn there would be counted by the detection line yet held by no log
|
|
2811
|
+
* record. The prompt is known by its `policy_diff` and, as the contract
|
|
2812
|
+
* routes it, by its `policy.attest:` key.
|
|
2813
|
+
*/
|
|
2814
|
+
studyRows(nonce, request) {
|
|
2815
|
+
if (!this.study)
|
|
2816
|
+
return [];
|
|
2817
|
+
const actionKey = request.action_key.value;
|
|
2818
|
+
if (request.policy_diff !== undefined || isAttestationActionKey(actionKey))
|
|
2819
|
+
return [];
|
|
2820
|
+
return [[{ text: TELEGRAM_LOOKS_WRONG_LABEL, callback_data: callbackData("w", nonce, actionKey) }]];
|
|
2821
|
+
}
|
|
2744
2822
|
async deliverOne(request, batchDeliveryId) {
|
|
2745
2823
|
const actionKey = request.action_key.value;
|
|
2746
2824
|
const nonce = this.makeNonce();
|
|
@@ -2750,6 +2828,7 @@ export class TelegramChannel {
|
|
|
2750
2828
|
{ text: "✅ Approve", callback_data: callbackData("g", nonce, actionKey) },
|
|
2751
2829
|
{ text: "🛑 Reject", callback_data: callbackData("r", nonce, actionKey) },
|
|
2752
2830
|
],
|
|
2831
|
+
...this.studyRows(nonce, request),
|
|
2753
2832
|
],
|
|
2754
2833
|
};
|
|
2755
2834
|
// APRV-489. The minimal card is tried only when the policy asked for it,
|
|
@@ -2838,6 +2917,7 @@ export class TelegramChannel {
|
|
|
2838
2917
|
{ text: "✅ Approve", callback_data: callbackData("g", nonce, actionKey) },
|
|
2839
2918
|
{ text: MINIMAL_DENY_LABEL, callback_data: callbackData("r", nonce, actionKey) },
|
|
2840
2919
|
],
|
|
2920
|
+
...this.studyRows(nonce, request),
|
|
2841
2921
|
],
|
|
2842
2922
|
},
|
|
2843
2923
|
});
|
|
@@ -3681,7 +3761,9 @@ export class TelegramChannel {
|
|
|
3681
3761
|
await this.handleReviewTap(review, callbackId, result, sender);
|
|
3682
3762
|
return;
|
|
3683
3763
|
}
|
|
3684
|
-
|
|
3764
|
+
// The study verb `w` parses only when this listener was launched in study
|
|
3765
|
+
// mode; otherwise it is malformed below, exactly as before it existed.
|
|
3766
|
+
const parsed = parseCallbackData(query["data"], this.study);
|
|
3685
3767
|
if (parsed === null) {
|
|
3686
3768
|
await this.ignore(result, callbackId, "malformed-callback", `callback_data ${JSON.stringify(query["data"])} is not a decision this channel issued`, "Unrecognized button.");
|
|
3687
3769
|
return;
|
|
@@ -3759,6 +3841,9 @@ export class TelegramChannel {
|
|
|
3759
3841
|
...(parsed.decision === "reject"
|
|
3760
3842
|
? { note: `${TELEGRAM_REJECT_NOTE} (callback ${callbackId})` }
|
|
3761
3843
|
: {}),
|
|
3844
|
+
// Amended SPEC.md §8. A "Looks wrong" tap is this same reject with the
|
|
3845
|
+
// flag recorded; every check above and below is a Deny's.
|
|
3846
|
+
...(parsed.flag === "looks_wrong" ? { study: { reason: "looks_wrong" } } : {}),
|
|
3762
3847
|
};
|
|
3763
3848
|
if (this.handler === null) {
|
|
3764
3849
|
await this.ignore(result, callbackId, "unknown-callback", "a callback arrived before the runtime registered a decision handler", "The runtime is not ready to record decisions.");
|
|
@@ -3826,9 +3911,17 @@ export class TelegramChannel {
|
|
|
3826
3911
|
return;
|
|
3827
3912
|
}
|
|
3828
3913
|
const record = outcome.record;
|
|
3829
|
-
const
|
|
3830
|
-
|
|
3831
|
-
:
|
|
3914
|
+
const lookedWrong = parsed.flag === "looks_wrong" && outcome.decision === "reject";
|
|
3915
|
+
if (lookedWrong) {
|
|
3916
|
+
// The detection line: the 12-hex reference and nothing else. Never the
|
|
3917
|
+
// key text, a chat id, a sender id or any card text.
|
|
3918
|
+
this.complain(`approval: telegram looks_wrong ref=${studyLogRefOf(delivery.actionKey)}`);
|
|
3919
|
+
}
|
|
3920
|
+
const headline = lookedWrong
|
|
3921
|
+
? TELEGRAM_LOOKS_WRONG_HEADLINE
|
|
3922
|
+
: outcome.decision === "grant"
|
|
3923
|
+
? TELEGRAM_TERMINAL_HEADLINES.granted
|
|
3924
|
+
: TELEGRAM_TERMINAL_HEADLINES.rejected;
|
|
3832
3925
|
try {
|
|
3833
3926
|
await this.annotate(delivery.deliveryId, headline, [decidedLine(record.actor, record.ts, record.seq)], delivery.actionKey);
|
|
3834
3927
|
}
|