wotann 0.5.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/LICENSE +21 -0
- package/NOTICE +110 -0
- package/README.md +382 -0
- package/dist/acp/manifest.d.ts +160 -0
- package/dist/acp/manifest.d.ts.map +1 -0
- package/dist/acp/manifest.js +185 -0
- package/dist/acp/manifest.js.map +1 -0
- package/dist/acp/protocol.d.ts +533 -0
- package/dist/acp/protocol.d.ts.map +1 -0
- package/dist/acp/protocol.js +220 -0
- package/dist/acp/protocol.js.map +1 -0
- package/dist/acp/registry.d.ts +90 -0
- package/dist/acp/registry.d.ts.map +1 -0
- package/dist/acp/registry.js +297 -0
- package/dist/acp/registry.js.map +1 -0
- package/dist/acp/runtime-handlers.d.ts +58 -0
- package/dist/acp/runtime-handlers.d.ts.map +1 -0
- package/dist/acp/runtime-handlers.js +169 -0
- package/dist/acp/runtime-handlers.js.map +1 -0
- package/dist/acp/server.d.ts +184 -0
- package/dist/acp/server.d.ts.map +1 -0
- package/dist/acp/server.js +553 -0
- package/dist/acp/server.js.map +1 -0
- package/dist/acp/stdio.d.ts +57 -0
- package/dist/acp/stdio.d.ts.map +1 -0
- package/dist/acp/stdio.js +178 -0
- package/dist/acp/stdio.js.map +1 -0
- package/dist/acp/thread-handlers.d.ts +27 -0
- package/dist/acp/thread-handlers.d.ts.map +1 -0
- package/dist/acp/thread-handlers.js +94 -0
- package/dist/acp/thread-handlers.js.map +1 -0
- package/dist/agents/background-agent.d.ts +80 -0
- package/dist/agents/background-agent.d.ts.map +1 -0
- package/dist/agents/background-agent.js +329 -0
- package/dist/agents/background-agent.js.map +1 -0
- package/dist/agents/required-reading.d.ts +57 -0
- package/dist/agents/required-reading.d.ts.map +1 -0
- package/dist/agents/required-reading.js +118 -0
- package/dist/agents/required-reading.js.map +1 -0
- package/dist/api/anthropic-gateway.d.ts +195 -0
- package/dist/api/anthropic-gateway.d.ts.map +1 -0
- package/dist/api/anthropic-gateway.js +265 -0
- package/dist/api/anthropic-gateway.js.map +1 -0
- package/dist/api/server.d.ts +166 -0
- package/dist/api/server.d.ts.map +1 -0
- package/dist/api/server.js +413 -0
- package/dist/api/server.js.map +1 -0
- package/dist/api/sse-computer-session.d.ts +119 -0
- package/dist/api/sse-computer-session.d.ts.map +1 -0
- package/dist/api/sse-computer-session.js +220 -0
- package/dist/api/sse-computer-session.js.map +1 -0
- package/dist/api/ws-hardening.d.ts +76 -0
- package/dist/api/ws-hardening.d.ts.map +1 -0
- package/dist/api/ws-hardening.js +102 -0
- package/dist/api/ws-hardening.js.map +1 -0
- package/dist/auth/auth-mode.d.ts +111 -0
- package/dist/auth/auth-mode.d.ts.map +1 -0
- package/dist/auth/auth-mode.js +133 -0
- package/dist/auth/auth-mode.js.map +1 -0
- package/dist/auth/login.d.ts +72 -0
- package/dist/auth/login.d.ts.map +1 -0
- package/dist/auth/login.js +414 -0
- package/dist/auth/login.js.map +1 -0
- package/dist/auth/oauth-rotator.d.ts +60 -0
- package/dist/auth/oauth-rotator.d.ts.map +1 -0
- package/dist/auth/oauth-rotator.js +71 -0
- package/dist/auth/oauth-rotator.js.map +1 -0
- package/dist/auth/oauth-server.d.ts +88 -0
- package/dist/auth/oauth-server.d.ts.map +1 -0
- package/dist/auth/oauth-server.js +382 -0
- package/dist/auth/oauth-server.js.map +1 -0
- package/dist/auth/secure-store.d.ts +65 -0
- package/dist/auth/secure-store.d.ts.map +1 -0
- package/dist/auth/secure-store.js +235 -0
- package/dist/auth/secure-store.js.map +1 -0
- package/dist/automation/monitor-agents.d.ts +86 -0
- package/dist/automation/monitor-agents.d.ts.map +1 -0
- package/dist/automation/monitor-agents.js +210 -0
- package/dist/automation/monitor-agents.js.map +1 -0
- package/dist/automation/n8n-templates.d.ts +62 -0
- package/dist/automation/n8n-templates.d.ts.map +1 -0
- package/dist/automation/n8n-templates.js +164 -0
- package/dist/automation/n8n-templates.js.map +1 -0
- package/dist/automation/rss-parser.d.ts +26 -0
- package/dist/automation/rss-parser.d.ts.map +1 -0
- package/dist/automation/rss-parser.js +54 -0
- package/dist/automation/rss-parser.js.map +1 -0
- package/dist/autopilot/checkpoint.d.ts +116 -0
- package/dist/autopilot/checkpoint.d.ts.map +1 -0
- package/dist/autopilot/checkpoint.js +222 -0
- package/dist/autopilot/checkpoint.js.map +1 -0
- package/dist/autopilot/ci-feedback.d.ts +68 -0
- package/dist/autopilot/ci-feedback.d.ts.map +1 -0
- package/dist/autopilot/ci-feedback.js +207 -0
- package/dist/autopilot/ci-feedback.js.map +1 -0
- package/dist/autopilot/completion-oracle.d.ts +63 -0
- package/dist/autopilot/completion-oracle.d.ts.map +1 -0
- package/dist/autopilot/completion-oracle.js +280 -0
- package/dist/autopilot/completion-oracle.js.map +1 -0
- package/dist/autopilot/oracle-worker.d.ts +102 -0
- package/dist/autopilot/oracle-worker.d.ts.map +1 -0
- package/dist/autopilot/oracle-worker.js +232 -0
- package/dist/autopilot/oracle-worker.js.map +1 -0
- package/dist/autopilot/pr-artifacts.d.ts +73 -0
- package/dist/autopilot/pr-artifacts.d.ts.map +1 -0
- package/dist/autopilot/pr-artifacts.js +308 -0
- package/dist/autopilot/pr-artifacts.js.map +1 -0
- package/dist/autopilot/trajectory-recorder.d.ts +86 -0
- package/dist/autopilot/trajectory-recorder.d.ts.map +1 -0
- package/dist/autopilot/trajectory-recorder.js +181 -0
- package/dist/autopilot/trajectory-recorder.js.map +1 -0
- package/dist/autopilot/types.d.ts +60 -0
- package/dist/autopilot/types.d.ts.map +1 -0
- package/dist/autopilot/types.js +14 -0
- package/dist/autopilot/types.js.map +1 -0
- package/dist/browser/agentic-browser.d.ts +291 -0
- package/dist/browser/agentic-browser.d.ts.map +1 -0
- package/dist/browser/agentic-browser.js +595 -0
- package/dist/browser/agentic-browser.js.map +1 -0
- package/dist/browser/annotation-bridge.d.ts +116 -0
- package/dist/browser/annotation-bridge.d.ts.map +1 -0
- package/dist/browser/annotation-bridge.js +156 -0
- package/dist/browser/annotation-bridge.js.map +1 -0
- package/dist/browser/atomic-actions.d.ts +130 -0
- package/dist/browser/atomic-actions.d.ts.map +1 -0
- package/dist/browser/atomic-actions.js +178 -0
- package/dist/browser/atomic-actions.js.map +1 -0
- package/dist/browser/browser-tools.d.ts +86 -0
- package/dist/browser/browser-tools.d.ts.map +1 -0
- package/dist/browser/browser-tools.js +329 -0
- package/dist/browser/browser-tools.js.map +1 -0
- package/dist/browser/camoufox-backend.d.ts +166 -0
- package/dist/browser/camoufox-backend.d.ts.map +1 -0
- package/dist/browser/camoufox-backend.js +500 -0
- package/dist/browser/camoufox-backend.js.map +1 -0
- package/dist/browser/chrome-bridge.d.ts +183 -0
- package/dist/browser/chrome-bridge.d.ts.map +1 -0
- package/dist/browser/chrome-bridge.js +607 -0
- package/dist/browser/chrome-bridge.js.map +1 -0
- package/dist/browser/tab-registry.d.ts +103 -0
- package/dist/browser/tab-registry.d.ts.map +1 -0
- package/dist/browser/tab-registry.js +191 -0
- package/dist/browser/tab-registry.js.map +1 -0
- package/dist/build/auth-provisioner.d.ts +55 -0
- package/dist/build/auth-provisioner.d.ts.map +1 -0
- package/dist/build/auth-provisioner.js +207 -0
- package/dist/build/auth-provisioner.js.map +1 -0
- package/dist/build/db-provisioner.d.ts +63 -0
- package/dist/build/db-provisioner.d.ts.map +1 -0
- package/dist/build/db-provisioner.js +254 -0
- package/dist/build/db-provisioner.js.map +1 -0
- package/dist/build/deploy-adapter.d.ts +72 -0
- package/dist/build/deploy-adapter.d.ts.map +1 -0
- package/dist/build/deploy-adapter.js +273 -0
- package/dist/build/deploy-adapter.js.map +1 -0
- package/dist/build/deploy-targets/coolify.d.ts +148 -0
- package/dist/build/deploy-targets/coolify.d.ts.map +1 -0
- package/dist/build/deploy-targets/coolify.js +339 -0
- package/dist/build/deploy-targets/coolify.js.map +1 -0
- package/dist/build/deploy-targets/dokploy.d.ts +139 -0
- package/dist/build/deploy-targets/dokploy.d.ts.map +1 -0
- package/dist/build/deploy-targets/dokploy.js +339 -0
- package/dist/build/deploy-targets/dokploy.js.map +1 -0
- package/dist/build/scaffold-pack-materializer.d.ts +108 -0
- package/dist/build/scaffold-pack-materializer.d.ts.map +1 -0
- package/dist/build/scaffold-pack-materializer.js +235 -0
- package/dist/build/scaffold-pack-materializer.js.map +1 -0
- package/dist/build/scaffold-registry.d.ts +103 -0
- package/dist/build/scaffold-registry.d.ts.map +1 -0
- package/dist/build/scaffold-registry.js +279 -0
- package/dist/build/scaffold-registry.js.map +1 -0
- package/dist/channels/adapter.d.ts +94 -0
- package/dist/channels/adapter.d.ts.map +1 -0
- package/dist/channels/adapter.js +94 -0
- package/dist/channels/adapter.js.map +1 -0
- package/dist/channels/auto-detect.d.ts +165 -0
- package/dist/channels/auto-detect.d.ts.map +1 -0
- package/dist/channels/auto-detect.js +869 -0
- package/dist/channels/auto-detect.js.map +1 -0
- package/dist/channels/channel-types.d.ts +16 -0
- package/dist/channels/channel-types.d.ts.map +1 -0
- package/dist/channels/channel-types.js +15 -0
- package/dist/channels/channel-types.js.map +1 -0
- package/dist/channels/dingtalk.d.ts +65 -0
- package/dist/channels/dingtalk.d.ts.map +1 -0
- package/dist/channels/dingtalk.js +158 -0
- package/dist/channels/dingtalk.js.map +1 -0
- package/dist/channels/discord.d.ts +58 -0
- package/dist/channels/discord.d.ts.map +1 -0
- package/dist/channels/discord.js +257 -0
- package/dist/channels/discord.js.map +1 -0
- package/dist/channels/dispatch.d.ts +109 -0
- package/dist/channels/dispatch.d.ts.map +1 -0
- package/dist/channels/dispatch.js +266 -0
- package/dist/channels/dispatch.js.map +1 -0
- package/dist/channels/email.d.ts +42 -0
- package/dist/channels/email.d.ts.map +1 -0
- package/dist/channels/email.js +166 -0
- package/dist/channels/email.js.map +1 -0
- package/dist/channels/fan-out.d.ts +112 -0
- package/dist/channels/fan-out.d.ts.map +1 -0
- package/dist/channels/fan-out.js +202 -0
- package/dist/channels/fan-out.js.map +1 -0
- package/dist/channels/feishu.d.ts +85 -0
- package/dist/channels/feishu.d.ts.map +1 -0
- package/dist/channels/feishu.js +215 -0
- package/dist/channels/feishu.js.map +1 -0
- package/dist/channels/gateway.d.ts +207 -0
- package/dist/channels/gateway.d.ts.map +1 -0
- package/dist/channels/gateway.js +379 -0
- package/dist/channels/gateway.js.map +1 -0
- package/dist/channels/github-bot.d.ts +94 -0
- package/dist/channels/github-bot.d.ts.map +1 -0
- package/dist/channels/github-bot.js +318 -0
- package/dist/channels/github-bot.js.map +1 -0
- package/dist/channels/google-chat.d.ts +40 -0
- package/dist/channels/google-chat.d.ts.map +1 -0
- package/dist/channels/google-chat.js +84 -0
- package/dist/channels/google-chat.js.map +1 -0
- package/dist/channels/ide-bridge.d.ts +77 -0
- package/dist/channels/ide-bridge.d.ts.map +1 -0
- package/dist/channels/ide-bridge.js +316 -0
- package/dist/channels/ide-bridge.js.map +1 -0
- package/dist/channels/imessage-gateway-adapter.d.ts +25 -0
- package/dist/channels/imessage-gateway-adapter.d.ts.map +1 -0
- package/dist/channels/imessage-gateway-adapter.js +57 -0
- package/dist/channels/imessage-gateway-adapter.js.map +1 -0
- package/dist/channels/imessage.d.ts +45 -0
- package/dist/channels/imessage.d.ts.map +1 -0
- package/dist/channels/imessage.js +140 -0
- package/dist/channels/imessage.js.map +1 -0
- package/dist/channels/integration.d.ts +16 -0
- package/dist/channels/integration.d.ts.map +1 -0
- package/dist/channels/integration.js +79 -0
- package/dist/channels/integration.js.map +1 -0
- package/dist/channels/irc.d.ts +58 -0
- package/dist/channels/irc.d.ts.map +1 -0
- package/dist/channels/irc.js +188 -0
- package/dist/channels/irc.js.map +1 -0
- package/dist/channels/line.d.ts +75 -0
- package/dist/channels/line.d.ts.map +1 -0
- package/dist/channels/line.js +226 -0
- package/dist/channels/line.js.map +1 -0
- package/dist/channels/mastodon.d.ts +82 -0
- package/dist/channels/mastodon.d.ts.map +1 -0
- package/dist/channels/mastodon.js +217 -0
- package/dist/channels/mastodon.js.map +1 -0
- package/dist/channels/matrix.d.ts +36 -0
- package/dist/channels/matrix.d.ts.map +1 -0
- package/dist/channels/matrix.js +161 -0
- package/dist/channels/matrix.js.map +1 -0
- package/dist/channels/push-inversion.d.ts +63 -0
- package/dist/channels/push-inversion.d.ts.map +1 -0
- package/dist/channels/push-inversion.js +167 -0
- package/dist/channels/push-inversion.js.map +1 -0
- package/dist/channels/route-policies.d.ts +144 -0
- package/dist/channels/route-policies.d.ts.map +1 -0
- package/dist/channels/route-policies.js +374 -0
- package/dist/channels/route-policies.js.map +1 -0
- package/dist/channels/signal.d.ts +25 -0
- package/dist/channels/signal.d.ts.map +1 -0
- package/dist/channels/signal.js +109 -0
- package/dist/channels/signal.js.map +1 -0
- package/dist/channels/slack.d.ts +52 -0
- package/dist/channels/slack.d.ts.map +1 -0
- package/dist/channels/slack.js +194 -0
- package/dist/channels/slack.js.map +1 -0
- package/dist/channels/sms.d.ts +63 -0
- package/dist/channels/sms.d.ts.map +1 -0
- package/dist/channels/sms.js +151 -0
- package/dist/channels/sms.js.map +1 -0
- package/dist/channels/teams.d.ts +120 -0
- package/dist/channels/teams.d.ts.map +1 -0
- package/dist/channels/teams.js +263 -0
- package/dist/channels/teams.js.map +1 -0
- package/dist/channels/telegram.d.ts +55 -0
- package/dist/channels/telegram.d.ts.map +1 -0
- package/dist/channels/telegram.js +187 -0
- package/dist/channels/telegram.js.map +1 -0
- package/dist/channels/terminal-mention.d.ts +43 -0
- package/dist/channels/terminal-mention.d.ts.map +1 -0
- package/dist/channels/terminal-mention.js +86 -0
- package/dist/channels/terminal-mention.js.map +1 -0
- package/dist/channels/unified-dispatch.d.ts +190 -0
- package/dist/channels/unified-dispatch.d.ts.map +1 -0
- package/dist/channels/unified-dispatch.js +554 -0
- package/dist/channels/unified-dispatch.js.map +1 -0
- package/dist/channels/viber.d.ts +72 -0
- package/dist/channels/viber.d.ts.map +1 -0
- package/dist/channels/viber.js +185 -0
- package/dist/channels/viber.js.map +1 -0
- package/dist/channels/webchat.d.ts +44 -0
- package/dist/channels/webchat.d.ts.map +1 -0
- package/dist/channels/webchat.js +218 -0
- package/dist/channels/webchat.js.map +1 -0
- package/dist/channels/webhook-router.d.ts +155 -0
- package/dist/channels/webhook-router.d.ts.map +1 -0
- package/dist/channels/webhook-router.js +411 -0
- package/dist/channels/webhook-router.js.map +1 -0
- package/dist/channels/webhook.d.ts +28 -0
- package/dist/channels/webhook.d.ts.map +1 -0
- package/dist/channels/webhook.js +129 -0
- package/dist/channels/webhook.js.map +1 -0
- package/dist/channels/wechat.d.ts +68 -0
- package/dist/channels/wechat.d.ts.map +1 -0
- package/dist/channels/wechat.js +196 -0
- package/dist/channels/wechat.js.map +1 -0
- package/dist/channels/whatsapp.d.ts +74 -0
- package/dist/channels/whatsapp.d.ts.map +1 -0
- package/dist/channels/whatsapp.js +268 -0
- package/dist/channels/whatsapp.js.map +1 -0
- package/dist/claude/agents/definitions.d.ts +79 -0
- package/dist/claude/agents/definitions.d.ts.map +1 -0
- package/dist/claude/agents/definitions.js +196 -0
- package/dist/claude/agents/definitions.js.map +1 -0
- package/dist/claude/agents/index.d.ts +6 -0
- package/dist/claude/agents/index.d.ts.map +1 -0
- package/dist/claude/agents/index.js +5 -0
- package/dist/claude/agents/index.js.map +1 -0
- package/dist/claude/bridge-deps.d.ts +47 -0
- package/dist/claude/bridge-deps.d.ts.map +1 -0
- package/dist/claude/bridge-deps.js +251 -0
- package/dist/claude/bridge-deps.js.map +1 -0
- package/dist/claude/bridge.d.ts +65 -0
- package/dist/claude/bridge.d.ts.map +1 -0
- package/dist/claude/bridge.js +110 -0
- package/dist/claude/bridge.js.map +1 -0
- package/dist/claude/channels/index.d.ts +6 -0
- package/dist/claude/channels/index.d.ts.map +1 -0
- package/dist/claude/channels/index.js +5 -0
- package/dist/claude/channels/index.js.map +1 -0
- package/dist/claude/channels/wotann-channel.d.ts +103 -0
- package/dist/claude/channels/wotann-channel.d.ts.map +1 -0
- package/dist/claude/channels/wotann-channel.js +224 -0
- package/dist/claude/channels/wotann-channel.js.map +1 -0
- package/dist/claude/hardening/error-handler.d.ts +52 -0
- package/dist/claude/hardening/error-handler.d.ts.map +1 -0
- package/dist/claude/hardening/error-handler.js +158 -0
- package/dist/claude/hardening/error-handler.js.map +1 -0
- package/dist/claude/hardening/feature-flag.d.ts +36 -0
- package/dist/claude/hardening/feature-flag.d.ts.map +1 -0
- package/dist/claude/hardening/feature-flag.js +70 -0
- package/dist/claude/hardening/feature-flag.js.map +1 -0
- package/dist/claude/hardening/index.d.ts +8 -0
- package/dist/claude/hardening/index.d.ts.map +1 -0
- package/dist/claude/hardening/index.js +6 -0
- package/dist/claude/hardening/index.js.map +1 -0
- package/dist/claude/hardening/telemetry.d.ts +64 -0
- package/dist/claude/hardening/telemetry.d.ts.map +1 -0
- package/dist/claude/hardening/telemetry.js +129 -0
- package/dist/claude/hardening/telemetry.js.map +1 -0
- package/dist/claude/hooks/config-builder.d.ts +37 -0
- package/dist/claude/hooks/config-builder.d.ts.map +1 -0
- package/dist/claude/hooks/config-builder.js +55 -0
- package/dist/claude/hooks/config-builder.js.map +1 -0
- package/dist/claude/hooks/index.d.ts +19 -0
- package/dist/claude/hooks/index.d.ts.map +1 -0
- package/dist/claude/hooks/index.js +17 -0
- package/dist/claude/hooks/index.js.map +1 -0
- package/dist/claude/hooks/post-tool-use.d.ts +16 -0
- package/dist/claude/hooks/post-tool-use.d.ts.map +1 -0
- package/dist/claude/hooks/post-tool-use.js +91 -0
- package/dist/claude/hooks/post-tool-use.js.map +1 -0
- package/dist/claude/hooks/pre-compact.d.ts +14 -0
- package/dist/claude/hooks/pre-compact.d.ts.map +1 -0
- package/dist/claude/hooks/pre-compact.js +30 -0
- package/dist/claude/hooks/pre-compact.js.map +1 -0
- package/dist/claude/hooks/pre-tool-use.d.ts +24 -0
- package/dist/claude/hooks/pre-tool-use.d.ts.map +1 -0
- package/dist/claude/hooks/pre-tool-use.js +120 -0
- package/dist/claude/hooks/pre-tool-use.js.map +1 -0
- package/dist/claude/hooks/server.d.ts +67 -0
- package/dist/claude/hooks/server.d.ts.map +1 -0
- package/dist/claude/hooks/server.js +396 -0
- package/dist/claude/hooks/server.js.map +1 -0
- package/dist/claude/hooks/session-start.d.ts +20 -0
- package/dist/claude/hooks/session-start.d.ts.map +1 -0
- package/dist/claude/hooks/session-start.js +55 -0
- package/dist/claude/hooks/session-start.js.map +1 -0
- package/dist/claude/hooks/stop.d.ts +19 -0
- package/dist/claude/hooks/stop.d.ts.map +1 -0
- package/dist/claude/hooks/stop.js +57 -0
- package/dist/claude/hooks/stop.js.map +1 -0
- package/dist/claude/hooks/user-prompt-submit.d.ts +20 -0
- package/dist/claude/hooks/user-prompt-submit.d.ts.map +1 -0
- package/dist/claude/hooks/user-prompt-submit.js +59 -0
- package/dist/claude/hooks/user-prompt-submit.js.map +1 -0
- package/dist/claude/index.d.ts +30 -0
- package/dist/claude/index.d.ts.map +1 -0
- package/dist/claude/index.js +27 -0
- package/dist/claude/index.js.map +1 -0
- package/dist/claude/types.d.ts +206 -0
- package/dist/claude/types.d.ts.map +1 -0
- package/dist/claude/types.js +27 -0
- package/dist/claude/types.js.map +1 -0
- package/dist/cli/audit.d.ts +17 -0
- package/dist/cli/audit.d.ts.map +1 -0
- package/dist/cli/audit.js +54 -0
- package/dist/cli/audit.js.map +1 -0
- package/dist/cli/autofix-pr.d.ts +40 -0
- package/dist/cli/autofix-pr.d.ts.map +1 -0
- package/dist/cli/autofix-pr.js +199 -0
- package/dist/cli/autofix-pr.js.map +1 -0
- package/dist/cli/away-summary.d.ts +62 -0
- package/dist/cli/away-summary.d.ts.map +1 -0
- package/dist/cli/away-summary.js +141 -0
- package/dist/cli/away-summary.js.map +1 -0
- package/dist/cli/ci-runner.d.ts +52 -0
- package/dist/cli/ci-runner.d.ts.map +1 -0
- package/dist/cli/ci-runner.js +143 -0
- package/dist/cli/ci-runner.js.map +1 -0
- package/dist/cli/cli-detection.d.ts +41 -0
- package/dist/cli/cli-detection.d.ts.map +1 -0
- package/dist/cli/cli-detection.js +148 -0
- package/dist/cli/cli-detection.js.map +1 -0
- package/dist/cli/commands/acp-register.d.ts +73 -0
- package/dist/cli/commands/acp-register.d.ts.map +1 -0
- package/dist/cli/commands/acp-register.js +134 -0
- package/dist/cli/commands/acp-register.js.map +1 -0
- package/dist/cli/commands/best-of-n.d.ts +74 -0
- package/dist/cli/commands/best-of-n.d.ts.map +1 -0
- package/dist/cli/commands/best-of-n.js +144 -0
- package/dist/cli/commands/best-of-n.js.map +1 -0
- package/dist/cli/commands/browse.d.ts +46 -0
- package/dist/cli/commands/browse.d.ts.map +1 -0
- package/dist/cli/commands/browse.js +230 -0
- package/dist/cli/commands/browse.js.map +1 -0
- package/dist/cli/commands/build.d.ts +92 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/build.js +238 -0
- package/dist/cli/commands/build.js.map +1 -0
- package/dist/cli/commands/deploy.d.ts +60 -0
- package/dist/cli/commands/deploy.d.ts.map +1 -0
- package/dist/cli/commands/deploy.js +107 -0
- package/dist/cli/commands/deploy.js.map +1 -0
- package/dist/cli/commands/design-apply.d.ts +81 -0
- package/dist/cli/commands/design-apply.d.ts.map +1 -0
- package/dist/cli/commands/design-apply.js +122 -0
- package/dist/cli/commands/design-apply.js.map +1 -0
- package/dist/cli/commands/design-export.d.ts +62 -0
- package/dist/cli/commands/design-export.d.ts.map +1 -0
- package/dist/cli/commands/design-export.js +88 -0
- package/dist/cli/commands/design-export.js.map +1 -0
- package/dist/cli/commands/design-extract.d.ts +40 -0
- package/dist/cli/commands/design-extract.d.ts.map +1 -0
- package/dist/cli/commands/design-extract.js +72 -0
- package/dist/cli/commands/design-extract.js.map +1 -0
- package/dist/cli/commands/design-lint.d.ts +49 -0
- package/dist/cli/commands/design-lint.d.ts.map +1 -0
- package/dist/cli/commands/design-lint.js +235 -0
- package/dist/cli/commands/design-lint.js.map +1 -0
- package/dist/cli/commands/design-mode.d.ts +50 -0
- package/dist/cli/commands/design-mode.d.ts.map +1 -0
- package/dist/cli/commands/design-mode.js +311 -0
- package/dist/cli/commands/design-mode.js.map +1 -0
- package/dist/cli/commands/design-preview.d.ts +69 -0
- package/dist/cli/commands/design-preview.d.ts.map +1 -0
- package/dist/cli/commands/design-preview.js +171 -0
- package/dist/cli/commands/design-preview.js.map +1 -0
- package/dist/cli/commands/design-verify.d.ts +59 -0
- package/dist/cli/commands/design-verify.d.ts.map +1 -0
- package/dist/cli/commands/design-verify.js +74 -0
- package/dist/cli/commands/design-verify.js.map +1 -0
- package/dist/cli/commands/exploit.d.ts +126 -0
- package/dist/cli/commands/exploit.d.ts.map +1 -0
- package/dist/cli/commands/exploit.js +298 -0
- package/dist/cli/commands/exploit.js.map +1 -0
- package/dist/cli/commands/grep.d.ts +92 -0
- package/dist/cli/commands/grep.d.ts.map +1 -0
- package/dist/cli/commands/grep.js +221 -0
- package/dist/cli/commands/grep.js.map +1 -0
- package/dist/cli/commands/intent.d.ts +43 -0
- package/dist/cli/commands/intent.d.ts.map +1 -0
- package/dist/cli/commands/intent.js +282 -0
- package/dist/cli/commands/intent.js.map +1 -0
- package/dist/cli/commands/magic.d.ts +41 -0
- package/dist/cli/commands/magic.d.ts.map +1 -0
- package/dist/cli/commands/magic.js +67 -0
- package/dist/cli/commands/magic.js.map +1 -0
- package/dist/cli/commands/multitask.d.ts +62 -0
- package/dist/cli/commands/multitask.d.ts.map +1 -0
- package/dist/cli/commands/multitask.js +111 -0
- package/dist/cli/commands/multitask.js.map +1 -0
- package/dist/cli/commands/onboard.d.ts +44 -0
- package/dist/cli/commands/onboard.d.ts.map +1 -0
- package/dist/cli/commands/onboard.js +112 -0
- package/dist/cli/commands/onboard.js.map +1 -0
- package/dist/cli/commands/review.d.ts +139 -0
- package/dist/cli/commands/review.d.ts.map +1 -0
- package/dist/cli/commands/review.js +364 -0
- package/dist/cli/commands/review.js.map +1 -0
- package/dist/cli/commands/rules.d.ts +140 -0
- package/dist/cli/commands/rules.d.ts.map +1 -0
- package/dist/cli/commands/rules.js +251 -0
- package/dist/cli/commands/rules.js.map +1 -0
- package/dist/cli/commands/sandbox.d.ts +64 -0
- package/dist/cli/commands/sandbox.d.ts.map +1 -0
- package/dist/cli/commands/sandbox.js +69 -0
- package/dist/cli/commands/sandbox.js.map +1 -0
- package/dist/cli/commands/sop.d.ts +70 -0
- package/dist/cli/commands/sop.d.ts.map +1 -0
- package/dist/cli/commands/sop.js +152 -0
- package/dist/cli/commands/sop.js.map +1 -0
- package/dist/cli/commands/stuck.d.ts +51 -0
- package/dist/cli/commands/stuck.d.ts.map +1 -0
- package/dist/cli/commands/stuck.js +249 -0
- package/dist/cli/commands/stuck.js.map +1 -0
- package/dist/cli/commands/worktree.d.ts +49 -0
- package/dist/cli/commands/worktree.d.ts.map +1 -0
- package/dist/cli/commands/worktree.js +153 -0
- package/dist/cli/commands/worktree.js.map +1 -0
- package/dist/cli/commands.d.ts +30 -0
- package/dist/cli/commands.d.ts.map +1 -0
- package/dist/cli/commands.js +446 -0
- package/dist/cli/commands.js.map +1 -0
- package/dist/cli/components/AuthModeBanner.d.ts +43 -0
- package/dist/cli/components/AuthModeBanner.d.ts.map +1 -0
- package/dist/cli/components/AuthModeBanner.js +25 -0
- package/dist/cli/components/AuthModeBanner.js.map +1 -0
- package/dist/cli/debug-share.d.ts +94 -0
- package/dist/cli/debug-share.d.ts.map +1 -0
- package/dist/cli/debug-share.js +227 -0
- package/dist/cli/debug-share.js.map +1 -0
- package/dist/cli/first-run-runner-factory.d.ts +99 -0
- package/dist/cli/first-run-runner-factory.d.ts.map +1 -0
- package/dist/cli/first-run-runner-factory.js +188 -0
- package/dist/cli/first-run-runner-factory.js.map +1 -0
- package/dist/cli/first-run-success.d.ts +123 -0
- package/dist/cli/first-run-success.d.ts.map +1 -0
- package/dist/cli/first-run-success.js +124 -0
- package/dist/cli/first-run-success.js.map +1 -0
- package/dist/cli/fork.d.ts +80 -0
- package/dist/cli/fork.d.ts.map +1 -0
- package/dist/cli/fork.js +127 -0
- package/dist/cli/fork.js.map +1 -0
- package/dist/cli/hooks-browser.d.ts +142 -0
- package/dist/cli/hooks-browser.d.ts.map +1 -0
- package/dist/cli/hooks-browser.js +238 -0
- package/dist/cli/hooks-browser.js.map +1 -0
- package/dist/cli/local-status.d.ts +11 -0
- package/dist/cli/local-status.d.ts.map +1 -0
- package/dist/cli/local-status.js +56 -0
- package/dist/cli/local-status.js.map +1 -0
- package/dist/cli/loop-command.d.ts +46 -0
- package/dist/cli/loop-command.d.ts.map +1 -0
- package/dist/cli/loop-command.js +123 -0
- package/dist/cli/loop-command.js.map +1 -0
- package/dist/cli/onboarding-screens/done-screen.d.ts +23 -0
- package/dist/cli/onboarding-screens/done-screen.d.ts.map +1 -0
- package/dist/cli/onboarding-screens/done-screen.js +10 -0
- package/dist/cli/onboarding-screens/done-screen.js.map +1 -0
- package/dist/cli/onboarding-screens/first-run-screen.d.ts +27 -0
- package/dist/cli/onboarding-screens/first-run-screen.d.ts.map +1 -0
- package/dist/cli/onboarding-screens/first-run-screen.js +62 -0
- package/dist/cli/onboarding-screens/first-run-screen.js.map +1 -0
- package/dist/cli/onboarding-screens.d.ts +227 -0
- package/dist/cli/onboarding-screens.d.ts.map +1 -0
- package/dist/cli/onboarding-screens.js +467 -0
- package/dist/cli/onboarding-screens.js.map +1 -0
- package/dist/cli/onboarding.d.ts +34 -0
- package/dist/cli/onboarding.d.ts.map +1 -0
- package/dist/cli/onboarding.js +150 -0
- package/dist/cli/onboarding.js.map +1 -0
- package/dist/cli/orphan-wires/anthropic-write-cmd.d.ts +21 -0
- package/dist/cli/orphan-wires/anthropic-write-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/anthropic-write-cmd.js +83 -0
- package/dist/cli/orphan-wires/anthropic-write-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/archon-cmd.d.ts +11 -0
- package/dist/cli/orphan-wires/archon-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/archon-cmd.js +74 -0
- package/dist/cli/orphan-wires/archon-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/cli-anything-cmd.d.ts +17 -0
- package/dist/cli/orphan-wires/cli-anything-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/cli-anything-cmd.js +39 -0
- package/dist/cli/orphan-wires/cli-anything-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/dev-search-cmd.d.ts +10 -0
- package/dist/cli/orphan-wires/dev-search-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/dev-search-cmd.js +28 -0
- package/dist/cli/orphan-wires/dev-search-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/effort-mode-cmd.d.ts +8 -0
- package/dist/cli/orphan-wires/effort-mode-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/effort-mode-cmd.js +40 -0
- package/dist/cli/orphan-wires/effort-mode-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/flow-cmd.d.ts +9 -0
- package/dist/cli/orphan-wires/flow-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/flow-cmd.js +64 -0
- package/dist/cli/orphan-wires/flow-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/handoff-cmd.d.ts +11 -0
- package/dist/cli/orphan-wires/handoff-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/handoff-cmd.js +48 -0
- package/dist/cli/orphan-wires/handoff-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/index.d.ts +20 -0
- package/dist/cli/orphan-wires/index.d.ts.map +1 -0
- package/dist/cli/orphan-wires/index.js +61 -0
- package/dist/cli/orphan-wires/index.js.map +1 -0
- package/dist/cli/orphan-wires/markitdown-cmd.d.ts +10 -0
- package/dist/cli/orphan-wires/markitdown-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/markitdown-cmd.js +44 -0
- package/dist/cli/orphan-wires/markitdown-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/multitask-cmd.d.ts +8 -0
- package/dist/cli/orphan-wires/multitask-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/multitask-cmd.js +43 -0
- package/dist/cli/orphan-wires/multitask-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/n8n-template-cmd.d.ts +7 -0
- package/dist/cli/orphan-wires/n8n-template-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/n8n-template-cmd.js +81 -0
- package/dist/cli/orphan-wires/n8n-template-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/onboard-cmd.d.ts +9 -0
- package/dist/cli/orphan-wires/onboard-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/onboard-cmd.js +60 -0
- package/dist/cli/orphan-wires/onboard-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/outline-cmd.d.ts +8 -0
- package/dist/cli/orphan-wires/outline-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/outline-cmd.js +47 -0
- package/dist/cli/orphan-wires/outline-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/private-mode-cmd.d.ts +8 -0
- package/dist/cli/orphan-wires/private-mode-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/private-mode-cmd.js +51 -0
- package/dist/cli/orphan-wires/private-mode-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/prompt-corpus-cmd.d.ts +7 -0
- package/dist/cli/orphan-wires/prompt-corpus-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/prompt-corpus-cmd.js +32 -0
- package/dist/cli/orphan-wires/prompt-corpus-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/prompt-files-cmd.d.ts +7 -0
- package/dist/cli/orphan-wires/prompt-files-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/prompt-files-cmd.js +58 -0
- package/dist/cli/orphan-wires/prompt-files-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/promptfoo-assert-cmd.d.ts +19 -0
- package/dist/cli/orphan-wires/promptfoo-assert-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/promptfoo-assert-cmd.js +81 -0
- package/dist/cli/orphan-wires/promptfoo-assert-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/proof-of-work-cmd.d.ts +25 -0
- package/dist/cli/orphan-wires/proof-of-work-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/proof-of-work-cmd.js +132 -0
- package/dist/cli/orphan-wires/proof-of-work-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/redteam-cmd.d.ts +7 -0
- package/dist/cli/orphan-wires/redteam-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/redteam-cmd.js +26 -0
- package/dist/cli/orphan-wires/redteam-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/skill-catalog-cmd.d.ts +22 -0
- package/dist/cli/orphan-wires/skill-catalog-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/skill-catalog-cmd.js +92 -0
- package/dist/cli/orphan-wires/skill-catalog-cmd.js.map +1 -0
- package/dist/cli/repl-mode.d.ts +62 -0
- package/dist/cli/repl-mode.d.ts.map +1 -0
- package/dist/cli/repl-mode.js +178 -0
- package/dist/cli/repl-mode.js.map +1 -0
- package/dist/cli/replay.d.ts +100 -0
- package/dist/cli/replay.d.ts.map +1 -0
- package/dist/cli/replay.js +147 -0
- package/dist/cli/replay.js.map +1 -0
- package/dist/cli/run-onboarding-wizard.d.ts +81 -0
- package/dist/cli/run-onboarding-wizard.d.ts.map +1 -0
- package/dist/cli/run-onboarding-wizard.js +182 -0
- package/dist/cli/run-onboarding-wizard.js.map +1 -0
- package/dist/cli/runtime-query.d.ts +24 -0
- package/dist/cli/runtime-query.d.ts.map +1 -0
- package/dist/cli/runtime-query.js +49 -0
- package/dist/cli/runtime-query.js.map +1 -0
- package/dist/cli/safety/read-only-gate.d.ts +86 -0
- package/dist/cli/safety/read-only-gate.d.ts.map +1 -0
- package/dist/cli/safety/read-only-gate.js +115 -0
- package/dist/cli/safety/read-only-gate.js.map +1 -0
- package/dist/cli/self-improve.d.ts +41 -0
- package/dist/cli/self-improve.d.ts.map +1 -0
- package/dist/cli/self-improve.js +140 -0
- package/dist/cli/self-improve.js.map +1 -0
- package/dist/cli/session-recap.d.ts +109 -0
- package/dist/cli/session-recap.d.ts.map +1 -0
- package/dist/cli/session-recap.js +176 -0
- package/dist/cli/session-recap.js.map +1 -0
- package/dist/cli/team-onboarding.d.ts +51 -0
- package/dist/cli/team-onboarding.d.ts.map +1 -0
- package/dist/cli/team-onboarding.js +326 -0
- package/dist/cli/team-onboarding.js.map +1 -0
- package/dist/cli/test-provider.d.ts +6 -0
- package/dist/cli/test-provider.d.ts.map +1 -0
- package/dist/cli/test-provider.js +100 -0
- package/dist/cli/test-provider.js.map +1 -0
- package/dist/cli/thin-client.d.ts +86 -0
- package/dist/cli/thin-client.d.ts.map +1 -0
- package/dist/cli/thin-client.js +237 -0
- package/dist/cli/thin-client.js.map +1 -0
- package/dist/cli/tricks/completion-checklist.d.ts +58 -0
- package/dist/cli/tricks/completion-checklist.d.ts.map +1 -0
- package/dist/cli/tricks/completion-checklist.js +121 -0
- package/dist/cli/tricks/completion-checklist.js.map +1 -0
- package/dist/cli/tricks/image-read.d.ts +45 -0
- package/dist/cli/tricks/image-read.d.ts.map +1 -0
- package/dist/cli/tricks/image-read.js +74 -0
- package/dist/cli/tricks/image-read.js.map +1 -0
- package/dist/cli/tricks/terminal-run.d.ts +73 -0
- package/dist/cli/tricks/terminal-run.d.ts.map +1 -0
- package/dist/cli/tricks/terminal-run.js +91 -0
- package/dist/cli/tricks/terminal-run.js.map +1 -0
- package/dist/cli/tricks/tmux-pull.d.ts +67 -0
- package/dist/cli/tricks/tmux-pull.d.ts.map +1 -0
- package/dist/cli/tricks/tmux-pull.js +77 -0
- package/dist/cli/tricks/tmux-pull.js.map +1 -0
- package/dist/cli/voice-cmds.d.ts +37 -0
- package/dist/cli/voice-cmds.d.ts.map +1 -0
- package/dist/cli/voice-cmds.js +83 -0
- package/dist/cli/voice-cmds.js.map +1 -0
- package/dist/cli/voice.d.ts +12 -0
- package/dist/cli/voice.d.ts.map +1 -0
- package/dist/cli/voice.js +15 -0
- package/dist/cli/voice.js.map +1 -0
- package/dist/cli/watch-mode.d.ts +64 -0
- package/dist/cli/watch-mode.d.ts.map +1 -0
- package/dist/cli/watch-mode.js +214 -0
- package/dist/cli/watch-mode.js.map +1 -0
- package/dist/computer-use/action-repertoire.d.ts +117 -0
- package/dist/computer-use/action-repertoire.d.ts.map +1 -0
- package/dist/computer-use/action-repertoire.js +214 -0
- package/dist/computer-use/action-repertoire.js.map +1 -0
- package/dist/computer-use/action-replay.d.ts +103 -0
- package/dist/computer-use/action-replay.d.ts.map +1 -0
- package/dist/computer-use/action-replay.js +160 -0
- package/dist/computer-use/action-replay.js.map +1 -0
- package/dist/computer-use/computer-agent.d.ts +124 -0
- package/dist/computer-use/computer-agent.d.ts.map +1 -0
- package/dist/computer-use/computer-agent.js +378 -0
- package/dist/computer-use/computer-agent.js.map +1 -0
- package/dist/computer-use/confidence-gate.d.ts +80 -0
- package/dist/computer-use/confidence-gate.d.ts.map +1 -0
- package/dist/computer-use/confidence-gate.js +111 -0
- package/dist/computer-use/confidence-gate.js.map +1 -0
- package/dist/computer-use/cursor-sprite.d.ts +103 -0
- package/dist/computer-use/cursor-sprite.d.ts.map +1 -0
- package/dist/computer-use/cursor-sprite.js +193 -0
- package/dist/computer-use/cursor-sprite.js.map +1 -0
- package/dist/computer-use/non-stealing-input.d.ts +79 -0
- package/dist/computer-use/non-stealing-input.d.ts.map +1 -0
- package/dist/computer-use/non-stealing-input.js +133 -0
- package/dist/computer-use/non-stealing-input.js.map +1 -0
- package/dist/computer-use/perception-adapter.d.ts +56 -0
- package/dist/computer-use/perception-adapter.d.ts.map +1 -0
- package/dist/computer-use/perception-adapter.js +216 -0
- package/dist/computer-use/perception-adapter.js.map +1 -0
- package/dist/computer-use/perception-engine.d.ts +203 -0
- package/dist/computer-use/perception-engine.d.ts.map +1 -0
- package/dist/computer-use/perception-engine.js +886 -0
- package/dist/computer-use/perception-engine.js.map +1 -0
- package/dist/computer-use/persistent-task-queue.d.ts +85 -0
- package/dist/computer-use/persistent-task-queue.d.ts.map +1 -0
- package/dist/computer-use/persistent-task-queue.js +182 -0
- package/dist/computer-use/persistent-task-queue.js.map +1 -0
- package/dist/computer-use/platform-bindings.d.ts +115 -0
- package/dist/computer-use/platform-bindings.d.ts.map +1 -0
- package/dist/computer-use/platform-bindings.js +783 -0
- package/dist/computer-use/platform-bindings.js.map +1 -0
- package/dist/computer-use/session-scoped-perception.d.ts +111 -0
- package/dist/computer-use/session-scoped-perception.d.ts.map +1 -0
- package/dist/computer-use/session-scoped-perception.js +262 -0
- package/dist/computer-use/session-scoped-perception.js.map +1 -0
- package/dist/computer-use/types.d.ts +157 -0
- package/dist/computer-use/types.d.ts.map +1 -0
- package/dist/computer-use/types.js +5 -0
- package/dist/computer-use/types.js.map +1 -0
- package/dist/computer-use/virtual-cursor-pool.d.ts +98 -0
- package/dist/computer-use/virtual-cursor-pool.d.ts.map +1 -0
- package/dist/computer-use/virtual-cursor-pool.js +231 -0
- package/dist/computer-use/virtual-cursor-pool.js.map +1 -0
- package/dist/computer-use/vm-isolation.d.ts +90 -0
- package/dist/computer-use/vm-isolation.d.ts.map +1 -0
- package/dist/computer-use/vm-isolation.js +140 -0
- package/dist/computer-use/vm-isolation.js.map +1 -0
- package/dist/connectors/confluence.d.ts +32 -0
- package/dist/connectors/confluence.d.ts.map +1 -0
- package/dist/connectors/confluence.js +132 -0
- package/dist/connectors/confluence.js.map +1 -0
- package/dist/connectors/connector-registry.d.ts +115 -0
- package/dist/connectors/connector-registry.d.ts.map +1 -0
- package/dist/connectors/connector-registry.js +166 -0
- package/dist/connectors/connector-registry.js.map +1 -0
- package/dist/connectors/connector-tools.d.ts +229 -0
- package/dist/connectors/connector-tools.d.ts.map +1 -0
- package/dist/connectors/connector-tools.js +778 -0
- package/dist/connectors/connector-tools.js.map +1 -0
- package/dist/connectors/connector-webhook-server.d.ts +138 -0
- package/dist/connectors/connector-webhook-server.d.ts.map +1 -0
- package/dist/connectors/connector-webhook-server.js +374 -0
- package/dist/connectors/connector-webhook-server.js.map +1 -0
- package/dist/connectors/connector-writes.d.ts +253 -0
- package/dist/connectors/connector-writes.d.ts.map +1 -0
- package/dist/connectors/connector-writes.js +1044 -0
- package/dist/connectors/connector-writes.js.map +1 -0
- package/dist/connectors/google-drive.d.ts +35 -0
- package/dist/connectors/google-drive.d.ts.map +1 -0
- package/dist/connectors/google-drive.js +222 -0
- package/dist/connectors/google-drive.js.map +1 -0
- package/dist/connectors/guarded-fetch.d.ts +23 -0
- package/dist/connectors/guarded-fetch.d.ts.map +1 -0
- package/dist/connectors/guarded-fetch.js +30 -0
- package/dist/connectors/guarded-fetch.js.map +1 -0
- package/dist/connectors/jira.d.ts +35 -0
- package/dist/connectors/jira.d.ts.map +1 -0
- package/dist/connectors/jira.js +220 -0
- package/dist/connectors/jira.js.map +1 -0
- package/dist/connectors/linear.d.ts +32 -0
- package/dist/connectors/linear.d.ts.map +1 -0
- package/dist/connectors/linear.js +232 -0
- package/dist/connectors/linear.js.map +1 -0
- package/dist/connectors/notion.d.ts +33 -0
- package/dist/connectors/notion.d.ts.map +1 -0
- package/dist/connectors/notion.js +244 -0
- package/dist/connectors/notion.js.map +1 -0
- package/dist/connectors/slack.d.ts +30 -0
- package/dist/connectors/slack.d.ts.map +1 -0
- package/dist/connectors/slack.js +127 -0
- package/dist/connectors/slack.js.map +1 -0
- package/dist/context/budget-estimator.d.ts +83 -0
- package/dist/context/budget-estimator.d.ts.map +1 -0
- package/dist/context/budget-estimator.js +236 -0
- package/dist/context/budget-estimator.js.map +1 -0
- package/dist/context/compaction.d.ts +64 -0
- package/dist/context/compaction.d.ts.map +1 -0
- package/dist/context/compaction.js +192 -0
- package/dist/context/compaction.js.map +1 -0
- package/dist/context/context-replay.d.ts +62 -0
- package/dist/context/context-replay.d.ts.map +1 -0
- package/dist/context/context-replay.js +220 -0
- package/dist/context/context-replay.js.map +1 -0
- package/dist/context/context-sharding.d.ts +113 -0
- package/dist/context/context-sharding.d.ts.map +1 -0
- package/dist/context/context-sharding.js +364 -0
- package/dist/context/context-sharding.js.map +1 -0
- package/dist/context/importance-compactor.d.ts +74 -0
- package/dist/context/importance-compactor.d.ts.map +1 -0
- package/dist/context/importance-compactor.js +111 -0
- package/dist/context/importance-compactor.js.map +1 -0
- package/dist/context/inspector.d.ts +86 -0
- package/dist/context/inspector.d.ts.map +1 -0
- package/dist/context/inspector.js +170 -0
- package/dist/context/inspector.js.map +1 -0
- package/dist/context/limits.d.ts +94 -0
- package/dist/context/limits.d.ts.map +1 -0
- package/dist/context/limits.js +640 -0
- package/dist/context/limits.js.map +1 -0
- package/dist/context/maximizer.d.ts +138 -0
- package/dist/context/maximizer.d.ts.map +1 -0
- package/dist/context/maximizer.js +334 -0
- package/dist/context/maximizer.js.map +1 -0
- package/dist/context/ollama-kv-compression.d.ts +85 -0
- package/dist/context/ollama-kv-compression.d.ts.map +1 -0
- package/dist/context/ollama-kv-compression.js +263 -0
- package/dist/context/ollama-kv-compression.js.map +1 -0
- package/dist/context/repo-map.d.ts +38 -0
- package/dist/context/repo-map.d.ts.map +1 -0
- package/dist/context/repo-map.js +277 -0
- package/dist/context/repo-map.js.map +1 -0
- package/dist/context/sleep-summarizer.d.ts +77 -0
- package/dist/context/sleep-summarizer.d.ts.map +1 -0
- package/dist/context/sleep-summarizer.js +161 -0
- package/dist/context/sleep-summarizer.js.map +1 -0
- package/dist/context/spaces.d.ts +53 -0
- package/dist/context/spaces.d.ts.map +1 -0
- package/dist/context/spaces.js +92 -0
- package/dist/context/spaces.js.map +1 -0
- package/dist/context/tiered-loader.d.ts +62 -0
- package/dist/context/tiered-loader.d.ts.map +1 -0
- package/dist/context/tiered-loader.js +453 -0
- package/dist/context/tiered-loader.js.map +1 -0
- package/dist/context/tool-arg-truncator.d.ts +69 -0
- package/dist/context/tool-arg-truncator.d.ts.map +1 -0
- package/dist/context/tool-arg-truncator.js +212 -0
- package/dist/context/tool-arg-truncator.js.map +1 -0
- package/dist/context/virtual-context.d.ts +89 -0
- package/dist/context/virtual-context.d.ts.map +1 -0
- package/dist/context/virtual-context.js +289 -0
- package/dist/context/virtual-context.js.map +1 -0
- package/dist/context/window-intelligence.d.ts +221 -0
- package/dist/context/window-intelligence.d.ts.map +1 -0
- package/dist/context/window-intelligence.js +485 -0
- package/dist/context/window-intelligence.js.map +1 -0
- package/dist/core/agent-bridge.d.ts +80 -0
- package/dist/core/agent-bridge.d.ts.map +1 -0
- package/dist/core/agent-bridge.js +473 -0
- package/dist/core/agent-bridge.js.map +1 -0
- package/dist/core/agent-profiles.d.ts +65 -0
- package/dist/core/agent-profiles.d.ts.map +1 -0
- package/dist/core/agent-profiles.js +137 -0
- package/dist/core/agent-profiles.js.map +1 -0
- package/dist/core/bootstrap-snapshot.d.ts +125 -0
- package/dist/core/bootstrap-snapshot.d.ts.map +1 -0
- package/dist/core/bootstrap-snapshot.js +513 -0
- package/dist/core/bootstrap-snapshot.js.map +1 -0
- package/dist/core/config-discovery.d.ts +103 -0
- package/dist/core/config-discovery.d.ts.map +1 -0
- package/dist/core/config-discovery.js +336 -0
- package/dist/core/config-discovery.js.map +1 -0
- package/dist/core/config-migration.d.ts +69 -0
- package/dist/core/config-migration.d.ts.map +1 -0
- package/dist/core/config-migration.js +185 -0
- package/dist/core/config-migration.js.map +1 -0
- package/dist/core/config.d.ts +22 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +253 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/content-cid.d.ts +85 -0
- package/dist/core/content-cid.d.ts.map +1 -0
- package/dist/core/content-cid.js +135 -0
- package/dist/core/content-cid.js.map +1 -0
- package/dist/core/conversation-branching.d.ts +93 -0
- package/dist/core/conversation-branching.d.ts.map +1 -0
- package/dist/core/conversation-branching.js +215 -0
- package/dist/core/conversation-branching.js.map +1 -0
- package/dist/core/conversation-tree.d.ts +107 -0
- package/dist/core/conversation-tree.d.ts.map +1 -0
- package/dist/core/conversation-tree.js +211 -0
- package/dist/core/conversation-tree.js.map +1 -0
- package/dist/core/deep-link.d.ts +50 -0
- package/dist/core/deep-link.d.ts.map +1 -0
- package/dist/core/deep-link.js +212 -0
- package/dist/core/deep-link.js.map +1 -0
- package/dist/core/default-provider.d.ts +28 -0
- package/dist/core/default-provider.d.ts.map +1 -0
- package/dist/core/default-provider.js +90 -0
- package/dist/core/default-provider.js.map +1 -0
- package/dist/core/effort-mode.d.ts +81 -0
- package/dist/core/effort-mode.d.ts.map +1 -0
- package/dist/core/effort-mode.js +191 -0
- package/dist/core/effort-mode.js.map +1 -0
- package/dist/core/execution-modes.d.ts +103 -0
- package/dist/core/execution-modes.d.ts.map +1 -0
- package/dist/core/execution-modes.js +130 -0
- package/dist/core/execution-modes.js.map +1 -0
- package/dist/core/handoff.d.ts +184 -0
- package/dist/core/handoff.d.ts.map +1 -0
- package/dist/core/handoff.js +195 -0
- package/dist/core/handoff.js.map +1 -0
- package/dist/core/hardware-detect.d.ts +88 -0
- package/dist/core/hardware-detect.d.ts.map +1 -0
- package/dist/core/hardware-detect.js +182 -0
- package/dist/core/hardware-detect.js.map +1 -0
- package/dist/core/message-queue.d.ts +68 -0
- package/dist/core/message-queue.d.ts.map +1 -0
- package/dist/core/message-queue.js +96 -0
- package/dist/core/message-queue.js.map +1 -0
- package/dist/core/mode-cycling.d.ts +59 -0
- package/dist/core/mode-cycling.d.ts.map +1 -0
- package/dist/core/mode-cycling.js +259 -0
- package/dist/core/mode-cycling.js.map +1 -0
- package/dist/core/project-onboarding.d.ts +75 -0
- package/dist/core/project-onboarding.d.ts.map +1 -0
- package/dist/core/project-onboarding.js +307 -0
- package/dist/core/project-onboarding.js.map +1 -0
- package/dist/core/prompt-override.d.ts +77 -0
- package/dist/core/prompt-override.d.ts.map +1 -0
- package/dist/core/prompt-override.js +201 -0
- package/dist/core/prompt-override.js.map +1 -0
- package/dist/core/runtime/bound-tool-filter.d.ts +39 -0
- package/dist/core/runtime/bound-tool-filter.d.ts.map +1 -0
- package/dist/core/runtime/bound-tool-filter.js +50 -0
- package/dist/core/runtime/bound-tool-filter.js.map +1 -0
- package/dist/core/runtime/provider-gates.d.ts +145 -0
- package/dist/core/runtime/provider-gates.d.ts.map +1 -0
- package/dist/core/runtime/provider-gates.js +194 -0
- package/dist/core/runtime/provider-gates.js.map +1 -0
- package/dist/core/runtime-intelligence.d.ts +63 -0
- package/dist/core/runtime-intelligence.d.ts.map +1 -0
- package/dist/core/runtime-intelligence.js +301 -0
- package/dist/core/runtime-intelligence.js.map +1 -0
- package/dist/core/runtime-tool-dispatch.d.ts +271 -0
- package/dist/core/runtime-tool-dispatch.d.ts.map +1 -0
- package/dist/core/runtime-tool-dispatch.js +845 -0
- package/dist/core/runtime-tool-dispatch.js.map +1 -0
- package/dist/core/runtime-tools.d.ts +92 -0
- package/dist/core/runtime-tools.d.ts.map +1 -0
- package/dist/core/runtime-tools.js +520 -0
- package/dist/core/runtime-tools.js.map +1 -0
- package/dist/core/runtime.d.ts +1425 -0
- package/dist/core/runtime.d.ts.map +1 -0
- package/dist/core/runtime.js +6223 -0
- package/dist/core/runtime.js.map +1 -0
- package/dist/core/schema-migration.d.ts +92 -0
- package/dist/core/schema-migration.d.ts.map +1 -0
- package/dist/core/schema-migration.js +322 -0
- package/dist/core/schema-migration.js.map +1 -0
- package/dist/core/session-fork.d.ts +52 -0
- package/dist/core/session-fork.d.ts.map +1 -0
- package/dist/core/session-fork.js +147 -0
- package/dist/core/session-fork.js.map +1 -0
- package/dist/core/session-recap.d.ts +51 -0
- package/dist/core/session-recap.d.ts.map +1 -0
- package/dist/core/session-recap.js +157 -0
- package/dist/core/session-recap.js.map +1 -0
- package/dist/core/session-resume.d.ts +89 -0
- package/dist/core/session-resume.d.ts.map +1 -0
- package/dist/core/session-resume.js +181 -0
- package/dist/core/session-resume.js.map +1 -0
- package/dist/core/session.d.ts +42 -0
- package/dist/core/session.d.ts.map +1 -0
- package/dist/core/session.js +155 -0
- package/dist/core/session.js.map +1 -0
- package/dist/core/steering-server.d.ts +66 -0
- package/dist/core/steering-server.d.ts.map +1 -0
- package/dist/core/steering-server.js +206 -0
- package/dist/core/steering-server.js.map +1 -0
- package/dist/core/stream-resume.d.ts +66 -0
- package/dist/core/stream-resume.d.ts.map +1 -0
- package/dist/core/stream-resume.js +162 -0
- package/dist/core/stream-resume.js.map +1 -0
- package/dist/core/tool-path-extractor.d.ts +17 -0
- package/dist/core/tool-path-extractor.d.ts.map +1 -0
- package/dist/core/tool-path-extractor.js +26 -0
- package/dist/core/tool-path-extractor.js.map +1 -0
- package/dist/core/types.d.ts +203 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +6 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/virtual-paths.d.ts +71 -0
- package/dist/core/virtual-paths.d.ts.map +1 -0
- package/dist/core/virtual-paths.js +157 -0
- package/dist/core/virtual-paths.js.map +1 -0
- package/dist/core/workspace.d.ts +20 -0
- package/dist/core/workspace.d.ts.map +1 -0
- package/dist/core/workspace.js +400 -0
- package/dist/core/workspace.js.map +1 -0
- package/dist/core/wotann-yml.d.ts +89 -0
- package/dist/core/wotann-yml.d.ts.map +1 -0
- package/dist/core/wotann-yml.js +328 -0
- package/dist/core/wotann-yml.js.map +1 -0
- package/dist/daemon/auto-update.d.ts +42 -0
- package/dist/daemon/auto-update.d.ts.map +1 -0
- package/dist/daemon/auto-update.js +167 -0
- package/dist/daemon/auto-update.js.map +1 -0
- package/dist/daemon/automations.d.ts +169 -0
- package/dist/daemon/automations.d.ts.map +1 -0
- package/dist/daemon/automations.js +571 -0
- package/dist/daemon/automations.js.map +1 -0
- package/dist/daemon/background-workers.d.ts +73 -0
- package/dist/daemon/background-workers.d.ts.map +1 -0
- package/dist/daemon/background-workers.js +529 -0
- package/dist/daemon/background-workers.js.map +1 -0
- package/dist/daemon/comment-watcher.d.ts +28 -0
- package/dist/daemon/comment-watcher.d.ts.map +1 -0
- package/dist/daemon/comment-watcher.js +81 -0
- package/dist/daemon/comment-watcher.js.map +1 -0
- package/dist/daemon/context-pressure.d.ts +31 -0
- package/dist/daemon/context-pressure.d.ts.map +1 -0
- package/dist/daemon/context-pressure.js +92 -0
- package/dist/daemon/context-pressure.js.map +1 -0
- package/dist/daemon/cron-store.d.ts +186 -0
- package/dist/daemon/cron-store.d.ts.map +1 -0
- package/dist/daemon/cron-store.js +464 -0
- package/dist/daemon/cron-store.js.map +1 -0
- package/dist/daemon/cron-utils.d.ts +35 -0
- package/dist/daemon/cron-utils.d.ts.map +1 -0
- package/dist/daemon/cron-utils.js +67 -0
- package/dist/daemon/cron-utils.js.map +1 -0
- package/dist/daemon/event-triggers.d.ts +106 -0
- package/dist/daemon/event-triggers.d.ts.map +1 -0
- package/dist/daemon/event-triggers.js +337 -0
- package/dist/daemon/event-triggers.js.map +1 -0
- package/dist/daemon/file-dep-graph.d.ts +45 -0
- package/dist/daemon/file-dep-graph.d.ts.map +1 -0
- package/dist/daemon/file-dep-graph.js +190 -0
- package/dist/daemon/file-dep-graph.js.map +1 -0
- package/dist/daemon/kairos-ipc.d.ts +175 -0
- package/dist/daemon/kairos-ipc.d.ts.map +1 -0
- package/dist/daemon/kairos-ipc.js +640 -0
- package/dist/daemon/kairos-ipc.js.map +1 -0
- package/dist/daemon/kairos-rpc.d.ts +389 -0
- package/dist/daemon/kairos-rpc.d.ts.map +1 -0
- package/dist/daemon/kairos-rpc.js +9893 -0
- package/dist/daemon/kairos-rpc.js.map +1 -0
- package/dist/daemon/kairos-tools.d.ts +91 -0
- package/dist/daemon/kairos-tools.d.ts.map +1 -0
- package/dist/daemon/kairos-tools.js +251 -0
- package/dist/daemon/kairos-tools.js.map +1 -0
- package/dist/daemon/kairos.d.ts +480 -0
- package/dist/daemon/kairos.d.ts.map +1 -0
- package/dist/daemon/kairos.js +3016 -0
- package/dist/daemon/kairos.js.map +1 -0
- package/dist/daemon/port-resolver.d.ts +42 -0
- package/dist/daemon/port-resolver.d.ts.map +1 -0
- package/dist/daemon/port-resolver.js +82 -0
- package/dist/daemon/port-resolver.js.map +1 -0
- package/dist/daemon/rpc-handlers/intelligence-rpc.d.ts +125 -0
- package/dist/daemon/rpc-handlers/intelligence-rpc.d.ts.map +1 -0
- package/dist/daemon/rpc-handlers/intelligence-rpc.js +265 -0
- package/dist/daemon/rpc-handlers/intelligence-rpc.js.map +1 -0
- package/dist/daemon/rpc-handlers/orchestration-rpc.d.ts +8 -0
- package/dist/daemon/rpc-handlers/orchestration-rpc.d.ts.map +1 -0
- package/dist/daemon/rpc-handlers/orchestration-rpc.js +258 -0
- package/dist/daemon/rpc-handlers/orchestration-rpc.js.map +1 -0
- package/dist/daemon/rpc-handlers/sandbox-rpc.d.ts +68 -0
- package/dist/daemon/rpc-handlers/sandbox-rpc.d.ts.map +1 -0
- package/dist/daemon/rpc-handlers/sandbox-rpc.js +119 -0
- package/dist/daemon/rpc-handlers/sandbox-rpc.js.map +1 -0
- package/dist/daemon/rpc-subscription.d.ts +177 -0
- package/dist/daemon/rpc-subscription.d.ts.map +1 -0
- package/dist/daemon/rpc-subscription.js +204 -0
- package/dist/daemon/rpc-subscription.js.map +1 -0
- package/dist/daemon/start.d.ts +9 -0
- package/dist/daemon/start.d.ts.map +1 -0
- package/dist/daemon/start.js +267 -0
- package/dist/daemon/start.js.map +1 -0
- package/dist/daemon/terminal-monitor.d.ts +29 -0
- package/dist/daemon/terminal-monitor.d.ts.map +1 -0
- package/dist/daemon/terminal-monitor.js +125 -0
- package/dist/daemon/terminal-monitor.js.map +1 -0
- package/dist/daemon/transport/index.d.ts +17 -0
- package/dist/daemon/transport/index.d.ts.map +1 -0
- package/dist/daemon/transport/index.js +17 -0
- package/dist/daemon/transport/index.js.map +1 -0
- package/dist/daemon/transport/replay-buffer.d.ts +148 -0
- package/dist/daemon/transport/replay-buffer.d.ts.map +1 -0
- package/dist/daemon/transport/replay-buffer.js +180 -0
- package/dist/daemon/transport/replay-buffer.js.map +1 -0
- package/dist/daemon/transport/replay-registry.d.ts +112 -0
- package/dist/daemon/transport/replay-registry.d.ts.map +1 -0
- package/dist/daemon/transport/replay-registry.js +137 -0
- package/dist/daemon/transport/replay-registry.js.map +1 -0
- package/dist/design/bundle-diff.d.ts +96 -0
- package/dist/design/bundle-diff.d.ts.map +1 -0
- package/dist/design/bundle-diff.js +300 -0
- package/dist/design/bundle-diff.js.map +1 -0
- package/dist/design/bundle-writer.d.ts +103 -0
- package/dist/design/bundle-writer.d.ts.map +1 -0
- package/dist/design/bundle-writer.js +157 -0
- package/dist/design/bundle-writer.js.map +1 -0
- package/dist/design/canvas-store.d.ts +84 -0
- package/dist/design/canvas-store.d.ts.map +1 -0
- package/dist/design/canvas-store.js +180 -0
- package/dist/design/canvas-store.js.map +1 -0
- package/dist/design/canvas-to-code.d.ts +56 -0
- package/dist/design/canvas-to-code.d.ts.map +1 -0
- package/dist/design/canvas-to-code.js +238 -0
- package/dist/design/canvas-to-code.js.map +1 -0
- package/dist/design/canvas.d.ts +160 -0
- package/dist/design/canvas.d.ts.map +1 -0
- package/dist/design/canvas.js +405 -0
- package/dist/design/canvas.js.map +1 -0
- package/dist/design/component-importer.d.ts +42 -0
- package/dist/design/component-importer.d.ts.map +1 -0
- package/dist/design/component-importer.js +229 -0
- package/dist/design/component-importer.js.map +1 -0
- package/dist/design/design-md-spec.d.ts +83 -0
- package/dist/design/design-md-spec.d.ts.map +1 -0
- package/dist/design/design-md-spec.js +210 -0
- package/dist/design/design-md-spec.js.map +1 -0
- package/dist/design/design-mode.d.ts +127 -0
- package/dist/design/design-mode.d.ts.map +1 -0
- package/dist/design/design-mode.js +235 -0
- package/dist/design/design-mode.js.map +1 -0
- package/dist/design/design-tokens-parser.d.ts +46 -0
- package/dist/design/design-tokens-parser.d.ts.map +1 -0
- package/dist/design/design-tokens-parser.js +183 -0
- package/dist/design/design-tokens-parser.js.map +1 -0
- package/dist/design/designmd-linter.d.ts +41 -0
- package/dist/design/designmd-linter.d.ts.map +1 -0
- package/dist/design/designmd-linter.js +232 -0
- package/dist/design/designmd-linter.js.map +1 -0
- package/dist/design/designmd-parser.d.ts +96 -0
- package/dist/design/designmd-parser.d.ts.map +1 -0
- package/dist/design/designmd-parser.js +254 -0
- package/dist/design/designmd-parser.js.map +1 -0
- package/dist/design/dtcg-emitter.d.ts +127 -0
- package/dist/design/dtcg-emitter.d.ts.map +1 -0
- package/dist/design/dtcg-emitter.js +225 -0
- package/dist/design/dtcg-emitter.js.map +1 -0
- package/dist/design/extractor.d.ts +150 -0
- package/dist/design/extractor.d.ts.map +1 -0
- package/dist/design/extractor.js +569 -0
- package/dist/design/extractor.js.map +1 -0
- package/dist/design/handoff-receiver.d.ts +65 -0
- package/dist/design/handoff-receiver.d.ts.map +1 -0
- package/dist/design/handoff-receiver.js +144 -0
- package/dist/design/handoff-receiver.js.map +1 -0
- package/dist/design/token-emitters/desktop.d.ts +13 -0
- package/dist/design/token-emitters/desktop.d.ts.map +1 -0
- package/dist/design/token-emitters/desktop.js +152 -0
- package/dist/design/token-emitters/desktop.js.map +1 -0
- package/dist/design/token-emitters/index.d.ts +12 -0
- package/dist/design/token-emitters/index.d.ts.map +1 -0
- package/dist/design/token-emitters/index.js +12 -0
- package/dist/design/token-emitters/index.js.map +1 -0
- package/dist/design/token-emitters/ios.d.ts +15 -0
- package/dist/design/token-emitters/ios.d.ts.map +1 -0
- package/dist/design/token-emitters/ios.js +116 -0
- package/dist/design/token-emitters/ios.js.map +1 -0
- package/dist/design/token-emitters/tui.d.ts +22 -0
- package/dist/design/token-emitters/tui.d.ts.map +1 -0
- package/dist/design/token-emitters/tui.js +23 -0
- package/dist/design/token-emitters/tui.js.map +1 -0
- package/dist/design/token-emitters/w3c-tokens.d.ts +28 -0
- package/dist/design/token-emitters/w3c-tokens.d.ts.map +1 -0
- package/dist/design/token-emitters/w3c-tokens.js +108 -0
- package/dist/design/token-emitters/w3c-tokens.js.map +1 -0
- package/dist/design/tokens.d.ts +154 -0
- package/dist/design/tokens.d.ts.map +1 -0
- package/dist/design/tokens.js +162 -0
- package/dist/design/tokens.js.map +1 -0
- package/dist/design/zip-reader.d.ts +14 -0
- package/dist/design/zip-reader.d.ts.map +1 -0
- package/dist/design/zip-reader.js +125 -0
- package/dist/design/zip-reader.js.map +1 -0
- package/dist/desktop/app-state.d.ts +133 -0
- package/dist/desktop/app-state.d.ts.map +1 -0
- package/dist/desktop/app-state.js +161 -0
- package/dist/desktop/app-state.js.map +1 -0
- package/dist/desktop/artifact-comments.d.ts +94 -0
- package/dist/desktop/artifact-comments.d.ts.map +1 -0
- package/dist/desktop/artifact-comments.js +106 -0
- package/dist/desktop/artifact-comments.js.map +1 -0
- package/dist/desktop/artifacts.d.ts +78 -0
- package/dist/desktop/artifacts.d.ts.map +1 -0
- package/dist/desktop/artifacts.js +187 -0
- package/dist/desktop/artifacts.js.map +1 -0
- package/dist/desktop/command-palette.d.ts +105 -0
- package/dist/desktop/command-palette.d.ts.map +1 -0
- package/dist/desktop/command-palette.js +319 -0
- package/dist/desktop/command-palette.js.map +1 -0
- package/dist/desktop/companion-server.d.ts +494 -0
- package/dist/desktop/companion-server.d.ts.map +1 -0
- package/dist/desktop/companion-server.js +2147 -0
- package/dist/desktop/companion-server.js.map +1 -0
- package/dist/desktop/conversation-manager.d.ts +122 -0
- package/dist/desktop/conversation-manager.d.ts.map +1 -0
- package/dist/desktop/conversation-manager.js +207 -0
- package/dist/desktop/conversation-manager.js.map +1 -0
- package/dist/desktop/desktop-runtime-bridge.d.ts +78 -0
- package/dist/desktop/desktop-runtime-bridge.d.ts.map +1 -0
- package/dist/desktop/desktop-runtime-bridge.js +155 -0
- package/dist/desktop/desktop-runtime-bridge.js.map +1 -0
- package/dist/desktop/keyboard-shortcuts.d.ts +64 -0
- package/dist/desktop/keyboard-shortcuts.d.ts.map +1 -0
- package/dist/desktop/keyboard-shortcuts.js +152 -0
- package/dist/desktop/keyboard-shortcuts.js.map +1 -0
- package/dist/desktop/layout.d.ts +90 -0
- package/dist/desktop/layout.d.ts.map +1 -0
- package/dist/desktop/layout.js +117 -0
- package/dist/desktop/layout.js.map +1 -0
- package/dist/desktop/notification-manager.d.ts +88 -0
- package/dist/desktop/notification-manager.d.ts.map +1 -0
- package/dist/desktop/notification-manager.js +167 -0
- package/dist/desktop/notification-manager.js.map +1 -0
- package/dist/desktop/project-manager.d.ts +80 -0
- package/dist/desktop/project-manager.d.ts.map +1 -0
- package/dist/desktop/project-manager.js +146 -0
- package/dist/desktop/project-manager.js.map +1 -0
- package/dist/desktop/prompt-enhancer.d.ts +65 -0
- package/dist/desktop/prompt-enhancer.d.ts.map +1 -0
- package/dist/desktop/prompt-enhancer.js +177 -0
- package/dist/desktop/prompt-enhancer.js.map +1 -0
- package/dist/desktop/smart-apply-panel.d.ts +78 -0
- package/dist/desktop/smart-apply-panel.d.ts.map +1 -0
- package/dist/desktop/smart-apply-panel.js +140 -0
- package/dist/desktop/smart-apply-panel.js.map +1 -0
- package/dist/desktop/supabase-relay.d.ts +86 -0
- package/dist/desktop/supabase-relay.d.ts.map +1 -0
- package/dist/desktop/supabase-relay.js +335 -0
- package/dist/desktop/supabase-relay.js.map +1 -0
- package/dist/desktop/tauri-config.d.ts +116 -0
- package/dist/desktop/tauri-config.d.ts.map +1 -0
- package/dist/desktop/tauri-config.js +208 -0
- package/dist/desktop/tauri-config.js.map +1 -0
- package/dist/desktop/types.d.ts +135 -0
- package/dist/desktop/types.d.ts.map +1 -0
- package/dist/desktop/types.js +89 -0
- package/dist/desktop/types.js.map +1 -0
- package/dist/evals/g-eval.d.ts +36 -0
- package/dist/evals/g-eval.d.ts.map +1 -0
- package/dist/evals/g-eval.js +147 -0
- package/dist/evals/g-eval.js.map +1 -0
- package/dist/evals/owasp-llm-redteam.d.ts +39 -0
- package/dist/evals/owasp-llm-redteam.d.ts.map +1 -0
- package/dist/evals/owasp-llm-redteam.js +128 -0
- package/dist/evals/owasp-llm-redteam.js.map +1 -0
- package/dist/evals/prompt-eval.d.ts +102 -0
- package/dist/evals/prompt-eval.d.ts.map +1 -0
- package/dist/evals/prompt-eval.js +176 -0
- package/dist/evals/prompt-eval.js.map +1 -0
- package/dist/evals/ragas-metrics.d.ts +23 -0
- package/dist/evals/ragas-metrics.d.ts.map +1 -0
- package/dist/evals/ragas-metrics.js +233 -0
- package/dist/evals/ragas-metrics.js.map +1 -0
- package/dist/evals/types.d.ts +154 -0
- package/dist/evals/types.d.ts.map +1 -0
- package/dist/evals/types.js +43 -0
- package/dist/evals/types.js.map +1 -0
- package/dist/evolution/constraints.d.ts +12 -0
- package/dist/evolution/constraints.d.ts.map +1 -0
- package/dist/evolution/constraints.js +45 -0
- package/dist/evolution/constraints.js.map +1 -0
- package/dist/evolution/evaluator.d.ts +45 -0
- package/dist/evolution/evaluator.d.ts.map +1 -0
- package/dist/evolution/evaluator.js +109 -0
- package/dist/evolution/evaluator.js.map +1 -0
- package/dist/evolution/mutator.d.ts +38 -0
- package/dist/evolution/mutator.d.ts.map +1 -0
- package/dist/evolution/mutator.js +97 -0
- package/dist/evolution/mutator.js.map +1 -0
- package/dist/evolution/optimizer.d.ts +68 -0
- package/dist/evolution/optimizer.d.ts.map +1 -0
- package/dist/evolution/optimizer.js +170 -0
- package/dist/evolution/optimizer.js.map +1 -0
- package/dist/evolution/runner.d.ts +30 -0
- package/dist/evolution/runner.d.ts.map +1 -0
- package/dist/evolution/runner.js +67 -0
- package/dist/evolution/runner.js.map +1 -0
- package/dist/evolution/types.d.ts +76 -0
- package/dist/evolution/types.d.ts.map +1 -0
- package/dist/evolution/types.js +9 -0
- package/dist/evolution/types.js.map +1 -0
- package/dist/exploit/mythos-scaffold.d.ts +230 -0
- package/dist/exploit/mythos-scaffold.d.ts.map +1 -0
- package/dist/exploit/mythos-scaffold.js +517 -0
- package/dist/exploit/mythos-scaffold.js.map +1 -0
- package/dist/git/magic-git.d.ts +62 -0
- package/dist/git/magic-git.d.ts.map +1 -0
- package/dist/git/magic-git.js +260 -0
- package/dist/git/magic-git.js.map +1 -0
- package/dist/hooks/auto-archive.d.ts +65 -0
- package/dist/hooks/auto-archive.d.ts.map +1 -0
- package/dist/hooks/auto-archive.js +137 -0
- package/dist/hooks/auto-archive.js.map +1 -0
- package/dist/hooks/benchmark-engineering.d.ts +174 -0
- package/dist/hooks/benchmark-engineering.d.ts.map +1 -0
- package/dist/hooks/benchmark-engineering.js +484 -0
- package/dist/hooks/benchmark-engineering.js.map +1 -0
- package/dist/hooks/built-in.d.ts +102 -0
- package/dist/hooks/built-in.d.ts.map +1 -0
- package/dist/hooks/built-in.js +1358 -0
- package/dist/hooks/built-in.js.map +1 -0
- package/dist/hooks/compact-snapshot.d.ts +78 -0
- package/dist/hooks/compact-snapshot.d.ts.map +1 -0
- package/dist/hooks/compact-snapshot.js +179 -0
- package/dist/hooks/compact-snapshot.js.map +1 -0
- package/dist/hooks/doom-loop-detector.d.ts +63 -0
- package/dist/hooks/doom-loop-detector.d.ts.map +1 -0
- package/dist/hooks/doom-loop-detector.js +247 -0
- package/dist/hooks/doom-loop-detector.js.map +1 -0
- package/dist/hooks/engine.d.ts +274 -0
- package/dist/hooks/engine.d.ts.map +1 -0
- package/dist/hooks/engine.js +495 -0
- package/dist/hooks/engine.js.map +1 -0
- package/dist/hooks/rate-limit-resume.d.ts +99 -0
- package/dist/hooks/rate-limit-resume.d.ts.map +1 -0
- package/dist/hooks/rate-limit-resume.js +185 -0
- package/dist/hooks/rate-limit-resume.js.map +1 -0
- package/dist/hooks/verifier-gate-helpers.d.ts +126 -0
- package/dist/hooks/verifier-gate-helpers.d.ts.map +1 -0
- package/dist/hooks/verifier-gate-helpers.js +129 -0
- package/dist/hooks/verifier-gate-helpers.js.map +1 -0
- package/dist/identity/persona.d.ts +99 -0
- package/dist/identity/persona.d.ts.map +1 -0
- package/dist/identity/persona.js +312 -0
- package/dist/identity/persona.js.map +1 -0
- package/dist/identity/reasoning-engine.d.ts +88 -0
- package/dist/identity/reasoning-engine.d.ts.map +1 -0
- package/dist/identity/reasoning-engine.js +251 -0
- package/dist/identity/reasoning-engine.js.map +1 -0
- package/dist/identity/role-templates/csm.d.ts +9 -0
- package/dist/identity/role-templates/csm.d.ts.map +1 -0
- package/dist/identity/role-templates/csm.js +42 -0
- package/dist/identity/role-templates/csm.js.map +1 -0
- package/dist/identity/role-templates/devrel.d.ts +9 -0
- package/dist/identity/role-templates/devrel.d.ts.map +1 -0
- package/dist/identity/role-templates/devrel.js +43 -0
- package/dist/identity/role-templates/devrel.js.map +1 -0
- package/dist/identity/role-templates/index.d.ts +40 -0
- package/dist/identity/role-templates/index.d.ts.map +1 -0
- package/dist/identity/role-templates/index.js +62 -0
- package/dist/identity/role-templates/index.js.map +1 -0
- package/dist/identity/role-templates/recruiter.d.ts +10 -0
- package/dist/identity/role-templates/recruiter.d.ts.map +1 -0
- package/dist/identity/role-templates/recruiter.js +42 -0
- package/dist/identity/role-templates/recruiter.js.map +1 -0
- package/dist/identity/role-templates/sdr.d.ts +9 -0
- package/dist/identity/role-templates/sdr.d.ts.map +1 -0
- package/dist/identity/role-templates/sdr.js +41 -0
- package/dist/identity/role-templates/sdr.js.map +1 -0
- package/dist/identity/role-templates/support.d.ts +9 -0
- package/dist/identity/role-templates/support.d.ts.map +1 -0
- package/dist/identity/role-templates/support.js +41 -0
- package/dist/identity/role-templates/support.js.map +1 -0
- package/dist/identity/role-templates/types.d.ts +16 -0
- package/dist/identity/role-templates/types.d.ts.map +1 -0
- package/dist/identity/role-templates/types.js +9 -0
- package/dist/identity/role-templates/types.js.map +1 -0
- package/dist/identity/user-model.d.ts +110 -0
- package/dist/identity/user-model.d.ts.map +1 -0
- package/dist/identity/user-model.js +386 -0
- package/dist/identity/user-model.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9117 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/posthog-events.d.ts +70 -0
- package/dist/integrations/posthog-events.d.ts.map +1 -0
- package/dist/integrations/posthog-events.js +126 -0
- package/dist/integrations/posthog-events.js.map +1 -0
- package/dist/intelligence/12factor/enforcer.d.ts +32 -0
- package/dist/intelligence/12factor/enforcer.d.ts.map +1 -0
- package/dist/intelligence/12factor/enforcer.js +39 -0
- package/dist/intelligence/12factor/enforcer.js.map +1 -0
- package/dist/intelligence/12factor/principles.d.ts +63 -0
- package/dist/intelligence/12factor/principles.d.ts.map +1 -0
- package/dist/intelligence/12factor/principles.js +112 -0
- package/dist/intelligence/12factor/principles.js.map +1 -0
- package/dist/intelligence/12factor/single-binary.d.ts +56 -0
- package/dist/intelligence/12factor/single-binary.d.ts.map +1 -0
- package/dist/intelligence/12factor/single-binary.js +79 -0
- package/dist/intelligence/12factor/single-binary.js.map +1 -0
- package/dist/intelligence/accuracy-boost.d.ts +140 -0
- package/dist/intelligence/accuracy-boost.d.ts.map +1 -0
- package/dist/intelligence/accuracy-boost.js +686 -0
- package/dist/intelligence/accuracy-boost.js.map +1 -0
- package/dist/intelligence/action-item-extractor.d.ts +63 -0
- package/dist/intelligence/action-item-extractor.d.ts.map +1 -0
- package/dist/intelligence/action-item-extractor.js +154 -0
- package/dist/intelligence/action-item-extractor.js.map +1 -0
- package/dist/intelligence/adaptive-prompts.d.ts +43 -0
- package/dist/intelligence/adaptive-prompts.d.ts.map +1 -0
- package/dist/intelligence/adaptive-prompts.js +308 -0
- package/dist/intelligence/adaptive-prompts.js.map +1 -0
- package/dist/intelligence/adversarial-test-generator.d.ts +104 -0
- package/dist/intelligence/adversarial-test-generator.d.ts.map +1 -0
- package/dist/intelligence/adversarial-test-generator.js +242 -0
- package/dist/intelligence/adversarial-test-generator.js.map +1 -0
- package/dist/intelligence/agent-patterns/catalog.d.ts +31 -0
- package/dist/intelligence/agent-patterns/catalog.d.ts.map +1 -0
- package/dist/intelligence/agent-patterns/catalog.js +49 -0
- package/dist/intelligence/agent-patterns/catalog.js.map +1 -0
- package/dist/intelligence/agent-patterns/pattern-mapper.d.ts +56 -0
- package/dist/intelligence/agent-patterns/pattern-mapper.d.ts.map +1 -0
- package/dist/intelligence/agent-patterns/pattern-mapper.js +154 -0
- package/dist/intelligence/agent-patterns/pattern-mapper.js.map +1 -0
- package/dist/intelligence/agent-patterns/patterns-core.d.ts +10 -0
- package/dist/intelligence/agent-patterns/patterns-core.d.ts.map +1 -0
- package/dist/intelligence/agent-patterns/patterns-core.js +125 -0
- package/dist/intelligence/agent-patterns/patterns-core.js.map +1 -0
- package/dist/intelligence/agent-patterns/patterns-extended.d.ts +11 -0
- package/dist/intelligence/agent-patterns/patterns-extended.d.ts.map +1 -0
- package/dist/intelligence/agent-patterns/patterns-extended.js +125 -0
- package/dist/intelligence/agent-patterns/patterns-extended.js.map +1 -0
- package/dist/intelligence/agent-patterns/patterns.d.ts +13 -0
- package/dist/intelligence/agent-patterns/patterns.d.ts.map +1 -0
- package/dist/intelligence/agent-patterns/patterns.js +14 -0
- package/dist/intelligence/agent-patterns/patterns.js.map +1 -0
- package/dist/intelligence/agent-patterns/types.d.ts +35 -0
- package/dist/intelligence/agent-patterns/types.d.ts.map +1 -0
- package/dist/intelligence/agent-patterns/types.js +9 -0
- package/dist/intelligence/agent-patterns/types.js.map +1 -0
- package/dist/intelligence/ai-time-machine.d.ts +105 -0
- package/dist/intelligence/ai-time-machine.d.ts.map +1 -0
- package/dist/intelligence/ai-time-machine.js +234 -0
- package/dist/intelligence/ai-time-machine.js.map +1 -0
- package/dist/intelligence/ambient-awareness.d.ts +102 -0
- package/dist/intelligence/ambient-awareness.d.ts.map +1 -0
- package/dist/intelligence/ambient-awareness.js +355 -0
- package/dist/intelligence/ambient-awareness.js.map +1 -0
- package/dist/intelligence/amplifier.d.ts +101 -0
- package/dist/intelligence/amplifier.d.ts.map +1 -0
- package/dist/intelligence/amplifier.js +236 -0
- package/dist/intelligence/amplifier.js.map +1 -0
- package/dist/intelligence/answer-normalizer.d.ts +67 -0
- package/dist/intelligence/answer-normalizer.d.ts.map +1 -0
- package/dist/intelligence/answer-normalizer.js +221 -0
- package/dist/intelligence/answer-normalizer.js.map +1 -0
- package/dist/intelligence/auto-enhance.d.ts +34 -0
- package/dist/intelligence/auto-enhance.d.ts.map +1 -0
- package/dist/intelligence/auto-enhance.js +99 -0
- package/dist/intelligence/auto-enhance.js.map +1 -0
- package/dist/intelligence/auto-mode-detector.d.ts +32 -0
- package/dist/intelligence/auto-mode-detector.d.ts.map +1 -0
- package/dist/intelligence/auto-mode-detector.js +176 -0
- package/dist/intelligence/auto-mode-detector.js.map +1 -0
- package/dist/intelligence/auto-reviewer.d.ts +105 -0
- package/dist/intelligence/auto-reviewer.d.ts.map +1 -0
- package/dist/intelligence/auto-reviewer.js +477 -0
- package/dist/intelligence/auto-reviewer.js.map +1 -0
- package/dist/intelligence/auto-verify.d.ts +52 -0
- package/dist/intelligence/auto-verify.d.ts.map +1 -0
- package/dist/intelligence/auto-verify.js +153 -0
- package/dist/intelligence/auto-verify.js.map +1 -0
- package/dist/intelligence/away-summary.d.ts +48 -0
- package/dist/intelligence/away-summary.d.ts.map +1 -0
- package/dist/intelligence/away-summary.js +98 -0
- package/dist/intelligence/away-summary.js.map +1 -0
- package/dist/intelligence/bash-classifier.d.ts +19 -0
- package/dist/intelligence/bash-classifier.d.ts.map +1 -0
- package/dist/intelligence/bash-classifier.js +153 -0
- package/dist/intelligence/bash-classifier.js.map +1 -0
- package/dist/intelligence/benchmark-harness.d.ts +152 -0
- package/dist/intelligence/benchmark-harness.d.ts.map +1 -0
- package/dist/intelligence/benchmark-harness.js +534 -0
- package/dist/intelligence/benchmark-harness.js.map +1 -0
- package/dist/intelligence/benchmark-runners/aider-polyglot.d.ts +136 -0
- package/dist/intelligence/benchmark-runners/aider-polyglot.d.ts.map +1 -0
- package/dist/intelligence/benchmark-runners/aider-polyglot.js +389 -0
- package/dist/intelligence/benchmark-runners/aider-polyglot.js.map +1 -0
- package/dist/intelligence/benchmark-runners/code-eval.d.ts +162 -0
- package/dist/intelligence/benchmark-runners/code-eval.d.ts.map +1 -0
- package/dist/intelligence/benchmark-runners/code-eval.js +418 -0
- package/dist/intelligence/benchmark-runners/code-eval.js.map +1 -0
- package/dist/intelligence/benchmark-runners/index.d.ts +15 -0
- package/dist/intelligence/benchmark-runners/index.d.ts.map +1 -0
- package/dist/intelligence/benchmark-runners/index.js +20 -0
- package/dist/intelligence/benchmark-runners/index.js.map +1 -0
- package/dist/intelligence/benchmark-runners/shared.d.ts +98 -0
- package/dist/intelligence/benchmark-runners/shared.d.ts.map +1 -0
- package/dist/intelligence/benchmark-runners/shared.js +119 -0
- package/dist/intelligence/benchmark-runners/shared.js.map +1 -0
- package/dist/intelligence/benchmark-runners/swe-bench.d.ts +139 -0
- package/dist/intelligence/benchmark-runners/swe-bench.d.ts.map +1 -0
- package/dist/intelligence/benchmark-runners/swe-bench.js +374 -0
- package/dist/intelligence/benchmark-runners/swe-bench.js.map +1 -0
- package/dist/intelligence/benchmark-runners/tau-bench.d.ts +137 -0
- package/dist/intelligence/benchmark-runners/tau-bench.d.ts.map +1 -0
- package/dist/intelligence/benchmark-runners/tau-bench.js +378 -0
- package/dist/intelligence/benchmark-runners/tau-bench.js.map +1 -0
- package/dist/intelligence/benchmark-runners/terminal-bench.d.ts +210 -0
- package/dist/intelligence/benchmark-runners/terminal-bench.d.ts.map +1 -0
- package/dist/intelligence/benchmark-runners/terminal-bench.js +600 -0
- package/dist/intelligence/benchmark-runners/terminal-bench.js.map +1 -0
- package/dist/intelligence/budget-enforcer.d.ts +104 -0
- package/dist/intelligence/budget-enforcer.d.ts.map +1 -0
- package/dist/intelligence/budget-enforcer.js +136 -0
- package/dist/intelligence/budget-enforcer.js.map +1 -0
- package/dist/intelligence/bugbot.d.ts +62 -0
- package/dist/intelligence/bugbot.d.ts.map +1 -0
- package/dist/intelligence/bugbot.js +337 -0
- package/dist/intelligence/bugbot.js.map +1 -0
- package/dist/intelligence/chain-of-verification.d.ts +51 -0
- package/dist/intelligence/chain-of-verification.d.ts.map +1 -0
- package/dist/intelligence/chain-of-verification.js +97 -0
- package/dist/intelligence/chain-of-verification.js.map +1 -0
- package/dist/intelligence/code-graph.d.ts +80 -0
- package/dist/intelligence/code-graph.d.ts.map +1 -0
- package/dist/intelligence/code-graph.js +208 -0
- package/dist/intelligence/code-graph.js.map +1 -0
- package/dist/intelligence/code-outline.d.ts +44 -0
- package/dist/intelligence/code-outline.d.ts.map +1 -0
- package/dist/intelligence/code-outline.js +101 -0
- package/dist/intelligence/code-outline.js.map +1 -0
- package/dist/intelligence/codebase-health.d.ts +47 -0
- package/dist/intelligence/codebase-health.d.ts.map +1 -0
- package/dist/intelligence/codebase-health.js +307 -0
- package/dist/intelligence/codebase-health.js.map +1 -0
- package/dist/intelligence/codemaps.d.ts +44 -0
- package/dist/intelligence/codemaps.d.ts.map +1 -0
- package/dist/intelligence/codemaps.js +385 -0
- package/dist/intelligence/codemaps.js.map +1 -0
- package/dist/intelligence/confidence-calibrator.d.ts +86 -0
- package/dist/intelligence/confidence-calibrator.d.ts.map +1 -0
- package/dist/intelligence/confidence-calibrator.js +163 -0
- package/dist/intelligence/confidence-calibrator.js.map +1 -0
- package/dist/intelligence/content-cid.d.ts +63 -0
- package/dist/intelligence/content-cid.d.ts.map +1 -0
- package/dist/intelligence/content-cid.js +91 -0
- package/dist/intelligence/content-cid.js.map +1 -0
- package/dist/intelligence/context-relevance.d.ts +108 -0
- package/dist/intelligence/context-relevance.d.ts.map +1 -0
- package/dist/intelligence/context-relevance.js +325 -0
- package/dist/intelligence/context-relevance.js.map +1 -0
- package/dist/intelligence/courses-index/anthropic.d.ts +39 -0
- package/dist/intelligence/courses-index/anthropic.d.ts.map +1 -0
- package/dist/intelligence/courses-index/anthropic.js +110 -0
- package/dist/intelligence/courses-index/anthropic.js.map +1 -0
- package/dist/intelligence/critic-model.d.ts +56 -0
- package/dist/intelligence/critic-model.d.ts.map +1 -0
- package/dist/intelligence/critic-model.js +152 -0
- package/dist/intelligence/critic-model.js.map +1 -0
- package/dist/intelligence/cross-device-context.d.ts +66 -0
- package/dist/intelligence/cross-device-context.d.ts.map +1 -0
- package/dist/intelligence/cross-device-context.js +122 -0
- package/dist/intelligence/cross-device-context.js.map +1 -0
- package/dist/intelligence/data-loaders/csv.d.ts +16 -0
- package/dist/intelligence/data-loaders/csv.d.ts.map +1 -0
- package/dist/intelligence/data-loaders/csv.js +120 -0
- package/dist/intelligence/data-loaders/csv.js.map +1 -0
- package/dist/intelligence/data-loaders/json.d.ts +12 -0
- package/dist/intelligence/data-loaders/json.d.ts.map +1 -0
- package/dist/intelligence/data-loaders/json.js +65 -0
- package/dist/intelligence/data-loaders/json.js.map +1 -0
- package/dist/intelligence/data-loaders/jsonl.d.ts +15 -0
- package/dist/intelligence/data-loaders/jsonl.d.ts.map +1 -0
- package/dist/intelligence/data-loaders/jsonl.js +62 -0
- package/dist/intelligence/data-loaders/jsonl.js.map +1 -0
- package/dist/intelligence/data-loaders/markdown.d.ts +13 -0
- package/dist/intelligence/data-loaders/markdown.d.ts.map +1 -0
- package/dist/intelligence/data-loaders/markdown.js +40 -0
- package/dist/intelligence/data-loaders/markdown.js.map +1 -0
- package/dist/intelligence/data-loaders/registry.d.ts +57 -0
- package/dist/intelligence/data-loaders/registry.d.ts.map +1 -0
- package/dist/intelligence/data-loaders/registry.js +72 -0
- package/dist/intelligence/data-loaders/registry.js.map +1 -0
- package/dist/intelligence/deep-research.d.ts +90 -0
- package/dist/intelligence/deep-research.d.ts.map +1 -0
- package/dist/intelligence/deep-research.js +495 -0
- package/dist/intelligence/deep-research.js.map +1 -0
- package/dist/intelligence/dev-grounded-search.d.ts +33 -0
- package/dist/intelligence/dev-grounded-search.d.ts.map +1 -0
- package/dist/intelligence/dev-grounded-search.js +84 -0
- package/dist/intelligence/dev-grounded-search.js.map +1 -0
- package/dist/intelligence/devika/engineer-plan.d.ts +54 -0
- package/dist/intelligence/devika/engineer-plan.d.ts.map +1 -0
- package/dist/intelligence/devika/engineer-plan.js +124 -0
- package/dist/intelligence/devika/engineer-plan.js.map +1 -0
- package/dist/intelligence/domain-skill-router.d.ts +24 -0
- package/dist/intelligence/domain-skill-router.d.ts.map +1 -0
- package/dist/intelligence/domain-skill-router.js +143 -0
- package/dist/intelligence/domain-skill-router.js.map +1 -0
- package/dist/intelligence/error-pattern-learner.d.ts +67 -0
- package/dist/intelligence/error-pattern-learner.d.ts.map +1 -0
- package/dist/intelligence/error-pattern-learner.js +230 -0
- package/dist/intelligence/error-pattern-learner.js.map +1 -0
- package/dist/intelligence/eval-frameworks/redteam.d.ts +53 -0
- package/dist/intelligence/eval-frameworks/redteam.d.ts.map +1 -0
- package/dist/intelligence/eval-frameworks/redteam.js +160 -0
- package/dist/intelligence/eval-frameworks/redteam.js.map +1 -0
- package/dist/intelligence/everything-cc/catalog.d.ts +39 -0
- package/dist/intelligence/everything-cc/catalog.d.ts.map +1 -0
- package/dist/intelligence/everything-cc/catalog.js +122 -0
- package/dist/intelligence/everything-cc/catalog.js.map +1 -0
- package/dist/intelligence/everything-cc/tauri-pattern-checks.d.ts +61 -0
- package/dist/intelligence/everything-cc/tauri-pattern-checks.d.ts.map +1 -0
- package/dist/intelligence/everything-cc/tauri-pattern-checks.js +104 -0
- package/dist/intelligence/everything-cc/tauri-pattern-checks.js.map +1 -0
- package/dist/intelligence/fact-extraction.d.ts +92 -0
- package/dist/intelligence/fact-extraction.d.ts.map +1 -0
- package/dist/intelligence/fact-extraction.js +203 -0
- package/dist/intelligence/fact-extraction.js.map +1 -0
- package/dist/intelligence/finance-terminal-shell/shell.d.ts +69 -0
- package/dist/intelligence/finance-terminal-shell/shell.d.ts.map +1 -0
- package/dist/intelligence/finance-terminal-shell/shell.js +130 -0
- package/dist/intelligence/finance-terminal-shell/shell.js.map +1 -0
- package/dist/intelligence/flow-tracker.d.ts +83 -0
- package/dist/intelligence/flow-tracker.d.ts.map +1 -0
- package/dist/intelligence/flow-tracker.js +201 -0
- package/dist/intelligence/flow-tracker.js.map +1 -0
- package/dist/intelligence/follow-up-chips-v2.d.ts +64 -0
- package/dist/intelligence/follow-up-chips-v2.d.ts.map +1 -0
- package/dist/intelligence/follow-up-chips-v2.js +233 -0
- package/dist/intelligence/follow-up-chips-v2.js.map +1 -0
- package/dist/intelligence/forgecode-techniques.d.ts +143 -0
- package/dist/intelligence/forgecode-techniques.d.ts.map +1 -0
- package/dist/intelligence/forgecode-techniques.js +796 -0
- package/dist/intelligence/forgecode-techniques.js.map +1 -0
- package/dist/intelligence/genai-agents/extended-patterns.d.ts +51 -0
- package/dist/intelligence/genai-agents/extended-patterns.d.ts.map +1 -0
- package/dist/intelligence/genai-agents/extended-patterns.js +137 -0
- package/dist/intelligence/genai-agents/extended-patterns.js.map +1 -0
- package/dist/intelligence/guardian.d.ts +119 -0
- package/dist/intelligence/guardian.d.ts.map +1 -0
- package/dist/intelligence/guardian.js +314 -0
- package/dist/intelligence/guardian.js.map +1 -0
- package/dist/intelligence/haystack-patterns/pipeline.d.ts +71 -0
- package/dist/intelligence/haystack-patterns/pipeline.d.ts.map +1 -0
- package/dist/intelligence/haystack-patterns/pipeline.js +98 -0
- package/dist/intelligence/haystack-patterns/pipeline.js.map +1 -0
- package/dist/intelligence/kg-builder.d.ts +181 -0
- package/dist/intelligence/kg-builder.d.ts.map +1 -0
- package/dist/intelligence/kg-builder.js +807 -0
- package/dist/intelligence/kg-builder.js.map +1 -0
- package/dist/intelligence/langchain-patterns/chain.d.ts +64 -0
- package/dist/intelligence/langchain-patterns/chain.d.ts.map +1 -0
- package/dist/intelligence/langchain-patterns/chain.js +109 -0
- package/dist/intelligence/langchain-patterns/chain.js.map +1 -0
- package/dist/intelligence/learning-platform/ppt-generator.d.ts +45 -0
- package/dist/intelligence/learning-platform/ppt-generator.d.ts.map +1 -0
- package/dist/intelligence/learning-platform/ppt-generator.js +91 -0
- package/dist/intelligence/learning-platform/ppt-generator.js.map +1 -0
- package/dist/intelligence/llm-app-catalog/index.d.ts +35 -0
- package/dist/intelligence/llm-app-catalog/index.d.ts.map +1 -0
- package/dist/intelligence/llm-app-catalog/index.js +82 -0
- package/dist/intelligence/llm-app-catalog/index.js.map +1 -0
- package/dist/intelligence/llm-flows.d.ts +103 -0
- package/dist/intelligence/llm-flows.d.ts.map +1 -0
- package/dist/intelligence/llm-flows.js +145 -0
- package/dist/intelligence/llm-flows.js.map +1 -0
- package/dist/intelligence/meeting-capture/transcript-actionable.d.ts +36 -0
- package/dist/intelligence/meeting-capture/transcript-actionable.d.ts.map +1 -0
- package/dist/intelligence/meeting-capture/transcript-actionable.js +69 -0
- package/dist/intelligence/meeting-capture/transcript-actionable.js.map +1 -0
- package/dist/intelligence/micro-eval.d.ts +65 -0
- package/dist/intelligence/micro-eval.d.ts.map +1 -0
- package/dist/intelligence/micro-eval.js +278 -0
- package/dist/intelligence/micro-eval.js.map +1 -0
- package/dist/intelligence/multi-patch-voter.d.ts +71 -0
- package/dist/intelligence/multi-patch-voter.d.ts.map +1 -0
- package/dist/intelligence/multi-patch-voter.js +164 -0
- package/dist/intelligence/multi-patch-voter.js.map +1 -0
- package/dist/intelligence/multimodal-extract.d.ts +87 -0
- package/dist/intelligence/multimodal-extract.d.ts.map +1 -0
- package/dist/intelligence/multimodal-extract.js +164 -0
- package/dist/intelligence/multimodal-extract.js.map +1 -0
- package/dist/intelligence/note-ingest.d.ts +76 -0
- package/dist/intelligence/note-ingest.d.ts.map +1 -0
- package/dist/intelligence/note-ingest.js +217 -0
- package/dist/intelligence/note-ingest.js.map +1 -0
- package/dist/intelligence/overrides.d.ts +53 -0
- package/dist/intelligence/overrides.d.ts.map +1 -0
- package/dist/intelligence/overrides.js +198 -0
- package/dist/intelligence/overrides.js.map +1 -0
- package/dist/intelligence/parallel-search-agent.d.ts +95 -0
- package/dist/intelligence/parallel-search-agent.d.ts.map +1 -0
- package/dist/intelligence/parallel-search-agent.js +155 -0
- package/dist/intelligence/parallel-search-agent.js.map +1 -0
- package/dist/intelligence/parallel-search.d.ts +75 -0
- package/dist/intelligence/parallel-search.d.ts.map +1 -0
- package/dist/intelligence/parallel-search.js +312 -0
- package/dist/intelligence/parallel-search.js.map +1 -0
- package/dist/intelligence/patch-scorer.d.ts +136 -0
- package/dist/intelligence/patch-scorer.d.ts.map +1 -0
- package/dist/intelligence/patch-scorer.js +348 -0
- package/dist/intelligence/patch-scorer.js.map +1 -0
- package/dist/intelligence/perception/element-resolver.d.ts +105 -0
- package/dist/intelligence/perception/element-resolver.d.ts.map +1 -0
- package/dist/intelligence/perception/element-resolver.js +149 -0
- package/dist/intelligence/perception/element-resolver.js.map +1 -0
- package/dist/intelligence/perception/page-comprehension.d.ts +78 -0
- package/dist/intelligence/perception/page-comprehension.d.ts.map +1 -0
- package/dist/intelligence/perception/page-comprehension.js +192 -0
- package/dist/intelligence/perception/page-comprehension.js.map +1 -0
- package/dist/intelligence/perception/screenshot-anchored-memory.d.ts +86 -0
- package/dist/intelligence/perception/screenshot-anchored-memory.d.ts.map +1 -0
- package/dist/intelligence/perception/screenshot-anchored-memory.js +132 -0
- package/dist/intelligence/perception/screenshot-anchored-memory.js.map +1 -0
- package/dist/intelligence/policy-injector.d.ts +96 -0
- package/dist/intelligence/policy-injector.d.ts.map +1 -0
- package/dist/intelligence/policy-injector.js +193 -0
- package/dist/intelligence/policy-injector.js.map +1 -0
- package/dist/intelligence/pre-completion-verifier.d.ts +155 -0
- package/dist/intelligence/pre-completion-verifier.d.ts.map +1 -0
- package/dist/intelligence/pre-completion-verifier.js +373 -0
- package/dist/intelligence/pre-completion-verifier.js.map +1 -0
- package/dist/intelligence/predictive-context.d.ts +56 -0
- package/dist/intelligence/predictive-context.d.ts.map +1 -0
- package/dist/intelligence/predictive-context.js +220 -0
- package/dist/intelligence/predictive-context.js.map +1 -0
- package/dist/intelligence/prefill-continuation.d.ts +36 -0
- package/dist/intelligence/prefill-continuation.d.ts.map +1 -0
- package/dist/intelligence/prefill-continuation.js +137 -0
- package/dist/intelligence/prefill-continuation.js.map +1 -0
- package/dist/intelligence/progressive-budget.d.ts +219 -0
- package/dist/intelligence/progressive-budget.d.ts.map +1 -0
- package/dist/intelligence/progressive-budget.js +270 -0
- package/dist/intelligence/progressive-budget.js.map +1 -0
- package/dist/intelligence/prompt-corpus.d.ts +58 -0
- package/dist/intelligence/prompt-corpus.d.ts.map +1 -0
- package/dist/intelligence/prompt-corpus.js +130 -0
- package/dist/intelligence/prompt-corpus.js.map +1 -0
- package/dist/intelligence/provider-arbitrage.d.ts +50 -0
- package/dist/intelligence/provider-arbitrage.d.ts.map +1 -0
- package/dist/intelligence/provider-arbitrage.js +245 -0
- package/dist/intelligence/provider-arbitrage.js.map +1 -0
- package/dist/intelligence/qlib-patterns/feature-engineering.d.ts +52 -0
- package/dist/intelligence/qlib-patterns/feature-engineering.d.ts.map +1 -0
- package/dist/intelligence/qlib-patterns/feature-engineering.js +168 -0
- package/dist/intelligence/qlib-patterns/feature-engineering.js.map +1 -0
- package/dist/intelligence/quant/time-series.d.ts +83 -0
- package/dist/intelligence/quant/time-series.d.ts.map +1 -0
- package/dist/intelligence/quant/time-series.js +178 -0
- package/dist/intelligence/quant/time-series.js.map +1 -0
- package/dist/intelligence/repo-knowledge/graph.d.ts +67 -0
- package/dist/intelligence/repo-knowledge/graph.d.ts.map +1 -0
- package/dist/intelligence/repo-knowledge/graph.js +99 -0
- package/dist/intelligence/repo-knowledge/graph.js.map +1 -0
- package/dist/intelligence/research-loops/budgeted-research.d.ts +68 -0
- package/dist/intelligence/research-loops/budgeted-research.d.ts.map +1 -0
- package/dist/intelligence/research-loops/budgeted-research.js +130 -0
- package/dist/intelligence/research-loops/budgeted-research.js.map +1 -0
- package/dist/intelligence/research-loops/design-patterns.d.ts +43 -0
- package/dist/intelligence/research-loops/design-patterns.d.ts.map +1 -0
- package/dist/intelligence/research-loops/design-patterns.js +134 -0
- package/dist/intelligence/research-loops/design-patterns.js.map +1 -0
- package/dist/intelligence/research-loops/domain-router.d.ts +56 -0
- package/dist/intelligence/research-loops/domain-router.d.ts.map +1 -0
- package/dist/intelligence/research-loops/domain-router.js +190 -0
- package/dist/intelligence/research-loops/domain-router.js.map +1 -0
- package/dist/intelligence/research-loops/reflective-dialog.d.ts +81 -0
- package/dist/intelligence/research-loops/reflective-dialog.d.ts.map +1 -0
- package/dist/intelligence/research-loops/reflective-dialog.js +132 -0
- package/dist/intelligence/research-loops/reflective-dialog.js.map +1 -0
- package/dist/intelligence/response-validator.d.ts +103 -0
- package/dist/intelligence/response-validator.d.ts.map +1 -0
- package/dist/intelligence/response-validator.js +417 -0
- package/dist/intelligence/response-validator.js.map +1 -0
- package/dist/intelligence/schema-optimizer.d.ts +61 -0
- package/dist/intelligence/schema-optimizer.d.ts.map +1 -0
- package/dist/intelligence/schema-optimizer.js +162 -0
- package/dist/intelligence/schema-optimizer.js.map +1 -0
- package/dist/intelligence/search-providers.d.ts +76 -0
- package/dist/intelligence/search-providers.d.ts.map +1 -0
- package/dist/intelligence/search-providers.js +209 -0
- package/dist/intelligence/search-providers.js.map +1 -0
- package/dist/intelligence/skill-catalog-index.d.ts +49 -0
- package/dist/intelligence/skill-catalog-index.d.ts.map +1 -0
- package/dist/intelligence/skill-catalog-index.js +178 -0
- package/dist/intelligence/skill-catalog-index.js.map +1 -0
- package/dist/intelligence/smart-file-search.d.ts +55 -0
- package/dist/intelligence/smart-file-search.d.ts.map +1 -0
- package/dist/intelligence/smart-file-search.js +268 -0
- package/dist/intelligence/smart-file-search.js.map +1 -0
- package/dist/intelligence/smart-retry.d.ts +57 -0
- package/dist/intelligence/smart-retry.d.ts.map +1 -0
- package/dist/intelligence/smart-retry.js +177 -0
- package/dist/intelligence/smart-retry.js.map +1 -0
- package/dist/intelligence/strict-schema.d.ts +76 -0
- package/dist/intelligence/strict-schema.d.ts.map +1 -0
- package/dist/intelligence/strict-schema.js +287 -0
- package/dist/intelligence/strict-schema.js.map +1 -0
- package/dist/intelligence/task-semantic-router.d.ts +49 -0
- package/dist/intelligence/task-semantic-router.d.ts.map +1 -0
- package/dist/intelligence/task-semantic-router.js +344 -0
- package/dist/intelligence/task-semantic-router.js.map +1 -0
- package/dist/intelligence/tool-pattern-detector.d.ts +68 -0
- package/dist/intelligence/tool-pattern-detector.d.ts.map +1 -0
- package/dist/intelligence/tool-pattern-detector.js +121 -0
- package/dist/intelligence/tool-pattern-detector.js.map +1 -0
- package/dist/intelligence/trace-analyzer.d.ts +90 -0
- package/dist/intelligence/trace-analyzer.d.ts.map +1 -0
- package/dist/intelligence/trace-analyzer.js +287 -0
- package/dist/intelligence/trace-analyzer.js.map +1 -0
- package/dist/intelligence/trajectory-scorer.d.ts +55 -0
- package/dist/intelligence/trajectory-scorer.d.ts.map +1 -0
- package/dist/intelligence/trajectory-scorer.js +235 -0
- package/dist/intelligence/trajectory-scorer.js.map +1 -0
- package/dist/intelligence/user-model.d.ts +93 -0
- package/dist/intelligence/user-model.d.ts.map +1 -0
- package/dist/intelligence/user-model.js +128 -0
- package/dist/intelligence/user-model.js.map +1 -0
- package/dist/intelligence/verification-cascade.d.ts +59 -0
- package/dist/intelligence/verification-cascade.d.ts.map +1 -0
- package/dist/intelligence/verification-cascade.js +258 -0
- package/dist/intelligence/verification-cascade.js.map +1 -0
- package/dist/intelligence/wall-clock-budget.d.ts +55 -0
- package/dist/intelligence/wall-clock-budget.d.ts.map +1 -0
- package/dist/intelligence/wall-clock-budget.js +121 -0
- package/dist/intelligence/wall-clock-budget.js.map +1 -0
- package/dist/intent/byoa-detector.d.ts +109 -0
- package/dist/intent/byoa-detector.d.ts.map +1 -0
- package/dist/intent/byoa-detector.js +208 -0
- package/dist/intent/byoa-detector.js.map +1 -0
- package/dist/intent/living-spec.d.ts +61 -0
- package/dist/intent/living-spec.d.ts.map +1 -0
- package/dist/intent/living-spec.js +301 -0
- package/dist/intent/living-spec.js.map +1 -0
- package/dist/learning/autodream.d.ts +190 -0
- package/dist/learning/autodream.d.ts.map +1 -0
- package/dist/learning/autodream.js +415 -0
- package/dist/learning/autodream.js.map +1 -0
- package/dist/learning/cross-session.d.ts +111 -0
- package/dist/learning/cross-session.d.ts.map +1 -0
- package/dist/learning/cross-session.js +406 -0
- package/dist/learning/cross-session.js.map +1 -0
- package/dist/learning/darwinian-evolver.d.ts +83 -0
- package/dist/learning/darwinian-evolver.d.ts.map +1 -0
- package/dist/learning/darwinian-evolver.js +144 -0
- package/dist/learning/darwinian-evolver.js.map +1 -0
- package/dist/learning/decision-ledger.d.ts +87 -0
- package/dist/learning/decision-ledger.d.ts.map +1 -0
- package/dist/learning/decision-ledger.js +228 -0
- package/dist/learning/decision-ledger.js.map +1 -0
- package/dist/learning/dream-pipeline.d.ts +108 -0
- package/dist/learning/dream-pipeline.d.ts.map +1 -0
- package/dist/learning/dream-pipeline.js +464 -0
- package/dist/learning/dream-pipeline.js.map +1 -0
- package/dist/learning/dream-runner.d.ts +55 -0
- package/dist/learning/dream-runner.d.ts.map +1 -0
- package/dist/learning/dream-runner.js +270 -0
- package/dist/learning/dream-runner.js.map +1 -0
- package/dist/learning/feedback-collector.d.ts +79 -0
- package/dist/learning/feedback-collector.d.ts.map +1 -0
- package/dist/learning/feedback-collector.js +170 -0
- package/dist/learning/feedback-collector.js.map +1 -0
- package/dist/learning/gepa-optimizer.d.ts +100 -0
- package/dist/learning/gepa-optimizer.d.ts.map +1 -0
- package/dist/learning/gepa-optimizer.js +207 -0
- package/dist/learning/gepa-optimizer.js.map +1 -0
- package/dist/learning/instinct-system.d.ts +87 -0
- package/dist/learning/instinct-system.d.ts.map +1 -0
- package/dist/learning/instinct-system.js +286 -0
- package/dist/learning/instinct-system.js.map +1 -0
- package/dist/learning/miprov2-optimizer.d.ts +82 -0
- package/dist/learning/miprov2-optimizer.d.ts.map +1 -0
- package/dist/learning/miprov2-optimizer.js +113 -0
- package/dist/learning/miprov2-optimizer.js.map +1 -0
- package/dist/learning/nightly-consolidator.d.ts +121 -0
- package/dist/learning/nightly-consolidator.d.ts.map +1 -0
- package/dist/learning/nightly-consolidator.js +163 -0
- package/dist/learning/nightly-consolidator.js.map +1 -0
- package/dist/learning/pattern-crystallizer.d.ts +87 -0
- package/dist/learning/pattern-crystallizer.d.ts.map +1 -0
- package/dist/learning/pattern-crystallizer.js +248 -0
- package/dist/learning/pattern-crystallizer.js.map +1 -0
- package/dist/learning/reflection-buffer.d.ts +68 -0
- package/dist/learning/reflection-buffer.d.ts.map +1 -0
- package/dist/learning/reflection-buffer.js +155 -0
- package/dist/learning/reflection-buffer.js.map +1 -0
- package/dist/learning/rl-feedback-export.d.ts +79 -0
- package/dist/learning/rl-feedback-export.d.ts.map +1 -0
- package/dist/learning/rl-feedback-export.js +132 -0
- package/dist/learning/rl-feedback-export.js.map +1 -0
- package/dist/learning/self-evolution.d.ts +86 -0
- package/dist/learning/self-evolution.d.ts.map +1 -0
- package/dist/learning/self-evolution.js +217 -0
- package/dist/learning/self-evolution.js.map +1 -0
- package/dist/learning/skill-forge.d.ts +157 -0
- package/dist/learning/skill-forge.d.ts.map +1 -0
- package/dist/learning/skill-forge.js +515 -0
- package/dist/learning/skill-forge.js.map +1 -0
- package/dist/learning/sleep-time-agent.d.ts +107 -0
- package/dist/learning/sleep-time-agent.d.ts.map +1 -0
- package/dist/learning/sleep-time-agent.js +197 -0
- package/dist/learning/sleep-time-agent.js.map +1 -0
- package/dist/learning/types.d.ts +77 -0
- package/dist/learning/types.d.ts.map +1 -0
- package/dist/learning/types.js +11 -0
- package/dist/learning/types.js.map +1 -0
- package/dist/lib.d.ts +230 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/lib.js +471 -0
- package/dist/lib.js.map +1 -0
- package/dist/lsp/agent-tools.d.ts +109 -0
- package/dist/lsp/agent-tools.d.ts.map +1 -0
- package/dist/lsp/agent-tools.js +585 -0
- package/dist/lsp/agent-tools.js.map +1 -0
- package/dist/lsp/lsp-tools.d.ts +84 -0
- package/dist/lsp/lsp-tools.d.ts.map +1 -0
- package/dist/lsp/lsp-tools.js +267 -0
- package/dist/lsp/lsp-tools.js.map +1 -0
- package/dist/lsp/server-registry.d.ts +153 -0
- package/dist/lsp/server-registry.d.ts.map +1 -0
- package/dist/lsp/server-registry.js +339 -0
- package/dist/lsp/server-registry.js.map +1 -0
- package/dist/lsp/symbol-operations.d.ts +97 -0
- package/dist/lsp/symbol-operations.d.ts.map +1 -0
- package/dist/lsp/symbol-operations.js +761 -0
- package/dist/lsp/symbol-operations.js.map +1 -0
- package/dist/magic/command-resolver.d.ts +27 -0
- package/dist/magic/command-resolver.d.ts.map +1 -0
- package/dist/magic/command-resolver.js +52 -0
- package/dist/magic/command-resolver.js.map +1 -0
- package/dist/magic/handlers/ai-commit.d.ts +24 -0
- package/dist/magic/handlers/ai-commit.d.ts.map +1 -0
- package/dist/magic/handlers/ai-commit.js +56 -0
- package/dist/magic/handlers/ai-commit.js.map +1 -0
- package/dist/magic/handlers/docstring.d.ts +3 -0
- package/dist/magic/handlers/docstring.d.ts.map +1 -0
- package/dist/magic/handlers/docstring.js +11 -0
- package/dist/magic/handlers/docstring.js.map +1 -0
- package/dist/magic/handlers/explain.d.ts +3 -0
- package/dist/magic/handlers/explain.d.ts.map +1 -0
- package/dist/magic/handlers/explain.js +11 -0
- package/dist/magic/handlers/explain.js.map +1 -0
- package/dist/magic/handlers/fix.d.ts +3 -0
- package/dist/magic/handlers/fix.d.ts.map +1 -0
- package/dist/magic/handlers/fix.js +11 -0
- package/dist/magic/handlers/fix.js.map +1 -0
- package/dist/magic/handlers/format.d.ts +3 -0
- package/dist/magic/handlers/format.d.ts.map +1 -0
- package/dist/magic/handlers/format.js +11 -0
- package/dist/magic/handlers/format.js.map +1 -0
- package/dist/magic/handlers/investigate-issue.d.ts +27 -0
- package/dist/magic/handlers/investigate-issue.d.ts.map +1 -0
- package/dist/magic/handlers/investigate-issue.js +59 -0
- package/dist/magic/handlers/investigate-issue.js.map +1 -0
- package/dist/magic/handlers/investigate-pr.d.ts +24 -0
- package/dist/magic/handlers/investigate-pr.d.ts.map +1 -0
- package/dist/magic/handlers/investigate-pr.js +58 -0
- package/dist/magic/handlers/investigate-pr.js.map +1 -0
- package/dist/magic/handlers/investigate-workflow.d.ts +23 -0
- package/dist/magic/handlers/investigate-workflow.d.ts.map +1 -0
- package/dist/magic/handlers/investigate-workflow.js +56 -0
- package/dist/magic/handlers/investigate-workflow.js.map +1 -0
- package/dist/magic/handlers/merge-conflict.d.ts +27 -0
- package/dist/magic/handlers/merge-conflict.d.ts.map +1 -0
- package/dist/magic/handlers/merge-conflict.js +68 -0
- package/dist/magic/handlers/merge-conflict.js.map +1 -0
- package/dist/magic/handlers/optimize.d.ts +3 -0
- package/dist/magic/handlers/optimize.d.ts.map +1 -0
- package/dist/magic/handlers/optimize.js +11 -0
- package/dist/magic/handlers/optimize.js.map +1 -0
- package/dist/magic/handlers/pr-content.d.ts +23 -0
- package/dist/magic/handlers/pr-content.d.ts.map +1 -0
- package/dist/magic/handlers/pr-content.js +67 -0
- package/dist/magic/handlers/pr-content.js.map +1 -0
- package/dist/magic/handlers/refactor.d.ts +3 -0
- package/dist/magic/handlers/refactor.d.ts.map +1 -0
- package/dist/magic/handlers/refactor.js +11 -0
- package/dist/magic/handlers/refactor.js.map +1 -0
- package/dist/magic/handlers/release-notes.d.ts +28 -0
- package/dist/magic/handlers/release-notes.d.ts.map +1 -0
- package/dist/magic/handlers/release-notes.js +85 -0
- package/dist/magic/handlers/release-notes.js.map +1 -0
- package/dist/magic/handlers/review.d.ts +3 -0
- package/dist/magic/handlers/review.d.ts.map +1 -0
- package/dist/magic/handlers/review.js +11 -0
- package/dist/magic/handlers/review.js.map +1 -0
- package/dist/magic/handlers/test.d.ts +3 -0
- package/dist/magic/handlers/test.d.ts.map +1 -0
- package/dist/magic/handlers/test.js +11 -0
- package/dist/magic/handlers/test.js.map +1 -0
- package/dist/magic/magic-commands.d.ts +17 -0
- package/dist/magic/magic-commands.d.ts.map +1 -0
- package/dist/magic/magic-commands.js +143 -0
- package/dist/magic/magic-commands.js.map +1 -0
- package/dist/magic/types.d.ts +52 -0
- package/dist/magic/types.d.ts.map +1 -0
- package/dist/magic/types.js +10 -0
- package/dist/magic/types.js.map +1 -0
- package/dist/marketplace/acp-agent-registry.d.ts +237 -0
- package/dist/marketplace/acp-agent-registry.d.ts.map +1 -0
- package/dist/marketplace/acp-agent-registry.js +694 -0
- package/dist/marketplace/acp-agent-registry.js.map +1 -0
- package/dist/marketplace/manifest.d.ts +47 -0
- package/dist/marketplace/manifest.d.ts.map +1 -0
- package/dist/marketplace/manifest.js +174 -0
- package/dist/marketplace/manifest.js.map +1 -0
- package/dist/marketplace/mcpb.d.ts +131 -0
- package/dist/marketplace/mcpb.d.ts.map +1 -0
- package/dist/marketplace/mcpb.js +218 -0
- package/dist/marketplace/mcpb.js.map +1 -0
- package/dist/marketplace/plugin-loader.d.ts +126 -0
- package/dist/marketplace/plugin-loader.d.ts.map +1 -0
- package/dist/marketplace/plugin-loader.js +335 -0
- package/dist/marketplace/plugin-loader.js.map +1 -0
- package/dist/marketplace/registry.d.ts +229 -0
- package/dist/marketplace/registry.d.ts.map +1 -0
- package/dist/marketplace/registry.js +875 -0
- package/dist/marketplace/registry.js.map +1 -0
- package/dist/marketplace/skill-quarantine.d.ts +76 -0
- package/dist/marketplace/skill-quarantine.d.ts.map +1 -0
- package/dist/marketplace/skill-quarantine.js +146 -0
- package/dist/marketplace/skill-quarantine.js.map +1 -0
- package/dist/mcp/chrome-devtools.d.ts +91 -0
- package/dist/mcp/chrome-devtools.d.ts.map +1 -0
- package/dist/mcp/chrome-devtools.js +152 -0
- package/dist/mcp/chrome-devtools.js.map +1 -0
- package/dist/mcp/discovery.d.ts +67 -0
- package/dist/mcp/discovery.d.ts.map +1 -0
- package/dist/mcp/discovery.js +188 -0
- package/dist/mcp/discovery.js.map +1 -0
- package/dist/mcp/elicitation.d.ts +128 -0
- package/dist/mcp/elicitation.d.ts.map +1 -0
- package/dist/mcp/elicitation.js +197 -0
- package/dist/mcp/elicitation.js.map +1 -0
- package/dist/mcp/health-probe.d.ts +60 -0
- package/dist/mcp/health-probe.d.ts.map +1 -0
- package/dist/mcp/health-probe.js +208 -0
- package/dist/mcp/health-probe.js.map +1 -0
- package/dist/mcp/mcp-server.d.ts +276 -0
- package/dist/mcp/mcp-server.d.ts.map +1 -0
- package/dist/mcp/mcp-server.js +543 -0
- package/dist/mcp/mcp-server.js.map +1 -0
- package/dist/mcp/memory-tool-shim.d.ts +125 -0
- package/dist/mcp/memory-tool-shim.d.ts.map +1 -0
- package/dist/mcp/memory-tool-shim.js +397 -0
- package/dist/mcp/memory-tool-shim.js.map +1 -0
- package/dist/mcp/servers/design-bridge.d.ts +87 -0
- package/dist/mcp/servers/design-bridge.d.ts.map +1 -0
- package/dist/mcp/servers/design-bridge.js +259 -0
- package/dist/mcp/servers/design-bridge.js.map +1 -0
- package/dist/mcp/servers/wotann-tools.d.ts +133 -0
- package/dist/mcp/servers/wotann-tools.d.ts.map +1 -0
- package/dist/mcp/servers/wotann-tools.js +452 -0
- package/dist/mcp/servers/wotann-tools.js.map +1 -0
- package/dist/mcp/skills-as-prompts.d.ts +126 -0
- package/dist/mcp/skills-as-prompts.d.ts.map +1 -0
- package/dist/mcp/skills-as-prompts.js +212 -0
- package/dist/mcp/skills-as-prompts.js.map +1 -0
- package/dist/mcp/tool-loader.d.ts +116 -0
- package/dist/mcp/tool-loader.d.ts.map +1 -0
- package/dist/mcp/tool-loader.js +368 -0
- package/dist/mcp/tool-loader.js.map +1 -0
- package/dist/mcp/ui-resources.d.ts +79 -0
- package/dist/mcp/ui-resources.d.ts.map +1 -0
- package/dist/mcp/ui-resources.js +193 -0
- package/dist/mcp/ui-resources.js.map +1 -0
- package/dist/meet/coaching-engine.d.ts +35 -0
- package/dist/meet/coaching-engine.d.ts.map +1 -0
- package/dist/meet/coaching-engine.js +101 -0
- package/dist/meet/coaching-engine.js.map +1 -0
- package/dist/meet/meeting-pipeline.d.ts +85 -0
- package/dist/meet/meeting-pipeline.d.ts.map +1 -0
- package/dist/meet/meeting-pipeline.js +156 -0
- package/dist/meet/meeting-pipeline.js.map +1 -0
- package/dist/meet/meeting-runtime.d.ts +90 -0
- package/dist/meet/meeting-runtime.d.ts.map +1 -0
- package/dist/meet/meeting-runtime.js +189 -0
- package/dist/meet/meeting-runtime.js.map +1 -0
- package/dist/meet/meeting-store.d.ts +37 -0
- package/dist/meet/meeting-store.d.ts.map +1 -0
- package/dist/meet/meeting-store.js +158 -0
- package/dist/meet/meeting-store.js.map +1 -0
- package/dist/memory/abstention.d.ts +132 -0
- package/dist/memory/abstention.d.ts.map +1 -0
- package/dist/memory/abstention.js +192 -0
- package/dist/memory/abstention.js.map +1 -0
- package/dist/memory/active-memory.d.ts +153 -0
- package/dist/memory/active-memory.d.ts.map +1 -0
- package/dist/memory/active-memory.js +431 -0
- package/dist/memory/active-memory.js.map +1 -0
- package/dist/memory/agent-facts.d.ts +121 -0
- package/dist/memory/agent-facts.d.ts.map +1 -0
- package/dist/memory/agent-facts.js +225 -0
- package/dist/memory/agent-facts.js.map +1 -0
- package/dist/memory/asmr-voter.d.ts +106 -0
- package/dist/memory/asmr-voter.d.ts.map +1 -0
- package/dist/memory/asmr-voter.js +143 -0
- package/dist/memory/asmr-voter.js.map +1 -0
- package/dist/memory/atomic-memory.d.ts +122 -0
- package/dist/memory/atomic-memory.d.ts.map +1 -0
- package/dist/memory/atomic-memory.js +232 -0
- package/dist/memory/atomic-memory.js.map +1 -0
- package/dist/memory/bi-temporal-edges.d.ts +154 -0
- package/dist/memory/bi-temporal-edges.d.ts.map +1 -0
- package/dist/memory/bi-temporal-edges.js +177 -0
- package/dist/memory/bi-temporal-edges.js.map +1 -0
- package/dist/memory/block-memory.d.ts +60 -0
- package/dist/memory/block-memory.d.ts.map +1 -0
- package/dist/memory/block-memory.js +195 -0
- package/dist/memory/block-memory.js.map +1 -0
- package/dist/memory/cloud-sync.d.ts +86 -0
- package/dist/memory/cloud-sync.d.ts.map +1 -0
- package/dist/memory/cloud-sync.js +195 -0
- package/dist/memory/cloud-sync.js.map +1 -0
- package/dist/memory/community-detection.d.ts +104 -0
- package/dist/memory/community-detection.d.ts.map +1 -0
- package/dist/memory/community-detection.js +287 -0
- package/dist/memory/community-detection.js.map +1 -0
- package/dist/memory/context-builder.d.ts +112 -0
- package/dist/memory/context-builder.d.ts.map +1 -0
- package/dist/memory/context-builder.js +251 -0
- package/dist/memory/context-builder.js.map +1 -0
- package/dist/memory/context-fence.d.ts +88 -0
- package/dist/memory/context-fence.d.ts.map +1 -0
- package/dist/memory/context-fence.js +166 -0
- package/dist/memory/context-fence.js.map +1 -0
- package/dist/memory/context-loader.d.ts +111 -0
- package/dist/memory/context-loader.d.ts.map +1 -0
- package/dist/memory/context-loader.js +215 -0
- package/dist/memory/context-loader.js.map +1 -0
- package/dist/memory/context-tree-files.d.ts +56 -0
- package/dist/memory/context-tree-files.d.ts.map +1 -0
- package/dist/memory/context-tree-files.js +185 -0
- package/dist/memory/context-tree-files.js.map +1 -0
- package/dist/memory/context-tree.d.ts +75 -0
- package/dist/memory/context-tree.d.ts.map +1 -0
- package/dist/memory/context-tree.js +302 -0
- package/dist/memory/context-tree.js.map +1 -0
- package/dist/memory/contextual-embeddings.d.ts +106 -0
- package/dist/memory/contextual-embeddings.d.ts.map +1 -0
- package/dist/memory/contextual-embeddings.js +210 -0
- package/dist/memory/contextual-embeddings.js.map +1 -0
- package/dist/memory/contradiction-detector.d.ts +81 -0
- package/dist/memory/contradiction-detector.d.ts.map +1 -0
- package/dist/memory/contradiction-detector.js +248 -0
- package/dist/memory/contradiction-detector.js.map +1 -0
- package/dist/memory/conversation-miner.d.ts +53 -0
- package/dist/memory/conversation-miner.d.ts.map +1 -0
- package/dist/memory/conversation-miner.js +416 -0
- package/dist/memory/conversation-miner.js.map +1 -0
- package/dist/memory/cross-encoder.d.ts +78 -0
- package/dist/memory/cross-encoder.d.ts.map +1 -0
- package/dist/memory/cross-encoder.js +124 -0
- package/dist/memory/cross-encoder.js.map +1 -0
- package/dist/memory/dual-timestamp.d.ts +115 -0
- package/dist/memory/dual-timestamp.d.ts.map +1 -0
- package/dist/memory/dual-timestamp.js +253 -0
- package/dist/memory/dual-timestamp.js.map +1 -0
- package/dist/memory/embedding-profiles.d.ts +98 -0
- package/dist/memory/embedding-profiles.d.ts.map +1 -0
- package/dist/memory/embedding-profiles.js +193 -0
- package/dist/memory/embedding-profiles.js.map +1 -0
- package/dist/memory/entity-types.d.ts +271 -0
- package/dist/memory/entity-types.d.ts.map +1 -0
- package/dist/memory/entity-types.js +205 -0
- package/dist/memory/entity-types.js.map +1 -0
- package/dist/memory/episodic-memory.d.ts +149 -0
- package/dist/memory/episodic-memory.d.ts.map +1 -0
- package/dist/memory/episodic-memory.js +399 -0
- package/dist/memory/episodic-memory.js.map +1 -0
- package/dist/memory/evals/longmemeval/corpus.d.ts +115 -0
- package/dist/memory/evals/longmemeval/corpus.d.ts.map +1 -0
- package/dist/memory/evals/longmemeval/corpus.js +419 -0
- package/dist/memory/evals/longmemeval/corpus.js.map +1 -0
- package/dist/memory/evals/longmemeval/index.d.ts +31 -0
- package/dist/memory/evals/longmemeval/index.d.ts.map +1 -0
- package/dist/memory/evals/longmemeval/index.js +31 -0
- package/dist/memory/evals/longmemeval/index.js.map +1 -0
- package/dist/memory/evals/longmemeval/runner.d.ts +81 -0
- package/dist/memory/evals/longmemeval/runner.d.ts.map +1 -0
- package/dist/memory/evals/longmemeval/runner.js +258 -0
- package/dist/memory/evals/longmemeval/runner.js.map +1 -0
- package/dist/memory/evals/longmemeval/scorer.d.ts +135 -0
- package/dist/memory/evals/longmemeval/scorer.d.ts.map +1 -0
- package/dist/memory/evals/longmemeval/scorer.js +452 -0
- package/dist/memory/evals/longmemeval/scorer.js.map +1 -0
- package/dist/memory/extended-search-types.d.ts +96 -0
- package/dist/memory/extended-search-types.d.ts.map +1 -0
- package/dist/memory/extended-search-types.js +245 -0
- package/dist/memory/extended-search-types.js.map +1 -0
- package/dist/memory/folded-context.d.ts +80 -0
- package/dist/memory/folded-context.d.ts.map +1 -0
- package/dist/memory/folded-context.js +196 -0
- package/dist/memory/folded-context.js.map +1 -0
- package/dist/memory/freshness-decay.d.ts +89 -0
- package/dist/memory/freshness-decay.d.ts.map +1 -0
- package/dist/memory/freshness-decay.js +134 -0
- package/dist/memory/freshness-decay.js.map +1 -0
- package/dist/memory/graph-rag.d.ts +166 -0
- package/dist/memory/graph-rag.d.ts.map +1 -0
- package/dist/memory/graph-rag.js +573 -0
- package/dist/memory/graph-rag.js.map +1 -0
- package/dist/memory/guidance-whisper.d.ts +37 -0
- package/dist/memory/guidance-whisper.d.ts.map +1 -0
- package/dist/memory/guidance-whisper.js +76 -0
- package/dist/memory/guidance-whisper.js.map +1 -0
- package/dist/memory/hybrid-retrieval-v2.d.ts +154 -0
- package/dist/memory/hybrid-retrieval-v2.d.ts.map +1 -0
- package/dist/memory/hybrid-retrieval-v2.js +295 -0
- package/dist/memory/hybrid-retrieval-v2.js.map +1 -0
- package/dist/memory/hybrid-retrieval.d.ts +87 -0
- package/dist/memory/hybrid-retrieval.d.ts.map +1 -0
- package/dist/memory/hybrid-retrieval.js +244 -0
- package/dist/memory/hybrid-retrieval.js.map +1 -0
- package/dist/memory/incremental-indexer.d.ts +117 -0
- package/dist/memory/incremental-indexer.d.ts.map +1 -0
- package/dist/memory/incremental-indexer.js +200 -0
- package/dist/memory/incremental-indexer.js.map +1 -0
- package/dist/memory/knowledge-update-dynamics.d.ts +95 -0
- package/dist/memory/knowledge-update-dynamics.d.ts.map +1 -0
- package/dist/memory/knowledge-update-dynamics.js +154 -0
- package/dist/memory/knowledge-update-dynamics.js.map +1 -0
- package/dist/memory/mem-palace.d.ts +99 -0
- package/dist/memory/mem-palace.d.ts.map +1 -0
- package/dist/memory/mem-palace.js +215 -0
- package/dist/memory/mem-palace.js.map +1 -0
- package/dist/memory/mem0-add-only.d.ts +140 -0
- package/dist/memory/mem0-add-only.d.ts.map +1 -0
- package/dist/memory/mem0-add-only.js +279 -0
- package/dist/memory/mem0-add-only.js.map +1 -0
- package/dist/memory/memory-benchmark.d.ts +99 -0
- package/dist/memory/memory-benchmark.d.ts.map +1 -0
- package/dist/memory/memory-benchmark.js +393 -0
- package/dist/memory/memory-benchmark.js.map +1 -0
- package/dist/memory/memory-tools.d.ts +147 -0
- package/dist/memory/memory-tools.d.ts.map +1 -0
- package/dist/memory/memory-tools.js +415 -0
- package/dist/memory/memory-tools.js.map +1 -0
- package/dist/memory/memvid-backend.d.ts +122 -0
- package/dist/memory/memvid-backend.d.ts.map +1 -0
- package/dist/memory/memvid-backend.js +302 -0
- package/dist/memory/memvid-backend.js.map +1 -0
- package/dist/memory/multi-tier.d.ts +87 -0
- package/dist/memory/multi-tier.d.ts.map +1 -0
- package/dist/memory/multi-tier.js +186 -0
- package/dist/memory/multi-tier.js.map +1 -0
- package/dist/memory/observation-extractor.d.ts +122 -0
- package/dist/memory/observation-extractor.d.ts.map +1 -0
- package/dist/memory/observation-extractor.js +529 -0
- package/dist/memory/observation-extractor.js.map +1 -0
- package/dist/memory/observer.d.ts +159 -0
- package/dist/memory/observer.d.ts.map +1 -0
- package/dist/memory/observer.js +273 -0
- package/dist/memory/observer.js.map +1 -0
- package/dist/memory/omega-layers.d.ts +136 -0
- package/dist/memory/omega-layers.d.ts.map +1 -0
- package/dist/memory/omega-layers.js +263 -0
- package/dist/memory/omega-layers.js.map +1 -0
- package/dist/memory/onnx-cross-encoder.d.ts +239 -0
- package/dist/memory/onnx-cross-encoder.d.ts.map +1 -0
- package/dist/memory/onnx-cross-encoder.js +627 -0
- package/dist/memory/onnx-cross-encoder.js.map +1 -0
- package/dist/memory/persona-tree.d.ts +102 -0
- package/dist/memory/persona-tree.d.ts.map +1 -0
- package/dist/memory/persona-tree.js +269 -0
- package/dist/memory/persona-tree.js.map +1 -0
- package/dist/memory/pluggable-provider.d.ts +140 -0
- package/dist/memory/pluggable-provider.d.ts.map +1 -0
- package/dist/memory/pluggable-provider.js +253 -0
- package/dist/memory/pluggable-provider.js.map +1 -0
- package/dist/memory/proactive-memory.d.ts +59 -0
- package/dist/memory/proactive-memory.d.ts.map +1 -0
- package/dist/memory/proactive-memory.js +296 -0
- package/dist/memory/proactive-memory.js.map +1 -0
- package/dist/memory/progressive-context-loader.d.ts +153 -0
- package/dist/memory/progressive-context-loader.d.ts.map +1 -0
- package/dist/memory/progressive-context-loader.js +212 -0
- package/dist/memory/progressive-context-loader.js.map +1 -0
- package/dist/memory/qmd-integration.d.ts +23 -0
- package/dist/memory/qmd-integration.d.ts.map +1 -0
- package/dist/memory/qmd-integration.js +149 -0
- package/dist/memory/qmd-integration.js.map +1 -0
- package/dist/memory/quantized-vector-store.d.ts +126 -0
- package/dist/memory/quantized-vector-store.d.ts.map +1 -0
- package/dist/memory/quantized-vector-store.js +151 -0
- package/dist/memory/quantized-vector-store.js.map +1 -0
- package/dist/memory/reflector.d.ts +158 -0
- package/dist/memory/reflector.d.ts.map +1 -0
- package/dist/memory/reflector.js +315 -0
- package/dist/memory/reflector.js.map +1 -0
- package/dist/memory/relationship-types.d.ts +117 -0
- package/dist/memory/relationship-types.d.ts.map +1 -0
- package/dist/memory/relationship-types.js +215 -0
- package/dist/memory/relationship-types.js.map +1 -0
- package/dist/memory/retrieval-modes/authority-weight.d.ts +17 -0
- package/dist/memory/retrieval-modes/authority-weight.d.ts.map +1 -0
- package/dist/memory/retrieval-modes/authority-weight.js +40 -0
- package/dist/memory/retrieval-modes/authority-weight.js.map +1 -0
- package/dist/memory/retrieval-modes/cross-session-bridge.d.ts +16 -0
- package/dist/memory/retrieval-modes/cross-session-bridge.d.ts.map +1 -0
- package/dist/memory/retrieval-modes/cross-session-bridge.js +68 -0
- package/dist/memory/retrieval-modes/cross-session-bridge.js.map +1 -0
- package/dist/memory/retrieval-modes/fact-time-travel.d.ts +19 -0
- package/dist/memory/retrieval-modes/fact-time-travel.d.ts.map +1 -0
- package/dist/memory/retrieval-modes/fact-time-travel.js +89 -0
- package/dist/memory/retrieval-modes/fact-time-travel.js.map +1 -0
- package/dist/memory/retrieval-modes/fuzzy-match.d.ts +16 -0
- package/dist/memory/retrieval-modes/fuzzy-match.d.ts.map +1 -0
- package/dist/memory/retrieval-modes/fuzzy-match.js +67 -0
- package/dist/memory/retrieval-modes/fuzzy-match.js.map +1 -0
- package/dist/memory/retrieval-modes/graph-traversal.d.ts +16 -0
- package/dist/memory/retrieval-modes/graph-traversal.d.ts.map +1 -0
- package/dist/memory/retrieval-modes/graph-traversal.js +88 -0
- package/dist/memory/retrieval-modes/graph-traversal.js.map +1 -0
- package/dist/memory/retrieval-modes/ingest-time-travel.d.ts +21 -0
- package/dist/memory/retrieval-modes/ingest-time-travel.d.ts.map +1 -0
- package/dist/memory/retrieval-modes/ingest-time-travel.js +73 -0
- package/dist/memory/retrieval-modes/ingest-time-travel.js.map +1 -0
- package/dist/memory/retrieval-modes/path-based.d.ts +16 -0
- package/dist/memory/retrieval-modes/path-based.d.ts.map +1 -0
- package/dist/memory/retrieval-modes/path-based.js +110 -0
- package/dist/memory/retrieval-modes/path-based.js.map +1 -0
- package/dist/memory/retrieval-modes/semantic-cluster.d.ts +20 -0
- package/dist/memory/retrieval-modes/semantic-cluster.d.ts.map +1 -0
- package/dist/memory/retrieval-modes/semantic-cluster.js +159 -0
- package/dist/memory/retrieval-modes/semantic-cluster.js.map +1 -0
- package/dist/memory/retrieval-modes/summary-first.d.ts +17 -0
- package/dist/memory/retrieval-modes/summary-first.d.ts.map +1 -0
- package/dist/memory/retrieval-modes/summary-first.js +82 -0
- package/dist/memory/retrieval-modes/summary-first.js.map +1 -0
- package/dist/memory/retrieval-modes/temporal-window.d.ts +15 -0
- package/dist/memory/retrieval-modes/temporal-window.d.ts.map +1 -0
- package/dist/memory/retrieval-modes/temporal-window.js +52 -0
- package/dist/memory/retrieval-modes/temporal-window.js.map +1 -0
- package/dist/memory/retrieval-modes/time-decay.d.ts +16 -0
- package/dist/memory/retrieval-modes/time-decay.d.ts.map +1 -0
- package/dist/memory/retrieval-modes/time-decay.js +54 -0
- package/dist/memory/retrieval-modes/time-decay.js.map +1 -0
- package/dist/memory/retrieval-modes/typed-entity.d.ts +15 -0
- package/dist/memory/retrieval-modes/typed-entity.d.ts.map +1 -0
- package/dist/memory/retrieval-modes/typed-entity.js +75 -0
- package/dist/memory/retrieval-modes/typed-entity.js.map +1 -0
- package/dist/memory/retrieval-modes/types.d.ts +98 -0
- package/dist/memory/retrieval-modes/types.d.ts.map +1 -0
- package/dist/memory/retrieval-modes/types.js +24 -0
- package/dist/memory/retrieval-modes/types.js.map +1 -0
- package/dist/memory/retrieval-quality.d.ts +73 -0
- package/dist/memory/retrieval-quality.d.ts.map +1 -0
- package/dist/memory/retrieval-quality.js +117 -0
- package/dist/memory/retrieval-quality.js.map +1 -0
- package/dist/memory/retrieval-registry.d.ts +51 -0
- package/dist/memory/retrieval-registry.d.ts.map +1 -0
- package/dist/memory/retrieval-registry.js +73 -0
- package/dist/memory/retrieval-registry.js.map +1 -0
- package/dist/memory/rrf.d.ts +65 -0
- package/dist/memory/rrf.d.ts.map +1 -0
- package/dist/memory/rrf.js +84 -0
- package/dist/memory/rrf.js.map +1 -0
- package/dist/memory/semantic-cache.d.ts +77 -0
- package/dist/memory/semantic-cache.d.ts.map +1 -0
- package/dist/memory/semantic-cache.js +182 -0
- package/dist/memory/semantic-cache.js.map +1 -0
- package/dist/memory/semantic-search.d.ts +93 -0
- package/dist/memory/semantic-search.d.ts.map +1 -0
- package/dist/memory/semantic-search.js +276 -0
- package/dist/memory/semantic-search.js.map +1 -0
- package/dist/memory/session-ingestion.d.ts +209 -0
- package/dist/memory/session-ingestion.d.ts.map +1 -0
- package/dist/memory/session-ingestion.js +314 -0
- package/dist/memory/session-ingestion.js.map +1 -0
- package/dist/memory/sqlite-vec-backend.d.ts +77 -0
- package/dist/memory/sqlite-vec-backend.d.ts.map +1 -0
- package/dist/memory/sqlite-vec-backend.js +255 -0
- package/dist/memory/sqlite-vec-backend.js.map +1 -0
- package/dist/memory/stable-prefix.d.ts +123 -0
- package/dist/memory/stable-prefix.d.ts.map +1 -0
- package/dist/memory/stable-prefix.js +209 -0
- package/dist/memory/stable-prefix.js.map +1 -0
- package/dist/memory/store.d.ts +1090 -0
- package/dist/memory/store.d.ts.map +1 -0
- package/dist/memory/store.js +3571 -0
- package/dist/memory/store.js.map +1 -0
- package/dist/memory/temporal-memory.d.ts +113 -0
- package/dist/memory/temporal-memory.d.ts.map +1 -0
- package/dist/memory/temporal-memory.js +358 -0
- package/dist/memory/temporal-memory.js.map +1 -0
- package/dist/memory/tempr.d.ts +129 -0
- package/dist/memory/tempr.d.ts.map +1 -0
- package/dist/memory/tempr.js +175 -0
- package/dist/memory/tempr.js.map +1 -0
- package/dist/memory/tunnel-detector.d.ts +82 -0
- package/dist/memory/tunnel-detector.d.ts.map +1 -0
- package/dist/memory/tunnel-detector.js +122 -0
- package/dist/memory/tunnel-detector.js.map +1 -0
- package/dist/memory/unified-knowledge.d.ts +58 -0
- package/dist/memory/unified-knowledge.d.ts.map +1 -0
- package/dist/memory/unified-knowledge.js +85 -0
- package/dist/memory/unified-knowledge.js.map +1 -0
- package/dist/memory/vector-store.d.ts +140 -0
- package/dist/memory/vector-store.d.ts.map +1 -0
- package/dist/memory/vector-store.js +399 -0
- package/dist/memory/vector-store.js.map +1 -0
- package/dist/memory/web-history-bank.d.ts +70 -0
- package/dist/memory/web-history-bank.d.ts.map +1 -0
- package/dist/memory/web-history-bank.js +175 -0
- package/dist/memory/web-history-bank.js.map +1 -0
- package/dist/memory/whisper-hook.d.ts +19 -0
- package/dist/memory/whisper-hook.d.ts.map +1 -0
- package/dist/memory/whisper-hook.js +35 -0
- package/dist/memory/whisper-hook.js.map +1 -0
- package/dist/memory/wings-rooms-halls.d.ts +107 -0
- package/dist/memory/wings-rooms-halls.d.ts.map +1 -0
- package/dist/memory/wings-rooms-halls.js +214 -0
- package/dist/memory/wings-rooms-halls.js.map +1 -0
- package/dist/middleware/auto-install.d.ts +94 -0
- package/dist/middleware/auto-install.d.ts.map +1 -0
- package/dist/middleware/auto-install.js +254 -0
- package/dist/middleware/auto-install.js.map +1 -0
- package/dist/middleware/dangling-tool-call.d.ts +59 -0
- package/dist/middleware/dangling-tool-call.d.ts.map +1 -0
- package/dist/middleware/dangling-tool-call.js +124 -0
- package/dist/middleware/dangling-tool-call.js.map +1 -0
- package/dist/middleware/deferred-tool-filter.d.ts +149 -0
- package/dist/middleware/deferred-tool-filter.d.ts.map +1 -0
- package/dist/middleware/deferred-tool-filter.js +321 -0
- package/dist/middleware/deferred-tool-filter.js.map +1 -0
- package/dist/middleware/doom-loop.d.ts +119 -0
- package/dist/middleware/doom-loop.d.ts.map +1 -0
- package/dist/middleware/doom-loop.js +362 -0
- package/dist/middleware/doom-loop.js.map +1 -0
- package/dist/middleware/file-type-gate.d.ts +140 -0
- package/dist/middleware/file-type-gate.d.ts.map +1 -0
- package/dist/middleware/file-type-gate.js +486 -0
- package/dist/middleware/file-type-gate.js.map +1 -0
- package/dist/middleware/guardrail-provider.d.ts +125 -0
- package/dist/middleware/guardrail-provider.d.ts.map +1 -0
- package/dist/middleware/guardrail-provider.js +216 -0
- package/dist/middleware/guardrail-provider.js.map +1 -0
- package/dist/middleware/intent-gate.d.ts +8 -0
- package/dist/middleware/intent-gate.d.ts.map +1 -0
- package/dist/middleware/intent-gate.js +184 -0
- package/dist/middleware/intent-gate.js.map +1 -0
- package/dist/middleware/layers.d.ts +71 -0
- package/dist/middleware/layers.d.ts.map +1 -0
- package/dist/middleware/layers.js +529 -0
- package/dist/middleware/layers.js.map +1 -0
- package/dist/middleware/llm-error-handling.d.ts +98 -0
- package/dist/middleware/llm-error-handling.d.ts.map +1 -0
- package/dist/middleware/llm-error-handling.js +315 -0
- package/dist/middleware/llm-error-handling.js.map +1 -0
- package/dist/middleware/local-context.d.ts +47 -0
- package/dist/middleware/local-context.d.ts.map +1 -0
- package/dist/middleware/local-context.js +237 -0
- package/dist/middleware/local-context.js.map +1 -0
- package/dist/middleware/loop-detection.d.ts +87 -0
- package/dist/middleware/loop-detection.d.ts.map +1 -0
- package/dist/middleware/loop-detection.js +168 -0
- package/dist/middleware/loop-detection.js.map +1 -0
- package/dist/middleware/model-call-limit.d.ts +98 -0
- package/dist/middleware/model-call-limit.d.ts.map +1 -0
- package/dist/middleware/model-call-limit.js +160 -0
- package/dist/middleware/model-call-limit.js.map +1 -0
- package/dist/middleware/non-interactive.d.ts +82 -0
- package/dist/middleware/non-interactive.d.ts.map +1 -0
- package/dist/middleware/non-interactive.js +195 -0
- package/dist/middleware/non-interactive.js.map +1 -0
- package/dist/middleware/output-truncation.d.ts +72 -0
- package/dist/middleware/output-truncation.d.ts.map +1 -0
- package/dist/middleware/output-truncation.js +152 -0
- package/dist/middleware/output-truncation.js.map +1 -0
- package/dist/middleware/pipeline.d.ts +142 -0
- package/dist/middleware/pipeline.d.ts.map +1 -0
- package/dist/middleware/pipeline.js +426 -0
- package/dist/middleware/pipeline.js.map +1 -0
- package/dist/middleware/plan-enforcement.d.ts +102 -0
- package/dist/middleware/plan-enforcement.d.ts.map +1 -0
- package/dist/middleware/plan-enforcement.js +247 -0
- package/dist/middleware/plan-enforcement.js.map +1 -0
- package/dist/middleware/pre-completion-checklist.d.ts +124 -0
- package/dist/middleware/pre-completion-checklist.d.ts.map +1 -0
- package/dist/middleware/pre-completion-checklist.js +401 -0
- package/dist/middleware/pre-completion-checklist.js.map +1 -0
- package/dist/middleware/reasoning-sandwich.d.ts +131 -0
- package/dist/middleware/reasoning-sandwich.d.ts.map +1 -0
- package/dist/middleware/reasoning-sandwich.js +476 -0
- package/dist/middleware/reasoning-sandwich.js.map +1 -0
- package/dist/middleware/response-cache.d.ts +118 -0
- package/dist/middleware/response-cache.d.ts.map +1 -0
- package/dist/middleware/response-cache.js +267 -0
- package/dist/middleware/response-cache.js.map +1 -0
- package/dist/middleware/sandbox-audit.d.ts +124 -0
- package/dist/middleware/sandbox-audit.d.ts.map +1 -0
- package/dist/middleware/sandbox-audit.js +319 -0
- package/dist/middleware/sandbox-audit.js.map +1 -0
- package/dist/middleware/sanitize-tool-inputs.d.ts +84 -0
- package/dist/middleware/sanitize-tool-inputs.d.ts.map +1 -0
- package/dist/middleware/sanitize-tool-inputs.js +235 -0
- package/dist/middleware/sanitize-tool-inputs.js.map +1 -0
- package/dist/middleware/stale-detection.d.ts +103 -0
- package/dist/middleware/stale-detection.d.ts.map +1 -0
- package/dist/middleware/stale-detection.js +211 -0
- package/dist/middleware/stale-detection.js.map +1 -0
- package/dist/middleware/system-notifications.d.ts +92 -0
- package/dist/middleware/system-notifications.d.ts.map +1 -0
- package/dist/middleware/system-notifications.js +280 -0
- package/dist/middleware/system-notifications.js.map +1 -0
- package/dist/middleware/title.d.ts +83 -0
- package/dist/middleware/title.d.ts.map +1 -0
- package/dist/middleware/title.js +162 -0
- package/dist/middleware/title.js.map +1 -0
- package/dist/middleware/tool-flow-gate.d.ts +74 -0
- package/dist/middleware/tool-flow-gate.d.ts.map +1 -0
- package/dist/middleware/tool-flow-gate.js +105 -0
- package/dist/middleware/tool-flow-gate.js.map +1 -0
- package/dist/middleware/tool-pair-validator.d.ts +61 -0
- package/dist/middleware/tool-pair-validator.d.ts.map +1 -0
- package/dist/middleware/tool-pair-validator.js +127 -0
- package/dist/middleware/tool-pair-validator.js.map +1 -0
- package/dist/middleware/trifecta-guard.d.ts +132 -0
- package/dist/middleware/trifecta-guard.d.ts.map +1 -0
- package/dist/middleware/trifecta-guard.js +261 -0
- package/dist/middleware/trifecta-guard.js.map +1 -0
- package/dist/middleware/ttsr.d.ts +40 -0
- package/dist/middleware/ttsr.d.ts.map +1 -0
- package/dist/middleware/ttsr.js +107 -0
- package/dist/middleware/ttsr.js.map +1 -0
- package/dist/middleware/types.d.ts +68 -0
- package/dist/middleware/types.d.ts.map +1 -0
- package/dist/middleware/types.js +7 -0
- package/dist/middleware/types.js.map +1 -0
- package/dist/middleware/verification-enforcement.d.ts +89 -0
- package/dist/middleware/verification-enforcement.d.ts.map +1 -0
- package/dist/middleware/verification-enforcement.js +192 -0
- package/dist/middleware/verification-enforcement.js.map +1 -0
- package/dist/middleware/verifier.d.ts +44 -0
- package/dist/middleware/verifier.d.ts.map +1 -0
- package/dist/middleware/verifier.js +103 -0
- package/dist/middleware/verifier.js.map +1 -0
- package/dist/mobile/haptic-feedback.d.ts +25 -0
- package/dist/mobile/haptic-feedback.d.ts.map +1 -0
- package/dist/mobile/haptic-feedback.js +46 -0
- package/dist/mobile/haptic-feedback.js.map +1 -0
- package/dist/mobile/ios-app.d.ts +285 -0
- package/dist/mobile/ios-app.d.ts.map +1 -0
- package/dist/mobile/ios-app.js +539 -0
- package/dist/mobile/ios-app.js.map +1 -0
- package/dist/mobile/ios-types.d.ts +185 -0
- package/dist/mobile/ios-types.d.ts.map +1 -0
- package/dist/mobile/ios-types.js +117 -0
- package/dist/mobile/ios-types.js.map +1 -0
- package/dist/mobile/secure-auth.d.ts +123 -0
- package/dist/mobile/secure-auth.d.ts.map +1 -0
- package/dist/mobile/secure-auth.js +220 -0
- package/dist/mobile/secure-auth.js.map +1 -0
- package/dist/modes/agentless/localize.d.ts +52 -0
- package/dist/modes/agentless/localize.d.ts.map +1 -0
- package/dist/modes/agentless/localize.js +200 -0
- package/dist/modes/agentless/localize.js.map +1 -0
- package/dist/modes/agentless/orchestrator.d.ts +49 -0
- package/dist/modes/agentless/orchestrator.d.ts.map +1 -0
- package/dist/modes/agentless/orchestrator.js +94 -0
- package/dist/modes/agentless/orchestrator.js.map +1 -0
- package/dist/modes/agentless/repair.d.ts +45 -0
- package/dist/modes/agentless/repair.d.ts.map +1 -0
- package/dist/modes/agentless/repair.js +122 -0
- package/dist/modes/agentless/repair.js.map +1 -0
- package/dist/modes/agentless/types.d.ts +126 -0
- package/dist/modes/agentless/types.d.ts.map +1 -0
- package/dist/modes/agentless/types.js +13 -0
- package/dist/modes/agentless/types.js.map +1 -0
- package/dist/modes/agentless/validate.d.ts +46 -0
- package/dist/modes/agentless/validate.d.ts.map +1 -0
- package/dist/modes/agentless/validate.js +125 -0
- package/dist/modes/agentless/validate.js.map +1 -0
- package/dist/monitoring/source-monitor.d.ts +53 -0
- package/dist/monitoring/source-monitor.d.ts.map +1 -0
- package/dist/monitoring/source-monitor.js +251 -0
- package/dist/monitoring/source-monitor.js.map +1 -0
- package/dist/observability/openinference.d.ts +213 -0
- package/dist/observability/openinference.d.ts.map +1 -0
- package/dist/observability/openinference.js +336 -0
- package/dist/observability/openinference.js.map +1 -0
- package/dist/observability/otel-exporter.d.ts +142 -0
- package/dist/observability/otel-exporter.d.ts.map +1 -0
- package/dist/observability/otel-exporter.js +336 -0
- package/dist/observability/otel-exporter.js.map +1 -0
- package/dist/optimize/ripple-test-scope.d.ts +75 -0
- package/dist/optimize/ripple-test-scope.d.ts.map +1 -0
- package/dist/optimize/ripple-test-scope.js +121 -0
- package/dist/optimize/ripple-test-scope.js.map +1 -0
- package/dist/optimize/textgrad-critic.d.ts +46 -0
- package/dist/optimize/textgrad-critic.d.ts.map +1 -0
- package/dist/optimize/textgrad-critic.js +185 -0
- package/dist/optimize/textgrad-critic.js.map +1 -0
- package/dist/optimize/textgrad-optimizer.d.ts +119 -0
- package/dist/optimize/textgrad-optimizer.d.ts.map +1 -0
- package/dist/optimize/textgrad-optimizer.js +320 -0
- package/dist/optimize/textgrad-optimizer.js.map +1 -0
- package/dist/optimize/textgrad-types.d.ts +122 -0
- package/dist/optimize/textgrad-types.d.ts.map +1 -0
- package/dist/optimize/textgrad-types.js +61 -0
- package/dist/optimize/textgrad-types.js.map +1 -0
- package/dist/orchestration/agent-flows/command-blocks.d.ts +68 -0
- package/dist/orchestration/agent-flows/command-blocks.d.ts.map +1 -0
- package/dist/orchestration/agent-flows/command-blocks.js +94 -0
- package/dist/orchestration/agent-flows/command-blocks.js.map +1 -0
- package/dist/orchestration/agent-hierarchy.d.ts +75 -0
- package/dist/orchestration/agent-hierarchy.d.ts.map +1 -0
- package/dist/orchestration/agent-hierarchy.js +165 -0
- package/dist/orchestration/agent-hierarchy.js.map +1 -0
- package/dist/orchestration/agent-registry.d.ts +224 -0
- package/dist/orchestration/agent-registry.d.ts.map +1 -0
- package/dist/orchestration/agent-registry.js +753 -0
- package/dist/orchestration/agent-registry.js.map +1 -0
- package/dist/orchestration/agent-workspace.d.ts +60 -0
- package/dist/orchestration/agent-workspace.d.ts.map +1 -0
- package/dist/orchestration/agent-workspace.js +174 -0
- package/dist/orchestration/agent-workspace.js.map +1 -0
- package/dist/orchestration/architect-editor.d.ts +80 -0
- package/dist/orchestration/architect-editor.d.ts.map +1 -0
- package/dist/orchestration/architect-editor.js +130 -0
- package/dist/orchestration/architect-editor.js.map +1 -0
- package/dist/orchestration/architect-implement.d.ts +38 -0
- package/dist/orchestration/architect-implement.d.ts.map +1 -0
- package/dist/orchestration/architect-implement.js +88 -0
- package/dist/orchestration/architect-implement.js.map +1 -0
- package/dist/orchestration/archon-workflow-loader.d.ts +63 -0
- package/dist/orchestration/archon-workflow-loader.d.ts.map +1 -0
- package/dist/orchestration/archon-workflow-loader.js +202 -0
- package/dist/orchestration/archon-workflow-loader.js.map +1 -0
- package/dist/orchestration/arena.d.ts +69 -0
- package/dist/orchestration/arena.d.ts.map +1 -0
- package/dist/orchestration/arena.js +157 -0
- package/dist/orchestration/arena.js.map +1 -0
- package/dist/orchestration/auto-commit.d.ts +60 -0
- package/dist/orchestration/auto-commit.d.ts.map +1 -0
- package/dist/orchestration/auto-commit.js +223 -0
- package/dist/orchestration/auto-commit.js.map +1 -0
- package/dist/orchestration/autonomous-context.d.ts +105 -0
- package/dist/orchestration/autonomous-context.d.ts.map +1 -0
- package/dist/orchestration/autonomous-context.js +246 -0
- package/dist/orchestration/autonomous-context.js.map +1 -0
- package/dist/orchestration/autonomous.d.ts +386 -0
- package/dist/orchestration/autonomous.d.ts.map +1 -0
- package/dist/orchestration/autonomous.js +1163 -0
- package/dist/orchestration/autonomous.js.map +1 -0
- package/dist/orchestration/canary-monitor.d.ts +66 -0
- package/dist/orchestration/canary-monitor.d.ts.map +1 -0
- package/dist/orchestration/canary-monitor.js +157 -0
- package/dist/orchestration/canary-monitor.js.map +1 -0
- package/dist/orchestration/code-mode.d.ts +63 -0
- package/dist/orchestration/code-mode.d.ts.map +1 -0
- package/dist/orchestration/code-mode.js +218 -0
- package/dist/orchestration/code-mode.js.map +1 -0
- package/dist/orchestration/coordinator.d.ts +129 -0
- package/dist/orchestration/coordinator.d.ts.map +1 -0
- package/dist/orchestration/coordinator.js +355 -0
- package/dist/orchestration/coordinator.js.map +1 -0
- package/dist/orchestration/council.d.ts +163 -0
- package/dist/orchestration/council.d.ts.map +1 -0
- package/dist/orchestration/council.js +391 -0
- package/dist/orchestration/council.js.map +1 -0
- package/dist/orchestration/cowork.d.ts +198 -0
- package/dist/orchestration/cowork.d.ts.map +1 -0
- package/dist/orchestration/cowork.js +185 -0
- package/dist/orchestration/cowork.js.map +1 -0
- package/dist/orchestration/coze-flow/flow.d.ts +68 -0
- package/dist/orchestration/coze-flow/flow.d.ts.map +1 -0
- package/dist/orchestration/coze-flow/flow.js +126 -0
- package/dist/orchestration/coze-flow/flow.js.map +1 -0
- package/dist/orchestration/crew.d.ts +68 -0
- package/dist/orchestration/crew.d.ts.map +1 -0
- package/dist/orchestration/crew.js +130 -0
- package/dist/orchestration/crew.js.map +1 -0
- package/dist/orchestration/critic-rerank.d.ts +119 -0
- package/dist/orchestration/critic-rerank.d.ts.map +1 -0
- package/dist/orchestration/critic-rerank.js +207 -0
- package/dist/orchestration/critic-rerank.js.map +1 -0
- package/dist/orchestration/dag-runner.d.ts +78 -0
- package/dist/orchestration/dag-runner.d.ts.map +1 -0
- package/dist/orchestration/dag-runner.js +176 -0
- package/dist/orchestration/dag-runner.js.map +1 -0
- package/dist/orchestration/dify-flow/builder.d.ts +64 -0
- package/dist/orchestration/dify-flow/builder.d.ts.map +1 -0
- package/dist/orchestration/dify-flow/builder.js +125 -0
- package/dist/orchestration/dify-flow/builder.js.map +1 -0
- package/dist/orchestration/dify-flow/langflow-engine.d.ts +71 -0
- package/dist/orchestration/dify-flow/langflow-engine.d.ts.map +1 -0
- package/dist/orchestration/dify-flow/langflow-engine.js +133 -0
- package/dist/orchestration/dify-flow/langflow-engine.js.map +1 -0
- package/dist/orchestration/dual-persona-reviewer.d.ts +131 -0
- package/dist/orchestration/dual-persona-reviewer.d.ts.map +1 -0
- package/dist/orchestration/dual-persona-reviewer.js +242 -0
- package/dist/orchestration/dual-persona-reviewer.js.map +1 -0
- package/dist/orchestration/durable-execution.d.ts +85 -0
- package/dist/orchestration/durable-execution.d.ts.map +1 -0
- package/dist/orchestration/durable-execution.js +221 -0
- package/dist/orchestration/durable-execution.js.map +1 -0
- package/dist/orchestration/dynamic-replan.d.ts +80 -0
- package/dist/orchestration/dynamic-replan.d.ts.map +1 -0
- package/dist/orchestration/dynamic-replan.js +109 -0
- package/dist/orchestration/dynamic-replan.js.map +1 -0
- package/dist/orchestration/file-transport.d.ts +44 -0
- package/dist/orchestration/file-transport.d.ts.map +1 -0
- package/dist/orchestration/file-transport.js +126 -0
- package/dist/orchestration/file-transport.js.map +1 -0
- package/dist/orchestration/flow-primitives.d.ts +99 -0
- package/dist/orchestration/flow-primitives.d.ts.map +1 -0
- package/dist/orchestration/flow-primitives.js +175 -0
- package/dist/orchestration/flow-primitives.js.map +1 -0
- package/dist/orchestration/flowise-canvas/canvas.d.ts +63 -0
- package/dist/orchestration/flowise-canvas/canvas.d.ts.map +1 -0
- package/dist/orchestration/flowise-canvas/canvas.js +137 -0
- package/dist/orchestration/flowise-canvas/canvas.js.map +1 -0
- package/dist/orchestration/generative-agents-deep/observation-stream.d.ts +69 -0
- package/dist/orchestration/generative-agents-deep/observation-stream.d.ts.map +1 -0
- package/dist/orchestration/generative-agents-deep/observation-stream.js +115 -0
- package/dist/orchestration/generative-agents-deep/observation-stream.js.map +1 -0
- package/dist/orchestration/generator-agent-loop.d.ts +136 -0
- package/dist/orchestration/generator-agent-loop.d.ts.map +1 -0
- package/dist/orchestration/generator-agent-loop.js +144 -0
- package/dist/orchestration/generator-agent-loop.js.map +1 -0
- package/dist/orchestration/goal-drift.d.ts +87 -0
- package/dist/orchestration/goal-drift.d.ts.map +1 -0
- package/dist/orchestration/goal-drift.js +278 -0
- package/dist/orchestration/goal-drift.js.map +1 -0
- package/dist/orchestration/graph-dsl.d.ts +47 -0
- package/dist/orchestration/graph-dsl.d.ts.map +1 -0
- package/dist/orchestration/graph-dsl.js +148 -0
- package/dist/orchestration/graph-dsl.js.map +1 -0
- package/dist/orchestration/handoffs.d.ts +118 -0
- package/dist/orchestration/handoffs.d.ts.map +1 -0
- package/dist/orchestration/handoffs.js +145 -0
- package/dist/orchestration/handoffs.js.map +1 -0
- package/dist/orchestration/issue-graph.d.ts +176 -0
- package/dist/orchestration/issue-graph.d.ts.map +1 -0
- package/dist/orchestration/issue-graph.js +313 -0
- package/dist/orchestration/issue-graph.js.map +1 -0
- package/dist/orchestration/jean-orchestrator.d.ts +79 -0
- package/dist/orchestration/jean-orchestrator.d.ts.map +1 -0
- package/dist/orchestration/jean-orchestrator.js +253 -0
- package/dist/orchestration/jean-orchestrator.js.map +1 -0
- package/dist/orchestration/jean-registries/command-registry.d.ts +85 -0
- package/dist/orchestration/jean-registries/command-registry.d.ts.map +1 -0
- package/dist/orchestration/jean-registries/command-registry.js +120 -0
- package/dist/orchestration/jean-registries/command-registry.js.map +1 -0
- package/dist/orchestration/jean-registries/event-registry.d.ts +80 -0
- package/dist/orchestration/jean-registries/event-registry.d.ts.map +1 -0
- package/dist/orchestration/jean-registries/event-registry.js +147 -0
- package/dist/orchestration/jean-registries/event-registry.js.map +1 -0
- package/dist/orchestration/jean-registries/process-registry.d.ts +71 -0
- package/dist/orchestration/jean-registries/process-registry.d.ts.map +1 -0
- package/dist/orchestration/jean-registries/process-registry.js +104 -0
- package/dist/orchestration/jean-registries/process-registry.js.map +1 -0
- package/dist/orchestration/jean-registries/result-registry.d.ts +71 -0
- package/dist/orchestration/jean-registries/result-registry.d.ts.map +1 -0
- package/dist/orchestration/jean-registries/result-registry.js +97 -0
- package/dist/orchestration/jean-registries/result-registry.js.map +1 -0
- package/dist/orchestration/librechat-multi/config.d.ts +61 -0
- package/dist/orchestration/librechat-multi/config.d.ts.map +1 -0
- package/dist/orchestration/librechat-multi/config.js +128 -0
- package/dist/orchestration/librechat-multi/config.js.map +1 -0
- package/dist/orchestration/living-spec.d.ts +49 -0
- package/dist/orchestration/living-spec.d.ts.map +1 -0
- package/dist/orchestration/living-spec.js +306 -0
- package/dist/orchestration/living-spec.js.map +1 -0
- package/dist/orchestration/long-horizon-orchestrator.d.ts +217 -0
- package/dist/orchestration/long-horizon-orchestrator.d.ts.map +1 -0
- package/dist/orchestration/long-horizon-orchestrator.js +543 -0
- package/dist/orchestration/long-horizon-orchestrator.js.map +1 -0
- package/dist/orchestration/long-horizon-runner.d.ts +88 -0
- package/dist/orchestration/long-horizon-runner.d.ts.map +1 -0
- package/dist/orchestration/long-horizon-runner.js +198 -0
- package/dist/orchestration/long-horizon-runner.js.map +1 -0
- package/dist/orchestration/loop-detector.d.ts +80 -0
- package/dist/orchestration/loop-detector.d.ts.map +1 -0
- package/dist/orchestration/loop-detector.js +225 -0
- package/dist/orchestration/loop-detector.js.map +1 -0
- package/dist/orchestration/meta-harness.d.ts +182 -0
- package/dist/orchestration/meta-harness.d.ts.map +1 -0
- package/dist/orchestration/meta-harness.js +499 -0
- package/dist/orchestration/meta-harness.js.map +1 -0
- package/dist/orchestration/multi-agent-society/agent.d.ts +88 -0
- package/dist/orchestration/multi-agent-society/agent.d.ts.map +1 -0
- package/dist/orchestration/multi-agent-society/agent.js +133 -0
- package/dist/orchestration/multi-agent-society/agent.js.map +1 -0
- package/dist/orchestration/multi-agent-society/society.d.ts +72 -0
- package/dist/orchestration/multi-agent-society/society.d.ts.map +1 -0
- package/dist/orchestration/multi-agent-society/society.js +114 -0
- package/dist/orchestration/multi-agent-society/society.js.map +1 -0
- package/dist/orchestration/multi-agent-society/world.d.ts +62 -0
- package/dist/orchestration/multi-agent-society/world.d.ts.map +1 -0
- package/dist/orchestration/multi-agent-society/world.js +109 -0
- package/dist/orchestration/multi-agent-society/world.js.map +1 -0
- package/dist/orchestration/owl/debate.d.ts +59 -0
- package/dist/orchestration/owl/debate.d.ts.map +1 -0
- package/dist/orchestration/owl/debate.js +84 -0
- package/dist/orchestration/owl/debate.js.map +1 -0
- package/dist/orchestration/parallel-coordinator.d.ts +55 -0
- package/dist/orchestration/parallel-coordinator.d.ts.map +1 -0
- package/dist/orchestration/parallel-coordinator.js +99 -0
- package/dist/orchestration/parallel-coordinator.js.map +1 -0
- package/dist/orchestration/paused-state.d.ts +81 -0
- package/dist/orchestration/paused-state.d.ts.map +1 -0
- package/dist/orchestration/paused-state.js +129 -0
- package/dist/orchestration/paused-state.js.map +1 -0
- package/dist/orchestration/persistence-policy.d.ts +97 -0
- package/dist/orchestration/persistence-policy.d.ts.map +1 -0
- package/dist/orchestration/persistence-policy.js +103 -0
- package/dist/orchestration/persistence-policy.js.map +1 -0
- package/dist/orchestration/phase-gate.d.ts +98 -0
- package/dist/orchestration/phase-gate.d.ts.map +1 -0
- package/dist/orchestration/phase-gate.js +146 -0
- package/dist/orchestration/phase-gate.js.map +1 -0
- package/dist/orchestration/phased-executor.d.ts +121 -0
- package/dist/orchestration/phased-executor.d.ts.map +1 -0
- package/dist/orchestration/phased-executor.js +188 -0
- package/dist/orchestration/phased-executor.js.map +1 -0
- package/dist/orchestration/plan-store.d.ts +167 -0
- package/dist/orchestration/plan-store.d.ts.map +1 -0
- package/dist/orchestration/plan-store.js +649 -0
- package/dist/orchestration/plan-store.js.map +1 -0
- package/dist/orchestration/plateau-detector.d.ts +63 -0
- package/dist/orchestration/plateau-detector.d.ts.map +1 -0
- package/dist/orchestration/plateau-detector.js +162 -0
- package/dist/orchestration/plateau-detector.js.map +1 -0
- package/dist/orchestration/proof-bundles.d.ts +71 -0
- package/dist/orchestration/proof-bundles.d.ts.map +1 -0
- package/dist/orchestration/proof-bundles.js +73 -0
- package/dist/orchestration/proof-bundles.js.map +1 -0
- package/dist/orchestration/pwr-cycle.d.ts +61 -0
- package/dist/orchestration/pwr-cycle.d.ts.map +1 -0
- package/dist/orchestration/pwr-cycle.js +141 -0
- package/dist/orchestration/pwr-cycle.js.map +1 -0
- package/dist/orchestration/ralph-mode.d.ts +50 -0
- package/dist/orchestration/ralph-mode.d.ts.map +1 -0
- package/dist/orchestration/ralph-mode.js +131 -0
- package/dist/orchestration/ralph-mode.js.map +1 -0
- package/dist/orchestration/red-blue-testing.d.ts +65 -0
- package/dist/orchestration/red-blue-testing.d.ts.map +1 -0
- package/dist/orchestration/red-blue-testing.js +178 -0
- package/dist/orchestration/red-blue-testing.js.map +1 -0
- package/dist/orchestration/self-healing-pipeline.d.ts +104 -0
- package/dist/orchestration/self-healing-pipeline.d.ts.map +1 -0
- package/dist/orchestration/self-healing-pipeline.js +376 -0
- package/dist/orchestration/self-healing-pipeline.js.map +1 -0
- package/dist/orchestration/skill-rules-provider.d.ts +88 -0
- package/dist/orchestration/skill-rules-provider.d.ts.map +1 -0
- package/dist/orchestration/skill-rules-provider.js +134 -0
- package/dist/orchestration/skill-rules-provider.js.map +1 -0
- package/dist/orchestration/sleep-time-consumer.d.ts +63 -0
- package/dist/orchestration/sleep-time-consumer.d.ts.map +1 -0
- package/dist/orchestration/sleep-time-consumer.js +86 -0
- package/dist/orchestration/sleep-time-consumer.js.map +1 -0
- package/dist/orchestration/spec-to-ship.d.ts +118 -0
- package/dist/orchestration/spec-to-ship.d.ts.map +1 -0
- package/dist/orchestration/spec-to-ship.js +383 -0
- package/dist/orchestration/spec-to-ship.js.map +1 -0
- package/dist/orchestration/speculative-execution.d.ts +45 -0
- package/dist/orchestration/speculative-execution.d.ts.map +1 -0
- package/dist/orchestration/speculative-execution.js +94 -0
- package/dist/orchestration/speculative-execution.js.map +1 -0
- package/dist/orchestration/symphony/conductor.d.ts +69 -0
- package/dist/orchestration/symphony/conductor.d.ts.map +1 -0
- package/dist/orchestration/symphony/conductor.js +106 -0
- package/dist/orchestration/symphony/conductor.js.map +1 -0
- package/dist/orchestration/task-delegation.d.ts +90 -0
- package/dist/orchestration/task-delegation.d.ts.map +1 -0
- package/dist/orchestration/task-delegation.js +93 -0
- package/dist/orchestration/task-delegation.js.map +1 -0
- package/dist/orchestration/team-templates.d.ts +46 -0
- package/dist/orchestration/team-templates.d.ts.map +1 -0
- package/dist/orchestration/team-templates.js +347 -0
- package/dist/orchestration/team-templates.js.map +1 -0
- package/dist/orchestration/todo-provider.d.ts +93 -0
- package/dist/orchestration/todo-provider.d.ts.map +1 -0
- package/dist/orchestration/todo-provider.js +139 -0
- package/dist/orchestration/todo-provider.js.map +1 -0
- package/dist/orchestration/todo-tracker.d.ts +138 -0
- package/dist/orchestration/todo-tracker.d.ts.map +1 -0
- package/dist/orchestration/todo-tracker.js +481 -0
- package/dist/orchestration/todo-tracker.js.map +1 -0
- package/dist/orchestration/tool-rules.d.ts +106 -0
- package/dist/orchestration/tool-rules.d.ts.map +1 -0
- package/dist/orchestration/tool-rules.js +151 -0
- package/dist/orchestration/tool-rules.js.map +1 -0
- package/dist/orchestration/two-state-spec.d.ts +75 -0
- package/dist/orchestration/two-state-spec.d.ts.map +1 -0
- package/dist/orchestration/two-state-spec.js +160 -0
- package/dist/orchestration/two-state-spec.js.map +1 -0
- package/dist/orchestration/ultraplan.d.ts +93 -0
- package/dist/orchestration/ultraplan.d.ts.map +1 -0
- package/dist/orchestration/ultraplan.js +195 -0
- package/dist/orchestration/ultraplan.js.map +1 -0
- package/dist/orchestration/virtual-cursor-consumer.d.ts +82 -0
- package/dist/orchestration/virtual-cursor-consumer.d.ts.map +1 -0
- package/dist/orchestration/virtual-cursor-consumer.js +94 -0
- package/dist/orchestration/virtual-cursor-consumer.js.map +1 -0
- package/dist/orchestration/visual-builders/canonical-schema.d.ts +98 -0
- package/dist/orchestration/visual-builders/canonical-schema.d.ts.map +1 -0
- package/dist/orchestration/visual-builders/canonical-schema.js +157 -0
- package/dist/orchestration/visual-builders/canonical-schema.js.map +1 -0
- package/dist/orchestration/wall-clock-budget.d.ts +63 -0
- package/dist/orchestration/wall-clock-budget.d.ts.map +1 -0
- package/dist/orchestration/wall-clock-budget.js +74 -0
- package/dist/orchestration/wall-clock-budget.js.map +1 -0
- package/dist/orchestration/wave-executor.d.ts +69 -0
- package/dist/orchestration/wave-executor.d.ts.map +1 -0
- package/dist/orchestration/wave-executor.js +158 -0
- package/dist/orchestration/wave-executor.js.map +1 -0
- package/dist/orchestration/webhook-trigger-bridge.d.ts +98 -0
- package/dist/orchestration/webhook-trigger-bridge.d.ts.map +1 -0
- package/dist/orchestration/webhook-trigger-bridge.js +119 -0
- package/dist/orchestration/webhook-trigger-bridge.js.map +1 -0
- package/dist/orchestration/workflow-dag.d.ts +117 -0
- package/dist/orchestration/workflow-dag.d.ts.map +1 -0
- package/dist/orchestration/workflow-dag.js +530 -0
- package/dist/orchestration/workflow-dag.js.map +1 -0
- package/dist/orchestration/worktree-kanban.d.ts +53 -0
- package/dist/orchestration/worktree-kanban.d.ts.map +1 -0
- package/dist/orchestration/worktree-kanban.js +140 -0
- package/dist/orchestration/worktree-kanban.js.map +1 -0
- package/dist/orchestration/worktree-manager.d.ts +129 -0
- package/dist/orchestration/worktree-manager.d.ts.map +1 -0
- package/dist/orchestration/worktree-manager.js +285 -0
- package/dist/orchestration/worktree-manager.js.map +1 -0
- package/dist/plugins/lifecycle.d.ts +146 -0
- package/dist/plugins/lifecycle.d.ts.map +1 -0
- package/dist/plugins/lifecycle.js +167 -0
- package/dist/plugins/lifecycle.js.map +1 -0
- package/dist/plugins/manager.d.ts +27 -0
- package/dist/plugins/manager.d.ts.map +1 -0
- package/dist/plugins/manager.js +148 -0
- package/dist/plugins/manager.js.map +1 -0
- package/dist/ports/chatdev-waterfall.d.ts +120 -0
- package/dist/ports/chatdev-waterfall.d.ts.map +1 -0
- package/dist/ports/chatdev-waterfall.js +211 -0
- package/dist/ports/chatdev-waterfall.js.map +1 -0
- package/dist/ports/deer-flow-research.d.ts +137 -0
- package/dist/ports/deer-flow-research.d.ts.map +1 -0
- package/dist/ports/deer-flow-research.js +163 -0
- package/dist/ports/deer-flow-research.js.map +1 -0
- package/dist/ports/mem0-graph-memory.d.ts +143 -0
- package/dist/ports/mem0-graph-memory.d.ts.map +1 -0
- package/dist/ports/mem0-graph-memory.js +271 -0
- package/dist/ports/mem0-graph-memory.js.map +1 -0
- package/dist/ports/promptfoo-assertions.d.ts +153 -0
- package/dist/ports/promptfoo-assertions.d.ts.map +1 -0
- package/dist/ports/promptfoo-assertions.js +339 -0
- package/dist/ports/promptfoo-assertions.js.map +1 -0
- package/dist/ports/scrapling-adaptive.d.ts +129 -0
- package/dist/ports/scrapling-adaptive.d.ts.map +1 -0
- package/dist/ports/scrapling-adaptive.js +254 -0
- package/dist/ports/scrapling-adaptive.js.map +1 -0
- package/dist/pr-checks/check-emitter.d.ts +75 -0
- package/dist/pr-checks/check-emitter.d.ts.map +1 -0
- package/dist/pr-checks/check-emitter.js +198 -0
- package/dist/pr-checks/check-emitter.js.map +1 -0
- package/dist/pr-checks/diff-loader.d.ts +65 -0
- package/dist/pr-checks/diff-loader.d.ts.map +1 -0
- package/dist/pr-checks/diff-loader.js +123 -0
- package/dist/pr-checks/diff-loader.js.map +1 -0
- package/dist/pr-checks/pr-runner.d.ts +106 -0
- package/dist/pr-checks/pr-runner.d.ts.map +1 -0
- package/dist/pr-checks/pr-runner.js +300 -0
- package/dist/pr-checks/pr-runner.js.map +1 -0
- package/dist/pr-checks/pr-types.d.ts +82 -0
- package/dist/pr-checks/pr-types.d.ts.map +1 -0
- package/dist/pr-checks/pr-types.js +10 -0
- package/dist/pr-checks/pr-types.js.map +1 -0
- package/dist/prompt/engine.d.ts +126 -0
- package/dist/prompt/engine.d.ts.map +1 -0
- package/dist/prompt/engine.js +567 -0
- package/dist/prompt/engine.js.map +1 -0
- package/dist/prompt/instruction-provenance.d.ts +52 -0
- package/dist/prompt/instruction-provenance.d.ts.map +1 -0
- package/dist/prompt/instruction-provenance.js +92 -0
- package/dist/prompt/instruction-provenance.js.map +1 -0
- package/dist/prompt/model-formatter.d.ts +59 -0
- package/dist/prompt/model-formatter.d.ts.map +1 -0
- package/dist/prompt/model-formatter.js +200 -0
- package/dist/prompt/model-formatter.js.map +1 -0
- package/dist/prompt/modules/capabilities.d.ts +7 -0
- package/dist/prompt/modules/capabilities.d.ts.map +1 -0
- package/dist/prompt/modules/capabilities.js +141 -0
- package/dist/prompt/modules/capabilities.js.map +1 -0
- package/dist/prompt/modules/channels.d.ts +8 -0
- package/dist/prompt/modules/channels.d.ts.map +1 -0
- package/dist/prompt/modules/channels.js +19 -0
- package/dist/prompt/modules/channels.js.map +1 -0
- package/dist/prompt/modules/conventions.d.ts +8 -0
- package/dist/prompt/modules/conventions.d.ts.map +1 -0
- package/dist/prompt/modules/conventions.js +90 -0
- package/dist/prompt/modules/conventions.js.map +1 -0
- package/dist/prompt/modules/cost.d.ts +6 -0
- package/dist/prompt/modules/cost.d.ts.map +1 -0
- package/dist/prompt/modules/cost.js +24 -0
- package/dist/prompt/modules/cost.js.map +1 -0
- package/dist/prompt/modules/history.d.ts +7 -0
- package/dist/prompt/modules/history.d.ts.map +1 -0
- package/dist/prompt/modules/history.js +29 -0
- package/dist/prompt/modules/history.js.map +1 -0
- package/dist/prompt/modules/identity.d.ts +17 -0
- package/dist/prompt/modules/identity.d.ts.map +1 -0
- package/dist/prompt/modules/identity.js +67 -0
- package/dist/prompt/modules/identity.js.map +1 -0
- package/dist/prompt/modules/index.d.ts +45 -0
- package/dist/prompt/modules/index.d.ts.map +1 -0
- package/dist/prompt/modules/index.js +99 -0
- package/dist/prompt/modules/index.js.map +1 -0
- package/dist/prompt/modules/llms-txt.d.ts +12 -0
- package/dist/prompt/modules/llms-txt.d.ts.map +1 -0
- package/dist/prompt/modules/llms-txt.js +51 -0
- package/dist/prompt/modules/llms-txt.js.map +1 -0
- package/dist/prompt/modules/memory.d.ts +17 -0
- package/dist/prompt/modules/memory.d.ts.map +1 -0
- package/dist/prompt/modules/memory.js +110 -0
- package/dist/prompt/modules/memory.js.map +1 -0
- package/dist/prompt/modules/mode.d.ts +7 -0
- package/dist/prompt/modules/mode.d.ts.map +1 -0
- package/dist/prompt/modules/mode.js +78 -0
- package/dist/prompt/modules/mode.js.map +1 -0
- package/dist/prompt/modules/phone.d.ts +8 -0
- package/dist/prompt/modules/phone.d.ts.map +1 -0
- package/dist/prompt/modules/phone.js +35 -0
- package/dist/prompt/modules/phone.js.map +1 -0
- package/dist/prompt/modules/project.d.ts +7 -0
- package/dist/prompt/modules/project.d.ts.map +1 -0
- package/dist/prompt/modules/project.js +29 -0
- package/dist/prompt/modules/project.js.map +1 -0
- package/dist/prompt/modules/safety.d.ts +7 -0
- package/dist/prompt/modules/safety.d.ts.map +1 -0
- package/dist/prompt/modules/safety.js +37 -0
- package/dist/prompt/modules/safety.js.map +1 -0
- package/dist/prompt/modules/security.d.ts +9 -0
- package/dist/prompt/modules/security.d.ts.map +1 -0
- package/dist/prompt/modules/security.js +121 -0
- package/dist/prompt/modules/security.js.map +1 -0
- package/dist/prompt/modules/skills.d.ts +7 -0
- package/dist/prompt/modules/skills.d.ts.map +1 -0
- package/dist/prompt/modules/skills.js +22 -0
- package/dist/prompt/modules/skills.js.map +1 -0
- package/dist/prompt/modules/surfaces.d.ts +7 -0
- package/dist/prompt/modules/surfaces.d.ts.map +1 -0
- package/dist/prompt/modules/surfaces.js +29 -0
- package/dist/prompt/modules/surfaces.js.map +1 -0
- package/dist/prompt/modules/tools.d.ts +16 -0
- package/dist/prompt/modules/tools.d.ts.map +1 -0
- package/dist/prompt/modules/tools.js +101 -0
- package/dist/prompt/modules/tools.js.map +1 -0
- package/dist/prompt/modules/user.d.ts +16 -0
- package/dist/prompt/modules/user.d.ts.map +1 -0
- package/dist/prompt/modules/user.js +23 -0
- package/dist/prompt/modules/user.js.map +1 -0
- package/dist/prompt/reasoning-sandwich.d.ts +145 -0
- package/dist/prompt/reasoning-sandwich.d.ts.map +1 -0
- package/dist/prompt/reasoning-sandwich.js +215 -0
- package/dist/prompt/reasoning-sandwich.js.map +1 -0
- package/dist/prompt/system-prompt.d.ts +101 -0
- package/dist/prompt/system-prompt.d.ts.map +1 -0
- package/dist/prompt/system-prompt.js +129 -0
- package/dist/prompt/system-prompt.js.map +1 -0
- package/dist/prompt/template-compiler.d.ts +44 -0
- package/dist/prompt/template-compiler.d.ts.map +1 -0
- package/dist/prompt/template-compiler.js +228 -0
- package/dist/prompt/template-compiler.js.map +1 -0
- package/dist/prompt/think-in-code.d.ts +86 -0
- package/dist/prompt/think-in-code.d.ts.map +1 -0
- package/dist/prompt/think-in-code.js +110 -0
- package/dist/prompt/think-in-code.js.map +1 -0
- package/dist/providers/account-pool.d.ts +94 -0
- package/dist/providers/account-pool.d.ts.map +1 -0
- package/dist/providers/account-pool.js +240 -0
- package/dist/providers/account-pool.js.map +1 -0
- package/dist/providers/anthropic-adapter.d.ts +47 -0
- package/dist/providers/anthropic-adapter.d.ts.map +1 -0
- package/dist/providers/anthropic-adapter.js +567 -0
- package/dist/providers/anthropic-adapter.js.map +1 -0
- package/dist/providers/anthropic-stream-decoder.d.ts +79 -0
- package/dist/providers/anthropic-stream-decoder.d.ts.map +1 -0
- package/dist/providers/anthropic-stream-decoder.js +281 -0
- package/dist/providers/anthropic-stream-decoder.js.map +1 -0
- package/dist/providers/bedrock-eventstream.d.ts +107 -0
- package/dist/providers/bedrock-eventstream.d.ts.map +1 -0
- package/dist/providers/bedrock-eventstream.js +246 -0
- package/dist/providers/bedrock-eventstream.js.map +1 -0
- package/dist/providers/bedrock-signer.d.ts +23 -0
- package/dist/providers/bedrock-signer.d.ts.map +1 -0
- package/dist/providers/bedrock-signer.js +439 -0
- package/dist/providers/bedrock-signer.js.map +1 -0
- package/dist/providers/budget-downgrader.d.ts +65 -0
- package/dist/providers/budget-downgrader.d.ts.map +1 -0
- package/dist/providers/budget-downgrader.js +109 -0
- package/dist/providers/budget-downgrader.js.map +1 -0
- package/dist/providers/capability-augmenter.d.ts +63 -0
- package/dist/providers/capability-augmenter.d.ts.map +1 -0
- package/dist/providers/capability-augmenter.js +202 -0
- package/dist/providers/capability-augmenter.js.map +1 -0
- package/dist/providers/capability-equalizer.d.ts +63 -0
- package/dist/providers/capability-equalizer.d.ts.map +1 -0
- package/dist/providers/capability-equalizer.js +532 -0
- package/dist/providers/capability-equalizer.js.map +1 -0
- package/dist/providers/capability-fingerprint.d.ts +66 -0
- package/dist/providers/capability-fingerprint.d.ts.map +1 -0
- package/dist/providers/capability-fingerprint.js +227 -0
- package/dist/providers/capability-fingerprint.js.map +1 -0
- package/dist/providers/circuit-breaker.d.ts +65 -0
- package/dist/providers/circuit-breaker.d.ts.map +1 -0
- package/dist/providers/circuit-breaker.js +137 -0
- package/dist/providers/circuit-breaker.js.map +1 -0
- package/dist/providers/claude-cli-backend.d.ts +213 -0
- package/dist/providers/claude-cli-backend.d.ts.map +1 -0
- package/dist/providers/claude-cli-backend.js +590 -0
- package/dist/providers/claude-cli-backend.js.map +1 -0
- package/dist/providers/cli-registry.d.ts +39 -0
- package/dist/providers/cli-registry.d.ts.map +1 -0
- package/dist/providers/cli-registry.js +217 -0
- package/dist/providers/cli-registry.js.map +1 -0
- package/dist/providers/cloud-offload/adapter.d.ts +118 -0
- package/dist/providers/cloud-offload/adapter.d.ts.map +1 -0
- package/dist/providers/cloud-offload/adapter.js +61 -0
- package/dist/providers/cloud-offload/adapter.js.map +1 -0
- package/dist/providers/cloud-offload/anthropic-managed.d.ts +169 -0
- package/dist/providers/cloud-offload/anthropic-managed.d.ts.map +1 -0
- package/dist/providers/cloud-offload/anthropic-managed.js +627 -0
- package/dist/providers/cloud-offload/anthropic-managed.js.map +1 -0
- package/dist/providers/cloud-offload/cloudflare-agents.d.ts +174 -0
- package/dist/providers/cloud-offload/cloudflare-agents.d.ts.map +1 -0
- package/dist/providers/cloud-offload/cloudflare-agents.js +583 -0
- package/dist/providers/cloud-offload/cloudflare-agents.js.map +1 -0
- package/dist/providers/cloud-offload/fly-sprites.d.ts +147 -0
- package/dist/providers/cloud-offload/fly-sprites.d.ts.map +1 -0
- package/dist/providers/cloud-offload/fly-sprites.js +563 -0
- package/dist/providers/cloud-offload/fly-sprites.js.map +1 -0
- package/dist/providers/cloud-offload/session-handle.d.ts +62 -0
- package/dist/providers/cloud-offload/session-handle.d.ts.map +1 -0
- package/dist/providers/cloud-offload/session-handle.js +109 -0
- package/dist/providers/cloud-offload/session-handle.js.map +1 -0
- package/dist/providers/cloud-offload/snapshot.d.ts +97 -0
- package/dist/providers/cloud-offload/snapshot.d.ts.map +1 -0
- package/dist/providers/cloud-offload/snapshot.js +303 -0
- package/dist/providers/cloud-offload/snapshot.js.map +1 -0
- package/dist/providers/codex-adapter.d.ts +25 -0
- package/dist/providers/codex-adapter.d.ts.map +1 -0
- package/dist/providers/codex-adapter.js +493 -0
- package/dist/providers/codex-adapter.js.map +1 -0
- package/dist/providers/codex-detector.d.ts +73 -0
- package/dist/providers/codex-detector.d.ts.map +1 -0
- package/dist/providers/codex-detector.js +162 -0
- package/dist/providers/codex-detector.js.map +1 -0
- package/dist/providers/codex-models.d.ts +117 -0
- package/dist/providers/codex-models.d.ts.map +1 -0
- package/dist/providers/codex-models.js +398 -0
- package/dist/providers/codex-models.js.map +1 -0
- package/dist/providers/copilot-adapter.d.ts +40 -0
- package/dist/providers/copilot-adapter.d.ts.map +1 -0
- package/dist/providers/copilot-adapter.js +512 -0
- package/dist/providers/copilot-adapter.js.map +1 -0
- package/dist/providers/credential-pool.d.ts +247 -0
- package/dist/providers/credential-pool.d.ts.map +1 -0
- package/dist/providers/credential-pool.js +577 -0
- package/dist/providers/credential-pool.js.map +1 -0
- package/dist/providers/discovery.d.ts +103 -0
- package/dist/providers/discovery.d.ts.map +1 -0
- package/dist/providers/discovery.js +601 -0
- package/dist/providers/discovery.js.map +1 -0
- package/dist/providers/dynamic-discovery.d.ts +35 -0
- package/dist/providers/dynamic-discovery.d.ts.map +1 -0
- package/dist/providers/dynamic-discovery.js +240 -0
- package/dist/providers/dynamic-discovery.js.map +1 -0
- package/dist/providers/extended-thinking.d.ts +69 -0
- package/dist/providers/extended-thinking.d.ts.map +1 -0
- package/dist/providers/extended-thinking.js +233 -0
- package/dist/providers/extended-thinking.js.map +1 -0
- package/dist/providers/fallback-chain.d.ts +34 -0
- package/dist/providers/fallback-chain.d.ts.map +1 -0
- package/dist/providers/fallback-chain.js +116 -0
- package/dist/providers/fallback-chain.js.map +1 -0
- package/dist/providers/format-translator.d.ts +115 -0
- package/dist/providers/format-translator.d.ts.map +1 -0
- package/dist/providers/format-translator.js +347 -0
- package/dist/providers/format-translator.js.map +1 -0
- package/dist/providers/gemini-native-adapter.d.ts +51 -0
- package/dist/providers/gemini-native-adapter.d.ts.map +1 -0
- package/dist/providers/gemini-native-adapter.js +505 -0
- package/dist/providers/gemini-native-adapter.js.map +1 -0
- package/dist/providers/harness-profiles.d.ts +70 -0
- package/dist/providers/harness-profiles.d.ts.map +1 -0
- package/dist/providers/harness-profiles.js +210 -0
- package/dist/providers/harness-profiles.js.map +1 -0
- package/dist/providers/header-injection.d.ts +24 -0
- package/dist/providers/header-injection.d.ts.map +1 -0
- package/dist/providers/header-injection.js +109 -0
- package/dist/providers/header-injection.js.map +1 -0
- package/dist/providers/health-check.d.ts +80 -0
- package/dist/providers/health-check.d.ts.map +1 -0
- package/dist/providers/health-check.js +465 -0
- package/dist/providers/health-check.js.map +1 -0
- package/dist/providers/model-defaults.d.ts +60 -0
- package/dist/providers/model-defaults.d.ts.map +1 -0
- package/dist/providers/model-defaults.js +257 -0
- package/dist/providers/model-defaults.js.map +1 -0
- package/dist/providers/model-discovery.d.ts +85 -0
- package/dist/providers/model-discovery.d.ts.map +1 -0
- package/dist/providers/model-discovery.js +325 -0
- package/dist/providers/model-discovery.js.map +1 -0
- package/dist/providers/model-performance.d.ts +30 -0
- package/dist/providers/model-performance.d.ts.map +1 -0
- package/dist/providers/model-performance.js +57 -0
- package/dist/providers/model-performance.js.map +1 -0
- package/dist/providers/model-router.d.ts +119 -0
- package/dist/providers/model-router.d.ts.map +1 -0
- package/dist/providers/model-router.js +550 -0
- package/dist/providers/model-router.js.map +1 -0
- package/dist/providers/model-switcher.d.ts +116 -0
- package/dist/providers/model-switcher.d.ts.map +1 -0
- package/dist/providers/model-switcher.js +298 -0
- package/dist/providers/model-switcher.js.map +1 -0
- package/dist/providers/ollama-adapter.d.ts +66 -0
- package/dist/providers/ollama-adapter.d.ts.map +1 -0
- package/dist/providers/ollama-adapter.js +423 -0
- package/dist/providers/ollama-adapter.js.map +1 -0
- package/dist/providers/ollama-host.d.ts +66 -0
- package/dist/providers/ollama-host.d.ts.map +1 -0
- package/dist/providers/ollama-host.js +90 -0
- package/dist/providers/ollama-host.js.map +1 -0
- package/dist/providers/openai-compat-adapter.d.ts +20 -0
- package/dist/providers/openai-compat-adapter.d.ts.map +1 -0
- package/dist/providers/openai-compat-adapter.js +513 -0
- package/dist/providers/openai-compat-adapter.js.map +1 -0
- package/dist/providers/opencode-sst-adapter.d.ts +131 -0
- package/dist/providers/opencode-sst-adapter.d.ts.map +1 -0
- package/dist/providers/opencode-sst-adapter.js +385 -0
- package/dist/providers/opencode-sst-adapter.js.map +1 -0
- package/dist/providers/peer-tool-auth.d.ts +87 -0
- package/dist/providers/peer-tool-auth.d.ts.map +1 -0
- package/dist/providers/peer-tool-auth.js +254 -0
- package/dist/providers/peer-tool-auth.js.map +1 -0
- package/dist/providers/preset-library.d.ts +55 -0
- package/dist/providers/preset-library.d.ts.map +1 -0
- package/dist/providers/preset-library.js +299 -0
- package/dist/providers/preset-library.js.map +1 -0
- package/dist/providers/prompt-cache-warmup.d.ts +139 -0
- package/dist/providers/prompt-cache-warmup.d.ts.map +1 -0
- package/dist/providers/prompt-cache-warmup.js +233 -0
- package/dist/providers/prompt-cache-warmup.js.map +1 -0
- package/dist/providers/provider-brain.d.ts +79 -0
- package/dist/providers/provider-brain.d.ts.map +1 -0
- package/dist/providers/provider-brain.js +208 -0
- package/dist/providers/provider-brain.js.map +1 -0
- package/dist/providers/provider-ladder.d.ts +100 -0
- package/dist/providers/provider-ladder.d.ts.map +1 -0
- package/dist/providers/provider-ladder.js +220 -0
- package/dist/providers/provider-ladder.js.map +1 -0
- package/dist/providers/provider-service.d.ts +340 -0
- package/dist/providers/provider-service.d.ts.map +1 -0
- package/dist/providers/provider-service.js +1270 -0
- package/dist/providers/provider-service.js.map +1 -0
- package/dist/providers/public-tier/fallback-chain.d.ts +58 -0
- package/dist/providers/public-tier/fallback-chain.d.ts.map +1 -0
- package/dist/providers/public-tier/fallback-chain.js +160 -0
- package/dist/providers/public-tier/fallback-chain.js.map +1 -0
- package/dist/providers/public-tier/horde.d.ts +42 -0
- package/dist/providers/public-tier/horde.d.ts.map +1 -0
- package/dist/providers/public-tier/horde.js +203 -0
- package/dist/providers/public-tier/horde.js.map +1 -0
- package/dist/providers/public-tier/huggingface-free.d.ts +55 -0
- package/dist/providers/public-tier/huggingface-free.d.ts.map +1 -0
- package/dist/providers/public-tier/huggingface-free.js +85 -0
- package/dist/providers/public-tier/huggingface-free.js.map +1 -0
- package/dist/providers/public-tier/llm7.d.ts +48 -0
- package/dist/providers/public-tier/llm7.d.ts.map +1 -0
- package/dist/providers/public-tier/llm7.js +197 -0
- package/dist/providers/public-tier/llm7.js.map +1 -0
- package/dist/providers/public-tier/opencode-zen-research.d.ts +59 -0
- package/dist/providers/public-tier/opencode-zen-research.d.ts.map +1 -0
- package/dist/providers/public-tier/opencode-zen-research.js +57 -0
- package/dist/providers/public-tier/opencode-zen-research.js.map +1 -0
- package/dist/providers/public-tier/ovhcloud.d.ts +57 -0
- package/dist/providers/public-tier/ovhcloud.d.ts.map +1 -0
- package/dist/providers/public-tier/ovhcloud.js +210 -0
- package/dist/providers/public-tier/ovhcloud.js.map +1 -0
- package/dist/providers/public-tier/pollinations.d.ts +60 -0
- package/dist/providers/public-tier/pollinations.d.ts.map +1 -0
- package/dist/providers/public-tier/pollinations.js +252 -0
- package/dist/providers/public-tier/pollinations.js.map +1 -0
- package/dist/providers/rate-limiter.d.ts +55 -0
- package/dist/providers/rate-limiter.d.ts.map +1 -0
- package/dist/providers/rate-limiter.js +141 -0
- package/dist/providers/rate-limiter.js.map +1 -0
- package/dist/providers/registry.d.ts +19 -0
- package/dist/providers/registry.d.ts.map +1 -0
- package/dist/providers/registry.js +315 -0
- package/dist/providers/registry.js.map +1 -0
- package/dist/providers/retry-strategies.d.ts +78 -0
- package/dist/providers/retry-strategies.d.ts.map +1 -0
- package/dist/providers/retry-strategies.js +161 -0
- package/dist/providers/retry-strategies.js.map +1 -0
- package/dist/providers/thinking-preserver.d.ts +74 -0
- package/dist/providers/thinking-preserver.d.ts.map +1 -0
- package/dist/providers/thinking-preserver.js +109 -0
- package/dist/providers/thinking-preserver.js.map +1 -0
- package/dist/providers/tool-parsers/index.d.ts +7 -0
- package/dist/providers/tool-parsers/index.d.ts.map +1 -0
- package/dist/providers/tool-parsers/index.js +7 -0
- package/dist/providers/tool-parsers/index.js.map +1 -0
- package/dist/providers/tool-parsers/parsers.d.ts +78 -0
- package/dist/providers/tool-parsers/parsers.d.ts.map +1 -0
- package/dist/providers/tool-parsers/parsers.js +622 -0
- package/dist/providers/tool-parsers/parsers.js.map +1 -0
- package/dist/providers/tool-serializer.d.ts +221 -0
- package/dist/providers/tool-serializer.d.ts.map +1 -0
- package/dist/providers/tool-serializer.js +335 -0
- package/dist/providers/tool-serializer.js.map +1 -0
- package/dist/providers/types.d.ts +181 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +5 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/providers/usage-intelligence.d.ts +50 -0
- package/dist/providers/usage-intelligence.d.ts.map +1 -0
- package/dist/providers/usage-intelligence.js +146 -0
- package/dist/providers/usage-intelligence.js.map +1 -0
- package/dist/providers/vertex-oauth.d.ts +21 -0
- package/dist/providers/vertex-oauth.d.ts.map +1 -0
- package/dist/providers/vertex-oauth.js +393 -0
- package/dist/providers/vertex-oauth.js.map +1 -0
- package/dist/rag/chunker.d.ts +42 -0
- package/dist/rag/chunker.d.ts.map +1 -0
- package/dist/rag/chunker.js +247 -0
- package/dist/rag/chunker.js.map +1 -0
- package/dist/rag/reranker.d.ts +59 -0
- package/dist/rag/reranker.d.ts.map +1 -0
- package/dist/rag/reranker.js +79 -0
- package/dist/rag/reranker.js.map +1 -0
- package/dist/rag/visual-flow.d.ts +66 -0
- package/dist/rag/visual-flow.d.ts.map +1 -0
- package/dist/rag/visual-flow.js +203 -0
- package/dist/rag/visual-flow.js.map +1 -0
- package/dist/recipes/recipe-loader.d.ts +37 -0
- package/dist/recipes/recipe-loader.d.ts.map +1 -0
- package/dist/recipes/recipe-loader.js +434 -0
- package/dist/recipes/recipe-loader.js.map +1 -0
- package/dist/recipes/recipe-runtime.d.ts +33 -0
- package/dist/recipes/recipe-runtime.d.ts.map +1 -0
- package/dist/recipes/recipe-runtime.js +349 -0
- package/dist/recipes/recipe-runtime.js.map +1 -0
- package/dist/recipes/recipe-types.d.ts +178 -0
- package/dist/recipes/recipe-types.d.ts.map +1 -0
- package/dist/recipes/recipe-types.js +19 -0
- package/dist/recipes/recipe-types.js.map +1 -0
- package/dist/runtime-hooks/dead-code-hooks.d.ts +201 -0
- package/dist/runtime-hooks/dead-code-hooks.d.ts.map +1 -0
- package/dist/runtime-hooks/dead-code-hooks.js +176 -0
- package/dist/runtime-hooks/dead-code-hooks.js.map +1 -0
- package/dist/sandbox/approval-rules.d.ts +107 -0
- package/dist/sandbox/approval-rules.d.ts.map +1 -0
- package/dist/sandbox/approval-rules.js +253 -0
- package/dist/sandbox/approval-rules.js.map +1 -0
- package/dist/sandbox/backends/cloud-auth.d.ts +50 -0
- package/dist/sandbox/backends/cloud-auth.d.ts.map +1 -0
- package/dist/sandbox/backends/cloud-auth.js +93 -0
- package/dist/sandbox/backends/cloud-auth.js.map +1 -0
- package/dist/sandbox/backends/landlock-linux.d.ts +44 -0
- package/dist/sandbox/backends/landlock-linux.d.ts.map +1 -0
- package/dist/sandbox/backends/landlock-linux.js +284 -0
- package/dist/sandbox/backends/landlock-linux.js.map +1 -0
- package/dist/sandbox/backends/seatbelt-macos.d.ts +31 -0
- package/dist/sandbox/backends/seatbelt-macos.d.ts.map +1 -0
- package/dist/sandbox/backends/seatbelt-macos.js +248 -0
- package/dist/sandbox/backends/seatbelt-macos.js.map +1 -0
- package/dist/sandbox/backends/windows-jobobject.d.ts +92 -0
- package/dist/sandbox/backends/windows-jobobject.d.ts.map +1 -0
- package/dist/sandbox/backends/windows-jobobject.js +158 -0
- package/dist/sandbox/backends/windows-jobobject.js.map +1 -0
- package/dist/sandbox/cloud-sandbox-types.d.ts +48 -0
- package/dist/sandbox/cloud-sandbox-types.d.ts.map +1 -0
- package/dist/sandbox/cloud-sandbox-types.js +9 -0
- package/dist/sandbox/cloud-sandbox-types.js.map +1 -0
- package/dist/sandbox/composite-backend.d.ts +61 -0
- package/dist/sandbox/composite-backend.d.ts.map +1 -0
- package/dist/sandbox/composite-backend.js +145 -0
- package/dist/sandbox/composite-backend.js.map +1 -0
- package/dist/sandbox/docker-backend.d.ts +184 -0
- package/dist/sandbox/docker-backend.d.ts.map +1 -0
- package/dist/sandbox/docker-backend.js +457 -0
- package/dist/sandbox/docker-backend.js.map +1 -0
- package/dist/sandbox/execution-environments.d.ts +77 -0
- package/dist/sandbox/execution-environments.d.ts.map +1 -0
- package/dist/sandbox/execution-environments.js +183 -0
- package/dist/sandbox/execution-environments.js.map +1 -0
- package/dist/sandbox/executor.d.ts +35 -0
- package/dist/sandbox/executor.d.ts.map +1 -0
- package/dist/sandbox/executor.js +120 -0
- package/dist/sandbox/executor.js.map +1 -0
- package/dist/sandbox/extended-backends.d.ts +58 -0
- package/dist/sandbox/extended-backends.d.ts.map +1 -0
- package/dist/sandbox/extended-backends.js +199 -0
- package/dist/sandbox/extended-backends.js.map +1 -0
- package/dist/sandbox/flyio-backend.d.ts +22 -0
- package/dist/sandbox/flyio-backend.d.ts.map +1 -0
- package/dist/sandbox/flyio-backend.js +119 -0
- package/dist/sandbox/flyio-backend.js.map +1 -0
- package/dist/sandbox/kernel-sandbox.d.ts +91 -0
- package/dist/sandbox/kernel-sandbox.d.ts.map +1 -0
- package/dist/sandbox/kernel-sandbox.js +260 -0
- package/dist/sandbox/kernel-sandbox.js.map +1 -0
- package/dist/sandbox/modal-backend.d.ts +15 -0
- package/dist/sandbox/modal-backend.d.ts.map +1 -0
- package/dist/sandbox/modal-backend.js +110 -0
- package/dist/sandbox/modal-backend.js.map +1 -0
- package/dist/sandbox/no-change-timeout.d.ts +81 -0
- package/dist/sandbox/no-change-timeout.d.ts.map +1 -0
- package/dist/sandbox/no-change-timeout.js +105 -0
- package/dist/sandbox/no-change-timeout.js.map +1 -0
- package/dist/sandbox/output-isolator.d.ts +104 -0
- package/dist/sandbox/output-isolator.d.ts.map +1 -0
- package/dist/sandbox/output-isolator.js +220 -0
- package/dist/sandbox/output-isolator.js.map +1 -0
- package/dist/sandbox/request-rule.d.ts +105 -0
- package/dist/sandbox/request-rule.d.ts.map +1 -0
- package/dist/sandbox/request-rule.js +328 -0
- package/dist/sandbox/request-rule.js.map +1 -0
- package/dist/sandbox/sandbox-policy.d.ts +147 -0
- package/dist/sandbox/sandbox-policy.d.ts.map +1 -0
- package/dist/sandbox/sandbox-policy.js +156 -0
- package/dist/sandbox/sandbox-policy.js.map +1 -0
- package/dist/sandbox/security.d.ts +98 -0
- package/dist/sandbox/security.d.ts.map +1 -0
- package/dist/sandbox/security.js +449 -0
- package/dist/sandbox/security.js.map +1 -0
- package/dist/sandbox/task-isolation.d.ts +86 -0
- package/dist/sandbox/task-isolation.d.ts.map +1 -0
- package/dist/sandbox/task-isolation.js +240 -0
- package/dist/sandbox/task-isolation.js.map +1 -0
- package/dist/sandbox/terminal-backends.d.ts +189 -0
- package/dist/sandbox/terminal-backends.d.ts.map +1 -0
- package/dist/sandbox/terminal-backends.js +699 -0
- package/dist/sandbox/terminal-backends.js.map +1 -0
- package/dist/sandbox/unified-exec.d.ts +127 -0
- package/dist/sandbox/unified-exec.d.ts.map +1 -0
- package/dist/sandbox/unified-exec.js +446 -0
- package/dist/sandbox/unified-exec.js.map +1 -0
- package/dist/sandbox/virtual-paths.d.ts +91 -0
- package/dist/sandbox/virtual-paths.d.ts.map +1 -0
- package/dist/sandbox/virtual-paths.js +213 -0
- package/dist/sandbox/virtual-paths.js.map +1 -0
- package/dist/scheduler/cron-scheduler.d.ts +204 -0
- package/dist/scheduler/cron-scheduler.d.ts.map +1 -0
- package/dist/scheduler/cron-scheduler.js +423 -0
- package/dist/scheduler/cron-scheduler.js.map +1 -0
- package/dist/scheduler/schedule-store.d.ts +135 -0
- package/dist/scheduler/schedule-store.d.ts.map +1 -0
- package/dist/scheduler/schedule-store.js +293 -0
- package/dist/scheduler/schedule-store.js.map +1 -0
- package/dist/search/warp-grep.d.ts +127 -0
- package/dist/search/warp-grep.d.ts.map +1 -0
- package/dist/search/warp-grep.js +306 -0
- package/dist/search/warp-grep.js.map +1 -0
- package/dist/security/anti-distillation.d.ts +46 -0
- package/dist/security/anti-distillation.d.ts.map +1 -0
- package/dist/security/anti-distillation.js +358 -0
- package/dist/security/anti-distillation.js.map +1 -0
- package/dist/security/archive-preflight.d.ts +31 -0
- package/dist/security/archive-preflight.d.ts.map +1 -0
- package/dist/security/archive-preflight.js +200 -0
- package/dist/security/archive-preflight.js.map +1 -0
- package/dist/security/auto-classifier.d.ts +76 -0
- package/dist/security/auto-classifier.d.ts.map +1 -0
- package/dist/security/auto-classifier.js +319 -0
- package/dist/security/auto-classifier.js.map +1 -0
- package/dist/security/command-sanitizer.d.ts +93 -0
- package/dist/security/command-sanitizer.d.ts.map +1 -0
- package/dist/security/command-sanitizer.js +442 -0
- package/dist/security/command-sanitizer.js.map +1 -0
- package/dist/security/confirm-action.d.ts +70 -0
- package/dist/security/confirm-action.d.ts.map +1 -0
- package/dist/security/confirm-action.js +216 -0
- package/dist/security/confirm-action.js.map +1 -0
- package/dist/security/file-freeze.d.ts +86 -0
- package/dist/security/file-freeze.d.ts.map +1 -0
- package/dist/security/file-freeze.js +213 -0
- package/dist/security/file-freeze.js.map +1 -0
- package/dist/security/file-type-validator.d.ts +37 -0
- package/dist/security/file-type-validator.d.ts.map +1 -0
- package/dist/security/file-type-validator.js +176 -0
- package/dist/security/file-type-validator.js.map +1 -0
- package/dist/security/guardrails-off.d.ts +244 -0
- package/dist/security/guardrails-off.d.ts.map +1 -0
- package/dist/security/guardrails-off.js +592 -0
- package/dist/security/guardrails-off.js.map +1 -0
- package/dist/security/hash-audit-chain.d.ts +98 -0
- package/dist/security/hash-audit-chain.d.ts.map +1 -0
- package/dist/security/hash-audit-chain.js +198 -0
- package/dist/security/hash-audit-chain.js.map +1 -0
- package/dist/security/hidden-text-detector.d.ts +112 -0
- package/dist/security/hidden-text-detector.d.ts.map +1 -0
- package/dist/security/hidden-text-detector.js +258 -0
- package/dist/security/hidden-text-detector.js.map +1 -0
- package/dist/security/human-approval.d.ts +92 -0
- package/dist/security/human-approval.d.ts.map +1 -0
- package/dist/security/human-approval.js +199 -0
- package/dist/security/human-approval.js.map +1 -0
- package/dist/security/intent-verifier.d.ts +97 -0
- package/dist/security/intent-verifier.d.ts.map +1 -0
- package/dist/security/intent-verifier.js +250 -0
- package/dist/security/intent-verifier.js.map +1 -0
- package/dist/security/multi-encoding-decoder.d.ts +47 -0
- package/dist/security/multi-encoding-decoder.d.ts.map +1 -0
- package/dist/security/multi-encoding-decoder.js +336 -0
- package/dist/security/multi-encoding-decoder.js.map +1 -0
- package/dist/security/origin-validator.d.ts +52 -0
- package/dist/security/origin-validator.d.ts.map +1 -0
- package/dist/security/origin-validator.js +135 -0
- package/dist/security/origin-validator.js.map +1 -0
- package/dist/security/pii-redactor.d.ts +60 -0
- package/dist/security/pii-redactor.d.ts.map +1 -0
- package/dist/security/pii-redactor.js +364 -0
- package/dist/security/pii-redactor.js.map +1 -0
- package/dist/security/plugin-scanner.d.ts +103 -0
- package/dist/security/plugin-scanner.d.ts.map +1 -0
- package/dist/security/plugin-scanner.js +241 -0
- package/dist/security/plugin-scanner.js.map +1 -0
- package/dist/security/policy-language.d.ts +47 -0
- package/dist/security/policy-language.d.ts.map +1 -0
- package/dist/security/policy-language.js +103 -0
- package/dist/security/policy-language.js.map +1 -0
- package/dist/security/privacy-router.d.ts +129 -0
- package/dist/security/privacy-router.d.ts.map +1 -0
- package/dist/security/privacy-router.js +344 -0
- package/dist/security/privacy-router.js.map +1 -0
- package/dist/security/private-mode.d.ts +48 -0
- package/dist/security/private-mode.d.ts.map +1 -0
- package/dist/security/private-mode.js +80 -0
- package/dist/security/private-mode.js.map +1 -0
- package/dist/security/prompt-injection-quarantine.d.ts +181 -0
- package/dist/security/prompt-injection-quarantine.d.ts.map +1 -0
- package/dist/security/prompt-injection-quarantine.js +279 -0
- package/dist/security/prompt-injection-quarantine.js.map +1 -0
- package/dist/security/prompt-quarantine.d.ts +50 -0
- package/dist/security/prompt-quarantine.d.ts.map +1 -0
- package/dist/security/prompt-quarantine.js +61 -0
- package/dist/security/prompt-quarantine.js.map +1 -0
- package/dist/security/recon-osint/username-search.d.ts +48 -0
- package/dist/security/recon-osint/username-search.d.ts.map +1 -0
- package/dist/security/recon-osint/username-search.js +88 -0
- package/dist/security/recon-osint/username-search.js.map +1 -0
- package/dist/security/redact-overlapping-spans.d.ts +87 -0
- package/dist/security/redact-overlapping-spans.d.ts.map +1 -0
- package/dist/security/redact-overlapping-spans.js +159 -0
- package/dist/security/redact-overlapping-spans.js.map +1 -0
- package/dist/security/rules-of-engagement.d.ts +94 -0
- package/dist/security/rules-of-engagement.d.ts.map +1 -0
- package/dist/security/rules-of-engagement.js +290 -0
- package/dist/security/rules-of-engagement.js.map +1 -0
- package/dist/security/secret-scanner.d.ts +81 -0
- package/dist/security/secret-scanner.d.ts.map +1 -0
- package/dist/security/secret-scanner.js +336 -0
- package/dist/security/secret-scanner.js.map +1 -0
- package/dist/security/signed-audit.d.ts +50 -0
- package/dist/security/signed-audit.d.ts.map +1 -0
- package/dist/security/signed-audit.js +110 -0
- package/dist/security/signed-audit.js.map +1 -0
- package/dist/security/skills-guard.d.ts +74 -0
- package/dist/security/skills-guard.d.ts.map +1 -0
- package/dist/security/skills-guard.js +367 -0
- package/dist/security/skills-guard.js.map +1 -0
- package/dist/security/ssrf-guard.d.ts +70 -0
- package/dist/security/ssrf-guard.d.ts.map +1 -0
- package/dist/security/ssrf-guard.js +275 -0
- package/dist/security/ssrf-guard.js.map +1 -0
- package/dist/security/url-instruction-guard.d.ts +80 -0
- package/dist/security/url-instruction-guard.d.ts.map +1 -0
- package/dist/security/url-instruction-guard.js +476 -0
- package/dist/security/url-instruction-guard.js.map +1 -0
- package/dist/security/write-audit.d.ts +52 -0
- package/dist/security/write-audit.d.ts.map +1 -0
- package/dist/security/write-audit.js +64 -0
- package/dist/security/write-audit.js.map +1 -0
- package/dist/session/approval-queue.d.ts +307 -0
- package/dist/session/approval-queue.d.ts.map +1 -0
- package/dist/session/approval-queue.js +469 -0
- package/dist/session/approval-queue.js.map +1 -0
- package/dist/session/carplay-dispatch.d.ts +259 -0
- package/dist/session/carplay-dispatch.d.ts.map +1 -0
- package/dist/session/carplay-dispatch.js +459 -0
- package/dist/session/carplay-dispatch.js.map +1 -0
- package/dist/session/computer-session-store.d.ts +332 -0
- package/dist/session/computer-session-store.d.ts.map +1 -0
- package/dist/session/computer-session-store.js +758 -0
- package/dist/session/computer-session-store.js.map +1 -0
- package/dist/session/creations.d.ts +328 -0
- package/dist/session/creations.d.ts.map +1 -0
- package/dist/session/creations.js +667 -0
- package/dist/session/creations.js.map +1 -0
- package/dist/session/cursor-stream.d.ts +191 -0
- package/dist/session/cursor-stream.d.ts.map +1 -0
- package/dist/session/cursor-stream.js +328 -0
- package/dist/session/cursor-stream.js.map +1 -0
- package/dist/session/dispatch/companion-bridge.d.ts +116 -0
- package/dist/session/dispatch/companion-bridge.d.ts.map +1 -0
- package/dist/session/dispatch/companion-bridge.js +213 -0
- package/dist/session/dispatch/companion-bridge.js.map +1 -0
- package/dist/session/file-delivery.d.ts +365 -0
- package/dist/session/file-delivery.d.ts.map +1 -0
- package/dist/session/file-delivery.js +557 -0
- package/dist/session/file-delivery.js.map +1 -0
- package/dist/session/file-get-handler.d.ts +236 -0
- package/dist/session/file-get-handler.d.ts.map +1 -0
- package/dist/session/file-get-handler.js +476 -0
- package/dist/session/file-get-handler.js.map +1 -0
- package/dist/session/fleet-view.d.ts +245 -0
- package/dist/session/fleet-view.d.ts.map +1 -0
- package/dist/session/fleet-view.js +422 -0
- package/dist/session/fleet-view.js.map +1 -0
- package/dist/session/live-activity.d.ts +312 -0
- package/dist/session/live-activity.d.ts.map +1 -0
- package/dist/session/live-activity.js +473 -0
- package/dist/session/live-activity.js.map +1 -0
- package/dist/session/session-handoff.d.ts +150 -0
- package/dist/session/session-handoff.d.ts.map +1 -0
- package/dist/session/session-handoff.js +223 -0
- package/dist/session/session-handoff.js.map +1 -0
- package/dist/session/surface-subscribers.d.ts +139 -0
- package/dist/session/surface-subscribers.d.ts.map +1 -0
- package/dist/session/surface-subscribers.js +206 -0
- package/dist/session/surface-subscribers.js.map +1 -0
- package/dist/session/voice-intent.d.ts +144 -0
- package/dist/session/voice-intent.d.ts.map +1 -0
- package/dist/session/voice-intent.js +211 -0
- package/dist/session/voice-intent.js.map +1 -0
- package/dist/session/watch-dispatch.d.ts +207 -0
- package/dist/session/watch-dispatch.d.ts.map +1 -0
- package/dist/session/watch-dispatch.js +399 -0
- package/dist/session/watch-dispatch.js.map +1 -0
- package/dist/skills/agentskills-registry.d.ts +102 -0
- package/dist/skills/agentskills-registry.d.ts.map +1 -0
- package/dist/skills/agentskills-registry.js +157 -0
- package/dist/skills/agentskills-registry.js.map +1 -0
- package/dist/skills/anthropic-imports/docx-writer.d.ts +59 -0
- package/dist/skills/anthropic-imports/docx-writer.d.ts.map +1 -0
- package/dist/skills/anthropic-imports/docx-writer.js +239 -0
- package/dist/skills/anthropic-imports/docx-writer.js.map +1 -0
- package/dist/skills/anthropic-imports/pdf-writer.d.ts +63 -0
- package/dist/skills/anthropic-imports/pdf-writer.d.ts.map +1 -0
- package/dist/skills/anthropic-imports/pdf-writer.js +277 -0
- package/dist/skills/anthropic-imports/pdf-writer.js.map +1 -0
- package/dist/skills/anthropic-imports/pptx-writer.d.ts +50 -0
- package/dist/skills/anthropic-imports/pptx-writer.d.ts.map +1 -0
- package/dist/skills/anthropic-imports/pptx-writer.js +334 -0
- package/dist/skills/anthropic-imports/pptx-writer.js.map +1 -0
- package/dist/skills/anthropic-imports/xlsx-writer.d.ts +63 -0
- package/dist/skills/anthropic-imports/xlsx-writer.d.ts.map +1 -0
- package/dist/skills/anthropic-imports/xlsx-writer.js +289 -0
- package/dist/skills/anthropic-imports/xlsx-writer.js.map +1 -0
- package/dist/skills/awesome-imports/entries-domains.d.ts +10 -0
- package/dist/skills/awesome-imports/entries-domains.d.ts.map +1 -0
- package/dist/skills/awesome-imports/entries-domains.js +137 -0
- package/dist/skills/awesome-imports/entries-domains.js.map +1 -0
- package/dist/skills/awesome-imports/entries-skills.d.ts +10 -0
- package/dist/skills/awesome-imports/entries-skills.d.ts.map +1 -0
- package/dist/skills/awesome-imports/entries-skills.js +145 -0
- package/dist/skills/awesome-imports/entries-skills.js.map +1 -0
- package/dist/skills/awesome-imports/entries.d.ts +13 -0
- package/dist/skills/awesome-imports/entries.d.ts.map +1 -0
- package/dist/skills/awesome-imports/entries.js +14 -0
- package/dist/skills/awesome-imports/entries.js.map +1 -0
- package/dist/skills/awesome-imports/index.d.ts +36 -0
- package/dist/skills/awesome-imports/index.d.ts.map +1 -0
- package/dist/skills/awesome-imports/index.js +53 -0
- package/dist/skills/awesome-imports/index.js.map +1 -0
- package/dist/skills/awesome-imports/types.d.ts +33 -0
- package/dist/skills/awesome-imports/types.d.ts.map +1 -0
- package/dist/skills/awesome-imports/types.js +9 -0
- package/dist/skills/awesome-imports/types.js.map +1 -0
- package/dist/skills/cli-anything.d.ts +75 -0
- package/dist/skills/cli-anything.d.ts.map +1 -0
- package/dist/skills/cli-anything.js +156 -0
- package/dist/skills/cli-anything.js.map +1 -0
- package/dist/skills/eval.d.ts +70 -0
- package/dist/skills/eval.d.ts.map +1 -0
- package/dist/skills/eval.js +178 -0
- package/dist/skills/eval.js.map +1 -0
- package/dist/skills/input-sanitizer.d.ts +25 -0
- package/dist/skills/input-sanitizer.d.ts.map +1 -0
- package/dist/skills/input-sanitizer.js +55 -0
- package/dist/skills/input-sanitizer.js.map +1 -0
- package/dist/skills/loader.d.ts +189 -0
- package/dist/skills/loader.d.ts.map +1 -0
- package/dist/skills/loader.js +839 -0
- package/dist/skills/loader.js.map +1 -0
- package/dist/skills/prompt-file-loader.d.ts +55 -0
- package/dist/skills/prompt-file-loader.d.ts.map +1 -0
- package/dist/skills/prompt-file-loader.js +94 -0
- package/dist/skills/prompt-file-loader.js.map +1 -0
- package/dist/skills/self-crystallization.d.ts +62 -0
- package/dist/skills/self-crystallization.d.ts.map +1 -0
- package/dist/skills/self-crystallization.js +143 -0
- package/dist/skills/self-crystallization.js.map +1 -0
- package/dist/skills/skill-compositor.d.ts +66 -0
- package/dist/skills/skill-compositor.d.ts.map +1 -0
- package/dist/skills/skill-compositor.js +143 -0
- package/dist/skills/skill-compositor.js.map +1 -0
- package/dist/skills/skill-merger.d.ts +104 -0
- package/dist/skills/skill-merger.d.ts.map +1 -0
- package/dist/skills/skill-merger.js +369 -0
- package/dist/skills/skill-merger.js.map +1 -0
- package/dist/skills/skill-optimizer.d.ts +83 -0
- package/dist/skills/skill-optimizer.d.ts.map +1 -0
- package/dist/skills/skill-optimizer.js +131 -0
- package/dist/skills/skill-optimizer.js.map +1 -0
- package/dist/skills/skill-source-adapter.d.ts +184 -0
- package/dist/skills/skill-source-adapter.d.ts.map +1 -0
- package/dist/skills/skill-source-adapter.js +0 -0
- package/dist/skills/skill-source-adapter.js.map +1 -0
- package/dist/skills/skill-standard.d.ts +78 -0
- package/dist/skills/skill-standard.d.ts.map +1 -0
- package/dist/skills/skill-standard.js +198 -0
- package/dist/skills/skill-standard.js.map +1 -0
- package/dist/skills/tool-rules-parser.d.ts +51 -0
- package/dist/skills/tool-rules-parser.d.ts.map +1 -0
- package/dist/skills/tool-rules-parser.js +168 -0
- package/dist/skills/tool-rules-parser.js.map +1 -0
- package/dist/skills/wotann-skills-registry.d.ts +88 -0
- package/dist/skills/wotann-skills-registry.d.ts.map +1 -0
- package/dist/skills/wotann-skills-registry.js +533 -0
- package/dist/skills/wotann-skills-registry.js.map +1 -0
- package/dist/snippets/snippet-store.d.ts +121 -0
- package/dist/snippets/snippet-store.d.ts.map +1 -0
- package/dist/snippets/snippet-store.js +267 -0
- package/dist/snippets/snippet-store.js.map +1 -0
- package/dist/sop/pipeline.d.ts +60 -0
- package/dist/sop/pipeline.d.ts.map +1 -0
- package/dist/sop/pipeline.js +214 -0
- package/dist/sop/pipeline.js.map +1 -0
- package/dist/sop/stages/code-generator.d.ts +22 -0
- package/dist/sop/stages/code-generator.d.ts.map +1 -0
- package/dist/sop/stages/code-generator.js +106 -0
- package/dist/sop/stages/code-generator.js.map +1 -0
- package/dist/sop/stages/design-writer.d.ts +21 -0
- package/dist/sop/stages/design-writer.d.ts.map +1 -0
- package/dist/sop/stages/design-writer.js +96 -0
- package/dist/sop/stages/design-writer.js.map +1 -0
- package/dist/sop/stages/prd-writer.d.ts +22 -0
- package/dist/sop/stages/prd-writer.d.ts.map +1 -0
- package/dist/sop/stages/prd-writer.js +88 -0
- package/dist/sop/stages/prd-writer.js.map +1 -0
- package/dist/sop/stages/qa.d.ts +64 -0
- package/dist/sop/stages/qa.d.ts.map +1 -0
- package/dist/sop/stages/qa.js +241 -0
- package/dist/sop/stages/qa.js.map +1 -0
- package/dist/sop/types.d.ts +94 -0
- package/dist/sop/types.d.ts.map +1 -0
- package/dist/sop/types.js +13 -0
- package/dist/sop/types.js.map +1 -0
- package/dist/storage/checkpoint-supersede.d.ts +78 -0
- package/dist/storage/checkpoint-supersede.d.ts.map +1 -0
- package/dist/storage/checkpoint-supersede.js +85 -0
- package/dist/storage/checkpoint-supersede.js.map +1 -0
- package/dist/storage/index.d.ts +80 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +95 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/sqlite-better-backend.d.ts +64 -0
- package/dist/storage/sqlite-better-backend.d.ts.map +1 -0
- package/dist/storage/sqlite-better-backend.js +169 -0
- package/dist/storage/sqlite-better-backend.js.map +1 -0
- package/dist/storage/sqlite-node-backend.d.ts +69 -0
- package/dist/storage/sqlite-node-backend.d.ts.map +1 -0
- package/dist/storage/sqlite-node-backend.js +195 -0
- package/dist/storage/sqlite-node-backend.js.map +1 -0
- package/dist/storage/storage-adapter.d.ts +184 -0
- package/dist/storage/storage-adapter.d.ts.map +1 -0
- package/dist/storage/storage-adapter.js +62 -0
- package/dist/storage/storage-adapter.js.map +1 -0
- package/dist/telemetry/audit-trail.d.ts +124 -0
- package/dist/telemetry/audit-trail.d.ts.map +1 -0
- package/dist/telemetry/audit-trail.js +280 -0
- package/dist/telemetry/audit-trail.js.map +1 -0
- package/dist/telemetry/benchmarks.d.ts +65 -0
- package/dist/telemetry/benchmarks.d.ts.map +1 -0
- package/dist/telemetry/benchmarks.js +171 -0
- package/dist/telemetry/benchmarks.js.map +1 -0
- package/dist/telemetry/cost-oracle.d.ts +53 -0
- package/dist/telemetry/cost-oracle.d.ts.map +1 -0
- package/dist/telemetry/cost-oracle.js +206 -0
- package/dist/telemetry/cost-oracle.js.map +1 -0
- package/dist/telemetry/cost-tracker.d.ts +318 -0
- package/dist/telemetry/cost-tracker.d.ts.map +1 -0
- package/dist/telemetry/cost-tracker.js +887 -0
- package/dist/telemetry/cost-tracker.js.map +1 -0
- package/dist/telemetry/daily-cost-store.d.ts +43 -0
- package/dist/telemetry/daily-cost-store.d.ts.map +1 -0
- package/dist/telemetry/daily-cost-store.js +140 -0
- package/dist/telemetry/daily-cost-store.js.map +1 -0
- package/dist/telemetry/eval-observability.d.ts +105 -0
- package/dist/telemetry/eval-observability.d.ts.map +1 -0
- package/dist/telemetry/eval-observability.js +182 -0
- package/dist/telemetry/eval-observability.js.map +1 -0
- package/dist/telemetry/observability-export.d.ts +145 -0
- package/dist/telemetry/observability-export.d.ts.map +1 -0
- package/dist/telemetry/observability-export.js +339 -0
- package/dist/telemetry/observability-export.js.map +1 -0
- package/dist/telemetry/opt-out.d.ts +31 -0
- package/dist/telemetry/opt-out.d.ts.map +1 -0
- package/dist/telemetry/opt-out.js +58 -0
- package/dist/telemetry/opt-out.js.map +1 -0
- package/dist/telemetry/session-analytics.d.ts +94 -0
- package/dist/telemetry/session-analytics.d.ts.map +1 -0
- package/dist/telemetry/session-analytics.js +152 -0
- package/dist/telemetry/session-analytics.js.map +1 -0
- package/dist/telemetry/session-replay.d.ts +132 -0
- package/dist/telemetry/session-replay.d.ts.map +1 -0
- package/dist/telemetry/session-replay.js +245 -0
- package/dist/telemetry/session-replay.js.map +1 -0
- package/dist/telemetry/token-estimator.d.ts +72 -0
- package/dist/telemetry/token-estimator.d.ts.map +1 -0
- package/dist/telemetry/token-estimator.js +86 -0
- package/dist/telemetry/token-estimator.js.map +1 -0
- package/dist/telemetry/traceparent.d.ts +139 -0
- package/dist/telemetry/traceparent.d.ts.map +1 -0
- package/dist/telemetry/traceparent.js +249 -0
- package/dist/telemetry/traceparent.js.map +1 -0
- package/dist/telemetry/wotann-compute-unit.d.ts +82 -0
- package/dist/telemetry/wotann-compute-unit.d.ts.map +1 -0
- package/dist/telemetry/wotann-compute-unit.js +112 -0
- package/dist/telemetry/wotann-compute-unit.js.map +1 -0
- package/dist/testing/prompt-regression.d.ts +73 -0
- package/dist/testing/prompt-regression.d.ts.map +1 -0
- package/dist/testing/prompt-regression.js +170 -0
- package/dist/testing/prompt-regression.js.map +1 -0
- package/dist/testing/screen-aware.d.ts +55 -0
- package/dist/testing/screen-aware.d.ts.map +1 -0
- package/dist/testing/screen-aware.js +137 -0
- package/dist/testing/screen-aware.js.map +1 -0
- package/dist/testing/visual-diff-theater.d.ts +86 -0
- package/dist/testing/visual-diff-theater.d.ts.map +1 -0
- package/dist/testing/visual-diff-theater.js +262 -0
- package/dist/testing/visual-diff-theater.js.map +1 -0
- package/dist/testing/visual-verifier.d.ts +61 -0
- package/dist/testing/visual-verifier.d.ts.map +1 -0
- package/dist/testing/visual-verifier.js +201 -0
- package/dist/testing/visual-verifier.js.map +1 -0
- package/dist/tools/aux-tools.d.ts +39 -0
- package/dist/tools/aux-tools.d.ts.map +1 -0
- package/dist/tools/aux-tools.js +301 -0
- package/dist/tools/aux-tools.js.map +1 -0
- package/dist/tools/composio-adapter.d.ts +99 -0
- package/dist/tools/composio-adapter.d.ts.map +1 -0
- package/dist/tools/composio-adapter.js +140 -0
- package/dist/tools/composio-adapter.js.map +1 -0
- package/dist/tools/deep-research-loop.d.ts +91 -0
- package/dist/tools/deep-research-loop.d.ts.map +1 -0
- package/dist/tools/deep-research-loop.js +129 -0
- package/dist/tools/deep-research-loop.js.map +1 -0
- package/dist/tools/docx-processor.d.ts +54 -0
- package/dist/tools/docx-processor.d.ts.map +1 -0
- package/dist/tools/docx-processor.js +183 -0
- package/dist/tools/docx-processor.js.map +1 -0
- package/dist/tools/encoding-detector.d.ts +25 -0
- package/dist/tools/encoding-detector.d.ts.map +1 -0
- package/dist/tools/encoding-detector.js +147 -0
- package/dist/tools/encoding-detector.js.map +1 -0
- package/dist/tools/grep-subagent.d.ts +85 -0
- package/dist/tools/grep-subagent.d.ts.map +1 -0
- package/dist/tools/grep-subagent.js +414 -0
- package/dist/tools/grep-subagent.js.map +1 -0
- package/dist/tools/hash-anchored-edit.d.ts +100 -0
- package/dist/tools/hash-anchored-edit.d.ts.map +1 -0
- package/dist/tools/hash-anchored-edit.js +161 -0
- package/dist/tools/hash-anchored-edit.js.map +1 -0
- package/dist/tools/hashline-edit.d.ts +79 -0
- package/dist/tools/hashline-edit.d.ts.map +1 -0
- package/dist/tools/hashline-edit.js +174 -0
- package/dist/tools/hashline-edit.js.map +1 -0
- package/dist/tools/hashline-edits.d.ts +169 -0
- package/dist/tools/hashline-edits.d.ts.map +1 -0
- package/dist/tools/hashline-edits.js +594 -0
- package/dist/tools/hashline-edits.js.map +1 -0
- package/dist/tools/image-gen-router.d.ts +39 -0
- package/dist/tools/image-gen-router.d.ts.map +1 -0
- package/dist/tools/image-gen-router.js +288 -0
- package/dist/tools/image-gen-router.js.map +1 -0
- package/dist/tools/markitdown-bridge.d.ts +42 -0
- package/dist/tools/markitdown-bridge.d.ts.map +1 -0
- package/dist/tools/markitdown-bridge.js +249 -0
- package/dist/tools/markitdown-bridge.js.map +1 -0
- package/dist/tools/monitor-bg.d.ts +73 -0
- package/dist/tools/monitor-bg.d.ts.map +1 -0
- package/dist/tools/monitor-bg.js +275 -0
- package/dist/tools/monitor-bg.js.map +1 -0
- package/dist/tools/monitor.d.ts +58 -0
- package/dist/tools/monitor.d.ts.map +1 -0
- package/dist/tools/monitor.js +204 -0
- package/dist/tools/monitor.js.map +1 -0
- package/dist/tools/parallel-grep.d.ts +72 -0
- package/dist/tools/parallel-grep.d.ts.map +1 -0
- package/dist/tools/parallel-grep.js +154 -0
- package/dist/tools/parallel-grep.js.map +1 -0
- package/dist/tools/pdf-processor.d.ts +47 -0
- package/dist/tools/pdf-processor.d.ts.map +1 -0
- package/dist/tools/pdf-processor.js +214 -0
- package/dist/tools/pdf-processor.js.map +1 -0
- package/dist/tools/post-callback.d.ts +62 -0
- package/dist/tools/post-callback.d.ts.map +1 -0
- package/dist/tools/post-callback.js +153 -0
- package/dist/tools/post-callback.js.map +1 -0
- package/dist/tools/rtk-compressor.d.ts +59 -0
- package/dist/tools/rtk-compressor.d.ts.map +1 -0
- package/dist/tools/rtk-compressor.js +236 -0
- package/dist/tools/rtk-compressor.js.map +1 -0
- package/dist/tools/task-tool.d.ts +80 -0
- package/dist/tools/task-tool.d.ts.map +1 -0
- package/dist/tools/task-tool.js +309 -0
- package/dist/tools/task-tool.js.map +1 -0
- package/dist/tools/tool-timing.d.ts +99 -0
- package/dist/tools/tool-timing.d.ts.map +1 -0
- package/dist/tools/tool-timing.js +196 -0
- package/dist/tools/tool-timing.js.map +1 -0
- package/dist/tools/web-fetch.d.ts +116 -0
- package/dist/tools/web-fetch.d.ts.map +1 -0
- package/dist/tools/web-fetch.js +501 -0
- package/dist/tools/web-fetch.js.map +1 -0
- package/dist/tools/xlsx-processor.d.ts +57 -0
- package/dist/tools/xlsx-processor.d.ts.map +1 -0
- package/dist/tools/xlsx-processor.js +274 -0
- package/dist/tools/xlsx-processor.js.map +1 -0
- package/dist/training/autoresearch.d.ts +129 -0
- package/dist/training/autoresearch.d.ts.map +1 -0
- package/dist/training/autoresearch.js +307 -0
- package/dist/training/autoresearch.js.map +1 -0
- package/dist/training/llm-modification-generator.d.ts +45 -0
- package/dist/training/llm-modification-generator.d.ts.map +1 -0
- package/dist/training/llm-modification-generator.js +207 -0
- package/dist/training/llm-modification-generator.js.map +1 -0
- package/dist/training/pipeline.d.ts +120 -0
- package/dist/training/pipeline.d.ts.map +1 -0
- package/dist/training/pipeline.js +272 -0
- package/dist/training/pipeline.js.map +1 -0
- package/dist/training/rl-environment.d.ts +148 -0
- package/dist/training/rl-environment.d.ts.map +1 -0
- package/dist/training/rl-environment.js +264 -0
- package/dist/training/rl-environment.js.map +1 -0
- package/dist/training/session-extractor.d.ts +55 -0
- package/dist/training/session-extractor.d.ts.map +1 -0
- package/dist/training/session-extractor.js +177 -0
- package/dist/training/session-extractor.js.map +1 -0
- package/dist/training/trajectory-extractor.d.ts +83 -0
- package/dist/training/trajectory-extractor.d.ts.map +1 -0
- package/dist/training/trajectory-extractor.js +211 -0
- package/dist/training/trajectory-extractor.js.map +1 -0
- package/dist/ui/App.d.ts +24 -0
- package/dist/ui/App.d.ts.map +1 -0
- package/dist/ui/App.js +3248 -0
- package/dist/ui/App.js.map +1 -0
- package/dist/ui/accessibility.d.ts +157 -0
- package/dist/ui/accessibility.d.ts.map +1 -0
- package/dist/ui/accessibility.js +232 -0
- package/dist/ui/accessibility.js.map +1 -0
- package/dist/ui/agent-fleet-dashboard.d.ts +59 -0
- package/dist/ui/agent-fleet-dashboard.d.ts.map +1 -0
- package/dist/ui/agent-fleet-dashboard.js +143 -0
- package/dist/ui/agent-fleet-dashboard.js.map +1 -0
- package/dist/ui/alt-buffer.d.ts +73 -0
- package/dist/ui/alt-buffer.d.ts.map +1 -0
- package/dist/ui/alt-buffer.js +151 -0
- package/dist/ui/alt-buffer.js.map +1 -0
- package/dist/ui/animations/RavensFlight.d.ts +56 -0
- package/dist/ui/animations/RavensFlight.d.ts.map +1 -0
- package/dist/ui/animations/RavensFlight.js +103 -0
- package/dist/ui/animations/RavensFlight.js.map +1 -0
- package/dist/ui/animations/SigilStamp.d.ts +89 -0
- package/dist/ui/animations/SigilStamp.d.ts.map +1 -0
- package/dist/ui/animations/SigilStamp.js +142 -0
- package/dist/ui/animations/SigilStamp.js.map +1 -0
- package/dist/ui/animations.d.ts +102 -0
- package/dist/ui/animations.d.ts.map +1 -0
- package/dist/ui/animations.js +277 -0
- package/dist/ui/animations.js.map +1 -0
- package/dist/ui/bootstrap.d.ts +25 -0
- package/dist/ui/bootstrap.d.ts.map +1 -0
- package/dist/ui/bootstrap.js +51 -0
- package/dist/ui/bootstrap.js.map +1 -0
- package/dist/ui/canvas.d.ts +85 -0
- package/dist/ui/canvas.d.ts.map +1 -0
- package/dist/ui/canvas.js +210 -0
- package/dist/ui/canvas.js.map +1 -0
- package/dist/ui/command-registry.d.ts +64 -0
- package/dist/ui/command-registry.d.ts.map +1 -0
- package/dist/ui/command-registry.js +148 -0
- package/dist/ui/command-registry.js.map +1 -0
- package/dist/ui/components/AgentStatusPanel.d.ts +25 -0
- package/dist/ui/components/AgentStatusPanel.d.ts.map +1 -0
- package/dist/ui/components/AgentStatusPanel.js +32 -0
- package/dist/ui/components/AgentStatusPanel.js.map +1 -0
- package/dist/ui/components/AuditLogPanel.d.ts +22 -0
- package/dist/ui/components/AuditLogPanel.d.ts.map +1 -0
- package/dist/ui/components/AuditLogPanel.js +158 -0
- package/dist/ui/components/AuditLogPanel.js.map +1 -0
- package/dist/ui/components/AutomationsPanel.d.ts +28 -0
- package/dist/ui/components/AutomationsPanel.d.ts.map +1 -0
- package/dist/ui/components/AutomationsPanel.js +298 -0
- package/dist/ui/components/AutomationsPanel.js.map +1 -0
- package/dist/ui/components/ChatView.d.ts +27 -0
- package/dist/ui/components/ChatView.d.ts.map +1 -0
- package/dist/ui/components/ChatView.js +49 -0
- package/dist/ui/components/ChatView.js.map +1 -0
- package/dist/ui/components/CommandPalette.d.ts +39 -0
- package/dist/ui/components/CommandPalette.d.ts.map +1 -0
- package/dist/ui/components/CommandPalette.js +95 -0
- package/dist/ui/components/CommandPalette.js.map +1 -0
- package/dist/ui/components/CommandPaletteCommands.d.ts +70 -0
- package/dist/ui/components/CommandPaletteCommands.d.ts.map +1 -0
- package/dist/ui/components/CommandPaletteCommands.js +267 -0
- package/dist/ui/components/CommandPaletteCommands.js.map +1 -0
- package/dist/ui/components/ContextHUD.d.ts +24 -0
- package/dist/ui/components/ContextHUD.d.ts.map +1 -0
- package/dist/ui/components/ContextHUD.js +27 -0
- package/dist/ui/components/ContextHUD.js.map +1 -0
- package/dist/ui/components/ContextSourcePanel.d.ts +20 -0
- package/dist/ui/components/ContextSourcePanel.d.ts.map +1 -0
- package/dist/ui/components/ContextSourcePanel.js +91 -0
- package/dist/ui/components/ContextSourcePanel.js.map +1 -0
- package/dist/ui/components/DesignPreview.d.ts +66 -0
- package/dist/ui/components/DesignPreview.d.ts.map +1 -0
- package/dist/ui/components/DesignPreview.js +39 -0
- package/dist/ui/components/DesignPreview.js.map +1 -0
- package/dist/ui/components/DiffTimeline.d.ts +38 -0
- package/dist/ui/components/DiffTimeline.d.ts.map +1 -0
- package/dist/ui/components/DiffTimeline.js +65 -0
- package/dist/ui/components/DiffTimeline.js.map +1 -0
- package/dist/ui/components/DiffViewer.d.ts +35 -0
- package/dist/ui/components/DiffViewer.d.ts.map +1 -0
- package/dist/ui/components/DiffViewer.js +115 -0
- package/dist/ui/components/DiffViewer.js.map +1 -0
- package/dist/ui/components/DispatchInbox.d.ts +32 -0
- package/dist/ui/components/DispatchInbox.d.ts.map +1 -0
- package/dist/ui/components/DispatchInbox.js +89 -0
- package/dist/ui/components/DispatchInbox.js.map +1 -0
- package/dist/ui/components/GdprPanel.d.ts +22 -0
- package/dist/ui/components/GdprPanel.d.ts.map +1 -0
- package/dist/ui/components/GdprPanel.js +165 -0
- package/dist/ui/components/GdprPanel.js.map +1 -0
- package/dist/ui/components/HistoryPicker.d.ts +19 -0
- package/dist/ui/components/HistoryPicker.d.ts.map +1 -0
- package/dist/ui/components/HistoryPicker.js +129 -0
- package/dist/ui/components/HistoryPicker.js.map +1 -0
- package/dist/ui/components/MemoryInspector.d.ts +19 -0
- package/dist/ui/components/MemoryInspector.d.ts.map +1 -0
- package/dist/ui/components/MemoryInspector.js +129 -0
- package/dist/ui/components/MemoryInspector.js.map +1 -0
- package/dist/ui/components/MessageActions.d.ts +15 -0
- package/dist/ui/components/MessageActions.d.ts.map +1 -0
- package/dist/ui/components/MessageActions.js +84 -0
- package/dist/ui/components/MessageActions.js.map +1 -0
- package/dist/ui/components/ModelPicker.d.ts +61 -0
- package/dist/ui/components/ModelPicker.d.ts.map +1 -0
- package/dist/ui/components/ModelPicker.js +224 -0
- package/dist/ui/components/ModelPicker.js.map +1 -0
- package/dist/ui/components/OptionPicker.d.ts +38 -0
- package/dist/ui/components/OptionPicker.d.ts.map +1 -0
- package/dist/ui/components/OptionPicker.js +146 -0
- package/dist/ui/components/OptionPicker.js.map +1 -0
- package/dist/ui/components/PermissionPrompt.d.ts +22 -0
- package/dist/ui/components/PermissionPrompt.d.ts.map +1 -0
- package/dist/ui/components/PermissionPrompt.js +68 -0
- package/dist/ui/components/PermissionPrompt.js.map +1 -0
- package/dist/ui/components/PromptInput.d.ts +31 -0
- package/dist/ui/components/PromptInput.d.ts.map +1 -0
- package/dist/ui/components/PromptInput.js +244 -0
- package/dist/ui/components/PromptInput.js.map +1 -0
- package/dist/ui/components/ProofViewer.d.ts +30 -0
- package/dist/ui/components/ProofViewer.d.ts.map +1 -0
- package/dist/ui/components/ProofViewer.js +62 -0
- package/dist/ui/components/ProofViewer.js.map +1 -0
- package/dist/ui/components/Sparkline.d.ts +81 -0
- package/dist/ui/components/Sparkline.d.ts.map +1 -0
- package/dist/ui/components/Sparkline.js +102 -0
- package/dist/ui/components/Sparkline.js.map +1 -0
- package/dist/ui/components/StartupScreen.d.ts +31 -0
- package/dist/ui/components/StartupScreen.d.ts.map +1 -0
- package/dist/ui/components/StartupScreen.js +29 -0
- package/dist/ui/components/StartupScreen.js.map +1 -0
- package/dist/ui/components/StatusBar.d.ts +51 -0
- package/dist/ui/components/StatusBar.d.ts.map +1 -0
- package/dist/ui/components/StatusBar.js +74 -0
- package/dist/ui/components/StatusBar.js.map +1 -0
- package/dist/ui/components/TerminalBlocksView.d.ts +31 -0
- package/dist/ui/components/TerminalBlocksView.d.ts.map +1 -0
- package/dist/ui/components/TerminalBlocksView.js +149 -0
- package/dist/ui/components/TerminalBlocksView.js.map +1 -0
- package/dist/ui/components/TrustPanel.d.ts +26 -0
- package/dist/ui/components/TrustPanel.d.ts.map +1 -0
- package/dist/ui/components/TrustPanel.js +173 -0
- package/dist/ui/components/TrustPanel.js.map +1 -0
- package/dist/ui/components/UnifiedStatusBar.d.ts +65 -0
- package/dist/ui/components/UnifiedStatusBar.d.ts.map +1 -0
- package/dist/ui/components/UnifiedStatusBar.js +60 -0
- package/dist/ui/components/UnifiedStatusBar.js.map +1 -0
- package/dist/ui/components/primitives/Banner.d.ts +47 -0
- package/dist/ui/components/primitives/Banner.d.ts.map +1 -0
- package/dist/ui/components/primitives/Banner.js +29 -0
- package/dist/ui/components/primitives/Banner.js.map +1 -0
- package/dist/ui/components/primitives/Card.d.ts +58 -0
- package/dist/ui/components/primitives/Card.d.ts.map +1 -0
- package/dist/ui/components/primitives/Card.js +20 -0
- package/dist/ui/components/primitives/Card.js.map +1 -0
- package/dist/ui/components/primitives/KeyHint.d.ts +58 -0
- package/dist/ui/components/primitives/KeyHint.d.ts.map +1 -0
- package/dist/ui/components/primitives/KeyHint.js +21 -0
- package/dist/ui/components/primitives/KeyHint.js.map +1 -0
- package/dist/ui/components/primitives/Notification.d.ts +26 -0
- package/dist/ui/components/primitives/Notification.d.ts.map +1 -0
- package/dist/ui/components/primitives/Notification.js +24 -0
- package/dist/ui/components/primitives/Notification.js.map +1 -0
- package/dist/ui/components/primitives/ProgressMeter.d.ts +47 -0
- package/dist/ui/components/primitives/ProgressMeter.d.ts.map +1 -0
- package/dist/ui/components/primitives/ProgressMeter.js +46 -0
- package/dist/ui/components/primitives/ProgressMeter.js.map +1 -0
- package/dist/ui/components/primitives/Spinner.d.ts +28 -0
- package/dist/ui/components/primitives/Spinner.d.ts.map +1 -0
- package/dist/ui/components/primitives/Spinner.js +32 -0
- package/dist/ui/components/primitives/Spinner.js.map +1 -0
- package/dist/ui/components/primitives/StatusBadge.d.ts +38 -0
- package/dist/ui/components/primitives/StatusBadge.d.ts.map +1 -0
- package/dist/ui/components/primitives/StatusBadge.js +28 -0
- package/dist/ui/components/primitives/StatusBadge.js.map +1 -0
- package/dist/ui/components/primitives/index.d.ts +24 -0
- package/dist/ui/components/primitives/index.d.ts.map +1 -0
- package/dist/ui/components/primitives/index.js +17 -0
- package/dist/ui/components/primitives/index.js.map +1 -0
- package/dist/ui/context-meter.d.ts +46 -0
- package/dist/ui/context-meter.d.ts.map +1 -0
- package/dist/ui/context-meter.js +111 -0
- package/dist/ui/context-meter.js.map +1 -0
- package/dist/ui/context-references.d.ts +62 -0
- package/dist/ui/context-references.d.ts.map +1 -0
- package/dist/ui/context-references.js +559 -0
- package/dist/ui/context-references.js.map +1 -0
- package/dist/ui/cost-readout.d.ts +60 -0
- package/dist/ui/cost-readout.d.ts.map +1 -0
- package/dist/ui/cost-readout.js +101 -0
- package/dist/ui/cost-readout.js.map +1 -0
- package/dist/ui/diff-engine.d.ts +110 -0
- package/dist/ui/diff-engine.d.ts.map +1 -0
- package/dist/ui/diff-engine.js +274 -0
- package/dist/ui/diff-engine.js.map +1 -0
- package/dist/ui/follow-ups.d.ts +39 -0
- package/dist/ui/follow-ups.d.ts.map +1 -0
- package/dist/ui/follow-ups.js +226 -0
- package/dist/ui/follow-ups.js.map +1 -0
- package/dist/ui/helpers.d.ts +33 -0
- package/dist/ui/helpers.d.ts.map +1 -0
- package/dist/ui/helpers.js +97 -0
- package/dist/ui/helpers.js.map +1 -0
- package/dist/ui/input/mouse.d.ts +139 -0
- package/dist/ui/input/mouse.d.ts.map +1 -0
- package/dist/ui/input/mouse.js +239 -0
- package/dist/ui/input/mouse.js.map +1 -0
- package/dist/ui/keybindings.d.ts +26 -0
- package/dist/ui/keybindings.d.ts.map +1 -0
- package/dist/ui/keybindings.js +76 -0
- package/dist/ui/keybindings.js.map +1 -0
- package/dist/ui/raven/raven-state.d.ts +69 -0
- package/dist/ui/raven/raven-state.d.ts.map +1 -0
- package/dist/ui/raven/raven-state.js +185 -0
- package/dist/ui/raven/raven-state.js.map +1 -0
- package/dist/ui/sound.d.ts +85 -0
- package/dist/ui/sound.d.ts.map +1 -0
- package/dist/ui/sound.js +126 -0
- package/dist/ui/sound.js.map +1 -0
- package/dist/ui/statusline.d.ts +74 -0
- package/dist/ui/statusline.d.ts.map +1 -0
- package/dist/ui/statusline.js +111 -0
- package/dist/ui/statusline.js.map +1 -0
- package/dist/ui/string-width-cache.d.ts +204 -0
- package/dist/ui/string-width-cache.d.ts.map +1 -0
- package/dist/ui/string-width-cache.js +374 -0
- package/dist/ui/string-width-cache.js.map +1 -0
- package/dist/ui/terminal-blocks/block.d.ts +90 -0
- package/dist/ui/terminal-blocks/block.d.ts.map +1 -0
- package/dist/ui/terminal-blocks/block.js +183 -0
- package/dist/ui/terminal-blocks/block.js.map +1 -0
- package/dist/ui/terminal-blocks/init-snippets.d.ts +32 -0
- package/dist/ui/terminal-blocks/init-snippets.d.ts.map +1 -0
- package/dist/ui/terminal-blocks/init-snippets.js +163 -0
- package/dist/ui/terminal-blocks/init-snippets.js.map +1 -0
- package/dist/ui/terminal-blocks/osc-133-parser.d.ts +98 -0
- package/dist/ui/terminal-blocks/osc-133-parser.d.ts.map +1 -0
- package/dist/ui/terminal-blocks/osc-133-parser.js +230 -0
- package/dist/ui/terminal-blocks/osc-133-parser.js.map +1 -0
- package/dist/ui/theme/tokens.d.ts +198 -0
- package/dist/ui/theme/tokens.d.ts.map +1 -0
- package/dist/ui/theme/tokens.js +199 -0
- package/dist/ui/theme/tokens.js.map +1 -0
- package/dist/ui/themes/colorblind.d.ts +74 -0
- package/dist/ui/themes/colorblind.d.ts.map +1 -0
- package/dist/ui/themes/colorblind.js +162 -0
- package/dist/ui/themes/colorblind.js.map +1 -0
- package/dist/ui/themes.d.ts +158 -0
- package/dist/ui/themes.d.ts.map +1 -0
- package/dist/ui/themes.js +425 -0
- package/dist/ui/themes.js.map +1 -0
- package/dist/ui/turn-finalize.d.ts +66 -0
- package/dist/ui/turn-finalize.d.ts.map +1 -0
- package/dist/ui/turn-finalize.js +79 -0
- package/dist/ui/turn-finalize.js.map +1 -0
- package/dist/ui/voice-controller.d.ts +32 -0
- package/dist/ui/voice-controller.d.ts.map +1 -0
- package/dist/ui/voice-controller.js +72 -0
- package/dist/ui/voice-controller.js.map +1 -0
- package/dist/utils/atomic-io.d.ts +83 -0
- package/dist/utils/atomic-io.d.ts.map +1 -0
- package/dist/utils/atomic-io.js +219 -0
- package/dist/utils/atomic-io.js.map +1 -0
- package/dist/utils/atomic-write.d.ts +60 -0
- package/dist/utils/atomic-write.d.ts.map +1 -0
- package/dist/utils/atomic-write.js +144 -0
- package/dist/utils/atomic-write.js.map +1 -0
- package/dist/utils/execFileNoThrow.d.ts +19 -0
- package/dist/utils/execFileNoThrow.d.ts.map +1 -0
- package/dist/utils/execFileNoThrow.js +31 -0
- package/dist/utils/execFileNoThrow.js.map +1 -0
- package/dist/utils/json-parse.d.ts +52 -0
- package/dist/utils/json-parse.d.ts.map +1 -0
- package/dist/utils/json-parse.js +259 -0
- package/dist/utils/json-parse.js.map +1 -0
- package/dist/utils/marker-polling.d.ts +216 -0
- package/dist/utils/marker-polling.d.ts.map +1 -0
- package/dist/utils/marker-polling.js +324 -0
- package/dist/utils/marker-polling.js.map +1 -0
- package/dist/utils/path-realpath.d.ts +81 -0
- package/dist/utils/path-realpath.d.ts.map +1 -0
- package/dist/utils/path-realpath.js +210 -0
- package/dist/utils/path-realpath.js.map +1 -0
- package/dist/utils/process-handlers.d.ts +65 -0
- package/dist/utils/process-handlers.d.ts.map +1 -0
- package/dist/utils/process-handlers.js +102 -0
- package/dist/utils/process-handlers.js.map +1 -0
- package/dist/utils/proxy-setup.d.ts +56 -0
- package/dist/utils/proxy-setup.d.ts.map +1 -0
- package/dist/utils/proxy-setup.js +109 -0
- package/dist/utils/proxy-setup.js.map +1 -0
- package/dist/utils/schema-drift.d.ts +99 -0
- package/dist/utils/schema-drift.d.ts.map +1 -0
- package/dist/utils/schema-drift.js +123 -0
- package/dist/utils/schema-drift.js.map +1 -0
- package/dist/utils/shadow-git.d.ts +111 -0
- package/dist/utils/shadow-git.d.ts.map +1 -0
- package/dist/utils/shadow-git.js +392 -0
- package/dist/utils/shadow-git.js.map +1 -0
- package/dist/utils/sidecar-downloader.d.ts +54 -0
- package/dist/utils/sidecar-downloader.d.ts.map +1 -0
- package/dist/utils/sidecar-downloader.js +185 -0
- package/dist/utils/sidecar-downloader.js.map +1 -0
- package/dist/utils/sqlite-kv-store.d.ts +91 -0
- package/dist/utils/sqlite-kv-store.d.ts.map +1 -0
- package/dist/utils/sqlite-kv-store.js +229 -0
- package/dist/utils/sqlite-kv-store.js.map +1 -0
- package/dist/utils/sqlite-store-init.d.ts +33 -0
- package/dist/utils/sqlite-store-init.d.ts.map +1 -0
- package/dist/utils/sqlite-store-init.js +31 -0
- package/dist/utils/sqlite-store-init.js.map +1 -0
- package/dist/utils/stub-detection.d.ts +18 -0
- package/dist/utils/stub-detection.d.ts.map +1 -0
- package/dist/utils/stub-detection.js +32 -0
- package/dist/utils/stub-detection.js.map +1 -0
- package/dist/utils/transcript-shrinker.d.ts +51 -0
- package/dist/utils/transcript-shrinker.d.ts.map +1 -0
- package/dist/utils/transcript-shrinker.js +124 -0
- package/dist/utils/transcript-shrinker.js.map +1 -0
- package/dist/utils/trusted-workspaces.d.ts +106 -0
- package/dist/utils/trusted-workspaces.d.ts.map +1 -0
- package/dist/utils/trusted-workspaces.js +175 -0
- package/dist/utils/trusted-workspaces.js.map +1 -0
- package/dist/utils/vision-ocr.d.ts +46 -0
- package/dist/utils/vision-ocr.d.ts.map +1 -0
- package/dist/utils/vision-ocr.js +225 -0
- package/dist/utils/vision-ocr.js.map +1 -0
- package/dist/utils/wasm-bypass.d.ts +23 -0
- package/dist/utils/wasm-bypass.d.ts.map +1 -0
- package/dist/utils/wasm-bypass.js +63 -0
- package/dist/utils/wasm-bypass.js.map +1 -0
- package/dist/utils/wotann-home.d.ts +39 -0
- package/dist/utils/wotann-home.d.ts.map +1 -0
- package/dist/utils/wotann-home.js +49 -0
- package/dist/utils/wotann-home.js.map +1 -0
- package/dist/verification/index.d.ts +56 -0
- package/dist/verification/index.d.ts.map +1 -0
- package/dist/verification/index.js +86 -0
- package/dist/verification/index.js.map +1 -0
- package/dist/verification/judge-adapter.d.ts +32 -0
- package/dist/verification/judge-adapter.d.ts.map +1 -0
- package/dist/verification/judge-adapter.js +72 -0
- package/dist/verification/judge-adapter.js.map +1 -0
- package/dist/verification/pre-commit.d.ts +22 -0
- package/dist/verification/pre-commit.d.ts.map +1 -0
- package/dist/verification/pre-commit.js +66 -0
- package/dist/verification/pre-commit.js.map +1 -0
- package/dist/verification/strategies/cove-wrapper.d.ts +23 -0
- package/dist/verification/strategies/cove-wrapper.d.ts.map +1 -0
- package/dist/verification/strategies/cove-wrapper.js +108 -0
- package/dist/verification/strategies/cove-wrapper.js.map +1 -0
- package/dist/verification/strategies/faithfulness.d.ts +15 -0
- package/dist/verification/strategies/faithfulness.d.ts.map +1 -0
- package/dist/verification/strategies/faithfulness.js +102 -0
- package/dist/verification/strategies/faithfulness.js.map +1 -0
- package/dist/verification/strategies/format.d.ts +16 -0
- package/dist/verification/strategies/format.d.ts.map +1 -0
- package/dist/verification/strategies/format.js +116 -0
- package/dist/verification/strategies/format.js.map +1 -0
- package/dist/verification/strategies/four-perspective-wrapper.d.ts +21 -0
- package/dist/verification/strategies/four-perspective-wrapper.d.ts.map +1 -0
- package/dist/verification/strategies/four-perspective-wrapper.js +109 -0
- package/dist/verification/strategies/four-perspective-wrapper.js.map +1 -0
- package/dist/verification/strategies/guardian-wrapper.d.ts +20 -0
- package/dist/verification/strategies/guardian-wrapper.d.ts.map +1 -0
- package/dist/verification/strategies/guardian-wrapper.js +78 -0
- package/dist/verification/strategies/guardian-wrapper.js.map +1 -0
- package/dist/verification/strategies/hallucination.d.ts +25 -0
- package/dist/verification/strategies/hallucination.d.ts.map +1 -0
- package/dist/verification/strategies/hallucination.js +153 -0
- package/dist/verification/strategies/hallucination.js.map +1 -0
- package/dist/verification/strategies/plan-action-match.d.ts +16 -0
- package/dist/verification/strategies/plan-action-match.d.ts.map +1 -0
- package/dist/verification/strategies/plan-action-match.js +120 -0
- package/dist/verification/strategies/plan-action-match.js.map +1 -0
- package/dist/verification/strategies/safety.d.ts +18 -0
- package/dist/verification/strategies/safety.d.ts.map +1 -0
- package/dist/verification/strategies/safety.js +115 -0
- package/dist/verification/strategies/safety.js.map +1 -0
- package/dist/verification/types.d.ts +201 -0
- package/dist/verification/types.d.ts.map +1 -0
- package/dist/verification/types.js +42 -0
- package/dist/verification/types.js.map +1 -0
- package/dist/verification/verifier-engine.d.ts +36 -0
- package/dist/verification/verifier-engine.d.ts.map +1 -0
- package/dist/verification/verifier-engine.js +226 -0
- package/dist/verification/verifier-engine.js.map +1 -0
- package/dist/vision/cache.d.ts +50 -0
- package/dist/vision/cache.d.ts.map +1 -0
- package/dist/vision/cache.js +95 -0
- package/dist/vision/cache.js.map +1 -0
- package/dist/vision/ingest.d.ts +61 -0
- package/dist/vision/ingest.d.ts.map +1 -0
- package/dist/vision/ingest.js +162 -0
- package/dist/vision/ingest.js.map +1 -0
- package/dist/vision/keyframes.d.ts +53 -0
- package/dist/vision/keyframes.d.ts.map +1 -0
- package/dist/vision/keyframes.js +203 -0
- package/dist/vision/keyframes.js.map +1 -0
- package/dist/vision/mime-sniff.d.ts +38 -0
- package/dist/vision/mime-sniff.d.ts.map +1 -0
- package/dist/vision/mime-sniff.js +55 -0
- package/dist/vision/mime-sniff.js.map +1 -0
- package/dist/vision/resize.d.ts +60 -0
- package/dist/vision/resize.d.ts.map +1 -0
- package/dist/vision/resize.js +138 -0
- package/dist/vision/resize.js.map +1 -0
- package/dist/vision/size-policy.d.ts +53 -0
- package/dist/vision/size-policy.d.ts.map +1 -0
- package/dist/vision/size-policy.js +159 -0
- package/dist/vision/size-policy.js.map +1 -0
- package/dist/vision/types.d.ts +119 -0
- package/dist/vision/types.d.ts.map +1 -0
- package/dist/vision/types.js +41 -0
- package/dist/vision/types.js.map +1 -0
- package/dist/voice/edge-tts-backend.d.ts +65 -0
- package/dist/voice/edge-tts-backend.d.ts.map +1 -0
- package/dist/voice/edge-tts-backend.js +150 -0
- package/dist/voice/edge-tts-backend.js.map +1 -0
- package/dist/voice/stt-detector.d.ts +100 -0
- package/dist/voice/stt-detector.d.ts.map +1 -0
- package/dist/voice/stt-detector.js +484 -0
- package/dist/voice/stt-detector.js.map +1 -0
- package/dist/voice/tts-engine.d.ts +123 -0
- package/dist/voice/tts-engine.d.ts.map +1 -0
- package/dist/voice/tts-engine.js +602 -0
- package/dist/voice/tts-engine.js.map +1 -0
- package/dist/voice/vibevoice-backend.d.ts +113 -0
- package/dist/voice/vibevoice-backend.d.ts.map +1 -0
- package/dist/voice/vibevoice-backend.js +340 -0
- package/dist/voice/vibevoice-backend.js.map +1 -0
- package/dist/voice/voice-mode.d.ts +96 -0
- package/dist/voice/voice-mode.d.ts.map +1 -0
- package/dist/voice/voice-mode.js +627 -0
- package/dist/voice/voice-mode.js.map +1 -0
- package/dist/voice/voice-pipeline.d.ts +140 -0
- package/dist/voice/voice-pipeline.d.ts.map +1 -0
- package/dist/voice/voice-pipeline.js +658 -0
- package/dist/voice/voice-pipeline.js.map +1 -0
- package/dist/workflows/workflow-runner.d.ts +96 -0
- package/dist/workflows/workflow-runner.d.ts.map +1 -0
- package/dist/workflows/workflow-runner.js +362 -0
- package/dist/workflows/workflow-runner.js.map +1 -0
- package/install.sh +261 -0
- package/package.json +121 -0
- package/skills/a2ui.md +37 -0
- package/skills/agent-autonomy-kit.md +168 -0
- package/skills/agent-reach.md +58 -0
- package/skills/ai-humanizer.md +204 -0
- package/skills/ai-slop-cleaner.md +63 -0
- package/skills/angular-architect.md +67 -0
- package/skills/anthropic-imports/docx-create.md +61 -0
- package/skills/anthropic-imports/pdf-create.md +63 -0
- package/skills/anthropic-imports/pptx-create.md +61 -0
- package/skills/anthropic-imports/xlsx-create.md +67 -0
- package/skills/api-design-rest.md +112 -0
- package/skills/api-design.md +40 -0
- package/skills/batch-processing.md +36 -0
- package/skills/benchmark-engineering.md +45 -0
- package/skills/boost-prompt.md +182 -0
- package/skills/branch-management.md +57 -0
- package/skills/brooks-lint.md +101 -0
- package/skills/canvas-mode.md +40 -0
- package/skills/capability-evolver.md +141 -0
- package/skills/chain-of-thought.md +48 -0
- package/skills/cicd-engineer.md +68 -0
- package/skills/cloud-architect.md +59 -0
- package/skills/code-review-deep.md +82 -0
- package/skills/code-reviewer.md +32 -0
- package/skills/code-simplifier.md +35 -0
- package/skills/codebase-recon.md +101 -0
- package/skills/command-block-replay.md +58 -0
- package/skills/compaction-ui-enhancements.md +169 -0
- package/skills/compare-providers.md +66 -0
- package/skills/compliance-checker.md +62 -0
- package/skills/constitutional-ai.md +44 -0
- package/skills/context-engine.md +186 -0
- package/skills/context-management.md +59 -0
- package/skills/conventional-commit.md +43 -0
- package/skills/cost-intelligence.md +50 -0
- package/skills/cpp-pro.md +72 -0
- package/skills/csharp-developer.md +70 -0
- package/skills/debug-hypothesis-tree.md +56 -0
- package/skills/dependency-auditor.md +50 -0
- package/skills/design-doc-template.md +82 -0
- package/skills/django-expert.md +66 -0
- package/skills/docker-expert.md +41 -0
- package/skills/documentation.md +65 -0
- package/skills/dotnet-core.md +69 -0
- package/skills/dream-cycle.md +59 -0
- package/skills/elite-longterm-memory.md +144 -0
- package/skills/evaluate-prompt.md +71 -0
- package/skills/event-driven.md +21 -0
- package/skills/example-tool-rules.md +56 -0
- package/skills/express-api.md +70 -0
- package/skills/fastapi-expert.md +76 -0
- package/skills/file-based-planning.md +49 -0
- package/skills/find-missing-tests.md +75 -0
- package/skills/flutter-expert.md +23 -0
- package/skills/frontend-design-system.md +35 -0
- package/skills/generator-critic-loop.md +63 -0
- package/skills/golang-pro.md +26 -0
- package/skills/governance.md +175 -0
- package/skills/incident-postmortem.md +89 -0
- package/skills/incident-response.md +196 -0
- package/skills/integration-testing.md +67 -0
- package/skills/java-architect.md +23 -0
- package/skills/karpathy-principles.md +62 -0
- package/skills/kotlin-specialist.md +64 -0
- package/skills/kubernetes-specialist.md +68 -0
- package/skills/lsp-operations.md +40 -0
- package/skills/marketing-conversion-ops.md +36 -0
- package/skills/marketing-expert-panel.md +33 -0
- package/skills/marketing-growth-engine.md +33 -0
- package/skills/marketing-outbound-engine.md +27 -0
- package/skills/marketing-seo-ops.md +32 -0
- package/skills/mcp-marketplace.md +51 -0
- package/skills/memory-stack.md +24 -0
- package/skills/microservices-architect.md +60 -0
- package/skills/mongodb-expert.md +58 -0
- package/skills/monitoring-expert.md +69 -0
- package/skills/multi-source-research.md +56 -0
- package/skills/nestjs-expert.md +69 -0
- package/skills/nextjs-developer.md +23 -0
- package/skills/pack-astro-static.md +225 -0
- package/skills/pack-expo.md +304 -0
- package/skills/pack-hono-react-edge.md +237 -0
- package/skills/pack-nextjs-app-router.md +219 -0
- package/skills/pentest-patterns.md +61 -0
- package/skills/performance-profiler.md +22 -0
- package/skills/php-pro.md +78 -0
- package/skills/playwright-expert.md +23 -0
- package/skills/postgres-pro.md +61 -0
- package/skills/postmortem-template.md +89 -0
- package/skills/pr-creation.md +64 -0
- package/skills/proactive-agent-v3.md +138 -0
- package/skills/prompt-master.md +61 -0
- package/skills/prompt-testing.md +58 -0
- package/skills/python-pro.md +33 -0
- package/skills/rails-expert.md +23 -0
- package/skills/react-expert.md +34 -0
- package/skills/react-native-expert.md +70 -0
- package/skills/redis-expert.md +58 -0
- package/skills/refactor-safely.md +73 -0
- package/skills/refactor-with-tests.md +57 -0
- package/skills/rust-engineer.md +24 -0
- package/skills/scientific-method.md +54 -0
- package/skills/search-first.md +32 -0
- package/skills/security-recon-checklist.md +63 -0
- package/skills/security-reviewer.md +37 -0
- package/skills/self-healing.md +52 -0
- package/skills/setup-audit.md +56 -0
- package/skills/skeleton-of-thought.md +53 -0
- package/skills/skill-creator.md +28 -0
- package/skills/spec-driven-workflow.md +23 -0
- package/skills/spring-boot.md +67 -0
- package/skills/sql-pro.md +34 -0
- package/skills/superpowers-dispatcher.md +234 -0
- package/skills/svelte-expert.md +66 -0
- package/skills/swift-expert.md +77 -0
- package/skills/system-design-interview.md +69 -0
- package/skills/system-design.md +58 -0
- package/skills/systematic-debugging.md +33 -0
- package/skills/tdd-workflow.md +32 -0
- package/skills/terraform-engineer.md +72 -0
- package/skills/think-in-code.md +147 -0
- package/skills/trace-analysis.md +65 -0
- package/skills/tree-search.md +21 -0
- package/skills/turing-pyramid.md +113 -0
- package/skills/typescript-deep.md +70 -0
- package/skills/typescript-pro.md +33 -0
- package/skills/ultraplan.md +61 -0
- package/skills/vue-expert.md +71 -0
- package/skills/web-scraper.md +35 -0
|
@@ -0,0 +1,3571 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SQLite memory store with FTS5 full-text search.
|
|
3
|
+
* 8-layer unified memory system per §14 and MEMORY_ARCHITECTURE.md.
|
|
4
|
+
*
|
|
5
|
+
* LAYERS:
|
|
6
|
+
* 1. Auto-Capture — every tool call, file read, command output
|
|
7
|
+
* 2. Core Blocks — user/feedback/project/reference/cases/patterns/decisions/issues
|
|
8
|
+
* 3. Working Memory — current session state, recent context
|
|
9
|
+
* 4. Knowledge Graph — entity relationships, bi-temporal facts
|
|
10
|
+
* 5. Archival — long-term storage with temporal decay
|
|
11
|
+
* 6. Recall — retrieval with skeptical verification
|
|
12
|
+
* 7. Team Memory — shared across agents/sessions
|
|
13
|
+
* 8. Proactive Context — anticipated context based on patterns
|
|
14
|
+
*
|
|
15
|
+
* FEATURES:
|
|
16
|
+
* - FTS5 full-text search across all layers
|
|
17
|
+
* - Skeptical memory: verify before acting on recalled memories
|
|
18
|
+
* - Consolidation lock: prevent concurrent autoDream sessions
|
|
19
|
+
* - Decision log: track architectural/design decisions with rationale
|
|
20
|
+
* - Temporal decay: older memories get lower relevance scores
|
|
21
|
+
* - Privacy tags: mark sensitive memories for restricted access
|
|
22
|
+
*/
|
|
23
|
+
import Database from "better-sqlite3";
|
|
24
|
+
import { join } from "node:path";
|
|
25
|
+
import { mkdirSync, existsSync, writeFileSync, readFileSync, unlinkSync } from "node:fs";
|
|
26
|
+
import { randomUUID } from "node:crypto";
|
|
27
|
+
import { writeFileAtomicSyncBestEffort } from "../utils/atomic-io.js";
|
|
28
|
+
import { deriveIngestTimestamps } from "./dual-timestamp.js";
|
|
29
|
+
import { clampContextTokens, cleanContext, buildContextualChunk, buildBatchedContextualChunks, createLlmContextGenerator, } from "./contextual-embeddings.js";
|
|
30
|
+
import { fromStoreFields as palaceFromStoreFields, toStoreFields as palaceToStoreFields, isUnder as palaceIsUnder, parsePath as palaceParsePath, formatPath as palaceFormatPath, listHalls as palaceListHalls, listWings as palaceListWings, listRooms as palaceListRooms, countTree as palaceCountTree, renderTree as palaceRenderTree, } from "./mem-palace.js";
|
|
31
|
+
import { hybridFusion as rrfFusion, temporalFiltered, metadataOnly, summaryOnly, } from "./extended-search-types.js";
|
|
32
|
+
import { EntitySchema } from "./entity-types.js";
|
|
33
|
+
import { createHeuristicClassifier, resolveLatest, partitionByKind } from "./relationship-types.js";
|
|
34
|
+
import { validateDate, validateDateOrNull, } from "./bi-temporal-edges.js";
|
|
35
|
+
import { IncrementalIndexer, computeContentSha, } from "./incremental-indexer.js";
|
|
36
|
+
import { hybridSearch as hybridRetrieverSearch, createLexicalRetriever, createVectorRetriever, } from "./hybrid-retrieval.js";
|
|
37
|
+
import { MemvidBackend, } from "./memvid-backend.js";
|
|
38
|
+
import { SemanticCache, bigramEmbedding, } from "./semantic-cache.js";
|
|
39
|
+
import { MemoryBenchmark } from "./memory-benchmark.js";
|
|
40
|
+
import { MemoryToolkit, } from "./memory-tools.js";
|
|
41
|
+
import { createTEMPR, } from "./tempr.js";
|
|
42
|
+
import { createHeuristicCrossEncoder } from "./cross-encoder.js";
|
|
43
|
+
// V9 T1.3 — sqlite-vec backend (FATAL orphan). Loaded opt-in via
|
|
44
|
+
// `WOTANN_SQLITE_VEC=1` env var because the native `sqlite-vec`
|
|
45
|
+
// extension isn't bundled by default; loading is synchronous when
|
|
46
|
+
// the extension is available.
|
|
47
|
+
import { createSqliteVecBackend, isSqliteVecAvailable, } from "./sqlite-vec-backend.js";
|
|
48
|
+
// Asymmetric embedding prefixes — model-aware text shaping inspired by
|
|
49
|
+
// LightRAG's `embedding-prefixes` branch (HKUDS, merged 2026-04-26).
|
|
50
|
+
// Modern instruction-tuned encoders (BGE / Qwen3-Embedding / E5) score
|
|
51
|
+
// noticeably higher when queries get one prefix and docs get another.
|
|
52
|
+
// Gated behind `WOTANN_ASYMMETRIC_EMBEDDINGS=1` so existing un-prefixed
|
|
53
|
+
// indexes keep working unchanged. See ./embedding-profiles.ts.
|
|
54
|
+
import { applyDocPrefix, applyQueryPrefix, getEmbeddingProfile, isAsymmetricEmbeddingsEnabled, } from "./embedding-profiles.js";
|
|
55
|
+
// V9 T1.4 — ONNX cross-encoder (FATAL orphan). Session loading is
|
|
56
|
+
// async (`loadMiniLmSession`) so the member field is populated post-
|
|
57
|
+
// construction via `attachOnnxCrossEncoder()`. Baseline remains
|
|
58
|
+
// the heuristic encoder for sync callers.
|
|
59
|
+
import { createOnnxCrossEncoder, isMiniLmModelAvailable, isOnnxRuntimeAvailable, loadMiniLmSession, } from "./onnx-cross-encoder.js";
|
|
60
|
+
import { createDefaultRetrievalRegistry, } from "./retrieval-registry.js";
|
|
61
|
+
// V9 T14.2 — opt-in retrieval strategies. Each is a heavy / experimental
|
|
62
|
+
// retriever that is OFF by default; callers opt in via
|
|
63
|
+
// `registerOptionalStrategies(opts)`. The orphan modules each ship a
|
|
64
|
+
// pure function (asmr voter, Louvain community detector, persona tree
|
|
65
|
+
// builder); the wrappers below adapt them onto the RetrievalMode
|
|
66
|
+
// contract so the existing dispatch path (`searchWithMode`) drives them.
|
|
67
|
+
import { runAsmrVoter } from "./asmr-voter.js";
|
|
68
|
+
import { detectCommunities, communityOf } from "./community-detection.js";
|
|
69
|
+
import { buildPersonaTree, walkPersonaTree } from "./persona-tree.js";
|
|
70
|
+
export class MemoryStore {
|
|
71
|
+
/** MemoryProvider contract: stable identifier for the SQLite + FTS5 backend. */
|
|
72
|
+
name = "sqlite";
|
|
73
|
+
/** MemoryProvider contract: semver of the MemoryStore implementation. */
|
|
74
|
+
version = "1.0.0";
|
|
75
|
+
db;
|
|
76
|
+
dbPath;
|
|
77
|
+
/**
|
|
78
|
+
* Optional synchronous contextual-retrieval generator. When set, insert()
|
|
79
|
+
* prepends a ~50-token chunk-context to the FTS-indexed value per
|
|
80
|
+
* Anthropic's 2024 contextual retrieval (+30-50% recall on paraphrase).
|
|
81
|
+
* Pure sync — LLM-backed generators should pre-render async context and
|
|
82
|
+
* capture it in the closure. Null = disabled (honest pass-through).
|
|
83
|
+
*/
|
|
84
|
+
contextGenerator = null;
|
|
85
|
+
/** Install or clear the contextual-embedding generator used by insert(). */
|
|
86
|
+
setContextGenerator(gen) {
|
|
87
|
+
this.contextGenerator = gen;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* V9 T1.3 — Optional sqlite-vec backend for native dense-vector
|
|
91
|
+
* retrieval in TEMPR's vector channel. Null until `attachVectorBackend()`
|
|
92
|
+
* lazy-initializes it (or if the native extension isn't loadable).
|
|
93
|
+
* When non-null, `temprSearch()` uses it as the default `opts.vectorBackend`
|
|
94
|
+
* instead of the FTS5+cosine fallback.
|
|
95
|
+
*
|
|
96
|
+
* Population is the caller's responsibility — use `upsertEmbedding()`
|
|
97
|
+
* below as new entries arrive with their embeddings. See V9 T1.3 for
|
|
98
|
+
* the full persistent-index design.
|
|
99
|
+
*/
|
|
100
|
+
vectorBackend = null;
|
|
101
|
+
/**
|
|
102
|
+
* V9 T1.4 — Optional ONNX-backed cross-encoder for TEMPR rerank.
|
|
103
|
+
* Upgraded from the heuristic baseline via `attachOnnxCrossEncoder()`
|
|
104
|
+
* (async — session load is async). `temprSearch()` uses this as the
|
|
105
|
+
* default `opts.crossEncoder` when caller doesn't override.
|
|
106
|
+
*/
|
|
107
|
+
defaultCrossEncoder = createHeuristicCrossEncoder();
|
|
108
|
+
constructor(dbPath) {
|
|
109
|
+
this.dbPath = dbPath;
|
|
110
|
+
const dir = join(dbPath, "..");
|
|
111
|
+
if (!existsSync(dir)) {
|
|
112
|
+
mkdirSync(dir, { recursive: true });
|
|
113
|
+
}
|
|
114
|
+
this.db = new Database(dbPath);
|
|
115
|
+
// Wave 6.5-UU (H-21): standard PRAGMA bundle. busy_timeout = 5000 lets
|
|
116
|
+
// concurrent writers wait up to 5s for the lock instead of throwing
|
|
117
|
+
// SQLITE_BUSY immediately (the better-sqlite3 default is 0ms).
|
|
118
|
+
// synchronous = NORMAL keeps writes durable across app crashes at ~10x
|
|
119
|
+
// the throughput of FULL. foreign_keys = ON enables CASCADE.
|
|
120
|
+
this.db.pragma("busy_timeout = 5000");
|
|
121
|
+
this.db.pragma("journal_mode = WAL");
|
|
122
|
+
this.db.pragma("synchronous = NORMAL");
|
|
123
|
+
this.db.pragma("foreign_keys = ON");
|
|
124
|
+
this.db.pragma("user_version"); // read for migration check
|
|
125
|
+
this.initializeSchema();
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* MemoryProvider contract. Idempotent — schema is created in the
|
|
129
|
+
* constructor via `initializeSchema()`, so this is a no-op for
|
|
130
|
+
* already-constructed instances. Exposed for contract conformance
|
|
131
|
+
* with async backends that defer connection/table creation.
|
|
132
|
+
*/
|
|
133
|
+
initialize() {
|
|
134
|
+
// Schema already created in constructor. Re-running is safe
|
|
135
|
+
// (all DDL is IF NOT EXISTS) but unnecessary.
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* V9 T1.3 — Attach the sqlite-vec backend. Call once post-construction
|
|
139
|
+
* when the caller knows their embedding dimension. Safe to call
|
|
140
|
+
* multiple times — idempotent (attaches once). When sqlite-vec isn't
|
|
141
|
+
* available, silently keeps `vectorBackend: null` so `temprSearch`
|
|
142
|
+
* falls back to the FTS5+cosine path.
|
|
143
|
+
*
|
|
144
|
+
* @param dimensions Embedding dimension (384 for MiniLM-L-6, 768 for L-12).
|
|
145
|
+
* @param tableName Optional vec0 table name override.
|
|
146
|
+
* @returns true when the backend was attached; false on unavailability.
|
|
147
|
+
*/
|
|
148
|
+
attachVectorBackend(dimensions, tableName) {
|
|
149
|
+
if (this.vectorBackend !== null)
|
|
150
|
+
return true; // idempotent
|
|
151
|
+
if (!isSqliteVecAvailable())
|
|
152
|
+
return false;
|
|
153
|
+
try {
|
|
154
|
+
this.vectorBackend = createSqliteVecBackend({
|
|
155
|
+
db: this.db,
|
|
156
|
+
dimensions,
|
|
157
|
+
...(tableName ? { tableName } : {}),
|
|
158
|
+
});
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
// Extension loaded but table creation failed (e.g. dimension
|
|
163
|
+
// mismatch against an existing vec0 table). Honest null.
|
|
164
|
+
this.vectorBackend = null;
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* V9 T1.4 — Upgrade the default cross-encoder from heuristic to
|
|
170
|
+
* ONNX-backed MiniLM rerank. Async because `loadMiniLmSession`
|
|
171
|
+
* loads the native `onnxruntime-node` session asynchronously.
|
|
172
|
+
* Safe to call at any time — `temprSearch` reads `this.defaultCrossEncoder`
|
|
173
|
+
* per-call so the swap takes effect on the next invocation.
|
|
174
|
+
*
|
|
175
|
+
* @param modelPath Optional override for the MiniLM .onnx file.
|
|
176
|
+
* @returns true when ONNX was attached; false when runtime/model absent.
|
|
177
|
+
*/
|
|
178
|
+
async attachOnnxCrossEncoder(modelPath) {
|
|
179
|
+
if (!isOnnxRuntimeAvailable() || !isMiniLmModelAvailable(modelPath)) {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
try {
|
|
183
|
+
const session = await loadMiniLmSession(modelPath);
|
|
184
|
+
if (!session)
|
|
185
|
+
return false;
|
|
186
|
+
this.defaultCrossEncoder = createOnnxCrossEncoder({ session });
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
catch {
|
|
190
|
+
// Keep the heuristic baseline on any ONNX failure.
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* V9 T1.3 companion — push an embedding into the vec0 index for a
|
|
196
|
+
* given memory entry. No-op when the backend isn't attached. Caller
|
|
197
|
+
* generates the embedding using its chosen embedder so the store
|
|
198
|
+
* doesn't pull an embedder dependency. Idempotent on duplicate id.
|
|
199
|
+
*
|
|
200
|
+
* Asymmetric-prefix port (LightRAG `embedding-prefixes`): the caller
|
|
201
|
+
* is responsible for applying the doc prefix BEFORE generating the
|
|
202
|
+
* vector. A typical wiring looks like:
|
|
203
|
+
*
|
|
204
|
+
* import { applyDocPrefix, getEmbeddingProfile,
|
|
205
|
+
* isAsymmetricEmbeddingsEnabled } from "./embedding-profiles.js";
|
|
206
|
+
* const profile = isAsymmetricEmbeddingsEnabled()
|
|
207
|
+
* ? getEmbeddingProfile(modelName)
|
|
208
|
+
* : null;
|
|
209
|
+
* const vec = await embed(applyDocPrefix(profile, entry.value));
|
|
210
|
+
* store.upsertEmbedding(entry.id, vec);
|
|
211
|
+
*
|
|
212
|
+
* NOTE: turning the env-var gate ON for an existing index that was
|
|
213
|
+
* built without prefixes will skew similarity scores at query time.
|
|
214
|
+
* Rebuild the vec_embeddings table after enabling. See
|
|
215
|
+
* embedding-profiles.ts header for the full rationale.
|
|
216
|
+
*/
|
|
217
|
+
upsertEmbedding(id, vector) {
|
|
218
|
+
if (!this.vectorBackend)
|
|
219
|
+
return false;
|
|
220
|
+
try {
|
|
221
|
+
this.vectorBackend.upsert(id, vector);
|
|
222
|
+
return true;
|
|
223
|
+
}
|
|
224
|
+
catch {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Accessor for the attached vectorBackend (null when not attached).
|
|
230
|
+
* Used by TEMPR-aware callers to pass `opts.vectorBackend` explicitly
|
|
231
|
+
* OR to confirm availability before generating an embedding. See
|
|
232
|
+
* `temprSearch()` for default-injection behavior.
|
|
233
|
+
*/
|
|
234
|
+
getVectorBackend() {
|
|
235
|
+
return this.vectorBackend;
|
|
236
|
+
}
|
|
237
|
+
/** Accessor for the default cross-encoder. Callers can override via
|
|
238
|
+
* `temprSearch`'s `opts.crossEncoder`. */
|
|
239
|
+
getDefaultCrossEncoder() {
|
|
240
|
+
return this.defaultCrossEncoder;
|
|
241
|
+
}
|
|
242
|
+
initializeSchema() {
|
|
243
|
+
this.db.exec(`
|
|
244
|
+
CREATE TABLE IF NOT EXISTS memory_entries (
|
|
245
|
+
id TEXT PRIMARY KEY,
|
|
246
|
+
layer TEXT NOT NULL,
|
|
247
|
+
block_type TEXT NOT NULL,
|
|
248
|
+
key TEXT NOT NULL,
|
|
249
|
+
value TEXT NOT NULL,
|
|
250
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
251
|
+
updated_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
252
|
+
session_id TEXT,
|
|
253
|
+
verified INTEGER NOT NULL DEFAULT 0,
|
|
254
|
+
archived INTEGER NOT NULL DEFAULT 0,
|
|
255
|
+
confidence REAL DEFAULT 1.0,
|
|
256
|
+
tags TEXT DEFAULT '',
|
|
257
|
+
access_count INTEGER DEFAULT 0,
|
|
258
|
+
last_accessed TEXT,
|
|
259
|
+
source_type TEXT DEFAULT 'auto_capture',
|
|
260
|
+
source_file TEXT,
|
|
261
|
+
source_command TEXT,
|
|
262
|
+
verified_at TEXT,
|
|
263
|
+
verified_by TEXT,
|
|
264
|
+
freshness_score REAL NOT NULL DEFAULT 1.0,
|
|
265
|
+
confidence_level REAL NOT NULL DEFAULT 0.5,
|
|
266
|
+
last_verified_at TEXT,
|
|
267
|
+
verification_status TEXT NOT NULL DEFAULT 'unverified',
|
|
268
|
+
domain TEXT NOT NULL DEFAULT '',
|
|
269
|
+
topic TEXT NOT NULL DEFAULT ''
|
|
270
|
+
);
|
|
271
|
+
|
|
272
|
+
CREATE INDEX IF NOT EXISTS idx_memory_layer ON memory_entries(layer);
|
|
273
|
+
CREATE INDEX IF NOT EXISTS idx_memory_block ON memory_entries(block_type);
|
|
274
|
+
CREATE INDEX IF NOT EXISTS idx_memory_key ON memory_entries(key);
|
|
275
|
+
CREATE INDEX IF NOT EXISTS idx_memory_session ON memory_entries(session_id);
|
|
276
|
+
|
|
277
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS memory_fts USING fts5(
|
|
278
|
+
key, value,
|
|
279
|
+
content='memory_entries',
|
|
280
|
+
content_rowid='rowid'
|
|
281
|
+
);
|
|
282
|
+
|
|
283
|
+
CREATE TRIGGER IF NOT EXISTS memory_ai AFTER INSERT ON memory_entries BEGIN
|
|
284
|
+
INSERT INTO memory_fts(rowid, key, value) VALUES (new.rowid, new.key, new.value);
|
|
285
|
+
END;
|
|
286
|
+
CREATE TRIGGER IF NOT EXISTS memory_au AFTER UPDATE ON memory_entries BEGIN
|
|
287
|
+
INSERT INTO memory_fts(memory_fts, rowid, key, value) VALUES('delete', old.rowid, old.key, old.value);
|
|
288
|
+
INSERT INTO memory_fts(rowid, key, value) VALUES (new.rowid, new.key, new.value);
|
|
289
|
+
END;
|
|
290
|
+
CREATE TRIGGER IF NOT EXISTS memory_ad AFTER DELETE ON memory_entries BEGIN
|
|
291
|
+
INSERT INTO memory_fts(memory_fts, rowid, key, value) VALUES('delete', old.rowid, old.key, old.value);
|
|
292
|
+
END;
|
|
293
|
+
|
|
294
|
+
CREATE TABLE IF NOT EXISTS knowledge_nodes (
|
|
295
|
+
id TEXT PRIMARY KEY,
|
|
296
|
+
entity TEXT NOT NULL,
|
|
297
|
+
entity_type TEXT NOT NULL,
|
|
298
|
+
properties TEXT DEFAULT '{}',
|
|
299
|
+
valid_from TEXT NOT NULL DEFAULT (datetime('now')),
|
|
300
|
+
valid_to TEXT,
|
|
301
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
302
|
+
);
|
|
303
|
+
CREATE TABLE IF NOT EXISTS knowledge_edges (
|
|
304
|
+
id TEXT PRIMARY KEY,
|
|
305
|
+
source_id TEXT NOT NULL REFERENCES knowledge_nodes(id),
|
|
306
|
+
target_id TEXT NOT NULL REFERENCES knowledge_nodes(id),
|
|
307
|
+
relation TEXT NOT NULL,
|
|
308
|
+
weight REAL NOT NULL DEFAULT 1.0,
|
|
309
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
310
|
+
);
|
|
311
|
+
CREATE INDEX IF NOT EXISTS idx_kg_entity ON knowledge_nodes(entity);
|
|
312
|
+
CREATE INDEX IF NOT EXISTS idx_kg_edges_src ON knowledge_edges(source_id);
|
|
313
|
+
CREATE INDEX IF NOT EXISTS idx_kg_edges_tgt ON knowledge_edges(target_id);
|
|
314
|
+
|
|
315
|
+
CREATE TABLE IF NOT EXISTS team_memory (
|
|
316
|
+
id TEXT PRIMARY KEY,
|
|
317
|
+
agent_id TEXT NOT NULL,
|
|
318
|
+
key TEXT NOT NULL,
|
|
319
|
+
value TEXT NOT NULL,
|
|
320
|
+
shared INTEGER NOT NULL DEFAULT 1,
|
|
321
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
322
|
+
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
323
|
+
);
|
|
324
|
+
CREATE INDEX IF NOT EXISTS idx_team_agent ON team_memory(agent_id);
|
|
325
|
+
|
|
326
|
+
CREATE TABLE IF NOT EXISTS working_memory (
|
|
327
|
+
id TEXT PRIMARY KEY,
|
|
328
|
+
session_id TEXT NOT NULL,
|
|
329
|
+
key TEXT NOT NULL,
|
|
330
|
+
value TEXT NOT NULL,
|
|
331
|
+
importance REAL NOT NULL DEFAULT 0.5,
|
|
332
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
333
|
+
expires_at TEXT
|
|
334
|
+
);
|
|
335
|
+
CREATE INDEX IF NOT EXISTS idx_working_session ON working_memory(session_id);
|
|
336
|
+
|
|
337
|
+
CREATE TABLE IF NOT EXISTS decision_log (
|
|
338
|
+
id TEXT PRIMARY KEY,
|
|
339
|
+
decision TEXT NOT NULL,
|
|
340
|
+
rationale TEXT NOT NULL,
|
|
341
|
+
alternatives TEXT,
|
|
342
|
+
constraints TEXT,
|
|
343
|
+
stakeholders TEXT,
|
|
344
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
345
|
+
session_id TEXT
|
|
346
|
+
);
|
|
347
|
+
|
|
348
|
+
CREATE TABLE IF NOT EXISTS auto_capture (
|
|
349
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
350
|
+
event_type TEXT NOT NULL,
|
|
351
|
+
tool_name TEXT,
|
|
352
|
+
content TEXT NOT NULL,
|
|
353
|
+
session_id TEXT,
|
|
354
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
355
|
+
);
|
|
356
|
+
CREATE INDEX IF NOT EXISTS idx_capture_session ON auto_capture(session_id);
|
|
357
|
+
|
|
358
|
+
CREATE TABLE IF NOT EXISTS verbatim_drawers (
|
|
359
|
+
id TEXT PRIMARY KEY,
|
|
360
|
+
entry_id TEXT REFERENCES memory_entries(id) ON DELETE SET NULL,
|
|
361
|
+
raw_content TEXT NOT NULL,
|
|
362
|
+
content_type TEXT NOT NULL DEFAULT 'conversation',
|
|
363
|
+
session_id TEXT,
|
|
364
|
+
domain TEXT NOT NULL DEFAULT '',
|
|
365
|
+
topic TEXT NOT NULL DEFAULT '',
|
|
366
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
367
|
+
);
|
|
368
|
+
CREATE INDEX IF NOT EXISTS idx_verbatim_entry ON verbatim_drawers(entry_id);
|
|
369
|
+
CREATE INDEX IF NOT EXISTS idx_verbatim_session ON verbatim_drawers(session_id);
|
|
370
|
+
CREATE INDEX IF NOT EXISTS idx_verbatim_domain ON verbatim_drawers(domain, topic);
|
|
371
|
+
|
|
372
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS verbatim_fts USING fts5(
|
|
373
|
+
raw_content,
|
|
374
|
+
content='verbatim_drawers',
|
|
375
|
+
content_rowid='rowid'
|
|
376
|
+
);
|
|
377
|
+
|
|
378
|
+
CREATE TRIGGER IF NOT EXISTS verbatim_ai AFTER INSERT ON verbatim_drawers BEGIN
|
|
379
|
+
INSERT INTO verbatim_fts(rowid, raw_content) VALUES (new.rowid, new.raw_content);
|
|
380
|
+
END;
|
|
381
|
+
CREATE TRIGGER IF NOT EXISTS verbatim_au AFTER UPDATE ON verbatim_drawers BEGIN
|
|
382
|
+
INSERT INTO verbatim_fts(verbatim_fts, rowid, raw_content) VALUES('delete', old.rowid, old.raw_content);
|
|
383
|
+
INSERT INTO verbatim_fts(rowid, raw_content) VALUES (new.rowid, new.raw_content);
|
|
384
|
+
END;
|
|
385
|
+
CREATE TRIGGER IF NOT EXISTS verbatim_ad AFTER DELETE ON verbatim_drawers BEGIN
|
|
386
|
+
INSERT INTO verbatim_fts(verbatim_fts, rowid, raw_content) VALUES('delete', old.rowid, old.raw_content);
|
|
387
|
+
END;
|
|
388
|
+
|
|
389
|
+
CREATE TABLE IF NOT EXISTS memory_vectors (
|
|
390
|
+
entry_id TEXT PRIMARY KEY REFERENCES memory_entries(id) ON DELETE CASCADE,
|
|
391
|
+
embedding BLOB NOT NULL,
|
|
392
|
+
model TEXT NOT NULL DEFAULT 'local-trigram',
|
|
393
|
+
dimensions INTEGER NOT NULL DEFAULT 0,
|
|
394
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
395
|
+
);
|
|
396
|
+
CREATE INDEX IF NOT EXISTS idx_vectors_model ON memory_vectors(model);
|
|
397
|
+
|
|
398
|
+
CREATE TABLE IF NOT EXISTS memory_provenance_log (
|
|
399
|
+
id TEXT PRIMARY KEY,
|
|
400
|
+
entry_id TEXT NOT NULL REFERENCES memory_entries(id) ON DELETE CASCADE,
|
|
401
|
+
action TEXT NOT NULL,
|
|
402
|
+
old_value TEXT,
|
|
403
|
+
new_value TEXT,
|
|
404
|
+
actor TEXT,
|
|
405
|
+
reason TEXT,
|
|
406
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
407
|
+
);
|
|
408
|
+
CREATE INDEX IF NOT EXISTS idx_provenance_entry ON memory_provenance_log(entry_id);
|
|
409
|
+
CREATE INDEX IF NOT EXISTS idx_memory_source_type ON memory_entries(source_type);
|
|
410
|
+
CREATE INDEX IF NOT EXISTS idx_memory_source_file ON memory_entries(source_file);
|
|
411
|
+
`);
|
|
412
|
+
// ── Domain-Partitioned Search Migration (MemPalace R1) ──
|
|
413
|
+
// Add domain/topic columns for existing databases. +34% retrieval improvement
|
|
414
|
+
// from metadata filtering before FTS5 search (MemPalace: 60.9% → 94.8%).
|
|
415
|
+
this.migrateAddColumn("memory_entries", "domain", "TEXT NOT NULL DEFAULT ''");
|
|
416
|
+
this.migrateAddColumn("memory_entries", "topic", "TEXT NOT NULL DEFAULT ''");
|
|
417
|
+
this.db.prepare(`CREATE INDEX IF NOT EXISTS idx_memory_domain ON memory_entries(domain)`).run();
|
|
418
|
+
this.db.prepare(`CREATE INDEX IF NOT EXISTS idx_memory_topic ON memory_entries(topic)`).run();
|
|
419
|
+
this.db
|
|
420
|
+
.prepare(`CREATE INDEX IF NOT EXISTS idx_memory_domain_topic ON memory_entries(domain, topic)`)
|
|
421
|
+
.run();
|
|
422
|
+
// ── Auto-Capture Consolidation Tracking (Phase B Bug #1 fix) ──
|
|
423
|
+
// Without this column, every consolidation pass would re-process all
|
|
424
|
+
// auto_capture rows and create duplicate memory_entries. The column
|
|
425
|
+
// records the ISO-timestamp when a row was routed into the structured
|
|
426
|
+
// tables (memory_entries / decision_log / etc.). NULL = not yet
|
|
427
|
+
// consolidated.
|
|
428
|
+
this.migrateAddColumn("auto_capture", "consolidated_at", "TEXT");
|
|
429
|
+
this.db
|
|
430
|
+
.prepare(`CREATE INDEX IF NOT EXISTS idx_capture_consolidated ON auto_capture(consolidated_at)`)
|
|
431
|
+
.run();
|
|
432
|
+
// ── Temporal Validity Migration (MemPalace R2) ──
|
|
433
|
+
// Add valid_from/valid_to to knowledge_edges for bi-temporal fact queries.
|
|
434
|
+
this.migrateAddColumn("knowledge_edges", "valid_from", "TEXT NOT NULL DEFAULT (datetime('now'))");
|
|
435
|
+
this.migrateAddColumn("knowledge_edges", "valid_to", "TEXT");
|
|
436
|
+
this.db
|
|
437
|
+
.prepare(`CREATE INDEX IF NOT EXISTS idx_kg_edges_temporal ON knowledge_edges(valid_from, valid_to)`)
|
|
438
|
+
.run();
|
|
439
|
+
// ── Bi-Temporal Ingest Axis Migration (Phase 2 P1-M5, Zep/Graphiti port) ──
|
|
440
|
+
// Adds the SECOND time axis to knowledge_edges. The knowledge-time
|
|
441
|
+
// axis (valid_from/valid_to) was wired in M7; this migration adds
|
|
442
|
+
// the ingest-time axis (recorded_from/recorded_to) so callers can
|
|
443
|
+
// answer "what did WOTANN know about X on date Y?". Legacy rows
|
|
444
|
+
// default recorded_from = created_at so they behave as if inserted
|
|
445
|
+
// at creation time; recorded_to stays null (still known). This is
|
|
446
|
+
// non-breaking — existing readers (getActiveEdgesAt, etc.) ignore
|
|
447
|
+
// the new columns.
|
|
448
|
+
this.migrateAddColumn("knowledge_edges", "recorded_from", "TEXT NOT NULL DEFAULT (datetime('now'))");
|
|
449
|
+
this.migrateAddColumn("knowledge_edges", "recorded_to", "TEXT");
|
|
450
|
+
this.db
|
|
451
|
+
.prepare(`CREATE INDEX IF NOT EXISTS idx_kg_edges_recorded ON knowledge_edges(recorded_from, recorded_to)`)
|
|
452
|
+
.run();
|
|
453
|
+
// Back-fill legacy rows: set recorded_from = created_at where the
|
|
454
|
+
// ALTER TABLE default (datetime('now')) would otherwise stamp the
|
|
455
|
+
// migration time, not the original insert time. Only touches rows
|
|
456
|
+
// where recorded_from is equal to the default we just added (i.e.
|
|
457
|
+
// the ones we can't distinguish from genuine inserts). Safe because
|
|
458
|
+
// we only update when the stored value exceeds created_at — i.e.
|
|
459
|
+
// this row was materialized BEFORE the migration.
|
|
460
|
+
this.db
|
|
461
|
+
.prepare(`UPDATE knowledge_edges
|
|
462
|
+
SET recorded_from = created_at
|
|
463
|
+
WHERE recorded_from > created_at`)
|
|
464
|
+
.run();
|
|
465
|
+
// ── Dual-Timestamp Migration (Phase H Task 1) ──
|
|
466
|
+
// Records both WHEN the memory was written (document_date) and WHEN
|
|
467
|
+
// the referenced event happened (event_date). Enables queries like
|
|
468
|
+
// "what did we say last week about last year's launch?". Legacy rows
|
|
469
|
+
// leave event_date_source='' so readers can distinguish them from
|
|
470
|
+
// honestly-fallback rows.
|
|
471
|
+
this.migrateAddColumn("memory_entries", "document_date", "INTEGER");
|
|
472
|
+
this.migrateAddColumn("memory_entries", "event_date", "INTEGER");
|
|
473
|
+
this.migrateAddColumn("memory_entries", "event_date_uncertainty_ms", "INTEGER");
|
|
474
|
+
this.migrateAddColumn("memory_entries", "event_date_source", "TEXT NOT NULL DEFAULT ''");
|
|
475
|
+
this.db
|
|
476
|
+
.prepare(`CREATE INDEX IF NOT EXISTS idx_memory_event_date ON memory_entries(event_date)`)
|
|
477
|
+
.run();
|
|
478
|
+
this.db
|
|
479
|
+
.prepare(`CREATE INDEX IF NOT EXISTS idx_memory_document_date ON memory_entries(document_date)`)
|
|
480
|
+
.run();
|
|
481
|
+
// ── Typed Relationships Migration (Phase H Task 2) ──
|
|
482
|
+
// Typed edges between memory_entries with a kind in
|
|
483
|
+
// {updates,extends,derives,unknown}. Lets us answer "what is the
|
|
484
|
+
// CURRENT policy?" by walking updates forward from the root.
|
|
485
|
+
this.db
|
|
486
|
+
.prepare(`CREATE TABLE IF NOT EXISTS memory_relationships (
|
|
487
|
+
id TEXT PRIMARY KEY,
|
|
488
|
+
from_id TEXT NOT NULL,
|
|
489
|
+
to_id TEXT NOT NULL,
|
|
490
|
+
kind TEXT NOT NULL,
|
|
491
|
+
confidence REAL NOT NULL DEFAULT 0.5,
|
|
492
|
+
rationale TEXT,
|
|
493
|
+
invalidated_at INTEGER,
|
|
494
|
+
created_at INTEGER NOT NULL
|
|
495
|
+
)`)
|
|
496
|
+
.run();
|
|
497
|
+
this.db
|
|
498
|
+
.prepare(`CREATE INDEX IF NOT EXISTS idx_memrel_from ON memory_relationships(from_id)`)
|
|
499
|
+
.run();
|
|
500
|
+
this.db
|
|
501
|
+
.prepare(`CREATE INDEX IF NOT EXISTS idx_memrel_to ON memory_relationships(to_id)`)
|
|
502
|
+
.run();
|
|
503
|
+
this.db
|
|
504
|
+
.prepare(`CREATE INDEX IF NOT EXISTS idx_memrel_kind ON memory_relationships(kind)`)
|
|
505
|
+
.run();
|
|
506
|
+
}
|
|
507
|
+
/** @internal Migration helper — ONLY called with hardcoded literals.
|
|
508
|
+
*
|
|
509
|
+
* Wave 6.5-UU (H-23) — wrap PRAGMA + ALTER inside an explicit transaction
|
|
510
|
+
* so a SIGKILL between the existence check and the column add can't
|
|
511
|
+
* leave the DB half-migrated (column added but no committed marker).
|
|
512
|
+
* SQLite is internally transactional per-statement, but the *combination*
|
|
513
|
+
* of PRAGMA table_info + ALTER TABLE is not — without the transaction
|
|
514
|
+
* wrapper a crash between the two could let the next call see an
|
|
515
|
+
* already-added column and skip a follow-up step that depends on the
|
|
516
|
+
* write being committed end-to-end.
|
|
517
|
+
*
|
|
518
|
+
* Identifier validation runs BEFORE entering the transaction so a bad
|
|
519
|
+
* identifier doesn't open and immediately roll back a tx for nothing.
|
|
520
|
+
*/
|
|
521
|
+
migrateAddColumn(table, column, definition) {
|
|
522
|
+
// Validate inputs match safe identifier patterns
|
|
523
|
+
const SAFE_IDENTIFIER = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
|
524
|
+
if (!SAFE_IDENTIFIER.test(table) || !SAFE_IDENTIFIER.test(column)) {
|
|
525
|
+
throw new Error(`Invalid SQL identifier: table="${table}", column="${column}"`);
|
|
526
|
+
}
|
|
527
|
+
// Definition can include type + constraints but must not contain semicolons or comments
|
|
528
|
+
if (/[;]|--/.test(definition)) {
|
|
529
|
+
throw new Error(`Invalid column definition: "${definition}"`);
|
|
530
|
+
}
|
|
531
|
+
this.db.transaction(() => {
|
|
532
|
+
const cols = this.db.prepare(`PRAGMA table_info(${table})`).all();
|
|
533
|
+
if (!cols.some((c) => c.name === column)) {
|
|
534
|
+
this.db.prepare(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`).run();
|
|
535
|
+
}
|
|
536
|
+
})();
|
|
537
|
+
}
|
|
538
|
+
// ── Layer 1: Auto-Capture ──────────────────────────────────
|
|
539
|
+
captureEvent(eventType, content, toolName, sessionId) {
|
|
540
|
+
this.db
|
|
541
|
+
.prepare(`
|
|
542
|
+
INSERT INTO auto_capture (event_type, tool_name, content, session_id) VALUES (?, ?, ?, ?)
|
|
543
|
+
`)
|
|
544
|
+
.run(eventType, toolName ?? null, content.slice(0, 2000), sessionId ?? null);
|
|
545
|
+
}
|
|
546
|
+
getRecentCaptures(sessionId, limit = 20) {
|
|
547
|
+
return this.db
|
|
548
|
+
.prepare(`
|
|
549
|
+
SELECT * FROM auto_capture WHERE session_id = ? ORDER BY created_at DESC LIMIT ?
|
|
550
|
+
`)
|
|
551
|
+
.all(sessionId, limit);
|
|
552
|
+
}
|
|
553
|
+
getAutoCaptureEntries(limit = 50, sessionId) {
|
|
554
|
+
const rows = sessionId
|
|
555
|
+
? this.db
|
|
556
|
+
.prepare(`
|
|
557
|
+
SELECT * FROM auto_capture WHERE session_id = ? ORDER BY created_at DESC LIMIT ?
|
|
558
|
+
`)
|
|
559
|
+
.all(sessionId, limit)
|
|
560
|
+
: this.db
|
|
561
|
+
.prepare(`
|
|
562
|
+
SELECT * FROM auto_capture ORDER BY created_at DESC LIMIT ?
|
|
563
|
+
`)
|
|
564
|
+
.all(limit);
|
|
565
|
+
return rows.map((row) => ({
|
|
566
|
+
id: Number(row["id"] ?? 0),
|
|
567
|
+
eventType: row["event_type"],
|
|
568
|
+
toolName: row["tool_name"],
|
|
569
|
+
content: row["content"],
|
|
570
|
+
sessionId: row["session_id"],
|
|
571
|
+
createdAt: row["created_at"],
|
|
572
|
+
}));
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Return auto_capture entries that have NOT yet been routed into the
|
|
576
|
+
* structured memory_entries / decision_log tables. Phase B Bug #1 fix.
|
|
577
|
+
*
|
|
578
|
+
* Consolidation uses `consolidated_at IS NULL` as the work-queue marker.
|
|
579
|
+
* Once a row has been processed by `consolidateAutoCaptures()`, its
|
|
580
|
+
* `consolidated_at` is stamped with the current ISO-8601 timestamp so
|
|
581
|
+
* it won't be re-read on the next pass.
|
|
582
|
+
*/
|
|
583
|
+
getUnconsolidatedAutoCaptures(limit = 500) {
|
|
584
|
+
const rows = this.db
|
|
585
|
+
.prepare(`
|
|
586
|
+
SELECT * FROM auto_capture
|
|
587
|
+
WHERE consolidated_at IS NULL
|
|
588
|
+
ORDER BY created_at ASC
|
|
589
|
+
LIMIT ?
|
|
590
|
+
`)
|
|
591
|
+
.all(limit);
|
|
592
|
+
return rows.map((row) => ({
|
|
593
|
+
id: Number(row["id"] ?? 0),
|
|
594
|
+
eventType: row["event_type"],
|
|
595
|
+
toolName: row["tool_name"],
|
|
596
|
+
content: row["content"],
|
|
597
|
+
sessionId: row["session_id"],
|
|
598
|
+
createdAt: row["created_at"],
|
|
599
|
+
}));
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Mark a set of auto_capture rows as consolidated. Called by
|
|
603
|
+
* `consolidateAutoCaptures()` once their observations have been inserted
|
|
604
|
+
* into `memory_entries` / `decision_log`. Idempotent.
|
|
605
|
+
*/
|
|
606
|
+
markAutoCapturesConsolidated(ids) {
|
|
607
|
+
if (ids.length === 0)
|
|
608
|
+
return;
|
|
609
|
+
const placeholders = ids.map(() => "?").join(",");
|
|
610
|
+
const stmt = this.db.prepare(`UPDATE auto_capture SET consolidated_at = datetime('now')
|
|
611
|
+
WHERE id IN (${placeholders}) AND consolidated_at IS NULL`);
|
|
612
|
+
stmt.run(...ids);
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* Route unconsolidated auto_capture rows into structured memory tables
|
|
616
|
+
* (memory_entries + decision_log). Phase B Bug #1 fix.
|
|
617
|
+
*
|
|
618
|
+
* Bug: `.wotann/memory.db` showed 1,990 rows in `auto_capture` but 0
|
|
619
|
+
* in `memory_entries`, `knowledge_nodes`, and `decision_log` — every
|
|
620
|
+
* observation was silently dumped into the raw capture table with no
|
|
621
|
+
* structured routing. Session-end extraction ran from
|
|
622
|
+
* `session.messages` (not from the DB), so daemon lifecycle events
|
|
623
|
+
* never produced structured entries.
|
|
624
|
+
*
|
|
625
|
+
* This method reads from the auto_capture table itself, runs each row
|
|
626
|
+
* through the caller-supplied extractor (normally
|
|
627
|
+
* `ObservationExtractor.extractFromCaptures`), maps the observation
|
|
628
|
+
* type to the right MemoryBlockType, and inserts into memory_entries.
|
|
629
|
+
* Decisions are ALSO mirrored into decision_log for the decision
|
|
630
|
+
* ledger.
|
|
631
|
+
*
|
|
632
|
+
* Classification failures (row content matches no pattern) emit a
|
|
633
|
+
* `classification_failed` event via the optional callback — never
|
|
634
|
+
* silently swallowed. Quality bar from feedback_wotann_quality_bars.
|
|
635
|
+
*
|
|
636
|
+
* @returns a report: how many routed per bucket + how many failed classification.
|
|
637
|
+
*/
|
|
638
|
+
consolidateAutoCaptures(extractFn, options) {
|
|
639
|
+
const batchSize = options?.batchSize ?? 500;
|
|
640
|
+
const entries = this.getUnconsolidatedAutoCaptures(batchSize);
|
|
641
|
+
if (entries.length === 0) {
|
|
642
|
+
return {
|
|
643
|
+
read: 0,
|
|
644
|
+
routed: 0,
|
|
645
|
+
byBlock: {},
|
|
646
|
+
classificationFailed: 0,
|
|
647
|
+
decisionLogged: 0,
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
let observations;
|
|
651
|
+
try {
|
|
652
|
+
observations = extractFn(entries);
|
|
653
|
+
}
|
|
654
|
+
catch (err) {
|
|
655
|
+
// Extractor crash — surface to caller via callback (honest stub, not
|
|
656
|
+
// silent success — feedback_wotann_quality_bars_session2). Mark NONE
|
|
657
|
+
// consolidated so the next pass can retry when the extractor is fixed.
|
|
658
|
+
options?.onClassificationFailed?.(entries[0], `extractor_crash:${err.message}`);
|
|
659
|
+
throw err;
|
|
660
|
+
}
|
|
661
|
+
const covered = new Set();
|
|
662
|
+
const byBlock = {};
|
|
663
|
+
let decisionLogged = 0;
|
|
664
|
+
// Phase 1: insert into memory_entries for every extracted observation.
|
|
665
|
+
// Wrapped in a transaction so a later SQL failure rolls back the whole
|
|
666
|
+
// batch — we don't want a half-routed pass where some rows are marked
|
|
667
|
+
// consolidated but their memory_entries never made it.
|
|
668
|
+
const insertTx = this.db.transaction(() => {
|
|
669
|
+
for (const obs of observations) {
|
|
670
|
+
const blockType = this.observationTypeToBlockType(obs.type);
|
|
671
|
+
byBlock[blockType] = (byBlock[blockType] ?? 0) + 1;
|
|
672
|
+
const sessionId = entries.find((e) => obs.sourceIds.includes(e.id))?.sessionId;
|
|
673
|
+
this.insert({
|
|
674
|
+
id: randomUUID(),
|
|
675
|
+
layer: "working",
|
|
676
|
+
blockType,
|
|
677
|
+
key: `${obs.type}:${obs.assertion.slice(0, 80)}`,
|
|
678
|
+
value: obs.assertion,
|
|
679
|
+
sessionId,
|
|
680
|
+
verified: false,
|
|
681
|
+
freshnessScore: 1.0,
|
|
682
|
+
confidenceLevel: obs.confidence,
|
|
683
|
+
verificationStatus: "unverified",
|
|
684
|
+
tags: `consolidated,${obs.type}`,
|
|
685
|
+
domain: obs.domain ?? "",
|
|
686
|
+
topic: obs.topic ?? "",
|
|
687
|
+
});
|
|
688
|
+
// Decisions ALSO flow into the decision_log (bi-temporal ledger).
|
|
689
|
+
if (obs.type === "decision") {
|
|
690
|
+
this.db
|
|
691
|
+
.prepare(`INSERT INTO decision_log (id, decision, rationale, alternatives, constraints, stakeholders, session_id)
|
|
692
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)`)
|
|
693
|
+
.run(randomUUID(), obs.assertion.slice(0, 500), `auto-consolidated from ${obs.sourceIds.length} capture(s)`, null, null, null, sessionId ?? null);
|
|
694
|
+
decisionLogged++;
|
|
695
|
+
}
|
|
696
|
+
for (const sid of obs.sourceIds)
|
|
697
|
+
covered.add(sid);
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
insertTx();
|
|
701
|
+
// Phase 2: mark all auto_capture rows that fed into an observation as
|
|
702
|
+
// consolidated, AND mark uncovered rows as consolidated-but-unclassified
|
|
703
|
+
// so we don't re-visit them every tick. Emit classification_failed for
|
|
704
|
+
// those so the caller can log/alert.
|
|
705
|
+
const coveredIds = [...covered];
|
|
706
|
+
this.markAutoCapturesConsolidated(coveredIds);
|
|
707
|
+
const unclassified = entries.filter((e) => !covered.has(e.id));
|
|
708
|
+
if (unclassified.length > 0 && options?.onClassificationFailed) {
|
|
709
|
+
for (const entry of unclassified) {
|
|
710
|
+
options.onClassificationFailed(entry, "no_pattern_matched");
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
// Mark unclassified as consolidated too — they've had their chance.
|
|
714
|
+
// Without this, the queue grows unbounded and every pass re-examines
|
|
715
|
+
// the same junk. The `onClassificationFailed` callback above gives
|
|
716
|
+
// observability without keeping them in the work queue forever.
|
|
717
|
+
this.markAutoCapturesConsolidated(unclassified.map((e) => e.id));
|
|
718
|
+
return {
|
|
719
|
+
read: entries.length,
|
|
720
|
+
routed: covered.size,
|
|
721
|
+
byBlock,
|
|
722
|
+
classificationFailed: unclassified.length,
|
|
723
|
+
decisionLogged,
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
/** Map observation type to the right memory block. Isolated for testability. */
|
|
727
|
+
observationTypeToBlockType(type) {
|
|
728
|
+
switch (type) {
|
|
729
|
+
case "decision":
|
|
730
|
+
return "decisions";
|
|
731
|
+
case "preference":
|
|
732
|
+
return "feedback";
|
|
733
|
+
case "milestone":
|
|
734
|
+
return "project";
|
|
735
|
+
case "problem":
|
|
736
|
+
return "issues";
|
|
737
|
+
case "discovery":
|
|
738
|
+
return "cases";
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
// ── Verbatim Drawers (MemPalace R6) ────────────────────────
|
|
742
|
+
// Stores raw conversation chunks alongside structured blocks.
|
|
743
|
+
// Search against summaries, return originals — how MemPalace gets 96.6% recall.
|
|
744
|
+
/** Store a raw verbatim chunk, optionally linked to a structured memory entry. */
|
|
745
|
+
storeVerbatim(rawContent, options) {
|
|
746
|
+
const id = randomUUID();
|
|
747
|
+
this.db
|
|
748
|
+
.prepare(`
|
|
749
|
+
INSERT INTO verbatim_drawers (id, entry_id, raw_content, content_type, session_id, domain, topic)
|
|
750
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
751
|
+
`)
|
|
752
|
+
.run(id, options?.entryId ?? null, rawContent, options?.contentType ?? "conversation", options?.sessionId ?? null, options?.domain ?? "", options?.topic ?? "");
|
|
753
|
+
return id;
|
|
754
|
+
}
|
|
755
|
+
/** Search verbatim drawers via FTS5. Returns raw content with match scores. */
|
|
756
|
+
searchVerbatim(query, limit = 10) {
|
|
757
|
+
const rows = this.db
|
|
758
|
+
.prepare(`
|
|
759
|
+
SELECT vd.*, rank AS score
|
|
760
|
+
FROM verbatim_fts
|
|
761
|
+
JOIN verbatim_drawers vd ON vd.rowid = verbatim_fts.rowid
|
|
762
|
+
WHERE verbatim_fts MATCH ?
|
|
763
|
+
ORDER BY rank LIMIT ?
|
|
764
|
+
`)
|
|
765
|
+
.all(query, limit);
|
|
766
|
+
return rows.map((r) => ({
|
|
767
|
+
id: r["id"],
|
|
768
|
+
rawContent: r["raw_content"],
|
|
769
|
+
entryId: r["entry_id"] ?? null,
|
|
770
|
+
score: r["score"] ?? 0,
|
|
771
|
+
domain: r["domain"] ?? "",
|
|
772
|
+
topic: r["topic"] ?? "",
|
|
773
|
+
}));
|
|
774
|
+
}
|
|
775
|
+
/** Get the raw verbatim content linked to a structured memory entry. */
|
|
776
|
+
getVerbatimForEntry(entryId) {
|
|
777
|
+
const rows = this.db
|
|
778
|
+
.prepare(`
|
|
779
|
+
SELECT id, raw_content, content_type FROM verbatim_drawers WHERE entry_id = ? ORDER BY created_at DESC
|
|
780
|
+
`)
|
|
781
|
+
.all(entryId);
|
|
782
|
+
return rows.map((r) => ({
|
|
783
|
+
id: r["id"],
|
|
784
|
+
rawContent: r["raw_content"],
|
|
785
|
+
contentType: r["content_type"],
|
|
786
|
+
}));
|
|
787
|
+
}
|
|
788
|
+
/** Count of verbatim entries. */
|
|
789
|
+
getVerbatimCount() {
|
|
790
|
+
return this.db.prepare(`SELECT COUNT(*) as count FROM verbatim_drawers`).get().count;
|
|
791
|
+
}
|
|
792
|
+
// ── Layer 2: Core Blocks CRUD ──────────────────────────────
|
|
793
|
+
insert(entry) {
|
|
794
|
+
// Phase H Task 1: derive dual-timestamp fields from raw content so
|
|
795
|
+
// temporal queries ("what did we say last week about last year's
|
|
796
|
+
// launch?") can distinguish writing date from event date. Caller
|
|
797
|
+
// may override by passing explicit documentDate / eventDate.
|
|
798
|
+
const derived = deriveIngestTimestamps(`${entry.key} ${entry.value}`);
|
|
799
|
+
const documentDate = entry.documentDate ?? derived.documentDate;
|
|
800
|
+
const eventDate = entry.eventDate ?? derived.eventDate;
|
|
801
|
+
const eventDateUncertaintyMs = entry.eventDateUncertaintyMs ?? derived.eventDateUncertaintyMs;
|
|
802
|
+
const eventDateSource = entry.eventDate !== undefined && entry.eventDateSource === undefined
|
|
803
|
+
? "user-supplied"
|
|
804
|
+
: (entry.eventDateSource ?? derived.eventDateSource);
|
|
805
|
+
// Phase H Wave-3C: contextual-retrieval enrichment. When a generator
|
|
806
|
+
// is installed, prepend a ~50-token chunk-context to the indexed
|
|
807
|
+
// value per Anthropic contextual retrieval. Generator failure falls
|
|
808
|
+
// through to raw value — honest pass-through, never silent garbage.
|
|
809
|
+
let indexedValue = entry.value;
|
|
810
|
+
if (this.contextGenerator) {
|
|
811
|
+
try {
|
|
812
|
+
const raw = this.contextGenerator(entry.key, entry.value);
|
|
813
|
+
const context = clampContextTokens(cleanContext(raw));
|
|
814
|
+
if (context)
|
|
815
|
+
indexedValue = `${context}\n\n${entry.value}`;
|
|
816
|
+
}
|
|
817
|
+
catch {
|
|
818
|
+
/* honest fallback: keep raw value */
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
// Phase 2 P1-M8 Fix A — write BOTH confidence columns so read-back
|
|
822
|
+
// matches caller intent. Prior to this fix `confidence_level`,
|
|
823
|
+
// `freshness_score`, and `verification_status` were never written by
|
|
824
|
+
// insert(), so `rowToEntry` always returned confidence_level=0.5 (the
|
|
825
|
+
// column default). Reflector.promote and consolidateAutoCaptures both
|
|
826
|
+
// pass explicit confidenceLevel signals that were being silently
|
|
827
|
+
// dropped. Preserves the split semantics:
|
|
828
|
+
// - confidence = caller-supplied raw score (stays stable)
|
|
829
|
+
// - confidence_level = working value the verify pipeline mutates
|
|
830
|
+
// (seeded from caller at insert time)
|
|
831
|
+
const confidenceLevel = entry.confidenceLevel ?? entry.confidence ?? 0.5;
|
|
832
|
+
const freshnessScore = entry.freshnessScore ?? 1.0;
|
|
833
|
+
const verificationStatus = entry.verificationStatus ?? "unverified";
|
|
834
|
+
this.db
|
|
835
|
+
.prepare(`
|
|
836
|
+
INSERT INTO memory_entries (id, layer, block_type, key, value, session_id, verified, confidence, tags, domain, topic, document_date, event_date, event_date_uncertainty_ms, event_date_source, freshness_score, confidence_level, verification_status)
|
|
837
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
838
|
+
`)
|
|
839
|
+
.run(entry.id, entry.layer, entry.blockType, entry.key, indexedValue, entry.sessionId ?? null, entry.verified ? 1 : 0, entry.confidence ?? 1.0, entry.tags ?? "", entry.domain ?? "", entry.topic ?? "", documentDate, eventDate, eventDateUncertaintyMs, eventDateSource, freshnessScore, confidenceLevel, verificationStatus);
|
|
840
|
+
}
|
|
841
|
+
replace(id, key, value) {
|
|
842
|
+
this.db
|
|
843
|
+
.prepare(`
|
|
844
|
+
UPDATE memory_entries SET key = ?, value = ?, updated_at = datetime('now') WHERE id = ?
|
|
845
|
+
`)
|
|
846
|
+
.run(key, value, id);
|
|
847
|
+
}
|
|
848
|
+
archive(id) {
|
|
849
|
+
this.db
|
|
850
|
+
.prepare(`
|
|
851
|
+
UPDATE memory_entries SET archived = 1, updated_at = datetime('now') WHERE id = ?
|
|
852
|
+
`)
|
|
853
|
+
.run(id);
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* MemoryProvider contract: structured update of an existing entry.
|
|
857
|
+
* Builds a dynamic UPDATE with only the supplied fields, preserving
|
|
858
|
+
* every other column. Silent no-op when `updates` is empty or the id
|
|
859
|
+
* does not exist — matches `InMemoryProvider.update` semantics.
|
|
860
|
+
*
|
|
861
|
+
* NOTE: separate from `replace()` which is the legacy key/value-only
|
|
862
|
+
* mutation used by `memoryReplace()`. `update()` additionally supports
|
|
863
|
+
* `verified` and `confidence` columns required by the interface.
|
|
864
|
+
*/
|
|
865
|
+
update(id, updates) {
|
|
866
|
+
const sets = [];
|
|
867
|
+
const params = [];
|
|
868
|
+
if (updates.key !== undefined) {
|
|
869
|
+
sets.push("key = ?");
|
|
870
|
+
params.push(updates.key);
|
|
871
|
+
}
|
|
872
|
+
if (updates.value !== undefined) {
|
|
873
|
+
sets.push("value = ?");
|
|
874
|
+
params.push(updates.value);
|
|
875
|
+
}
|
|
876
|
+
if (updates.verified !== undefined) {
|
|
877
|
+
sets.push("verified = ?");
|
|
878
|
+
params.push(updates.verified ? 1 : 0);
|
|
879
|
+
}
|
|
880
|
+
if (updates.confidence !== undefined) {
|
|
881
|
+
sets.push("confidence = ?");
|
|
882
|
+
params.push(updates.confidence);
|
|
883
|
+
}
|
|
884
|
+
if (sets.length === 0)
|
|
885
|
+
return;
|
|
886
|
+
sets.push("updated_at = datetime('now')");
|
|
887
|
+
params.push(id);
|
|
888
|
+
this.db.prepare(`UPDATE memory_entries SET ${sets.join(", ")} WHERE id = ?`).run(...params);
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* MemoryProvider contract: hard-delete by id. Distinct from
|
|
892
|
+
* `archive()` (soft-delete via the `archived` column). Hard-delete
|
|
893
|
+
* cascades to FTS5 shadow table via SQLite foreign-key triggers.
|
|
894
|
+
*/
|
|
895
|
+
delete(id) {
|
|
896
|
+
this.db.prepare(`DELETE FROM memory_entries WHERE id = ?`).run(id);
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* MemoryProvider contract: total count of non-archived entries.
|
|
900
|
+
* Thin alias over `getEntryCount()` so conforming callers have a
|
|
901
|
+
* stable name across providers.
|
|
902
|
+
*/
|
|
903
|
+
count() {
|
|
904
|
+
return this.getEntryCount();
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* MemoryProvider contract: basic liveness probe. Issues a trivial
|
|
908
|
+
* `SELECT 1` to confirm the SQLite handle is open and responsive.
|
|
909
|
+
* Returns false on any exception rather than throwing.
|
|
910
|
+
*/
|
|
911
|
+
healthCheck() {
|
|
912
|
+
try {
|
|
913
|
+
const row = this.db.prepare("SELECT 1 AS ok").get();
|
|
914
|
+
return row?.ok === 1;
|
|
915
|
+
}
|
|
916
|
+
catch {
|
|
917
|
+
return false;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
getById(id) {
|
|
921
|
+
const row = this.db
|
|
922
|
+
.prepare(`
|
|
923
|
+
SELECT * FROM memory_entries WHERE id = ? AND archived = 0
|
|
924
|
+
`)
|
|
925
|
+
.get(id);
|
|
926
|
+
if (row) {
|
|
927
|
+
this.db
|
|
928
|
+
.prepare(`
|
|
929
|
+
UPDATE memory_entries SET access_count = access_count + 1, last_accessed = datetime('now') WHERE id = ?
|
|
930
|
+
`)
|
|
931
|
+
.run(id);
|
|
932
|
+
}
|
|
933
|
+
return row ? this.rowToEntry(row) : null;
|
|
934
|
+
}
|
|
935
|
+
getByLayer(layer) {
|
|
936
|
+
return this.db
|
|
937
|
+
.prepare(`
|
|
938
|
+
SELECT * FROM memory_entries WHERE layer = ? AND archived = 0 ORDER BY updated_at DESC
|
|
939
|
+
`)
|
|
940
|
+
.all(layer).map((r) => this.rowToEntry(r));
|
|
941
|
+
}
|
|
942
|
+
getByBlock(blockType) {
|
|
943
|
+
return this.db
|
|
944
|
+
.prepare(`
|
|
945
|
+
SELECT * FROM memory_entries WHERE block_type = ? AND archived = 0 ORDER BY updated_at DESC
|
|
946
|
+
`)
|
|
947
|
+
.all(blockType).map((r) => this.rowToEntry(r));
|
|
948
|
+
}
|
|
949
|
+
// ── Layer 3: Working Memory ────────────────────────────────
|
|
950
|
+
setWorkingMemory(sessionId, key, value, importance = 0.5) {
|
|
951
|
+
this.db
|
|
952
|
+
.prepare(`
|
|
953
|
+
INSERT OR REPLACE INTO working_memory (id, session_id, key, value, importance) VALUES (?, ?, ?, ?, ?)
|
|
954
|
+
`)
|
|
955
|
+
.run(randomUUID(), sessionId, key, value, importance);
|
|
956
|
+
}
|
|
957
|
+
getWorkingMemory(sessionId) {
|
|
958
|
+
return this.db
|
|
959
|
+
.prepare(`
|
|
960
|
+
SELECT key, value, importance FROM working_memory
|
|
961
|
+
WHERE session_id = ? AND (expires_at IS NULL OR expires_at > datetime('now'))
|
|
962
|
+
ORDER BY importance DESC
|
|
963
|
+
`)
|
|
964
|
+
.all(sessionId);
|
|
965
|
+
}
|
|
966
|
+
clearWorkingMemory(sessionId) {
|
|
967
|
+
this.db.prepare(`DELETE FROM working_memory WHERE session_id = ?`).run(sessionId);
|
|
968
|
+
}
|
|
969
|
+
// ── Layer 4: Knowledge Graph ───────────────────────────────
|
|
970
|
+
/**
|
|
971
|
+
* Phase 2 P1-M7: typed-entity graph population.
|
|
972
|
+
*
|
|
973
|
+
* Validates a structured entity against `entity-types.EntitySchema`
|
|
974
|
+
* (person / project / file / concept / event / goal / skill / tool)
|
|
975
|
+
* and inserts it into `knowledge_nodes`. If a node with the same
|
|
976
|
+
* entity+type already exists, the existing id is returned rather
|
|
977
|
+
* than duplicated. Remaining fields are serialized into the
|
|
978
|
+
* properties JSON payload so downstream consumers can reconstruct
|
|
979
|
+
* the typed entity.
|
|
980
|
+
*
|
|
981
|
+
* Exists specifically to fix the "49-byte empty KG" bug: callers
|
|
982
|
+
* that already hold a validated Entity can push it to the graph
|
|
983
|
+
* without re-typing the free-form API.
|
|
984
|
+
*/
|
|
985
|
+
recordEntity(entity) {
|
|
986
|
+
const parsed = EntitySchema.safeParse(entity);
|
|
987
|
+
if (!parsed.success) {
|
|
988
|
+
throw new Error(`recordEntity: invalid entity — ${parsed.error.message}`);
|
|
989
|
+
}
|
|
990
|
+
const valid = parsed.data;
|
|
991
|
+
const name = entityNameOf(valid);
|
|
992
|
+
const existing = this.db
|
|
993
|
+
.prepare(`SELECT id FROM knowledge_nodes WHERE entity = ? AND entity_type = ? LIMIT 1`)
|
|
994
|
+
.get(name, valid.type);
|
|
995
|
+
if (existing)
|
|
996
|
+
return existing.id;
|
|
997
|
+
const properties = {};
|
|
998
|
+
for (const [k, v] of Object.entries(valid)) {
|
|
999
|
+
if (k === "type" || k === "name")
|
|
1000
|
+
continue;
|
|
1001
|
+
if (v === undefined || v === null)
|
|
1002
|
+
continue;
|
|
1003
|
+
properties[k] = typeof v === "string" ? v : JSON.stringify(v);
|
|
1004
|
+
}
|
|
1005
|
+
return this.addKnowledgeNode(name, valid.type, properties);
|
|
1006
|
+
}
|
|
1007
|
+
/**
|
|
1008
|
+
* Phase 2 P1-M7: batch entity population. Parses each entity, skips
|
|
1009
|
+
* invalid rows (returning them in `skipped`), inserts the rest in a
|
|
1010
|
+
* single transaction.
|
|
1011
|
+
*/
|
|
1012
|
+
recordEntities(entities) {
|
|
1013
|
+
const inserted = [];
|
|
1014
|
+
const skipped = [];
|
|
1015
|
+
const tx = this.db.transaction(() => {
|
|
1016
|
+
for (const entity of entities) {
|
|
1017
|
+
try {
|
|
1018
|
+
const nodeId = this.recordEntity(entity);
|
|
1019
|
+
inserted.push({ entity, nodeId });
|
|
1020
|
+
}
|
|
1021
|
+
catch (err) {
|
|
1022
|
+
skipped.push({ entity, reason: err instanceof Error ? err.message : String(err) });
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
});
|
|
1026
|
+
tx();
|
|
1027
|
+
return { inserted, skipped };
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Phase 2 P1-M7: heuristic relationship materialization.
|
|
1031
|
+
*
|
|
1032
|
+
* Given two memory entries, classify the relationship between them
|
|
1033
|
+
* using the heuristic classifier (no LLM call) and, when confident,
|
|
1034
|
+
* insert a knowledge_edges row linking their knowledge_nodes.
|
|
1035
|
+
*
|
|
1036
|
+
* Returns the edge id when inserted, or null when the classifier
|
|
1037
|
+
* emits no relationship (or confidence is below the threshold).
|
|
1038
|
+
*/
|
|
1039
|
+
async recordHeuristicRelationship(fromNodeId, toNodeId, predecessorContent, successorContent, minConfidence = 0.5) {
|
|
1040
|
+
const classifier = createHeuristicClassifier();
|
|
1041
|
+
const result = await classifier.classify(predecessorContent, successorContent);
|
|
1042
|
+
if (!result)
|
|
1043
|
+
return null;
|
|
1044
|
+
if (result.confidence < minConfidence)
|
|
1045
|
+
return null;
|
|
1046
|
+
return this.addKnowledgeEdge(fromNodeId, toNodeId, result.kind, result.confidence);
|
|
1047
|
+
}
|
|
1048
|
+
/**
|
|
1049
|
+
* Phase 2 P1-M7: follow an `updates`-relationship chain from the
|
|
1050
|
+
* given rootId and return the id of the most recent node in that
|
|
1051
|
+
* chain. Delegates to relationship-types.resolveLatest so callers
|
|
1052
|
+
* don't have to import both modules. Used for "what is the CURRENT
|
|
1053
|
+
* version of fact X?" queries.
|
|
1054
|
+
*/
|
|
1055
|
+
resolveLatestRelationship(rels, rootId) {
|
|
1056
|
+
return resolveLatest(rels, rootId);
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Phase 2 P1-M7: group the relationships attached to a node by kind
|
|
1060
|
+
* (updates / extends / derives / unknown). Delegates to
|
|
1061
|
+
* relationship-types.partitionByKind.
|
|
1062
|
+
*/
|
|
1063
|
+
partitionRelationshipsByKind(rels, nodeId) {
|
|
1064
|
+
return partitionByKind(rels, nodeId);
|
|
1065
|
+
}
|
|
1066
|
+
addKnowledgeNode(entity, entityType, properties) {
|
|
1067
|
+
const id = randomUUID();
|
|
1068
|
+
this.db
|
|
1069
|
+
.prepare(`
|
|
1070
|
+
INSERT INTO knowledge_nodes (id, entity, entity_type, properties) VALUES (?, ?, ?, ?)
|
|
1071
|
+
`)
|
|
1072
|
+
.run(id, entity, entityType, JSON.stringify(properties ?? {}));
|
|
1073
|
+
return id;
|
|
1074
|
+
}
|
|
1075
|
+
addKnowledgeEdge(sourceId, targetId, relation, weight = 1.0, validFrom) {
|
|
1076
|
+
const id = randomUUID();
|
|
1077
|
+
const now = new Date().toISOString();
|
|
1078
|
+
this.db
|
|
1079
|
+
.prepare(`
|
|
1080
|
+
INSERT INTO knowledge_edges (id, source_id, target_id, relation, weight, valid_from, recorded_from) VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
1081
|
+
`)
|
|
1082
|
+
.run(id, sourceId, targetId, relation, weight, validFrom ?? now, now);
|
|
1083
|
+
return id;
|
|
1084
|
+
}
|
|
1085
|
+
// ── Bi-Temporal Edges (Phase 2 P1-M5, Zep/Graphiti port) ──
|
|
1086
|
+
/**
|
|
1087
|
+
* Insert a bi-temporal knowledge edge. Both axes are independent:
|
|
1088
|
+
* - valid_from / valid_to: when the fact is true in the world
|
|
1089
|
+
* - recorded_from / recorded_to: when WOTANN knew the fact
|
|
1090
|
+
*
|
|
1091
|
+
* Defaults:
|
|
1092
|
+
* - valid_from = options.validFrom ?? now
|
|
1093
|
+
* - valid_to = options.validTo ?? null (still valid)
|
|
1094
|
+
* - recorded_from = options.recordedFrom ?? now (set automatically
|
|
1095
|
+
* on every insert — the "when WOTANN learned it"
|
|
1096
|
+
* timestamp is typically right-now)
|
|
1097
|
+
* - recorded_to = null (still known)
|
|
1098
|
+
*
|
|
1099
|
+
* Throws ValidationError on malformed dates.
|
|
1100
|
+
*/
|
|
1101
|
+
addBiTemporalEdge(sourceId, targetId, relation, options = {}) {
|
|
1102
|
+
const now = new Date().toISOString();
|
|
1103
|
+
const validFrom = options.validFrom ? validateDate(options.validFrom, "validFrom") : now;
|
|
1104
|
+
const validTo = validateDateOrNull(options.validTo ?? null, "validTo");
|
|
1105
|
+
const recordedFrom = options.recordedFrom
|
|
1106
|
+
? validateDate(options.recordedFrom, "recordedFrom")
|
|
1107
|
+
: now;
|
|
1108
|
+
const weight = options.weight ?? 1.0;
|
|
1109
|
+
const id = randomUUID();
|
|
1110
|
+
this.db
|
|
1111
|
+
.prepare(`INSERT INTO knowledge_edges
|
|
1112
|
+
(id, source_id, target_id, relation, weight, valid_from, valid_to, recorded_from, recorded_to)
|
|
1113
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`)
|
|
1114
|
+
.run(id, sourceId, targetId, relation, weight, validFrom, validTo, recordedFrom, null);
|
|
1115
|
+
return id;
|
|
1116
|
+
}
|
|
1117
|
+
/**
|
|
1118
|
+
* Retract an edge on the ingest-time axis (the fact is no longer
|
|
1119
|
+
* known to WOTANN). Optionally also closes the knowledge-time axis
|
|
1120
|
+
* when `factEndedAt` is supplied — use when WOTANN learns a fact was
|
|
1121
|
+
* wrong AND knows when the fact stopped being true.
|
|
1122
|
+
*
|
|
1123
|
+
* The row is NOT deleted — historical queries (queryKnownAt(past))
|
|
1124
|
+
* still see it. This preserves the "WOTANN knew this between dates
|
|
1125
|
+
* X and Y" audit trail that Zep/Graphiti uses for knowledge updates.
|
|
1126
|
+
*/
|
|
1127
|
+
retractBiTemporalEdge(edgeId, input = {}) {
|
|
1128
|
+
const retractedAt = input.retractedAt ?? new Date().toISOString();
|
|
1129
|
+
validateDate(retractedAt, "retractedAt");
|
|
1130
|
+
if (input.factEndedAt !== undefined) {
|
|
1131
|
+
const validTo = validateDateOrNull(input.factEndedAt, "factEndedAt");
|
|
1132
|
+
const info = this.db
|
|
1133
|
+
.prepare(`UPDATE knowledge_edges
|
|
1134
|
+
SET recorded_to = ?, valid_to = ?
|
|
1135
|
+
WHERE id = ? AND recorded_to IS NULL`)
|
|
1136
|
+
.run(retractedAt, validTo, edgeId);
|
|
1137
|
+
return info.changes > 0;
|
|
1138
|
+
}
|
|
1139
|
+
const info = this.db
|
|
1140
|
+
.prepare(`UPDATE knowledge_edges
|
|
1141
|
+
SET recorded_to = ?
|
|
1142
|
+
WHERE id = ? AND recorded_to IS NULL`)
|
|
1143
|
+
.run(retractedAt, edgeId);
|
|
1144
|
+
return info.changes > 0;
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* Fetch a single bi-temporal edge by id. Returns null when missing.
|
|
1148
|
+
* Handles legacy rows (null recorded_from) by falling back to
|
|
1149
|
+
* created_at per the migration spec.
|
|
1150
|
+
*/
|
|
1151
|
+
getBiTemporalEdge(edgeId) {
|
|
1152
|
+
const row = this.db
|
|
1153
|
+
.prepare(`SELECT id, source_id, target_id, relation, weight,
|
|
1154
|
+
valid_from, valid_to, recorded_from, recorded_to, created_at
|
|
1155
|
+
FROM knowledge_edges WHERE id = ?`)
|
|
1156
|
+
.get(edgeId);
|
|
1157
|
+
if (!row)
|
|
1158
|
+
return null;
|
|
1159
|
+
return rowToBiTemporalEdge(row);
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* Query edges that were VALID (true in the world) at `date`.
|
|
1163
|
+
* Ignores the ingest-time axis entirely — even retracted edges are
|
|
1164
|
+
* returned if they were valid at the given date.
|
|
1165
|
+
*/
|
|
1166
|
+
queryValidAt(date) {
|
|
1167
|
+
validateDate(date, "date");
|
|
1168
|
+
const rows = this.db
|
|
1169
|
+
.prepare(`SELECT id, source_id, target_id, relation, weight,
|
|
1170
|
+
valid_from, valid_to, recorded_from, recorded_to, created_at
|
|
1171
|
+
FROM knowledge_edges
|
|
1172
|
+
WHERE valid_from <= ? AND (valid_to IS NULL OR valid_to > ?)`)
|
|
1173
|
+
.all(date, date);
|
|
1174
|
+
return rows.map(rowToBiTemporalEdge);
|
|
1175
|
+
}
|
|
1176
|
+
/**
|
|
1177
|
+
* Query edges that WOTANN KNEW at `date` on the ingest-time axis.
|
|
1178
|
+
* Ignores the knowledge-time axis — even edges that represent
|
|
1179
|
+
* historical (no-longer-valid) facts are returned if WOTANN knew
|
|
1180
|
+
* about them at the given date.
|
|
1181
|
+
*/
|
|
1182
|
+
queryKnownAt(date) {
|
|
1183
|
+
validateDate(date, "date");
|
|
1184
|
+
const rows = this.db
|
|
1185
|
+
.prepare(`SELECT id, source_id, target_id, relation, weight,
|
|
1186
|
+
valid_from, valid_to, recorded_from, recorded_to, created_at
|
|
1187
|
+
FROM knowledge_edges
|
|
1188
|
+
WHERE recorded_from <= ? AND (recorded_to IS NULL OR recorded_to > ?)`)
|
|
1189
|
+
.all(date, date);
|
|
1190
|
+
return rows.map(rowToBiTemporalEdge);
|
|
1191
|
+
}
|
|
1192
|
+
/**
|
|
1193
|
+
* Query edges matching BOTH axes: the fact was true in the world at
|
|
1194
|
+
* `validAt` AND WOTANN knew the fact at `knownAt`. This is the
|
|
1195
|
+
* canonical Zep/Graphiti snapshot query — "what was WOTANN's picture
|
|
1196
|
+
* of the world as of date X?".
|
|
1197
|
+
*/
|
|
1198
|
+
querySnapshot(q) {
|
|
1199
|
+
validateDate(q.validAt, "validAt");
|
|
1200
|
+
validateDate(q.knownAt, "knownAt");
|
|
1201
|
+
const rows = this.db
|
|
1202
|
+
.prepare(`SELECT id, source_id, target_id, relation, weight,
|
|
1203
|
+
valid_from, valid_to, recorded_from, recorded_to, created_at
|
|
1204
|
+
FROM knowledge_edges
|
|
1205
|
+
WHERE valid_from <= ? AND (valid_to IS NULL OR valid_to > ?)
|
|
1206
|
+
AND recorded_from <= ? AND (recorded_to IS NULL OR recorded_to > ?)`)
|
|
1207
|
+
.all(q.validAt, q.validAt, q.knownAt, q.knownAt);
|
|
1208
|
+
return rows.map(rowToBiTemporalEdge);
|
|
1209
|
+
}
|
|
1210
|
+
/**
|
|
1211
|
+
* Replace an edge: invalidate the old one on BOTH axes (fact ended
|
|
1212
|
+
* AND knowledge retracted) and insert a new edge carrying the
|
|
1213
|
+
* successor fact. Returns the new edge id. This is the canonical
|
|
1214
|
+
* Zep/Graphiti contradiction-handling flow: "we used to think X, now
|
|
1215
|
+
* we think Y — the switchover happened at time T".
|
|
1216
|
+
*/
|
|
1217
|
+
replaceBiTemporalEdge(oldEdgeId, input) {
|
|
1218
|
+
const at = input.at ?? new Date().toISOString();
|
|
1219
|
+
validateDate(at, "at");
|
|
1220
|
+
const existing = this.getBiTemporalEdge(oldEdgeId);
|
|
1221
|
+
if (!existing)
|
|
1222
|
+
return null;
|
|
1223
|
+
const tx = this.db.transaction(() => {
|
|
1224
|
+
this.retractBiTemporalEdge(oldEdgeId, {
|
|
1225
|
+
retractedAt: at,
|
|
1226
|
+
factEndedAt: at,
|
|
1227
|
+
});
|
|
1228
|
+
return this.addBiTemporalEdge(input.sourceId, input.targetId, input.relation, {
|
|
1229
|
+
validFrom: at,
|
|
1230
|
+
recordedFrom: at,
|
|
1231
|
+
...(input.weight !== undefined ? { weight: input.weight } : {}),
|
|
1232
|
+
});
|
|
1233
|
+
});
|
|
1234
|
+
return tx();
|
|
1235
|
+
}
|
|
1236
|
+
/**
|
|
1237
|
+
* Invalidate a knowledge edge by setting its valid_to timestamp.
|
|
1238
|
+
* The edge remains for historical queries but is excluded from active queries.
|
|
1239
|
+
*/
|
|
1240
|
+
invalidateKnowledgeEdge(edgeId, endedAt) {
|
|
1241
|
+
const result = this.db
|
|
1242
|
+
.prepare(`
|
|
1243
|
+
UPDATE knowledge_edges SET valid_to = ? WHERE id = ? AND valid_to IS NULL
|
|
1244
|
+
`)
|
|
1245
|
+
.run(endedAt ?? new Date().toISOString(), edgeId);
|
|
1246
|
+
return result.changes > 0;
|
|
1247
|
+
}
|
|
1248
|
+
/**
|
|
1249
|
+
* Get knowledge edges that were active at a specific point in time.
|
|
1250
|
+
* A relationship is active if valid_from <= date AND (valid_to IS NULL OR valid_to > date).
|
|
1251
|
+
*/
|
|
1252
|
+
getActiveEdgesAt(date) {
|
|
1253
|
+
return this.db
|
|
1254
|
+
.prepare(`
|
|
1255
|
+
SELECT id, source_id, target_id, relation, weight, valid_from, valid_to
|
|
1256
|
+
FROM knowledge_edges
|
|
1257
|
+
WHERE valid_from <= ? AND (valid_to IS NULL OR valid_to > ?)
|
|
1258
|
+
`)
|
|
1259
|
+
.all(date, date).map((r) => ({
|
|
1260
|
+
id: r["id"],
|
|
1261
|
+
sourceId: r["source_id"],
|
|
1262
|
+
targetId: r["target_id"],
|
|
1263
|
+
relation: r["relation"],
|
|
1264
|
+
weight: r["weight"],
|
|
1265
|
+
validFrom: r["valid_from"],
|
|
1266
|
+
validTo: r["valid_to"] ?? null,
|
|
1267
|
+
}));
|
|
1268
|
+
}
|
|
1269
|
+
getRelatedEntities(entity, maxDepth = 2) {
|
|
1270
|
+
const startNodes = this.db
|
|
1271
|
+
.prepare(`
|
|
1272
|
+
SELECT * FROM knowledge_nodes WHERE entity = ? AND (valid_to IS NULL OR valid_to > datetime('now'))
|
|
1273
|
+
`)
|
|
1274
|
+
.all(entity);
|
|
1275
|
+
if (startNodes.length === 0)
|
|
1276
|
+
return [];
|
|
1277
|
+
const visited = new Set();
|
|
1278
|
+
const result = [];
|
|
1279
|
+
let frontier = startNodes.map((n) => n["id"]);
|
|
1280
|
+
for (let depth = 0; depth < maxDepth && frontier.length > 0; depth++) {
|
|
1281
|
+
const nextFrontier = [];
|
|
1282
|
+
for (const nodeId of frontier) {
|
|
1283
|
+
if (visited.has(nodeId))
|
|
1284
|
+
continue;
|
|
1285
|
+
visited.add(nodeId);
|
|
1286
|
+
const node = this.db.prepare(`SELECT * FROM knowledge_nodes WHERE id = ?`).get(nodeId);
|
|
1287
|
+
if (node) {
|
|
1288
|
+
result.push({
|
|
1289
|
+
id: node["id"],
|
|
1290
|
+
entity: node["entity"],
|
|
1291
|
+
entityType: node["entity_type"],
|
|
1292
|
+
properties: JSON.parse(node["properties"] || "{}"),
|
|
1293
|
+
validFrom: node["valid_from"],
|
|
1294
|
+
validTo: node["valid_to"],
|
|
1295
|
+
});
|
|
1296
|
+
}
|
|
1297
|
+
const edges = this.db
|
|
1298
|
+
.prepare(`
|
|
1299
|
+
SELECT target_id AS connected FROM knowledge_edges WHERE source_id = ? AND (valid_to IS NULL OR valid_to > datetime('now'))
|
|
1300
|
+
UNION SELECT source_id AS connected FROM knowledge_edges WHERE target_id = ? AND (valid_to IS NULL OR valid_to > datetime('now'))
|
|
1301
|
+
`)
|
|
1302
|
+
.all(nodeId, nodeId);
|
|
1303
|
+
for (const e of edges) {
|
|
1304
|
+
if (!visited.has(e.connected))
|
|
1305
|
+
nextFrontier.push(e.connected);
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
frontier = nextFrontier;
|
|
1309
|
+
}
|
|
1310
|
+
return result;
|
|
1311
|
+
}
|
|
1312
|
+
getKnowledgeGraphSize() {
|
|
1313
|
+
const nodes = this.db.prepare(`SELECT COUNT(*) as c FROM knowledge_nodes`).get().c;
|
|
1314
|
+
const edges = this.db.prepare(`SELECT COUNT(*) as c FROM knowledge_edges`).get().c;
|
|
1315
|
+
return { nodes, edges };
|
|
1316
|
+
}
|
|
1317
|
+
// ── Layer 6: Skeptical Recall ──────────────────────────────
|
|
1318
|
+
skepticalSearch(query, limit = 10) {
|
|
1319
|
+
const results = this.search(query, limit);
|
|
1320
|
+
return results.map((r) => {
|
|
1321
|
+
let ageDays = 0;
|
|
1322
|
+
try {
|
|
1323
|
+
const updatedTime = new Date(r.entry.updatedAt).getTime();
|
|
1324
|
+
if (!isNaN(updatedTime)) {
|
|
1325
|
+
ageDays = (Date.now() - updatedTime) / (1000 * 60 * 60 * 24);
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
catch {
|
|
1329
|
+
/* default to 0 days age */
|
|
1330
|
+
}
|
|
1331
|
+
const temporalDecay = Math.max(0.3, 1.0 - ageDays * 0.01);
|
|
1332
|
+
const confidence = (r.entry.confidence ?? 1.0) * temporalDecay * (r.entry.verified ? 1.0 : 0.7);
|
|
1333
|
+
return { ...r, needsVerification: confidence < 0.6 || !r.entry.verified };
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1336
|
+
// ── Layer 7: Team Memory ───────────────────────────────────
|
|
1337
|
+
setTeamMemory(agentId, key, value) {
|
|
1338
|
+
this.db
|
|
1339
|
+
.prepare(`
|
|
1340
|
+
INSERT INTO team_memory (id, agent_id, key, value) VALUES (?, ?, ?, ?)
|
|
1341
|
+
`)
|
|
1342
|
+
.run(randomUUID(), agentId, key, value);
|
|
1343
|
+
}
|
|
1344
|
+
getTeamMemory(agentId) {
|
|
1345
|
+
if (agentId) {
|
|
1346
|
+
return this.db
|
|
1347
|
+
.prepare(`
|
|
1348
|
+
SELECT agent_id, key, value FROM team_memory WHERE agent_id = ? AND shared = 1 ORDER BY updated_at DESC
|
|
1349
|
+
`)
|
|
1350
|
+
.all(agentId);
|
|
1351
|
+
}
|
|
1352
|
+
return this.db
|
|
1353
|
+
.prepare(`
|
|
1354
|
+
SELECT agent_id, key, value FROM team_memory WHERE shared = 1 ORDER BY updated_at DESC LIMIT 100
|
|
1355
|
+
`)
|
|
1356
|
+
.all();
|
|
1357
|
+
}
|
|
1358
|
+
getTeamMemoryRecords(agentId) {
|
|
1359
|
+
const rows = agentId
|
|
1360
|
+
? this.db
|
|
1361
|
+
.prepare(`
|
|
1362
|
+
SELECT id, agent_id, key, value, shared, created_at, updated_at
|
|
1363
|
+
FROM team_memory
|
|
1364
|
+
WHERE agent_id = ?
|
|
1365
|
+
ORDER BY updated_at DESC
|
|
1366
|
+
`)
|
|
1367
|
+
.all(agentId)
|
|
1368
|
+
: this.db
|
|
1369
|
+
.prepare(`
|
|
1370
|
+
SELECT id, agent_id, key, value, shared, created_at, updated_at
|
|
1371
|
+
FROM team_memory
|
|
1372
|
+
ORDER BY updated_at DESC
|
|
1373
|
+
`)
|
|
1374
|
+
.all();
|
|
1375
|
+
return rows.map((row) => ({
|
|
1376
|
+
id: row["id"],
|
|
1377
|
+
agentId: row["agent_id"],
|
|
1378
|
+
key: row["key"],
|
|
1379
|
+
value: row["value"],
|
|
1380
|
+
shared: Boolean(row["shared"]),
|
|
1381
|
+
createdAt: row["created_at"],
|
|
1382
|
+
updatedAt: row["updated_at"],
|
|
1383
|
+
}));
|
|
1384
|
+
}
|
|
1385
|
+
exportTeamMemorySnapshot(agentId) {
|
|
1386
|
+
return {
|
|
1387
|
+
exportedAt: new Date().toISOString(),
|
|
1388
|
+
entries: this.getTeamMemoryRecords(agentId),
|
|
1389
|
+
};
|
|
1390
|
+
}
|
|
1391
|
+
importTeamMemorySnapshot(snapshot) {
|
|
1392
|
+
let inserted = 0;
|
|
1393
|
+
let updated = 0;
|
|
1394
|
+
let skipped = 0;
|
|
1395
|
+
const conflicts = [];
|
|
1396
|
+
for (const entry of snapshot.entries) {
|
|
1397
|
+
const existing = this.db
|
|
1398
|
+
.prepare(`
|
|
1399
|
+
SELECT id, value, updated_at
|
|
1400
|
+
FROM team_memory
|
|
1401
|
+
WHERE agent_id = ? AND key = ?
|
|
1402
|
+
ORDER BY updated_at DESC
|
|
1403
|
+
LIMIT 1
|
|
1404
|
+
`)
|
|
1405
|
+
.get(entry.agentId, entry.key);
|
|
1406
|
+
if (!existing) {
|
|
1407
|
+
this.db
|
|
1408
|
+
.prepare(`
|
|
1409
|
+
INSERT INTO team_memory (id, agent_id, key, value, shared, created_at, updated_at)
|
|
1410
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
1411
|
+
`)
|
|
1412
|
+
.run(entry.id, entry.agentId, entry.key, entry.value, entry.shared ? 1 : 0, entry.createdAt, entry.updatedAt);
|
|
1413
|
+
inserted++;
|
|
1414
|
+
continue;
|
|
1415
|
+
}
|
|
1416
|
+
const incomingTs = Date.parse(entry.updatedAt);
|
|
1417
|
+
const existingTs = Date.parse(existing.updated_at);
|
|
1418
|
+
const incomingIsNewer = !Number.isNaN(incomingTs) && !Number.isNaN(existingTs)
|
|
1419
|
+
? incomingTs > existingTs
|
|
1420
|
+
: entry.updatedAt > existing.updated_at;
|
|
1421
|
+
if (existing.value !== entry.value) {
|
|
1422
|
+
conflicts.push(`${entry.agentId}:${entry.key}`);
|
|
1423
|
+
}
|
|
1424
|
+
if (incomingIsNewer) {
|
|
1425
|
+
this.db
|
|
1426
|
+
.prepare(`
|
|
1427
|
+
UPDATE team_memory
|
|
1428
|
+
SET value = ?, shared = ?, updated_at = ?, created_at = ?
|
|
1429
|
+
WHERE id = ?
|
|
1430
|
+
`)
|
|
1431
|
+
.run(entry.value, entry.shared ? 1 : 0, entry.updatedAt, entry.createdAt, existing.id);
|
|
1432
|
+
updated++;
|
|
1433
|
+
}
|
|
1434
|
+
else {
|
|
1435
|
+
skipped++;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
return {
|
|
1439
|
+
inserted,
|
|
1440
|
+
updated,
|
|
1441
|
+
skipped,
|
|
1442
|
+
conflicts: [...new Set(conflicts)],
|
|
1443
|
+
};
|
|
1444
|
+
}
|
|
1445
|
+
syncTeamMemoryFile(snapshotPath, agentId) {
|
|
1446
|
+
let syncResult = {
|
|
1447
|
+
inserted: 0,
|
|
1448
|
+
updated: 0,
|
|
1449
|
+
skipped: 0,
|
|
1450
|
+
conflicts: [],
|
|
1451
|
+
};
|
|
1452
|
+
if (existsSync(snapshotPath)) {
|
|
1453
|
+
try {
|
|
1454
|
+
const parsed = JSON.parse(readFileSync(snapshotPath, "utf-8"));
|
|
1455
|
+
if (Array.isArray(parsed.entries)) {
|
|
1456
|
+
syncResult = this.importTeamMemorySnapshot(parsed);
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
catch {
|
|
1460
|
+
syncResult = {
|
|
1461
|
+
inserted: 0,
|
|
1462
|
+
updated: 0,
|
|
1463
|
+
skipped: 0,
|
|
1464
|
+
conflicts: ["snapshot:parse-error"],
|
|
1465
|
+
};
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
const exportedSnapshot = this.exportTeamMemorySnapshot(agentId);
|
|
1469
|
+
// SECURITY (B6): atomic write + lock so concurrent daemon processes don't
|
|
1470
|
+
// write a half-serialized JSON blob to the snapshot file.
|
|
1471
|
+
writeFileAtomicSyncBestEffort(snapshotPath, JSON.stringify(exportedSnapshot, null, 2), {
|
|
1472
|
+
encoding: "utf-8",
|
|
1473
|
+
mode: 0o600,
|
|
1474
|
+
});
|
|
1475
|
+
return {
|
|
1476
|
+
...syncResult,
|
|
1477
|
+
exported: exportedSnapshot.entries.length,
|
|
1478
|
+
};
|
|
1479
|
+
}
|
|
1480
|
+
// ── Layer 8: Proactive Context ─────────────────────────────
|
|
1481
|
+
getProactiveContext(sessionId, currentFile) {
|
|
1482
|
+
const suggestions = [];
|
|
1483
|
+
const recent = this.db
|
|
1484
|
+
.prepare(`
|
|
1485
|
+
SELECT * FROM memory_entries WHERE session_id = ? AND archived = 0 ORDER BY last_accessed DESC LIMIT 5
|
|
1486
|
+
`)
|
|
1487
|
+
.all(sessionId);
|
|
1488
|
+
for (const r of recent)
|
|
1489
|
+
suggestions.push(this.rowToEntry(r));
|
|
1490
|
+
if (currentFile) {
|
|
1491
|
+
const fileRelated = this.search(currentFile.split("/").pop() ?? "", 3);
|
|
1492
|
+
for (const r of fileRelated) {
|
|
1493
|
+
if (!suggestions.some((s) => s.id === r.entry.id))
|
|
1494
|
+
suggestions.push(r.entry);
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
return suggestions.slice(0, 10);
|
|
1498
|
+
}
|
|
1499
|
+
// ── FTS5 Search ────────────────────────────────────────────
|
|
1500
|
+
search(query, limit = 10, options) {
|
|
1501
|
+
const domainFilter = options?.domainFilter ?? [];
|
|
1502
|
+
const hasDomainFilter = domainFilter.length > 0;
|
|
1503
|
+
const conditions = ["memory_fts MATCH ?", "me.archived = 0"];
|
|
1504
|
+
const params = [query];
|
|
1505
|
+
if (hasDomainFilter) {
|
|
1506
|
+
const placeholders = domainFilter.map(() => "?").join(", ");
|
|
1507
|
+
conditions.push(`me.domain IN (${placeholders})`);
|
|
1508
|
+
for (const d of domainFilter)
|
|
1509
|
+
params.push(d);
|
|
1510
|
+
}
|
|
1511
|
+
params.push(limit);
|
|
1512
|
+
const sql = `
|
|
1513
|
+
SELECT me.*, rank AS score, snippet(memory_fts, 1, '<b>', '</b>', '...', 32) AS snippet
|
|
1514
|
+
FROM memory_fts
|
|
1515
|
+
JOIN memory_entries me ON me.rowid = memory_fts.rowid
|
|
1516
|
+
WHERE ${conditions.join(" AND ")}
|
|
1517
|
+
ORDER BY rank LIMIT ?
|
|
1518
|
+
`;
|
|
1519
|
+
const rows = this.db.prepare(sql).all(...params);
|
|
1520
|
+
return rows.map((r) => ({
|
|
1521
|
+
entry: this.rowToEntry(r),
|
|
1522
|
+
score: r["score"] ?? 0,
|
|
1523
|
+
snippet: r["snippet"] ?? "",
|
|
1524
|
+
}));
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* Domain-partitioned search (MemPalace R1).
|
|
1528
|
+
* Filters by domain/topic BEFORE running FTS5, reducing noise by up to 34%.
|
|
1529
|
+
* - domain only: +12% retrieval (MemPalace: 60.9% → 73.1%)
|
|
1530
|
+
* - domain + topic: +34% retrieval (MemPalace: 60.9% → 94.8%)
|
|
1531
|
+
*/
|
|
1532
|
+
searchPartitioned(query, options = {}) {
|
|
1533
|
+
const { domain, topic, limit = 10 } = options;
|
|
1534
|
+
// No partition filters → fall back to standard search
|
|
1535
|
+
if (!domain && !topic)
|
|
1536
|
+
return this.search(query, limit);
|
|
1537
|
+
// Build dynamic WHERE clause for domain/topic filtering
|
|
1538
|
+
const conditions = ["memory_fts MATCH ?", "me.archived = 0"];
|
|
1539
|
+
const params = [query];
|
|
1540
|
+
if (domain) {
|
|
1541
|
+
conditions.push("me.domain = ?");
|
|
1542
|
+
params.push(domain);
|
|
1543
|
+
}
|
|
1544
|
+
if (topic) {
|
|
1545
|
+
conditions.push("me.topic = ?");
|
|
1546
|
+
params.push(topic);
|
|
1547
|
+
}
|
|
1548
|
+
params.push(limit);
|
|
1549
|
+
const sql = `
|
|
1550
|
+
SELECT me.*, rank AS score, snippet(memory_fts, 1, '<b>', '</b>', '...', 32) AS snippet
|
|
1551
|
+
FROM memory_fts
|
|
1552
|
+
JOIN memory_entries me ON me.rowid = memory_fts.rowid
|
|
1553
|
+
WHERE ${conditions.join(" AND ")}
|
|
1554
|
+
ORDER BY rank LIMIT ?
|
|
1555
|
+
`;
|
|
1556
|
+
const rows = this.db.prepare(sql).all(...params);
|
|
1557
|
+
return rows.map((r) => ({
|
|
1558
|
+
entry: this.rowToEntry(r),
|
|
1559
|
+
score: r["score"] ?? 0,
|
|
1560
|
+
snippet: r["snippet"] ?? "",
|
|
1561
|
+
}));
|
|
1562
|
+
}
|
|
1563
|
+
/**
|
|
1564
|
+
* Phase 13 Wave-3C — MemPalace-aware search. Gated by MEMORY_PALACE=1
|
|
1565
|
+
* env. When enabled, accepts a MemPalacePath/Query and routes through
|
|
1566
|
+
* searchPartitioned with domain/topic derived from the palace path
|
|
1567
|
+
* (hall → domain, wing[/room] → topic). The palace-style hierarchy
|
|
1568
|
+
* then post-filters results so wing=X/room=Y queries only return
|
|
1569
|
+
* entries recorded under X/Y, not X alone. When MEMORY_PALACE is
|
|
1570
|
+
* unset, falls back to standard search (no regression).
|
|
1571
|
+
*/
|
|
1572
|
+
searchPalace(query, palace = {}, limit = 10) {
|
|
1573
|
+
if (process.env["MEMORY_PALACE"] !== "1") {
|
|
1574
|
+
return this.search(query, limit);
|
|
1575
|
+
}
|
|
1576
|
+
const path = { hall: palace.hall ?? "" };
|
|
1577
|
+
const { domain, topic } = palace.hall
|
|
1578
|
+
? palaceToStoreFields({
|
|
1579
|
+
hall: palace.hall,
|
|
1580
|
+
...(palace.wing ? { wing: palace.wing } : {}),
|
|
1581
|
+
...(palace.room ? { room: palace.room } : {}),
|
|
1582
|
+
})
|
|
1583
|
+
: { domain: "", topic: undefined };
|
|
1584
|
+
const hits = this.searchPartitioned(query, {
|
|
1585
|
+
limit: limit * 2,
|
|
1586
|
+
...(domain ? { domain } : {}),
|
|
1587
|
+
...(topic ? { topic } : {}),
|
|
1588
|
+
});
|
|
1589
|
+
if (!palace.hall)
|
|
1590
|
+
return hits.slice(0, limit);
|
|
1591
|
+
// Post-filter: require the row's palace-path to fall under the query.
|
|
1592
|
+
const filtered = hits.filter((h) => {
|
|
1593
|
+
const rowPath = palaceFromStoreFields({
|
|
1594
|
+
domain: h.entry.domain ?? "",
|
|
1595
|
+
topic: h.entry.topic,
|
|
1596
|
+
});
|
|
1597
|
+
return palaceIsUnder(rowPath, path);
|
|
1598
|
+
});
|
|
1599
|
+
return filtered.slice(0, limit);
|
|
1600
|
+
}
|
|
1601
|
+
// ── MemPalace helpers (Phase 2 P1-M7) ───────────────────────
|
|
1602
|
+
/**
|
|
1603
|
+
* Phase 2 P1-M7: list every distinct hall currently represented in
|
|
1604
|
+
* memory_entries, derived from the row's domain/topic fields. A hall
|
|
1605
|
+
* is the top-level palace axis ("auth", "deploy", "memory").
|
|
1606
|
+
*/
|
|
1607
|
+
palaceListHalls() {
|
|
1608
|
+
const rows = this.db
|
|
1609
|
+
.prepare(`SELECT DISTINCT domain, topic FROM memory_entries WHERE archived = 0 AND domain != ''`)
|
|
1610
|
+
.all();
|
|
1611
|
+
const entries = this.rowsToPalaceEntries(rows);
|
|
1612
|
+
return palaceListHalls(entries);
|
|
1613
|
+
}
|
|
1614
|
+
/** Phase 2 P1-M7: list wings under a hall. */
|
|
1615
|
+
palaceListWings(hall) {
|
|
1616
|
+
const rows = this.db
|
|
1617
|
+
.prepare(`SELECT DISTINCT domain, topic FROM memory_entries
|
|
1618
|
+
WHERE archived = 0 AND domain != ''`)
|
|
1619
|
+
.all();
|
|
1620
|
+
const entries = this.rowsToPalaceEntries(rows);
|
|
1621
|
+
return palaceListWings(entries, hall);
|
|
1622
|
+
}
|
|
1623
|
+
/** Phase 2 P1-M7: list rooms under a specific wing within a hall. */
|
|
1624
|
+
palaceListRooms(hall, wing) {
|
|
1625
|
+
const rows = this.db
|
|
1626
|
+
.prepare(`SELECT DISTINCT domain, topic FROM memory_entries
|
|
1627
|
+
WHERE archived = 0 AND domain != ''`)
|
|
1628
|
+
.all();
|
|
1629
|
+
const entries = this.rowsToPalaceEntries(rows);
|
|
1630
|
+
return palaceListRooms(entries, hall, wing);
|
|
1631
|
+
}
|
|
1632
|
+
/**
|
|
1633
|
+
* Phase 2 P1-M7: tree-view of the palace — counts at hall, wing, and
|
|
1634
|
+
* room granularity. Use together with `palaceTreeText()` for a
|
|
1635
|
+
* printable outline.
|
|
1636
|
+
*/
|
|
1637
|
+
palaceCountTree() {
|
|
1638
|
+
const rows = this.db
|
|
1639
|
+
.prepare(`SELECT domain, topic FROM memory_entries WHERE archived = 0 AND domain != ''`)
|
|
1640
|
+
.all();
|
|
1641
|
+
const entries = this.rowsToPalaceEntries(rows);
|
|
1642
|
+
return palaceCountTree(entries);
|
|
1643
|
+
}
|
|
1644
|
+
/**
|
|
1645
|
+
* Phase 2 P1-M7: render the palace tree as a printable outline.
|
|
1646
|
+
* Wraps palaceCountTree + palaceRenderTree so TUIs and CLI consumers
|
|
1647
|
+
* can print a quick palace summary without reaching into mem-palace
|
|
1648
|
+
* directly.
|
|
1649
|
+
*/
|
|
1650
|
+
palaceTreeText() {
|
|
1651
|
+
return palaceRenderTree(this.palaceCountTree());
|
|
1652
|
+
}
|
|
1653
|
+
/**
|
|
1654
|
+
* Phase 2 P1-M7: parse a slash-separated palace path and format it
|
|
1655
|
+
* back out. Kept on MemoryStore so the palace API is discoverable
|
|
1656
|
+
* from a single entry point.
|
|
1657
|
+
*/
|
|
1658
|
+
palaceParsePath(pathString) {
|
|
1659
|
+
return palaceParsePath(pathString);
|
|
1660
|
+
}
|
|
1661
|
+
palaceFormatPath(path) {
|
|
1662
|
+
return palaceFormatPath(path);
|
|
1663
|
+
}
|
|
1664
|
+
/**
|
|
1665
|
+
* Convert memory_entries rows to MemPalaceEntry shape. Derives the
|
|
1666
|
+
* palace path from domain/topic fields via the shared
|
|
1667
|
+
* palaceFromStoreFields helper.
|
|
1668
|
+
*/
|
|
1669
|
+
rowsToPalaceEntries(rows) {
|
|
1670
|
+
return rows.map((r) => ({
|
|
1671
|
+
path: palaceFromStoreFields({ domain: r.domain, topic: r.topic ?? "" }),
|
|
1672
|
+
data: null,
|
|
1673
|
+
}));
|
|
1674
|
+
}
|
|
1675
|
+
// ── Contextual embeddings helpers (Phase 2 P1-M7) ───────────
|
|
1676
|
+
/**
|
|
1677
|
+
* Phase 2 P1-M7: install a ContextualChunkGenerator on this store.
|
|
1678
|
+
* When set, every subsequent insert() will call the generator and
|
|
1679
|
+
* prepend ~50 tokens of context to the indexed value per Anthropic's
|
|
1680
|
+
* contextual retrieval guidelines.
|
|
1681
|
+
*
|
|
1682
|
+
* Thin wrapper over setContextGenerator that accepts the structured
|
|
1683
|
+
* ContextualChunkGenerator type defined in contextual-embeddings.ts.
|
|
1684
|
+
*/
|
|
1685
|
+
asyncContextGenerator = null;
|
|
1686
|
+
installContextGenerator(generator) {
|
|
1687
|
+
this.asyncContextGenerator = generator;
|
|
1688
|
+
}
|
|
1689
|
+
/** Phase 2 P1-M7: retrieve the installed async ContextualChunkGenerator. */
|
|
1690
|
+
getContextGenerator() {
|
|
1691
|
+
return this.asyncContextGenerator;
|
|
1692
|
+
}
|
|
1693
|
+
/**
|
|
1694
|
+
* Phase 2 P1-M7: convenience — wrap an LLM query function as a
|
|
1695
|
+
* ContextualChunkGenerator and install it in one call.
|
|
1696
|
+
*/
|
|
1697
|
+
enableContextualRetrieval(llm) {
|
|
1698
|
+
this.installContextGenerator(createLlmContextGenerator(llm));
|
|
1699
|
+
}
|
|
1700
|
+
/**
|
|
1701
|
+
* Phase 2 P1-M7: build one contextual chunk (chunk + LLM-derived
|
|
1702
|
+
* context). Exposed for callers that want to precompute chunks
|
|
1703
|
+
* offline before inserting into memory.
|
|
1704
|
+
*/
|
|
1705
|
+
async buildContextualChunk(chunk, document, llm) {
|
|
1706
|
+
const generator = createLlmContextGenerator(llm);
|
|
1707
|
+
const built = await buildContextualChunk(chunk, document, generator);
|
|
1708
|
+
return built.contextualized;
|
|
1709
|
+
}
|
|
1710
|
+
/**
|
|
1711
|
+
* Phase 2 P1-M7: batch version — build multiple contextual chunks
|
|
1712
|
+
* with bounded concurrency.
|
|
1713
|
+
*/
|
|
1714
|
+
async buildContextualChunksBatch(chunks, document, llm, options) {
|
|
1715
|
+
const generator = createLlmContextGenerator(llm);
|
|
1716
|
+
const built = await buildBatchedContextualChunks(chunks, document, generator, options);
|
|
1717
|
+
return built.map((b) => b.contextualized);
|
|
1718
|
+
}
|
|
1719
|
+
/**
|
|
1720
|
+
* Phase 13 Wave-3C — extended search modes (Cognee parity). Dispatches
|
|
1721
|
+
* to extended-search-types for non-default modes: temporal-filtered,
|
|
1722
|
+
* summary-only, metadata-only, hybrid-fusion. Default mode falls
|
|
1723
|
+
* through to FTS5 search. Non-default modes return an empty list when
|
|
1724
|
+
* the store has no entries matching the mode's criteria.
|
|
1725
|
+
*/
|
|
1726
|
+
searchExtended(query, options = {}) {
|
|
1727
|
+
const mode = options.mode ?? "default";
|
|
1728
|
+
const limit = options.limit ?? 10;
|
|
1729
|
+
if (mode === "default")
|
|
1730
|
+
return this.search(query, limit);
|
|
1731
|
+
const ftsHits = this.search(query, limit * 2);
|
|
1732
|
+
const entries = ftsHits.map((h) => ({
|
|
1733
|
+
id: h.entry.id,
|
|
1734
|
+
content: h.entry.value,
|
|
1735
|
+
...(h.entry.documentDate ? { timestamp: h.entry.documentDate } : {}),
|
|
1736
|
+
...(h.entry.tags ? { metadata: { type: h.entry.tags } } : {}),
|
|
1737
|
+
}));
|
|
1738
|
+
const byId = new Map(ftsHits.map((h) => [h.entry.id, h]));
|
|
1739
|
+
let hits = [];
|
|
1740
|
+
if (mode === "temporal-filtered" && options.temporal) {
|
|
1741
|
+
hits = temporalFiltered(entries, options.temporal);
|
|
1742
|
+
}
|
|
1743
|
+
else if (mode === "summary-only") {
|
|
1744
|
+
hits = summaryOnly(entries);
|
|
1745
|
+
}
|
|
1746
|
+
else if (mode === "metadata-only" && options.metadata) {
|
|
1747
|
+
hits = metadataOnly(entries, options.metadata);
|
|
1748
|
+
}
|
|
1749
|
+
else if (mode === "hybrid-fusion" && options.secondaryRanking) {
|
|
1750
|
+
const primary = ftsHits.map((h, rank) => ({
|
|
1751
|
+
entry: {
|
|
1752
|
+
id: h.entry.id,
|
|
1753
|
+
content: h.entry.value,
|
|
1754
|
+
...(h.entry.documentDate ? { timestamp: h.entry.documentDate } : {}),
|
|
1755
|
+
},
|
|
1756
|
+
score: 1 / (rank + 1),
|
|
1757
|
+
}));
|
|
1758
|
+
const secondary = options.secondaryRanking.map((h, rank) => ({
|
|
1759
|
+
entry: {
|
|
1760
|
+
id: h.entry.id,
|
|
1761
|
+
content: h.entry.value,
|
|
1762
|
+
...(h.entry.documentDate ? { timestamp: h.entry.documentDate } : {}),
|
|
1763
|
+
},
|
|
1764
|
+
score: 1 / (rank + 1),
|
|
1765
|
+
}));
|
|
1766
|
+
hits = rrfFusion([primary, secondary]);
|
|
1767
|
+
}
|
|
1768
|
+
return hits
|
|
1769
|
+
.map((hit) => byId.get(hit.entry.id))
|
|
1770
|
+
.filter((r) => r !== undefined)
|
|
1771
|
+
.slice(0, limit);
|
|
1772
|
+
}
|
|
1773
|
+
// ── TEMPR (Phase 2 P1-M4, Hindsight port) ──────────────
|
|
1774
|
+
/**
|
|
1775
|
+
* TEMPR 4-channel parallel retrieval + RRF + cross-encoder rerank.
|
|
1776
|
+
*
|
|
1777
|
+
* Hindsight port (arXiv 2512.12818) — 91.4% LongMemEval-S reference.
|
|
1778
|
+
* Runs 4 canonical channels in parallel over this store:
|
|
1779
|
+
*
|
|
1780
|
+
* 1. VECTOR — dense retrieval via caller-supplied embedder
|
|
1781
|
+
* (falls back to FTS5-equivalent if no embedder)
|
|
1782
|
+
* 2. BM25 — FTS5 lexical match (store.search)
|
|
1783
|
+
* 3. ENTITY — KG-aware: parses query entity candidates and
|
|
1784
|
+
* retrieves entries whose content mentions any
|
|
1785
|
+
* related entity (from knowledge_nodes + M7 edges)
|
|
1786
|
+
* 4. TEMPORAL — bi-temporal snapshot: returns entries adjacent
|
|
1787
|
+
* to edges valid at `opts.validAt` (leverages M5
|
|
1788
|
+
* queryValidAt). When no validAt, falls back to
|
|
1789
|
+
* eventDate/documentDate proximity to `opts.now`.
|
|
1790
|
+
*
|
|
1791
|
+
* Failed channels (exceptions from the backing calls) are isolated
|
|
1792
|
+
* — the remaining channels still contribute. A channel that crashes
|
|
1793
|
+
* is captured in `result.channelResults.get(name).error`; the overall
|
|
1794
|
+
* query never crashes.
|
|
1795
|
+
*
|
|
1796
|
+
* Cross-encoder: defaults to the word-overlap heuristic (good
|
|
1797
|
+
* enough for wiring; the real MS MARCO MiniLM lands in P1-M2 via
|
|
1798
|
+
* createCrossEncoderFromFn). Pass `crossEncoder: null` to skip
|
|
1799
|
+
* rerank entirely.
|
|
1800
|
+
*
|
|
1801
|
+
* Per-query isolation: every call constructs a fresh TEMPR handle
|
|
1802
|
+
* over snapshot channel functions — no shared state between calls.
|
|
1803
|
+
*/
|
|
1804
|
+
async temprSearch(query, opts = {}) {
|
|
1805
|
+
const topK = opts.topK ?? 20;
|
|
1806
|
+
const pool = opts.candidatePool ?? Math.max(50, topK * 3);
|
|
1807
|
+
// Resolve the asymmetric prefix profile ONCE per call. Order:
|
|
1808
|
+
// 1. Explicit profile override (highest priority).
|
|
1809
|
+
// 2. Registry lookup by model name.
|
|
1810
|
+
// 3. null (symmetric / no prefix).
|
|
1811
|
+
// The env-var gate suppresses the entire feature when off — keeps
|
|
1812
|
+
// existing un-prefixed indexes from getting score-skewed by a
|
|
1813
|
+
// prefixed query embedding (see embedding-profiles.ts header).
|
|
1814
|
+
const prefixesEnabled = isAsymmetricEmbeddingsEnabled();
|
|
1815
|
+
const resolvedProfile = !prefixesEnabled
|
|
1816
|
+
? null
|
|
1817
|
+
: (opts.embeddingProfile ??
|
|
1818
|
+
(opts.embeddingModel ? getEmbeddingProfile(opts.embeddingModel) : null));
|
|
1819
|
+
// Build each channel. Each channel is a closure over `this`. Errors
|
|
1820
|
+
// inside the closure become rejections that TEMPR captures — never
|
|
1821
|
+
// swallow here.
|
|
1822
|
+
const vectorChannel = {
|
|
1823
|
+
name: "vector",
|
|
1824
|
+
retrieve: async (args) => {
|
|
1825
|
+
if (!opts.embed) {
|
|
1826
|
+
// No embedder provided — emit empty rather than faking
|
|
1827
|
+
// (quality bar: honest failure). Caller sees the empty
|
|
1828
|
+
// channel result and can decide what to do.
|
|
1829
|
+
return { candidates: [] };
|
|
1830
|
+
}
|
|
1831
|
+
// Phase 2 P1-M2 (OMEGA): native sqlite-vec knn path.
|
|
1832
|
+
// When a vectorBackend is provided, route through it rather
|
|
1833
|
+
// than doing per-row cosine. The backend is populated by the
|
|
1834
|
+
// caller (typically via MemoryStore.upsertEmbedding).
|
|
1835
|
+
// V9 T1.3: when `opts.vectorBackend` is omitted, fall back to
|
|
1836
|
+
// the store's attached `this.vectorBackend` so callers that
|
|
1837
|
+
// called `attachVectorBackend()` at setup time get sqlite-vec
|
|
1838
|
+
// routing automatically.
|
|
1839
|
+
const resolvedBackend = opts.vectorBackend ?? this.vectorBackend;
|
|
1840
|
+
if (resolvedBackend) {
|
|
1841
|
+
try {
|
|
1842
|
+
// LightRAG asymmetric-prefix port: prepend the model's
|
|
1843
|
+
// recommended query prefix BEFORE embedding. No-op when
|
|
1844
|
+
// the env-var gate is off OR the model isn't in the
|
|
1845
|
+
// registry (resolvedProfile === null).
|
|
1846
|
+
const queryText = applyQueryPrefix(resolvedProfile, args.query);
|
|
1847
|
+
const queryVec = await opts.embed(queryText);
|
|
1848
|
+
const hits = resolvedBackend.knn(queryVec, pool);
|
|
1849
|
+
if (hits.length === 0)
|
|
1850
|
+
return { candidates: [] };
|
|
1851
|
+
// Rehydrate content from the store. Missing ids (stale
|
|
1852
|
+
// index) are dropped silently — honest fail.
|
|
1853
|
+
const cands = [];
|
|
1854
|
+
for (const h of hits) {
|
|
1855
|
+
const entry = this.getById(h.id);
|
|
1856
|
+
if (entry) {
|
|
1857
|
+
cands.push({ id: entry.id, content: entry.value });
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
return { candidates: cands };
|
|
1861
|
+
}
|
|
1862
|
+
catch {
|
|
1863
|
+
// sqlite-vec path failed — fall through to FTS5+cosine
|
|
1864
|
+
// fallback below. Honest degradation.
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
// Baseline vector retrieval: FTS5 shortlist → cosine rerank
|
|
1868
|
+
// against query embedding. This is a COARSE approximation
|
|
1869
|
+
// used when sqlite-vec isn't wired.
|
|
1870
|
+
const shortlist = this.search(args.query, pool);
|
|
1871
|
+
if (shortlist.length === 0)
|
|
1872
|
+
return { candidates: [] };
|
|
1873
|
+
// LightRAG asymmetric-prefix port: query gets queryPrefix,
|
|
1874
|
+
// each doc gets docPrefix — different prefixes are the whole
|
|
1875
|
+
// point of this branch. Both calls no-op when the gate is off.
|
|
1876
|
+
const queryVec = await opts.embed(applyQueryPrefix(resolvedProfile, args.query));
|
|
1877
|
+
const scored = [];
|
|
1878
|
+
for (const row of shortlist) {
|
|
1879
|
+
const docVec = await opts.embed(applyDocPrefix(resolvedProfile, row.entry.value));
|
|
1880
|
+
const score = cosineSimTempr(queryVec, docVec);
|
|
1881
|
+
if (score > 0) {
|
|
1882
|
+
scored.push({
|
|
1883
|
+
c: { id: row.entry.id, content: row.entry.value },
|
|
1884
|
+
score,
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
scored.sort((a, b) => b.score - a.score);
|
|
1889
|
+
return { candidates: scored.slice(0, pool).map((s) => s.c) };
|
|
1890
|
+
},
|
|
1891
|
+
};
|
|
1892
|
+
const bm25Channel = {
|
|
1893
|
+
name: "bm25",
|
|
1894
|
+
retrieve: async (args) => {
|
|
1895
|
+
const results = this.search(args.query, pool);
|
|
1896
|
+
return {
|
|
1897
|
+
candidates: results.map((r) => ({
|
|
1898
|
+
id: r.entry.id,
|
|
1899
|
+
content: r.entry.value,
|
|
1900
|
+
})),
|
|
1901
|
+
};
|
|
1902
|
+
},
|
|
1903
|
+
};
|
|
1904
|
+
const entityChannel = {
|
|
1905
|
+
name: "entity",
|
|
1906
|
+
retrieve: async (args) => {
|
|
1907
|
+
// Heuristic entity extraction from the query: capitalized
|
|
1908
|
+
// tokens + quoted strings. Good enough for the channel split
|
|
1909
|
+
// (we don't need a full NER — the LLM-based extraction lives
|
|
1910
|
+
// in observation-extractor and feeds into recordEntity).
|
|
1911
|
+
const tokens = extractQueryEntities(args.query);
|
|
1912
|
+
if (tokens.length === 0)
|
|
1913
|
+
return { candidates: [] };
|
|
1914
|
+
// Look up knowledge_nodes by any matching entity name, then
|
|
1915
|
+
// find memory entries that mention any related entity.
|
|
1916
|
+
const collected = new Map();
|
|
1917
|
+
for (const tok of tokens) {
|
|
1918
|
+
try {
|
|
1919
|
+
const related = this.getRelatedEntities(tok, 2);
|
|
1920
|
+
for (const node of related) {
|
|
1921
|
+
// Find entries whose value mentions this entity name.
|
|
1922
|
+
// FTS5 quoted-phrase search: "Alice" (no operators).
|
|
1923
|
+
const safe = fts5QuoteName(node.entity);
|
|
1924
|
+
if (!safe)
|
|
1925
|
+
continue;
|
|
1926
|
+
const rows = this.search(safe, 20);
|
|
1927
|
+
for (const row of rows) {
|
|
1928
|
+
if (!collected.has(row.entry.id)) {
|
|
1929
|
+
collected.set(row.entry.id, {
|
|
1930
|
+
id: row.entry.id,
|
|
1931
|
+
content: row.entry.value,
|
|
1932
|
+
metadata: { entityMatch: node.entity, entityType: node.entityType },
|
|
1933
|
+
});
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
catch {
|
|
1939
|
+
// skip this token — another might match
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
return { candidates: [...collected.values()].slice(0, pool) };
|
|
1943
|
+
},
|
|
1944
|
+
};
|
|
1945
|
+
const temporalChannel = {
|
|
1946
|
+
name: "temporal",
|
|
1947
|
+
retrieve: async (_args) => {
|
|
1948
|
+
// If a validAt is provided, fetch edges valid at that point
|
|
1949
|
+
// and surface entries connected (via KG node.entity) to those
|
|
1950
|
+
// edges' source/target. Otherwise, surface entries whose
|
|
1951
|
+
// documentDate/eventDate is closest to `now` — a recency
|
|
1952
|
+
// proxy for temporal relevance.
|
|
1953
|
+
if (opts.validAt) {
|
|
1954
|
+
try {
|
|
1955
|
+
const edges = this.queryValidAt(opts.validAt);
|
|
1956
|
+
if (edges.length === 0)
|
|
1957
|
+
return { candidates: [] };
|
|
1958
|
+
// Resolve each edge's source/target knowledge_node entity
|
|
1959
|
+
// name, then collect matching entries.
|
|
1960
|
+
const entityNames = new Set();
|
|
1961
|
+
for (const edge of edges.slice(0, pool)) {
|
|
1962
|
+
const sNode = this.db
|
|
1963
|
+
.prepare(`SELECT entity FROM knowledge_nodes WHERE id = ?`)
|
|
1964
|
+
.get(edge.sourceId);
|
|
1965
|
+
const tNode = this.db
|
|
1966
|
+
.prepare(`SELECT entity FROM knowledge_nodes WHERE id = ?`)
|
|
1967
|
+
.get(edge.targetId);
|
|
1968
|
+
if (sNode?.entity)
|
|
1969
|
+
entityNames.add(sNode.entity);
|
|
1970
|
+
if (tNode?.entity)
|
|
1971
|
+
entityNames.add(tNode.entity);
|
|
1972
|
+
}
|
|
1973
|
+
const collected = new Map();
|
|
1974
|
+
for (const name of entityNames) {
|
|
1975
|
+
const safe = fts5QuoteName(name);
|
|
1976
|
+
if (!safe)
|
|
1977
|
+
continue;
|
|
1978
|
+
const rows = this.search(safe, 10);
|
|
1979
|
+
for (const row of rows) {
|
|
1980
|
+
if (!collected.has(row.entry.id)) {
|
|
1981
|
+
collected.set(row.entry.id, {
|
|
1982
|
+
id: row.entry.id,
|
|
1983
|
+
content: row.entry.value,
|
|
1984
|
+
metadata: { temporalEntity: name, validAt: opts.validAt },
|
|
1985
|
+
});
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
return { candidates: [...collected.values()].slice(0, pool) };
|
|
1990
|
+
}
|
|
1991
|
+
catch {
|
|
1992
|
+
return { candidates: [] };
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
// Fallback: recency-based. Pick entries with documentDate
|
|
1996
|
+
// closest to `now` from within a BM25 shortlist for relevance.
|
|
1997
|
+
const now = opts.now ?? Date.now();
|
|
1998
|
+
const shortlist = this.search(query, pool);
|
|
1999
|
+
const scored = shortlist
|
|
2000
|
+
.filter((r) => r.entry.documentDate !== undefined)
|
|
2001
|
+
.map((r) => {
|
|
2002
|
+
const age = Math.abs(now - r.entry.documentDate);
|
|
2003
|
+
return { entry: r.entry, age };
|
|
2004
|
+
})
|
|
2005
|
+
.sort((a, b) => a.age - b.age);
|
|
2006
|
+
return {
|
|
2007
|
+
candidates: scored.slice(0, pool).map((s) => ({
|
|
2008
|
+
id: s.entry.id,
|
|
2009
|
+
content: s.entry.value,
|
|
2010
|
+
metadata: { temporalRecencyAge: s.age },
|
|
2011
|
+
})),
|
|
2012
|
+
};
|
|
2013
|
+
},
|
|
2014
|
+
};
|
|
2015
|
+
// V9 T1.4: when `opts.crossEncoder` is omitted, default to the
|
|
2016
|
+
// store's attached `this.defaultCrossEncoder` (ONNX when attached
|
|
2017
|
+
// via `attachOnnxCrossEncoder`, heuristic otherwise). Passing
|
|
2018
|
+
// `null` still explicitly disables reranking.
|
|
2019
|
+
const crossEncoder = opts.crossEncoder === null ? undefined : (opts.crossEncoder ?? this.defaultCrossEncoder);
|
|
2020
|
+
const tempr = createTEMPR({
|
|
2021
|
+
channels: [vectorChannel, bm25Channel, entityChannel, temporalChannel],
|
|
2022
|
+
...(crossEncoder !== undefined ? { crossEncoder } : {}),
|
|
2023
|
+
topK,
|
|
2024
|
+
...(opts.onChannelError !== undefined ? { onChannelError: opts.onChannelError } : {}),
|
|
2025
|
+
});
|
|
2026
|
+
const searchOpts = { topK };
|
|
2027
|
+
const result = await tempr.search(query, searchOpts);
|
|
2028
|
+
// Rehydrate full MemoryEntry on each hit (callers typically want
|
|
2029
|
+
// the full entry, not just id + content).
|
|
2030
|
+
const hits = result.hits.map((hit) => ({
|
|
2031
|
+
...hit,
|
|
2032
|
+
entry: this.getById(hit.id),
|
|
2033
|
+
}));
|
|
2034
|
+
return {
|
|
2035
|
+
hits,
|
|
2036
|
+
channelResults: result.channelResults,
|
|
2037
|
+
rerankerApplied: result.rerankerApplied,
|
|
2038
|
+
durationMs: result.durationMs,
|
|
2039
|
+
};
|
|
2040
|
+
}
|
|
2041
|
+
/** Get all unique domains in the memory store. */
|
|
2042
|
+
getDomains() {
|
|
2043
|
+
const rows = this.db
|
|
2044
|
+
.prepare(`SELECT DISTINCT domain FROM memory_entries WHERE archived = 0 AND domain != '' ORDER BY domain`)
|
|
2045
|
+
.all();
|
|
2046
|
+
return rows.map((r) => r.domain);
|
|
2047
|
+
}
|
|
2048
|
+
/** Get all unique topics within a domain (or all topics if no domain specified). */
|
|
2049
|
+
getTopics(domain) {
|
|
2050
|
+
const rows = domain
|
|
2051
|
+
? this.db
|
|
2052
|
+
.prepare(`SELECT DISTINCT topic FROM memory_entries WHERE archived = 0 AND domain = ? AND topic != '' ORDER BY topic`)
|
|
2053
|
+
.all(domain)
|
|
2054
|
+
: this.db
|
|
2055
|
+
.prepare(`SELECT DISTINCT topic FROM memory_entries WHERE archived = 0 AND topic != '' ORDER BY topic`)
|
|
2056
|
+
.all();
|
|
2057
|
+
return rows.map((r) => r.topic);
|
|
2058
|
+
}
|
|
2059
|
+
// ── Consolidation Lock ─────────────────────────────────────
|
|
2060
|
+
acquireConsolidationLock(lockId) {
|
|
2061
|
+
const lockPath = join(this.dbPath, "..", "consolidation.lock");
|
|
2062
|
+
if (existsSync(lockPath)) {
|
|
2063
|
+
try {
|
|
2064
|
+
const lockData = JSON.parse(readFileSync(lockPath, "utf-8"));
|
|
2065
|
+
if (Date.now() - lockData.timestamp > 30 * 60 * 1000) {
|
|
2066
|
+
unlinkSync(lockPath);
|
|
2067
|
+
}
|
|
2068
|
+
else {
|
|
2069
|
+
return false;
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
catch {
|
|
2073
|
+
try {
|
|
2074
|
+
unlinkSync(lockPath);
|
|
2075
|
+
}
|
|
2076
|
+
catch {
|
|
2077
|
+
/* ignore */
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
try {
|
|
2082
|
+
writeFileSync(lockPath, JSON.stringify({ lockId, timestamp: Date.now() }), { flag: "wx" });
|
|
2083
|
+
return true;
|
|
2084
|
+
}
|
|
2085
|
+
catch {
|
|
2086
|
+
return false;
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
releaseConsolidationLock() {
|
|
2090
|
+
const lockPath = join(this.dbPath, "..", "consolidation.lock");
|
|
2091
|
+
try {
|
|
2092
|
+
unlinkSync(lockPath);
|
|
2093
|
+
}
|
|
2094
|
+
catch {
|
|
2095
|
+
/* ignore */
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
// ── Decision Log ───────────────────────────────────────────
|
|
2099
|
+
logDecision(decision) {
|
|
2100
|
+
this.db
|
|
2101
|
+
.prepare(`
|
|
2102
|
+
INSERT INTO decision_log (id, decision, rationale, alternatives, constraints, stakeholders, session_id)
|
|
2103
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
2104
|
+
`)
|
|
2105
|
+
.run(decision.id, decision.decision, decision.rationale, decision.alternatives ?? null, decision.constraints ?? null, decision.stakeholders ?? null, decision.sessionId ?? null);
|
|
2106
|
+
}
|
|
2107
|
+
getDecisions(limit = 20) {
|
|
2108
|
+
return this.db
|
|
2109
|
+
.prepare(`SELECT * FROM decision_log ORDER BY created_at DESC LIMIT ?`)
|
|
2110
|
+
.all(limit);
|
|
2111
|
+
}
|
|
2112
|
+
// ── Memory Tools (6 agent-callable tools per spec) ─────────
|
|
2113
|
+
memoryReplace(block, key, value, domain, topic) {
|
|
2114
|
+
const existing = this.db
|
|
2115
|
+
.prepare(`
|
|
2116
|
+
SELECT id FROM memory_entries WHERE block_type = ? AND key = ? AND archived = 0
|
|
2117
|
+
`)
|
|
2118
|
+
.get(block, key);
|
|
2119
|
+
if (existing) {
|
|
2120
|
+
this.replace(existing.id, key, value);
|
|
2121
|
+
}
|
|
2122
|
+
else {
|
|
2123
|
+
this.insert({
|
|
2124
|
+
id: randomUUID(),
|
|
2125
|
+
layer: "core_blocks",
|
|
2126
|
+
blockType: block,
|
|
2127
|
+
key,
|
|
2128
|
+
value,
|
|
2129
|
+
verified: false,
|
|
2130
|
+
freshnessScore: 1.0,
|
|
2131
|
+
confidenceLevel: 0.8,
|
|
2132
|
+
verificationStatus: "unverified",
|
|
2133
|
+
domain: domain ?? "",
|
|
2134
|
+
topic: topic ?? "",
|
|
2135
|
+
});
|
|
2136
|
+
}
|
|
2137
|
+
}
|
|
2138
|
+
memoryInsert(block, key, value, domain, topic) {
|
|
2139
|
+
this.insert({
|
|
2140
|
+
id: randomUUID(),
|
|
2141
|
+
layer: "core_blocks",
|
|
2142
|
+
blockType: block,
|
|
2143
|
+
key,
|
|
2144
|
+
value,
|
|
2145
|
+
verified: false,
|
|
2146
|
+
freshnessScore: 1.0,
|
|
2147
|
+
confidenceLevel: 0.8,
|
|
2148
|
+
verificationStatus: "unverified",
|
|
2149
|
+
domain: domain ?? "",
|
|
2150
|
+
topic: topic ?? "",
|
|
2151
|
+
});
|
|
2152
|
+
}
|
|
2153
|
+
memoryRethink(entryId, newValue) {
|
|
2154
|
+
const entry = this.getById(entryId);
|
|
2155
|
+
if (!entry)
|
|
2156
|
+
return null;
|
|
2157
|
+
this.replace(entryId, entry.key, newValue);
|
|
2158
|
+
return { ...entry, value: newValue };
|
|
2159
|
+
}
|
|
2160
|
+
memorySearch(query, optionsOrLayers) {
|
|
2161
|
+
// Backward compat: accept both old (layers array) and new (options object) signatures
|
|
2162
|
+
if (Array.isArray(optionsOrLayers)) {
|
|
2163
|
+
// Old API: memorySearch(query, layers[])
|
|
2164
|
+
const results = this.searchPartitioned(query, { limit: 50 });
|
|
2165
|
+
return optionsOrLayers.length === 0
|
|
2166
|
+
? results
|
|
2167
|
+
: results.filter((r) => optionsOrLayers.includes(r.entry.layer));
|
|
2168
|
+
}
|
|
2169
|
+
// New API: memorySearch(query, { layers?, domain?, topic? })
|
|
2170
|
+
const opts = (optionsOrLayers ?? {});
|
|
2171
|
+
const results = this.searchPartitioned(query, {
|
|
2172
|
+
domain: opts.domain,
|
|
2173
|
+
topic: opts.topic,
|
|
2174
|
+
limit: 50,
|
|
2175
|
+
});
|
|
2176
|
+
if (!opts.layers || opts.layers.length === 0)
|
|
2177
|
+
return results;
|
|
2178
|
+
return results.filter((r) => opts.layers.includes(r.entry.layer));
|
|
2179
|
+
}
|
|
2180
|
+
memoryArchive(entryId) {
|
|
2181
|
+
const entry = this.getById(entryId);
|
|
2182
|
+
if (!entry)
|
|
2183
|
+
return false;
|
|
2184
|
+
this.archive(entryId);
|
|
2185
|
+
return true;
|
|
2186
|
+
}
|
|
2187
|
+
memoryVerify(entryId) {
|
|
2188
|
+
const entry = this.getById(entryId);
|
|
2189
|
+
if (entry) {
|
|
2190
|
+
this.db
|
|
2191
|
+
.prepare(`UPDATE memory_entries SET verified = 1, updated_at = datetime('now') WHERE id = ?`)
|
|
2192
|
+
.run(entryId);
|
|
2193
|
+
return { ...entry, verified: true };
|
|
2194
|
+
}
|
|
2195
|
+
return null;
|
|
2196
|
+
}
|
|
2197
|
+
// ── Stats ──────────────────────────────────────────────────
|
|
2198
|
+
getEntryCount() {
|
|
2199
|
+
return this.db.prepare(`SELECT COUNT(*) as count FROM memory_entries WHERE archived = 0`).get().count;
|
|
2200
|
+
}
|
|
2201
|
+
getLayerStats() {
|
|
2202
|
+
const rows = this.db
|
|
2203
|
+
.prepare(`
|
|
2204
|
+
SELECT layer, COUNT(*) as count FROM memory_entries WHERE archived = 0 GROUP BY layer
|
|
2205
|
+
`)
|
|
2206
|
+
.all();
|
|
2207
|
+
const stats = {};
|
|
2208
|
+
for (const r of rows)
|
|
2209
|
+
stats[r.layer] = r.count;
|
|
2210
|
+
return stats;
|
|
2211
|
+
}
|
|
2212
|
+
// ── Helpers ────────────────────────────────────────────────
|
|
2213
|
+
rowToEntry(row) {
|
|
2214
|
+
return {
|
|
2215
|
+
id: row["id"],
|
|
2216
|
+
layer: row["layer"],
|
|
2217
|
+
blockType: row["block_type"],
|
|
2218
|
+
key: row["key"],
|
|
2219
|
+
value: row["value"],
|
|
2220
|
+
createdAt: row["created_at"],
|
|
2221
|
+
updatedAt: row["updated_at"],
|
|
2222
|
+
sessionId: row["session_id"],
|
|
2223
|
+
verified: Boolean(row["verified"]),
|
|
2224
|
+
confidence: row["confidence"],
|
|
2225
|
+
tags: row["tags"],
|
|
2226
|
+
sourceType: row["source_type"],
|
|
2227
|
+
sourceFile: row["source_file"],
|
|
2228
|
+
freshnessScore: row["freshness_score"] ?? 1.0,
|
|
2229
|
+
confidenceLevel: row["confidence_level"] ?? 0.5,
|
|
2230
|
+
lastVerifiedAt: row["last_verified_at"],
|
|
2231
|
+
verificationStatus: row["verification_status"] ?? "unverified",
|
|
2232
|
+
domain: row["domain"] ?? "",
|
|
2233
|
+
topic: row["topic"] ?? "",
|
|
2234
|
+
documentDate: row["document_date"],
|
|
2235
|
+
eventDate: row["event_date"],
|
|
2236
|
+
eventDateUncertaintyMs: row["event_date_uncertainty_ms"],
|
|
2237
|
+
eventDateSource: row["event_date_source"] ?? "",
|
|
2238
|
+
};
|
|
2239
|
+
}
|
|
2240
|
+
// ── Vector Embeddings ──────────────────────────────────────
|
|
2241
|
+
/**
|
|
2242
|
+
* Store a vector embedding for a memory entry.
|
|
2243
|
+
* Uses trigram-based local embeddings by default (zero API calls).
|
|
2244
|
+
*/
|
|
2245
|
+
storeEmbedding(entryId, embedding, model = "local-trigram") {
|
|
2246
|
+
this.db
|
|
2247
|
+
.prepare(`
|
|
2248
|
+
INSERT OR REPLACE INTO memory_vectors (entry_id, embedding, model, dimensions)
|
|
2249
|
+
VALUES (?, ?, ?, ?)
|
|
2250
|
+
`)
|
|
2251
|
+
.run(entryId, Buffer.from(embedding.buffer), model, embedding.length);
|
|
2252
|
+
}
|
|
2253
|
+
/**
|
|
2254
|
+
* Generate a local trigram-based embedding (no API needed).
|
|
2255
|
+
* Not as good as nomic-embed-text but works offline.
|
|
2256
|
+
*/
|
|
2257
|
+
generateLocalEmbedding(text) {
|
|
2258
|
+
const normalized = text.toLowerCase().replace(/[^a-z0-9\s]/g, "");
|
|
2259
|
+
const words = normalized.split(/\s+/).filter(Boolean);
|
|
2260
|
+
// Simple bag-of-trigrams → fixed-size vector via hashing
|
|
2261
|
+
const DIMS = 256;
|
|
2262
|
+
const vec = new Float32Array(DIMS);
|
|
2263
|
+
for (const word of words) {
|
|
2264
|
+
for (let i = 0; i <= word.length - 3; i++) {
|
|
2265
|
+
const trigram = word.slice(i, i + 3);
|
|
2266
|
+
let hash = 0;
|
|
2267
|
+
for (let j = 0; j < trigram.length; j++) {
|
|
2268
|
+
hash = ((hash << 5) - hash + trigram.charCodeAt(j)) | 0;
|
|
2269
|
+
}
|
|
2270
|
+
const idx = Math.abs(hash) % DIMS;
|
|
2271
|
+
vec[idx] = (vec[idx] ?? 0) + 1;
|
|
2272
|
+
}
|
|
2273
|
+
}
|
|
2274
|
+
// L2 normalize
|
|
2275
|
+
let norm = 0;
|
|
2276
|
+
for (let i = 0; i < DIMS; i++)
|
|
2277
|
+
norm += (vec[i] ?? 0) * (vec[i] ?? 0);
|
|
2278
|
+
norm = Math.sqrt(norm);
|
|
2279
|
+
if (norm > 0) {
|
|
2280
|
+
for (let i = 0; i < DIMS; i++)
|
|
2281
|
+
vec[i] = (vec[i] ?? 0) / norm;
|
|
2282
|
+
}
|
|
2283
|
+
return vec;
|
|
2284
|
+
}
|
|
2285
|
+
/**
|
|
2286
|
+
* Cosine similarity between two embeddings.
|
|
2287
|
+
*/
|
|
2288
|
+
cosineSimilarity(a, b) {
|
|
2289
|
+
let dot = 0;
|
|
2290
|
+
let normA = 0;
|
|
2291
|
+
let normB = 0;
|
|
2292
|
+
const len = Math.min(a.length, b.length);
|
|
2293
|
+
for (let i = 0; i < len; i++) {
|
|
2294
|
+
dot += (a[i] ?? 0) * (b[i] ?? 0);
|
|
2295
|
+
normA += (a[i] ?? 0) * (a[i] ?? 0);
|
|
2296
|
+
normB += (b[i] ?? 0) * (b[i] ?? 0);
|
|
2297
|
+
}
|
|
2298
|
+
const denom = Math.sqrt(normA) * Math.sqrt(normB);
|
|
2299
|
+
return denom > 0 ? dot / denom : 0;
|
|
2300
|
+
}
|
|
2301
|
+
/**
|
|
2302
|
+
* Vector similarity search across all memory entries with embeddings.
|
|
2303
|
+
* Optional domainFilter narrows the candidate set to entries in the specified
|
|
2304
|
+
* domains (MemPalace-style partition). Up to +34% retrieval improvement.
|
|
2305
|
+
*/
|
|
2306
|
+
vectorSearch(query, limit = 10, options) {
|
|
2307
|
+
const queryEmbedding = this.generateLocalEmbedding(query);
|
|
2308
|
+
const domainFilter = options?.domainFilter ?? [];
|
|
2309
|
+
const hasDomainFilter = domainFilter.length > 0;
|
|
2310
|
+
const sqlParts = [
|
|
2311
|
+
"SELECT mv.entry_id, mv.embedding, mv.dimensions",
|
|
2312
|
+
"FROM memory_vectors mv",
|
|
2313
|
+
"JOIN memory_entries me ON me.id = mv.entry_id",
|
|
2314
|
+
"WHERE me.archived = 0",
|
|
2315
|
+
];
|
|
2316
|
+
const params = [];
|
|
2317
|
+
if (hasDomainFilter) {
|
|
2318
|
+
const placeholders = domainFilter.map(() => "?").join(", ");
|
|
2319
|
+
sqlParts.push(`AND me.domain IN (${placeholders})`);
|
|
2320
|
+
for (const d of domainFilter)
|
|
2321
|
+
params.push(d);
|
|
2322
|
+
}
|
|
2323
|
+
const rows = this.db.prepare(sqlParts.join(" ")).all(...params);
|
|
2324
|
+
const scored = rows.map((row) => {
|
|
2325
|
+
const embedding = new Float32Array(row.embedding.buffer, row.embedding.byteOffset, row.dimensions);
|
|
2326
|
+
const similarity = this.cosineSimilarity(queryEmbedding, embedding);
|
|
2327
|
+
return { entryId: row.entry_id, similarity };
|
|
2328
|
+
});
|
|
2329
|
+
scored.sort((a, b) => b.similarity - a.similarity);
|
|
2330
|
+
return scored
|
|
2331
|
+
.slice(0, limit)
|
|
2332
|
+
.map((s) => ({
|
|
2333
|
+
entryId: s.entryId,
|
|
2334
|
+
similarity: s.similarity,
|
|
2335
|
+
entry: this.getById(s.entryId),
|
|
2336
|
+
}))
|
|
2337
|
+
.filter((r) => r.entry !== null);
|
|
2338
|
+
}
|
|
2339
|
+
// ── Reciprocal Rank Fusion Search ──────────────────────────
|
|
2340
|
+
/**
|
|
2341
|
+
* Hybrid search combining FTS5 (BM25), vector similarity, temporal recency,
|
|
2342
|
+
* and access frequency using Reciprocal Rank Fusion.
|
|
2343
|
+
* Optional domainFilter narrows every signal to entries in the specified domains.
|
|
2344
|
+
*/
|
|
2345
|
+
hybridSearch(query, limit = 10, options) {
|
|
2346
|
+
const K = 60; // RRF constant
|
|
2347
|
+
const domainFilter = options?.domainFilter ?? [];
|
|
2348
|
+
const hasDomainFilter = domainFilter.length > 0;
|
|
2349
|
+
// Signal 1: FTS5 BM25
|
|
2350
|
+
const ftsResults = this.search(query, limit * 2, { domainFilter });
|
|
2351
|
+
const ftsRanks = new Map();
|
|
2352
|
+
ftsResults.forEach((r, i) => ftsRanks.set(r.entry.id, i + 1));
|
|
2353
|
+
// Signal 2: Vector similarity
|
|
2354
|
+
const vecResults = this.vectorSearch(query, limit * 2, { domainFilter });
|
|
2355
|
+
const vecRanks = new Map();
|
|
2356
|
+
vecResults.forEach((r, i) => vecRanks.set(r.entryId, i + 1));
|
|
2357
|
+
// Signal 3: Temporal recency (all non-archived entries sorted by date)
|
|
2358
|
+
let recentSql = "SELECT id FROM memory_entries WHERE archived = 0";
|
|
2359
|
+
const recentParams = [];
|
|
2360
|
+
if (hasDomainFilter) {
|
|
2361
|
+
const placeholders = domainFilter.map(() => "?").join(", ");
|
|
2362
|
+
recentSql += ` AND domain IN (${placeholders})`;
|
|
2363
|
+
for (const d of domainFilter)
|
|
2364
|
+
recentParams.push(d);
|
|
2365
|
+
}
|
|
2366
|
+
recentSql += " ORDER BY updated_at DESC LIMIT ?";
|
|
2367
|
+
recentParams.push(limit * 3);
|
|
2368
|
+
const recentRows = this.db.prepare(recentSql).all(...recentParams);
|
|
2369
|
+
const recencyRanks = new Map();
|
|
2370
|
+
recentRows.forEach((r, i) => recencyRanks.set(r.id, i + 1));
|
|
2371
|
+
// Signal 4: Access frequency
|
|
2372
|
+
let freqSql = "SELECT id FROM memory_entries WHERE archived = 0";
|
|
2373
|
+
const freqParams = [];
|
|
2374
|
+
if (hasDomainFilter) {
|
|
2375
|
+
const placeholders = domainFilter.map(() => "?").join(", ");
|
|
2376
|
+
freqSql += ` AND domain IN (${placeholders})`;
|
|
2377
|
+
for (const d of domainFilter)
|
|
2378
|
+
freqParams.push(d);
|
|
2379
|
+
}
|
|
2380
|
+
freqSql += " ORDER BY access_count DESC LIMIT ?";
|
|
2381
|
+
freqParams.push(limit * 3);
|
|
2382
|
+
const freqRows = this.db.prepare(freqSql).all(...freqParams);
|
|
2383
|
+
const freqRanks = new Map();
|
|
2384
|
+
freqRows.forEach((r, i) => freqRanks.set(r.id, i + 1));
|
|
2385
|
+
// Merge all candidate IDs
|
|
2386
|
+
const allIds = new Set([
|
|
2387
|
+
...ftsRanks.keys(),
|
|
2388
|
+
...vecRanks.keys(),
|
|
2389
|
+
...recencyRanks.keys(),
|
|
2390
|
+
...freqRanks.keys(),
|
|
2391
|
+
]);
|
|
2392
|
+
// Compute RRF score
|
|
2393
|
+
const scored = [];
|
|
2394
|
+
for (const id of allIds) {
|
|
2395
|
+
const ftsRank = ftsRanks.get(id) ?? Infinity;
|
|
2396
|
+
const vecRank = vecRanks.get(id) ?? Infinity;
|
|
2397
|
+
const recRank = recencyRanks.get(id) ?? Infinity;
|
|
2398
|
+
const freqRank = freqRanks.get(id) ?? Infinity;
|
|
2399
|
+
const score = (ftsRank < Infinity ? 1 / (K + ftsRank) : 0) * 0.4 +
|
|
2400
|
+
(vecRank < Infinity ? 1 / (K + vecRank) : 0) * 0.3 +
|
|
2401
|
+
(recRank < Infinity ? 1 / (K + recRank) : 0) * 0.2 +
|
|
2402
|
+
(freqRank < Infinity ? 1 / (K + freqRank) : 0) * 0.1;
|
|
2403
|
+
scored.push({ id, score });
|
|
2404
|
+
}
|
|
2405
|
+
scored.sort((a, b) => b.score - a.score);
|
|
2406
|
+
const results = [];
|
|
2407
|
+
for (const s of scored.slice(0, limit)) {
|
|
2408
|
+
const entry = this.getById(s.id);
|
|
2409
|
+
if (!entry)
|
|
2410
|
+
continue;
|
|
2411
|
+
results.push({
|
|
2412
|
+
entry,
|
|
2413
|
+
score: s.score,
|
|
2414
|
+
snippet: entry.value.slice(0, 200),
|
|
2415
|
+
matchType: "hybrid",
|
|
2416
|
+
});
|
|
2417
|
+
}
|
|
2418
|
+
return results;
|
|
2419
|
+
}
|
|
2420
|
+
// ── Semantic retrieval cache (Phase 2 P1-M7) ───────────────
|
|
2421
|
+
/**
|
|
2422
|
+
* Phase 2 P1-M7: expose the semantic-cache backend via MemoryStore
|
|
2423
|
+
* so callers can build a deduped retrieval cache without importing
|
|
2424
|
+
* semantic-cache directly. The cache's lifetime is the store's
|
|
2425
|
+
* lifetime; call `clearRetrievalCache()` to reset or
|
|
2426
|
+
* `getRetrievalCacheStats()` to observe.
|
|
2427
|
+
*/
|
|
2428
|
+
retrievalCache = null;
|
|
2429
|
+
getRetrievalCache(options) {
|
|
2430
|
+
if (!this.retrievalCache) {
|
|
2431
|
+
this.retrievalCache = new SemanticCache({
|
|
2432
|
+
similarityThreshold: options?.similarityThreshold ?? 0.9,
|
|
2433
|
+
maxEntries: options?.maxEntries ?? 200,
|
|
2434
|
+
ttlMs: options?.ttlMs ?? 10 * 60 * 1000,
|
|
2435
|
+
embed: options?.embed ?? (async (text) => bigramEmbedding(text)),
|
|
2436
|
+
});
|
|
2437
|
+
}
|
|
2438
|
+
return this.retrievalCache;
|
|
2439
|
+
}
|
|
2440
|
+
/**
|
|
2441
|
+
* Phase 2 P1-M7: cached wrapper around search() — returns previously
|
|
2442
|
+
* computed results when the query embedding is near-identical to a
|
|
2443
|
+
* prior miss. Miss falls through to live search, result is cached.
|
|
2444
|
+
*/
|
|
2445
|
+
async cachedSearch(query, limit = 10, options) {
|
|
2446
|
+
const cache = this.getRetrievalCache(options);
|
|
2447
|
+
const hit = await cache.get(query);
|
|
2448
|
+
if (hit !== null)
|
|
2449
|
+
return hit;
|
|
2450
|
+
const live = this.search(query, limit);
|
|
2451
|
+
await cache.set(query, live);
|
|
2452
|
+
return live;
|
|
2453
|
+
}
|
|
2454
|
+
/** Phase 2 P1-M7: cache observability — hit/miss/eviction counters. */
|
|
2455
|
+
getRetrievalCacheStats() {
|
|
2456
|
+
return this.retrievalCache?.stats() ?? null;
|
|
2457
|
+
}
|
|
2458
|
+
/** Phase 2 P1-M7: clear the retrieval cache. */
|
|
2459
|
+
clearRetrievalCache() {
|
|
2460
|
+
this.retrievalCache?.clear();
|
|
2461
|
+
}
|
|
2462
|
+
// ── Memory benchmark (Phase 2 P1-M7) ───────────────────────
|
|
2463
|
+
/**
|
|
2464
|
+
* Phase 2 P1-M7: run the LongMemEval-style memory benchmark against
|
|
2465
|
+
* this store. Wires the MemoryBenchmark orphan into MemoryStore —
|
|
2466
|
+
* callers just say `store.runMemoryBenchmark()` and receive a
|
|
2467
|
+
* scored BenchmarkSuite. Optional category lets callers run only a
|
|
2468
|
+
* specific slice (e.g. "adversarial", "partitioned").
|
|
2469
|
+
*/
|
|
2470
|
+
runMemoryBenchmark(category) {
|
|
2471
|
+
const bench = new MemoryBenchmark();
|
|
2472
|
+
const adapter = {
|
|
2473
|
+
insert: (entry) => {
|
|
2474
|
+
this.insert({
|
|
2475
|
+
id: entry.id,
|
|
2476
|
+
layer: entry.layer,
|
|
2477
|
+
blockType: entry.blockType,
|
|
2478
|
+
key: entry.key,
|
|
2479
|
+
value: entry.value,
|
|
2480
|
+
verified: entry.verified,
|
|
2481
|
+
freshnessScore: entry.freshnessScore,
|
|
2482
|
+
confidenceLevel: entry.confidenceLevel,
|
|
2483
|
+
verificationStatus: entry.verificationStatus,
|
|
2484
|
+
...(entry.domain ? { domain: entry.domain } : {}),
|
|
2485
|
+
...(entry.topic ? { topic: entry.topic } : {}),
|
|
2486
|
+
});
|
|
2487
|
+
},
|
|
2488
|
+
search: (query, limit) => {
|
|
2489
|
+
const safe = sanitizeForFts5(query);
|
|
2490
|
+
if (!safe)
|
|
2491
|
+
return [];
|
|
2492
|
+
return this.search(safe, limit).map((r) => ({
|
|
2493
|
+
entry: { key: r.entry.key, value: r.entry.value },
|
|
2494
|
+
score: r.score,
|
|
2495
|
+
}));
|
|
2496
|
+
},
|
|
2497
|
+
searchPartitioned: (query, options) => {
|
|
2498
|
+
const safe = sanitizeForFts5(query);
|
|
2499
|
+
if (!safe)
|
|
2500
|
+
return [];
|
|
2501
|
+
return this.searchPartitioned(safe, options).map((r) => ({
|
|
2502
|
+
entry: { key: r.entry.key, value: r.entry.value },
|
|
2503
|
+
score: r.score,
|
|
2504
|
+
}));
|
|
2505
|
+
},
|
|
2506
|
+
};
|
|
2507
|
+
return category ? bench.runCategory(adapter, category) : bench.run(adapter);
|
|
2508
|
+
}
|
|
2509
|
+
// ── Agent-callable memory toolkit (Phase 2 P1-M7) ──────────
|
|
2510
|
+
/**
|
|
2511
|
+
* Phase 2 P1-M7: return a MemoryToolkit bound to this store.
|
|
2512
|
+
*
|
|
2513
|
+
* MemoryToolkit exposes memory_search / memory_replace / memory_insert
|
|
2514
|
+
* as agent-callable tools following the OpenAI function-calling
|
|
2515
|
+
* schema. Before this wire, the toolkit existed (580 LOC with tests)
|
|
2516
|
+
* but no caller instantiated it — agents couldn't actually invoke
|
|
2517
|
+
* memory operations by name.
|
|
2518
|
+
*
|
|
2519
|
+
* The adapter cast is safe because MemoryStore already implements
|
|
2520
|
+
* every method of MemoryToolStoreAdapter with the exact signatures
|
|
2521
|
+
* used by memory-tools.ts.
|
|
2522
|
+
*/
|
|
2523
|
+
createAgentToolkit() {
|
|
2524
|
+
return new MemoryToolkit(this);
|
|
2525
|
+
}
|
|
2526
|
+
/**
|
|
2527
|
+
* Phase 2 P1-M7: fetch the tool definitions (name + schema) for
|
|
2528
|
+
* registering memory ops with a provider that supports function
|
|
2529
|
+
* calling. Convenience so callers don't need to construct a
|
|
2530
|
+
* MemoryToolkit just to read definitions.
|
|
2531
|
+
*/
|
|
2532
|
+
getMemoryToolDefinitions() {
|
|
2533
|
+
return this.createAgentToolkit().getToolDefinitions();
|
|
2534
|
+
}
|
|
2535
|
+
/**
|
|
2536
|
+
* Phase 2 P1-M7: dispatch a memory tool by name. Returns the result
|
|
2537
|
+
* envelope with success/error + data payload. Agents pass the
|
|
2538
|
+
* tool_name + arguments received from the provider.
|
|
2539
|
+
*/
|
|
2540
|
+
dispatchMemoryTool(toolName, args) {
|
|
2541
|
+
return this.createAgentToolkit().dispatch(toolName, args);
|
|
2542
|
+
}
|
|
2543
|
+
// ── Phase 2 P1-M3: Mem0 v3 agent-facts wrappers ───────────
|
|
2544
|
+
//
|
|
2545
|
+
// Thin forwarders to the agent-facts module so callers holding a
|
|
2546
|
+
// MemoryStore can record and retrieve Mem0 v3 agent-scoped facts
|
|
2547
|
+
// without a second import. The actual tag-encoding / filter logic
|
|
2548
|
+
// lives in `agent-facts.ts` (single source of truth — Quality
|
|
2549
|
+
// Bar #11). These wrappers exist to keep the API symmetric with
|
|
2550
|
+
// other MemoryStore capabilities (e.g., recordEntity, searchPalace).
|
|
2551
|
+
//
|
|
2552
|
+
// Lazy import pattern avoids any circular-module-load edge case
|
|
2553
|
+
// with `agent-facts.ts` which imports MemoryStore as a type. Using
|
|
2554
|
+
// `import()` at call time would make these async; we use a cached
|
|
2555
|
+
// module reference instead to keep the API synchronous.
|
|
2556
|
+
/**
|
|
2557
|
+
* Phase 2 P1-M3: record an ADD-only agent-fact. Delegates to
|
|
2558
|
+
* `recordAgentFact` in `agent-facts.ts`. Honest failure on empty
|
|
2559
|
+
* agentId bubbles up — caller must provide a non-empty identity.
|
|
2560
|
+
*/
|
|
2561
|
+
recordAgentFact(fact) {
|
|
2562
|
+
// Synchronous require via eagerly-resolved module ref. The
|
|
2563
|
+
// `agent-facts` module depends only on MemoryStore as a type so
|
|
2564
|
+
// the cycle is harmless at runtime; the lazy binding keeps
|
|
2565
|
+
// initialisation order independent of load order.
|
|
2566
|
+
const mod = getAgentFactsModule();
|
|
2567
|
+
mod.recordAgentFact(this, fact);
|
|
2568
|
+
}
|
|
2569
|
+
/**
|
|
2570
|
+
* Phase 2 P1-M3: retrieve agent-facts scoped to an agent identity.
|
|
2571
|
+
* Delegates to `retrieveAgentFacts` in `agent-facts.ts`.
|
|
2572
|
+
*/
|
|
2573
|
+
retrieveAgentFacts(opts) {
|
|
2574
|
+
const mod = getAgentFactsModule();
|
|
2575
|
+
return mod.retrieveAgentFacts(this, opts);
|
|
2576
|
+
}
|
|
2577
|
+
// ── Memvid portable export/import (Phase 2 P1-M7) ──────────
|
|
2578
|
+
/**
|
|
2579
|
+
* Phase 2 P1-M7: export all non-archived memory_entries to a
|
|
2580
|
+
* portable MemvidFile (JSON). Useful for sharing memory between
|
|
2581
|
+
* machines or backing up for review.
|
|
2582
|
+
*
|
|
2583
|
+
* Wires the orphan MemvidBackend into the MemoryStore export path.
|
|
2584
|
+
* The returned MemvidFile can be written to disk with
|
|
2585
|
+
* `JSON.stringify(file, null, 2)` or passed to another
|
|
2586
|
+
* store.importFromMemvid() on a different machine.
|
|
2587
|
+
*/
|
|
2588
|
+
exportToMemvid(options) {
|
|
2589
|
+
const { outputPath, ...exportOptions } = options ?? {};
|
|
2590
|
+
// Build a transient memvid backend. We don't persist to disk from
|
|
2591
|
+
// the store itself (caller decides where to write).
|
|
2592
|
+
const tempPath = outputPath ?? join(process.cwd(), ".wotann", "memvid-export.json");
|
|
2593
|
+
const backend = new MemvidBackend(tempPath);
|
|
2594
|
+
const rows = this.db
|
|
2595
|
+
.prepare(`SELECT id, key, value, tags, confidence, block_type, domain, topic, updated_at
|
|
2596
|
+
FROM memory_entries WHERE archived = 0`)
|
|
2597
|
+
.all();
|
|
2598
|
+
for (const r of rows) {
|
|
2599
|
+
backend.save({
|
|
2600
|
+
key: String(r["key"]),
|
|
2601
|
+
value: String(r["value"]),
|
|
2602
|
+
category: String(r["block_type"] ?? "general"),
|
|
2603
|
+
tags: r["tags"] ? r["tags"].split(",").filter(Boolean) : [],
|
|
2604
|
+
confidence: Number(r["confidence"] ?? 1.0),
|
|
2605
|
+
metadata: {
|
|
2606
|
+
sourceId: String(r["id"]),
|
|
2607
|
+
...(r["domain"] ? { domain: String(r["domain"]) } : {}),
|
|
2608
|
+
...(r["topic"] ? { topic: String(r["topic"]) } : {}),
|
|
2609
|
+
},
|
|
2610
|
+
});
|
|
2611
|
+
}
|
|
2612
|
+
return backend.export(exportOptions);
|
|
2613
|
+
}
|
|
2614
|
+
/**
|
|
2615
|
+
* Phase 2 P1-M7: import entries from a MemvidFile into memory_entries.
|
|
2616
|
+
* Delegates per-entry de-dup to the MemvidBackend then replays
|
|
2617
|
+
* unique entries into the store as core_blocks rows.
|
|
2618
|
+
*
|
|
2619
|
+
* Returns a MemvidImportResult with imported / skipped / duplicate
|
|
2620
|
+
* counts. The import is idempotent-by-key for the memvid layer but
|
|
2621
|
+
* creates fresh memory_entries rows (caller can dedupe via domain
|
|
2622
|
+
* or block_type after the fact).
|
|
2623
|
+
*/
|
|
2624
|
+
importFromMemvid(file) {
|
|
2625
|
+
let imported = 0;
|
|
2626
|
+
let duplicates = 0;
|
|
2627
|
+
const errors = [];
|
|
2628
|
+
const insertTx = this.db.transaction(() => {
|
|
2629
|
+
for (const entry of file.entries) {
|
|
2630
|
+
try {
|
|
2631
|
+
const existing = this.db
|
|
2632
|
+
.prepare(`SELECT id FROM memory_entries WHERE key = ? LIMIT 1`)
|
|
2633
|
+
.get(entry.key);
|
|
2634
|
+
if (existing) {
|
|
2635
|
+
duplicates++;
|
|
2636
|
+
continue;
|
|
2637
|
+
}
|
|
2638
|
+
this.insert({
|
|
2639
|
+
id: randomUUID(),
|
|
2640
|
+
layer: "core_blocks",
|
|
2641
|
+
blockType: blockTypeFromMemvid(entry.category),
|
|
2642
|
+
key: entry.key,
|
|
2643
|
+
value: entry.value,
|
|
2644
|
+
verified: false,
|
|
2645
|
+
confidence: entry.confidence,
|
|
2646
|
+
tags: entry.tags.join(","),
|
|
2647
|
+
freshnessScore: 1.0,
|
|
2648
|
+
confidenceLevel: entry.confidence,
|
|
2649
|
+
verificationStatus: "unverified",
|
|
2650
|
+
});
|
|
2651
|
+
imported++;
|
|
2652
|
+
}
|
|
2653
|
+
catch (err) {
|
|
2654
|
+
errors.push(`Failed to import "${entry.key}": ${err instanceof Error ? err.message : String(err)}`);
|
|
2655
|
+
}
|
|
2656
|
+
}
|
|
2657
|
+
});
|
|
2658
|
+
insertTx();
|
|
2659
|
+
return { imported, skipped: errors.length, duplicates, errors };
|
|
2660
|
+
}
|
|
2661
|
+
// ── Hybrid Retriever Framework (Phase 2 P1-M7) ─────────────
|
|
2662
|
+
/**
|
|
2663
|
+
* Phase 2 P1-M7: pluggable retriever-chain search.
|
|
2664
|
+
*
|
|
2665
|
+
* Wraps `hybrid-retrieval.hybridSearch`: a generic retriever-framework
|
|
2666
|
+
* with RRF fusion + optional reranker. Complements the existing
|
|
2667
|
+
* `hybridSearch()` (which hard-codes FTS5 + vector + recency + freq)
|
|
2668
|
+
* by letting callers supply arbitrary Retriever / Reranker
|
|
2669
|
+
* combinations.
|
|
2670
|
+
*
|
|
2671
|
+
* Default retrievers: the lexical retriever from hybrid-retrieval.
|
|
2672
|
+
* Callers can pass additional retrievers (e.g. a dense-vector one) or
|
|
2673
|
+
* a reranker via the `config` param.
|
|
2674
|
+
*/
|
|
2675
|
+
async hybridRetrieverSearch(query, config) {
|
|
2676
|
+
// Pull all non-archived entries into the searchable shape.
|
|
2677
|
+
const rows = this.db
|
|
2678
|
+
.prepare(`SELECT id, key, value, tags, domain, topic, document_date
|
|
2679
|
+
FROM memory_entries WHERE archived = 0 ORDER BY updated_at DESC LIMIT 500`)
|
|
2680
|
+
.all();
|
|
2681
|
+
const entries = rows.map((r) => ({
|
|
2682
|
+
id: String(r["id"]),
|
|
2683
|
+
content: `${String(r["key"] ?? "")} ${String(r["value"] ?? "")}`.trim(),
|
|
2684
|
+
...(r["tags"] ? { metadata: { tags: String(r["tags"]) } } : {}),
|
|
2685
|
+
...(r["document_date"] ? { timestamp: Number(r["document_date"]) } : {}),
|
|
2686
|
+
}));
|
|
2687
|
+
const retrievers = config?.retrievers ?? [createLexicalRetriever()];
|
|
2688
|
+
const merged = {
|
|
2689
|
+
retrievers,
|
|
2690
|
+
...(config?.reranker ? { reranker: config.reranker } : {}),
|
|
2691
|
+
...(config?.fusionK !== undefined ? { fusionK: config.fusionK } : {}),
|
|
2692
|
+
...(config?.topKBeforeRerank !== undefined
|
|
2693
|
+
? { topKBeforeRerank: config.topKBeforeRerank }
|
|
2694
|
+
: {}),
|
|
2695
|
+
topK: config?.topK ?? config?.limit ?? 10,
|
|
2696
|
+
...(config?.parallel !== undefined ? { parallel: config.parallel } : {}),
|
|
2697
|
+
};
|
|
2698
|
+
return hybridRetrieverSearch(query, entries, merged);
|
|
2699
|
+
}
|
|
2700
|
+
/**
|
|
2701
|
+
* Phase 2 P1-M7: factory for a default lexical retriever. Thin
|
|
2702
|
+
* convenience so callers can build a HybridRetrievalConfig without
|
|
2703
|
+
* importing hybrid-retrieval directly.
|
|
2704
|
+
*/
|
|
2705
|
+
createLexicalRetriever() {
|
|
2706
|
+
return createLexicalRetriever();
|
|
2707
|
+
}
|
|
2708
|
+
/**
|
|
2709
|
+
* Phase 2 P1-M7: factory for a default vector retriever backed by
|
|
2710
|
+
* a caller-supplied embedding function.
|
|
2711
|
+
*/
|
|
2712
|
+
createVectorRetriever(embed) {
|
|
2713
|
+
return createVectorRetriever({ embed });
|
|
2714
|
+
}
|
|
2715
|
+
/**
|
|
2716
|
+
* Phase 2 P1-M7: reranker used by the retriever-chain API when
|
|
2717
|
+
* supplied. Kept as a pass-through (caller implements their own).
|
|
2718
|
+
*/
|
|
2719
|
+
applyReranker(query, hits, reranker) {
|
|
2720
|
+
return reranker.rerank(query, hits);
|
|
2721
|
+
}
|
|
2722
|
+
// ── Memory Freshness Scoring ───────────────────────────────
|
|
2723
|
+
/**
|
|
2724
|
+
* Compute the freshness-adjusted confidence for a memory entry.
|
|
2725
|
+
* confidence = base_confidence * decay(age) * verification_boost
|
|
2726
|
+
*/
|
|
2727
|
+
computeFreshness(entry) {
|
|
2728
|
+
const base = entry.confidence ?? 1.0;
|
|
2729
|
+
// Temporal decay: lose 1% per day, minimum 0.2
|
|
2730
|
+
let ageDays = 0;
|
|
2731
|
+
try {
|
|
2732
|
+
const updatedTime = new Date(entry.updatedAt).getTime();
|
|
2733
|
+
if (!isNaN(updatedTime)) {
|
|
2734
|
+
ageDays = (Date.now() - updatedTime) / (1000 * 60 * 60 * 24);
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
catch {
|
|
2738
|
+
/* default to 0 */
|
|
2739
|
+
}
|
|
2740
|
+
const decay = Math.max(0.2, 1.0 - ageDays * 0.01);
|
|
2741
|
+
// Verified memories decay 3x slower
|
|
2742
|
+
const verifiedBoost = entry.verified ? 1.0 : 0.7;
|
|
2743
|
+
return base * decay * verifiedBoost;
|
|
2744
|
+
}
|
|
2745
|
+
// ── Contradiction Detection ────────────────────────────────
|
|
2746
|
+
/**
|
|
2747
|
+
* Check if a new memory contradicts existing entries.
|
|
2748
|
+
* Uses keyword overlap + sentiment analysis to detect conflicts.
|
|
2749
|
+
*/
|
|
2750
|
+
detectContradictions(key, value) {
|
|
2751
|
+
const results = [];
|
|
2752
|
+
const existing = this.search(key, 10);
|
|
2753
|
+
for (const r of existing) {
|
|
2754
|
+
// Skip same-value entries
|
|
2755
|
+
if (r.entry.value === value)
|
|
2756
|
+
continue;
|
|
2757
|
+
// Check for direct contradiction keywords
|
|
2758
|
+
const existingLower = r.entry.value.toLowerCase();
|
|
2759
|
+
const newLower = value.toLowerCase();
|
|
2760
|
+
// Pattern: "uses X" vs "uses Y" (for same subject)
|
|
2761
|
+
const usesPatternExisting = existingLower.match(/uses?\s+(\w+)/);
|
|
2762
|
+
const usesPatternNew = newLower.match(/uses?\s+(\w+)/);
|
|
2763
|
+
if (usesPatternExisting && usesPatternNew && usesPatternExisting[1] !== usesPatternNew[1]) {
|
|
2764
|
+
results.push({
|
|
2765
|
+
existingEntry: r.entry,
|
|
2766
|
+
newValue: value,
|
|
2767
|
+
conflictType: "direct",
|
|
2768
|
+
confidence: 0.8,
|
|
2769
|
+
});
|
|
2770
|
+
continue;
|
|
2771
|
+
}
|
|
2772
|
+
// Pattern: negation words that flip meaning
|
|
2773
|
+
const negations = ["not", "never", "don't", "doesn't", "shouldn't", "disabled", "removed"];
|
|
2774
|
+
for (const neg of negations) {
|
|
2775
|
+
const existingHasNeg = existingLower.includes(neg);
|
|
2776
|
+
const newHasNeg = newLower.includes(neg);
|
|
2777
|
+
if (existingHasNeg !== newHasNeg && this.keywordOverlap(existingLower, newLower) > 0.5) {
|
|
2778
|
+
results.push({
|
|
2779
|
+
existingEntry: r.entry,
|
|
2780
|
+
newValue: value,
|
|
2781
|
+
conflictType: "indirect",
|
|
2782
|
+
confidence: 0.6,
|
|
2783
|
+
});
|
|
2784
|
+
break;
|
|
2785
|
+
}
|
|
2786
|
+
}
|
|
2787
|
+
}
|
|
2788
|
+
return results;
|
|
2789
|
+
}
|
|
2790
|
+
keywordOverlap(a, b) {
|
|
2791
|
+
const wordsA = new Set(a.split(/\s+/).filter((w) => w.length > 3));
|
|
2792
|
+
const wordsB = new Set(b.split(/\s+/).filter((w) => w.length > 3));
|
|
2793
|
+
if (wordsA.size === 0 || wordsB.size === 0)
|
|
2794
|
+
return 0;
|
|
2795
|
+
let overlap = 0;
|
|
2796
|
+
for (const w of wordsA) {
|
|
2797
|
+
if (wordsB.has(w))
|
|
2798
|
+
overlap++;
|
|
2799
|
+
}
|
|
2800
|
+
return overlap / Math.max(wordsA.size, wordsB.size);
|
|
2801
|
+
}
|
|
2802
|
+
// ── Provenance Logging ─────────────────────────────────────
|
|
2803
|
+
logProvenance(entryId, action, oldValue, newValue, actor, reason) {
|
|
2804
|
+
this.db
|
|
2805
|
+
.prepare(`
|
|
2806
|
+
INSERT INTO memory_provenance_log (id, entry_id, action, old_value, new_value, actor, reason)
|
|
2807
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
2808
|
+
`)
|
|
2809
|
+
.run(randomUUID(), entryId, action, oldValue, newValue, actor ?? null, reason ?? null);
|
|
2810
|
+
}
|
|
2811
|
+
getProvenance(entryId) {
|
|
2812
|
+
return this.db
|
|
2813
|
+
.prepare(`
|
|
2814
|
+
SELECT * FROM memory_provenance_log WHERE entry_id = ? ORDER BY created_at DESC
|
|
2815
|
+
`)
|
|
2816
|
+
.all(entryId);
|
|
2817
|
+
}
|
|
2818
|
+
// ── Insert with Provenance ─────────────────────────────────
|
|
2819
|
+
insertWithProvenance(entry, sourceType, sourceFile) {
|
|
2820
|
+
// Check for contradictions before inserting
|
|
2821
|
+
const contradictions = this.detectContradictions(entry.key, entry.value);
|
|
2822
|
+
// Phase H Task 1: dual-timestamp derivation on the provenance path.
|
|
2823
|
+
const derived = deriveIngestTimestamps(`${entry.key} ${entry.value}`);
|
|
2824
|
+
const documentDate = entry.documentDate ?? derived.documentDate;
|
|
2825
|
+
const eventDate = entry.eventDate ?? derived.eventDate;
|
|
2826
|
+
const eventDateUncertaintyMs = entry.eventDateUncertaintyMs ?? derived.eventDateUncertaintyMs;
|
|
2827
|
+
const eventDateSource = entry.eventDate !== undefined && entry.eventDateSource === undefined
|
|
2828
|
+
? "user-supplied"
|
|
2829
|
+
: (entry.eventDateSource ?? derived.eventDateSource);
|
|
2830
|
+
// Insert the entry with source metadata + dual timestamps.
|
|
2831
|
+
// Phase 2 P1-M8 Fix A — see insert() above; mirror the same confidence
|
|
2832
|
+
// column contract so the provenance path doesn't silently drop
|
|
2833
|
+
// confidenceLevel/freshnessScore/verificationStatus.
|
|
2834
|
+
const confidenceLevel = entry.confidenceLevel ?? entry.confidence ?? 0.5;
|
|
2835
|
+
const freshnessScore = entry.freshnessScore ?? 1.0;
|
|
2836
|
+
const verificationStatus = entry.verificationStatus ?? "unverified";
|
|
2837
|
+
this.db
|
|
2838
|
+
.prepare(`
|
|
2839
|
+
INSERT INTO memory_entries (id, layer, block_type, key, value, session_id, verified, confidence, tags, source_type, source_file, document_date, event_date, event_date_uncertainty_ms, event_date_source, freshness_score, confidence_level, verification_status)
|
|
2840
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
2841
|
+
`)
|
|
2842
|
+
.run(entry.id, entry.layer, entry.blockType, entry.key, entry.value, entry.sessionId ?? null, entry.verified ? 1 : 0, entry.confidence ?? 1.0, entry.tags ?? "", sourceType, sourceFile ?? null, documentDate, eventDate, eventDateUncertaintyMs, eventDateSource, freshnessScore, confidenceLevel, verificationStatus);
|
|
2843
|
+
// Generate and store local embedding
|
|
2844
|
+
const embedding = this.generateLocalEmbedding(`${entry.key} ${entry.value}`);
|
|
2845
|
+
this.storeEmbedding(entry.id, embedding);
|
|
2846
|
+
// Log provenance
|
|
2847
|
+
this.logProvenance(entry.id, "insert", null, entry.value, undefined, `source: ${sourceType}`);
|
|
2848
|
+
return { contradictions };
|
|
2849
|
+
}
|
|
2850
|
+
// ── Memory Freshness + Provenance Verification ─────────────
|
|
2851
|
+
/**
|
|
2852
|
+
* Compute a freshness score for a memory entry using exponential decay.
|
|
2853
|
+
* Score decays based on time since last update, with verified entries
|
|
2854
|
+
* decaying 3x slower than unverified ones.
|
|
2855
|
+
*
|
|
2856
|
+
* Returns a value between 0 and 1.
|
|
2857
|
+
*/
|
|
2858
|
+
computeFreshnessScore(entry) {
|
|
2859
|
+
const HALF_LIFE_DAYS_UNVERIFIED = 30;
|
|
2860
|
+
const HALF_LIFE_DAYS_VERIFIED = 90;
|
|
2861
|
+
let ageDays = 0;
|
|
2862
|
+
try {
|
|
2863
|
+
const updatedTime = new Date(entry.updatedAt).getTime();
|
|
2864
|
+
if (!isNaN(updatedTime)) {
|
|
2865
|
+
ageDays = Math.max(0, (Date.now() - updatedTime) / (1000 * 60 * 60 * 24));
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
catch {
|
|
2869
|
+
/* default to 0 */
|
|
2870
|
+
}
|
|
2871
|
+
const halfLife = entry.verified ? HALF_LIFE_DAYS_VERIFIED : HALF_LIFE_DAYS_UNVERIFIED;
|
|
2872
|
+
// Exponential decay: score = e^(-lambda * t), where lambda = ln(2) / half_life
|
|
2873
|
+
const lambda = Math.LN2 / halfLife;
|
|
2874
|
+
return Math.max(0, Math.min(1, Math.exp(-lambda * ageDays)));
|
|
2875
|
+
}
|
|
2876
|
+
/**
|
|
2877
|
+
* Verify a memory entry against the codebase by checking whether
|
|
2878
|
+
* the source file (if any) still exists and the entry's content
|
|
2879
|
+
* is still relevant. Updates verification status and freshness.
|
|
2880
|
+
*/
|
|
2881
|
+
verifyMemoryAgainstCodebase(entryId, workspaceDir) {
|
|
2882
|
+
const entry = this.getById(entryId);
|
|
2883
|
+
if (!entry) {
|
|
2884
|
+
return {
|
|
2885
|
+
entryId,
|
|
2886
|
+
previousStatus: "unverified",
|
|
2887
|
+
newStatus: "unverified",
|
|
2888
|
+
freshnessScore: 0,
|
|
2889
|
+
confidenceLevel: 0,
|
|
2890
|
+
reason: "Entry not found",
|
|
2891
|
+
};
|
|
2892
|
+
}
|
|
2893
|
+
const previousStatus = entry.verificationStatus;
|
|
2894
|
+
const freshness = this.computeFreshnessScore(entry);
|
|
2895
|
+
let newStatus = "unverified";
|
|
2896
|
+
let confidence = entry.confidenceLevel;
|
|
2897
|
+
let reason = "";
|
|
2898
|
+
// Check if source file still exists
|
|
2899
|
+
if (entry.sourceFile) {
|
|
2900
|
+
const fullPath = entry.sourceFile.startsWith("/")
|
|
2901
|
+
? entry.sourceFile
|
|
2902
|
+
: join(workspaceDir, entry.sourceFile);
|
|
2903
|
+
if (existsSync(fullPath)) {
|
|
2904
|
+
// File exists -- read it to check if content is still relevant
|
|
2905
|
+
try {
|
|
2906
|
+
const fileContent = readFileSync(fullPath, "utf-8");
|
|
2907
|
+
const keyWords = entry.key
|
|
2908
|
+
.toLowerCase()
|
|
2909
|
+
.split(/\s+/)
|
|
2910
|
+
.filter((w) => w.length > 3);
|
|
2911
|
+
const relevantWords = keyWords.filter((w) => fileContent.toLowerCase().includes(w));
|
|
2912
|
+
const relevanceRatio = keyWords.length > 0 ? relevantWords.length / keyWords.length : 0.5;
|
|
2913
|
+
if (relevanceRatio > 0.5) {
|
|
2914
|
+
newStatus = "verified";
|
|
2915
|
+
confidence = Math.min(1.0, 0.7 + relevanceRatio * 0.3);
|
|
2916
|
+
reason = `Source file exists, ${Math.round(relevanceRatio * 100)}% keyword match`;
|
|
2917
|
+
}
|
|
2918
|
+
else {
|
|
2919
|
+
newStatus = "stale";
|
|
2920
|
+
confidence = Math.max(0.1, relevanceRatio);
|
|
2921
|
+
reason = `Source file exists but content diverged (${Math.round(relevanceRatio * 100)}% match)`;
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
catch {
|
|
2925
|
+
newStatus = "stale";
|
|
2926
|
+
confidence = 0.3;
|
|
2927
|
+
reason = "Source file exists but unreadable";
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
else {
|
|
2931
|
+
newStatus = "stale";
|
|
2932
|
+
confidence = 0.1;
|
|
2933
|
+
reason = "Source file no longer exists";
|
|
2934
|
+
}
|
|
2935
|
+
}
|
|
2936
|
+
else {
|
|
2937
|
+
// No source file -- check contradictions
|
|
2938
|
+
const contradictions = this.detectContradictions(entry.key, entry.value);
|
|
2939
|
+
if (contradictions.length > 0) {
|
|
2940
|
+
newStatus = "conflicting";
|
|
2941
|
+
confidence = Math.max(0.1, confidence * 0.5);
|
|
2942
|
+
reason = `${contradictions.length} conflicting entries found`;
|
|
2943
|
+
}
|
|
2944
|
+
else if (freshness > 0.7) {
|
|
2945
|
+
newStatus = "verified";
|
|
2946
|
+
confidence = Math.min(1.0, confidence + 0.1);
|
|
2947
|
+
reason = "No contradictions, still fresh";
|
|
2948
|
+
}
|
|
2949
|
+
else {
|
|
2950
|
+
newStatus = "stale";
|
|
2951
|
+
confidence = freshness;
|
|
2952
|
+
reason = `No source file, freshness decayed to ${(freshness * 100).toFixed(0)}%`;
|
|
2953
|
+
}
|
|
2954
|
+
}
|
|
2955
|
+
// Persist the updated verification state
|
|
2956
|
+
const now = new Date().toISOString();
|
|
2957
|
+
this.db
|
|
2958
|
+
.prepare(`
|
|
2959
|
+
UPDATE memory_entries
|
|
2960
|
+
SET freshness_score = ?,
|
|
2961
|
+
confidence_level = ?,
|
|
2962
|
+
last_verified_at = ?,
|
|
2963
|
+
verification_status = ?,
|
|
2964
|
+
updated_at = datetime('now')
|
|
2965
|
+
WHERE id = ?
|
|
2966
|
+
`)
|
|
2967
|
+
.run(freshness, confidence, now, newStatus, entryId);
|
|
2968
|
+
// Log provenance for the verification
|
|
2969
|
+
this.logProvenance(entryId, "verify_against_codebase", previousStatus, newStatus, "system", reason);
|
|
2970
|
+
return {
|
|
2971
|
+
entryId,
|
|
2972
|
+
previousStatus,
|
|
2973
|
+
newStatus,
|
|
2974
|
+
freshnessScore: freshness,
|
|
2975
|
+
confidenceLevel: confidence,
|
|
2976
|
+
reason,
|
|
2977
|
+
};
|
|
2978
|
+
}
|
|
2979
|
+
/**
|
|
2980
|
+
* Batch-refresh freshness scores for all non-archived entries.
|
|
2981
|
+
* Returns the number of entries updated.
|
|
2982
|
+
*/
|
|
2983
|
+
refreshAllFreshnessScores() {
|
|
2984
|
+
const rows = this.db
|
|
2985
|
+
.prepare(`
|
|
2986
|
+
SELECT id, updated_at, verified, confidence FROM memory_entries WHERE archived = 0
|
|
2987
|
+
`)
|
|
2988
|
+
.all();
|
|
2989
|
+
let updated = 0;
|
|
2990
|
+
for (const row of rows) {
|
|
2991
|
+
const entry = this.rowToEntry(row);
|
|
2992
|
+
const freshness = this.computeFreshnessScore(entry);
|
|
2993
|
+
const currentFreshness = row["freshness_score"] ?? 1.0;
|
|
2994
|
+
// Only update if the score has changed meaningfully
|
|
2995
|
+
if (Math.abs(freshness - currentFreshness) > 0.01) {
|
|
2996
|
+
this.db
|
|
2997
|
+
.prepare(`
|
|
2998
|
+
UPDATE memory_entries SET freshness_score = ? WHERE id = ?
|
|
2999
|
+
`)
|
|
3000
|
+
.run(freshness, row["id"]);
|
|
3001
|
+
updated++;
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
return updated;
|
|
3005
|
+
}
|
|
3006
|
+
/**
|
|
3007
|
+
* Get entries that need verification (stale or unverified with low freshness).
|
|
3008
|
+
*/
|
|
3009
|
+
getEntriesNeedingVerification(limit = 20) {
|
|
3010
|
+
const rows = this.db
|
|
3011
|
+
.prepare(`
|
|
3012
|
+
SELECT * FROM memory_entries
|
|
3013
|
+
WHERE archived = 0
|
|
3014
|
+
AND (verification_status IN ('stale', 'unverified', 'conflicting')
|
|
3015
|
+
OR freshness_score < 0.5)
|
|
3016
|
+
ORDER BY freshness_score ASC
|
|
3017
|
+
LIMIT ?
|
|
3018
|
+
`)
|
|
3019
|
+
.all(limit);
|
|
3020
|
+
return rows.map((r) => this.rowToEntry(r));
|
|
3021
|
+
}
|
|
3022
|
+
/**
|
|
3023
|
+
* Delete auto_capture entries older than the retention window (S1-14).
|
|
3024
|
+
*
|
|
3025
|
+
* auto_capture logs every tool call's input/output — identical growth
|
|
3026
|
+
* profile to the audit trail. Pair a call to this with
|
|
3027
|
+
* AuditTrail.pruneOlderThan() on a daemon cron to keep
|
|
3028
|
+
* `~/.wotann/memory.db` bounded.
|
|
3029
|
+
*
|
|
3030
|
+
* Returns the number of rows removed. Idempotent.
|
|
3031
|
+
*/
|
|
3032
|
+
pruneAutoCaptures(days = 30) {
|
|
3033
|
+
const cutoff = new Date(Date.now() - days * 24 * 60 * 60 * 1000).toISOString();
|
|
3034
|
+
const info = this.db.prepare("DELETE FROM auto_capture WHERE created_at < ?").run(cutoff);
|
|
3035
|
+
return Number(info.changes);
|
|
3036
|
+
}
|
|
3037
|
+
// ── Incremental Indexer (Phase 2 P1-M7) ─────────────────────
|
|
3038
|
+
/**
|
|
3039
|
+
* Phase 2 P1-M7: file-indexing helpers wired into MemoryStore.
|
|
3040
|
+
*
|
|
3041
|
+
* The underlying IncrementalIndexer persists a SHA-per-file cache to
|
|
3042
|
+
* `~/.wotann/index-cache.json` so repeat indexing runs only re-read
|
|
3043
|
+
* files whose content actually changed. A lazy singleton keeps the
|
|
3044
|
+
* cache in memory for the store's lifetime.
|
|
3045
|
+
*/
|
|
3046
|
+
incrementalIndexer = null;
|
|
3047
|
+
getIncrementalIndexer(options) {
|
|
3048
|
+
if (!this.incrementalIndexer) {
|
|
3049
|
+
this.incrementalIndexer = new IncrementalIndexer(options ?? {});
|
|
3050
|
+
}
|
|
3051
|
+
return this.incrementalIndexer;
|
|
3052
|
+
}
|
|
3053
|
+
/**
|
|
3054
|
+
* Return only the paths that need re-indexing (new or SHA-changed).
|
|
3055
|
+
* First call loads the on-disk cache. Safe to call repeatedly.
|
|
3056
|
+
*/
|
|
3057
|
+
async getStaleFiles(paths, options) {
|
|
3058
|
+
const indexer = this.getIncrementalIndexer(options);
|
|
3059
|
+
await indexer.load();
|
|
3060
|
+
return indexer.getStaleFiles(paths);
|
|
3061
|
+
}
|
|
3062
|
+
/**
|
|
3063
|
+
* Record that a file has been indexed. Content-SHA is computed from
|
|
3064
|
+
* the supplied text so callers who already have the content in
|
|
3065
|
+
* memory don't pay an extra disk read.
|
|
3066
|
+
*/
|
|
3067
|
+
async markFileIndexed(path, content, chunksCount, options) {
|
|
3068
|
+
const indexer = this.getIncrementalIndexer(options);
|
|
3069
|
+
await indexer.load();
|
|
3070
|
+
const sha = computeContentSha(content);
|
|
3071
|
+
indexer.markIndexed(path, sha, chunksCount);
|
|
3072
|
+
await indexer.save();
|
|
3073
|
+
}
|
|
3074
|
+
/** Forget a path — used when a file is deleted. Persists immediately. */
|
|
3075
|
+
async forgetFileIndex(path, options) {
|
|
3076
|
+
const indexer = this.getIncrementalIndexer(options);
|
|
3077
|
+
await indexer.load();
|
|
3078
|
+
const removed = indexer.forget(path);
|
|
3079
|
+
if (removed)
|
|
3080
|
+
await indexer.save();
|
|
3081
|
+
return removed;
|
|
3082
|
+
}
|
|
3083
|
+
/** Stats on the in-memory index cache. */
|
|
3084
|
+
async getFileIndexStats(options) {
|
|
3085
|
+
const indexer = this.getIncrementalIndexer(options);
|
|
3086
|
+
await indexer.load();
|
|
3087
|
+
return indexer.stats();
|
|
3088
|
+
}
|
|
3089
|
+
// ── Typed Relationships (Phase H Task 2) ───────────────────
|
|
3090
|
+
/** Persist one typed relationship. Idempotent on id. */
|
|
3091
|
+
addRelationship(rel) {
|
|
3092
|
+
this.db
|
|
3093
|
+
.prepare(`INSERT OR REPLACE INTO memory_relationships
|
|
3094
|
+
(id, from_id, to_id, kind, confidence, rationale, invalidated_at, created_at)
|
|
3095
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`)
|
|
3096
|
+
.run(rel.id, rel.fromId, rel.toId, rel.kind, rel.confidence, rel.rationale ?? null, null, rel.createdAt);
|
|
3097
|
+
}
|
|
3098
|
+
/** Bulk-persist relationships in a single transaction. */
|
|
3099
|
+
addRelationships(rels) {
|
|
3100
|
+
if (rels.length === 0)
|
|
3101
|
+
return 0;
|
|
3102
|
+
const tx = this.db.transaction((items) => {
|
|
3103
|
+
for (const rel of items)
|
|
3104
|
+
this.addRelationship(rel);
|
|
3105
|
+
});
|
|
3106
|
+
tx(rels);
|
|
3107
|
+
return rels.length;
|
|
3108
|
+
}
|
|
3109
|
+
/**
|
|
3110
|
+
* Mark a relationship as invalidated. Used by
|
|
3111
|
+
* knowledge-update-dynamics when a successor supersedes a
|
|
3112
|
+
* predecessor — the predecessor's outbound non-updates edges are
|
|
3113
|
+
* stamped so readers can distinguish active from historical edges.
|
|
3114
|
+
*/
|
|
3115
|
+
invalidateRelationship(id, atMs = Date.now()) {
|
|
3116
|
+
const info = this.db
|
|
3117
|
+
.prepare(`UPDATE memory_relationships SET invalidated_at = ? WHERE id = ? AND invalidated_at IS NULL`)
|
|
3118
|
+
.run(atMs, id);
|
|
3119
|
+
return Number(info.changes) > 0;
|
|
3120
|
+
}
|
|
3121
|
+
/** Fetch all relationships touching a given memory_entries id. */
|
|
3122
|
+
getRelationshipsForEntry(entryId, options) {
|
|
3123
|
+
const includeInvalidated = options?.includeInvalidated ?? false;
|
|
3124
|
+
const conditions = ["(from_id = ? OR to_id = ?)"];
|
|
3125
|
+
const params = [entryId, entryId];
|
|
3126
|
+
if (options?.kind) {
|
|
3127
|
+
conditions.push("kind = ?");
|
|
3128
|
+
params.push(options.kind);
|
|
3129
|
+
}
|
|
3130
|
+
if (!includeInvalidated)
|
|
3131
|
+
conditions.push("invalidated_at IS NULL");
|
|
3132
|
+
const rows = this.db
|
|
3133
|
+
.prepare(`SELECT id, from_id, to_id, kind, confidence, rationale, created_at
|
|
3134
|
+
FROM memory_relationships
|
|
3135
|
+
WHERE ${conditions.join(" AND ")}
|
|
3136
|
+
ORDER BY created_at DESC`)
|
|
3137
|
+
.all(...params);
|
|
3138
|
+
return rows.map((r) => ({
|
|
3139
|
+
id: r["id"],
|
|
3140
|
+
fromId: r["from_id"],
|
|
3141
|
+
toId: r["to_id"],
|
|
3142
|
+
kind: r["kind"],
|
|
3143
|
+
confidence: r["confidence"] ?? 0.5,
|
|
3144
|
+
createdAt: r["created_at"] ?? 0,
|
|
3145
|
+
...(r["rationale"] ? { rationale: r["rationale"] } : {}),
|
|
3146
|
+
}));
|
|
3147
|
+
}
|
|
3148
|
+
/** All relationships — used by resolveLatest walkers + tests. */
|
|
3149
|
+
getAllRelationships(options) {
|
|
3150
|
+
const includeInvalidated = options?.includeInvalidated ?? false;
|
|
3151
|
+
const sql = includeInvalidated
|
|
3152
|
+
? `SELECT id, from_id, to_id, kind, confidence, rationale, created_at FROM memory_relationships ORDER BY created_at DESC`
|
|
3153
|
+
: `SELECT id, from_id, to_id, kind, confidence, rationale, created_at FROM memory_relationships WHERE invalidated_at IS NULL ORDER BY created_at DESC`;
|
|
3154
|
+
const rows = this.db.prepare(sql).all();
|
|
3155
|
+
return rows.map((r) => ({
|
|
3156
|
+
id: r["id"],
|
|
3157
|
+
fromId: r["from_id"],
|
|
3158
|
+
toId: r["to_id"],
|
|
3159
|
+
kind: r["kind"],
|
|
3160
|
+
confidence: r["confidence"] ?? 0.5,
|
|
3161
|
+
createdAt: r["created_at"] ?? 0,
|
|
3162
|
+
...(r["rationale"] ? { rationale: r["rationale"] } : {}),
|
|
3163
|
+
}));
|
|
3164
|
+
}
|
|
3165
|
+
// ── Phase 2 P1-M6: retrieval-mode dispatcher ─────────────────
|
|
3166
|
+
//
|
|
3167
|
+
// Cognee exposes a menu of ~14 retrieval modes. WOTANN owns 2 native
|
|
3168
|
+
// retrievers (FTS5 search, hybrid TEMPR) plus 10 narrow functions in
|
|
3169
|
+
// extended-search-types.ts. P1-M6 adds 12 more single-axis modes and
|
|
3170
|
+
// exposes them via a registry. `searchWithMode` is the store-level
|
|
3171
|
+
// dispatch entry: callers pass a mode name + options, we route
|
|
3172
|
+
// through the registry and inject a RetrievalContext pre-wired with
|
|
3173
|
+
// this store.
|
|
3174
|
+
//
|
|
3175
|
+
// Quality bar #3 (sibling-site scan): the registry is lazily
|
|
3176
|
+
// allocated — no cost to callers that never use a mode.
|
|
3177
|
+
retrievalRegistrySlot = null;
|
|
3178
|
+
getRetrievalRegistry() {
|
|
3179
|
+
if (this.retrievalRegistrySlot)
|
|
3180
|
+
return this.retrievalRegistrySlot;
|
|
3181
|
+
this.retrievalRegistrySlot = createDefaultRetrievalRegistry();
|
|
3182
|
+
return this.retrievalRegistrySlot;
|
|
3183
|
+
}
|
|
3184
|
+
/**
|
|
3185
|
+
* Register a custom retrieval mode on this store's registry. Callers
|
|
3186
|
+
* that want a custom mode (e.g. a domain-specific reranker) can push
|
|
3187
|
+
* it in here and then dispatch via `searchWithMode`.
|
|
3188
|
+
*/
|
|
3189
|
+
registerRetrievalMode(mode) {
|
|
3190
|
+
this.getRetrievalRegistry().register(mode);
|
|
3191
|
+
}
|
|
3192
|
+
/** List every retrieval mode name available on this store. */
|
|
3193
|
+
listRetrievalModes() {
|
|
3194
|
+
return this.getRetrievalRegistry()
|
|
3195
|
+
.list()
|
|
3196
|
+
.map((m) => m.name);
|
|
3197
|
+
}
|
|
3198
|
+
/**
|
|
3199
|
+
* Dispatch a retrieval mode by name. When the mode is not
|
|
3200
|
+
* registered, returns an empty result with an "unknown-mode"
|
|
3201
|
+
* scoring note rather than throwing. This keeps callers in callback
|
|
3202
|
+
* chains from needing to guard every dispatch.
|
|
3203
|
+
*/
|
|
3204
|
+
async searchWithMode(modeName, query, opts) {
|
|
3205
|
+
const registry = this.getRetrievalRegistry();
|
|
3206
|
+
const mode = registry.get(modeName);
|
|
3207
|
+
if (!mode) {
|
|
3208
|
+
return {
|
|
3209
|
+
mode: modeName,
|
|
3210
|
+
results: [],
|
|
3211
|
+
scoring: {
|
|
3212
|
+
method: "unknown-mode",
|
|
3213
|
+
isHeuristic: true,
|
|
3214
|
+
notes: `mode "${modeName}" is not registered`,
|
|
3215
|
+
},
|
|
3216
|
+
};
|
|
3217
|
+
}
|
|
3218
|
+
const ctx = { store: this };
|
|
3219
|
+
return mode.search(ctx, query, opts);
|
|
3220
|
+
}
|
|
3221
|
+
/**
|
|
3222
|
+
* V9 T14.2 — Register opt-in heavy / experimental retrieval
|
|
3223
|
+
* strategies onto this store's registry. Default-OFF: callers must
|
|
3224
|
+
* pass each flag explicitly. Each strategy delegates to a pure
|
|
3225
|
+
* orphan module (asmr-voter / community-detection / persona-tree)
|
|
3226
|
+
* and surfaces honest fallback semantics when its prerequisites
|
|
3227
|
+
* (entry pool, edge graph, etc.) aren't available.
|
|
3228
|
+
*
|
|
3229
|
+
* Returns the names registered so the caller can introspect.
|
|
3230
|
+
*/
|
|
3231
|
+
registerOptionalStrategies(opts) {
|
|
3232
|
+
const added = [];
|
|
3233
|
+
const store = this;
|
|
3234
|
+
if (opts.asmrVoter === true) {
|
|
3235
|
+
const asmrMode = {
|
|
3236
|
+
name: "asmr-voter",
|
|
3237
|
+
description: "Reciprocal-rank-fusion ensemble: run N base retrievers and majority-vote the top-K. Off by default; opt-in heavy retrieval.",
|
|
3238
|
+
search: async (_ctx, query, modeOpts) => {
|
|
3239
|
+
const limit = Math.max(1, modeOpts?.limit ?? 10);
|
|
3240
|
+
// Default ensemble: re-use the store's own search path twice
|
|
3241
|
+
// so the wire is exercised even without a custom retriever
|
|
3242
|
+
// panel. Callers that need real diversity inject specs via
|
|
3243
|
+
// modeOpts.params.retrievers.
|
|
3244
|
+
const params = modeOpts?.params ?? {};
|
|
3245
|
+
const customRetrievers = params
|
|
3246
|
+
.retrievers;
|
|
3247
|
+
const retrievers = customRetrievers ?? [
|
|
3248
|
+
{
|
|
3249
|
+
name: "fts-primary",
|
|
3250
|
+
retriever: async (q) => store.search(q, limit * 2),
|
|
3251
|
+
},
|
|
3252
|
+
{
|
|
3253
|
+
name: "fts-secondary",
|
|
3254
|
+
retriever: async (q) => store.search(q, limit),
|
|
3255
|
+
},
|
|
3256
|
+
];
|
|
3257
|
+
const vote = await runAsmrVoter(query, retrievers, { topK: limit });
|
|
3258
|
+
return {
|
|
3259
|
+
mode: "asmr-voter",
|
|
3260
|
+
results: vote.hits.map((h) => ({
|
|
3261
|
+
id: h.entry.id,
|
|
3262
|
+
content: h.entry.value,
|
|
3263
|
+
score: h.fusedScore,
|
|
3264
|
+
reason: `RRF across ${Object.keys(h.ranks).length} retrievers`,
|
|
3265
|
+
metadata: {
|
|
3266
|
+
ranks: h.ranks,
|
|
3267
|
+
hasPartialFailure: vote.hasPartialFailure,
|
|
3268
|
+
},
|
|
3269
|
+
})),
|
|
3270
|
+
scoring: {
|
|
3271
|
+
method: "rrf-ensemble",
|
|
3272
|
+
isHeuristic: vote.hasPartialFailure,
|
|
3273
|
+
...(vote.hasPartialFailure
|
|
3274
|
+
? { notes: "one or more retrievers failed; results degraded" }
|
|
3275
|
+
: {}),
|
|
3276
|
+
},
|
|
3277
|
+
};
|
|
3278
|
+
},
|
|
3279
|
+
};
|
|
3280
|
+
this.registerRetrievalMode(asmrMode);
|
|
3281
|
+
added.push(asmrMode.name);
|
|
3282
|
+
}
|
|
3283
|
+
if (opts.communityDetection === true) {
|
|
3284
|
+
const cdMode = {
|
|
3285
|
+
name: "community-detection",
|
|
3286
|
+
description: "Louvain community detection over the bi-temporal knowledge graph; pulls all members of the community a query-matched entity belongs to. Off by default.",
|
|
3287
|
+
search: async (ctx, query, modeOpts) => {
|
|
3288
|
+
const limit = Math.max(1, modeOpts?.limit ?? 10);
|
|
3289
|
+
const edges = ctx.edges;
|
|
3290
|
+
if (!edges || edges.length === 0) {
|
|
3291
|
+
// Honest fallback: no graph, no community pull-in. Still
|
|
3292
|
+
// surface the FTS hits so the mode never returns empty
|
|
3293
|
+
// when the store has matches.
|
|
3294
|
+
const fts = store.search(query, limit);
|
|
3295
|
+
return {
|
|
3296
|
+
mode: "community-detection",
|
|
3297
|
+
results: fts.map((r) => ({
|
|
3298
|
+
id: r.entry.id,
|
|
3299
|
+
content: r.entry.value,
|
|
3300
|
+
score: r.score,
|
|
3301
|
+
reason: "fts-only (no graph edges injected)",
|
|
3302
|
+
})),
|
|
3303
|
+
scoring: {
|
|
3304
|
+
method: "louvain-fallback-fts",
|
|
3305
|
+
isHeuristic: true,
|
|
3306
|
+
notes: "no edges in RetrievalContext; community detection skipped",
|
|
3307
|
+
},
|
|
3308
|
+
};
|
|
3309
|
+
}
|
|
3310
|
+
// The orphan helper takes BiTemporalEdge[]; the registry
|
|
3311
|
+
// ctx.edges is a lighter shape (RetrievalEdge). Adapt.
|
|
3312
|
+
const adaptedEdges = edges.map((e, i) => ({
|
|
3313
|
+
id: `ctx-edge-${i}`,
|
|
3314
|
+
sourceId: e.fromId,
|
|
3315
|
+
targetId: e.toId,
|
|
3316
|
+
relation: e.relation ?? "related",
|
|
3317
|
+
weight: e.weight ?? 1,
|
|
3318
|
+
validFrom: new Date(0).toISOString(),
|
|
3319
|
+
validTo: null,
|
|
3320
|
+
recordedFrom: new Date(0).toISOString(),
|
|
3321
|
+
recordedTo: null,
|
|
3322
|
+
}));
|
|
3323
|
+
const report = detectCommunities(adaptedEdges);
|
|
3324
|
+
const fts = store.search(query, limit);
|
|
3325
|
+
// Pull in community siblings of the top FTS hit to broaden
|
|
3326
|
+
// recall — this is the actual "community detection" boost.
|
|
3327
|
+
const top = fts[0];
|
|
3328
|
+
const siblings = top ? communityOf(report, top.entry.id) : null;
|
|
3329
|
+
return {
|
|
3330
|
+
mode: "community-detection",
|
|
3331
|
+
results: fts.map((r) => ({
|
|
3332
|
+
id: r.entry.id,
|
|
3333
|
+
content: r.entry.value,
|
|
3334
|
+
score: r.score,
|
|
3335
|
+
reason: siblings !== null ? `community ${siblings}` : "fts-hit",
|
|
3336
|
+
metadata: {
|
|
3337
|
+
modularity: report.modularity,
|
|
3338
|
+
communityCount: report.communities.length,
|
|
3339
|
+
},
|
|
3340
|
+
})),
|
|
3341
|
+
scoring: {
|
|
3342
|
+
method: "louvain",
|
|
3343
|
+
isHeuristic: false,
|
|
3344
|
+
notes: `${report.communities.length} communities, modularity=${report.modularity.toFixed(3)}`,
|
|
3345
|
+
},
|
|
3346
|
+
};
|
|
3347
|
+
},
|
|
3348
|
+
};
|
|
3349
|
+
this.registerRetrievalMode(cdMode);
|
|
3350
|
+
added.push(cdMode.name);
|
|
3351
|
+
}
|
|
3352
|
+
if (opts.personaTree === true) {
|
|
3353
|
+
const ptMode = {
|
|
3354
|
+
name: "persona-tree",
|
|
3355
|
+
description: "Hierarchical persona-tree retrieval: groups memories into topic/trait/persona levels then surfaces top entries from the matching subtree. Off by default.",
|
|
3356
|
+
search: async (_ctx, query, modeOpts) => {
|
|
3357
|
+
const limit = Math.max(1, modeOpts?.limit ?? 10);
|
|
3358
|
+
// Source entries: prefer ctx.entries when injected; otherwise
|
|
3359
|
+
// go through FTS so we never crash on empty stores.
|
|
3360
|
+
const ftsHits = store.search(query, limit * 4);
|
|
3361
|
+
if (ftsHits.length === 0) {
|
|
3362
|
+
return {
|
|
3363
|
+
mode: "persona-tree",
|
|
3364
|
+
results: [],
|
|
3365
|
+
scoring: {
|
|
3366
|
+
method: "tree-walk",
|
|
3367
|
+
isHeuristic: true,
|
|
3368
|
+
notes: "no matching memories",
|
|
3369
|
+
},
|
|
3370
|
+
};
|
|
3371
|
+
}
|
|
3372
|
+
const tree = buildPersonaTree(ftsHits.map((h) => h.entry));
|
|
3373
|
+
// Walk the tree to find leaves whose memoryId is in the FTS
|
|
3374
|
+
// hit set, ordered by tree-level (level-0 leaves first).
|
|
3375
|
+
const orderedIds = [];
|
|
3376
|
+
walkPersonaTree(tree, (node) => {
|
|
3377
|
+
if (node.level === 0 && node.memoryId) {
|
|
3378
|
+
orderedIds.push(node.memoryId);
|
|
3379
|
+
}
|
|
3380
|
+
});
|
|
3381
|
+
const ftsById = new Map(ftsHits.map((h) => [h.entry.id, h]));
|
|
3382
|
+
const ranked = orderedIds
|
|
3383
|
+
.map((id) => ftsById.get(id))
|
|
3384
|
+
.filter((h) => h !== undefined)
|
|
3385
|
+
.slice(0, limit);
|
|
3386
|
+
return {
|
|
3387
|
+
mode: "persona-tree",
|
|
3388
|
+
results: ranked.map((r) => ({
|
|
3389
|
+
id: r.entry.id,
|
|
3390
|
+
content: r.entry.value,
|
|
3391
|
+
score: r.score,
|
|
3392
|
+
reason: "persona-tree leaf",
|
|
3393
|
+
metadata: {
|
|
3394
|
+
totalMemories: tree.totalMemories,
|
|
3395
|
+
builtAt: tree.builtAt,
|
|
3396
|
+
},
|
|
3397
|
+
})),
|
|
3398
|
+
scoring: {
|
|
3399
|
+
method: "tree-walk",
|
|
3400
|
+
isHeuristic: false,
|
|
3401
|
+
notes: `tree built from ${tree.totalMemories} memories`,
|
|
3402
|
+
},
|
|
3403
|
+
};
|
|
3404
|
+
},
|
|
3405
|
+
};
|
|
3406
|
+
this.registerRetrievalMode(ptMode);
|
|
3407
|
+
added.push(ptMode.name);
|
|
3408
|
+
}
|
|
3409
|
+
return added;
|
|
3410
|
+
}
|
|
3411
|
+
close() {
|
|
3412
|
+
this.db.close();
|
|
3413
|
+
}
|
|
3414
|
+
}
|
|
3415
|
+
// ── Helpers ──────────────────────────────────────────────────
|
|
3416
|
+
/**
|
|
3417
|
+
* Return the canonical name field for an entity. Handles per-type
|
|
3418
|
+
* name fields: `person.name`, `project.name`, `file.path`,
|
|
3419
|
+
* `concept.name`, `event.name`, `goal.name`, `skill.name`,
|
|
3420
|
+
* `tool.name`.
|
|
3421
|
+
*/
|
|
3422
|
+
function entityNameOf(entity) {
|
|
3423
|
+
if (entity.type === "file")
|
|
3424
|
+
return entity.path;
|
|
3425
|
+
return entity.name;
|
|
3426
|
+
}
|
|
3427
|
+
/**
|
|
3428
|
+
* Map a memvid category string onto a valid MemoryBlockType. Unknown
|
|
3429
|
+
* categories fall back to `reference`.
|
|
3430
|
+
*/
|
|
3431
|
+
function blockTypeFromMemvid(category) {
|
|
3432
|
+
const valid = [
|
|
3433
|
+
"user",
|
|
3434
|
+
"feedback",
|
|
3435
|
+
"project",
|
|
3436
|
+
"reference",
|
|
3437
|
+
"cases",
|
|
3438
|
+
"patterns",
|
|
3439
|
+
"decisions",
|
|
3440
|
+
"issues",
|
|
3441
|
+
];
|
|
3442
|
+
return valid.includes(category)
|
|
3443
|
+
? category
|
|
3444
|
+
: "reference";
|
|
3445
|
+
}
|
|
3446
|
+
/**
|
|
3447
|
+
* Map a knowledge_edges row onto a BiTemporalEdge. Legacy rows that
|
|
3448
|
+
* predate the P1-M5 migration may have null/empty recorded_from — fall
|
|
3449
|
+
* back to created_at so the consumer always gets a populated axis.
|
|
3450
|
+
*/
|
|
3451
|
+
function rowToBiTemporalEdge(row) {
|
|
3452
|
+
const id = row["id"];
|
|
3453
|
+
const sourceId = row["source_id"];
|
|
3454
|
+
const targetId = row["target_id"];
|
|
3455
|
+
const relation = row["relation"];
|
|
3456
|
+
const weight = typeof row["weight"] === "number" ? row["weight"] : 1.0;
|
|
3457
|
+
const createdAt = row["created_at"];
|
|
3458
|
+
const validFromRaw = row["valid_from"];
|
|
3459
|
+
const recordedFromRaw = row["recorded_from"];
|
|
3460
|
+
return {
|
|
3461
|
+
id,
|
|
3462
|
+
sourceId,
|
|
3463
|
+
targetId,
|
|
3464
|
+
relation,
|
|
3465
|
+
weight,
|
|
3466
|
+
validFrom: validFromRaw && validFromRaw.length > 0
|
|
3467
|
+
? validFromRaw
|
|
3468
|
+
: (createdAt ?? new Date(0).toISOString()),
|
|
3469
|
+
validTo: row["valid_to"] ?? null,
|
|
3470
|
+
recordedFrom: recordedFromRaw && recordedFromRaw.length > 0
|
|
3471
|
+
? recordedFromRaw
|
|
3472
|
+
: (createdAt ?? new Date(0).toISOString()),
|
|
3473
|
+
recordedTo: row["recorded_to"] ?? null,
|
|
3474
|
+
};
|
|
3475
|
+
}
|
|
3476
|
+
/**
|
|
3477
|
+
* Minimal FTS5 sanitizer — strips punctuation to tokens and joins with
|
|
3478
|
+
* OR. Returns empty string when no valid tokens survive. Used by the
|
|
3479
|
+
* benchmark adapter so natural-language questions (which contain ?, :,
|
|
3480
|
+
* quotes, etc.) don't crash FTS5.
|
|
3481
|
+
*/
|
|
3482
|
+
// ── TEMPR helpers (Phase 2 P1-M4) ─────────────────────
|
|
3483
|
+
/** Cosine similarity for TEMPR vector channel. Zero-safe. */
|
|
3484
|
+
function cosineSimTempr(a, b) {
|
|
3485
|
+
if (a.length === 0 || b.length === 0 || a.length !== b.length)
|
|
3486
|
+
return 0;
|
|
3487
|
+
let dot = 0;
|
|
3488
|
+
let na = 0;
|
|
3489
|
+
let nb = 0;
|
|
3490
|
+
for (let i = 0; i < a.length; i++) {
|
|
3491
|
+
const x = a[i];
|
|
3492
|
+
const y = b[i];
|
|
3493
|
+
dot += x * y;
|
|
3494
|
+
na += x * x;
|
|
3495
|
+
nb += y * y;
|
|
3496
|
+
}
|
|
3497
|
+
if (na === 0 || nb === 0)
|
|
3498
|
+
return 0;
|
|
3499
|
+
return dot / (Math.sqrt(na) * Math.sqrt(nb));
|
|
3500
|
+
}
|
|
3501
|
+
/**
|
|
3502
|
+
* Heuristic entity extraction from a natural-language query.
|
|
3503
|
+
* Returns capitalized multi-word sequences, quoted phrases, and
|
|
3504
|
+
* standalone capitalized words of length >= 2. The LLM-based
|
|
3505
|
+
* extraction is the real thing; this channel bootstrap is a proxy
|
|
3506
|
+
* that catches common proper nouns with zero dep.
|
|
3507
|
+
*/
|
|
3508
|
+
function extractQueryEntities(query) {
|
|
3509
|
+
const tokens = new Set();
|
|
3510
|
+
// Quoted phrases first — "New York", 'Alice Bob'
|
|
3511
|
+
const quoted = query.match(/["']([^"']+)["']/g);
|
|
3512
|
+
if (quoted) {
|
|
3513
|
+
for (const q of quoted)
|
|
3514
|
+
tokens.add(q.replace(/["']/g, "").trim());
|
|
3515
|
+
}
|
|
3516
|
+
// Multi-word capitalized sequences — "New York City"
|
|
3517
|
+
const caps = query.match(/\b[A-Z][a-zA-Z]+(?:\s+[A-Z][a-zA-Z]+)+\b/g);
|
|
3518
|
+
if (caps) {
|
|
3519
|
+
for (const c of caps)
|
|
3520
|
+
tokens.add(c);
|
|
3521
|
+
}
|
|
3522
|
+
// Standalone capitalized words — "Alice"
|
|
3523
|
+
const solo = query.match(/\b[A-Z][a-zA-Z]{1,}\b/g);
|
|
3524
|
+
if (solo) {
|
|
3525
|
+
for (const s of solo)
|
|
3526
|
+
tokens.add(s);
|
|
3527
|
+
}
|
|
3528
|
+
return [...tokens].filter((t) => t.length >= 2).slice(0, 8);
|
|
3529
|
+
}
|
|
3530
|
+
/**
|
|
3531
|
+
* Sanitize a proper name for use in an FTS5 MATCH query.
|
|
3532
|
+
* Strips control characters and wraps in double quotes so FTS5
|
|
3533
|
+
* treats it as a phrase. Returns empty string when the name is
|
|
3534
|
+
* empty after sanitization.
|
|
3535
|
+
*/
|
|
3536
|
+
function fts5QuoteName(name) {
|
|
3537
|
+
const cleaned = name.replace(/["\\]/g, " ").replace(/\s+/g, " ").trim();
|
|
3538
|
+
if (cleaned.length === 0)
|
|
3539
|
+
return "";
|
|
3540
|
+
return `"${cleaned}"`;
|
|
3541
|
+
}
|
|
3542
|
+
function sanitizeForFts5(query) {
|
|
3543
|
+
const tokens = query
|
|
3544
|
+
.toLowerCase()
|
|
3545
|
+
.split(/[^a-z0-9]+/i)
|
|
3546
|
+
.filter((t) => t.length >= 2);
|
|
3547
|
+
const unique = Array.from(new Set(tokens));
|
|
3548
|
+
if (unique.length === 0)
|
|
3549
|
+
return "";
|
|
3550
|
+
return unique.slice(0, 12).join(" OR ");
|
|
3551
|
+
}
|
|
3552
|
+
let agentFactsModuleCache = null;
|
|
3553
|
+
function getAgentFactsModule() {
|
|
3554
|
+
if (agentFactsModuleCache === null) {
|
|
3555
|
+
throw new Error("MemoryStore.recordAgentFact/retrieveAgentFacts: agent-facts module not bootstrapped; " +
|
|
3556
|
+
"import src/memory/agent-facts.js at composition-root to register the wiring.");
|
|
3557
|
+
}
|
|
3558
|
+
return agentFactsModuleCache;
|
|
3559
|
+
}
|
|
3560
|
+
/**
|
|
3561
|
+
* Bootstrap the agent-facts module reference used by
|
|
3562
|
+
* `MemoryStore.recordAgentFact` / `MemoryStore.retrieveAgentFacts`.
|
|
3563
|
+
*
|
|
3564
|
+
* Called automatically by `agent-facts.ts` at import time so any
|
|
3565
|
+
* consumer who imports either file gets the wiring transparently.
|
|
3566
|
+
* Exposed for testability — tests can inject a stub module.
|
|
3567
|
+
*/
|
|
3568
|
+
export function setAgentFactsModule(mod) {
|
|
3569
|
+
agentFactsModuleCache = mod;
|
|
3570
|
+
}
|
|
3571
|
+
//# sourceMappingURL=store.js.map
|