pi-harness-runtime 1.1.39 → 1.1.42

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 (96) hide show
  1. package/harness/langchain/daemon.ts +7 -3
  2. package/harness/langchain/graph.ts +133 -9
  3. package/harness/langchain/scoreboard.test.ts +222 -0
  4. package/harness/langchain/widget.test.ts +25 -18
  5. package/harness/langchain/widget.ts +61 -44
  6. package/package.json +1 -1
  7. package/packages/a2a-adapter/package.json +1 -1
  8. package/packages/architecture-generator/package.json +1 -1
  9. package/packages/auth/package.json +1 -1
  10. package/packages/autonomous-refactor/package.json +1 -1
  11. package/packages/autonomous-runtime/package.json +1 -1
  12. package/packages/cache-strategy/package.json +1 -1
  13. package/packages/capability-registry/package.json +1 -1
  14. package/packages/checkpoint/package.json +1 -1
  15. package/packages/cli-plugin-sdk/package.json +1 -1
  16. package/packages/clipboard/package.json +1 -1
  17. package/packages/clipboard-plugin/package.json +1 -1
  18. package/packages/code-generation/package.json +1 -1
  19. package/packages/code-review/package.json +1 -1
  20. package/packages/codex-adapter/package.json +1 -1
  21. package/packages/config-capture/package.json +1 -1
  22. package/packages/context-compiler/package.json +1 -1
  23. package/packages/context-discovery/package.json +1 -1
  24. package/packages/context-manager/package.json +1 -1
  25. package/packages/cookie-sanitizer/package.json +1 -1
  26. package/packages/cost-optimizer/package.json +1 -1
  27. package/packages/dependency-analyzer/package.json +1 -1
  28. package/packages/django-plugin/package.json +1 -1
  29. package/packages/doc-generator/package.json +1 -1
  30. package/packages/evaluation-engine/package.json +1 -1
  31. package/packages/evaluation-runner/package.json +1 -1
  32. package/packages/event-bus/package.json +1 -1
  33. package/packages/event-store/package.json +1 -1
  34. package/packages/experience-replay/package.json +1 -1
  35. package/packages/feedback-collector/package.json +1 -1
  36. package/packages/file-copy-helper/package.json +1 -1
  37. package/packages/framework-detector/package.json +1 -1
  38. package/packages/framework-plugin-sdk/package.json +1 -1
  39. package/packages/frappe-plugin/package.json +1 -1
  40. package/packages/generic-web-plugin/package.json +1 -1
  41. package/packages/health-monitor/package.json +1 -1
  42. package/packages/intent-analyzer/package.json +1 -1
  43. package/packages/knowledge-graph/package.json +1 -1
  44. package/packages/knowledge-retrieval/package.json +1 -1
  45. package/packages/laravel-plugin/package.json +1 -1
  46. package/packages/learning-engine/package.json +1 -1
  47. package/packages/mcp-adapter/package.json +1 -1
  48. package/packages/memory-engine/package.json +1 -1
  49. package/packages/milestone-manager/package.json +1 -1
  50. package/packages/model-registry/package.json +1 -1
  51. package/packages/nextjs-plugin/package.json +1 -1
  52. package/packages/notification/package.json +1 -1
  53. package/packages/observability/package.json +1 -1
  54. package/packages/okf-indexer/package.json +1 -1
  55. package/packages/performance-optimizer/package.json +1 -1
  56. package/packages/privilege-broker/package.json +1 -1
  57. package/packages/project-analyzer/package.json +1 -1
  58. package/packages/project-bootstrap/package.json +1 -1
  59. package/packages/projection-engine/package.json +1 -1
  60. package/packages/prompt-compiler/package.json +1 -1
  61. package/packages/prompt-versioning/package.json +1 -1
  62. package/packages/provider-adapter-sdk/package.json +1 -1
  63. package/packages/provider-router/package.json +1 -1
  64. package/packages/provider-selector/package.json +1 -1
  65. package/packages/providers/package.json +1 -1
  66. package/packages/quota-manager/package.json +1 -1
  67. package/packages/rate-limiter/package.json +1 -1
  68. package/packages/react-vite-plugin/package.json +1 -1
  69. package/packages/release-manager/package.json +1 -1
  70. package/packages/requirement-compiler/package.json +1 -1
  71. package/packages/runtime/package.json +1 -1
  72. package/packages/scheduler/package.json +1 -1
  73. package/packages/scheduler-adapter/package.json +1 -1
  74. package/packages/session/package.json +1 -1
  75. package/packages/session-api/package.json +1 -1
  76. package/packages/session-export/package.json +1 -1
  77. package/packages/shared-context/package.json +1 -1
  78. package/packages/skill-mcp-client/package.json +1 -1
  79. package/packages/skill-registry/package.json +1 -1
  80. package/packages/sprint-planner/package.json +1 -1
  81. package/packages/subscription-engine/package.json +1 -1
  82. package/packages/task-compiler/package.json +1 -1
  83. package/packages/tencentdb-memory/package.json +1 -1
  84. package/packages/tencentdb-sync/package.json +1 -1
  85. package/packages/test-data-generator/package.json +1 -1
  86. package/packages/test-generator/package.json +1 -1
  87. package/packages/todo-bd-sync/package.json +1 -1
  88. package/packages/token-estimation/package.json +1 -1
  89. package/packages/token-optimizer/package.json +1 -1
  90. package/packages/tui/package.json +1 -1
  91. package/packages/types/package.json +1 -1
  92. package/packages/workflow-events/package.json +1 -1
  93. package/packages/workspace-scanner/package.json +1 -1
  94. package/packages/worktree/package.json +1 -1
  95. package/packages/write-review/package.json +1 -1
  96. package/packages/write-review/src/blackboard.ts +56 -12
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/observability",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Comprehensive observability system with structured logging, tracing, metrics, and alerting",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/okf-indexer",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "OKF document indexer for SKILL.md files (RFC-0106)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/performance-optimizer",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Performance optimization analyzer for pi-harness runtime (RFC-0056)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/privilege-broker",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Privilege Broker — capability registry and command executor for autonomous runtime (RFC-0101 §7)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/project-analyzer",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Project analysis system for pi-harness-runtime - detects frameworks, rules, and project structure",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/project-bootstrap",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Project scaffolding from typed ProjectSpec",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/projection-engine",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/prompt-compiler",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Deterministic prompt compiler for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/prompt-versioning",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "type": "module",
5
5
  "description": "Version control for prompts with rollback support (RFC-0019)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/provider-adapter-sdk",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "SDK for building, testing, and registering AI provider adapters",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/provider-router",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Enhanced Provider Router for pi-harness-runtime — intelligent routing with capabilities, costs, and quotas",
5
5
  "type": "module",
6
6
  "main": "./dist/provider-router.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/provider-selector",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Multi-Provider Selector — route requests by cost, quality, and latency (RFC-0012)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/providers",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "pi-harness-runtime — providers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/quota-manager",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "pi-harness-runtime — quota-manager",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/rate-limiter",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "type": "module",
5
5
  "description": "Rate limiting with token bucket algorithm (RFC-0023)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/react-vite-plugin",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "React/Vite framework analysis — components, config, TypeScript setup",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/release-manager",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "type": "module",
5
5
  "description": "Release management for pi-harness",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/requirement-compiler",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Compiles raw requirements into validated CompiledRequirement with ambiguity detection and risk tagging",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/runtime",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "pi-harness-runtime — runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/scheduler",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "pi-harness-runtime — scheduler",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/scheduler-adapter",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Scheduler Adapter — cron, systemd, launchd, internal adapters for autonomous runtime (RFC-0101 §6)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/session",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Session management system for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/session-api",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/session-export",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/shared-context",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "pi-harness-runtime — shared-context",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/skill-mcp-client",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "MCP client for Skills SaaS backend",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/skill-registry",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Skill Registry for pi-harness-runtime — dynamic skill discovery and invocation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/sprint-planner",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "type": "module",
5
5
  "description": "Sprint planning engine for pi-harness",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/subscription-engine",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/task-compiler",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Task Compiler for pi-harness-runtime — produces deterministic task DAG from CompiledRequirement",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/tencentdb-memory",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "TencentDB Agent Memory client - sync skills to centralized knowledge base",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/tencentdb-sync",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Sync SKILL.md skills to TencentDB-Agent-Memory server (RFC-0105/0106)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/test-data-generator",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Test data generation for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/test-generator",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Auto-Test Generator — generate unit and E2E tests from source code (RFC-0013)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/todo-bd-sync",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Two-way sync between rpiv-todo overlay and bd issue tracker",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/token-estimation",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "pi-harness-runtime — token-estimation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/token-optimizer",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Token Budget Optimizer — maximize prompt value within token limits (RFC-0011)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/tui",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "pi-harness-runtime — tui",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/types",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Shared TypeScript types for pi-harness-runtime packages",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/workflow-events",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/workspace-scanner",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/worktree",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "pi-harness-runtime — worktree",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/write-review",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Two-agent write-review loop with blackboard coordination",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -200,36 +200,80 @@ export class WriteReviewBlackboard {
200
200
  }
201
201
 
202
202
  /**
203
- * Export status as markdown for display
203
+ * Export status as markdown for display.
204
+ * Injected into every agent prompt so each agent sees the shared scoreboard.
205
+ * Matches the pi-lens pattern: persistent artifact encountered naturally.
204
206
  */
205
207
  toMarkdown(): string {
206
208
  if (!this.status) return "No active write-review session.";
207
209
 
208
- const { phase, iteration, verdict, verdictMessage, codeFiles } =
209
- this.status;
210
- const lines = [
211
- `## Write-Review Status`,
210
+ const {
211
+ phase,
212
+ iteration,
213
+ verdict,
214
+ verdictMessage,
215
+ codeFiles,
216
+ changesRequested,
217
+ } = this.status;
218
+
219
+ const verdictIcon =
220
+ verdict === "approved"
221
+ ? "✅"
222
+ : verdict === "blocked"
223
+ ? "⛔"
224
+ : verdict === "changes_requested"
225
+ ? "🔄"
226
+ : "⏳";
227
+
228
+ const lines: string[] = [
229
+ `## Write-Review Scoreboard`,
212
230
  ``,
213
231
  `| Field | Value |`,
214
232
  `|-------|-------|`,
215
- `| Phase | ${phase} |`,
233
+ `| Phase | ${verdictIcon} ${phase} |`,
216
234
  `| Iteration | ${iteration} |`,
217
- `| Verdict | ${verdict ?? "pending"} |`,
235
+ `| Verdict | ${verdict ?? "(none yet)"} |`,
218
236
  ];
219
237
 
220
238
  if (verdictMessage) {
221
- lines.push(`| Message | ${verdictMessage} |`);
239
+ lines.push(`| Summary | ${verdictMessage} |`);
222
240
  }
223
241
 
224
242
  if (codeFiles && codeFiles.length > 0) {
225
- lines.push(``, `### Code Files`);
243
+ lines.push(``, `### Code Files Written`);
226
244
  for (const file of codeFiles) {
227
245
  lines.push(`- ${file}`);
228
246
  }
229
247
  }
230
248
 
249
+ if (changesRequested && changesRequested.length > 0) {
250
+ lines.push(``, `### Changes Requested (${changesRequested.length})`);
251
+ for (const change of changesRequested) {
252
+ lines.push(`- ${change}`);
253
+ }
254
+ }
255
+
231
256
  return lines.join("\n");
232
257
  }
258
+
259
+ /**
260
+ * Extract file paths from a fenced code block string.
261
+ * Looks for common patterns: ```path/to/file
262
+ */
263
+ extractFilePaths(code: string): string[] {
264
+ const files = new Set<string>();
265
+ // Match ```<whitespace>path (with optional language tag)
266
+ const fencedRe = /^```(?:\w+)?\s+([^\n]+)/gm;
267
+ let match;
268
+ while ((match = fencedRe.exec(code)) !== null) {
269
+ const path = match[1]!.trim();
270
+ // Skip if it looks like a filename with spaces (not a path)
271
+ if (path && !path.includes(" ") && (path.includes("/") || path.includes("\\") || path.endsWith(".ts") || path.endsWith(".js") || path.endsWith(".tsx") || path.endsWith(".json") || path.endsWith(".md"))) {
272
+ files.add(path);
273
+ }
274
+ }
275
+ return [...files];
276
+ }
233
277
  }
234
278
 
235
279
  /**
@@ -240,10 +284,10 @@ export function createBlackboard(
240
284
  dir?: string,
241
285
  ): WriteReviewBlackboard {
242
286
  const bb = new WriteReviewBlackboard(projectPath, dir);
243
- if (!bb.exists()) {
244
- bb.init();
245
- } else {
287
+ if (bb.exists()) {
246
288
  bb.load();
289
+ } else {
290
+ bb.init();
247
291
  }
248
292
  return bb;
249
293
  }