@caupulican/pi-adaptative 0.80.86 → 0.80.89

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 (353) hide show
  1. package/CHANGELOG.md +178 -0
  2. package/dist/core/agent-session.d.ts +412 -1
  3. package/dist/core/agent-session.d.ts.map +1 -1
  4. package/dist/core/agent-session.js +2053 -41
  5. package/dist/core/agent-session.js.map +1 -1
  6. package/dist/core/autonomy/approval-gate.d.ts +4 -0
  7. package/dist/core/autonomy/approval-gate.d.ts.map +1 -0
  8. package/dist/core/autonomy/approval-gate.js +27 -0
  9. package/dist/core/autonomy/approval-gate.js.map +1 -0
  10. package/dist/core/autonomy/bounded-completion.d.ts +27 -0
  11. package/dist/core/autonomy/bounded-completion.d.ts.map +1 -0
  12. package/dist/core/autonomy/bounded-completion.js +44 -0
  13. package/dist/core/autonomy/bounded-completion.js.map +1 -0
  14. package/dist/core/autonomy/contracts.d.ts +129 -0
  15. package/dist/core/autonomy/contracts.d.ts.map +1 -0
  16. package/dist/core/autonomy/contracts.js +2 -0
  17. package/dist/core/autonomy/contracts.js.map +1 -0
  18. package/dist/core/autonomy/gates.d.ts +15 -0
  19. package/dist/core/autonomy/gates.d.ts.map +1 -0
  20. package/dist/core/autonomy/gates.js +205 -0
  21. package/dist/core/autonomy/gates.js.map +1 -0
  22. package/dist/core/autonomy/lane-tracker.d.ts +48 -0
  23. package/dist/core/autonomy/lane-tracker.d.ts.map +1 -0
  24. package/dist/core/autonomy/lane-tracker.js +125 -0
  25. package/dist/core/autonomy/lane-tracker.js.map +1 -0
  26. package/dist/core/autonomy/path-scope.d.ts +9 -0
  27. package/dist/core/autonomy/path-scope.d.ts.map +1 -0
  28. package/dist/core/autonomy/path-scope.js +122 -0
  29. package/dist/core/autonomy/path-scope.js.map +1 -0
  30. package/dist/core/autonomy/risk-assessment.d.ts +3 -0
  31. package/dist/core/autonomy/risk-assessment.d.ts.map +1 -0
  32. package/dist/core/autonomy/risk-assessment.js +122 -0
  33. package/dist/core/autonomy/risk-assessment.js.map +1 -0
  34. package/dist/core/autonomy/session-lane-record.d.ts +10 -0
  35. package/dist/core/autonomy/session-lane-record.d.ts.map +1 -0
  36. package/dist/core/autonomy/session-lane-record.js +36 -0
  37. package/dist/core/autonomy/session-lane-record.js.map +1 -0
  38. package/dist/core/autonomy/status.d.ts +40 -0
  39. package/dist/core/autonomy/status.d.ts.map +1 -0
  40. package/dist/core/autonomy/status.js +107 -0
  41. package/dist/core/autonomy/status.js.map +1 -0
  42. package/dist/core/autonomy/subagent-prompt.d.ts +21 -0
  43. package/dist/core/autonomy/subagent-prompt.d.ts.map +1 -0
  44. package/dist/core/autonomy/subagent-prompt.js +28 -0
  45. package/dist/core/autonomy/subagent-prompt.js.map +1 -0
  46. package/dist/core/autonomy/telemetry-events.d.ts +18 -0
  47. package/dist/core/autonomy/telemetry-events.d.ts.map +1 -0
  48. package/dist/core/autonomy/telemetry-events.js +60 -0
  49. package/dist/core/autonomy/telemetry-events.js.map +1 -0
  50. package/dist/core/context/artifact-retrieval.d.ts +49 -0
  51. package/dist/core/context/artifact-retrieval.d.ts.map +1 -0
  52. package/dist/core/context/artifact-retrieval.js +49 -0
  53. package/dist/core/context/artifact-retrieval.js.map +1 -0
  54. package/dist/core/context/brain-curator.d.ts +88 -0
  55. package/dist/core/context/brain-curator.d.ts.map +1 -0
  56. package/dist/core/context/brain-curator.js +192 -0
  57. package/dist/core/context/brain-curator.js.map +1 -0
  58. package/dist/core/context/context-artifacts.d.ts +94 -0
  59. package/dist/core/context/context-artifacts.d.ts.map +1 -0
  60. package/dist/core/context/context-artifacts.js +307 -0
  61. package/dist/core/context/context-artifacts.js.map +1 -0
  62. package/dist/core/context/context-audit.d.ts +66 -0
  63. package/dist/core/context/context-audit.d.ts.map +1 -0
  64. package/dist/core/context/context-audit.js +173 -0
  65. package/dist/core/context/context-audit.js.map +1 -0
  66. package/dist/core/context/context-composition.d.ts +122 -0
  67. package/dist/core/context/context-composition.d.ts.map +1 -0
  68. package/dist/core/context/context-composition.js +163 -0
  69. package/dist/core/context/context-composition.js.map +1 -0
  70. package/dist/core/context/context-item.d.ts +117 -0
  71. package/dist/core/context/context-item.d.ts.map +1 -0
  72. package/dist/core/context/context-item.js +36 -0
  73. package/dist/core/context/context-item.js.map +1 -0
  74. package/dist/core/context/context-prompt-enforcement.d.ts +86 -0
  75. package/dist/core/context/context-prompt-enforcement.d.ts.map +1 -0
  76. package/dist/core/context/context-prompt-enforcement.js +168 -0
  77. package/dist/core/context/context-prompt-enforcement.js.map +1 -0
  78. package/dist/core/context/context-prompt-policy.d.ts +90 -0
  79. package/dist/core/context/context-prompt-policy.d.ts.map +1 -0
  80. package/dist/core/context/context-prompt-policy.js +73 -0
  81. package/dist/core/context/context-prompt-policy.js.map +1 -0
  82. package/dist/core/context/context-retention.d.ts +36 -0
  83. package/dist/core/context/context-retention.d.ts.map +1 -0
  84. package/dist/core/context/context-retention.js +108 -0
  85. package/dist/core/context/context-retention.js.map +1 -0
  86. package/dist/core/context/context-store.d.ts +37 -0
  87. package/dist/core/context/context-store.d.ts.map +1 -0
  88. package/dist/core/context/context-store.js +45 -0
  89. package/dist/core/context/context-store.js.map +1 -0
  90. package/dist/core/context/memory-diagnostics.d.ts +50 -0
  91. package/dist/core/context/memory-diagnostics.d.ts.map +1 -0
  92. package/dist/core/context/memory-diagnostics.js +43 -0
  93. package/dist/core/context/memory-diagnostics.js.map +1 -0
  94. package/dist/core/context/memory-index-store.d.ts +28 -0
  95. package/dist/core/context/memory-index-store.d.ts.map +1 -0
  96. package/dist/core/context/memory-index-store.js +38 -0
  97. package/dist/core/context/memory-index-store.js.map +1 -0
  98. package/dist/core/context/memory-prompt-block.d.ts +34 -0
  99. package/dist/core/context/memory-prompt-block.d.ts.map +1 -0
  100. package/dist/core/context/memory-prompt-block.js +58 -0
  101. package/dist/core/context/memory-prompt-block.js.map +1 -0
  102. package/dist/core/context/memory-provider-contract.d.ts +114 -0
  103. package/dist/core/context/memory-provider-contract.d.ts.map +1 -0
  104. package/dist/core/context/memory-provider-contract.js +121 -0
  105. package/dist/core/context/memory-provider-contract.js.map +1 -0
  106. package/dist/core/context/memory-retrieval.d.ts +27 -0
  107. package/dist/core/context/memory-retrieval.d.ts.map +1 -0
  108. package/dist/core/context/memory-retrieval.js +91 -0
  109. package/dist/core/context/memory-retrieval.js.map +1 -0
  110. package/dist/core/context/okf-memory-provider.d.ts +26 -0
  111. package/dist/core/context/okf-memory-provider.d.ts.map +1 -0
  112. package/dist/core/context/okf-memory-provider.js +154 -0
  113. package/dist/core/context/okf-memory-provider.js.map +1 -0
  114. package/dist/core/context/okf-memory.d.ts +42 -0
  115. package/dist/core/context/okf-memory.d.ts.map +1 -0
  116. package/dist/core/context/okf-memory.js +175 -0
  117. package/dist/core/context/okf-memory.js.map +1 -0
  118. package/dist/core/context/policy-engine.d.ts +66 -0
  119. package/dist/core/context/policy-engine.d.ts.map +1 -0
  120. package/dist/core/context/policy-engine.js +171 -0
  121. package/dist/core/context/policy-engine.js.map +1 -0
  122. package/dist/core/context/policy-types.d.ts +102 -0
  123. package/dist/core/context/policy-types.d.ts.map +1 -0
  124. package/dist/core/context/policy-types.js +7 -0
  125. package/dist/core/context/policy-types.js.map +1 -0
  126. package/dist/core/context/sqlite-runtime-index.d.ts +19 -0
  127. package/dist/core/context/sqlite-runtime-index.d.ts.map +1 -0
  128. package/dist/core/context/sqlite-runtime-index.js +344 -0
  129. package/dist/core/context/sqlite-runtime-index.js.map +1 -0
  130. package/dist/core/context/storage-authority.d.ts +20 -0
  131. package/dist/core/context/storage-authority.d.ts.map +1 -0
  132. package/dist/core/context/storage-authority.js +51 -0
  133. package/dist/core/context/storage-authority.js.map +1 -0
  134. package/dist/core/context/tool-output-packer.d.ts +75 -0
  135. package/dist/core/context/tool-output-packer.d.ts.map +1 -0
  136. package/dist/core/context/tool-output-packer.js +77 -0
  137. package/dist/core/context/tool-output-packer.js.map +1 -0
  138. package/dist/core/context-gc.d.ts +13 -0
  139. package/dist/core/context-gc.d.ts.map +1 -1
  140. package/dist/core/context-gc.js +6 -0
  141. package/dist/core/context-gc.js.map +1 -1
  142. package/dist/core/cost/session-usage.d.ts +20 -0
  143. package/dist/core/cost/session-usage.d.ts.map +1 -0
  144. package/dist/core/cost/session-usage.js +164 -0
  145. package/dist/core/cost/session-usage.js.map +1 -0
  146. package/dist/core/delegation/session-worker-result.d.ts +10 -0
  147. package/dist/core/delegation/session-worker-result.d.ts.map +1 -0
  148. package/dist/core/delegation/session-worker-result.js +36 -0
  149. package/dist/core/delegation/session-worker-result.js.map +1 -0
  150. package/dist/core/delegation/worker-result.d.ts +9 -0
  151. package/dist/core/delegation/worker-result.d.ts.map +1 -0
  152. package/dist/core/delegation/worker-result.js +152 -0
  153. package/dist/core/delegation/worker-result.js.map +1 -0
  154. package/dist/core/delegation/worker-runner.d.ts +58 -0
  155. package/dist/core/delegation/worker-runner.d.ts.map +1 -0
  156. package/dist/core/delegation/worker-runner.js +188 -0
  157. package/dist/core/delegation/worker-runner.js.map +1 -0
  158. package/dist/core/extensions/builtin.d.ts +5 -1
  159. package/dist/core/extensions/builtin.d.ts.map +1 -1
  160. package/dist/core/extensions/builtin.js +23 -1
  161. package/dist/core/extensions/builtin.js.map +1 -1
  162. package/dist/core/footer-data-provider.d.ts +5 -1
  163. package/dist/core/footer-data-provider.d.ts.map +1 -1
  164. package/dist/core/footer-data-provider.js +13 -0
  165. package/dist/core/footer-data-provider.js.map +1 -1
  166. package/dist/core/goals/goal-continuation-controller.d.ts +22 -0
  167. package/dist/core/goals/goal-continuation-controller.d.ts.map +1 -0
  168. package/dist/core/goals/goal-continuation-controller.js +88 -0
  169. package/dist/core/goals/goal-continuation-controller.js.map +1 -0
  170. package/dist/core/goals/goal-continuation-defaults.d.ts +10 -0
  171. package/dist/core/goals/goal-continuation-defaults.d.ts.map +1 -0
  172. package/dist/core/goals/goal-continuation-defaults.js +10 -0
  173. package/dist/core/goals/goal-continuation-defaults.js.map +1 -0
  174. package/dist/core/goals/goal-continuation-prompt.d.ts +18 -0
  175. package/dist/core/goals/goal-continuation-prompt.d.ts.map +1 -0
  176. package/dist/core/goals/goal-continuation-prompt.js +141 -0
  177. package/dist/core/goals/goal-continuation-prompt.js.map +1 -0
  178. package/dist/core/goals/goal-runtime-snapshot.d.ts +19 -0
  179. package/dist/core/goals/goal-runtime-snapshot.d.ts.map +1 -0
  180. package/dist/core/goals/goal-runtime-snapshot.js +23 -0
  181. package/dist/core/goals/goal-runtime-snapshot.js.map +1 -0
  182. package/dist/core/goals/goal-state.d.ts +87 -0
  183. package/dist/core/goals/goal-state.d.ts.map +1 -0
  184. package/dist/core/goals/goal-state.js +259 -0
  185. package/dist/core/goals/goal-state.js.map +1 -0
  186. package/dist/core/goals/goal-tool-core.d.ts +66 -0
  187. package/dist/core/goals/goal-tool-core.d.ts.map +1 -0
  188. package/dist/core/goals/goal-tool-core.js +146 -0
  189. package/dist/core/goals/goal-tool-core.js.map +1 -0
  190. package/dist/core/goals/session-goal-state.d.ts +10 -0
  191. package/dist/core/goals/session-goal-state.d.ts.map +1 -0
  192. package/dist/core/goals/session-goal-state.js +35 -0
  193. package/dist/core/goals/session-goal-state.js.map +1 -0
  194. package/dist/core/learning/learning-audit.d.ts +45 -0
  195. package/dist/core/learning/learning-audit.d.ts.map +1 -0
  196. package/dist/core/learning/learning-audit.js +139 -0
  197. package/dist/core/learning/learning-audit.js.map +1 -0
  198. package/dist/core/learning/learning-gate.d.ts +29 -0
  199. package/dist/core/learning/learning-gate.d.ts.map +1 -0
  200. package/dist/core/learning/learning-gate.js +150 -0
  201. package/dist/core/learning/learning-gate.js.map +1 -0
  202. package/dist/core/learning/session-learning-decision.d.ts +10 -0
  203. package/dist/core/learning/session-learning-decision.d.ts.map +1 -0
  204. package/dist/core/learning/session-learning-decision.js +36 -0
  205. package/dist/core/learning/session-learning-decision.js.map +1 -0
  206. package/dist/core/model-capability.d.ts +41 -0
  207. package/dist/core/model-capability.d.ts.map +1 -0
  208. package/dist/core/model-capability.js +101 -0
  209. package/dist/core/model-capability.js.map +1 -0
  210. package/dist/core/model-router/config-diagnostics.d.ts.map +1 -1
  211. package/dist/core/model-router/config-diagnostics.js +1 -0
  212. package/dist/core/model-router/config-diagnostics.js.map +1 -1
  213. package/dist/core/model-router/intent-classifier.d.ts +2 -0
  214. package/dist/core/model-router/intent-classifier.d.ts.map +1 -1
  215. package/dist/core/model-router/intent-classifier.js +154 -9
  216. package/dist/core/model-router/intent-classifier.js.map +1 -1
  217. package/dist/core/model-router/route-judge.d.ts +54 -0
  218. package/dist/core/model-router/route-judge.d.ts.map +1 -0
  219. package/dist/core/model-router/route-judge.js +128 -0
  220. package/dist/core/model-router/route-judge.js.map +1 -0
  221. package/dist/core/model-router/status.d.ts +4 -1
  222. package/dist/core/model-router/status.d.ts.map +1 -1
  223. package/dist/core/model-router/status.js +30 -6
  224. package/dist/core/model-router/status.js.map +1 -1
  225. package/dist/core/model-router/tool-escalation.d.ts +4 -6
  226. package/dist/core/model-router/tool-escalation.d.ts.map +1 -1
  227. package/dist/core/model-router/tool-escalation.js +1 -1
  228. package/dist/core/model-router/tool-escalation.js.map +1 -1
  229. package/dist/core/models/fitness-store.d.ts +40 -0
  230. package/dist/core/models/fitness-store.d.ts.map +1 -0
  231. package/dist/core/models/fitness-store.js +61 -0
  232. package/dist/core/models/fitness-store.js.map +1 -0
  233. package/dist/core/profile-registry.d.ts.map +1 -1
  234. package/dist/core/profile-registry.js +1 -1
  235. package/dist/core/profile-registry.js.map +1 -1
  236. package/dist/core/prompt-templates.d.ts +2 -0
  237. package/dist/core/prompt-templates.d.ts.map +1 -1
  238. package/dist/core/prompt-templates.js +12 -4
  239. package/dist/core/prompt-templates.js.map +1 -1
  240. package/dist/core/research/automata-provider.d.ts +5 -0
  241. package/dist/core/research/automata-provider.d.ts.map +1 -0
  242. package/dist/core/research/automata-provider.js +15 -0
  243. package/dist/core/research/automata-provider.js.map +1 -0
  244. package/dist/core/research/evidence-bundle.d.ts +10 -0
  245. package/dist/core/research/evidence-bundle.d.ts.map +1 -0
  246. package/dist/core/research/evidence-bundle.js +116 -0
  247. package/dist/core/research/evidence-bundle.js.map +1 -0
  248. package/dist/core/research/model-fitness.d.ts +82 -0
  249. package/dist/core/research/model-fitness.d.ts.map +1 -0
  250. package/dist/core/research/model-fitness.js +308 -0
  251. package/dist/core/research/model-fitness.js.map +1 -0
  252. package/dist/core/research/research-gate.d.ts +11 -0
  253. package/dist/core/research/research-gate.d.ts.map +1 -0
  254. package/dist/core/research/research-gate.js +82 -0
  255. package/dist/core/research/research-gate.js.map +1 -0
  256. package/dist/core/research/research-runner.d.ts +59 -0
  257. package/dist/core/research/research-runner.d.ts.map +1 -0
  258. package/dist/core/research/research-runner.js +155 -0
  259. package/dist/core/research/research-runner.js.map +1 -0
  260. package/dist/core/research/session-evidence-bundle.d.ts +11 -0
  261. package/dist/core/research/session-evidence-bundle.d.ts.map +1 -0
  262. package/dist/core/research/session-evidence-bundle.js +55 -0
  263. package/dist/core/research/session-evidence-bundle.js.map +1 -0
  264. package/dist/core/resource-loader.d.ts.map +1 -1
  265. package/dist/core/resource-loader.js +4 -0
  266. package/dist/core/resource-loader.js.map +1 -1
  267. package/dist/core/settings-manager.d.ts +160 -4
  268. package/dist/core/settings-manager.d.ts.map +1 -1
  269. package/dist/core/settings-manager.js +304 -9
  270. package/dist/core/settings-manager.js.map +1 -1
  271. package/dist/core/skills.d.ts +4 -0
  272. package/dist/core/skills.d.ts.map +1 -1
  273. package/dist/core/skills.js +18 -6
  274. package/dist/core/skills.js.map +1 -1
  275. package/dist/core/slash-commands.d.ts.map +1 -1
  276. package/dist/core/slash-commands.js +10 -1
  277. package/dist/core/slash-commands.js.map +1 -1
  278. package/dist/core/toolkit/script-registry.d.ts +34 -0
  279. package/dist/core/toolkit/script-registry.d.ts.map +1 -0
  280. package/dist/core/toolkit/script-registry.js +71 -0
  281. package/dist/core/toolkit/script-registry.js.map +1 -0
  282. package/dist/core/toolkit/script-runner.d.ts +28 -0
  283. package/dist/core/toolkit/script-runner.d.ts.map +1 -0
  284. package/dist/core/toolkit/script-runner.js +48 -0
  285. package/dist/core/toolkit/script-runner.js.map +1 -0
  286. package/dist/core/tools/artifact-retrieve.d.ts +23 -0
  287. package/dist/core/tools/artifact-retrieve.d.ts.map +1 -0
  288. package/dist/core/tools/artifact-retrieve.js +110 -0
  289. package/dist/core/tools/artifact-retrieve.js.map +1 -0
  290. package/dist/core/tools/delegate.d.ts +32 -0
  291. package/dist/core/tools/delegate.d.ts.map +1 -0
  292. package/dist/core/tools/delegate.js +60 -0
  293. package/dist/core/tools/delegate.js.map +1 -0
  294. package/dist/core/tools/fff-search-backend.d.ts +103 -0
  295. package/dist/core/tools/fff-search-backend.d.ts.map +1 -0
  296. package/dist/core/tools/fff-search-backend.js +151 -0
  297. package/dist/core/tools/fff-search-backend.js.map +1 -0
  298. package/dist/core/tools/find.d.ts +21 -1
  299. package/dist/core/tools/find.d.ts.map +1 -1
  300. package/dist/core/tools/find.js +183 -10
  301. package/dist/core/tools/find.js.map +1 -1
  302. package/dist/core/tools/goal.d.ts +35 -0
  303. package/dist/core/tools/goal.d.ts.map +1 -0
  304. package/dist/core/tools/goal.js +122 -0
  305. package/dist/core/tools/goal.js.map +1 -0
  306. package/dist/core/tools/grep.d.ts +21 -1
  307. package/dist/core/tools/grep.d.ts.map +1 -1
  308. package/dist/core/tools/grep.js +272 -27
  309. package/dist/core/tools/grep.js.map +1 -1
  310. package/dist/core/tools/index.d.ts +4 -1
  311. package/dist/core/tools/index.d.ts.map +1 -1
  312. package/dist/core/tools/index.js +9 -0
  313. package/dist/core/tools/index.js.map +1 -1
  314. package/dist/core/tools/model-fitness.d.ts +30 -0
  315. package/dist/core/tools/model-fitness.d.ts.map +1 -0
  316. package/dist/core/tools/model-fitness.js +38 -0
  317. package/dist/core/tools/model-fitness.js.map +1 -0
  318. package/dist/core/tools/run-toolkit-script.d.ts +24 -0
  319. package/dist/core/tools/run-toolkit-script.d.ts.map +1 -0
  320. package/dist/core/tools/run-toolkit-script.js +103 -0
  321. package/dist/core/tools/run-toolkit-script.js.map +1 -0
  322. package/dist/core/tools/search-router.d.ts +75 -0
  323. package/dist/core/tools/search-router.d.ts.map +1 -0
  324. package/dist/core/tools/search-router.js +85 -0
  325. package/dist/core/tools/search-router.js.map +1 -0
  326. package/dist/modes/interactive/components/fitness-role-selector.d.ts +13 -0
  327. package/dist/modes/interactive/components/fitness-role-selector.d.ts.map +1 -0
  328. package/dist/modes/interactive/components/fitness-role-selector.js +65 -0
  329. package/dist/modes/interactive/components/fitness-role-selector.js.map +1 -0
  330. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  331. package/dist/modes/interactive/components/footer.js +18 -16
  332. package/dist/modes/interactive/components/footer.js.map +1 -1
  333. package/dist/modes/interactive/components/settings-selector.d.ts +16 -1
  334. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  335. package/dist/modes/interactive/components/settings-selector.js +555 -11
  336. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  337. package/dist/modes/interactive/interactive-mode.d.ts +9 -0
  338. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  339. package/dist/modes/interactive/interactive-mode.js +308 -39
  340. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  341. package/dist/utils/tools-manager.d.ts +2 -0
  342. package/dist/utils/tools-manager.d.ts.map +1 -1
  343. package/dist/utils/tools-manager.js +154 -2
  344. package/dist/utils/tools-manager.js.map +1 -1
  345. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  346. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  347. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  348. package/examples/extensions/sandbox/package-lock.json +2 -2
  349. package/examples/extensions/sandbox/package.json +1 -1
  350. package/examples/extensions/with-deps/package-lock.json +2 -2
  351. package/examples/extensions/with-deps/package.json +1 -1
  352. package/npm-shrinkwrap.json +368 -12
  353. package/package.json +5 -4
package/CHANGELOG.md CHANGED
@@ -1,3 +1,157 @@
1
+ ## [0.80.89] - 2026-07-02
2
+
3
+ ### Added
4
+
5
+ - Added the brain-assisted context curator (opt-in `contextPolicy.curation` settings + Settings ->
6
+ Context Curation submenu): a local-model sidecar that (a) writes 1-2 line semantic digests into
7
+ Context GC's packed stubs so the main model stops re-running tools to rediscover packed content,
8
+ and (b) scores stale artifact-backed tool outputs against the current goal so the prompt-policy
9
+ enforcement pilot can evict irrelevant content earlier. Advisories are asymmetric by design: a
10
+ verdict can only ever shrink the prompt, never keep or stub protected content, and every consumer
11
+ behaves identically when a result is absent. Curation jobs are queued/bounded/idempotent, drain
12
+ off-turn through the isolated-completion path with spawned-usage accounting, and persist auditable
13
+ session records. The curator refuses models that have not PASSED the new `digest` fitness surface
14
+ on this host (visible skip reasons, never silent degradation).
15
+ - Added a `digest` surface to the `model_fitness` probe: chunks carry nonce identifiers, and a
16
+ digest only scores as faithful when strict JSON parses AND the nonce survives verbatim — measuring
17
+ extraction fidelity, not narration.
18
+ - Added `/context`, a user-facing context composition dashboard decomposing what rides on EVERY
19
+ request: system prompt tokens, per-tool schema costs (heaviest first), per-extension contributions,
20
+ message classes (raw vs GC-packed vs policy-stubbed vs memory recall pages), GC/enforcement/curation
21
+ activity, spawned background spend, and provider-reported vs estimated deltas — plus actionable
22
+ observations (e.g. an oversized tool schema riding on every request) for users building their own
23
+ pi integrations.
24
+ - Added `/fitness [model] [trials]` as a first-class, discoverable command: with no arguments it
25
+ opens the model picker, runs the probe on the selection, shows the six-surface report, and then
26
+ offers ONE-STEP role assignment — context curator, router cheap/medium/expensive tier, routing
27
+ judge, or learning model — writing the matching settings for you (with a hint when the model
28
+ router itself is still disabled). With an explicit model it behaves like `/autonomy fitness`.
29
+
30
+ ## [0.80.88] - 2026-07-02
31
+
32
+ ## [0.80.87] - 2026-07-02
33
+
34
+ ### Added
35
+
36
+ - Added an opt-in Context / Prompt Policy setting that stubs stale, artifact-backed grep/find tool output
37
+ in the model-visible prompt only (never the transcript) once configured retention-window and character
38
+ thresholds are exceeded. Configurable via the Context / Prompt Policy settings submenu; default disabled.
39
+ - Added an opt-in Context / Memory Retrieval setting that searches local Pi OKF memory documents each turn
40
+ and can optionally surface a bounded, source-labeled evidence block in the model prompt (never the
41
+ transcript). Configurable via the Context / Memory Retrieval settings submenu, including a separate
42
+ "Include in prompt" toggle; both default disabled, and retrieval only ever queries the local provider.
43
+ - Extended `context_audit` with a compact Memory retrieval / Prompt inclusion diagnostic section reporting
44
+ status and counts for the two settings above, without exposing any memory content, query text, or file
45
+ paths.
46
+ - Added a `goal` tool that records the durable goal ledger (goal, requirements, evidence, and
47
+ progress/stall events) as session-persisted snapshots. This is the producer that drives the bounded
48
+ goal continuation loop and `/goal-continue`; without it the continuation runtime always read empty
49
+ state and could not continue. The tool is active by default and maps to the `memory_write` capability.
50
+ - Added `/autonomy diagnostics`, an effectiveness dashboard summarizing recent model-router decisions,
51
+ current/spawned/daily cost totals, and, when present, the latest research, worker-delegation,
52
+ learning, and goal activity. It is additive to `/autonomy [status|off|safe|balanced|full]`.
53
+ - Added the autonomous research lane runtime: an opt-in, read-only background research pass that runs
54
+ when the session goes idle with an active goal that has open requirements, executes one bounded
55
+ isolated completion through the (unwired-until-now) research capability/budget gate, and persists a
56
+ provenance-tagged evidence bundle plus a terminal lane record. Budgets cover cost per pass,
57
+ wall-clock time, findings/sources caps, and idle runs per session; failures/skips are recorded with
58
+ reason codes and never block or prompt the foreground. Research spend reports through spawned-usage
59
+ accounting with an idempotent per-lane report id. Configurable via the new Research Lane settings
60
+ submenu (default disabled; also requires autonomy mode on); `/autonomy research` triggers an
61
+ explicit pass. Live lanes now feed the previously-unset `activeLaneCount` in `/autonomy status`
62
+ snapshots, and `/autonomy diagnostics` shows research lane records, all evidence bundles, and the
63
+ last skip reason.
64
+ - Added the bounded worker-delegation runtime piloting read-only scout workers: a new `delegate`
65
+ tool (active by default, mapped to the `delegate` capability, refusing with a reason until the
66
+ Worker Delegation setting is enabled) lets the foreground model hand one self-contained analysis
67
+ task to a worker running as a bounded isolated completion on a cheap model lane under a stripped
68
+ read-only envelope. Every result is validated through the existing `validateWorkerResult` parent
69
+ gate before acceptance, persisted as a worker-result snapshot plus a terminal lane record, marked
70
+ untrusted in the tool output, and cost-reported through spawned-usage accounting with an
71
+ idempotent per-lane report id. Budgets cover cost per worker and wall-clock time; delegation
72
+ lanes appear in `/autonomy diagnostics` and count toward the live `activeLaneCount`.
73
+ - Added the learning apply/audit/rollback policy runtime: reflection-sourced durable writes now
74
+ route through the (previously unwired) learning gate, persist a `LearningDecision` snapshot per
75
+ write, and leave an audit record with a concrete rollback plan for every applied or proposed
76
+ change. With the new Learning Policy settings disabled (default) the legacy direct-apply
77
+ behavior is preserved — now fully audited; when enabled, single-session reflection cues become
78
+ proposals unless the configured confidence/observation thresholds and allowed layers
79
+ (memory-only by default) permit auto-apply. `/autonomy rollback <auditId>` (and
80
+ `AgentSession.rollbackLearningWrite`) executes the inverse memory operation or archives a
81
+ promoted skill, exactly once per change, and records a linked rollback audit. Audit records
82
+ appear in the `/autonomy diagnostics` learning family.
83
+ - Added model-capability auto-detection so small open models (including sub-1B local models) stay
84
+ usable for chat: the harness derives a capability class from the model's own `contextWindow`
85
+ metadata — full (≥32k, unchanged), lean (≥16k, background-autonomy tools like `delegate` and
86
+ `context_audit` blocked), minimal (≥8k, tools reduced to read/bash/edit/write, background lanes
87
+ disabled), and chat (<8k, no tools at all). Filtering happens in `setActiveToolsByName`, so the
88
+ system prompt sheds the blocked tools' schemas and guidelines too; the unfiltered request is
89
+ remembered and restored when switching back to a larger model, with a visible notice on
90
+ downgrade. Idle goal auto-continuation and the research lane are gated off below 16k
91
+ (`model_context_too_small` in diagnostics), and lane output-token budgets scale to the lane
92
+ model's window. Metadata-first with defaults only when info is missing (unknown window keeps
93
+ full behavior); configurable via `modelCapability.mode` (`auto` default, `off`, or a forced
94
+ class).
95
+ - Changed background-lane model resolution to inherit the session model the lane was shipped
96
+ from unless a lane-specific model is explicitly configured (the router's `cheapModel` no longer
97
+ implicitly redirects lanes) — single-model setups, e.g. one local open model, now run research
98
+ and scout workers on that same model.
99
+ - Changed active resource profiles to strict least-privilege grants: when one or more profiles are
100
+ active, any authority-bearing resource kind (extensions, skills, prompts, tools, agents) that no
101
+ active profile explicitly mentions is denied outright — a defaults profile no longer loads the
102
+ full extension/tool surface. Grant-all must be explicit via `allow: ["*"]`; explicitly written
103
+ block-framed filters keep meaning "all except the listed"; themes are exempt; behavior without
104
+ an active profile is unchanged.
105
+ - Changed profile denial to gate the disk reads themselves: skill files and prompt templates a
106
+ profile denies are never read from disk (extensions were already path-filtered before loading).
107
+ While a restrictive profile is active, denied skills/prompts consequently no longer appear in
108
+ resource listings; edit profiles with no restrictive profile active to see everything.
109
+ - Added profile-shipped subagents: research and worker lanes accept a `profile` setting whose
110
+ model MUST be obeyed when set (unresolvable is a visible `no_lane_profile_model` skip, never a
111
+ fallback), whose soul and thinking level ship with the lane, and whose tool grants are recorded
112
+ on the lane's capability envelope. Generic lanes keep inheriting the session model.
113
+ - Added a level-0 subagent system-prompt core (<300 tokens of non-negotiable rules) that survives
114
+ ANY prompt customization: lane settings (`systemPrompt`) and the delegate tool's new
115
+ `systemPrompt` input can erase and replace everything above it — so a big session model can
116
+ hand a small open model a minimal purpose-built prompt without shedding the safety floor.
117
+ - Added `run_toolkit_script` (active by default, mapped to the `run_shell` capability): the
118
+ user's blessed daily-ops script registry (`settings.toolkit.scripts` — name, description,
119
+ aliases, uv/powershell/bash runner, danger flag) executed with a structural reliability
120
+ contract. Finding is a conservative registry lookup that NEVER guesses between near-neighbors
121
+ ("prepare db" vs "update-db" returns a shortlist instead of executing); the harness owns
122
+ invocation (fixed argv, no shell strings) and always returns exit code, stdout, and stderr —
123
+ a failed script is an error result by construction and can never look like success; scripts
124
+ flagged `danger` never run without an explicit `confirm: true`.
125
+ - Added the `model_fitness` probe (tool + `/autonomy fitness <model> [trials]`): runs the real
126
+ research-lane, scout-worker, and routing-judge runners plus two heavy-lifter surfaces
127
+ (search-plan formulation, tool-call emission) against any registered model — local Ollama
128
+ models included — reporting parse/success rates, judge discrimination, mean latency,
129
+ tokens-per-second, and probe cost. Probe spend is cost-accounted; the tool is registered but
130
+ not default-active. An opt-in size-class bench (`PI_LOCAL_MODEL_BENCH=1`) asserts per-class
131
+ minimum bars for locally installed models.
132
+ - Added a host-keyed fitness store (`<agentDir>/state/model-fitness.json`): every probe persists
133
+ its report under a hardware fingerprint (CPU/cores/RAM), because fitness is a property of a
134
+ model ON a host — role assignments stay per-machine and synced settings cannot carry one
135
+ machine's speed numbers onto another. `AgentSession.getStoredFitnessReports()` exposes the
136
+ current host's measured evidence for profile/role decisions.
137
+ - Added the routing judge: with the model router enabled, a bounded routing-only completion on the
138
+ judge lane (`modelRouter.judgeModel`, else `mediumModel`; ≤128 output tokens, 10s wall clock,
139
+ static cached prompt) decides the final cheap/medium/expensive tier over the regex baseline —
140
+ never the learning tier. Core rule: planning/design prompts are never cheap unless the judge
141
+ explicitly deems them trivial; the regex classifier now also floors prospective planning prompts
142
+ at medium (`planning_min_medium`) while plain lookups like "show me the architecture" stay
143
+ cheap. Judge failures fall back to the baseline with visible reasons, judge spend reports
144
+ through spawned-usage accounting, and `modelRouter.judgeEnabled: false` restores byte-identical
145
+ router behavior.
146
+
147
+ ### Changed
148
+
149
+ - Changed bounded goal continuation to default to 20 turns and auto-inject continuation prompts after a
150
+ prompt settles idle while an active goal remains open, with internal recursion suppression for
151
+ continuation prompts. It now also respects new settings for wall-clock budget, idle delay, and turn limits,
152
+ which can be configured via the Autonomy submenu in the settings TUI.
153
+ - Added a third positional argument `[maxMinutes]` to the `/goal-continue` command to support bounded wall-clock loop termination.
154
+
1
155
  ## [0.80.86] - 2026-06-29
2
156
 
3
157
  ### Added
@@ -8,6 +162,30 @@
8
162
 
9
163
  - Fixed adaptive scaling of compaction parameters (`reserveTokens` and `keepRecentTokens`) for models with small context windows to avoid immediate auto-compaction loops.
10
164
  - Fixed a scope redeclaration issue with `activeProfileNames` in the resource loader.
165
+ - Fixed the semantic-memory context GC never packing the recall pages the bundled default memory
166
+ provider emits: active providers' page markers are now merged into the GC marker list at runtime
167
+ (and the generic `<memory_context` marker joined the settings default), so stale cross-session
168
+ recall pages no longer accumulate raw — and re-bill — for the life of the session.
169
+ - Fixed internal tool-registry refreshes (extension `refreshTools`, memory init, `/reload`,
170
+ live extension load/unload) permanently shrinking the restorable tool set: they re-derived from
171
+ the capability/profile-filtered ACTIVE tools instead of the pre-filter request, so switching back
172
+ to a larger model restored only the reduced set.
173
+ - Fixed the model router judge being consulted on internally generated continuation turns (one
174
+ judge call per loop iteration) and enforced the planning floor in code: a cheap downgrade of a
175
+ non-cheap baseline now requires the judge's explicit `trivial` verdict.
176
+ - Fixed `model_fitness` probes: per-surface calls are now wall-clock bounded (a hung local model
177
+ can no longer hang the probe), tokens/sec is measured in the shipped session path, and an empty
178
+ judge prompt set no longer yields NaN latency.
179
+ - Fixed reflection learning-audit ids colliding after no-op decisions (the rollback key now counts
180
+ only stored snapshots), which could block or misdirect `learning rollback`.
181
+ - Fixed the lane tracker growing without bound in long sessions (terminal lanes beyond 100 are
182
+ evicted from memory; the session log keeps full history) and lane ids being reused after resume.
183
+ - Fixed toolkit script execution discarding spawn-failure diagnostics: a missing runner
184
+ (ENOENT/EACCES) now surfaces the real cause in stderr instead of an empty `exited null`, and an
185
+ output-overflow kill is no longer mislabeled as a timeout. Repeated words in a request no longer
186
+ multiply the Level-0 matcher score into a false confident match.
187
+ - Fixed NaN/invalid model `contextWindow` metadata leaking into capability profiles and lane
188
+ budgets in `off`/forced modes.
11
189
 
12
190
 
13
191
  ## [0.80.85] - 2026-06-29