mu-harness 0.16.3

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 (515) hide show
  1. package/esm/core/src/agent.d.ts +39 -0
  2. package/esm/core/src/agent.js +96 -0
  3. package/esm/core/src/index.d.ts +4 -0
  4. package/esm/core/src/index.js +2 -0
  5. package/esm/core/src/types.d.ts +59 -0
  6. package/esm/core/src/types.js +3 -0
  7. package/esm/harness/npm/src/_dnt.polyfills.d.ts +11 -0
  8. package/esm/harness/npm/src/_dnt.polyfills.js +15 -0
  9. package/esm/harness/npm/src/agents/index.d.ts +4 -0
  10. package/esm/harness/npm/src/agents/index.js +3 -0
  11. package/esm/harness/npm/src/agents/loader.d.ts +2 -0
  12. package/esm/harness/npm/src/agents/loader.js +24 -0
  13. package/esm/harness/npm/src/agents/parser.d.ts +2 -0
  14. package/esm/harness/npm/src/agents/parser.js +20 -0
  15. package/esm/harness/npm/src/agents/registry.d.ts +6 -0
  16. package/esm/harness/npm/src/agents/registry.js +31 -0
  17. package/esm/harness/npm/src/agents/types.d.ts +8 -0
  18. package/esm/harness/npm/src/agents/types.js +1 -0
  19. package/esm/harness/npm/src/channels/channel.d.ts +7 -0
  20. package/esm/harness/npm/src/channels/channel.js +25 -0
  21. package/esm/harness/npm/src/channels/index.d.ts +3 -0
  22. package/esm/harness/npm/src/channels/index.js +2 -0
  23. package/esm/harness/npm/src/channels/manager.d.ts +6 -0
  24. package/esm/harness/npm/src/channels/manager.js +28 -0
  25. package/esm/harness/npm/src/channels/types.d.ts +30 -0
  26. package/esm/harness/npm/src/channels/types.js +1 -0
  27. package/esm/harness/npm/src/commands/defaults.d.ts +9 -0
  28. package/esm/harness/npm/src/commands/defaults.js +53 -0
  29. package/esm/harness/npm/src/commands/index.d.ts +3 -0
  30. package/esm/harness/npm/src/commands/index.js +2 -0
  31. package/esm/harness/npm/src/commands/registry.d.ts +2 -0
  32. package/esm/harness/npm/src/commands/registry.js +59 -0
  33. package/esm/harness/npm/src/commands/types.d.ts +23 -0
  34. package/esm/harness/npm/src/commands/types.js +1 -0
  35. package/esm/harness/npm/src/common/frontmatter.d.ts +6 -0
  36. package/esm/harness/npm/src/common/frontmatter.js +18 -0
  37. package/esm/harness/npm/src/common/index.d.ts +2 -0
  38. package/esm/harness/npm/src/common/index.js +2 -0
  39. package/esm/harness/npm/src/common/utils.d.ts +5 -0
  40. package/esm/harness/npm/src/common/utils.js +13 -0
  41. package/esm/harness/npm/src/config/index.d.ts +2 -0
  42. package/esm/harness/npm/src/config/index.js +1 -0
  43. package/esm/harness/npm/src/config/resolve.d.ts +2 -0
  44. package/esm/harness/npm/src/config/resolve.js +10 -0
  45. package/esm/harness/npm/src/config/types.d.ts +15 -0
  46. package/esm/harness/npm/src/config/types.js +1 -0
  47. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_chars.d.ts +32 -0
  48. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_chars.js +48 -0
  49. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_dumper_state.d.ts +105 -0
  50. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_dumper_state.js +638 -0
  51. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_loader_state.d.ts +63 -0
  52. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_loader_state.js +1371 -0
  53. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_schema.d.ts +43 -0
  54. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_schema.js +117 -0
  55. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/binary.d.ts +2 -0
  56. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/binary.js +103 -0
  57. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/bool.d.ts +2 -0
  58. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/bool.js +32 -0
  59. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/float.d.ts +2 -0
  60. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/float.js +96 -0
  61. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/int.d.ts +2 -0
  62. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/int.js +159 -0
  63. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/map.d.ts +2 -0
  64. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/map.js +14 -0
  65. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/merge.d.ts +2 -0
  66. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/merge.js +10 -0
  67. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/nil.d.ts +2 -0
  68. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/nil.js +22 -0
  69. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/omap.d.ts +2 -0
  70. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/omap.js +29 -0
  71. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.d.ts +2 -0
  72. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.js +19 -0
  73. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.d.ts +2 -0
  74. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.js +30 -0
  75. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/seq.d.ts +2 -0
  76. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/seq.js +10 -0
  77. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/set.d.ts +2 -0
  78. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/set.js +14 -0
  79. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/str.d.ts +2 -0
  80. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/str.js +9 -0
  81. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.d.ts +2 -0
  82. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.js +81 -0
  83. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.d.ts +2 -0
  84. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.js +20 -0
  85. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type.d.ts +31 -0
  86. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type.js +6 -0
  87. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_utils.d.ts +3 -0
  88. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_utils.js +13 -0
  89. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/mod.d.ts +49 -0
  90. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/mod.js +52 -0
  91. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/parse.d.ts +75 -0
  92. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/parse.js +91 -0
  93. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/stringify.d.ts +99 -0
  94. package/esm/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/stringify.js +33 -0
  95. package/esm/harness/npm/src/harness/create.d.ts +2 -0
  96. package/esm/harness/npm/src/harness/create.js +139 -0
  97. package/esm/harness/npm/src/harness/index.d.ts +3 -0
  98. package/esm/harness/npm/src/harness/index.js +2 -0
  99. package/esm/harness/npm/src/harness/models.d.ts +16 -0
  100. package/esm/harness/npm/src/harness/models.js +30 -0
  101. package/esm/harness/npm/src/harness/types.d.ts +35 -0
  102. package/esm/harness/npm/src/harness/types.js +1 -0
  103. package/esm/harness/npm/src/hooks/index.d.ts +3 -0
  104. package/esm/harness/npm/src/hooks/index.js +2 -0
  105. package/esm/harness/npm/src/hooks/merge-hooks.d.ts +2 -0
  106. package/esm/harness/npm/src/hooks/merge-hooks.js +42 -0
  107. package/esm/harness/npm/src/hooks/types.d.ts +20 -0
  108. package/esm/harness/npm/src/hooks/types.js +1 -0
  109. package/esm/harness/npm/src/hooks/with-hooks.d.ts +3 -0
  110. package/esm/harness/npm/src/hooks/with-hooks.js +12 -0
  111. package/esm/harness/npm/src/index.d.ts +15 -0
  112. package/esm/harness/npm/src/index.js +15 -0
  113. package/esm/harness/npm/src/permissions/allow-list.d.ts +4 -0
  114. package/esm/harness/npm/src/permissions/allow-list.js +8 -0
  115. package/esm/harness/npm/src/permissions/approval.d.ts +17 -0
  116. package/esm/harness/npm/src/permissions/approval.js +13 -0
  117. package/esm/harness/npm/src/permissions/glob.d.ts +1 -0
  118. package/esm/harness/npm/src/permissions/glob.js +2 -0
  119. package/esm/harness/npm/src/permissions/index.d.ts +3 -0
  120. package/esm/harness/npm/src/permissions/index.js +3 -0
  121. package/esm/harness/npm/src/plugin/define.d.ts +2 -0
  122. package/esm/harness/npm/src/plugin/define.js +1 -0
  123. package/esm/harness/npm/src/plugin/import-ts.d.ts +1 -0
  124. package/esm/harness/npm/src/plugin/import-ts.js +85 -0
  125. package/esm/harness/npm/src/plugin/index.d.ts +5 -0
  126. package/esm/harness/npm/src/plugin/index.js +4 -0
  127. package/esm/harness/npm/src/plugin/resolve.d.ts +13 -0
  128. package/esm/harness/npm/src/plugin/resolve.js +17 -0
  129. package/esm/harness/npm/src/plugin/store.d.ts +8 -0
  130. package/esm/harness/npm/src/plugin/store.js +26 -0
  131. package/esm/harness/npm/src/plugin/types.d.ts +11 -0
  132. package/esm/harness/npm/src/plugin/types.js +1 -0
  133. package/esm/harness/npm/src/scheduler/command.d.ts +3 -0
  134. package/esm/harness/npm/src/scheduler/command.js +19 -0
  135. package/esm/harness/npm/src/scheduler/engine/index.d.ts +3 -0
  136. package/esm/harness/npm/src/scheduler/engine/index.js +2 -0
  137. package/esm/harness/npm/src/scheduler/engine/scheduler.d.ts +12 -0
  138. package/esm/harness/npm/src/scheduler/engine/scheduler.js +65 -0
  139. package/esm/harness/npm/src/scheduler/engine/store.d.ts +4 -0
  140. package/esm/harness/npm/src/scheduler/engine/store.js +55 -0
  141. package/esm/harness/npm/src/scheduler/engine/types.d.ts +37 -0
  142. package/esm/harness/npm/src/scheduler/engine/types.js +1 -0
  143. package/esm/harness/npm/src/scheduler/index.d.ts +4 -0
  144. package/esm/harness/npm/src/scheduler/index.js +3 -0
  145. package/esm/harness/npm/src/scheduler/tool.d.ts +8 -0
  146. package/esm/harness/npm/src/scheduler/tool.js +49 -0
  147. package/esm/harness/npm/src/session/agent-session.d.ts +15 -0
  148. package/esm/harness/npm/src/session/agent-session.js +82 -0
  149. package/esm/harness/npm/src/session/catalog.d.ts +24 -0
  150. package/esm/harness/npm/src/session/catalog.js +55 -0
  151. package/esm/harness/npm/src/session/index.d.ts +7 -0
  152. package/esm/harness/npm/src/session/index.js +6 -0
  153. package/esm/harness/npm/src/session/manager.d.ts +39 -0
  154. package/esm/harness/npm/src/session/manager.js +62 -0
  155. package/esm/harness/npm/src/session/persist.d.ts +3 -0
  156. package/esm/harness/npm/src/session/persist.js +21 -0
  157. package/esm/harness/npm/src/session/store.d.ts +13 -0
  158. package/esm/harness/npm/src/session/store.js +24 -0
  159. package/esm/harness/npm/src/session/title.d.ts +9 -0
  160. package/esm/harness/npm/src/session/title.js +24 -0
  161. package/esm/harness/npm/src/session/types.d.ts +17 -0
  162. package/esm/harness/npm/src/session/types.js +1 -0
  163. package/esm/harness/npm/src/skills/index.d.ts +7 -0
  164. package/esm/harness/npm/src/skills/index.js +6 -0
  165. package/esm/harness/npm/src/skills/loader.d.ts +2 -0
  166. package/esm/harness/npm/src/skills/loader.js +26 -0
  167. package/esm/harness/npm/src/skills/parser.d.ts +2 -0
  168. package/esm/harness/npm/src/skills/parser.js +10 -0
  169. package/esm/harness/npm/src/skills/registry.d.ts +8 -0
  170. package/esm/harness/npm/src/skills/registry.js +16 -0
  171. package/esm/harness/npm/src/skills/run.d.ts +14 -0
  172. package/esm/harness/npm/src/skills/run.js +45 -0
  173. package/esm/harness/npm/src/skills/tool.d.ts +3 -0
  174. package/esm/harness/npm/src/skills/tool.js +31 -0
  175. package/esm/harness/npm/src/skills/types.d.ts +6 -0
  176. package/esm/harness/npm/src/skills/types.js +1 -0
  177. package/esm/harness/npm/src/skills/writer.d.ts +7 -0
  178. package/esm/harness/npm/src/skills/writer.js +43 -0
  179. package/esm/harness/npm/src/subAgents/index.d.ts +4 -0
  180. package/esm/harness/npm/src/subAgents/index.js +3 -0
  181. package/esm/harness/npm/src/subAgents/registry.d.ts +2 -0
  182. package/esm/harness/npm/src/subAgents/registry.js +18 -0
  183. package/esm/harness/npm/src/subAgents/runner.d.ts +15 -0
  184. package/esm/harness/npm/src/subAgents/runner.js +33 -0
  185. package/esm/harness/npm/src/subAgents/tool.d.ts +6 -0
  186. package/esm/harness/npm/src/subAgents/tool.js +30 -0
  187. package/esm/harness/npm/src/subAgents/types.d.ts +18 -0
  188. package/esm/harness/npm/src/subAgents/types.js +1 -0
  189. package/esm/harness/npm/src/tui/channel.d.ts +3 -0
  190. package/esm/harness/npm/src/tui/channel.js +53 -0
  191. package/esm/harness/npm/src/tui/components/composer.d.ts +3 -0
  192. package/esm/harness/npm/src/tui/components/composer.js +13 -0
  193. package/esm/harness/npm/src/tui/components/header.d.ts +3 -0
  194. package/esm/harness/npm/src/tui/components/header.js +1 -0
  195. package/esm/harness/npm/src/tui/components/index.d.ts +5 -0
  196. package/esm/harness/npm/src/tui/components/index.js +5 -0
  197. package/esm/harness/npm/src/tui/components/message.d.ts +6 -0
  198. package/esm/harness/npm/src/tui/components/message.js +26 -0
  199. package/esm/harness/npm/src/tui/components/status.d.ts +3 -0
  200. package/esm/harness/npm/src/tui/components/status.js +8 -0
  201. package/esm/harness/npm/src/tui/components/transcript.d.ts +4 -0
  202. package/esm/harness/npm/src/tui/components/transcript.js +4 -0
  203. package/esm/harness/npm/src/tui/index.d.ts +7 -0
  204. package/esm/harness/npm/src/tui/index.js +10 -0
  205. package/esm/harness/npm/src/tui/kit.d.ts +15 -0
  206. package/esm/harness/npm/src/tui/kit.js +7 -0
  207. package/esm/harness/npm/src/tui/types.d.ts +38 -0
  208. package/esm/harness/npm/src/tui/types.js +1 -0
  209. package/esm/package.json +3 -0
  210. package/esm/tui/src/capabilities.d.ts +72 -0
  211. package/esm/tui/src/capabilities.js +90 -0
  212. package/esm/tui/src/components/command-palette.d.ts +24 -0
  213. package/esm/tui/src/components/command-palette.js +60 -0
  214. package/esm/tui/src/components/editor.d.ts +26 -0
  215. package/esm/tui/src/components/editor.js +111 -0
  216. package/esm/tui/src/components/scroll-view.d.ts +14 -0
  217. package/esm/tui/src/components/scroll-view.js +45 -0
  218. package/esm/tui/src/components/select-list.d.ts +24 -0
  219. package/esm/tui/src/components/select-list.js +69 -0
  220. package/esm/tui/src/events.d.ts +56 -0
  221. package/esm/tui/src/events.js +6 -0
  222. package/esm/tui/src/index.d.ts +17 -0
  223. package/esm/tui/src/index.js +13 -0
  224. package/esm/tui/src/inputRouter.d.ts +28 -0
  225. package/esm/tui/src/inputRouter.js +122 -0
  226. package/esm/tui/src/keybinds.d.ts +13 -0
  227. package/esm/tui/src/keybinds.js +15 -0
  228. package/esm/tui/src/keyboard.d.ts +2 -0
  229. package/esm/tui/src/keyboard.js +305 -0
  230. package/esm/tui/src/layout/ansi.d.ts +3 -0
  231. package/esm/tui/src/layout/ansi.js +323 -0
  232. package/esm/tui/src/layout/cell.d.ts +24 -0
  233. package/esm/tui/src/layout/cell.js +46 -0
  234. package/esm/tui/src/layout/cellbuffer.d.ts +29 -0
  235. package/esm/tui/src/layout/cellbuffer.js +306 -0
  236. package/esm/tui/src/layout/color.d.ts +22 -0
  237. package/esm/tui/src/layout/color.js +163 -0
  238. package/esm/tui/src/layout/insets.d.ts +8 -0
  239. package/esm/tui/src/layout/insets.js +55 -0
  240. package/esm/tui/src/layout/types.d.ts +33 -0
  241. package/esm/tui/src/layout/types.js +8 -0
  242. package/esm/tui/src/parser.d.ts +18 -0
  243. package/esm/tui/src/parser.js +136 -0
  244. package/esm/tui/src/renderer.d.ts +32 -0
  245. package/esm/tui/src/renderer.js +168 -0
  246. package/esm/tui/src/surface.d.ts +27 -0
  247. package/esm/tui/src/surface.js +110 -0
  248. package/esm/tui/src/terminal.d.ts +48 -0
  249. package/esm/tui/src/terminal.js +255 -0
  250. package/esm/tui/src/tui.d.ts +60 -0
  251. package/esm/tui/src/tui.js +194 -0
  252. package/esm/tui/src/types/terminal.d.ts +20 -0
  253. package/esm/tui/src/types/terminal.js +1 -0
  254. package/esm/tui/src/utils.d.ts +6 -0
  255. package/esm/tui/src/utils.js +292 -0
  256. package/esm/tui/src/views.d.ts +35 -0
  257. package/esm/tui/src/views.js +112 -0
  258. package/package.json +23 -0
  259. package/script/core/src/agent.d.ts +39 -0
  260. package/script/core/src/agent.js +101 -0
  261. package/script/core/src/index.d.ts +4 -0
  262. package/script/core/src/index.js +10 -0
  263. package/script/core/src/types.d.ts +59 -0
  264. package/script/core/src/types.js +9 -0
  265. package/script/harness/npm/src/_dnt.polyfills.d.ts +11 -0
  266. package/script/harness/npm/src/_dnt.polyfills.js +16 -0
  267. package/script/harness/npm/src/agents/index.d.ts +4 -0
  268. package/script/harness/npm/src/agents/index.js +9 -0
  269. package/script/harness/npm/src/agents/loader.d.ts +2 -0
  270. package/script/harness/npm/src/agents/loader.js +28 -0
  271. package/script/harness/npm/src/agents/parser.d.ts +2 -0
  272. package/script/harness/npm/src/agents/parser.js +24 -0
  273. package/script/harness/npm/src/agents/registry.d.ts +6 -0
  274. package/script/harness/npm/src/agents/registry.js +35 -0
  275. package/script/harness/npm/src/agents/types.d.ts +8 -0
  276. package/script/harness/npm/src/agents/types.js +2 -0
  277. package/script/harness/npm/src/channels/channel.d.ts +7 -0
  278. package/script/harness/npm/src/channels/channel.js +29 -0
  279. package/script/harness/npm/src/channels/index.d.ts +3 -0
  280. package/script/harness/npm/src/channels/index.js +7 -0
  281. package/script/harness/npm/src/channels/manager.d.ts +6 -0
  282. package/script/harness/npm/src/channels/manager.js +32 -0
  283. package/script/harness/npm/src/channels/types.d.ts +30 -0
  284. package/script/harness/npm/src/channels/types.js +2 -0
  285. package/script/harness/npm/src/commands/defaults.d.ts +9 -0
  286. package/script/harness/npm/src/commands/defaults.js +61 -0
  287. package/script/harness/npm/src/commands/index.d.ts +3 -0
  288. package/script/harness/npm/src/commands/index.js +11 -0
  289. package/script/harness/npm/src/commands/registry.d.ts +2 -0
  290. package/script/harness/npm/src/commands/registry.js +63 -0
  291. package/script/harness/npm/src/commands/types.d.ts +23 -0
  292. package/script/harness/npm/src/commands/types.js +2 -0
  293. package/script/harness/npm/src/common/frontmatter.d.ts +6 -0
  294. package/script/harness/npm/src/common/frontmatter.js +23 -0
  295. package/script/harness/npm/src/common/index.d.ts +2 -0
  296. package/script/harness/npm/src/common/index.js +8 -0
  297. package/script/harness/npm/src/common/utils.d.ts +5 -0
  298. package/script/harness/npm/src/common/utils.js +17 -0
  299. package/script/harness/npm/src/config/index.d.ts +2 -0
  300. package/script/harness/npm/src/config/index.js +5 -0
  301. package/script/harness/npm/src/config/resolve.d.ts +2 -0
  302. package/script/harness/npm/src/config/resolve.js +14 -0
  303. package/script/harness/npm/src/config/types.d.ts +15 -0
  304. package/script/harness/npm/src/config/types.js +2 -0
  305. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_chars.d.ts +32 -0
  306. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_chars.js +55 -0
  307. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_dumper_state.d.ts +105 -0
  308. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_dumper_state.js +642 -0
  309. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_loader_state.d.ts +63 -0
  310. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_loader_state.js +1375 -0
  311. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_schema.d.ts +43 -0
  312. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_schema.js +121 -0
  313. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/binary.d.ts +2 -0
  314. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/binary.js +106 -0
  315. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/bool.d.ts +2 -0
  316. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/bool.js +35 -0
  317. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/float.d.ts +2 -0
  318. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/float.js +99 -0
  319. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/int.d.ts +2 -0
  320. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/int.js +162 -0
  321. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/map.d.ts +2 -0
  322. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/map.js +17 -0
  323. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/merge.d.ts +2 -0
  324. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/merge.js +13 -0
  325. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/nil.d.ts +2 -0
  326. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/nil.js +25 -0
  327. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/omap.d.ts +2 -0
  328. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/omap.js +32 -0
  329. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.d.ts +2 -0
  330. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.js +22 -0
  331. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.d.ts +2 -0
  332. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.js +33 -0
  333. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/seq.d.ts +2 -0
  334. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/seq.js +13 -0
  335. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/set.d.ts +2 -0
  336. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/set.js +17 -0
  337. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/str.d.ts +2 -0
  338. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/str.js +12 -0
  339. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.d.ts +2 -0
  340. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.js +84 -0
  341. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.d.ts +2 -0
  342. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.js +23 -0
  343. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type.d.ts +31 -0
  344. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_type.js +7 -0
  345. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_utils.d.ts +3 -0
  346. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/_utils.js +18 -0
  347. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/mod.d.ts +49 -0
  348. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/mod.js +68 -0
  349. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/parse.d.ts +75 -0
  350. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/parse.js +95 -0
  351. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/stringify.d.ts +99 -0
  352. package/script/harness/npm/src/deps/jsr.io/@std/yaml/1.1.0/stringify.js +36 -0
  353. package/script/harness/npm/src/harness/create.d.ts +2 -0
  354. package/script/harness/npm/src/harness/create.js +146 -0
  355. package/script/harness/npm/src/harness/index.d.ts +3 -0
  356. package/script/harness/npm/src/harness/index.js +7 -0
  357. package/script/harness/npm/src/harness/models.d.ts +16 -0
  358. package/script/harness/npm/src/harness/models.js +34 -0
  359. package/script/harness/npm/src/harness/types.d.ts +35 -0
  360. package/script/harness/npm/src/harness/types.js +2 -0
  361. package/script/harness/npm/src/hooks/index.d.ts +3 -0
  362. package/script/harness/npm/src/hooks/index.js +7 -0
  363. package/script/harness/npm/src/hooks/merge-hooks.d.ts +2 -0
  364. package/script/harness/npm/src/hooks/merge-hooks.js +46 -0
  365. package/script/harness/npm/src/hooks/types.d.ts +20 -0
  366. package/script/harness/npm/src/hooks/types.js +2 -0
  367. package/script/harness/npm/src/hooks/with-hooks.d.ts +3 -0
  368. package/script/harness/npm/src/hooks/with-hooks.js +16 -0
  369. package/script/harness/npm/src/index.d.ts +15 -0
  370. package/script/harness/npm/src/index.js +31 -0
  371. package/script/harness/npm/src/permissions/allow-list.d.ts +4 -0
  372. package/script/harness/npm/src/permissions/allow-list.js +13 -0
  373. package/script/harness/npm/src/permissions/approval.d.ts +17 -0
  374. package/script/harness/npm/src/permissions/approval.js +17 -0
  375. package/script/harness/npm/src/permissions/glob.d.ts +1 -0
  376. package/script/harness/npm/src/permissions/glob.js +6 -0
  377. package/script/harness/npm/src/permissions/index.d.ts +3 -0
  378. package/script/harness/npm/src/permissions/index.js +10 -0
  379. package/script/harness/npm/src/plugin/define.d.ts +2 -0
  380. package/script/harness/npm/src/plugin/define.js +5 -0
  381. package/script/harness/npm/src/plugin/import-ts.d.ts +1 -0
  382. package/script/harness/npm/src/plugin/import-ts.js +122 -0
  383. package/script/harness/npm/src/plugin/index.d.ts +5 -0
  384. package/script/harness/npm/src/plugin/index.js +11 -0
  385. package/script/harness/npm/src/plugin/resolve.d.ts +13 -0
  386. package/script/harness/npm/src/plugin/resolve.js +21 -0
  387. package/script/harness/npm/src/plugin/store.d.ts +8 -0
  388. package/script/harness/npm/src/plugin/store.js +30 -0
  389. package/script/harness/npm/src/plugin/types.d.ts +11 -0
  390. package/script/harness/npm/src/plugin/types.js +2 -0
  391. package/script/harness/npm/src/scheduler/command.d.ts +3 -0
  392. package/script/harness/npm/src/scheduler/command.js +23 -0
  393. package/script/harness/npm/src/scheduler/engine/index.d.ts +3 -0
  394. package/script/harness/npm/src/scheduler/engine/index.js +7 -0
  395. package/script/harness/npm/src/scheduler/engine/scheduler.d.ts +12 -0
  396. package/script/harness/npm/src/scheduler/engine/scheduler.js +69 -0
  397. package/script/harness/npm/src/scheduler/engine/store.d.ts +4 -0
  398. package/script/harness/npm/src/scheduler/engine/store.js +59 -0
  399. package/script/harness/npm/src/scheduler/engine/types.d.ts +37 -0
  400. package/script/harness/npm/src/scheduler/engine/types.js +2 -0
  401. package/script/harness/npm/src/scheduler/index.d.ts +4 -0
  402. package/script/harness/npm/src/scheduler/index.js +10 -0
  403. package/script/harness/npm/src/scheduler/tool.d.ts +8 -0
  404. package/script/harness/npm/src/scheduler/tool.js +53 -0
  405. package/script/harness/npm/src/session/agent-session.d.ts +15 -0
  406. package/script/harness/npm/src/session/agent-session.js +86 -0
  407. package/script/harness/npm/src/session/catalog.d.ts +24 -0
  408. package/script/harness/npm/src/session/catalog.js +59 -0
  409. package/script/harness/npm/src/session/index.d.ts +7 -0
  410. package/script/harness/npm/src/session/index.js +17 -0
  411. package/script/harness/npm/src/session/manager.d.ts +39 -0
  412. package/script/harness/npm/src/session/manager.js +66 -0
  413. package/script/harness/npm/src/session/persist.d.ts +3 -0
  414. package/script/harness/npm/src/session/persist.js +25 -0
  415. package/script/harness/npm/src/session/store.d.ts +13 -0
  416. package/script/harness/npm/src/session/store.js +28 -0
  417. package/script/harness/npm/src/session/title.d.ts +9 -0
  418. package/script/harness/npm/src/session/title.js +30 -0
  419. package/script/harness/npm/src/session/types.d.ts +17 -0
  420. package/script/harness/npm/src/session/types.js +2 -0
  421. package/script/harness/npm/src/skills/index.d.ts +7 -0
  422. package/script/harness/npm/src/skills/index.js +16 -0
  423. package/script/harness/npm/src/skills/loader.d.ts +2 -0
  424. package/script/harness/npm/src/skills/loader.js +30 -0
  425. package/script/harness/npm/src/skills/parser.d.ts +2 -0
  426. package/script/harness/npm/src/skills/parser.js +14 -0
  427. package/script/harness/npm/src/skills/registry.d.ts +8 -0
  428. package/script/harness/npm/src/skills/registry.js +20 -0
  429. package/script/harness/npm/src/skills/run.d.ts +14 -0
  430. package/script/harness/npm/src/skills/run.js +50 -0
  431. package/script/harness/npm/src/skills/tool.d.ts +3 -0
  432. package/script/harness/npm/src/skills/tool.js +35 -0
  433. package/script/harness/npm/src/skills/types.d.ts +6 -0
  434. package/script/harness/npm/src/skills/types.js +2 -0
  435. package/script/harness/npm/src/skills/writer.d.ts +7 -0
  436. package/script/harness/npm/src/skills/writer.js +47 -0
  437. package/script/harness/npm/src/subAgents/index.d.ts +4 -0
  438. package/script/harness/npm/src/subAgents/index.js +9 -0
  439. package/script/harness/npm/src/subAgents/registry.d.ts +2 -0
  440. package/script/harness/npm/src/subAgents/registry.js +22 -0
  441. package/script/harness/npm/src/subAgents/runner.d.ts +15 -0
  442. package/script/harness/npm/src/subAgents/runner.js +37 -0
  443. package/script/harness/npm/src/subAgents/tool.d.ts +6 -0
  444. package/script/harness/npm/src/subAgents/tool.js +34 -0
  445. package/script/harness/npm/src/subAgents/types.d.ts +18 -0
  446. package/script/harness/npm/src/subAgents/types.js +2 -0
  447. package/script/harness/npm/src/tui/channel.d.ts +3 -0
  448. package/script/harness/npm/src/tui/channel.js +57 -0
  449. package/script/harness/npm/src/tui/components/composer.d.ts +3 -0
  450. package/script/harness/npm/src/tui/components/composer.js +17 -0
  451. package/script/harness/npm/src/tui/components/header.d.ts +3 -0
  452. package/script/harness/npm/src/tui/components/header.js +5 -0
  453. package/script/harness/npm/src/tui/components/index.d.ts +5 -0
  454. package/script/harness/npm/src/tui/components/index.js +16 -0
  455. package/script/harness/npm/src/tui/components/message.d.ts +6 -0
  456. package/script/harness/npm/src/tui/components/message.js +32 -0
  457. package/script/harness/npm/src/tui/components/status.d.ts +3 -0
  458. package/script/harness/npm/src/tui/components/status.js +12 -0
  459. package/script/harness/npm/src/tui/components/transcript.d.ts +4 -0
  460. package/script/harness/npm/src/tui/components/transcript.js +9 -0
  461. package/script/harness/npm/src/tui/index.d.ts +7 -0
  462. package/script/harness/npm/src/tui/index.js +29 -0
  463. package/script/harness/npm/src/tui/kit.d.ts +15 -0
  464. package/script/harness/npm/src/tui/kit.js +10 -0
  465. package/script/harness/npm/src/tui/types.d.ts +38 -0
  466. package/script/harness/npm/src/tui/types.js +2 -0
  467. package/script/package.json +3 -0
  468. package/script/tui/src/capabilities.d.ts +72 -0
  469. package/script/tui/src/capabilities.js +98 -0
  470. package/script/tui/src/components/command-palette.d.ts +24 -0
  471. package/script/tui/src/components/command-palette.js +65 -0
  472. package/script/tui/src/components/editor.d.ts +26 -0
  473. package/script/tui/src/components/editor.js +116 -0
  474. package/script/tui/src/components/scroll-view.d.ts +14 -0
  475. package/script/tui/src/components/scroll-view.js +50 -0
  476. package/script/tui/src/components/select-list.d.ts +24 -0
  477. package/script/tui/src/components/select-list.js +74 -0
  478. package/script/tui/src/events.d.ts +56 -0
  479. package/script/tui/src/events.js +9 -0
  480. package/script/tui/src/index.d.ts +17 -0
  481. package/script/tui/src/index.js +46 -0
  482. package/script/tui/src/inputRouter.d.ts +28 -0
  483. package/script/tui/src/inputRouter.js +126 -0
  484. package/script/tui/src/keybinds.d.ts +13 -0
  485. package/script/tui/src/keybinds.js +18 -0
  486. package/script/tui/src/keyboard.d.ts +2 -0
  487. package/script/tui/src/keyboard.js +308 -0
  488. package/script/tui/src/layout/ansi.d.ts +3 -0
  489. package/script/tui/src/layout/ansi.js +327 -0
  490. package/script/tui/src/layout/cell.d.ts +24 -0
  491. package/script/tui/src/layout/cell.js +54 -0
  492. package/script/tui/src/layout/cellbuffer.d.ts +29 -0
  493. package/script/tui/src/layout/cellbuffer.js +321 -0
  494. package/script/tui/src/layout/color.d.ts +22 -0
  495. package/script/tui/src/layout/color.js +174 -0
  496. package/script/tui/src/layout/insets.d.ts +8 -0
  497. package/script/tui/src/layout/insets.js +64 -0
  498. package/script/tui/src/layout/types.d.ts +33 -0
  499. package/script/tui/src/layout/types.js +11 -0
  500. package/script/tui/src/parser.d.ts +18 -0
  501. package/script/tui/src/parser.js +140 -0
  502. package/script/tui/src/renderer.d.ts +32 -0
  503. package/script/tui/src/renderer.js +175 -0
  504. package/script/tui/src/surface.d.ts +27 -0
  505. package/script/tui/src/surface.js +115 -0
  506. package/script/tui/src/terminal.d.ts +48 -0
  507. package/script/tui/src/terminal.js +262 -0
  508. package/script/tui/src/tui.d.ts +60 -0
  509. package/script/tui/src/tui.js +198 -0
  510. package/script/tui/src/types/terminal.d.ts +20 -0
  511. package/script/tui/src/types/terminal.js +2 -0
  512. package/script/tui/src/utils.d.ts +6 -0
  513. package/script/tui/src/utils.js +300 -0
  514. package/script/tui/src/views.d.ts +35 -0
  515. package/script/tui/src/views.js +123 -0
@@ -0,0 +1,43 @@
1
+ import type { KindType, Type } from "./_type.js";
2
+ /**
3
+ * Name of the schema to use.
4
+ *
5
+ * > [!NOTE]
6
+ * > It is recommended to use the schema that is most appropriate for your use
7
+ * > case. Doing so will avoid any unnecessary processing and benefit
8
+ * > performance.
9
+ *
10
+ * Options include:
11
+ * - `failsafe`: supports generic mappings, generic sequences and generic
12
+ * strings.
13
+ * - `json`: extends `failsafe` schema by also supporting nulls, booleans,
14
+ * integers and floats.
15
+ * - `core`: functionally the same as `json` schema.
16
+ * - `default`: extends `core` schema by also supporting binary, omap, pairs and
17
+ * set types.
18
+ * - `extended`: extends `default` schema by also supporting regular
19
+ * expressions and undefined values.
20
+ *
21
+ * See
22
+ * {@link https://yaml.org/spec/1.2.2/#chapter-10-recommended-schemas | YAML 1.2 spec}
23
+ * for more details on the `failsafe`, `json` and `core` schemas.
24
+ */
25
+ export type SchemaType = "failsafe" | "json" | "core" | "default" | "extended";
26
+ /**
27
+ * A type that can be implicitly resolved (i.e. without using a tag) when
28
+ * loading a YAML document.
29
+ */
30
+ export type ImplicitType = Type<"scalar">;
31
+ export type ExplicitType = Type<KindType>;
32
+ export type TypeMap = Record<KindType | "fallback", Map<string, ExplicitType>>;
33
+ export interface Schema {
34
+ implicitTypes: ImplicitType[];
35
+ explicitTypes: ExplicitType[];
36
+ typeMap: TypeMap;
37
+ }
38
+ /**
39
+ * Default YAML schema. It is not described in the YAML specification.
40
+ */
41
+ export declare const DEFAULT_SCHEMA: Schema;
42
+ export declare const SCHEMA_MAP: Map<SchemaType, Schema>;
43
+ export declare function getSchema(schema?: SchemaType, types?: ImplicitType[]): Schema;
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ // Ported from js-yaml v3.13.1:
3
+ // https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
4
+ // Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
5
+ // Copyright 2018-2026 the Deno authors. MIT license.
6
+ // This module is browser compatible.
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.SCHEMA_MAP = exports.DEFAULT_SCHEMA = void 0;
9
+ exports.getSchema = getSchema;
10
+ const binary_js_1 = require("./_type/binary.js");
11
+ const bool_js_1 = require("./_type/bool.js");
12
+ const float_js_1 = require("./_type/float.js");
13
+ const int_js_1 = require("./_type/int.js");
14
+ const map_js_1 = require("./_type/map.js");
15
+ const merge_js_1 = require("./_type/merge.js");
16
+ const nil_js_1 = require("./_type/nil.js");
17
+ const omap_js_1 = require("./_type/omap.js");
18
+ const pairs_js_1 = require("./_type/pairs.js");
19
+ const regexp_js_1 = require("./_type/regexp.js");
20
+ const seq_js_1 = require("./_type/seq.js");
21
+ const set_js_1 = require("./_type/set.js");
22
+ const str_js_1 = require("./_type/str.js");
23
+ const timestamp_js_1 = require("./_type/timestamp.js");
24
+ const undefined_js_1 = require("./_type/undefined.js");
25
+ function createTypeMap(implicitTypes, explicitTypes) {
26
+ const result = {
27
+ fallback: new Map(),
28
+ mapping: new Map(),
29
+ scalar: new Map(),
30
+ sequence: new Map(),
31
+ };
32
+ const fallbackMap = result.fallback;
33
+ for (const type of [...implicitTypes, ...explicitTypes]) {
34
+ const map = result[type.kind];
35
+ map.set(type.tag, type);
36
+ fallbackMap.set(type.tag, type);
37
+ }
38
+ return result;
39
+ }
40
+ function createSchema({ explicitTypes = [], implicitTypes = [], include }) {
41
+ if (include) {
42
+ implicitTypes.push(...include.implicitTypes);
43
+ explicitTypes.push(...include.explicitTypes);
44
+ }
45
+ const typeMap = createTypeMap(implicitTypes, explicitTypes);
46
+ return { implicitTypes, explicitTypes, typeMap };
47
+ }
48
+ /**
49
+ * Standard YAML's failsafe schema.
50
+ *
51
+ * @see {@link http://www.yaml.org/spec/1.2/spec.html#id2802346}
52
+ */
53
+ const FAILSAFE_SCHEMA = createSchema({
54
+ explicitTypes: [str_js_1.str, seq_js_1.seq, map_js_1.map],
55
+ });
56
+ /**
57
+ * Standard YAML's JSON schema.
58
+ *
59
+ * @see {@link http://www.yaml.org/spec/1.2/spec.html#id2803231}
60
+ */
61
+ const JSON_SCHEMA = createSchema({
62
+ implicitTypes: [nil_js_1.nil, bool_js_1.bool, int_js_1.int, float_js_1.float],
63
+ include: FAILSAFE_SCHEMA,
64
+ });
65
+ /**
66
+ * Standard YAML's core schema.
67
+ *
68
+ * @see {@link http://www.yaml.org/spec/1.2/spec.html#id2804923}
69
+ */
70
+ const CORE_SCHEMA = createSchema({
71
+ include: JSON_SCHEMA,
72
+ });
73
+ /**
74
+ * Default YAML schema. It is not described in the YAML specification.
75
+ */
76
+ exports.DEFAULT_SCHEMA = createSchema({
77
+ explicitTypes: [binary_js_1.binary, omap_js_1.omap, pairs_js_1.pairs, set_js_1.set],
78
+ implicitTypes: [timestamp_js_1.timestamp, merge_js_1.merge],
79
+ include: CORE_SCHEMA,
80
+ });
81
+ /***
82
+ * Extends JS-YAML default schema with additional JavaScript types
83
+ * It is not described in the YAML specification.
84
+ * Functions are no longer supported for security reasons.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * import { parse } from "@std/yaml";
89
+ *
90
+ * const data = parse(
91
+ * `
92
+ * regexp:
93
+ * simple: !!js/regexp foobar
94
+ * modifiers: !!js/regexp /foobar/mi
95
+ * undefined: !!js/undefined ~
96
+ * `,
97
+ * { schema: "extended" },
98
+ * );
99
+ * ```
100
+ */
101
+ const EXTENDED_SCHEMA = createSchema({
102
+ explicitTypes: [regexp_js_1.regexp, undefined_js_1.undefinedType],
103
+ include: exports.DEFAULT_SCHEMA,
104
+ });
105
+ exports.SCHEMA_MAP = new Map([
106
+ ["core", CORE_SCHEMA],
107
+ ["default", exports.DEFAULT_SCHEMA],
108
+ ["failsafe", FAILSAFE_SCHEMA],
109
+ ["json", JSON_SCHEMA],
110
+ ["extended", EXTENDED_SCHEMA],
111
+ ]);
112
+ function getSchema(schema = "default", types) {
113
+ const schemaObj = exports.SCHEMA_MAP.get(schema);
114
+ if (!types) {
115
+ return schemaObj;
116
+ }
117
+ return createSchema({
118
+ implicitTypes: [...types, ...schemaObj.implicitTypes],
119
+ explicitTypes: [...schemaObj.explicitTypes],
120
+ });
121
+ }
@@ -0,0 +1,2 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const binary: Type<"scalar", Uint8Array>;
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.binary = void 0;
4
+ // [ 64, 65, 66 ] -> [ padding, CR, LF ]
5
+ const BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
6
+ function resolveYamlBinary(data) {
7
+ if (data === null)
8
+ return false;
9
+ let code;
10
+ let bitlen = 0;
11
+ const max = data.length;
12
+ const map = BASE64_MAP;
13
+ // Convert one by one.
14
+ for (let idx = 0; idx < max; idx++) {
15
+ code = map.indexOf(data.charAt(idx));
16
+ // Skip CR/LF
17
+ if (code > 64)
18
+ continue;
19
+ // Fail on illegal characters
20
+ if (code < 0)
21
+ return false;
22
+ bitlen += 6;
23
+ }
24
+ // If there are any bits left, source was corrupted
25
+ return bitlen % 8 === 0;
26
+ }
27
+ function constructYamlBinary(data) {
28
+ // remove CR/LF & padding to simplify scan
29
+ const input = data.replace(/[\r\n=]/g, "");
30
+ const max = input.length;
31
+ const map = BASE64_MAP;
32
+ // Collect by 6*4 bits (3 bytes)
33
+ const result = [];
34
+ let bits = 0;
35
+ for (let idx = 0; idx < max; idx++) {
36
+ if (idx % 4 === 0 && idx) {
37
+ result.push((bits >> 16) & 0xff);
38
+ result.push((bits >> 8) & 0xff);
39
+ result.push(bits & 0xff);
40
+ }
41
+ bits = (bits << 6) | map.indexOf(input.charAt(idx));
42
+ }
43
+ // Dump tail
44
+ const tailbits = (max % 4) * 6;
45
+ if (tailbits === 0) {
46
+ result.push((bits >> 16) & 0xff);
47
+ result.push((bits >> 8) & 0xff);
48
+ result.push(bits & 0xff);
49
+ }
50
+ else if (tailbits === 18) {
51
+ result.push((bits >> 10) & 0xff);
52
+ result.push((bits >> 2) & 0xff);
53
+ }
54
+ else if (tailbits === 12) {
55
+ result.push((bits >> 4) & 0xff);
56
+ }
57
+ return new Uint8Array(result);
58
+ }
59
+ function representYamlBinary(object) {
60
+ const max = object.length;
61
+ const map = BASE64_MAP;
62
+ // Convert every three bytes to 4 ASCII characters.
63
+ let result = "";
64
+ let bits = 0;
65
+ for (let idx = 0; idx < max; idx++) {
66
+ if (idx % 3 === 0 && idx) {
67
+ result += map[(bits >> 18) & 0x3f];
68
+ result += map[(bits >> 12) & 0x3f];
69
+ result += map[(bits >> 6) & 0x3f];
70
+ result += map[bits & 0x3f];
71
+ }
72
+ bits = (bits << 8) + object[idx];
73
+ }
74
+ // Dump tail
75
+ const tail = max % 3;
76
+ if (tail === 0) {
77
+ result += map[(bits >> 18) & 0x3f];
78
+ result += map[(bits >> 12) & 0x3f];
79
+ result += map[(bits >> 6) & 0x3f];
80
+ result += map[bits & 0x3f];
81
+ }
82
+ else if (tail === 2) {
83
+ result += map[(bits >> 10) & 0x3f];
84
+ result += map[(bits >> 4) & 0x3f];
85
+ result += map[(bits << 2) & 0x3f];
86
+ result += map[64];
87
+ }
88
+ else if (tail === 1) {
89
+ result += map[(bits >> 2) & 0x3f];
90
+ result += map[(bits << 4) & 0x3f];
91
+ result += map[64];
92
+ result += map[64];
93
+ }
94
+ return result;
95
+ }
96
+ function isBinary(obj) {
97
+ return obj instanceof Uint8Array;
98
+ }
99
+ exports.binary = {
100
+ tag: "tag:yaml.org,2002:binary",
101
+ construct: constructYamlBinary,
102
+ kind: "scalar",
103
+ predicate: isBinary,
104
+ represent: representYamlBinary,
105
+ resolve: resolveYamlBinary,
106
+ };
@@ -0,0 +1,2 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const bool: Type<"scalar", boolean>;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ // Ported from js-yaml v3.13.1:
3
+ // https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
4
+ // Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
5
+ // Copyright 2018-2026 the Deno authors. MIT license.
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.bool = void 0;
8
+ const YAML_TRUE_BOOLEANS = ["true", "True", "TRUE"];
9
+ const YAML_FALSE_BOOLEANS = ["false", "False", "FALSE"];
10
+ const YAML_BOOLEANS = [...YAML_TRUE_BOOLEANS, ...YAML_FALSE_BOOLEANS];
11
+ exports.bool = {
12
+ tag: "tag:yaml.org,2002:bool",
13
+ kind: "scalar",
14
+ defaultStyle: "lowercase",
15
+ predicate: (value) => typeof value === "boolean" || value instanceof Boolean,
16
+ construct: (data) => YAML_TRUE_BOOLEANS.includes(data),
17
+ resolve: (data) => YAML_BOOLEANS.includes(data),
18
+ represent: {
19
+ // deno-lint-ignore ban-types
20
+ lowercase: (object) => {
21
+ const value = object instanceof Boolean ? object.valueOf() : object;
22
+ return value ? "true" : "false";
23
+ },
24
+ // deno-lint-ignore ban-types
25
+ uppercase: (object) => {
26
+ const value = object instanceof Boolean ? object.valueOf() : object;
27
+ return value ? "TRUE" : "FALSE";
28
+ },
29
+ // deno-lint-ignore ban-types
30
+ camelcase: (object) => {
31
+ const value = object instanceof Boolean ? object.valueOf() : object;
32
+ return value ? "True" : "False";
33
+ },
34
+ },
35
+ };
@@ -0,0 +1,2 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const float: Type<"scalar", number>;
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ // Ported from js-yaml v3.13.1:
3
+ // https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
4
+ // Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
5
+ // Copyright 2018-2026 the Deno authors. MIT license.
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.float = void 0;
8
+ const _utils_js_1 = require("../_utils.js");
9
+ const YAML_FLOAT_REGEXP = new RegExp(
10
+ // 2.5e4, 2.5 and integers
11
+ "^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?" +
12
+ // .2e4, .2
13
+ // special case, seems not from spec
14
+ "|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?" +
15
+ // .inf
16
+ "|[-+]?\\.(?:inf|Inf|INF)" +
17
+ // .nan
18
+ "|\\.(?:nan|NaN|NAN))$");
19
+ function resolveYamlFloat(data) {
20
+ if (!YAML_FLOAT_REGEXP.test(data) ||
21
+ // Quick hack to not allow integers end with `_`
22
+ // Probably should update regexp & check speed
23
+ data[data.length - 1] === "_") {
24
+ return false;
25
+ }
26
+ return true;
27
+ }
28
+ function constructYamlFloat(data) {
29
+ let value = data.replace(/_/g, "").toLowerCase();
30
+ const sign = value[0] === "-" ? -1 : 1;
31
+ if (value[0] && "+-".includes(value[0])) {
32
+ value = value.slice(1);
33
+ }
34
+ if (value === ".inf") {
35
+ return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
36
+ }
37
+ if (value === ".nan") {
38
+ return NaN;
39
+ }
40
+ return sign * parseFloat(value);
41
+ }
42
+ const SCIENTIFIC_WITHOUT_DOT_REGEXP = /^[-+]?[0-9]+e/;
43
+ function representYamlFloat(
44
+ // deno-lint-ignore ban-types
45
+ object, style) {
46
+ const value = object instanceof Number ? object.valueOf() : object;
47
+ if (isNaN(value)) {
48
+ switch (style) {
49
+ case "lowercase":
50
+ return ".nan";
51
+ case "uppercase":
52
+ return ".NAN";
53
+ case "camelcase":
54
+ return ".NaN";
55
+ }
56
+ }
57
+ else if (Number.POSITIVE_INFINITY === value) {
58
+ switch (style) {
59
+ case "lowercase":
60
+ return ".inf";
61
+ case "uppercase":
62
+ return ".INF";
63
+ case "camelcase":
64
+ return ".Inf";
65
+ }
66
+ }
67
+ else if (Number.NEGATIVE_INFINITY === value) {
68
+ switch (style) {
69
+ case "lowercase":
70
+ return "-.inf";
71
+ case "uppercase":
72
+ return "-.INF";
73
+ case "camelcase":
74
+ return "-.Inf";
75
+ }
76
+ }
77
+ else if ((0, _utils_js_1.isNegativeZero)(value)) {
78
+ return "-0.0";
79
+ }
80
+ const res = value.toString(10);
81
+ // JS stringifier can build scientific format without dots: 5e-100,
82
+ // while YAML requires dot: 5.e-100. Fix it with simple hack
83
+ return SCIENTIFIC_WITHOUT_DOT_REGEXP.test(res) ? res.replace("e", ".e") : res;
84
+ }
85
+ function isFloat(object) {
86
+ if (object instanceof Number)
87
+ object = object.valueOf();
88
+ return typeof object === "number" &&
89
+ (object % 1 !== 0 || (0, _utils_js_1.isNegativeZero)(object));
90
+ }
91
+ exports.float = {
92
+ tag: "tag:yaml.org,2002:float",
93
+ construct: constructYamlFloat,
94
+ defaultStyle: "lowercase",
95
+ kind: "scalar",
96
+ predicate: isFloat,
97
+ represent: representYamlFloat,
98
+ resolve: resolveYamlFloat,
99
+ };
@@ -0,0 +1,2 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const int: Type<"scalar", number>;
@@ -0,0 +1,162 @@
1
+ "use strict";
2
+ // Ported from js-yaml v3.13.1:
3
+ // https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
4
+ // Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
5
+ // Copyright 2018-2026 the Deno authors. MIT license.
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.int = void 0;
8
+ const _utils_js_1 = require("../_utils.js");
9
+ function isCharCodeInRange(c, lower, upper) {
10
+ return lower <= c && c <= upper;
11
+ }
12
+ function isHexCode(c) {
13
+ return (isCharCodeInRange(c, 0x30, 0x39) || // 0-9
14
+ isCharCodeInRange(c, 0x41, 0x46) || // A-F
15
+ isCharCodeInRange(c, 0x61, 0x66) // a-f
16
+ );
17
+ }
18
+ function isOctCode(c) {
19
+ return isCharCodeInRange(c, 0x30, 0x37); // 0-7
20
+ }
21
+ function isDecCode(c) {
22
+ return isCharCodeInRange(c, 0x30, 0x39); // 0-9
23
+ }
24
+ function resolveYamlInteger(data) {
25
+ const max = data.length;
26
+ let index = 0;
27
+ let hasDigits = false;
28
+ if (!max)
29
+ return false;
30
+ let ch = data[index];
31
+ // sign
32
+ if (ch === "-" || ch === "+") {
33
+ ch = data[++index];
34
+ }
35
+ if (ch === "0") {
36
+ // 0
37
+ if (index + 1 === max)
38
+ return true;
39
+ ch = data[++index];
40
+ // base 2, base 8, base 16
41
+ if (ch === "b") {
42
+ // base 2
43
+ index++;
44
+ for (; index < max; index++) {
45
+ ch = data[index];
46
+ if (ch === "_")
47
+ continue;
48
+ if (ch !== "0" && ch !== "1")
49
+ return false;
50
+ hasDigits = true;
51
+ }
52
+ return hasDigits && ch !== "_";
53
+ }
54
+ if (ch === "x") {
55
+ // base 16
56
+ index++;
57
+ for (; index < max; index++) {
58
+ ch = data[index];
59
+ if (ch === "_")
60
+ continue;
61
+ if (!isHexCode(data.charCodeAt(index)))
62
+ return false;
63
+ hasDigits = true;
64
+ }
65
+ return hasDigits && ch !== "_";
66
+ }
67
+ // base 8
68
+ for (; index < max; index++) {
69
+ ch = data[index];
70
+ if (ch === "_")
71
+ continue;
72
+ if (!isOctCode(data.charCodeAt(index)))
73
+ return false;
74
+ hasDigits = true;
75
+ }
76
+ return hasDigits && ch !== "_";
77
+ }
78
+ // base 10 (except 0) or base 60
79
+ // value should not start with `_`;
80
+ if (ch === "_")
81
+ return false;
82
+ for (; index < max; index++) {
83
+ ch = data[index];
84
+ if (ch === "_")
85
+ continue;
86
+ if (!isDecCode(data.charCodeAt(index))) {
87
+ return false;
88
+ }
89
+ hasDigits = true;
90
+ }
91
+ // Should have digits and should not end with `_`
92
+ if (!hasDigits || ch === "_")
93
+ return false;
94
+ // base60 almost not used, no needs to optimize
95
+ return /^(:[0-5]?[0-9])+$/.test(data.slice(index));
96
+ }
97
+ function constructYamlInteger(data) {
98
+ let value = data;
99
+ if (value.includes("_")) {
100
+ value = value.replace(/_/g, "");
101
+ }
102
+ let sign = 1;
103
+ let ch = value[0];
104
+ if (ch === "-" || ch === "+") {
105
+ if (ch === "-")
106
+ sign = -1;
107
+ value = value.slice(1);
108
+ ch = value[0];
109
+ }
110
+ if (value === "0")
111
+ return 0;
112
+ if (ch === "0") {
113
+ if (value[1] === "b")
114
+ return sign * parseInt(value.slice(2), 2);
115
+ if (value[1] === "x")
116
+ return sign * parseInt(value, 16);
117
+ return sign * parseInt(value, 8);
118
+ }
119
+ return sign * parseInt(value, 10);
120
+ }
121
+ function isInteger(object) {
122
+ if (object instanceof Number)
123
+ object = object.valueOf();
124
+ return typeof object === "number" && object % 1 === 0 &&
125
+ !(0, _utils_js_1.isNegativeZero)(object);
126
+ }
127
+ exports.int = {
128
+ tag: "tag:yaml.org,2002:int",
129
+ construct: constructYamlInteger,
130
+ defaultStyle: "decimal",
131
+ kind: "scalar",
132
+ predicate: isInteger,
133
+ represent: {
134
+ // deno-lint-ignore ban-types
135
+ binary(object) {
136
+ const value = object instanceof Number ? object.valueOf() : object;
137
+ return value >= 0
138
+ ? `0b${value.toString(2)}`
139
+ : `-0b${value.toString(2).slice(1)}`;
140
+ },
141
+ // deno-lint-ignore ban-types
142
+ octal(object) {
143
+ const value = object instanceof Number ? object.valueOf() : object;
144
+ return value >= 0
145
+ ? `0${value.toString(8)}`
146
+ : `-0${value.toString(8).slice(1)}`;
147
+ },
148
+ // deno-lint-ignore ban-types
149
+ decimal(object) {
150
+ const value = object instanceof Number ? object.valueOf() : object;
151
+ return value.toString(10);
152
+ },
153
+ // deno-lint-ignore ban-types
154
+ hexadecimal(object) {
155
+ const value = object instanceof Number ? object.valueOf() : object;
156
+ return value >= 0
157
+ ? `0x${value.toString(16).toUpperCase()}`
158
+ : `-0x${value.toString(16).toUpperCase().slice(1)}`;
159
+ },
160
+ },
161
+ resolve: resolveYamlInteger,
162
+ };
@@ -0,0 +1,2 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const map: Type<"mapping", unknown>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // Ported from js-yaml v3.13.1:
3
+ // https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
4
+ // Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
5
+ // Copyright 2018-2026 the Deno authors. MIT license.
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.map = void 0;
8
+ exports.map = {
9
+ tag: "tag:yaml.org,2002:map",
10
+ resolve() {
11
+ return true;
12
+ },
13
+ construct(data) {
14
+ return data !== null ? data : {};
15
+ },
16
+ kind: "mapping",
17
+ };
@@ -0,0 +1,2 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const merge: Type<"scalar", unknown>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // Ported from js-yaml v3.13.1:
3
+ // https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
4
+ // Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
5
+ // Copyright 2018-2026 the Deno authors. MIT license.
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.merge = void 0;
8
+ exports.merge = {
9
+ tag: "tag:yaml.org,2002:merge",
10
+ kind: "scalar",
11
+ resolve: (data) => data === "<<" || data === null,
12
+ construct: (data) => data,
13
+ };
@@ -0,0 +1,2 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const nil: Type<"scalar", null>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ // Ported from js-yaml v3.13.1:
3
+ // https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
4
+ // Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
5
+ // Copyright 2018-2026 the Deno authors. MIT license.
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.nil = void 0;
8
+ exports.nil = {
9
+ tag: "tag:yaml.org,2002:null",
10
+ kind: "scalar",
11
+ defaultStyle: "lowercase",
12
+ predicate: (object) => object === null,
13
+ construct: () => null,
14
+ resolve: (data) => {
15
+ return (data === "~" ||
16
+ data === "null" ||
17
+ data === "Null" ||
18
+ data === "NULL");
19
+ },
20
+ represent: {
21
+ lowercase: () => "null",
22
+ uppercase: () => "NULL",
23
+ camelcase: () => "Null",
24
+ },
25
+ };
@@ -0,0 +1,2 @@
1
+ import type { Type } from "../_type.js";
2
+ export declare const omap: Type<"sequence", Record<PropertyKey, unknown>[]>;