@puku-ai/sdk 4.0.0 → 4.0.2

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 (583) hide show
  1. package/README.md +29 -10
  2. package/dist/index.d.ts +26 -0
  3. package/dist/index.js +32 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/vendor/_vendor/partial-json-parser/parser.d.ts +2 -0
  6. package/dist/vendor/_vendor/partial-json-parser/parser.js +223 -0
  7. package/dist/vendor/_vendor/partial-json-parser/parser.js.map +1 -0
  8. package/dist/vendor/api-promise.d.ts +2 -0
  9. package/dist/vendor/api-promise.js +3 -0
  10. package/dist/vendor/api-promise.js.map +1 -0
  11. package/dist/vendor/client.d.ts +399 -0
  12. package/dist/vendor/client.js +976 -0
  13. package/dist/vendor/client.js.map +1 -0
  14. package/dist/vendor/core/api-promise.d.ts +49 -0
  15. package/dist/vendor/core/api-promise.js +77 -0
  16. package/dist/vendor/core/api-promise.js.map +1 -0
  17. package/dist/vendor/core/api.d.ts +10 -0
  18. package/dist/vendor/core/api.js +2 -0
  19. package/dist/vendor/core/api.js.map +1 -0
  20. package/dist/vendor/core/credentials.d.ts +130 -0
  21. package/dist/vendor/core/credentials.js +274 -0
  22. package/dist/vendor/core/credentials.js.map +1 -0
  23. package/dist/vendor/core/error.d.ts +82 -0
  24. package/dist/vendor/core/error.js +140 -0
  25. package/dist/vendor/core/error.js.map +1 -0
  26. package/dist/vendor/core/middleware.d.ts +153 -0
  27. package/dist/vendor/core/middleware.js +168 -0
  28. package/dist/vendor/core/middleware.js.map +1 -0
  29. package/dist/vendor/core/pagination.d.ts +121 -0
  30. package/dist/vendor/core/pagination.js +207 -0
  31. package/dist/vendor/core/pagination.js.map +1 -0
  32. package/dist/vendor/core/resource.d.ts +5 -0
  33. package/dist/vendor/core/resource.js +8 -0
  34. package/dist/vendor/core/resource.js.map +1 -0
  35. package/dist/vendor/core/streaming.d.ts +41 -0
  36. package/dist/vendor/core/streaming.js +342 -0
  37. package/dist/vendor/core/streaming.js.map +1 -0
  38. package/dist/vendor/core/uploads.d.ts +2 -0
  39. package/dist/vendor/core/uploads.js +2 -0
  40. package/dist/vendor/core/uploads.js.map +1 -0
  41. package/dist/vendor/error.d.ts +2 -0
  42. package/dist/vendor/error.js +3 -0
  43. package/dist/vendor/error.js.map +1 -0
  44. package/dist/vendor/helpers/beta/environments.d.ts +22 -0
  45. package/dist/vendor/helpers/beta/environments.js +23 -0
  46. package/dist/vendor/helpers/beta/environments.js.map +1 -0
  47. package/dist/vendor/helpers/beta/json-schema.d.ts +36 -0
  48. package/dist/vendor/helpers/beta/json-schema.js +53 -0
  49. package/dist/vendor/helpers/beta/json-schema.js.map +1 -0
  50. package/dist/vendor/helpers/beta/mcp.d.ts +302 -0
  51. package/dist/vendor/helpers/beta/mcp.js +406 -0
  52. package/dist/vendor/helpers/beta/mcp.js.map +1 -0
  53. package/dist/vendor/helpers/beta/memory.d.ts +10 -0
  54. package/dist/vendor/helpers/beta/memory.js +15 -0
  55. package/dist/vendor/helpers/beta/memory.js.map +1 -0
  56. package/dist/vendor/helpers/beta/standard-schema.d.ts +44 -0
  57. package/dist/vendor/helpers/beta/standard-schema.js +54 -0
  58. package/dist/vendor/helpers/beta/standard-schema.js.map +1 -0
  59. package/dist/vendor/helpers/beta/zod.d.ts +32 -0
  60. package/dist/vendor/helpers/beta/zod.js +52 -0
  61. package/dist/vendor/helpers/beta/zod.js.map +1 -0
  62. package/dist/vendor/helpers/index.d.ts +2 -0
  63. package/dist/vendor/helpers/index.js +3 -0
  64. package/dist/vendor/helpers/index.js.map +1 -0
  65. package/dist/vendor/helpers/json-schema.d.ts +17 -0
  66. package/dist/vendor/helpers/json-schema.js +34 -0
  67. package/dist/vendor/helpers/json-schema.js.map +1 -0
  68. package/dist/vendor/helpers/zod.d.ts +12 -0
  69. package/dist/vendor/helpers/zod.js +42 -0
  70. package/dist/vendor/helpers/zod.js.map +1 -0
  71. package/dist/vendor/index.d.ts +16 -0
  72. package/dist/vendor/index.js +23 -0
  73. package/dist/vendor/index.js.map +1 -0
  74. package/dist/vendor/internal/builtin-types.d.ts +72 -0
  75. package/dist/vendor/internal/builtin-types.js +3 -0
  76. package/dist/vendor/internal/builtin-types.js.map +1 -0
  77. package/dist/vendor/internal/constants.d.ts +4 -0
  78. package/dist/vendor/internal/constants.js +10 -0
  79. package/dist/vendor/internal/constants.js.map +1 -0
  80. package/dist/vendor/internal/decoders/jsonl.d.ts +9 -0
  81. package/dist/vendor/internal/decoders/jsonl.js +37 -0
  82. package/dist/vendor/internal/decoders/jsonl.js.map +1 -0
  83. package/dist/vendor/internal/decoders/line.d.ts +16 -0
  84. package/dist/vendor/internal/decoders/line.js +105 -0
  85. package/dist/vendor/internal/decoders/line.js.map +1 -0
  86. package/dist/vendor/internal/detect-platform.d.ts +14 -0
  87. package/dist/vendor/internal/detect-platform.js +155 -0
  88. package/dist/vendor/internal/detect-platform.js.map +1 -0
  89. package/dist/vendor/internal/errors.d.ts +2 -0
  90. package/dist/vendor/internal/errors.js +38 -0
  91. package/dist/vendor/internal/errors.js.map +1 -0
  92. package/dist/vendor/internal/file-store.d.ts +135 -0
  93. package/dist/vendor/internal/file-store.js +529 -0
  94. package/dist/vendor/internal/file-store.js.map +1 -0
  95. package/dist/vendor/internal/headers.d.ts +28 -0
  96. package/dist/vendor/internal/headers.js +114 -0
  97. package/dist/vendor/internal/headers.js.map +1 -0
  98. package/dist/vendor/internal/message-stream-utils.d.ts +9 -0
  99. package/dist/vendor/internal/message-stream-utils.js +30 -0
  100. package/dist/vendor/internal/message-stream-utils.js.map +1 -0
  101. package/dist/vendor/internal/node.browser.d.ts +8 -0
  102. package/dist/vendor/internal/node.browser.js +19 -0
  103. package/dist/vendor/internal/node.browser.js.map +1 -0
  104. package/dist/vendor/internal/node.d.ts +13 -0
  105. package/dist/vendor/internal/node.js +14 -0
  106. package/dist/vendor/internal/node.js.map +1 -0
  107. package/dist/vendor/internal/parse.d.ts +17 -0
  108. package/dist/vendor/internal/parse.js +62 -0
  109. package/dist/vendor/internal/parse.js.map +1 -0
  110. package/dist/vendor/internal/qs/formats.d.ts +6 -0
  111. package/dist/vendor/internal/qs/formats.js +9 -0
  112. package/dist/vendor/internal/qs/formats.js.map +1 -0
  113. package/dist/vendor/internal/qs/index.d.ts +9 -0
  114. package/dist/vendor/internal/qs/index.js +10 -0
  115. package/dist/vendor/internal/qs/index.js.map +1 -0
  116. package/dist/vendor/internal/qs/stringify.d.ts +2 -0
  117. package/dist/vendor/internal/qs/stringify.js +274 -0
  118. package/dist/vendor/internal/qs/stringify.js.map +1 -0
  119. package/dist/vendor/internal/qs/types.d.ts +56 -0
  120. package/dist/vendor/internal/qs/types.js +2 -0
  121. package/dist/vendor/internal/qs/types.js.map +1 -0
  122. package/dist/vendor/internal/qs/utils.d.ts +14 -0
  123. package/dist/vendor/internal/qs/utils.js +217 -0
  124. package/dist/vendor/internal/qs/utils.js.map +1 -0
  125. package/dist/vendor/internal/request-options.d.ts +126 -0
  126. package/dist/vendor/internal/request-options.js +27 -0
  127. package/dist/vendor/internal/request-options.js.map +1 -0
  128. package/dist/vendor/internal/request-signal.d.ts +3 -0
  129. package/dist/vendor/internal/request-signal.js +45 -0
  130. package/dist/vendor/internal/request-signal.js.map +1 -0
  131. package/dist/vendor/internal/shim-types.d.ts +16 -0
  132. package/dist/vendor/internal/shim-types.js +3 -0
  133. package/dist/vendor/internal/shim-types.js.map +1 -0
  134. package/dist/vendor/internal/shims.d.ts +25 -0
  135. package/dist/vendor/internal/shims.js +85 -0
  136. package/dist/vendor/internal/shims.js.map +1 -0
  137. package/dist/vendor/internal/stainless-helper-header.d.ts +59 -0
  138. package/dist/vendor/internal/stainless-helper-header.js +83 -0
  139. package/dist/vendor/internal/stainless-helper-header.js.map +1 -0
  140. package/dist/vendor/internal/stream-utils.d.ts +7 -0
  141. package/dist/vendor/internal/stream-utils.js +35 -0
  142. package/dist/vendor/internal/stream-utils.js.map +1 -0
  143. package/dist/vendor/internal/to-file.d.ts +44 -0
  144. package/dist/vendor/internal/to-file.js +93 -0
  145. package/dist/vendor/internal/to-file.js.map +1 -0
  146. package/dist/vendor/internal/types.d.ts +62 -0
  147. package/dist/vendor/internal/types.js +3 -0
  148. package/dist/vendor/internal/types.js.map +1 -0
  149. package/dist/vendor/internal/uploads.d.ts +41 -0
  150. package/dist/vendor/internal/uploads.js +139 -0
  151. package/dist/vendor/internal/uploads.js.map +1 -0
  152. package/dist/vendor/internal/utils/abort.d.ts +11 -0
  153. package/dist/vendor/internal/utils/abort.js +22 -0
  154. package/dist/vendor/internal/utils/abort.js.map +1 -0
  155. package/dist/vendor/internal/utils/async-queue.d.ts +30 -0
  156. package/dist/vendor/internal/utils/async-queue.js +66 -0
  157. package/dist/vendor/internal/utils/async-queue.js.map +1 -0
  158. package/dist/vendor/internal/utils/backoff.d.ts +22 -0
  159. package/dist/vendor/internal/utils/backoff.js +36 -0
  160. package/dist/vendor/internal/utils/backoff.js.map +1 -0
  161. package/dist/vendor/internal/utils/base64.d.ts +2 -0
  162. package/dist/vendor/internal/utils/base64.js +33 -0
  163. package/dist/vendor/internal/utils/base64.js.map +1 -0
  164. package/dist/vendor/internal/utils/bytes.d.ts +3 -0
  165. package/dist/vendor/internal/utils/bytes.js +26 -0
  166. package/dist/vendor/internal/utils/bytes.js.map +1 -0
  167. package/dist/vendor/internal/utils/env.d.ts +8 -0
  168. package/dist/vendor/internal/utils/env.js +18 -0
  169. package/dist/vendor/internal/utils/env.js.map +1 -0
  170. package/dist/vendor/internal/utils/log.d.ts +46 -0
  171. package/dist/vendor/internal/utils/log.js +105 -0
  172. package/dist/vendor/internal/utils/log.js.map +1 -0
  173. package/dist/vendor/internal/utils/path.d.ts +14 -0
  174. package/dist/vendor/internal/utils/path.js +74 -0
  175. package/dist/vendor/internal/utils/path.js.map +1 -0
  176. package/dist/vendor/internal/utils/promise.d.ts +10 -0
  177. package/dist/vendor/internal/utils/promise.js +15 -0
  178. package/dist/vendor/internal/utils/promise.js.map +1 -0
  179. package/dist/vendor/internal/utils/query.d.ts +1 -0
  180. package/dist/vendor/internal/utils/query.js +6 -0
  181. package/dist/vendor/internal/utils/query.js.map +1 -0
  182. package/dist/vendor/internal/utils/sleep.d.ts +9 -0
  183. package/dist/vendor/internal/utils/sleep.js +24 -0
  184. package/dist/vendor/internal/utils/sleep.js.map +1 -0
  185. package/dist/vendor/internal/utils/time.d.ts +2 -0
  186. package/dist/vendor/internal/utils/time.js +5 -0
  187. package/dist/vendor/internal/utils/time.js.map +1 -0
  188. package/dist/vendor/internal/utils/uuid.d.ts +4 -0
  189. package/dist/vendor/internal/utils/uuid.js +15 -0
  190. package/dist/vendor/internal/utils/uuid.js.map +1 -0
  191. package/dist/vendor/internal/utils/values.d.ts +24 -0
  192. package/dist/vendor/internal/utils/values.js +106 -0
  193. package/dist/vendor/internal/utils/values.js.map +1 -0
  194. package/dist/vendor/internal/utils.d.ts +7 -0
  195. package/dist/vendor/internal/utils.js +9 -0
  196. package/dist/vendor/internal/utils.js.map +1 -0
  197. package/dist/vendor/lib/BetaMessageStream.d.ts +123 -0
  198. package/dist/vendor/lib/BetaMessageStream.js +662 -0
  199. package/dist/vendor/lib/BetaMessageStream.js.map +1 -0
  200. package/dist/vendor/lib/MessageStream.d.ts +122 -0
  201. package/dist/vendor/lib/MessageStream.js +609 -0
  202. package/dist/vendor/lib/MessageStream.js.map +1 -0
  203. package/dist/vendor/lib/beta-parser.d.ts +36 -0
  204. package/dist/vendor/lib/beta-parser.js +75 -0
  205. package/dist/vendor/lib/beta-parser.js.map +1 -0
  206. package/dist/vendor/lib/credentials/credential-chain.d.ts +38 -0
  207. package/dist/vendor/lib/credentials/credential-chain.js +208 -0
  208. package/dist/vendor/lib/credentials/credential-chain.js.map +1 -0
  209. package/dist/vendor/lib/credentials/identity-token.d.ts +10 -0
  210. package/dist/vendor/lib/credentials/identity-token.js +35 -0
  211. package/dist/vendor/lib/credentials/identity-token.js.map +1 -0
  212. package/dist/vendor/lib/credentials/oidc-federation.d.ts +39 -0
  213. package/dist/vendor/lib/credentials/oidc-federation.js +79 -0
  214. package/dist/vendor/lib/credentials/oidc-federation.js.map +1 -0
  215. package/dist/vendor/lib/credentials/token-cache.d.ts +53 -0
  216. package/dist/vendor/lib/credentials/token-cache.js +110 -0
  217. package/dist/vendor/lib/credentials/token-cache.js.map +1 -0
  218. package/dist/vendor/lib/credentials/types.d.ts +95 -0
  219. package/dist/vendor/lib/credentials/types.js +226 -0
  220. package/dist/vendor/lib/credentials/types.js.map +1 -0
  221. package/dist/vendor/lib/credentials/user-oauth.d.ts +20 -0
  222. package/dist/vendor/lib/credentials/user-oauth.js +94 -0
  223. package/dist/vendor/lib/credentials/user-oauth.js.map +1 -0
  224. package/dist/vendor/lib/credentials.d.ts +3 -0
  225. package/dist/vendor/lib/credentials.js +3 -0
  226. package/dist/vendor/lib/credentials.js.map +1 -0
  227. package/dist/vendor/lib/environments/index.d.ts +3 -0
  228. package/dist/vendor/lib/environments/index.js +4 -0
  229. package/dist/vendor/lib/environments/index.js.map +1 -0
  230. package/dist/vendor/lib/environments/poller.d.ts +94 -0
  231. package/dist/vendor/lib/environments/poller.js +218 -0
  232. package/dist/vendor/lib/environments/poller.js.map +1 -0
  233. package/dist/vendor/lib/environments/worker.d.ts +226 -0
  234. package/dist/vendor/lib/environments/worker.js +572 -0
  235. package/dist/vendor/lib/environments/worker.js.map +1 -0
  236. package/dist/vendor/lib/helper-client.d.ts +30 -0
  237. package/dist/vendor/lib/helper-client.js +55 -0
  238. package/dist/vendor/lib/helper-client.js.map +1 -0
  239. package/dist/vendor/lib/middleware.d.ts +97 -0
  240. package/dist/vendor/lib/middleware.js +775 -0
  241. package/dist/vendor/lib/middleware.js.map +1 -0
  242. package/dist/vendor/lib/parser.d.ts +31 -0
  243. package/dist/vendor/lib/parser.js +62 -0
  244. package/dist/vendor/lib/parser.js.map +1 -0
  245. package/dist/vendor/lib/sessions/accumulate.d.ts +22 -0
  246. package/dist/vendor/lib/sessions/accumulate.js +42 -0
  247. package/dist/vendor/lib/sessions/accumulate.js.map +1 -0
  248. package/dist/vendor/lib/standard-schema.d.ts +130 -0
  249. package/dist/vendor/lib/standard-schema.js +41 -0
  250. package/dist/vendor/lib/standard-schema.js.map +1 -0
  251. package/dist/vendor/lib/tools/BetaRunnableTool.d.ts +48 -0
  252. package/dist/vendor/lib/tools/BetaRunnableTool.js +26 -0
  253. package/dist/vendor/lib/tools/BetaRunnableTool.js.map +1 -0
  254. package/dist/vendor/lib/tools/BetaToolRunner.d.ts +160 -0
  255. package/dist/vendor/lib/tools/BetaToolRunner.js +497 -0
  256. package/dist/vendor/lib/tools/BetaToolRunner.js.map +1 -0
  257. package/dist/vendor/lib/tools/CompactionControl.d.ts +29 -0
  258. package/dist/vendor/lib/tools/CompactionControl.js +25 -0
  259. package/dist/vendor/lib/tools/CompactionControl.js.map +1 -0
  260. package/dist/vendor/lib/tools/SessionToolRunner.d.ts +178 -0
  261. package/dist/vendor/lib/tools/SessionToolRunner.js +737 -0
  262. package/dist/vendor/lib/tools/SessionToolRunner.js.map +1 -0
  263. package/dist/vendor/lib/tools/ToolError.d.ts +32 -0
  264. package/dist/vendor/lib/tools/ToolError.js +43 -0
  265. package/dist/vendor/lib/tools/ToolError.js.map +1 -0
  266. package/dist/vendor/lib/transform-json-schema.d.ts +2 -0
  267. package/dist/vendor/lib/transform-json-schema.js +111 -0
  268. package/dist/vendor/lib/transform-json-schema.js.map +1 -0
  269. package/dist/vendor/pagination.d.ts +2 -0
  270. package/dist/vendor/pagination.js +3 -0
  271. package/dist/vendor/pagination.js.map +1 -0
  272. package/dist/vendor/resource.d.ts +2 -0
  273. package/dist/vendor/resource.js +3 -0
  274. package/dist/vendor/resource.js.map +1 -0
  275. package/dist/vendor/resources/beta/agents/agents.d.ts +1128 -0
  276. package/dist/vendor/resources/beta/agents/agents.js +123 -0
  277. package/dist/vendor/resources/beta/agents/agents.js.map +1 -0
  278. package/dist/vendor/resources/beta/agents/index.d.ts +2 -0
  279. package/dist/vendor/resources/beta/agents/index.js +4 -0
  280. package/dist/vendor/resources/beta/agents/index.js.map +1 -0
  281. package/dist/vendor/resources/beta/agents/versions.d.ts +32 -0
  282. package/dist/vendor/resources/beta/agents/versions.js +32 -0
  283. package/dist/vendor/resources/beta/agents/versions.js.map +1 -0
  284. package/dist/vendor/resources/beta/agents.d.ts +1 -0
  285. package/dist/vendor/resources/beta/agents.js +3 -0
  286. package/dist/vendor/resources/beta/agents.js.map +1 -0
  287. package/dist/vendor/resources/beta/beta.d.ts +131 -0
  288. package/dist/vendor/resources/beta/beta.js +69 -0
  289. package/dist/vendor/resources/beta/beta.js.map +1 -0
  290. package/dist/vendor/resources/beta/deployment-runs.d.ts +305 -0
  291. package/dist/vendor/resources/beta/deployment-runs.js +51 -0
  292. package/dist/vendor/resources/beta/deployment-runs.js.map +1 -0
  293. package/dist/vendor/resources/beta/deployments.d.ts +698 -0
  294. package/dist/vendor/resources/beta/deployments.js +192 -0
  295. package/dist/vendor/resources/beta/deployments.js.map +1 -0
  296. package/dist/vendor/resources/beta/dreams.d.ts +335 -0
  297. package/dist/vendor/resources/beta/dreams.js +112 -0
  298. package/dist/vendor/resources/beta/dreams.js.map +1 -0
  299. package/dist/vendor/resources/beta/environments/environments.d.ts +432 -0
  300. package/dist/vendor/resources/beta/environments/environments.js +142 -0
  301. package/dist/vendor/resources/beta/environments/environments.js.map +1 -0
  302. package/dist/vendor/resources/beta/environments/index.d.ts +2 -0
  303. package/dist/vendor/resources/beta/environments/index.js +4 -0
  304. package/dist/vendor/resources/beta/environments/index.js.map +1 -0
  305. package/dist/vendor/resources/beta/environments/work.d.ts +500 -0
  306. package/dist/vendor/resources/beta/environments/work.js +251 -0
  307. package/dist/vendor/resources/beta/environments/work.js.map +1 -0
  308. package/dist/vendor/resources/beta/environments.d.ts +1 -0
  309. package/dist/vendor/resources/beta/environments.js +3 -0
  310. package/dist/vendor/resources/beta/environments.js.map +1 -0
  311. package/dist/vendor/resources/beta/files.d.ts +190 -0
  312. package/dist/vendor/resources/beta/files.js +120 -0
  313. package/dist/vendor/resources/beta/files.js.map +1 -0
  314. package/dist/vendor/resources/beta/index.d.ts +17 -0
  315. package/dist/vendor/resources/beta/index.js +19 -0
  316. package/dist/vendor/resources/beta/index.js.map +1 -0
  317. package/dist/vendor/resources/beta/memory-stores/index.d.ts +3 -0
  318. package/dist/vendor/resources/beta/memory-stores/index.js +5 -0
  319. package/dist/vendor/resources/beta/memory-stores/index.js.map +1 -0
  320. package/dist/vendor/resources/beta/memory-stores/memories.d.ts +346 -0
  321. package/dist/vendor/resources/beta/memory-stores/memories.js +126 -0
  322. package/dist/vendor/resources/beta/memory-stores/memories.js.map +1 -0
  323. package/dist/vendor/resources/beta/memory-stores/memory-stores.d.ts +230 -0
  324. package/dist/vendor/resources/beta/memory-stores/memory-stores.js +137 -0
  325. package/dist/vendor/resources/beta/memory-stores/memory-stores.js.map +1 -0
  326. package/dist/vendor/resources/beta/memory-stores/memory-versions.d.ts +252 -0
  327. package/dist/vendor/resources/beta/memory-stores/memory-versions.js +77 -0
  328. package/dist/vendor/resources/beta/memory-stores/memory-versions.js.map +1 -0
  329. package/dist/vendor/resources/beta/memory-stores.d.ts +1 -0
  330. package/dist/vendor/resources/beta/memory-stores.js +3 -0
  331. package/dist/vendor/resources/beta/memory-stores.js.map +1 -0
  332. package/dist/vendor/resources/beta/messages/batches.d.ts +685 -0
  333. package/dist/vendor/resources/beta/messages/batches.js +203 -0
  334. package/dist/vendor/resources/beta/messages/batches.js.map +1 -0
  335. package/dist/vendor/resources/beta/messages/index.d.ts +3 -0
  336. package/dist/vendor/resources/beta/messages/index.js +5 -0
  337. package/dist/vendor/resources/beta/messages/index.js.map +1 -0
  338. package/dist/vendor/resources/beta/messages/messages.d.ts +5376 -0
  339. package/dist/vendor/resources/beta/messages/messages.js +158 -0
  340. package/dist/vendor/resources/beta/messages/messages.js.map +1 -0
  341. package/dist/vendor/resources/beta/messages.d.ts +1 -0
  342. package/dist/vendor/resources/beta/messages.js +3 -0
  343. package/dist/vendor/resources/beta/messages.js.map +1 -0
  344. package/dist/vendor/resources/beta/models.d.ts +217 -0
  345. package/dist/vendor/resources/beta/models.js +56 -0
  346. package/dist/vendor/resources/beta/models.js.map +1 -0
  347. package/dist/vendor/resources/beta/organization/api-keys.d.ts +176 -0
  348. package/dist/vendor/resources/beta/organization/api-keys.js +52 -0
  349. package/dist/vendor/resources/beta/organization/api-keys.js.map +1 -0
  350. package/dist/vendor/resources/beta/organization/compliance-settings.d.ts +73 -0
  351. package/dist/vendor/resources/beta/organization/compliance-settings.js +48 -0
  352. package/dist/vendor/resources/beta/organization/compliance-settings.js.map +1 -0
  353. package/dist/vendor/resources/beta/organization/external-keys.d.ts +271 -0
  354. package/dist/vendor/resources/beta/organization/external-keys.js +115 -0
  355. package/dist/vendor/resources/beta/organization/external-keys.js.map +1 -0
  356. package/dist/vendor/resources/beta/organization/federation/federation.d.ts +13 -0
  357. package/dist/vendor/resources/beta/organization/federation/federation.js +13 -0
  358. package/dist/vendor/resources/beta/organization/federation/federation.js.map +1 -0
  359. package/dist/vendor/resources/beta/organization/federation/index.d.ts +3 -0
  360. package/dist/vendor/resources/beta/organization/federation/index.js +5 -0
  361. package/dist/vendor/resources/beta/organization/federation/index.js.map +1 -0
  362. package/dist/vendor/resources/beta/organization/federation/issuers.d.ts +352 -0
  363. package/dist/vendor/resources/beta/organization/federation/issuers.js +165 -0
  364. package/dist/vendor/resources/beta/organization/federation/issuers.js.map +1 -0
  365. package/dist/vendor/resources/beta/organization/federation/rules/index.d.ts +2 -0
  366. package/dist/vendor/resources/beta/organization/federation/rules/index.js +4 -0
  367. package/dist/vendor/resources/beta/organization/federation/rules/index.js.map +1 -0
  368. package/dist/vendor/resources/beta/organization/federation/rules/rules.d.ts +467 -0
  369. package/dist/vendor/resources/beta/organization/federation/rules/rules.js +190 -0
  370. package/dist/vendor/resources/beta/organization/federation/rules/rules.js.map +1 -0
  371. package/dist/vendor/resources/beta/organization/federation/rules/workspaces.d.ts +123 -0
  372. package/dist/vendor/resources/beta/organization/federation/rules/workspaces.js +110 -0
  373. package/dist/vendor/resources/beta/organization/federation/rules/workspaces.js.map +1 -0
  374. package/dist/vendor/resources/beta/organization/federation/rules.d.ts +1 -0
  375. package/dist/vendor/resources/beta/organization/federation/rules.js +3 -0
  376. package/dist/vendor/resources/beta/organization/federation/rules.js.map +1 -0
  377. package/dist/vendor/resources/beta/organization/federation.d.ts +1 -0
  378. package/dist/vendor/resources/beta/organization/federation.js +3 -0
  379. package/dist/vendor/resources/beta/organization/federation.js.map +1 -0
  380. package/dist/vendor/resources/beta/organization/index.d.ts +10 -0
  381. package/dist/vendor/resources/beta/organization/index.js +12 -0
  382. package/dist/vendor/resources/beta/organization/index.js.map +1 -0
  383. package/dist/vendor/resources/beta/organization/invites.d.ts +161 -0
  384. package/dist/vendor/resources/beta/organization/invites.js +72 -0
  385. package/dist/vendor/resources/beta/organization/invites.js.map +1 -0
  386. package/dist/vendor/resources/beta/organization/organization.d.ts +72 -0
  387. package/dist/vendor/resources/beta/organization/organization.js +54 -0
  388. package/dist/vendor/resources/beta/organization/organization.js.map +1 -0
  389. package/dist/vendor/resources/beta/organization/rate-limits.d.ts +76 -0
  390. package/dist/vendor/resources/beta/organization/rate-limits.js +27 -0
  391. package/dist/vendor/resources/beta/organization/rate-limits.js.map +1 -0
  392. package/dist/vendor/resources/beta/organization/service-accounts/index.d.ts +2 -0
  393. package/dist/vendor/resources/beta/organization/service-accounts/index.js +4 -0
  394. package/dist/vendor/resources/beta/organization/service-accounts/index.js.map +1 -0
  395. package/dist/vendor/resources/beta/organization/service-accounts/service-accounts.d.ts +257 -0
  396. package/dist/vendor/resources/beta/organization/service-accounts/service-accounts.js +166 -0
  397. package/dist/vendor/resources/beta/organization/service-accounts/service-accounts.js.map +1 -0
  398. package/dist/vendor/resources/beta/organization/service-accounts/workspaces.d.ts +140 -0
  399. package/dist/vendor/resources/beta/organization/service-accounts/workspaces.js +121 -0
  400. package/dist/vendor/resources/beta/organization/service-accounts/workspaces.js.map +1 -0
  401. package/dist/vendor/resources/beta/organization/service-accounts.d.ts +1 -0
  402. package/dist/vendor/resources/beta/organization/service-accounts.js +3 -0
  403. package/dist/vendor/resources/beta/organization/service-accounts.js.map +1 -0
  404. package/dist/vendor/resources/beta/organization/users.d.ts +123 -0
  405. package/dist/vendor/resources/beta/organization/users.js +63 -0
  406. package/dist/vendor/resources/beta/organization/users.js.map +1 -0
  407. package/dist/vendor/resources/beta/organization/workspaces/index.d.ts +4 -0
  408. package/dist/vendor/resources/beta/organization/workspaces/index.js +6 -0
  409. package/dist/vendor/resources/beta/organization/workspaces/index.js.map +1 -0
  410. package/dist/vendor/resources/beta/organization/workspaces/members.d.ts +134 -0
  411. package/dist/vendor/resources/beta/organization/workspaces/members.js +98 -0
  412. package/dist/vendor/resources/beta/organization/workspaces/members.js.map +1 -0
  413. package/dist/vendor/resources/beta/organization/workspaces/rate-limits.d.ts +82 -0
  414. package/dist/vendor/resources/beta/organization/workspaces/rate-limits.js +30 -0
  415. package/dist/vendor/resources/beta/organization/workspaces/rate-limits.js.map +1 -0
  416. package/dist/vendor/resources/beta/organization/workspaces/service-accounts.d.ts +209 -0
  417. package/dist/vendor/resources/beta/organization/workspaces/service-accounts.js +185 -0
  418. package/dist/vendor/resources/beta/organization/workspaces/service-accounts.js.map +1 -0
  419. package/dist/vendor/resources/beta/organization/workspaces/workspaces.d.ts +302 -0
  420. package/dist/vendor/resources/beta/organization/workspaces/workspaces.js +104 -0
  421. package/dist/vendor/resources/beta/organization/workspaces/workspaces.js.map +1 -0
  422. package/dist/vendor/resources/beta/organization/workspaces.d.ts +1 -0
  423. package/dist/vendor/resources/beta/organization/workspaces.js +3 -0
  424. package/dist/vendor/resources/beta/organization/workspaces.js.map +1 -0
  425. package/dist/vendor/resources/beta/organization.d.ts +1 -0
  426. package/dist/vendor/resources/beta/organization.js +3 -0
  427. package/dist/vendor/resources/beta/organization.js.map +1 -0
  428. package/dist/vendor/resources/beta/sessions/events.d.ts +1513 -0
  429. package/dist/vendor/resources/beta/sessions/events.js +115 -0
  430. package/dist/vendor/resources/beta/sessions/events.js.map +1 -0
  431. package/dist/vendor/resources/beta/sessions/index.d.ts +4 -0
  432. package/dist/vendor/resources/beta/sessions/index.js +6 -0
  433. package/dist/vendor/resources/beta/sessions/index.js.map +1 -0
  434. package/dist/vendor/resources/beta/sessions/resources.d.ts +227 -0
  435. package/dist/vendor/resources/beta/sessions/resources.js +128 -0
  436. package/dist/vendor/resources/beta/sessions/resources.js.map +1 -0
  437. package/dist/vendor/resources/beta/sessions/sessions.d.ts +866 -0
  438. package/dist/vendor/resources/beta/sessions/sessions.js +150 -0
  439. package/dist/vendor/resources/beta/sessions/sessions.js.map +1 -0
  440. package/dist/vendor/resources/beta/sessions/threads/events.d.ts +77 -0
  441. package/dist/vendor/resources/beta/sessions/threads/events.js +57 -0
  442. package/dist/vendor/resources/beta/sessions/threads/events.js.map +1 -0
  443. package/dist/vendor/resources/beta/sessions/threads/index.d.ts +2 -0
  444. package/dist/vendor/resources/beta/sessions/threads/index.js +4 -0
  445. package/dist/vendor/resources/beta/sessions/threads/index.js.map +1 -0
  446. package/dist/vendor/resources/beta/sessions/threads/threads.d.ts +195 -0
  447. package/dist/vendor/resources/beta/sessions/threads/threads.js +80 -0
  448. package/dist/vendor/resources/beta/sessions/threads/threads.js.map +1 -0
  449. package/dist/vendor/resources/beta/sessions/threads.d.ts +1 -0
  450. package/dist/vendor/resources/beta/sessions/threads.js +3 -0
  451. package/dist/vendor/resources/beta/sessions/threads.js.map +1 -0
  452. package/dist/vendor/resources/beta/sessions.d.ts +1 -0
  453. package/dist/vendor/resources/beta/sessions.js +3 -0
  454. package/dist/vendor/resources/beta/sessions.js.map +1 -0
  455. package/dist/vendor/resources/beta/skills/index.d.ts +2 -0
  456. package/dist/vendor/resources/beta/skills/index.js +4 -0
  457. package/dist/vendor/resources/beta/skills/index.js.map +1 -0
  458. package/dist/vendor/resources/beta/skills/skills.d.ts +178 -0
  459. package/dist/vendor/resources/beta/skills/skills.js +96 -0
  460. package/dist/vendor/resources/beta/skills/skills.js.map +1 -0
  461. package/dist/vendor/resources/beta/skills/versions.d.ts +181 -0
  462. package/dist/vendor/resources/beta/skills/versions.js +125 -0
  463. package/dist/vendor/resources/beta/skills/versions.js.map +1 -0
  464. package/dist/vendor/resources/beta/skills.d.ts +1 -0
  465. package/dist/vendor/resources/beta/skills.js +3 -0
  466. package/dist/vendor/resources/beta/skills.js.map +1 -0
  467. package/dist/vendor/resources/beta/tunnels/certificates.d.ts +162 -0
  468. package/dist/vendor/resources/beta/tunnels/certificates.js +125 -0
  469. package/dist/vendor/resources/beta/tunnels/certificates.js.map +1 -0
  470. package/dist/vendor/resources/beta/tunnels/index.d.ts +2 -0
  471. package/dist/vendor/resources/beta/tunnels/index.js +4 -0
  472. package/dist/vendor/resources/beta/tunnels/index.js.map +1 -0
  473. package/dist/vendor/resources/beta/tunnels/tunnels.d.ts +211 -0
  474. package/dist/vendor/resources/beta/tunnels/tunnels.js +173 -0
  475. package/dist/vendor/resources/beta/tunnels/tunnels.js.map +1 -0
  476. package/dist/vendor/resources/beta/tunnels.d.ts +1 -0
  477. package/dist/vendor/resources/beta/tunnels.js +3 -0
  478. package/dist/vendor/resources/beta/tunnels.js.map +1 -0
  479. package/dist/vendor/resources/beta/user-profiles.d.ts +244 -0
  480. package/dist/vendor/resources/beta/user-profiles.js +114 -0
  481. package/dist/vendor/resources/beta/user-profiles.js.map +1 -0
  482. package/dist/vendor/resources/beta/vaults/credentials.d.ts +715 -0
  483. package/dist/vendor/resources/beta/vaults/credentials.js +173 -0
  484. package/dist/vendor/resources/beta/vaults/credentials.js.map +1 -0
  485. package/dist/vendor/resources/beta/vaults/index.d.ts +2 -0
  486. package/dist/vendor/resources/beta/vaults/index.js +4 -0
  487. package/dist/vendor/resources/beta/vaults/index.js.map +1 -0
  488. package/dist/vendor/resources/beta/vaults/vaults.d.ts +191 -0
  489. package/dist/vendor/resources/beta/vaults/vaults.js +141 -0
  490. package/dist/vendor/resources/beta/vaults/vaults.js.map +1 -0
  491. package/dist/vendor/resources/beta/vaults.d.ts +1 -0
  492. package/dist/vendor/resources/beta/vaults.js +3 -0
  493. package/dist/vendor/resources/beta/vaults.js.map +1 -0
  494. package/dist/vendor/resources/beta/webhooks.d.ts +464 -0
  495. package/dist/vendor/resources/beta/webhooks.js +29 -0
  496. package/dist/vendor/resources/beta/webhooks.js.map +1 -0
  497. package/dist/vendor/resources/beta.d.ts +1 -0
  498. package/dist/vendor/resources/beta.js +3 -0
  499. package/dist/vendor/resources/beta.js.map +1 -0
  500. package/dist/vendor/resources/completions.d.ts +172 -0
  501. package/dist/vendor/resources/completions.js +19 -0
  502. package/dist/vendor/resources/completions.js.map +1 -0
  503. package/dist/vendor/resources/files.d.ts +104 -0
  504. package/dist/vendor/resources/files.js +48 -0
  505. package/dist/vendor/resources/files.js.map +1 -0
  506. package/dist/vendor/resources/index.d.ts +7 -0
  507. package/dist/vendor/resources/index.js +9 -0
  508. package/dist/vendor/resources/index.js.map +1 -0
  509. package/dist/vendor/resources/messages/batches.d.ts +312 -0
  510. package/dist/vendor/resources/messages/batches.js +157 -0
  511. package/dist/vendor/resources/messages/batches.js.map +1 -0
  512. package/dist/vendor/resources/messages/index.d.ts +2 -0
  513. package/dist/vendor/resources/messages/index.js +4 -0
  514. package/dist/vendor/resources/messages/index.js.map +1 -0
  515. package/dist/vendor/resources/messages/messages.d.ts +3886 -0
  516. package/dist/vendor/resources/messages/messages.js +130 -0
  517. package/dist/vendor/resources/messages/messages.js.map +1 -0
  518. package/dist/vendor/resources/messages.d.ts +1 -0
  519. package/dist/vendor/resources/messages.js +3 -0
  520. package/dist/vendor/resources/messages.js.map +1 -0
  521. package/dist/vendor/resources/models.d.ts +196 -0
  522. package/dist/vendor/resources/models.js +41 -0
  523. package/dist/vendor/resources/models.js.map +1 -0
  524. package/dist/vendor/resources/shared.d.ts +43 -0
  525. package/dist/vendor/resources/shared.js +3 -0
  526. package/dist/vendor/resources/shared.js.map +1 -0
  527. package/dist/vendor/resources/skills/index.d.ts +2 -0
  528. package/dist/vendor/resources/skills/index.js +4 -0
  529. package/dist/vendor/resources/skills/index.js.map +1 -0
  530. package/dist/vendor/resources/skills/skills.d.ts +128 -0
  531. package/dist/vendor/resources/skills/skills.js +36 -0
  532. package/dist/vendor/resources/skills/skills.js.map +1 -0
  533. package/dist/vendor/resources/skills/versions.d.ts +103 -0
  534. package/dist/vendor/resources/skills/versions.js +37 -0
  535. package/dist/vendor/resources/skills/versions.js.map +1 -0
  536. package/dist/vendor/resources/skills.d.ts +1 -0
  537. package/dist/vendor/resources/skills.js +3 -0
  538. package/dist/vendor/resources/skills.js.map +1 -0
  539. package/dist/vendor/resources/top-level.d.ts +1 -0
  540. package/dist/vendor/resources/top-level.js +3 -0
  541. package/dist/vendor/resources/top-level.js.map +1 -0
  542. package/dist/vendor/resources.d.ts +1 -0
  543. package/dist/vendor/resources.js +2 -0
  544. package/dist/vendor/resources.js.map +1 -0
  545. package/dist/vendor/streaming.d.ts +2 -0
  546. package/dist/vendor/streaming.js +3 -0
  547. package/dist/vendor/streaming.js.map +1 -0
  548. package/dist/vendor/tools/agent-toolset/fs-util.d.ts +74 -0
  549. package/dist/vendor/tools/agent-toolset/fs-util.js +184 -0
  550. package/dist/vendor/tools/agent-toolset/fs-util.js.map +1 -0
  551. package/dist/vendor/tools/agent-toolset/memories.d.ts +172 -0
  552. package/dist/vendor/tools/agent-toolset/memories.js +910 -0
  553. package/dist/vendor/tools/agent-toolset/memories.js.map +1 -0
  554. package/dist/vendor/tools/agent-toolset/node.browser.d.ts +80 -0
  555. package/dist/vendor/tools/agent-toolset/node.browser.js +129 -0
  556. package/dist/vendor/tools/agent-toolset/node.browser.js.map +1 -0
  557. package/dist/vendor/tools/agent-toolset/node.d.ts +191 -0
  558. package/dist/vendor/tools/agent-toolset/node.js +886 -0
  559. package/dist/vendor/tools/agent-toolset/node.js.map +1 -0
  560. package/dist/vendor/tools/agent-toolset/skills.d.ts +73 -0
  561. package/dist/vendor/tools/agent-toolset/skills.js +320 -0
  562. package/dist/vendor/tools/agent-toolset/skills.js.map +1 -0
  563. package/dist/vendor/tools/agent-toolset/sync-interval.d.ts +18 -0
  564. package/dist/vendor/tools/agent-toolset/sync-interval.js +25 -0
  565. package/dist/vendor/tools/agent-toolset/sync-interval.js.map +1 -0
  566. package/dist/vendor/tools/memory/node.browser.d.ts +26 -0
  567. package/dist/vendor/tools/memory/node.browser.js +44 -0
  568. package/dist/vendor/tools/memory/node.browser.js.map +1 -0
  569. package/dist/vendor/tools/memory/node.d.ts +17 -0
  570. package/dist/vendor/tools/memory/node.js +327 -0
  571. package/dist/vendor/tools/memory/node.js.map +1 -0
  572. package/dist/vendor/uploads.d.ts +2 -0
  573. package/dist/vendor/uploads.js +3 -0
  574. package/dist/vendor/uploads.js.map +1 -0
  575. package/dist/vendor/version.d.ts +1 -0
  576. package/dist/vendor/version.js +2 -0
  577. package/dist/vendor/version.js.map +1 -0
  578. package/package.json +7 -14
  579. package/sdk.cjs +6 -6
  580. package/sdk.cjs.map +18 -18
  581. package/sdk.d.ts +10 -10
  582. package/sdk.mjs +21 -21
  583. package/sdk.mjs.map +18 -18
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["../../../../src/vendor/tools/agent-toolset/node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAA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AAO;gBAAE,OAAO,KAAK,CAAC;YAClC,MAAM,QAAQ,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YACvD,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;gBACpB,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,QAAQ,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;oBAAE,OAAO,KAAK,CAAC;YACxD,CAAC;iBAAM,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;gBACtB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,KAAK,KAAK;oBAAE,OAAO,KAAK,CAAC;YACnD,CAAC;YACD,kEAAkE;QACpE,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AACtB,CAAC;AAED,KAAK,UAAU,MAAM;IACnB,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/D,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QACrB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC;YACH,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YAClD,OAAO,SAAS,CAAC;QACnB,CAAC;QAAC,MAAM,CAAC;YACP,WAAW;QACb,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Node-only skill plumbing for the agent toolset: downloading a session
3
+ * agent's skills into the workdir and extracting the archives. Kept in its own
4
+ * file because it is a distinct concern from the tool implementations in
5
+ * `node.ts` — distinct enough, and large enough, to review on its own.
6
+ */
7
+ import type { AgentToolContext } from './node';
8
+ /**
9
+ * Download the session agent's skills into `{ctx.workdir}/skills/<name>/`.
10
+ *
11
+ * No-op (returns a no-op cleanup) unless `ctx.client` is set together with
12
+ * `ctx.session` (or the deprecated `ctx.sessionId`). Reads the resolved agent
13
+ * off the session and, for each skill, fetches its files via
14
+ * `client.beta.skills.versions.download` and extracts the archive (a zip or
15
+ * tar.* archive) into a directory named after the skill. A failure on one skill
16
+ * is logged and does not block the others. Call this before starting the
17
+ * session tool runner (e.g. right after the bash session / workdir is ready).
18
+ *
19
+ * Pass `ctx.session`. A session's resources cannot change while it runs, so the
20
+ * caller fetches it once and shares that snapshot with the memory-store
21
+ * download — the two can then never disagree about the attached resources.
22
+ *
23
+ * `ctx.sessionId` is deprecated: it costs an extra `sessions.retrieve` round
24
+ * trip on every call, and a caller that uses it for both this and the
25
+ * memory-store download fetches the session twice. It remains supported for
26
+ * callers written before `session` existed.
27
+ *
28
+ * Returns a cleanup function that removes the skill directories this call
29
+ * created — call it once the work item is done so downloaded skills do not
30
+ * accumulate in the workdir across sessions.
31
+ */
32
+ export declare function setupSkills(ctx: AgentToolContext): Promise<() => Promise<void>>;
33
+ /**
34
+ * Pair an archive's name listing (`unzip -Z1` / `tar -tf`) with its typed
35
+ * listing (`unzip -Z --h --t` / `tar -tvf`) and split the members into plain
36
+ * (regular file or directory) and special (everything else). Special members
37
+ * are excluded from extraction rather than rejected; the archive is refused
38
+ * only when the two listings disagree in length or a special member's name
39
+ * cannot be passed back to the CLI verbatim (see {@link canExcludeVerbatim}).
40
+ */
41
+ export declare function classifyArchiveListing(cmd: 'unzip' | 'tar', names: string, typed: string): {
42
+ plain: string[];
43
+ special: string[];
44
+ };
45
+ /**
46
+ * Walk `dir` with `lstat` semantics and reject anything that is not a regular
47
+ * file or directory. Never follows a link and never descends into anything
48
+ * but a real directory.
49
+ */
50
+ export declare function assertOnlyPlainEntries(dir: string): Promise<void>;
51
+ /**
52
+ * Extract a skill download (a zip or tar.* archive) into `dest`. Streams the
53
+ * response body straight to a temp file beside `dest` (so the whole archive is
54
+ * never buffered in memory — skills can contain large binaries), then shells out
55
+ * to `unzip`/`tar` — consistent with the rest of the toolset, which already
56
+ * invokes `bash` and `rg`. Both `unzip` and `tar` must be available on `PATH`; a
57
+ * missing binary surfaces as a clear error (see {@link runArchiveTool}). Refuses
58
+ * any member that would escape `dest` (zip-slip / tar-slip): skill archives
59
+ * come from the API, but skills can be third-party. Members that are not a
60
+ * regular file or directory (symlink, hardlink, device, fifo) are excluded
61
+ * from extraction rather than rejected; an archive whose special members
62
+ * cannot be excluded reliably is refused (see {@link classifyArchiveListing}).
63
+ * `tar` matches exclusions unanchored, so a plain member sharing a special
64
+ * member's name may be dropped too. The staging tree is verified to hold only
65
+ * regular files and directories before anything is promoted into `dest`.
66
+ *
67
+ * The skill bundle's single wrapper directory is stripped: the archive is
68
+ * extracted into a staging dir and the wrapper's contents are promoted into
69
+ * `dest`, so files land at `dest/SKILL.md` rather than a doubled
70
+ * `dest/<skill>/SKILL.md` (`unzip` has no `--strip-components`, so this is
71
+ * done uniformly by staging + promote rather than per-tool flags).
72
+ */
73
+ export declare function extractSkillArchive(resp: Response, dest: string): Promise<void>;
@@ -0,0 +1,320 @@
1
+ /**
2
+ * Node-only skill plumbing for the agent toolset: downloading a session
3
+ * agent's skills into the workdir and extracting the archives. Kept in its own
4
+ * file because it is a distinct concern from the tool implementations in
5
+ * `node.ts` — distinct enough, and large enough, to review on its own.
6
+ */
7
+ import { child_process, fs as fssync, path, stream, util } from '../../internal/node.js';
8
+ import { PukuError } from '../../core/error.js';
9
+ import { loggerFor } from '../../internal/utils/log.js';
10
+ import { DIR_CREATE_MODE, errnoCode } from './fs-util.js';
11
+ const fs = fssync.promises;
12
+ const execFileAsync = util.promisify(child_process.execFile);
13
+ /**
14
+ * Download the session agent's skills into `{ctx.workdir}/skills/<name>/`.
15
+ *
16
+ * No-op (returns a no-op cleanup) unless `ctx.client` is set together with
17
+ * `ctx.session` (or the deprecated `ctx.sessionId`). Reads the resolved agent
18
+ * off the session and, for each skill, fetches its files via
19
+ * `client.beta.skills.versions.download` and extracts the archive (a zip or
20
+ * tar.* archive) into a directory named after the skill. A failure on one skill
21
+ * is logged and does not block the others. Call this before starting the
22
+ * session tool runner (e.g. right after the bash session / workdir is ready).
23
+ *
24
+ * Pass `ctx.session`. A session's resources cannot change while it runs, so the
25
+ * caller fetches it once and shares that snapshot with the memory-store
26
+ * download — the two can then never disagree about the attached resources.
27
+ *
28
+ * `ctx.sessionId` is deprecated: it costs an extra `sessions.retrieve` round
29
+ * trip on every call, and a caller that uses it for both this and the
30
+ * memory-store download fetches the session twice. It remains supported for
31
+ * callers written before `session` existed.
32
+ *
33
+ * Returns a cleanup function that removes the skill directories this call
34
+ * created — call it once the work item is done so downloaded skills do not
35
+ * accumulate in the workdir across sessions.
36
+ */
37
+ export async function setupSkills(ctx) {
38
+ const { client, sessionId } = ctx;
39
+ if (!client)
40
+ return async () => { };
41
+ const log = loggerFor(client);
42
+ let session = ctx.session;
43
+ if (!session) {
44
+ if (sessionId === undefined)
45
+ return async () => { };
46
+ log.warn('AgentToolContext.sessionId is deprecated and costs an extra session fetch; ' +
47
+ 'fetch the session once and set `session` instead', { component: 'agent-tool-context' });
48
+ // The sessions/skills resources inject their puku-beta headers
49
+ // (managed-agents / skills) themselves — no need to pass `betas` here.
50
+ session = await client.beta.sessions.retrieve(sessionId);
51
+ }
52
+ const skillsRoot = path.resolve(ctx.workdir, 'skills');
53
+ const created = [];
54
+ for (const skill of session.agent.skills) {
55
+ try {
56
+ const version = await client.beta.skills.versions.retrieve(skill.version, { skill_id: skill.skill_id });
57
+ // The directory is the skill's name, reduced to a single safe path
58
+ // component so a hostile name can't escape `skillsRoot`.
59
+ let dirname = path.basename(version.name.trim());
60
+ if (dirname === '' || dirname === '.' || dirname === '..')
61
+ dirname = skill.skill_id;
62
+ const dest = path.resolve(skillsRoot, dirname);
63
+ if (dest !== skillsRoot && !dest.startsWith(skillsRoot + path.sep)) {
64
+ log.warn('skill name escapes the skills dir; skipping', {
65
+ component: 'agent-tool-context',
66
+ name: version.name,
67
+ });
68
+ continue;
69
+ }
70
+ // `skill.version` may be the alias `"latest"`, which only the retrieve
71
+ // endpoint resolves; download by the concrete id it returned.
72
+ const resp = await client.beta.skills.versions.download(version.id, { skill_id: skill.skill_id });
73
+ await fs.rm(dest, { recursive: true, force: true });
74
+ await fs.mkdir(dest, { recursive: true, mode: DIR_CREATE_MODE });
75
+ created.push(dest);
76
+ await extractSkillArchive(resp, dest);
77
+ log.info('downloaded skill', {
78
+ component: 'agent-tool-context',
79
+ skill_id: skill.skill_id,
80
+ version: version.id,
81
+ dest,
82
+ });
83
+ }
84
+ catch (e) {
85
+ log.warn('failed to download skill', {
86
+ component: 'agent-tool-context',
87
+ skill_id: skill.skill_id,
88
+ error: String(e),
89
+ });
90
+ }
91
+ }
92
+ return async () => {
93
+ for (const dest of created) {
94
+ await fs.rm(dest, { recursive: true, force: true }).catch((e) => {
95
+ log.warn('failed to clean up skill', { component: 'agent-tool-context', dest, error: String(e) });
96
+ });
97
+ }
98
+ };
99
+ }
100
+ /** Reject archive members that are absolute or contain a `..` component. */
101
+ function assertSafeMemberNames(names) {
102
+ for (const raw of names) {
103
+ const entry = raw.trim();
104
+ if (!entry)
105
+ continue;
106
+ if (path.isAbsolute(entry) || entry.split(/[\\/]/).includes('..')) {
107
+ throw new PukuError(`refusing to extract unsafe archive member: ${entry}`);
108
+ }
109
+ }
110
+ }
111
+ const INCONSISTENT_LISTING = 'skill archive listing is inconsistent; refusing to extract';
112
+ /**
113
+ * Type chars (first byte of each `ls`-style line from `unzip -Z` / `tar -tvf`)
114
+ * that denote a regular file or directory. `zipinfo` prints `?` for entries
115
+ * with no Unix type bits, which `unzip` extracts as regular files; GNU tar
116
+ * prints `C` for contiguous files. Everything else — `l` symlink, `h`
117
+ * hardlink, `b`/`c` device, `p` fifo, `s` socket, unknown tar types — is a
118
+ * special member.
119
+ */
120
+ const PLAIN_TYPE_CHARS = { unzip: new Set(['-', 'd', '?']), tar: new Set(['-', 'd', 'C']) };
121
+ function listingLines(listing) {
122
+ const lines = listing.split('\n');
123
+ if (lines[lines.length - 1] === '')
124
+ lines.pop();
125
+ return lines;
126
+ }
127
+ /**
128
+ * A special member is excluded by handing its listed name back to the CLI as
129
+ * a pattern, so the name must be byte-identical to what is stored. `tar`,
130
+ * `bsdtar` and `unzip` print bytes they cannot show literally as `\ooo`, `^X`
131
+ * or `#U` escapes, or as raw non-ASCII; any such name cannot be excluded
132
+ * reliably. A leading `-` would let `unzip` parse the pattern as an option.
133
+ */
134
+ function canExcludeVerbatim(cmd, name) {
135
+ return /^[\x20-\x7E]+$/.test(name) && !/[\\^#]/.test(name) && !(cmd === 'unzip' && name.startsWith('-'));
136
+ }
137
+ /**
138
+ * Pair an archive's name listing (`unzip -Z1` / `tar -tf`) with its typed
139
+ * listing (`unzip -Z --h --t` / `tar -tvf`) and split the members into plain
140
+ * (regular file or directory) and special (everything else). Special members
141
+ * are excluded from extraction rather than rejected; the archive is refused
142
+ * only when the two listings disagree in length or a special member's name
143
+ * cannot be passed back to the CLI verbatim (see {@link canExcludeVerbatim}).
144
+ */
145
+ export function classifyArchiveListing(cmd, names, typed) {
146
+ const nameLines = listingLines(names);
147
+ const typedLines = listingLines(typed);
148
+ if (nameLines.length !== typedLines.length)
149
+ throw new PukuError(INCONSISTENT_LISTING);
150
+ const plain = [];
151
+ const special = [];
152
+ nameLines.forEach((name, i) => {
153
+ if (PLAIN_TYPE_CHARS[cmd].has(typedLines[i].charAt(0))) {
154
+ plain.push(name);
155
+ return;
156
+ }
157
+ if (!canExcludeVerbatim(cmd, name)) {
158
+ throw new PukuError(`refusing to extract archive: cannot safely exclude member ${JSON.stringify(name)}`);
159
+ }
160
+ special.push(name);
161
+ });
162
+ return { plain, special };
163
+ }
164
+ /**
165
+ * Walk `dir` with `lstat` semantics and reject anything that is not a regular
166
+ * file or directory. Never follows a link and never descends into anything
167
+ * but a real directory.
168
+ */
169
+ export async function assertOnlyPlainEntries(dir) {
170
+ for (const entry of await fs.readdir(dir, { withFileTypes: true })) {
171
+ if (entry.isDirectory())
172
+ await assertOnlyPlainEntries(path.join(dir, entry.name));
173
+ else if (!entry.isFile())
174
+ throw new PukuError(INCONSISTENT_LISTING);
175
+ }
176
+ }
177
+ /**
178
+ * Run an archive CLI (`unzip` for zip archives, `tar` for everything else),
179
+ * returning its stdout. Both binaries must be on `PATH`; a missing one would
180
+ * otherwise surface as an opaque `ENOENT` spawn failure, so it is turned into a
181
+ * clear, specific error naming the missing command.
182
+ */
183
+ async function runArchiveTool(cmd, args) {
184
+ try {
185
+ const { stdout } = await execFileAsync(cmd, args);
186
+ return stdout;
187
+ }
188
+ catch (e) {
189
+ if (errnoCode(e) === 'ENOENT') {
190
+ throw new PukuError(`skill extraction requires the \`${cmd}\` command, but it was not found on PATH`);
191
+ }
192
+ throw e;
193
+ }
194
+ }
195
+ /**
196
+ * The single top-level directory shared by every entry in an archive listing,
197
+ * or `''` if entries don't all live under one common directory. Skill bundles
198
+ * are packaged wrapped in one directory named after the skill (e.g.
199
+ * `pdf/SKILL.md`, `pdf/scripts/...`); the extractor strips it so contents land
200
+ * directly in the skill's dir instead of a redundant nested `<skill>/<skill>/`
201
+ * level. A flat or multi-root archive yields `''`.
202
+ */
203
+ function archiveTopDir(names) {
204
+ let top;
205
+ let nested = false;
206
+ for (const raw of names) {
207
+ // Drop `.` / empty segments so a `./pdf/...`-style listing (e.g. from
208
+ // `tar -C dir .`) is treated the same as `pdf/...`.
209
+ const parts = raw
210
+ .trim()
211
+ .split('/')
212
+ .filter((p) => p !== '' && p !== '.');
213
+ if (parts.length === 0)
214
+ continue;
215
+ const first = parts[0];
216
+ if (top === undefined)
217
+ top = first;
218
+ else if (first !== top)
219
+ return '';
220
+ if (parts.length > 1)
221
+ nested = true;
222
+ }
223
+ return top !== undefined && nested ? top : '';
224
+ }
225
+ /**
226
+ * Extract a skill download (a zip or tar.* archive) into `dest`. Streams the
227
+ * response body straight to a temp file beside `dest` (so the whole archive is
228
+ * never buffered in memory — skills can contain large binaries), then shells out
229
+ * to `unzip`/`tar` — consistent with the rest of the toolset, which already
230
+ * invokes `bash` and `rg`. Both `unzip` and `tar` must be available on `PATH`; a
231
+ * missing binary surfaces as a clear error (see {@link runArchiveTool}). Refuses
232
+ * any member that would escape `dest` (zip-slip / tar-slip): skill archives
233
+ * come from the API, but skills can be third-party. Members that are not a
234
+ * regular file or directory (symlink, hardlink, device, fifo) are excluded
235
+ * from extraction rather than rejected; an archive whose special members
236
+ * cannot be excluded reliably is refused (see {@link classifyArchiveListing}).
237
+ * `tar` matches exclusions unanchored, so a plain member sharing a special
238
+ * member's name may be dropped too. The staging tree is verified to hold only
239
+ * regular files and directories before anything is promoted into `dest`.
240
+ *
241
+ * The skill bundle's single wrapper directory is stripped: the archive is
242
+ * extracted into a staging dir and the wrapper's contents are promoted into
243
+ * `dest`, so files land at `dest/SKILL.md` rather than a doubled
244
+ * `dest/<skill>/SKILL.md` (`unzip` has no `--strip-components`, so this is
245
+ * done uniformly by staging + promote rather than per-tool flags).
246
+ */
247
+ export async function extractSkillArchive(resp, dest) {
248
+ const tmp = path.join(dest, `.skill-archive-${process.pid}-${Date.now()}`);
249
+ if (!resp.body) {
250
+ throw new PukuError('skill download response had no body');
251
+ }
252
+ await stream.promises.pipeline(stream.Readable.fromWeb(resp.body), fssync.createWriteStream(tmp));
253
+ const stage = path.join(path.dirname(dest), `.skill-stage-${process.pid}-${Date.now()}`);
254
+ const excludeFile = path.join(path.dirname(dest), `.skill-exclude-${process.pid}-${Date.now()}`);
255
+ try {
256
+ // Sniff the first bytes: zip archives start with "PK\x03\x04"; treat
257
+ // anything else as a tar.* archive (`tar -xf` autodetects gzip/bzip2/xz).
258
+ const head = await readHead(tmp, 4);
259
+ const isZip = head.length >= 4 && head[0] === 0x50 && head[1] === 0x4b && head[2] === 0x03 && head[3] === 0x04;
260
+ const archiveCmd = isZip ? 'unzip' : 'tar';
261
+ // List first, validate, then extract — `tar`/`unzip` will happily write a
262
+ // `../` member (or follow a symlink member) outside `-C`/`-d` otherwise.
263
+ const names = await runArchiveTool(archiveCmd, isZip ? ['-Z1', tmp] : ['-tf', tmp]);
264
+ const typed = await runArchiveTool(archiveCmd, isZip ? ['-Z', '--h', '--t', tmp] : ['-tvf', tmp]);
265
+ const { plain, special } = classifyArchiveListing(archiveCmd, names, typed);
266
+ assertSafeMemberNames([...plain, ...special]);
267
+ const top = archiveTopDir(plain);
268
+ await fs.mkdir(stage, { recursive: true, mode: DIR_CREATE_MODE });
269
+ // `unzip` exits non-zero when every member is excluded, so only run the
270
+ // extractor when there is something to extract.
271
+ if (plain.length > 0) {
272
+ await runArchiveTool(archiveCmd, await extractArgs(archiveCmd, tmp, stage, special, excludeFile));
273
+ }
274
+ await assertOnlyPlainEntries(stage);
275
+ // Promote the wrapper's contents (or the staged tree itself, if the
276
+ // archive wasn't wrapped) into the already-created empty `dest`. `stage`
277
+ // is a sibling of `dest`, so each rename stays on one filesystem.
278
+ const srcRoot = top ? path.join(stage, top) : stage;
279
+ const entries = await fs.readdir(srcRoot).catch((e) => {
280
+ throw errnoCode(e) === 'ENOENT' ? new PukuError(INCONSISTENT_LISTING) : e;
281
+ });
282
+ for (const entry of entries) {
283
+ await fs.rename(path.join(srcRoot, entry), path.join(dest, entry));
284
+ }
285
+ }
286
+ finally {
287
+ await fs.rm(tmp, { force: true });
288
+ await fs.rm(excludeFile, { force: true });
289
+ await fs.rm(stage, { recursive: true, force: true });
290
+ }
291
+ }
292
+ /**
293
+ * Arguments that extract `archive` into `stage` while excluding every member
294
+ * in `special`. Names are glob-escaped because both CLIs treat exclusions as
295
+ * patterns; `tar` reads them from `excludeFile`, `unzip` takes them after
296
+ * `-x`, which must follow `-d` so no pattern is parsed as an option.
297
+ */
298
+ async function extractArgs(cmd, archive, stage, special, excludeFile) {
299
+ const patterns = special.map((name) => name.replace(/[*?[\\]/g, '\\$&'));
300
+ if (cmd === 'unzip') {
301
+ return ['-oq', archive, '-d', stage, ...(patterns.length > 0 ? ['-x', ...patterns] : [])];
302
+ }
303
+ if (patterns.length === 0)
304
+ return ['-xf', archive, '-C', stage];
305
+ await fs.writeFile(excludeFile, patterns.join('\n') + '\n', { flag: 'wx', mode: 0o600 });
306
+ return ['-xf', archive, '-C', stage, '-X', excludeFile];
307
+ }
308
+ /** Read the first `n` bytes of `file`. */
309
+ async function readHead(file, n) {
310
+ const handle = await fs.open(file, 'r');
311
+ try {
312
+ const buf = Buffer.alloc(n);
313
+ const { bytesRead } = await handle.read(buf, 0, n, 0);
314
+ return buf.subarray(0, bytesRead);
315
+ }
316
+ finally {
317
+ await handle.close();
318
+ }
319
+ }
320
+ //# sourceMappingURL=skills.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.js","sourceRoot":"","sources":["../../../../src/vendor/tools/agent-toolset/skills.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,EAAE,IAAI,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGvD,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAqB;IACrD,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC;I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AAG,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACtD,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IACpC,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;AACH,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The memory sync cadence, split out of `memories.ts` so runtime-agnostic
3
+ * callers (the environment worker) can validate an interval up front without
4
+ * reaching into the Node-only toolset module.
5
+ */
6
+ /**
7
+ * How often (milliseconds) the worker syncs the session's memory stores back
8
+ * while the session runs. Checked after each dispatched tool call.
9
+ */
10
+ export declare const DEFAULT_MEMORY_SYNC_INTERVAL_MS = 15000;
11
+ /**
12
+ * The shortest sync interval accepted. Each sync lists every attached store,
13
+ * so anything tighter mostly spends requests rediscovering that nothing
14
+ * changed.
15
+ */
16
+ export declare const MIN_MEMORY_SYNC_INTERVAL_MS = 5000;
17
+ /** Throw unless `ms` is a usable sync interval. `option` names it in the message. */
18
+ export declare function checkMemorySyncInterval(ms: number, option: string): void;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The memory sync cadence, split out of `memories.ts` so runtime-agnostic
3
+ * callers (the environment worker) can validate an interval up front without
4
+ * reaching into the Node-only toolset module.
5
+ */
6
+ import { PukuError } from '../../core/error.js';
7
+ /**
8
+ * How often (milliseconds) the worker syncs the session's memory stores back
9
+ * while the session runs. Checked after each dispatched tool call.
10
+ */
11
+ export const DEFAULT_MEMORY_SYNC_INTERVAL_MS = 15_000;
12
+ /**
13
+ * The shortest sync interval accepted. Each sync lists every attached store,
14
+ * so anything tighter mostly spends requests rediscovering that nothing
15
+ * changed.
16
+ */
17
+ export const MIN_MEMORY_SYNC_INTERVAL_MS = 5_000;
18
+ /** Throw unless `ms` is a usable sync interval. `option` names it in the message. */
19
+ export function checkMemorySyncInterval(ms, option) {
20
+ if (!(ms >= MIN_MEMORY_SYNC_INTERVAL_MS)) {
21
+ throw new PukuError(`${option} must be at least ${MIN_MEMORY_SYNC_INTERVAL_MS}ms (got ${ms}); ` +
22
+ 'to run without memory sync, pass `memorySyncIntervalMs: null` to the worker instead');
23
+ }
24
+ }
25
+ //# sourceMappingURL=sync-interval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-interval.js","sourceRoot":"","sources":["../../../../src/vendor/tools/agent-toolset/sync-interval.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C;;;GAGG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC;AAEtD;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,CAAC;AAEjD,qFAAqF;AACrF,MAAM,UAAU,uBAAuB,CAAC,EAAU,EAAE,MAAc;IAChE,IAAI,CAAC,CAAC,EAAE,IAAI,2BAA2B,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,SAAS,CACjB,GAAG,MAAM,qBAAqB,2BAA2B,WAAW,EAAE,KAAK;YACzE,qFAAqF,CACxF,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Browser stub for `tools/memory/node`.
3
+ *
4
+ * The real module's {@link BetaLocalFilesystemMemoryTool} is implemented on top
5
+ * of Node built-ins (`fs/promises`, `path`, `crypto`), which browser bundlers
6
+ * cannot resolve. The `browser` field in `package.json` substitutes this stub
7
+ * in browser builds; Node runtimes and node-target bundles ignore the mapping
8
+ * and load the real implementation.
9
+ *
10
+ * `betaMemoryTool` is runtime-agnostic and is re-exported for real here; only
11
+ * the filesystem-backed handlers throw.
12
+ */
13
+ export { betaMemoryTool } from '../../helpers/beta/memory';
14
+ export type { MemoryToolHandlers } from '../../helpers/beta/memory';
15
+ import type { MemoryToolHandlers } from '../../helpers/beta/memory';
16
+ import type { BetaMemoryTool20250818CreateCommand, BetaMemoryTool20250818DeleteCommand, BetaMemoryTool20250818InsertCommand, BetaMemoryTool20250818RenameCommand, BetaMemoryTool20250818StrReplaceCommand, BetaMemoryTool20250818ViewCommand } from '../../resources/beta';
17
+ export declare class BetaLocalFilesystemMemoryTool implements MemoryToolHandlers {
18
+ constructor(_basePath?: string);
19
+ static init(_basePath?: string): Promise<BetaLocalFilesystemMemoryTool>;
20
+ view(_command: BetaMemoryTool20250818ViewCommand): Promise<string>;
21
+ create(_command: BetaMemoryTool20250818CreateCommand): Promise<string>;
22
+ str_replace(_command: BetaMemoryTool20250818StrReplaceCommand): Promise<string>;
23
+ insert(_command: BetaMemoryTool20250818InsertCommand): Promise<string>;
24
+ delete(_command: BetaMemoryTool20250818DeleteCommand): Promise<string>;
25
+ rename(_command: BetaMemoryTool20250818RenameCommand): Promise<string>;
26
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Browser stub for `tools/memory/node`.
3
+ *
4
+ * The real module's {@link BetaLocalFilesystemMemoryTool} is implemented on top
5
+ * of Node built-ins (`fs/promises`, `path`, `crypto`), which browser bundlers
6
+ * cannot resolve. The `browser` field in `package.json` substitutes this stub
7
+ * in browser builds; Node runtimes and node-target bundles ignore the mapping
8
+ * and load the real implementation.
9
+ *
10
+ * `betaMemoryTool` is runtime-agnostic and is re-exported for real here; only
11
+ * the filesystem-backed handlers throw.
12
+ */
13
+ export { betaMemoryTool } from '../../helpers/beta/memory.js';
14
+ import { PukuError } from '../../core/error.js';
15
+ function nodeOnly(name) {
16
+ throw new PukuError(`${name} requires Node.js or a Node-compatible runtime`);
17
+ }
18
+ export class BetaLocalFilesystemMemoryTool {
19
+ constructor(_basePath = './memory') {
20
+ nodeOnly('BetaLocalFilesystemMemoryTool');
21
+ }
22
+ static init(_basePath = './memory') {
23
+ return nodeOnly('BetaLocalFilesystemMemoryTool.init');
24
+ }
25
+ view(_command) {
26
+ return nodeOnly('BetaLocalFilesystemMemoryTool');
27
+ }
28
+ create(_command) {
29
+ return nodeOnly('BetaLocalFilesystemMemoryTool');
30
+ }
31
+ str_replace(_command) {
32
+ return nodeOnly('BetaLocalFilesystemMemoryTool');
33
+ }
34
+ insert(_command) {
35
+ return nodeOnly('BetaLocalFilesystemMemoryTool');
36
+ }
37
+ delete(_command) {
38
+ return nodeOnly('BetaLocalFilesystemMemoryTool');
39
+ }
40
+ rename(_command) {
41
+ return nodeOnly('BetaLocalFilesystemMemoryTool');
42
+ }
43
+ }
44
+ //# sourceMappingURL=node.browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.browser.js","sourceRoot":"","sources":["../../../../src/vendor/tools/memory/node.browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAW7C,SAAS,QAAQ,CAAC,IAAY;IAC5B,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,gDAAgD,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,OAAO,6BAA6B;IACxC,YAAY,YAAoB,UAAU;QACxC,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,YAAoB,UAAU;QACxC,OAAO,QAAQ,CAAC,oCAAoC,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,CAAC,QAA2C;QAC9C,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,QAA6C;QAClD,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,WAAW,CAAC,QAAiD;QAC3D,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,QAA6C;QAClD,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,QAA6C;QAClD,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,QAA6C;QAClD,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ export { betaMemoryTool } from '../../helpers/beta/memory';
2
+ export type { MemoryToolHandlers } from '../../helpers/beta/memory';
3
+ import type { MemoryToolHandlers } from '../../helpers/beta/memory';
4
+ import { BetaMemoryTool20250818CreateCommand, BetaMemoryTool20250818DeleteCommand, BetaMemoryTool20250818InsertCommand, BetaMemoryTool20250818RenameCommand, BetaMemoryTool20250818StrReplaceCommand, BetaMemoryTool20250818ViewCommand } from '../../resources/beta';
5
+ export declare class BetaLocalFilesystemMemoryTool implements MemoryToolHandlers {
6
+ private basePath;
7
+ private memoryRoot;
8
+ constructor(basePath?: string);
9
+ static init(basePath?: string): Promise<BetaLocalFilesystemMemoryTool>;
10
+ private validatePath;
11
+ view(command: BetaMemoryTool20250818ViewCommand): Promise<string>;
12
+ create(command: BetaMemoryTool20250818CreateCommand): Promise<string>;
13
+ str_replace(command: BetaMemoryTool20250818StrReplaceCommand): Promise<string>;
14
+ insert(command: BetaMemoryTool20250818InsertCommand): Promise<string>;
15
+ delete(command: BetaMemoryTool20250818DeleteCommand): Promise<string>;
16
+ rename(command: BetaMemoryTool20250818RenameCommand): Promise<string>;
17
+ }