@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,167 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-linux:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Setup Bun
|
|
15
|
+
uses: oven-sh/setup-bun@v2
|
|
16
|
+
|
|
17
|
+
- name: Install dependencies
|
|
18
|
+
run: bun install
|
|
19
|
+
|
|
20
|
+
- name: Pre-build steps
|
|
21
|
+
run: |
|
|
22
|
+
bash scripts/stamp-build.sh
|
|
23
|
+
bun run build:introspection
|
|
24
|
+
bun run build:scaffolds
|
|
25
|
+
bun run build:bootstrap
|
|
26
|
+
bun run build:python-bridge
|
|
27
|
+
|
|
28
|
+
- name: Build Linux binaries
|
|
29
|
+
run: |
|
|
30
|
+
mkdir -p dist/release
|
|
31
|
+
bun build ./src/cli/cli.ts --compile --target=bun-linux-x64 --outfile dist/release/luca-linux-x64 --external node-llama-cpp
|
|
32
|
+
bun build ./src/cli/cli.ts --compile --target=bun-linux-arm64 --outfile dist/release/luca-linux-arm64 --external node-llama-cpp
|
|
33
|
+
|
|
34
|
+
- name: Upload Linux artifacts
|
|
35
|
+
uses: actions/upload-artifact@v4
|
|
36
|
+
with:
|
|
37
|
+
name: linux-binaries
|
|
38
|
+
path: dist/release/luca-linux-*
|
|
39
|
+
|
|
40
|
+
build-windows:
|
|
41
|
+
runs-on: windows-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
|
+
|
|
45
|
+
- name: Setup Bun
|
|
46
|
+
uses: oven-sh/setup-bun@v2
|
|
47
|
+
|
|
48
|
+
- name: Install dependencies
|
|
49
|
+
run: bun install
|
|
50
|
+
|
|
51
|
+
- name: Pre-build steps
|
|
52
|
+
shell: bash
|
|
53
|
+
run: |
|
|
54
|
+
bash scripts/stamp-build.sh
|
|
55
|
+
bun run build:introspection
|
|
56
|
+
bun run build:scaffolds
|
|
57
|
+
bun run build:bootstrap
|
|
58
|
+
bun run build:python-bridge
|
|
59
|
+
|
|
60
|
+
- name: Build Windows binary
|
|
61
|
+
shell: bash
|
|
62
|
+
run: |
|
|
63
|
+
mkdir -p dist/release
|
|
64
|
+
bun build ./src/cli/cli.ts --compile --target=bun-windows-x64 --outfile dist/release/luca-windows-x64.exe --external node-llama-cpp
|
|
65
|
+
|
|
66
|
+
- name: Upload Windows artifact
|
|
67
|
+
uses: actions/upload-artifact@v4
|
|
68
|
+
with:
|
|
69
|
+
name: windows-binaries
|
|
70
|
+
path: dist/release/luca-windows-x64.exe
|
|
71
|
+
|
|
72
|
+
build-macos:
|
|
73
|
+
runs-on: macos-latest
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v4
|
|
76
|
+
|
|
77
|
+
- name: Setup Bun
|
|
78
|
+
uses: oven-sh/setup-bun@v2
|
|
79
|
+
|
|
80
|
+
- name: Install dependencies
|
|
81
|
+
run: bun install
|
|
82
|
+
|
|
83
|
+
- name: Pre-build steps
|
|
84
|
+
run: |
|
|
85
|
+
bash scripts/stamp-build.sh
|
|
86
|
+
bun run build:introspection
|
|
87
|
+
bun run build:scaffolds
|
|
88
|
+
bun run build:bootstrap
|
|
89
|
+
bun run build:python-bridge
|
|
90
|
+
|
|
91
|
+
- name: Build macOS binaries
|
|
92
|
+
run: |
|
|
93
|
+
mkdir -p dist/release
|
|
94
|
+
bun build ./src/cli/cli.ts --compile --target=bun-darwin-x64 --outfile dist/release/luca-darwin-x64 --external node-llama-cpp
|
|
95
|
+
bun build ./src/cli/cli.ts --compile --target=bun-darwin-arm64 --outfile dist/release/luca-darwin-arm64 --external node-llama-cpp
|
|
96
|
+
|
|
97
|
+
- name: Import Developer ID Certificate
|
|
98
|
+
env:
|
|
99
|
+
CERTIFICATE_P12: ${{ secrets.APPLE_CERTIFICATE_P12 }}
|
|
100
|
+
CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
|
101
|
+
run: |
|
|
102
|
+
echo "$CERTIFICATE_P12" | base64 --decode > certificate.p12
|
|
103
|
+
security create-keychain -p "" build.keychain
|
|
104
|
+
security import certificate.p12 -k build.keychain \
|
|
105
|
+
-P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign
|
|
106
|
+
security list-keychains -s build.keychain
|
|
107
|
+
security default-keychain -s build.keychain
|
|
108
|
+
security unlock-keychain -p "" build.keychain
|
|
109
|
+
security set-key-partition-list -S apple-tool:,apple: \
|
|
110
|
+
-s -k "" build.keychain
|
|
111
|
+
|
|
112
|
+
- name: Sign macOS binaries
|
|
113
|
+
run: |
|
|
114
|
+
codesign --sign "Developer ID Application: Demitra Del Fiacco (77WL45HR8M)" \
|
|
115
|
+
--force --options runtime --timestamp dist/release/luca-darwin-x64
|
|
116
|
+
codesign --sign "Developer ID Application: Demitra Del Fiacco (77WL45HR8M)" \
|
|
117
|
+
--force --options runtime --timestamp dist/release/luca-darwin-arm64
|
|
118
|
+
|
|
119
|
+
- name: Notarize macOS binaries
|
|
120
|
+
env:
|
|
121
|
+
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
122
|
+
APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }}
|
|
123
|
+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
124
|
+
run: |
|
|
125
|
+
zip dist/release/luca-darwin-x64.zip dist/release/luca-darwin-x64
|
|
126
|
+
xcrun notarytool submit dist/release/luca-darwin-x64.zip \
|
|
127
|
+
--apple-id "$APPLE_ID" \
|
|
128
|
+
--password "$APPLE_APP_PASSWORD" \
|
|
129
|
+
--team-id "$APPLE_TEAM_ID" \
|
|
130
|
+
--wait
|
|
131
|
+
|
|
132
|
+
zip dist/release/luca-darwin-arm64.zip dist/release/luca-darwin-arm64
|
|
133
|
+
xcrun notarytool submit dist/release/luca-darwin-arm64.zip \
|
|
134
|
+
--apple-id "$APPLE_ID" \
|
|
135
|
+
--password "$APPLE_APP_PASSWORD" \
|
|
136
|
+
--team-id "$APPLE_TEAM_ID" \
|
|
137
|
+
--wait
|
|
138
|
+
|
|
139
|
+
- name: Staple notarization
|
|
140
|
+
run: |
|
|
141
|
+
xcrun stapler staple dist/release/luca-darwin-x64 || true
|
|
142
|
+
xcrun stapler staple dist/release/luca-darwin-arm64 || true
|
|
143
|
+
|
|
144
|
+
- name: Upload macOS artifacts
|
|
145
|
+
uses: actions/upload-artifact@v4
|
|
146
|
+
with:
|
|
147
|
+
name: macos-binaries
|
|
148
|
+
path: dist/release/luca-darwin-*
|
|
149
|
+
exclude: |
|
|
150
|
+
dist/release/*.zip
|
|
151
|
+
|
|
152
|
+
create-release:
|
|
153
|
+
needs: [build-linux, build-windows, build-macos]
|
|
154
|
+
runs-on: ubuntu-latest
|
|
155
|
+
steps:
|
|
156
|
+
- name: Download all artifacts
|
|
157
|
+
uses: actions/download-artifact@v4
|
|
158
|
+
with:
|
|
159
|
+
merge-multiple: true
|
|
160
|
+
path: dist/release
|
|
161
|
+
|
|
162
|
+
- name: Create draft GitHub release
|
|
163
|
+
uses: softprops/action-gh-release@v2
|
|
164
|
+
with:
|
|
165
|
+
draft: true
|
|
166
|
+
generate_release_notes: true
|
|
167
|
+
files: dist/release/*
|
package/CLAUDE.md
CHANGED
|
@@ -111,3 +111,5 @@ This means **JSDoc blocks on helpers (features, clients, servers) must be valid
|
|
|
111
111
|
## Git Strategy
|
|
112
112
|
|
|
113
113
|
- We generally roll all on main. Commit your changes after you're done, only your changes. Leave a good message, tell me why don't just tell me what. Don't gimme that coauthored by whoever bullshit. The streets know we're one.
|
|
114
|
+
|
|
115
|
+
- Always commit your work
|
package/README.md
CHANGED
|
@@ -229,8 +229,11 @@ The CLI works great alongside Claude Code, Codex, and other coding assistants:
|
|
|
229
229
|
git clone https://github.com/soederpop/luca.git
|
|
230
230
|
cd luca
|
|
231
231
|
bun install
|
|
232
|
+
bun run setup
|
|
232
233
|
```
|
|
233
234
|
|
|
235
|
+
`bun run setup` applies `git update-index --skip-worktree` to the build artifact stubs so local changes to generated files (from running `build:introspection`, `build:scaffolds`, etc.) are never accidentally committed.
|
|
236
|
+
|
|
234
237
|
### Running in dev
|
|
235
238
|
|
|
236
239
|
```sh
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
skills:
|
|
3
|
+
- luca-framework
|
|
4
|
+
---
|
|
5
|
+
# Luca Coding Assistant
|
|
2
6
|
|
|
3
|
-
You are a coding assistant
|
|
7
|
+
You are a Luca framework coding assistant. You read, search, understand, and modify Luca project codebases.
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
- [Luca Github Repo](https://github.com/soederpop/luca)
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
- **ls** — list files and directories. Pass any arguments you'd normally pass to `ls`.
|
|
9
|
-
- **cat** — read file contents. Pass any arguments you'd normally pass to `cat`.
|
|
10
|
-
- **sed** — stream editor for filtering and transforming text. Pass any arguments you'd normally pass to `sed`.
|
|
11
|
-
- **awk** — pattern scanning and text processing. Pass any arguments you'd normally pass to `awk`.
|
|
12
|
-
- **pwd** — print the current working directory.
|
|
11
|
+
## Luca First
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
This assistant lives in a Luca project. Load `luca-framework` immediately, use `luca describe` to learn framework APIs, and use `luca eval` to verify runtime behavior. Prefer `luca` over guessing from source when the question is about the framework.
|
|
15
14
|
|
|
16
15
|
## How to Work
|
|
17
16
|
|
|
18
|
-
1.
|
|
19
|
-
2.
|
|
20
|
-
3.
|
|
21
|
-
4.
|
|
22
|
-
5.
|
|
23
|
-
6. Synthesize what you find into clear, concise answers.
|
|
17
|
+
1. **Introspect** -- use `luca describe` for framework APIs and `luca eval` for runtime verification before guessing.
|
|
18
|
+
2. **Orient** -- `ls` to see what's around, `rg` to find what you need. Start broad, narrow fast.
|
|
19
|
+
3. **Read** -- `cat -n` to read files with line numbers. `sed -n "10,30p"` for specific ranges. Don't load 500 lines when you need 20.
|
|
20
|
+
4. **Change** -- `editFile` for surgical edits to existing code. `writeFile` only for new files. Never rewrite what you can edit.
|
|
21
|
+
5. **Verify** -- `runCommand` to build, test, type-check after changes. Don't assume your edit worked.
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
- Read before you write. Always.
|
|
26
|
+
- Prefer `editFile` over `writeFile` for existing files -- it makes targeted replacements instead of overwriting.
|
|
27
|
+
- Use `rg` liberally. It is faster and more reliable than guessing file paths or grepping your memory.
|
|
28
|
+
- Keep changes minimal. Fix what was asked, don't refactor the neighborhood.
|
|
29
|
+
- Load `luca-framework` at the start and use the Luca CLI before inferring framework behavior from source.
|
|
30
|
+
- Explain what you're about to do, then do it. No essays.
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
import type { Assistant } from
|
|
1
|
+
import type { Assistant, AGIContainer } from '@soederpop/luca/agi'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
assistant
|
|
3
|
+
declare global {
|
|
4
|
+
var assistant: Assistant
|
|
5
|
+
var container: AGIContainer
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
export function
|
|
8
|
+
export function started() {
|
|
9
|
+
// Shell primitives: rg, ls, cat, sed, awk
|
|
10
|
+
assistant.use(container.feature('codingTools'))
|
|
11
|
+
|
|
12
|
+
// Write operations only -- shell tools cover read/search/list
|
|
13
|
+
const fileTools = container.feature('fileTools')
|
|
14
|
+
assistant.use(fileTools.toTools({ only: ['editFile', 'writeFile', 'deleteFile'] }))
|
|
15
|
+
fileTools.setupToolsConsumer(assistant)
|
|
16
|
+
|
|
17
|
+
// Process management: runCommand, spawnProcess, listProcesses, etc.
|
|
18
|
+
assistant.use(container.feature('processManager'))
|
|
19
|
+
|
|
20
|
+
// Skill discovery and loading
|
|
8
21
|
assistant.use(container.feature('skillsLibrary'))
|
|
9
22
|
}
|
|
@@ -1,108 +1,3 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
|
-
import type { Assistant, AGIContainer } from '@soederpop/luca/agi'
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
var assistant: Assistant
|
|
6
|
-
var container: AGIContainer
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const proc = () => container.feature('proc')
|
|
10
|
-
const fs = () => container.feature('fs')
|
|
11
|
-
|
|
12
|
-
// Patterns that enable command chaining, substitution, or injection at the shell level.
|
|
13
|
-
const SHELL_INJECTION_PATTERNS = [
|
|
14
|
-
/;/, // command chaining
|
|
15
|
-
/&&/, // logical AND chaining
|
|
16
|
-
/\|\|/, // logical OR chaining
|
|
17
|
-
/\$\(/, // command substitution $(...)
|
|
18
|
-
/`/, // backtick command substitution
|
|
19
|
-
/\$\{/, // variable expansion ${...}
|
|
20
|
-
/\n/, // newline injection
|
|
21
|
-
]
|
|
22
|
-
|
|
23
|
-
// Additional patterns for tools that should not use piping or redirection.
|
|
24
|
-
const PIPE_AND_REDIRECT_PATTERNS = [
|
|
25
|
-
/\|/, // piping
|
|
26
|
-
/>\s*/, // output redirection
|
|
27
|
-
/<\(/, // process substitution
|
|
28
|
-
]
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Validates that args don't contain shell injection metacharacters.
|
|
32
|
-
* `strict` mode also blocks pipes and redirects (for tools like ls, cat).
|
|
33
|
-
* `permissive` mode allows | and > since they're valid in regex patterns (for rg, sed, awk).
|
|
34
|
-
*/
|
|
35
|
-
function sanitizeArgs(args: string, command: string, mode: 'strict' | 'permissive' = 'strict'): string {
|
|
36
|
-
const patterns = mode === 'strict'
|
|
37
|
-
? [...SHELL_INJECTION_PATTERNS, ...PIPE_AND_REDIRECT_PATTERNS]
|
|
38
|
-
: SHELL_INJECTION_PATTERNS
|
|
39
|
-
|
|
40
|
-
for (const pattern of patterns) {
|
|
41
|
-
if (pattern.test(args)) {
|
|
42
|
-
throw new Error(
|
|
43
|
-
`Refused to execute ${command}: args contain a disallowed shell metacharacter (matched ${pattern}). ` +
|
|
44
|
-
`Only pass flags, patterns, and file paths — no command chaining or substitution.`
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return args
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export const schemas = {
|
|
53
|
-
rg: z.object({
|
|
54
|
-
args: z.string().describe('Arguments to pass to ripgrep, e.g. "TODO" --type ts -n'),
|
|
55
|
-
}).describe('Search file contents using ripgrep (rg). Fast, recursive, respects .gitignore.'),
|
|
56
|
-
|
|
57
|
-
ls: z.object({
|
|
58
|
-
args: z.string().default('.').describe('Arguments to pass to ls, e.g. -la src/'),
|
|
59
|
-
}).describe('List files and directories.'),
|
|
60
|
-
|
|
61
|
-
cat: z.object({
|
|
62
|
-
args: z.string().describe('Arguments to pass to cat, e.g. src/index.ts'),
|
|
63
|
-
}).describe('Read file contents.'),
|
|
64
|
-
|
|
65
|
-
sed: z.object({
|
|
66
|
-
args: z.string().describe('Arguments to pass to sed, e.g. -n "10,20p" src/index.ts'),
|
|
67
|
-
}).describe('Stream editor for filtering and transforming text.'),
|
|
68
|
-
|
|
69
|
-
awk: z.object({
|
|
70
|
-
args: z.string().describe('Arguments to pass to awk, e.g. \'{print $1}\' file.txt'),
|
|
71
|
-
}).describe('Pattern scanning and text processing.'),
|
|
72
|
-
|
|
73
|
-
writeFile: z.object({
|
|
74
|
-
path: z.string().describe('File path relative to the project root, e.g. src/utils/helper.ts'),
|
|
75
|
-
content: z.string().describe('The full content to write to the file'),
|
|
76
|
-
}).describe('Write content to a file. Creates the file if it does not exist, overwrites if it does.'),
|
|
77
|
-
|
|
78
|
-
pwd: z.object({}).describe('Print the current working directory.'),
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export function rg({ args }: z.infer<typeof schemas.rg>): string {
|
|
82
|
-
return proc().exec(`rg ${sanitizeArgs(args, 'rg', 'permissive')}`)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export function ls({ args }: z.infer<typeof schemas.ls>): string {
|
|
86
|
-
return proc().exec(`ls ${sanitizeArgs(args, 'ls')}`)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export function cat({ args }: z.infer<typeof schemas.cat>): string {
|
|
90
|
-
return proc().exec(`cat ${sanitizeArgs(args, 'cat')}`)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export function sed({ args }: z.infer<typeof schemas.sed>): string {
|
|
94
|
-
return proc().exec(`sed ${sanitizeArgs(args, 'sed', 'permissive')}`)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export function awk({ args }: z.infer<typeof schemas.awk>): string {
|
|
98
|
-
return proc().exec(`awk ${sanitizeArgs(args, 'awk', 'permissive')}`)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export async function writeFile({ path, content }: z.infer<typeof schemas.writeFile>): Promise<string> {
|
|
102
|
-
await fs().writeFileAsync(path, content)
|
|
103
|
-
return `Wrote ${content.length} bytes to ${path}`
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export function pwd(): string {
|
|
107
|
-
return proc().exec('pwd')
|
|
108
|
-
}
|
|
3
|
+
export const schemas = {}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Luca Inkbot Assistant
|
|
2
|
+
|
|
3
|
+
The Luca Inkbot Assistant is a demo assistant that goes along with the `luca inkbot` command that is available if you check out the Luca Framework's source code from Github.
|
|
4
|
+
|
|
5
|
+
Inkbot knows how to build TUIs with Ink, and how to learn and discover all available framework APIs.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
maxTokens: 4096
|
|
3
|
+
local: true
|
|
4
|
+
model: mlx-qwopus3.5-27b-v3-vision
|
|
5
|
+
skills:
|
|
6
|
+
- luca-framework
|
|
7
|
+
---
|
|
8
|
+
# Inkbot — Canvas Renderer
|
|
9
|
+
|
|
10
|
+
You are an expert in the Luca framework running inside a split-pane terminal UI. The left pane is this chat. The right pane is a **canvas** that you control by writing TypeScript code.
|
|
11
|
+
|
|
12
|
+
## How the Canvas Works
|
|
13
|
+
|
|
14
|
+
You have a `draw` tool. When you call it, the code you provide runs as a **bun subprocess** and its stdout appears in the canvas panel. If the script exits with an error, you receive the stderr — fix the code and redraw.
|
|
15
|
+
|
|
16
|
+
A "redraw" is just calling `draw` again with updated code. The canvas always shows the output of the most recent run of the active scene.
|
|
17
|
+
|
|
18
|
+
### Scenes
|
|
19
|
+
|
|
20
|
+
The canvas supports multiple named **scenes**. Each scene is a separate script. You can:
|
|
21
|
+
|
|
22
|
+
- `draw` — create or update a scene and run it immediately (default scene id: `"default"`)
|
|
23
|
+
- `create_scene` — stage a scene without running it
|
|
24
|
+
- `run_scene` — run a specific scene
|
|
25
|
+
- `run_all` — run every scene in order
|
|
26
|
+
- `activate_scene` — switch which scene the canvas displays
|
|
27
|
+
- `get_canvas` — inspect the current output, errors, code, and status
|
|
28
|
+
|
|
29
|
+
### Writing Scene Code
|
|
30
|
+
|
|
31
|
+
Scene code runs **inside the container** via `vm.run()` with the full container context injected. You have `container`, every enabled feature, and all standard globals available — no imports needed. Use `console.log()` to produce visible output in the canvas.
|
|
32
|
+
|
|
33
|
+
Available in scene scope:
|
|
34
|
+
- `container` — the live AGI container instance
|
|
35
|
+
- All enabled features as top-level globals (e.g. `fs`, `proc`, `ui`, `grep`, etc.)
|
|
36
|
+
- `fetch`, `URL`, `URLSearchParams`, `Buffer`, `process`, `setTimeout`, etc.
|
|
37
|
+
|
|
38
|
+
Use your `luca_describe` tools to learn the APIs. Then write scene code that uses them directly:
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
// Example: list available features
|
|
42
|
+
const available = container.features.available
|
|
43
|
+
console.log("Available features:")
|
|
44
|
+
available.forEach(f => console.log(` - ${f}`))
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
// Example: read and display a file
|
|
49
|
+
const content = fs.readFile('package.json')
|
|
50
|
+
const pkg = JSON.parse(content)
|
|
51
|
+
console.log(`${pkg.name} v${pkg.version}`)
|
|
52
|
+
console.log(`Dependencies: ${Object.keys(pkg.dependencies || {}).length}`)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Tips:
|
|
56
|
+
- **Simple output**: `console.log("Hello world")` — plain text renders in the canvas.
|
|
57
|
+
- **Formatted tables**: Build strings with padding, box-drawing characters, or ANSI escape codes.
|
|
58
|
+
- **Dynamic data**: Fetch APIs, read files, compute values — full container power.
|
|
59
|
+
- **Async**: Top-level `await` works. Fetch URLs, run queries, whatever you need.
|
|
60
|
+
|
|
61
|
+
### Error Recovery
|
|
62
|
+
|
|
63
|
+
If your code has a bug, you will receive the error output. Read the error carefully, fix the issue, and call `draw` again. Do not apologize excessively — just fix it and redraw. The user expects iteration.
|
|
64
|
+
|
|
65
|
+
## Your Personality
|
|
66
|
+
|
|
67
|
+
You are creative, concise, and action-oriented. When the user asks you to render something, do it immediately — show, don't tell. Keep chat responses brief; let the canvas speak. When explaining what you drew, be specific about what's visible.
|
|
68
|
+
|
|
69
|
+
## Your Tools
|
|
70
|
+
|
|
71
|
+
In addition to the canvas tools above, you have access to Luca framework inspection tools (`luca_describe`, etc.) through the skills library. Use them to look up features, APIs, and helpers when writing scene code.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AGIContainer, Assistant } from "@soederpop/luca/agi"
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
var assistant: Assistant
|
|
5
|
+
var container: AGIContainer
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function started() {
|
|
9
|
+
assistant
|
|
10
|
+
// this will give it the ability to read documentation from the various feature
|
|
11
|
+
.use(container.describer)
|
|
12
|
+
// use the documentation from the various available skils
|
|
13
|
+
.use(container.feature('skillsLibrary'))
|
|
14
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import container from '@soederpop/luca/agi'
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
|
|
4
|
+
export const schemas = {
|
|
5
|
+
README: z.object({}).describe('Call this tool first to learn how your canvas tools work.')
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function README() {
|
|
9
|
+
return README_CONTENT
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const README_CONTENT = `
|
|
13
|
+
# Inkbot Canvas Tools
|
|
14
|
+
|
|
15
|
+
You have the following tools registered on you for controlling the canvas:
|
|
16
|
+
|
|
17
|
+
## draw
|
|
18
|
+
Write TypeScript code that runs as a bun subprocess. stdout appears in the canvas.
|
|
19
|
+
- \`code\`: string — the TypeScript to execute
|
|
20
|
+
- \`sceneId\`: string (optional) — defaults to "default"
|
|
21
|
+
|
|
22
|
+
## create_scene
|
|
23
|
+
Create a named scene without running it.
|
|
24
|
+
- \`id\`: string — unique scene name
|
|
25
|
+
- \`code\`: string — TypeScript code
|
|
26
|
+
|
|
27
|
+
## run_scene
|
|
28
|
+
Run an existing scene by id.
|
|
29
|
+
- \`id\`: string
|
|
30
|
+
|
|
31
|
+
## run_all
|
|
32
|
+
Run every scene in order. Returns array of results.
|
|
33
|
+
|
|
34
|
+
## activate_scene
|
|
35
|
+
Switch the canvas to display a different scene.
|
|
36
|
+
- \`id\`: string
|
|
37
|
+
|
|
38
|
+
## get_canvas
|
|
39
|
+
Returns the current canvas state: output, error, code, status, and scene list.
|
|
40
|
+
|
|
41
|
+
## Tips
|
|
42
|
+
- Use console.log() for output — that is what renders in the canvas.
|
|
43
|
+
- If your code errors, you get stderr back. Fix it and draw again.
|
|
44
|
+
- You can use ANSI escape codes for colors and formatting.
|
|
45
|
+
- Scenes persist — update them with draw using the same sceneId.
|
|
46
|
+
- You also have luca framework inspection tools (luca_describe, etc.) to look up APIs.
|
|
47
|
+
`
|
package/bun.lock
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@supabase/supabase-js": "^2.95.3",
|
|
11
11
|
"@types/marked": "^6.0.0",
|
|
12
12
|
"@types/marked-terminal": "^6.1.1",
|
|
13
|
-
"axios": "
|
|
13
|
+
"axios": "1.13.6",
|
|
14
14
|
"cacache": "^17.0.7",
|
|
15
15
|
"chalk": "^5.2.0",
|
|
16
16
|
"child-process-promise": "^2.2.1",
|
|
@@ -531,7 +531,7 @@
|
|
|
531
531
|
|
|
532
532
|
"autoprefixer": ["autoprefixer@10.4.21", "", { "dependencies": { "browserslist": "^4.24.4", "caniuse-lite": "^1.0.30001702", "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", "picocolors": "^1.1.1", "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.1.0" }, "bin": { "autoprefixer": "bin/autoprefixer" } }, "sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ=="],
|
|
533
533
|
|
|
534
|
-
"axios": ["axios@1.
|
|
534
|
+
"axios": ["axios@1.13.6", "", { "dependencies": { "follow-redirects": "^1.15.11", "form-data": "^4.0.5", "proxy-from-env": "^1.1.0" } }, "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ=="],
|
|
535
535
|
|
|
536
536
|
"bail": ["bail@2.0.2", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="],
|
|
537
537
|
|
|
@@ -911,11 +911,11 @@
|
|
|
911
911
|
|
|
912
912
|
"flatted": ["flatted@3.3.3", "", {}, "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg=="],
|
|
913
913
|
|
|
914
|
-
"follow-redirects": ["follow-redirects@1.15.
|
|
914
|
+
"follow-redirects": ["follow-redirects@1.15.11", "", {}, "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ=="],
|
|
915
915
|
|
|
916
916
|
"foreground-child": ["foreground-child@3.3.1", "", { "dependencies": { "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" } }, "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw=="],
|
|
917
917
|
|
|
918
|
-
"form-data": ["form-data@4.0.
|
|
918
|
+
"form-data": ["form-data@4.0.5", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.12" } }, "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w=="],
|
|
919
919
|
|
|
920
920
|
"formdata-polyfill": ["formdata-polyfill@4.0.10", "", { "dependencies": { "fetch-blob": "^3.1.2" } }, "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g=="],
|
|
921
921
|
|
|
@@ -1877,6 +1877,8 @@
|
|
|
1877
1877
|
|
|
1878
1878
|
"@modelcontextprotocol/sdk/zod": ["zod@3.25.57", "", {}, "sha512-6tgzLuwVST5oLUxXTmBqoinKMd3JeesgbgseXeFasKKj8Q1FCZrHnbqJOyiEvr4cVAlbug+CgIsmJ8cl/pU5FA=="],
|
|
1879
1879
|
|
|
1880
|
+
"@soederpop/luca/axios": ["axios@1.9.0", "", { "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } }, "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg=="],
|
|
1881
|
+
|
|
1880
1882
|
"@soederpop/luca/chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="],
|
|
1881
1883
|
|
|
1882
1884
|
"@soederpop/luca/contentbase": ["contentbase@0.1.8", "", { "dependencies": { "@soederpop/luca": ">=0.0.16", "gray-matter": "^4.0.3", "js-yaml": "^4.1.0", "mdast-util-mdxjs-esm": "^2.0.1", "mdast-util-to-markdown": "^2.1.2", "mdast-util-to-string": "^4.0.0", "picomatch": "^4.0.3", "rehype-stringify": "^10.0.1", "remark-gfm": "^4.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.1.2", "remark-stringify": "^11.0.0", "unified": "^11.0.5", "unist-util-find-after": "^5.0.0", "unist-util-find-all-after": "^5.0.0", "unist-util-find-all-before": "^5.0.0", "unist-util-find-before": "^4.0.0", "unist-util-select": "^5.1.0", "unist-util-visit": "^5.0.0", "zod": "^4.3.6" }, "bin": { "cnotes": "src/cli/index.ts", "contentbase": "src/cli/index.ts" } }, "sha512-FcivPrOkmowDea2FobSCHPmNdudQz90ZF5xwp2aDF5ajRXu1lujvzOXEvmwAZ9AcJC37BQHVNR0Ifa1guZaODw=="],
|
|
@@ -2065,6 +2067,8 @@
|
|
|
2065
2067
|
|
|
2066
2068
|
"jest-matcher-utils/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
|
|
2067
2069
|
|
|
2070
|
+
"jsdom/form-data": ["form-data@4.0.3", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.12" } }, "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA=="],
|
|
2071
|
+
|
|
2068
2072
|
"longest-line/strip-ansi": ["strip-ansi@3.0.1", "", { "dependencies": { "ansi-regex": "^2.0.0" } }, "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg=="],
|
|
2069
2073
|
|
|
2070
2074
|
"marked-terminal/ansi-escapes": ["ansi-escapes@7.0.0", "", { "dependencies": { "environment": "^1.0.0" } }, "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw=="],
|
|
@@ -2333,6 +2337,10 @@
|
|
|
2333
2337
|
|
|
2334
2338
|
"@modelcontextprotocol/sdk/express/type-is": ["type-is@2.0.1", "", { "dependencies": { "content-type": "^1.0.5", "media-typer": "^1.1.0", "mime-types": "^3.0.0" } }, "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw=="],
|
|
2335
2339
|
|
|
2340
|
+
"@soederpop/luca/axios/follow-redirects": ["follow-redirects@1.15.9", "", {}, "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ=="],
|
|
2341
|
+
|
|
2342
|
+
"@soederpop/luca/axios/form-data": ["form-data@4.0.3", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.12" } }, "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA=="],
|
|
2343
|
+
|
|
2336
2344
|
"@soederpop/luca/contentbase/mdast-util-to-markdown": ["mdast-util-to-markdown@2.1.2", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "longest-streak": "^3.0.0", "mdast-util-phrasing": "^4.0.0", "mdast-util-to-string": "^4.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "unist-util-visit": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA=="],
|
|
2337
2345
|
|
|
2338
2346
|
"@soederpop/luca/contentbase/mdast-util-to-string": ["mdast-util-to-string@4.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0" } }, "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg=="],
|
|
@@ -2517,6 +2525,8 @@
|
|
|
2517
2525
|
|
|
2518
2526
|
"jest-matcher-utils/chalk/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
|
|
2519
2527
|
|
|
2528
|
+
"jsdom/form-data/mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="],
|
|
2529
|
+
|
|
2520
2530
|
"longest-line/strip-ansi/ansi-regex": ["ansi-regex@2.1.1", "", {}, "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA=="],
|
|
2521
2531
|
|
|
2522
2532
|
"mdast-util-from-markdown/micromark-util-decode-string/micromark-util-character": ["micromark-util-character@2.1.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q=="],
|
|
@@ -2631,6 +2641,8 @@
|
|
|
2631
2641
|
|
|
2632
2642
|
"@modelcontextprotocol/sdk/express/type-is/media-typer": ["media-typer@1.1.0", "", {}, "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw=="],
|
|
2633
2643
|
|
|
2644
|
+
"@soederpop/luca/axios/form-data/mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="],
|
|
2645
|
+
|
|
2634
2646
|
"@soederpop/luca/contentbase/mdast-util-to-markdown/@types/mdast": ["@types/mdast@4.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="],
|
|
2635
2647
|
|
|
2636
2648
|
"@soederpop/luca/contentbase/mdast-util-to-markdown/@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
|
|
@@ -2733,6 +2745,8 @@
|
|
|
2733
2745
|
|
|
2734
2746
|
"inquirer/ora/cli-cursor/restore-cursor": ["restore-cursor@3.1.0", "", { "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" } }, "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA=="],
|
|
2735
2747
|
|
|
2748
|
+
"jsdom/form-data/mime-types/mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="],
|
|
2749
|
+
|
|
2736
2750
|
"mdast-util-gfm-table/mdast-util-from-markdown/micromark/micromark-util-encode": ["micromark-util-encode@1.1.0", "", {}, "sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw=="],
|
|
2737
2751
|
|
|
2738
2752
|
"mdast-util-gfm-table/mdast-util-from-markdown/micromark/micromark-util-sanitize-uri": ["micromark-util-sanitize-uri@1.2.0", "", { "dependencies": { "micromark-util-character": "^1.0.0", "micromark-util-encode": "^1.0.0", "micromark-util-symbol": "^1.0.0" } }, "sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A=="],
|
|
@@ -2783,6 +2797,8 @@
|
|
|
2783
2797
|
|
|
2784
2798
|
"yargs/string-width/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
|
2785
2799
|
|
|
2800
|
+
"@soederpop/luca/axios/form-data/mime-types/mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="],
|
|
2801
|
+
|
|
2786
2802
|
"@soederpop/luca/contentbase/mdast-util-to-markdown/mdast-util-phrasing/unist-util-is": ["unist-util-is@6.0.1", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g=="],
|
|
2787
2803
|
|
|
2788
2804
|
"@soederpop/luca/contentbase/mdast-util-to-markdown/micromark-util-decode-string/micromark-util-character": ["micromark-util-character@2.1.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q=="],
|