@pasko70/pibo 2.4.2 → 2.5.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/dist/agent-runtime/context-build.js +100 -11
- package/dist/agent-runtime/profile-validation.js +3 -0
- package/dist/agent-runtime/resource-service.js +16 -0
- package/dist/agent-runtime/routed-session.js +30 -23
- package/dist/agent-runtime/testing/fake-adapter.js +7 -0
- package/dist/agent-runtimes/pi/adapter.js +2 -0
- package/dist/agent-runtimes/pi/routed-session.js +42 -27
- package/dist/agent-runtimes/pi/runtime.js +8 -5
- package/dist/apps/chat/web-app.js +21 -6
- package/dist/apps/chat-ui/assets/{dist-CrDtveZB.js → dist-BxJuOpXP.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-3YG57JXi.js → dist-CvA-WTQT.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-Cw9po47P.js → dist-DPzsIE8h.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-DTRjeLwO.js → dist-Dj5P89Wy.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BeqHbnGN.js → dist-Sll26U24.js} +1 -1
- package/dist/apps/chat-ui/assets/index-0WZI2phJ.css +1 -0
- package/dist/apps/chat-ui/assets/index-BW5XFgYP.js +228 -0
- package/dist/apps/chat-ui/index.html +2 -2
- package/dist/apps/vscode-artifacts/latest.vsix +0 -0
- package/dist/apps/vscode-artifacts/{pibo-vscode-ext-2.4.2.vsix → pibo-vscode-ext-2.5.0.vsix} +0 -0
- package/dist/cli.js +16 -6
- package/dist/core/context-build.js +66 -6
- package/dist/core/model-defaults.js +11 -3
- package/dist/core/session-router.js +152 -69
- package/dist/gateway/server.js +1 -0
- package/dist/loops/accounting.js +80 -0
- package/dist/loops/service.js +51 -16
- package/dist/loops/store.js +50 -14
- package/dist/runs/lifecycle.js +26 -1
- package/dist/runs/registry.js +29 -47
- package/dist/runs/tools.js +23 -22
- package/dist/subagents/context.js +48 -0
- package/dist/subagents/runtime-selection.js +28 -0
- package/dist/subagents/tool.js +28 -6
- package/dist/tools/codex-compat.js +1 -0
- package/dist/tools/contract.js +10 -0
- package/dist/tools/mcp-bridge.js +4 -2
- package/dist/tools/runtime/node-backend.js +8 -2
- package/dist/tools/runtime/python-backend.js +8 -2
- package/dist/tools/runtime/tool.js +1 -0
- package/dist/tools/session-tool-set.js +19 -12
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/apps/chat-ui/assets/index-AjnP3ci-.js +0 -228
- package/dist/apps/chat-ui/assets/index-BJ56TREg.css +0 -1
|
@@ -31,6 +31,12 @@ function getToolDefinition(tool, context = {}) {
|
|
|
31
31
|
return tool.definition;
|
|
32
32
|
return tool.createDefinition(context);
|
|
33
33
|
}
|
|
34
|
+
export function materializePiboProfileTools(profile, context = {}) {
|
|
35
|
+
return profile.tools
|
|
36
|
+
.filter((tool) => !isRuntimeToolProfile(tool) && !isCodexBrowserToolProfile(tool))
|
|
37
|
+
.filter(hasEnabledToolDefinition)
|
|
38
|
+
.map((tool) => ({ profile: tool, definition: getToolDefinition(tool, context) }));
|
|
39
|
+
}
|
|
34
40
|
/** Assemble the selected Pibo-managed tool set without importing any harness package. */
|
|
35
41
|
export function createPiboSessionToolDefinitions(options) {
|
|
36
42
|
const { profile } = options;
|
|
@@ -47,10 +53,8 @@ export function createPiboSessionToolDefinitions(options) {
|
|
|
47
53
|
const codexBrowserTools = options.codexBrowserController
|
|
48
54
|
? createCodexBrowserToolDefinitions(options.codexBrowserController, selectedCodexBrowserToolNames)
|
|
49
55
|
: [];
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
.filter(hasEnabledToolDefinition);
|
|
53
|
-
const profileToolDefinitions = profileTools.map((tool) => getToolDefinition(tool, options.toolContext));
|
|
56
|
+
const materializedProfileTools = materializePiboProfileTools(profile, options.toolContext);
|
|
57
|
+
const profileToolDefinitions = materializedProfileTools.map((tool) => tool.definition);
|
|
54
58
|
const codexCompatTools = profile.toolPackages.codexCompat === true
|
|
55
59
|
? createCodexCompatToolDefinitions()
|
|
56
60
|
: [];
|
|
@@ -60,28 +64,31 @@ export function createPiboSessionToolDefinitions(options) {
|
|
|
60
64
|
const agentTools = options.agentsController
|
|
61
65
|
? createAgentToolDefinitions(profile.subagents, options.agentsController)
|
|
62
66
|
: [];
|
|
67
|
+
const delegatedSendTool = agentTools.find((tool) => tool.name === "pibo_agents_send_message");
|
|
68
|
+
const directAgentTools = agentTools.filter((tool) => tool !== delegatedSendTool);
|
|
63
69
|
const nativeYieldableTools = [...(options.nativeYieldableTools ?? [])];
|
|
64
70
|
const yieldableTools = [
|
|
65
71
|
...nativeYieldableTools,
|
|
66
|
-
...
|
|
67
|
-
.filter((tool) => tool.yieldable !== false)
|
|
68
|
-
.map((tool) =>
|
|
72
|
+
...materializedProfileTools
|
|
73
|
+
.filter((tool) => tool.profile.yieldable !== false)
|
|
74
|
+
.map((tool) => tool.definition),
|
|
69
75
|
...(runtimeTool && runtimeProfileTool?.yieldable !== false ? [runtimeTool] : []),
|
|
70
76
|
...codexBrowserTools.filter((definition) => profile.tools.find((tool) => tool.name === definition.name)?.yieldable !== false),
|
|
71
77
|
...agentTools,
|
|
72
78
|
...codexCompatTools,
|
|
73
79
|
];
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
const runControlYieldableTools = profile.toolPackages.runControl === true
|
|
81
|
+
? yieldableTools
|
|
82
|
+
: delegatedSendTool ? [delegatedSendTool] : [];
|
|
83
|
+
const runTools = options.runToolController && runControlYieldableTools.length > 0
|
|
84
|
+
? createRunToolDefinitions(runControlYieldableTools, options.runToolController)
|
|
78
85
|
: [];
|
|
79
86
|
return [
|
|
80
87
|
...nativeYieldableTools,
|
|
81
88
|
...profileToolDefinitions,
|
|
82
89
|
...(runtimeTool ? [runtimeTool] : []),
|
|
83
90
|
...codexBrowserTools,
|
|
84
|
-
...
|
|
91
|
+
...directAgentTools,
|
|
85
92
|
...codexCompatTools,
|
|
86
93
|
...goalTools,
|
|
87
94
|
...runTools,
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pasko70/pibo",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@pasko70/pibo",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.5.0",
|
|
10
10
|
"workspaces": [
|
|
11
11
|
"packages/workflows"
|
|
12
12
|
],
|