@hybridaione/hybridclaw 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +377 -58
- package/CHANGELOG.md +96 -0
- package/README.md +139 -6
- package/config.example.json +57 -3
- 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/dist/approval-policy.js +167 -39
- package/container/dist/approval-policy.js.map +1 -1
- package/container/dist/browser-tools.js +69 -21
- 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 +139 -306
- package/container/dist/index.js.map +1 -1
- package/container/dist/mcp/client-manager.js +9 -2
- package/container/dist/mcp/client-manager.js.map +1 -1
- package/container/dist/mcp/config-watcher.js.map +1 -1
- package/container/dist/model-client.js +14 -0
- package/container/dist/model-client.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/hybridai.js +1 -0
- package/container/dist/providers/hybridai.js.map +1 -1
- package/container/dist/providers/local-ollama.js +273 -0
- package/container/dist/providers/local-ollama.js.map +1 -0
- package/container/dist/providers/local-openai-compat.js +533 -0
- package/container/dist/providers/local-openai-compat.js.map +1 -0
- package/container/dist/providers/openai-codex.js +4 -3
- package/container/dist/providers/openai-codex.js.map +1 -1
- package/container/dist/providers/shared.js +43 -3
- package/container/dist/providers/shared.js.map +1 -1
- package/container/dist/providers/thinking-extractor.js +139 -0
- package/container/dist/providers/thinking-extractor.js.map +1 -0
- package/container/dist/providers/tool-call-normalizer.js +603 -0
- package/container/dist/providers/tool-call-normalizer.js.map +1 -0
- package/container/dist/ralph.js +63 -0
- package/container/dist/ralph.js.map +1 -0
- package/container/dist/runtime-capabilities.js +2 -12
- package/container/dist/runtime-capabilities.js.map +1 -1
- package/container/dist/runtime-paths.js +32 -1
- package/container/dist/runtime-paths.js.map +1 -1
- package/container/dist/stalled-turns.js +8 -0
- package/container/dist/stalled-turns.js.map +1 -0
- package/container/dist/system-messages.js +56 -0
- package/container/dist/system-messages.js.map +1 -0
- package/container/dist/token-usage.js +4 -0
- package/container/dist/token-usage.js.map +1 -1
- package/container/dist/tool-loop-detection.js +192 -0
- package/container/dist/tool-loop-detection.js.map +1 -0
- package/container/dist/tools.js +930 -808
- package/container/dist/tools.js.map +1 -1
- package/container/package-lock.json +2 -2
- package/container/package.json +1 -1
- package/container/src/approval-policy.ts +186 -42
- package/container/src/browser-tools.ts +82 -23
- package/container/src/discord-cdn.ts +21 -0
- package/container/src/index.ts +208 -323
- package/container/src/mcp/client-manager.ts +16 -5
- package/container/src/mcp/config-watcher.ts +4 -1
- package/container/src/model-client.ts +20 -0
- package/container/src/native-media.ts +326 -0
- package/container/src/providers/hybridai.ts +1 -0
- package/container/src/providers/local-ollama.ts +388 -0
- package/container/src/providers/local-openai-compat.ts +696 -0
- package/container/src/providers/openai-codex.ts +4 -0
- package/container/src/providers/shared.ts +63 -4
- package/container/src/providers/thinking-extractor.ts +170 -0
- package/container/src/providers/tool-call-normalizer.ts +751 -0
- package/container/src/ralph.ts +71 -0
- package/container/src/runtime-capabilities.ts +5 -12
- package/container/src/runtime-paths.ts +42 -4
- package/container/src/stalled-turns.ts +12 -0
- package/container/src/system-messages.ts +63 -0
- package/container/src/token-usage.ts +4 -0
- package/container/src/tool-loop-detection.ts +241 -0
- package/container/src/tools.ts +1099 -861
- package/container/src/types.ts +26 -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 +1 -1
- package/dist/agent/prompt-hooks.d.ts.map +1 -1
- package/dist/agent/prompt-hooks.js +23 -12
- 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 +13 -0
- package/dist/agent/tool-summary.js.map +1 -1
- package/dist/agents/agent-registry.d.ts +24 -0
- package/dist/agents/agent-registry.d.ts.map +1 -0
- package/dist/agents/agent-registry.js +386 -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 +131 -126
- package/dist/channels/discord/attachments.js.map +1 -1
- package/dist/channels/discord/debounce.js +1 -1
- package/dist/channels/discord/debounce.js.map +1 -1
- package/dist/channels/discord/delivery.d.ts +12 -5
- package/dist/channels/discord/delivery.d.ts.map +1 -1
- package/dist/channels/discord/delivery.js +5 -4
- package/dist/channels/discord/delivery.js.map +1 -1
- 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 -22
- package/dist/channels/discord/inbound.js.map +1 -1
- 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 +3 -1
- package/dist/channels/discord/runtime.d.ts.map +1 -1
- package/dist/channels/discord/runtime.js +126 -40
- 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 -503
- 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/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 +151 -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 +11 -2
- package/dist/channels/prompt-adapters.js.map +1 -1
- package/dist/channels/whatsapp/auth.d.ts +12 -0
- package/dist/channels/whatsapp/auth.d.ts.map +1 -0
- package/dist/channels/whatsapp/auth.js +34 -0
- package/dist/channels/whatsapp/auth.js.map +1 -0
- package/dist/channels/whatsapp/connection.d.ts +11 -0
- package/dist/channels/whatsapp/connection.d.ts.map +1 -0
- package/dist/channels/whatsapp/connection.js +265 -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 +20 -0
- package/dist/channels/whatsapp/delivery.d.ts.map +1 -0
- package/dist/channels/whatsapp/delivery.js +96 -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/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 +192 -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 +476 -9
- 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 +806 -0
- package/dist/command-registry.js.map +1 -0
- package/dist/config/config.d.ts +37 -1
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +62 -2
- package/dist/config/config.js.map +1 -1
- package/dist/config/runtime-config.d.ts +56 -2
- package/dist/config/runtime-config.d.ts.map +1 -1
- package/dist/config/runtime-config.js +379 -4
- package/dist/config/runtime-config.js.map +1 -1
- package/dist/gateway/approval-confirmation.d.ts +3 -0
- package/dist/gateway/approval-confirmation.d.ts.map +1 -0
- package/dist/gateway/approval-confirmation.js +34 -0
- package/dist/gateway/approval-confirmation.js.map +1 -0
- 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 +1496 -285
- 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 +309 -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 +255 -52
- 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/pending-approvals.d.ts +20 -1
- package/dist/gateway/pending-approvals.d.ts.map +1 -1
- package/dist/gateway/pending-approvals.js +29 -6
- package/dist/gateway/pending-approvals.js.map +1 -1
- package/dist/gateway/proactive-delivery.d.ts +3 -1
- package/dist/gateway/proactive-delivery.d.ts.map +1 -1
- package/dist/gateway/proactive-delivery.js +18 -1
- package/dist/gateway/proactive-delivery.js.map +1 -1
- package/dist/gateway/reset-confirmation.d.ts +16 -0
- package/dist/gateway/reset-confirmation.d.ts.map +1 -0
- package/dist/gateway/reset-confirmation.js +49 -0
- package/dist/gateway/reset-confirmation.js.map +1 -0
- package/dist/gateway/show-mode.d.ts +10 -0
- package/dist/gateway/show-mode.d.ts.map +1 -0
- package/dist/gateway/show-mode.js +46 -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 +69 -19
- 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 +64 -17
- package/dist/infra/host-runner.js.map +1 -1
- package/dist/infra/ipc.d.ts +16 -0
- package/dist/infra/ipc.d.ts.map +1 -1
- package/dist/infra/ipc.js +40 -7
- 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 +9 -0
- package/dist/infra/worker-signature.d.ts.map +1 -0
- package/dist/infra/worker-signature.js +15 -0
- package/dist/infra/worker-signature.js.map +1 -0
- 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/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 +20 -11
- package/dist/memory/memory-service.js.map +1 -1
- package/dist/model-selection.d.ts +3 -0
- package/dist/model-selection.d.ts.map +1 -0
- package/dist/model-selection.js +18 -0
- package/dist/model-selection.js.map +1 -0
- package/dist/onboarding.d.ts +0 -1
- package/dist/onboarding.d.ts.map +1 -1
- package/dist/onboarding.js +13 -7
- 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/factory.d.ts +0 -1
- package/dist/providers/factory.d.ts.map +1 -1
- package/dist/providers/factory.js +18 -13
- 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 +18 -0
- package/dist/providers/local-discovery.d.ts.map +1 -0
- package/dist/providers/local-discovery.js +311 -0
- package/dist/providers/local-discovery.js.map +1 -0
- package/dist/providers/local-health.d.ts +10 -0
- package/dist/providers/local-health.d.ts.map +1 -0
- package/dist/providers/local-health.js +163 -0
- package/dist/providers/local-health.js.map +1 -0
- package/dist/providers/local-ollama.d.ts +3 -0
- package/dist/providers/local-ollama.d.ts.map +1 -0
- package/dist/providers/local-ollama.js +44 -0
- package/dist/providers/local-ollama.js.map +1 -0
- package/dist/providers/local-openai-compat.d.ts +4 -0
- package/dist/providers/local-openai-compat.d.ts.map +1 -0
- package/dist/providers/local-openai-compat.js +56 -0
- package/dist/providers/local-openai-compat.js.map +1 -0
- package/dist/providers/local-types.d.ts +60 -0
- package/dist/providers/local-types.d.ts.map +1 -0
- package/dist/providers/local-types.js +2 -0
- package/dist/providers/local-types.js.map +1 -0
- package/dist/providers/model-catalog.d.ts +6 -0
- package/dist/providers/model-catalog.d.ts.map +1 -0
- package/dist/providers/model-catalog.js +35 -0
- package/dist/providers/model-catalog.js.map +1 -0
- 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/types.d.ts +7 -3
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/scheduler/heartbeat.d.ts.map +1 -1
- package/dist/scheduler/heartbeat.js +46 -18
- 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 +13 -2
- 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/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 +5 -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 +32 -6
- 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 +2 -1
- package/dist/skills/skills.d.ts.map +1 -1
- package/dist/skills/skills.js +18 -10
- 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 +551 -140
- package/dist/tui.js.map +1 -1
- package/dist/types.d.ts +32 -3
- package/dist/types.d.ts.map +1 -1
- 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/dist/workspace.d.ts +10 -1
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +29 -0
- package/dist/workspace.js.map +1 -1
- package/docs/CNAME +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 +138 -1
- package/docs/development/voice-tts.md +123 -0
- package/docs/index.html +116 -81
- package/package.json +14 -5
- package/skills/docx/scripts/accept_changes.cjs +3 -1
- package/skills/docx/scripts/comment.cjs +40 -20
- package/skills/office/helpers/merge_runs.cjs +8 -2
- package/skills/office/helpers/simplify_redlines.cjs +1 -4
- package/skills/office/pack.cjs +12 -8
- package/skills/office/validate.cjs +30 -16
- package/skills/office/xml.cjs +15 -4
- package/skills/xlsx/SKILL.md +18 -4
- package/skills/xlsx/references/financial-modeling.md +33 -0
- package/skills/xlsx/scripts/import_delimited.cjs +24 -6
package/AGENTS.md
CHANGED
|
@@ -1,85 +1,295 @@
|
|
|
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.6.0  |  **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.
|
|
35
198
|
|
|
36
|
-
|
|
199
|
+
### Coding Style
|
|
37
200
|
|
|
38
|
-
|
|
201
|
+
- **Language:** TypeScript (strict mode, ES2022 target, NodeNext modules, ESM).
|
|
202
|
+
- **Formatting:** Biome is authoritative. Run `npm run format` before
|
|
203
|
+
committing. The Husky pre-commit hook runs `npx biome check --write --staged`.
|
|
204
|
+
- **Single quotes** for strings (configured in `biome.json`).
|
|
205
|
+
- **No `any`** without strong justification. No `@ts-nocheck`.
|
|
206
|
+
- **File size:** aim for ~500 LOC; split when it improves clarity or
|
|
207
|
+
testability. `src/skills/skills-guard.ts` and `src/skills/skills.ts` are
|
|
208
|
+
current large exceptions — do not grow them further without splitting.
|
|
209
|
+
- **Comments:** brief comments for tricky or non-obvious logic only. Do not add
|
|
210
|
+
comments, docstrings, or type annotations to code you did not change.
|
|
211
|
+
- **Imports:** let Biome organize imports. Do not mix dynamic
|
|
212
|
+
`await import()` and static `import` for the same module in production paths.
|
|
213
|
+
- **Dependencies:** root `package.json` is for gateway/CLI deps. Container-only
|
|
214
|
+
deps go in `container/package.json`. Never add container deps to root.
|
|
39
215
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
216
|
+
### Git Discipline
|
|
217
|
+
|
|
218
|
+
- Treat existing uncommitted changes as user work unless you created them.
|
|
219
|
+
- Conventional Commits preferred: `feat:`, `fix:`, `test:`, `refactor:`,
|
|
220
|
+
`chore:`, `docs:`.
|
|
221
|
+
- Group related changes; avoid bundling unrelated refactors.
|
|
222
|
+
- Never commit real API keys, tokens, credentials, or personal data. Use
|
|
223
|
+
neutral placeholders in tests: `"test-key"`, `"example.com"`, `"user_a"`.
|
|
43
224
|
|
|
44
|
-
|
|
225
|
+
---
|
|
45
226
|
|
|
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
|
-
```
|
|
227
|
+
## 7) Change Playbooks
|
|
61
228
|
|
|
62
|
-
|
|
229
|
+
### 7.1 Adding a Skill
|
|
63
230
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
231
|
+
1. Create `skills/<name>/SKILL.md` with required frontmatter:
|
|
232
|
+
```yaml
|
|
233
|
+
---
|
|
234
|
+
name: my-skill
|
|
235
|
+
description: One-line description
|
|
236
|
+
user-invocable: true # optional, enables /<name> invocation
|
|
237
|
+
---
|
|
238
|
+
```
|
|
239
|
+
2. Add markdown instructions and working rules in the body.
|
|
240
|
+
3. If the skill needs supporting scripts, place them alongside `SKILL.md`.
|
|
241
|
+
4. Bundled script paths are mirrored into `/workspace/skills/<name>` at runtime.
|
|
242
|
+
5. Test: `hybridclaw skill list` should show the new skill.
|
|
73
243
|
|
|
74
|
-
|
|
244
|
+
Skill resolution order (first match wins):
|
|
245
|
+
1. `config.skills.extraDirs[]`
|
|
246
|
+
2. Bundled: `skills/<name>`
|
|
247
|
+
3. `$CODEX_HOME/skills`
|
|
248
|
+
4. `~/.codex/skills`, `~/.claude/skills`, `~/.agents/skills`
|
|
249
|
+
5. Project/workspace: `./.agents/skills`, `./skills`
|
|
75
250
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
251
|
+
### 7.2 Adding a Provider
|
|
252
|
+
|
|
253
|
+
1. Create `src/providers/<name>.ts` implementing the provider interface.
|
|
254
|
+
2. Register in the provider factory (`src/providers/`).
|
|
255
|
+
3. Add config section in `src/config/` if new credentials or endpoints needed.
|
|
256
|
+
4. Add tests for factory wiring, error paths, and config parsing.
|
|
257
|
+
5. Update `docs/` if the provider is user-facing.
|
|
258
|
+
|
|
259
|
+
### 7.3 Adding an MCP Server
|
|
81
260
|
|
|
82
|
-
|
|
261
|
+
1. Add the server config to `~/.hybridclaw/config.json` under `mcpServers`:
|
|
262
|
+
```json
|
|
263
|
+
{
|
|
264
|
+
"mcpServers": {
|
|
265
|
+
"<server-name>": {
|
|
266
|
+
"command": "...",
|
|
267
|
+
"args": ["..."],
|
|
268
|
+
"transport": "stdio"
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
2. Tools are auto-discovered at startup and merged into the tool namespace.
|
|
274
|
+
3. Test with `hybridclaw` running in dev mode.
|
|
275
|
+
|
|
276
|
+
### 7.4 Modifying Approval Policy
|
|
277
|
+
|
|
278
|
+
1. Edit `.hybridclaw/policy.yaml`.
|
|
279
|
+
2. Approval tiers: green (silent) → yellow (narrated) → red (explicit approval).
|
|
280
|
+
3. `pinned_red` patterns are never auto-promoted.
|
|
281
|
+
4. Test approval flows with integration tests that exercise the boundary.
|
|
282
|
+
|
|
283
|
+
### 7.5 Modifying Templates
|
|
284
|
+
|
|
285
|
+
1. Edit the file in `templates/`.
|
|
286
|
+
2. **Always** update `src/workspace.ts` if you add, remove, or rename a
|
|
287
|
+
template file.
|
|
288
|
+
3. Run workspace bootstrap tests to verify.
|
|
289
|
+
4. Remember: templates are seeded into agent workspaces at runtime — changes
|
|
290
|
+
only apply to new sessions or after workspace reset.
|
|
291
|
+
|
|
292
|
+
### 7.6 Bump Release
|
|
83
293
|
|
|
84
294
|
When the user says "bump release":
|
|
85
295
|
|
|
@@ -93,8 +303,117 @@ When the user says "bump release":
|
|
|
93
303
|
3. Move `CHANGELOG.md` release notes from `Unreleased` to the new version
|
|
94
304
|
heading (or create one).
|
|
95
305
|
4. Update `README.md` "latest tag" link/text if present.
|
|
96
|
-
5. Commit with
|
|
306
|
+
5. Commit with `chore: release vX.Y.Z`.
|
|
97
307
|
6. Create an annotated git tag `vX.Y.Z`.
|
|
98
308
|
7. Push the commit and tag.
|
|
99
|
-
8.
|
|
100
|
-
|
|
309
|
+
8. Create or publish a GitHub Release entry for the tag.
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## 8) Testing Expectations
|
|
314
|
+
|
|
315
|
+
### What to Run
|
|
316
|
+
|
|
317
|
+
| Change scope | Required checks |
|
|
318
|
+
|---------------------|-------------------------------------------------------------|
|
|
319
|
+
| Docs only | Verify links, commands, examples |
|
|
320
|
+
| `src/` changes | `npm run typecheck`, `npm run lint`, targeted Vitest suites |
|
|
321
|
+
| `container/` changes| `npm --prefix container run lint`, `npm run build`, IPC boundary tests |
|
|
322
|
+
| `skills/` changes | `hybridclaw skill list`, targeted skill tests |
|
|
323
|
+
| Release/packaging | Both `release:check` scripts, verify versioned docs |
|
|
324
|
+
| Security surfaces | Include boundary and failure-mode tests |
|
|
325
|
+
|
|
326
|
+
### Conventions
|
|
327
|
+
|
|
328
|
+
- Test files: `tests/*.test.ts`, `*.integration.test.ts`, `*.e2e.test.ts`,
|
|
329
|
+
`*.live.test.ts`.
|
|
330
|
+
- Live tests require credentials. Skip them unless your change needs them,
|
|
331
|
+
and state that explicitly in your handoff.
|
|
332
|
+
- If you skip a relevant check, state what you skipped and why.
|
|
333
|
+
- Never hardcode real credentials in tests. Use env vars or test fixtures.
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## 9) Anti-Patterns (Do Not)
|
|
338
|
+
|
|
339
|
+
- Do not rename or relocate `templates/` files without updating
|
|
340
|
+
`src/workspace.ts`.
|
|
341
|
+
- Do not add container-only deps to root `package.json`.
|
|
342
|
+
- Do not grow `src/skills/skills-guard.ts` or `src/skills/skills.ts` further
|
|
343
|
+
without splitting.
|
|
344
|
+
- Do not use `@ts-nocheck` or disable lint rules without strong justification.
|
|
345
|
+
- Do not silently weaken security policy, approval tiers, or mount allowlists.
|
|
346
|
+
- Do not log secrets, tokens, or sensitive payloads — even at debug level.
|
|
347
|
+
- Do not modify unrelated modules "while here".
|
|
348
|
+
- Do not include personal identity, real phone numbers, or live config values
|
|
349
|
+
in tests, examples, docs, or commits.
|
|
350
|
+
- Do not edit `node_modules/` or vendored files.
|
|
351
|
+
- Do not break prompt caching: do not alter past context, change toolsets, or
|
|
352
|
+
rebuild system prompts mid-conversation.
|
|
353
|
+
- Do not return stale or mocked data for security/audit paths.
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## 10) Multi-Agent Safety
|
|
358
|
+
|
|
359
|
+
When multiple agents may be working on this repo concurrently:
|
|
360
|
+
|
|
361
|
+
- **Do not** create, apply, or drop `git stash` entries unless explicitly
|
|
362
|
+
requested (including `git pull --rebase --autostash`).
|
|
363
|
+
- **Do not** switch branches or check out a different branch unless explicitly
|
|
364
|
+
requested.
|
|
365
|
+
- **Do not** create, remove, or modify `git worktree` checkouts unless
|
|
366
|
+
explicitly requested.
|
|
367
|
+
- When the user says "commit", scope to **your changes only**. When the user
|
|
368
|
+
says "commit all", commit everything in grouped chunks.
|
|
369
|
+
- When the user says "push", you may `git pull --rebase` to integrate latest
|
|
370
|
+
changes. Never discard other agents' work.
|
|
371
|
+
- When you see unrecognized files, keep going. Focus on your changes and commit
|
|
372
|
+
only those.
|
|
373
|
+
- Focus reports on your edits. End with a brief "other files present" note only
|
|
374
|
+
if relevant.
|
|
375
|
+
- Lint/format churn: if diffs are formatting-only, auto-resolve without asking.
|
|
376
|
+
Only ask when changes are semantic (logic/data/behavior).
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## 11) Documentation Hierarchy
|
|
381
|
+
|
|
382
|
+
| Document | Audience | Purpose |
|
|
383
|
+
|-----------------------------|---------------------|---------------------------------|
|
|
384
|
+
| `README.md` | End users | Product overview, setup |
|
|
385
|
+
| `AGENTS.md` (this file) | Coding agents | Canonical repo instructions |
|
|
386
|
+
| `CLAUDE.md` | Claude Code | Thin shim → `AGENTS.md` |
|
|
387
|
+
| `CONTRIBUTING.md` | Human contributors | Quickstart, PR workflow |
|
|
388
|
+
| `SECURITY.md` | Security reviewers | Runtime security controls |
|
|
389
|
+
| `TRUST_MODEL.md` | Operators | Trust acceptance policy |
|
|
390
|
+
| `docs/development/` | Maintainers | Architecture, runtime, testing |
|
|
391
|
+
| `templates/*.md` | Product runtime | Agent workspace bootstrap |
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## 12) Handoff Template
|
|
396
|
+
|
|
397
|
+
When handing off work (agent → agent or agent → maintainer), include:
|
|
398
|
+
|
|
399
|
+
1. **What changed** — files touched and why.
|
|
400
|
+
2. **What did not change** — scope boundaries you respected.
|
|
401
|
+
3. **Validation** — which checks you ran and their results.
|
|
402
|
+
4. **Skipped checks** — what you did not run and why.
|
|
403
|
+
5. **Remaining risks / unknowns** — open questions or edge cases.
|
|
404
|
+
6. **Next recommended action** — what to do next.
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## 13) Vibe Coding Guardrails
|
|
409
|
+
|
|
410
|
+
When working in fast iterative mode:
|
|
411
|
+
|
|
412
|
+
- Keep each iteration reversible (small commits, clear rollback path).
|
|
413
|
+
- Validate assumptions with code search before implementing.
|
|
414
|
+
- Prefer deterministic behavior over clever shortcuts.
|
|
415
|
+
- Do not "ship and hope" on security-sensitive paths.
|
|
416
|
+
- If uncertain about an internal API, search `src/` for existing usage patterns
|
|
417
|
+
before guessing.
|
|
418
|
+
- If uncertain about architecture, read the type definitions in `src/types.ts`
|
|
419
|
+
and the workspace bootstrap in `src/workspace.ts` before implementing.
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,102 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.7.0](https://github.com/HybridAIOne/hybridclaw/tree/v0.7.0)
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **First-class agents and agent commands**: Agents now own workspaces
|
|
10
|
+
independently of the active model provider, with `agent` commands available
|
|
11
|
+
through the gateway, TUI, and Discord for inspecting, listing, creating, and
|
|
12
|
+
switching session bindings.
|
|
13
|
+
- **Agent/session dashboard split**: The `/agents` page and `/api/agents`
|
|
14
|
+
response now distinguish logical agents from bound sessions so operators can
|
|
15
|
+
see both workspace-level state and per-session runtime state.
|
|
16
|
+
- **Embedded admin console and full-auto sessions**: Added the `/admin` web
|
|
17
|
+
console plus `fullauto [status|off|on [prompt]|<prompt>]` so operators can
|
|
18
|
+
inspect runtime state in the browser and arm persistent background session
|
|
19
|
+
loops from gateway and TUI control surfaces.
|
|
20
|
+
- **WhatsApp channel integration and shared message routing**: Added WhatsApp
|
|
21
|
+
channel setup/linking plus shared `message` send routing across Discord,
|
|
22
|
+
WhatsApp, and local proactive channels, including local-file delivery from
|
|
23
|
+
workspaces and `/discord-media-cache`.
|
|
24
|
+
- **Inbound audio transcription**: Added multi-backend audio
|
|
25
|
+
transcription with local CLI auto-detect, provider fallbacks, and native
|
|
26
|
+
current-turn audio injection for supported local-model sessions when no
|
|
27
|
+
transcript backend is available.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- **Stable workspace identity across model/provider changes**: Session
|
|
32
|
+
workspaces are now keyed by agent identity instead of provider-derived agent
|
|
33
|
+
IDs, so switching from one backend or model family to another keeps the same
|
|
34
|
+
workspace and memory unless the session is explicitly rebound to another
|
|
35
|
+
agent.
|
|
36
|
+
- **Session visibility control**: Added `show all|thinking|tools|none` across
|
|
37
|
+
gateway, TUI, Discord, and web chat so each session can suppress thinking
|
|
38
|
+
previews and tool activity independently.
|
|
39
|
+
- **Runtime status visibility**: Shared `status` output in TUI and Discord now
|
|
40
|
+
includes the current session agent alongside the effective model and sandbox
|
|
41
|
+
state.
|
|
42
|
+
- **TUI streaming and thinking presentation**: TUI replies now stream as
|
|
43
|
+
multiline assistant output, transient thinking previews are rendered
|
|
44
|
+
separately from final answers, tool activity stays live during streaming, and
|
|
45
|
+
the thinking indicator uses the new pulsing jellyfish status line.
|
|
46
|
+
- **Audio/media and channel delivery flow**: Audio attachments, local media
|
|
47
|
+
sends, and PDF context truncation now share tighter path handling and more
|
|
48
|
+
consistent fallback behavior across Discord, WhatsApp, and TUI-driven turns.
|
|
49
|
+
- **Discord activation config cleanup**: Removed the obsolete
|
|
50
|
+
`discord.respondToAllMessages` config path. Guild activation now follows
|
|
51
|
+
`channel mode`, guild policy, and explicit free-response channel settings.
|
|
52
|
+
|
|
53
|
+
### Fixed
|
|
54
|
+
|
|
55
|
+
- **Heartbeat/tool-call stream timeouts**: Hidden stream activity now extends
|
|
56
|
+
the IPC inactivity deadline even when providers emit tool-call or reasoning
|
|
57
|
+
chunks without visible text, preventing false heartbeat timeouts on long
|
|
58
|
+
local-model turns.
|
|
59
|
+
- **WhatsApp follow-up reliability**: Timeout, follow-up, and internal channel
|
|
60
|
+
handling edge cases no longer leave WhatsApp turns hanging or silently losing
|
|
61
|
+
queued replies.
|
|
62
|
+
- **Tool placeholder replies**: Placeholder `Done.` replies after failed tool
|
|
63
|
+
turns are now replaced with useful fallback content such as concise tool
|
|
64
|
+
failure summaries or derived tool results.
|
|
65
|
+
- **Approval/runtime hardening and redaction**: Tool-output secret redaction and
|
|
66
|
+
approval/runtime guards were tightened to reduce accidental leakage and make
|
|
67
|
+
blocked or failed actions surface more clearly.
|
|
68
|
+
|
|
69
|
+
## [0.6.0](https://github.com/HybridAIOne/hybridclaw/tree/v0.6.0)
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
|
|
73
|
+
- **Local LLM provider support**: Added Ollama, LM Studio, and vLLM as local
|
|
74
|
+
backends with `hybridclaw local configure|status`, auto-discovery of running
|
|
75
|
+
instances, health monitoring, model catalog management, thinking extraction,
|
|
76
|
+
and tool-call normalization for small local models.
|
|
77
|
+
- **Session reset flow**: Added `reset [yes|no]` across gateway/TUI and Discord
|
|
78
|
+
slash commands so a session can clear history, restore per-session
|
|
79
|
+
model/chatbot/RAG defaults, and remove the active agent workspace after
|
|
80
|
+
confirmation.
|
|
81
|
+
- **Activity-based agent timeout**: The IPC read timeout now resets on agent
|
|
82
|
+
activity (text deltas, tool progress) instead of using a fixed wall clock,
|
|
83
|
+
so slow local models making steady progress are not killed prematurely.
|
|
84
|
+
|
|
85
|
+
### Fixed
|
|
86
|
+
|
|
87
|
+
- **Host sandbox `/workspace` references**: System prompt skill locations and
|
|
88
|
+
tool guidance now use real filesystem paths when `sandbox=host` instead of
|
|
89
|
+
the container-only `/workspace` mount path that does not exist on the host.
|
|
90
|
+
- **Local provider session stability**: Pooled workers now restart when backend
|
|
91
|
+
targets or auth signatures change, recreated workspaces clear stale session
|
|
92
|
+
transcript state, and missing workspace approval policies are bootstrapped
|
|
93
|
+
reliably.
|
|
94
|
+
- **Session compaction budget accuracy**: Auto-compaction now counts system
|
|
95
|
+
prompt tokens instead of only message and summary tokens, so compaction
|
|
96
|
+
triggers at the configured threshold.
|
|
97
|
+
- **Misleading timeout error message**: Changed "Timeout waiting for container
|
|
98
|
+
output" to "Timeout waiting for agent output" since the same IPC mechanism
|
|
99
|
+
is used by both host and container runners.
|
|
100
|
+
|
|
5
101
|
## [0.5.0](https://github.com/HybridAIOne/hybridclaw/tree/v0.5.0)
|
|
6
102
|
|
|
7
103
|
### Added
|