@intent-systems/nexus 2026.1.5-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +222 -0
- package/LICENSE +21 -0
- package/README-header.png +0 -0
- package/README.md +462 -0
- package/dist/agents/agent-paths.js +16 -0
- package/dist/agents/agent-scope.js +44 -0
- package/dist/agents/auth-profiles.js +626 -0
- package/dist/agents/bash-process-registry.js +126 -0
- package/dist/agents/bash-tools.js +838 -0
- package/dist/agents/chutes-oauth.js +47 -0
- package/dist/agents/clawdbot-tools.js +62 -0
- package/dist/agents/context.js +34 -0
- package/dist/agents/defaults.js +6 -0
- package/dist/agents/memory-search.js +80 -0
- package/dist/agents/model-auth.js +115 -0
- package/dist/agents/model-catalog.js +55 -0
- package/dist/agents/model-fallback.js +210 -0
- package/dist/agents/model-scan.js +263 -0
- package/dist/agents/model-selection.js +152 -0
- package/dist/agents/models-config.js +171 -0
- package/dist/agents/nexus-tools.js +46 -0
- package/dist/agents/pi-embedded-block-chunker.js +188 -0
- package/dist/agents/pi-embedded-helpers.js +139 -0
- package/dist/agents/pi-embedded-runner.js +932 -0
- package/dist/agents/pi-embedded-subscribe.js +541 -0
- package/dist/agents/pi-embedded-utils.js +20 -0
- package/dist/agents/pi-embedded.js +1 -0
- package/dist/agents/pi-extensions/compaction-safeguard.js +140 -0
- package/dist/agents/pi-tool-definition-adapter.js +17 -0
- package/dist/agents/pi-tools.js +510 -0
- package/dist/agents/pi-tools.schema.js +358 -0
- package/dist/agents/sandbox-paths.js +68 -0
- package/dist/agents/sandbox.js +667 -0
- package/dist/agents/shell-utils.js +53 -0
- package/dist/agents/skill-runner.js +224 -0
- package/dist/agents/skill-state.js +164 -0
- package/dist/agents/skill-tools.js +191 -0
- package/dist/agents/skill-usage.js +43 -0
- package/dist/agents/skills-install.js +244 -0
- package/dist/agents/skills-status.js +157 -0
- package/dist/agents/skills.js +472 -0
- package/dist/agents/subagent-registry.js +321 -0
- package/dist/agents/subagent-registry.store.js +47 -0
- package/dist/agents/system-prompt.js +179 -0
- package/dist/agents/timeout.js +26 -0
- package/dist/agents/tool-display.js +155 -0
- package/dist/agents/tool-display.json +236 -0
- package/dist/agents/tool-images.js +138 -0
- package/dist/agents/tool-policy.js +87 -0
- package/dist/agents/tools/agent-step.js +41 -0
- package/dist/agents/tools/browser-tool.js +295 -0
- package/dist/agents/tools/canvas-tool.js +193 -0
- package/dist/agents/tools/common.js +88 -0
- package/dist/agents/tools/cron-tool.js +141 -0
- package/dist/agents/tools/discord-actions-guild.js +186 -0
- package/dist/agents/tools/discord-actions-messaging.js +313 -0
- package/dist/agents/tools/discord-actions-moderation.js +70 -0
- package/dist/agents/tools/discord-actions.js +56 -0
- package/dist/agents/tools/discord-schema.js +199 -0
- package/dist/agents/tools/discord-tool.js +16 -0
- package/dist/agents/tools/gateway-tool.js +46 -0
- package/dist/agents/tools/gateway.js +28 -0
- package/dist/agents/tools/image-tool.js +140 -0
- package/dist/agents/tools/memory-tool.js +92 -0
- package/dist/agents/tools/nodes-tool.js +413 -0
- package/dist/agents/tools/nodes-utils.js +92 -0
- package/dist/agents/tools/sessions-announce-target.js +35 -0
- package/dist/agents/tools/sessions-helpers.js +88 -0
- package/dist/agents/tools/sessions-history-tool.js +137 -0
- package/dist/agents/tools/sessions-list-tool.js +196 -0
- package/dist/agents/tools/sessions-send-helpers.js +103 -0
- package/dist/agents/tools/sessions-send-tool.js +371 -0
- package/dist/agents/tools/sessions-spawn-tool.js +319 -0
- package/dist/agents/tools/slack-actions.js +129 -0
- package/dist/agents/tools/slack-schema.js +59 -0
- package/dist/agents/tools/slack-tool.js +16 -0
- package/dist/agents/tools/telegram-actions.js +159 -0
- package/dist/agents/tools/telegram-schema.js +28 -0
- package/dist/agents/tools/telegram-tool.js +16 -0
- package/dist/agents/tools/whatsapp-login-tool.js +63 -0
- package/dist/agents/usage.js +58 -0
- package/dist/agents/workspace.js +264 -0
- package/dist/auto-reply/chunk.js +177 -0
- package/dist/auto-reply/command-auth.js +44 -0
- package/dist/auto-reply/command-detection.js +22 -0
- package/dist/auto-reply/envelope.js +30 -0
- package/dist/auto-reply/group-activation.js +20 -0
- package/dist/auto-reply/heartbeat.js +58 -0
- package/dist/auto-reply/model.js +22 -0
- package/dist/auto-reply/reply/abort.js +14 -0
- package/dist/auto-reply/reply/agent-runner.js +426 -0
- package/dist/auto-reply/reply/bash-command.js +314 -0
- package/dist/auto-reply/reply/block-streaming.js +34 -0
- package/dist/auto-reply/reply/body.js +29 -0
- package/dist/auto-reply/reply/commands.js +332 -0
- package/dist/auto-reply/reply/directive-handling.js +626 -0
- package/dist/auto-reply/reply/directives.js +59 -0
- package/dist/auto-reply/reply/dispatch-from-config.js +23 -0
- package/dist/auto-reply/reply/followup-runner.js +181 -0
- package/dist/auto-reply/reply/groups.js +152 -0
- package/dist/auto-reply/reply/mentions.js +64 -0
- package/dist/auto-reply/reply/model-selection.js +209 -0
- package/dist/auto-reply/reply/queue.js +399 -0
- package/dist/auto-reply/reply/reply-dispatcher.js +68 -0
- package/dist/auto-reply/reply/reply-tags.js +26 -0
- package/dist/auto-reply/reply/session-updates.js +103 -0
- package/dist/auto-reply/reply/session.js +169 -0
- package/dist/auto-reply/reply/typing.js +125 -0
- package/dist/auto-reply/reply.js +655 -0
- package/dist/auto-reply/send-policy.js +28 -0
- package/dist/auto-reply/status.js +197 -0
- package/dist/auto-reply/templating.js +9 -0
- package/dist/auto-reply/thinking.js +49 -0
- package/dist/auto-reply/tokens.js +2 -0
- package/dist/auto-reply/tool-meta.js +74 -0
- package/dist/auto-reply/transcription.js +57 -0
- package/dist/auto-reply/types.js +1 -0
- package/dist/browser/bridge-server.js +37 -0
- package/dist/browser/cdp.js +382 -0
- package/dist/browser/chrome.js +432 -0
- package/dist/browser/client-actions-core.js +67 -0
- package/dist/browser/client-actions-observe.js +24 -0
- package/dist/browser/client-actions-types.js +1 -0
- package/dist/browser/client-actions.js +3 -0
- package/dist/browser/client-fetch.js +43 -0
- package/dist/browser/client.js +105 -0
- package/dist/browser/config.js +155 -0
- package/dist/browser/constants.js +5 -0
- package/dist/browser/profiles-service.js +124 -0
- package/dist/browser/profiles.js +96 -0
- package/dist/browser/pw-ai.js +2 -0
- package/dist/browser/pw-session.js +144 -0
- package/dist/browser/pw-tools-core.js +363 -0
- package/dist/browser/routes/agent.js +535 -0
- package/dist/browser/routes/basic.js +155 -0
- package/dist/browser/routes/index.js +8 -0
- package/dist/browser/routes/tabs.js +105 -0
- package/dist/browser/routes/utils.js +62 -0
- package/dist/browser/screenshot.js +40 -0
- package/dist/browser/server-context.js +377 -0
- package/dist/browser/server.js +81 -0
- package/dist/browser/target-id.js +18 -0
- package/dist/browser/trash.js +21 -0
- package/dist/canvas-host/a2ui/a2ui.bundle.js +17768 -0
- package/dist/canvas-host/a2ui/index.html +246 -0
- package/dist/canvas-host/a2ui.js +187 -0
- package/dist/canvas-host/server.js +382 -0
- package/dist/channel-web.js +8 -0
- package/dist/cli/browser-cli-actions-input.js +459 -0
- package/dist/cli/browser-cli-actions-observe.js +56 -0
- package/dist/cli/browser-cli-examples.js +31 -0
- package/dist/cli/browser-cli-inspect.js +97 -0
- package/dist/cli/browser-cli-manage.js +286 -0
- package/dist/cli/browser-cli-shared.js +1 -0
- package/dist/cli/browser-cli.js +26 -0
- package/dist/cli/canvas-cli.js +416 -0
- package/dist/cli/cloud-cli.js +336 -0
- package/dist/cli/credential-cli.js +227 -0
- package/dist/cli/cron-cli.js +454 -0
- package/dist/cli/deps.js +17 -0
- package/dist/cli/dns-cli.js +180 -0
- package/dist/cli/gateway-cli.js +665 -0
- package/dist/cli/gateway-rpc.js +20 -0
- package/dist/cli/hooks-cli.js +135 -0
- package/dist/cli/memory-cli.js +101 -0
- package/dist/cli/models-cli.js +248 -0
- package/dist/cli/nodes-camera.js +57 -0
- package/dist/cli/nodes-canvas.js +26 -0
- package/dist/cli/nodes-cli.js +946 -0
- package/dist/cli/nodes-screen.js +37 -0
- package/dist/cli/pairing-cli.js +100 -0
- package/dist/cli/parse-duration.js +20 -0
- package/dist/cli/plugins-cli.js +158 -0
- package/dist/cli/ports.js +97 -0
- package/dist/cli/profile.js +81 -0
- package/dist/cli/program.js +162 -0
- package/dist/cli/prompt.js +19 -0
- package/dist/cli/run-main.js +48 -0
- package/dist/cli/skills-cli.js +132 -0
- package/dist/cli/skills-hub-cli.js +1093 -0
- package/dist/cli/telegram-cli.js +56 -0
- package/dist/cli/tool-connector-cli.js +118 -0
- package/dist/cli/tui-cli.js +35 -0
- package/dist/cli/upstream-sync-cli.js +2833 -0
- package/dist/cli/usage-cli.js +24 -0
- package/dist/cli/wait.js +8 -0
- package/dist/commands/agent-via-gateway.js +115 -0
- package/dist/commands/agent.js +665 -0
- package/dist/commands/antigravity-oauth.js +327 -0
- package/dist/commands/auth-choice-options.js +80 -0
- package/dist/commands/auth-choice.js +134 -0
- package/dist/commands/auth-token.js +31 -0
- package/dist/commands/bootstrap-preset.js +214 -0
- package/dist/commands/capabilities.js +36 -0
- package/dist/commands/chutes-oauth.js +144 -0
- package/dist/commands/claude-md.js +137 -0
- package/dist/commands/config-view.js +11 -0
- package/dist/commands/configure.js +648 -0
- package/dist/commands/credential.js +236 -0
- package/dist/commands/cursor-rules.js +230 -0
- package/dist/commands/doctor-state-migrations.js +358 -0
- package/dist/commands/doctor-ui.js +113 -0
- package/dist/commands/doctor.js +673 -0
- package/dist/commands/health.js +112 -0
- package/dist/commands/identity.js +54 -0
- package/dist/commands/init.js +167 -0
- package/dist/commands/models/aliases.js +85 -0
- package/dist/commands/models/fallbacks.js +123 -0
- package/dist/commands/models/image-fallbacks.js +123 -0
- package/dist/commands/models/list.js +347 -0
- package/dist/commands/models/scan.js +271 -0
- package/dist/commands/models/set-image.js +27 -0
- package/dist/commands/models/set.js +27 -0
- package/dist/commands/models/shared.js +73 -0
- package/dist/commands/models.js +7 -0
- package/dist/commands/onboard-auth.js +101 -0
- package/dist/commands/onboard-channels.js +814 -0
- package/dist/commands/onboard-eve-identity.js +98 -0
- package/dist/commands/onboard-github.js +153 -0
- package/dist/commands/onboard-helpers.js +303 -0
- package/dist/commands/onboard-interactive.js +17 -0
- package/dist/commands/onboard-non-interactive.js +228 -0
- package/dist/commands/onboard-providers.js +829 -0
- package/dist/commands/onboard-quickstart.js +185 -0
- package/dist/commands/onboard-remote.js +120 -0
- package/dist/commands/onboard-skills.js +148 -0
- package/dist/commands/onboard-types.js +1 -0
- package/dist/commands/onboard.js +19 -0
- package/dist/commands/openai-codex-model-default.js +38 -0
- package/dist/commands/poll.js +64 -0
- package/dist/commands/quest.js +27 -0
- package/dist/commands/reset.js +61 -0
- package/dist/commands/send.js +124 -0
- package/dist/commands/sessions-ingest.js +359 -0
- package/dist/commands/sessions.js +212 -0
- package/dist/commands/setup.js +59 -0
- package/dist/commands/signal-install.js +135 -0
- package/dist/commands/skills-manifest.js +235 -0
- package/dist/commands/status.js +139 -0
- package/dist/commands/suggestions.js +54 -0
- package/dist/commands/systemd-linger.js +71 -0
- package/dist/commands/update.js +16 -0
- package/dist/commands/usage-upload.js +27 -0
- package/dist/config/config.js +6 -0
- package/dist/config/defaults.js +140 -0
- package/dist/config/group-policy.js +49 -0
- package/dist/config/includes.js +183 -0
- package/dist/config/io.js +188 -0
- package/dist/config/legacy-migrate.js +13 -0
- package/dist/config/legacy.js +425 -0
- package/dist/config/paths.js +82 -0
- package/dist/config/port-defaults.js +32 -0
- package/dist/config/schema.js +173 -0
- package/dist/config/sessions.js +611 -0
- package/dist/config/talk.js +31 -0
- package/dist/config/types.js +1 -0
- package/dist/config/validation.js +29 -0
- package/dist/config/zod-schema.js +1110 -0
- package/dist/control-ui/assets/index-D8Q5AI4D.js +2393 -0
- package/dist/control-ui/assets/index-D8Q5AI4D.js.map +1 -0
- package/dist/control-ui/assets/index-g06q5Xc3.css +1 -0
- package/dist/control-ui/favicon.ico +0 -0
- package/dist/control-ui/index.html +16 -0
- package/dist/cron/isolated-agent.js +529 -0
- package/dist/cron/normalize.js +73 -0
- package/dist/cron/parse.js +24 -0
- package/dist/cron/run-log.js +72 -0
- package/dist/cron/schedule.js +24 -0
- package/dist/cron/service.js +471 -0
- package/dist/cron/store.js +43 -0
- package/dist/cron/types.js +1 -0
- package/dist/daemon/constants.js +10 -0
- package/dist/daemon/launchd.js +295 -0
- package/dist/daemon/legacy.js +63 -0
- package/dist/daemon/program-args.js +141 -0
- package/dist/daemon/schtasks.js +269 -0
- package/dist/daemon/service.js +69 -0
- package/dist/daemon/systemd.js +332 -0
- package/dist/discord/index.js +2 -0
- package/dist/discord/monitor.js +1089 -0
- package/dist/discord/probe.js +54 -0
- package/dist/discord/send.js +652 -0
- package/dist/discord/token.js +8 -0
- package/dist/entry.js +16 -0
- package/dist/gateway/auth.js +121 -0
- package/dist/gateway/call.js +103 -0
- package/dist/gateway/chat-attachments.js +41 -0
- package/dist/gateway/client.js +180 -0
- package/dist/gateway/config-reload.js +274 -0
- package/dist/gateway/control-ui.js +184 -0
- package/dist/gateway/hooks-mapping.js +282 -0
- package/dist/gateway/hooks.js +168 -0
- package/dist/gateway/net.js +29 -0
- package/dist/gateway/protocol/index.js +62 -0
- package/dist/gateway/protocol/schema.js +577 -0
- package/dist/gateway/server-bridge-subscriptions.js +93 -0
- package/dist/gateway/server-bridge.js +1066 -0
- package/dist/gateway/server-browser.js +11 -0
- package/dist/gateway/server-channels.js +680 -0
- package/dist/gateway/server-chat.js +159 -0
- package/dist/gateway/server-constants.js +8 -0
- package/dist/gateway/server-discovery.js +62 -0
- package/dist/gateway/server-http.js +165 -0
- package/dist/gateway/server-methods/agent-job.js +114 -0
- package/dist/gateway/server-methods/agent.js +254 -0
- package/dist/gateway/server-methods/channels.js +239 -0
- package/dist/gateway/server-methods/chat.js +207 -0
- package/dist/gateway/server-methods/config.js +50 -0
- package/dist/gateway/server-methods/connect.js +6 -0
- package/dist/gateway/server-methods/cron.js +89 -0
- package/dist/gateway/server-methods/health.js +28 -0
- package/dist/gateway/server-methods/models.js +16 -0
- package/dist/gateway/server-methods/nodes.js +294 -0
- package/dist/gateway/server-methods/providers.js +257 -0
- package/dist/gateway/server-methods/send.js +254 -0
- package/dist/gateway/server-methods/sessions.js +382 -0
- package/dist/gateway/server-methods/skills.js +83 -0
- package/dist/gateway/server-methods/system.js +118 -0
- package/dist/gateway/server-methods/talk.js +22 -0
- package/dist/gateway/server-methods/types.js +1 -0
- package/dist/gateway/server-methods/voicewake.js +30 -0
- package/dist/gateway/server-methods/web.js +81 -0
- package/dist/gateway/server-methods/wizard.js +100 -0
- package/dist/gateway/server-methods.js +53 -0
- package/dist/gateway/server-providers.js +687 -0
- package/dist/gateway/server-shared.js +1 -0
- package/dist/gateway/server-utils.js +35 -0
- package/dist/gateway/server.js +1478 -0
- package/dist/gateway/session-utils.js +355 -0
- package/dist/gateway/ws-log.js +343 -0
- package/dist/gateway/ws-logging.js +8 -0
- package/dist/globals.js +41 -0
- package/dist/hooks/gmail-ops.js +236 -0
- package/dist/hooks/gmail-setup-utils.js +278 -0
- package/dist/hooks/gmail-watcher.js +190 -0
- package/dist/hooks/gmail.js +177 -0
- package/dist/imessage/client.js +165 -0
- package/dist/imessage/index.js +3 -0
- package/dist/imessage/monitor.js +365 -0
- package/dist/imessage/probe.js +26 -0
- package/dist/imessage/send.js +83 -0
- package/dist/imessage/targets.js +176 -0
- package/dist/index.js +55 -0
- package/dist/infra/agent-events.js +46 -0
- package/dist/infra/binaries.js +9 -0
- package/dist/infra/bonjour-discovery.js +163 -0
- package/dist/infra/bonjour.js +200 -0
- package/dist/infra/bridge/server.js +564 -0
- package/dist/infra/canvas-host-url.js +54 -0
- package/dist/infra/channel-summary.js +78 -0
- package/dist/infra/control-ui-assets.js +112 -0
- package/dist/infra/dotenv.js +15 -0
- package/dist/infra/env.js +8 -0
- package/dist/infra/errors.js +28 -0
- package/dist/infra/event-log.js +251 -0
- package/dist/infra/gateway-lock.js +8 -0
- package/dist/infra/git-commit.js +91 -0
- package/dist/infra/heartbeat-events.js +21 -0
- package/dist/infra/heartbeat-runner.js +458 -0
- package/dist/infra/heartbeat-wake.js +61 -0
- package/dist/infra/is-main.js +37 -0
- package/dist/infra/json-file.js +21 -0
- package/dist/infra/machine-name.js +40 -0
- package/dist/infra/nexus-root.js +56 -0
- package/dist/infra/node-pairing.js +212 -0
- package/dist/infra/path-env.js +93 -0
- package/dist/infra/ports.js +87 -0
- package/dist/infra/provider-summary.js +80 -0
- package/dist/infra/provider-usage.auth.js +189 -0
- package/dist/infra/provider-usage.fetch.claude.js +129 -0
- package/dist/infra/provider-usage.fetch.codex.js +62 -0
- package/dist/infra/provider-usage.fetch.copilot.js +42 -0
- package/dist/infra/provider-usage.fetch.gemini.js +57 -0
- package/dist/infra/provider-usage.fetch.js +6 -0
- package/dist/infra/provider-usage.fetch.minimax.js +214 -0
- package/dist/infra/provider-usage.fetch.shared.js +11 -0
- package/dist/infra/provider-usage.fetch.zai.js +62 -0
- package/dist/infra/provider-usage.format.js +77 -0
- package/dist/infra/provider-usage.js +145 -0
- package/dist/infra/provider-usage.load.js +54 -0
- package/dist/infra/provider-usage.shared.js +19 -0
- package/dist/infra/provider-usage.types.js +1 -0
- package/dist/infra/restart.js +29 -0
- package/dist/infra/retry.js +16 -0
- package/dist/infra/runtime-guard.js +59 -0
- package/dist/infra/shell-env.js +88 -0
- package/dist/infra/system-events.js +71 -0
- package/dist/infra/system-presence.js +217 -0
- package/dist/infra/tailnet.js +46 -0
- package/dist/infra/tailscale.js +149 -0
- package/dist/infra/unhandled-rejections.js +19 -0
- package/dist/infra/usage-suggestions.js +241 -0
- package/dist/infra/usage-upload.js +290 -0
- package/dist/infra/voicewake.js +78 -0
- package/dist/infra/widearea-dns.js +123 -0
- package/dist/infra/ws.js +13 -0
- package/dist/logger.js +52 -0
- package/dist/logging.js +506 -0
- package/dist/macos/gateway-daemon.js +145 -0
- package/dist/macos/relay.js +49 -0
- package/dist/media/constants.js +33 -0
- package/dist/media/host.js +42 -0
- package/dist/media/image-ops.js +119 -0
- package/dist/media/mime.js +123 -0
- package/dist/media/parse.js +83 -0
- package/dist/media/server.js +64 -0
- package/dist/media/store.js +139 -0
- package/dist/polls.js +43 -0
- package/dist/process/command-queue.js +97 -0
- package/dist/process/exec.js +75 -0
- package/dist/provider-web.js +8 -0
- package/dist/providers/github-copilot-auth.js +123 -0
- package/dist/providers/github-copilot-models.js +35 -0
- package/dist/providers/github-copilot-token.js +11 -0
- package/dist/providers/location.js +48 -0
- package/dist/providers/web/index.js +2 -0
- package/dist/runtime.js +8 -0
- package/dist/sessions/level-overrides.js +9 -0
- package/dist/sessions/send-policy.js +68 -0
- package/dist/signal/client.js +134 -0
- package/dist/signal/daemon.js +69 -0
- package/dist/signal/index.js +3 -0
- package/dist/signal/monitor.js +411 -0
- package/dist/signal/probe.js +46 -0
- package/dist/signal/send.js +91 -0
- package/dist/slack/actions.js +97 -0
- package/dist/slack/index.js +5 -0
- package/dist/slack/monitor.js +1270 -0
- package/dist/slack/probe.js +47 -0
- package/dist/slack/send.js +131 -0
- package/dist/slack/token.js +10 -0
- package/dist/telegram/allowed-updates.js +8 -0
- package/dist/telegram/bot.js +724 -0
- package/dist/telegram/download.js +34 -0
- package/dist/telegram/index.js +4 -0
- package/dist/telegram/monitor.js +47 -0
- package/dist/telegram/pairing-store.js +77 -0
- package/dist/telegram/probe.js +63 -0
- package/dist/telegram/proxy.js +9 -0
- package/dist/telegram/reaction-level.js +45 -0
- package/dist/telegram/send.js +151 -0
- package/dist/telegram/sent-message-cache.js +65 -0
- package/dist/telegram/token.js +30 -0
- package/dist/telegram/update-offset-store.js +61 -0
- package/dist/telegram/webhook-set.js +12 -0
- package/dist/telegram/webhook.js +56 -0
- package/dist/tui/commands.js +87 -0
- package/dist/tui/components/assistant-message.js +16 -0
- package/dist/tui/components/chat-log.js +92 -0
- package/dist/tui/components/custom-editor.js +55 -0
- package/dist/tui/components/selectors.js +8 -0
- package/dist/tui/components/tool-execution.js +111 -0
- package/dist/tui/components/user-message.js +17 -0
- package/dist/tui/gateway-chat.js +140 -0
- package/dist/tui/theme/theme.js +80 -0
- package/dist/tui/tui.js +708 -0
- package/dist/utils.js +153 -0
- package/dist/version.js +18 -0
- package/dist/web/accounts.js +86 -0
- package/dist/web/active-listener.js +25 -0
- package/dist/web/auto-reply.js +1256 -0
- package/dist/web/inbound.js +649 -0
- package/dist/web/login-qr.js +230 -0
- package/dist/web/login.js +71 -0
- package/dist/web/media.js +175 -0
- package/dist/web/outbound.js +102 -0
- package/dist/web/qr-image.js +97 -0
- package/dist/web/reconnect.js +60 -0
- package/dist/web/session.js +370 -0
- package/dist/wizard/clack-prompter.js +56 -0
- package/dist/wizard/onboarding.js +620 -0
- package/dist/wizard/prompts.js +6 -0
- package/dist/wizard/session.js +203 -0
- package/docs/AGENTS.default.md +116 -0
- package/docs/CAPABILITIES.md +444 -0
- package/docs/CNAME +1 -0
- package/docs/NEXUS_CORE_REWRITE_SPEC.md +226 -0
- package/docs/RELEASING.md +69 -0
- package/docs/_config.yml +53 -0
- package/docs/_layouts/default.html +145 -0
- package/docs/agent-assisted-install.md +95 -0
- package/docs/agent-loop.md +61 -0
- package/docs/agent-send.md +21 -0
- package/docs/agent.md +108 -0
- package/docs/android.md +133 -0
- package/docs/architecture.md +114 -0
- package/docs/assets/markdown.css +133 -0
- package/docs/assets/pixel-lobster.svg +60 -0
- package/docs/assets/terminal.css +470 -0
- package/docs/assets/theme.js +55 -0
- package/docs/audio.md +48 -0
- package/docs/automation/nexus-sync.md +371 -0
- package/docs/background-process.md +74 -0
- package/docs/bash.md +32 -0
- package/docs/bedrock.md +71 -0
- package/docs/bonjour.md +159 -0
- package/docs/browser-linux-troubleshooting.md +114 -0
- package/docs/browser.md +293 -0
- package/docs/bun.md +56 -0
- package/docs/camera.md +152 -0
- package/docs/clawd.md +212 -0
- package/docs/concepts/usage-tracking.md +29 -0
- package/docs/configuration.md +1666 -0
- package/docs/control-ui.md +83 -0
- package/docs/cron.md +385 -0
- package/docs/dashboard.md +17 -0
- package/docs/device-models.md +46 -0
- package/docs/discord.md +308 -0
- package/docs/discovery.md +112 -0
- package/docs/docker.md +258 -0
- package/docs/docs.json +105 -0
- package/docs/doctor.md +68 -0
- package/docs/elevated.md +31 -0
- package/docs/faq.md +736 -0
- package/docs/feature-inventory/overview.md +141 -0
- package/docs/feature-inventory/rollout-checklist.md +53 -0
- package/docs/feature-inventory/test-matrix.md +87 -0
- package/docs/feature-inventory.md +9 -0
- package/docs/gateway/configuration-examples.md +221 -0
- package/docs/gateway/configuration.md +172 -0
- package/docs/gateway/cron.md +61 -0
- package/docs/gateway/heartbeat.md +207 -0
- package/docs/gateway/pairing.md +109 -0
- package/docs/gateway-lock.md +28 -0
- package/docs/gateway.md +227 -0
- package/docs/gmail-pubsub.md +191 -0
- package/docs/grammy.md +27 -0
- package/docs/group-messages.md +73 -0
- package/docs/groups.md +130 -0
- package/docs/health.md +28 -0
- package/docs/heartbeat.md +73 -0
- package/docs/home-userspace.md +277 -0
- package/docs/hubs.md +148 -0
- package/docs/images.md +51 -0
- package/docs/imessage.md +94 -0
- package/docs/index.md +196 -0
- package/docs/ios.md +372 -0
- package/docs/linux.md +11 -0
- package/docs/location-command.md +95 -0
- package/docs/location.md +46 -0
- package/docs/logging.md +110 -0
- package/docs/lore.md +131 -0
- package/docs/mac/bun.md +133 -0
- package/docs/mac/canvas.md +161 -0
- package/docs/mac/child-process.md +72 -0
- package/docs/mac/dev-setup.md +81 -0
- package/docs/mac/health.md +28 -0
- package/docs/mac/icon.md +26 -0
- package/docs/mac/logging.md +51 -0
- package/docs/mac/menu-bar.md +69 -0
- package/docs/mac/peekaboo.md +170 -0
- package/docs/mac/permissions.md +40 -0
- package/docs/mac/release.md +76 -0
- package/docs/mac/remote.md +57 -0
- package/docs/mac/signing.md +41 -0
- package/docs/mac/skills.md +27 -0
- package/docs/mac/voice-overlay.md +52 -0
- package/docs/mac/voicewake.md +56 -0
- package/docs/mac/webchat.md +27 -0
- package/docs/mac/xpc.md +40 -0
- package/docs/macos.md +104 -0
- package/docs/model-failover.md +75 -0
- package/docs/models.md +91 -0
- package/docs/multi-agent.md +74 -0
- package/docs/nix.md +95 -0
- package/docs/nodes.md +157 -0
- package/docs/onboarding-config-protocol.md +34 -0
- package/docs/onboarding.md +189 -0
- package/docs/pairing.md +85 -0
- package/docs/plans/cron-add-hardening.md +72 -0
- package/docs/plans/group-policy-hardening.md +121 -0
- package/docs/poll.md +52 -0
- package/docs/prereqs.md +67 -0
- package/docs/presence.md +133 -0
- package/docs/proposals/model-config.md +147 -0
- package/docs/provider-routing.md +25 -0
- package/docs/queue.md +78 -0
- package/docs/reference/templates/AGENTS.md +164 -0
- package/docs/remote-gateway-readme.md +153 -0
- package/docs/remote.md +61 -0
- package/docs/research/memory.md +227 -0
- package/docs/rpc.md +35 -0
- package/docs/security.md +200 -0
- package/docs/session-ingestion.md +119 -0
- package/docs/session-tool.md +154 -0
- package/docs/session.md +85 -0
- package/docs/sessions.md +8 -0
- package/docs/setup.md +131 -0
- package/docs/showcase.md +37 -0
- package/docs/signal.md +122 -0
- package/docs/skills-config.md +58 -0
- package/docs/skills.md +153 -0
- package/docs/slack.md +221 -0
- package/docs/subagents.md +72 -0
- package/docs/tailscale.md +71 -0
- package/docs/talk.md +79 -0
- package/docs/telegram.md +96 -0
- package/docs/templates/AGENTS.md +286 -0
- package/docs/templates/BOOTSTRAP.md +35 -0
- package/docs/templates/IDENTITY.md +17 -0
- package/docs/templates/PROFILE.md +14 -0
- package/docs/templates/SOUL.md +41 -0
- package/docs/templates/TOOLS.md +41 -0
- package/docs/templates/USER.md +8 -0
- package/docs/test.md +43 -0
- package/docs/testing-onboarding-quickstart.md +76 -0
- package/docs/testing-philosophy.md +211 -0
- package/docs/thinking.md +46 -0
- package/docs/timezone.md +40 -0
- package/docs/tools.md +346 -0
- package/docs/troubleshooting.md +257 -0
- package/docs/tui.md +71 -0
- package/docs/typebox.md +42 -0
- package/docs/updating.md +138 -0
- package/docs/usage-cloud-aggregation-spec.md +133 -0
- package/docs/usage-suggestions-pipeline.md +126 -0
- package/docs/voicewake.md +61 -0
- package/docs/web.md +115 -0
- package/docs/webchat.md +34 -0
- package/docs/webhook.md +132 -0
- package/docs/whatsapp-clawd.jpg +0 -0
- package/docs/whatsapp.md +170 -0
- package/docs/windows.md +11 -0
- package/docs/wizard.md +167 -0
- package/package.json +209 -0
- package/skills/1password/SKILL.md +54 -0
- package/skills/1password/docs/setup.md +85 -0
- package/skills/1password/docs/troubleshooting.md +63 -0
- package/skills/1password/references/cli-examples.md +29 -0
- package/skills/1password/references/get-started.md +17 -0
- package/skills/agent-browser/SKILL.md +450 -0
- package/skills/agent-browser/docs/browser-use-eval.md +95 -0
- package/skills/agent-browser/docs/first-tests.md +261 -0
- package/skills/agent-browser/docs/wordle-nyt-eval.js +32 -0
- package/skills/aix/SKILL.md +93 -0
- package/skills/aix/docs/embeddings.md +40 -0
- package/skills/aix/docs/setup.md +58 -0
- package/skills/aix/docs/troubleshooting.md +41 -0
- package/skills/aix/references/sql.md +48 -0
- package/skills/apple-notes/SKILL.md +50 -0
- package/skills/apple-reminders/SKILL.md +67 -0
- package/skills/bear-notes/SKILL.md +79 -0
- package/skills/bird/SKILL.md +32 -0
- package/skills/bird/docs/auth.md +31 -0
- package/skills/bird/docs/troubleshooting.md +31 -0
- package/skills/blogwatcher/SKILL.md +46 -0
- package/skills/blucli/SKILL.md +27 -0
- package/skills/brave-search/SKILL.md +36 -0
- package/skills/brave-search/docs/setup.md +40 -0
- package/skills/brave-search/docs/troubleshooting.md +37 -0
- package/skills/brave-search/docs/usage.md +28 -0
- package/skills/brave-search/scripts/content.mjs +53 -0
- package/skills/brave-search/scripts/search.mjs +79 -0
- package/skills/browser-use-agent-sdk/SKILL.md +90 -0
- package/skills/camsnap/SKILL.md +25 -0
- package/skills/clawdhub/SKILL.md +53 -0
- package/skills/coding-agent/SKILL.md +274 -0
- package/skills/comms/SKILL.md +249 -0
- package/skills/comms/docs/adapters.md +54 -0
- package/skills/comms/docs/setup.md +56 -0
- package/skills/comms/docs/troubleshooting.md +44 -0
- package/skills/comms/references/schema.md +49 -0
- package/skills/computer-use/SKILL.md +204 -0
- package/skills/computer-use/docs/open-interpreter.md +26 -0
- package/skills/computer-use/docs/peekaboo.md +26 -0
- package/skills/computer-use/docs/setup.md +47 -0
- package/skills/computer-use/docs/troubleshooting.md +33 -0
- package/skills/discord/SKILL.md +370 -0
- package/skills/eightctl/SKILL.md +29 -0
- package/skills/eve/SKILL.md +215 -0
- package/skills/eve/docs/dual-account.md +84 -0
- package/skills/eve/docs/intelligence.md +58 -0
- package/skills/eve/docs/setup.md +60 -0
- package/skills/eve/docs/troubleshooting.md +54 -0
- package/skills/eve/scripts/setup-dual-account.sh +125 -0
- package/skills/filesystem/SKILL.md +217 -0
- package/skills/food-order/SKILL.md +41 -0
- package/skills/gemini/SKILL.md +23 -0
- package/skills/gh/SKILL.md +22 -0
- package/skills/gh/docs/usage.md +41 -0
- package/skills/gifgrep/SKILL.md +47 -0
- package/skills/github/SKILL.md +26 -0
- package/skills/github/docs/setup.md +21 -0
- package/skills/github/docs/troubleshooting.md +24 -0
- package/skills/gog/SKILL.md +104 -0
- package/skills/gog/docs/portability.md +94 -0
- package/skills/gog/docs/setup.md +76 -0
- package/skills/gog/docs/troubleshooting.md +94 -0
- package/skills/gog/scripts/cdp/README.md +90 -0
- package/skills/gog/scripts/cdp/add_test_users.py +69 -0
- package/skills/gog/scripts/cdp/auth_add_accounts.py +209 -0
- package/skills/gog/scripts/cdp/auth_add_accounts_manual.py +206 -0
- package/skills/gog/scripts/cdp/create_oauth_client.py +165 -0
- package/skills/gog/scripts/cdp/launch_cdp_chrome.sh +58 -0
- package/skills/google-oauth/SKILL.md +94 -0
- package/skills/goplaces/SKILL.md +30 -0
- package/skills/imsg/SKILL.md +25 -0
- package/skills/json-render/SKILL.md +154 -0
- package/skills/json-render/assets/components/README.md +21 -0
- package/skills/json-render/assets/components/catalog.ts +78 -0
- package/skills/json-render/assets/components/registry.tsx +172 -0
- package/skills/json-render/assets/demo/App.css +397 -0
- package/skills/json-render/assets/demo/App.tsx +897 -0
- package/skills/json-render/assets/demo/README.md +22 -0
- package/skills/json-render/assets/demo/catalog.ts +78 -0
- package/skills/json-render/assets/demo/data/nexus-core.json +31 -0
- package/skills/json-render/assets/demo/index.css +27 -0
- package/skills/json-render/assets/demo/registry.tsx +150 -0
- package/skills/json-render/docs/nexus-state-demo.md +84 -0
- package/skills/json-render/docs/shadcn-preset.md +33 -0
- package/skills/json-render/scripts/create-vite-demo.sh +45 -0
- package/skills/json-render/scripts/llm-server/README.md +33 -0
- package/skills/json-render/scripts/llm-server/catalog.ts +78 -0
- package/skills/json-render/scripts/llm-server/package-lock.json +702 -0
- package/skills/json-render/scripts/llm-server/package.json +18 -0
- package/skills/json-render/scripts/llm-server/server.ts +285 -0
- package/skills/local-places/SERVER_README.md +101 -0
- package/skills/local-places/SKILL.md +91 -0
- package/skills/local-places/pyproject.toml +27 -0
- package/skills/local-places/src/local_places/__init__.py +2 -0
- package/skills/local-places/src/local_places/__pycache__/__init__.cpython-314.pyc +0 -0
- package/skills/local-places/src/local_places/__pycache__/google_places.cpython-314.pyc +0 -0
- package/skills/local-places/src/local_places/__pycache__/main.cpython-314.pyc +0 -0
- package/skills/local-places/src/local_places/__pycache__/schemas.cpython-314.pyc +0 -0
- package/skills/local-places/src/local_places/google_places.py +314 -0
- package/skills/local-places/src/local_places/main.py +65 -0
- package/skills/local-places/src/local_places/schemas.py +107 -0
- package/skills/mcporter/SKILL.md +38 -0
- package/skills/model-usage/SKILL.md +45 -0
- package/skills/model-usage/references/codexbar-cli.md +28 -0
- package/skills/model-usage/scripts/model_usage.py +310 -0
- package/skills/nano-banana-pro/SKILL.md +30 -0
- package/skills/nano-banana-pro/scripts/generate_image.py +169 -0
- package/skills/nano-pdf/SKILL.md +20 -0
- package/skills/nexus-cloud/SKILL.md +53 -0
- package/skills/nexus-cloud/docs/security.md +24 -0
- package/skills/nexus-cloud/docs/setup.md +51 -0
- package/skills/nexus-cloud/docs/troubleshooting.md +28 -0
- package/skills/notion/SKILL.md +156 -0
- package/skills/obsidian/SKILL.md +55 -0
- package/skills/onboarding/SKILL.md +515 -0
- package/skills/onboarding/docs/CAPABILITIES.md +444 -0
- package/skills/onboarding/docs/CAPABILITY_TAXONOMY.md +608 -0
- package/skills/onboarding/docs/CLI_GRAMMAR.md +797 -0
- package/skills/onboarding/docs/CLI_GRAMMAR_CREDENTIALS.md +632 -0
- package/skills/onboarding/docs/CLI_GRAMMAR_ONBOARDING.md +815 -0
- package/skills/onboarding/docs/CLI_GRAMMAR_SKILLS.md +449 -0
- package/skills/onboarding/docs/DOCUMENTATION_OVERVIEW.md +290 -0
- package/skills/onboarding/docs/ENTITY_MODEL.md +582 -0
- package/skills/onboarding/docs/GOAL_STATE_ARCHITECTURE.md +395 -0
- package/skills/onboarding/docs/NEXUS_SYSTEM_OVERVIEW.md +476 -0
- package/skills/onboarding/docs/SKILLS_HUB_SPEC.md +477 -0
- package/skills/onboarding/docs/SKILLS_SPECIFICATION.md +947 -0
- package/skills/onboarding/docs/SKILL_GATEWAY_DESIGN.md +702 -0
- package/skills/onboarding/docs/SKILL_GATEWAY_PRD.md +278 -0
- package/skills/onboarding/docs/SKILL_INVENTORY.md +266 -0
- package/skills/onboarding/docs/STATE_ARCHITECTURE.md +547 -0
- package/skills/onboarding/docs/TROUBLESHOOTING.md +363 -0
- package/skills/onboarding/docs/USER_JOURNEY.md +797 -0
- package/skills/onboarding/docs/WOW_MOMENTS.md +232 -0
- package/skills/onboarding/docs/agent-apple-id.md +289 -0
- package/skills/onboarding/docs/skill-deep-dives/1password.md +367 -0
- package/skills/onboarding/docs/skill-deep-dives/TEMPLATE.md +197 -0
- package/skills/onboarding/docs/skill-deep-dives/aix.md +498 -0
- package/skills/onboarding/docs/skill-deep-dives/bird.md +357 -0
- package/skills/onboarding/docs/skill-deep-dives/brave-search.md +601 -0
- package/skills/onboarding/docs/skill-deep-dives/comms.md +607 -0
- package/skills/onboarding/docs/skill-deep-dives/computer-use.md +599 -0
- package/skills/onboarding/docs/skill-deep-dives/cron-and-heartbeat.md +576 -0
- package/skills/onboarding/docs/skill-deep-dives/eve.md +711 -0
- package/skills/onboarding/docs/skill-deep-dives/github.md +333 -0
- package/skills/onboarding/docs/skill-deep-dives/gog.md +640 -0
- package/skills/onboarding/docs/skill-deep-dives/homebrew-prereqs.md +785 -0
- package/skills/onboarding/docs/skill-deep-dives/nexus-cloud.md +689 -0
- package/skills/onboarding/docs/skill-deep-dives/qmd.md +742 -0
- package/skills/onboarding/docs/skill-deep-dives/telegram.md +379 -0
- package/skills/onboarding/docs/skill-deep-dives/wacli.md +399 -0
- package/skills/onboarding/docs/skill-deep-dives/weather.md +513 -0
- package/skills/onboarding/scripts/ralph/prd.json +215 -0
- package/skills/onboarding/scripts/ralph/progress.txt +99 -0
- package/skills/onboarding/scripts/ralph/prompt.md +87 -0
- package/skills/onboarding/scripts/ralph/ralph.log +84 -0
- package/skills/onboarding/scripts/ralph/ralph.sh +45 -0
- package/skills/onboarding/scripts/setup-cursor-skills.sh +40 -0
- package/skills/openai-image-gen/SKILL.md +31 -0
- package/skills/openai-image-gen/scripts/gen.py +173 -0
- package/skills/openai-whisper/SKILL.md +19 -0
- package/skills/openai-whisper-api/SKILL.md +43 -0
- package/skills/openai-whisper-api/scripts/transcribe.sh +85 -0
- package/skills/openhue/SKILL.md +30 -0
- package/skills/oracle/SKILL.md +105 -0
- package/skills/ordercli/SKILL.md +47 -0
- package/skills/peekaboo/SKILL.md +153 -0
- package/skills/qmd/SKILL.md +32 -0
- package/skills/qmd/docs/mcp.md +30 -0
- package/skills/qmd/docs/ollama.md +42 -0
- package/skills/qmd/docs/setup.md +44 -0
- package/skills/sag/SKILL.md +62 -0
- package/skills/skill-cli-template/SKILL.md +109 -0
- package/skills/skill-creator/scripts/__pycache__/quick_validate.cpython-311.pyc +0 -0
- package/skills/slack/SKILL.md +144 -0
- package/skills/songsee/SKILL.md +29 -0
- package/skills/sonoscli/SKILL.md +26 -0
- package/skills/spotify-player/SKILL.md +34 -0
- package/skills/summarize/SKILL.md +49 -0
- package/skills/telegram/SKILL.md +20 -0
- package/skills/telegram/docs/pairing.md +30 -0
- package/skills/telegram/docs/setup.md +41 -0
- package/skills/telegram/docs/webhook.md +17 -0
- package/skills/things-mac/SKILL.md +61 -0
- package/skills/tmux/SKILL.md +121 -0
- package/skills/tmux/scripts/find-sessions.sh +112 -0
- package/skills/tmux/scripts/wait-for-text.sh +83 -0
- package/skills/trello/SKILL.md +84 -0
- package/skills/upstream-sync/SKILL.md +151 -0
- package/skills/upstream-sync/scripts/auto-port.sh +227 -0
- package/skills/upstream-sync/scripts/check-all.sh +88 -0
- package/skills/upstream-sync/scripts/check-nexus.sh +146 -0
- package/skills/upstream-sync/scripts/check-pi-ai.sh +129 -0
- package/skills/video-frames/SKILL.md +29 -0
- package/skills/video-frames/scripts/frame.sh +81 -0
- package/skills/wacli/SKILL.md +48 -0
- package/skills/wacli/docs/auth.md +21 -0
- package/skills/wacli/docs/backup.md +9 -0
- package/skills/wacli/docs/troubleshooting.md +21 -0
- package/skills/weather/SKILL.md +53 -0
- package/skills/weather/docs/usage.md +40 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "macOS Skills settings UI and gateway-backed status"
|
|
3
|
+
read_when:
|
|
4
|
+
- Updating the macOS Skills settings UI
|
|
5
|
+
- Changing skills gating or install behavior
|
|
6
|
+
---
|
|
7
|
+
# Skills (macOS)
|
|
8
|
+
|
|
9
|
+
The macOS app surfaces Nexus skills via the gateway; it does not parse skills locally.
|
|
10
|
+
|
|
11
|
+
## Data source
|
|
12
|
+
- `skills.status` (gateway) returns all skills plus eligibility and missing requirements
|
|
13
|
+
(including allowlist blocks for bundled skills).
|
|
14
|
+
- Requirements are derived from `metadata.nexus.requires` in each `SKILL.md`.
|
|
15
|
+
|
|
16
|
+
## Install actions
|
|
17
|
+
- `metadata.nexus.install` defines install options (brew/node/go/uv).
|
|
18
|
+
- The app calls `skills.install` to run installers on the gateway host.
|
|
19
|
+
- The gateway surfaces only one preferred installer when multiple are provided
|
|
20
|
+
(brew when available, otherwise node manager from `skills.install`, default npm).
|
|
21
|
+
|
|
22
|
+
## Env/API keys
|
|
23
|
+
- The app stores keys in `~/nexus/state/nexus.json` under `skills.entries.<skillKey>`.
|
|
24
|
+
- `skills.update` patches `enabled`, `apiKey`, and `env`.
|
|
25
|
+
|
|
26
|
+
## Remote mode
|
|
27
|
+
- Install + config updates happen on the gateway host (not the local Mac).
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Voice overlay lifecycle when wake-word and push-to-talk overlap"
|
|
3
|
+
read_when:
|
|
4
|
+
- Adjusting voice overlay behavior
|
|
5
|
+
---
|
|
6
|
+
## Voice Overlay Lifecycle (macOS)
|
|
7
|
+
|
|
8
|
+
Audience: macOS app contributors. Goal: keep the voice overlay predictable when wake-word and push-to-talk overlap.
|
|
9
|
+
|
|
10
|
+
### Current intent
|
|
11
|
+
- If the overlay is already visible from wake-word and the user presses the hotkey, the hotkey session *adopts* the existing text instead of resetting it. The overlay stays up while the hotkey is held. When the user releases: send if there is trimmed text, otherwise dismiss.
|
|
12
|
+
- Wake-word alone still auto-sends on silence; push-to-talk sends immediately on release.
|
|
13
|
+
|
|
14
|
+
### Implemented (Dec 9, 2025)
|
|
15
|
+
- Overlay sessions now carry a token per capture (wake-word or push-to-talk). Partial/final/send/dismiss/level updates are dropped when the token doesn’t match, avoiding stale callbacks.
|
|
16
|
+
- Push-to-talk adopts any visible overlay text as a prefix (so pressing the hotkey while the wake overlay is up keeps the text and appends new speech). It waits up to 1.5s for a final transcript before falling back to the current text.
|
|
17
|
+
- Chime/overlay logging is emitted at `info` in categories `voicewake.overlay`, `voicewake.ptt`, and `voicewake.chime` (session start, partial, final, send, dismiss, chime reason).
|
|
18
|
+
|
|
19
|
+
### Next steps
|
|
20
|
+
1. **VoiceSessionCoordinator (actor)**
|
|
21
|
+
- Owns exactly one `VoiceSession` at a time.
|
|
22
|
+
- API (token-based): `beginWakeCapture`, `beginPushToTalk`, `updatePartial`, `endCapture`, `cancel`, `applyCooldown`.
|
|
23
|
+
- Drops callbacks that carry stale tokens (prevents old recognizers from reopening the overlay).
|
|
24
|
+
2. **VoiceSession (model)**
|
|
25
|
+
- Fields: `token`, `source` (wakeWord|pushToTalk), committed/volatile text, chime flags, timers (auto-send, idle), `overlayMode` (display|editing|sending), cooldown deadline.
|
|
26
|
+
3. **Overlay binding**
|
|
27
|
+
- `VoiceSessionPublisher` (`ObservableObject`) mirrors the active session into SwiftUI.
|
|
28
|
+
- `VoiceWakeOverlayView` renders only via the publisher; it never mutates global singletons directly.
|
|
29
|
+
- Overlay user actions (`sendNow`, `dismiss`, `edit`) call back into the coordinator with the session token.
|
|
30
|
+
4. **Unified send path**
|
|
31
|
+
- On `endCapture`: if trimmed text is empty → dismiss; else `performSend(session:)` (plays send chime once, forwards, dismisses).
|
|
32
|
+
- Push-to-talk: no delay; wake-word: optional delay for auto-send.
|
|
33
|
+
- Apply a short cooldown to the wake runtime after push-to-talk finishes so wake-word doesn’t immediately retrigger.
|
|
34
|
+
5. **Logging**
|
|
35
|
+
- Coordinator emits `.info` logs in subsystem `com.nexus`, categories `voicewake.overlay` and `voicewake.chime`.
|
|
36
|
+
- Key events: `session_started`, `adopted_by_push_to_talk`, `partial`, `finalized`, `send`, `dismiss`, `cancel`, `cooldown`.
|
|
37
|
+
|
|
38
|
+
### Debugging checklist
|
|
39
|
+
- Stream logs while reproducing a sticky overlay:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
sudo log stream --predicate 'subsystem == "com.nexus" AND category CONTAINS "voicewake"' --level info --style compact
|
|
43
|
+
```
|
|
44
|
+
- Verify only one active session token; stale callbacks should be dropped by the coordinator.
|
|
45
|
+
- Ensure push-to-talk release always calls `endCapture` with the active token; if text is empty, expect `dismiss` without chime or send.
|
|
46
|
+
|
|
47
|
+
### Migration steps (suggested)
|
|
48
|
+
1. Add `VoiceSessionCoordinator`, `VoiceSession`, and `VoiceSessionPublisher`.
|
|
49
|
+
2. Refactor `VoiceWakeRuntime` to create/update/end sessions instead of touching `VoiceWakeOverlayController` directly.
|
|
50
|
+
3. Refactor `VoicePushToTalk` to adopt existing sessions and call `endCapture` on release; apply runtime cooldown.
|
|
51
|
+
4. Wire `VoiceWakeOverlayController` to the publisher; remove direct calls from runtime/PTT.
|
|
52
|
+
5. Add integration tests for session adoption, cooldown, and empty-text dismissal.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Voice wake and push-to-talk modes plus routing details in the mac app"
|
|
3
|
+
read_when:
|
|
4
|
+
- Working on voice wake or PTT pathways
|
|
5
|
+
---
|
|
6
|
+
# Voice Wake & Push-to-Talk
|
|
7
|
+
|
|
8
|
+
Updated: 2025-12-23 · Owners: mac app
|
|
9
|
+
|
|
10
|
+
## Modes
|
|
11
|
+
- **Wake-word mode** (default): always-on Speech recognizer waits for trigger tokens (`swabbleTriggerWords`). On match it starts capture, shows the overlay with partial text, and auto-sends after silence.
|
|
12
|
+
- **Push-to-talk (Right Option hold)**: hold the right Option key to capture immediately—no trigger needed. The overlay appears while held; releasing finalizes and forwards after a short delay so you can tweak text.
|
|
13
|
+
|
|
14
|
+
## Runtime behavior (wake-word)
|
|
15
|
+
- Speech recognizer lives in `VoiceWakeRuntime`.
|
|
16
|
+
- Trigger only fires when there’s a **meaningful pause** between the wake word and the next word (~0.45s gap).
|
|
17
|
+
- Silence windows: 2.0s when speech is flowing, 5.0s if only the trigger was heard.
|
|
18
|
+
- Hard stop: 120s to prevent runaway sessions.
|
|
19
|
+
- Debounce between sessions: 350ms.
|
|
20
|
+
- Overlay is driven via `VoiceWakeOverlayController` with committed/volatile coloring.
|
|
21
|
+
- After send, recognizer restarts cleanly to listen for the next trigger.
|
|
22
|
+
|
|
23
|
+
## Lifecycle invariants
|
|
24
|
+
- If Voice Wake is enabled and permissions are granted, the wake-word recognizer should be listening (except during an explicit push-to-talk capture).
|
|
25
|
+
- Overlay visibility (including manual dismiss via the X button) must never prevent the recognizer from resuming.
|
|
26
|
+
|
|
27
|
+
## Sticky overlay failure mode (previous)
|
|
28
|
+
Previously, if the overlay got stuck visible and you manually closed it, Voice Wake could appear “dead” because the runtime’s restart attempt could be blocked by overlay visibility and no subsequent restart was scheduled.
|
|
29
|
+
|
|
30
|
+
Hardening:
|
|
31
|
+
- Wake runtime restart is no longer blocked by overlay visibility.
|
|
32
|
+
- Overlay dismiss completion triggers a `VoiceWakeRuntime.refresh(...)` via `VoiceSessionCoordinator`, so manual X-dismiss always resumes listening.
|
|
33
|
+
|
|
34
|
+
## Push-to-talk specifics
|
|
35
|
+
- Hotkey detection uses a global `.flagsChanged` monitor for **right Option** (`keyCode 61` + `.option`). We only observe events (no swallowing).
|
|
36
|
+
- Capture pipeline lives in `VoicePushToTalk`: starts Speech immediately, streams partials to the overlay, and calls `VoiceWakeForwarder` on release.
|
|
37
|
+
- When push-to-talk starts we pause the wake-word runtime to avoid dueling audio taps; it restarts automatically after release.
|
|
38
|
+
- Permissions: requires Microphone + Speech; seeing events needs Accessibility/Input Monitoring approval.
|
|
39
|
+
- External keyboards: some may not expose right Option as expected—offer a fallback shortcut if users report misses.
|
|
40
|
+
|
|
41
|
+
## User-facing settings
|
|
42
|
+
- **Voice Wake** toggle: enables wake-word runtime.
|
|
43
|
+
- **Hold Cmd+Fn to talk**: enables the push-to-talk monitor. Disabled on macOS < 26.
|
|
44
|
+
- Language & mic pickers, live level meter, trigger-word table, tester.
|
|
45
|
+
- **Sounds**: chimes on trigger detect and on send; defaults to the macOS “Glass” system sound. You can pick any `NSSound`-loadable file (e.g. MP3/WAV/AIFF) for each event or choose **No Sound**.
|
|
46
|
+
|
|
47
|
+
## Forwarding behavior
|
|
48
|
+
- When Voice Wake is enabled, transcripts are forwarded to the active gateway/agent (the same local vs remote mode used by the rest of the mac app).
|
|
49
|
+
- Replies are delivered to the **last-used main provider** (WhatsApp/Telegram/Discord/WebChat). If delivery fails, the error is logged and the run is still visible via WebChat/session logs.
|
|
50
|
+
|
|
51
|
+
## Forwarding payload
|
|
52
|
+
- `VoiceWakeForwarder.prefixedTranscript(_:)` prepends the machine hint before sending. Shared between wake-word and push-to-talk paths.
|
|
53
|
+
|
|
54
|
+
## Quick verification
|
|
55
|
+
- Toggle push-to-talk on, hold Cmd+Fn, speak, release: overlay should show partials then send.
|
|
56
|
+
- While holding, menu-bar ears should stay enlarged (uses `triggerVoiceEars(ttl:nil)`); they drop after release.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "How the mac app embeds the gateway WebChat and how to debug it"
|
|
3
|
+
read_when:
|
|
4
|
+
- Debugging mac WebChat view or loopback port
|
|
5
|
+
---
|
|
6
|
+
# Web Chat (macOS app)
|
|
7
|
+
|
|
8
|
+
The macOS menu bar app shows the WebChat UI as a native SwiftUI view and reuses the **primary Nexus session** (`main`, or `global` when scope is global).
|
|
9
|
+
|
|
10
|
+
- **Local mode**: connects directly to the local Gateway WebSocket.
|
|
11
|
+
- **Remote mode**: forwards the Gateway WebSocket control port over SSH and uses that as the data plane.
|
|
12
|
+
|
|
13
|
+
## Launch & debugging
|
|
14
|
+
- Manual: Lobster menu → “Open Chat”.
|
|
15
|
+
- Auto-open for testing: run `dist/Nexus.app/Contents/MacOS/Nexus --webchat` (or pass `--webchat` to the binary launched by launchd). The window opens on startup.
|
|
16
|
+
- Logs: see `./scripts/clawlog.sh` (subsystem `com.nexus`, category `WebChatSwiftUI`).
|
|
17
|
+
|
|
18
|
+
## How it’s wired
|
|
19
|
+
- Implementation: `apps/macos/Sources/Nexus/WebChatSwiftUI.swift` hosts `NexusChatUI` and speaks to the Gateway over `GatewayConnection`.
|
|
20
|
+
- Data plane: Gateway WebSocket methods `chat.history`, `chat.send`, `chat.abort`; events `chat`, `agent`, `presence`, `tick`, `health`.
|
|
21
|
+
- Session: usually primary (`main`); multiple transports (WhatsApp/Telegram/Discord/Desktop) share the same key. The onboarding flow uses a dedicated `onboarding` session to keep first-run setup separate.
|
|
22
|
+
|
|
23
|
+
## Security / surface area
|
|
24
|
+
- Remote mode forwards only the Gateway WebSocket control port over SSH.
|
|
25
|
+
|
|
26
|
+
## Known limitations
|
|
27
|
+
- The UI is optimized for the primary session and typical “chat” usage (not a full browser-based sandbox surface).
|
package/docs/mac/xpc.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "macOS IPC architecture for Nexus app, gateway node bridge, and PeekabooBridge"
|
|
3
|
+
read_when:
|
|
4
|
+
- Editing IPC contracts or menu bar app IPC
|
|
5
|
+
---
|
|
6
|
+
# Nexus macOS IPC architecture (Dec 2025)
|
|
7
|
+
|
|
8
|
+
**Current model:** there is **no local control socket** and no `nexus-mac` CLI. All agent actions go through the Gateway WebSocket and `node.invoke`. UI automation still uses PeekabooBridge.
|
|
9
|
+
|
|
10
|
+
## Goals
|
|
11
|
+
- Single GUI app instance that owns all TCC-facing work (notifications, screen recording, mic, speech, AppleScript).
|
|
12
|
+
- A small surface for automation: Gateway + node commands, plus PeekabooBridge for UI automation.
|
|
13
|
+
- Predictable permissions: always the same signed bundle ID, launched by launchd, so TCC grants stick.
|
|
14
|
+
|
|
15
|
+
## How it works
|
|
16
|
+
### Gateway + node bridge (current)
|
|
17
|
+
- The app runs the Gateway (local mode) and connects to it as a node.
|
|
18
|
+
- Agent actions are performed via `node.invoke` (e.g. `system.run`, `system.notify`, `canvas.*`).
|
|
19
|
+
|
|
20
|
+
### PeekabooBridge (UI automation)
|
|
21
|
+
- UI automation uses a separate UNIX socket named `bridge.sock` and the PeekabooBridge JSON protocol.
|
|
22
|
+
- Host preference order (client-side): Peekaboo.app → Claude.app → Nexus.app → local execution.
|
|
23
|
+
- Security: bridge hosts require TeamID `Y5PE65HELJ`; DEBUG-only same-UID escape hatch is guarded by `PEEKABOO_ALLOW_UNSIGNED_SOCKET_CLIENTS=1` (Peekaboo convention).
|
|
24
|
+
- See: [`docs/mac/peekaboo.md`](https://docs.nexus.bot/mac/peekaboo) for the Nexus plan and naming.
|
|
25
|
+
|
|
26
|
+
### Mach/XPC (future direction)
|
|
27
|
+
- Still optional for internal app services, but **not required** for automation now that node.invoke is the surface.
|
|
28
|
+
|
|
29
|
+
## Operational flows
|
|
30
|
+
- Restart/rebuild: `SIGN_IDENTITY="Apple Development: Peter Steinberger (2ZAC4GM7GD)" scripts/restart-mac.sh`
|
|
31
|
+
- Kills existing instances
|
|
32
|
+
- Swift build + package
|
|
33
|
+
- Writes/bootstraps/kickstarts the LaunchAgent
|
|
34
|
+
- Single instance: app exits early if another instance with the same bundle ID is running.
|
|
35
|
+
|
|
36
|
+
## Hardening notes
|
|
37
|
+
- Prefer requiring a TeamID match for all privileged surfaces.
|
|
38
|
+
- PeekabooBridge: `PEEKABOO_ALLOW_UNSIGNED_SOCKET_CLIENTS=1` (DEBUG-only) may allow same-UID callers for local development.
|
|
39
|
+
- All communication remains local-only; no network sockets are exposed.
|
|
40
|
+
- TCC prompts originate only from the GUI app bundle; run `scripts/package-mac-app.sh` so the signed bundle ID stays stable.
|
package/docs/macos.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Spec for the Nexus macOS companion menu bar app (gateway + node broker)"
|
|
3
|
+
read_when:
|
|
4
|
+
- Implementing macOS app features
|
|
5
|
+
- Changing gateway lifecycle or node bridging on macOS
|
|
6
|
+
---
|
|
7
|
+
# Nexus macOS Companion (menu bar + gateway broker)
|
|
8
|
+
|
|
9
|
+
Author: steipete · Status: draft spec · Date: 2025-12-20
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
- Single macOS menu-bar app named **Nexus** that:
|
|
13
|
+
- Shows native notifications for Nexus/nexus events.
|
|
14
|
+
- Owns TCC prompts (Notifications, Accessibility, Screen Recording, Automation/AppleScript, Microphone, Speech Recognition).
|
|
15
|
+
- Runs (or connects to) the **Gateway** and exposes itself as a **node** so agents can reach macOS‑only features.
|
|
16
|
+
- Hosts **PeekabooBridge** for UI automation (consumed by `peekaboo`; see [`docs/mac/peekaboo.md`](https://docs.nexus.bot/mac/peekaboo)).
|
|
17
|
+
- Installs a single CLI (`nexus`) by symlinking the bundled binary.
|
|
18
|
+
|
|
19
|
+
## High-level design
|
|
20
|
+
- SwiftPM package in `apps/macos/` (macOS 15+, Swift 6).
|
|
21
|
+
- Targets:
|
|
22
|
+
- `NexusIPC` (shared Codable types + helpers for app‑internal actions).
|
|
23
|
+
- `Nexus` (LSUIElement MenuBarExtra app; hosts Gateway + node bridge + PeekabooBridgeHost).
|
|
24
|
+
- Bundle ID: `com.nexus.mac`.
|
|
25
|
+
- Bundled runtime binaries live under `Contents/Resources/Relay/`:
|
|
26
|
+
- `nexus` (bun‑compiled relay: CLI + gateway-daemon)
|
|
27
|
+
- The app symlinks `nexus` into `/usr/local/bin` and `/opt/homebrew/bin`.
|
|
28
|
+
|
|
29
|
+
## Gateway + node bridge
|
|
30
|
+
- The mac app runs the Gateway in **local** mode (unless configured remote).
|
|
31
|
+
- The gateway port is configurable via `gateway.port` or `NEXUS_GATEWAY_PORT` (default 18789). The mac app reads that value for launchd, probes, and remote SSH tunnels.
|
|
32
|
+
- The mac app connects to the bridge as a **node** and advertises capabilities/commands.
|
|
33
|
+
- Agent‑facing actions are exposed via `node.invoke` (no local control socket).
|
|
34
|
+
- The mac app watches `~/nexus/state/nexus.json` and switches modes live when `gateway.mode` or `gateway.remote.url` changes.
|
|
35
|
+
- If `gateway.mode` is unset but `gateway.remote.url` is set, the mac app treats it as remote mode.
|
|
36
|
+
- Changing connection mode in the mac app writes `gateway.mode` (and `gateway.remote.url` in remote mode) back to the config file.
|
|
37
|
+
|
|
38
|
+
### Node commands (mac)
|
|
39
|
+
- Canvas: `canvas.present|navigate|eval|snapshot|a2ui.*`
|
|
40
|
+
- Camera: `camera.snap|camera.clip`
|
|
41
|
+
- Screen: `screen.record`
|
|
42
|
+
- System: `system.run` (shell) and `system.notify`
|
|
43
|
+
|
|
44
|
+
### Permission advertising
|
|
45
|
+
- Nodes include a `permissions` map in hello/pairing.
|
|
46
|
+
- The Gateway surfaces it via `node.list` / `node.describe` so agents can decide what to run.
|
|
47
|
+
|
|
48
|
+
## CLI (`nexus`)
|
|
49
|
+
- The **only** CLI is `nexus` (TS/bun). There is no `nexus-mac` helper.
|
|
50
|
+
- For mac‑specific actions, the CLI uses `node.invoke`:
|
|
51
|
+
- `nexus canvas present|navigate|eval|snapshot|a2ui push|a2ui reset`
|
|
52
|
+
- `nexus nodes run --node <id> -- <command...>`
|
|
53
|
+
- `nexus nodes notify --node <id> --title ...`
|
|
54
|
+
|
|
55
|
+
## Onboarding
|
|
56
|
+
- Install CLI (symlink) → Permissions checklist → Test notification → Done.
|
|
57
|
+
- Remote mode skips local gateway/CLI steps.
|
|
58
|
+
- Selecting Local auto-enables the bundled Gateway via launchd (unless “Attach only” debug mode is enabled).
|
|
59
|
+
|
|
60
|
+
## Deep links (URL scheme)
|
|
61
|
+
|
|
62
|
+
Nexus (the macOS app) registers a URL scheme for triggering local actions from anywhere (browser, Shortcuts, CLI, etc.).
|
|
63
|
+
|
|
64
|
+
Scheme:
|
|
65
|
+
- `nexus://…`
|
|
66
|
+
|
|
67
|
+
### `nexus://agent`
|
|
68
|
+
|
|
69
|
+
Triggers a Gateway `agent` request (same machinery as WebChat/agent runs).
|
|
70
|
+
|
|
71
|
+
Example:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
open 'nexus://agent?message=Hello%20from%20deep%20link'
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Query parameters:
|
|
78
|
+
- `message` (required): the agent prompt (URL-encoded).
|
|
79
|
+
- `sessionKey` (optional): explicit session key to use.
|
|
80
|
+
- `thinking` (optional): thinking hint (e.g. `low`; omit for default).
|
|
81
|
+
- `deliver` (optional): `true|false` (default: false).
|
|
82
|
+
- `to` / `provider` (optional): forwarded to the Gateway `agent` method (only meaningful with `deliver=true`).
|
|
83
|
+
- `timeoutSeconds` (optional): timeout hint forwarded to the Gateway.
|
|
84
|
+
- `key` (optional): unattended mode key (see below).
|
|
85
|
+
|
|
86
|
+
Safety/guardrails:
|
|
87
|
+
- Always enabled.
|
|
88
|
+
- Without a `key` query param, the app will prompt for confirmation before invoking the agent.
|
|
89
|
+
- With `key=<value>`, Nexus runs without prompting (intended for personal automations).
|
|
90
|
+
- The current key is shown in Debug Settings and stored locally in UserDefaults.
|
|
91
|
+
|
|
92
|
+
Notes:
|
|
93
|
+
- In local mode, Nexus will start the local Gateway if needed before issuing the request.
|
|
94
|
+
- In remote mode, Nexus will use the configured remote tunnel/endpoint.
|
|
95
|
+
|
|
96
|
+
## Build & dev workflow (native)
|
|
97
|
+
- `cd apps/macos && swift build` (debug) / `swift build -c release`.
|
|
98
|
+
- Run app for dev: `swift run Nexus` (or Xcode scheme).
|
|
99
|
+
- Package app + CLI: `scripts/package-mac-app.sh` (builds bun CLI + gateway).
|
|
100
|
+
- Tests: add Swift Testing suites under `apps/macos/Tests`.
|
|
101
|
+
|
|
102
|
+
## Open questions / decisions
|
|
103
|
+
- Should `system.run` support streaming stdout/stderr or keep buffered responses only?
|
|
104
|
+
- Should we allow node‑side permission prompts, or always require explicit app UI action?
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "How Nexus rotates auth profiles and falls back across models"
|
|
3
|
+
read_when:
|
|
4
|
+
- Diagnosing auth profile rotation, cooldowns, or model fallback behavior
|
|
5
|
+
- Updating failover rules for auth profiles or models
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Model failover
|
|
9
|
+
|
|
10
|
+
Nexus handles failures in two stages:
|
|
11
|
+
1) **Auth profile rotation** within the current provider.
|
|
12
|
+
2) **Model fallback** to the next model in `agent.model.fallbacks`.
|
|
13
|
+
|
|
14
|
+
This doc explains the runtime rules and the data that backs them.
|
|
15
|
+
|
|
16
|
+
## Profile IDs
|
|
17
|
+
|
|
18
|
+
OAuth logins create distinct profiles so multiple accounts can coexist.
|
|
19
|
+
- Default: `provider:default` when no email is available.
|
|
20
|
+
- OAuth with email: `provider:<email>` (for example `google-antigravity:user@gmail.com`).
|
|
21
|
+
|
|
22
|
+
Profiles live in `~/nexus/state/agent/auth-profiles.json` under `profiles`.
|
|
23
|
+
|
|
24
|
+
## Rotation order
|
|
25
|
+
|
|
26
|
+
When a provider has multiple profiles, Nexus chooses an order like this:
|
|
27
|
+
|
|
28
|
+
1) **Explicit config**: `auth.order[provider]` (if set).
|
|
29
|
+
2) **Configured profiles**: `auth.profiles` filtered by provider.
|
|
30
|
+
3) **Stored profiles**: entries in `auth-profiles.json` for the provider.
|
|
31
|
+
|
|
32
|
+
If no explicit order is configured, Nexus uses a round‑robin order:
|
|
33
|
+
- **Primary key:** `usageStats.lastUsed` (oldest first).
|
|
34
|
+
- **Secondary key:** profile type (OAuth before API keys).
|
|
35
|
+
- **Cooldown profiles** are moved to the end, ordered by soonest cooldown expiry.
|
|
36
|
+
|
|
37
|
+
## Cooldowns
|
|
38
|
+
|
|
39
|
+
When a profile fails due to auth/rate‑limit errors (or a timeout that looks
|
|
40
|
+
like rate limiting), Nexus marks it in cooldown and moves to the next profile.
|
|
41
|
+
|
|
42
|
+
Cooldowns use exponential backoff:
|
|
43
|
+
- 1 minute
|
|
44
|
+
- 5 minutes
|
|
45
|
+
- 25 minutes
|
|
46
|
+
- 1 hour (cap)
|
|
47
|
+
|
|
48
|
+
State is stored in `auth-profiles.json` under `usageStats`:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"usageStats": {
|
|
53
|
+
"provider:profile": {
|
|
54
|
+
"lastUsed": 1736160000000,
|
|
55
|
+
"cooldownUntil": 1736160600000,
|
|
56
|
+
"errorCount": 2
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Model fallback
|
|
63
|
+
|
|
64
|
+
If all profiles for a provider fail, Nexus moves to the next model in
|
|
65
|
+
`agent.model.fallbacks`. This applies to auth failures, rate limits, and
|
|
66
|
+
timeouts that exhausted profile rotation.
|
|
67
|
+
|
|
68
|
+
## Related config
|
|
69
|
+
|
|
70
|
+
See [`docs/configuration.md`](https://docs.nexus.bot/configuration) for:
|
|
71
|
+
- `auth.profiles` / `auth.order`
|
|
72
|
+
- `agent.model.primary` / `agent.model.fallbacks`
|
|
73
|
+
- `agent.imageModel` routing
|
|
74
|
+
|
|
75
|
+
See [`docs/models.md`](https://docs.nexus.bot/models) for the broader model selection and fallback overview.
|
package/docs/models.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Plan for models CLI: scan, list, aliases, fallbacks, status"
|
|
3
|
+
read_when:
|
|
4
|
+
- Adding or modifying models CLI (models list/set/scan/aliases/fallbacks)
|
|
5
|
+
- Changing model fallback behavior or selection UX
|
|
6
|
+
- Updating model scan probes (tools/images)
|
|
7
|
+
---
|
|
8
|
+
# Models CLI plan
|
|
9
|
+
|
|
10
|
+
Goal: give clear model visibility + control (configured vs available), plus scan tooling
|
|
11
|
+
that prefers tool-call + image-capable models and maintains ordered fallbacks.
|
|
12
|
+
|
|
13
|
+
## Command tree (draft)
|
|
14
|
+
|
|
15
|
+
- `nexus models list`
|
|
16
|
+
- default: configured models only
|
|
17
|
+
- flags: `--all` (full catalog), `--local`, `--provider <name>`, `--json`, `--plain`
|
|
18
|
+
- `nexus models status`
|
|
19
|
+
- show default model + aliases + fallbacks + configured models
|
|
20
|
+
- `nexus models set <modelOrAlias>`
|
|
21
|
+
- writes `agent.model.primary` and ensures `agent.models` entry
|
|
22
|
+
- `nexus models set-image <modelOrAlias>`
|
|
23
|
+
- writes `agent.imageModel.primary` and ensures `agent.models` entry
|
|
24
|
+
- `nexus models aliases list|add|remove`
|
|
25
|
+
- writes `agent.models.*.alias`
|
|
26
|
+
- `nexus models fallbacks list|add|remove|clear`
|
|
27
|
+
- writes `agent.model.fallbacks`
|
|
28
|
+
- `nexus models image-fallbacks list|add|remove|clear`
|
|
29
|
+
- writes `agent.imageModel.fallbacks`
|
|
30
|
+
- `nexus models scan`
|
|
31
|
+
- OpenRouter :free scan; probe tool-call + image; interactive selection
|
|
32
|
+
|
|
33
|
+
## Config changes
|
|
34
|
+
|
|
35
|
+
- `agent.models` (configured model catalog + aliases).
|
|
36
|
+
- `agent.model.primary` + `agent.model.fallbacks`.
|
|
37
|
+
- `agent.imageModel.primary` + `agent.imageModel.fallbacks` (optional).
|
|
38
|
+
- `auth.profiles` + `auth.order` for per-provider auth failover.
|
|
39
|
+
|
|
40
|
+
## Scan behavior (models scan)
|
|
41
|
+
|
|
42
|
+
Input
|
|
43
|
+
- OpenRouter `/models` list (filter `:free`)
|
|
44
|
+
- Requires OpenRouter API key from auth profiles or `OPENROUTER_API_KEY`
|
|
45
|
+
- Optional filters: `--max-age-days`, `--min-params`, `--provider`, `--max-candidates`
|
|
46
|
+
- Probe controls: `--timeout`, `--concurrency`
|
|
47
|
+
|
|
48
|
+
Probes (direct pi-ai complete)
|
|
49
|
+
- Tool-call probe (required):
|
|
50
|
+
- Provide a dummy tool, verify tool call emitted.
|
|
51
|
+
- Image probe (preferred):
|
|
52
|
+
- Prompt includes 1x1 PNG; success if no "unsupported image" error.
|
|
53
|
+
|
|
54
|
+
Scoring/selection
|
|
55
|
+
- Prefer models passing tool + image for text/tool fallbacks.
|
|
56
|
+
- Prefer image-only models for image tool fallback (even if tool probe fails).
|
|
57
|
+
- Rank by: image ok, then lower tool latency, then larger context, then params.
|
|
58
|
+
|
|
59
|
+
Interactive selection (TTY)
|
|
60
|
+
- Multiselect list with per-model stats:
|
|
61
|
+
- model id, tool ok, image ok, median latency, context, inferred params.
|
|
62
|
+
- Pre-select top N (default 6).
|
|
63
|
+
- Non-TTY: auto-select; require `--yes`/`--no-input` to apply.
|
|
64
|
+
|
|
65
|
+
Output
|
|
66
|
+
- Writes `agent.model.fallbacks` ordered.
|
|
67
|
+
- Writes `agent.imageModel.fallbacks` ordered (image-capable models).
|
|
68
|
+
- Ensures `agent.models` entries exist for selected models.
|
|
69
|
+
- Optional `--set-default` to set `agent.model.primary`.
|
|
70
|
+
- Optional `--set-image` to set `agent.imageModel.primary`.
|
|
71
|
+
|
|
72
|
+
## Runtime fallback
|
|
73
|
+
|
|
74
|
+
- On model failure: try `agent.model.fallbacks` in order.
|
|
75
|
+
- Per-provider auth failover uses `auth.order` (or stored profile order) **before**
|
|
76
|
+
moving to the next model.
|
|
77
|
+
- Image routing uses `agent.imageModel` **only when configured** and the primary
|
|
78
|
+
model lacks image input.
|
|
79
|
+
- Persist last successful provider/model to session entry; auth profile success is global.
|
|
80
|
+
- See [`docs/model-failover.md`](https://docs.nexus.bot/model-failover) for auth profile rotation, cooldowns, and timeout handling.
|
|
81
|
+
|
|
82
|
+
## Tests
|
|
83
|
+
|
|
84
|
+
- Unit: scan selection ordering + probe classification.
|
|
85
|
+
- CLI: list/aliases/fallbacks add/remove + scan writes config.
|
|
86
|
+
- Status: shows last used model + fallbacks.
|
|
87
|
+
|
|
88
|
+
## Docs
|
|
89
|
+
|
|
90
|
+
- Update [`docs/configuration.md`](https://docs.nexus.bot/configuration) with `agent.models` + `agent.model` + `agent.imageModel`.
|
|
91
|
+
- Keep this doc current when CLI surface or scan logic changes.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Multi-Agent Routing
|
|
3
|
+
read_when: "You want multiple isolated agents (workspaces + auth) in one gateway process."
|
|
4
|
+
status: active
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Multi-Agent Routing
|
|
8
|
+
|
|
9
|
+
Goal: multiple *isolated* agents (separate workspace + `agentDir` + sessions), plus multiple provider accounts (e.g. two WhatsApps) in one running Gateway. Inbound is routed to an agent via bindings.
|
|
10
|
+
|
|
11
|
+
## Concepts
|
|
12
|
+
|
|
13
|
+
- `agentId`: one “brain” (workspace, per-agent auth, per-agent session store).
|
|
14
|
+
- `accountId`: one provider account instance (e.g. WhatsApp account `"personal"` vs `"biz"`).
|
|
15
|
+
- `binding`: routes inbound messages to an `agentId` by `(provider, accountId, peer)` and optionally guild/team ids.
|
|
16
|
+
- Direct chats collapse to `agent:<agentId>:<mainKey>` (per-agent “main”; `session.mainKey`).
|
|
17
|
+
|
|
18
|
+
## Example: two WhatsApps → two agents
|
|
19
|
+
|
|
20
|
+
`~/nexus/state/nexus.json` (JSON5):
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
{
|
|
24
|
+
routing: {
|
|
25
|
+
defaultAgentId: "home",
|
|
26
|
+
|
|
27
|
+
agents: {
|
|
28
|
+
home: {
|
|
29
|
+
workspace: "~/nexus-home",
|
|
30
|
+
agentDir: "~/nexus/state/agents/home/agent",
|
|
31
|
+
},
|
|
32
|
+
work: {
|
|
33
|
+
workspace: "~/nexus-work",
|
|
34
|
+
agentDir: "~/nexus/state/agents/work/agent",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
// Deterministic routing: first match wins (most-specific first).
|
|
39
|
+
bindings: [
|
|
40
|
+
{ agentId: "home", match: { provider: "whatsapp", accountId: "personal" } },
|
|
41
|
+
{ agentId: "work", match: { provider: "whatsapp", accountId: "biz" } },
|
|
42
|
+
|
|
43
|
+
// Optional per-peer override (example: send a specific group to work agent).
|
|
44
|
+
{
|
|
45
|
+
agentId: "work",
|
|
46
|
+
match: {
|
|
47
|
+
provider: "whatsapp",
|
|
48
|
+
accountId: "personal",
|
|
49
|
+
peer: { kind: "group", id: "1203630...@g.us" },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
|
|
54
|
+
// Off by default: agent-to-agent messaging must be explicitly enabled + allowlisted.
|
|
55
|
+
agentToAgent: {
|
|
56
|
+
enabled: false,
|
|
57
|
+
allow: ["home", "work"],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
whatsapp: {
|
|
62
|
+
accounts: {
|
|
63
|
+
personal: {
|
|
64
|
+
// Optional override. Default: ~/nexus/state/credentials/whatsapp/personal
|
|
65
|
+
// authDir: "~/nexus/state/credentials/whatsapp/personal",
|
|
66
|
+
},
|
|
67
|
+
biz: {
|
|
68
|
+
// Optional override. Default: ~/nexus/state/credentials/whatsapp/biz
|
|
69
|
+
// authDir: "~/nexus/state/credentials/whatsapp/biz",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
```
|
package/docs/nix.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Install Nexus declaratively with Nix"
|
|
3
|
+
read_when:
|
|
4
|
+
- You want reproducible, rollback-able installs
|
|
5
|
+
- You're already using Nix/NixOS/Home Manager
|
|
6
|
+
- You want everything pinned and managed declaratively
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Nix Installation
|
|
10
|
+
|
|
11
|
+
The recommended way to run Nexus with Nix is via **[nix-nexus](https://github.com/nexus/nix-nexus)** — a batteries-included Home Manager module.
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
Paste this to your AI agent (Claude, Cursor, etc.):
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
I want to set up nix-nexus on my Mac.
|
|
19
|
+
Repository: github:nexus/nix-nexus
|
|
20
|
+
|
|
21
|
+
What I need you to do:
|
|
22
|
+
1. Check if Determinate Nix is installed (if not, install it)
|
|
23
|
+
2. Create a local flake at ~/code/nexus-local using templates/agent-first/flake.nix
|
|
24
|
+
3. Help me create a Telegram bot (@BotFather) and get my chat ID (@userinfobot)
|
|
25
|
+
4. Set up secrets (bot token, Anthropic key) - plain files at ~/.secrets/ is fine
|
|
26
|
+
5. Fill in the template placeholders and run home-manager switch
|
|
27
|
+
6. Verify: launchd running, bot responds to messages
|
|
28
|
+
|
|
29
|
+
Reference the nix-nexus README for module options.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
> **📦 Full guide: [github.com/nexus/nix-nexus](https://github.com/nexus/nix-nexus)**
|
|
33
|
+
>
|
|
34
|
+
> The nix-nexus repo is the source of truth for Nix installation. This page is just a quick overview.
|
|
35
|
+
|
|
36
|
+
## What you get
|
|
37
|
+
|
|
38
|
+
- Gateway + macOS app + tools (whisper, spotify, cameras) — all pinned
|
|
39
|
+
- Launchd service that survives reboots
|
|
40
|
+
- Plugin system with declarative config
|
|
41
|
+
- Instant rollback: `home-manager switch --rollback`
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Nix Mode Runtime Behavior
|
|
46
|
+
|
|
47
|
+
When `NEXUS_NIX_MODE=1` is set (automatic with nix-nexus):
|
|
48
|
+
|
|
49
|
+
Nexus supports a **Nix mode** that makes configuration deterministic and disables auto-install flows.
|
|
50
|
+
Enable it by exporting:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
NEXUS_NIX_MODE=1
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
On macOS, the GUI app does not automatically inherit shell env vars. You can
|
|
57
|
+
also enable Nix mode via defaults:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
defaults write com.nexus.mac nexus.nixMode -bool true
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Config + state paths
|
|
64
|
+
|
|
65
|
+
Nexus reads JSON5 config from `NEXUS_CONFIG_PATH` and stores mutable data in `NEXUS_STATE_DIR`.
|
|
66
|
+
|
|
67
|
+
- `NEXUS_STATE_DIR` (default: `~/nexus/state`)
|
|
68
|
+
- `NEXUS_CONFIG_PATH` (default: `$NEXUS_STATE_DIR/nexus.json`)
|
|
69
|
+
|
|
70
|
+
When running under Nix, set these explicitly to Nix-managed locations so runtime state and config
|
|
71
|
+
stay out of the immutable store.
|
|
72
|
+
|
|
73
|
+
### Runtime behavior in Nix mode
|
|
74
|
+
|
|
75
|
+
- Auto-install and self-mutation flows are disabled
|
|
76
|
+
- Missing dependencies surface Nix-specific remediation messages
|
|
77
|
+
- UI surfaces a read-only Nix mode banner when present
|
|
78
|
+
|
|
79
|
+
## Packaging note (macOS)
|
|
80
|
+
|
|
81
|
+
The macOS packaging flow expects a stable Info.plist template at:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
apps/macos/Sources/Nexus/Resources/Info.plist
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`scripts/package-mac-app.sh` copies this template into the app bundle and patches dynamic fields
|
|
88
|
+
(bundle ID, version/build, Git SHA, Sparkle keys). This keeps the plist deterministic for SwiftPM
|
|
89
|
+
packaging and Nix builds (which do not rely on a full Xcode toolchain).
|
|
90
|
+
|
|
91
|
+
## Related
|
|
92
|
+
|
|
93
|
+
- [nix-nexus](https://github.com/nexus/nix-nexus) — full setup guide
|
|
94
|
+
- [Wizard](https://docs.nexus.bot/wizard) — non-Nix CLI setup
|
|
95
|
+
- [Docker](https://docs.nexus.bot/docker) — containerized setup
|