@llblab/pi-actors 0.33.0 → 0.34.1
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/AGENTS.md +22 -11
- package/BACKLOG.md +3 -34
- package/CHANGELOG.md +14 -0
- package/dist/index.js +10 -10
- package/dist/lib/async-runs.d.ts +23 -75
- package/dist/lib/async-runs.js +49 -801
- package/dist/lib/command-templates.d.ts +3 -3
- package/dist/lib/command-templates.js +3 -3
- package/dist/lib/config.d.ts +2 -2
- package/dist/lib/config.js +5 -5
- package/dist/lib/{output.d.ts → execution-output.d.ts} +3 -3
- package/dist/lib/{output.js → execution-output.js} +3 -3
- package/dist/lib/execution.js +1 -1
- package/dist/lib/{actor-inspector-tui.d.ts → inspector.d.ts} +3 -2
- package/dist/lib/{actor-inspector-tui.js → inspector.js} +3 -2
- package/dist/lib/mailbox-loop.d.ts +3 -3
- package/dist/lib/mailbox-loop.js +3 -3
- package/dist/lib/{actor-messages.d.ts → messages.d.ts} +3 -3
- package/dist/lib/{actor-messages.js → messages.js} +3 -3
- package/dist/lib/{actor-recipe-context.d.ts → recipes-context.d.ts} +3 -2
- package/dist/lib/{actor-recipe-context.js → recipes-context.js} +2 -1
- package/dist/lib/{recipe-discovery.d.ts → recipes-discovery.d.ts} +8 -8
- package/dist/lib/{recipe-discovery.js → recipes-discovery.js} +6 -6
- package/dist/lib/registry.d.ts +1 -1
- package/dist/lib/registry.js +22 -22
- package/dist/lib/{actor-rooms.d.ts → rooms.d.ts} +4 -4
- package/dist/lib/{actor-rooms.js → rooms.js} +3 -3
- package/dist/lib/runs-artifacts.d.ts +21 -0
- package/dist/lib/runs-artifacts.js +68 -0
- package/dist/lib/runs-control.d.ts +13 -0
- package/dist/lib/runs-control.js +59 -0
- package/dist/lib/runs-identity.d.ts +5 -0
- package/dist/lib/runs-identity.js +11 -0
- package/dist/lib/runs-index.d.ts +18 -0
- package/dist/lib/runs-index.js +119 -0
- package/dist/lib/runs-mailbox.d.ts +25 -0
- package/dist/lib/runs-mailbox.js +146 -0
- package/dist/lib/runs-messages.d.ts +15 -0
- package/dist/lib/runs-messages.js +179 -0
- package/dist/lib/runs-outbox.d.ts +41 -0
- package/dist/lib/runs-outbox.js +87 -0
- package/dist/lib/runs-process.d.ts +7 -0
- package/dist/lib/runs-process.js +36 -0
- package/dist/lib/runs-retention.d.ts +8 -0
- package/dist/lib/runs-retention.js +56 -0
- package/dist/lib/runs-start.d.ts +9 -0
- package/dist/lib/runs-start.js +67 -0
- package/dist/lib/runs-status.d.ts +8 -0
- package/dist/lib/runs-status.js +60 -0
- package/dist/lib/runtime.d.ts +2 -2
- package/dist/lib/runtime.js +5 -5
- package/dist/lib/schema.d.ts +9 -0
- package/dist/lib/schema.js +40 -0
- package/dist/lib/tools-access.d.ts +19 -0
- package/dist/lib/tools-access.js +44 -0
- package/dist/lib/tools-inspect.d.ts +11 -0
- package/dist/lib/tools-inspect.js +534 -0
- package/dist/lib/tools-local.d.ts +14 -0
- package/dist/lib/tools-local.js +156 -0
- package/dist/lib/tools-mailbox.d.ts +8 -0
- package/dist/lib/tools-mailbox.js +48 -0
- package/dist/lib/tools-message.d.ts +9 -0
- package/dist/lib/tools-message.js +428 -0
- package/dist/lib/tools-register.d.ts +18 -0
- package/dist/lib/tools-register.js +40 -0
- package/dist/lib/tools-response.d.ts +21 -0
- package/dist/lib/tools-response.js +219 -0
- package/dist/lib/tools-spawn.d.ts +12 -0
- package/dist/lib/tools-spawn.js +159 -0
- package/dist/lib/tools.d.ts +8 -39
- package/dist/lib/tools.js +11 -1490
- package/dist/recipes/utility-coordinator-lock-snapshot.json +1 -1
- package/dist/scripts/actor-worker.mjs +190 -7
- package/dist/scripts/async-runner.mjs +171 -8
- package/dist/scripts/build-dist.mjs +1 -1
- package/dist/scripts/conformance.mjs +3 -3
- package/dist/scripts/coordinator.mjs +733 -11
- package/dist/scripts/locker.mjs +345 -16
- package/dist/scripts/recipe-utils.mjs +478 -14
- package/dist/scripts/validate-recipe.mjs +110 -10
- package/dist/skills/actors/SKILL.md +1 -1
- package/dist/skills/swarm/SKILL.md +1 -1
- package/docs/recipe-library.md +1 -1
- package/docs/template-recipes.md +1 -1
- package/index.ts +11 -18
- package/lib/async-runs.ts +124 -1016
- package/lib/command-templates.ts +3 -3
- package/lib/config.ts +7 -7
- package/lib/{output.ts → execution-output.ts} +3 -3
- package/lib/execution.ts +5 -1
- package/lib/{actor-inspector-tui.ts → inspector.ts} +4 -3
- package/lib/mailbox-loop.ts +3 -3
- package/lib/{actor-messages.ts → messages.ts} +3 -3
- package/lib/{actor-recipe-context.ts → recipes-context.ts} +3 -2
- package/lib/{recipe-discovery.ts → recipes-discovery.ts} +19 -19
- package/lib/{recipe-usage.ts → recipes-usage.ts} +2 -2
- package/lib/registry.ts +37 -24
- package/lib/{actor-rooms.ts → rooms.ts} +4 -4
- package/lib/runs-artifacts.ts +96 -0
- package/lib/runs-control.ts +85 -0
- package/lib/runs-identity.ts +14 -0
- package/lib/runs-index.ts +156 -0
- package/lib/runs-mailbox.ts +208 -0
- package/lib/runs-messages.ts +252 -0
- package/lib/runs-outbox.ts +144 -0
- package/lib/runs-process.ts +51 -0
- package/lib/runs-retention.ts +77 -0
- package/lib/runs-start.ts +98 -0
- package/lib/runs-status.ts +78 -0
- package/lib/runtime.ts +6 -6
- package/lib/schema.ts +55 -0
- package/lib/tools-access.ts +68 -0
- package/lib/tools-inspect.ts +735 -0
- package/lib/tools-local.ts +234 -0
- package/lib/tools-mailbox.ts +56 -0
- package/lib/tools-message.ts +569 -0
- package/lib/tools-register.ts +64 -0
- package/lib/tools-response.ts +267 -0
- package/lib/tools-spawn.ts +240 -0
- package/lib/tools.ts +20 -2040
- package/package.json +1 -1
- package/recipes/utility-coordinator-lock-snapshot.json +1 -1
- package/scripts/actor-worker.mjs +190 -7
- package/scripts/async-runner.mjs +171 -8
- package/scripts/build-dist.mjs +1 -1
- package/scripts/conformance.mjs +3 -3
- package/scripts/coordinator.mjs +733 -11
- package/scripts/locker.mjs +345 -16
- package/scripts/recipe-utils.mjs +478 -14
- package/scripts/validate-recipe.mjs +110 -10
- package/skills/actors/SKILL.md +1 -1
- package/skills/swarm/SKILL.md +1 -1
- package/dist/lib/actor-worker.d.ts +0 -16
- package/dist/lib/actor-worker.js +0 -134
- package/dist/lib/async-runner.d.ts +0 -5
- package/dist/lib/async-runner.js +0 -134
- package/dist/lib/coordinator.d.ts +0 -5
- package/dist/lib/coordinator.js +0 -660
- package/dist/lib/locker.d.ts +0 -5
- package/dist/lib/locker.js +0 -310
- package/dist/lib/recipe-utils.d.ts +0 -5
- package/dist/lib/recipe-utils.js +0 -385
- package/dist/lib/validate-recipe.d.ts +0 -6
- package/dist/lib/validate-recipe.js +0 -104
- package/lib/actor-worker.ts +0 -174
- package/lib/async-runner.ts +0 -173
- package/lib/coordinator.ts +0 -742
- package/lib/locker.ts +0 -340
- package/lib/recipe-utils.ts +0 -486
- package/lib/validate-recipe.ts +0 -110
- /package/dist/lib/{recipe-references.d.ts → recipes-references.d.ts} +0 -0
- /package/dist/lib/{recipe-references.js → recipes-references.js} +0 -0
- /package/dist/lib/{recipe-usage.d.ts → recipes-usage.d.ts} +0 -0
- /package/dist/lib/{recipe-usage.js → recipes-usage.js} +0 -0
- /package/lib/{recipe-references.ts → recipes-references.ts} +0 -0
package/index.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Wraps command templates as callable pi tools, stores durable user tools as recipe files, and exposes actor orchestration across reloads and sessions.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import * as ActorInspectorTui from "./lib/actor-inspector-tui.ts";
|
|
9
8
|
import * as AsyncRuns from "./lib/async-runs.ts";
|
|
10
9
|
import * as CommandTemplates from "./lib/command-templates.ts";
|
|
10
|
+
import * as Inspector from "./lib/inspector.ts";
|
|
11
11
|
import * as Observability from "./lib/observability.ts";
|
|
12
12
|
import * as Paths from "./lib/paths.ts";
|
|
13
13
|
import * as Pi from "./lib/pi.ts";
|
|
@@ -22,8 +22,7 @@ export default function toolRegistryExtension(pi: Pi.ExtensionAPI) {
|
|
|
22
22
|
let activeRunContext: Pi.ExtensionContext | undefined;
|
|
23
23
|
const runUi = Observability.createRunUiObservationState();
|
|
24
24
|
const retirementAttempts = new Set<string>();
|
|
25
|
-
const actorInspector =
|
|
26
|
-
ActorInspectorTui.createActorInspectorControllerState();
|
|
25
|
+
const actorInspector = Inspector.createActorInspectorControllerState();
|
|
27
26
|
const getRunOwnerId = Pi.getSessionId;
|
|
28
27
|
const retireCandidateRuns = (
|
|
29
28
|
ctx: Pi.ExtensionContext,
|
|
@@ -50,7 +49,7 @@ export default function toolRegistryExtension(pi: Pi.ExtensionAPI) {
|
|
|
50
49
|
? () => ({
|
|
51
50
|
invalidate() {},
|
|
52
51
|
render(width: number) {
|
|
53
|
-
return
|
|
52
|
+
return Inspector.renderActorInspectorPanel({
|
|
54
53
|
stateRoot: Paths.EXTENSION_RUNTIME_PATHS.runStateRoot,
|
|
55
54
|
state: actorInspector,
|
|
56
55
|
ownerId,
|
|
@@ -142,39 +141,33 @@ export default function toolRegistryExtension(pi: Pi.ExtensionAPI) {
|
|
|
142
141
|
recipeReload.close();
|
|
143
142
|
});
|
|
144
143
|
pi.registerCommand("actors-inspector-toggle", {
|
|
145
|
-
description:
|
|
144
|
+
description: Inspector.ACTOR_INSPECTOR_COMMAND_DESCRIPTIONS.toggle,
|
|
146
145
|
handler: async (args, ctx) => {
|
|
147
|
-
const result =
|
|
148
|
-
actorInspector,
|
|
149
|
-
args,
|
|
150
|
-
);
|
|
146
|
+
const result = Inspector.handleActorInspectorToggle(actorInspector, args);
|
|
151
147
|
if (result.update) updateRunUi(ctx);
|
|
152
148
|
ctx.ui.notify(result.notify, result.type);
|
|
153
149
|
},
|
|
154
150
|
});
|
|
155
151
|
pi.registerCommand("actors-inspector-filter", {
|
|
156
|
-
description:
|
|
152
|
+
description: Inspector.ACTOR_INSPECTOR_COMMAND_DESCRIPTIONS.filter,
|
|
157
153
|
handler: async (args, ctx) => {
|
|
158
|
-
const result =
|
|
159
|
-
actorInspector,
|
|
160
|
-
args,
|
|
161
|
-
);
|
|
154
|
+
const result = Inspector.handleActorInspectorFilter(actorInspector, args);
|
|
162
155
|
if (result.update) updateRunUi(ctx);
|
|
163
156
|
ctx.ui.notify(result.notify, result.type);
|
|
164
157
|
},
|
|
165
158
|
});
|
|
166
159
|
pi.registerCommand("actors-inspect", {
|
|
167
|
-
description:
|
|
160
|
+
description: Inspector.ACTOR_INSPECTOR_COMMAND_DESCRIPTIONS.inspect,
|
|
168
161
|
handler: async (args, ctx) => {
|
|
169
|
-
const previews =
|
|
162
|
+
const previews = Inspector.readActorInspectorPreviews(
|
|
170
163
|
Paths.EXTENSION_RUNTIME_PATHS.runStateRoot,
|
|
171
164
|
actorInspector.rows,
|
|
172
|
-
|
|
165
|
+
Inspector.getActorInspectorPreviewOptions(
|
|
173
166
|
actorInspector,
|
|
174
167
|
getRunOwnerId(ctx),
|
|
175
168
|
),
|
|
176
169
|
);
|
|
177
|
-
const result =
|
|
170
|
+
const result = Inspector.handleActorInspectorInspect(
|
|
178
171
|
actorInspector,
|
|
179
172
|
args,
|
|
180
173
|
previews,
|