@aglit-ai/cli 0.1.7 → 0.1.9

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
@@ -56,6 +56,15 @@ the user. On macOS, Screen Recording and Accessibility must be granted before
56
56
  quit while the application shell stays hidden. Login-item registration starts
57
57
  the same private profile on the next user login.
58
58
 
59
+ Setup requests native screen-capture and Accessibility consent one at a time,
60
+ waiting up to 110 seconds for each grant before continuing. If macOS previously
61
+ denied access, enable the application in the opened System Settings pane. An
62
+ unapproved permission stops setup with remote access disabled; rerun `aglit init`
63
+ to resume. macOS may require an application restart after a screen-capture grant.
64
+ Successful registration prints the direct employee link at
65
+ `https://console.aglit.ai/employees/<device-id>` and includes it as `employeeUrl`
66
+ in JSON output.
67
+
59
68
  `--team` selects the existing backend team/invitation scope. It does not grant team
60
69
  members access to a separately registered personal computer. The backend requires
61
70
  current accepted membership/admin authority for its operations; a pending
@@ -115,3 +124,5 @@ A separate Computer Use port range requires registering
115
124
  Google currently rejects this proposed callback with `redirect_uri_mismatch`.
116
125
  No port change has shipped; provider registration and native acceptance remain
117
126
  required before qualifying coexistence.
127
+
128
+ Anywhere Access requires a two-factor security code by default; an explicit off preference is preserved. In CLI headless mode, incoming connection requests display the code in a native window without opening the full app. This requires a logged-in graphical desktop session; an SSH-only/server environment cannot display the prompt. Codes are not printed to the terminal.
package/bin/aglit.cjs CHANGED
@@ -202,7 +202,8 @@ async function main() {
202
202
  if (!provider || !available.includes(provider)) throw Error('Sign in to Codex or Claude on this computer, then rerun aglit init --provider codex|claude.');
203
203
  ui.info(`AI provider: ${provider}`);
204
204
  await ui.step('Save computer settings', () => control('configure', { name, provider, ...(teamId ? { teamId } : {}) }));
205
- const permissions = await ui.step('Check screen recording and input permissions', () => control('permissions'));
205
+ if (process.platform === 'darwin') ui.info('Approve the macOS screen recording and input-control requests. Setup waits for each permission before continuing. Previously denied permissions must be enabled in System Settings.');
206
+ const permissions = await ui.step('Waiting for screen recording and input permissions', () => control('permissions'));
206
207
  if (!interactive) ui.result(permissions);
207
208
  if (permissions.permissions?.supported && (permissions.permissions.screenRecording !== 'granted' || permissions.permissions.accessibility !== 'granted'))
208
209
  throw Error('Grant Screen Recording and Accessibility in System Settings, then rerun aglit init. Anywhere Access has not been enabled.');
@@ -218,7 +219,9 @@ async function main() {
218
219
  });
219
220
  if (values.invite) ui.result(await control('invite', { teamId: values.team, email: values.invite }));
220
221
  updates.rememberStatus(state);
221
- ui.result(state); ui.finish('Computer ready · https://console.aglit.ai/'); return;
222
+ if (typeof state.deviceId !== 'string' || !state.deviceId) throw Error('Registration returned no device ID. Check aglit status before retrying.');
223
+ state = { ...state, employeeUrl: `https://console.aglit.ai/employees/${encodeURIComponent(state.deviceId)}` };
224
+ ui.result(state); ui.finish(`Computer ready · ${state.employeeUrl}`); return;
222
225
  }
223
226
  if (command === 'invite') { ui.result(await control('invite', { teamId: values.team, email })); ui.finish('Invitation sent'); return; }
224
227
  if (command === 'uninstall') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglit-ai/cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Install and manage Aglit Computer Use",
5
5
  "license": "UNLICENSED",
6
6
  "type": "commonjs",
@@ -205,6 +205,18 @@ function start() {
205
205
  // Do not let an operator's guest/development environment adopt another identity.
206
206
  for (const key of Object.keys(env)) if (key.startsWith('AGLIT_') || key.startsWith('VITE_') || ['NODE_ENV', 'ELECTRON_RUN_AS_NODE', 'SERVER_PORT', 'ELECTRON_BRIDGE_PORT'].includes(key)) delete env[key];
207
207
  Object.assign(env, { AGLIT_USER_DATA_PATH: profile, AGLIT_ELECTRON_USER_DATA_PATH: profile });
208
+ if (process.platform === 'darwin') {
209
+ // Launch Services makes the signed app responsible for its own TCC grants.
210
+ // Direct spawn from SSH/Terminal attributes screen/input access to the caller.
211
+ const bundle = path.dirname(path.dirname(path.dirname(installed.executable)));
212
+ if (!bundle.endsWith('.app')) { fs.closeSync(log); throw Error('Installed macOS application bundle required'); }
213
+ fs.closeSync(log);
214
+ run('/usr/bin/open', ['-n', '-g', '-a', bundle,
215
+ '--env', 'AGLIT_USER_DATA_PATH=' + profile, '--env', 'AGLIT_ELECTRON_USER_DATA_PATH=' + profile,
216
+ '--stdout', path.join(root, 'runtime.log'), '--stderr', path.join(root, 'runtime.log'),
217
+ '--args', '--computer-use'], { env });
218
+ return { launched: true };
219
+ }
208
220
  const child = spawn(installed.executable, ['--computer-use'], { detached: true, windowsHide: true, stdio: ['ignore', log, log], env });
209
221
  child.on('error', error => { process.stderr.write(`Computer Use failed to start: ${error.message}\n`); });
210
222
  child.unref(); fs.closeSync(log);