durar-ai 2026.4.4
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 +5497 -0
- package/LICENSE +21 -0
- package/README.md +614 -0
- package/assets/avatar-placeholder.svg +19 -0
- package/assets/chrome-extension/icons/icon128.png +0 -0
- package/assets/chrome-extension/icons/icon16.png +0 -0
- package/assets/chrome-extension/icons/icon32.png +0 -0
- package/assets/chrome-extension/icons/icon48.png +0 -0
- package/assets/dmg-background-small.png +0 -0
- package/assets/dmg-background.png +0 -0
- package/docs/.i18n/README.md +72 -0
- package/docs/.i18n/ar-navigation.json +18 -0
- package/docs/.i18n/de-navigation.json +18 -0
- package/docs/.i18n/es-navigation.json +18 -0
- package/docs/.i18n/fr-navigation.json +18 -0
- package/docs/.i18n/glossary.ar.json +5 -0
- package/docs/.i18n/glossary.de.json +5 -0
- package/docs/.i18n/glossary.es.json +5 -0
- package/docs/.i18n/glossary.fr.json +5 -0
- package/docs/.i18n/glossary.id.json +5 -0
- package/docs/.i18n/glossary.it.json +5 -0
- package/docs/.i18n/glossary.ja-JP.json +14 -0
- package/docs/.i18n/glossary.ko.json +5 -0
- package/docs/.i18n/glossary.pl.json +5 -0
- package/docs/.i18n/glossary.pt-BR.json +5 -0
- package/docs/.i18n/glossary.tr.json +5 -0
- package/docs/.i18n/glossary.zh-CN.json +358 -0
- package/docs/.i18n/id-navigation.json +18 -0
- package/docs/.i18n/it-navigation.json +18 -0
- package/docs/.i18n/ja-navigation.json +18 -0
- package/docs/.i18n/ko-navigation.json +18 -0
- package/docs/.i18n/pl-navigation.json +18 -0
- package/docs/.i18n/pt-BR-navigation.json +18 -0
- package/docs/.i18n/tr-navigation.json +18 -0
- package/docs/.i18n/zh-Hans-navigation.json +544 -0
- package/docs/assets/install-script.svg +1 -0
- package/docs/assets/macos-onboarding/01-macos-warning.jpeg +0 -0
- package/docs/assets/macos-onboarding/02-local-networks.jpeg +0 -0
- package/docs/assets/macos-onboarding/03-security-notice.png +0 -0
- package/docs/assets/macos-onboarding/04-choose-gateway.png +0 -0
- package/docs/assets/macos-onboarding/05-permissions.png +0 -0
- package/docs/assets/openclaw-logo-text-dark.png +0 -0
- package/docs/assets/openclaw-logo-text-dark.svg +418 -0
- package/docs/assets/openclaw-logo-text.png +0 -0
- package/docs/assets/openclaw-logo-text.svg +418 -0
- package/docs/assets/pixel-lobster.svg +60 -0
- package/docs/assets/showcase/agents-ui.jpg +0 -0
- package/docs/assets/showcase/bambu-cli.png +0 -0
- package/docs/assets/showcase/codexmonitor.png +0 -0
- package/docs/assets/showcase/gohome-grafana.png +0 -0
- package/docs/assets/showcase/ios-testflight.jpg +0 -0
- package/docs/assets/showcase/oura-health.png +0 -0
- package/docs/assets/showcase/padel-cli.svg +11 -0
- package/docs/assets/showcase/padel-screenshot.jpg +0 -0
- package/docs/assets/showcase/papla-tts.jpg +0 -0
- package/docs/assets/showcase/pr-review-telegram.jpg +0 -0
- package/docs/assets/showcase/roborock-screenshot.jpg +0 -0
- package/docs/assets/showcase/roborock-status.svg +13 -0
- package/docs/assets/showcase/roof-camera-sky.jpg +0 -0
- package/docs/assets/showcase/snag.png +0 -0
- package/docs/assets/showcase/tesco-shop.jpg +0 -0
- package/docs/assets/showcase/wienerlinien.png +0 -0
- package/docs/assets/showcase/wine-cellar-skill.jpg +0 -0
- package/docs/assets/showcase/winix-air-purifier.jpg +0 -0
- package/docs/assets/showcase/xuezh-pronunciation.jpeg +0 -0
- package/docs/assets/sponsors/blacksmith-light.svg +14 -0
- package/docs/assets/sponsors/blacksmith.svg +14 -0
- package/docs/assets/sponsors/convex-light.svg +16 -0
- package/docs/assets/sponsors/convex.svg +16 -0
- package/docs/assets/sponsors/github-light.svg +3 -0
- package/docs/assets/sponsors/github.svg +3 -0
- package/docs/assets/sponsors/nvidia-dark.svg +9 -0
- package/docs/assets/sponsors/nvidia.svg +9 -0
- package/docs/assets/sponsors/openai-light.svg +3 -0
- package/docs/assets/sponsors/openai.svg +3 -0
- package/docs/assets/sponsors/vercel-light.svg +5 -0
- package/docs/assets/sponsors/vercel.svg +5 -0
- package/docs/auth-credential-semantics.md +80 -0
- package/docs/automation/auth-monitoring.md +8 -0
- package/docs/automation/clawflow.md +8 -0
- package/docs/automation/cron-jobs.md +410 -0
- package/docs/automation/cron-vs-heartbeat.md +8 -0
- package/docs/automation/gmail-pubsub.md +8 -0
- package/docs/automation/hooks.md +303 -0
- package/docs/automation/index.md +115 -0
- package/docs/automation/poll.md +8 -0
- package/docs/automation/standing-orders.md +254 -0
- package/docs/automation/taskflow.md +82 -0
- package/docs/automation/tasks.md +323 -0
- package/docs/automation/troubleshooting.md +8 -0
- package/docs/automation/webhook.md +8 -0
- package/docs/brave-search.md +103 -0
- package/docs/channels/bluebubbles.md +435 -0
- package/docs/channels/broadcast-groups.md +442 -0
- package/docs/channels/channel-routing.md +139 -0
- package/docs/channels/discord.md +1254 -0
- package/docs/channels/feishu.md +793 -0
- package/docs/channels/googlechat.md +270 -0
- package/docs/channels/group-messages.md +84 -0
- package/docs/channels/groups.md +410 -0
- package/docs/channels/imessage.md +427 -0
- package/docs/channels/index.md +50 -0
- package/docs/channels/irc.md +252 -0
- package/docs/channels/line.md +225 -0
- package/docs/channels/location.md +56 -0
- package/docs/channels/matrix.md +869 -0
- package/docs/channels/mattermost.md +472 -0
- package/docs/channels/msteams.md +805 -0
- package/docs/channels/nextcloud-talk.md +149 -0
- package/docs/channels/nostr.md +252 -0
- package/docs/channels/pairing.md +129 -0
- package/docs/channels/qqbot.md +193 -0
- package/docs/channels/signal.md +337 -0
- package/docs/channels/slack.md +681 -0
- package/docs/channels/synology-chat.md +185 -0
- package/docs/channels/telegram.md +1072 -0
- package/docs/channels/tlon.md +290 -0
- package/docs/channels/troubleshooting.md +133 -0
- package/docs/channels/twitch.md +394 -0
- package/docs/channels/whatsapp.md +488 -0
- package/docs/channels/zalo.md +254 -0
- package/docs/channels/zalouser.md +195 -0
- package/docs/ci.md +66 -0
- package/docs/cli/acp.md +316 -0
- package/docs/cli/agent.md +57 -0
- package/docs/cli/agents.md +220 -0
- package/docs/cli/approvals.md +136 -0
- package/docs/cli/backup.md +84 -0
- package/docs/cli/browser.md +233 -0
- package/docs/cli/channels.md +131 -0
- package/docs/cli/clawbot.md +21 -0
- package/docs/cli/completion.md +35 -0
- package/docs/cli/config.md +353 -0
- package/docs/cli/configure.md +70 -0
- package/docs/cli/cron.md +167 -0
- package/docs/cli/daemon.md +57 -0
- package/docs/cli/dashboard.md +22 -0
- package/docs/cli/devices.md +171 -0
- package/docs/cli/directory.md +63 -0
- package/docs/cli/dns.md +48 -0
- package/docs/cli/docs.md +28 -0
- package/docs/cli/doctor.md +63 -0
- package/docs/cli/flows.md +18 -0
- package/docs/cli/gateway.md +307 -0
- package/docs/cli/health.md +36 -0
- package/docs/cli/hooks.md +337 -0
- package/docs/cli/index.md +1836 -0
- package/docs/cli/logs.md +59 -0
- package/docs/cli/mcp.md +505 -0
- package/docs/cli/memory.md +139 -0
- package/docs/cli/message.md +300 -0
- package/docs/cli/models.md +136 -0
- package/docs/cli/node.md +137 -0
- package/docs/cli/nodes.md +66 -0
- package/docs/cli/onboard.md +171 -0
- package/docs/cli/pairing.md +65 -0
- package/docs/cli/plugins.md +305 -0
- package/docs/cli/qr.md +52 -0
- package/docs/cli/reset.md +35 -0
- package/docs/cli/sandbox.md +197 -0
- package/docs/cli/secrets.md +197 -0
- package/docs/cli/security.md +86 -0
- package/docs/cli/sessions.md +113 -0
- package/docs/cli/setup.md +45 -0
- package/docs/cli/skills.md +59 -0
- package/docs/cli/status.md +35 -0
- package/docs/cli/system.md +71 -0
- package/docs/cli/tui.md +30 -0
- package/docs/cli/uninstall.md +39 -0
- package/docs/cli/update.md +113 -0
- package/docs/cli/voicecall.md +34 -0
- package/docs/cli/webhooks.md +91 -0
- package/docs/concepts/agent-loop.md +168 -0
- package/docs/concepts/agent-workspace.md +246 -0
- package/docs/concepts/agent.md +129 -0
- package/docs/concepts/architecture.md +156 -0
- package/docs/concepts/compaction.md +122 -0
- package/docs/concepts/context-engine.md +274 -0
- package/docs/concepts/context.md +179 -0
- package/docs/concepts/delegate-architecture.md +307 -0
- package/docs/concepts/dreaming.md +173 -0
- package/docs/concepts/features.md +76 -0
- package/docs/concepts/markdown-formatting.md +130 -0
- package/docs/concepts/memory-builtin.md +105 -0
- package/docs/concepts/memory-honcho.md +140 -0
- package/docs/concepts/memory-qmd.md +163 -0
- package/docs/concepts/memory-search.md +141 -0
- package/docs/concepts/memory.md +121 -0
- package/docs/concepts/messages.md +161 -0
- package/docs/concepts/model-failover.md +349 -0
- package/docs/concepts/model-providers.md +799 -0
- package/docs/concepts/models.md +255 -0
- package/docs/concepts/multi-agent.md +615 -0
- package/docs/concepts/oauth.md +225 -0
- package/docs/concepts/presence.md +102 -0
- package/docs/concepts/queue.md +89 -0
- package/docs/concepts/retry.md +69 -0
- package/docs/concepts/session-pruning.md +92 -0
- package/docs/concepts/session-tool.md +141 -0
- package/docs/concepts/session.md +116 -0
- package/docs/concepts/soul.md +110 -0
- package/docs/concepts/streaming.md +161 -0
- package/docs/concepts/system-prompt.md +182 -0
- package/docs/concepts/timezone.md +97 -0
- package/docs/concepts/typebox.md +307 -0
- package/docs/concepts/typing-indicators.md +69 -0
- package/docs/concepts/usage-tracking.md +59 -0
- package/docs/date-time.md +128 -0
- package/docs/debug/node-issue.md +85 -0
- package/docs/diagnostics/flags.md +91 -0
- package/docs/docs.json +1601 -0
- package/docs/gateway/authentication.md +218 -0
- package/docs/gateway/background-process.md +131 -0
- package/docs/gateway/bonjour.md +179 -0
- package/docs/gateway/bridge-protocol.md +89 -0
- package/docs/gateway/cli-backends.md +310 -0
- package/docs/gateway/configuration-examples.md +631 -0
- package/docs/gateway/configuration-reference.md +3618 -0
- package/docs/gateway/configuration.md +698 -0
- package/docs/gateway/discovery.md +141 -0
- package/docs/gateway/doctor.md +494 -0
- package/docs/gateway/gateway-lock.md +37 -0
- package/docs/gateway/health.md +61 -0
- package/docs/gateway/heartbeat.md +443 -0
- package/docs/gateway/index.md +367 -0
- package/docs/gateway/local-models.md +163 -0
- package/docs/gateway/logging.md +113 -0
- package/docs/gateway/multiple-gateways.md +120 -0
- package/docs/gateway/network-model.md +25 -0
- package/docs/gateway/openai-http-api.md +280 -0
- package/docs/gateway/openresponses-http-api.md +340 -0
- package/docs/gateway/openshell.md +307 -0
- package/docs/gateway/pairing.md +138 -0
- package/docs/gateway/protocol.md +588 -0
- package/docs/gateway/remote-gateway-readme.md +164 -0
- package/docs/gateway/remote.md +251 -0
- package/docs/gateway/sandbox-vs-tool-policy-vs-elevated.md +141 -0
- package/docs/gateway/sandboxing.md +473 -0
- package/docs/gateway/secrets-plan-contract.md +116 -0
- package/docs/gateway/secrets.md +541 -0
- package/docs/gateway/security/index.md +1362 -0
- package/docs/gateway/tailscale.md +136 -0
- package/docs/gateway/tools-invoke-http-api.md +161 -0
- package/docs/gateway/troubleshooting.md +451 -0
- package/docs/gateway/trusted-proxy-auth.md +399 -0
- package/docs/help/debugging.md +168 -0
- package/docs/help/environment.md +165 -0
- package/docs/help/faq.md +3244 -0
- package/docs/help/index.md +28 -0
- package/docs/help/scripts.md +27 -0
- package/docs/help/testing.md +640 -0
- package/docs/help/troubleshooting.md +372 -0
- package/docs/images/configure-model-picker-unsearchable.png +0 -0
- package/docs/images/feishu-step2-create-app.png +0 -0
- package/docs/images/feishu-step3-credentials.png +0 -0
- package/docs/images/feishu-step4-permissions.png +0 -0
- package/docs/images/feishu-step5-bot-capability.png +0 -0
- package/docs/images/feishu-step6-event-subscription.png +0 -0
- package/docs/images/feishu-verification-token.png +0 -0
- package/docs/images/groups-flow.svg +52 -0
- package/docs/images/mobile-ui-screenshot.png +0 -0
- package/docs/index.md +196 -0
- package/docs/install/ansible.md +230 -0
- package/docs/install/azure.md +311 -0
- package/docs/install/bun.md +55 -0
- package/docs/install/clawdock.md +106 -0
- package/docs/install/development-channels.md +131 -0
- package/docs/install/digitalocean.md +129 -0
- package/docs/install/docker-vm-runtime.md +142 -0
- package/docs/install/docker.md +412 -0
- package/docs/install/exe-dev.md +133 -0
- package/docs/install/fly.md +504 -0
- package/docs/install/gcp.md +412 -0
- package/docs/install/hetzner.md +259 -0
- package/docs/install/index.md +212 -0
- package/docs/install/installer.md +443 -0
- package/docs/install/kubernetes.md +192 -0
- package/docs/install/macos-vm.md +281 -0
- package/docs/install/migrating-matrix.md +349 -0
- package/docs/install/migrating.md +112 -0
- package/docs/install/nix.md +89 -0
- package/docs/install/node.md +144 -0
- package/docs/install/northflank.mdx +42 -0
- package/docs/install/oracle.md +158 -0
- package/docs/install/podman.md +210 -0
- package/docs/install/railway.mdx +90 -0
- package/docs/install/raspberry-pi.md +159 -0
- package/docs/install/render.mdx +165 -0
- package/docs/install/uninstall.md +128 -0
- package/docs/install/updating.md +142 -0
- package/docs/logging.md +389 -0
- package/docs/nav-tabs-underline.js +100 -0
- package/docs/network.md +69 -0
- package/docs/nodes/audio.md +191 -0
- package/docs/nodes/camera.md +162 -0
- package/docs/nodes/images.md +73 -0
- package/docs/nodes/index.md +408 -0
- package/docs/nodes/location-command.md +98 -0
- package/docs/nodes/media-understanding.md +432 -0
- package/docs/nodes/talk.md +92 -0
- package/docs/nodes/troubleshooting.md +123 -0
- package/docs/nodes/voicewake.md +66 -0
- package/docs/perplexity.md +181 -0
- package/docs/pi-dev.md +80 -0
- package/docs/pi.md +570 -0
- package/docs/platforms/android.md +244 -0
- package/docs/platforms/digitalocean.md +266 -0
- package/docs/platforms/index.md +55 -0
- package/docs/platforms/ios.md +223 -0
- package/docs/platforms/linux.md +100 -0
- package/docs/platforms/mac/bundled-gateway.md +75 -0
- package/docs/platforms/mac/canvas.md +125 -0
- package/docs/platforms/mac/child-process.md +69 -0
- package/docs/platforms/mac/dev-setup.md +107 -0
- package/docs/platforms/mac/health.md +34 -0
- package/docs/platforms/mac/icon.md +31 -0
- package/docs/platforms/mac/logging.md +57 -0
- package/docs/platforms/mac/menu-bar.md +81 -0
- package/docs/platforms/mac/peekaboo.md +65 -0
- package/docs/platforms/mac/permissions.md +50 -0
- package/docs/platforms/mac/remote.md +84 -0
- package/docs/platforms/mac/signing.md +47 -0
- package/docs/platforms/mac/skills.md +40 -0
- package/docs/platforms/mac/voice-overlay.md +60 -0
- package/docs/platforms/mac/voicewake.md +67 -0
- package/docs/platforms/mac/webchat.md +51 -0
- package/docs/platforms/mac/xpc.md +61 -0
- package/docs/platforms/macos.md +229 -0
- package/docs/platforms/oracle.md +305 -0
- package/docs/platforms/raspberry-pi.md +420 -0
- package/docs/platforms/windows.md +241 -0
- package/docs/plugins/agent-tools.md +10 -0
- package/docs/plugins/architecture.md +1609 -0
- package/docs/plugins/building-extensions.md +10 -0
- package/docs/plugins/building-plugins.md +319 -0
- package/docs/plugins/bundles.md +292 -0
- package/docs/plugins/community.md +149 -0
- package/docs/plugins/manifest.md +412 -0
- package/docs/plugins/sdk-channel-plugins.md +508 -0
- package/docs/plugins/sdk-entrypoints.md +210 -0
- package/docs/plugins/sdk-migration.md +359 -0
- package/docs/plugins/sdk-overview.md +475 -0
- package/docs/plugins/sdk-provider-plugins.md +712 -0
- package/docs/plugins/sdk-runtime.md +381 -0
- package/docs/plugins/sdk-setup.md +516 -0
- package/docs/plugins/sdk-testing.md +263 -0
- package/docs/plugins/voice-call.md +466 -0
- package/docs/plugins/zalouser.md +78 -0
- package/docs/prose.md +134 -0
- package/docs/providers/anthropic.md +402 -0
- package/docs/providers/bedrock-mantle.md +91 -0
- package/docs/providers/bedrock.md +273 -0
- package/docs/providers/chutes.md +103 -0
- package/docs/providers/claude-max-api-proxy.md +163 -0
- package/docs/providers/cloudflare-ai-gateway.md +71 -0
- package/docs/providers/deepgram.md +93 -0
- package/docs/providers/deepseek.md +53 -0
- package/docs/providers/fireworks.md +69 -0
- package/docs/providers/github-copilot.md +80 -0
- package/docs/providers/glm.md +68 -0
- package/docs/providers/google.md +149 -0
- package/docs/providers/groq.md +105 -0
- package/docs/providers/huggingface.md +193 -0
- package/docs/providers/index.md +81 -0
- package/docs/providers/kilocode.md +89 -0
- package/docs/providers/litellm.md +159 -0
- package/docs/providers/minimax.md +281 -0
- package/docs/providers/mistral.md +68 -0
- package/docs/providers/models.md +56 -0
- package/docs/providers/moonshot.md +224 -0
- package/docs/providers/nvidia.md +58 -0
- package/docs/providers/ollama.md +379 -0
- package/docs/providers/openai.md +472 -0
- package/docs/providers/opencode-go.md +45 -0
- package/docs/providers/opencode.md +68 -0
- package/docs/providers/openrouter.md +59 -0
- package/docs/providers/perplexity-provider.md +62 -0
- package/docs/providers/qianfan.md +90 -0
- package/docs/providers/qwen.md +128 -0
- package/docs/providers/qwen_modelstudio.md +137 -0
- package/docs/providers/sglang.md +115 -0
- package/docs/providers/stepfun.md +152 -0
- package/docs/providers/synthetic.md +101 -0
- package/docs/providers/together.md +70 -0
- package/docs/providers/venice.md +282 -0
- package/docs/providers/vercel-ai-gateway.md +60 -0
- package/docs/providers/vllm.md +103 -0
- package/docs/providers/volcengine.md +94 -0
- package/docs/providers/xai.md +94 -0
- package/docs/providers/xiaomi.md +89 -0
- package/docs/providers/zai.md +75 -0
- package/docs/reference/AGENTS.default.md +126 -0
- package/docs/reference/RELEASING.md +138 -0
- package/docs/reference/api-usage-costs.md +198 -0
- package/docs/reference/credits.md +30 -0
- package/docs/reference/device-models.md +47 -0
- package/docs/reference/memory-config.md +421 -0
- package/docs/reference/prompt-caching.md +344 -0
- package/docs/reference/rpc.md +43 -0
- package/docs/reference/secretref-credential-surface.md +148 -0
- package/docs/reference/secretref-user-supplied-credentials-matrix.json +607 -0
- package/docs/reference/session-management-compaction.md +352 -0
- package/docs/reference/templates/AGENTS.dev.md +84 -0
- package/docs/reference/templates/AGENTS.md +219 -0
- package/docs/reference/templates/BOOT.md +12 -0
- package/docs/reference/templates/BOOTSTRAP.md +62 -0
- package/docs/reference/templates/CLAUDE.md +1 -0
- package/docs/reference/templates/HEARTBEAT.md +14 -0
- package/docs/reference/templates/IDENTITY.dev.md +48 -0
- package/docs/reference/templates/IDENTITY.md +30 -0
- package/docs/reference/templates/SOUL.dev.md +77 -0
- package/docs/reference/templates/SOUL.md +45 -0
- package/docs/reference/templates/TOOLS.dev.md +25 -0
- package/docs/reference/templates/TOOLS.md +47 -0
- package/docs/reference/templates/USER.dev.md +19 -0
- package/docs/reference/templates/USER.md +24 -0
- package/docs/reference/test.md +119 -0
- package/docs/reference/token-use.md +197 -0
- package/docs/reference/transcript-hygiene.md +151 -0
- package/docs/reference/wizard.md +245 -0
- package/docs/security/CONTRIBUTING-THREAT-MODEL.md +98 -0
- package/docs/security/THREAT-MODEL-ATLAS.md +608 -0
- package/docs/security/formal-verification.md +167 -0
- package/docs/snippets/plugin-publish/minimal-openclaw.plugin.json +9 -0
- package/docs/snippets/plugin-publish/minimal-package.json +16 -0
- package/docs/start/bootstrapping.md +41 -0
- package/docs/start/docs-directory.md +67 -0
- package/docs/start/getting-started.md +148 -0
- package/docs/start/hubs.md +199 -0
- package/docs/start/lore.md +219 -0
- package/docs/start/onboarding-overview.md +69 -0
- package/docs/start/onboarding.md +92 -0
- package/docs/start/openclaw.md +225 -0
- package/docs/start/quickstart.md +22 -0
- package/docs/start/setup.md +172 -0
- package/docs/start/showcase.md +418 -0
- package/docs/start/wizard-cli-automation.md +233 -0
- package/docs/start/wizard-cli-reference.md +324 -0
- package/docs/start/wizard.md +127 -0
- package/docs/style.css +37 -0
- package/docs/tools/acp-agents.md +837 -0
- package/docs/tools/agent-send.md +100 -0
- package/docs/tools/apply-patch.md +52 -0
- package/docs/tools/brave-search.md +107 -0
- package/docs/tools/browser-linux-troubleshooting.md +145 -0
- package/docs/tools/browser-login.md +73 -0
- package/docs/tools/browser-wsl2-windows-remote-cdp-troubleshooting.md +221 -0
- package/docs/tools/browser.md +890 -0
- package/docs/tools/btw.md +142 -0
- package/docs/tools/capability-cookbook.md +119 -0
- package/docs/tools/clawhub.md +348 -0
- package/docs/tools/code-execution.md +90 -0
- package/docs/tools/creating-skills.md +119 -0
- package/docs/tools/diffs.md +434 -0
- package/docs/tools/duckduckgo-search.md +102 -0
- package/docs/tools/elevated.md +116 -0
- package/docs/tools/exa-search.md +127 -0
- package/docs/tools/exec-approvals.md +635 -0
- package/docs/tools/exec.md +237 -0
- package/docs/tools/firecrawl.md +147 -0
- package/docs/tools/gemini-search.md +98 -0
- package/docs/tools/grok-search.md +102 -0
- package/docs/tools/image-generation.md +139 -0
- package/docs/tools/index.md +174 -0
- package/docs/tools/kimi-search.md +98 -0
- package/docs/tools/llm-task.md +119 -0
- package/docs/tools/lobster.md +348 -0
- package/docs/tools/loop-detection.md +100 -0
- package/docs/tools/minimax-search.md +99 -0
- package/docs/tools/multi-agent-sandbox-tools.md +373 -0
- package/docs/tools/ollama-search.md +100 -0
- package/docs/tools/pdf.md +176 -0
- package/docs/tools/perplexity-search.md +185 -0
- package/docs/tools/plugin.md +348 -0
- package/docs/tools/reactions.md +78 -0
- package/docs/tools/searxng-search.md +132 -0
- package/docs/tools/skills-config.md +133 -0
- package/docs/tools/skills.md +377 -0
- package/docs/tools/slash-commands.md +322 -0
- package/docs/tools/subagents.md +341 -0
- package/docs/tools/tavily.md +129 -0
- package/docs/tools/thinking.md +102 -0
- package/docs/tools/tts.md +452 -0
- package/docs/tools/web-fetch.md +159 -0
- package/docs/tools/web.md +417 -0
- package/docs/tts.md +452 -0
- package/docs/vps.md +115 -0
- package/docs/web/control-ui.md +318 -0
- package/docs/web/dashboard.md +93 -0
- package/docs/web/index.md +126 -0
- package/docs/web/tui.md +176 -0
- package/docs/web/webchat.md +77 -0
- package/docs/whatsapp-openclaw-ai-zh.jpg +0 -0
- package/docs/whatsapp-openclaw.jpg +0 -0
- package/durar.mjs +180 -0
- package/package.json +1259 -0
- package/scripts/npm-runner.mjs +111 -0
- package/scripts/postinstall-bundled-plugins.mjs +188 -0
- package/skills/1password/SKILL.md +70 -0
- package/skills/1password/references/cli-examples.md +29 -0
- package/skills/1password/references/get-started.md +17 -0
- package/skills/apple-notes/SKILL.md +77 -0
- package/skills/apple-reminders/SKILL.md +118 -0
- package/skills/bear-notes/SKILL.md +107 -0
- package/skills/blogwatcher/SKILL.md +69 -0
- package/skills/blucli/SKILL.md +47 -0
- package/skills/bluebubbles/SKILL.md +131 -0
- package/skills/camsnap/SKILL.md +45 -0
- package/skills/canvas/SKILL.md +199 -0
- package/skills/clawhub/SKILL.md +77 -0
- package/skills/coding-agent/SKILL.md +316 -0
- package/skills/discord/SKILL.md +197 -0
- package/skills/eightctl/SKILL.md +50 -0
- package/skills/gemini/SKILL.md +43 -0
- package/skills/gh-issues/SKILL.md +885 -0
- package/skills/gifgrep/SKILL.md +79 -0
- package/skills/github/SKILL.md +163 -0
- package/skills/gog/SKILL.md +116 -0
- package/skills/goplaces/SKILL.md +52 -0
- package/skills/healthcheck/SKILL.md +245 -0
- package/skills/himalaya/SKILL.md +257 -0
- package/skills/himalaya/references/configuration.md +184 -0
- package/skills/himalaya/references/message-composition.md +199 -0
- package/skills/imsg/SKILL.md +122 -0
- package/skills/mcporter/SKILL.md +61 -0
- package/skills/model-usage/SKILL.md +69 -0
- package/skills/model-usage/references/codexbar-cli.md +33 -0
- package/skills/model-usage/scripts/model_usage.py +320 -0
- package/skills/model-usage/scripts/test_model_usage.py +40 -0
- package/skills/nano-pdf/SKILL.md +38 -0
- package/skills/node-connect/SKILL.md +142 -0
- package/skills/notion/SKILL.md +174 -0
- package/skills/obsidian/SKILL.md +81 -0
- package/skills/openai-whisper/SKILL.md +38 -0
- package/skills/openai-whisper-api/SKILL.md +62 -0
- package/skills/openai-whisper-api/scripts/transcribe.sh +88 -0
- package/skills/openhue/SKILL.md +112 -0
- package/skills/oracle/SKILL.md +125 -0
- package/skills/ordercli/SKILL.md +78 -0
- package/skills/peekaboo/SKILL.md +190 -0
- package/skills/sag/SKILL.md +87 -0
- package/skills/session-logs/SKILL.md +151 -0
- package/skills/sherpa-onnx-tts/SKILL.md +109 -0
- package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +178 -0
- package/skills/skill-creator/SKILL.md +372 -0
- package/skills/skill-creator/license.txt +202 -0
- package/skills/skill-creator/scripts/init_skill.py +378 -0
- package/skills/skill-creator/scripts/package_skill.py +139 -0
- package/skills/skill-creator/scripts/quick_validate.py +159 -0
- package/skills/skill-creator/scripts/test_package_skill.py +160 -0
- package/skills/skill-creator/scripts/test_quick_validate.py +72 -0
- package/skills/slack/SKILL.md +144 -0
- package/skills/songsee/SKILL.md +49 -0
- package/skills/sonoscli/SKILL.md +65 -0
- package/skills/spotify-player/SKILL.md +64 -0
- package/skills/summarize/SKILL.md +87 -0
- package/skills/taskflow/SKILL.md +149 -0
- package/skills/taskflow/examples/inbox-triage.lobster +33 -0
- package/skills/taskflow/examples/pr-intake.lobster +32 -0
- package/skills/taskflow-inbox-triage/SKILL.md +119 -0
- package/skills/things-mac/SKILL.md +86 -0
- package/skills/tmux/SKILL.md +170 -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 +108 -0
- package/skills/video-frames/SKILL.md +46 -0
- package/skills/video-frames/scripts/frame.sh +81 -0
- package/skills/voice-call/SKILL.md +45 -0
- package/skills/wacli/SKILL.md +72 -0
- package/skills/weather/SKILL.md +129 -0
- package/skills/xurl/SKILL.md +461 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "What the Durar system prompt contains and how it is assembled"
|
|
3
|
+
read_when:
|
|
4
|
+
- Editing system prompt text, tools list, or time/heartbeat sections
|
|
5
|
+
- Changing workspace bootstrap or skills injection behavior
|
|
6
|
+
title: "System Prompt"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# System Prompt
|
|
10
|
+
|
|
11
|
+
Durar builds a custom system prompt for every agent run. The prompt is **Durar-owned** and does not use the pi-coding-agent default prompt.
|
|
12
|
+
|
|
13
|
+
The prompt is assembled by Durar and injected into each agent run.
|
|
14
|
+
|
|
15
|
+
Provider plugins can contribute cache-aware prompt guidance without replacing
|
|
16
|
+
the full Durar-owned prompt. The provider runtime can:
|
|
17
|
+
|
|
18
|
+
- replace a small set of named core sections (`interaction_style`,
|
|
19
|
+
`tool_call_style`, `execution_bias`)
|
|
20
|
+
- inject a **stable prefix** above the prompt cache boundary
|
|
21
|
+
- inject a **dynamic suffix** below the prompt cache boundary
|
|
22
|
+
|
|
23
|
+
Use provider-owned contributions for model-family-specific tuning. Keep legacy
|
|
24
|
+
`before_prompt_build` prompt mutation for compatibility or truly global prompt
|
|
25
|
+
changes, not normal provider behavior.
|
|
26
|
+
|
|
27
|
+
## Structure
|
|
28
|
+
|
|
29
|
+
The prompt is intentionally compact and uses fixed sections:
|
|
30
|
+
|
|
31
|
+
- **Tooling**: structured-tool source-of-truth reminder plus runtime tool-use guidance.
|
|
32
|
+
- **Safety**: short guardrail reminder to avoid power-seeking behavior or bypassing oversight.
|
|
33
|
+
- **Skills** (when available): tells the model how to load skill instructions on demand.
|
|
34
|
+
- **Durar Self-Update**: how to inspect config safely with
|
|
35
|
+
`config.schema.lookup`, patch config with `config.patch`, replace the full
|
|
36
|
+
config with `config.apply`, and run `update.run` only on explicit user
|
|
37
|
+
request. The owner-only `gateway` tool also refuses to rewrite
|
|
38
|
+
`tools.exec.ask` / `tools.exec.security`, including legacy `tools.bash.*`
|
|
39
|
+
aliases that normalize to those protected exec paths.
|
|
40
|
+
- **Workspace**: working directory (`agents.defaults.workspace`).
|
|
41
|
+
- **Documentation**: local path to Durar docs (repo or npm package) and when to read them.
|
|
42
|
+
- **Workspace Files (injected)**: indicates bootstrap files are included below.
|
|
43
|
+
- **Sandbox** (when enabled): indicates sandboxed runtime, sandbox paths, and whether elevated exec is available.
|
|
44
|
+
- **Current Date & Time**: user-local time, timezone, and time format.
|
|
45
|
+
- **Reply Tags**: optional reply tag syntax for supported providers.
|
|
46
|
+
- **Heartbeats**: heartbeat prompt and ack behavior.
|
|
47
|
+
- **Runtime**: host, OS, node, model, repo root (when detected), thinking level (one line).
|
|
48
|
+
- **Reasoning**: current visibility level + /reasoning toggle hint.
|
|
49
|
+
|
|
50
|
+
The Tooling section also includes runtime guidance for long-running work:
|
|
51
|
+
|
|
52
|
+
- use cron for future follow-up (`check back later`, reminders, recurring work)
|
|
53
|
+
instead of `exec` sleep loops, `yieldMs` delay tricks, or repeated `process`
|
|
54
|
+
polling
|
|
55
|
+
- use `exec` / `process` only for commands that start now and continue running
|
|
56
|
+
in the background
|
|
57
|
+
- when automatic completion wake is enabled, start the command once and rely on
|
|
58
|
+
the push-based wake path when it emits output or fails
|
|
59
|
+
- use `process` for logs, status, input, or intervention when you need to
|
|
60
|
+
inspect a running command
|
|
61
|
+
- if the task is larger, prefer `sessions_spawn`; sub-agent completion is
|
|
62
|
+
push-based and auto-announces back to the requester
|
|
63
|
+
- do not poll `subagents list` / `sessions_list` in a loop just to wait for
|
|
64
|
+
completion
|
|
65
|
+
|
|
66
|
+
When the experimental `update_plan` tool is enabled, Tooling also tells the
|
|
67
|
+
model to use it only for non-trivial multi-step work, keep exactly one
|
|
68
|
+
`in_progress` step, and avoid repeating the whole plan after each update.
|
|
69
|
+
|
|
70
|
+
Safety guardrails in the system prompt are advisory. They guide model behavior but do not enforce policy. Use tool policy, exec approvals, sandboxing, and channel allowlists for hard enforcement; operators can disable these by design.
|
|
71
|
+
|
|
72
|
+
On channels with native approval cards/buttons, the runtime prompt now tells the
|
|
73
|
+
agent to rely on that native approval UI first. It should only include a manual
|
|
74
|
+
`/approve` command when the tool result says chat approvals are unavailable or
|
|
75
|
+
manual approval is the only path.
|
|
76
|
+
|
|
77
|
+
## Prompt modes
|
|
78
|
+
|
|
79
|
+
Durar can render smaller system prompts for sub-agents. The runtime sets a
|
|
80
|
+
`promptMode` for each run (not a user-facing config):
|
|
81
|
+
|
|
82
|
+
- `full` (default): includes all sections above.
|
|
83
|
+
- `minimal`: used for sub-agents; omits **Skills**, **Memory Recall**, **Durar
|
|
84
|
+
Self-Update**, **Model Aliases**, **User Identity**, **Reply Tags**,
|
|
85
|
+
**Messaging**, **Silent Replies**, and **Heartbeats**. Tooling, **Safety**,
|
|
86
|
+
Workspace, Sandbox, Current Date & Time (when known), Runtime, and injected
|
|
87
|
+
context stay available.
|
|
88
|
+
- `none`: returns only the base identity line.
|
|
89
|
+
|
|
90
|
+
When `promptMode=minimal`, extra injected prompts are labeled **Subagent
|
|
91
|
+
Context** instead of **Group Chat Context**.
|
|
92
|
+
|
|
93
|
+
## Workspace bootstrap injection
|
|
94
|
+
|
|
95
|
+
Bootstrap files are trimmed and appended under **Project Context** so the model sees identity and profile context without needing explicit reads:
|
|
96
|
+
|
|
97
|
+
- `AGENTS.md`
|
|
98
|
+
- `SOUL.md`
|
|
99
|
+
- `TOOLS.md`
|
|
100
|
+
- `IDENTITY.md`
|
|
101
|
+
- `USER.md`
|
|
102
|
+
- `HEARTBEAT.md`
|
|
103
|
+
- `BOOTSTRAP.md` (only on brand-new workspaces)
|
|
104
|
+
- `MEMORY.md` when present, otherwise `memory.md` as a lowercase fallback
|
|
105
|
+
|
|
106
|
+
All of these files are **injected into the context window** on every turn, which
|
|
107
|
+
means they consume tokens. Keep them concise — especially `MEMORY.md`, which can
|
|
108
|
+
grow over time and lead to unexpectedly high context usage and more frequent
|
|
109
|
+
compaction.
|
|
110
|
+
|
|
111
|
+
> **Note:** `memory/*.md` daily files are **not** injected automatically. They
|
|
112
|
+
> are accessed on demand via the `memory_search` and `memory_get` tools, so they
|
|
113
|
+
> do not count against the context window unless the model explicitly reads them.
|
|
114
|
+
|
|
115
|
+
Large files are truncated with a marker. The max per-file size is controlled by
|
|
116
|
+
`agents.defaults.bootstrapMaxChars` (default: 20000). Total injected bootstrap
|
|
117
|
+
content across files is capped by `agents.defaults.bootstrapTotalMaxChars`
|
|
118
|
+
(default: 150000). Missing files inject a short missing-file marker. When truncation
|
|
119
|
+
occurs, Durar can inject a warning block in Project Context; control this with
|
|
120
|
+
`agents.defaults.bootstrapPromptTruncationWarning` (`off`, `once`, `always`;
|
|
121
|
+
default: `once`).
|
|
122
|
+
|
|
123
|
+
Sub-agent sessions only inject `AGENTS.md` and `TOOLS.md` (other bootstrap files
|
|
124
|
+
are filtered out to keep the sub-agent context small).
|
|
125
|
+
|
|
126
|
+
Internal hooks can intercept this step via `agent:bootstrap` to mutate or replace
|
|
127
|
+
the injected bootstrap files (for example swapping `SOUL.md` for an alternate persona).
|
|
128
|
+
|
|
129
|
+
If you want to make the agent sound less generic, start with
|
|
130
|
+
[SOUL.md Personality Guide](/concepts/soul).
|
|
131
|
+
|
|
132
|
+
To inspect how much each injected file contributes (raw vs injected, truncation, plus tool schema overhead), use `/context list` or `/context detail`. See [Context](/concepts/context).
|
|
133
|
+
|
|
134
|
+
## Time handling
|
|
135
|
+
|
|
136
|
+
The system prompt includes a dedicated **Current Date & Time** section when the
|
|
137
|
+
user timezone is known. To keep the prompt cache-stable, it now only includes
|
|
138
|
+
the **time zone** (no dynamic clock or time format).
|
|
139
|
+
|
|
140
|
+
Use `session_status` when the agent needs the current time; the status card
|
|
141
|
+
includes a timestamp line. The same tool can optionally set a per-session model
|
|
142
|
+
override (`model=default` clears it).
|
|
143
|
+
|
|
144
|
+
Configure with:
|
|
145
|
+
|
|
146
|
+
- `agents.defaults.userTimezone`
|
|
147
|
+
- `agents.defaults.timeFormat` (`auto` | `12` | `24`)
|
|
148
|
+
|
|
149
|
+
See [Date & Time](/date-time) for full behavior details.
|
|
150
|
+
|
|
151
|
+
## Skills
|
|
152
|
+
|
|
153
|
+
When eligible skills exist, Durar injects a compact **available skills list**
|
|
154
|
+
(`formatSkillsForPrompt`) that includes the **file path** for each skill. The
|
|
155
|
+
prompt instructs the model to use `read` to load the SKILL.md at the listed
|
|
156
|
+
location (workspace, managed, or bundled). If no skills are eligible, the
|
|
157
|
+
Skills section is omitted.
|
|
158
|
+
|
|
159
|
+
Eligibility includes skill metadata gates, runtime environment/config checks,
|
|
160
|
+
and the effective agent skill allowlist when `agents.defaults.skills` or
|
|
161
|
+
`agents.list[].skills` is configured.
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
<available_skills>
|
|
165
|
+
<skill>
|
|
166
|
+
<name>...</name>
|
|
167
|
+
<description>...</description>
|
|
168
|
+
<location>...</location>
|
|
169
|
+
</skill>
|
|
170
|
+
</available_skills>
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
This keeps the base prompt small while still enabling targeted skill usage.
|
|
174
|
+
|
|
175
|
+
## Documentation
|
|
176
|
+
|
|
177
|
+
When available, the system prompt includes a **Documentation** section that points to the
|
|
178
|
+
local Durar docs directory (either `docs/` in the repo workspace or the bundled npm
|
|
179
|
+
package docs) and also notes the public mirror, source repo, community Discord, and
|
|
180
|
+
Durar Gateway ([https://Durar Gateway.ai](https://Durar Gateway.ai)) for skills discovery. The prompt instructs the model to consult local docs first
|
|
181
|
+
for Durar behavior, commands, configuration, or architecture, and to run
|
|
182
|
+
`Durar status` itself when possible (asking the user only when it lacks access).
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Timezone handling for agents, envelopes, and prompts"
|
|
3
|
+
read_when:
|
|
4
|
+
- You need to understand how timestamps are normalized for the model
|
|
5
|
+
- Configuring the user timezone for system prompts
|
|
6
|
+
title: "Timezones"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Timezones
|
|
10
|
+
|
|
11
|
+
Durar standardizes timestamps so the model sees a **single reference time**.
|
|
12
|
+
|
|
13
|
+
## Message envelopes (local by default)
|
|
14
|
+
|
|
15
|
+
Inbound messages are wrapped in an envelope like:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
[Provider ... 2026-01-05 16:26 PST] message text
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The timestamp in the envelope is **host-local by default**, with minutes precision.
|
|
22
|
+
|
|
23
|
+
You can override this with:
|
|
24
|
+
|
|
25
|
+
```json5
|
|
26
|
+
{
|
|
27
|
+
agents: {
|
|
28
|
+
defaults: {
|
|
29
|
+
envelopeTimezone: "local", // "utc" | "local" | "user" | IANA timezone
|
|
30
|
+
envelopeTimestamp: "on", // "on" | "off"
|
|
31
|
+
envelopeElapsed: "on", // "on" | "off"
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- `envelopeTimezone: "utc"` uses UTC.
|
|
38
|
+
- `envelopeTimezone: "user"` uses `agents.defaults.userTimezone` (falls back to host timezone).
|
|
39
|
+
- Use an explicit IANA timezone (e.g., `"Europe/Vienna"`) for a fixed offset.
|
|
40
|
+
- `envelopeTimestamp: "off"` removes absolute timestamps from envelope headers.
|
|
41
|
+
- `envelopeElapsed: "off"` removes elapsed time suffixes (the `+2m` style).
|
|
42
|
+
|
|
43
|
+
### Examples
|
|
44
|
+
|
|
45
|
+
**Local (default):**
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
[Signal Alice +1555 2026-01-18 00:19 PST] hello
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Fixed timezone:**
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
[Signal Alice +1555 2026-01-18 06:19 GMT+1] hello
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Elapsed time:**
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
[Signal Alice +1555 +2m 2026-01-18T05:19Z] follow-up
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Tool payloads (raw provider data + normalized fields)
|
|
64
|
+
|
|
65
|
+
Tool calls (`channels.discord.readMessages`, `channels.slack.readMessages`, etc.) return **raw provider timestamps**.
|
|
66
|
+
We also attach normalized fields for consistency:
|
|
67
|
+
|
|
68
|
+
- `timestampMs` (UTC epoch milliseconds)
|
|
69
|
+
- `timestampUtc` (ISO 8601 UTC string)
|
|
70
|
+
|
|
71
|
+
Raw provider fields are preserved.
|
|
72
|
+
|
|
73
|
+
## User timezone for the system prompt
|
|
74
|
+
|
|
75
|
+
Set `agents.defaults.userTimezone` to tell the model the user's local time zone. If it is
|
|
76
|
+
unset, Durar resolves the **host timezone at runtime** (no config write).
|
|
77
|
+
|
|
78
|
+
```json5
|
|
79
|
+
{
|
|
80
|
+
agents: { defaults: { userTimezone: "America/Chicago" } },
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The system prompt includes:
|
|
85
|
+
|
|
86
|
+
- `Current Date & Time` section with local time and timezone
|
|
87
|
+
- `Time format: 12-hour` or `24-hour`
|
|
88
|
+
|
|
89
|
+
You can control the prompt format with `agents.defaults.timeFormat` (`auto` | `12` | `24`).
|
|
90
|
+
|
|
91
|
+
See [Date & Time](/date-time) for the full behavior and examples.
|
|
92
|
+
|
|
93
|
+
## Related
|
|
94
|
+
|
|
95
|
+
- [Heartbeat](/gateway/heartbeat) — active hours use timezone for scheduling
|
|
96
|
+
- [Cron Jobs](/automation/cron-jobs) — cron expressions use timezone for scheduling
|
|
97
|
+
- [Date & Time](/date-time) — full date/time behavior and examples
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "TypeBox schemas as the single source of truth for the gateway protocol"
|
|
3
|
+
read_when:
|
|
4
|
+
- Updating protocol schemas or codegen
|
|
5
|
+
title: "TypeBox"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# TypeBox as protocol source of truth
|
|
9
|
+
|
|
10
|
+
Last updated: 2026-01-10
|
|
11
|
+
|
|
12
|
+
TypeBox is a TypeScript-first schema library. We use it to define the **Gateway
|
|
13
|
+
WebSocket protocol** (handshake, request/response, server events). Those schemas
|
|
14
|
+
drive **runtime validation**, **JSON Schema export**, and **Swift codegen** for
|
|
15
|
+
the macOS app. One source of truth; everything else is generated.
|
|
16
|
+
|
|
17
|
+
If you want the higher-level protocol context, start with
|
|
18
|
+
[Gateway architecture](/concepts/architecture).
|
|
19
|
+
|
|
20
|
+
## Mental model (30 seconds)
|
|
21
|
+
|
|
22
|
+
Every Gateway WS message is one of three frames:
|
|
23
|
+
|
|
24
|
+
- **Request**: `{ type: "req", id, method, params }`
|
|
25
|
+
- **Response**: `{ type: "res", id, ok, payload | error }`
|
|
26
|
+
- **Event**: `{ type: "event", event, payload, seq?, stateVersion? }`
|
|
27
|
+
|
|
28
|
+
The first frame **must** be a `connect` request. After that, clients can call
|
|
29
|
+
methods (e.g. `health`, `send`, `chat.send`) and subscribe to events (e.g.
|
|
30
|
+
`presence`, `tick`, `agent`).
|
|
31
|
+
|
|
32
|
+
Connection flow (minimal):
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
Client Gateway
|
|
36
|
+
|---- req:connect -------->|
|
|
37
|
+
|<---- res:hello-ok --------|
|
|
38
|
+
|<---- event:tick ----------|
|
|
39
|
+
|---- req:health ---------->|
|
|
40
|
+
|<---- res:health ----------|
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Common methods + events:
|
|
44
|
+
|
|
45
|
+
| Category | Examples | Notes |
|
|
46
|
+
| ---------- | ---------------------------------------------------------- | ---------------------------------- |
|
|
47
|
+
| Core | `connect`, `health`, `status` | `connect` must be first |
|
|
48
|
+
| Messaging | `send`, `agent`, `agent.wait`, `system-event`, `logs.tail` | side-effects need `idempotencyKey` |
|
|
49
|
+
| Chat | `chat.history`, `chat.send`, `chat.abort` | WebChat uses these |
|
|
50
|
+
| Sessions | `sessions.list`, `sessions.patch`, `sessions.delete` | session admin |
|
|
51
|
+
| Automation | `wake`, `cron.list`, `cron.run`, `cron.runs` | wake + cron control |
|
|
52
|
+
| Nodes | `node.list`, `node.invoke`, `node.pair.*` | Gateway WS + node actions |
|
|
53
|
+
| Events | `tick`, `presence`, `agent`, `chat`, `health`, `shutdown` | server push |
|
|
54
|
+
|
|
55
|
+
Authoritative advertised **discovery** inventory lives in
|
|
56
|
+
`src/gateway/server-methods-list.ts` (`listGatewayMethods`, `GATEWAY_EVENTS`).
|
|
57
|
+
|
|
58
|
+
## Where the schemas live
|
|
59
|
+
|
|
60
|
+
- Source: `src/gateway/protocol/schema.ts`
|
|
61
|
+
- Runtime validators (AJV): `src/gateway/protocol/index.ts`
|
|
62
|
+
- Advertised feature/discovery registry: `src/gateway/server-methods-list.ts`
|
|
63
|
+
- Server handshake + method dispatch: `src/gateway/server.impl.ts`
|
|
64
|
+
- Node client: `src/gateway/client.ts`
|
|
65
|
+
- Generated JSON Schema: `dist/protocol.schema.json`
|
|
66
|
+
- Generated Swift models: `apps/macos/Sources/DurarProtocol/GatewayModels.swift`
|
|
67
|
+
|
|
68
|
+
## Current pipeline
|
|
69
|
+
|
|
70
|
+
- `pnpm protocol:gen`
|
|
71
|
+
- writes JSON Schema (draft‑07) to `dist/protocol.schema.json`
|
|
72
|
+
- `pnpm protocol:gen:swift`
|
|
73
|
+
- generates Swift gateway models
|
|
74
|
+
- `pnpm protocol:check`
|
|
75
|
+
- runs both generators and verifies the output is committed
|
|
76
|
+
|
|
77
|
+
## How the schemas are used at runtime
|
|
78
|
+
|
|
79
|
+
- **Server side**: every inbound frame is validated with AJV. The handshake only
|
|
80
|
+
accepts a `connect` request whose params match `ConnectParams`.
|
|
81
|
+
- **Client side**: the JS client validates event and response frames before
|
|
82
|
+
using them.
|
|
83
|
+
- **Feature discovery**: the Gateway sends a conservative `features.methods`
|
|
84
|
+
and `features.events` list in `hello-ok` from `listGatewayMethods()` and
|
|
85
|
+
`GATEWAY_EVENTS`.
|
|
86
|
+
- That discovery list is not a generated dump of every callable helper in
|
|
87
|
+
`coreGatewayHandlers`; some helper RPCs are implemented in
|
|
88
|
+
`src/gateway/server-methods/*.ts` without being enumerated in the advertised
|
|
89
|
+
feature list.
|
|
90
|
+
|
|
91
|
+
## Example frames
|
|
92
|
+
|
|
93
|
+
Connect (first message):
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"type": "req",
|
|
98
|
+
"id": "c1",
|
|
99
|
+
"method": "connect",
|
|
100
|
+
"params": {
|
|
101
|
+
"minProtocol": 3,
|
|
102
|
+
"maxProtocol": 3,
|
|
103
|
+
"client": {
|
|
104
|
+
"id": "Durar-macos",
|
|
105
|
+
"displayName": "macos",
|
|
106
|
+
"version": "1.0.0",
|
|
107
|
+
"platform": "macos 15.1",
|
|
108
|
+
"mode": "ui",
|
|
109
|
+
"instanceId": "A1B2"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Hello-ok response:
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"type": "res",
|
|
120
|
+
"id": "c1",
|
|
121
|
+
"ok": true,
|
|
122
|
+
"payload": {
|
|
123
|
+
"type": "hello-ok",
|
|
124
|
+
"protocol": 3,
|
|
125
|
+
"server": { "version": "dev", "connId": "ws-1" },
|
|
126
|
+
"features": { "methods": ["health"], "events": ["tick"] },
|
|
127
|
+
"snapshot": {
|
|
128
|
+
"presence": [],
|
|
129
|
+
"health": {},
|
|
130
|
+
"stateVersion": { "presence": 0, "health": 0 },
|
|
131
|
+
"uptimeMs": 0
|
|
132
|
+
},
|
|
133
|
+
"policy": { "maxPayload": 1048576, "maxBufferedBytes": 1048576, "tickIntervalMs": 30000 }
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Request + response:
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{ "type": "req", "id": "r1", "method": "health" }
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{ "type": "res", "id": "r1", "ok": true, "payload": { "ok": true } }
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Event:
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{ "type": "event", "event": "tick", "payload": { "ts": 1730000000 }, "seq": 12 }
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Minimal client (Node.js)
|
|
155
|
+
|
|
156
|
+
Smallest useful flow: connect + health.
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
import { WebSocket } from "ws";
|
|
160
|
+
|
|
161
|
+
const ws = new WebSocket("ws://127.0.0.1:18789");
|
|
162
|
+
|
|
163
|
+
ws.on("open", () => {
|
|
164
|
+
ws.send(
|
|
165
|
+
JSON.stringify({
|
|
166
|
+
type: "req",
|
|
167
|
+
id: "c1",
|
|
168
|
+
method: "connect",
|
|
169
|
+
params: {
|
|
170
|
+
minProtocol: 3,
|
|
171
|
+
maxProtocol: 3,
|
|
172
|
+
client: {
|
|
173
|
+
id: "cli",
|
|
174
|
+
displayName: "example",
|
|
175
|
+
version: "dev",
|
|
176
|
+
platform: "node",
|
|
177
|
+
mode: "cli",
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
}),
|
|
181
|
+
);
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
ws.on("message", (data) => {
|
|
185
|
+
const msg = JSON.parse(String(data));
|
|
186
|
+
if (msg.type === "res" && msg.id === "c1" && msg.ok) {
|
|
187
|
+
ws.send(JSON.stringify({ type: "req", id: "h1", method: "health" }));
|
|
188
|
+
}
|
|
189
|
+
if (msg.type === "res" && msg.id === "h1") {
|
|
190
|
+
console.log("health:", msg.payload);
|
|
191
|
+
ws.close();
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Worked example: add a method end-to-end
|
|
197
|
+
|
|
198
|
+
Example: add a new `system.echo` request that returns `{ ok: true, text }`.
|
|
199
|
+
|
|
200
|
+
1. **Schema (source of truth)**
|
|
201
|
+
|
|
202
|
+
Add to `src/gateway/protocol/schema.ts`:
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
export const SystemEchoParamsSchema = Type.Object(
|
|
206
|
+
{ text: NonEmptyString },
|
|
207
|
+
{ additionalProperties: false },
|
|
208
|
+
);
|
|
209
|
+
|
|
210
|
+
export const SystemEchoResultSchema = Type.Object(
|
|
211
|
+
{ ok: Type.Boolean(), text: NonEmptyString },
|
|
212
|
+
{ additionalProperties: false },
|
|
213
|
+
);
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Add both to `ProtocolSchemas` and export types:
|
|
217
|
+
|
|
218
|
+
```ts
|
|
219
|
+
SystemEchoParams: SystemEchoParamsSchema,
|
|
220
|
+
SystemEchoResult: SystemEchoResultSchema,
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
```ts
|
|
224
|
+
export type SystemEchoParams = Static<typeof SystemEchoParamsSchema>;
|
|
225
|
+
export type SystemEchoResult = Static<typeof SystemEchoResultSchema>;
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
2. **Validation**
|
|
229
|
+
|
|
230
|
+
In `src/gateway/protocol/index.ts`, export an AJV validator:
|
|
231
|
+
|
|
232
|
+
```ts
|
|
233
|
+
export const validateSystemEchoParams = ajv.compile<SystemEchoParams>(SystemEchoParamsSchema);
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
3. **Server behavior**
|
|
237
|
+
|
|
238
|
+
Add a handler in `src/gateway/server-methods/system.ts`:
|
|
239
|
+
|
|
240
|
+
```ts
|
|
241
|
+
export const systemHandlers: GatewayRequestHandlers = {
|
|
242
|
+
"system.echo": ({ params, respond }) => {
|
|
243
|
+
const text = String(params.text ?? "");
|
|
244
|
+
respond(true, { ok: true, text });
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Register it in `src/gateway/server-methods.ts` (already merges `systemHandlers`),
|
|
250
|
+
then add `"system.echo"` to `listGatewayMethods` input in
|
|
251
|
+
`src/gateway/server-methods-list.ts`.
|
|
252
|
+
|
|
253
|
+
If the method is callable by operator or node clients, also classify it in
|
|
254
|
+
`src/gateway/method-scopes.ts` so scope enforcement and `hello-ok` feature
|
|
255
|
+
advertising stay aligned.
|
|
256
|
+
|
|
257
|
+
4. **Regenerate**
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
pnpm protocol:check
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
5. **Tests + docs**
|
|
264
|
+
|
|
265
|
+
Add a server test in `src/gateway/server.*.test.ts` and note the method in docs.
|
|
266
|
+
|
|
267
|
+
## Swift codegen behavior
|
|
268
|
+
|
|
269
|
+
The Swift generator emits:
|
|
270
|
+
|
|
271
|
+
- `GatewayFrame` enum with `req`, `res`, `event`, and `unknown` cases
|
|
272
|
+
- Strongly typed payload structs/enums
|
|
273
|
+
- `ErrorCode` values and `GATEWAY_PROTOCOL_VERSION`
|
|
274
|
+
|
|
275
|
+
Unknown frame types are preserved as raw payloads for forward compatibility.
|
|
276
|
+
|
|
277
|
+
## Versioning + compatibility
|
|
278
|
+
|
|
279
|
+
- `PROTOCOL_VERSION` lives in `src/gateway/protocol/schema.ts`.
|
|
280
|
+
- Clients send `minProtocol` + `maxProtocol`; the server rejects mismatches.
|
|
281
|
+
- The Swift models keep unknown frame types to avoid breaking older clients.
|
|
282
|
+
|
|
283
|
+
## Schema patterns and conventions
|
|
284
|
+
|
|
285
|
+
- Most objects use `additionalProperties: false` for strict payloads.
|
|
286
|
+
- `NonEmptyString` is the default for IDs and method/event names.
|
|
287
|
+
- The top-level `GatewayFrame` uses a **discriminator** on `type`.
|
|
288
|
+
- Methods with side effects usually require an `idempotencyKey` in params
|
|
289
|
+
(example: `send`, `poll`, `agent`, `chat.send`).
|
|
290
|
+
- `agent` accepts optional `internalEvents` for runtime-generated orchestration context
|
|
291
|
+
(for example subagent/cron task completion handoff); treat this as internal API surface.
|
|
292
|
+
|
|
293
|
+
## Live schema JSON
|
|
294
|
+
|
|
295
|
+
Generated JSON Schema is in the repo at `dist/protocol.schema.json`. The
|
|
296
|
+
published raw file is typically available at:
|
|
297
|
+
|
|
298
|
+
- [https://raw.githubusercontent.com/Durar/Durar/main/dist/protocol.schema.json](https://raw.githubusercontent.com/Durar/Durar/main/dist/protocol.schema.json)
|
|
299
|
+
|
|
300
|
+
## When you change schemas
|
|
301
|
+
|
|
302
|
+
1. Update the TypeBox schemas.
|
|
303
|
+
2. Register the method/event in `src/gateway/server-methods-list.ts`.
|
|
304
|
+
3. Update `src/gateway/method-scopes.ts` when the new RPC needs operator or
|
|
305
|
+
node scope classification.
|
|
306
|
+
4. Run `pnpm protocol:check`.
|
|
307
|
+
5. Commit the regenerated schema + Swift models.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "When Durar shows typing indicators and how to tune them"
|
|
3
|
+
read_when:
|
|
4
|
+
- Changing typing indicator behavior or defaults
|
|
5
|
+
title: "Typing Indicators"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Typing indicators
|
|
9
|
+
|
|
10
|
+
Typing indicators are sent to the chat channel while a run is active. Use
|
|
11
|
+
`agents.defaults.typingMode` to control **when** typing starts and `typingIntervalSeconds`
|
|
12
|
+
to control **how often** it refreshes.
|
|
13
|
+
|
|
14
|
+
## Defaults
|
|
15
|
+
|
|
16
|
+
When `agents.defaults.typingMode` is **unset**, Durar keeps the legacy behavior:
|
|
17
|
+
|
|
18
|
+
- **Direct chats**: typing starts immediately once the model loop begins.
|
|
19
|
+
- **Group chats with a mention**: typing starts immediately.
|
|
20
|
+
- **Group chats without a mention**: typing starts only when message text begins streaming.
|
|
21
|
+
- **Heartbeat runs**: typing is disabled.
|
|
22
|
+
|
|
23
|
+
## Modes
|
|
24
|
+
|
|
25
|
+
Set `agents.defaults.typingMode` to one of:
|
|
26
|
+
|
|
27
|
+
- `never` — no typing indicator, ever.
|
|
28
|
+
- `instant` — start typing **as soon as the model loop begins**, even if the run
|
|
29
|
+
later returns only the silent reply token.
|
|
30
|
+
- `thinking` — start typing on the **first reasoning delta** (requires
|
|
31
|
+
`reasoningLevel: "stream"` for the run).
|
|
32
|
+
- `message` — start typing on the **first non-silent text delta** (ignores
|
|
33
|
+
the `NO_REPLY` silent token).
|
|
34
|
+
|
|
35
|
+
Order of “how early it fires”:
|
|
36
|
+
`never` → `message` → `thinking` → `instant`
|
|
37
|
+
|
|
38
|
+
## Configuration
|
|
39
|
+
|
|
40
|
+
```json5
|
|
41
|
+
{
|
|
42
|
+
agent: {
|
|
43
|
+
typingMode: "thinking",
|
|
44
|
+
typingIntervalSeconds: 6,
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
You can override mode or cadence per session:
|
|
50
|
+
|
|
51
|
+
```json5
|
|
52
|
+
{
|
|
53
|
+
session: {
|
|
54
|
+
typingMode: "message",
|
|
55
|
+
typingIntervalSeconds: 4,
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Notes
|
|
61
|
+
|
|
62
|
+
- `message` mode won’t show typing for silent-only replies when the whole
|
|
63
|
+
payload is the exact silent token (for example `NO_REPLY` / `no_reply`,
|
|
64
|
+
matched case-insensitively).
|
|
65
|
+
- `thinking` only fires if the run streams reasoning (`reasoningLevel: "stream"`).
|
|
66
|
+
If the model doesn’t emit reasoning deltas, typing won’t start.
|
|
67
|
+
- Heartbeats never show typing, regardless of mode.
|
|
68
|
+
- `typingIntervalSeconds` controls the **refresh cadence**, not the start time.
|
|
69
|
+
The default is 6 seconds.
|