@beeos-ai/device-agent 0.4.0
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/.pi/extensions/android-tools.ts +139 -0
- package/.pi/skills/.gitkeep +0 -0
- package/.pi/skills/ground-mobile-fallback/SKILL.md +50 -0
- package/LICENSE +201 -0
- package/dist/action/handler.d.ts +9 -0
- package/dist/action/handler.js +124 -0
- package/dist/action/handler.js.map +1 -0
- package/dist/adapters/agent-gateway-client.d.ts +256 -0
- package/dist/adapters/agent-gateway-client.js +332 -0
- package/dist/adapters/agent-gateway-client.js.map +1 -0
- package/dist/adapters/agentcore-inner-loop.d.ts +29 -0
- package/dist/adapters/agentcore-inner-loop.js +72 -0
- package/dist/adapters/agentcore-inner-loop.js.map +1 -0
- package/dist/adapters/agentcore-pi.d.ts +215 -0
- package/dist/adapters/agentcore-pi.js +464 -0
- package/dist/adapters/agentcore-pi.js.map +1 -0
- package/dist/adapters/agentcore-runner.d.ts +70 -0
- package/dist/adapters/agentcore-runner.js +255 -0
- package/dist/adapters/agentcore-runner.js.map +1 -0
- package/dist/adapters/device-android-adb.d.ts +41 -0
- package/dist/adapters/device-android-adb.js +279 -0
- package/dist/adapters/device-android-adb.js.map +1 -0
- package/dist/adapters/device-desktop.d.ts +37 -0
- package/dist/adapters/device-desktop.js +101 -0
- package/dist/adapters/device-desktop.js.map +1 -0
- package/dist/adapters/identity-file.d.ts +30 -0
- package/dist/adapters/identity-file.js +50 -0
- package/dist/adapters/identity-file.js.map +1 -0
- package/dist/adapters/transport-bridge-ws.d.ts +39 -0
- package/dist/adapters/transport-bridge-ws.js +49 -0
- package/dist/adapters/transport-bridge-ws.js.map +1 -0
- package/dist/adapters/vlm-inner-loop.d.ts +88 -0
- package/dist/adapters/vlm-inner-loop.js +199 -0
- package/dist/adapters/vlm-inner-loop.js.map +1 -0
- package/dist/agent-runtime/adapters/base.d.ts +145 -0
- package/dist/agent-runtime/adapters/base.js +29 -0
- package/dist/agent-runtime/adapters/base.js.map +1 -0
- package/dist/agent-runtime/adapters/index.d.ts +17 -0
- package/dist/agent-runtime/adapters/index.js +17 -0
- package/dist/agent-runtime/adapters/index.js.map +1 -0
- package/dist/agent-runtime/adapters/mock.d.ts +44 -0
- package/dist/agent-runtime/adapters/mock.js +54 -0
- package/dist/agent-runtime/adapters/mock.js.map +1 -0
- package/dist/agent-runtime/adapters/openai.d.ts +63 -0
- package/dist/agent-runtime/adapters/openai.js +302 -0
- package/dist/agent-runtime/adapters/openai.js.map +1 -0
- package/dist/agent-runtime/adapters/registry.d.ts +49 -0
- package/dist/agent-runtime/adapters/registry.js +129 -0
- package/dist/agent-runtime/adapters/registry.js.map +1 -0
- package/dist/agent-runtime/adapters/ui-tars.d.ts +13 -0
- package/dist/agent-runtime/adapters/ui-tars.js +22 -0
- package/dist/agent-runtime/adapters/ui-tars.js.map +1 -0
- package/dist/agent-runtime/agent-runner.d.ts +149 -0
- package/dist/agent-runtime/agent-runner.js +356 -0
- package/dist/agent-runtime/agent-runner.js.map +1 -0
- package/dist/agent-runtime/core.d.ts +170 -0
- package/dist/agent-runtime/core.js +624 -0
- package/dist/agent-runtime/core.js.map +1 -0
- package/dist/agent-runtime/index.d.ts +16 -0
- package/dist/agent-runtime/index.js +17 -0
- package/dist/agent-runtime/index.js.map +1 -0
- package/dist/agent-runtime/plan-executor.d.ts +118 -0
- package/dist/agent-runtime/plan-executor.js +501 -0
- package/dist/agent-runtime/plan-executor.js.map +1 -0
- package/dist/agent-runtime/planner/base.d.ts +128 -0
- package/dist/agent-runtime/planner/base.js +157 -0
- package/dist/agent-runtime/planner/base.js.map +1 -0
- package/dist/agent-runtime/planner/llm-planner.d.ts +58 -0
- package/dist/agent-runtime/planner/llm-planner.js +112 -0
- package/dist/agent-runtime/planner/llm-planner.js.map +1 -0
- package/dist/agent-runtime/planner/noop-planner.d.ts +13 -0
- package/dist/agent-runtime/planner/noop-planner.js +30 -0
- package/dist/agent-runtime/planner/noop-planner.js.map +1 -0
- package/dist/agent-runtime/planner/prompts.d.ts +33 -0
- package/dist/agent-runtime/planner/prompts.js +165 -0
- package/dist/agent-runtime/planner/prompts.js.map +1 -0
- package/dist/agent-runtime/reflection.d.ts +81 -0
- package/dist/agent-runtime/reflection.js +189 -0
- package/dist/agent-runtime/reflection.js.map +1 -0
- package/dist/agent-runtime/reflectors/action-reflector.d.ts +97 -0
- package/dist/agent-runtime/reflectors/action-reflector.js +233 -0
- package/dist/agent-runtime/reflectors/action-reflector.js.map +1 -0
- package/dist/agent-runtime/reflectors/policy.d.ts +53 -0
- package/dist/agent-runtime/reflectors/policy.js +106 -0
- package/dist/agent-runtime/reflectors/policy.js.map +1 -0
- package/dist/agent-runtime/reflectors/trajectory-reflector.d.ts +94 -0
- package/dist/agent-runtime/reflectors/trajectory-reflector.js +223 -0
- package/dist/agent-runtime/reflectors/trajectory-reflector.js.map +1 -0
- package/dist/agent-runtime/skills/embedding.d.ts +53 -0
- package/dist/agent-runtime/skills/embedding.js +134 -0
- package/dist/agent-runtime/skills/embedding.js.map +1 -0
- package/dist/agent-runtime/skills/fs-store.d.ts +88 -0
- package/dist/agent-runtime/skills/fs-store.js +483 -0
- package/dist/agent-runtime/skills/fs-store.js.map +1 -0
- package/dist/agent-runtime/skills/index.d.ts +10 -0
- package/dist/agent-runtime/skills/index.js +10 -0
- package/dist/agent-runtime/skills/index.js.map +1 -0
- package/dist/agent-runtime/skills/matcher-evolver.d.ts +88 -0
- package/dist/agent-runtime/skills/matcher-evolver.js +110 -0
- package/dist/agent-runtime/skills/matcher-evolver.js.map +1 -0
- package/dist/agent-runtime/skills/memory-store.d.ts +23 -0
- package/dist/agent-runtime/skills/memory-store.js +94 -0
- package/dist/agent-runtime/skills/memory-store.js.map +1 -0
- package/dist/agent-runtime/skills/normalise.d.ts +40 -0
- package/dist/agent-runtime/skills/normalise.js +152 -0
- package/dist/agent-runtime/skills/normalise.js.map +1 -0
- package/dist/agent-runtime/skills/replay.d.ts +46 -0
- package/dist/agent-runtime/skills/replay.js +106 -0
- package/dist/agent-runtime/skills/replay.js.map +1 -0
- package/dist/agent-runtime/skills/sqlite-store.d.ts +60 -0
- package/dist/agent-runtime/skills/sqlite-store.js +234 -0
- package/dist/agent-runtime/skills/sqlite-store.js.map +1 -0
- package/dist/agent-runtime/skills/types.d.ts +99 -0
- package/dist/agent-runtime/skills/types.js +14 -0
- package/dist/agent-runtime/skills/types.js.map +1 -0
- package/dist/agent.d.ts +110 -0
- package/dist/agent.js +162 -0
- package/dist/agent.js.map +1 -0
- package/dist/api.d.ts +27 -0
- package/dist/api.js +48 -0
- package/dist/api.js.map +1 -0
- package/dist/app/agent-host.d.ts +59 -0
- package/dist/app/agent-host.js +263 -0
- package/dist/app/agent-host.js.map +1 -0
- package/dist/app/device-manager.d.ts +28 -0
- package/dist/app/device-manager.js +64 -0
- package/dist/app/device-manager.js.map +1 -0
- package/dist/app/message-store.d.ts +55 -0
- package/dist/app/message-store.js +99 -0
- package/dist/app/message-store.js.map +1 -0
- package/dist/app/session-manager.d.ts +132 -0
- package/dist/app/session-manager.js +350 -0
- package/dist/app/session-manager.js.map +1 -0
- package/dist/bootstrap.d.ts +94 -0
- package/dist/bootstrap.js +459 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/chat.d.ts +16 -0
- package/dist/chat.js +175 -0
- package/dist/chat.js.map +1 -0
- package/dist/config/loader.d.ts +77 -0
- package/dist/config/loader.js +292 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/schema.d.ts +162 -0
- package/dist/config/schema.js +243 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/core/actions.d.ts +60 -0
- package/dist/core/actions.js +120 -0
- package/dist/core/actions.js.map +1 -0
- package/dist/core/errors.d.ts +8 -0
- package/dist/core/errors.js +9 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/screen.d.ts +7 -0
- package/dist/core/screen.js +8 -0
- package/dist/core/screen.js.map +1 -0
- package/dist/core/session.d.ts +42 -0
- package/dist/core/session.js +29 -0
- package/dist/core/session.js.map +1 -0
- package/dist/debug/dump-system-prompt.d.ts +1 -0
- package/dist/debug/dump-system-prompt.js +34 -0
- package/dist/debug/dump-system-prompt.js.map +1 -0
- package/dist/device/android.d.ts +25 -0
- package/dist/device/android.js +231 -0
- package/dist/device/android.js.map +1 -0
- package/dist/device/apps.d.ts +3 -0
- package/dist/device/apps.js +77 -0
- package/dist/device/apps.js.map +1 -0
- package/dist/device/base.d.ts +20 -0
- package/dist/device/base.js +2 -0
- package/dist/device/base.js.map +1 -0
- package/dist/device/ui-xml.d.ts +29 -0
- package/dist/device/ui-xml.js +194 -0
- package/dist/device/ui-xml.js.map +1 -0
- package/dist/fleet/adapters/process/node-process-manager.d.ts +157 -0
- package/dist/fleet/adapters/process/node-process-manager.js +664 -0
- package/dist/fleet/adapters/process/node-process-manager.js.map +1 -0
- package/dist/fleet/adapters/sources/local-adb.d.ts +105 -0
- package/dist/fleet/adapters/sources/local-adb.js +353 -0
- package/dist/fleet/adapters/sources/local-adb.js.map +1 -0
- package/dist/fleet/adapters/sources/remote-adb.d.ts +97 -0
- package/dist/fleet/adapters/sources/remote-adb.js +138 -0
- package/dist/fleet/adapters/sources/remote-adb.js.map +1 -0
- package/dist/fleet/adapters/state/beeos-cli-store.d.ts +72 -0
- package/dist/fleet/adapters/state/beeos-cli-store.js +250 -0
- package/dist/fleet/adapters/state/beeos-cli-store.js.map +1 -0
- package/dist/fleet/adapters/state/port-allocator.d.ts +43 -0
- package/dist/fleet/adapters/state/port-allocator.js +173 -0
- package/dist/fleet/adapters/state/port-allocator.js.map +1 -0
- package/dist/fleet/domain/device.d.ts +138 -0
- package/dist/fleet/domain/device.js +49 -0
- package/dist/fleet/domain/device.js.map +1 -0
- package/dist/fleet/domain/events.d.ts +102 -0
- package/dist/fleet/domain/events.js +15 -0
- package/dist/fleet/domain/events.js.map +1 -0
- package/dist/fleet/domain/fsm.d.ts +122 -0
- package/dist/fleet/domain/fsm.js +475 -0
- package/dist/fleet/domain/fsm.js.map +1 -0
- package/dist/fleet/http/status-client.d.ts +31 -0
- package/dist/fleet/http/status-client.js +115 -0
- package/dist/fleet/http/status-client.js.map +1 -0
- package/dist/fleet/http/status-server.d.ts +64 -0
- package/dist/fleet/http/status-server.js +200 -0
- package/dist/fleet/http/status-server.js.map +1 -0
- package/dist/fleet/index.d.ts +27 -0
- package/dist/fleet/index.js +17 -0
- package/dist/fleet/index.js.map +1 -0
- package/dist/fleet/installer/index.d.ts +12 -0
- package/dist/fleet/installer/index.js +13 -0
- package/dist/fleet/installer/index.js.map +1 -0
- package/dist/fleet/installer/launchd-mac.d.ts +73 -0
- package/dist/fleet/installer/launchd-mac.js +291 -0
- package/dist/fleet/installer/launchd-mac.js.map +1 -0
- package/dist/fleet/installer/service-spec.d.ts +70 -0
- package/dist/fleet/installer/service-spec.js +43 -0
- package/dist/fleet/installer/service-spec.js.map +1 -0
- package/dist/fleet/installer/spawn-env.d.ts +45 -0
- package/dist/fleet/installer/spawn-env.js +224 -0
- package/dist/fleet/installer/spawn-env.js.map +1 -0
- package/dist/fleet/ports/clock.d.ts +19 -0
- package/dist/fleet/ports/clock.js +26 -0
- package/dist/fleet/ports/clock.js.map +1 -0
- package/dist/fleet/ports/device-source.d.ts +28 -0
- package/dist/fleet/ports/device-source.js +18 -0
- package/dist/fleet/ports/device-source.js.map +1 -0
- package/dist/fleet/ports/process-manager.d.ts +110 -0
- package/dist/fleet/ports/process-manager.js +27 -0
- package/dist/fleet/ports/process-manager.js.map +1 -0
- package/dist/fleet/ports/state-registry.d.ts +49 -0
- package/dist/fleet/ports/state-registry.js +12 -0
- package/dist/fleet/ports/state-registry.js.map +1 -0
- package/dist/fleet/supervisor.d.ts +107 -0
- package/dist/fleet/supervisor.js +508 -0
- package/dist/fleet/supervisor.js.map +1 -0
- package/dist/grounding/grounder.d.ts +46 -0
- package/dist/grounding/grounder.js +82 -0
- package/dist/grounding/grounder.js.map +1 -0
- package/dist/inbound/acp/handlers/device.d.ts +43 -0
- package/dist/inbound/acp/handlers/device.js +153 -0
- package/dist/inbound/acp/handlers/device.js.map +1 -0
- package/dist/inbound/acp/handlers/initialize.d.ts +71 -0
- package/dist/inbound/acp/handlers/initialize.js +53 -0
- package/dist/inbound/acp/handlers/initialize.js.map +1 -0
- package/dist/inbound/acp/handlers/models.d.ts +16 -0
- package/dist/inbound/acp/handlers/models.js +23 -0
- package/dist/inbound/acp/handlers/models.js.map +1 -0
- package/dist/inbound/acp/handlers/session.d.ts +51 -0
- package/dist/inbound/acp/handlers/session.js +61 -0
- package/dist/inbound/acp/handlers/session.js.map +1 -0
- package/dist/inbound/acp/handlers/skills.d.ts +8 -0
- package/dist/inbound/acp/handlers/skills.js +9 -0
- package/dist/inbound/acp/handlers/skills.js.map +1 -0
- package/dist/inbound/acp/notifier.d.ts +35 -0
- package/dist/inbound/acp/notifier.js +45 -0
- package/dist/inbound/acp/notifier.js.map +1 -0
- package/dist/inbound/acp/router.d.ts +67 -0
- package/dist/inbound/acp/router.js +179 -0
- package/dist/inbound/acp/router.js.map +1 -0
- package/dist/inbound/cli/fleet-command.d.ts +34 -0
- package/dist/inbound/cli/fleet-command.js +792 -0
- package/dist/inbound/cli/fleet-command.js.map +1 -0
- package/dist/inbound/cli/main.d.ts +38 -0
- package/dist/inbound/cli/main.js +364 -0
- package/dist/inbound/cli/main.js.map +1 -0
- package/dist/inbound/cli/run-command.d.ts +101 -0
- package/dist/inbound/cli/run-command.js +405 -0
- package/dist/inbound/cli/run-command.js.map +1 -0
- package/dist/inbound/cli/skills-command.d.ts +39 -0
- package/dist/inbound/cli/skills-command.js +333 -0
- package/dist/inbound/cli/skills-command.js.map +1 -0
- package/dist/inbound/http/server.d.ts +7 -0
- package/dist/inbound/http/server.js +8 -0
- package/dist/inbound/http/server.js.map +1 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/logger/index.d.ts +37 -0
- package/dist/logger/index.js +84 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/mcp-client/autospawn.d.ts +67 -0
- package/dist/mcp-client/autospawn.js +173 -0
- package/dist/mcp-client/autospawn.js.map +1 -0
- package/dist/mcp-client/client.d.ts +78 -0
- package/dist/mcp-client/client.js +168 -0
- package/dist/mcp-client/client.js.map +1 -0
- package/dist/mcp-client/index.d.ts +7 -0
- package/dist/mcp-client/index.js +4 -0
- package/dist/mcp-client/index.js.map +1 -0
- package/dist/mcp-client/inproc.d.ts +47 -0
- package/dist/mcp-client/inproc.js +229 -0
- package/dist/mcp-client/inproc.js.map +1 -0
- package/dist/mcp-client/runtime.d.ts +34 -0
- package/dist/mcp-client/runtime.js +15 -0
- package/dist/mcp-client/runtime.js.map +1 -0
- package/dist/model/adapters/autoglm.d.ts +31 -0
- package/dist/model/adapters/autoglm.js +409 -0
- package/dist/model/adapters/autoglm.js.map +1 -0
- package/dist/model/adapters/base.d.ts +13 -0
- package/dist/model/adapters/base.js +27 -0
- package/dist/model/adapters/base.js.map +1 -0
- package/dist/model/adapters/guiowl.d.ts +1 -0
- package/dist/model/adapters/guiowl.js +253 -0
- package/dist/model/adapters/guiowl.js.map +1 -0
- package/dist/model/adapters/index.d.ts +6 -0
- package/dist/model/adapters/index.js +8 -0
- package/dist/model/adapters/index.js.map +1 -0
- package/dist/model/adapters/maiui.d.ts +1 -0
- package/dist/model/adapters/maiui.js +117 -0
- package/dist/model/adapters/maiui.js.map +1 -0
- package/dist/model/adapters/qwenvl.d.ts +1 -0
- package/dist/model/adapters/qwenvl.js +108 -0
- package/dist/model/adapters/qwenvl.js.map +1 -0
- package/dist/model/adapters/showui.d.ts +1 -0
- package/dist/model/adapters/showui.js +132 -0
- package/dist/model/adapters/showui.js.map +1 -0
- package/dist/model/adapters/tool-call.d.ts +6 -0
- package/dist/model/adapters/tool-call.js +102 -0
- package/dist/model/adapters/tool-call.js.map +1 -0
- package/dist/model/adapters/uitars.d.ts +1 -0
- package/dist/model/adapters/uitars.js +180 -0
- package/dist/model/adapters/uitars.js.map +1 -0
- package/dist/model/base.d.ts +32 -0
- package/dist/model/base.js +2 -0
- package/dist/model/base.js.map +1 -0
- package/dist/model/client.d.ts +26 -0
- package/dist/model/client.js +300 -0
- package/dist/model/client.js.map +1 -0
- package/dist/model/image/compress.d.ts +53 -0
- package/dist/model/image/compress.js +89 -0
- package/dist/model/image/compress.js.map +1 -0
- package/dist/model/image/transport.d.ts +134 -0
- package/dist/model/image/transport.js +154 -0
- package/dist/model/image/transport.js.map +1 -0
- package/dist/orchestrator-system-prompt.d.ts +6 -0
- package/dist/orchestrator-system-prompt.js +81 -0
- package/dist/orchestrator-system-prompt.js.map +1 -0
- package/dist/pi-context.d.ts +82 -0
- package/dist/pi-context.js +62 -0
- package/dist/pi-context.js.map +1 -0
- package/dist/pi-local-skills.d.ts +17 -0
- package/dist/pi-local-skills.js +24 -0
- package/dist/pi-local-skills.js.map +1 -0
- package/dist/plugins/acp/index.d.ts +46 -0
- package/dist/plugins/acp/index.js +111 -0
- package/dist/plugins/acp/index.js.map +1 -0
- package/dist/plugins/agent-sync/index.d.ts +40 -0
- package/dist/plugins/agent-sync/index.js +98 -0
- package/dist/plugins/agent-sync/index.js.map +1 -0
- package/dist/plugins/http-debug/index.d.ts +30 -0
- package/dist/plugins/http-debug/index.js +64 -0
- package/dist/plugins/http-debug/index.js.map +1 -0
- package/dist/plugins/http-debug/server.d.ts +92 -0
- package/dist/plugins/http-debug/server.js +464 -0
- package/dist/plugins/http-debug/server.js.map +1 -0
- package/dist/ports/agent-core.d.ts +158 -0
- package/dist/ports/agent-core.js +2 -0
- package/dist/ports/agent-core.js.map +1 -0
- package/dist/ports/agent-host.d.ts +125 -0
- package/dist/ports/agent-host.js +23 -0
- package/dist/ports/agent-host.js.map +1 -0
- package/dist/ports/device.d.ts +53 -0
- package/dist/ports/device.js +13 -0
- package/dist/ports/device.js.map +1 -0
- package/dist/ports/identity.d.ts +22 -0
- package/dist/ports/identity.js +9 -0
- package/dist/ports/identity.js.map +1 -0
- package/dist/ports/plugin.d.ts +62 -0
- package/dist/ports/plugin.js +35 -0
- package/dist/ports/plugin.js.map +1 -0
- package/dist/ports/transport.d.ts +32 -0
- package/dist/ports/transport.js +12 -0
- package/dist/ports/transport.js.map +1 -0
- package/dist/ports/vlm.d.ts +59 -0
- package/dist/ports/vlm.js +14 -0
- package/dist/ports/vlm.js.map +1 -0
- package/dist/test-lan-autoglm.d.ts +7 -0
- package/dist/test-lan-autoglm.js +46 -0
- package/dist/test-lan-autoglm.js.map +1 -0
- package/dist/test-mem-breakdown.d.ts +1 -0
- package/dist/test-mem-breakdown.js +103 -0
- package/dist/test-mem-breakdown.js.map +1 -0
- package/dist/test-mem.d.ts +1 -0
- package/dist/test-mem.js +60 -0
- package/dist/test-mem.js.map +1 -0
- package/dist/test-mobile-use.d.ts +1 -0
- package/dist/test-mobile-use.js +18 -0
- package/dist/test-mobile-use.js.map +1 -0
- package/dist/test-screenshot-loop.d.ts +1 -0
- package/dist/test-screenshot-loop.js +43 -0
- package/dist/test-screenshot-loop.js.map +1 -0
- package/dist/test-screenshot.d.ts +1 -0
- package/dist/test-screenshot.js +10 -0
- package/dist/test-screenshot.js.map +1 -0
- package/dist/test-ui-xml-dump.d.ts +15 -0
- package/dist/test-ui-xml-dump.js +49 -0
- package/dist/test-ui-xml-dump.js.map +1 -0
- package/dist/types.d.ts +69 -0
- package/dist/types.js +23 -0
- package/dist/types.js.map +1 -0
- package/package.json +94 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration schema validated by zod.
|
|
3
|
+
*
|
|
4
|
+
* Loader resolves CLI flags > env > config file > zod defaults. Bridge URL is
|
|
5
|
+
* optional: when not set, the CLI runtime calls Agent Gateway
|
|
6
|
+
* `GET /api/v1/bridge/config` (Ed25519-signed) to discover the region-aware
|
|
7
|
+
* bridge endpoint at boot.
|
|
8
|
+
*
|
|
9
|
+
* The agent runs as a two-layer system by default:
|
|
10
|
+
*
|
|
11
|
+
* - **outer** orchestrator — text LLM via pi-coding-agent
|
|
12
|
+
* (default `moonshotai/kimi-k2.6` on ARouter)
|
|
13
|
+
* - **mobileUse** inner VLM — vision-language device control loop
|
|
14
|
+
* (default `AutoGLM-Phone-9B-Q4_K_M.gguf` with
|
|
15
|
+
* the `autoglm` adapter)
|
|
16
|
+
* - **grounder** visual ground — coordinate grounding tool used by the outer
|
|
17
|
+
* layer when it needs precise tap targets.
|
|
18
|
+
* Defaults to mirroring `mobileUse` so a
|
|
19
|
+
* fully self-hosted setup still works.
|
|
20
|
+
*
|
|
21
|
+
* The legacy single-layer mode is still available via `legacyInner: true`
|
|
22
|
+
* (or `--legacy-inner`) — that path drives `vlm-inner-loop.ts` directly.
|
|
23
|
+
*/
|
|
24
|
+
import { z } from "zod";
|
|
25
|
+
export declare const RuntimeMode: z.ZodEnum<{
|
|
26
|
+
android: "android";
|
|
27
|
+
desktop: "desktop";
|
|
28
|
+
}>;
|
|
29
|
+
export type RuntimeMode = z.infer<typeof RuntimeMode>;
|
|
30
|
+
/**
|
|
31
|
+
* Per-LLM section. `provider` selects the adapter family
|
|
32
|
+
* (`arouter` / `openrouter` / `openai` / `qwen` / `uitars` / `autoglm` / …);
|
|
33
|
+
* empty means "auto-detect from model id".
|
|
34
|
+
*/
|
|
35
|
+
export declare const LlmSection: z.ZodObject<{
|
|
36
|
+
apiKey: z.ZodDefault<z.ZodString>;
|
|
37
|
+
baseUrl: z.ZodDefault<z.ZodString>;
|
|
38
|
+
model: z.ZodDefault<z.ZodString>;
|
|
39
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
40
|
+
}, z.core.$loose>;
|
|
41
|
+
export type LlmSection = z.infer<typeof LlmSection>;
|
|
42
|
+
/**
|
|
43
|
+
* Default ARouter base URL. Single source of truth — agent-config.ts in
|
|
44
|
+
* web/packages/core uses the same constant for parity.
|
|
45
|
+
*/
|
|
46
|
+
export declare const DEFAULT_AROUTER_BASE_URL = "https://api.arouter.ai";
|
|
47
|
+
/** Default outer orchestrator model when nothing is configured. */
|
|
48
|
+
export declare const DEFAULT_OUTER_MODEL = "moonshotai/kimi-k2.6";
|
|
49
|
+
/**
|
|
50
|
+
* Default inner mobile_use VLM model when nothing is configured.
|
|
51
|
+
*
|
|
52
|
+
* The `llama/` prefix is the ARouter **provider** route — without it, the
|
|
53
|
+
* gateway falls back to `openai/...` and the request is shipped to
|
|
54
|
+
* OpenRouter, which rejects the unknown model id. The OpenAI SDK then
|
|
55
|
+
* surfaces the upstream error as a hollow `502 status code (no body)`.
|
|
56
|
+
* See `docs/adr/` and the agent-runtime README for the full routing table.
|
|
57
|
+
*/
|
|
58
|
+
export declare const DEFAULT_MOBILE_USE_MODEL = "llama/AutoGLM-Phone-9B-Q4_K_M.gguf";
|
|
59
|
+
/** Default mobile_use adapter (forwarded to OpenAIClient when constructing the inner loop). */
|
|
60
|
+
export declare const DEFAULT_MOBILE_USE_PROVIDER = "autoglm";
|
|
61
|
+
/**
|
|
62
|
+
* Group-specific defaults exported for `loader.ts` to perform a
|
|
63
|
+
* post-merge `applyGroupDefaults` pass.
|
|
64
|
+
*
|
|
65
|
+
* Why exported (and why loader does the backfill rather than zod):
|
|
66
|
+
* `zod.default(v)` only fires when the input field is `undefined`.
|
|
67
|
+
* When `loader` ends up producing `mobileUse: { apiKey: "x" }` (e.g.
|
|
68
|
+
* from the legacy `vlm_api_key` mirror, or from `GUI_AGENT_API_KEY`
|
|
69
|
+
* alone), zod sees the object and skips the whole `.default(...)` —
|
|
70
|
+
* then `LlmSection`'s inner `model: z.string().default("")` fills
|
|
71
|
+
* the missing field with empty string. Net result: `mobileUse.model`
|
|
72
|
+
* silently becomes `""` and the agent boots without a model.
|
|
73
|
+
*
|
|
74
|
+
* Loader is the right place to express "deep-merge group defaults"
|
|
75
|
+
* semantics because that's exactly what config resolution is: layer
|
|
76
|
+
* stacking with section-aware merging. Zod stays pure type validation.
|
|
77
|
+
*
|
|
78
|
+
* `apiKey` is intentionally NOT carried in these constants because an
|
|
79
|
+
* empty key is a legitimate runtime state (the dashboard hasn't filled
|
|
80
|
+
* `AROUTER_API_KEY` yet) — surfacing it lets the host emit a clear
|
|
81
|
+
* `keyMissing` diagnostic instead of silently masking it with a default.
|
|
82
|
+
*/
|
|
83
|
+
export declare const OUTER_DEFAULTS: {
|
|
84
|
+
readonly baseUrl: "https://api.arouter.ai";
|
|
85
|
+
readonly model: "moonshotai/kimi-k2.6";
|
|
86
|
+
readonly provider: "";
|
|
87
|
+
};
|
|
88
|
+
export declare const MOBILE_USE_DEFAULTS: {
|
|
89
|
+
readonly baseUrl: "https://api.arouter.ai";
|
|
90
|
+
readonly model: "llama/AutoGLM-Phone-9B-Q4_K_M.gguf";
|
|
91
|
+
readonly provider: "autoglm";
|
|
92
|
+
};
|
|
93
|
+
export declare const GROUNDER_DEFAULTS: {
|
|
94
|
+
readonly baseUrl: "https://api.arouter.ai";
|
|
95
|
+
readonly model: "llama/AutoGLM-Phone-9B-Q4_K_M.gguf";
|
|
96
|
+
readonly provider: "autoglm";
|
|
97
|
+
};
|
|
98
|
+
export declare const Config: z.ZodObject<{
|
|
99
|
+
standalone: z.ZodDefault<z.ZodBoolean>;
|
|
100
|
+
bridgeUrl: z.ZodDefault<z.ZodString>;
|
|
101
|
+
bridgeService: z.ZodDefault<z.ZodString>;
|
|
102
|
+
keyFile: z.ZodOptional<z.ZodString>;
|
|
103
|
+
agentGatewayUrl: z.ZodDefault<z.ZodString>;
|
|
104
|
+
region: z.ZodDefault<z.ZodString>;
|
|
105
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
106
|
+
android: "android";
|
|
107
|
+
desktop: "desktop";
|
|
108
|
+
}>>;
|
|
109
|
+
adbSerial: z.ZodOptional<z.ZodString>;
|
|
110
|
+
adbHost: z.ZodDefault<z.ZodString>;
|
|
111
|
+
adbPort: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
112
|
+
mcpUrl: z.ZodDefault<z.ZodString>;
|
|
113
|
+
mcpAutospawn: z.ZodDefault<z.ZodBoolean>;
|
|
114
|
+
mcpReadyAttempts: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
115
|
+
mcpReadyAttemptDelayMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
116
|
+
outer: z.ZodDefault<z.ZodObject<{
|
|
117
|
+
apiKey: z.ZodDefault<z.ZodString>;
|
|
118
|
+
baseUrl: z.ZodDefault<z.ZodString>;
|
|
119
|
+
model: z.ZodDefault<z.ZodString>;
|
|
120
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
121
|
+
}, z.core.$loose>>;
|
|
122
|
+
mobileUse: z.ZodDefault<z.ZodObject<{
|
|
123
|
+
apiKey: z.ZodDefault<z.ZodString>;
|
|
124
|
+
baseUrl: z.ZodDefault<z.ZodString>;
|
|
125
|
+
model: z.ZodDefault<z.ZodString>;
|
|
126
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
127
|
+
}, z.core.$loose>>;
|
|
128
|
+
grounder: z.ZodDefault<z.ZodObject<{
|
|
129
|
+
apiKey: z.ZodDefault<z.ZodString>;
|
|
130
|
+
baseUrl: z.ZodDefault<z.ZodString>;
|
|
131
|
+
model: z.ZodDefault<z.ZodString>;
|
|
132
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
133
|
+
}, z.core.$loose>>;
|
|
134
|
+
legacyInner: z.ZodDefault<z.ZodBoolean>;
|
|
135
|
+
pi: z.ZodDefault<z.ZodBoolean>;
|
|
136
|
+
planMode: z.ZodDefault<z.ZodEnum<{
|
|
137
|
+
auto: "auto";
|
|
138
|
+
always: "always";
|
|
139
|
+
never: "never";
|
|
140
|
+
}>>;
|
|
141
|
+
plannerModel: z.ZodDefault<z.ZodString>;
|
|
142
|
+
plannerBaseUrl: z.ZodDefault<z.ZodString>;
|
|
143
|
+
plannerApiKey: z.ZodDefault<z.ZodString>;
|
|
144
|
+
disableAcp: z.ZodDefault<z.ZodBoolean>;
|
|
145
|
+
disableHttp: z.ZodDefault<z.ZodBoolean>;
|
|
146
|
+
vlmApiKey: z.ZodDefault<z.ZodString>;
|
|
147
|
+
vlmBaseUrl: z.ZodDefault<z.ZodString>;
|
|
148
|
+
vlmModel: z.ZodDefault<z.ZodString>;
|
|
149
|
+
httpEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
150
|
+
httpHost: z.ZodDefault<z.ZodString>;
|
|
151
|
+
httpPort: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
152
|
+
httpCorsOrigins: z.ZodDefault<z.ZodString>;
|
|
153
|
+
logLevel: z.ZodDefault<z.ZodString>;
|
|
154
|
+
maxSteps: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
155
|
+
vlmImageTransport: z.ZodDefault<z.ZodEnum<{
|
|
156
|
+
"data-url": "data-url";
|
|
157
|
+
"http-url": "http-url";
|
|
158
|
+
}>>;
|
|
159
|
+
vlmImageKeyPrefix: z.ZodDefault<z.ZodString>;
|
|
160
|
+
sessionTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
161
|
+
}, z.core.$loose>;
|
|
162
|
+
export type Config = z.infer<typeof Config>;
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration schema validated by zod.
|
|
3
|
+
*
|
|
4
|
+
* Loader resolves CLI flags > env > config file > zod defaults. Bridge URL is
|
|
5
|
+
* optional: when not set, the CLI runtime calls Agent Gateway
|
|
6
|
+
* `GET /api/v1/bridge/config` (Ed25519-signed) to discover the region-aware
|
|
7
|
+
* bridge endpoint at boot.
|
|
8
|
+
*
|
|
9
|
+
* The agent runs as a two-layer system by default:
|
|
10
|
+
*
|
|
11
|
+
* - **outer** orchestrator — text LLM via pi-coding-agent
|
|
12
|
+
* (default `moonshotai/kimi-k2.6` on ARouter)
|
|
13
|
+
* - **mobileUse** inner VLM — vision-language device control loop
|
|
14
|
+
* (default `AutoGLM-Phone-9B-Q4_K_M.gguf` with
|
|
15
|
+
* the `autoglm` adapter)
|
|
16
|
+
* - **grounder** visual ground — coordinate grounding tool used by the outer
|
|
17
|
+
* layer when it needs precise tap targets.
|
|
18
|
+
* Defaults to mirroring `mobileUse` so a
|
|
19
|
+
* fully self-hosted setup still works.
|
|
20
|
+
*
|
|
21
|
+
* The legacy single-layer mode is still available via `legacyInner: true`
|
|
22
|
+
* (or `--legacy-inner`) — that path drives `vlm-inner-loop.ts` directly.
|
|
23
|
+
*/
|
|
24
|
+
import { z } from "zod";
|
|
25
|
+
export const RuntimeMode = z.enum(["android", "desktop"]);
|
|
26
|
+
/**
|
|
27
|
+
* Per-LLM section. `provider` selects the adapter family
|
|
28
|
+
* (`arouter` / `openrouter` / `openai` / `qwen` / `uitars` / `autoglm` / …);
|
|
29
|
+
* empty means "auto-detect from model id".
|
|
30
|
+
*/
|
|
31
|
+
export const LlmSection = z
|
|
32
|
+
.object({
|
|
33
|
+
apiKey: z.string().default(""),
|
|
34
|
+
baseUrl: z.string().default(""),
|
|
35
|
+
model: z.string().default(""),
|
|
36
|
+
provider: z.string().default(""),
|
|
37
|
+
})
|
|
38
|
+
.passthrough();
|
|
39
|
+
/**
|
|
40
|
+
* Default ARouter base URL. Single source of truth — agent-config.ts in
|
|
41
|
+
* web/packages/core uses the same constant for parity.
|
|
42
|
+
*/
|
|
43
|
+
export const DEFAULT_AROUTER_BASE_URL = "https://api.arouter.ai";
|
|
44
|
+
/** Default outer orchestrator model when nothing is configured. */
|
|
45
|
+
export const DEFAULT_OUTER_MODEL = "moonshotai/kimi-k2.6";
|
|
46
|
+
/**
|
|
47
|
+
* Default inner mobile_use VLM model when nothing is configured.
|
|
48
|
+
*
|
|
49
|
+
* The `llama/` prefix is the ARouter **provider** route — without it, the
|
|
50
|
+
* gateway falls back to `openai/...` and the request is shipped to
|
|
51
|
+
* OpenRouter, which rejects the unknown model id. The OpenAI SDK then
|
|
52
|
+
* surfaces the upstream error as a hollow `502 status code (no body)`.
|
|
53
|
+
* See `docs/adr/` and the agent-runtime README for the full routing table.
|
|
54
|
+
*/
|
|
55
|
+
export const DEFAULT_MOBILE_USE_MODEL = "llama/AutoGLM-Phone-9B-Q4_K_M.gguf";
|
|
56
|
+
/** Default mobile_use adapter (forwarded to OpenAIClient when constructing the inner loop). */
|
|
57
|
+
export const DEFAULT_MOBILE_USE_PROVIDER = "autoglm";
|
|
58
|
+
/**
|
|
59
|
+
* Group-specific defaults exported for `loader.ts` to perform a
|
|
60
|
+
* post-merge `applyGroupDefaults` pass.
|
|
61
|
+
*
|
|
62
|
+
* Why exported (and why loader does the backfill rather than zod):
|
|
63
|
+
* `zod.default(v)` only fires when the input field is `undefined`.
|
|
64
|
+
* When `loader` ends up producing `mobileUse: { apiKey: "x" }` (e.g.
|
|
65
|
+
* from the legacy `vlm_api_key` mirror, or from `GUI_AGENT_API_KEY`
|
|
66
|
+
* alone), zod sees the object and skips the whole `.default(...)` —
|
|
67
|
+
* then `LlmSection`'s inner `model: z.string().default("")` fills
|
|
68
|
+
* the missing field with empty string. Net result: `mobileUse.model`
|
|
69
|
+
* silently becomes `""` and the agent boots without a model.
|
|
70
|
+
*
|
|
71
|
+
* Loader is the right place to express "deep-merge group defaults"
|
|
72
|
+
* semantics because that's exactly what config resolution is: layer
|
|
73
|
+
* stacking with section-aware merging. Zod stays pure type validation.
|
|
74
|
+
*
|
|
75
|
+
* `apiKey` is intentionally NOT carried in these constants because an
|
|
76
|
+
* empty key is a legitimate runtime state (the dashboard hasn't filled
|
|
77
|
+
* `AROUTER_API_KEY` yet) — surfacing it lets the host emit a clear
|
|
78
|
+
* `keyMissing` diagnostic instead of silently masking it with a default.
|
|
79
|
+
*/
|
|
80
|
+
export const OUTER_DEFAULTS = {
|
|
81
|
+
baseUrl: DEFAULT_AROUTER_BASE_URL,
|
|
82
|
+
model: DEFAULT_OUTER_MODEL,
|
|
83
|
+
provider: "",
|
|
84
|
+
};
|
|
85
|
+
export const MOBILE_USE_DEFAULTS = {
|
|
86
|
+
baseUrl: DEFAULT_AROUTER_BASE_URL,
|
|
87
|
+
model: DEFAULT_MOBILE_USE_MODEL,
|
|
88
|
+
provider: DEFAULT_MOBILE_USE_PROVIDER,
|
|
89
|
+
};
|
|
90
|
+
export const GROUNDER_DEFAULTS = {
|
|
91
|
+
baseUrl: DEFAULT_AROUTER_BASE_URL,
|
|
92
|
+
model: DEFAULT_MOBILE_USE_MODEL,
|
|
93
|
+
provider: DEFAULT_MOBILE_USE_PROVIDER,
|
|
94
|
+
};
|
|
95
|
+
const outerDefaults = LlmSection.parse({ ...OUTER_DEFAULTS });
|
|
96
|
+
const mobileUseDefaults = LlmSection.parse({ ...MOBILE_USE_DEFAULTS });
|
|
97
|
+
const grounderDefaults = LlmSection.parse({ ...GROUNDER_DEFAULTS });
|
|
98
|
+
export const Config = z
|
|
99
|
+
.object({
|
|
100
|
+
/** Standalone mode: skip Bridge handshake, only run HTTP/CLI. */
|
|
101
|
+
standalone: z.boolean().default(false),
|
|
102
|
+
/**
|
|
103
|
+
* Bridge WebSocket URL. Optional — when empty and not standalone, the CLI
|
|
104
|
+
* calls Agent Gateway to discover a region-allocated URL at boot.
|
|
105
|
+
*/
|
|
106
|
+
bridgeUrl: z.string().default(""),
|
|
107
|
+
/** Bridge service name (default `acp`). */
|
|
108
|
+
bridgeService: z.string().default("acp"),
|
|
109
|
+
/** Path to Ed25519 identity key. Defaults to `~/.beeos/device-agent.key`. */
|
|
110
|
+
keyFile: z.string().optional(),
|
|
111
|
+
/**
|
|
112
|
+
* Agent Gateway base URL used for bridge URL discovery (and other
|
|
113
|
+
* authenticated control-plane calls). Default points at production.
|
|
114
|
+
*/
|
|
115
|
+
agentGatewayUrl: z.string().default("https://agent-gw.beeos.ai"),
|
|
116
|
+
/** Optional preferred region for geo-aware Bridge allocation. */
|
|
117
|
+
region: z.string().default(""),
|
|
118
|
+
mode: RuntimeMode.default("android"),
|
|
119
|
+
adbSerial: z.string().optional(),
|
|
120
|
+
adbHost: z.string().default("127.0.0.1"),
|
|
121
|
+
adbPort: z.coerce.number().int().positive().default(5037),
|
|
122
|
+
/**
|
|
123
|
+
* URL of the sibling `device-mcp-server` HTTP service. When set, bootstrap
|
|
124
|
+
* probes `/healthz` with retry before continuing — failure aborts boot
|
|
125
|
+
* with a `MCP_UNREACHABLE` diagnostic. When empty (legacy default), the
|
|
126
|
+
* device-agent talks to local adapters directly without going through MCP.
|
|
127
|
+
* Maps from `--mcp-url` / `MCP_URL`.
|
|
128
|
+
*/
|
|
129
|
+
mcpUrl: z.string().default(""),
|
|
130
|
+
/**
|
|
131
|
+
* If true, bootstrap will spawn the sibling `device-mcp-server` process
|
|
132
|
+
* and connect to it via `mcpUrl`. Reserved for the bootstrap-cli refactor
|
|
133
|
+
* — the current revision only honors `mcpUrl` (probe-only) when set.
|
|
134
|
+
*/
|
|
135
|
+
mcpAutospawn: z.boolean().default(false),
|
|
136
|
+
/** Max attempts for the bootstrap MCP `/healthz` readiness probe. */
|
|
137
|
+
mcpReadyAttempts: z.coerce.number().int().positive().default(10),
|
|
138
|
+
/** Delay (ms) between MCP `/healthz` readiness probes. */
|
|
139
|
+
mcpReadyAttemptDelayMs: z.coerce.number().int().positive().default(500),
|
|
140
|
+
// ── Two-layer agent configuration ────────────────────────────────────
|
|
141
|
+
/**
|
|
142
|
+
* Outer orchestrator LLM. Drives high-level planning and tool selection
|
|
143
|
+
* via pi-coding-agent. Maps from `ORCH_*` env / `--outer-*` flags.
|
|
144
|
+
*/
|
|
145
|
+
outer: LlmSection.default(outerDefaults),
|
|
146
|
+
/**
|
|
147
|
+
* Inner mobile_use VLM. Performs the screenshot→reason→act loop.
|
|
148
|
+
* Maps from `GUI_AGENT_*` env / `--mobile-use-*` flags.
|
|
149
|
+
*/
|
|
150
|
+
mobileUse: LlmSection.default(mobileUseDefaults),
|
|
151
|
+
/**
|
|
152
|
+
* Visual grounder used by the outer layer for precise coordinate
|
|
153
|
+
* grounding. Maps from `GROUNDER_*` env / `--grounder-*` flags.
|
|
154
|
+
*/
|
|
155
|
+
grounder: LlmSection.default(grounderDefaults),
|
|
156
|
+
/**
|
|
157
|
+
* Force the legacy single-layer adapter (vlm-inner-loop) instead of
|
|
158
|
+
* the v0.3.0 default `AgentRunnerCore`. Maps from `--legacy-inner`
|
|
159
|
+
* / `BEEOS_LEGACY_INNER`. Default `false`.
|
|
160
|
+
*/
|
|
161
|
+
legacyInner: z.boolean().default(false),
|
|
162
|
+
/**
|
|
163
|
+
* Opt in to the pi-coding-agent two-layer orchestrator
|
|
164
|
+
* (`PiOrchestratorAgent`) instead of the v0.3.0 default
|
|
165
|
+
* `AgentRunnerCore`. Maps from `--pi` / `BEEOS_PI=true`.
|
|
166
|
+
* Default `false`.
|
|
167
|
+
*/
|
|
168
|
+
pi: z.boolean().default(false),
|
|
169
|
+
/**
|
|
170
|
+
* Plan-Act mode for the v0.3.0 `AgentRunnerCore`:
|
|
171
|
+
* - `auto` (default) → ReAct for short tasks, Plan-Act for long ones.
|
|
172
|
+
* - `always` → always run through the planner.
|
|
173
|
+
* - `never` → pure ReAct (no planner).
|
|
174
|
+
*/
|
|
175
|
+
planMode: z.enum(["auto", "always", "never"]).default("auto"),
|
|
176
|
+
/**
|
|
177
|
+
* Optional model name for the planner (chat-only LLM). Empty (default)
|
|
178
|
+
* → reuse `mobileUse.model`. Maps from `--planner-model`.
|
|
179
|
+
*/
|
|
180
|
+
plannerModel: z.string().default(""),
|
|
181
|
+
/** Optional planner base URL. Empty → reuse `mobileUse.baseUrl`. */
|
|
182
|
+
plannerBaseUrl: z.string().default(""),
|
|
183
|
+
/** Optional planner API key. Empty → reuse `mobileUse.apiKey`. */
|
|
184
|
+
plannerApiKey: z.string().default(""),
|
|
185
|
+
// ── Plugin toggles ────────────────────────────────────────────────────
|
|
186
|
+
/** Disable the ACP plugin (Bridge WS). Maps from `--no-acp`. */
|
|
187
|
+
disableAcp: z.boolean().default(false),
|
|
188
|
+
/** Disable the HTTP debug plugin. Maps from `--no-http`. */
|
|
189
|
+
disableHttp: z.boolean().default(false),
|
|
190
|
+
// ── Backward-compat top-level VLM fields ─────────────────────────────
|
|
191
|
+
/**
|
|
192
|
+
* @deprecated since the two-layer split — mirrored to `mobileUse.apiKey`
|
|
193
|
+
* by the loader. New configs should use `mobileUse.apiKey` (and/or
|
|
194
|
+
* `outer.apiKey` / `grounder.apiKey`) instead.
|
|
195
|
+
*/
|
|
196
|
+
vlmApiKey: z.string().default(""),
|
|
197
|
+
/** @deprecated mirrored to `mobileUse.baseUrl`. */
|
|
198
|
+
vlmBaseUrl: z.string().default(DEFAULT_AROUTER_BASE_URL),
|
|
199
|
+
/** @deprecated mirrored to `mobileUse.model`. */
|
|
200
|
+
vlmModel: z.string().default(""),
|
|
201
|
+
httpEnabled: z.boolean().default(false),
|
|
202
|
+
httpHost: z.string().default("127.0.0.1"),
|
|
203
|
+
httpPort: z.coerce.number().int().positive().default(9090),
|
|
204
|
+
/** Comma-separated list of allowed CORS origins (or `*`). */
|
|
205
|
+
httpCorsOrigins: z.string().default(""),
|
|
206
|
+
logLevel: z.string().default("info"),
|
|
207
|
+
maxSteps: z.coerce.number().int().positive().default(30),
|
|
208
|
+
/**
|
|
209
|
+
* VLM image transport strategy.
|
|
210
|
+
*
|
|
211
|
+
* - `data-url` → inline base64 in the chat-completion message.
|
|
212
|
+
* Default. No backend dependency, but capped by
|
|
213
|
+
* ARouter / nginx body limits (≈5 MB).
|
|
214
|
+
* - `http-url` → presign + PUT to S3, embed signed GET URL.
|
|
215
|
+
* Required for production to avoid 413/502s on
|
|
216
|
+
* large screenshots. Falls back to `data-url`
|
|
217
|
+
* on transient upload failure (composed by the
|
|
218
|
+
* loader as `FallbackTransport(http,data)`).
|
|
219
|
+
*
|
|
220
|
+
* Maps from `BEEOS_VLM_IMAGE_TRANSPORT` env (`--vlm-image-transport`
|
|
221
|
+
* is not yet wired since this is a per-deployment knob, not a
|
|
222
|
+
* per-invocation one).
|
|
223
|
+
*/
|
|
224
|
+
vlmImageTransport: z.enum(["data-url", "http-url"]).default("data-url"),
|
|
225
|
+
/**
|
|
226
|
+
* Object-name prefix passed to `presignFileUpload` when
|
|
227
|
+
* `vlmImageTransport=http-url`. Lifecycle rules in S3/MinIO attach
|
|
228
|
+
* to this prefix for automatic cleanup (see Phase B8). Trailing
|
|
229
|
+
* slash is required.
|
|
230
|
+
*/
|
|
231
|
+
vlmImageKeyPrefix: z.string().default("vlm-screenshots/"),
|
|
232
|
+
/**
|
|
233
|
+
* Idle eviction threshold for ACP sessions. Sessions whose `lastActive`
|
|
234
|
+
* is older than this value are dropped on the next `newSession` /
|
|
235
|
+
* `listSessions` call (see `SessionManager.evictExpired`). Default:
|
|
236
|
+
* 1 hour. Set to a very large number to effectively disable GC, or
|
|
237
|
+
* shrink it for kiosk-style deployments that want to forget idle
|
|
238
|
+
* conversations quickly.
|
|
239
|
+
*/
|
|
240
|
+
sessionTimeoutMs: z.coerce.number().int().nonnegative().default(3_600_000),
|
|
241
|
+
})
|
|
242
|
+
.passthrough();
|
|
243
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAG1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,MAAM,CAAC;IACN,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OA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,KAAK,CAAC;IACvC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC1D,6DAA6D;IAC7D,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAEvC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;IACpC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAExD;;;;;;;;;;;;;;;OAeG;IACH,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IACvE;;;;;OAKG;IACH,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC;IACzD;;;;;;;OAOG;IACH,gBAAgB,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;CAC3E,CAAC;KACD,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core domain — Action union for the device control plane.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the Python ACP `device/action` sub-actions (tap / long_press / swipe /
|
|
5
|
+
* type / press_key / open_app) plus the inner-loop's extended action set (back /
|
|
6
|
+
* home / wait / scroll / etc.) used by the VLM adapters.
|
|
7
|
+
*
|
|
8
|
+
* Pure data — no IO, no logging, no framework dependency.
|
|
9
|
+
*/
|
|
10
|
+
export type Action = {
|
|
11
|
+
kind: "tap";
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
} | {
|
|
15
|
+
kind: "double_tap";
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
} | {
|
|
19
|
+
kind: "long_press";
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
durationMs?: number;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "swipe";
|
|
25
|
+
x1: number;
|
|
26
|
+
y1: number;
|
|
27
|
+
x2: number;
|
|
28
|
+
y2: number;
|
|
29
|
+
durationMs?: number;
|
|
30
|
+
} | {
|
|
31
|
+
kind: "scroll";
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
direction: "up" | "down" | "left" | "right";
|
|
35
|
+
} | {
|
|
36
|
+
kind: "type";
|
|
37
|
+
text: string;
|
|
38
|
+
} | {
|
|
39
|
+
kind: "press_key";
|
|
40
|
+
keycode: string;
|
|
41
|
+
} | {
|
|
42
|
+
kind: "press_back";
|
|
43
|
+
} | {
|
|
44
|
+
kind: "press_home";
|
|
45
|
+
} | {
|
|
46
|
+
kind: "open_app";
|
|
47
|
+
packageOrName: string;
|
|
48
|
+
} | {
|
|
49
|
+
kind: "wait";
|
|
50
|
+
durationSeconds: number;
|
|
51
|
+
} | {
|
|
52
|
+
kind: "shell";
|
|
53
|
+
command: string;
|
|
54
|
+
};
|
|
55
|
+
export type ActionKind = Action["kind"];
|
|
56
|
+
export interface ActionResult {
|
|
57
|
+
success: boolean;
|
|
58
|
+
message: string | null;
|
|
59
|
+
}
|
|
60
|
+
export declare function parseAcpAction(action: string, parameters: Record<string, unknown>): Action;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core domain — Action union for the device control plane.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the Python ACP `device/action` sub-actions (tap / long_press / swipe /
|
|
5
|
+
* type / press_key / open_app) plus the inner-loop's extended action set (back /
|
|
6
|
+
* home / wait / scroll / etc.) used by the VLM adapters.
|
|
7
|
+
*
|
|
8
|
+
* Pure data — no IO, no logging, no framework dependency.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Translate the wire-format ACP `device/action` payload into the typed Action
|
|
12
|
+
* union. Throws `DeviceError` on unknown / malformed inputs.
|
|
13
|
+
*/
|
|
14
|
+
import { DeviceError } from "./errors.js";
|
|
15
|
+
export function parseAcpAction(action, parameters) {
|
|
16
|
+
switch (action) {
|
|
17
|
+
case "tap":
|
|
18
|
+
return { kind: "tap", x: numberParam(parameters, "x"), y: numberParam(parameters, "y") };
|
|
19
|
+
case "double_tap":
|
|
20
|
+
case "doubleTap":
|
|
21
|
+
return { kind: "double_tap", x: numberParam(parameters, "x"), y: numberParam(parameters, "y") };
|
|
22
|
+
case "long_press":
|
|
23
|
+
case "longPress":
|
|
24
|
+
return {
|
|
25
|
+
kind: "long_press",
|
|
26
|
+
x: numberParam(parameters, "x"),
|
|
27
|
+
y: numberParam(parameters, "y"),
|
|
28
|
+
durationMs: optionalNumber(parameters, "duration_ms") ?? optionalNumber(parameters, "durationMs") ?? 1000,
|
|
29
|
+
};
|
|
30
|
+
case "swipe":
|
|
31
|
+
return {
|
|
32
|
+
kind: "swipe",
|
|
33
|
+
x1: numberParam(parameters, "x1"),
|
|
34
|
+
y1: numberParam(parameters, "y1"),
|
|
35
|
+
x2: numberParam(parameters, "x2"),
|
|
36
|
+
y2: numberParam(parameters, "y2"),
|
|
37
|
+
durationMs: optionalNumber(parameters, "duration_ms") ?? optionalNumber(parameters, "durationMs") ?? 300,
|
|
38
|
+
};
|
|
39
|
+
case "scroll":
|
|
40
|
+
return {
|
|
41
|
+
kind: "scroll",
|
|
42
|
+
x: optionalNumber(parameters, "x") ?? 0,
|
|
43
|
+
y: optionalNumber(parameters, "y") ?? 0,
|
|
44
|
+
direction: scrollDirection(parameters),
|
|
45
|
+
};
|
|
46
|
+
case "type":
|
|
47
|
+
return { kind: "type", text: stringParam(parameters, "text") };
|
|
48
|
+
case "press_key":
|
|
49
|
+
case "pressKey":
|
|
50
|
+
return {
|
|
51
|
+
kind: "press_key",
|
|
52
|
+
keycode: stringParam(parameters, "keycode", parameters.key ?? parameters.keyCode),
|
|
53
|
+
};
|
|
54
|
+
case "open_app":
|
|
55
|
+
case "openApp":
|
|
56
|
+
return {
|
|
57
|
+
kind: "open_app",
|
|
58
|
+
packageOrName: stringParam(parameters, "package", parameters.packageName ??
|
|
59
|
+
parameters.app_name ??
|
|
60
|
+
parameters.appName),
|
|
61
|
+
};
|
|
62
|
+
case "back":
|
|
63
|
+
case "press_back":
|
|
64
|
+
case "pressBack":
|
|
65
|
+
return { kind: "press_back" };
|
|
66
|
+
case "home":
|
|
67
|
+
case "press_home":
|
|
68
|
+
case "pressHome":
|
|
69
|
+
return { kind: "press_home" };
|
|
70
|
+
case "wait":
|
|
71
|
+
return {
|
|
72
|
+
kind: "wait",
|
|
73
|
+
durationSeconds: optionalNumber(parameters, "duration_seconds") ??
|
|
74
|
+
optionalNumber(parameters, "durationSeconds") ??
|
|
75
|
+
2,
|
|
76
|
+
};
|
|
77
|
+
case "shell":
|
|
78
|
+
return { kind: "shell", command: stringParam(parameters, "command") };
|
|
79
|
+
default:
|
|
80
|
+
throw new DeviceError(`Unknown action: ${action}`, { subtype: "invalid_args" });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function scrollDirection(p) {
|
|
84
|
+
const v = p.direction;
|
|
85
|
+
if (v === "up" || v === "down" || v === "left" || v === "right")
|
|
86
|
+
return v;
|
|
87
|
+
throw new DeviceError(`scroll requires direction in {up,down,left,right}`, {
|
|
88
|
+
subtype: "invalid_args",
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function numberParam(p, key) {
|
|
92
|
+
const v = p[key];
|
|
93
|
+
if (typeof v !== "number" || !Number.isFinite(v)) {
|
|
94
|
+
throw new DeviceError(`action parameter "${key}" must be a finite number`, {
|
|
95
|
+
subtype: "invalid_args",
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return v;
|
|
99
|
+
}
|
|
100
|
+
function optionalNumber(p, key) {
|
|
101
|
+
const v = p[key];
|
|
102
|
+
if (v == null)
|
|
103
|
+
return undefined;
|
|
104
|
+
if (typeof v !== "number" || !Number.isFinite(v)) {
|
|
105
|
+
throw new DeviceError(`action parameter "${key}" must be a finite number`, {
|
|
106
|
+
subtype: "invalid_args",
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return v;
|
|
110
|
+
}
|
|
111
|
+
function stringParam(p, key, fallback) {
|
|
112
|
+
const v = p[key] ?? fallback;
|
|
113
|
+
if (typeof v !== "string" || v.length === 0) {
|
|
114
|
+
throw new DeviceError(`action parameter "${key}" must be a non-empty string`, {
|
|
115
|
+
subtype: "invalid_args",
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return v;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/core/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAuBH;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,UAAmC;IAChF,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,KAAK;YACR,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAC;QAC3F,KAAK,YAAY,CAAC;QAClB,KAAK,WAAW;YACd,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAC;QA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CAA0B,EAAE,GAAW;IAC1D,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IACjB,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,MAAM,IAAI,WAAW,CAAC,qBAAqB,GAAG,2BAA2B,EAAE;YACzE,OAAO,EAAE,cAAc;SACxB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,cAAc,CAAC,CAA0B,EAAE,GAAW;IAC7D,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IACjB,IAAI,CAAC,IAAI,IAAI;QAAE,OAAO,SAAS,CAAC;IAChC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,MAAM,IAAI,WAAW,CAAC,qBAAqB,GAAG,2BAA2B,EAAE;YACzE,OAAO,EAAE,cAAc;SACxB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,WAAW,CAAC,CAA0B,EAAE,GAAW,EAAE,QAAiB;IAC7E,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC;IAC7B,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,WAAW,CAAC,qBAAqB,GAAG,8BAA8B,EAAE;YAC5E,OAAO,EAAE,cAAc;SACxB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-export of the shared error hierarchy from `@beeos-ai/device-common`.
|
|
3
|
+
*
|
|
4
|
+
* Kept as a thin shim so existing deep imports (`from "../core/errors.js"`)
|
|
5
|
+
* keep working while the source of truth lives in the common package and is
|
|
6
|
+
* therefore identical-by-reference across the agent and MCP server processes.
|
|
7
|
+
*/
|
|
8
|
+
export { AcpError, DeviceError, type DeviceErrorOptions, InternalError, McpUnreachableError, VlmError, type VlmErrorOptions, } from "@beeos-ai/device-common";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-export of the shared error hierarchy from `@beeos-ai/device-common`.
|
|
3
|
+
*
|
|
4
|
+
* Kept as a thin shim so existing deep imports (`from "../core/errors.js"`)
|
|
5
|
+
* keep working while the source of truth lives in the common package and is
|
|
6
|
+
* therefore identical-by-reference across the agent and MCP server processes.
|
|
7
|
+
*/
|
|
8
|
+
export { AcpError, DeviceError, InternalError, McpUnreachableError, VlmError, } from "@beeos-ai/device-common";
|
|
9
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,QAAQ,EACR,WAAW,EAEX,aAAa,EACb,mBAAmB,EACnB,QAAQ,GAET,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-export of screen / UI types from `@beeos-ai/device-common`.
|
|
3
|
+
*
|
|
4
|
+
* Same rationale as `core/errors.ts` — keep deep imports working during the
|
|
5
|
+
* migration, but make the common package the single source of truth.
|
|
6
|
+
*/
|
|
7
|
+
export type { ScreenObservation, UiNode } from "@beeos-ai/device-common";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-export of screen / UI types from `@beeos-ai/device-common`.
|
|
3
|
+
*
|
|
4
|
+
* Same rationale as `core/errors.ts` — keep deep imports working during the
|
|
5
|
+
* migration, but make the common package the single source of truth.
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen.js","sourceRoot":"","sources":["../../src/core/screen.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|