aec-agent 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (574) hide show
  1. package/README.md +1 -0
  2. package/dist/agent-core.d.ts +81 -0
  3. package/dist/agent-core.d.ts.map +1 -0
  4. package/dist/agent-core.js +168 -0
  5. package/dist/agent-core.js.map +1 -0
  6. package/dist/components/artifact-hub/agent-artifact-view.d.ts +31 -0
  7. package/dist/components/artifact-hub/agent-artifact-view.d.ts.map +1 -0
  8. package/dist/components/artifact-hub/agent-artifact-view.js +264 -0
  9. package/dist/components/artifact-hub/agent-artifact-view.js.map +1 -0
  10. package/dist/components/artifact-hub/artifact-hub.d.ts +25 -0
  11. package/dist/components/artifact-hub/artifact-hub.d.ts.map +1 -0
  12. package/dist/components/artifact-hub/artifact-hub.js +39 -0
  13. package/dist/components/artifact-hub/artifact-hub.js.map +1 -0
  14. package/dist/components/artifact-hub/types/artifact.d.ts +158 -0
  15. package/dist/components/artifact-hub/types/artifact.d.ts.map +1 -0
  16. package/dist/components/artifact-hub/types/artifact.js +14 -0
  17. package/dist/components/artifact-hub/types/artifact.js.map +1 -0
  18. package/dist/components/event-handler/event-dispatcher.d.ts +17 -0
  19. package/dist/components/event-handler/event-dispatcher.d.ts.map +1 -0
  20. package/dist/components/event-handler/event-dispatcher.js +47 -0
  21. package/dist/components/event-handler/event-dispatcher.js.map +1 -0
  22. package/dist/components/event-handler/events.d.ts +154 -0
  23. package/dist/components/event-handler/events.d.ts.map +1 -0
  24. package/dist/components/event-handler/events.js +28 -0
  25. package/dist/components/event-handler/events.js.map +1 -0
  26. package/dist/components/event-handler/types.d.ts +10 -0
  27. package/dist/components/event-handler/types.d.ts.map +1 -0
  28. package/dist/components/event-handler/types.js +2 -0
  29. package/dist/components/event-handler/types.js.map +1 -0
  30. package/dist/components/llm-provider-hub/llm-provider-hub.d.ts +14 -0
  31. package/dist/components/llm-provider-hub/llm-provider-hub.d.ts.map +1 -0
  32. package/dist/components/llm-provider-hub/llm-provider-hub.js +34 -0
  33. package/dist/components/llm-provider-hub/llm-provider-hub.js.map +1 -0
  34. package/dist/components/llm-provider-hub/providers/anthropic-provider.d.ts +22 -0
  35. package/dist/components/llm-provider-hub/providers/anthropic-provider.d.ts.map +1 -0
  36. package/dist/components/llm-provider-hub/providers/anthropic-provider.js +249 -0
  37. package/dist/components/llm-provider-hub/providers/anthropic-provider.js.map +1 -0
  38. package/dist/components/llm-provider-hub/providers/bedrock-provider.d.ts +28 -0
  39. package/dist/components/llm-provider-hub/providers/bedrock-provider.d.ts.map +1 -0
  40. package/dist/components/llm-provider-hub/providers/bedrock-provider.js +345 -0
  41. package/dist/components/llm-provider-hub/providers/bedrock-provider.js.map +1 -0
  42. package/dist/components/llm-provider-hub/providers/model-info-mappers.d.ts +6 -0
  43. package/dist/components/llm-provider-hub/providers/model-info-mappers.d.ts.map +1 -0
  44. package/dist/components/llm-provider-hub/providers/model-info-mappers.js +267 -0
  45. package/dist/components/llm-provider-hub/providers/model-info-mappers.js.map +1 -0
  46. package/dist/components/llm-provider-hub/providers/openai-compatible-provider.d.ts +24 -0
  47. package/dist/components/llm-provider-hub/providers/openai-compatible-provider.d.ts.map +1 -0
  48. package/dist/components/llm-provider-hub/providers/openai-compatible-provider.js +243 -0
  49. package/dist/components/llm-provider-hub/providers/openai-compatible-provider.js.map +1 -0
  50. package/dist/components/llm-provider-hub/providers/openai-subscription-provider.d.ts +29 -0
  51. package/dist/components/llm-provider-hub/providers/openai-subscription-provider.d.ts.map +1 -0
  52. package/dist/components/llm-provider-hub/providers/openai-subscription-provider.js +299 -0
  53. package/dist/components/llm-provider-hub/providers/openai-subscription-provider.js.map +1 -0
  54. package/dist/components/llm-provider-hub/providers/registry.d.ts +6 -0
  55. package/dist/components/llm-provider-hub/providers/registry.d.ts.map +1 -0
  56. package/dist/components/llm-provider-hub/providers/registry.js +33 -0
  57. package/dist/components/llm-provider-hub/providers/registry.js.map +1 -0
  58. package/dist/components/llm-provider-hub/providers/types.d.ts +29 -0
  59. package/dist/components/llm-provider-hub/providers/types.d.ts.map +1 -0
  60. package/dist/components/llm-provider-hub/providers/types.js +2 -0
  61. package/dist/components/llm-provider-hub/providers/types.js.map +1 -0
  62. package/dist/components/llm-provider-hub/types.d.ts +84 -0
  63. package/dist/components/llm-provider-hub/types.d.ts.map +1 -0
  64. package/dist/components/llm-provider-hub/types.js +6 -0
  65. package/dist/components/llm-provider-hub/types.js.map +1 -0
  66. package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.d.ts +85 -0
  67. package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.d.ts.map +1 -0
  68. package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.js +500 -0
  69. package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.js.map +1 -0
  70. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/abort.d.ts +29 -0
  71. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/abort.d.ts.map +1 -0
  72. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/abort.js +98 -0
  73. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/abort.js.map +1 -0
  74. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.d.ts +16 -0
  75. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.d.ts.map +1 -0
  76. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.js +116 -0
  77. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.js.map +1 -0
  78. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.types.d.ts +41 -0
  79. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.types.d.ts.map +1 -0
  80. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.types.js +2 -0
  81. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.types.js.map +1 -0
  82. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.d.ts +69 -0
  83. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.d.ts.map +1 -0
  84. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.js +147 -0
  85. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.js.map +1 -0
  86. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.d.ts +55 -0
  87. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.d.ts.map +1 -0
  88. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.js +406 -0
  89. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.js.map +1 -0
  90. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.d.ts +19 -0
  91. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.d.ts.map +1 -0
  92. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.js +28 -0
  93. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.js.map +1 -0
  94. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.d.ts +17 -0
  95. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.d.ts.map +1 -0
  96. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.js +55 -0
  97. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.js.map +1 -0
  98. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.types.d.ts +3 -0
  99. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.types.d.ts.map +1 -0
  100. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.types.js +2 -0
  101. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.types.js.map +1 -0
  102. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/tool-pairing.d.ts +20 -0
  103. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/tool-pairing.d.ts.map +1 -0
  104. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/tool-pairing.js +56 -0
  105. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/tool-pairing.js.map +1 -0
  106. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/llm-input.d.ts +23 -0
  107. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/llm-input.d.ts.map +1 -0
  108. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/llm-input.js +127 -0
  109. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/llm-input.js.map +1 -0
  110. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.d.ts +9 -0
  111. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.d.ts.map +1 -0
  112. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.js +40 -0
  113. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.js.map +1 -0
  114. package/dist/components/multi-agent-orchestration/agent/agent-loop/types.d.ts +135 -0
  115. package/dist/components/multi-agent-orchestration/agent/agent-loop/types.d.ts.map +1 -0
  116. package/dist/components/multi-agent-orchestration/agent/agent-loop/types.js +31 -0
  117. package/dist/components/multi-agent-orchestration/agent/agent-loop/types.js.map +1 -0
  118. package/dist/components/multi-agent-orchestration/agent/agent.d.ts +93 -0
  119. package/dist/components/multi-agent-orchestration/agent/agent.d.ts.map +1 -0
  120. package/dist/components/multi-agent-orchestration/agent/agent.js +223 -0
  121. package/dist/components/multi-agent-orchestration/agent/agent.js.map +1 -0
  122. package/dist/components/multi-agent-orchestration/agent/artifact-manager/artifact-manager.d.ts +18 -0
  123. package/dist/components/multi-agent-orchestration/agent/artifact-manager/artifact-manager.d.ts.map +1 -0
  124. package/dist/components/multi-agent-orchestration/agent/artifact-manager/artifact-manager.js +20 -0
  125. package/dist/components/multi-agent-orchestration/agent/artifact-manager/artifact-manager.js.map +1 -0
  126. package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.d.ts +6 -0
  127. package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.d.ts.map +1 -0
  128. package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.js +6 -0
  129. package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.js.map +1 -0
  130. package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.d.ts +22 -0
  131. package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.d.ts.map +1 -0
  132. package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.js +52 -0
  133. package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.js.map +1 -0
  134. package/dist/components/multi-agent-orchestration/agent/context-manager/types.d.ts +13 -0
  135. package/dist/components/multi-agent-orchestration/agent/context-manager/types.d.ts.map +1 -0
  136. package/dist/components/multi-agent-orchestration/agent/context-manager/types.js +2 -0
  137. package/dist/components/multi-agent-orchestration/agent/context-manager/types.js.map +1 -0
  138. package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.d.ts +25 -0
  139. package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.d.ts.map +1 -0
  140. package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.js +74 -0
  141. package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.js.map +1 -0
  142. package/dist/components/multi-agent-orchestration/agent/memory-system/components/consolidation-scheduler.d.ts +57 -0
  143. package/dist/components/multi-agent-orchestration/agent/memory-system/components/consolidation-scheduler.d.ts.map +1 -0
  144. package/dist/components/multi-agent-orchestration/agent/memory-system/components/consolidation-scheduler.js +185 -0
  145. package/dist/components/multi-agent-orchestration/agent/memory-system/components/consolidation-scheduler.js.map +1 -0
  146. package/dist/components/multi-agent-orchestration/agent/memory-system/components/dreaming.d.ts +38 -0
  147. package/dist/components/multi-agent-orchestration/agent/memory-system/components/dreaming.d.ts.map +1 -0
  148. package/dist/components/multi-agent-orchestration/agent/memory-system/components/dreaming.js +89 -0
  149. package/dist/components/multi-agent-orchestration/agent/memory-system/components/dreaming.js.map +1 -0
  150. package/dist/components/multi-agent-orchestration/agent/memory-system/components/indexing.d.ts +30 -0
  151. package/dist/components/multi-agent-orchestration/agent/memory-system/components/indexing.d.ts.map +1 -0
  152. package/dist/components/multi-agent-orchestration/agent/memory-system/components/indexing.js +91 -0
  153. package/dist/components/multi-agent-orchestration/agent/memory-system/components/indexing.js.map +1 -0
  154. package/dist/components/multi-agent-orchestration/agent/memory-system/components/learning.d.ts +3 -0
  155. package/dist/components/multi-agent-orchestration/agent/memory-system/components/learning.d.ts.map +1 -0
  156. package/dist/components/multi-agent-orchestration/agent/memory-system/components/learning.js +3 -0
  157. package/dist/components/multi-agent-orchestration/agent/memory-system/components/learning.js.map +1 -0
  158. package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.d.ts +22 -0
  159. package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.d.ts.map +1 -0
  160. package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.js +196 -0
  161. package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.js.map +1 -0
  162. package/dist/components/multi-agent-orchestration/agent/memory-system/components/retrieval.d.ts +17 -0
  163. package/dist/components/multi-agent-orchestration/agent/memory-system/components/retrieval.d.ts.map +1 -0
  164. package/dist/components/multi-agent-orchestration/agent/memory-system/components/retrieval.js +114 -0
  165. package/dist/components/multi-agent-orchestration/agent/memory-system/components/retrieval.js.map +1 -0
  166. package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.d.ts +89 -0
  167. package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.d.ts.map +1 -0
  168. package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.js +178 -0
  169. package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.js.map +1 -0
  170. package/dist/components/multi-agent-orchestration/agent/memory-system/types/config.d.ts +29 -0
  171. package/dist/components/multi-agent-orchestration/agent/memory-system/types/config.d.ts.map +1 -0
  172. package/dist/components/multi-agent-orchestration/agent/memory-system/types/config.js +2 -0
  173. package/dist/components/multi-agent-orchestration/agent/memory-system/types/config.js.map +1 -0
  174. package/dist/components/multi-agent-orchestration/agent/memory-system/types/pipeline.d.ts +33 -0
  175. package/dist/components/multi-agent-orchestration/agent/memory-system/types/pipeline.d.ts.map +1 -0
  176. package/dist/components/multi-agent-orchestration/agent/memory-system/types/pipeline.js +2 -0
  177. package/dist/components/multi-agent-orchestration/agent/memory-system/types/pipeline.js.map +1 -0
  178. package/dist/components/multi-agent-orchestration/agent/memory-system/types/record.d.ts +27 -0
  179. package/dist/components/multi-agent-orchestration/agent/memory-system/types/record.d.ts.map +1 -0
  180. package/dist/components/multi-agent-orchestration/agent/memory-system/types/record.js +5 -0
  181. package/dist/components/multi-agent-orchestration/agent/memory-system/types/record.js.map +1 -0
  182. package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.d.ts +39 -0
  183. package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.d.ts.map +1 -0
  184. package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.js +70 -0
  185. package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.js.map +1 -0
  186. package/dist/components/multi-agent-orchestration/agent/sandbox-manager/sandbox-manager.d.ts +43 -0
  187. package/dist/components/multi-agent-orchestration/agent/sandbox-manager/sandbox-manager.d.ts.map +1 -0
  188. package/dist/components/multi-agent-orchestration/agent/sandbox-manager/sandbox-manager.js +126 -0
  189. package/dist/components/multi-agent-orchestration/agent/sandbox-manager/sandbox-manager.js.map +1 -0
  190. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.d.ts +38 -0
  191. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.d.ts.map +1 -0
  192. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.js +155 -0
  193. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.js.map +1 -0
  194. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.d.ts +27 -0
  195. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.d.ts.map +1 -0
  196. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.js +2 -0
  197. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.js.map +1 -0
  198. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-index.d.ts +6 -0
  199. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-index.d.ts.map +1 -0
  200. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-index.js +43 -0
  201. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-index.js.map +1 -0
  202. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.d.ts +56 -0
  203. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.d.ts.map +1 -0
  204. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.js +107 -0
  205. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.js.map +1 -0
  206. package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.d.ts +20 -0
  207. package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.d.ts.map +1 -0
  208. package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.js +28 -0
  209. package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.js.map +1 -0
  210. package/dist/components/multi-agent-orchestration/agent/types.d.ts +44 -0
  211. package/dist/components/multi-agent-orchestration/agent/types.d.ts.map +1 -0
  212. package/dist/components/multi-agent-orchestration/agent/types.js +2 -0
  213. package/dist/components/multi-agent-orchestration/agent/types.js.map +1 -0
  214. package/dist/components/multi-agent-orchestration/multi-agent-orchestration.d.ts +23 -0
  215. package/dist/components/multi-agent-orchestration/multi-agent-orchestration.d.ts.map +1 -0
  216. package/dist/components/multi-agent-orchestration/multi-agent-orchestration.js +42 -0
  217. package/dist/components/multi-agent-orchestration/multi-agent-orchestration.js.map +1 -0
  218. package/dist/components/persistence-hub/default-stores/memory-agent-store.d.ts +10 -0
  219. package/dist/components/persistence-hub/default-stores/memory-agent-store.d.ts.map +1 -0
  220. package/dist/components/persistence-hub/default-stores/memory-agent-store.js +16 -0
  221. package/dist/components/persistence-hub/default-stores/memory-agent-store.js.map +1 -0
  222. package/dist/components/persistence-hub/default-stores/memory-artifact-store.d.ts +16 -0
  223. package/dist/components/persistence-hub/default-stores/memory-artifact-store.d.ts.map +1 -0
  224. package/dist/components/persistence-hub/default-stores/memory-artifact-store.js +70 -0
  225. package/dist/components/persistence-hub/default-stores/memory-artifact-store.js.map +1 -0
  226. package/dist/components/persistence-hub/default-stores/memory-memory-store.d.ts +12 -0
  227. package/dist/components/persistence-hub/default-stores/memory-memory-store.d.ts.map +1 -0
  228. package/dist/components/persistence-hub/default-stores/memory-memory-store.js +51 -0
  229. package/dist/components/persistence-hub/default-stores/memory-memory-store.js.map +1 -0
  230. package/dist/components/persistence-hub/default-stores/memory-message-store.d.ts +12 -0
  231. package/dist/components/persistence-hub/default-stores/memory-message-store.d.ts.map +1 -0
  232. package/dist/components/persistence-hub/default-stores/memory-message-store.js +33 -0
  233. package/dist/components/persistence-hub/default-stores/memory-message-store.js.map +1 -0
  234. package/dist/components/persistence-hub/default-stores/memory-provider-store.d.ts +9 -0
  235. package/dist/components/persistence-hub/default-stores/memory-provider-store.d.ts.map +1 -0
  236. package/dist/components/persistence-hub/default-stores/memory-provider-store.js +16 -0
  237. package/dist/components/persistence-hub/default-stores/memory-provider-store.js.map +1 -0
  238. package/dist/components/persistence-hub/default-stores/memory-session-store.d.ts +12 -0
  239. package/dist/components/persistence-hub/default-stores/memory-session-store.d.ts.map +1 -0
  240. package/dist/components/persistence-hub/default-stores/memory-session-store.js +42 -0
  241. package/dist/components/persistence-hub/default-stores/memory-session-store.js.map +1 -0
  242. package/dist/components/persistence-hub/default-stores/memory-skill-store.d.ts +9 -0
  243. package/dist/components/persistence-hub/default-stores/memory-skill-store.d.ts.map +1 -0
  244. package/dist/components/persistence-hub/default-stores/memory-skill-store.js +20 -0
  245. package/dist/components/persistence-hub/default-stores/memory-skill-store.js.map +1 -0
  246. package/dist/components/persistence-hub/persistence-hub.d.ts +34 -0
  247. package/dist/components/persistence-hub/persistence-hub.d.ts.map +1 -0
  248. package/dist/components/persistence-hub/persistence-hub.js +37 -0
  249. package/dist/components/persistence-hub/persistence-hub.js.map +1 -0
  250. package/dist/components/persistence-hub/types/agent-store.d.ts +8 -0
  251. package/dist/components/persistence-hub/types/agent-store.d.ts.map +1 -0
  252. package/dist/components/persistence-hub/types/agent-store.js +2 -0
  253. package/dist/components/persistence-hub/types/agent-store.js.map +1 -0
  254. package/dist/components/persistence-hub/types/artifact-store.d.ts +33 -0
  255. package/dist/components/persistence-hub/types/artifact-store.d.ts.map +1 -0
  256. package/dist/components/persistence-hub/types/artifact-store.js +2 -0
  257. package/dist/components/persistence-hub/types/artifact-store.js.map +1 -0
  258. package/dist/components/persistence-hub/types/memory-store.d.ts +23 -0
  259. package/dist/components/persistence-hub/types/memory-store.d.ts.map +1 -0
  260. package/dist/components/persistence-hub/types/memory-store.js +2 -0
  261. package/dist/components/persistence-hub/types/memory-store.js.map +1 -0
  262. package/dist/components/persistence-hub/types/message-store.d.ts +27 -0
  263. package/dist/components/persistence-hub/types/message-store.d.ts.map +1 -0
  264. package/dist/components/persistence-hub/types/message-store.js +2 -0
  265. package/dist/components/persistence-hub/types/message-store.js.map +1 -0
  266. package/dist/components/persistence-hub/types/provider-store.d.ts +28 -0
  267. package/dist/components/persistence-hub/types/provider-store.d.ts.map +1 -0
  268. package/dist/components/persistence-hub/types/provider-store.js +5 -0
  269. package/dist/components/persistence-hub/types/provider-store.js.map +1 -0
  270. package/dist/components/persistence-hub/types/session-store.d.ts +15 -0
  271. package/dist/components/persistence-hub/types/session-store.d.ts.map +1 -0
  272. package/dist/components/persistence-hub/types/session-store.js +2 -0
  273. package/dist/components/persistence-hub/types/session-store.js.map +1 -0
  274. package/dist/components/persistence-hub/types/skill-store.d.ts +22 -0
  275. package/dist/components/persistence-hub/types/skill-store.d.ts.map +1 -0
  276. package/dist/components/persistence-hub/types/skill-store.js +2 -0
  277. package/dist/components/persistence-hub/types/skill-store.js.map +1 -0
  278. package/dist/components/sandbox-hub/approval-policy.d.ts +12 -0
  279. package/dist/components/sandbox-hub/approval-policy.d.ts.map +1 -0
  280. package/dist/components/sandbox-hub/approval-policy.js +11 -0
  281. package/dist/components/sandbox-hub/approval-policy.js.map +1 -0
  282. package/dist/components/sandbox-hub/docker/aec-sandbox-image.d.ts +3 -0
  283. package/dist/components/sandbox-hub/docker/aec-sandbox-image.d.ts.map +1 -0
  284. package/dist/components/sandbox-hub/docker/aec-sandbox-image.js +31 -0
  285. package/dist/components/sandbox-hub/docker/aec-sandbox-image.js.map +1 -0
  286. package/dist/components/sandbox-hub/docker/docker-cli.d.ts +32 -0
  287. package/dist/components/sandbox-hub/docker/docker-cli.d.ts.map +1 -0
  288. package/dist/components/sandbox-hub/docker/docker-cli.js +83 -0
  289. package/dist/components/sandbox-hub/docker/docker-cli.js.map +1 -0
  290. package/dist/components/sandbox-hub/docker/docker-sandbox-provider.d.ts +70 -0
  291. package/dist/components/sandbox-hub/docker/docker-sandbox-provider.d.ts.map +1 -0
  292. package/dist/components/sandbox-hub/docker/docker-sandbox-provider.js +166 -0
  293. package/dist/components/sandbox-hub/docker/docker-sandbox-provider.js.map +1 -0
  294. package/dist/components/sandbox-hub/docker/docker-sandbox.d.ts +51 -0
  295. package/dist/components/sandbox-hub/docker/docker-sandbox.d.ts.map +1 -0
  296. package/dist/components/sandbox-hub/docker/docker-sandbox.js +584 -0
  297. package/dist/components/sandbox-hub/docker/docker-sandbox.js.map +1 -0
  298. package/dist/components/sandbox-hub/docker/sandbox-helper.d.ts +4 -0
  299. package/dist/components/sandbox-hub/docker/sandbox-helper.d.ts.map +1 -0
  300. package/dist/components/sandbox-hub/docker/sandbox-helper.js +442 -0
  301. package/dist/components/sandbox-hub/docker/sandbox-helper.js.map +1 -0
  302. package/dist/components/sandbox-hub/docker/types.d.ts +26 -0
  303. package/dist/components/sandbox-hub/docker/types.d.ts.map +1 -0
  304. package/dist/components/sandbox-hub/docker/types.js +2 -0
  305. package/dist/components/sandbox-hub/docker/types.js.map +1 -0
  306. package/dist/components/sandbox-hub/host/host-sandbox-provider.d.ts +34 -0
  307. package/dist/components/sandbox-hub/host/host-sandbox-provider.d.ts.map +1 -0
  308. package/dist/components/sandbox-hub/host/host-sandbox-provider.js +81 -0
  309. package/dist/components/sandbox-hub/host/host-sandbox-provider.js.map +1 -0
  310. package/dist/components/sandbox-hub/host/host-sandbox.d.ts +22 -0
  311. package/dist/components/sandbox-hub/host/host-sandbox.d.ts.map +1 -0
  312. package/dist/components/sandbox-hub/host/host-sandbox.js +508 -0
  313. package/dist/components/sandbox-hub/host/host-sandbox.js.map +1 -0
  314. package/dist/components/sandbox-hub/logical-path.d.ts +28 -0
  315. package/dist/components/sandbox-hub/logical-path.d.ts.map +1 -0
  316. package/dist/components/sandbox-hub/logical-path.js +73 -0
  317. package/dist/components/sandbox-hub/logical-path.js.map +1 -0
  318. package/dist/components/sandbox-hub/sandbox-hub.d.ts +69 -0
  319. package/dist/components/sandbox-hub/sandbox-hub.d.ts.map +1 -0
  320. package/dist/components/sandbox-hub/sandbox-hub.js +216 -0
  321. package/dist/components/sandbox-hub/sandbox-hub.js.map +1 -0
  322. package/dist/components/sandbox-hub/traced-sandbox.d.ts +15 -0
  323. package/dist/components/sandbox-hub/traced-sandbox.d.ts.map +1 -0
  324. package/dist/components/sandbox-hub/traced-sandbox.js +69 -0
  325. package/dist/components/sandbox-hub/traced-sandbox.js.map +1 -0
  326. package/dist/components/sandbox-hub/types/policy.d.ts +40 -0
  327. package/dist/components/sandbox-hub/types/policy.d.ts.map +1 -0
  328. package/dist/components/sandbox-hub/types/policy.js +2 -0
  329. package/dist/components/sandbox-hub/types/policy.js.map +1 -0
  330. package/dist/components/sandbox-hub/types/provider.d.ts +40 -0
  331. package/dist/components/sandbox-hub/types/provider.d.ts.map +1 -0
  332. package/dist/components/sandbox-hub/types/provider.js +2 -0
  333. package/dist/components/sandbox-hub/types/provider.js.map +1 -0
  334. package/dist/components/sandbox-hub/types/sandbox.d.ts +185 -0
  335. package/dist/components/sandbox-hub/types/sandbox.d.ts.map +1 -0
  336. package/dist/components/sandbox-hub/types/sandbox.js +15 -0
  337. package/dist/components/sandbox-hub/types/sandbox.js.map +1 -0
  338. package/dist/components/skill-hub/built-in-skills/essential-skills.d.ts +5 -0
  339. package/dist/components/skill-hub/built-in-skills/essential-skills.d.ts.map +1 -0
  340. package/dist/components/skill-hub/built-in-skills/essential-skills.js +10 -0
  341. package/dist/components/skill-hub/built-in-skills/essential-skills.js.map +1 -0
  342. package/dist/components/skill-hub/built-in-skills/plan.d.ts +3 -0
  343. package/dist/components/skill-hub/built-in-skills/plan.d.ts.map +1 -0
  344. package/dist/components/skill-hub/built-in-skills/plan.js +33 -0
  345. package/dist/components/skill-hub/built-in-skills/plan.js.map +1 -0
  346. package/dist/components/skill-hub/built-in-skills/skill-creator.d.ts +3 -0
  347. package/dist/components/skill-hub/built-in-skills/skill-creator.d.ts.map +1 -0
  348. package/dist/components/skill-hub/built-in-skills/skill-creator.js +186 -0
  349. package/dist/components/skill-hub/built-in-skills/skill-creator.js.map +1 -0
  350. package/dist/components/skill-hub/built-in-skills/web-research.d.ts +3 -0
  351. package/dist/components/skill-hub/built-in-skills/web-research.d.ts.map +1 -0
  352. package/dist/components/skill-hub/built-in-skills/web-research.js +35 -0
  353. package/dist/components/skill-hub/built-in-skills/web-research.js.map +1 -0
  354. package/dist/components/skill-hub/skill-format.d.ts +40 -0
  355. package/dist/components/skill-hub/skill-format.d.ts.map +1 -0
  356. package/dist/components/skill-hub/skill-format.js +378 -0
  357. package/dist/components/skill-hub/skill-format.js.map +1 -0
  358. package/dist/components/skill-hub/skill-hub.d.ts +45 -0
  359. package/dist/components/skill-hub/skill-hub.d.ts.map +1 -0
  360. package/dist/components/skill-hub/skill-hub.js +173 -0
  361. package/dist/components/skill-hub/skill-hub.js.map +1 -0
  362. package/dist/components/skill-hub/types/agent-skills.d.ts +20 -0
  363. package/dist/components/skill-hub/types/agent-skills.d.ts.map +1 -0
  364. package/dist/components/skill-hub/types/agent-skills.js +2 -0
  365. package/dist/components/skill-hub/types/agent-skills.js.map +1 -0
  366. package/dist/components/skill-hub/types/skill.d.ts +55 -0
  367. package/dist/components/skill-hub/types/skill.d.ts.map +1 -0
  368. package/dist/components/skill-hub/types/skill.js +11 -0
  369. package/dist/components/skill-hub/types/skill.js.map +1 -0
  370. package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.d.ts +52 -0
  371. package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.d.ts.map +1 -0
  372. package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.js +143 -0
  373. package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.js.map +1 -0
  374. package/dist/components/tool-hub/built-in-tools/artifacts/create-artifact-tools.d.ts +7 -0
  375. package/dist/components/tool-hub/built-in-tools/artifacts/create-artifact-tools.d.ts.map +1 -0
  376. package/dist/components/tool-hub/built-in-tools/artifacts/create-artifact-tools.js +18 -0
  377. package/dist/components/tool-hub/built-in-tools/artifacts/create-artifact-tools.js.map +1 -0
  378. package/dist/components/tool-hub/built-in-tools/artifacts/list-artifacts-tool.d.ts +16 -0
  379. package/dist/components/tool-hub/built-in-tools/artifacts/list-artifacts-tool.d.ts.map +1 -0
  380. package/dist/components/tool-hub/built-in-tools/artifacts/list-artifacts-tool.js +69 -0
  381. package/dist/components/tool-hub/built-in-tools/artifacts/list-artifacts-tool.js.map +1 -0
  382. package/dist/components/tool-hub/built-in-tools/artifacts/read-artifact-tool.d.ts +16 -0
  383. package/dist/components/tool-hub/built-in-tools/artifacts/read-artifact-tool.d.ts.map +1 -0
  384. package/dist/components/tool-hub/built-in-tools/artifacts/read-artifact-tool.js +79 -0
  385. package/dist/components/tool-hub/built-in-tools/artifacts/read-artifact-tool.js.map +1 -0
  386. package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.d.ts +16 -0
  387. package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.d.ts.map +1 -0
  388. package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.js +105 -0
  389. package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.js.map +1 -0
  390. package/dist/components/tool-hub/built-in-tools/artifacts/types.d.ts +11 -0
  391. package/dist/components/tool-hub/built-in-tools/artifacts/types.d.ts.map +1 -0
  392. package/dist/components/tool-hub/built-in-tools/artifacts/types.js +8 -0
  393. package/dist/components/tool-hub/built-in-tools/artifacts/types.js.map +1 -0
  394. package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.d.ts +17 -0
  395. package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.d.ts.map +1 -0
  396. package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.js +100 -0
  397. package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.js.map +1 -0
  398. package/dist/components/tool-hub/built-in-tools/interaction/clarify-tool.d.ts +16 -0
  399. package/dist/components/tool-hub/built-in-tools/interaction/clarify-tool.d.ts.map +1 -0
  400. package/dist/components/tool-hub/built-in-tools/interaction/clarify-tool.js +94 -0
  401. package/dist/components/tool-hub/built-in-tools/interaction/clarify-tool.js.map +1 -0
  402. package/dist/components/tool-hub/built-in-tools/skills/skill-manage-tool.d.ts +22 -0
  403. package/dist/components/tool-hub/built-in-tools/skills/skill-manage-tool.d.ts.map +1 -0
  404. package/dist/components/tool-hub/built-in-tools/skills/skill-manage-tool.js +226 -0
  405. package/dist/components/tool-hub/built-in-tools/skills/skill-manage-tool.js.map +1 -0
  406. package/dist/components/tool-hub/built-in-tools/skills/skill-view-tool.d.ts +18 -0
  407. package/dist/components/tool-hub/built-in-tools/skills/skill-view-tool.d.ts.map +1 -0
  408. package/dist/components/tool-hub/built-in-tools/skills/skill-view-tool.js +86 -0
  409. package/dist/components/tool-hub/built-in-tools/skills/skill-view-tool.js.map +1 -0
  410. package/dist/components/tool-hub/built-in-tools/skills/skill-workspace.d.ts +26 -0
  411. package/dist/components/tool-hub/built-in-tools/skills/skill-workspace.d.ts.map +1 -0
  412. package/dist/components/tool-hub/built-in-tools/skills/skill-workspace.js +93 -0
  413. package/dist/components/tool-hub/built-in-tools/skills/skill-workspace.js.map +1 -0
  414. package/dist/components/tool-hub/built-in-tools/web/duckduckgo-search-provider.d.ts +28 -0
  415. package/dist/components/tool-hub/built-in-tools/web/duckduckgo-search-provider.d.ts.map +1 -0
  416. package/dist/components/tool-hub/built-in-tools/web/duckduckgo-search-provider.js +116 -0
  417. package/dist/components/tool-hub/built-in-tools/web/duckduckgo-search-provider.js.map +1 -0
  418. package/dist/components/tool-hub/built-in-tools/web/html-to-text.d.ts +14 -0
  419. package/dist/components/tool-hub/built-in-tools/web/html-to-text.d.ts.map +1 -0
  420. package/dist/components/tool-hub/built-in-tools/web/html-to-text.js +158 -0
  421. package/dist/components/tool-hub/built-in-tools/web/html-to-text.js.map +1 -0
  422. package/dist/components/tool-hub/built-in-tools/web/network-guard.d.ts +21 -0
  423. package/dist/components/tool-hub/built-in-tools/web/network-guard.d.ts.map +1 -0
  424. package/dist/components/tool-hub/built-in-tools/web/network-guard.js +106 -0
  425. package/dist/components/tool-hub/built-in-tools/web/network-guard.js.map +1 -0
  426. package/dist/components/tool-hub/built-in-tools/web/types.d.ts +23 -0
  427. package/dist/components/tool-hub/built-in-tools/web/types.d.ts.map +1 -0
  428. package/dist/components/tool-hub/built-in-tools/web/types.js +5 -0
  429. package/dist/components/tool-hub/built-in-tools/web/types.js.map +1 -0
  430. package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.d.ts +37 -0
  431. package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.d.ts.map +1 -0
  432. package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.js +206 -0
  433. package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.js.map +1 -0
  434. package/dist/components/tool-hub/built-in-tools/web/web-search-tool.d.ts +25 -0
  435. package/dist/components/tool-hub/built-in-tools/web/web-search-tool.d.ts.map +1 -0
  436. package/dist/components/tool-hub/built-in-tools/web/web-search-tool.js +82 -0
  437. package/dist/components/tool-hub/built-in-tools/web/web-search-tool.js.map +1 -0
  438. package/dist/components/tool-hub/built-in-tools/workspace/create-workspace-tools.d.ts +7 -0
  439. package/dist/components/tool-hub/built-in-tools/workspace/create-workspace-tools.d.ts.map +1 -0
  440. package/dist/components/tool-hub/built-in-tools/workspace/create-workspace-tools.js +24 -0
  441. package/dist/components/tool-hub/built-in-tools/workspace/create-workspace-tools.js.map +1 -0
  442. package/dist/components/tool-hub/built-in-tools/workspace/edit-file-tool.d.ts +15 -0
  443. package/dist/components/tool-hub/built-in-tools/workspace/edit-file-tool.d.ts.map +1 -0
  444. package/dist/components/tool-hub/built-in-tools/workspace/edit-file-tool.js +103 -0
  445. package/dist/components/tool-hub/built-in-tools/workspace/edit-file-tool.js.map +1 -0
  446. package/dist/components/tool-hub/built-in-tools/workspace/list-files-tool.d.ts +12 -0
  447. package/dist/components/tool-hub/built-in-tools/workspace/list-files-tool.d.ts.map +1 -0
  448. package/dist/components/tool-hub/built-in-tools/workspace/list-files-tool.js +53 -0
  449. package/dist/components/tool-hub/built-in-tools/workspace/list-files-tool.js.map +1 -0
  450. package/dist/components/tool-hub/built-in-tools/workspace/read-file-tool.d.ts +15 -0
  451. package/dist/components/tool-hub/built-in-tools/workspace/read-file-tool.d.ts.map +1 -0
  452. package/dist/components/tool-hub/built-in-tools/workspace/read-file-tool.js +71 -0
  453. package/dist/components/tool-hub/built-in-tools/workspace/read-file-tool.js.map +1 -0
  454. package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.d.ts +16 -0
  455. package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.d.ts.map +1 -0
  456. package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.js +72 -0
  457. package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.js.map +1 -0
  458. package/dist/components/tool-hub/built-in-tools/workspace/search-files-tool.d.ts +12 -0
  459. package/dist/components/tool-hub/built-in-tools/workspace/search-files-tool.d.ts.map +1 -0
  460. package/dist/components/tool-hub/built-in-tools/workspace/search-files-tool.js +64 -0
  461. package/dist/components/tool-hub/built-in-tools/workspace/search-files-tool.js.map +1 -0
  462. package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.d.ts +19 -0
  463. package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.d.ts.map +1 -0
  464. package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.js +111 -0
  465. package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.js.map +1 -0
  466. package/dist/components/tool-hub/built-in-tools/workspace/types.d.ts +16 -0
  467. package/dist/components/tool-hub/built-in-tools/workspace/types.d.ts.map +1 -0
  468. package/dist/components/tool-hub/built-in-tools/workspace/types.js +8 -0
  469. package/dist/components/tool-hub/built-in-tools/workspace/types.js.map +1 -0
  470. package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.d.ts +29 -0
  471. package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.d.ts.map +1 -0
  472. package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.js +128 -0
  473. package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.js.map +1 -0
  474. package/dist/components/tool-hub/built-in-tools/workspace/write-file-tool.d.ts +17 -0
  475. package/dist/components/tool-hub/built-in-tools/workspace/write-file-tool.d.ts.map +1 -0
  476. package/dist/components/tool-hub/built-in-tools/workspace/write-file-tool.js +61 -0
  477. package/dist/components/tool-hub/built-in-tools/workspace/write-file-tool.js.map +1 -0
  478. package/dist/components/tool-hub/policies/default-tool-policy.d.ts +17 -0
  479. package/dist/components/tool-hub/policies/default-tool-policy.d.ts.map +1 -0
  480. package/dist/components/tool-hub/policies/default-tool-policy.js +99 -0
  481. package/dist/components/tool-hub/policies/default-tool-policy.js.map +1 -0
  482. package/dist/components/tool-hub/tool-hub.d.ts +28 -0
  483. package/dist/components/tool-hub/tool-hub.d.ts.map +1 -0
  484. package/dist/components/tool-hub/tool-hub.js +49 -0
  485. package/dist/components/tool-hub/tool-hub.js.map +1 -0
  486. package/dist/components/tool-hub/types.d.ts +138 -0
  487. package/dist/components/tool-hub/types.d.ts.map +1 -0
  488. package/dist/components/tool-hub/types.js +2 -0
  489. package/dist/components/tool-hub/types.js.map +1 -0
  490. package/dist/components/trace-service/console-trace-sink.d.ts +9 -0
  491. package/dist/components/trace-service/console-trace-sink.d.ts.map +1 -0
  492. package/dist/components/trace-service/console-trace-sink.js +35 -0
  493. package/dist/components/trace-service/console-trace-sink.js.map +1 -0
  494. package/dist/components/trace-service/trace-service.d.ts +25 -0
  495. package/dist/components/trace-service/trace-service.d.ts.map +1 -0
  496. package/dist/components/trace-service/trace-service.js +288 -0
  497. package/dist/components/trace-service/trace-service.js.map +1 -0
  498. package/dist/components/trace-service/types/sink.d.ts +7 -0
  499. package/dist/components/trace-service/types/sink.d.ts.map +1 -0
  500. package/dist/components/trace-service/types/sink.js +5 -0
  501. package/dist/components/trace-service/types/sink.js.map +1 -0
  502. package/dist/components/trace-service/types/span.d.ts +31 -0
  503. package/dist/components/trace-service/types/span.d.ts.map +1 -0
  504. package/dist/components/trace-service/types/span.js +5 -0
  505. package/dist/components/trace-service/types/span.js.map +1 -0
  506. package/dist/create-agent.d.ts +5 -0
  507. package/dist/create-agent.d.ts.map +1 -0
  508. package/dist/create-agent.js +57 -0
  509. package/dist/create-agent.js.map +1 -0
  510. package/dist/index.d.ts +110 -0
  511. package/dist/index.d.ts.map +1 -0
  512. package/dist/index.js +73 -0
  513. package/dist/index.js.map +1 -0
  514. package/dist/kernel/errors/artifact-error.d.ts +23 -0
  515. package/dist/kernel/errors/artifact-error.d.ts.map +1 -0
  516. package/dist/kernel/errors/artifact-error.js +22 -0
  517. package/dist/kernel/errors/artifact-error.js.map +1 -0
  518. package/dist/kernel/errors/model-error.d.ts +7 -0
  519. package/dist/kernel/errors/model-error.d.ts.map +1 -0
  520. package/dist/kernel/errors/model-error.js +10 -0
  521. package/dist/kernel/errors/model-error.js.map +1 -0
  522. package/dist/kernel/errors/policy-error.d.ts +8 -0
  523. package/dist/kernel/errors/policy-error.d.ts.map +1 -0
  524. package/dist/kernel/errors/policy-error.js +12 -0
  525. package/dist/kernel/errors/policy-error.js.map +1 -0
  526. package/dist/kernel/errors/sandbox-error.d.ts +35 -0
  527. package/dist/kernel/errors/sandbox-error.d.ts.map +1 -0
  528. package/dist/kernel/errors/sandbox-error.js +26 -0
  529. package/dist/kernel/errors/sandbox-error.js.map +1 -0
  530. package/dist/kernel/errors/sdk-error.d.ts +9 -0
  531. package/dist/kernel/errors/sdk-error.d.ts.map +1 -0
  532. package/dist/kernel/errors/sdk-error.js +13 -0
  533. package/dist/kernel/errors/sdk-error.js.map +1 -0
  534. package/dist/kernel/errors/session-error.d.ts +7 -0
  535. package/dist/kernel/errors/session-error.d.ts.map +1 -0
  536. package/dist/kernel/errors/session-error.js +10 -0
  537. package/dist/kernel/errors/session-error.js.map +1 -0
  538. package/dist/kernel/errors/skill-error.d.ts +14 -0
  539. package/dist/kernel/errors/skill-error.d.ts.map +1 -0
  540. package/dist/kernel/errors/skill-error.js +12 -0
  541. package/dist/kernel/errors/skill-error.js.map +1 -0
  542. package/dist/kernel/errors/tool-error.d.ts +8 -0
  543. package/dist/kernel/errors/tool-error.d.ts.map +1 -0
  544. package/dist/kernel/errors/tool-error.js +12 -0
  545. package/dist/kernel/errors/tool-error.js.map +1 -0
  546. package/dist/kernel/interfaces/kernel.d.ts +23 -0
  547. package/dist/kernel/interfaces/kernel.d.ts.map +1 -0
  548. package/dist/kernel/interfaces/kernel.js +2 -0
  549. package/dist/kernel/interfaces/kernel.js.map +1 -0
  550. package/dist/kernel/interfaces/plugin.d.ts +7 -0
  551. package/dist/kernel/interfaces/plugin.d.ts.map +1 -0
  552. package/dist/kernel/interfaces/plugin.js +5 -0
  553. package/dist/kernel/interfaces/plugin.js.map +1 -0
  554. package/dist/kernel/types.d.ts +103 -0
  555. package/dist/kernel/types.d.ts.map +1 -0
  556. package/dist/kernel/types.js +2 -0
  557. package/dist/kernel/types.js.map +1 -0
  558. package/dist/testing/in-memory-sandbox.d.ts +66 -0
  559. package/dist/testing/in-memory-sandbox.d.ts.map +1 -0
  560. package/dist/testing/in-memory-sandbox.js +507 -0
  561. package/dist/testing/in-memory-sandbox.js.map +1 -0
  562. package/dist/testing/mock-llm-model-provider.d.ts +14 -0
  563. package/dist/testing/mock-llm-model-provider.d.ts.map +1 -0
  564. package/dist/testing/mock-llm-model-provider.js +30 -0
  565. package/dist/testing/mock-llm-model-provider.js.map +1 -0
  566. package/dist/testing/mock-session-store.d.ts +17 -0
  567. package/dist/testing/mock-session-store.d.ts.map +1 -0
  568. package/dist/testing/mock-session-store.js +49 -0
  569. package/dist/testing/mock-session-store.js.map +1 -0
  570. package/dist/testing/mock-tools.d.ts +38 -0
  571. package/dist/testing/mock-tools.d.ts.map +1 -0
  572. package/dist/testing/mock-tools.js +130 -0
  573. package/dist/testing/mock-tools.js.map +1 -0
  574. package/package.json +55 -0
@@ -0,0 +1,226 @@
1
+ import { SkillError } from "../../../../kernel/errors/skill-error.js";
2
+ import { normalizeSkillPath } from "../../../skill-hub/skill-format.js";
3
+ import { copySkillToWorkspace, removeSkillFromWorkspace } from "./skill-workspace.js";
4
+ const ACTIONS = ["create", "rewrite", "patch", "write_file", "remove_file", "delete"];
5
+ /**
6
+ * skill_manage — lets an agent create and maintain skills in the shared skill library
7
+ * (used by the built-in skill-creator skill). A created skill is enabled for the agent
8
+ * right away; other agents can enable it too. Only custom skills can be changed, and an
9
+ * agent can only change skills that are enabled for it.
10
+ *
11
+ * Risk "consequential": a skill changes how agents behave from then on, so every call
12
+ * waits for the user's approval, which shows the full content being saved.
13
+ *
14
+ * After each change the skill's `.skills/<name>/` folder in an isolated workspace is
15
+ * brought in line with the library (rewritten, or removed on delete), so the agent never
16
+ * works from a stale copy. A failed sync is reported but does not fail the call — the
17
+ * skill is saved either way.
18
+ */
19
+ export class SkillManageTool {
20
+ name = "tool:skill-manage";
21
+ version = "1.0.0";
22
+ definition = {
23
+ name: "skill_manage",
24
+ description: "Create, change or delete a skill (a SKILL.md with YAML frontmatter `name` + `description`, then instructions; " +
25
+ "optional extra files such as scripts/ and references/). Follow the skill-creator skill when you have it. " +
26
+ "Actions: create (content, files?) · rewrite (name, content, files? — replaces SKILL.md, and all files when given) · " +
27
+ "patch (name, old_string, new_string, path? — exact replacement in SKILL.md or a file) · write_file (name, path, content) · " +
28
+ "remove_file (name, path) · delete (name). Each call asks the user for approval.",
29
+ parameters: {
30
+ type: "object",
31
+ properties: {
32
+ action: { type: "string", enum: [...ACTIONS], description: "What to do" },
33
+ name: { type: "string", description: "The skill to change (every action except create)" },
34
+ content: { type: "string", description: "create/rewrite: the full SKILL.md text; write_file: the file content" },
35
+ files: {
36
+ type: "array",
37
+ description: "create/rewrite: extra files of the skill",
38
+ items: {
39
+ type: "object",
40
+ properties: {
41
+ path: { type: "string", description: 'Relative path, e.g. "scripts/run.py" or "references/guide.md"' },
42
+ content: { type: "string", description: "File content (text)" },
43
+ },
44
+ required: ["path", "content"],
45
+ },
46
+ },
47
+ path: { type: "string", description: "patch/write_file/remove_file: a file in the skill (patch defaults to SKILL.md)" },
48
+ old_string: { type: "string", description: "patch: exact text to replace — must occur exactly once" },
49
+ new_string: { type: "string", description: "patch: the replacement text" },
50
+ },
51
+ required: ["action"],
52
+ },
53
+ risk: "consequential",
54
+ };
55
+ async execute(args, context) {
56
+ const skills = context.skills;
57
+ if (!skills)
58
+ return fail("skill_manage: skills are not available here");
59
+ const action = str(args, "action");
60
+ if (!action || !ACTIONS.includes(action))
61
+ return fail(`skill_manage: "action" must be one of ${ACTIONS.join(", ")}`);
62
+ try {
63
+ if (action === "create") {
64
+ const content = str(args, "content");
65
+ if (!content)
66
+ return fail('skill_manage create: "content" (the full SKILL.md) is required');
67
+ const files = filesArg(args);
68
+ if (typeof files === "string")
69
+ return fail(files);
70
+ const skill = await skills.create({ content, files: files ?? [] });
71
+ const requested = str(args, "name");
72
+ const note = requested && requested !== skill.name ? ` (named from the frontmatter, not "${requested}")` : "";
73
+ const synced = await copySkillToWorkspace(skill, context, { replace: true });
74
+ return ok(`Created skill "${skill.name}"${note} with ${countFiles(skill)}. It is enabled for you and appears in your skill index ` +
75
+ "from your next turn. Other agents can enable it on their Capabilities page." +
76
+ workspaceNote(synced, "written to"), skill, synced);
77
+ }
78
+ const name = str(args, "name");
79
+ if (!name)
80
+ return fail(`skill_manage ${action}: "name" is required`);
81
+ const existing = await skills.get(name);
82
+ if (!existing)
83
+ return fail(`skill_manage ${action}: you have no skill named "${name}"`);
84
+ if (existing.source !== "custom") {
85
+ return fail(`skill_manage ${action} failed (read_only): "${name}" is a ${existing.source} skill and cannot be changed — ` +
86
+ "create a new skill with a different name instead");
87
+ }
88
+ if (action === "delete") {
89
+ await skills.delete(name);
90
+ const removed = await removeSkillFromWorkspace(name, context);
91
+ return {
92
+ content: `Deleted skill "${name}".` + workspaceNote(removed, "removed from"),
93
+ metadata: { skill: name, action, ...workspaceMetadata(removed) },
94
+ };
95
+ }
96
+ let content = existing.content;
97
+ let files = existing.files;
98
+ let summary;
99
+ switch (action) {
100
+ case "rewrite": {
101
+ const next = str(args, "content");
102
+ if (!next)
103
+ return fail('skill_manage rewrite: "content" (the full new SKILL.md) is required');
104
+ const nextFiles = filesArg(args);
105
+ if (typeof nextFiles === "string")
106
+ return fail(nextFiles);
107
+ content = next;
108
+ if (nextFiles)
109
+ files = nextFiles;
110
+ summary = `Rewrote skill "${name}"${nextFiles ? " and replaced its files" : ""}`;
111
+ break;
112
+ }
113
+ case "patch": {
114
+ const oldString = str(args, "old_string");
115
+ const newString = typeof args["new_string"] === "string" ? args["new_string"] : undefined;
116
+ if (!oldString || newString === undefined)
117
+ return fail('skill_manage patch: "old_string" and "new_string" are required');
118
+ const rawPath = str(args, "path");
119
+ const path = rawPath ? normalizeSkillPath(rawPath) : "SKILL.md";
120
+ if (!path)
121
+ return fail(`skill_manage patch: invalid path "${rawPath}"`);
122
+ if (path.toLowerCase() === "skill.md") {
123
+ const patched = replaceOnce(content, oldString, newString);
124
+ if (typeof patched !== "string")
125
+ return fail(`skill_manage patch: ${patched.error} in SKILL.md`);
126
+ content = patched;
127
+ }
128
+ else {
129
+ const file = files.find((f) => f.path === path);
130
+ if (!file)
131
+ return fail(`skill_manage patch: skill "${name}" has no file "${path}"`);
132
+ const patched = replaceOnce(file.content, oldString, newString);
133
+ if (typeof patched !== "string")
134
+ return fail(`skill_manage patch: ${patched.error} in ${path}`);
135
+ files = files.map((f) => (f.path === path ? { path, content: patched } : f));
136
+ }
137
+ summary = `Patched ${path} of skill "${name}"`;
138
+ break;
139
+ }
140
+ case "write_file": {
141
+ const rawPath = str(args, "path");
142
+ const path = rawPath ? normalizeSkillPath(rawPath) : null;
143
+ const fileContent = typeof args["content"] === "string" ? args["content"] : undefined;
144
+ if (!path || fileContent === undefined)
145
+ return fail('skill_manage write_file: a relative "path" and "content" are required');
146
+ const exists = files.some((f) => f.path === path);
147
+ files = exists ? files.map((f) => (f.path === path ? { path, content: fileContent } : f)) : [...files, { path, content: fileContent }];
148
+ summary = `${exists ? "Replaced" : "Added"} ${path} in skill "${name}"`;
149
+ break;
150
+ }
151
+ case "remove_file": {
152
+ const rawPath = str(args, "path");
153
+ const path = rawPath ? normalizeSkillPath(rawPath) : null;
154
+ if (!path || !files.some((f) => f.path === path))
155
+ return fail(`skill_manage remove_file: skill "${name}" has no file "${rawPath ?? ""}"`);
156
+ files = files.filter((f) => f.path !== path);
157
+ summary = `Removed ${path} from skill "${name}"`;
158
+ break;
159
+ }
160
+ }
161
+ const updated = await skills.update(name, { content, files });
162
+ const synced = await copySkillToWorkspace(updated, context, { replace: true });
163
+ return ok(`${summary} (version ${updated.version}, ${countFiles(updated)}).` + workspaceNote(synced, "updated in"), updated, synced);
164
+ }
165
+ catch (error) {
166
+ if (error instanceof SkillError) {
167
+ // Validation and permission failures are deterministic — the model must change the input.
168
+ return { content: `skill_manage ${action} failed (${error.code}): ${error.message}`, isError: true, retryable: false, metadata: { code: error.code } };
169
+ }
170
+ return { content: `skill_manage ${action} failed: ${error instanceof Error ? error.message : String(error)}`, isError: true };
171
+ }
172
+ }
173
+ }
174
+ function replaceOnce(text, oldString, newString) {
175
+ const first = text.indexOf(oldString);
176
+ if (first === -1)
177
+ return { error: "old_string was not found" };
178
+ if (text.indexOf(oldString, first + oldString.length) !== -1)
179
+ return { error: "old_string occurs more than once — include more surrounding text" };
180
+ return text.slice(0, first) + newString + text.slice(first + oldString.length);
181
+ }
182
+ /** The `files` argument, undefined when absent, or an error message. */
183
+ function filesArg(args) {
184
+ const raw = args["files"];
185
+ if (raw === undefined || raw === null)
186
+ return undefined;
187
+ if (!Array.isArray(raw))
188
+ return 'skill_manage: "files" must be a list of { "path", "content" }';
189
+ const files = [];
190
+ for (const item of raw) {
191
+ const path = item && typeof item === "object" ? item["path"] : undefined;
192
+ const content = item && typeof item === "object" ? item["content"] : undefined;
193
+ if (typeof path !== "string" || typeof content !== "string")
194
+ return 'skill_manage: every entry of "files" needs a string "path" and "content"';
195
+ files.push({ path, content });
196
+ }
197
+ return files;
198
+ }
199
+ function str(args, key) {
200
+ const value = args[key];
201
+ return typeof value === "string" && value.trim() ? value.trim() : undefined;
202
+ }
203
+ function countFiles(skill) {
204
+ const n = skill.files.length;
205
+ return n === 0 ? "no extra files" : `${n} extra file${n === 1 ? "" : "s"}`;
206
+ }
207
+ /** One sentence on the workspace copy, or "" when there is no sandbox. */
208
+ function workspaceNote(result, verb) {
209
+ if (!result)
210
+ return "";
211
+ if ("dir" in result)
212
+ return ` Its folder was ${verb} your workspace at ${result.dir}/.`;
213
+ return ` The saved skill is fine, but your workspace copy could not be synced (${result.error}).`;
214
+ }
215
+ function workspaceMetadata(result) {
216
+ if (!result)
217
+ return {};
218
+ return "dir" in result ? { workspaceDir: result.dir } : { workspaceError: result.error };
219
+ }
220
+ function ok(content, skill, workspace = null) {
221
+ return { content, metadata: { skill: skill.name, version: skill.version, files: skill.files.map((f) => f.path), ...workspaceMetadata(workspace) } };
222
+ }
223
+ function fail(content) {
224
+ return { content, isError: true, retryable: false };
225
+ }
226
+ //# sourceMappingURL=skill-manage-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-manage-tool.js","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/skills/skill-manage-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAGxE,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAA6B,MAAM,sBAAsB,CAAC;AAEjH,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,CAAU,CAAC;AAG/F;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,eAAe;IACjB,IAAI,GAAG,mBAAmB,CAAC;IAC3B,OAAO,GAAG,OAAO,CAAC;IAClB,UAAU,GAAmB;QACpC,IAAI,EAAE,cAAc;QACpB,WAAW,EACT,gHAAgH;YAChH,2GAA2G;YAC3G,sHAAsH;YACtH,6HAA6H;YAC7H,iFAAiF;QACnF,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE;gBACzE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kDAAkD,EAAE;gBACzF,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sEAAsE,EAAE;gBAChH,KAAK,EAAE;oBACL,IAAI,EAAE,OAAO;oBACb,WAAW,EAAE,0CAA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MAAM,CAAC,GAAG,IAAI,CAAC;IACxF,OAAO,0EAA0E,MAAM,CAAC,KAAK,IAAI,CAAC;AACpG,CAAC;AAED,SAAS,iBAAiB,CAAC,MAA4B;IACrD,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IACvB,OAAO,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;AAC3F,CAAC;AAED,SAAS,EAAE,CAAC,OAAe,EAAE,KAAY,EAAE,SAAS,GAAyB,IAAI;IAC/E,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,iBAAiB,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC;AACtJ,CAAC;AAED,SAAS,IAAI,CAAC,OAAe;IAC3B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AACtD,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { ToolContext, ToolDefinition, ToolHandler, ToolOutput } from "../../types.js";
2
+ /**
3
+ * skill_view — loads a skill (progressive disclosure, level 2 and 3): the SKILL.md
4
+ * instructions plus the list of its files, or one file with `path`.
5
+ *
6
+ * Not registered in the ToolHub: the agent's SkillManager adds it to the model's tools
7
+ * whenever the agent has at least one usable skill, so enabling a skill is enough. When
8
+ * the skill has files and the agent's sandbox is isolated, they are copied to
9
+ * `.skills/<name>/` in the workspace (with its SKILL.md) so scripts can be run from there.
10
+ */
11
+ export declare class SkillViewTool implements ToolHandler {
12
+ readonly name = "tool:skill-view";
13
+ readonly version = "1.0.0";
14
+ readonly definition: ToolDefinition;
15
+ execute(args: Record<string, unknown>, context: ToolContext): Promise<ToolOutput>;
16
+ private viewFile;
17
+ }
18
+ //# sourceMappingURL=skill-view-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-view-tool.d.ts","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/skills/skill-view-tool.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG3F;;;;;;;;GAQG;AACH,qBAAa,aAAc,YAAW,WAAW;IAC/C,QAAQ,CAAC,IAAI,qBAAqB;IAClC,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,UAAU,EAAE,cAAc,CAejC;IAEI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAsBtF;IAED,OAAO,CAAC,QAAQ;CAkBjB"}
@@ -0,0 +1,86 @@
1
+ import { normalizeSkillPath } from "../../../skill-hub/skill-format.js";
2
+ import { copySkillToWorkspace } from "./skill-workspace.js";
3
+ /**
4
+ * skill_view — loads a skill (progressive disclosure, level 2 and 3): the SKILL.md
5
+ * instructions plus the list of its files, or one file with `path`.
6
+ *
7
+ * Not registered in the ToolHub: the agent's SkillManager adds it to the model's tools
8
+ * whenever the agent has at least one usable skill, so enabling a skill is enough. When
9
+ * the skill has files and the agent's sandbox is isolated, they are copied to
10
+ * `.skills/<name>/` in the workspace (with its SKILL.md) so scripts can be run from there.
11
+ */
12
+ export class SkillViewTool {
13
+ name = "tool:skill-view";
14
+ version = "1.0.0";
15
+ definition = {
16
+ name: "skill_view",
17
+ description: "Load one of your skills (listed under <available_skills> in your instructions). Returns the skill's " +
18
+ "instructions and its files — follow the instructions to do the task. Load a skill BEFORE starting a task it " +
19
+ "matches. Pass `path` to read one of the skill's files (e.g. references/format.md).",
20
+ parameters: {
21
+ type: "object",
22
+ properties: {
23
+ name: { type: "string", description: "The skill name, exactly as listed in <available_skills>" },
24
+ path: { type: "string", description: "Optional: a file inside the skill to read instead of its instructions" },
25
+ },
26
+ required: ["name"],
27
+ },
28
+ risk: "read-only",
29
+ };
30
+ async execute(args, context) {
31
+ const name = typeof args["name"] === "string" ? args["name"].trim() : "";
32
+ if (!name)
33
+ return fail('skill_view: "name" must be a non-empty string');
34
+ if (!context.skills)
35
+ return fail("skill_view: skills are not available here");
36
+ const skill = await context.skills.get(name);
37
+ if (!skill) {
38
+ const available = (await context.skills.list()).map((s) => s.name);
39
+ return fail(`skill_view: no skill named "${name}". ` +
40
+ (available.length ? `Your skills: ${available.join(", ")}.` : "You have no skills enabled."));
41
+ }
42
+ const rawPath = typeof args["path"] === "string" ? args["path"].trim() : "";
43
+ if (rawPath)
44
+ return this.viewFile(skill, rawPath);
45
+ const copied = skill.files.length ? await copySkillToWorkspace(skill, context) : null;
46
+ return {
47
+ content: renderSkill(skill, copied),
48
+ metadata: { skill: skill.name, source: skill.source, version: skill.version, files: skill.files.length, copiedTo: copied && "dir" in copied ? copied.dir : undefined },
49
+ };
50
+ }
51
+ viewFile(skill, rawPath) {
52
+ const path = normalizeSkillPath(rawPath);
53
+ if (path?.toLowerCase() === "skill.md") {
54
+ return { content: `<skill_file skill="${skill.name}" path="SKILL.md">\n${skill.content}\n</skill_file>` };
55
+ }
56
+ const file = path ? skill.files.find((f) => f.path === path) : undefined;
57
+ if (!file) {
58
+ const files = skill.files.map((f) => f.path);
59
+ return fail(`skill_view: skill "${skill.name}" has no file "${rawPath}". ` +
60
+ (files.length ? `Its files: ${files.join(", ")}.` : "It has no files besides SKILL.md."));
61
+ }
62
+ return {
63
+ content: `<skill_file skill="${skill.name}" path="${file.path}">\n${file.content}\n</skill_file>`,
64
+ metadata: { skill: skill.name, path: file.path },
65
+ };
66
+ }
67
+ }
68
+ function renderSkill(skill, copied) {
69
+ const lines = [`<skill_content name="${skill.name}">`, skill.body];
70
+ if (skill.files.length) {
71
+ lines.push("", "<skill_resources>", ...skill.files.map((f) => f.path), "</skill_resources>");
72
+ lines.push(`Read a file with skill_view(name="${skill.name}", path="<file>").`);
73
+ if (copied && "dir" in copied) {
74
+ lines.push(`The files are also in your workspace at ${copied.dir}/ — run scripts from there (e.g. python3 ${copied.dir}/scripts/<script>).`);
75
+ }
76
+ else if (copied && "error" in copied) {
77
+ lines.push(`The files could not be copied to your workspace (${copied.error}); read them with skill_view instead.`);
78
+ }
79
+ }
80
+ lines.push("</skill_content>");
81
+ return lines.join("\n");
82
+ }
83
+ function fail(content) {
84
+ return { content, isError: true, retryable: false };
85
+ }
86
+ //# sourceMappingURL=skill-view-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-view-tool.js","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/skills/skill-view-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAGxE,OAAO,EAAE,oBAAoB,EAA6B,MAAM,sBAAsB,CAAC;AAEvF;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAa;IACf,IAAI,GAAG,iBAAiB,CAAC;IACzB,OAAO,GAAG,OAAO,CAAC;IAClB,UAAU,GAAmB;QACpC,IAAI,EAAE,YAAY;QAClB,WAAW,EACT,sGAAsG;YACtG,8GAA8G;YAC9G,oFAAoF;QACtF,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,yDAAyD,EAAE;gBAChG,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uEAAuE,EAAE;aAC/G;YACD,QAAQ,EAAE,CAAC,MAAM,CAAC;SACnB;QACD,IAAI,EAAE,WAAW;KAClB,CAAC;IAEF,KAAK,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-0,0 +1,26 @@
1
+ import type { Skill } from "../../../skill-hub/types/skill.js";
2
+ import type { ToolContext } from "../../types.js";
3
+ /** Where a skill's files are copied, relative to the agent's working directory. */
4
+ export declare const SKILL_WORKSPACE_DIR = ".skills";
5
+ /** Outcome of a workspace copy: where it went, why it failed, or null when there is no sandbox. */
6
+ export type SkillWorkspaceResult = {
7
+ dir: string;
8
+ } | {
9
+ error: string;
10
+ } | null;
11
+ /**
12
+ * Copy a skill (SKILL.md plus its files) to `.skills/<name>/` in the agent's workspace,
13
+ * skipping files already up to date.
14
+ * SKILL.md is written too, so the folder is the whole skill (scripts or instructions that
15
+ * refer to it, or a skill used as a starting point for a new one, find it on disk).
16
+ * With `replace`, the folder is removed first so files
17
+ * the skill no longer has do not linger (skill_manage after a change).
18
+ * Only in an isolated sandbox: on a host folder writes need the user's approval, which a
19
+ * skill load must not bypass.
20
+ */
21
+ export declare function copySkillToWorkspace(skill: Skill, context: ToolContext, opts?: {
22
+ replace?: boolean;
23
+ }): Promise<SkillWorkspaceResult>;
24
+ /** Remove a deleted skill's `.skills/<name>/` folder from the agent's workspace. */
25
+ export declare function removeSkillFromWorkspace(name: string, context: ToolContext): Promise<SkillWorkspaceResult>;
26
+ //# sourceMappingURL=skill-workspace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-workspace.d.ts","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/skills/skill-workspace.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,mFAAmF;AACnF,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAE7C,mGAAmG;AACnG,MAAM,MAAM,oBAAoB,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC;AAE9E;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,WAAW,EACpB,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/B,OAAO,CAAC,oBAAoB,CAAC,CAiB/B;AAED,oFAAoF;AACpF,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAYhH"}
@@ -0,0 +1,93 @@
1
+ import { createHash } from "node:crypto";
2
+ import { SandboxError } from "../../../../kernel/errors/sandbox-error.js";
3
+ /** Where a skill's files are copied, relative to the agent's working directory. */
4
+ export const SKILL_WORKSPACE_DIR = ".skills";
5
+ /**
6
+ * Copy a skill (SKILL.md plus its files) to `.skills/<name>/` in the agent's workspace,
7
+ * skipping files already up to date.
8
+ * SKILL.md is written too, so the folder is the whole skill (scripts or instructions that
9
+ * refer to it, or a skill used as a starting point for a new one, find it on disk).
10
+ * With `replace`, the folder is removed first so files
11
+ * the skill no longer has do not linger (skill_manage after a change).
12
+ * Only in an isolated sandbox: on a host folder writes need the user's approval, which a
13
+ * skill load must not bypass.
14
+ */
15
+ export async function copySkillToWorkspace(skill, context, opts = {}) {
16
+ const env = await isolatedSandbox(context);
17
+ if (!env || "error" in env)
18
+ return env;
19
+ const dir = skillDir(skill.name);
20
+ const files = [{ path: "SKILL.md", content: skill.content }, ...skill.files];
21
+ try {
22
+ if (opts.replace)
23
+ await removeDir(env, dir);
24
+ for (const file of files) {
25
+ const target = `${dir}/${file.path}`;
26
+ if ((await currentSha256(env, target)) === sha256(file.content))
27
+ continue;
28
+ await env.writeFile(target, file.content);
29
+ }
30
+ return { dir };
31
+ }
32
+ catch (error) {
33
+ return { error: error instanceof Error ? error.message : String(error) };
34
+ }
35
+ }
36
+ /** Remove a deleted skill's `.skills/<name>/` folder from the agent's workspace. */
37
+ export async function removeSkillFromWorkspace(name, context) {
38
+ const env = await isolatedSandbox(context);
39
+ if (!env || "error" in env)
40
+ return env;
41
+ const dir = skillDir(name);
42
+ try {
43
+ if (!(await env.stat(dir)))
44
+ return { dir };
45
+ await removeDir(env, dir);
46
+ return { dir };
47
+ }
48
+ catch (error) {
49
+ return { error: error instanceof Error ? error.message : String(error) };
50
+ }
51
+ }
52
+ function skillDir(name) {
53
+ return `${SKILL_WORKSPACE_DIR}/${name}`;
54
+ }
55
+ async function isolatedSandbox(context) {
56
+ if (!context.getSandbox)
57
+ return null;
58
+ let env;
59
+ try {
60
+ env = await context.getSandbox();
61
+ }
62
+ catch {
63
+ return null; // no sandbox for this agent — skill_view(path) still works
64
+ }
65
+ if (!env.traits.isolated)
66
+ return { error: "the workspace is a host folder, so files are not copied automatically" };
67
+ return env;
68
+ }
69
+ /**
70
+ * SandboxView has no delete, so the folder is removed with `rm -rf` (argv, no shell).
71
+ * Without exec the old files stay; the caller still writes the current ones over them.
72
+ */
73
+ async function removeDir(env, dir) {
74
+ if (!env.capabilities.has("exec") || env.traits.os === "windows")
75
+ return;
76
+ const result = await env.exec({ command: ["rm", "-rf", "--", dir], timeoutMs: 10_000, maxOutputBytes: 4_096 });
77
+ if (result.exitCode !== 0)
78
+ throw new Error(`could not remove ${dir}: ${result.stderr.trim() || `exit ${result.exitCode}`}`);
79
+ }
80
+ async function currentSha256(env, path) {
81
+ try {
82
+ return (await env.readFile(path, { maxBytes: 1 })).sha256;
83
+ }
84
+ catch (error) {
85
+ if (error instanceof SandboxError && error.code === "not_found")
86
+ return null;
87
+ throw error;
88
+ }
89
+ }
90
+ function sha256(text) {
91
+ return createHash("sha256").update(text, "utf8").digest("hex");
92
+ }
93
+ //# sourceMappingURL=skill-workspace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-workspace.js","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/skills/skill-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO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AC,GAAgB,EAAE,GAAW;IACpD,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,SAAS;QAAE,OAAO;IACzE,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/G,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,QAAQ,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAC9H,CAAC;AAED,KAAK,UAAU,aAAa,CAAC,GAAgB,EAAE,IAAY;IACzD,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;IAC5D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,YAAY,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW;YAAE,OAAO,IAAI,CAAC;QAC7E,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,IAAY;IAC1B,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { FetchFn, WebSearchProvider, WebSearchQuery, WebSearchResult } from "./types.js";
2
+ export interface DuckDuckGoSearchProviderOptions {
3
+ /** Defaults to https://html.duckduckgo.com/html/ */
4
+ endpoint?: string;
5
+ /** Request timeout. Default 10s. */
6
+ timeoutMs?: number;
7
+ /** Default region (DuckDuckGo `kl`, e.g. "us-en"). */
8
+ region?: string;
9
+ userAgent?: string;
10
+ fetch?: FetchFn;
11
+ }
12
+ export declare class DuckDuckGoSearchProvider implements WebSearchProvider {
13
+ readonly name = "duckduckgo";
14
+ private endpoint;
15
+ private timeoutMs;
16
+ private region?;
17
+ private userAgent;
18
+ private fetchFn;
19
+ constructor(options?: DuckDuckGoSearchProviderOptions);
20
+ search(query: WebSearchQuery): Promise<WebSearchResult[]>;
21
+ }
22
+ /**
23
+ * Parse the result list from html.duckduckgo.com markup. Each organic result has an
24
+ * `<a class="result__a" href="//duckduckgo.com/l/?uddg=<target>">title</a>` and an optional
25
+ * `class="result__snippet"` element after it. Ads (`/y.js?` links) are skipped.
26
+ */
27
+ export declare function parseDuckDuckGoHtml(html: string, maxResults: number): WebSearchResult[];
28
+ //# sourceMappingURL=duckduckgo-search-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duckduckgo-search-provider.d.ts","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/web/duckduckgo-search-provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAS9F,MAAM,WAAW,+BAA+B;IAC9C,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAQD,qBAAa,wBAAyB,YAAW,iBAAiB;IAChE,QAAQ,CAAC,IAAI,gBAAgB;IAE7B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAU;IAEzB,YAAY,OAAO,GAAE,+BAAoC,EAMxD;IAEK,MAAM,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CA6B9D;CACF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe,EAAE,CA2BvF"}