pi-harness-runtime 0.9.25 → 0.10.0

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 (321) hide show
  1. package/CHANGELOG.md +27 -7
  2. package/README.md +51 -51
  3. package/harness/auto-compact.ts +1 -1
  4. package/harness/autonomous-review.ts +88 -0
  5. package/harness/context-compact-orchestrator.ts +23 -23
  6. package/harness/context-window-manager.ts +5 -5
  7. package/harness/continue-prompt.ts +3 -3
  8. package/harness/e2e/minimax-quota-scraper.ts +1 -1
  9. package/harness/forked-summarizer.ts +4 -4
  10. package/harness/herdr-agents.ts +91 -0
  11. package/harness/index.ts +5 -5
  12. package/harness/loop-code-agent.ts +284 -0
  13. package/harness/loop-controller.ts +201 -0
  14. package/harness/loop-review-agent.ts +295 -0
  15. package/harness/loop-runtime.ts +10 -10
  16. package/harness/loop-types.ts +118 -0
  17. package/harness/notification-events.ts +3 -3
  18. package/harness/output-limit-handler.ts +1 -1
  19. package/harness/partial-recovery.ts +3 -3
  20. package/harness/session-memory.ts +5 -5
  21. package/index.ts +46 -32
  22. package/package.json +1 -1
  23. package/packages/a2a-adapter/package.json +1 -1
  24. package/packages/a2a-adapter/src/types.ts +5 -5
  25. package/packages/auth/package.json +1 -1
  26. package/packages/autonomous-refactor/package.json +1 -1
  27. package/packages/autonomous-runtime/dist/inbox.d.ts +3 -3
  28. package/packages/autonomous-runtime/dist/inbox.js +12 -12
  29. package/packages/autonomous-runtime/dist/lease.js +14 -14
  30. package/packages/autonomous-runtime/dist/types.js +1 -1
  31. package/packages/autonomous-runtime/package.json +1 -1
  32. package/packages/autonomous-runtime/src/inbox.ts +12 -12
  33. package/packages/autonomous-runtime/src/lease.ts +15 -15
  34. package/packages/autonomous-runtime/src/types.ts +13 -13
  35. package/packages/autonomous-runtime/tsconfig.tsbuildinfo +1 -1
  36. package/packages/cache-strategy/package.json +1 -1
  37. package/packages/capability-registry/dist/types.js +1 -1
  38. package/packages/capability-registry/package.json +1 -1
  39. package/packages/capability-registry/src/types.ts +5 -5
  40. package/packages/checkpoint/README.md +6 -6
  41. package/packages/checkpoint/dist/differ.js +2 -2
  42. package/packages/checkpoint/dist/engine.js +3 -3
  43. package/packages/checkpoint/dist/index.js +5 -5
  44. package/packages/checkpoint/dist/storage.js +3 -3
  45. package/packages/checkpoint/dist/types.js +1 -1
  46. package/packages/checkpoint/package.json +1 -1
  47. package/packages/checkpoint/src/differ.ts +2 -2
  48. package/packages/checkpoint/src/engine.ts +3 -3
  49. package/packages/checkpoint/src/index.ts +5 -5
  50. package/packages/checkpoint/src/storage.ts +3 -3
  51. package/packages/checkpoint/src/types.ts +10 -10
  52. package/packages/checkpoint/tsconfig.tsbuildinfo +1 -1
  53. package/packages/cli-plugin-sdk/package.json +1 -1
  54. package/packages/clipboard/dist/src/clipboard.d.ts.map +1 -1
  55. package/packages/clipboard/dist/src/clipboard.js +15 -7
  56. package/packages/clipboard/dist/src/clipboard.js.map +1 -1
  57. package/packages/clipboard/package.json +1 -1
  58. package/packages/clipboard/src/clipboard.ts +16 -9
  59. package/packages/code-generation/README.md +13 -13
  60. package/packages/code-generation/dist/faker.js +4 -4
  61. package/packages/code-generation/dist/generator.js +3 -3
  62. package/packages/code-generation/dist/index.js +3 -3
  63. package/packages/code-generation/dist/templates/registry.js +1 -1
  64. package/packages/code-generation/dist/types.js +1 -1
  65. package/packages/code-generation/package.json +1 -1
  66. package/packages/code-generation/src/faker.ts +5 -5
  67. package/packages/code-generation/src/generator.ts +4 -4
  68. package/packages/code-generation/src/index.ts +3 -3
  69. package/packages/code-generation/src/templates/registry.ts +1 -1
  70. package/packages/code-generation/src/types.ts +10 -10
  71. package/packages/code-generation/tsconfig.tsbuildinfo +1 -1
  72. package/packages/code-review/README.md +13 -13
  73. package/packages/code-review/dist/engine.js +3 -3
  74. package/packages/code-review/dist/index.js +3 -3
  75. package/packages/code-review/dist/types.js +1 -1
  76. package/packages/code-review/package.json +1 -1
  77. package/packages/code-review/src/engine.ts +3 -3
  78. package/packages/code-review/src/index.ts +3 -3
  79. package/packages/code-review/src/types.ts +10 -10
  80. package/packages/code-review/tsconfig.tsbuildinfo +1 -1
  81. package/packages/codex-adapter/package.json +1 -1
  82. package/packages/context-compiler/dist/compiler.js +1 -1
  83. package/packages/context-compiler/package.json +1 -1
  84. package/packages/context-compiler/src/compiler.ts +1 -1
  85. package/packages/context-compiler/src/types.ts +11 -11
  86. package/packages/context-compiler/test/context-compiler.test.ts +11 -11
  87. package/packages/context-discovery/package.json +1 -1
  88. package/packages/context-manager/package.json +1 -1
  89. package/packages/cookie-sanitizer/README.md +27 -27
  90. package/packages/cookie-sanitizer/package.json +1 -1
  91. package/packages/cost-optimizer/package.json +1 -1
  92. package/packages/cost-optimizer/src/types.ts +5 -5
  93. package/packages/dependency-analyzer/package.json +1 -1
  94. package/packages/django-plugin/dist/analyzer.js +7 -7
  95. package/packages/django-plugin/package.json +1 -1
  96. package/packages/django-plugin/src/analyzer.ts +7 -7
  97. package/packages/doc-generator/package.json +1 -1
  98. package/packages/evaluation-engine/dist/engine.js +9 -9
  99. package/packages/evaluation-engine/package.json +1 -1
  100. package/packages/evaluation-engine/src/engine.ts +9 -9
  101. package/packages/evaluation-engine/src/types.ts +3 -3
  102. package/packages/evaluation-runner/package.json +1 -1
  103. package/packages/event-bus/dist/src/herdr-bus.d.ts +121 -0
  104. package/packages/event-bus/dist/src/herdr-bus.d.ts.map +1 -0
  105. package/packages/event-bus/dist/src/herdr-bus.js +322 -0
  106. package/packages/event-bus/dist/src/herdr-bus.js.map +1 -0
  107. package/packages/event-bus/dist/src/index.d.ts +2 -0
  108. package/packages/event-bus/dist/src/index.d.ts.map +1 -1
  109. package/packages/event-bus/dist/src/index.js +1 -0
  110. package/packages/event-bus/dist/src/index.js.map +1 -1
  111. package/packages/event-bus/package.json +1 -1
  112. package/packages/event-bus/src/herdr-bus.ts +525 -0
  113. package/packages/event-bus/src/index.ts +29 -0
  114. package/packages/event-store/package.json +1 -1
  115. package/packages/experience-replay/dist/replay.js +7 -7
  116. package/packages/experience-replay/package.json +1 -1
  117. package/packages/experience-replay/src/replay.ts +7 -7
  118. package/packages/experience-replay/src/types.ts +5 -5
  119. package/packages/feedback-collector/package.json +1 -1
  120. package/packages/framework-detector/README.md +18 -18
  121. package/packages/framework-detector/dist/detector.js +3 -3
  122. package/packages/framework-detector/dist/index.js +3 -3
  123. package/packages/framework-detector/dist/signatures/registry.js +24 -24
  124. package/packages/framework-detector/dist/types.js +1 -1
  125. package/packages/framework-detector/package.json +1 -1
  126. package/packages/framework-detector/src/detector.ts +3 -3
  127. package/packages/framework-detector/src/index.ts +3 -3
  128. package/packages/framework-detector/src/signatures/registry.ts +24 -24
  129. package/packages/framework-detector/src/types.ts +7 -7
  130. package/packages/framework-detector/tsconfig.tsbuildinfo +1 -1
  131. package/packages/framework-plugin-sdk/README.md +23 -23
  132. package/packages/framework-plugin-sdk/dist/index.js +2 -2
  133. package/packages/framework-plugin-sdk/dist/manager.js +3 -3
  134. package/packages/framework-plugin-sdk/dist/types.js +2 -2
  135. package/packages/framework-plugin-sdk/package.json +1 -1
  136. package/packages/framework-plugin-sdk/src/index.ts +2 -2
  137. package/packages/framework-plugin-sdk/src/manager.ts +3 -3
  138. package/packages/framework-plugin-sdk/src/types.ts +10 -10
  139. package/packages/framework-plugin-sdk/tsconfig.tsbuildinfo +1 -1
  140. package/packages/frappe-plugin/dist/analyzer.js +8 -8
  141. package/packages/frappe-plugin/dist/types.js +1 -1
  142. package/packages/frappe-plugin/package.json +1 -1
  143. package/packages/frappe-plugin/src/analyzer.ts +8 -8
  144. package/packages/frappe-plugin/src/types.ts +10 -10
  145. package/packages/generic-web-plugin/dist/analyzer.js +5 -5
  146. package/packages/generic-web-plugin/package.json +1 -1
  147. package/packages/generic-web-plugin/src/analyzer.ts +5 -5
  148. package/packages/health-monitor/package.json +1 -1
  149. package/packages/health-monitor/src/monitor.ts +1 -1
  150. package/packages/intent-analyzer/package.json +1 -1
  151. package/packages/laravel-plugin/dist/analyzer.js +11 -11
  152. package/packages/laravel-plugin/package.json +1 -1
  153. package/packages/laravel-plugin/src/analyzer.ts +11 -11
  154. package/packages/learning-engine/dist/engine.js +5 -5
  155. package/packages/learning-engine/dist/types.js +1 -1
  156. package/packages/learning-engine/package.json +1 -1
  157. package/packages/learning-engine/src/engine.ts +5 -5
  158. package/packages/learning-engine/src/types.ts +6 -6
  159. package/packages/mcp-adapter/package.json +1 -1
  160. package/packages/memory-engine/dist/engine.js +8 -8
  161. package/packages/memory-engine/dist/types.js +2 -2
  162. package/packages/memory-engine/package.json +1 -1
  163. package/packages/memory-engine/src/engine.ts +8 -8
  164. package/packages/memory-engine/src/types.ts +9 -9
  165. package/packages/model-registry/package.json +1 -1
  166. package/packages/model-registry/src/types.ts +4 -4
  167. package/packages/nextjs-plugin/dist/analyzer.js +9 -9
  168. package/packages/nextjs-plugin/package.json +1 -1
  169. package/packages/nextjs-plugin/src/analyzer.ts +9 -9
  170. package/packages/notification/dist/notification-center.js +1 -1
  171. package/packages/notification/package.json +1 -1
  172. package/packages/notification/src/notification-center.ts +1 -1
  173. package/packages/observability/dist/alerts.js +2 -2
  174. package/packages/observability/dist/health.js +4 -4
  175. package/packages/observability/dist/index.js +6 -6
  176. package/packages/observability/dist/logger.js +7 -7
  177. package/packages/observability/dist/metrics.js +11 -11
  178. package/packages/observability/dist/tracer.js +3 -3
  179. package/packages/observability/dist/types.js +1 -1
  180. package/packages/observability/package.json +1 -1
  181. package/packages/observability/src/alerts.ts +2 -2
  182. package/packages/observability/src/health.ts +4 -4
  183. package/packages/observability/src/index.ts +6 -6
  184. package/packages/observability/src/logger.ts +7 -7
  185. package/packages/observability/src/metrics.ts +11 -11
  186. package/packages/observability/src/tracer.ts +3 -3
  187. package/packages/observability/src/types.ts +7 -7
  188. package/packages/observability/test/observability.test.ts +4 -4
  189. package/packages/observability/tsconfig.tsbuildinfo +1 -1
  190. package/packages/performance-optimizer/dist/optimizer.js +1 -1
  191. package/packages/performance-optimizer/package.json +1 -1
  192. package/packages/performance-optimizer/src/optimizer.ts +1 -1
  193. package/packages/performance-optimizer/src/types.ts +4 -4
  194. package/packages/privilege-broker/package.json +1 -1
  195. package/packages/project-analyzer/dist/analyzer.js +4 -4
  196. package/packages/project-analyzer/dist/index.js +8 -8
  197. package/packages/project-analyzer/dist/signals.js +3 -3
  198. package/packages/project-analyzer/dist/types.js +1 -1
  199. package/packages/project-analyzer/package.json +1 -1
  200. package/packages/project-analyzer/src/analyzer.ts +4 -4
  201. package/packages/project-analyzer/src/index.ts +9 -9
  202. package/packages/project-analyzer/src/signals.ts +4 -4
  203. package/packages/project-analyzer/src/types.ts +15 -15
  204. package/packages/project-analyzer/test/index.test.ts +17 -17
  205. package/packages/project-analyzer/tsconfig.tsbuildinfo +1 -1
  206. package/packages/projection-engine/package.json +1 -1
  207. package/packages/prompt-compiler/dist/section-builder.js +1 -1
  208. package/packages/prompt-compiler/dist/types.js +3 -3
  209. package/packages/prompt-compiler/package.json +1 -1
  210. package/packages/prompt-compiler/src/section-builder.ts +1 -1
  211. package/packages/prompt-compiler/src/types.ts +12 -12
  212. package/packages/prompt-compiler/test/prompt-compiler.test.ts +12 -12
  213. package/packages/prompt-versioning/package.json +1 -1
  214. package/packages/provider-adapter-sdk/dist/builder.js +1 -1
  215. package/packages/provider-adapter-sdk/dist/index.js +5 -5
  216. package/packages/provider-adapter-sdk/dist/registry.js +1 -1
  217. package/packages/provider-adapter-sdk/dist/tester.js +1 -1
  218. package/packages/provider-adapter-sdk/dist/types.js +1 -1
  219. package/packages/provider-adapter-sdk/package.json +1 -1
  220. package/packages/provider-adapter-sdk/src/builder.ts +1 -1
  221. package/packages/provider-adapter-sdk/src/index.ts +6 -6
  222. package/packages/provider-adapter-sdk/src/registry.ts +1 -1
  223. package/packages/provider-adapter-sdk/src/tester.ts +1 -1
  224. package/packages/provider-adapter-sdk/src/types.ts +5 -5
  225. package/packages/provider-adapter-sdk/tsconfig.tsbuildinfo +1 -1
  226. package/packages/provider-router/package.json +1 -1
  227. package/packages/provider-router/src/types.ts +4 -4
  228. package/packages/provider-selector/package.json +1 -1
  229. package/packages/providers/dist/deepagents-adapter.js +1 -1
  230. package/packages/providers/package.json +1 -1
  231. package/packages/providers/src/deepagents-adapter.ts +1 -1
  232. package/packages/quota-manager/package.json +1 -1
  233. package/packages/rate-limiter/package.json +1 -1
  234. package/packages/react-vite-plugin/dist/analyzer.js +7 -7
  235. package/packages/react-vite-plugin/package.json +1 -1
  236. package/packages/react-vite-plugin/src/analyzer.ts +7 -7
  237. package/packages/release-manager/package.json +1 -1
  238. package/packages/requirement-compiler/dist/compiler.js +17 -17
  239. package/packages/requirement-compiler/dist/types.js +2 -2
  240. package/packages/requirement-compiler/package.json +1 -1
  241. package/packages/requirement-compiler/src/compiler.ts +17 -17
  242. package/packages/requirement-compiler/src/types.ts +21 -21
  243. package/packages/requirement-compiler/test/requirement-compiler.test.ts +17 -17
  244. package/packages/runtime/dist/command-executor.js +1 -1
  245. package/packages/runtime/dist/local-runtime-agent.js +1 -1
  246. package/packages/runtime/dist/policy-engine.js +1 -1
  247. package/packages/runtime/dist/runtime-api.js +1 -1
  248. package/packages/runtime/dist/workspace-manager.js +1 -1
  249. package/packages/runtime/package.json +1 -1
  250. package/packages/runtime/src/command-executor.ts +1 -1
  251. package/packages/runtime/src/local-runtime-agent.ts +1 -1
  252. package/packages/runtime/src/policy-engine.ts +1 -1
  253. package/packages/runtime/src/runtime-api.ts +1 -1
  254. package/packages/runtime/src/workspace-manager.ts +1 -1
  255. package/packages/scheduler/package.json +1 -1
  256. package/packages/scheduler-adapter/package.json +1 -1
  257. package/packages/session/README.md +18 -18
  258. package/packages/session/dist/history.js +3 -3
  259. package/packages/session/dist/index.js +5 -5
  260. package/packages/session/dist/manager.js +3 -3
  261. package/packages/session/dist/policy.js +2 -2
  262. package/packages/session/dist/store.js +2 -2
  263. package/packages/session/dist/types.js +1 -1
  264. package/packages/session/package.json +1 -1
  265. package/packages/session/src/history.ts +3 -3
  266. package/packages/session/src/index.ts +5 -5
  267. package/packages/session/src/manager.ts +3 -3
  268. package/packages/session/src/policy.ts +4 -4
  269. package/packages/session/src/store.ts +3 -3
  270. package/packages/session/src/types.ts +10 -10
  271. package/packages/session/tsconfig.tsbuildinfo +1 -1
  272. package/packages/session-api/package.json +1 -1
  273. package/packages/session-export/package.json +1 -1
  274. package/packages/shared-context/package.json +1 -1
  275. package/packages/skill-registry/package.json +1 -1
  276. package/packages/skill-registry/src/types.ts +4 -4
  277. package/packages/sprint-planner/package.json +1 -1
  278. package/packages/subscription-engine/package.json +1 -1
  279. package/packages/task-compiler/dist/compiler.js +7 -7
  280. package/packages/task-compiler/dist/decompose.js +11 -11
  281. package/packages/task-compiler/dist/file-scope.js +6 -6
  282. package/packages/task-compiler/dist/graph.js +6 -6
  283. package/packages/task-compiler/dist/index.js +2 -2
  284. package/packages/task-compiler/dist/types.js +5 -5
  285. package/packages/task-compiler/dist/validate.js +2 -2
  286. package/packages/task-compiler/dist/verification.js +2 -2
  287. package/packages/task-compiler/package.json +1 -1
  288. package/packages/task-compiler/src/command-policy.ts +1 -1
  289. package/packages/task-compiler/src/compiler.ts +7 -7
  290. package/packages/task-compiler/src/decompose.ts +11 -11
  291. package/packages/task-compiler/src/file-scope.ts +6 -6
  292. package/packages/task-compiler/src/graph.ts +6 -6
  293. package/packages/task-compiler/src/index.ts +3 -3
  294. package/packages/task-compiler/src/types.ts +14 -14
  295. package/packages/task-compiler/src/validate.ts +2 -2
  296. package/packages/task-compiler/src/verification.ts +2 -2
  297. package/packages/task-compiler/test/task-compiler.test.ts +10 -10
  298. package/packages/test-data-generator/README.md +13 -13
  299. package/packages/test-data-generator/dist/faker-adapter.js +4 -4
  300. package/packages/test-data-generator/dist/generator.js +3 -3
  301. package/packages/test-data-generator/dist/index.js +3 -3
  302. package/packages/test-data-generator/dist/types.js +1 -1
  303. package/packages/test-data-generator/package.json +1 -1
  304. package/packages/test-data-generator/src/faker-adapter.ts +4 -4
  305. package/packages/test-data-generator/src/generator.ts +3 -3
  306. package/packages/test-data-generator/src/index.ts +3 -3
  307. package/packages/test-data-generator/src/types.ts +9 -9
  308. package/packages/test-data-generator/tsconfig.tsbuildinfo +1 -1
  309. package/packages/test-generator/package.json +1 -1
  310. package/packages/token-estimation/package.json +1 -1
  311. package/packages/token-optimizer/package.json +1 -1
  312. package/packages/tui/package.json +1 -1
  313. package/packages/types/package.json +1 -1
  314. package/packages/types/src/agent-worker-types.ts +5 -5
  315. package/packages/types/src/runtime-types.ts +12 -12
  316. package/packages/types/tsconfig.tsbuildinfo +1 -1
  317. package/packages/workflow-events/package.json +1 -1
  318. package/packages/workspace-scanner/package.json +1 -1
  319. package/packages/worktree/package.json +1 -1
  320. package/renderer.ts +7 -7
  321. package/skills/harness-runtime/SKILL.md +15 -15
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/projection-engine",
3
- "version": "0.9.24",
3
+ "version": "0.9.25",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -48,7 +48,7 @@ export function buildSections(normalized, projectRules) {
48
48
  }
49
49
  return sections;
50
50
  }
51
- // ─── Section builders ───────────────────────────────────────────────────
51
+ // --- Section builders ---------------------------------------------------
52
52
  function buildIdentitySection(req) {
53
53
  const lines = [
54
54
  "# Task Identity",
@@ -23,7 +23,7 @@ export class PromptCompileError extends Error {
23
23
  this.details = details;
24
24
  }
25
25
  }
26
- // ─── Provider profiles ────────────────────────────────────────────────────
26
+ // --- Provider profiles ----------------------------------------------------
27
27
  /**
28
28
  * Built-in provider profiles.
29
29
  */
@@ -77,7 +77,7 @@ export const PROVIDER_PROFILES = {
77
77
  continuationMarker: "<!-- CONTINUE -->",
78
78
  },
79
79
  };
80
- // ─── Section order ────────────────────────────────────────────────────────
80
+ // --- Section order --------------------------------------------------------
81
81
  /**
82
82
  * Deterministic section ordering per RFC-0041.
83
83
  */
@@ -94,7 +94,7 @@ export const SECTION_ORDER = [
94
94
  "continuation_instructions",
95
95
  "supplemental",
96
96
  ];
97
- // ─── Compactable priority threshold ───────────────────────────────────────
97
+ // --- Compactable priority threshold ---------------------------------------
98
98
  /**
99
99
  * Entries with priority >= this are eligible for compaction.
100
100
  * Priority 0 = critical (never compact).
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/prompt-compiler",
3
- "version": "0.9.24",
3
+ "version": "0.9.25",
4
4
  "description": "Deterministic prompt compiler for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -67,7 +67,7 @@ export function buildSections(
67
67
  return sections;
68
68
  }
69
69
 
70
- // ─── Section builders ───────────────────────────────────────────────────
70
+ // --- Section builders ---------------------------------------------------
71
71
 
72
72
  function buildIdentitySection(req: NormalizedRequest): PromptSection {
73
73
  const lines = [
@@ -7,7 +7,7 @@
7
7
  import type { CompiledRequirement } from "@pi-harness/requirement-compiler";
8
8
  import type { CompiledTask } from "@pi-harness/task-compiler";
9
9
 
10
- // ─── Provider target ──────────────────────────────────────────────────────
10
+ // --- Provider target ------------------------------------------------------
11
11
 
12
12
  /**
13
13
  * Supported provider targets.
@@ -20,7 +20,7 @@ export type ProviderTarget =
20
20
  | "anthropic"
21
21
  | "gemini";
22
22
 
23
- // ─── Provider prompt profile ───────────────────────────────────────────────
23
+ // --- Provider prompt profile -----------------------------------------------
24
24
 
25
25
  /**
26
26
  * Provider-specific formatting preferences.
@@ -34,7 +34,7 @@ export interface ProviderPromptProfile {
34
34
  continuationMarker: string;
35
35
  }
36
36
 
37
- // ─── Prompt sections ──────────────────────────────────────────────────────
37
+ // --- Prompt sections ------------------------------------------------------
38
38
 
39
39
  /**
40
40
  * A single section of the compiled prompt.
@@ -68,7 +68,7 @@ export interface SourceRef {
68
68
  text: string;
69
69
  }
70
70
 
71
- // ─── Continuation ─────────────────────────────────────────────────────────
71
+ // --- Continuation ---------------------------------------------------------
72
72
 
73
73
  /**
74
74
  * Context for resuming a prompt that hit output limits.
@@ -80,7 +80,7 @@ export interface ContinuationContext {
80
80
  instruction: "continue_without_repeating";
81
81
  }
82
82
 
83
- // ─── Compiled context ────────────────────────────────────────────────────
83
+ // --- Compiled context ----------------------------------------------------
84
84
 
85
85
  /**
86
86
  * Compiled context from the Context Compiler (RFC-0042).
@@ -106,7 +106,7 @@ function __contextEntryPriority(): void {
106
106
  // 7+ = supplemental
107
107
  }
108
108
 
109
- // ─── Redaction ────────────────────────────────────────────────────────────
109
+ // --- Redaction ------------------------------------------------------------
110
110
 
111
111
  /**
112
112
  * Redaction rule patterns.
@@ -117,7 +117,7 @@ export interface RedactionRule {
117
117
  description: string;
118
118
  }
119
119
 
120
- // ─── Prompt package ──────────────────────────────────────────────────────
120
+ // --- Prompt package ------------------------------------------------------
121
121
 
122
122
  /**
123
123
  * The output artifact of prompt compilation.
@@ -135,7 +135,7 @@ export interface PromptPackage {
135
135
  createdAt: string;
136
136
  }
137
137
 
138
- // ─── Compile request ──────────────────────────────────────────────────────
138
+ // --- Compile request ------------------------------------------------------
139
139
 
140
140
  /**
141
141
  * Input to the prompt compiler.
@@ -149,7 +149,7 @@ export interface PromptCompileRequest {
149
149
  continuation?: ContinuationContext;
150
150
  }
151
151
 
152
- // ─── Error codes ─────────────────────────────────────────────────────────
152
+ // --- Error codes ---------------------------------------------------------
153
153
 
154
154
  export type PromptCompileErrorCode =
155
155
  | "INVALID_TASK"
@@ -178,7 +178,7 @@ export class PromptCompileError extends Error {
178
178
  }
179
179
  }
180
180
 
181
- // ─── Provider profiles ────────────────────────────────────────────────────
181
+ // --- Provider profiles ----------------------------------------------------
182
182
 
183
183
  /**
184
184
  * Built-in provider profiles.
@@ -235,7 +235,7 @@ export const PROVIDER_PROFILES: Record<ProviderTarget, ProviderPromptProfile> =
235
235
  },
236
236
  };
237
237
 
238
- // ─── Section order ────────────────────────────────────────────────────────
238
+ // --- Section order --------------------------------------------------------
239
239
 
240
240
  /**
241
241
  * Deterministic section ordering per RFC-0041.
@@ -254,7 +254,7 @@ export const SECTION_ORDER: PromptSection["kind"][] = [
254
254
  "supplemental",
255
255
  ];
256
256
 
257
- // ─── Compactable priority threshold ───────────────────────────────────────
257
+ // --- Compactable priority threshold ---------------------------------------
258
258
 
259
259
  /**
260
260
  * Entries with priority >= this are eligible for compaction.
@@ -32,7 +32,7 @@ import { PROVIDER_PROFILES } from "../src/types.js";
32
32
  import type { PromptCompileRequest } from "../src/types.js";
33
33
  import { validateSections, validateTokenBudget } from "../src/validate.js";
34
34
 
35
- // ─── Test fixtures ───────────────────────────────────────────────────────
35
+ // --- Test fixtures -------------------------------------------------------
36
36
 
37
37
  function makeRequest(
38
38
  overrides?: Partial<PromptCompileRequest>,
@@ -115,7 +115,7 @@ function makeDeps(overrides?: {
115
115
  };
116
116
  }
117
117
 
118
- // ─── Test 1: Deterministic hash ──────────────────────────────────────
118
+ // --- Test 1: Deterministic hash --------------------------------------
119
119
 
120
120
  describe("Deterministic hash", () => {
121
121
  it("identical inputs produce identical prompt content and hash", async () => {
@@ -167,7 +167,7 @@ describe("Deterministic hash", () => {
167
167
  });
168
168
  });
169
169
 
170
- // ─── Test 2: Required sections never removed ─────────────────────────────
170
+ // --- Test 2: Required sections never removed -----------------------------
171
171
 
172
172
  describe("Required sections survive compaction", () => {
173
173
  it("objective section is required and never compacted", async () => {
@@ -235,7 +235,7 @@ describe("Required sections survive compaction", () => {
235
235
  });
236
236
  });
237
237
 
238
- // ─── Test 3: Provider formatting ───────────────────────────────────────
238
+ // --- Test 3: Provider formatting ---------------------------------------
239
239
 
240
240
  describe("Provider formatting", () => {
241
241
  it("anthropic uses XML formatting", async () => {
@@ -299,7 +299,7 @@ describe("Provider formatting", () => {
299
299
  });
300
300
  });
301
301
 
302
- // ─── Test 4: Secret redaction ─────────────────────────────────────────
302
+ // --- Test 4: Secret redaction -----------------------------------------
303
303
 
304
304
  describe("Secret redaction", () => {
305
305
  it("API keys are redacted before persistence", async () => {
@@ -360,7 +360,7 @@ describe("Secret redaction", () => {
360
360
  });
361
361
  });
362
362
 
363
- // ─── Test 5: Error codes ───────────────────────────────────────────────
363
+ // --- Test 5: Error codes -----------------------------------------------
364
364
 
365
365
  describe("Error codes", () => {
366
366
  it("INVALID_TASK when task ID is empty", async () => {
@@ -477,7 +477,7 @@ describe("Error codes", () => {
477
477
  });
478
478
  });
479
479
 
480
- // ─── Test 6: Continuation without repetition ───────────────────────────
480
+ // --- Test 6: Continuation without repetition ---------------------------
481
481
 
482
482
  describe("Continuation without repetition", () => {
483
483
  it("completed items are marked as done, not repeated", async () => {
@@ -554,7 +554,7 @@ describe("Continuation without repetition", () => {
554
554
  });
555
555
  });
556
556
 
557
- // ─── Test 7: Token budget ──────────────────────────────────────────────
557
+ // --- Test 7: Token budget ----------------------------------------------
558
558
 
559
559
  describe("Token budget", () => {
560
560
  it("estimateTokens returns 0 for empty string", () => {
@@ -623,7 +623,7 @@ describe("Token budget", () => {
623
623
  });
624
624
  });
625
625
 
626
- // ─── Test 8: Deduplication ─────────────────────────────────────────────
626
+ // --- Test 8: Deduplication ---------------------------------------------
627
627
 
628
628
  describe("Deduplication", () => {
629
629
  it("normalizeForDeduplication strips markdown and lowercases", () => {
@@ -691,7 +691,7 @@ describe("Deduplication", () => {
691
691
  });
692
692
  });
693
693
 
694
- // ─── Test 9: Metadata completeness ────────────────────────────────────
694
+ // --- Test 9: Metadata completeness ------------------------------------
695
695
 
696
696
  describe("Metadata completeness", () => {
697
697
  it("PromptPackage includes token estimate and source refs", async () => {
@@ -738,7 +738,7 @@ describe("Metadata completeness", () => {
738
738
  });
739
739
  });
740
740
 
741
- // ─── Test 10: PromptCompileError ─────────────────────────────────────
741
+ // --- Test 10: PromptCompileError -------------------------------------
742
742
 
743
743
  describe("PromptCompileError", () => {
744
744
  it("has correct name, code, and message", () => {
@@ -761,7 +761,7 @@ describe("PromptCompileError", () => {
761
761
  });
762
762
  });
763
763
 
764
- // ─── Test 11: normalizeRequest ────────────────────────────────────────
764
+ // --- Test 11: normalizeRequest ----------------------------------------
765
765
 
766
766
  describe("normalizeRequest", () => {
767
767
  it("trims strings", () => {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/prompt-versioning",
3
- "version": "0.9.24",
3
+ "version": "0.9.25",
4
4
  "type": "module",
5
5
  "description": "Version control for prompts with rollback support (RFC-0019)",
6
6
  "main": "dist/index.js",
@@ -346,7 +346,7 @@ export class BuiltAdapter {
346
346
  };
347
347
  }
348
348
  }
349
- // ─── Factory Function ──────────────────────────────────────────────────────
349
+ // --- Factory Function ------------------------------------------------------
350
350
  /**
351
351
  * Create a new provider builder
352
352
  */
@@ -3,15 +3,15 @@
3
3
  *
4
4
  * A comprehensive SDK for building, testing, and registering provider adapters.
5
5
  */
6
- // ─── Builder ────────────────────────────────────────────────────────────────
6
+ // --- Builder ----------------------------------------------------------------
7
7
  export { AdapterBuilder, BuiltAdapter, createProviderBuilder, } from "./builder.js";
8
- // ─── Registry ────────────────────────────────────────────────────────────────
8
+ // --- Registry ----------------------------------------------------------------
9
9
  export { AdapterRegistry, createAdapterRegistry, } from "./registry.js";
10
- // ─── Tester ─────────────────────────────────────────────────────────────────
10
+ // --- Tester -----------------------------------------------------------------
11
11
  export { AdapterTester, assertTestResults, createAdapterTester, } from "./tester.js";
12
- // ─── Errors ─────────────────────────────────────────────────────────────────
12
+ // --- Errors -----------------------------------------------------------------
13
13
  export { AdapterError, AdapterNotFoundError, AdapterAlreadyRegisteredError, AdapterInvocationError, ModelNotSupportedError, AdapterStateError, CompatibilityError, TestFailureError, BuilderValidationError, LifecycleError, } from "./errors.js";
14
- // ─── Constants ───────────────────────────────────────────────────────────────
14
+ // --- Constants ---------------------------------------------------------------
15
15
  /**
16
16
  * SDK version
17
17
  */
@@ -346,7 +346,7 @@ export class AdapterRegistry extends EventEmitter {
346
346
  };
347
347
  }
348
348
  }
349
- // ─── Factory Function ──────────────────────────────────────────────────────
349
+ // --- Factory Function ------------------------------------------------------
350
350
  /**
351
351
  * Create a new adapter registry
352
352
  */
@@ -389,7 +389,7 @@ export function assertTestResults(report) {
389
389
  throw new TestFailureError(report.adapterId, "all", `Test failed:\n${messages.join("\n")}`);
390
390
  }
391
391
  }
392
- // ─── Factory Function ──────────────────────────────────────────────────────
392
+ // --- Factory Function ------------------------------------------------------
393
393
  /**
394
394
  * Create a new adapter tester
395
395
  */
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Core types for building provider adapters.
5
5
  */
6
- // ─── SDK Version ────────────────────────────────────────────────────────────
6
+ // --- SDK Version ------------------------------------------------------------
7
7
  /**
8
8
  * SDK version for compatibility checks
9
9
  */
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/provider-adapter-sdk",
3
- "version": "0.9.24",
3
+ "version": "0.9.25",
4
4
  "description": "SDK for building, testing, and registering AI provider adapters",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -432,7 +432,7 @@ export class BuiltAdapter {
432
432
  }
433
433
  }
434
434
 
435
- // ─── Factory Function ──────────────────────────────────────────────────────
435
+ // --- Factory Function ------------------------------------------------------
436
436
 
437
437
  /**
438
438
  * Create a new provider builder
@@ -4,7 +4,7 @@
4
4
  * A comprehensive SDK for building, testing, and registering provider adapters.
5
5
  */
6
6
 
7
- // ─── Builder ────────────────────────────────────────────────────────────────
7
+ // --- Builder ----------------------------------------------------------------
8
8
 
9
9
  export {
10
10
  AdapterBuilder,
@@ -12,7 +12,7 @@ export {
12
12
  createProviderBuilder,
13
13
  } from "./builder.js";
14
14
 
15
- // ─── Registry ────────────────────────────────────────────────────────────────
15
+ // --- Registry ----------------------------------------------------------------
16
16
 
17
17
  export {
18
18
  AdapterRegistry,
@@ -20,7 +20,7 @@ export {
20
20
  type RegistryConfig,
21
21
  } from "./registry.js";
22
22
 
23
- // ─── Tester ─────────────────────────────────────────────────────────────────
23
+ // --- Tester -----------------------------------------------------------------
24
24
 
25
25
  export {
26
26
  AdapterTester,
@@ -28,7 +28,7 @@ export {
28
28
  createAdapterTester,
29
29
  } from "./tester.js";
30
30
 
31
- // ─── Types ──────────────────────────────────────────────────────────────────
31
+ // --- Types ------------------------------------------------------------------
32
32
 
33
33
  export type {
34
34
  // SDK Types
@@ -61,7 +61,7 @@ export type {
61
61
  ProviderResponse,
62
62
  } from "./types.js";
63
63
 
64
- // ─── Errors ─────────────────────────────────────────────────────────────────
64
+ // --- Errors -----------------------------------------------------------------
65
65
 
66
66
  export {
67
67
  AdapterError,
@@ -76,7 +76,7 @@ export {
76
76
  LifecycleError,
77
77
  } from "./errors.js";
78
78
 
79
- // ─── Constants ───────────────────────────────────────────────────────────────
79
+ // --- Constants ---------------------------------------------------------------
80
80
 
81
81
  /**
82
82
  * SDK version
@@ -474,7 +474,7 @@ export class AdapterRegistry extends EventEmitter {
474
474
  }
475
475
  }
476
476
 
477
- // ─── Factory Function ──────────────────────────────────────────────────────
477
+ // --- Factory Function ------------------------------------------------------
478
478
 
479
479
  /**
480
480
  * Create a new adapter registry
@@ -470,7 +470,7 @@ export function assertTestResults(report: TestReport): void {
470
470
  }
471
471
  }
472
472
 
473
- // ─── Factory Function ──────────────────────────────────────────────────────
473
+ // --- Factory Function ------------------------------------------------------
474
474
 
475
475
  /**
476
476
  * Create a new adapter tester
@@ -4,14 +4,14 @@
4
4
  * Core types for building provider adapters.
5
5
  */
6
6
 
7
- // ─── SDK Version ────────────────────────────────────────────────────────────
7
+ // --- SDK Version ------------------------------------------------------------
8
8
 
9
9
  /**
10
10
  * SDK version for compatibility checks
11
11
  */
12
12
  export const SDK_VERSION = "1.0.0";
13
13
 
14
- // ─── Provider Types (from @pi/types) ────────────────────────────────────────
14
+ // --- Provider Types (from @pi/types) ----------------------------------------
15
15
 
16
16
  /**
17
17
  * Provider capability
@@ -62,7 +62,7 @@ export interface ProviderResponse {
62
62
  error?: string;
63
63
  }
64
64
 
65
- // ─── Rate Limit Config ──────────────────────────────────────────────────────
65
+ // --- Rate Limit Config ------------------------------------------------------
66
66
 
67
67
  /**
68
68
  * Rate limit configuration for providers
@@ -74,7 +74,7 @@ export interface RateLimitConfig {
74
74
  concurrentRequests?: number;
75
75
  }
76
76
 
77
- // ─── SDK Types ──────────────────────────────────────────────────────────────
77
+ // --- SDK Types --------------------------------------------------------------
78
78
 
79
79
  /**
80
80
  * Adapter version information
@@ -262,7 +262,7 @@ export interface RegistryEvents {
262
262
  onHealthCheckFailed: (adapterId: string, result: HealthCheckResult) => void;
263
263
  }
264
264
 
265
- // ─── Provider Adapter Types ────────────────────────────────────────────────
265
+ // --- Provider Adapter Types ------------------------------------------------
266
266
 
267
267
  /**
268
268
  * Provider adapter interface