@rubytech/create-maxy-code 0.1.475 → 0.1.477

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 (89) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/lib/storage-broker/dist/cf-exec.d.ts.map +1 -1
  3. package/payload/platform/lib/storage-broker/dist/cf-exec.js +3 -2
  4. package/payload/platform/lib/storage-broker/dist/cf-exec.js.map +1 -1
  5. package/payload/platform/lib/storage-broker/src/cf-exec.ts +3 -2
  6. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +3 -3
  7. package/payload/platform/plugins/cloudflare/skills/calendar-site/template/schema.sql +13 -3
  8. package/payload/platform/plugins/docs/references/calendar-booking.md +2 -2
  9. package/payload/platform/plugins/scheduling/PLUGIN.md +2 -2
  10. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-block-sqlite.test.d.ts +2 -0
  11. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-block-sqlite.test.d.ts.map +1 -0
  12. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-block-sqlite.test.js +150 -0
  13. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-block-sqlite.test.js.map +1 -0
  14. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-block.test.d.ts +2 -0
  15. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-block.test.d.ts.map +1 -0
  16. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-block.test.js +248 -0
  17. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-block.test.js.map +1 -0
  18. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-reconcile.test.js +158 -23
  19. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-reconcile.test.js.map +1 -1
  20. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-schema-migration.test.d.ts +2 -0
  21. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-schema-migration.test.d.ts.map +1 -0
  22. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-schema-migration.test.js +200 -0
  23. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-schema-migration.test.js.map +1 -0
  24. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/connector-sync-provision.test.d.ts +2 -0
  25. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/connector-sync-provision.test.d.ts.map +1 -0
  26. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/connector-sync-provision.test.js +309 -0
  27. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/connector-sync-provision.test.js.map +1 -0
  28. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/d1-command.test.js +219 -19
  29. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/d1-command.test.js.map +1 -1
  30. package/payload/platform/plugins/scheduling/mcp/dist/lib/booking-reconcile.d.ts +184 -11
  31. package/payload/platform/plugins/scheduling/mcp/dist/lib/booking-reconcile.d.ts.map +1 -1
  32. package/payload/platform/plugins/scheduling/mcp/dist/lib/booking-reconcile.js +211 -22
  33. package/payload/platform/plugins/scheduling/mcp/dist/lib/booking-reconcile.js.map +1 -1
  34. package/payload/platform/plugins/scheduling/mcp/dist/lib/connector-sync-provision.d.ts +109 -0
  35. package/payload/platform/plugins/scheduling/mcp/dist/lib/connector-sync-provision.d.ts.map +1 -0
  36. package/payload/platform/plugins/scheduling/mcp/dist/lib/connector-sync-provision.js +213 -0
  37. package/payload/platform/plugins/scheduling/mcp/dist/lib/connector-sync-provision.js.map +1 -0
  38. package/payload/platform/plugins/scheduling/mcp/dist/lib/d1-command.d.ts +80 -8
  39. package/payload/platform/plugins/scheduling/mcp/dist/lib/d1-command.d.ts.map +1 -1
  40. package/payload/platform/plugins/scheduling/mcp/dist/lib/d1-command.js +202 -8
  41. package/payload/platform/plugins/scheduling/mcp/dist/lib/d1-command.js.map +1 -1
  42. package/payload/platform/plugins/scheduling/mcp/dist/scripts/reconcile-bookings.d.ts +6 -4
  43. package/payload/platform/plugins/scheduling/mcp/dist/scripts/reconcile-bookings.d.ts.map +1 -1
  44. package/payload/platform/plugins/scheduling/mcp/dist/scripts/reconcile-bookings.js +411 -141
  45. package/payload/platform/plugins/scheduling/mcp/dist/scripts/reconcile-bookings.js.map +1 -1
  46. package/payload/platform/scripts/cpu-triage.sh +313 -0
  47. package/payload/server/{chunk-Y6V45R6M.js → chunk-JECAP3Z2.js} +296 -63
  48. package/payload/server/maxy-edge.js +1 -1
  49. package/payload/server/public/activity.html +6 -6
  50. package/payload/server/public/assets/{AdminLoginScreens-B44KbEuC.js → AdminLoginScreens-mEKP4pDi.js} +1 -1
  51. package/payload/server/public/assets/{AdminShell-BjxV2qkb.js → AdminShell-BwSaZ88d.js} +1 -1
  52. package/payload/server/public/assets/{Checkbox-DSeZNGNA.js → Checkbox-CN4uQ80w.js} +1 -1
  53. package/payload/server/public/assets/activity-CIQ8ozNZ.js +1 -0
  54. package/payload/server/public/assets/{admin-B4LpTCur.js → admin-BVhgfgs1.js} +1 -1
  55. package/payload/server/public/assets/{browser-CEFvaWwI.js → browser-D-HMmHcM.js} +1 -1
  56. package/payload/server/public/assets/{calendar-B3zo6V34.js → calendar-tGWvFyFn.js} +1 -1
  57. package/payload/server/public/assets/chat-DkttVxAz.js +1 -0
  58. package/payload/server/public/assets/chevron-left-CZ4ez9G5.js +1 -0
  59. package/payload/server/public/assets/data-P-mcmnNi.js +1 -0
  60. package/payload/server/public/assets/{graph-labels-GlTEIYJj.js → graph-labels-qnBleOE6.js} +1 -1
  61. package/payload/server/public/assets/{graph-RaOrnSf2.js → graph-zEw610xK.js} +1 -1
  62. package/payload/server/public/assets/{maximize-2-CHDa8p5h.js → maximize-2-BlTjXT_Y.js} +1 -1
  63. package/payload/server/public/assets/{operator-DtqHY4jV.js → operator-C7oIw2PG.js} +1 -1
  64. package/payload/server/public/assets/{page-DxnWgPtd.js → page-CTP7OFZa.js} +1 -1
  65. package/payload/server/public/assets/{page-CkhFj8GQ.js → page-DL6Zsdvk.js} +1 -1
  66. package/payload/server/public/assets/{public-D5TUfQ3I.js → public-r1A9dqR_.js} +1 -1
  67. package/payload/server/public/assets/{rotate-ccw-BJjVAQQY.js → rotate-ccw-CzkkKx4-.js} +1 -1
  68. package/payload/server/public/assets/{tasks-CM9pYYG1.js → tasks-fIJwYFWG.js} +1 -1
  69. package/payload/server/public/assets/{time-entry-format-C5RYEYjM.js → time-entry-format-j669DgXj.js} +1 -1
  70. package/payload/server/public/assets/{triangle-alert-DLfIsuo_.js → triangle-alert-BPgCgIef.js} +1 -1
  71. package/payload/server/public/assets/{useCopyFeedback-7yKeiAzV.js → useCopyFeedback-BmLa2aes.js} +1 -1
  72. package/payload/server/public/assets/{useSelectionMode-CWlh6AEq.js → useSelectionMode-DnnM7A8-.js} +1 -1
  73. package/payload/server/public/assets/{useSubAccountSwitcher-B2n9QPVI.css → useSubAccountSwitcher-C_E8h07P.css} +1 -1
  74. package/payload/server/public/assets/{useVoiceRecorder-j3ZArZ2H.js → useVoiceRecorder-u2dwZfen.js} +1 -1
  75. package/payload/server/public/browser.html +5 -5
  76. package/payload/server/public/calendar.html +6 -6
  77. package/payload/server/public/chat.html +12 -12
  78. package/payload/server/public/data.html +11 -11
  79. package/payload/server/public/graph.html +11 -11
  80. package/payload/server/public/index.html +14 -14
  81. package/payload/server/public/operator.html +14 -14
  82. package/payload/server/public/public.html +12 -12
  83. package/payload/server/public/tasks.html +5 -5
  84. package/payload/server/server.js +358 -189
  85. package/payload/server/public/assets/activity-Mz1BhgB1.js +0 -1
  86. package/payload/server/public/assets/chat-5tJdo9i_.js +0 -1
  87. package/payload/server/public/assets/chevron-left-BJllrPBj.js +0 -1
  88. package/payload/server/public/assets/data-Du79EgR-.js +0 -1
  89. /package/payload/server/public/assets/{useSubAccountSwitcher-CBlKgwms.js → useSubAccountSwitcher-CFa6ZAT1.js} +0 -0
@@ -1,23 +1,223 @@
1
- // Regression guard for Task 1350. The brand server PATH carries no global
2
- // `wrangler`; only `npx wrangler` resolves, the same form the proven
3
- // forward-path availability publisher uses. A bare-`wrangler` spawn head
4
- // returns ENOENT on every reconcile tick, so booking->calendar reverse-sync
5
- // silently fails. This pins the resolved command to the npx form.
6
- import { describe, it, expect } from "vitest";
7
- import { buildD1Command } from "../d1-command.js";
8
- describe("buildD1Command", () => {
9
- it("invokes wrangler via npx, not a bare wrangler binary", () => {
10
- const { command, args } = buildD1Command("mydb", "SELECT 1");
11
- expect(command).toBe("npx");
12
- expect(args[0]).toBe("wrangler");
13
- expect(command).not.toBe("wrangler");
14
- });
15
- it("preserves the d1 execute argv shape and the SQL/db it was given", () => {
16
- const { args } = buildD1Command("mydb", "SELECT 1");
17
- expect(args).toEqual([
18
- "wrangler", "d1", "execute", "mydb",
19
- "--remote", "--json", "--command", "SELECT 1",
1
+ // Task 1805 the transport is HTTP, not a process per statement. These pin the
2
+ // requests it composes, the rows it parses, the one-lookup-per-run cache, and the
3
+ // two bounds (60 s request, 16 MB streamed response) inherited from the spawnSync
4
+ // call this replaced. Task 1350's npx-head guard is retired with the spawn it guarded.
5
+ import { describe, it, expect, vi } from "vitest";
6
+ import { buildD1LookupRequest, buildD1QueryRequest, createD1Client, D1_RESPONSE_CAP_BYTES, D1_TIMEOUT_MS, } from "../d1-command.js";
7
+ const ACC = "acc123";
8
+ const DB_ID = "11111111-2222-3333-4444-555555555555";
9
+ function bodyOf(text) {
10
+ return (async function* () {
11
+ yield new TextEncoder().encode(text);
12
+ })();
13
+ }
14
+ /** A fetch seam whose responses are scripted per call, recording what it received. */
15
+ function fakeFetch(responses) {
16
+ const calls = [];
17
+ let i = 0;
18
+ const fn = async (url, init) => {
19
+ calls.push({ url, init });
20
+ const r = responses[i++];
21
+ if (!r)
22
+ throw new Error(`unexpected extra fetch to ${url}`);
23
+ return { ok: r.ok ?? true, status: r.status ?? 200, chunks: bodyOf(r.text) };
24
+ };
25
+ return { fn, calls };
26
+ }
27
+ const lookupOk = (name) => JSON.stringify({ success: true, result: [{ uuid: DB_ID, name }] });
28
+ const queryOk = (rows) => JSON.stringify({ success: true, result: [{ results: rows, success: true }] });
29
+ describe("buildD1LookupRequest", () => {
30
+ it("addresses the account's D1 list endpoint filtered by the database name", () => {
31
+ const { url, init } = buildD1LookupRequest(ACC, "book db", "tok");
32
+ expect(url).toBe(`https://api.cloudflare.com/client/v4/accounts/${ACC}/d1/database?name=book+db`);
33
+ expect(init.method).toBe("GET");
34
+ });
35
+ it("carries a bearer Authorization header", () => {
36
+ const { init } = buildD1LookupRequest(ACC, "mydb", "tok");
37
+ expect(Object.keys(init.headers)).toContain("Authorization");
38
+ expect(init.headers.Authorization.startsWith("Bearer ")).toBe(true);
39
+ });
40
+ });
41
+ describe("buildD1QueryRequest", () => {
42
+ it("posts the SQL to the database's query endpoint", () => {
43
+ const { url, init } = buildD1QueryRequest(ACC, DB_ID, "SELECT 1", "tok");
44
+ expect(url).toBe(`https://api.cloudflare.com/client/v4/accounts/${ACC}/d1/database/${DB_ID}/query`);
45
+ expect(init.method).toBe("POST");
46
+ expect(init.headers["Content-Type"]).toBe("application/json");
47
+ expect(JSON.parse(init.body)).toEqual({ sql: "SELECT 1", params: [] });
48
+ });
49
+ it("sends values as bound parameters rather than folding them into the SQL", () => {
50
+ const { init } = buildD1QueryRequest(ACC, DB_ID, "UPDATE bookings SET swept=1 WHERE bookingId=?1", "tok", ["b'1"]);
51
+ const sent = JSON.parse(init.body);
52
+ expect(sent.params).toEqual(["b'1"]);
53
+ expect(sent.sql).not.toContain("b'1");
54
+ });
55
+ it("carries a bearer Authorization header", () => {
56
+ const { init } = buildD1QueryRequest(ACC, DB_ID, "SELECT 1", "tok");
57
+ expect(Object.keys(init.headers)).toContain("Authorization");
58
+ expect(init.headers.Authorization.startsWith("Bearer ")).toBe(true);
59
+ });
60
+ it("starts no process — the module exports no argv builder", async () => {
61
+ const mod = await import("../d1-command.js");
62
+ expect("buildD1Command" in mod).toBe(false);
63
+ });
64
+ });
65
+ describe("createD1Client", () => {
66
+ it("resolves the database by name then returns the query's rows", async () => {
67
+ const { fn, calls } = fakeFetch([
68
+ { text: lookupOk("mydb") },
69
+ { text: queryOk([{ bookingId: "b1" }]) },
20
70
  ]);
71
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
72
+ await expect(client.query("mydb", "SELECT 1")).resolves.toEqual([{ bookingId: "b1" }]);
73
+ expect(calls[0].url).toContain("/d1/database?name=mydb");
74
+ expect(calls[1].url).toContain(`/d1/database/${DB_ID}/query`);
75
+ });
76
+ it("returns an empty row set when the statement produced no results", async () => {
77
+ const { fn } = fakeFetch([{ text: lookupOk("mydb") }, { text: queryOk([]) }]);
78
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
79
+ await expect(client.query("mydb", "UPDATE t SET x=1")).resolves.toEqual([]);
80
+ });
81
+ it("passes a caller's parameters through to the request body", async () => {
82
+ const { fn, calls } = fakeFetch([{ text: lookupOk("mydb") }, { text: queryOk([]) }]);
83
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
84
+ await client.query("mydb", "UPDATE t SET x=1 WHERE id=?1", ["abc"]);
85
+ expect(JSON.parse(calls[1].init.body).params).toEqual(["abc"]);
86
+ });
87
+ it("looks the database up once per run and reuses the id for later statements", async () => {
88
+ const { fn, calls } = fakeFetch([
89
+ { text: lookupOk("mydb") },
90
+ { text: queryOk([]) },
91
+ { text: queryOk([]) },
92
+ ]);
93
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
94
+ await client.query("mydb", "SELECT 1");
95
+ await client.query("mydb", "SELECT 2");
96
+ expect(calls.filter((c) => c.url.includes("?name=")).length).toBe(1);
97
+ expect(calls.length).toBe(3);
98
+ });
99
+ it("counts the statements it issued and the time it spent", async () => {
100
+ const { fn } = fakeFetch([
101
+ { text: lookupOk("mydb") },
102
+ { text: queryOk([]) },
103
+ { text: queryOk([]) },
104
+ ]);
105
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
106
+ await client.query("mydb", "SELECT 1");
107
+ await client.query("mydb", "SELECT 2");
108
+ expect(client.statements).toBe(2);
109
+ expect(client.elapsedMs).toBeGreaterThanOrEqual(0);
110
+ });
111
+ it("refuses a name the account does not carry rather than querying a guessed id", async () => {
112
+ const { fn } = fakeFetch([
113
+ { text: JSON.stringify({ success: true, result: [{ uuid: DB_ID, name: "otherdb" }] }) },
114
+ ]);
115
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
116
+ await expect(client.query("mydb", "SELECT 1")).rejects.toThrow(/mydb/);
117
+ });
118
+ it("surfaces a non-2xx with its status and body", async () => {
119
+ const { fn } = fakeFetch([{ ok: false, status: 403, text: '{"errors":[{"code":10000}]}' }]);
120
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
121
+ await expect(client.query("mydb", "SELECT 1")).rejects.toThrow(/403[\s\S]*10000/);
122
+ });
123
+ it("surfaces a 2xx that is not a success envelope with its body", async () => {
124
+ const { fn } = fakeFetch([
125
+ { text: lookupOk("mydb") },
126
+ { text: JSON.stringify({ success: false, errors: [{ message: "no such table" }] }) },
127
+ ]);
128
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
129
+ await expect(client.query("mydb", "SELECT 1")).rejects.toThrow(/no such table/);
130
+ });
131
+ it("surfaces a statement that reports its own failure inside a success envelope", async () => {
132
+ // The REST API's per-statement `success` semantics are undocumented, so this
133
+ // refuses to let an unmeasured fact decide correctness. If a failed sweep can
134
+ // arrive this way, treating it as success would leave the row unswept while
135
+ // the caller believed it had swept — a silent no-op on the write path.
136
+ const { fn } = fakeFetch([
137
+ { text: lookupOk("mydb") },
138
+ {
139
+ text: JSON.stringify({
140
+ success: true,
141
+ result: [{ success: false, results: [], error: "no such table: bookings" }],
142
+ }),
143
+ },
144
+ ]);
145
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
146
+ await expect(client.query("mydb", "UPDATE bookings SET swept=1")).rejects.toThrow(/no such table/);
147
+ });
148
+ it("accepts a statement that omits the success flag rather than requiring it", async () => {
149
+ // Absent is not false. Requiring an undocumented field to be present would
150
+ // reject healthy responses that simply do not carry it.
151
+ const { fn } = fakeFetch([
152
+ { text: lookupOk("mydb") },
153
+ { text: JSON.stringify({ success: true, result: [{ results: [{ n: 1 }] }] }) },
154
+ ]);
155
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
156
+ await expect(client.query("mydb", "SELECT 1")).resolves.toEqual([{ n: 1 }]);
157
+ });
158
+ it("counts a statement that was issued and then failed, not only ones that succeeded", async () => {
159
+ // `statements` is what reached D1. Counting successes only would report 0 for
160
+ // both "the name lookup failed so nothing was sent" and "one statement was
161
+ // sent and errored", which the op=d1 line needs to tell apart.
162
+ const { fn } = fakeFetch([
163
+ { text: lookupOk("mydb") },
164
+ { ok: false, status: 500, text: "boom" },
165
+ ]);
166
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
167
+ await expect(client.query("mydb", "SELECT 1")).rejects.toThrow(/500/);
168
+ expect(client.statements).toBe(1);
169
+ });
170
+ it("counts no statement when the name lookup itself failed", async () => {
171
+ const { fn } = fakeFetch([{ ok: false, status: 403, text: "denied" }]);
172
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
173
+ await expect(client.query("mydb", "SELECT 1")).rejects.toThrow(/403/);
174
+ expect(client.statements).toBe(0);
175
+ });
176
+ it("surfaces a 2xx that is not JSON with its body", async () => {
177
+ const { fn } = fakeFetch([{ text: "<html>gateway</html>" }]);
178
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
179
+ await expect(client.query("mydb", "SELECT 1")).rejects.toThrow(/gateway/);
180
+ });
181
+ it("aborts a response past the cap while streaming, not after buffering it", async () => {
182
+ // Three chunks of 8 MB. The cap is 16 MB, so the third crosses it. Counting
183
+ // the chunks consumed proves the read stopped rather than materialising the
184
+ // whole body and checking its length afterwards.
185
+ let consumed = 0;
186
+ const chunk = new Uint8Array(8 * 1024 * 1024);
187
+ const fn = async () => ({
188
+ ok: true,
189
+ status: 200,
190
+ chunks: (async function* () {
191
+ for (let i = 0; i < 5; i++) {
192
+ consumed++;
193
+ yield chunk;
194
+ }
195
+ })(),
196
+ });
197
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
198
+ await expect(client.query("mydb", "SELECT 1")).rejects.toThrow(/cap/);
199
+ expect(consumed).toBe(3);
200
+ expect(D1_RESPONSE_CAP_BYTES).toBe(16 * 1024 * 1024);
201
+ });
202
+ it("rejects at the 60 s bound rather than hanging when the endpoint stalls", async () => {
203
+ vi.useFakeTimers();
204
+ try {
205
+ // Honours the signal the client attached; resolves never otherwise. This is
206
+ // the property the PID lock depends on: a stalled Cloudflare must not wedge
207
+ // the run and hold the lock.
208
+ const fn = (_url, init) => new Promise((_resolve, reject) => {
209
+ init.signal.addEventListener("abort", () => reject(init.signal.reason));
210
+ });
211
+ const client = createD1Client({ accountId: ACC, token: "tok", fetchFn: fn });
212
+ const pending = client.query("mydb", "SELECT 1");
213
+ const assertion = expect(pending).rejects.toThrow(/timed out after 60000ms/);
214
+ await vi.advanceTimersByTimeAsync(D1_TIMEOUT_MS + 1);
215
+ await assertion;
216
+ expect(D1_TIMEOUT_MS).toBe(60_000);
217
+ }
218
+ finally {
219
+ vi.useRealTimers();
220
+ }
21
221
  });
22
222
  });
23
223
  //# sourceMappingURL=d1-command.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"d1-command.test.js","sourceRoot":"","sources":["../../../src/lib/__tests__/d1-command.test.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qEAAqE;AACrE,yEAAyE;AACzE,4EAA4E;AAC5E,kEAAkE;AAClE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBA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EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;YAC7E,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;YACjD,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;YAC7E,MAAM,EAAE,CAAC,wBAAwB,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC;YACrD,MAAM,SAAS,CAAC;YAChB,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrC,CAAC;gBAAS,CAAC;YACT,EAAE,CAAC,aAAa,EAAE,CAAC;QACrB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { Session } from "neo4j-driver";
2
+ import type { DispatchDestination } from "./connector-sync-provision.js";
2
3
  export interface BookingRow {
3
4
  bookingId: string;
4
5
  slotStart: string;
@@ -13,16 +14,77 @@ export interface ReconcileResult {
13
14
  }
14
15
  export declare function bookingUid(bookingId: string): string;
15
16
  export declare function reconcileOne(session: Session, accountId: string, booking: BookingRow): Promise<ReconcileResult>;
17
+ /**
18
+ * The single definition of a row the reconcile loop acts on.
19
+ *
20
+ * `status='accepted'` is the row the booking page captured. `kind='booking'` is
21
+ * the row that must become a :Meeting — a `kind='block'` row only reserves a
22
+ * slot and has no meeting by design, so counting it as unreconciled is a false
23
+ * positive that is indistinguishable in the log from a genuinely lost booking.
24
+ *
25
+ * Both call sites build their statements from this constant. Two literals is
26
+ * the defect: the sweep and the audit disagreed about what needed reconciling,
27
+ * and only the sweep's opinion could act.
28
+ */
29
+ export declare const ELIGIBLE_BOOKING_PREDICATE = "status='accepted' AND kind='booking'";
30
+ /** The one D1 read that serves both the sweep and the audit. */
31
+ export declare const ELIGIBLE_BOOKING_SELECT = "SELECT bookingId, slotStart, slotEnd, name, email, note, attempts FROM bookings WHERE status='accepted' AND kind='booking' ORDER BY id";
32
+ /** This account's booking :Meeting uids. Read once per run and used for both
33
+ * the sweep's claim decision and the audit's counts. */
34
+ export declare function fetchBookingMeetingUids(session: Session, accountId: string): Promise<string[]>;
35
+ /**
36
+ * The rows the sweep must claim: eligible, and with no :Meeting carrying their
37
+ * uid.
38
+ *
39
+ * Task 1807 — this deliberately does not consult `swept`. `swept` records that
40
+ * a write was attempted, not that a meeting exists; gating retry on it made a
41
+ * booking whose meeting later went missing permanently unreachable, while the
42
+ * audit reported it every tick. Re-entry is safe because `reconcileOne` is
43
+ * idempotent on (accountId, uid) and returns created=false on a re-run.
44
+ */
45
+ export declare function selectUnreconciled<T extends Record<string, unknown>>(rows: T[], meetingUids: Set<string>): T[];
16
46
  export interface AuditCounts {
47
+ /** Eligible rows the audit looked at. Without it, pendingUnreconciled=0 out
48
+ * of 0 (nothing to do) is indistinguishable from 0 out of 28 (verified
49
+ * clean), and an audit that returns the same value for both is not an audit. */
50
+ eligibleExamined: number;
17
51
  pendingUnreconciled: number;
18
52
  orphanMeetings: number;
19
53
  }
20
54
  /**
21
- * Compare D1's accepted booking ids against the account's booking :Meeting set.
22
- * pendingUnreconciled — accepted in D1 but no :Meeting yet (reconcile lagging).
23
- * orphanMeetings — a booking :Meeting with no backing D1 row.
55
+ * Compare D1's eligible booking ids against the account's booking :Meeting set.
56
+ * pendingUnreconciled — eligible in D1 but no :Meeting (reconcile lagging or lost).
57
+ * orphanMeetings — a booking :Meeting with no backing eligible D1 row.
58
+ *
59
+ * Pure: both inputs are read by the caller, which uses the same two lists for
60
+ * the sweep, so the sweep and the audit cannot disagree about the population.
61
+ */
62
+ export declare function auditCounts(eligibleIds: string[], meetingUids: string[]): AuditCounts;
63
+ /**
64
+ * Statements that bring an already-provisioned bookings table up to the schema
65
+ * the sweep needs. Run once, on the first tick after upgrade, triggered by the
66
+ * eligible-row read failing on the missing column.
67
+ *
68
+ * A template schema change alone cannot reach an existing install: schema.sql
69
+ * is CREATE TABLE IF NOT EXISTS and is applied once at provisioning, so
70
+ * re-applying it to a live database is a no-op. Without this the first
71
+ * kind-qualified read would throw on every existing install and reconcile would
72
+ * stop entirely — strictly worse than the defect being fixed.
73
+ *
74
+ * The third statement classifies rows that predate the column. It is the only
75
+ * place the platform reads a block row's note: the marker is a free-text string
76
+ * owned by an out-of-tree script (Task 1811 absorbs that writer, after which
77
+ * kind='block' is set natively), so it may be used to interpret legacy rows once
78
+ * but never to decide control flow. It is safe to re-run.
24
79
  */
25
- export declare function auditCounts(session: Session, accountId: string, d1AcceptedIds: string[]): Promise<AuditCounts>;
80
+ export declare const BOOKING_SCHEMA_MIGRATION: string[];
81
+ /** True when a D1 failure is the absent-column case the migration answers.
82
+ * Every other failure must stay a failure. */
83
+ export declare function isMissingColumnError(message: string): boolean;
84
+ /** True when an ALTER failed because the column is already there. SQLite has no
85
+ * ADD COLUMN IF NOT EXISTS, so each statement tolerates this independently and
86
+ * a half-migrated table completes rather than aborting. */
87
+ export declare function isDuplicateColumnError(message: string): boolean;
26
88
  /** The exact instruction the recurring connector-sync admin turn runs. Silent on
27
89
  * a clean run: the operator only hears from it on a failure or a change worth
28
90
  * flagging. The op=cal-sync stderr line is the standing proof, not a chat reply. */
@@ -30,18 +92,129 @@ export declare const CONNECTOR_SYNC_PROMPT: string;
30
92
  /**
31
93
  * Create-only provisioning of the recurring connector-sync :Event. Idempotent:
32
94
  * the existence probe keys on the `connectorSync` marker so a re-run never
33
- * duplicates the event nor resets its advancing nextRun. Returns 'created' on the
34
- * first arming, 'exists' thereafter.
95
+ * duplicates the event nor resets its advancing nextRun. Returns 'provisioned'
96
+ * on the first arming, 'already-provisioned' thereafter.
97
+ *
98
+ * Task 1809 — `dispatch` is the resolved EXCEPTION destination, not a gate. The
99
+ * caller decides whether to provision from the presence of a calendar
100
+ * connector (the sync's actual input) and resolves where an exception is
101
+ * reported separately; this function writes whichever channel it is handed.
35
102
  */
36
- export declare function ensureConnectorSyncEvent(session: Session, accountId: string, adminPhone: string): Promise<"created" | "exists">;
103
+ export declare function ensureConnectorSyncEvent(session: Session, accountId: string, dispatch: DispatchDestination): Promise<"provisioned" | "already-provisioned">;
37
104
  export interface BusyInterval {
38
105
  start: string;
39
106
  end: string;
40
107
  }
108
+ /** Which of the three states the drift comparison was actually in. `verified` is
109
+ * the only one where `conflicts` carries information: on the other two the
110
+ * comparison had nothing to compare and its 0 is vacuous. */
111
+ export type PublishedDriftOutcome = "verified" | "no-busy-data" | "no-published-slots";
112
+ export interface PublishedDrift {
113
+ outcome: PublishedDriftOutcome;
114
+ /** Size of the published-open set the comparison ran against. */
115
+ published: number;
116
+ /** Size of the connector-busy set the comparison ran against. */
117
+ busy: number;
118
+ /** Published-open slots overlapping any busy interval. Necessarily 0 on the
119
+ * two degraded outcomes, which is why the outcome token has to be read. */
120
+ conflicts: number;
121
+ }
122
+ /**
123
+ * Classify published-open booking slots against the connector-busy set — the
124
+ * drift the standing audit reports. `outcome: "verified"` with a nonzero
125
+ * `conflicts` means the booking page is currently offering a slot the connector
126
+ * shows busy. An empty published set reports `no-published-slots` even when the
127
+ * busy set is also empty: the site never publishing is the upstream condition.
128
+ */
129
+ export declare function classifyPublishedDrift(published: BusyInterval[], busy: BusyInterval[]): PublishedDrift;
130
+ /** A slot as it appears in the published `availability_snapshot` payload. */
131
+ export interface PublishedSlot {
132
+ start: string;
133
+ end: string;
134
+ }
135
+ /**
136
+ * The published slots to block, given the connector-busy set.
137
+ *
138
+ * The returned slots are drawn from `published` verbatim, never synthesised
139
+ * from `busy`: the edge free/busy Function subtracts taken slots by an exact
140
+ * `slotStart` string match, so a block row keyed on a busy-interval boundary
141
+ * would block nothing.
142
+ *
143
+ * Two exclusions, both carried over from the out-of-tree script this replaces:
144
+ * a slot that has already started (the edge filters past slots anyway, so a
145
+ * row for one is inert churn), and a slot already taken by a real booking
146
+ * (already subtracted at the edge by that booking).
147
+ */
148
+ export declare function selectBlockedSlots(published: PublishedSlot[], busy: BusyInterval[], taken: Set<string>, nowMs: number): PublishedSlot[];
149
+ /** A block row as held in D1. `bookingId` is the delete key. */
150
+ export interface BlockRow {
151
+ bookingId: string;
152
+ slotStart: string;
153
+ }
154
+ export interface BlockDiff {
155
+ toInsert: PublishedSlot[];
156
+ toDelete: string[];
157
+ }
158
+ /**
159
+ * Reconcile the held block rows to the desired set, keyed on slot start.
160
+ *
161
+ * This replaces the out-of-tree script's delete-and-reinsert. That form
162
+ * rewrote every row on every run and left a window in which a still-busy slot
163
+ * was unblocked; this one writes nothing in the steady state and never
164
+ * unblocks a slot that is staying blocked.
165
+ *
166
+ * A slot held by more than one row (possible after an interrupted run) keeps
167
+ * one and deletes the rest, so a duplicate converges instead of persisting.
168
+ */
169
+ export declare function diffBlockRows(desired: PublishedSlot[], current: BlockRow[]): BlockDiff;
170
+ /** The block rows this dispatcher owns. `kind='block'` is the whole identity —
171
+ * no free-text marker is consulted, which is the defect Task 1811 removes. */
172
+ export declare const BLOCK_ROWS_SELECT = "SELECT bookingId, slotStart FROM bookings WHERE kind='block'";
173
+ /** `status='accepted'` so the edge free/busy Function subtracts the slot;
174
+ * `kind='block'` so 1806's sweep and audit both exclude it by construction. */
175
+ export declare const BLOCK_ROW_INSERT: string;
176
+ /** The `kind` qualifier is a safety belt, not a filter: even handed the id of a
177
+ * real booking this statement cannot delete it. */
178
+ export declare const BLOCK_ROW_DELETE = "DELETE FROM bookings WHERE bookingId=?1 AND kind='block'";
179
+ /** Positional parameters for BLOCK_ROW_INSERT. The slot bounds are copied from
180
+ * the published snapshot verbatim — the edge matches `slotStart` exactly. */
181
+ export declare function blockInsertParams(slot: PublishedSlot, bookingId: string, nowIso: string): string[];
182
+ /** The closed vocabulary of the `op=cal-block` outcome field. Deliberately the
183
+ * same tokens as `op=cal-drift` so an operator reads one vocabulary across the
184
+ * sibling lines. Typed so a mistyped literal fails the build. */
185
+ export type BlockOutcome = PublishedDriftOutcome | "snapshot-unreadable" | "error";
186
+ export interface BlockPlan {
187
+ outcome: BlockOutcome;
188
+ diff: BlockDiff;
189
+ }
41
190
  /**
42
- * Count published-open booking slots that overlap any connector-busy interval
43
- * the drift the standing audit reports. A nonzero result means the booking page
44
- * is currently offering a slot the connector shows busy.
191
+ * Decide what the blocking step should write. Pure, so the safety rule below is
192
+ * testable without a live D1 or Neo4j the rule is the highest-consequence
193
+ * line in this feature and was previously enforced only by an `if` at the call
194
+ * site that no test could reach.
195
+ *
196
+ * Writes happen ONLY on `verified`: the snapshot was read, it holds slots, and
197
+ * the busy set holds at least one usable interval. Every degraded outcome
198
+ * returns no writes, which means an absent or unreadable busy set RETAINS the
199
+ * rows already held rather than clearing them.
200
+ *
201
+ * That asymmetry is deliberate. An empty busy set is ambiguous between a
202
+ * genuinely clear calendar and a sync that failed, never ran, or was
203
+ * deauthorised — `syncConnectorBusy` writes an empty set on the documented
204
+ * deauthorise path. Over-blocking is recoverable by the operator; under-blocking
205
+ * double-books a customer against a real commitment. The retained rows are
206
+ * reported on the `op=cal-block` line so the condition is visible, not silent.
45
207
  */
46
- export declare function countPublishedConflicts(published: BusyInterval[], busy: BusyInterval[]): number;
208
+ export declare function planBlockWrites(input: {
209
+ /** False when the snapshot could not be read at all, as distinct from a
210
+ * snapshot that was read and holds no slots. */
211
+ publishedReadable: boolean;
212
+ /** False when the busy set could not be read at all (the graph read threw). */
213
+ busyReadable: boolean;
214
+ published: PublishedSlot[];
215
+ busy: BusyInterval[];
216
+ taken: Set<string>;
217
+ current: BlockRow[];
218
+ nowMs: number;
219
+ }): BlockPlan;
47
220
  //# sourceMappingURL=booking-reconcile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"booking-reconcile.d.ts","sourceRoot":"","sources":["../../src/lib/booking-reconcile.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,E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