@levelcode/sdk 0.2.4 → 0.2.6

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 (309) hide show
  1. package/dist/index.cjs +27116 -26367
  2. package/dist/index.cjs.map +38 -32
  3. package/dist/index.d.ts +3802 -0
  4. package/dist/index.mjs +6319 -5571
  5. package/dist/index.mjs.map +38 -32
  6. package/package.json +1 -1
  7. package/dist/agents/constants.d.ts +0 -1
  8. package/dist/agents/team/apprentice.d.ts +0 -3
  9. package/dist/agents/team/coordinator.d.ts +0 -3
  10. package/dist/agents/team/cto.d.ts +0 -3
  11. package/dist/agents/team/designer.d.ts +0 -3
  12. package/dist/agents/team/director.d.ts +0 -3
  13. package/dist/agents/team/distinguished-engineer.d.ts +0 -3
  14. package/dist/agents/team/fellow.d.ts +0 -3
  15. package/dist/agents/team/index.d.ts +0 -27
  16. package/dist/agents/team/intern.d.ts +0 -3
  17. package/dist/agents/team/junior-engineer.d.ts +0 -3
  18. package/dist/agents/team/manager.d.ts +0 -3
  19. package/dist/agents/team/mid-level-engineer.d.ts +0 -3
  20. package/dist/agents/team/principal-engineer.d.ts +0 -3
  21. package/dist/agents/team/product-lead.d.ts +0 -3
  22. package/dist/agents/team/researcher.d.ts +0 -3
  23. package/dist/agents/team/role-hierarchy.d.ts +0 -24
  24. package/dist/agents/team/scientist.d.ts +0 -3
  25. package/dist/agents/team/senior-engineer.d.ts +0 -3
  26. package/dist/agents/team/senior-staff-engineer.d.ts +0 -3
  27. package/dist/agents/team/staff-engineer.d.ts +0 -3
  28. package/dist/agents/team/sub-manager.d.ts +0 -3
  29. package/dist/agents/team/tester.d.ts +0 -3
  30. package/dist/agents/team/vp-engineering.d.ts +0 -3
  31. package/dist/agents/types/agent-definition.d.ts +0 -296
  32. package/dist/agents/types/secret-agent-definition.d.ts +0 -19
  33. package/dist/agents/types/tools.d.ts +0 -308
  34. package/dist/agents/types/util-types.d.ts +0 -134
  35. package/dist/common/src/actions.d.ts +0 -176
  36. package/dist/common/src/analytics-core.d.ts +0 -52
  37. package/dist/common/src/analytics.d.ts +0 -9
  38. package/dist/common/src/browser-actions.d.ts +0 -1200
  39. package/dist/common/src/constants/agents.d.ts +0 -47
  40. package/dist/common/src/constants/analytics-events.d.ts +0 -111
  41. package/dist/common/src/constants/byok.d.ts +0 -2
  42. package/dist/common/src/constants/claude-oauth.d.ts +0 -36
  43. package/dist/common/src/constants/index.d.ts +0 -4
  44. package/dist/common/src/constants/knowledge.d.ts +0 -21
  45. package/dist/common/src/constants/limits.d.ts +0 -14
  46. package/dist/common/src/constants/model-config.d.ts +0 -117
  47. package/dist/common/src/constants/paths.d.ts +0 -23
  48. package/dist/common/src/constants/skills.d.ts +0 -42
  49. package/dist/common/src/constants/ui.d.ts +0 -14
  50. package/dist/common/src/env-ci.d.ts +0 -22
  51. package/dist/common/src/env-process.d.ts +0 -28
  52. package/dist/common/src/env-schema.d.ts +0 -24
  53. package/dist/common/src/env.d.ts +0 -16
  54. package/dist/common/src/mcp/client.d.ts +0 -6
  55. package/dist/common/src/old-constants.d.ts +0 -10
  56. package/dist/common/src/project-file-tree.d.ts +0 -27
  57. package/dist/common/src/templates/agent-validation.d.ts +0 -48
  58. package/dist/common/src/templates/initial-agents-dir/types/agent-definition.d.ts +0 -296
  59. package/dist/common/src/templates/initial-agents-dir/types/tools.d.ts +0 -308
  60. package/dist/common/src/templates/initial-agents-dir/types/util-types.d.ts +0 -128
  61. package/dist/common/src/testing/errors.d.ts +0 -14
  62. package/dist/common/src/testing/mock-modules.d.ts +0 -11
  63. package/dist/common/src/testing/mock-types.d.ts +0 -97
  64. package/dist/common/src/testing/mocks/analytics.d.ts +0 -182
  65. package/dist/common/src/testing/mocks/child-process.d.ts +0 -29
  66. package/dist/common/src/testing/mocks/crypto.d.ts +0 -159
  67. package/dist/common/src/testing/mocks/database.d.ts +0 -197
  68. package/dist/common/src/testing/mocks/fetch.d.ts +0 -35
  69. package/dist/common/src/testing/mocks/filesystem.d.ts +0 -31
  70. package/dist/common/src/testing/mocks/index.d.ts +0 -25
  71. package/dist/common/src/testing/mocks/logger.d.ts +0 -35
  72. package/dist/common/src/testing/mocks/stream.d.ts +0 -203
  73. package/dist/common/src/testing/mocks/timers.d.ts +0 -27
  74. package/dist/common/src/testing/mocks/tree-sitter.d.ts +0 -58
  75. package/dist/common/src/testing-env-process.d.ts +0 -7
  76. package/dist/common/src/tools/constants.d.ts +0 -17
  77. package/dist/common/src/tools/list.d.ts +0 -1152
  78. package/dist/common/src/tools/params/tool/add-message.d.ts +0 -19
  79. package/dist/common/src/tools/params/tool/add-subgoal.d.ts +0 -26
  80. package/dist/common/src/tools/params/tool/ask-user.d.ts +0 -59
  81. package/dist/common/src/tools/params/tool/browser-logs.d.ts +0 -127
  82. package/dist/common/src/tools/params/tool/code-search.d.ts +0 -30
  83. package/dist/common/src/tools/params/tool/create-plan.d.ts +0 -30
  84. package/dist/common/src/tools/params/tool/end-turn.d.ts +0 -13
  85. package/dist/common/src/tools/params/tool/find-files.d.ts +0 -31
  86. package/dist/common/src/tools/params/tool/glob.d.ts +0 -26
  87. package/dist/common/src/tools/params/tool/list-directory.d.ts +0 -25
  88. package/dist/common/src/tools/params/tool/lookup-agent-info.d.ts +0 -13
  89. package/dist/common/src/tools/params/tool/propose-str-replace.d.ts +0 -40
  90. package/dist/common/src/tools/params/tool/propose-write-file.d.ts +0 -29
  91. package/dist/common/src/tools/params/tool/read-docs.d.ts +0 -19
  92. package/dist/common/src/tools/params/tool/read-files.d.ts +0 -35
  93. package/dist/common/src/tools/params/tool/read-subtree.d.ts +0 -40
  94. package/dist/common/src/tools/params/tool/run-file-change-hooks.d.ts +0 -63
  95. package/dist/common/src/tools/params/tool/run-terminal-command.d.ts +0 -88
  96. package/dist/common/src/tools/params/tool/send-message.d.ts +0 -26
  97. package/dist/common/src/tools/params/tool/set-messages.d.ts +0 -15
  98. package/dist/common/src/tools/params/tool/set-output.d.ts +0 -15
  99. package/dist/common/src/tools/params/tool/skill.d.ts +0 -28
  100. package/dist/common/src/tools/params/tool/spawn-agent-inline.d.ts +0 -17
  101. package/dist/common/src/tools/params/tool/spawn-agents.d.ts +0 -26
  102. package/dist/common/src/tools/params/tool/str-replace.d.ts +0 -43
  103. package/dist/common/src/tools/params/tool/suggest-followups.d.ts +0 -26
  104. package/dist/common/src/tools/params/tool/task-completed.d.ts +0 -13
  105. package/dist/common/src/tools/params/tool/task-create.d.ts +0 -24
  106. package/dist/common/src/tools/params/tool/task-get.d.ts +0 -15
  107. package/dist/common/src/tools/params/tool/task-list.d.ts +0 -13
  108. package/dist/common/src/tools/params/tool/task-update.d.ts +0 -29
  109. package/dist/common/src/tools/params/tool/team-create.d.ts +0 -17
  110. package/dist/common/src/tools/params/tool/team-delete.d.ts +0 -13
  111. package/dist/common/src/tools/params/tool/think-deeply.d.ts +0 -15
  112. package/dist/common/src/tools/params/tool/update-subgoal.d.ts +0 -25
  113. package/dist/common/src/tools/params/tool/web-search.d.ts +0 -25
  114. package/dist/common/src/tools/params/tool/write-file.d.ts +0 -31
  115. package/dist/common/src/tools/params/tool/write-todos.d.ts +0 -18
  116. package/dist/common/src/tools/params/utils.d.ts +0 -35
  117. package/dist/common/src/tools/utils.d.ts +0 -4
  118. package/dist/common/src/types/agent-template.d.ts +0 -156
  119. package/dist/common/src/types/contracts/agent-runtime.d.ts +0 -36
  120. package/dist/common/src/types/contracts/analytics.d.ts +0 -8
  121. package/dist/common/src/types/contracts/billing.d.ts +0 -40
  122. package/dist/common/src/types/contracts/client.d.ts +0 -45
  123. package/dist/common/src/types/contracts/database.d.ts +0 -80
  124. package/dist/common/src/types/contracts/env.d.ts +0 -150
  125. package/dist/common/src/types/contracts/llm.d.ts +0 -102
  126. package/dist/common/src/types/contracts/logger.d.ts +0 -8
  127. package/dist/common/src/types/dynamic-agent-template.d.ts +0 -227
  128. package/dist/common/src/types/filesystem.d.ts +0 -6
  129. package/dist/common/src/types/function-params.d.ts +0 -15
  130. package/dist/common/src/types/grant.d.ts +0 -2
  131. package/dist/common/src/types/json.d.ts +0 -9
  132. package/dist/common/src/types/mcp.d.ts +0 -31
  133. package/dist/common/src/types/messages/content-part.d.ts +0 -46
  134. package/dist/common/src/types/messages/data-content.d.ts +0 -3
  135. package/dist/common/src/types/messages/levelcode-message.d.ts +0 -37
  136. package/dist/common/src/types/messages/provider-metadata.d.ts +0 -3
  137. package/dist/common/src/types/print-mode.d.ts +0 -155
  138. package/dist/common/src/types/session-state.d.ts +0 -94
  139. package/dist/common/src/types/skill.d.ts +0 -31
  140. package/dist/common/src/types/source.d.ts +0 -8
  141. package/dist/common/src/types/spawn.d.ts +0 -8
  142. package/dist/common/src/types/team-config-schemas.d.ts +0 -217
  143. package/dist/common/src/types/team-config.d.ts +0 -42
  144. package/dist/common/src/types/team-hook-events.d.ts +0 -36
  145. package/dist/common/src/types/team-protocol.d.ts +0 -64
  146. package/dist/common/src/util/agent-id-parsing.d.ts +0 -22
  147. package/dist/common/src/util/agent-name-normalization.d.ts +0 -12
  148. package/dist/common/src/util/array.d.ts +0 -6
  149. package/dist/common/src/util/credentials.d.ts +0 -11
  150. package/dist/common/src/util/error.d.ts +0 -128
  151. package/dist/common/src/util/file.d.ts +0 -133
  152. package/dist/common/src/util/format-code-search.d.ts +0 -16
  153. package/dist/common/src/util/lru-cache.d.ts +0 -30
  154. package/dist/common/src/util/messages.d.ts +0 -46
  155. package/dist/common/src/util/model-utils.d.ts +0 -8
  156. package/dist/common/src/util/object.d.ts +0 -22
  157. package/dist/common/src/util/promise.d.ts +0 -16
  158. package/dist/common/src/util/random.d.ts +0 -1
  159. package/dist/common/src/util/skills.d.ts +0 -5
  160. package/dist/common/src/util/stop-sequence.d.ts +0 -14
  161. package/dist/common/src/util/string.d.ts +0 -82
  162. package/dist/common/src/util/xml.d.ts +0 -12
  163. package/dist/common/src/util/zod-schema.d.ts +0 -5
  164. package/dist/common/src/utils/dev-phases.d.ts +0 -23
  165. package/dist/common/src/utils/file-lock.d.ts +0 -13
  166. package/dist/common/src/utils/team-analytics.d.ts +0 -16
  167. package/dist/common/src/utils/team-discovery.d.ts +0 -47
  168. package/dist/common/src/utils/team-fs.d.ts +0 -20
  169. package/dist/common/src/utils/team-hook-emitter.d.ts +0 -40
  170. package/dist/common/src/utils/team-presets.d.ts +0 -35
  171. package/dist/packages/agent-runtime/src/constants.d.ts +0 -1
  172. package/dist/packages/agent-runtime/src/fast-rewrite.d.ts +0 -45
  173. package/dist/packages/agent-runtime/src/find-files/request-files-prompt.d.ts +0 -71
  174. package/dist/packages/agent-runtime/src/generate-diffs-prompt.d.ts +0 -53
  175. package/dist/packages/agent-runtime/src/get-file-reading-updates.d.ts +0 -8
  176. package/dist/packages/agent-runtime/src/inbox-poller.d.ts +0 -81
  177. package/dist/packages/agent-runtime/src/llm-api/claude.d.ts +0 -5
  178. package/dist/packages/agent-runtime/src/llm-api/context7-api.d.ts +0 -55
  179. package/dist/packages/agent-runtime/src/llm-api/gemini-with-fallbacks.d.ts +0 -40
  180. package/dist/packages/agent-runtime/src/llm-api/levelcode-web-api.d.ts +0 -49
  181. package/dist/packages/agent-runtime/src/llm-api/relace-api.d.ts +0 -16
  182. package/dist/packages/agent-runtime/src/main-prompt.d.ts +0 -29
  183. package/dist/packages/agent-runtime/src/mcp-constants.d.ts +0 -12
  184. package/dist/packages/agent-runtime/src/mcp.d.ts +0 -10
  185. package/dist/packages/agent-runtime/src/message-formatter.d.ts +0 -12
  186. package/dist/packages/agent-runtime/src/process-file-block.d.ts +0 -56
  187. package/dist/packages/agent-runtime/src/process-str-replace.d.ts +0 -21
  188. package/dist/packages/agent-runtime/src/prompt-agent-stream.d.ts +0 -28
  189. package/dist/packages/agent-runtime/src/run-agent-step.d.ts +0 -73
  190. package/dist/packages/agent-runtime/src/run-programmatic-step.d.ts +0 -40
  191. package/dist/packages/agent-runtime/src/system-prompt/prompts.d.ts +0 -19
  192. package/dist/packages/agent-runtime/src/system-prompt/search-system-prompt.d.ts +0 -14
  193. package/dist/packages/agent-runtime/src/system-prompt/team-context-prompt.d.ts +0 -9
  194. package/dist/packages/agent-runtime/src/system-prompt/team-prompt.d.ts +0 -9
  195. package/dist/packages/agent-runtime/src/system-prompt/truncate-file-tree.d.ts +0 -13
  196. package/dist/packages/agent-runtime/src/team-context.d.ts +0 -14
  197. package/dist/packages/agent-runtime/src/templates/agent-registry.d.ts +0 -35
  198. package/dist/packages/agent-runtime/src/templates/prompts.d.ts +0 -35
  199. package/dist/packages/agent-runtime/src/templates/strings.d.ts +0 -32
  200. package/dist/packages/agent-runtime/src/templates/types.d.ts +0 -13
  201. package/dist/packages/agent-runtime/src/tool-stream-parser.d.ts +0 -31
  202. package/dist/packages/agent-runtime/src/tools/handlers/handler-function-type.d.ts +0 -51
  203. package/dist/packages/agent-runtime/src/tools/handlers/list.d.ts +0 -370
  204. package/dist/packages/agent-runtime/src/tools/handlers/tool/add-message.d.ts +0 -9
  205. package/dist/packages/agent-runtime/src/tools/handlers/tool/add-subgoal.d.ts +0 -9
  206. package/dist/packages/agent-runtime/src/tools/handlers/tool/ask-user.d.ts +0 -10
  207. package/dist/packages/agent-runtime/src/tools/handlers/tool/browser-logs.d.ts +0 -8
  208. package/dist/packages/agent-runtime/src/tools/handlers/tool/code-search.d.ts +0 -8
  209. package/dist/packages/agent-runtime/src/tools/handlers/tool/create-plan.d.ts +0 -13
  210. package/dist/packages/agent-runtime/src/tools/handlers/tool/end-turn.d.ts +0 -7
  211. package/dist/packages/agent-runtime/src/tools/handlers/tool/find-files.d.ts +0 -27
  212. package/dist/packages/agent-runtime/src/tools/handlers/tool/glob.d.ts +0 -10
  213. package/dist/packages/agent-runtime/src/tools/handlers/tool/list-directory.d.ts +0 -10
  214. package/dist/packages/agent-runtime/src/tools/handlers/tool/lookup-agent-info.d.ts +0 -14
  215. package/dist/packages/agent-runtime/src/tools/handlers/tool/propose-str-replace.d.ts +0 -15
  216. package/dist/packages/agent-runtime/src/tools/handlers/tool/propose-write-file.d.ts +0 -7
  217. package/dist/packages/agent-runtime/src/tools/handlers/tool/proposed-content-store.d.ts +0 -27
  218. package/dist/packages/agent-runtime/src/tools/handlers/tool/read-docs.d.ts +0 -21
  219. package/dist/packages/agent-runtime/src/tools/handlers/tool/read-files.d.ts +0 -13
  220. package/dist/packages/agent-runtime/src/tools/handlers/tool/read-subtree.d.ts +0 -13
  221. package/dist/packages/agent-runtime/src/tools/handlers/tool/run-file-change-hooks.d.ts +0 -10
  222. package/dist/packages/agent-runtime/src/tools/handlers/tool/run-terminal-command.d.ts +0 -10
  223. package/dist/packages/agent-runtime/src/tools/handlers/tool/send-message.d.ts +0 -15
  224. package/dist/packages/agent-runtime/src/tools/handlers/tool/set-messages.d.ts +0 -9
  225. package/dist/packages/agent-runtime/src/tools/handlers/tool/set-output.d.ts +0 -18
  226. package/dist/packages/agent-runtime/src/tools/handlers/tool/skill.d.ts +0 -11
  227. package/dist/packages/agent-runtime/src/tools/handlers/tool/spawn-agent-inline.d.ts +0 -29
  228. package/dist/packages/agent-runtime/src/tools/handlers/tool/spawn-agent-utils.d.ts +0 -130
  229. package/dist/packages/agent-runtime/src/tools/handlers/tool/spawn-agents.d.ts +0 -37
  230. package/dist/packages/agent-runtime/src/tools/handlers/tool/str-replace.d.ts +0 -16
  231. package/dist/packages/agent-runtime/src/tools/handlers/tool/suggest-followups.d.ts +0 -9
  232. package/dist/packages/agent-runtime/src/tools/handlers/tool/task-completed.d.ts +0 -15
  233. package/dist/packages/agent-runtime/src/tools/handlers/tool/task-create.d.ts +0 -10
  234. package/dist/packages/agent-runtime/src/tools/handlers/tool/task-get.d.ts +0 -10
  235. package/dist/packages/agent-runtime/src/tools/handlers/tool/task-list.d.ts +0 -10
  236. package/dist/packages/agent-runtime/src/tools/handlers/tool/task-update.d.ts +0 -15
  237. package/dist/packages/agent-runtime/src/tools/handlers/tool/team-create.d.ts +0 -15
  238. package/dist/packages/agent-runtime/src/tools/handlers/tool/team-delete.d.ts +0 -15
  239. package/dist/packages/agent-runtime/src/tools/handlers/tool/think-deeply.d.ts +0 -9
  240. package/dist/packages/agent-runtime/src/tools/handlers/tool/update-subgoal.d.ts +0 -11
  241. package/dist/packages/agent-runtime/src/tools/handlers/tool/web-search.d.ts +0 -22
  242. package/dist/packages/agent-runtime/src/tools/handlers/tool/write-file.d.ts +0 -49
  243. package/dist/packages/agent-runtime/src/tools/handlers/tool/write-todos.d.ts +0 -9
  244. package/dist/packages/agent-runtime/src/tools/prompts.d.ts +0 -31
  245. package/dist/packages/agent-runtime/src/tools/stream-parser.d.ts +0 -33
  246. package/dist/packages/agent-runtime/src/tools/tool-executor.d.ts +0 -87
  247. package/dist/packages/agent-runtime/src/util/agent-output.d.ts +0 -3
  248. package/dist/packages/agent-runtime/src/util/messages.d.ts +0 -68
  249. package/dist/packages/agent-runtime/src/util/parse-tool-calls-from-text.d.ts +0 -38
  250. package/dist/packages/agent-runtime/src/util/render-read-files-result.d.ts +0 -15
  251. package/dist/packages/agent-runtime/src/util/simplify-tool-results.d.ts +0 -7
  252. package/dist/packages/agent-runtime/src/util/stream-xml-parser.d.ts +0 -34
  253. package/dist/packages/agent-runtime/src/util/token-counter.d.ts +0 -3
  254. package/dist/packages/code-map/src/index.d.ts +0 -3
  255. package/dist/packages/code-map/src/init-node.d.ts +0 -4
  256. package/dist/packages/code-map/src/languages.d.ts +0 -36
  257. package/dist/packages/code-map/src/parse.d.ts +0 -21
  258. package/dist/packages/code-map/src/types.d.ts +0 -8
  259. package/dist/packages/code-map/src/utils.d.ts +0 -1
  260. package/dist/sdk/src/__tests__/client.test.d.ts +0 -1
  261. package/dist/sdk/src/__tests__/code-search.test.d.ts +0 -1
  262. package/dist/sdk/src/__tests__/credentials.test.d.ts +0 -1
  263. package/dist/sdk/src/__tests__/database.test.d.ts +0 -1
  264. package/dist/sdk/src/__tests__/env.test.d.ts +0 -1
  265. package/dist/sdk/src/__tests__/error-utils.test.d.ts +0 -1
  266. package/dist/sdk/src/__tests__/initial-session-state.test.d.ts +0 -1
  267. package/dist/sdk/src/__tests__/knowledge-file-selection.test.d.ts +0 -1
  268. package/dist/sdk/src/__tests__/load-agents.test.d.ts +0 -1
  269. package/dist/sdk/src/__tests__/load-mcp-config.test.d.ts +0 -1
  270. package/dist/sdk/src/__tests__/model-provider.test.d.ts +0 -1
  271. package/dist/sdk/src/__tests__/read-files.test.d.ts +0 -1
  272. package/dist/sdk/src/__tests__/run-cancellation.test.d.ts +0 -1
  273. package/dist/sdk/src/__tests__/run-file-filter.test.d.ts +0 -1
  274. package/dist/sdk/src/__tests__/run-handle-event.test.d.ts +0 -1
  275. package/dist/sdk/src/__tests__/run.integration.test.d.ts +0 -1
  276. package/dist/sdk/src/__tests__/team-api.test.d.ts +0 -1
  277. package/dist/sdk/src/__tests__/user-knowledge-files.test.d.ts +0 -1
  278. package/dist/sdk/src/__tests__/validate-agents.test.d.ts +0 -1
  279. package/dist/sdk/src/agents/load-agents.d.ts +0 -106
  280. package/dist/sdk/src/agents/load-mcp-config.d.ts +0 -69
  281. package/dist/sdk/src/client.d.ts +0 -71
  282. package/dist/sdk/src/constants.d.ts +0 -4
  283. package/dist/sdk/src/credentials.d.ts +0 -58
  284. package/dist/sdk/src/custom-tool.d.ts +0 -32
  285. package/dist/sdk/src/env.d.ts +0 -31
  286. package/dist/sdk/src/error-utils.d.ts +0 -55
  287. package/dist/sdk/src/impl/__tests__/prompt-result.test.d.ts +0 -1
  288. package/dist/sdk/src/impl/agent-runtime.d.ts +0 -8
  289. package/dist/sdk/src/impl/database.d.ts +0 -7
  290. package/dist/sdk/src/impl/llm.d.ts +0 -8
  291. package/dist/sdk/src/impl/model-provider.d.ts +0 -61
  292. package/dist/sdk/src/index.d.ts +0 -42
  293. package/dist/sdk/src/native/ripgrep.d.ts +0 -7
  294. package/dist/sdk/src/retry-config.d.ts +0 -46
  295. package/dist/sdk/src/run-state.d.ts +0 -81
  296. package/dist/sdk/src/run.d.ts +0 -79
  297. package/dist/sdk/src/skills/load-skills.d.ts +0 -42
  298. package/dist/sdk/src/team.d.ts +0 -49
  299. package/dist/sdk/src/testing/env.d.ts +0 -5
  300. package/dist/sdk/src/tools/change-file.d.ts +0 -7
  301. package/dist/sdk/src/tools/code-search.d.ts +0 -13
  302. package/dist/sdk/src/tools/glob.d.ts +0 -8
  303. package/dist/sdk/src/tools/index.d.ts +0 -16
  304. package/dist/sdk/src/tools/list-directory.d.ts +0 -7
  305. package/dist/sdk/src/tools/read-files.d.ts +0 -16
  306. package/dist/sdk/src/tools/run-file-change-hooks.d.ts +0 -4
  307. package/dist/sdk/src/tools/run-terminal-command.d.ts +0 -8
  308. package/dist/sdk/src/types/env.d.ts +0 -30
  309. package/dist/sdk/src/validate-agents.d.ts +0 -45
@@ -1,49 +0,0 @@
1
- import type { TeamConfig, TeamMember, TeamTask, DevPhase, TeamRole } from '@levelcode/common/types/team-config';
2
- import type { TeamProtocolMessage } from '@levelcode/common/types/team-protocol';
3
- import type { TeamSummary } from '@levelcode/common/utils/team-discovery';
4
- import type { PresetConfig } from '@levelcode/common/utils/team-presets';
5
- import type { RunOptions, LevelCodeClientOptions } from './run';
6
- export type CreateTeamOptions = {
7
- description?: string;
8
- phase?: DevPhase;
9
- preset?: string;
10
- members?: Array<{
11
- name: string;
12
- role: TeamRole;
13
- agentType: string;
14
- model: string;
15
- cwd?: string;
16
- }>;
17
- settings?: {
18
- maxMembers?: number;
19
- autoAssign?: boolean;
20
- };
21
- };
22
- export type RunWithTeamOptions = RunOptions & LevelCodeClientOptions & {
23
- teamName: string;
24
- memberName: string;
25
- role: TeamRole;
26
- };
27
- export type TeamStatus = {
28
- config: TeamConfig;
29
- tasks: TeamTask[];
30
- memberCount: number;
31
- };
32
- /**
33
- * Creates a new team with the given name and options.
34
- * If a preset is specified, uses its member/settings defaults.
35
- */
36
- export declare function sdkCreateTeam(name: string, leadAgentId: string, options?: CreateTeamOptions): TeamConfig;
37
- /**
38
- * Deletes a team by name and removes all associated data.
39
- */
40
- export declare function sdkDeleteTeam(name: string): void;
41
- /**
42
- * Gets the full status of a team including config and tasks.
43
- */
44
- export declare function sdkGetTeamStatus(name: string): TeamStatus;
45
- /**
46
- * Lists all teams with summary information.
47
- */
48
- export declare function sdkListTeams(): TeamSummary[];
49
- export type { TeamConfig, TeamMember, TeamTask, DevPhase, TeamRole, TeamProtocolMessage, TeamSummary, PresetConfig, };
@@ -1,5 +0,0 @@
1
- import type { SdkEnv } from '../types/env';
2
- /**
3
- * Test-only SDK env builder.
4
- */
5
- export declare const createTestSdkEnv: (overrides?: Partial<SdkEnv>) => SdkEnv;
@@ -1,7 +0,0 @@
1
- import type { LevelCodeToolOutput } from '@levelcode/common/tools/list';
2
- import type { LevelCodeFileSystem } from '@levelcode/common/types/filesystem';
3
- export declare function changeFile(params: {
4
- parameters: unknown;
5
- cwd: string;
6
- fs: LevelCodeFileSystem;
7
- }): Promise<LevelCodeToolOutput<'str_replace'>>;
@@ -1,13 +0,0 @@
1
- import type { LevelCodeToolOutput } from '../../../common/src/tools/list';
2
- import { Logger } from '@levelcode/common/types/contracts/logger';
3
- export declare function codeSearch({ projectPath, pattern, flags, cwd, maxResults, globalMaxResults, maxOutputStringLength, timeoutSeconds, logger, }: {
4
- projectPath: string;
5
- pattern: string;
6
- flags?: string;
7
- cwd?: string;
8
- maxResults?: number;
9
- globalMaxResults?: number;
10
- maxOutputStringLength?: number;
11
- timeoutSeconds?: number;
12
- logger?: Logger;
13
- }): Promise<LevelCodeToolOutput<'code_search'>>;
@@ -1,8 +0,0 @@
1
- import type { LevelCodeToolOutput } from '@levelcode/common/tools/list';
2
- import type { LevelCodeFileSystem } from '@levelcode/common/types/filesystem';
3
- export declare function glob(params: {
4
- pattern: string;
5
- projectPath: string;
6
- cwd?: string;
7
- fs: LevelCodeFileSystem;
8
- }): Promise<LevelCodeToolOutput<'glob'>>;
@@ -1,16 +0,0 @@
1
- import { changeFile } from './change-file';
2
- import { codeSearch } from './code-search';
3
- import { glob } from './glob';
4
- import { listDirectory } from './list-directory';
5
- import { getFiles } from './read-files';
6
- import { runFileChangeHooks } from './run-file-change-hooks';
7
- import { runTerminalCommand } from './run-terminal-command';
8
- export declare const ToolHelpers: {
9
- runTerminalCommand: typeof runTerminalCommand;
10
- codeSearch: typeof codeSearch;
11
- glob: typeof glob;
12
- listDirectory: typeof listDirectory;
13
- getFiles: typeof getFiles;
14
- runFileChangeHooks: typeof runFileChangeHooks;
15
- changeFile: typeof changeFile;
16
- };
@@ -1,7 +0,0 @@
1
- import type { LevelCodeToolOutput } from '@levelcode/common/tools/list';
2
- import type { LevelCodeFileSystem } from '@levelcode/common/types/filesystem';
3
- export declare function listDirectory(params: {
4
- directoryPath: string;
5
- projectPath: string;
6
- fs: LevelCodeFileSystem;
7
- }): Promise<LevelCodeToolOutput<'list_directory'>>;
@@ -1,16 +0,0 @@
1
- import type { LevelCodeFileSystem } from '@levelcode/common/types/filesystem';
2
- export type FileFilterResult = {
3
- status: 'blocked' | 'allow-example' | 'allow';
4
- };
5
- export type FileFilter = (filePath: string) => FileFilterResult;
6
- export declare function getFiles(params: {
7
- filePaths: string[];
8
- cwd: string;
9
- fs: LevelCodeFileSystem;
10
- /**
11
- * Filter to classify files before reading.
12
- * If provided, the caller takes full control of filtering (no gitignore check).
13
- * If not provided, the SDK applies gitignore checking automatically.
14
- */
15
- fileFilter?: FileFilter;
16
- }): Promise<Record<string, string | null>>;
@@ -1,4 +0,0 @@
1
- import type { LevelCodeToolOutput } from '../../../common/src/tools/list';
2
- export declare function runFileChangeHooks({ files, }: {
3
- files: string[];
4
- }): Promise<LevelCodeToolOutput<'run_file_change_hooks'>>;
@@ -1,8 +0,0 @@
1
- import type { LevelCodeToolOutput } from '../../../common/src/tools/list';
2
- export declare function runTerminalCommand({ command, process_type, cwd, timeout_seconds, env, }: {
3
- command: string;
4
- process_type: 'SYNC' | 'BACKGROUND';
5
- cwd: string;
6
- timeout_seconds: number;
7
- env?: NodeJS.ProcessEnv;
8
- }): Promise<LevelCodeToolOutput<'run_terminal_command'>>;
@@ -1,30 +0,0 @@
1
- /**
2
- * SDK-specific environment variable types.
3
- *
4
- * Extends base types from common with SDK-specific vars for:
5
- * - Ripgrep binary path configuration
6
- * - WASM module directory
7
- */
8
- import type { BaseEnv, ClientEnv } from '@levelcode/common/types/contracts/env';
9
- /**
10
- * SDK-specific env vars for binary paths and WASM.
11
- */
12
- export type SdkEnv = BaseEnv & {
13
- LEVELCODE_RG_PATH?: string;
14
- LEVELCODE_WASM_DIR?: string;
15
- VERBOSE?: string;
16
- OVERRIDE_TARGET?: string;
17
- OVERRIDE_PLATFORM?: string;
18
- OVERRIDE_ARCH?: string;
19
- };
20
- /**
21
- * Full SDK env deps combining client env and SDK env.
22
- */
23
- export type SdkEnvDeps = {
24
- clientEnv: ClientEnv;
25
- env: SdkEnv;
26
- };
27
- /**
28
- * Function type for getting SDK env values.
29
- */
30
- export type GetSdkEnvFn = () => SdkEnv;
@@ -1,45 +0,0 @@
1
- import type { AgentDefinition } from '@levelcode/common/templates/initial-agents-dir/types/agent-definition';
2
- export interface ValidationResult {
3
- success: boolean;
4
- validationErrors: Array<{
5
- id: string;
6
- message: string;
7
- }>;
8
- errorCount: number;
9
- }
10
- export interface ValidateAgentsOptions {
11
- /**
12
- * Whether to perform remote validation via the web API.
13
- * Remote validation checks spawnable agents against the database.
14
- */
15
- remote?: boolean;
16
- /**
17
- * The base URL of the LevelCode website API.
18
- * Optional - defaults to NEXT_PUBLIC_LEVELCODE_APP_URL or environment-based URL.
19
- * Example: 'https://levelcode.vercel.app'
20
- */
21
- websiteUrl?: string;
22
- }
23
- /**
24
- * Validates an array of agent definitions.
25
- *
26
- * By default, performs local Zod schema validation.
27
- * When `options.remote` is true, additionally validates spawnable agents via the web API.
28
- *
29
- * @param definitions - Array of agent definitions to validate
30
- * @param options - Optional configuration for validation
31
- * @returns Promise<ValidationResult> - Validation results with any errors
32
- *
33
- * @example
34
- * ```typescript
35
- * // Local validation only
36
- * const result = await validateAgents(definitions)
37
- *
38
- * // Remote validation
39
- * const result = await validateAgents(definitions, {
40
- * remote: true,
41
- * websiteUrl: 'https://levelcode.vercel.app'
42
- * })
43
- * ```
44
- */
45
- export declare function validateAgents(definitions: AgentDefinition[], options?: ValidateAgentsOptions): Promise<ValidationResult>;