@soederpop/luca 0.1.2 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yaml +167 -0
- package/CLAUDE.md +2 -0
- package/README.md +3 -0
- package/assistants/codingAssistant/ABOUT.md +3 -0
- package/assistants/codingAssistant/CORE.md +22 -17
- package/assistants/codingAssistant/hooks.ts +17 -4
- package/assistants/codingAssistant/tools.ts +1 -106
- package/assistants/inkbot/ABOUT.md +5 -0
- package/assistants/inkbot/CORE.md +71 -0
- package/assistants/inkbot/hooks.ts +14 -0
- package/assistants/inkbot/tools.ts +47 -0
- package/bun.lock +20 -4
- package/commands/inkbot.ts +353 -0
- package/commands/release.ts +75 -181
- 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/docs/ideas/assistant-factory-pattern.md +142 -0
- package/package.json +74 -21
- package/src/agi/container.server.ts +10 -0
- package/src/agi/feature.ts +13 -0
- package/src/agi/features/agent-memory.ts +694 -0
- package/src/agi/features/assistant.ts +37 -26
- package/src/agi/features/assistants-manager.ts +95 -5
- package/src/agi/features/autonomous-assistant.ts +1 -5
- package/src/agi/features/browser-use.ts +32 -2
- package/src/agi/features/claude-code.ts +165 -1
- package/src/agi/features/coding-tools.ts +175 -0
- 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 +35 -28
- 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 +111 -13
- 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/clients/voicebox/index.ts +300 -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 +3012 -1356
- package/src/introspection/generated.node.ts +179 -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 +57 -30
- 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 +51 -18
- 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 +2 -2
- package/src/node/features/ui.ts +1 -1
- package/src/node/features/vm.ts +3 -3
- 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 +14 -5
- package/test/conversation.test.ts +220 -0
- package/test-integration/memory.test.ts +204 -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,71 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Feature } from "../feature.js";
|
|
3
|
+
import { type ContainerContext } from "../container.js";
|
|
4
|
+
export declare const SpeechOptionsSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodOptional<z.ZodString>;
|
|
6
|
+
_cacheKey: z.ZodOptional<z.ZodString>;
|
|
7
|
+
cached: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
enable: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const SpeechStateSchema: z.ZodObject<{
|
|
12
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
13
|
+
defaultVoice: z.ZodString;
|
|
14
|
+
voices: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
15
|
+
}, z.core.$loose>;
|
|
16
|
+
export type SpeechOptions = z.infer<typeof SpeechOptionsSchema>;
|
|
17
|
+
export type SpeechState = z.infer<typeof SpeechStateSchema>;
|
|
18
|
+
type Voice = {
|
|
19
|
+
voiceURI: string;
|
|
20
|
+
name: string;
|
|
21
|
+
lang: string;
|
|
22
|
+
localService: boolean;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Text-to-speech synthesis using the Web Speech API (SpeechSynthesis).
|
|
27
|
+
*
|
|
28
|
+
* Wraps the browser's built-in speech synthesis, providing voice selection,
|
|
29
|
+
* queue management, and state tracking. Voices are discovered on init and
|
|
30
|
+
* exposed via state for UI binding.
|
|
31
|
+
*
|
|
32
|
+
* @extends Feature
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const speech = container.feature('speech')
|
|
37
|
+
* speech.say('Hello from the browser!')
|
|
38
|
+
*
|
|
39
|
+
* // Choose a specific voice
|
|
40
|
+
* const speech = container.feature('speech', { voice: 'Google UK English Female' })
|
|
41
|
+
* speech.say('Cheerio!')
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare class Speech<T extends SpeechState = SpeechState, K extends SpeechOptions = SpeechOptions> extends Feature<T, K> {
|
|
45
|
+
static stateSchema: z.ZodObject<{
|
|
46
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
47
|
+
defaultVoice: z.ZodString;
|
|
48
|
+
voices: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
49
|
+
}, z.core.$loose>;
|
|
50
|
+
static optionsSchema: z.ZodObject<{
|
|
51
|
+
name: z.ZodOptional<z.ZodString>;
|
|
52
|
+
_cacheKey: z.ZodOptional<z.ZodString>;
|
|
53
|
+
cached: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
+
enable: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
static shortcut: "features.speech";
|
|
58
|
+
constructor(options: K, context: ContainerContext);
|
|
59
|
+
/** Returns the array of available speech synthesis voices. */
|
|
60
|
+
get voices(): never[] | NonNullable<T["voices"]>;
|
|
61
|
+
/** Returns the Voice object matching the currently selected default voice name. */
|
|
62
|
+
get defaultVoice(): any;
|
|
63
|
+
loadVoices(): void;
|
|
64
|
+
setDefaultVoice(name: string): void;
|
|
65
|
+
cancel(): this;
|
|
66
|
+
say(text: string, options?: {
|
|
67
|
+
voice?: Voice;
|
|
68
|
+
}): void;
|
|
69
|
+
}
|
|
70
|
+
export default Speech;
|
|
71
|
+
//# sourceMappingURL=speech.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"speech.d.ts","sourceRoot":"","sources":["../../../src/web/features/speech.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,eAAO,MAAM,mBAAmB;;;;;;iBAE9B,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;iBAG5B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,MAAM,CACjB,CAAC,SAAS,WAAW,GAAG,WAAW,EACnC,CAAC,SAAS,aAAa,GAAG,aAAa,CACvC,SAAQ,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAErB,OAAgB,WAAW;;;;sBAAoB;IAC/C,OAAgB,aAAa;;;;;;sBAAsB;IACnD,OAAgB,QAAQ,EAAG,iBAAiB,CAAS;gBAIzC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,gBAAgB;IAUjD,8DAA8D;IAC9D,IAAI,MAAM,uCAET;IAED,mFAAmF;IACnF,IAAI,YAAY,QAEf;IAED,UAAU;IAUV,eAAe,CAAC,IAAI,EAAE,MAAM;IAK5B,MAAM;IAKN,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,KAAK,CAAA;KAAO;CAMlD;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Feature } from '../feature.js';
|
|
3
|
+
export declare const WebVaultStateSchema: z.ZodObject<{
|
|
4
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
5
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, z.core.$loose>;
|
|
7
|
+
export declare const WebVaultOptionsSchema: z.ZodObject<{
|
|
8
|
+
name: z.ZodOptional<z.ZodString>;
|
|
9
|
+
_cacheKey: z.ZodOptional<z.ZodString>;
|
|
10
|
+
cached: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
enable: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type WebVaultState = z.infer<typeof WebVaultStateSchema>;
|
|
15
|
+
export type WebVaultOptions = z.infer<typeof WebVaultOptionsSchema>;
|
|
16
|
+
/**
|
|
17
|
+
* AES-256-GCM encryption and decryption for the browser using the Web Crypto API.
|
|
18
|
+
*
|
|
19
|
+
* Generates or accepts a secret key and provides `encrypt()` / `decrypt()` methods
|
|
20
|
+
* that work entirely client-side. Keys are stored as base64-encoded state so they
|
|
21
|
+
* can persist across sessions when needed.
|
|
22
|
+
*
|
|
23
|
+
* @extends Feature
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const vault = container.feature('vault')
|
|
28
|
+
* const encrypted = await vault.encrypt('secret data')
|
|
29
|
+
* const decrypted = await vault.decrypt(encrypted)
|
|
30
|
+
* console.log(decrypted) // 'secret data'
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare class WebVault extends Feature<WebVaultState, WebVaultOptions> {
|
|
34
|
+
static stateSchema: z.ZodObject<{
|
|
35
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
36
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$loose>;
|
|
38
|
+
static optionsSchema: z.ZodObject<{
|
|
39
|
+
name: z.ZodOptional<z.ZodString>;
|
|
40
|
+
_cacheKey: z.ZodOptional<z.ZodString>;
|
|
41
|
+
cached: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
+
enable: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
static shortcut: "features.vault";
|
|
46
|
+
secret({ refresh, set }?: {
|
|
47
|
+
refresh?: boolean | undefined;
|
|
48
|
+
set?: boolean | undefined;
|
|
49
|
+
}): Promise<ArrayBuffer>;
|
|
50
|
+
decrypt(payload: string): Promise<string>;
|
|
51
|
+
encrypt(payload: string): Promise<string>;
|
|
52
|
+
utils: {
|
|
53
|
+
arrayToString: typeof arrayBufferToBase64;
|
|
54
|
+
stringToArray: typeof base64ToArrayBuffer;
|
|
55
|
+
uintToString: typeof uint8ArrayToBase64;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export default WebVault;
|
|
59
|
+
declare function arrayBufferToBase64(buffer: ArrayBuffer): string;
|
|
60
|
+
declare function uint8ArrayToBase64(u: Uint8Array): string;
|
|
61
|
+
declare function base64ToArrayBuffer(base64: string): ArrayBuffer;
|
|
62
|
+
//# sourceMappingURL=vault.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../../src/web/features/vault.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,eAAO,MAAM,mBAAmB;;;iBAE9B,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;;iBAEhC,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,QAAS,SAAQ,OAAO,CAAC,aAAa,EAAE,eAAe,CAAC;IACnE,OAAgB,WAAW;;;sBAAsB;IACjD,OAAgB,aAAa;;;;;;sBAAwB;IACrD,OAAgB,QAAQ,EAAG,gBAAgB,CAAS;IAI9C,MAAM,CAAC,EAAE,OAAe,EAAE,GAAU,EAAE;;;KAAK,GAAI,OAAO,CAAC,WAAW,CAAC;IAmBnE,OAAO,CAAC,OAAO,EAAE,MAAM;IAUvB,OAAO,CAAC,OAAO,EAAE,MAAM;IAW7B,KAAK;;;;MAIJ;CACF;AAED,eAAe,QAAQ,CAAA;AAiDvB,iBAAS,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAmBxD;AAED,iBAAS,kBAAkB,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAkBjD;AAED,iBAAS,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAGxD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Feature } from "../feature.js";
|
|
3
|
+
export declare const VMStateSchema: z.ZodObject<{
|
|
4
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
5
|
+
}, z.core.$loose>;
|
|
6
|
+
export declare const VMOptionsSchema: z.ZodObject<{
|
|
7
|
+
name: z.ZodOptional<z.ZodString>;
|
|
8
|
+
_cacheKey: z.ZodOptional<z.ZodString>;
|
|
9
|
+
cached: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
enable: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
context: z.ZodOptional<z.ZodAny>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type VMState = z.infer<typeof VMStateSchema>;
|
|
14
|
+
export type VMOptions = z.infer<typeof VMOptionsSchema>;
|
|
15
|
+
/**
|
|
16
|
+
* Sandboxed JavaScript execution environment for the browser.
|
|
17
|
+
*
|
|
18
|
+
* Automatically injects the container's context object into the global scope,
|
|
19
|
+
* so evaluated code can use anything provided by the container. Useful for
|
|
20
|
+
* live code playgrounds, plugin systems, and dynamic script evaluation.
|
|
21
|
+
*
|
|
22
|
+
* @extends Feature
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const vm = container.feature('vm')
|
|
27
|
+
* const result = vm.run('1 + 2 + 3') // 6
|
|
28
|
+
* const greeting = vm.run('container.uuid') // accesses container globals
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare class VM<T extends VMState = VMState, K extends VMOptions = VMOptions> extends Feature<T, K> {
|
|
32
|
+
static stateSchema: z.ZodObject<{
|
|
33
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
34
|
+
}, z.core.$loose>;
|
|
35
|
+
static optionsSchema: z.ZodObject<{
|
|
36
|
+
name: z.ZodOptional<z.ZodString>;
|
|
37
|
+
_cacheKey: z.ZodOptional<z.ZodString>;
|
|
38
|
+
cached: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
enable: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
context: z.ZodOptional<z.ZodAny>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
static shortcut: "features.vm";
|
|
43
|
+
createScript(code: string): import("../shims/isomorphic-vm").VMScript;
|
|
44
|
+
createContext(ctx?: any): import("../shims/isomorphic-vm").VMContext;
|
|
45
|
+
run(code: string, ctx?: any, options?: any): Promise<any>;
|
|
46
|
+
}
|
|
47
|
+
export default VM;
|
|
48
|
+
//# sourceMappingURL=vm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vm.d.ts","sourceRoot":"","sources":["../../../src/web/features/vm.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,eAAO,MAAM,aAAa;;iBAAgC,CAAA;AAE1D,eAAO,MAAM,eAAe;;;;;;iBAE1B,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AACnD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAEvD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,EAAE,CACb,CAAC,SAAS,OAAO,GAAG,OAAO,EAC3B,CAAC,SAAS,SAAS,GAAG,SAAS,CAC/B,SAAQ,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAErB,OAAgB,WAAW;;sBAAgB;IAC3C,OAAgB,aAAa;;;;;;sBAAkB;IAC/C,OAAgB,QAAQ,EAAG,aAAa,CAAS;IAIjD,YAAY,CAAC,IAAI,EAAE,MAAM;IAIzB,aAAa,CAAC,GAAG,GAAE,GAAQ;IAOrB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,GAAQ,EAAE,OAAO,GAAG,GAAQ;CA4B1D;AAED,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Feature } from "../../feature.js";
|
|
3
|
+
import { type ContainerContext } from '../container.js';
|
|
4
|
+
export declare const VoiceRecognitionOptionsSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodOptional<z.ZodString>;
|
|
6
|
+
_cacheKey: z.ZodOptional<z.ZodString>;
|
|
7
|
+
cached: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
enable: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
language: z.ZodOptional<z.ZodString>;
|
|
10
|
+
continuous: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
autoListen: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export declare const VoiceRecognitionStateSchema: z.ZodObject<{
|
|
14
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
15
|
+
listening: z.ZodBoolean;
|
|
16
|
+
transcript: z.ZodString;
|
|
17
|
+
}, z.core.$loose>;
|
|
18
|
+
export type VoiceRecognitionOptions = z.infer<typeof VoiceRecognitionOptionsSchema>;
|
|
19
|
+
export type VoiceRecognitionState = z.infer<typeof VoiceRecognitionStateSchema>;
|
|
20
|
+
export declare const VoiceRecognitionEventsSchema: z.ZodObject<{
|
|
21
|
+
stateChange: z.ZodTuple<[z.ZodAny], null>;
|
|
22
|
+
enabled: z.ZodTuple<[], null>;
|
|
23
|
+
result: z.ZodTuple<[z.ZodObject<{
|
|
24
|
+
finalTranscript: z.ZodString;
|
|
25
|
+
interimTranscript: z.ZodString;
|
|
26
|
+
}, z.core.$strip>], null>;
|
|
27
|
+
error: z.ZodTuple<[z.ZodString], null>;
|
|
28
|
+
end: z.ZodTuple<[], null>;
|
|
29
|
+
start: z.ZodTuple<[], null>;
|
|
30
|
+
stop: z.ZodTuple<[], null>;
|
|
31
|
+
abort: z.ZodTuple<[], null>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
/**
|
|
34
|
+
* Speech-to-text recognition using the Web Speech API (SpeechRecognition).
|
|
35
|
+
*
|
|
36
|
+
* Wraps the browser's built-in speech recognition, supporting continuous
|
|
37
|
+
* listening, interim results, and language selection. Recognized text is
|
|
38
|
+
* accumulated in state and emitted as events for real-time transcription UIs.
|
|
39
|
+
*
|
|
40
|
+
* @extends Feature
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const voice = container.feature('voice', { continuous: true, autoListen: true })
|
|
45
|
+
*
|
|
46
|
+
* voice.on('transcript', ({ text }) => {
|
|
47
|
+
* console.log('Heard:', text)
|
|
48
|
+
* })
|
|
49
|
+
*
|
|
50
|
+
* // Or start manually
|
|
51
|
+
* voice.start()
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare class VoiceRecognition<T extends VoiceRecognitionState = VoiceRecognitionState, K extends VoiceRecognitionOptions = VoiceRecognitionOptions> extends Feature<T, K> {
|
|
55
|
+
private recognition;
|
|
56
|
+
static stateSchema: z.ZodObject<{
|
|
57
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
58
|
+
listening: z.ZodBoolean;
|
|
59
|
+
transcript: z.ZodString;
|
|
60
|
+
}, z.core.$loose>;
|
|
61
|
+
static optionsSchema: z.ZodObject<{
|
|
62
|
+
name: z.ZodOptional<z.ZodString>;
|
|
63
|
+
_cacheKey: z.ZodOptional<z.ZodString>;
|
|
64
|
+
cached: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
+
enable: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
language: z.ZodOptional<z.ZodString>;
|
|
67
|
+
continuous: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
+
autoListen: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
static eventsSchema: z.ZodObject<{
|
|
71
|
+
stateChange: z.ZodTuple<[z.ZodAny], null>;
|
|
72
|
+
enabled: z.ZodTuple<[], null>;
|
|
73
|
+
result: z.ZodTuple<[z.ZodObject<{
|
|
74
|
+
finalTranscript: z.ZodString;
|
|
75
|
+
interimTranscript: z.ZodString;
|
|
76
|
+
}, z.core.$strip>], null>;
|
|
77
|
+
error: z.ZodTuple<[z.ZodString], null>;
|
|
78
|
+
end: z.ZodTuple<[], null>;
|
|
79
|
+
start: z.ZodTuple<[], null>;
|
|
80
|
+
stop: z.ZodTuple<[], null>;
|
|
81
|
+
abort: z.ZodTuple<[], null>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
static shortcut: "features.voice";
|
|
84
|
+
constructor(options: K, context: ContainerContext);
|
|
85
|
+
/** Whether the speech recognizer is currently listening for audio input. */
|
|
86
|
+
get listening(): boolean;
|
|
87
|
+
/** Returns the accumulated final transcript text from recognition results. */
|
|
88
|
+
get transcript(): "" | T["transcript"];
|
|
89
|
+
whenFinished(): Promise<"" | T["transcript"]>;
|
|
90
|
+
start(): void;
|
|
91
|
+
stop(): void;
|
|
92
|
+
abort(): void;
|
|
93
|
+
clearTranscript(): void;
|
|
94
|
+
}
|
|
95
|
+
export default VoiceRecognition;
|
|
96
|
+
//# sourceMappingURL=voice-recognition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voice-recognition.d.ts","sourceRoot":"","sources":["../../../src/web/features/voice-recognition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEvD,eAAO,MAAM,6BAA6B;;;;;;;;iBAIxC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;iBAGtC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AACnF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAE/E,eAAO,MAAM,4BAA4B;;;;;;;;;;;;iBAYH,CAAA;AAEtC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,gBAAgB,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,EAAE,CAAC,SAAS,uBAAuB,GAAG,uBAAuB,CAAE,SAAQ,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAEvK,OAAO,CAAC,WAAW,CAAkC;IAErD,OAAgB,WAAW;;;;sBAA8B;IACzD,OAAgB,aAAa;;;;;;;;sBAAgC;IAC7D,OAAgB,YAAY;;;;;;;;;;;;sBAA+B;IAC3D,OAAgB,QAAQ,EAAG,gBAAgB,CAAS;gBAIxC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,gBAAgB;IA8CjD,4EAA4E;IAC5E,IAAI,SAAS,YAEZ;IAED,8EAA8E;IAC9E,IAAI,UAAU,yBAEb;IAEK,YAAY;IAQlB,KAAK;IAUL,IAAI;IAQJ,KAAK;IAQL,eAAe;CAGhB;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface VMContext {
|
|
2
|
+
[name: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export interface VMScript {
|
|
5
|
+
new (code: string): VMScript;
|
|
6
|
+
runInContext(context: VMContext): any;
|
|
7
|
+
runInNewContext(context?: any): any;
|
|
8
|
+
runInThisContext(): any;
|
|
9
|
+
}
|
|
10
|
+
export interface VM {
|
|
11
|
+
Script: VMScript;
|
|
12
|
+
createContext(context?: any): VMContext;
|
|
13
|
+
isContext(context: any): context is VMContext;
|
|
14
|
+
runInContext(code: string, context: VMContext): any;
|
|
15
|
+
runInDebugContext(code: string): any;
|
|
16
|
+
runInNewContext(code: string, context?: any): any;
|
|
17
|
+
runInThisContext(code: string): any;
|
|
18
|
+
}
|
|
19
|
+
export declare const shim: VM;
|
|
20
|
+
declare const _default: VM;
|
|
21
|
+
export default _default;
|
|
22
|
+
//# sourceMappingURL=isomorphic-vm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isomorphic-vm.d.ts","sourceRoot":"","sources":["../../../src/web/shims/isomorphic-vm.ts"],"names":[],"mappings":"AAqHA,MAAM,WAAW,SAAS;IACxB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,IAAI,EAAE,MAAM,GAAI,QAAQ,CAAC;IAC9B,YAAY,CAAC,OAAO,EAAE,SAAS,GAAI,GAAG,CAAC;IACvC,eAAe,CAAC,OAAO,CAAC,EAAE,GAAG,GAAI,GAAG,CAAC;IACrC,gBAAgB,IAAK,GAAG,CAAC;CAC1B;AAED,MAAM,WAAW,EAAE;IACjB,MAAM,EAAE,QAAQ,CAAC;IACjB,aAAa,CAAC,OAAO,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC;IACxC,SAAS,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,SAAS,CAAC;IAC9C,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG,GAAG,CAAC;IACpD,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;IACrC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IAClD,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;CACrC;AAED,eAAO,MAAM,IAAI,EAAE,EAQlB,CAAC;wBAEqB,EAAE;AAAzB,wBAAyB"}
|
|
@@ -369,6 +369,7 @@ const answer = await researcher.ask('Find all usages of container.feature("fs")'
|
|
|
369
369
|
| `effectiveSystemPrompt` | `string` | The system prompt with all extensions appended. This is the value passed to the conversation. |
|
|
370
370
|
| `tools` | `Record<string, ConversationTool>` | The tools registered with this assistant. |
|
|
371
371
|
| `meta` | `Record<string, any>` | Parsed YAML frontmatter from CORE.md, or empty object if none. |
|
|
372
|
+
| `effectiveOptions` | `AssistantOptions & Record<string, any>` | Merged options where CORE.md frontmatter provides defaults and constructor options take precedence. Prefer this over `this.options` anywhere model parameters or runtime config is consumed. |
|
|
372
373
|
| `paths` | `any` | Provides a helper for creating paths off of the assistant's base folder |
|
|
373
374
|
| `assistantName` | `string` | The assistant name derived from the folder basename. |
|
|
374
375
|
| `cwdHash` | `string` | An 8-char hash of the container cwd for per-project thread isolation. |
|
|
@@ -10,9 +10,48 @@ container.feature('assistantsManager')
|
|
|
10
10
|
|
|
11
11
|
## Methods
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### intercept
|
|
14
|
+
|
|
15
|
+
Registers a pipeline interceptor that is applied to every assistant created by this manager. Interceptors are applied at the given interception point on each assistant at creation time. This mirrors the per-assistant `assistant.intercept(point, fn)` API, but scopes it globally across all assistants managed here — useful for cross-cutting concerns like logging, tracing, or policy enforcement.
|
|
16
|
+
|
|
17
|
+
**Parameters:**
|
|
18
|
+
|
|
19
|
+
| Name | Type | Required | Description |
|
|
20
|
+
|------|------|----------|-------------|
|
|
21
|
+
| `point` | `K` | ✓ | The interception point (beforeAsk, beforeTurn, beforeToolCall, afterToolCall, beforeResponse) |
|
|
22
|
+
| `fn` | `InterceptorFn<InterceptorPoints[K]>` | ✓ | Middleware function receiving (ctx, next) |
|
|
23
|
+
|
|
24
|
+
**Returns:** `this`
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
manager.intercept('beforeAsk', async (ctx, next) => {
|
|
28
|
+
console.log(`[${ctx.assistant.name}] asking: ${ctx.message}`)
|
|
29
|
+
await next()
|
|
30
|
+
})
|
|
31
|
+
```
|
|
32
|
+
|
|
14
33
|
|
|
15
|
-
|
|
34
|
+
|
|
35
|
+
### addDiscoveryFolder
|
|
36
|
+
|
|
37
|
+
Registers an additional folder to scan during assistant discovery and immediately triggers a new discovery pass.
|
|
38
|
+
|
|
39
|
+
**Parameters:**
|
|
40
|
+
|
|
41
|
+
| Name | Type | Required | Description |
|
|
42
|
+
|------|------|----------|-------------|
|
|
43
|
+
| `folderPath` | `string` | ✓ | Absolute path to a folder containing assistant subdirectories |
|
|
44
|
+
|
|
45
|
+
**Returns:** `Promise<this>`
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
await manager.addDiscoveryFolder('/path/to/more/assistants')
|
|
49
|
+
console.log(manager.available) // includes assistants from the new folder
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### discover
|
|
16
55
|
|
|
17
56
|
**Returns:** `Promise<this>`
|
|
18
57
|
|
|
@@ -174,6 +213,7 @@ Emitted when a new assistant instance is created
|
|
|
174
213
|
| `entries` | `object` | Discovered assistant entries keyed by name |
|
|
175
214
|
| `instances` | `object` | Active assistant instances keyed by name |
|
|
176
215
|
| `factories` | `object` | Registered factory functions keyed by name |
|
|
216
|
+
| `extraFolders` | `array` | Additional folders to scan during discovery |
|
|
177
217
|
|
|
178
218
|
## Examples
|
|
179
219
|
|
|
@@ -189,6 +229,26 @@ const answer = await assistant.ask('Hello!')
|
|
|
189
229
|
|
|
190
230
|
|
|
191
231
|
|
|
232
|
+
**intercept**
|
|
233
|
+
|
|
234
|
+
```ts
|
|
235
|
+
manager.intercept('beforeAsk', async (ctx, next) => {
|
|
236
|
+
console.log(`[${ctx.assistant.name}] asking: ${ctx.message}`)
|
|
237
|
+
await next()
|
|
238
|
+
})
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
**addDiscoveryFolder**
|
|
244
|
+
|
|
245
|
+
```ts
|
|
246
|
+
await manager.addDiscoveryFolder('/path/to/more/assistants')
|
|
247
|
+
console.log(manager.available) // includes assistants from the new folder
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
192
252
|
**downloadLucaCoreAssistants**
|
|
193
253
|
|
|
194
254
|
```ts
|
|
@@ -5,36 +5,9 @@ An autonomous assistant that owns a lower-level Assistant instance and gates all
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
|
-
container.feature('autoAssistant'
|
|
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
|
-
// Conversation history persistence mode
|
|
20
|
-
historyMode,
|
|
21
|
-
// Assistant folder for disk-based definitions
|
|
22
|
-
folder,
|
|
23
|
-
})
|
|
8
|
+
container.feature('autoAssistant')
|
|
24
9
|
```
|
|
25
10
|
|
|
26
|
-
## Options (Zod v4 schema)
|
|
27
|
-
|
|
28
|
-
| Property | Type | Description |
|
|
29
|
-
|----------|------|-------------|
|
|
30
|
-
| `tools` | `array` | Tool bundles to register on the inner assistant |
|
|
31
|
-
| `permissions` | `object` | Permission level per tool name |
|
|
32
|
-
| `defaultPermission` | `string` | Default permission level for unconfigured tools |
|
|
33
|
-
| `systemPrompt` | `string` | System prompt for the inner assistant |
|
|
34
|
-
| `model` | `string` | OpenAI model override |
|
|
35
|
-
| `historyMode` | `string` | Conversation history persistence mode |
|
|
36
|
-
| `folder` | `string` | Assistant folder for disk-based definitions |
|
|
37
|
-
|
|
38
11
|
## Methods
|
|
39
12
|
|
|
40
13
|
### getPermission
|
|
@@ -219,134 +192,63 @@ Add a tool bundle after initialization. Useful for dynamically extending the ass
|
|
|
219
192
|
|
|
220
193
|
### permissionGranted
|
|
221
194
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
**Event Arguments:**
|
|
225
|
-
|
|
226
|
-
| Name | Type | Description |
|
|
227
|
-
|------|------|-------------|
|
|
228
|
-
| `arg0` | `string` | Approval ID |
|
|
195
|
+
Event emitted by AutonomousAssistant
|
|
229
196
|
|
|
230
197
|
|
|
231
198
|
|
|
232
199
|
### permissionDenied
|
|
233
200
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
**Event Arguments:**
|
|
237
|
-
|
|
238
|
-
| Name | Type | Description |
|
|
239
|
-
|------|------|-------------|
|
|
240
|
-
| `arg0` | `string` | Approval ID |
|
|
201
|
+
Event emitted by AutonomousAssistant
|
|
241
202
|
|
|
242
203
|
|
|
243
204
|
|
|
244
205
|
### toolBlocked
|
|
245
206
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
**Event Arguments:**
|
|
249
|
-
|
|
250
|
-
| Name | Type | Description |
|
|
251
|
-
|------|------|-------------|
|
|
252
|
-
| `arg0` | `string` | Tool name |
|
|
253
|
-
| `arg1` | `string` | Reason |
|
|
207
|
+
Event emitted by AutonomousAssistant
|
|
254
208
|
|
|
255
209
|
|
|
256
210
|
|
|
257
211
|
### chunk
|
|
258
212
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
**Event Arguments:**
|
|
262
|
-
|
|
263
|
-
| Name | Type | Description |
|
|
264
|
-
|------|------|-------------|
|
|
265
|
-
| `arg0` | `string` | A chunk of streamed text |
|
|
213
|
+
Event emitted by AutonomousAssistant
|
|
266
214
|
|
|
267
215
|
|
|
268
216
|
|
|
269
217
|
### response
|
|
270
218
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
**Event Arguments:**
|
|
274
|
-
|
|
275
|
-
| Name | Type | Description |
|
|
276
|
-
|------|------|-------------|
|
|
277
|
-
| `arg0` | `string` | The final response text |
|
|
219
|
+
Event emitted by AutonomousAssistant
|
|
278
220
|
|
|
279
221
|
|
|
280
222
|
|
|
281
223
|
### toolCall
|
|
282
224
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
**Event Arguments:**
|
|
286
|
-
|
|
287
|
-
| Name | Type | Description |
|
|
288
|
-
|------|------|-------------|
|
|
289
|
-
| `arg0` | `string` | Tool name |
|
|
290
|
-
| `arg1` | `any` | Tool arguments |
|
|
225
|
+
Event emitted by AutonomousAssistant
|
|
291
226
|
|
|
292
227
|
|
|
293
228
|
|
|
294
229
|
### toolResult
|
|
295
230
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
**Event Arguments:**
|
|
299
|
-
|
|
300
|
-
| Name | Type | Description |
|
|
301
|
-
|------|------|-------------|
|
|
302
|
-
| `arg0` | `string` | Tool name |
|
|
303
|
-
| `arg1` | `any` | Result value |
|
|
231
|
+
Event emitted by AutonomousAssistant
|
|
304
232
|
|
|
305
233
|
|
|
306
234
|
|
|
307
235
|
### toolError
|
|
308
236
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
**Event Arguments:**
|
|
312
|
-
|
|
313
|
-
| Name | Type | Description |
|
|
314
|
-
|------|------|-------------|
|
|
315
|
-
| `arg0` | `string` | Tool name |
|
|
316
|
-
| `arg1` | `any` | Error |
|
|
237
|
+
Event emitted by AutonomousAssistant
|
|
317
238
|
|
|
318
239
|
|
|
319
240
|
|
|
320
241
|
### started
|
|
321
242
|
|
|
322
|
-
|
|
243
|
+
Event emitted by AutonomousAssistant
|
|
323
244
|
|
|
324
245
|
|
|
325
246
|
|
|
326
247
|
### permissionRequest
|
|
327
248
|
|
|
328
|
-
|
|
249
|
+
Event emitted by AutonomousAssistant
|
|
329
250
|
|
|
330
|
-
**Event Arguments:**
|
|
331
251
|
|
|
332
|
-
| Name | Type | Description |
|
|
333
|
-
|------|------|-------------|
|
|
334
|
-
| `id` | `string` | Unique approval ID |
|
|
335
|
-
| `toolName` | `string` | The tool requesting permission |
|
|
336
|
-
| `args` | `object` | The arguments the tool was called with |
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
## State (Zod v4 schema)
|
|
341
|
-
|
|
342
|
-
| Property | Type | Description |
|
|
343
|
-
|----------|------|-------------|
|
|
344
|
-
| `enabled` | `boolean` | Whether this feature is currently enabled |
|
|
345
|
-
| `started` | `boolean` | Whether the assistant has been initialized |
|
|
346
|
-
| `permissions` | `object` | Permission level per tool name |
|
|
347
|
-
| `defaultPermission` | `string` | Permission level for tools not explicitly configured |
|
|
348
|
-
| `pendingApprovals` | `array` | Tool calls currently awaiting user approval |
|
|
349
|
-
| `approvalHistory` | `array` | Recent approval decisions |
|
|
350
252
|
|
|
351
253
|
## Examples
|
|
352
254
|
|