@eve-horizon/cli 0.2.34 → 0.2.35

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 (2) hide show
  1. package/dist/index.js +139 -66
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9811,8 +9811,8 @@ var require_sync = __commonJS({
9811
9811
  }
9812
9812
  return x;
9813
9813
  };
9814
- var defaultReadPackageSync = function defaultReadPackageSync2(readFileSync23, pkgfile) {
9815
- var body = readFileSync23(pkgfile);
9814
+ var defaultReadPackageSync = function defaultReadPackageSync2(readFileSync24, pkgfile) {
9815
+ var body = readFileSync24(pkgfile);
9816
9816
  try {
9817
9817
  var pkg = JSON.parse(body);
9818
9818
  return pkg;
@@ -9832,7 +9832,7 @@ var require_sync = __commonJS({
9832
9832
  }
9833
9833
  var opts = normalizeOptions(x, options);
9834
9834
  var isFile = opts.isFile || defaultIsFile;
9835
- var readFileSync23 = opts.readFileSync || fs5.readFileSync;
9835
+ var readFileSync24 = opts.readFileSync || fs5.readFileSync;
9836
9836
  var isDirectory = opts.isDirectory || defaultIsDir;
9837
9837
  var realpathSync = opts.realpathSync || defaultRealpathSync;
9838
9838
  var readPackageSync = opts.readPackageSync || defaultReadPackageSync;
@@ -9889,7 +9889,7 @@ var require_sync = __commonJS({
9889
9889
  if (!isFile(pkgfile)) {
9890
9890
  return loadpkg(path7.dirname(dir));
9891
9891
  }
9892
- var pkg = readPackageSync(readFileSync23, pkgfile);
9892
+ var pkg = readPackageSync(readFileSync24, pkgfile);
9893
9893
  if (pkg && opts.packageFilter) {
9894
9894
  pkg = opts.packageFilter(
9895
9895
  pkg,
@@ -9903,7 +9903,7 @@ var require_sync = __commonJS({
9903
9903
  var pkgfile = path7.join(maybeRealpathSync(realpathSync, x2, opts), "/package.json");
9904
9904
  if (isFile(pkgfile)) {
9905
9905
  try {
9906
- var pkg = readPackageSync(readFileSync23, pkgfile);
9906
+ var pkg = readPackageSync(readFileSync24, pkgfile);
9907
9907
  } catch (e) {
9908
9908
  }
9909
9909
  if (pkg && opts.packageFilter) {
@@ -49514,7 +49514,7 @@ and switching profiles won't affect other checkouts.`,
49514
49514
  auth: {
49515
49515
  description: `Authenticate with Eve Horizon. Auth is optional for local development but required
49516
49516
  for cloud deployments. Credentials are stored globally per API URL.`,
49517
- usage: "eve auth <login|logout|status|whoami|bootstrap|sync|creds|token|mint|permissions>",
49517
+ usage: "eve auth <login|logout|status|whoami|bootstrap|sync|creds|token|mint|permissions|request-access>",
49518
49518
  subcommands: {
49519
49519
  login: {
49520
49520
  description: "Login via GitHub SSH challenge (default) or Supabase (legacy)",
@@ -49642,6 +49642,24 @@ for cloud deployments. Credentials are stored globally per API URL.`,
49642
49642
  "eve auth permissions",
49643
49643
  "eve auth permissions --json"
49644
49644
  ]
49645
+ },
49646
+ "request-access": {
49647
+ description: "Self-service access request \u2014 submit your SSH key and wait for admin approval",
49648
+ usage: 'eve auth request-access --org "<org name>" [--ssh-key <path>] [--email <email>] [--wait]',
49649
+ options: [
49650
+ "--org <name> Organization to request access to (required)",
49651
+ "--org-slug <slug> Preferred org slug",
49652
+ "--ssh-key <path> Path to SSH public key (default: ~/.ssh/id_ed25519.pub)",
49653
+ "--email <email> Contact email",
49654
+ "--nostr-pubkey <hex> Nostr public key (alternative to SSH)",
49655
+ "--wait Poll until approved, then auto-login",
49656
+ "--status <id> Check status of an existing request"
49657
+ ],
49658
+ examples: [
49659
+ 'eve auth request-access --org "Acme Corp" --ssh-key ~/.ssh/id_ed25519.pub --wait',
49660
+ 'eve auth request-access --org "Acme Corp" --email user@example.com --wait',
49661
+ "eve auth request-access --status <request_id>"
49662
+ ]
49645
49663
  }
49646
49664
  }
49647
49665
  },
@@ -50293,17 +50311,40 @@ for cloud deployments. Credentials are stored globally per API URL.`,
50293
50311
  usage: "eve admin <subcommand> [options]",
50294
50312
  subcommands: {
50295
50313
  invite: {
50296
- description: "Invite a user by registering their GitHub SSH keys and adding them to an org",
50297
- usage: "eve admin invite --email <email> [--github <username>] [--role <role>] [--org <org_id>]",
50314
+ description: "Invite a user by registering their SSH keys (from GitHub or a local file) and adding them to an org",
50315
+ usage: "eve admin invite --email <email> [--github <username>] [--ssh-key <path>] [--role <role>] [--org <org_id>] [--web] [--redirect-to <url>]",
50298
50316
  options: [
50299
50317
  "--email <email> User email address (required)",
50300
50318
  "--github <username> GitHub username to fetch SSH keys from",
50319
+ "--ssh-key <path> Path to an SSH public key file to register",
50301
50320
  "--role <role> Org role: owner, admin, member (default: member)",
50302
- "--org <org_id> Organization to add user to"
50321
+ "--org <org_id> Organization to add user to",
50322
+ "--web Send a Supabase Auth invite email",
50323
+ "--redirect-to <url> Redirect URL after web login",
50324
+ "",
50325
+ "At least one auth method (--github, --ssh-key, or --web) is recommended.",
50326
+ 'Users can also self-register: eve auth request-access --org "Org" --ssh-key ~/.ssh/id_ed25519.pub --wait'
50303
50327
  ],
50304
50328
  examples: [
50305
50329
  "eve admin invite --email user@example.com --github octocat",
50306
- "eve admin invite --email user@example.com --github octocat --role admin --org org_xxx"
50330
+ "eve admin invite --email user@example.com --ssh-key ~/.ssh/id_ed25519.pub --org org_xxx",
50331
+ "eve admin invite --email user@example.com --github octocat --role admin --org org_xxx",
50332
+ "eve admin invite --email user@example.com --web --redirect-to https://app.example.com"
50333
+ ]
50334
+ },
50335
+ "access-requests": {
50336
+ description: "Review, approve, or reject self-service access requests",
50337
+ usage: 'eve admin access-requests [approve|reject <id>] [--reason "..."]',
50338
+ options: [
50339
+ "(no action) List pending access requests",
50340
+ "approve <id> Approve a request (creates user, org membership, and identity)",
50341
+ "reject <id> Reject a request",
50342
+ '--reason "<text>" Note to attach to approval/rejection'
50343
+ ],
50344
+ examples: [
50345
+ "eve admin access-requests",
50346
+ "eve admin access-requests approve ar_xxx",
50347
+ 'eve admin access-requests reject ar_xxx --reason "Unknown user"'
50307
50348
  ]
50308
50349
  },
50309
50350
  "ingress-aliases": {
@@ -50321,7 +50362,9 @@ for cloud deployments. Credentials are stored globally per API URL.`,
50321
50362
  },
50322
50363
  examples: [
50323
50364
  "eve admin invite --email user@example.com --github octocat",
50324
- "eve admin invite --email user@example.com --github octocat --org org_xxx",
50365
+ "eve admin invite --email user@example.com --ssh-key ~/.ssh/id_ed25519.pub --org org_xxx",
50366
+ "eve admin access-requests",
50367
+ "eve admin access-requests approve ar_xxx",
50325
50368
  "eve admin ingress-aliases list"
50326
50369
  ]
50327
50370
  },
@@ -65513,7 +65556,10 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
65513
65556
  const requestData = submitResponse.data;
65514
65557
  if (!wait) {
65515
65558
  outputJson(requestData, json, `Access request submitted: ${requestData.id} (status: ${requestData.status})
65516
- Poll with: eve auth request-access --status ${requestData.id}`);
65559
+ Poll with: eve auth request-access --status ${requestData.id}
65560
+
65561
+ Tip: Use --wait to auto-poll and login on approval:
65562
+ eve auth request-access --org "${orgName}" --wait`);
65517
65563
  return;
65518
65564
  }
65519
65565
  console.log(`Access request submitted: ${requestData.id}`);
@@ -72857,18 +72903,20 @@ function findSkillDirs(rootDir, opts) {
72857
72903
  }
72858
72904
 
72859
72905
  // src/commands/admin.ts
72906
+ var import_node_fs10 = require("node:fs");
72860
72907
  async function handleAdmin(subcommand, positionals, flags, context2) {
72861
72908
  const json = Boolean(flags.json);
72862
72909
  switch (subcommand) {
72863
72910
  case "invite": {
72864
72911
  const githubUsername = getStringFlag(flags, ["github"]);
72912
+ const sshKeyPath = getStringFlag(flags, ["ssh-key"]);
72865
72913
  const email = getStringFlag(flags, ["email"]);
72866
72914
  const role = getStringFlag(flags, ["role"]) ?? "member";
72867
72915
  const orgId = getStringFlag(flags, ["org"]) ?? context2.orgId;
72868
72916
  const web = getBooleanFlag(flags, ["web"]) ?? false;
72869
72917
  const redirectTo = getStringFlag(flags, ["redirect-to"]);
72870
72918
  if (!email) {
72871
- throw new Error("Usage: eve admin invite --email <email> [--github <username>] [--role <role>] [--org <org_id>] [--web] [--redirect-to <url>]");
72919
+ throw new Error("Usage: eve admin invite --email <email> [--github <username>] [--ssh-key <path>] [--role <role>] [--org <org_id>] [--web] [--redirect-to <url>]");
72872
72920
  }
72873
72921
  if (!["owner", "admin", "member"].includes(role)) {
72874
72922
  throw new Error(`Invalid role: ${role}. Must be one of: owner, admin, member`);
@@ -72908,6 +72956,29 @@ async function handleAdmin(subcommand, positionals, flags, context2) {
72908
72956
  results.keys_registered += 1;
72909
72957
  }
72910
72958
  }
72959
+ if (sshKeyPath) {
72960
+ if (!(0, import_node_fs10.existsSync)(sshKeyPath)) {
72961
+ throw new Error(`SSH public key not found: ${sshKeyPath}`);
72962
+ }
72963
+ const publicKey = (0, import_node_fs10.readFileSync)(sshKeyPath, "utf8").trim();
72964
+ if (!publicKey.startsWith("ssh-")) {
72965
+ throw new Error(`File does not look like an SSH public key: ${sshKeyPath}`);
72966
+ }
72967
+ const identity = await requestJson(context2, "/auth/identities", {
72968
+ method: "POST",
72969
+ body: {
72970
+ email,
72971
+ public_key: publicKey,
72972
+ label: `ssh-key`
72973
+ }
72974
+ });
72975
+ results.identities.push(identity);
72976
+ results.keys_registered += 1;
72977
+ }
72978
+ if (!githubUsername && !sshKeyPath && !web) {
72979
+ console.warn("Warning: No auth method specified (--github, --ssh-key, or --web). User won't be able to log in.");
72980
+ console.warn('Tip: The user can self-register via: eve auth request-access --org "<org>" --ssh-key ~/.ssh/id_ed25519.pub --wait');
72981
+ }
72911
72982
  if (web) {
72912
72983
  const body = { email };
72913
72984
  if (redirectTo) {
@@ -73314,6 +73385,8 @@ ${rows.length} alias(es)`);
73314
73385
  }
73315
73386
  console.log(`Approve: eve admin access-requests approve <id>`);
73316
73387
  console.log(`Reject: eve admin access-requests reject <id> --reason "..."`);
73388
+ console.log("");
73389
+ console.log(`Tip: Users can self-register with: eve auth request-access --org "Org Name" --ssh-key ~/.ssh/id_ed25519.pub --wait`);
73317
73390
  return;
73318
73391
  }
73319
73392
  }
@@ -73374,11 +73447,11 @@ async function fetchGitHubKeys2(username) {
73374
73447
 
73375
73448
  // src/commands/agents.ts
73376
73449
  var import_node_child_process8 = require("node:child_process");
73377
- var import_node_fs10 = require("node:fs");
73450
+ var import_node_fs11 = require("node:fs");
73378
73451
  var import_node_path11 = require("node:path");
73379
73452
  var import_yaml3 = require("yaml");
73380
73453
  function readYamlFile(filePath) {
73381
- const raw = (0, import_node_fs10.readFileSync)(filePath, "utf-8");
73454
+ const raw = (0, import_node_fs11.readFileSync)(filePath, "utf-8");
73382
73455
  const parsed = (0, import_yaml3.parse)(raw);
73383
73456
  if (!parsed || typeof parsed !== "object") {
73384
73457
  throw new Error(`Invalid YAML in ${filePath}`);
@@ -73402,7 +73475,7 @@ function pickString(value) {
73402
73475
  return typeof value === "string" && value.trim().length > 0 ? value : void 0;
73403
73476
  }
73404
73477
  function ensureFileExists(path7, label) {
73405
- if (!(0, import_node_fs10.existsSync)(path7)) {
73478
+ if (!(0, import_node_fs11.existsSync)(path7)) {
73406
73479
  throw new Error(`Missing ${label} at ${path7}. Update manifest config_path or add the file.`);
73407
73480
  }
73408
73481
  return path7;
@@ -73419,7 +73492,7 @@ function isLocalApiUrl(apiUrl) {
73419
73492
  function loadAgentsConfig(repoRoot) {
73420
73493
  const eveDir = (0, import_node_path11.join)(repoRoot, ".eve");
73421
73494
  const manifestPath = (0, import_node_path11.join)(eveDir, "manifest.yaml");
73422
- if ((0, import_node_fs10.existsSync)(manifestPath)) {
73495
+ if ((0, import_node_fs11.existsSync)(manifestPath)) {
73423
73496
  const manifest = readYamlFile(manifestPath);
73424
73497
  const xEve = manifest["x-eve"] || manifest["x_eve"] || {};
73425
73498
  const policy = xEve["agents"] || null;
@@ -73469,16 +73542,16 @@ async function resolvePacksAndMerge(repoRoot, manifest, projectSlug) {
73469
73542
  }
73470
73543
  }
73471
73544
  const configPaths = resolveAgentsConfigPaths(repoRoot, manifest);
73472
- if ((0, import_node_fs10.existsSync)(configPaths.agentsPath)) {
73473
- const projectAgents = (0, import_yaml3.parse)((0, import_node_fs10.readFileSync)(configPaths.agentsPath, "utf-8")) ?? {};
73545
+ if ((0, import_node_fs11.existsSync)(configPaths.agentsPath)) {
73546
+ const projectAgents = (0, import_yaml3.parse)((0, import_node_fs11.readFileSync)(configPaths.agentsPath, "utf-8")) ?? {};
73474
73547
  mergedAgents = mergeMapConfig(mergedAgents, projectAgents);
73475
73548
  }
73476
- if ((0, import_node_fs10.existsSync)(configPaths.teamsPath)) {
73477
- const projectTeams = (0, import_yaml3.parse)((0, import_node_fs10.readFileSync)(configPaths.teamsPath, "utf-8")) ?? {};
73549
+ if ((0, import_node_fs11.existsSync)(configPaths.teamsPath)) {
73550
+ const projectTeams = (0, import_yaml3.parse)((0, import_node_fs11.readFileSync)(configPaths.teamsPath, "utf-8")) ?? {};
73478
73551
  mergedTeams = mergeMapConfig(mergedTeams, projectTeams);
73479
73552
  }
73480
- if ((0, import_node_fs10.existsSync)(configPaths.chatPath)) {
73481
- const projectChat = (0, import_yaml3.parse)((0, import_node_fs10.readFileSync)(configPaths.chatPath, "utf-8")) ?? {};
73553
+ if ((0, import_node_fs11.existsSync)(configPaths.chatPath)) {
73554
+ const projectChat = (0, import_yaml3.parse)((0, import_node_fs11.readFileSync)(configPaths.chatPath, "utf-8")) ?? {};
73482
73555
  mergedChat = mergeChatConfig(
73483
73556
  mergedChat,
73484
73557
  projectChat
@@ -73508,9 +73581,9 @@ async function resolvePacksAndMerge(repoRoot, manifest, projectSlug) {
73508
73581
  }
73509
73582
  };
73510
73583
  const eveDir = (0, import_node_path11.join)(repoRoot, ".eve");
73511
- (0, import_node_fs10.mkdirSync)(eveDir, { recursive: true });
73584
+ (0, import_node_fs11.mkdirSync)(eveDir, { recursive: true });
73512
73585
  const lockfilePath = (0, import_node_path11.join)(eveDir, "packs.lock.yaml");
73513
- (0, import_node_fs10.writeFileSync)(lockfilePath, (0, import_yaml3.stringify)(lockfile), "utf-8");
73586
+ (0, import_node_fs11.writeFileSync)(lockfilePath, (0, import_yaml3.stringify)(lockfile), "utf-8");
73514
73587
  console.log(` \u2713 Lockfile written: .eve/packs.lock.yaml`);
73515
73588
  const packRefs = resolvedPacks.map((p) => ({ id: p.id, source: p.source, ref: p.ref }));
73516
73589
  return {
@@ -73653,7 +73726,7 @@ async function handleAgents(subcommand, positionals, flags, context2) {
73653
73726
  throw new Error("Working tree is dirty. Commit changes or pass --allow-dirty to sync anyway.");
73654
73727
  }
73655
73728
  const manifestPath = (0, import_node_path11.join)(repoRoot, ".eve", "manifest.yaml");
73656
- if (!(0, import_node_fs10.existsSync)(manifestPath)) {
73729
+ if (!(0, import_node_fs11.existsSync)(manifestPath)) {
73657
73730
  throw new Error(`Missing manifest at ${manifestPath}. Expected .eve/manifest.yaml.`);
73658
73731
  }
73659
73732
  const manifest = readYamlFile(manifestPath);
@@ -73682,9 +73755,9 @@ async function handleAgents(subcommand, positionals, flags, context2) {
73682
73755
  packRefs = packResult.packRefs;
73683
73756
  } else {
73684
73757
  const configPaths = resolveAgentsConfigPaths(repoRoot, manifest);
73685
- agentsYaml = (0, import_node_fs10.readFileSync)(ensureFileExists(configPaths.agentsPath, "agents config"), "utf-8");
73686
- teamsYaml = (0, import_node_fs10.readFileSync)(ensureFileExists(configPaths.teamsPath, "teams config"), "utf-8");
73687
- chatYaml = (0, import_node_fs10.readFileSync)(ensureFileExists(configPaths.chatPath, "chat config"), "utf-8");
73758
+ agentsYaml = (0, import_node_fs11.readFileSync)(ensureFileExists(configPaths.agentsPath, "agents config"), "utf-8");
73759
+ teamsYaml = (0, import_node_fs11.readFileSync)(ensureFileExists(configPaths.teamsPath, "teams config"), "utf-8");
73760
+ chatYaml = (0, import_node_fs11.readFileSync)(ensureFileExists(configPaths.chatPath, "chat config"), "utf-8");
73688
73761
  }
73689
73762
  let gitSha;
73690
73763
  let branch;
@@ -74027,7 +74100,7 @@ function ensureSkillsSymlink2(projectRoot) {
74027
74100
  }
74028
74101
 
74029
74102
  // src/commands/release.ts
74030
- var import_node_fs11 = require("node:fs");
74103
+ var import_node_fs12 = require("node:fs");
74031
74104
  var import_node_path12 = require("node:path");
74032
74105
  async function handleRelease2(subcommand, positionals, flags, context2) {
74033
74106
  const json = Boolean(flags.json);
@@ -74042,7 +74115,7 @@ async function handleRelease2(subcommand, positionals, flags, context2) {
74042
74115
  const dir = typeof flags.dir === "string" ? flags.dir : process.cwd();
74043
74116
  const manifestPath = (0, import_node_path12.join)(dir, ".eve", "manifest.yaml");
74044
74117
  try {
74045
- const yaml = (0, import_node_fs11.readFileSync)(manifestPath, "utf-8");
74118
+ const yaml = (0, import_node_fs12.readFileSync)(manifestPath, "utf-8");
74046
74119
  const projectMatch = yaml.match(/^project:\s*(\S+)/m);
74047
74120
  if (projectMatch) {
74048
74121
  projectId = projectMatch[1];
@@ -74091,7 +74164,7 @@ Make sure the release exists and the tag is correct.`
74091
74164
  }
74092
74165
 
74093
74166
  // src/commands/manifest.ts
74094
- var import_node_fs12 = require("node:fs");
74167
+ var import_node_fs13 = require("node:fs");
74095
74168
  var import_node_path13 = require("node:path");
74096
74169
  async function handleManifest(subcommand, positionals, flags, context2) {
74097
74170
  const json = Boolean(flags.json);
@@ -74106,7 +74179,7 @@ async function handleManifest(subcommand, positionals, flags, context2) {
74106
74179
  let manifestYaml;
74107
74180
  if (!useLatest) {
74108
74181
  try {
74109
- manifestYaml = (0, import_node_fs12.readFileSync)(manifestPath, "utf-8");
74182
+ manifestYaml = (0, import_node_fs13.readFileSync)(manifestPath, "utf-8");
74110
74183
  } catch (error) {
74111
74184
  throw new Error(`Failed to read manifest at ${manifestPath}: ${error.message}`);
74112
74185
  }
@@ -74174,7 +74247,7 @@ async function handleManifest(subcommand, positionals, flags, context2) {
74174
74247
  }
74175
74248
 
74176
74249
  // src/commands/packs.ts
74177
- var import_node_fs13 = require("node:fs");
74250
+ var import_node_fs14 = require("node:fs");
74178
74251
  var import_node_path14 = require("node:path");
74179
74252
  var import_yaml4 = require("yaml");
74180
74253
  async function handlePacks(subcommand, _rest, flags, _context) {
@@ -74196,12 +74269,12 @@ async function handlePacks(subcommand, _rest, flags, _context) {
74196
74269
  function printPacksStatus(repoRoot) {
74197
74270
  const lockfilePath = (0, import_node_path14.join)(repoRoot, ".eve", "packs.lock.yaml");
74198
74271
  const manifestPath = (0, import_node_path14.join)(repoRoot, ".eve", "manifest.yaml");
74199
- if (!(0, import_node_fs13.existsSync)(lockfilePath)) {
74272
+ if (!(0, import_node_fs14.existsSync)(lockfilePath)) {
74200
74273
  console.log("No lockfile found at .eve/packs.lock.yaml");
74201
74274
  console.log('Run "eve agents sync" to resolve packs and generate the lockfile.');
74202
74275
  return;
74203
74276
  }
74204
- const lockRaw = (0, import_node_fs13.readFileSync)(lockfilePath, "utf-8");
74277
+ const lockRaw = (0, import_node_fs14.readFileSync)(lockfilePath, "utf-8");
74205
74278
  const lock = (0, import_yaml4.parse)(lockRaw);
74206
74279
  if (!lock || !lock.packs) {
74207
74280
  console.log("Lockfile is empty or malformed.");
@@ -74236,8 +74309,8 @@ function printPacksStatus(repoRoot) {
74236
74309
  console.log(` Agents: ${lock.effective.agents_count}`);
74237
74310
  console.log(` Teams: ${lock.effective.teams_count}`);
74238
74311
  console.log(` Routes: ${lock.effective.routes_count}`);
74239
- if ((0, import_node_fs13.existsSync)(manifestPath)) {
74240
- const manifestRaw = (0, import_node_fs13.readFileSync)(manifestPath, "utf-8");
74312
+ if ((0, import_node_fs14.existsSync)(manifestPath)) {
74313
+ const manifestRaw = (0, import_node_fs14.readFileSync)(manifestPath, "utf-8");
74241
74314
  const manifest = (0, import_yaml4.parse)(manifestRaw);
74242
74315
  if (manifest) {
74243
74316
  const xEve = manifest["x-eve"] ?? manifest["x_eve"] ?? {};
@@ -74284,10 +74357,10 @@ function printPacksResolve(repoRoot, dryRun) {
74284
74357
  if (dryRun) {
74285
74358
  const lockfilePath = (0, import_node_path14.join)(repoRoot, ".eve", "packs.lock.yaml");
74286
74359
  const manifestPath = (0, import_node_path14.join)(repoRoot, ".eve", "manifest.yaml");
74287
- if (!(0, import_node_fs13.existsSync)(manifestPath)) {
74360
+ if (!(0, import_node_fs14.existsSync)(manifestPath)) {
74288
74361
  throw new Error("No manifest found at .eve/manifest.yaml");
74289
74362
  }
74290
- const manifestRaw = (0, import_node_fs13.readFileSync)(manifestPath, "utf-8");
74363
+ const manifestRaw = (0, import_node_fs14.readFileSync)(manifestPath, "utf-8");
74291
74364
  const manifest = (0, import_yaml4.parse)(manifestRaw);
74292
74365
  if (!manifest) {
74293
74366
  throw new Error("Manifest is empty or malformed.");
@@ -74305,8 +74378,8 @@ function printPacksResolve(repoRoot, dryRun) {
74305
74378
  const refShort = mp.ref ? mp.ref.substring(0, 12) : "(local)";
74306
74379
  console.log(` - ${mp.source} @ ${refShort}`);
74307
74380
  }
74308
- if ((0, import_node_fs13.existsSync)(lockfilePath)) {
74309
- const lockRaw = (0, import_node_fs13.readFileSync)(lockfilePath, "utf-8");
74381
+ if ((0, import_node_fs14.existsSync)(lockfilePath)) {
74382
+ const lockRaw = (0, import_node_fs14.readFileSync)(lockfilePath, "utf-8");
74310
74383
  const lock = (0, import_yaml4.parse)(lockRaw);
74311
74384
  if (lock?.packs) {
74312
74385
  const drift = detectDrift(lock, manifestPacks);
@@ -75196,7 +75269,7 @@ Cursor: ${result.cursor}`);
75196
75269
  }
75197
75270
 
75198
75271
  // src/commands/migrate.ts
75199
- var import_node_fs14 = require("node:fs");
75272
+ var import_node_fs15 = require("node:fs");
75200
75273
  var import_node_path15 = require("node:path");
75201
75274
  var import_yaml5 = require("yaml");
75202
75275
  async function handleMigrate2(subcommand, _rest, _flags) {
@@ -75218,11 +75291,11 @@ async function migrateSkillsToPacks() {
75218
75291
  throw new Error("Not in a git repository. Run this from your project root.");
75219
75292
  }
75220
75293
  const skillsTxtPath = (0, import_node_path15.join)(repoRoot, "skills.txt");
75221
- if (!(0, import_node_fs14.existsSync)(skillsTxtPath)) {
75294
+ if (!(0, import_node_fs15.existsSync)(skillsTxtPath)) {
75222
75295
  console.log("No skills.txt found at repository root. Nothing to migrate.");
75223
75296
  return;
75224
75297
  }
75225
- const content = (0, import_node_fs14.readFileSync)(skillsTxtPath, "utf-8");
75298
+ const content = (0, import_node_fs15.readFileSync)(skillsTxtPath, "utf-8");
75226
75299
  const lines = content.split("\n");
75227
75300
  const localSources = [];
75228
75301
  const remoteSources = [];
@@ -75360,7 +75433,7 @@ function padRight9(str, width) {
75360
75433
  }
75361
75434
 
75362
75435
  // src/commands/access.ts
75363
- var import_node_fs15 = require("node:fs");
75436
+ var import_node_fs16 = require("node:fs");
75364
75437
  var import_node_path16 = require("node:path");
75365
75438
  var readline3 = __toESM(require("node:readline/promises"));
75366
75439
  var import_yaml6 = require("yaml");
@@ -76124,10 +76197,10 @@ function resolveFilePath(flags) {
76124
76197
  return (0, import_node_path16.resolve)(process.cwd(), filePath);
76125
76198
  }
76126
76199
  function loadAccessYaml(filePath) {
76127
- if (!(0, import_node_fs15.existsSync)(filePath)) {
76200
+ if (!(0, import_node_fs16.existsSync)(filePath)) {
76128
76201
  throw new Error(`File not found: ${filePath}`);
76129
76202
  }
76130
- const raw = (0, import_node_fs15.readFileSync)(filePath, "utf-8");
76203
+ const raw = (0, import_node_fs16.readFileSync)(filePath, "utf-8");
76131
76204
  let parsed;
76132
76205
  try {
76133
76206
  parsed = (0, import_yaml6.parse)(raw);
@@ -77095,7 +77168,7 @@ Sync complete: ${parts.join(", ")}`);
77095
77168
  }
77096
77169
 
77097
77170
  // src/commands/docs.ts
77098
- var import_node_fs16 = require("node:fs");
77171
+ var import_node_fs17 = require("node:fs");
77099
77172
  var import_node_path17 = require("node:path");
77100
77173
  function encodeDocPathParam(path7) {
77101
77174
  const trimmed = path7.startsWith("/") ? path7.slice(1) : path7;
@@ -77171,9 +77244,9 @@ async function handleDocs(subcommand, positionals, flags, context2) {
77171
77244
  const filePath = getStringFlag(flags, ["file"]);
77172
77245
  const useStdin = flags.stdin === true || flags.stdin === "true";
77173
77246
  if (filePath) {
77174
- content = (0, import_node_fs16.readFileSync)((0, import_node_path17.resolve)(filePath), "utf-8");
77247
+ content = (0, import_node_fs17.readFileSync)((0, import_node_path17.resolve)(filePath), "utf-8");
77175
77248
  } else if (useStdin) {
77176
- content = (0, import_node_fs16.readFileSync)(0, "utf-8");
77249
+ content = (0, import_node_fs17.readFileSync)(0, "utf-8");
77177
77250
  } else {
77178
77251
  throw new Error("Provide --file <path> or --stdin to supply document content");
77179
77252
  }
@@ -77411,7 +77484,7 @@ async function handleDocs(subcommand, positionals, flags, context2) {
77411
77484
  }
77412
77485
 
77413
77486
  // src/commands/memory.ts
77414
- var import_node_fs17 = require("node:fs");
77487
+ var import_node_fs18 = require("node:fs");
77415
77488
  var import_node_path18 = require("node:path");
77416
77489
  function parseCsv(raw) {
77417
77490
  if (!raw) return [];
@@ -77471,9 +77544,9 @@ async function handleMemory(subcommand, positionals, flags, context2) {
77471
77544
  if (contentInline !== void 0) {
77472
77545
  content = contentInline;
77473
77546
  } else if (filePath) {
77474
- content = (0, import_node_fs17.readFileSync)((0, import_node_path18.resolve)(filePath), "utf-8");
77547
+ content = (0, import_node_fs18.readFileSync)((0, import_node_path18.resolve)(filePath), "utf-8");
77475
77548
  } else if (useStdin) {
77476
- content = (0, import_node_fs17.readFileSync)(0, "utf-8");
77549
+ content = (0, import_node_fs18.readFileSync)(0, "utf-8");
77477
77550
  } else {
77478
77551
  throw new Error("Provide --file <path>, --stdin, or --content <text>");
77479
77552
  }
@@ -78594,7 +78667,7 @@ async function handleOllama(subcommand, positionals, flags, context2) {
78594
78667
 
78595
78668
  // src/commands/fs.ts
78596
78669
  var import_promises = require("node:fs/promises");
78597
- var import_node_fs18 = require("node:fs");
78670
+ var import_node_fs19 = require("node:fs");
78598
78671
  var import_node_os5 = require("node:os");
78599
78672
  function getOrgOrThrow(flags, context2) {
78600
78673
  const orgId = getStringFlag(flags, ["org", "org-id", "org_id"]) ?? context2.orgId;
@@ -78838,7 +78911,7 @@ async function handleSync2(action, positionals, flags, context2) {
78838
78911
  for (const link of links.data) {
78839
78912
  let writable = false;
78840
78913
  try {
78841
- await (0, import_promises.access)(link.local_path, import_node_fs18.constants.R_OK | import_node_fs18.constants.W_OK);
78914
+ await (0, import_promises.access)(link.local_path, import_node_fs19.constants.R_OK | import_node_fs19.constants.W_OK);
78842
78915
  writable = true;
78843
78916
  } catch {
78844
78917
  writable = false;
@@ -78871,7 +78944,7 @@ async function handleFs(subcommand, positionals, flags, context2) {
78871
78944
  }
78872
78945
 
78873
78946
  // src/commands/local.ts
78874
- var import_node_fs19 = require("node:fs");
78947
+ var import_node_fs20 = require("node:fs");
78875
78948
  var import_node_crypto = require("node:crypto");
78876
78949
  var import_node_child_process10 = require("node:child_process");
78877
78950
  var import_node_os6 = require("node:os");
@@ -79289,7 +79362,7 @@ async function ensureManagedTool(tool, runtimeOptions) {
79289
79362
  if (findExecutable(tool)) {
79290
79363
  return;
79291
79364
  }
79292
- (0, import_node_fs19.mkdirSync)(MANAGED_BIN_DIR, { recursive: true });
79365
+ (0, import_node_fs20.mkdirSync)(MANAGED_BIN_DIR, { recursive: true });
79293
79366
  if (tool === "k3d") {
79294
79367
  printProgress(runtimeOptions, `Installing k3d ${K3D_VERSION} into ${MANAGED_BIN_DIR}...`);
79295
79368
  await installK3dBinary();
@@ -79370,9 +79443,9 @@ async function fetchText(url, headers) {
79370
79443
  }
79371
79444
  function writeExecutable(destination, bytes) {
79372
79445
  const tempPath = `${destination}.tmp-${Date.now()}-${process.pid}`;
79373
- (0, import_node_fs19.writeFileSync)(tempPath, bytes);
79374
- (0, import_node_fs19.chmodSync)(tempPath, 493);
79375
- (0, import_node_fs19.renameSync)(tempPath, destination);
79446
+ (0, import_node_fs20.writeFileSync)(tempPath, bytes);
79447
+ (0, import_node_fs20.chmodSync)(tempPath, 493);
79448
+ (0, import_node_fs20.renameSync)(tempPath, destination);
79376
79449
  }
79377
79450
  async function ensureClusterReady(runtimeOptions) {
79378
79451
  const k3d = requireToolPath("k3d", "Run 'eve local up' again to auto-install managed tools.");
@@ -79522,8 +79595,8 @@ function importImageViaTar(docker, k3d, imageTag, component, stdio) {
79522
79595
  run(docker, ["image", "save", "--platform", "linux/amd64", imageTag, "-o", tarPath], { stdio });
79523
79596
  run(k3d, ["image", "import", "--mode", "direct", tarPath, "-c", DEFAULT_CLUSTER_NAME], { stdio });
79524
79597
  } finally {
79525
- if ((0, import_node_fs19.existsSync)(tarPath)) {
79526
- (0, import_node_fs19.unlinkSync)(tarPath);
79598
+ if ((0, import_node_fs20.existsSync)(tarPath)) {
79599
+ (0, import_node_fs20.unlinkSync)(tarPath);
79527
79600
  }
79528
79601
  }
79529
79602
  }
@@ -79796,7 +79869,7 @@ function assertLocalAssetsPresent() {
79796
79869
  (0, import_node_path19.join)(LOCAL_STACK_BASE, "auth-bootstrap-job.yaml")
79797
79870
  ];
79798
79871
  for (const file of files) {
79799
- if (!(0, import_node_fs19.existsSync)(file)) {
79872
+ if (!(0, import_node_fs20.existsSync)(file)) {
79800
79873
  throw new Error(
79801
79874
  `Missing local stack assets at ${file}. Reinstall the CLI or ensure package assets were published.`
79802
79875
  );
@@ -79884,7 +79957,7 @@ function parseTimeoutSeconds(flags, defaultValue) {
79884
79957
  }
79885
79958
  function run(command, args, options = {}) {
79886
79959
  const env = { ...process.env };
79887
- if ((0, import_node_fs19.existsSync)(MANAGED_BIN_DIR)) {
79960
+ if ((0, import_node_fs20.existsSync)(MANAGED_BIN_DIR)) {
79888
79961
  env.PATH = `${MANAGED_BIN_DIR}:${env.PATH ?? ""}`;
79889
79962
  }
79890
79963
  const result = (0, import_node_child_process10.spawnSync)(command, args, {
@@ -79905,7 +79978,7 @@ function run(command, args, options = {}) {
79905
79978
  }
79906
79979
  function findExecutable(name) {
79907
79980
  const managed = (0, import_node_path19.join)(MANAGED_BIN_DIR, name);
79908
- if ((0, import_node_fs19.existsSync)(managed)) {
79981
+ if ((0, import_node_fs20.existsSync)(managed)) {
79909
79982
  return managed;
79910
79983
  }
79911
79984
  const found = (0, import_node_child_process10.spawnSync)("which", [name], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eve-horizon/cli",
3
- "version": "0.2.34",
3
+ "version": "0.2.35",
4
4
  "description": "Eve Horizon CLI",
5
5
  "license": "MIT",
6
6
  "repository": {