@crossworks/client-types 0.232.362 → 0.232.365

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.362",
3
+ "version": "0.232.365",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
package/src/app-nav.ts CHANGED
@@ -29,6 +29,7 @@ export const APP_TINTS = [
29
29
  'lime',
30
30
  'green',
31
31
  'teal',
32
+ 'cyan',
32
33
  'sky',
33
34
  'blue',
34
35
  'indigo',
package/src/dto/access.ts CHANGED
@@ -26,7 +26,8 @@ export type AccessLinkView = {
26
26
  token: string;
27
27
  path: string;
28
28
  mode: ShareMode;
29
- /** Page links only: sub-pages are shared with it. */
29
+ /** DEPRECATED (folder phase 7): a page link no longer shares sub-pages
30
+ * (pages do not nest); always false. Kept for older clients. */
30
31
  cascade: boolean;
31
32
  };
32
33
 
@@ -52,7 +53,8 @@ export type AccessNodeView = {
52
53
  * contents, which keep their own levels. */
53
54
  closure: AccessItemView[];
54
55
  share: AccessLinkView | null;
55
- /** Descendant pages (pages only; 0 otherwise). */
56
+ /** DEPRECATED (folder phase 7): pages do not nest, so always 0. Kept for
57
+ * older clients, which showed "Include sub-pages" above 0. */
56
58
  childCount: number;
57
59
  /** Only workspace kinds go below admin (tasks, events, … are admin only). */
58
60
  canLower: boolean;
package/src/dto/client.ts CHANGED
@@ -61,7 +61,7 @@ export type ClientSharedPage = {
61
61
  * a mention chip or a link names "Private item" and points nowhere, an
62
62
  * embed of such an item is left out. */
63
63
  export type ClientSharedItem =
64
- | (ClientSharedRow & { type: 'page'; doc: unknown })
64
+ | (ClientSharedRow & { type: 'page'; doc: unknown; folderId?: string | null })
65
65
  | (ClientSharedRow & { type: 'note'; content: string })
66
66
  | (ClientSharedRow & { type: 'table'; table: ClientSharedTable })
67
67
  | (ClientSharedRow & { type: 'draw' })
@@ -342,7 +342,7 @@ export type ClientSpaceRefusedReason =
342
342
  * current version). A file's bytes: /api/client/files/:id while the brain
343
343
  * file still holds the bytes accepted (`changedByAdmin` otherwise). */
344
344
  export type ClientAcceptedItem =
345
- | (ClientAcceptedBase & { type: 'page'; doc: unknown })
345
+ | (ClientAcceptedBase & { type: 'page'; doc: unknown; folderId?: string | null })
346
346
  | (ClientAcceptedBase & { type: 'note'; content: string })
347
347
  | (ClientAcceptedBase & {
348
348
  type: 'file';
package/src/dto/member.ts CHANGED
@@ -64,7 +64,7 @@ export type MemberLibraryPage = {
64
64
 
65
65
  /** GET /api/member/library/:id -> { item } */
66
66
  export type MemberLibraryItem =
67
- | (MemberLibraryRow & { type: 'page'; doc: unknown })
67
+ | (MemberLibraryRow & { type: 'page'; doc: unknown; folderId?: string | null })
68
68
  | (MemberLibraryRow & { type: 'note'; content: string })
69
69
  | (MemberLibraryRow & { type: 'table'; table: unknown })
70
70
  | (MemberLibraryRow & { type: 'draw' })
@@ -248,7 +248,7 @@ export type MemberAcceptedPage = {
248
248
  * saved picture) since, so its bytes are not served any more; the metadata
249
249
  * is what was accepted. */
250
250
  export type MemberAcceptedItem =
251
- | (MemberAcceptedRow & { type: 'page'; doc: unknown })
251
+ | (MemberAcceptedRow & { type: 'page'; doc: unknown; folderId?: string | null })
252
252
  | (MemberAcceptedRow & { type: 'note'; content: string })
253
253
  | (MemberAcceptedRow & { type: 'table'; table: unknown })
254
254
  | (MemberAcceptedRow & { type: 'draw'; changedByAdmin?: boolean })
package/src/dto/recall.ts CHANGED
@@ -14,8 +14,6 @@ export type {
14
14
  RecallActorKind,
15
15
  RecallCardDetailDTO,
16
16
  RecallCardWriteDTO,
17
- RecallLintIssueDTO,
18
- RecallLintSeverity,
19
17
  RecallMapCreateDTO,
20
18
  RecallMapCreateResultDTO,
21
19
  RecallMapDetailDTO,
@@ -23,7 +21,6 @@ export type {
23
21
  RecallMapSummaryDTO,
24
22
  RecallNodeDTO,
25
23
  RecallOptionDTO,
26
- RecallPageStateDTO,
27
24
  RecallRevisionDTO,
28
25
  RecallWarningDTO,
29
26
  RecallWriteErrorDTO,
package/src/dto/review.ts CHANGED
@@ -32,8 +32,8 @@ export type AcceptPreview = {
32
32
  closure?: AccessItemView[];
33
33
  /** Where it lands by default (folder plan phase 5): the brain folder the
34
34
  * author filed it in (`folderId` null = the kind's top level), and the
35
- * author's own folders that become brain folders below it. Absent for a
36
- * page (no tree yet) and from brains before the tree. */
35
+ * author's own folders that become brain folders below it. Absent from
36
+ * brains before the tree (pages joined it in folder phase 7). */
37
37
  place?: AcceptPlace;
38
38
  };
39
39
 
@@ -53,6 +53,8 @@ export type AcceptPlace = {
53
53
  * POST /api/admin/space/:id/accept. */
54
54
  export type AcceptRequest = {
55
55
  audience?: AccessLevel;
56
+ /** DEPRECATED (folder phase 7): pages do not nest; ignored. A page lands
57
+ * like every tree kind (`folderId`). */
56
58
  parentPageId?: string | null;
57
59
  folderPath?: string | null;
58
60
  /** Where the item lands (folder plan phase 5): left out, in place; null,
package/src/dto/rows.ts CHANGED
@@ -120,8 +120,10 @@ export type PageWidth = 'narrow' | 'wide';
120
120
 
121
121
  export type PageRow = {
122
122
  id: string;
123
- /** Parent page id, or null for a top-level page. Drives the /pages tree
124
- * and the `childPage` card (Phase 4a sub-pages). */
123
+ /** DEPRECATED (folder phase 7): pages do not nest, so this is always
124
+ * null. A page's place is its folder in the pages tree
125
+ * (`GET /api/tree/pages`; `PageDetail.folderId`). Kept so a client from
126
+ * before the tree, which built a hierarchy from it, still parses the row. */
125
127
  parentId: string | null;
126
128
  title: string;
127
129
  icon: string | null;
@@ -136,17 +138,14 @@ export type PageRow = {
136
138
  };
137
139
 
138
140
  /**
139
- * A row of the /pages LIST response (`GET /api/pages`): a `PageRow` plus where
140
- * it sits in the hierarchy. The list needs this per row because a search or tag
141
- * filter returns only the HITS, so the client cannot derive it from the rows it
142
- * holds: a hit's children and its parent are usually not among them.
141
+ * DEPRECATED (folder phase 7): `GET /api/pages` answers plain `PageRow`s.
142
+ * Pages do not nest, so nothing has sub-pages or a parent page any more; a
143
+ * client from before the tree reads `childCount` as 0 and `parentTitle` as
144
+ * null (both absent from the wire). Where a page sits is the pages tree's
145
+ * (`GET /api/tree/pages`).
143
146
  */
144
147
  export type PageListRow = PageRow & {
145
- /** Direct sub-pages, counted across the whole hierarchy (not just this
146
- * response), so a search hit can offer the way into its sub-pages. */
147
148
  childCount: number;
148
- /** The parent page's title, or null for a top-level page, so a hit can say
149
- * where it lives. */
150
149
  parentTitle: string | null;
151
150
  };
152
151
 
@@ -2,65 +2,37 @@
2
2
  * Wire shapes for the owner Recall API (roadmap tasks 073b322d / 91c93428;
3
3
  * docs/recall.md in the mantle repo). Dates are ISO strings.
4
4
  *
5
- * ── Two kinds of map ───────────────────────────────────────────────────────
6
- * v1 maps are COMPILED from a page tree: the rows are a build artifact, and a
7
- * card's `id` is its source page's node id, so every row is a click-through to
8
- * the page editor. v2 maps are NATIVE: the map is one `recall` item in the
9
- * tree, its cards are rows written directly, and a card's `id` is its own —
10
- * NOT a page. A client must not link a card to the page editor unless the map
11
- * is page-built, which `nodeId === null` tells it.
5
+ * A map is one `recall` item in the tree; its cards are rows written
6
+ * directly, and a card's `id` is its own, NOT a page. (Page-built v1 maps,
7
+ * compiled from a page tree, were retired in R5: the compile report, the
8
+ * page state route and `lastCompileOk` went with them.)
12
9
  *
13
10
  * Plan: "PLAN: Recall v2, its own content type" (dev brain, task 5d6ce06a).
14
- * Everything v2 adds here is additive, so a client written against the v1
15
- * shapes keeps compiling and keeps working against a v1 map.
16
11
  *
17
- * Whether a brain can serve the native path at all is `features.recallV2` from
18
- * `GET /api/shell`, absent on an older brain. Branch the SCREEN on that, not
19
- * on the shapes below.
12
+ * Whether a brain can serve Recall at all is `features.recallV2` from
13
+ * `GET /api/shell`, absent on a brain older than v2. Branch the SCREEN on
14
+ * that, not on the shapes below.
20
15
  */
21
16
 
22
- export type RecallLintSeverity = 'error' | 'warning';
23
-
24
- /** One issue from a map's last compile report (v1), or one warning from a
25
- * native write (v2). */
26
- export interface RecallLintIssueDTO {
27
- severity: RecallLintSeverity;
28
- code: string;
29
- message: string;
30
- /** v1 only: the page the issue is about — the page-editor click-through. */
31
- pageId?: string;
32
- /** v2: the card the warning is about, by slug. A native map has no pages,
33
- * and a write that fails a CHECK is refused rather than reported here —
34
- * so on a native map these are only ever warnings (an orphan card, an
35
- * entry card with no options yet). */
36
- cardSlug?: string;
37
- }
38
-
39
17
  /** One map in the catalog (`GET /api/recall/maps`). Unlike the agent-facing
40
- * `recall_index`, the owner catalog includes never-compiled maps
41
- * (`nodeCount` 0) — a failed compile is exactly what the owner must see. */
18
+ * `recall_index`, the owner catalog includes unpublished maps and maps with
19
+ * no cards yet. */
42
20
  export interface RecallMapSummaryDTO {
43
- /** v1: the map root page's node id — a map IS its root page. v2: the map's
44
- * own id, which equals `nodeId`. Either way this is what the other Recall
21
+ /** The map's id, which equals `nodeId`. This is what the other Recall
45
22
  * routes take as `:id`. */
46
23
  id: string;
47
24
  slug: string;
48
25
  title: string;
49
26
  /** The catalog line: when an agent should enter this map. */
50
27
  enterWhen: string;
51
- /** Card count; 0 = a v1 map that never compiled clean. */
28
+ /** Card count. */
52
29
  nodeCount: number;
53
- /** v1 only: false = the served rows are one rev behind the pages, and
54
- * `report` says why. Always true for a native map, which cannot be stale:
55
- * its rows are the source, and a write that fails its checks is refused. */
56
- lastCompileOk: boolean;
57
- /** v2: the map's `recall` item in the tree. NULL means this map is still
58
- * page-built, which is also the flag for "link its cards to the page
59
- * editor". */
60
- nodeId: string | null;
30
+ /** The map's `recall` item in the tree. (It was null for a page-built map
31
+ * before R5; a brain on R5 or later never serves one.) */
32
+ nodeId: string;
61
33
  /** v2: where the owner filed it, as display crumbs ("Mantle / Fleet");
62
- * null when unsorted or page-built. Derived from the item's folder, so it
63
- * is a label to show, never something to write back. */
34
+ * null when unsorted. Derived from the item's folder, so it is a label to
35
+ * show, never something to write back. */
64
36
  folder: string | null;
65
37
  /** v2: false while a map an AGENT created waits for the owner to publish
66
38
  * it. An unpublished map is invisible to every agent-facing tool, so the
@@ -79,7 +51,7 @@ export interface RecallOptionDTO {
79
51
  /** Slug of the target card, within this map unless `targetMap` is set. */
80
52
  targetSlug: string;
81
53
  /** v2: the target card's id. Draw the graph from this, not from the slug —
82
- * it survives a rename. Absent on a v1-compiled row. */
54
+ * it survives a rename. */
83
55
  targetId?: string;
84
56
  /** v2: a CROSS-MAP option. The slug of another published map, whose entry
85
57
  * card this option leads to. Absent for an ordinary same-map edge. */
@@ -87,8 +59,7 @@ export interface RecallOptionDTO {
87
59
  }
88
60
 
89
61
  export interface RecallNodeDTO {
90
- /** v1: the source page's node id, the page-editor click-through target.
91
- * v2: the card's own id. It is NOT a page — see the file header. */
62
+ /** The card's own id. It is NOT a page — see the file header. */
92
63
  id: string;
93
64
  slug: string;
94
65
  kind: 'index' | 'knowledge' | 'prompt';
@@ -100,8 +71,7 @@ export interface RecallNodeDTO {
100
71
  * megabyte on the wire to render a sidebar. Fetch one card to edit it. */
101
72
  bodyChars: number;
102
73
  options: RecallOptionDTO[];
103
- /** v1: the `pages.version` this row was compiled from. v2: the map version
104
- * the card was written at. */
74
+ /** The map version the card was written at. */
105
75
  sourceVersion: number;
106
76
  /** v2: the card's order in the editor. The list arrives sorted by it. */
107
77
  rank: number;
@@ -128,29 +98,16 @@ export interface RecallCardDetailDTO extends RecallNodeDTO {
128
98
  * write check must read the same constant, or the counter promises room the
129
99
  * write refuses. */
130
100
 
131
- /** `GET /api/recall/maps/:id` — the whole compiled map, index node first,
132
- * plus the last lint report (null when the last compile was clean). */
101
+ /** `GET /api/recall/maps/:id` — the whole map, its cards in rank order
102
+ * (the entry card is rank 0). */
133
103
  export interface RecallMapDetailDTO extends RecallMapSummaryDTO {
134
- report: RecallLintIssueDTO[] | null;
135
104
  nodes: RecallNodeDTO[];
136
105
  }
137
106
 
138
- /** `GET /api/recall/pages/:id` — this page's place in Recall, if any. Backs
139
- * the editor lint badge: the compiler never blocks a commit, so this badge
140
- * is the ONLY place an author learns the map is serving a stale rev.
141
- * `node` is null when the page is named in a failing report but has no
142
- * compiled row yet (a brand-new page that broke the map). */
143
- export interface RecallPageStateDTO {
144
- map: RecallMapSummaryDTO;
145
- node: { slug: string; kind: RecallNodeDTO['kind'] } | null;
146
- report: RecallLintIssueDTO[] | null;
147
- }
148
-
149
107
  // ── v2: the write side ───────────────────────────────────────────────────────
150
108
  // The owner routes the Recall editor calls. Every write carries the map
151
109
  // `version` it was made against; a stale one is refused rather than silently
152
- // overwriting another editor's (or an agent's) change. Nothing here exists on
153
- // a v1 map: the page editor is its authoring surface.
110
+ // overwriting another editor's (or an agent's) change.
154
111
 
155
112
  /** Who made a change. An `agent` row is why the revision log exists: v2 serves
156
113
  * an agent's card edit immediately, with no compile step to hold it back. */