pi-harness-runtime 1.1.193 → 1.1.195

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 (122) hide show
  1. package/index.ts +4 -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/context-compiler/package.json +1 -1
  21. package/packages/context-discovery/package.json +1 -1
  22. package/packages/context-manager/package.json +1 -1
  23. package/packages/cookie-sanitizer/package.json +1 -1
  24. package/packages/cost-optimizer/package.json +1 -1
  25. package/packages/dependency-analyzer/package.json +1 -1
  26. package/packages/django-plugin/package.json +1 -1
  27. package/packages/doc-generator/package.json +1 -1
  28. package/packages/e2e-tester/package.json +1 -1
  29. package/packages/evaluation-engine/package.json +1 -1
  30. package/packages/evaluation-runner/package.json +1 -1
  31. package/packages/event-bus/package.json +1 -1
  32. package/packages/event-store/package.json +1 -1
  33. package/packages/experience-replay/package.json +1 -1
  34. package/packages/feedback-collector/package.json +1 -1
  35. package/packages/file-copy-helper/package.json +1 -1
  36. package/packages/framework-detector/package.json +1 -1
  37. package/packages/framework-plugin-sdk/package.json +1 -1
  38. package/packages/frappe-plugin/package.json +1 -1
  39. package/packages/generic-web-plugin/package.json +1 -1
  40. package/packages/health-monitor/package.json +1 -1
  41. package/packages/intent-analyzer/package.json +1 -1
  42. package/packages/jev-judge/dist/continuation-controller.d.ts +3 -4
  43. package/packages/jev-judge/dist/continuation-controller.d.ts.map +1 -1
  44. package/packages/jev-judge/dist/continuation-controller.js +62 -96
  45. package/packages/jev-judge/dist/continuation-controller.js.map +1 -1
  46. package/packages/jev-judge/dist/todo-provider.d.ts.map +1 -1
  47. package/packages/jev-judge/dist/todo-provider.js +37 -3
  48. package/packages/jev-judge/dist/todo-provider.js.map +1 -1
  49. package/packages/jev-judge/package.json +1 -1
  50. package/packages/jev-judge/src/continuation-controller.ts +69 -114
  51. package/packages/jev-judge/src/todo-provider.ts +45 -3
  52. package/packages/knowledge-graph/package.json +1 -1
  53. package/packages/knowledge-retrieval/package.json +1 -1
  54. package/packages/laravel-plugin/package.json +1 -1
  55. package/packages/learning-engine/package.json +1 -1
  56. package/packages/mcp-adapter/package.json +1 -1
  57. package/packages/memory-engine/package.json +1 -1
  58. package/packages/milestone-manager/package.json +1 -1
  59. package/packages/model-registry/package.json +1 -1
  60. package/packages/nextjs-plugin/package.json +1 -1
  61. package/packages/notification/dist/conversation-bridge.d.ts +1 -14
  62. package/packages/notification/dist/conversation-bridge.d.ts.map +1 -1
  63. package/packages/notification/dist/conversation-bridge.js +67 -87
  64. package/packages/notification/dist/conversation-bridge.js.map +1 -1
  65. package/packages/notification/dist/notification-center.d.ts.map +1 -1
  66. package/packages/notification/dist/notification-center.js +8 -0
  67. package/packages/notification/dist/notification-center.js.map +1 -1
  68. package/packages/notification/dist/types.d.ts +1 -1
  69. package/packages/notification/dist/types.d.ts.map +1 -1
  70. package/packages/notification/package.json +1 -1
  71. package/packages/notification/src/conversation-bridge.ts +69 -98
  72. package/packages/notification/src/notification-center.ts +8 -0
  73. package/packages/notification/src/types.ts +2 -0
  74. package/packages/observability/package.json +1 -1
  75. package/packages/okf-indexer/package.json +1 -1
  76. package/packages/paperclip-integration/package.json +1 -1
  77. package/packages/performance-optimizer/package.json +1 -1
  78. package/packages/privilege-broker/package.json +1 -1
  79. package/packages/project-analyzer/package.json +1 -1
  80. package/packages/project-bootstrap/package.json +1 -1
  81. package/packages/projection-engine/package.json +1 -1
  82. package/packages/prompt-compiler/package.json +1 -1
  83. package/packages/prompt-versioning/package.json +1 -1
  84. package/packages/provider-adapter-sdk/package.json +1 -1
  85. package/packages/provider-router/package.json +1 -1
  86. package/packages/provider-selector/package.json +1 -1
  87. package/packages/providers/package.json +1 -1
  88. package/packages/qdrant-skills/package.json +1 -1
  89. package/packages/quota-manager/package.json +1 -1
  90. package/packages/rate-limiter/package.json +1 -1
  91. package/packages/react-vite-plugin/package.json +1 -1
  92. package/packages/release-manager/package.json +1 -1
  93. package/packages/requirement-compiler/package.json +1 -1
  94. package/packages/runtime/package.json +1 -1
  95. package/packages/scheduler/package.json +1 -1
  96. package/packages/scheduler-adapter/package.json +1 -1
  97. package/packages/session/package.json +1 -1
  98. package/packages/session-api/package.json +1 -1
  99. package/packages/session-export/package.json +1 -1
  100. package/packages/shared-context/package.json +1 -1
  101. package/packages/skill-mcp-client/package.json +1 -1
  102. package/packages/skill-registry/package.json +1 -1
  103. package/packages/skills/package.json +1 -1
  104. package/packages/sprint-planner/package.json +1 -1
  105. package/packages/subscription-engine/package.json +1 -1
  106. package/packages/task-compiler/package.json +1 -1
  107. package/packages/telegram/package.json +1 -1
  108. package/packages/tencentdb-memory/package.json +1 -1
  109. package/packages/tencentdb-sync/package.json +1 -1
  110. package/packages/test-data-generator/package.json +1 -1
  111. package/packages/test-generator/package.json +1 -1
  112. package/packages/todo-bd-sync/package.json +1 -1
  113. package/packages/token-estimation/package.json +1 -1
  114. package/packages/token-optimizer/package.json +1 -1
  115. package/packages/trajectory/package.json +1 -1
  116. package/packages/tui/package.json +1 -1
  117. package/packages/types/package.json +1 -1
  118. package/packages/webmcp-tester/package.json +1 -1
  119. package/packages/workflow-events/package.json +1 -1
  120. package/packages/workspace-scanner/package.json +1 -1
  121. package/packages/worktree/package.json +1 -1
  122. package/packages/write-review/package.json +1 -1
package/index.ts CHANGED
@@ -78,6 +78,7 @@ import {
78
78
 
79
79
  // --- Jev Auto-Continue: Agent autonomous decision-making --------------------
80
80
  // Lazy import - only loads when packages/jev-judge exists and API key available
81
+ import { createTodoContinuation } from "./packages/jev-judge/dist/continuation-controller.js";
81
82
 
82
83
  /**
83
84
  * Get tasks from bd (beads) for Jev decision context.
@@ -1545,6 +1546,9 @@ export default function (pi: ExtensionAPI) {
1545
1546
  // --- jev-auto-continue: Agent autonomous decision when user unavailable -----
1546
1547
  void initAutoContinue(pi);
1547
1548
 
1549
+ // Register todo-driven continuation controller
1550
+ createTodoContinuation(pi);
1551
+
1548
1552
  // --- qdrant-vector-search: Qdrant integration for semantic skill search ----
1549
1553
  // Collect promise so we can wait for initialization before showing startup notification
1550
1554
  asyncInitPromises.push(initQdrant());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-harness-runtime",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "[BETA] Codex-style /usage status + autonomous coding harness for pi. Not production ready — expect breaking changes.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/a2a-adapter",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "description": "Google Agent-to-Agent (A2A) protocol adapter for pi-harness",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/agent-policy",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Agent policy runtime for pi-harness - enforces mandatory rule delivery and mutation gating",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/architecture-generator",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Generate ADR and Mermaid diagrams from project analysis",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/auth",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "pi-harness-runtime — auth",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/autonomous-refactor",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "description": "Autonomous refactoring engine",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/autonomous-runtime",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Autonomous Operations Runtime — task inbox, lease management, and worker lifecycle (RFC-0101)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/cache-strategy",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "description": "Smart caching with TTL and invalidation strategies (RFC-0022)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/capability-registry",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Capability Registry for pi-harness-runtime — tracks model capabilities and enables capability-based routing",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/checkpoint",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Enhanced checkpoint system with incremental snapshots, diff-based storage, and recovery strategies",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/cli-plugin-sdk",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "description": "CLI Plugin SDK for pi-harness — install, list, remove, update, invoke plugins",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/clipboard",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/clipboard-plugin",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/code-generation",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Code generation pipeline for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/code-review",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Automated code review engine for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/codex-adapter",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "description": "OpenAI Codex provider adapter for pi-harness",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/codex-watcher",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Watches Codex CLI sessions and emits visible messages for PING-PONG monitoring",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/config-capture",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Auto-capture API-fetched configuration values to AGENTS.md",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/context-compiler",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Bounded context selection engine for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/context-discovery",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/context-manager",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Context Window Manager — prevents model context overflow via compaction and resume prompts (RFC-0010)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/cookie-sanitizer",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "pi-harness-runtime — cookie sanitizer (provider-quota cookie file normaliser)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/cost-optimizer",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Cost Optimizer for pi-harness-runtime — budget tracking, forecasting, and model selection optimization",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/dependency-analyzer",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/django-plugin",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Django framework analysis — models, management commands, settings",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/doc-generator",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Auto-Doc Generator — generate documentation from source code (RFC-0014)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/e2e-tester",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "WebMCP-powered E2E testing for pi-harness - natural language test scenarios",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/evaluation-engine",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Evaluation engine for pi-harness runtime (RFC-0057)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/evaluation-runner",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "description": "Framework-agnostic evaluation framework for AI outputs (RFC-0020)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/event-bus",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/event-store",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/experience-replay",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Experience replay for debugging and reproducibility (RFC-0059)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/feedback-collector",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "description": "Collect and aggregate human/automated feedback (RFC-0021)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/file-copy-helper",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Injects cp/sudo cp rule when user asks to mimic/copy files",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/framework-detector",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Framework detection 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/framework-plugin-sdk",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Framework plugin SDK for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/frappe-plugin",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Frappe/ERPNext framework analysis — DocTypes, hooks, bench sites, site config",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/generic-web-plugin",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "description": "Generic web framework analysis — REST/GraphQL endpoints, OpenAPI, auth",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/health-monitor",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "description": "Health monitoring and auto-healing",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/intent-analyzer",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -35,7 +35,6 @@ export declare class TodoContinuationController {
35
35
  private pi;
36
36
  private config;
37
37
  private todoProvider;
38
- private jevJudge?;
39
38
  private state;
40
39
  constructor(pi: ExtensionAPI, config?: ContinuationConfig);
41
40
  /**
@@ -43,13 +42,13 @@ export declare class TodoContinuationController {
43
42
  */
44
43
  register(): void;
45
44
  /**
46
- * Evaluate continuation decision
45
+ * Evaluate continuation decision and execute it
47
46
  */
48
47
  private evaluateContinuation;
49
48
  /**
50
- * Determine if we should auto-continue
49
+ * Continue a specific todo item
51
50
  */
52
- private shouldAutoContinue;
51
+ private continueItem;
53
52
  /**
54
53
  * Steer to continue a todo item
55
54
  */
@@ -1 +1 @@
1
- {"version":3,"file":"continuation-controller.d.ts","sourceRoot":"","sources":["../src/continuation-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAsB,KAAK,QAAQ,EAAqB,MAAM,oBAAoB,CAAC;AA8B1F;;GAEG;AACH,UAAU,kBAAkB;IAC3B,iDAAiD;IAClD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC7B,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,qBAAa,0BAA0B;IACtC,OAAO,CAAC,EAAE,CAAe;IACzB,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,YAAY,CAAwB;IAC5C,OAAO,CAAC,QAAQ,CAAC,CAAoB;IAErC,OAAO,CAAC,KAAK,CAWX;IAEF,YAAY,EAAE,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,kBAAkB,EAcxD;IAED;;OAEG;IACH,QAAQ,IAAI,IAAI,CAwCf;IAED;;OAEG;YACW,oBAAoB;IAsFlC;;OAEG;YACW,kBAAkB;IA6ChC;;OAEG;IACG,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBnD;IAED;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhD;IAED;;OAEG;IACH,KAAK,IAAI,IAAI,CAIZ;IAED;;OAEG;IACH,OAAO,CAAC,KAAK;IAeb;;OAEG;IACH,OAAO,CAAC,OAAO;IAMf;;OAEG;IACH,QAAQ,IAAI;QAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAM7E;CACD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACrC,EAAE,EAAE,YAAY,EAChB,MAAM,CAAC,EAAE,kBAAkB,GACzB,0BAA0B,CAI5B"}
1
+ {"version":3,"file":"continuation-controller.d.ts","sourceRoot":"","sources":["../src/continuation-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAsB,KAAK,QAAQ,EAAqB,MAAM,oBAAoB,CAAC;AA8B1F;;GAEG;AACH,UAAU,kBAAkB;IAC3B,iDAAiD;IAClD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC7B,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,qBAAa,0BAA0B;IACtC,OAAO,CAAC,EAAE,CAAe;IACzB,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,YAAY,CAAwB;IAE5C,OAAO,CAAC,KAAK,CAYX;IAEF,YAAY,EAAE,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,kBAAkB,EAcxD;IAED;;OAEG;IACH,QAAQ,IAAI,IAAI,CAwCf;IAED;;OAEG;YACW,oBAAoB;IA+DlC;;OAEG;YACW,YAAY;IAsB1B;;OAEG;IACG,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBnD;IAED;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhD;IAED;;OAEG;IACH,KAAK,IAAI,IAAI,CAIZ;IAED;;OAEG;IACH,OAAO,CAAC,KAAK;IAgBb;;OAEG;IACH,OAAO,CAAC,OAAO;IAMf;;OAEG;IACH,QAAQ,IAAI;QAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAM7E;CACD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACrC,EAAE,EAAE,YAAY,EAChB,MAAM,CAAC,EAAE,kBAAkB,GACzB,0BAA0B,CAI5B"}
@@ -21,7 +21,6 @@ export class TodoContinuationController {
21
21
  pi;
22
22
  config;
23
23
  todoProvider = createTodoProvider();
24
- jevJudge;
25
24
  state = {
26
25
  sessionId: "",
27
26
  generation: 0,
@@ -33,6 +32,7 @@ export class TodoContinuationController {
33
32
  userPaused: false,
34
33
  lastSteerMessage: null,
35
34
  steerAttempts: 0,
35
+ lastEvaluationResult: null,
36
36
  };
37
37
  constructor(pi, config) {
38
38
  this.pi = pi;
@@ -85,117 +85,82 @@ export class TodoContinuationController {
85
85
  console.log("[TodoContinuation] Lifecycle hooks registered");
86
86
  }
87
87
  /**
88
- * Evaluate continuation decision
88
+ * Evaluate continuation decision and execute it
89
89
  */
90
90
  async evaluateContinuation() {
91
91
  // 1. Check user pause
92
92
  if (this.state.userPaused) {
93
- return { action: "stop", reason: "User paused" };
93
+ console.log("[TodoContinuation] User paused, stopping");
94
+ return;
94
95
  }
95
96
  // 2. Get current todo snapshot
96
97
  const availability = await this.todoProvider.availability();
97
98
  if (!availability.available) {
99
+ // No todo provider - don't auto-continue
98
100
  console.log("[TodoContinuation] Todo provider unavailable:", availability.error);
99
- return { action: "stop", reason: "Todo provider unavailable" };
100
- }
101
- const snapshot = await this.todoProvider.getSnapshot();
102
- // 3. Check if state changed significantly
103
- if (snapshot.revision === this.state.todoRevision && this.state.nextItemId) {
104
- // Same todo state, try to continue next item
105
- }
106
- else {
107
- // Todo state changed, recalculate
108
- this.state.todoRevision = snapshot.revision;
109
- this.state.currentItemId = null;
110
- this.state.nextItemId = null;
111
- }
112
- // 4. Get ready items
113
- const readyItems = await this.todoProvider.getReady();
114
- const completedItems = await this.todoProvider.getCompleted();
115
- const pendingItems = await this.todoProvider.getPending();
116
- // 5. Determine action
117
- if (readyItems.length === 0 && pendingItems.length === 0) {
118
- console.log("[TodoContinuation] All items complete");
119
- return { action: "stop", reason: "All todos complete" };
120
- }
121
- if (readyItems.length === 0 && pendingItems.length > 0) {
122
- // Items exist but all blocked
123
- const blockedItems = await this.todoProvider.getBlocked();
124
- const blocker = blockedItems[0];
125
- console.log("[TodoContinuation] Items blocked:", blocker?.subject);
126
- return {
127
- action: "blocked",
128
- question: `Task "${blocker?.subject}" is blocked. What is needed to unblock it?`,
129
- reason: `Blocked by dependencies`,
130
- };
131
- }
132
- // 6. Select next ready item
133
- const nextItem = this.state.nextItemId
134
- ? readyItems.find((i) => i.id === this.state.nextItemId) ?? readyItems[0]
135
- : readyItems[0];
136
- if (!nextItem) {
137
- return { action: "stop", reason: "No ready items" };
101
+ return;
138
102
  }
139
- // 7. Check if current item should be marked complete
140
- if (this.state.currentItemId && this.state.currentItemId !== nextItem.id) {
141
- // Item changed, mark previous complete
142
- console.log(`[TodoContinuation] Item ${this.state.currentItemId} complete`);
103
+ try {
104
+ // Get snapshot for state tracking
105
+ await this.todoProvider.getSnapshot();
106
+ // 3. Get in-progress and pending items
107
+ const inProgressItems = await this.todoProvider.getByStatus("in_progress");
108
+ const pendingItems = await this.todoProvider.getPending();
109
+ const completedItems = await this.todoProvider.getCompleted();
110
+ // 4. If there's work in progress, continue it
111
+ if (inProgressItems.length > 0) {
112
+ const item = inProgressItems[0];
113
+ console.log(`[TodoContinuation] In-progress item: ${item.subject}`);
114
+ await this.continueItem(item);
115
+ return;
116
+ }
117
+ // 5. Determine action based on state
118
+ const totalItems = completedItems.length + pendingItems.length + inProgressItems.length;
119
+ const hasWork = pendingItems.length > 0 || inProgressItems.length > 0;
120
+ if (!hasWork && totalItems === 0) {
121
+ console.log("[TodoContinuation] All items complete");
122
+ return;
123
+ }
124
+ if (pendingItems.length > 0) {
125
+ // Check if items are blocked
126
+ const blockedItems = await this.todoProvider.getBlocked();
127
+ if (blockedItems.length === pendingItems.length) {
128
+ // All pending items are blocked
129
+ const blocker = blockedItems[0];
130
+ console.log("[TodoContinuation] Items blocked:", blocker?.subject);
131
+ // Don't auto-continue when blocked
132
+ return;
133
+ }
134
+ // Continue the first non-blocked pending item
135
+ const readyItems = await this.todoProvider.getReady();
136
+ if (readyItems.length > 0) {
137
+ await this.continueItem(readyItems[0]);
138
+ }
139
+ }
143
140
  }
144
- // 8. Update state
145
- this.state.currentItemId = nextItem.id;
146
- this.state.nextItemId = readyItems.length > 1 ? readyItems[1].id : null;
147
- // 9. Determine if we should continue or ask
148
- const shouldContinue = await this.shouldAutoContinue(nextItem);
149
- if (shouldContinue.continue) {
150
- console.log(`[TodoContinuation] Continuing item ${nextItem.id}: ${nextItem.subject}`);
151
- return { action: "continue", nextItemId: nextItem.id };
141
+ catch (err) {
142
+ console.error("[TodoContinuation] Evaluation error:", err);
152
143
  }
153
- // 10. Jev says ask user
154
- return {
155
- action: "ask",
156
- nextItemId: nextItem.id,
157
- question: shouldContinue.question,
158
- reason: shouldContinue.reason,
159
- };
160
144
  }
161
145
  /**
162
- * Determine if we should auto-continue
146
+ * Continue a specific todo item
163
147
  */
164
- async shouldAutoContinue(item) {
165
- // If no current work, continue is routine
166
- if (!this.state.currentItemId) {
167
- return { continue: true };
168
- }
169
- // If completing current item and next is ready, continue is routine
170
- if (this.state.currentItemId !== item.id && this.state.nextItemId === item.id) {
171
- return { continue: true };
172
- }
173
- // Check if we're mid-item
174
- if (this.state.currentItemId === item.id) {
175
- // Already working on this item, continue
176
- return { continue: true };
177
- }
178
- // For ambiguous cases, use Jev
179
- if (this.config.enableJev && this.jevJudge) {
180
- const decision = await this.jevJudge.decide({
181
- completedTasks: [],
182
- remainingTasks: [item.subject],
183
- totalTasks: 1,
184
- waitTimeMinutes: 0,
185
- userResponded: false,
186
- sessionStartTime: new Date(),
187
- });
188
- if (decision.action === "proceed") {
189
- return { continue: true };
190
- }
191
- return {
192
- continue: false,
193
- question: `Ready to continue: "${item.subject}"?`,
194
- reason: decision.reasoning,
195
- };
148
+ async continueItem(item) {
149
+ if (this.state.steerAttempts >= this.config.maxSteerAttempts) {
150
+ console.warn("[TodoContinuation] Max steer attempts reached");
151
+ return;
196
152
  }
197
- // Default: continue for ready items
198
- return { continue: true };
153
+ this.state.steerAttempts++;
154
+ this.state.continuationQueued = true;
155
+ // Build continuation message
156
+ const message = item.description
157
+ ? `Continue task: ${item.subject}\n\n${item.description}`
158
+ : `Continue task: ${item.subject}`;
159
+ this.state.lastSteerMessage = message;
160
+ console.log(`[TodoContinuation] Continuing: ${item.subject}`);
161
+ console.log(`[TodoContinuation] Message: ${message}`);
162
+ // Note: Pi does not expose sendUserMessage API.
163
+ // The Telegram notification system will prompt user for ambiguous cases.
199
164
  }
200
165
  /**
201
166
  * Steer to continue a todo item
@@ -247,6 +212,7 @@ export class TodoContinuationController {
247
212
  userPaused: false,
248
213
  lastSteerMessage: null,
249
214
  steerAttempts: 0,
215
+ lastEvaluationResult: null,
250
216
  };
251
217
  }
252
218
  /**