pi-harness-runtime 1.1.231 → 1.1.233
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.
- package/index.ts +34 -0
- package/package.json +1 -1
- package/packages/a2a-adapter/package.json +1 -1
- package/packages/agent-policy/package.json +1 -1
- package/packages/architecture-generator/package.json +1 -1
- package/packages/auth/package.json +1 -1
- package/packages/autonomous-refactor/package.json +1 -1
- package/packages/autonomous-runtime/package.json +1 -1
- package/packages/cache-strategy/package.json +1 -1
- package/packages/capability-registry/package.json +1 -1
- package/packages/checkpoint/package.json +1 -1
- package/packages/cli-plugin-sdk/package.json +1 -1
- package/packages/clipboard/package.json +1 -1
- package/packages/clipboard-plugin/package.json +1 -1
- package/packages/code-generation/package.json +1 -1
- package/packages/code-review/package.json +1 -1
- package/packages/codex-adapter/package.json +1 -1
- package/packages/codex-watcher/package.json +1 -1
- package/packages/config-capture/package.json +1 -1
- package/packages/context-compiler/package.json +1 -1
- package/packages/context-discovery/package.json +1 -1
- package/packages/context-manager/package.json +1 -1
- package/packages/cookie-sanitizer/package.json +1 -1
- package/packages/cost-optimizer/package.json +1 -1
- package/packages/dependency-analyzer/package.json +1 -1
- package/packages/django-plugin/package.json +1 -1
- package/packages/doc-generator/package.json +1 -1
- package/packages/e2e-tester/package.json +1 -1
- package/packages/evaluation-engine/package.json +1 -1
- package/packages/evaluation-runner/package.json +1 -1
- package/packages/event-bus/package.json +1 -1
- package/packages/event-store/package.json +1 -1
- package/packages/experience-replay/package.json +1 -1
- package/packages/feedback-collector/package.json +1 -1
- package/packages/file-copy-helper/package.json +1 -1
- package/packages/framework-detector/package.json +1 -1
- package/packages/framework-plugin-sdk/package.json +1 -1
- package/packages/frappe-plugin/package.json +1 -1
- package/packages/generic-web-plugin/package.json +1 -1
- package/packages/health-monitor/package.json +1 -1
- package/packages/intent-analyzer/package.json +1 -1
- package/packages/jev-judge/dist/continuation-controller.d.ts +19 -12
- package/packages/jev-judge/dist/continuation-controller.d.ts.map +1 -1
- package/packages/jev-judge/dist/continuation-controller.js +111 -54
- package/packages/jev-judge/dist/continuation-controller.js.map +1 -1
- package/packages/jev-judge/dist/todo-provider.d.ts +16 -1
- package/packages/jev-judge/dist/todo-provider.d.ts.map +1 -1
- package/packages/jev-judge/dist/todo-provider.js +22 -11
- package/packages/jev-judge/dist/todo-provider.js.map +1 -1
- package/packages/jev-judge/dist/typesafe-provider.d.ts.map +1 -1
- package/packages/jev-judge/dist/typesafe-provider.js +12 -3
- package/packages/jev-judge/dist/typesafe-provider.js.map +1 -1
- package/packages/jev-judge/package.json +1 -1
- package/packages/jev-judge/src/continuation-controller.ts +128 -63
- package/packages/jev-judge/src/todo-provider.ts +40 -21
- package/packages/jev-judge/src/typesafe-provider.ts +12 -3
- package/packages/knowledge-graph/package.json +1 -1
- package/packages/knowledge-retrieval/package.json +1 -1
- package/packages/laravel-plugin/package.json +1 -1
- package/packages/learning-engine/package.json +1 -1
- package/packages/mcp-adapter/package.json +1 -1
- package/packages/memory-engine/package.json +1 -1
- package/packages/milestone-manager/package.json +1 -1
- package/packages/model-registry/package.json +1 -1
- package/packages/nextjs-plugin/package.json +1 -1
- package/packages/notification/package.json +1 -1
- package/packages/observability/package.json +1 -1
- package/packages/okf-indexer/package.json +1 -1
- package/packages/paperclip-integration/package.json +1 -1
- package/packages/performance-optimizer/package.json +1 -1
- package/packages/privilege-broker/package.json +1 -1
- package/packages/project-analyzer/package.json +1 -1
- package/packages/project-bootstrap/package.json +1 -1
- package/packages/projection-engine/package.json +1 -1
- package/packages/prompt-compiler/package.json +1 -1
- package/packages/prompt-versioning/package.json +1 -1
- package/packages/provider-adapter-sdk/package.json +1 -1
- package/packages/provider-router/package.json +1 -1
- package/packages/provider-selector/package.json +1 -1
- package/packages/providers/package.json +1 -1
- package/packages/qdrant-skills/package.json +1 -1
- package/packages/quota-manager/package.json +1 -1
- package/packages/rate-limiter/package.json +1 -1
- package/packages/react-vite-plugin/package.json +1 -1
- package/packages/release-manager/package.json +1 -1
- package/packages/requirement-compiler/package.json +1 -1
- package/packages/runtime/package.json +1 -1
- package/packages/scheduler/package.json +1 -1
- package/packages/scheduler-adapter/package.json +1 -1
- package/packages/session/package.json +1 -1
- package/packages/session-api/package.json +1 -1
- package/packages/session-export/package.json +1 -1
- package/packages/shared-context/package.json +1 -1
- package/packages/skill-mcp-client/package.json +1 -1
- package/packages/skill-registry/package.json +1 -1
- package/packages/skills/package.json +1 -1
- package/packages/sprint-planner/package.json +1 -1
- package/packages/subscription-engine/package.json +1 -1
- package/packages/task-compiler/package.json +1 -1
- package/packages/telegram/package.json +1 -1
- package/packages/tencentdb-memory/package.json +1 -1
- package/packages/tencentdb-sync/package.json +1 -1
- package/packages/test-data-generator/package.json +1 -1
- package/packages/test-generator/package.json +1 -1
- package/packages/todo-bd-sync/package.json +1 -1
- package/packages/token-estimation/package.json +1 -1
- package/packages/token-optimizer/package.json +1 -1
- package/packages/trajectory/package.json +1 -1
- package/packages/tui/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/webmcp-tester/package.json +1 -1
- package/packages/workflow-events/package.json +1 -1
- package/packages/workspace-scanner/package.json +1 -1
- package/packages/worktree/package.json +1 -1
- package/packages/write-review/package.json +1 -1
package/index.ts
CHANGED
|
@@ -439,6 +439,40 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
439
439
|
}
|
|
440
440
|
};
|
|
441
441
|
|
|
442
|
+
// --- agent_settled: Check todos and continue work ---------------
|
|
443
|
+
pi.on("agent_settled", async (_event, ctx) => {
|
|
444
|
+
// Don't continue if user is waiting for response
|
|
445
|
+
if (waitingForUserSince) return;
|
|
446
|
+
|
|
447
|
+
// Don't continue if inference is already in progress
|
|
448
|
+
if (_inferenceInProgress) return;
|
|
449
|
+
|
|
450
|
+
// Don't continue if session is not idle or has pending messages
|
|
451
|
+
if (!ctx.isIdle?.() || ctx.hasPendingMessages?.()) return;
|
|
452
|
+
|
|
453
|
+
// Import and use the continuation controller with proper context
|
|
454
|
+
try {
|
|
455
|
+
const { TodoContinuationController } = await import("./packages/jev-judge/dist/continuation-controller.js");
|
|
456
|
+
// SAFETY: ctx is ExtensionContext which has all TodoContext properties (sessionManager, isIdle, hasPendingMessages, sendUserMessage)
|
|
457
|
+
// TodoContinuationController only needs the subset defined in TodoContext
|
|
458
|
+
const controller = new TodoContinuationController(ctx as unknown as import("./packages/jev-judge/dist/todo-provider.js").TodoContext);
|
|
459
|
+
const result = await controller.decide();
|
|
460
|
+
|
|
461
|
+
if (result.action === "continue" && result.nextItemId) {
|
|
462
|
+
updateAutoContinueStatus("CONTINUING");
|
|
463
|
+
await controller.steerToContinue(result.nextItemId);
|
|
464
|
+
setTimeout(() => updateAutoContinueStatus("IDLE"), 2000);
|
|
465
|
+
} else if (result.action === "blocked") {
|
|
466
|
+
updateAutoContinueStatus("ERROR", "blocked");
|
|
467
|
+
logToFile("[auto-continue]", "Tasks blocked:", result.question ?? "unknown");
|
|
468
|
+
} else if (result.action === "stop") {
|
|
469
|
+
logToFile("[auto-continue]", "decide returned stop:", result.reason ?? "unknown");
|
|
470
|
+
}
|
|
471
|
+
} catch (err) {
|
|
472
|
+
logToFile("[auto-continue]", "agent_settled handler error:", String(err));
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
|
|
442
476
|
// Start periodic check
|
|
443
477
|
autoContinueTimer = setInterval(checkAndAutoContinue, AUTO_CONTINUE_INTERVAL_MS);
|
|
444
478
|
addHarnessMessage("Jev", "auto-continue configured (verifying API...)", "ok");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/capability-registry",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.233",
|
|
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,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { TodoItem } from "./todo-provider.js";
|
|
1
|
+
import type { TodoItem, TodoContext } from "./todo-provider.js";
|
|
3
2
|
/**
|
|
4
3
|
* Continuation configuration
|
|
5
4
|
*/
|
|
@@ -26,7 +25,8 @@ export interface ContinuationState {
|
|
|
26
25
|
continuationQueued: boolean;
|
|
27
26
|
userPaused: boolean;
|
|
28
27
|
lastSteerMessage: string | null;
|
|
29
|
-
|
|
28
|
+
steerAttemptsForCurrentItem: number;
|
|
29
|
+
lastItemContinued: number | null;
|
|
30
30
|
lastEvaluationResult: string | null;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
@@ -44,15 +44,21 @@ export interface ContinuationResult {
|
|
|
44
44
|
* Evaluates todo state on agent_settled and determines next action.
|
|
45
45
|
*/
|
|
46
46
|
export declare class TodoContinuationController {
|
|
47
|
-
private
|
|
47
|
+
private ctx;
|
|
48
48
|
private config;
|
|
49
49
|
private todoProvider;
|
|
50
50
|
private state;
|
|
51
|
-
constructor(
|
|
51
|
+
constructor(ctx: TodoContext, config?: ContinuationConfig);
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* Check if continuation is allowed (not paused, session idle)
|
|
54
54
|
*/
|
|
55
|
-
|
|
55
|
+
private canContinue;
|
|
56
|
+
/**
|
|
57
|
+
* Public method to evaluate and execute continuation
|
|
58
|
+
* Called by external handlers (e.g., agent_settled)
|
|
59
|
+
* Checks blockers and pause BEFORE selecting a task
|
|
60
|
+
*/
|
|
61
|
+
decide(): Promise<ContinuationResult>;
|
|
56
62
|
/**
|
|
57
63
|
* Evaluate continuation decision and execute it
|
|
58
64
|
*/
|
|
@@ -60,7 +66,7 @@ export declare class TodoContinuationController {
|
|
|
60
66
|
/**
|
|
61
67
|
* Continue a specific todo item
|
|
62
68
|
*/
|
|
63
|
-
|
|
69
|
+
continueItem(item: TodoItem): Promise<void>;
|
|
64
70
|
/**
|
|
65
71
|
* Steer to continue a todo item
|
|
66
72
|
*/
|
|
@@ -76,11 +82,11 @@ export declare class TodoContinuationController {
|
|
|
76
82
|
/**
|
|
77
83
|
* Reset state for new session
|
|
78
84
|
*/
|
|
79
|
-
|
|
85
|
+
_reset(): void;
|
|
80
86
|
/**
|
|
81
87
|
* Cleanup on shutdown
|
|
82
88
|
*/
|
|
83
|
-
|
|
89
|
+
_cleanup(): void;
|
|
84
90
|
/**
|
|
85
91
|
* Get current state summary
|
|
86
92
|
*/
|
|
@@ -91,7 +97,8 @@ export declare class TodoContinuationController {
|
|
|
91
97
|
};
|
|
92
98
|
}
|
|
93
99
|
/**
|
|
94
|
-
* Create
|
|
100
|
+
* Create a todo continuation controller
|
|
101
|
+
* Note: Caller is responsible for registering event handlers with the proper context
|
|
95
102
|
*/
|
|
96
|
-
export declare function createTodoContinuation(
|
|
103
|
+
export declare function createTodoContinuation(ctx: TodoContext, config?: ContinuationConfig): TodoContinuationController;
|
|
97
104
|
//# 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,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"continuation-controller.d.ts","sourceRoot":"","sources":["../src/continuation-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAmBhE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,4CAA4C;IAC5C,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yCAAyC;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qCAAqC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,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