@soederpop/luca 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +2 -0
- package/assistants/codingAssistant/hooks.ts +3 -0
- package/assistants/inkbot/CORE.md +69 -0
- package/assistants/inkbot/hooks.ts +14 -0
- package/assistants/inkbot/tools.ts +47 -0
- package/commands/inkbot.ts +353 -0
- package/dist/agi/container.server.d.ts +63 -0
- package/dist/agi/container.server.d.ts.map +1 -0
- package/dist/agi/endpoints/ask.d.ts +20 -0
- package/dist/agi/endpoints/ask.d.ts.map +1 -0
- package/dist/agi/endpoints/conversations/[id].d.ts +27 -0
- package/dist/agi/endpoints/conversations/[id].d.ts.map +1 -0
- package/dist/agi/endpoints/conversations.d.ts +18 -0
- package/dist/agi/endpoints/conversations.d.ts.map +1 -0
- package/dist/agi/endpoints/experts.d.ts +8 -0
- package/dist/agi/endpoints/experts.d.ts.map +1 -0
- package/dist/agi/feature.d.ts +9 -0
- package/dist/agi/feature.d.ts.map +1 -0
- package/dist/agi/features/assistant.d.ts +509 -0
- package/dist/agi/features/assistant.d.ts.map +1 -0
- package/dist/agi/features/assistants-manager.d.ts +236 -0
- package/dist/agi/features/assistants-manager.d.ts.map +1 -0
- package/dist/agi/features/autonomous-assistant.d.ts +281 -0
- package/dist/agi/features/autonomous-assistant.d.ts.map +1 -0
- package/dist/agi/features/browser-use.d.ts +479 -0
- package/dist/agi/features/browser-use.d.ts.map +1 -0
- package/dist/agi/features/claude-code.d.ts +824 -0
- package/dist/agi/features/claude-code.d.ts.map +1 -0
- package/dist/agi/features/conversation-history.d.ts +245 -0
- package/dist/agi/features/conversation-history.d.ts.map +1 -0
- package/dist/agi/features/conversation.d.ts +464 -0
- package/dist/agi/features/conversation.d.ts.map +1 -0
- package/dist/agi/features/docs-reader.d.ts +72 -0
- package/dist/agi/features/docs-reader.d.ts.map +1 -0
- package/dist/agi/features/file-tools.d.ts +110 -0
- package/dist/agi/features/file-tools.d.ts.map +1 -0
- package/dist/agi/features/luca-coder.d.ts +323 -0
- package/dist/agi/features/luca-coder.d.ts.map +1 -0
- package/dist/agi/features/openai-codex.d.ts +381 -0
- package/dist/agi/features/openai-codex.d.ts.map +1 -0
- package/dist/agi/features/openapi.d.ts +200 -0
- package/dist/agi/features/openapi.d.ts.map +1 -0
- package/dist/agi/features/skills-library.d.ts +167 -0
- package/dist/agi/features/skills-library.d.ts.map +1 -0
- package/dist/agi/index.d.ts +5 -0
- package/dist/agi/index.d.ts.map +1 -0
- package/dist/agi/lib/interceptor-chain.d.ts +44 -0
- package/dist/agi/lib/interceptor-chain.d.ts.map +1 -0
- package/dist/agi/lib/token-counter.d.ts +13 -0
- package/dist/agi/lib/token-counter.d.ts.map +1 -0
- package/dist/bootstrap/generated.d.ts +5 -0
- package/dist/bootstrap/generated.d.ts.map +1 -0
- package/dist/browser.d.ts +12 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/bus.d.ts +29 -0
- package/dist/bus.d.ts.map +1 -0
- package/dist/cli/build-info.d.ts +4 -0
- package/dist/cli/build-info.d.ts.map +1 -0
- package/dist/cli/cli.d.ts +3 -0
- package/dist/cli/cli.d.ts.map +1 -0
- package/dist/client.d.ts +60 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/clients/civitai/index.d.ts +472 -0
- package/dist/clients/civitai/index.d.ts.map +1 -0
- package/dist/clients/client-template.d.ts +30 -0
- package/dist/clients/client-template.d.ts.map +1 -0
- package/dist/clients/comfyui/index.d.ts +281 -0
- package/dist/clients/comfyui/index.d.ts.map +1 -0
- package/dist/clients/elevenlabs/index.d.ts +197 -0
- package/dist/clients/elevenlabs/index.d.ts.map +1 -0
- package/dist/clients/graph.d.ts +64 -0
- package/dist/clients/graph.d.ts.map +1 -0
- package/dist/clients/openai/index.d.ts +247 -0
- package/dist/clients/openai/index.d.ts.map +1 -0
- package/dist/clients/rest.d.ts +92 -0
- package/dist/clients/rest.d.ts.map +1 -0
- package/dist/clients/supabase/index.d.ts +176 -0
- package/dist/clients/supabase/index.d.ts.map +1 -0
- package/dist/clients/websocket.d.ts +127 -0
- package/dist/clients/websocket.d.ts.map +1 -0
- package/dist/command.d.ts +163 -0
- package/dist/command.d.ts.map +1 -0
- package/dist/commands/bootstrap.d.ts +20 -0
- package/dist/commands/bootstrap.d.ts.map +1 -0
- package/dist/commands/chat.d.ts +37 -0
- package/dist/commands/chat.d.ts.map +1 -0
- package/dist/commands/code.d.ts +28 -0
- package/dist/commands/code.d.ts.map +1 -0
- package/dist/commands/console.d.ts +22 -0
- package/dist/commands/console.d.ts.map +1 -0
- package/dist/commands/describe.d.ts +50 -0
- package/dist/commands/describe.d.ts.map +1 -0
- package/dist/commands/eval.d.ts +23 -0
- package/dist/commands/eval.d.ts.map +1 -0
- package/dist/commands/help.d.ts +25 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/index.d.ts +18 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/introspect.d.ts +24 -0
- package/dist/commands/introspect.d.ts.map +1 -0
- package/dist/commands/mcp.d.ts +35 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/prompt.d.ts +38 -0
- package/dist/commands/prompt.d.ts.map +1 -0
- package/dist/commands/run.d.ts +24 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/sandbox-mcp.d.ts +34 -0
- package/dist/commands/sandbox-mcp.d.ts.map +1 -0
- package/dist/commands/save-api-docs.d.ts +21 -0
- package/dist/commands/save-api-docs.d.ts.map +1 -0
- package/dist/commands/scaffold.d.ts +24 -0
- package/dist/commands/scaffold.d.ts.map +1 -0
- package/dist/commands/select.d.ts +22 -0
- package/dist/commands/select.d.ts.map +1 -0
- package/dist/commands/serve.d.ts +29 -0
- package/dist/commands/serve.d.ts.map +1 -0
- package/dist/container-describer.d.ts +144 -0
- package/dist/container-describer.d.ts.map +1 -0
- package/dist/container.d.ts +451 -0
- package/dist/container.d.ts.map +1 -0
- package/dist/endpoint.d.ts +113 -0
- package/dist/endpoint.d.ts.map +1 -0
- package/dist/feature.d.ts +47 -0
- package/dist/feature.d.ts.map +1 -0
- package/dist/graft.d.ts +29 -0
- package/dist/graft.d.ts.map +1 -0
- package/dist/hash-object.d.ts +8 -0
- package/dist/hash-object.d.ts.map +1 -0
- package/dist/helper.d.ts +209 -0
- package/dist/helper.d.ts.map +1 -0
- package/dist/introspection/generated.node.d.ts +44623 -0
- package/dist/introspection/generated.node.d.ts.map +1 -0
- package/dist/introspection/generated.web.d.ts +1412 -0
- package/dist/introspection/generated.web.d.ts.map +1 -0
- package/dist/introspection/index.d.ts +156 -0
- package/dist/introspection/index.d.ts.map +1 -0
- package/dist/introspection/scan.d.ts +147 -0
- package/dist/introspection/scan.d.ts.map +1 -0
- package/dist/node/container.d.ts +256 -0
- package/dist/node/container.d.ts.map +1 -0
- package/dist/node/feature.d.ts +9 -0
- package/dist/node/feature.d.ts.map +1 -0
- package/dist/node/features/container-link.d.ts +213 -0
- package/dist/node/features/container-link.d.ts.map +1 -0
- package/dist/node/features/content-db.d.ts +354 -0
- package/dist/node/features/content-db.d.ts.map +1 -0
- package/dist/node/features/disk-cache.d.ts +236 -0
- package/dist/node/features/disk-cache.d.ts.map +1 -0
- package/dist/node/features/dns.d.ts +511 -0
- package/dist/node/features/dns.d.ts.map +1 -0
- package/dist/node/features/docker.d.ts +485 -0
- package/dist/node/features/docker.d.ts.map +1 -0
- package/dist/node/features/downloader.d.ts +73 -0
- package/dist/node/features/downloader.d.ts.map +1 -0
- package/dist/node/features/figlet-fonts.d.ts +4 -0
- package/dist/node/features/figlet-fonts.d.ts.map +1 -0
- package/dist/node/features/file-manager.d.ts +177 -0
- package/dist/node/features/file-manager.d.ts.map +1 -0
- package/dist/node/features/fs.d.ts +635 -0
- package/dist/node/features/fs.d.ts.map +1 -0
- package/dist/node/features/git.d.ts +329 -0
- package/dist/node/features/git.d.ts.map +1 -0
- package/dist/node/features/google-auth.d.ts +200 -0
- package/dist/node/features/google-auth.d.ts.map +1 -0
- package/dist/node/features/google-calendar.d.ts +194 -0
- package/dist/node/features/google-calendar.d.ts.map +1 -0
- package/dist/node/features/google-docs.d.ts +138 -0
- package/dist/node/features/google-docs.d.ts.map +1 -0
- package/dist/node/features/google-drive.d.ts +202 -0
- package/dist/node/features/google-drive.d.ts.map +1 -0
- package/dist/node/features/google-mail.d.ts +221 -0
- package/dist/node/features/google-mail.d.ts.map +1 -0
- package/dist/node/features/google-sheets.d.ts +157 -0
- package/dist/node/features/google-sheets.d.ts.map +1 -0
- package/dist/node/features/grep.d.ts +207 -0
- package/dist/node/features/grep.d.ts.map +1 -0
- package/dist/node/features/helpers.d.ts +236 -0
- package/dist/node/features/helpers.d.ts.map +1 -0
- package/dist/node/features/ink.d.ts +332 -0
- package/dist/node/features/ink.d.ts.map +1 -0
- package/dist/node/features/ipc-socket.d.ts +298 -0
- package/dist/node/features/ipc-socket.d.ts.map +1 -0
- package/dist/node/features/json-tree.d.ts +140 -0
- package/dist/node/features/json-tree.d.ts.map +1 -0
- package/dist/node/features/networking.d.ts +373 -0
- package/dist/node/features/networking.d.ts.map +1 -0
- package/dist/node/features/nlp.d.ts +125 -0
- package/dist/node/features/nlp.d.ts.map +1 -0
- package/dist/node/features/opener.d.ts +93 -0
- package/dist/node/features/opener.d.ts.map +1 -0
- package/dist/node/features/os.d.ts +168 -0
- package/dist/node/features/os.d.ts.map +1 -0
- package/dist/node/features/package-finder.d.ts +419 -0
- package/dist/node/features/package-finder.d.ts.map +1 -0
- package/dist/node/features/postgres.d.ts +173 -0
- package/dist/node/features/postgres.d.ts.map +1 -0
- package/dist/node/features/proc.d.ts +285 -0
- package/dist/node/features/proc.d.ts.map +1 -0
- package/dist/node/features/process-manager.d.ts +427 -0
- package/dist/node/features/process-manager.d.ts.map +1 -0
- package/dist/node/features/python.d.ts +477 -0
- package/dist/node/features/python.d.ts.map +1 -0
- package/dist/node/features/redis.d.ts +247 -0
- package/dist/node/features/redis.d.ts.map +1 -0
- package/dist/node/features/repl.d.ts +84 -0
- package/dist/node/features/repl.d.ts.map +1 -0
- package/dist/node/features/runpod.d.ts +527 -0
- package/dist/node/features/runpod.d.ts.map +1 -0
- package/dist/node/features/secure-shell.d.ts +145 -0
- package/dist/node/features/secure-shell.d.ts.map +1 -0
- package/dist/node/features/semantic-search.d.ts +207 -0
- package/dist/node/features/semantic-search.d.ts.map +1 -0
- package/dist/node/features/sqlite.d.ts +180 -0
- package/dist/node/features/sqlite.d.ts.map +1 -0
- package/dist/node/features/telegram.d.ts +173 -0
- package/dist/node/features/telegram.d.ts.map +1 -0
- package/dist/node/features/transpiler.d.ts +51 -0
- package/dist/node/features/transpiler.d.ts.map +1 -0
- package/dist/node/features/tts.d.ts +108 -0
- package/dist/node/features/tts.d.ts.map +1 -0
- package/dist/node/features/ui.d.ts +562 -0
- package/dist/node/features/ui.d.ts.map +1 -0
- package/dist/node/features/vault.d.ts +90 -0
- package/dist/node/features/vault.d.ts.map +1 -0
- package/dist/node/features/vm.d.ts +285 -0
- package/dist/node/features/vm.d.ts.map +1 -0
- package/dist/node/features/yaml-tree.d.ts +118 -0
- package/dist/node/features/yaml-tree.d.ts.map +1 -0
- package/dist/node/features/yaml.d.ts +127 -0
- package/dist/node/features/yaml.d.ts.map +1 -0
- package/dist/node.d.ts +67 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/python/generated.d.ts +2 -0
- package/dist/python/generated.d.ts.map +1 -0
- package/dist/react/index.d.ts +36 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/registry.d.ts +97 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/scaffolds/generated.d.ts +13 -0
- package/dist/scaffolds/generated.d.ts.map +1 -0
- package/dist/scaffolds/template.d.ts +11 -0
- package/dist/scaffolds/template.d.ts.map +1 -0
- package/dist/schemas/base.d.ts +254 -0
- package/dist/schemas/base.d.ts.map +1 -0
- package/dist/selector.d.ts +130 -0
- package/dist/selector.d.ts.map +1 -0
- package/dist/server.d.ts +89 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/servers/express.d.ts +104 -0
- package/dist/servers/express.d.ts.map +1 -0
- package/dist/servers/mcp.d.ts +201 -0
- package/dist/servers/mcp.d.ts.map +1 -0
- package/dist/servers/socket.d.ts +121 -0
- package/dist/servers/socket.d.ts.map +1 -0
- package/dist/state.d.ts +24 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/web/clients/socket.d.ts +37 -0
- package/dist/web/clients/socket.d.ts.map +1 -0
- package/dist/web/container.d.ts +55 -0
- package/dist/web/container.d.ts.map +1 -0
- package/dist/web/extension.d.ts +4 -0
- package/dist/web/extension.d.ts.map +1 -0
- package/dist/web/feature.d.ts +8 -0
- package/dist/web/feature.d.ts.map +1 -0
- package/dist/web/features/asset-loader.d.ts +35 -0
- package/dist/web/features/asset-loader.d.ts.map +1 -0
- package/dist/web/features/container-link.d.ts +167 -0
- package/dist/web/features/container-link.d.ts.map +1 -0
- package/dist/web/features/esbuild.d.ts +51 -0
- package/dist/web/features/esbuild.d.ts.map +1 -0
- package/dist/web/features/helpers.d.ts +140 -0
- package/dist/web/features/helpers.d.ts.map +1 -0
- package/dist/web/features/network.d.ts +69 -0
- package/dist/web/features/network.d.ts.map +1 -0
- package/dist/web/features/speech.d.ts +71 -0
- package/dist/web/features/speech.d.ts.map +1 -0
- package/dist/web/features/vault.d.ts +62 -0
- package/dist/web/features/vault.d.ts.map +1 -0
- package/dist/web/features/vm.d.ts +48 -0
- package/dist/web/features/vm.d.ts.map +1 -0
- package/dist/web/features/voice-recognition.d.ts +96 -0
- package/dist/web/features/voice-recognition.d.ts.map +1 -0
- package/dist/web/shims/isomorphic-vm.d.ts +22 -0
- package/dist/web/shims/isomorphic-vm.d.ts.map +1 -0
- package/docs/apis/features/agi/assistant.md +1 -0
- package/docs/apis/features/agi/assistants-manager.md +62 -2
- package/docs/apis/features/agi/auto-assistant.md +11 -109
- package/docs/apis/features/agi/claude-code.md +138 -0
- package/docs/apis/features/agi/conversation.md +60 -31
- package/docs/apis/features/agi/luca-coder.md +407 -0
- package/docs/apis/features/agi/openapi.md +2 -2
- package/docs/apis/features/agi/skills-library.md +12 -0
- package/docs/apis/features/node/python.md +81 -11
- package/docs/apis/features/node/transpiler.md +74 -0
- package/docs/apis/features/web/esbuild.md +0 -6
- package/docs/apis/servers/mcp.md +2 -2
- package/docs/examples/entity.md +124 -0
- package/package.json +73 -21
- package/scripts/test-assistant-hooks.ts +13 -0
- package/src/agi/feature.ts +13 -0
- package/src/agi/features/assistant.ts +36 -25
- package/src/agi/features/assistants-manager.ts +70 -5
- package/src/agi/features/autonomous-assistant.ts +1 -5
- package/src/agi/features/browser-use.ts +2 -2
- package/src/agi/features/claude-code.ts +165 -1
- package/src/agi/features/conversation-history.ts +2 -6
- package/src/agi/features/conversation.ts +95 -3
- package/src/agi/features/docs-reader.ts +2 -1
- package/src/agi/features/file-tools.ts +2 -2
- package/src/agi/features/luca-coder.ts +1 -5
- package/src/agi/features/openai-codex.ts +1 -1
- package/src/agi/features/openapi.ts +3 -3
- package/src/agi/features/skills-library.ts +90 -2
- package/src/agi/lib/interceptor-chain.ts +10 -0
- package/src/agi/lib/token-counter.ts +1 -1
- package/src/bootstrap/generated.ts +126 -1
- package/src/bus.ts +27 -5
- package/src/cli/build-info.ts +2 -2
- package/src/client.ts +2 -2
- package/src/clients/elevenlabs/index.ts +5 -0
- package/src/commands/bootstrap.ts +2 -1
- package/src/commands/chat.ts +1 -0
- package/src/commands/code.ts +4 -2
- package/src/commands/prompt.ts +34 -34
- package/src/commands/sandbox-mcp.ts +69 -163
- package/src/commands/save-api-docs.ts +10 -8
- package/src/commands/select.ts +8 -3
- package/src/container-describer.ts +70 -84
- package/src/container.ts +93 -3
- package/src/endpoint.ts +1 -1
- package/src/entity.ts +173 -0
- package/src/feature.ts +3 -3
- package/src/helper.ts +8 -4
- package/src/introspection/generated.agi.ts +1403 -929
- package/src/introspection/generated.node.ts +127 -33
- package/src/introspection/generated.web.ts +95 -3
- package/src/introspection/scan.ts +1 -1
- package/src/node/container.ts +1 -1
- package/src/node/features/content-db.ts +3 -3
- package/src/node/features/file-manager.ts +10 -9
- package/src/node/features/git.ts +5 -5
- package/src/node/features/helpers.ts +1 -1
- package/src/node/features/json-tree.ts +1 -1
- package/src/node/features/os.ts +3 -3
- package/src/node/features/package-finder.ts +1 -1
- package/src/node/features/process-manager.ts +1 -1
- package/src/node/features/python.ts +3 -3
- package/src/node/features/redis.ts +1 -1
- package/src/node/features/repl.ts +2 -2
- package/src/node/features/transpiler.ts +34 -9
- package/src/node/features/ui.ts +1 -1
- package/src/node/features/vm.ts +6 -5
- package/src/node/features/yaml-tree.ts +1 -1
- package/src/node.ts +1 -0
- package/src/python/generated.ts +1 -1
- package/src/scaffolds/generated.ts +1 -1
- package/src/selector.ts +74 -4
- package/src/server.ts +2 -2
- package/src/servers/mcp.ts +6 -6
- package/src/web/features/helpers.ts +1 -1
- package/src/web/features/network.ts +1 -0
- package/test/assistant.test.ts +72 -0
- package/test/conversation.test.ts +220 -0
- package/test/vm-loadmodule.test.ts +213 -0
- package/tsconfig.build.json +12 -0
- package/tsconfig.json +1 -1
- package/scripts/examples/telegram-ink-ui.ts +0 -302
- package/scripts/examples/using-openai-codex.ts +0 -23
- package/scripts/examples/vm-loading-esm-modules.ts +0 -16
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
# LucaCoder (features.lucaCoder)
|
|
2
|
+
|
|
3
|
+
A coding assistant that owns a lower-level Assistant instance and gates all tool calls through a permission system. Comes with built-in Bash tool (via proc.execAndCapture) and auto-loads the luca-framework skill when found in .claude/skills paths. Tools are stacked from feature bundles (fileTools, etc.) and each tool can be set to 'allow' (runs immediately), 'ask' (blocks until user approves/denies), or 'deny' (always rejected).
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
container.feature('lucaCoder', {
|
|
9
|
+
// Tool bundles to register on the inner assistant
|
|
10
|
+
tools,
|
|
11
|
+
// Permission level per tool name
|
|
12
|
+
permissions,
|
|
13
|
+
// Default permission level for unconfigured tools
|
|
14
|
+
defaultPermission,
|
|
15
|
+
// System prompt for the inner assistant
|
|
16
|
+
systemPrompt,
|
|
17
|
+
// OpenAI model override
|
|
18
|
+
model,
|
|
19
|
+
// Maximum number of output tokens per completion
|
|
20
|
+
maxTokens,
|
|
21
|
+
// Use a local API server for the inner assistant
|
|
22
|
+
local,
|
|
23
|
+
// Conversation history persistence mode
|
|
24
|
+
historyMode,
|
|
25
|
+
// Assistant folder for disk-based definitions
|
|
26
|
+
folder,
|
|
27
|
+
// Skill names to auto-load into the system prompt
|
|
28
|
+
skills,
|
|
29
|
+
// Auto-load luca-framework skill if found in .claude/skills path
|
|
30
|
+
autoLoadLucaSkill,
|
|
31
|
+
})
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Options (Zod v4 schema)
|
|
35
|
+
|
|
36
|
+
| Property | Type | Description |
|
|
37
|
+
|----------|------|-------------|
|
|
38
|
+
| `tools` | `array` | Tool bundles to register on the inner assistant |
|
|
39
|
+
| `permissions` | `object` | Permission level per tool name |
|
|
40
|
+
| `defaultPermission` | `string` | Default permission level for unconfigured tools |
|
|
41
|
+
| `systemPrompt` | `string` | System prompt for the inner assistant |
|
|
42
|
+
| `model` | `string` | OpenAI model override |
|
|
43
|
+
| `maxTokens` | `number` | Maximum number of output tokens per completion |
|
|
44
|
+
| `local` | `boolean` | Use a local API server for the inner assistant |
|
|
45
|
+
| `historyMode` | `string` | Conversation history persistence mode |
|
|
46
|
+
| `folder` | `string` | Assistant folder for disk-based definitions |
|
|
47
|
+
| `skills` | `array` | Skill names to auto-load into the system prompt |
|
|
48
|
+
| `autoLoadLucaSkill` | `boolean` | Auto-load luca-framework skill if found in .claude/skills path |
|
|
49
|
+
|
|
50
|
+
## Methods
|
|
51
|
+
|
|
52
|
+
### getPermission
|
|
53
|
+
|
|
54
|
+
Get the effective permission level for a tool.
|
|
55
|
+
|
|
56
|
+
**Parameters:**
|
|
57
|
+
|
|
58
|
+
| Name | Type | Required | Description |
|
|
59
|
+
|------|------|----------|-------------|
|
|
60
|
+
| `toolName` | `string` | ✓ | Parameter toolName |
|
|
61
|
+
|
|
62
|
+
**Returns:** `PermissionLevel`
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### setPermission
|
|
67
|
+
|
|
68
|
+
Set permission level for one or more tools.
|
|
69
|
+
|
|
70
|
+
**Parameters:**
|
|
71
|
+
|
|
72
|
+
| Name | Type | Required | Description |
|
|
73
|
+
|------|------|----------|-------------|
|
|
74
|
+
| `toolName` | `string | string[]` | ✓ | Parameter toolName |
|
|
75
|
+
| `level` | `PermissionLevel` | ✓ | Parameter level |
|
|
76
|
+
|
|
77
|
+
**Returns:** `this`
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### setDefaultPermission
|
|
82
|
+
|
|
83
|
+
Set the default permission level for unconfigured tools.
|
|
84
|
+
|
|
85
|
+
**Parameters:**
|
|
86
|
+
|
|
87
|
+
| Name | Type | Required | Description |
|
|
88
|
+
|------|------|----------|-------------|
|
|
89
|
+
| `level` | `PermissionLevel` | ✓ | Parameter level |
|
|
90
|
+
|
|
91
|
+
**Returns:** `this`
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
### permitTool
|
|
96
|
+
|
|
97
|
+
Allow a tool (or tools) to run without approval.
|
|
98
|
+
|
|
99
|
+
**Parameters:**
|
|
100
|
+
|
|
101
|
+
| Name | Type | Required | Description |
|
|
102
|
+
|------|------|----------|-------------|
|
|
103
|
+
| `toolNames` | `string[]` | ✓ | Parameter toolNames |
|
|
104
|
+
|
|
105
|
+
**Returns:** `this`
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### gateTool
|
|
110
|
+
|
|
111
|
+
Require approval before a tool (or tools) can run.
|
|
112
|
+
|
|
113
|
+
**Parameters:**
|
|
114
|
+
|
|
115
|
+
| Name | Type | Required | Description |
|
|
116
|
+
|------|------|----------|-------------|
|
|
117
|
+
| `toolNames` | `string[]` | ✓ | Parameter toolNames |
|
|
118
|
+
|
|
119
|
+
**Returns:** `this`
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### blockTool
|
|
124
|
+
|
|
125
|
+
Block a tool (or tools) from ever running.
|
|
126
|
+
|
|
127
|
+
**Parameters:**
|
|
128
|
+
|
|
129
|
+
| Name | Type | Required | Description |
|
|
130
|
+
|------|------|----------|-------------|
|
|
131
|
+
| `toolNames` | `string[]` | ✓ | Parameter toolNames |
|
|
132
|
+
|
|
133
|
+
**Returns:** `this`
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
### approve
|
|
138
|
+
|
|
139
|
+
Approve a pending tool call by ID. The tool will execute.
|
|
140
|
+
|
|
141
|
+
**Parameters:**
|
|
142
|
+
|
|
143
|
+
| Name | Type | Required | Description |
|
|
144
|
+
|------|------|----------|-------------|
|
|
145
|
+
| `id` | `string` | ✓ | Parameter id |
|
|
146
|
+
|
|
147
|
+
**Returns:** `this`
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### deny
|
|
152
|
+
|
|
153
|
+
Deny a pending tool call by ID. The tool call will be skipped.
|
|
154
|
+
|
|
155
|
+
**Parameters:**
|
|
156
|
+
|
|
157
|
+
| Name | Type | Required | Description |
|
|
158
|
+
|------|------|----------|-------------|
|
|
159
|
+
| `id` | `string` | ✓ | Parameter id |
|
|
160
|
+
|
|
161
|
+
**Returns:** `this`
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
### approveAll
|
|
166
|
+
|
|
167
|
+
Approve all pending tool calls.
|
|
168
|
+
|
|
169
|
+
**Returns:** `this`
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
### denyAll
|
|
174
|
+
|
|
175
|
+
Deny all pending tool calls.
|
|
176
|
+
|
|
177
|
+
**Returns:** `this`
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
### bash
|
|
182
|
+
|
|
183
|
+
Execute a shell command string and return its output. Uses proc.execAndCapture under the hood — runs `sh -c <command>`.
|
|
184
|
+
|
|
185
|
+
**Parameters:**
|
|
186
|
+
|
|
187
|
+
| Name | Type | Required | Description |
|
|
188
|
+
|------|------|----------|-------------|
|
|
189
|
+
| `{ command, cwd, timeout }` | `{ command: string; cwd?: string; timeout?: number }` | ✓ | Parameter { command, cwd, timeout } |
|
|
190
|
+
|
|
191
|
+
**Returns:** `Promise<{
|
|
192
|
+
exitCode: number
|
|
193
|
+
stdout: string
|
|
194
|
+
stderr: string
|
|
195
|
+
success: boolean
|
|
196
|
+
}>`
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
### start
|
|
201
|
+
|
|
202
|
+
Initialize the inner assistant, register the bash tool, stack tool bundles, auto-load skills, and wire up the permission interceptor.
|
|
203
|
+
|
|
204
|
+
**Returns:** `Promise<this>`
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
### ask
|
|
209
|
+
|
|
210
|
+
Ask the coder a question. Auto-starts if needed. Tool calls will be gated by the permission system.
|
|
211
|
+
|
|
212
|
+
**Parameters:**
|
|
213
|
+
|
|
214
|
+
| Name | Type | Required | Description |
|
|
215
|
+
|------|------|----------|-------------|
|
|
216
|
+
| `question` | `string` | ✓ | Parameter question |
|
|
217
|
+
| `options` | `Record<string, any>` | | Parameter options |
|
|
218
|
+
|
|
219
|
+
**Returns:** `Promise<string>`
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
### use
|
|
224
|
+
|
|
225
|
+
Add a tool bundle after initialization. Useful for dynamically extending the assistant's capabilities.
|
|
226
|
+
|
|
227
|
+
**Parameters:**
|
|
228
|
+
|
|
229
|
+
| Name | Type | Required | Description |
|
|
230
|
+
|------|------|----------|-------------|
|
|
231
|
+
| `spec` | `ToolBundleSpec` | ✓ | Parameter spec |
|
|
232
|
+
|
|
233
|
+
**Returns:** `this`
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
## Getters
|
|
238
|
+
|
|
239
|
+
| Property | Type | Description |
|
|
240
|
+
|----------|------|-------------|
|
|
241
|
+
| `assistant` | `Assistant` | The inner assistant. Throws if not started. |
|
|
242
|
+
| `permissions` | `Record<string, PermissionLevel>` | Current permission map from state. |
|
|
243
|
+
| `pendingApprovals` | `PendingApproval[]` | Current pending approvals. |
|
|
244
|
+
| `isStarted` | `boolean` | Whether the assistant is started and ready. |
|
|
245
|
+
| `tools` | `Record<string, any>` | The tools registered on the inner assistant. |
|
|
246
|
+
| `conversation` | `any` | The conversation on the inner assistant (if started). |
|
|
247
|
+
| `messages` | `any` | Messages from the inner assistant's conversation. |
|
|
248
|
+
|
|
249
|
+
## Events (Zod v4 schema)
|
|
250
|
+
|
|
251
|
+
### permissionGranted
|
|
252
|
+
|
|
253
|
+
Emitted when a pending tool call is approved
|
|
254
|
+
|
|
255
|
+
**Event Arguments:**
|
|
256
|
+
|
|
257
|
+
| Name | Type | Description |
|
|
258
|
+
|------|------|-------------|
|
|
259
|
+
| `arg0` | `string` | Approval ID |
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
### permissionDenied
|
|
264
|
+
|
|
265
|
+
Emitted when a pending tool call is denied
|
|
266
|
+
|
|
267
|
+
**Event Arguments:**
|
|
268
|
+
|
|
269
|
+
| Name | Type | Description |
|
|
270
|
+
|------|------|-------------|
|
|
271
|
+
| `arg0` | `string` | Approval ID |
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
### toolBlocked
|
|
276
|
+
|
|
277
|
+
Emitted when a tool call is blocked by deny policy
|
|
278
|
+
|
|
279
|
+
**Event Arguments:**
|
|
280
|
+
|
|
281
|
+
| Name | Type | Description |
|
|
282
|
+
|------|------|-------------|
|
|
283
|
+
| `arg0` | `string` | Tool name |
|
|
284
|
+
| `arg1` | `string` | Reason |
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
### chunk
|
|
289
|
+
|
|
290
|
+
Forwarded: streamed token chunk from the inner assistant
|
|
291
|
+
|
|
292
|
+
**Event Arguments:**
|
|
293
|
+
|
|
294
|
+
| Name | Type | Description |
|
|
295
|
+
|------|------|-------------|
|
|
296
|
+
| `arg0` | `string` | A chunk of streamed text |
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
### response
|
|
301
|
+
|
|
302
|
+
Forwarded: complete response from the inner assistant
|
|
303
|
+
|
|
304
|
+
**Event Arguments:**
|
|
305
|
+
|
|
306
|
+
| Name | Type | Description |
|
|
307
|
+
|------|------|-------------|
|
|
308
|
+
| `arg0` | `string` | The final response text |
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
### toolCall
|
|
313
|
+
|
|
314
|
+
Forwarded: a tool was called
|
|
315
|
+
|
|
316
|
+
**Event Arguments:**
|
|
317
|
+
|
|
318
|
+
| Name | Type | Description |
|
|
319
|
+
|------|------|-------------|
|
|
320
|
+
| `arg0` | `string` | Tool name |
|
|
321
|
+
| `arg1` | `any` | Tool arguments |
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
### toolResult
|
|
326
|
+
|
|
327
|
+
Forwarded: a tool returned a result
|
|
328
|
+
|
|
329
|
+
**Event Arguments:**
|
|
330
|
+
|
|
331
|
+
| Name | Type | Description |
|
|
332
|
+
|------|------|-------------|
|
|
333
|
+
| `arg0` | `string` | Tool name |
|
|
334
|
+
| `arg1` | `any` | Result value |
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
### toolError
|
|
339
|
+
|
|
340
|
+
Forwarded: a tool call failed
|
|
341
|
+
|
|
342
|
+
**Event Arguments:**
|
|
343
|
+
|
|
344
|
+
| Name | Type | Description |
|
|
345
|
+
|------|------|-------------|
|
|
346
|
+
| `arg0` | `string` | Tool name |
|
|
347
|
+
| `arg1` | `any` | Error |
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
### started
|
|
352
|
+
|
|
353
|
+
Emitted when the luca coder has been initialized
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
### permissionRequest
|
|
358
|
+
|
|
359
|
+
Emitted when a tool call requires user approval
|
|
360
|
+
|
|
361
|
+
**Event Arguments:**
|
|
362
|
+
|
|
363
|
+
| Name | Type | Description |
|
|
364
|
+
|------|------|-------------|
|
|
365
|
+
| `id` | `string` | Unique approval ID |
|
|
366
|
+
| `toolName` | `string` | The tool requesting permission |
|
|
367
|
+
| `args` | `object` | The arguments the tool was called with |
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
## State (Zod v4 schema)
|
|
372
|
+
|
|
373
|
+
| Property | Type | Description |
|
|
374
|
+
|----------|------|-------------|
|
|
375
|
+
| `enabled` | `boolean` | Whether this feature is currently enabled |
|
|
376
|
+
| `started` | `boolean` | Whether the assistant has been initialized |
|
|
377
|
+
| `permissions` | `object` | Permission level per tool name |
|
|
378
|
+
| `defaultPermission` | `string` | Permission level for tools not explicitly configured |
|
|
379
|
+
| `pendingApprovals` | `array` | Tool calls currently awaiting user approval |
|
|
380
|
+
| `approvalHistory` | `array` | Recent approval decisions |
|
|
381
|
+
| `loadedSkills` | `array` | Names of skills auto-loaded into context |
|
|
382
|
+
|
|
383
|
+
## Examples
|
|
384
|
+
|
|
385
|
+
**features.lucaCoder**
|
|
386
|
+
|
|
387
|
+
```ts
|
|
388
|
+
const coder = container.feature('lucaCoder', {
|
|
389
|
+
tools: ['fileTools'],
|
|
390
|
+
permissions: {
|
|
391
|
+
readFile: 'allow',
|
|
392
|
+
searchFiles: 'allow',
|
|
393
|
+
writeFile: 'ask',
|
|
394
|
+
bash: 'ask',
|
|
395
|
+
},
|
|
396
|
+
defaultPermission: 'ask',
|
|
397
|
+
systemPrompt: 'You are a coding assistant.',
|
|
398
|
+
})
|
|
399
|
+
|
|
400
|
+
coder.on('permissionRequest', ({ id, toolName, args }) => {
|
|
401
|
+
console.log(`Tool "${toolName}" wants to run with`, args)
|
|
402
|
+
coder.approve(id) // or coder.deny(id)
|
|
403
|
+
})
|
|
404
|
+
|
|
405
|
+
await coder.ask('Refactor the auth module to use async/await')
|
|
406
|
+
```
|
|
407
|
+
|
|
@@ -32,7 +32,7 @@ Get a single endpoint by its friendly name or operationId.
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
###
|
|
35
|
+
### toOpenAITools
|
|
36
36
|
|
|
37
37
|
Convert all endpoints into OpenAI-compatible tool definitions.
|
|
38
38
|
|
|
@@ -130,7 +130,7 @@ api.endpoints
|
|
|
130
130
|
api.endpoint('getPetById')
|
|
131
131
|
|
|
132
132
|
// Convert to OpenAI tool definitions
|
|
133
|
-
api.
|
|
133
|
+
api.toOpenAITools()
|
|
134
134
|
|
|
135
135
|
// Convert a single endpoint to a function definition
|
|
136
136
|
api.toFunction('getPetById')
|
|
@@ -19,6 +19,18 @@ container.feature('skillsLibrary', {
|
|
|
19
19
|
|
|
20
20
|
## Methods
|
|
21
21
|
|
|
22
|
+
### setupToolsConsumer
|
|
23
|
+
|
|
24
|
+
**Parameters:**
|
|
25
|
+
|
|
26
|
+
| Name | Type | Required | Description |
|
|
27
|
+
|------|------|----------|-------------|
|
|
28
|
+
| `assistant` | `Feature` | ✓ | Parameter assistant |
|
|
29
|
+
|
|
30
|
+
**Returns:** `void`
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
22
34
|
### start
|
|
23
35
|
|
|
24
36
|
Start the skills library: read config, scan all locations.
|
|
@@ -296,67 +296,137 @@ await python.resetSession()
|
|
|
296
296
|
|
|
297
297
|
### ready
|
|
298
298
|
|
|
299
|
-
|
|
299
|
+
When the Python environment is ready for execution
|
|
300
300
|
|
|
301
301
|
|
|
302
302
|
|
|
303
303
|
### environmentDetected
|
|
304
304
|
|
|
305
|
-
|
|
305
|
+
When the Python environment type is detected
|
|
306
|
+
|
|
307
|
+
**Event Arguments:**
|
|
308
|
+
|
|
309
|
+
| Name | Type | Description |
|
|
310
|
+
|------|------|-------------|
|
|
311
|
+
| `pythonPath` | `any` | Path to the detected Python executable |
|
|
312
|
+
| `environmentType` | `any` | Detected environment type |
|
|
306
313
|
|
|
307
314
|
|
|
308
315
|
|
|
309
316
|
### installingDependencies
|
|
310
317
|
|
|
311
|
-
|
|
318
|
+
When dependency installation begins
|
|
319
|
+
|
|
320
|
+
**Event Arguments:**
|
|
321
|
+
|
|
322
|
+
| Name | Type | Description |
|
|
323
|
+
|------|------|-------------|
|
|
324
|
+
| `command` | `string` | The install command being run |
|
|
312
325
|
|
|
313
326
|
|
|
314
327
|
|
|
315
328
|
### dependenciesInstalled
|
|
316
329
|
|
|
317
|
-
|
|
330
|
+
When dependencies are successfully installed
|
|
331
|
+
|
|
332
|
+
**Event Arguments:**
|
|
333
|
+
|
|
334
|
+
| Name | Type | Description |
|
|
335
|
+
|------|------|-------------|
|
|
336
|
+
| `stdout` | `string` | Standard output from install |
|
|
337
|
+
| `stderr` | `string` | Standard error from install |
|
|
338
|
+
| `exitCode` | `number` | Process exit code |
|
|
318
339
|
|
|
319
340
|
|
|
320
341
|
|
|
321
342
|
### dependencyInstallFailed
|
|
322
343
|
|
|
323
|
-
|
|
344
|
+
When dependency installation fails
|
|
345
|
+
|
|
346
|
+
**Event Arguments:**
|
|
347
|
+
|
|
348
|
+
| Name | Type | Description |
|
|
349
|
+
|------|------|-------------|
|
|
350
|
+
| `stdout` | `string` | Standard output from install |
|
|
351
|
+
| `stderr` | `string` | Standard error from install |
|
|
352
|
+
| `exitCode` | `number` | Process exit code |
|
|
324
353
|
|
|
325
354
|
|
|
326
355
|
|
|
327
356
|
### localsParseError
|
|
328
357
|
|
|
329
|
-
|
|
358
|
+
When captured locals fail to parse as JSON
|
|
359
|
+
|
|
360
|
+
**Event Arguments:**
|
|
361
|
+
|
|
362
|
+
| Name | Type | Description |
|
|
363
|
+
|------|------|-------------|
|
|
364
|
+
| `arg0` | `any` | The parse error |
|
|
330
365
|
|
|
331
366
|
|
|
332
367
|
|
|
333
368
|
### codeExecuted
|
|
334
369
|
|
|
335
|
-
|
|
370
|
+
When Python code finishes executing
|
|
371
|
+
|
|
372
|
+
**Event Arguments:**
|
|
373
|
+
|
|
374
|
+
| Name | Type | Description |
|
|
375
|
+
|------|------|-------------|
|
|
376
|
+
| `code` | `string` | The Python code that was executed |
|
|
377
|
+
| `variables` | `object` | Variables passed to the execution |
|
|
378
|
+
| `result` | `object` | Execution result |
|
|
336
379
|
|
|
337
380
|
|
|
338
381
|
|
|
339
382
|
### fileExecuted
|
|
340
383
|
|
|
341
|
-
|
|
384
|
+
When a Python file finishes executing
|
|
385
|
+
|
|
386
|
+
**Event Arguments:**
|
|
387
|
+
|
|
388
|
+
| Name | Type | Description |
|
|
389
|
+
|------|------|-------------|
|
|
390
|
+
| `filePath` | `string` | Path to the executed Python file |
|
|
391
|
+
| `variables` | `object` | Variables passed as arguments |
|
|
392
|
+
| `result` | `object` | Execution result |
|
|
342
393
|
|
|
343
394
|
|
|
344
395
|
|
|
345
396
|
### sessionError
|
|
346
397
|
|
|
347
|
-
|
|
398
|
+
When a session-level error occurs
|
|
399
|
+
|
|
400
|
+
**Event Arguments:**
|
|
401
|
+
|
|
402
|
+
| Name | Type | Description |
|
|
403
|
+
|------|------|-------------|
|
|
404
|
+
| `error` | `string` | Error message |
|
|
405
|
+
| `sessionId` | `any` | Session identifier, if available |
|
|
348
406
|
|
|
349
407
|
|
|
350
408
|
|
|
351
409
|
### sessionStarted
|
|
352
410
|
|
|
353
|
-
|
|
411
|
+
When a persistent Python session starts
|
|
412
|
+
|
|
413
|
+
**Event Arguments:**
|
|
414
|
+
|
|
415
|
+
| Name | Type | Description |
|
|
416
|
+
|------|------|-------------|
|
|
417
|
+
| `sessionId` | `string` | Unique session identifier |
|
|
354
418
|
|
|
355
419
|
|
|
356
420
|
|
|
357
421
|
### sessionStopped
|
|
358
422
|
|
|
359
|
-
|
|
423
|
+
When a persistent Python session stops
|
|
424
|
+
|
|
425
|
+
**Event Arguments:**
|
|
426
|
+
|
|
427
|
+
| Name | Type | Description |
|
|
428
|
+
|------|------|-------------|
|
|
429
|
+
| `sessionId` | `string` | Session identifier that stopped |
|
|
360
430
|
|
|
361
431
|
|
|
362
432
|
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Transpiler (features.transpiler)
|
|
2
|
+
|
|
3
|
+
Transpile TypeScript, TSX, and JSX to JavaScript at runtime using Bun's built-in transpiler. Compile code strings on the fly without touching the filesystem or spawning external processes.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
container.feature('transpiler')
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Methods
|
|
12
|
+
|
|
13
|
+
### transformSync
|
|
14
|
+
|
|
15
|
+
Transform code synchronously
|
|
16
|
+
|
|
17
|
+
**Parameters:**
|
|
18
|
+
|
|
19
|
+
| Name | Type | Required | Description |
|
|
20
|
+
|------|------|----------|-------------|
|
|
21
|
+
| `code` | `string` | ✓ | The code to transform |
|
|
22
|
+
| `options` | `TransformOptions` | | Transform options (loader, format, minify) |
|
|
23
|
+
|
|
24
|
+
`TransformOptions` properties:
|
|
25
|
+
|
|
26
|
+
| Property | Type | Description |
|
|
27
|
+
|----------|------|-------------|
|
|
28
|
+
| `loader` | `'ts' | 'tsx' | 'jsx' | 'js'` | |
|
|
29
|
+
| `format` | `'esm' | 'cjs'` | |
|
|
30
|
+
| `minify` | `boolean` | |
|
|
31
|
+
|
|
32
|
+
**Returns:** `TransformResult`
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### transform
|
|
37
|
+
|
|
38
|
+
Transform code asynchronously
|
|
39
|
+
|
|
40
|
+
**Parameters:**
|
|
41
|
+
|
|
42
|
+
| Name | Type | Required | Description |
|
|
43
|
+
|------|------|----------|-------------|
|
|
44
|
+
| `code` | `string` | ✓ | The code to transform |
|
|
45
|
+
| `options` | `TransformOptions` | | Transform options (loader, format, minify) |
|
|
46
|
+
|
|
47
|
+
`TransformOptions` properties:
|
|
48
|
+
|
|
49
|
+
| Property | Type | Description |
|
|
50
|
+
|----------|------|-------------|
|
|
51
|
+
| `loader` | `'ts' | 'tsx' | 'jsx' | 'js'` | |
|
|
52
|
+
| `format` | `'esm' | 'cjs'` | |
|
|
53
|
+
| `minify` | `boolean` | |
|
|
54
|
+
|
|
55
|
+
**Returns:** `Promise<TransformResult>`
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## State (Zod v4 schema)
|
|
60
|
+
|
|
61
|
+
| Property | Type | Description |
|
|
62
|
+
|----------|------|-------------|
|
|
63
|
+
| `enabled` | `boolean` | Whether this feature is currently enabled |
|
|
64
|
+
|
|
65
|
+
## Examples
|
|
66
|
+
|
|
67
|
+
**features.transpiler**
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
const transpiler = container.feature('transpiler')
|
|
71
|
+
const result = transpiler.transformSync('const x: number = 1')
|
|
72
|
+
console.log(result.code) // 'const x = 1;\n'
|
|
73
|
+
```
|
|
74
|
+
|
|
@@ -41,12 +41,6 @@ container.feature('esbuild')
|
|
|
41
41
|
|----------|------|-------------|
|
|
42
42
|
| `assetLoader` | `any` | Returns the assetLoader feature for loading external libraries from unpkg. |
|
|
43
43
|
|
|
44
|
-
## State (Zod v4 schema)
|
|
45
|
-
|
|
46
|
-
| Property | Type | Description |
|
|
47
|
-
|----------|------|-------------|
|
|
48
|
-
| `enabled` | `boolean` | Whether this feature is currently enabled |
|
|
49
|
-
|
|
50
44
|
## Examples
|
|
51
45
|
|
|
52
46
|
**features.esbuild**
|
package/docs/apis/servers/mcp.md
CHANGED
|
@@ -52,9 +52,9 @@ Register an MCP tool. The tool's Zod schema is converted to JSON Schema for the
|
|
|
52
52
|
|
|
53
53
|
| Property | Type | Description |
|
|
54
54
|
|----------|------|-------------|
|
|
55
|
-
| `schema` | `z.
|
|
55
|
+
| `schema` | `z.ZodType` | |
|
|
56
56
|
| `description` | `string` | |
|
|
57
|
-
| `handler` | `(args: any, ctx:
|
|
57
|
+
| `handler` | `Function | ((args: any, ctx: any) => any)` | |
|
|
58
58
|
|
|
59
59
|
**Returns:** `this`
|
|
60
60
|
|