azerclaw 2.1.9 → 2.2.2

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.
Files changed (258) hide show
  1. package/bin/azerclaw.ts +45 -6
  2. package/bin/opencode.ts +1 -1
  3. package/dist/bin/azerclaw.d.ts +1 -47
  4. package/dist/bin/azerclaw.d.ts.map +1 -1
  5. package/dist/bin/azerclaw.js +94 -55
  6. package/dist/bin/azerclaw.js.map +1 -1
  7. package/dist/bin/opencode.js +1 -1
  8. package/dist/src/agents/builtin.js +12 -12
  9. package/dist/src/brain/adapters/base.d.ts +33 -0
  10. package/dist/src/brain/adapters/base.d.ts.map +1 -0
  11. package/dist/src/brain/adapters/base.js +11 -0
  12. package/dist/src/brain/adapters/base.js.map +1 -0
  13. package/dist/src/brain/adapters/index.d.ts +11 -0
  14. package/dist/src/brain/adapters/index.d.ts.map +1 -0
  15. package/dist/src/brain/adapters/index.js +37 -0
  16. package/dist/src/brain/adapters/index.js.map +1 -0
  17. package/dist/src/brain/adapters/native.d.ts +15 -0
  18. package/dist/src/brain/adapters/native.d.ts.map +1 -0
  19. package/dist/src/brain/adapters/native.js +25 -0
  20. package/dist/src/brain/adapters/native.js.map +1 -0
  21. package/dist/src/brain/adapters/prompt.d.ts +16 -0
  22. package/dist/src/brain/adapters/prompt.d.ts.map +1 -0
  23. package/dist/src/brain/adapters/prompt.js +91 -0
  24. package/dist/src/brain/adapters/prompt.js.map +1 -0
  25. package/dist/src/brain/hybrid.d.ts +53 -0
  26. package/dist/src/brain/hybrid.d.ts.map +1 -0
  27. package/dist/src/brain/hybrid.js +263 -0
  28. package/dist/src/brain/hybrid.js.map +1 -0
  29. package/dist/src/brain/index.d.ts +8 -0
  30. package/dist/src/brain/index.d.ts.map +1 -0
  31. package/dist/src/brain/index.js +19 -0
  32. package/dist/src/brain/index.js.map +1 -0
  33. package/dist/src/brain/router.d.ts +55 -0
  34. package/dist/src/brain/router.d.ts.map +1 -0
  35. package/dist/src/brain/router.js +174 -0
  36. package/dist/src/brain/router.js.map +1 -0
  37. package/dist/src/channels/adapter.d.ts +6 -0
  38. package/dist/src/channels/adapter.d.ts.map +1 -1
  39. package/dist/src/channels/adapter.js +44 -1
  40. package/dist/src/channels/adapter.js.map +1 -1
  41. package/dist/src/channels/discord.d.ts.map +1 -1
  42. package/dist/src/channels/discord.js +60 -14
  43. package/dist/src/channels/discord.js.map +1 -1
  44. package/dist/src/channels/slack.d.ts +5 -0
  45. package/dist/src/channels/slack.d.ts.map +1 -1
  46. package/dist/src/channels/slack.js +77 -9
  47. package/dist/src/channels/slack.js.map +1 -1
  48. package/dist/src/channels/telegram.d.ts +1 -0
  49. package/dist/src/channels/telegram.d.ts.map +1 -1
  50. package/dist/src/channels/telegram.js +42 -4
  51. package/dist/src/channels/telegram.js.map +1 -1
  52. package/dist/src/channels/webhook.d.ts.map +1 -1
  53. package/dist/src/channels/webhook.js +37 -6
  54. package/dist/src/channels/webhook.js.map +1 -1
  55. package/dist/src/cli/animations/fish.d.ts +9 -0
  56. package/dist/src/cli/animations/fish.d.ts.map +1 -1
  57. package/dist/src/cli/animations/fish.js +64 -80
  58. package/dist/src/cli/animations/fish.js.map +1 -1
  59. package/dist/src/cli/animations/markdown.d.ts.map +1 -1
  60. package/dist/src/cli/animations/markdown.js +0 -1
  61. package/dist/src/cli/animations/markdown.js.map +1 -1
  62. package/dist/src/cli/commands/agents.js +31 -30
  63. package/dist/src/cli/commands/agents.js.map +1 -1
  64. package/dist/src/cli/commands/channels.js +41 -48
  65. package/dist/src/cli/commands/channels.js.map +1 -1
  66. package/dist/src/cli/commands/chat.d.ts +1 -0
  67. package/dist/src/cli/commands/chat.d.ts.map +1 -1
  68. package/dist/src/cli/commands/chat.js +81 -8
  69. package/dist/src/cli/commands/chat.js.map +1 -1
  70. package/dist/src/cli/commands/config.js +0 -1
  71. package/dist/src/cli/commands/config.js.map +1 -1
  72. package/dist/src/cli/commands/doctor.js +42 -40
  73. package/dist/src/cli/commands/doctor.js.map +1 -1
  74. package/dist/src/cli/commands/export.js +6 -6
  75. package/dist/src/cli/commands/export.js.map +1 -1
  76. package/dist/src/cli/commands/mcp.js +7 -7
  77. package/dist/src/cli/commands/mcp.js.map +1 -1
  78. package/dist/src/cli/commands/models.js +0 -1
  79. package/dist/src/cli/commands/models.js.map +1 -1
  80. package/dist/src/cli/commands/onboard.js +0 -55
  81. package/dist/src/cli/commands/onboard.js.map +1 -1
  82. package/dist/src/cli/commands/pairing.js +22 -24
  83. package/dist/src/cli/commands/pairing.js.map +1 -1
  84. package/dist/src/cli/commands/plugins.js +8 -8
  85. package/dist/src/cli/commands/plugins.js.map +1 -1
  86. package/dist/src/cli/commands/run.d.ts +1 -0
  87. package/dist/src/cli/commands/run.d.ts.map +1 -1
  88. package/dist/src/cli/commands/run.js +101 -50
  89. package/dist/src/cli/commands/run.js.map +1 -1
  90. package/dist/src/cli/commands/sandbox.js +27 -32
  91. package/dist/src/cli/commands/sandbox.js.map +1 -1
  92. package/dist/src/cli/commands/settings.js +1 -16
  93. package/dist/src/cli/commands/settings.js.map +1 -1
  94. package/dist/src/cli/commands/share.js +6 -6
  95. package/dist/src/cli/commands/share.js.map +1 -1
  96. package/dist/src/cli/commands/tui.js +0 -1
  97. package/dist/src/cli/commands/tui.js.map +1 -1
  98. package/dist/src/config/hotreload.d.ts +87 -0
  99. package/dist/src/config/hotreload.d.ts.map +1 -0
  100. package/dist/src/config/hotreload.js +497 -0
  101. package/dist/src/config/hotreload.js.map +1 -0
  102. package/dist/src/config/manager.d.ts +4 -2
  103. package/dist/src/config/manager.d.ts.map +1 -1
  104. package/dist/src/config/manager.js +23 -5
  105. package/dist/src/config/manager.js.map +1 -1
  106. package/dist/src/config/schema.d.ts +286 -9
  107. package/dist/src/config/schema.d.ts.map +1 -1
  108. package/dist/src/config/schema.js +71 -7
  109. package/dist/src/config/schema.js.map +1 -1
  110. package/dist/src/core/runtime.d.ts +18 -0
  111. package/dist/src/core/runtime.d.ts.map +1 -1
  112. package/dist/src/core/runtime.js +82 -12
  113. package/dist/src/core/runtime.js.map +1 -1
  114. package/dist/src/core/server.d.ts.map +1 -1
  115. package/dist/src/core/server.js +18 -2
  116. package/dist/src/core/server.js.map +1 -1
  117. package/dist/src/index.d.ts +2 -0
  118. package/dist/src/index.d.ts.map +1 -1
  119. package/dist/src/index.js +6 -0
  120. package/dist/src/index.js.map +1 -1
  121. package/dist/src/interfaces/terminal/dashboard.d.ts +80 -0
  122. package/dist/src/interfaces/terminal/dashboard.d.ts.map +1 -0
  123. package/dist/src/interfaces/terminal/dashboard.js +618 -0
  124. package/dist/src/interfaces/terminal/dashboard.js.map +1 -0
  125. package/dist/src/interfaces/terminal/index.d.ts +46 -0
  126. package/dist/src/interfaces/terminal/index.d.ts.map +1 -0
  127. package/dist/src/interfaces/terminal/index.js +171 -0
  128. package/dist/src/interfaces/terminal/index.js.map +1 -0
  129. package/dist/src/interfaces/terminal/visualizations.d.ts +78 -0
  130. package/dist/src/interfaces/terminal/visualizations.d.ts.map +1 -0
  131. package/dist/src/interfaces/terminal/visualizations.js +540 -0
  132. package/dist/src/interfaces/terminal/visualizations.js.map +1 -0
  133. package/dist/src/interfaces/web/server.d.ts +73 -0
  134. package/dist/src/interfaces/web/server.d.ts.map +1 -0
  135. package/dist/src/interfaces/web/server.js +505 -0
  136. package/dist/src/interfaces/web/server.js.map +1 -0
  137. package/dist/src/mcp-servers/antigravity/index.js +2 -2
  138. package/dist/src/mcp-servers/antigravity/index.js.map +1 -1
  139. package/dist/src/memory/dreaming.d.ts +91 -0
  140. package/dist/src/memory/dreaming.d.ts.map +1 -0
  141. package/dist/src/memory/dreaming.js +582 -0
  142. package/dist/src/memory/dreaming.js.map +1 -0
  143. package/dist/src/memory/index.d.ts +8 -0
  144. package/dist/src/memory/index.d.ts.map +1 -0
  145. package/dist/src/memory/index.js +29 -0
  146. package/dist/src/memory/index.js.map +1 -0
  147. package/dist/src/memory/store.d.ts +13 -0
  148. package/dist/src/memory/store.d.ts.map +1 -1
  149. package/dist/src/memory/store.js +28 -0
  150. package/dist/src/memory/store.js.map +1 -1
  151. package/dist/src/memory/vector.d.ts +94 -0
  152. package/dist/src/memory/vector.d.ts.map +1 -0
  153. package/dist/src/memory/vector.js +457 -0
  154. package/dist/src/memory/vector.js.map +1 -0
  155. package/dist/src/networking/analyzer.d.ts +189 -0
  156. package/dist/src/networking/analyzer.d.ts.map +1 -0
  157. package/dist/src/networking/analyzer.js +604 -0
  158. package/dist/src/networking/analyzer.js.map +1 -0
  159. package/dist/src/plugins/bundled/context-engine/index.d.ts +8 -0
  160. package/dist/src/plugins/bundled/context-engine/index.d.ts.map +1 -0
  161. package/dist/src/plugins/bundled/context-engine/index.js +353 -0
  162. package/dist/src/plugins/bundled/context-engine/index.js.map +1 -0
  163. package/dist/src/plugins/bundled/observability/index.d.ts +64 -0
  164. package/dist/src/plugins/bundled/observability/index.d.ts.map +1 -0
  165. package/dist/src/plugins/bundled/observability/index.js +441 -0
  166. package/dist/src/plugins/bundled/observability/index.js.map +1 -0
  167. package/dist/src/plugins/index.d.ts +15 -0
  168. package/dist/src/plugins/index.d.ts.map +1 -0
  169. package/dist/src/plugins/index.js +117 -0
  170. package/dist/src/plugins/index.js.map +1 -0
  171. package/dist/src/plugins/loader.d.ts +19 -0
  172. package/dist/src/plugins/loader.d.ts.map +1 -0
  173. package/dist/src/plugins/loader.js +333 -0
  174. package/dist/src/plugins/loader.js.map +1 -0
  175. package/dist/src/plugins/manager.d.ts +32 -0
  176. package/dist/src/plugins/manager.d.ts.map +1 -0
  177. package/dist/src/plugins/manager.js +410 -0
  178. package/dist/src/plugins/manager.js.map +1 -0
  179. package/dist/src/plugins/registry.d.ts +50 -0
  180. package/dist/src/plugins/registry.d.ts.map +1 -0
  181. package/dist/src/plugins/registry.js +285 -0
  182. package/dist/src/plugins/registry.js.map +1 -0
  183. package/dist/src/plugins/types.d.ts +165 -0
  184. package/dist/src/plugins/types.d.ts.map +1 -0
  185. package/dist/src/plugins/types.js +7 -0
  186. package/dist/src/plugins/types.js.map +1 -0
  187. package/dist/src/providers/base.d.ts +5 -0
  188. package/dist/src/providers/base.d.ts.map +1 -1
  189. package/dist/src/providers/base.js.map +1 -1
  190. package/dist/src/providers/huggingface.d.ts +27 -0
  191. package/dist/src/providers/huggingface.d.ts.map +1 -0
  192. package/dist/src/providers/huggingface.js +140 -0
  193. package/dist/src/providers/huggingface.js.map +1 -0
  194. package/dist/src/providers/kiloauto.d.ts +29 -0
  195. package/dist/src/providers/kiloauto.d.ts.map +1 -0
  196. package/dist/src/providers/kiloauto.js +242 -0
  197. package/dist/src/providers/kiloauto.js.map +1 -0
  198. package/dist/src/providers/localllama.d.ts +26 -0
  199. package/dist/src/providers/localllama.d.ts.map +1 -0
  200. package/dist/src/providers/localllama.js +192 -0
  201. package/dist/src/providers/localllama.js.map +1 -0
  202. package/dist/src/providers/openai.d.ts.map +1 -1
  203. package/dist/src/providers/openai.js +8 -1
  204. package/dist/src/providers/openai.js.map +1 -1
  205. package/dist/src/providers/router.d.ts.map +1 -1
  206. package/dist/src/providers/router.js +81 -29
  207. package/dist/src/providers/router.js.map +1 -1
  208. package/dist/src/scheduler/heartbeat.d.ts.map +1 -1
  209. package/dist/src/scheduler/heartbeat.js +23 -1
  210. package/dist/src/scheduler/heartbeat.js.map +1 -1
  211. package/dist/src/security/privacy.d.ts +199 -0
  212. package/dist/src/security/privacy.d.ts.map +1 -0
  213. package/dist/src/security/privacy.js +600 -0
  214. package/dist/src/security/privacy.js.map +1 -0
  215. package/dist/src/server/hq.d.ts.map +1 -1
  216. package/dist/src/server/hq.js +56 -4
  217. package/dist/src/server/hq.js.map +1 -1
  218. package/dist/src/skills/loader.d.ts.map +1 -1
  219. package/dist/src/skills/loader.js +13 -3
  220. package/dist/src/skills/loader.js.map +1 -1
  221. package/dist/src/tools/advanced.d.ts.map +1 -1
  222. package/dist/src/tools/advanced.js +73 -18
  223. package/dist/src/tools/advanced.js.map +1 -1
  224. package/dist/src/tools/filesystem.d.ts.map +1 -1
  225. package/dist/src/tools/filesystem.js +110 -7
  226. package/dist/src/tools/filesystem.js.map +1 -1
  227. package/dist/src/tools/index_memory.d.ts.map +1 -1
  228. package/dist/src/tools/index_memory.js +13 -6
  229. package/dist/src/tools/index_memory.js.map +1 -1
  230. package/dist/src/tools/loader.d.ts.map +1 -1
  231. package/dist/src/tools/loader.js +4 -2
  232. package/dist/src/tools/loader.js.map +1 -1
  233. package/dist/src/tools/registry.d.ts +6 -0
  234. package/dist/src/tools/registry.d.ts.map +1 -1
  235. package/dist/src/tools/registry.js +51 -12
  236. package/dist/src/tools/registry.js.map +1 -1
  237. package/dist/src/tools/shell.d.ts.map +1 -1
  238. package/dist/src/tools/shell.js +2 -0
  239. package/dist/src/tools/shell.js.map +1 -1
  240. package/dist/src/tools/specialized.d.ts.map +1 -1
  241. package/dist/src/tools/specialized.js +52 -12
  242. package/dist/src/tools/specialized.js.map +1 -1
  243. package/dist/src/workflow/engine.d.ts.map +1 -1
  244. package/dist/src/workflow/engine.js +43 -13
  245. package/dist/src/workflow/engine.js.map +1 -1
  246. package/dist/src/workflow/lobster.d.ts +138 -0
  247. package/dist/src/workflow/lobster.d.ts.map +1 -0
  248. package/dist/src/workflow/lobster.js +620 -0
  249. package/dist/src/workflow/lobster.js.map +1 -0
  250. package/dist/src/workspace/heartbeat.d.ts +122 -0
  251. package/dist/src/workspace/heartbeat.d.ts.map +1 -0
  252. package/dist/src/workspace/heartbeat.js +624 -0
  253. package/dist/src/workspace/heartbeat.js.map +1 -0
  254. package/dist/src/workspace/index.d.ts +29 -0
  255. package/dist/src/workspace/index.d.ts.map +1 -0
  256. package/dist/src/workspace/index.js +97 -0
  257. package/dist/src/workspace/index.js.map +1 -0
  258. package/package.json +2 -2
package/bin/azerclaw.ts CHANGED
@@ -29,8 +29,8 @@ process.env.NODE_NO_WARNINGS = '1';
29
29
  * azerclaw status — Show current status
30
30
  */
31
31
 
32
- const { Command } = require('commander');
33
- const chalk = require('chalk');
32
+ import { Command } from 'commander';
33
+ import chalk from 'chalk';
34
34
 
35
35
  // Disable colors and animations if output is piped
36
36
  if (!process.stdout.isTTY) {
@@ -38,17 +38,17 @@ if (!process.stdout.isTTY) {
38
38
  process.env.FORCE_COLOR = '0';
39
39
  }
40
40
 
41
- const { playSplashScreen, printQuickSplash, fishError, fishInfo, fishSuccess } = require('../src/cli/animations/fish');
42
- const { getConfigManager } = require('../src/config/manager');
41
+ import { playSplashScreen, printQuickSplash, fishError, fishInfo, fishSuccess } from '../src/cli/animations/fish';
42
+ import { getConfigManager } from '../src/config/manager';
43
43
 
44
- const VERSION = '2.1.9';
44
+ const VERSION = '2.2.1';
45
45
  const program = new Command();
46
46
 
47
47
  // ─── Program Setup ──────────────────────────────────────────────
48
48
 
49
49
  program
50
50
  .name('azerclaw')
51
- .description('🐟 AZERCLAW v2.1.9 — Diabolical AI · Scorched Earth · Your Way')
51
+ .description('🐟 AZERCLAW v2.2.1 — Diabolical AI · Scorched Earth · Your Way')
52
52
  .version(VERSION, '-v, --version', 'Display version')
53
53
  .option('--no-splash', 'Skip the splash screen')
54
54
  .option('--no-color', 'Disable colors')
@@ -60,6 +60,16 @@ program
60
60
  // Global initialization
61
61
  const { registerAllTools } = require('../src/tools');
62
62
  await registerAllTools();
63
+
64
+ // Initialize learning/memory dreaming engine
65
+ try {
66
+ const { initializeDreaming } = require('../src/memory/dreaming');
67
+ const { getVectorContextStore, getContextStore } = require('../src/memory');
68
+ const vectorStore = getVectorContextStore(getContextStore()).getVectorStore();
69
+ initializeDreaming(vectorStore, { enabled: true, interval: 30 });
70
+ } catch {
71
+ /* silently skip if memory subsystem unavailable */
72
+ }
63
73
  });
64
74
 
65
75
  // ─── Default Action (no command) ────────────────────────────────
@@ -116,6 +126,7 @@ program
116
126
  .option('-m, --model <model>', 'Override the default model')
117
127
  .option('-p, --provider <provider>', 'Override the default provider')
118
128
  .option('-f, --file <path>', 'Include a file in the conversation context')
129
+ .option('-b, --hybrid', 'Use hybrid brain (multi-model parallel execution)')
119
130
  .action(async (opts: any) => {
120
131
  const config = getConfigManager();
121
132
  config.resolveEnvOverrides();
@@ -157,6 +168,7 @@ program
157
168
  .option('-p, --provider <provider>', 'Override the default provider')
158
169
  .option('-f, --file <path>', 'Include a file in the task context')
159
170
  .option('-V, --verbose', 'Show tool calls in detail')
171
+ .option('-b, --hybrid', 'Use hybrid brain (multi-model parallel execution)')
160
172
  .action(async (task: string | undefined, opts: any) => {
161
173
  const config = getConfigManager();
162
174
  config.resolveEnvOverrides();
@@ -572,6 +584,33 @@ program
572
584
  await runDoctor(opts);
573
585
  });
574
586
 
587
+ // ─── Update Command ─────────────────────────────────────────────
588
+
589
+ program
590
+ .command('update')
591
+ .description('Upgrade AZERCLAW to the latest version')
592
+ .action(async () => {
593
+ printQuickSplash(VERSION);
594
+ const chalk = require('chalk');
595
+ const { fishInfo, fishSuccess, fishError } = require('../src/cli/animations/fish');
596
+
597
+ fishInfo('Initiating scorched-earth update... 🐟🔥');
598
+
599
+ const { execSync } = require('child_process');
600
+ try {
601
+ fishInfo('Executing global installation via npm...');
602
+ // stdio: inherit allows the user to see the npm progress bar and output
603
+ execSync('npm install -g azerclaw@latest', { stdio: 'inherit' });
604
+ fishSuccess('AZERCLAW upgraded to the latest version successfully!');
605
+ console.log(chalk.dim('Please restart your terminal if you encounter any path issues.\n'));
606
+ } catch (e: any) {
607
+ fishError(`Update failed: ${e.message}`);
608
+ console.log(chalk.dim('\nTip: You may need to run this with sudo depending on your npm configuration:'));
609
+ console.log(chalk.yellow('sudo npm install -g azerclaw@latest\n'));
610
+ }
611
+ });
612
+
613
+
575
614
  // ─── Security Audit Command ────────────────────────────────────
576
615
 
577
616
  const securityCmd = program
package/bin/opencode.ts CHANGED
@@ -17,7 +17,7 @@ import { AzerclawServer } from '../src/core/server';
17
17
  import { printQuickSplash } from '../src/cli/animations/fish';
18
18
 
19
19
  export async function runOpencode() {
20
- const VERSION = '2.1.9';
20
+ const VERSION = '2.2.0';
21
21
  const program = new Command();
22
22
 
23
23
  program
@@ -1,49 +1,3 @@
1
1
  #!/usr/bin/env node
2
- /**
3
- * 🐟 AZERCLAW — CLI Entry Point
4
- *
5
- * An open-source, BYOK AI agent for your terminal.
6
- * Inspired by OpenClaw, themed with a fish 🐟 instead of a lobster.
7
- *
8
- * Usage:
9
- * azerclaw — Launch interactive session (or onboard if first run)
10
- * azerclaw chat — Interactive chat
11
- * azerclaw run "task" — Execute a task
12
- * azerclaw tui — Premium terminal UI
13
- * azerclaw onboard — Setup wizard
14
- * azerclaw config — Manage configuration
15
- * azerclaw config provider — Switch provider
16
- * azerclaw config model — Switch model
17
- * azerclaw config apikey — Set API key
18
- * azerclaw config fallback — Configure fallback
19
- * azerclaw config channels — DM policy + routing controls
20
- * azerclaw config sandbox — Session sandbox controls
21
- * azerclaw pairing — Manage DM pairing approvals
22
- * azerclaw init — Initialize project (AZERCLAW.md)
23
- * azerclaw models — Manage AI models
24
- * azerclaw doctor — Health check
25
- * azerclaw status — Show current status
26
- */
27
- declare const Command: any;
28
- declare const chalk: any;
29
- declare const playSplashScreen: any, printQuickSplash: any, fishError: any, fishInfo: any, fishSuccess: any;
30
- declare const getConfigManager: any;
31
- declare const VERSION = "2.1.9";
32
- declare const program: any;
33
- declare const configCmd: any;
34
- declare const configChannelsCmd: any;
35
- declare const configChannelsAllowCmd: any;
36
- declare const configChannelsRoutingCmd: any;
37
- declare const configSandboxCmd: any;
38
- declare const configSandboxAllowCmd: any;
39
- declare const configSandboxDenyCmd: any;
40
- declare const modelsCmd: any;
41
- declare const securityCmd: any;
42
- declare const pairingCmd: any;
43
- declare const agentsCmd: any;
44
- declare const workflowCmd: any;
45
- declare const toolsCmd: any;
46
- declare const botCmd: any;
47
- declare const plugins: any;
48
- declare const mcp: any;
2
+ export {};
49
3
  //# sourceMappingURL=azerclaw.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"azerclaw.d.ts","sourceRoot":"","sources":["../../bin/azerclaw.ts"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,QAAA,MAAQ,OAAO,KAAyB,CAAC;AACzC,QAAA,MAAM,KAAK,KAAmB,CAAC;AAQ/B,QAAA,MAAQ,gBAAgB,OAAE,gBAAgB,OAAE,SAAS,OAAE,QAAQ,OAAE,WAAW,KAA0C,CAAC;AACvH,QAAA,MAAQ,gBAAgB,KAAqC,CAAC;AAE9D,QAAA,MAAM,OAAO,UAAU,CAAC;AACxB,QAAA,MAAM,OAAO,KAAgB,CAAC;AAyO9B,QAAA,MAAM,SAAS,KAEuB,CAAC;AA+FvC,QAAA,MAAM,iBAAiB,KAEoD,CAAC;AAkB5E,QAAA,MAAM,sBAAsB,KAEmB,CAAC;AA0BhD,QAAA,MAAM,wBAAwB,KAEwB,CAAC;AAwCvD,QAAA,MAAM,gBAAgB,KAE4B,CAAC;AAkBnD,QAAA,MAAM,qBAAqB,KAEuB,CAAC;AAkBnD,QAAA,MAAM,oBAAoB,KAEuB,CAAC;AA+BlD,QAAA,MAAM,SAAS,KAEmB,CAAC;AAqCnC,QAAA,MAAM,WAAW,KAEe,CAAC;AA+EjC,QAAA,MAAM,UAAU,KAEkD,CAAC;AAmCnE,QAAA,MAAM,SAAS,KAEyC,CAAC;AAmCzD,QAAA,MAAM,WAAW,KAEkC,CAAC;AAkDpD,QAAA,MAAM,QAAQ,KAEqC,CAAC;AA8FpD,QAAA,MAAM,MAAM,KAEsD,CAAC;AAiCnE,QAAA,MAAM,OAAO,KAC6B,CAAC;AAkB3C,QAAA,MAAM,GAAG,KACoD,CAAC"}
1
+ {"version":3,"file":"azerclaw.d.ts","sourceRoot":"","sources":["../../bin/azerclaw.ts"],"names":[],"mappings":""}
@@ -1,5 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
3
7
  process.removeAllListeners('warning');
4
8
  process.env.NODE_NO_WARNINGS = '1';
5
9
  /**
@@ -27,38 +31,48 @@ process.env.NODE_NO_WARNINGS = '1';
27
31
  * azerclaw doctor — Health check
28
32
  * azerclaw status — Show current status
29
33
  */
30
- const { Command } = require('commander');
31
- const chalk = require('chalk');
34
+ const commander_1 = require("commander");
35
+ const chalk_1 = __importDefault(require("chalk"));
32
36
  // Disable colors and animations if output is piped
33
37
  if (!process.stdout.isTTY) {
34
- chalk.level = 0;
38
+ chalk_1.default.level = 0;
35
39
  process.env.FORCE_COLOR = '0';
36
40
  }
37
- const { playSplashScreen, printQuickSplash, fishError, fishInfo, fishSuccess } = require('../src/cli/animations/fish');
38
- const { getConfigManager } = require('../src/config/manager');
39
- const VERSION = '2.1.9';
40
- const program = new Command();
41
+ const fish_1 = require("../src/cli/animations/fish");
42
+ const manager_1 = require("../src/config/manager");
43
+ const VERSION = '2.2.1';
44
+ const program = new commander_1.Command();
41
45
  // ─── Program Setup ──────────────────────────────────────────────
42
46
  program
43
47
  .name('azerclaw')
44
- .description('🐟 AZERCLAW v2.1.9 — Diabolical AI · Scorched Earth · Your Way')
48
+ .description('🐟 AZERCLAW v2.2.1 — Diabolical AI · Scorched Earth · Your Way')
45
49
  .version(VERSION, '-v, --version', 'Display version')
46
50
  .option('--no-splash', 'Skip the splash screen')
47
51
  .option('--no-color', 'Disable colors')
48
52
  .hook('preAction', async (thisCommand) => {
49
53
  if (thisCommand.opts().color === false) {
50
- chalk.level = 0;
54
+ chalk_1.default.level = 0;
51
55
  process.env.FORCE_COLOR = '0';
52
56
  }
53
57
  // Global initialization
54
58
  const { registerAllTools } = require('../src/tools');
55
59
  await registerAllTools();
60
+ // Initialize learning/memory dreaming engine
61
+ try {
62
+ const { initializeDreaming } = require('../src/memory/dreaming');
63
+ const { getVectorContextStore, getContextStore } = require('../src/memory');
64
+ const vectorStore = getVectorContextStore(getContextStore()).getVectorStore();
65
+ initializeDreaming(vectorStore, { enabled: true, interval: 30 });
66
+ }
67
+ catch {
68
+ /* silently skip if memory subsystem unavailable */
69
+ }
56
70
  });
57
71
  // ─── Default Action (no command) ────────────────────────────────
58
72
  program
59
73
  .argument('[task]', 'Optional task to execute immediately (one-off mode)')
60
74
  .action(async (task, opts) => {
61
- const config = getConfigManager();
75
+ const config = (0, manager_1.getConfigManager)();
62
76
  config.resolveEnvOverrides();
63
77
  // Check for positional task
64
78
  if (task) {
@@ -86,7 +100,7 @@ program
86
100
  }
87
101
  if (config.isFirstRun()) {
88
102
  // First run: show full splash + onboard
89
- await playSplashScreen(VERSION);
103
+ await (0, fish_1.playSplashScreen)(VERSION);
90
104
  const { runOnboard } = require('../src/cli/commands/onboard');
91
105
  await runOnboard();
92
106
  }
@@ -103,8 +117,9 @@ program
103
117
  .option('-m, --model <model>', 'Override the default model')
104
118
  .option('-p, --provider <provider>', 'Override the default provider')
105
119
  .option('-f, --file <path>', 'Include a file in the conversation context')
120
+ .option('-b, --hybrid', 'Use hybrid brain (multi-model parallel execution)')
106
121
  .action(async (opts) => {
107
- const config = getConfigManager();
122
+ const config = (0, manager_1.getConfigManager)();
108
123
  config.resolveEnvOverrides();
109
124
  // Apply CLI flag overrides
110
125
  if (opts.model || opts.provider) {
@@ -118,10 +133,10 @@ program
118
133
  }
119
134
  }
120
135
  if (program.opts().splash !== false) {
121
- printQuickSplash(VERSION);
136
+ (0, fish_1.printQuickSplash)(VERSION);
122
137
  }
123
138
  if (config.isFirstRun()) {
124
- fishInfo('First time? Running setup wizard...');
139
+ (0, fish_1.fishInfo)('First time? Running setup wizard...');
125
140
  const { runOnboard } = require('../src/cli/commands/onboard');
126
141
  await runOnboard();
127
142
  return;
@@ -137,8 +152,9 @@ program
137
152
  .option('-p, --provider <provider>', 'Override the default provider')
138
153
  .option('-f, --file <path>', 'Include a file in the task context')
139
154
  .option('-V, --verbose', 'Show tool calls in detail')
155
+ .option('-b, --hybrid', 'Use hybrid brain (multi-model parallel execution)')
140
156
  .action(async (task, opts) => {
141
- const config = getConfigManager();
157
+ const config = (0, manager_1.getConfigManager)();
142
158
  config.resolveEnvOverrides();
143
159
  if (opts.model || opts.provider) {
144
160
  config.applyRuntimeOverrides(opts);
@@ -158,7 +174,7 @@ program
158
174
  });
159
175
  }
160
176
  if (!finalTask.trim()) {
161
- fishError('No task provided. Usage: azerclaw run "your task" or echo "task" | azerclaw run');
177
+ (0, fish_1.fishError)('No task provided. Usage: azerclaw run "your task" or echo "task" | azerclaw run');
162
178
  return;
163
179
  }
164
180
  if (opts.file) {
@@ -168,7 +184,7 @@ program
168
184
  finalTask = `Context from file ${opts.file}:\n\`\`\`\n${content}\n\`\`\`\n\nTask: ${finalTask}`;
169
185
  }
170
186
  }
171
- printQuickSplash(VERSION);
187
+ (0, fish_1.printQuickSplash)(VERSION);
172
188
  const { runTask } = require('../src/cli/commands/run');
173
189
  await runTask(finalTask.trim(), opts);
174
190
  });
@@ -178,7 +194,7 @@ program
178
194
  .description('Start the AZERCLAW local WebSocket daemon for desktop apps')
179
195
  .option('-p, --port <port>', 'Port to listen on', '8080')
180
196
  .action((opts) => {
181
- printQuickSplash(VERSION);
197
+ (0, fish_1.printQuickSplash)(VERSION);
182
198
  const { AzerclawServer } = require('../src/core/server');
183
199
  const port = parseInt(opts.port, 10) || 8080;
184
200
  const server = new AzerclawServer(port);
@@ -191,7 +207,7 @@ program
191
207
  .option('-m, --model <model>', 'Override the default model')
192
208
  .option('-p, --provider <provider>', 'Override the default provider')
193
209
  .action(async (opts) => {
194
- const config = getConfigManager();
210
+ const config = (0, manager_1.getConfigManager)();
195
211
  config.resolveEnvOverrides();
196
212
  if (opts.model || opts.provider) {
197
213
  config.applyRuntimeOverrides(opts);
@@ -204,7 +220,7 @@ program
204
220
  .command('onboard')
205
221
  .description('Run the interactive setup wizard')
206
222
  .action(async () => {
207
- await playSplashScreen(VERSION);
223
+ await (0, fish_1.playSplashScreen)(VERSION);
208
224
  const { runOnboard } = require('../src/cli/commands/onboard');
209
225
  await runOnboard();
210
226
  });
@@ -221,7 +237,7 @@ program
221
237
  .command('status')
222
238
  .description('Show current model, provider, auth, and project status')
223
239
  .action(() => {
224
- const config = getConfigManager();
240
+ const config = (0, manager_1.getConfigManager)();
225
241
  config.resolveEnvOverrides();
226
242
  const { showStatus } = require('../src/cli/commands/settings');
227
243
  showStatus();
@@ -490,10 +506,33 @@ program
490
506
  .description('Run health checks on your AZERCLAW installation')
491
507
  .option('-f, --fix', 'Attempt to auto-fix issues')
492
508
  .action(async (opts) => {
493
- printQuickSplash(VERSION);
509
+ (0, fish_1.printQuickSplash)(VERSION);
494
510
  const { runDoctor } = require('../src/cli/commands/doctor');
495
511
  await runDoctor(opts);
496
512
  });
513
+ // ─── Update Command ─────────────────────────────────────────────
514
+ program
515
+ .command('update')
516
+ .description('Upgrade AZERCLAW to the latest version')
517
+ .action(async () => {
518
+ (0, fish_1.printQuickSplash)(VERSION);
519
+ const chalk = require('chalk');
520
+ const { fishInfo, fishSuccess, fishError } = require('../src/cli/animations/fish');
521
+ fishInfo('Initiating scorched-earth update... 🐟🔥');
522
+ const { execSync } = require('child_process');
523
+ try {
524
+ fishInfo('Executing global installation via npm...');
525
+ // stdio: inherit allows the user to see the npm progress bar and output
526
+ execSync('npm install -g azerclaw@latest', { stdio: 'inherit' });
527
+ fishSuccess('AZERCLAW upgraded to the latest version successfully!');
528
+ console.log(chalk.dim('Please restart your terminal if you encounter any path issues.\n'));
529
+ }
530
+ catch (e) {
531
+ fishError(`Update failed: ${e.message}`);
532
+ console.log(chalk.dim('\nTip: You may need to run this with sudo depending on your npm configuration:'));
533
+ console.log(chalk.yellow('sudo npm install -g azerclaw@latest\n'));
534
+ }
535
+ });
497
536
  // ─── Security Audit Command ────────────────────────────────────
498
537
  const securityCmd = program
499
538
  .command('security')
@@ -502,10 +541,10 @@ securityCmd
502
541
  .command('audit')
503
542
  .option('-f, --fix', 'Auto-fix security issues')
504
543
  .action(async (opts) => {
505
- printQuickSplash(VERSION);
506
- fishInfo('Running security audit...');
544
+ (0, fish_1.printQuickSplash)(VERSION);
545
+ (0, fish_1.fishInfo)('Running security audit...');
507
546
  const fs = require('fs');
508
- const config = getConfigManager();
547
+ const config = (0, manager_1.getConfigManager)();
509
548
  const { auditDmPolicies, applySafeDmDefaults } = require('../src/channels/security');
510
549
  const { auditSandboxPosture, applySafeSandboxDefaults } = require('../src/core/sandbox');
511
550
  const issues = [];
@@ -517,7 +556,7 @@ securityCmd
517
556
  issues.push(`Config file has permissions 0${mode} (should be 0600)`);
518
557
  if (opts.fix) {
519
558
  fs.chmodSync(config.paths.configFile, 0o600);
520
- fishInfo('Fixed: Config permissions set to 0600');
559
+ (0, fish_1.fishInfo)('Fixed: Config permissions set to 0600');
521
560
  }
522
561
  }
523
562
  }
@@ -526,7 +565,7 @@ securityCmd
526
565
  const envKeys = ['OPENAI_API_KEY', 'ANTHROPIC_API_KEY', 'GOOGLE_API_KEY'];
527
566
  for (const key of envKeys) {
528
567
  if (process.env[key]) {
529
- fishInfo(`${key} found in environment (normal for CI/CD, prefer config file for local use)`);
568
+ (0, fish_1.fishInfo)(`${key} found in environment (normal for CI/CD, prefer config file for local use)`);
530
569
  }
531
570
  }
532
571
  const dmAudit = auditDmPolicies(config.getAll().channels);
@@ -539,7 +578,7 @@ securityCmd
539
578
  if (opts.fix && dmAudit.failures.length > 0) {
540
579
  const changes = applySafeDmDefaults(config);
541
580
  for (const change of changes) {
542
- fishInfo(`Fixed: ${change}`);
581
+ (0, fish_1.fishInfo)(`Fixed: ${change}`);
543
582
  }
544
583
  }
545
584
  const sandboxAudit = auditSandboxPosture(config.getAll());
@@ -552,7 +591,7 @@ securityCmd
552
591
  if (opts.fix && sandboxAudit.failures.length > 0) {
553
592
  const changes = applySafeSandboxDefaults(config);
554
593
  for (const change of changes) {
555
- fishInfo(`Fixed: ${change}`);
594
+ (0, fish_1.fishInfo)(`Fixed: ${change}`);
556
595
  }
557
596
  }
558
597
  if (issues.length === 0) {
@@ -612,7 +651,7 @@ agentsCmd
612
651
  .command('invoke <name> <task>')
613
652
  .description('Invoke a specific agent')
614
653
  .action(async (name, task, opts) => {
615
- printQuickSplash(VERSION);
654
+ (0, fish_1.printQuickSplash)(VERSION);
616
655
  const { agentInvoke } = require('../src/cli/commands/agents');
617
656
  await agentInvoke(name, task, opts);
618
657
  });
@@ -620,7 +659,7 @@ agentsCmd
620
659
  .command('auto <task>')
621
660
  .description('Auto-match the best agent for a task')
622
661
  .action(async (task) => {
623
- printQuickSplash(VERSION);
662
+ (0, fish_1.printQuickSplash)(VERSION);
624
663
  const { agentAuto } = require('../src/cli/commands/agents');
625
664
  await agentAuto(task);
626
665
  });
@@ -636,46 +675,46 @@ workflowCmd
636
675
  .command('run <file>')
637
676
  .description('Run a .fishbone workflow file')
638
677
  .action(async (file) => {
639
- printQuickSplash(VERSION);
678
+ (0, fish_1.printQuickSplash)(VERSION);
640
679
  const { parseFishboneFile, FishboneEngine } = require('../src/workflow/engine');
641
680
  const path = require('path');
642
681
  const fs = require('fs');
643
682
  const filePath = path.resolve(process.cwd(), file);
644
683
  if (!fs.existsSync(filePath)) {
645
- fishError(`Workflow file not found: ${filePath}`);
684
+ (0, fish_1.fishError)(`Workflow file not found: ${filePath}`);
646
685
  return;
647
686
  }
648
687
  const workflow = parseFishboneFile(filePath);
649
- fishInfo(`Running workflow: ${workflow.name} (v${workflow.version})`);
688
+ (0, fish_1.fishInfo)(`Running workflow: ${workflow.name} (v${workflow.version})`);
650
689
  const engine = new FishboneEngine();
651
690
  await engine.execute(workflow, {}, async (event) => {
652
691
  if (event.type === 'step_start')
653
- console.log(chalk.hex('#60a5fa')(`[Step] ${event.stepName}...`));
692
+ console.log(chalk_1.default.hex('#60a5fa')(`[Step] ${event.stepName}...`));
654
693
  if (event.type === 'approval_needed') {
655
- console.log(chalk.hex('#fbbf24')(`[Approval] Needed for: ${event.content}`));
656
- console.log(chalk.hex('#34d399')(`Resume token: ${event.resumeToken}`));
694
+ console.log(chalk_1.default.hex('#fbbf24')(`[Approval] Needed for: ${event.content}`));
695
+ console.log(chalk_1.default.hex('#34d399')(`Resume token: ${event.resumeToken}`));
657
696
  }
658
697
  if (event.type === 'step_error')
659
- console.log(chalk.hex('#ef4444')(`[Error] ${event.content}`));
698
+ console.log(chalk_1.default.hex('#ef4444')(`[Error] ${event.content}`));
660
699
  if (event.type === 'workflow_complete')
661
- fishSuccess('Workflow completed successfully');
700
+ (0, fish_1.fishSuccess)('Workflow completed successfully');
662
701
  if (event.type === 'workflow_error')
663
- fishError(`Workflow failed: ${event.content}`);
702
+ (0, fish_1.fishError)(`Workflow failed: ${event.content}`);
664
703
  });
665
704
  });
666
705
  workflowCmd
667
706
  .command('resume <id> <token>')
668
707
  .description('Resume a paused workflow')
669
708
  .action(async (id, token) => {
670
- printQuickSplash(VERSION);
709
+ (0, fish_1.printQuickSplash)(VERSION);
671
710
  const { FishboneEngine } = require('../src/workflow/engine');
672
711
  const engine = new FishboneEngine();
673
712
  const resumed = await engine.resume(id, token);
674
713
  if (resumed) {
675
- fishSuccess(`Workflow ${id} resumed successfully.`);
714
+ (0, fish_1.fishSuccess)(`Workflow ${id} resumed successfully.`);
676
715
  }
677
716
  else {
678
- fishError(`Failed to resume workflow ${id}. Invalid token or session not found.`);
717
+ (0, fish_1.fishError)(`Failed to resume workflow ${id}. Invalid token or session not found.`);
679
718
  }
680
719
  });
681
720
  // ─── Tools Command ──────────────────────────────────────────────
@@ -690,18 +729,18 @@ toolsCmd
690
729
  const registry = getToolRegistry();
691
730
  const tools = registry.getAll();
692
731
  console.log('');
693
- fishInfo(`Registered Tools (${tools.length})`);
732
+ (0, fish_1.fishInfo)(`Registered Tools (${tools.length})`);
694
733
  console.log('');
695
734
  const Table = require('cli-table3');
696
735
  const table = new Table({
697
- head: [chalk.hex('#60a5fa')('Name'), chalk.hex('#60a5fa')('Version'), chalk.hex('#60a5fa')('Description')],
736
+ head: [chalk_1.default.hex('#60a5fa')('Name'), chalk_1.default.hex('#60a5fa')('Version'), chalk_1.default.hex('#60a5fa')('Description')],
698
737
  colWidths: [20, 10, 50],
699
738
  wordWrap: true,
700
739
  });
701
740
  tools.forEach((tool) => {
702
741
  table.push([
703
- chalk.hex('#34d399')(tool.name),
704
- chalk.dim(tool.version),
742
+ chalk_1.default.hex('#34d399')(tool.name),
743
+ chalk_1.default.dim(tool.version),
705
744
  tool.description.slice(0, 100) + (tool.description.length > 100 ? '...' : '')
706
745
  ]);
707
746
  });
@@ -714,18 +753,18 @@ toolsCmd
714
753
  const { getToolRegistry } = require('../src/tools/registry');
715
754
  const tool = getToolRegistry().get(name);
716
755
  if (!tool) {
717
- fishError(`Tool not found: ${name}`);
756
+ (0, fish_1.fishError)(`Tool not found: ${name}`);
718
757
  return;
719
758
  }
720
759
  console.log('');
721
- console.log(chalk.hex('#60a5fa').bold(`Tool: ${tool.name}`));
722
- console.log(chalk.dim(`Version: ${tool.version}`));
760
+ console.log(chalk_1.default.hex('#60a5fa').bold(`Tool: ${tool.name}`));
761
+ console.log(chalk_1.default.dim(`Version: ${tool.version}`));
723
762
  if (tool.author)
724
- console.log(chalk.dim(`Author: ${tool.author}`));
763
+ console.log(chalk_1.default.dim(`Author: ${tool.author}`));
725
764
  console.log('');
726
765
  console.log(tool.description);
727
766
  console.log('');
728
- console.log(chalk.hex('#fbbf24')('Parameters:'));
767
+ console.log(chalk_1.default.hex('#fbbf24')('Parameters:'));
729
768
  console.log(JSON.stringify(tool.parameters, null, 2));
730
769
  });
731
770
  toolsCmd
@@ -747,14 +786,14 @@ toolsCmd
747
786
  });
748
787
  const outputPath = path.resolve(process.cwd(), opts.output);
749
788
  fs.writeFileSync(outputPath, markdown);
750
- fishSuccess(`Documentation generated at ${outputPath}`);
789
+ (0, fish_1.fishSuccess)(`Documentation generated at ${outputPath}`);
751
790
  });
752
791
  toolsCmd
753
792
  .command('install <url_or_path>')
754
793
  .description('Install a tool plugin from a URL or local file (coming soon)')
755
794
  .action((src) => {
756
- fishInfo(`Plugin installation for '${src}' will be available in the next release.`);
757
- fishInfo('For now, manually place your .js/.ts files in the ./plugins directory.');
795
+ (0, fish_1.fishInfo)(`Plugin installation for '${src}' will be available in the next release.`);
796
+ (0, fish_1.fishInfo)('For now, manually place your .js/.ts files in the ./plugins directory.');
758
797
  });
759
798
  toolsCmd.action(() => {
760
799
  program.helpInformation();