pi-harness-runtime 1.1.236 → 1.1.238
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 +68 -5
- 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 +20 -0
- package/packages/jev-judge/dist/continuation-controller.d.ts.map +1 -1
- package/packages/jev-judge/dist/continuation-controller.js +57 -6
- package/packages/jev-judge/dist/continuation-controller.js.map +1 -1
- package/packages/jev-judge/dist/index.d.ts +5 -3
- package/packages/jev-judge/dist/index.d.ts.map +1 -1
- package/packages/jev-judge/dist/index.js +3 -1
- package/packages/jev-judge/dist/index.js.map +1 -1
- package/packages/jev-judge/dist/task-intake.d.ts +91 -0
- package/packages/jev-judge/dist/task-intake.d.ts.map +1 -0
- package/packages/jev-judge/dist/task-intake.js +232 -0
- package/packages/jev-judge/dist/task-intake.js.map +1 -0
- package/packages/jev-judge/package.json +1 -1
- package/packages/jev-judge/src/continuation-controller.ts +64 -6
- package/packages/jev-judge/src/index.ts +7 -4
- package/packages/jev-judge/src/task-intake.ts +302 -0
- 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
|
@@ -484,13 +484,76 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
484
484
|
todoContinuationController = null;
|
|
485
485
|
});
|
|
486
486
|
|
|
487
|
-
//
|
|
487
|
+
// --- task-intake: Automatic todo capture from user requests -----------
|
|
488
|
+
let taskIntakeController: import("./packages/jev-judge/dist/task-intake.js").TaskIntakeController | null = null;
|
|
489
|
+
|
|
490
|
+
// Create task intake controller if Jev API key is available
|
|
491
|
+
if (resolvedApiKey) {
|
|
492
|
+
try {
|
|
493
|
+
const { TaskIntakeController } = await import("./packages/jev-judge/dist/task-intake.js");
|
|
494
|
+
taskIntakeController = new TaskIntakeController({
|
|
495
|
+
apiKey: resolvedApiKey,
|
|
496
|
+
dispatch: async (content: string) => {
|
|
497
|
+
await pi.sendUserMessage(content, { deliverAs: "steer" });
|
|
498
|
+
},
|
|
499
|
+
});
|
|
500
|
+
logToFile("[auto-continue]", "Task intake controller initialized");
|
|
501
|
+
} catch (err) {
|
|
502
|
+
logToFile("[auto-continue]", "Failed to create task intake controller:", String(err));
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
// Clean up task intake on session shutdown
|
|
507
|
+
pi.on("session_shutdown", () => {
|
|
508
|
+
taskIntakeController = null;
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
// Wire user messages to task intake
|
|
488
512
|
pi.on("message_start", (event) => {
|
|
489
|
-
const
|
|
490
|
-
|
|
513
|
+
const msgEvent = event as { message?: { role?: string; content?: string | Array<{ type?: string; text?: string }>; customType?: string } };
|
|
514
|
+
const msg = msgEvent.message;
|
|
515
|
+
if (!msg) return;
|
|
516
|
+
|
|
517
|
+
// Skip harness-generated messages (internal use)
|
|
518
|
+
if (msg.customType?.startsWith("harness:")) {
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
if (msg.role === "user" && taskIntakeController) {
|
|
523
|
+
// Temporary pause for user input processing (auto-clears on next decision)
|
|
491
524
|
if (todoContinuationController) {
|
|
492
|
-
todoContinuationController.
|
|
493
|
-
logToFile("[auto-continue]", "User input received, pausing
|
|
525
|
+
todoContinuationController.tempPause();
|
|
526
|
+
logToFile("[auto-continue]", "User input received, temp pausing");
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
// Extract user message content
|
|
530
|
+
const content = msg.content;
|
|
531
|
+
let userMessage = "";
|
|
532
|
+
if (typeof content === "string") {
|
|
533
|
+
userMessage = content;
|
|
534
|
+
} else if (Array.isArray(content)) {
|
|
535
|
+
const textBlocks = (content as Array<{ type?: string; text?: string }>)
|
|
536
|
+
.filter((c): c is { type: "text"; text: string } =>
|
|
537
|
+
c.type === "text" && typeof c.text === "string"
|
|
538
|
+
);
|
|
539
|
+
userMessage = textBlocks.map((c) => c.text).join("\n");
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// Evaluate with task intake controller (non-blocking)
|
|
543
|
+
if (userMessage.trim().length > 10 && taskIntakeController && todoContinuationController) {
|
|
544
|
+
const intake = taskIntakeController;
|
|
545
|
+
const controller = todoContinuationController;
|
|
546
|
+
|
|
547
|
+
// Get current todos for duplicate detection
|
|
548
|
+
intake.evaluateWithTodos(userMessage, controller).then(async (result) => {
|
|
549
|
+
if (result.actionable && result.action !== "skip") {
|
|
550
|
+
logToFile("[auto-continue]", "Task intake result:", JSON.stringify(result));
|
|
551
|
+
// Request capture if actionable using harness custom message
|
|
552
|
+
await intake.requestCapture(userMessage, "harness:task-capture");
|
|
553
|
+
}
|
|
554
|
+
}).catch((err) => {
|
|
555
|
+
logToFile("[auto-continue]", "Task intake error:", String(err));
|
|
556
|
+
});
|
|
494
557
|
}
|
|
495
558
|
}
|
|
496
559
|
});
|
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.238",
|
|
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",
|
|
@@ -26,6 +26,7 @@ export interface ContinuationState {
|
|
|
26
26
|
lastMessageId: string | null;
|
|
27
27
|
continuationQueued: boolean;
|
|
28
28
|
userPaused: boolean;
|
|
29
|
+
explicitPause: boolean;
|
|
29
30
|
lastSteerMessage: string | null;
|
|
30
31
|
steerAttemptsForCurrentItem: number;
|
|
31
32
|
lastItemContinued: number | null;
|
|
@@ -50,11 +51,29 @@ export declare class TodoContinuationController {
|
|
|
50
51
|
private config;
|
|
51
52
|
private todoProvider;
|
|
52
53
|
private state;
|
|
54
|
+
private _inFlight;
|
|
53
55
|
constructor(ctx: TodoContext, config?: ContinuationConfig);
|
|
54
56
|
/**
|
|
55
57
|
* Check if continuation is allowed (not paused, session idle)
|
|
56
58
|
*/
|
|
57
59
|
private canContinue;
|
|
60
|
+
/**
|
|
61
|
+
* User explicitly paused - only this clears on explicit resume
|
|
62
|
+
*/
|
|
63
|
+
explicitPause(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Resume from explicit pause
|
|
66
|
+
*/
|
|
67
|
+
resume(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Temporary pause for user input processing
|
|
70
|
+
* Does not require explicit resume
|
|
71
|
+
*/
|
|
72
|
+
tempPause(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Clear continuation queue (called when work completes or starts)
|
|
75
|
+
*/
|
|
76
|
+
clearQueue(): void;
|
|
58
77
|
/**
|
|
59
78
|
* Public method to evaluate and execute continuation
|
|
60
79
|
* Called by external handlers (e.g., agent_settled)
|
|
@@ -67,6 +86,7 @@ export declare class TodoContinuationController {
|
|
|
67
86
|
continueItem(item: TodoItem): Promise<void>;
|
|
68
87
|
/**
|
|
69
88
|
* Guarded dispatch - checks all conditions before sending
|
|
89
|
+
* Uses in-flight guard to prevent race conditions
|
|
70
90
|
*/
|
|
71
91
|
private guardedDispatch;
|
|
72
92
|
/**
|
|
@@ -1 +1 @@
|
|
|
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,iEAAiE;IACjE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,4CAA4C;IAC5C,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yCAAyC;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qCAAqC;IACrC,gBAAgB,CAAC,E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