@crossworks/client-types 0.300.140 → 0.400.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.
- package/package.json +1 -1
- package/src/display-fonts.ts +13 -0
- package/src/dto/rows.ts +3 -2
- package/src/fresh-appearance.ts +4 -3
- package/src/kind-lists.test.ts +30 -11
- package/src/kinds.test.ts +13 -0
- package/src/kinds.ts +36 -0
package/package.json
CHANGED
package/src/display-fonts.ts
CHANGED
|
@@ -383,6 +383,19 @@ export function fontFamilyValue(key: string | null | undefined): string | null {
|
|
|
383
383
|
return `"${f.family}", ${f.fallback}`;
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
+
/**
|
|
387
|
+
* The always-loaded Inter faces (served from `/Inter/`) and the root font
|
|
388
|
+
* vars that name them, for a document the owner UI does not render: the
|
|
389
|
+
* share and print shell, and the Present canvas frame. Put it AFTER the
|
|
390
|
+
* compiled stylesheet: themes.css declares a fallback `--font-sans` on
|
|
391
|
+
* :root, and this must win the cascade (same specificity, so source order).
|
|
392
|
+
*/
|
|
393
|
+
export const INTER_FONT_FACE_CSS = `
|
|
394
|
+
@font-face{font-family:'InterVariable';font-style:normal;font-weight:100 900;font-display:swap;src:url('/Inter/Inter-VariableFont_opsz,wght.woff2') format('woff2')}
|
|
395
|
+
@font-face{font-family:'InterVariable';font-style:italic;font-weight:100 900;font-display:swap;src:url('/Inter/Inter-Italic-VariableFont_opsz,wght.woff2') format('woff2')}
|
|
396
|
+
:root{--font-sans:'InterVariable',ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif;--font-sans-base:'InterVariable',ui-sans-serif,system-ui,sans-serif}
|
|
397
|
+
`.trim();
|
|
398
|
+
|
|
386
399
|
/**
|
|
387
400
|
* `@font-face` rules for every library face, injected once server-side (root
|
|
388
401
|
* layout + the share/print shell) so the declarations are present on first
|
package/src/dto/rows.ts
CHANGED
|
@@ -347,8 +347,9 @@ export type ProfilePreferences = {
|
|
|
347
347
|
* on their default are omitted, so a default change still reaches brains
|
|
348
348
|
* that never chose. Read via projectBackgrounds, never raw. */
|
|
349
349
|
backgrounds?: string;
|
|
350
|
-
/** The generated whole-surface
|
|
351
|
-
* as a compact JSON spec
|
|
350
|
+
/** The generated whole-surface animated background (Drift: login screen,
|
|
351
|
+
* content area), as a compact JSON spec (v2, or a Neat-era v1 that paints
|
|
352
|
+
* as silk; codec @mantle/content-core/drift-spec). Colours are DERIVED from
|
|
352
353
|
* the live theme tokens client-side, never stored, so the background
|
|
353
354
|
* follows every colour theme and mode. Brain-level for the same reason as
|
|
354
355
|
* backgrounds: it is the look of the product. Never set ⇒ the
|
package/src/fresh-appearance.ts
CHANGED
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
* look (clean-slate, thumbs, Neat off) into every profile row that existed
|
|
13
13
|
* before this release, so an existing brain looks exactly as it did.
|
|
14
14
|
*
|
|
15
|
-
* `neatBackground` is
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* `neatBackground` is a Neat-era v1 spec `{v:1, seed, tone:'auto', speed:2}`.
|
|
16
|
+
* It stays v1 on purpose: the Drift codec (@mantle/content-core/drift-spec)
|
|
17
|
+
* decodes v1 as the silk style, the closest look to what fresh brains showed,
|
|
18
|
+
* and keeping the string means no stored row or test fixture changes.
|
|
18
19
|
*/
|
|
19
20
|
export const FRESH_APPEARANCE = {
|
|
20
21
|
colorTheme: 'jackdaw',
|
package/src/kind-lists.test.ts
CHANGED
|
@@ -173,22 +173,37 @@ export const RECORDED = {
|
|
|
173
173
|
* set in registry order (the code asks membership only, or the order is
|
|
174
174
|
* only how a schema prints). */
|
|
175
175
|
export const CHANGES = {
|
|
176
|
+
// Present (0331), a new kind: every list it joins, at once. Its corpus
|
|
177
|
+
// starts empty, and a save re-extracts only after the quiet period
|
|
178
|
+
// (@mantle/content presents), so joining the extract set is no burst.
|
|
179
|
+
DEFAULT_EXTRACT_TYPES: {
|
|
180
|
+
add: ['present'],
|
|
181
|
+
why: 'Present: a canvas is indexed by its text (title, description, visible text)',
|
|
182
|
+
},
|
|
176
183
|
LANDED_TYPES: {
|
|
177
|
-
add: ['email_thread', 'documentation', 'location'],
|
|
184
|
+
add: ['email_thread', 'documentation', 'location', 'present'],
|
|
178
185
|
why:
|
|
179
186
|
'named fix: the three kinds the extractor reads that the integrity view ' +
|
|
180
|
-
'could not see. Visibility only: the extract set is unchanged.'
|
|
187
|
+
'could not see. Visibility only: the extract set is unchanged. Present ' +
|
|
188
|
+
'joins as it joins the extract set',
|
|
181
189
|
},
|
|
182
190
|
SEARCH_NODES_TYPE_ENUM: {
|
|
183
191
|
order: true,
|
|
184
|
-
|
|
192
|
+
add: ['present'],
|
|
193
|
+
why:
|
|
194
|
+
'the same 17 kinds in registry order: the tool schema prints them so. ' + 'Present makes 18',
|
|
185
195
|
},
|
|
186
196
|
MCP_SEARCH_TYPE_ENUM: {
|
|
187
197
|
order: true,
|
|
198
|
+
add: ['present'],
|
|
188
199
|
why:
|
|
189
200
|
'the same 17 kinds in registry order (`page` after `telegram_message`): ' +
|
|
190
201
|
'the MCP tools/list snapshots (packages/mcp-core/src/__snapshots__) moved ' +
|
|
191
|
-
'by that one line, and every connection hash with it',
|
|
202
|
+
'by that one line, and every connection hash with it. Present makes 18',
|
|
203
|
+
},
|
|
204
|
+
PEER_PICKER_EXCLUDED: {
|
|
205
|
+
add: ['present'],
|
|
206
|
+
why: 'Present: not offered to a linked brain yet (no peer share in P1)',
|
|
192
207
|
},
|
|
193
208
|
} as const satisfies Partial<
|
|
194
209
|
Record<keyof typeof RECORDED, { add?: readonly string[]; order?: true; why: string }>
|
|
@@ -342,9 +357,11 @@ describe('the hand kind lists, derived from the registry', () => {
|
|
|
342
357
|
for (const name of Object.keys(CHANGES) as (keyof typeof CHANGES)[]) {
|
|
343
358
|
const was = RECORDED[name] as readonly string[];
|
|
344
359
|
const now = derived()[name] as readonly string[];
|
|
345
|
-
|
|
360
|
+
const change: { add?: readonly string[]; order?: true } = CHANGES[name];
|
|
361
|
+
if (change.order) {
|
|
346
362
|
expect(now.join(), `${name}: the order moved`).not.toBe(was.join());
|
|
347
|
-
|
|
363
|
+
// The same set, but for the kinds added since (a new kind).
|
|
364
|
+
expect(set(now), `${name}: the same set`).toEqual(set([...was, ...(change.add ?? [])]));
|
|
348
365
|
} else {
|
|
349
366
|
expect(set(now).join(), `${name}: the set moved`).not.toBe(set(was).join());
|
|
350
367
|
}
|
|
@@ -358,15 +375,17 @@ describe('the hand kind lists, derived from the registry', () => {
|
|
|
358
375
|
}
|
|
359
376
|
});
|
|
360
377
|
|
|
361
|
-
it('the search enums keep their
|
|
362
|
-
expect(set(SEARCH_TOOL_KINDS)).toEqual(set(
|
|
363
|
-
expect(set(SEARCH_TOOL_KINDS)).toEqual(set(
|
|
378
|
+
it('the search enums keep their 18 kinds: searchable plus secret (Present made 18)', () => {
|
|
379
|
+
expect(set(SEARCH_TOOL_KINDS)).toEqual(set(expected().SEARCH_NODES_TYPE_ENUM as string[]));
|
|
380
|
+
expect(set(SEARCH_TOOL_KINDS)).toEqual(set(expected().MCP_SEARCH_TYPE_ENUM as string[]));
|
|
381
|
+
expect(SEARCH_TOOL_KINDS).toHaveLength(18);
|
|
364
382
|
const searchable = ITEM_KIND_NAMES.filter((t) => ITEM_KINDS[t].searchable);
|
|
365
383
|
expect(set(SEARCH_TOOL_KINDS)).toEqual(set([...searchable, 'secret']));
|
|
366
384
|
});
|
|
367
385
|
|
|
368
|
-
it('the extract set is not widened
|
|
369
|
-
expect(set(EXTRACT_KINDS)).toEqual(set(
|
|
386
|
+
it('the extract set is not widened but by a CHANGES entry (Present, a new kind)', () => {
|
|
387
|
+
expect(set(EXTRACT_KINDS)).toEqual(set(expected().DEFAULT_EXTRACT_TYPES as string[]));
|
|
388
|
+
expect(CHANGES.DEFAULT_EXTRACT_TYPES.add).toEqual(['present']);
|
|
370
389
|
});
|
|
371
390
|
|
|
372
391
|
it('the accepted kinds are the Library kinds (one list until library goes)', () => {
|
package/src/kinds.test.ts
CHANGED
|
@@ -44,6 +44,8 @@ describe('the kind registry', () => {
|
|
|
44
44
|
'formula',
|
|
45
45
|
'draw',
|
|
46
46
|
'recall',
|
|
47
|
+
// Present (0331), appended.
|
|
48
|
+
'present',
|
|
47
49
|
]);
|
|
48
50
|
});
|
|
49
51
|
|
|
@@ -61,6 +63,7 @@ describe('the kind registry', () => {
|
|
|
61
63
|
'task',
|
|
62
64
|
'event',
|
|
63
65
|
'recall',
|
|
66
|
+
'present',
|
|
64
67
|
]),
|
|
65
68
|
);
|
|
66
69
|
expect(kindsWhere((s) => s.class === 'conversation')).toEqual(['telegram_message']);
|
|
@@ -116,6 +119,8 @@ describe('derived lists, pinned to their value before the registry', () => {
|
|
|
116
119
|
'contacts',
|
|
117
120
|
'secrets',
|
|
118
121
|
'recall',
|
|
122
|
+
// Present, appended: every earlier index kept.
|
|
123
|
+
'present',
|
|
119
124
|
]);
|
|
120
125
|
});
|
|
121
126
|
|
|
@@ -206,6 +211,13 @@ describe('derived lists, pinned to their value before the registry', () => {
|
|
|
206
211
|
shareable: false,
|
|
207
212
|
sorts: ['name', 'updated'],
|
|
208
213
|
},
|
|
214
|
+
present: {
|
|
215
|
+
kind: 'present',
|
|
216
|
+
root: 'present',
|
|
217
|
+
nodeType: 'present',
|
|
218
|
+
shareable: true,
|
|
219
|
+
sorts: ['updated', 'name'],
|
|
220
|
+
},
|
|
209
221
|
});
|
|
210
222
|
});
|
|
211
223
|
|
|
@@ -228,6 +240,7 @@ describe('derived lists, pinned to their value before the registry', () => {
|
|
|
228
240
|
'journal',
|
|
229
241
|
'formula',
|
|
230
242
|
'draw',
|
|
243
|
+
'present',
|
|
231
244
|
]),
|
|
232
245
|
);
|
|
233
246
|
});
|
package/src/kinds.ts
CHANGED
|
@@ -787,6 +787,42 @@ export const ITEM_KINDS = {
|
|
|
787
787
|
documentTitle: false,
|
|
788
788
|
indexed: {},
|
|
789
789
|
},
|
|
790
|
+
// A Present canvas (docs/proposals/canvas-files.md): an agent-written HTML
|
|
791
|
+
// document in the `presents` sidecar. P1 is the workspace only: no public
|
|
792
|
+
// link, contact or peer share, context ref or export yet (P3 adds them).
|
|
793
|
+
// `source` re-extracts, but a save never announces it at once: the
|
|
794
|
+
// quiet-period flush (@mantle/content presents) does, at most once per
|
|
795
|
+
// quiet period, so ten saves in a minute are one model call.
|
|
796
|
+
present: {
|
|
797
|
+
class: 'workspace',
|
|
798
|
+
tree: {
|
|
799
|
+
kind: 'present',
|
|
800
|
+
root: 'present',
|
|
801
|
+
order: 12,
|
|
802
|
+
liveOrder: 12,
|
|
803
|
+
sorts: ['updated', 'name'],
|
|
804
|
+
shareable: true,
|
|
805
|
+
},
|
|
806
|
+
publicLink: false,
|
|
807
|
+
contactShare: false,
|
|
808
|
+
peerShare: false,
|
|
809
|
+
searchable: true,
|
|
810
|
+
route: { content: '/api/presents', v1: null },
|
|
811
|
+
teamHidden: false,
|
|
812
|
+
library: false,
|
|
813
|
+
extract: true,
|
|
814
|
+
corpusMap: false,
|
|
815
|
+
contextRef: false,
|
|
816
|
+
embeds: false,
|
|
817
|
+
mentionTarget: false,
|
|
818
|
+
linkServes: false,
|
|
819
|
+
exportAs: false,
|
|
820
|
+
accepted: false,
|
|
821
|
+
searchTool: true,
|
|
822
|
+
peerPick: false,
|
|
823
|
+
documentTitle: false,
|
|
824
|
+
indexed: { title: 'embed', source: 'extract', look: false, tags: false },
|
|
825
|
+
},
|
|
790
826
|
} as const satisfies Record<string, KindSpec>;
|
|
791
827
|
|
|
792
828
|
type Kinds = typeof ITEM_KINDS;
|