@ghl-ai/aw 0.1.37-beta.9 → 0.1.38-beta.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/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;
@@ -15,13 +14,16 @@ const COMMANDS = {
15
14
  init: () => import('./commands/init.mjs').then(m => m.initCommand),
16
15
  pull: () => import('./commands/pull.mjs').then(m => m.pullCommand),
17
16
  push: () => import('./commands/push.mjs').then(m => m.pushCommand),
17
+ 'push-rules': () => import('./commands/push-rules.mjs').then(m => m.pushRulesCommand),
18
18
  drop: () => import('./commands/drop.mjs').then(m => m.dropCommand),
19
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),
20
23
  search: () => import('./commands/search.mjs').then(m => m.searchCommand),
21
24
  link: () => import('./commands/link-project.mjs').then(m => m.linkProjectCommand),
22
25
  nuke: () => import('./commands/nuke.mjs').then(m => m.nukeCommand),
23
26
  daemon: () => import('./commands/daemon.mjs').then(m => m.daemonCommand),
24
- telemetry: () => import('./commands/telemetry.mjs').then(m => m.telemetryCommand),
25
27
  };
26
28
 
27
29
  function parseArgs(argv) {
@@ -88,6 +90,7 @@ function printHelp() {
88
90
  sec('Upload'),
89
91
  cmd('aw push', 'Push all modified files (creates one PR)'),
90
92
  cmd('aw push <path>', 'Push file, folder, or namespace to registry'),
93
+ cmd('aw push-rules [path]', 'Push platform rules to platform-docs'),
91
94
  cmd('aw push --dry-run [path]', 'Preview what would be pushed'),
92
95
 
93
96
  sec('Discover'),
@@ -95,7 +98,11 @@ function printHelp() {
95
98
 
96
99
  sec('Manage'),
97
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'),
98
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'),
99
106
  cmd('aw drop <path>', 'Stop syncing or delete local content'),
100
107
  cmd('aw nuke', 'Remove entire .aw_registry/ & start fresh'),
101
108
  cmd('aw daemon install', 'Auto-pull on a schedule (macOS launchd / Linux cron)'),
@@ -103,11 +110,6 @@ function printHelp() {
103
110
  cmd('aw daemon uninstall', 'Stop the background daemon'),
104
111
  cmd('aw daemon status', 'Check if daemon is running'),
105
112
 
106
- sec('Settings'),
107
- cmd('aw telemetry status', 'Show telemetry status'),
108
- cmd('aw telemetry disable', 'Opt out of anonymous analytics'),
109
- cmd('aw telemetry enable', 'Re-enable analytics'),
110
-
111
113
  sec('Examples'),
112
114
  '',
113
115
  ` ${chalk.dim('# Pull content from registry using path')}`,
@@ -122,6 +124,8 @@ function printHelp() {
122
124
  cmd('aw push .aw_registry/<team>/', 'Push entire namespace (one PR)'),
123
125
  cmd('aw push .aw_registry/agents/<name>.md', 'Push a single agent'),
124
126
  cmd('aw push .aw_registry/skills/<name>/', 'Push a single skill folder'),
127
+ cmd('aw push .aw_rules', 'Auto-redirects to aw push-rules'),
128
+ cmd('aw push-rules', 'Pushes .aw_rules or .aw_registry/.aw_rules'),
125
129
  '',
126
130
  ` ${chalk.dim('# Remove content from workspace')}`,
127
131
  cmd('aw drop <team>', 'Stop syncing a namespace (removes all files)'),
@@ -154,21 +158,9 @@ export async function run(argv) {
154
158
  }
155
159
 
156
160
  if (command && COMMANDS[command]) {
157
- const span = await startSpan(command, args);
158
- span.notice();
159
161
  args._updateCheck = updateCheck;
160
- try {
161
- const handler = await COMMANDS[command]();
162
- await handler(args);
163
- await span.end({ status: 'completed' });
164
- } catch (err) {
165
- if (err instanceof CancelError) {
166
- await span.end({ status: 'cancelled', error_type: 'CancelError' });
167
- process.exit(err.exitCode ?? 1);
168
- }
169
- await span.end({ status: 'failed', error_type: err.constructor.name });
170
- throw err;
171
- }
162
+ const handler = await COMMANDS[command]();
163
+ await handler(args);
172
164
  notifyUpdate(await updateCheck);
173
165
  return;
174
166
  }
@@ -178,5 +170,5 @@ export async function run(argv) {
178
170
  process.exit(0);
179
171
  }
180
172
 
181
- fmt.cancelAndExit(`Unknown command: ${command}`);
173
+ fmt.cancel(`Unknown command: ${command}`);
182
174
  }