@assistant-ui/react-statewire 0.6.2 → 0.6.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runsOptimistic.d.ts","names":[],"sources":["../src/runsOptimistic.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"runsOptimistic.d.ts","names":[],"sources":["../src/runsOptimistic.ts"],"mappings":";;;cA0Ha,iBACX,gBACA,SAAS,UAAU,QAAQ,mBAAmB,2BAC9C,KAAK,gBAAgB"}
|
package/dist/runsOptimistic.js
CHANGED
|
@@ -37,16 +37,24 @@ const enqueueOrSteer = (draft, command, runId) => {
|
|
|
37
37
|
if (!("message" in command)) return;
|
|
38
38
|
entry = { ...command.message };
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
const steer = command.type === "run/steer";
|
|
41
|
+
if (steer ? draft.status === "ready" || draft.status === "input-required" : sourceLane === void 0 && (draft.status === "ready" || (draft.status === "stopped" || draft.status === "error") && run !== void 0 && run.queue.length === 0 && run.steerQueue.length === 0)) {
|
|
42
42
|
startRun(draft, runId);
|
|
43
|
+
const target = draft.runs[0];
|
|
44
|
+
if (steer) {
|
|
45
|
+
if (sourceLane === target.steerQueue) target.steerQueue.splice(sourceIndex, 0, entry);
|
|
46
|
+
else target.steerQueue.push(entry);
|
|
47
|
+
target.dispatching.push(...target.steerQueue.splice(0));
|
|
48
|
+
} else target.dispatching.push(entry);
|
|
43
49
|
return;
|
|
44
50
|
}
|
|
51
|
+
const continues = steer && draft.status !== "running";
|
|
45
52
|
if (run === void 0) return;
|
|
46
|
-
const lane =
|
|
53
|
+
const lane = steer ? run.steerQueue : run.queue;
|
|
47
54
|
const hasPlacement = command.insertAfter !== void 0 || command.insertBefore !== void 0;
|
|
48
55
|
if (sourceLane === lane && !hasPlacement) lane.splice(sourceIndex, 0, entry);
|
|
49
56
|
else insert(lane, entry, command);
|
|
57
|
+
if (continues) startRun(draft, runId);
|
|
50
58
|
};
|
|
51
59
|
/** The run dialect's optimistic reducer: folds an unsettled `run/*` command into the mount draft. */
|
|
52
60
|
const runsOptimistic = (mount, command, ctx) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runsOptimistic.js","names":["Statewire","StatewireClient","StatewireThread","LaneEntry","id","role","parts","TextPart","FilePart","metadata","Record","meta","RunEntry","runId","status","RunStatus","queue","steerQueue","dispatching","inputRequests","response","error","runLeafMessageId","RunsDraft","runs","startRun","draft","entry","insert","lane","insertAfter","insertBefore","Placement","index","undefined","findIndex","e","length","splice","enqueueOrSteer","command","RunEnqueueCommand","RunSteerCommand","run","message","messageId","some","sourceLane","find","l","sourceIndex","type","hasPlacement","runsOptimistic","mount","Command","args","ctx","OptimisticContext","seq","method","params","RunDequeueCommand","requestId","RunInputCommand","requests","
|
|
1
|
+
{"version":3,"file":"runsOptimistic.js","names":["Statewire","StatewireClient","StatewireThread","LaneEntry","id","role","parts","TextPart","FilePart","metadata","Record","meta","RunEntry","runId","status","RunStatus","queue","steerQueue","dispatching","inputRequests","response","error","runLeafMessageId","RunsDraft","runs","startRun","draft","entry","insert","lane","insertAfter","insertBefore","Placement","index","undefined","findIndex","e","length","splice","enqueueOrSteer","command","RunEnqueueCommand","RunSteerCommand","run","message","messageId","some","sourceLane","find","l","sourceIndex","steer","type","direct","target","push","continues","hasPlacement","runsOptimistic","mount","Command","args","ctx","OptimisticContext","seq","method","params","RunDequeueCommand","requestId","RunInputCommand","requests","r","every"],"sources":["../src/runsOptimistic.ts"],"sourcesContent":["import type { Statewire, StatewireClient } from \"statewire\";\nimport type { StatewireThread } from \"./StatewireThread\";\n\ntype LaneEntry = {\n id: string;\n role: \"user\";\n parts: readonly (StatewireThread.TextPart | StatewireThread.FilePart)[];\n metadata?: Record<string, unknown>;\n meta?: unknown;\n};\n\ntype RunEntry = {\n runId: string | null;\n status: StatewireThread.RunStatus;\n queue: LaneEntry[];\n steerQueue: LaneEntry[];\n dispatching: LaneEntry[];\n inputRequests?: { id: string; response: unknown }[];\n error: unknown;\n runLeafMessageId: string | null;\n};\n\ntype RunsDraft = {\n status: StatewireThread.RunStatus;\n runs: RunEntry[];\n};\n\nconst startRun = (draft: RunsDraft, runId: string): void => {\n const entry = (draft.runs[0] ??= {\n runId: null,\n status: \"running\",\n queue: [],\n steerQueue: [],\n dispatching: [],\n error: null,\n runLeafMessageId: null,\n });\n entry.status = \"running\";\n entry.runId = runId;\n entry.error = null;\n delete entry.inputRequests;\n draft.status = \"running\";\n};\n\nconst insert = (\n lane: LaneEntry[],\n entry: LaneEntry,\n { insertAfter, insertBefore }: StatewireThread.Placement,\n): void => {\n const index =\n insertAfter !== undefined\n ? insertAfter === null\n ? 0\n : lane.findIndex((e) => e.id === insertAfter) + 1\n : insertBefore === undefined || insertBefore === null\n ? lane.length\n : lane.findIndex((e) => e.id === insertBefore);\n lane.splice(index < 0 ? lane.length : index, 0, entry);\n};\n\nconst enqueueOrSteer = (\n draft: RunsDraft,\n command: StatewireThread.RunEnqueueCommand | StatewireThread.RunSteerCommand,\n runId: string,\n): void => {\n const run = draft.runs[0];\n const id = \"message\" in command ? command.message.id : command.messageId;\n // In dispatch limbo the canonical state already tells the story: no fold.\n if (run?.dispatching.some((e) => e.id === id)) return;\n const sourceLane =\n run === undefined\n ? undefined\n : [run.queue, run.steerQueue].find((l) => l.some((e) => e.id === id));\n\n let entry: LaneEntry;\n let sourceIndex = -1;\n if (sourceLane !== undefined) {\n sourceIndex = sourceLane.findIndex((e) => e.id === id);\n entry = sourceLane.splice(sourceIndex, 1)[0]!;\n if (\"message\" in command) {\n entry.parts = command.message.parts;\n if (command.message.metadata !== undefined)\n entry.metadata = command.message.metadata;\n }\n } else {\n if (!(\"message\" in command)) return;\n entry = { ...command.message };\n }\n\n const steer = command.type === \"run/steer\";\n const direct = steer\n ? draft.status === \"ready\" || draft.status === \"input-required\"\n : sourceLane === undefined &&\n (draft.status === \"ready\" ||\n ((draft.status === \"stopped\" || draft.status === \"error\") &&\n run !== undefined &&\n run.queue.length === 0 &&\n run.steerQueue.length === 0));\n if (direct) {\n startRun(draft, runId);\n const target = draft.runs[0]!;\n if (steer) {\n // The whole steer lane rides the dispatch, in lane order.\n if (sourceLane === target.steerQueue)\n target.steerQueue.splice(sourceIndex, 0, entry);\n else target.steerQueue.push(entry);\n target.dispatching.push(...target.steerQueue.splice(0));\n } else target.dispatching.push(entry);\n return;\n }\n const continues = steer && draft.status !== \"running\";\n\n if (run === undefined) return;\n const lane = steer ? run.steerQueue : run.queue;\n const hasPlacement =\n command.insertAfter !== undefined || command.insertBefore !== undefined;\n if (sourceLane === lane && !hasPlacement) lane.splice(sourceIndex, 0, entry);\n else insert(lane, entry, command);\n if (continues) startRun(draft, runId);\n};\n\n/** The run dialect's optimistic reducer: folds an unsettled `run/*` command into the mount draft. */\nexport const runsOptimistic = (\n mount: unknown,\n command: Statewire.Command<Record<string, (...args: any[]) => unknown>>,\n ctx: StatewireClient.OptimisticContext,\n): void => {\n const draft = mount as RunsDraft;\n const runId = `optimistic-${ctx.seq}`;\n switch (command.method) {\n case \"run/enqueue\":\n case \"run/steer\": {\n enqueueOrSteer(\n draft,\n command.params[0] as\n | StatewireThread.RunEnqueueCommand\n | StatewireThread.RunSteerCommand,\n runId,\n );\n break;\n }\n case \"run/edit\":\n case \"run/reload\": {\n startRun(draft, runId);\n break;\n }\n case \"run/continue\": {\n const run = draft.runs[0];\n if (run !== undefined) run.steerQueue = [];\n startRun(draft, runId);\n break;\n }\n case \"run/dequeue\": {\n const { messageId } = command\n .params[0] as StatewireThread.RunDequeueCommand;\n const run = draft.runs[0];\n if (run === undefined) break;\n for (const lane of [run.queue, run.steerQueue]) {\n const index = lane.findIndex((e) => e.id === messageId);\n if (index !== -1) lane.splice(index, 1);\n }\n break;\n }\n case \"run/input\": {\n const { requestId, response } = command\n .params[0] as StatewireThread.RunInputCommand;\n const requests = draft.runs[0]?.inputRequests;\n const target = requests?.find((r) => r.id === requestId);\n if (target === undefined) break;\n target.response = response;\n if (requests!.every((r) => r.response !== null)) startRun(draft, runId);\n break;\n }\n default:\n break;\n }\n};\n"],"mappings":";AA2BA,MAAMyB,YAAYC,OAAkBb,UAAwB;CAC1D,MAAMc,QAASD,MAAMF,KAAK,OAAO;EAC/BX,OAAO;EACPC,QAAQ;EACRE,OAAO,CAAA;EACPC,YAAY,CAAA;EACZC,aAAa,CAAA;EACbG,OAAO;EACPC,kBAAkB;CACpB;CACAK,MAAMb,SAAS;CACfa,MAAMd,QAAQA;CACdc,MAAMN,QAAQ;CACd,OAAOM,MAAMR;CACbO,MAAMZ,SAAS;AACjB;AAEA,MAAMc,UACJC,MACAF,OACA,EAAEG,aAAaC,mBACN;CACT,MAAME,QACJH,gBAAgBI,KAAAA,IACZJ,gBAAgB,OACd,IACAD,KAAKM,WAAWC,MAAMA,EAAEhC,OAAO0B,WAAW,IAAI,IAChDC,iBAAiBG,KAAAA,KAAaH,iBAAiB,OAC7CF,KAAKQ,SACLR,KAAKM,WAAWC,MAAMA,EAAEhC,OAAO2B,YAAY;CACnDF,KAAKS,OAAOL,QAAQ,IAAIJ,KAAKQ,SAASJ,OAAO,GAAGN,KAAK;AACvD;AAEA,MAAMY,kBACJb,OACAc,SACA3B,UACS;CACT,MAAM8B,MAAMjB,MAAMF,KAAK;CACvB,MAAMpB,KAAK,aAAaoC,UAAUA,QAAQI,QAAQxC,KAAKoC,QAAQK;CAE/D,IAAIF,KAAKzB,YAAY4B,MAAMV,MAAMA,EAAEhC,OAAOA,EAAE,GAAG;CAC/C,MAAM2C,aACJJ,QAAQT,KAAAA,IACJA,KAAAA,IACA,CAACS,IAAI3B,OAAO2B,IAAI1B,UAAU,CAAC,CAAC+B,MAAMC,MAAMA,EAAEH,MAAMV,MAAMA,EAAEhC,OAAOA,EAAE,CAAC;CAExE,IAAIuB;CACJ,IAAIuB,cAAc;CAClB,IAAIH,eAAeb,KAAAA,GAAW;EAC5BgB,cAAcH,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("StatewireThread runs mode", () => {
|
|
|
395
395
|
await waitFor(() => expect(runs().status).toBe("running"));
|
|
396
396
|
expect(runs().runId).toMatch(/^optimistic-/);
|
|
397
397
|
expect(runs().steerQueue).toEqual([]);
|
|
398
|
+
// The predicted dispatching entry renders like a canonical one.
|
|
399
|
+
expect(runs().dispatching).toHaveLength(1);
|
|
400
|
+
const messages = aui().thread().getState().messages;
|
|
401
|
+
expect(messages.map((m) => m.id)).toEqual([runs().dispatching[0]!.id]);
|
|
398
402
|
expect(aui().thread().getState().isRunning).toBe(true);
|
|
399
403
|
});
|
|
400
404
|
|
|
@@ -55,7 +55,7 @@ describe("runsOptimistic", () => {
|
|
|
55
55
|
expect(run(draft).runId).toBe("run-1");
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
-
it("
|
|
58
|
+
it("parks a steer in the lane after a stop and predicts the continue run", () => {
|
|
59
59
|
const draft = mount({
|
|
60
60
|
status: "stopped",
|
|
61
61
|
steerQueue: [message("s1")],
|
|
@@ -69,10 +69,32 @@ describe("runsOptimistic", () => {
|
|
|
69
69
|
expect(draft.status).toBe("running");
|
|
70
70
|
expect(run(draft).status).toBe("running");
|
|
71
71
|
expect(run(draft).runId).toBe("optimistic-7");
|
|
72
|
-
expect(run(draft).steerQueue).toEqual([]);
|
|
72
|
+
expect(run(draft).steerQueue.map((e: Draft) => e.id)).toEqual(["s1", "s2"]);
|
|
73
|
+
expect(run(draft).dispatching).toEqual([]);
|
|
73
74
|
expect(run(draft).error).toBeNull();
|
|
74
75
|
});
|
|
75
76
|
|
|
77
|
+
it("dispatches an idle steer: the whole lane rides dispatching, in lane order", () => {
|
|
78
|
+
const draft = mount({
|
|
79
|
+
status: "input-required",
|
|
80
|
+
runId: "run-1",
|
|
81
|
+
steerQueue: [message("s1")],
|
|
82
|
+
inputRequests: [{ type: "custom", id: "r1", response: null }],
|
|
83
|
+
});
|
|
84
|
+
apply(draft, "run/steer", {
|
|
85
|
+
type: "run/steer",
|
|
86
|
+
message: message("s2"),
|
|
87
|
+
anchorMessageId: null,
|
|
88
|
+
});
|
|
89
|
+
expect(draft.status).toBe("running");
|
|
90
|
+
expect(run(draft).runId).toBe("optimistic-7");
|
|
91
|
+
expect(run(draft).steerQueue).toEqual([]);
|
|
92
|
+
expect(run(draft).dispatching.map((e: Draft) => e.id)).toEqual([
|
|
93
|
+
"s1",
|
|
94
|
+
"s2",
|
|
95
|
+
]);
|
|
96
|
+
});
|
|
97
|
+
|
|
76
98
|
it("dispatches an enqueue add only in ready or in error/stop with empty lanes", () => {
|
|
77
99
|
const ready = mount();
|
|
78
100
|
apply(ready, "run/enqueue", {
|
|
@@ -83,6 +105,7 @@ describe("runsOptimistic", () => {
|
|
|
83
105
|
expect(ready.status).toBe("running");
|
|
84
106
|
expect(run(ready).runId).toBe("optimistic-7");
|
|
85
107
|
expect(run(ready).queue).toEqual([]);
|
|
108
|
+
expect(run(ready).dispatching.map((e: Draft) => e.id)).toEqual(["a"]);
|
|
86
109
|
|
|
87
110
|
const stopped = mount({ status: "stopped", queue: [message("q1")] });
|
|
88
111
|
apply(stopped, "run/enqueue", {
|
|
@@ -183,7 +206,7 @@ describe("runsOptimistic", () => {
|
|
|
183
206
|
status: "running",
|
|
184
207
|
queue: [],
|
|
185
208
|
steerQueue: [],
|
|
186
|
-
dispatching: [],
|
|
209
|
+
dispatching: [message("s1")],
|
|
187
210
|
error: null,
|
|
188
211
|
runLeafMessageId: null,
|
|
189
212
|
});
|
|
@@ -233,6 +256,7 @@ describe("runsOptimistic", () => {
|
|
|
233
256
|
expect(run(draft).runId).toBe("optimistic-7");
|
|
234
257
|
expect(run(draft).inputRequests).toBeUndefined();
|
|
235
258
|
expect(run(draft).steerQueue).toEqual([]);
|
|
259
|
+
expect(run(draft).dispatching.map((e: Draft) => e.id)).toEqual(["s1"]);
|
|
236
260
|
});
|
|
237
261
|
|
|
238
262
|
it("leaves the draft untouched for run/stop and unknown moves", () => {
|
package/src/runsOptimistic.ts
CHANGED
|
@@ -87,27 +87,36 @@ const enqueueOrSteer = (
|
|
|
87
87
|
entry = { ...command.message };
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (
|
|
100
|
-
if (command.type === "run/steer" && run !== undefined) run.steerQueue = [];
|
|
90
|
+
const steer = command.type === "run/steer";
|
|
91
|
+
const direct = steer
|
|
92
|
+
? draft.status === "ready" || draft.status === "input-required"
|
|
93
|
+
: sourceLane === undefined &&
|
|
94
|
+
(draft.status === "ready" ||
|
|
95
|
+
((draft.status === "stopped" || draft.status === "error") &&
|
|
96
|
+
run !== undefined &&
|
|
97
|
+
run.queue.length === 0 &&
|
|
98
|
+
run.steerQueue.length === 0));
|
|
99
|
+
if (direct) {
|
|
101
100
|
startRun(draft, runId);
|
|
101
|
+
const target = draft.runs[0]!;
|
|
102
|
+
if (steer) {
|
|
103
|
+
// The whole steer lane rides the dispatch, in lane order.
|
|
104
|
+
if (sourceLane === target.steerQueue)
|
|
105
|
+
target.steerQueue.splice(sourceIndex, 0, entry);
|
|
106
|
+
else target.steerQueue.push(entry);
|
|
107
|
+
target.dispatching.push(...target.steerQueue.splice(0));
|
|
108
|
+
} else target.dispatching.push(entry);
|
|
102
109
|
return;
|
|
103
110
|
}
|
|
111
|
+
const continues = steer && draft.status !== "running";
|
|
104
112
|
|
|
105
113
|
if (run === undefined) return;
|
|
106
|
-
const lane =
|
|
114
|
+
const lane = steer ? run.steerQueue : run.queue;
|
|
107
115
|
const hasPlacement =
|
|
108
116
|
command.insertAfter !== undefined || command.insertBefore !== undefined;
|
|
109
117
|
if (sourceLane === lane && !hasPlacement) lane.splice(sourceIndex, 0, entry);
|
|
110
118
|
else insert(lane, entry, command);
|
|
119
|
+
if (continues) startRun(draft, runId);
|
|
111
120
|
};
|
|
112
121
|
|
|
113
122
|
/** The run dialect's optimistic reducer: folds an unsettled `run/*` command into the mount draft. */
|