@daniel156161/prism 0.2.60 → 0.2.76

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 (1291) hide show
  1. package/README.md +26 -0
  2. package/dist/cli.js +0 -0
  3. package/dist/pi/pi-env.d.ts +1 -1
  4. package/dist/pi/pi-env.js +1 -1
  5. package/dist/pi/pi-extensions.js +2 -0
  6. package/dist/pi/pi-extensions.js.map +1 -1
  7. package/dist/pi/pi-patch-extension-loader.js +1 -0
  8. package/dist/pi/pi-patch-extension-loader.js.map +1 -1
  9. package/dist/pi/pi-patch-interactive.js +1 -1
  10. package/dist/pi/pi-patch-interactive.js.map +1 -1
  11. package/dist/prism-extensions/integrations/ai-memory-system.d.ts +7 -0
  12. package/dist/prism-extensions/integrations/ai-memory-system.js +316 -0
  13. package/dist/prism-extensions/integrations/ai-memory-system.js.map +1 -0
  14. package/dist/prism-extensions/integrations/obsidian-formatting.d.ts +3 -0
  15. package/dist/prism-extensions/integrations/obsidian-formatting.js +53 -0
  16. package/dist/prism-extensions/integrations/obsidian-formatting.js.map +1 -0
  17. package/dist/prism-extensions/integrations/obsidian-memory.d.ts +3 -1
  18. package/dist/prism-extensions/integrations/obsidian-memory.js +102 -49
  19. package/dist/prism-extensions/integrations/obsidian-memory.js.map +1 -1
  20. package/dist/prism-extensions/providers/manifest-provider.d.ts +1 -0
  21. package/dist/prism-extensions/providers/manifest-provider.js +29 -2
  22. package/dist/prism-extensions/providers/manifest-provider.js.map +1 -1
  23. package/dist/prism-extensions/tools/builtin-tools.js +2 -157
  24. package/dist/prism-extensions/tools/builtin-tools.js.map +1 -1
  25. package/dist/prism-extensions/tools/prism-diagnostic-tools.d.ts +2 -0
  26. package/dist/prism-extensions/tools/prism-diagnostic-tools.js +155 -0
  27. package/dist/prism-extensions/tools/prism-diagnostic-tools.js.map +1 -0
  28. package/dist/prism-extensions/tools/toolbox.d.ts +1 -0
  29. package/dist/prism-extensions/tools/toolbox.js +81 -3
  30. package/dist/prism-extensions/tools/toolbox.js.map +1 -1
  31. package/dist/prism-extensions/ui/toolbar.js +33 -16
  32. package/dist/prism-extensions/ui/toolbar.js.map +1 -1
  33. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -1
  34. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +1 -1
  35. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
  36. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/compile/validator.d.mts +3 -11
  37. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/compile/validator.mjs +6 -36
  38. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/error/errors.d.mts +1 -7
  39. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/format/_idna.mjs +36 -6
  40. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/format/_puny.mjs +4 -1
  41. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/format/uuid.d.mts +2 -2
  42. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/format/uuid.mjs +3 -3
  43. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/guard/emit.d.mts +0 -4
  44. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/guard/emit.mjs +0 -8
  45. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/guard/guard.d.mts +5 -9
  46. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/guard/guard.mjs +10 -15
  47. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/guard/string.mjs +16 -4
  48. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
  49. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
  50. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
  51. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
  52. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/engine/index.mjs +0 -1
  53. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/engine/schema.mjs +6 -11
  54. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/engine/type.mjs +14 -18
  55. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
  56. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/types/index.d.mts +0 -1
  57. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/types/index.mjs +0 -1
  58. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
  59. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/types/schema.mjs +2 -2
  60. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
  61. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
  62. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
  63. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
  64. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
  65. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
  66. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
  67. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
  68. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
  69. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
  70. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
  71. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
  72. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
  73. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
  74. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
  75. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
  76. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
  77. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
  78. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
  79. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
  80. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
  81. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
  82. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
  83. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
  84. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
  85. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
  86. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
  87. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
  88. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
  89. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
  90. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
  91. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
  92. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
  93. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
  94. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
  95. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
  96. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
  97. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
  98. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
  99. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/memory/clone.mjs +73 -26
  100. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
  101. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/system/settings/settings.mjs +3 -1
  102. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
  103. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
  104. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
  105. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
  106. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
  107. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
  108. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
  109. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
  110. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
  111. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
  112. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
  113. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
  114. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
  115. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/conditional.mjs +2 -1
  116. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/index.d.mts +7 -4
  117. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/index.mjs +7 -4
  118. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
  119. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/mapped.mjs +2 -1
  120. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/module.d.mts +8 -7
  121. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/module.mjs +7 -6
  122. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/readonly_object.mjs +3 -0
  123. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/with.d.mts +11 -0
  124. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/with.mjs +11 -0
  125. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  126. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
  127. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
  128. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
  129. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
  130. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
  131. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
  132. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
  133. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
  134. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
  135. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
  136. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
  137. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
  138. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
  139. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
  140. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
  141. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
  142. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
  143. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
  144. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
  145. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
  146. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
  147. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
  148. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
  149. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
  150. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
  151. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
  152. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
  153. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
  154. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
  155. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
  156. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
  157. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  158. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  159. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/index.d.mts +2 -2
  160. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/index.mjs +2 -2
  161. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
  162. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
  163. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
  164. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
  165. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
  166. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
  167. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
  168. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
  169. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
  170. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
  171. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
  172. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
  173. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
  174. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
  175. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
  176. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
  177. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
  178. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
  179. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
  180. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
  181. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
  182. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
  183. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
  184. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
  185. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
  186. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
  187. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
  188. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  189. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
  190. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
  191. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  192. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
  193. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
  194. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
  195. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
  196. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
  197. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
  198. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
  199. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
  200. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
  201. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
  202. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
  203. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
  204. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
  205. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
  206. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
  207. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
  208. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
  209. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  210. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  211. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
  212. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
  213. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
  214. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
  215. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
  216. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
  217. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
  218. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
  219. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
  220. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
  221. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
  222. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
  223. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
  224. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
  225. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
  226. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
  227. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
  228. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
  229. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
  230. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
  231. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
  232. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
  233. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
  234. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
  235. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
  236. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
  237. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
  238. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
  239. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
  240. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  241. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
  242. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
  243. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
  244. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
  245. package/node_modules/@earendil-works/{pi-coding-agent/node_modules/typebox/build/type/engine/options → pi-agent-core/node_modules/typebox/build/type/engine/with}/instantiate.mjs +5 -5
  246. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
  247. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
  248. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
  249. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/enum.mjs +3 -2
  250. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
  251. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
  252. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
  253. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
  254. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  255. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/object.d.mts +8 -1
  256. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/object.mjs +25 -3
  257. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
  258. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/record.d.mts +13 -0
  259. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/record.mjs +23 -0
  260. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
  261. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
  262. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
  263. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
  264. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/union.mjs +2 -2
  265. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/script/mapping.d.mts +86 -98
  266. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/script/mapping.mjs +95 -92
  267. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/script/parser.d.mts +42 -40
  268. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/script/parser.mjs +23 -22
  269. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/script/script.d.mts +3 -4
  270. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/script/script.mjs +3 -2
  271. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
  272. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  273. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
  274. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/script/token/until.mjs +2 -2
  275. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
  276. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/_codec.mjs +0 -1
  277. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
  278. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
  279. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
  280. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/_optional.mjs +2 -11
  281. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
  282. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
  283. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
  284. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/_refine.mjs +1 -2
  285. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/call.d.mts +3 -3
  286. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/call.mjs +3 -2
  287. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
  288. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  289. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
  290. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/dependent.mjs +24 -0
  291. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/enum.d.mts +3 -1
  292. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/enum.mjs +5 -0
  293. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/index.d.mts +1 -4
  294. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/index.mjs +1 -4
  295. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/number.d.mts +1 -1
  296. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/number.mjs +1 -1
  297. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/record.d.mts +13 -7
  298. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/record.mjs +15 -9
  299. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/static.d.mts +2 -5
  300. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/typebox.d.mts +3 -7
  301. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/typebox.mjs +3 -7
  302. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/clean/clean.mjs +4 -2
  303. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
  304. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
  305. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
  306. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
  307. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/clone/clone.mjs +2 -73
  308. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/codec/decode.mjs +4 -2
  309. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/codec/encode.mjs +4 -2
  310. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
  311. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
  312. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
  313. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
  314. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
  315. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
  316. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
  317. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
  318. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
  319. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
  320. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/create/from_type.mjs +23 -31
  321. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  322. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/default/from_type.mjs +8 -10
  323. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  324. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  325. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/index.d.mts +0 -1
  326. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/index.mjs +0 -1
  327. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
  328. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
  329. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
  330. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
  331. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/value.d.mts +0 -1
  332. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/value.mjs +0 -1
  333. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/package.json +33 -33
  334. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/readme.md +117 -103
  335. package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  336. package/node_modules/@earendil-works/pi-ai/README.md +2 -1
  337. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  338. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +11 -4
  339. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  340. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
  341. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +5 -1
  342. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
  343. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
  344. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +16 -4
  345. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
  346. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts.map +1 -1
  347. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +12 -2
  348. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +1 -1
  349. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts.map +1 -1
  350. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +12 -2
  351. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
  352. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
  353. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +19 -10
  354. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
  355. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  356. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +12 -2
  357. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  358. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
  359. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +21 -9
  360. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
  361. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
  362. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +11 -1
  363. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
  364. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
  365. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +7 -3
  366. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  367. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.d.ts.map +1 -1
  368. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +3 -2
  369. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js.map +1 -1
  370. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.d.ts.map +1 -1
  371. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +2 -2
  372. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js.map +1 -1
  373. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts.map +1 -1
  374. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -0
  375. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js.map +1 -1
  376. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts +3 -1
  377. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts.map +1 -1
  378. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +81 -26
  379. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js.map +1 -1
  380. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts +2 -0
  381. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts.map +1 -1
  382. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +16 -8
  383. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
  384. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  385. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  386. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  387. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  388. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  389. package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
  390. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  391. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  392. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  393. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  394. package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  395. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  396. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
  397. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
  398. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
  399. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +4 -1
  400. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
  401. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +11 -1
  402. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  403. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  404. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/compile/validator.d.mts +3 -11
  405. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/compile/validator.mjs +6 -36
  406. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/error/errors.d.mts +1 -7
  407. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/format/_idna.mjs +36 -6
  408. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/format/_puny.mjs +4 -1
  409. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/format/uuid.d.mts +2 -2
  410. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/format/uuid.mjs +3 -3
  411. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/guard/emit.d.mts +0 -4
  412. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/guard/emit.mjs +0 -8
  413. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/guard/guard.d.mts +5 -9
  414. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/guard/guard.mjs +10 -15
  415. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/guard/string.mjs +16 -4
  416. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
  417. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
  418. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
  419. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
  420. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/engine/index.mjs +0 -1
  421. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/engine/schema.mjs +6 -11
  422. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/engine/type.mjs +14 -18
  423. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
  424. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/types/index.d.mts +0 -1
  425. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/types/index.mjs +0 -1
  426. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
  427. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/types/schema.mjs +2 -2
  428. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
  429. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
  430. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
  431. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
  432. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
  433. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
  434. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
  435. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
  436. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
  437. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
  438. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
  439. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
  440. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
  441. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
  442. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
  443. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
  444. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
  445. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
  446. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
  447. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
  448. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
  449. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
  450. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
  451. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
  452. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
  453. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
  454. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
  455. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
  456. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
  457. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
  458. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
  459. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
  460. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
  461. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
  462. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
  463. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
  464. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
  465. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
  466. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
  467. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/memory/clone.mjs +73 -26
  468. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
  469. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/system/settings/settings.mjs +3 -1
  470. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
  471. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
  472. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
  473. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
  474. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
  475. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
  476. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
  477. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
  478. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
  479. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
  480. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
  481. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
  482. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
  483. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/conditional.mjs +2 -1
  484. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/index.d.mts +7 -4
  485. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/index.mjs +7 -4
  486. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
  487. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/mapped.mjs +2 -1
  488. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/module.d.mts +8 -7
  489. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/module.mjs +7 -6
  490. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/readonly_object.mjs +3 -0
  491. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/with.d.mts +11 -0
  492. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/with.mjs +11 -0
  493. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  494. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
  495. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
  496. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
  497. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
  498. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
  499. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
  500. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
  501. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
  502. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
  503. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
  504. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
  505. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
  506. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
  507. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
  508. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
  509. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
  510. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
  511. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
  512. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
  513. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
  514. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
  515. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
  516. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
  517. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
  518. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
  519. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
  520. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
  521. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
  522. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
  523. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
  524. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
  525. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  526. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  527. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/index.d.mts +2 -2
  528. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/index.mjs +2 -2
  529. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
  530. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
  531. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
  532. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
  533. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
  534. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
  535. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
  536. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
  537. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
  538. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
  539. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
  540. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
  541. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
  542. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
  543. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
  544. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
  545. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
  546. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
  547. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
  548. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
  549. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
  550. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
  551. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
  552. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
  553. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
  554. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
  555. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
  556. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  557. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
  558. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
  559. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  560. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
  561. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
  562. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
  563. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
  564. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
  565. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
  566. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
  567. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
  568. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
  569. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
  570. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
  571. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
  572. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
  573. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
  574. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
  575. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
  576. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
  577. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  578. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  579. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
  580. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
  581. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
  582. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
  583. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
  584. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
  585. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
  586. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
  587. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
  588. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
  589. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
  590. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
  591. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
  592. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
  593. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
  594. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
  595. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
  596. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
  597. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
  598. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
  599. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
  600. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
  601. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
  602. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
  603. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
  604. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
  605. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
  606. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
  607. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
  608. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  609. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
  610. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
  611. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
  612. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
  613. package/node_modules/@earendil-works/{pi-agent-core/node_modules/typebox/build/type/engine/options → pi-ai/node_modules/typebox/build/type/engine/with}/instantiate.mjs +5 -5
  614. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
  615. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
  616. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
  617. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/enum.mjs +3 -2
  618. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
  619. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
  620. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
  621. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
  622. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  623. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/object.d.mts +8 -1
  624. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/object.mjs +25 -3
  625. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
  626. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/record.d.mts +13 -0
  627. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/record.mjs +23 -0
  628. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
  629. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
  630. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
  631. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
  632. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/union.mjs +2 -2
  633. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/script/mapping.d.mts +86 -98
  634. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/script/mapping.mjs +95 -92
  635. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/script/parser.d.mts +42 -40
  636. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/script/parser.mjs +23 -22
  637. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/script/script.d.mts +3 -4
  638. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/script/script.mjs +3 -2
  639. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
  640. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  641. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
  642. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/script/token/until.mjs +2 -2
  643. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
  644. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/_codec.mjs +0 -1
  645. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
  646. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
  647. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
  648. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/_optional.mjs +2 -11
  649. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
  650. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
  651. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
  652. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/_refine.mjs +1 -2
  653. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/call.d.mts +3 -3
  654. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/call.mjs +3 -2
  655. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
  656. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  657. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
  658. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/dependent.mjs +24 -0
  659. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/enum.d.mts +3 -1
  660. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/enum.mjs +5 -0
  661. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/index.d.mts +1 -4
  662. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/index.mjs +1 -4
  663. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/number.d.mts +1 -1
  664. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/number.mjs +1 -1
  665. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/record.d.mts +13 -7
  666. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/record.mjs +15 -9
  667. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/static.d.mts +2 -5
  668. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/typebox.d.mts +3 -7
  669. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/typebox.mjs +3 -7
  670. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/clean/clean.mjs +4 -2
  671. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
  672. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
  673. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
  674. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
  675. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/clone/clone.mjs +2 -73
  676. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/codec/decode.mjs +4 -2
  677. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/codec/encode.mjs +4 -2
  678. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
  679. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
  680. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
  681. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
  682. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
  683. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
  684. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
  685. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
  686. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
  687. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
  688. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/create/from_type.mjs +23 -31
  689. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  690. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/default/from_type.mjs +8 -10
  691. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  692. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  693. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/index.d.mts +0 -1
  694. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/index.mjs +0 -1
  695. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
  696. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
  697. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
  698. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
  699. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/value.d.mts +0 -1
  700. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/value.mjs +0 -1
  701. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/package.json +33 -33
  702. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/readme.md +117 -103
  703. package/node_modules/@earendil-works/pi-ai/package.json +2 -2
  704. package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +45 -0
  705. package/node_modules/@earendil-works/pi-coding-agent/README.md +1 -1
  706. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
  707. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +8 -1
  708. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js.map +1 -1
  709. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/credential-print.d.ts +23 -0
  710. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/credential-print.d.ts.map +1 -0
  711. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/credential-print.js +116 -0
  712. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/credential-print.js.map +1 -0
  713. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.d.ts.map +1 -1
  714. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js +3 -0
  715. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js.map +1 -1
  716. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +1 -1
  717. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
  718. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +13 -6
  719. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
  720. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +1 -1
  721. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +1 -0
  722. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
  723. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +7 -0
  724. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
  725. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +7 -0
  726. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
  727. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
  728. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts +10 -0
  729. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts.map +1 -1
  730. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js +1 -1
  731. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js.map +1 -1
  732. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.d.ts +2 -0
  733. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.d.ts.map +1 -1
  734. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.js.map +1 -1
  735. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
  736. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +13 -6
  737. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
  738. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts +15 -0
  739. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
  740. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +63 -9
  741. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
  742. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +0 -267
  743. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.d.ts.map +1 -1
  744. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.js +1 -1
  745. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.js.map +1 -1
  746. package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts.map +1 -1
  747. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +43 -0
  748. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js.map +1 -1
  749. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  750. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.js +4 -1
  751. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.js.map +1 -1
  752. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  753. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +32 -17
  754. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  755. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  756. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +13 -0
  757. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
  758. package/node_modules/@earendil-works/pi-coding-agent/docs/custom-provider.md +9 -3
  759. package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +3 -1
  760. package/node_modules/@earendil-works/pi-coding-agent/docs/providers.md +1 -0
  761. package/node_modules/@earendil-works/pi-coding-agent/docs/session-format.md +2 -0
  762. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/index.ts +8 -2
  763. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  764. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
  765. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  766. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +2 -2
  767. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +1 -1
  768. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package-lock.json +2 -2
  769. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
  770. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package-lock.json +2 -2
  771. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
  772. package/node_modules/@earendil-works/pi-coding-agent/examples/sdk/12-full-control.ts +2 -0
  773. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/compile/validator.d.mts +3 -11
  774. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/compile/validator.mjs +6 -36
  775. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/error/errors.d.mts +1 -7
  776. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/format/_idna.mjs +36 -6
  777. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/format/_puny.mjs +4 -1
  778. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/format/uuid.d.mts +2 -2
  779. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/format/uuid.mjs +3 -3
  780. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/guard/emit.d.mts +0 -4
  781. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/guard/emit.mjs +0 -8
  782. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/guard/guard.d.mts +5 -9
  783. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/guard/guard.mjs +10 -15
  784. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/guard/string.mjs +16 -4
  785. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
  786. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
  787. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
  788. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
  789. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/engine/index.mjs +0 -1
  790. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/engine/schema.mjs +6 -11
  791. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/engine/type.mjs +14 -18
  792. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
  793. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/types/index.d.mts +0 -1
  794. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/types/index.mjs +0 -1
  795. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
  796. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/types/schema.mjs +2 -2
  797. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
  798. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
  799. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
  800. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
  801. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
  802. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
  803. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
  804. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
  805. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
  806. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
  807. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
  808. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
  809. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
  810. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
  811. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
  812. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
  813. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
  814. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
  815. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
  816. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
  817. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
  818. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
  819. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
  820. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
  821. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
  822. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
  823. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
  824. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
  825. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
  826. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
  827. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
  828. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
  829. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
  830. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
  831. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
  832. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
  833. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
  834. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
  835. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
  836. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/memory/clone.mjs +73 -26
  837. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
  838. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/system/settings/settings.mjs +3 -1
  839. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
  840. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
  841. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
  842. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
  843. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
  844. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
  845. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
  846. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
  847. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
  848. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
  849. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
  850. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
  851. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
  852. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/conditional.mjs +2 -1
  853. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/index.d.mts +7 -4
  854. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/index.mjs +7 -4
  855. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
  856. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/mapped.mjs +2 -1
  857. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/module.d.mts +8 -7
  858. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/module.mjs +7 -6
  859. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/readonly_object.mjs +3 -0
  860. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/with.d.mts +11 -0
  861. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/with.mjs +11 -0
  862. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  863. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
  864. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
  865. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
  866. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
  867. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
  868. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
  869. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
  870. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
  871. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
  872. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
  873. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
  874. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
  875. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
  876. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
  877. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
  878. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
  879. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
  880. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
  881. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
  882. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
  883. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
  884. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
  885. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
  886. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
  887. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
  888. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
  889. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
  890. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
  891. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
  892. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
  893. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
  894. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  895. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  896. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/index.d.mts +2 -2
  897. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/index.mjs +2 -2
  898. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
  899. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
  900. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
  901. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
  902. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
  903. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
  904. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
  905. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
  906. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
  907. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
  908. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
  909. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
  910. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
  911. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
  912. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
  913. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
  914. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
  915. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
  916. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
  917. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
  918. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
  919. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
  920. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
  921. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
  922. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
  923. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
  924. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
  925. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  926. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
  927. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
  928. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  929. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
  930. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
  931. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
  932. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
  933. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
  934. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
  935. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
  936. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
  937. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
  938. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
  939. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
  940. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
  941. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
  942. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
  943. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
  944. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
  945. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
  946. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  947. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  948. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
  949. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
  950. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
  951. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
  952. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
  953. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
  954. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
  955. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
  956. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
  957. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
  958. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
  959. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
  960. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
  961. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
  962. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
  963. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
  964. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
  965. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
  966. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
  967. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
  968. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
  969. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
  970. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
  971. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
  972. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
  973. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
  974. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
  975. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
  976. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
  977. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  978. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
  979. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
  980. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
  981. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
  982. package/node_modules/@earendil-works/{pi-ai/node_modules/typebox/build/type/engine/options → pi-coding-agent/node_modules/typebox/build/type/engine/with}/instantiate.mjs +5 -5
  983. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
  984. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
  985. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
  986. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/enum.mjs +3 -2
  987. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
  988. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
  989. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
  990. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
  991. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  992. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/object.d.mts +8 -1
  993. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/object.mjs +25 -3
  994. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
  995. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/record.d.mts +13 -0
  996. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/record.mjs +23 -0
  997. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
  998. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
  999. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
  1000. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
  1001. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/union.mjs +2 -2
  1002. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/script/mapping.d.mts +86 -98
  1003. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/script/mapping.mjs +95 -92
  1004. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/script/parser.d.mts +42 -40
  1005. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/script/parser.mjs +23 -22
  1006. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/script/script.d.mts +3 -4
  1007. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/script/script.mjs +3 -2
  1008. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
  1009. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  1010. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
  1011. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/script/token/until.mjs +2 -2
  1012. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
  1013. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/_codec.mjs +0 -1
  1014. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
  1015. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
  1016. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
  1017. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/_optional.mjs +2 -11
  1018. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
  1019. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
  1020. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
  1021. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/_refine.mjs +1 -2
  1022. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/call.d.mts +3 -3
  1023. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/call.mjs +3 -2
  1024. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
  1025. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  1026. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
  1027. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/dependent.mjs +24 -0
  1028. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/enum.d.mts +3 -1
  1029. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/enum.mjs +5 -0
  1030. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/index.d.mts +1 -4
  1031. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/index.mjs +1 -4
  1032. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/number.d.mts +1 -1
  1033. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/number.mjs +1 -1
  1034. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/record.d.mts +13 -7
  1035. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/record.mjs +15 -9
  1036. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/static.d.mts +2 -5
  1037. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/typebox.d.mts +3 -7
  1038. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/typebox.mjs +3 -7
  1039. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/clean/clean.mjs +4 -2
  1040. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
  1041. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
  1042. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
  1043. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
  1044. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/clone/clone.mjs +2 -73
  1045. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/codec/decode.mjs +4 -2
  1046. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/codec/encode.mjs +4 -2
  1047. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
  1048. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
  1049. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
  1050. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
  1051. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
  1052. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
  1053. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
  1054. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
  1055. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
  1056. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
  1057. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/create/from_type.mjs +23 -31
  1058. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  1059. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/default/from_type.mjs +8 -10
  1060. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  1061. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  1062. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/index.d.mts +0 -1
  1063. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/index.mjs +0 -1
  1064. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
  1065. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
  1066. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
  1067. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
  1068. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/value.d.mts +0 -1
  1069. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/value.mjs +0 -1
  1070. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/package.json +33 -33
  1071. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/readme.md +117 -103
  1072. package/node_modules/@earendil-works/pi-coding-agent/package.json +5 -5
  1073. package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +1 -1
  1074. package/node_modules/@earendil-works/pi-tui/dist/components/image.js +3 -2
  1075. package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +1 -1
  1076. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +5 -0
  1077. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
  1078. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +25 -2
  1079. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
  1080. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  1081. package/node_modules/@types/node/README.md +1 -1
  1082. package/node_modules/@types/node/crypto.d.ts +1 -1
  1083. package/node_modules/@types/node/package.json +2 -2
  1084. package/package.json +5 -5
  1085. package/src/prism-extensions/README.md +1 -1
  1086. package/src/prism-extensions/integrations/ai-memory-system.ts +332 -0
  1087. package/src/prism-extensions/integrations/obsidian-formatting.ts +55 -0
  1088. package/src/prism-extensions/integrations/obsidian-memory.ts +90 -47
  1089. package/src/prism-extensions/providers/manifest-provider.ts +29 -2
  1090. package/src/prism-extensions/tools/builtin-tools.ts +2 -150
  1091. package/src/prism-extensions/tools/prism-diagnostic-tools.ts +160 -0
  1092. package/src/prism-extensions/tools/toolbox.ts +87 -3
  1093. package/src/prism-extensions/ui/toolbar.ts +31 -12
  1094. package/dist/prism-extensions/integrations/mcp-adapter.d.ts +0 -3
  1095. package/dist/prism-extensions/integrations/mcp-adapter.js +0 -21
  1096. package/dist/prism-extensions/integrations/mcp-adapter.js.map +0 -1
  1097. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
  1098. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
  1099. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
  1100. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
  1101. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
  1102. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_optional.mjs +0 -40
  1103. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
  1104. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
  1105. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
  1106. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/awaited.mjs +0 -15
  1107. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/options.d.mts +0 -11
  1108. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/action/options.mjs +0 -11
  1109. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
  1110. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
  1111. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
  1112. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
  1113. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
  1114. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
  1115. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
  1116. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
  1117. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
  1118. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
  1119. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/extends/promise.mjs +0 -9
  1120. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
  1121. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
  1122. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/base.d.mts +0 -50
  1123. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/base.mjs +0 -84
  1124. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
  1125. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/iterator.mjs +0 -28
  1126. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/promise.d.mts +0 -21
  1127. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/types/promise.mjs +0 -29
  1128. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
  1129. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
  1130. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
  1131. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
  1132. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
  1133. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
  1134. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
  1135. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/create/from_base.mjs +0 -4
  1136. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
  1137. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
  1138. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
  1139. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
  1140. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
  1141. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/default/from_base.mjs +0 -5
  1142. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
  1143. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/error.mjs +0 -6
  1144. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
  1145. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
  1146. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
  1147. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
  1148. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
  1149. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
  1150. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
  1151. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
  1152. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
  1153. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/index.mjs +0 -1
  1154. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
  1155. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
  1156. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
  1157. package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
  1158. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
  1159. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
  1160. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
  1161. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
  1162. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
  1163. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_optional.mjs +0 -40
  1164. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
  1165. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
  1166. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
  1167. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/awaited.mjs +0 -15
  1168. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/options.d.mts +0 -11
  1169. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/action/options.mjs +0 -11
  1170. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
  1171. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
  1172. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
  1173. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
  1174. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
  1175. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
  1176. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
  1177. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
  1178. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
  1179. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
  1180. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
  1181. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
  1182. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/extends/promise.mjs +0 -9
  1183. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
  1184. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
  1185. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/base.d.mts +0 -50
  1186. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/base.mjs +0 -84
  1187. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
  1188. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/iterator.mjs +0 -28
  1189. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/promise.d.mts +0 -21
  1190. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/type/types/promise.mjs +0 -29
  1191. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
  1192. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
  1193. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
  1194. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
  1195. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
  1196. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
  1197. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
  1198. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/create/from_base.mjs +0 -4
  1199. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
  1200. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
  1201. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
  1202. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
  1203. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
  1204. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/default/from_base.mjs +0 -5
  1205. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
  1206. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/error.mjs +0 -6
  1207. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
  1208. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
  1209. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
  1210. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
  1211. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
  1212. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
  1213. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
  1214. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
  1215. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
  1216. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/index.mjs +0 -1
  1217. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
  1218. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
  1219. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
  1220. package/node_modules/@earendil-works/pi-ai/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
  1221. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
  1222. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
  1223. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
  1224. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
  1225. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
  1226. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_optional.mjs +0 -40
  1227. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
  1228. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
  1229. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
  1230. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/awaited.mjs +0 -15
  1231. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/options.d.mts +0 -11
  1232. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/action/options.mjs +0 -11
  1233. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/awaited/index.d.mts +0 -1
  1234. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/awaited/index.mjs +0 -1
  1235. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
  1236. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
  1237. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
  1238. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
  1239. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
  1240. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
  1241. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
  1242. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
  1243. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
  1244. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
  1245. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
  1246. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
  1247. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/extends/promise.mjs +0 -9
  1248. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
  1249. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
  1250. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/base.d.mts +0 -50
  1251. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/base.mjs +0 -84
  1252. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
  1253. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/iterator.mjs +0 -28
  1254. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/promise.d.mts +0 -21
  1255. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/type/types/promise.mjs +0 -29
  1256. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
  1257. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
  1258. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
  1259. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
  1260. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
  1261. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
  1262. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
  1263. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/create/from_base.mjs +0 -4
  1264. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
  1265. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
  1266. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
  1267. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
  1268. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
  1269. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/default/from_base.mjs +0 -5
  1270. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
  1271. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/error.mjs +0 -6
  1272. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
  1273. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
  1274. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
  1275. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
  1276. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
  1277. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
  1278. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
  1279. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
  1280. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
  1281. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/index.mjs +0 -1
  1282. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
  1283. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
  1284. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
  1285. package/node_modules/@earendil-works/pi-coding-agent/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
  1286. /package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
  1287. /package/node_modules/@earendil-works/pi-agent-core/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
  1288. /package/node_modules/@earendil-works/{pi-agent-core/node_modules/typebox/build/type/engine/options → pi-ai/node_modules/typebox/build/type/engine/with}/index.d.mts +0 -0
  1289. /package/node_modules/@earendil-works/{pi-agent-core/node_modules/typebox/build/type/engine/options → pi-ai/node_modules/typebox/build/type/engine/with}/index.mjs +0 -0
  1290. /package/node_modules/@earendil-works/{pi-ai/node_modules/typebox/build/type/engine/awaited → pi-coding-agent/node_modules/typebox/build/type/engine/with}/index.d.mts +0 -0
  1291. /package/node_modules/@earendil-works/{pi-ai/node_modules/typebox/build/type/engine/awaited → pi-coding-agent/node_modules/typebox/build/type/engine/with}/index.mjs +0 -0
@@ -1,168 +1,13 @@
1
- import { createHash, randomUUID } from "node:crypto";
2
- import { Type } from "typebox";
3
1
  import { createDiagnosticToolboxTools } from "./diagnostic-tools.js";
2
+ import { createPrismDiagnosticToolboxTools } from "./prism-diagnostic-tools.js";
4
3
  import { createSshConfigTool } from "./ssh-config-tool.js";
5
- import { clampInteger, normalizedAction, textToolResult } from "./toolbox-utils.js";
6
- const MAX_RESULTS = 500;
7
4
  export function defineToolboxTool(definition) {
8
5
  return { source: "toolbox/builtin", ...definition };
9
6
  }
10
- function stableSort(value) {
11
- if (Array.isArray(value))
12
- return value.map(stableSort);
13
- if (!value || typeof value !== "object" || value.constructor !== Object)
14
- return value;
15
- return Object.fromEntries(Object.keys(value).sort().map((key) => [key, stableSort(value[key])]));
16
- }
17
- function parseJsonInput(input) {
18
- if (typeof input === "string")
19
- return JSON.parse(input);
20
- return input;
21
- }
22
7
  export const builtinToolboxTools = [
23
- defineToolboxTool({
24
- name: "json_format",
25
- label: "JSON Format",
26
- description: "Format, minify, validate, and optionally sort JSON input.",
27
- tags: ["json", "format", "validate", "minify"],
28
- parameters: Type.Object({
29
- input: Type.Any({ description: "JSON string or JSON-compatible value" }),
30
- minify: Type.Optional(Type.Boolean({ description: "Return compact JSON instead of pretty JSON" })),
31
- sortKeys: Type.Optional(Type.Boolean({ description: "Sort object keys recursively" })),
32
- }),
33
- async execute(_id, params) {
34
- const parsed = parseJsonInput(params.input);
35
- const normalized = params.sortKeys ? stableSort(parsed) : parsed;
36
- return textToolResult(JSON.stringify(normalized, null, params.minify ? 0 : 2), { valid: true });
37
- },
38
- }),
39
- defineToolboxTool({
40
- name: "base64_codec",
41
- label: "Base64 Codec",
42
- description: "Encode or decode UTF-8 text with Base64.",
43
- tags: ["base64", "encode", "decode", "text"],
44
- parameters: Type.Object({
45
- action: Type.String({ description: "encode or decode" }),
46
- text: Type.String({ description: "Input text" }),
47
- }),
48
- async execute(_id, params) {
49
- const action = normalizedAction(params.action, "");
50
- if (action === "encode")
51
- return textToolResult(Buffer.from(String(params.text ?? ""), "utf8").toString("base64"), { action });
52
- if (action === "decode")
53
- return textToolResult(Buffer.from(String(params.text ?? ""), "base64").toString("utf8"), { action });
54
- throw new Error("action must be encode or decode");
55
- },
56
- }),
57
- defineToolboxTool({
58
- name: "url_codec",
59
- label: "URL Codec",
60
- description: "Encode or decode URL components.",
61
- tags: ["url", "encode", "decode", "uri"],
62
- parameters: Type.Object({
63
- action: Type.String({ description: "encode or decode" }),
64
- text: Type.String({ description: "Input text" }),
65
- }),
66
- async execute(_id, params) {
67
- const action = normalizedAction(params.action, "");
68
- if (action === "encode")
69
- return textToolResult(encodeURIComponent(String(params.text ?? "")), { action });
70
- if (action === "decode")
71
- return textToolResult(decodeURIComponent(String(params.text ?? "")), { action });
72
- throw new Error("action must be encode or decode");
73
- },
74
- }),
75
- defineToolboxTool({
76
- name: "hash_text",
77
- label: "Hash Text",
78
- description: "Hash text using sha256, sha1, or md5.",
79
- tags: ["hash", "sha256", "sha1", "md5", "checksum"],
80
- parameters: Type.Object({
81
- text: Type.String({ description: "Text to hash" }),
82
- algorithm: Type.Optional(Type.String({ description: "sha256 (default), sha1, or md5" })),
83
- }),
84
- async execute(_id, params) {
85
- const algorithm = normalizedAction(params.algorithm, "sha256");
86
- if (!["sha256", "sha1", "md5"].includes(algorithm))
87
- throw new Error("algorithm must be sha256, sha1, or md5");
88
- return textToolResult(createHash(algorithm).update(String(params.text ?? ""), "utf8").digest("hex"), { algorithm });
89
- },
90
- }),
91
- defineToolboxTool({
92
- name: "regex_extract",
93
- label: "Regex Extract",
94
- description: "Extract regex matches from text, with optional capture group selection.",
95
- tags: ["regex", "extract", "text", "match"],
96
- parameters: Type.Object({
97
- text: Type.String({ description: "Text to search" }),
98
- pattern: Type.String({ description: "JavaScript regular expression pattern, without slashes" }),
99
- flags: Type.Optional(Type.String({ description: "Regex flags. g is added automatically. Allowed: gimsyu" })),
100
- group: Type.Optional(Type.Number({ description: "Capture group index, default 0 for whole match" })),
101
- limit: Type.Optional(Type.Number({ description: "Maximum matches, default 100, max 500" })),
102
- }),
103
- async execute(_id, params) {
104
- const rawFlags = String(params.flags ?? "");
105
- if (!/^[gimsyu]*$/.test(rawFlags))
106
- throw new Error("flags may only contain g, i, m, s, y, u");
107
- const flags = rawFlags.includes("g") ? rawFlags : `${rawFlags}g`;
108
- const regex = new RegExp(String(params.pattern ?? ""), flags);
109
- const group = Math.max(0, Math.trunc(Number(params.group ?? 0)));
110
- const limit = clampInteger(params.limit, 100, 1, MAX_RESULTS);
111
- const matches = [];
112
- for (const match of String(params.text ?? "").matchAll(regex)) {
113
- matches.push(match[group] ?? "");
114
- if (matches.length >= limit)
115
- break;
116
- }
117
- return textToolResult(matches.join("\n") || "No matches", { count: matches.length, group, flags });
118
- },
119
- }),
120
- defineToolboxTool({
121
- name: "time_convert",
122
- label: "Time Convert",
123
- description: "Convert timestamps or date strings to ISO, Unix seconds, and Unix milliseconds. Uses current time when value is omitted.",
124
- tags: ["time", "date", "timestamp", "unix", "iso"],
125
- parameters: Type.Object({
126
- value: Type.Optional(Type.Any({ description: "Date string, Unix seconds, Unix milliseconds, or empty for now" })),
127
- unit: Type.Optional(Type.String({ description: "auto (default), seconds, milliseconds, or iso" })),
128
- }),
129
- async execute(_id, params) {
130
- const unit = normalizedAction(params.unit, "auto");
131
- const value = params.value;
132
- let date;
133
- if (value === undefined || value === null || value === "")
134
- date = new Date();
135
- else if (unit === "seconds")
136
- date = new Date(Number(value) * 1000);
137
- else if (unit === "milliseconds")
138
- date = new Date(Number(value));
139
- else if (unit === "iso")
140
- date = new Date(String(value));
141
- else if (typeof value === "number" || /^\d+$/.test(String(value))) {
142
- const numeric = Number(value);
143
- date = new Date(numeric < 10_000_000_000 ? numeric * 1000 : numeric);
144
- }
145
- else
146
- date = new Date(String(value));
147
- if (!Number.isFinite(date.getTime()))
148
- throw new Error("Invalid date/time value");
149
- const unixMs = date.getTime();
150
- return textToolResult(JSON.stringify({ iso: date.toISOString(), unixSeconds: Math.floor(unixMs / 1000), unixMilliseconds: unixMs }, null, 2), { unixMs });
151
- },
152
- }),
153
- defineToolboxTool({
154
- name: "uuid_generate",
155
- label: "UUID Generate",
156
- description: "Generate one or more random UUID v4 values.",
157
- tags: ["uuid", "random", "id"],
158
- parameters: Type.Object({ count: Type.Optional(Type.Number({ description: "How many UUIDs to generate, default 1, max 100" })) }),
159
- async execute(_id, params) {
160
- const count = clampInteger(params.count, 1, 1, 100);
161
- return textToolResult(Array.from({ length: count }, () => randomUUID()).join("\n"), { count });
162
- },
163
- }),
164
8
  createSshConfigTool(),
165
9
  ...createDiagnosticToolboxTools(),
10
+ ...createPrismDiagnosticToolboxTools(),
166
11
  ];
167
12
  export function createBuiltinToolboxTools() {
168
13
  return builtinToolboxTools.map((tool) => ({ ...tool }));
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-tools.js","sourceRoot":"","sources":["../../../src/prism-extensions/tools/builtin-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAkB,MAAM,oBAAoB,CAAA;AAEnG,MAAM,WAAW,GAAG,GAAG,CAAA;AAEvB,MAAM,UAAU,iBAAiB,CAAC,UAAiC;IACjE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,UAAU,EAAE,CAAA;AACrD,CAAC;AAED,SAAS,UAAU,CAAC,KAAU;IAC5B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACtD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,WAAW,KAAK,MAAM;QAAE,OAAO,KAAK,CAAA;IACrF,OAAO,MAAM,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D,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;QAChG,CAAC;KACF,CAAC;IAEF,mBAAmB,EAAE;IACrB,GAAG,4BAA4B,EAAE;CAClC,CAAA;AAED,MAAM,UAAU,yBAAyB;IACvC,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAA;AACzD,CAAC"}
1
+ {"version":3,"file":"builtin-tools.js","sourceRoot":"","sources":["../../../src/prism-extensions/tools/builtin-tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,UAAU,iBAAiB,CAAC,UAAiC;IACjE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,UAAU,EAAE,CAAA;AACrD,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAA4B;IAC1D,mBAAmB,EAAE;IACrB,GAAG,4BAA4B,EAAE;IACjC,GAAG,iCAAiC,EAAE;CACvC,CAAA;AAED,MAAM,UAAU,yBAAyB;IACvC,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAA;AACzD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { ToolboxToolDefinition } from "./toolbox.js";
2
+ export declare function createPrismDiagnosticToolboxTools(): ToolboxToolDefinition[];
@@ -0,0 +1,155 @@
1
+ import * as fs from "node:fs";
2
+ import * as path from "node:path";
3
+ import { execFile } from "node:child_process";
4
+ import { promisify } from "node:util";
5
+ import { Type } from "typebox";
6
+ import { clampInteger, normalizedAction, requiredString, textToolResult, timeoutMs, MAX_TOOL_OUTPUT_CHARS } from "./toolbox-utils.js";
7
+ const execFileAsync = promisify(execFile);
8
+ async function run(command, args, timeout, runner = execFileAsync) {
9
+ try {
10
+ const { stdout, stderr } = await runner(command, args, { timeout, maxBuffer: MAX_TOOL_OUTPUT_CHARS * 2 });
11
+ return [stdout, stderr && `STDERR:\n${stderr}`].filter(Boolean).join("\n").trim();
12
+ }
13
+ catch (error) {
14
+ const stdout = error?.stdout ? String(error.stdout) : "";
15
+ const stderr = error?.stderr ? String(error.stderr) : "";
16
+ const message = [stdout, stderr, error?.message ? `ERROR: ${error.message}` : ""].filter(Boolean).join("\n").trim();
17
+ return message || `ERROR: ${command} failed`;
18
+ }
19
+ }
20
+ function jsonText(value) {
21
+ return JSON.stringify(value, null, 2);
22
+ }
23
+ function prismHome(env = process.env) {
24
+ return env.PRISM_CODING_AGENT_DIR || path.join(env.HOME || process.env.HOME || ".", ".prism");
25
+ }
26
+ function createPrismRuntimeStatusTool() {
27
+ return {
28
+ name: "prism_runtime_status",
29
+ label: "Prism Runtime Status",
30
+ description: "Inspect local Prism runtime/config paths, package version, pi dependency versions, sessions DB, and auth profile marker.",
31
+ tags: ["prism", "runtime", "version", "config", "sessions", "auth", "diagnostic"],
32
+ source: "toolbox/prism-diagnostics",
33
+ parameters: Type.Object({ cwd: Type.Optional(Type.String({ description: "Project directory to inspect. Defaults to current working directory." })) }),
34
+ async execute(_id, params, _signal, _onUpdate, ctx) {
35
+ const env = ctx?.env ?? process.env;
36
+ const cwd = path.resolve(String(params.cwd || ctx?.cwd || process.cwd()));
37
+ const packagePath = path.join(cwd, "package.json");
38
+ const pkg = fs.existsSync(packagePath) ? JSON.parse(fs.readFileSync(packagePath, "utf-8")) : undefined;
39
+ const home = prismHome(env);
40
+ const authProfilePath = path.join(home, "auth.profile");
41
+ const sessionsDb = path.join(home, "sessions.db");
42
+ const result = {
43
+ cwd,
44
+ package: pkg ? { name: pkg.name, version: pkg.version, piCodingAgent: pkg.dependencies?.["@earendil-works/pi-coding-agent"], piAi: pkg.dependencies?.["@earendil-works/pi-ai"] } : undefined,
45
+ prismHome: home,
46
+ settingsPath: path.join(home, "settings.json"),
47
+ settingsExists: fs.existsSync(path.join(home, "settings.json")),
48
+ sessionsDb,
49
+ sessionsDbExists: fs.existsSync(sessionsDb),
50
+ authProfile: fs.existsSync(authProfilePath) ? fs.readFileSync(authProfilePath, "utf-8").trim() : undefined,
51
+ env: {
52
+ PRISM_AI_MEMORY_BASE_URL: env.PRISM_AI_MEMORY_BASE_URL,
53
+ PRISM_OBSIDIAN_VAULT_NAME: env.PRISM_OBSIDIAN_VAULT_NAME,
54
+ PRISM_OBSIDIAN_VAULT: env.PRISM_OBSIDIAN_VAULT,
55
+ PRISM_CODING_AGENT_DIR: env.PRISM_CODING_AGENT_DIR,
56
+ },
57
+ };
58
+ return textToolResult(jsonText(result), result);
59
+ },
60
+ };
61
+ }
62
+ function createGiteaPackageVersionTool() {
63
+ return {
64
+ name: "gitea_package_version",
65
+ label: "Gitea Package Version",
66
+ description: "Check a Gitea/npm package metadata endpoint for the latest published version.",
67
+ tags: ["gitea", "package", "npm", "version", "registry", "prism", "deploy"],
68
+ source: "toolbox/prism-diagnostics",
69
+ parameters: Type.Object({
70
+ registry: Type.Optional(Type.String({ description: "Registry base URL. Default https://git.yiprawr.dev/api/packages/ai/npm" })),
71
+ packageName: Type.Optional(Type.String({ description: "Package name. Default @ai/prism" })),
72
+ timeoutMs: Type.Optional(Type.Number({ description: "Request timeout in milliseconds. Default 5000." })),
73
+ }),
74
+ async execute(_id, params) {
75
+ const registry = String(params.registry || "https://git.yiprawr.dev/api/packages/ai/npm").replace(/\/+$/, "");
76
+ const packageName = String(params.packageName || "@ai/prism");
77
+ const encodedName = packageName.startsWith("@") ? `@${encodeURIComponent(packageName.slice(1))}` : encodeURIComponent(packageName);
78
+ const url = `${registry}/${encodedName}`;
79
+ const started = Date.now();
80
+ const response = await fetch(url, { signal: AbortSignal.timeout(timeoutMs(params.timeoutMs, 5_000)), headers: { accept: "application/json" } });
81
+ const body = await response.text();
82
+ const ms = Date.now() - started;
83
+ if (!response.ok)
84
+ return textToolResult(`${response.status} ${response.statusText} (${ms}ms)\n${body.slice(0, 2000)}`, { ok: false, status: response.status, ms, url });
85
+ const data = JSON.parse(body);
86
+ const result = { ok: true, url, ms, name: data.name, latest: data?.["dist-tags"]?.latest, versions: Object.keys(data.versions ?? {}).slice(-10) };
87
+ return textToolResult(jsonText(result), result);
88
+ },
89
+ };
90
+ }
91
+ function createPortainerWebhookTool() {
92
+ return {
93
+ name: "portainer_webhook",
94
+ label: "Portainer Webhook",
95
+ description: "Inspect or trigger a Portainer webhook URL for stack redeploys. Defaults to dry-run.",
96
+ tags: ["portainer", "webhook", "redeploy", "docker", "stack", "deploy"],
97
+ source: "toolbox/prism-diagnostics",
98
+ parameters: Type.Object({
99
+ url: Type.String({ description: "Portainer webhook URL." }),
100
+ action: Type.Optional(Type.String({ description: "dry-run or trigger. Default dry-run." })),
101
+ timeoutMs: Type.Optional(Type.Number({ description: "Request timeout in milliseconds. Default 10000." })),
102
+ }),
103
+ async execute(_id, params) {
104
+ const url = requiredString(params.url, "url");
105
+ if (!/^https?:\/\//i.test(url))
106
+ throw new Error("url must start with http:// or https://");
107
+ const action = normalizedAction(params.action, "dry-run");
108
+ if (action === "dry-run")
109
+ return textToolResult(`Dry-run only. Would POST Portainer webhook:\n${url}`, { action, url });
110
+ if (action !== "trigger")
111
+ throw new Error("action must be dry-run or trigger");
112
+ const started = Date.now();
113
+ const response = await fetch(url, { method: "POST", signal: AbortSignal.timeout(timeoutMs(params.timeoutMs, 10_000)) });
114
+ const body = await response.text();
115
+ const result = { action, url, status: response.status, ok: response.ok, ms: Date.now() - started, body: body.slice(0, 2000) };
116
+ return textToolResult(jsonText(result), result);
117
+ },
118
+ };
119
+ }
120
+ function createPrismDeployCheckTool() {
121
+ return {
122
+ name: "prism_deploy_check",
123
+ label: "Prism Deploy Check",
124
+ description: "Run read-only checks for a deployed Prism SSH/tmux container over SSH: docker ps, image id, and recent logs.",
125
+ tags: ["prism", "deploy", "ssh", "docker", "container", "logs", "portainer", "zeus"],
126
+ source: "toolbox/prism-diagnostics",
127
+ parameters: Type.Object({
128
+ host: Type.String({ description: "SSH host alias." }),
129
+ container: Type.Optional(Type.String({ description: "Container name. Default prism-ssh." })),
130
+ lines: Type.Optional(Type.Number({ description: "Recent log lines. Default 80." })),
131
+ timeoutMs: Type.Optional(Type.Number({ description: "SSH timeout in milliseconds. Default 30000." })),
132
+ }),
133
+ async execute(_id, params, _signal, _onUpdate, ctx) {
134
+ const host = requiredString(params.host, "host");
135
+ const container = String(params.container || "prism-ssh");
136
+ const lines = clampInteger(params.lines, 80, 1, 500);
137
+ const remote = [
138
+ `echo '== container =='; docker ps --filter name=${JSON.stringify(container)} --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}'`,
139
+ `echo; echo '== image =='; docker inspect ${JSON.stringify(container)} --format '{{.Image}} {{.Config.Image}}' 2>/dev/null || true`,
140
+ `echo; echo '== logs =='; docker logs --tail ${lines} ${JSON.stringify(container)} 2>&1 || true`,
141
+ ].join("; ");
142
+ const output = await run("ssh", ["-o", "BatchMode=yes", host, remote], timeoutMs(params.timeoutMs, 30_000), ctx?.execFileAsync ?? execFileAsync);
143
+ return textToolResult(output || `No Prism deploy output from ${host}.`, { host, container, lines });
144
+ },
145
+ };
146
+ }
147
+ export function createPrismDiagnosticToolboxTools() {
148
+ return [
149
+ createPrismRuntimeStatusTool(),
150
+ createGiteaPackageVersionTool(),
151
+ createPortainerWebhookTool(),
152
+ createPrismDeployCheckTool(),
153
+ ];
154
+ }
155
+ //# sourceMappingURL=prism-diagnostic-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prism-diagnostic-tools.js","sourceRoot":"","sources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,CAAC;KACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,iCAAiC;IAC/C,OAAO;QACL,4BAA4B,EAAE;QAC9B,6BAA6B,EAAE;QAC/B,0BAA0B,EAAE;QAC5B,0BAA0B,EAAE;KAC7B,CAAA;AACH,CAAC"}
@@ -19,6 +19,7 @@ export type ToolboxSearchResult = {
19
19
  };
20
20
  export declare function normalizeToolboxToolName(input: string): string | undefined;
21
21
  export declare function searchToolboxTools(tools: ToolboxToolDefinition[], query: string, limit?: number): ToolboxSearchResult[];
22
+ export declare function suggestToolboxToolsForPrompt(tools: ToolboxToolDefinition[], prompt: string, limit?: number): ToolboxSearchResult[];
22
23
  export declare function createToolboxRegistry(): {
23
24
  register: (definition: ToolboxToolDefinition) => {
24
25
  ok: true;
@@ -1,6 +1,6 @@
1
1
  import { Type } from "typebox";
2
2
  import { createBuiltinToolboxTools } from "./builtin-tools.js";
3
- import { fuzzyFilter } from "../core/fuzzy.js";
3
+ import { fuzzyScore } from "../core/fuzzy.js";
4
4
  import { formatBracketedToolCall, renderSingleLineToolCall } from "../ui/tool-call-rendering.js";
5
5
  export function normalizeToolboxToolName(input) {
6
6
  const name = input.trim().toLowerCase();
@@ -11,11 +11,33 @@ export function normalizeToolboxToolName(input) {
11
11
  function toolSearchText(tool) {
12
12
  return [tool.name, tool.label, tool.description, ...(tool.tags ?? []), tool.source].filter(Boolean).join(" ").toLowerCase();
13
13
  }
14
+ function toolboxSearchScore(tool, query) {
15
+ const text = toolSearchText(tool);
16
+ const fullScore = fuzzyScore(text, query);
17
+ if (fullScore >= 0)
18
+ return fullScore + 100_000;
19
+ const terms = query.toLowerCase().trim().split(/\s+/).filter(Boolean);
20
+ if (terms.length === 0)
21
+ return 1;
22
+ let matchedTerms = 0;
23
+ let score = 0;
24
+ for (const term of terms) {
25
+ const termScore = fuzzyScore(text, term);
26
+ if (termScore >= 0) {
27
+ matchedTerms += 1;
28
+ score += termScore;
29
+ }
30
+ }
31
+ return matchedTerms > 0 ? matchedTerms * 10_000 + score : -1;
32
+ }
14
33
  export function searchToolboxTools(tools, query, limit = 10) {
15
34
  const safeLimit = Math.max(1, Math.min(50, Math.trunc(Number(limit) || 10)));
16
- return fuzzyFilter(tools, query, toolSearchText, (a, b) => a.name.localeCompare(b.name))
35
+ return tools
36
+ .map((tool) => ({ tool, score: toolboxSearchScore(tool, query) }))
37
+ .filter((entry) => entry.score >= 0)
38
+ .sort((a, b) => b.score - a.score || a.tool.name.localeCompare(b.tool.name))
17
39
  .slice(0, safeLimit)
18
- .map((tool) => ({
40
+ .map(({ tool }) => ({
19
41
  name: tool.name,
20
42
  label: tool.label ?? tool.name,
21
43
  description: tool.description,
@@ -32,6 +54,49 @@ function formatResults(results) {
32
54
  return `- ${tool.name}${tags}\n ${tool.description}\n source: ${tool.source}\n parameters: ${JSON.stringify(tool.parameters ?? { type: "object", properties: {} })}`;
33
55
  }).join("\n");
34
56
  }
57
+ const AUTO_SUGGEST_DOMAIN_TERMS = new Set([
58
+ "backup", "borg", "container", "deploy", "diagnostic", "docker", "gitea", "health", "http", "logs", "netbird", "npm", "opnsense", "package", "pfsense", "port", "portainer", "process", "prism", "registry", "redeploy", "router", "runtime", "service", "services", "ssh", "stack", "status", "systemd", "vpn", "webhook",
59
+ ]);
60
+ const AUTO_SUGGEST_STOPWORDS = new Set([
61
+ "about", "after", "again", "also", "and", "are", "can", "check", "could", "did", "does", "for", "from", "get", "had", "has", "have", "how", "into", "lets", "like", "need", "now", "please", "show", "that", "the", "then", "they", "this", "tool", "tools", "use", "was", "what", "when", "with", "would", "yes", "you",
62
+ ]);
63
+ function tokenizeForAutoSuggest(text) {
64
+ return new Set((text.toLowerCase().match(/[a-z0-9][a-z0-9_-]{1,}/g) ?? []).filter((term) => !AUTO_SUGGEST_STOPWORDS.has(term)));
65
+ }
66
+ function hasAutoSuggestIntent(promptTerms) {
67
+ for (const term of promptTerms) {
68
+ if (AUTO_SUGGEST_DOMAIN_TERMS.has(term))
69
+ return true;
70
+ }
71
+ return false;
72
+ }
73
+ function autoSuggestOverlap(tool, promptTerms) {
74
+ const toolTerms = tokenizeForAutoSuggest([tool.name, tool.label, tool.description, ...tool.tags, tool.source].filter(Boolean).join(" "));
75
+ let overlap = 0;
76
+ for (const term of promptTerms) {
77
+ if (toolTerms.has(term))
78
+ overlap += AUTO_SUGGEST_DOMAIN_TERMS.has(term) ? 2 : 1;
79
+ }
80
+ return overlap;
81
+ }
82
+ export function suggestToolboxToolsForPrompt(tools, prompt, limit = 3) {
83
+ const query = String(prompt ?? "").trim();
84
+ if (!query)
85
+ return [];
86
+ const promptTerms = tokenizeForAutoSuggest(query);
87
+ if (!hasAutoSuggestIntent(promptTerms))
88
+ return [];
89
+ return searchToolboxTools(tools, query, Math.max(10, limit * 3))
90
+ .filter((tool) => autoSuggestOverlap(tool, promptTerms) >= 2)
91
+ .slice(0, Math.max(1, Math.min(5, Math.trunc(Number(limit) || 3))));
92
+ }
93
+ function formatAutoSuggestions(results) {
94
+ return [
95
+ "Relevant hidden toolbox tools for this request. These are suggestions only; use toolbox_search if you need schemas/details, then toolbox_execute if one is useful.",
96
+ "",
97
+ ...results.map((tool) => `- ${tool.name} — ${tool.description}`),
98
+ ].join("\n");
99
+ }
35
100
  export function createToolboxRegistry() {
36
101
  const tools = new Map();
37
102
  function register(definition) {
@@ -106,6 +171,19 @@ export default function toolboxExtension(pi) {
106
171
  ctx.ui.notify(formatResults(results), results.length ? "info" : "warning");
107
172
  },
108
173
  });
174
+ pi.on?.("before_agent_start", (event) => {
175
+ const suggestions = suggestToolboxToolsForPrompt(registry.list(), String(event?.prompt ?? ""), 3);
176
+ if (suggestions.length === 0)
177
+ return;
178
+ return {
179
+ message: {
180
+ customType: "toolbox-suggestions",
181
+ display: false,
182
+ content: formatAutoSuggestions(suggestions),
183
+ details: { results: suggestions.map(({ name, source, tags }) => ({ name, source, tags })) },
184
+ },
185
+ };
186
+ });
109
187
  pi.on?.("session_start", (_event, ctx) => {
110
188
  ctx.ui.setStatus?.("toolbox", registry.size() > 0 ? `🧰 ${registry.size()}` : undefined);
111
189
  });
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox.js","sourceRoot":"","sources":["../../../src/prism-extensions/tools/toolbox.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAkB,MAAM,8BAA8B,CAAA;AAEhH,MAAM,UAAU,wBAAwB,CAAC,KAAa;IACpD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;IACvC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAA;IAC1D,OAAO,IAAI,CAAA;AACb,CAAC;AAED,SAAS,cAAc,CAAC,IAA2B;IACjD,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAA;AAC7H,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAA8B,EAAE,KAAa,EAAE,KAAK,GAAG,EAAE;IAC1F,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;IAC5E,OAAO,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC,EAA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,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;YAAE,OAAM;QACpC,OAAO;YACL,OAAO,EAAE;gBACP,UAAU,EAAE,qBAAqB;gBACjC,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,qBAAqB,CAAC,WAAW,CAAC;gBAC3C,OAAO,EAAE,EAAE,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE;aAC5F;SACF,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,EAAE,EAAE,CAAC,eAAe,EAAE,CAAC,MAAW,EAAE,GAAQ,EAAE,EAAE;QACjD,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IAC1F,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -103,26 +103,42 @@ export function contextBarLabel(usage) {
103
103
  const filled = Math.max(0, Math.min(10, Math.round(used / 10)));
104
104
  return `[${"█".repeat(filled)}${"░".repeat(10 - filled)}] ${Math.round(used)}% used | ${Math.round(left)}% left`;
105
105
  }
106
+ function numeric(value) {
107
+ const n = Number(value);
108
+ return Number.isFinite(n) ? n : 0;
109
+ }
110
+ function usageCost(usage) {
111
+ const cost = usage?.cost;
112
+ if (cost && typeof cost === "object")
113
+ return numeric(cost.total ?? numeric(cost.input) + numeric(cost.output) + numeric(cost.cacheRead) + numeric(cost.cacheWrite));
114
+ return numeric(cost);
115
+ }
116
+ function addUsage(stats, usage) {
117
+ stats.input += numeric(usage?.input ?? usage?.inputTokens);
118
+ stats.output += numeric(usage?.output ?? usage?.outputTokens);
119
+ stats.cost += usageCost(usage);
120
+ }
106
121
  export function sessionStats(ctx) {
107
- let toolCalls = 0;
108
- let input = 0;
109
- let output = 0;
110
- let cost = 0;
122
+ const stats = { toolCalls: 0, input: 0, output: 0, cost: 0 };
111
123
  const entries = ctx?.sessionManager?.getEntries?.() ?? [];
112
124
  for (const entry of entries) {
113
125
  const message = entry.message ?? entry.data?.message;
114
- if (entry.type !== "message" && entry.data?.type !== "message")
115
- continue;
116
- if (message?.role !== "assistant")
117
- continue;
118
- for (const block of message.content ?? [])
119
- if (block?.type === "toolCall")
120
- toolCalls += 1;
121
- input += Number(message.usage?.input ?? message.usage?.inputTokens ?? 0);
122
- output += Number(message.usage?.output ?? message.usage?.outputTokens ?? 0);
123
- cost += Number(message.usage?.cost?.total ?? message.usage?.cost ?? 0);
126
+ if (entry.type === "message" || entry.data?.type === "message") {
127
+ if (message?.role === "assistant") {
128
+ for (const block of message.content ?? [])
129
+ if (block?.type === "toolCall")
130
+ stats.toolCalls += 1;
131
+ addUsage(stats, message.usage);
132
+ }
133
+ else if (message?.role === "toolResult") {
134
+ addUsage(stats, message.usage);
135
+ }
136
+ }
137
+ else if ((entry.type === "branch_summary" || entry.type === "compaction") && entry.usage) {
138
+ addUsage(stats, entry.usage);
139
+ }
124
140
  }
125
- return { toolCalls, input, output, cost };
141
+ return stats;
126
142
  }
127
143
  export function joinDistributed(parts, width) {
128
144
  if (parts.length === 0)
@@ -176,7 +192,8 @@ class ToolbarFooter {
176
192
  const caveman = cavemanLabel(statuses?.get("caveman-mode") ?? statuses?.get("caveman"));
177
193
  const obsidian = statuses?.get("obsidian-memory");
178
194
  const logseq = statuses?.get("logseq-memory");
179
- return [joinDistributed([mode ? fg(this.theme, "success", mode) : undefined, model, fg(this.theme, "accent", `🔧 ${toolCalls}`), fg(this.theme, "dim", `↑${formatTokens(input)}`), fg(this.theme, "dim", `↓${formatTokens(output)}`), fg(this.theme, "success", `$${cost.toFixed(4)}`), context, caveman, obsidian, logseq, thinking].filter(Boolean), Math.max(0, width))];
195
+ const aiMemory = statuses?.get("ai-memory");
196
+ return [joinDistributed([mode ? fg(this.theme, "success", mode) : undefined, model, fg(this.theme, "accent", `🔧 ${toolCalls}`), fg(this.theme, "dim", `↑${formatTokens(input)}`), fg(this.theme, "dim", `↓${formatTokens(output)}`), fg(this.theme, "success", `$${cost.toFixed(4)}`), context, caveman, obsidian, logseq, aiMemory ? `AI Memory: ${aiMemory}` : undefined, thinking].filter(Boolean), Math.max(0, width))];
180
197
  }
181
198
  }
182
199
  export default function toolbarExtension(pi) {