@crossworks/client-types 0.232.57 → 0.232.59

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossworks/client-types",
3
- "version": "0.232.57",
3
+ "version": "0.232.59",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
package/src/index.ts CHANGED
@@ -2406,3 +2406,15 @@ export type StudioWorkerDetail = {
2406
2406
  extractionPrompt: string | null;
2407
2407
  issues: string[];
2408
2408
  };
2409
+
2410
+ // ── Recall (memory maps) ─────────────────────────────────────────────────────
2411
+
2412
+ export type {
2413
+ RecallLintIssueDTO,
2414
+ RecallLintSeverity,
2415
+ RecallMapDetailDTO,
2416
+ RecallMapSummaryDTO,
2417
+ RecallNodeDTO,
2418
+ RecallOptionDTO,
2419
+ RecallPageStateDTO,
2420
+ } from './types/recall';
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Wire shapes for the owner Recall API (`GET /api/recall/maps`,
3
+ * `GET /api/recall/maps/:id`) — the read side of the Recall UI (roadmap
4
+ * tasks 073b322d / 91c93428; docs/recall.md in the mantle repo).
5
+ *
6
+ * These describe the COMPILED serving layer (recall_maps / recall_nodes),
7
+ * not the source pages: node `id` is the source page's node id, so every
8
+ * row is a click-through to the page editor. Dates are ISO strings.
9
+ */
10
+
11
+ export type RecallLintSeverity = 'error' | 'warning';
12
+
13
+ /** One issue from a map's last compile report. */
14
+ export interface RecallLintIssueDTO {
15
+ severity: RecallLintSeverity;
16
+ code: string;
17
+ message: string;
18
+ /** The page the issue is about — the editor click-through target. */
19
+ pageId?: string;
20
+ }
21
+
22
+ /** One map in the catalog (`GET /api/recall/maps`). Unlike the agent-facing
23
+ * `recall_index`, the owner catalog includes never-compiled maps
24
+ * (`nodeCount` 0) — a failed compile is exactly what the owner must see. */
25
+ export interface RecallMapSummaryDTO {
26
+ /** The map root page's node id — a map IS its root page. */
27
+ id: string;
28
+ slug: string;
29
+ title: string;
30
+ /** The catalog line: when an agent should enter this map. */
31
+ enterWhen: string;
32
+ /** Compiled node count; 0 = never compiled clean. */
33
+ nodeCount: number;
34
+ /** False = the served rows are one rev behind the pages; `report` says why. */
35
+ lastCompileOk: boolean;
36
+ updatedAt: string;
37
+ }
38
+
39
+ /** One routing edge as compiled: an affordance ("use when …"), never a command. */
40
+ export interface RecallOptionDTO {
41
+ label: string;
42
+ useWhen: string;
43
+ /** Slug of the target node within the same map. */
44
+ targetSlug: string;
45
+ }
46
+
47
+ export interface RecallNodeDTO {
48
+ /** The source page's node id — the editor click-through target. */
49
+ id: string;
50
+ slug: string;
51
+ kind: 'index' | 'knowledge' | 'prompt';
52
+ title: string;
53
+ /** Prompts: the matcher line; empty elsewhere. */
54
+ useWhen: string;
55
+ /** Rendered-markdown body size (the budget is enforced at compile). */
56
+ bodyChars: number;
57
+ options: RecallOptionDTO[];
58
+ /** `pages.version` this row was compiled from — staleness at a glance. */
59
+ sourceVersion: number;
60
+ updatedAt: string;
61
+ }
62
+
63
+ /** `GET /api/recall/maps/:id` — the whole compiled map, index node first,
64
+ * plus the last lint report (null when the last compile was clean). */
65
+ export interface RecallMapDetailDTO extends RecallMapSummaryDTO {
66
+ report: RecallLintIssueDTO[] | null;
67
+ nodes: RecallNodeDTO[];
68
+ }
69
+
70
+ /** `GET /api/recall/pages/:id` — this page's place in Recall, if any. Backs
71
+ * the editor lint badge: the compiler never blocks a commit, so this badge
72
+ * is the ONLY place an author learns the map is serving a stale rev.
73
+ * `node` is null when the page is named in a failing report but has no
74
+ * compiled row yet (a brand-new page that broke the map). */
75
+ export interface RecallPageStateDTO {
76
+ map: RecallMapSummaryDTO;
77
+ node: { slug: string; kind: RecallNodeDTO['kind'] } | null;
78
+ report: RecallLintIssueDTO[] | null;
79
+ }