pi-harness-runtime 1.1.509 → 1.1.511

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 (93) hide show
  1. package/CHANGELOG.md +177 -0
  2. package/harness/local-refusal-marker.ts +104 -0
  3. package/harness/mirror-record-merge.ts +64 -0
  4. package/harness/optional-event.ts +27 -0
  5. package/harness/provider-recovery-runtime.ts +143 -4
  6. package/harness/weekly-exhaustion-registry.ts +178 -0
  7. package/harness/weekly-quota-exhaustion.ts +172 -0
  8. package/index.ts +420 -3
  9. package/package.json +1 -1
  10. package/packages/agent-policy/package.json +1 -1
  11. package/packages/auth/package.json +1 -1
  12. package/packages/autonomous-runtime/package.json +1 -1
  13. package/packages/checkpoint/package.json +1 -1
  14. package/packages/clipboard/package.json +1 -1
  15. package/packages/codex-watcher/package.json +1 -1
  16. package/packages/config-capture/package.json +1 -1
  17. package/packages/contracts/package.json +1 -1
  18. package/packages/cookie-sanitizer/package.json +1 -1
  19. package/packages/evaluation-engine/package.json +1 -1
  20. package/packages/event-bus/package.json +1 -1
  21. package/packages/event-store/package.json +1 -1
  22. package/packages/experience-replay/package.json +1 -1
  23. package/packages/file-copy-helper/package.json +1 -1
  24. package/packages/intent-analyzer/package.json +1 -1
  25. package/packages/jev-judge/dist/auto-continue.d.ts.map +1 -1
  26. package/packages/jev-judge/dist/auto-continue.js +11 -1
  27. package/packages/jev-judge/dist/auto-continue.js.map +1 -1
  28. package/packages/jev-judge/dist/question-risk.d.ts +8 -0
  29. package/packages/jev-judge/dist/question-risk.d.ts.map +1 -1
  30. package/packages/jev-judge/dist/question-risk.js +17 -0
  31. package/packages/jev-judge/dist/question-risk.js.map +1 -1
  32. package/packages/jev-judge/package.json +1 -1
  33. package/packages/jev-judge/src/auto-continue.ts +13 -1
  34. package/packages/jev-judge/src/question-risk.ts +19 -0
  35. package/packages/knowledge-retrieval/package.json +1 -1
  36. package/packages/learning-engine/package.json +1 -1
  37. package/packages/logging/package.json +1 -1
  38. package/packages/memory-engine/package.json +1 -1
  39. package/packages/notification/dist/adapters/email-adapter.d.ts.map +1 -1
  40. package/packages/notification/dist/adapters/email-adapter.js +1 -0
  41. package/packages/notification/dist/adapters/email-adapter.js.map +1 -1
  42. package/packages/notification/dist/adapters/line-adapter.d.ts.map +1 -1
  43. package/packages/notification/dist/adapters/line-adapter.js +1 -0
  44. package/packages/notification/dist/adapters/line-adapter.js.map +1 -1
  45. package/packages/notification/dist/adapters/ntfy-adapter.d.ts.map +1 -1
  46. package/packages/notification/dist/adapters/ntfy-adapter.js +1 -0
  47. package/packages/notification/dist/adapters/ntfy-adapter.js.map +1 -1
  48. package/packages/notification/dist/adapters/telegram-adapter.d.ts.map +1 -1
  49. package/packages/notification/dist/adapters/telegram-adapter.js +1 -0
  50. package/packages/notification/dist/adapters/telegram-adapter.js.map +1 -1
  51. package/packages/notification/dist/notification-center.d.ts.map +1 -1
  52. package/packages/notification/dist/notification-center.js +6 -0
  53. package/packages/notification/dist/notification-center.js.map +1 -1
  54. package/packages/notification/dist/pending-question.d.ts +69 -0
  55. package/packages/notification/dist/pending-question.d.ts.map +1 -1
  56. package/packages/notification/dist/pending-question.js +211 -1
  57. package/packages/notification/dist/pending-question.js.map +1 -1
  58. package/packages/notification/dist/telegram-webhook-handler.d.ts +14 -0
  59. package/packages/notification/dist/telegram-webhook-handler.d.ts.map +1 -1
  60. package/packages/notification/dist/telegram-webhook-handler.js +14 -0
  61. package/packages/notification/dist/telegram-webhook-handler.js.map +1 -1
  62. package/packages/notification/dist/types.d.ts +9 -1
  63. package/packages/notification/dist/types.d.ts.map +1 -1
  64. package/packages/notification/package.json +1 -1
  65. package/packages/notification/src/adapters/email-adapter.ts +1 -0
  66. package/packages/notification/src/adapters/line-adapter.ts +1 -0
  67. package/packages/notification/src/adapters/ntfy-adapter.ts +1 -0
  68. package/packages/notification/src/adapters/telegram-adapter.ts +1 -0
  69. package/packages/notification/src/notification-center.ts +6 -0
  70. package/packages/notification/src/pending-question.ts +259 -1
  71. package/packages/notification/src/telegram-webhook-handler.ts +14 -0
  72. package/packages/notification/src/types.ts +8 -0
  73. package/packages/paperclip-integration/package.json +1 -1
  74. package/packages/performance-optimizer/package.json +1 -1
  75. package/packages/privilege-broker/package.json +1 -1
  76. package/packages/prompt-compiler/package.json +1 -1
  77. package/packages/providers/package.json +1 -1
  78. package/packages/qdrant-skills/package.json +1 -1
  79. package/packages/quota-manager/package.json +1 -1
  80. package/packages/relay/package.json +1 -1
  81. package/packages/skill-mcp-client/package.json +1 -1
  82. package/packages/skills/package.json +1 -1
  83. package/packages/todo-bd-sync/package.json +1 -1
  84. package/packages/token-estimation/package.json +1 -1
  85. package/packages/tooling-preference/package.json +1 -1
  86. package/packages/trajectory/package.json +1 -1
  87. package/packages/tui/package.json +1 -1
  88. package/packages/two-phase-review/package.json +1 -1
  89. package/packages/types/package.json +1 -1
  90. package/packages/webmcp-tester/package.json +1 -1
  91. package/packages/wiki/package.json +1 -1
  92. package/packages/write-review/package.json +1 -1
  93. package/proactive-compact.ts +21 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/providers",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "pi-harness-runtime — providers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/qdrant-skills",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "Qdrant vector search integration for Hermes-style skill system",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/quota-manager",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "pi-harness-runtime — quota-manager",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/relay",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "type": "module",
5
5
  "description": "Cloud relay for remote access - T3 Connect style for pi-harness",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/skill-mcp-client",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "MCP client for Skills SaaS backend",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/skills",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "File-based skill system with pi.dev compatibility and Hermes self-improvement",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/todo-bd-sync",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "Two-way sync between rpiv-todo overlay and bd issue tracker",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/token-estimation",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "pi-harness-runtime — token-estimation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/tooling-preference",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "pi-harness-runtime — JS/TS tooling preference (Biome vs ESLint/Prettier) proposal",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/trajectory",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "Trajectory capture for the write-review loop — persists cycle records for learning",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/tui",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "pi-harness-runtime — tui",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/two-phase-review",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "pi-harness-runtime — two-phase implementation and review workflow (queue review signals, gate the phase, scope the diff)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/types",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "Shared TypeScript types for pi-harness-runtime packages",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/webmcp-tester",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "WebMCP-powered E2E testing for pi-harness - natural language test scenarios",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/wiki",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "LLM Wiki integration for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/write-review",
3
- "version": "1.1.509",
3
+ "version": "1.1.511",
4
4
  "description": "Two-agent write-review loop with blackboard coordination",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -145,6 +145,27 @@ export function isProviderRetryFailedReport(text: string): boolean {
145
145
  return /Retry failed after \d+ attempts:/i.test(text);
146
146
  }
147
147
 
148
+ /**
149
+ * Whether the text is the report of an overload of the provider.
150
+ *
151
+ * The compaction is a request of its own, and it fails with the same
152
+ * overload as a turn. The text of such a failure names the number of the
153
+ * status (529) or one of the words that name an overload.
154
+ *
155
+ * The predicate reads the text only: the report of a failed compaction has
156
+ * no role and no stop reason, so the predicates of the assistant messages
157
+ * cannot read it.
158
+ */
159
+ export function isProviderOverloadText(text: string | undefined | null): boolean {
160
+ if (typeof text !== "string" || text.trim().length === 0) {
161
+ return false;
162
+ }
163
+ if (/\b529\b/.test(text)) return true;
164
+ return /overloaded_error|peak-hour surge|temporarily busy|server is temporarily busy|try again shortly/i.test(
165
+ text,
166
+ );
167
+ }
168
+
148
169
  /**
149
170
  * Legacy check - returns true for BOTH fresh overloads AND "Retry failed" reports
150
171
  * @deprecated Use isFreshProviderOverloadError for retry logic