@levelcode/sdk 0.2.2 → 0.2.4
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.
- package/dist/agents/constants.d.ts +1 -0
- package/dist/agents/team/apprentice.d.ts +3 -0
- package/dist/agents/team/coordinator.d.ts +3 -0
- package/dist/agents/team/cto.d.ts +3 -0
- package/dist/agents/team/designer.d.ts +3 -0
- package/dist/agents/team/director.d.ts +3 -0
- package/dist/agents/team/distinguished-engineer.d.ts +3 -0
- package/dist/agents/team/fellow.d.ts +3 -0
- package/dist/agents/team/index.d.ts +27 -0
- package/dist/agents/team/intern.d.ts +3 -0
- package/dist/agents/team/junior-engineer.d.ts +3 -0
- package/dist/agents/team/manager.d.ts +3 -0
- package/dist/agents/team/mid-level-engineer.d.ts +3 -0
- package/dist/agents/team/principal-engineer.d.ts +3 -0
- package/dist/agents/team/product-lead.d.ts +3 -0
- package/dist/agents/team/researcher.d.ts +3 -0
- package/dist/agents/team/role-hierarchy.d.ts +24 -0
- package/dist/agents/team/scientist.d.ts +3 -0
- package/dist/agents/team/senior-engineer.d.ts +3 -0
- package/dist/agents/team/senior-staff-engineer.d.ts +3 -0
- package/dist/agents/team/staff-engineer.d.ts +3 -0
- package/dist/agents/team/sub-manager.d.ts +3 -0
- package/dist/agents/team/tester.d.ts +3 -0
- package/dist/agents/team/vp-engineering.d.ts +3 -0
- package/dist/agents/types/agent-definition.d.ts +296 -0
- package/dist/agents/types/secret-agent-definition.d.ts +19 -0
- package/dist/agents/types/tools.d.ts +308 -0
- package/dist/agents/types/util-types.d.ts +134 -0
- package/dist/common/src/actions.d.ts +176 -0
- package/dist/common/src/analytics-core.d.ts +52 -0
- package/dist/common/src/analytics.d.ts +9 -0
- package/dist/common/src/browser-actions.d.ts +1200 -0
- package/dist/common/src/constants/agents.d.ts +47 -0
- package/dist/common/src/constants/analytics-events.d.ts +111 -0
- package/dist/common/src/constants/byok.d.ts +2 -0
- package/dist/common/src/constants/claude-oauth.d.ts +36 -0
- package/dist/common/src/constants/index.d.ts +4 -0
- package/dist/common/src/constants/knowledge.d.ts +21 -0
- package/dist/common/src/constants/limits.d.ts +14 -0
- package/dist/common/src/constants/model-config.d.ts +117 -0
- package/dist/common/src/constants/paths.d.ts +23 -0
- package/dist/common/src/constants/skills.d.ts +42 -0
- package/dist/common/src/constants/ui.d.ts +14 -0
- package/dist/common/src/env-ci.d.ts +22 -0
- package/dist/common/src/env-process.d.ts +28 -0
- package/dist/common/src/env-schema.d.ts +24 -0
- package/dist/common/src/env.d.ts +16 -0
- package/dist/common/src/mcp/client.d.ts +6 -0
- package/dist/common/src/old-constants.d.ts +10 -0
- package/dist/common/src/project-file-tree.d.ts +27 -0
- package/dist/common/src/templates/agent-validation.d.ts +48 -0
- package/dist/common/src/templates/initial-agents-dir/types/agent-definition.d.ts +296 -0
- package/dist/common/src/templates/initial-agents-dir/types/tools.d.ts +308 -0
- package/dist/common/src/templates/initial-agents-dir/types/util-types.d.ts +128 -0
- package/dist/common/src/testing/errors.d.ts +14 -0
- package/dist/common/src/testing/mock-modules.d.ts +11 -0
- package/dist/common/src/testing/mock-types.d.ts +97 -0
- package/dist/common/src/testing/mocks/analytics.d.ts +182 -0
- package/dist/common/src/testing/mocks/child-process.d.ts +29 -0
- package/dist/common/src/testing/mocks/crypto.d.ts +159 -0
- package/dist/common/src/testing/mocks/database.d.ts +197 -0
- package/dist/common/src/testing/mocks/fetch.d.ts +35 -0
- package/dist/common/src/testing/mocks/filesystem.d.ts +31 -0
- package/dist/common/src/testing/mocks/index.d.ts +25 -0
- package/dist/common/src/testing/mocks/logger.d.ts +35 -0
- package/dist/common/src/testing/mocks/stream.d.ts +203 -0
- package/dist/common/src/testing/mocks/timers.d.ts +27 -0
- package/dist/common/src/testing/mocks/tree-sitter.d.ts +58 -0
- package/dist/common/src/testing-env-process.d.ts +7 -0
- package/dist/common/src/tools/constants.d.ts +17 -0
- package/dist/common/src/tools/list.d.ts +1152 -0
- package/dist/common/src/tools/params/tool/add-message.d.ts +19 -0
- package/dist/common/src/tools/params/tool/add-subgoal.d.ts +26 -0
- package/dist/common/src/tools/params/tool/ask-user.d.ts +59 -0
- package/dist/common/src/tools/params/tool/browser-logs.d.ts +127 -0
- package/dist/common/src/tools/params/tool/code-search.d.ts +30 -0
- package/dist/common/src/tools/params/tool/create-plan.d.ts +30 -0
- package/dist/common/src/tools/params/tool/end-turn.d.ts +13 -0
- package/dist/common/src/tools/params/tool/find-files.d.ts +31 -0
- package/dist/common/src/tools/params/tool/glob.d.ts +26 -0
- package/dist/common/src/tools/params/tool/list-directory.d.ts +25 -0
- package/dist/common/src/tools/params/tool/lookup-agent-info.d.ts +13 -0
- package/dist/common/src/tools/params/tool/propose-str-replace.d.ts +40 -0
- package/dist/common/src/tools/params/tool/propose-write-file.d.ts +29 -0
- package/dist/common/src/tools/params/tool/read-docs.d.ts +19 -0
- package/dist/common/src/tools/params/tool/read-files.d.ts +35 -0
- package/dist/common/src/tools/params/tool/read-subtree.d.ts +40 -0
- package/dist/common/src/tools/params/tool/run-file-change-hooks.d.ts +63 -0
- package/dist/common/src/tools/params/tool/run-terminal-command.d.ts +88 -0
- package/dist/common/src/tools/params/tool/send-message.d.ts +26 -0
- package/dist/common/src/tools/params/tool/set-messages.d.ts +15 -0
- package/dist/common/src/tools/params/tool/set-output.d.ts +15 -0
- package/dist/common/src/tools/params/tool/skill.d.ts +28 -0
- package/dist/common/src/tools/params/tool/spawn-agent-inline.d.ts +17 -0
- package/dist/common/src/tools/params/tool/spawn-agents.d.ts +26 -0
- package/dist/common/src/tools/params/tool/str-replace.d.ts +43 -0
- package/dist/common/src/tools/params/tool/suggest-followups.d.ts +26 -0
- package/dist/common/src/tools/params/tool/task-completed.d.ts +13 -0
- package/dist/common/src/tools/params/tool/task-create.d.ts +24 -0
- package/dist/common/src/tools/params/tool/task-get.d.ts +15 -0
- package/dist/common/src/tools/params/tool/task-list.d.ts +13 -0
- package/dist/common/src/tools/params/tool/task-update.d.ts +29 -0
- package/dist/common/src/tools/params/tool/team-create.d.ts +17 -0
- package/dist/common/src/tools/params/tool/team-delete.d.ts +13 -0
- package/dist/common/src/tools/params/tool/think-deeply.d.ts +15 -0
- package/dist/common/src/tools/params/tool/update-subgoal.d.ts +25 -0
- package/dist/common/src/tools/params/tool/web-search.d.ts +25 -0
- package/dist/common/src/tools/params/tool/write-file.d.ts +31 -0
- package/dist/common/src/tools/params/tool/write-todos.d.ts +18 -0
- package/dist/common/src/tools/params/utils.d.ts +35 -0
- package/dist/common/src/tools/utils.d.ts +4 -0
- package/dist/common/src/types/agent-template.d.ts +156 -0
- package/dist/common/src/types/contracts/agent-runtime.d.ts +36 -0
- package/dist/common/src/types/contracts/analytics.d.ts +8 -0
- package/dist/common/src/types/contracts/billing.d.ts +40 -0
- package/dist/common/src/types/contracts/client.d.ts +45 -0
- package/dist/common/src/types/contracts/database.d.ts +80 -0
- package/dist/common/src/types/contracts/env.d.ts +150 -0
- package/dist/common/src/types/contracts/llm.d.ts +102 -0
- package/dist/common/src/types/contracts/logger.d.ts +8 -0
- package/dist/common/src/types/dynamic-agent-template.d.ts +227 -0
- package/dist/common/src/types/filesystem.d.ts +6 -0
- package/dist/common/src/types/function-params.d.ts +15 -0
- package/dist/common/src/types/grant.d.ts +2 -0
- package/dist/common/src/types/json.d.ts +9 -0
- package/dist/common/src/types/mcp.d.ts +31 -0
- package/dist/common/src/types/messages/content-part.d.ts +46 -0
- package/dist/common/src/types/messages/data-content.d.ts +3 -0
- package/dist/common/src/types/messages/levelcode-message.d.ts +37 -0
- package/dist/common/src/types/messages/provider-metadata.d.ts +3 -0
- package/dist/common/src/types/print-mode.d.ts +155 -0
- package/dist/common/src/types/session-state.d.ts +94 -0
- package/dist/common/src/types/skill.d.ts +31 -0
- package/dist/common/src/types/source.d.ts +8 -0
- package/dist/common/src/types/spawn.d.ts +8 -0
- package/dist/common/src/types/team-config-schemas.d.ts +217 -0
- package/dist/common/src/types/team-config.d.ts +42 -0
- package/dist/common/src/types/team-hook-events.d.ts +36 -0
- package/dist/common/src/types/team-protocol.d.ts +64 -0
- package/dist/common/src/util/agent-id-parsing.d.ts +22 -0
- package/dist/common/src/util/agent-name-normalization.d.ts +12 -0
- package/dist/common/src/util/array.d.ts +6 -0
- package/dist/common/src/util/credentials.d.ts +11 -0
- package/dist/common/src/util/error.d.ts +128 -0
- package/dist/common/src/util/file.d.ts +133 -0
- package/dist/common/src/util/format-code-search.d.ts +16 -0
- package/dist/common/src/util/lru-cache.d.ts +30 -0
- package/dist/common/src/util/messages.d.ts +46 -0
- package/dist/common/src/util/model-utils.d.ts +8 -0
- package/dist/common/src/util/object.d.ts +22 -0
- package/dist/common/src/util/promise.d.ts +16 -0
- package/dist/common/src/util/random.d.ts +1 -0
- package/dist/common/src/util/skills.d.ts +5 -0
- package/dist/common/src/util/stop-sequence.d.ts +14 -0
- package/dist/common/src/util/string.d.ts +82 -0
- package/dist/common/src/util/xml.d.ts +12 -0
- package/dist/common/src/util/zod-schema.d.ts +5 -0
- package/dist/common/src/utils/dev-phases.d.ts +23 -0
- package/dist/common/src/utils/file-lock.d.ts +13 -0
- package/dist/common/src/utils/team-analytics.d.ts +16 -0
- package/dist/common/src/utils/team-discovery.d.ts +47 -0
- package/dist/common/src/utils/team-fs.d.ts +20 -0
- package/dist/common/src/utils/team-hook-emitter.d.ts +40 -0
- package/dist/common/src/utils/team-presets.d.ts +35 -0
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +3 -3
- package/dist/packages/agent-runtime/src/constants.d.ts +1 -0
- package/dist/packages/agent-runtime/src/fast-rewrite.d.ts +45 -0
- package/dist/packages/agent-runtime/src/find-files/request-files-prompt.d.ts +71 -0
- package/dist/packages/agent-runtime/src/generate-diffs-prompt.d.ts +53 -0
- package/dist/packages/agent-runtime/src/get-file-reading-updates.d.ts +8 -0
- package/dist/packages/agent-runtime/src/inbox-poller.d.ts +81 -0
- package/dist/packages/agent-runtime/src/llm-api/claude.d.ts +5 -0
- package/dist/packages/agent-runtime/src/llm-api/context7-api.d.ts +55 -0
- package/dist/packages/agent-runtime/src/llm-api/gemini-with-fallbacks.d.ts +40 -0
- package/dist/packages/agent-runtime/src/llm-api/levelcode-web-api.d.ts +49 -0
- package/dist/packages/agent-runtime/src/llm-api/relace-api.d.ts +16 -0
- package/dist/packages/agent-runtime/src/main-prompt.d.ts +29 -0
- package/dist/packages/agent-runtime/src/mcp-constants.d.ts +12 -0
- package/dist/packages/agent-runtime/src/mcp.d.ts +10 -0
- package/dist/packages/agent-runtime/src/message-formatter.d.ts +12 -0
- package/dist/packages/agent-runtime/src/process-file-block.d.ts +56 -0
- package/dist/packages/agent-runtime/src/process-str-replace.d.ts +21 -0
- package/dist/packages/agent-runtime/src/prompt-agent-stream.d.ts +28 -0
- package/dist/packages/agent-runtime/src/run-agent-step.d.ts +73 -0
- package/dist/packages/agent-runtime/src/run-programmatic-step.d.ts +40 -0
- package/dist/packages/agent-runtime/src/system-prompt/prompts.d.ts +19 -0
- package/dist/packages/agent-runtime/src/system-prompt/search-system-prompt.d.ts +14 -0
- package/dist/packages/agent-runtime/src/system-prompt/team-context-prompt.d.ts +9 -0
- package/dist/packages/agent-runtime/src/system-prompt/team-prompt.d.ts +9 -0
- package/dist/packages/agent-runtime/src/system-prompt/truncate-file-tree.d.ts +13 -0
- package/dist/packages/agent-runtime/src/team-context.d.ts +14 -0
- package/dist/packages/agent-runtime/src/templates/agent-registry.d.ts +35 -0
- package/dist/packages/agent-runtime/src/templates/prompts.d.ts +35 -0
- package/dist/packages/agent-runtime/src/templates/strings.d.ts +32 -0
- package/dist/packages/agent-runtime/src/templates/types.d.ts +13 -0
- package/dist/packages/agent-runtime/src/tool-stream-parser.d.ts +31 -0
- package/dist/packages/agent-runtime/src/tools/handlers/handler-function-type.d.ts +51 -0
- package/dist/packages/agent-runtime/src/tools/handlers/list.d.ts +370 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/add-message.d.ts +9 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/add-subgoal.d.ts +9 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/ask-user.d.ts +10 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/browser-logs.d.ts +8 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/code-search.d.ts +8 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/create-plan.d.ts +13 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/end-turn.d.ts +7 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/find-files.d.ts +27 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/glob.d.ts +10 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/list-directory.d.ts +10 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/lookup-agent-info.d.ts +14 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/propose-str-replace.d.ts +15 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/propose-write-file.d.ts +7 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/proposed-content-store.d.ts +27 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/read-docs.d.ts +21 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/read-files.d.ts +13 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/read-subtree.d.ts +13 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/run-file-change-hooks.d.ts +10 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/run-terminal-command.d.ts +10 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/send-message.d.ts +15 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/set-messages.d.ts +9 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/set-output.d.ts +18 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/skill.d.ts +11 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/spawn-agent-inline.d.ts +29 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/spawn-agent-utils.d.ts +130 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/spawn-agents.d.ts +37 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/str-replace.d.ts +16 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/suggest-followups.d.ts +9 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/task-completed.d.ts +15 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/task-create.d.ts +10 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/task-get.d.ts +10 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/task-list.d.ts +10 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/task-update.d.ts +15 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/team-create.d.ts +15 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/team-delete.d.ts +15 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/think-deeply.d.ts +9 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/update-subgoal.d.ts +11 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/web-search.d.ts +22 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/write-file.d.ts +49 -0
- package/dist/packages/agent-runtime/src/tools/handlers/tool/write-todos.d.ts +9 -0
- package/dist/packages/agent-runtime/src/tools/prompts.d.ts +31 -0
- package/dist/packages/agent-runtime/src/tools/stream-parser.d.ts +33 -0
- package/dist/packages/agent-runtime/src/tools/tool-executor.d.ts +87 -0
- package/dist/packages/agent-runtime/src/util/agent-output.d.ts +3 -0
- package/dist/packages/agent-runtime/src/util/messages.d.ts +68 -0
- package/dist/packages/agent-runtime/src/util/parse-tool-calls-from-text.d.ts +38 -0
- package/dist/packages/agent-runtime/src/util/render-read-files-result.d.ts +15 -0
- package/dist/packages/agent-runtime/src/util/simplify-tool-results.d.ts +7 -0
- package/dist/packages/agent-runtime/src/util/stream-xml-parser.d.ts +34 -0
- package/dist/packages/agent-runtime/src/util/token-counter.d.ts +3 -0
- package/dist/packages/code-map/src/index.d.ts +3 -0
- package/dist/packages/code-map/src/init-node.d.ts +4 -0
- package/dist/packages/code-map/src/languages.d.ts +36 -0
- package/dist/packages/code-map/src/parse.d.ts +21 -0
- package/dist/packages/code-map/src/types.d.ts +8 -0
- package/dist/packages/code-map/src/utils.d.ts +1 -0
- package/dist/sdk/src/__tests__/client.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/code-search.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/credentials.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/database.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/env.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/error-utils.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/initial-session-state.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/knowledge-file-selection.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/load-agents.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/load-mcp-config.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/model-provider.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/read-files.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/run-cancellation.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/run-file-filter.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/run-handle-event.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/run.integration.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/team-api.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/user-knowledge-files.test.d.ts +1 -0
- package/dist/sdk/src/__tests__/validate-agents.test.d.ts +1 -0
- package/dist/sdk/src/agents/load-agents.d.ts +106 -0
- package/dist/sdk/src/agents/load-mcp-config.d.ts +69 -0
- package/dist/sdk/src/client.d.ts +71 -0
- package/dist/sdk/src/constants.d.ts +4 -0
- package/dist/sdk/src/credentials.d.ts +58 -0
- package/dist/sdk/src/custom-tool.d.ts +32 -0
- package/dist/sdk/src/env.d.ts +31 -0
- package/dist/sdk/src/error-utils.d.ts +55 -0
- package/dist/sdk/src/impl/__tests__/prompt-result.test.d.ts +1 -0
- package/dist/sdk/src/impl/agent-runtime.d.ts +8 -0
- package/dist/sdk/src/impl/database.d.ts +7 -0
- package/dist/sdk/src/impl/llm.d.ts +8 -0
- package/dist/sdk/src/impl/model-provider.d.ts +61 -0
- package/dist/sdk/src/index.d.ts +42 -0
- package/dist/sdk/src/native/ripgrep.d.ts +7 -0
- package/dist/sdk/src/retry-config.d.ts +46 -0
- package/dist/sdk/src/run-state.d.ts +81 -0
- package/dist/sdk/src/run.d.ts +79 -0
- package/dist/sdk/src/skills/load-skills.d.ts +42 -0
- package/dist/sdk/src/team.d.ts +49 -0
- package/dist/sdk/src/testing/env.d.ts +5 -0
- package/dist/sdk/src/tools/change-file.d.ts +7 -0
- package/dist/sdk/src/tools/code-search.d.ts +13 -0
- package/dist/sdk/src/tools/glob.d.ts +8 -0
- package/dist/sdk/src/tools/index.d.ts +16 -0
- package/dist/sdk/src/tools/list-directory.d.ts +7 -0
- package/dist/sdk/src/tools/read-files.d.ts +16 -0
- package/dist/sdk/src/tools/run-file-change-hooks.d.ts +4 -0
- package/dist/sdk/src/tools/run-terminal-command.d.ts +8 -0
- package/dist/sdk/src/types/env.d.ts +30 -0
- package/dist/sdk/src/validate-agents.d.ts +45 -0
- package/dist/vendor/ripgrep/arm64-darwin/rg +0 -0
- package/dist/vendor/ripgrep/arm64-linux/rg +0 -0
- package/dist/vendor/ripgrep/x64-darwin/rg +0 -0
- package/dist/vendor/ripgrep/x64-linux/rg +0 -0
- package/dist/vendor/ripgrep/x64-win32/rg.exe +0 -0
- package/dist/wasm/tree-sitter-c-sharp.wasm +0 -0
- package/dist/wasm/tree-sitter-cpp.wasm +0 -0
- package/dist/wasm/tree-sitter-go.wasm +0 -0
- package/dist/wasm/tree-sitter-java.wasm +0 -0
- package/dist/wasm/tree-sitter-javascript.wasm +0 -0
- package/dist/wasm/tree-sitter-python.wasm +0 -0
- package/dist/wasm/tree-sitter-ruby.wasm +0 -0
- package/dist/wasm/tree-sitter-rust.wasm +0 -0
- package/dist/wasm/tree-sitter-tsx.wasm +0 -0
- package/dist/wasm/tree-sitter-typescript.wasm +0 -0
- package/dist/wasm/tree-sitter.wasm +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import type { JSONSchema } from 'zod/v4/core';
|
|
3
|
+
export declare const JsonSchemaSchema: z.ZodType<JSONSchema.BaseSchema, JSONSchema.BaseSchema>;
|
|
4
|
+
declare const PromptFieldSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
5
|
+
path: z.ZodString;
|
|
6
|
+
}, z.core.$strip>]>;
|
|
7
|
+
export type PromptField = z.infer<typeof PromptFieldSchema>;
|
|
8
|
+
export declare const DynamicAgentDefinitionSchema: z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
version: z.ZodOptional<z.ZodString>;
|
|
11
|
+
publisher: z.ZodOptional<z.ZodString>;
|
|
12
|
+
displayName: z.ZodString;
|
|
13
|
+
model: z.ZodString;
|
|
14
|
+
reasoningOptions: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
|
|
15
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
exclude: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
18
|
+
max_tokens: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
20
|
+
effort: z.ZodEnum<{
|
|
21
|
+
high: "high";
|
|
22
|
+
medium: "medium";
|
|
23
|
+
low: "low";
|
|
24
|
+
minimal: "minimal";
|
|
25
|
+
none: "none";
|
|
26
|
+
}>;
|
|
27
|
+
}, z.core.$strip>]>>>;
|
|
28
|
+
providerOptions: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
order: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
|
+
allow_fallbacks: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
require_parameters: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
data_collection: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
allow: "allow";
|
|
34
|
+
deny: "deny";
|
|
35
|
+
}>>;
|
|
36
|
+
only: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
|
+
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
38
|
+
quantizations: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
39
|
+
unknown: "unknown";
|
|
40
|
+
int4: "int4";
|
|
41
|
+
int8: "int8";
|
|
42
|
+
fp4: "fp4";
|
|
43
|
+
fp6: "fp6";
|
|
44
|
+
fp8: "fp8";
|
|
45
|
+
fp16: "fp16";
|
|
46
|
+
bf16: "bf16";
|
|
47
|
+
fp32: "fp32";
|
|
48
|
+
}>>>;
|
|
49
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
50
|
+
price: "price";
|
|
51
|
+
throughput: "throughput";
|
|
52
|
+
latency: "latency";
|
|
53
|
+
}>>;
|
|
54
|
+
max_price: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
prompt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
56
|
+
completion: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
57
|
+
image: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
58
|
+
audio: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
59
|
+
request: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
mcpServers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
63
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
64
|
+
http: "http";
|
|
65
|
+
sse: "sse";
|
|
66
|
+
}>>;
|
|
67
|
+
url: z.ZodString;
|
|
68
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
69
|
+
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
70
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
71
|
+
type: z.ZodDefault<z.ZodLiteral<"stdio">>;
|
|
72
|
+
command: z.ZodString;
|
|
73
|
+
args: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
74
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
75
|
+
}, z.core.$strict>]>>>;
|
|
76
|
+
toolNames: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
77
|
+
spawnableAgents: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
78
|
+
inputSchema: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
prompt: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<"string">;
|
|
81
|
+
description: z.ZodOptional<z.ZodString>;
|
|
82
|
+
}, z.core.$loose>>;
|
|
83
|
+
params: z.ZodOptional<z.ZodIntersection<z.ZodType<z.core.JSONSchema.JSONSchema, z.core.JSONSchema.JSONSchema, z.core.$ZodTypeInternals<z.core.JSONSchema.JSONSchema, z.core.JSONSchema.JSONSchema>>, z.ZodObject<{
|
|
84
|
+
type: z.ZodLiteral<"object">;
|
|
85
|
+
}, z.core.$strip>>>;
|
|
86
|
+
}, z.core.$loose>>;
|
|
87
|
+
includeMessageHistory: z.ZodDefault<z.ZodBoolean>;
|
|
88
|
+
inheritParentSystemPrompt: z.ZodDefault<z.ZodBoolean>;
|
|
89
|
+
outputMode: z.ZodDefault<z.ZodEnum<{
|
|
90
|
+
last_message: "last_message";
|
|
91
|
+
all_messages: "all_messages";
|
|
92
|
+
structured_output: "structured_output";
|
|
93
|
+
}>>;
|
|
94
|
+
outputSchema: z.ZodOptional<z.ZodIntersection<z.ZodType<z.core.JSONSchema.JSONSchema, z.core.JSONSchema.JSONSchema, z.core.$ZodTypeInternals<z.core.JSONSchema.JSONSchema, z.core.JSONSchema.JSONSchema>>, z.ZodObject<{
|
|
95
|
+
type: z.ZodLiteral<"object">;
|
|
96
|
+
}, z.core.$strip>>>;
|
|
97
|
+
spawnerPrompt: z.ZodOptional<z.ZodString>;
|
|
98
|
+
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
99
|
+
instructionsPrompt: z.ZodOptional<z.ZodString>;
|
|
100
|
+
stepPrompt: z.ZodOptional<z.ZodString>;
|
|
101
|
+
handleSteps: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodOptional<z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<readonly [z.ZodObject<{
|
|
102
|
+
agentState: z.ZodObject<{
|
|
103
|
+
agentId: z.ZodString;
|
|
104
|
+
parentId: z.ZodString;
|
|
105
|
+
messageHistory: z.ZodArray<z.ZodAny>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
108
|
+
params: z.ZodOptional<z.ZodAny>;
|
|
109
|
+
}, z.core.$strip>, z.ZodOptional<z.ZodObject<{
|
|
110
|
+
debug: z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodOptional<z.ZodString>], null>, z.ZodVoid>;
|
|
111
|
+
info: z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodOptional<z.ZodString>], null>, z.ZodVoid>;
|
|
112
|
+
warn: z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodOptional<z.ZodString>], null>, z.ZodVoid>;
|
|
113
|
+
error: z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodOptional<z.ZodString>], null>, z.ZodVoid>;
|
|
114
|
+
}, z.core.$strip>>], null>, z.ZodAny>, z.core.$InferInnerFunctionType<z.ZodTuple<readonly [z.ZodObject<{
|
|
115
|
+
agentState: z.ZodObject<{
|
|
116
|
+
agentId: z.ZodString;
|
|
117
|
+
parentId: z.ZodString;
|
|
118
|
+
messageHistory: z.ZodArray<z.ZodAny>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
121
|
+
params: z.ZodOptional<z.ZodAny>;
|
|
122
|
+
}, z.core.$strip>, z.ZodOptional<z.ZodObject<{
|
|
123
|
+
debug: z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodOptional<z.ZodString>], null>, z.ZodVoid>;
|
|
124
|
+
info: z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodOptional<z.ZodString>], null>, z.ZodVoid>;
|
|
125
|
+
warn: z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodOptional<z.ZodString>], null>, z.ZodVoid>;
|
|
126
|
+
error: z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodOptional<z.ZodString>], null>, z.ZodVoid>;
|
|
127
|
+
}, z.core.$strip>>], null>, z.ZodAny>>>]>>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
export type DynamicAgentDefinition = z.input<typeof DynamicAgentDefinitionSchema>;
|
|
130
|
+
export type DynamicAgentDefinitionParsed = z.infer<typeof DynamicAgentDefinitionSchema>;
|
|
131
|
+
export declare const DynamicAgentTemplateSchema: z.ZodObject<{
|
|
132
|
+
id: z.ZodString;
|
|
133
|
+
version: z.ZodOptional<z.ZodString>;
|
|
134
|
+
publisher: z.ZodOptional<z.ZodString>;
|
|
135
|
+
displayName: z.ZodString;
|
|
136
|
+
model: z.ZodString;
|
|
137
|
+
reasoningOptions: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
|
|
138
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
139
|
+
exclude: z.ZodOptional<z.ZodBoolean>;
|
|
140
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
141
|
+
max_tokens: z.ZodNumber;
|
|
142
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
143
|
+
effort: z.ZodEnum<{
|
|
144
|
+
high: "high";
|
|
145
|
+
medium: "medium";
|
|
146
|
+
low: "low";
|
|
147
|
+
minimal: "minimal";
|
|
148
|
+
none: "none";
|
|
149
|
+
}>;
|
|
150
|
+
}, z.core.$strip>]>>>;
|
|
151
|
+
providerOptions: z.ZodOptional<z.ZodObject<{
|
|
152
|
+
order: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
153
|
+
allow_fallbacks: z.ZodOptional<z.ZodBoolean>;
|
|
154
|
+
require_parameters: z.ZodOptional<z.ZodBoolean>;
|
|
155
|
+
data_collection: z.ZodOptional<z.ZodEnum<{
|
|
156
|
+
allow: "allow";
|
|
157
|
+
deny: "deny";
|
|
158
|
+
}>>;
|
|
159
|
+
only: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
160
|
+
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
161
|
+
quantizations: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
162
|
+
unknown: "unknown";
|
|
163
|
+
int4: "int4";
|
|
164
|
+
int8: "int8";
|
|
165
|
+
fp4: "fp4";
|
|
166
|
+
fp6: "fp6";
|
|
167
|
+
fp8: "fp8";
|
|
168
|
+
fp16: "fp16";
|
|
169
|
+
bf16: "bf16";
|
|
170
|
+
fp32: "fp32";
|
|
171
|
+
}>>>;
|
|
172
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
173
|
+
price: "price";
|
|
174
|
+
throughput: "throughput";
|
|
175
|
+
latency: "latency";
|
|
176
|
+
}>>;
|
|
177
|
+
max_price: z.ZodOptional<z.ZodObject<{
|
|
178
|
+
prompt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
179
|
+
completion: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
180
|
+
image: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
181
|
+
audio: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
182
|
+
request: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
183
|
+
}, z.core.$strip>>;
|
|
184
|
+
}, z.core.$strip>>;
|
|
185
|
+
mcpServers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
186
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
187
|
+
http: "http";
|
|
188
|
+
sse: "sse";
|
|
189
|
+
}>>;
|
|
190
|
+
url: z.ZodString;
|
|
191
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
192
|
+
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
193
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
194
|
+
type: z.ZodDefault<z.ZodLiteral<"stdio">>;
|
|
195
|
+
command: z.ZodString;
|
|
196
|
+
args: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
197
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
198
|
+
}, z.core.$strict>]>>>;
|
|
199
|
+
toolNames: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
200
|
+
spawnableAgents: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
201
|
+
inputSchema: z.ZodOptional<z.ZodObject<{
|
|
202
|
+
prompt: z.ZodOptional<z.ZodObject<{
|
|
203
|
+
type: z.ZodLiteral<"string">;
|
|
204
|
+
description: z.ZodOptional<z.ZodString>;
|
|
205
|
+
}, z.core.$loose>>;
|
|
206
|
+
params: z.ZodOptional<z.ZodIntersection<z.ZodType<z.core.JSONSchema.JSONSchema, z.core.JSONSchema.JSONSchema, z.core.$ZodTypeInternals<z.core.JSONSchema.JSONSchema, z.core.JSONSchema.JSONSchema>>, z.ZodObject<{
|
|
207
|
+
type: z.ZodLiteral<"object">;
|
|
208
|
+
}, z.core.$strip>>>;
|
|
209
|
+
}, z.core.$loose>>;
|
|
210
|
+
includeMessageHistory: z.ZodDefault<z.ZodBoolean>;
|
|
211
|
+
inheritParentSystemPrompt: z.ZodDefault<z.ZodBoolean>;
|
|
212
|
+
outputMode: z.ZodDefault<z.ZodEnum<{
|
|
213
|
+
last_message: "last_message";
|
|
214
|
+
all_messages: "all_messages";
|
|
215
|
+
structured_output: "structured_output";
|
|
216
|
+
}>>;
|
|
217
|
+
outputSchema: z.ZodOptional<z.ZodIntersection<z.ZodType<z.core.JSONSchema.JSONSchema, z.core.JSONSchema.JSONSchema, z.core.$ZodTypeInternals<z.core.JSONSchema.JSONSchema, z.core.JSONSchema.JSONSchema>>, z.ZodObject<{
|
|
218
|
+
type: z.ZodLiteral<"object">;
|
|
219
|
+
}, z.core.$strip>>>;
|
|
220
|
+
spawnerPrompt: z.ZodOptional<z.ZodString>;
|
|
221
|
+
systemPrompt: z.ZodString;
|
|
222
|
+
instructionsPrompt: z.ZodString;
|
|
223
|
+
stepPrompt: z.ZodString;
|
|
224
|
+
handleSteps: z.ZodOptional<z.ZodString>;
|
|
225
|
+
}, z.core.$strip>;
|
|
226
|
+
export type DynamicAgentTemplate = z.infer<typeof DynamicAgentTemplateSchema>;
|
|
227
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { UnionToIntersection } from 'bun-types/vendor/expect-type';
|
|
2
|
+
type Prettify<T> = {
|
|
3
|
+
[K in keyof T]: T[K];
|
|
4
|
+
} & {};
|
|
5
|
+
type StripExact<T> = T extends infer U & {
|
|
6
|
+
[x: string]: never;
|
|
7
|
+
} ? U : T;
|
|
8
|
+
type ParamsOfFunction<T> = T extends (params: infer C) => any ? StripExact<C> : never;
|
|
9
|
+
type IsUnion<T, U = T> = T extends any ? ([U] extends [T] ? false : true) : false;
|
|
10
|
+
type ParamsOfArray<T> = UnionToIntersection<T extends [infer fn, ...infer rest] ? ParamsOfFunction<fn> | ParamsOfArray<rest> : {}>;
|
|
11
|
+
type ParamsOfUnion<T> = IsUnion<T> extends true ? UnionToIntersection<ParamsOfFunction<T>> : ParamsOfFunction<T>;
|
|
12
|
+
export type ParamsOf<T> = Prettify<T extends any[] ? ParamsOfArray<T> : ParamsOfUnion<T>>;
|
|
13
|
+
export type OptionalFields<T, K extends keyof T> = Prettify<Omit<T, K> & Partial<Pick<T, K>>>;
|
|
14
|
+
export type ParamsExcluding<T, K extends keyof ParamsOf<T>> = Prettify<Omit<ParamsOf<T>, K>>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import z from 'zod/v4';
|
|
2
|
+
export type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
|
|
3
|
+
export declare const jsonValueSchema: z.ZodType<JSONValue>;
|
|
4
|
+
export declare const jsonObjectSchema: z.ZodType<JSONObject>;
|
|
5
|
+
export type JSONObject = {
|
|
6
|
+
[key in string]: JSONValue;
|
|
7
|
+
};
|
|
8
|
+
export declare const jsonArraySchema: z.ZodType<JSONArray>;
|
|
9
|
+
export type JSONArray = JSONValue[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
export declare const mcpConfigStdioSchema: z.ZodObject<{
|
|
3
|
+
type: z.ZodDefault<z.ZodLiteral<"stdio">>;
|
|
4
|
+
command: z.ZodString;
|
|
5
|
+
args: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
6
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export declare const mcpConfigRemoteSchema: z.ZodObject<{
|
|
9
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
10
|
+
http: "http";
|
|
11
|
+
sse: "sse";
|
|
12
|
+
}>>;
|
|
13
|
+
url: z.ZodString;
|
|
14
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
15
|
+
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export declare const mcpConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
18
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
19
|
+
http: "http";
|
|
20
|
+
sse: "sse";
|
|
21
|
+
}>>;
|
|
22
|
+
url: z.ZodString;
|
|
23
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
24
|
+
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
25
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
26
|
+
type: z.ZodDefault<z.ZodLiteral<"stdio">>;
|
|
27
|
+
command: z.ZodString;
|
|
28
|
+
args: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
29
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
30
|
+
}, z.core.$strict>]>;
|
|
31
|
+
export type MCPConfig = z.infer<typeof mcpConfigSchema>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import z from 'zod/v4';
|
|
2
|
+
export declare const textPartSchema: z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"text">;
|
|
4
|
+
text: z.ZodString;
|
|
5
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<import("../json").JSONValue, unknown, z.core.$ZodTypeInternals<import("../json").JSONValue, unknown>>>>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type TextPart = z.infer<typeof textPartSchema>;
|
|
8
|
+
export declare const imagePartSchema: z.ZodObject<{
|
|
9
|
+
type: z.ZodLiteral<"image">;
|
|
10
|
+
image: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Uint8Array, Uint8Array>, z.ZodCustom<ArrayBuffer, ArrayBuffer>, z.ZodCustom<Buffer, Buffer>]>, z.ZodCustom<URL, URL>]>;
|
|
11
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
12
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<import("../json").JSONValue, unknown, z.core.$ZodTypeInternals<import("../json").JSONValue, unknown>>>>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type ImagePart = z.infer<typeof imagePartSchema>;
|
|
15
|
+
export declare const filePartSchema: z.ZodObject<{
|
|
16
|
+
type: z.ZodLiteral<"file">;
|
|
17
|
+
data: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Uint8Array, Uint8Array>, z.ZodCustom<ArrayBuffer, ArrayBuffer>, z.ZodCustom<Buffer, Buffer>]>, z.ZodCustom<URL, URL>]>;
|
|
18
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
19
|
+
mediaType: z.ZodString;
|
|
20
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<import("../json").JSONValue, unknown, z.core.$ZodTypeInternals<import("../json").JSONValue, unknown>>>>>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type FilePart = z.infer<typeof filePartSchema>;
|
|
23
|
+
export declare const reasoningPartSchema: z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"reasoning">;
|
|
25
|
+
text: z.ZodString;
|
|
26
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<import("../json").JSONValue, unknown, z.core.$ZodTypeInternals<import("../json").JSONValue, unknown>>>>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type ReasoningPart = z.infer<typeof reasoningPartSchema>;
|
|
29
|
+
export declare const toolCallPartSchema: z.ZodObject<{
|
|
30
|
+
type: z.ZodLiteral<"tool-call">;
|
|
31
|
+
toolCallId: z.ZodString;
|
|
32
|
+
toolName: z.ZodString;
|
|
33
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
34
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<import("../json").JSONValue, unknown, z.core.$ZodTypeInternals<import("../json").JSONValue, unknown>>>>>;
|
|
35
|
+
providerExecuted: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export type ToolCallPart = z.infer<typeof toolCallPartSchema>;
|
|
38
|
+
export declare const toolResultOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
39
|
+
type: z.ZodLiteral<"json">;
|
|
40
|
+
value: z.ZodType<import("../json").JSONValue, unknown, z.core.$ZodTypeInternals<import("../json").JSONValue, unknown>>;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
+
type: z.ZodLiteral<"media">;
|
|
43
|
+
data: z.ZodString;
|
|
44
|
+
mediaType: z.ZodString;
|
|
45
|
+
}, z.core.$strip>], "type">;
|
|
46
|
+
export type ToolResultOutput = z.infer<typeof toolResultOutputSchema>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { FilePart, ImagePart, ReasoningPart, TextPart, ToolCallPart, ToolResultOutput } from './content-part';
|
|
2
|
+
import type { ProviderMetadata } from './provider-metadata';
|
|
3
|
+
export type AuxiliaryMessageData = {
|
|
4
|
+
providerOptions?: ProviderMetadata;
|
|
5
|
+
tags?: string[];
|
|
6
|
+
/**
|
|
7
|
+
* Unix timestamp (ms) when the message was added to history.
|
|
8
|
+
* Used to detect prompt cache expiry (>5 min gap = cache miss).
|
|
9
|
+
* This field is stripped before sending to the LLM.
|
|
10
|
+
*/
|
|
11
|
+
sentAt?: number;
|
|
12
|
+
/** @deprecated Use tags instead. */
|
|
13
|
+
timeToLive?: 'agentStep' | 'userPrompt';
|
|
14
|
+
/** @deprecated Use tags instead. */
|
|
15
|
+
keepDuringTruncation?: boolean;
|
|
16
|
+
/** @deprecated Use tags instead. */
|
|
17
|
+
keepLastTags?: string[];
|
|
18
|
+
};
|
|
19
|
+
export type SystemMessage = {
|
|
20
|
+
role: 'system';
|
|
21
|
+
content: TextPart[];
|
|
22
|
+
} & AuxiliaryMessageData;
|
|
23
|
+
export type UserMessage = {
|
|
24
|
+
role: 'user';
|
|
25
|
+
content: (TextPart | ImagePart | FilePart)[];
|
|
26
|
+
} & AuxiliaryMessageData;
|
|
27
|
+
export type AssistantMessage = {
|
|
28
|
+
role: 'assistant';
|
|
29
|
+
content: (TextPart | ReasoningPart | ToolCallPart)[];
|
|
30
|
+
} & AuxiliaryMessageData;
|
|
31
|
+
export type ToolMessage = {
|
|
32
|
+
role: 'tool';
|
|
33
|
+
toolCallId: string;
|
|
34
|
+
toolName: string;
|
|
35
|
+
content: ToolResultOutput[];
|
|
36
|
+
} & AuxiliaryMessageData;
|
|
37
|
+
export type Message = SystemMessage | UserMessage | AssistantMessage | ToolMessage;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import z from 'zod/v4';
|
|
2
|
+
export declare const providerMetadataSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<import("../json").JSONValue, unknown, z.core.$ZodTypeInternals<import("../json").JSONValue, unknown>>>>;
|
|
3
|
+
export type ProviderMetadata = z.infer<typeof providerMetadataSchema>;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import z from 'zod/v4';
|
|
2
|
+
export declare const printModeStartSchema: z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"start">;
|
|
4
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
5
|
+
messageHistoryLength: z.ZodNumber;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type PrintModeStart = z.infer<typeof printModeStartSchema>;
|
|
8
|
+
export declare const printModeErrorSchema: z.ZodObject<{
|
|
9
|
+
type: z.ZodLiteral<"error">;
|
|
10
|
+
message: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type PrintModeError = z.infer<typeof printModeErrorSchema>;
|
|
13
|
+
export declare const printModeDownloadStatusSchema: z.ZodObject<{
|
|
14
|
+
type: z.ZodLiteral<"download">;
|
|
15
|
+
version: z.ZodString;
|
|
16
|
+
status: z.ZodEnum<{
|
|
17
|
+
failed: "failed";
|
|
18
|
+
complete: "complete";
|
|
19
|
+
}>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export type PrintModeDownloadStatus = z.infer<typeof printModeDownloadStatusSchema>;
|
|
22
|
+
export declare const printModeToolCallSchema: z.ZodObject<{
|
|
23
|
+
type: z.ZodLiteral<"tool_call">;
|
|
24
|
+
toolCallId: z.ZodString;
|
|
25
|
+
toolName: z.ZodString;
|
|
26
|
+
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
27
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
28
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
29
|
+
includeToolCall: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type PrintModeToolCall = z.infer<typeof printModeToolCallSchema>;
|
|
32
|
+
export declare const printModeToolResultSchema: z.ZodObject<{
|
|
33
|
+
type: z.ZodLiteral<"tool_result">;
|
|
34
|
+
toolCallId: z.ZodString;
|
|
35
|
+
toolName: z.ZodString;
|
|
36
|
+
output: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
37
|
+
type: z.ZodLiteral<"json">;
|
|
38
|
+
value: z.ZodType<import("src").JSONValue, unknown, z.core.$ZodTypeInternals<import("src").JSONValue, unknown>>;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
type: z.ZodLiteral<"media">;
|
|
41
|
+
data: z.ZodString;
|
|
42
|
+
mediaType: z.ZodString;
|
|
43
|
+
}, z.core.$strip>], "type">>;
|
|
44
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export type PrintModeToolResult = z.infer<typeof printModeToolResultSchema>;
|
|
47
|
+
export declare const printModeTextSchema: z.ZodObject<{
|
|
48
|
+
type: z.ZodLiteral<"text">;
|
|
49
|
+
text: z.ZodString;
|
|
50
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export type PrintModeText = z.infer<typeof printModeTextSchema>;
|
|
53
|
+
export declare const printModeFinishSchema: z.ZodObject<{
|
|
54
|
+
type: z.ZodLiteral<"finish">;
|
|
55
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
56
|
+
totalCost: z.ZodNumber;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
export type PrintModeFinish = z.infer<typeof printModeFinishSchema>;
|
|
59
|
+
export declare const printModeSubagentStartSchema: z.ZodObject<{
|
|
60
|
+
type: z.ZodLiteral<"subagent_start">;
|
|
61
|
+
agentId: z.ZodString;
|
|
62
|
+
agentType: z.ZodString;
|
|
63
|
+
displayName: z.ZodString;
|
|
64
|
+
onlyChild: z.ZodBoolean;
|
|
65
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
66
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
67
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type PrintModeSubagentStart = z.infer<typeof printModeSubagentStartSchema>;
|
|
70
|
+
export declare const printModeSubagentFinishSchema: z.ZodObject<{
|
|
71
|
+
type: z.ZodLiteral<"subagent_finish">;
|
|
72
|
+
agentId: z.ZodString;
|
|
73
|
+
agentType: z.ZodString;
|
|
74
|
+
displayName: z.ZodString;
|
|
75
|
+
onlyChild: z.ZodBoolean;
|
|
76
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
77
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
78
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
export type PrintModeSubagentFinish = z.infer<typeof printModeSubagentFinishSchema>;
|
|
81
|
+
export declare const printModeReasoningDeltaSchema: z.ZodObject<{
|
|
82
|
+
type: z.ZodLiteral<"reasoning_delta">;
|
|
83
|
+
text: z.ZodString;
|
|
84
|
+
ancestorRunIds: z.ZodArray<z.ZodString>;
|
|
85
|
+
runId: z.ZodString;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
export type PrintModeReasoningDelta = z.infer<typeof printModeReasoningDeltaSchema>;
|
|
88
|
+
export declare const printModeEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
89
|
+
type: z.ZodLiteral<"download">;
|
|
90
|
+
version: z.ZodString;
|
|
91
|
+
status: z.ZodEnum<{
|
|
92
|
+
failed: "failed";
|
|
93
|
+
complete: "complete";
|
|
94
|
+
}>;
|
|
95
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
+
type: z.ZodLiteral<"error">;
|
|
97
|
+
message: z.ZodString;
|
|
98
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
+
type: z.ZodLiteral<"finish">;
|
|
100
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
101
|
+
totalCost: z.ZodNumber;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
type: z.ZodLiteral<"start">;
|
|
104
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
105
|
+
messageHistoryLength: z.ZodNumber;
|
|
106
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
+
type: z.ZodLiteral<"subagent_finish">;
|
|
108
|
+
agentId: z.ZodString;
|
|
109
|
+
agentType: z.ZodString;
|
|
110
|
+
displayName: z.ZodString;
|
|
111
|
+
onlyChild: z.ZodBoolean;
|
|
112
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
113
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
114
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
116
|
+
type: z.ZodLiteral<"subagent_start">;
|
|
117
|
+
agentId: z.ZodString;
|
|
118
|
+
agentType: z.ZodString;
|
|
119
|
+
displayName: z.ZodString;
|
|
120
|
+
onlyChild: z.ZodBoolean;
|
|
121
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
122
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
123
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
125
|
+
type: z.ZodLiteral<"text">;
|
|
126
|
+
text: z.ZodString;
|
|
127
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
128
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
129
|
+
type: z.ZodLiteral<"tool_call">;
|
|
130
|
+
toolCallId: z.ZodString;
|
|
131
|
+
toolName: z.ZodString;
|
|
132
|
+
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
133
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
134
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
135
|
+
includeToolCall: z.ZodOptional<z.ZodBoolean>;
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
137
|
+
type: z.ZodLiteral<"tool_result">;
|
|
138
|
+
toolCallId: z.ZodString;
|
|
139
|
+
toolName: z.ZodString;
|
|
140
|
+
output: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
141
|
+
type: z.ZodLiteral<"json">;
|
|
142
|
+
value: z.ZodType<import("src").JSONValue, unknown, z.core.$ZodTypeInternals<import("src").JSONValue, unknown>>;
|
|
143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<"media">;
|
|
145
|
+
data: z.ZodString;
|
|
146
|
+
mediaType: z.ZodString;
|
|
147
|
+
}, z.core.$strip>], "type">>;
|
|
148
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
149
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
150
|
+
type: z.ZodLiteral<"reasoning_delta">;
|
|
151
|
+
text: z.ZodString;
|
|
152
|
+
ancestorRunIds: z.ZodArray<z.ZodString>;
|
|
153
|
+
runId: z.ZodString;
|
|
154
|
+
}, z.core.$strip>], "type">;
|
|
155
|
+
export type PrintModeEvent = z.infer<typeof printModeEventSchema>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import type { Message } from './messages/levelcode-message';
|
|
3
|
+
import type { ProjectFileContext } from '../util/file';
|
|
4
|
+
export declare const toolCallSchema: z.ZodObject<{
|
|
5
|
+
toolName: z.ZodString;
|
|
6
|
+
toolCallId: z.ZodString;
|
|
7
|
+
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type ToolCall = z.infer<typeof toolCallSchema>;
|
|
10
|
+
export declare const subgoalSchema: z.ZodObject<{
|
|
11
|
+
objective: z.ZodOptional<z.ZodString>;
|
|
12
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
NOT_STARTED: "NOT_STARTED";
|
|
14
|
+
IN_PROGRESS: "IN_PROGRESS";
|
|
15
|
+
COMPLETE: "COMPLETE";
|
|
16
|
+
ABORTED: "ABORTED";
|
|
17
|
+
}>>;
|
|
18
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
19
|
+
logs: z.ZodArray<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export type Subgoal = z.infer<typeof subgoalSchema>;
|
|
22
|
+
export type AgentState = {
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated agentId is replaced by runId
|
|
25
|
+
*/
|
|
26
|
+
agentId: string;
|
|
27
|
+
agentType: AgentTemplateType | null;
|
|
28
|
+
agentContext: Record<string, Subgoal>;
|
|
29
|
+
ancestorRunIds: string[];
|
|
30
|
+
runId?: string;
|
|
31
|
+
subagents: AgentState[];
|
|
32
|
+
childRunIds: string[];
|
|
33
|
+
messageHistory: Message[];
|
|
34
|
+
stepsRemaining: number;
|
|
35
|
+
creditsUsed: number;
|
|
36
|
+
directCreditsUsed: number;
|
|
37
|
+
output?: Record<string, any>;
|
|
38
|
+
parentId?: string;
|
|
39
|
+
systemPrompt: string;
|
|
40
|
+
toolDefinitions: Record<string, {
|
|
41
|
+
description: string | undefined;
|
|
42
|
+
inputSchema: {};
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* The accurate token count from the Anthropic API.
|
|
46
|
+
* This is updated on every agent step via the /api/v1/token-count endpoint.
|
|
47
|
+
*/
|
|
48
|
+
contextTokenCount: number;
|
|
49
|
+
};
|
|
50
|
+
export declare const AgentOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
51
|
+
type: z.ZodLiteral<"structuredOutput">;
|
|
52
|
+
value: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodNull]>;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
type: z.ZodLiteral<"lastMessage">;
|
|
55
|
+
value: z.ZodArray<z.ZodAny>;
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
+
type: z.ZodLiteral<"allMessages">;
|
|
58
|
+
value: z.ZodArray<z.ZodAny>;
|
|
59
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
60
|
+
type: z.ZodLiteral<"error">;
|
|
61
|
+
message: z.ZodString;
|
|
62
|
+
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
}, z.core.$strip>], "type">;
|
|
64
|
+
export type AgentOutput = z.infer<typeof AgentOutputSchema>;
|
|
65
|
+
export declare const AgentTemplateTypeList: readonly ["base", "base_free", "base_max", "base_experimental", "claude4_gemini_thinking", "superagent", "base_agent_builder", "ask", "planner", "dry_run", "thinker", "file_picker", "file_explorer", "researcher", "reviewer", "agent_builder", "example_programmatic"];
|
|
66
|
+
type UnderscoreToDash<S extends string> = S extends `${infer L}_${infer R}` ? `${L}-${UnderscoreToDash<R>}` : S;
|
|
67
|
+
export declare const AgentTemplateTypes: { [K in (typeof AgentTemplateTypeList)[number]]: UnderscoreToDash<K>; };
|
|
68
|
+
declare const agentTemplateTypeSchema: z.ZodEnum<{
|
|
69
|
+
base: "base";
|
|
70
|
+
base_free: "base_free";
|
|
71
|
+
base_max: "base_max";
|
|
72
|
+
base_experimental: "base_experimental";
|
|
73
|
+
claude4_gemini_thinking: "claude4_gemini_thinking";
|
|
74
|
+
superagent: "superagent";
|
|
75
|
+
base_agent_builder: "base_agent_builder";
|
|
76
|
+
ask: "ask";
|
|
77
|
+
planner: "planner";
|
|
78
|
+
dry_run: "dry_run";
|
|
79
|
+
thinker: "thinker";
|
|
80
|
+
file_picker: "file_picker";
|
|
81
|
+
file_explorer: "file_explorer";
|
|
82
|
+
researcher: "researcher";
|
|
83
|
+
reviewer: "reviewer";
|
|
84
|
+
agent_builder: "agent_builder";
|
|
85
|
+
example_programmatic: "example_programmatic";
|
|
86
|
+
}>;
|
|
87
|
+
export type AgentTemplateType = z.infer<typeof agentTemplateTypeSchema> | (string & {});
|
|
88
|
+
export type SessionState = {
|
|
89
|
+
fileContext: ProjectFileContext;
|
|
90
|
+
mainAgentState: AgentState;
|
|
91
|
+
};
|
|
92
|
+
export declare function getInitialAgentState(): AgentState;
|
|
93
|
+
export declare function getInitialSessionState(fileContext: ProjectFileContext): SessionState;
|
|
94
|
+
export {};
|