@arcforge/types 2.0.214 → 2.0.215

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": "@arcforge/types",
3
- "version": "2.0.214",
3
+ "version": "2.0.215",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./src/index.ts",
package/src/kernel/abi.ts CHANGED
@@ -25,7 +25,7 @@ import type { CapsuleScope } from "../capsule-scope"
25
25
  * the rule is the enforcement. (Additive changes — new event types, new
26
26
  * optional fields — are compatible, like new syscalls.)
27
27
  */
28
- export const KERNEL_ABI_VERSION = "11"
28
+ export const KERNEL_ABI_VERSION = "12"
29
29
 
30
30
  /**
31
31
  * The cognet's own store schema — EMPTY here by design. A cognet declares
@@ -82,11 +82,50 @@ export type CognetEventMap =
82
82
  "cognet:knowledge:write": { name: string }
83
83
  "cognet:knowledge:remove": { name: string }
84
84
 
85
+ // ── World schema ─────────────────────────────────────────────────────────
86
+ //
87
+ // A component type describes itself ONCE, when the world first sees it.
88
+ //
89
+ // The alternative — shape metadata on every write — repeats "Fear is a
90
+ // scalar in 0..1" twenty times a second in the highest-volume family in
91
+ // the system. Declaring once also means a reader can render a component
92
+ // before any value has arrived, so panes exist from world spawn rather
93
+ // than appearing on first write.
94
+ //
95
+ // `frame` is not decoration. A position or field is meaningless without
96
+ // knowing whether it is measured from the body, from a remembered anchor,
97
+ // or in world coordinates, and a reader that guesses draws a convincing
98
+ // lie. Components carrying no spatial claim declare "none".
99
+ "cognet:component:declare": {
100
+ component: string
101
+ shape: "scalar" | "vector" | "categorical" | "field" | "record"
102
+ /** Physical unit for scalar/vector readings — "hp", "px/tick", "bool". */
103
+ unit?: string
104
+ /** Expected bounds, so a reader can scale without waiting for outliers. */
105
+ range?: [number, number]
106
+ /** Component names, in value order. Vectors only. */
107
+ labels?: string[]
108
+ /** The permitted values. Categoricals only. */
109
+ options?: string[]
110
+ /** What spatial frame the value is expressed in. */
111
+ frame?: "egocentric" | "anchor" | "world" | "none"
112
+ }
113
+
85
114
  // ── World writes ─────────────────────────────────────────────────────────
115
+ //
116
+ // `value` carries the data itself, which is what makes the world
117
+ // reconstructible from the log rather than merely auditable. Without it
118
+ // these events say a component changed but never to what, so no reader
119
+ // can render the mind's contents and no replay can rebuild them.
120
+ //
121
+ // The volume this implies is governed at the WRITE — Component() emits an
122
+ // update only when the value actually changed. That keeps the log a record
123
+ // of change rather than a stream of identical snapshots, and it is the
124
+ // reason this family can afford to carry data at all.
86
125
  "cognet:entity:add": { tick: number; phase: string | null; entity: string }
87
126
  "cognet:entity:remove": { tick: number; phase: string | null; entity: string }
88
127
 
89
- "cognet:component:add": { tick: number; phase: string | null; entity: string; component: string }
90
- "cognet:component:update": { tick: number; phase: string | null; entity: string; component: string }
128
+ "cognet:component:add": { tick: number; phase: string | null; entity: string; component: string; value: unknown }
129
+ "cognet:component:update": { tick: number; phase: string | null; entity: string; component: string; value: unknown }
91
130
  "cognet:component:remove": { tick: number; phase: string | null; entity: string; component: string }
92
131
  }