@arcforge/types 2.0.215 → 2.0.216
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 +3 -2
- package/src/kernel/abi.ts +1 -1
- package/src/session/events/cognet.ts +56 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcforge/types",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.216",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -44,5 +44,6 @@
|
|
|
44
44
|
"ai-agent",
|
|
45
45
|
"agent-runtime",
|
|
46
46
|
"typescript"
|
|
47
|
-
]
|
|
47
|
+
],
|
|
48
|
+
"axonRevision": "1142da36e6cfed36fe03f3b5e91a04cc01929d6e"
|
|
48
49
|
}
|
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 = "
|
|
28
|
+
export const KERNEL_ABI_VERSION = "11"
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* The cognet's own store schema — EMPTY here by design. A cognet declares
|
|
@@ -98,7 +98,15 @@ export type CognetEventMap =
|
|
|
98
98
|
// lie. Components carrying no spatial claim declare "none".
|
|
99
99
|
"cognet:component:declare": {
|
|
100
100
|
component: string
|
|
101
|
-
|
|
101
|
+
/**
|
|
102
|
+
* What the value is INDEXED BY — the thing that decides how a reader
|
|
103
|
+
* lays it out. A mood and a depth map are both scalars; one is a
|
|
104
|
+
* scalar at a point and the other a scalar over an image, and only
|
|
105
|
+
* the domain distinguishes them.
|
|
106
|
+
*/
|
|
107
|
+
domain: "point" | "space" | "time" | "sequence" | "tree" | "set"
|
|
108
|
+
/** What sits at one index. */
|
|
109
|
+
shape: "scalar" | "vector" | "categorical" | "record"
|
|
102
110
|
/** Physical unit for scalar/vector readings — "hp", "px/tick", "bool". */
|
|
103
111
|
unit?: string
|
|
104
112
|
/** Expected bounds, so a reader can scale without waiting for outliers. */
|
|
@@ -107,8 +115,23 @@ export type CognetEventMap =
|
|
|
107
115
|
labels?: string[]
|
|
108
116
|
/** The permitted values. Categoricals only. */
|
|
109
117
|
options?: string[]
|
|
110
|
-
/**
|
|
111
|
-
|
|
118
|
+
/**
|
|
119
|
+
* The declared frame this value is expressed in, by name.
|
|
120
|
+
*
|
|
121
|
+
* A NAME rather than an enum: an agent may hold eight cameras, a
|
|
122
|
+
* joint space, and a dependency graph, and a fixed list of spatial
|
|
123
|
+
* words cannot describe any of them. Absent means the belief makes no
|
|
124
|
+
* positional claim at all. See cognet:frame:declare.
|
|
125
|
+
*/
|
|
126
|
+
frame?: string
|
|
127
|
+
/**
|
|
128
|
+
* Whether this belief is in the WORKSPACE — the pool a mind's attention
|
|
129
|
+
* may draw from, as opposed to the machinery it runs on.
|
|
130
|
+
*
|
|
131
|
+
* A reader can therefore show what a mind could in principle attend to,
|
|
132
|
+
* separately from everything it merely stores.
|
|
133
|
+
*/
|
|
134
|
+
workspace?: boolean
|
|
112
135
|
}
|
|
113
136
|
|
|
114
137
|
// ── World writes ─────────────────────────────────────────────────────────
|
|
@@ -122,10 +145,38 @@ export type CognetEventMap =
|
|
|
122
145
|
// update only when the value actually changed. That keeps the log a record
|
|
123
146
|
// of change rather than a stream of identical snapshots, and it is the
|
|
124
147
|
// reason this family can afford to carry data at all.
|
|
148
|
+
//
|
|
149
|
+
// OPTIONAL, deliberately. A cognet is a prebuilt bundle carrying its own
|
|
150
|
+
// inlined host, so bundles compiled before this field existed are still
|
|
151
|
+
// running and still emitting these events without it. Declaring it required
|
|
152
|
+
// would make the type a lie about the wire AND force an ABI bump, which
|
|
153
|
+
// refuses every already-published cognet for a field no reader needs in
|
|
154
|
+
// order to function. A reader that has no value renders nothing for that
|
|
155
|
+
// belief, which is the correct outcome.
|
|
156
|
+
// ── Frames ───────────────────────────────────────────────────────────────
|
|
157
|
+
//
|
|
158
|
+
// A frame is a space beliefs can be positioned in, and the reason two of
|
|
159
|
+
// them can be layered: depth over a camera image, danger over a world map,
|
|
160
|
+
// coverage over a call graph.
|
|
161
|
+
//
|
|
162
|
+
// Deliberately NOT restricted to metric space. A dependency graph, a file
|
|
163
|
+
// tree and a conversation are all spaces with positions and neighbours, so
|
|
164
|
+
// a mind with no physical body still composes its beliefs the same way —
|
|
165
|
+
// which is what keeps this contract honest for agents that never see
|
|
166
|
+
// anything.
|
|
167
|
+
"cognet:frame:declare": {
|
|
168
|
+
frame: string
|
|
169
|
+
kind: "metric2d" | "metric3d" | "graph" | "tree" | "sequence"
|
|
170
|
+
/** Physical unit of the axes, for metric frames. */
|
|
171
|
+
unit?: string
|
|
172
|
+
/** Size along each axis, so a reader can scale without waiting for outliers. */
|
|
173
|
+
extent?: number[]
|
|
174
|
+
}
|
|
175
|
+
|
|
125
176
|
"cognet:entity:add": { tick: number; phase: string | null; entity: string }
|
|
126
177
|
"cognet:entity:remove": { tick: number; phase: string | null; entity: string }
|
|
127
178
|
|
|
128
|
-
"cognet:component:add": { tick: number; phase: string | null; entity: string; component: string; value
|
|
129
|
-
"cognet:component:update": { tick: number; phase: string | null; entity: string; component: string; value
|
|
179
|
+
"cognet:component:add": { tick: number; phase: string | null; entity: string; component: string; value?: unknown }
|
|
180
|
+
"cognet:component:update": { tick: number; phase: string | null; entity: string; component: string; value?: unknown }
|
|
130
181
|
"cognet:component:remove": { tick: number; phase: string | null; entity: string; component: string }
|
|
131
182
|
}
|