@pasko70/pibo 1.9.13 → 1.10.1

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.
Files changed (163) hide show
  1. package/README.md +183 -183
  2. package/context/codex-base-prompt.md +148 -148
  3. package/context/compute-worker.md +23 -23
  4. package/context/pibo-compaction-prompt.md +100 -100
  5. package/context/pibo-native-tooling.md +18 -18
  6. package/context/pibo-system-prompt.md +77 -77
  7. package/dist/apps/chat/agent-profiles.js +2 -2
  8. package/dist/apps/chat/agent-store.js +263 -250
  9. package/dist/apps/chat/chat-request-normalizers.js +17 -0
  10. package/dist/apps/chat/data/chat-data-mappers.js +2 -0
  11. package/dist/apps/chat/data/project-service.js +168 -168
  12. package/dist/apps/chat/data/read-state-service.js +18 -18
  13. package/dist/apps/chat/data/session-query-service.js +25 -25
  14. package/dist/apps/chat/data/timeline-query-service.js +19 -19
  15. package/dist/apps/chat/loop-api.js +181 -0
  16. package/dist/apps/chat/static-assets.js +854 -854
  17. package/dist/apps/chat/web-app.js +36 -16
  18. package/dist/apps/chat/workflow-manual-trigger-runtime.js +149 -46
  19. package/dist/apps/chat/workflow-persistence.js +255 -255
  20. package/dist/apps/chat-ui/assets/{dist-BZ2eTC4f.js → dist-3Sts0Afa.js} +1 -1
  21. package/dist/apps/chat-ui/assets/{dist-BHa-kcGl.js → dist-4NlLjLs7.js} +1 -1
  22. package/dist/apps/chat-ui/assets/{dist-yCYNNb5d.js → dist-BA6mhAec.js} +1 -1
  23. package/dist/apps/chat-ui/assets/{dist-D811wJeV.js → dist-BPl-fzRB.js} +1 -1
  24. package/dist/apps/chat-ui/assets/{dist-Dq4GxJi3.js → dist-BPnn9e2B.js} +1 -1
  25. package/dist/apps/chat-ui/assets/{dist-CzE6k3F3.js → dist-BpfBSMzK.js} +1 -1
  26. package/dist/apps/chat-ui/assets/{dist-CnVsqwSG.js → dist-Cvx5M97R.js} +1 -1
  27. package/dist/apps/chat-ui/assets/{dist-WyXdYl-w.js → dist-DnXWNQRm.js} +1 -1
  28. package/dist/apps/chat-ui/assets/{dist-BNMu92bb.js → dist-hU-2oAb6.js} +1 -1
  29. package/dist/apps/chat-ui/assets/{dist-BCB6zezO.js → dist-r31x5Fcc.js} +1 -1
  30. package/dist/apps/chat-ui/assets/{dist-HqTN67dc.js → dist-uF6UXzI7.js} +1 -1
  31. package/dist/apps/chat-ui/assets/index-CaTGYBOS.js +173 -0
  32. package/dist/apps/chat-ui/assets/{index-C0x9nEcf.css → index-al8DeEjA.css} +1 -1
  33. package/dist/apps/chat-ui/index.html +18 -18
  34. package/dist/apps/chat-ui/manifest.webmanifest +25 -25
  35. package/dist/apps/chat-ui/sw.js +47 -47
  36. package/dist/apps/chat-vscode-web/assets/index-CK4SMZuu.js +41 -0
  37. package/dist/apps/chat-vscode-web/index.html +13 -13
  38. package/dist/apps/cli-ui/cliSessionsCommand.js +23 -23
  39. package/dist/apps/context-files-ui/index.html +11 -11
  40. package/dist/cli-session/localSessionSource.js +34 -12
  41. package/dist/cli.js +61 -44
  42. package/dist/compute/cli.js +54 -54
  43. package/dist/compute/resource-health.js +35 -2
  44. package/dist/core/events.js +6 -1
  45. package/dist/core/routed-session.js +97 -5
  46. package/dist/core/runtime.js +6 -1
  47. package/dist/core/session-router.js +27 -8
  48. package/dist/cron/cli.js +15 -15
  49. package/dist/cron/store.js +49 -49
  50. package/dist/data/cli.js +23 -23
  51. package/dist/data/event-log.js +23 -23
  52. package/dist/data/ingest-service.js +3 -1
  53. package/dist/data/message-store.js +27 -27
  54. package/dist/data/navigation-store.js +9 -9
  55. package/dist/data/observation-store.js +4 -4
  56. package/dist/data/payload-store.js +17 -17
  57. package/dist/data/schema.js +433 -433
  58. package/dist/data/session-store.js +4 -4
  59. package/dist/data/telemetry-queries.js +54 -54
  60. package/dist/data/telemetry.js +197 -197
  61. package/dist/debug/events.js +12 -12
  62. package/dist/debug/failures.js +6 -6
  63. package/dist/debug/index.js +231 -227
  64. package/dist/debug/messages.js +6 -6
  65. package/dist/debug/pty.js +124 -124
  66. package/dist/debug/session.js +29 -29
  67. package/dist/debug/tools.js +5 -5
  68. package/dist/debug/trace.js +42 -7
  69. package/dist/debug/web-snapshot-browser-scripts.js +294 -294
  70. package/dist/debug/web-streaming-browser-library.js +925 -925
  71. package/dist/debug/web-streaming-browser-scripts.js +232 -232
  72. package/dist/debug/web-streaming-provider-telemetry.js +4 -4
  73. package/dist/debug/web.js +93 -93
  74. package/dist/gateway/cli.js +19 -19
  75. package/dist/gateway/server.js +4 -2
  76. package/dist/gateway/web.js +2 -2
  77. package/dist/index.js +1 -0
  78. package/dist/loops/accounting.js +19 -0
  79. package/dist/loops/channel.js +8 -0
  80. package/dist/loops/cli.js +224 -0
  81. package/dist/loops/plugin.js +16 -0
  82. package/dist/loops/prompts.js +86 -0
  83. package/dist/loops/service.js +446 -0
  84. package/dist/loops/stopping.js +170 -0
  85. package/dist/loops/store.js +642 -0
  86. package/dist/loops/templates.js +232 -0
  87. package/dist/loops/tools.js +184 -0
  88. package/dist/loops/types.js +1 -0
  89. package/dist/mcp/config-command.js +53 -53
  90. package/dist/mcp/index.js +21 -21
  91. package/dist/mcp/registry.js +11 -11
  92. package/dist/pi-packages/cli.js +11 -11
  93. package/dist/plugins/builtin.js +8 -0
  94. package/dist/plugins/context-files-store.js +110 -110
  95. package/dist/plugins/context-files.js +4 -4
  96. package/dist/plugins/registry.js +23 -12
  97. package/dist/ralph/cli.js +18 -18
  98. package/dist/ralph/templates.js +140 -140
  99. package/dist/reliability/store.js +256 -229
  100. package/dist/runs/lifecycle.js +59 -0
  101. package/dist/runs/registry.js +47 -1
  102. package/dist/runs/tools.js +31 -13
  103. package/dist/session-ui/terminalRows.js +66 -2
  104. package/dist/sessions/pibo-data-store.js +16 -16
  105. package/dist/sessions/sqlite-store.js +53 -53
  106. package/dist/setup/cli.js +58 -58
  107. package/dist/shared/trace-async-agent-runs.js +4 -4
  108. package/dist/shared/trace-event-projection.js +59 -19
  109. package/dist/shared/trace-nodes.js +5 -0
  110. package/dist/shared/trace-page-merge.js +15 -0
  111. package/dist/shared/trace-run-notifications.js +3 -1
  112. package/dist/signals/projector.js +6 -2
  113. package/dist/tools/agent-browser-wrapper.js +80 -80
  114. package/dist/tools/browser-pool.js +50 -0
  115. package/dist/tools/browser-use-cdp.js +12 -12
  116. package/dist/tools/browser-use-leases.js +12 -8
  117. package/dist/tools/browser-use-wrapper.js +762 -762
  118. package/dist/tools/guides.js +596 -538
  119. package/dist/tools/index.js +123 -99
  120. package/dist/tools/registry.js +21 -3
  121. package/dist/tools/runtime/node-worker-source.js +205 -205
  122. package/dist/tools/runtime/python-worker-source.js +177 -177
  123. package/dist/vscode/cli.js +9 -9
  124. package/dist/web-annotations/cdp.js +900 -900
  125. package/dist/web-annotations/store.js +96 -96
  126. package/docs/README.md +23 -23
  127. package/docs/ops/install-developer-host.md +112 -112
  128. package/docs/ops/install-user-host.md +96 -96
  129. package/docs/ops/upgrade-user-to-developer-host.md +69 -69
  130. package/docs/ops/vscode-extension-release.md +160 -160
  131. package/package.json +99 -95
  132. package/skills/builtin/graphify/SKILL.md +52 -52
  133. package/skills/builtin/loop/SKILL.md +78 -0
  134. package/skills/builtin/pi-agent-harness/SKILL.md +319 -319
  135. package/skills/builtin/pi-agent-harness/agents/openai.yaml +4 -4
  136. package/skills/builtin/pibo-docker-system/SKILL.md +170 -170
  137. package/skills/builtin/pibo-spec-writing/SKILL.md +330 -330
  138. package/skills/builtin/prd/SKILL.md +143 -143
  139. package/skills/builtin/ralph-loop/SKILL.md +361 -359
  140. package/skills/builtin/ralph-prd-json/SKILL.md +123 -123
  141. package/skills/builtin/skill-creator/LICENSE.txt +201 -201
  142. package/skills/builtin/skill-creator/SKILL.md +513 -513
  143. package/skills/builtin/skill-creator/agents/analyzer.md +274 -274
  144. package/skills/builtin/skill-creator/agents/comparator.md +202 -202
  145. package/skills/builtin/skill-creator/agents/grader.md +223 -223
  146. package/skills/builtin/skill-creator/assets/eval_review.html +146 -146
  147. package/skills/builtin/skill-creator/eval-viewer/generate_review.py +471 -471
  148. package/skills/builtin/skill-creator/eval-viewer/viewer.html +1325 -1325
  149. package/skills/builtin/skill-creator/references/schemas.md +430 -430
  150. package/skills/builtin/skill-creator/scripts/aggregate_benchmark.py +401 -401
  151. package/skills/builtin/skill-creator/scripts/generate_report.py +326 -326
  152. package/skills/builtin/skill-creator/scripts/improve_description.py +247 -247
  153. package/skills/builtin/skill-creator/scripts/package_skill.py +136 -136
  154. package/skills/builtin/skill-creator/scripts/quick_validate.py +102 -102
  155. package/skills/builtin/skill-creator/scripts/run_eval.py +310 -310
  156. package/skills/builtin/skill-creator/scripts/run_loop.py +328 -328
  157. package/skills/builtin/skill-creator/scripts/utils.py +47 -47
  158. package/skills/builtin/web-annotations/SKILL.md +93 -93
  159. package/src/mcp/LICENSE.mcp-cli +21 -21
  160. package/dist/apps/chat-ui/assets/index-DwHJfmiF.js +0 -173
  161. package/dist/apps/chat-vscode-web/assets/index-BAMxIaI_.js +0 -41
  162. package/dist/apps/vscode-artifacts/latest.vsix +0 -0
  163. package/dist/apps/vscode-artifacts/pibo-vscode-ext-1.9.13.vsix +0 -0
@@ -1,78 +1,78 @@
1
- # Agent System
2
-
3
- You are an expert coding assistant operating inside pi, a coding agent harness. You help users by reading files, executing commands, editing code, and writing new files.
4
-
5
- ## Tools
6
-
7
- Available tools:
8
- {{availableTools}}
9
-
10
- In addition to the tools above, you may have access to other custom tools depending on the project.
11
-
12
- ## Guidelines
13
-
14
- {{guidelines}}
15
-
16
- Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed.
17
-
18
- **Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.
19
-
20
- ## 1. Think Before Coding
21
-
22
- **Don't assume. Don't hide confusion. Surface tradeoffs.**
23
-
24
- Before implementing:
25
- - State your assumptions explicitly. If uncertain, ask.
26
- - If multiple interpretations exist, present them - don't pick silently.
27
- - If a simpler approach exists, say so. Push back when warranted.
28
- - If something is unclear, stop. Name what's confusing. Ask.
29
-
30
- ## 2. Simplicity First
31
-
32
- **Minimum code that solves the problem. Nothing speculative.**
33
-
34
- - No features beyond what was asked.
35
- - No abstractions for single-use code.
36
- - No "flexibility" or "configurability" that wasn't requested.
37
- - No error handling for impossible scenarios.
38
- - If you write 200 lines and it could be 50, rewrite it.
39
-
40
- Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
41
-
42
- ## 3. Surgical Changes
43
-
44
- **Touch only what you must. Clean up only your own mess.**
45
-
46
- When editing existing code:
47
- - Don't "improve" adjacent code, comments, or formatting.
48
- - Don't refactor things that aren't broken.
49
- - Match existing style, even if you'd do it differently.
50
- - If you notice unrelated dead code, mention it - don't delete it.
51
-
52
- When your changes create orphans:
53
- - Remove imports/variables/functions that YOUR changes made unused.
54
- - Don't remove pre-existing dead code unless asked.
55
-
56
- The test: Every changed line should trace directly to the user's request.
57
-
58
- ## 4. Goal-Driven Execution
59
-
60
- **Define success criteria. Loop until verified.**
61
-
62
- Transform tasks into verifiable goals:
63
- - "Add validation" → "Write tests for invalid inputs, then make them pass"
64
- - "Fix the bug" → "Write a test that reproduces it, then make it pass"
65
- - "Refactor X" → "Ensure tests pass before and after"
66
-
67
- For multi-step tasks, state a brief plan:
68
- ```
69
- 1. [Step] → verify: [check]
70
- 2. [Step] → verify: [check]
71
- 3. [Step] → verify: [check]
72
- ```
73
-
74
- Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
75
-
76
- ---
77
-
1
+ # Agent System
2
+
3
+ You are an expert coding assistant operating inside pi, a coding agent harness. You help users by reading files, executing commands, editing code, and writing new files.
4
+
5
+ ## Tools
6
+
7
+ Available tools:
8
+ {{availableTools}}
9
+
10
+ In addition to the tools above, you may have access to other custom tools depending on the project.
11
+
12
+ ## Guidelines
13
+
14
+ {{guidelines}}
15
+
16
+ Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed.
17
+
18
+ **Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.
19
+
20
+ ## 1. Think Before Coding
21
+
22
+ **Don't assume. Don't hide confusion. Surface tradeoffs.**
23
+
24
+ Before implementing:
25
+ - State your assumptions explicitly. If uncertain, ask.
26
+ - If multiple interpretations exist, present them - don't pick silently.
27
+ - If a simpler approach exists, say so. Push back when warranted.
28
+ - If something is unclear, stop. Name what's confusing. Ask.
29
+
30
+ ## 2. Simplicity First
31
+
32
+ **Minimum code that solves the problem. Nothing speculative.**
33
+
34
+ - No features beyond what was asked.
35
+ - No abstractions for single-use code.
36
+ - No "flexibility" or "configurability" that wasn't requested.
37
+ - No error handling for impossible scenarios.
38
+ - If you write 200 lines and it could be 50, rewrite it.
39
+
40
+ Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
41
+
42
+ ## 3. Surgical Changes
43
+
44
+ **Touch only what you must. Clean up only your own mess.**
45
+
46
+ When editing existing code:
47
+ - Don't "improve" adjacent code, comments, or formatting.
48
+ - Don't refactor things that aren't broken.
49
+ - Match existing style, even if you'd do it differently.
50
+ - If you notice unrelated dead code, mention it - don't delete it.
51
+
52
+ When your changes create orphans:
53
+ - Remove imports/variables/functions that YOUR changes made unused.
54
+ - Don't remove pre-existing dead code unless asked.
55
+
56
+ The test: Every changed line should trace directly to the user's request.
57
+
58
+ ## 4. Goal-Driven Execution
59
+
60
+ **Define success criteria. Loop until verified.**
61
+
62
+ Transform tasks into verifiable goals:
63
+ - "Add validation" → "Write tests for invalid inputs, then make them pass"
64
+ - "Fix the bug" → "Write a test that reproduces it, then make it pass"
65
+ - "Refactor X" → "Ensure tests pass before and after"
66
+
67
+ For multi-step tasks, state a brief plan:
68
+ ```
69
+ 1. [Step] → verify: [check]
70
+ 2. [Step] → verify: [check]
71
+ 3. [Step] → verify: [check]
72
+ ```
73
+
74
+ Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
75
+
76
+ ---
77
+
78
78
  **These guidelines are working if:** fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes.
@@ -3,7 +3,7 @@ export function createCustomAgentProfileDefinition(agent, options = {}) {
3
3
  const shouldWarnMissingReferences = options.missingReferenceMode !== "silent";
4
4
  return {
5
5
  name: agent.profileName,
6
- aliases: uniqueAliases([agent.id, `custom-agent:${agent.id}`, ...agent.profileAliases], agent.profileName),
6
+ aliases: uniqueAliases([agent.id, `custom-agent:${agent.id}`, ...(agent.profileAliases ?? [])], agent.profileName),
7
7
  description: agent.description || agent.displayName,
8
8
  create(context) {
9
9
  const builder = new InitialSessionContextBuilder(agent.profileName)
@@ -12,7 +12,7 @@ export function createCustomAgentProfileDefinition(agent, options = {}) {
12
12
  .withAutoContextFiles(agent.autoContextFiles)
13
13
  .withMcpServers(agent.mcpServers)
14
14
  .withPiPackages(agent.piPackages.map((id) => ({ id })))
15
- .withToolPackages({ runControl: agent.runControl });
15
+ .withToolPackages({ runControl: agent.runControl, goalControl: agent.goalControl ?? true });
16
16
  if (agent.mainModel)
17
17
  builder.withMainModel(agent.mainModel);
18
18
  if (agent.subagentModel)