pm-slack 2026.10.26 → 2026.10.27
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/CHANGELOG.md +6 -0
- package/README.md +103 -3
- package/dist/delivery-evidence.d.ts +49 -0
- package/dist/delivery-evidence.d.ts.map +1 -0
- package/dist/delivery-evidence.js +62 -0
- package/dist/delivery-evidence.js.map +1 -0
- package/dist/index.d.ts +31 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +243 -86
- package/dist/index.js.map +1 -1
- package/dist/outbox.d.ts +53 -4
- package/dist/outbox.d.ts.map +1 -1
- package/dist/outbox.js +202 -58
- package/dist/outbox.js.map +1 -1
- package/dist/routing-explanation.d.ts +73 -0
- package/dist/routing-explanation.d.ts.map +1 -0
- package/dist/routing-explanation.js +39 -0
- package/dist/routing-explanation.js.map +1 -0
- package/docs/coalescing-example.md +5 -2
- package/docs/delivery-evidence-validation.md +133 -0
- package/docs/outbox-example.md +11 -6
- package/docs/routing-explanation-example.md +42 -0
- package/docs/routing-explanation-validation.md +54 -0
- package/manifest.json +1 -1
- package/package.json +11 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026.10.27 - 2026-10-27
|
|
4
|
+
|
|
5
|
+
### Other
|
|
6
|
+
|
|
7
|
+
- Use the pm SDK mutation feed for Slack outbox recovery ([pm-slack-3so4](https://github.com/unbraind/pm-slack/blob/main/.agents/pm/chores/pm-slack-3so4.toon))
|
|
8
|
+
|
|
3
9
|
## 2026.10.25 - 2026-10-25
|
|
4
10
|
|
|
5
11
|
### Added
|
package/README.md
CHANGED
|
@@ -104,7 +104,9 @@ delivery:
|
|
|
104
104
|
pm slack outbox --action resolve --key RECEIPT_KEY --decision skip
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
`skip`
|
|
107
|
+
`skip` and `abandon` record `skipped`, a terminal work state distinct from
|
|
108
|
+
`acknowledged`. They stop retries without proving non-delivery. Even an operator's
|
|
109
|
+
`acknowledged` resolution is a work decision, not a retained Slack response. Live or
|
|
108
110
|
reused sender PIDs refuse reconciliation by default. After independently verifying
|
|
109
111
|
that no sender is active, use `--force-reconcile` to override PID reuse, including
|
|
110
112
|
PID 1 in containers. Forcing an active sender can duplicate delivery; it is never
|
|
@@ -118,7 +120,8 @@ Command refusals exit nonzero. SDK callers receive `OutboxError` with typed `cod
|
|
|
118
120
|
`refused` count instead of aborting the drain.
|
|
119
121
|
|
|
120
122
|
The command returns compact TOON by default or JSON with `--json`: exact counts
|
|
121
|
-
for every state,
|
|
123
|
+
for every work state, separate `outcomes` totals (`delivered`, `withheld`,
|
|
124
|
+
`uncertain`), at most `--limit` receipts (1–100, default 20), and an explicit
|
|
122
125
|
`omitted` count. Continue inspection with `--after <next_cursor>` until
|
|
123
126
|
`next_cursor` is null; totals cover the whole outbox on every page. Payloads and
|
|
124
127
|
destinations are excluded. A drain inspects history
|
|
@@ -127,7 +130,7 @@ without truncation, then attempts at most the requested number of pending rows.
|
|
|
127
130
|
means delivery may have happened; it is not an acknowledgment.
|
|
128
131
|
|
|
129
132
|
The package root exports `SlackOutbox`, `captureSlackOutbox`, `slackDestination`,
|
|
130
|
-
`OutboxError`, and their intent/receipt/report/
|
|
133
|
+
`OutboxError`, `deriveSlackDeliveryOutcome`, and their intent/receipt/report/evidence types. The low-level
|
|
131
134
|
`drain(send, limit)` callback must make one attempt and report `acknowledged`
|
|
132
135
|
only on explicit success, `retry` only on a confirmed refusal, and `ambiguous`
|
|
133
136
|
whenever remote acceptance is uncertain. A `retry` ends the current drain; call
|
|
@@ -562,3 +565,100 @@ npx pm github sync --repo unbraind/pm-slack --dry-run
|
|
|
562
565
|
```
|
|
563
566
|
|
|
564
567
|
The tracked managed manifest records the extension; installed files are ignored. This preview does not enable scheduled sync. See `docs/certification-2026.10.4.md` for package gates and packed real-tracker command evidence.
|
|
568
|
+
|
|
569
|
+
## Notification routing explanations
|
|
570
|
+
|
|
571
|
+
Use `pm slack explain --item <id> --event <event> --revision <after_hash>`
|
|
572
|
+
for a single offline diagnosis. Add `--json` for JSON; the default TOON output
|
|
573
|
+
contains the same bounded evidence. Discover exact identities with the SDK
|
|
574
|
+
mutation feed (`listMutationEvents`): select the lifecycle event's item and
|
|
575
|
+
committed history `after_hash` (`full: true` includes the entry). Pass the feed's
|
|
576
|
+
one-based `version` as `--event-version` when a state hash repeats. The SDK identity
|
|
577
|
+
accepts the same optional `version` field. Without it, a repeated hash produces
|
|
578
|
+
`event_ambiguous`; with it, history is diagnosed but a reused hash cannot safely
|
|
579
|
+
attribute legacy delivery receipts and remains explicit uncertainty.
|
|
580
|
+
|
|
581
|
+
The typed SDK export `explainSlackRouting(pmRoot, { item, event, revision })`
|
|
582
|
+
verifies the complete item history against the authoritative SDK document,
|
|
583
|
+
replays the requested revision through the SDK, and uses the tracker's configured
|
|
584
|
+
status registry roles to classify the transition. It reports event and priority
|
|
585
|
+
filters (including exact priority operands), every ordered route rule (indices only), first-match shadowing, attention
|
|
586
|
+
policy, and exact-revision delivery evidence. Blockers and priority 0/1 events
|
|
587
|
+
name their budget/window bypass policy; bypass does not override eligibility
|
|
588
|
+
filters. Titles, bodies, selectors, channels and webhook URLs are never returned.
|
|
589
|
+
|
|
590
|
+
Retained eligibility epochs and receipts are historical evidence. Route evaluation
|
|
591
|
+
uses current configuration, which was not historically snapshotted. Coalescing
|
|
592
|
+
receipts omit the historical budget/window parameters; this uncertainty is explicit.
|
|
593
|
+
They are retained observations and may be stale after retries; absent receipts
|
|
594
|
+
never prove delivery or non-delivery. One reducer, `deriveSlackDeliveryOutcome`,
|
|
595
|
+
uses immutable `attempt_started` / terminal record pairs and a durable
|
|
596
|
+
`request_dispatched` marker written immediately before entering the network API.
|
|
597
|
+
Terminal results are `confirmed`, `not_sent`, `rejected`, or `unknown_after_send`.
|
|
598
|
+
Open attempts are derived on read. Recovery closes dead senders as `not_sent`
|
|
599
|
+
before dispatch and `unknown_after_send` after dispatch; live retired senders
|
|
600
|
+
can still append their actual terminal result. Counters do not establish proof.
|
|
601
|
+
Any confirmed attempt proves `delivered`. Otherwise an unknown/open dispatched
|
|
602
|
+
attempt gives `uncertain`; otherwise the outcome is `withheld`. Operator retry,
|
|
603
|
+
skip, abandon and acknowledgment do not change past attempt records. A confirmed
|
|
604
|
+
retry can therefore prove delivery after an earlier uncertain attempt.
|
|
605
|
+
A retained eligibility exclusion also proves withholding when no receipt exists.
|
|
606
|
+
Legacy attempted receipts without a complete journal remain uncertain.
|
|
607
|
+
`classifySlackTransition` is the exported classifier used by capture, recovery,
|
|
608
|
+
explanation and digest buckets. Each uses SDK alias normalization and the status
|
|
609
|
+
registry loaded from tracker settings;
|
|
610
|
+
configured roles override literal names (including `done` configured as blocked).
|
|
611
|
+
Literal status names are a fallback inside that classifier only. Status roles use
|
|
612
|
+
the current registry, and this historical limitation is explicit in every result.
|
|
613
|
+
|
|
614
|
+
Output has six stages plus at most 100 indexed routing-rule decisions. Identity
|
|
615
|
+
validation accepts only item, event, revision and the optional positive safe integer version, a bounded safe item id, a
|
|
616
|
+
canonical event and a lowercase 64-character SDK history hash. Routing rules are
|
|
617
|
+
strictly bounded to 100 entries and 250000 characters; selectors to 160 and overrides
|
|
618
|
+
to 2048 characters. Priority configuration must be an integer 1..4. Invalid input,
|
|
619
|
+
invalid routing configuration, unknown/non-lifecycle or ambiguous repeated state hashes, unreadable history
|
|
620
|
+
and unreadable storage return typed nonzero refusals with remedies. Foreign
|
|
621
|
+
receipt/policy records are skipped with `foreign_evidence_skipped` uncertainty.
|
|
622
|
+
|
|
623
|
+
The command reads one item's retained history and opens existing outbox storage
|
|
624
|
+
read-only in a single SQLite snapshot. It never creates an outbox, captures events,
|
|
625
|
+
drains, sends, or changes tracker files. History verification reads the full
|
|
626
|
+
selected item stream; work scales with that stream, while output stays bounded.
|
|
627
|
+
See the [SDK/CLI example](docs/routing-explanation-example.md) and
|
|
628
|
+
[public-tracker measurement](docs/routing-explanation-validation.md).
|
|
629
|
+
|
|
630
|
+
### Without git
|
|
631
|
+
|
|
632
|
+
Notification previews, digests, routing explanations, and local durable outbox
|
|
633
|
+
inspection work on plain initialized trackers without a git executable. Slack
|
|
634
|
+
posting needs an explicitly configured webhook and network connectivity. The
|
|
635
|
+
explanation command needs neither. It makes zero network calls.
|
|
636
|
+
|
|
637
|
+
### Retained delivery proof
|
|
638
|
+
|
|
639
|
+
Each claim appends an immutable started record and token under the same SQLite writer
|
|
640
|
+
transaction as its work claim. Completion records that token's actual transport
|
|
641
|
+
result before releasing work. A late completion can settle its own evidence after
|
|
642
|
+
operator reconciliation without overwriting a peer's work state. Operator decisions
|
|
643
|
+
are journaled separately. Open attempts are derived from started records without a terminal fact;
|
|
644
|
+
unknown/foreign results and incomplete legacy history remain uncertain.
|
|
645
|
+
|
|
646
|
+
`status`, plain/coalesced drain reports, coalescing manifests, and explanations all
|
|
647
|
+
call `deriveSlackDeliveryOutcome`. Each report row has an `outcome`; aggregate
|
|
648
|
+
`outcomes` counts are separate from compatibility `counts`, which describe work
|
|
649
|
+
states only. Digest counts describe tracker activity and are unrelated to delivery.
|
|
650
|
+
Neither a skipped nor an operator-acknowledged count proves a delivery result.
|
|
651
|
+
Dispatch-aware SDK transports accept a third `OutboxSendContext` argument and
|
|
652
|
+
call `context.requestDispatched()` immediately before their network API and
|
|
653
|
+
`context.responseConfirmed()` immediately after a confirmed successful response.
|
|
654
|
+
The package transport does both automatically, including through asynchronous
|
|
655
|
+
wrappers that do not forward the context. A typed or untyped exception after
|
|
656
|
+
dispatch is uncertain unless a response was confirmed; an error code never proves
|
|
657
|
+
`not_sent`. Confirmation is retained before the caller resumes, so later callback
|
|
658
|
+
errors cannot hide a successful delivery. Existing
|
|
659
|
+
two-argument transports are conservatively marked before callback invocation.
|
|
660
|
+
A clean exit always closes its attempt, including cancellation and late refusal;
|
|
661
|
+
a process crash leaves recovery to the durable dispatch marker.
|
|
662
|
+
The attempt journal contains keys, attempt tokens, result codes and operator
|
|
663
|
+
decisions, never webhook URLs or message bodies. The explanation path still opens
|
|
664
|
+
existing storage read-only and never creates or migrates it.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { DatabaseSync } from "node:sqlite";
|
|
2
|
+
import type { OutboxState } from "./outbox.ts";
|
|
3
|
+
/** What retained transport evidence proves about a notification's delivery. */
|
|
4
|
+
export type SlackDeliveryOutcome = "delivered" | "withheld" | "uncertain";
|
|
5
|
+
/** Bounded sufficient statistics over the entire retained attempt/resolution journal. */
|
|
6
|
+
export interface SlackDeliveryEvidence {
|
|
7
|
+
/** Historical attempts lack a complete journal, so non-delivery cannot be proved. */
|
|
8
|
+
legacy_unknown: boolean;
|
|
9
|
+
/** Number of durable attempt records, including pre-request refusals. */
|
|
10
|
+
recorded: number;
|
|
11
|
+
/** Explicit successful Slack transport responses. */
|
|
12
|
+
confirmed: number;
|
|
13
|
+
/** Unfinished or ambiguous attempts, including unknown/foreign result values. */
|
|
14
|
+
uncertain: number;
|
|
15
|
+
/** Definite rejections, rate limits and pre-request refusals. */
|
|
16
|
+
definitive: number;
|
|
17
|
+
/** Operator decisions retained independently from transport evidence. */
|
|
18
|
+
resolutions: number;
|
|
19
|
+
}
|
|
20
|
+
/** Reduce full-lifecycle evidence; operator labels can never turn uncertainty into proof. */
|
|
21
|
+
export declare function deriveSlackDeliveryOutcome(evidence?: SlackDeliveryEvidence, policyExcluded?: boolean): SlackDeliveryOutcome;
|
|
22
|
+
/** Private-content-free receipt and its lifecycle proof, from one SQLite statement snapshot. */
|
|
23
|
+
export interface DeliveryEvidenceRow {
|
|
24
|
+
/** Durable sequence used by status cursors. */
|
|
25
|
+
sequence: number;
|
|
26
|
+
/** Exact receipt key. */
|
|
27
|
+
key: string;
|
|
28
|
+
/** Item identity, not its title or body. */
|
|
29
|
+
item: string;
|
|
30
|
+
/** Canonical event retained by the outbox. */
|
|
31
|
+
event: string;
|
|
32
|
+
/** Committed state revision. */
|
|
33
|
+
revision: string;
|
|
34
|
+
/** Workflow label, independent of delivery proof. */
|
|
35
|
+
state: OutboxState;
|
|
36
|
+
/** Compatibility attempt count; unsafe foreign numbers remain detectable. */
|
|
37
|
+
attempts: number;
|
|
38
|
+
/** Last retained coalescing observation. */
|
|
39
|
+
disposition: string | null;
|
|
40
|
+
/** Credential-free coalescing group identity. */
|
|
41
|
+
notification: string | null;
|
|
42
|
+
/** Complete lifecycle sufficient statistics. */
|
|
43
|
+
evidence: SlackDeliveryEvidence;
|
|
44
|
+
}
|
|
45
|
+
/** Read legacy or journaled receipts without creating tables, changing state or exposing private payloads. */
|
|
46
|
+
export declare function readDeliveryEvidenceRows(db: DatabaseSync, key?: string, journaled?: boolean): DeliveryEvidenceRow[];
|
|
47
|
+
/** Identify only rows whose domain and immutable key match records the package can write. */
|
|
48
|
+
export declare function isInspectableDeliveryEvidenceRow(row: DeliveryEvidenceRow): boolean;
|
|
49
|
+
//# sourceMappingURL=delivery-evidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-evidence.d.ts","sourceRoot":"","sources":["../delivery-evidence.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,+EAA+E;AAC/E,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,CAAC;AAE1E,yFAAyF;AACzF,MAAM,WAAW,qBAAqB;IACpC,qFAAqF;IACrF,cAAc,EAAE,OAAO,CAAC;IACxB,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,6FAA6F;AAC7F,wBAAgB,0BAA0B,CAAC,QAAQ,CAAC,EAAE,qBAAqB,EAAE,cAAc,UAAQ,GAAG,oBAAoB,CAQzH;AAED,gGAAgG;AAChG,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,KAAK,EAAE,WAAW,CAAC;IACnB,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,iDAAiD;IACjD,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,gDAAgD;IAChD,QAAQ,EAAE,qBAAqB,CAAC;CACjC;AAED,8GAA8G;AAC9G,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,SAAS,UAAO,GAAG,mBAAmB,EAAE,CAiChH;AAED,6FAA6F;AAC7F,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,mBAAmB,GAAG,OAAO,CAIlF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/** Delivery proof is independent of scheduling labels and operator decisions. */
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
/** Reduce full-lifecycle evidence; operator labels can never turn uncertainty into proof. */
|
|
4
|
+
export function deriveSlackDeliveryOutcome(evidence, policyExcluded = false) {
|
|
5
|
+
if (evidence === undefined)
|
|
6
|
+
return policyExcluded ? "withheld" : "uncertain";
|
|
7
|
+
if (typeof evidence !== "object" || evidence === null)
|
|
8
|
+
return "uncertain";
|
|
9
|
+
const values = [evidence.recorded, evidence.confirmed, evidence.uncertain, evidence.definitive, evidence.resolutions];
|
|
10
|
+
if (typeof evidence.legacy_unknown !== "boolean" || !values.every((value) => Number.isSafeInteger(value) && value >= 0) || evidence.confirmed + evidence.uncertain + evidence.definitive !== evidence.recorded)
|
|
11
|
+
return "uncertain";
|
|
12
|
+
// Confirmed delivery settles the event even if another request remains uncertain.
|
|
13
|
+
if (evidence.confirmed > 0)
|
|
14
|
+
return "delivered";
|
|
15
|
+
return evidence.legacy_unknown || evidence.uncertain > 0 ? "uncertain" : "withheld";
|
|
16
|
+
}
|
|
17
|
+
/** Read legacy or journaled receipts without creating tables, changing state or exposing private payloads. */
|
|
18
|
+
export function readDeliveryEvidenceRows(db, key, journaled = true) {
|
|
19
|
+
const where = key === undefined ? "" : " WHERE d.key=?";
|
|
20
|
+
const journalWhere = key === undefined ? "" : " WHERE key=?";
|
|
21
|
+
const paired = journaled && !!db.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='delivery_attempt_start'").get();
|
|
22
|
+
const journal = journaled ? `,COALESCE(p.legacy_unknown,0) AS legacy_unknown,
|
|
23
|
+
COALESCE(a.recorded,0) AS recorded,COALESCE(a.confirmed,0) AS confirmed,
|
|
24
|
+
COALESCE(a.uncertain,0) AS uncertain,COALESCE(a.definitive,0) AS definitive,COALESCE(r.resolutions,0) AS resolutions,
|
|
25
|
+
${paired ? "COALESCE(a.attempts,0)" : "d.attempts"} AS journal_attempts` : ",0 AS legacy_unknown,0 AS recorded,0 AS confirmed,0 AS uncertain,0 AS definitive,0 AS resolutions,d.attempts AS journal_attempts";
|
|
26
|
+
const aggregate = paired ? `SELECT s.key,COUNT(*) AS recorded,SUM(t.result='confirmed') AS confirmed,
|
|
27
|
+
SUM(CASE WHEN t.result='unknown_after_send' OR (t.result IS NULL AND x.token IS NOT NULL) OR (t.result IS NOT NULL AND t.result NOT IN ('confirmed','not_sent','rejected','unknown_after_send')) THEN 1 ELSE 0 END) AS uncertain,
|
|
28
|
+
SUM(CASE WHEN t.result IN ('not_sent','rejected') OR (t.result IS NULL AND x.token IS NULL) THEN 1 ELSE 0 END) AS definitive,
|
|
29
|
+
SUM(CASE WHEN t.result='not_sent' OR (t.result IS NULL AND x.token IS NULL) THEN 0 ELSE 1 END) AS attempts
|
|
30
|
+
FROM delivery_attempt_start s LEFT JOIN delivery_attempt_terminal t ON t.key=s.key AND t.token=s.token
|
|
31
|
+
LEFT JOIN delivery_request_dispatched x ON x.key=s.key AND x.token=s.token${key === undefined ? "" : " WHERE s.key=?"} GROUP BY s.key` :
|
|
32
|
+
`SELECT key,COUNT(*) AS recorded,SUM(result='acknowledged') AS confirmed,
|
|
33
|
+
SUM(result NOT IN ('acknowledged','rejected','retry','not_sent')) AS uncertain,
|
|
34
|
+
SUM(result IN ('rejected','retry','not_sent')) AS definitive FROM delivery_attempt${journalWhere} GROUP BY key`;
|
|
35
|
+
const joins = journaled ? ` LEFT JOIN delivery_proof p ON p.key=d.key
|
|
36
|
+
LEFT JOIN (${aggregate}) a ON a.key=d.key
|
|
37
|
+
LEFT JOIN (SELECT key,COUNT(*) AS resolutions FROM delivery_resolution${journalWhere} GROUP BY key) r ON r.key=d.key` : "";
|
|
38
|
+
const query = db.prepare(`SELECT CAST(d.rowid AS TEXT) AS sequence,d.key,d.item,d.event,d.revision,d.state,CAST(d.attempts AS TEXT) AS attempts,c.disposition,c.notification${journal}
|
|
39
|
+
FROM delivery d LEFT JOIN coalescing_receipt c ON c.key=d.key${joins}${where} ORDER BY d.rowid`);
|
|
40
|
+
const parameters = [];
|
|
41
|
+
if (key !== undefined) {
|
|
42
|
+
if (journaled)
|
|
43
|
+
parameters.push(key, key);
|
|
44
|
+
parameters.push(key);
|
|
45
|
+
}
|
|
46
|
+
const rows = query.all(...parameters);
|
|
47
|
+
return rows.map((row) => {
|
|
48
|
+
const recorded = Number(row.recorded);
|
|
49
|
+
const attempts = Number(row.attempts);
|
|
50
|
+
return { sequence: Number(row.sequence), key: String(row.key), item: String(row.item), event: String(row.event), revision: String(row.revision), state: row.state, attempts: Number.isSafeInteger(attempts) && attempts >= 0 && paired ? Number(row.journal_attempts) : attempts,
|
|
51
|
+
disposition: row.disposition, notification: row.notification,
|
|
52
|
+
evidence: { legacy_unknown: row.legacy_unknown !== 0 || (!paired && attempts > recorded) || (!journaled && ["sending", "ambiguous", "acknowledged"].includes(String(row.state))),
|
|
53
|
+
recorded, confirmed: Number(row.confirmed), uncertain: Number(row.uncertain), definitive: Number(row.definitive), resolutions: Number(row.resolutions) } };
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/** Identify only rows whose domain and immutable key match records the package can write. */
|
|
57
|
+
export function isInspectableDeliveryEvidenceRow(row) {
|
|
58
|
+
return Number.isSafeInteger(row.sequence) && row.sequence > 0 && Number.isSafeInteger(row.attempts) && row.attempts >= 0 &&
|
|
59
|
+
["pending", "sending", "acknowledged", "ambiguous", "rejected", "refused", "skipped"].includes(row.state) &&
|
|
60
|
+
row.key === createHash("sha256").update(JSON.stringify([row.item, row.event, row.revision])).digest("hex");
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=delivery-evidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-evidence.js","sourceRoot":"","sources":["../delivery-evidence.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAuBzC,6FAA6F;AAC7F,MAAM,UAAU,0BAA0B,CAAC,QAAgC,EAAE,cAAc,GAAG,KAAK;IACjG,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,cAAc,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;IAC7E,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,WAAW,CAAC;IAC1E,MAAM,MAAM,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAE,QAA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,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/G,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -29,14 +29,20 @@
|
|
|
29
29
|
* First matching rule wins; unset fields fall back to the defaults.
|
|
30
30
|
*/
|
|
31
31
|
import type { ExtensionApi } from "@unbrained/pm-cli/sdk/authoring";
|
|
32
|
+
export { deriveSlackDeliveryOutcome } from "./delivery-evidence.ts";
|
|
33
|
+
export type { SlackDeliveryEvidence, SlackDeliveryOutcome } from "./delivery-evidence.ts";
|
|
34
|
+
import { resolveRuntimeStatusRegistry } from "@unbrained/pm-cli/sdk";
|
|
32
35
|
import { SlackOutbox } from "./outbox.ts";
|
|
33
|
-
import type { OutboxOutcome, OutboxEvent, OutboxRecoveryReport } from "./outbox.ts";
|
|
36
|
+
import type { OutboxPayload, OutboxOutcome, OutboxEvent, OutboxRecoveryReport, OutboxSendContext } from "./outbox.ts";
|
|
34
37
|
export { planSlackCoalescing, CoalescingError } from "./coalescing.ts";
|
|
35
38
|
export type { CoalescingEvent, CoalescingOptions, CoalescingPlan, CoalescingReceipt, CoalescingDisposition, CoalescedNotification } from "./coalescing.ts";
|
|
36
39
|
export type { CoalescingReport } from "./outbox.ts";
|
|
37
40
|
export { SlackOutbox, OutboxError, slackDestination } from "./outbox.ts";
|
|
38
|
-
export type { OutboxIntent, OutboxPayload, OutboxReceipt, OutboxReport, OutboxState, OutboxEvent, OutboxOutcome, OutboxRefusalCode, OutboxDecision, OutboxRecoveryFilter, OutboxRecoveryPolicy, OutboxRecoveryReport } from "./outbox.ts";
|
|
41
|
+
export type { OutboxSend, OutboxSendContext, OutboxIntent, OutboxPayload, OutboxReceipt, OutboxReport, OutboxState, OutboxEvent, OutboxOutcome, OutboxRefusalCode, OutboxDecision, OutboxRecoveryFilter, OutboxRecoveryPolicy, OutboxRecoveryReport } from "./outbox.ts";
|
|
39
42
|
export type { OutboxRecoveryFailure, OutboxRecoveryFailureReason } from "./outbox.ts";
|
|
43
|
+
import type { SlackRoutingIdentity, SlackRoutingExplanation } from "./routing-explanation.ts";
|
|
44
|
+
export { SlackRoutingError } from "./routing-explanation.ts";
|
|
45
|
+
export type { SlackRoutingIdentity, SlackRoutingExplanation, SlackRoutingStep } from "./routing-explanation.ts";
|
|
40
46
|
import type { AfterCommandHookContext } from "@unbrained/pm-cli/sdk";
|
|
41
47
|
declare class CommandError extends Error {
|
|
42
48
|
exitCode: number;
|
|
@@ -218,7 +224,7 @@ export declare const SLACK_POSTING_COMMANDS: readonly ["slack notify", "slack di
|
|
|
218
224
|
* a configured webhook would refuse the one command that exists to work without
|
|
219
225
|
* one.
|
|
220
226
|
*/
|
|
221
|
-
export declare const SLACK_OFFLINE_COMMANDS: readonly ["slack test", "slack outbox", "slack coalesce"];
|
|
227
|
+
export declare const SLACK_OFFLINE_COMMANDS: readonly ["slack test", "slack outbox", "slack coalesce", "slack explain"];
|
|
222
228
|
/**
|
|
223
229
|
* Whether `command` is one this package gates a webhook on.
|
|
224
230
|
*
|
|
@@ -484,7 +490,7 @@ declare function isRetryableSlackError(err: unknown): boolean;
|
|
|
484
490
|
* @param payload - The Slack message payload to JSON-encode and send.
|
|
485
491
|
* @returns Resolves once Slack acknowledges the post with a 2xx status.
|
|
486
492
|
*/
|
|
487
|
-
declare function postToSlackOnce(webhookUrl: string, payload: SlackPayload): Promise<void>;
|
|
493
|
+
declare function postToSlackOnce(webhookUrl: string, payload: SlackPayload, dispatched?: () => void, confirmed?: () => void): Promise<void>;
|
|
488
494
|
/** Metadata used for digest aggregation and item lines, independent of notification priorities. */
|
|
489
495
|
interface DigestItem {
|
|
490
496
|
/** Stable SDK item identity. */
|
|
@@ -519,11 +525,11 @@ interface DigestSummary {
|
|
|
519
525
|
* Aggregate store items into digest buckets for the window. An item counts as:
|
|
520
526
|
* - created if created_at >= cutoff
|
|
521
527
|
* - closed if it is in a closed/done status AND updated_at >= cutoff
|
|
522
|
-
* - blocked if
|
|
523
|
-
* - in_progress if
|
|
528
|
+
* - blocked if the shared classifier reports block AND updated_at >= cutoff
|
|
529
|
+
* - in_progress if the shared classifier reports start AND updated_at >= cutoff
|
|
524
530
|
* An item may appear in multiple buckets (e.g. created and blocked).
|
|
525
531
|
*/
|
|
526
|
-
declare function aggregateDigest(items: DigestItem[], cutoffMs: number, windowLabel: string): DigestSummary;
|
|
532
|
+
declare function aggregateDigest(items: DigestItem[], cutoffMs: number, windowLabel: string, registry?: ReturnType<typeof resolveRuntimeStatusRegistry>): DigestSummary;
|
|
527
533
|
/**
|
|
528
534
|
* Build the plain-text (mrkdwn) activity digest message.
|
|
529
535
|
*
|
|
@@ -568,7 +574,18 @@ declare function buildDigestBlockKit(summary: DigestSummary, channel?: string):
|
|
|
568
574
|
* @returns The assembled Slack payload.
|
|
569
575
|
*/
|
|
570
576
|
declare function buildDigestPayload(summary: DigestSummary, format: MessageFormat, channel?: string): SlackPayload;
|
|
571
|
-
/**
|
|
577
|
+
/** One transition boundary shared by capture, recovery, explanation and legacy command adapters. */
|
|
578
|
+
export interface SlackTransition {
|
|
579
|
+
/** Command determines creation and provides legacy aliases only when no resulting status is known. */
|
|
580
|
+
command: string | undefined;
|
|
581
|
+
/** Authoritative resulting status, when available. */
|
|
582
|
+
status?: string;
|
|
583
|
+
/** Prior committed status; unchanged statuses are not lifecycle transitions. */
|
|
584
|
+
previousStatus?: string;
|
|
585
|
+
}
|
|
586
|
+
/** Classify a transition using SDK registry roles, with literals only when no registry definition exists. */
|
|
587
|
+
export declare function classifySlackTransition(input: SlackTransition, registry?: ReturnType<typeof resolveRuntimeStatusRegistry>): EventKind | null;
|
|
588
|
+
/** Legacy test/helper adapter delegates all status semantics to the single classifier. */
|
|
572
589
|
declare function statusToEvent(status: string | undefined): EventKind | null;
|
|
573
590
|
/**
|
|
574
591
|
* Detect the lifecycle event for a completed command. Strategy:
|
|
@@ -580,7 +597,7 @@ declare function statusToEvent(status: string | undefined): EventKind | null;
|
|
|
580
597
|
* open→reopen (from a closed/canceled state) and open→unblock (from
|
|
581
598
|
* blocked) so terminal-recovery transitions are distinguishable.
|
|
582
599
|
*/
|
|
583
|
-
declare function detectEvent(ctx: AfterCommandHookContext): EventKind | null;
|
|
600
|
+
declare function detectEvent(ctx: AfterCommandHookContext, registry?: ReturnType<typeof resolveRuntimeStatusRegistry>): EventKind | null;
|
|
584
601
|
/**
|
|
585
602
|
* Pull the touched item out of an afterCommand hook's result.
|
|
586
603
|
*
|
|
@@ -613,12 +630,16 @@ declare function outboxFailure(error: unknown): {
|
|
|
613
630
|
* @returns The durable outcome to store for that attempt.
|
|
614
631
|
*/
|
|
615
632
|
declare function classifyOutboxSendError(error: unknown): OutboxOutcome;
|
|
633
|
+
/** Send once: 429 and pre-request socket failures stay retryable; uncertain transmission stays ambiguous. */
|
|
634
|
+
declare function sendOutbox(destination: string, payload: OutboxPayload, context?: OutboxSendContext): Promise<OutboxOutcome>;
|
|
616
635
|
/**
|
|
617
636
|
* Recover opted-in lifecycle transitions from SDK mutation events, including commits whose hook never ran.
|
|
618
637
|
* History and items are read only. Invalid streams are counted and isolated before intent publication.
|
|
619
638
|
* Existing receipts win over later environment changes; frozen intents are never reformatted.
|
|
620
639
|
*/
|
|
621
640
|
export declare function captureSlackOutbox(pmRoot: string, outbox: SlackOutbox, itemIds?: readonly string[]): Promise<OutboxRecoveryReport>;
|
|
641
|
+
/** Diagnose one verified committed event without sending, recovering, or writing tracker/runtime state. */
|
|
642
|
+
export declare function explainSlackRouting(pmRoot: string, input: SlackRoutingIdentity): Promise<SlackRoutingExplanation>;
|
|
622
643
|
declare const _default: {
|
|
623
644
|
name: string;
|
|
624
645
|
version: string;
|
|
@@ -636,6 +657,7 @@ export default _default;
|
|
|
636
657
|
export declare const __test__: {
|
|
637
658
|
outboxFailure: typeof outboxFailure;
|
|
638
659
|
classifyOutboxSendError: typeof classifyOutboxSendError;
|
|
660
|
+
sendOutbox: typeof sendOutbox;
|
|
639
661
|
buildItemBlockKit: typeof buildItemBlockKit;
|
|
640
662
|
buildItemPayload: typeof buildItemPayload;
|
|
641
663
|
buildTextMessage: typeof buildTextMessage;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,iCAAiC,CAAC;AAGrF,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE1F,OAAO,EAA2P,4BAA4B,EAAwB,MAAM,uBAAuB,CAAC;AAEpV,OAAO,EAAE,WAAW,EAA2G,MAAM,aAAa,CAAC;AACnJ,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAgB,WAAW,EAAgB,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIlJ,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvE,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC3J,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACzE,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,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