@aglit-ai/cli 0.1.17075 → 0.1.17084

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 (3) hide show
  1. package/README.md +10 -0
  2. package/bin/aglit.cjs +21 -4
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -137,3 +137,13 @@ changes a disabled extension setting or browser policy. Installation detection i
137
137
  separate from browser-control connectivity.
138
138
 
139
139
  This release supports Apple Silicon Macs. Windows publication is deferred until its signed native runtime is available.
140
+
141
+ On macOS, interactive `aglit init` also checks for the BlackHole 2ch audio cable
142
+ and installs the official Homebrew cask when it is missing. You can run
143
+ `aglit audio status --json` or retry with `aglit audio setup`. Administrator
144
+ approval happens in your terminal. Unattended setup reports the required action
145
+ without waiting for a password. Audio setup preserves existing BlackHole variants,
146
+ default audio devices and active CoreAudio sessions; restart macOS when the
147
+ installer requires it. In the remote app, select BlackHole 2ch as the microphone
148
+ for forwarded microphone audio. Browser speaker playback still requires a click
149
+ when autoplay is blocked.
package/bin/aglit.cjs CHANGED
@@ -32,6 +32,7 @@ const help = `Aglit Computer Use
32
32
  aglit team --name "Team name" [--team TEAM_ID] [--workspace WORKSPACE_ID]
33
33
  aglit pipelines [--open]
34
34
  aglit providers
35
+ aglit audio status | setup [--json]
35
36
  aglit models list | choose
36
37
  aglit models login copilot [--reauth] [--json]
37
38
  aglit models login-status copilot --attempt ATTEMPT_ID [--json]
@@ -78,11 +79,11 @@ async function main() {
78
79
  const [command = 'init', email, connectionId] = positionals;
79
80
  const options = {
80
81
  models: ['device','fingerprint','name','json','challenge','code','connection','connections','model','harness','attempt','reauth'],
81
- install: ['json', 'channel'], init: ['name', 'provider', 'account', 'json', 'channel'],
82
+ audio: ['json'], install: ['json', 'channel'], init: ['name', 'provider', 'account', 'json', 'channel'],
82
83
  start: ['json', 'channel'], ui: ['json'], status: ['json'], update: ['check', 'channel', 'json'], updates: ['json'], enable: [], disable: [], rename: ['name', 'json'], console: ['json'], teams: ['json', 'open'], team: ['name', 'team', 'workspace', 'json'], pipelines: ['open', 'json'], providers: ['json'], invite: ['team'], uninstall: [],
83
84
  };
84
- if (!Object.hasOwn(options, command) || Object.keys(values).some(key => !options[command].includes(key)) || positionals.length > (command === 'models' ? 3 : ['invite', 'updates'].includes(command) ? 2 : 1)) throw Error('Invalid command or options. Run aglit --help.');
85
- if (installation.development && !['models','status','init','providers','enable','disable','ui','start'].includes(command)) throw Error('Source profile supports model/setup, access and window commands; installed runtime management is separate');
85
+ if (!Object.hasOwn(options, command) || Object.keys(values).some(key => !options[command].includes(key)) || positionals.length > (command === 'models' ? 3 : ['invite', 'updates', 'audio'].includes(command) ? 2 : 1)) throw Error('Invalid command or options. Run aglit --help.');
86
+ if (installation.development && !['models','audio','status','init','providers','enable','disable','ui','start'].includes(command)) throw Error('Source profile supports model/setup, access and window commands; installed runtime management is separate');
86
87
  if (command === 'updates' && !['on', 'off', 'status'].includes(email)) throw Error('Use aglit updates on|off|status');
87
88
  if (values.channel !== undefined && !['latest', 'canary', 'embedded'].includes(values.channel)) throw Error('Update channel must be latest, canary or embedded');
88
89
  if (values.team && !/^[A-Za-z0-9._:-]{1,128}$/.test(values.team)) throw Error('Invalid team ID');
@@ -96,6 +97,12 @@ async function main() {
96
97
  if (values.name !== undefined && (!values.name.trim() || values.name.length > 100 || /[\x00-\x1f\x7f-\x9f]/.test(values.name))) throw Error('Computer name must contain 1–100 printable characters');
97
98
  const ui = await createUi(interactive);
98
99
  const installed = () => fs.existsSync(path.join(installation.root, 'installation.json'));
100
+ if (command === 'audio') {
101
+ if (!['status', 'setup'].includes(email)) throw Error('Use aglit audio status|setup');
102
+ const audio = require('../src/mac-audio.cjs');
103
+ ui.result(email === 'setup' ? audio.setup({ interactive }) : audio.status());
104
+ ui.finish('Mac audio'); return;
105
+ }
99
106
  if (command === 'update') {
100
107
  ui.result(await ui.step(values.check ? 'Check npm updates' : 'Update Aglit from npm', () => updates.update({check: Boolean(values.check), channel: values.channel})));
101
108
  ui.finish('Update check complete'); return;
@@ -229,7 +236,17 @@ async function main() {
229
236
  for (const warning of selected.view.warnings || []) ui.info(warning);
230
237
  await ui.step('Save computer settings', () => control('configure', { name,
231
238
  ...(selected.connectionId ? { provider: 'aglit', model_connection_id: selected.connectionId } : values.provider && values.provider !== 'auto' ? { provider: values.provider } : {}) }));
232
- if (process.platform === 'darwin') ui.permissions();
239
+ if (process.platform === 'darwin') {
240
+ try {
241
+ const audio = require('../src/mac-audio.cjs').setup({ interactive });
242
+ if (audio.actionRequired) ui.info(audio.actionRequired);
243
+ if (audio.restartRequired) ui.info('BlackHole is installed. Restart this Mac when convenient to enable the audio cable.');
244
+ if (!interactive) ui.result({ audio });
245
+ } catch (error) {
246
+ ui.info(`${error.message} Run aglit audio setup to retry.`);
247
+ }
248
+ ui.permissions();
249
+ }
233
250
  const permissions = await ui.step('Waiting for screen recording and input permissions', () => control('permissions'));
234
251
  if (!interactive) ui.result(permissions);
235
252
  if (permissions.permissions?.supported && (permissions.permissions.screenRecording !== 'granted' || permissions.permissions.accessibility !== 'granted'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglit-ai/cli",
3
- "version": "0.1.17075",
3
+ "version": "0.1.17084",
4
4
  "description": "Install and manage Aglit Computer Use",
5
5
  "license": "UNLICENSED",
6
6
  "type": "commonjs",