@pasko70/pibo 1.16.5 → 2.0.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/auth.js +28 -0
- package/dist/agent-runtime/capabilities.js +221 -0
- package/dist/agent-runtime/context-build.js +313 -0
- package/dist/agent-runtime/contract.js +45 -0
- package/dist/agent-runtime/errors.js +57 -0
- package/dist/agent-runtime/events.js +1 -0
- package/dist/agent-runtime/history.js +1 -0
- package/dist/agent-runtime/profile-validation.js +109 -0
- package/dist/agent-runtime/registry.js +608 -0
- package/dist/agent-runtime/resource-files.js +87 -0
- package/dist/agent-runtime/resource-service.js +635 -0
- package/dist/agent-runtime/resources.js +1 -0
- package/dist/agent-runtime/routed-session.js +931 -0
- package/dist/agent-runtime/testing/contract.js +51 -0
- package/dist/agent-runtime/testing/fake-adapter.js +192 -0
- package/dist/agent-runtime/types.js +3 -0
- package/dist/agent-runtimes/codex-native/adapter.js +905 -0
- package/dist/agent-runtimes/codex-native/auth.js +476 -0
- package/dist/agent-runtimes/codex-native/client.js +734 -0
- package/dist/agent-runtimes/codex-native/config.js +152 -0
- package/dist/agent-runtimes/codex-native/history.js +283 -0
- package/dist/agent-runtimes/codex-native/mcp-stdio-launcher.js +89 -0
- package/dist/agent-runtimes/codex-native/models.js +581 -0
- package/dist/agent-runtimes/codex-native/process.js +459 -0
- package/dist/agent-runtimes/codex-native/protocol-types.js +1 -0
- package/dist/agent-runtimes/codex-native/protocol-version.js +7 -0
- package/dist/agent-runtimes/codex-native/redaction.js +31 -0
- package/dist/agent-runtimes/codex-native/requests.js +378 -0
- package/dist/agent-runtimes/codex-native/resource-delivery.js +445 -0
- package/dist/agent-runtimes/codex-native/thread.js +388 -0
- package/dist/agent-runtimes/codex-native/turn.js +849 -0
- package/dist/agent-runtimes/pi/adapter.js +653 -0
- package/dist/agent-runtimes/pi/auth.js +455 -0
- package/dist/agent-runtimes/pi/history.js +640 -0
- package/dist/agent-runtimes/pi/model-catalog.js +87 -0
- package/dist/agent-runtimes/pi/routed-session.js +1464 -0
- package/dist/agent-runtimes/pi/runtime.js +534 -0
- package/dist/agent-runtimes/pi/tool-compiler.js +69 -0
- package/dist/apps/chat/agent-profiles.js +40 -23
- package/dist/apps/chat/agent-store.js +111 -64
- package/dist/apps/chat/chat-api-routes.js +1 -1
- package/dist/apps/chat/chat-request-normalizers.js +47 -0
- package/dist/apps/chat/data/chat-data-mappers.js +25 -9
- package/dist/apps/chat/data/history-query-service.js +108 -0
- package/dist/apps/chat/data/session-query-service.js +24 -3
- package/dist/apps/chat/data/timeline-query-service.js +3 -3
- package/dist/apps/chat/model-catalog.js +1 -55
- package/dist/apps/chat/provider-auth-actions.js +171 -23
- package/dist/apps/chat/stream.js +12 -0
- package/dist/apps/chat/trace-v2.js +1 -0
- package/dist/apps/chat/trace.js +126 -415
- package/dist/apps/chat/web-app.js +582 -157
- package/dist/apps/chat-ui/assets/{dist-QXwINWYY.js → dist-9v2ZXT6V.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CvZNkkOi.js → dist-B1LVAytl.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-_SP-MjLq.js → dist-C6LPDFXU.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-Bad4Yz4P.js → dist-DVtXxfHc.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-xy-zomwl.js → dist-DW4Qrfbd.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-DI4i80O2.js → dist-DmbsHdMC.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-D17yAUqp.js → dist-DyvwuSFO.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-Bc3Vbgjh.js → dist-I26VB0QO.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BzqH7w58.js → dist-RtHbJRPV.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CMDJ-WZm.js → dist-sZgJkWZb.js} +1 -1
- package/dist/apps/chat-ui/assets/index-BPbNvcZe.css +1 -0
- package/dist/apps/chat-ui/assets/index-CIOf2uL2.js +237 -0
- package/dist/apps/chat-ui/index.html +2 -2
- package/dist/apps/chat-vscode-web/assets/index-1ivRyjFs.js +41 -0
- package/dist/apps/chat-vscode-web/index.html +1 -1
- package/dist/apps/vscode-artifacts/latest.vsix +0 -0
- package/dist/apps/vscode-artifacts/pibo-vscode-ext-2.0.0.vsix +0 -0
- package/dist/auth/login-actions.js +5 -251
- package/dist/cli-session/localSessionSource.js +8 -1
- package/dist/core/context-build.js +124 -20
- package/dist/core/default-profile.js +8 -0
- package/dist/core/profiles.js +30 -3
- package/dist/core/routed-session.js +5 -1446
- package/dist/core/runtime.js +5 -561
- package/dist/core/session-router.js +637 -83
- package/dist/data/cli.js +20 -3
- package/dist/data/schema.js +104 -1
- package/dist/data/session-store.js +24 -1
- package/dist/debug/events.js +25 -10
- package/dist/debug/failures.js +23 -3
- package/dist/debug/index.js +24 -6
- package/dist/debug/messages.js +87 -7
- package/dist/debug/persisted-payloads.js +31 -0
- package/dist/debug/pty.js +7 -6
- package/dist/debug/runtime-binding.js +29 -0
- package/dist/debug/session.js +137 -0
- package/dist/debug/summary.js +12 -0
- package/dist/debug/telemetry.js +28 -0
- package/dist/debug/tools.js +12 -2
- package/dist/debug/trace.js +154 -76
- package/dist/gateway/server.js +87 -2
- package/dist/gateway/tool.js +5 -5
- package/dist/index.js +21 -2
- package/dist/loops/tools.js +13 -12
- package/dist/mcp/agent-context.js +13 -4
- package/dist/mcp/client.js +10 -6
- package/dist/mcp/config.js +5 -2
- package/dist/mcp/runtime-session.js +166 -0
- package/dist/plugins/builtin.js +191 -53
- package/dist/plugins/codex-native.js +29 -0
- package/dist/plugins/registry.js +66 -2
- package/dist/runs/tools.js +26 -25
- package/dist/session-ui/terminalRows.js +2 -2
- package/dist/sessions/pibo-data-store.js +125 -16
- package/dist/sessions/runtime-binding.js +107 -0
- package/dist/sessions/sqlite-store.js +239 -18
- package/dist/sessions/store.js +86 -7
- package/dist/shared/trace-engine.js +18 -9
- package/dist/shared/trace-event-projection.js +29 -11
- package/dist/shared/{trace-transcript.js → trace-history.js} +193 -195
- package/dist/shared/trace-order.js +9 -4
- package/dist/shared/trace-page-merge.js +1 -1
- package/dist/signals/projector.js +20 -2
- package/dist/signals/registry.js +11 -0
- package/dist/subagents/tool.js +8 -6
- package/dist/tools/codex-browser.js +20 -19
- package/dist/tools/codex-compat.js +10 -9
- package/dist/tools/codex-image-generation.js +8 -6
- package/dist/tools/contract.js +45 -0
- package/dist/tools/credential-registry.js +182 -0
- package/dist/tools/mcp-bridge.js +511 -0
- package/dist/tools/payload-writer.js +17 -0
- package/dist/tools/runtime/tool.js +10 -9
- package/dist/tools/schema.js +9 -0
- package/dist/tools/session-service.js +193 -0
- package/dist/tools/session-tool-set.js +85 -0
- package/dist/web-annotations/tools.js +17 -16
- package/docs/README.md +11 -0
- package/package.json +3 -2
- package/skills/builtin/pibo-agent-runtime-adapter/SKILL.md +183 -0
- package/skills/builtin/pibo-agent-runtime-adapter/evals/README.md +10 -0
- package/skills/builtin/pibo-agent-runtime-adapter/evals/evals.json +45 -0
- package/skills/builtin/pibo-agent-runtime-adapter/evals/fixtures/orion-full-harness.md +60 -0
- package/skills/builtin/pibo-agent-runtime-adapter/evals/fixtures/relay-partial-harness.md +52 -0
- package/skills/builtin/pibo-agent-runtime-adapter/references/capabilities-and-designer.md +194 -0
- package/skills/builtin/pibo-agent-runtime-adapter/references/history-debug-and-security.md +213 -0
- package/skills/builtin/pibo-agent-runtime-adapter/references/interfaces-and-registration.md +214 -0
- package/skills/builtin/pibo-agent-runtime-adapter/references/lifecycle-bindings-and-events.md +193 -0
- package/skills/builtin/pibo-agent-runtime-adapter/references/portable-delivery-and-native-behavior.md +226 -0
- package/skills/builtin/pibo-agent-runtime-adapter/references/testing-migration-and-validation.md +256 -0
- package/dist/apps/chat-ui/assets/index-C45B0rw7.js +0 -237
- package/dist/apps/chat-ui/assets/index-E0RmuCkY.css +0 -1
- package/dist/apps/chat-vscode-web/assets/index-D-tSsXLG.js +0 -41
- package/dist/apps/vscode-artifacts/pibo-vscode-ext-1.16.5.vsix +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export function validateAgentRuntimeProfileCapabilities(profile, capabilities) {
|
|
2
|
+
const diagnostics = [];
|
|
3
|
+
const enabledTools = profile.tools.filter((tool) => tool.enabled !== false);
|
|
4
|
+
const enabledSkills = profile.skills.filter((skill) => skill.enabled !== false);
|
|
5
|
+
const enabledContextFiles = profile.contextFiles.filter((contextFile) => contextFile.enabled !== false);
|
|
6
|
+
const enabledSubagents = profile.subagents.filter((subagent) => subagent.enabled !== false);
|
|
7
|
+
const usesPiboManagedTools = enabledTools.length > 0
|
|
8
|
+
|| enabledSubagents.length > 0
|
|
9
|
+
|| profile.toolPackages.runControl === true
|
|
10
|
+
|| profile.toolPackages.goalControl !== false;
|
|
11
|
+
if (usesPiboManagedTools) {
|
|
12
|
+
pushUnsupportedDeliveryDiagnostic(diagnostics, capabilities.tools.piboManaged, "runtime_pibo_tools_unsupported", "tools", `Profile "${profile.profileName}" selects Pibo-managed tools or subagents`);
|
|
13
|
+
if (capabilities.tools.piboManaged.support === "mcp") {
|
|
14
|
+
if (!capabilities.tools.piboManaged.transports.includes("streamable-http")) {
|
|
15
|
+
diagnostics.push({
|
|
16
|
+
severity: "error",
|
|
17
|
+
code: "runtime_pibo_tools_streamable_http_required",
|
|
18
|
+
message: `Profile "${profile.profileName}" requires Pibo-managed tools, but this runtime does not accept the session-scoped Streamable HTTP MCP bridge.`,
|
|
19
|
+
path: "tools",
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
for (const tool of enabledTools) {
|
|
23
|
+
let portable = tool.definition?.portable !== false;
|
|
24
|
+
if (!tool.definition && tool.createDefinition) {
|
|
25
|
+
try {
|
|
26
|
+
portable = tool.createDefinition({ profileName: profile.profileName }).portable !== false;
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
portable = false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (portable)
|
|
33
|
+
continue;
|
|
34
|
+
diagnostics.push({
|
|
35
|
+
severity: "error",
|
|
36
|
+
code: "runtime_pibo_tool_not_portable",
|
|
37
|
+
message: `Tool "${tool.name}" uses an adapter-private compatibility definition and cannot be delivered through session-scoped MCP.`,
|
|
38
|
+
path: "tools",
|
|
39
|
+
details: { toolName: tool.name },
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (profile.toolPackages.runControl === true && capabilities.tools.nativeToolYielding.support === "unsupported") {
|
|
45
|
+
diagnostics.push({
|
|
46
|
+
severity: "warning",
|
|
47
|
+
code: "runtime_native_tool_yielding_unsupported",
|
|
48
|
+
message: `Runtime "${profile.runtimeInstanceId}" can yield Pibo-managed tools through pibo_run_start, but cannot wrap private harness-native tools: ${capabilities.tools.nativeToolYielding.reason}`,
|
|
49
|
+
path: "toolPackages.runControl",
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
if (profile.mcpServers.length > 0) {
|
|
53
|
+
pushUnsupportedDeliveryDiagnostic(diagnostics, capabilities.mcp.externalServers, "runtime_external_mcp_unsupported", "mcpServers", `Profile "${profile.profileName}" selects external MCP servers`);
|
|
54
|
+
}
|
|
55
|
+
if (enabledSkills.length > 0) {
|
|
56
|
+
pushUnsupportedDeliveryDiagnostic(diagnostics, capabilities.skills, "runtime_skills_unsupported", "skills", `Profile "${profile.profileName}" selects skills`);
|
|
57
|
+
}
|
|
58
|
+
if (enabledContextFiles.length > 0 || profile.autoContextFiles) {
|
|
59
|
+
pushUnsupportedDeliveryDiagnostic(diagnostics, capabilities.context, "runtime_context_unsupported", "contextFiles", `Profile "${profile.profileName}" selects managed or automatic context`);
|
|
60
|
+
}
|
|
61
|
+
if (profile.autoContextFiles
|
|
62
|
+
&& capabilities.context.support === "materialized"
|
|
63
|
+
&& !capabilities.context.modes.includes("native-project-discovery")) {
|
|
64
|
+
diagnostics.push({
|
|
65
|
+
severity: "error",
|
|
66
|
+
code: "runtime_auto_context_discovery_unsupported",
|
|
67
|
+
message: `Runtime "${profile.runtimeInstanceId}" materializes explicit context but does not support automatic AGENTS.md / CLAUDE.md discovery. Disable automatic context or choose a runtime that declares native-project-discovery.`,
|
|
68
|
+
path: "autoContextFiles",
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
const reasoningValues = [
|
|
72
|
+
profile.thinkingLevel,
|
|
73
|
+
profile.mainThinkingLevel,
|
|
74
|
+
profile.subagentThinkingLevel,
|
|
75
|
+
].filter((value) => value !== undefined);
|
|
76
|
+
if (reasoningValues.length > 0 && !capabilities.reasoning.supported) {
|
|
77
|
+
diagnostics.push({
|
|
78
|
+
severity: "error",
|
|
79
|
+
code: "runtime_reasoning_unsupported",
|
|
80
|
+
message: `Profile "${profile.profileName}" selects reasoning options, but this runtime does not support reasoning control.`,
|
|
81
|
+
path: "thinkingLevel",
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
else if (capabilities.reasoning.values?.length) {
|
|
85
|
+
const supportedValues = new Set(capabilities.reasoning.values);
|
|
86
|
+
for (const value of reasoningValues) {
|
|
87
|
+
if (supportedValues.has(value))
|
|
88
|
+
continue;
|
|
89
|
+
diagnostics.push({
|
|
90
|
+
severity: "error",
|
|
91
|
+
code: "runtime_reasoning_value_unsupported",
|
|
92
|
+
message: `Profile "${profile.profileName}" selects unsupported reasoning value "${value}".`,
|
|
93
|
+
path: "thinkingLevel",
|
|
94
|
+
details: { value, supportedValues: [...supportedValues] },
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return diagnostics;
|
|
99
|
+
}
|
|
100
|
+
function pushUnsupportedDeliveryDiagnostic(diagnostics, delivery, code, path, selection) {
|
|
101
|
+
if (delivery.support !== "unsupported")
|
|
102
|
+
return;
|
|
103
|
+
diagnostics.push({
|
|
104
|
+
severity: "error",
|
|
105
|
+
code,
|
|
106
|
+
message: `${selection}, but runtime delivery is unsupported: ${delivery.reason}`,
|
|
107
|
+
path,
|
|
108
|
+
});
|
|
109
|
+
}
|