@pasko70/pibo 1.0.5 → 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 -250
- 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 +42 -5
- 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 +47 -0
- 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 +3168 -1811
- 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-CI0Xj2Cp.js → dist-B4lw9z4F.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-aMr2VYOu.js → dist-BbTaHWON.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-u2OzzOTm.js → dist-BcT_c1EJ.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-Di1ScJ22.js → dist-CGINd7XU.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-wiRpAHIv.js → dist-CrBzZkUp.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CaNOvqMY.js → dist-CyyISotB.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-zgYUl2B-.js → dist-DFbnFNpX.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CNlhGq5i.js → dist-DGLWQLX8.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BGxHKHPX.js → dist-DfcIkFSN.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-DrM-H3e1.js → dist-sKDHTwaT.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-DpmEro5R.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 +174 -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 +252 -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 +66 -2
- 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 +214 -0
- package/dist/user-skills/manager.js +35 -0
- package/dist/user-skills/store.js +267 -0
- package/dist/user-skills/types.js +1 -0
- 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/{.codex/skills → 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-B_E935fP.js +0 -151
- package/dist/apps/chat-ui/assets/index-Dk-opWl3.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/{.codex/skills → skills/builtin}/pi-agent-harness/agents/openai.yaml +0 -0
package/README.md
CHANGED
|
@@ -1,318 +1,174 @@
|
|
|
1
1
|
# pibo
|
|
2
2
|
|
|
3
|
-
Pibo
|
|
3
|
+
Pibo is a thin product boundary around Pi Coding Agent. Pi remains the inner engine for model turns, tools, streaming, sessions, and compaction. Pibo adds profiles, plugins, channels, local gateways, web auth, and operator tooling.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The default posture is intentionally powerful: Pibo is built for agentic coding and server operation, not for a restrictive sandbox. Install and run it as the Linux user that should own its state and credentials.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
|
-
Pibo
|
|
9
|
+
Pibo is distributed as an npm package:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
npm install -g @pasko70/pibo
|
|
13
13
|
pibo --help
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
The current package declares Node.js 24+. Some Linux distributions still ship Node 22 through `apt`, so install a recent Node release first when needed. A user-local Node/npm setup through `nvm`, `fnm`, or a user-writable npm prefix works well.
|
|
17
|
+
|
|
18
|
+
For a user-local global npm prefix:
|
|
17
19
|
|
|
18
20
|
```bash
|
|
19
|
-
|
|
20
|
-
npm
|
|
21
|
-
|
|
21
|
+
mkdir -p ~/.local
|
|
22
|
+
npm config set prefix ~/.local
|
|
23
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
24
|
+
npm install -g @pasko70/pibo
|
|
22
25
|
```
|
|
23
26
|
|
|
24
|
-
##
|
|
25
|
-
|
|
26
|
-
- `docs/architecture.md` describes the current runtime architecture and boundaries.
|
|
27
|
-
- `docs/mcp.md` documents the MCP CLI and registry.
|
|
28
|
-
- `docs/tools.md` documents curated external CLI tools.
|
|
29
|
-
- `docs/pi-packages.md` documents registered Pi Coding Agent packages and per-agent selection.
|
|
30
|
-
- `docs/agent-run-yield-spec.md` documents yielded agent runs and run-control tools.
|
|
31
|
-
- `docs/chat-rooms-event-log.md` documents Chat Web rooms, default-room startup, durable chat events, unread cursors, SSE cursors, and idempotent sends.
|
|
32
|
-
- `docs/codex-compact-terminal-design.md` documents the compact Codex-style Chat session view.
|
|
33
|
-
- `docs/progress.md` is the short implementation status snapshot.
|
|
34
|
-
|
|
35
|
-
## Scripts
|
|
36
|
-
|
|
37
|
-
- `npm run dev` runs the TypeScript entrypoint with `tsx`.
|
|
38
|
-
- `npm run profile` prints the selected profile with loaded skills, tools, and context files.
|
|
39
|
-
- `npm run profile -- gateway-producer` prints the parked gateway producer profile.
|
|
40
|
-
- `npm run profile -- run-yield-qa` prints the yielded-run QA profile with subagents.
|
|
41
|
-
- `npm run tui` starts the Pi TUI through the pibo wrapper.
|
|
42
|
-
- `npm run tui:gateway` starts the Pi TUI with the gateway producer profile.
|
|
43
|
-
- `npm run gateway` starts the local pibo gateway daemon.
|
|
44
|
-
- `npm run gateway:web` starts the local gateway with Better Auth, the same-origin web host, and the chat app.
|
|
45
|
-
- `npm run client -- <piboSessionId>` starts a console client connected to the gateway.
|
|
46
|
-
- `npm run dev -- mcp` lists configured MCP servers and tools.
|
|
47
|
-
- `npm run dev -- tools` lists curated external CLI tools.
|
|
48
|
-
- `npm run dev -- pi-packages` lists registered Pi Coding Agent packages.
|
|
49
|
-
- `npm run dev -- debug` inspects local Pibo SQLite stores.
|
|
50
|
-
- `npm run dev -- config keys` lists supported local config keys.
|
|
51
|
-
- `npm run build` compiles to `dist/`.
|
|
52
|
-
- `npm run start` runs the compiled entrypoint.
|
|
53
|
-
- `npm test` builds and runs the test suite.
|
|
54
|
-
- `npm run typecheck` checks TypeScript without emitting files.
|
|
55
|
-
- `npm run clean` removes `dist/`.
|
|
56
|
-
|
|
57
|
-
## Philosophy
|
|
58
|
-
|
|
59
|
-
Keep the wrapper thin. Pi Coding Agent should remain the inner engine; pibo adds only the product boundary we actually need: profiles, plugins, channels, auth, policy, routing, and opt-in operator tooling.
|
|
60
|
-
|
|
61
|
-
Optional integrations stay outside the core package until the user installs them. MCP servers, Python virtual environments, and third-party CLIs are configured on demand through `pibo mcp` and `pibo tools`, not bundled into pibo itself.
|
|
62
|
-
|
|
63
|
-
## Plugin Layer
|
|
64
|
-
|
|
65
|
-
`src/plugins/` contains the minimal static plugin layer. Built-in plugins register tools, subagents, skills, context files, profiles, gateway actions, event listeners, channels, auth services, and web apps through `PiboPluginRegistry`.
|
|
66
|
-
|
|
67
|
-
This is an extension boundary, not a marketplace. Plugins are internal and statically loaded for now, which keeps the runtime simple while supporting web auth, web apps, new tools, new skills, subagents, and future transports.
|
|
68
|
-
|
|
69
|
-
The gateway producer plugin is parked outside the default plugin registry. It remains available for explicit local gateway experiments through the `gateway-producer` profile.
|
|
70
|
-
|
|
71
|
-
## Channels And Pibo Sessions
|
|
72
|
-
|
|
73
|
-
Plugins can register channels through `api.registerChannel(...)`. A channel maps an external transport into pibo events and maps pibo output events back to that transport.
|
|
74
|
-
|
|
75
|
-
The channel context exposes only the pibo boundary:
|
|
76
|
-
|
|
77
|
-
- `emit(event)` sends a `PiboInputEvent` to the session router.
|
|
78
|
-
- `subscribe(listener)` receives normalized `PiboOutputEvent` values.
|
|
79
|
-
- `getSession(id)`, `createSession(...)`, `updateSession(...)`, `deleteSession(...)`, and `findSessions(...)` work with first-class Pibo Session records.
|
|
80
|
-
- `getGatewayActions()` exposes discoverable execution actions for channel UIs.
|
|
81
|
-
|
|
82
|
-
Pibo Sessions are stored in SQLite by default at `.pibo/pibo-sessions.sqlite`. A Pibo Session keeps product identity (`id`), technical Pi identity (`piSessionId`), channel, kind, profile, owner scope, optional parent/origin relationships, optional workspace, title, and plugin metadata.
|
|
83
|
-
|
|
84
|
-
In the Chat Web App, personal sessions can be archived before deletion. Permanent deletion is available only for archived sessions and requires typing `Delete this session`; it removes the selected Pibo Session, child sessions, and their Chat Web read-model/event-log rows.
|
|
85
|
-
|
|
86
|
-
The Chat Web App also has Pibo Rooms. Each user gets a locked `Personal Chat` room automatically. The personal room is shown separately from user-created rooms and cannot be renamed, archived, or deleted. User-created rooms can be archived first, then permanently deleted after typing the room name. Archived rooms remain inspectable and show their contained sessions, but they are read-only: no new sessions, messages, or execution actions can be started in that room. Permanent room deletion removes the room subtree, contained sessions, subagent session descendants, and Chat Web read-model/event-log rows.
|
|
87
|
-
|
|
88
|
-
Within the Sessions area, the Chat Web App now has an internal session-view registry. The existing nested trace renderer remains the default `Trace` view, and the same `PiboSessionTraceView` data can also be rendered through a compact Codex-style `Terminal` view selected by `?view=trace|terminal` or by browser-local preference.
|
|
89
|
-
|
|
90
|
-
Managed context files are now a first-class product capability. The `pibo.context-files` plugin exposes editable global and agent-scoped markdown context files through `/api/context-files`, stores managed-file metadata and revisions in `.pibo/context-files/context-files.sqlite`, and emits product events when managed files are created, changed, removed, or updated on disk. Plugin-shipped context files remain immutable source files; the product can create linked managed copies from them, track source hashes and link state, diff the managed copy against its source, reset back to source, restore older revisions, or adopt a changed source as the new managed baseline.
|
|
91
|
-
|
|
92
|
-
The main source folders are:
|
|
93
|
-
|
|
94
|
-
- `src/core/` for runtime, events, profiles, and session routing
|
|
95
|
-
- `src/plugins/` for the static plugin registry and built-in plugins
|
|
96
|
-
- `src/channels/` for channel contracts
|
|
97
|
-
- `src/sessions/` for Pibo Session storage
|
|
98
|
-
- `src/gateway/` for the local TCP gateway transport
|
|
99
|
-
- `src/runs/` for yielded run tracking and run-control tools
|
|
100
|
-
- `src/auth/`, `src/web/`, and `src/apps/` for Better Auth, the same-origin web host, and web apps
|
|
101
|
-
|
|
102
|
-
## Agent Designer
|
|
103
|
-
|
|
104
|
-
The Chat Web App includes an Agent Designer in the Agents area. It creates custom agents, persists them in `.pibo/chat-agents.sqlite`, and registers each saved agent as a dynamic profile for routed sessions.
|
|
105
|
-
|
|
106
|
-
The Agents area uses one sidebar for both editable custom agents and read-only plugin profiles. Plugin profiles can be inspected with their registered tools, skills, context files, subagents, built-in tool mode, and run-control package state, then copied into a custom agent when changes are needed.
|
|
107
|
-
|
|
108
|
-
Custom agent names are profile names. They must be lowercase kebab-case, such as `test-agent`, and are used consistently in the UI, session records, and backend profile registry. Legacy `custom-agent:agent_*` names remain aliases for existing agents.
|
|
109
|
-
|
|
110
|
-
Custom agents can be archived before deletion. Archived custom agents are removed from the active profile catalog, cannot start new sessions, and become read-only until restored. Permanent deletion is available only for archived agents and requires typing the agent profile name; it deletes the custom agent and Chat sessions using that profile.
|
|
111
|
-
|
|
112
|
-
The designer configures native Pibo agent capabilities only: plugin-registered tools, skills, context files, subagents, automatic local context-file loading, built-in Pi tool visibility, and capability packages such as `pibo-run-control`. Curated external CLI tools from `pibo tools` remain global operator tooling and are not selected per agent.
|
|
113
|
-
|
|
114
|
-
The Chat Web App now also has a dedicated Context area at `/apps/chat/context`. It reuses the managed context-file APIs inside the main Chat UI shell so operators can create, edit, relocate, and remove managed context files without leaving the authenticated Chat Web App. Plugin context files are shown there as read-only sources, and both the Context area and Agent Designer can create linked managed copies when a user wants to customize shipped content safely.
|
|
115
|
-
|
|
116
|
-
The Context area also exposes the Pibo Base Prompt. The library prompt lives at `context/pibo-system-prompt.md`; the Chat Web App can switch between that read-only library prompt and a persisted custom prompt stored under `.pibo/base-prompt.md`. Runtime prompt templates replace `{{availableTools}}` and `{{guidelines}}` from the active Pi/Pibo tool surface before project context and skills are appended.
|
|
117
|
-
|
|
118
|
-
The Context area also exposes the Pibo Compaction Prompt. The library prompt lives at `context/pibo-compaction-prompt.md`; the Chat Web App can switch between that read-only library prompt and a persisted custom prompt stored under `.pibo/compaction-prompt.md`. At runtime Pibo handles Pi's `session_before_compact` hook and uses the active compaction prompt sections for summary creation, update-summary creation, and split-turn prefix summaries.
|
|
119
|
-
|
|
120
|
-
## Profiles
|
|
121
|
-
|
|
122
|
-
The default profile is registered by the core plugin. It loads the local `pi-agent-harness` skill and uses Pi Coding Agent's built-in tools for normal coding work.
|
|
123
|
-
|
|
124
|
-
The `codex` alias resolves to the `codex-compat-openai-web` profile. It keeps the Pibo runtime boundary while exposing Codex-like coding affordances: Pi/Pibo `read`, `edit`, and `write`; Pibo run-control `bash`; native `web_search`; `apply_patch` and `view_image`; generated `pibo_subagent_default`, `pibo_subagent_explorer`, and `pibo_subagent_worker`; and the `pibo_run_*` lifecycle tools. `web_search` is a normal Pibo native tool with a provider adapter; the default adapter injects OpenAI Responses hosted `web_search` into the model request instead of using a local DuckDuckGo function tool. It intentionally does not expose Pi's separate `grep`, `find`, or `ls` tools by default; codebase search remains Codex-style through `bash` and commands such as `rg`.
|
|
125
|
-
|
|
126
|
-
Profiles can opt into registered subagents. Pibo exposes enabled subagents to Pi as generated tools named `pibo_subagent_<name>`, routed through normal pibo sessions. Generated subagent tools are always parallel-capable; agents sequence subagent work by waiting for a direct result before issuing a later call or by using `pibo_run_start` for yielded work.
|
|
27
|
+
## State and user paths
|
|
127
28
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
The `run-yield-qa` profile adds two simple QA subagents. Profiles with yieldable tools can expose generated run-control tools through the `pibo-run-control` capability package:
|
|
29
|
+
Pibo stores product-wide state under:
|
|
131
30
|
|
|
132
31
|
```text
|
|
133
|
-
|
|
134
|
-
pibo_run_list
|
|
135
|
-
pibo_run_status
|
|
136
|
-
pibo_run_wait
|
|
137
|
-
pibo_run_read
|
|
138
|
-
pibo_run_cancel
|
|
139
|
-
pibo_run_ack
|
|
32
|
+
${PIBO_HOME:-~/.pibo}
|
|
140
33
|
```
|
|
141
34
|
|
|
142
|
-
|
|
35
|
+
That means the executing Linux user owns the installation state:
|
|
143
36
|
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
|
|
37
|
+
```text
|
|
38
|
+
alice -> /home/alice/.pibo
|
|
39
|
+
pibo -> /home/pibo/.pibo
|
|
40
|
+
root -> /root/.pibo
|
|
147
41
|
```
|
|
148
42
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
## Gateway
|
|
152
|
-
|
|
153
|
-
The gateway is the current local transport boundary. It owns the session router, accepts newline-delimited JSON frames over TCP, routes messages by Pibo Session ID, and broadcasts normalized session events back to connected clients.
|
|
154
|
-
|
|
155
|
-
The parked gateway producer profile adds `pibo_gateway_send`, a tool that sends a message into a target gateway session and returns the correlated assistant reply. See `examples/gateway/README.md` for the two supported manual flows.
|
|
156
|
-
|
|
157
|
-
## MCP CLI
|
|
158
|
-
|
|
159
|
-
Pibo includes an MCP helper CLI under `pibo mcp`. It reads MCP server definitions from `mcp_servers.json`, starts stdio or HTTP MCP servers, lists their tools, shows schemas, searches by glob, and calls tools from shell-friendly JSON input. See `docs/mcp.md` for the full guide.
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
npm run dev -- mcp
|
|
163
|
-
npm run dev -- mcp info filesystem
|
|
164
|
-
npm run dev -- mcp grep "*file*"
|
|
165
|
-
npm run dev -- mcp call filesystem read_file '{"path":"README.md"}'
|
|
166
|
-
```
|
|
43
|
+
There is no requirement to run as `root`. If you SSH as root and run Pibo, state naturally lands in `/root/.pibo`. If you create or use a dedicated user, state lands in that user's home. This is the preferred way to keep SSH keys, config, logs, and sessions separated.
|
|
167
44
|
|
|
168
|
-
|
|
45
|
+
Workspace-scoped files are separate and live under the active workspace:
|
|
169
46
|
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
npm run dev -- mcp config help
|
|
173
|
-
npm run dev -- mcp config path
|
|
174
|
-
npm run dev -- mcp config paths
|
|
175
|
-
npm run dev -- mcp config schema
|
|
176
|
-
npm run dev -- mcp config add filesystem '{"command":"npx","args":["-y","@modelcontextprotocol/server-filesystem","."]}'
|
|
177
|
-
npm run dev -- mcp config add deepwiki '{"url":"https://mcp.deepwiki.com/mcp"}'
|
|
178
|
-
npm run dev -- mcp config remove filesystem
|
|
47
|
+
```text
|
|
48
|
+
<workspace>/.pibo
|
|
179
49
|
```
|
|
180
50
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
```bash
|
|
184
|
-
npm run dev -- mcp registry list
|
|
185
|
-
npm run dev -- mcp registry show <name>
|
|
186
|
-
npm run dev -- mcp registry doctor <name>
|
|
187
|
-
npm run dev -- mcp registry install <name>
|
|
188
|
-
npm run dev -- mcp registry remove <name>
|
|
189
|
-
```
|
|
51
|
+
Examples include custom prompts and Pi package registrations.
|
|
190
52
|
|
|
191
|
-
|
|
53
|
+
## Server notes
|
|
192
54
|
|
|
193
|
-
|
|
55
|
+
A fresh server install usually needs only three decisions:
|
|
194
56
|
|
|
195
|
-
|
|
57
|
+
1. Choose the Linux user that should own Pibo.
|
|
58
|
+
2. Install Node.js 24+ for that user or system-wide.
|
|
59
|
+
3. Install Pibo through npm.
|
|
196
60
|
|
|
197
|
-
|
|
61
|
+
Use the setup planner to keep the first run simple:
|
|
198
62
|
|
|
199
63
|
```bash
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
npm run dev -- tools install browser-use
|
|
204
|
-
npm run dev -- tools remove browser-use
|
|
205
|
-
npm run dev -- tools doctor browser-use
|
|
206
|
-
npm run dev -- tools guides browser-use
|
|
207
|
-
npm run dev -- tools guide browser-use browser-use
|
|
208
|
-
npm run dev -- tools guide browser-use remote-browser
|
|
209
|
-
npm run dev -- tools path browser-use
|
|
210
|
-
npm run dev -- tools env browser-use
|
|
211
|
-
npm run dev -- tools browser-use
|
|
212
|
-
npm run dev -- tools browser-use targets
|
|
213
|
-
npm run dev -- tools browser-use attach-chat
|
|
214
|
-
npm run dev -- tools browser-use lease acquire
|
|
64
|
+
pibo setup doctor --domain pibo.example.com --expected-ip <server-ip>
|
|
65
|
+
pibo setup user-host --domain pibo.example.com --print-files
|
|
66
|
+
pibo setup user-host --domain pibo.example.com --write-to /tmp/pibo-setup
|
|
215
67
|
```
|
|
216
68
|
|
|
217
|
-
|
|
69
|
+
This is the normal user path: one gateway, one `PIBO_HOME`, no required Docker, no dev gateway, and no GitHub App setup. After reviewing staged files, use `--apply --yes` to write the generated systemd/Caddy files.
|
|
218
70
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
For Chat Web debugging, start by reusing the browser that already exists: `npm run dev -- tools browser-use targets` lists Chrome CDP targets with Chat auth/composer hints, and `npm run dev -- tools browser-use attach-chat` exports the best authenticated Chat target for direct CDP inspection.
|
|
222
|
-
|
|
223
|
-
## Debug CLI
|
|
224
|
-
|
|
225
|
-
Pibo includes a local operator CLI under `pibo debug` for targeted SQLite diagnostics. It is not an agent profile tool and does not load Pi transcripts or full Chat Web payloads automatically.
|
|
71
|
+
Developer hosts are opt-in and add production/dev separation plus Docker compute workers:
|
|
226
72
|
|
|
227
73
|
```bash
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
npm run dev -- debug trace <piboSessionId> --check
|
|
234
|
-
npm run dev -- debug events <piboSessionId> --type tool_execution_finished --fields toolName,toolCallId,result.details.status
|
|
235
|
-
npm run dev -- debug events stats --topic pibo.output --session <piboSessionId> --retention live_delta
|
|
236
|
-
npm run dev -- debug events prune --topic pibo.output --retention live_delta --before 2026-05-01T00:00:00.000Z
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
`pibo debug db query` opens known stores read-only, accepts only one read-only SQL statement, applies a default row limit when the query has no `limit`, and supports `--json` for machine-readable output. `pibo debug trace` rebuilds the same Chat Web trace view as `/api/chat/trace`; `--check` adds trace consistency diagnostics for ids, parents, stable order metadata, and source/stable-key coverage. `pibo debug events` extracts selected payload fields without dumping full event payloads, can summarize retained event counts by topic/session/retention class, and can prune old `live_delta` rows once replay consumers no longer need them.
|
|
74
|
+
pibo setup developer-host \
|
|
75
|
+
--origin git@github.com:<your-fork>/pibo.git \
|
|
76
|
+
--prod-domain pibo.example.com \
|
|
77
|
+
--dev-domain dev.pibo.example.com \
|
|
78
|
+
--print-files
|
|
240
79
|
|
|
241
|
-
|
|
80
|
+
pibo setup developer-host \
|
|
81
|
+
--origin git@github.com:<your-fork>/pibo.git \
|
|
82
|
+
--prod-domain pibo.example.com \
|
|
83
|
+
--dev-domain dev.pibo.example.com \
|
|
84
|
+
--write-to /tmp/pibo-setup
|
|
85
|
+
```
|
|
242
86
|
|
|
243
|
-
`
|
|
87
|
+
See `docs/ops/install-user-host.md`, `docs/ops/install-developer-host.md`, and `docs/ops/upgrade-user-to-developer-host.md`. Developer-host services are source-pinned so production and dev do not fight over one global `pibo` symlink. Docker and swap are developer-host prerequisites only; verify them with `pibo setup doctor --require-docker --min-swap-gb 8`.
|
|
244
88
|
|
|
245
|
-
|
|
246
|
-
- `pibo.web-host` owns the HTTP server and dispatches same-origin web apps.
|
|
247
|
-
- `pibo.chat-web` registers the chat app under `/apps/chat` and `/api/chat/*`.
|
|
89
|
+
If the agent should be able to perform server administration, give that Linux user the required sudo or Docker permissions explicitly. Pibo does not need a special onboarding user to work correctly; normal Unix ownership is enough.
|
|
248
90
|
|
|
249
|
-
|
|
91
|
+
## Docker notes
|
|
250
92
|
|
|
251
|
-
|
|
252
|
-
http://localhost:4788/api/auth/callback/google
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
For a deployed instance, replace the host with that instance's public HTTPS origin:
|
|
93
|
+
Docker is optional. If you run Pibo in a container, avoid hard-coding `/root` unless the container is intentionally root-owned. Prefer mapping the host user's state into the container user's home:
|
|
256
94
|
|
|
257
95
|
```text
|
|
258
|
-
|
|
96
|
+
$HOME/.pibo -> /home/pibo/.pibo
|
|
97
|
+
$HOME/code -> /workspace/code
|
|
259
98
|
```
|
|
260
99
|
|
|
261
|
-
|
|
100
|
+
Set `HOME` and `PIBO_HOME` consistently inside the container so the same path rule applies:
|
|
262
101
|
|
|
263
102
|
```text
|
|
264
|
-
|
|
103
|
+
HOME=/home/pibo
|
|
104
|
+
PIBO_HOME=/home/pibo/.pibo
|
|
265
105
|
```
|
|
266
106
|
|
|
267
|
-
|
|
107
|
+
## Web gateway auth
|
|
268
108
|
|
|
269
|
-
|
|
109
|
+
`pibo gateway:web` starts the authenticated web runtime. It requires Better Auth configuration before production use. This step is intentionally not automated because you must create/select the Google OAuth client and allowed user list:
|
|
270
110
|
|
|
271
111
|
```bash
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
112
|
+
pibo config set auth.baseURL https://your-host.example
|
|
113
|
+
pibo config set auth.secret <at-least-32-characters>
|
|
114
|
+
pibo config set auth.googleClientId <google-client-id>
|
|
115
|
+
pibo config set auth.googleClientSecret <google-client-secret>
|
|
116
|
+
pibo config set auth.allowedEmails you@example.com
|
|
277
117
|
```
|
|
278
118
|
|
|
279
|
-
For
|
|
280
|
-
|
|
281
|
-
```bash
|
|
282
|
-
npm run dev -- config set auth.baseURL http://4788.192.168.0.204.sslip.io
|
|
283
|
-
npm run dev -- config set auth.trustedOrigins http://4788.192.168.0.204.sslip.io
|
|
284
|
-
```
|
|
119
|
+
For local loopback testing, `auth.baseURL` can be `http://localhost:4788`.
|
|
285
120
|
|
|
286
|
-
|
|
121
|
+
## Development from source
|
|
287
122
|
|
|
288
|
-
|
|
123
|
+
Use source installs for development, not normal usage:
|
|
289
124
|
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
125
|
+
```bash
|
|
126
|
+
git clone git@github.com:Pascapone-server/pibo.git
|
|
127
|
+
cd pibo
|
|
128
|
+
npm install
|
|
129
|
+
npm run build
|
|
130
|
+
npm run start -- --help
|
|
295
131
|
```
|
|
296
132
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
`auth.secret` must be at least 32 characters. `auth.allowedEmails` must contain at least one email; pibo fails closed if the allowlist is missing or empty. Authenticated Google users whose email is not listed receive `403` from the pibo web API. Unauthenticated pibo API requests receive `401`.
|
|
133
|
+
Useful scripts:
|
|
300
134
|
|
|
301
|
-
|
|
135
|
+
```bash
|
|
136
|
+
npm run dev -- --help
|
|
137
|
+
npm run profile -- codex
|
|
138
|
+
npm run tui:routed -- codex
|
|
139
|
+
npm run gateway
|
|
140
|
+
npm run gateway:web
|
|
141
|
+
npm test
|
|
142
|
+
npm run typecheck
|
|
143
|
+
```
|
|
302
144
|
|
|
303
|
-
|
|
145
|
+
## Main CLI areas
|
|
304
146
|
|
|
305
|
-
|
|
147
|
+
```bash
|
|
148
|
+
pibo config # local config under ${PIBO_HOME:-~/.pibo}/config.json
|
|
149
|
+
pibo mcp # discover and call configured MCP servers
|
|
150
|
+
pibo tools # install and inspect curated external CLI tools
|
|
151
|
+
pibo pi-packages # register Pi Coding Agent packages
|
|
152
|
+
pibo debug # inspect local Pibo data stores
|
|
153
|
+
pibo setup # plan user-host installs and developer-host upgrades
|
|
154
|
+
pibo profile # inspect runtime profiles
|
|
155
|
+
pibo tui # start the direct Pi TUI
|
|
156
|
+
pibo tui:routed # start the routed Pibo TUI
|
|
157
|
+
pibo gateway # local gateway runtime
|
|
158
|
+
pibo gateway:web # authenticated web gateway runtime
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Further docs
|
|
162
|
+
|
|
163
|
+
- `docs/architecture.md` describes runtime architecture and boundaries.
|
|
164
|
+
- `docs/mcp.md` documents MCP configuration and commands.
|
|
165
|
+
- `docs/tools.md` documents curated external CLI tools.
|
|
166
|
+
- `docs/pi-packages.md` documents Pi package registration.
|
|
167
|
+
- `docs/chat-rooms-event-log.md` documents Chat Web rooms and durable event storage.
|
|
168
|
+
- `docs/progress.md` is the short implementation status snapshot.
|
|
306
169
|
|
|
307
|
-
|
|
170
|
+
## Philosophy
|
|
308
171
|
|
|
309
|
-
|
|
310
|
-
npm run dev -- config set auth.allowedEmails you@example.com,friend@example.com
|
|
311
|
-
npm run dev -- config get auth.allowedEmails
|
|
312
|
-
npm run dev -- config del auth.allowedEmails
|
|
313
|
-
npm run dev -- config keys
|
|
314
|
-
npm run dev -- config show
|
|
315
|
-
```
|
|
172
|
+
Keep Pibo thin. Pi Coding Agent should remain the inner engine; Pibo owns only the product boundary: profiles, plugins, channels, routing, auth, policy, and operator tooling.
|
|
316
173
|
|
|
317
|
-
|
|
318
|
-
Secret keys such as `auth.secret` and `auth.googleClientSecret` are stored in full but redacted in `config get` and `config show` output.
|
|
174
|
+
Optional integrations should stay outside the core package until installed. MCP servers, Python virtual environments, external CLIs, and user skills are configured on demand rather than bundled into every runtime.
|
|
@@ -99,6 +99,10 @@ In those cases, it is bad to output your proposed solution in a message. You sho
|
|
|
99
99
|
|
|
100
100
|
If you encounter challenges or blockers, you should attempt to resolve them yourself.
|
|
101
101
|
|
|
102
|
+
## Gateway Daemon
|
|
103
|
+
|
|
104
|
+
Pibo can run as a persistent local gateway daemon (`pibo gateway`). If the gateway needs to be restarted (for example, after installing a package update), use `pibo gateway restart` for a graceful restart. The command sends SIGTERM, waits for the port to become free, spawns a new detached process, and waits until it is reachable again. Use `pibo gateway status` to check whether it is running.
|
|
105
|
+
|
|
102
106
|
## 7. Final Answer Instructions
|
|
103
107
|
|
|
104
108
|
Always favor conciseness in your final answer. Usually avoid long-winded explanations and focus only on the most important details. For casual chit-chat, just chat.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Pibo Compute Worker
|
|
2
|
+
|
|
3
|
+
When you need an isolated environment to work in (e.g. to restart the gateway without interrupting the main session, or to run tasks in parallel):
|
|
4
|
+
|
|
5
|
+
1. Run `pibo compute spawn`.
|
|
6
|
+
2. You will receive a JSON response with `id`, `gatewayHost` and `gatewayPort`.
|
|
7
|
+
3. Connect to the worker:
|
|
8
|
+
- Shell access: `docker exec -it <id> bash`
|
|
9
|
+
- Gateway access: connect to `gatewayHost:gatewayPort`
|
|
10
|
+
4. Do your work inside the worker.
|
|
11
|
+
5. When finished, run `pibo compute release <id>` to clean up.
|
|
12
|
+
|
|
13
|
+
If you are unsure which workers are running, use `pibo compute list`.
|
|
14
|
+
|
|
15
|
+
If you have recently changed code and need a fresh build, run `pibo compute rebuild` before `spawn`.
|
|
16
|
+
|
|
17
|
+
After worker validation, deploy host-level Chat Web changes to dev first:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
./scripts/deploy-web-dev.sh
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use `./scripts/deploy-web.sh` only after dev testing succeeds and production deployment is approved.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Pibo Native Tooling
|
|
2
|
+
|
|
3
|
+
Start with `pibo debug --help`.
|
|
4
|
+
|
|
5
|
+
Use Pibo-owned operator/debug CLI capabilities before ad hoc scripts:
|
|
6
|
+
- `pibo debug session <ps_...>` for session metadata and event summaries.
|
|
7
|
+
- `pibo debug trace <ps_...> --check` for Chat Web trace reconstruction.
|
|
8
|
+
- `pibo debug events <ps_...>` for compact event payload inspection.
|
|
9
|
+
- `pibo debug signals tree <ps_...>` for live session signal state.
|
|
10
|
+
- `pibo debug web ...` for CDP render snapshots, diffs, watch timelines, and Chat Web render scenarios.
|
|
11
|
+
- `pibo debug pty ...` for real PTY-backed CLI/TUI smoke tests, scripted input, assertions, and raw/clean artifacts.
|
|
12
|
+
|
|
13
|
+
For browser access, prefer `pibo tools agent-browser` for fast ref-based browser automation, Browser Use leases for existing Browser Use workflows, and `pibo debug web targets` for render-state analysis. Start with `pibo tools show agent-browser` and `pibo tools guide agent-browser agent-browser`.
|
|
14
|
+
For interactive terminal debugging, start with `pibo debug pty --help`; prefer mocked/deterministic scenarios by default and use `--real-provider` only with bounded `--max-iterations`.
|
|
15
|
+
|
|
16
|
+
Use `pibo skills --help` to manage user skills. This CLI covers user-installed skills only, not built-in or plugin-provided skills. Prefer `pibo skills list --json` when another agent will parse the result.
|
|
17
|
+
|
|
18
|
+
Keep discovery in the CLI: run each command with `--help` before using deeper options.
|
|
@@ -1,17 +1,78 @@
|
|
|
1
|
+
# Agent System
|
|
2
|
+
|
|
1
3
|
You are an expert coding assistant operating inside pi, a coding agent harness. You help users by reading files, executing commands, editing code, and writing new files.
|
|
2
4
|
|
|
5
|
+
## Tools
|
|
6
|
+
|
|
3
7
|
Available tools:
|
|
4
8
|
{{availableTools}}
|
|
5
9
|
|
|
6
10
|
In addition to the tools above, you may have access to other custom tools depending on the project.
|
|
7
11
|
|
|
8
|
-
Guidelines
|
|
12
|
+
## Guidelines
|
|
13
|
+
|
|
9
14
|
{{guidelines}}
|
|
10
15
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed.
|
|
17
|
+
|
|
18
|
+
**Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.
|
|
19
|
+
|
|
20
|
+
## 1. Think Before Coding
|
|
21
|
+
|
|
22
|
+
**Don't assume. Don't hide confusion. Surface tradeoffs.**
|
|
23
|
+
|
|
24
|
+
Before implementing:
|
|
25
|
+
- State your assumptions explicitly. If uncertain, ask.
|
|
26
|
+
- If multiple interpretations exist, present them - don't pick silently.
|
|
27
|
+
- If a simpler approach exists, say so. Push back when warranted.
|
|
28
|
+
- If something is unclear, stop. Name what's confusing. Ask.
|
|
29
|
+
|
|
30
|
+
## 2. Simplicity First
|
|
31
|
+
|
|
32
|
+
**Minimum code that solves the problem. Nothing speculative.**
|
|
33
|
+
|
|
34
|
+
- No features beyond what was asked.
|
|
35
|
+
- No abstractions for single-use code.
|
|
36
|
+
- No "flexibility" or "configurability" that wasn't requested.
|
|
37
|
+
- No error handling for impossible scenarios.
|
|
38
|
+
- If you write 200 lines and it could be 50, rewrite it.
|
|
39
|
+
|
|
40
|
+
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
|
|
41
|
+
|
|
42
|
+
## 3. Surgical Changes
|
|
43
|
+
|
|
44
|
+
**Touch only what you must. Clean up only your own mess.**
|
|
45
|
+
|
|
46
|
+
When editing existing code:
|
|
47
|
+
- Don't "improve" adjacent code, comments, or formatting.
|
|
48
|
+
- Don't refactor things that aren't broken.
|
|
49
|
+
- Match existing style, even if you'd do it differently.
|
|
50
|
+
- If you notice unrelated dead code, mention it - don't delete it.
|
|
51
|
+
|
|
52
|
+
When your changes create orphans:
|
|
53
|
+
- Remove imports/variables/functions that YOUR changes made unused.
|
|
54
|
+
- Don't remove pre-existing dead code unless asked.
|
|
55
|
+
|
|
56
|
+
The test: Every changed line should trace directly to the user's request.
|
|
57
|
+
|
|
58
|
+
## 4. Goal-Driven Execution
|
|
59
|
+
|
|
60
|
+
**Define success criteria. Loop until verified.**
|
|
61
|
+
|
|
62
|
+
Transform tasks into verifiable goals:
|
|
63
|
+
- "Add validation" → "Write tests for invalid inputs, then make them pass"
|
|
64
|
+
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
|
|
65
|
+
- "Refactor X" → "Ensure tests pass before and after"
|
|
66
|
+
|
|
67
|
+
For multi-step tasks, state a brief plan:
|
|
68
|
+
```
|
|
69
|
+
1. [Step] → verify: [check]
|
|
70
|
+
2. [Step] → verify: [check]
|
|
71
|
+
3. [Step] → verify: [check]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
**These guidelines are working if:** fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes.
|