@pasko70/pibo 1.1.0 → 1.2.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/README.md +106 -254
- package/context/codex-base-prompt.md +4 -0
- package/context/compute-worker.md +23 -0
- package/context/pibo-native-tooling.md +18 -0
- package/context/pibo-system-prompt.md +69 -8
- package/dist/api/simple-agent-api.js +136 -0
- package/dist/app-context.js +4 -0
- package/dist/apps/chat/agent-profiles.js +18 -3
- package/dist/apps/chat/agent-store.js +113 -16
- package/dist/apps/chat/chat-api-routes.js +311 -0
- package/dist/apps/chat/chat-capability-routes.js +90 -0
- package/dist/apps/chat/chat-files.js +178 -0
- package/dist/apps/chat/chat-request-normalizers.js +681 -0
- package/dist/apps/chat/chat-settings-routes.js +75 -0
- package/dist/apps/chat/chat-trace-helpers.js +94 -0
- package/dist/apps/chat/chat-user-skill-routes.js +149 -0
- package/dist/apps/chat/cron-api.js +213 -0
- package/dist/apps/chat/data/chat-data-mappers.js +74 -0
- package/dist/apps/chat/data/event-command-service.js +75 -0
- package/dist/apps/chat/data/navigation-query-service.js +11 -0
- package/dist/apps/chat/data/project-service.js +844 -0
- package/dist/apps/chat/data/read-state-service.js +42 -0
- package/dist/apps/chat/data/room-service.js +52 -0
- package/dist/apps/chat/data/session-query-service.js +63 -0
- package/dist/apps/chat/data/timeline-query-service.js +96 -0
- package/dist/apps/chat/event-log.js +1 -307
- package/dist/apps/chat/model-catalog.js +7 -2
- package/dist/apps/chat/output-compactor.js +126 -0
- package/dist/apps/chat/output-event-policy.js +17 -0
- package/dist/apps/chat/project-workflow-human-actions.js +347 -0
- package/dist/apps/chat/project-workflow-sessions.js +260 -0
- package/dist/apps/chat/provider-auth-actions.js +43 -0
- package/dist/apps/chat/ralph-api.js +156 -0
- package/dist/apps/chat/read-model.js +1 -218
- package/dist/apps/chat/rooms.js +1 -321
- package/dist/apps/chat/static-assets.js +996 -0
- package/dist/apps/chat/stream.js +29 -6
- package/dist/apps/chat/trace.js +179 -1003
- package/dist/apps/chat/types/event-store.js +1 -0
- package/dist/apps/chat/types/read-model.js +1 -0
- package/dist/apps/chat/types/rooms.js +36 -0
- package/dist/apps/chat/web-app.js +3131 -1959
- package/dist/apps/chat/workflow-catalog.js +572 -0
- package/dist/apps/chat/workflow-edge-compatibility.js +51 -0
- package/dist/apps/chat/workflow-json-schema-validation.js +335 -0
- package/dist/apps/chat/workflow-persistence-model.js +140 -0
- package/dist/apps/chat/workflow-persistence.js +633 -0
- package/dist/apps/chat/workflow-registered-ref-params.js +130 -0
- package/dist/apps/chat/workflow-registered-ref-pickers.js +179 -0
- package/dist/apps/chat/workflow-registered-ref-validation.js +210 -0
- package/dist/apps/chat/workflow-v2-security-validation.js +93 -0
- package/dist/apps/chat/workflow-validation-helpers.js +114 -0
- package/dist/apps/chat-ui/assets/{dist-CNLWH2qh.js → dist-B4lw9z4F.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-8e4L8ciw.js → dist-BbTaHWON.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CMZOa5ik.js → dist-BcT_c1EJ.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-DNcnQRPF.js → dist-CGINd7XU.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CqqUC8Ce.js → dist-CrBzZkUp.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-D2N4-LIc.js → dist-CyyISotB.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CUqpST5w.js → dist-DFbnFNpX.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CspjOeBj.js → dist-DGLWQLX8.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-B7bbI3Qz.js → dist-DfcIkFSN.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-v4pjHlB7.js → dist-sKDHTwaT.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-D9L4MSRF.js → dist-y9D6la48.js} +1 -1
- package/dist/apps/chat-ui/assets/index-C25VYnyb.css +1 -0
- package/dist/apps/chat-ui/assets/index-CUkuvI3v.js +165 -0
- package/dist/apps/chat-ui/assets/pwa-images/android/launchericon-144x144.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/android/launchericon-192x192.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/android/launchericon-48x48.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/android/launchericon-512x512.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/android/launchericon-72x72.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/android/launchericon-96x96.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/100.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/1024.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/114.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/120.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/128.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/144.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/152.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/16.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/167.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/180.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/192.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/20.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/256.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/29.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/32.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/40.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/50.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/512.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/57.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/58.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/60.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/64.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/72.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/76.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/80.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/ios/87.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/LargeTile.scale-100.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/LargeTile.scale-125.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/LargeTile.scale-150.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/LargeTile.scale-200.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/LargeTile.scale-400.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/SmallTile.scale-100.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/SmallTile.scale-125.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/SmallTile.scale-150.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/SmallTile.scale-200.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/SmallTile.scale-400.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/SplashScreen.scale-100.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/SplashScreen.scale-125.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/SplashScreen.scale-150.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/SplashScreen.scale-200.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/SplashScreen.scale-400.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square150x150Logo.scale-100.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square150x150Logo.scale-125.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square150x150Logo.scale-150.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square150x150Logo.scale-200.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square150x150Logo.scale-400.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-16.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-20.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-24.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-256.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-30.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-32.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-36.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-40.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-44.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-48.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-60.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-64.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-72.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-80.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-96.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-16.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-20.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-24.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-256.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-30.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-32.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-36.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-40.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-44.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-48.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-60.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-64.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-72.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-80.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-96.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.scale-100.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.scale-125.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.scale-150.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.scale-200.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.scale-400.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-16.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-20.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-24.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-256.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-30.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-32.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-36.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-40.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-44.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-48.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-60.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-64.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-72.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-80.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-96.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/StoreLogo.scale-100.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/StoreLogo.scale-125.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/StoreLogo.scale-150.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/StoreLogo.scale-200.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/StoreLogo.scale-400.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Wide310x150Logo.scale-100.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Wide310x150Logo.scale-125.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Wide310x150Logo.scale-150.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Wide310x150Logo.scale-200.png +0 -0
- package/dist/apps/chat-ui/assets/pwa-images/windows/Wide310x150Logo.scale-400.png +0 -0
- package/dist/apps/chat-ui/index.html +8 -3
- package/dist/apps/chat-ui/manifest.webmanifest +25 -0
- package/dist/apps/chat-ui/sw.js +41 -0
- package/dist/apps/cli-ui/InkSessionApp.js +1218 -0
- package/dist/apps/cli-ui/InkTerminalLine.js +53 -0
- package/dist/apps/cli-ui/InkTerminalRow.js +304 -0
- package/dist/apps/cli-ui/InkTerminalView.js +25 -0
- package/dist/apps/cli-ui/cliSessionsCommand.js +232 -0
- package/dist/apps/cli-ui/index.js +8 -0
- package/dist/apps/cli-ui/inkColors.js +67 -0
- package/dist/apps/cli-ui/inkJson.js +244 -0
- package/dist/apps/cli-ui/inkMarkdown.js +122 -0
- package/dist/apps/context-files-ui/assets/{dist-DFi2YGux.js → dist-BOiGdrG-.js} +1 -1
- package/dist/apps/context-files-ui/assets/{dist-DyfSeBMu.js → dist-DK01b7x4.js} +1 -1
- package/dist/apps/context-files-ui/assets/{dist-CwbH_3RN.js → dist-DPG9jOQ-.js} +1 -1
- package/dist/apps/context-files-ui/assets/{dist-dTBsFYAl.js → dist-Dp5AH00p.js} +1 -1
- package/dist/apps/context-files-ui/assets/{dist-CxRLRmMx.js → dist-DqYw0LH7.js} +1 -1
- package/dist/apps/context-files-ui/assets/{dist-MyZgX9K2.js → dist-TF5iO5ML.js} +1 -1
- package/dist/apps/context-files-ui/assets/{dist-DQXzt2Ng.js → dist-TbjAhles.js} +1 -1
- package/dist/apps/context-files-ui/assets/{dist-YwR9dpb-.js → dist-ZsBbt0uY.js} +1 -1
- package/dist/apps/context-files-ui/assets/{dist-CKQF1zEu.js → dist-kmsvtHkH.js} +1 -1
- package/dist/apps/context-files-ui/assets/{dist-BJW3917N.js → dist-vnd7PMu3.js} +1 -1
- package/dist/apps/context-files-ui/assets/{index-BwRDoHMC.css → index-B92tL3Pp.css} +1 -1
- package/dist/apps/context-files-ui/assets/{index-GwvjXytt.js → index-BhAWD3dv.js} +2 -2
- package/dist/apps/context-files-ui/index.html +2 -2
- package/dist/auth/better-auth.js +2 -1
- package/dist/auth/login-actions.js +251 -0
- package/dist/auth/openai-codex-usage.js +147 -0
- package/dist/bin/pibo.js +0 -0
- package/dist/bin/rg.js +15 -0
- package/dist/cli-session/fakeSessionSource.js +804 -0
- package/dist/cli-session/index.js +3 -0
- package/dist/cli-session/localSessionSource.js +1144 -0
- package/dist/cli-session/sessionSource.js +13 -0
- package/dist/cli.js +142 -14
- package/dist/compute/cli.js +415 -0
- package/dist/compute/docker.js +827 -0
- package/dist/compute/resource-health.js +333 -0
- package/dist/compute/resource-policy.js +98 -0
- package/dist/config/config.js +9 -5
- package/dist/core/context-build.js +677 -0
- package/dist/core/model-defaults.js +51 -9
- package/dist/core/pibo-home.js +8 -0
- package/dist/core/profiles.js +48 -0
- package/dist/core/provider-telemetry.js +222 -0
- package/dist/core/routed-session.js +441 -47
- package/dist/core/runtime-telemetry.js +853 -0
- package/dist/core/runtime.js +103 -15
- package/dist/core/session-errors.js +47 -0
- package/dist/core/session-model.js +39 -0
- package/dist/core/session-router.js +292 -62
- package/dist/core/shared-app.js +17 -0
- package/dist/core/skill-expansion.js +43 -0
- package/dist/core/system-prompt-template.js +9 -9
- package/dist/core/telemetry-staleness.js +128 -0
- package/dist/core/test-output-compaction.js +145 -0
- package/dist/core/user-settings.js +73 -0
- package/dist/cron/channel.js +28 -0
- package/dist/cron/cli.js +230 -0
- package/dist/cron/plugin.js +11 -0
- package/dist/cron/schedule.js +214 -0
- package/dist/cron/service.js +177 -0
- package/dist/cron/store.js +349 -0
- package/dist/cron/types.js +1 -0
- package/dist/data/cli.js +184 -0
- package/dist/data/event-log.js +106 -0
- package/dist/data/final-app-space-cutover-migration.js +728 -0
- package/dist/data/ingest-service.js +389 -0
- package/dist/data/message-store.js +62 -0
- package/dist/data/navigation-store.js +75 -0
- package/dist/data/observation-store.js +46 -0
- package/dist/data/payload-store.js +144 -0
- package/dist/data/pibo-store.js +59 -0
- package/dist/data/schema.js +434 -0
- package/dist/data/session-store.js +63 -0
- package/dist/data/shared-app-migration.js +757 -0
- package/dist/data/sqlite-schema.js +12 -0
- package/dist/data/telemetry-preview.js +65 -0
- package/dist/data/telemetry-queries.js +212 -0
- package/dist/data/telemetry-retention.js +50 -0
- package/dist/data/telemetry-rows.js +158 -0
- package/dist/data/telemetry.js +357 -0
- package/dist/debug/delta-compaction.js +99 -0
- package/dist/debug/detail-format.js +86 -0
- package/dist/debug/events.js +149 -29
- package/dist/debug/failures.js +162 -0
- package/dist/debug/index.js +655 -30
- package/dist/debug/messages.js +185 -0
- package/dist/debug/next-commands.js +6 -0
- package/dist/debug/payloads.js +123 -0
- package/dist/debug/pty.js +924 -0
- package/dist/debug/session.js +45 -15
- package/dist/debug/sql.js +1 -1
- package/dist/debug/stores.js +18 -13
- package/dist/debug/summary.js +72 -0
- package/dist/debug/telemetry.js +649 -0
- package/dist/debug/tools.js +168 -0
- package/dist/debug/trace-render-check.js +151 -0
- package/dist/debug/trace.js +152 -27
- package/dist/debug/web-artifacts.js +63 -0
- package/dist/debug/web-options.js +313 -0
- package/dist/debug/web-render-analysis.js +310 -0
- package/dist/debug/web-snapshot-browser-scripts.js +303 -0
- package/dist/debug/web-streaming-benchmark-analysis.js +605 -0
- package/dist/debug/web-streaming-browser-library.js +928 -0
- package/dist/debug/web-streaming-browser-scripts.js +242 -0
- package/dist/debug/web-streaming-provider-telemetry.js +194 -0
- package/dist/debug/web-streaming-report.js +493 -0
- package/dist/debug/web-streaming-types.js +1 -0
- package/dist/debug/web.js +574 -0
- package/dist/gateway/backup.js +83 -0
- package/dist/gateway/cli.js +511 -0
- package/dist/gateway/fallback.js +155 -0
- package/dist/gateway/pidfile.js +84 -0
- package/dist/gateway/protocol.js +16 -0
- package/dist/gateway/server.js +172 -17
- package/dist/gateway/tool.js +54 -51
- package/dist/gateway/web.js +74 -2
- package/dist/index.js +3 -1
- package/dist/local/client.js +3 -3
- package/dist/local/extension.js +8 -5
- package/dist/plugins/builtin.js +251 -49
- package/dist/plugins/chat-vscode-web.js +28 -0
- package/dist/plugins/codex-compat.js +0 -41
- package/dist/plugins/context-files.js +98 -18
- package/dist/plugins/dev-auth.js +124 -0
- package/dist/plugins/native-tooling.js +15 -0
- package/dist/plugins/registry.js +49 -1
- package/dist/plugins/web-annotations.js +27 -0
- package/dist/providers/minimax.js +70 -0
- package/dist/providers/openai-compat.js +48 -0
- package/dist/ralph/channel.js +8 -0
- package/dist/ralph/cli.js +152 -0
- package/dist/ralph/plugin.js +14 -0
- package/dist/ralph/service.js +271 -0
- package/dist/ralph/stopping.js +151 -0
- package/dist/ralph/store.js +450 -0
- package/dist/ralph/templates.js +200 -0
- package/dist/ralph/types.js +1 -0
- package/dist/reliability/store.js +42 -26
- package/dist/runs/registry.js +72 -35
- package/dist/session-ui/commandCatalog.js +193 -0
- package/dist/session-ui/commandResults.js +95 -0
- package/dist/session-ui/index.js +7 -0
- package/dist/session-ui/ownerViewModel.js +27 -0
- package/dist/session-ui/roomSessionViewModel.js +69 -0
- package/dist/session-ui/statusViewModel.js +127 -0
- package/dist/session-ui/terminalCards.js +210 -0
- package/dist/session-ui/terminalRows.js +937 -0
- package/dist/session-ui/terminalValue.js +45 -0
- package/dist/sessions/pibo-data-store.js +178 -0
- package/dist/sessions/sqlite-store.js +78 -12
- package/dist/sessions/store.js +11 -4
- package/dist/sessions/workflow-session-kind.js +20 -0
- package/dist/setup/cli.js +567 -0
- package/dist/shared/trace-async-agent-runs.js +127 -0
- package/dist/shared/trace-engine.js +96 -0
- package/dist/shared/trace-event-projection.js +679 -0
- package/dist/shared/trace-live-reducer.js +191 -0
- package/dist/shared/trace-nodes.js +76 -0
- package/dist/shared/trace-order.js +11 -10
- package/dist/shared/trace-patch-nodes.js +83 -0
- package/dist/shared/trace-run-notifications.js +69 -0
- package/dist/shared/trace-subagent-links.js +46 -0
- package/dist/shared/trace-transcript.js +303 -0
- package/dist/shared/trace-types.js +1 -0
- package/dist/shared-app.js +4 -0
- package/dist/signals/aggregate.js +65 -0
- package/dist/signals/events.js +1 -0
- package/dist/signals/projector.js +158 -0
- package/dist/signals/registry.js +513 -0
- package/dist/signals/store.js +1 -0
- package/dist/signals/types.js +1 -0
- package/dist/skills/cli.js +117 -0
- package/dist/tools/agent-browser-leases.js +219 -0
- package/dist/tools/agent-browser-wrapper.js +99 -0
- package/dist/tools/browser-pool.js +623 -0
- package/dist/tools/browser-use-cdp.js +56 -4
- package/dist/tools/browser-use-leases.js +215 -37
- package/dist/tools/browser-use-wrapper.js +508 -65
- package/dist/tools/cdp-client.js +189 -0
- package/dist/tools/guides.js +203 -4
- package/dist/tools/index.js +666 -16
- package/dist/tools/npm-runtime.js +136 -0
- package/dist/tools/registry.js +107 -8
- package/dist/tools/runtime/index.js +3 -0
- package/dist/tools/runtime/node-backend.js +225 -0
- package/dist/tools/runtime/node-worker-source.js +206 -0
- package/dist/tools/runtime/python-backend.js +227 -0
- package/dist/tools/runtime/python-worker-source.js +178 -0
- package/dist/tools/runtime/registry.js +255 -0
- package/dist/tools/runtime/tool.js +168 -0
- package/dist/tools/runtime/types.js +1 -0
- package/dist/tools/web-search.js +2 -1
- package/dist/user-skills/installer.js +39 -36
- package/dist/user-skills/store.js +50 -11
- package/dist/web/auth.js +5 -1
- package/dist/web/channel.js +86 -0
- package/dist/web/http.js +79 -14
- package/dist/web-annotations/api.js +348 -0
- package/dist/web-annotations/attachments.js +201 -0
- package/dist/web-annotations/cdp.js +1107 -0
- package/dist/web-annotations/index.js +7 -0
- package/dist/web-annotations/store.js +407 -0
- package/dist/web-annotations/tools.js +350 -0
- package/dist/web-annotations/types.js +34 -0
- package/dist/web-annotations/validation.js +288 -0
- package/docs/README.md +23 -0
- package/docs/ops/install-developer-host.md +112 -0
- package/docs/ops/install-user-host.md +76 -0
- package/docs/ops/upgrade-user-to-developer-host.md +69 -0
- package/package.json +24 -10
- package/skills/builtin/pi-agent-harness/SKILL.md +24 -24
- package/skills/builtin/pibo-docker-system/SKILL.md +170 -0
- package/skills/builtin/pibo-spec-writing/SKILL.md +330 -0
- package/skills/builtin/prd/SKILL.md +143 -0
- package/skills/builtin/ralph-loop/SKILL.md +359 -0
- package/skills/builtin/ralph-prd-json/SKILL.md +123 -0
- package/skills/builtin/skill-creator/LICENSE.txt +202 -0
- package/skills/builtin/skill-creator/SKILL.md +513 -0
- package/skills/builtin/skill-creator/agents/analyzer.md +274 -0
- package/skills/builtin/skill-creator/agents/comparator.md +202 -0
- package/skills/builtin/skill-creator/agents/grader.md +223 -0
- package/skills/builtin/skill-creator/assets/eval_review.html +146 -0
- package/skills/builtin/skill-creator/eval-viewer/generate_review.py +471 -0
- package/skills/builtin/skill-creator/eval-viewer/viewer.html +1325 -0
- package/skills/builtin/skill-creator/references/schemas.md +430 -0
- package/skills/builtin/skill-creator/scripts/__init__.py +0 -0
- package/skills/builtin/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/skills/builtin/skill-creator/scripts/generate_report.py +326 -0
- package/skills/builtin/skill-creator/scripts/improve_description.py +247 -0
- package/skills/builtin/skill-creator/scripts/package_skill.py +136 -0
- package/skills/builtin/skill-creator/scripts/quick_validate.py +103 -0
- package/skills/builtin/skill-creator/scripts/run_eval.py +310 -0
- package/skills/builtin/skill-creator/scripts/run_loop.py +328 -0
- package/skills/builtin/skill-creator/scripts/utils.py +47 -0
- package/skills/builtin/web-annotations/SKILL.md +93 -0
- package/dist/apps/chat-ui/assets/index-D2Qxambd.js +0 -151
- package/dist/apps/chat-ui/assets/index-DXx368XK.css +0 -1
- package/dist/env.js +0 -32
- package/dist/plugins/core-tools.js +0 -94
- package/dist/plugins/example.js +0 -67
- package/dist/plugins/remote-agent.js +0 -9
- package/dist/remote/channel.js +0 -176
- package/dist/remote/client.js +0 -92
- package/dist/remote/examples/tui-controller.js +0 -263
- package/dist/remote/protocol.js +0 -55
- package/dist/remote/session-client.js +0 -189
- package/dist/sessions/bindings.js +0 -41
package/dist/debug/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { getPiboHome } from "../core/pibo-home.js";
|
|
1
3
|
import { resolveDebugStore, resolveDebugStores } from "./stores.js";
|
|
2
4
|
export async function runDebugCli(argv = process.argv) {
|
|
3
5
|
try {
|
|
@@ -18,6 +20,26 @@ export async function runDebugCli(argv = process.argv) {
|
|
|
18
20
|
await runDebugTrace(args.slice(1));
|
|
19
21
|
return;
|
|
20
22
|
}
|
|
23
|
+
if (args[0] === "summary") {
|
|
24
|
+
await runDebugSummary(args.slice(1));
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (args[0] === "messages") {
|
|
28
|
+
await runDebugMessages(args.slice(1));
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (args[0] === "final") {
|
|
32
|
+
await runDebugFinal(args.slice(1));
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (args[0] === "tool") {
|
|
36
|
+
await runDebugTool(args.slice(1));
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (args[0] === "failures") {
|
|
40
|
+
await runDebugFailures(args.slice(1));
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
21
43
|
if (args[0] === "events") {
|
|
22
44
|
await runDebugEvents(args.slice(1));
|
|
23
45
|
return;
|
|
@@ -30,6 +52,24 @@ export async function runDebugCli(argv = process.argv) {
|
|
|
30
52
|
await runDebugRuns(args.slice(1));
|
|
31
53
|
return;
|
|
32
54
|
}
|
|
55
|
+
if (args[0] === "signals") {
|
|
56
|
+
await runDebugSignals(args.slice(1));
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (args[0] === "telemetry") {
|
|
60
|
+
await runDebugTelemetry(args.slice(1));
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (args[0] === "web") {
|
|
64
|
+
const { runDebugWeb } = await import("./web.js");
|
|
65
|
+
await runDebugWeb(args.slice(1));
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (args[0] === "pty") {
|
|
69
|
+
const { runDebugPty } = await import("./pty.js");
|
|
70
|
+
await runDebugPty(args.slice(1));
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
33
73
|
throw new Error(`Unknown pibo debug command "${args[0]}". Run pibo debug --help.`);
|
|
34
74
|
}
|
|
35
75
|
catch (error) {
|
|
@@ -50,7 +90,7 @@ async function runDebugDb(args) {
|
|
|
50
90
|
console.log(JSON.stringify({ stores }, null, 2));
|
|
51
91
|
return;
|
|
52
92
|
}
|
|
53
|
-
console.log(["store\tpath\texists\tdescription", ...stores.map((store) => `${store.name}\t${store.
|
|
93
|
+
console.log(["store\tpath\texists\tdescription", ...stores.map((store) => `${store.name}\t${store.path}\t${store.exists}\t${store.description}`)].join("\n"));
|
|
54
94
|
return;
|
|
55
95
|
}
|
|
56
96
|
const storeName = options.positionals[0];
|
|
@@ -111,6 +151,250 @@ async function runDebugSession(args) {
|
|
|
111
151
|
else
|
|
112
152
|
console.log(formatDebugSessionSummary(summary));
|
|
113
153
|
}
|
|
154
|
+
async function runDebugSummary(args) {
|
|
155
|
+
if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
|
|
156
|
+
printDebugSummaryDiscovery();
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
const options = parseOptions(args);
|
|
160
|
+
const input = options.positionals[0];
|
|
161
|
+
if (!input)
|
|
162
|
+
throw new Error("pibo debug summary requires <pibo-session-id>");
|
|
163
|
+
const { formatJson } = await import("./sql.js");
|
|
164
|
+
const { formatDebugSummary, inspectDebugSummary } = await import("./summary.js");
|
|
165
|
+
const result = await inspectDebugSummary(input, { sessions: resolveDebugStore("sessions"), chat: resolveDebugStore("chat") });
|
|
166
|
+
if (options.json)
|
|
167
|
+
console.log(formatJson(result));
|
|
168
|
+
else
|
|
169
|
+
console.log(formatDebugSummary(result));
|
|
170
|
+
}
|
|
171
|
+
async function runDebugMessages(args) {
|
|
172
|
+
if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
|
|
173
|
+
printDebugMessagesDiscovery();
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const options = parseOptions(args);
|
|
177
|
+
const piboSessionId = options.positionals[0];
|
|
178
|
+
const command = options.positionals[1] ?? "list";
|
|
179
|
+
if (!piboSessionId)
|
|
180
|
+
throw new Error("pibo debug messages requires <pibo-session-id>");
|
|
181
|
+
const { formatJson } = await import("./sql.js");
|
|
182
|
+
const { formatDebugMessageShow, formatDebugMessagesList, inspectDebugMessageShow, inspectDebugMessagesList } = await import("./messages.js");
|
|
183
|
+
if (command === "list") {
|
|
184
|
+
const result = inspectDebugMessagesList(piboSessionId, resolveDebugStore("chat"), { limit: options.limit });
|
|
185
|
+
if (options.json)
|
|
186
|
+
console.log(formatJson(result));
|
|
187
|
+
else
|
|
188
|
+
console.log(formatDebugMessagesList(result));
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
if (command === "show") {
|
|
192
|
+
const selector = options.positionals[2];
|
|
193
|
+
if (!selector)
|
|
194
|
+
throw new Error("pibo debug messages <pibo-session-id> show requires <selector>");
|
|
195
|
+
const result = inspectDebugMessageShow(piboSessionId, resolveDebugStore("chat"), selector, detailOptions(options));
|
|
196
|
+
if (options.json)
|
|
197
|
+
console.log(formatJson(result));
|
|
198
|
+
else
|
|
199
|
+
console.log(formatDebugMessageShow(result, { plain: options.plain }));
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
throw new Error(`Unknown pibo debug messages command "${command}". Run pibo debug messages --help.`);
|
|
203
|
+
}
|
|
204
|
+
async function runDebugFinal(args) {
|
|
205
|
+
if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
|
|
206
|
+
printDebugFinalDiscovery();
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
const options = parseOptions(args);
|
|
210
|
+
const piboSessionId = options.positionals[0];
|
|
211
|
+
if (!piboSessionId)
|
|
212
|
+
throw new Error("pibo debug final requires <pibo-session-id>");
|
|
213
|
+
const { formatJson } = await import("./sql.js");
|
|
214
|
+
const { formatDebugMessageShow, inspectDebugMessageShow } = await import("./messages.js");
|
|
215
|
+
const result = inspectDebugMessageShow(piboSessionId, resolveDebugStore("chat"), "assistant:last", { ...detailOptions(options), final: true });
|
|
216
|
+
if (options.json)
|
|
217
|
+
console.log(formatJson(result));
|
|
218
|
+
else
|
|
219
|
+
console.log(formatDebugMessageShow(result, { plain: options.plain, final: true }));
|
|
220
|
+
}
|
|
221
|
+
async function runDebugTool(args) {
|
|
222
|
+
if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
|
|
223
|
+
printDebugToolDiscovery();
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
const options = parseOptions(args);
|
|
227
|
+
const piboSessionId = options.positionals[0];
|
|
228
|
+
const toolCallId = options.positionals[1];
|
|
229
|
+
if (!piboSessionId || !toolCallId)
|
|
230
|
+
throw new Error("pibo debug tool requires <pibo-session-id> <tool-call-id>");
|
|
231
|
+
const { formatJson } = await import("./sql.js");
|
|
232
|
+
const { formatDebugTool, inspectDebugTool } = await import("./tools.js");
|
|
233
|
+
const result = inspectDebugTool(piboSessionId, resolveDebugStore("chat"), toolCallId, { ...detailOptions(options), args: options.args, output: options.output, error: options.error });
|
|
234
|
+
if (options.json)
|
|
235
|
+
console.log(formatJson(result));
|
|
236
|
+
else
|
|
237
|
+
console.log(formatDebugTool(result, { args: options.args, output: options.output, error: options.error }));
|
|
238
|
+
}
|
|
239
|
+
async function runDebugFailures(args) {
|
|
240
|
+
if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
|
|
241
|
+
printDebugFailuresDiscovery();
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
const options = parseOptions(args);
|
|
245
|
+
const piboSessionId = options.positionals[0];
|
|
246
|
+
if (!piboSessionId)
|
|
247
|
+
throw new Error("pibo debug failures requires <pibo-session-id>");
|
|
248
|
+
const { formatJson } = await import("./sql.js");
|
|
249
|
+
const { formatDebugFailures, inspectDebugFailures } = await import("./failures.js");
|
|
250
|
+
const result = await inspectDebugFailures(piboSessionId, { sessions: resolveDebugStore("sessions"), chat: resolveDebugStore("chat") }, { limit: options.limit });
|
|
251
|
+
if (options.json)
|
|
252
|
+
console.log(formatJson(result));
|
|
253
|
+
else
|
|
254
|
+
console.log(formatDebugFailures(result));
|
|
255
|
+
}
|
|
256
|
+
async function runDebugSignals(args) {
|
|
257
|
+
if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
|
|
258
|
+
printDebugSignalsDiscovery();
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
const command = args[0];
|
|
262
|
+
const options = parseOptions(args.slice(1));
|
|
263
|
+
const piboSessionId = options.positionals[0];
|
|
264
|
+
if ((command !== "session" && command !== "tree") || !piboSessionId) {
|
|
265
|
+
throw new Error("pibo debug signals requires session <pibo-session-id> or tree <root-pibo-session-id>");
|
|
266
|
+
}
|
|
267
|
+
const baseUrl = process.env.PIBO_GATEWAY_URL ?? process.env.PIBO_WEB_URL;
|
|
268
|
+
if (!baseUrl)
|
|
269
|
+
throw new Error("Set PIBO_GATEWAY_URL to inspect live signal state through Chat Web APIs.");
|
|
270
|
+
const url = new URL(`/api/chat/signals/${command}/${encodeURIComponent(piboSessionId)}`, baseUrl);
|
|
271
|
+
const headers = new Headers();
|
|
272
|
+
if (options.cookie)
|
|
273
|
+
headers.set("cookie", readCookieHeaderFile(options.cookie));
|
|
274
|
+
if (options.authHeader)
|
|
275
|
+
headers.set("authorization", options.authHeader);
|
|
276
|
+
const response = await fetch(url, { headers });
|
|
277
|
+
const payload = await response.json().catch(() => undefined);
|
|
278
|
+
if (!response.ok)
|
|
279
|
+
throw new Error(payload && typeof payload === "object" && "error" in payload ? String(payload.error) : `Request failed: ${response.status}`);
|
|
280
|
+
if (options.json) {
|
|
281
|
+
const { formatJson } = await import("./sql.js");
|
|
282
|
+
console.log(formatJson(payload));
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
console.log(formatSignalSnapshotText(payload));
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
async function runDebugTelemetry(args) {
|
|
289
|
+
if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
|
|
290
|
+
printDebugTelemetryDiscovery();
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
const command = args[0];
|
|
294
|
+
const options = parseOptions(args.slice(1));
|
|
295
|
+
const { formatJson } = await import("./sql.js");
|
|
296
|
+
const { formatTelemetryProvider, formatTelemetryProviderEvents, formatTelemetryProviderPayload, formatTelemetryPrune, formatTelemetrySession, formatTelemetrySessions, formatTelemetryStale, formatTelemetryStats, formatTelemetryTool, formatTelemetryTurn, inspectTelemetryProvider, inspectTelemetryProviderEvents, inspectTelemetryProviderPayload, inspectTelemetryPrune, inspectTelemetrySession, inspectTelemetrySessions, inspectTelemetryStale, inspectTelemetryStats, inspectTelemetryTool, inspectTelemetryTurn, } = await import("./telemetry.js");
|
|
297
|
+
const store = resolveDebugStore("pibo-data");
|
|
298
|
+
if (command === "sessions") {
|
|
299
|
+
const result = inspectTelemetrySessions(store, { limit: options.limit, active: options.active, stale: options.stale });
|
|
300
|
+
if (options.json)
|
|
301
|
+
console.log(formatJson(result));
|
|
302
|
+
else
|
|
303
|
+
console.log(formatTelemetrySessions(result));
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
if (command === "session") {
|
|
307
|
+
const piboSessionId = options.positionals[0];
|
|
308
|
+
if (!piboSessionId)
|
|
309
|
+
throw new Error("pibo debug telemetry session requires <pibo-session-id>");
|
|
310
|
+
const result = inspectTelemetrySession(store, piboSessionId, { limit: options.limit });
|
|
311
|
+
if (options.json)
|
|
312
|
+
console.log(formatJson(result));
|
|
313
|
+
else
|
|
314
|
+
console.log(formatTelemetrySession(result));
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
if (command === "turn") {
|
|
318
|
+
const turnIdOrEventId = options.positionals[0];
|
|
319
|
+
if (!turnIdOrEventId)
|
|
320
|
+
throw new Error("pibo debug telemetry turn requires <turn-id-or-event-id>");
|
|
321
|
+
const result = inspectTelemetryTurn(store, turnIdOrEventId, { limit: options.limit, events: options.events });
|
|
322
|
+
if (options.json)
|
|
323
|
+
console.log(formatJson(result));
|
|
324
|
+
else
|
|
325
|
+
console.log(formatTelemetryTurn(result));
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
if (command === "provider") {
|
|
329
|
+
const providerRequestId = options.positionals[0];
|
|
330
|
+
if (!providerRequestId)
|
|
331
|
+
throw new Error("pibo debug telemetry provider requires <provider-request-id>");
|
|
332
|
+
const subcommand = options.positionals[1];
|
|
333
|
+
if (subcommand === "events") {
|
|
334
|
+
const result = inspectTelemetryProviderEvents(store, providerRequestId, { limit: options.limit, after: options.after, fields: options.fields });
|
|
335
|
+
if (options.json)
|
|
336
|
+
console.log(formatJson(result));
|
|
337
|
+
else
|
|
338
|
+
console.log(formatTelemetryProviderEvents(result));
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
if (subcommand === "payload") {
|
|
342
|
+
const payloadRef = options.positionals[2];
|
|
343
|
+
if (!payloadRef)
|
|
344
|
+
throw new Error("pibo debug telemetry provider <provider-request-id> payload requires <preview-or-event-summary-id>");
|
|
345
|
+
const result = inspectTelemetryProviderPayload(store, providerRequestId, payloadRef);
|
|
346
|
+
if (options.json)
|
|
347
|
+
console.log(formatJson(result));
|
|
348
|
+
else
|
|
349
|
+
console.log(formatTelemetryProviderPayload(result));
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
if (subcommand)
|
|
353
|
+
throw new Error(`Unknown pibo debug telemetry provider subcommand "${subcommand}". Run pibo debug telemetry --help.`);
|
|
354
|
+
const result = inspectTelemetryProvider(store, providerRequestId);
|
|
355
|
+
if (options.json)
|
|
356
|
+
console.log(formatJson(result));
|
|
357
|
+
else
|
|
358
|
+
console.log(formatTelemetryProvider(result));
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
if (command === "tool") {
|
|
362
|
+
const toolCallId = options.positionals[0];
|
|
363
|
+
if (!toolCallId)
|
|
364
|
+
throw new Error("pibo debug telemetry tool requires <tool-call-id>");
|
|
365
|
+
const result = inspectTelemetryTool(store, toolCallId);
|
|
366
|
+
if (options.json)
|
|
367
|
+
console.log(formatJson(result));
|
|
368
|
+
else
|
|
369
|
+
console.log(formatTelemetryTool(result));
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
if (command === "stale") {
|
|
373
|
+
const result = inspectTelemetryStale(store, { limit: options.limit, thresholdMs: options.thresholdMs });
|
|
374
|
+
if (options.json)
|
|
375
|
+
console.log(formatJson(result));
|
|
376
|
+
else
|
|
377
|
+
console.log(formatTelemetryStale(result));
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
if (command === "stats") {
|
|
381
|
+
const result = inspectTelemetryStats(store, { retention: options.retention });
|
|
382
|
+
if (options.json)
|
|
383
|
+
console.log(formatJson(result));
|
|
384
|
+
else
|
|
385
|
+
console.log(formatTelemetryStats(result));
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
if (command === "prune") {
|
|
389
|
+
const result = inspectTelemetryPrune(store, { retention: options.retention, before: options.before, apply: options.apply });
|
|
390
|
+
if (options.json)
|
|
391
|
+
console.log(formatJson(result));
|
|
392
|
+
else
|
|
393
|
+
console.log(formatTelemetryPrune(result));
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
throw new Error(`Unknown pibo debug telemetry command "${command}". Run pibo debug telemetry --help.`);
|
|
397
|
+
}
|
|
114
398
|
async function runDebugTrace(args) {
|
|
115
399
|
if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
|
|
116
400
|
printDebugTraceDiscovery();
|
|
@@ -120,32 +404,60 @@ async function runDebugTrace(args) {
|
|
|
120
404
|
const piboSessionId = options.positionals[0];
|
|
121
405
|
if (!piboSessionId)
|
|
122
406
|
throw new Error("pibo debug trace requires <pibo-session-id>");
|
|
123
|
-
const
|
|
124
|
-
const { formatDebugTrace, inspectDebugTrace } = await import("./trace.js");
|
|
125
|
-
const result = await inspectDebugTrace(piboSessionId, {
|
|
407
|
+
const stores = {
|
|
126
408
|
sessions: resolveDebugStore("sessions"),
|
|
127
409
|
chat: resolveDebugStore("chat"),
|
|
128
|
-
}
|
|
410
|
+
};
|
|
411
|
+
const { formatJson } = await import("./sql.js");
|
|
412
|
+
const { formatDebugTrace, formatDebugTraceNode, inspectDebugTrace, inspectDebugTraceNode } = await import("./trace.js");
|
|
413
|
+
if (options.positionals[1] === "show") {
|
|
414
|
+
const nodeId = options.positionals[2];
|
|
415
|
+
if (!nodeId)
|
|
416
|
+
throw new Error("pibo debug trace <pibo-session-id> show requires <node-id>");
|
|
417
|
+
const result = await inspectDebugTraceNode(piboSessionId, stores, nodeId);
|
|
418
|
+
if (options.json)
|
|
419
|
+
console.log(formatJson(result));
|
|
420
|
+
else
|
|
421
|
+
console.log(formatDebugTraceNode(result));
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
const result = await inspectDebugTrace(piboSessionId, stores, {
|
|
129
425
|
runningOnly: options.runningOnly,
|
|
130
426
|
check: options.check,
|
|
131
427
|
});
|
|
132
428
|
if (options.json)
|
|
133
429
|
console.log(formatJson(result));
|
|
134
430
|
else
|
|
135
|
-
console.log(formatDebugTrace(result));
|
|
431
|
+
console.log(formatDebugTrace(result, { medium: options.medium }));
|
|
136
432
|
}
|
|
137
433
|
async function runDebugEvents(args) {
|
|
138
434
|
if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
|
|
139
435
|
printDebugEventsDiscovery();
|
|
140
436
|
return;
|
|
141
437
|
}
|
|
438
|
+
if (args[0] === "compact-deltas") {
|
|
439
|
+
const options = parseOptions(args.slice(1));
|
|
440
|
+
const { formatJson } = await import("./sql.js");
|
|
441
|
+
const { formatDeltaCompaction, runDeltaCompaction } = await import("./delta-compaction.js");
|
|
442
|
+
const result = runDeltaCompaction({
|
|
443
|
+
apply: options.apply,
|
|
444
|
+
store: options.store,
|
|
445
|
+
session: options.key,
|
|
446
|
+
json: options.json,
|
|
447
|
+
});
|
|
448
|
+
if (options.json)
|
|
449
|
+
console.log(formatJson(result));
|
|
450
|
+
else
|
|
451
|
+
console.log(formatDeltaCompaction(result));
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
142
454
|
if (args[0] === "stream") {
|
|
143
455
|
const options = parseOptions(args.slice(1));
|
|
144
456
|
const { formatJson, formatRows } = await import("./sql.js");
|
|
145
457
|
const { PiboReliabilityStore } = await import("../reliability/store.js");
|
|
146
458
|
const store = resolveDebugStore("reliability");
|
|
147
459
|
if (!store.exists)
|
|
148
|
-
throw new Error(`Debug store "reliability" not found at ${store.
|
|
460
|
+
throw new Error(`Debug store "reliability" not found at ${store.path}`);
|
|
149
461
|
const reliability = new PiboReliabilityStore(store.path);
|
|
150
462
|
try {
|
|
151
463
|
const events = reliability.list({
|
|
@@ -169,7 +481,7 @@ async function runDebugEvents(args) {
|
|
|
169
481
|
const { PiboReliabilityStore } = await import("../reliability/store.js");
|
|
170
482
|
const store = resolveDebugStore("reliability");
|
|
171
483
|
if (!store.exists)
|
|
172
|
-
throw new Error(`Debug store "reliability" not found at ${store.
|
|
484
|
+
throw new Error(`Debug store "reliability" not found at ${store.path}`);
|
|
173
485
|
const reliability = new PiboReliabilityStore(store.path);
|
|
174
486
|
try {
|
|
175
487
|
const counts = reliability.countEvents({
|
|
@@ -193,7 +505,7 @@ async function runDebugEvents(args) {
|
|
|
193
505
|
const { PiboReliabilityStore } = await import("../reliability/store.js");
|
|
194
506
|
const store = resolveDebugStore("reliability");
|
|
195
507
|
if (!store.exists)
|
|
196
|
-
throw new Error(`Debug store "reliability" not found at ${store.
|
|
508
|
+
throw new Error(`Debug store "reliability" not found at ${store.path}`);
|
|
197
509
|
if (!options.topic || !options.retention || !options.before) {
|
|
198
510
|
throw new Error("pibo debug events prune requires --topic, --retention, and --before");
|
|
199
511
|
}
|
|
@@ -229,7 +541,7 @@ async function runDebugEvents(args) {
|
|
|
229
541
|
const { PiboReliabilityStore } = await import("../reliability/store.js");
|
|
230
542
|
const store = resolveDebugStore("reliability");
|
|
231
543
|
if (!store.exists)
|
|
232
|
-
throw new Error(`Debug store "reliability" not found at ${store.
|
|
544
|
+
throw new Error(`Debug store "reliability" not found at ${store.path}`);
|
|
233
545
|
const reliability = new PiboReliabilityStore(store.path);
|
|
234
546
|
try {
|
|
235
547
|
const consumers = reliability.listConsumers();
|
|
@@ -244,11 +556,29 @@ async function runDebugEvents(args) {
|
|
|
244
556
|
return;
|
|
245
557
|
}
|
|
246
558
|
const options = parseOptions(args);
|
|
247
|
-
|
|
559
|
+
let piboSessionId = options.positionals[0];
|
|
560
|
+
let command = options.positionals[1] ?? "list";
|
|
561
|
+
if (piboSessionId === "list") {
|
|
562
|
+
piboSessionId = options.positionals[1];
|
|
563
|
+
command = "list";
|
|
564
|
+
}
|
|
248
565
|
if (!piboSessionId)
|
|
249
566
|
throw new Error("pibo debug events requires <pibo-session-id>");
|
|
250
567
|
const { formatJson } = await import("./sql.js");
|
|
251
|
-
const { formatDebugEvents, inspectDebugEvents } = await import("./events.js");
|
|
568
|
+
const { formatDebugEventShow, formatDebugEvents, inspectDebugEventShow, inspectDebugEvents } = await import("./events.js");
|
|
569
|
+
if (command === "show") {
|
|
570
|
+
const selector = options.positionals[2];
|
|
571
|
+
if (!selector)
|
|
572
|
+
throw new Error("pibo debug events <pibo-session-id> show requires <stream-id-or-event-id>");
|
|
573
|
+
const result = inspectDebugEventShow(piboSessionId, resolveDebugStore("chat"), selector, { ...detailOptions(options), payload: options.payload, raw: options.raw, field: options.field });
|
|
574
|
+
if (options.json)
|
|
575
|
+
console.log(formatJson(result));
|
|
576
|
+
else
|
|
577
|
+
console.log(formatDebugEventShow(result));
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
580
|
+
if (command !== "list")
|
|
581
|
+
throw new Error(`Unknown pibo debug events command "${command}". Run pibo debug events --help.`);
|
|
252
582
|
const result = inspectDebugEvents(piboSessionId, resolveDebugStore("chat"), {
|
|
253
583
|
type: options.type,
|
|
254
584
|
fields: options.fields,
|
|
@@ -270,7 +600,7 @@ async function runDebugJobs(args) {
|
|
|
270
600
|
const { PiboReliabilityStore } = await import("../reliability/store.js");
|
|
271
601
|
const store = resolveDebugStore("reliability");
|
|
272
602
|
if (!store.exists)
|
|
273
|
-
throw new Error(`Debug store "reliability" not found at ${store.
|
|
603
|
+
throw new Error(`Debug store "reliability" not found at ${store.path}`);
|
|
274
604
|
const reliability = new PiboReliabilityStore(store.path);
|
|
275
605
|
try {
|
|
276
606
|
if (command === "list") {
|
|
@@ -317,14 +647,14 @@ async function runDebugRuns(args) {
|
|
|
317
647
|
const { PiboReliabilityStore } = await import("../reliability/store.js");
|
|
318
648
|
const store = resolveDebugStore("reliability");
|
|
319
649
|
if (!store.exists)
|
|
320
|
-
throw new Error(`Debug store "reliability" not found at ${store.
|
|
650
|
+
throw new Error(`Debug store "reliability" not found at ${store.path}`);
|
|
321
651
|
const reliability = new PiboReliabilityStore(store.path);
|
|
322
652
|
try {
|
|
323
653
|
if (command === "list") {
|
|
324
654
|
const piboSessionId = options.positionals[0];
|
|
325
655
|
if (!piboSessionId)
|
|
326
656
|
throw new Error("pibo debug runs list requires <pibo-session-id>");
|
|
327
|
-
const runs = reliability.listRuns({
|
|
657
|
+
const runs = reliability.listRuns({ controllerPiboSessionId: piboSessionId, includeConsumed: true, includeDetached: true });
|
|
328
658
|
if (options.json)
|
|
329
659
|
console.log(formatJson({ runs }));
|
|
330
660
|
else
|
|
@@ -350,8 +680,27 @@ async function runDebugRuns(args) {
|
|
|
350
680
|
reliability.close();
|
|
351
681
|
}
|
|
352
682
|
}
|
|
683
|
+
function readCookieHeaderFile(path) {
|
|
684
|
+
const content = readFileSync(path, "utf8").trim();
|
|
685
|
+
const cookies = content
|
|
686
|
+
.split(/\r?\n/)
|
|
687
|
+
.map((line) => line.trim())
|
|
688
|
+
.filter(Boolean)
|
|
689
|
+
.flatMap((line) => {
|
|
690
|
+
const normalized = line.startsWith("#HttpOnly_") ? line.slice("#HttpOnly_".length) : line;
|
|
691
|
+
if (normalized.startsWith("#"))
|
|
692
|
+
return [];
|
|
693
|
+
const fields = normalized.split("\t");
|
|
694
|
+
if (fields.length >= 7)
|
|
695
|
+
return [`${fields[5]}=${fields[6]}`];
|
|
696
|
+
return [normalized];
|
|
697
|
+
});
|
|
698
|
+
if (cookies.length === 0)
|
|
699
|
+
throw new Error(`Cookie file "${path}" does not contain any cookies`);
|
|
700
|
+
return cookies.join("; ");
|
|
701
|
+
}
|
|
353
702
|
function parseOptions(args) {
|
|
354
|
-
const parsed = { positionals: [], json: false, events: false, runningOnly: false, check: false, destructive: false };
|
|
703
|
+
const parsed = { positionals: [], json: false, events: false, runningOnly: false, check: false, medium: false, destructive: false, apply: false, dryRun: false, full: false, noTruncate: false, plain: false, raw: false, payload: false, args: false, output: false, error: false, active: false, stale: false };
|
|
355
704
|
for (let index = 0; index < args.length; index += 1) {
|
|
356
705
|
const arg = args[index];
|
|
357
706
|
if (arg === "--json") {
|
|
@@ -370,7 +719,43 @@ function parseOptions(args) {
|
|
|
370
719
|
parsed.check = true;
|
|
371
720
|
continue;
|
|
372
721
|
}
|
|
373
|
-
if (arg === "--
|
|
722
|
+
if (arg === "--medium") {
|
|
723
|
+
parsed.medium = true;
|
|
724
|
+
continue;
|
|
725
|
+
}
|
|
726
|
+
if (arg === "--full") {
|
|
727
|
+
parsed.full = true;
|
|
728
|
+
continue;
|
|
729
|
+
}
|
|
730
|
+
if (arg === "--no-truncate") {
|
|
731
|
+
parsed.noTruncate = true;
|
|
732
|
+
continue;
|
|
733
|
+
}
|
|
734
|
+
if (arg === "--plain") {
|
|
735
|
+
parsed.plain = true;
|
|
736
|
+
continue;
|
|
737
|
+
}
|
|
738
|
+
if (arg === "--raw") {
|
|
739
|
+
parsed.raw = true;
|
|
740
|
+
continue;
|
|
741
|
+
}
|
|
742
|
+
if (arg === "--payload") {
|
|
743
|
+
parsed.payload = true;
|
|
744
|
+
continue;
|
|
745
|
+
}
|
|
746
|
+
if (arg === "--args") {
|
|
747
|
+
parsed.args = true;
|
|
748
|
+
continue;
|
|
749
|
+
}
|
|
750
|
+
if (arg === "--output") {
|
|
751
|
+
parsed.output = true;
|
|
752
|
+
continue;
|
|
753
|
+
}
|
|
754
|
+
if (arg === "--error") {
|
|
755
|
+
parsed.error = true;
|
|
756
|
+
continue;
|
|
757
|
+
}
|
|
758
|
+
if (arg === "--children" || arg === "--tool-output") {
|
|
374
759
|
continue;
|
|
375
760
|
}
|
|
376
761
|
if (arg === "--limit") {
|
|
@@ -397,6 +782,14 @@ function parseOptions(args) {
|
|
|
397
782
|
index += 1;
|
|
398
783
|
continue;
|
|
399
784
|
}
|
|
785
|
+
if (arg === "--field") {
|
|
786
|
+
const value = args[index + 1];
|
|
787
|
+
if (!value)
|
|
788
|
+
throw new Error("--field requires a value");
|
|
789
|
+
parsed.field = value;
|
|
790
|
+
index += 1;
|
|
791
|
+
continue;
|
|
792
|
+
}
|
|
400
793
|
if (arg === "--topic") {
|
|
401
794
|
const value = args[index + 1];
|
|
402
795
|
if (!value)
|
|
@@ -441,6 +834,78 @@ function parseOptions(args) {
|
|
|
441
834
|
parsed.destructive = true;
|
|
442
835
|
continue;
|
|
443
836
|
}
|
|
837
|
+
if (arg === "--apply") {
|
|
838
|
+
parsed.apply = true;
|
|
839
|
+
continue;
|
|
840
|
+
}
|
|
841
|
+
if (arg === "--dry-run") {
|
|
842
|
+
parsed.dryRun = true;
|
|
843
|
+
continue;
|
|
844
|
+
}
|
|
845
|
+
if (arg === "--active") {
|
|
846
|
+
parsed.active = true;
|
|
847
|
+
continue;
|
|
848
|
+
}
|
|
849
|
+
if (arg === "--stale") {
|
|
850
|
+
parsed.stale = true;
|
|
851
|
+
continue;
|
|
852
|
+
}
|
|
853
|
+
if (arg === "--cookie") {
|
|
854
|
+
const value = args[index + 1];
|
|
855
|
+
if (!value)
|
|
856
|
+
throw new Error("--cookie requires a path");
|
|
857
|
+
parsed.cookie = value;
|
|
858
|
+
index += 1;
|
|
859
|
+
continue;
|
|
860
|
+
}
|
|
861
|
+
if (arg === "--auth-header") {
|
|
862
|
+
const value = args[index + 1];
|
|
863
|
+
if (!value)
|
|
864
|
+
throw new Error("--auth-header requires a value");
|
|
865
|
+
parsed.authHeader = value;
|
|
866
|
+
index += 1;
|
|
867
|
+
continue;
|
|
868
|
+
}
|
|
869
|
+
if (arg === "--threshold-ms") {
|
|
870
|
+
const value = args[index + 1];
|
|
871
|
+
if (!value)
|
|
872
|
+
throw new Error("--threshold-ms requires a value");
|
|
873
|
+
parsed.thresholdMs = value;
|
|
874
|
+
index += 1;
|
|
875
|
+
continue;
|
|
876
|
+
}
|
|
877
|
+
if (arg === "--store") {
|
|
878
|
+
const value = args[index + 1];
|
|
879
|
+
if (!value)
|
|
880
|
+
throw new Error("--store requires a value");
|
|
881
|
+
parsed.store = value;
|
|
882
|
+
index += 1;
|
|
883
|
+
continue;
|
|
884
|
+
}
|
|
885
|
+
if (arg === "--max-bytes") {
|
|
886
|
+
const value = args[index + 1];
|
|
887
|
+
if (!value)
|
|
888
|
+
throw new Error("--max-bytes requires a value");
|
|
889
|
+
parsed.maxBytes = value;
|
|
890
|
+
index += 1;
|
|
891
|
+
continue;
|
|
892
|
+
}
|
|
893
|
+
if (arg === "--from") {
|
|
894
|
+
const value = args[index + 1];
|
|
895
|
+
if (!value)
|
|
896
|
+
throw new Error("--from requires a value");
|
|
897
|
+
parsed.from = value;
|
|
898
|
+
index += 1;
|
|
899
|
+
continue;
|
|
900
|
+
}
|
|
901
|
+
if (arg === "--bytes") {
|
|
902
|
+
const value = args[index + 1];
|
|
903
|
+
if (!value)
|
|
904
|
+
throw new Error("--bytes requires a value");
|
|
905
|
+
parsed.bytes = value;
|
|
906
|
+
index += 1;
|
|
907
|
+
continue;
|
|
908
|
+
}
|
|
444
909
|
if (arg === "--queue") {
|
|
445
910
|
const value = args[index + 1];
|
|
446
911
|
if (!value)
|
|
@@ -453,6 +918,15 @@ function parseOptions(args) {
|
|
|
453
918
|
}
|
|
454
919
|
return parsed;
|
|
455
920
|
}
|
|
921
|
+
function detailOptions(options) {
|
|
922
|
+
return {
|
|
923
|
+
maxBytes: options.maxBytes,
|
|
924
|
+
from: options.from,
|
|
925
|
+
bytes: options.bytes,
|
|
926
|
+
noTruncate: options.noTruncate,
|
|
927
|
+
full: options.full,
|
|
928
|
+
};
|
|
929
|
+
}
|
|
456
930
|
function compactEventRow(event) {
|
|
457
931
|
return {
|
|
458
932
|
streamId: event.streamId,
|
|
@@ -488,7 +962,7 @@ function compactDeadJobRow(job) {
|
|
|
488
962
|
function compactRunRow(run) {
|
|
489
963
|
return {
|
|
490
964
|
runId: run.runId,
|
|
491
|
-
piboSessionId: run.
|
|
965
|
+
piboSessionId: run.controllerPiboSessionId,
|
|
492
966
|
status: run.status,
|
|
493
967
|
toolName: run.toolName,
|
|
494
968
|
policy: run.completionPolicy,
|
|
@@ -497,6 +971,21 @@ function compactRunRow(run) {
|
|
|
497
971
|
summary: run.summary,
|
|
498
972
|
};
|
|
499
973
|
}
|
|
974
|
+
function formatSignalSnapshotText(snapshot) {
|
|
975
|
+
const sessions = Object.values(snapshot.sessions ?? {});
|
|
976
|
+
const nodes = Object.values(snapshot.nodes ?? {});
|
|
977
|
+
const activeNodes = nodes.filter((node) => ["queued", "starting", "running", "streaming", "waiting", "blocked", "retrying", "compacting", "pausing"].includes(node.status));
|
|
978
|
+
const errors = sessions.filter((session) => session.hasError || session.hasErrorDescendant);
|
|
979
|
+
return [
|
|
980
|
+
`root\t${snapshot.rootPiboSessionId ?? "unknown"}`,
|
|
981
|
+
`version\t${snapshot.version ?? 0}`,
|
|
982
|
+
`sessions\t${sessions.length}`,
|
|
983
|
+
`nodes\t${nodes.length}`,
|
|
984
|
+
`active_nodes\t${activeNodes.length}`,
|
|
985
|
+
`error_sessions\t${errors.length}`,
|
|
986
|
+
...sessions.map((session) => `${session.piboSessionId}\tlocal=${session.localStatus}\taggregate=${session.aggregateStatus}\tphase=${session.phase ?? "-"}\tactive=${session.isTreeActive}`),
|
|
987
|
+
].join("\n");
|
|
988
|
+
}
|
|
500
989
|
function payloadType(payload) {
|
|
501
990
|
if (!payload || typeof payload !== "object" || Array.isArray(payload))
|
|
502
991
|
return undefined;
|
|
@@ -509,28 +998,95 @@ function printDebugDiscovery() {
|
|
|
509
998
|
Commands:
|
|
510
999
|
db Inspect and query local SQLite stores
|
|
511
1000
|
session Inspect one Pibo Session by id or Chat URL
|
|
1001
|
+
summary Show compact session diagnosis and drill-down commands
|
|
1002
|
+
messages List or show stored user/assistant messages
|
|
1003
|
+
final Show the latest assistant message
|
|
512
1004
|
trace Rebuild the Chat Web trace view for one Pibo Session
|
|
513
1005
|
events Inspect compact event payload fields for one Pibo Session
|
|
1006
|
+
tool Inspect one grouped tool call
|
|
1007
|
+
failures List failed tool calls and trace/session errors
|
|
514
1008
|
jobs Inspect durable Pibo jobs and DLQ
|
|
515
1009
|
runs Inspect durable yielded runs
|
|
1010
|
+
signals Inspect live session signal snapshots through Chat Web APIs
|
|
1011
|
+
telemetry Inspect runtime observability telemetry
|
|
1012
|
+
web Inspect browser render state via CDP
|
|
1013
|
+
pty Run and inspect interactive CLI/TUI commands under a PTY
|
|
516
1014
|
|
|
517
1015
|
Next:
|
|
518
1016
|
pibo debug db
|
|
519
|
-
pibo debug
|
|
1017
|
+
pibo debug summary <pibo-session-id>
|
|
1018
|
+
pibo debug final <pibo-session-id>
|
|
1019
|
+
pibo debug messages <pibo-session-id> list
|
|
520
1020
|
pibo debug trace <pibo-session-id> --running-only
|
|
521
1021
|
pibo debug events stream --topic pibo.output
|
|
1022
|
+
pibo debug signals tree ps_...
|
|
1023
|
+
pibo debug telemetry sessions --active
|
|
1024
|
+
pibo debug web targets
|
|
1025
|
+
pibo debug pty run -- pibo tui:sessions --demo
|
|
1026
|
+
`);
|
|
1027
|
+
}
|
|
1028
|
+
function printDebugSignalsDiscovery() {
|
|
1029
|
+
console.log(`pibo debug signals - inspect live Session Signal snapshots
|
|
1030
|
+
|
|
1031
|
+
Usage:
|
|
1032
|
+
pibo debug signals session <pibo-session-id> [--json] [--cookie <path>]
|
|
1033
|
+
pibo debug signals tree <root-pibo-session-id> [--json] [--cookie <path>]
|
|
1034
|
+
|
|
1035
|
+
Environment:
|
|
1036
|
+
PIBO_GATEWAY_URL=http://127.0.0.1:4788
|
|
1037
|
+
|
|
1038
|
+
Auth:
|
|
1039
|
+
--cookie <path> reads a Cookie header value from a local file.
|
|
1040
|
+
--auth-header <value> sends an Authorization header. Values are not printed.
|
|
1041
|
+
|
|
1042
|
+
Next:
|
|
1043
|
+
pibo debug signals tree ps_...
|
|
1044
|
+
`);
|
|
1045
|
+
}
|
|
1046
|
+
function printDebugTelemetryDiscovery() {
|
|
1047
|
+
console.log(`pibo debug telemetry - inspect bounded runtime observability telemetry
|
|
1048
|
+
|
|
1049
|
+
Usage:
|
|
1050
|
+
pibo debug telemetry sessions [--active] [--stale] [--limit n] [--json]
|
|
1051
|
+
pibo debug telemetry session <pibo-session-id> [--limit n] [--json]
|
|
1052
|
+
pibo debug telemetry turn <turn-id-or-event-id> [--events] [--limit n] [--json]
|
|
1053
|
+
pibo debug telemetry provider <provider-request-id> [--json]
|
|
1054
|
+
pibo debug telemetry provider <provider-request-id> events [--after seq] [--fields a,b] [--limit n] [--json]
|
|
1055
|
+
pibo debug telemetry provider <provider-request-id> payload <preview-or-event-summary-id> [--json]
|
|
1056
|
+
pibo debug telemetry tool <tool-call-id> [--json]
|
|
1057
|
+
pibo debug telemetry stale [--threshold-ms n] [--limit n] [--json]
|
|
1058
|
+
pibo debug telemetry stats [--retention class] [--json]
|
|
1059
|
+
pibo debug telemetry prune --retention class --before iso-date [--dry-run|--apply] [--json]
|
|
1060
|
+
|
|
1061
|
+
Commands:
|
|
1062
|
+
sessions List recent, active, or stale telemetry sessions
|
|
1063
|
+
session Show compact session telemetry and next turn/provider/tool commands
|
|
1064
|
+
turn Show a phase timeline for one turn or event id
|
|
1065
|
+
provider Show provider request summary, event pages, and preview-unavailable diagnostics
|
|
1066
|
+
tool Show tool-call argument and execution telemetry
|
|
1067
|
+
stale List read-only stale active work
|
|
1068
|
+
stats Show telemetry retention counts and byte estimates
|
|
1069
|
+
prune Dry-run telemetry retention cleanup unless --apply is explicit
|
|
1070
|
+
|
|
1071
|
+
Next:
|
|
1072
|
+
pibo debug telemetry sessions --active
|
|
1073
|
+
pibo debug telemetry session ps_...
|
|
1074
|
+
pibo debug telemetry turn turn_...
|
|
1075
|
+
pibo debug telemetry provider pr_... events --limit 20
|
|
522
1076
|
`);
|
|
523
1077
|
}
|
|
524
1078
|
function printDebugDbDiscovery() {
|
|
525
1079
|
console.log(`pibo debug db - inspect local SQLite stores
|
|
526
1080
|
|
|
527
1081
|
Stores:
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
1082
|
+
home ${getPiboHome()}
|
|
1083
|
+
pibo-data pibo.sqlite unified sessions, rooms, events, messages, observations, navigation, stats
|
|
1084
|
+
sessions pibo.sqlite V2 alias for session metadata
|
|
1085
|
+
chat pibo.sqlite V2 alias for Chat Web data
|
|
1086
|
+
agents chat-agents.sqlite
|
|
1087
|
+
auth auth.sqlite
|
|
1088
|
+
bindings session-bindings.sqlite
|
|
1089
|
+
reliability pibo-events.sqlite
|
|
534
1090
|
|
|
535
1091
|
Commands:
|
|
536
1092
|
stores List known stores and paths
|
|
@@ -539,8 +1095,8 @@ Commands:
|
|
|
539
1095
|
query <store> <sql> Run read-only SQL
|
|
540
1096
|
|
|
541
1097
|
Next:
|
|
542
|
-
pibo debug db schema
|
|
543
|
-
pibo debug db query
|
|
1098
|
+
pibo debug db schema pibo-data
|
|
1099
|
+
pibo debug db query pibo-data "select id, profile from sessions limit 5"
|
|
544
1100
|
`);
|
|
545
1101
|
}
|
|
546
1102
|
function printDebugSessionDiscovery() {
|
|
@@ -558,11 +1114,75 @@ Next:
|
|
|
558
1114
|
pibo debug session ps_...
|
|
559
1115
|
`);
|
|
560
1116
|
}
|
|
1117
|
+
function printDebugSummaryDiscovery() {
|
|
1118
|
+
console.log(`pibo debug summary - compact diagnosis with drill-down commands
|
|
1119
|
+
|
|
1120
|
+
Usage:
|
|
1121
|
+
pibo debug summary <pibo-session-id> [--json]
|
|
1122
|
+
|
|
1123
|
+
Next:
|
|
1124
|
+
pibo debug final ps_...
|
|
1125
|
+
pibo debug failures ps_...
|
|
1126
|
+
pibo debug messages ps_... list
|
|
1127
|
+
`);
|
|
1128
|
+
}
|
|
1129
|
+
function printDebugMessagesDiscovery() {
|
|
1130
|
+
console.log(`pibo debug messages - list or show stored chat messages
|
|
1131
|
+
|
|
1132
|
+
Usage:
|
|
1133
|
+
pibo debug messages <pibo-session-id> list [--limit n] [--json]
|
|
1134
|
+
pibo debug messages <pibo-session-id> show <selector> [--full|--no-truncate] [--from n --bytes n] [--max-bytes n] [--plain] [--json]
|
|
1135
|
+
|
|
1136
|
+
Selectors:
|
|
1137
|
+
1, last, assistant:last, user:last, stream:<stream-id>, msg:<event-id>
|
|
1138
|
+
|
|
1139
|
+
Next:
|
|
1140
|
+
pibo debug messages ps_... list
|
|
1141
|
+
pibo debug messages ps_... show assistant:last --full
|
|
1142
|
+
`);
|
|
1143
|
+
}
|
|
1144
|
+
function printDebugFinalDiscovery() {
|
|
1145
|
+
console.log(`pibo debug final - show the latest assistant message
|
|
1146
|
+
|
|
1147
|
+
Usage:
|
|
1148
|
+
pibo debug final <pibo-session-id> [--max-bytes n] [--from n --bytes n] [--no-truncate] [--plain] [--json]
|
|
1149
|
+
|
|
1150
|
+
Note:
|
|
1151
|
+
Full messages may contain private data. Use --no-truncate intentionally.
|
|
1152
|
+
|
|
1153
|
+
Next:
|
|
1154
|
+
pibo debug final ps_...
|
|
1155
|
+
pibo debug final ps_... --no-truncate
|
|
1156
|
+
`);
|
|
1157
|
+
}
|
|
1158
|
+
function printDebugToolDiscovery() {
|
|
1159
|
+
console.log(`pibo debug tool - inspect one grouped tool call
|
|
1160
|
+
|
|
1161
|
+
Usage:
|
|
1162
|
+
pibo debug tool <pibo-session-id> <tool-call-id> [--args|--output|--error] [--no-truncate] [--json]
|
|
1163
|
+
|
|
1164
|
+
Next:
|
|
1165
|
+
pibo debug failures ps_...
|
|
1166
|
+
pibo debug tool ps_... call_... --output --no-truncate
|
|
1167
|
+
`);
|
|
1168
|
+
}
|
|
1169
|
+
function printDebugFailuresDiscovery() {
|
|
1170
|
+
console.log(`pibo debug failures - list failed tool calls and trace/session errors
|
|
1171
|
+
|
|
1172
|
+
Usage:
|
|
1173
|
+
pibo debug failures <pibo-session-id> [--limit n] [--json]
|
|
1174
|
+
|
|
1175
|
+
Next:
|
|
1176
|
+
pibo debug failures ps_...
|
|
1177
|
+
pibo debug tool ps_... <tool-call-id> --output
|
|
1178
|
+
`);
|
|
1179
|
+
}
|
|
561
1180
|
function printDebugTraceDiscovery() {
|
|
562
1181
|
console.log(`pibo debug trace - rebuild one Chat Web trace view
|
|
563
1182
|
|
|
564
1183
|
Usage:
|
|
565
|
-
pibo debug trace <pibo-session-id> [--running-only] [--check] [--json]
|
|
1184
|
+
pibo debug trace <pibo-session-id> [--running-only] [--check] [--medium] [--json]
|
|
1185
|
+
pibo debug trace <pibo-session-id> show <node-id> [--json]
|
|
566
1186
|
|
|
567
1187
|
Output:
|
|
568
1188
|
Compact trace nodes from the same buildTraceView logic used by /api/chat/trace.
|
|
@@ -570,24 +1190,29 @@ Output:
|
|
|
570
1190
|
|
|
571
1191
|
Next:
|
|
572
1192
|
pibo debug trace ps_... --check
|
|
573
|
-
pibo debug trace ps_... --
|
|
1193
|
+
pibo debug trace ps_... --medium
|
|
1194
|
+
pibo debug trace ps_... show <node-id>
|
|
574
1195
|
`);
|
|
575
1196
|
}
|
|
576
1197
|
function printDebugEventsDiscovery() {
|
|
577
1198
|
console.log(`pibo debug events - inspect compact event payload fields and Pibo event streams
|
|
578
1199
|
|
|
579
1200
|
Usage:
|
|
580
|
-
pibo debug events <pibo-session-id> [--type name] [--fields a,b.c] [--limit n] [--json]
|
|
1201
|
+
pibo debug events <pibo-session-id> [list] [--type name] [--fields a,b.c] [--limit n] [--json]
|
|
1202
|
+
pibo debug events <pibo-session-id> show <stream-id-or-event-id> [--payload|--raw] [--field path] [--no-truncate] [--json]
|
|
581
1203
|
pibo debug events stream [--topic topic] [--after stream_id] [--limit n] [--json]
|
|
582
1204
|
pibo debug events stats [--topic topic] [--session pibo-session-id] [--retention class] [--json]
|
|
583
1205
|
pibo debug events prune --topic topic --retention class --before iso-date [--limit n] [--destructive] [--json]
|
|
1206
|
+
pibo debug events compact-deltas [--dry-run|--apply] [--store pibo-data|chat|reliability] [--session ps_...] [--json]
|
|
584
1207
|
pibo debug events consumers [--json]
|
|
585
1208
|
|
|
586
1209
|
Examples:
|
|
587
1210
|
pibo debug events ps_... --type tool_execution_finished --fields toolName,toolCallId,result.details.status
|
|
1211
|
+
pibo debug events ps_... show 356910 --field attributes_json.inlinePayload
|
|
588
1212
|
|
|
589
1213
|
Next:
|
|
590
1214
|
pibo debug events ps_... --limit 20
|
|
1215
|
+
pibo debug events ps_... show <stream-id> --payload
|
|
591
1216
|
pibo debug events stats --topic pibo.output --retention live_delta
|
|
592
1217
|
pibo debug events stream --topic pibo.output --after 123
|
|
593
1218
|
`);
|