pi-harness-runtime 1.1.147 → 1.1.148

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 (142) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/package.json +3 -2
  3. package/packages/a2a-adapter/package.json +1 -1
  4. package/packages/architecture-generator/package.json +1 -1
  5. package/packages/auth/package.json +1 -1
  6. package/packages/autonomous-refactor/package.json +1 -1
  7. package/packages/autonomous-runtime/package.json +1 -1
  8. package/packages/cache-strategy/package.json +1 -1
  9. package/packages/capability-registry/package.json +1 -1
  10. package/packages/checkpoint/package.json +1 -1
  11. package/packages/cli-plugin-sdk/package.json +1 -1
  12. package/packages/clipboard/package.json +1 -1
  13. package/packages/clipboard-plugin/package.json +1 -1
  14. package/packages/code-generation/package.json +1 -1
  15. package/packages/code-review/package.json +1 -1
  16. package/packages/codex-adapter/package.json +1 -1
  17. package/packages/codex-watcher/package.json +1 -1
  18. package/packages/config-capture/package.json +1 -1
  19. package/packages/context-compiler/package.json +1 -1
  20. package/packages/context-discovery/package.json +1 -1
  21. package/packages/context-manager/package.json +1 -1
  22. package/packages/cookie-sanitizer/package.json +1 -1
  23. package/packages/cost-optimizer/package.json +1 -1
  24. package/packages/dependency-analyzer/package.json +1 -1
  25. package/packages/django-plugin/package.json +1 -1
  26. package/packages/doc-generator/package.json +1 -1
  27. package/packages/evaluation-engine/package.json +1 -1
  28. package/packages/evaluation-runner/package.json +1 -1
  29. package/packages/event-bus/package.json +1 -1
  30. package/packages/event-store/package.json +1 -1
  31. package/packages/experience-replay/package.json +1 -1
  32. package/packages/feedback-collector/package.json +1 -1
  33. package/packages/file-copy-helper/dist/src/extension.js +186 -0
  34. package/packages/file-copy-helper/package.json +1 -1
  35. package/packages/framework-detector/package.json +1 -1
  36. package/packages/framework-plugin-sdk/package.json +1 -1
  37. package/packages/frappe-plugin/package.json +1 -1
  38. package/packages/generic-web-plugin/package.json +1 -1
  39. package/packages/health-monitor/package.json +1 -1
  40. package/packages/intent-analyzer/package.json +1 -1
  41. package/packages/jev-judge/package.json +1 -1
  42. package/packages/knowledge-graph/package.json +1 -1
  43. package/packages/knowledge-retrieval/package.json +1 -1
  44. package/packages/laravel-plugin/package.json +1 -1
  45. package/packages/learning-engine/package.json +1 -1
  46. package/packages/mcp-adapter/package.json +1 -1
  47. package/packages/memory-engine/package.json +1 -1
  48. package/packages/milestone-manager/package.json +1 -1
  49. package/packages/model-registry/package.json +1 -1
  50. package/packages/nextjs-plugin/package.json +1 -1
  51. package/packages/notification/dist/adapters/email-adapter.d.ts +17 -0
  52. package/packages/notification/dist/adapters/email-adapter.d.ts.map +1 -0
  53. package/packages/notification/dist/adapters/email-adapter.js +89 -0
  54. package/packages/notification/dist/adapters/email-adapter.js.map +1 -0
  55. package/packages/notification/dist/adapters/line-adapter.d.ts +17 -0
  56. package/packages/notification/dist/adapters/line-adapter.d.ts.map +1 -0
  57. package/packages/notification/dist/adapters/line-adapter.js +99 -0
  58. package/packages/notification/dist/adapters/line-adapter.js.map +1 -0
  59. package/packages/notification/dist/adapters/ntfy-adapter.d.ts +17 -0
  60. package/packages/notification/dist/adapters/ntfy-adapter.d.ts.map +1 -0
  61. package/packages/notification/dist/adapters/ntfy-adapter.js +84 -0
  62. package/packages/notification/dist/adapters/ntfy-adapter.js.map +1 -0
  63. package/packages/notification/dist/adapters/telegram-adapter.d.ts +56 -0
  64. package/packages/notification/dist/adapters/telegram-adapter.d.ts.map +1 -0
  65. package/packages/notification/dist/adapters/telegram-adapter.js +251 -0
  66. package/packages/notification/dist/adapters/telegram-adapter.js.map +1 -0
  67. package/packages/notification/dist/adapters/webhook-adapter.d.ts +15 -0
  68. package/packages/notification/dist/adapters/webhook-adapter.d.ts.map +1 -0
  69. package/packages/notification/dist/adapters/webhook-adapter.js +64 -0
  70. package/packages/notification/dist/adapters/webhook-adapter.js.map +1 -0
  71. package/packages/notification/dist/base-adapter.d.ts +36 -0
  72. package/packages/notification/dist/base-adapter.d.ts.map +1 -0
  73. package/packages/notification/dist/base-adapter.js +39 -0
  74. package/packages/notification/dist/base-adapter.js.map +1 -0
  75. package/packages/notification/dist/index.d.ts +12 -0
  76. package/packages/notification/dist/index.d.ts.map +1 -0
  77. package/packages/notification/dist/index.js +12 -0
  78. package/packages/notification/dist/index.js.map +1 -0
  79. package/packages/notification/dist/notification-center.d.ts +89 -0
  80. package/packages/notification/dist/notification-center.d.ts.map +1 -0
  81. package/packages/notification/dist/notification-center.js +356 -0
  82. package/packages/notification/dist/notification-center.js.map +1 -0
  83. package/packages/notification/dist/notification-policy.d.ts +66 -0
  84. package/packages/notification/dist/notification-policy.d.ts.map +1 -0
  85. package/packages/notification/dist/notification-policy.js +153 -0
  86. package/packages/notification/dist/notification-policy.js.map +1 -0
  87. package/packages/notification/dist/telegram-webhook-handler.d.ts +86 -0
  88. package/packages/notification/dist/telegram-webhook-handler.d.ts.map +1 -0
  89. package/packages/notification/dist/telegram-webhook-handler.js +149 -0
  90. package/packages/notification/dist/telegram-webhook-handler.js.map +1 -0
  91. package/packages/notification/dist/types.d.ts +106 -0
  92. package/packages/notification/dist/types.d.ts.map +1 -0
  93. package/packages/notification/dist/types.js +7 -0
  94. package/packages/notification/dist/types.js.map +1 -0
  95. package/packages/notification/package.json +1 -1
  96. package/packages/observability/package.json +1 -1
  97. package/packages/okf-indexer/package.json +1 -1
  98. package/packages/paperclip-integration/package.json +1 -1
  99. package/packages/performance-optimizer/package.json +1 -1
  100. package/packages/privilege-broker/package.json +1 -1
  101. package/packages/project-analyzer/package.json +1 -1
  102. package/packages/project-bootstrap/package.json +1 -1
  103. package/packages/projection-engine/package.json +1 -1
  104. package/packages/prompt-compiler/package.json +1 -1
  105. package/packages/prompt-versioning/package.json +1 -1
  106. package/packages/provider-adapter-sdk/package.json +1 -1
  107. package/packages/provider-router/package.json +1 -1
  108. package/packages/provider-selector/package.json +1 -1
  109. package/packages/providers/package.json +1 -1
  110. package/packages/qdrant-skills/package.json +1 -1
  111. package/packages/quota-manager/package.json +1 -1
  112. package/packages/rate-limiter/package.json +1 -1
  113. package/packages/react-vite-plugin/package.json +1 -1
  114. package/packages/release-manager/package.json +1 -1
  115. package/packages/requirement-compiler/package.json +1 -1
  116. package/packages/runtime/package.json +1 -1
  117. package/packages/scheduler/package.json +1 -1
  118. package/packages/scheduler-adapter/package.json +1 -1
  119. package/packages/session/package.json +1 -1
  120. package/packages/session-api/package.json +1 -1
  121. package/packages/session-export/package.json +1 -1
  122. package/packages/shared-context/package.json +1 -1
  123. package/packages/skill-mcp-client/package.json +1 -1
  124. package/packages/skill-registry/package.json +1 -1
  125. package/packages/skills/package.json +1 -1
  126. package/packages/sprint-planner/package.json +1 -1
  127. package/packages/subscription-engine/package.json +1 -1
  128. package/packages/task-compiler/package.json +1 -1
  129. package/packages/tencentdb-memory/package.json +1 -1
  130. package/packages/tencentdb-sync/package.json +1 -1
  131. package/packages/test-data-generator/package.json +1 -1
  132. package/packages/test-generator/package.json +1 -1
  133. package/packages/todo-bd-sync/package.json +1 -1
  134. package/packages/token-estimation/package.json +1 -1
  135. package/packages/token-optimizer/package.json +1 -1
  136. package/packages/trajectory/package.json +1 -1
  137. package/packages/tui/package.json +1 -1
  138. package/packages/types/package.json +1 -1
  139. package/packages/workflow-events/package.json +1 -1
  140. package/packages/workspace-scanner/package.json +1 -1
  141. package/packages/worktree/package.json +1 -1
  142. package/packages/write-review/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
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
+ ### [1.1.138](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.147...v1.1.138) (2026-10-04)
6
+
5
7
  ### [1.1.75](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.95...v1.1.75) (2026-09-29)
6
8
 
7
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-harness-runtime",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
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": {
@@ -19,7 +19,8 @@
19
19
  "build": "for pkg in packages/*/; do [ -f \"${pkg}tsconfig.json\" ] && [ \"$pkg\" != \"packages/provider-router/\" ] && node_modules/.bin/tsc -p \"${pkg}tsconfig.json\" --skipLibCheck > /dev/null 2>&1 || true; done",
20
20
  "prepublishOnly": "bun run build",
21
21
  "test:harness": "bun test harness/langchain/",
22
- "test:all": "node --test && bun test harness/langchain/"
22
+ "test:all": "node --test && bun test harness/langchain/",
23
+ "prepublish": "bun run build"
23
24
  },
24
25
  "bin": {
25
26
  "harness-auth": "packages/auth/src/run-minimax-auth.ts"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/a2a-adapter",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "description": "Google Agent-to-Agent (A2A) protocol adapter for pi-harness",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/architecture-generator",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Generate ADR and Mermaid diagrams from project analysis",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/auth",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "pi-harness-runtime — auth",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/autonomous-refactor",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "description": "Autonomous refactoring engine",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/autonomous-runtime",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Autonomous Operations Runtime — task inbox, lease management, and worker lifecycle (RFC-0101)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/cache-strategy",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "description": "Smart caching with TTL and invalidation strategies (RFC-0022)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/capability-registry",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
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": "1.1.147",
3
+ "version": "1.1.148",
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/cli-plugin-sdk",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "description": "CLI Plugin SDK for pi-harness — install, list, remove, update, invoke plugins",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/clipboard",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/clipboard-plugin",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/code-generation",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
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": "1.1.147",
3
+ "version": "1.1.148",
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/codex-adapter",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "description": "OpenAI Codex provider adapter for pi-harness",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/codex-watcher",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Watches Codex CLI sessions and emits visible messages for PING-PONG monitoring",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/config-capture",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Auto-capture API-fetched configuration values to AGENTS.md",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/context-compiler",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
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/context-discovery",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/context-manager",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Context Window Manager — prevents model context overflow via compaction and resume prompts (RFC-0010)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/cookie-sanitizer",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "pi-harness-runtime — cookie sanitizer (provider-quota cookie file normaliser)",
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": "1.1.147",
3
+ "version": "1.1.148",
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/dependency-analyzer",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/django-plugin",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Django framework analysis — models, management commands, settings",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/doc-generator",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Auto-Doc Generator — generate documentation from source code (RFC-0014)",
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": "1.1.147",
3
+ "version": "1.1.148",
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/evaluation-runner",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "description": "Framework-agnostic evaluation framework for AI outputs (RFC-0020)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/event-bus",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/event-store",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/experience-replay",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
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/feedback-collector",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "description": "Collect and aggregate human/automated feedback (RFC-0021)",
6
6
  "main": "dist/index.js",
@@ -0,0 +1,186 @@
1
+ // src/extension.ts
2
+ import * as fs from "fs";
3
+ var DEBUG_LOG = "/tmp/file-copy-helper-debug.log";
4
+ function debugLog(label, data) {
5
+ const timestamp = new Date().toISOString();
6
+ const entry = `[${timestamp}] ${label}: ${JSON.stringify(data, null, 2)}
7
+ `;
8
+ fs.appendFileSync(DEBUG_LOG, entry);
9
+ }
10
+ var COPY_KEYWORDS = ["mimic", "replicate", "clone"];
11
+ var COPY_DEST_CONTEXT = ["to ", "into ", "/dest/", "/target/", "over to"];
12
+ var COPY_SOURCE_CONTEXT = ["from ", "source", "/source/", "orig"];
13
+ var IMPORT_ERROR_TRIGGERS = [
14
+ "cannot find module",
15
+ "cannot resolve module",
16
+ "module not found",
17
+ "missing import"
18
+ ];
19
+ var COPY_CONTEXT = [
20
+ "sudo cp",
21
+ " cp ",
22
+ " cp\t",
23
+ "\bcps+-r",
24
+ "\bmimic\b",
25
+ "\bclone\b",
26
+ "\breplicate\b",
27
+ "\bdeploy\b"
28
+ ];
29
+ var COPY_RULE = `
30
+ ## COPY FILES DIRECTLY (CRITICAL)
31
+
32
+ When asked to mimic, copy, clone, or replicate files:
33
+
34
+ 1. **DO NOT read the source files** - just copy them directly
35
+ 2. **Run \`sudo cp\` immediately** - no reading needed
36
+ 3. **If files have different owners**, use sudo
37
+
38
+ Examples:
39
+ \`\`\`bash
40
+ # Copy single file
41
+ sudo cp /source/file.ts /dest/file.ts
42
+
43
+ # Copy entire folder
44
+ sudo cp -r /source/folder/ /dest/folder/
45
+
46
+ # Copy matching pattern
47
+ sudo cp /source/*.tsx /dest/
48
+ \`\`\`
49
+
50
+ **STOP**: Do NOT use \`read\`, \`expand\`, or \`cat\` on source files. Just copy.
51
+
52
+ **Why**: Reading wastes time. The source files are complete - copying preserves everything exactly.
53
+ `;
54
+ var IMPORT_ERROR_RULE = `
55
+ ## IMPORT ERRORS? COPY THOSE FILES TOO!
56
+
57
+ When you see import/module errors after copying a file:
58
+
59
+ 1. **STOP fixing imports one by one**
60
+ 2. **STOP rolling back**
61
+ 3. **LIST all missing import files** for the user
62
+ 4. **Ask user which to copy**, then copy them via sudo cp
63
+
64
+ Example:
65
+ \`\`\`bash
66
+ # If error shows missing:
67
+ # - @repo/auth/server
68
+ # - @repo/design-system/components/ui/sidebar
69
+ # - ./components/notifications-provider
70
+
71
+ # Then copy these files the same way:
72
+ sudo cp /source/path/@repo/auth/server.ts /dest/path/@repo/auth/server.ts
73
+ sudo cp -r /source/path/@repo/design-system/components/ui/sidebar /dest/path/@repo/design-system/components/ui/sidebar
74
+ sudo cp /source/path/components/notifications-provider.tsx /dest/path/components/notifications-provider.tsx
75
+ \`\`\`
76
+
77
+ **NEVER fix imports one by one** - copy the missing files instead!
78
+ **NEVER roll back** - keep the copied file and copy its dependencies!
79
+ `;
80
+ function shouldInjectCopyRule(text) {
81
+ const lower = text.toLowerCase();
82
+ const hasIntent = COPY_KEYWORDS.some((keyword) => lower.includes(keyword));
83
+ if (!hasIntent) {
84
+ return {
85
+ triggered: false,
86
+ reason: `No intent keyword found. Keywords: ${COPY_KEYWORDS.join(", ")}`
87
+ };
88
+ }
89
+ const hasDest = COPY_DEST_CONTEXT.some((ctx) => lower.includes(ctx));
90
+ if (!hasDest) {
91
+ return {
92
+ triggered: false,
93
+ reason: `No destination context found. Dest contexts: ${COPY_DEST_CONTEXT.join(", ")}`
94
+ };
95
+ }
96
+ const hasSource = COPY_SOURCE_CONTEXT.some((ctx) => lower.includes(ctx));
97
+ if (!hasSource) {
98
+ return {
99
+ triggered: false,
100
+ reason: `No source context found. Source contexts: ${COPY_SOURCE_CONTEXT.join(", ")}`
101
+ };
102
+ }
103
+ return {
104
+ triggered: true,
105
+ reason: `All conditions met: hasIntent=${hasIntent}, hasDest=${hasDest}, hasSource=${hasSource}`
106
+ };
107
+ }
108
+ function shouldInjectImportErrorRule(text) {
109
+ const lower = text.toLowerCase();
110
+ const hasImportError = IMPORT_ERROR_TRIGGERS.some((t) => lower.includes(t));
111
+ if (!hasImportError) {
112
+ return { triggered: false, reason: "No import error triggers found" };
113
+ }
114
+ const hasCopyContext = COPY_CONTEXT.some((ctx) => lower.includes(ctx));
115
+ if (!hasCopyContext) {
116
+ return { triggered: false, reason: "No copy/deploy intent found" };
117
+ }
118
+ return { triggered: true, reason: "Has import error + copy intent" };
119
+ }
120
+ function registerFileCopyHelper(pi) {
121
+ fs.writeFileSync(DEBUG_LOG, `[${new Date().toISOString()}] === DEBUG SESSION STARTED ===
122
+ `);
123
+ pi.on("input", (event) => {
124
+ debugLog("INPUT_EVENT", {
125
+ source: event.source,
126
+ textLength: event.text?.length,
127
+ textPreview: event.text?.substring(0, 200),
128
+ fullText: event.text
129
+ });
130
+ if (event.source !== "interactive") {
131
+ debugLog("SKIP", "not interactive input - skipping");
132
+ return;
133
+ }
134
+ const text = event.text.trim();
135
+ debugLog("PROCESSING_TEXT", {
136
+ text,
137
+ length: text.length,
138
+ hasMinLength: text.length >= 10
139
+ });
140
+ if (!text || text.length < 10) {
141
+ debugLog("SKIP", "text too short (< 10 chars)");
142
+ return;
143
+ }
144
+ const copyCheck = shouldInjectCopyRule(text);
145
+ debugLog("COPY_RULE_CHECK", {
146
+ triggered: copyCheck.triggered,
147
+ reason: copyCheck.reason,
148
+ matchingKeywords: COPY_KEYWORDS.filter((k) => text.toLowerCase().includes(k)),
149
+ matchingDest: COPY_DEST_CONTEXT.filter((ctx) => text.toLowerCase().includes(ctx)),
150
+ matchingSource: COPY_SOURCE_CONTEXT.filter((ctx) => text.toLowerCase().includes(ctx))
151
+ });
152
+ if (copyCheck.triggered) {
153
+ debugLog("INJECT", { rule: "COPY_RULE", reason: copyCheck.reason });
154
+ return {
155
+ action: "transform",
156
+ text: text + COPY_RULE
157
+ };
158
+ }
159
+ const importCheck = shouldInjectImportErrorRule(text);
160
+ debugLog("IMPORT_ERROR_CHECK", {
161
+ triggered: importCheck.triggered,
162
+ reason: importCheck.reason,
163
+ hasImportError: IMPORT_ERROR_TRIGGERS.some((t) => text.toLowerCase().includes(t)),
164
+ hasCopyContext: COPY_CONTEXT.some((ctx) => text.toLowerCase().includes(ctx))
165
+ });
166
+ if (importCheck.triggered) {
167
+ debugLog("INJECT", {
168
+ rule: "IMPORT_ERROR_RULE",
169
+ reason: importCheck.reason
170
+ });
171
+ return {
172
+ action: "transform",
173
+ text: text + IMPORT_ERROR_RULE
174
+ };
175
+ }
176
+ debugLog("NO_INJECTION", "no rule matched - passing through");
177
+ return;
178
+ });
179
+ }
180
+ function fileCopyHelperExtension(pi) {
181
+ registerFileCopyHelper(pi);
182
+ }
183
+ export {
184
+ registerFileCopyHelper,
185
+ fileCopyHelperExtension as default
186
+ };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/file-copy-helper",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Injects cp/sudo cp rule when user asks to mimic/copy files",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/framework-detector",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
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": "1.1.147",
3
+ "version": "1.1.148",
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/frappe-plugin",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Frappe/ERPNext framework analysis — DocTypes, hooks, bench sites, site config",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/generic-web-plugin",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Generic web framework analysis — REST/GraphQL endpoints, OpenAPI, auth",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/health-monitor",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "description": "Health monitoring and auto-healing",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/intent-analyzer",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/jev-judge",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Jev Judge - Structured decision model for agent routing, E2E testing, and automated decisions",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/knowledge-graph",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Knowledge Graph extraction and provenance linking for SKILL.md files",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/knowledge-retrieval",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Knowledge retrieval via TencentDB-Agent-Memory MCP (RFC-0105)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/laravel-plugin",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Laravel framework analysis — artisan commands, Eloquent models, Blade",
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": "1.1.147",
3
+ "version": "1.1.148",
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/mcp-adapter",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "type": "module",
5
5
  "description": "MCP server adapter for pi-harness — exposes harness capabilities as MCP tools/resources/prompts (RFC-0068)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/memory-engine",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
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/milestone-manager",
3
- "version": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Track milestones and alerts when items are at risk",
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": "1.1.147",
3
+ "version": "1.1.148",
4
4
  "description": "Model Registry for pi-harness-runtime — centralized model metadata with pricing",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",