@pasko70/pibo 1.4.1 → 1.4.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/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/dist/apps/chat/agent-store.js +82 -82
- package/dist/apps/chat/data/project-service.js +166 -166
- package/dist/apps/chat/data/read-state-service.js +18 -18
- package/dist/apps/chat/data/timeline-query-service.js +8 -8
- package/dist/apps/chat/model-catalog.js +5 -1
- package/dist/apps/chat/static-assets.js +853 -853
- package/dist/apps/chat/workflow-persistence.js +255 -255
- package/dist/apps/chat-ui/assets/{dist-7YaJd19a.js → dist-B2BEpL7n.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CiYeO8nN.js → dist-BAGS_xkV.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BIvPnn_C.js → dist-BAXNalar.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CjSI6y5z.js → dist-BwUvs6Ph.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-Ubstha8t.js → dist-C0zsJ8II.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-KXCMNKIL.js → dist-C3PnEkhb.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CVQU42Fn.js → dist-CYPL-B2Z.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BbNE72h8.js → dist-CiDSXgtg.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-D7TCkoFT.js → dist-DnACFKyO.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-ChSZNqKE.js → dist-ZB1-ui2y.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-8Noo5eCN.js → dist-vKlxFkTa.js} +1 -1
- package/dist/apps/chat-ui/assets/{index-CmxtUVG1.js → index-0x7tuTNX.js} +3 -3
- package/dist/apps/chat-ui/assets/{index-C25VYnyb.css → index-B-qaya1G.css} +1 -1
- package/dist/apps/chat-ui/index.html +18 -18
- package/dist/apps/chat-ui/manifest.webmanifest +25 -25
- package/dist/apps/chat-ui/sw.js +41 -41
- package/dist/apps/chat-vscode-web/index.html +12 -12
- package/dist/apps/cli-ui/cliSessionsCommand.js +23 -23
- package/dist/apps/context-files-ui/index.html +11 -11
- package/dist/apps/vscode-artifacts/latest.vsix +0 -0
- package/dist/apps/vscode-artifacts/{pibo-vscode-ext-1.4.1.vsix → pibo-vscode-ext-1.4.2.vsix} +0 -0
- package/dist/bin/pibo.js +0 -0
- package/dist/bin/rg.js +0 -0
- package/dist/cli.js +35 -35
- package/dist/compute/cli.js +54 -54
- package/dist/core/runtime.js +2 -0
- package/dist/core/session-router.js +1 -0
- package/dist/cron/cli.js +15 -15
- package/dist/cron/store.js +49 -49
- package/dist/data/cli.js +23 -23
- package/dist/data/event-log.js +23 -23
- package/dist/data/message-store.js +20 -20
- package/dist/data/navigation-store.js +9 -9
- package/dist/data/observation-store.js +4 -4
- package/dist/data/payload-store.js +17 -17
- package/dist/data/schema.js +429 -429
- package/dist/data/session-store.js +4 -4
- package/dist/data/telemetry-queries.js +54 -54
- package/dist/data/telemetry.js +156 -156
- package/dist/debug/events.js +12 -12
- package/dist/debug/failures.js +6 -6
- package/dist/debug/index.js +207 -207
- package/dist/debug/messages.js +6 -6
- package/dist/debug/pty.js +124 -124
- package/dist/debug/session.js +29 -29
- package/dist/debug/tools.js +5 -5
- package/dist/debug/web-snapshot-browser-scripts.js +294 -294
- package/dist/debug/web-streaming-browser-library.js +925 -925
- package/dist/debug/web-streaming-browser-scripts.js +232 -232
- package/dist/debug/web-streaming-provider-telemetry.js +4 -4
- package/dist/debug/web.js +93 -93
- package/dist/gateway/cli.js +19 -19
- package/dist/mcp/config-command.js +53 -53
- package/dist/mcp/index.js +21 -21
- package/dist/mcp/registry.js +11 -11
- package/dist/pi-packages/cli.js +11 -11
- package/dist/plugins/context-files-store.js +110 -110
- package/dist/plugins/context-files.js +4 -4
- package/dist/providers/glm.js +59 -0
- package/dist/ralph/cli.js +18 -18
- package/dist/ralph/templates.js +140 -140
- package/dist/reliability/store.js +226 -226
- package/dist/sessions/pibo-data-store.js +16 -16
- package/dist/sessions/sqlite-store.js +53 -53
- package/dist/setup/cli.js +58 -58
- package/dist/tools/agent-browser-wrapper.js +80 -80
- package/dist/tools/browser-use-cdp.js +12 -12
- package/dist/tools/browser-use-wrapper.js +762 -762
- package/dist/tools/guides.js +455 -455
- package/dist/tools/index.js +99 -99
- package/dist/tools/runtime/node-worker-source.js +205 -205
- package/dist/tools/runtime/python-worker-source.js +177 -177
- package/dist/vscode/cli.js +9 -9
- package/dist/web-annotations/cdp.js +900 -900
- package/dist/web-annotations/store.js +96 -96
- 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 +1 -1
- 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/apps/vscode-artifacts/pibo-vscode-1.3.0.vsix +0 -0
- package/dist/apps/vscode-artifacts/pibo-vscode-ext-1.3.3.vsix +0 -0
- package/dist/apps/vscode-artifacts/pibo-vscode-ext-1.3.4.vsix +0 -0
- package/dist/apps/vscode-artifacts/pibo-vscode-ext-1.3.5.vsix +0 -0
- package/dist/core/shared-app.js +0 -17
- package/dist/data/final-app-space-cutover-migration.js +0 -728
- package/dist/data/shared-app-migration.js +0 -757
- package/dist/session-ui/ownerViewModel.js +0 -27
- package/dist/shared-app.js +0 -4
|
@@ -179,11 +179,11 @@ export class WebAnnotationStore {
|
|
|
179
179
|
createdAt: timestamp,
|
|
180
180
|
updatedAt: timestamp,
|
|
181
181
|
};
|
|
182
|
-
this.db.prepare(`
|
|
183
|
-
INSERT OR IGNORE INTO web_annotation_bindings (
|
|
184
|
-
id, pibo_session_id, pibo_room_id, state, url, title, target_id,
|
|
185
|
-
created_at, updated_at, last_injected_at, closed_at, error, metadata_json
|
|
186
|
-
) VALUES (${Array.from({ length: BINDING_COLUMNS.length }, () => "?").join(", ")})
|
|
182
|
+
this.db.prepare(`
|
|
183
|
+
INSERT OR IGNORE INTO web_annotation_bindings (
|
|
184
|
+
id, pibo_session_id, pibo_room_id, state, url, title, target_id,
|
|
185
|
+
created_at, updated_at, last_injected_at, closed_at, error, metadata_json
|
|
186
|
+
) VALUES (${Array.from({ length: BINDING_COLUMNS.length }, () => "?").join(", ")})
|
|
187
187
|
`).run(binding.id, binding.piboSessionId, binding.piboRoomId ?? null, binding.state, binding.url, binding.title ?? null, binding.targetId ?? null, binding.createdAt, binding.updatedAt ?? null, null, null, null, stringifyJson(binding.metadata));
|
|
188
188
|
const existing = this.getBinding(binding.piboSessionId, binding.id);
|
|
189
189
|
if (!existing)
|
|
@@ -192,24 +192,24 @@ export class WebAnnotationStore {
|
|
|
192
192
|
}
|
|
193
193
|
listBindings(input) {
|
|
194
194
|
const limit = normalizeLimit(input.limit, 100, 500);
|
|
195
|
-
return this.db.prepare(`
|
|
196
|
-
SELECT * FROM web_annotation_bindings
|
|
197
|
-
WHERE pibo_session_id = ? AND state != 'removed'
|
|
198
|
-
ORDER BY created_at DESC, id DESC
|
|
199
|
-
LIMIT ?
|
|
195
|
+
return this.db.prepare(`
|
|
196
|
+
SELECT * FROM web_annotation_bindings
|
|
197
|
+
WHERE pibo_session_id = ? AND state != 'removed'
|
|
198
|
+
ORDER BY created_at DESC, id DESC
|
|
199
|
+
LIMIT ?
|
|
200
200
|
`).all(input.piboSessionId, limit).map(bindingFromRow);
|
|
201
201
|
}
|
|
202
202
|
getBinding(piboSessionId, id) {
|
|
203
|
-
const row = this.db.prepare(`
|
|
204
|
-
SELECT * FROM web_annotation_bindings
|
|
205
|
-
WHERE id = ? AND pibo_session_id = ?
|
|
203
|
+
const row = this.db.prepare(`
|
|
204
|
+
SELECT * FROM web_annotation_bindings
|
|
205
|
+
WHERE id = ? AND pibo_session_id = ?
|
|
206
206
|
`).get(id, piboSessionId);
|
|
207
207
|
return row ? bindingFromRow(row) : undefined;
|
|
208
208
|
}
|
|
209
209
|
getBindingById(id) {
|
|
210
|
-
const row = this.db.prepare(`
|
|
211
|
-
SELECT * FROM web_annotation_bindings
|
|
212
|
-
WHERE id = ? AND state != 'removed'
|
|
210
|
+
const row = this.db.prepare(`
|
|
211
|
+
SELECT * FROM web_annotation_bindings
|
|
212
|
+
WHERE id = ? AND state != 'removed'
|
|
213
213
|
`).get(id);
|
|
214
214
|
return row ? bindingFromRow(row) : undefined;
|
|
215
215
|
}
|
|
@@ -221,18 +221,18 @@ export class WebAnnotationStore {
|
|
|
221
221
|
return undefined;
|
|
222
222
|
const state = normalized.state ?? existing.state;
|
|
223
223
|
const timestamp = nowIso(now);
|
|
224
|
-
this.db.prepare(`
|
|
225
|
-
UPDATE web_annotation_bindings
|
|
226
|
-
SET state = ?, title = ?, target_id = ?, updated_at = ?, last_injected_at = ?, closed_at = ?, error = ?, metadata_json = ?
|
|
227
|
-
WHERE id = ? AND pibo_session_id = ?
|
|
224
|
+
this.db.prepare(`
|
|
225
|
+
UPDATE web_annotation_bindings
|
|
226
|
+
SET state = ?, title = ?, target_id = ?, updated_at = ?, last_injected_at = ?, closed_at = ?, error = ?, metadata_json = ?
|
|
227
|
+
WHERE id = ? AND pibo_session_id = ?
|
|
228
228
|
`).run(state, normalized.title !== undefined ? normalized.title : existing.title ?? null, normalized.targetId !== undefined ? normalized.targetId : existing.targetId ?? null, timestamp, normalized.lastInjectedAt !== undefined ? normalized.lastInjectedAt : existing.lastInjectedAt ?? null, normalized.closedAt !== undefined ? normalized.closedAt : existing.closedAt ?? null, normalized.error !== undefined ? normalized.error : existing.error ?? null, normalized.metadata !== undefined ? stringifyJson(normalized.metadata) : stringifyJson(existing.metadata), id, piboSessionId);
|
|
229
229
|
return this.getBinding(piboSessionId, id);
|
|
230
230
|
}
|
|
231
231
|
removeBinding(piboSessionId, id, now = new Date()) {
|
|
232
|
-
const result = this.db.prepare(`
|
|
233
|
-
UPDATE web_annotation_bindings
|
|
234
|
-
SET state = 'removed', updated_at = ?
|
|
235
|
-
WHERE id = ? AND pibo_session_id = ?
|
|
232
|
+
const result = this.db.prepare(`
|
|
233
|
+
UPDATE web_annotation_bindings
|
|
234
|
+
SET state = 'removed', updated_at = ?
|
|
235
|
+
WHERE id = ? AND pibo_session_id = ?
|
|
236
236
|
`).run(nowIso(now), id, piboSessionId);
|
|
237
237
|
return Number(result.changes ?? 0) > 0;
|
|
238
238
|
}
|
|
@@ -258,12 +258,12 @@ export class WebAnnotationStore {
|
|
|
258
258
|
createdAt: timestamp,
|
|
259
259
|
updatedAt: timestamp,
|
|
260
260
|
};
|
|
261
|
-
this.db.prepare(`
|
|
262
|
-
INSERT OR IGNORE INTO web_annotations (
|
|
263
|
-
id, pibo_session_id, pibo_room_id, binding_id, status, note, url, title,
|
|
264
|
-
target_id, target_kind, viewport_json, target_json, screenshot_ref_json, thread_json,
|
|
265
|
-
created_at, updated_at, resolved_at, resolved_by, summary, metadata_json
|
|
266
|
-
) VALUES (${Array.from({ length: ANNOTATION_COLUMNS.length }, () => "?").join(", ")})
|
|
261
|
+
this.db.prepare(`
|
|
262
|
+
INSERT OR IGNORE INTO web_annotations (
|
|
263
|
+
id, pibo_session_id, pibo_room_id, binding_id, status, note, url, title,
|
|
264
|
+
target_id, target_kind, viewport_json, target_json, screenshot_ref_json, thread_json,
|
|
265
|
+
created_at, updated_at, resolved_at, resolved_by, summary, metadata_json
|
|
266
|
+
) VALUES (${Array.from({ length: ANNOTATION_COLUMNS.length }, () => "?").join(", ")})
|
|
267
267
|
`).run(annotation.id, annotation.piboSessionId, annotation.piboRoomId ?? null, annotation.bindingId ?? null, annotation.status, annotation.note, annotation.url, annotation.title ?? null, annotation.targetId ?? null, annotation.targetKind, stringifyJson(annotation.viewport), stringifyJson(annotation.target), stringifyJson(annotation.screenshotRef), null, annotation.createdAt, annotation.updatedAt ?? null, null, null, null, stringifyJson(annotation.metadata));
|
|
268
268
|
const existing = this.getAnnotation(annotation.piboSessionId, annotation.id);
|
|
269
269
|
if (!existing)
|
|
@@ -285,24 +285,24 @@ export class WebAnnotationStore {
|
|
|
285
285
|
values.push(input.status);
|
|
286
286
|
}
|
|
287
287
|
const where = clauses.length ? `WHERE ${clauses.join(" AND ")}` : "";
|
|
288
|
-
return this.db.prepare(`
|
|
289
|
-
SELECT * FROM web_annotations
|
|
290
|
-
${where}
|
|
291
|
-
ORDER BY created_at DESC, id DESC
|
|
292
|
-
LIMIT ?
|
|
288
|
+
return this.db.prepare(`
|
|
289
|
+
SELECT * FROM web_annotations
|
|
290
|
+
${where}
|
|
291
|
+
ORDER BY created_at DESC, id DESC
|
|
292
|
+
LIMIT ?
|
|
293
293
|
`).all(...values, limit).map(annotationFromRow);
|
|
294
294
|
}
|
|
295
295
|
getAnnotation(piboSessionId, id) {
|
|
296
|
-
const row = this.db.prepare(`
|
|
297
|
-
SELECT * FROM web_annotations
|
|
298
|
-
WHERE id = ? AND pibo_session_id = ?
|
|
296
|
+
const row = this.db.prepare(`
|
|
297
|
+
SELECT * FROM web_annotations
|
|
298
|
+
WHERE id = ? AND pibo_session_id = ?
|
|
299
299
|
`).get(id, piboSessionId);
|
|
300
300
|
return row ? annotationFromRow(row) : undefined;
|
|
301
301
|
}
|
|
302
302
|
getAnnotationById(id) {
|
|
303
|
-
const row = this.db.prepare(`
|
|
304
|
-
SELECT * FROM web_annotations
|
|
305
|
-
WHERE id = ?
|
|
303
|
+
const row = this.db.prepare(`
|
|
304
|
+
SELECT * FROM web_annotations
|
|
305
|
+
WHERE id = ?
|
|
306
306
|
`).get(id);
|
|
307
307
|
return row ? annotationFromRow(row) : undefined;
|
|
308
308
|
}
|
|
@@ -315,10 +315,10 @@ export class WebAnnotationStore {
|
|
|
315
315
|
const timestamp = nowIso(now);
|
|
316
316
|
const status = normalized.status ?? existing.status;
|
|
317
317
|
const resolvedAt = status === "resolved" && !existing.resolvedAt ? timestamp : existing.resolvedAt ?? null;
|
|
318
|
-
this.db.prepare(`
|
|
319
|
-
UPDATE web_annotations
|
|
320
|
-
SET status = ?, updated_at = ?, resolved_at = ?, resolved_by = ?, summary = ?, metadata_json = ?
|
|
321
|
-
WHERE id = ? AND pibo_session_id = ?
|
|
318
|
+
this.db.prepare(`
|
|
319
|
+
UPDATE web_annotations
|
|
320
|
+
SET status = ?, updated_at = ?, resolved_at = ?, resolved_by = ?, summary = ?, metadata_json = ?
|
|
321
|
+
WHERE id = ? AND pibo_session_id = ?
|
|
322
322
|
`).run(status, timestamp, resolvedAt, normalized.resolvedBy !== undefined ? normalized.resolvedBy : existing.resolvedBy ?? null, normalized.summary !== undefined ? normalized.summary : existing.summary ?? null, normalized.metadata !== undefined ? stringifyJson(normalized.metadata) : stringifyJson(existing.metadata), id, piboSessionId);
|
|
323
323
|
return this.getAnnotation(piboSessionId, id);
|
|
324
324
|
}
|
|
@@ -344,61 +344,61 @@ export class WebAnnotationStore {
|
|
|
344
344
|
...thread,
|
|
345
345
|
{ id: normalized.id ?? `wat_${randomUUID()}`, role: normalized.role, content: normalized.content, createdAt: timestamp },
|
|
346
346
|
];
|
|
347
|
-
this.db.prepare(`
|
|
348
|
-
UPDATE web_annotations
|
|
349
|
-
SET thread_json = ?, updated_at = ?
|
|
350
|
-
WHERE id = ? AND pibo_session_id = ?
|
|
347
|
+
this.db.prepare(`
|
|
348
|
+
UPDATE web_annotations
|
|
349
|
+
SET thread_json = ?, updated_at = ?
|
|
350
|
+
WHERE id = ? AND pibo_session_id = ?
|
|
351
351
|
`).run(stringifyJson(nextThread), timestamp, normalized.annotationId, normalized.piboSessionId);
|
|
352
352
|
return this.getAnnotation(normalized.piboSessionId, normalized.annotationId);
|
|
353
353
|
}
|
|
354
354
|
applySchema() {
|
|
355
|
-
this.db.exec(`
|
|
356
|
-
CREATE TABLE IF NOT EXISTS web_annotation_bindings (
|
|
357
|
-
id TEXT PRIMARY KEY,
|
|
358
|
-
pibo_session_id TEXT NOT NULL,
|
|
359
|
-
pibo_room_id TEXT,
|
|
360
|
-
state TEXT NOT NULL,
|
|
361
|
-
url TEXT NOT NULL,
|
|
362
|
-
title TEXT,
|
|
363
|
-
target_id TEXT,
|
|
364
|
-
created_at TEXT NOT NULL,
|
|
365
|
-
updated_at TEXT,
|
|
366
|
-
last_injected_at TEXT,
|
|
367
|
-
closed_at TEXT,
|
|
368
|
-
error TEXT,
|
|
369
|
-
metadata_json TEXT
|
|
370
|
-
);
|
|
371
|
-
CREATE INDEX IF NOT EXISTS idx_web_annotation_bindings_session
|
|
372
|
-
ON web_annotation_bindings(pibo_session_id, created_at DESC);
|
|
373
|
-
CREATE INDEX IF NOT EXISTS idx_web_annotation_bindings_target
|
|
374
|
-
ON web_annotation_bindings(target_id, state);
|
|
375
|
-
|
|
376
|
-
CREATE TABLE IF NOT EXISTS web_annotations (
|
|
377
|
-
id TEXT PRIMARY KEY,
|
|
378
|
-
pibo_session_id TEXT NOT NULL,
|
|
379
|
-
pibo_room_id TEXT,
|
|
380
|
-
binding_id TEXT,
|
|
381
|
-
status TEXT NOT NULL,
|
|
382
|
-
note TEXT NOT NULL,
|
|
383
|
-
url TEXT NOT NULL,
|
|
384
|
-
title TEXT,
|
|
385
|
-
target_id TEXT,
|
|
386
|
-
target_kind TEXT NOT NULL,
|
|
387
|
-
viewport_json TEXT NOT NULL,
|
|
388
|
-
target_json TEXT,
|
|
389
|
-
screenshot_ref_json TEXT,
|
|
390
|
-
thread_json TEXT,
|
|
391
|
-
created_at TEXT NOT NULL,
|
|
392
|
-
updated_at TEXT,
|
|
393
|
-
resolved_at TEXT,
|
|
394
|
-
resolved_by TEXT,
|
|
395
|
-
summary TEXT,
|
|
396
|
-
metadata_json TEXT
|
|
397
|
-
);
|
|
398
|
-
CREATE INDEX IF NOT EXISTS idx_web_annotations_session_status_created
|
|
399
|
-
ON web_annotations(pibo_session_id, status, created_at DESC);
|
|
400
|
-
CREATE INDEX IF NOT EXISTS idx_web_annotations_session_created
|
|
401
|
-
ON web_annotations(pibo_session_id, created_at DESC);
|
|
355
|
+
this.db.exec(`
|
|
356
|
+
CREATE TABLE IF NOT EXISTS web_annotation_bindings (
|
|
357
|
+
id TEXT PRIMARY KEY,
|
|
358
|
+
pibo_session_id TEXT NOT NULL,
|
|
359
|
+
pibo_room_id TEXT,
|
|
360
|
+
state TEXT NOT NULL,
|
|
361
|
+
url TEXT NOT NULL,
|
|
362
|
+
title TEXT,
|
|
363
|
+
target_id TEXT,
|
|
364
|
+
created_at TEXT NOT NULL,
|
|
365
|
+
updated_at TEXT,
|
|
366
|
+
last_injected_at TEXT,
|
|
367
|
+
closed_at TEXT,
|
|
368
|
+
error TEXT,
|
|
369
|
+
metadata_json TEXT
|
|
370
|
+
);
|
|
371
|
+
CREATE INDEX IF NOT EXISTS idx_web_annotation_bindings_session
|
|
372
|
+
ON web_annotation_bindings(pibo_session_id, created_at DESC);
|
|
373
|
+
CREATE INDEX IF NOT EXISTS idx_web_annotation_bindings_target
|
|
374
|
+
ON web_annotation_bindings(target_id, state);
|
|
375
|
+
|
|
376
|
+
CREATE TABLE IF NOT EXISTS web_annotations (
|
|
377
|
+
id TEXT PRIMARY KEY,
|
|
378
|
+
pibo_session_id TEXT NOT NULL,
|
|
379
|
+
pibo_room_id TEXT,
|
|
380
|
+
binding_id TEXT,
|
|
381
|
+
status TEXT NOT NULL,
|
|
382
|
+
note TEXT NOT NULL,
|
|
383
|
+
url TEXT NOT NULL,
|
|
384
|
+
title TEXT,
|
|
385
|
+
target_id TEXT,
|
|
386
|
+
target_kind TEXT NOT NULL,
|
|
387
|
+
viewport_json TEXT NOT NULL,
|
|
388
|
+
target_json TEXT,
|
|
389
|
+
screenshot_ref_json TEXT,
|
|
390
|
+
thread_json TEXT,
|
|
391
|
+
created_at TEXT NOT NULL,
|
|
392
|
+
updated_at TEXT,
|
|
393
|
+
resolved_at TEXT,
|
|
394
|
+
resolved_by TEXT,
|
|
395
|
+
summary TEXT,
|
|
396
|
+
metadata_json TEXT
|
|
397
|
+
);
|
|
398
|
+
CREATE INDEX IF NOT EXISTS idx_web_annotations_session_status_created
|
|
399
|
+
ON web_annotations(pibo_session_id, status, created_at DESC);
|
|
400
|
+
CREATE INDEX IF NOT EXISTS idx_web_annotations_session_created
|
|
401
|
+
ON web_annotations(pibo_session_id, created_at DESC);
|
|
402
402
|
`);
|
|
403
403
|
}
|
|
404
404
|
}
|
package/docs/README.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
# Pibo Documentation
|
|
2
|
-
|
|
3
|
-
This directory is the single home for project documentation, specs, plans, and reports.
|
|
4
|
-
|
|
5
|
-
## Structure
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
docs/
|
|
9
|
-
project/ Normal/current project docs and other canonical documentation
|
|
10
|
-
specs/ Product, technical, and implementation specifications
|
|
11
|
-
plans/ Implementation plans and design plans
|
|
12
|
-
reports/ Investigation reports, validation reports, and generated report artifacts
|
|
13
|
-
legacy/ Previous documentation set kept for reference
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Rules
|
|
17
|
-
|
|
18
|
-
- Put normal/current project docs and other canonical documentation in `docs/project/`.
|
|
19
|
-
- Put specifications in `docs/specs/`.
|
|
20
|
-
- Put implementation plans in `docs/plans/`.
|
|
21
|
-
- Put investigation, validation, and incident reports in `docs/reports/`.
|
|
22
|
-
- Do not create new root-level `plans/`, `reports/`, or `specs/` directories.
|
|
23
|
-
- Do not delete legacy docs unless there is a separate cleanup decision.
|
|
1
|
+
# Pibo Documentation
|
|
2
|
+
|
|
3
|
+
This directory is the single home for project documentation, specs, plans, and reports.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
docs/
|
|
9
|
+
project/ Normal/current project docs and other canonical documentation
|
|
10
|
+
specs/ Product, technical, and implementation specifications
|
|
11
|
+
plans/ Implementation plans and design plans
|
|
12
|
+
reports/ Investigation reports, validation reports, and generated report artifacts
|
|
13
|
+
legacy/ Previous documentation set kept for reference
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- Put normal/current project docs and other canonical documentation in `docs/project/`.
|
|
19
|
+
- Put specifications in `docs/specs/`.
|
|
20
|
+
- Put implementation plans in `docs/plans/`.
|
|
21
|
+
- Put investigation, validation, and incident reports in `docs/reports/`.
|
|
22
|
+
- Do not create new root-level `plans/`, `reports/`, or `specs/` directories.
|
|
23
|
+
- Do not delete legacy docs unless there is a separate cleanup decision.
|
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
# Install Pibo as a Developer Host
|
|
2
|
-
|
|
3
|
-
Use this path when the host is used to develop Pibo itself.
|
|
4
|
-
|
|
5
|
-
## Philosophy
|
|
6
|
-
|
|
7
|
-
Production must stay stable while development moves quickly. The dev gateway can restart, fail, or deploy the `dev` branch without interrupting the main production gateway.
|
|
8
|
-
|
|
9
|
-
Docker compute workers are part of the developer setup. Each agent should get its own isolated container and gateway so agent restarts do not disturb other agents or the host gateways.
|
|
10
|
-
|
|
11
|
-
## Target layout
|
|
12
|
-
|
|
13
|
-
```text
|
|
14
|
-
/root/code/pibo main / production
|
|
15
|
-
/root/code/pibo/.worktrees/dev dev / development
|
|
16
|
-
|
|
17
|
-
/root/.pibo production data
|
|
18
|
-
/root/.pibo-dev development data
|
|
19
|
-
|
|
20
|
-
pibo-web.service prod web 4788, gateway 4789
|
|
21
|
-
pibo-web-dev.service dev web 4808, gateway 4809
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Remotes
|
|
25
|
-
|
|
26
|
-
Each developer host should use its own fork as `origin` and the canonical repo as `upstream`:
|
|
27
|
-
|
|
28
|
-
```text
|
|
29
|
-
origin git@github.com:<server-or-user-fork>/pibo.git
|
|
30
|
-
upstream git@github.com:Pascapone/pibo.git
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Plan the setup
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
pibo setup developer-host \
|
|
37
|
-
--origin git@github.com:<server-or-user-fork>/pibo.git \
|
|
38
|
-
--upstream git@github.com:Pascapone/pibo.git \
|
|
39
|
-
--prod-domain pibo.example.com \
|
|
40
|
-
--dev-domain dev.pibo.example.com \
|
|
41
|
-
--print-files
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Review the generated systemd units, dev start wrapper, environment template, and Caddyfile. Stage files before applying when testing a fresh host:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
pibo setup developer-host \
|
|
48
|
-
--origin git@github.com:<server-or-user-fork>/pibo.git \
|
|
49
|
-
--prod-domain pibo.example.com \
|
|
50
|
-
--dev-domain dev.pibo.example.com \
|
|
51
|
-
--write-to /tmp/pibo-setup
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Apply after review:
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
pibo setup developer-host \
|
|
58
|
-
--origin git@github.com:<server-or-user-fork>/pibo.git \
|
|
59
|
-
--prod-domain pibo.example.com \
|
|
60
|
-
--dev-domain dev.pibo.example.com \
|
|
61
|
-
--apply --yes
|
|
62
|
-
systemctl daemon-reload
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## Important detail: service pinning
|
|
66
|
-
|
|
67
|
-
Do not globally install the dev worktree over the production install. `npm install -g .` from a local checkout creates a global symlink to that checkout; running it again from the dev worktree can accidentally move `/usr/bin/pibo` to dev.
|
|
68
|
-
|
|
69
|
-
The generated developer services avoid this by pinning production to:
|
|
70
|
-
|
|
71
|
-
```text
|
|
72
|
-
/usr/bin/node /root/code/pibo/dist/bin/pibo.js
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
and dev to the wrapper in `/usr/local/bin/pibo-web-dev-start.mjs`, which imports the dev worktree directly.
|
|
76
|
-
|
|
77
|
-
Run this in each checkout/worktree instead:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
npm ci
|
|
81
|
-
npm run build
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Important detail: dev internal gateway port
|
|
85
|
-
|
|
86
|
-
Do not start dev only with:
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
pibo gateway:web --web-port 4808
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
That changes the web port but leaves the internal gateway at the default `4789`, which collides with production. The generated developer setup uses a wrapper that calls `runWebGatewayServer` with:
|
|
93
|
-
|
|
94
|
-
```text
|
|
95
|
-
web port: 4808
|
|
96
|
-
internal port: 4809
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Validate
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
systemctl is-active pibo-web
|
|
103
|
-
systemctl is-active pibo-web-dev
|
|
104
|
-
pibo gateway web status
|
|
105
|
-
PIBO_GATEWAY_DEV_PORT=4808 pibo gateway dev status
|
|
106
|
-
pibo setup doctor --domain pibo.example.com --dev-domain dev.pibo.example.com --expected-ip <server-ip> --require-docker --min-swap-gb 8
|
|
107
|
-
pibo compute spawn --help
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
DNS must point to the host before Caddy can issue public certificates.
|
|
111
|
-
|
|
112
|
-
Docker and swap are developer-host prerequisites only. User-host installs can ignore Docker and swap. The setup command does not create swap automatically; provision it at the OS level, then verify it with `pibo setup doctor --min-swap-gb 8`.
|
|
1
|
+
# Install Pibo as a Developer Host
|
|
2
|
+
|
|
3
|
+
Use this path when the host is used to develop Pibo itself.
|
|
4
|
+
|
|
5
|
+
## Philosophy
|
|
6
|
+
|
|
7
|
+
Production must stay stable while development moves quickly. The dev gateway can restart, fail, or deploy the `dev` branch without interrupting the main production gateway.
|
|
8
|
+
|
|
9
|
+
Docker compute workers are part of the developer setup. Each agent should get its own isolated container and gateway so agent restarts do not disturb other agents or the host gateways.
|
|
10
|
+
|
|
11
|
+
## Target layout
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
/root/code/pibo main / production
|
|
15
|
+
/root/code/pibo/.worktrees/dev dev / development
|
|
16
|
+
|
|
17
|
+
/root/.pibo production data
|
|
18
|
+
/root/.pibo-dev development data
|
|
19
|
+
|
|
20
|
+
pibo-web.service prod web 4788, gateway 4789
|
|
21
|
+
pibo-web-dev.service dev web 4808, gateway 4809
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Remotes
|
|
25
|
+
|
|
26
|
+
Each developer host should use its own fork as `origin` and the canonical repo as `upstream`:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
origin git@github.com:<server-or-user-fork>/pibo.git
|
|
30
|
+
upstream git@github.com:Pascapone/pibo.git
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Plan the setup
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pibo setup developer-host \
|
|
37
|
+
--origin git@github.com:<server-or-user-fork>/pibo.git \
|
|
38
|
+
--upstream git@github.com:Pascapone/pibo.git \
|
|
39
|
+
--prod-domain pibo.example.com \
|
|
40
|
+
--dev-domain dev.pibo.example.com \
|
|
41
|
+
--print-files
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Review the generated systemd units, dev start wrapper, environment template, and Caddyfile. Stage files before applying when testing a fresh host:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pibo setup developer-host \
|
|
48
|
+
--origin git@github.com:<server-or-user-fork>/pibo.git \
|
|
49
|
+
--prod-domain pibo.example.com \
|
|
50
|
+
--dev-domain dev.pibo.example.com \
|
|
51
|
+
--write-to /tmp/pibo-setup
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Apply after review:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pibo setup developer-host \
|
|
58
|
+
--origin git@github.com:<server-or-user-fork>/pibo.git \
|
|
59
|
+
--prod-domain pibo.example.com \
|
|
60
|
+
--dev-domain dev.pibo.example.com \
|
|
61
|
+
--apply --yes
|
|
62
|
+
systemctl daemon-reload
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Important detail: service pinning
|
|
66
|
+
|
|
67
|
+
Do not globally install the dev worktree over the production install. `npm install -g .` from a local checkout creates a global symlink to that checkout; running it again from the dev worktree can accidentally move `/usr/bin/pibo` to dev.
|
|
68
|
+
|
|
69
|
+
The generated developer services avoid this by pinning production to:
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
/usr/bin/node /root/code/pibo/dist/bin/pibo.js
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
and dev to the wrapper in `/usr/local/bin/pibo-web-dev-start.mjs`, which imports the dev worktree directly.
|
|
76
|
+
|
|
77
|
+
Run this in each checkout/worktree instead:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm ci
|
|
81
|
+
npm run build
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Important detail: dev internal gateway port
|
|
85
|
+
|
|
86
|
+
Do not start dev only with:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pibo gateway:web --web-port 4808
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
That changes the web port but leaves the internal gateway at the default `4789`, which collides with production. The generated developer setup uses a wrapper that calls `runWebGatewayServer` with:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
web port: 4808
|
|
96
|
+
internal port: 4809
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Validate
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
systemctl is-active pibo-web
|
|
103
|
+
systemctl is-active pibo-web-dev
|
|
104
|
+
pibo gateway web status
|
|
105
|
+
PIBO_GATEWAY_DEV_PORT=4808 pibo gateway dev status
|
|
106
|
+
pibo setup doctor --domain pibo.example.com --dev-domain dev.pibo.example.com --expected-ip <server-ip> --require-docker --min-swap-gb 8
|
|
107
|
+
pibo compute spawn --help
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
DNS must point to the host before Caddy can issue public certificates.
|
|
111
|
+
|
|
112
|
+
Docker and swap are developer-host prerequisites only. User-host installs can ignore Docker and swap. The setup command does not create swap automatically; provision it at the OS level, then verify it with `pibo setup doctor --min-swap-gb 8`.
|