@caupulican/pi-adaptative 0.84.1 → 0.85.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 (145) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/bundled-resources/extensions/tmux-agent-manager/index.d.ts.map +1 -1
  3. package/dist/bundled-resources/extensions/tmux-agent-manager/index.js +14 -8
  4. package/dist/bundled-resources/extensions/tmux-agent-manager/index.js.map +1 -1
  5. package/dist/bundled-resources/extensions/tmux-agent-manager/index.ts +14 -8
  6. package/dist/bundled-resources/skills/deduplicate-by-evidence/SKILL.md +7 -5
  7. package/dist/bundled-resources/skills/worker-profile-writer/SKILL.md +63 -0
  8. package/dist/core/autonomy/lane-tool-surface.d.ts.map +1 -1
  9. package/dist/core/autonomy/lane-tool-surface.js +4 -2
  10. package/dist/core/autonomy/lane-tool-surface.js.map +1 -1
  11. package/dist/core/background-lane-controller.d.ts +3 -0
  12. package/dist/core/background-lane-controller.d.ts.map +1 -1
  13. package/dist/core/background-lane-controller.js +6 -0
  14. package/dist/core/background-lane-controller.js.map +1 -1
  15. package/dist/core/default-tool-surface.d.ts.map +1 -1
  16. package/dist/core/default-tool-surface.js +1 -0
  17. package/dist/core/default-tool-surface.js.map +1 -1
  18. package/dist/core/delegation/worker-delegation-controller.d.ts +7 -0
  19. package/dist/core/delegation/worker-delegation-controller.d.ts.map +1 -1
  20. package/dist/core/delegation/worker-delegation-controller.js +28 -0
  21. package/dist/core/delegation/worker-delegation-controller.js.map +1 -1
  22. package/dist/core/delegation/worker-profile-resolver.d.ts +2 -0
  23. package/dist/core/delegation/worker-profile-resolver.d.ts.map +1 -1
  24. package/dist/core/delegation/worker-profile-resolver.js +46 -11
  25. package/dist/core/delegation/worker-profile-resolver.js.map +1 -1
  26. package/dist/core/doctor.d.ts +1 -1
  27. package/dist/core/doctor.d.ts.map +1 -1
  28. package/dist/core/doctor.js +5 -4
  29. package/dist/core/doctor.js.map +1 -1
  30. package/dist/core/model-capability.d.ts.map +1 -1
  31. package/dist/core/model-capability.js +1 -0
  32. package/dist/core/model-capability.js.map +1 -1
  33. package/dist/core/orchestration/lane-tool-manifests.d.ts +1 -1
  34. package/dist/core/orchestration/lane-tool-manifests.d.ts.map +1 -1
  35. package/dist/core/orchestration/lane-tool-manifests.js +6 -1
  36. package/dist/core/orchestration/lane-tool-manifests.js.map +1 -1
  37. package/dist/core/orchestration/session-task-profile-store.d.ts +31 -0
  38. package/dist/core/orchestration/session-task-profile-store.d.ts.map +1 -0
  39. package/dist/core/orchestration/session-task-profile-store.js +138 -0
  40. package/dist/core/orchestration/session-task-profile-store.js.map +1 -0
  41. package/dist/core/orchestration/task-profile-writer.d.ts +58 -0
  42. package/dist/core/orchestration/task-profile-writer.d.ts.map +1 -0
  43. package/dist/core/orchestration/task-profile-writer.js +165 -0
  44. package/dist/core/orchestration/task-profile-writer.js.map +1 -0
  45. package/dist/core/runtime-builder.d.ts +3 -1
  46. package/dist/core/runtime-builder.d.ts.map +1 -1
  47. package/dist/core/runtime-builder.js +14 -0
  48. package/dist/core/runtime-builder.js.map +1 -1
  49. package/dist/core/security/untrusted-boundary.d.ts.map +1 -1
  50. package/dist/core/security/untrusted-boundary.js +4 -6
  51. package/dist/core/security/untrusted-boundary.js.map +1 -1
  52. package/dist/core/session-role.d.ts.map +1 -1
  53. package/dist/core/session-role.js +1 -0
  54. package/dist/core/session-role.js.map +1 -1
  55. package/dist/core/system-prompt.d.ts.map +1 -1
  56. package/dist/core/system-prompt.js +21 -23
  57. package/dist/core/system-prompt.js.map +1 -1
  58. package/dist/core/tool-capability-policy.js +1 -1
  59. package/dist/core/tool-capability-policy.js.map +1 -1
  60. package/dist/core/tools/bash.d.ts +1 -6
  61. package/dist/core/tools/bash.d.ts.map +1 -1
  62. package/dist/core/tools/bash.js +2 -26
  63. package/dist/core/tools/bash.js.map +1 -1
  64. package/dist/core/tools/delegate.js +4 -4
  65. package/dist/core/tools/delegate.js.map +1 -1
  66. package/dist/core/tools/edit-diff.d.ts +32 -5
  67. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  68. package/dist/core/tools/edit-diff.js +137 -69
  69. package/dist/core/tools/edit-diff.js.map +1 -1
  70. package/dist/core/tools/edit.d.ts +22 -7
  71. package/dist/core/tools/edit.d.ts.map +1 -1
  72. package/dist/core/tools/edit.js +128 -55
  73. package/dist/core/tools/edit.js.map +1 -1
  74. package/dist/core/tools/file-mutation-intent.d.ts +70 -0
  75. package/dist/core/tools/file-mutation-intent.d.ts.map +1 -0
  76. package/dist/core/tools/file-mutation-intent.js +325 -0
  77. package/dist/core/tools/file-mutation-intent.js.map +1 -0
  78. package/dist/core/tools/goal.d.ts.map +1 -1
  79. package/dist/core/tools/goal.js +41 -18
  80. package/dist/core/tools/goal.js.map +1 -1
  81. package/dist/core/tools/index.d.ts +3 -1
  82. package/dist/core/tools/index.d.ts.map +1 -1
  83. package/dist/core/tools/index.js +31 -8
  84. package/dist/core/tools/index.js.map +1 -1
  85. package/dist/core/tools/profile-writer.d.ts +33 -0
  86. package/dist/core/tools/profile-writer.d.ts.map +1 -0
  87. package/dist/core/tools/profile-writer.js +67 -0
  88. package/dist/core/tools/profile-writer.js.map +1 -0
  89. package/dist/core/tools/task-steps.d.ts.map +1 -1
  90. package/dist/core/tools/task-steps.js +6 -11
  91. package/dist/core/tools/task-steps.js.map +1 -1
  92. package/dist/core/tools/tmux-dispatch.d.ts +2 -0
  93. package/dist/core/tools/tmux-dispatch.d.ts.map +1 -1
  94. package/dist/core/tools/tmux-dispatch.js +16 -2
  95. package/dist/core/tools/tmux-dispatch.js.map +1 -1
  96. package/dist/core/tools/write.d.ts +24 -7
  97. package/dist/core/tools/write.d.ts.map +1 -1
  98. package/dist/core/tools/write.js +182 -107
  99. package/dist/core/tools/write.js.map +1 -1
  100. package/dist/index.d.ts +1 -1
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +1 -1
  103. package/dist/index.js.map +1 -1
  104. package/dist/jscpd-cli.d.ts +3 -0
  105. package/dist/jscpd-cli.d.ts.map +1 -0
  106. package/dist/jscpd-cli.js +22 -0
  107. package/dist/jscpd-cli.js.map +1 -0
  108. package/dist/modes/interactive/components/profile-resource-editor.js +2 -2
  109. package/dist/modes/interactive/components/profile-resource-editor.js.map +1 -1
  110. package/dist/modes/interactive/components/tool-execution.d.ts +1 -0
  111. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  112. package/dist/modes/interactive/components/tool-execution.js +85 -3
  113. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  114. package/dist/modes/interactive/interactive-mode.js +1 -1
  115. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  116. package/dist/utils/bundled-jscpd.d.ts +20 -0
  117. package/dist/utils/bundled-jscpd.d.ts.map +1 -0
  118. package/dist/utils/bundled-jscpd.js +154 -0
  119. package/dist/utils/bundled-jscpd.js.map +1 -0
  120. package/dist/utils/shell.d.ts.map +1 -1
  121. package/dist/utils/shell.js +11 -0
  122. package/dist/utils/shell.js.map +1 -1
  123. package/dist/utils/tools-manager.d.ts +1 -1
  124. package/dist/utils/tools-manager.d.ts.map +1 -1
  125. package/dist/utils/tools-manager.js +22 -0
  126. package/dist/utils/tools-manager.js.map +1 -1
  127. package/docs/index.md +3 -0
  128. package/docs/managed-data-tools.md +15 -0
  129. package/docs/quickstart.md +2 -2
  130. package/docs/tool-boundary-performance-roadmap-2026-08-02.md +166 -0
  131. package/docs/tool-repair.md +1 -1
  132. package/docs/worker-profiles.md +16 -0
  133. package/examples/extensions/built-in-tool-renderer.ts +12 -5
  134. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  135. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  136. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  137. package/examples/extensions/minimal-mode.ts +8 -7
  138. package/examples/extensions/prompt-customizer.ts +4 -2
  139. package/examples/extensions/sandbox/package-lock.json +2 -2
  140. package/examples/extensions/sandbox/package.json +1 -1
  141. package/examples/extensions/ssh.ts +113 -24
  142. package/examples/extensions/with-deps/package-lock.json +2 -2
  143. package/examples/extensions/with-deps/package.json +1 -1
  144. package/npm-shrinkwrap.json +112 -12
  145. package/package.json +7 -5
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## [0.85.0] - 2026-08-02
2
+
3
+ ### Breaking Changes
4
+
5
+ - Changed `write` and `edit` to path-first `prepare`/`commit` protocols; `write` is now create-only, and custom file adapters must provide a shared mutation-intent controller plus `createFile` no-clobber semantics.
6
+
7
+ ### Added
8
+
9
+ - Added session-bounded exact-content references so successful writes and edits can copy unchanged bytes without retransmitting content.
10
+ - Added live and terminal elapsed time to every interactive tool panel, including read, Python, extension, error, and replay paths.
11
+ - Added `profile_writer` for immutable, session-branch-scoped worker profiles that can narrow owner-approved tools, resources, budgets, models, and thinking levels without writing profile files.
12
+ - Bundled the pinned Rust `jscpd` 5.0.14 scanner for every desktop release target and provisioned it only into Pi-managed storage.
13
+
14
+ ### Changed
15
+
16
+ - Edit commits can bind anchors to inclusive read-line ranges, prove uniqueness globally without occurrence arrays, and reuse a compact preview match plan and diff during execution.
17
+ - The core agent contract now treats the user's desired outcome as authoritative over suggested methods and requires evidence-backed disagreement when a method may undermine that outcome.
18
+ - Compacted the always-loaded core, goal, checklist, profile-writer, and trust-boundary instructions while preserving their behavioral and security invariants.
19
+
20
+ ### Fixed
21
+
22
+ - Rejected write collisions, missing edit targets, and stale prepared edits before mutation; non-UTF-8 edits now fail through the centralized change-approach workflow.
23
+ - Removed full edit-argument serialization from asynchronous TUI preview rendering.
24
+ - Bounded collapsed streamed write previews so growing content is neither rescanned nor fully split and highlighted on each update.
25
+ - Kept native delegation available when tmux is missing or unsupported, validated tmux before worktree/process side effects, and prevented regular agents from overriding the owner's worker profile at dispatch time.
26
+ - Kept base-profile delegation working with branch-unaware session adapters while explicitly blocking session task-profile persistence on that unsupported boundary.
27
+ - Kept local binary release packaging able to stamp the bundled jscpd version when dependency installation is intentionally skipped.
28
+
1
29
  ## [0.84.1] - 2026-08-02
2
30
 
3
31
  ## [0.84.0] - 2026-08-02
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bundled-resources/extensions/tmux-agent-manager/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,KAAK,YAAY,EAIjB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAmBN,KAAK,QAAQ,EAEb,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,QAAQ;IAAK,KAAK;CAA0B,CAAC;AAsG1D,KAAK,WAAW,GAAG;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AACF,KAAK,aAAa,GAAG;IAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC;AACtF,KAAK,aAAa,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,0GAA0G;IAC1G,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qGAAqG;IACrG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;yGACqG;IACrG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;4GACwG;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M,CAAC;IACpB,8GAA8G;IAC9G,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AACF;;gFAEgF;AAChF,KAAK,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,GAAG,aAAa,GAAG,iBAAiB,GAAG,QAAQ,CAAC,CAAC;AA2KlG,wBAAgB,2BAA2B,IAAI,MAAM,CAQpD;AA8YD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CA4GrE;AAmpCD,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAAE,EAAE,YAAY,QAoWjE"}
@@ -335,26 +335,30 @@ function formatDetection(d) {
335
335
  }
336
336
  function setupHelp(d) {
337
337
  if (d.cliAvailable)
338
- return `tmux CLI available: ${d.tmuxBin || "tmux"}\nUse tmux_agent_manager action=workspace_plan or fire_task. Set dryRun=true only when a preview is useful.`;
338
+ return `tmux CLI available: ${d.tmuxBin || "tmux"}\nUse native delegate for ordinary subagents. Use tmux_agent_manager only for an owner-requested persistent interactive pane; set dryRun=true only when a preview is useful.`;
339
339
  return [
340
340
  "tmux CLI not found.",
341
- "Install tmux for your environment, then reload Pi:",
341
+ "Ordinary subagents remain available through native delegate; do not abort delegation.",
342
+ "Install tmux only if persistent interactive provider panes are required, then reload Pi:",
342
343
  "- Debian/Ubuntu/WSL: sudo apt-get install tmux",
343
344
  "- Fedora: sudo dnf install tmux",
344
345
  "- Arch: sudo pacman -S tmux",
345
346
  "- macOS: brew install tmux",
346
- "- Windows: use WSL/MSYS2/Cygwin where a real tmux binary is available on PATH.",
347
+ "- Native Windows: use native delegate. WSL may use tmux when it is installed on PATH.",
347
348
  "cmux is macOS-only and intentionally not used by this tmux manager.",
348
349
  ].join("\n");
349
350
  }
350
351
  async function guardTmux(_ctx, detection, purpose) {
351
352
  if (detection.cliAvailable)
352
353
  return { allowed: true, text: `tmux available for ${purpose}.` };
353
- return { allowed: false, text: `${setupHelp(detection)}\n\nCannot run tmux-managed work until tmux is on PATH.` };
354
+ return {
355
+ allowed: false,
356
+ text: `${setupHelp(detection)}\n\nTmux route unavailable. Continue ordinary subagent work with native delegate.`,
357
+ };
354
358
  }
355
359
  function tmuxManagerInstructions(toolName, detection) {
356
360
  return [
357
- `tmux is available (${detection.version || detection.tmuxBin || "tmux"}). For managed ${toolName} work, use tmux_agent_manager instead of direct foreground/background dispatch.`,
361
+ `tmux is available (${detection.version || detection.tmuxBin || "tmux"}). Native delegate remains the standard subagent route. Use tmux_agent_manager for managed ${toolName} panes only when the owner explicitly requested persistent interactive provider processes.`,
358
362
  "Suggested next call:",
359
363
  'tmux_agent_manager({ action: "fire_task", teamTemplate: "builder-validator", task: "<objective>" })',
360
364
  "The launch returns immediately after panes, event watchers, and prompt handoffs are armed.",
@@ -1888,10 +1892,12 @@ export default function tmuxAgentManagerExtension(pi) {
1888
1892
  pi.registerTool({
1889
1893
  name: "tmux_agent_manager",
1890
1894
  label: "tmux Agent Manager",
1891
- description: "tmux-exclusive interactive agent/workspace manager for Windows/Linux/macOS environments where tmux is on PATH. Opens real provider CLIs in panes, injects prompts, captures output, and replaces cmux outside iOS/macOS cmux use.",
1892
- promptSnippet: "Use tmux to launch managed interactive agent/provider panes with prompt injection, captured output, completion markers, shared variables, and final notifications.",
1895
+ description: "Specialized tmux-backed interactive provider/workspace manager. Native delegate is the standard cross-platform subagent path. Use this tool only when the owner explicitly requests persistent interactive CLI panes and tmux is available.",
1896
+ promptSnippet: "Use native delegate for ordinary subagents. Use tmux only for owner-requested persistent interactive provider panes after action=guard confirms availability.",
1893
1897
  promptGuidelines: [
1894
- "Use tmux_agent_manager for Windows/Linux tmux-managed workers. Do not use cmux on Windows/Linux; cmux is macOS-only and manual-disabled there.",
1898
+ "Use native delegate/delegate_status for ordinary subagent work on every OS. Use tmux_agent_manager only when the owner explicitly requests persistent interactive provider panes and action=guard confirms tmux is available.",
1899
+ "On native Windows, do not attempt tmux dispatch. Native delegate is the supported backend; WSL may use tmux only when installed and explicitly requested.",
1900
+ "Never create or edit orchestration profiles during dispatch; native delegation's owner-configured profile resolver is authoritative.",
1895
1901
  "Prefer action=fire_task for interactive worker batches. It returns after event watchers and prompts are armed; do not wait, poll, or peek for completion.",
1896
1902
  "Use action=list_templates/show_template before assembling repeated teams; pass teamTemplate when a built-in team fits.",
1897
1903
  "Use action=workspace_plan before launch_workspace when designing a pane layout.",