@objectstack/plugin-approvals 9.2.0 → 9.4.0

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @objectstack/plugin-approvals@9.2.0 build /home/runner/work/framework/framework/packages/plugins/plugin-approvals
2
+ > @objectstack/plugin-approvals@9.4.0 build /home/runner/work/framework/framework/packages/plugins/plugin-approvals
3
3
  > tsup --config ../../../tsup.config.ts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- ESM dist/index.mjs 67.42 KB
14
- ESM dist/index.mjs.map 119.54 KB
15
- ESM ⚡️ Build success in 167ms
16
- CJS dist/index.js 68.76 KB
17
- CJS dist/index.js.map 120.72 KB
18
- CJS ⚡️ Build success in 169ms
13
+ CJS dist/index.js 121.38 KB
14
+ CJS dist/index.js.map 216.36 KB
15
+ CJS ⚡️ Build success in 294ms
16
+ ESM dist/index.mjs 119.71 KB
17
+ ESM dist/index.mjs.map 215.16 KB
18
+ ESM ⚡️ Build success in 301ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 24561ms
21
- DTS dist/index.d.mts 334.84 KB
22
- DTS dist/index.d.ts 334.84 KB
20
+ DTS ⚡️ Build success in 27171ms
21
+ DTS dist/index.d.mts 427.00 KB
22
+ DTS dist/index.d.ts 427.00 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # @objectstack/plugin-approvals
2
2
 
3
+ ## 9.4.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [060467a]
8
+ - Updated dependencies [0856476]
9
+ - Updated dependencies [fef38ec]
10
+ - Updated dependencies [b678d8c]
11
+ - Updated dependencies [b678d8c]
12
+ - Updated dependencies [b678d8c]
13
+ - @objectstack/spec@9.4.0
14
+ - @objectstack/metadata-core@9.4.0
15
+ - @objectstack/core@9.4.0
16
+ - @objectstack/formula@9.4.0
17
+ - @objectstack/platform-objects@9.4.0
18
+
19
+ ## 9.3.0
20
+
21
+ ### Minor Changes
22
+
23
+ - 3219191: ADR-0043 actionable approval links (#1743). `remind()` now fans out per approver: every concrete identity gets its own single-use approve/reject links in the notification payload. Tokens are 256-bit, stored as SHA-256 hashes only (`sys_approval_token`), scoped to one request + action + approver, 72h TTL, consumed-before-decide (replay burns), and re-validated at redemption against the live request (decided/recalled/reassigned ⇒ dead link). The plugin mounts a session-less bilingual confirm page at `GET /api/v1/approvals/act` (renders only — mail-gateway prefetch safe) and redeems exclusively on the `POST`, auditing the decision as the bound approver.
24
+ - f3c1735: Approver join table — the #1745 follow-up that makes approver-filtered pagination exact. New `sys_approval_approver` object holds one row per (pending request, approver identity); the service mirrors every `pending_approvers` change into it (open / decide / recall / send-back / reassign / SLA-escalate) and clears the rows when a request leaves `pending`, so the table tracks the live work queue, not the append-only history. `listRequests` / `countRequests` now resolve approver filters through this index (`$in` on indexed equality instead of a per-row CSV scan) and push status arrays down as `$in` — every filter is engine-side, so the page window and totals are correct at any table size; the old 500-row bounded-scan residual is gone. `rebuildApproverIndex()` rebuilds the index from the CSV source of truth, and runs idempotently at plugin start to backfill rows written before the index existed.
25
+ - 290f631: ADR-0044 flow-level send-back-for-revision (#1744). The approval node gains a third flow movement beyond approve/reject: `sendBack()` finalizes the pending request as `returned` (new `ApprovalStatus`), resumes the run down its `revise` edge to a wait point where the record lock releases, and the submitter's `resubmit()` re-enters the approval node over a declared back-edge, opening the next round's request (fresh approver slate, re-locked, `round` stamped via the config snapshot). Engine: `FlowEdgeSchema.type` gains `'back'` — cycle validation now requires the graph _minus_ back-edges to be a DAG (unmarked cycles still rejected), node re-entry overwrites outputs/appends steps, a 100-re-entry runaway guard backstops misauthored loops, and `cancelRun(runId, reason)` lands as the first run-cancel primitive (recall crossing a revise window cancels the parked run). `maxRevisions` (default 3) on the approval node config auto-rejects send-backs past the budget. REST: `POST /approvals/requests/:id/revise` and `/resubmit`. Audit kinds `revise`/`resubmit` join `ApprovalActionKind` and the `sys_approval_action` enum.
26
+ - 50b7b47: Approvals server-side pagination + search pushdown (#1745). `listRequests` accepts `q` / `limit` / `offset` — free-text search pushes into the engine query as an `$or` of `$contains` terms (the `payload_json` snapshot carries record titles, so titles match without a join), and the page window pushes down whenever the filter is fully pushable; approver/status-array filters still post-filter their bounded scan and window in memory (the documented residual until the approver join-table follow-up). New `countRequests` returns the unwindowed total (engine `count` when pushable). REST: `GET /approvals/requests` gains `q`/`limit`/`offset` and returns `{data, total}` when paging.
27
+ - f15d6f6: ADR-0042 SLA auto-escalation + ADR-0041 mechanical landing. plugin-approvals now owns a jobs-backed escalation scanner (`runEscalations`, interval job `approvals-sla-escalation` + boot catch-up): overdue pending requests escalate **at most once** (the `escalate` audit row is the idempotency marker, written audit-first) executing the node's `escalation.action` — notify / reassign-to-`escalateTo` / auto_approve / auto_reject as the reserved actor `system:sla`. The trigger packages drop their `plugin-` prefix (`@objectstack/trigger-record-change`, `@objectstack/trigger-schedule`) per ADR-0041, and `ActionDescriptor` gains an optional `maturity: 'ga' | 'beta' | 'reserved'` field so designers can grey out contract-ahead-of-runtime surfaces.
28
+ - f8684ea: Approvals thread interactions — the collaboration layer between submit and decide. `reassign()` hands a pending-approver slot to someone else (audit-first ordering, new approver notified via the optional `messaging` service), `remind()` nudges every pending approver with a 4h per-request throttle (`THROTTLED` → HTTP 429), `requestInfo()` sends a request back to the submitter for more material while it stays pending, and `comment()` adds free-form thread replies. Rows expose `sla_due_at` (`created_at + escalation.timeoutHours`, display-only) and single reads attach `flow_steps` (the owning flow's approval trunk with done/current/upcoming states). REST grows the four matching POST routes; the `sys_approval_action.action` enum gains the new kinds.
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [1ada658]
33
+ - Updated dependencies [3219191]
34
+ - Updated dependencies [290f631]
35
+ - Updated dependencies [50b7b47]
36
+ - Updated dependencies [f15d6f6]
37
+ - Updated dependencies [f8684ea]
38
+ - Updated dependencies [c802327]
39
+ - Updated dependencies [b4765be]
40
+ - @objectstack/spec@9.3.0
41
+ - @objectstack/platform-objects@9.3.0
42
+ - @objectstack/core@9.3.0
43
+ - @objectstack/formula@9.3.0
44
+ - @objectstack/metadata-core@9.3.0
45
+
3
46
  ## 9.2.0
4
47
 
5
48
  ### Patch Changes