@aglit-ai/cli 0.1.17081 → 0.1.17089

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/README.md CHANGED
@@ -19,8 +19,10 @@ aglit uninstall
19
19
  Run `aglit` in an interactive terminal to open the guided setup. `aglit init`
20
20
  also runs this flow and installs the signed runtime if it is missing. Setup asks
21
21
  for a computer name and AI provider, then enables Anywhere Access. It runs in
22
- the background without a window-mode prompt. After setup, `aglit ui`
23
- opens the Desktop window using the same app and profile. `aglit start` hides its window without disabling its connection.
22
+ the background during setup, then opens the Desktop window when setup succeeds.
23
+ `aglit start` and `aglit ui` open the window using the same app and profile.
24
+ Use `aglit init --headless` or `aglit start --headless` to keep the window hidden
25
+ without disabling its connection. `aglit --help` (or `aglit -h`) lists commands.
24
26
 
25
27
  Setup opens Aglit's Google login in the browser,
26
28
  detects existing Codex/Claude logins, and uses a configured authenticated provider
@@ -137,3 +139,18 @@ changes a disabled extension setting or browser policy. Installation detection i
137
139
  separate from browser-control connectivity.
138
140
 
139
141
  This release supports Apple Silicon Macs. Windows publication is deferred until its signed native runtime is available.
142
+
143
+ On macOS, interactive `aglit init` also checks for the BlackHole 2ch audio cable
144
+ and installs the official Homebrew cask when it is missing. Rerun `aglit init` to resume setup. Administrator
145
+ approval happens in your terminal. Unattended setup reports the required action
146
+ without waiting for a password. Audio setup preserves existing BlackHole variants,
147
+ default audio devices and active CoreAudio sessions; restart macOS when the
148
+ installer requires it. In the remote app, select BlackHole 2ch as the microphone
149
+ for forwarded microphone audio. Browser speaker playback still requires a click
150
+ when autoplay is blocked.
151
+
152
+ When settings already exist, interactive `aglit init` shows the saved computer name,
153
+ account and provider and offers to reuse them. Choosing reuse preserves the saved
154
+ model connection without repeating discovery or selection. Explicit `--name` and
155
+ `--provider` options override the corresponding saved values. Unattended init reuses
156
+ saved settings by default. Permission and connection checks still run.
package/bin/aglit.cjs CHANGED
@@ -219,17 +219,29 @@ async function main() {
219
219
  }
220
220
  if (values.account && state.email?.toLowerCase() !== values.account.toLowerCase())
221
221
  throw Error(`Signed in as ${state.email}; expected ${values.account}. Switch the browser sign-in account and rerun aglit init.`);
222
- if (interactive && !values.account && !await ui.confirmAccount(state.email))
222
+ const reuseSavedSetup = Boolean(state.name) && (!interactive || await ui.reuseSetup(state));
223
+ if (interactive && !reuseSavedSetup && !values.account && !await ui.confirmAccount(state.email))
223
224
  throw Object.assign(Error('Setup cancelled before enabling remote access.'), { cancelled: true });
224
225
  ui.info(`Signed in as ${state.email}`);
225
- if (!values.name && interactive) name = await ui.name(state.name || os.hostname());
226
+ if (!values.name && interactive && !reuseSavedSetup) name = await ui.name(state.name || os.hostname());
226
227
  name ||= state.name;
227
228
  if (!name) throw Error('Provide --name for unattended setup');
228
- const selected = await require('../src/model-connections.cjs').chooseModelConnection(control, { provider: values.provider, question: modelQuestion });
229
- for (const warning of selected.view.warnings || []) ui.info(warning);
229
+ const selected = reuseSavedSetup && !values.provider ? null :
230
+ await require('../src/model-connections.cjs').chooseModelConnection(control, { provider: values.provider, question: modelQuestion });
231
+ for (const warning of selected?.view.warnings || []) ui.info(warning);
230
232
  await ui.step('Save computer settings', () => control('configure', { name,
231
- ...(selected.connectionId ? { provider: 'aglit', model_connection_id: selected.connectionId } : values.provider && values.provider !== 'auto' ? { provider: values.provider } : {}) }));
232
- if (process.platform === 'darwin') ui.permissions();
233
+ ...(selected?.connectionId ? { provider: 'aglit', model_connection_id: selected.connectionId } : values.provider && values.provider !== 'auto' ? { provider: values.provider } : {}) }));
234
+ if (process.platform === 'darwin') {
235
+ try {
236
+ const audio = require('../src/mac-audio.cjs').setup({ interactive });
237
+ if (audio.actionRequired) ui.info(audio.actionRequired);
238
+ if (audio.restartRequired) ui.info('BlackHole is installed. Restart this Mac when convenient to enable the audio cable.');
239
+ if (!interactive) ui.result({ audio });
240
+ } catch (error) {
241
+ ui.info(`${error.message} Rerun aglit init to retry audio setup.`);
242
+ }
243
+ ui.permissions();
244
+ }
233
245
  const permissions = await ui.step('Waiting for screen recording and input permissions', () => control('permissions'));
234
246
  if (!interactive) ui.result(permissions);
235
247
  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.17081",
3
+ "version": "0.1.17089",
4
4
  "description": "Install and manage Aglit Computer Use",
5
5
  "license": "UNLICENSED",
6
6
  "type": "commonjs",
package/src/ui.cjs CHANGED
@@ -43,6 +43,11 @@ async function createUi(interactive) {
43
43
  p.note((value.devices.length ? value.devices.map(device => `${clean(device.name)}${device.platform ? ' · ' + clean(device.platform) : ''}`).join('\n') + '\n\n' : 'No authorized pipeline devices.\n\n') +
44
44
  'https://pipelines.aglit.ai/\nOpen the encrypted viewer with aglit pipelines --open.', 'Pipeline devices');
45
45
  },
46
+ reuseSetup: state => {
47
+ p.note([`Computer ${clean(state.name)}`, `Account ${clean(state.email)}`,
48
+ state.provider && `Provider ${clean(state.provider)}`].filter(Boolean).join('\n'), 'Saved setup');
49
+ return answer(p.confirm({ message: 'Reuse these settings?', initialValue: true }));
50
+ },
46
51
  confirmAccount: email => answer(p.confirm({ message: `Register with ${clean(email)}?`, initialValue: true })),
47
52
  async step(label, action) {
48
53
  const spinner = p.spinner(); spinner.start(label);