kooyu 0.0.0-stage → 0.2.1

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 (483) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +66 -2
  3. package/bin/kooyu.mjs +56 -0
  4. package/node_modules/@kodo/platform/LICENSE +21 -0
  5. package/node_modules/@kodo/platform/dist/index.d.ts +4 -0
  6. package/node_modules/@kodo/platform/dist/index.js +26 -0
  7. package/node_modules/@kodo/platform/dist/index.js.map +1 -0
  8. package/node_modules/@kodo/platform/package.json +16 -0
  9. package/node_modules/@kodo/protocol/LICENSE +21 -0
  10. package/node_modules/@kodo/protocol/dist/activity.d.ts +26 -0
  11. package/node_modules/@kodo/protocol/dist/activity.js +2 -0
  12. package/node_modules/@kodo/protocol/dist/activity.js.map +1 -0
  13. package/node_modules/@kodo/protocol/dist/assistant-content.d.ts +10 -0
  14. package/node_modules/@kodo/protocol/dist/assistant-content.js +77 -0
  15. package/node_modules/@kodo/protocol/dist/assistant-content.js.map +1 -0
  16. package/node_modules/@kodo/protocol/dist/automation-schedule.d.ts +18 -0
  17. package/node_modules/@kodo/protocol/dist/automation-schedule.js +98 -0
  18. package/node_modules/@kodo/protocol/dist/automation-schedule.js.map +1 -0
  19. package/node_modules/@kodo/protocol/dist/client.d.ts +11 -0
  20. package/node_modules/@kodo/protocol/dist/client.js +75 -0
  21. package/node_modules/@kodo/protocol/dist/client.js.map +1 -0
  22. package/node_modules/@kodo/protocol/dist/clients.d.ts +203 -0
  23. package/node_modules/@kodo/protocol/dist/clients.js +18 -0
  24. package/node_modules/@kodo/protocol/dist/clients.js.map +1 -0
  25. package/node_modules/@kodo/protocol/dist/conversation.d.ts +11 -0
  26. package/node_modules/@kodo/protocol/dist/conversation.js +38 -0
  27. package/node_modules/@kodo/protocol/dist/conversation.js.map +1 -0
  28. package/node_modules/@kodo/protocol/dist/files.d.ts +93 -0
  29. package/node_modules/@kodo/protocol/dist/files.js +44 -0
  30. package/node_modules/@kodo/protocol/dist/files.js.map +1 -0
  31. package/node_modules/@kodo/protocol/dist/goals.d.ts +204 -0
  32. package/node_modules/@kodo/protocol/dist/goals.js +99 -0
  33. package/node_modules/@kodo/protocol/dist/goals.js.map +1 -0
  34. package/node_modules/@kodo/protocol/dist/index.d.ts +678 -0
  35. package/node_modules/@kodo/protocol/dist/index.js +179 -0
  36. package/node_modules/@kodo/protocol/dist/index.js.map +1 -0
  37. package/node_modules/@kodo/protocol/dist/notifications.d.ts +50 -0
  38. package/node_modules/@kodo/protocol/dist/notifications.js +15 -0
  39. package/node_modules/@kodo/protocol/dist/notifications.js.map +1 -0
  40. package/node_modules/@kodo/protocol/dist/onboarding.d.ts +17 -0
  41. package/node_modules/@kodo/protocol/dist/onboarding.js +9 -0
  42. package/node_modules/@kodo/protocol/dist/onboarding.js.map +1 -0
  43. package/node_modules/@kodo/protocol/dist/providers.d.ts +292 -0
  44. package/node_modules/@kodo/protocol/dist/providers.js +142 -0
  45. package/node_modules/@kodo/protocol/dist/providers.js.map +1 -0
  46. package/node_modules/@kodo/protocol/dist/self-hosted.d.ts +146 -0
  47. package/node_modules/@kodo/protocol/dist/self-hosted.js +76 -0
  48. package/node_modules/@kodo/protocol/dist/self-hosted.js.map +1 -0
  49. package/node_modules/@kodo/protocol/dist/settings.d.ts +137 -0
  50. package/node_modules/@kodo/protocol/dist/settings.js +80 -0
  51. package/node_modules/@kodo/protocol/dist/settings.js.map +1 -0
  52. package/node_modules/@kodo/protocol/dist/skills.d.ts +27 -0
  53. package/node_modules/@kodo/protocol/dist/skills.js +2 -0
  54. package/node_modules/@kodo/protocol/dist/skills.js.map +1 -0
  55. package/node_modules/@kodo/protocol/dist/web.d.ts +47 -0
  56. package/node_modules/@kodo/protocol/dist/web.js +13 -0
  57. package/node_modules/@kodo/protocol/dist/web.js.map +1 -0
  58. package/node_modules/@kodo/protocol/dist/workspace-files.d.ts +37 -0
  59. package/node_modules/@kodo/protocol/dist/workspace-files.js +2 -0
  60. package/node_modules/@kodo/protocol/dist/workspace-files.js.map +1 -0
  61. package/node_modules/@kodo/protocol/package.json +23 -0
  62. package/package.json +56 -4
  63. package/runtime/apps/web/dist/apple-touch-icon.png +0 -0
  64. package/runtime/apps/web/dist/art/prism-alabaster.jpg +0 -0
  65. package/runtime/apps/web/dist/art/prism-obsidian.jpg +0 -0
  66. package/runtime/apps/web/dist/assets/index-5gyqwenn.js +80191 -0
  67. package/runtime/apps/web/dist/assets/index-BC5Kj-z8.css +20556 -0
  68. package/runtime/apps/web/dist/favicon.ico +0 -0
  69. package/runtime/apps/web/dist/icon-192.png +0 -0
  70. package/runtime/apps/web/dist/icon-512.png +0 -0
  71. package/runtime/apps/web/dist/icon-maskable-512.png +0 -0
  72. package/runtime/apps/web/dist/icon.svg +21 -0
  73. package/runtime/apps/web/dist/index.html +21 -0
  74. package/runtime/apps/web/dist/manifest.webmanifest +35 -0
  75. package/runtime/apps/web/dist/sw.js +42 -0
  76. package/runtime/docs/verification.json +549 -0
  77. package/runtime/package-lock.json +12599 -0
  78. package/runtime/package.json +6 -0
  79. package/runtime/packages/host/dist/applications/http.d.ts +2 -0
  80. package/runtime/packages/host/dist/applications/http.js +36 -0
  81. package/runtime/packages/host/dist/applications/http.js.map +1 -0
  82. package/runtime/packages/host/dist/applications/oauth.d.ts +24 -0
  83. package/runtime/packages/host/dist/applications/oauth.js +216 -0
  84. package/runtime/packages/host/dist/applications/oauth.js.map +1 -0
  85. package/runtime/packages/host/dist/applications/permissions.d.ts +19 -0
  86. package/runtime/packages/host/dist/applications/permissions.js +103 -0
  87. package/runtime/packages/host/dist/applications/permissions.js.map +1 -0
  88. package/runtime/packages/host/dist/applications/service.d.ts +208 -0
  89. package/runtime/packages/host/dist/applications/service.js +340 -0
  90. package/runtime/packages/host/dist/applications/service.js.map +1 -0
  91. package/runtime/packages/host/dist/automations/schedule.d.ts +6 -0
  92. package/runtime/packages/host/dist/automations/schedule.js +123 -0
  93. package/runtime/packages/host/dist/automations/schedule.js.map +1 -0
  94. package/runtime/packages/host/dist/automations/service.d.ts +34 -0
  95. package/runtime/packages/host/dist/automations/service.js +420 -0
  96. package/runtime/packages/host/dist/automations/service.js.map +1 -0
  97. package/runtime/packages/host/dist/automations/webhooks.d.ts +65 -0
  98. package/runtime/packages/host/dist/automations/webhooks.js +238 -0
  99. package/runtime/packages/host/dist/automations/webhooks.js.map +1 -0
  100. package/runtime/packages/host/dist/clients/access.d.ts +11 -0
  101. package/runtime/packages/host/dist/clients/access.js +170 -0
  102. package/runtime/packages/host/dist/clients/access.js.map +1 -0
  103. package/runtime/packages/host/dist/clients/configuration.d.ts +16 -0
  104. package/runtime/packages/host/dist/clients/configuration.js +112 -0
  105. package/runtime/packages/host/dist/clients/configuration.js.map +1 -0
  106. package/runtime/packages/host/dist/clients/details.d.ts +6 -0
  107. package/runtime/packages/host/dist/clients/details.js +132 -0
  108. package/runtime/packages/host/dist/clients/details.js.map +1 -0
  109. package/runtime/packages/host/dist/clients/operations.d.ts +46 -0
  110. package/runtime/packages/host/dist/clients/operations.js +224 -0
  111. package/runtime/packages/host/dist/clients/operations.js.map +1 -0
  112. package/runtime/packages/host/dist/clients/sync.d.ts +13 -0
  113. package/runtime/packages/host/dist/clients/sync.js +55 -0
  114. package/runtime/packages/host/dist/clients/sync.js.map +1 -0
  115. package/runtime/packages/host/dist/clients/workbench.d.ts +5 -0
  116. package/runtime/packages/host/dist/clients/workbench.js +75 -0
  117. package/runtime/packages/host/dist/clients/workbench.js.map +1 -0
  118. package/runtime/packages/host/dist/configuration/config-files.d.ts +17 -0
  119. package/runtime/packages/host/dist/configuration/config-files.js +137 -0
  120. package/runtime/packages/host/dist/configuration/config-files.js.map +1 -0
  121. package/runtime/packages/host/dist/configuration/config.d.ts +43 -0
  122. package/runtime/packages/host/dist/configuration/config.js +297 -0
  123. package/runtime/packages/host/dist/configuration/config.js.map +1 -0
  124. package/runtime/packages/host/dist/configuration/engines.d.ts +24 -0
  125. package/runtime/packages/host/dist/configuration/engines.js +223 -0
  126. package/runtime/packages/host/dist/configuration/engines.js.map +1 -0
  127. package/runtime/packages/host/dist/configuration/onboarding.d.ts +5 -0
  128. package/runtime/packages/host/dist/configuration/onboarding.js +42 -0
  129. package/runtime/packages/host/dist/configuration/onboarding.js.map +1 -0
  130. package/runtime/packages/host/dist/configuration/permissions.d.ts +7 -0
  131. package/runtime/packages/host/dist/configuration/permissions.js +56 -0
  132. package/runtime/packages/host/dist/configuration/permissions.js.map +1 -0
  133. package/runtime/packages/host/dist/configuration/preferences.d.ts +4 -0
  134. package/runtime/packages/host/dist/configuration/preferences.js +17 -0
  135. package/runtime/packages/host/dist/configuration/preferences.js.map +1 -0
  136. package/runtime/packages/host/dist/configuration/skills.d.ts +32 -0
  137. package/runtime/packages/host/dist/configuration/skills.js +376 -0
  138. package/runtime/packages/host/dist/configuration/skills.js.map +1 -0
  139. package/runtime/packages/host/dist/credentials/vault.d.ts +57 -0
  140. package/runtime/packages/host/dist/credentials/vault.js +181 -0
  141. package/runtime/packages/host/dist/credentials/vault.js.map +1 -0
  142. package/runtime/packages/host/dist/devices/native-client.d.ts +34 -0
  143. package/runtime/packages/host/dist/devices/native-client.js +52 -0
  144. package/runtime/packages/host/dist/devices/native-client.js.map +1 -0
  145. package/runtime/packages/host/dist/devices/pairing.d.ts +25 -0
  146. package/runtime/packages/host/dist/devices/pairing.js +70 -0
  147. package/runtime/packages/host/dist/devices/pairing.js.map +1 -0
  148. package/runtime/packages/host/dist/devices/relay.d.ts +40 -0
  149. package/runtime/packages/host/dist/devices/relay.js +290 -0
  150. package/runtime/packages/host/dist/devices/relay.js.map +1 -0
  151. package/runtime/packages/host/dist/domain/session-rules.d.ts +4 -0
  152. package/runtime/packages/host/dist/domain/session-rules.js +35 -0
  153. package/runtime/packages/host/dist/domain/session-rules.js.map +1 -0
  154. package/runtime/packages/host/dist/execution/actions.d.ts +34 -0
  155. package/runtime/packages/host/dist/execution/actions.js +117 -0
  156. package/runtime/packages/host/dist/execution/actions.js.map +1 -0
  157. package/runtime/packages/host/dist/execution/browser.d.ts +105 -0
  158. package/runtime/packages/host/dist/execution/browser.js +317 -0
  159. package/runtime/packages/host/dist/execution/browser.js.map +1 -0
  160. package/runtime/packages/host/dist/execution/capacity.d.ts +16 -0
  161. package/runtime/packages/host/dist/execution/capacity.js +44 -0
  162. package/runtime/packages/host/dist/execution/capacity.js.map +1 -0
  163. package/runtime/packages/host/dist/execution/service.d.ts +73 -0
  164. package/runtime/packages/host/dist/execution/service.js +318 -0
  165. package/runtime/packages/host/dist/execution/service.js.map +1 -0
  166. package/runtime/packages/host/dist/execution/worker.d.ts +2 -0
  167. package/runtime/packages/host/dist/execution/worker.js +304 -0
  168. package/runtime/packages/host/dist/execution/worker.js.map +1 -0
  169. package/runtime/packages/host/dist/files/http-content.d.ts +6 -0
  170. package/runtime/packages/host/dist/files/http-content.js +81 -0
  171. package/runtime/packages/host/dist/files/http-content.js.map +1 -0
  172. package/runtime/packages/host/dist/files/store.d.ts +98 -0
  173. package/runtime/packages/host/dist/files/store.js +507 -0
  174. package/runtime/packages/host/dist/files/store.js.map +1 -0
  175. package/runtime/packages/host/dist/goals/service.d.ts +73 -0
  176. package/runtime/packages/host/dist/goals/service.js +639 -0
  177. package/runtime/packages/host/dist/goals/service.js.map +1 -0
  178. package/runtime/packages/host/dist/goals/workspace.d.ts +27 -0
  179. package/runtime/packages/host/dist/goals/workspace.js +228 -0
  180. package/runtime/packages/host/dist/goals/workspace.js.map +1 -0
  181. package/runtime/packages/host/dist/harnesses/acp-client.d.ts +20 -0
  182. package/runtime/packages/host/dist/harnesses/acp-client.js +286 -0
  183. package/runtime/packages/host/dist/harnesses/acp-client.js.map +1 -0
  184. package/runtime/packages/host/dist/harnesses/acp-history.d.ts +8 -0
  185. package/runtime/packages/host/dist/harnesses/acp-history.js +67 -0
  186. package/runtime/packages/host/dist/harnesses/acp-history.js.map +1 -0
  187. package/runtime/packages/host/dist/harnesses/acp-sessions.d.ts +6 -0
  188. package/runtime/packages/host/dist/harnesses/acp-sessions.js +76 -0
  189. package/runtime/packages/host/dist/harnesses/acp-sessions.js.map +1 -0
  190. package/runtime/packages/host/dist/harnesses/acp.d.ts +3 -0
  191. package/runtime/packages/host/dist/harnesses/acp.js +451 -0
  192. package/runtime/packages/host/dist/harnesses/acp.js.map +1 -0
  193. package/runtime/packages/host/dist/harnesses/adapter.d.ts +83 -0
  194. package/runtime/packages/host/dist/harnesses/adapter.js +24 -0
  195. package/runtime/packages/host/dist/harnesses/adapter.js.map +1 -0
  196. package/runtime/packages/host/dist/harnesses/asar.d.ts +3 -0
  197. package/runtime/packages/host/dist/harnesses/asar.js +77 -0
  198. package/runtime/packages/host/dist/harnesses/asar.js.map +1 -0
  199. package/runtime/packages/host/dist/harnesses/claude-code.d.ts +12 -0
  200. package/runtime/packages/host/dist/harnesses/claude-code.js +535 -0
  201. package/runtime/packages/host/dist/harnesses/claude-code.js.map +1 -0
  202. package/runtime/packages/host/dist/harnesses/claude-history.d.ts +17 -0
  203. package/runtime/packages/host/dist/harnesses/claude-history.js +101 -0
  204. package/runtime/packages/host/dist/harnesses/claude-history.js.map +1 -0
  205. package/runtime/packages/host/dist/harnesses/codex-history.d.ts +13 -0
  206. package/runtime/packages/host/dist/harnesses/codex-history.js +107 -0
  207. package/runtime/packages/host/dist/harnesses/codex-history.js.map +1 -0
  208. package/runtime/packages/host/dist/harnesses/codex.d.ts +2 -0
  209. package/runtime/packages/host/dist/harnesses/codex.js +430 -0
  210. package/runtime/packages/host/dist/harnesses/codex.js.map +1 -0
  211. package/runtime/packages/host/dist/harnesses/cursor.d.ts +8 -0
  212. package/runtime/packages/host/dist/harnesses/cursor.js +119 -0
  213. package/runtime/packages/host/dist/harnesses/cursor.js.map +1 -0
  214. package/runtime/packages/host/dist/harnesses/deepseek-harness.d.ts +2 -0
  215. package/runtime/packages/host/dist/harnesses/deepseek-harness.js +296 -0
  216. package/runtime/packages/host/dist/harnesses/deepseek-harness.js.map +1 -0
  217. package/runtime/packages/host/dist/harnesses/desktop-installations.d.ts +6 -0
  218. package/runtime/packages/host/dist/harnesses/desktop-installations.js +247 -0
  219. package/runtime/packages/host/dist/harnesses/desktop-installations.js.map +1 -0
  220. package/runtime/packages/host/dist/harnesses/desktop-opencode.d.ts +1 -0
  221. package/runtime/packages/host/dist/harnesses/desktop-opencode.js +39 -0
  222. package/runtime/packages/host/dist/harnesses/desktop-opencode.js.map +1 -0
  223. package/runtime/packages/host/dist/harnesses/dsh-history.d.ts +9 -0
  224. package/runtime/packages/host/dist/harnesses/dsh-history.js +200 -0
  225. package/runtime/packages/host/dist/harnesses/dsh-history.js.map +1 -0
  226. package/runtime/packages/host/dist/harnesses/dsh-native.d.ts +20 -0
  227. package/runtime/packages/host/dist/harnesses/dsh-native.js +106 -0
  228. package/runtime/packages/host/dist/harnesses/dsh-native.js.map +1 -0
  229. package/runtime/packages/host/dist/harnesses/gemini.d.ts +2 -0
  230. package/runtime/packages/host/dist/harnesses/gemini.js +217 -0
  231. package/runtime/packages/host/dist/harnesses/gemini.js.map +1 -0
  232. package/runtime/packages/host/dist/harnesses/grok-build.d.ts +6 -0
  233. package/runtime/packages/host/dist/harnesses/grok-build.js +152 -0
  234. package/runtime/packages/host/dist/harnesses/grok-build.js.map +1 -0
  235. package/runtime/packages/host/dist/harnesses/input-modalities.d.ts +9 -0
  236. package/runtime/packages/host/dist/harnesses/input-modalities.js +17 -0
  237. package/runtime/packages/host/dist/harnesses/input-modalities.js.map +1 -0
  238. package/runtime/packages/host/dist/harnesses/kimi-code.d.ts +2 -0
  239. package/runtime/packages/host/dist/harnesses/kimi-code.js +648 -0
  240. package/runtime/packages/host/dist/harnesses/kimi-code.js.map +1 -0
  241. package/runtime/packages/host/dist/harnesses/kimi-interactions.d.ts +3 -0
  242. package/runtime/packages/host/dist/harnesses/kimi-interactions.js +82 -0
  243. package/runtime/packages/host/dist/harnesses/kimi-interactions.js.map +1 -0
  244. package/runtime/packages/host/dist/harnesses/kodo.d.ts +2 -0
  245. package/runtime/packages/host/dist/harnesses/kodo.js +11 -0
  246. package/runtime/packages/host/dist/harnesses/kodo.js.map +1 -0
  247. package/runtime/packages/host/dist/harnesses/launch-types.d.ts +12 -0
  248. package/runtime/packages/host/dist/harnesses/launch-types.js +2 -0
  249. package/runtime/packages/host/dist/harnesses/launch-types.js.map +1 -0
  250. package/runtime/packages/host/dist/harnesses/model-metadata.d.ts +12 -0
  251. package/runtime/packages/host/dist/harnesses/model-metadata.js +43 -0
  252. package/runtime/packages/host/dist/harnesses/model-metadata.js.map +1 -0
  253. package/runtime/packages/host/dist/harnesses/model-options.d.ts +31 -0
  254. package/runtime/packages/host/dist/harnesses/model-options.js +242 -0
  255. package/runtime/packages/host/dist/harnesses/model-options.js.map +1 -0
  256. package/runtime/packages/host/dist/harnesses/models.d.ts +14 -0
  257. package/runtime/packages/host/dist/harnesses/models.js +161 -0
  258. package/runtime/packages/host/dist/harnesses/models.js.map +1 -0
  259. package/runtime/packages/host/dist/harnesses/native-command.d.ts +2 -0
  260. package/runtime/packages/host/dist/harnesses/native-command.js +50 -0
  261. package/runtime/packages/host/dist/harnesses/native-command.js.map +1 -0
  262. package/runtime/packages/host/dist/harnesses/native-defaults.d.ts +15 -0
  263. package/runtime/packages/host/dist/harnesses/native-defaults.js +165 -0
  264. package/runtime/packages/host/dist/harnesses/native-defaults.js.map +1 -0
  265. package/runtime/packages/host/dist/harnesses/native-history.d.ts +4 -0
  266. package/runtime/packages/host/dist/harnesses/native-history.js +35 -0
  267. package/runtime/packages/host/dist/harnesses/native-history.js.map +1 -0
  268. package/runtime/packages/host/dist/harnesses/native-interactions.d.ts +11 -0
  269. package/runtime/packages/host/dist/harnesses/native-interactions.js +50 -0
  270. package/runtime/packages/host/dist/harnesses/native-interactions.js.map +1 -0
  271. package/runtime/packages/host/dist/harnesses/opencode-events.d.ts +13 -0
  272. package/runtime/packages/host/dist/harnesses/opencode-events.js +112 -0
  273. package/runtime/packages/host/dist/harnesses/opencode-events.js.map +1 -0
  274. package/runtime/packages/host/dist/harnesses/opencode-history.d.ts +8 -0
  275. package/runtime/packages/host/dist/harnesses/opencode-history.js +50 -0
  276. package/runtime/packages/host/dist/harnesses/opencode-history.js.map +1 -0
  277. package/runtime/packages/host/dist/harnesses/opencode.d.ts +2 -0
  278. package/runtime/packages/host/dist/harnesses/opencode.js +421 -0
  279. package/runtime/packages/host/dist/harnesses/opencode.js.map +1 -0
  280. package/runtime/packages/host/dist/harnesses/pi.d.ts +2 -0
  281. package/runtime/packages/host/dist/harnesses/pi.js +11 -0
  282. package/runtime/packages/host/dist/harnesses/pi.js.map +1 -0
  283. package/runtime/packages/host/dist/harnesses/registry.d.ts +3 -0
  284. package/runtime/packages/host/dist/harnesses/registry.js +32 -0
  285. package/runtime/packages/host/dist/harnesses/registry.js.map +1 -0
  286. package/runtime/packages/host/dist/harnesses/retry.d.ts +4 -0
  287. package/runtime/packages/host/dist/harnesses/retry.js +19 -0
  288. package/runtime/packages/host/dist/harnesses/retry.js.map +1 -0
  289. package/runtime/packages/host/dist/harnesses/rpc.d.ts +25 -0
  290. package/runtime/packages/host/dist/harnesses/rpc.js +202 -0
  291. package/runtime/packages/host/dist/harnesses/rpc.js.map +1 -0
  292. package/runtime/packages/host/dist/harnesses/sdk-history.d.ts +6 -0
  293. package/runtime/packages/host/dist/harnesses/sdk-history.js +84 -0
  294. package/runtime/packages/host/dist/harnesses/sdk-history.js.map +1 -0
  295. package/runtime/packages/host/dist/harnesses/session-presence.d.ts +14 -0
  296. package/runtime/packages/host/dist/harnesses/session-presence.js +139 -0
  297. package/runtime/packages/host/dist/harnesses/session-presence.js.map +1 -0
  298. package/runtime/packages/host/dist/harnesses/subagents.d.ts +12 -0
  299. package/runtime/packages/host/dist/harnesses/subagents.js +44 -0
  300. package/runtime/packages/host/dist/harnesses/subagents.js.map +1 -0
  301. package/runtime/packages/host/dist/harnesses/todos.d.ts +12 -0
  302. package/runtime/packages/host/dist/harnesses/todos.js +179 -0
  303. package/runtime/packages/host/dist/harnesses/todos.js.map +1 -0
  304. package/runtime/packages/host/dist/harnesses/zcode-frames.d.ts +12 -0
  305. package/runtime/packages/host/dist/harnesses/zcode-frames.js +245 -0
  306. package/runtime/packages/host/dist/harnesses/zcode-frames.js.map +1 -0
  307. package/runtime/packages/host/dist/harnesses/zcode-history.d.ts +6 -0
  308. package/runtime/packages/host/dist/harnesses/zcode-history.js +46 -0
  309. package/runtime/packages/host/dist/harnesses/zcode-history.js.map +1 -0
  310. package/runtime/packages/host/dist/harnesses/zcode-sessions.d.ts +3 -0
  311. package/runtime/packages/host/dist/harnesses/zcode-sessions.js +86 -0
  312. package/runtime/packages/host/dist/harnesses/zcode-sessions.js.map +1 -0
  313. package/runtime/packages/host/dist/harnesses/zcode.d.ts +2 -0
  314. package/runtime/packages/host/dist/harnesses/zcode.js +532 -0
  315. package/runtime/packages/host/dist/harnesses/zcode.js.map +1 -0
  316. package/runtime/packages/host/dist/http/client-routes.d.ts +4 -0
  317. package/runtime/packages/host/dist/http/client-routes.js +85 -0
  318. package/runtime/packages/host/dist/http/client-routes.js.map +1 -0
  319. package/runtime/packages/host/dist/http/self-hosted-routes.d.ts +6 -0
  320. package/runtime/packages/host/dist/http/self-hosted-routes.js +365 -0
  321. package/runtime/packages/host/dist/http/self-hosted-routes.js.map +1 -0
  322. package/runtime/packages/host/dist/http/server.d.ts +15 -0
  323. package/runtime/packages/host/dist/http/server.js +960 -0
  324. package/runtime/packages/host/dist/http/server.js.map +1 -0
  325. package/runtime/packages/host/dist/http/work-routes.d.ts +17 -0
  326. package/runtime/packages/host/dist/http/work-routes.js +229 -0
  327. package/runtime/packages/host/dist/http/work-routes.js.map +1 -0
  328. package/runtime/packages/host/dist/kodo/credentials.d.ts +8 -0
  329. package/runtime/packages/host/dist/kodo/credentials.js +56 -0
  330. package/runtime/packages/host/dist/kodo/credentials.js.map +1 -0
  331. package/runtime/packages/host/dist/kodo/kernel.d.ts +11 -0
  332. package/runtime/packages/host/dist/kodo/kernel.js +566 -0
  333. package/runtime/packages/host/dist/kodo/kernel.js.map +1 -0
  334. package/runtime/packages/host/dist/kodo/self-hosted-tools.d.ts +4 -0
  335. package/runtime/packages/host/dist/kodo/self-hosted-tools.js +230 -0
  336. package/runtime/packages/host/dist/kodo/self-hosted-tools.js.map +1 -0
  337. package/runtime/packages/host/dist/kodo/tools.d.ts +6 -0
  338. package/runtime/packages/host/dist/kodo/tools.js +467 -0
  339. package/runtime/packages/host/dist/kodo/tools.js.map +1 -0
  340. package/runtime/packages/host/dist/kodo/work-tools.d.ts +10 -0
  341. package/runtime/packages/host/dist/kodo/work-tools.js +259 -0
  342. package/runtime/packages/host/dist/kodo/work-tools.js.map +1 -0
  343. package/runtime/packages/host/dist/lifecycle/doctor.d.ts +18 -0
  344. package/runtime/packages/host/dist/lifecycle/doctor.js +68 -0
  345. package/runtime/packages/host/dist/lifecycle/doctor.js.map +1 -0
  346. package/runtime/packages/host/dist/lifecycle/gate.d.ts +38 -0
  347. package/runtime/packages/host/dist/lifecycle/gate.js +65 -0
  348. package/runtime/packages/host/dist/lifecycle/gate.js.map +1 -0
  349. package/runtime/packages/host/dist/main.d.ts +1 -0
  350. package/runtime/packages/host/dist/main.js +159 -0
  351. package/runtime/packages/host/dist/main.js.map +1 -0
  352. package/runtime/packages/host/dist/memory/service.d.ts +46 -0
  353. package/runtime/packages/host/dist/memory/service.js +213 -0
  354. package/runtime/packages/host/dist/memory/service.js.map +1 -0
  355. package/runtime/packages/host/dist/messaging/outbox.d.ts +28 -0
  356. package/runtime/packages/host/dist/messaging/outbox.js +158 -0
  357. package/runtime/packages/host/dist/messaging/outbox.js.map +1 -0
  358. package/runtime/packages/host/dist/native-import.d.ts +23 -0
  359. package/runtime/packages/host/dist/native-import.js +234 -0
  360. package/runtime/packages/host/dist/native-import.js.map +1 -0
  361. package/runtime/packages/host/dist/notifications/apns.d.ts +62 -0
  362. package/runtime/packages/host/dist/notifications/apns.js +231 -0
  363. package/runtime/packages/host/dist/notifications/apns.js.map +1 -0
  364. package/runtime/packages/host/dist/notifications/delivery.d.ts +66 -0
  365. package/runtime/packages/host/dist/notifications/delivery.js +393 -0
  366. package/runtime/packages/host/dist/notifications/delivery.js.map +1 -0
  367. package/runtime/packages/host/dist/notifications/service.d.ts +32 -0
  368. package/runtime/packages/host/dist/notifications/service.js +146 -0
  369. package/runtime/packages/host/dist/notifications/service.js.map +1 -0
  370. package/runtime/packages/host/dist/providers/catalog.d.ts +35 -0
  371. package/runtime/packages/host/dist/providers/catalog.js +267 -0
  372. package/runtime/packages/host/dist/providers/catalog.js.map +1 -0
  373. package/runtime/packages/host/dist/providers/credential-relay.d.ts +18 -0
  374. package/runtime/packages/host/dist/providers/credential-relay.js +142 -0
  375. package/runtime/packages/host/dist/providers/credential-relay.js.map +1 -0
  376. package/runtime/packages/host/dist/providers/gateway.d.ts +23 -0
  377. package/runtime/packages/host/dist/providers/gateway.js +592 -0
  378. package/runtime/packages/host/dist/providers/gateway.js.map +1 -0
  379. package/runtime/packages/host/dist/providers/gemini-chat.d.ts +6 -0
  380. package/runtime/packages/host/dist/providers/gemini-chat.js +273 -0
  381. package/runtime/packages/host/dist/providers/gemini-chat.js.map +1 -0
  382. package/runtime/packages/host/dist/providers/model-option.d.ts +3 -0
  383. package/runtime/packages/host/dist/providers/model-option.js +40 -0
  384. package/runtime/packages/host/dist/providers/model-option.js.map +1 -0
  385. package/runtime/packages/host/dist/providers/model-reasoning.d.ts +6 -0
  386. package/runtime/packages/host/dist/providers/model-reasoning.js +20 -0
  387. package/runtime/packages/host/dist/providers/model-reasoning.js.map +1 -0
  388. package/runtime/packages/host/dist/providers/native-config.d.ts +6 -0
  389. package/runtime/packages/host/dist/providers/native-config.js +236 -0
  390. package/runtime/packages/host/dist/providers/native-config.js.map +1 -0
  391. package/runtime/packages/host/dist/providers/service.d.ts +175 -0
  392. package/runtime/packages/host/dist/providers/service.js +1208 -0
  393. package/runtime/packages/host/dist/providers/service.js.map +1 -0
  394. package/runtime/packages/host/dist/session-activity.d.ts +9 -0
  395. package/runtime/packages/host/dist/session-activity.js +105 -0
  396. package/runtime/packages/host/dist/session-activity.js.map +1 -0
  397. package/runtime/packages/host/dist/session-service.d.ts +481 -0
  398. package/runtime/packages/host/dist/session-service.js +3885 -0
  399. package/runtime/packages/host/dist/session-service.js.map +1 -0
  400. package/runtime/packages/host/dist/storage/schema.d.ts +7 -0
  401. package/runtime/packages/host/dist/storage/schema.js +191 -0
  402. package/runtime/packages/host/dist/storage/schema.js.map +1 -0
  403. package/runtime/packages/host/dist/storage/self-hosted.d.ts +13 -0
  404. package/runtime/packages/host/dist/storage/self-hosted.js +51 -0
  405. package/runtime/packages/host/dist/storage/self-hosted.js.map +1 -0
  406. package/runtime/packages/host/dist/storage/store.d.ts +56 -0
  407. package/runtime/packages/host/dist/storage/store.js +470 -0
  408. package/runtime/packages/host/dist/storage/store.js.map +1 -0
  409. package/runtime/packages/host/dist/tools/web.d.ts +77 -0
  410. package/runtime/packages/host/dist/tools/web.js +532 -0
  411. package/runtime/packages/host/dist/tools/web.js.map +1 -0
  412. package/runtime/packages/host/dist/updater.d.ts +56 -0
  413. package/runtime/packages/host/dist/updater.js +622 -0
  414. package/runtime/packages/host/dist/updater.js.map +1 -0
  415. package/runtime/packages/host/dist/voice.d.ts +25 -0
  416. package/runtime/packages/host/dist/voice.js +173 -0
  417. package/runtime/packages/host/dist/voice.js.map +1 -0
  418. package/runtime/packages/host/dist/workspaces/artifacts.d.ts +25 -0
  419. package/runtime/packages/host/dist/workspaces/artifacts.js +76 -0
  420. package/runtime/packages/host/dist/workspaces/artifacts.js.map +1 -0
  421. package/runtime/packages/host/dist/workspaces/directories.d.ts +10 -0
  422. package/runtime/packages/host/dist/workspaces/directories.js +45 -0
  423. package/runtime/packages/host/dist/workspaces/directories.js.map +1 -0
  424. package/runtime/packages/host/dist/workspaces/files.d.ts +15 -0
  425. package/runtime/packages/host/dist/workspaces/files.js +223 -0
  426. package/runtime/packages/host/dist/workspaces/files.js.map +1 -0
  427. package/runtime/packages/host/package.json +25 -0
  428. package/runtime/packages/platform/dist/index.d.ts +4 -0
  429. package/runtime/packages/platform/dist/index.js +26 -0
  430. package/runtime/packages/platform/dist/index.js.map +1 -0
  431. package/runtime/packages/platform/package.json +16 -0
  432. package/runtime/packages/protocol/dist/activity.d.ts +26 -0
  433. package/runtime/packages/protocol/dist/activity.js +2 -0
  434. package/runtime/packages/protocol/dist/activity.js.map +1 -0
  435. package/runtime/packages/protocol/dist/assistant-content.d.ts +10 -0
  436. package/runtime/packages/protocol/dist/assistant-content.js +77 -0
  437. package/runtime/packages/protocol/dist/assistant-content.js.map +1 -0
  438. package/runtime/packages/protocol/dist/automation-schedule.d.ts +18 -0
  439. package/runtime/packages/protocol/dist/automation-schedule.js +98 -0
  440. package/runtime/packages/protocol/dist/automation-schedule.js.map +1 -0
  441. package/runtime/packages/protocol/dist/client.d.ts +11 -0
  442. package/runtime/packages/protocol/dist/client.js +75 -0
  443. package/runtime/packages/protocol/dist/client.js.map +1 -0
  444. package/runtime/packages/protocol/dist/clients.d.ts +203 -0
  445. package/runtime/packages/protocol/dist/clients.js +18 -0
  446. package/runtime/packages/protocol/dist/clients.js.map +1 -0
  447. package/runtime/packages/protocol/dist/conversation.d.ts +11 -0
  448. package/runtime/packages/protocol/dist/conversation.js +38 -0
  449. package/runtime/packages/protocol/dist/conversation.js.map +1 -0
  450. package/runtime/packages/protocol/dist/files.d.ts +93 -0
  451. package/runtime/packages/protocol/dist/files.js +44 -0
  452. package/runtime/packages/protocol/dist/files.js.map +1 -0
  453. package/runtime/packages/protocol/dist/goals.d.ts +204 -0
  454. package/runtime/packages/protocol/dist/goals.js +99 -0
  455. package/runtime/packages/protocol/dist/goals.js.map +1 -0
  456. package/runtime/packages/protocol/dist/index.d.ts +678 -0
  457. package/runtime/packages/protocol/dist/index.js +179 -0
  458. package/runtime/packages/protocol/dist/index.js.map +1 -0
  459. package/runtime/packages/protocol/dist/notifications.d.ts +50 -0
  460. package/runtime/packages/protocol/dist/notifications.js +15 -0
  461. package/runtime/packages/protocol/dist/notifications.js.map +1 -0
  462. package/runtime/packages/protocol/dist/onboarding.d.ts +17 -0
  463. package/runtime/packages/protocol/dist/onboarding.js +9 -0
  464. package/runtime/packages/protocol/dist/onboarding.js.map +1 -0
  465. package/runtime/packages/protocol/dist/providers.d.ts +292 -0
  466. package/runtime/packages/protocol/dist/providers.js +142 -0
  467. package/runtime/packages/protocol/dist/providers.js.map +1 -0
  468. package/runtime/packages/protocol/dist/self-hosted.d.ts +146 -0
  469. package/runtime/packages/protocol/dist/self-hosted.js +76 -0
  470. package/runtime/packages/protocol/dist/self-hosted.js.map +1 -0
  471. package/runtime/packages/protocol/dist/settings.d.ts +137 -0
  472. package/runtime/packages/protocol/dist/settings.js +80 -0
  473. package/runtime/packages/protocol/dist/settings.js.map +1 -0
  474. package/runtime/packages/protocol/dist/skills.d.ts +27 -0
  475. package/runtime/packages/protocol/dist/skills.js +2 -0
  476. package/runtime/packages/protocol/dist/skills.js.map +1 -0
  477. package/runtime/packages/protocol/dist/web.d.ts +47 -0
  478. package/runtime/packages/protocol/dist/web.js +13 -0
  479. package/runtime/packages/protocol/dist/web.js.map +1 -0
  480. package/runtime/packages/protocol/dist/workspace-files.d.ts +37 -0
  481. package/runtime/packages/protocol/dist/workspace-files.js +2 -0
  482. package/runtime/packages/protocol/dist/workspace-files.js.map +1 -0
  483. package/runtime/packages/protocol/package.json +23 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CodeGo AI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,67 @@
1
- # Temporary Holding Version
1
+ # Kooyu Web
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Run the Kooyu agent workbench in your browser, backed by a Host on your own computer.
4
+ Windows, macOS and Linux require Node.js **24.13.0 or later** and npm.
5
+
6
+ ```sh
7
+ npx kooyu@latest
8
+ ```
9
+
10
+ Or install globally:
11
+
12
+ ```sh
13
+ npm install -g kooyu
14
+ kooyu
15
+ ```
16
+
17
+ Open the address printed in the terminal, normally **http://127.0.0.1:4310**.
18
+ Keep the terminal running; press Ctrl+C to stop. The first-run guide configures your models.
19
+ Model services and third-party native harnesses require their own accounts or installations.
20
+ Installing Kooyu does not include a paid model subscription.
21
+
22
+ ```sh
23
+ kooyu --help
24
+ kooyu --version
25
+ kooyu start --port 4320 --data-dir ./kooyu-data
26
+ ```
27
+
28
+ Web pages and the Host are precompiled; users do not need the source repository, Electron or a frontend build.
29
+ Native dependencies install for the target platform. Unusual architectures may require native build tools.
30
+ The managed browser feature additionally needs Chromium:
31
+
32
+ ```sh
33
+ npx playwright@1.56.1 install chromium
34
+ ```
35
+
36
+ The default persistent data directory is shared with the existing Kooyu Host:
37
+
38
+ | System | Directory |
39
+ | ------- | -------------------------------------------- |
40
+ | Windows | `%LOCALAPPDATA%/Kodo/host` |
41
+ | macOS | `~/Library/Application Support/Kodo/host` |
42
+ | Linux | `${XDG_DATA_HOME:-~/.local/share}/Kodo/host` |
43
+
44
+ Only one Host can own a data directory at a time. Stop an existing desktop Host before starting
45
+ the npm Host, or use a different `--data-dir` and `--port` for a separate instance.
46
+ Updating or uninstalling the npm package does not remove this data.
47
+
48
+ Credentials use the operating system keyring by default. Headless Linux users should configure
49
+ the encrypted file vault as described in [self-hosted operations](https://github.com/sh2001sh/Kooyu/blob/main/docs/self-hosted-operations.md).
50
+ There is no plaintext credential fallback.
51
+
52
+ The listener defaults to the local computer. Remote HTTPS access requires `KODO_TLS_CERT`,
53
+ `KODO_TLS_KEY`, `KODO_PUBLIC_ORIGIN` and `--host`; use the documented pairing and access controls.
54
+
55
+ ## Updating
56
+
57
+ Stop Kooyu, then update and restart:
58
+
59
+ ```sh
60
+ npm install -g kooyu@latest
61
+ kooyu
62
+ ```
63
+
64
+ For one-off runs, use `npx kooyu@latest`. A preview channel, when published, is available with
65
+ `npx kooyu@next`. The npm edition does not install desktop EXE/DMG updates.
66
+
67
+ [Source and issues](https://github.com/sh2001sh/Kooyu) · MIT license.
package/bin/kooyu.mjs ADDED
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ import { readFile } from "node:fs/promises";
3
+ import { resolve } from "node:path";
4
+ import { parseArgs } from "node:util";
5
+
6
+ const pkg = JSON.parse(await readFile(new URL("../package.json", import.meta.url), "utf8"));
7
+ try {
8
+ const { values, positionals } = parseArgs({
9
+ allowPositionals: true,
10
+ options: {
11
+ help: { type: "boolean", short: "h" },
12
+ version: { type: "boolean", short: "v" },
13
+ port: { type: "string", short: "p" },
14
+ host: { type: "string" },
15
+ "data-dir": { type: "string" },
16
+ },
17
+ });
18
+ if (values.help) {
19
+ console.log(`Kooyu ${pkg.version} — local Web workbench
20
+
21
+ Usage: kooyu [start] [options]
22
+
23
+ -h, --help Show this help
24
+ -v, --version Show the installed version
25
+ -p, --port <port> Web port (default: 4310 or KODO_HOST_PORT)
26
+ --host <address> Bind address (default: 127.0.0.1 or KODO_BIND)
27
+ --data-dir <path> Persistent data directory (defaults to the existing Kooyu Host directory)
28
+
29
+ Open the URL printed on startup. Press Ctrl+C to stop.
30
+ Non-loopback binding requires KODO_TLS_CERT and KODO_TLS_KEY.
31
+ Update a global install with: npm install -g kooyu@latest
32
+ For a one-off run: npx kooyu@latest`);
33
+ } else if (values.version) {
34
+ console.log(pkg.version);
35
+ } else {
36
+ if (positionals.length > 1 || (positionals.length === 1 && positionals[0] !== "start"))
37
+ throw new Error("Unknown command. Use kooyu --help.");
38
+ const [major, minor] = process.versions.node.split(".").map(Number);
39
+ if (major < 24 || (major === 24 && minor < 13))
40
+ throw new Error(
41
+ "Kooyu requires Node.js >=24.13.0. Install a supported Node.js version first.",
42
+ );
43
+ const port = values.port ?? process.env.KODO_HOST_PORT ?? "4310";
44
+ if (!/^\d+$/.test(port) || Number(port) < 1 || Number(port) > 65535)
45
+ throw new Error("Port must be an integer between 1 and 65535.");
46
+ process.env.KODO_HOST_PORT = port;
47
+ if (values.host) process.env.KODO_BIND = values.host;
48
+ if (values["data-dir"]) process.env.KODO_DATA_DIR = resolve(values["data-dir"]);
49
+ process.env.KOOYU_DISTRIBUTION = "npm";
50
+ process.env.KOOYU_APP_VERSION = pkg.version;
51
+ await import("../runtime/packages/host/dist/main.js");
52
+ }
53
+ } catch (error) {
54
+ console.error(`Kooyu: ${error instanceof Error ? error.message : String(error)}`);
55
+ process.exitCode = 1;
56
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CodeGo AI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,4 @@
1
+ /** Preserve the existing data identity across application renames and launchers. */
2
+ export declare function hostDataDirectory(platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv, home?: string): string;
3
+ /** GUI apps often do not inherit the interactive terminal's tool search path. */
4
+ export declare function hostEnvironment(env: NodeJS.ProcessEnv, platform?: NodeJS.Platform): NodeJS.ProcessEnv;
@@ -0,0 +1,26 @@
1
+ import { homedir } from "node:os";
2
+ import { join, resolve } from "node:path";
3
+ /** Preserve the existing data identity across application renames and launchers. */
4
+ export function hostDataDirectory(platform = process.platform, env = process.env, home = homedir()) {
5
+ if (env.KODO_DATA_DIR)
6
+ return resolve(env.KODO_DATA_DIR);
7
+ const base = platform === "win32"
8
+ ? (env.LOCALAPPDATA ?? join(home, "AppData", "Local"))
9
+ : platform === "darwin"
10
+ ? join(home, "Library", "Application Support")
11
+ : (env.XDG_DATA_HOME ?? join(home, ".local", "share"));
12
+ return join(base, "Kodo", "host");
13
+ }
14
+ /** GUI apps often do not inherit the interactive terminal's tool search path. */
15
+ export function hostEnvironment(env, platform = process.platform) {
16
+ const result = { ...env };
17
+ delete result.ELECTRON_RUN_AS_NODE;
18
+ if (platform === "darwin") {
19
+ const entries = (env.PATH ?? "").split(":").filter(Boolean);
20
+ result.PATH = [
21
+ ...new Set([...entries, "/opt/homebrew/bin", "/usr/local/bin", "/usr/bin", "/bin"]),
22
+ ].join(":");
23
+ }
24
+ return result;
25
+ }
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,oFAAoF;AACpF,MAAM,UAAU,iBAAiB,CAC/B,QAAQ,GAAG,OAAO,CAAC,QAAQ,EAC3B,MAAyB,OAAO,CAAC,GAAG,EACpC,IAAI,GAAG,OAAO,EAAE;IAEhB,IAAI,GAAG,CAAC,aAAa;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IACzD,MAAM,IAAI,GACR,QAAQ,KAAK,OAAO;QAClB,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QACtD,CAAC,CAAC,QAAQ,KAAK,QAAQ;YACrB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,qBAAqB,CAAC;YAC9C,CAAC,CAAC,CAAC,GAAG,CAAC,aAAa,IAAI,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IAC7D,OAAO,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,eAAe,CAC7B,GAAsB,EACtB,QAAQ,GAAG,OAAO,CAAC,QAAQ;IAE3B,MAAM,MAAM,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC;IAC1B,OAAO,MAAM,CAAC,oBAAoB,CAAC;IACnC,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC1B,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC5D,MAAM,CAAC,IAAI,GAAG;YACZ,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;SACpF,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACd,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "@kodo/platform",
3
+ "version": "0.0.0",
4
+ "type": "module",
5
+ "exports": {
6
+ ".": {
7
+ "types": "./dist/index.d.ts",
8
+ "import": "./dist/index.js"
9
+ }
10
+ },
11
+ "license": "MIT",
12
+ "files": [
13
+ "dist",
14
+ "LICENSE"
15
+ ]
16
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CodeGo AI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,26 @@
1
+ /** Native task state, shared by the desktop and paired clients. */
2
+ export interface TodoItem {
3
+ id: string;
4
+ text: string;
5
+ status: "pending" | "in_progress" | "completed" | "cancelled" | "blocked" | "unknown";
6
+ priority?: string;
7
+ }
8
+ export interface TodoList {
9
+ items: TodoItem[];
10
+ explanation?: string;
11
+ updatedAt: string;
12
+ }
13
+ export interface AgentSummary {
14
+ agentId: string;
15
+ parentAgentId?: string;
16
+ name?: string;
17
+ status?: string;
18
+ updatedAt: string;
19
+ todos?: TodoList;
20
+ }
21
+ export interface SessionActivity {
22
+ sessionId: string;
23
+ cursor: number;
24
+ todos?: TodoList;
25
+ agents: AgentSummary[];
26
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=activity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity.js","sourceRoot":"","sources":["../src/activity.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ /** Presentation only: never changes the model's stored message or future context. */
2
+ export interface AssistantContent {
3
+ text: string;
4
+ thinking: string;
5
+ }
6
+ export declare function isThinkingChannel(value: unknown): boolean;
7
+ /** Only leading protocol wrappers are interpreted; quoted examples/code stay literal. */
8
+ export declare function splitAssistantText(text: string): AssistantContent;
9
+ /** Separate native reasoning blocks/channels and relay wrappers from answer text. */
10
+ export declare function assistantContent(payload: unknown): AssistantContent;
@@ -0,0 +1,77 @@
1
+ export function isThinkingChannel(value) {
2
+ return (value === "thought" || value === "analysis" || value === "reasoning" || value === "thinking");
3
+ }
4
+ /** Only leading protocol wrappers are interpreted; quoted examples/code stay literal. */
5
+ export function splitAssistantText(text) {
6
+ let rest = text.trimStart();
7
+ const thoughts = [];
8
+ let wrapped = false;
9
+ while (true) {
10
+ const open = /^<(analysis|think|thinking)>/i.exec(rest);
11
+ if (!open)
12
+ break;
13
+ wrapped = true;
14
+ rest = rest.slice(open[0].length);
15
+ const close = new RegExp(`</${open[1]}>`, "i").exec(rest);
16
+ if (!close)
17
+ return { text: "", thinking: [...thoughts, rest].filter(Boolean).join("\n\n") };
18
+ thoughts.push(rest.slice(0, close.index).trim());
19
+ rest = rest.slice(close.index + close[0].length).trimStart();
20
+ }
21
+ // A streamed opening tag may span events. Do not flash it as an answer.
22
+ const opening = rest.toLowerCase();
23
+ if (opening.startsWith("<") &&
24
+ ["<analysis>", "<think>", "<thinking>", "<final>"].some((tag) => tag.startsWith(opening)))
25
+ return { text: "", thinking: thoughts.filter(Boolean).join("\n\n") };
26
+ if (/^<final>/i.test(rest)) {
27
+ wrapped = true;
28
+ rest = rest.replace(/^<final>/i, "").replace(/<\/final>\s*$/i, "");
29
+ const tagStart = rest.lastIndexOf("<");
30
+ if (tagStart >= 0 && "</final>".startsWith(rest.slice(tagStart).toLowerCase()))
31
+ rest = rest.slice(0, tagStart);
32
+ }
33
+ return { text: wrapped ? rest.trim() : text, thinking: thoughts.filter(Boolean).join("\n\n") };
34
+ }
35
+ /** Separate native reasoning blocks/channels and relay wrappers from answer text. */
36
+ export function assistantContent(payload) {
37
+ if (typeof payload === "string")
38
+ return splitAssistantText(payload);
39
+ if (!payload || typeof payload !== "object")
40
+ return { text: "", thinking: "" };
41
+ const p = payload;
42
+ if (p.message && p.text === undefined && p.content === undefined)
43
+ return assistantContent(p.message);
44
+ const thoughts = [];
45
+ const text = typeof p.text === "string"
46
+ ? p.text
47
+ : typeof p.content === "string"
48
+ ? p.content
49
+ : Array.isArray(p.content)
50
+ ? p.content
51
+ .flatMap((block) => {
52
+ if (!block || typeof block !== "object")
53
+ return [];
54
+ if (isThinkingChannel(block.type) || isThinkingChannel(block.channel)) {
55
+ const value = block.thinking ?? block.text;
56
+ if (typeof value === "string")
57
+ thoughts.push(value);
58
+ return [];
59
+ }
60
+ return ["text", "output_text"].includes(block.type) &&
61
+ typeof block.text === "string"
62
+ ? [block.text]
63
+ : [];
64
+ })
65
+ .join("\n")
66
+ : "";
67
+ if (typeof p.reasoning_content === "string")
68
+ thoughts.push(p.reasoning_content);
69
+ if (isThinkingChannel(p.channel) || isThinkingChannel(p.type))
70
+ return {
71
+ text: "",
72
+ thinking: [...thoughts, text || p.thinking || ""].filter(Boolean).join("\n\n"),
73
+ };
74
+ const split = splitAssistantText(text);
75
+ return { text: split.text, thinking: [...thoughts, split.thinking].filter(Boolean).join("\n\n") };
76
+ }
77
+ //# sourceMappingURL=assistant-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistant-content.js","sourceRoot":"","sources":["../src/assistant-content.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,OAAO,CACL,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,UAAU,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,UAAU,CAC7F,CAAC;AACJ,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;IAC5B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,IAAI,GAAG,+BAA+B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxD,IAAI,CAAC,IAAI;YAAE,MAAM;QACjB,OAAO,GAAG,IAAI,CAAC;QACf,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QAClC,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAI,CAAC,KAAK;YAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,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./self-hosted.js";
2
+ export type AutomationTrigger = AutomationInput["trigger"];
3
+ export type ScheduleMode = "once" | "daily" | "weekdays" | "weekly" | "monthly" | "interval" | "custom" | "webhook";
4
+ export interface ScheduleEditorValue {
5
+ mode: ScheduleMode;
6
+ time: string;
7
+ date: string;
8
+ weekdays: number[];
9
+ dayOfMonth: number;
10
+ every: number;
11
+ unit: "minutes" | "hours" | "days";
12
+ startAt: string;
13
+ expression: string;
14
+ legacyOnce?: string;
15
+ }
16
+ export declare function scheduleEditorValue(trigger?: AutomationTrigger): ScheduleEditorValue;
17
+ export declare function editorTrigger(v: ScheduleEditorValue): AutomationTrigger;
18
+ export declare function describeAutomationSchedule(trigger: AutomationTrigger): string;
@@ -0,0 +1,98 @@
1
+ export function scheduleEditorValue(trigger) {
2
+ const today = new Date();
3
+ const value = {
4
+ mode: "daily",
5
+ time: "09:00",
6
+ date: `${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, "0")}-${String(today.getDate()).padStart(2, "0")}`,
7
+ weekdays: [1],
8
+ dayOfMonth: 1,
9
+ every: 1,
10
+ unit: "hours",
11
+ startAt: "",
12
+ expression: "0 9 * * 1",
13
+ };
14
+ if (!trigger)
15
+ return value;
16
+ if (trigger.kind === "calendar")
17
+ return {
18
+ ...value,
19
+ mode: trigger.frequency,
20
+ time: trigger.time,
21
+ date: trigger.date ?? value.date,
22
+ weekdays: trigger.weekdays ?? [1],
23
+ dayOfMonth: trigger.dayOfMonth ?? 1,
24
+ };
25
+ if (trigger.kind === "interval")
26
+ return { ...value, ...trigger, mode: "interval" };
27
+ if (trigger.kind === "once")
28
+ return { ...value, mode: "once", legacyOnce: trigger.at };
29
+ if (trigger.kind === "webhook")
30
+ return { ...value, mode: "webhook" };
31
+ const [minute, hour, day, month, week, ...extra] = trigger.expression.trim().split(/\s+/);
32
+ if (!extra.length && /^\d+$/.test(minute) && /^\d+$/.test(hour) && month === "*") {
33
+ value.time = `${hour.padStart(2, "0")}:${minute.padStart(2, "0")}`;
34
+ if (day === "*") {
35
+ if (week === "*")
36
+ return value;
37
+ if (week === "1-5")
38
+ return { ...value, mode: "weekdays" };
39
+ if (/^[0-7](,[0-7])*$/.test(week))
40
+ return {
41
+ ...value,
42
+ mode: "weekly",
43
+ weekdays: [
44
+ ...new Set(week
45
+ .split(",")
46
+ .map(Number)
47
+ .map((n) => n % 7)),
48
+ ],
49
+ };
50
+ }
51
+ else if (week === "*" && /^\d+$/.test(day))
52
+ return { ...value, mode: "monthly", dayOfMonth: Number(day) };
53
+ }
54
+ return { ...value, mode: "custom", expression: trigger.expression };
55
+ }
56
+ export function editorTrigger(v) {
57
+ if (v.mode === "custom")
58
+ return { kind: "cron", expression: v.expression };
59
+ if (v.mode === "webhook")
60
+ return { kind: "webhook" };
61
+ if (v.mode === "interval") {
62
+ if (!Number.isInteger(v.every) || v.every < 1 || v.every > 525600)
63
+ throw Error("执行间隔须为 1 至 525600 的整数。");
64
+ return {
65
+ kind: "interval",
66
+ every: v.every,
67
+ unit: v.unit,
68
+ startAt: v.startAt ||
69
+ new Date(Date.now() + v.every * { minutes: 60000, hours: 3600000, days: 86400000 }[v.unit]).toISOString(),
70
+ };
71
+ }
72
+ if (v.mode === "once" && v.legacyOnce)
73
+ return { kind: "once", at: v.legacyOnce };
74
+ if (v.mode === "weekly" && !v.weekdays.length)
75
+ throw Error("请至少选择一天。");
76
+ return {
77
+ kind: "calendar",
78
+ frequency: v.mode,
79
+ time: v.time,
80
+ ...(v.mode === "once" ? { date: v.date } : {}),
81
+ ...(v.mode === "weekly" ? { weekdays: v.weekdays } : {}),
82
+ ...(v.mode === "monthly" ? { dayOfMonth: v.dayOfMonth } : {}),
83
+ };
84
+ }
85
+ export function describeAutomationSchedule(trigger) {
86
+ if (trigger.kind === "interval")
87
+ return `每隔 ${trigger.every} ${{ minutes: "分钟", hours: "小时", days: "天" }[trigger.unit]}`;
88
+ if (trigger.kind === "once")
89
+ return new Date(trigger.at).toLocaleString();
90
+ const v = scheduleEditorValue(trigger);
91
+ if (v.mode === "webhook")
92
+ return "收到事件时执行";
93
+ if (v.mode === "custom")
94
+ return "自定义时间规则";
95
+ const days = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
96
+ return `${v.mode === "once" ? v.date : v.mode === "daily" ? "每天" : v.mode === "weekdays" ? "每个工作日" : v.mode === "weekly" ? `每${v.weekdays.map((d) => days[d]).join("、")}` : `每月 ${v.dayOfMonth} 日`} ${v.time}`;
97
+ }
98
+ //# sourceMappingURL=automation-schedule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automation-schedule.js","sourceRoot":"","sources":["../src/automation-schedule.ts"],"names":[],"mappings":"AAgBA,MAAM,UAAU,mBAAmB,CAAC,OAA2B;IAC7D,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;IACzB,MAAM,KAAK,GAAwB;QACjC,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,GAAG,KAAK,CAAC,WAAW,EAAE,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;QAC3H,QAAQ,EAAE,CAAC,CAAC,CAAC;QACb,UAAU,EAAE,CAAC;QACb,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,EAAE;QACX,UAAU,EAAE,WAAW;KACxB,CAAC;IACF,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU;QAC7B,OAAO;YACL,GAAG,KAAK;YACR,IAAI,EAAE,OAAO,CAAC,SAAS;YACvB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI;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E,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;IAC1F,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,cAAc,EAAE,CAAC;IAC1E,MAAM,CAAC,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACvC,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC3C,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACxD,OAAO,GAAG,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;AACjN,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { EndpointProtocol, ModelParameters } from "./providers.js";
2
+ export { assistantContent, isThinkingChannel, splitAssistantText } from "./assistant-content.js";
3
+ export declare const NATIVE_HARNESS_IDS: readonly ["pi", "codex", "claude-code", "deepseek-harness", "zcode", "opencode", "gemini", "cursor", "kimi-code", "grok-build"];
4
+ export declare const HARNESS_IDS: readonly ["kodo", "pi", "codex", "claude-code", "deepseek-harness", "zcode", "opencode", "gemini", "cursor", "kimi-code", "grok-build"];
5
+ export declare const PROTOCOL_VERSION = 2;
6
+ /** Native custom-provider entry points; installation and login are checked separately. */
7
+ export declare const HARNESS_PROVIDER_PROTOCOLS: Record<(typeof HARNESS_IDS)[number], readonly EndpointProtocol[]>;
8
+ /** Only declared choices; SDK and browser menus share the same binding rules. */
9
+ export declare function bindingReasoningLevels(p: ModelParameters, harness?: (typeof HARNESS_IDS)[number]): string[] | undefined;
10
+ /** Keep the SDK's internal off level distinct from the wire value none. */
11
+ export declare function bindingThinkingLevelMap(p: ModelParameters): NonNullable<ModelParameters["thinkingLevelMap"]>;
@@ -0,0 +1,75 @@
1
+ export { assistantContent, isThinkingChannel, splitAssistantText } from "./assistant-content.js";
2
+ // Browser-safe constants/helpers: clients do not ship Host validation schemas.
3
+ export const NATIVE_HARNESS_IDS = [
4
+ "pi",
5
+ "codex",
6
+ "claude-code",
7
+ "deepseek-harness",
8
+ "zcode",
9
+ "opencode",
10
+ "gemini",
11
+ "cursor",
12
+ "kimi-code",
13
+ "grok-build",
14
+ ];
15
+ // Kodo is the product agent. Its use of the pi SDK does not make it the pi harness.
16
+ export const HARNESS_IDS = ["kodo", ...NATIVE_HARNESS_IDS];
17
+ export const PROTOCOL_VERSION = 2;
18
+ /** Native custom-provider entry points; installation and login are checked separately. */
19
+ export const HARNESS_PROVIDER_PROTOCOLS = {
20
+ kodo: ["openai-completions", "openai-responses", "anthropic-messages", "google-generative-ai"],
21
+ pi: ["openai-completions", "openai-responses", "anthropic-messages", "google-generative-ai"],
22
+ codex: ["openai-responses"],
23
+ "claude-code": ["anthropic-messages"],
24
+ "deepseek-harness": ["openai-completions", "openai-responses", "anthropic-messages"],
25
+ zcode: ["openai-completions", "openai-responses", "anthropic-messages"],
26
+ opencode: ["openai-completions", "openai-responses", "anthropic-messages"],
27
+ gemini: ["google-generative-ai"],
28
+ cursor: [],
29
+ "kimi-code": [
30
+ "openai-completions",
31
+ "openai-responses",
32
+ "anthropic-messages",
33
+ "google-generative-ai",
34
+ ],
35
+ "grok-build": ["openai-completions", "openai-responses", "anthropic-messages"],
36
+ };
37
+ /** Only declared choices; SDK and browser menus share the same binding rules. */
38
+ export function bindingReasoningLevels(p, harness) {
39
+ const sdk = harness === "pi" || harness === "kodo" || harness === "deepseek-harness";
40
+ if (p.reasoning === false)
41
+ return sdk ? ["off"] : [];
42
+ if (sdk && p.thinkingLevelMap)
43
+ return Object.entries(p.thinkingLevelMap)
44
+ .filter(([, v]) => v !== null)
45
+ .map(([k]) => k);
46
+ const options = p.reasoningOptions?.filter((o) => o.type === "effort");
47
+ if (!options?.length)
48
+ return undefined;
49
+ const declared = [...new Set(options.flatMap((o) => o.values))];
50
+ if (harness === "gemini")
51
+ return declared.filter((v) => ["minimal", "low", "medium", "high"].includes(v));
52
+ if (harness === "grok-build")
53
+ return declared.filter((v) => ["none", "minimal", "low", "medium", "high", "xhigh", "max"].includes(v));
54
+ return sdk
55
+ ? [...new Set(declared.map((v) => (v === "none" ? "off" : v)))].filter((v) => ["off", "minimal", "low", "medium", "high", "xhigh", "max"].includes(v))
56
+ : harness === "zcode"
57
+ ? [...new Set(declared.map((v) => (v === "none" || v === "off" ? "disabled" : v)))]
58
+ : declared;
59
+ }
60
+ /** Keep the SDK's internal off level distinct from the wire value none. */
61
+ export function bindingThinkingLevelMap(p) {
62
+ const levels = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
63
+ const declared = p.reasoningOptions?.flatMap((option) => (option.type === "effort" ? option.values : [])) ?? [];
64
+ return Object.fromEntries(levels.map((level) => [
65
+ level,
66
+ p.thinkingLevelMap
67
+ ? (p.thinkingLevelMap[level] ?? null)
68
+ : level === "off" && declared.includes("none")
69
+ ? "none"
70
+ : declared.includes(level)
71
+ ? level
72
+ : null,
73
+ ]));
74
+ }
75
+ //# sourceMappingURL=client.js.map
@@ -0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