@fraziym/axoniz 0.1.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/README.md +76 -0
- package/dist/agents/definition.d.ts +15 -0
- package/dist/agents/definition.d.ts.map +1 -0
- package/dist/agents/definition.js +41 -0
- package/dist/agents/definition.js.map +1 -0
- package/dist/agents/index.d.ts +12 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +11 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/registry.d.ts +17 -0
- package/dist/agents/registry.d.ts.map +1 -0
- package/dist/agents/registry.js +23 -0
- package/dist/agents/registry.js.map +1 -0
- package/dist/agents/specialized.d.ts +31 -0
- package/dist/agents/specialized.d.ts.map +1 -0
- package/dist/agents/specialized.js +75 -0
- package/dist/agents/specialized.js.map +1 -0
- package/dist/awareness/index.d.ts +14 -0
- package/dist/awareness/index.d.ts.map +1 -0
- package/dist/awareness/index.js +22 -0
- package/dist/awareness/index.js.map +1 -0
- package/dist/awareness/service.d.ts +180 -0
- package/dist/awareness/service.d.ts.map +1 -0
- package/dist/awareness/service.js +789 -0
- package/dist/awareness/service.js.map +1 -0
- package/dist/cli/entry.d.ts +13 -0
- package/dist/cli/entry.d.ts.map +1 -0
- package/dist/cli/entry.js +35 -0
- package/dist/cli/entry.js.map +1 -0
- package/dist/comms/telegram.d.ts +41 -0
- package/dist/comms/telegram.d.ts.map +1 -0
- package/dist/comms/telegram.js +332 -0
- package/dist/comms/telegram.js.map +1 -0
- package/dist/core/agent.d.ts +252 -0
- package/dist/core/agent.d.ts.map +1 -0
- package/dist/core/agent.js +1399 -0
- package/dist/core/agent.js.map +1 -0
- package/dist/core/auth.d.ts +23 -0
- package/dist/core/auth.d.ts.map +1 -0
- package/dist/core/auth.js +113 -0
- package/dist/core/auth.js.map +1 -0
- package/dist/core/authority.d.ts +118 -0
- package/dist/core/authority.d.ts.map +1 -0
- package/dist/core/authority.js +402 -0
- package/dist/core/authority.js.map +1 -0
- package/dist/core/backend/async_queue.d.ts +17 -0
- package/dist/core/backend/async_queue.d.ts.map +1 -0
- package/dist/core/backend/async_queue.js +66 -0
- package/dist/core/backend/async_queue.js.map +1 -0
- package/dist/core/backend/index.d.ts +24 -0
- package/dist/core/backend/index.d.ts.map +1 -0
- package/dist/core/backend/index.js +128 -0
- package/dist/core/backend/index.js.map +1 -0
- package/dist/core/backend/llama_server.d.ts +39 -0
- package/dist/core/backend/llama_server.d.ts.map +1 -0
- package/dist/core/backend/llama_server.js +182 -0
- package/dist/core/backend/llama_server.js.map +1 -0
- package/dist/core/backend/llamacpp.d.ts +40 -0
- package/dist/core/backend/llamacpp.d.ts.map +1 -0
- package/dist/core/backend/llamacpp.js +200 -0
- package/dist/core/backend/llamacpp.js.map +1 -0
- package/dist/core/backend/lmstudio.d.ts +53 -0
- package/dist/core/backend/lmstudio.d.ts.map +1 -0
- package/dist/core/backend/lmstudio.js +274 -0
- package/dist/core/backend/lmstudio.js.map +1 -0
- package/dist/core/backend/ollama.d.ts +25 -0
- package/dist/core/backend/ollama.d.ts.map +1 -0
- package/dist/core/backend/ollama.js +86 -0
- package/dist/core/backend/ollama.js.map +1 -0
- package/dist/core/backend/openai.d.ts +27 -0
- package/dist/core/backend/openai.d.ts.map +1 -0
- package/dist/core/backend/openai.js +84 -0
- package/dist/core/backend/openai.js.map +1 -0
- package/dist/core/backend/types.d.ts +73 -0
- package/dist/core/backend/types.d.ts.map +1 -0
- package/dist/core/backend/types.js +137 -0
- package/dist/core/backend/types.js.map +1 -0
- package/dist/core/chat_store.d.ts +77 -0
- package/dist/core/chat_store.d.ts.map +1 -0
- package/dist/core/chat_store.js +332 -0
- package/dist/core/chat_store.js.map +1 -0
- package/dist/core/cli.d.ts +82 -0
- package/dist/core/cli.d.ts.map +1 -0
- package/dist/core/cli.js +602 -0
- package/dist/core/cli.js.map +1 -0
- package/dist/core/config.d.ts +127 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +295 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/debug.d.ts +8 -0
- package/dist/core/debug.d.ts.map +1 -0
- package/dist/core/debug.js +8 -0
- package/dist/core/debug.js.map +1 -0
- package/dist/core/downloader.d.ts +31 -0
- package/dist/core/downloader.d.ts.map +1 -0
- package/dist/core/downloader.js +180 -0
- package/dist/core/downloader.js.map +1 -0
- package/dist/core/errors.d.ts +80 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +134 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/extras.d.ts +160 -0
- package/dist/core/extras.d.ts.map +1 -0
- package/dist/core/extras.js +553 -0
- package/dist/core/extras.js.map +1 -0
- package/dist/core/health.d.ts +27 -0
- package/dist/core/health.d.ts.map +1 -0
- package/dist/core/health.js +96 -0
- package/dist/core/health.js.map +1 -0
- package/dist/core/history.d.ts +50 -0
- package/dist/core/history.d.ts.map +1 -0
- package/dist/core/history.js +276 -0
- package/dist/core/history.js.map +1 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +6 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/intelligence/ast_index.d.ts +255 -0
- package/dist/core/intelligence/ast_index.d.ts.map +1 -0
- package/dist/core/intelligence/ast_index.js +1369 -0
- package/dist/core/intelligence/ast_index.js.map +1 -0
- package/dist/core/intelligence/confidence.d.ts +113 -0
- package/dist/core/intelligence/confidence.d.ts.map +1 -0
- package/dist/core/intelligence/confidence.js +298 -0
- package/dist/core/intelligence/confidence.js.map +1 -0
- package/dist/core/intelligence/context_compressor.d.ts +80 -0
- package/dist/core/intelligence/context_compressor.d.ts.map +1 -0
- package/dist/core/intelligence/context_compressor.js +245 -0
- package/dist/core/intelligence/context_compressor.js.map +1 -0
- package/dist/core/intelligence/daemon.d.ts +247 -0
- package/dist/core/intelligence/daemon.d.ts.map +1 -0
- package/dist/core/intelligence/daemon.js +842 -0
- package/dist/core/intelligence/daemon.js.map +1 -0
- package/dist/core/intelligence/index.d.ts +60 -0
- package/dist/core/intelligence/index.d.ts.map +1 -0
- package/dist/core/intelligence/index.js +101 -0
- package/dist/core/intelligence/index.js.map +1 -0
- package/dist/core/intelligence/predictor.d.ts +246 -0
- package/dist/core/intelligence/predictor.d.ts.map +1 -0
- package/dist/core/intelligence/predictor.js +590 -0
- package/dist/core/intelligence/predictor.js.map +1 -0
- package/dist/core/intelligence/reflex.d.ts +84 -0
- package/dist/core/intelligence/reflex.d.ts.map +1 -0
- package/dist/core/intelligence/reflex.js +344 -0
- package/dist/core/intelligence/reflex.js.map +1 -0
- package/dist/core/intelligence/self_correction.d.ts +121 -0
- package/dist/core/intelligence/self_correction.d.ts.map +1 -0
- package/dist/core/intelligence/self_correction.js +327 -0
- package/dist/core/intelligence/self_correction.js.map +1 -0
- package/dist/core/intelligence/skill_distiller.d.ts +100 -0
- package/dist/core/intelligence/skill_distiller.d.ts.map +1 -0
- package/dist/core/intelligence/skill_distiller.js +246 -0
- package/dist/core/intelligence/skill_distiller.js.map +1 -0
- package/dist/core/intelligence/swarm.d.ts +330 -0
- package/dist/core/intelligence/swarm.d.ts.map +1 -0
- package/dist/core/intelligence/swarm.js +1064 -0
- package/dist/core/intelligence/swarm.js.map +1 -0
- package/dist/core/intelligence/trajectory.d.ts +107 -0
- package/dist/core/intelligence/trajectory.d.ts.map +1 -0
- package/dist/core/intelligence/trajectory.js +330 -0
- package/dist/core/intelligence/trajectory.js.map +1 -0
- package/dist/core/logger.d.ts +111 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +640 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/loop.d.ts +123 -0
- package/dist/core/loop.d.ts.map +1 -0
- package/dist/core/loop.js +423 -0
- package/dist/core/loop.js.map +1 -0
- package/dist/core/memory.d.ts +81 -0
- package/dist/core/memory.d.ts.map +1 -0
- package/dist/core/memory.js +328 -0
- package/dist/core/memory.js.map +1 -0
- package/dist/core/metrics.d.ts +29 -0
- package/dist/core/metrics.d.ts.map +1 -0
- package/dist/core/metrics.js +109 -0
- package/dist/core/metrics.js.map +1 -0
- package/dist/core/models.d.ts +51 -0
- package/dist/core/models.d.ts.map +1 -0
- package/dist/core/models.js +146 -0
- package/dist/core/models.js.map +1 -0
- package/dist/core/optimizer.d.ts +34 -0
- package/dist/core/optimizer.d.ts.map +1 -0
- package/dist/core/optimizer.js +131 -0
- package/dist/core/optimizer.js.map +1 -0
- package/dist/core/persona.d.ts +35 -0
- package/dist/core/persona.d.ts.map +1 -0
- package/dist/core/persona.js +126 -0
- package/dist/core/persona.js.map +1 -0
- package/dist/core/rate_limit.d.ts +23 -0
- package/dist/core/rate_limit.d.ts.map +1 -0
- package/dist/core/rate_limit.js +62 -0
- package/dist/core/rate_limit.js.map +1 -0
- package/dist/core/runner.d.ts +63 -0
- package/dist/core/runner.d.ts.map +1 -0
- package/dist/core/runner.js +671 -0
- package/dist/core/runner.js.map +1 -0
- package/dist/core/stream_parser.d.ts +43 -0
- package/dist/core/stream_parser.d.ts.map +1 -0
- package/dist/core/stream_parser.js +140 -0
- package/dist/core/stream_parser.js.map +1 -0
- package/dist/core/tool_schemas.d.ts +26 -0
- package/dist/core/tool_schemas.d.ts.map +1 -0
- package/dist/core/tool_schemas.js +124 -0
- package/dist/core/tool_schemas.js.map +1 -0
- package/dist/core/which.d.ts +2 -0
- package/dist/core/which.d.ts.map +1 -0
- package/dist/core/which.js +35 -0
- package/dist/core/which.js.map +1 -0
- package/dist/goals/index.d.ts +9 -0
- package/dist/goals/index.d.ts.map +1 -0
- package/dist/goals/index.js +17 -0
- package/dist/goals/index.js.map +1 -0
- package/dist/goals/service.d.ts +115 -0
- package/dist/goals/service.d.ts.map +1 -0
- package/dist/goals/service.js +415 -0
- package/dist/goals/service.js.map +1 -0
- package/dist/goals/types.d.ts +47 -0
- package/dist/goals/types.d.ts.map +1 -0
- package/dist/goals/types.js +66 -0
- package/dist/goals/types.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/autonomous_startup.d.ts +51 -0
- package/dist/integrations/autonomous_startup.d.ts.map +1 -0
- package/dist/integrations/autonomous_startup.js +419 -0
- package/dist/integrations/autonomous_startup.js.map +1 -0
- package/dist/integrations/goose.d.ts +105 -0
- package/dist/integrations/goose.d.ts.map +1 -0
- package/dist/integrations/goose.js +408 -0
- package/dist/integrations/goose.js.map +1 -0
- package/dist/integrations/index.d.ts +21 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +17 -0
- package/dist/integrations/index.js.map +1 -0
- package/dist/integrations/mcp.d.ts +73 -0
- package/dist/integrations/mcp.d.ts.map +1 -0
- package/dist/integrations/mcp.js +307 -0
- package/dist/integrations/mcp.js.map +1 -0
- package/dist/integrations/mempalace.d.ts +18 -0
- package/dist/integrations/mempalace.d.ts.map +1 -0
- package/dist/integrations/mempalace.js +25 -0
- package/dist/integrations/mempalace.js.map +1 -0
- package/dist/integrations/multi_agent.d.ts +82 -0
- package/dist/integrations/multi_agent.d.ts.map +1 -0
- package/dist/integrations/multi_agent.js +280 -0
- package/dist/integrations/multi_agent.js.map +1 -0
- package/dist/integrations/unified_memory.d.ts +415 -0
- package/dist/integrations/unified_memory.d.ts.map +1 -0
- package/dist/integrations/unified_memory.js +1489 -0
- package/dist/integrations/unified_memory.js.map +1 -0
- package/dist/roles/beru.yaml +48 -0
- package/dist/sidecar/client.d.ts +63 -0
- package/dist/sidecar/client.d.ts.map +1 -0
- package/dist/sidecar/client.js +222 -0
- package/dist/sidecar/client.js.map +1 -0
- package/dist/sidecar/index.d.ts +7 -0
- package/dist/sidecar/index.d.ts.map +1 -0
- package/dist/sidecar/index.js +6 -0
- package/dist/sidecar/index.js.map +1 -0
- package/dist/startup.d.ts +22 -0
- package/dist/startup.d.ts.map +1 -0
- package/dist/startup.js +194 -0
- package/dist/startup.js.map +1 -0
- package/dist/tools/_internal.d.ts +90 -0
- package/dist/tools/_internal.d.ts.map +1 -0
- package/dist/tools/_internal.js +375 -0
- package/dist/tools/_internal.js.map +1 -0
- package/dist/tools/_smoke.d.ts +2 -0
- package/dist/tools/_smoke.d.ts.map +1 -0
- package/dist/tools/_smoke.js +203 -0
- package/dist/tools/_smoke.js.map +1 -0
- package/dist/tools/axodex_tools.d.ts +51 -0
- package/dist/tools/axodex_tools.d.ts.map +1 -0
- package/dist/tools/axodex_tools.js +181 -0
- package/dist/tools/axodex_tools.js.map +1 -0
- package/dist/tools/code_tools.d.ts +33 -0
- package/dist/tools/code_tools.d.ts.map +1 -0
- package/dist/tools/code_tools.js +191 -0
- package/dist/tools/code_tools.js.map +1 -0
- package/dist/tools/computer_tools.d.ts +59 -0
- package/dist/tools/computer_tools.d.ts.map +1 -0
- package/dist/tools/computer_tools.js +348 -0
- package/dist/tools/computer_tools.js.map +1 -0
- package/dist/tools/file_tools.d.ts +51 -0
- package/dist/tools/file_tools.d.ts.map +1 -0
- package/dist/tools/file_tools.js +424 -0
- package/dist/tools/file_tools.js.map +1 -0
- package/dist/tools/index.d.ts +13 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +13 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/shell_tools.d.ts +39 -0
- package/dist/tools/shell_tools.d.ts.map +1 -0
- package/dist/tools/shell_tools.js +163 -0
- package/dist/tools/shell_tools.js.map +1 -0
- package/dist/tools/web_tools.d.ts +31 -0
- package/dist/tools/web_tools.d.ts.map +1 -0
- package/dist/tools/web_tools.js +117 -0
- package/dist/tools/web_tools.js.map +1 -0
- package/dist/voice/index.d.ts +41 -0
- package/dist/voice/index.d.ts.map +1 -0
- package/dist/voice/index.js +58 -0
- package/dist/voice/index.js.map +1 -0
- package/dist/voice/light_daemon.d.ts +197 -0
- package/dist/voice/light_daemon.d.ts.map +1 -0
- package/dist/voice/light_daemon.js +746 -0
- package/dist/voice/light_daemon.js.map +1 -0
- package/dist/voice/setup.d.ts +63 -0
- package/dist/voice/setup.d.ts.map +1 -0
- package/dist/voice/setup.js +443 -0
- package/dist/voice/setup.js.map +1 -0
- package/dist/voice/stt.d.ts +148 -0
- package/dist/voice/stt.d.ts.map +1 -0
- package/dist/voice/stt.js +361 -0
- package/dist/voice/stt.js.map +1 -0
- package/dist/voice/tts.d.ts +168 -0
- package/dist/voice/tts.d.ts.map +1 -0
- package/dist/voice/tts.js +698 -0
- package/dist/voice/tts.js.map +1 -0
- package/dist/voice/voice_loop.d.ts +101 -0
- package/dist/voice/voice_loop.d.ts.map +1 -0
- package/dist/voice/voice_loop.js +463 -0
- package/dist/voice/voice_loop.js.map +1 -0
- package/dist/voice/wake_word.d.ts +153 -0
- package/dist/voice/wake_word.d.ts.map +1 -0
- package/dist/voice/wake_word.js +458 -0
- package/dist/voice/wake_word.js.map +1 -0
- package/dist/voice/wav.d.ts +99 -0
- package/dist/voice/wav.d.ts.map +1 -0
- package/dist/voice/wav.js +306 -0
- package/dist/voice/wav.js.map +1 -0
- package/dist/web/broker.d.ts +33 -0
- package/dist/web/broker.d.ts.map +1 -0
- package/dist/web/broker.js +58 -0
- package/dist/web/broker.js.map +1 -0
- package/dist/web/open_browser.d.ts +2 -0
- package/dist/web/open_browser.d.ts.map +1 -0
- package/dist/web/open_browser.js +42 -0
- package/dist/web/open_browser.js.map +1 -0
- package/dist/web/server.d.ts +54 -0
- package/dist/web/server.d.ts.map +1 -0
- package/dist/web/server.js +831 -0
- package/dist/web/server.js.map +1 -0
- package/dist/web/static/app.js +4121 -0
- package/dist/web/static/index.html +2281 -0
- package/dist/web/static/js/MODULE_SUMMARY.md +124 -0
- package/dist/web/static/js/a11y.js +165 -0
- package/dist/web/static/js/admin.js +2145 -0
- package/dist/web/static/js/assistant.js +475 -0
- package/dist/web/static/js/calendar/reminders.js +114 -0
- package/dist/web/static/js/calendar/utils.js +166 -0
- package/dist/web/static/js/calendar.js +3348 -0
- package/dist/web/static/js/censor.js +356 -0
- package/dist/web/static/js/chat.js +4546 -0
- package/dist/web/static/js/chatRenderer.js +2294 -0
- package/dist/web/static/js/chatStream.js +276 -0
- package/dist/web/static/js/codeRunner.js +398 -0
- package/dist/web/static/js/color/hex.js +14 -0
- package/dist/web/static/js/colorPicker.js +453 -0
- package/dist/web/static/js/compare/icons.js +77 -0
- package/dist/web/static/js/compare/index.js +1482 -0
- package/dist/web/static/js/compare/models.js +104 -0
- package/dist/web/static/js/compare/panes.js +817 -0
- package/dist/web/static/js/compare/probe.js +78 -0
- package/dist/web/static/js/compare/scoreboard.js +223 -0
- package/dist/web/static/js/compare/selector.js +1335 -0
- package/dist/web/static/js/compare/state.js +58 -0
- package/dist/web/static/js/compare/stream.js +695 -0
- package/dist/web/static/js/compare/vote.js +254 -0
- package/dist/web/static/js/cookbook-diagnosis.js +694 -0
- package/dist/web/static/js/cookbook-hwfit.js +1888 -0
- package/dist/web/static/js/cookbook.js +2093 -0
- package/dist/web/static/js/cookbookDownload.js +633 -0
- package/dist/web/static/js/cookbookProgressSignal.js +29 -0
- package/dist/web/static/js/cookbookRunning.js +3506 -0
- package/dist/web/static/js/cookbookServe.js +2128 -0
- package/dist/web/static/js/document.js +9731 -0
- package/dist/web/static/js/documentLibrary.js +3376 -0
- package/dist/web/static/js/dragSort.js +265 -0
- package/dist/web/static/js/editor/ai-inpaint.js +374 -0
- package/dist/web/static/js/editor/ai-models.js +273 -0
- package/dist/web/static/js/editor/ai-rembg.js +230 -0
- package/dist/web/static/js/editor/ai-tool-runner.js +147 -0
- package/dist/web/static/js/editor/ai-tools-misc.js +216 -0
- package/dist/web/static/js/editor/build/controls.js +366 -0
- package/dist/web/static/js/editor/build/popups.js +112 -0
- package/dist/web/static/js/editor/build/right-panel.js +200 -0
- package/dist/web/static/js/editor/build/toolbar.js +73 -0
- package/dist/web/static/js/editor/build/topbar.js +131 -0
- package/dist/web/static/js/editor/build/transform-popup.js +109 -0
- package/dist/web/static/js/editor/canvas-coords.js +21 -0
- package/dist/web/static/js/editor/canvas-events.js +197 -0
- package/dist/web/static/js/editor/canvas-transforms.js +132 -0
- package/dist/web/static/js/editor/checkerboard.js +24 -0
- package/dist/web/static/js/editor/clipboard-and-drop.js +133 -0
- package/dist/web/static/js/editor/composite-helpers.js +83 -0
- package/dist/web/static/js/editor/filters/blur.js +118 -0
- package/dist/web/static/js/editor/filters/edge-feather.js +70 -0
- package/dist/web/static/js/editor/fx/adj-popup.js +677 -0
- package/dist/web/static/js/editor/fx/filter-string.js +38 -0
- package/dist/web/static/js/editor/fx/histogram.js +67 -0
- package/dist/web/static/js/editor/fx/pixel-pass.js +249 -0
- package/dist/web/static/js/editor/harmonize-masks.js +116 -0
- package/dist/web/static/js/editor/history-panel.js +176 -0
- package/dist/web/static/js/editor/keyboard-shortcuts.js +271 -0
- package/dist/web/static/js/editor/layer-helpers.js +131 -0
- package/dist/web/static/js/editor/layer-panel.js +600 -0
- package/dist/web/static/js/editor/mask-utils.js +91 -0
- package/dist/web/static/js/editor/shortcuts-popover.js +149 -0
- package/dist/web/static/js/editor/slider-ux.js +191 -0
- package/dist/web/static/js/editor/snap.js +107 -0
- package/dist/web/static/js/editor/state.js +257 -0
- package/dist/web/static/js/editor/stroke-pipeline.js +162 -0
- package/dist/web/static/js/editor/stroke-tool-sliders.js +64 -0
- package/dist/web/static/js/editor/tools/clone.js +81 -0
- package/dist/web/static/js/editor/tools/crop.js +137 -0
- package/dist/web/static/js/editor/tools/flood-fill.js +72 -0
- package/dist/web/static/js/editor/tools/lasso-mask.js +171 -0
- package/dist/web/static/js/editor/tools/lasso.js +65 -0
- package/dist/web/static/js/editor/tools/move.js +79 -0
- package/dist/web/static/js/editor/tools/stroke.js +123 -0
- package/dist/web/static/js/editor/tools/transform-drag.js +174 -0
- package/dist/web/static/js/editor/tools/transform-handles.js +271 -0
- package/dist/web/static/js/editor/tools/transform-session.js +381 -0
- package/dist/web/static/js/editor/tools/wand.js +46 -0
- package/dist/web/static/js/editor/wire-import.js +148 -0
- package/dist/web/static/js/editor/wire-inpaint-controls.js +164 -0
- package/dist/web/static/js/editor/wire-merge-buttons.js +103 -0
- package/dist/web/static/js/editor/wire-selection-controls.js +170 -0
- package/dist/web/static/js/editor/wire-topbar-menus.js +174 -0
- package/dist/web/static/js/editor/wire-topbar-overflow.js +49 -0
- package/dist/web/static/js/editor/wire-topbar.js +188 -0
- package/dist/web/static/js/emailInbox.js +1245 -0
- package/dist/web/static/js/emailLibrary/replyRecipients.js +27 -0
- package/dist/web/static/js/emailLibrary/signatureFold.js +339 -0
- package/dist/web/static/js/emailLibrary/state.js +34 -0
- package/dist/web/static/js/emailLibrary/utils.js +202 -0
- package/dist/web/static/js/emailLibrary.js +5217 -0
- package/dist/web/static/js/emojiPicker.js +311 -0
- package/dist/web/static/js/escMenuStack.js +102 -0
- package/dist/web/static/js/fileHandler.js +295 -0
- package/dist/web/static/js/gallery.js +2835 -0
- package/dist/web/static/js/galleryEditor.js +3798 -0
- package/dist/web/static/js/group.js +955 -0
- package/dist/web/static/js/init.js +405 -0
- package/dist/web/static/js/keyboard-shortcuts.js +292 -0
- package/dist/web/static/js/langIcons.js +187 -0
- package/dist/web/static/js/markdown/tableRow.js +19 -0
- package/dist/web/static/js/markdown.js +806 -0
- package/dist/web/static/js/memory.js +1418 -0
- package/dist/web/static/js/modalManager.js +1552 -0
- package/dist/web/static/js/modalSnap.js +782 -0
- package/dist/web/static/js/model/matchKey.js +19 -0
- package/dist/web/static/js/modelPicker.js +695 -0
- package/dist/web/static/js/modelSort.js +33 -0
- package/dist/web/static/js/models.js +642 -0
- package/dist/web/static/js/notes.js +5054 -0
- package/dist/web/static/js/package.json +1 -0
- package/dist/web/static/js/platform.js +47 -0
- package/dist/web/static/js/presets.js +1110 -0
- package/dist/web/static/js/providers.js +93 -0
- package/dist/web/static/js/rag.js +177 -0
- package/dist/web/static/js/research/jobs.js +335 -0
- package/dist/web/static/js/research/panel.js +1233 -0
- package/dist/web/static/js/researchSynapse.js +225 -0
- package/dist/web/static/js/search-chat.js +201 -0
- package/dist/web/static/js/search.js +52 -0
- package/dist/web/static/js/section-management.js +260 -0
- package/dist/web/static/js/sessions.js +3108 -0
- package/dist/web/static/js/settings.js +4991 -0
- package/dist/web/static/js/sidebar-layout.js +573 -0
- package/dist/web/static/js/signature.js +504 -0
- package/dist/web/static/js/skills.js +1908 -0
- package/dist/web/static/js/slashAutocomplete.js +267 -0
- package/dist/web/static/js/slashCommands.js +6099 -0
- package/dist/web/static/js/spinner.js +406 -0
- package/dist/web/static/js/storage.js +123 -0
- package/dist/web/static/js/tasks.js +2699 -0
- package/dist/web/static/js/theme.js +2086 -0
- package/dist/web/static/js/tileManager.js +386 -0
- package/dist/web/static/js/tourAutoplay.js +133 -0
- package/dist/web/static/js/tourHints.js +179 -0
- package/dist/web/static/js/tts-ai.js +521 -0
- package/dist/web/static/js/ui.js +1288 -0
- package/dist/web/static/js/util/ordinal.js +13 -0
- package/dist/web/static/js/voiceRecorder.js +283 -0
- package/dist/web/static/js/windowDrag.js +326 -0
- package/dist/web/static/js/windowResize.js +233 -0
- package/dist/web/static/landing.html +824 -0
- package/dist/web/static/lib/docx.umd.min.js +20116 -0
- package/dist/web/static/lib/highlight.min.js +1213 -0
- package/dist/web/static/lib/html2pdf.bundle.min.js +3 -0
- package/dist/web/static/lib/mammoth.browser.min.js +21 -0
- package/dist/web/static/lib/qrcode.min.js +8 -0
- package/dist/web/static/lib/xlsx.full.min.js +24 -0
- package/dist/web/static/login.html +582 -0
- package/dist/web/static/manifest.json +15 -0
- package/dist/web/static/style.css +35733 -0
- package/dist/web/static/sw.js +144 -0
- package/dist/workflows/engine.d.ts +162 -0
- package/dist/workflows/engine.d.ts.map +1 -0
- package/dist/workflows/engine.js +625 -0
- package/dist/workflows/engine.js.map +1 -0
- package/dist/workflows/index.d.ts +8 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/index.js +14 -0
- package/dist/workflows/index.js.map +1 -0
- package/package.json +112 -0
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* axoniz.core.intelligence.self_correction
|
|
3
|
+
* ==========================================
|
|
4
|
+
* Live Self-Correction Engine — Phase 1 of the AXONIZ dominance plan.
|
|
5
|
+
*
|
|
6
|
+
* After each tool result, the agent analyzes whether:
|
|
7
|
+
* 1. The result indicates an error
|
|
8
|
+
* 2. The action actually achieved its goal
|
|
9
|
+
* 3. The result is suspicious or unexpected
|
|
10
|
+
*
|
|
11
|
+
* If something went wrong, it:
|
|
12
|
+
* - Detects the error type
|
|
13
|
+
* - Generates a corrective action
|
|
14
|
+
* - Signals the agent to replan instead of blindly continuing
|
|
15
|
+
*
|
|
16
|
+
* Port notes (Python → Node):
|
|
17
|
+
* - `enum.Enum` → TypeScript string enums with identical `.value`s, so
|
|
18
|
+
* `ErrorType.LOOP_DETECTED === "loop_detected"` just like Python's
|
|
19
|
+
* `class ErrorType(str, Enum)` mixin.
|
|
20
|
+
* - Python's `Tuple[ErrorType, str]` returns are arrays that additionally
|
|
21
|
+
* expose `error_type` / `explanation` properties, so both tuple unpacking
|
|
22
|
+
* (`const [t, e] = classify_error(...)`) and attribute access work.
|
|
23
|
+
*/
|
|
24
|
+
/* ── API Error types (from Hermes) ────────────────────────────────────────────── */
|
|
25
|
+
export var APIFailoverReason;
|
|
26
|
+
(function (APIFailoverReason) {
|
|
27
|
+
APIFailoverReason["AUTH"] = "auth";
|
|
28
|
+
APIFailoverReason["BILLING"] = "billing";
|
|
29
|
+
APIFailoverReason["RATE_LIMIT"] = "rate_limit";
|
|
30
|
+
APIFailoverReason["OVERLOADED"] = "overloaded";
|
|
31
|
+
APIFailoverReason["SERVER_ERROR"] = "server_error";
|
|
32
|
+
APIFailoverReason["TIMEOUT"] = "timeout";
|
|
33
|
+
APIFailoverReason["CONTEXT_OVERFLOW"] = "context_overflow";
|
|
34
|
+
APIFailoverReason["MODEL_NOT_FOUND"] = "model_not_found";
|
|
35
|
+
APIFailoverReason["FORMAT_ERROR"] = "format_error";
|
|
36
|
+
APIFailoverReason["UNKNOWN"] = "unknown";
|
|
37
|
+
})(APIFailoverReason || (APIFailoverReason = {}));
|
|
38
|
+
function errorMessage(error) {
|
|
39
|
+
if (error instanceof Error)
|
|
40
|
+
return error.message || error.name;
|
|
41
|
+
if (typeof error === "string")
|
|
42
|
+
return error;
|
|
43
|
+
return String(error);
|
|
44
|
+
}
|
|
45
|
+
/** Classify an API error to determine recovery strategy. */
|
|
46
|
+
export function classify_api_error(error) {
|
|
47
|
+
const msg = errorMessage(error).toLowerCase();
|
|
48
|
+
if (["context length", "context size", "token limit", "too many tokens"].some((p) => msg.includes(p))) {
|
|
49
|
+
return APIFailoverReason.CONTEXT_OVERFLOW;
|
|
50
|
+
}
|
|
51
|
+
if (["rate limit", "too many requests", "throttled"].some((p) => msg.includes(p))) {
|
|
52
|
+
return APIFailoverReason.RATE_LIMIT;
|
|
53
|
+
}
|
|
54
|
+
if (["insufficient credits", "billing", "quota exceeded"].some((p) => msg.includes(p))) {
|
|
55
|
+
return APIFailoverReason.BILLING;
|
|
56
|
+
}
|
|
57
|
+
if (["invalid api key", "unauthorized", "authentication"].some((p) => msg.includes(p))) {
|
|
58
|
+
return APIFailoverReason.AUTH;
|
|
59
|
+
}
|
|
60
|
+
if (["timeout", "connection refused", "deadline exceeded"].some((p) => msg.includes(p))) {
|
|
61
|
+
return APIFailoverReason.TIMEOUT;
|
|
62
|
+
}
|
|
63
|
+
if (["500", "502", "503", "504", "internal server error", "overloaded"].some((p) => msg.includes(p))) {
|
|
64
|
+
return APIFailoverReason.OVERLOADED;
|
|
65
|
+
}
|
|
66
|
+
return APIFailoverReason.UNKNOWN;
|
|
67
|
+
}
|
|
68
|
+
export const classifyApiError = classify_api_error;
|
|
69
|
+
/* ── Error types ────────────────────────────────────────────────────────────── */
|
|
70
|
+
export var ErrorType;
|
|
71
|
+
(function (ErrorType) {
|
|
72
|
+
ErrorType["NONE"] = "none";
|
|
73
|
+
ErrorType["FILE_NOT_FOUND"] = "file_not_found";
|
|
74
|
+
ErrorType["PERMISSION"] = "permission_denied";
|
|
75
|
+
ErrorType["SYNTAX"] = "syntax_error";
|
|
76
|
+
ErrorType["IMPORT"] = "import_error";
|
|
77
|
+
ErrorType["RUNTIME"] = "runtime_error";
|
|
78
|
+
ErrorType["NETWORK"] = "network_error";
|
|
79
|
+
ErrorType["TOOL_UNKNOWN"] = "tool_unknown";
|
|
80
|
+
ErrorType["LOOP_DETECTED"] = "loop_detected";
|
|
81
|
+
ErrorType["TIMEOUT"] = "timeout";
|
|
82
|
+
ErrorType["EMPTY_RESULT"] = "empty_result";
|
|
83
|
+
ErrorType["UNEXPECTED"] = "unexpected";
|
|
84
|
+
})(ErrorType || (ErrorType = {}));
|
|
85
|
+
/* ─── Error patterns ──────────────────────────────────────────────────────────── */
|
|
86
|
+
const _ERROR_PATTERNS = [
|
|
87
|
+
// File errors
|
|
88
|
+
[/no such file or directory/, ErrorType.FILE_NOT_FOUND, "The file path does not exist"],
|
|
89
|
+
[/filenotfounderror/, ErrorType.FILE_NOT_FOUND, "File not found"],
|
|
90
|
+
[/path does not exist/, ErrorType.FILE_NOT_FOUND, "Path does not exist"],
|
|
91
|
+
// Permissions
|
|
92
|
+
[/permission denied/, ErrorType.PERMISSION, "Insufficient permissions"],
|
|
93
|
+
[/access is denied/, ErrorType.PERMISSION, "Access denied (Windows)"],
|
|
94
|
+
// Syntax
|
|
95
|
+
[/syntaxerror/, ErrorType.SYNTAX, "Python syntax error in code"],
|
|
96
|
+
[/invalid syntax/, ErrorType.SYNTAX, "Invalid Python syntax"],
|
|
97
|
+
[/unexpected token/, ErrorType.SYNTAX, "Unexpected token"],
|
|
98
|
+
// Imports
|
|
99
|
+
[/modulenotfounderror/, ErrorType.IMPORT, "Python module not installed"],
|
|
100
|
+
[/importerror/, ErrorType.IMPORT, "Import failed"],
|
|
101
|
+
[/no module named/, ErrorType.IMPORT, "Module not found — needs pip install"],
|
|
102
|
+
// Runtime
|
|
103
|
+
[/traceback \(most recent/, ErrorType.RUNTIME, "Python exception occurred"],
|
|
104
|
+
[/typeerror/, ErrorType.RUNTIME, "Type error in code"],
|
|
105
|
+
[/nameerror/, ErrorType.RUNTIME, "Name not defined"],
|
|
106
|
+
[/attributeerror/, ErrorType.RUNTIME, "Attribute does not exist"],
|
|
107
|
+
[/valueerror/, ErrorType.RUNTIME, "Invalid value"],
|
|
108
|
+
[/indexerror/, ErrorType.RUNTIME, "Index out of range"],
|
|
109
|
+
[/keyerror/, ErrorType.RUNTIME, "Key not found"],
|
|
110
|
+
// Network
|
|
111
|
+
[/connection refused/, ErrorType.NETWORK, "Server is not running or wrong port"],
|
|
112
|
+
[/timeout/, ErrorType.TIMEOUT, "Operation timed out"],
|
|
113
|
+
[/urlopen error/, ErrorType.NETWORK, "Network request failed"],
|
|
114
|
+
[/name or service not known/, ErrorType.NETWORK, "DNS resolution failed"],
|
|
115
|
+
// Tool errors
|
|
116
|
+
[/\[error\]/, ErrorType.UNEXPECTED, "Tool reported an error"],
|
|
117
|
+
[/unknown tool/, ErrorType.TOOL_UNKNOWN, "Tool name not recognized"],
|
|
118
|
+
[/bad args/, ErrorType.UNEXPECTED, "Wrong arguments provided"],
|
|
119
|
+
// Loop detection
|
|
120
|
+
[/loop on '/, ErrorType.LOOP_DETECTED, "Agent is stuck in a loop"],
|
|
121
|
+
[/reached maximum steps/, ErrorType.LOOP_DETECTED, "Max steps exceeded"],
|
|
122
|
+
];
|
|
123
|
+
/**
|
|
124
|
+
* Classify what kind of error (if any) is in a tool result.
|
|
125
|
+
* Returns (ErrorType, explanation).
|
|
126
|
+
*/
|
|
127
|
+
export function classify_error(result) {
|
|
128
|
+
if (!result) {
|
|
129
|
+
return _classification(ErrorType.EMPTY_RESULT, "Tool returned no output");
|
|
130
|
+
}
|
|
131
|
+
const lower = result.toLowerCase();
|
|
132
|
+
// Quick success check — if result looks normal, skip pattern matching
|
|
133
|
+
if (result.length > 10 &&
|
|
134
|
+
!["error", "failed", "exception", "denied", "not found", "traceback"].some((kw) => lower.includes(kw))) {
|
|
135
|
+
return _classification(ErrorType.NONE, "");
|
|
136
|
+
}
|
|
137
|
+
for (const [pattern, err_type, explanation] of _ERROR_PATTERNS) {
|
|
138
|
+
if (pattern.test(lower)) {
|
|
139
|
+
return _classification(err_type, explanation);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return _classification(ErrorType.NONE, "");
|
|
143
|
+
}
|
|
144
|
+
function _classification(error_type, explanation) {
|
|
145
|
+
const tuple = [error_type, explanation];
|
|
146
|
+
return Object.assign(tuple, { error_type, explanation });
|
|
147
|
+
}
|
|
148
|
+
export const classifyError = classify_error;
|
|
149
|
+
/* ─── Corrective actions ──────────────────────────────────────────────────────── */
|
|
150
|
+
const _CORRECTIONS = {
|
|
151
|
+
[ErrorType.FILE_NOT_FOUND]: [
|
|
152
|
+
"Use file_list to check what actually exists in that directory",
|
|
153
|
+
"Check if the path uses the correct directory separator for this OS",
|
|
154
|
+
"Verify the workspace root with file_list(path='.')",
|
|
155
|
+
],
|
|
156
|
+
[ErrorType.PERMISSION]: [
|
|
157
|
+
"Check if the file is locked by another process with shell_run('tasklist')",
|
|
158
|
+
"Try running the operation with a different path",
|
|
159
|
+
"Check file permissions with shell_run('icacls <path>')",
|
|
160
|
+
],
|
|
161
|
+
[ErrorType.SYNTAX]: [
|
|
162
|
+
"Re-read the file to check for the syntax error location",
|
|
163
|
+
"Use code_lint to identify the exact line with the syntax error",
|
|
164
|
+
"Fix the syntax error before retrying",
|
|
165
|
+
],
|
|
166
|
+
[ErrorType.IMPORT]: [
|
|
167
|
+
"Install the missing module with shell_run('pip install <module>')",
|
|
168
|
+
"Check if the virtual environment is activated",
|
|
169
|
+
"Verify the module name is correct",
|
|
170
|
+
],
|
|
171
|
+
[ErrorType.RUNTIME]: [
|
|
172
|
+
"Read the full traceback to identify the exact failure point",
|
|
173
|
+
"Check the input values being passed to the failing function",
|
|
174
|
+
"Add error handling around the problematic code",
|
|
175
|
+
],
|
|
176
|
+
[ErrorType.NETWORK]: [
|
|
177
|
+
"Check if the target server is running with shell_run",
|
|
178
|
+
"Verify the URL/port is correct",
|
|
179
|
+
"Try again after a short wait",
|
|
180
|
+
],
|
|
181
|
+
[ErrorType.TIMEOUT]: [
|
|
182
|
+
"Increase timeout or use a simpler/faster alternative",
|
|
183
|
+
"Check if the process is hung",
|
|
184
|
+
],
|
|
185
|
+
[ErrorType.LOOP_DETECTED]: [
|
|
186
|
+
"Stop and reassess the approach — current strategy is not working",
|
|
187
|
+
"Try a completely different tool or method for this step",
|
|
188
|
+
"Report the loop to the user and ask for guidance",
|
|
189
|
+
],
|
|
190
|
+
[ErrorType.EMPTY_RESULT]: [
|
|
191
|
+
"Verify the target exists before running the operation",
|
|
192
|
+
"Check if the tool ran on the wrong path",
|
|
193
|
+
],
|
|
194
|
+
[ErrorType.UNEXPECTED]: [
|
|
195
|
+
"Read the error message carefully and address the specific issue",
|
|
196
|
+
"Use a different approach to accomplish the same goal",
|
|
197
|
+
],
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Analyzes tool results in real-time and generates corrective guidance
|
|
201
|
+
* when something goes wrong.
|
|
202
|
+
*
|
|
203
|
+
* The agent calls analyze() after every tool execution. If an error is
|
|
204
|
+
* detected, it receives a correction dict telling it what to do next.
|
|
205
|
+
*/
|
|
206
|
+
export class SelfCorrector {
|
|
207
|
+
_corrections_made = 0;
|
|
208
|
+
_max;
|
|
209
|
+
_error_history = [];
|
|
210
|
+
constructor(max_corrections_per_session = 10) {
|
|
211
|
+
this._max = max_corrections_per_session;
|
|
212
|
+
}
|
|
213
|
+
get correctionsMade() {
|
|
214
|
+
return this._corrections_made;
|
|
215
|
+
}
|
|
216
|
+
get errorHistory() {
|
|
217
|
+
return this._error_history;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Analyze a tool result.
|
|
221
|
+
* Returns:
|
|
222
|
+
* {
|
|
223
|
+
* "error_type": ErrorType,
|
|
224
|
+
* "has_error": bool,
|
|
225
|
+
* "explanation": str,
|
|
226
|
+
* "corrections": list[str], # what to do next
|
|
227
|
+
* "should_replan": bool, # should the agent change strategy?
|
|
228
|
+
* "severity": str, # "low" / "medium" / "high" / "critical"
|
|
229
|
+
* }
|
|
230
|
+
*/
|
|
231
|
+
analyze(tool_name, args, result, step_num = 0) {
|
|
232
|
+
void args; // Python accepted `args` and never used it.
|
|
233
|
+
const classification = classify_error(result);
|
|
234
|
+
const error_type = classification.error_type;
|
|
235
|
+
const explanation = classification.explanation;
|
|
236
|
+
const has_error = error_type !== ErrorType.NONE;
|
|
237
|
+
const corrections = (_CORRECTIONS[error_type] ?? []).slice(0, 3);
|
|
238
|
+
// Determine severity
|
|
239
|
+
let severity = "low";
|
|
240
|
+
if (error_type === ErrorType.LOOP_DETECTED) {
|
|
241
|
+
severity = "critical";
|
|
242
|
+
}
|
|
243
|
+
else if (error_type === ErrorType.PERMISSION ||
|
|
244
|
+
error_type === ErrorType.IMPORT ||
|
|
245
|
+
error_type === ErrorType.SYNTAX) {
|
|
246
|
+
severity = "high";
|
|
247
|
+
}
|
|
248
|
+
else if (error_type === ErrorType.RUNTIME || error_type === ErrorType.NETWORK) {
|
|
249
|
+
severity = "medium";
|
|
250
|
+
}
|
|
251
|
+
// Should we replan?
|
|
252
|
+
const should_replan = error_type === ErrorType.LOOP_DETECTED ||
|
|
253
|
+
error_type === ErrorType.PERMISSION ||
|
|
254
|
+
this._corrections_made >= this._max;
|
|
255
|
+
if (has_error) {
|
|
256
|
+
this._corrections_made += 1;
|
|
257
|
+
this._error_history.push({
|
|
258
|
+
step: step_num,
|
|
259
|
+
tool: tool_name,
|
|
260
|
+
error_type,
|
|
261
|
+
explanation,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
return {
|
|
265
|
+
error_type,
|
|
266
|
+
has_error,
|
|
267
|
+
explanation,
|
|
268
|
+
corrections,
|
|
269
|
+
should_replan,
|
|
270
|
+
severity,
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
/** camelCase alias. */
|
|
274
|
+
analyzeResult(tool_name, args, result, step_num = 0) {
|
|
275
|
+
return this.analyze(tool_name, args, result, step_num);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Build a message the agent injects into the conversation
|
|
279
|
+
* to guide its next action.
|
|
280
|
+
*/
|
|
281
|
+
build_correction_message(analysis, tool_name) {
|
|
282
|
+
if (!analysis.has_error) {
|
|
283
|
+
return "";
|
|
284
|
+
}
|
|
285
|
+
const lines = [
|
|
286
|
+
`[SELF-CORRECTION] Error detected after ${tool_name}:`,
|
|
287
|
+
` Type: ${analysis.error_type}`,
|
|
288
|
+
` Problem: ${analysis.explanation}`,
|
|
289
|
+
` Severity: ${analysis.severity}`,
|
|
290
|
+
];
|
|
291
|
+
if (analysis.corrections.length > 0) {
|
|
292
|
+
lines.push(" Suggested fixes:");
|
|
293
|
+
for (const c of analysis.corrections) {
|
|
294
|
+
lines.push(` → ${c}`);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
if (analysis.should_replan) {
|
|
298
|
+
lines.push(" IMPORTANT: Current approach is not working. Replan before continuing.");
|
|
299
|
+
}
|
|
300
|
+
lines.push("Address this issue before proceeding with the next step.");
|
|
301
|
+
return lines.join("\n");
|
|
302
|
+
}
|
|
303
|
+
/** camelCase alias. */
|
|
304
|
+
buildCorrectionMessage(analysis, tool_name) {
|
|
305
|
+
return this.build_correction_message(analysis, tool_name);
|
|
306
|
+
}
|
|
307
|
+
/** Summary of all errors corrected in this session. */
|
|
308
|
+
session_summary() {
|
|
309
|
+
if (this._error_history.length === 0) {
|
|
310
|
+
return "No errors encountered this session.";
|
|
311
|
+
}
|
|
312
|
+
const lines = [`Errors corrected: ${this._error_history.length}`];
|
|
313
|
+
for (const e of this._error_history.slice(-5)) {
|
|
314
|
+
lines.push(` step ${e.step}: ${e.tool} → ${e.error_type} — ${e.explanation}`);
|
|
315
|
+
}
|
|
316
|
+
return lines.join("\n");
|
|
317
|
+
}
|
|
318
|
+
/** camelCase alias. */
|
|
319
|
+
sessionSummary() {
|
|
320
|
+
return this.session_summary();
|
|
321
|
+
}
|
|
322
|
+
reset() {
|
|
323
|
+
this._corrections_made = 0;
|
|
324
|
+
this._error_history = [];
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
//# sourceMappingURL=self_correction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"self_correction.js","sourceRoot":"","sources":["../../../src/core/intelligence/self_correction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,qFAAqF;AAErF,MAAM,CAAN,IAAY,iBAWX;AAXD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,wCAAmB,CAAA;IACnB,8CAAyB,CAAA;IACzB,8CAAyB,CAAA;IACzB,kDAA6B,CAAA;IAC7B,wCAAmB,CAAA;IACnB,0DAAqC,CAAA;IACrC,wDAAmC,CAAA;IACnC,kDAA6B,CAAA;IAC7B,wCAAmB,CAAA;AACrB,CAAC,EAXW,iBAAiB,KAAjB,iBAAiB,QAW5B;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,IAAI,KAAK,YAAY,KAAK;QAAE,OAAO,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC;IAC/D,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,MAAM,GAAG,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;IAE9C,IAAI,CAAC,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,C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AC,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9C,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,UAAU,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QACjF,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,uBAAuB;IACvB,cAAc;QACZ,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC;IAChC,CAAC;IAED,KAAK;QACH,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;IAC3B,CAAC;CACF"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* axoniz.core.intelligence.skill_distiller
|
|
3
|
+
* ========================================
|
|
4
|
+
* The heart of AXONIZ's self-evolution.
|
|
5
|
+
* Analyzes successful trajectories and distills them into permanent 'Skills'.
|
|
6
|
+
*
|
|
7
|
+
* A 'Skill' in AXONIZ is a self-contained Python function registered as a tool.
|
|
8
|
+
* This is more robust than Hermes's skills (which are just prompt injections).
|
|
9
|
+
* AXONIZ skills are real code, making them faster, more reliable, and zero-context.
|
|
10
|
+
*
|
|
11
|
+
* Port notes (Python → Node):
|
|
12
|
+
* - `analyze_session` / `_propose_skill` are `async` because the LLM call is
|
|
13
|
+
* asynchronous in the Node port. `distill` stays synchronous (it only
|
|
14
|
+
* writes a file).
|
|
15
|
+
* - `SKILL_TEMPLATE.format(...)` → `renderSkillTemplate()`, a single-pass
|
|
16
|
+
* `String.replace` over the same template text. A single pass matters:
|
|
17
|
+
* LLM-generated `body`/`schema` values frequently contain `{`/`}` and must
|
|
18
|
+
* never be re-scanned as placeholders.
|
|
19
|
+
* - `time.strftime("%Y-%m-%d")` is LOCAL time → local date parts (NOT
|
|
20
|
+
* `toISOString()`, which is UTC).
|
|
21
|
+
*/
|
|
22
|
+
export declare const SKILLS_DIR: string;
|
|
23
|
+
/**
|
|
24
|
+
* Python value of the triple-quoted `SKILL_TEMPLATE` (i.e. it starts with a
|
|
25
|
+
* newline followed by `"""` and ends after the closing `)` plus a newline).
|
|
26
|
+
* Fill it with `renderSkillTemplate()`.
|
|
27
|
+
*/
|
|
28
|
+
export declare const SKILL_TEMPLATE = "\n\"\"\"\nAXONIZ Skill: {name}\nGenerated: {date}\nDescription: {description}\n\"\"\"\n\nfrom tools.registry import registry\n\ndef {name}({args_call}) -> str:\n \"\"\"\n {description}\n \"\"\"\n # Skill logic extracted from trajectory...\n {body}\n\nregistry.register(\n name=\"{name}\",\n toolset=\"user_skills\",\n schema={schema},\n handler=lambda args, **kw: {name}(**args),\n emoji=\"\uD83D\uDEE1\uFE0F\",\n)\n";
|
|
29
|
+
export interface SkillTemplateVars {
|
|
30
|
+
name: string;
|
|
31
|
+
date: string;
|
|
32
|
+
description: string;
|
|
33
|
+
args_call: string;
|
|
34
|
+
body: string;
|
|
35
|
+
schema: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Replacement for Python's `SKILL_TEMPLATE.format(...)`.
|
|
39
|
+
* Unknown placeholders are left untouched (Python raised `KeyError` instead);
|
|
40
|
+
* the substitution is a single pass so injected code can never be interpreted
|
|
41
|
+
* as a placeholder.
|
|
42
|
+
*/
|
|
43
|
+
export declare function renderSkillTemplate(vars: SkillTemplateVars): string;
|
|
44
|
+
/** camelCase alias. */
|
|
45
|
+
export declare const render_skill_template: typeof renderSkillTemplate;
|
|
46
|
+
export interface DistillProposal {
|
|
47
|
+
name: string;
|
|
48
|
+
description: string;
|
|
49
|
+
parameters: Record<string, unknown>;
|
|
50
|
+
code: string;
|
|
51
|
+
[k: string]: unknown;
|
|
52
|
+
}
|
|
53
|
+
/** The subset of the Agent surface the distiller needs. */
|
|
54
|
+
export interface SkillAgent {
|
|
55
|
+
trajectory?: {
|
|
56
|
+
get_session_steps?(session_id: string): unknown[] | Promise<unknown[]>;
|
|
57
|
+
getSessionSteps?(session_id: string): unknown[] | Promise<unknown[]>;
|
|
58
|
+
};
|
|
59
|
+
generate_summary?(prompt: string): string | Promise<string>;
|
|
60
|
+
generateSummary?(prompt: string): string | Promise<string>;
|
|
61
|
+
_rebuild_llm?(): unknown;
|
|
62
|
+
_rebuildLlm?(): unknown;
|
|
63
|
+
}
|
|
64
|
+
export declare class SkillDistiller {
|
|
65
|
+
agent: SkillAgent | null;
|
|
66
|
+
constructor(agent?: SkillAgent | null);
|
|
67
|
+
/**
|
|
68
|
+
* Analyzes a completed trajectory session for 'skill-able' patterns.
|
|
69
|
+
* Criteria:
|
|
70
|
+
* 1. Task was successful.
|
|
71
|
+
* 2. Involved 5+ steps.
|
|
72
|
+
* 3. Pattern is repetitive or complex.
|
|
73
|
+
*/
|
|
74
|
+
analyze_session(session_id: string): Promise<Record<string, unknown> | null>;
|
|
75
|
+
/** camelCase alias. */
|
|
76
|
+
analyzeSession(session_id: string): Promise<Record<string, unknown> | null>;
|
|
77
|
+
_propose_skill(steps: unknown[]): Promise<Record<string, unknown> | null>;
|
|
78
|
+
/** camelCase alias. */
|
|
79
|
+
_proposeSkill(steps: unknown[]): Promise<Record<string, unknown> | null>;
|
|
80
|
+
get pendingPath(): string;
|
|
81
|
+
getPendingSkills(): Record<string, DistillProposal>;
|
|
82
|
+
savePendingSkills(skills: Record<string, DistillProposal>): void;
|
|
83
|
+
propose(proposal: DistillProposal): void;
|
|
84
|
+
approve(name: string): boolean;
|
|
85
|
+
reject(name: string): boolean;
|
|
86
|
+
/** Writes the new skill to the skills directory. */
|
|
87
|
+
distill(proposal: DistillProposal): void;
|
|
88
|
+
_build_schema(proposal: DistillProposal): {
|
|
89
|
+
name: string;
|
|
90
|
+
description: string;
|
|
91
|
+
parameters: {
|
|
92
|
+
type: string;
|
|
93
|
+
properties: Record<string, unknown>;
|
|
94
|
+
required: string[];
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
/** camelCase alias. */
|
|
98
|
+
_buildSchema(proposal: DistillProposal): ReturnType<SkillDistiller["_build_schema"]>;
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=skill_distiller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill_distiller.d.ts","sourceRoot":"","sources":["../../../src/core/intelligence/skill_distiller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAQH,eAAO,MAAM,UAAU,QAAmC,CAAC;AAO3D;;;;GAIG;AACH,eAAO,MAAM,cAAc,mcAuB1B,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAMnE;AAED,uBAAuB;AACvB,eAAO,MAAM,qBAAqB,4BAAsB,CAAC;AAEzD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AAED,2DAA2D;AAC3D,MAAM,WAAW,UAAU;IACzB,UAAU,CAAC,EAAE;QACX,iBAAiB,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QACvE,eAAe,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO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