@x12i/memorix-service 3.11.1 → 3.12.1

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 (60) hide show
  1. package/dist/app.d.ts.map +1 -1
  2. package/dist/app.js +6 -1
  3. package/dist/app.js.map +1 -1
  4. package/dist/hooks/contract.d.ts +9 -0
  5. package/dist/hooks/contract.d.ts.map +1 -0
  6. package/dist/hooks/contract.js +87 -0
  7. package/dist/hooks/contract.js.map +1 -0
  8. package/dist/hooks/deliver.d.ts +19 -0
  9. package/dist/hooks/deliver.d.ts.map +1 -0
  10. package/dist/hooks/deliver.js +57 -0
  11. package/dist/hooks/deliver.js.map +1 -0
  12. package/dist/hooks/enqueue.d.ts +4 -0
  13. package/dist/hooks/enqueue.d.ts.map +1 -0
  14. package/dist/hooks/enqueue.js +19 -0
  15. package/dist/hooks/enqueue.js.map +1 -0
  16. package/dist/hooks/store.d.ts +5 -0
  17. package/dist/hooks/store.d.ts.map +1 -0
  18. package/dist/hooks/store.js +285 -0
  19. package/dist/hooks/store.js.map +1 -0
  20. package/dist/hooks/types.d.ts +110 -0
  21. package/dist/hooks/types.d.ts.map +1 -0
  22. package/dist/hooks/types.js +37 -0
  23. package/dist/hooks/types.js.map +1 -0
  24. package/dist/hooks/validate.d.ts +19 -0
  25. package/dist/hooks/validate.d.ts.map +1 -0
  26. package/dist/hooks/validate.js +173 -0
  27. package/dist/hooks/validate.js.map +1 -0
  28. package/dist/hooks/worker.d.ts +12 -0
  29. package/dist/hooks/worker.d.ts.map +1 -0
  30. package/dist/hooks/worker.js +73 -0
  31. package/dist/hooks/worker.js.map +1 -0
  32. package/dist/hooks-live-routes.d.ts +4 -0
  33. package/dist/hooks-live-routes.d.ts.map +1 -0
  34. package/dist/hooks-live-routes.js +13 -0
  35. package/dist/hooks-live-routes.js.map +1 -0
  36. package/dist/hooks-live-ui.d.ts +3 -0
  37. package/dist/hooks-live-ui.d.ts.map +1 -0
  38. package/dist/hooks-live-ui.js +228 -0
  39. package/dist/hooks-live-ui.js.map +1 -0
  40. package/dist/hooks-live.d.ts +38 -0
  41. package/dist/hooks-live.d.ts.map +1 -0
  42. package/dist/hooks-live.js +51 -0
  43. package/dist/hooks-live.js.map +1 -0
  44. package/dist/live-ops-nav.d.ts.map +1 -1
  45. package/dist/live-ops-nav.js +4 -0
  46. package/dist/live-ops-nav.js.map +1 -1
  47. package/dist/openapi/openapi.json +177 -1
  48. package/dist/platform.d.ts +13 -0
  49. package/dist/platform.d.ts.map +1 -1
  50. package/dist/platform.js +133 -0
  51. package/dist/platform.js.map +1 -1
  52. package/dist/routes/data.d.ts.map +1 -1
  53. package/dist/routes/data.js +15 -0
  54. package/dist/routes/data.js.map +1 -1
  55. package/dist/routes/hooks.d.ts +4 -0
  56. package/dist/routes/hooks.d.ts.map +1 -0
  57. package/dist/routes/hooks.js +140 -0
  58. package/dist/routes/hooks.js.map +1 -0
  59. package/openapi/openapi.json +177 -1
  60. package/package.json +2 -2
@@ -0,0 +1,228 @@
1
+ /** HTML for GET /_live/hooks — subscription health and callback inbox. */
2
+ export function hooksLiveHtml() {
3
+ return `<!DOCTYPE html>
4
+ <html lang="en">
5
+ <head>
6
+ <meta charset="utf-8" />
7
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
8
+ <title>Memorix · Hook inbox</title>
9
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
10
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
11
+ <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet" />
12
+ <style>
13
+ :root {
14
+ --bg: #0a0c10; --bg-elev: #10141b; --bg-row: #141922; --line: #242b38;
15
+ --text: #e8ebe6; --muted: #8a9288; --dim: #5c645c;
16
+ --ok: #3dba7a; --bad: #e25a5a; --wait: #7eb8d4; --accent: #c8f082; --accent-ink: #0a0c10;
17
+ --sans: "IBM Plex Sans", system-ui, sans-serif;
18
+ --mono: "IBM Plex Mono", ui-monospace, monospace;
19
+ }
20
+ * { box-sizing: border-box; }
21
+ html, body { margin: 0; }
22
+ body {
23
+ font-family: var(--sans);
24
+ background:
25
+ radial-gradient(1200px 600px at 10% -10%, #1a2214 0%, transparent 55%),
26
+ radial-gradient(900px 500px at 100% 0%, #121820 0%, transparent 50%),
27
+ var(--bg);
28
+ color: var(--text); font-size: 14px; line-height: 1.45;
29
+ }
30
+ a { color: var(--accent); }
31
+ .shell { max-width: 1280px; margin: 0 auto; padding: 36px 28px 64px; }
32
+ header {
33
+ display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
34
+ margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
35
+ }
36
+ .brand { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
37
+ .brand span { color: var(--accent); }
38
+ .sub { margin-top: 8px; color: var(--muted); font-size: 13px; max-width: 68ch; }
39
+ .meta { text-align: right; font-family: var(--mono); font-size: 11px; color: var(--dim); display: grid; gap: 4px; }
40
+ .toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
41
+ .btn, select {
42
+ appearance: none; border: 1px solid var(--line); background: var(--bg-row); color: var(--text);
43
+ font: 500 12px/1 var(--sans); padding: 10px 14px; border-radius: 2px;
44
+ }
45
+ .btn { cursor: pointer; }
46
+ .btn:hover { border-color: var(--accent); }
47
+ select { min-width: 160px; }
48
+ .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
49
+ .card { background: var(--bg-elev); border: 1px solid var(--line); padding: 12px 14px; }
50
+ .card h3 {
51
+ margin: 0 0 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
52
+ text-transform: uppercase; color: var(--dim); font-weight: 500;
53
+ }
54
+ .card .val { font-family: var(--mono); font-size: 22px; font-weight: 600; }
55
+ .card.wait .val { color: var(--wait); }
56
+ .card.bad .val { color: var(--bad); }
57
+ .card.ok .val { color: var(--ok); }
58
+ h2 {
59
+ margin: 22px 0 10px; font-size: 12px; font-family: var(--mono);
60
+ letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); font-weight: 500;
61
+ }
62
+ table { width: 100%; border-collapse: collapse; background: var(--bg-elev); border: 1px solid var(--line); }
63
+ th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
64
+ th {
65
+ font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
66
+ color: var(--dim); font-weight: 500; background: #0d1016; position: sticky; top: 0;
67
+ }
68
+ tr:last-child td { border-bottom: 0; }
69
+ tr:hover td { background: var(--bg-row); }
70
+ tr.clickable { cursor: pointer; }
71
+ .mono { font-family: var(--mono); font-size: 12px; color: var(--muted); }
72
+ .badge { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border: 1px solid var(--line); }
73
+ .badge.pending { color: var(--wait); }
74
+ .badge.delivered { color: var(--ok); }
75
+ .badge.rejected, .badge.failed, .badge.failing { color: var(--bad); }
76
+ .badge.ok { color: var(--ok); }
77
+ .err { color: var(--bad); margin: 8px 0; }
78
+ .detail {
79
+ margin-top: 8px; padding: 12px; background: #0d1016; border: 1px solid var(--line);
80
+ font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: pre-wrap;
81
+ }
82
+ footer { margin-top: 28px; color: var(--dim); font-size: 12px; }
83
+ </style>
84
+ </head>
85
+ <body>
86
+ <div class="shell">
87
+ <header>
88
+ <div>
89
+ <div class="brand">Memorix <span>hook inbox</span></div>
90
+ <p class="sub">Registered callbacks and the notices still waiting. A POST is informed only on 202 <span class="mono">{ accepted: true }</span> or 409. Anything else stays pending until the subscriber accepts it or clears it.</p>
91
+ </div>
92
+ <div class="meta">
93
+ <div><strong>UI</strong> /_live/hooks</div>
94
+ <div><strong>API</strong> /_live/api/hooks</div>
95
+ <div><a href="/_live">← live view</a> · <a href="/_live/activity">activity</a> · <a href="/_live/changes">data changes</a></div>
96
+ </div>
97
+ </header>
98
+ <div class="toolbar">
99
+ <label class="mono">Org <select id="org"></select></label>
100
+ <label class="mono">Status <select id="status">
101
+ <option value="">all</option>
102
+ <option value="pending">pending</option>
103
+ <option value="delivered">delivered</option>
104
+ <option value="rejected">rejected</option>
105
+ <option value="failed">failed</option>
106
+ </select></label>
107
+ <button class="btn" id="refresh" type="button">Refresh</button>
108
+ <span class="mono" id="asof"></span>
109
+ </div>
110
+ <div class="cards" id="cards"></div>
111
+ <div id="error" class="err" hidden></div>
112
+ <h2>Subscriptions</h2>
113
+ <div id="subs"></div>
114
+ <h2>Callbacks</h2>
115
+ <div id="rows"></div>
116
+ <div id="detail" class="detail" hidden></div>
117
+ <footer>Refreshes every 3 seconds · signing keys are not shown · waiting notices stay until accepted or completed</footer>
118
+ </div>
119
+ <script>
120
+ const $ = (id) => document.getElementById(id);
121
+ let report = null;
122
+ let timer = 0;
123
+
124
+ function badge(status) {
125
+ return '<span class="badge ' + status + '">' + status + '</span>';
126
+ }
127
+
128
+ function address(row) {
129
+ const a = row.address || {};
130
+ const rev = a.revision == null ? "" : " r" + a.revision;
131
+ return (a.objectType || "") + " / " + (a.contentType || "") + " / " + (a.recordId || "") + rev;
132
+ }
133
+
134
+ function render() {
135
+ if (!report) return;
136
+ const s = report.summary || {};
137
+ $("cards").innerHTML = [
138
+ ["Subscriptions", s.subscriptions, ""],
139
+ ["Waiting", s.pending, "wait"],
140
+ ["Failing", s.failing, "bad"],
141
+ ["Delivered", s.delivered, "ok"],
142
+ ["Rejected", s.rejected, ""],
143
+ ["Failed", s.failed, s.failed ? "bad" : ""],
144
+ ].map(([label, n, cls]) =>
145
+ '<div class="card ' + cls + '"><h3>' + label + '</h3><div class="val">' + n + '</div></div>'
146
+ ).join("");
147
+
148
+ const subs = report.subscriptions || [];
149
+ $("subs").innerHTML = subs.length
150
+ ? '<table><thead><tr><th>Subscription</th><th>Org</th><th>Agents</th><th>Match</th><th>Endpoint</th><th>Health</th><th>Waiting</th></tr></thead><tbody>' +
151
+ subs.map((row) => '<tr><td class="mono">' + row.subscriptionId + '</td><td class="mono">' + row.orgId +
152
+ '</td><td class="mono">' + (row.agentIds || []).join(", ") + '</td><td class="mono">' +
153
+ row.match.objectType + " / " + row.match.contentType + '</td><td class="mono">' + row.endpoint +
154
+ '</td><td>' + badge(row.health) + (row.enabled ? "" : ' <span class="mono">disabled</span>') +
155
+ '</td><td class="mono">' + row.waiting + '</td></tr>').join("") +
156
+ '</tbody></table>'
157
+ : '<p class="mono">No subscriptions.</p>';
158
+
159
+ const want = $("status").value;
160
+ const rows = (report.deliveries || []).filter((row) => !want || row.status === want);
161
+ $("rows").innerHTML = rows.length
162
+ ? '<table><thead><tr><th>When</th><th>Status</th><th>Event</th><th>Subscription</th><th>Address</th><th>Attempt</th><th>Next</th></tr></thead><tbody>' +
163
+ rows.map((row, i) => '<tr class="clickable" data-i="' + i + '"><td class="mono">' + row.occurredAt +
164
+ '</td><td>' + badge(row.status) + '</td><td class="mono">' + row.event + '</td><td class="mono">' +
165
+ row.subscriptionId + '</td><td class="mono">' + address(row) + '</td><td class="mono">' + row.attempt +
166
+ '</td><td class="mono">' + (row.nextAttemptAt || "—") + '</td></tr>').join("") +
167
+ '</tbody></table>'
168
+ : '<p class="mono">No callbacks for this filter.</p>';
169
+ $("rows").querySelectorAll("tr.clickable").forEach((tr) => {
170
+ tr.addEventListener("click", () => {
171
+ const row = rows[Number(tr.getAttribute("data-i"))];
172
+ const box = $("detail");
173
+ box.hidden = false;
174
+ box.textContent = JSON.stringify({
175
+ deliveryId: row.deliveryId,
176
+ status: row.status,
177
+ event: row.event,
178
+ address: row.address,
179
+ change: row.change,
180
+ attempt: row.attempt,
181
+ nextAttemptAt: row.nextAttemptAt,
182
+ }, null, 2);
183
+ });
184
+ });
185
+ $("asof").textContent = report.generatedAt || "";
186
+ }
187
+
188
+ async function load() {
189
+ const org = $("org").value;
190
+ const url = "/_live/api/hooks" + (org ? "?orgId=" + encodeURIComponent(org) : "");
191
+ try {
192
+ const res = await fetch(url);
193
+ const body = await res.json();
194
+ if (!res.ok || body.ok === false) throw new Error(body.error?.message || res.statusText);
195
+ report = body;
196
+ const select = $("org");
197
+ const current = select.value;
198
+ const ids = body.orgIds || [];
199
+ select.innerHTML = '<option value="">all orgs</option>' + ids.map((id) =>
200
+ '<option value="' + id + '">' + id + '</option>').join("");
201
+ select.value = ids.includes(current) || current === "" ? current : "";
202
+ $("error").hidden = true;
203
+ render();
204
+ } catch (err) {
205
+ $("error").hidden = false;
206
+ $("error").textContent = err instanceof Error ? err.message : String(err);
207
+ }
208
+ }
209
+
210
+ $("refresh").addEventListener("click", load);
211
+ $("org").addEventListener("change", load);
212
+ $("status").addEventListener("change", render);
213
+ load();
214
+ timer = setInterval(load, 3000);
215
+ document.addEventListener("visibilitychange", () => {
216
+ if (document.hidden) {
217
+ clearInterval(timer);
218
+ timer = 0;
219
+ } else if (!timer) {
220
+ load();
221
+ timer = setInterval(load, 3000);
222
+ }
223
+ });
224
+ </script>
225
+ </body>
226
+ </html>`;
227
+ }
228
+ //# sourceMappingURL=hooks-live-ui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks-live-ui.js","sourceRoot":"","sources":["../src/hooks-live-ui.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,MAAM,UAAU,aAAa;IAC3B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA+ND,CAAC;AACT,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { HookStore } from "./hooks/types.js";
2
+ export type HookLiveSource = {
3
+ listKnownOperationalOrgIds(): Promise<string[]>;
4
+ hookOrgIds(): string[];
5
+ hooksFor(orgId: string): HookStore;
6
+ };
7
+ export declare function snapshotHookLive(source: HookLiveSource, orgId?: string): Promise<{
8
+ orgIds: string[];
9
+ orgId: string | null;
10
+ summary: {
11
+ subscriptions: number;
12
+ failing: number;
13
+ pending: number;
14
+ delivered: number;
15
+ rejected: number;
16
+ failed: number;
17
+ };
18
+ subscriptions: (import("./hooks/types.js").HookSubscriptionPublic & {
19
+ orgId: string;
20
+ waiting: number;
21
+ })[];
22
+ deliveries: ({
23
+ deliveryId: string;
24
+ subscriptionId: string;
25
+ event: "created" | "updated" | "removed";
26
+ occurredAt: string;
27
+ address: import("./hooks/types.js").HookAddress;
28
+ change: {
29
+ previousRevision: number | null;
30
+ dataChanged: boolean;
31
+ };
32
+ attempt: number;
33
+ status: "failed" | "pending" | "delivered" | "rejected";
34
+ } & {
35
+ nextAttemptAt: string | null;
36
+ })[];
37
+ }>;
38
+ //# sourceMappingURL=hooks-live.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks-live.d.ts","sourceRoot":"","sources":["../src/hooks-live.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,MAAM,MAAM,cAAc,GAAG;IAC3B,0BAA0B,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAChD,UAAU,IAAI,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE,MAAM;;;;;;;;;;;;eAkBG,MAAM;iBAAW,MAAM;;;;;;;;;;;;;;;uBACvB,MAAM,GAAG,IAAI;;GA+B5F"}
@@ -0,0 +1,51 @@
1
+ import { toInboxDelivery, toPublicSubscription } from "./hooks/types.js";
2
+ export async function snapshotHookLive(source, orgId) {
3
+ const known = new Set([
4
+ ...(await source.listKnownOperationalOrgIds()),
5
+ ...source.hookOrgIds(),
6
+ ]);
7
+ const orgIds = [...known].sort((a, b) => a.localeCompare(b));
8
+ const selected = orgId?.trim() ? orgId.trim() : "";
9
+ const scan = selected ? orgIds.filter((id) => id === selected) : orgIds;
10
+ if (selected && scan.length === 0)
11
+ scan.push(selected);
12
+ const summary = {
13
+ subscriptions: 0,
14
+ failing: 0,
15
+ pending: 0,
16
+ delivered: 0,
17
+ rejected: 0,
18
+ failed: 0,
19
+ };
20
+ const subscriptions = [];
21
+ const deliveries = [];
22
+ for (const id of scan) {
23
+ const store = source.hooksFor(id);
24
+ const rows = await store.listSubscriptions();
25
+ for (const row of rows) {
26
+ const counts = await store.countDeliveries(row.subscriptionId);
27
+ summary.subscriptions += 1;
28
+ if (row.health === "failing")
29
+ summary.failing += 1;
30
+ summary.pending += counts.pending;
31
+ summary.delivered += counts.delivered;
32
+ summary.rejected += counts.rejected;
33
+ summary.failed += counts.failed;
34
+ subscriptions.push({ ...toPublicSubscription(row), waiting: counts.pending });
35
+ const recent = await store.listDeliveries(row.subscriptionId, { limit: 40 });
36
+ for (const delivery of recent) {
37
+ deliveries.push({ ...toInboxDelivery(delivery), nextAttemptAt: delivery.nextAttemptAt });
38
+ }
39
+ }
40
+ }
41
+ subscriptions.sort((a, b) => a.subscriptionId.localeCompare(b.subscriptionId));
42
+ deliveries.sort((a, b) => (a.occurredAt < b.occurredAt ? 1 : a.occurredAt > b.occurredAt ? -1 : 0));
43
+ return {
44
+ orgIds,
45
+ orgId: selected || null,
46
+ summary,
47
+ subscriptions,
48
+ deliveries: deliveries.slice(0, 80),
49
+ };
50
+ }
51
+ //# sourceMappingURL=hooks-live.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks-live.js","sourceRoot":"","sources":["../src/hooks-live.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAQzE,MAAM,CAAC,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C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEpG,OAAO;QACL,MAAM;QACN,KAAK,EAAE,QAAQ,IAAI,IAAI;QACvB,OAAO;QACP,aAAa;QACb,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;KACpC,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"live-ops-nav.d.ts","sourceRoot":"","sources":["../src/live-ops-nav.ts"],"names":[],"mappings":"AA8CA,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM1D"}
1
+ {"version":3,"file":"live-ops-nav.d.ts","sourceRoot":"","sources":["../src/live-ops-nav.ts"],"names":[],"mappings":"AAkDA,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM1D"}
@@ -40,6 +40,10 @@ const NAV_HTML = `
40
40
  <strong>Data changes</strong>
41
41
  <span>OT × CT change matrix</span>
42
42
  </a>
43
+ <a href="/_live/hooks">
44
+ <strong>Hook inbox</strong>
45
+ <span>Waiting callbacks and delivery status</span>
46
+ </a>
43
47
  </nav>
44
48
  `;
45
49
  export function withMemorixLiveOpsNav(html) {
@@ -1 +1 @@
1
- {"version":3,"file":"live-ops-nav.js","sourceRoot":"","sources":["../src/live-ops-nav.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,QAAQ,GAAG,sBAAsB,CAAC;AAExC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsChB,CAAC;AAEF,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAClD,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,cAAc,QAAQ,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"live-ops-nav.js","sourceRoot":"","sources":["../src/live-ops-nav.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,QAAQ,GAAG,sBAAsB,CAAC;AAExC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0ChB,CAAC;AAEF,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAClD,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,cAAc,QAAQ,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "Memorix Service API",
5
- "version": "3.11.1",
5
+ "version": "3.12.1",
6
6
  "description": "One versioned product API over accepted Memorix packages. Scope: orgId + agentIds[]. Headers x-memorix-org-id and x-memorix-agent-ids (comma-separated). MX-CALLER-01: every /api request requires x-memorix-caller (calling app id). Intelligence never auto-installs. Relationships /links is forbidden. IntegrationsRegistry (Stage −1) and RestrictedStore (FG-A3 dual-mode blob)."
7
7
  },
8
8
  "servers": [
@@ -46,6 +46,10 @@
46
46
  "name": "Jobs",
47
47
  "description": "Jobs Manager repeated-work API. P3 reads and P4 writes live."
48
48
  },
49
+ {
50
+ "name": "Hooks",
51
+ "description": "Content hooks. A subscription is notified after one address is created, updated, or removed. The callback does not run a skill."
52
+ },
49
53
  {
50
54
  "name": "Connectors",
51
55
  "description": "Unified connector catalog (registry + builtins + MGC remote hosts)"
@@ -2880,6 +2884,10 @@
2880
2884
  "$ref": "#/components/schemas/PatchOp"
2881
2885
  }
2882
2886
  },
2887
+ "suppressHooks": {
2888
+ "type": "boolean",
2889
+ "description": "When true, this write does not notify content-hook subscriptions. Not stored on the record. For bulk load and migration."
2890
+ },
2883
2891
  "address": {
2884
2892
  "$ref": "#/components/schemas/ContentAddress"
2885
2893
  },
@@ -14923,6 +14931,144 @@
14923
14931
  }
14924
14932
  }
14925
14933
  }
14934
+ },
14935
+ "/api/hooks/v1/subscriptions": {
14936
+ "get": {
14937
+ "operationId": "hooksListSubscriptions",
14938
+ "tags": ["Hooks"],
14939
+ "summary": "List content-hook subscriptions for this org and agent set",
14940
+ "parameters": [
14941
+ { "$ref": "#/components/parameters/XMemorixCaller" },
14942
+ { "$ref": "#/components/parameters/XMemorixOrgId" },
14943
+ { "$ref": "#/components/parameters/XMemorixAgentIds" }
14944
+ ],
14945
+ "responses": {
14946
+ "200": { "description": "Subscriptions. signingSecret is omitted." }
14947
+ }
14948
+ }
14949
+ },
14950
+ "/api/hooks/v1/subscriptions/{subscriptionId}": {
14951
+ "put": {
14952
+ "operationId": "hooksPutSubscription",
14953
+ "tags": ["Hooks"],
14954
+ "summary": "Create or replace a content-hook subscription",
14955
+ "parameters": [
14956
+ { "$ref": "#/components/parameters/XMemorixCaller" },
14957
+ { "$ref": "#/components/parameters/XMemorixOrgId" },
14958
+ { "$ref": "#/components/parameters/XMemorixAgentIds" },
14959
+ { "name": "subscriptionId", "in": "path", "required": true, "schema": { "type": "string" } }
14960
+ ],
14961
+ "requestBody": {
14962
+ "required": true,
14963
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HookSubscriptionWrite" } } }
14964
+ },
14965
+ "responses": {
14966
+ "200": { "description": "Stored subscription. signingSecret is omitted." },
14967
+ "400": { "description": "HOOK_SUBSCRIPTION_INVALID" },
14968
+ "409": { "description": "subscriptionId belongs to a different agent scope" }
14969
+ }
14970
+ },
14971
+ "get": {
14972
+ "operationId": "hooksGetSubscription",
14973
+ "tags": ["Hooks"],
14974
+ "summary": "Read one content-hook subscription",
14975
+ "parameters": [
14976
+ { "$ref": "#/components/parameters/XMemorixCaller" },
14977
+ { "$ref": "#/components/parameters/XMemorixOrgId" },
14978
+ { "$ref": "#/components/parameters/XMemorixAgentIds" },
14979
+ { "name": "subscriptionId", "in": "path", "required": true, "schema": { "type": "string" } }
14980
+ ],
14981
+ "responses": {
14982
+ "200": { "description": "Subscription. signingSecret is omitted." },
14983
+ "404": { "description": "HOOK_SUBSCRIPTION_NOT_FOUND" }
14984
+ }
14985
+ },
14986
+ "patch": {
14987
+ "operationId": "hooksPatchSubscription",
14988
+ "tags": ["Hooks"],
14989
+ "summary": "Update enabled, endpoint, or match",
14990
+ "parameters": [
14991
+ { "$ref": "#/components/parameters/XMemorixCaller" },
14992
+ { "$ref": "#/components/parameters/XMemorixOrgId" },
14993
+ { "$ref": "#/components/parameters/XMemorixAgentIds" },
14994
+ { "name": "subscriptionId", "in": "path", "required": true, "schema": { "type": "string" } }
14995
+ ],
14996
+ "responses": {
14997
+ "200": { "description": "Updated subscription. signingSecret is omitted." },
14998
+ "400": { "description": "HOOK_SUBSCRIPTION_INVALID" },
14999
+ "404": { "description": "HOOK_SUBSCRIPTION_NOT_FOUND" }
15000
+ }
15001
+ },
15002
+ "delete": {
15003
+ "operationId": "hooksDeleteSubscription",
15004
+ "tags": ["Hooks"],
15005
+ "summary": "Remove a subscription and stop pending delivery",
15006
+ "parameters": [
15007
+ { "$ref": "#/components/parameters/XMemorixCaller" },
15008
+ { "$ref": "#/components/parameters/XMemorixOrgId" },
15009
+ { "$ref": "#/components/parameters/XMemorixAgentIds" },
15010
+ { "name": "subscriptionId", "in": "path", "required": true, "schema": { "type": "string" } }
15011
+ ],
15012
+ "responses": {
15013
+ "200": { "description": "Removed" },
15014
+ "404": { "description": "HOOK_SUBSCRIPTION_NOT_FOUND" }
15015
+ }
15016
+ }
15017
+ },
15018
+ "/api/hooks/v1/subscriptions/{subscriptionId}/deliveries": {
15019
+ "get": {
15020
+ "operationId": "hooksListDeliveries",
15021
+ "tags": ["Hooks"],
15022
+ "summary": "Recent delivery status, newest first",
15023
+ "parameters": [
15024
+ { "$ref": "#/components/parameters/XMemorixCaller" },
15025
+ { "$ref": "#/components/parameters/XMemorixOrgId" },
15026
+ { "$ref": "#/components/parameters/XMemorixAgentIds" },
15027
+ { "name": "subscriptionId", "in": "path", "required": true, "schema": { "type": "string" } },
15028
+ { "name": "status", "in": "query", "schema": { "type": "string", "enum": ["pending", "delivered", "rejected", "failed"] } }
15029
+ ],
15030
+ "responses": {
15031
+ "200": { "description": "Delivery rows. Not stored on the subject record." }
15032
+ }
15033
+ }
15034
+ },
15035
+ "/api/hooks/v1/subscriptions/{subscriptionId}/inbox": {
15036
+ "get": {
15037
+ "operationId": "hooksInbox",
15038
+ "tags": ["Hooks"],
15039
+ "summary": "Waiting notices, oldest first",
15040
+ "description": "Pending deliveries the subscriber has not accepted. A POST that returns HTTP 200 without { accepted: true }, or times out, or returns 5xx, stays here. Clear one with hooksCompleteDelivery.",
15041
+ "parameters": [
15042
+ { "$ref": "#/components/parameters/XMemorixCaller" },
15043
+ { "$ref": "#/components/parameters/XMemorixOrgId" },
15044
+ { "$ref": "#/components/parameters/XMemorixAgentIds" },
15045
+ { "name": "subscriptionId", "in": "path", "required": true, "schema": { "type": "string" } },
15046
+ { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } }
15047
+ ],
15048
+ "responses": {
15049
+ "200": { "description": "Open deliveries, including address, event, and change." },
15050
+ "404": { "description": "HOOK_SUBSCRIPTION_NOT_FOUND" }
15051
+ }
15052
+ }
15053
+ },
15054
+ "/api/hooks/v1/subscriptions/{subscriptionId}/deliveries/{deliveryId}/complete": {
15055
+ "post": {
15056
+ "operationId": "hooksCompleteDelivery",
15057
+ "tags": ["Hooks"],
15058
+ "summary": "Clear one waiting notice",
15059
+ "parameters": [
15060
+ { "$ref": "#/components/parameters/XMemorixCaller" },
15061
+ { "$ref": "#/components/parameters/XMemorixOrgId" },
15062
+ { "$ref": "#/components/parameters/XMemorixAgentIds" },
15063
+ { "name": "subscriptionId", "in": "path", "required": true, "schema": { "type": "string" } },
15064
+ { "name": "deliveryId", "in": "path", "required": true, "schema": { "type": "string" } }
15065
+ ],
15066
+ "responses": {
15067
+ "200": { "description": "{ deliveryId, cleared: true }. Completing an already delivered row is the same." },
15068
+ "404": { "description": "HOOK_SUBSCRIPTION_NOT_FOUND or HOOK_DELIVERY_NOT_FOUND" },
15069
+ "409": { "description": "HOOK_DELIVERY_CLOSED" }
15070
+ }
15071
+ }
14926
15072
  }
14927
15073
  },
14928
15074
  "components": {
@@ -14963,6 +15109,36 @@
14963
15109
  }
14964
15110
  },
14965
15111
  "schemas": {
15112
+ "HookSubscriptionWrite": {
15113
+ "type": "object",
15114
+ "required": ["endpoint", "match"],
15115
+ "additionalProperties": false,
15116
+ "properties": {
15117
+ "endpoint": { "type": "string", "format": "uri" },
15118
+ "enabled": { "type": "boolean" },
15119
+ "signingSecret": { "type": "string", "description": "Required on create. Write-only. A later PUT that omits it keeps the stored secret." },
15120
+ "match": {
15121
+ "type": "object",
15122
+ "required": ["objectType", "contentType", "events"],
15123
+ "additionalProperties": false,
15124
+ "properties": {
15125
+ "objectType": { "type": "string" },
15126
+ "contentType": { "type": "string" },
15127
+ "discriminator": {
15128
+ "type": "object",
15129
+ "required": ["path", "equals"],
15130
+ "additionalProperties": false,
15131
+ "properties": {
15132
+ "path": { "type": "string" },
15133
+ "equals": {}
15134
+ }
15135
+ },
15136
+ "events": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": ["created", "updated", "removed"] } },
15137
+ "ignoreCallers": { "type": "array", "items": { "type": "string" } }
15138
+ }
15139
+ }
15140
+ }
15141
+ },
14966
15142
  "MemorixScope": {
14967
15143
  "type": "object",
14968
15144
  "required": [
@@ -15,6 +15,7 @@ import { ServiceError } from "./errors.js";
15
15
  import { type DeliveryArtifactStore, type RawRecordStore, type TargetItemReceiptStore } from "./mgc-landing-stores.js";
16
16
  import { type ServiceCatalog } from "./catalog-bridge.js";
17
17
  import { type MemorixScope } from "./scope.js";
18
+ import type { HookStore } from "./hooks/types.js";
18
19
  import { type IsolationSession } from "./isolation.js";
19
20
  import { type MagitPackService } from "./magit/magit-pack-service.js";
20
21
  import { type GenericConnectorsConfig } from "./generic-connectors.js";
@@ -117,6 +118,8 @@ export type MemorixPlatform = {
117
118
  * Used by Jobs Manager unscoped (All orgs) list/overview fan-out.
118
119
  */
119
120
  listKnownOperationalOrgIds(): Promise<string[]>;
121
+ /** Org ids that already have an in-process hook store. */
122
+ hookOrgIds(): string[];
120
123
  intelligenceArtifactsFor(orgId: string): IntelligenceArtifactPersistence;
121
124
  /** Fail-closed: throws if ports cannot be constructed. */
122
125
  portsFor(scope: MemorixScope): OrgPorts;
@@ -182,6 +185,16 @@ export type MemorixPlatform = {
182
185
  ownerId?: string;
183
186
  invokePipeline?: Parameters<typeof tickContinuousAcquisition>[0]["invokePipeline"];
184
187
  }): () => void;
188
+ /** Content-hook subscriptions and deliveries for one org. */
189
+ hooksFor(orgId: string): HookStore;
190
+ /** Deliver pending content hooks. Works with memory stores when Mongo is absent. */
191
+ startContentHookTicker(opts?: {
192
+ intervalMs?: number;
193
+ }): () => void;
194
+ /** One pass over known orgs. */
195
+ tickContentHooks(): Promise<void>;
196
+ /** Resolves when a kick started by a write has finished its HTTP attempts. */
197
+ whenContentHooksIdle(): Promise<void>;
185
198
  /** One-shot tick for tests / Jobs evaluate-now style hosts. */
186
199
  tickContinuousAcquisitionForOrg(orgId: string, opts?: {
187
200
  ownerId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAC;A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