@synap-core/react 1.0.0 → 1.2.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.
Files changed (45) hide show
  1. package/README.md +144 -31
  2. package/api/editor.d.ts +178 -0
  3. package/api/whiteboard.d.ts +104 -0
  4. package/dist/editor.cjs +38733 -0
  5. package/dist/editor.css +9953 -0
  6. package/dist/editor.d.cts +178 -0
  7. package/dist/editor.d.ts +178 -0
  8. package/dist/editor.js +38974 -0
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.cts +26 -4
  11. package/dist/index.d.ts +26 -4
  12. package/dist/index.js.map +1 -1
  13. package/dist/whiteboard.cjs +4540 -0
  14. package/dist/whiteboard.css +7913 -0
  15. package/dist/whiteboard.d.cts +104 -0
  16. package/dist/whiteboard.d.ts +104 -0
  17. package/dist/whiteboard.js +4568 -0
  18. package/package.json +198 -14
  19. package/src/SynapProvider.tsx +1 -1
  20. package/src/editor/SynapEditor.tsx +288 -0
  21. package/src/editor/SynapMarkdown.tsx +11 -0
  22. package/src/editor/adapter-source.ts +97 -0
  23. package/src/editor/api.ts +30 -0
  24. package/src/editor/copy.ts +18 -0
  25. package/src/editor/drag.ts +14 -0
  26. package/src/editor/editor-base.css +28 -0
  27. package/src/editor/http-adapter.ts +87 -0
  28. package/src/editor/index.ts +22 -0
  29. package/src/editor/no-default-source.ts +7 -0
  30. package/src/editor/provider.tsx +79 -0
  31. package/src/editor/types.ts +162 -0
  32. package/src/index.ts +3 -3
  33. package/src/shared/read-cache.ts +76 -0
  34. package/src/trpc.ts +3 -2
  35. package/src/whiteboard/SynapBoard.tsx +139 -0
  36. package/src/whiteboard/adapter-source.ts +138 -0
  37. package/src/whiteboard/api.ts +22 -0
  38. package/src/whiteboard/copy.ts +24 -0
  39. package/src/whiteboard/http-adapter.ts +57 -0
  40. package/src/whiteboard/index.ts +17 -0
  41. package/src/whiteboard/no-default-source.ts +7 -0
  42. package/src/whiteboard/provider.tsx +14 -0
  43. package/src/whiteboard/shapes.tsx +157 -0
  44. package/src/whiteboard/types.ts +99 -0
  45. package/src/whiteboard/whiteboard-base.css +87 -0
@@ -0,0 +1,4540 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/whiteboard/index.ts
31
+ var whiteboard_exports = {};
32
+ __export(whiteboard_exports, {
33
+ BoardDataProvider: () => BoardDataProvider2,
34
+ BoardReadError: () => BoardReadError,
35
+ SynapBoard: () => SynapBoard2,
36
+ createHttpBoardAdapter: () => createHttpBoardAdapter2
37
+ });
38
+ module.exports = __toCommonJS(whiteboard_exports);
39
+
40
+ // src/whiteboard/provider.tsx
41
+ var import_react9 = require("react");
42
+
43
+ // ../web/src/whiteboard/hooks/useWhiteboardCollaboration.ts
44
+ var import_react3 = require("react");
45
+ var import_tldraw = require("@tldraw/tldraw");
46
+ var Y = __toESM(require("yjs"), 1);
47
+ var import_y_socket = require("y-socket.io");
48
+ var import_y_indexeddb = require("y-indexeddb");
49
+
50
+ // ../web/src/whiteboard/hooks/room-access-watch.ts
51
+ var LOAD_FAILED_REASON = "load-failed";
52
+ function watchWhiteboardAccess(socket, setReadOnly, stop, setLoadFailed) {
53
+ socket.on("yjs-access", (payload) => {
54
+ setReadOnly(payload?.access === "read");
55
+ setLoadFailed?.(
56
+ payload?.access === "read" && payload?.reason === LOAD_FAILED_REASON
57
+ );
58
+ });
59
+ socket.on("connect_error", (error) => {
60
+ if (error?.message !== "Unauthorized") return;
61
+ stop();
62
+ setReadOnly(true);
63
+ });
64
+ }
65
+ function boardReadOnlyFor(input) {
66
+ if (input.roomReadOnly) return true;
67
+ if (input.status === "ready" || input.status === "offline") return false;
68
+ return void 0;
69
+ }
70
+
71
+ // ../web/src/whiteboard/data/use-board-data.ts
72
+ var import_react2 = require("react");
73
+
74
+ // ../web/src/whiteboard/data/board-data.ts
75
+ var import_react = require("react");
76
+ var BoardDataContext = (0, import_react.createContext)(null);
77
+ var NO_BOARD_DATA = "The Synap board has no data source: wrap it in <BoardDataProvider adapter={\u2026}> (@synap-core/react/whiteboard).";
78
+
79
+ // src/whiteboard/no-default-source.ts
80
+ var defaultBoardData = () => null;
81
+
82
+ // ../web/src/whiteboard/data/use-board-data.ts
83
+ function useBoardData() {
84
+ const provided = (0, import_react2.useContext)(BoardDataContext);
85
+ const source = provided ?? defaultBoardData();
86
+ if (!source) throw new Error(NO_BOARD_DATA);
87
+ return source;
88
+ }
89
+
90
+ // ../web/src/whiteboard/hooks/useWhiteboardCollaboration.ts
91
+ function useWhiteboardCollaboration(documentId, options) {
92
+ const { user, enabled = true, shapeUtils = [] } = options;
93
+ const room = useBoardData().useRoomConnection(documentId, {
94
+ serverUrl: options.serverUrl,
95
+ enabled: enabled && !!documentId
96
+ });
97
+ const roomRef = (0, import_react3.useRef)(room);
98
+ roomRef.current = room;
99
+ const target = room.target;
100
+ const serverUrl = target.kind === "online" ? target.url : null;
101
+ const targetKind = target.kind;
102
+ const [store, setStore] = (0, import_react3.useState)(null);
103
+ const [connected, setConnected] = (0, import_react3.useState)(false);
104
+ const [synced, setSynced] = (0, import_react3.useState)(false);
105
+ const [status, setStatus] = (0, import_react3.useState)("connecting");
106
+ const [remoteUsers, setRemoteUsers] = (0, import_react3.useState)([]);
107
+ const [readOnly, setReadOnly] = (0, import_react3.useState)(false);
108
+ const [loadFailed, setLoadFailed] = (0, import_react3.useState)(false);
109
+ const [attempt, setAttempt] = (0, import_react3.useState)(0);
110
+ const roomRetry = room.retry;
111
+ const retry = (0, import_react3.useCallback)(() => {
112
+ roomRetry?.();
113
+ setAttempt((n) => n + 1);
114
+ }, [roomRetry]);
115
+ (0, import_react3.useEffect)(() => {
116
+ if (!enabled || !documentId) {
117
+ return;
118
+ }
119
+ if (targetKind === "pending") {
120
+ setStore(null);
121
+ setStatus("connecting");
122
+ return;
123
+ }
124
+ if (targetKind === "unavailable") {
125
+ console.error(
126
+ `[Yjs] No realtime URL for whiteboard ${documentId} \u2014 refusing to open it local-only`
127
+ );
128
+ setStore(null);
129
+ setStatus("unavailable");
130
+ return;
131
+ }
132
+ if (targetKind === "offline" || !serverUrl) {
133
+ console.log("[Yjs] Offline mode (no serverUrl) \u2014 IndexedDB only:", {
134
+ documentId
135
+ });
136
+ let hydrated2 = false;
137
+ const ydoc2 = new Y.Doc();
138
+ const idbPersistence2 = new import_y_indexeddb.IndexeddbPersistence(
139
+ `synap-wb-${documentId}`,
140
+ ydoc2
141
+ );
142
+ const yMap2 = ydoc2.getMap(`tl_map_${documentId}`);
143
+ const newStore2 = (0, import_tldraw.createTLStore)({
144
+ shapeUtils: [...import_tldraw.defaultShapeUtils, ...shapeUtils]
145
+ });
146
+ yMap2.observeDeep((events) => {
147
+ newStore2.mergeRemoteChanges(() => {
148
+ const toRemove = [];
149
+ const toPut = [];
150
+ events.forEach((event) => {
151
+ const keys = event.keys;
152
+ keys.forEach((change, key) => {
153
+ if (change.action === "delete") {
154
+ toRemove.push(key);
155
+ } else {
156
+ const val = yMap2.get(key);
157
+ if (val) toPut.push(val);
158
+ }
159
+ });
160
+ });
161
+ if (toPut.length > 0)
162
+ putRecordsRecovering(newStore2, toPut, documentId);
163
+ if (toRemove.length > 0) newStore2.remove(toRemove);
164
+ });
165
+ });
166
+ newStore2.mergeRemoteChanges(() => {
167
+ const initialRecords = Array.from(yMap2.values());
168
+ if (initialRecords.length > 0) {
169
+ putRecordsRecovering(newStore2, initialRecords, documentId);
170
+ }
171
+ });
172
+ idbPersistence2.on("synced", () => {
173
+ console.log(`[Yjs] Whiteboard IDB synced (offline) for ${documentId}`);
174
+ newStore2.mergeRemoteChanges(() => {
175
+ const idbRecords = Array.from(yMap2.values());
176
+ if (idbRecords.length > 0) {
177
+ putRecordsRecovering(newStore2, idbRecords, documentId);
178
+ }
179
+ });
180
+ hydrated2 = true;
181
+ setStatus("offline");
182
+ });
183
+ const cleanupStoreListener2 = newStore2.listen(
184
+ function syncStoreToYjsOffline({ changes }) {
185
+ if (!hydrated2) return;
186
+ ydoc2.transact(() => {
187
+ Object.values(changes.added).forEach((record) => {
188
+ if (record.typeName !== "instance_presence") {
189
+ yMap2.set(record.id, record);
190
+ }
191
+ });
192
+ Object.values(changes.updated).forEach(([_, record]) => {
193
+ if (record.typeName !== "instance_presence") {
194
+ yMap2.set(record.id, record);
195
+ }
196
+ });
197
+ Object.values(changes.removed).forEach((record) => {
198
+ if (record.typeName !== "instance_presence") {
199
+ yMap2.delete(record.id);
200
+ }
201
+ });
202
+ });
203
+ },
204
+ { source: "user", scope: "document" }
205
+ );
206
+ setStore(newStore2);
207
+ setSynced(true);
208
+ setStatus("loading");
209
+ return () => {
210
+ cleanupStoreListener2();
211
+ idbPersistence2.destroy();
212
+ ydoc2.destroy();
213
+ };
214
+ }
215
+ let hydrated = false;
216
+ const openHydrationGate = () => {
217
+ if (hydrated) return;
218
+ hydrated = true;
219
+ console.log(`[Yjs] Hydration gate open for ${documentId}`);
220
+ };
221
+ const ydoc = new Y.Doc();
222
+ const roomName = `whiteboard-${documentId}`;
223
+ const idbPersistence = new import_y_indexeddb.IndexeddbPersistence(
224
+ `synap-wb-${documentId}`,
225
+ ydoc
226
+ );
227
+ console.log("[Yjs] Connecting to Yjs collaboration:", {
228
+ serverUrl,
229
+ namespace: `${serverUrl}/yjs|${roomName}`,
230
+ roomName,
231
+ documentId
232
+ });
233
+ const provider = new import_y_socket.SocketIOProvider(serverUrl, roomName, ydoc, {
234
+ autoConnect: true,
235
+ // ALWAYS send identity (a missing one once reconnect-looped every
236
+ // pod-scoped board forever).
237
+ // The /presence contract (S0): the server validates the Kratos session
238
+ // `token` and requires it to resolve to `userId`; a client-asserted id
239
+ // is no longer trusted. `workspaceId` is ignored by the server now.
240
+ // A pod app's source answers a function instead: socket.io-client calls
241
+ // it before every connect, for a fresh single-use room ticket.
242
+ auth: roomRef.current.handshake(user.id)
243
+ });
244
+ watchWhiteboardAccess(
245
+ provider.socket,
246
+ setReadOnly,
247
+ () => provider.disconnect(),
248
+ setLoadFailed
249
+ );
250
+ provider.on("sync", (isSynced) => {
251
+ console.log("[Yjs] Provider sync event:", { isSynced, roomName });
252
+ if (isSynced) {
253
+ openHydrationGate();
254
+ setStatus("ready");
255
+ }
256
+ });
257
+ provider.on("status", (payload) => {
258
+ console.log("[Yjs] Provider status event:", { payload, roomName });
259
+ });
260
+ const yMap = ydoc.getMap(`tl_map_${documentId}`);
261
+ const newStore = (0, import_tldraw.createTLStore)({
262
+ shapeUtils: [...import_tldraw.defaultShapeUtils, ...shapeUtils]
263
+ });
264
+ const unsubs = [];
265
+ yMap.observeDeep((events) => {
266
+ newStore.mergeRemoteChanges(() => {
267
+ const toRemove = [];
268
+ const toPut = [];
269
+ events.forEach((event) => {
270
+ const keys = event.keys;
271
+ keys.forEach((change, key) => {
272
+ if (change.action === "delete") {
273
+ toRemove.push(key);
274
+ } else {
275
+ const val = yMap.get(key);
276
+ if (val) toPut.push(val);
277
+ }
278
+ });
279
+ });
280
+ if (toPut.length > 0) putRecordsRecovering(newStore, toPut, documentId);
281
+ if (toRemove.length > 0) newStore.remove(toRemove);
282
+ });
283
+ });
284
+ newStore.mergeRemoteChanges(() => {
285
+ const initialRecords = Array.from(yMap.values());
286
+ if (initialRecords.length > 0) {
287
+ putRecordsRecovering(newStore, initialRecords, documentId);
288
+ }
289
+ });
290
+ idbPersistence.on("synced", () => {
291
+ newStore.mergeRemoteChanges(() => {
292
+ const idbRecords = Array.from(yMap.values());
293
+ const shapeCount = idbRecords.filter(
294
+ (r) => typeof r?.id === "string" && r.id.startsWith("shape:")
295
+ ).length;
296
+ console.log(
297
+ `[Yjs] Whiteboard IDB synced for ${documentId}: ${idbRecords.length} records, ${shapeCount} shapes`
298
+ );
299
+ if (idbRecords.length > 0) {
300
+ putRecordsRecovering(newStore, idbRecords, documentId);
301
+ }
302
+ });
303
+ openHydrationGate();
304
+ setStatus("ready");
305
+ });
306
+ const awareness = provider.awareness;
307
+ const myClientId = awareness.clientID;
308
+ awareness.setLocalStateField("user", {
309
+ id: user.id,
310
+ name: user.name,
311
+ color: user.color
312
+ });
313
+ const cleanupStoreListener = newStore.listen(
314
+ function syncStoreToYjs({ changes }) {
315
+ Object.values(changes.added).forEach((record) => {
316
+ if (record.typeName === "instance_presence") {
317
+ awareness.setLocalStateField("presence", record);
318
+ } else if (hydrated) {
319
+ ydoc.transact(() => yMap.set(record.id, record));
320
+ }
321
+ });
322
+ Object.values(changes.updated).forEach(([_, record]) => {
323
+ if (record.typeName === "instance_presence") {
324
+ awareness.setLocalStateField("presence", record);
325
+ } else if (hydrated) {
326
+ ydoc.transact(() => yMap.set(record.id, record));
327
+ }
328
+ });
329
+ Object.values(changes.removed).forEach((record) => {
330
+ if (record.typeName === "instance_presence") {
331
+ awareness.setLocalStateField("presence", null);
332
+ } else if (hydrated) {
333
+ ydoc.transact(() => yMap.delete(record.id));
334
+ }
335
+ });
336
+ },
337
+ { source: "user", scope: "all" }
338
+ // Scope all to catch presence
339
+ );
340
+ unsubs.push(cleanupStoreListener);
341
+ const handleAwarenessUpdate = () => {
342
+ const states = Array.from(awareness.getStates().entries());
343
+ newStore.mergeRemoteChanges(() => {
344
+ const records = [];
345
+ states.forEach(([clientId, state]) => {
346
+ if (clientId === myClientId) return;
347
+ if (!state.presence) return;
348
+ records.push(state.presence);
349
+ });
350
+ if (records.length > 0) {
351
+ newStore.put(records);
352
+ }
353
+ });
354
+ const others = [];
355
+ states.forEach(([clientId, state]) => {
356
+ if (clientId === myClientId) return;
357
+ const u = state.user;
358
+ if (!u) return;
359
+ const cursor = state.presence?.cursor ?? null;
360
+ others.push({
361
+ clientId,
362
+ id: u.id,
363
+ name: u.name,
364
+ color: u.color,
365
+ cursor: cursor ? { x: cursor.x, y: cursor.y } : null
366
+ });
367
+ });
368
+ setRemoteUsers(others);
369
+ };
370
+ awareness.on("update", handleAwarenessUpdate);
371
+ unsubs.push(() => awareness.off("update", handleAwarenessUpdate));
372
+ const handleConnect = () => {
373
+ setConnected(true);
374
+ };
375
+ const handleDisconnect = () => {
376
+ setConnected(false);
377
+ };
378
+ const handleSync = (isSynced) => {
379
+ setSynced(isSynced);
380
+ if (isSynced) setConnected(true);
381
+ };
382
+ provider.on("sync", handleSync);
383
+ provider.on("status", (payload) => {
384
+ const obj = Array.isArray(payload) ? payload[0] : payload;
385
+ const statusStr = typeof obj === "string" ? obj : obj && typeof obj === "object" && obj !== null && "status" in obj ? obj.status : void 0;
386
+ if (statusStr === "connected") handleConnect();
387
+ if (statusStr === "disconnected") handleDisconnect();
388
+ });
389
+ if ("synced" in provider && provider.synced === true) {
390
+ setSynced(true);
391
+ setConnected(true);
392
+ openHydrationGate();
393
+ }
394
+ const socket = provider.socket;
395
+ if (socket?.connected === true) {
396
+ setConnected(true);
397
+ }
398
+ setStore(newStore);
399
+ setStatus(hydrated ? "ready" : "connecting");
400
+ const joined = roomRef.current;
401
+ joined.join?.(documentId);
402
+ return () => {
403
+ unsubs.forEach((fn) => fn());
404
+ setRemoteUsers([]);
405
+ setReadOnly(false);
406
+ setLoadFailed(false);
407
+ joined.leave?.(documentId);
408
+ idbPersistence.destroy();
409
+ provider.destroy();
410
+ ydoc.destroy();
411
+ };
412
+ }, [
413
+ documentId,
414
+ enabled,
415
+ serverUrl,
416
+ targetKind,
417
+ user.id,
418
+ user.name,
419
+ user.color,
420
+ attempt
421
+ ]);
422
+ return {
423
+ store,
424
+ connected,
425
+ synced,
426
+ status,
427
+ remoteUsers,
428
+ readOnly,
429
+ loadFailed,
430
+ retry,
431
+ /** The data source could not open the room (a refused or failed ticket); null = none. */
432
+ roomFailure: room.failure
433
+ };
434
+ }
435
+ function putRecordsRecovering(store, records, documentId) {
436
+ try {
437
+ store.put(records);
438
+ return;
439
+ } catch (putErr) {
440
+ console.warn(
441
+ `[Yjs] Bulk put failed for ${documentId} \u2014 recovering per-record:`,
442
+ putErr
443
+ );
444
+ }
445
+ let recovered = 0;
446
+ for (const rec of records) {
447
+ try {
448
+ store.put([rec]);
449
+ recovered++;
450
+ } catch (recErr) {
451
+ console.warn(
452
+ `[Yjs] Dropped unloadable record ${rec?.id}:`,
453
+ recErr
454
+ );
455
+ }
456
+ }
457
+ console.log(
458
+ `[Yjs] Per-record recovery: ${recovered}/${records.length} records loaded for ${documentId}`
459
+ );
460
+ }
461
+
462
+ // ../web/src/whiteboard/hooks/readonly-tool-guard.ts
463
+ var import_tldraw2 = require("@tldraw/tldraw");
464
+ var READONLY_SAFE_TOOLS = /* @__PURE__ */ new Set([
465
+ "select",
466
+ "hand",
467
+ "laser",
468
+ "zoom"
469
+ ]);
470
+ function isToolAllowed(toolId, isReadonly) {
471
+ return !isReadonly || READONLY_SAFE_TOOLS.has(toolId);
472
+ }
473
+ function installReadonlyToolGuard(editor) {
474
+ const blocked = () => !isToolAllowed(editor.getCurrentToolId(), editor.getInstanceState().isReadonly);
475
+ let disposed = false;
476
+ let pending = false;
477
+ const stop = (0, import_tldraw2.react)("whiteboard readonly tool guard", () => {
478
+ if (!blocked() || pending) return;
479
+ pending = true;
480
+ queueMicrotask(() => {
481
+ pending = false;
482
+ if (!disposed && blocked()) editor.setCurrentTool("select");
483
+ });
484
+ });
485
+ return () => {
486
+ disposed = true;
487
+ stop();
488
+ };
489
+ }
490
+
491
+ // ../web/src/whiteboard/shapes/StickyShapeUtil.tsx
492
+ var import_tldraw3 = require("@tldraw/tldraw");
493
+ var import_react5 = require("react");
494
+
495
+ // ../web/src/whiteboard/hooks/useIsDark.ts
496
+ var import_react4 = require("react");
497
+ var DARK_CLASS = "synap-spatial--dark";
498
+ function readIsDark() {
499
+ return typeof document !== "undefined" && document.body.classList.contains(DARK_CLASS);
500
+ }
501
+ function useIsDark() {
502
+ const [isDark, setIsDark] = (0, import_react4.useState)(readIsDark);
503
+ (0, import_react4.useEffect)(() => {
504
+ const obs = new MutationObserver(() => setIsDark(readIsDark()));
505
+ obs.observe(document.body, { attributes: true, attributeFilter: ["class"] });
506
+ setIsDark(readIsDark());
507
+ return () => obs.disconnect();
508
+ }, []);
509
+ return isDark;
510
+ }
511
+
512
+ // ../web/src/whiteboard/shapes/StickyShapeUtil.tsx
513
+ var import_jsx_runtime = require("react/jsx-runtime");
514
+ var STICKY_PALETTE = {
515
+ yellow: { surface: { light: "#FEF08A", dark: "#713F12" }, text: { light: "#713F12", dark: "#FEF9C3" } },
516
+ pink: { surface: { light: "#FBCFE8", dark: "#831843" }, text: { light: "#831843", dark: "#FCE7F3" } },
517
+ blue: { surface: { light: "#BAE6FD", dark: "#0C4A6E" }, text: { light: "#0C4A6E", dark: "#E0F2FE" } },
518
+ green: { surface: { light: "#BBF7D0", dark: "#14532D" }, text: { light: "#14532D", dark: "#DCFCE7" } },
519
+ orange: { surface: { light: "#FED7AA", dark: "#7C2D12" }, text: { light: "#7C2D12", dark: "#FFF7ED" } },
520
+ purple: { surface: { light: "#E9D5FF", dark: "#4C1D95" }, text: { light: "#4C1D95", dark: "#F3E8FF" } }
521
+ };
522
+ function StickyComponent({ shape }) {
523
+ const editor = (0, import_tldraw3.useEditor)();
524
+ const isDark = useIsDark();
525
+ const textareaRef = (0, import_react5.useRef)(null);
526
+ const { w, h, content, color, brandColor, brandMeta } = shape.props;
527
+ const mode = isDark ? "dark" : "light";
528
+ const bgColor = brandColor ? brandColor : STICKY_PALETTE[color].surface[mode];
529
+ const textColor = brandColor ? (
530
+ // For brand colors, we compute contrasting text color
531
+ isDark ? "#FFFFFF" : "#000000"
532
+ ) : STICKY_PALETTE[color].text[mode];
533
+ const isEditing = editor.getEditingShapeId() === shape.id;
534
+ (0, import_react5.useEffect)(() => {
535
+ if (isEditing && textareaRef.current) {
536
+ textareaRef.current.focus();
537
+ }
538
+ }, [isEditing]);
539
+ const handleChange = (0, import_react5.useCallback)(
540
+ (e) => {
541
+ editor.updateShape({
542
+ id: shape.id,
543
+ type: "sticky",
544
+ props: { ...shape.props, content: e.target.value }
545
+ });
546
+ },
547
+ [editor, shape.id, shape.props]
548
+ );
549
+ const handlePointerDown = (0, import_react5.useCallback)(
550
+ (e) => {
551
+ if (isEditing) e.stopPropagation();
552
+ },
553
+ [isEditing]
554
+ );
555
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
556
+ "div",
557
+ {
558
+ style: {
559
+ width: w,
560
+ height: h,
561
+ backgroundColor: bgColor,
562
+ borderRadius: 6,
563
+ position: "relative",
564
+ overflow: "hidden",
565
+ pointerEvents: isEditing ? "all" : "none"
566
+ },
567
+ onPointerDown: handlePointerDown,
568
+ children: [
569
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
570
+ "textarea",
571
+ {
572
+ ref: textareaRef,
573
+ value: content,
574
+ onChange: handleChange,
575
+ readOnly: !isEditing,
576
+ style: {
577
+ position: "absolute",
578
+ inset: 0,
579
+ width: "100%",
580
+ height: "100%",
581
+ padding: "var(--synap-space-150)",
582
+ background: "transparent",
583
+ border: "none",
584
+ outline: "none",
585
+ resize: "none",
586
+ fontSize: "var(--synap-text-base)",
587
+ fontFamily: "var(--synap-font-body)",
588
+ lineHeight: "var(--synap-leading-relaxed)",
589
+ color: textColor,
590
+ cursor: isEditing ? "text" : "default",
591
+ boxSizing: "border-box"
592
+ }
593
+ }
594
+ ),
595
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
596
+ "div",
597
+ {
598
+ style: {
599
+ position: "absolute",
600
+ bottom: 0,
601
+ right: 0,
602
+ width: 0,
603
+ height: 0,
604
+ borderTop: "16px solid transparent",
605
+ borderLeft: `16px solid color-mix(in srgb, ${textColor} 12%, transparent)`,
606
+ pointerEvents: "none"
607
+ },
608
+ "data-brand-color": brandColor ?? void 0,
609
+ "data-brand-meta": brandMeta ? JSON.stringify(brandMeta) : void 0
610
+ }
611
+ )
612
+ ]
613
+ }
614
+ );
615
+ }
616
+ var StickyShapeUtil = class extends import_tldraw3.BaseBoxShapeUtil {
617
+ static type = "sticky";
618
+ getDefaultProps() {
619
+ return {
620
+ w: 240,
621
+ h: 200,
622
+ content: "",
623
+ color: "yellow"
624
+ };
625
+ }
626
+ getGeometry(shape) {
627
+ return new import_tldraw3.Rectangle2d({
628
+ width: shape.props.w,
629
+ height: shape.props.h,
630
+ isFilled: true
631
+ });
632
+ }
633
+ canEdit = () => true;
634
+ canResize = () => true;
635
+ isAspectRatioLocked = () => false;
636
+ onEditEnd = (_shape) => {
637
+ };
638
+ component(shape) {
639
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StickyComponent, { shape });
640
+ }
641
+ indicator(shape) {
642
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
643
+ "rect",
644
+ {
645
+ width: shape.props.w,
646
+ height: shape.props.h,
647
+ rx: 6,
648
+ ry: 6
649
+ }
650
+ );
651
+ }
652
+ };
653
+
654
+ // ../web/src/whiteboard/shapes/FrameShapeUtil.tsx
655
+ var import_tldraw4 = require("@tldraw/tldraw");
656
+ var import_jsx_runtime2 = require("react/jsx-runtime");
657
+ var FrameShapeUtil = class extends import_tldraw4.BaseBoxShapeUtil {
658
+ static type = "synap-frame";
659
+ getDefaultProps() {
660
+ return { w: 800, h: 600, title: "Section", index: 0 };
661
+ }
662
+ getGeometry(shape) {
663
+ return new import_tldraw4.Rectangle2d({
664
+ width: shape.props.w,
665
+ height: shape.props.h,
666
+ isFilled: true
667
+ });
668
+ }
669
+ canEdit = () => false;
670
+ canResize = () => true;
671
+ hideSelectionBoundsBg = () => true;
672
+ component(shape) {
673
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
674
+ "div",
675
+ {
676
+ style: {
677
+ width: shape.props.w,
678
+ height: shape.props.h,
679
+ position: "relative",
680
+ pointerEvents: "none"
681
+ },
682
+ children: [
683
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
684
+ "div",
685
+ {
686
+ style: {
687
+ position: "absolute",
688
+ inset: 0,
689
+ border: "1px solid var(--synap-border-color)",
690
+ borderRadius: 8,
691
+ background: "var(--synap-background-surface)",
692
+ opacity: 0.4,
693
+ boxSizing: "border-box"
694
+ }
695
+ }
696
+ ),
697
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
698
+ "div",
699
+ {
700
+ style: {
701
+ position: "absolute",
702
+ top: "calc(-1 * var(--synap-space-300))",
703
+ left: "var(--synap-space-025)",
704
+ fontFamily: "var(--synap-font-body)",
705
+ fontSize: "var(--synap-text-xs)",
706
+ fontWeight: "var(--synap-weight-semibold)",
707
+ color: "var(--synap-color)",
708
+ whiteSpace: "nowrap"
709
+ },
710
+ children: shape.props.title
711
+ }
712
+ )
713
+ ]
714
+ }
715
+ );
716
+ }
717
+ indicator(shape) {
718
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { width: shape.props.w, height: shape.props.h, rx: 8, ry: 8 });
719
+ }
720
+ };
721
+
722
+ // ../web/src/whiteboard/components/CollabStatusChip.tsx
723
+ var import_jsx_runtime3 = require("react/jsx-runtime");
724
+ function CollabStatusChip({ collabStatus }) {
725
+ const chip = {
726
+ connecting: { dot: "var(--synap-muted)", label: "Connecting\u2026" },
727
+ loading: {
728
+ dot: "var(--synap-muted)",
729
+ label: "Loading your board\u2026"
730
+ },
731
+ ready: { dot: "var(--synap-success)", label: "Live" },
732
+ offline: {
733
+ dot: "var(--synap-warning)",
734
+ label: "Offline \xB7 saved on this device"
735
+ }
736
+ };
737
+ const c = chip[collabStatus] ?? chip.connecting;
738
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
739
+ "div",
740
+ {
741
+ className: "wb-collab-chip",
742
+ style: {
743
+ display: "flex",
744
+ flexDirection: "row",
745
+ alignItems: "center",
746
+ position: "absolute",
747
+ top: "var(--synap-space-200)",
748
+ left: "var(--synap-space-800)",
749
+ background: "var(--synap-background)",
750
+ padding: "var(--synap-space-075) var(--synap-space-125)",
751
+ borderRadius: 16,
752
+ border: "1px solid var(--synap-border-color)",
753
+ gap: "var(--synap-space-075)",
754
+ pointerEvents: "none"
755
+ },
756
+ children: [
757
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
758
+ "div",
759
+ {
760
+ style: {
761
+ width: 6,
762
+ height: 6,
763
+ borderRadius: "var(--synap-radius-round)",
764
+ background: c.dot
765
+ }
766
+ }
767
+ ),
768
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
769
+ "span",
770
+ {
771
+ style: {
772
+ fontSize: "var(--synap-text-2xs)",
773
+ color: "var(--synap-muted)"
774
+ },
775
+ children: c.label
776
+ }
777
+ )
778
+ ]
779
+ }
780
+ );
781
+ }
782
+
783
+ // ../web/src/spatial-ui/components.tsx
784
+ var import_react6 = require("react");
785
+ var import_react_dom = require("react-dom");
786
+ var import_react_aria_components2 = require("react-aria-components");
787
+
788
+ // ../../../synap-backend/packages/types/dist/vocabulary/draft-words.js
789
+ var DRAFT_DECISION_WORDS = {
790
+ en: {
791
+ approve: {
792
+ imperative: "Approve",
793
+ past: "Approved",
794
+ progressive: "Approving"
795
+ },
796
+ discard: {
797
+ imperative: "Discard",
798
+ past: "Discarded",
799
+ progressive: "Discarding"
800
+ }
801
+ },
802
+ fr: {
803
+ approve: {
804
+ imperative: "Approuver",
805
+ past: "Approuv\xE9",
806
+ progressive: "Approbation en cours"
807
+ },
808
+ discard: {
809
+ imperative: "\xC9carter",
810
+ past: "\xC9cart\xE9",
811
+ progressive: "Mise \xE0 l\u2019\xE9cart en cours"
812
+ }
813
+ }
814
+ };
815
+
816
+ // ../../../synap-backend/packages/types/dist/value-format/numbers.js
817
+ var NBSP = "\xA0";
818
+ var COMPACT_UNITS = {
819
+ en: { k: "k", m: "M" },
820
+ fr: { k: `${NBSP}k`, m: `${NBSP}M` }
821
+ };
822
+ var DURATION_UNITS = {
823
+ en: { ms: "ms", s: "s", min: "m", h: "h", d: "d" },
824
+ fr: {
825
+ ms: `${NBSP}ms`,
826
+ s: `${NBSP}s`,
827
+ min: `${NBSP}min`,
828
+ h: `${NBSP}h`,
829
+ d: `${NBSP}j`
830
+ }
831
+ };
832
+
833
+ // ../../../synap-backend/packages/types/dist/i18n/noun.js
834
+ var NOUN_BUNDLE_MEMBERS = [
835
+ "obj",
836
+ "Obj",
837
+ "objs",
838
+ "objG",
839
+ "objV"
840
+ ];
841
+
842
+ // ../../../synap-backend/packages/types/dist/i18n/translator.js
843
+ var BUNDLE_MEMBERS = new Set(NOUN_BUNDLE_MEMBERS);
844
+ var NOUN_BUNDLE = `{${NOUN_BUNDLE_MEMBERS.join(",")}}`;
845
+
846
+ // ../../../synap-backend/packages/types/dist/vocabulary/catalog.en.js
847
+ var vocabularySentencesEn = {
848
+ // `buildObjectActionTitle`. A title is "<verb> <Noun>", a preposition
849
+ // between them when the verb names the part it acts within
850
+ // (`ACTION_OBJECT_PREPOSITIONS`), and the object's name quoted after it.
851
+ // Keyed by mood because only English can say both moods in one order.
852
+ // With no verb, the title names the request itself (founder G1, 30 Oct):
853
+ // "Request" is also a verb, so the noun is set apart by a colon.
854
+ "vocabulary.title.fallbackVerb": "Request",
855
+ "vocabulary.title.noVerb": "Request: {Obj}",
856
+ "vocabulary.title.noVerb.named": 'Request: {Obj} "{name}"',
857
+ "vocabulary.title.lead": "{verb}: {name}",
858
+ // A capability asked for one of the person's computers
859
+ // (`buildInstallationTitle`): what, and on which computer.
860
+ "vocabulary.title.onComputer": '{verb} "{name}" on {computer}',
861
+ "vocabulary.title.fromComputer": '{verb} "{name}" from {computer}',
862
+ "vocabulary.title.addAndInstallOn": 'Add "{name}" from the marketplace and install it on {computer}',
863
+ "vocabulary.title.verbOnly.named": '{verb} "{name}"',
864
+ "vocabulary.title.imperative": "{verb} {Obj}",
865
+ "vocabulary.title.imperative.named": '{verb} {Obj} "{name}"',
866
+ "vocabulary.title.imperative.in": "{verb} in {Obj}",
867
+ "vocabulary.title.imperative.in.named": '{verb} in {Obj} "{name}"',
868
+ "vocabulary.title.imperative.of": "{verb} of {Obj}",
869
+ "vocabulary.title.imperative.of.named": '{verb} of {Obj} "{name}"',
870
+ "vocabulary.title.imperative.for": "{verb} for {Obj}",
871
+ "vocabulary.title.imperative.for.named": '{verb} for {Obj} "{name}"',
872
+ "vocabulary.title.past": "{verb} {Obj}",
873
+ "vocabulary.title.past.named": '{verb} {Obj} "{name}"',
874
+ "vocabulary.title.past.in": "{verb} in {Obj}",
875
+ "vocabulary.title.past.in.named": '{verb} in {Obj} "{name}"',
876
+ "vocabulary.title.past.of": "{verb} of {Obj}",
877
+ "vocabulary.title.past.of.named": '{verb} of {Obj} "{name}"',
878
+ "vocabulary.title.past.for": "{verb} for {Obj}",
879
+ "vocabulary.title.past.for.named": '{verb} for {Obj} "{name}"',
880
+ // `buildActionLabel`: a button's words, the noun mid-sentence.
881
+ "vocabulary.button.imperative": "{verb} {obj}",
882
+ "vocabulary.button.imperative.in": "{verb} in {obj}",
883
+ "vocabulary.button.imperative.of": "{verb} of {obj}",
884
+ "vocabulary.button.imperative.for": "{verb} for {obj}",
885
+ "vocabulary.button.past": "{verb} {obj}",
886
+ "vocabulary.button.past.in": "{verb} in {obj}",
887
+ "vocabulary.button.past.of": "{verb} of {obj}",
888
+ "vocabulary.button.past.for": "{verb} for {obj}",
889
+ // `resolveTrackMoveLabel`: a goal's plain move names where it goes.
890
+ "vocabulary.track.moveTo": "Move to {status}",
891
+ // `resolvePrivateObjectLabel`: an object the viewer may not read.
892
+ "vocabulary.private": "Private {obj}",
893
+ "vocabulary.private.unnamed": "Private item",
894
+ // `resolveMembersDecideLabel`: who may decide a proposal the viewer sees.
895
+ "vocabulary.membersDecide": "{Obj} members decide",
896
+ "vocabulary.membersDecide.unnamed": "Item members decide",
897
+ // `resolveHandedToLabel`: a slot handed to an agent (past).
898
+ "vocabulary.handedTo": "Handed to {name}",
899
+ // `resolveDoNotContactRefusal`: why the send door sent nothing to a person
900
+ // marked do not contact (founder, 2026-11-09). The reason, when the person
901
+ // gave one, is said as written.
902
+ "vocabulary.refusal.doNotContact": "Nothing was sent: {name} is marked do not contact.",
903
+ "vocabulary.refusal.doNotContact.reason": "Nothing was sent: {name} is marked do not contact ({reason}).",
904
+ "vocabulary.refusal.doNotContact.unnamed": "this person",
905
+ // `resolveRunnerStateLabelFor`: a runner's wait read by someone other than
906
+ // the person it waits on (a room member): never "your".
907
+ "vocabulary.runner.needs_permission.named": "Waiting for {name}'s permission",
908
+ "vocabulary.runner.needs_permission.unnamed": "Waiting for permission",
909
+ "vocabulary.runner.needs_answer.named": "Waiting for {name}'s answer",
910
+ "vocabulary.runner.needs_answer.unnamed": "Waiting for an answer",
911
+ // `resolveNextRungOfferLabel`: a trust offer that reaches every space.
912
+ "vocabulary.offer.everySpace": "{offer} in every space",
913
+ // `resolveTemplateNoun`: a template's noun, derived from its scope.
914
+ "vocabulary.templateNoun.goal.one": "Goal process",
915
+ "vocabulary.templateNoun.goal.other": "Goal processes",
916
+ "vocabulary.templateNoun.work.one": "Process",
917
+ "vocabulary.templateNoun.work.other": "Processes",
918
+ "vocabulary.templateNoun.space.one": "Space template",
919
+ "vocabulary.templateNoun.space.other": "Space templates",
920
+ // `resolvePackageNoun`: what installs, named by what it holds (founder,
921
+ // 2026-11-05): ONE object (a capability, a playbook, a cell, a kind, an
922
+ // automation) is a template; several (a space with its kinds and views, a
923
+ // set of workflows) are a pack.
924
+ "vocabulary.packageNoun.template.one": "Template",
925
+ "vocabulary.packageNoun.template.other": "Templates",
926
+ "vocabulary.packageNoun.pack.one": "Pack",
927
+ "vocabulary.packageNoun.pack.other": "Packs",
928
+ // `resolveGrantPermissionSentence`: a permission the person reads as its
929
+ // act, not as a verb and a subject.
930
+ "vocabulary.grant.packageInstall": "Add packs and templates to your pod",
931
+ // `resolveNeedsYouItemCount` for a kind no table names: its words are a
932
+ // humanized token, counted with English plural rules.
933
+ "vocabulary.needsYou.count.uncurated": "{n, plural, one {# {noun}} other {# {nouns}}}",
934
+ // `resolveProcessHealthLabel` / `resolveProcessHealthReason`: a process
935
+ // health's words, keyed by its reason code (`PROCESS_HEALTH_REASONS`,
936
+ // `@synap-core/types/processes`). `waiting_on_you`'s label is the status
937
+ // label door's (`status.waiting_on_you`), so it has no row here.
938
+ "vocabulary.processHealth.config_invalid.label": "Configuration error",
939
+ "vocabulary.processHealth.config_invalid.reason": "The saved definition is invalid or cannot be activated.",
940
+ "vocabulary.processHealth.running.label": "Running",
941
+ "vocabulary.processHealth.running.reason": "At least one execution is currently in progress.",
942
+ "vocabulary.processHealth.running_after_failure.label": "Running \xB7 previous run failed",
943
+ "vocabulary.processHealth.running_after_failure.reason": "An execution is in progress after the previous known outcome failed.",
944
+ "vocabulary.processHealth.waiting_on_you.reason": "The latest run is paused until you answer what its session asked of you.",
945
+ "vocabulary.processHealth.blocked_by_policy.label": "Blocked by policy",
946
+ "vocabulary.processHealth.blocked_by_policy.reason": "Governance refused the latest run\u2019s effect \u2014 it needs your review.",
947
+ "vocabulary.processHealth.latest_failed.label": "Latest run failed",
948
+ "vocabulary.processHealth.latest_failed.reason": "No newer successful outcome resolves the latest failure.",
949
+ "vocabulary.processHealth.draft.label": "Draft",
950
+ "vocabulary.processHealth.draft.reason": "The definition still needs to be completed or activated.",
951
+ "vocabulary.processHealth.paused.label": "Paused",
952
+ "vocabulary.processHealth.paused.reason": "The definition is paused and will not start new runs.",
953
+ "vocabulary.processHealth.archived.label": "Archived",
954
+ "vocabulary.processHealth.archived.reason": "The definition is archived and will not start new runs.",
955
+ "vocabulary.processHealth.healthy.label": "Healthy",
956
+ "vocabulary.processHealth.healthy.reason": "The latest known outcome completed without failure.",
957
+ "vocabulary.processHealth.latest_unresolved.label": "Latest status unresolved",
958
+ "vocabulary.processHealth.latest_unresolved.reason": "The latest execution is {status}; Synap cannot classify it as healthy or failed yet.",
959
+ "vocabulary.processHealth.never_run.label": "Never run",
960
+ "vocabulary.processHealth.never_run.reason": "This saved definition has no executions yet.",
961
+ "vocabulary.processHealth.not_enough_activity.label": "Status unknown",
962
+ "vocabulary.processHealth.not_enough_activity.reason": "There is not enough loaded activity to determine current health.",
963
+ // `resolveJobsStartedHereLabel`: a job's folded child jobs on its Activity
964
+ // line (plan 5207fbb6: a child job is drawn as a fork, never named a
965
+ // "branch"), counted with the Job word.
966
+ "vocabulary.job.startedHere": "{n, plural, one {# job started from here} other {# jobs started from here}}"
967
+ };
968
+ function buildVocabularyEn(tables) {
969
+ const words = {};
970
+ for (const [slug, def] of Object.entries(tables.kinds)) {
971
+ words[`kind.${slug}.one`] = def.label;
972
+ words[`kind.${slug}.other`] = def.labelPlural;
973
+ }
974
+ for (const [slug, noun] of Object.entries(tables.nouns)) {
975
+ words[`kind.${slug}.one`] = noun;
976
+ words[`kind.${slug}.other`] = tables.nounPlurals[slug] ?? noun;
977
+ }
978
+ for (const [token, verb] of Object.entries(tables.verbs)) {
979
+ words[`action.${token}.imperative`] = verb.imperative;
980
+ words[`action.${token}.past`] = verb.past;
981
+ if (verb.progressive !== void 0) {
982
+ words[`action.${token}.progressive`] = verb.progressive;
983
+ }
984
+ if (verb.present !== void 0) {
985
+ words[`action.${token}.present`] = verb.present;
986
+ }
987
+ }
988
+ for (const [token, label] of Object.entries(tables.statuses)) {
989
+ words[`status.${token}`] = label;
990
+ }
991
+ for (const [kind, [one, other]] of Object.entries(tables.needsYouNouns)) {
992
+ words[`needsYou.count.${kind}`] = `{n, plural, one {# ${one}} other {# ${other}}}`;
993
+ }
994
+ for (const [state, label] of Object.entries(tables.runnerStates)) {
995
+ words[`runner.${state}`] = label;
996
+ }
997
+ for (const [kind, label] of Object.entries(tables.waitKinds)) {
998
+ words[`waitKind.${kind}`] = label;
999
+ }
1000
+ for (const [kind, label] of Object.entries(tables.stepRunners)) {
1001
+ words[`stepRunner.${kind}`] = label;
1002
+ }
1003
+ for (const [slug, label] of Object.entries(tables.needs)) {
1004
+ words[`need.${slug}`] = label;
1005
+ }
1006
+ for (const [slug, label] of Object.entries(tables.intents)) {
1007
+ words[`intent.${slug}`] = label;
1008
+ }
1009
+ return { ...words, ...vocabularySentencesEn };
1010
+ }
1011
+
1012
+ // ../../../synap-backend/packages/types/dist/vocabulary/catalog.fr.js
1013
+ var vocabularyFr = {
1014
+ // ── Object kinds: `kind.<slug>.one` / `.other` ──
1015
+ "kind.task.one": "T\xE2che",
1016
+ "kind.task.other": "T\xE2ches",
1017
+ "kind.note.one": "Note",
1018
+ "kind.note.other": "Notes",
1019
+ "kind.person.one": "Personne",
1020
+ "kind.person.other": "Personnes",
1021
+ "kind.contact.one": "Contact",
1022
+ "kind.contact.other": "Contacts",
1023
+ "kind.company.one": "Entreprise",
1024
+ "kind.company.other": "Entreprises",
1025
+ "kind.deal.one": "Affaire",
1026
+ "kind.deal.other": "Affaires",
1027
+ "kind.client.one": "Client",
1028
+ "kind.client.other": "Clients",
1029
+ "kind.event.one": "\xC9v\xE9nement",
1030
+ "kind.event.other": "\xC9v\xE9nements",
1031
+ "kind.meeting.one": "R\xE9union",
1032
+ "kind.meeting.other": "R\xE9unions",
1033
+ "kind.file.one": "Fichier",
1034
+ "kind.file.other": "Fichiers",
1035
+ "kind.code.one": "Code",
1036
+ "kind.code.other": "Code",
1037
+ "kind.bookmark.one": "Favori",
1038
+ "kind.bookmark.other": "Favoris",
1039
+ "kind.website.one": "Site web",
1040
+ "kind.website.other": "Sites web",
1041
+ "kind.article.one": "Article",
1042
+ "kind.article.other": "Articles",
1043
+ "kind.decision.one": "D\xE9cision",
1044
+ "kind.decision.other": "D\xE9cisions",
1045
+ "kind.report.one": "Rapport",
1046
+ "kind.report.other": "Rapports",
1047
+ "kind.capture.one": "Capture",
1048
+ "kind.capture.other": "Captures",
1049
+ "kind.idea.one": "Id\xE9e",
1050
+ "kind.idea.other": "Id\xE9es",
1051
+ "kind.entity.one": "\xC9l\xE9ment",
1052
+ "kind.entity.other": "\xC9l\xE9ments",
1053
+ "kind.view.one": "Vue",
1054
+ "kind.view.other": "Vues",
1055
+ "kind.widget.one": "Widget",
1056
+ "kind.widget.other": "Widgets",
1057
+ "kind.cell.one": "Carte",
1058
+ "kind.cell.other": "Cartes",
1059
+ "kind.document.one": "Document",
1060
+ "kind.document.other": "Documents",
1061
+ "kind.channel.one": "Canal",
1062
+ "kind.channel.other": "Canaux",
1063
+ "kind.project.one": "Projet",
1064
+ "kind.project.other": "Projets",
1065
+ "kind.track.one": "Objectif",
1066
+ "kind.track.other": "Objectifs",
1067
+ "kind.stage.one": "\xC9tape",
1068
+ "kind.stage.other": "\xC9tapes",
1069
+ "kind.session.one": "Travail",
1070
+ "kind.session.other": "Travaux",
1071
+ "kind.workspace.one": "Espace",
1072
+ "kind.workspace.other": "Espaces",
1073
+ "kind.skill.one": "Outil",
1074
+ "kind.skill.other": "Outils",
1075
+ "kind.automation.one": "Automatisation",
1076
+ "kind.automation.other": "Automatisations",
1077
+ "kind.playbook.one": "Processus",
1078
+ "kind.playbook.other": "Processus",
1079
+ "kind.capability.one": "Outil",
1080
+ "kind.capability.other": "Outils",
1081
+ "kind.command.one": "Commande",
1082
+ "kind.command.other": "Commandes",
1083
+ "kind.tool.one": "Outil",
1084
+ "kind.tool.other": "Outils",
1085
+ "kind.need.one": "Besoin",
1086
+ "kind.need.other": "Besoins",
1087
+ "kind.application.one": "App connect\xE9e",
1088
+ "kind.application.other": "Apps connect\xE9es",
1089
+ "kind.issuer.one": "\xC9metteur de confiance",
1090
+ "kind.issuer.other": "\xC9metteurs de confiance",
1091
+ "kind.run.one": "Ex\xE9cution",
1092
+ "kind.run.other": "Ex\xE9cutions",
1093
+ "kind.source.one": "Source",
1094
+ "kind.source.other": "Sources",
1095
+ "kind.participant.one": "Participant",
1096
+ "kind.participant.other": "Participants",
1097
+ "kind.activity.one": "Activit\xE9",
1098
+ "kind.activity.other": "Activit\xE9",
1099
+ "kind.pack.one": "Pack",
1100
+ "kind.pack.other": "Packs",
1101
+ "kind.agent.one": "Agent",
1102
+ "kind.agent.other": "Agents",
1103
+ "kind.machine.one": "Ordinateur",
1104
+ "kind.machine.other": "Ordinateurs",
1105
+ "kind.governance_rule.one": "Approbation",
1106
+ "kind.governance_rule.other": "Approbations",
1107
+ "kind.proposal.one": "Demande",
1108
+ "kind.proposal.other": "Demandes",
1109
+ "kind.notification.one": "Notification",
1110
+ "kind.notification.other": "Notifications",
1111
+ "kind.pod.one": "Votre entreprise",
1112
+ "kind.pod.other": "Vos entreprises",
1113
+ "kind.data-pod.one": "Votre entreprise",
1114
+ "kind.data-pod.other": "Vos entreprises",
1115
+ "kind.desktop.one": "Application de bureau",
1116
+ "kind.desktop.other": "Applications de bureau",
1117
+ "kind.cli.one": "Agent CLI",
1118
+ "kind.cli.other": "Agents CLI",
1119
+ "kind.telegram.one": "Telegram",
1120
+ "kind.telegram.other": "Telegram",
1121
+ "kind.raycast.one": "Raycast",
1122
+ "kind.raycast.other": "Raycast",
1123
+ "kind.relation_def.one": "Type de relation",
1124
+ "kind.relation_def.other": "Types de relation",
1125
+ "kind.mcp.one": "Serveur MCP",
1126
+ "kind.mcp.other": "Serveurs MCP",
1127
+ "kind.api_key.one": "Cl\xE9 API",
1128
+ "kind.api_key.other": "Cl\xE9s API",
1129
+ "kind.ssh_key.one": "Cl\xE9 SSH",
1130
+ "kind.ssh_key.other": "Cl\xE9s SSH",
1131
+ "kind.intelligence_service.one": "Service d\u2019IA",
1132
+ "kind.intelligence_service.other": "Services d\u2019IA",
1133
+ "kind.secret.one": "Secret",
1134
+ "kind.secret.other": "Secrets",
1135
+ "kind.env_variable.one": "Variable d\u2019environnement",
1136
+ "kind.env_variable.other": "Variables d\u2019environnement",
1137
+ "kind.url.one": "Page",
1138
+ "kind.url.other": "Pages",
1139
+ "kind.proactive.one": "IA proactive",
1140
+ "kind.proactive.other": "IA proactives",
1141
+ "kind.share_link.one": "Lien de partage",
1142
+ "kind.share_link.other": "Liens de partage",
1143
+ "kind.guest.one": "Invit\xE9",
1144
+ "kind.guest.other": "Invit\xE9s",
1145
+ "kind.form.one": "Formulaire",
1146
+ "kind.form.other": "Formulaires",
1147
+ "kind.submission.one": "R\xE9ponse",
1148
+ "kind.submission.other": "R\xE9ponses",
1149
+ "kind.property.one": "Champ",
1150
+ "kind.property.other": "Champs",
1151
+ "kind.ui-design.one": "Design d\u2019interface",
1152
+ "kind.ui-design.other": "Designs d\u2019interface",
1153
+ "kind.okr.one": "OKR",
1154
+ "kind.okr.other": "OKR",
1155
+ "kind.verb.one": "Action",
1156
+ "kind.verb.other": "Actions",
1157
+ "kind.rule.one": "R\xE8gle",
1158
+ "kind.rule.other": "R\xE8gles",
1159
+ "kind.app.one": "App",
1160
+ "kind.app.other": "Apps",
1161
+ "kind.connection.one": "Compte",
1162
+ "kind.connection.other": "Comptes",
1163
+ "kind.profile.one": "Type",
1164
+ "kind.profile.other": "Types",
1165
+ "kind.renderer.one": "Affichage",
1166
+ "kind.renderer.other": "Affichages",
1167
+ "kind.room.one": "Salon",
1168
+ "kind.room.other": "Salons",
1169
+ "kind.review.one": "Revue",
1170
+ "kind.review.other": "Revues",
1171
+ "kind.test_run.one": "S\xE9rie de tests",
1172
+ "kind.test_run.other": "S\xE9ries de tests",
1173
+ "kind.orchestrator.one": "Orchestrateur",
1174
+ "kind.orchestrator.other": "Orchestrateurs",
1175
+ // ── Verbs: `action.<token>.imperative` (infinitive) / `.past` (masculine
1176
+ // participle, D4) / `.progressive` / `.present` ──
1177
+ "action.create.imperative": "Cr\xE9er",
1178
+ "action.create.past": "Cr\xE9\xE9",
1179
+ "action.create.present": "Cr\xE9e",
1180
+ "action.update.imperative": "Mettre \xE0 jour",
1181
+ "action.update.past": "Mis \xE0 jour",
1182
+ "action.update.present": "Met \xE0 jour",
1183
+ "action.delete.imperative": "Supprimer",
1184
+ "action.delete.past": "Supprim\xE9",
1185
+ "action.archive.imperative": "Archiver",
1186
+ "action.archive.past": "Archiv\xE9",
1187
+ "action.restore.imperative": "Restaurer",
1188
+ "action.restore.past": "Restaur\xE9",
1189
+ "action.run.imperative": "Ex\xE9cuter",
1190
+ "action.run.past": "Ex\xE9cut\xE9",
1191
+ "action.propose.imperative": "Proposer",
1192
+ "action.propose.past": "Propos\xE9",
1193
+ "action.transition.imperative": "D\xE9placer",
1194
+ "action.transition.past": "D\xE9plac\xE9",
1195
+ "action.rerun.imperative": "Relancer",
1196
+ "action.rerun.past": "Relanc\xE9",
1197
+ "action.complete.imperative": "Terminer",
1198
+ "action.complete.past": "Termin\xE9",
1199
+ "action.received.imperative": "Recevoir",
1200
+ "action.received.past": "Re\xE7u",
1201
+ "action.merge.imperative": "Fusionner",
1202
+ "action.merge.past": "Fusionn\xE9",
1203
+ "action.merge.progressive": "Fusion en cours",
1204
+ "action.link.imperative": "Lier",
1205
+ "action.link.past": "Li\xE9",
1206
+ "action.link.present": "Lie",
1207
+ "action.unlink.imperative": "D\xE9lier",
1208
+ "action.unlink.past": "D\xE9li\xE9",
1209
+ "action.attach.imperative": "Joindre",
1210
+ "action.attach.past": "Joint",
1211
+ "action.add.imperative": "Ajouter",
1212
+ "action.add.past": "Ajout\xE9",
1213
+ "action.bind_need.imperative": "Pourvoir le besoin",
1214
+ "action.bind_need.past": "Besoin pourvu",
1215
+ "action.detach.imperative": "D\xE9tacher",
1216
+ "action.detach.past": "D\xE9tach\xE9",
1217
+ "action.remove.imperative": "Enlever",
1218
+ "action.remove.past": "Enlev\xE9",
1219
+ "action.build.imperative": "Construire",
1220
+ "action.build.past": "Construit",
1221
+ "action.install.imperative": "Installer",
1222
+ "action.install.past": "Install\xE9",
1223
+ "action.enable.imperative": "Activer",
1224
+ "action.enable.past": "Activ\xE9",
1225
+ "action.disable.imperative": "D\xE9sactiver",
1226
+ "action.disable.past": "D\xE9sactiv\xE9",
1227
+ "action.connect.imperative": "Connecter",
1228
+ "action.connect.past": "Connect\xE9",
1229
+ "action.reconnect.imperative": "Reconnecter",
1230
+ "action.reconnect.past": "Reconnect\xE9",
1231
+ "action.reconnect.progressive": "Reconnexion en cours",
1232
+ "action.pause.imperative": "Mettre en pause",
1233
+ "action.pause.past": "Mis en pause",
1234
+ "action.resume.imperative": "Reprendre",
1235
+ "action.resume.past": "Repris",
1236
+ "action.resume_or_close.imperative": "Reprendre ou fermer",
1237
+ "action.resume_or_close.past": "Repris ou ferm\xE9",
1238
+ "action.join.imperative": "Rejoindre",
1239
+ "action.join.past": "Rejoint",
1240
+ "action.import.imperative": "Importer",
1241
+ "action.import.past": "Import\xE9",
1242
+ "action.capture.imperative": "Capturer",
1243
+ "action.capture.past": "Captur\xE9",
1244
+ "action.capture.graph.imperative": "Capturer",
1245
+ "action.capture.graph.past": "Captur\xE9",
1246
+ "action.import.graph.imperative": "Importer",
1247
+ "action.import.graph.past": "Import\xE9",
1248
+ "action.send.imperative": "Envoyer",
1249
+ "action.send.past": "Envoy\xE9",
1250
+ "action.send.progressive": "Envoi en cours",
1251
+ // The draft decisions' French words are defined once (`./draft-words.ts`).
1252
+ "action.approve.imperative": DRAFT_DECISION_WORDS.fr.approve.imperative,
1253
+ "action.approve.past": DRAFT_DECISION_WORDS.fr.approve.past,
1254
+ "action.approve.progressive": DRAFT_DECISION_WORDS.fr.approve.progressive,
1255
+ "action.publish.imperative": "Publier",
1256
+ "action.publish.past": "Publi\xE9",
1257
+ "action.reject.imperative": "Rejeter",
1258
+ "action.reject.past": "Rejet\xE9",
1259
+ "action.reject.progressive": "Rejet en cours",
1260
+ "action.withdraw.imperative": "Retirer",
1261
+ "action.withdraw.past": "Retir\xE9",
1262
+ "action.set.imperative": "D\xE9finir",
1263
+ "action.set.past": "D\xE9fini",
1264
+ "action.request.imperative": "Demander",
1265
+ "action.request.past": "Demand\xE9",
1266
+ "action.revise.imperative": "R\xE9viser",
1267
+ "action.revise.past": "R\xE9vis\xE9",
1268
+ "action.promote.imperative": "Promouvoir",
1269
+ "action.promote.past": "Promu",
1270
+ "action.spawn.imperative": "G\xE9n\xE9rer",
1271
+ "action.spawn.past": "G\xE9n\xE9r\xE9",
1272
+ "action.accept.imperative": "Accepter",
1273
+ "action.accept.past": "Accept\xE9",
1274
+ "action.discard.imperative": DRAFT_DECISION_WORDS.fr.discard.imperative,
1275
+ "action.discard.past": DRAFT_DECISION_WORDS.fr.discard.past,
1276
+ "action.discard.progressive": DRAFT_DECISION_WORDS.fr.discard.progressive,
1277
+ "action.revert.imperative": "Revenir en arri\xE8re",
1278
+ "action.revert.past": "Revenu en arri\xE8re",
1279
+ "action.undo.imperative": "Annuler",
1280
+ "action.undo.past": "Annul\xE9",
1281
+ "action.retry.imperative": "R\xE9essayer",
1282
+ "action.retry.past": "R\xE9essay\xE9",
1283
+ "action.check_again.imperative": "V\xE9rifier \xE0 nouveau",
1284
+ "action.check_again.past": "V\xE9rifi\xE9 \xE0 nouveau",
1285
+ "action.top_up.imperative": "Recharger",
1286
+ "action.top_up.past": "Recharg\xE9",
1287
+ "action.upgrade.imperative": "Mettre \xE0 niveau",
1288
+ "action.upgrade.past": "Mis \xE0 niveau",
1289
+ "action.ask_admin.imperative": "Demander \xE0 l\u2019admin",
1290
+ "action.ask_admin.past": "Demand\xE9 \xE0 l\u2019admin",
1291
+ "action.fix_payment.imperative": "Corriger le paiement",
1292
+ "action.fix_payment.past": "Paiement corrig\xE9",
1293
+ "action.reopen.imperative": "Rouvrir",
1294
+ "action.reopen.past": "Rouvert",
1295
+ "action.track.reopen.imperative": "Ouvrir une nouvelle version",
1296
+ "action.track.reopen.past": "Nouvelle version ouverte",
1297
+ "action.track.keep_running.imperative": "Le garder actif",
1298
+ "action.track.keep_running.past": "Gard\xE9 actif",
1299
+ "action.terminal.open.imperative": "Ouvrir le terminal",
1300
+ "action.terminal.open.past": "Terminal ouvert",
1301
+ "action.session.stop.imperative": "Arr\xEAter",
1302
+ "action.session.stop.past": "Arr\xEAt\xE9",
1303
+ "action.session.continue.imperative": "Continuer",
1304
+ "action.session.continue.past": "Continu\xE9",
1305
+ "action.session.wait_on.imperative": "Attendre",
1306
+ "action.session.wait_on.past": "Mis en attente de",
1307
+ "action.session.release.imperative": "Ne plus attendre",
1308
+ "action.session.release.past": "N\u2019attend plus",
1309
+ "action.orchestrate.imperative": "Orchestrer",
1310
+ "action.orchestrate.past": "Orchestr\xE9",
1311
+ "action.track.take_offer.imperative": "Accepter leur offre",
1312
+ "action.track.take_offer.past": "Offre accept\xE9e",
1313
+ "action.track.keep_ask.imperative": "Garder ma demande",
1314
+ "action.track.keep_ask.past": "Demande gard\xE9e",
1315
+ "action.track.make_goals.imperative": "En faire des objectifs",
1316
+ "action.track.make_goals.past": "Transform\xE9s en objectifs",
1317
+ "action.retire.imperative": "Retirer du service",
1318
+ "action.retire.past": "Retir\xE9 du service",
1319
+ "action.close.imperative": "Fermer",
1320
+ "action.close.past": "Ferm\xE9",
1321
+ "action.drop.imperative": "Abandonner",
1322
+ "action.drop.past": "Abandonn\xE9",
1323
+ "action.expire.imperative": "Expirer",
1324
+ "action.expire.past": "Expir\xE9",
1325
+ "action.expire.progressive": "Expiration en cours",
1326
+ "action.share.imperative": "Partager",
1327
+ "action.share.past": "Partag\xE9",
1328
+ "action.unshare.imperative": "Ne plus partager",
1329
+ "action.unshare.past": "Plus partag\xE9",
1330
+ "action.unpublish.imperative": "D\xE9publier",
1331
+ "action.unpublish.past": "D\xE9publi\xE9",
1332
+ "action.revoke.imperative": "R\xE9voquer",
1333
+ "action.revoke.past": "R\xE9voqu\xE9",
1334
+ "action.revoke.progressive": "R\xE9vocation en cours",
1335
+ "action.redeem.imperative": "Utiliser",
1336
+ "action.redeem.past": "Utilis\xE9",
1337
+ "action.move.imperative": "D\xE9placer",
1338
+ "action.move.past": "D\xE9plac\xE9",
1339
+ "action.rename.imperative": "Renommer",
1340
+ "action.rename.past": "Renomm\xE9",
1341
+ "action.grant_access.imperative": "Partager",
1342
+ "action.grant_access.past": "Partag\xE9",
1343
+ "action.change_scope.imperative": "Changer la port\xE9e",
1344
+ "action.change_scope.past": "Port\xE9e chang\xE9e",
1345
+ "action.widen_scopes.imperative": "\xC9largir l\u2019acc\xE8s",
1346
+ "action.widen_scopes.past": "Acc\xE8s \xE9largi",
1347
+ "action.file_entities.imperative": "Classer",
1348
+ "action.file_entities.past": "Class\xE9",
1349
+ "action.held_writes.imperative": "\xC9critures en attente de revue",
1350
+ "action.held_writes.past": "\xC9critures en attente de revue",
1351
+ "action.file.imperative": "Classer",
1352
+ "action.file.past": "Class\xE9",
1353
+ "action.file.progressive": "Classement en cours",
1354
+ "action.file.present": "Classe",
1355
+ "action.unfile_entities.imperative": "D\xE9classer",
1356
+ "action.unfile_entities.past": "D\xE9class\xE9",
1357
+ "action.organize.imperative": "Organiser",
1358
+ "action.organize.past": "Organis\xE9",
1359
+ "action.plan_approval.imperative": "Approuver le plan",
1360
+ "action.plan_approval.past": "Plan approuv\xE9",
1361
+ "action.deploy_approval.imperative": "Approuver le d\xE9ploiement",
1362
+ "action.deploy_approval.past": "D\xE9ploiement approuv\xE9",
1363
+ "action.stage_gate.imperative": "Approuver l\u2019\xE9tape",
1364
+ "action.stage_gate.past": "\xC9tape approuv\xE9e",
1365
+ "action.section_update.imperative": "Modifier la section",
1366
+ "action.section_update.past": "Section modifi\xE9e",
1367
+ "action.session_narrative_update.imperative": "Mettre \xE0 jour le r\xE9cit",
1368
+ "action.session_narrative_update.past": "R\xE9cit mis \xE0 jour",
1369
+ "action.refresher_section_update.imperative": "Actualiser la section",
1370
+ "action.refresher_section_update.past": "Section actualis\xE9e",
1371
+ "action.ai_edit.imperative": "Modifier",
1372
+ "action.ai_edit.past": "Modifi\xE9",
1373
+ "action.user_edit.imperative": "Sugg\xE9rer une modification",
1374
+ "action.user_edit.past": "Modification sugg\xE9r\xE9e",
1375
+ "action.provision.imperative": "Provisionner",
1376
+ "action.provision.past": "Provisionn\xE9",
1377
+ "action.download.imperative": "T\xE9l\xE9charger",
1378
+ "action.download.past": "T\xE9l\xE9charg\xE9",
1379
+ "action.sign_in.imperative": "Se connecter",
1380
+ "action.sign_in.past": "Connect\xE9",
1381
+ "action.start.imperative": "D\xE9marrer",
1382
+ "action.start.past": "D\xE9marr\xE9",
1383
+ "action.check.imperative": "V\xE9rifier",
1384
+ "action.check.past": "V\xE9rifi\xE9",
1385
+ "action.compare.imperative": "Comparer",
1386
+ "action.compare.past": "Compar\xE9",
1387
+ "action.see.imperative": "Voir",
1388
+ "action.see.past": "Vu",
1389
+ "action.open.imperative": "Ouvrir",
1390
+ "action.open.past": "Ouvert",
1391
+ "action.pin.imperative": "\xC9pingler",
1392
+ "action.pin.past": "\xC9pingl\xE9",
1393
+ "action.unpin.imperative": "D\xE9s\xE9pingler",
1394
+ "action.unpin.past": "D\xE9s\xE9pingl\xE9",
1395
+ "action.answer.imperative": "R\xE9pondre",
1396
+ "action.answer.past": "R\xE9pondu",
1397
+ "action.decide.imperative": "D\xE9cider",
1398
+ "action.decide.past": "D\xE9cid\xE9",
1399
+ "action.review.imperative": "Examiner",
1400
+ "action.review.past": "Examin\xE9",
1401
+ "action.dismiss.imperative": "Ignorer",
1402
+ "action.dismiss.past": "Ignor\xE9",
1403
+ "action.send_back.imperative": "Renvoyer",
1404
+ "action.send_back.past": "Renvoy\xE9",
1405
+ "action.counter.imperative": "Contre-proposer",
1406
+ "action.counter.past": "Contre-propos\xE9",
1407
+ "action.report_impossible.imperative": "Signaler impossible",
1408
+ "action.report_impossible.past": "Signal\xE9 impossible",
1409
+ "action.acknowledge.imperative": "Prendre acte",
1410
+ "action.acknowledge.past": "Pris acte",
1411
+ "action.message.imperative": "Envoyer un message",
1412
+ "action.message.past": "Message envoy\xE9",
1413
+ "action.move_on.imperative": "Passer \xE0 la suite",
1414
+ "action.move_on.past": "Pass\xE9 \xE0 la suite",
1415
+ "action.rotate.imperative": "Remplacer",
1416
+ "action.rotate.past": "Remplac\xE9",
1417
+ "action.rotate.progressive": "Remplacement en cours",
1418
+ "action.sync.imperative": "Synchroniser",
1419
+ "action.sync.past": "Synchronis\xE9",
1420
+ "action.sync.progressive": "Synchronisation en cours",
1421
+ "action.issue.imperative": "\xC9mettre",
1422
+ "action.issue.past": "\xC9mis",
1423
+ "action.issue.progressive": "\xC9mission en cours",
1424
+ "action.issue_key.imperative": "\xC9mettre une cl\xE9",
1425
+ "action.issue_key.past": "Cl\xE9 \xE9mise",
1426
+ "action.issue_key.progressive": "\xC9mission de la cl\xE9 en cours",
1427
+ "action.decline.imperative": "Refuser",
1428
+ "action.decline.past": "Refus\xE9",
1429
+ "action.decline.progressive": "Refus en cours",
1430
+ "action.refuse.imperative": "Refuser",
1431
+ "action.refuse.past": "Refus\xE9",
1432
+ "action.refuse.progressive": "Refus en cours",
1433
+ "action.disconnect.imperative": "D\xE9connecter",
1434
+ "action.disconnect.past": "D\xE9connect\xE9",
1435
+ "action.disconnect.progressive": "D\xE9connexion en cours",
1436
+ "action.remove_for_good.imperative": "Supprimer d\xE9finitivement",
1437
+ "action.remove_for_good.past": "Supprim\xE9 d\xE9finitivement",
1438
+ "action.remove_for_good.progressive": "Suppression en cours",
1439
+ "action.request_access.imperative": "Demander l\u2019acc\xE8s",
1440
+ "action.request_access.past": "Acc\xE8s demand\xE9",
1441
+ "action.request_access.progressive": "Demande d\u2019acc\xE8s en cours",
1442
+ "action.ask.imperative": "Demander",
1443
+ "action.ask.past": "Demand\xE9",
1444
+ "action.ask.progressive": "Demande en cours",
1445
+ "action.attest.imperative": "Marquer comme fait",
1446
+ "action.attest.past": "Marqu\xE9 comme fait",
1447
+ "action.hand_back.imperative": "Rendre",
1448
+ "action.hand_back.past": "Rendu",
1449
+ "action.post.imperative": "Poster",
1450
+ "action.post.past": "Post\xE9",
1451
+ "action.post.progressive": "Publication en cours",
1452
+ "action.see_failure.imperative": "Voir l\u2019\xE9chec",
1453
+ "action.see_failure.past": "\xC9chec vu",
1454
+ "action.turn_on.imperative": "Activer",
1455
+ "action.turn_on.past": "Activ\xE9",
1456
+ "action.turn_on.progressive": "Activation en cours",
1457
+ "action.add_again.imperative": "Ajouter \xE0 nouveau",
1458
+ "action.add_again.past": "Ajout\xE9 \xE0 nouveau",
1459
+ "action.cancel.imperative": "Annuler",
1460
+ "action.cancel.past": "Annul\xE9",
1461
+ "action.cancel.progressive": "Annulation en cours",
1462
+ "action.set_notifications.imperative": "R\xE9gler les notifications",
1463
+ "action.set_notifications.past": "Notifications r\xE9gl\xE9es",
1464
+ "action.call.imperative": "Appeler",
1465
+ "action.call.past": "Appel\xE9",
1466
+ "action.call.progressive": "Appel en cours",
1467
+ "action.set_brief.imperative": "D\xE9finir le brief",
1468
+ "action.set_brief.past": "Brief d\xE9fini",
1469
+ "action.grant.imperative": "Accorder",
1470
+ "action.grant.past": "Accord\xE9",
1471
+ "action.grant.progressive": "Octroi en cours",
1472
+ "action.read_again.imperative": "Relire",
1473
+ "action.read_again.past": "Lu",
1474
+ // ── Statuses: `status.<token>` (a participle alone is masculine, D4) ──
1475
+ "status.pending": "En attente",
1476
+ "status.approved": "Approuv\xE9",
1477
+ "status.auto_approved": "Approuv\xE9 automatiquement",
1478
+ "status.rejected": "Rejet\xE9",
1479
+ "status.denied": "Rejet\xE9",
1480
+ "status.approval_failed": "\xC9chec de l\u2019application",
1481
+ "status.reverted": "Retour arri\xE8re",
1482
+ "status.applied": "Appliqu\xE9",
1483
+ "status.unknown": "Inconnu",
1484
+ "status.partially_approved": "Approuv\xE9 en partie",
1485
+ "status.withdrawn": "Retir\xE9",
1486
+ "status.expired": "Expir\xE9",
1487
+ "status.queued": "En file d\u2019attente",
1488
+ "status.running": "En cours",
1489
+ "status.succeeded": "R\xE9ussi",
1490
+ "status.completed": "Termin\xE9",
1491
+ "status.failed": "\xC9chec",
1492
+ "status.cancelled": "Annul\xE9",
1493
+ "status.skipped": "Ignor\xE9",
1494
+ "status.created": "Cr\xE9\xE9",
1495
+ "status.waiting_on_you": "Attend votre action",
1496
+ "status.fetching": "R\xE9cup\xE9ration",
1497
+ "status.mapping": "Rapprochement",
1498
+ "status.review_ready": "Pr\xEAt \xE0 examiner",
1499
+ "status.synced": "Synchronis\xE9",
1500
+ "status.connected": "Connect\xE9",
1501
+ "status.not_connected": "Non connect\xE9",
1502
+ "status.disconnected": "Non connect\xE9",
1503
+ "status.unavailable": "Indisponible",
1504
+ "status.installable": "Pr\xEAt \xE0 installer",
1505
+ "status.ok": "Op\xE9rationnel",
1506
+ "status.stale": "Obsol\xE8te",
1507
+ "status.suspect": "Perte de donn\xE9es",
1508
+ "status.enabled": "Activ\xE9",
1509
+ "status.disabled": "D\xE9sactiv\xE9",
1510
+ "status.active": "Actif",
1511
+ "status.paused": "En pause",
1512
+ "status.draft": "Brouillon",
1513
+ "status.archived": "Archiv\xE9",
1514
+ "status.trialing": "Essai",
1515
+ "status.past_due": "Paiement \xE9chou\xE9",
1516
+ "status.ready": "Pr\xEAt",
1517
+ "status.waiting": "En attente",
1518
+ "status.blocked": "Bloqu\xE9",
1519
+ "status.with_them": "Chez eux",
1520
+ "status.on_machine": "Sur une machine",
1521
+ "status.done": "Fait",
1522
+ "status.drafted": "R\xE9dig\xE9",
1523
+ "status.scheduled": "Planifi\xE9",
1524
+ "status.pass": "R\xE9ussi",
1525
+ "status.fail": "\xC9chec",
1526
+ "status.unmeasured": "Non v\xE9rifi\xE9",
1527
+ "status.passing": "Atteint",
1528
+ "status.failing": "Pas encore atteint",
1529
+ "status.incomplete": "V\xE9rifi\xE9 en partie",
1530
+ "status.work": "Travail",
1531
+ "status.run": "Ex\xE9cution",
1532
+ "status.receipt": "Re\xE7u",
1533
+ "status.structured": "Structur\xE9",
1534
+ "status.saved_without_ai": "Enregistr\xE9 sans IA",
1535
+ "status.needs_answer": "Attend votre r\xE9ponse",
1536
+ "status.suggested": "Sugg\xE9r\xE9",
1537
+ "status.not_structured": "Non structur\xE9",
1538
+ "status.needs_reauth": "Reconnexion requise",
1539
+ "status.published": "Publi\xE9",
1540
+ "status.revoked": "R\xE9voqu\xE9",
1541
+ "status.private": "Priv\xE9",
1542
+ "status.shared": "Partag\xE9",
1543
+ "status.link": "Partag\xE9 par lien",
1544
+ "status.public": "Public",
1545
+ "status.credits_low": "Cr\xE9dits faibles",
1546
+ "status.credits_empty": "Plus de cr\xE9dits",
1547
+ "status.not_entitled": "Pas de forfait IA",
1548
+ "status.suspended": "Suspendu",
1549
+ "status.budget_paused": "En pause",
1550
+ "status.provider_issue": "Probl\xE8me d\u2019IA",
1551
+ "status.service_down": "IA hors ligne",
1552
+ "status.needs_provision": "Pr\xEAt \xE0 activer",
1553
+ "status.__unclassified": "Aucun statut d\xE9clar\xE9",
1554
+ "status.wont_fix": "Ne sera pas corrig\xE9",
1555
+ "status.muted": "En sourdine",
1556
+ "status.no_effect": "Aucun changement",
1557
+ "status.blocked_by_policy": "Bloqu\xE9 par une r\xE8gle",
1558
+ "status.no_active_goal": "Aucun objectif actif",
1559
+ "status.stalled": "\xC0 l\u2019arr\xEAt",
1560
+ "status.unproven": "Pas encore valid\xE9",
1561
+ "status.needs_attention": "Demande votre attention",
1562
+ "status.moving": "En mouvement",
1563
+ "status.unvalidated_bet": "Non valid\xE9",
1564
+ "status.validated": "Valid\xE9",
1565
+ // ── Runner states: `runner.<state>` (what a session's agent says it does) ──
1566
+ "runner.busy": "Au travail",
1567
+ "runner.idle": "Inactif",
1568
+ "runner.needs_permission": "Attend votre autorisation",
1569
+ "runner.needs_answer": "Attend votre r\xE9ponse",
1570
+ "runner.ended": "Termin\xE9",
1571
+ // ── Wait kinds: `waitKind.<kind>` (what a "Waiting on" chip names) ──
1572
+ "waitKind.answer": "Votre r\xE9ponse",
1573
+ "waitKind.approval": "Votre approbation",
1574
+ "waitKind.send": "\xC0 envoyer",
1575
+ "waitKind.try_it": "\xC0 essayer",
1576
+ "waitKind.access": "Acc\xE8s",
1577
+ "waitKind.decide": "Votre d\xE9cision",
1578
+ "waitKind.their_reply": "Leur r\xE9ponse",
1579
+ "waitKind.their_document": "Leur document",
1580
+ "waitKind.signature": "Signature",
1581
+ "waitKind.payment": "Paiement",
1582
+ "waitKind.vendor": "Un tiers",
1583
+ "waitKind.agent_work": "Agent au travail",
1584
+ "waitKind.agent_stopped": "Agent arr\xEAt\xE9",
1585
+ "waitKind.ci": "CI",
1586
+ "waitKind.devbox_job": "Tests en cours",
1587
+ "waitKind.merge_queue": "File de fusion",
1588
+ "waitKind.red_main": "Main en \xE9chec",
1589
+ "waitKind.deploy": "D\xE9ploiement",
1590
+ "waitKind.another_work": "Autre travail",
1591
+ "waitKind.date": "Une date",
1592
+ "waitKind.nobody": "Personne",
1593
+ // ── Step runners: `stepRunner.<kind>` (who moves a step on) ──
1594
+ "stepRunner.person": "Vous",
1595
+ "stepRunner.ai": "Un agent",
1596
+ "stepRunner.automatic": "S\u2019ex\xE9cute tout seul",
1597
+ // ── Needs (0426): `need.<slug>` (a need's name) ──
1598
+ "need.code-host": "H\xE9bergement du code",
1599
+ "need.deploy-target": "Cible de d\xE9ploiement",
1600
+ "need.gate": "Contr\xF4le",
1601
+ "need.payments": "Paiements",
1602
+ "need.messaging": "Messagerie",
1603
+ "need.email": "E-mail",
1604
+ "need.calendar": "Agenda",
1605
+ "need.file-store": "Stockage de fichiers",
1606
+ "need.media-generation": "G\xE9n\xE9ration de m\xE9dias",
1607
+ "need.social-publishing": "Publication sur les r\xE9seaux",
1608
+ "need.linkedin-reach": "Prospection LinkedIn",
1609
+ "need.analytics": "Statistiques",
1610
+ "need.compute": "Calcul",
1611
+ // ── Intents: `intent.<slug>` (an intent's short name, never the consent sentence) ──
1612
+ "intent.search_external": "Chercher dans des sources externes",
1613
+ "intent.find_people": "Trouver des personnes",
1614
+ "intent.enrich_entity": "Enrichir des fiches",
1615
+ "intent.fetch_record": "R\xE9cup\xE9rer une fiche",
1616
+ "intent.list_records": "Lister des fiches",
1617
+ "intent.send_message": "Envoyer un message",
1618
+ "intent.request_connection": "Demander une mise en relation",
1619
+ "intent.schedule_event": "Planifier un \xE9v\xE9nement",
1620
+ "intent.manage_file": "G\xE9rer des fichiers",
1621
+ "intent.generate_media": "G\xE9n\xE9rer des m\xE9dias",
1622
+ "intent.capture_into_pod": "Importer des donn\xE9es dans le pod",
1623
+ "intent.run_external_job": "Lancer une t\xE2che externe",
1624
+ "intent.connect_account": "Connecter un compte",
1625
+ "intent.publish_post": "Publier un post",
1626
+ "intent.delegate_agent_task": "Confier une t\xE2che \xE0 un agent",
1627
+ "intent.read_webpage": "Lire une page web",
1628
+ "intent.search_web": "Chercher sur le web",
1629
+ "intent.edit_video": "Monter une vid\xE9o",
1630
+ "intent.transcribe_media": "Transcrire un m\xE9dia",
1631
+ "intent.download_media": "T\xE9l\xE9charger un m\xE9dia",
1632
+ "intent.provision_compute": "D\xE9marrer une machine cloud",
1633
+ "intent.release_compute": "Arr\xEAter une machine cloud",
1634
+ // ── Needs-you counts: `needsYou.count.<kind>` (French counts 0 and 1 as
1635
+ // singular; `many` is a whole number of millions: "1000000 de décisions") ──
1636
+ "needsYou.count.decision": "{n, plural, one {# d\xE9cision} many {# de d\xE9cisions} other {# d\xE9cisions}}",
1637
+ "needsYou.count.physical": "{n, plural, one {# action} many {# d\u2019actions} other {# actions}}",
1638
+ "needsYou.count.credential": "{n, plural, one {# identifiant} many {# d\u2019identifiants} other {# identifiants}}",
1639
+ "needsYou.count.permission": "{n, plural, one {# permission} many {# de permissions} other {# permissions}}",
1640
+ "needsYou.count.capability": "{n, plural, one {# outil manquant} many {# d\u2019outils manquants} other {# outils manquants}}",
1641
+ "needsYou.count.policy": "{n, plural, one {# blocage de r\xE8gle} many {# de blocages de r\xE8gle} other {# blocages de r\xE8gle}}",
1642
+ "needsYou.count.ask": "{n, plural, one {# question} many {# de questions} other {# questions}}",
1643
+ "needsYou.count.review": "{n, plural, one {# revue} many {# de revues} other {# revues}}",
1644
+ "needsYou.count.owed": "{n, plural, one {# chose} many {# de choses} other {# choses}}",
1645
+ "needsYou.count.routine": "{n, plural, one {# changement courant} many {# de changements courants} other {# changements courants}}",
1646
+ // ── The door's sentences ──
1647
+ "vocabulary.title.fallbackVerb": "Demande",
1648
+ "vocabulary.title.noVerb": "Demande\xA0: {obj}",
1649
+ "vocabulary.title.noVerb.named": "Demande\xA0: {obj} \xAB\xA0{name}\xA0\xBB",
1650
+ "vocabulary.title.lead": "{verb}\xA0: {name}",
1651
+ "vocabulary.title.onComputer": "{verb} \xAB\xA0{name}\xA0\xBB sur {computer}",
1652
+ "vocabulary.title.fromComputer": "{verb} \xAB\xA0{name}\xA0\xBB de {computer}",
1653
+ "vocabulary.title.addAndInstallOn": "Ajouter \xAB\xA0{name}\xA0\xBB depuis la marketplace et l\u2019installer sur {computer}",
1654
+ "vocabulary.title.verbOnly.named": "{verb} \xAB\xA0{name}\xA0\xBB",
1655
+ "vocabulary.title.imperative": "{verb} {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}}",
1656
+ "vocabulary.title.imperative.named": "{verb} {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}} \xAB\xA0{name}\xA0\xBB",
1657
+ "vocabulary.title.imperative.in": "{verb} dans {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}}",
1658
+ "vocabulary.title.imperative.in.named": "{verb} dans {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}} \xAB\xA0{name}\xA0\xBB",
1659
+ "vocabulary.title.imperative.of": "{verb} {objG, select, f {{objV, select, yes {de l\u2019{obj}} other {de la {obj}}}} m {{objV, select, yes {de l\u2019{obj}} other {du {obj}}}} other {de l\u2019\xE9l\xE9ment {Obj}}}",
1660
+ "vocabulary.title.imperative.of.named": "{verb} {objG, select, f {{objV, select, yes {de l\u2019{obj}} other {de la {obj}}}} m {{objV, select, yes {de l\u2019{obj}} other {du {obj}}}} other {de l\u2019\xE9l\xE9ment {Obj}}} \xAB\xA0{name}\xA0\xBB",
1661
+ "vocabulary.title.imperative.for": "{verb} pour {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}}",
1662
+ "vocabulary.title.imperative.for.named": "{verb} pour {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}} \xAB\xA0{name}\xA0\xBB",
1663
+ "vocabulary.title.past": "{verb}\xA0: {obj}",
1664
+ "vocabulary.title.past.named": "{verb}\xA0: {obj} \xAB\xA0{name}\xA0\xBB",
1665
+ "vocabulary.title.past.in": "{verb} dans {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}}",
1666
+ "vocabulary.title.past.in.named": "{verb} dans {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}} \xAB\xA0{name}\xA0\xBB",
1667
+ "vocabulary.title.past.of": "{verb} {objG, select, f {{objV, select, yes {de l\u2019{obj}} other {de la {obj}}}} m {{objV, select, yes {de l\u2019{obj}} other {du {obj}}}} other {de l\u2019\xE9l\xE9ment {Obj}}}",
1668
+ "vocabulary.title.past.of.named": "{verb} {objG, select, f {{objV, select, yes {de l\u2019{obj}} other {de la {obj}}}} m {{objV, select, yes {de l\u2019{obj}} other {du {obj}}}} other {de l\u2019\xE9l\xE9ment {Obj}}} \xAB\xA0{name}\xA0\xBB",
1669
+ "vocabulary.title.past.for": "{verb} pour {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}}",
1670
+ "vocabulary.title.past.for.named": "{verb} pour {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}} \xAB\xA0{name}\xA0\xBB",
1671
+ "vocabulary.button.imperative": "{verb} {objG, select, f {une {obj}} m {un {obj}} other {un \xE9l\xE9ment {Obj}}}",
1672
+ "vocabulary.button.imperative.in": "{verb} dans {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}}",
1673
+ "vocabulary.button.imperative.of": "{verb} {objG, select, f {{objV, select, yes {de l\u2019{obj}} other {de la {obj}}}} m {{objV, select, yes {de l\u2019{obj}} other {du {obj}}}} other {de l\u2019\xE9l\xE9ment {Obj}}}",
1674
+ "vocabulary.button.imperative.for": "{verb} pour {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}}",
1675
+ "vocabulary.button.past": "{verb}\xA0: {obj}",
1676
+ "vocabulary.button.past.in": "{verb} dans {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}}",
1677
+ "vocabulary.button.past.of": "{verb} {objG, select, f {{objV, select, yes {de l\u2019{obj}} other {de la {obj}}}} m {{objV, select, yes {de l\u2019{obj}} other {du {obj}}}} other {de l\u2019\xE9l\xE9ment {Obj}}}",
1678
+ "vocabulary.button.past.for": "{verb} pour {objG, select, f {{objV, select, yes {l\u2019{obj}} other {la {obj}}}} m {{objV, select, yes {l\u2019{obj}} other {le {obj}}}} other {l\u2019\xE9l\xE9ment {Obj}}}",
1679
+ "vocabulary.track.moveTo": "D\xE9placer vers {status}",
1680
+ "vocabulary.private": "{objG, select, f {{Obj} priv\xE9e} m {{Obj} priv\xE9} other {\xC9l\xE9ment priv\xE9\xA0: {obj}}}",
1681
+ "vocabulary.private.unnamed": "\xC9l\xE9ment priv\xE9",
1682
+ "vocabulary.membersDecide": "Les membres {objG, select, f {{objV, select, yes {de l\u2019{obj}} other {de la {obj}}}} m {{objV, select, yes {de l\u2019{obj}} other {du {obj}}}} other {de l\u2019\xE9l\xE9ment {Obj}}} d\xE9cident",
1683
+ "vocabulary.membersDecide.unnamed": "Ses membres d\xE9cident",
1684
+ "vocabulary.handedTo": "Confi\xE9 \xE0 {name}",
1685
+ "vocabulary.refusal.doNotContact": "Rien n\u2019a \xE9t\xE9 envoy\xE9\xA0: {name} ne doit pas \xEAtre contact\xE9.",
1686
+ "vocabulary.refusal.doNotContact.reason": "Rien n\u2019a \xE9t\xE9 envoy\xE9\xA0: {name} ne doit pas \xEAtre contact\xE9 ({reason}).",
1687
+ "vocabulary.refusal.doNotContact.unnamed": "cette personne",
1688
+ "vocabulary.runner.needs_permission.named": "Attend l\u2019autorisation de {name}",
1689
+ "vocabulary.runner.needs_permission.unnamed": "Attend une autorisation",
1690
+ "vocabulary.runner.needs_answer.named": "Attend la r\xE9ponse de {name}",
1691
+ "vocabulary.runner.needs_answer.unnamed": "Attend une r\xE9ponse",
1692
+ "vocabulary.offer.everySpace": "{offer} dans tous les espaces",
1693
+ "vocabulary.templateNoun.goal.one": "Processus d\u2019objectif",
1694
+ "vocabulary.templateNoun.goal.other": "Processus d\u2019objectif",
1695
+ "vocabulary.templateNoun.work.one": "Processus",
1696
+ "vocabulary.templateNoun.work.other": "Processus",
1697
+ "vocabulary.templateNoun.space.one": "Mod\xE8le d\u2019espace",
1698
+ "vocabulary.templateNoun.space.other": "Mod\xE8les d\u2019espace",
1699
+ "vocabulary.packageNoun.template.one": "Mod\xE8le",
1700
+ "vocabulary.packageNoun.template.other": "Mod\xE8les",
1701
+ "vocabulary.packageNoun.pack.one": "Pack",
1702
+ "vocabulary.packageNoun.pack.other": "Packs",
1703
+ "vocabulary.grant.packageInstall": "Ajouter des packs et des mod\xE8les \xE0 votre pod",
1704
+ "vocabulary.needsYou.count.uncurated": "{n, plural, one {# {noun}} many {# de {nouns}} other {# {nouns}}}",
1705
+ // ── Process health: `vocabulary.processHealth.<code>.label|reason` ──
1706
+ "vocabulary.processHealth.config_invalid.label": "Erreur de configuration",
1707
+ "vocabulary.processHealth.config_invalid.reason": "La d\xE9finition enregistr\xE9e est invalide ou ne peut pas \xEAtre activ\xE9e.",
1708
+ "vocabulary.processHealth.running.label": "En cours",
1709
+ "vocabulary.processHealth.running.reason": "Au moins une ex\xE9cution est en cours.",
1710
+ "vocabulary.processHealth.running_after_failure.label": "En cours \xB7 l\u2019ex\xE9cution pr\xE9c\xE9dente a \xE9chou\xE9",
1711
+ "vocabulary.processHealth.running_after_failure.reason": "Une ex\xE9cution est en cours apr\xE8s l\u2019\xE9chec du dernier r\xE9sultat connu.",
1712
+ "vocabulary.processHealth.waiting_on_you.reason": "La derni\xE8re ex\xE9cution est en pause jusqu\u2019\xE0 ce que vous r\xE9pondiez \xE0 ce que sa session vous a demand\xE9.",
1713
+ "vocabulary.processHealth.blocked_by_policy.label": "Bloqu\xE9 par une r\xE8gle",
1714
+ "vocabulary.processHealth.blocked_by_policy.reason": "La gouvernance a refus\xE9 l\u2019effet de la derni\xE8re ex\xE9cution \u2014 elle attend votre revue.",
1715
+ "vocabulary.processHealth.latest_failed.label": "Derni\xE8re ex\xE9cution en \xE9chec",
1716
+ "vocabulary.processHealth.latest_failed.reason": "Aucun r\xE9sultat r\xE9ussi plus r\xE9cent ne r\xE9sout le dernier \xE9chec.",
1717
+ "vocabulary.processHealth.draft.label": "Brouillon",
1718
+ "vocabulary.processHealth.draft.reason": "La d\xE9finition doit encore \xEAtre compl\xE9t\xE9e ou activ\xE9e.",
1719
+ "vocabulary.processHealth.paused.label": "En pause",
1720
+ "vocabulary.processHealth.paused.reason": "La d\xE9finition est en pause et ne lancera pas de nouvelle ex\xE9cution.",
1721
+ "vocabulary.processHealth.archived.label": "Archiv\xE9",
1722
+ "vocabulary.processHealth.archived.reason": "La d\xE9finition est archiv\xE9e et ne lancera pas de nouvelle ex\xE9cution.",
1723
+ "vocabulary.processHealth.healthy.label": "En bonne sant\xE9",
1724
+ "vocabulary.processHealth.healthy.reason": "Le dernier r\xE9sultat connu s\u2019est termin\xE9 sans \xE9chec.",
1725
+ "vocabulary.processHealth.latest_unresolved.label": "Dernier statut non r\xE9solu",
1726
+ "vocabulary.processHealth.latest_unresolved.reason": "La derni\xE8re ex\xE9cution est \xAB\xA0{status}\xA0\xBB\xA0; Synap ne peut pas encore la classer comme r\xE9ussie ou en \xE9chec.",
1727
+ "vocabulary.processHealth.never_run.label": "Jamais ex\xE9cut\xE9",
1728
+ "vocabulary.processHealth.never_run.reason": "Cette d\xE9finition enregistr\xE9e n\u2019a encore aucune ex\xE9cution.",
1729
+ "vocabulary.processHealth.not_enough_activity.label": "Statut inconnu",
1730
+ "vocabulary.processHealth.not_enough_activity.reason": "Il n\u2019y a pas assez d\u2019activit\xE9 charg\xE9e pour d\xE9terminer l\u2019\xE9tat actuel.",
1731
+ "vocabulary.job.startedHere": "{n, plural, one {# travail lanc\xE9 d\u2019ici} many {# de travaux lanc\xE9s d\u2019ici} other {# travaux lanc\xE9s d\u2019ici}}"
1732
+ };
1733
+
1734
+ // ../../../synap-backend/packages/types/dist/vocabulary/object-kinds.js
1735
+ var IDENTITY_SLOT_COUNT = 12;
1736
+ var ID = (n) => `var(--synap-identity-${n})`;
1737
+ var AI = "var(--synap-ai)";
1738
+ var FALLBACK_COLOR = "var(--synap-muted)";
1739
+ function identitySlotForKind(kind) {
1740
+ let h = 0;
1741
+ for (let i = 0; i < kind.length; i++)
1742
+ h = h * 31 + kind.charCodeAt(i) >>> 0;
1743
+ return h % IDENTITY_SLOT_COUNT + 1;
1744
+ }
1745
+ var identityToken = (n) => `var(--synap-identity-${(Math.abs(Math.trunc(n)) - 1) % IDENTITY_SLOT_COUNT + 1})`;
1746
+ var OBJECT_KIND_ROWS = {
1747
+ // ── Entity profiles (category: entity) ──
1748
+ task: {
1749
+ kind: "task",
1750
+ category: "entity",
1751
+ icon: "CheckSquare",
1752
+ color: ID(1),
1753
+ label: "Task",
1754
+ labelPlural: "Tasks",
1755
+ glyph: "\u2610"
1756
+ },
1757
+ note: {
1758
+ kind: "note",
1759
+ category: "entity",
1760
+ icon: "FileText",
1761
+ color: ID(4),
1762
+ label: "Note",
1763
+ labelPlural: "Notes",
1764
+ glyph: "\u25A4"
1765
+ },
1766
+ person: {
1767
+ kind: "person",
1768
+ category: "entity",
1769
+ icon: "User",
1770
+ color: ID(2),
1771
+ label: "Person",
1772
+ labelPlural: "People"
1773
+ },
1774
+ contact: {
1775
+ kind: "contact",
1776
+ category: "entity",
1777
+ icon: "UserCheck",
1778
+ color: ID(3),
1779
+ label: "Contact",
1780
+ labelPlural: "Contacts"
1781
+ },
1782
+ company: {
1783
+ kind: "company",
1784
+ category: "entity",
1785
+ icon: "Building2",
1786
+ color: ID(6),
1787
+ label: "Company",
1788
+ labelPlural: "Companies"
1789
+ },
1790
+ deal: {
1791
+ kind: "deal",
1792
+ category: "entity",
1793
+ icon: "TrendingUp",
1794
+ color: ID(7),
1795
+ label: "Deal",
1796
+ labelPlural: "Deals"
1797
+ },
1798
+ // `client` is a ROLE/facet, not a primary kind — but legacy views color it, so
1799
+ // it keeps an identity entry (matching the former entity-accent `identity-4`).
1800
+ client: {
1801
+ kind: "client",
1802
+ category: "entity",
1803
+ icon: "Handshake",
1804
+ color: ID(4),
1805
+ label: "Client",
1806
+ labelPlural: "Clients"
1807
+ },
1808
+ event: {
1809
+ kind: "event",
1810
+ category: "entity",
1811
+ icon: "Calendar",
1812
+ color: ID(3),
1813
+ label: "Event",
1814
+ labelPlural: "Events"
1815
+ },
1816
+ meeting: {
1817
+ kind: "meeting",
1818
+ category: "entity",
1819
+ icon: "Calendar",
1820
+ color: ID(3),
1821
+ label: "Meeting",
1822
+ labelPlural: "Meetings"
1823
+ },
1824
+ file: {
1825
+ kind: "file",
1826
+ category: "entity",
1827
+ icon: "Image",
1828
+ color: ID(10),
1829
+ label: "File",
1830
+ labelPlural: "Files"
1831
+ },
1832
+ code: {
1833
+ kind: "code",
1834
+ category: "entity",
1835
+ icon: "Code",
1836
+ color: ID(11),
1837
+ label: "Code",
1838
+ labelPlural: "Code",
1839
+ glyph: "\u27E8\u27E9"
1840
+ },
1841
+ bookmark: {
1842
+ kind: "bookmark",
1843
+ category: "entity",
1844
+ icon: "Bookmark",
1845
+ color: ID(12),
1846
+ label: "Bookmark",
1847
+ labelPlural: "Bookmarks"
1848
+ },
1849
+ website: {
1850
+ kind: "website",
1851
+ category: "entity",
1852
+ icon: "Globe",
1853
+ color: ID(9),
1854
+ label: "Website",
1855
+ labelPlural: "Websites"
1856
+ },
1857
+ article: {
1858
+ kind: "article",
1859
+ category: "entity",
1860
+ icon: "Newspaper",
1861
+ color: ID(8),
1862
+ label: "Article",
1863
+ labelPlural: "Articles"
1864
+ },
1865
+ // `decision` and `report` are profiles agents produce as session outputs. They
1866
+ // had no entry, so every surface showed the neutral `Box` and a terminal
1867
+ // client kept its own kind → glyph map. Colour = the hash slot the fallback
1868
+ // already gave them, so nothing on screen changes hue.
1869
+ decision: {
1870
+ kind: "decision",
1871
+ category: "entity",
1872
+ icon: "Scale",
1873
+ color: identityToken(identitySlotForKind("decision")),
1874
+ label: "Decision",
1875
+ labelPlural: "Decisions",
1876
+ glyph: "\u25C7"
1877
+ },
1878
+ report: {
1879
+ kind: "report",
1880
+ category: "entity",
1881
+ icon: "ClipboardList",
1882
+ color: identityToken(identitySlotForKind("report")),
1883
+ label: "Report",
1884
+ labelPlural: "Reports",
1885
+ glyph: "\u25A4"
1886
+ },
1887
+ capture: {
1888
+ kind: "capture",
1889
+ category: "entity",
1890
+ icon: "Camera",
1891
+ color: ID(1),
1892
+ label: "Capture",
1893
+ labelPlural: "Captures"
1894
+ },
1895
+ idea: {
1896
+ kind: "idea",
1897
+ category: "entity",
1898
+ icon: "Lightbulb",
1899
+ color: ID(4),
1900
+ label: "Idea",
1901
+ labelPlural: "Ideas"
1902
+ },
1903
+ // ── Non-entity object families ──
1904
+ entity: {
1905
+ kind: "entity",
1906
+ category: "entity",
1907
+ icon: "FileText",
1908
+ color: FALLBACK_COLOR,
1909
+ label: "Entity",
1910
+ labelPlural: "Entities"
1911
+ },
1912
+ view: {
1913
+ kind: "view",
1914
+ category: "view",
1915
+ icon: "LayoutGrid",
1916
+ color: ID(2),
1917
+ label: "View",
1918
+ labelPlural: "Views",
1919
+ glyph: "\u25F0"
1920
+ },
1921
+ widget: {
1922
+ kind: "widget",
1923
+ category: "widget",
1924
+ icon: "LayoutGrid",
1925
+ color: ID(5),
1926
+ label: "Widget",
1927
+ labelPlural: "Widgets",
1928
+ glyph: "\u229E"
1929
+ },
1930
+ /* The kind stays `cell` — that is the engine's word and the DB's. The LABEL is
1931
+ "Card" because that is the only word a user may see: NORTH-STAR (team pod) §5 —
1932
+ "User-facing word is Card. 'Cell' is the internal engine term — never shown
1933
+ to users." This row said "Cell", so every surface resolving through the
1934
+ vocabulary printed "Install cell" / "Cell installed" at users. Fixing it
1935
+ here, at the one door, fixes all of them at once — which is exactly why a
1936
+ local label map at a call site is forbidden. */
1937
+ cell: {
1938
+ kind: "cell",
1939
+ category: "cell",
1940
+ icon: "SquareDashedBottomCode",
1941
+ color: ID(5),
1942
+ label: "Card",
1943
+ labelPlural: "Cards"
1944
+ },
1945
+ document: {
1946
+ kind: "document",
1947
+ category: "document",
1948
+ icon: "FileText",
1949
+ color: ID(4),
1950
+ label: "Document",
1951
+ labelPlural: "Documents",
1952
+ glyph: "\u25A4"
1953
+ },
1954
+ channel: {
1955
+ kind: "channel",
1956
+ category: "channel",
1957
+ icon: "MessageSquare",
1958
+ color: ID(2),
1959
+ label: "Channel",
1960
+ labelPlural: "Channels",
1961
+ glyph: "#"
1962
+ },
1963
+ project: {
1964
+ kind: "project",
1965
+ category: "project",
1966
+ icon: "FolderKanban",
1967
+ color: ID(5),
1968
+ label: "Project",
1969
+ labelPlural: "Projects",
1970
+ glyph: "\u25C8"
1971
+ },
1972
+ // A GOAL pursued inside one project (`project_tracks`, 0272). The USER word
1973
+ // is "Goal" (founder decision 89d53f13, 2026-10-23); the kind token, the
1974
+ // table and every tool stem stay `track`. Same hue as its project: a goal is
1975
+ // read as a lane OF the project, never beside it.
1976
+ track: {
1977
+ kind: "track",
1978
+ category: "project",
1979
+ icon: "Route",
1980
+ color: ID(5),
1981
+ label: "Goal",
1982
+ labelPlural: "Goals"
1983
+ },
1984
+ // One stretch of a track (`project_tracks.stages[]`, the `stage` key on a
1985
+ // track-filed session). The USER word is "Step" — `skills/synap/concepts.md`
1986
+ // is the glossary, and a drift tripwire holds the two together. Same hue and
1987
+ // icon family as its track: a step is read as a segment OF the track.
1988
+ stage: {
1989
+ kind: "stage",
1990
+ category: "project",
1991
+ icon: "Route",
1992
+ color: ID(5),
1993
+ label: "Step",
1994
+ labelPlural: "Steps"
1995
+ },
1996
+ // Founder G1 (2026-10-30): a person's unit of work is a "Job" ("Travail");
1997
+ // `session` stays the kind token, table, API param and MCP tool stem.
1998
+ session: {
1999
+ kind: "session",
2000
+ category: "session",
2001
+ icon: "Rss",
2002
+ color: ID(11),
2003
+ label: "Job",
2004
+ labelPlural: "Jobs"
2005
+ },
2006
+ workspace: {
2007
+ kind: "workspace",
2008
+ category: "workspace",
2009
+ icon: "LayoutDashboard",
2010
+ color: ID(6),
2011
+ // Founder N1 (2026-09-27): the user word is "Space"; `workspace` stays the
2012
+ // kind token, table, API param and MCP tool stem.
2013
+ label: "Space",
2014
+ labelPlural: "Spaces"
2015
+ },
2016
+ // ── System capabilities (the `/` universe) — spread across the wider palette ──
2017
+ // Concept glossary (`skills/synap/concepts.md` → Tools, founder D2): skill,
2018
+ // capability and tool are three DB kinds but ONE user word, "Tool". A detail
2019
+ // page still names the kind — through `resolveToolKindLabel`, never here.
2020
+ skill: {
2021
+ kind: "skill",
2022
+ category: "skill",
2023
+ icon: "GraduationCap",
2024
+ color: ID(9),
2025
+ label: "Tool",
2026
+ labelPlural: "Tools"
2027
+ },
2028
+ // The user word is "Automation" (concepts.md, founder D2, 2026-10-31): something
2029
+ // that runs by itself, on a schedule or an event. "Rule" is a skill rule (the
2030
+ // `rule` noun, `OBJECT_NOUNS`), and NOT the governance "Approvals" rules.
2031
+ automation: {
2032
+ kind: "automation",
2033
+ category: "automation",
2034
+ icon: "Zap",
2035
+ color: ID(7),
2036
+ label: "Automation",
2037
+ labelPlural: "Automations",
2038
+ glyph: "\u26A1"
2039
+ },
2040
+ // The user word is "Process" (founder D1, 16 Nov 2026, Process wave plan
2041
+ // 0adf8352; it replaced "Template", concepts.md D2 of 31 Oct). "Template"
2042
+ // now names only the space package (`resolvePackageNoun`, "Space template").
2043
+ // A goal's method says WHICH process through `resolveTemplateNoun(scope)`
2044
+ // ("Goal process").
2045
+ playbook: {
2046
+ kind: "playbook",
2047
+ category: "playbook",
2048
+ icon: "BookOpen",
2049
+ color: ID(8),
2050
+ label: "Process",
2051
+ labelPlural: "Processes",
2052
+ // Stored summaries filed before D1 say "Template" ("Update Template"),
2053
+ // "Work/Goal template", or the older "Playbook".
2054
+ formerLabels: [
2055
+ "Template",
2056
+ "Templates",
2057
+ "Work template",
2058
+ "Goal template",
2059
+ "Playbook",
2060
+ "Playbooks"
2061
+ ]
2062
+ },
2063
+ // Concept glossary (`skills/synap/concepts.md` → Tools, founder D2): skill,
2064
+ // capability and tool are three DB kinds but ONE user word, "Tool". A detail
2065
+ // page still names the kind — through `resolveToolKindLabel`, never here.
2066
+ capability: {
2067
+ kind: "capability",
2068
+ category: "capability",
2069
+ icon: "Boxes",
2070
+ color: ID(10),
2071
+ label: "Tool",
2072
+ labelPlural: "Tools"
2073
+ },
2074
+ command: {
2075
+ kind: "command",
2076
+ category: "command",
2077
+ icon: "TerminalSquare",
2078
+ color: ID(1),
2079
+ label: "Command",
2080
+ labelPlural: "Commands"
2081
+ },
2082
+ tool: {
2083
+ kind: "tool",
2084
+ category: "tool",
2085
+ icon: "Wrench",
2086
+ color: ID(12),
2087
+ label: "Tool",
2088
+ labelPlural: "Tools"
2089
+ },
2090
+ // A NEED (0426, founder decisions D2 and D3): a seat a provider fills once
2091
+ // per space ("Code host", "Payments"). Its own word, "Need", never "Role"
2092
+ // (which already means four things). Category `tool`: a tool fills it.
2093
+ need: {
2094
+ kind: "need",
2095
+ category: "tool",
2096
+ icon: "Puzzle",
2097
+ color: ID(12),
2098
+ label: "Need",
2099
+ labelPlural: "Needs"
2100
+ },
2101
+ // An Application (App Connect v1) — an app that REACHES the pod with a grant.
2102
+ // NOT `category: "tool"`: a tool is what the pod USES (outbound); an
2103
+ // application is what USES the pod (inbound). The user word is "Connected app"
2104
+ // (founder D3, 2026-10-31): "App" is what you open IN Synap (`app` noun).
2105
+ application: {
2106
+ kind: "application",
2107
+ category: "application",
2108
+ icon: "SquareCode",
2109
+ color: ID(11),
2110
+ label: "Connected app",
2111
+ labelPlural: "Connected apps"
2112
+ },
2113
+ // A trusted issuer — an outside service whose signed identity tokens the pod
2114
+ // accepts (sign-in, provisioning). Inbound trust like an application, so it
2115
+ // shares that hue; its own category because it is not an app: it never
2116
+ // calls the pod with a grant, it vouches for who is calling.
2117
+ issuer: {
2118
+ kind: "issuer",
2119
+ category: "issuer",
2120
+ icon: "BadgeCheck",
2121
+ color: ID(11),
2122
+ label: "Trusted issuer",
2123
+ labelPlural: "Trusted issuers"
2124
+ },
2125
+ // ── Graph-only kinds ──
2126
+ // `source`, `participant` and `run` are returned by `getObjectGraph`
2127
+ // (`GRAPH_KINDS`) and by the Processes queue, but had no identity entry, so
2128
+ // every surface that showed them either fell back to the neutral `Box` or
2129
+ // kept its own hand-written glyph/label map beside the registry. Registered
2130
+ // here so there is one answer.
2131
+ run: {
2132
+ kind: "run",
2133
+ category: "run",
2134
+ icon: "Play",
2135
+ color: ID(11),
2136
+ label: "Run",
2137
+ labelPlural: "Runs"
2138
+ },
2139
+ source: {
2140
+ kind: "source",
2141
+ category: "source",
2142
+ icon: "Database",
2143
+ color: ID(3),
2144
+ label: "Source",
2145
+ labelPlural: "Sources"
2146
+ },
2147
+ participant: {
2148
+ kind: "participant",
2149
+ category: "participant",
2150
+ icon: "User",
2151
+ color: ID(6),
2152
+ label: "Participant",
2153
+ labelPlural: "Participants"
2154
+ },
2155
+ // The pod's event log as a person grants it (`event.read` / `event.create`:
2156
+ // observations, commits, builds, CI results). NOT `event`, which is the
2157
+ // calendar kind (`entity.event.*`, "Events" with a Calendar icon): naming the
2158
+ // log "Events" on a permission page read as calendar access. The grant
2159
+ // catalog names this noun for its `event` subject (`grants/catalog.ts`).
2160
+ // A mass noun: the plural heading is "Activity", as the Work tab says it.
2161
+ activity: {
2162
+ kind: "activity",
2163
+ category: "run",
2164
+ icon: "Activity",
2165
+ color: ID(11),
2166
+ label: "Activity",
2167
+ labelPlural: "Activity"
2168
+ },
2169
+ // A bundle of templates installed together. Internally a `suite` package
2170
+ // (see the alias below); the user word is "Pack" (`skills/synap/concepts.md`).
2171
+ // A pack depends on the workspace templates it needs — it never creates a
2172
+ // workspace of its own — so it is NOT `category: "workspace"`.
2173
+ pack: {
2174
+ kind: "pack",
2175
+ category: "package",
2176
+ icon: "Boxes",
2177
+ color: ID(10),
2178
+ label: "Pack",
2179
+ labelPlural: "Packs"
2180
+ },
2181
+ // ── AI / governance (agent is ALWAYS --synap-ai) ──
2182
+ agent: {
2183
+ kind: "agent",
2184
+ category: "agent",
2185
+ icon: "Bot",
2186
+ color: AI,
2187
+ label: "Agent",
2188
+ labelPlural: "Agents"
2189
+ },
2190
+ // A computer (MACHINE-IDENTITY-PLAN): an agent user of type `machine` that
2191
+ // holds its own key and hosts agents. "Machine" is the code word; the person
2192
+ // reads "Computer".
2193
+ machine: {
2194
+ kind: "machine",
2195
+ category: "agent",
2196
+ icon: "Laptop",
2197
+ color: AI,
2198
+ label: "Computer",
2199
+ labelPlural: "Computers"
2200
+ },
2201
+ // A `governance_rules` row: "which AI writes wait for me?" (concepts.md).
2202
+ // The user word is "Approvals" — never "Trust rules" (the old nav label),
2203
+ // and never "Rules", which is the automation (`automation` above).
2204
+ governance_rule: {
2205
+ kind: "governance_rule",
2206
+ category: "proposal",
2207
+ icon: "ShieldCheck",
2208
+ color: ID(4),
2209
+ label: "Approval",
2210
+ labelPlural: "Approvals"
2211
+ },
2212
+ // Founder G1 (2026-10-30): what waits for a person's yes is a "Request"
2213
+ // ("Demande"); `proposal` stays the kind token, table and tool stem.
2214
+ proposal: {
2215
+ kind: "proposal",
2216
+ category: "proposal",
2217
+ icon: "GitPullRequest",
2218
+ color: ID(4),
2219
+ label: "Request",
2220
+ labelPlural: "Requests"
2221
+ },
2222
+ notification: {
2223
+ kind: "notification",
2224
+ category: "notification",
2225
+ icon: "Bell",
2226
+ color: ID(1),
2227
+ label: "Notification",
2228
+ labelPlural: "Notifications"
2229
+ },
2230
+ // ── Account setup / landing page kinds ──
2231
+ // Founder G1 (2026-10-30): a client reads their pod as "Your company"
2232
+ // ("Votre entreprise"); `pod` / `data-pod` stay the kind tokens.
2233
+ pod: {
2234
+ kind: "pod",
2235
+ category: "workspace",
2236
+ icon: "Server",
2237
+ color: ID(6),
2238
+ label: "Your company",
2239
+ labelPlural: "Your companies"
2240
+ },
2241
+ "data-pod": {
2242
+ kind: "data-pod",
2243
+ category: "workspace",
2244
+ icon: "Server",
2245
+ color: ID(6),
2246
+ label: "Your company",
2247
+ labelPlural: "Your companies"
2248
+ },
2249
+ // ── Surface kinds (landing page) ──
2250
+ desktop: {
2251
+ kind: "desktop",
2252
+ category: "tool",
2253
+ icon: "Monitor",
2254
+ color: ID(2),
2255
+ label: "Desktop app",
2256
+ labelPlural: "Desktop apps"
2257
+ },
2258
+ cli: {
2259
+ kind: "cli",
2260
+ category: "tool",
2261
+ icon: "Terminal",
2262
+ color: ID(1),
2263
+ label: "CLI agent",
2264
+ labelPlural: "CLI agents"
2265
+ },
2266
+ telegram: {
2267
+ kind: "telegram",
2268
+ category: "tool",
2269
+ icon: "MessageSquare",
2270
+ color: ID(3),
2271
+ label: "Telegram",
2272
+ labelPlural: "Telegram"
2273
+ },
2274
+ raycast: {
2275
+ kind: "raycast",
2276
+ category: "tool",
2277
+ icon: "Keyboard",
2278
+ color: ID(11),
2279
+ label: "Raycast",
2280
+ labelPlural: "Raycast"
2281
+ }
2282
+ };
2283
+ var OBJECT_KINDS = OBJECT_KIND_ROWS;
2284
+
2285
+ // ../../../synap-backend/packages/types/dist/needs/index.js
2286
+ var NEEDS = [
2287
+ {
2288
+ slug: "code-host",
2289
+ label: "Code host",
2290
+ description: "Where the code lives: repositories, branches, pull requests.",
2291
+ intents: ["fetch_record", "list_records", "run_external_job"],
2292
+ aliases: ["git-host", "repository"]
2293
+ },
2294
+ {
2295
+ slug: "deploy-target",
2296
+ label: "Deploy target",
2297
+ description: "Where a change is deployed and served.",
2298
+ intents: ["run_external_job", "fetch_record"],
2299
+ aliases: ["hosting"]
2300
+ },
2301
+ {
2302
+ slug: "gate",
2303
+ label: "Gate",
2304
+ description: "What checks a change before it lands: tests, typecheck, CI.",
2305
+ intents: ["run_external_job", "fetch_record"],
2306
+ aliases: ["ci"]
2307
+ },
2308
+ {
2309
+ slug: "payments",
2310
+ label: "Payments",
2311
+ description: "Where money is charged and recorded.",
2312
+ intents: ["list_records", "fetch_record"],
2313
+ aliases: []
2314
+ },
2315
+ {
2316
+ slug: "messaging",
2317
+ label: "Messaging",
2318
+ description: "Where messages are sent to people outside the pod.",
2319
+ intents: ["send_message", "request_connection"],
2320
+ aliases: ["chat"]
2321
+ },
2322
+ {
2323
+ slug: "email",
2324
+ label: "Email",
2325
+ description: "The mailbox that sends and reads email.",
2326
+ intents: ["send_message", "list_records", "fetch_record"],
2327
+ aliases: ["mail"]
2328
+ },
2329
+ {
2330
+ slug: "calendar",
2331
+ label: "Calendar",
2332
+ description: "Where meetings and events are scheduled.",
2333
+ intents: ["schedule_event", "list_records"],
2334
+ aliases: []
2335
+ },
2336
+ {
2337
+ slug: "file-store",
2338
+ label: "File store",
2339
+ description: "Where files are kept outside the pod.",
2340
+ intents: ["manage_file", "fetch_record", "list_records"],
2341
+ aliases: ["storage", "drive"]
2342
+ },
2343
+ {
2344
+ slug: "media-generation",
2345
+ label: "Media generation",
2346
+ description: "What makes and edits images, video and audio.",
2347
+ intents: ["generate_media", "edit_video", "transcribe_media"],
2348
+ aliases: ["media"]
2349
+ },
2350
+ {
2351
+ slug: "social-publishing",
2352
+ label: "Social publishing",
2353
+ description: "Where posts are published to social networks.",
2354
+ intents: ["publish_post"],
2355
+ aliases: ["social"]
2356
+ },
2357
+ {
2358
+ slug: "linkedin-reach",
2359
+ label: "LinkedIn reach",
2360
+ description: "What finds people and reaches them on LinkedIn.",
2361
+ intents: [
2362
+ "find_people",
2363
+ "request_connection",
2364
+ "send_message",
2365
+ "enrich_entity"
2366
+ ],
2367
+ aliases: ["linkedin"]
2368
+ },
2369
+ {
2370
+ slug: "analytics",
2371
+ label: "Analytics",
2372
+ description: "Where usage and traffic are measured.",
2373
+ intents: ["list_records", "fetch_record"],
2374
+ aliases: []
2375
+ },
2376
+ {
2377
+ slug: "compute",
2378
+ label: "Compute",
2379
+ description: "Where temporary machines are started, run jobs and are released.",
2380
+ intents: [
2381
+ "provision_compute",
2382
+ "run_external_job",
2383
+ "fetch_record",
2384
+ "release_compute"
2385
+ ],
2386
+ aliases: ["cloud-compute", "gpu"]
2387
+ }
2388
+ ];
2389
+ var NEED_SLUGS = NEEDS.map((n) => n.slug);
2390
+ var BY_SLUG = new Map(NEEDS.map((n) => [n.slug, n]));
2391
+ var BY_ALIAS = new Map(NEEDS.flatMap((n) => n.aliases.map((a) => [a, n.slug])));
2392
+
2393
+ // ../../../synap-backend/packages/types/dist/vocabulary/tool-labels.js
2394
+ function moods(progressive, past, imperative) {
2395
+ return { progressive, past, imperative };
2396
+ }
2397
+ var TOOL_LABEL_OVERRIDES = {
2398
+ // Search — the three old tables said "your notes" / "entities" / "your
2399
+ // workspace" for the same call. One answer: it searches the person's pod.
2400
+ search: moods("Searching your pod", "Searched your pod", "Search your pod"),
2401
+ search_unified: moods("Searching your pod", "Searched your pod", "Search your pod"),
2402
+ search_entities: moods("Searching your pod", "Searched your pod", "Search your pod"),
2403
+ search_documents: moods("Searching documents", "Searched documents", "Search documents"),
2404
+ vector_search: moods("Searching by meaning", "Searched by meaning", "Search by meaning"),
2405
+ memory_search: moods("Recalling memories", "Recalled memories", "Recall memories"),
2406
+ remember_fact: moods("Saving to memory", "Saved to memory", "Save to memory"),
2407
+ web_search: moods("Searching the web", "Searched the web", "Search the web"),
2408
+ web_fetch: moods("Reading a web page", "Read a web page", "Read a web page"),
2409
+ batch_web_fetch: moods("Reading web pages", "Read web pages", "Read web pages"),
2410
+ graph_traverse: moods("Exploring connections", "Explored connections", "Explore connections"),
2411
+ link_context: moods("Linking context", "Linked context", "Link context"),
2412
+ // Delegation — the agent hands work to another agent.
2413
+ dispatch_agent: moods("Delegating to a teammate", "Delegated to a teammate", "Delegate to a teammate"),
2414
+ query_agent: moods("Asking a teammate", "Asked a teammate", "Ask a teammate"),
2415
+ discover_tools: moods("Activating tools", "Activated tools", "Activate tools"),
2416
+ run_command: moods("Running a command", "Ran a command", "Run a command"),
2417
+ // A skill FILE is instructions the agent reads, not the runnable "Tool" the
2418
+ // `skill` kind names — composing would say "Loading tool".
2419
+ load_skill: moods("Loading instructions", "Loaded instructions", "Load instructions"),
2420
+ // Reads whose object is not a kind.
2421
+ get_bento_schema: moods("Reading the dashboard layout", "Read the dashboard layout", "Read the dashboard layout"),
2422
+ get_workflow_place: moods("Checking the workflow", "Checked the workflow", "Check the workflow"),
2423
+ get_whiteboard_state: moods("Reading the whiteboard", "Read the whiteboard", "Read the whiteboard"),
2424
+ get_feed_preferences: moods("Reading feed preferences", "Read feed preferences", "Read feed preferences"),
2425
+ set_track_params: moods("Setting goal parameters", "Set goal parameters", "Set goal parameters"),
2426
+ focus_surface: moods("Opening a surface", "Opened a surface", "Open a surface"),
2427
+ // Messaging / channels.
2428
+ proactive_post: moods("Posting an update", "Posted an update", "Post an update"),
2429
+ send_message_external: moods("Sending a message", "Sent a message", "Send a message"),
2430
+ route_to_channel: moods("Routing to a channel", "Routed to a channel", "Route to a channel"),
2431
+ // Inbox.
2432
+ inbox_list_threads: moods("Listing inbox threads", "Listed inbox threads", "List inbox threads"),
2433
+ inbox_get_thread: moods("Reading an inbox thread", "Read an inbox thread", "Read an inbox thread"),
2434
+ inbox_enrich_thread: moods("Enriching an inbox thread", "Enriched an inbox thread", "Enrich an inbox thread"),
2435
+ inbox_suggest_snippet: moods("Suggesting a reply", "Suggested a reply", "Suggest a reply"),
2436
+ // Feeds / signals.
2437
+ fetch_and_classify_signals: moods("Fetching signals", "Fetched signals", "Fetch signals"),
2438
+ personalize_feed_content: moods("Personalizing your feed", "Personalized your feed", "Personalize your feed")
2439
+ };
2440
+
2441
+ // ../../../synap-backend/packages/types/dist/vocabulary/destinations.js
2442
+ var DESTINATION_LABELS = {
2443
+ home: "Home",
2444
+ // Everything that needs you: decisions, questions, routine changes, broken work.
2445
+ inbox: "Inbox",
2446
+ // What is moving, and the sessions behind it ("Start work" — no noun for a session).
2447
+ work: "Work",
2448
+ // What you and your agents brought in: things, files, imports.
2449
+ library: "Library",
2450
+ projects: OBJECT_KINDS.project.labelPlural,
2451
+ spaces: OBJECT_KINDS.workspace.labelPlural,
2452
+ agents: OBJECT_KINDS.agent.labelPlural,
2453
+ // Things filed into no project (was "Not in a project").
2454
+ unfiled: "Unfiled",
2455
+ getting_started: "Getting started",
2456
+ // The pod's plan and its AI credits: ONE place (wave PN), the Settings
2457
+ // section every paying CTA opens (desktop `billing`, relay `/credits`).
2458
+ credits: "Plan and credits",
2459
+ // Where you make things: a view, a card, a space, an automation (founder D3,
2460
+ // 2026-10-31, plan call M1: "Make" pairs with "Work").
2461
+ make: "Make",
2462
+ // What you open in Synap (founder D3 N5): the launcher that was "My pod".
2463
+ // Spelled here because the `app` noun lives in `./index`, which is still
2464
+ // evaluating when this table is built; `destinations.test.ts` pins it equal
2465
+ // to `resolveObjectNounPlural("app")`.
2466
+ apps: "Apps",
2467
+ // The store (founder D3 N9): one word for Marketplace, Get more tools.
2468
+ get_more: "Get more"
2469
+ };
2470
+
2471
+ // ../../../synap-backend/packages/types/dist/vocabulary/index.js
2472
+ function nounInSentence(noun) {
2473
+ return noun.trim().split(/\s+/).map((word) => /^[A-Z]?[a-z]*$/.test(word.replace(/[^A-Za-z]/g, "")) ? word.toLowerCase() : word).join(" ");
2474
+ }
2475
+ var ACTION_VERB_ROWS = {
2476
+ create: { imperative: "Create", past: "Created", present: "Creates" },
2477
+ update: { imperative: "Update", past: "Updated", present: "Updates" },
2478
+ delete: { imperative: "Delete", past: "Deleted" },
2479
+ archive: { imperative: "Archive", past: "Archived" },
2480
+ restore: { imperative: "Restore", past: "Restored" },
2481
+ run: { imperative: "Run", past: "Ran" },
2482
+ // A propose-mode rule's THEN: it files a proposal instead of acting. Without
2483
+ // the row the past mood humanized to "Propose" ("Rule X propose …").
2484
+ propose: { imperative: "Propose", past: "Proposed" },
2485
+ // Work model L2: a lifecycle status move (`entity.transition`, the moveStatus
2486
+ // door). "Move" on the pending proposal; "Moved" on the history receipt.
2487
+ transition: { imperative: "Move", past: "Moved" },
2488
+ // A NEW run of stored input with the current guidelines (intake plan §4.3 —
2489
+ // a rerun is a new session `spawned_from` the previous one). "Rerun" on the
2490
+ // button and pending item; "Reran" on the history receipt. Added ahead of its
2491
+ // producer, for the W2 rerun door, so that door never hand-writes a label.
2492
+ rerun: { imperative: "Rerun", past: "Reran" },
2493
+ // `capture.complete.completed` is emitted by `routers/capture.ts` and by
2494
+ // `buildEventPattern`, so this token reaches users. Without a row here
2495
+ // `resolveActionLabel(action, "past")` fell through to `humanizeToken`,
2496
+ // which has NO tense and silently ignores the mood — so a settled history
2497
+ // row rendered "Complete Capture", present-imperative, as if the agent were
2498
+ // about to act. See the mood-coverage test in this package.
2499
+ complete: { imperative: "Complete", past: "Completed" },
2500
+ // `external_message.received.completed`. This one was invisible because
2501
+ // `humanizeToken("received")` happens to spell the PAST form — so the past
2502
+ // mood looked correct while the imperative silently returned "Received"
2503
+ // too. A coincidence is not a contract.
2504
+ //
2505
+ // ⚠️ Keyed on `received`, the token the producer actually emits — NOT on a
2506
+ // base form `receive`. I added both; `receive` had zero occurrences across
2507
+ // all four repos, so it was a row nobody could reach, and it put a
2508
+ // second spelling of one verb into a table whose whole job is to have one.
2509
+ // A key here earns its place by being emitted, not by being well-formed.
2510
+ received: { imperative: "Receive", past: "Received" },
2511
+ merge: { imperative: "Merge", past: "Merged", progressive: "Merging" },
2512
+ link: { imperative: "Link", past: "Linked", present: "Links" },
2513
+ unlink: { imperative: "Unlink", past: "Unlinked" },
2514
+ attach: { imperative: "Attach", past: "Attached" },
2515
+ // A space's need filled by a provider (0426, the `workspace/bind_need` door).
2516
+ bind_need: { imperative: "Fill need", past: "Filled need" },
2517
+ // "Add to <session>" (a capture offered to a running session) — `add`
2518
+ // humanized to "Add" in BOTH moods, so the receipt read "Add to X".
2519
+ add: { imperative: "Add", past: "Added" },
2520
+ detach: { imperative: "Detach", past: "Detached" },
2521
+ // A Library organise op ("Remove 3 items from …") and a group Build: both
2522
+ // humanized to one word in BOTH moods, so a receipt read "Remove" / "Build".
2523
+ remove: { imperative: "Remove", past: "Removed" },
2524
+ build: { imperative: "Build", past: "Built" },
2525
+ install: { imperative: "Install", past: "Installed" },
2526
+ enable: { imperative: "Enable", past: "Enabled" },
2527
+ disable: { imperative: "Disable", past: "Disabled" },
2528
+ // A tool's account: `connect` mints the sign-in, `reconnect` repairs one that
2529
+ // lapsed. Both reached users by ACCIDENT — `humanizeToken` spells them
2530
+ // correctly, which is exactly the coincidence this table exists to remove
2531
+ // (see `received` above). Two surfaces had already hand-written them
2532
+ // (`ConnectedApp`'s FIX_LABEL map, `ToolPage`'s reconnect ternary) the moment
2533
+ // a label was needed; a third would have been inevitable.
2534
+ connect: { imperative: "Connect", past: "Connected" },
2535
+ reconnect: {
2536
+ imperative: "Reconnect",
2537
+ past: "Reconnected",
2538
+ progressive: "Reconnecting"
2539
+ },
2540
+ // Pause/resume is the register for something that RUNS (an automation with a
2541
+ // live trigger, a session): it was running and will run again. Enable/disable
2542
+ // is the register for a config FLAG. They are not synonyms — using the flag
2543
+ // words for a running processor loses the "will run again" meaning.
2544
+ pause: { imperative: "Pause", past: "Paused" },
2545
+ resume: { imperative: "Resume", past: "Resumed" },
2546
+ // A STOPPED session's one verb (needs-you decision E1): no agent moved it
2547
+ // for 7 days, so the person resumes it or closes it — both open it.
2548
+ resume_or_close: { imperative: "Resume or close", past: "Resumed or closed" },
2549
+ join: { imperative: "Join", past: "Joined" },
2550
+ import: { imperative: "Import", past: "Imported" },
2551
+ capture: { imperative: "Capture", past: "Captured" },
2552
+ // The GRAPH write proposal types (a batch of records + links from one
2553
+ // capture / import). Keyed whole: their tail `graph` names the payload's
2554
+ // shape, not an act, and humanized it leaked as a verb ("Graph …").
2555
+ "capture.graph": { imperative: "Capture", past: "Captured" },
2556
+ "import.graph": { imperative: "Import", past: "Imported" },
2557
+ send: { imperative: "Send", past: "Sent", progressive: "Sending" },
2558
+ // The draft decisions' words are defined ONCE, in `./draft-words.ts` (a
2559
+ // dependency-free leaf the SDK vendors for generated apps): approve here and
2560
+ // discard below are those rows.
2561
+ approve: DRAFT_DECISION_WORDS.en.approve,
2562
+ // The decision verb for OBJECT-WORK proposals — a proposed entity that
2563
+ // renders as the entity, editable, in a draft state. Approving that is not
2564
+ // reviewing a diff, it is finishing a draft, and the verb should say so.
2565
+ // Both moods matter: "Publish" on the button, "Published" in the receipt.
2566
+ publish: { imperative: "Publish", past: "Published" },
2567
+ // Governance surfaces disagreed on this one ("Refused" vs "Rejected").
2568
+ // "Reject" is the canonical pair — it matches the API verb and the
2569
+ // `PROPOSAL_REJECTION_REASONS` taxonomy.
2570
+ reject: { imperative: "Reject", past: "Rejected", progressive: "Rejecting" },
2571
+ // A proposer retracting their own pending ask — NOT a review outcome.
2572
+ // Added 2026-09-07: `STATUS_LABELS.withdrawn` existed but there was no
2573
+ // ACTION verb, so `resolveActionLabel("withdraw", "past")` fell through to
2574
+ // `humanizeToken`, which IGNORES the mood argument and returned the
2575
+ // present-imperative "Withdraw" into past-tense receipts.
2576
+ withdraw: { imperative: "Withdraw", past: "Withdrawn" },
2577
+ set: { imperative: "Set", past: "Set" },
2578
+ request: { imperative: "Request", past: "Requested" },
2579
+ revise: { imperative: "Revise", past: "Revised" },
2580
+ // Session→config conversions (workbench Wave B). Promote turns a validated
2581
+ // session into a reusable playbook; spawn turns one into a project. Both are
2582
+ // STRUCTURE-ONLY conversions, and both are named on a receipt that must read
2583
+ // in the past ("Promoted to playbook X") while the button reads imperative.
2584
+ promote: { imperative: "Promote", past: "Promoted" },
2585
+ spawn: { imperative: "Spawn", past: "Spawned" },
2586
+ // Triage decisions on an agent/automation-originated session. "Accept" is the
2587
+ // affirmative half of the pair whose negative is `discard` — deliberately NOT
2588
+ // `approve`/`reject`, which name a PROPOSAL decision. Triage is not governance:
2589
+ // nothing was proposed, a session simply appeared and a person says whether it
2590
+ // is theirs to work.
2591
+ accept: { imperative: "Accept", past: "Accepted" },
2592
+ // Also a DRAFT's negative decision (`./draft-words.ts`: a person throws away
2593
+ // text written for them; the API verb stays `reject`).
2594
+ discard: DRAFT_DECISION_WORDS.en.discard,
2595
+ // Undo of a conversion — the inverse verb, not a delete.
2596
+ revert: { imperative: "Revert", past: "Reverted" },
2597
+ // TWO distinct acts, two verbs. `revert` takes an APPLIED proposal's effect
2598
+ // back (the history row: it lands in `reverted`). `undo` is the seconds-later
2599
+ // "I did not mean to decide that yet" on a verdict just given — it puts the
2600
+ // proposal back in the queue. Sharing one word made the same button mean two
2601
+ // things on adjacent surfaces.
2602
+ undo: { imperative: "Undo", past: "Undone" },
2603
+ // Re-running an approval that already failed (`approval_failed`). The write
2604
+ // was approved once, so "Approve" is the wrong word on that button — and for a
2605
+ // transient provider outage it is the reviewer's ONLY recovery.
2606
+ // ONE retry verb: the button says "Try again", like every failed read and
2607
+ // act in the kit (SpatialErrorState, LoadFailed). History keeps "Retried":
2608
+ // "Tried again the sync" is not a sentence.
2609
+ retry: { imperative: "Try again", past: "Retried" },
2610
+ // Re-CHECKING what could not be read (a connection the pod failed to read):
2611
+ // nothing is redone, the pod is asked again — so not "Try again".
2612
+ check_again: { imperative: "Check again", past: "Checked again" },
2613
+ // AI availability CTAs (`@synap-core/types/ai-availability`) — the CP's
2614
+ // `PodBillingAction` vocabulary. `ask_admin` is the member's verb whenever
2615
+ // they cannot pay; `upgrade` also covers renewing a plan that has no AI.
2616
+ top_up: { imperative: "Top up", past: "Topped up" },
2617
+ upgrade: { imperative: "Upgrade", past: "Upgraded" },
2618
+ ask_admin: { imperative: "Ask admin", past: "Asked admin" },
2619
+ fix_payment: { imperative: "Fix payment", past: "Fixed payment" },
2620
+ // Put a REJECTED proposal back in the queue — the inverse of reject. Without
2621
+ // a row `resolveActionLabel("reopen", …)` fell through to `humanizeToken`,
2622
+ // which has no tense and only spelled "Reopen" by luck.
2623
+ reopen: { imperative: "Reopen", past: "Reopened" },
2624
+ // Reopening a closed GOAL is a new version (`reopenTrack`, linked by
2625
+ // `replaces`), never the governance reopen above, nor a move back: its own
2626
+ // dotted key, so bare `reopen` keeps both its readers (2026-10-24).
2627
+ "track.reopen": {
2628
+ imperative: "Open a new version",
2629
+ past: "Opened a new version"
2630
+ },
2631
+ // A closed goal whose result must stay alive becomes an OPERATION spawned
2632
+ // from it (`startOperationFrom`) — not a reopen, not a new version: its own
2633
+ // dotted key, read by both apps' "Keep it running" door (2026-10-25).
2634
+ "track.keep_running": {
2635
+ imperative: "Keep it running",
2636
+ past: "Kept it running"
2637
+ },
2638
+ // The ONE desktop door to a Claude Code session's terminal (sessions
2639
+ // cockpit C7): it focuses, attaches or reopens it, so a dialog that waits
2640
+ // there (`needs_permission`, `needs_answer`) is one click away. Its own
2641
+ // dotted key, so bare `open` keeps its readers.
2642
+ "terminal.open": {
2643
+ imperative: "Open terminal",
2644
+ past: "Opened terminal"
2645
+ },
2646
+ // The SESSION verbs that bare tokens would misread (`SESSION_VERBS`,
2647
+ // `@synap-core/types/focus-sessions`): Stop ends a session `cancelled`
2648
+ // through the one close door; Wait on / Stop waiting on add and drop a
2649
+ // `blocked_by` edge. Dotted keys, so a bare `stop` or `release` elsewhere
2650
+ // keeps its own reading (pause, resume and rerun share their bare rows).
2651
+ "session.stop": { imperative: "Stop", past: "Stopped" },
2652
+ // A run that stopped before its last stage resumes at it (plan 7d71ddcc).
2653
+ "session.continue": { imperative: "Continue", past: "Continued" },
2654
+ "session.wait_on": { imperative: "Wait on", past: "Waited on" },
2655
+ "session.release": {
2656
+ imperative: "Stop waiting on",
2657
+ past: "Stopped waiting on"
2658
+ },
2659
+ // The owner's two answers to a delegate's counter-offer — both re-ask the
2660
+ // delegate through the participants door (`op: "add"`): with the
2661
+ // counter-offer as the commitment, or with the original one.
2662
+ "track.take_offer": {
2663
+ imperative: "Take their offer",
2664
+ past: "Took their offer"
2665
+ },
2666
+ "track.keep_ask": { imperative: "Keep my ask", past: "Kept my ask" },
2667
+ // `focus_session/orchestrate`: start ONE orchestrator over several running
2668
+ // sessions (links them, holds each on the person's yes). The proposal's verb.
2669
+ orchestrate: { imperative: "Orchestrate", past: "Orchestrated" },
2670
+ // The pod's one "Make them goals" card (founder decision D-3, 2026-10-26):
2671
+ // the retired goal / objective / OKR entities the person reviews and makes
2672
+ // goals, each through the one convert door. Plural on purpose — the single
2673
+ // entity's door stays "Make it a goal".
2674
+ "track.make_goals": {
2675
+ imperative: "Make them goals",
2676
+ past: "Made them goals"
2677
+ },
2678
+ // Pod hygiene (`profile/retire`, the cleanup pack). `retire` is a SOFT,
2679
+ // reversible hide of a kind — not a delete, so it never reads "Deleted".
2680
+ // `close` ends an idle session through the close door; `expire` takes a
2681
+ // long-waiting proposal out of the queue without applying it.
2682
+ retire: { imperative: "Retire", past: "Retired" },
2683
+ close: { imperative: "Close", past: "Closed" },
2684
+ // A goal (track) that stopped mattering — its lost ending ("Dropped").
2685
+ drop: { imperative: "Drop", past: "Dropped" },
2686
+ expire: { imperative: "Expire", past: "Expired", progressive: "Expiring" },
2687
+ // Sharing (Sites W2–W5, `services/sharing/share-service.ts`). `publish`
2688
+ // above is reused for putting a record on the public web — one word for one
2689
+ // act, whether it finishes a draft or opens a record to strangers. `unshare`
2690
+ // and `unpublish` NARROW (reversible: sharing again restores access);
2691
+ // `revoke` is PERMANENT (0276: a revoked link row is frozen, sharing again
2692
+ // mints a new one), so it must never be rendered as "Unshared". `redeem` is a
2693
+ // signed-in person turning a link into a guest membership.
2694
+ share: { imperative: "Share", past: "Shared" },
2695
+ unshare: { imperative: "Unshare", past: "Unshared" },
2696
+ unpublish: { imperative: "Unpublish", past: "Unpublished" },
2697
+ revoke: { imperative: "Revoke", past: "Revoked", progressive: "Revoking" },
2698
+ redeem: { imperative: "Redeem", past: "Redeemed" },
2699
+ // Governed space operations (R8a/P1). `move` is emitted by
2700
+ // `entities.moveToWorkspace` (audit `entity.move`) and titles a move
2701
+ // proposal; `rename` titles a space rename; `grant_access` is the stored
2702
+ // proposalType of `profiles.grantAccess` — a person reads it as SHARING a
2703
+ // kind with another space, so it wears `share`'s words, not "Grant access".
2704
+ // Without rows the past mood fell through to `humanizeToken` ("Move").
2705
+ move: { imperative: "Move", past: "Moved" },
2706
+ rename: { imperative: "Rename", past: "Renamed" },
2707
+ grant_access: { imperative: "Share", past: "Shared" },
2708
+ // `profile.change_scope` (D13): a kind's scope / grants / entity placement
2709
+ // changed. One word so "<verb> <noun>" reads "Rescope kind"; humanize had no
2710
+ // past tense ("Change scope" on a receipt).
2711
+ change_scope: { imperative: "Rescope", past: "Rescoped" },
2712
+ // D7 — a trusted service (the Control Plane) asking the pod owner for more
2713
+ // access than its pinned grant (`trusted_issuer.widen_scopes`). Reads
2714
+ // "Widen access for Trusted issuer "…"" with the preposition below; humanize
2715
+ // had no past tense ("Widen scopes" on a receipt).
2716
+ widen_scopes: { imperative: "Widen access", past: "Widened access" },
2717
+ // Filing EXISTING records into a project (`project/file_entities`) and
2718
+ // taking them back out (a `belongs_to_project` link delete). One verb pair
2719
+ // for the act a person names "filing"; never "Link"/"Delete".
2720
+ file_entities: { imperative: "File", past: "Filed" },
2721
+ // An agent's held-writes pack (`agent/held_writes`, past its daily write
2722
+ // ceiling): a state the writes are in, not a verb a person performs, so both
2723
+ // moods read the same. Titled as a LEAD (`ACTION_TITLE_LEADS`): "Writes held
2724
+ // for review: Claude Code, 2026-10-27, 12 items" — never "Held writes Agent".
2725
+ held_writes: {
2726
+ imperative: "Writes held for review",
2727
+ past: "Writes held for review"
2728
+ },
2729
+ // Filing a captured record (a capture chip's accept): the proposal it was
2730
+ // becomes the thing. "File" on the button, "Filed" on the chip and receipt.
2731
+ file: {
2732
+ imperative: "File",
2733
+ past: "Filed",
2734
+ progressive: "Filing",
2735
+ present: "Files"
2736
+ },
2737
+ unfile_entities: { imperative: "Unfile", past: "Unfiled" },
2738
+ // An agent's proposal to organise the person's Library (`library/organize`:
2739
+ // groups, their items, notes, target space, a build request).
2740
+ organize: { imperative: "Organize", past: "Organized" },
2741
+ // Server-side dev-loop HUMAN GATES (`dev.plan_approval` /
2742
+ // `dev.deploy_approval`). Verbs are matched on the LAST dotted segment, so
2743
+ // these keys resolve the full proposal types. They are NOT bare "approve":
2744
+ // "Approve" alone is the decision VERB every proposal card already shows on
2745
+ // its button, so a gate labelled "Approve" would read "Approve · Approve" and
2746
+ // lose the only word that says WHICH gate a person is standing at. Both moods
2747
+ // matter — the button asks, the session receipt reports.
2748
+ plan_approval: { imperative: "Approve plan", past: "Approved plan" },
2749
+ deploy_approval: { imperative: "Approve deploy", past: "Approved deploy" },
2750
+ // A playbook STAGE GATE (`playbook.stage_gate`, changeType `stage_gate`):
2751
+ // the person agrees to a session entering a stage. Like the dev gates, not
2752
+ // bare "Approve"; titled as a LEAD (`ACTION_TITLE_LEADS`) whose name is the
2753
+ // stage and the thing ("Approve stage: Send proposal for EU deal"), never
2754
+ // "Stage gate Job" (finding 8f2dee79).
2755
+ stage_gate: { imperative: "Approve stage", past: "Approved stage" },
2756
+ // Document-edit proposal types (`DOCUMENT_PATCH_PROPOSAL_TYPES` + the legacy
2757
+ // `ai_edit`), filed against an EXISTING document by the pod's patch door.
2758
+ // Without rows they humanized to "Section update" / "Ai edit" and composed
2759
+ // `Section update Document "…"` — a noun where the verb belongs. Like the
2760
+ // dev gates above, a verb that names the PART it acts on carries that noun,
2761
+ // and `ACTION_OBJECT_PREPOSITIONS` joins it to the document it lives in.
2762
+ section_update: { imperative: "Edit section", past: "Edited section" },
2763
+ session_narrative_update: {
2764
+ imperative: "Update narrative",
2765
+ past: "Updated narrative"
2766
+ },
2767
+ // D4: a living document's bound refresher rewriting its own AI sections.
2768
+ refresher_section_update: {
2769
+ imperative: "Refresh section",
2770
+ past: "Refreshed section"
2771
+ },
2772
+ ai_edit: { imperative: "Edit", past: "Edited" },
2773
+ // `user_edit` is a PERSON's suggested change to a document, reviewed like
2774
+ // any other proposal — so it reads as a suggestion, not as an edit made.
2775
+ user_edit: { imperative: "Suggest edit", past: "Suggested edit" },
2776
+ // Account setup / landing page verbs
2777
+ provision: { imperative: "Provision", past: "Provisioned" },
2778
+ download: { imperative: "Download", past: "Downloaded" },
2779
+ sign_in: { imperative: "Sign in", past: "Signed in" },
2780
+ start: { imperative: "Start", past: "Started" },
2781
+ check: { imperative: "Check", past: "Checked" },
2782
+ compare: { imperative: "Compare", past: "Compared" },
2783
+ see: { imperative: "See", past: "Seen" },
2784
+ open: { imperative: "Open", past: "Opened" },
2785
+ // Putting a record on a playbook's ordered pin list, and taking it off.
2786
+ // The button is imperative; a receipt of the act is past. `humanizeToken`
2787
+ // has no tense, so without these rows both moods render "Pin" / "Unpin".
2788
+ pin: { imperative: "Pin", past: "Pinned" },
2789
+ unpin: { imperative: "Unpin", past: "Unpinned" },
2790
+ // The lens row verbs (`@synap-core/types/lens`): an owed slot is ANSWERED,
2791
+ // a finished session is REVIEWED, an AI suggestion is DISMISSED. Without
2792
+ // these rows `humanizeToken` spells the button right and the receipt wrong
2793
+ // ("Answer" for an act already done).
2794
+ answer: { imperative: "Answer", past: "Answered" },
2795
+ // An owed slot whose blocker is a choice only the person can make: its
2796
+ // verb says DECIDE, as its reason mark says "Decision" (the row's door is
2797
+ // still the answer's — `LensVerb.action` stays `answer`).
2798
+ decide: { imperative: "Decide", past: "Decided" },
2799
+ review: { imperative: "Review", past: "Reviewed" },
2800
+ dismiss: { imperative: "Dismiss", past: "Dismissed" },
2801
+ // The focus verbs (`lensFocus`, `@synap-core/types/lens`): a criterion the
2802
+ // reader judges not met is SENT BACK (the scorecard's negative half beside
2803
+ // `accept`); a working agent is MESSAGED from its room; a finished track step
2804
+ // MOVES ON. Humanized, the receipts would read "Send back" / "Move on".
2805
+ send_back: { imperative: "Send back", past: "Sent back" },
2806
+ // A DELEGATE's answer to a goal commitment (`TRACK_COMMITMENT_MOVES`,
2807
+ // `@synap-core/types/units`: accept · counter · decline · report_impossible
2808
+ // — accept and decline are rows above), and the owner's ACKNOWLEDGE of a
2809
+ // report. `track-participant-words` tests hold every move to a row here.
2810
+ counter: { imperative: "Counter", past: "Countered" },
2811
+ report_impossible: {
2812
+ imperative: "Report impossible",
2813
+ past: "Reported impossible"
2814
+ },
2815
+ acknowledge: { imperative: "Acknowledge", past: "Acknowledged" },
2816
+ message: { imperative: "Message", past: "Messaged" },
2817
+ move_on: { imperative: "Move on", past: "Moved on" },
2818
+ // CONNECTION lifecycle (`@synap-core/types/membrane`, the Connected page).
2819
+ // `revoke` / `expire` / `reconnect` / `approve` live above; these are the
2820
+ // verbs the connection action rules and lifecycle events add.
2821
+ //
2822
+ // `rotate` is what the key door does (`api_keys` revoke-and-reissue) — a
2823
+ // person reads it as REPLACING the key, so an `apiKey.rotate` event reads
2824
+ // "Replaced API key". "Rotated" is operator jargon.
2825
+ rotate: { imperative: "Replace", past: "Replaced", progressive: "Replacing" },
2826
+ sync: { imperative: "Sync", past: "Synced", progressive: "Syncing" },
2827
+ issue: { imperative: "Issue", past: "Issued", progressive: "Issuing" },
2828
+ // A verb that names the part it acts on carries the noun (like
2829
+ // `section_update`): the button on an app's page says WHAT it issues.
2830
+ issue_key: {
2831
+ imperative: "Issue key",
2832
+ past: "Issued key",
2833
+ progressive: "Issuing key"
2834
+ },
2835
+ // The NEGATIVE answer to a connection asking for access. Not `reject`: the
2836
+ // review card of an `app/connect` request is a request for reach, and the
2837
+ // founder's card reads "Approve · Decline".
2838
+ decline: {
2839
+ imperative: "Decline",
2840
+ past: "Declined",
2841
+ progressive: "Declining"
2842
+ },
2843
+ // The person's NO to an agent's ask, on every mode (founder, 16 Nov 2026,
2844
+ // plan d717d6ac §3): the stored answer is `{ type: "declined" }`
2845
+ // (`@synap-core/types/ask`). Not `decline` (a connection asking for reach)
2846
+ // and not `reject` (a proposal): the ask closes as refused, the reason goes
2847
+ // to the agent, nothing is handed over.
2848
+ refuse: {
2849
+ imperative: "Refuse",
2850
+ past: "Refused",
2851
+ progressive: "Refusing"
2852
+ },
2853
+ // Cutting a connection's sign-in (an account, a channel, an agent's keys).
2854
+ // Reversible by connecting again — never "Deleted".
2855
+ disconnect: {
2856
+ imperative: "Disconnect",
2857
+ past: "Disconnected",
2858
+ progressive: "Disconnecting"
2859
+ },
2860
+ // The revoked connection's last act (founder decision 4): it hides the row
2861
+ // for good; its history is kept.
2862
+ remove_for_good: {
2863
+ imperative: "Remove for good",
2864
+ past: "Removed for good",
2865
+ progressive: "Removing"
2866
+ },
2867
+ // Lifecycle event lines (`events/connection-lines.ts`). An app's
2868
+ // `app.request` is it ASKING FOR ACCESS — "Requested" names nothing.
2869
+ request_access: {
2870
+ imperative: "Ask for access",
2871
+ past: "Asked for access",
2872
+ progressive: "Asking for access"
2873
+ },
2874
+ // An agent posed a question on a session slot (`slot_asked`); the person
2875
+ // marked a slot they owed as done (`slot_attested`); a message was posted
2876
+ // into a channel (`channel_message.created`).
2877
+ ask: { imperative: "Ask", past: "Asked", progressive: "Asking" },
2878
+ attest: { imperative: "Mark done", past: "Marked done" },
2879
+ // The person's "Not mine" on a slot an agent handed them
2880
+ // (`focus_session.slot_handed_back`): the slot is the agent's again,
2881
+ // unanswered. Not an answer and not a refusal.
2882
+ hand_back: { imperative: "Hand back", past: "Handed back" },
2883
+ post: { imperative: "Post", past: "Posted", progressive: "Posting" },
2884
+ see_failure: { imperative: "See what failed", past: "Saw what failed" },
2885
+ turn_on: {
2886
+ imperative: "Turn on",
2887
+ past: "Turned on",
2888
+ progressive: "Turning on"
2889
+ },
2890
+ add_again: { imperative: "Add again", past: "Added again" },
2891
+ cancel: {
2892
+ imperative: "Cancel",
2893
+ past: "Cancelled",
2894
+ progressive: "Cancelling"
2895
+ },
2896
+ set_notifications: {
2897
+ imperative: "Set notifications",
2898
+ past: "Set notifications"
2899
+ },
2900
+ // Proposal cards (wave 5): a pure external tool call reads "Call · Tool
2901
+ // ⟨name⟩" (humanize had no past: a receipt said "Call"), and a space brief
2902
+ // edit reads "Set brief" — the verb names the part it sets, like
2903
+ // `section_update`.
2904
+ call: { imperative: "Call", past: "Called", progressive: "Calling" },
2905
+ set_brief: { imperative: "Set brief", past: "Set brief" },
2906
+ // An agent's space grant riding a track create (wave 5, decision 4): the
2907
+ // access section reads "Grant · access" / "Granted".
2908
+ grant: { imperative: "Grant", past: "Granted", progressive: "Granting" },
2909
+ // Library: run a reader on a kept link again (or with another reader). The
2910
+ // button asks "Read again"; the receipt says it was "Read".
2911
+ read_again: { imperative: "Read again", past: "Read" }
2912
+ };
2913
+ var ACTION_VERBS = ACTION_VERB_ROWS;
2914
+ var OBJECT_NOUN_ROWS = {
2915
+ relation_def: "Relation type",
2916
+ mcp: "MCP server",
2917
+ api_key: "API key",
2918
+ ssh_key: "SSH key",
2919
+ // An AI service registered on the pod (`intelligenceRegistry`), and a
2920
+ // vault secret: named by the presence words (`SENSITIVE_ACTION_TOKENS`).
2921
+ intelligence_service: "AI service",
2922
+ secret: "Secret",
2923
+ env_variable: "Environment variable",
2924
+ url: "Page",
2925
+ // Humanizing this event domain to "Proactive" loses its subject — the AI is
2926
+ // what's proactive here (an unprompted post/action), not a generic quality.
2927
+ // Ported from event-renderer's local `DOMAIN_NAMES` map, which the vocabulary
2928
+ // consolidation narrowed to grouping-only (see `renderers.tsx`).
2929
+ proactive: "Proactive AI",
2930
+ // Sharing (Sites). A SHARE LINK (a `resource_shares` row with audience
2931
+ // `link`, redeemed into a guest membership) is NOT a `link` — `link` is the
2932
+ // canonical noun of a RELATION (`relation` → `link` in OBJECT_KIND_ALIASES).
2933
+ // Its own key keeps the two apart: `share_link` → "Share link", `link` /
2934
+ // `relation` → "Link". Never alias one to the other.
2935
+ share_link: "Share link",
2936
+ // A person outside the workspace who was given access to one project
2937
+ // (`project_members.role = 'guest'`) — or who filed through a public form.
2938
+ guest: "Guest",
2939
+ // A public form (a `tools` row carrying `metadata.form`, W4) and what a
2940
+ // stranger sends through it. Neither is a registry kind: a form renders as
2941
+ // its tool, a submission as the proposal / record it became.
2942
+ form: "Form",
2943
+ submission: "Submission",
2944
+ // A property DEFINITION (`property_def` → `property` in OBJECT_KIND_ALIASES)
2945
+ // is a "Field" to the person — `retire_field`, "the new field in
2946
+ // `properties[]`" (skills/synap). Without this row it humanized to
2947
+ // "Property" and proposals read `Retire Property "x"`. It keys the alias
2948
+ // TARGET, so `property`, `property_def` and `property_defs` all land here.
2949
+ property: "Field",
2950
+ // A pod `ui-design` (the design canvas kind): the acronym is the one thing
2951
+ // the sentence-caser cannot know, so it humanized to "Ui design".
2952
+ "ui-design": "UI design",
2953
+ // The Project Management `okr` kind ("Make it a goal" names it in the
2954
+ // proposal it files): an acronym again — it humanized to "Okr".
2955
+ okr: "OKR",
2956
+ // One VERB of a capability (`capabilities.verbs[]`, the thing an agent runs
2957
+ // by `verbId`): "Action" names this and only this, everywhere (founder,
2958
+ // 2026-10-30, decision 79f5b7a2). Not a registry kind (a capability's verbs
2959
+ // are not objects of their own), so it is a backend-only noun: the one door
2960
+ // `resolveObjectNoun("verb")` answers, never `TOOL_KIND_LABELS`, which names
2961
+ // the capability ("Capability") a verb belongs to.
2962
+ verb: "Action",
2963
+ // The D3 nouns of making and connecting (founder, 2026-10-31, decision
2964
+ // 985a59a8, plan appendix dd15a7b0 M5). None is a registry kind: each names
2965
+ // an object the registry has no row for, so each is a backend-only noun.
2966
+ // A skill rule, the standing instruction a person writes for agents (D2).
2967
+ // "Automation" is the `automation` kind; the two never share a word.
2968
+ rule: "Rule",
2969
+ // Something you open IN Synap (a built-in surface, a space's own front end:
2970
+ // CRM, Calendar). The outside software holding a grant is the `application`
2971
+ // kind, "Connected app" (N4).
2972
+ app: "App",
2973
+ // A person's link to an outside service (a provider connection): "Account"
2974
+ // (N8), never Connection, Connector or Integration.
2975
+ connection: "Account",
2976
+ // A `profile` of kind `kind` is a "Kind" (N10): Data types, Schema, Profiles
2977
+ // and Structure all retire.
2978
+ profile: "Kind",
2979
+ // A card bound to a kind's slot (a renderer binding) is a "Display" (N2).
2980
+ // Renderer stays an engine word.
2981
+ renderer: "Display",
2982
+ // "Room" is the conversation only; the intake review is a "Review" (DP8,
2983
+ // plan appendix e7308ad5).
2984
+ room: "Room",
2985
+ review: "Review",
2986
+ // One devbox gate job a session ran (`devboxJobs` on the session read,
2987
+ // backend#637): what a person reads as "its test runs", never a job's name
2988
+ // (D-R4). Humanized it read "Test run" in every locale.
2989
+ test_run: "Test run",
2990
+ // A session that coordinates several running sessions (founder decision D5,
2991
+ // plan b38bc224): it reads their rooms, posts one merged plan, and holds
2992
+ // each until the person's yes. A session by kind, but the person names it
2993
+ // by its role ("Start an orchestrator"); `orchestrated_by` is its edge.
2994
+ orchestrator: "Orchestrator"
2995
+ };
2996
+ var OBJECT_NOUNS = OBJECT_NOUN_ROWS;
2997
+ var OBJECT_NOUN_PLURALS = {
2998
+ relation_def: "Relation types",
2999
+ mcp: "MCP servers",
3000
+ api_key: "API keys",
3001
+ ssh_key: "SSH keys",
3002
+ intelligence_service: "AI services",
3003
+ secret: "Secrets",
3004
+ env_variable: "Environment variables",
3005
+ url: "Pages",
3006
+ proactive: "Proactive AIs",
3007
+ share_link: "Share links",
3008
+ guest: "Guests",
3009
+ form: "Forms",
3010
+ submission: "Submissions",
3011
+ property: "Fields",
3012
+ "ui-design": "UI designs",
3013
+ okr: "OKRs",
3014
+ verb: "Actions",
3015
+ rule: "Rules",
3016
+ app: "Apps",
3017
+ connection: "Accounts",
3018
+ profile: "Kinds",
3019
+ renderer: "Displays",
3020
+ room: "Rooms",
3021
+ review: "Reviews",
3022
+ test_run: "Test runs",
3023
+ orchestrator: "Orchestrators"
3024
+ };
3025
+ var STATUS_LABEL_ROWS = {
3026
+ // proposal lifecycle
3027
+ pending: "Pending",
3028
+ approved: "Approved",
3029
+ auto_approved: "Auto-approved",
3030
+ // "Refused" (GovernanceHistory) vs "Rejected" (ProposalInbox) was a real
3031
+ // user-visible split. "Rejected" wins: it matches the API verb, the
3032
+ // `PROPOSAL_REJECTION_REASONS` taxonomy, and the DB enum value.
3033
+ rejected: "Rejected",
3034
+ denied: "Rejected",
3035
+ // DEFAULT word (plan 8032a127 D6, the founder has not decided; override it
3036
+ // here and in `catalog.fr.ts`): the approval happened, applying it did not.
3037
+ // "Couldn't apply" says what the person sees; "Approval failed" read as if
3038
+ // the approving had failed.
3039
+ approval_failed: "Couldn't apply",
3040
+ // The proposal's effect was taken back after approval. One word for the row's
3041
+ // status chip on every surface (the workbench and the phone both name it).
3042
+ reverted: "Reverted",
3043
+ // A write that landed with no decision in between (a person's own write, or
3044
+ // a legacy row with no receipt) — the `applied` state of a landed object
3045
+ // (`@synap-core/types/landed`), beside `approved` / `auto_approved`.
3046
+ applied: "Applied",
3047
+ // A landed object whose creating proposal the viewer cannot see
3048
+ // (`@synap-core/types/landed` `unknown`): nobody measured the decision FOR
3049
+ // THIS VIEWER, so it names no decision at all.
3050
+ unknown: "Unknown",
3051
+ // NOT a `proposals.status` enum value, and deliberately so: partial approval
3052
+ // ships as per-item dispositions, the row keeps storing `approved`, and the
3053
+ // reviewer's per-item denials live in `data.dispositions`. It IS a real
3054
+ // proposal lifecycle OUTCOME though — "the reviewer kept part of the package
3055
+ // and threw the rest away" — and more than one surface has to name it (the
3056
+ // agent trust grid, the agent dossier scorecard). One word here beats two
3057
+ // hand-written ones there. Do NOT add it to the DB enum on the strength of
3058
+ // this row.
3059
+ partially_approved: "Partially approved",
3060
+ withdrawn: "Withdrawn",
3061
+ expired: "Expired",
3062
+ // run / step lifecycle
3063
+ queued: "Queued",
3064
+ running: "Running",
3065
+ succeeded: "Succeeded",
3066
+ completed: "Completed",
3067
+ failed: "Failed",
3068
+ cancelled: "Cancelled",
3069
+ skipped: "Skipped",
3070
+ // a stage worker's per-target result (`@synap-core/types/workers`): the
3071
+ // worker made this thing. Beside done / failed / skipped above.
3072
+ created: "Created",
3073
+ // W2 calm: a run the reaper found past its window with its session still
3074
+ // owing the person an open slot (automation_runs / playbook_runs). Not
3075
+ // failed, not running — waiting on the human.
3076
+ waiting_on_you: "Waiting on you",
3077
+ // connection sync phases (K2 `SyncPhase`, `connection-sync.ts`). `failed` is
3078
+ // shared with the run lifecycle above. `mapping` is what the user sees happen
3079
+ // — records matched against what is already in Synap — not the mapper's name.
3080
+ fetching: "Fetching",
3081
+ mapping: "Matching",
3082
+ review_ready: "Ready to review",
3083
+ synced: "Synced",
3084
+ // external connection states (capability card `connection.state`). The card's
3085
+ // own token for "no connection" is `missing`, which is too generic for a global
3086
+ // table ("missing" means other things elsewhere), so surfaces map it to
3087
+ // `not_connected` before resolving. `not_connected` is also the sync phase for
3088
+ // a sync with no live connection (`SyncPhase`), so one word covers both.
3089
+ // `disconnected` stays for tokens that already carry it.
3090
+ connected: "Connected",
3091
+ not_connected: "Not connected",
3092
+ disconnected: "Not connected",
3093
+ unavailable: "Not available",
3094
+ // tool demand (`tool_request.tr_status`): `installable` = the catalog now
3095
+ // covers a tool that was wanted. `wanted` needs no row (it humanizes to
3096
+ // "Wanted"); `connected` is shared with the row above.
3097
+ installable: "Ready to install",
3098
+ // capability / composition health (`CompositionHealthStatus` — the System map,
3099
+ // capability cards, the capability dashboard). `degraded` / `failed` /
3100
+ // `unknown` already resolve from the rows above or the humanize fallback, so
3101
+ // only `ok` needs a row: humanizing it yields the weak generic "Ok", while
3102
+ // "Healthy" is the word every surface already used. One row is what lets those
3103
+ // surfaces share ONE resolver instead of three hand-written label maps.
3104
+ ok: "Healthy",
3105
+ // ⚠️ OVERLOADED TOKEN — deliberately rendered as the neutral word.
3106
+ // `stale` means three different things in this product: a session the reaper
3107
+ // gave up on (progress), a sync that is out of date (freshness), and a broken
3108
+ // renderer binding. "Stalled" imposes the progress reading (and is the
3109
+ // pillar-health word of the separate `stalled` token); "Out of date" imposes
3110
+ // the freshness one. Both are wrong somewhere, so this table — which
3111
+ // is GLOBAL and cannot know the domain — stays neutral. A surface that knows
3112
+ // its domain should supply its own word (the data-sync and renderer surfaces
3113
+ // already do) rather than call this resolver.
3114
+ stale: "Stale",
3115
+ // backup health (`readBackupStatus`, @synap/database): the newest backup run
3116
+ // saw a DATA DROP (0 users, or entities more than halved). Humanized: "Suspect",
3117
+ // which says nothing about what is wrong; every backup surface (Relay pod row,
3118
+ // pod-admin, desktop) renders this one word. Only the backup domain emits it.
3119
+ suspect: "Data drop",
3120
+ // generic on/off — surfaces disagreed ("Active/Paused" vs "Enabled/Disabled"
3121
+ // vs "On/Off"). These two are the canonical pair for an enabled flag.
3122
+ enabled: "Enabled",
3123
+ disabled: "Disabled",
3124
+ active: "Active",
3125
+ paused: "Paused",
3126
+ draft: "Draft",
3127
+ archived: "Archived",
3128
+ // subscription lifecycle (control plane `subscription_status`: active ·
3129
+ // trialing · past_due · cancelled · paused). `active` / `paused` /
3130
+ // `cancelled` resolve from the rows above. Humanized, `trialing` read
3131
+ // "Trialing" and `past_due` read "Past due", which hides what the person
3132
+ // must do — the Subscription page already said "Trial" and "Payment failed".
3133
+ trialing: "Trial",
3134
+ past_due: "Payment failed",
3135
+ // session work-state lenses (derived, never stored — a session is "waiting"
3136
+ // because an open `blocked_by` edge points at an open session, "ready" when
3137
+ // none does, "done" when closed). These are lens names over one row set,
3138
+ // not `focus_sessions.status` values; keep them out of the DB enum.
3139
+ ready: "Ready",
3140
+ waiting: "Waiting",
3141
+ blocked: "Blocked",
3142
+ // unit states (`resolveUnitState`) for a wait someone else holds: a person
3143
+ // outside (a client's reply, a signature) or a machine (CI, the merge
3144
+ // queue, a devbox job, a deploy). Derived, never stored.
3145
+ with_them: "With them",
3146
+ on_machine: "On a machine",
3147
+ done: "Done",
3148
+ // an agent- or automation-originated session not yet accepted from triage
3149
+ drafted: "Drafted",
3150
+ // ⚠️ NOT the same idea as `drafted` above, and the two must never be
3151
+ // collapsed. `drafted` waits for a PERSON (has anyone accepted this
3152
+ // suggestion?); `scheduled` waits for a CLOCK (this session starts at a
3153
+ // time). A `focus_sessions.status` value — unlike `drafted`, which is a
3154
+ // triage lens name. It reached users only through the `humanizeToken`
3155
+ // fallback until now; that fallback exists to stop a raw token leaking, not
3156
+ // as an endorsement, so the state is spelled out here.
3157
+ scheduled: "Scheduled",
3158
+ // session EVALUATION verdicts (`session_evaluations.verdict`, @synap-core/types
3159
+ // focus-sessions verdict). `unmeasured` is NOT a failure — nobody could check
3160
+ // it — so it must never read as one; "Not checked" says exactly that.
3161
+ pass: "Passed",
3162
+ fail: "Failed",
3163
+ unmeasured: "Not checked",
3164
+ // session VERDICT STATES — the whole session's grade over its criteria
3165
+ // (`computeSessionVerdict`, `SessionVerdictLike.state`), NOT a single
3166
+ // criterion's verdict above. They reached users through `humanizeToken`
3167
+ // ("Passing" / "Failing" / "Incomplete") until now.
3168
+ //
3169
+ // The words are chosen for work that is STILL IN FLIGHT, which is when this
3170
+ // label is read most: a session is graded while it runs, so "Failing" accused
3171
+ // work-in-progress of having failed when the truth is "not met yet". Each one
3172
+ // names the state of the CONTRACT, not a judgement of the person:
3173
+ // passing — every required criterion is met. "Met" matches the summary
3174
+ // beside it ("All 4 met"), so the two cannot drift apart.
3175
+ // failing — a required criterion has a `fail` verdict. Still recoverable.
3176
+ // incomplete — nothing failed; something has not been checked. "Partly
3177
+ // checked" says exactly that, and never reads as a failure
3178
+ // (the same rule `unmeasured: "Not checked"` follows).
3179
+ passing: "Met",
3180
+ failing: "Not yet met",
3181
+ incomplete: "Partly checked",
3182
+ // session POPULATION lenses (derived, never stored — see
3183
+ // `services/focus-sessions/session-kind.ts`): one `focus_sessions` table
3184
+ // holds a person's units of work, machine executions, and the containers an
3185
+ // agent's writes are filed under. Lens names over one row set, like the
3186
+ // work-state block above — NOT `focus_sessions.status` values, and not to be
3187
+ // added to the DB enum. `run` is spelled out rather than left to humanize so
3188
+ // it cannot drift from the object-kind noun of the same name.
3189
+ work: "Work",
3190
+ run: "Run",
3191
+ receipt: "Receipt",
3192
+ // CAPTURE status — derived by `captures.list` / `captures.get`, never stored
3193
+ // (raw-capture contract §4). Spelled out because humanizing loses the words
3194
+ // that matter: `saved_without_ai` → "Saved without ai", and "Needs answer"
3195
+ // drops who owes it. "Saved without AI" is the one a person must spot.
3196
+ structured: "Structured",
3197
+ saved_without_ai: "Saved without AI",
3198
+ needs_answer: "Needs your answer",
3199
+ // The latest round still holds a suggestion nobody filed or refused.
3200
+ suggested: "Suggested",
3201
+ not_structured: "Not structured",
3202
+ // CONNECTION credential state (`secrets.connection_state`). Humanized it read
3203
+ // "Needs reauth" — jargon for "sign in again".
3204
+ needs_reauth: "Needs sign-in",
3205
+ // SHARING. `published` is `resource_shares.state` (`draft` is shared with the
3206
+ // run of drafts above). `revoked` is a link or publication killed for good
3207
+ // (0276: permanent). `private` / `shared` / `link` / `public` are the SHARE
3208
+ // STATE lenses `resolveShareState` (`@synap-core/types/units`) derives —
3209
+ // never stored. `link` reads "Shared by link" so a chip can never be taken
3210
+ // for the RELATION noun "Link" (`resolveObjectNoun("link")`).
3211
+ published: "Published",
3212
+ revoked: "Revoked",
3213
+ private: "Private",
3214
+ shared: "Shared",
3215
+ link: "Shared by link",
3216
+ public: "Public",
3217
+ // AI AVAILABILITY (`AiAvailabilityKind`, `@synap-core/types/ai-availability`)
3218
+ // — the short state chip. Headlines and CTAs live in that module's copy deck.
3219
+ credits_low: "Low credits",
3220
+ credits_empty: "Out of credits",
3221
+ not_entitled: "No AI plan",
3222
+ suspended: "Suspended",
3223
+ budget_paused: "Paused",
3224
+ provider_issue: "AI issue",
3225
+ service_down: "AI offline",
3226
+ // HOUSE AI reach (`IntelligenceStatusKind`): subscribed, never provisioned.
3227
+ // Humanized it read "Needs provision" — the person's next step is Activate.
3228
+ needs_provision: "Ready to activate",
3229
+ // LIFECYCLE: the pipeline column holding values no declared option names
3230
+ // (`UNCLASSIFIED_STATUS`, `@synap-core/types/lifecycle`). One word on web
3231
+ // and relay — it was "Unclassified" on one and "Not a declared status" on
3232
+ // the other. "No declared status" is true of BOTH things the column holds:
3233
+ // a thing with no status at all, and a value no option declares (homes X2:
3234
+ // "Not a declared status" called an unset status an undeclared value).
3235
+ __unclassified: "No declared status",
3236
+ // ISSUE lifecycle (`issueStatus`, the system `issue` kind): humanized it
3237
+ // read "Wont fix" — no apostrophe. `open` / `investigating` / `fixed`
3238
+ // humanize correctly and need no row.
3239
+ wont_fix: "Won't fix",
3240
+ // A session the person silenced (per-session mute, backend#637): its pushes
3241
+ // stop, its rows stay. The mark on its page and its Mute control.
3242
+ muted: "Muted",
3243
+ // A write receipt's `no_effect` (`hub-protocol/write-receipt.ts`): the
3244
+ // operation COMPLETED and deliberately changed nothing (an acknowledged
3245
+ // no-op door, an idempotent re-apply that matched 0 rows). Not a failure.
3246
+ no_effect: "No change",
3247
+ // A run or step whose effect a GOVERNANCE verdict refused
3248
+ // (`automation_runs.status`, `automation_step_runs.status`): a calm outcome,
3249
+ // not a failure; its unit state is `blocked` on a rule (`units/state.ts`).
3250
+ blocked_by_policy: "Blocked by policy",
3251
+ // A project PILLAR's derived health (`units/pillar-health.ts`), worst
3252
+ // first, and the words of its goal counts (the pillar's bar legend).
3253
+ no_active_goal: "No active goal",
3254
+ stalled: "Stalled",
3255
+ unproven: "Not validated yet",
3256
+ needs_attention: "Needs attention",
3257
+ moving: "Moving",
3258
+ unvalidated_bet: "Not validated",
3259
+ validated: "Validated"
3260
+ };
3261
+ var STATUS_LABELS = STATUS_LABEL_ROWS;
3262
+ var REPORT_SECTION_STATUS_LABELS = {
3263
+ failed: "Did not run",
3264
+ generating: "Writing",
3265
+ skipped: STATUS_LABEL_ROWS.skipped,
3266
+ complete: "Complete",
3267
+ ok: "Complete",
3268
+ passing: STATUS_LABEL_ROWS.passing,
3269
+ failing: STATUS_LABEL_ROWS.failing,
3270
+ incomplete: STATUS_LABEL_ROWS.incomplete
3271
+ };
3272
+ var REPORT_STATUS_LABELS = {
3273
+ generating: "Writing",
3274
+ ready: STATUS_LABEL_ROWS.ready,
3275
+ failed: "Stopped early"
3276
+ };
3277
+ var WAIT_KIND_LABELS = {
3278
+ answer: "Your answer",
3279
+ approval: "Your approval",
3280
+ send: "To send",
3281
+ try_it: "To try",
3282
+ access: "Access",
3283
+ decide: "Your decision",
3284
+ their_reply: "Their reply",
3285
+ their_document: "Their document",
3286
+ signature: "Signature",
3287
+ payment: "Payment",
3288
+ vendor: "Outside party",
3289
+ agent_work: "Agent at work",
3290
+ agent_stopped: "Agent stopped",
3291
+ ci: "CI",
3292
+ // A person reads "tests running", never a job's name (D-R4).
3293
+ devbox_job: "Tests running",
3294
+ merge_queue: "Merge queue",
3295
+ red_main: "Red main",
3296
+ deploy: "Deploy",
3297
+ another_work: "Other work",
3298
+ date: "A date",
3299
+ nobody: "Nobody"
3300
+ };
3301
+ var STEP_RUNNER_KIND_LABELS = {
3302
+ person: "You",
3303
+ ai: "An agent",
3304
+ automatic: "Runs by itself"
3305
+ };
3306
+ var NEED_LABELS = {
3307
+ "code-host": "Code host",
3308
+ "deploy-target": "Deploy target",
3309
+ gate: "Gate",
3310
+ payments: "Payments",
3311
+ messaging: "Messaging",
3312
+ email: "Email",
3313
+ calendar: "Calendar",
3314
+ "file-store": "File store",
3315
+ "media-generation": "Media generation",
3316
+ "social-publishing": "Social publishing",
3317
+ "linkedin-reach": "LinkedIn reach",
3318
+ analytics: "Analytics",
3319
+ compute: "Compute"
3320
+ };
3321
+ var INTENT_LABELS = {
3322
+ search_external: "Search outside sources",
3323
+ find_people: "Find people",
3324
+ enrich_entity: "Enrich records",
3325
+ fetch_record: "Fetch a record",
3326
+ list_records: "List records",
3327
+ send_message: "Send a message",
3328
+ request_connection: "Request a connection",
3329
+ schedule_event: "Schedule an event",
3330
+ manage_file: "Manage files",
3331
+ generate_media: "Generate media",
3332
+ capture_into_pod: "Bring data into the pod",
3333
+ run_external_job: "Run an outside job",
3334
+ connect_account: "Connect an account",
3335
+ publish_post: "Publish a post",
3336
+ delegate_agent_task: "Hand a task to an agent",
3337
+ read_webpage: "Read a web page",
3338
+ search_web: "Search the web",
3339
+ edit_video: "Edit a video",
3340
+ transcribe_media: "Transcribe media",
3341
+ download_media: "Download media",
3342
+ provision_compute: "Start a cloud machine",
3343
+ release_compute: "Stop a cloud machine"
3344
+ };
3345
+ var RUNNER_STATE_LABELS = {
3346
+ busy: "Working",
3347
+ idle: "Idle",
3348
+ needs_permission: "Waiting for your permission",
3349
+ needs_answer: "Waiting for your answer",
3350
+ ended: "Ended"
3351
+ };
3352
+ var BLOCKED_REASON_LABELS = {
3353
+ /** A secret to mint or store. */
3354
+ credential: "Credential missing",
3355
+ /** A governance rule to write. */
3356
+ permission: "Permission missing",
3357
+ /** The tool does not exist. NOT the `capability` object kind. */
3358
+ capability: "Capability missing",
3359
+ /** A rule to change, or to accept. */
3360
+ policy: "Policy block",
3361
+ /** Honestly terminal: a choice only a person can make. */
3362
+ decision: "Human decision",
3363
+ /** Honestly terminal: an action in the world. */
3364
+ physical: "Physical action"
3365
+ };
3366
+ var BLOCKED_REASON_ICONS = {
3367
+ credential: "KeyRound",
3368
+ capability: "Plug",
3369
+ permission: "ShieldAlert",
3370
+ policy: "Scale",
3371
+ decision: "Gavel",
3372
+ physical: "Hand"
3373
+ };
3374
+ var NEEDS_YOU_ITEM_NOUN_ROWS = {
3375
+ decision: ["decision", "decisions"],
3376
+ physical: ["action", "actions"],
3377
+ credential: ["credential", "credentials"],
3378
+ permission: ["permission", "permissions"],
3379
+ capability: ["missing tool", "missing tools"],
3380
+ policy: ["policy block", "policy blocks"],
3381
+ ask: ["ask", "asks"],
3382
+ review: ["review", "reviews"],
3383
+ owed: ["thing", "things"],
3384
+ /** The Inbox's routine bucket — a batch of reversible routine changes (`needsYouBuckets`). */
3385
+ routine: ["routine change", "routine changes"]
3386
+ };
3387
+ var NEEDS_YOU_ITEM_NOUNS = NEEDS_YOU_ITEM_NOUN_ROWS;
3388
+ var NEEDS_YOU_REASON_ICONS = {
3389
+ ...BLOCKED_REASON_ICONS,
3390
+ /** A question an agent or a capture asks the person. */
3391
+ ask: "MessageCircle",
3392
+ /** A session's work waiting to be looked at and accepted. */
3393
+ review: "Eye",
3394
+ /** Failed work — a run or an automation that broke. */
3395
+ failure: "TriangleAlert",
3396
+ /** An owed slot that recorded no reason. */
3397
+ owed: "CircleDot",
3398
+ /** A goal's verdict owed by its judge or owner (in review, an impossible report). */
3399
+ judgement: "Scale"
3400
+ };
3401
+ var NEEDS_YOU_REASON_LABELS = {
3402
+ ...BLOCKED_REASON_LABELS,
3403
+ decision: "Decision",
3404
+ ask: "Question",
3405
+ review: "Review",
3406
+ failure: "Failed",
3407
+ owed: "Owed",
3408
+ judgement: "Judgement"
3409
+ };
3410
+ var vocabularyEn = buildVocabularyEn({
3411
+ kinds: OBJECT_KINDS,
3412
+ nouns: OBJECT_NOUNS,
3413
+ nounPlurals: OBJECT_NOUN_PLURALS,
3414
+ verbs: ACTION_VERBS,
3415
+ statuses: STATUS_LABELS,
3416
+ needsYouNouns: NEEDS_YOU_ITEM_NOUNS,
3417
+ runnerStates: RUNNER_STATE_LABELS,
3418
+ waitKinds: WAIT_KIND_LABELS,
3419
+ stepRunners: STEP_RUNNER_KIND_LABELS,
3420
+ needs: NEED_LABELS,
3421
+ intents: INTENT_LABELS
3422
+ });
3423
+
3424
+ // ../headless/src/failure-words/read.ts
3425
+ function failedReadTitle(noun) {
3426
+ return `Couldn\u2019t load ${nounInSentence(noun)}`;
3427
+ }
3428
+
3429
+ // ../web/src/spatial-ui/field.tsx
3430
+ var import_react_aria_components = require("react-aria-components");
3431
+
3432
+ // ../web/src/spatial-ui/copy.ts
3433
+ var FIELD_OPTIONAL_MARK = "(optional)";
3434
+
3435
+ // ../web/src/spatial-ui/field.tsx
3436
+ var import_jsx_runtime4 = require("react/jsx-runtime");
3437
+ function SpatialOptionalMark() {
3438
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "synap-spatial-field__optional", children: FIELD_OPTIONAL_MARK });
3439
+ }
3440
+ function FieldLabel({ label, optional }) {
3441
+ return label != null ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_aria_components.Label, { className: "synap-spatial-field__label", children: [
3442
+ label,
3443
+ optional && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
3444
+ " ",
3445
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SpatialOptionalMark, {})
3446
+ ] })
3447
+ ] }) : null;
3448
+ }
3449
+ function FieldFoot({
3450
+ description,
3451
+ errorMessage
3452
+ }) {
3453
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
3454
+ description != null && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_aria_components.Text, { slot: "description", className: "synap-spatial-field__description", children: description }),
3455
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_aria_components.FieldError, { className: "synap-spatial-field__error", "data-field-error": "", children: errorMessage ?? void 0 })
3456
+ ] });
3457
+ }
3458
+
3459
+ // ../web/src/spatial-ui/indicators.tsx
3460
+ var import_jsx_runtime5 = require("react/jsx-runtime");
3461
+ var cx = (...values) => values.filter(Boolean).join(" ");
3462
+ function detectShortcutPlatform() {
3463
+ if (typeof navigator === "undefined") return "other";
3464
+ const nav = navigator;
3465
+ const platform = nav.userAgentData?.platform ?? nav.platform ?? "";
3466
+ return /mac|iphone|ipad|ipod/i.test(platform) ? "mac" : "other";
3467
+ }
3468
+ var ARROWS = [
3469
+ [/\bArrowLeft\b/g, "\u2190", "Left arrow"],
3470
+ [/\bArrowRight\b/g, "\u2192", "Right arrow"],
3471
+ [/\bArrowUp\b/g, "\u2191", "Up arrow"],
3472
+ [/\bArrowDown\b/g, "\u2193", "Down arrow"]
3473
+ ];
3474
+ var MAC_GLYPHS = [
3475
+ [/\b(?:Command|Cmd|Mod|Meta)\b/gi, "\u2318", "Command"],
3476
+ [/\b(?:Control|Ctrl)\b/gi, "\u2303", "Control"],
3477
+ [/\b(?:Option|Alt)\b/gi, "\u2325", "Option"],
3478
+ [/\bShift\b/gi, "\u21E7", "Shift"],
3479
+ [/\b(?:Enter|Return)\b/gi, "\u21B5", "Return"],
3480
+ [/\b(?:Escape|Esc)\b/gi, "\u238B", "Escape"],
3481
+ // Delete BEFORE Backspace: Backspace's spoken form IS "Delete" on a Mac, and
3482
+ // running this rule after it would rewrite that word a second time.
3483
+ [/\bDelete\b/gi, "\u2326", "Forward delete"],
3484
+ [/\bBackspace\b/gi, "\u232B", "Delete"],
3485
+ [/\bTab\b/gi, "\u21E5", "Tab"],
3486
+ ...ARROWS
3487
+ ];
3488
+ function formatShortcut(shortcut, platform) {
3489
+ if (platform === "mac") {
3490
+ let text2 = shortcut;
3491
+ let spoken2 = shortcut;
3492
+ for (const [pattern, glyph, word] of MAC_GLYPHS) {
3493
+ text2 = text2.replace(pattern, glyph);
3494
+ spoken2 = spoken2.replace(pattern, word);
3495
+ }
3496
+ return {
3497
+ text: text2.replace(/\s*\+\s*/g, ""),
3498
+ spoken: spoken2.replace(/\s*\+\s*/g, " ")
3499
+ };
3500
+ }
3501
+ let text = shortcut.replace(/\b(?:Command|Cmd|Mod|Meta)\b/gi, "Ctrl");
3502
+ let spoken = text;
3503
+ for (const [pattern, glyph, word] of ARROWS) {
3504
+ text = text.replace(pattern, glyph);
3505
+ spoken = spoken.replace(pattern, word);
3506
+ }
3507
+ return { text, spoken: spoken.replace(/\s*\+\s*/g, " ") };
3508
+ }
3509
+ function SpatialKeyboardShortcut({
3510
+ shortcut,
3511
+ size = "md",
3512
+ variant = "outlined",
3513
+ platform,
3514
+ className,
3515
+ ...props
3516
+ }) {
3517
+ const { text, spoken } = formatShortcut(
3518
+ shortcut,
3519
+ platform ?? detectShortcutPlatform()
3520
+ );
3521
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3522
+ "kbd",
3523
+ {
3524
+ ...props,
3525
+ "data-size": size,
3526
+ "data-variant": variant,
3527
+ className: cx("synap-spatial-kbd", className),
3528
+ children: [
3529
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { "aria-hidden": "true", children: text }),
3530
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "synap-spatial-kbd__spoken", children: spoken })
3531
+ ]
3532
+ }
3533
+ );
3534
+ }
3535
+
3536
+ // ../web/src/spatial-ui/components.tsx
3537
+ var import_jsx_runtime6 = require("react/jsx-runtime");
3538
+ var cx2 = (...values) => values.filter(Boolean).join(" ");
3539
+ function getSpatialPortalContainer() {
3540
+ if (typeof document === "undefined") return void 0;
3541
+ return document.getElementById("modal-root") ?? document.body;
3542
+ }
3543
+ function iconNode(icon, side) {
3544
+ if (!icon) return null;
3545
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3546
+ "span",
3547
+ {
3548
+ className: `synap-spatial-ui__icon synap-spatial-ui__icon--${side}`,
3549
+ "aria-hidden": "true",
3550
+ children: icon
3551
+ }
3552
+ );
3553
+ }
3554
+ var SpatialTriggerFaceContext = (0, import_react6.createContext)(false);
3555
+ var SpatialTooltipContext = (0, import_react6.createContext)(false);
3556
+ var SpatialButton = (0, import_react6.forwardRef)(
3557
+ function SpatialButton2({
3558
+ variant = "secondary",
3559
+ size = "md",
3560
+ tone = "neutral",
3561
+ leadingIcon,
3562
+ trailingIcon,
3563
+ fullWidth = false,
3564
+ flush,
3565
+ loading = false,
3566
+ children,
3567
+ className,
3568
+ disabled,
3569
+ type = "button",
3570
+ as,
3571
+ ...props
3572
+ }, ref) {
3573
+ const inTrigger = (0, import_react6.useContext)(SpatialTriggerFaceContext);
3574
+ const effectiveVariant = tone === "ai" && variant !== "primary" ? "ai-quiet" : variant;
3575
+ const face = {
3576
+ "data-variant": effectiveVariant,
3577
+ "data-size": size,
3578
+ "data-tone": tone,
3579
+ "data-full-width": fullWidth ? "true" : void 0,
3580
+ "data-flush": flush,
3581
+ className: cx2("synap-spatial-button", className)
3582
+ };
3583
+ const content = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
3584
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "synap-spatial-spinner", "aria-hidden": "true" }) : iconNode(leadingIcon, "leading"),
3585
+ children && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "synap-spatial-button__label", children }),
3586
+ iconNode(trailingIcon, "trailing")
3587
+ ] });
3588
+ if ((as ?? (inTrigger ? "span" : "button")) === "span") {
3589
+ const label = inTrigger ? props["aria-label"] : void 0;
3590
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { ...face, ...label ? { role: "img", "aria-label": label } : {}, children: content });
3591
+ }
3592
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3593
+ "button",
3594
+ {
3595
+ ...props,
3596
+ ref,
3597
+ type,
3598
+ disabled: disabled || loading,
3599
+ ...face,
3600
+ children: content
3601
+ }
3602
+ );
3603
+ }
3604
+ );
3605
+ var SpatialIconButton = (0, import_react6.forwardRef)(function SpatialIconButton2({
3606
+ size = "md",
3607
+ tone = "neutral",
3608
+ active = false,
3609
+ ariaPressed,
3610
+ icon,
3611
+ shortcut,
3612
+ className,
3613
+ type = "button",
3614
+ ...props
3615
+ }, ref) {
3616
+ const inTrigger = (0, import_react6.useContext)(SpatialTriggerFaceContext);
3617
+ const inTooltip = (0, import_react6.useContext)(SpatialTooltipContext);
3618
+ if (inTrigger) {
3619
+ const label2 = props["aria-label"];
3620
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3621
+ "span",
3622
+ {
3623
+ "data-size": size,
3624
+ "data-tone": tone,
3625
+ "data-active": active ? "true" : void 0,
3626
+ className: cx2("synap-spatial-icon-button", className),
3627
+ ...label2 ? { role: "img", "aria-label": label2 } : {},
3628
+ children: iconNode(icon, "leading")
3629
+ }
3630
+ );
3631
+ }
3632
+ const button = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3633
+ "button",
3634
+ {
3635
+ ...props,
3636
+ ref,
3637
+ type,
3638
+ "data-size": size,
3639
+ "data-tone": tone,
3640
+ "data-active": active ? "true" : void 0,
3641
+ "aria-pressed": props["aria-pressed"] ?? ariaPressed,
3642
+ className: cx2("synap-spatial-icon-button", className),
3643
+ children: iconNode(icon, "leading")
3644
+ }
3645
+ );
3646
+ const label = props["aria-label"];
3647
+ if (!label || props.title !== void 0 || inTooltip) return button;
3648
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3649
+ SpatialTooltip,
3650
+ {
3651
+ content: shortcut ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "synap-spatial-tooltip__with-shortcut", children: [
3652
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "aria-hidden": "true", children: label }),
3653
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SpatialKeyboardShortcut, { shortcut, size: "sm", variant: "subtle" })
3654
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "aria-hidden": "true", children: label }),
3655
+ children: button
3656
+ }
3657
+ );
3658
+ });
3659
+ var copyIcon = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
3660
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3661
+ "rect",
3662
+ {
3663
+ x: "5.5",
3664
+ y: "5.5",
3665
+ width: "8",
3666
+ height: "8",
3667
+ rx: "1.5",
3668
+ stroke: "currentColor",
3669
+ strokeWidth: "1.5"
3670
+ }
3671
+ ),
3672
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3673
+ "path",
3674
+ {
3675
+ d: "M3 10.5V4a1.5 1.5 0 0 1 1.5-1.5H10",
3676
+ stroke: "currentColor",
3677
+ strokeWidth: "1.5",
3678
+ strokeLinecap: "round"
3679
+ }
3680
+ )
3681
+ ] });
3682
+ var copiedIcon = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3683
+ "path",
3684
+ {
3685
+ d: "M3 8.5l3 3 7-7",
3686
+ stroke: "currentColor",
3687
+ strokeWidth: "1.5",
3688
+ strokeLinecap: "round",
3689
+ strokeLinejoin: "round"
3690
+ }
3691
+ ) });
3692
+ function SpatialCopyButton({
3693
+ value,
3694
+ label = "Copy",
3695
+ size = "md",
3696
+ tone = "neutral",
3697
+ showLabel = false,
3698
+ className
3699
+ }) {
3700
+ const [copied, setCopied] = (0, import_react6.useState)(false);
3701
+ const timeoutRef = (0, import_react6.useRef)(
3702
+ void 0
3703
+ );
3704
+ (0, import_react6.useEffect)(() => {
3705
+ return () => clearTimeout(timeoutRef.current);
3706
+ }, []);
3707
+ const handleClick = () => {
3708
+ navigator.clipboard.writeText(value).then(
3709
+ () => {
3710
+ setCopied(true);
3711
+ clearTimeout(timeoutRef.current);
3712
+ timeoutRef.current = setTimeout(() => setCopied(false), 1400);
3713
+ },
3714
+ () => {
3715
+ }
3716
+ );
3717
+ };
3718
+ const button = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3719
+ SpatialIconButton,
3720
+ {
3721
+ icon: copied ? copiedIcon : copyIcon,
3722
+ onClick: handleClick,
3723
+ size,
3724
+ tone,
3725
+ "aria-label": label,
3726
+ "data-copied": copied ? "true" : void 0,
3727
+ className: cx2("synap-spatial-copy-button", className)
3728
+ }
3729
+ );
3730
+ if (!showLabel) return button;
3731
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "synap-spatial-copy-button__with-label", "data-size": size, children: [
3732
+ button,
3733
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "synap-spatial-copy-button__label", children: copied ? "Copied" : label })
3734
+ ] });
3735
+ }
3736
+ var wantsFieldFrame = (p) => p.label != null || p.description != null || p.errorMessage != null || Boolean(p.isRequired) || Boolean(p.optional);
3737
+ var fieldText = (value) => value === void 0 ? void 0 : Array.isArray(value) ? value.join(",") : String(value);
3738
+ var SpatialInput = (0, import_react6.forwardRef)(
3739
+ function SpatialInput2({
3740
+ size = "md",
3741
+ tone = "neutral",
3742
+ leadingIcon,
3743
+ trailing,
3744
+ invalid = false,
3745
+ fullWidth = true,
3746
+ label,
3747
+ description,
3748
+ errorMessage,
3749
+ isRequired = false,
3750
+ optional = false,
3751
+ className,
3752
+ ...props
3753
+ }, ref) {
3754
+ const shell = (input, bare) => {
3755
+ const Shell = bare ? "label" : "div";
3756
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
3757
+ Shell,
3758
+ {
3759
+ "data-size": size,
3760
+ "data-tone": tone,
3761
+ "data-invalid": invalid ? "true" : void 0,
3762
+ "data-full-width": fullWidth ? "true" : void 0,
3763
+ className: cx2("synap-spatial-input", bare && className),
3764
+ children: [
3765
+ iconNode(leadingIcon, "leading"),
3766
+ input,
3767
+ trailing && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "synap-spatial-input__trailing", children: trailing })
3768
+ ]
3769
+ }
3770
+ );
3771
+ };
3772
+ if (!wantsFieldFrame({ label, description, errorMessage, isRequired, optional })) {
3773
+ return shell(
3774
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("input", { "aria-invalid": invalid || void 0, ...props, ref }),
3775
+ true
3776
+ );
3777
+ }
3778
+ const {
3779
+ value,
3780
+ defaultValue,
3781
+ name,
3782
+ id,
3783
+ disabled,
3784
+ readOnly,
3785
+ "aria-label": ariaLabel,
3786
+ "aria-labelledby": ariaLabelledBy,
3787
+ ...inputProps
3788
+ } = props;
3789
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
3790
+ import_react_aria_components2.TextField,
3791
+ {
3792
+ className: cx2("synap-spatial-field", className),
3793
+ "data-field-root": "",
3794
+ "data-full-width": fullWidth ? "true" : void 0,
3795
+ value: fieldText(value),
3796
+ defaultValue: fieldText(defaultValue),
3797
+ name,
3798
+ id,
3799
+ isInvalid: invalid || void 0,
3800
+ isRequired,
3801
+ isDisabled: disabled,
3802
+ isReadOnly: readOnly,
3803
+ validationBehavior: "aria",
3804
+ "aria-label": ariaLabel,
3805
+ "aria-labelledby": ariaLabelledBy,
3806
+ children: [
3807
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldLabel, { label, optional }),
3808
+ shell(/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_aria_components2.Input, { ...inputProps, ref }), false),
3809
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldFoot, { description, errorMessage })
3810
+ ]
3811
+ }
3812
+ );
3813
+ }
3814
+ );
3815
+ var SpatialColorSwatch = (0, import_react6.forwardRef)(function SpatialColorSwatch2({
3816
+ color,
3817
+ selected = false,
3818
+ size = "md",
3819
+ label,
3820
+ className,
3821
+ type = "button",
3822
+ style,
3823
+ ...props
3824
+ }, ref) {
3825
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3826
+ "button",
3827
+ {
3828
+ ...props,
3829
+ ref,
3830
+ type,
3831
+ "data-size": size,
3832
+ "data-selected": selected ? "true" : void 0,
3833
+ "aria-label": label,
3834
+ title: label,
3835
+ className: cx2("synap-spatial-color-swatch", className),
3836
+ style: { "--synap-spatial-swatch-color": color, ...style },
3837
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "synap-spatial-color-swatch__fill", "aria-hidden": "true" })
3838
+ }
3839
+ );
3840
+ });
3841
+ function readFailureDetail(error) {
3842
+ if (error instanceof Error) return error.message.trim() || error.name || null;
3843
+ if (typeof error === "string") return error.trim() || null;
3844
+ if (error && typeof error === "object" && typeof error.message === "string") {
3845
+ return error.message.trim() || null;
3846
+ }
3847
+ return null;
3848
+ }
3849
+ function SpatialErrorState({
3850
+ icon,
3851
+ title,
3852
+ noun,
3853
+ description,
3854
+ error,
3855
+ retry,
3856
+ retrying = false,
3857
+ retryLabel = "Try again",
3858
+ density = "comfortable",
3859
+ fill = false,
3860
+ className,
3861
+ ...props
3862
+ }) {
3863
+ const compact = density === "compact";
3864
+ const detail = readFailureDetail(error);
3865
+ if (density === "strip") {
3866
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3867
+ SpatialStaleStrip,
3868
+ {
3869
+ ...props,
3870
+ className,
3871
+ icon,
3872
+ title: noun !== void 0 ? failedReadTitle(noun) : title,
3873
+ retry,
3874
+ retrying,
3875
+ retryLabel,
3876
+ detail
3877
+ }
3878
+ );
3879
+ }
3880
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
3881
+ "div",
3882
+ {
3883
+ ...props,
3884
+ role: "alert",
3885
+ "data-density": compact ? "compact" : void 0,
3886
+ "data-fill": fill && !compact ? "true" : void 0,
3887
+ className: cx2("synap-spatial-error-state", className),
3888
+ children: [
3889
+ icon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "synap-spatial-error-state__orb", "aria-hidden": "true", children: icon }),
3890
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "synap-spatial-error-state__copy", children: [
3891
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("strong", { children: noun !== void 0 ? failedReadTitle(noun) : title }),
3892
+ description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { children: description })
3893
+ ] }),
3894
+ retry && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "synap-spatial-error-state__action", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3895
+ SpatialButton,
3896
+ {
3897
+ variant: "secondary",
3898
+ size: "sm",
3899
+ onClick: retry,
3900
+ loading: retrying,
3901
+ children: retryLabel
3902
+ }
3903
+ ) }),
3904
+ detail && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FailureDetails, { detail })
3905
+ ]
3906
+ }
3907
+ );
3908
+ }
3909
+ var STALE_MARK = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
3910
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3911
+ "path",
3912
+ {
3913
+ d: "M8 2.5 14 13H2L8 2.5Z",
3914
+ stroke: "currentColor",
3915
+ strokeWidth: "1.5",
3916
+ strokeLinejoin: "round"
3917
+ }
3918
+ ),
3919
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M8 6.5v3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
3920
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "8", cy: "11.25", r: "0.8", fill: "currentColor" })
3921
+ ] });
3922
+ function SpatialStaleStrip({
3923
+ icon,
3924
+ title,
3925
+ retry,
3926
+ retrying,
3927
+ retryLabel,
3928
+ detail,
3929
+ className,
3930
+ ...props
3931
+ }) {
3932
+ const [spoken, setSpoken] = (0, import_react6.useState)(false);
3933
+ (0, import_react6.useEffect)(() => setSpoken(true), []);
3934
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
3935
+ "div",
3936
+ {
3937
+ ...props,
3938
+ "data-density": "strip",
3939
+ className: cx2("synap-spatial-error-state", className),
3940
+ children: [
3941
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "synap-spatial-error-state__mark", "aria-hidden": "true", children: icon ?? STALE_MARK }),
3942
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("strong", { role: "status", children: spoken ? title : null }),
3943
+ retry && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3944
+ SpatialButton,
3945
+ {
3946
+ variant: "ghost",
3947
+ size: "xs",
3948
+ "aria-disabled": retrying || void 0,
3949
+ "aria-busy": retrying || void 0,
3950
+ leadingIcon: retrying ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "synap-spatial-spinner" }) : void 0,
3951
+ onClick: retrying ? void 0 : retry,
3952
+ children: retryLabel
3953
+ }
3954
+ ),
3955
+ detail && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FailureDetails, { detail })
3956
+ ]
3957
+ }
3958
+ );
3959
+ }
3960
+ function FailureDetails({ detail }) {
3961
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3962
+ "div",
3963
+ {
3964
+ className: "synap-spatial-accordion synap-spatial-error-state__details",
3965
+ "data-variant": "quiet",
3966
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_aria_components2.Disclosure, { className: "synap-spatial-accordion-item", children: ({ isExpanded }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
3967
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
3968
+ import_react_aria_components2.Button,
3969
+ {
3970
+ slot: "trigger",
3971
+ className: "synap-spatial-accordion-header",
3972
+ "data-open": isExpanded || void 0,
3973
+ children: [
3974
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "synap-spatial-accordion-header__title", children: "Details" }),
3975
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3976
+ "svg",
3977
+ {
3978
+ className: "synap-spatial-accordion-chevron",
3979
+ "data-open": isExpanded || void 0,
3980
+ viewBox: "0 0 16 16",
3981
+ fill: "none",
3982
+ "aria-hidden": "true",
3983
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3984
+ "path",
3985
+ {
3986
+ d: "M4 6l4 4 4-4",
3987
+ stroke: "currentColor",
3988
+ strokeWidth: "1.5",
3989
+ strokeLinecap: "round",
3990
+ strokeLinejoin: "round"
3991
+ }
3992
+ )
3993
+ }
3994
+ )
3995
+ ]
3996
+ }
3997
+ ),
3998
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_aria_components2.DisclosurePanel, { className: "synap-spatial-accordion-panel", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "synap-spatial-accordion-panel__inner synap-spatial-error-state__detail", children: [
3999
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("code", { children: detail }),
4000
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
4001
+ SpatialCopyButton,
4002
+ {
4003
+ value: detail,
4004
+ size: "sm",
4005
+ label: "Copy details"
4006
+ }
4007
+ )
4008
+ ] }) })
4009
+ ] }) })
4010
+ }
4011
+ );
4012
+ }
4013
+ function SpatialSpinner({
4014
+ size = 13,
4015
+ className,
4016
+ style,
4017
+ ...props
4018
+ }) {
4019
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
4020
+ "span",
4021
+ {
4022
+ ...props,
4023
+ "aria-hidden": "true",
4024
+ className: cx2("synap-spatial-spinner", className),
4025
+ style: { width: size, height: size, ...style }
4026
+ }
4027
+ );
4028
+ }
4029
+ var SpatialTextarea = (0, import_react6.forwardRef)(function SpatialTextarea2({
4030
+ size = "md",
4031
+ invalid = false,
4032
+ fullWidth = true,
4033
+ minRows,
4034
+ label,
4035
+ description,
4036
+ errorMessage,
4037
+ isRequired = false,
4038
+ optional = false,
4039
+ className,
4040
+ style,
4041
+ ...props
4042
+ }, ref) {
4043
+ if (!wantsFieldFrame({ label, description, errorMessage, isRequired, optional })) {
4044
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
4045
+ "textarea",
4046
+ {
4047
+ "aria-invalid": invalid || void 0,
4048
+ ...props,
4049
+ ref,
4050
+ "data-size": size,
4051
+ "data-invalid": invalid ? "true" : void 0,
4052
+ "data-full-width": fullWidth ? "true" : void 0,
4053
+ rows: minRows,
4054
+ className: cx2("synap-spatial-textarea", className),
4055
+ style
4056
+ }
4057
+ );
4058
+ }
4059
+ const {
4060
+ value,
4061
+ defaultValue,
4062
+ name,
4063
+ id,
4064
+ disabled,
4065
+ readOnly,
4066
+ "aria-label": ariaLabel,
4067
+ "aria-labelledby": ariaLabelledBy,
4068
+ ...textareaProps
4069
+ } = props;
4070
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
4071
+ import_react_aria_components2.TextField,
4072
+ {
4073
+ className: cx2("synap-spatial-field", className),
4074
+ "data-field-root": "",
4075
+ "data-full-width": fullWidth ? "true" : void 0,
4076
+ value: fieldText(value),
4077
+ defaultValue: fieldText(defaultValue),
4078
+ name,
4079
+ id,
4080
+ isInvalid: invalid || void 0,
4081
+ isRequired,
4082
+ isDisabled: disabled,
4083
+ isReadOnly: readOnly,
4084
+ validationBehavior: "aria",
4085
+ "aria-label": ariaLabel,
4086
+ "aria-labelledby": ariaLabelledBy,
4087
+ children: [
4088
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldLabel, { label, optional }),
4089
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
4090
+ import_react_aria_components2.TextArea,
4091
+ {
4092
+ ...textareaProps,
4093
+ ref,
4094
+ "data-size": size,
4095
+ "data-invalid": invalid ? "true" : void 0,
4096
+ "data-full-width": fullWidth ? "true" : void 0,
4097
+ rows: minRows,
4098
+ className: "synap-spatial-textarea",
4099
+ style
4100
+ }
4101
+ ),
4102
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldFoot, { description, errorMessage })
4103
+ ]
4104
+ }
4105
+ );
4106
+ });
4107
+ function SpatialTooltip({
4108
+ content,
4109
+ placement = "top",
4110
+ delay = 600,
4111
+ portalContainer = getSpatialPortalContainer(),
4112
+ children
4113
+ }) {
4114
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SpatialTooltipContext.Provider, { value: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_aria_components2.TooltipTrigger, { delay, children: [
4115
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_aria_components2.Focusable, { children }),
4116
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
4117
+ import_react_aria_components2.Tooltip,
4118
+ {
4119
+ className: "synap-spatial-tooltip",
4120
+ placement,
4121
+ UNSTABLE_portalContainer: portalContainer,
4122
+ children: content
4123
+ }
4124
+ )
4125
+ ] }) });
4126
+ }
4127
+
4128
+ // src/shared/read-cache.ts
4129
+ var import_react7 = require("react");
4130
+ function createReadCache() {
4131
+ const entries = /* @__PURE__ */ new Map();
4132
+ const listeners = /* @__PURE__ */ new Set();
4133
+ const emit = () => listeners.forEach((l) => l());
4134
+ function start(key, load, previous) {
4135
+ const entry = { status: "loading", data: previous?.data, version: (previous?.version ?? 0) + 1 };
4136
+ entries.set(key, entry);
4137
+ load().then(
4138
+ (data) => {
4139
+ if (entries.get(key) !== entry) return;
4140
+ entries.set(key, { status: "ready", data, version: entry.version + 1 });
4141
+ emit();
4142
+ },
4143
+ (error) => {
4144
+ if (entries.get(key) !== entry) return;
4145
+ entries.set(key, { status: "failed", error, version: entry.version + 1 });
4146
+ emit();
4147
+ }
4148
+ );
4149
+ return entry;
4150
+ }
4151
+ return {
4152
+ read(key, load) {
4153
+ return entries.get(key) ?? start(key, load);
4154
+ },
4155
+ refetch(key, load) {
4156
+ start(key, load, entries.get(key));
4157
+ emit();
4158
+ },
4159
+ subscribe(listener) {
4160
+ listeners.add(listener);
4161
+ return () => listeners.delete(listener);
4162
+ }
4163
+ };
4164
+ }
4165
+ var IDLE = { status: "ready", data: void 0, version: 0 };
4166
+ function useRead(cache, key, load) {
4167
+ const subscribe = (0, import_react7.useCallback)((l) => cache.subscribe(l), [cache]);
4168
+ const entry = (0, import_react7.useSyncExternalStore)(
4169
+ subscribe,
4170
+ () => key === null ? IDLE : cache.read(key, load),
4171
+ () => key === null ? IDLE : cache.read(key, load)
4172
+ );
4173
+ const refetch = (0, import_react7.useCallback)(() => {
4174
+ if (key !== null) cache.refetch(key, load);
4175
+ }, [cache, key, load]);
4176
+ return { entry, refetch };
4177
+ }
4178
+
4179
+ // src/whiteboard/adapter-source.ts
4180
+ var import_react8 = require("react");
4181
+
4182
+ // src/whiteboard/types.ts
4183
+ var BoardReadError = class extends Error {
4184
+ error;
4185
+ constructor(error) {
4186
+ super(`Synap board read failed: ${error.code}${error.status ? ` (${error.status})` : ""}`);
4187
+ this.name = "BoardReadError";
4188
+ this.error = error;
4189
+ }
4190
+ };
4191
+
4192
+ // src/whiteboard/adapter-source.ts
4193
+ var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
4194
+ var TICKET_MARGIN_MS = 5e3;
4195
+ function ticketHandshake(ticket) {
4196
+ return { userId: ticket.userId, token: ticket.ticket };
4197
+ }
4198
+ function failureOf(error) {
4199
+ if (error instanceof BoardReadError) return { code: error.error.code, status: error.error.status };
4200
+ return { code: "unreachable", status: null };
4201
+ }
4202
+ function usable(ticket, now) {
4203
+ const expires = Date.parse(ticket.expiresAt);
4204
+ return Number.isFinite(expires) && expires - now > TICKET_MARGIN_MS;
4205
+ }
4206
+ function adapterSource(adapter, cache) {
4207
+ function useRoomConnection(documentId, options) {
4208
+ const { serverUrl, enabled } = options;
4209
+ const [state, setState] = (0, import_react8.useState)({ documentId, url: null, failure: null });
4210
+ const [asked, setAsked] = (0, import_react8.useState)(0);
4211
+ const spare = (0, import_react8.useRef)(null);
4212
+ const ask = enabled && !!documentId && serverUrl !== null;
4213
+ (0, import_react8.useEffect)(() => {
4214
+ if (!ask) return;
4215
+ let live = true;
4216
+ spare.current = null;
4217
+ setState({ documentId, url: null, failure: null });
4218
+ adapter.roomTicket(documentId).then(
4219
+ (ticket) => {
4220
+ if (!live) return;
4221
+ spare.current = ticket;
4222
+ setState({ documentId, url: serverUrl ?? ticket.url, failure: null });
4223
+ },
4224
+ (error) => {
4225
+ if (live) setState({ documentId, url: null, failure: failureOf(error) });
4226
+ }
4227
+ );
4228
+ return () => {
4229
+ live = false;
4230
+ };
4231
+ }, [ask, documentId, serverUrl, asked]);
4232
+ const handshake = (0, import_react8.useCallback)(
4233
+ () => (send) => {
4234
+ const kept = spare.current;
4235
+ spare.current = null;
4236
+ if (kept && usable(kept, Date.now())) {
4237
+ send(ticketHandshake(kept));
4238
+ return;
4239
+ }
4240
+ adapter.roomTicket(documentId).then(
4241
+ (ticket) => send(ticketHandshake(ticket)),
4242
+ (error) => {
4243
+ setState((s) => ({ ...s, failure: failureOf(error) }));
4244
+ send({});
4245
+ }
4246
+ );
4247
+ },
4248
+ [documentId]
4249
+ );
4250
+ const retry = (0, import_react8.useCallback)(() => setAsked((n) => n + 1), []);
4251
+ const current = state.documentId === documentId ? state : { documentId, url: null, failure: null };
4252
+ const target = serverUrl === null ? { kind: "offline" } : current.url ? { kind: "online", url: current.url } : current.failure ? { kind: "unavailable" } : { kind: "pending" };
4253
+ const failure = current.failure;
4254
+ return (0, import_react8.useMemo)(
4255
+ () => ({ target, handshake, failure, retry }),
4256
+ // `target` is rebuilt every render; its kind and url are what it says.
4257
+ // eslint-disable-next-line react-hooks/exhaustive-deps
4258
+ [target.kind, current.url, failure, handshake, retry]
4259
+ );
4260
+ }
4261
+ function useEntityCard(id, options) {
4262
+ const ask = options.enabled && UUID_RE.test(id);
4263
+ const load = (0, import_react8.useCallback)(() => adapter.getEntity(id), [id]);
4264
+ const { entry, refetch } = useRead(cache, ask ? `entity:${id}` : null, load);
4265
+ const entity = entry.status === "ready" ? entry.data ?? null : null;
4266
+ return {
4267
+ entity,
4268
+ isLoading: entry.status === "loading",
4269
+ error: entry.status === "failed" ? entry.error : null,
4270
+ refetch
4271
+ };
4272
+ }
4273
+ return { useRoomConnection, useEntityCard };
4274
+ }
4275
+
4276
+ // src/whiteboard/provider.tsx
4277
+ var import_jsx_runtime7 = require("react/jsx-runtime");
4278
+ function BoardDataProvider({ adapter, children }) {
4279
+ const source = (0, import_react9.useMemo)(() => adapterSource(adapter, createReadCache()), [adapter]);
4280
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(BoardDataContext.Provider, { value: source, children });
4281
+ }
4282
+
4283
+ // src/whiteboard/SynapBoard.tsx
4284
+ var import_react11 = require("react");
4285
+ var import_tldraw6 = require("@tldraw/tldraw");
4286
+
4287
+ // src/whiteboard/shapes.tsx
4288
+ var import_react10 = require("react");
4289
+ var import_tldraw5 = require("@tldraw/tldraw");
4290
+
4291
+ // src/whiteboard/copy.ts
4292
+ var BOARD_COPY = {
4293
+ opening: "Opening the board\u2026",
4294
+ retry: "Try again",
4295
+ /** The room could not be opened: by `BoardError.code`, then the default. */
4296
+ roomFailed: {
4297
+ unauthorized: "Your connection to the pod has ended. Connect again, then open the board.",
4298
+ expired: "Your connection to the pod has ended. Connect again, then open the board.",
4299
+ forbidden: "This app's connection can't open live boards.",
4300
+ not_found: "This board doesn't exist, or isn't shared with you.",
4301
+ default: "The board's live room couldn't be opened, so its content can't be shown."
4302
+ },
4303
+ unavailable: "Nothing here knows where your pod's live server is, so the board's content can't be loaded.",
4304
+ loadFailed: "Your saved board is safe: nothing was changed. If it's open in another tab or window, close that first, then try again.",
4305
+ readOnly: "View only",
4306
+ placeholder: "Opens in Synap",
4307
+ cardFailed: "Couldn\u2019t read this card.",
4308
+ noProvider: "<SynapBoard> needs a <BoardDataProvider adapter={\u2026}> above it.",
4309
+ noun: "this board"
4310
+ };
4311
+ function roomFailedWords(code) {
4312
+ return BOARD_COPY.roomFailed[code] ?? BOARD_COPY.roomFailed.default;
4313
+ }
4314
+
4315
+ // src/whiteboard/shapes.tsx
4316
+ var import_jsx_runtime8 = require("react/jsx-runtime");
4317
+ var APP_ENTITY_CARD_SIZE = { w: 240, h: 160 };
4318
+ function cardTarget(shape) {
4319
+ if (shape.type !== "entityCard") return null;
4320
+ const id = shape.props.entityId;
4321
+ if (typeof id !== "string" || !id) return null;
4322
+ const kind = typeof shape.props.entityType === "string" && shape.props.entityType ? shape.props.entityType : "entity";
4323
+ return { id, kind };
4324
+ }
4325
+ function AppEntityCard({ shape }) {
4326
+ const source = (0, import_react10.useContext)(BoardDataContext);
4327
+ if (!source) throw new Error(BOARD_COPY.noProvider);
4328
+ const { entityId, title, entityType } = shape.props;
4329
+ const read = source.useEntityCard(entityId, { enabled: !!entityId });
4330
+ const shownTitle = read.entity?.title || title || BOARD_COPY.placeholder;
4331
+ const kind = read.entity?.profileSlug ?? entityType;
4332
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
4333
+ import_tldraw5.HTMLContainer,
4334
+ {
4335
+ className: "synap-board__card",
4336
+ "data-failed": read.error ? "" : void 0,
4337
+ style: { width: shape.props.w, height: shape.props.h },
4338
+ children: [
4339
+ kind ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "synap-board__card-kind", children: kind }) : null,
4340
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "synap-board__card-title", children: shownTitle }),
4341
+ read.entity?.status ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "synap-board__card-status", children: read.entity.status }) : null,
4342
+ read.error ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "synap-board__card-failed", role: "status", children: BOARD_COPY.cardFailed }) : null
4343
+ ]
4344
+ }
4345
+ );
4346
+ }
4347
+ var AppEntityCardShapeUtil = class extends import_tldraw5.BaseBoxShapeUtil {
4348
+ static type = "entityCard";
4349
+ // As the desktop's: no props validator, so no key may hold `undefined`.
4350
+ getDefaultProps() {
4351
+ return {
4352
+ w: APP_ENTITY_CARD_SIZE.w,
4353
+ h: APP_ENTITY_CARD_SIZE.h,
4354
+ entityId: "",
4355
+ entityType: "task",
4356
+ profileId: null,
4357
+ title: "New Card",
4358
+ properties: {},
4359
+ progress: 0
4360
+ };
4361
+ }
4362
+ getGeometry(shape) {
4363
+ return new import_tldraw5.Rectangle2d({ width: shape.props.w, height: shape.props.h, isFilled: true });
4364
+ }
4365
+ component(shape) {
4366
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AppEntityCard, { shape });
4367
+ }
4368
+ indicator(shape) {
4369
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("rect", { width: shape.props.w, height: shape.props.h, rx: 12 });
4370
+ }
4371
+ canEdit = () => false;
4372
+ };
4373
+ function placeholderUtil(type) {
4374
+ return class AppPlaceholderShapeUtil extends import_tldraw5.BaseBoxShapeUtil {
4375
+ static type = type;
4376
+ getDefaultProps() {
4377
+ return { w: 300, h: 200 };
4378
+ }
4379
+ getGeometry(shape) {
4380
+ return new import_tldraw5.Rectangle2d({ width: shape.props.w, height: shape.props.h, isFilled: true });
4381
+ }
4382
+ component(shape) {
4383
+ const title = typeof shape.props.title === "string" ? shape.props.title : "";
4384
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_tldraw5.HTMLContainer, { className: "synap-board__placeholder", "data-shape-type": type, style: { width: shape.props.w, height: shape.props.h }, children: [
4385
+ title ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "synap-board__card-title", children: title }) : null,
4386
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "synap-board__card-kind", children: BOARD_COPY.placeholder })
4387
+ ] });
4388
+ }
4389
+ indicator(shape) {
4390
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("rect", { width: shape.props.w, height: shape.props.h, rx: 12 });
4391
+ }
4392
+ canEdit = () => false;
4393
+ };
4394
+ }
4395
+ var AppViewShapeUtil = placeholderUtil("view");
4396
+ var AppCellShapeUtil = placeholderUtil("cell");
4397
+ var AppArtboardShapeUtil = placeholderUtil("artboard");
4398
+ var APP_SHAPE_UTILS = [
4399
+ AppEntityCardShapeUtil,
4400
+ AppViewShapeUtil,
4401
+ AppCellShapeUtil,
4402
+ AppArtboardShapeUtil,
4403
+ StickyShapeUtil,
4404
+ FrameShapeUtil
4405
+ ];
4406
+
4407
+ // src/whiteboard/SynapBoard.tsx
4408
+ var import_jsx_runtime9 = require("react/jsx-runtime");
4409
+ var CURSOR_HUES = ["blue", "green", "yellow", "red", "violet", "light-red", "light-blue", "light-green"];
4410
+ var LOCAL_ID_KEY = "synap_collab_id";
4411
+ function anonymousUser() {
4412
+ let id = null;
4413
+ try {
4414
+ id = localStorage.getItem(LOCAL_ID_KEY);
4415
+ if (!id) {
4416
+ id = crypto.randomUUID();
4417
+ localStorage.setItem(LOCAL_ID_KEY, id);
4418
+ }
4419
+ } catch {
4420
+ id ??= `anon-${Math.random().toString(36).slice(2, 10)}`;
4421
+ }
4422
+ return { id, name: "You", color: import_tldraw6.DefaultColorThemePalette.lightMode[CURSOR_HUES[id.charCodeAt(0) % CURSOR_HUES.length]].solid };
4423
+ }
4424
+ function SynapBoard({ documentId, user, licenseKey, readOnly = false, onObjectClick, className }) {
4425
+ const me = (0, import_react11.useMemo)(() => user ?? anonymousUser(), [user?.id, user?.name, user?.color]);
4426
+ const [editor, setEditor] = (0, import_react11.useState)(null);
4427
+ const room = useWhiteboardCollaboration(documentId, {
4428
+ user: me,
4429
+ shapeUtils: APP_SHAPE_UTILS,
4430
+ enabled: !!documentId
4431
+ });
4432
+ const { store, status, readOnly: roomReadOnly, loadFailed, retry, roomFailure } = room;
4433
+ (0, import_react11.useEffect)(() => {
4434
+ if (!editor) return;
4435
+ const locked = boardReadOnlyFor({ status, roomReadOnly });
4436
+ if (readOnly) editor.updateInstanceState({ isReadonly: true });
4437
+ else if (locked !== void 0) editor.updateInstanceState({ isReadonly: locked });
4438
+ }, [editor, status, roomReadOnly, readOnly]);
4439
+ (0, import_react11.useEffect)(() => editor ? installReadonlyToolGuard(editor) : void 0, [editor]);
4440
+ (0, import_react11.useEffect)(() => {
4441
+ if (!editor || !onObjectClick) return;
4442
+ const onEvent = (info) => {
4443
+ if (info.type !== "click" || info.name !== "double_click" || info.phase !== "up") return;
4444
+ if (info.target !== "shape") return;
4445
+ const target = cardTarget(info.shape);
4446
+ if (target) onObjectClick(target.id, target.kind);
4447
+ };
4448
+ editor.on("event", onEvent);
4449
+ return () => {
4450
+ editor.off("event", onEvent);
4451
+ };
4452
+ }, [editor, onObjectClick]);
4453
+ const rootClass = ["synap-board", className].filter(Boolean).join(" ");
4454
+ if (roomFailure && !store) {
4455
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: rootClass, "data-state": "failed", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SpatialErrorState, { fill: true, noun: BOARD_COPY.noun, description: roomFailedWords(roomFailure.code), retry }) });
4456
+ }
4457
+ if (status === "unavailable") {
4458
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: rootClass, "data-state": "failed", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SpatialErrorState, { fill: true, noun: BOARD_COPY.noun, description: BOARD_COPY.unavailable, retry }) });
4459
+ }
4460
+ if (loadFailed) {
4461
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: rootClass, "data-state": "failed", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SpatialErrorState, { fill: true, noun: BOARD_COPY.noun, description: BOARD_COPY.loadFailed, retry }) });
4462
+ }
4463
+ if (!store) {
4464
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: rootClass, "data-state": "opening", children: [
4465
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SpatialSpinner, { size: 28 }),
4466
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "synap-board__note", children: BOARD_COPY.opening })
4467
+ ] });
4468
+ }
4469
+ const viewOnly = readOnly || roomReadOnly;
4470
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: rootClass, "data-state": viewOnly ? "read-only" : "live", children: [
4471
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4472
+ import_tldraw6.Tldraw,
4473
+ {
4474
+ store,
4475
+ shapeUtils: APP_SHAPE_UTILS,
4476
+ licenseKey,
4477
+ onMount: (mounted) => {
4478
+ setEditor(mounted);
4479
+ if (status !== "ready" && status !== "offline") mounted.updateInstanceState({ isReadonly: true });
4480
+ }
4481
+ },
4482
+ documentId
4483
+ ),
4484
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CollabStatusChip, { collabStatus: status }),
4485
+ viewOnly || roomFailure ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "synap-board__banner", role: "status", children: roomFailure ? roomFailedWords(roomFailure.code) : BOARD_COPY.readOnly }) : null
4486
+ ] });
4487
+ }
4488
+
4489
+ // src/whiteboard/http-adapter.ts
4490
+ function errorOf(body, status) {
4491
+ const e = body?.error;
4492
+ return {
4493
+ code: typeof e?.code === "string" ? e.code : "server",
4494
+ // The route's own `status` wins, null included (nothing answered: the SDK refused).
4495
+ status: e && "status" in e ? typeof e.status === "number" ? e.status : null : status,
4496
+ ...typeof e?.detail === "string" ? { detail: e.detail } : {}
4497
+ };
4498
+ }
4499
+ function createHttpBoardAdapter(options = {}) {
4500
+ const base = (options.basePath ?? "/api/synap/board").replace(/\/+$/, "");
4501
+ const doFetch = () => options.fetch ?? fetch;
4502
+ async function call(method, path, payload) {
4503
+ let res;
4504
+ try {
4505
+ res = await doFetch()(`${base}${path}`, {
4506
+ method,
4507
+ credentials: "same-origin",
4508
+ headers: payload === void 0 ? { accept: "application/json" } : { accept: "application/json", "content-type": "application/json" },
4509
+ ...payload === void 0 ? {} : { body: JSON.stringify(payload) }
4510
+ });
4511
+ } catch (err) {
4512
+ throw new BoardReadError({ code: "unreachable", status: null, detail: err instanceof Error ? err.message : String(err) });
4513
+ }
4514
+ let body = null;
4515
+ try {
4516
+ body = await res.json();
4517
+ } catch {
4518
+ body = null;
4519
+ }
4520
+ const b = body;
4521
+ if (res.status !== 200 || b?.ok !== true || b.data === void 0) throw new BoardReadError(errorOf(body, res.status));
4522
+ return b.data;
4523
+ }
4524
+ return {
4525
+ roomTicket: (documentId) => call("POST", "/room-ticket", { documentId }),
4526
+ getEntity: (id) => call("GET", `/entities/${encodeURIComponent(id)}`)
4527
+ };
4528
+ }
4529
+
4530
+ // src/whiteboard/index.ts
4531
+ var BoardDataProvider2 = BoardDataProvider;
4532
+ var SynapBoard2 = SynapBoard;
4533
+ var createHttpBoardAdapter2 = createHttpBoardAdapter;
4534
+ // Annotate the CommonJS export names for ESM import in node:
4535
+ 0 && (module.exports = {
4536
+ BoardDataProvider,
4537
+ BoardReadError,
4538
+ SynapBoard,
4539
+ createHttpBoardAdapter
4540
+ });