pi-harness-runtime 1.1.232 → 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 +10 -7
- 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 +14 -12
- package/packages/jev-judge/dist/continuation-controller.d.ts.map +1 -1
- package/packages/jev-judge/dist/continuation-controller.js +97 -65
- 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 +111 -77
- 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
|
@@ -440,21 +440,22 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
440
440
|
};
|
|
441
441
|
|
|
442
442
|
// --- agent_settled: Check todos and continue work ---------------
|
|
443
|
-
pi.on("agent_settled", async () => {
|
|
443
|
+
pi.on("agent_settled", async (_event, ctx) => {
|
|
444
444
|
// Don't continue if user is waiting for response
|
|
445
445
|
if (waitingForUserSince) return;
|
|
446
446
|
|
|
447
447
|
// Don't continue if inference is already in progress
|
|
448
448
|
if (_inferenceInProgress) return;
|
|
449
449
|
|
|
450
|
-
//
|
|
451
|
-
|
|
452
|
-
if (!piExt.isIdle?.() || piExt.hasPendingMessages?.()) return;
|
|
450
|
+
// Don't continue if session is not idle or has pending messages
|
|
451
|
+
if (!ctx.isIdle?.() || ctx.hasPendingMessages?.()) return;
|
|
453
452
|
|
|
454
|
-
// Import and use the continuation controller
|
|
453
|
+
// Import and use the continuation controller with proper context
|
|
455
454
|
try {
|
|
456
455
|
const { TodoContinuationController } = await import("./packages/jev-judge/dist/continuation-controller.js");
|
|
457
|
-
|
|
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);
|
|
458
459
|
const result = await controller.decide();
|
|
459
460
|
|
|
460
461
|
if (result.action === "continue" && result.nextItemId) {
|
|
@@ -463,7 +464,9 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
463
464
|
setTimeout(() => updateAutoContinueStatus("IDLE"), 2000);
|
|
464
465
|
} else if (result.action === "blocked") {
|
|
465
466
|
updateAutoContinueStatus("ERROR", "blocked");
|
|
466
|
-
logToFile("[auto-continue]", "Tasks blocked:", result.question);
|
|
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");
|
|
467
470
|
}
|
|
468
471
|
} catch (err) {
|
|
469
472
|
logToFile("[auto-continue]", "agent_settled handler error:", String(err));
|
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,18 +44,19 @@ 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
56
|
/**
|
|
57
57
|
* Public method to evaluate and execute continuation
|
|
58
58
|
* Called by external handlers (e.g., agent_settled)
|
|
59
|
+
* Checks blockers and pause BEFORE selecting a task
|
|
59
60
|
*/
|
|
60
61
|
decide(): Promise<ContinuationResult>;
|
|
61
62
|
/**
|
|
@@ -65,7 +66,7 @@ export declare class TodoContinuationController {
|
|
|
65
66
|
/**
|
|
66
67
|
* Continue a specific todo item
|
|
67
68
|
*/
|
|
68
|
-
|
|
69
|
+
continueItem(item: TodoItem): Promise<void>;
|
|
69
70
|
/**
|
|
70
71
|
* Steer to continue a todo item
|
|
71
72
|
*/
|
|
@@ -81,11 +82,11 @@ export declare class TodoContinuationController {
|
|
|
81
82
|
/**
|
|
82
83
|
* Reset state for new session
|
|
83
84
|
*/
|
|
84
|
-
|
|
85
|
+
_reset(): void;
|
|
85
86
|
/**
|
|
86
87
|
* Cleanup on shutdown
|
|
87
88
|
*/
|
|
88
|
-
|
|
89
|
+
_cleanup(): void;
|
|
89
90
|
/**
|
|
90
91
|
* Get current state summary
|
|
91
92
|
*/
|
|
@@ -96,7 +97,8 @@ export declare class TodoContinuationController {
|
|
|
96
97
|
};
|
|
97
98
|
}
|
|
98
99
|
/**
|
|
99
|
-
* Create
|
|
100
|
+
* Create a todo continuation controller
|
|
101
|
+
* Note: Caller is responsible for registering event handlers with the proper context
|
|
100
102
|
*/
|
|
101
|
-
export declare function createTodoContinuation(
|
|
103
|
+
export declare function createTodoContinuation(ctx: TodoContext, config?: ContinuationConfig): TodoContinuationController;
|
|
102
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,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,G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