pi-harness-runtime 0.9.0 → 0.9.2
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 +13 -0
- package/footer-status.ts +29 -0
- package/harness/index.ts +1 -1
- package/harness/master-planner.ts +1 -1
- package/package.json +3 -1
- package/packages/capability-registry/package.json +1 -1
- package/packages/checkpoint/package.json +1 -1
- package/packages/code-generation/package.json +1 -1
- package/packages/code-review/package.json +1 -1
- package/packages/context-compiler/package.json +1 -1
- package/packages/cost-optimizer/package.json +1 -1
- package/packages/evaluation-engine/package.json +1 -1
- package/packages/experience-replay/package.json +1 -1
- package/packages/framework-detector/package.json +1 -1
- package/packages/framework-plugin-sdk/package.json +1 -1
- package/packages/learning-engine/package.json +1 -1
- package/packages/memory-engine/package.json +1 -1
- package/packages/model-registry/package.json +1 -1
- package/packages/observability/package.json +1 -1
- package/packages/performance-optimizer/package.json +1 -1
- package/packages/project-analyzer/package.json +1 -1
- package/packages/prompt-compiler/package.json +1 -1
- package/packages/provider-adapter-sdk/package.json +1 -1
- package/packages/provider-router/package.json +1 -1
- package/packages/requirement-compiler/package.json +1 -1
- package/packages/session/package.json +1 -1
- package/packages/skill-registry/package.json +1 -1
- package/packages/task-compiler/package.json +1 -1
- package/packages/test-data-generator/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/proactive-compact.ts +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.9.1](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v0.7.1...v0.9.1) (2026-07-13)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **release:** add synced-workspace release script ([617649d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/617649d0b2227ebb4355eec4979b0c65822d60e3))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* publish missing runtime modules ([3fc7058](https://github.com/ManotLuijiu/pi-harness-runtime/commit/3fc70586d0cd10f4d38eab67e4cadaec20aaeb56))
|
|
16
|
+
* **release:** remove redundant Bump version step — was double-bumping version (0.7.1→0.8.0) when tag pushed ([413ad6d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/413ad6d49356ec62b94e9a4e09d3475ef39bebd6))
|
|
17
|
+
|
|
5
18
|
## [0.9.0](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v0.7.1...v0.9.0) (2026-07-13)
|
|
6
19
|
|
|
7
20
|
|
package/footer-status.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { MirrorRecord } from "./mirror.ts";
|
|
2
|
+
import { formatQuotaStatus } from "./harness/e2e/quota-status.js";
|
|
3
|
+
|
|
4
|
+
export function buildFooterStatusValue(
|
|
5
|
+
local: { today: { tokens: number; cost: number } },
|
|
6
|
+
mirror: MirrorRecord | null,
|
|
7
|
+
freshness: "fresh" | "stale" | "expired" | "missing",
|
|
8
|
+
): string {
|
|
9
|
+
if (
|
|
10
|
+
mirror &&
|
|
11
|
+
freshness !== "expired" &&
|
|
12
|
+
(mirror.h5_used_pct !== undefined || mirror.weekly_used_pct !== undefined)
|
|
13
|
+
) {
|
|
14
|
+
const quotaStatus = formatQuotaStatus({
|
|
15
|
+
provider: "minimax",
|
|
16
|
+
h5UsedPct: mirror.h5_used_pct ?? 0,
|
|
17
|
+
h5ResetsAt: mirror.h5_resets_at,
|
|
18
|
+
weeklyUsedPct: mirror.weekly_used_pct ?? 0,
|
|
19
|
+
weeklyResetsAt: mirror.weekly_resets_at,
|
|
20
|
+
scrapedAt: mirror.synced_at,
|
|
21
|
+
});
|
|
22
|
+
const freshnessSuffix =
|
|
23
|
+
freshness === "fresh" || freshness === "missing" ? "" : ` · ${freshness}`;
|
|
24
|
+
return `${quotaStatus.extended}${freshnessSuffix}`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const todayStr = `${(local.today.tokens / 1000).toFixed(1)}k tok · $${local.today.cost.toFixed(3)}`;
|
|
28
|
+
return `today: ${todayStr}`;
|
|
29
|
+
}
|
package/harness/index.ts
CHANGED
|
@@ -44,7 +44,7 @@ export type {
|
|
|
44
44
|
export type { CheckpointManager } from "./job-state-machine.js";
|
|
45
45
|
|
|
46
46
|
// Task Graph
|
|
47
|
-
export { TaskGraphManager } from "./task-graph.js";
|
|
47
|
+
export type { TaskGraphManager } from "./task-graph.js";
|
|
48
48
|
|
|
49
49
|
// Loop Runtime
|
|
50
50
|
export { LoopRuntime } from "./loop-runtime.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-harness-runtime",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
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": {
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"index.ts",
|
|
25
|
+
"footer-status.ts",
|
|
26
|
+
"proactive-compact.ts",
|
|
25
27
|
"tracker.ts",
|
|
26
28
|
"mirror.ts",
|
|
27
29
|
"windows.ts",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/provider-router",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
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,15 @@
|
|
|
1
|
+
import type { ContextUsage } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
|
|
3
|
+
export const PROACTIVE_COMPACT_THRESHOLD = 0.9;
|
|
4
|
+
export const PROACTIVE_COMPACT_COOLDOWN_MS = 10 * 60 * 1000;
|
|
5
|
+
|
|
6
|
+
export function shouldTriggerProactiveCompact(
|
|
7
|
+
usage: ContextUsage | undefined,
|
|
8
|
+
options?: { threshold?: number },
|
|
9
|
+
): boolean {
|
|
10
|
+
const threshold = options?.threshold ?? PROACTIVE_COMPACT_THRESHOLD;
|
|
11
|
+
if (!usage || usage.percent === null) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
return usage.percent >= threshold;
|
|
15
|
+
}
|