@aglit-ai/cli 0.1.4 → 0.1.6

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/bin/aglit.cjs CHANGED
@@ -196,9 +196,11 @@ async function main() {
196
196
  const detected = await ui.step('Find signed-in AI providers', () => control('providers'));
197
197
  const available = detected.providers.filter(provider => provider.authenticated).map(provider => provider.provider);
198
198
  let provider = values.provider && values.provider !== 'auto' ? values.provider :
199
- available.includes(detected.preferred) ? detected.preferred : available.length === 1 ? available[0] : null;
199
+ available.includes(detected.preferred) ? detected.preferred : values.provider === 'auto' ?
200
+ ['codex', 'claude'].find(candidate => available.includes(candidate)) : available.length === 1 ? available[0] : null;
200
201
  if (!provider && available.length && interactive) provider = await ui.provider(available, detected.preferred);
201
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
+ ui.info(`AI provider: ${provider}`);
202
204
  await ui.step('Save computer settings', () => control('configure', { name, provider, ...(teamId ? { teamId } : {}) }));
203
205
  const permissions = await ui.step('Check screen recording and input permissions', () => control('permissions'));
204
206
  if (!interactive) ui.result(permissions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglit-ai/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Install and manage Aglit Computer Use",
5
5
  "license": "UNLICENSED",
6
6
  "type": "commonjs",
package/src/updates.cjs CHANGED
@@ -228,7 +228,12 @@ function validateInstalledGraph(directory, manifests) {
228
228
  }
229
229
  return true;
230
230
  }
231
- async function bootstrap(channel) { const selected = channel || state().channel; need(channels.includes(selected), 'Invalid update channel'); return {...await stage(await manifest('@aglit-ai/cli', selected), os.tmpdir()), channel: selected}; }
231
+ async function bootstrap(channel) {
232
+ const selected = channel || state().channel;
233
+ need(channels.includes(selected), 'Invalid update channel');
234
+ const offered = await offers(selected);
235
+ return {...await stage(offered.cli, fs.realpathSync(os.tmpdir()), offered.runtime), channel: selected};
236
+ }
232
237
  function adoptBootstrap(value) {
233
238
  const parent = path.join(installation.root, 'cli'); fs.mkdirSync(parent, {recursive: true, mode: 0o700});
234
239
  const target = path.join(parent, value.cli.version + '-' + crypto.randomUUID());
@@ -267,7 +272,7 @@ function runtimeStopped(installed) {
267
272
  const output = execFileSync('/bin/ps', ['-axo', 'pid=,uid=,comm='], {encoding: 'utf8', timeout: 15000, maxBuffer: 8 * 1024 ** 2});
268
273
  const lines = output.trim().split('\n'); need(lines.length > 1, 'Native process inventory unavailable');
269
274
  return !lines.some(line => {
270
- const found = /^\s*(\d+)\s+(\d+)\s+(.+)$/.exec(line); need(found, 'Native process inventory is incomplete');
275
+ const found = /^\s*(\d+)\s+(-?\d+)\s+(.+)$/.exec(line); need(found, 'Native process inventory is incomplete');
271
276
  return found[3].trim() === installed.executable;
272
277
  });
273
278
  }