@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 +11 -25
- package/codex.mjs +839 -0
- package/commands/doctor.mjs +1085 -0
- package/commands/init.mjs +35 -12
- package/commands/link-project.mjs +11 -4
- package/commands/nuke.mjs +28 -23
- package/commands/pull.mjs +84 -5
- package/commands/push-rules.mjs +2 -2
- package/commands/push.mjs +8 -15
- package/commands/search.mjs +1 -1
- package/commands/startup.mjs +87 -0
- package/config.mjs +1 -1
- package/constants.mjs +0 -7
- package/ecc.mjs +89 -92
- package/fmt.mjs +0 -14
- package/hook-manifest.mjs +195 -0
- package/hooks/codex-home.mjs +184 -0
- package/hooks/shared-phase-scripts.mjs +69 -0
- package/hooks.mjs +5 -106
- package/integrate.mjs +171 -20
- package/link.mjs +36 -1
- package/package.json +12 -9
- package/paths.mjs +1 -1
- package/registry.mjs +1 -1
- package/render-rules.mjs +48 -8
- package/startup.mjs +562 -0
- package/commands/slack-sim.mjs +0 -128
- package/commands/telemetry.mjs +0 -31
- package/slack-sim/fake-slack.mjs +0 -200
- package/slack-sim/http.mjs +0 -170
- package/slack-sim/in-process.mjs +0 -263
- package/slack-sim/render.mjs +0 -42
- package/slack-sim/scenario.mjs +0 -64
- package/slack-sim/scenarios/checkpoint-approve.json +0 -21
- package/slack-sim/scenarios/image-thread.json +0 -27
- package/slack-sim/scenarios/implementation-basic.json +0 -18
- package/slack-sim/scenarios/poll-webhook-race.json +0 -18
- package/slack-sim/scenarios/review-pr.json +0 -14
- package/telemetry.mjs +0 -233
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
|
|
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
|
-
|
|
167
|
-
|
|
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.
|
|
173
|
+
fmt.cancel(`Unknown command: ${command}`);
|
|
188
174
|
}
|