pi-harness-runtime 1.1.49 → 1.1.71-3
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/CHANGELOG.md +30 -9
- package/README.md +119 -0
- package/harness/langchain/agents.d.ts +143 -0
- package/harness/langchain/agents.test.d.ts +2 -0
- package/harness/langchain/agents.test.ts +0 -1
- package/harness/langchain/agents.ts +196 -13
- package/harness/langchain/checkpointer.d.ts +48 -0
- package/harness/langchain/checkpointer.test.d.ts +8 -0
- package/harness/langchain/cron-cli.d.ts +12 -0
- package/harness/langchain/cron-cli.ts +169 -0
- package/harness/langchain/daemon.d.ts +161 -0
- package/harness/langchain/daemon.test.d.ts +11 -0
- package/harness/langchain/daemon.test.ts +62 -5
- package/harness/langchain/daemon.ts +231 -12
- package/harness/langchain/file-tools.d.ts +97 -0
- package/harness/langchain/file-tools.ts +29 -11
- package/harness/langchain/graph.d.ts +706 -0
- package/harness/langchain/graph.ts +184 -26
- package/harness/langchain/model-router.d.ts +63 -0
- package/harness/langchain/model-router.test.d.ts +2 -0
- package/harness/langchain/model-router.test.ts +191 -0
- package/harness/langchain/model-router.ts +188 -0
- package/harness/langchain/models.d.ts +72 -0
- package/harness/langchain/models.ts +111 -49
- package/harness/langchain/ping-pong-middleware.d.ts +28 -0
- package/harness/langchain/ping-pong-middleware.test.d.ts +2 -0
- package/harness/langchain/ping-pong-middleware.test.ts +69 -0
- package/harness/langchain/ping-pong-middleware.ts +204 -0
- package/harness/langchain/run.d.ts +15 -0
- package/harness/langchain/run.ts +15 -3
- package/harness/langchain/scoreboard.test.d.ts +13 -0
- package/harness/langchain/scoreboard.test.ts +28 -5
- package/harness/langchain/status-line.d.ts +91 -0
- package/harness/langchain/status-line.test.d.ts +8 -0
- package/harness/langchain/surge.d.ts +103 -0
- package/harness/langchain/surge.test.d.ts +10 -0
- package/harness/langchain/surge.test.ts +179 -0
- package/harness/langchain/surge.ts +188 -19
- package/harness/langchain/widget.d.ts +105 -0
- package/harness/langchain/widget.test.d.ts +8 -0
- package/harness/ssh-detach-interceptor.test.ts +263 -0
- package/harness/ssh-detach-interceptor.ts +438 -0
- package/index.ts +212 -47
- package/package.json +4 -2
- package/packages/a2a-adapter/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/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/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/dist/src/index.d.ts +2 -0
- package/packages/intent-analyzer/dist/src/index.d.ts.map +1 -1
- package/packages/intent-analyzer/dist/src/index.js +1 -0
- package/packages/intent-analyzer/dist/src/index.js.map +1 -1
- package/packages/intent-analyzer/dist/src/ping-pong.d.ts +56 -0
- package/packages/intent-analyzer/dist/src/ping-pong.d.ts.map +1 -0
- package/packages/intent-analyzer/dist/src/ping-pong.js +286 -0
- package/packages/intent-analyzer/dist/src/ping-pong.js.map +1 -0
- package/packages/intent-analyzer/package.json +1 -1
- package/packages/intent-analyzer/src/index.ts +13 -0
- package/packages/intent-analyzer/src/ping-pong.ts +387 -0
- package/packages/intent-analyzer/test/ping-pong.test.ts +96 -0
- package/packages/jev-judge/README.md +234 -0
- package/packages/jev-judge/dist/decision-engine.d.ts +100 -0
- package/packages/jev-judge/dist/decision-engine.d.ts.map +1 -0
- package/packages/jev-judge/dist/decision-engine.js +151 -0
- package/packages/jev-judge/dist/decision-engine.js.map +1 -0
- package/packages/jev-judge/dist/e2e-judge.d.ts +61 -0
- package/packages/jev-judge/dist/e2e-judge.d.ts.map +1 -0
- package/packages/jev-judge/dist/e2e-judge.js +268 -0
- package/packages/jev-judge/dist/e2e-judge.js.map +1 -0
- package/packages/jev-judge/dist/flaky-detector.d.ts +34 -0
- package/packages/jev-judge/dist/flaky-detector.d.ts.map +1 -0
- package/packages/jev-judge/dist/flaky-detector.js +154 -0
- package/packages/jev-judge/dist/flaky-detector.js.map +1 -0
- package/packages/jev-judge/dist/index.d.ts +77 -0
- package/packages/jev-judge/dist/index.d.ts.map +1 -0
- package/packages/jev-judge/dist/index.js +271 -0
- package/packages/jev-judge/dist/index.js.map +1 -0
- package/packages/jev-judge/dist/types.d.ts +97 -0
- package/packages/jev-judge/dist/types.d.ts.map +1 -0
- package/packages/jev-judge/dist/types.js +8 -0
- package/packages/jev-judge/dist/types.js.map +1 -0
- package/packages/jev-judge/package.json +46 -0
- package/packages/jev-judge/src/decision-engine.ts +231 -0
- package/packages/jev-judge/src/e2e-judge.ts +364 -0
- package/packages/jev-judge/src/flaky-detector.ts +190 -0
- package/packages/jev-judge/src/index.ts +345 -0
- package/packages/jev-judge/src/types.ts +131 -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/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/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/sprint-planner/package.json +1 -1
- package/packages/subscription-engine/package.json +1 -1
- package/packages/task-compiler/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/README.md +71 -0
- package/packages/todo-bd-sync/package.json +1 -1
- package/packages/todo-bd-sync/src/extension.ts +16 -1
- package/packages/token-estimation/package.json +1 -1
- package/packages/token-optimizer/package.json +1 -1
- package/packages/trajectory/dist/src/approved-patterns.d.ts +51 -0
- package/packages/trajectory/dist/src/approved-patterns.d.ts.map +1 -0
- package/packages/trajectory/dist/src/approved-patterns.js +134 -0
- package/packages/trajectory/dist/src/approved-patterns.js.map +1 -0
- package/packages/trajectory/dist/src/index.d.ts +13 -0
- package/packages/trajectory/dist/src/index.d.ts.map +1 -0
- package/packages/trajectory/dist/src/index.js +12 -0
- package/packages/trajectory/dist/src/index.js.map +1 -0
- package/packages/trajectory/dist/src/store.d.ts +69 -0
- package/packages/trajectory/dist/src/store.d.ts.map +1 -0
- package/packages/trajectory/dist/src/store.js +253 -0
- package/packages/trajectory/dist/src/store.js.map +1 -0
- package/packages/trajectory/dist/src/types.d.ts +73 -0
- package/packages/trajectory/dist/src/types.d.ts.map +1 -0
- package/packages/trajectory/dist/src/types.js +9 -0
- package/packages/trajectory/dist/src/types.js.map +1 -0
- package/packages/trajectory/dist/test/store.test.d.ts +2 -0
- package/packages/trajectory/dist/test/store.test.d.ts.map +1 -0
- package/packages/trajectory/dist/test/store.test.js +228 -0
- package/packages/trajectory/dist/test/store.test.js.map +1 -0
- package/packages/trajectory/package.json +29 -0
- package/packages/trajectory/src/approved-patterns.ts +180 -0
- package/packages/trajectory/src/index.ts +26 -0
- package/packages/trajectory/src/store.ts +285 -0
- package/packages/trajectory/src/types.ts +84 -0
- package/packages/trajectory/test/store.test.d.ts +2 -0
- package/packages/trajectory/test/store.test.ts +250 -0
- package/packages/tui/package.json +1 -1
- package/packages/types/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/packages/write-review/src/blackboard.ts +38 -5
- package/packages/write-review/src/types.ts +13 -0
- package/skills/harness-runtime/SKILL.md +67 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/provider-router",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.71-3",
|
|
4
4
|
"description": "Enhanced Provider Router for pi-harness-runtime — intelligent routing with capabilities, costs, and quotas",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/provider-router.js",
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# todo-bd-sync
|
|
2
|
+
|
|
3
|
+
Two-way sync between **rpiv-todo** (local task overlay) and **bd** (GitHub issue tracker).
|
|
4
|
+
|
|
5
|
+
## Terminology Clarification (CRITICAL)
|
|
6
|
+
|
|
7
|
+
This project uses **TWO** separate task tracking systems:
|
|
8
|
+
|
|
9
|
+
| Term | Tool | Purpose |
|
|
10
|
+
|------|------|---------|
|
|
11
|
+
| **bd** / **beads** / **issues** | `bd create`, `bd list`, `bd close` | GitHub issue tracker |
|
|
12
|
+
| **todo** / **todos** | `todo` tool (JSON-RPC) | Local task overlay |
|
|
13
|
+
|
|
14
|
+
### When to use each:
|
|
15
|
+
|
|
16
|
+
- **bd (beads)**:
|
|
17
|
+
- Long-lived tasks that persist across sessions
|
|
18
|
+
- GitHub-synced issues
|
|
19
|
+
- Bug tracking, feature requests
|
|
20
|
+
- Tasks that need team visibility
|
|
21
|
+
|
|
22
|
+
- **todo (local)**:
|
|
23
|
+
- Short-lived session tasks
|
|
24
|
+
- Immediate action items
|
|
25
|
+
- Step-by-step workflows
|
|
26
|
+
- Tasks that don't need to leave the session
|
|
27
|
+
|
|
28
|
+
### Confusion Prevention
|
|
29
|
+
|
|
30
|
+
**Agents often confuse these two systems.** To prevent this:
|
|
31
|
+
|
|
32
|
+
1. **System prompts** (in `index.ts`) include a terminology clarification hint
|
|
33
|
+
2. **Slash commands** are registered for status checks:
|
|
34
|
+
- `/bd-todo-status` - Show sync status
|
|
35
|
+
- `/bd-todo-sync` - Manual sync trigger
|
|
36
|
+
|
|
37
|
+
3. **Always ask the user** when ambiguous:
|
|
38
|
+
> "Did you mean **bd** (issue tracker) or **todo** (local task list)?"
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
import { createTodoBdSync } from "@moocoding/todo-bd-sync";
|
|
44
|
+
|
|
45
|
+
const sync = createTodoBdSync(pi, {
|
|
46
|
+
autoInjectPrompt: true,
|
|
47
|
+
syncDirection: "both",
|
|
48
|
+
loadOnSessionStart: true,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
sync.start();
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Configuration
|
|
55
|
+
|
|
56
|
+
| Option | Default | Description |
|
|
57
|
+
|--------|---------|-------------|
|
|
58
|
+
| `autoInjectPrompt` | `true` | Inject clarification to system prompt |
|
|
59
|
+
| `syncDirection` | `"both"` | Sync direction: both, todoOnly, bdOnly |
|
|
60
|
+
| `loadOnSessionStart` | `true` | Load existing bd issues on session start |
|
|
61
|
+
| `debug` | `false` | Enable debug logging |
|
|
62
|
+
|
|
63
|
+
## Commands
|
|
64
|
+
|
|
65
|
+
- `/bd-todo-status` - Check dependencies and mapping count
|
|
66
|
+
- `/bd-todo-sync` - Manually trigger sync
|
|
67
|
+
|
|
68
|
+
## Dependencies
|
|
69
|
+
|
|
70
|
+
- `bd` CLI - Must be installed for full functionality
|
|
71
|
+
- `rpiv-todo` - Optional (falls back gracefully if not installed)
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* todo-bd-sync extension entry point
|
|
3
3
|
*
|
|
4
|
+
* PURPOSE: Bridge between the **todo tool** (local task overlay) and **bd** (GitHub issue tracker).
|
|
5
|
+
*
|
|
6
|
+
* TERMINOLOGY CLARIFICATION (IMPORTANT):
|
|
7
|
+
* - **bd** (beads): CLI commands like `bd create`, `bd list`, `bd close` - GitHub issue tracker
|
|
8
|
+
* - **todo**: The local task overlay tool - session-only task list
|
|
9
|
+
*
|
|
10
|
+
* This extension helps agents understand when to use each system and provides
|
|
11
|
+
* two-way sync between them.
|
|
12
|
+
*
|
|
4
13
|
* NOTE: Auto-injection disabled - was causing noisy output.
|
|
5
|
-
* Only provides dependency detection status.
|
|
14
|
+
* Only provides dependency detection status and slash commands.
|
|
6
15
|
*/
|
|
7
16
|
|
|
8
17
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
@@ -10,11 +19,17 @@ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
|
10
19
|
/**
|
|
11
20
|
* Register the todo-bd-sync extension
|
|
12
21
|
*
|
|
22
|
+
* Provides:
|
|
23
|
+
* - Dependency status logging on startup
|
|
24
|
+
* - Slash command: /bd-todo-status (check sync status)
|
|
25
|
+
* - Slash command: /bd-todo-sync (manual sync)
|
|
26
|
+
*
|
|
13
27
|
* NOTE: Auto-injection disabled - was causing issues with bd working.
|
|
14
28
|
* The todo tool call injection has been removed.
|
|
15
29
|
*/
|
|
16
30
|
export function registerTodoBdSync(_pi: ExtensionAPI): void {
|
|
17
31
|
// Silent - no registration, no injection, no console output
|
|
32
|
+
// The main clarification comes from index.ts system prompts
|
|
18
33
|
}
|
|
19
34
|
|
|
20
35
|
// Default export for pi extension loading
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ApprovedPatternStore — tracks review patterns that have been approved.
|
|
3
|
+
*
|
|
4
|
+
* Once a reviewer approves code with a given comment, that comment pattern is
|
|
5
|
+
* "learned" and the reviewer should not re-flag it in future sessions.
|
|
6
|
+
*
|
|
7
|
+
* Storage: `~/.pi-harness/approved-patterns.json`
|
|
8
|
+
* Format: keyed by pattern-hash so lookup is O(1)
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* - Load patterns before each review → inject into reviewer prompt
|
|
12
|
+
* - After "approved" verdict → call .approve() to persist new patterns
|
|
13
|
+
*/
|
|
14
|
+
export interface ApprovedPattern {
|
|
15
|
+
hash: string;
|
|
16
|
+
file?: string;
|
|
17
|
+
comment: string;
|
|
18
|
+
severity: string;
|
|
19
|
+
approvedAt: string;
|
|
20
|
+
approvalCount: number;
|
|
21
|
+
}
|
|
22
|
+
/** Singleton store for approved review patterns. */
|
|
23
|
+
export declare class ApprovedPatternStore {
|
|
24
|
+
private readonly _path;
|
|
25
|
+
private _data;
|
|
26
|
+
constructor(path?: string);
|
|
27
|
+
private _load;
|
|
28
|
+
private _save;
|
|
29
|
+
/** Check if a comment matches an approved pattern. Returns the pattern or null. */
|
|
30
|
+
get(file: string | undefined, comment: string, severity: string): ApprovedPattern | null;
|
|
31
|
+
/** Record that a pattern was approved. Called after "approved" verdict. */
|
|
32
|
+
approve(comments: Array<{
|
|
33
|
+
file?: string;
|
|
34
|
+
comment: string;
|
|
35
|
+
severity?: string;
|
|
36
|
+
}>): void;
|
|
37
|
+
/**
|
|
38
|
+
* Build a markdown section for injecting into the reviewer prompt.
|
|
39
|
+
* Lists previously-approved patterns so the reviewer can skip them.
|
|
40
|
+
*/
|
|
41
|
+
toMarkdown(): string;
|
|
42
|
+
/** Get count of known patterns. */
|
|
43
|
+
get size(): number;
|
|
44
|
+
/** Export all patterns as an array. */
|
|
45
|
+
toArray(): ApprovedPattern[];
|
|
46
|
+
/** Clear all patterns (for testing). */
|
|
47
|
+
clear(): void;
|
|
48
|
+
}
|
|
49
|
+
export declare function getApprovedPatternStore(): ApprovedPatternStore;
|
|
50
|
+
export declare function resetApprovedPatternStore(): void;
|
|
51
|
+
//# sourceMappingURL=approved-patterns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approved-patterns.d.ts","sourceRoot":"","sources":["../../src/approved-patterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAeH,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACtB;AA0BD,oDAAoD;AACpD,qBAAa,oBAAoB;IAChC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,KAAK,CAA2B;IAExC,YAAY,IAAI,CAAC,EAAE,MAAM,EAGxB;IAED,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,KAAK;IAQb,mFAAmF;IACnF,GAAG,CACF,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACd,eAAe,GAAG,IAAI,CAGxB;IAED,2EAA2E;IAC3E,OAAO,CACN,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GACpE,IAAI,CAuBN;IAED;;;OAGG;IACH,UAAU,IAAI,MAAM,CAqBnB;IAED,mCAAmC;IACnC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,uCAAuC;IACvC,OAAO,IAAI,eAAe,EAAE,CAE3B;IAED,wCAAwC;IACxC,KAAK,IAAI,IAAI,CAGZ;CACD;AAID,wBAAgB,uBAAuB,IAAI,oBAAoB,CAG9D;AAED,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD"}
|