@pasko70/pibo 1.7.1 → 1.7.2
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/context/codex-base-prompt.md +0 -0
- package/context/compute-worker.md +0 -0
- package/context/pibo-compaction-prompt.md +0 -0
- package/context/pibo-native-tooling.md +0 -0
- package/context/pibo-system-prompt.md +0 -0
- package/dist/apps/chat-ui/assets/{dist-r34sHBLi.js → dist-8eLx-6HY.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CA1Gi-1G.js → dist-BXT6rjJn.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BDxKfyTI.js → dist-CCHtiwhr.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BDNjNt4b.js → dist-CCt9U3Or.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-DJJN6SPt.js → dist-Cfyo-Bgw.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CTQ40XYd.js → dist-CxWQqjbA.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-B7ZRIJ16.js → dist-Ddn6n4ge.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-D8Q2E5o5.js → dist-DjmyW251.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-exkn8clz.js → dist-Jc0njXt3.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CcwGcMtk.js → dist-cyStkSiF.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-mG9WxdYM.js → dist-eRtG3vUM.js} +1 -1
- package/dist/apps/chat-ui/assets/index-COp5Hme0.js +166 -0
- package/dist/apps/chat-ui/assets/{index-D8itqvK_.css → index-Dz6asKNQ.css} +1 -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/index.html +2 -2
- package/dist/apps/chat-ui/manifest.webmanifest +0 -0
- package/dist/apps/chat-ui/sw.js +0 -0
- package/dist/apps/chat-vscode-web/assets/index-CfeNUaRh.js +41 -0
- package/dist/apps/chat-vscode-web/index.html +1 -1
- package/dist/bin/pibo.js +0 -0
- package/dist/bin/rg.js +0 -0
- package/dist/cli.js +4 -1
- package/dist/compute/docker.js +16 -8
- package/dist/gateway/web.js +3 -12
- package/dist/plugins/dev-auth.js +28 -2
- package/package.json +1 -1
- package/skills/builtin/graphify/SKILL.md +0 -0
- package/skills/builtin/pi-agent-harness/SKILL.md +0 -0
- package/skills/builtin/pi-agent-harness/agents/openai.yaml +0 -0
- package/skills/builtin/pibo-docker-system/SKILL.md +0 -0
- package/skills/builtin/pibo-spec-writing/SKILL.md +0 -0
- package/skills/builtin/prd/SKILL.md +0 -0
- package/skills/builtin/ralph-loop/SKILL.md +0 -0
- package/skills/builtin/ralph-prd-json/SKILL.md +0 -0
- package/skills/builtin/skill-creator/LICENSE.txt +0 -0
- package/skills/builtin/skill-creator/SKILL.md +0 -0
- package/skills/builtin/skill-creator/agents/analyzer.md +0 -0
- package/skills/builtin/skill-creator/agents/comparator.md +0 -0
- package/skills/builtin/skill-creator/agents/grader.md +0 -0
- package/skills/builtin/skill-creator/assets/eval_review.html +0 -0
- package/skills/builtin/skill-creator/eval-viewer/generate_review.py +0 -0
- package/skills/builtin/skill-creator/eval-viewer/viewer.html +0 -0
- package/skills/builtin/skill-creator/references/schemas.md +0 -0
- package/skills/builtin/skill-creator/scripts/__init__.py +0 -0
- package/skills/builtin/skill-creator/scripts/aggregate_benchmark.py +0 -0
- package/skills/builtin/skill-creator/scripts/generate_report.py +0 -0
- package/skills/builtin/skill-creator/scripts/improve_description.py +0 -0
- package/skills/builtin/skill-creator/scripts/package_skill.py +0 -0
- package/skills/builtin/skill-creator/scripts/quick_validate.py +0 -0
- package/skills/builtin/skill-creator/scripts/run_eval.py +0 -0
- package/skills/builtin/skill-creator/scripts/run_loop.py +0 -0
- package/skills/builtin/skill-creator/scripts/utils.py +0 -0
- package/skills/builtin/web-annotations/SKILL.md +0 -0
- package/src/mcp/LICENSE.mcp-cli +0 -0
- package/README.md +0 -183
- package/dist/apps/chat-ui/assets/index-C5smwAJD.js +0 -166
- package/dist/apps/chat-vscode-web/assets/index-lOZ1r-No.js +0 -41
- package/dist/apps/vscode-artifacts/latest.vsix +0 -0
- package/dist/apps/vscode-artifacts/pibo-vscode-ext-1.7.1.vsix +0 -0
- package/docs/README.md +0 -23
- package/docs/ops/install-developer-host.md +0 -112
- package/docs/ops/install-user-host.md +0 -96
- package/docs/ops/upgrade-user-to-developer-host.md +0 -69
- package/docs/ops/vscode-extension-release.md +0 -160
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<meta name="theme-color" content="#101d22" />
|
|
7
7
|
<title>Pibo</title>
|
|
8
|
-
<script type="module" crossorigin src="/apps/chat-vscode/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/apps/chat-vscode/assets/index-CfeNUaRh.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/apps/chat-vscode/assets/index-B5QK07zO.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/bin/pibo.js
CHANGED
|
File without changes
|
package/dist/bin/rg.js
CHANGED
|
File without changes
|
package/dist/cli.js
CHANGED
|
@@ -52,6 +52,9 @@ function isLoopbackBindForCli(host) {
|
|
|
52
52
|
const normalized = host.startsWith("[") && host.endsWith("]") ? host.slice(1, -1) : host;
|
|
53
53
|
return normalized === "127.0.0.1" || normalized === "::1" || normalized === "localhost";
|
|
54
54
|
}
|
|
55
|
+
function isComputeWorkerRuntimeForCli() {
|
|
56
|
+
return process.env.PIBO_COMPUTE_WORKER === "1";
|
|
57
|
+
}
|
|
55
58
|
export async function runPiboCli(argv = process.argv) {
|
|
56
59
|
if (argv[2] === "--help" || argv[2] === "-h") {
|
|
57
60
|
printRootDiscovery();
|
|
@@ -371,7 +374,7 @@ export async function runPiboCli(argv = process.argv) {
|
|
|
371
374
|
if (authMode !== undefined && authMode !== "better-auth" && authMode !== "local") {
|
|
372
375
|
throw new Error(`--auth must be 'better-auth' or 'local', got '${authMode}'`);
|
|
373
376
|
}
|
|
374
|
-
if (authMode === "local" && options.webHost !== undefined && !isLoopbackBindForCli(options.webHost)) {
|
|
377
|
+
if (authMode === "local" && options.webHost !== undefined && !isLoopbackBindForCli(options.webHost) && !isComputeWorkerRuntimeForCli()) {
|
|
375
378
|
throw new Error(`--auth=local requires a loopback bind (127.0.0.1, ::1, or localhost). Got --web-host='${options.webHost}'. ` +
|
|
376
379
|
"Either drop --web-host or pick --auth=better-auth for a public bind.");
|
|
377
380
|
}
|
package/dist/compute/docker.js
CHANGED
|
@@ -200,16 +200,20 @@ export function buildDevWorkerDockerRunArgs(options) {
|
|
|
200
200
|
"--name",
|
|
201
201
|
options.id,
|
|
202
202
|
...buildDockerResourcePolicyArgs(policy),
|
|
203
|
+
"-e",
|
|
204
|
+
"PIBO_COMPUTE_WORKER=1",
|
|
205
|
+
"-e",
|
|
206
|
+
"PIBO_COMPUTE_WORKER_ROLE=dev",
|
|
203
207
|
"-p",
|
|
204
|
-
|
|
208
|
+
`127.0.0.1:${options.gatewayPort}:4789`,
|
|
205
209
|
"-p",
|
|
206
|
-
|
|
210
|
+
`127.0.0.1:${options.cdpPort}:56663`,
|
|
207
211
|
"-p",
|
|
208
|
-
|
|
212
|
+
`127.0.0.1:${options.webPort}:4788`,
|
|
209
213
|
"-p",
|
|
210
|
-
|
|
214
|
+
`127.0.0.1:${options.webUIPortChat}:4790`,
|
|
211
215
|
"-p",
|
|
212
|
-
|
|
216
|
+
`127.0.0.1:${options.webUIPortContext}:4791`,
|
|
213
217
|
"-v",
|
|
214
218
|
`${options.worktreePath}:/workspace`,
|
|
215
219
|
...(options.hostNodeModules ? ["-v", `${options.hostNodeModules}:/workspace/node_modules`] : []),
|
|
@@ -307,12 +311,16 @@ export function buildWorkerDockerRunArgs(options) {
|
|
|
307
311
|
"--name",
|
|
308
312
|
options.id,
|
|
309
313
|
...buildDockerResourcePolicyArgs(policy),
|
|
314
|
+
"-e",
|
|
315
|
+
"PIBO_COMPUTE_WORKER=1",
|
|
316
|
+
"-e",
|
|
317
|
+
"PIBO_COMPUTE_WORKER_ROLE=worker",
|
|
310
318
|
"-p",
|
|
311
|
-
"4789",
|
|
319
|
+
"127.0.0.1::4789",
|
|
312
320
|
"-p",
|
|
313
|
-
"56663",
|
|
321
|
+
"127.0.0.1::56663",
|
|
314
322
|
"-p",
|
|
315
|
-
"4788",
|
|
323
|
+
"127.0.0.1::4788",
|
|
316
324
|
...buildComputeWorkerMetadataLabels({
|
|
317
325
|
role: "worker",
|
|
318
326
|
createdAt: options.createdAt,
|
package/dist/gateway/web.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
2
1
|
import { createDefaultPiboPlugins } from "../plugins/builtin.js";
|
|
3
2
|
import { createPiboBetterAuthPlugin } from "../plugins/better-auth.js";
|
|
4
3
|
import { createPiboChatWebPlugin } from "../plugins/chat-web.js";
|
|
@@ -15,16 +14,8 @@ import { PiboGatewayServer } from "./server.js";
|
|
|
15
14
|
import { clearFallbackPidFile, clearPidFile, writeFallbackGatewayPid, writeGatewayPid } from "./pidfile.js";
|
|
16
15
|
const PUBLIC_WEB_CHANNEL_HOST = "0.0.0.0";
|
|
17
16
|
const LOOPBACK_HOSTS = new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
return true;
|
|
21
|
-
try {
|
|
22
|
-
const cgroup = readFileSync("/proc/1/cgroup", "utf-8");
|
|
23
|
-
return /docker|kubepods|containerd/.test(cgroup);
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
17
|
+
function isComputeWorkerRuntime() {
|
|
18
|
+
return process.env.PIBO_COMPUTE_WORKER === "1";
|
|
28
19
|
}
|
|
29
20
|
export function isLoopbackHost(value) {
|
|
30
21
|
if (!value)
|
|
@@ -39,7 +30,7 @@ function requireLocalAuthBind(options) {
|
|
|
39
30
|
const host = bindHost(options);
|
|
40
31
|
if (isLoopbackHost(host))
|
|
41
32
|
return;
|
|
42
|
-
if (
|
|
33
|
+
if (isComputeWorkerRuntime()) {
|
|
43
34
|
console.error(`[pibo] WARNING: local auth is active in a Docker worker with bind ${host}. ` +
|
|
44
35
|
"The Docker network is the security boundary; ensure the host port mapping is loopback-only.");
|
|
45
36
|
return;
|
package/dist/plugins/dev-auth.js
CHANGED
|
@@ -40,6 +40,26 @@ function isLoopbackSocketAddress(value) {
|
|
|
40
40
|
const normalized = value.startsWith("::ffff:") ? value.slice("::ffff:".length) : value;
|
|
41
41
|
return normalized === "::1" || normalized === "127.0.0.1" || normalized.startsWith("127.");
|
|
42
42
|
}
|
|
43
|
+
function isPrivateDockerBridgeSocketAddress(value) {
|
|
44
|
+
if (!value)
|
|
45
|
+
return false;
|
|
46
|
+
const normalized = value.startsWith("::ffff:") ? value.slice("::ffff:".length) : value;
|
|
47
|
+
if (normalized.startsWith("10."))
|
|
48
|
+
return true;
|
|
49
|
+
if (normalized.startsWith("192.168."))
|
|
50
|
+
return true;
|
|
51
|
+
const match = normalized.match(/^172\.(\d{1,2})\./);
|
|
52
|
+
if (!match)
|
|
53
|
+
return false;
|
|
54
|
+
const secondOctet = Number(match[1]);
|
|
55
|
+
return secondOctet >= 16 && secondOctet <= 31;
|
|
56
|
+
}
|
|
57
|
+
function isComputeWorkerRuntime(env = process.env) {
|
|
58
|
+
return env.PIBO_COMPUTE_WORKER === "1";
|
|
59
|
+
}
|
|
60
|
+
function isTrustedLocalSocketAddress(value) {
|
|
61
|
+
return isLoopbackSocketAddress(value) || (isComputeWorkerRuntime() && isPrivateDockerBridgeSocketAddress(value));
|
|
62
|
+
}
|
|
43
63
|
/**
|
|
44
64
|
* Read the TCP socket peer address attached to the request by the web host
|
|
45
65
|
* channel via the `x-pibo-socket-peer` header. The header is internal and
|
|
@@ -77,6 +97,12 @@ export function isLoopbackDevAuthHeaders(headers) {
|
|
|
77
97
|
export function isLoopbackSocketPeerForDevAuthHeaders(headers) {
|
|
78
98
|
return isLoopbackSocketAddress(firstHeaderValue(headers.get(SOCKET_PEER_HEADER)));
|
|
79
99
|
}
|
|
100
|
+
export function isTrustedLocalSocketPeerForDevAuth(request) {
|
|
101
|
+
return isTrustedLocalSocketAddress(getSocketPeerForDevAuth(request));
|
|
102
|
+
}
|
|
103
|
+
export function isTrustedLocalSocketPeerForDevAuthHeaders(headers) {
|
|
104
|
+
return isTrustedLocalSocketAddress(firstHeaderValue(headers.get(SOCKET_PEER_HEADER)));
|
|
105
|
+
}
|
|
80
106
|
export function createDevAuthService() {
|
|
81
107
|
const containerToken = generateToken();
|
|
82
108
|
const debugSession = {
|
|
@@ -104,7 +130,7 @@ export function createDevAuthService() {
|
|
|
104
130
|
// there is no cookie jar to share. Headless clients (VS Code
|
|
105
131
|
// extension, CLI scripts) can use the same dev identity as the
|
|
106
132
|
// browser without needing the HttpOnly session cookie.
|
|
107
|
-
if (isLoopbackDevAuthHeaders(headers) &&
|
|
133
|
+
if (isLoopbackDevAuthHeaders(headers) && isTrustedLocalSocketPeerForDevAuthHeaders(headers)) {
|
|
108
134
|
return debugSession;
|
|
109
135
|
}
|
|
110
136
|
const token = getCookieValue(headers);
|
|
@@ -125,7 +151,7 @@ export function createDevAuthService() {
|
|
|
125
151
|
if (!isLoopbackDevAuthRequest(request)) {
|
|
126
152
|
return Response.json({ error: "Dev auth only accepts loopback requests" }, { status: 403 });
|
|
127
153
|
}
|
|
128
|
-
if (!
|
|
154
|
+
if (!isTrustedLocalSocketPeerForDevAuth(request)) {
|
|
129
155
|
return Response.json({ error: "Dev auth only accepts loopback socket peers" }, { status: 403 });
|
|
130
156
|
}
|
|
131
157
|
const url = new URL(request.url);
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/mcp/LICENSE.mcp-cli
CHANGED
|
File without changes
|
package/README.md
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
# pibo
|
|
2
|
-
|
|
3
|
-
Pibo is a thin product boundary around Pi Coding Agent. Pi remains the inner engine for model turns, tools, streaming, sessions, and compaction. Pibo adds profiles, plugins, channels, local gateways, web auth, and operator tooling.
|
|
4
|
-
|
|
5
|
-
The default posture is intentionally powerful: Pibo is built for agentic coding and server operation, not for a restrictive sandbox. Install and run it as the Linux user that should own its state and credentials.
|
|
6
|
-
|
|
7
|
-
## Supported platforms
|
|
8
|
-
|
|
9
|
-
Pibo is Linux-first. The supported hosts are:
|
|
10
|
-
|
|
11
|
-
- **Linux** (any modern distribution) — primary target
|
|
12
|
-
- **macOS** — supported, same code path as Linux
|
|
13
|
-
- **Windows via WSL2** — fully supported; see [docs/guides/pibo-on-windows-via-wsl.md](./docs/guides/pibo-on-windows-via-wsl.md)
|
|
14
|
-
- **Native Windows** — not supported; `pibo setup doctor` and `pibo setup user-host` will print a clear error pointing to the WSL guide
|
|
15
|
-
|
|
16
|
-
## Install
|
|
17
|
-
|
|
18
|
-
Pibo is distributed as an npm package:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npm install -g @pasko70/pibo
|
|
22
|
-
pibo --help
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
The current package declares Node.js 24+. Some Linux distributions still ship Node 22 through `apt`, so install a recent Node release first when needed. A user-local Node/npm setup through `nvm`, `fnm`, or a user-writable npm prefix works well.
|
|
26
|
-
|
|
27
|
-
For a user-local global npm prefix:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
mkdir -p ~/.local
|
|
31
|
-
npm config set prefix ~/.local
|
|
32
|
-
export PATH="$HOME/.local/bin:$PATH"
|
|
33
|
-
npm install -g @pasko70/pibo
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## State and user paths
|
|
37
|
-
|
|
38
|
-
Pibo stores product-wide state under:
|
|
39
|
-
|
|
40
|
-
```text
|
|
41
|
-
${PIBO_HOME:-~/.pibo}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
That means the executing Linux user owns the installation state:
|
|
45
|
-
|
|
46
|
-
```text
|
|
47
|
-
alice -> /home/alice/.pibo
|
|
48
|
-
pibo -> /home/pibo/.pibo
|
|
49
|
-
root -> /root/.pibo
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
There is no requirement to run as `root`. If you SSH as root and run Pibo, state naturally lands in `/root/.pibo`. If you create or use a dedicated user, state lands in that user's home. This is the preferred way to keep SSH keys, config, logs, and sessions separated.
|
|
53
|
-
|
|
54
|
-
Workspace-scoped files are separate and live under the active workspace:
|
|
55
|
-
|
|
56
|
-
```text
|
|
57
|
-
<workspace>/.pibo
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Examples include custom prompts and Pi package registrations.
|
|
61
|
-
|
|
62
|
-
## Server notes
|
|
63
|
-
|
|
64
|
-
A fresh server install usually needs only three decisions:
|
|
65
|
-
|
|
66
|
-
1. Choose the Linux user that should own Pibo.
|
|
67
|
-
2. Install Node.js 24+ for that user or system-wide.
|
|
68
|
-
3. Install Pibo through npm.
|
|
69
|
-
|
|
70
|
-
Use the setup planner to keep the first run simple:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
pibo setup doctor --domain pibo.example.com --expected-ip <server-ip>
|
|
74
|
-
pibo setup user-host --domain pibo.example.com --print-files
|
|
75
|
-
pibo setup user-host --domain pibo.example.com --write-to /tmp/pibo-setup
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
This is the normal user path: one gateway, one `PIBO_HOME`, no required Docker, no dev gateway, and no GitHub App setup. After reviewing staged files, use `--apply --yes` to write the generated systemd/Caddy files.
|
|
79
|
-
|
|
80
|
-
Developer hosts are opt-in and add production/dev separation plus Docker compute workers:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
pibo setup developer-host \
|
|
84
|
-
--origin git@github.com:<your-fork>/pibo.git \
|
|
85
|
-
--prod-domain pibo.example.com \
|
|
86
|
-
--dev-domain dev.pibo.example.com \
|
|
87
|
-
--print-files
|
|
88
|
-
|
|
89
|
-
pibo setup developer-host \
|
|
90
|
-
--origin git@github.com:<your-fork>/pibo.git \
|
|
91
|
-
--prod-domain pibo.example.com \
|
|
92
|
-
--dev-domain dev.pibo.example.com \
|
|
93
|
-
--write-to /tmp/pibo-setup
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
See `docs/ops/install-user-host.md`, `docs/ops/install-developer-host.md`, and `docs/ops/upgrade-user-to-developer-host.md`. Developer-host services are source-pinned so production and dev do not fight over one global `pibo` symlink. Docker and swap are developer-host prerequisites only; verify them with `pibo setup doctor --require-docker --min-swap-gb 8`.
|
|
97
|
-
|
|
98
|
-
If the agent should be able to perform server administration, give that Linux user the required sudo or Docker permissions explicitly. Pibo does not need a special onboarding user to work correctly; normal Unix ownership is enough.
|
|
99
|
-
|
|
100
|
-
## Docker notes
|
|
101
|
-
|
|
102
|
-
Docker is optional. If you run Pibo in a container, avoid hard-coding `/root` unless the container is intentionally root-owned. Prefer mapping the host user's state into the container user's home:
|
|
103
|
-
|
|
104
|
-
```text
|
|
105
|
-
$HOME/.pibo -> /home/pibo/.pibo
|
|
106
|
-
$HOME/code -> /workspace/code
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Set `HOME` and `PIBO_HOME` consistently inside the container so the same path rule applies:
|
|
110
|
-
|
|
111
|
-
```text
|
|
112
|
-
HOME=/home/pibo
|
|
113
|
-
PIBO_HOME=/home/pibo/.pibo
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## Web gateway auth
|
|
117
|
-
|
|
118
|
-
`pibo gateway:web` starts the authenticated web runtime. It requires Better Auth configuration before production use. This step is intentionally not automated because you must create/select the Google OAuth client and allowed user list:
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
pibo config set auth.baseURL https://your-host.example
|
|
122
|
-
pibo config set auth.secret <at-least-32-characters>
|
|
123
|
-
pibo config set auth.googleClientId <google-client-id>
|
|
124
|
-
pibo config set auth.googleClientSecret <google-client-secret>
|
|
125
|
-
pibo config set auth.allowedEmails you@example.com
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
For local loopback testing, `auth.baseURL` can be `http://localhost:4788`.
|
|
129
|
-
|
|
130
|
-
## Development from source
|
|
131
|
-
|
|
132
|
-
Use source installs for development, not normal usage:
|
|
133
|
-
|
|
134
|
-
```bash
|
|
135
|
-
git clone git@github.com:Pascapone-server/pibo.git
|
|
136
|
-
cd pibo
|
|
137
|
-
npm install
|
|
138
|
-
npm run build
|
|
139
|
-
npm run start -- --help
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Useful scripts:
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
npm run dev -- --help
|
|
146
|
-
npm run profile -- codex
|
|
147
|
-
npm run tui:routed -- codex
|
|
148
|
-
npm run gateway
|
|
149
|
-
npm run gateway:web
|
|
150
|
-
npm test
|
|
151
|
-
npm run typecheck
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
## Main CLI areas
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
pibo config # local config under ${PIBO_HOME:-~/.pibo}/config.json
|
|
158
|
-
pibo mcp # discover and call configured MCP servers
|
|
159
|
-
pibo tools # install and inspect curated external CLI tools
|
|
160
|
-
pibo pi-packages # register Pi Coding Agent packages
|
|
161
|
-
pibo debug # inspect local Pibo data stores
|
|
162
|
-
pibo setup # plan user-host installs and developer-host upgrades
|
|
163
|
-
pibo profile # inspect runtime profiles
|
|
164
|
-
pibo tui # start the direct Pi TUI
|
|
165
|
-
pibo tui:routed # start the routed Pibo TUI
|
|
166
|
-
pibo gateway # local gateway runtime
|
|
167
|
-
pibo gateway:web # authenticated web gateway runtime
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
## Further docs
|
|
171
|
-
|
|
172
|
-
- `docs/architecture.md` describes runtime architecture and boundaries.
|
|
173
|
-
- `docs/mcp.md` documents MCP configuration and commands.
|
|
174
|
-
- `docs/tools.md` documents curated external CLI tools.
|
|
175
|
-
- `docs/pi-packages.md` documents Pi package registration.
|
|
176
|
-
- `docs/chat-rooms-event-log.md` documents Chat Web rooms and durable event storage.
|
|
177
|
-
- `docs/progress.md` is the short implementation status snapshot.
|
|
178
|
-
|
|
179
|
-
## Philosophy
|
|
180
|
-
|
|
181
|
-
Keep Pibo thin. Pi Coding Agent should remain the inner engine; Pibo owns only the product boundary: profiles, plugins, channels, routing, auth, policy, and operator tooling.
|
|
182
|
-
|
|
183
|
-
Optional integrations should stay outside the core package until installed. MCP servers, Python virtual environments, external CLIs, and user skills are configured on demand rather than bundled into every runtime.
|