alineo-cli 0.1.3 → 0.1.5

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.
@@ -1,4 +1,4 @@
1
- import { n as getSessions, t as formatAge } from "./sessions-data-Cm5Fzzmo.mjs";
1
+ import { n as getSessions, t as formatAge } from "./sessions-data-SEZBa4Uk.mjs";
2
2
  //#region src/commands/agents.ts
3
3
  async function agents(opts = {}) {
4
4
  const { tracked, untracked } = await getSessions();
package/dist/index.mjs CHANGED
@@ -94,7 +94,7 @@ const commands = [
94
94
  usage: "alineo agents [--json]",
95
95
  summary: "List running agent sessions"
96
96
  }],
97
- run: async (argv) => (await import("./agents-tlnhpPil.mjs")).agentsCommand.run(argv)
97
+ run: async (argv) => (await import("./agents-CEVMF8rH.mjs")).agentsCommand.run(argv)
98
98
  },
99
99
  {
100
100
  name: "kill",
@@ -152,8 +152,8 @@ function fillDefaults(data) {
152
152
  adapterPath: data.adapterPath ?? "./.alineo/ledger.db",
153
153
  agentsDir: data.agentsDir ?? "./agents",
154
154
  defaults: { resources: {
155
- cpu: data.defaults?.resources?.cpu ?? "1000m",
156
- memory: data.defaults?.resources?.memory ?? "1Gi"
155
+ cpu: data.defaults?.resources.cpu ?? "1000m",
156
+ memory: data.defaults?.resources.memory ?? "1Gi"
157
157
  } }
158
158
  };
159
159
  }
@@ -219,6 +219,16 @@ function serverDataDir() {
219
219
  * support, >=v1.0.21 is recommended for full functionality -- the "v1.1.0+" the warning
220
220
  * message itself suggests does not exist as a published tag. v1.0.22 is the latest.
221
221
  */
222
+ /**
223
+ * `egress.image`/`egress.mode` are configured unconditionally, not opt-in. Per OpenSandbox's
224
+ * own control flow, a configured `egress.image` is inert for any sandbox created without a
225
+ * `networkPolicy` — no sidecar is attached, no behavior changes for anyone not touching
226
+ * `SandboxOptions.networkPolicy`/`credentialProxy`. Without this block, a fresh `alineo init`
227
+ * server rejects any `networkPolicy`/`credentialProxy` request outright with
228
+ * "egress.image must be configured" — this is what closes that gap (see issue #203,
229
+ * plans/credential-injection.md Phase 4). `dns+nft` (rather than `dns`) is required for
230
+ * `credentialProxy`'s Credential Vault to activate at all.
231
+ */
222
232
  function serverConfigContent() {
223
233
  return `[server]
224
234
  host = "0.0.0.0"
@@ -235,6 +245,10 @@ network_mode = "bridge"
235
245
  [store]
236
246
  type = "sqlite"
237
247
  path = "/data/opensandbox.db"
248
+
249
+ [egress]
250
+ image = "opensandbox/egress:v1.1.7"
251
+ mode = "dns+nft"
238
252
  `;
239
253
  }
240
254
  //#endregion
@@ -402,7 +416,7 @@ async function withTelemetry(commandName, argv, run) {
402
416
  errorClass = errorClassOf(err);
403
417
  throw err;
404
418
  } finally {
405
- const { version } = await import("./package-B8OYcRQI.mjs");
419
+ const { version } = await import("./package-TLM-T8RC.mjs");
406
420
  await sendTelemetryEvent({
407
421
  command: commandName,
408
422
  flags,
@@ -427,7 +441,7 @@ async function recordTuiLaunch() {
427
441
  const config = await readTelemetryConfig();
428
442
  if (!config.enabled) return;
429
443
  await maybePrintFirstRunNotice(config);
430
- const { version } = await import("./package-B8OYcRQI.mjs");
444
+ const { version } = await import("./package-TLM-T8RC.mjs");
431
445
  await sendTelemetryEvent({
432
446
  command: "tui",
433
447
  flags: {},
@@ -475,12 +489,12 @@ function printHelp() {
475
489
  async function main() {
476
490
  if (!cmd && process.stdout.isTTY) {
477
491
  await recordTuiLaunch();
478
- const { launchTui } = await import("./tui-Dqsq6mJj.mjs");
492
+ const { launchTui } = await import("./tui-BHpM7gtx.mjs");
479
493
  await launchTui();
480
494
  return;
481
495
  }
482
496
  if (cmd === "--version" || cmd === "-v" || cmd === "version") {
483
- const { version } = await import("./package-B8OYcRQI.mjs");
497
+ const { version } = await import("./package-TLM-T8RC.mjs");
484
498
  console.log(version);
485
499
  return;
486
500
  }
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.1.3";
2
+ var version = "0.1.5";
3
3
  //#endregion
4
4
  export { version };
@@ -34,11 +34,16 @@ async function getSessions(config) {
34
34
  const raw = await control.listSandboxes({ state: SandboxState.Running });
35
35
  liveIds = new Set(raw.map((s) => s.id));
36
36
  } catch {}
37
- const tracked = liveIds ? ledgerRunning.filter((s) => liveIds.has(s.sandboxId)) : ledgerRunning;
37
+ let tracked = ledgerRunning;
38
+ if (liveIds) {
39
+ const ids = liveIds;
40
+ tracked = ledgerRunning.filter((s) => ids.has(s.sandboxId));
41
+ }
38
42
  const trackedIds = new Set(tracked.map((s) => s.sandboxId));
43
+ const untracked = liveIds ? [...liveIds].filter((id) => !trackedIds.has(id)) : [];
39
44
  return {
40
45
  tracked,
41
- untracked: liveIds ? [...liveIds].filter((id) => !trackedIds.has(id)) : []
46
+ untracked
42
47
  };
43
48
  }
44
49
  function formatAge(startedAt) {
@@ -1,5 +1,5 @@
1
1
  import { a as readConfig } from "./index.mjs";
2
- import { n as getSessions, t as formatAge } from "./sessions-data-Cm5Fzzmo.mjs";
2
+ import { n as getSessions, t as formatAge } from "./sessions-data-SEZBa4Uk.mjs";
3
3
  import { join } from "path";
4
4
  import { existsSync, readdirSync } from "fs";
5
5
  import { Alineo } from "alineo";
@@ -157,7 +157,20 @@ function createChatView(renderer, agent, onBack) {
157
157
  case "extension_error":
158
158
  appendLine(`[extension error] ${ev.extensionPath}: ${ev.error}`);
159
159
  break;
160
- default: break;
160
+ case "agent_start":
161
+ case "agent_end":
162
+ case "tool_update":
163
+ case "compaction_start":
164
+ case "compaction_end":
165
+ case "auto_retry_start":
166
+ case "auto_retry_end":
167
+ case "message_start":
168
+ case "message_update":
169
+ case "message_end":
170
+ case "turn_start":
171
+ case "turn_end":
172
+ case "extension_ui":
173
+ case "queue_update": break;
161
174
  }
162
175
  } catch (err) {
163
176
  appendLine(`[error] ${err instanceof Error ? err.message : String(err)}`);
@@ -395,12 +408,18 @@ async function launchTui() {
395
408
  process.exit(0);
396
409
  }
397
410
  function showDashboard(initialStatus) {
398
- const view = createDashboardView(renderer, (session) => void openSession(session), quit, showNewSession, (session) => mount(createLogsView(renderer, session, () => showDashboard())));
411
+ const view = createDashboardView(renderer, (session) => void openSession(session), quit, showNewSession, (session) => {
412
+ mount(createLogsView(renderer, session, () => {
413
+ showDashboard();
414
+ }));
415
+ });
399
416
  mount(view);
400
417
  if (initialStatus) view.setStatus(initialStatus);
401
418
  }
402
419
  function showNewSession() {
403
- mount(createNewSessionView(renderer, (specPath) => void launchNewAgent(specPath), () => showDashboard()));
420
+ mount(createNewSessionView(renderer, (specPath) => void launchNewAgent(specPath), () => {
421
+ showDashboard();
422
+ }));
404
423
  }
405
424
  async function openSession(session) {
406
425
  const config = await readConfig();
@@ -409,7 +428,9 @@ async function launchTui() {
409
428
  mount(createChatView(renderer, await Alineo.resume(session.sandboxId, {
410
429
  adapter,
411
430
  specPath: `${config.agentsDir}/${session.name}.json`
412
- }), () => showDashboard()));
431
+ }), () => {
432
+ showDashboard();
433
+ }));
413
434
  } catch (err) {
414
435
  showDashboard(`failed to open '${session.name}': ${err instanceof Error ? err.message : String(err)}`);
415
436
  }
@@ -418,7 +439,9 @@ async function launchTui() {
418
439
  const adapter = new SQLiteAdapter((await readConfig()).adapterPath);
419
440
  try {
420
441
  const spec = await Bun.file(specPath).json();
421
- mount(createChatView(renderer, await Alineo.load(spec, { adapter }), () => showDashboard()));
442
+ mount(createChatView(renderer, await Alineo.load(spec, { adapter }), () => {
443
+ showDashboard();
444
+ }));
422
445
  } catch (err) {
423
446
  showDashboard(`failed to start '${specPath}': ${err instanceof Error ? err.message : String(err)}`);
424
447
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alineo-cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,11 +29,11 @@
29
29
  "test": "bun test"
30
30
  },
31
31
  "dependencies": {
32
- "@alineo-labs/opensandbox": "0.1.0",
33
- "@alineo-labs/sandbox": "0.2.0",
34
- "@alineo-labs/sqlite": "0.1.3",
32
+ "@alineo-labs/opensandbox": "0.3.0",
33
+ "@alineo-labs/sandbox": "0.4.0",
34
+ "@alineo-labs/sqlite": "0.2.1",
35
35
  "@opentui/core": "^0.4.3",
36
- "alineo": "0.2.0"
36
+ "alineo": "0.4.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@earendil-works/pi-coding-agent": "^0.80.3",
@@ -153,12 +153,12 @@ async function ensureAlineoReady(pi: ExtensionAPI, ctx: ExtensionContext): Promi
153
153
  bootstrapped = true;
154
154
 
155
155
  const check = await execOk(pi, "alineo", ["--version"]);
156
- if (!check || check.code !== 0) {
156
+ if (check?.code !== 0) {
157
157
  ctx.ui.notify("Installing alineo...", "info");
158
158
  const install = await execOk(pi, "npm", ["install", "-g", "alineo-cli"]);
159
- if (!install || install.code !== 0) {
159
+ if (install?.code !== 0) {
160
160
  ctx.ui.notify(
161
- `Failed to install alineo: ${install?.stderr || "npm not available"}. ` +
161
+ `Failed to install alineo: ${install?.stderr ?? "npm not available"}. ` +
162
162
  `RLM flows won't work until this is resolved — install manually with "npm install -g alineo-cli".`,
163
163
  "error",
164
164
  );
@@ -168,9 +168,9 @@ async function ensureAlineoReady(pi: ExtensionAPI, ctx: ExtensionContext): Promi
168
168
  }
169
169
 
170
170
  const init = await execOk(pi, "alineo", ["init"]);
171
- if (!init || init.code !== 0) {
171
+ if (init?.code !== 0) {
172
172
  ctx.ui.notify(
173
- `"alineo init" failed: ${init?.stderr || "unknown error"}. ` +
173
+ `"alineo init" failed: ${init?.stderr ?? "unknown error"}. ` +
174
174
  `RLM flows won't work until OpenSandbox is reachable — see "alineo init" for manual setup.`,
175
175
  "warning",
176
176
  );