@ghl-ai/aw 0.1.37-beta.62 → 0.1.37-beta.64

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/cli.mjs CHANGED
@@ -4,9 +4,8 @@ import { readFileSync } from 'node:fs';
4
4
  import { join, dirname } from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import * as fmt from './fmt.mjs';
7
- import { chalk, CancelError } from './fmt.mjs';
7
+ import { chalk } from './fmt.mjs';
8
8
  import { checkForUpdate, notifyUpdate } from './update.mjs';
9
- import { startSpan } from './telemetry.mjs';
10
9
 
11
10
  const __dirname = dirname(fileURLToPath(import.meta.url));
12
11
  const VERSION = JSON.parse(readFileSync(join(__dirname, 'package.json'), 'utf8')).version;
@@ -18,12 +17,13 @@ const COMMANDS = {
18
17
  'push-rules': () => import('./commands/push-rules.mjs').then(m => m.pushRulesCommand),
19
18
  drop: () => import('./commands/drop.mjs').then(m => m.dropCommand),
20
19
  status: () => import('./commands/status.mjs').then(m => m.statusCommand),
20
+ doctor: () => import('./commands/doctor.mjs').then(m => m.doctorCommand),
21
+ routing: () => import('./commands/startup.mjs').then(m => m.routingCommand),
22
+ startup: () => import('./commands/startup.mjs').then(m => m.startupCommand),
21
23
  search: () => import('./commands/search.mjs').then(m => m.searchCommand),
22
24
  link: () => import('./commands/link-project.mjs').then(m => m.linkProjectCommand),
23
25
  nuke: () => import('./commands/nuke.mjs').then(m => m.nukeCommand),
24
26
  daemon: () => import('./commands/daemon.mjs').then(m => m.daemonCommand),
25
- telemetry: () => import('./commands/telemetry.mjs').then(m => m.telemetryCommand),
26
- memory: () => import('./commands/memory.mjs').then(m => m.memoryCommand),
27
27
  };
28
28
 
29
29
  function parseArgs(argv) {
@@ -98,7 +98,11 @@ function printHelp() {
98
98
 
99
99
  sec('Manage'),
100
100
  cmd('aw status', 'Show synced paths, modified files & conflicts'),
101
+ cmd('aw doctor', 'Run a health check for routing, MCP, plugin, and AW ECC surfaces'),
101
102
  cmd('aw link', 'Link current project as a git worktree (wires IDE symlinks)'),
103
+ cmd('aw routing status', 'Show global AW session-routing mode for Claude/Cursor/Codex'),
104
+ cmd('aw routing disable', 'Disable automatic AW session routing globally'),
105
+ cmd('aw routing enable', 'Re-enable automatic AW session routing globally'),
102
106
  cmd('aw drop <path>', 'Stop syncing or delete local content'),
103
107
  cmd('aw nuke', 'Remove entire .aw_registry/ & start fresh'),
104
108
  cmd('aw daemon install', 'Auto-pull on a schedule (macOS launchd / Linux cron)'),
@@ -106,17 +110,6 @@ function printHelp() {
106
110
  cmd('aw daemon uninstall', 'Stop the background daemon'),
107
111
  cmd('aw daemon status', 'Check if daemon is running'),
108
112
 
109
- sec('Memory'),
110
- cmd('aw memory store <content>', 'Store a memory (curated)'),
111
- cmd('aw memory search <query>', 'Search memories'),
112
- cmd('aw memory pack <query>', 'Get a memory pack (token-budgeted)'),
113
- cmd('aw memory stats', 'Show memory statistics'),
114
-
115
- sec('Settings'),
116
- cmd('aw telemetry status', 'Show telemetry status'),
117
- cmd('aw telemetry disable', 'Opt out of anonymous analytics'),
118
- cmd('aw telemetry enable', 'Re-enable analytics'),
119
-
120
113
  sec('Examples'),
121
114
  '',
122
115
  ` ${chalk.dim('# Pull content from registry using path')}`,
@@ -165,21 +158,9 @@ export async function run(argv) {
165
158
  }
166
159
 
167
160
  if (command && COMMANDS[command]) {
168
- const span = await startSpan(command, args);
169
- span.notice();
170
161
  args._updateCheck = updateCheck;
171
- try {
172
- const handler = await COMMANDS[command]();
173
- await handler(args);
174
- await span.end({ status: 'completed' });
175
- } catch (err) {
176
- if (err instanceof CancelError) {
177
- await span.end({ status: 'cancelled', error_type: 'CancelError' });
178
- process.exit(err.exitCode ?? 1);
179
- }
180
- await span.end({ status: 'failed', error_type: err.constructor.name });
181
- throw err;
182
- }
162
+ const handler = await COMMANDS[command]();
163
+ await handler(args);
183
164
  notifyUpdate(await updateCheck);
184
165
  return;
185
166
  }
@@ -189,5 +170,5 @@ export async function run(argv) {
189
170
  process.exit(0);
190
171
  }
191
172
 
192
- fmt.cancelAndExit(`Unknown command: ${command}`);
173
+ fmt.cancel(`Unknown command: ${command}`);
193
174
  }