@pasko70/pibo 1.9.2 → 1.9.4
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 +248 -248
- package/dist/apps/chat/data/project-service.js +168 -168
- package/dist/apps/chat/data/read-state-service.js +18 -18
- package/dist/apps/chat/data/session-query-service.js +25 -25
- package/dist/apps/chat/data/timeline-query-service.js +14 -14
- package/dist/apps/chat/static-assets.js +854 -854
- package/dist/apps/chat/workflow-persistence.js +255 -255
- package/dist/apps/chat-ui/assets/{dist-CjYtD7ZT.js → dist-9a5adSX0.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-9lsp1UpA.js → dist-BJftG-mN.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-2KdPXbMT.js → dist-BmIDFlGO.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BWbWIOcD.js → dist-CCNYUBAQ.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-Cge8JklW.js → dist-Cmr0ZAV7.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-DFhhiR8M.js → dist-Crc-B1sZ.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-5GM30SQK.js → dist-DHPwmWcR.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-C-5u2QIS.js → dist-U3lqQ0aI.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-Idz5kzy8.js → dist-_poCjCWK.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-Etxmpyxg.js → dist-ffW7mw39.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BYKMZlI0.js → dist-w2d_3LSu.js} +1 -1
- package/dist/apps/chat-ui/assets/{index-BqD_bm7z.js → index-rXMhSu4U.js} +9 -9
- package/dist/apps/chat-ui/index.html +17 -17
- package/dist/apps/chat-ui/manifest.webmanifest +25 -25
- package/dist/apps/chat-ui/sw.js +47 -47
- package/dist/apps/chat-vscode-web/assets/index-BAMxIaI_.js +41 -0
- package/dist/apps/chat-vscode-web/index.html +13 -13
- package/dist/apps/cli-ui/cliSessionsCommand.js +23 -23
- package/dist/apps/context-files-ui/index.html +11 -11
- package/dist/cli.js +39 -39
- package/dist/compute/cli.js +54 -54
- package/dist/core/session-router.js +5 -2
- 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 +431 -431
- package/dist/data/session-store.js +4 -4
- package/dist/data/telemetry-queries.js +54 -54
- package/dist/data/telemetry.js +197 -197
- package/dist/debug/events.js +12 -12
- package/dist/debug/failures.js +6 -6
- package/dist/debug/index.js +227 -227
- 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/ralph/cli.js +18 -18
- package/dist/ralph/templates.js +140 -140
- package/dist/reliability/store.js +226 -226
- package/dist/session-ui/sessionActivity.js +30 -0
- 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/signals/projector.js +26 -11
- package/dist/signals/registry.js +41 -0
- 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 +538 -538
- 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 +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/apps/chat-vscode-web/assets/index-Cst9OUkC.js +0 -41
- package/dist/session-ui/activeTurn.js +0 -126
package/dist/data/event-log.js
CHANGED
|
@@ -12,29 +12,29 @@ export class PiboEventLogStore {
|
|
|
12
12
|
}
|
|
13
13
|
const createdAt = input.createdAt ?? new Date().toISOString();
|
|
14
14
|
const eventId = input.eventId ?? `evt_${randomUUID()}`;
|
|
15
|
-
const result = this.db.prepare(`
|
|
16
|
-
INSERT OR IGNORE INTO event_log (
|
|
17
|
-
session_id,
|
|
18
|
-
session_sequence,
|
|
19
|
-
room_id,
|
|
20
|
-
topic,
|
|
21
|
-
type,
|
|
22
|
-
source,
|
|
23
|
-
actor_type,
|
|
24
|
-
actor_id,
|
|
25
|
-
turn_id,
|
|
26
|
-
event_id,
|
|
27
|
-
tool_call_id,
|
|
28
|
-
run_id,
|
|
29
|
-
workflow_run_id,
|
|
30
|
-
idempotency_key,
|
|
31
|
-
retention_class,
|
|
32
|
-
payload_ref,
|
|
33
|
-
preview_text,
|
|
34
|
-
attributes_json,
|
|
35
|
-
created_at,
|
|
36
|
-
indexed_at
|
|
37
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
15
|
+
const result = this.db.prepare(`
|
|
16
|
+
INSERT OR IGNORE INTO event_log (
|
|
17
|
+
session_id,
|
|
18
|
+
session_sequence,
|
|
19
|
+
room_id,
|
|
20
|
+
topic,
|
|
21
|
+
type,
|
|
22
|
+
source,
|
|
23
|
+
actor_type,
|
|
24
|
+
actor_id,
|
|
25
|
+
turn_id,
|
|
26
|
+
event_id,
|
|
27
|
+
tool_call_id,
|
|
28
|
+
run_id,
|
|
29
|
+
workflow_run_id,
|
|
30
|
+
idempotency_key,
|
|
31
|
+
retention_class,
|
|
32
|
+
payload_ref,
|
|
33
|
+
preview_text,
|
|
34
|
+
attributes_json,
|
|
35
|
+
created_at,
|
|
36
|
+
indexed_at
|
|
37
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
38
38
|
`).run(input.sessionId ?? null, input.sessionSequence ?? null, input.roomId ?? null, input.topic, input.type, input.source, input.actorType ?? null, input.actorId ?? null, input.turnId ?? null, eventId, input.toolCallId ?? null, input.runId ?? null, input.workflowRunId ?? null, input.idempotencyKey ?? null, input.retentionClass, input.payloadRef ?? null, input.previewText ?? null, JSON.stringify(input.attributes ?? {}), createdAt, input.indexedAt ?? null);
|
|
39
39
|
if (input.idempotencyKey) {
|
|
40
40
|
const existing = this.findByIdempotencyKey(input.idempotencyKey);
|
|
@@ -4,26 +4,26 @@ export class MessageStore {
|
|
|
4
4
|
this.db = db;
|
|
5
5
|
}
|
|
6
6
|
insertMessage(input) {
|
|
7
|
-
this.db.prepare(`
|
|
8
|
-
INSERT INTO chat_messages (
|
|
9
|
-
id,
|
|
10
|
-
session_id,
|
|
11
|
-
room_id,
|
|
12
|
-
sequence,
|
|
13
|
-
turn_id,
|
|
14
|
-
role,
|
|
15
|
-
actor_id,
|
|
16
|
-
status,
|
|
17
|
-
created_at,
|
|
18
|
-
completed_at,
|
|
19
|
-
content_preview,
|
|
20
|
-
content_payload_ref,
|
|
21
|
-
source_stream_id,
|
|
22
|
-
input_tokens,
|
|
23
|
-
output_tokens,
|
|
24
|
-
cost_usd,
|
|
25
|
-
attributes_json
|
|
26
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
7
|
+
this.db.prepare(`
|
|
8
|
+
INSERT INTO chat_messages (
|
|
9
|
+
id,
|
|
10
|
+
session_id,
|
|
11
|
+
room_id,
|
|
12
|
+
sequence,
|
|
13
|
+
turn_id,
|
|
14
|
+
role,
|
|
15
|
+
actor_id,
|
|
16
|
+
status,
|
|
17
|
+
created_at,
|
|
18
|
+
completed_at,
|
|
19
|
+
content_preview,
|
|
20
|
+
content_payload_ref,
|
|
21
|
+
source_stream_id,
|
|
22
|
+
input_tokens,
|
|
23
|
+
output_tokens,
|
|
24
|
+
cost_usd,
|
|
25
|
+
attributes_json
|
|
26
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
27
27
|
`).run(input.id, input.sessionId, input.roomId ?? null, input.sequence, input.turnId ?? null, input.role, input.actorId ?? null, input.status, input.createdAt, input.completedAt ?? null, input.contentPreview ?? null, input.contentPayloadRef ?? null, input.sourceStreamId ?? null, input.inputTokens ?? null, input.outputTokens ?? null, input.costUsd ?? null, JSON.stringify(input.attributes ?? {}));
|
|
28
28
|
const stored = this.getMessage(input.id);
|
|
29
29
|
if (!stored)
|
|
@@ -22,10 +22,10 @@ export class NavigationStore {
|
|
|
22
22
|
"sort_key = excluded.sort_key",
|
|
23
23
|
"updated_at = excluded.updated_at",
|
|
24
24
|
];
|
|
25
|
-
this.db.prepare(`
|
|
26
|
-
INSERT INTO session_navigation (${insertColumns.join(", ")})
|
|
27
|
-
VALUES (${insertColumns.map(() => "?").join(", ")})
|
|
28
|
-
ON CONFLICT(session_id) DO UPDATE SET ${assignments.join(", ")}
|
|
25
|
+
this.db.prepare(`
|
|
26
|
+
INSERT INTO session_navigation (${insertColumns.join(", ")})
|
|
27
|
+
VALUES (${insertColumns.map(() => "?").join(", ")})
|
|
28
|
+
ON CONFLICT(session_id) DO UPDATE SET ${assignments.join(", ")}
|
|
29
29
|
`).run(input.roomId ?? null, input.sessionId, input.rootSessionId ?? null, input.parentId ?? null, input.originId ?? null, input.title, input.profile, input.status, input.archivedAt ?? null, input.lastActivityAt, input.lastMessagePreview ?? null, input.childCount ?? 0, input.sortKey, input.updatedAt);
|
|
30
30
|
const stored = this.getSession(input.sessionId);
|
|
31
31
|
if (!stored)
|
|
@@ -46,11 +46,11 @@ export class NavigationStore {
|
|
|
46
46
|
if (!input.includeArchived)
|
|
47
47
|
clauses.push("archived_at IS NULL");
|
|
48
48
|
const limit = Math.max(1, Math.min(input.limit ?? 100, 1000));
|
|
49
|
-
const rows = this.db.prepare(`
|
|
50
|
-
SELECT * FROM session_navigation
|
|
51
|
-
${clauses.length ? `WHERE ${clauses.join(" AND ")}` : ""}
|
|
52
|
-
ORDER BY sort_key DESC, updated_at DESC
|
|
53
|
-
LIMIT ?
|
|
49
|
+
const rows = this.db.prepare(`
|
|
50
|
+
SELECT * FROM session_navigation
|
|
51
|
+
${clauses.length ? `WHERE ${clauses.join(" AND ")}` : ""}
|
|
52
|
+
ORDER BY sort_key DESC, updated_at DESC
|
|
53
|
+
LIMIT ?
|
|
54
54
|
`).all(...values, limit);
|
|
55
55
|
return rows.map(sessionNavigationFromRow);
|
|
56
56
|
}
|
|
@@ -8,10 +8,10 @@ export class ObservationStore {
|
|
|
8
8
|
const sequence = input.sequence ?? this.nextSequence(input.sessionId);
|
|
9
9
|
const startedAt = input.startedAt ?? new Date().toISOString();
|
|
10
10
|
const id = input.id ?? `obs_${randomUUID()}`;
|
|
11
|
-
this.db.prepare(`INSERT OR IGNORE INTO observations (
|
|
12
|
-
id, session_id, sequence, trace_id, span_id, parent_span_id, parent_observation_id, turn_id, event_stream_id,
|
|
13
|
-
kind, role, name, status, started_at, ended_at, latency_ms, model_provider, model_id, input_tokens, output_tokens,
|
|
14
|
-
cost_usd, preview_text, payload_ref, attributes_json
|
|
11
|
+
this.db.prepare(`INSERT OR IGNORE INTO observations (
|
|
12
|
+
id, session_id, sequence, trace_id, span_id, parent_span_id, parent_observation_id, turn_id, event_stream_id,
|
|
13
|
+
kind, role, name, status, started_at, ended_at, latency_ms, model_provider, model_id, input_tokens, output_tokens,
|
|
14
|
+
cost_usd, preview_text, payload_ref, attributes_json
|
|
15
15
|
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, input.sessionId, sequence, input.traceId ?? null, input.spanId ?? null, input.parentSpanId ?? null, input.parentObservationId ?? null, input.turnId ?? null, input.eventStreamId ?? null, input.kind, input.role ?? null, input.name ?? null, input.status ?? "completed", startedAt, input.endedAt ?? null, input.latencyMs ?? null, input.modelProvider ?? null, input.modelId ?? null, input.inputTokens ?? null, input.outputTokens ?? null, input.costUsd ?? null, input.previewText ?? null, input.payloadRef ?? null, JSON.stringify(input.attributes ?? {}));
|
|
16
16
|
return this.getObservation(id) ?? this.listObservations(input.sessionId).find((row) => row.sequence === sequence);
|
|
17
17
|
}
|
|
@@ -31,23 +31,23 @@ export class PayloadStore {
|
|
|
31
31
|
const absolutePath = this.rootDir === ":memory:" ? relativePath : join(this.rootDir, relativePath);
|
|
32
32
|
writePayloadFile(absolutePath, bytesToStore);
|
|
33
33
|
const id = input.id ?? `payload_${randomUUID()}`;
|
|
34
|
-
this.db.prepare(`
|
|
35
|
-
INSERT INTO payloads (
|
|
36
|
-
id,
|
|
37
|
-
sha256,
|
|
38
|
-
storage_kind,
|
|
39
|
-
storage_path,
|
|
40
|
-
content_type,
|
|
41
|
-
encoding,
|
|
42
|
-
byte_size,
|
|
43
|
-
compressed_byte_size,
|
|
44
|
-
preview_text,
|
|
45
|
-
retention_class,
|
|
46
|
-
ref_count,
|
|
47
|
-
status,
|
|
48
|
-
created_at,
|
|
49
|
-
last_verified_at
|
|
50
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
34
|
+
this.db.prepare(`
|
|
35
|
+
INSERT INTO payloads (
|
|
36
|
+
id,
|
|
37
|
+
sha256,
|
|
38
|
+
storage_kind,
|
|
39
|
+
storage_path,
|
|
40
|
+
content_type,
|
|
41
|
+
encoding,
|
|
42
|
+
byte_size,
|
|
43
|
+
compressed_byte_size,
|
|
44
|
+
preview_text,
|
|
45
|
+
retention_class,
|
|
46
|
+
ref_count,
|
|
47
|
+
status,
|
|
48
|
+
created_at,
|
|
49
|
+
last_verified_at
|
|
50
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
51
51
|
`).run(id, sha256, "file", relativePath, contentType, encoding, bytes.byteLength, compressedByteSize, previewTextFromValue(input.value) ?? null, input.retentionClass, 1, "committed", createdAt, createdAt);
|
|
52
52
|
const stored = this.getPayload(id);
|
|
53
53
|
if (!stored)
|