create-nisc 0.8.0 → 0.8.2

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 (163) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +89 -13
  3. package/dist/chunk-B3L4UJDN.js +316 -0
  4. package/dist/chunk-B3L4UJDN.js.map +1 -0
  5. package/dist/cli.js +86 -42
  6. package/dist/cli.js.map +1 -1
  7. package/dist/index.d.ts +61 -6
  8. package/dist/index.js +1 -1
  9. package/package.json +1 -1
  10. package/templates/base/files/src/ui/kit.css +232 -0
  11. package/templates/base/item.json +31 -0
  12. package/templates/{moss-dom → classic/files}/src/app/actions/surfaces/welcome.action.ts +1 -1
  13. package/templates/classic/item.json +32 -0
  14. package/templates/{moss-dom → dom/files}/index.html +1 -1
  15. package/templates/dom/files/src/ui/kit.ts +109 -0
  16. package/templates/{shell-dom → dom/files}/src/ui/registry.ts +2 -2
  17. package/templates/{shell-dom → dom/files}/tsconfig.json +3 -14
  18. package/templates/dom/item.json +24 -0
  19. package/templates/model-first/agents-section.md +42 -0
  20. package/templates/model-first/files/src/app/action-catalog.ts +10 -0
  21. package/templates/model-first/files/src/app/actions/answer/text.action.ts +17 -0
  22. package/templates/model-first/files/src/app/actions/answer/text.layout.ts +3 -0
  23. package/templates/model-first/files/src/app/actions/ask/dock.action.ts +58 -0
  24. package/templates/model-first/files/src/app/actions/ask/dock.layout.ts +59 -0
  25. package/templates/model-first/files/src/app/actions/guide/checklist.action.ts +24 -0
  26. package/templates/model-first/files/src/app/actions/guide/checklist.layout.ts +17 -0
  27. package/templates/model-first/files/src/app/actions/guide/counter.action.ts +22 -0
  28. package/templates/model-first/files/src/app/actions/guide/counter.layout.ts +19 -0
  29. package/templates/model-first/files/src/app/actions/guide/guide.actions.ts +144 -0
  30. package/templates/model-first/files/src/app/actions/guide/guide.layouts.ts +31 -0
  31. package/templates/model-first/files/src/app/actions/guide/quiz.action.ts +25 -0
  32. package/templates/model-first/files/src/app/actions/guide/quiz.layout.ts +33 -0
  33. package/templates/model-first/files/src/app/app.ts +11 -0
  34. package/templates/model-first/files/src/app/arrangements.ts +17 -0
  35. package/templates/model-first/files/src/app/charter/assignments.ts +1 -0
  36. package/templates/model-first/files/src/app/charter/charter.ts +10 -0
  37. package/templates/model-first/files/src/app/screens.ts +87 -0
  38. package/templates/model-first/files/src/app/shell/areas.ts +3 -0
  39. package/templates/model-first/files/src/app/shell/frame.layout.ts +6 -0
  40. package/templates/model-first/files/src/app/shell/shell.ts +20 -0
  41. package/templates/model-first/files/src/app/vex/index.ts +3 -0
  42. package/templates/model-first/files/src/db/schema.ts +3 -0
  43. package/templates/{moss-react → model-first/files}/src/dev/all-checks.ts +3 -2
  44. package/templates/model-first/files/src/dev/artifacts-check.ts +95 -0
  45. package/templates/model-first/files/src/dev/checks.ts +13 -0
  46. package/templates/model-first/files/src/dev/compose-check.ts +191 -0
  47. package/templates/model-first/files/src/dev/guide-check.ts +90 -0
  48. package/templates/model-first/files/src/dev/live-ask.ts +185 -0
  49. package/templates/model-first/files/src/dev/scripted.ts +208 -0
  50. package/templates/{shell-dom → model-first/files}/src/dev/strata.ts +7 -1
  51. package/templates/model-first/files/src/server/boot.ts +24 -0
  52. package/templates/model-first/files/src/server/compose/answer.ts +145 -0
  53. package/templates/model-first/files/src/server/compose/catalog.ts +46 -0
  54. package/templates/model-first/files/src/server/compose/composer.agent.ts +18 -0
  55. package/templates/model-first/files/src/server/compose/history.ts +45 -0
  56. package/templates/model-first/files/src/server/compose/index.ts +170 -0
  57. package/templates/model-first/files/src/server/compose/knowledge.ts +57 -0
  58. package/templates/model-first/files/src/server/compose/layout.ts +70 -0
  59. package/templates/model-first/files/src/server/compose/pick.ts +44 -0
  60. package/templates/model-first/files/src/server/compose/plan.ts +45 -0
  61. package/templates/model-first/files/src/server/compose/record.ts +3 -0
  62. package/templates/model-first/files/src/server/compose/reply.schema.ts +70 -0
  63. package/templates/model-first/files/src/server/compose/screen.ts +40 -0
  64. package/templates/model-first/files/src/server/models/index.ts +35 -0
  65. package/templates/model-first/files/src/server/runs/index.ts +20 -0
  66. package/templates/model-first/item.json +84 -0
  67. package/templates/{moss-dom → moss/files}/README.md +1 -1
  68. package/templates/moss/item.json +40 -0
  69. package/templates/{shell-dom → page/files}/README.md +1 -1
  70. package/templates/page/item.json +37 -0
  71. package/templates/questions.json +5 -0
  72. package/templates/{moss-react → react/files}/index.html +1 -1
  73. package/templates/react/files/src/ui/kit.tsx +221 -0
  74. package/templates/{moss-react → react/files}/src/ui/registry.ts +2 -2
  75. package/templates/react/item.json +31 -0
  76. package/dist/chunk-RU5ATATK.js +0 -174
  77. package/dist/chunk-RU5ATATK.js.map +0 -1
  78. package/templates/moss-dom/package.json +0 -39
  79. package/templates/moss-dom/src/app/actions/surfaces/welcome.layout.ts +0 -25
  80. package/templates/moss-dom/src/ui/kit.css +0 -42
  81. package/templates/moss-dom/src/ui/kit.ts +0 -35
  82. package/templates/moss-dom/src/ui/registry.ts +0 -15
  83. package/templates/moss-dom/tsconfig.json +0 -27
  84. package/templates/moss-react/README.md +0 -15
  85. package/templates/moss-react/nisc.config.ts +0 -11
  86. package/templates/moss-react/package.json +0 -42
  87. package/templates/moss-react/src/app/action-catalog.ts +0 -6
  88. package/templates/moss-react/src/app/actions/surfaces/welcome.action.ts +0 -10
  89. package/templates/moss-react/src/app/app.ts +0 -7
  90. package/templates/moss-react/src/app/charter/assignments.ts +0 -2
  91. package/templates/moss-react/src/app/charter/charter.ts +0 -5
  92. package/templates/moss-react/src/app/shell/frame.layout.ts +0 -3
  93. package/templates/moss-react/src/app/shell/shell.ts +0 -7
  94. package/templates/moss-react/src/dev/artifacts-check.ts +0 -49
  95. package/templates/moss-react/src/dev/strata.ts +0 -21
  96. package/templates/moss-react/src/dev/welcome-check.ts +0 -38
  97. package/templates/moss-react/src/server/boot.ts +0 -6
  98. package/templates/moss-react/src/server/runtime.ts +0 -13
  99. package/templates/moss-react/src/ui/kit.css +0 -42
  100. package/templates/moss-react/src/ui/kit.tsx +0 -39
  101. package/templates/moss-react/strata.lock.json +0 -6
  102. package/templates/shell-dom/index.html +0 -12
  103. package/templates/shell-dom/package.json +0 -35
  104. package/templates/shell-dom/src/app/action-catalog.ts +0 -6
  105. package/templates/shell-dom/src/app/actions/surfaces/welcome.action.ts +0 -10
  106. package/templates/shell-dom/src/app/actions/surfaces/welcome.layout.ts +0 -32
  107. package/templates/shell-dom/src/app/shell/frame.layout.ts +0 -3
  108. package/templates/shell-dom/src/ui/kit.css +0 -42
  109. package/templates/shell-dom/src/ui/kit.ts +0 -35
  110. package/templates/shell-dom/strata.lock.json +0 -6
  111. package/templates/shell-dom/vite.config.ts +0 -5
  112. package/templates/shell-react/README.md +0 -16
  113. package/templates/shell-react/index.html +0 -12
  114. package/templates/shell-react/package.json +0 -40
  115. package/templates/shell-react/src/app/action-catalog.ts +0 -6
  116. package/templates/shell-react/src/app/actions/surfaces/welcome.action.ts +0 -10
  117. package/templates/shell-react/src/app/shell/frame.layout.ts +0 -3
  118. package/templates/shell-react/src/app/shell/shell.ts +0 -7
  119. package/templates/shell-react/src/boot.ts +0 -13
  120. package/templates/shell-react/src/dev/all-checks.ts +0 -17
  121. package/templates/shell-react/src/dev/artifacts-check.ts +0 -45
  122. package/templates/shell-react/src/dev/strata.ts +0 -21
  123. package/templates/shell-react/src/dev/welcome-check.ts +0 -21
  124. package/templates/shell-react/src/ui/kit.css +0 -42
  125. package/templates/shell-react/src/ui/kit.tsx +0 -39
  126. package/templates/shell-react/src/ui/registry.ts +0 -12
  127. package/templates/shell-react/strata.lock.json +0 -6
  128. package/templates/shell-react/tsconfig.json +0 -28
  129. package/templates/shell-react/vite.config.ts +0 -8
  130. /package/templates/{moss-dom → base/files}/strata.lock.json +0 -0
  131. /package/templates/{moss-dom → classic/files}/src/app/action-catalog.ts +0 -0
  132. /package/templates/{moss-dom → classic/files}/src/app/shell/frame.layout.ts +0 -0
  133. /package/templates/{moss-dom → classic/files}/src/dev/strata.ts +0 -0
  134. /package/templates/{moss-react → classic/with/moss}/src/app/actions/surfaces/welcome.layout.ts +0 -0
  135. /package/templates/{moss-dom → classic/with/moss}/src/app/app.ts +0 -0
  136. /package/templates/{moss-dom → classic/with/moss}/src/app/charter/assignments.ts +0 -0
  137. /package/templates/{moss-dom → classic/with/moss}/src/app/charter/charter.ts +0 -0
  138. /package/templates/{moss-dom → classic/with/moss}/src/app/shell/shell.ts +0 -0
  139. /package/templates/{moss-dom → classic/with/moss}/src/dev/all-checks.ts +0 -0
  140. /package/templates/{moss-dom → classic/with/moss}/src/dev/artifacts-check.ts +0 -0
  141. /package/templates/{moss-dom → classic/with/moss}/src/dev/welcome-check.ts +0 -0
  142. /package/templates/{moss-dom → classic/with/moss}/src/server/boot.ts +0 -0
  143. /package/templates/{shell-react → classic/with/page}/src/app/actions/surfaces/welcome.layout.ts +0 -0
  144. /package/templates/{shell-dom → classic/with/page}/src/app/shell/shell.ts +0 -0
  145. /package/templates/{shell-dom → classic/with/page}/src/boot.ts +0 -0
  146. /package/templates/{shell-dom → classic/with/page}/src/dev/all-checks.ts +0 -0
  147. /package/templates/{shell-dom → classic/with/page}/src/dev/artifacts-check.ts +0 -0
  148. /package/templates/{shell-dom → classic/with/page}/src/dev/welcome-check.ts +0 -0
  149. /package/templates/{moss-dom → dom/files}/vite.config.ts +0 -0
  150. /package/templates/{moss-dom → dom/with/moss}/src/main.ts +0 -0
  151. /package/templates/{moss-dom → dom/with/moss}/src/server/document.ts +0 -0
  152. /package/templates/{shell-dom → dom/with/page}/nisc.config.ts +0 -0
  153. /package/templates/{shell-dom → dom/with/page}/src/main.ts +0 -0
  154. /package/templates/{shell-dom → dom/with/page}/src/ui/screen.ts +0 -0
  155. /package/templates/{moss-dom → moss/files}/nisc.config.ts +0 -0
  156. /package/templates/{moss-dom → moss/files}/src/server/runtime.ts +0 -0
  157. /package/templates/{moss-react → react/files}/tsconfig.json +0 -0
  158. /package/templates/{moss-react → react/files}/vite.config.ts +0 -0
  159. /package/templates/{moss-react → react/with/moss}/src/main.tsx +0 -0
  160. /package/templates/{moss-react → react/with/moss}/src/server/document.ts +0 -0
  161. /package/templates/{shell-react → react/with/page}/nisc.config.ts +0 -0
  162. /package/templates/{shell-react → react/with/page}/src/main.tsx +0 -0
  163. /package/templates/{shell-react → react/with/page}/src/ui/screen.tsx +0 -0
@@ -0,0 +1,3 @@
1
+ export const isRecord = (value: unknown): value is Record<string, unknown> => value !== null && typeof value === 'object' && !Array.isArray(value);
2
+
3
+ export const recordOf = (value: unknown): Record<string, unknown> => (isRecord(value) ? value : {});
@@ -0,0 +1,70 @@
1
+ import { z } from 'zod';
2
+ import { AREAS } from '../../app/shell/areas';
3
+ import type { AreaId } from '../../app/shell/areas';
4
+ import { AreaIdSchema } from './layout';
5
+ import type { Said } from './plan';
6
+
7
+ const GridSchema = z
8
+ .object({
9
+ columns: z.number().int().min(1).max(3).describe('How many columns the areas are laid out in.'),
10
+ areas: z
11
+ .array(
12
+ z
13
+ .object({
14
+ name: AreaIdSchema.describe('An area the answer uses.'),
15
+ span: z.number().int().min(1).max(3).nullish().describe('How many of the columns it takes; one when left out.'),
16
+ })
17
+ .strict(),
18
+ )
19
+ .min(1)
20
+ .max(AREAS.length)
21
+ .describe('The areas the answer uses, in the order they are drawn, row by row.'),
22
+ })
23
+ .strict()
24
+ .describe('A layout of your own, only when no arrangement suits, or the message says where things go and no arrangement puts them there.');
25
+
26
+ export const EntrySchema = z
27
+ .object({
28
+ area: AreaIdSchema.describe('The area this entry is for.'),
29
+ keep: AreaIdSchema.nullish().describe('Moves the canvas now in that area here, unchanged. That area is then empty, unless another entry gives it something.'),
30
+ action: z.string().nullish().describe('Puts a canvas here: the id of one of the ACTIONS.'),
31
+ input: z
32
+ .record(z.string(), z.unknown())
33
+ .nullish()
34
+ .describe("What the canvas is opened with, as its action's input schema says. A read's params carry every value it is asked with; a form's fields carry what the message gives for them."),
35
+ intent: z.string().nullish().describe('Why the canvas is there, in a few words.'),
36
+ say: z
37
+ .object({ title: z.string().max(60).describe('A few words.'), text: z.string().max(240).describe('At most two short sentences.') })
38
+ .strict()
39
+ .nullish()
40
+ .describe('Puts words here: only when the message asks about this app itself, or for something no action shows.'),
41
+ drop: z.boolean().nullish().describe('Empties this area.'),
42
+ })
43
+ .strict()
44
+ .describe('What one area holds after the answer: exactly one of keep, action with input and intent, say, or drop.');
45
+
46
+ export const ReplySchema = z
47
+ .object({
48
+ title: z.string().max(40).describe('What the answer is, in at most four words ("The charter", "How reads work"), never the message repeated. It names the answer among the others.'),
49
+ areas: z.array(EntrySchema).max(AREAS.length).nullish().describe('An entry for each area that changes. An area left out stays as it is, unless the arrangement has no such area.'),
50
+ arrangement: z.string().nullish().describe('The id of one of the ARRANGEMENTS, only when the answer needs other room than the one on screen; every area used must be in it.'),
51
+ grid: GridSchema.nullish(),
52
+ screen: z.string().nullish().describe('The id of one of the SCREENS, only when the message asks for that screen as it is; then no areas.'),
53
+ })
54
+ .strict();
55
+
56
+ export type Reply = z.infer<typeof ReplySchema>;
57
+
58
+ export type Entry = { area: AreaId; keep?: AreaId; action?: string; input?: Record<string, unknown>; intent?: string; say?: Said; drop: boolean };
59
+
60
+ export const entryOf = ({ area, keep, action, input, intent, say, drop }: z.infer<typeof EntrySchema>): Entry => ({
61
+ area,
62
+ ...(keep ? { keep } : {}),
63
+ ...(action ? { action } : {}),
64
+ ...(input ? { input } : {}),
65
+ ...(intent ? { intent } : {}),
66
+ ...(say ? { say: { title: say.title.trim(), text: say.text.trim() } } : {}),
67
+ drop: drop === true,
68
+ });
69
+
70
+ export const entriesOf = (reply: Reply): Entry[] => (reply.areas ?? []).map(entryOf);
@@ -0,0 +1,40 @@
1
+ import type { Shell } from '@niscorp/nova';
2
+ import { AREAS } from '../../app/shell/areas';
3
+ import type { AreaId } from '../../app/shell/areas';
4
+ import { inputKeysOf } from './catalog';
5
+ import type { Plan } from './plan';
6
+ import { isRecord } from './record';
7
+
8
+ // The screen as it stands. A canvas's input is what it was opened with, and what the person pressed, ticked or typed
9
+ // into what its input carries; `shows` is the rest of its live data beyond what it was opened with — rows that loaded,
10
+ // a line being typed. A list there is its count and its first rows, ids left out: they are for the database, not for
11
+ // a person.
12
+ export type OpenCanvas = { area: AreaId; action: string; intent: string; input: Record<string, unknown>; shows: Record<string, unknown> };
13
+
14
+ const ROWS = 3;
15
+ const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
16
+
17
+ const withoutIds = (row: unknown): unknown => (isRecord(row) ? Object.fromEntries(Object.entries(row).filter(([, value]) => !(typeof value === 'string' && UUID.test(value)))) : row);
18
+
19
+ const summarised = (value: unknown): unknown => (Array.isArray(value) ? { count: value.length, first: value.slice(0, ROWS).map(withoutIds) } : value);
20
+
21
+ const isEmpty = (value: unknown): boolean => value === null || value === undefined || value === '' || value === false;
22
+
23
+ export const readOpenScreen = (shell: Shell, plan: Plan): OpenCanvas[] =>
24
+ AREAS.flatMap((area) => {
25
+ const placed = plan.canvases[area]?.[0];
26
+ if (placed === undefined) return [];
27
+ const active = shell.getState().canvases[area]?.active;
28
+ const runtime = active === undefined ? undefined : shell.getRuntime(active.id);
29
+ // While an answer streams in, an area can hold a card the plan does not list yet; the plan's card is read as placed.
30
+ if (runtime === undefined || runtime.definition.id !== placed.action) return [{ area, ...placed, shows: {} }];
31
+ const data = runtime.getData();
32
+ const opened = { ...runtime.definition.data, ...placed.input };
33
+ const carried = inputKeysOf(runtime.definition.input);
34
+ const moved = Object.keys(data).filter((key) => JSON.stringify(data[key]) !== JSON.stringify(opened[key]));
35
+ const input = { ...placed.input, ...Object.fromEntries(moved.filter((key) => carried.includes(key)).map((key) => [key, data[key]])) };
36
+ const shows = Object.fromEntries(moved.filter((key) => !carried.includes(key) && !isEmpty(data[key])).map((key) => [key, summarised(data[key])]));
37
+ return [{ area, action: placed.action, intent: placed.intent, input, shows }];
38
+ });
39
+
40
+ export const canvasesStanding = (open: readonly OpenCanvas[]): Plan['canvases'] => Object.fromEntries(open.map(({ area, action, intent, input }) => [area, [{ action, input, intent }]]));
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ import { createSignal } from '@niscorp/signal';
3
+ import type { Chat, Jev, Models } from '../compose';
4
+
5
+ type Env = Readonly<Record<string, string | undefined>>;
6
+
7
+ const JEV = { provider: 'typesafe', model: 'jev-latest' };
8
+ const CHAT = { provider: 'groq', model: 'openai/gpt-oss-120b' };
9
+
10
+ // Jev answers in about 200 ms and the chat model in about one second, its slowest measured near 4 s. A Jev pass given up
11
+ // is answered by the chat model alone; a chat run given up is a line saying the model could not be reached.
12
+ const JEV_MS = 2_000;
13
+ const CHAT_MS = 8_000;
14
+
15
+ const DecisionsSchema = z.record(z.string(), z.looseObject({ answer: z.boolean(), noul: z.number().optional() }));
16
+
17
+ // Without a TypeSafe key there is no Jev pass: the chat model could answer its questions too, but far slower than its
18
+ // budget allows.
19
+ export const modelsFromEnv = (env: Env): Models & { summary: string } => {
20
+ const has = (name: string): boolean => (env[name] ?? '').trim() !== '';
21
+ const decider = has('TYPESAFE_API_KEY') ? createSignal('typesafe').model(JEV.model) : undefined;
22
+
23
+ const jev: Jev | undefined = decider && {
24
+ ...JEV,
25
+ decide: async (state, questions) => {
26
+ const result = await decider.decide({ state, questions, options: { signal: AbortSignal.timeout(JEV_MS) } });
27
+ const picked = Object.fromEntries(Object.entries(DecisionsSchema.parse(result.decisions)).map(([name, decision]) => [name, { yes: decision.answer, ...(decision.noul !== undefined ? { probability: decision.noul } : {}) }]));
28
+ return { picked, usage: result.meta.usage };
29
+ },
30
+ };
31
+ const chat: Chat | undefined = has('GROQ_API_KEY') ? { ...CHAT, llm: createSignal('groq', { options: { reasoningEffort: 'low' } }).model(CHAT.model), timeoutMs: CHAT_MS } : undefined;
32
+
33
+ const summary = [jev !== undefined ? 'Jev picks' : 'no Jev pass (no TYPESAFE_API_KEY)', chat !== undefined ? 'gpt-oss-120b composes' : 'nothing composes (no GROQ_API_KEY)'].join(' · ');
34
+ return { ...(jev !== undefined ? { jev } : {}), ...(chat !== undefined ? { chat } : {}), missing: has('GROQ_API_KEY') ? [] : ['GROQ_API_KEY'], summary };
35
+ };
@@ -0,0 +1,20 @@
1
+ import type { Usage } from '@niscorp/cortex';
2
+ import type { FunctionSession, RunSink } from '@niscorp/moss';
3
+
4
+ type ModelRun = { agentId: string; label: string; provider: string; model: string; usage: Usage; steps: number; elapsedMs: number; outcome: 'ok' | 'failed' };
5
+
6
+ export const recordModelRun = (session: FunctionSession, run: ModelRun): void =>
7
+ session.recordRun({
8
+ agentId: run.agentId,
9
+ agentPath: [run.agentId],
10
+ label: run.label,
11
+ provider: run.provider,
12
+ model: run.model,
13
+ ...run.usage,
14
+ steps: run.steps,
15
+ elapsedMs: Math.round(run.elapsedMs),
16
+ outcome: run.outcome,
17
+ });
18
+
19
+ export const logRun: RunSink = (run) =>
20
+ console.log(`[run] ${run.agentId} "${run.label}" — ${run.outcome} · ${run.elapsedMs} ms · ${run.steps} ${run.steps === 1 ? 'step' : 'steps'} · ${run.inputTokens} tokens in, ${run.outputTokens} out${run.reported ? '' : ' (estimated)'}`);
@@ -0,0 +1,84 @@
1
+ {
2
+ "id": "model-first",
3
+ "answers": "kind",
4
+ "label": "A model — model-first",
5
+ "hint": "every message is answered with a screen composed from the app's actions",
6
+ "usage": "a model leads: each message is answered with a screen composed from the app's actions",
7
+ "summary": "model-first",
8
+ "requires": {
9
+ "shell": "moss"
10
+ },
11
+ "package": {
12
+ "dependencies": {
13
+ "@niscorp/cortex": "workspace:^",
14
+ "@niscorp/signal": "workspace:^",
15
+ "openai": "^6.33.0"
16
+ }
17
+ },
18
+ "env": [
19
+ {
20
+ "name": "GROQ_API_KEY",
21
+ "message": "Groq API key — gpt-oss-120b composes each answer",
22
+ "required": true
23
+ },
24
+ {
25
+ "name": "TYPESAFE_API_KEY",
26
+ "message": "TypeSafe API key — Jev's pass over the message and the open screen, in about 200 ms; without it the chat model answers alone"
27
+ }
28
+ ],
29
+ "docs": {
30
+ "is": "led by a model: every message is answered with a screen composed from the app's actions",
31
+ "where": [
32
+ "src/app/actions/guide/ the tour of nisc the app starts with: cards to read, and a counter, a checklist and a quick check to use — it goes first (below, \"How to proceed from here\")",
33
+ "src/app/action-catalog.ts every action, and `placeable`: the ones the model may put on a screen",
34
+ "src/app/screens.ts the screens in the dock — the tour's lessons: canvases shown together; the first is the one the app opens on",
35
+ "src/app/arrangements.ts how an answer is laid out: layouts for the frame’s `answers` region, and what each is for",
36
+ "src/server/compose/ the message loop: the open screen read, Jev's pass, gpt-oss-120b composes, the plan is placed",
37
+ " catalog.ts what the model is given to place: the `placeable` actions, the reads, the writes",
38
+ " screen.ts the open screen, read",
39
+ " pick.ts Jev's pass",
40
+ " composer.agent.ts the composer: a cortex agent",
41
+ " knowledge.ts what it is told: its instructions, the catalog as producers, the run’s input",
42
+ " reply.schema.ts what it replies, each field described",
43
+ " answer.ts what refuses a reply, and the answer a reply is turned into",
44
+ " layout.ts arrangements and the grids the model writes, as layouts",
45
+ " plan.ts, history.ts the answer as a plan, and the stack of them",
46
+ " index.ts the functions the dock calls",
47
+ "src/server/models/ the models, from .env",
48
+ "src/server/runs/ each model's part in a message recorded as a run, and the line the server logs for it",
49
+ "src/db/ your tables, as a strata sequence (none yet)"
50
+ ],
51
+ "decisions": [
52
+ "| D3 Reads | answered | **Vex entries**, read by an action by its fingerprint (`/api/vex`), under the person's policy. None yet: the tour the app starts with is text in its actions. |",
53
+ "| D4 Writes | answered | **Vex mutation entries**, posted to `/api/vex` by a form the person saves, never by the model. None yet. |",
54
+ "| D6 Who answers a message | answered | Jev reads the message and the open screen (`TYPESAFE_API_KEY`), then gpt-oss-120b on Groq composes the screen as a cortex agent (`GROQ_API_KEY`), with what Jev picked as a hint. Without a TypeSafe key there is no Jev pass. Jev may take 2 s and the model 8 s; past that, the model answers alone, or the line says it could not be reached and the screen stays as it is. Measured on the tour's cases (`src/dev/live-ask.ts --runs=2`): 30/32 right with Jev, 31/32 without, and about 200 ms slower with it. |",
55
+ "| D7 What a screen is made of | answered | Canvases: an action the model may place (`placeable`, in `src/app/action-catalog.ts`), opened with an input its schema takes, and why it is there; or words. Up to six, on the areas `a`–`f`; the screens in the dock are canvases too (`src/app/screens.ts`). |",
56
+ "| D8 History | derived · **open** | The answers one shell was given, kept while it lives; a reload starts again. An answer keeps what the person did on it when it is left — a count, a step ticked, a pick — as a browser keeps a page's form, so going back shows it as they left it. Open: whether a person's answers outlive the shell, and memory beyond that. |",
57
+ "| D9 Layout swaps | derived · **open: sign-in** | An answer’s arrangement is swapped into the frame’s `answers` region through moss’s unverified shell (`@niscorp/moss/unverified`, in `src/server/compose/index.ts`), because moss lets a session change a layout only through a draft, and a draft needs a signed-in person. **When the app has sign-in, the swap moves to `session.draft`, where moss checks it.** |",
58
+ "| D10 What keeps a canvas in place | answered | **The model answers by area.** It names only the areas that change — a canvas moved from another area, a new one, words, or nothing — and an area it leaves out stays as it is, the same canvas: a card filled in never moves the others. |",
59
+ "| D11 Jev's \"still wanted?\" | answered | **Not asked.** On ten follow-ups Jev was right 8 of 14 times, and with its answer the model dropped what was open. |",
60
+ "| D12 What a card written onto a screen keeps | derived | **Nothing of what was there.** A canvas the model or a screen writes holds its whole input: what it leaves out is its action's default, so a checklist written where another was shows none of its ticks, and a new quick check opens unpicked. A canvas an answer leaves alone keeps what the person did to it. |"
61
+ ],
62
+ "answered": [
63
+ "**Who leads:** a model. A message is answered with a screen: Jev reads the message and the open screen, gpt-oss-120b composes the screen from the app's actions, and the dock places it on the six areas. The keys are in `.env`."
64
+ ],
65
+ "open": [
66
+ "The entities, and how they relate — and what a person will ask about them.",
67
+ "Expected scale.",
68
+ "Who uses it: one person, or roles. More than one principal sketches its roles and charter now, not later.",
69
+ "Memory: what the app keeps of a person between messages.",
70
+ "Look and feel.",
71
+ "Where it is deployed.",
72
+ "What happens to the data long-term."
73
+ ],
74
+ "order": [
75
+ "**The interview** — every open item above, answered or delegated by name. ← here",
76
+ "**Scaffold** — done: the frame, the message loop, the dock, a tour of nisc in five screens — cards to read, and a counter, a checklist and a quick check to use, which the model can fill in too — and their checks.",
77
+ "**Data** — the tour goes first (AGENTS.md, \"How to proceed from here\"); then, per D2/D3, your tables in `src/db/schema.ts`, your reads in `src/app/vex/`.",
78
+ "**Actions** — your own, small: one purpose each, a description that says what it shows, an `input` schema for what the model fills in; the ones the model may place in `placeable`, each granted in the charter.",
79
+ "**Screens** — the ones a person will want in the dock, each its canvases; the first the one the app opens on.",
80
+ "**Writes** — per D4; a form an answer opens, filled in by the model, saved by the person.",
81
+ "**Checks** — a check for each feature in `src/dev/`, beside `compose-check.ts`, which runs the loop offline; and `live-ask` cases for what people will ask, run against the real models before a change to an action's description or to the instructions is kept."
82
+ ]
83
+ }
84
+ }
@@ -1,4 +1,4 @@
1
- # nisc-template-moss-dom
1
+ # nisc-template-app
2
2
 
3
3
  A [nisc](https://github.com/moccadroid/niscorp) application behind moss — the shell runs on the server, one per person; the browser is a canvas terminal.
4
4
 
@@ -0,0 +1,40 @@
1
+ {
2
+ "id": "moss",
3
+ "answers": "shell",
4
+ "label": "On a server — moss",
5
+ "hint": "one shell per person on the server; the charter is enforced there",
6
+ "usage": "the shell runs on a server (moss)",
7
+ "summary": "behind moss",
8
+ "default": true,
9
+ "package": {
10
+ "scripts": {
11
+ "dev": "nisc dev",
12
+ "build": "tsc --noEmit && nisc build",
13
+ "start": "nisc start",
14
+ "check": "nisc check",
15
+ "test": "nisc check",
16
+ "typecheck": "tsc --noEmit",
17
+ "strata": "tsx src/dev/strata.ts"
18
+ },
19
+ "dependencies": {
20
+ "@electric-sql/pglite": "^0.5.1",
21
+ "@niscorp/charter": "workspace:^",
22
+ "@niscorp/moss": "workspace:^",
23
+ "@niscorp/tide": "workspace:^",
24
+ "@niscorp/vex": "workspace:^"
25
+ }
26
+ },
27
+ "docs": {
28
+ "is": "behind moss",
29
+ "where": [
30
+ "src/app/ ARTIFACTS ONLY — the manifest (app.ts), the charter, the actions, the shell",
31
+ "src/server/ the environment (runtime.ts), the boot, how a screen is drawn (document.ts)"
32
+ ],
33
+ "runs": ["`npm run dev`", "`npm run build`", "`npm run check`", "`npm start`"],
34
+ "decisions": [
35
+ "| D1 Posture | answered | **A moss server app.** The shell runs on the server, one per person; the browser is a canvas terminal over a socket. The charter is enforced there: a principal reaches only the actions and the data it is granted. |",
36
+ "| D2 Environment | derived · **open for deployment** | Development and the checks run on PGlite, an in-memory Postgres that starts empty every boot (`src/server/runtime.ts`). Open: the Postgres a deployment hands it, and where it runs. |",
37
+ "| D5 Routing | derived · **partly open** | The first screen is drawn on the server and adopted by the terminal — it costs nothing while nobody can sign in. Open: once sign-in exists, the browser keeps the session in a cookie no script can read, and the page is drawn for whoever it says (AGENTS.md rule 12) — a page drawn for somebody is theirs alone (`private, no-store`). Open: which paths are **pages** rather than the app, and whether the app's shell state syncs to the address bar. |"
38
+ ]
39
+ }
40
+ }
@@ -1,4 +1,4 @@
1
- # nisc-template-shell-dom
1
+ # nisc-template-app
2
2
 
3
3
  A [nisc](https://github.com/moccadroid/niscorp) application with its own shell — it runs in the page, with no server.
4
4
 
@@ -0,0 +1,37 @@
1
+ {
2
+ "id": "page",
3
+ "answers": "shell",
4
+ "label": "In the page — no server",
5
+ "hint": "offline, static hosting; the charter is not a security boundary",
6
+ "usage": "the shell runs in the page, no server (offline, static hosting)",
7
+ "summary": "its own shell",
8
+ "package": {
9
+ "scripts": {
10
+ "dev": "nisc dev",
11
+ "build": "tsc --noEmit && nisc build",
12
+ "export": "nisc export",
13
+ "start": "nisc start",
14
+ "check": "nisc check",
15
+ "test": "nisc check",
16
+ "typecheck": "tsc --noEmit",
17
+ "strata": "tsx src/dev/strata.ts"
18
+ },
19
+ "devDependencies": {
20
+ "@types/jsdom": "^30.0.0",
21
+ "jsdom": "^25.0.1"
22
+ }
23
+ },
24
+ "docs": {
25
+ "is": "its own shell",
26
+ "where": [
27
+ "src/app/ ARTIFACTS ONLY — the actions and the shell's canvases",
28
+ "src/boot.ts the shell factory: the artifacts plus everything environmental"
29
+ ],
30
+ "runs": ["`npm run dev`", "`npm run build`", "`npm run check`", "`npm run export`"],
31
+ "decisions": [
32
+ "| D1 Posture | answered | **Its own shell, in the page — no server.** The shell, its actions and its endpoints run in the browser. Consequence, said plainly: **the charter is not enforcement here.** Whatever data and policy the page has, its user has; nothing in this posture is a security boundary. An app that needs one needs a server — moss. |",
33
+ "| D2 Environment | **open** | The app has no data yet. Open: what serves its endpoints — in-memory fixtures, PGlite in the page (your data lives in one browser profile: no sync, no other devices, gone if site data is cleared), a real backend, or a mix. |",
34
+ "| D5 Routing | derived · **partly open** | The first screen is drawn at build (`nisc export`) — one file per path, the screen as nobody in particular sees it — and the page's own shell picks it up. Open: which paths exist beyond `/`, and whether shell state syncs to the address bar. |"
35
+ ]
36
+ }
37
+ }
@@ -0,0 +1,5 @@
1
+ [
2
+ { "id": "kind", "message": "Who leads?" },
3
+ { "id": "shell", "message": "Where does the shell run?" },
4
+ { "id": "kit", "message": "What draws the screen?" }
5
+ ]
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>nisc-template-moss-react</title>
6
+ <title>nisc-template-app</title>
7
7
  </head>
8
8
  <body>
9
9
  <div id="root"></div>
@@ -0,0 +1,221 @@
1
+ import { useState, type ChangeEvent, type KeyboardEvent } from 'react';
2
+ import { z } from 'zod';
3
+ import { useNovaDispatch } from '@niscorp/nova/adapters/react';
4
+ import type { NovaComponent } from '@niscorp/nova/adapters/react';
5
+
6
+ // A value a component does not take falls back to its default on its own; the others still hold.
7
+ const parsed = <S extends z.ZodRawShape>(schema: z.ZodObject<S>, props: Record<string, unknown>, fallback: z.output<z.ZodObject<S>>): z.output<z.ZodObject<S>> => {
8
+ const taken = Object.fromEntries(
9
+ Object.entries(props).filter(([key, value]) => {
10
+ const field = schema.shape[key];
11
+ return field !== undefined && z.safeParse(field, value).success;
12
+ }),
13
+ );
14
+ const result = schema.safeParse({ ...fallback, ...taken });
15
+ return result.success ? result.data : fallback;
16
+ };
17
+
18
+ const cell = (value: unknown): string => (value === null || value === undefined ? '' : typeof value === 'object' ? JSON.stringify(value) : String(value));
19
+
20
+ const PageProps = z.object({}).describe('The page: a centred column with the app’s background.');
21
+ export const Page: NovaComponent = ({ children }) => <main className="k-page">{children}</main>;
22
+ Page.meta = { description: 'The page: a centred column.', propsSchema: PageProps };
23
+
24
+ const RowProps = z.object({}).describe('Children side by side, centred.');
25
+ export const Row: NovaComponent = ({ children }) => <div className="k-row">{children}</div>;
26
+ Row.meta = { description: 'Children side by side.', propsSchema: RowProps };
27
+
28
+ const HeadingProps = z.object({}).describe('The page’s title.');
29
+ export const Heading: NovaComponent = ({ children }) => <h1 className="k-heading">{children}</h1>;
30
+ Heading.meta = { description: 'The page’s title.', propsSchema: HeadingProps };
31
+
32
+ const TextProps = z.object({
33
+ tone: z
34
+ .enum(['default', 'lead', 'muted', 'strong', 'display', 'right', 'wrong', 'error'])
35
+ .optional()
36
+ .describe('default | lead: the sentence a card opens with | muted | strong | display: one big figure | right: a right answer, said | wrong: a wrong answer, said | error'),
37
+ });
38
+ export const Text: NovaComponent = ({ children, novaRef: _ref, novaModel: _model, ...props }) => {
39
+ const { tone } = parsed(TextProps, props, {});
40
+ return <p className={tone === undefined || tone === 'default' ? 'k-text' : `k-text k-${tone}`}>{children}</p>;
41
+ };
42
+ Text.meta = { description: 'A paragraph.', propsSchema: TextProps };
43
+
44
+ const ButtonProps = z.object({
45
+ label: z.string().optional().describe('What the button says; falls back to its children.'),
46
+ tone: z
47
+ .enum(['primary', 'suggestion', 'link', 'choice', 'chosen', 'right', 'wrong', 'summary', 'step'])
48
+ .optional()
49
+ .describe(
50
+ 'primary: what the action does | suggestion: a thing to ask | link: opens another screen | choice: one of a set to choose from | chosen: the one of the set that is chosen | right: the right one of a set, once picked | wrong: a wrong one, picked | summary: names what is shown, and opens to more | step: back, forward, or start over',
51
+ ),
52
+ value: z.unknown().optional().describe('Sent with the click as its payload.'),
53
+ });
54
+ export const Button: NovaComponent = ({ children, novaRef, novaModel: _model, ...props }) => {
55
+ const dispatch = useNovaDispatch();
56
+ const { label, tone, value } = parsed(ButtonProps, props, {});
57
+ return (
58
+ <button
59
+ type="button"
60
+ className={tone === undefined || tone === 'primary' ? 'k-button' : `k-button k-${tone}`}
61
+ onClick={() => dispatch({ type: 'ui:click', ...(novaRef !== undefined ? { ref: novaRef } : {}), ...(value !== undefined ? { payload: value } : {}) })}
62
+ >
63
+ {label ?? children}
64
+ </button>
65
+ );
66
+ };
67
+ Button.meta = { description: 'A button; dispatches ui:click with its ref, and its value as the payload.', propsSchema: ButtonProps };
68
+
69
+ const FrameProps = z.object({}).describe('The whole app: the answer, and the dock under it.');
70
+ export const Frame: NovaComponent = ({ children }) => <div className="k-frame">{children}</div>;
71
+ Frame.meta = { description: 'The whole app, top to bottom.', propsSchema: FrameProps };
72
+
73
+ const DockProps = z.object({}).describe('What stays at the bottom while the answer scrolls above it.');
74
+ export const Dock: NovaComponent = ({ children }) => <footer className="k-dock">{children}</footer>;
75
+ Dock.meta = { description: 'What stays at the bottom while the answer scrolls above it.', propsSchema: DockProps };
76
+
77
+ const MenuProps = z.object({}).describe('A list that opens above the dock: one choice a line.');
78
+ export const Menu: NovaComponent = ({ children }) => <nav className="k-menu">{children}</nav>;
79
+ Menu.meta = { description: 'A list that opens above the dock.', propsSchema: MenuProps };
80
+
81
+ const GridProps = z.object({ columns: z.number().int().min(1).max(3).optional().describe('How many columns its areas are laid out in: 1 to 3.') });
82
+ export const Grid: NovaComponent = ({ children, novaRef: _ref, novaModel: _model, ...props }) => {
83
+ const { columns } = parsed(GridProps, props, {});
84
+ return (
85
+ <main className={`k-grid k-columns-${columns ?? 2}`}>
86
+ {children}
87
+ </main>
88
+ );
89
+ };
90
+ Grid.meta = { description: 'Areas in columns, row by row.', propsSchema: GridProps };
91
+
92
+ const AreaProps = z.object({
93
+ name: z.string().describe('Which canvas it holds.'),
94
+ span: z.number().int().min(1).max(3).optional().describe('How many columns it takes.'),
95
+ changed: z.boolean().optional().describe('Whether the last answer changed what it holds.'),
96
+ });
97
+ export const Area: NovaComponent = ({ children, novaRef: _ref, novaModel: _model, ...props }) => {
98
+ const { span, changed } = parsed(AreaProps, props, { name: '' });
99
+ return (
100
+ <section className={`k-area k-span-${span ?? 1}${changed === true ? ' k-area-changed' : ''}`}>
101
+ {children}
102
+ </section>
103
+ );
104
+ };
105
+ Area.meta = { description: 'One area of an answer.', propsSchema: AreaProps };
106
+
107
+ const CardProps = z.object({
108
+ title: z.string().optional().describe('What the card shows, in a few words.'),
109
+ tone: z.enum(['default', 'hero']).optional().describe('default | hero: the card a screen opens with'),
110
+ });
111
+ export const Card: NovaComponent = ({ children, novaRef: _ref, novaModel: _model, ...props }) => {
112
+ const { title, tone } = parsed(CardProps, props, {});
113
+ return (
114
+ <article className={tone === 'hero' ? 'k-card k-hero' : 'k-card'}>
115
+ {title !== undefined && title !== '' ? <h2 className="k-card-title">{title}</h2> : null}
116
+ {children}
117
+ </article>
118
+ );
119
+ };
120
+ Card.meta = { description: 'One part of an answer, with its title.', propsSchema: CardProps };
121
+
122
+ const CodeProps = z.object({ text: z.string().describe('The code, as it is to be read.') });
123
+ export const Code: NovaComponent = ({ novaRef: _ref, novaModel: _model, ...props }) => {
124
+ const { text } = parsed(CodeProps, props, { text: '' });
125
+ return (
126
+ <pre className="k-code">
127
+ <code>{text}</code>
128
+ </pre>
129
+ );
130
+ };
131
+ Code.meta = { description: 'A block of code, kept as written.', propsSchema: CodeProps };
132
+
133
+ const PointsProps = z.object({ items: z.array(z.object({ title: z.string(), text: z.string() })).describe('Each point: a few words, and a sentence.') });
134
+ export const Points: NovaComponent = ({ novaRef: _ref, novaModel: _model, ...props }) => {
135
+ const { items } = parsed(PointsProps, props, { items: [] });
136
+ return (
137
+ <dl className="k-points">
138
+ {items.map((item) => (
139
+ <div key={item.title} className="k-point">
140
+ <dt>{item.title}</dt>
141
+ <dd>{item.text}</dd>
142
+ </div>
143
+ ))}
144
+ </dl>
145
+ );
146
+ };
147
+ Points.meta = { description: 'A few points, each a few words and a sentence.', propsSchema: PointsProps };
148
+
149
+ const StepsProps = z.object({ items: z.array(z.string()).describe('The steps, in order.') });
150
+ export const Steps: NovaComponent = ({ novaRef: _ref, novaModel: _model, ...props }) => {
151
+ const { items } = parsed(StepsProps, props, { items: [] });
152
+ return (
153
+ <ol className="k-steps">
154
+ {items.map((item) => (
155
+ <li key={item}>{item}</li>
156
+ ))}
157
+ </ol>
158
+ );
159
+ };
160
+ Steps.meta = { description: 'Steps in order, numbered.', propsSchema: StepsProps };
161
+
162
+ const CheckProps = z.object({
163
+ label: z.string().describe('What is ticked off.'),
164
+ checked: z.boolean().optional().describe('Whether it is ticked.'),
165
+ value: z.unknown().optional().describe('Sent with the click as its payload.'),
166
+ });
167
+ export const Check: NovaComponent = ({ novaRef, novaModel: _model, ...props }) => {
168
+ const dispatch = useNovaDispatch();
169
+ const { label, checked, value } = parsed(CheckProps, props, { label: '' });
170
+ return (
171
+ <button
172
+ type="button"
173
+ role="checkbox"
174
+ aria-checked={checked === true}
175
+ className={checked === true ? 'k-check k-checked' : 'k-check'}
176
+ onClick={() => dispatch({ type: 'ui:click', ...(novaRef !== undefined ? { ref: novaRef } : {}), ...(value !== undefined ? { payload: value } : {}) })}
177
+ >
178
+ <span className="k-box" aria-hidden="true" />
179
+ <span className="k-check-label">{label}</span>
180
+ </button>
181
+ );
182
+ };
183
+ Check.meta = { description: 'A line to tick off; dispatches ui:click with its ref, and its value as the payload.', propsSchema: CheckProps };
184
+
185
+ const InputProps = z.object({
186
+ placeholder: z.string().optional(),
187
+ value: z.unknown().optional(),
188
+ clearOnEnter: z.boolean().optional().describe('Empties itself on Enter: a line something is sent from.'),
189
+ });
190
+ // While it has focus, what is typed wins over what the shell echoes back, so a
191
+ // round trip to the server never takes a keystroke away.
192
+ export const Input: NovaComponent = ({ novaRef, novaModel, ...props }) => {
193
+ const dispatch = useNovaDispatch();
194
+ const { placeholder, value, clearOnEnter } = parsed(InputProps, props, {});
195
+ const [draft, setDraft] = useState<string | null>(null);
196
+ const ref = novaModel?.ref ?? novaRef;
197
+ const onChange = (event: ChangeEvent<HTMLInputElement>): void => {
198
+ setDraft(event.target.value);
199
+ if (novaModel !== undefined) dispatch({ type: 'ui:model', ref: novaModel.ref, payload: event.target.value });
200
+ };
201
+ const onKeyDown = (event: KeyboardEvent<HTMLInputElement>): void => {
202
+ if (ref !== undefined) dispatch({ type: 'ui:key', ref, key: event.key });
203
+ if (event.key === 'Enter' && clearOnEnter === true) setDraft('');
204
+ };
205
+ return (
206
+ <input
207
+ className="k-input"
208
+ placeholder={placeholder}
209
+ value={draft ?? cell(value)}
210
+ onChange={onChange}
211
+ onKeyDown={onKeyDown}
212
+ onFocus={() => setDraft(cell(value))}
213
+ onBlur={() => setDraft(null)}
214
+ />
215
+ );
216
+ };
217
+ Input.meta = { description: 'A line of text, bound to data with the node’s `model`; Enter is a ui:key.', propsSchema: InputProps };
218
+
219
+ const PromptProps = z.object({}).describe('The line to ask in, and the button that sends it.');
220
+ export const Prompt: NovaComponent = ({ children }) => <div className="k-prompt">{children}</div>;
221
+ Prompt.meta = { description: 'The line to ask in.', propsSchema: PromptProps };
@@ -2,11 +2,11 @@ import { createComponentRegistry } from '@niscorp/nova';
2
2
  import type { ComponentRegistry } from '@niscorp/nova';
3
3
  import { ActionSlot, CanvasSlot } from '@niscorp/nova/adapters/react/components';
4
4
  import type { NovaComponent } from '@niscorp/nova/adapters/react';
5
- import { Button, Heading, Page, Row, Text } from './kit';
5
+ import { Area, Button, Card, Check, Code, Dock, Frame, Grid, Heading, Input, Menu, Page, Points, Prompt, Row, Steps, Text } from './kit';
6
6
 
7
7
  export const buildRegistry = (): ComponentRegistry<NovaComponent> => {
8
8
  const registry = createComponentRegistry<NovaComponent>();
9
9
  registry.registerAll({ CanvasSlot, ActionSlot });
10
- registry.registerAll({ Page, Row, Heading, Text, Button });
10
+ registry.registerAll({ Page, Row, Heading, Text, Button, Frame, Dock, Menu, Grid, Area, Card, Code, Points, Steps, Check, Input, Prompt });
11
11
  return registry;
12
12
  };
@@ -0,0 +1,31 @@
1
+ {
2
+ "id": "react",
3
+ "answers": "kit",
4
+ "label": "React",
5
+ "usage": "React draws the screen",
6
+ "summary": "React",
7
+ "default": true,
8
+ "package": {
9
+ "dependencies": {
10
+ "react": "^19.2.4",
11
+ "react-dom": "^19.2.4"
12
+ },
13
+ "devDependencies": {
14
+ "@types/react": "^19.2.14",
15
+ "@types/react-dom": "^19.2.3",
16
+ "@vitejs/plugin-react": "^5.0.4"
17
+ }
18
+ },
19
+ "docs": {
20
+ "is": "drawn with React",
21
+ "answered": ["**What draws the screen:** React. The kit in `src/ui/` is where the look lives; a layout names components, never styles."]
22
+ },
23
+ "with": {
24
+ "moss": {
25
+ "docs": { "where": ["src/ui/ the kit — the only renderer code, with src/main.tsx, the terminal entry"] }
26
+ },
27
+ "page": {
28
+ "docs": { "where": ["src/ui/ the kit and the screen — the only renderer code, with src/main.tsx, the entry"] }
29
+ }
30
+ }
31
+ }