pi-harness-runtime 1.1.195 → 1.1.197

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 (115) hide show
  1. package/package.json +1 -1
  2. package/packages/a2a-adapter/package.json +1 -1
  3. package/packages/agent-policy/package.json +1 -1
  4. package/packages/architecture-generator/package.json +1 -1
  5. package/packages/auth/package.json +1 -1
  6. package/packages/autonomous-refactor/package.json +1 -1
  7. package/packages/autonomous-runtime/package.json +1 -1
  8. package/packages/cache-strategy/package.json +1 -1
  9. package/packages/capability-registry/package.json +1 -1
  10. package/packages/checkpoint/package.json +1 -1
  11. package/packages/cli-plugin-sdk/package.json +1 -1
  12. package/packages/clipboard/package.json +1 -1
  13. package/packages/clipboard-plugin/package.json +1 -1
  14. package/packages/code-generation/package.json +1 -1
  15. package/packages/code-review/package.json +1 -1
  16. package/packages/codex-adapter/package.json +1 -1
  17. package/packages/codex-watcher/package.json +1 -1
  18. package/packages/config-capture/package.json +1 -1
  19. package/packages/context-compiler/package.json +1 -1
  20. package/packages/context-discovery/package.json +1 -1
  21. package/packages/context-manager/package.json +1 -1
  22. package/packages/cookie-sanitizer/package.json +1 -1
  23. package/packages/cost-optimizer/package.json +1 -1
  24. package/packages/dependency-analyzer/package.json +1 -1
  25. package/packages/django-plugin/package.json +1 -1
  26. package/packages/doc-generator/package.json +1 -1
  27. package/packages/e2e-tester/package.json +1 -1
  28. package/packages/evaluation-engine/package.json +1 -1
  29. package/packages/evaluation-runner/package.json +1 -1
  30. package/packages/event-bus/package.json +1 -1
  31. package/packages/event-store/package.json +1 -1
  32. package/packages/experience-replay/package.json +1 -1
  33. package/packages/feedback-collector/package.json +1 -1
  34. package/packages/file-copy-helper/package.json +1 -1
  35. package/packages/framework-detector/package.json +1 -1
  36. package/packages/framework-plugin-sdk/package.json +1 -1
  37. package/packages/frappe-plugin/package.json +1 -1
  38. package/packages/generic-web-plugin/package.json +1 -1
  39. package/packages/health-monitor/package.json +1 -1
  40. package/packages/intent-analyzer/package.json +1 -1
  41. package/packages/jev-judge/dist/continuation-controller.d.ts +33 -22
  42. package/packages/jev-judge/dist/continuation-controller.d.ts.map +1 -1
  43. package/packages/jev-judge/dist/continuation-controller.js +9 -41
  44. package/packages/jev-judge/dist/continuation-controller.js.map +1 -1
  45. package/packages/jev-judge/dist/index.d.ts +4 -0
  46. package/packages/jev-judge/dist/index.d.ts.map +1 -1
  47. package/packages/jev-judge/dist/index.js +4 -0
  48. package/packages/jev-judge/dist/index.js.map +1 -1
  49. package/packages/jev-judge/package.json +1 -1
  50. package/packages/jev-judge/src/continuation-controller.ts +29 -70
  51. package/packages/jev-judge/src/index.ts +8 -0
  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 -6
  62. package/packages/notification/dist/conversation-bridge.d.ts.map +1 -1
  63. package/packages/notification/dist/conversation-bridge.js +5 -36
  64. package/packages/notification/dist/conversation-bridge.js.map +1 -1
  65. package/packages/notification/package.json +1 -1
  66. package/packages/notification/src/conversation-bridge.ts +5 -54
  67. package/packages/observability/package.json +1 -1
  68. package/packages/okf-indexer/package.json +1 -1
  69. package/packages/paperclip-integration/package.json +1 -1
  70. package/packages/performance-optimizer/package.json +1 -1
  71. package/packages/privilege-broker/package.json +1 -1
  72. package/packages/project-analyzer/package.json +1 -1
  73. package/packages/project-bootstrap/package.json +1 -1
  74. package/packages/projection-engine/package.json +1 -1
  75. package/packages/prompt-compiler/package.json +1 -1
  76. package/packages/prompt-versioning/package.json +1 -1
  77. package/packages/provider-adapter-sdk/package.json +1 -1
  78. package/packages/provider-router/package.json +1 -1
  79. package/packages/provider-selector/package.json +1 -1
  80. package/packages/providers/package.json +1 -1
  81. package/packages/qdrant-skills/package.json +1 -1
  82. package/packages/quota-manager/package.json +1 -1
  83. package/packages/rate-limiter/package.json +1 -1
  84. package/packages/react-vite-plugin/package.json +1 -1
  85. package/packages/release-manager/package.json +1 -1
  86. package/packages/requirement-compiler/package.json +1 -1
  87. package/packages/runtime/package.json +1 -1
  88. package/packages/scheduler/package.json +1 -1
  89. package/packages/scheduler-adapter/package.json +1 -1
  90. package/packages/session/package.json +1 -1
  91. package/packages/session-api/package.json +1 -1
  92. package/packages/session-export/package.json +1 -1
  93. package/packages/shared-context/package.json +1 -1
  94. package/packages/skill-mcp-client/package.json +1 -1
  95. package/packages/skill-registry/package.json +1 -1
  96. package/packages/skills/package.json +1 -1
  97. package/packages/sprint-planner/package.json +1 -1
  98. package/packages/subscription-engine/package.json +1 -1
  99. package/packages/task-compiler/package.json +1 -1
  100. package/packages/telegram/package.json +1 -1
  101. package/packages/tencentdb-memory/package.json +1 -1
  102. package/packages/tencentdb-sync/package.json +1 -1
  103. package/packages/test-data-generator/package.json +1 -1
  104. package/packages/test-generator/package.json +1 -1
  105. package/packages/todo-bd-sync/package.json +1 -1
  106. package/packages/token-estimation/package.json +1 -1
  107. package/packages/token-optimizer/package.json +1 -1
  108. package/packages/trajectory/package.json +1 -1
  109. package/packages/tui/package.json +1 -1
  110. package/packages/types/package.json +1 -1
  111. package/packages/webmcp-tester/package.json +1 -1
  112. package/packages/workflow-events/package.json +1 -1
  113. package/packages/workspace-scanner/package.json +1 -1
  114. package/packages/worktree/package.json +1 -1
  115. package/packages/write-review/package.json +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-harness-runtime",
3
- "version": "1.1.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
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.195",
3
+ "version": "1.1.197",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,31 +1,43 @@
1
- /**
2
- * Todo-Driven Continuation Controller
3
- *
4
- * Executes authorized todo items without repeated prompts.
5
- * Uses deterministic rules + optional Jev for ambiguous cases.
6
- *
7
- * Architecture:
8
- * A. Read real todo state (not bd)
9
- * B. Deterministic continuation on agent_settled
10
- * C. Jev for ambiguous classification only
11
- * D. Single continuation controller
12
- * E. Update prompts/Telegram/status together
13
- */
14
1
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
15
- import { type TodoItem } from "./todo-provider.js";
2
+ import type { TodoItem } from "./todo-provider.js";
16
3
  /**
17
- * Continuation controller configuration
4
+ * Continuation configuration
18
5
  */
19
- interface ContinuationConfig {
20
- /** Minimum wait time before Jev fallback (ms) */
6
+ export interface ContinuationConfig {
7
+ /** Minimum wait before Jev fallback (ms) */
21
8
  jevFallbackMinWaitMs?: number;
22
- /** Jev probability threshold for routine continuation */
9
+ /** Threshold for routine continuation */
23
10
  routineThreshold?: number;
24
- /** Max steer attempts before reporting blocker */
11
+ /** Max steer attempts per session */
25
12
  maxSteerAttempts?: number;
26
- /** Enable Jev classification for ambiguous cases */
13
+ /** Enable Jev for ambiguous cases */
27
14
  enableJev?: boolean;
28
15
  }
16
+ /**
17
+ * Continuation state
18
+ */
19
+ export interface ContinuationState {
20
+ sessionId: string;
21
+ generation: number;
22
+ todoRevision: number;
23
+ currentItemId: number | null;
24
+ nextItemId: number | null;
25
+ lastMessageId: string | null;
26
+ continuationQueued: boolean;
27
+ userPaused: boolean;
28
+ lastSteerMessage: string | null;
29
+ steerAttempts: number;
30
+ lastEvaluationResult: string | null;
31
+ }
32
+ /**
33
+ * Continuation result
34
+ */
35
+ export interface ContinuationResult {
36
+ action: "continue" | "stop" | "blocked" | "ask";
37
+ nextItemId?: number;
38
+ question?: string;
39
+ reason?: string;
40
+ }
29
41
  /**
30
42
  * Todo-Driven Continuation Controller
31
43
  *
@@ -56,7 +68,7 @@ export declare class TodoContinuationController {
56
68
  /**
57
69
  * Mark a todo item as complete
58
70
  */
59
- markComplete(itemId: number): Promise<void>;
71
+ markComplete(_itemId: number): Promise<void>;
60
72
  /**
61
73
  * User paused
62
74
  */
@@ -82,5 +94,4 @@ export declare class TodoContinuationController {
82
94
  * Create and register a todo continuation controller
83
95
  */
84
96
  export declare function createTodoContinuation(pi: ExtensionAPI, config?: ContinuationConfig): TodoContinuationController;
85
- export {};
86
97
  //# sourceMappingURL=continuation-controller.d.ts.map
@@ -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;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,oB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MAAM,CAAA;KAAE,CAM7E;CACD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACrC,EAAE,EAAE,YAAY,EAChB,MAAM,CAAC,EAAE,kBAAkB,GACzB,0BAA0B,CAI5B"}
@@ -1,16 +1,3 @@
1
- /**
2
- * Todo-Driven Continuation Controller
3
- *
4
- * Executes authorized todo items without repeated prompts.
5
- * Uses deterministic rules + optional Jev for ambiguous cases.
6
- *
7
- * Architecture:
8
- * A. Read real todo state (not bd)
9
- * B. Deterministic continuation on agent_settled
10
- * C. Jev for ambiguous classification only
11
- * D. Single continuation controller
12
- * E. Update prompts/Telegram/status together
13
- */
14
1
  import { createTodoProvider } from "./todo-provider.js";
15
2
  /**
16
3
  * Todo-Driven Continuation Controller
@@ -43,24 +30,20 @@ export class TodoContinuationController {
43
30
  enableJev: true,
44
31
  ...config,
45
32
  };
46
- // Initialize Jev judge if enabled
47
- if (this.config.enableJev) {
48
- // Jev will be initialized with API key from environment
49
- }
50
33
  }
51
34
  /**
52
35
  * Register lifecycle hooks
53
36
  */
54
37
  register() {
55
- console.log("[TodoContinuation] Registering lifecycle hooks...");
56
38
  // Session start - reset state
57
39
  this.pi.on("session_start", () => {
58
40
  this.reset();
59
- console.log("[TodoContinuation] Session started");
60
41
  });
61
42
  // Agent settled - evaluate continuation
62
43
  this.pi.on("agent_settled", () => {
63
- this.evaluateContinuation().catch((err) => console.error("[TodoContinuation] Evaluation failed:", err));
44
+ this.evaluateContinuation().catch(() => {
45
+ // Silently handle errors
46
+ });
64
47
  });
65
48
  // User input - reset pause state
66
49
  this.pi.on("message_start", (event) => {
@@ -82,7 +65,6 @@ export class TodoContinuationController {
82
65
  this.state.continuationQueued = false;
83
66
  }
84
67
  });
85
- console.log("[TodoContinuation] Lifecycle hooks registered");
86
68
  }
87
69
  /**
88
70
  * Evaluate continuation decision and execute it
@@ -90,14 +72,12 @@ export class TodoContinuationController {
90
72
  async evaluateContinuation() {
91
73
  // 1. Check user pause
92
74
  if (this.state.userPaused) {
93
- console.log("[TodoContinuation] User paused, stopping");
94
75
  return;
95
76
  }
96
77
  // 2. Get current todo snapshot
97
78
  const availability = await this.todoProvider.availability();
98
79
  if (!availability.available) {
99
80
  // No todo provider - don't auto-continue
100
- console.log("[TodoContinuation] Todo provider unavailable:", availability.error);
101
81
  return;
102
82
  }
103
83
  try {
@@ -110,7 +90,6 @@ export class TodoContinuationController {
110
90
  // 4. If there's work in progress, continue it
111
91
  if (inProgressItems.length > 0) {
112
92
  const item = inProgressItems[0];
113
- console.log(`[TodoContinuation] In-progress item: ${item.subject}`);
114
93
  await this.continueItem(item);
115
94
  return;
116
95
  }
@@ -118,17 +97,14 @@ export class TodoContinuationController {
118
97
  const totalItems = completedItems.length + pendingItems.length + inProgressItems.length;
119
98
  const hasWork = pendingItems.length > 0 || inProgressItems.length > 0;
120
99
  if (!hasWork && totalItems === 0) {
121
- console.log("[TodoContinuation] All items complete");
100
+ // All items complete
122
101
  return;
123
102
  }
124
103
  if (pendingItems.length > 0) {
125
104
  // Check if items are blocked
126
105
  const blockedItems = await this.todoProvider.getBlocked();
127
106
  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
107
+ // All pending items are blocked - don't auto-continue
132
108
  return;
133
109
  }
134
110
  // Continue the first non-blocked pending item
@@ -138,8 +114,8 @@ export class TodoContinuationController {
138
114
  }
139
115
  }
140
116
  }
141
- catch (err) {
142
- console.error("[TodoContinuation] Evaluation error:", err);
117
+ catch {
118
+ // Silently handle errors
143
119
  }
144
120
  }
145
121
  /**
@@ -147,7 +123,6 @@ export class TodoContinuationController {
147
123
  */
148
124
  async continueItem(item) {
149
125
  if (this.state.steerAttempts >= this.config.maxSteerAttempts) {
150
- console.warn("[TodoContinuation] Max steer attempts reached");
151
126
  return;
152
127
  }
153
128
  this.state.steerAttempts++;
@@ -157,8 +132,6 @@ export class TodoContinuationController {
157
132
  ? `Continue task: ${item.subject}\n\n${item.description}`
158
133
  : `Continue task: ${item.subject}`;
159
134
  this.state.lastSteerMessage = message;
160
- console.log(`[TodoContinuation] Continuing: ${item.subject}`);
161
- console.log(`[TodoContinuation] Message: ${message}`);
162
135
  // Note: Pi does not expose sendUserMessage API.
163
136
  // The Telegram notification system will prompt user for ambiguous cases.
164
137
  }
@@ -167,7 +140,6 @@ export class TodoContinuationController {
167
140
  */
168
141
  async steerToContinue(itemId) {
169
142
  if (this.state.steerAttempts >= this.config.maxSteerAttempts) {
170
- console.warn("[TodoContinuation] Max steer attempts reached");
171
143
  return;
172
144
  }
173
145
  this.state.steerAttempts++;
@@ -179,13 +151,11 @@ export class TodoContinuationController {
179
151
  : `Continue work on the next ready task.`;
180
152
  this.state.lastSteerMessage = message;
181
153
  this.state.todoRevision = snapshot.revision;
182
- console.log(`[TodoContinuation] Steering to continue item ${itemId}`);
183
154
  }
184
155
  /**
185
156
  * Mark a todo item as complete
186
157
  */
187
- async markComplete(itemId) {
188
- console.log(`[TodoContinuation] Marking item ${itemId} complete`);
158
+ async markComplete(_itemId) {
189
159
  this.state.currentItemId = null;
190
160
  this.state.generation++;
191
161
  }
@@ -195,7 +165,6 @@ export class TodoContinuationController {
195
165
  pause() {
196
166
  this.state.userPaused = true;
197
167
  this.state.continuationQueued = false;
198
- console.log("[TodoContinuation] User paused");
199
168
  }
200
169
  /**
201
170
  * Reset state for new session
@@ -219,7 +188,6 @@ export class TodoContinuationController {
219
188
  * Cleanup on shutdown
220
189
  */
221
190
  cleanup() {
222
- console.log("[TodoContinuation] Cleaning up");
223
191
  this.state.continuationQueued = false;
224
192
  this.state.generation++;
225
193
  }
@@ -228,7 +196,7 @@ export class TodoContinuationController {
228
196
  */
229
197
  getState() {
230
198
  return {
231
- current: null, // Would need to fetch
199
+ current: null,
232
200
  next: null,
233
201
  ready: 0,
234
202
  };