@pasko70/pibo 1.9.8 → 1.9.9
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 +183 -183
- package/context/codex-base-prompt.md +148 -148
- package/context/compute-worker.md +23 -23
- package/context/pibo-compaction-prompt.md +100 -100
- package/context/pibo-native-tooling.md +18 -18
- package/context/pibo-system-prompt.md +77 -77
- package/docs/README.md +23 -23
- package/docs/ops/install-developer-host.md +112 -112
- package/docs/ops/install-user-host.md +96 -96
- package/docs/ops/upgrade-user-to-developer-host.md +69 -69
- package/docs/ops/vscode-extension-release.md +160 -160
- package/package.json +95 -95
- package/skills/builtin/graphify/SKILL.md +52 -52
- package/skills/builtin/pi-agent-harness/SKILL.md +319 -319
- package/skills/builtin/pi-agent-harness/agents/openai.yaml +4 -4
- package/skills/builtin/pibo-docker-system/SKILL.md +170 -170
- package/skills/builtin/pibo-spec-writing/SKILL.md +330 -330
- package/skills/builtin/prd/SKILL.md +143 -143
- package/skills/builtin/ralph-loop/SKILL.md +359 -359
- package/skills/builtin/ralph-prd-json/SKILL.md +123 -123
- package/skills/builtin/skill-creator/LICENSE.txt +201 -201
- package/skills/builtin/skill-creator/SKILL.md +513 -513
- package/skills/builtin/skill-creator/agents/analyzer.md +274 -274
- package/skills/builtin/skill-creator/agents/comparator.md +202 -202
- package/skills/builtin/skill-creator/agents/grader.md +223 -223
- package/skills/builtin/skill-creator/assets/eval_review.html +146 -146
- package/skills/builtin/skill-creator/eval-viewer/generate_review.py +471 -471
- package/skills/builtin/skill-creator/eval-viewer/viewer.html +1325 -1325
- package/skills/builtin/skill-creator/references/schemas.md +430 -430
- package/skills/builtin/skill-creator/scripts/aggregate_benchmark.py +401 -401
- package/skills/builtin/skill-creator/scripts/generate_report.py +326 -326
- package/skills/builtin/skill-creator/scripts/improve_description.py +247 -247
- package/skills/builtin/skill-creator/scripts/package_skill.py +136 -136
- package/skills/builtin/skill-creator/scripts/quick_validate.py +102 -102
- package/skills/builtin/skill-creator/scripts/run_eval.py +310 -310
- package/skills/builtin/skill-creator/scripts/run_loop.py +328 -328
- package/skills/builtin/skill-creator/scripts/utils.py +47 -47
- package/skills/builtin/web-annotations/SKILL.md +93 -93
- package/src/mcp/LICENSE.mcp-cli +21 -21
- package/dist/api/simple-agent-api.js +0 -136
- package/dist/app-context.js +0 -4
- package/dist/apps/chat/agent-profiles.js +0 -70
- package/dist/apps/chat/agent-store.js +0 -669
- package/dist/apps/chat/chat-api-routes.js +0 -325
- package/dist/apps/chat/chat-capability-routes.js +0 -90
- package/dist/apps/chat/chat-files.js +0 -178
- package/dist/apps/chat/chat-request-normalizers.js +0 -681
- package/dist/apps/chat/chat-settings-routes.js +0 -98
- package/dist/apps/chat/chat-trace-helpers.js +0 -139
- package/dist/apps/chat/chat-user-skill-routes.js +0 -178
- package/dist/apps/chat/cron-api.js +0 -213
- package/dist/apps/chat/data/chat-data-mappers.js +0 -82
- package/dist/apps/chat/data/event-command-service.js +0 -75
- package/dist/apps/chat/data/navigation-query-service.js +0 -11
- package/dist/apps/chat/data/project-service.js +0 -877
- package/dist/apps/chat/data/read-state-service.js +0 -42
- package/dist/apps/chat/data/room-service.js +0 -52
- package/dist/apps/chat/data/session-query-service.js +0 -126
- package/dist/apps/chat/data/timeline-query-service.js +0 -102
- package/dist/apps/chat/event-log.js +0 -1
- package/dist/apps/chat/model-catalog.js +0 -53
- package/dist/apps/chat/output-compactor.js +0 -126
- package/dist/apps/chat/output-event-policy.js +0 -17
- package/dist/apps/chat/project-workflow-human-actions.js +0 -347
- package/dist/apps/chat/project-workflow-sessions.js +0 -260
- package/dist/apps/chat/provider-auth-actions.js +0 -43
- package/dist/apps/chat/ralph-api.js +0 -156
- package/dist/apps/chat/read-model.js +0 -1
- package/dist/apps/chat/rooms.js +0 -1
- package/dist/apps/chat/session-metadata.js +0 -14
- package/dist/apps/chat/static-assets.js +0 -997
- package/dist/apps/chat/stream.js +0 -145
- package/dist/apps/chat/telemetry-retention-service.js +0 -69
- package/dist/apps/chat/trace-v2.js +0 -307
- package/dist/apps/chat/trace.js +0 -572
- package/dist/apps/chat/types/event-store.js +0 -1
- package/dist/apps/chat/types/read-model.js +0 -1
- package/dist/apps/chat/types/rooms.js +0 -36
- package/dist/apps/chat/web-app.js +0 -4605
- package/dist/apps/chat/workflow-catalog.js +0 -572
- package/dist/apps/chat/workflow-edge-compatibility.js +0 -51
- package/dist/apps/chat/workflow-json-schema-validation.js +0 -335
- package/dist/apps/chat/workflow-manual-trigger-runtime.js +0 -232
- package/dist/apps/chat/workflow-persistence-model.js +0 -140
- package/dist/apps/chat/workflow-persistence.js +0 -633
- package/dist/apps/chat/workflow-registered-ref-params.js +0 -130
- package/dist/apps/chat/workflow-registered-ref-pickers.js +0 -179
- package/dist/apps/chat/workflow-registered-ref-validation.js +0 -210
- package/dist/apps/chat/workflow-v2-security-validation.js +0 -93
- package/dist/apps/chat/workflow-validation-helpers.js +0 -114
- package/dist/apps/chat-ui/assets/apl-BxEMbctQ.js +0 -1
- package/dist/apps/chat-ui/assets/asciiarmor-eFjeGRuZ.js +0 -1
- package/dist/apps/chat-ui/assets/asn1-Cfx-0pt9.js +0 -1
- package/dist/apps/chat-ui/assets/asterisk-B5BHTsBr.js +0 -1
- package/dist/apps/chat-ui/assets/brainfuck-CAA2xofr.js +0 -1
- package/dist/apps/chat-ui/assets/clike-BoDCOLzN.js +0 -1
- package/dist/apps/chat-ui/assets/clojure-kVFSWX0o.js +0 -1
- package/dist/apps/chat-ui/assets/cmake-BUPAhezI.js +0 -1
- package/dist/apps/chat-ui/assets/cobol-BfgHZgup.js +0 -1
- package/dist/apps/chat-ui/assets/coffeescript-G1Pe_1AZ.js +0 -1
- package/dist/apps/chat-ui/assets/commonlisp-B3N0CjHn.js +0 -1
- package/dist/apps/chat-ui/assets/crystal-C15ndaGM.js +0 -1
- package/dist/apps/chat-ui/assets/css-BqOeyZOV.js +0 -1
- package/dist/apps/chat-ui/assets/cypher-KjIKv-wW.js +0 -1
- package/dist/apps/chat-ui/assets/d-BlT5AEC-.js +0 -1
- package/dist/apps/chat-ui/assets/diff-oF98tbqj.js +0 -1
- package/dist/apps/chat-ui/assets/dist--55mTWk3.js +0 -1
- package/dist/apps/chat-ui/assets/dist--Sb99Zop.js +0 -11
- package/dist/apps/chat-ui/assets/dist-4VdcCJgh.js +0 -6
- package/dist/apps/chat-ui/assets/dist-BCqTb13C.js +0 -1
- package/dist/apps/chat-ui/assets/dist-BH4dS5wk.js +0 -23
- package/dist/apps/chat-ui/assets/dist-BXmdj7mb.js +0 -9
- package/dist/apps/chat-ui/assets/dist-BZ39rB1W.js +0 -1
- package/dist/apps/chat-ui/assets/dist-BsedZGJo.js +0 -1
- package/dist/apps/chat-ui/assets/dist-C5YJOwhH.js +0 -1
- package/dist/apps/chat-ui/assets/dist-C5oXtFSP.js +0 -1
- package/dist/apps/chat-ui/assets/dist-CDTTlyfG.js +0 -1
- package/dist/apps/chat-ui/assets/dist-CKM5j-iy.js +0 -1
- package/dist/apps/chat-ui/assets/dist-CUp9us2q.js +0 -1
- package/dist/apps/chat-ui/assets/dist-CZ9T4Cly.js +0 -1
- package/dist/apps/chat-ui/assets/dist-CdhJkLlg.js +0 -1
- package/dist/apps/chat-ui/assets/dist-D7FSg1x8.js +0 -1
- package/dist/apps/chat-ui/assets/dist-DSKQpPaz.js +0 -1
- package/dist/apps/chat-ui/assets/dist-Ds5VZTeC.js +0 -2
- package/dist/apps/chat-ui/assets/dist-SVPsM5Oi.js +0 -13
- package/dist/apps/chat-ui/assets/dist-ZN6fdzpB.js +0 -1
- package/dist/apps/chat-ui/assets/dist-Zqt9kNG9.js +0 -1
- package/dist/apps/chat-ui/assets/dist-qwl4CNfF.js +0 -1
- package/dist/apps/chat-ui/assets/dist-tGfufz3b.js +0 -1
- package/dist/apps/chat-ui/assets/dockerfile-CUaqzcqp.js +0 -1
- package/dist/apps/chat-ui/assets/dtd-VCA9yr61.js +0 -1
- package/dist/apps/chat-ui/assets/dylan-O-V5Dw5W.js +0 -1
- package/dist/apps/chat-ui/assets/ebnf-SPmdBkvT.js +0 -1
- package/dist/apps/chat-ui/assets/ecl-ChfCttfI.js +0 -1
- package/dist/apps/chat-ui/assets/eiffel-cB9EbjeN.js +0 -1
- package/dist/apps/chat-ui/assets/elm-BTiVflBU.js +0 -1
- package/dist/apps/chat-ui/assets/erlang-egf0TXFm.js +0 -1
- package/dist/apps/chat-ui/assets/factor-C2tAxNob.js +0 -1
- package/dist/apps/chat-ui/assets/fcl-BiCjh1tj.js +0 -1
- package/dist/apps/chat-ui/assets/forth-C4kDGW6u.js +0 -1
- package/dist/apps/chat-ui/assets/fortran-DzkLaPnd.js +0 -1
- package/dist/apps/chat-ui/assets/gas-DMOxskQF.js +0 -1
- package/dist/apps/chat-ui/assets/gherkin-BPxBpp-k.js +0 -1
- package/dist/apps/chat-ui/assets/groovy-CkEnc0ZY.js +0 -1
- package/dist/apps/chat-ui/assets/haskell-Dadpo9-w.js +0 -1
- package/dist/apps/chat-ui/assets/haxe-CDNZL9MW.js +0 -1
- package/dist/apps/chat-ui/assets/http-jy9Zxxt3.js +0 -1
- package/dist/apps/chat-ui/assets/idl-CGSB6iiy.js +0 -1
- package/dist/apps/chat-ui/assets/index-C0x9nEcf.css +0 -1
- package/dist/apps/chat-ui/assets/index-Gf-Zb-P-.js +0 -173
- package/dist/apps/chat-ui/assets/javascript-DSlzRUd8.js +0 -1
- package/dist/apps/chat-ui/assets/julia-DTiF9v6R.js +0 -1
- package/dist/apps/chat-ui/assets/livescript-Ci8Xxna6.js +0 -1
- package/dist/apps/chat-ui/assets/lua-eVxIrt9t.js +0 -1
- package/dist/apps/chat-ui/assets/mathematica-Da3grj36.js +0 -1
- package/dist/apps/chat-ui/assets/mbox-BWBMSafM.js +0 -1
- package/dist/apps/chat-ui/assets/mirc-CtHu9S1B.js +0 -1
- package/dist/apps/chat-ui/assets/mllike-wTFlPWXS.js +0 -1
- package/dist/apps/chat-ui/assets/modelica-cKbQ0UXu.js +0 -1
- package/dist/apps/chat-ui/assets/mscgen-C5pXQCMK.js +0 -1
- package/dist/apps/chat-ui/assets/mumps-CKBHkOQq.js +0 -1
- package/dist/apps/chat-ui/assets/nginx-B00AiQel.js +0 -1
- package/dist/apps/chat-ui/assets/nsis-SMDwKltR.js +0 -1
- package/dist/apps/chat-ui/assets/ntriples-B_36EBV0.js +0 -1
- package/dist/apps/chat-ui/assets/octave-BXPjzAif.js +0 -1
- package/dist/apps/chat-ui/assets/oz-Dedpat1M.js +0 -1
- package/dist/apps/chat-ui/assets/pascal-CMcUg72K.js +0 -1
- package/dist/apps/chat-ui/assets/perl-DoVTbnzt.js +0 -1
- package/dist/apps/chat-ui/assets/pig-CULXT1YV.js +0 -1
- package/dist/apps/chat-ui/assets/powershell-Cv5Uhf6b.js +0 -1
- package/dist/apps/chat-ui/assets/properties-CQ1C2P-M.js +0 -1
- package/dist/apps/chat-ui/assets/protobuf-SRlvzrl6.js +0 -1
- package/dist/apps/chat-ui/assets/pug-Bo3wfL-f.js +0 -1
- package/dist/apps/chat-ui/assets/puppet-ClSqCGj6.js +0 -1
- 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/assets/python-C2_X1GpX.js +0 -1
- package/dist/apps/chat-ui/assets/q-B_6Gdyzl.js +0 -1
- package/dist/apps/chat-ui/assets/r-BD07NGED.js +0 -1
- package/dist/apps/chat-ui/assets/rolldown-runtime-S-ySWqyJ.js +0 -1
- package/dist/apps/chat-ui/assets/rpm-CRu5Z2Jl.js +0 -1
- package/dist/apps/chat-ui/assets/ruby-dZPnOz8h.js +0 -1
- package/dist/apps/chat-ui/assets/sas-S2t8_sDI.js +0 -1
- package/dist/apps/chat-ui/assets/scheme-WcyFWLW2.js +0 -1
- package/dist/apps/chat-ui/assets/shell-DUelnYSh.js +0 -1
- package/dist/apps/chat-ui/assets/sieve-jDjlVhNh.js +0 -1
- package/dist/apps/chat-ui/assets/simple-mode-CL04yRVp.js +0 -1
- package/dist/apps/chat-ui/assets/smalltalk-ddWDYy10.js +0 -1
- package/dist/apps/chat-ui/assets/solr-C7rQhLuW.js +0 -1
- package/dist/apps/chat-ui/assets/sparql--fPCCgVd.js +0 -1
- package/dist/apps/chat-ui/assets/spreadsheet-DjthqD5G.js +0 -1
- package/dist/apps/chat-ui/assets/sql-D_dieYbr.js +0 -1
- package/dist/apps/chat-ui/assets/stex-rHcFYcA0.js +0 -1
- package/dist/apps/chat-ui/assets/stylus-DxF70RNr.js +0 -1
- package/dist/apps/chat-ui/assets/swift-T0hDoOb-.js +0 -1
- package/dist/apps/chat-ui/assets/tcl-Dlzy1mPk.js +0 -1
- package/dist/apps/chat-ui/assets/textile-Dy5rFZe5.js +0 -1
- package/dist/apps/chat-ui/assets/tiddlywiki-DQP1OymS.js +0 -1
- package/dist/apps/chat-ui/assets/tiki-0vOj3DB2.js +0 -1
- package/dist/apps/chat-ui/assets/toml-DEltN0lI.js +0 -1
- package/dist/apps/chat-ui/assets/troff-CRbBpEqY.js +0 -1
- package/dist/apps/chat-ui/assets/ttcn-M5q1nLKg.js +0 -1
- package/dist/apps/chat-ui/assets/ttcn-cfg-Rmw9NWq9.js +0 -1
- package/dist/apps/chat-ui/assets/turtle-BCDWhJK0.js +0 -1
- package/dist/apps/chat-ui/assets/vb-QQ7LGlOz.js +0 -1
- package/dist/apps/chat-ui/assets/vbscript-BiSEdUzz.js +0 -1
- package/dist/apps/chat-ui/assets/velocity-CzMg5_6w.js +0 -1
- package/dist/apps/chat-ui/assets/verilog-BJOO83gk.js +0 -1
- package/dist/apps/chat-ui/assets/vhdl-ed4zAZAA.js +0 -1
- package/dist/apps/chat-ui/assets/webidl-Ddy6hbV6.js +0 -1
- package/dist/apps/chat-ui/assets/xquery-Bw1zwhh6.js +0 -1
- package/dist/apps/chat-ui/assets/yacas-DZdTXy3s.js +0 -1
- package/dist/apps/chat-ui/assets/z80-DMG02_YV.js +0 -1
- package/dist/apps/chat-ui/index.html +0 -20
- package/dist/apps/chat-ui/manifest.webmanifest +0 -25
- package/dist/apps/chat-ui/sw.js +0 -47
- package/dist/apps/chat-vscode-web/assets/index-B5QK07zO.css +0 -2
- package/dist/apps/chat-vscode-web/assets/index-BAMxIaI_.js +0 -41
- package/dist/apps/chat-vscode-web/index.html +0 -14
- package/dist/apps/cli-ui/InkSessionApp.js +0 -1218
- package/dist/apps/cli-ui/InkTerminalLine.js +0 -53
- package/dist/apps/cli-ui/InkTerminalRow.js +0 -304
- package/dist/apps/cli-ui/InkTerminalView.js +0 -25
- package/dist/apps/cli-ui/cliSessionsCommand.js +0 -232
- package/dist/apps/cli-ui/index.js +0 -8
- package/dist/apps/cli-ui/inkColors.js +0 -67
- package/dist/apps/cli-ui/inkJson.js +0 -244
- package/dist/apps/cli-ui/inkMarkdown.js +0 -127
- package/dist/apps/cli-ui/inkSyntaxHighlighter.js +0 -166
- package/dist/apps/context-files-ui/assets/apl-14BqhLYK.js +0 -1
- package/dist/apps/context-files-ui/assets/asciiarmor-WLvjqI7d.js +0 -1
- package/dist/apps/context-files-ui/assets/asn1-Bg4FbdCg.js +0 -1
- package/dist/apps/context-files-ui/assets/asterisk-B2MO-X4d.js +0 -1
- package/dist/apps/context-files-ui/assets/brainfuck-CV9kufud.js +0 -1
- package/dist/apps/context-files-ui/assets/clike-CjmcUpt6.js +0 -1
- package/dist/apps/context-files-ui/assets/clojure-De3QGfx6.js +0 -1
- package/dist/apps/context-files-ui/assets/cmake-i2VDNaRq.js +0 -1
- package/dist/apps/context-files-ui/assets/cobol-BwO6DF08.js +0 -1
- package/dist/apps/context-files-ui/assets/coffeescript-BtivDvRz.js +0 -1
- package/dist/apps/context-files-ui/assets/commonlisp-DFkEQdLP.js +0 -1
- package/dist/apps/context-files-ui/assets/crystal-CU0NkcVL.js +0 -1
- package/dist/apps/context-files-ui/assets/css-CbMZAQ1W.js +0 -1
- package/dist/apps/context-files-ui/assets/cypher-Dke5QOzv.js +0 -1
- package/dist/apps/context-files-ui/assets/d-TPqSVaHM.js +0 -1
- package/dist/apps/context-files-ui/assets/diff-B365LSoZ.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-B5PTVnox.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-B5ZAfwf5.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-BOiGdrG-.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-BkUONE3N.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-D1KyNDg5.js +0 -13
- package/dist/apps/context-files-ui/assets/dist-DK01b7x4.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-DKoyMSNr.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-DLMjd26T.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-DPG9jOQ-.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-DotDq_kD.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-Dp5AH00p.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-DqYw0LH7.js +0 -2
- package/dist/apps/context-files-ui/assets/dist-QQuDy4KA.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-TF5iO5ML.js +0 -9
- package/dist/apps/context-files-ui/assets/dist-TbjAhles.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-ZsBbt0uY.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-kmsvtHkH.js +0 -1
- package/dist/apps/context-files-ui/assets/dist-vnd7PMu3.js +0 -11
- package/dist/apps/context-files-ui/assets/dockerfile-CJb2sekW.js +0 -1
- package/dist/apps/context-files-ui/assets/dtd-CBMymJ7O.js +0 -1
- package/dist/apps/context-files-ui/assets/dylan-08Azy1NK.js +0 -1
- package/dist/apps/context-files-ui/assets/ebnf-Dkum_1J8.js +0 -1
- package/dist/apps/context-files-ui/assets/ecl-dhxjHL8y.js +0 -1
- package/dist/apps/context-files-ui/assets/eiffel-C446m6dI.js +0 -1
- package/dist/apps/context-files-ui/assets/elm-po1E9de0.js +0 -1
- package/dist/apps/context-files-ui/assets/erlang-BD5LkVkR.js +0 -1
- package/dist/apps/context-files-ui/assets/factor-B2EMQZkP.js +0 -1
- package/dist/apps/context-files-ui/assets/fcl-DkEOamHd.js +0 -1
- package/dist/apps/context-files-ui/assets/forth-dCg2_HVB.js +0 -1
- package/dist/apps/context-files-ui/assets/fortran-3ZpXLFh1.js +0 -1
- package/dist/apps/context-files-ui/assets/gas-DMmxLZRI.js +0 -1
- package/dist/apps/context-files-ui/assets/gherkin-DUSFg2R6.js +0 -1
- package/dist/apps/context-files-ui/assets/groovy-Cmduloe1.js +0 -1
- package/dist/apps/context-files-ui/assets/haskell-Cyr255R9.js +0 -1
- package/dist/apps/context-files-ui/assets/haxe-BJVKtprM.js +0 -1
- package/dist/apps/context-files-ui/assets/http-DszHFpc-.js +0 -1
- package/dist/apps/context-files-ui/assets/idl-Cati9Nrv.js +0 -1
- package/dist/apps/context-files-ui/assets/index-B92tL3Pp.css +0 -1
- package/dist/apps/context-files-ui/assets/index-BhAWD3dv.js +0 -202
- package/dist/apps/context-files-ui/assets/javascript-C5pDVaoP.js +0 -1
- package/dist/apps/context-files-ui/assets/julia-DlqY1cTU.js +0 -1
- package/dist/apps/context-files-ui/assets/livescript-C6p8-2W1.js +0 -1
- package/dist/apps/context-files-ui/assets/lua-BxuTHaF7.js +0 -1
- package/dist/apps/context-files-ui/assets/mathematica-nDHZUMJT.js +0 -1
- package/dist/apps/context-files-ui/assets/mbox-DAaR0Hcz.js +0 -1
- package/dist/apps/context-files-ui/assets/mirc-CCA0FRfl.js +0 -1
- package/dist/apps/context-files-ui/assets/mllike-Cw3Iccsb.js +0 -1
- package/dist/apps/context-files-ui/assets/modelica-Czx80fNR.js +0 -1
- package/dist/apps/context-files-ui/assets/mscgen-BmfuTbzG.js +0 -1
- package/dist/apps/context-files-ui/assets/mumps-Ds_ZaumL.js +0 -1
- package/dist/apps/context-files-ui/assets/nginx-D9M2PQ4U.js +0 -1
- package/dist/apps/context-files-ui/assets/nsis-DOo3SJmd.js +0 -1
- package/dist/apps/context-files-ui/assets/ntriples-DLHGTvHs.js +0 -1
- package/dist/apps/context-files-ui/assets/octave-8jj96JiC.js +0 -1
- package/dist/apps/context-files-ui/assets/oz-BmMq7iC4.js +0 -1
- package/dist/apps/context-files-ui/assets/pascal-BgMr6XpT.js +0 -1
- package/dist/apps/context-files-ui/assets/perl-D6YJObi_.js +0 -1
- package/dist/apps/context-files-ui/assets/pig-nx7uchs8.js +0 -1
- package/dist/apps/context-files-ui/assets/powershell-B4IPkVxR.js +0 -1
- package/dist/apps/context-files-ui/assets/properties-CoavQdLC.js +0 -1
- package/dist/apps/context-files-ui/assets/protobuf-D5EWhcmc.js +0 -1
- package/dist/apps/context-files-ui/assets/pug-QU72BPAa.js +0 -1
- package/dist/apps/context-files-ui/assets/puppet-B_0GFuyD.js +0 -1
- package/dist/apps/context-files-ui/assets/python-Cs7sNzy_.js +0 -1
- package/dist/apps/context-files-ui/assets/q-BIB9pPtI.js +0 -1
- package/dist/apps/context-files-ui/assets/r-CN5s4f3o.js +0 -1
- package/dist/apps/context-files-ui/assets/rpm-Ct_Ck8mQ.js +0 -1
- package/dist/apps/context-files-ui/assets/ruby-BVPradRk.js +0 -1
- package/dist/apps/context-files-ui/assets/sas-DN4j74IF.js +0 -1
- package/dist/apps/context-files-ui/assets/scheme-CvNgHAnh.js +0 -1
- package/dist/apps/context-files-ui/assets/shell-BjiMLAaM.js +0 -1
- package/dist/apps/context-files-ui/assets/sieve-C2U1O5Z4.js +0 -1
- package/dist/apps/context-files-ui/assets/simple-mode-DnMbQuKW.js +0 -1
- package/dist/apps/context-files-ui/assets/smalltalk-DkYwYufV.js +0 -1
- package/dist/apps/context-files-ui/assets/solr-BopnSD-v.js +0 -1
- package/dist/apps/context-files-ui/assets/sparql-Cpg3YQfd.js +0 -1
- package/dist/apps/context-files-ui/assets/spreadsheet-kRxtVt9J.js +0 -1
- package/dist/apps/context-files-ui/assets/sql-DYI2GwJR.js +0 -1
- package/dist/apps/context-files-ui/assets/stex-BCRT8IJ3.js +0 -1
- package/dist/apps/context-files-ui/assets/stylus-CARoeVE9.js +0 -1
- package/dist/apps/context-files-ui/assets/swift-DKNaLAK6.js +0 -1
- package/dist/apps/context-files-ui/assets/tcl-CQyXkgMH.js +0 -1
- package/dist/apps/context-files-ui/assets/textile-Yg_UWn-t.js +0 -1
- package/dist/apps/context-files-ui/assets/tiddlywiki-dqVbkfX4.js +0 -1
- package/dist/apps/context-files-ui/assets/tiki-CC_ic8g0.js +0 -1
- package/dist/apps/context-files-ui/assets/toml-B7gGzVkJ.js +0 -1
- package/dist/apps/context-files-ui/assets/troff-Bq3z6oAu.js +0 -1
- package/dist/apps/context-files-ui/assets/ttcn-GvRgs2AT.js +0 -1
- package/dist/apps/context-files-ui/assets/ttcn-cfg-CGCXz7Vo.js +0 -1
- package/dist/apps/context-files-ui/assets/turtle-CwIpz2yy.js +0 -1
- package/dist/apps/context-files-ui/assets/vb-BmcHUM2C.js +0 -1
- package/dist/apps/context-files-ui/assets/vbscript-Cs9dylre.js +0 -1
- package/dist/apps/context-files-ui/assets/velocity-CBWU0VCy.js +0 -1
- package/dist/apps/context-files-ui/assets/verilog-DVCHmufx.js +0 -1
- package/dist/apps/context-files-ui/assets/vhdl-BGDk4f1d.js +0 -1
- package/dist/apps/context-files-ui/assets/webidl-egXQEWlC.js +0 -1
- package/dist/apps/context-files-ui/assets/xquery-5f0hn7cg.js +0 -1
- package/dist/apps/context-files-ui/assets/yacas-DNs9XkmQ.js +0 -1
- package/dist/apps/context-files-ui/assets/z80-B7Dfb4UO.js +0 -1
- package/dist/apps/context-files-ui/index.html +0 -14
- package/dist/auth/better-auth.js +0 -130
- package/dist/auth/login-actions.js +0 -251
- package/dist/auth/openai-codex-usage.js +0 -147
- package/dist/auth/types.js +0 -14
- package/dist/bin/pibo.js +0 -3
- package/dist/bin/rg.js +0 -15
- package/dist/channels/types.js +0 -1
- package/dist/cli-errors.js +0 -18
- package/dist/cli-session/fakeSessionSource.js +0 -804
- package/dist/cli-session/index.js +0 -3
- package/dist/cli-session/localSessionSource.js +0 -1144
- package/dist/cli-session/sessionSource.js +0 -13
- package/dist/cli.js +0 -491
- package/dist/compute/cli.js +0 -415
- package/dist/compute/docker.js +0 -835
- package/dist/compute/resource-health.js +0 -334
- package/dist/compute/resource-policy.js +0 -98
- package/dist/config/config.js +0 -180
- package/dist/core/base-prompt.js +0 -104
- package/dist/core/codex-compat.js +0 -44
- package/dist/core/compaction-prompt.js +0 -293
- package/dist/core/context-build.js +0 -711
- package/dist/core/context-guard.js +0 -293
- package/dist/core/events.js +0 -1
- package/dist/core/gateway-resource-guard.js +0 -215
- package/dist/core/model-defaults.js +0 -95
- package/dist/core/pibo-home.js +0 -8
- package/dist/core/profiles.js +0 -210
- package/dist/core/provider-recovery.js +0 -64
- package/dist/core/provider-telemetry.js +0 -353
- package/dist/core/routed-session.js +0 -1179
- package/dist/core/runtime-telemetry.js +0 -1059
- package/dist/core/runtime.js +0 -529
- package/dist/core/session-errors.js +0 -76
- package/dist/core/session-model.js +0 -39
- package/dist/core/session-router.js +0 -850
- package/dist/core/skill-expansion.js +0 -43
- package/dist/core/system-prompt-template.js +0 -56
- package/dist/core/telemetry-retention-settings.js +0 -34
- package/dist/core/telemetry-staleness.js +0 -128
- package/dist/core/test-output-compaction.js +0 -145
- package/dist/core/thinking.js +0 -9
- package/dist/core/user-settings.js +0 -84
- package/dist/core/workspace.js +0 -5
- package/dist/core/wsl.js +0 -100
- package/dist/cron/channel.js +0 -28
- package/dist/cron/cli.js +0 -230
- package/dist/cron/plugin.js +0 -11
- package/dist/cron/schedule.js +0 -214
- package/dist/cron/service.js +0 -177
- package/dist/cron/store.js +0 -349
- package/dist/cron/types.js +0 -1
- package/dist/data/cli.js +0 -184
- package/dist/data/event-log.js +0 -106
- package/dist/data/ingest-service.js +0 -389
- package/dist/data/message-store.js +0 -62
- package/dist/data/navigation-store.js +0 -75
- package/dist/data/observation-store.js +0 -46
- package/dist/data/payload-store.js +0 -153
- package/dist/data/pibo-store.js +0 -59
- package/dist/data/schema.js +0 -436
- package/dist/data/session-store.js +0 -63
- package/dist/data/sqlite-schema.js +0 -12
- package/dist/data/telemetry-preview.js +0 -65
- package/dist/data/telemetry-queries.js +0 -212
- package/dist/data/telemetry-retention.js +0 -50
- package/dist/data/telemetry-rows.js +0 -158
- package/dist/data/telemetry-writer.js +0 -114
- package/dist/data/telemetry.js +0 -471
- package/dist/debug/delta-compaction.js +0 -99
- package/dist/debug/detail-format.js +0 -86
- package/dist/debug/events.js +0 -212
- package/dist/debug/failures.js +0 -162
- package/dist/debug/index.js +0 -1296
- package/dist/debug/messages.js +0 -185
- package/dist/debug/next-commands.js +0 -6
- package/dist/debug/payloads.js +0 -123
- package/dist/debug/pty.js +0 -924
- package/dist/debug/session.js +0 -230
- package/dist/debug/sql.js +0 -238
- package/dist/debug/stores.js +0 -54
- package/dist/debug/summary.js +0 -72
- package/dist/debug/telemetry.js +0 -649
- package/dist/debug/tools.js +0 -168
- package/dist/debug/trace-render-check.js +0 -151
- package/dist/debug/trace.js +0 -370
- package/dist/debug/web-artifacts.js +0 -63
- package/dist/debug/web-options.js +0 -313
- package/dist/debug/web-render-analysis.js +0 -310
- package/dist/debug/web-snapshot-browser-scripts.js +0 -303
- package/dist/debug/web-streaming-benchmark-analysis.js +0 -605
- package/dist/debug/web-streaming-browser-library.js +0 -928
- package/dist/debug/web-streaming-browser-scripts.js +0 -242
- package/dist/debug/web-streaming-provider-telemetry.js +0 -194
- package/dist/debug/web-streaming-report.js +0 -493
- package/dist/debug/web-streaming-types.js +0 -1
- package/dist/debug/web.js +0 -574
- package/dist/gateway/backup.js +0 -83
- package/dist/gateway/cli.js +0 -632
- package/dist/gateway/client.js +0 -200
- package/dist/gateway/fallback.js +0 -155
- package/dist/gateway/pidfile.js +0 -130
- package/dist/gateway/protocol.js +0 -62
- package/dist/gateway/request.js +0 -155
- package/dist/gateway/server.js +0 -397
- package/dist/gateway/tool.js +0 -72
- package/dist/gateway/web.js +0 -224
- package/dist/index.js +0 -25
- package/dist/local/client.js +0 -77
- package/dist/local/extension.js +0 -551
- package/dist/local/tui.js +0 -25
- package/dist/mcp/agent-context.js +0 -127
- package/dist/mcp/client.js +0 -332
- package/dist/mcp/commands/call.js +0 -146
- package/dist/mcp/commands/grep.js +0 -145
- package/dist/mcp/commands/info.js +0 -83
- package/dist/mcp/commands/list.js +0 -94
- package/dist/mcp/config-command.js +0 -217
- package/dist/mcp/config.js +0 -473
- package/dist/mcp/daemon-client.js +0 -266
- package/dist/mcp/daemon.js +0 -327
- package/dist/mcp/errors.js +0 -287
- package/dist/mcp/index.js +0 -431
- package/dist/mcp/output.js +0 -226
- package/dist/mcp/python-runtime.js +0 -131
- package/dist/mcp/registry.js +0 -116
- package/dist/mcp/version.js +0 -5
- package/dist/pi-packages/cli.js +0 -92
- package/dist/pi-packages/installer.js +0 -70
- package/dist/pi-packages/metadata.js +0 -231
- package/dist/pi-packages/runtime.js +0 -61
- package/dist/pi-packages/store.js +0 -175
- package/dist/pi-packages/types.js +0 -1
- package/dist/plugins/better-auth.js +0 -11
- package/dist/plugins/builtin.js +0 -478
- package/dist/plugins/chat-custom-agents.js +0 -20
- package/dist/plugins/chat-user-skills.js +0 -41
- package/dist/plugins/chat-vscode-web.js +0 -28
- package/dist/plugins/chat-web.js +0 -11
- package/dist/plugins/codex-compat.js +0 -33
- package/dist/plugins/context-files-store.js +0 -354
- package/dist/plugins/context-files.js +0 -1081
- package/dist/plugins/dev-auth.js +0 -202
- package/dist/plugins/native-tooling.js +0 -15
- package/dist/plugins/registry.js +0 -436
- package/dist/plugins/types.js +0 -1
- package/dist/plugins/web-annotations.js +0 -27
- package/dist/plugins/web.js +0 -11
- package/dist/providers/glm.js +0 -59
- package/dist/providers/minimax.js +0 -70
- package/dist/providers/openai-compat.js +0 -48
- package/dist/providers/openai-gpt56.js +0 -153
- package/dist/ralph/channel.js +0 -8
- package/dist/ralph/cli.js +0 -197
- package/dist/ralph/plugin.js +0 -14
- package/dist/ralph/service.js +0 -317
- package/dist/ralph/stopping.js +0 -151
- package/dist/ralph/store.js +0 -450
- package/dist/ralph/templates.js +0 -200
- package/dist/ralph/types.js +0 -1
- package/dist/reliability/store.js +0 -775
- package/dist/resources/cli.js +0 -135
- package/dist/resources/lifecycle.js +0 -353
- package/dist/resources/reaper-state.js +0 -94
- package/dist/resources/reaper.js +0 -145
- package/dist/runs/registry.js +0 -360
- package/dist/runs/tools.js +0 -185
- package/dist/session-ui/commandCatalog.js +0 -193
- package/dist/session-ui/commandResults.js +0 -95
- package/dist/session-ui/delegation.js +0 -89
- package/dist/session-ui/index.js +0 -8
- package/dist/session-ui/roomSessionViewModel.js +0 -69
- package/dist/session-ui/sessionActivity.js +0 -30
- package/dist/session-ui/statusViewModel.js +0 -127
- package/dist/session-ui/terminalCards.js +0 -210
- package/dist/session-ui/terminalRows.js +0 -1163
- package/dist/session-ui/terminalValue.js +0 -45
- package/dist/sessions/pibo-data-store.js +0 -178
- package/dist/sessions/sqlite-store.js +0 -220
- package/dist/sessions/store.js +0 -132
- package/dist/sessions/workflow-session-kind.js +0 -20
- package/dist/setup/cli.js +0 -619
- package/dist/shared/trace-async-agent-runs.js +0 -127
- package/dist/shared/trace-engine.js +0 -97
- package/dist/shared/trace-event-projection.js +0 -789
- package/dist/shared/trace-live-reducer.js +0 -191
- package/dist/shared/trace-nodes.js +0 -88
- package/dist/shared/trace-order.js +0 -84
- package/dist/shared/trace-page-merge.js +0 -40
- package/dist/shared/trace-patch-nodes.js +0 -83
- package/dist/shared/trace-run-notifications.js +0 -69
- package/dist/shared/trace-subagent-links.js +0 -46
- package/dist/shared/trace-transcript.js +0 -371
- package/dist/shared/trace-types.js +0 -1
- package/dist/signals/aggregate.js +0 -65
- package/dist/signals/events.js +0 -1
- package/dist/signals/projector.js +0 -208
- package/dist/signals/registry.js +0 -554
- package/dist/signals/store.js +0 -1
- package/dist/signals/types.js +0 -1
- package/dist/skills/cli.js +0 -151
- package/dist/subagents/tool.js +0 -63
- package/dist/tools/agent-browser-leases.js +0 -219
- package/dist/tools/agent-browser-wrapper.js +0 -99
- package/dist/tools/browser-pool.js +0 -623
- package/dist/tools/browser-use-cdp.js +0 -259
- package/dist/tools/browser-use-leases.js +0 -516
- package/dist/tools/browser-use-wrapper.js +0 -781
- package/dist/tools/cdp-client.js +0 -189
- package/dist/tools/codex-compat.js +0 -85
- package/dist/tools/codex-image-generation.js +0 -272
- package/dist/tools/desktop-env.js +0 -99
- package/dist/tools/guides.js +0 -563
- package/dist/tools/index.js +0 -1020
- package/dist/tools/linux-virtual-display.js +0 -58
- package/dist/tools/npm-runtime.js +0 -136
- package/dist/tools/python-runtime.js +0 -183
- package/dist/tools/registry.js +0 -237
- package/dist/tools/runtime/index.js +0 -3
- package/dist/tools/runtime/node-backend.js +0 -225
- package/dist/tools/runtime/node-worker-source.js +0 -206
- package/dist/tools/runtime/python-backend.js +0 -227
- package/dist/tools/runtime/python-worker-source.js +0 -178
- package/dist/tools/runtime/registry.js +0 -255
- package/dist/tools/runtime/tool.js +0 -168
- package/dist/tools/runtime/types.js +0 -1
- package/dist/tools/web-search.js +0 -138
- package/dist/user-skills/installer.js +0 -214
- package/dist/user-skills/manager.js +0 -133
- package/dist/user-skills/store.js +0 -267
- package/dist/user-skills/types.js +0 -1
- package/dist/vscode/cli.js +0 -90
- package/dist/vscode/code-cli.js +0 -119
- package/dist/vscode/install.js +0 -177
- package/dist/vscode/status.js +0 -80
- package/dist/vscode/types.js +0 -14
- package/dist/vscode/uninstall.js +0 -49
- package/dist/vscode/vsix-fetcher.js +0 -131
- package/dist/web/auth.js +0 -14
- package/dist/web/channel.js +0 -288
- package/dist/web/http.js +0 -195
- package/dist/web/types.js +0 -1
- package/dist/web-annotations/api.js +0 -348
- package/dist/web-annotations/attachments.js +0 -201
- package/dist/web-annotations/cdp.js +0 -1107
- package/dist/web-annotations/index.js +0 -7
- package/dist/web-annotations/store.js +0 -407
- package/dist/web-annotations/tools.js +0 -350
- package/dist/web-annotations/types.js +0 -34
- package/dist/web-annotations/validation.js +0 -288
package/dist/tools/index.js
DELETED
|
@@ -1,1020 +0,0 @@
|
|
|
1
|
-
import { spawnSync } from 'node:child_process';
|
|
2
|
-
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
import { Command } from 'commander';
|
|
5
|
-
import { ErrorCode, formatCliError } from '../cli-errors.js';
|
|
6
|
-
import { acquireAgentBrowserLease, listAgentBrowserLeases, printAgentBrowserAuthTemplateEnv, printAgentBrowserAuthTemplatePath, reapStaleAgentBrowserLeases, releaseAgentBrowserLease, } from './agent-browser-leases.js';
|
|
7
|
-
import { ensureAgentBrowserWrapper } from './agent-browser-wrapper.js';
|
|
8
|
-
import { acquireBrowserUseLease, isExpired, listBrowserUseLeases, printBrowserUseAuthTemplateEnv, printBrowserUseAuthTemplatePath, readRegistry, reapStaleBrowserUseLeases, releaseBrowserUseLease, } from './browser-use-leases.js';
|
|
9
|
-
import { formatBrowserUseTargets, listBrowserUseCdpTargets, normalizeCdpUrlSync, printAttachChatExports, selectBestChatTarget, } from './browser-use-cdp.js';
|
|
10
|
-
import { ensureBrowserUseWrapper } from './browser-use-wrapper.js';
|
|
11
|
-
import { browserPoolPaths, createEmptyBrowserPoolState, loadBrowserPoolState, reapIdleBrowserPool, } from './browser-pool.js';
|
|
12
|
-
import { detectDesktopEnv, hasDesktopDisplay } from './desktop-env.js';
|
|
13
|
-
import { doctorCliTool, findCliToolEntry, findToolGuide, getCliToolStatus, installCliTool, listCliToolEntries, removeCliTool, } from './registry.js';
|
|
14
|
-
function requireEntry(name) {
|
|
15
|
-
const entry = findCliToolEntry(name);
|
|
16
|
-
if (!entry) {
|
|
17
|
-
throw new Error(formatCliError({
|
|
18
|
-
code: ErrorCode.CLIENT_ERROR,
|
|
19
|
-
type: 'CLI_TOOL_NOT_FOUND',
|
|
20
|
-
message: `Tool "${name}" not found`,
|
|
21
|
-
details: `Available tools: ${listCliToolEntries().map((item) => item.name).join(', ')}`,
|
|
22
|
-
suggestion: 'Run pibo tools list to see curated tools.',
|
|
23
|
-
}));
|
|
24
|
-
}
|
|
25
|
-
return entry;
|
|
26
|
-
}
|
|
27
|
-
function printList(installedOnly) {
|
|
28
|
-
const rows = listCliToolEntries()
|
|
29
|
-
.map((entry) => getCliToolStatus(entry))
|
|
30
|
-
.filter((status) => !installedOnly || status.installed)
|
|
31
|
-
.map((status) => ({
|
|
32
|
-
name: status.entry.name,
|
|
33
|
-
status: status.installed ? 'installed' : 'available',
|
|
34
|
-
executable: status.installed ? status.executablePath : '',
|
|
35
|
-
description: status.entry.description,
|
|
36
|
-
}));
|
|
37
|
-
if (rows.length === 0) {
|
|
38
|
-
console.log(installedOnly ? 'No cli tools are installed.' : 'No cli tools are currently bundled.');
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
for (const row of rows) {
|
|
42
|
-
const executable = row.executable ? `\t${row.executable}` : '';
|
|
43
|
-
console.log(`${row.name}\t${row.status}\t${row.description}${executable}`);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function printShow(name) {
|
|
47
|
-
const entry = requireEntry(name);
|
|
48
|
-
const status = getCliToolStatus(entry);
|
|
49
|
-
console.log(`${entry.name}`);
|
|
50
|
-
console.log(` ${entry.description}`);
|
|
51
|
-
console.log(` kind: ${entry.kind === 'internal' ? 'built-in' : 'external'}`);
|
|
52
|
-
if (entry.runtime)
|
|
53
|
-
console.log(` package: ${entry.runtime.packageName}`);
|
|
54
|
-
console.log(` status: ${status.installed ? 'installed' : 'available'}`);
|
|
55
|
-
if (status.rootDir)
|
|
56
|
-
console.log(` runtime: ${status.rootDir}`);
|
|
57
|
-
if (status.homeDir)
|
|
58
|
-
console.log(` home: ${status.homeDir}`);
|
|
59
|
-
if (entry.name === 'browser-use') {
|
|
60
|
-
const wrapperPath = ensureBrowserUseWrapper(status);
|
|
61
|
-
console.log(` wrapper: ${wrapperPath ?? 'not generated'}`);
|
|
62
|
-
console.log(` executable: ${status.executablePath}`);
|
|
63
|
-
console.log('');
|
|
64
|
-
console.log(' IMPORTANT: Always use the wrapper path above, not the raw executable.');
|
|
65
|
-
console.log(' The wrapper manages persistent Chrome profiles and CDP automatically.');
|
|
66
|
-
}
|
|
67
|
-
else if (entry.name === 'agent-browser') {
|
|
68
|
-
const wrapperPath = ensureAgentBrowserWrapper(status);
|
|
69
|
-
console.log(` wrapper: ${wrapperPath ?? 'not generated'}`);
|
|
70
|
-
console.log(` executable: ${status.executablePath}`);
|
|
71
|
-
console.log('');
|
|
72
|
-
console.log(' IMPORTANT: Always use the wrapper path above, not the raw executable.');
|
|
73
|
-
console.log(' The wrapper keeps Agent Browser state under the Pibo tool home.');
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
console.log(` executable: ${status.executablePath}`);
|
|
77
|
-
}
|
|
78
|
-
console.log('');
|
|
79
|
-
console.log('Guides:');
|
|
80
|
-
for (const guide of entry.guides) {
|
|
81
|
-
console.log(` ${guide.name}\t${guide.description}`);
|
|
82
|
-
}
|
|
83
|
-
if (entry.notes.length > 0) {
|
|
84
|
-
console.log('');
|
|
85
|
-
console.log('Notes:');
|
|
86
|
-
for (const note of entry.notes)
|
|
87
|
-
console.log(` - ${note}`);
|
|
88
|
-
}
|
|
89
|
-
console.log('');
|
|
90
|
-
console.log('Next:');
|
|
91
|
-
if (entry.kind !== 'internal')
|
|
92
|
-
console.log(` pibo tools env ${entry.name}`);
|
|
93
|
-
console.log(` pibo tools guide ${entry.name} ${entry.guides[0]?.name ?? ''}`.trimEnd());
|
|
94
|
-
if (entry.name === 'browser-use') {
|
|
95
|
-
console.log(' pibo tools browser-use');
|
|
96
|
-
}
|
|
97
|
-
if (entry.name === 'agent-browser') {
|
|
98
|
-
console.log(' pibo tools agent-browser');
|
|
99
|
-
}
|
|
100
|
-
if (entry.name === 'ralph') {
|
|
101
|
-
console.log(' pibo tools ralph');
|
|
102
|
-
console.log(' pibo ralph templates');
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
function printGuides(name) {
|
|
106
|
-
const entry = requireEntry(name);
|
|
107
|
-
for (const guide of entry.guides) {
|
|
108
|
-
console.log(`${guide.name}\t${guide.description}`);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function printGuide(name, guideName) {
|
|
112
|
-
const entry = requireEntry(name);
|
|
113
|
-
const selectedGuideName = guideName ?? entry.guides[0]?.name;
|
|
114
|
-
if (!selectedGuideName) {
|
|
115
|
-
throw new Error(formatCliError({
|
|
116
|
-
code: ErrorCode.CLIENT_ERROR,
|
|
117
|
-
type: 'CLI_TOOL_GUIDE_NOT_FOUND',
|
|
118
|
-
message: `Tool "${name}" has no guides`,
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
const guide = findToolGuide(entry, selectedGuideName);
|
|
122
|
-
if (!guide) {
|
|
123
|
-
throw new Error(formatCliError({
|
|
124
|
-
code: ErrorCode.CLIENT_ERROR,
|
|
125
|
-
type: 'CLI_TOOL_GUIDE_NOT_FOUND',
|
|
126
|
-
message: `Guide "${selectedGuideName}" not found for tool "${name}"`,
|
|
127
|
-
details: `Available guides: ${entry.guides.map((item) => item.name).join(', ')}`,
|
|
128
|
-
}));
|
|
129
|
-
}
|
|
130
|
-
console.log(guide.content);
|
|
131
|
-
}
|
|
132
|
-
function printPath(name) {
|
|
133
|
-
const entry = requireEntry(name);
|
|
134
|
-
const status = getCliToolStatus(entry);
|
|
135
|
-
if (entry.name === 'browser-use') {
|
|
136
|
-
const wrapperPath = ensureBrowserUseWrapper(status);
|
|
137
|
-
if (wrapperPath) {
|
|
138
|
-
console.log(wrapperPath);
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
if (entry.name === 'agent-browser') {
|
|
143
|
-
const wrapperPath = ensureAgentBrowserWrapper(status);
|
|
144
|
-
if (wrapperPath) {
|
|
145
|
-
console.log(wrapperPath);
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
console.log(status.executablePath);
|
|
150
|
-
}
|
|
151
|
-
function printEnv(name) {
|
|
152
|
-
const entry = requireEntry(name);
|
|
153
|
-
const status = getCliToolStatus(entry);
|
|
154
|
-
const desktop = detectDesktopEnv();
|
|
155
|
-
if (entry.kind === 'internal') {
|
|
156
|
-
console.log(`# ${entry.name} is built into pibo; no extra environment is required.`);
|
|
157
|
-
console.log(`# Run: pibo ${entry.name} --help`);
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
if (!entry.runtime)
|
|
161
|
-
throw new Error(`CLI tool "${entry.name}" is missing runtime`);
|
|
162
|
-
if (process.platform === 'win32') {
|
|
163
|
-
console.log(`$env:PATH = "${status.executablePath.replace(/\\[^\\]+$/, '')};$env:PATH"`);
|
|
164
|
-
if (entry.runtime.homeEnvVar)
|
|
165
|
-
console.log(`$env:${entry.runtime.homeEnvVar} = "${status.homeDir}"`);
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
const binDir = status.executablePath.replace(/\/[^/]+$/, '');
|
|
169
|
-
const wrapperPath = entry.name === 'browser-use'
|
|
170
|
-
? ensureBrowserUseWrapper(status)
|
|
171
|
-
: entry.name === 'agent-browser'
|
|
172
|
-
? ensureAgentBrowserWrapper(status)
|
|
173
|
-
: undefined;
|
|
174
|
-
const envBinDirs = wrapperPath ? `${wrapperPath.replace(/\/[^/]+$/, '')}:${binDir}` : binDir;
|
|
175
|
-
console.log(`export PATH="${envBinDirs}:$PATH"`);
|
|
176
|
-
if (entry.runtime.homeEnvVar)
|
|
177
|
-
console.log(`export ${entry.runtime.homeEnvVar}="${status.homeDir}"`);
|
|
178
|
-
if (desktop.display)
|
|
179
|
-
console.log(`export DISPLAY="${desktop.display}"`);
|
|
180
|
-
if (desktop.waylandDisplay)
|
|
181
|
-
console.log(`export WAYLAND_DISPLAY="${desktop.waylandDisplay}"`);
|
|
182
|
-
if (desktop.xauthority)
|
|
183
|
-
console.log(`export XAUTHORITY="${desktop.xauthority}"`);
|
|
184
|
-
if (desktop.xdgRuntimeDir)
|
|
185
|
-
console.log(`export XDG_RUNTIME_DIR="${desktop.xdgRuntimeDir}"`);
|
|
186
|
-
if (desktop.dbusSessionBusAddress) {
|
|
187
|
-
console.log(`export DBUS_SESSION_BUS_ADDRESS="${desktop.dbusSessionBusAddress}"`);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
function parsePositiveInteger(value) {
|
|
191
|
-
const parsed = Number.parseInt(value, 10);
|
|
192
|
-
if (!Number.isFinite(parsed) || parsed < 1) {
|
|
193
|
-
throw new Error(`Expected a positive integer, got "${value}"`);
|
|
194
|
-
}
|
|
195
|
-
return parsed;
|
|
196
|
-
}
|
|
197
|
-
function parseNonNegativeInteger(value) {
|
|
198
|
-
const parsed = Number.parseInt(value, 10);
|
|
199
|
-
if (!Number.isFinite(parsed) || parsed < 0) {
|
|
200
|
-
throw new Error(`Expected a non-negative integer, got "${value}"`);
|
|
201
|
-
}
|
|
202
|
-
return parsed;
|
|
203
|
-
}
|
|
204
|
-
function printBrowserUseDiscovery() {
|
|
205
|
-
console.log(`pibo tools browser-use - browser-use helpers
|
|
206
|
-
|
|
207
|
-
Start:
|
|
208
|
-
eval "$(pibo tools env browser-use)"
|
|
209
|
-
|
|
210
|
-
Commands:
|
|
211
|
-
targets List Chrome CDP targets with Chat auth hints
|
|
212
|
-
attach-chat Export the best existing authenticated Chat target
|
|
213
|
-
auth-template path Print the default authenticated template profile path
|
|
214
|
-
auth-template env Print shell exports for preparing the auth template profile
|
|
215
|
-
lease acquire Acquire an isolated authenticated browser slot
|
|
216
|
-
lease list List authenticated browser slots
|
|
217
|
-
lease release <id> Release one browser slot
|
|
218
|
-
lease reap-stale Release expired or dead browser slots
|
|
219
|
-
pool status Show read-only managed browser-pool status
|
|
220
|
-
pool reap Reap an idle managed browser pool
|
|
221
|
-
health Check browser-use health and report issues
|
|
222
|
-
|
|
223
|
-
Next:
|
|
224
|
-
pibo tools show browser-use
|
|
225
|
-
pibo tools guide browser-use browser-use
|
|
226
|
-
pibo tools browser-use targets
|
|
227
|
-
pibo tools browser-use auth-template env
|
|
228
|
-
pibo tools browser-use lease acquire
|
|
229
|
-
pibo tools browser-use pool status
|
|
230
|
-
pibo tools browser-use pool reap --json`);
|
|
231
|
-
}
|
|
232
|
-
function getBrowserPoolStatusIdentity(options) {
|
|
233
|
-
return {
|
|
234
|
-
workerId: options.workerId || process.env.PIBO_BROWSER_POOL_WORKER_ID || process.env.PIBO_COMPUTE_WORKER_ID || process.env.HOSTNAME || 'local',
|
|
235
|
-
poolId: options.poolId || process.env.PIBO_BROWSER_POOL_ID || 'default',
|
|
236
|
-
maxBrowserProcesses: parsePositiveInteger(process.env.PIBO_BROWSER_POOL_MAX_PROCESSES || '1'),
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
function getBrowserPoolRoot(status, options) {
|
|
240
|
-
return options.root || process.env.PIBO_BROWSER_POOL_ROOT || join(process.env.BROWSER_USE_HOME || status.homeDir, 'pibo-browser-pool');
|
|
241
|
-
}
|
|
242
|
-
function browserPoolStatusNextCommands(state) {
|
|
243
|
-
if (state.state === 'stale' || state.state === 'dirty') {
|
|
244
|
-
return [
|
|
245
|
-
'pibo tools browser-use pool status --json',
|
|
246
|
-
'pibo tools browser-use pool reap --json',
|
|
247
|
-
'pibo tools browser-use health',
|
|
248
|
-
'eval "$(pibo tools env browser-use)" && browser-use --pibo-ensure-chrome',
|
|
249
|
-
];
|
|
250
|
-
}
|
|
251
|
-
if (state.state === 'empty') {
|
|
252
|
-
return ['eval "$(pibo tools env browser-use)" && browser-use --pibo-ensure-chrome'];
|
|
253
|
-
}
|
|
254
|
-
return ['pibo tools browser-use pool status --json'];
|
|
255
|
-
}
|
|
256
|
-
async function getBrowserPoolStatus(status, options) {
|
|
257
|
-
const identity = getBrowserPoolStatusIdentity(options);
|
|
258
|
-
const rootDir = getBrowserPoolRoot(status, options);
|
|
259
|
-
const paths = browserPoolPaths(rootDir, identity);
|
|
260
|
-
const stateFileExists = existsSync(paths.statePath);
|
|
261
|
-
let state = await loadBrowserPoolState(paths.statePath, { ...identity, onMissing: 'empty', onMalformed: 'empty' });
|
|
262
|
-
if (!stateFileExists && state.state === 'empty')
|
|
263
|
-
state = createEmptyBrowserPoolState(identity);
|
|
264
|
-
const staleReason = state.state === 'stale' ? state.lastError || 'Recorded browser is stale' : undefined;
|
|
265
|
-
const dirtyReason = state.state === 'dirty' ? state.lastError || 'Browser pool state is dirty' : undefined;
|
|
266
|
-
return {
|
|
267
|
-
...state,
|
|
268
|
-
rootDir,
|
|
269
|
-
statePath: paths.statePath,
|
|
270
|
-
lockPath: paths.lockPath,
|
|
271
|
-
stateFileExists,
|
|
272
|
-
readOnly: true,
|
|
273
|
-
staleReason,
|
|
274
|
-
dirtyReason,
|
|
275
|
-
nextCommands: browserPoolStatusNextCommands(state),
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
function printBrowserPoolStatusText(result) {
|
|
279
|
-
const stateLabel = result.state === 'ready' ? 'ready (idle)' : result.state;
|
|
280
|
-
console.log(`browser pool status: ${stateLabel}`);
|
|
281
|
-
console.log(` worker id: ${result.workerId}`);
|
|
282
|
-
console.log(` pool id: ${result.poolId}`);
|
|
283
|
-
console.log(` max browser processes: ${result.maxBrowserProcesses}`);
|
|
284
|
-
console.log(` pid: ${result.pid ?? '-'}`);
|
|
285
|
-
console.log(` process group id: ${result.processGroupId ?? '-'}`);
|
|
286
|
-
console.log(` CDP URL: ${result.cdpUrl ?? '-'}`);
|
|
287
|
-
console.log(` CDP port: ${result.cdpPort ?? '-'}`);
|
|
288
|
-
console.log(` user-data dir: ${result.userDataDir ?? '-'}`);
|
|
289
|
-
console.log(` active lease id: ${result.activeLeaseId ?? '-'}`);
|
|
290
|
-
console.log(` holder: ${result.holder ?? '-'}`);
|
|
291
|
-
console.log(` last used at: ${result.lastUsedAt ?? '-'}`);
|
|
292
|
-
console.log(` idle expiry: ${result.idleExpiresAt ?? '-'}`);
|
|
293
|
-
console.log(` root: ${result.rootDir}`);
|
|
294
|
-
console.log(` state file: ${result.stateFileExists ? result.statePath : `${result.statePath} (missing)`}`);
|
|
295
|
-
if (result.staleReason || result.dirtyReason || result.lastError) {
|
|
296
|
-
console.log(` stale/dirty reason: ${result.staleReason || result.dirtyReason || result.lastError}`);
|
|
297
|
-
}
|
|
298
|
-
if (result.state === 'stale' || result.state === 'dirty') {
|
|
299
|
-
console.log('');
|
|
300
|
-
console.log('Next:');
|
|
301
|
-
for (const command of result.nextCommands)
|
|
302
|
-
console.log(` ${command}`);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
async function printBrowserPoolStatus(status, options) {
|
|
306
|
-
const result = await getBrowserPoolStatus(status, options);
|
|
307
|
-
if (options.json) {
|
|
308
|
-
console.log(JSON.stringify(result, null, 2));
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
printBrowserPoolStatusText(result);
|
|
312
|
-
}
|
|
313
|
-
function browserPoolReapNextCommands(result) {
|
|
314
|
-
if (result.cleanupStatus === 'failed' || result.state.state === 'dirty') {
|
|
315
|
-
return [
|
|
316
|
-
'pibo tools browser-use pool status --json',
|
|
317
|
-
'pibo tools browser-use health',
|
|
318
|
-
'pibo tools browser-use pool reap --json',
|
|
319
|
-
];
|
|
320
|
-
}
|
|
321
|
-
return ['pibo tools browser-use pool status --json'];
|
|
322
|
-
}
|
|
323
|
-
async function getBrowserPoolReap(status, options) {
|
|
324
|
-
const identity = getBrowserPoolStatusIdentity(options);
|
|
325
|
-
const rootDir = getBrowserPoolRoot(status, options);
|
|
326
|
-
const paths = browserPoolPaths(rootDir, identity);
|
|
327
|
-
const missingState = !existsSync(paths.statePath);
|
|
328
|
-
const result = missingState
|
|
329
|
-
? {
|
|
330
|
-
reaped: false,
|
|
331
|
-
eligible: false,
|
|
332
|
-
reason: 'Browser pool has no recorded browser to reap',
|
|
333
|
-
affectedLeases: 0,
|
|
334
|
-
affectedBrowserPools: 0,
|
|
335
|
-
terminatedProcessTrees: 0,
|
|
336
|
-
staleStateFiles: 0,
|
|
337
|
-
cleanupStatus: 'skipped',
|
|
338
|
-
lastError: 'Browser pool has no recorded browser to reap',
|
|
339
|
-
state: createEmptyBrowserPoolState(identity),
|
|
340
|
-
}
|
|
341
|
-
: await reapIdleBrowserPool(paths, identity, { idleTimeoutMs: options.idleTimeoutMs });
|
|
342
|
-
return {
|
|
343
|
-
rootDir,
|
|
344
|
-
statePath: paths.statePath,
|
|
345
|
-
lockPath: paths.lockPath,
|
|
346
|
-
counts: {
|
|
347
|
-
affectedLeases: result.affectedLeases,
|
|
348
|
-
affectedBrowserPools: result.affectedBrowserPools,
|
|
349
|
-
terminatedProcessTrees: result.terminatedProcessTrees,
|
|
350
|
-
staleStateFiles: result.staleStateFiles,
|
|
351
|
-
},
|
|
352
|
-
pools: [{
|
|
353
|
-
workerId: result.state.workerId,
|
|
354
|
-
poolId: result.state.poolId,
|
|
355
|
-
reaped: result.reaped,
|
|
356
|
-
eligible: result.eligible,
|
|
357
|
-
reason: result.reason,
|
|
358
|
-
cleanupStatus: result.cleanupStatus,
|
|
359
|
-
lastError: result.lastError,
|
|
360
|
-
state: result.state,
|
|
361
|
-
terminatedProcessTrees: result.terminatedProcessTrees,
|
|
362
|
-
staleStateFiles: result.staleStateFiles,
|
|
363
|
-
affectedLeases: result.affectedLeases,
|
|
364
|
-
}],
|
|
365
|
-
nextCommands: browserPoolReapNextCommands(result),
|
|
366
|
-
};
|
|
367
|
-
}
|
|
368
|
-
function printBrowserPoolReapText(result) {
|
|
369
|
-
const pool = result.pools[0];
|
|
370
|
-
const label = pool.cleanupStatus === 'failed' ? 'failed' : pool.reaped ? 'success' : 'no-op';
|
|
371
|
-
console.log(`browser pool reap: ${label}`);
|
|
372
|
-
console.log(` worker id: ${pool.workerId}`);
|
|
373
|
-
console.log(` pool id: ${pool.poolId}`);
|
|
374
|
-
console.log(` reason: ${pool.reason ?? '-'}`);
|
|
375
|
-
console.log(` cleanup status: ${pool.cleanupStatus}`);
|
|
376
|
-
console.log(` affected leases: ${result.counts.affectedLeases}`);
|
|
377
|
-
console.log(` affected browser pools: ${result.counts.affectedBrowserPools}`);
|
|
378
|
-
console.log(` terminated process trees: ${result.counts.terminatedProcessTrees}`);
|
|
379
|
-
console.log(` stale state files: ${result.counts.staleStateFiles}`);
|
|
380
|
-
console.log(` state file: ${result.statePath}`);
|
|
381
|
-
if (pool.lastError)
|
|
382
|
-
console.log(` error: ${pool.lastError}`);
|
|
383
|
-
if (pool.cleanupStatus === 'failed' || pool.state.state === 'dirty') {
|
|
384
|
-
console.log('');
|
|
385
|
-
console.log('Next:');
|
|
386
|
-
for (const command of result.nextCommands)
|
|
387
|
-
console.log(` ${command}`);
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
async function printBrowserPoolReap(status, options) {
|
|
391
|
-
const result = await getBrowserPoolReap(status, options);
|
|
392
|
-
if (options.json) {
|
|
393
|
-
console.log(JSON.stringify(result, null, 2));
|
|
394
|
-
return;
|
|
395
|
-
}
|
|
396
|
-
printBrowserPoolReapText(result);
|
|
397
|
-
}
|
|
398
|
-
function findChromeBinary() {
|
|
399
|
-
if (process.env.AGENT_BROWSER_EXECUTABLE_PATH && existsSync(process.env.AGENT_BROWSER_EXECUTABLE_PATH)) {
|
|
400
|
-
return process.env.AGENT_BROWSER_EXECUTABLE_PATH;
|
|
401
|
-
}
|
|
402
|
-
if (process.env.PIBO_BROWSER_USE_CHROME && existsSync(process.env.PIBO_BROWSER_USE_CHROME)) {
|
|
403
|
-
return process.env.PIBO_BROWSER_USE_CHROME;
|
|
404
|
-
}
|
|
405
|
-
const candidates = ['google-chrome', 'chromium', 'chromium-browser', 'chrome'];
|
|
406
|
-
for (const name of candidates) {
|
|
407
|
-
const result = spawnSync('command', ['-v', name], { shell: true, encoding: 'utf-8' });
|
|
408
|
-
if (result.status === 0 && result.stdout.trim()) {
|
|
409
|
-
return result.stdout.trim();
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
return undefined;
|
|
413
|
-
}
|
|
414
|
-
function checkStaleCdpState(homeDir) {
|
|
415
|
-
const stateDir = join(homeDir, 'pibo-cdp');
|
|
416
|
-
if (!existsSync(stateDir))
|
|
417
|
-
return { stalePids: 0, stalePorts: 0, details: [] };
|
|
418
|
-
let stalePids = 0;
|
|
419
|
-
let stalePorts = 0;
|
|
420
|
-
const details = [];
|
|
421
|
-
for (const file of readdirSync(stateDir)) {
|
|
422
|
-
if (file.endsWith('.pid')) {
|
|
423
|
-
const pidPath = join(stateDir, file);
|
|
424
|
-
const text = readFileSync(pidPath, 'utf-8').trim();
|
|
425
|
-
const pid = Number.parseInt(text, 10);
|
|
426
|
-
let isDead = false;
|
|
427
|
-
if (!Number.isFinite(pid) || pid <= 0) {
|
|
428
|
-
isDead = true;
|
|
429
|
-
}
|
|
430
|
-
else {
|
|
431
|
-
try {
|
|
432
|
-
process.kill(pid, 0);
|
|
433
|
-
}
|
|
434
|
-
catch {
|
|
435
|
-
isDead = true;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
if (isDead) {
|
|
439
|
-
stalePids += 1;
|
|
440
|
-
details.push(`stale pid file: ${file}`);
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
else if (file.endsWith('.port')) {
|
|
444
|
-
const base = file.slice(0, -5);
|
|
445
|
-
const pidPath = join(stateDir, `${base}.pid`);
|
|
446
|
-
if (!existsSync(pidPath)) {
|
|
447
|
-
stalePorts += 1;
|
|
448
|
-
details.push(`orphan port file: ${file}`);
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
return { stalePids, stalePorts, details };
|
|
453
|
-
}
|
|
454
|
-
async function printAgentBrowserHealth(status, json = false) {
|
|
455
|
-
const wrapperPath = join(status.homeDir, 'bin', 'agent-browser');
|
|
456
|
-
const wrapperExists = existsSync(wrapperPath);
|
|
457
|
-
const npmExecutableExists = existsSync(status.executablePath);
|
|
458
|
-
const chromePath = findChromeBinary();
|
|
459
|
-
const desktop = detectDesktopEnv();
|
|
460
|
-
const hasDisplay = hasDesktopDisplay(desktop);
|
|
461
|
-
const nodeVersion = spawnSync('node', ['--version'], { encoding: 'utf-8' });
|
|
462
|
-
const npmVersion = spawnSync('npm', ['--version'], { encoding: 'utf-8' });
|
|
463
|
-
const packageJsonPath = join(status.rootDir, 'node', 'node_modules', 'agent-browser', 'package.json');
|
|
464
|
-
let packageVersion;
|
|
465
|
-
try {
|
|
466
|
-
packageVersion = JSON.parse(readFileSync(packageJsonPath, 'utf-8')).version;
|
|
467
|
-
}
|
|
468
|
-
catch {
|
|
469
|
-
packageVersion = undefined;
|
|
470
|
-
}
|
|
471
|
-
const staleState = checkStaleCdpState(status.homeDir);
|
|
472
|
-
const overall = !wrapperExists || !npmExecutableExists ? 'critical' : staleState.stalePids > 0 || staleState.stalePorts > 0 ? 'degraded' : 'ok';
|
|
473
|
-
const result = {
|
|
474
|
-
overall,
|
|
475
|
-
wrapper: { exists: wrapperExists, path: wrapperPath },
|
|
476
|
-
npmRuntime: { executable: npmExecutableExists, path: status.executablePath, packageVersion },
|
|
477
|
-
node: { ok: nodeVersion.status === 0, version: nodeVersion.stdout.trim() },
|
|
478
|
-
npm: { ok: npmVersion.status === 0, version: npmVersion.stdout.trim() },
|
|
479
|
-
chrome: { found: Boolean(chromePath), path: chromePath },
|
|
480
|
-
display: { available: hasDisplay, display: desktop.display, waylandDisplay: desktop.waylandDisplay },
|
|
481
|
-
staleState: { pidFiles: staleState.stalePids, portFiles: staleState.stalePorts, details: staleState.details },
|
|
482
|
-
nextCommands: ['pibo tools install agent-browser', 'eval "$(pibo tools env agent-browser)"', 'agent-browser doctor --offline --quick'],
|
|
483
|
-
};
|
|
484
|
-
if (json) {
|
|
485
|
-
console.log(JSON.stringify(result, null, 2));
|
|
486
|
-
return;
|
|
487
|
-
}
|
|
488
|
-
console.log(`agent-browser health: ${overall}`);
|
|
489
|
-
console.log(` wrapper: ${wrapperExists ? 'ok' : 'MISSING'} (${wrapperPath})`);
|
|
490
|
-
console.log(` executable: ${npmExecutableExists ? 'ok' : 'MISSING'} (${status.executablePath})`);
|
|
491
|
-
console.log(` package version: ${packageVersion ?? 'unknown'}`);
|
|
492
|
-
console.log(` node: ${nodeVersion.status === 0 ? nodeVersion.stdout.trim() : 'missing'}`);
|
|
493
|
-
console.log(` npm: ${npmVersion.status === 0 ? npmVersion.stdout.trim() : 'missing'}`);
|
|
494
|
-
console.log(` chrome: ${chromePath ? `ok (${chromePath})` : 'not found; upstream install may be needed'}`);
|
|
495
|
-
console.log(` display: ${hasDisplay ? 'available' : 'none'} (${desktop.display || 'no DISPLAY'})`);
|
|
496
|
-
console.log(` stale state: ${staleState.stalePids} stale pid files, ${staleState.stalePorts} orphan port files`);
|
|
497
|
-
if (overall !== 'ok') {
|
|
498
|
-
console.log('');
|
|
499
|
-
console.log('Suggestions:');
|
|
500
|
-
if (!wrapperExists || !npmExecutableExists)
|
|
501
|
-
console.log(' Run: pibo tools install agent-browser');
|
|
502
|
-
if (!chromePath)
|
|
503
|
-
console.log(' Install Chrome/Chromium or run: agent-browser install');
|
|
504
|
-
if (staleState.stalePids > 0 || staleState.stalePorts > 0)
|
|
505
|
-
console.log(' Inspect and release stale sessions before deleting state.');
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
async function printAgentBrowserSessions(status, json = false) {
|
|
509
|
-
const wrapperPath = ensureAgentBrowserWrapper(status) || status.executablePath;
|
|
510
|
-
if (!existsSync(status.executablePath)) {
|
|
511
|
-
const result = { sessions: [], installed: false, nextCommands: ['pibo tools install agent-browser'] };
|
|
512
|
-
console.log(json ? JSON.stringify(result, null, 2) : 'agent-browser is not installed. Run: pibo tools install agent-browser');
|
|
513
|
-
return;
|
|
514
|
-
}
|
|
515
|
-
const result = spawnSync(wrapperPath, ['session', 'list'], {
|
|
516
|
-
encoding: 'utf-8',
|
|
517
|
-
env: { ...process.env, AGENT_BROWSER_HOME: status.homeDir },
|
|
518
|
-
});
|
|
519
|
-
if (json) {
|
|
520
|
-
console.log(JSON.stringify({ installed: true, ok: result.status === 0, stdout: result.stdout, stderr: result.stderr }, null, 2));
|
|
521
|
-
return;
|
|
522
|
-
}
|
|
523
|
-
if (result.stdout.trim())
|
|
524
|
-
console.log(result.stdout.trimEnd());
|
|
525
|
-
if (result.status !== 0 && result.stderr.trim())
|
|
526
|
-
console.error(result.stderr.trimEnd());
|
|
527
|
-
}
|
|
528
|
-
async function printBrowserUseHealth(status, json = false) {
|
|
529
|
-
const wrapperPath = join(status.homeDir, 'bin', 'browser-use');
|
|
530
|
-
const wrapperExists = existsSync(wrapperPath);
|
|
531
|
-
const chromePath = findChromeBinary();
|
|
532
|
-
const desktop = detectDesktopEnv();
|
|
533
|
-
const hasDisplay = hasDesktopDisplay(desktop);
|
|
534
|
-
const staleState = checkStaleCdpState(status.homeDir);
|
|
535
|
-
let expiredLeases = 0;
|
|
536
|
-
try {
|
|
537
|
-
const registry = readRegistry(status);
|
|
538
|
-
for (const lease of registry.leases) {
|
|
539
|
-
if (lease.status === 'active' && isExpired(lease))
|
|
540
|
-
expiredLeases++;
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
catch {
|
|
544
|
-
// ignore registry read errors
|
|
545
|
-
}
|
|
546
|
-
const overall = !wrapperExists || !chromePath ? 'critical' : staleState.stalePids > 0 || staleState.stalePorts > 0 || expiredLeases > 0 ? 'degraded' : 'ok';
|
|
547
|
-
const result = {
|
|
548
|
-
overall,
|
|
549
|
-
wrapper: { exists: wrapperExists, path: wrapperPath },
|
|
550
|
-
chrome: { found: Boolean(chromePath), path: chromePath },
|
|
551
|
-
display: { available: hasDisplay, display: desktop.display, waylandDisplay: desktop.waylandDisplay },
|
|
552
|
-
staleState: { pidFiles: staleState.stalePids, portFiles: staleState.stalePorts, details: staleState.details },
|
|
553
|
-
leases: { expired: expiredLeases },
|
|
554
|
-
};
|
|
555
|
-
if (json) {
|
|
556
|
-
console.log(JSON.stringify(result, null, 2));
|
|
557
|
-
return;
|
|
558
|
-
}
|
|
559
|
-
console.log(`browser-use health: ${overall}`);
|
|
560
|
-
console.log(` wrapper: ${wrapperExists ? 'ok' : 'MISSING'} (${wrapperPath})`);
|
|
561
|
-
console.log(` chrome: ${chromePath ? `ok (${chromePath})` : 'NOT FOUND'}`);
|
|
562
|
-
console.log(` display: ${hasDisplay ? 'available' : 'none'} (${desktop.display || 'no DISPLAY'})`);
|
|
563
|
-
console.log(` stale state: ${staleState.stalePids} stale pid files, ${staleState.stalePorts} orphan port files`);
|
|
564
|
-
console.log(` leases: ${expiredLeases} expired`);
|
|
565
|
-
if (overall !== 'ok') {
|
|
566
|
-
console.log('');
|
|
567
|
-
console.log('Suggestions:');
|
|
568
|
-
if (!wrapperExists)
|
|
569
|
-
console.log(' Run: pibo tools install browser-use');
|
|
570
|
-
if (!chromePath)
|
|
571
|
-
console.log(' Install Chrome/Chromium (e.g. apt install chromium)');
|
|
572
|
-
if (staleState.stalePids > 0 || staleState.stalePorts > 0) {
|
|
573
|
-
console.log(' Clean stale state: pibo tools browser-use lease reap-stale');
|
|
574
|
-
}
|
|
575
|
-
if (expiredLeases > 0)
|
|
576
|
-
console.log(' Reap expired leases: pibo tools browser-use lease reap-stale');
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
function printAgentBrowserDiscovery() {
|
|
580
|
-
console.log(`pibo tools agent-browser - Agent Browser helpers
|
|
581
|
-
|
|
582
|
-
Start:
|
|
583
|
-
eval "$(pibo tools env agent-browser)"
|
|
584
|
-
|
|
585
|
-
Commands:
|
|
586
|
-
health Check Agent Browser health and report issues
|
|
587
|
-
sessions List upstream Agent Browser sessions
|
|
588
|
-
targets List Chrome CDP targets with Chat auth hints
|
|
589
|
-
attach-chat Export the best existing authenticated Chat target
|
|
590
|
-
auth-template path Print the default authenticated template profile path
|
|
591
|
-
auth-template env Print shell exports for preparing the auth template profile
|
|
592
|
-
lease acquire Acquire an isolated authenticated browser slot
|
|
593
|
-
lease list List authenticated browser slots
|
|
594
|
-
lease release <id> Release one browser slot
|
|
595
|
-
lease reap-stale Release expired browser slots
|
|
596
|
-
|
|
597
|
-
Next:
|
|
598
|
-
pibo tools show agent-browser
|
|
599
|
-
pibo tools guide agent-browser agent-browser
|
|
600
|
-
pibo tools agent-browser health
|
|
601
|
-
pibo tools agent-browser lease acquire`);
|
|
602
|
-
}
|
|
603
|
-
function printRalphDiscovery() {
|
|
604
|
-
console.log(`pibo tools ralph - Ralph job helpers
|
|
605
|
-
|
|
606
|
-
Commands:
|
|
607
|
-
pibo ralph templates --json
|
|
608
|
-
pibo ralph add --template <id> --room <room-id> --start --json
|
|
609
|
-
pibo ralph list --all --json
|
|
610
|
-
pibo ralph runs --job <job-id> --json
|
|
611
|
-
pibo ralph stop <job-id>
|
|
612
|
-
pibo ralph cancel <job-id>
|
|
613
|
-
|
|
614
|
-
Next:
|
|
615
|
-
pibo tools guide ralph ralph
|
|
616
|
-
pibo ralph templates`);
|
|
617
|
-
}
|
|
618
|
-
function printToolsDiscovery() {
|
|
619
|
-
console.log(`pibo tools - curated CLI tools
|
|
620
|
-
|
|
621
|
-
Commands:
|
|
622
|
-
list List curated tools
|
|
623
|
-
installed List installed tools
|
|
624
|
-
show <name> Show one tool
|
|
625
|
-
install <name> Install one tool
|
|
626
|
-
doctor <name> Check one tool
|
|
627
|
-
guides <name> List tool guides
|
|
628
|
-
guide <name> [guide] Print one guide
|
|
629
|
-
path <name> Print executable path
|
|
630
|
-
env <name> Print shell exports
|
|
631
|
-
browser-use Browser-use auth slots and helper commands
|
|
632
|
-
agent-browser Agent Browser sessions, targets, and auth slots
|
|
633
|
-
ralph Ralph job helper commands
|
|
634
|
-
|
|
635
|
-
Next:
|
|
636
|
-
pibo tools list`);
|
|
637
|
-
}
|
|
638
|
-
export async function runToolsCli(argv = process.argv) {
|
|
639
|
-
if (argv[2] === '--help' || argv[2] === '-h') {
|
|
640
|
-
printToolsDiscovery();
|
|
641
|
-
return;
|
|
642
|
-
}
|
|
643
|
-
const program = new Command();
|
|
644
|
-
program
|
|
645
|
-
.name('pibo tools')
|
|
646
|
-
.description('Install and inspect curated external CLI tools')
|
|
647
|
-
.helpOption(false)
|
|
648
|
-
.showHelpAfterError();
|
|
649
|
-
program
|
|
650
|
-
.command('list')
|
|
651
|
-
.description('List curated CLI tools')
|
|
652
|
-
.action(() => printList(false));
|
|
653
|
-
program
|
|
654
|
-
.command('installed')
|
|
655
|
-
.description('List installed CLI tools')
|
|
656
|
-
.action(() => printList(true));
|
|
657
|
-
program
|
|
658
|
-
.command('show')
|
|
659
|
-
.argument('<name>')
|
|
660
|
-
.description('Show one CLI tool preset')
|
|
661
|
-
.action(printShow);
|
|
662
|
-
program
|
|
663
|
-
.command('install')
|
|
664
|
-
.argument('<name>')
|
|
665
|
-
.option('--no-setup', 'Only print install target without installing runtime')
|
|
666
|
-
.description('Install a CLI tool')
|
|
667
|
-
.action(async (name, options) => {
|
|
668
|
-
await installCliTool(requireEntry(name), options.setup !== false);
|
|
669
|
-
});
|
|
670
|
-
program
|
|
671
|
-
.command('remove')
|
|
672
|
-
.argument('<name>')
|
|
673
|
-
.description('Remove an installed CLI tool runtime')
|
|
674
|
-
.action(async (name) => {
|
|
675
|
-
await removeCliTool(requireEntry(name));
|
|
676
|
-
});
|
|
677
|
-
program
|
|
678
|
-
.command('doctor')
|
|
679
|
-
.argument('<name>')
|
|
680
|
-
.description('Check tool prerequisites and runtime state')
|
|
681
|
-
.action(async (name) => {
|
|
682
|
-
await doctorCliTool(requireEntry(name));
|
|
683
|
-
});
|
|
684
|
-
program
|
|
685
|
-
.command('guides')
|
|
686
|
-
.argument('<name>')
|
|
687
|
-
.description('List guides for a CLI tool')
|
|
688
|
-
.action(printGuides);
|
|
689
|
-
program
|
|
690
|
-
.command('guide')
|
|
691
|
-
.argument('<name>')
|
|
692
|
-
.argument('[guide]')
|
|
693
|
-
.description('Print a CLI tool guide')
|
|
694
|
-
.action(printGuide);
|
|
695
|
-
program
|
|
696
|
-
.command('path')
|
|
697
|
-
.argument('<name>')
|
|
698
|
-
.description('Print the installed tool executable path')
|
|
699
|
-
.action(printPath);
|
|
700
|
-
program
|
|
701
|
-
.command('env')
|
|
702
|
-
.argument('<name>')
|
|
703
|
-
.description('Print shell exports for using the tool directly')
|
|
704
|
-
.action(printEnv);
|
|
705
|
-
program
|
|
706
|
-
.command('ralph')
|
|
707
|
-
.description('Ralph job helper commands')
|
|
708
|
-
.action(printRalphDiscovery);
|
|
709
|
-
const agentBrowser = program
|
|
710
|
-
.command('agent-browser')
|
|
711
|
-
.description('Agent Browser sessions, targets, and auth slots')
|
|
712
|
-
.action(printAgentBrowserDiscovery);
|
|
713
|
-
agentBrowser
|
|
714
|
-
.command('health')
|
|
715
|
-
.description('Check Agent Browser health and report issues')
|
|
716
|
-
.option('--json', 'Print machine-readable health data')
|
|
717
|
-
.action(async (options) => {
|
|
718
|
-
await printAgentBrowserHealth(getCliToolStatus(requireEntry('agent-browser')), Boolean(options.json));
|
|
719
|
-
});
|
|
720
|
-
agentBrowser
|
|
721
|
-
.command('sessions')
|
|
722
|
-
.description('List upstream Agent Browser sessions')
|
|
723
|
-
.option('--json', 'Print machine-readable session output')
|
|
724
|
-
.action(async (options) => {
|
|
725
|
-
await printAgentBrowserSessions(getCliToolStatus(requireEntry('agent-browser')), Boolean(options.json));
|
|
726
|
-
});
|
|
727
|
-
agentBrowser
|
|
728
|
-
.command('targets')
|
|
729
|
-
.description('List Chrome CDP targets with Chat auth hints')
|
|
730
|
-
.option('--cdp-url <url>', 'Chrome DevTools HTTP URL')
|
|
731
|
-
.option('--no-probe', 'Only read /json/list without page DOM probes')
|
|
732
|
-
.option('--json', 'Print machine-readable target data')
|
|
733
|
-
.action(async (options) => {
|
|
734
|
-
const status = getCliToolStatus(requireEntry('agent-browser'));
|
|
735
|
-
const previousHome = process.env.BROWSER_USE_HOME;
|
|
736
|
-
process.env.BROWSER_USE_HOME = status.homeDir;
|
|
737
|
-
try {
|
|
738
|
-
const targets = await listBrowserUseCdpTargets({ cdpUrl: options.cdpUrl, probe: options.probe });
|
|
739
|
-
if (options.json) {
|
|
740
|
-
console.log(JSON.stringify({ targets }, null, 2));
|
|
741
|
-
return;
|
|
742
|
-
}
|
|
743
|
-
console.log(formatBrowserUseTargets(targets));
|
|
744
|
-
if (targets.length === 0)
|
|
745
|
-
console.log('\nNext: eval "$(pibo tools env agent-browser)"');
|
|
746
|
-
}
|
|
747
|
-
finally {
|
|
748
|
-
if (previousHome === undefined)
|
|
749
|
-
delete process.env.BROWSER_USE_HOME;
|
|
750
|
-
else
|
|
751
|
-
process.env.BROWSER_USE_HOME = previousHome;
|
|
752
|
-
}
|
|
753
|
-
});
|
|
754
|
-
agentBrowser
|
|
755
|
-
.command('attach-chat')
|
|
756
|
-
.description('Export the best existing authenticated Chat target')
|
|
757
|
-
.option('--cdp-url <url>', 'Chrome DevTools HTTP URL')
|
|
758
|
-
.option('--json', 'Print machine-readable target data')
|
|
759
|
-
.action(async (options) => {
|
|
760
|
-
const status = getCliToolStatus(requireEntry('agent-browser'));
|
|
761
|
-
const previousHome = process.env.BROWSER_USE_HOME;
|
|
762
|
-
process.env.BROWSER_USE_HOME = status.homeDir;
|
|
763
|
-
try {
|
|
764
|
-
const targets = await listBrowserUseCdpTargets({ cdpUrl: options.cdpUrl });
|
|
765
|
-
const target = selectBestChatTarget(targets);
|
|
766
|
-
if (!target) {
|
|
767
|
-
throw new Error(formatCliError({
|
|
768
|
-
code: ErrorCode.CLIENT_ERROR,
|
|
769
|
-
type: 'AGENT_BROWSER_CHAT_TARGET_NOT_FOUND',
|
|
770
|
-
message: 'No authenticated Chat Web target with a composer textarea was found',
|
|
771
|
-
suggestion: 'Run `pibo tools agent-browser targets`, reuse an authenticated tab, or acquire a slot with `pibo tools agent-browser lease acquire`.',
|
|
772
|
-
}));
|
|
773
|
-
}
|
|
774
|
-
if (options.json) {
|
|
775
|
-
console.log(JSON.stringify({ target }, null, 2));
|
|
776
|
-
return;
|
|
777
|
-
}
|
|
778
|
-
const cdpUrl = options.cdpUrl ? normalizeCdpUrlSync(options.cdpUrl) : 'http://127.0.0.1:56663';
|
|
779
|
-
console.log(`export PIBO_AGENT_BROWSER_CDP_URL='${cdpUrl.replaceAll("'", "'\\''")}'`);
|
|
780
|
-
printAttachChatExports(target, cdpUrl);
|
|
781
|
-
}
|
|
782
|
-
finally {
|
|
783
|
-
if (previousHome === undefined)
|
|
784
|
-
delete process.env.BROWSER_USE_HOME;
|
|
785
|
-
else
|
|
786
|
-
process.env.BROWSER_USE_HOME = previousHome;
|
|
787
|
-
}
|
|
788
|
-
});
|
|
789
|
-
const agentAuthTemplate = agentBrowser
|
|
790
|
-
.command('auth-template')
|
|
791
|
-
.description('Manage the Agent Browser authenticated template profile')
|
|
792
|
-
.action(() => {
|
|
793
|
-
console.log(`pibo tools agent-browser auth-template
|
|
794
|
-
|
|
795
|
-
Commands:
|
|
796
|
-
path Print the default authenticated template profile path
|
|
797
|
-
env Print shell exports for preparing the auth template profile`);
|
|
798
|
-
});
|
|
799
|
-
agentAuthTemplate
|
|
800
|
-
.command('path')
|
|
801
|
-
.option('--app <name>', 'Auth pool app name', 'pibo-chat')
|
|
802
|
-
.description('Print the default authenticated template profile path')
|
|
803
|
-
.action((options) => {
|
|
804
|
-
printAgentBrowserAuthTemplatePath(getCliToolStatus(requireEntry('agent-browser')), options.app);
|
|
805
|
-
});
|
|
806
|
-
agentAuthTemplate
|
|
807
|
-
.command('env')
|
|
808
|
-
.option('--app <name>', 'Auth pool app name', 'pibo-chat')
|
|
809
|
-
.description('Print shell exports for preparing the auth template profile')
|
|
810
|
-
.action(async (options) => {
|
|
811
|
-
await printAgentBrowserAuthTemplateEnv(getCliToolStatus(requireEntry('agent-browser')), options.app);
|
|
812
|
-
});
|
|
813
|
-
const agentLease = agentBrowser
|
|
814
|
-
.command('lease')
|
|
815
|
-
.description('Acquire and manage isolated Agent Browser slots')
|
|
816
|
-
.action(() => {
|
|
817
|
-
console.log(`pibo tools agent-browser lease
|
|
818
|
-
|
|
819
|
-
Commands:
|
|
820
|
-
acquire Acquire an isolated authenticated browser slot
|
|
821
|
-
list List authenticated browser slots
|
|
822
|
-
release <id> Release one browser slot
|
|
823
|
-
reap-stale Release expired browser slots`);
|
|
824
|
-
});
|
|
825
|
-
agentLease
|
|
826
|
-
.command('acquire')
|
|
827
|
-
.description('Acquire an isolated authenticated browser slot')
|
|
828
|
-
.option('--app <name>', 'Auth pool app name', 'pibo-chat')
|
|
829
|
-
.option('--holder <holder>', 'Lease holder label')
|
|
830
|
-
.option('--ttl-ms <ms>', 'Lease time-to-live in milliseconds', parsePositiveInteger)
|
|
831
|
-
.option('--max-slots <count>', 'Maximum active slots for the app', parsePositiveInteger)
|
|
832
|
-
.option('--json', 'Print machine-readable lease data')
|
|
833
|
-
.action(async (options) => {
|
|
834
|
-
await acquireAgentBrowserLease(getCliToolStatus(requireEntry('agent-browser')), options);
|
|
835
|
-
});
|
|
836
|
-
agentLease
|
|
837
|
-
.command('list')
|
|
838
|
-
.description('List authenticated browser slots')
|
|
839
|
-
.option('--json', 'Print machine-readable lease data')
|
|
840
|
-
.action(async (options) => {
|
|
841
|
-
await listAgentBrowserLeases(getCliToolStatus(requireEntry('agent-browser')), Boolean(options.json));
|
|
842
|
-
});
|
|
843
|
-
agentLease
|
|
844
|
-
.command('release')
|
|
845
|
-
.argument('<id>')
|
|
846
|
-
.option('--delete-profile', 'Delete the slot browser profile')
|
|
847
|
-
.description('Release one browser slot')
|
|
848
|
-
.action(async (id, options) => {
|
|
849
|
-
await releaseAgentBrowserLease(getCliToolStatus(requireEntry('agent-browser')), id, options);
|
|
850
|
-
});
|
|
851
|
-
agentLease
|
|
852
|
-
.command('reap-stale')
|
|
853
|
-
.description('Release expired browser slots')
|
|
854
|
-
.option('--json', 'Print machine-readable reap result')
|
|
855
|
-
.action(async (options) => {
|
|
856
|
-
await reapStaleAgentBrowserLeases(getCliToolStatus(requireEntry('agent-browser')), Boolean(options.json));
|
|
857
|
-
});
|
|
858
|
-
const browserUse = program
|
|
859
|
-
.command('browser-use')
|
|
860
|
-
.description('Browser-use auth slots and helper commands')
|
|
861
|
-
.action(printBrowserUseDiscovery);
|
|
862
|
-
browserUse
|
|
863
|
-
.command('targets')
|
|
864
|
-
.description('List Chrome CDP targets with Chat auth hints')
|
|
865
|
-
.option('--cdp-url <url>', 'Chrome DevTools HTTP URL')
|
|
866
|
-
.option('--no-probe', 'Only read /json/list without page DOM probes')
|
|
867
|
-
.option('--json', 'Print machine-readable target data')
|
|
868
|
-
.action(async (options) => {
|
|
869
|
-
const targets = await listBrowserUseCdpTargets({ cdpUrl: options.cdpUrl, probe: options.probe });
|
|
870
|
-
if (options.json) {
|
|
871
|
-
console.log(JSON.stringify({ targets }, null, 2));
|
|
872
|
-
return;
|
|
873
|
-
}
|
|
874
|
-
console.log(formatBrowserUseTargets(targets));
|
|
875
|
-
if (targets.length === 0) {
|
|
876
|
-
console.log('');
|
|
877
|
-
console.log('Next: eval "$(pibo tools env browser-use)"');
|
|
878
|
-
}
|
|
879
|
-
});
|
|
880
|
-
browserUse
|
|
881
|
-
.command('attach-chat')
|
|
882
|
-
.description('Export the best existing authenticated Chat target')
|
|
883
|
-
.option('--cdp-url <url>', 'Chrome DevTools HTTP URL')
|
|
884
|
-
.option('--json', 'Print machine-readable target data')
|
|
885
|
-
.action(async (options) => {
|
|
886
|
-
const targets = await listBrowserUseCdpTargets({ cdpUrl: options.cdpUrl });
|
|
887
|
-
const target = selectBestChatTarget(targets);
|
|
888
|
-
if (!target) {
|
|
889
|
-
throw new Error(formatCliError({
|
|
890
|
-
code: ErrorCode.CLIENT_ERROR,
|
|
891
|
-
type: 'BROWSER_USE_CHAT_TARGET_NOT_FOUND',
|
|
892
|
-
message: 'No authenticated Chat Web target with a composer textarea was found',
|
|
893
|
-
suggestion: 'Run `pibo tools browser-use targets`, reuse an authenticated tab if present, or acquire a slot with `pibo tools browser-use lease acquire`.',
|
|
894
|
-
}));
|
|
895
|
-
}
|
|
896
|
-
if (options.json) {
|
|
897
|
-
console.log(JSON.stringify({ target }, null, 2));
|
|
898
|
-
return;
|
|
899
|
-
}
|
|
900
|
-
const cdpUrl = options.cdpUrl ? normalizeCdpUrlSync(options.cdpUrl) : undefined;
|
|
901
|
-
printAttachChatExports(target, cdpUrl);
|
|
902
|
-
});
|
|
903
|
-
browserUse
|
|
904
|
-
.command('health')
|
|
905
|
-
.description('Check browser-use health and report issues')
|
|
906
|
-
.option('--json', 'Print machine-readable health data')
|
|
907
|
-
.action(async (options) => {
|
|
908
|
-
await printBrowserUseHealth(getCliToolStatus(requireEntry('browser-use')), Boolean(options.json));
|
|
909
|
-
});
|
|
910
|
-
const pool = browserUse
|
|
911
|
-
.command('pool')
|
|
912
|
-
.description('Inspect and reap the managed browser pool')
|
|
913
|
-
.action(() => {
|
|
914
|
-
console.log(`pibo tools browser-use pool
|
|
915
|
-
|
|
916
|
-
Commands:
|
|
917
|
-
status Show read-only managed browser-pool status
|
|
918
|
-
reap Reap an idle managed browser pool`);
|
|
919
|
-
});
|
|
920
|
-
pool
|
|
921
|
-
.command('status')
|
|
922
|
-
.description('Show read-only managed browser-pool status')
|
|
923
|
-
.option('--worker-id <id>', 'Worker id to inspect')
|
|
924
|
-
.option('--pool-id <id>', 'Browser pool id to inspect')
|
|
925
|
-
.option('--root <path>', 'Browser pool root directory')
|
|
926
|
-
.option('--json', 'Print machine-readable pool status')
|
|
927
|
-
.action(async (options) => {
|
|
928
|
-
await printBrowserPoolStatus(getCliToolStatus(requireEntry('browser-use')), options);
|
|
929
|
-
});
|
|
930
|
-
pool
|
|
931
|
-
.command('reap')
|
|
932
|
-
.description('Reap an idle managed browser pool')
|
|
933
|
-
.option('--worker-id <id>', 'Worker id to inspect')
|
|
934
|
-
.option('--pool-id <id>', 'Browser pool id to inspect')
|
|
935
|
-
.option('--root <path>', 'Browser pool root directory')
|
|
936
|
-
.option('--idle-timeout-ms <ms>', 'Idle timeout in milliseconds (0 means immediately eligible)', parseNonNegativeInteger)
|
|
937
|
-
.option('--json', 'Print machine-readable reap result')
|
|
938
|
-
.action(async (options) => {
|
|
939
|
-
await printBrowserPoolReap(getCliToolStatus(requireEntry('browser-use')), options);
|
|
940
|
-
});
|
|
941
|
-
const authTemplate = browserUse
|
|
942
|
-
.command('auth-template')
|
|
943
|
-
.description('Manage the browser-use authenticated template profile')
|
|
944
|
-
.action(() => {
|
|
945
|
-
console.log(`pibo tools browser-use auth-template
|
|
946
|
-
|
|
947
|
-
Commands:
|
|
948
|
-
path Print the default authenticated template profile path
|
|
949
|
-
env Print shell exports for preparing the auth template profile`);
|
|
950
|
-
});
|
|
951
|
-
authTemplate
|
|
952
|
-
.command('path')
|
|
953
|
-
.description('Print the default authenticated template profile path')
|
|
954
|
-
.action(() => {
|
|
955
|
-
printBrowserUseAuthTemplatePath(getCliToolStatus(requireEntry('browser-use')));
|
|
956
|
-
});
|
|
957
|
-
authTemplate
|
|
958
|
-
.command('env')
|
|
959
|
-
.description('Print shell exports for preparing the auth template profile')
|
|
960
|
-
.action(async () => {
|
|
961
|
-
await printBrowserUseAuthTemplateEnv(getCliToolStatus(requireEntry('browser-use')));
|
|
962
|
-
});
|
|
963
|
-
const lease = browserUse
|
|
964
|
-
.command('lease')
|
|
965
|
-
.description('Acquire and manage isolated authenticated browser-use slots')
|
|
966
|
-
.action(() => {
|
|
967
|
-
console.log(`pibo tools browser-use lease
|
|
968
|
-
|
|
969
|
-
Commands:
|
|
970
|
-
acquire Acquire an isolated authenticated browser slot
|
|
971
|
-
list List authenticated browser slots
|
|
972
|
-
release <id> Release one browser slot
|
|
973
|
-
reap-stale Release expired or dead browser slots`);
|
|
974
|
-
});
|
|
975
|
-
lease
|
|
976
|
-
.command('acquire')
|
|
977
|
-
.description('Acquire an isolated authenticated browser slot')
|
|
978
|
-
.option('--app <name>', 'Auth pool app name', 'pibo-chat')
|
|
979
|
-
.option('--holder <holder>', 'Lease holder label')
|
|
980
|
-
.option('--ttl-minutes <minutes>', 'Lease time-to-live in minutes', parsePositiveInteger)
|
|
981
|
-
.option('--max-slots <count>', 'Maximum active slots for the app', parsePositiveInteger)
|
|
982
|
-
.option('--template-dir <path>', 'Authenticated Chrome user-data-dir template to clone')
|
|
983
|
-
.option('--profile-name <name>', 'Chrome profile name inside each slot')
|
|
984
|
-
.option('--json', 'Print machine-readable lease data')
|
|
985
|
-
.action(async (options) => {
|
|
986
|
-
await acquireBrowserUseLease({ status: getCliToolStatus(requireEntry('browser-use')) }, options);
|
|
987
|
-
});
|
|
988
|
-
lease
|
|
989
|
-
.command('list')
|
|
990
|
-
.description('List authenticated browser slots')
|
|
991
|
-
.option('--json', 'Print machine-readable lease data')
|
|
992
|
-
.action(async (options) => {
|
|
993
|
-
await listBrowserUseLeases({ status: getCliToolStatus(requireEntry('browser-use')) }, Boolean(options.json));
|
|
994
|
-
});
|
|
995
|
-
lease
|
|
996
|
-
.command('release')
|
|
997
|
-
.argument('<id>')
|
|
998
|
-
.option('--delete-profile', 'Delete the slot Chrome user-data-dir')
|
|
999
|
-
.description('Release one browser slot')
|
|
1000
|
-
.action(async (id, options) => {
|
|
1001
|
-
await releaseBrowserUseLease({ status: getCliToolStatus(requireEntry('browser-use')) }, id, options);
|
|
1002
|
-
});
|
|
1003
|
-
lease
|
|
1004
|
-
.command('reap-stale')
|
|
1005
|
-
.description('Release expired or dead browser slots')
|
|
1006
|
-
.action(async () => {
|
|
1007
|
-
await reapStaleBrowserUseLeases({ status: getCliToolStatus(requireEntry('browser-use')) });
|
|
1008
|
-
});
|
|
1009
|
-
if (argv.length <= 2) {
|
|
1010
|
-
printList(false);
|
|
1011
|
-
return;
|
|
1012
|
-
}
|
|
1013
|
-
try {
|
|
1014
|
-
await program.parseAsync(argv);
|
|
1015
|
-
}
|
|
1016
|
-
catch (error) {
|
|
1017
|
-
console.error(error.message);
|
|
1018
|
-
process.exitCode = ErrorCode.CLIENT_ERROR;
|
|
1019
|
-
}
|
|
1020
|
-
}
|