@ghl-ai/aw 0.1.37 → 0.1.38-beta.1

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,11 +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
27
  };
27
28
 
28
29
  function parseArgs(argv) {
@@ -97,20 +98,17 @@ function printHelp() {
97
98
 
98
99
  sec('Manage'),
99
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'),
100
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'),
101
106
  cmd('aw drop <path>', 'Stop syncing or delete local content'),
102
107
  cmd('aw nuke', 'Remove entire .aw_registry/ & start fresh'),
103
108
  cmd('aw daemon install', 'Auto-pull on a schedule (macOS launchd / Linux cron)'),
104
109
  cmd('aw daemon install --interval 30m', 'Set custom interval (e.g. 30m, 2h, 3600)'),
105
110
  cmd('aw daemon uninstall', 'Stop the background daemon'),
106
111
  cmd('aw daemon status', 'Check if daemon is running'),
107
- cmd('aw slack-sim run <scenario>', 'Replay Slack-like scenarios against real runtime'),
108
- cmd('aw slack-sim list-scenarios', 'List built-in Slack simulator scenarios'),
109
-
110
- sec('Settings'),
111
- cmd('aw telemetry status', 'Show telemetry status'),
112
- cmd('aw telemetry disable', 'Opt out of anonymous analytics'),
113
- cmd('aw telemetry enable', 'Re-enable analytics'),
114
112
 
115
113
  sec('Examples'),
116
114
  '',
@@ -160,21 +158,9 @@ export async function run(argv) {
160
158
  }
161
159
 
162
160
  if (command && COMMANDS[command]) {
163
- const span = await startSpan(command, args);
164
- span.notice();
165
161
  args._updateCheck = updateCheck;
166
- try {
167
- const handler = await COMMANDS[command]();
168
- await handler(args);
169
- await span.end({ status: 'completed' });
170
- } catch (err) {
171
- if (err instanceof CancelError) {
172
- await span.end({ status: 'cancelled', error_type: 'CancelError' });
173
- process.exit(err.exitCode ?? 1);
174
- }
175
- await span.end({ status: 'failed', error_type: err.constructor.name });
176
- throw err;
177
- }
162
+ const handler = await COMMANDS[command]();
163
+ await handler(args);
178
164
  notifyUpdate(await updateCheck);
179
165
  return;
180
166
  }
@@ -184,5 +170,5 @@ export async function run(argv) {
184
170
  process.exit(0);
185
171
  }
186
172
 
187
- fmt.cancelAndExit(`Unknown command: ${command}`);
173
+ fmt.cancel(`Unknown command: ${command}`);
188
174
  }