@pasko70/pibo 1.16.6 → 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-BTLtT_Vf.js → dist-9v2ZXT6V.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CMk1aPug.js → dist-B1LVAytl.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CcwA_IWN.js → dist-C6LPDFXU.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-DKOthbxr.js → dist-DVtXxfHc.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-ls2I6BIw.js → dist-DW4Qrfbd.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-D1rAtRWs.js → dist-DmbsHdMC.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-C1JQRskW.js → dist-DyvwuSFO.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-DfpaylQ-.js → dist-I26VB0QO.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-D10bTFD5.js → dist-RtHbJRPV.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-5KpmmBBZ.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-C2YI0xfw.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
|
@@ -3,21 +3,22 @@ import { compareTraceNodes, flattenTraceNodes } from "./trace-nodes.js";
|
|
|
3
3
|
import { attachAsyncAgentRunNode, isRunStartToolNode } from "./trace-async-agent-runs.js";
|
|
4
4
|
import { createRunNotificationNode, parseRunNotificationText } from "./trace-run-notifications.js";
|
|
5
5
|
import { findLikelyTraceChildSession, isSubagentToolName, } from "./trace-subagent-links.js";
|
|
6
|
-
export function applySingleEventToNodes(nodes, byId, piboSessionId, storedEvent, childByParent, linkedChildByToolCallId,
|
|
6
|
+
export function applySingleEventToNodes(nodes, byId, piboSessionId, storedEvent, childByParent, linkedChildByToolCallId, historyCoverage, openTranscriptEventIds, sessionStatus) {
|
|
7
7
|
const payload = storedEvent.payload;
|
|
8
|
-
const confirmedUserMessage =
|
|
8
|
+
const confirmedUserMessage = historyCoverage.mode !== "none" ? confirmedUserMessageEchoNode(nodes, storedEvent) : undefined;
|
|
9
9
|
if (confirmedUserMessage) {
|
|
10
10
|
if (payload.type === "message_steered" && payload.activeEventId) {
|
|
11
11
|
confirmedUserMessage.parentId = messageTurnNodeId(payload.activeEventId);
|
|
12
12
|
}
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
|
-
if (
|
|
16
|
-
|
|
15
|
+
if (((historyCoverage.mode === "native" && isTranscriptEchoEvent(payload))
|
|
16
|
+
|| (historyCoverage.mode === "product" && isProductHistoryEchoEvent(payload))) &&
|
|
17
|
+
historyCoversEvent(payload, historyCoverage) &&
|
|
17
18
|
!shouldKeepTranscriptEchoEvent(payload, openTranscriptEventIds)) {
|
|
18
19
|
return;
|
|
19
20
|
}
|
|
20
|
-
if (
|
|
21
|
+
if (isNativeHistoryToolEchoEvent(payload, historyCoverage, sessionStatus)) {
|
|
21
22
|
return;
|
|
22
23
|
}
|
|
23
24
|
if (payload.type === "assistant_delta") {
|
|
@@ -201,16 +202,16 @@ export function contentDeltaPatchNodeId(event) {
|
|
|
201
202
|
return undefined;
|
|
202
203
|
}
|
|
203
204
|
export function reconcileTranscriptUserMessages(nodes, events, turnTimings = []) {
|
|
204
|
-
const transcriptUsers = nodes.filter((node) => node.type === "user.message" && node.source
|
|
205
|
+
const transcriptUsers = nodes.filter((node) => node.type === "user.message" && isPersistedHistorySource(node.source));
|
|
205
206
|
const timingByEventId = new Map(turnTimings.map((timing) => [timing.eventId, timing]));
|
|
206
207
|
let latestTranscriptUser;
|
|
207
208
|
for (const node of nodes) {
|
|
208
|
-
if (node.type === "user.message" && node.source
|
|
209
|
+
if (node.type === "user.message" && isPersistedHistorySource(node.source)) {
|
|
209
210
|
latestTranscriptUser = node;
|
|
210
211
|
continue;
|
|
211
212
|
}
|
|
212
213
|
if (node.type !== "assistant.message" ||
|
|
213
|
-
node.source
|
|
214
|
+
!isPersistedHistorySource(node.source) ||
|
|
214
215
|
!node.eventId ||
|
|
215
216
|
!latestTranscriptUser ||
|
|
216
217
|
transcriptUserMessageHasCanonicalIdentity(latestTranscriptUser))
|
|
@@ -285,12 +286,15 @@ function confirmedUserMessageEchoNode(nodes, event) {
|
|
|
285
286
|
const canonicalId = `event:${payload.type}:${payloadEventId ?? cryptoSafeId(payload)}`;
|
|
286
287
|
const stableKey = eventStableKey(payload);
|
|
287
288
|
const text = typeof payload.text === "string" ? payload.text : undefined;
|
|
288
|
-
const transcriptUsers = flattenTraceNodes([...nodes]).filter((node) => node.type === "user.message" && node.source
|
|
289
|
+
const transcriptUsers = flattenTraceNodes([...nodes]).filter((node) => node.type === "user.message" && isPersistedHistorySource(node.source));
|
|
289
290
|
const identityMatch = transcriptUsers.find((node) => transcriptUserMessageMatchesIdentity(node, canonicalId, stableKey, eventId));
|
|
290
291
|
if (identityMatch)
|
|
291
292
|
return identityMatch;
|
|
292
293
|
return transcriptUsers.find((node) => !transcriptUserMessageHasCanonicalIdentity(node) && Boolean(text && traceNodeText(node) === text));
|
|
293
294
|
}
|
|
295
|
+
function isPersistedHistorySource(source) {
|
|
296
|
+
return source === "transcript" || source === "product-history";
|
|
297
|
+
}
|
|
294
298
|
function transcriptUserMessageMatchesIdentity(node, canonicalId, stableKey, eventId) {
|
|
295
299
|
if (node.id === canonicalId || node.stableKey === stableKey)
|
|
296
300
|
return true;
|
|
@@ -652,6 +656,9 @@ function isOptimisticUserMessageEvent(event) {
|
|
|
652
656
|
function isInternalSessionOperation(action) {
|
|
653
657
|
return action === "session.fork" || action === "session.clone" || action === "session.switch";
|
|
654
658
|
}
|
|
659
|
+
function isProductHistoryEchoEvent(event) {
|
|
660
|
+
return event.type === "assistant_delta" || event.type === "assistant_message";
|
|
661
|
+
}
|
|
655
662
|
function isTranscriptEchoEvent(event) {
|
|
656
663
|
return (event.type === "message_queued" ||
|
|
657
664
|
event.type === "message_started" ||
|
|
@@ -666,8 +673,19 @@ function shouldKeepTranscriptEchoEvent(event, openTranscriptEventIds) {
|
|
|
666
673
|
const eventId = "eventId" in event && typeof event.eventId === "string" ? event.eventId : undefined;
|
|
667
674
|
return Boolean(eventId && openTranscriptEventIds.has(eventId));
|
|
668
675
|
}
|
|
669
|
-
function
|
|
670
|
-
|
|
676
|
+
function historyCoversEvent(event, coverage) {
|
|
677
|
+
const eventId = "eventId" in event && typeof event.eventId === "string" ? event.eventId : undefined;
|
|
678
|
+
return eventId === undefined || coverage.eventIds.has(eventId);
|
|
679
|
+
}
|
|
680
|
+
function isNativeHistoryToolEchoEvent(event, coverage, sessionStatus) {
|
|
681
|
+
if (coverage.mode !== "native" || sessionStatus === "running")
|
|
682
|
+
return false;
|
|
683
|
+
if (event.type !== "tool_call" &&
|
|
684
|
+
event.type !== "tool_execution_started" &&
|
|
685
|
+
event.type !== "tool_execution_updated" &&
|
|
686
|
+
event.type !== "tool_execution_finished")
|
|
687
|
+
return false;
|
|
688
|
+
return coverage.toolCallIds.has(event.toolCallId) || historyCoversEvent(event, coverage);
|
|
671
689
|
}
|
|
672
690
|
export function mergeMessageTurnTimings(...groups) {
|
|
673
691
|
const byEventId = new Map();
|