@hybridaione/hybridclaw 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +380 -58
- package/CHANGELOG.md +63 -0
- package/README.md +93 -44
- package/config.example.json +85 -4
- package/console/dist/assets/index-D00hMcZD.js +13 -0
- package/console/dist/assets/index-Dou3u0ob.css +1 -0
- package/console/dist/index.html +16 -0
- package/console/package.json +24 -0
- package/container/Dockerfile +1 -0
- package/container/dist/approval-policy.js +46 -4
- package/container/dist/approval-policy.js.map +1 -1
- package/container/dist/browser-tools.js +35 -197
- package/container/dist/browser-tools.js.map +1 -1
- package/container/dist/discord-cdn.js +20 -0
- package/container/dist/discord-cdn.js.map +1 -0
- package/container/dist/index.js +192 -252
- package/container/dist/index.js.map +1 -1
- package/container/dist/model-retry.js +1 -1
- package/container/dist/model-retry.js.map +1 -1
- package/container/dist/native-media.js +273 -0
- package/container/dist/native-media.js.map +1 -0
- package/container/dist/providers/auxiliary.js +105 -0
- package/container/dist/providers/auxiliary.js.map +1 -0
- package/container/dist/providers/hybridai.js +1 -0
- package/container/dist/providers/hybridai.js.map +1 -1
- package/container/dist/providers/local-ollama.js +19 -4
- package/container/dist/providers/local-ollama.js.map +1 -1
- package/container/dist/providers/local-openai-compat.js +31 -7
- package/container/dist/providers/local-openai-compat.js.map +1 -1
- package/container/dist/providers/openai-codex.js +4 -3
- package/container/dist/providers/openai-codex.js.map +1 -1
- package/container/dist/providers/router.js +140 -0
- package/container/dist/providers/router.js.map +1 -0
- package/container/dist/providers/shared.js +45 -8
- package/container/dist/providers/shared.js.map +1 -1
- package/container/dist/providers/thinking-extractor.js +46 -0
- package/container/dist/providers/thinking-extractor.js.map +1 -1
- package/container/dist/ralph.js +63 -0
- package/container/dist/ralph.js.map +1 -0
- package/container/dist/runtime-paths.js +32 -1
- package/container/dist/runtime-paths.js.map +1 -1
- package/container/dist/token-usage.js +4 -0
- package/container/dist/token-usage.js.map +1 -1
- package/container/dist/tools.js +353 -203
- package/container/dist/tools.js.map +1 -1
- package/container/dist/types.js +9 -1
- package/container/dist/types.js.map +1 -1
- package/container/package-lock.json +2 -2
- package/container/package.json +2 -1
- package/container/shared/provider-context.d.ts +13 -0
- package/container/shared/provider-context.js +48 -0
- package/container/shared/response-text.d.ts +1 -0
- package/container/shared/response-text.js +25 -0
- package/container/src/approval-policy.ts +56 -6
- package/container/src/browser-tools.ts +58 -218
- package/container/src/discord-cdn.ts +21 -0
- package/container/src/index.ts +208 -295
- package/container/src/model-retry.ts +1 -1
- package/container/src/native-media.ts +326 -0
- package/container/src/providers/auxiliary.ts +196 -0
- package/container/src/providers/hybridai.ts +1 -0
- package/container/src/providers/local-ollama.ts +18 -4
- package/container/src/providers/local-openai-compat.ts +31 -5
- package/container/src/providers/openai-codex.ts +4 -0
- package/container/src/providers/router.ts +237 -0
- package/container/src/providers/shared.ts +54 -8
- package/container/src/providers/thinking-extractor.ts +54 -0
- package/container/src/ralph.ts +71 -0
- package/container/src/runtime-paths.ts +42 -4
- package/container/src/token-usage.ts +4 -0
- package/container/src/tools.ts +1274 -982
- package/container/src/types.ts +66 -2
- package/dist/agent/agent.d.ts +3 -2
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.js +13 -10
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/conversation.d.ts +1 -0
- package/dist/agent/conversation.d.ts.map +1 -1
- package/dist/agent/conversation.js +2 -1
- package/dist/agent/conversation.js.map +1 -1
- package/dist/agent/executor-types.d.ts +30 -0
- package/dist/agent/executor-types.d.ts.map +1 -0
- package/dist/agent/executor-types.js +2 -0
- package/dist/agent/executor-types.js.map +1 -0
- package/dist/agent/executor.d.ts +2 -24
- package/dist/agent/executor.d.ts.map +1 -1
- package/dist/agent/executor.js +5 -0
- package/dist/agent/executor.js.map +1 -1
- package/dist/agent/prompt-hooks.d.ts +0 -1
- package/dist/agent/prompt-hooks.d.ts.map +1 -1
- package/dist/agent/prompt-hooks.js +18 -8
- package/dist/agent/prompt-hooks.js.map +1 -1
- package/dist/agent/tool-summary.d.ts +7 -0
- package/dist/agent/tool-summary.d.ts.map +1 -1
- package/dist/agent/tool-summary.js +14 -1
- package/dist/agent/tool-summary.js.map +1 -1
- package/dist/agents/agent-registry.d.ts +25 -0
- package/dist/agents/agent-registry.d.ts.map +1 -0
- package/dist/agents/agent-registry.js +394 -0
- package/dist/agents/agent-registry.js.map +1 -0
- package/dist/agents/agent-types.d.ts +23 -0
- package/dist/agents/agent-types.d.ts.map +1 -0
- package/dist/agents/agent-types.js +2 -0
- package/dist/agents/agent-types.js.map +1 -0
- package/dist/audit/audit-events.d.ts.map +1 -1
- package/dist/audit/audit-events.js +11 -4
- package/dist/audit/audit-events.js.map +1 -1
- package/dist/audit/audit-trail.d.ts.map +1 -1
- package/dist/audit/audit-trail.js +2 -47
- package/dist/audit/audit-trail.js.map +1 -1
- package/dist/channels/discord/attachments.d.ts.map +1 -1
- package/dist/channels/discord/attachments.js +171 -221
- package/dist/channels/discord/attachments.js.map +1 -1
- package/dist/channels/discord/discord-cdn-fetch.d.ts +20 -0
- package/dist/channels/discord/discord-cdn-fetch.d.ts.map +1 -0
- package/dist/channels/discord/discord-cdn-fetch.js +219 -0
- package/dist/channels/discord/discord-cdn-fetch.js.map +1 -0
- package/dist/channels/discord/inbound.d.ts +0 -1
- package/dist/channels/discord/inbound.d.ts.map +1 -1
- package/dist/channels/discord/inbound.js +4 -23
- package/dist/channels/discord/inbound.js.map +1 -1
- package/dist/channels/discord/media-cache.d.ts +18 -0
- package/dist/channels/discord/media-cache.d.ts.map +1 -0
- package/dist/channels/discord/media-cache.js +194 -0
- package/dist/channels/discord/media-cache.js.map +1 -0
- package/dist/channels/discord/prompt-adapter.js +3 -3
- package/dist/channels/discord/prompt-adapter.js.map +1 -1
- package/dist/channels/discord/runtime.d.ts +1 -0
- package/dist/channels/discord/runtime.d.ts.map +1 -1
- package/dist/channels/discord/runtime.js +50 -21
- package/dist/channels/discord/runtime.js.map +1 -1
- package/dist/channels/discord/send-files.d.ts +1 -0
- package/dist/channels/discord/send-files.d.ts.map +1 -1
- package/dist/channels/discord/send-files.js +2 -0
- package/dist/channels/discord/send-files.js.map +1 -1
- package/dist/channels/discord/slash-commands.d.ts.map +1 -1
- package/dist/channels/discord/slash-commands.js +33 -572
- package/dist/channels/discord/slash-commands.js.map +1 -1
- package/dist/channels/discord/tool-actions.d.ts +3 -1
- package/dist/channels/discord/tool-actions.d.ts.map +1 -1
- package/dist/channels/discord/tool-actions.js +66 -25
- package/dist/channels/discord/tool-actions.js.map +1 -1
- package/dist/channels/email/allowlist.d.ts +5 -0
- package/dist/channels/email/allowlist.d.ts.map +1 -0
- package/dist/channels/email/allowlist.js +67 -0
- package/dist/channels/email/allowlist.js.map +1 -0
- package/dist/channels/email/connection.d.ts +12 -0
- package/dist/channels/email/connection.d.ts.map +1 -0
- package/dist/channels/email/connection.js +223 -0
- package/dist/channels/email/connection.js.map +1 -0
- package/dist/channels/email/constants.d.ts +2 -0
- package/dist/channels/email/constants.d.ts.map +1 -0
- package/dist/channels/email/constants.js +2 -0
- package/dist/channels/email/constants.js.map +1 -0
- package/dist/channels/email/dedup.d.ts +8 -0
- package/dist/channels/email/dedup.d.ts.map +1 -0
- package/dist/channels/email/dedup.js +37 -0
- package/dist/channels/email/dedup.js.map +1 -0
- package/dist/channels/email/delivery.d.ts +27 -0
- package/dist/channels/email/delivery.d.ts.map +1 -0
- package/dist/channels/email/delivery.js +222 -0
- package/dist/channels/email/delivery.js.map +1 -0
- package/dist/channels/email/inbound.d.ts +19 -0
- package/dist/channels/email/inbound.d.ts.map +1 -0
- package/dist/channels/email/inbound.js +160 -0
- package/dist/channels/email/inbound.js.map +1 -0
- package/dist/channels/email/prompt-adapter.d.ts +3 -0
- package/dist/channels/email/prompt-adapter.d.ts.map +1 -0
- package/dist/channels/email/prompt-adapter.js +25 -0
- package/dist/channels/email/prompt-adapter.js.map +1 -0
- package/dist/channels/email/runtime.d.ts +31 -0
- package/dist/channels/email/runtime.d.ts.map +1 -0
- package/dist/channels/email/runtime.js +217 -0
- package/dist/channels/email/runtime.js.map +1 -0
- package/dist/channels/email/threading.d.ts +16 -0
- package/dist/channels/email/threading.d.ts.map +1 -0
- package/dist/channels/email/threading.js +76 -0
- package/dist/channels/email/threading.js.map +1 -0
- package/dist/channels/message/tool-actions.d.ts +3 -0
- package/dist/channels/message/tool-actions.d.ts.map +1 -0
- package/dist/channels/message/tool-actions.js +297 -0
- package/dist/channels/message/tool-actions.js.map +1 -0
- package/dist/channels/prompt-adapters.d.ts.map +1 -1
- package/dist/channels/prompt-adapters.js +22 -2
- package/dist/channels/prompt-adapters.js.map +1 -1
- package/dist/channels/whatsapp/auth.d.ts +25 -0
- package/dist/channels/whatsapp/auth.d.ts.map +1 -0
- package/dist/channels/whatsapp/auth.js +164 -0
- package/dist/channels/whatsapp/auth.js.map +1 -0
- package/dist/channels/whatsapp/connection.d.ts +13 -0
- package/dist/channels/whatsapp/connection.d.ts.map +1 -0
- package/dist/channels/whatsapp/connection.js +292 -0
- package/dist/channels/whatsapp/connection.js.map +1 -0
- package/dist/channels/whatsapp/debounce.d.ts +28 -0
- package/dist/channels/whatsapp/debounce.d.ts.map +1 -0
- package/dist/channels/whatsapp/debounce.js +69 -0
- package/dist/channels/whatsapp/debounce.js.map +1 -0
- package/dist/channels/whatsapp/delivery.d.ts +24 -0
- package/dist/channels/whatsapp/delivery.d.ts.map +1 -0
- package/dist/channels/whatsapp/delivery.js +98 -0
- package/dist/channels/whatsapp/delivery.js.map +1 -0
- package/dist/channels/whatsapp/inbound.d.ts +39 -0
- package/dist/channels/whatsapp/inbound.d.ts.map +1 -0
- package/dist/channels/whatsapp/inbound.js +284 -0
- package/dist/channels/whatsapp/inbound.js.map +1 -0
- package/dist/channels/whatsapp/markdown.d.ts +2 -0
- package/dist/channels/whatsapp/markdown.d.ts.map +1 -0
- package/dist/channels/whatsapp/markdown.js +39 -0
- package/dist/channels/whatsapp/markdown.js.map +1 -0
- package/dist/channels/whatsapp/message-store.d.ts +9 -0
- package/dist/channels/whatsapp/message-store.d.ts.map +1 -0
- package/dist/channels/whatsapp/message-store.js +212 -0
- package/dist/channels/whatsapp/message-store.js.map +1 -0
- package/dist/channels/whatsapp/mime-utils.d.ts +3 -0
- package/dist/channels/whatsapp/mime-utils.d.ts.map +1 -0
- package/dist/channels/whatsapp/mime-utils.js +33 -0
- package/dist/channels/whatsapp/mime-utils.js.map +1 -0
- package/dist/channels/whatsapp/phone.d.ts +8 -0
- package/dist/channels/whatsapp/phone.d.ts.map +1 -0
- package/dist/channels/whatsapp/phone.js +73 -0
- package/dist/channels/whatsapp/phone.js.map +1 -0
- package/dist/channels/whatsapp/prompt-adapter.d.ts +3 -0
- package/dist/channels/whatsapp/prompt-adapter.d.ts.map +1 -0
- package/dist/channels/whatsapp/prompt-adapter.js +24 -0
- package/dist/channels/whatsapp/prompt-adapter.js.map +1 -0
- package/dist/channels/whatsapp/runtime.d.ts +31 -0
- package/dist/channels/whatsapp/runtime.d.ts.map +1 -0
- package/dist/channels/whatsapp/runtime.js +195 -0
- package/dist/channels/whatsapp/runtime.js.map +1 -0
- package/dist/channels/whatsapp/self-echo-cache.d.ts +14 -0
- package/dist/channels/whatsapp/self-echo-cache.d.ts.map +1 -0
- package/dist/channels/whatsapp/self-echo-cache.js +57 -0
- package/dist/channels/whatsapp/self-echo-cache.js.map +1 -0
- package/dist/channels/whatsapp/typing.d.ts +12 -0
- package/dist/channels/whatsapp/typing.d.ts.map +1 -0
- package/dist/channels/whatsapp/typing.js +74 -0
- package/dist/channels/whatsapp/typing.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1422 -84
- package/dist/cli.js.map +1 -1
- package/dist/command-registry.d.ts +35 -0
- package/dist/command-registry.d.ts.map +1 -0
- package/dist/command-registry.js +855 -0
- package/dist/command-registry.js.map +1 -0
- package/dist/config/cli-flags.d.ts +0 -3
- package/dist/config/cli-flags.d.ts.map +1 -1
- package/dist/config/cli-flags.js +3 -3
- package/dist/config/cli-flags.js.map +1 -1
- package/dist/config/config.d.ts +38 -3
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +75 -6
- package/dist/config/config.js.map +1 -1
- package/dist/config/runtime-config.d.ts +90 -2
- package/dist/config/runtime-config.d.ts.map +1 -1
- package/dist/config/runtime-config.js +479 -4
- package/dist/config/runtime-config.js.map +1 -1
- package/dist/gateway/chat-result.d.ts +8 -0
- package/dist/gateway/chat-result.d.ts.map +1 -0
- package/dist/gateway/chat-result.js +206 -0
- package/dist/gateway/chat-result.js.map +1 -0
- package/dist/gateway/fullauto.d.ts +104 -0
- package/dist/gateway/fullauto.d.ts.map +1 -0
- package/dist/gateway/fullauto.js +1181 -0
- package/dist/gateway/fullauto.js.map +1 -0
- package/dist/gateway/gateway-agent-cards.d.ts +21 -0
- package/dist/gateway/gateway-agent-cards.d.ts.map +1 -0
- package/dist/gateway/gateway-agent-cards.js +334 -0
- package/dist/gateway/gateway-agent-cards.js.map +1 -0
- package/dist/gateway/gateway-error-utils.d.ts +3 -0
- package/dist/gateway/gateway-error-utils.d.ts.map +1 -0
- package/dist/gateway/gateway-error-utils.js +38 -0
- package/dist/gateway/gateway-error-utils.js.map +1 -0
- package/dist/gateway/gateway-formatting.d.ts +4 -0
- package/dist/gateway/gateway-formatting.d.ts.map +1 -0
- package/dist/gateway/gateway-formatting.js +30 -0
- package/dist/gateway/gateway-formatting.js.map +1 -0
- package/dist/gateway/gateway-request-runtime.d.ts +11 -0
- package/dist/gateway/gateway-request-runtime.d.ts.map +1 -0
- package/dist/gateway/gateway-request-runtime.js +72 -0
- package/dist/gateway/gateway-request-runtime.js.map +1 -0
- package/dist/gateway/gateway-service.d.ts +91 -7
- package/dist/gateway/gateway-service.d.ts.map +1 -1
- package/dist/gateway/gateway-service.js +1486 -296
- package/dist/gateway/gateway-service.js.map +1 -1
- package/dist/gateway/gateway-session-status.d.ts +14 -0
- package/dist/gateway/gateway-session-status.d.ts.map +1 -0
- package/dist/gateway/gateway-session-status.js +95 -0
- package/dist/gateway/gateway-session-status.js.map +1 -0
- package/dist/gateway/gateway-time.d.ts +5 -0
- package/dist/gateway/gateway-time.d.ts.map +1 -0
- package/dist/gateway/gateway-time.js +38 -0
- package/dist/gateway/gateway-time.js.map +1 -0
- package/dist/gateway/gateway-types.d.ts +304 -2
- package/dist/gateway/gateway-types.d.ts.map +1 -1
- package/dist/gateway/gateway-types.js.map +1 -1
- package/dist/gateway/gateway-utils.d.ts +5 -0
- package/dist/gateway/gateway-utils.d.ts.map +1 -0
- package/dist/gateway/gateway-utils.js +28 -0
- package/dist/gateway/gateway-utils.js.map +1 -0
- package/dist/gateway/gateway.js +334 -31
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/health.d.ts.map +1 -1
- package/dist/gateway/health.js +388 -100
- package/dist/gateway/health.js.map +1 -1
- package/dist/gateway/proactive-delivery.d.ts +4 -1
- package/dist/gateway/proactive-delivery.d.ts.map +1 -1
- package/dist/gateway/proactive-delivery.js +24 -1
- package/dist/gateway/proactive-delivery.js.map +1 -1
- package/dist/gateway/show-mode.d.ts +11 -0
- package/dist/gateway/show-mode.d.ts.map +1 -0
- package/dist/gateway/show-mode.js +48 -0
- package/dist/gateway/show-mode.js.map +1 -0
- package/dist/infra/container-runner.d.ts +6 -18
- package/dist/infra/container-runner.d.ts.map +1 -1
- package/dist/infra/container-runner.js +49 -7
- package/dist/infra/container-runner.js.map +1 -1
- package/dist/infra/container-setup.d.ts.map +1 -1
- package/dist/infra/container-setup.js +1 -19
- package/dist/infra/container-setup.js.map +1 -1
- package/dist/infra/host-runner.d.ts +6 -33
- package/dist/infra/host-runner.d.ts.map +1 -1
- package/dist/infra/host-runner.js +47 -6
- package/dist/infra/host-runner.js.map +1 -1
- package/dist/infra/ipc.d.ts +1 -1
- package/dist/infra/ipc.d.ts.map +1 -1
- package/dist/infra/ipc.js +24 -2
- package/dist/infra/ipc.js.map +1 -1
- package/dist/infra/stream-debug.d.ts +1 -0
- package/dist/infra/stream-debug.d.ts.map +1 -1
- package/dist/infra/stream-debug.js +4 -0
- package/dist/infra/stream-debug.js.map +1 -1
- package/dist/infra/worker-signature.d.ts +16 -0
- package/dist/infra/worker-signature.d.ts.map +1 -1
- package/dist/infra/worker-signature.js +32 -2
- package/dist/infra/worker-signature.js.map +1 -1
- package/dist/logger.d.ts +2 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +9 -1
- package/dist/logger.js.map +1 -1
- package/dist/media/audio-transcription-backends.d.ts +28 -0
- package/dist/media/audio-transcription-backends.d.ts.map +1 -0
- package/dist/media/audio-transcription-backends.js +764 -0
- package/dist/media/audio-transcription-backends.js.map +1 -0
- package/dist/media/audio-transcription.d.ts +19 -0
- package/dist/media/audio-transcription.d.ts.map +1 -0
- package/dist/media/audio-transcription.js +140 -0
- package/dist/media/audio-transcription.js.map +1 -0
- package/dist/media/mime-utils.d.ts +3 -0
- package/dist/media/mime-utils.d.ts.map +1 -0
- package/dist/media/mime-utils.js +8 -0
- package/dist/media/mime-utils.js.map +1 -0
- package/dist/media/path-utils.d.ts +2 -0
- package/dist/media/path-utils.d.ts.map +1 -0
- package/dist/media/path-utils.js +12 -0
- package/dist/media/path-utils.js.map +1 -0
- package/dist/media/pdf-context.d.ts +1 -0
- package/dist/media/pdf-context.d.ts.map +1 -1
- package/dist/media/pdf-context.js +12 -2
- package/dist/media/pdf-context.js.map +1 -1
- package/dist/memory/compaction.d.ts +0 -1
- package/dist/memory/compaction.d.ts.map +1 -1
- package/dist/memory/compaction.js +1 -1
- package/dist/memory/compaction.js.map +1 -1
- package/dist/memory/db.d.ts +39 -2
- package/dist/memory/db.d.ts.map +1 -1
- package/dist/memory/db.js +550 -4
- package/dist/memory/db.js.map +1 -1
- package/dist/memory/memory-service.d.ts +2 -2
- package/dist/memory/memory-service.d.ts.map +1 -1
- package/dist/memory/memory-service.js +22 -15
- package/dist/memory/memory-service.js.map +1 -1
- package/dist/model-selection.d.ts +5 -0
- package/dist/model-selection.d.ts.map +1 -1
- package/dist/model-selection.js +39 -0
- package/dist/model-selection.js.map +1 -1
- package/dist/onboarding.d.ts +1 -2
- package/dist/onboarding.d.ts.map +1 -1
- package/dist/onboarding.js +74 -12
- package/dist/onboarding.js.map +1 -1
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +0 -5
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/auxiliary.d.ts +49 -0
- package/dist/providers/auxiliary.d.ts.map +1 -0
- package/dist/providers/auxiliary.js +562 -0
- package/dist/providers/auxiliary.js.map +1 -0
- package/dist/providers/factory.d.ts +0 -2
- package/dist/providers/factory.d.ts.map +1 -1
- package/dist/providers/factory.js +6 -8
- package/dist/providers/factory.js.map +1 -1
- package/dist/providers/hybridai.d.ts.map +1 -1
- package/dist/providers/hybridai.js +3 -6
- package/dist/providers/hybridai.js.map +1 -1
- package/dist/providers/local-discovery.d.ts +13 -7
- package/dist/providers/local-discovery.d.ts.map +1 -1
- package/dist/providers/local-discovery.js +148 -128
- package/dist/providers/local-discovery.js.map +1 -1
- package/dist/providers/local-health.d.ts +0 -1
- package/dist/providers/local-health.d.ts.map +1 -1
- package/dist/providers/local-health.js +1 -12
- package/dist/providers/local-health.js.map +1 -1
- package/dist/providers/local-ollama.d.ts.map +1 -1
- package/dist/providers/local-ollama.js +3 -5
- package/dist/providers/local-ollama.js.map +1 -1
- package/dist/providers/local-openai-compat.d.ts.map +1 -1
- package/dist/providers/local-openai-compat.js +3 -2
- package/dist/providers/local-openai-compat.js.map +1 -1
- package/dist/providers/model-catalog.d.ts +6 -1
- package/dist/providers/model-catalog.d.ts.map +1 -1
- package/dist/providers/model-catalog.js +99 -8
- package/dist/providers/model-catalog.js.map +1 -1
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +3 -6
- package/dist/providers/openai.js.map +1 -1
- package/dist/providers/openrouter-discovery.d.ts +16 -0
- package/dist/providers/openrouter-discovery.d.ts.map +1 -0
- package/dist/providers/openrouter-discovery.js +166 -0
- package/dist/providers/openrouter-discovery.js.map +1 -0
- package/dist/providers/openrouter-utils.d.ts +7 -0
- package/dist/providers/openrouter-utils.d.ts.map +1 -0
- package/dist/providers/openrouter-utils.js +14 -0
- package/dist/providers/openrouter-utils.js.map +1 -0
- package/dist/providers/openrouter.d.ts +4 -0
- package/dist/providers/openrouter.d.ts.map +1 -0
- package/dist/providers/openrouter.js +34 -0
- package/dist/providers/openrouter.js.map +1 -0
- package/dist/providers/task-routing.d.ts +20 -0
- package/dist/providers/task-routing.d.ts.map +1 -0
- package/dist/providers/task-routing.js +203 -0
- package/dist/providers/task-routing.js.map +1 -0
- package/dist/providers/types.d.ts +3 -3
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/providers/utils.d.ts +3 -0
- package/dist/providers/utils.d.ts.map +1 -0
- package/dist/providers/utils.js +9 -0
- package/dist/providers/utils.js.map +1 -0
- package/dist/scheduler/heartbeat.d.ts.map +1 -1
- package/dist/scheduler/heartbeat.js +35 -17
- package/dist/scheduler/heartbeat.js.map +1 -1
- package/dist/scheduler/scheduled-task-runner.d.ts.map +1 -1
- package/dist/scheduler/scheduled-task-runner.js +10 -1
- package/dist/scheduler/scheduled-task-runner.js.map +1 -1
- package/dist/scheduler/scheduler.d.ts +2 -0
- package/dist/scheduler/scheduler.d.ts.map +1 -1
- package/dist/scheduler/scheduler.js +5 -0
- package/dist/scheduler/scheduler.js.map +1 -1
- package/dist/security/media-paths.d.ts +19 -0
- package/dist/security/media-paths.d.ts.map +1 -0
- package/dist/security/media-paths.js +125 -0
- package/dist/security/media-paths.js.map +1 -0
- package/dist/security/mount-config.d.ts +0 -4
- package/dist/security/mount-config.d.ts.map +1 -1
- package/dist/security/mount-config.js +1 -1
- package/dist/security/mount-config.js.map +1 -1
- package/dist/security/redact.d.ts +10 -0
- package/dist/security/redact.d.ts.map +1 -0
- package/dist/security/redact.js +131 -0
- package/dist/security/redact.js.map +1 -0
- package/dist/security/runtime-secrets.d.ts +1 -1
- package/dist/security/runtime-secrets.d.ts.map +1 -1
- package/dist/security/runtime-secrets.js +7 -0
- package/dist/security/runtime-secrets.js.map +1 -1
- package/dist/session/session-maintenance.d.ts.map +1 -1
- package/dist/session/session-maintenance.js +50 -11
- package/dist/session/session-maintenance.js.map +1 -1
- package/dist/session/token-efficiency.d.ts.map +1 -1
- package/dist/session/token-efficiency.js +4 -0
- package/dist/session/token-efficiency.js.map +1 -1
- package/dist/skills/skills.d.ts +1 -0
- package/dist/skills/skills.d.ts.map +1 -1
- package/dist/skills/skills.js +9 -1
- package/dist/skills/skills.js.map +1 -1
- package/dist/tui-fullauto.d.ts +15 -0
- package/dist/tui-fullauto.d.ts.map +1 -0
- package/dist/tui-fullauto.js +56 -0
- package/dist/tui-fullauto.js.map +1 -0
- package/dist/tui-proactive.d.ts +3 -0
- package/dist/tui-proactive.d.ts.map +1 -0
- package/dist/tui-proactive.js +9 -0
- package/dist/tui-proactive.js.map +1 -0
- package/dist/tui-slash-command.d.ts +10 -0
- package/dist/tui-slash-command.d.ts.map +1 -1
- package/dist/tui-slash-command.js +25 -1
- package/dist/tui-slash-command.js.map +1 -1
- package/dist/tui-thinking.d.ts +14 -0
- package/dist/tui-thinking.d.ts.map +1 -0
- package/dist/tui-thinking.js +140 -0
- package/dist/tui-thinking.js.map +1 -0
- package/dist/tui.js +603 -168
- package/dist/tui.js.map +1 -1
- package/dist/types.d.ts +53 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/sleep.d.ts +2 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +7 -0
- package/dist/utils/sleep.js.map +1 -0
- package/docs/agents.html +2177 -0
- package/docs/chat.html +194 -2
- package/docs/development/README.md +2 -0
- package/docs/development/runtime.md +34 -6
- package/docs/development/voice-tts.md +123 -0
- package/docs/index.html +14 -14
- package/package.json +23 -5
- package/skills/channel-catchup/SKILL.md +140 -0
- package/container/dist/model-client.js +0 -41
- package/container/dist/model-client.js.map +0 -1
- package/container/src/model-client.ts +0 -63
package/AGENTS.md
CHANGED
|
@@ -1,85 +1,298 @@
|
|
|
1
|
-
# AGENTS.md
|
|
2
|
-
|
|
3
|
-
## Scope
|
|
1
|
+
# AGENTS.md — HybridClaw Engineering Protocol
|
|
4
2
|
|
|
5
3
|
This file is the canonical repo-level instruction set for coding agents working
|
|
6
|
-
in HybridClaw.
|
|
4
|
+
in HybridClaw. Read it before any code change.
|
|
5
|
+
|
|
6
|
+
## Scope
|
|
7
7
|
|
|
8
8
|
- Follow this file first.
|
|
9
9
|
- If a deeper directory contains its own `AGENTS.md`, that file overrides this
|
|
10
10
|
one for its subtree.
|
|
11
11
|
- Keep `CLAUDE.md` aligned with this file. `CLAUDE.md` should only carry
|
|
12
12
|
tool-specific deltas.
|
|
13
|
+
- `templates/*.md` are product runtime workspace bootstrap files, not repo
|
|
14
|
+
contributor onboarding docs.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 1) Project Snapshot
|
|
19
|
+
|
|
20
|
+
HybridClaw is a personal AI assistant bot for Discord, powered by HybridAI.
|
|
21
|
+
Enterprise-grade Node.js 22 application with gateway service, TUI client, and
|
|
22
|
+
Docker-sandboxed container runtime.
|
|
23
|
+
|
|
24
|
+
**Version:** 0.7.1  |  **Package:** `@hybridaione/hybridclaw`
|
|
25
|
+
 |  **License:** see `LICENSE`
|
|
26
|
+
|
|
27
|
+
Architecture: gateway (core runtime, SQLite persistence, REST API, Discord
|
|
28
|
+
integration) → container (Docker-sandboxed tool execution via file-based IPC) →
|
|
29
|
+
TUI (thin HTTP client). Agent workspaces are bootstrapped from `templates/` and
|
|
30
|
+
seeded with identity, memory, and context files managed by `src/workspace.ts`.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 2) Project Map
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
src/
|
|
38
|
+
cli.ts CLI entry point and command dispatch
|
|
39
|
+
types.ts Core type definitions (ChatMessage, ContainerInput, ToolExecution, etc.)
|
|
40
|
+
workspace.ts Workspace bootstrap (SOUL.md, IDENTITY.md, USER.md, etc.)
|
|
41
|
+
logger.ts Structured logging (pino)
|
|
42
|
+
tui.ts Terminal UI
|
|
43
|
+
onboarding.ts Interactive onboarding
|
|
44
|
+
model-selection.ts Model selection logic
|
|
45
|
+
agent/ Agent execution: conversation loop, tool executor, prompt hooks, delegation
|
|
46
|
+
audit/ Append-only audit trail, approval tracking, hash-chain integrity
|
|
47
|
+
auth/ HybridAI and OpenAI Codex authentication flows
|
|
48
|
+
channels/discord/ Discord integration and delivery logic
|
|
49
|
+
config/ CLI flag parsing, runtime config management
|
|
50
|
+
gateway/ Core gateway service: HTTP APIs, health, session mgmt, approvals
|
|
51
|
+
infra/ Container setup, IPC (file-based), worker signatures, runners
|
|
52
|
+
memory/ SQLite database, semantic memory, compaction, consolidation, chunking
|
|
53
|
+
providers/ Model providers (HybridAI, Anthropic, OpenAI, Ollama, LM Studio, vLLM)
|
|
54
|
+
scheduler/ Scheduled task execution and cron management
|
|
55
|
+
security/ Mount allowlists, approval policies, secret redaction, instruction audit
|
|
56
|
+
session/ Session transcripts, token tracking, compaction, export
|
|
57
|
+
skills/ Skill resolution, installation, trust-aware guard
|
|
58
|
+
utils/ Shared utilities
|
|
59
|
+
media/ Media handling and context management
|
|
60
|
+
|
|
61
|
+
container/ Sandboxed runtime (separate npm package)
|
|
62
|
+
src/ Container agent runtime, tool execution, provider adapters, MCP client
|
|
63
|
+
Dockerfile Container build definition
|
|
64
|
+
package.json Container-specific deps (Playwright, agent-browser, PDF, MCP SDK)
|
|
65
|
+
|
|
66
|
+
skills/ Bundled SKILL.md skills (pdf, docx, xlsx, pptx, office, personality, etc.)
|
|
67
|
+
templates/ Runtime workspace bootstrap files seeded into agent workspaces
|
|
68
|
+
tests/ Vitest suites: unit, integration, e2e, live
|
|
69
|
+
docs/ Static site assets, development reference docs
|
|
70
|
+
console/ Web console workspace package
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Key Data Flows
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
User message → Gateway (HTTP/Discord) → ContainerInput (JSON)
|
|
77
|
+
→ Container spawns (Docker sandbox, file-based IPC)
|
|
78
|
+
→ Agent loop (tool calls, approvals, MCP)
|
|
79
|
+
→ ContainerOutput (JSON) → Gateway → User
|
|
80
|
+
→ Session persisted (SQLite), audit logged (wire.jsonl, hash-chained)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Extension Points
|
|
84
|
+
|
|
85
|
+
| Extension | Interface / Registration | Playbook |
|
|
86
|
+
|---------------|--------------------------------------------------------------|----------|
|
|
87
|
+
| Skill | `skills/<name>/SKILL.md` frontmatter | §7.1 |
|
|
88
|
+
| Provider | `src/providers/<name>.ts` + factory | §7.2 |
|
|
89
|
+
| MCP Server | `~/.hybridclaw/config.json` (`mcpServers.*`) → tool namespace | §7.3 |
|
|
90
|
+
| Approval rule | `.hybridclaw/policy.yaml` | §7.4 |
|
|
91
|
+
| Template | `templates/<name>.md` + `src/workspace.ts` | §7.5 |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 3) Engineering Principles
|
|
96
|
+
|
|
97
|
+
These are implementation constraints, not suggestions.
|
|
98
|
+
|
|
99
|
+
### 3.1 KISS
|
|
100
|
+
|
|
101
|
+
- Prefer straightforward control flow over abstraction.
|
|
102
|
+
- Keep error paths obvious and localized.
|
|
103
|
+
- Three similar lines of code is better than a premature helper.
|
|
104
|
+
|
|
105
|
+
### 3.2 YAGNI
|
|
106
|
+
|
|
107
|
+
- Do not add config keys, interfaces, or feature flags without a concrete caller.
|
|
108
|
+
- Do not add error handling for scenarios that cannot happen.
|
|
109
|
+
- Do not design for hypothetical future requirements.
|
|
110
|
+
|
|
111
|
+
### 3.3 DRY — Rule of Three
|
|
112
|
+
|
|
113
|
+
- Duplicate small local logic when it preserves clarity.
|
|
114
|
+
- Extract shared helpers only after three repeated, stable patterns.
|
|
115
|
+
- When extracting, preserve module boundaries.
|
|
116
|
+
|
|
117
|
+
### 3.4 Fail Fast
|
|
118
|
+
|
|
119
|
+
- Prefer explicit errors for unsupported or unsafe states.
|
|
120
|
+
- Never silently broaden permissions or capabilities.
|
|
121
|
+
- Validate at system boundaries (user input, external APIs, IPC); trust internal
|
|
122
|
+
code.
|
|
123
|
+
|
|
124
|
+
### 3.5 Secure by Default
|
|
125
|
+
|
|
126
|
+
- LLM output is untrusted by default.
|
|
127
|
+
- Defaults are deny-by-default (mount allowlists, approval tiers, sandbox).
|
|
128
|
+
- Never log secrets, raw tokens, or sensitive payloads.
|
|
129
|
+
- Read `SECURITY.md` and `TRUST_MODEL.md` before touching security surfaces.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## 4) Risk Tiers by Path
|
|
134
|
+
|
|
135
|
+
Classify changes by blast radius. When uncertain, classify higher.
|
|
136
|
+
|
|
137
|
+
| Tier | Paths |
|
|
138
|
+
|--------|-----------------------------------------------------------------------------|
|
|
139
|
+
| High | `src/security/`, `src/gateway/`, `src/infra/`, `src/audit/`, `container/src/approval-policy.ts`, `container/src/extensions.ts`, `.hybridclaw/policy.yaml` |
|
|
140
|
+
| Medium | `src/agent/`, `src/providers/`, `src/session/`, `src/memory/`, `src/skills/`, `container/src/`, `templates/` |
|
|
141
|
+
| Low | `docs/`, `skills/` (bundled SKILL.md), test additions, comments, formatting |
|
|
142
|
+
|
|
143
|
+
**High-risk changes** must include threat/risk notes and boundary/failure-mode
|
|
144
|
+
tests. **Medium-risk changes** need targeted test coverage. **Low-risk changes**
|
|
145
|
+
should verify no broken references.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 5) Setup and Commands
|
|
150
|
+
|
|
151
|
+
### Prerequisites
|
|
152
|
+
|
|
153
|
+
- Node.js 22 (matches CI and `engines` field)
|
|
154
|
+
- npm
|
|
155
|
+
- Docker when working on container-mode behavior or image builds
|
|
13
156
|
|
|
14
|
-
|
|
157
|
+
### Common Commands
|
|
15
158
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
159
|
+
```bash
|
|
160
|
+
npm install # install deps + Husky hooks
|
|
161
|
+
npm run setup # install container/ deps
|
|
162
|
+
npm run build # compile root + container TypeScript
|
|
163
|
+
npm run typecheck # tsc --noEmit
|
|
164
|
+
npm run lint # tsc --noEmit with unused detection
|
|
165
|
+
npm run check # biome check src
|
|
166
|
+
npm run format # biome check --write src
|
|
167
|
+
npm run test:unit # vitest unit suite
|
|
168
|
+
npm run test:integration # integration tests
|
|
169
|
+
npm run test:e2e # end-to-end tests
|
|
170
|
+
npm run test:live # live tests (requires credentials)
|
|
171
|
+
npm run release:check # verify release readiness
|
|
172
|
+
npm --prefix container run lint # container lint
|
|
173
|
+
npm --prefix container run release:check # container release check
|
|
174
|
+
npm run build:container # build Docker image
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Dev Mode
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
npm run dev # tsx src/cli.ts gateway (hot reload)
|
|
181
|
+
npm run tui # tsx src/cli.ts tui
|
|
182
|
+
```
|
|
25
183
|
|
|
26
|
-
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## 6) Working Rules
|
|
187
|
+
|
|
188
|
+
### Code Changes
|
|
27
189
|
|
|
28
190
|
- Keep changes focused. Prefer targeted fixes over broad refactors unless the
|
|
29
191
|
task requires wider movement.
|
|
30
|
-
- Match the existing TypeScript + ESM patterns
|
|
192
|
+
- Match the existing TypeScript + ESM patterns in the touched area.
|
|
31
193
|
- Update tests and docs when behavior, commands, or repo workflows change.
|
|
32
|
-
- Treat existing uncommitted changes as user work unless you created them.
|
|
33
194
|
- Do not rename or relocate files in `templates/` without updating
|
|
34
195
|
`src/workspace.ts` and the workspace bootstrap tests.
|
|
196
|
+
- Do not mix container and gateway changes in one commit unless they are
|
|
197
|
+
tightly coupled.
|
|
198
|
+
- **README tone:** Describe the current state of the product, not changes
|
|
199
|
+
relative to a prior version. Avoid "now", "no longer", "deprecated … for
|
|
200
|
+
now", "recently added". The changelog is the place for transition language.
|
|
35
201
|
|
|
36
|
-
|
|
202
|
+
### Coding Style
|
|
37
203
|
|
|
38
|
-
|
|
204
|
+
- **Language:** TypeScript (strict mode, ES2022 target, NodeNext modules, ESM).
|
|
205
|
+
- **Formatting:** Biome is authoritative. Run `npm run format` before
|
|
206
|
+
committing. The Husky pre-commit hook runs `npx biome check --write --staged`.
|
|
207
|
+
- **Single quotes** for strings (configured in `biome.json`).
|
|
208
|
+
- **No `any`** without strong justification. No `@ts-nocheck`.
|
|
209
|
+
- **File size:** aim for ~500 LOC; split when it improves clarity or
|
|
210
|
+
testability. `src/skills/skills-guard.ts` and `src/skills/skills.ts` are
|
|
211
|
+
current large exceptions — do not grow them further without splitting.
|
|
212
|
+
- **Comments:** brief comments for tricky or non-obvious logic only. Do not add
|
|
213
|
+
comments, docstrings, or type annotations to code you did not change.
|
|
214
|
+
- **Imports:** let Biome organize imports. Do not mix dynamic
|
|
215
|
+
`await import()` and static `import` for the same module in production paths.
|
|
216
|
+
- **Dependencies:** root `package.json` is for gateway/CLI deps. Container-only
|
|
217
|
+
deps go in `container/package.json`. Never add container deps to root.
|
|
39
218
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
219
|
+
### Git Discipline
|
|
220
|
+
|
|
221
|
+
- Treat existing uncommitted changes as user work unless you created them.
|
|
222
|
+
- Conventional Commits preferred: `feat:`, `fix:`, `test:`, `refactor:`,
|
|
223
|
+
`chore:`, `docs:`.
|
|
224
|
+
- Group related changes; avoid bundling unrelated refactors.
|
|
225
|
+
- Never commit real API keys, tokens, credentials, or personal data. Use
|
|
226
|
+
neutral placeholders in tests: `"test-key"`, `"example.com"`, `"user_a"`.
|
|
43
227
|
|
|
44
|
-
|
|
228
|
+
---
|
|
45
229
|
|
|
46
|
-
|
|
47
|
-
npm install
|
|
48
|
-
npm run setup
|
|
49
|
-
npm run build
|
|
50
|
-
npm run typecheck
|
|
51
|
-
npm run lint
|
|
52
|
-
npm run check
|
|
53
|
-
npm run test:unit
|
|
54
|
-
npm run test:integration
|
|
55
|
-
npm run test:e2e
|
|
56
|
-
npm run test:live
|
|
57
|
-
npm run release:check
|
|
58
|
-
npm --prefix container run lint
|
|
59
|
-
npm --prefix container run release:check
|
|
60
|
-
```
|
|
230
|
+
## 7) Change Playbooks
|
|
61
231
|
|
|
62
|
-
|
|
232
|
+
### 7.1 Adding a Skill
|
|
63
233
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
234
|
+
1. Create `skills/<name>/SKILL.md` with required frontmatter:
|
|
235
|
+
```yaml
|
|
236
|
+
---
|
|
237
|
+
name: my-skill
|
|
238
|
+
description: One-line description
|
|
239
|
+
user-invocable: true # optional, enables /<name> invocation
|
|
240
|
+
---
|
|
241
|
+
```
|
|
242
|
+
2. Add markdown instructions and working rules in the body.
|
|
243
|
+
3. If the skill needs supporting scripts, place them alongside `SKILL.md`.
|
|
244
|
+
4. Bundled script paths are mirrored into `/workspace/skills/<name>` at runtime.
|
|
245
|
+
5. Test: `hybridclaw skill list` should show the new skill.
|
|
73
246
|
|
|
74
|
-
|
|
247
|
+
Skill resolution order (first match wins):
|
|
248
|
+
1. `config.skills.extraDirs[]`
|
|
249
|
+
2. Bundled: `skills/<name>`
|
|
250
|
+
3. `$CODEX_HOME/skills`
|
|
251
|
+
4. `~/.codex/skills`, `~/.claude/skills`, `~/.agents/skills`
|
|
252
|
+
5. Project/workspace: `./.agents/skills`, `./skills`
|
|
75
253
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
254
|
+
### 7.2 Adding a Provider
|
|
255
|
+
|
|
256
|
+
1. Create `src/providers/<name>.ts` implementing the provider interface.
|
|
257
|
+
2. Register in the provider factory (`src/providers/`).
|
|
258
|
+
3. Add config section in `src/config/` if new credentials or endpoints needed.
|
|
259
|
+
4. Add tests for factory wiring, error paths, and config parsing.
|
|
260
|
+
5. Update `docs/` if the provider is user-facing.
|
|
261
|
+
|
|
262
|
+
### 7.3 Adding an MCP Server
|
|
81
263
|
|
|
82
|
-
|
|
264
|
+
1. Add the server config to `~/.hybridclaw/config.json` under `mcpServers`:
|
|
265
|
+
```json
|
|
266
|
+
{
|
|
267
|
+
"mcpServers": {
|
|
268
|
+
"<server-name>": {
|
|
269
|
+
"command": "...",
|
|
270
|
+
"args": ["..."],
|
|
271
|
+
"transport": "stdio"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
2. Tools are auto-discovered at startup and merged into the tool namespace.
|
|
277
|
+
3. Test with `hybridclaw` running in dev mode.
|
|
278
|
+
|
|
279
|
+
### 7.4 Modifying Approval Policy
|
|
280
|
+
|
|
281
|
+
1. Edit `.hybridclaw/policy.yaml`.
|
|
282
|
+
2. Approval tiers: green (silent) → yellow (narrated) → red (explicit approval).
|
|
283
|
+
3. `pinned_red` patterns are never auto-promoted.
|
|
284
|
+
4. Test approval flows with integration tests that exercise the boundary.
|
|
285
|
+
|
|
286
|
+
### 7.5 Modifying Templates
|
|
287
|
+
|
|
288
|
+
1. Edit the file in `templates/`.
|
|
289
|
+
2. **Always** update `src/workspace.ts` if you add, remove, or rename a
|
|
290
|
+
template file.
|
|
291
|
+
3. Run workspace bootstrap tests to verify.
|
|
292
|
+
4. Remember: templates are seeded into agent workspaces at runtime — changes
|
|
293
|
+
only apply to new sessions or after workspace reset.
|
|
294
|
+
|
|
295
|
+
### 7.6 Bump Release
|
|
83
296
|
|
|
84
297
|
When the user says "bump release":
|
|
85
298
|
|
|
@@ -93,8 +306,117 @@ When the user says "bump release":
|
|
|
93
306
|
3. Move `CHANGELOG.md` release notes from `Unreleased` to the new version
|
|
94
307
|
heading (or create one).
|
|
95
308
|
4. Update `README.md` "latest tag" link/text if present.
|
|
96
|
-
5. Commit with
|
|
309
|
+
5. Commit with `chore: release vX.Y.Z`.
|
|
97
310
|
6. Create an annotated git tag `vX.Y.Z`.
|
|
98
311
|
7. Push the commit and tag.
|
|
99
|
-
8.
|
|
100
|
-
|
|
312
|
+
8. Create or publish a GitHub Release entry for the tag.
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## 8) Testing Expectations
|
|
317
|
+
|
|
318
|
+
### What to Run
|
|
319
|
+
|
|
320
|
+
| Change scope | Required checks |
|
|
321
|
+
|---------------------|-------------------------------------------------------------|
|
|
322
|
+
| Docs only | Verify links, commands, examples |
|
|
323
|
+
| `src/` changes | `npm run typecheck`, `npm run lint`, targeted Vitest suites |
|
|
324
|
+
| `container/` changes| `npm --prefix container run lint`, `npm run build`, IPC boundary tests |
|
|
325
|
+
| `skills/` changes | `hybridclaw skill list`, targeted skill tests |
|
|
326
|
+
| Release/packaging | Both `release:check` scripts, verify versioned docs |
|
|
327
|
+
| Security surfaces | Include boundary and failure-mode tests |
|
|
328
|
+
|
|
329
|
+
### Conventions
|
|
330
|
+
|
|
331
|
+
- Test files: `tests/*.test.ts`, `*.integration.test.ts`, `*.e2e.test.ts`,
|
|
332
|
+
`*.live.test.ts`.
|
|
333
|
+
- Live tests require credentials. Skip them unless your change needs them,
|
|
334
|
+
and state that explicitly in your handoff.
|
|
335
|
+
- If you skip a relevant check, state what you skipped and why.
|
|
336
|
+
- Never hardcode real credentials in tests. Use env vars or test fixtures.
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## 9) Anti-Patterns (Do Not)
|
|
341
|
+
|
|
342
|
+
- Do not rename or relocate `templates/` files without updating
|
|
343
|
+
`src/workspace.ts`.
|
|
344
|
+
- Do not add container-only deps to root `package.json`.
|
|
345
|
+
- Do not grow `src/skills/skills-guard.ts` or `src/skills/skills.ts` further
|
|
346
|
+
without splitting.
|
|
347
|
+
- Do not use `@ts-nocheck` or disable lint rules without strong justification.
|
|
348
|
+
- Do not silently weaken security policy, approval tiers, or mount allowlists.
|
|
349
|
+
- Do not log secrets, tokens, or sensitive payloads — even at debug level.
|
|
350
|
+
- Do not modify unrelated modules "while here".
|
|
351
|
+
- Do not include personal identity, real phone numbers, or live config values
|
|
352
|
+
in tests, examples, docs, or commits.
|
|
353
|
+
- Do not edit `node_modules/` or vendored files.
|
|
354
|
+
- Do not break prompt caching: do not alter past context, change toolsets, or
|
|
355
|
+
rebuild system prompts mid-conversation.
|
|
356
|
+
- Do not return stale or mocked data for security/audit paths.
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## 10) Multi-Agent Safety
|
|
361
|
+
|
|
362
|
+
When multiple agents may be working on this repo concurrently:
|
|
363
|
+
|
|
364
|
+
- **Do not** create, apply, or drop `git stash` entries unless explicitly
|
|
365
|
+
requested (including `git pull --rebase --autostash`).
|
|
366
|
+
- **Do not** switch branches or check out a different branch unless explicitly
|
|
367
|
+
requested.
|
|
368
|
+
- **Do not** create, remove, or modify `git worktree` checkouts unless
|
|
369
|
+
explicitly requested.
|
|
370
|
+
- When the user says "commit", scope to **your changes only**. When the user
|
|
371
|
+
says "commit all", commit everything in grouped chunks.
|
|
372
|
+
- When the user says "push", you may `git pull --rebase` to integrate latest
|
|
373
|
+
changes. Never discard other agents' work.
|
|
374
|
+
- When you see unrecognized files, keep going. Focus on your changes and commit
|
|
375
|
+
only those.
|
|
376
|
+
- Focus reports on your edits. End with a brief "other files present" note only
|
|
377
|
+
if relevant.
|
|
378
|
+
- Lint/format churn: if diffs are formatting-only, auto-resolve without asking.
|
|
379
|
+
Only ask when changes are semantic (logic/data/behavior).
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## 11) Documentation Hierarchy
|
|
384
|
+
|
|
385
|
+
| Document | Audience | Purpose |
|
|
386
|
+
|-----------------------------|---------------------|---------------------------------|
|
|
387
|
+
| `README.md` | End users | Product overview, setup |
|
|
388
|
+
| `AGENTS.md` (this file) | Coding agents | Canonical repo instructions |
|
|
389
|
+
| `CLAUDE.md` | Claude Code | Thin shim → `AGENTS.md` |
|
|
390
|
+
| `CONTRIBUTING.md` | Human contributors | Quickstart, PR workflow |
|
|
391
|
+
| `SECURITY.md` | Security reviewers | Runtime security controls |
|
|
392
|
+
| `TRUST_MODEL.md` | Operators | Trust acceptance policy |
|
|
393
|
+
| `docs/development/` | Maintainers | Architecture, runtime, testing |
|
|
394
|
+
| `templates/*.md` | Product runtime | Agent workspace bootstrap |
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## 12) Handoff Template
|
|
399
|
+
|
|
400
|
+
When handing off work (agent → agent or agent → maintainer), include:
|
|
401
|
+
|
|
402
|
+
1. **What changed** — files touched and why.
|
|
403
|
+
2. **What did not change** — scope boundaries you respected.
|
|
404
|
+
3. **Validation** — which checks you ran and their results.
|
|
405
|
+
4. **Skipped checks** — what you did not run and why.
|
|
406
|
+
5. **Remaining risks / unknowns** — open questions or edge cases.
|
|
407
|
+
6. **Next recommended action** — what to do next.
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## 13) Vibe Coding Guardrails
|
|
412
|
+
|
|
413
|
+
When working in fast iterative mode:
|
|
414
|
+
|
|
415
|
+
- Keep each iteration reversible (small commits, clear rollback path).
|
|
416
|
+
- Validate assumptions with code search before implementing.
|
|
417
|
+
- Prefer deterministic behavior over clever shortcuts.
|
|
418
|
+
- Do not "ship and hope" on security-sensitive paths.
|
|
419
|
+
- If uncertain about an internal API, search `src/` for existing usage patterns
|
|
420
|
+
before guessing.
|
|
421
|
+
- If uncertain about architecture, read the type definitions in `src/types.ts`
|
|
422
|
+
and the workspace bootstrap in `src/workspace.ts` before implementing.
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,69 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.7.1](https://github.com/HybridAIOne/hybridclaw/tree/v0.7.1)
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **Admin console and agent dashboards**: Added the embedded `/admin` console
|
|
10
|
+
and `/agents` workspace/session dashboards so operators can inspect gateway
|
|
11
|
+
state, sessions, channels, config, models, scheduler tasks, MCP servers,
|
|
12
|
+
audit events, skills, and tools from the browser.
|
|
13
|
+
- **Full-auto session mode**: Added supervised `fullauto` execution with queued
|
|
14
|
+
proactive delivery, persisted startup resume, watchdog recovery, and explicit
|
|
15
|
+
interruption when a human takes over the session.
|
|
16
|
+
- **First-class agents**: Agents now own workspaces independently of the active
|
|
17
|
+
model provider, with `agent` commands exposed through the gateway, TUI, and
|
|
18
|
+
Discord for creating, listing, switching, and inspecting agent bindings.
|
|
19
|
+
- **WhatsApp, email, and cross-channel messaging**: Added WhatsApp channel
|
|
20
|
+
integration, a native email channel, replay/message-store support, auth reset
|
|
21
|
+
tooling, and shared `message` routing so HybridClaw can send and normalize
|
|
22
|
+
delivery across Discord, WhatsApp, email, and local channels.
|
|
23
|
+
- **Shared audio transcription and OpenRouter auth**: Added inbound audio
|
|
24
|
+
transcription fallbacks across local CLIs and provider backends plus
|
|
25
|
+
`hybridclaw auth login|status|logout openrouter` for provider-aware
|
|
26
|
+
authentication and model selection.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- **Stable workspace identity across model/provider changes**: Session
|
|
31
|
+
workspaces are keyed by agent identity instead of provider-derived agent IDs,
|
|
32
|
+
so switching models or providers keeps the same workspace and memory unless
|
|
33
|
+
the session is explicitly rebound.
|
|
34
|
+
- **Session visibility and status controls**: Added
|
|
35
|
+
`show all|thinking|tools|none` across gateway, TUI, Discord, and web chat,
|
|
36
|
+
while shared status output now includes the current session agent and
|
|
37
|
+
effective model.
|
|
38
|
+
- **Media and prompt routing**: Current-turn attachments and media now flow
|
|
39
|
+
through shared routing for Discord, WhatsApp, email, and local clients,
|
|
40
|
+
including native vision/audio injection paths and stronger preference for
|
|
41
|
+
current-turn local files over history rediscovery.
|
|
42
|
+
- **Auxiliary task/provider routing**: Added Hermes-style auxiliary routing and
|
|
43
|
+
tighter provider fallback handling so deferred or background tasks pick the
|
|
44
|
+
right model more predictably.
|
|
45
|
+
- **Discord activation config cleanup**: Removed the obsolete
|
|
46
|
+
`discord.respondToAllMessages` config path. Guild activation now follows
|
|
47
|
+
`channel mode`, guild policy, and explicit free-response channel settings.
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- **Approval/runtime guard hardening**: Tightened approval confirmation flows,
|
|
52
|
+
tool runtime guards, and gateway/runtime follow-up handling so blocked or
|
|
53
|
+
long-running turns fail more predictably.
|
|
54
|
+
- **Agent, TUI, and heartbeat stability**: Improved TUI streaming and silent
|
|
55
|
+
reply handling, stabilized agent dashboards and heartbeat activity tracking,
|
|
56
|
+
and preserved visibility on long-running turns.
|
|
57
|
+
- **WhatsApp and email delivery reliability**: Fixed WhatsApp auth-lock races,
|
|
58
|
+
timeout handling, follow-up delivery edge cases, local message-store
|
|
59
|
+
persistence, and email runtime/delivery hardening.
|
|
60
|
+
- **Audio/media path handling**: Hardened audio transcription media-path
|
|
61
|
+
resolution, PDF truncation, and current-turn media handling across gateway
|
|
62
|
+
and container paths.
|
|
63
|
+
- **Discord media cache hardening**: Added SSRF-guarded Discord CDN fetches,
|
|
64
|
+
per-type cache limits, Unicode-aware filename sanitization, explicit
|
|
65
|
+
permissions, and lazy TTL-based cleanup with empty-directory pruning for
|
|
66
|
+
cached inbound media.
|
|
67
|
+
|
|
5
68
|
## [0.6.0](https://github.com/HybridAIOne/hybridclaw/tree/v0.6.0)
|
|
6
69
|
|
|
7
70
|
### Added
|