create-githolon 0.100.5 → 0.101.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-githolon",
3
- "version": "0.100.5",
3
+ "version": "0.101.0",
4
4
  "type": "module",
5
5
  "description": "Scaffold a Nomos domain package: the starter domain + compile config + live e2e. `npm create githolon my-app`.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -12,19 +12,12 @@ The starter in [`domains/todo.ts`](domains/todo.ts) gives a todo list its own du
12
12
 
13
13
  ```ts
14
14
  export const TodoList = aggregate("TodoList", {
15
- reference: t.string().merge(Lww),
16
- title: t.string().merge(Lww),
15
+ reference: t.string({ nonempty: true }).fromBirth(),
16
+ title: t.string({ nonempty: true }).fromBirth(),
17
17
  });
18
18
 
19
19
  export const todoList = birth(TodoList, {
20
- payload: z.object({
21
- reference: z.string().min(1),
22
- title: z.string().min(1),
23
- }),
24
- key: (facts) => facts.reference,
25
- plan: (list, facts) => list
26
- .set("reference", facts.reference)
27
- .set("title", facts.title),
20
+ key: "reference",
28
21
  });
29
22
  ```
30
23
 
@@ -51,7 +44,10 @@ npx githolon proof
51
44
 
52
45
  `compile` emits the law, typed client, and a proof generated from this domain. `proof` drives the real engine locally, births the list, discards its resident copy, restores it from durable custody, verifies the full history again, and reads the business root back.
53
46
 
54
- Make it yours by renaming `TodoList`, changing its fields, and changing the birth payload. Keep the rule: application code supplies business facts; Nomos owns the machinery that makes those facts durable and trustworthy.
47
+ Make it yours by renaming `TodoList` and changing its fields. `.fromBirth()` means the fact is required to
48
+ begin that durable life; its field rule is also the birth validation and generated input type. Nomos derives
49
+ the initial write. Keep the rule: application code supplies business facts; Nomos owns the machinery that
50
+ makes those facts durable and trustworthy.
55
51
 
56
52
  Useful files:
57
53
 
@@ -4,22 +4,15 @@
4
4
  * The app supplies business facts. Nomos gives the aggregate a durable life and owns identity,
5
5
  * authorship, local execution, synchronisation, persistence, provenance, and recovery beneath it.
6
6
  */
7
- import { Lww, aggregate, birth, t, z } from "@githolon/dsl";
7
+ import { aggregate, birth, t } from "@githolon/dsl";
8
8
 
9
9
  export const TodoList = aggregate("TodoList", {
10
10
  /** A stable business key the caller already knows. */
11
- reference: t.string().merge(Lww),
12
- title: t.string().merge(Lww),
13
- });
11
+ reference: t.string({ nonempty: true }).fromBirth(),
12
+ title: t.string({ nonempty: true }).fromBirth(),
13
+ }).owned();
14
14
 
15
15
  /** The one public creation idea: give a todo list its own durable life. */
16
16
  export const todoList = birth(TodoList, {
17
- payload: z.object({
18
- reference: z.string().min(1),
19
- title: z.string().min(1),
20
- }),
21
- key: (facts) => facts.reference,
22
- plan: (list, facts) => list
23
- .set("reference", facts.reference)
24
- .set("title", facts.title),
17
+ key: "reference",
25
18
  });
@@ -11,8 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@githolon/dsl": "^__NOMOS_VERSION__",
14
- "@githolon/client": "^__NOMOS_VERSION__",
15
- "zod": "^4.4.3"
14
+ "@githolon/client": "^__NOMOS_VERSION__"
16
15
  },
17
16
  "devDependencies": {
18
17
  "githolon": "^__NOMOS_VERSION__",