@manifesto-ai/sdk 2.2.0 → 3.1.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/README.md +52 -26
- package/dist/chunk-CMZQTFX2.js +332 -0
- package/dist/chunk-CMZQTFX2.js.map +1 -0
- package/dist/index.d.ts +15 -374
- package/dist/index.js +269 -365
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +44 -0
- package/dist/internal.js +17 -0
- package/dist/internal.js.map +1 -0
- package/dist/types-oXciBlAp.d.ts +99 -0
- package/package.json +11 -8
package/README.md
CHANGED
|
@@ -1,53 +1,79 @@
|
|
|
1
1
|
# @manifesto-ai/sdk
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Activation-first entry point for Manifesto applications.
|
|
4
4
|
|
|
5
|
-
`@manifesto-ai/sdk` is the default package for applications that start with `createManifesto()`.
|
|
5
|
+
`@manifesto-ai/sdk` is the default package for applications that start with `createManifesto()`.
|
|
6
|
+
|
|
7
|
+
> **Current Contract Note:** The truthful current SDK contract is the ADR-017 activation model documented in [docs/sdk-SPEC-v3.0.0-draft.md](docs/sdk-SPEC-v3.0.0-draft.md). The filename still says `draft` because the wider ADR-017 landing across Lineage, Governance, and World is still in progress.
|
|
6
8
|
|
|
7
9
|
## What This Package Owns
|
|
8
10
|
|
|
9
11
|
- `createManifesto()`
|
|
10
|
-
- `
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
12
|
+
- the activation boundary via `activate()`
|
|
13
|
+
- the present-only base runtime returned after activation
|
|
14
|
+
- SDK error types
|
|
15
|
+
- selected Core pass-through types used by SDK signatures
|
|
14
16
|
|
|
15
17
|
## When to Use It
|
|
16
18
|
|
|
17
19
|
Use the SDK when you want:
|
|
18
20
|
|
|
19
|
-
- the shortest path to
|
|
20
|
-
-
|
|
21
|
-
-
|
|
21
|
+
- the shortest path to a running base world
|
|
22
|
+
- typed intent creation through `MEL.actions.*`
|
|
23
|
+
- `dispatchAsync`, subscriptions, availability queries, and snapshot reads in one package
|
|
24
|
+
- a clear boundary between law composition and runtime execution
|
|
22
25
|
|
|
23
|
-
##
|
|
26
|
+
## Activation Lifecycle
|
|
24
27
|
|
|
25
28
|
```typescript
|
|
26
|
-
import {
|
|
29
|
+
import { createManifesto } from "@manifesto-ai/sdk";
|
|
30
|
+
|
|
31
|
+
const manifesto = createManifesto<CounterDomain>(counterSchema, {});
|
|
32
|
+
const world = manifesto.activate();
|
|
27
33
|
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
effects: {},
|
|
31
|
-
});
|
|
34
|
+
const intent = world.createIntent(world.MEL.actions.increment);
|
|
35
|
+
await world.dispatchAsync(intent);
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
world.isActionAvailable("increment");
|
|
38
|
+
world.getAvailableActions();
|
|
39
|
+
world.getSnapshot();
|
|
34
40
|
```
|
|
35
41
|
|
|
36
|
-
|
|
42
|
+
The canonical SDK lifecycle is:
|
|
37
43
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
1. build a composable manifesto with `createManifesto(schema, effects)`
|
|
45
|
+
2. open it once with `activate()`
|
|
46
|
+
3. create typed intents from `world.MEL.actions.*`
|
|
47
|
+
4. execute with instance-owned `dispatchAsync()`
|
|
48
|
+
5. observe through `subscribe()` / `on()` and read through `getSnapshot()`
|
|
49
|
+
|
|
50
|
+
## Base Runtime Surface
|
|
51
|
+
|
|
52
|
+
The activated base runtime exposes:
|
|
53
|
+
|
|
54
|
+
- `createIntent`
|
|
55
|
+
- `dispatchAsync`
|
|
56
|
+
- `subscribe`
|
|
57
|
+
- `on`
|
|
58
|
+
- `getSnapshot`
|
|
59
|
+
- `getAvailableActions`
|
|
60
|
+
- `isActionAvailable`
|
|
61
|
+
- `MEL`
|
|
62
|
+
- `dispose`
|
|
63
|
+
|
|
64
|
+
## Governed Composition Direction
|
|
65
|
+
|
|
66
|
+
SDK no longer re-exports the old World facade or its bootstrap helpers.
|
|
67
|
+
|
|
68
|
+
The public direction under ADR-017 is:
|
|
44
69
|
|
|
45
|
-
|
|
70
|
+
`createManifesto() -> withLineage() -> withGovernance() -> activate()`
|
|
46
71
|
|
|
47
|
-
|
|
72
|
+
Those governed runtime contracts land in the owning `@manifesto-ai/lineage` and `@manifesto-ai/governance` packages. Older world-facade docs are historical tombstones rather than current guidance.
|
|
48
73
|
|
|
49
74
|
## Docs
|
|
50
75
|
|
|
51
76
|
- [SDK Guide](docs/GUIDE.md)
|
|
52
|
-
- [SDK Specification](docs/sdk-SPEC-
|
|
77
|
+
- [SDK Specification v3](docs/sdk-SPEC-v3.0.0-draft.md)
|
|
78
|
+
- [SDK Specification v2](docs/sdk-SPEC-v2.0.0.md)
|
|
53
79
|
- [VERSION-INDEX](docs/VERSION-INDEX.md)
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
// src/internal.ts
|
|
2
|
+
import {
|
|
3
|
+
getAvailableActions as queryAvailableActions,
|
|
4
|
+
isActionAvailable as queryActionAvailable
|
|
5
|
+
} from "@manifesto-ai/core";
|
|
6
|
+
|
|
7
|
+
// src/errors.ts
|
|
8
|
+
var ManifestoError = class extends Error {
|
|
9
|
+
code;
|
|
10
|
+
constructor(code, message, options) {
|
|
11
|
+
super(message, options);
|
|
12
|
+
this.name = "ManifestoError";
|
|
13
|
+
this.code = code;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var ReservedEffectError = class extends ManifestoError {
|
|
17
|
+
effectType;
|
|
18
|
+
constructor(effectType) {
|
|
19
|
+
super(
|
|
20
|
+
"RESERVED_EFFECT",
|
|
21
|
+
`Effect type "${effectType}" is reserved and cannot be overridden`
|
|
22
|
+
);
|
|
23
|
+
this.name = "ReservedEffectError";
|
|
24
|
+
this.effectType = effectType;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var CompileError = class extends ManifestoError {
|
|
28
|
+
diagnostics;
|
|
29
|
+
constructor(diagnostics, formattedMessage) {
|
|
30
|
+
super("COMPILE_ERROR", formattedMessage);
|
|
31
|
+
this.name = "CompileError";
|
|
32
|
+
this.diagnostics = diagnostics;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var DisposedError = class extends ManifestoError {
|
|
36
|
+
constructor() {
|
|
37
|
+
super("DISPOSED", "Cannot use a disposed Manifesto runtime");
|
|
38
|
+
this.name = "DisposedError";
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var AlreadyActivatedError = class extends ManifestoError {
|
|
42
|
+
constructor() {
|
|
43
|
+
super("ALREADY_ACTIVATED", "ComposableManifesto.activate() may only be called once");
|
|
44
|
+
this.name = "AlreadyActivatedError";
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// src/internal.ts
|
|
49
|
+
var ACTION_PARAM_NAMES = /* @__PURE__ */ Symbol("manifesto-sdk.action-param-names");
|
|
50
|
+
var RUNTIME_KERNEL_FACTORY = /* @__PURE__ */ Symbol("manifesto-sdk.runtime-kernel-factory");
|
|
51
|
+
function attachRuntimeKernelFactory(manifesto, factory) {
|
|
52
|
+
Object.defineProperty(manifesto, RUNTIME_KERNEL_FACTORY, {
|
|
53
|
+
enumerable: false,
|
|
54
|
+
configurable: false,
|
|
55
|
+
writable: false,
|
|
56
|
+
value: factory
|
|
57
|
+
});
|
|
58
|
+
return manifesto;
|
|
59
|
+
}
|
|
60
|
+
function getRuntimeKernelFactory(manifesto) {
|
|
61
|
+
const internal = manifesto;
|
|
62
|
+
const factory = internal[RUNTIME_KERNEL_FACTORY];
|
|
63
|
+
if (typeof factory !== "function") {
|
|
64
|
+
throw new ManifestoError(
|
|
65
|
+
"SCHEMA_ERROR",
|
|
66
|
+
"ComposableManifesto is missing its runtime kernel factory"
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
return factory;
|
|
70
|
+
}
|
|
71
|
+
function createRuntimeKernel({
|
|
72
|
+
schema,
|
|
73
|
+
host,
|
|
74
|
+
MEL,
|
|
75
|
+
createIntent
|
|
76
|
+
}) {
|
|
77
|
+
const initialSnapshot = host.getSnapshot();
|
|
78
|
+
if (!initialSnapshot) {
|
|
79
|
+
throw new ManifestoError("SCHEMA_ERROR", "Host failed to initialize its genesis snapshot");
|
|
80
|
+
}
|
|
81
|
+
let visibleSnapshot = initialSnapshot;
|
|
82
|
+
let dispatchQueue = Promise.resolve();
|
|
83
|
+
let disposed = false;
|
|
84
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
85
|
+
const eventListeners = /* @__PURE__ */ new Map();
|
|
86
|
+
function subscribe(selector, listener) {
|
|
87
|
+
if (disposed) {
|
|
88
|
+
return () => {
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
let lastValue;
|
|
92
|
+
let initialized = false;
|
|
93
|
+
try {
|
|
94
|
+
lastValue = selector(snapshotForSelector(visibleSnapshot));
|
|
95
|
+
initialized = true;
|
|
96
|
+
} catch {
|
|
97
|
+
lastValue = void 0;
|
|
98
|
+
initialized = false;
|
|
99
|
+
}
|
|
100
|
+
const subscriber = {
|
|
101
|
+
selector,
|
|
102
|
+
listener,
|
|
103
|
+
lastValue,
|
|
104
|
+
initialized
|
|
105
|
+
};
|
|
106
|
+
subscribers.add(subscriber);
|
|
107
|
+
return () => {
|
|
108
|
+
subscribers.delete(subscriber);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function on(event, handler) {
|
|
112
|
+
if (disposed) {
|
|
113
|
+
return () => {
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
let listeners = eventListeners.get(event);
|
|
117
|
+
if (!listeners) {
|
|
118
|
+
listeners = /* @__PURE__ */ new Set();
|
|
119
|
+
eventListeners.set(
|
|
120
|
+
event,
|
|
121
|
+
listeners
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
listeners.add(handler);
|
|
125
|
+
return () => {
|
|
126
|
+
listeners?.delete(handler);
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function getSnapshot() {
|
|
130
|
+
return freezeSnapshot(visibleSnapshot);
|
|
131
|
+
}
|
|
132
|
+
function getAvailableActions() {
|
|
133
|
+
return queryAvailableActions(schema, visibleSnapshot);
|
|
134
|
+
}
|
|
135
|
+
function isActionAvailable(name) {
|
|
136
|
+
return queryActionAvailable(schema, visibleSnapshot, String(name));
|
|
137
|
+
}
|
|
138
|
+
function dispose() {
|
|
139
|
+
if (disposed) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
disposed = true;
|
|
143
|
+
subscribers.clear();
|
|
144
|
+
eventListeners.clear();
|
|
145
|
+
}
|
|
146
|
+
function setVisibleSnapshot(snapshot, options) {
|
|
147
|
+
visibleSnapshot = structuredClone(snapshot);
|
|
148
|
+
host.reset(visibleSnapshot);
|
|
149
|
+
const publishedSnapshot = freezeSnapshot(visibleSnapshot);
|
|
150
|
+
if (options?.notify !== false) {
|
|
151
|
+
notifySubscribers(publishedSnapshot);
|
|
152
|
+
}
|
|
153
|
+
return publishedSnapshot;
|
|
154
|
+
}
|
|
155
|
+
function restoreVisibleSnapshot() {
|
|
156
|
+
host.reset(visibleSnapshot);
|
|
157
|
+
}
|
|
158
|
+
function emitEvent(event, payload) {
|
|
159
|
+
const listeners = eventListeners.get(event);
|
|
160
|
+
if (!listeners) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
for (const handler of listeners) {
|
|
164
|
+
try {
|
|
165
|
+
handler(payload);
|
|
166
|
+
} catch {
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function enqueue(task) {
|
|
171
|
+
const result = dispatchQueue.catch(() => {
|
|
172
|
+
}).then(task);
|
|
173
|
+
dispatchQueue = result.then(() => void 0, () => void 0);
|
|
174
|
+
return result;
|
|
175
|
+
}
|
|
176
|
+
function ensureIntentId(intent) {
|
|
177
|
+
if (intent.intentId && intent.intentId.length > 0) {
|
|
178
|
+
return intent;
|
|
179
|
+
}
|
|
180
|
+
return {
|
|
181
|
+
...intent,
|
|
182
|
+
intentId: generateUUID()
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
async function executeHost(intent) {
|
|
186
|
+
return host.dispatch(intent);
|
|
187
|
+
}
|
|
188
|
+
function rejectUnavailable(intent) {
|
|
189
|
+
const error = new ManifestoError(
|
|
190
|
+
"ACTION_UNAVAILABLE",
|
|
191
|
+
`Action "${intent.type}" is unavailable against the current visible snapshot`
|
|
192
|
+
);
|
|
193
|
+
emitEvent("dispatch:rejected", {
|
|
194
|
+
intentId: intent.intentId ?? "",
|
|
195
|
+
intent,
|
|
196
|
+
reason: error.message
|
|
197
|
+
});
|
|
198
|
+
throw error;
|
|
199
|
+
}
|
|
200
|
+
function notifySubscribers(snapshot) {
|
|
201
|
+
for (const subscriber of subscribers) {
|
|
202
|
+
let selected;
|
|
203
|
+
try {
|
|
204
|
+
selected = subscriber.selector(snapshot);
|
|
205
|
+
} catch {
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
if (subscriber.initialized && Object.is(subscriber.lastValue, selected)) {
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
subscriber.lastValue = selected;
|
|
212
|
+
subscriber.initialized = true;
|
|
213
|
+
try {
|
|
214
|
+
subscriber.listener(selected);
|
|
215
|
+
} catch {
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return {
|
|
220
|
+
schema,
|
|
221
|
+
MEL,
|
|
222
|
+
createIntent,
|
|
223
|
+
subscribe,
|
|
224
|
+
on,
|
|
225
|
+
getSnapshot,
|
|
226
|
+
getAvailableActions,
|
|
227
|
+
isActionAvailable,
|
|
228
|
+
dispose,
|
|
229
|
+
isDisposed: () => disposed,
|
|
230
|
+
getVisibleCoreSnapshot: () => structuredClone(visibleSnapshot),
|
|
231
|
+
setVisibleSnapshot,
|
|
232
|
+
restoreVisibleSnapshot,
|
|
233
|
+
emitEvent,
|
|
234
|
+
enqueue,
|
|
235
|
+
ensureIntentId,
|
|
236
|
+
executeHost,
|
|
237
|
+
rejectUnavailable
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
function createBaseRuntimeInstance(kernel) {
|
|
241
|
+
async function processIntent(intent) {
|
|
242
|
+
if (kernel.isDisposed()) {
|
|
243
|
+
throw new DisposedError();
|
|
244
|
+
}
|
|
245
|
+
if (!kernel.isActionAvailable(intent.type)) {
|
|
246
|
+
return kernel.rejectUnavailable(intent);
|
|
247
|
+
}
|
|
248
|
+
let result;
|
|
249
|
+
try {
|
|
250
|
+
result = await kernel.executeHost(intent);
|
|
251
|
+
} catch (error) {
|
|
252
|
+
const failure = toError(error);
|
|
253
|
+
kernel.emitEvent("dispatch:failed", {
|
|
254
|
+
intentId: intent.intentId ?? "",
|
|
255
|
+
intent,
|
|
256
|
+
error: failure
|
|
257
|
+
});
|
|
258
|
+
throw failure;
|
|
259
|
+
}
|
|
260
|
+
if (result.status === "error") {
|
|
261
|
+
const publishedSnapshot2 = kernel.setVisibleSnapshot(result.snapshot);
|
|
262
|
+
const failure = result.error ?? new ManifestoError("HOST_ERROR", "Host dispatch failed");
|
|
263
|
+
kernel.emitEvent("dispatch:failed", {
|
|
264
|
+
intentId: intent.intentId ?? "",
|
|
265
|
+
intent,
|
|
266
|
+
error: failure,
|
|
267
|
+
snapshot: publishedSnapshot2
|
|
268
|
+
});
|
|
269
|
+
throw failure;
|
|
270
|
+
}
|
|
271
|
+
const publishedSnapshot = kernel.setVisibleSnapshot(result.snapshot);
|
|
272
|
+
kernel.emitEvent("dispatch:completed", {
|
|
273
|
+
intentId: intent.intentId ?? "",
|
|
274
|
+
intent,
|
|
275
|
+
snapshot: publishedSnapshot
|
|
276
|
+
});
|
|
277
|
+
return publishedSnapshot;
|
|
278
|
+
}
|
|
279
|
+
function dispatchAsync(intent) {
|
|
280
|
+
if (kernel.isDisposed()) {
|
|
281
|
+
return Promise.reject(new DisposedError());
|
|
282
|
+
}
|
|
283
|
+
const enrichedIntent = kernel.ensureIntentId(intent);
|
|
284
|
+
return kernel.enqueue(() => processIntent(enrichedIntent));
|
|
285
|
+
}
|
|
286
|
+
return {
|
|
287
|
+
createIntent: kernel.createIntent,
|
|
288
|
+
dispatchAsync,
|
|
289
|
+
subscribe: kernel.subscribe,
|
|
290
|
+
on: kernel.on,
|
|
291
|
+
getSnapshot: kernel.getSnapshot,
|
|
292
|
+
getAvailableActions: kernel.getAvailableActions,
|
|
293
|
+
isActionAvailable: kernel.isActionAvailable,
|
|
294
|
+
MEL: kernel.MEL,
|
|
295
|
+
schema: kernel.schema,
|
|
296
|
+
dispose: kernel.dispose
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
function snapshotForSelector(snapshot) {
|
|
300
|
+
return freezeSnapshot(snapshot);
|
|
301
|
+
}
|
|
302
|
+
function freezeSnapshot(snapshot) {
|
|
303
|
+
return Object.freeze(structuredClone(snapshot));
|
|
304
|
+
}
|
|
305
|
+
function toError(error) {
|
|
306
|
+
return error instanceof Error ? error : new Error(String(error));
|
|
307
|
+
}
|
|
308
|
+
function generateUUID() {
|
|
309
|
+
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
|
|
310
|
+
return crypto.randomUUID();
|
|
311
|
+
}
|
|
312
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (char) => {
|
|
313
|
+
const random = Math.random() * 16 | 0;
|
|
314
|
+
const value = char === "x" ? random : random & 3 | 8;
|
|
315
|
+
return value.toString(16);
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export {
|
|
320
|
+
ManifestoError,
|
|
321
|
+
ReservedEffectError,
|
|
322
|
+
CompileError,
|
|
323
|
+
DisposedError,
|
|
324
|
+
AlreadyActivatedError,
|
|
325
|
+
ACTION_PARAM_NAMES,
|
|
326
|
+
RUNTIME_KERNEL_FACTORY,
|
|
327
|
+
attachRuntimeKernelFactory,
|
|
328
|
+
getRuntimeKernelFactory,
|
|
329
|
+
createRuntimeKernel,
|
|
330
|
+
createBaseRuntimeInstance
|
|
331
|
+
};
|
|
332
|
+
//# sourceMappingURL=chunk-CMZQTFX2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/internal.ts","../src/errors.ts"],"sourcesContent":["import {\n getAvailableActions as queryAvailableActions,\n isActionAvailable as queryActionAvailable,\n type DomainSchema,\n type Intent,\n type Snapshot as CoreSnapshot,\n} from \"@manifesto-ai/core\";\nimport type { HostResult, ManifestoHost } from \"@manifesto-ai/host\";\n\nimport {\n DisposedError,\n ManifestoError,\n} from \"./errors.js\";\nimport type {\n BaseLaws,\n ComposableManifesto,\n ManifestoBaseInstance,\n ManifestoDomainShape,\n ManifestoEvent,\n ManifestoEventMap,\n Selector,\n Snapshot,\n TypedCreateIntent,\n TypedMEL,\n TypedOn,\n TypedSubscribe,\n Unsubscribe,\n} from \"./types.js\";\n\nexport const ACTION_PARAM_NAMES = Symbol(\"manifesto-sdk.action-param-names\");\nexport const RUNTIME_KERNEL_FACTORY = Symbol(\"manifesto-sdk.runtime-kernel-factory\");\n\ninterface Subscriber<TState, R> {\n readonly selector: Selector<TState, R>;\n readonly listener: (value: R) => void;\n lastValue: R | undefined;\n initialized: boolean;\n}\n\nexport interface RuntimeKernel<T extends ManifestoDomainShape> {\n readonly schema: DomainSchema;\n readonly MEL: TypedMEL<T>;\n readonly createIntent: TypedCreateIntent<T>;\n readonly subscribe: TypedSubscribe<T>;\n readonly on: TypedOn<T>;\n readonly getSnapshot: () => Snapshot<T[\"state\"]>;\n readonly getAvailableActions: () => readonly (keyof T[\"actions\"])[];\n readonly isActionAvailable: (name: keyof T[\"actions\"]) => boolean;\n readonly dispose: () => void;\n readonly isDisposed: () => boolean;\n readonly getVisibleCoreSnapshot: () => CoreSnapshot;\n readonly setVisibleSnapshot: (\n snapshot: CoreSnapshot,\n options?: { readonly notify?: boolean },\n ) => Snapshot<T[\"state\"]>;\n readonly restoreVisibleSnapshot: () => void;\n readonly emitEvent: <K extends ManifestoEvent>(\n event: K,\n payload: ManifestoEventMap<T>[K],\n ) => void;\n readonly enqueue: <R>(task: () => Promise<R>) => Promise<R>;\n readonly ensureIntentId: (intent: Intent) => Intent;\n readonly executeHost: (intent: Intent) => Promise<HostResult>;\n readonly rejectUnavailable: (intent: Intent) => never;\n}\n\nexport type RuntimeKernelFactory<T extends ManifestoDomainShape> = () => RuntimeKernel<T>;\n\nexport type InternalComposableManifesto<\n T extends ManifestoDomainShape,\n Laws extends BaseLaws,\n> = ComposableManifesto<T, Laws> & {\n readonly [RUNTIME_KERNEL_FACTORY]: RuntimeKernelFactory<T>;\n};\n\ntype RuntimeKernelOptions<T extends ManifestoDomainShape> = {\n readonly schema: DomainSchema;\n readonly host: ManifestoHost;\n readonly MEL: TypedMEL<T>;\n readonly createIntent: TypedCreateIntent<T>;\n};\n\nexport function attachRuntimeKernelFactory<\n T extends ManifestoDomainShape,\n Laws extends BaseLaws,\n>(\n manifesto: ComposableManifesto<T, Laws>,\n factory: RuntimeKernelFactory<T>,\n): InternalComposableManifesto<T, Laws> {\n Object.defineProperty(manifesto, RUNTIME_KERNEL_FACTORY, {\n enumerable: false,\n configurable: false,\n writable: false,\n value: factory,\n });\n\n return manifesto as InternalComposableManifesto<T, Laws>;\n}\n\nexport function getRuntimeKernelFactory<\n T extends ManifestoDomainShape,\n Laws extends BaseLaws,\n>(\n manifesto: ComposableManifesto<T, Laws>,\n): RuntimeKernelFactory<T> {\n const internal = manifesto as Partial<InternalComposableManifesto<T, Laws>>;\n const factory = internal[RUNTIME_KERNEL_FACTORY];\n\n if (typeof factory !== \"function\") {\n throw new ManifestoError(\n \"SCHEMA_ERROR\",\n \"ComposableManifesto is missing its runtime kernel factory\",\n );\n }\n\n return factory;\n}\n\nexport function createRuntimeKernel<T extends ManifestoDomainShape>({\n schema,\n host,\n MEL,\n createIntent,\n}: RuntimeKernelOptions<T>): RuntimeKernel<T> {\n const initialSnapshot = host.getSnapshot();\n if (!initialSnapshot) {\n throw new ManifestoError(\"SCHEMA_ERROR\", \"Host failed to initialize its genesis snapshot\");\n }\n\n let visibleSnapshot: CoreSnapshot = initialSnapshot;\n let dispatchQueue: Promise<void> = Promise.resolve();\n let disposed = false;\n\n const subscribers = new Set<Subscriber<T[\"state\"], unknown>>();\n const eventListeners = new Map<\n ManifestoEvent,\n Set<(payload: ManifestoEventMap<T>[ManifestoEvent]) => void>\n >();\n\n function subscribe<R>(\n selector: Selector<T[\"state\"], R>,\n listener: (value: R) => void,\n ): Unsubscribe {\n if (disposed) {\n return () => {};\n }\n\n let lastValue: R | undefined;\n let initialized = false;\n\n try {\n lastValue = selector(snapshotForSelector<T[\"state\"]>(visibleSnapshot));\n initialized = true;\n } catch {\n lastValue = undefined;\n initialized = false;\n }\n\n const subscriber: Subscriber<T[\"state\"], R> = {\n selector,\n listener,\n lastValue,\n initialized,\n };\n\n subscribers.add(subscriber as Subscriber<T[\"state\"], unknown>);\n return () => {\n subscribers.delete(subscriber as Subscriber<T[\"state\"], unknown>);\n };\n }\n\n function on<K extends ManifestoEvent>(\n event: K,\n handler: (payload: ManifestoEventMap<T>[K]) => void,\n ): Unsubscribe {\n if (disposed) {\n return () => {};\n }\n\n let listeners = eventListeners.get(event);\n if (!listeners) {\n listeners = new Set();\n eventListeners.set(\n event,\n listeners as Set<(payload: ManifestoEventMap<T>[ManifestoEvent]) => void>,\n );\n }\n\n listeners.add(handler as (payload: ManifestoEventMap<T>[ManifestoEvent]) => void);\n return () => {\n listeners?.delete(handler as (payload: ManifestoEventMap<T>[ManifestoEvent]) => void);\n };\n }\n\n function getSnapshot(): Snapshot<T[\"state\"]> {\n return freezeSnapshot(visibleSnapshot) as Snapshot<T[\"state\"]>;\n }\n\n function getAvailableActions(): readonly (keyof T[\"actions\"])[] {\n return queryAvailableActions(schema, visibleSnapshot) as readonly (keyof T[\"actions\"])[];\n }\n\n function isActionAvailable(name: keyof T[\"actions\"]): boolean {\n return queryActionAvailable(schema, visibleSnapshot, String(name));\n }\n\n function dispose(): void {\n if (disposed) {\n return;\n }\n\n disposed = true;\n subscribers.clear();\n eventListeners.clear();\n }\n\n function setVisibleSnapshot(\n snapshot: CoreSnapshot,\n options?: { readonly notify?: boolean },\n ): Snapshot<T[\"state\"]> {\n visibleSnapshot = structuredClone(snapshot);\n host.reset(visibleSnapshot);\n\n const publishedSnapshot = freezeSnapshot(visibleSnapshot) as Snapshot<T[\"state\"]>;\n if (options?.notify !== false) {\n notifySubscribers(publishedSnapshot);\n }\n return publishedSnapshot;\n }\n\n function restoreVisibleSnapshot(): void {\n host.reset(visibleSnapshot);\n }\n\n function emitEvent<K extends ManifestoEvent>(\n event: K,\n payload: ManifestoEventMap<T>[K],\n ): void {\n const listeners = eventListeners.get(event);\n if (!listeners) {\n return;\n }\n\n for (const handler of listeners) {\n try {\n handler(payload);\n } catch {\n // Event handler failures are isolated from runtime semantics.\n }\n }\n }\n\n function enqueue<R>(task: () => Promise<R>): Promise<R> {\n const result = dispatchQueue\n .catch(() => {})\n .then(task);\n\n dispatchQueue = result.then(() => undefined, () => undefined);\n return result;\n }\n\n function ensureIntentId(intent: Intent): Intent {\n if (intent.intentId && intent.intentId.length > 0) {\n return intent;\n }\n\n return {\n ...intent,\n intentId: generateUUID(),\n };\n }\n\n async function executeHost(intent: Intent): Promise<HostResult> {\n return host.dispatch(intent);\n }\n\n function rejectUnavailable(intent: Intent): never {\n const error = new ManifestoError(\n \"ACTION_UNAVAILABLE\",\n `Action \"${intent.type}\" is unavailable against the current visible snapshot`,\n );\n emitEvent(\"dispatch:rejected\", {\n intentId: intent.intentId ?? \"\",\n intent,\n reason: error.message,\n });\n throw error;\n }\n\n function notifySubscribers(snapshot: Snapshot<T[\"state\"]>): void {\n for (const subscriber of subscribers) {\n let selected: unknown;\n try {\n selected = subscriber.selector(snapshot);\n } catch {\n continue;\n }\n\n if (subscriber.initialized && Object.is(subscriber.lastValue, selected)) {\n continue;\n }\n\n subscriber.lastValue = selected;\n subscriber.initialized = true;\n\n try {\n subscriber.listener(selected);\n } catch {\n // Listener failures are isolated from runtime semantics.\n }\n }\n }\n\n return {\n schema,\n MEL,\n createIntent,\n subscribe,\n on,\n getSnapshot,\n getAvailableActions,\n isActionAvailable,\n dispose,\n isDisposed: () => disposed,\n getVisibleCoreSnapshot: () => structuredClone(visibleSnapshot),\n setVisibleSnapshot,\n restoreVisibleSnapshot,\n emitEvent,\n enqueue,\n ensureIntentId,\n executeHost,\n rejectUnavailable,\n };\n}\n\nexport function createBaseRuntimeInstance<T extends ManifestoDomainShape>(\n kernel: RuntimeKernel<T>,\n): ManifestoBaseInstance<T> {\n async function processIntent(intent: Intent): Promise<Snapshot<T[\"state\"]>> {\n if (kernel.isDisposed()) {\n throw new DisposedError();\n }\n\n if (!kernel.isActionAvailable(intent.type as keyof T[\"actions\"])) {\n return kernel.rejectUnavailable(intent);\n }\n\n let result: HostResult;\n try {\n result = await kernel.executeHost(intent);\n } catch (error) {\n const failure = toError(error);\n kernel.emitEvent(\"dispatch:failed\", {\n intentId: intent.intentId ?? \"\",\n intent,\n error: failure,\n });\n throw failure;\n }\n\n if (result.status === \"error\") {\n const publishedSnapshot = kernel.setVisibleSnapshot(result.snapshot);\n const failure = result.error ?? new ManifestoError(\"HOST_ERROR\", \"Host dispatch failed\");\n kernel.emitEvent(\"dispatch:failed\", {\n intentId: intent.intentId ?? \"\",\n intent,\n error: failure,\n snapshot: publishedSnapshot,\n });\n throw failure;\n }\n\n const publishedSnapshot = kernel.setVisibleSnapshot(result.snapshot);\n kernel.emitEvent(\"dispatch:completed\", {\n intentId: intent.intentId ?? \"\",\n intent,\n snapshot: publishedSnapshot,\n });\n return publishedSnapshot;\n }\n\n function dispatchAsync(intent: Intent): Promise<Snapshot<T[\"state\"]>> {\n if (kernel.isDisposed()) {\n return Promise.reject(new DisposedError());\n }\n\n const enrichedIntent = kernel.ensureIntentId(intent);\n return kernel.enqueue(() => processIntent(enrichedIntent));\n }\n\n return {\n createIntent: kernel.createIntent,\n dispatchAsync,\n subscribe: kernel.subscribe,\n on: kernel.on,\n getSnapshot: kernel.getSnapshot,\n getAvailableActions: kernel.getAvailableActions,\n isActionAvailable: kernel.isActionAvailable,\n MEL: kernel.MEL,\n schema: kernel.schema,\n dispose: kernel.dispose,\n };\n}\n\nfunction snapshotForSelector<TState>(snapshot: CoreSnapshot): Snapshot<TState> {\n return freezeSnapshot(snapshot) as Snapshot<TState>;\n}\n\nfunction freezeSnapshot<TData = unknown>(snapshot: CoreSnapshot): Snapshot<TData> {\n return Object.freeze(structuredClone(snapshot)) as Snapshot<TData>;\n}\n\nfunction toError(error: unknown): Error {\n return error instanceof Error\n ? error\n : new Error(String(error));\n}\n\nfunction generateUUID(): string {\n if (typeof crypto !== \"undefined\" && typeof crypto.randomUUID === \"function\") {\n return crypto.randomUUID();\n }\n\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, (char) => {\n const random = (Math.random() * 16) | 0;\n const value = char === \"x\" ? random : (random & 0x3) | 0x8;\n return value.toString(16);\n });\n}\n","export class ManifestoError extends Error {\n readonly code: string;\n\n constructor(code: string, message: string, options?: ErrorOptions) {\n super(message, options);\n this.name = \"ManifestoError\";\n this.code = code;\n }\n}\n\nexport class ReservedEffectError extends ManifestoError {\n readonly effectType: string;\n\n constructor(effectType: string) {\n super(\n \"RESERVED_EFFECT\",\n `Effect type \"${effectType}\" is reserved and cannot be overridden`,\n );\n this.name = \"ReservedEffectError\";\n this.effectType = effectType;\n }\n}\n\nexport interface CompileDiagnostic {\n readonly severity: \"error\" | \"warning\" | \"info\";\n readonly code: string;\n readonly message: string;\n readonly location: {\n readonly start: { readonly line: number; readonly column: number; readonly offset: number };\n readonly end: { readonly line: number; readonly column: number; readonly offset: number };\n };\n readonly source?: string;\n readonly suggestion?: string;\n}\n\nexport class CompileError extends ManifestoError {\n readonly diagnostics: readonly CompileDiagnostic[];\n\n constructor(diagnostics: readonly CompileDiagnostic[], formattedMessage: string) {\n super(\"COMPILE_ERROR\", formattedMessage);\n this.name = \"CompileError\";\n this.diagnostics = diagnostics;\n }\n}\n\nexport class DisposedError extends ManifestoError {\n constructor() {\n super(\"DISPOSED\", \"Cannot use a disposed Manifesto runtime\");\n this.name = \"DisposedError\";\n }\n}\n\nexport class AlreadyActivatedError extends ManifestoError {\n constructor() {\n super(\"ALREADY_ACTIVATED\", \"ComposableManifesto.activate() may only be called once\");\n this.name = \"AlreadyActivatedError\";\n }\n}\n"],"mappings":";AAAA;AAAA,EACE,uBAAuB;AAAA,EACvB,qBAAqB;AAAA,OAIhB;;;ACNA,IAAM,iBAAN,cAA6B,MAAM;AAAA,EAC/B;AAAA,EAET,YAAY,MAAc,SAAiB,SAAwB;AACjE,UAAM,SAAS,OAAO;AACtB,SAAK,OAAO;AACZ,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,sBAAN,cAAkC,eAAe;AAAA,EAC7C;AAAA,EAET,YAAY,YAAoB;AAC9B;AAAA,MACE;AAAA,MACA,gBAAgB,UAAU;AAAA,IAC5B;AACA,SAAK,OAAO;AACZ,SAAK,aAAa;AAAA,EACpB;AACF;AAcO,IAAM,eAAN,cAA2B,eAAe;AAAA,EACtC;AAAA,EAET,YAAY,aAA2C,kBAA0B;AAC/E,UAAM,iBAAiB,gBAAgB;AACvC,SAAK,OAAO;AACZ,SAAK,cAAc;AAAA,EACrB;AACF;AAEO,IAAM,gBAAN,cAA4B,eAAe;AAAA,EAChD,cAAc;AACZ,UAAM,YAAY,yCAAyC;AAC3D,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,wBAAN,cAAoC,eAAe;AAAA,EACxD,cAAc;AACZ,UAAM,qBAAqB,wDAAwD;AACnF,SAAK,OAAO;AAAA,EACd;AACF;;;AD5BO,IAAM,qBAAqB,uBAAO,kCAAkC;AACpE,IAAM,yBAAyB,uBAAO,sCAAsC;AAoD5E,SAAS,2BAId,WACA,SACsC;AACtC,SAAO,eA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