kemdicode-mcp 1.15.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 +674 -0
- package/README.md +486 -0
- package/dist/ai/agents.d.ts +40 -0
- package/dist/ai/agents.d.ts.map +1 -0
- package/dist/ai/agents.js +164 -0
- package/dist/ai/agents.js.map +1 -0
- package/dist/ai/client.d.ts +73 -0
- package/dist/ai/client.d.ts.map +1 -0
- package/dist/ai/client.js +235 -0
- package/dist/ai/client.js.map +1 -0
- package/dist/ai/execute.d.ts +61 -0
- package/dist/ai/execute.d.ts.map +1 -0
- package/dist/ai/execute.js +98 -0
- package/dist/ai/execute.js.map +1 -0
- package/dist/ai/file-context.d.ts +44 -0
- package/dist/ai/file-context.d.ts.map +1 -0
- package/dist/ai/file-context.js +220 -0
- package/dist/ai/file-context.js.map +1 -0
- package/dist/ai/index.d.ts +14 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +21 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/model-spec.d.ts +33 -0
- package/dist/ai/model-spec.d.ts.map +1 -0
- package/dist/ai/model-spec.js +106 -0
- package/dist/ai/model-spec.js.map +1 -0
- package/dist/ai/providers/anthropic.provider.d.ts +23 -0
- package/dist/ai/providers/anthropic.provider.d.ts.map +1 -0
- package/dist/ai/providers/anthropic.provider.js +135 -0
- package/dist/ai/providers/anthropic.provider.js.map +1 -0
- package/dist/ai/providers/gemini.provider.d.ts +20 -0
- package/dist/ai/providers/gemini.provider.d.ts.map +1 -0
- package/dist/ai/providers/gemini.provider.js +113 -0
- package/dist/ai/providers/gemini.provider.js.map +1 -0
- package/dist/ai/providers/index.d.ts +13 -0
- package/dist/ai/providers/index.d.ts.map +1 -0
- package/dist/ai/providers/index.js +12 -0
- package/dist/ai/providers/index.js.map +1 -0
- package/dist/ai/providers/openai-compat.provider.d.ts +13 -0
- package/dist/ai/providers/openai-compat.provider.d.ts.map +1 -0
- package/dist/ai/providers/openai-compat.provider.js +68 -0
- package/dist/ai/providers/openai-compat.provider.js.map +1 -0
- package/dist/ai/providers/openai-shared.d.ts +41 -0
- package/dist/ai/providers/openai-shared.d.ts.map +1 -0
- package/dist/ai/providers/openai-shared.js +67 -0
- package/dist/ai/providers/openai-shared.js.map +1 -0
- package/dist/ai/providers/openai.provider.d.ts +22 -0
- package/dist/ai/providers/openai.provider.d.ts.map +1 -0
- package/dist/ai/providers/openai.provider.js +74 -0
- package/dist/ai/providers/openai.provider.js.map +1 -0
- package/dist/ai/providers/registry.d.ts +33 -0
- package/dist/ai/providers/registry.d.ts.map +1 -0
- package/dist/ai/providers/registry.js +137 -0
- package/dist/ai/providers/registry.js.map +1 -0
- package/dist/ai/providers/types.d.ts +59 -0
- package/dist/ai/providers/types.d.ts.map +1 -0
- package/dist/ai/providers/types.js +58 -0
- package/dist/ai/providers/types.js.map +1 -0
- package/dist/ai/workspace-editor.d.ts +59 -0
- package/dist/ai/workspace-editor.d.ts.map +1 -0
- package/dist/ai/workspace-editor.js +155 -0
- package/dist/ai/workspace-editor.js.map +1 -0
- package/dist/config/defaults.d.ts +31 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +100 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/index.d.ts +45 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +44 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/manager.d.ts +101 -0
- package/dist/config/manager.d.ts.map +1 -0
- package/dist/config/manager.js +338 -0
- package/dist/config/manager.js.map +1 -0
- package/dist/config/schema.d.ts +382 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +150 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config/types.d.ts +189 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +32 -0
- package/dist/config/types.js.map +1 -0
- package/dist/constants.d.ts +92 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +100 -0
- package/dist/constants.js.map +1 -0
- package/dist/context/agent-monitor.d.ts +173 -0
- package/dist/context/agent-monitor.d.ts.map +1 -0
- package/dist/context/agent-monitor.js +958 -0
- package/dist/context/agent-monitor.js.map +1 -0
- package/dist/context/feedback-loop.d.ts +73 -0
- package/dist/context/feedback-loop.d.ts.map +1 -0
- package/dist/context/feedback-loop.js +303 -0
- package/dist/context/feedback-loop.js.map +1 -0
- package/dist/context/index.d.ts +29 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +29 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/integration.d.ts +83 -0
- package/dist/context/integration.d.ts.map +1 -0
- package/dist/context/integration.js +276 -0
- package/dist/context/integration.js.map +1 -0
- package/dist/context/iteration-tracker.d.ts +87 -0
- package/dist/context/iteration-tracker.d.ts.map +1 -0
- package/dist/context/iteration-tracker.js +333 -0
- package/dist/context/iteration-tracker.js.map +1 -0
- package/dist/context/storage.d.ts +234 -0
- package/dist/context/storage.d.ts.map +1 -0
- package/dist/context/storage.js +513 -0
- package/dist/context/storage.js.map +1 -0
- package/dist/context/types.d.ts +396 -0
- package/dist/context/types.d.ts.map +1 -0
- package/dist/context/types.js +125 -0
- package/dist/context/types.js.map +1 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +207 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/redis/connection.d.ts +111 -0
- package/dist/infrastructure/redis/connection.d.ts.map +1 -0
- package/dist/infrastructure/redis/connection.js +242 -0
- package/dist/infrastructure/redis/connection.js.map +1 -0
- package/dist/infrastructure/redis/index.d.ts +2 -0
- package/dist/infrastructure/redis/index.d.ts.map +1 -0
- package/dist/infrastructure/redis/index.js +2 -0
- package/dist/infrastructure/redis/index.js.map +1 -0
- package/dist/infrastructure/redis/redis-backed-service.d.ts +35 -0
- package/dist/infrastructure/redis/redis-backed-service.d.ts.map +1 -0
- package/dist/infrastructure/redis/redis-backed-service.js +55 -0
- package/dist/infrastructure/redis/redis-backed-service.js.map +1 -0
- package/dist/kanban/board-store.d.ts +222 -0
- package/dist/kanban/board-store.d.ts.map +1 -0
- package/dist/kanban/board-store.js +486 -0
- package/dist/kanban/board-store.js.map +1 -0
- package/dist/kanban/index.d.ts +33 -0
- package/dist/kanban/index.d.ts.map +1 -0
- package/dist/kanban/index.js +37 -0
- package/dist/kanban/index.js.map +1 -0
- package/dist/kanban/kanban-store.d.ts +236 -0
- package/dist/kanban/kanban-store.d.ts.map +1 -0
- package/dist/kanban/kanban-store.js +854 -0
- package/dist/kanban/kanban-store.js.map +1 -0
- package/dist/kanban/membership-store.d.ts +230 -0
- package/dist/kanban/membership-store.d.ts.map +1 -0
- package/dist/kanban/membership-store.js +384 -0
- package/dist/kanban/membership-store.js.map +1 -0
- package/dist/kanban/migration.d.ts +131 -0
- package/dist/kanban/migration.d.ts.map +1 -0
- package/dist/kanban/migration.js +275 -0
- package/dist/kanban/migration.js.map +1 -0
- package/dist/kanban/types.d.ts +314 -0
- package/dist/kanban/types.d.ts.map +1 -0
- package/dist/kanban/types.js +126 -0
- package/dist/kanban/types.js.map +1 -0
- package/dist/kanban/workspace-store.d.ts +193 -0
- package/dist/kanban/workspace-store.d.ts.map +1 -0
- package/dist/kanban/workspace-store.js +386 -0
- package/dist/kanban/workspace-store.js.map +1 -0
- package/dist/loci/graph-storage.d.ts +120 -0
- package/dist/loci/graph-storage.d.ts.map +1 -0
- package/dist/loci/graph-storage.js +489 -0
- package/dist/loci/graph-storage.js.map +1 -0
- package/dist/loci/graph-traversal.d.ts +56 -0
- package/dist/loci/graph-traversal.d.ts.map +1 -0
- package/dist/loci/graph-traversal.js +291 -0
- package/dist/loci/graph-traversal.js.map +1 -0
- package/dist/loci/index.d.ts +30 -0
- package/dist/loci/index.d.ts.map +1 -0
- package/dist/loci/index.js +27 -0
- package/dist/loci/index.js.map +1 -0
- package/dist/loci/loci-manager.d.ts +119 -0
- package/dist/loci/loci-manager.d.ts.map +1 -0
- package/dist/loci/loci-manager.js +435 -0
- package/dist/loci/loci-manager.js.map +1 -0
- package/dist/loci/sequence-tracker.d.ts +89 -0
- package/dist/loci/sequence-tracker.d.ts.map +1 -0
- package/dist/loci/sequence-tracker.js +311 -0
- package/dist/loci/sequence-tracker.js.map +1 -0
- package/dist/loci/types.d.ts +306 -0
- package/dist/loci/types.d.ts.map +1 -0
- package/dist/loci/types.js +143 -0
- package/dist/loci/types.js.map +1 -0
- package/dist/mpc/auth.d.ts +67 -0
- package/dist/mpc/auth.d.ts.map +1 -0
- package/dist/mpc/auth.js +173 -0
- package/dist/mpc/auth.js.map +1 -0
- package/dist/mpc/crypto.d.ts +139 -0
- package/dist/mpc/crypto.d.ts.map +1 -0
- package/dist/mpc/crypto.js +287 -0
- package/dist/mpc/crypto.js.map +1 -0
- package/dist/mpc/index.d.ts +30 -0
- package/dist/mpc/index.d.ts.map +1 -0
- package/dist/mpc/index.js +27 -0
- package/dist/mpc/index.js.map +1 -0
- package/dist/mpc/redis-store.d.ts +88 -0
- package/dist/mpc/redis-store.d.ts.map +1 -0
- package/dist/mpc/redis-store.js +337 -0
- package/dist/mpc/redis-store.js.map +1 -0
- package/dist/mpc/share-manager.d.ts +59 -0
- package/dist/mpc/share-manager.d.ts.map +1 -0
- package/dist/mpc/share-manager.js +254 -0
- package/dist/mpc/share-manager.js.map +1 -0
- package/dist/mpc/types.d.ts +213 -0
- package/dist/mpc/types.d.ts.map +1 -0
- package/dist/mpc/types.js +42 -0
- package/dist/mpc/types.js.map +1 -0
- package/dist/recursive/index.d.ts +27 -0
- package/dist/recursive/index.d.ts.map +1 -0
- package/dist/recursive/index.js +27 -0
- package/dist/recursive/index.js.map +1 -0
- package/dist/recursive/tool-invoker.d.ts +51 -0
- package/dist/recursive/tool-invoker.d.ts.map +1 -0
- package/dist/recursive/tool-invoker.js +293 -0
- package/dist/recursive/tool-invoker.js.map +1 -0
- package/dist/recursive/types.d.ts +110 -0
- package/dist/recursive/types.d.ts.map +1 -0
- package/dist/recursive/types.js +52 -0
- package/dist/recursive/types.js.map +1 -0
- package/dist/rl/dopamine.d.ts +96 -0
- package/dist/rl/dopamine.d.ts.map +1 -0
- package/dist/rl/dopamine.js +242 -0
- package/dist/rl/dopamine.js.map +1 -0
- package/dist/rl/index.d.ts +30 -0
- package/dist/rl/index.d.ts.map +1 -0
- package/dist/rl/index.js +27 -0
- package/dist/rl/index.js.map +1 -0
- package/dist/rl/potential.d.ts +78 -0
- package/dist/rl/potential.d.ts.map +1 -0
- package/dist/rl/potential.js +152 -0
- package/dist/rl/potential.js.map +1 -0
- package/dist/rl/rewards.d.ts +92 -0
- package/dist/rl/rewards.d.ts.map +1 -0
- package/dist/rl/rewards.js +278 -0
- package/dist/rl/rewards.js.map +1 -0
- package/dist/rl/state-tracker.d.ts +107 -0
- package/dist/rl/state-tracker.d.ts.map +1 -0
- package/dist/rl/state-tracker.js +285 -0
- package/dist/rl/state-tracker.js.map +1 -0
- package/dist/rl/types.d.ts +274 -0
- package/dist/rl/types.d.ts.map +1 -0
- package/dist/rl/types.js +145 -0
- package/dist/rl/types.js.map +1 -0
- package/dist/runtime/crypto.d.ts +87 -0
- package/dist/runtime/crypto.d.ts.map +1 -0
- package/dist/runtime/crypto.js +226 -0
- package/dist/runtime/crypto.js.map +1 -0
- package/dist/runtime/http.d.ts +111 -0
- package/dist/runtime/http.d.ts.map +1 -0
- package/dist/runtime/http.js +350 -0
- package/dist/runtime/http.js.map +1 -0
- package/dist/runtime/index.d.ts +48 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +43 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/net.d.ts +42 -0
- package/dist/runtime/net.d.ts.map +1 -0
- package/dist/runtime/net.js +108 -0
- package/dist/runtime/net.js.map +1 -0
- package/dist/runtime/process.d.ts +54 -0
- package/dist/runtime/process.d.ts.map +1 -0
- package/dist/runtime/process.js +247 -0
- package/dist/runtime/process.js.map +1 -0
- package/dist/runtime/types.d.ts +143 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/runtime/types.js +19 -0
- package/dist/runtime/types.js.map +1 -0
- package/dist/server/http-server.d.ts +26 -0
- package/dist/server/http-server.d.ts.map +1 -0
- package/dist/server/http-server.js +290 -0
- package/dist/server/http-server.js.map +1 -0
- package/dist/server/index.d.ts +22 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +25 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/progress.d.ts +74 -0
- package/dist/server/progress.d.ts.map +1 -0
- package/dist/server/progress.js +174 -0
- package/dist/server/progress.js.map +1 -0
- package/dist/server/session-server.d.ts +76 -0
- package/dist/server/session-server.d.ts.map +1 -0
- package/dist/server/session-server.js +186 -0
- package/dist/server/session-server.js.map +1 -0
- package/dist/server/types.d.ts +82 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/server/types.js +25 -0
- package/dist/server/types.js.map +1 -0
- package/dist/session/cwd-resolver.d.ts +136 -0
- package/dist/session/cwd-resolver.d.ts.map +1 -0
- package/dist/session/cwd-resolver.js +715 -0
- package/dist/session/cwd-resolver.js.map +1 -0
- package/dist/session/index.d.ts +27 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +27 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/manager.d.ts +296 -0
- package/dist/session/manager.d.ts.map +1 -0
- package/dist/session/manager.js +605 -0
- package/dist/session/manager.js.map +1 -0
- package/dist/session/types.d.ts +152 -0
- package/dist/session/types.d.ts.map +1 -0
- package/dist/session/types.js +60 -0
- package/dist/session/types.js.map +1 -0
- package/dist/tools/agents/agent-alert.tool.d.ts +20 -0
- package/dist/tools/agents/agent-alert.tool.d.ts.map +1 -0
- package/dist/tools/agents/agent-alert.tool.js +103 -0
- package/dist/tools/agents/agent-alert.tool.js.map +1 -0
- package/dist/tools/agents/agent-history.tool.d.ts +20 -0
- package/dist/tools/agents/agent-history.tool.d.ts.map +1 -0
- package/dist/tools/agents/agent-history.tool.js +133 -0
- package/dist/tools/agents/agent-history.tool.js.map +1 -0
- package/dist/tools/agents/agent-inject.tool.d.ts +39 -0
- package/dist/tools/agents/agent-inject.tool.d.ts.map +1 -0
- package/dist/tools/agents/agent-inject.tool.js +121 -0
- package/dist/tools/agents/agent-inject.tool.js.map +1 -0
- package/dist/tools/agents/agent-list.tool.d.ts +20 -0
- package/dist/tools/agents/agent-list.tool.d.ts.map +1 -0
- package/dist/tools/agents/agent-list.tool.js +86 -0
- package/dist/tools/agents/agent-list.tool.js.map +1 -0
- package/dist/tools/agents/agent-register.tool.d.ts +20 -0
- package/dist/tools/agents/agent-register.tool.d.ts.map +1 -0
- package/dist/tools/agents/agent-register.tool.js +114 -0
- package/dist/tools/agents/agent-register.tool.js.map +1 -0
- package/dist/tools/agents/agent-summary.tool.d.ts +20 -0
- package/dist/tools/agents/agent-summary.tool.d.ts.map +1 -0
- package/dist/tools/agents/agent-summary.tool.js +99 -0
- package/dist/tools/agents/agent-summary.tool.js.map +1 -0
- package/dist/tools/agents/agent-watch.tool.d.ts +20 -0
- package/dist/tools/agents/agent-watch.tool.d.ts.map +1 -0
- package/dist/tools/agents/agent-watch.tool.js +56 -0
- package/dist/tools/agents/agent-watch.tool.js.map +1 -0
- package/dist/tools/agents/index.d.ts +41 -0
- package/dist/tools/agents/index.d.ts.map +1 -0
- package/dist/tools/agents/index.js +41 -0
- package/dist/tools/agents/index.js.map +1 -0
- package/dist/tools/agents/monitor.tool.d.ts +20 -0
- package/dist/tools/agents/monitor.tool.d.ts.map +1 -0
- package/dist/tools/agents/monitor.tool.js +314 -0
- package/dist/tools/agents/monitor.tool.js.map +1 -0
- package/dist/tools/agents/queue-message.tool.d.ts +20 -0
- package/dist/tools/agents/queue-message.tool.d.ts.map +1 -0
- package/dist/tools/agents/queue-message.tool.js +176 -0
- package/dist/tools/agents/queue-message.tool.js.map +1 -0
- package/dist/tools/ask-ai.tool.d.ts +20 -0
- package/dist/tools/ask-ai.tool.d.ts.map +1 -0
- package/dist/tools/ask-ai.tool.js +49 -0
- package/dist/tools/ask-ai.tool.js.map +1 -0
- package/dist/tools/batch.tool.d.ts +42 -0
- package/dist/tools/batch.tool.d.ts.map +1 -0
- package/dist/tools/batch.tool.js +146 -0
- package/dist/tools/batch.tool.js.map +1 -0
- package/dist/tools/brainstorm.tool.d.ts +20 -0
- package/dist/tools/brainstorm.tool.d.ts.map +1 -0
- package/dist/tools/brainstorm.tool.js +86 -0
- package/dist/tools/brainstorm.tool.js.map +1 -0
- package/dist/tools/code/code-outline.tool.d.ts +20 -0
- package/dist/tools/code/code-outline.tool.d.ts.map +1 -0
- package/dist/tools/code/code-outline.tool.js +803 -0
- package/dist/tools/code/code-outline.tool.js.map +1 -0
- package/dist/tools/code/find-definition.tool.d.ts +20 -0
- package/dist/tools/code/find-definition.tool.d.ts.map +1 -0
- package/dist/tools/code/find-definition.tool.js +218 -0
- package/dist/tools/code/find-definition.tool.js.map +1 -0
- package/dist/tools/code/find-references.tool.d.ts +20 -0
- package/dist/tools/code/find-references.tool.d.ts.map +1 -0
- package/dist/tools/code/find-references.tool.js +207 -0
- package/dist/tools/code/find-references.tool.js.map +1 -0
- package/dist/tools/code/find-symbols.tool.d.ts +20 -0
- package/dist/tools/code/find-symbols.tool.d.ts.map +1 -0
- package/dist/tools/code/find-symbols.tool.js +367 -0
- package/dist/tools/code/find-symbols.tool.js.map +1 -0
- package/dist/tools/code/index.d.ts +34 -0
- package/dist/tools/code/index.d.ts.map +1 -0
- package/dist/tools/code/index.js +35 -0
- package/dist/tools/code/index.js.map +1 -0
- package/dist/tools/code/insert-after-symbol.tool.d.ts +20 -0
- package/dist/tools/code/insert-after-symbol.tool.d.ts.map +1 -0
- package/dist/tools/code/insert-after-symbol.tool.js +224 -0
- package/dist/tools/code/insert-after-symbol.tool.js.map +1 -0
- package/dist/tools/code/insert-before-symbol.tool.d.ts +20 -0
- package/dist/tools/code/insert-before-symbol.tool.d.ts.map +1 -0
- package/dist/tools/code/insert-before-symbol.tool.js +136 -0
- package/dist/tools/code/insert-before-symbol.tool.js.map +1 -0
- package/dist/tools/code/rename-symbol.tool.d.ts +20 -0
- package/dist/tools/code/rename-symbol.tool.d.ts.map +1 -0
- package/dist/tools/code/rename-symbol.tool.js +255 -0
- package/dist/tools/code/rename-symbol.tool.js.map +1 -0
- package/dist/tools/code/semantic-search.tool.d.ts +20 -0
- package/dist/tools/code/semantic-search.tool.d.ts.map +1 -0
- package/dist/tools/code/semantic-search.tool.js +172 -0
- package/dist/tools/code/semantic-search.tool.js.map +1 -0
- package/dist/tools/code/symbol-search.d.ts +39 -0
- package/dist/tools/code/symbol-search.d.ts.map +1 -0
- package/dist/tools/code/symbol-search.js +118 -0
- package/dist/tools/code/symbol-search.js.map +1 -0
- package/dist/tools/context/feedback.tool.d.ts +20 -0
- package/dist/tools/context/feedback.tool.d.ts.map +1 -0
- package/dist/tools/context/feedback.tool.js +176 -0
- package/dist/tools/context/feedback.tool.js.map +1 -0
- package/dist/tools/context/get-shared-context.tool.d.ts +20 -0
- package/dist/tools/context/get-shared-context.tool.d.ts.map +1 -0
- package/dist/tools/context/get-shared-context.tool.js +83 -0
- package/dist/tools/context/get-shared-context.tool.js.map +1 -0
- package/dist/tools/context/index.d.ts +26 -0
- package/dist/tools/context/index.d.ts.map +1 -0
- package/dist/tools/context/index.js +26 -0
- package/dist/tools/context/index.js.map +1 -0
- package/dist/tools/context/shared-thoughts.tool.d.ts +20 -0
- package/dist/tools/context/shared-thoughts.tool.d.ts.map +1 -0
- package/dist/tools/context/shared-thoughts.tool.js +199 -0
- package/dist/tools/context/shared-thoughts.tool.js.map +1 -0
- package/dist/tools/edit/delete-lines.tool.d.ts +20 -0
- package/dist/tools/edit/delete-lines.tool.d.ts.map +1 -0
- package/dist/tools/edit/delete-lines.tool.js +88 -0
- package/dist/tools/edit/delete-lines.tool.js.map +1 -0
- package/dist/tools/edit/edit-shared.d.ts +55 -0
- package/dist/tools/edit/edit-shared.d.ts.map +1 -0
- package/dist/tools/edit/edit-shared.js +122 -0
- package/dist/tools/edit/edit-shared.js.map +1 -0
- package/dist/tools/edit/index.d.ts +29 -0
- package/dist/tools/edit/index.d.ts.map +1 -0
- package/dist/tools/edit/index.js +29 -0
- package/dist/tools/edit/index.js.map +1 -0
- package/dist/tools/edit/insert-at-line.tool.d.ts +20 -0
- package/dist/tools/edit/insert-at-line.tool.d.ts.map +1 -0
- package/dist/tools/edit/insert-at-line.tool.js +92 -0
- package/dist/tools/edit/insert-at-line.tool.js.map +1 -0
- package/dist/tools/edit/replace-content.tool.d.ts +20 -0
- package/dist/tools/edit/replace-content.tool.d.ts.map +1 -0
- package/dist/tools/edit/replace-content.tool.js +214 -0
- package/dist/tools/edit/replace-content.tool.js.map +1 -0
- package/dist/tools/edit/replace-lines.tool.d.ts +20 -0
- package/dist/tools/edit/replace-lines.tool.d.ts.map +1 -0
- package/dist/tools/edit/replace-lines.tool.js +97 -0
- package/dist/tools/edit/replace-lines.tool.js.map +1 -0
- package/dist/tools/file/file-diff.tool.d.ts +20 -0
- package/dist/tools/file/file-diff.tool.d.ts.map +1 -0
- package/dist/tools/file/file-diff.tool.js +359 -0
- package/dist/tools/file/file-diff.tool.js.map +1 -0
- package/dist/tools/file/file-read.tool.d.ts +20 -0
- package/dist/tools/file/file-read.tool.d.ts.map +1 -0
- package/dist/tools/file/file-read.tool.js +270 -0
- package/dist/tools/file/file-read.tool.js.map +1 -0
- package/dist/tools/file/file-search.tool.d.ts +20 -0
- package/dist/tools/file/file-search.tool.d.ts.map +1 -0
- package/dist/tools/file/file-search.tool.js +339 -0
- package/dist/tools/file/file-search.tool.js.map +1 -0
- package/dist/tools/file/file-tree.tool.d.ts +49 -0
- package/dist/tools/file/file-tree.tool.d.ts.map +1 -0
- package/dist/tools/file/file-tree.tool.js +398 -0
- package/dist/tools/file/file-tree.tool.js.map +1 -0
- package/dist/tools/file/file-write.tool.d.ts +20 -0
- package/dist/tools/file/file-write.tool.d.ts.map +1 -0
- package/dist/tools/file/file-write.tool.js +204 -0
- package/dist/tools/file/file-write.tool.js.map +1 -0
- package/dist/tools/file/index.d.ts +31 -0
- package/dist/tools/file/index.d.ts.map +1 -0
- package/dist/tools/file/index.js +31 -0
- package/dist/tools/file/index.js.map +1 -0
- package/dist/tools/git/git-blame.tool.d.ts +20 -0
- package/dist/tools/git/git-blame.tool.d.ts.map +1 -0
- package/dist/tools/git/git-blame.tool.js +138 -0
- package/dist/tools/git/git-blame.tool.js.map +1 -0
- package/dist/tools/git/git-branch.tool.d.ts +20 -0
- package/dist/tools/git/git-branch.tool.d.ts.map +1 -0
- package/dist/tools/git/git-branch.tool.js +158 -0
- package/dist/tools/git/git-branch.tool.js.map +1 -0
- package/dist/tools/git/git-diff.tool.d.ts +20 -0
- package/dist/tools/git/git-diff.tool.d.ts.map +1 -0
- package/dist/tools/git/git-diff.tool.js +117 -0
- package/dist/tools/git/git-diff.tool.js.map +1 -0
- package/dist/tools/git/git-log.tool.d.ts +20 -0
- package/dist/tools/git/git-log.tool.d.ts.map +1 -0
- package/dist/tools/git/git-log.tool.js +150 -0
- package/dist/tools/git/git-log.tool.js.map +1 -0
- package/dist/tools/git/git-status.tool.d.ts +20 -0
- package/dist/tools/git/git-status.tool.d.ts.map +1 -0
- package/dist/tools/git/git-status.tool.js +81 -0
- package/dist/tools/git/git-status.tool.js.map +1 -0
- package/dist/tools/git/index.d.ts +31 -0
- package/dist/tools/git/index.d.ts.map +1 -0
- package/dist/tools/git/index.js +32 -0
- package/dist/tools/git/index.js.map +1 -0
- package/dist/tools/index.d.ts +19 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +170 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/kanban/board-create.tool.d.ts +20 -0
- package/dist/tools/kanban/board-create.tool.d.ts.map +1 -0
- package/dist/tools/kanban/board-create.tool.js +92 -0
- package/dist/tools/kanban/board-create.tool.js.map +1 -0
- package/dist/tools/kanban/board-invite.tool.d.ts +20 -0
- package/dist/tools/kanban/board-invite.tool.d.ts.map +1 -0
- package/dist/tools/kanban/board-invite.tool.js +96 -0
- package/dist/tools/kanban/board-invite.tool.js.map +1 -0
- package/dist/tools/kanban/board-list.tool.d.ts +20 -0
- package/dist/tools/kanban/board-list.tool.d.ts.map +1 -0
- package/dist/tools/kanban/board-list.tool.js +94 -0
- package/dist/tools/kanban/board-list.tool.js.map +1 -0
- package/dist/tools/kanban/board-members.tool.d.ts +20 -0
- package/dist/tools/kanban/board-members.tool.d.ts.map +1 -0
- package/dist/tools/kanban/board-members.tool.js +153 -0
- package/dist/tools/kanban/board-members.tool.js.map +1 -0
- package/dist/tools/kanban/board-share.tool.d.ts +20 -0
- package/dist/tools/kanban/board-share.tool.d.ts.map +1 -0
- package/dist/tools/kanban/board-share.tool.js +91 -0
- package/dist/tools/kanban/board-share.tool.js.map +1 -0
- package/dist/tools/kanban/board-status.tool.d.ts +20 -0
- package/dist/tools/kanban/board-status.tool.d.ts.map +1 -0
- package/dist/tools/kanban/board-status.tool.js +79 -0
- package/dist/tools/kanban/board-status.tool.js.map +1 -0
- package/dist/tools/kanban/index.d.ts +42 -0
- package/dist/tools/kanban/index.d.ts.map +1 -0
- package/dist/tools/kanban/index.js +46 -0
- package/dist/tools/kanban/index.js.map +1 -0
- package/dist/tools/kanban/task-assign.tool.d.ts +20 -0
- package/dist/tools/kanban/task-assign.tool.d.ts.map +1 -0
- package/dist/tools/kanban/task-assign.tool.js +103 -0
- package/dist/tools/kanban/task-assign.tool.js.map +1 -0
- package/dist/tools/kanban/task-claim.tool.d.ts +20 -0
- package/dist/tools/kanban/task-claim.tool.d.ts.map +1 -0
- package/dist/tools/kanban/task-claim.tool.js +107 -0
- package/dist/tools/kanban/task-claim.tool.js.map +1 -0
- package/dist/tools/kanban/task-create.tool.d.ts +20 -0
- package/dist/tools/kanban/task-create.tool.d.ts.map +1 -0
- package/dist/tools/kanban/task-create.tool.js +123 -0
- package/dist/tools/kanban/task-create.tool.js.map +1 -0
- package/dist/tools/kanban/task-list.tool.d.ts +20 -0
- package/dist/tools/kanban/task-list.tool.d.ts.map +1 -0
- package/dist/tools/kanban/task-list.tool.js +95 -0
- package/dist/tools/kanban/task-list.tool.js.map +1 -0
- package/dist/tools/kanban/task-push-multi.tool.d.ts +20 -0
- package/dist/tools/kanban/task-push-multi.tool.d.ts.map +1 -0
- package/dist/tools/kanban/task-push-multi.tool.js +273 -0
- package/dist/tools/kanban/task-push-multi.tool.js.map +1 -0
- package/dist/tools/kanban/task-update.tool.d.ts +20 -0
- package/dist/tools/kanban/task-update.tool.d.ts.map +1 -0
- package/dist/tools/kanban/task-update.tool.js +173 -0
- package/dist/tools/kanban/task-update.tool.js.map +1 -0
- package/dist/tools/kanban/workspace-create.tool.d.ts +20 -0
- package/dist/tools/kanban/workspace-create.tool.d.ts.map +1 -0
- package/dist/tools/kanban/workspace-create.tool.js +84 -0
- package/dist/tools/kanban/workspace-create.tool.js.map +1 -0
- package/dist/tools/kanban/workspace-join.tool.d.ts +20 -0
- package/dist/tools/kanban/workspace-join.tool.d.ts.map +1 -0
- package/dist/tools/kanban/workspace-join.tool.js +76 -0
- package/dist/tools/kanban/workspace-join.tool.js.map +1 -0
- package/dist/tools/kanban/workspace-leave.tool.d.ts +20 -0
- package/dist/tools/kanban/workspace-leave.tool.d.ts.map +1 -0
- package/dist/tools/kanban/workspace-leave.tool.js +74 -0
- package/dist/tools/kanban/workspace-leave.tool.js.map +1 -0
- package/dist/tools/kanban/workspace-list.tool.d.ts +20 -0
- package/dist/tools/kanban/workspace-list.tool.d.ts.map +1 -0
- package/dist/tools/kanban/workspace-list.tool.js +75 -0
- package/dist/tools/kanban/workspace-list.tool.js.map +1 -0
- package/dist/tools/loci/graph-find-path.tool.d.ts +38 -0
- package/dist/tools/loci/graph-find-path.tool.d.ts.map +1 -0
- package/dist/tools/loci/graph-find-path.tool.js +133 -0
- package/dist/tools/loci/graph-find-path.tool.js.map +1 -0
- package/dist/tools/loci/graph-query.tool.d.ts +55 -0
- package/dist/tools/loci/graph-query.tool.d.ts.map +1 -0
- package/dist/tools/loci/graph-query.tool.js +98 -0
- package/dist/tools/loci/graph-query.tool.js.map +1 -0
- package/dist/tools/loci/index.d.ts +27 -0
- package/dist/tools/loci/index.d.ts.map +1 -0
- package/dist/tools/loci/index.js +27 -0
- package/dist/tools/loci/index.js.map +1 -0
- package/dist/tools/loci/loci-recall.tool.d.ts +33 -0
- package/dist/tools/loci/loci-recall.tool.d.ts.map +1 -0
- package/dist/tools/loci/loci-recall.tool.js +156 -0
- package/dist/tools/loci/loci-recall.tool.js.map +1 -0
- package/dist/tools/loci/sequence-recommend.tool.d.ts +33 -0
- package/dist/tools/loci/sequence-recommend.tool.d.ts.map +1 -0
- package/dist/tools/loci/sequence-recommend.tool.js +114 -0
- package/dist/tools/loci/sequence-recommend.tool.js.map +1 -0
- package/dist/tools/memory/delete-memory.tool.d.ts +20 -0
- package/dist/tools/memory/delete-memory.tool.d.ts.map +1 -0
- package/dist/tools/memory/delete-memory.tool.js +96 -0
- package/dist/tools/memory/delete-memory.tool.js.map +1 -0
- package/dist/tools/memory/edit-memory.tool.d.ts +20 -0
- package/dist/tools/memory/edit-memory.tool.d.ts.map +1 -0
- package/dist/tools/memory/edit-memory.tool.js +172 -0
- package/dist/tools/memory/edit-memory.tool.js.map +1 -0
- package/dist/tools/memory/index.d.ts +31 -0
- package/dist/tools/memory/index.d.ts.map +1 -0
- package/dist/tools/memory/index.js +31 -0
- package/dist/tools/memory/index.js.map +1 -0
- package/dist/tools/memory/list-memories.tool.d.ts +20 -0
- package/dist/tools/memory/list-memories.tool.d.ts.map +1 -0
- package/dist/tools/memory/list-memories.tool.js +142 -0
- package/dist/tools/memory/list-memories.tool.js.map +1 -0
- package/dist/tools/memory/read-memory.tool.d.ts +20 -0
- package/dist/tools/memory/read-memory.tool.d.ts.map +1 -0
- package/dist/tools/memory/read-memory.tool.js +98 -0
- package/dist/tools/memory/read-memory.tool.js.map +1 -0
- package/dist/tools/memory/write-memory.tool.d.ts +20 -0
- package/dist/tools/memory/write-memory.tool.d.ts.map +1 -0
- package/dist/tools/memory/write-memory.tool.js +162 -0
- package/dist/tools/memory/write-memory.tool.js.map +1 -0
- package/dist/tools/mpc/index.d.ts +27 -0
- package/dist/tools/mpc/index.d.ts.map +1 -0
- package/dist/tools/mpc/index.js +27 -0
- package/dist/tools/mpc/index.js.map +1 -0
- package/dist/tools/mpc/mpc-distribute.tool.d.ts +36 -0
- package/dist/tools/mpc/mpc-distribute.tool.d.ts.map +1 -0
- package/dist/tools/mpc/mpc-distribute.tool.js +129 -0
- package/dist/tools/mpc/mpc-distribute.tool.js.map +1 -0
- package/dist/tools/mpc/mpc-reconstruct.tool.d.ts +28 -0
- package/dist/tools/mpc/mpc-reconstruct.tool.d.ts.map +1 -0
- package/dist/tools/mpc/mpc-reconstruct.tool.js +125 -0
- package/dist/tools/mpc/mpc-reconstruct.tool.js.map +1 -0
- package/dist/tools/mpc/mpc-split.tool.d.ts +43 -0
- package/dist/tools/mpc/mpc-split.tool.d.ts.map +1 -0
- package/dist/tools/mpc/mpc-split.tool.js +120 -0
- package/dist/tools/mpc/mpc-split.tool.js.map +1 -0
- package/dist/tools/mpc/mpc-status.tool.d.ts +33 -0
- package/dist/tools/mpc/mpc-status.tool.d.ts.map +1 -0
- package/dist/tools/mpc/mpc-status.tool.js +129 -0
- package/dist/tools/mpc/mpc-status.tool.js.map +1 -0
- package/dist/tools/multi-llm/consensus-prompt.tool.d.ts +9 -0
- package/dist/tools/multi-llm/consensus-prompt.tool.d.ts.map +1 -0
- package/dist/tools/multi-llm/consensus-prompt.tool.js +165 -0
- package/dist/tools/multi-llm/consensus-prompt.tool.js.map +1 -0
- package/dist/tools/multi-llm/index.d.ts +8 -0
- package/dist/tools/multi-llm/index.d.ts.map +1 -0
- package/dist/tools/multi-llm/index.js +8 -0
- package/dist/tools/multi-llm/index.js.map +1 -0
- package/dist/tools/multi-llm/multi-prompt.tool.d.ts +9 -0
- package/dist/tools/multi-llm/multi-prompt.tool.d.ts.map +1 -0
- package/dist/tools/multi-llm/multi-prompt.tool.js +90 -0
- package/dist/tools/multi-llm/multi-prompt.tool.js.map +1 -0
- package/dist/tools/project/check-types.tool.d.ts +20 -0
- package/dist/tools/project/check-types.tool.d.ts.map +1 -0
- package/dist/tools/project/check-types.tool.js +254 -0
- package/dist/tools/project/check-types.tool.js.map +1 -0
- package/dist/tools/project/index.d.ts +35 -0
- package/dist/tools/project/index.d.ts.map +1 -0
- package/dist/tools/project/index.js +35 -0
- package/dist/tools/project/index.js.map +1 -0
- package/dist/tools/project/project-info.tool.d.ts +20 -0
- package/dist/tools/project/project-info.tool.d.ts.map +1 -0
- package/dist/tools/project/project-info.tool.js +364 -0
- package/dist/tools/project/project-info.tool.js.map +1 -0
- package/dist/tools/project/run-lint.tool.d.ts +20 -0
- package/dist/tools/project/run-lint.tool.d.ts.map +1 -0
- package/dist/tools/project/run-lint.tool.js +279 -0
- package/dist/tools/project/run-lint.tool.js.map +1 -0
- package/dist/tools/project/run-script.tool.d.ts +20 -0
- package/dist/tools/project/run-script.tool.d.ts.map +1 -0
- package/dist/tools/project/run-script.tool.js +141 -0
- package/dist/tools/project/run-script.tool.js.map +1 -0
- package/dist/tools/project/run-tests.tool.d.ts +20 -0
- package/dist/tools/project/run-tests.tool.d.ts.map +1 -0
- package/dist/tools/project/run-tests.tool.js +357 -0
- package/dist/tools/project/run-tests.tool.js.map +1 -0
- package/dist/tools/recursive/index.d.ts +28 -0
- package/dist/tools/recursive/index.d.ts.map +1 -0
- package/dist/tools/recursive/index.js +28 -0
- package/dist/tools/recursive/index.js.map +1 -0
- package/dist/tools/recursive/invocation-log.tool.d.ts +20 -0
- package/dist/tools/recursive/invocation-log.tool.d.ts.map +1 -0
- package/dist/tools/recursive/invocation-log.tool.js +110 -0
- package/dist/tools/recursive/invocation-log.tool.js.map +1 -0
- package/dist/tools/recursive/invoke-batch.tool.d.ts +20 -0
- package/dist/tools/recursive/invoke-batch.tool.d.ts.map +1 -0
- package/dist/tools/recursive/invoke-batch.tool.js +99 -0
- package/dist/tools/recursive/invoke-batch.tool.js.map +1 -0
- package/dist/tools/recursive/invoke-tool.tool.d.ts +20 -0
- package/dist/tools/recursive/invoke-tool.tool.d.ts.map +1 -0
- package/dist/tools/recursive/invoke-tool.tool.js +100 -0
- package/dist/tools/recursive/invoke-tool.tool.js.map +1 -0
- package/dist/tools/registry.d.ts +261 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +462 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/rl/index.d.ts +25 -0
- package/dist/tools/rl/index.d.ts.map +1 -0
- package/dist/tools/rl/index.js +25 -0
- package/dist/tools/rl/index.js.map +1 -0
- package/dist/tools/rl/rl-dopamine-log.tool.d.ts +32 -0
- package/dist/tools/rl/rl-dopamine-log.tool.d.ts.map +1 -0
- package/dist/tools/rl/rl-dopamine-log.tool.js +112 -0
- package/dist/tools/rl/rl-dopamine-log.tool.js.map +1 -0
- package/dist/tools/rl/rl-reward-stats.tool.d.ts +33 -0
- package/dist/tools/rl/rl-reward-stats.tool.d.ts.map +1 -0
- package/dist/tools/rl/rl-reward-stats.tool.js +100 -0
- package/dist/tools/rl/rl-reward-stats.tool.js.map +1 -0
- package/dist/tools/session/index.d.ts +28 -0
- package/dist/tools/session/index.d.ts.map +1 -0
- package/dist/tools/session/index.js +28 -0
- package/dist/tools/session/index.js.map +1 -0
- package/dist/tools/session/session-create.tool.d.ts +35 -0
- package/dist/tools/session/session-create.tool.d.ts.map +1 -0
- package/dist/tools/session/session-create.tool.js +74 -0
- package/dist/tools/session/session-create.tool.js.map +1 -0
- package/dist/tools/session/session-delete.tool.d.ts +32 -0
- package/dist/tools/session/session-delete.tool.d.ts.map +1 -0
- package/dist/tools/session/session-delete.tool.js +94 -0
- package/dist/tools/session/session-delete.tool.js.map +1 -0
- package/dist/tools/session/session-info.tool.d.ts +30 -0
- package/dist/tools/session/session-info.tool.d.ts.map +1 -0
- package/dist/tools/session/session-info.tool.js +89 -0
- package/dist/tools/session/session-info.tool.js.map +1 -0
- package/dist/tools/session/session-list.tool.d.ts +43 -0
- package/dist/tools/session/session-list.tool.d.ts.map +1 -0
- package/dist/tools/session/session-list.tool.js +85 -0
- package/dist/tools/session/session-list.tool.js.map +1 -0
- package/dist/tools/session/session-switch.tool.d.ts +32 -0
- package/dist/tools/session/session-switch.tool.d.ts.map +1 -0
- package/dist/tools/session/session-switch.tool.js +75 -0
- package/dist/tools/session/session-switch.tool.js.map +1 -0
- package/dist/tools/simple-tools.d.ts +23 -0
- package/dist/tools/simple-tools.d.ts.map +1 -0
- package/dist/tools/simple-tools.js +73 -0
- package/dist/tools/simple-tools.js.map +1 -0
- package/dist/tools/specialized/analyze-deps.tool.d.ts +20 -0
- package/dist/tools/specialized/analyze-deps.tool.d.ts.map +1 -0
- package/dist/tools/specialized/analyze-deps.tool.js +102 -0
- package/dist/tools/specialized/analyze-deps.tool.js.map +1 -0
- package/dist/tools/specialized/auto-fix-agent.tool.d.ts +12 -0
- package/dist/tools/specialized/auto-fix-agent.tool.d.ts.map +1 -0
- package/dist/tools/specialized/auto-fix-agent.tool.js +154 -0
- package/dist/tools/specialized/auto-fix-agent.tool.js.map +1 -0
- package/dist/tools/specialized/auto-fix.tool.d.ts +20 -0
- package/dist/tools/specialized/auto-fix.tool.d.ts.map +1 -0
- package/dist/tools/specialized/auto-fix.tool.js +264 -0
- package/dist/tools/specialized/auto-fix.tool.js.map +1 -0
- package/dist/tools/specialized/code-review.tool.d.ts +20 -0
- package/dist/tools/specialized/code-review.tool.d.ts.map +1 -0
- package/dist/tools/specialized/code-review.tool.js +140 -0
- package/dist/tools/specialized/code-review.tool.js.map +1 -0
- package/dist/tools/specialized/explain-code.tool.d.ts +20 -0
- package/dist/tools/specialized/explain-code.tool.d.ts.map +1 -0
- package/dist/tools/specialized/explain-code.tool.js +90 -0
- package/dist/tools/specialized/explain-code.tool.js.map +1 -0
- package/dist/tools/specialized/fix-bug.tool.d.ts +20 -0
- package/dist/tools/specialized/fix-bug.tool.d.ts.map +1 -0
- package/dist/tools/specialized/fix-bug.tool.js +107 -0
- package/dist/tools/specialized/fix-bug.tool.js.map +1 -0
- package/dist/tools/specialized/index.d.ts +26 -0
- package/dist/tools/specialized/index.d.ts.map +1 -0
- package/dist/tools/specialized/index.js +26 -0
- package/dist/tools/specialized/index.js.map +1 -0
- package/dist/tools/specialized/refactor.tool.d.ts +20 -0
- package/dist/tools/specialized/refactor.tool.d.ts.map +1 -0
- package/dist/tools/specialized/refactor.tool.js +115 -0
- package/dist/tools/specialized/refactor.tool.js.map +1 -0
- package/dist/tools/specialized/write-tests.tool.d.ts +20 -0
- package/dist/tools/specialized/write-tests.tool.d.ts.map +1 -0
- package/dist/tools/specialized/write-tests.tool.js +115 -0
- package/dist/tools/specialized/write-tests.tool.js.map +1 -0
- package/dist/tools/system/ai-config.tool.d.ts +13 -0
- package/dist/tools/system/ai-config.tool.d.ts.map +1 -0
- package/dist/tools/system/ai-config.tool.js +252 -0
- package/dist/tools/system/ai-config.tool.js.map +1 -0
- package/dist/tools/system/ai-models.tool.d.ts +45 -0
- package/dist/tools/system/ai-models.tool.d.ts.map +1 -0
- package/dist/tools/system/ai-models.tool.js +194 -0
- package/dist/tools/system/ai-models.tool.js.map +1 -0
- package/dist/tools/system/config.tool.d.ts +57 -0
- package/dist/tools/system/config.tool.d.ts.map +1 -0
- package/dist/tools/system/config.tool.js +320 -0
- package/dist/tools/system/config.tool.js.map +1 -0
- package/dist/tools/system/env-info.tool.d.ts +20 -0
- package/dist/tools/system/env-info.tool.d.ts.map +1 -0
- package/dist/tools/system/env-info.tool.js +228 -0
- package/dist/tools/system/env-info.tool.js.map +1 -0
- package/dist/tools/system/index.d.ts +37 -0
- package/dist/tools/system/index.d.ts.map +1 -0
- package/dist/tools/system/index.js +37 -0
- package/dist/tools/system/index.js.map +1 -0
- package/dist/tools/system/memory-usage.tool.d.ts +20 -0
- package/dist/tools/system/memory-usage.tool.d.ts.map +1 -0
- package/dist/tools/system/memory-usage.tool.js +223 -0
- package/dist/tools/system/memory-usage.tool.js.map +1 -0
- package/dist/tools/system/process-list.tool.d.ts +20 -0
- package/dist/tools/system/process-list.tool.d.ts.map +1 -0
- package/dist/tools/system/process-list.tool.js +202 -0
- package/dist/tools/system/process-list.tool.js.map +1 -0
- package/dist/tools/system/shell-exec.tool.d.ts +20 -0
- package/dist/tools/system/shell-exec.tool.d.ts.map +1 -0
- package/dist/tools/system/shell-exec.tool.js +293 -0
- package/dist/tools/system/shell-exec.tool.js.map +1 -0
- package/dist/tools/timeout-test.tool.d.ts +20 -0
- package/dist/tools/timeout-test.tool.d.ts.map +1 -0
- package/dist/tools/timeout-test.tool.js +46 -0
- package/dist/tools/timeout-test.tool.js.map +1 -0
- package/dist/tree-sitter/index.d.ts +27 -0
- package/dist/tree-sitter/index.d.ts.map +1 -0
- package/dist/tree-sitter/index.js +27 -0
- package/dist/tree-sitter/index.js.map +1 -0
- package/dist/tree-sitter/parser-manager.d.ts +83 -0
- package/dist/tree-sitter/parser-manager.d.ts.map +1 -0
- package/dist/tree-sitter/parser-manager.js +430 -0
- package/dist/tree-sitter/parser-manager.js.map +1 -0
- package/dist/tree-sitter/types.d.ts +117 -0
- package/dist/tree-sitter/types.d.ts.map +1 -0
- package/dist/tree-sitter/types.js +375 -0
- package/dist/tree-sitter/types.js.map +1 -0
- package/dist/types/file-types.d.ts +277 -0
- package/dist/types/file-types.d.ts.map +1 -0
- package/dist/types/file-types.js +75 -0
- package/dist/types/file-types.js.map +1 -0
- package/dist/types/git-types.d.ts +270 -0
- package/dist/types/git-types.d.ts.map +1 -0
- package/dist/types/git-types.js +26 -0
- package/dist/types/git-types.js.map +1 -0
- package/dist/types/index.d.ts +28 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +31 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/tool-types.d.ts +231 -0
- package/dist/types/tool-types.d.ts.map +1 -0
- package/dist/types/tool-types.js +30 -0
- package/dist/types/tool-types.js.map +1 -0
- package/dist/utils/bun-file.d.ts +99 -0
- package/dist/utils/bun-file.d.ts.map +1 -0
- package/dist/utils/bun-file.js +393 -0
- package/dist/utils/bun-file.js.map +1 -0
- package/dist/utils/cache.d.ts +124 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/cache.js +228 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/commandExecutor.d.ts +54 -0
- package/dist/utils/commandExecutor.d.ts.map +1 -0
- package/dist/utils/commandExecutor.js +165 -0
- package/dist/utils/commandExecutor.js.map +1 -0
- package/dist/utils/edit-utils.d.ts +72 -0
- package/dist/utils/edit-utils.d.ts.map +1 -0
- package/dist/utils/edit-utils.js +129 -0
- package/dist/utils/edit-utils.js.map +1 -0
- package/dist/utils/errors.d.ts +170 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +304 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/file-utils.d.ts +195 -0
- package/dist/utils/file-utils.d.ts.map +1 -0
- package/dist/utils/file-utils.js +401 -0
- package/dist/utils/file-utils.js.map +1 -0
- package/dist/utils/git-utils.d.ts +204 -0
- package/dist/utils/git-utils.d.ts.map +1 -0
- package/dist/utils/git-utils.js +352 -0
- package/dist/utils/git-utils.js.map +1 -0
- package/dist/utils/languageDetection.d.ts +54 -0
- package/dist/utils/languageDetection.d.ts.map +1 -0
- package/dist/utils/languageDetection.js +340 -0
- package/dist/utils/languageDetection.js.map +1 -0
- package/dist/utils/logger.d.ts +207 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +484 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/process-utils.d.ts +196 -0
- package/dist/utils/process-utils.d.ts.map +1 -0
- package/dist/utils/process-utils.js +302 -0
- package/dist/utils/process-utils.js.map +1 -0
- package/dist/utils/projectContext.enhanced.d.ts +71 -0
- package/dist/utils/projectContext.enhanced.d.ts.map +1 -0
- package/dist/utils/projectContext.enhanced.js +816 -0
- package/dist/utils/projectContext.enhanced.js.map +1 -0
- package/dist/utils/security.d.ts +123 -0
- package/dist/utils/security.d.ts.map +1 -0
- package/dist/utils/security.js +337 -0
- package/dist/utils/security.js.map +1 -0
- package/dist/utils/validation.d.ts +163 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +558 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/version.d.ts +17 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +17 -0
- package/dist/version.js.map +1 -0
- package/kemdi-code-mcp-logo.png +0 -0
- package/package.json +136 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-invoker.js","sourceRoot":"","sources":["../../src/recursive/tool-invoker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAsB,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAOL,cAAc,EACd,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB,+CAA+C;AAC/C,MAAM,YAAY,GAAG,IAAI,GAAG,EAA6B,CAAC;AAE1D,MAAM,QAAQ,GAAG,cAAc,CAAC;AAChC;;;GAGG;AACH,KAAK,UAAU,iBAAiB,CAAC,OAAe;IAC9C,MAAM,MAAM,GAAG,MAAM,QAAQ,EAAE,CAAC;IAChC,MAAM,YAAY,GAAG,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACvD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAE5C,IAAI,KAA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AAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAClD,MAAM,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,eAAe,GAAG,CAAC,CAAC,CAAC;IACnD,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,OAAe,EACf,QAAgB,EAAE;IAYlB,MAAM,MAAM,GAAG,MAAM,QAAQ,EAAE,CAAC;IAChC,MAAM,MAAM,GAAG,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAE3C,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAC1D,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KemdiCode MCP Server
|
|
3
|
+
* Copyright (C) 2025-2026 Kemdi Sp. z o.o.
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Recursive Tool Types
|
|
20
|
+
*
|
|
21
|
+
* TypeScript interfaces for recursive tool invocation system.
|
|
22
|
+
*
|
|
23
|
+
* @module recursive/types
|
|
24
|
+
*/
|
|
25
|
+
/** Tool invocation request */
|
|
26
|
+
export interface ToolInvocationRequest {
|
|
27
|
+
invocationId: string;
|
|
28
|
+
agentId: string;
|
|
29
|
+
sessionId: string;
|
|
30
|
+
toolName: string;
|
|
31
|
+
args: Record<string, unknown>;
|
|
32
|
+
parentInvocationId?: string;
|
|
33
|
+
reason?: string;
|
|
34
|
+
timestamp: number;
|
|
35
|
+
}
|
|
36
|
+
/** Tool invocation result */
|
|
37
|
+
export interface ToolInvocationResult {
|
|
38
|
+
invocationId: string;
|
|
39
|
+
success: boolean;
|
|
40
|
+
result?: unknown;
|
|
41
|
+
error?: string;
|
|
42
|
+
duration: number;
|
|
43
|
+
depth: number;
|
|
44
|
+
}
|
|
45
|
+
/** Invocation policy */
|
|
46
|
+
export interface InvocationPolicy {
|
|
47
|
+
/** Maximum nesting depth (default: 5) */
|
|
48
|
+
maxDepth: number;
|
|
49
|
+
/** Max invocations per minute per agent */
|
|
50
|
+
maxInvocationsPerMinute: number;
|
|
51
|
+
/** Tools requiring supervisor approval */
|
|
52
|
+
requiresApproval: string[];
|
|
53
|
+
/** Blocked tools (cannot be invoked recursively) */
|
|
54
|
+
blockedTools: string[];
|
|
55
|
+
/** Whether workers can invoke tools */
|
|
56
|
+
allowWorkerInvocation: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Default policy for recursive tool invocation
|
|
60
|
+
*
|
|
61
|
+
* @description Allows multi-level agent invocation with safety limits:
|
|
62
|
+
* - Agent -> invoke-tool -> Tool (depth 1) ✅
|
|
63
|
+
* - Agent -> invoke-tool -> invoke-tool -> Tool (depth 2) ✅
|
|
64
|
+
* - Deeper recursive invoke-tool chains are blocked in tool-invoker.ts
|
|
65
|
+
* - Overall max depth: 5 (for any tool)
|
|
66
|
+
* - Rate limit: 30 invocations/min per agent
|
|
67
|
+
*/
|
|
68
|
+
export declare const DEFAULT_POLICY: InvocationPolicy;
|
|
69
|
+
/** Safety check result */
|
|
70
|
+
export interface SafetyCheckResult {
|
|
71
|
+
allowed: boolean;
|
|
72
|
+
reason?: string;
|
|
73
|
+
requiresSupervisorApproval?: boolean;
|
|
74
|
+
currentDepth?: number;
|
|
75
|
+
rateLimit?: {
|
|
76
|
+
current: number;
|
|
77
|
+
max: number;
|
|
78
|
+
resetIn: number;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/** Invocation context (tracks call chain) */
|
|
82
|
+
export interface InvocationContext {
|
|
83
|
+
rootInvocationId: string;
|
|
84
|
+
currentDepth: number;
|
|
85
|
+
chain: string[];
|
|
86
|
+
startTime: number;
|
|
87
|
+
}
|
|
88
|
+
/** Rate limit entry */
|
|
89
|
+
export interface RateLimitEntry {
|
|
90
|
+
count: number;
|
|
91
|
+
windowStart: number;
|
|
92
|
+
}
|
|
93
|
+
/** Redis key prefixes */
|
|
94
|
+
export declare const RECURSIVE_KEYS: {
|
|
95
|
+
/** Invocation data - mcp:invoke:{invocationId} */
|
|
96
|
+
invocation: (id: string) => string;
|
|
97
|
+
/** Agent rate limit - mcp:invoke:rate:{agentId} */
|
|
98
|
+
rateLimit: (agentId: string) => string;
|
|
99
|
+
/** Invocation chain - mcp:invoke:chain:{rootId} */
|
|
100
|
+
chain: (rootId: string) => string;
|
|
101
|
+
/** Agent invocation log - mcp:invoke:log:{agentId} */
|
|
102
|
+
log: (agentId: string) => string;
|
|
103
|
+
};
|
|
104
|
+
/** Invocation TTL (1 hour) */
|
|
105
|
+
export declare const INVOCATION_TTL: number;
|
|
106
|
+
/** Rate limit window (1 minute) */
|
|
107
|
+
export declare const RATE_LIMIT_WINDOW: number;
|
|
108
|
+
/** Max log entries per agent */
|
|
109
|
+
export declare const MAX_LOG_ENTRIES = 100;
|
|
110
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/recursive/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AAEH,8BAA8B;AAC9B,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,6BAA6B;AAC7B,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAwB;AACxB,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,uBAAuB,EAAE,MAAM,CAAC;IAChC,0CAA0C;IAC1C,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,oDAAoD;IACpD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,uCAAuC;IACvC,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,EAAE,gBAM5B,CAAC;AAEF,0BAA0B;AAC1B,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,6CAA6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,uBAAuB;AACvB,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,yBAAyB;AACzB,eAAO,MAAM,cAAc;IACzB,kDAAkD;qBACjC,MAAM;IACvB,mDAAmD;yBAC9B,MAAM;IAC3B,mDAAmD;oBACnC,MAAM;IACtB,sDAAsD;mBACvC,MAAM;CACtB,CAAC;AAEF,8BAA8B;AAC9B,eAAO,MAAM,cAAc,QAAU,CAAC;AAEtC,mCAAmC;AACnC,eAAO,MAAM,iBAAiB,QAAY,CAAC;AAE3C,gCAAgC;AAChC,eAAO,MAAM,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KemdiCode MCP Server
|
|
3
|
+
* Copyright (C) 2025-2026 Kemdi Sp. z o.o.
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Default policy for recursive tool invocation
|
|
20
|
+
*
|
|
21
|
+
* @description Allows multi-level agent invocation with safety limits:
|
|
22
|
+
* - Agent -> invoke-tool -> Tool (depth 1) ✅
|
|
23
|
+
* - Agent -> invoke-tool -> invoke-tool -> Tool (depth 2) ✅
|
|
24
|
+
* - Deeper recursive invoke-tool chains are blocked in tool-invoker.ts
|
|
25
|
+
* - Overall max depth: 5 (for any tool)
|
|
26
|
+
* - Rate limit: 30 invocations/min per agent
|
|
27
|
+
*/
|
|
28
|
+
export const DEFAULT_POLICY = {
|
|
29
|
+
maxDepth: 5,
|
|
30
|
+
maxInvocationsPerMinute: 30,
|
|
31
|
+
requiresApproval: ['shell-exec', 'file-write'],
|
|
32
|
+
blockedTools: [], // Recursive invoke-tool limited to depth 2 in tool-invoker.ts
|
|
33
|
+
allowWorkerInvocation: true,
|
|
34
|
+
};
|
|
35
|
+
/** Redis key prefixes */
|
|
36
|
+
export const RECURSIVE_KEYS = {
|
|
37
|
+
/** Invocation data - mcp:invoke:{invocationId} */
|
|
38
|
+
invocation: (id) => `mcp:invoke:${id}`,
|
|
39
|
+
/** Agent rate limit - mcp:invoke:rate:{agentId} */
|
|
40
|
+
rateLimit: (agentId) => `mcp:invoke:rate:${agentId}`,
|
|
41
|
+
/** Invocation chain - mcp:invoke:chain:{rootId} */
|
|
42
|
+
chain: (rootId) => `mcp:invoke:chain:${rootId}`,
|
|
43
|
+
/** Agent invocation log - mcp:invoke:log:{agentId} */
|
|
44
|
+
log: (agentId) => `mcp:invoke:log:${agentId}`,
|
|
45
|
+
};
|
|
46
|
+
/** Invocation TTL (1 hour) */
|
|
47
|
+
export const INVOCATION_TTL = 60 * 60;
|
|
48
|
+
/** Rate limit window (1 minute) */
|
|
49
|
+
export const RATE_LIMIT_WINDOW = 60 * 1000;
|
|
50
|
+
/** Max log entries per agent */
|
|
51
|
+
export const MAX_LOG_ENTRIES = 100;
|
|
52
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/recursive/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA8CH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,cAAc,GAAqB;IAC9C,QAAQ,EAAE,CAAC;IACX,uBAAuB,EAAE,EAAE;IAC3B,gBAAgB,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;IAC9C,YAAY,EAAE,EAAE,EAAE,8DAA8D;IAChF,qBAAqB,EAAE,IAAI;CAC5B,CAAC;AA6BF,yBAAyB;AACzB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,kDAAkD;IAClD,UAAU,EAAE,CAAC,EAAU,EAAE,EAAE,CAAC,cAAc,EAAE,EAAE;IAC9C,mDAAmD;IACnD,SAAS,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,mBAAmB,OAAO,EAAE;IAC5D,mDAAmD;IACnD,KAAK,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,oBAAoB,MAAM,EAAE;IACvD,sDAAsD;IACtD,GAAG,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,kBAAkB,OAAO,EAAE;CACtD,CAAC;AAEF,8BAA8B;AAC9B,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,GAAG,EAAE,CAAC;AAEtC,mCAAmC;AACnC,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,GAAG,IAAI,CAAC;AAE3C,gCAAgC;AAChC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KemdiCode MCP Server
|
|
3
|
+
* Copyright (C) 2025-2026 Kemdi Sp. z o.o.
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* RL Dopamine Module
|
|
20
|
+
*
|
|
21
|
+
* Provides immediate "dopamine hit" feedback signals for agent actions.
|
|
22
|
+
* These signals are separate from shaped rewards and provide instant feedback.
|
|
23
|
+
*/
|
|
24
|
+
import { RedisBackedService } from '../infrastructure/redis/redis-backed-service.js';
|
|
25
|
+
import type { DopamineSignal, DopamineTrigger, DopamineStats } from './types.js';
|
|
26
|
+
/**
|
|
27
|
+
* Dopamine Emitter configuration
|
|
28
|
+
*/
|
|
29
|
+
export interface DopamineEmitterConfig {
|
|
30
|
+
/** Maximum signals to keep per agent */
|
|
31
|
+
maxSignals?: number;
|
|
32
|
+
/** Signal TTL in seconds */
|
|
33
|
+
signalTtl?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Dopamine Emitter
|
|
37
|
+
*/
|
|
38
|
+
export declare class DopamineEmitter extends RedisBackedService {
|
|
39
|
+
protected get serviceName(): string;
|
|
40
|
+
private config;
|
|
41
|
+
constructor(config?: DopamineEmitterConfig);
|
|
42
|
+
/**
|
|
43
|
+
* Emit a dopamine signal
|
|
44
|
+
*/
|
|
45
|
+
emit(agentId: string, trigger: DopamineTrigger, options?: {
|
|
46
|
+
intensityMultiplier?: number;
|
|
47
|
+
action?: string;
|
|
48
|
+
customMessage?: string;
|
|
49
|
+
duration?: number;
|
|
50
|
+
}): Promise<DopamineSignal | null>;
|
|
51
|
+
/**
|
|
52
|
+
* Emit tool success signal
|
|
53
|
+
*/
|
|
54
|
+
toolSuccess(agentId: string, toolName: string, durationMs?: number): Promise<DopamineSignal | null>;
|
|
55
|
+
/**
|
|
56
|
+
* Emit tool failure signal
|
|
57
|
+
*/
|
|
58
|
+
toolFailure(agentId: string, toolName: string): Promise<DopamineSignal | null>;
|
|
59
|
+
/**
|
|
60
|
+
* Emit task completed signal
|
|
61
|
+
*/
|
|
62
|
+
taskCompleted(agentId: string, taskName?: string): Promise<DopamineSignal | null>;
|
|
63
|
+
/**
|
|
64
|
+
* Emit pattern discovered signal
|
|
65
|
+
*/
|
|
66
|
+
patternDiscovered(agentId: string, patternName?: string): Promise<DopamineSignal | null>;
|
|
67
|
+
/**
|
|
68
|
+
* Emit repeated error signal
|
|
69
|
+
*/
|
|
70
|
+
repeatedError(agentId: string, errorType?: string): Promise<DopamineSignal | null>;
|
|
71
|
+
/**
|
|
72
|
+
* Emit collaboration success signal
|
|
73
|
+
*/
|
|
74
|
+
collaborationSuccess(agentId: string, peerId?: string): Promise<DopamineSignal | null>;
|
|
75
|
+
/**
|
|
76
|
+
* Get recent signals for an agent
|
|
77
|
+
*/
|
|
78
|
+
getRecentSignals(agentId: string, limit?: number): Promise<DopamineSignal[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Get dopamine statistics
|
|
81
|
+
*/
|
|
82
|
+
getStats(agentId: string): Promise<DopamineStats | null>;
|
|
83
|
+
/**
|
|
84
|
+
* Clear all signals for an agent
|
|
85
|
+
*/
|
|
86
|
+
clearSignals(agentId: string): Promise<boolean>;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Get the global dopamine emitter
|
|
90
|
+
*/
|
|
91
|
+
export declare function getDopamineEmitter(): DopamineEmitter;
|
|
92
|
+
/**
|
|
93
|
+
* Reset the global dopamine emitter (for testing)
|
|
94
|
+
*/
|
|
95
|
+
export declare function resetDopamineEmitter(): void;
|
|
96
|
+
//# sourceMappingURL=dopamine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dopamine.d.ts","sourceRoot":"","sources":["../../src/rl/dopamine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AACrF,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,aAAa,EAEd,MAAM,YAAY,CAAC;AAIpB;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,kBAAkB;IACrD,SAAS,KAAK,WAAW,WAAgC;IACzD,OAAO,CAAC,MAAM,CAAwB;gBAE1B,MAAM,GAAE,qBAA0B;IAQ9C;;OAEG;IACG,IAAI,CACR,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,eAAe,EACxB,OAAO,GAAE;QACP,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACd,GACL,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAuCjC;;OAEG;IACG,WAAW,CACf,OAAO,EAAE,MAAM,EACf,Q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*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* RL Dopamine Module
|
|
20
|
+
*
|
|
21
|
+
* Provides immediate "dopamine hit" feedback signals for agent actions.
|
|
22
|
+
* These signals are separate from shaped rewards and provide instant feedback.
|
|
23
|
+
*/
|
|
24
|
+
import { RedisBackedService } from '../infrastructure/redis/redis-backed-service.js';
|
|
25
|
+
import { DOPAMINE_TRIGGERS, RL_KEYS } from './types.js';
|
|
26
|
+
import { randomBytes } from 'crypto';
|
|
27
|
+
/**
|
|
28
|
+
* Dopamine Emitter
|
|
29
|
+
*/
|
|
30
|
+
export class DopamineEmitter extends RedisBackedService {
|
|
31
|
+
get serviceName() { return 'DopamineEmitter'; }
|
|
32
|
+
config;
|
|
33
|
+
constructor(config = {}) {
|
|
34
|
+
super();
|
|
35
|
+
this.config = {
|
|
36
|
+
maxSignals: config.maxSignals || 500,
|
|
37
|
+
signalTtl: config.signalTtl || 3600, // 1 hour
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Emit a dopamine signal
|
|
42
|
+
*/
|
|
43
|
+
async emit(agentId, trigger, options = {}) {
|
|
44
|
+
if (!this.isConnected() || !this.redis)
|
|
45
|
+
return null;
|
|
46
|
+
try {
|
|
47
|
+
const config = DOPAMINE_TRIGGERS[trigger];
|
|
48
|
+
const intensity = config.baseIntensity * (options.intensityMultiplier || 1.0);
|
|
49
|
+
const signal = {
|
|
50
|
+
id: `dopa_${Date.now()}_${randomBytes(4).toString('hex')}`,
|
|
51
|
+
agentId,
|
|
52
|
+
type: config.signalType,
|
|
53
|
+
intensity: Math.max(-1, Math.min(1, intensity)), // Clamp to [-1, 1]
|
|
54
|
+
trigger,
|
|
55
|
+
timestamp: Date.now(),
|
|
56
|
+
duration: options.duration,
|
|
57
|
+
action: options.action,
|
|
58
|
+
message: options.customMessage || config.message,
|
|
59
|
+
};
|
|
60
|
+
// Store signal
|
|
61
|
+
const key = RL_KEYS.dopamine(agentId);
|
|
62
|
+
await this.redis.zadd(key, signal.timestamp, JSON.stringify(signal));
|
|
63
|
+
// Trim to max size
|
|
64
|
+
const count = await this.redis.zcard(key);
|
|
65
|
+
if (count > this.config.maxSignals) {
|
|
66
|
+
await this.redis.zremrangebyrank(key, 0, count - this.config.maxSignals - 1);
|
|
67
|
+
}
|
|
68
|
+
// Set TTL
|
|
69
|
+
await this.redis.expire(key, this.config.signalTtl);
|
|
70
|
+
return signal;
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
console.error('[DopamineEmitter] Error emitting signal:', error);
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Emit tool success signal
|
|
79
|
+
*/
|
|
80
|
+
async toolSuccess(agentId, toolName, durationMs) {
|
|
81
|
+
// Fast success (< 1 second) gets a bigger hit
|
|
82
|
+
if (durationMs !== undefined && durationMs < 1000) {
|
|
83
|
+
return this.emit(agentId, 'tool_fast_success', { action: toolName });
|
|
84
|
+
}
|
|
85
|
+
return this.emit(agentId, 'tool_success', { action: toolName });
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Emit tool failure signal
|
|
89
|
+
*/
|
|
90
|
+
async toolFailure(agentId, toolName) {
|
|
91
|
+
return this.emit(agentId, 'tool_failure', { action: toolName });
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Emit task completed signal
|
|
95
|
+
*/
|
|
96
|
+
async taskCompleted(agentId, taskName) {
|
|
97
|
+
return this.emit(agentId, 'task_completed', {
|
|
98
|
+
action: taskName,
|
|
99
|
+
customMessage: taskName ? `Task completed: ${taskName}` : 'Task completed!',
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Emit pattern discovered signal
|
|
104
|
+
*/
|
|
105
|
+
async patternDiscovered(agentId, patternName) {
|
|
106
|
+
return this.emit(agentId, 'pattern_discovered', {
|
|
107
|
+
customMessage: patternName ? `Pattern discovered: ${patternName}` : 'New pattern identified!',
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Emit repeated error signal
|
|
112
|
+
*/
|
|
113
|
+
async repeatedError(agentId, errorType) {
|
|
114
|
+
return this.emit(agentId, 'repeated_error', {
|
|
115
|
+
customMessage: errorType ? `Repeated error: ${errorType}` : 'Repeated error detected',
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Emit collaboration success signal
|
|
120
|
+
*/
|
|
121
|
+
async collaborationSuccess(agentId, peerId) {
|
|
122
|
+
return this.emit(agentId, 'collaboration_success', {
|
|
123
|
+
customMessage: peerId
|
|
124
|
+
? `Successful collaboration with ${peerId}`
|
|
125
|
+
: 'Successful collaboration',
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Get recent signals for an agent
|
|
130
|
+
*/
|
|
131
|
+
async getRecentSignals(agentId, limit = 20) {
|
|
132
|
+
if (!this.isConnected() || !this.redis)
|
|
133
|
+
return [];
|
|
134
|
+
try {
|
|
135
|
+
const key = RL_KEYS.dopamine(agentId);
|
|
136
|
+
const entries = await this.redis.zrevrange(key, 0, limit - 1);
|
|
137
|
+
return entries
|
|
138
|
+
.map((entry) => {
|
|
139
|
+
try {
|
|
140
|
+
return JSON.parse(entry);
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
})
|
|
146
|
+
.filter((s) => s !== null);
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
console.error('[DopamineEmitter] Error getting signals:', error);
|
|
150
|
+
return [];
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Get dopamine statistics
|
|
155
|
+
*/
|
|
156
|
+
async getStats(agentId) {
|
|
157
|
+
if (!this.isConnected() || !this.redis)
|
|
158
|
+
return null;
|
|
159
|
+
try {
|
|
160
|
+
const key = RL_KEYS.dopamine(agentId);
|
|
161
|
+
const allSignals = await this.redis.zrange(key, 0, -1);
|
|
162
|
+
if (allSignals.length === 0) {
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
const signals = allSignals
|
|
166
|
+
.map((s) => {
|
|
167
|
+
try {
|
|
168
|
+
return JSON.parse(s);
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
})
|
|
174
|
+
.filter((s) => s !== null);
|
|
175
|
+
// Count by type
|
|
176
|
+
const byType = {
|
|
177
|
+
spike: 0,
|
|
178
|
+
dip: 0,
|
|
179
|
+
sustained: 0,
|
|
180
|
+
baseline: 0,
|
|
181
|
+
};
|
|
182
|
+
const byTrigger = {};
|
|
183
|
+
let totalIntensity = 0;
|
|
184
|
+
for (const signal of signals) {
|
|
185
|
+
byType[signal.type]++;
|
|
186
|
+
byTrigger[signal.trigger] = (byTrigger[signal.trigger] || 0) + 1;
|
|
187
|
+
totalIntensity += signal.intensity;
|
|
188
|
+
}
|
|
189
|
+
// Get recent signals
|
|
190
|
+
const recentSignals = signals.slice(-20).reverse();
|
|
191
|
+
return {
|
|
192
|
+
agentId,
|
|
193
|
+
totalSignals: signals.length,
|
|
194
|
+
byType,
|
|
195
|
+
byTrigger: byTrigger,
|
|
196
|
+
averageIntensity: signals.length > 0 ? totalIntensity / signals.length : 0,
|
|
197
|
+
recentSignals,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
catch (error) {
|
|
201
|
+
console.error('[DopamineEmitter] Error getting stats:', error);
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Clear all signals for an agent
|
|
207
|
+
*/
|
|
208
|
+
async clearSignals(agentId) {
|
|
209
|
+
if (!this.isConnected() || !this.redis)
|
|
210
|
+
return false;
|
|
211
|
+
try {
|
|
212
|
+
const key = RL_KEYS.dopamine(agentId);
|
|
213
|
+
await this.redis.del(key);
|
|
214
|
+
return true;
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
console.error('[DopamineEmitter] Error clearing signals:', error);
|
|
218
|
+
return false;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
// Singleton instance
|
|
223
|
+
let dopamineEmitter = null;
|
|
224
|
+
/**
|
|
225
|
+
* Get the global dopamine emitter
|
|
226
|
+
*/
|
|
227
|
+
export function getDopamineEmitter() {
|
|
228
|
+
if (!dopamineEmitter) {
|
|
229
|
+
dopamineEmitter = new DopamineEmitter();
|
|
230
|
+
}
|
|
231
|
+
return dopamineEmitter;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Reset the global dopamine emitter (for testing)
|
|
235
|
+
*/
|
|
236
|
+
export function resetDopamineEmitter() {
|
|
237
|
+
if (dopamineEmitter) {
|
|
238
|
+
dopamineEmitter.disconnect().catch(console.error);
|
|
239
|
+
}
|
|
240
|
+
dopamineEmitter = null;
|
|
241
|
+
}
|
|
242
|
+
//# sourceMappingURL=dopamine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dopamine.js","sourceRoot":"","sources":["../../src/rl/dopamine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AAEH,O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* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* RL (Reinforcement Learning) Module
|
|
20
|
+
*
|
|
21
|
+
* Provides potential-based reward shaping with dopamine signals
|
|
22
|
+
* to guide agent behavior through intrinsic motivation.
|
|
23
|
+
*/
|
|
24
|
+
export type { AgentState, PotentialWeights, IntrinsicRewards, ShapedReward, DopamineSignal, DopamineSignalType, DopamineTrigger, DopamineTriggerConfig, RewardHistoryEntry, RewardStats, DopamineStats, WeightLearningConfig, } from './types.js';
|
|
25
|
+
export { DEFAULT_POTENTIAL_WEIGHTS, DEFAULT_INTRINSIC_REWARDS, DOPAMINE_TRIGGERS, RL_KEYS, GAMMA, DEFAULT_WEIGHT_LEARNING_CONFIG, } from './types.js';
|
|
26
|
+
export { StateTracker, getStateTracker, resetStateTracker, type StateTrackerConfig, type StateUpdate, } from './state-tracker.js';
|
|
27
|
+
export { calculatePotential, potentialDifference, calculateShapedReward, normalizeWeights, analyzePotential, suggestOptimalAction, } from './potential.js';
|
|
28
|
+
export { getIntrinsicReward, shapeReward, RewardTracker, getRewardTracker, resetRewardTracker, type RewardTrackerConfig, } from './rewards.js';
|
|
29
|
+
export { DopamineEmitter, getDopamineEmitter, resetDopamineEmitter, type DopamineEmitterConfig, } from './dopamine.js';
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rl/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AAGH,YAAY,EACV,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,iBAAiB,EACjB,OAAO,EACP,KAAK,EACL,8BAA8B,GAC/B,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,mBAAmB,GACzB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,qBAAqB,GAC3B,MAAM,eAAe,CAAC"}
|
package/dist/rl/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KemdiCode MCP Server
|
|
3
|
+
* Copyright (C) 2025-2026 Kemdi Sp. z o.o.
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export { DEFAULT_POTENTIAL_WEIGHTS, DEFAULT_INTRINSIC_REWARDS, DOPAMINE_TRIGGERS, RL_KEYS, GAMMA, DEFAULT_WEIGHT_LEARNING_CONFIG, } from './types.js';
|
|
19
|
+
// State tracking
|
|
20
|
+
export { StateTracker, getStateTracker, resetStateTracker, } from './state-tracker.js';
|
|
21
|
+
// Potential function
|
|
22
|
+
export { calculatePotential, potentialDifference, calculateShapedReward, normalizeWeights, analyzePotential, suggestOptimalAction, } from './potential.js';
|
|
23
|
+
// Rewards
|
|
24
|
+
export { getIntrinsicReward, shapeReward, RewardTracker, getRewardTracker, resetRewardTracker, } from './rewards.js';
|
|
25
|
+
// Dopamine
|
|
26
|
+
export { DopamineEmitter, getDopamineEmitter, resetDopamineEmitter, } from './dopamine.js';
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rl/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAyBH,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,iBAAiB,EACjB,OAAO,EACP,KAAK,EACL,8BAA8B,GAC/B,MAAM,YAAY,CAAC;AAEpB,iBAAiB;AACjB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,iBAAiB,GAGlB,MAAM,oBAAoB,CAAC;AAE5B,qBAAqB;AACrB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAExB,UAAU;AACV,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,kBAAkB,GAEnB,MAAM,cAAc,CAAC;AAEtB,WAAW;AACX,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,oBAAoB,GAErB,MAAM,eAAe,CAAC"}
|