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