pi-harness-runtime 0.9.0 → 0.9.1

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/footer-status.ts +29 -0
  3. package/harness/index.ts +1 -1
  4. package/harness/master-planner.ts +1 -1
  5. package/package.json +3 -1
  6. package/packages/capability-registry/package.json +1 -1
  7. package/packages/checkpoint/package.json +1 -1
  8. package/packages/code-generation/package.json +1 -1
  9. package/packages/code-review/package.json +1 -1
  10. package/packages/context-compiler/package.json +1 -1
  11. package/packages/cost-optimizer/package.json +1 -1
  12. package/packages/evaluation-engine/package.json +1 -1
  13. package/packages/experience-replay/package.json +1 -1
  14. package/packages/framework-detector/package.json +1 -1
  15. package/packages/framework-plugin-sdk/package.json +1 -1
  16. package/packages/learning-engine/package.json +1 -1
  17. package/packages/memory-engine/package.json +1 -1
  18. package/packages/model-registry/package.json +1 -1
  19. package/packages/observability/package.json +1 -1
  20. package/packages/performance-optimizer/package.json +1 -1
  21. package/packages/project-analyzer/package.json +1 -1
  22. package/packages/prompt-compiler/package.json +1 -1
  23. package/packages/provider-adapter-sdk/package.json +1 -1
  24. package/packages/provider-router/package.json +1 -1
  25. package/packages/requirement-compiler/package.json +1 -1
  26. package/packages/session/package.json +1 -1
  27. package/packages/skill-registry/package.json +1 -1
  28. package/packages/task-compiler/package.json +1 -1
  29. package/packages/test-data-generator/package.json +1 -1
  30. package/packages/types/package.json +1 -1
  31. 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
 
@@ -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";
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import type { TaskGraph } from "../packages/types/src/runtime-types.ts";
9
- import { TaskGraphManager } from "./task-graph.ts";
9
+ import type { TaskGraphManager } from "./task-graph.ts";
10
10
 
11
11
  export interface PlanResult {
12
12
  success: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-harness-runtime",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
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/capability-registry",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/checkpoint",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Enhanced checkpoint system with incremental snapshots, diff-based storage, and recovery strategies",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/code-generation",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Code generation pipeline for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/code-review",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Automated code review engine for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/context-compiler",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Bounded context selection engine for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/cost-optimizer",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Cost Optimizer for pi-harness-runtime — budget tracking, forecasting, and model selection optimization",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/evaluation-engine",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Evaluation engine for pi-harness runtime (RFC-0057)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/experience-replay",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Experience replay for debugging and reproducibility (RFC-0059)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/framework-detector",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Framework detection system for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/framework-plugin-sdk",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Framework plugin SDK for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/learning-engine",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Learning engine for extracting lessons from runtime execution (RFC-0058)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/memory-engine",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Memory engine with OKF integration for durable knowledge management (RFC-0060)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/model-registry",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Model Registry for pi-harness-runtime — centralized model metadata with pricing",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/observability",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Comprehensive observability system with structured logging, tracing, metrics, and alerting",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/performance-optimizer",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Performance optimization analyzer for pi-harness runtime (RFC-0056)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/project-analyzer",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Project analysis system for pi-harness-runtime - detects frameworks, rules, and project structure",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/prompt-compiler",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Deterministic prompt compiler for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/provider-adapter-sdk",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "SDK for building, testing, and registering AI provider adapters",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/provider-router",
3
- "version": "0.7.1",
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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/requirement-compiler",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Compiles raw requirements into validated CompiledRequirement with ambiguity detection and risk tagging",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/session",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Session management system for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/skill-registry",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Skill Registry for pi-harness-runtime — dynamic skill discovery and invocation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/task-compiler",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Task Compiler for pi-harness-runtime — produces deterministic task DAG from CompiledRequirement",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/test-data-generator",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Test data generation for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/types",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "Shared TypeScript types for pi-harness-runtime packages",
5
5
  "type": "module",
6
6
  "main": "./src/index.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
+ }