@lloyal-labs/dev-tools 0.4.2 → 0.5.0-alpha.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.
- package/dist/index.d.ts +134 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +219 -32
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +7 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +280 -13
- package/dist/react.js.map +1 -1
- package/dist/store.d.ts +8 -3
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +13 -10
- package/dist/store.js.map +1 -1
- package/package.json +3 -3
package/dist/store.js
CHANGED
|
@@ -13,19 +13,18 @@
|
|
|
13
13
|
* are the same clock: a token stream never causes per-token renders.
|
|
14
14
|
*/
|
|
15
15
|
import { createStore } from 'zustand/vanilla';
|
|
16
|
-
import { createPaneModel, foldEvent, isLive } from './index.js';
|
|
16
|
+
import { createPaneModel, foldEvent, isLive, DEFAULT_FRAMING } from './index.js';
|
|
17
17
|
/** Live-edge quantum, ms — capsules grow and repaints happen on this grid. */
|
|
18
18
|
export const EDGE_STEP = 1000;
|
|
19
19
|
/** Event types whose arrival repaints immediately — everything a human reads
|
|
20
20
|
* as "something happened" rather than "the stream is flowing". */
|
|
21
|
-
const STRUCTURAL =
|
|
22
|
-
'config:loaded', 'config:updated', 'ready', 'abilities:state',
|
|
23
|
-
'plan:start', 'query', 'research:start', 'synthesize:start', 'plan',
|
|
21
|
+
const STRUCTURAL = [
|
|
22
|
+
'config:loaded', 'config:updated', 'ready', 'abilities:state', 'plan',
|
|
24
23
|
'agent:spawn', 'agent:done', 'agent:failed', 'agent:recovered',
|
|
25
24
|
'agent:return', 'agent:tool_call', 'agent:tool_result', 'agent:trace',
|
|
26
25
|
'run:paused', 'run:resumed', 'run:windingDown',
|
|
27
26
|
'answer', 'error',
|
|
28
|
-
]
|
|
27
|
+
];
|
|
29
28
|
/** One store per bridge, for the LIFETIME of the page. A React remount
|
|
30
29
|
* (fast refresh, StrictMode, lazy mounting) must REATTACH to the running
|
|
31
30
|
* fold, not restart it — a fresh store mid-run would miss the wire gate's
|
|
@@ -35,16 +34,20 @@ const STRUCTURAL = new Set([
|
|
|
35
34
|
* pane's; on today's contract a reload starts a new session, whose fresh
|
|
36
35
|
* stream re-opens the gate naturally. */
|
|
37
36
|
const STORES = new WeakMap();
|
|
38
|
-
export function devStoreFor(bridge) {
|
|
37
|
+
export function devStoreFor(bridge, framing) {
|
|
39
38
|
let store = STORES.get(bridge);
|
|
40
39
|
if (!store) {
|
|
41
|
-
store = createDevStore(bridge);
|
|
40
|
+
store = createDevStore(bridge, framing);
|
|
42
41
|
STORES.set(bridge, store);
|
|
43
42
|
}
|
|
44
43
|
return store;
|
|
45
44
|
}
|
|
46
|
-
export function createDevStore(bridge) {
|
|
45
|
+
export function createDevStore(bridge, framing = DEFAULT_FRAMING) {
|
|
47
46
|
const model = createPaneModel();
|
|
47
|
+
// Framing markers repaint immediately too — they are run boundaries.
|
|
48
|
+
const structural = new Set([
|
|
49
|
+
...STRUCTURAL, ...framing.open, ...framing.close, ...Object.keys(framing.phases),
|
|
50
|
+
]);
|
|
48
51
|
const store = createStore(() => ({
|
|
49
52
|
model,
|
|
50
53
|
rev: 0,
|
|
@@ -74,11 +77,11 @@ export function createDevStore(bridge) {
|
|
|
74
77
|
// a production stream pays one string compare per event, nothing more.
|
|
75
78
|
if (!model.dev && ev.type !== 'config:loaded')
|
|
76
79
|
return;
|
|
77
|
-
foldEvent(model, ev, performance.now());
|
|
80
|
+
foldEvent(model, ev, performance.now(), framing);
|
|
78
81
|
if (!model.dev)
|
|
79
82
|
return;
|
|
80
83
|
ensureTimer();
|
|
81
|
-
if (
|
|
84
|
+
if (structural.has(ev.type))
|
|
82
85
|
paint();
|
|
83
86
|
else
|
|
84
87
|
dirty = true;
|
package/dist/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store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KAAK,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,KAAK,eAAe;YAAE,OAAO;QACtD,SAAS,CAAC,KAAK,EAAE,EAAc,EAAE,WAAW,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC;QAC7D,IAAI,CAAC,KAAK,CAAC,GAAG;YAAE,OAAO;QACvB,WAAW,EAAE,CAAC;QACd,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;YAAE,KAAK,EAAE,CAAC;;YAChC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;QAC1B,IAAI,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QAChD,OAAO,EAAE,GAAG,EAAE;YACZ,GAAG,EAAE,CAAC;YACN,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gBAAC,KAAK,GAAG,IAAI,CAAC;YAAC,CAAC;QAC7D,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lloyal-labs/dev-tools",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "The dev pane for scaffolded harnesses
|
|
3
|
+
"version": "0.5.0-alpha.2",
|
|
4
|
+
"description": "The dev pane for scaffolded harnesses — timeline, sources, and settings over the event bus, gated by the runner's dev signal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"build": "tsc -p tsconfig.json"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@lloyal-labs/rig": "
|
|
55
|
+
"@lloyal-labs/rig": "5.6.0-alpha.2",
|
|
56
56
|
"zustand": "^5.0.15"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|