pi-harness-runtime 1.1.407 → 1.1.408

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 (166) hide show
  1. package/index.ts +78 -0
  2. package/package.json +1 -1
  3. package/packages/a2a-adapter/package.json +1 -1
  4. package/packages/agent-policy/package.json +1 -1
  5. package/packages/architecture-generator/package.json +1 -1
  6. package/packages/auth/package.json +1 -1
  7. package/packages/autonomous-refactor/package.json +1 -1
  8. package/packages/autonomous-runtime/package.json +1 -1
  9. package/packages/cache-strategy/package.json +1 -1
  10. package/packages/capability-registry/package.json +1 -1
  11. package/packages/checkpoint/package.json +1 -1
  12. package/packages/cli-plugin-sdk/package.json +1 -1
  13. package/packages/clipboard/package.json +1 -1
  14. package/packages/clipboard-plugin/package.json +1 -1
  15. package/packages/code-generation/package.json +1 -1
  16. package/packages/code-review/package.json +1 -1
  17. package/packages/codex-adapter/package.json +1 -1
  18. package/packages/codex-watcher/package.json +1 -1
  19. package/packages/config-capture/package.json +1 -1
  20. package/packages/connection-runtime/package.json +1 -1
  21. package/packages/context-compiler/package.json +1 -1
  22. package/packages/context-discovery/package.json +1 -1
  23. package/packages/context-manager/package.json +1 -1
  24. package/packages/contracts/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/durable-review/package.json +1 -1
  31. package/packages/e2e-tester/package.json +1 -1
  32. package/packages/evaluation-engine/package.json +1 -1
  33. package/packages/evaluation-runner/package.json +1 -1
  34. package/packages/event-bus/package.json +1 -1
  35. package/packages/event-sink/package.json +1 -1
  36. package/packages/event-store/package.json +1 -1
  37. package/packages/experience-replay/package.json +1 -1
  38. package/packages/feedback-collector/package.json +1 -1
  39. package/packages/file-copy-helper/package.json +1 -1
  40. package/packages/framework-detector/package.json +1 -1
  41. package/packages/framework-plugin-sdk/package.json +1 -1
  42. package/packages/frappe-plugin/package.json +1 -1
  43. package/packages/generic-web-plugin/package.json +1 -1
  44. package/packages/health-monitor/package.json +1 -1
  45. package/packages/intent-analyzer/package.json +1 -1
  46. package/packages/jev-judge/package.json +1 -1
  47. package/packages/knowledge-graph/package.json +1 -1
  48. package/packages/knowledge-retrieval/package.json +1 -1
  49. package/packages/laravel-plugin/package.json +1 -1
  50. package/packages/learning-engine/package.json +1 -1
  51. package/packages/logging/package.json +1 -1
  52. package/packages/mcp-adapter/package.json +1 -1
  53. package/packages/memory-engine/package.json +1 -1
  54. package/packages/milestone-manager/package.json +1 -1
  55. package/packages/model-registry/package.json +1 -1
  56. package/packages/nextjs-plugin/package.json +1 -1
  57. package/packages/notification/package.json +1 -1
  58. package/packages/observability/package.json +1 -1
  59. package/packages/okf-indexer/package.json +1 -1
  60. package/packages/paperclip-integration/package.json +1 -1
  61. package/packages/performance-optimizer/package.json +1 -1
  62. package/packages/permission-mode/package.json +1 -1
  63. package/packages/privilege-broker/package.json +1 -1
  64. package/packages/project-analyzer/package.json +1 -1
  65. package/packages/project-bootstrap/package.json +1 -1
  66. package/packages/projection-engine/package.json +1 -1
  67. package/packages/prompt-compiler/package.json +1 -1
  68. package/packages/prompt-versioning/package.json +1 -1
  69. package/packages/provider-adapter-sdk/package.json +1 -1
  70. package/packages/provider-router/package.json +1 -1
  71. package/packages/provider-selector/package.json +1 -1
  72. package/packages/providers/package.json +1 -1
  73. package/packages/qdrant-skills/package.json +1 -1
  74. package/packages/quota-manager/package.json +1 -1
  75. package/packages/rate-limiter/package.json +1 -1
  76. package/packages/react-vite-plugin/package.json +1 -1
  77. package/packages/relay/package.json +1 -1
  78. package/packages/release-manager/package.json +1 -1
  79. package/packages/requirement-compiler/package.json +1 -1
  80. package/packages/runtime/package.json +1 -1
  81. package/packages/scheduler/package.json +1 -1
  82. package/packages/scheduler-adapter/package.json +1 -1
  83. package/packages/session/package.json +1 -1
  84. package/packages/session-api/package.json +1 -1
  85. package/packages/session-export/package.json +1 -1
  86. package/packages/shared-context/package.json +1 -1
  87. package/packages/skill-mcp-client/package.json +1 -1
  88. package/packages/skill-registry/package.json +1 -1
  89. package/packages/skills/package.json +1 -1
  90. package/packages/sprint-planner/package.json +1 -1
  91. package/packages/subscription-engine/package.json +1 -1
  92. package/packages/task-compiler/package.json +1 -1
  93. package/packages/telegram/package.json +1 -1
  94. package/packages/tencentdb-memory/package.json +1 -1
  95. package/packages/tencentdb-sync/package.json +1 -1
  96. package/packages/test-data-generator/package.json +1 -1
  97. package/packages/test-generator/package.json +1 -1
  98. package/packages/todo-bd-sync/package.json +1 -1
  99. package/packages/token-estimation/package.json +1 -1
  100. package/packages/token-optimizer/package.json +1 -1
  101. package/packages/tooling-preference/package.json +1 -1
  102. package/packages/trajectory/package.json +1 -1
  103. package/packages/tui/package.json +1 -1
  104. package/packages/two-phase-review/dist/classify.d.ts +56 -0
  105. package/packages/two-phase-review/dist/classify.d.ts.map +1 -0
  106. package/packages/two-phase-review/dist/classify.js +108 -0
  107. package/packages/two-phase-review/dist/classify.js.map +1 -0
  108. package/packages/two-phase-review/dist/index.d.ts +20 -0
  109. package/packages/two-phase-review/dist/index.d.ts.map +1 -0
  110. package/packages/two-phase-review/dist/index.js +14 -0
  111. package/packages/two-phase-review/dist/index.js.map +1 -0
  112. package/packages/two-phase-review/dist/rules.d.ts +81 -0
  113. package/packages/two-phase-review/dist/rules.d.ts.map +1 -0
  114. package/packages/two-phase-review/dist/rules.js +195 -0
  115. package/packages/two-phase-review/dist/rules.js.map +1 -0
  116. package/packages/two-phase-review/dist/runtime.d.ts +70 -0
  117. package/packages/two-phase-review/dist/runtime.d.ts.map +1 -0
  118. package/packages/two-phase-review/dist/runtime.js +298 -0
  119. package/packages/two-phase-review/dist/runtime.js.map +1 -0
  120. package/packages/two-phase-review/dist/scope.d.ts +68 -0
  121. package/packages/two-phase-review/dist/scope.d.ts.map +1 -0
  122. package/packages/two-phase-review/dist/scope.js +205 -0
  123. package/packages/two-phase-review/dist/scope.js.map +1 -0
  124. package/packages/two-phase-review/dist/signals.d.ts +74 -0
  125. package/packages/two-phase-review/dist/signals.d.ts.map +1 -0
  126. package/packages/two-phase-review/dist/signals.js +297 -0
  127. package/packages/two-phase-review/dist/signals.js.map +1 -0
  128. package/packages/two-phase-review/dist/state.d.ts +72 -0
  129. package/packages/two-phase-review/dist/state.d.ts.map +1 -0
  130. package/packages/two-phase-review/dist/state.js +238 -0
  131. package/packages/two-phase-review/dist/state.js.map +1 -0
  132. package/packages/two-phase-review/dist/types.d.ts +62 -0
  133. package/packages/two-phase-review/dist/types.d.ts.map +1 -0
  134. package/packages/two-phase-review/dist/types.js +9 -0
  135. package/packages/two-phase-review/dist/types.js.map +1 -0
  136. package/packages/two-phase-review/package.json +21 -0
  137. package/packages/two-phase-review/src/classify.ts +129 -0
  138. package/packages/two-phase-review/src/index.ts +110 -0
  139. package/packages/two-phase-review/src/rules.ts +236 -0
  140. package/packages/two-phase-review/src/runtime.ts +392 -0
  141. package/packages/two-phase-review/src/scope.ts +247 -0
  142. package/packages/two-phase-review/src/signals.ts +340 -0
  143. package/packages/two-phase-review/src/state.ts +280 -0
  144. package/packages/two-phase-review/src/types.ts +72 -0
  145. package/packages/two-phase-review/test/classify.test.ts +102 -0
  146. package/packages/two-phase-review/test/helpers.ts +72 -0
  147. package/packages/two-phase-review/test/rules.test.ts +150 -0
  148. package/packages/two-phase-review/test/runtime.test.ts +362 -0
  149. package/packages/two-phase-review/test/scope.test.ts +186 -0
  150. package/packages/two-phase-review/test/signals.test.ts +183 -0
  151. package/packages/two-phase-review/test/state.test.ts +201 -0
  152. package/packages/types/package.json +1 -1
  153. package/packages/voice-api/package.json +1 -1
  154. package/packages/webmcp-tester/package.json +1 -1
  155. package/packages/wiki/package.json +1 -1
  156. package/packages/workflow-events/package.json +1 -1
  157. package/packages/workspace-scanner/package.json +1 -1
  158. package/packages/worktree/dist/worktree.d.ts +31 -0
  159. package/packages/worktree/dist/worktree.d.ts.map +1 -1
  160. package/packages/worktree/dist/worktree.js +21 -8
  161. package/packages/worktree/dist/worktree.js.map +1 -1
  162. package/packages/worktree/package.json +1 -1
  163. package/packages/worktree/src/worktree.ts +49 -8
  164. package/packages/worktree/test/worktree.test.ts +27 -27
  165. package/packages/write-review/package.json +1 -1
  166. package/packages/worktree/worktree.ts +0 -293
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/paperclip-integration",
3
- "version": "1.1.407",
3
+ "version": "1.1.408",
4
4
  "description": "Paperclip API integration: poll agent inbox, route tasks to pi.dev, Telegram alerts",
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.407",
3
+ "version": "1.1.408",
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-harness/permission-mode",
3
- "version": "1.1.407",
3
+ "version": "1.1.408",
4
4
  "type": "module",
5
5
  "description": "Runtime permission modes for pi-harness - Supervised/Auto/Full-access",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/privilege-broker",
3
- "version": "1.1.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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/qdrant-skills",
3
- "version": "1.1.407",
3
+ "version": "1.1.408",
4
4
  "description": "Qdrant vector search integration for Hermes-style skill system",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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-harness/relay",
3
- "version": "1.1.407",
3
+ "version": "1.1.408",
4
4
  "type": "module",
5
5
  "description": "Cloud relay for remote access - T3 Connect style for pi-harness",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/release-manager",
3
- "version": "1.1.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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-harness/skills",
3
- "version": "1.1.407",
3
+ "version": "1.1.408",
4
4
  "description": "File-based skill system with pi.dev compatibility and Hermes self-improvement",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/sprint-planner",
3
- "version": "1.1.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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": "@pi-harness/telegram",
3
- "version": "1.1.407",
3
+ "version": "1.1.408",
4
4
  "description": "pi-harness-runtime — Telegram inbound/outbound",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/tencentdb-memory",
3
- "version": "1.1.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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.407",
3
+ "version": "1.1.408",
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/tooling-preference",
3
- "version": "1.1.407",
3
+ "version": "1.1.408",
4
4
  "description": "pi-harness-runtime — JS/TS tooling preference (Biome vs ESLint/Prettier) proposal",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/trajectory",
3
- "version": "1.1.407",
3
+ "version": "1.1.408",
4
4
  "description": "Trajectory capture for the write-review loop — persists cycle records for learning",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/tui",
3
- "version": "1.1.407",
3
+ "version": "1.1.408",
4
4
  "description": "pi-harness-runtime — tui",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Todo classification for the two-phase workflow.
3
+ *
4
+ * Implementation work and queued review work must never be confused. The
5
+ * workflow therefore classifies every todo item before it decides whether
6
+ * the implementation phase is over.
7
+ */
8
+ import type { TodoKind } from "./types.js";
9
+ /** Prefix of a todo item that is implementation work. */
10
+ export declare const IMPLEMENT_PREFIX = "[IMPLEMENT]";
11
+ /** Prefix of a todo item that is the queued review. */
12
+ export declare const REVIEW_PREFIX = "[REVIEW]";
13
+ /** Prefix of a todo item that fixes a confirmed review finding. */
14
+ export declare const REVIEW_FIX_PREFIX = "[REVIEW-FIX]";
15
+ /** The part of a todo item the workflow needs. */
16
+ export interface TodoLike {
17
+ id?: number;
18
+ subject?: string;
19
+ status?: string;
20
+ metadata?: Record<string, unknown>;
21
+ }
22
+ /**
23
+ * Classify a todo item.
24
+ *
25
+ * The metadata wins over the title: an explicit kind is more reliable than a
26
+ * prefix. A `[REVIEW-FIX]` title is a fix item, not a review item, so the fix
27
+ * prefix is checked first.
28
+ */
29
+ export declare function classifyTodo(todo: TodoLike | null | undefined): TodoKind;
30
+ /** Is the todo item still open? */
31
+ export declare function isOpenTodo(todo: TodoLike): boolean;
32
+ /** Every open todo item. */
33
+ export declare function openTodos(todos: TodoLike[]): TodoLike[];
34
+ /**
35
+ * The open todo items that are still implementation work.
36
+ *
37
+ * A queued review item is not implementation work: it must never block the
38
+ * implementation. An unclassified item counts as implementation work, because
39
+ * a task that is tracked without a prefix is still work that has to finish.
40
+ */
41
+ export declare function implementationTodos(todos: TodoLike[]): TodoLike[];
42
+ /** The open todo items that represent the queued review. */
43
+ export declare function reviewTodos(todos: TodoLike[]): TodoLike[];
44
+ /** The open todo items that fix a confirmed review finding. */
45
+ export declare function reviewFixTodos(todos: TodoLike[]): TodoLike[];
46
+ /** Does the task still have implementation work? */
47
+ export declare function hasOpenImplementationWork(todos: TodoLike[]): boolean;
48
+ /** How many todo items of each kind are open. */
49
+ export declare function summarizeTodos(todos: TodoLike[]): {
50
+ implementation: number;
51
+ review: number;
52
+ reviewFix: number;
53
+ };
54
+ /** Prefix a title with the kind of its todo item. */
55
+ export declare function buildTodoSubject(kind: TodoKind, text: string): string;
56
+ //# sourceMappingURL=classify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../src/classify.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAC9C,uDAAuD;AACvD,eAAO,MAAM,aAAa,aAAa,CAAC;AACxC,mEAAmE;AACnE,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAEhD,kDAAkD;AAClD,MAAM,WAAW,QAAQ;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAeD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,CAgBxE;AAED,mCAAmC;AACnC,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAElD;AAED,4BAA4B;AAC5B,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAEvD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAKjE;AAED,4DAA4D;AAC5D,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAEzD;AAED,+DAA+D;AAC/D,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAE5D;AAED,oDAAoD;AACpD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,CAEpE;AAED,iDAAiD;AACjD,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG;IAClD,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CAClB,CAMA;AASD,qDAAqD;AACrD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrE"}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Todo classification for the two-phase workflow.
3
+ *
4
+ * Implementation work and queued review work must never be confused. The
5
+ * workflow therefore classifies every todo item before it decides whether
6
+ * the implementation phase is over.
7
+ */
8
+ /** Prefix of a todo item that is implementation work. */
9
+ export const IMPLEMENT_PREFIX = "[IMPLEMENT]";
10
+ /** Prefix of a todo item that is the queued review. */
11
+ export const REVIEW_PREFIX = "[REVIEW]";
12
+ /** Prefix of a todo item that fixes a confirmed review finding. */
13
+ export const REVIEW_FIX_PREFIX = "[REVIEW-FIX]";
14
+ const KIND_BY_NAME = {
15
+ implement: "implement",
16
+ implementation: "implement",
17
+ impl: "implement",
18
+ review: "review",
19
+ review_pending: "review",
20
+ "review-pending": "review",
21
+ review_fix: "review_fix",
22
+ "review-fix": "review_fix",
23
+ reviewfix: "review_fix",
24
+ other: "other",
25
+ };
26
+ /**
27
+ * Classify a todo item.
28
+ *
29
+ * The metadata wins over the title: an explicit kind is more reliable than a
30
+ * prefix. A `[REVIEW-FIX]` title is a fix item, not a review item, so the fix
31
+ * prefix is checked first.
32
+ */
33
+ export function classifyTodo(todo) {
34
+ if (!todo)
35
+ return "other";
36
+ const metadata = todo.metadata ?? {};
37
+ const declared = metadata.kind ?? metadata.todoKind;
38
+ if (typeof declared === "string") {
39
+ const key = declared.toLowerCase().trim().replace(/[\s-]+/g, "_");
40
+ const mapped = KIND_BY_NAME[key];
41
+ if (mapped)
42
+ return mapped;
43
+ }
44
+ const subject = (todo.subject ?? "").trim().toUpperCase();
45
+ if (subject.startsWith(REVIEW_FIX_PREFIX))
46
+ return "review_fix";
47
+ if (subject.startsWith(IMPLEMENT_PREFIX))
48
+ return "implement";
49
+ if (subject.startsWith(REVIEW_PREFIX))
50
+ return "review";
51
+ return "other";
52
+ }
53
+ /** Is the todo item still open? */
54
+ export function isOpenTodo(todo) {
55
+ return todo.status === "pending" || todo.status === "in_progress";
56
+ }
57
+ /** Every open todo item. */
58
+ export function openTodos(todos) {
59
+ return todos.filter((todo) => isOpenTodo(todo));
60
+ }
61
+ /**
62
+ * The open todo items that are still implementation work.
63
+ *
64
+ * A queued review item is not implementation work: it must never block the
65
+ * implementation. An unclassified item counts as implementation work, because
66
+ * a task that is tracked without a prefix is still work that has to finish.
67
+ */
68
+ export function implementationTodos(todos) {
69
+ return openTodos(todos).filter((todo) => {
70
+ const kind = classifyTodo(todo);
71
+ return kind === "implement" || kind === "other";
72
+ });
73
+ }
74
+ /** The open todo items that represent the queued review. */
75
+ export function reviewTodos(todos) {
76
+ return openTodos(todos).filter((todo) => classifyTodo(todo) === "review");
77
+ }
78
+ /** The open todo items that fix a confirmed review finding. */
79
+ export function reviewFixTodos(todos) {
80
+ return openTodos(todos).filter((todo) => classifyTodo(todo) === "review_fix");
81
+ }
82
+ /** Does the task still have implementation work? */
83
+ export function hasOpenImplementationWork(todos) {
84
+ return implementationTodos(todos).length > 0;
85
+ }
86
+ /** How many todo items of each kind are open. */
87
+ export function summarizeTodos(todos) {
88
+ return {
89
+ implementation: implementationTodos(todos).length,
90
+ review: reviewTodos(todos).length,
91
+ reviewFix: reviewFixTodos(todos).length,
92
+ };
93
+ }
94
+ const PREFIX_BY_KIND = {
95
+ implement: IMPLEMENT_PREFIX,
96
+ review: REVIEW_PREFIX,
97
+ review_fix: REVIEW_FIX_PREFIX,
98
+ other: "",
99
+ };
100
+ /** Prefix a title with the kind of its todo item. */
101
+ export function buildTodoSubject(kind, text) {
102
+ const prefix = PREFIX_BY_KIND[kind];
103
+ const clean = text.trim();
104
+ if (!prefix)
105
+ return clean;
106
+ return clean.toUpperCase().startsWith(prefix) ? clean : `${prefix} ${clean}`;
107
+ }
108
+ //# sourceMappingURL=classify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classify.js","sourceRoot":"","sources":["../src/classify.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,yDAAyD;AACzD,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAC9C,uDAAuD;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;AACxC,mEAAmE;AACnE,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAUhD,MAAM,YAAY,GAA6B;IAC9C,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,WAAW;IAC3B,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,QAAQ;IAChB,cAAc,EAAE,QAAQ;IACxB,gBAAgB,EAAE,QAAQ;IAC1B,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,YAAY;IAC1B,SAAS,EAAE,YAAY;IACvB,KAAK,EAAE,OAAO;CACd,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,IAAiC;IAC7D,IAAI,CAAC,IAAI;QAAE,OAAO,OAAO,CAAC;IAE1B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,QAAQ,CAAC;IACpD,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAClC,MAAM,GAAG,GAAG,QAAQ,CAAC,WAAW,EAA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,20 @@
1
+ /**
2
+ * Two-phase implementation and review workflow.
3
+ *
4
+ * Phase 1 finishes the implementation todos of a request. Phase 2 reviews the
5
+ * diff of that request. A review signal that arrives during Phase 1 is
6
+ * recorded and deferred, never executed between two implementation todos.
7
+ */
8
+ export type { TwoPhasePhase, TodoKind, ReviewSignal, ReviewChunk, ReviewFinding, TwoPhaseState, } from "./types.js";
9
+ export { IMPLEMENT_PREFIX, REVIEW_PREFIX, REVIEW_FIX_PREFIX, classifyTodo, isOpenTodo, openTodos, implementationTodos, reviewTodos, reviewFixTodos, hasOpenImplementationWork, summarizeTodos, buildTodoSubject, } from "./classify.js";
10
+ export type { TodoLike } from "./classify.js";
11
+ export { DEFAULT_REVIEW_TOOL_PATTERNS, DEFAULT_REVIEW_COMMAND_PATTERNS, parseExtraPatterns, isComprehensiveReviewTool, isReviewCommand, dispatchAgentName, detectReviewInvocation, explicitReviewRequest, extractFiles, signalKey, mergeSignals, summarizeSignals, } from "./signals.js";
12
+ export type { ReviewInvocation, SignalSummary } from "./signals.js";
13
+ export { EXCLUDED_SCOPE_PREFIXES, DEFAULT_CHUNK_SIZE, isReviewablePath, isGitRepository, currentRevision, revisionExists, moduleKey, countModules, parseNumstat, collectScope, chunkScope, shouldChunkScope, } from "./scope.js";
14
+ export type { ScopeMetrics, ScopeResult } from "./scope.js";
15
+ export { TWO_PHASE_STATE_DIR, createState, safeFileName, normalizeState, TwoPhaseStateStore, moveToPhase, recordSignal, transitionToReviewPending, startReview, markChunkDone, recordFinding, transitionToReviewFixes, allChunksDone, markComplete, hasQueuedReview, } from "./state.js";
16
+ export { TWO_PHASE_CONTRACT, buildPhaseView, buildPhaseInstruction, buildReviewTodoSubject, buildReviewTodoDescription, buildChunkTodoSubject, buildChunkTodoDescription, isChunkTodo, syncChunkStatus, formatPhaseStatus, buildDeferralReason, } from "./rules.js";
17
+ export type { PhaseView } from "./rules.js";
18
+ export { HARNESS_MESSAGE_MARKER, initTwoPhaseReview, } from "./runtime.js";
19
+ export type { TwoPhaseExtensionApi, TwoPhaseExtensionContext, TwoPhaseRuntime, TwoPhaseRuntimeOptions, TodoReadResult, TodoReader, } from "./runtime.js";
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACX,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,aAAa,EACb,aAAa,GACb,MAAM,YAAY,CAAC;AAEpB,OAAO,EACN,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,gBAAgB,GAChB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EACN,4BAA4B,EAC5B,+BAA+B,EAC/B,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EACN,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,cAAc,EACd,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,gBAAgB,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE5D,OAAO,EACN,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,yBAAyB,EACzB,WAAW,EACX,aAAa,EACb,aAAa,EACb,uBAAuB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