@vendian/cli 0.0.5 → 0.0.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.
Files changed (2) hide show
  1. package/cli-wrapper.cjs +51 -2
  2. package/package.json +3 -2
package/cli-wrapper.cjs CHANGED
@@ -426,9 +426,41 @@ async function forwardToPythonVendian(args, { env = process.env, platform = proc
426
426
  throw new Error("Vendian is not set up yet. Run `vendian login` first.");
427
427
  }
428
428
  maybeAutoUpdateManagedEnv({ env, platform, venvPath });
429
- const code = await spawnForward(vendianPath, args, { env });
429
+ const config = loadConfig(env, platform);
430
+ const code = await spawnForward(vendianPath, args, {
431
+ env: {
432
+ ...env,
433
+ ...packageIndexEnv(config, env, platform)
434
+ }
435
+ });
430
436
  process.exitCode = code;
431
437
  }
438
+ function packageIndexEnv(config = {}, env = process.env, platform = process.platform) {
439
+ const registry = registryConfig(config, env, platform);
440
+ const indexes = buildIndexUrls(registry);
441
+ if (!indexes) {
442
+ return {};
443
+ }
444
+ const extraIndexUrls = joinIndexUrls([
445
+ indexes.runtimeIndexUrl,
446
+ "https://pypi.org/simple",
447
+ env.VENDIAN_PIP_EXTRA_INDEX_URL
448
+ ]);
449
+ const uvExtraIndexUrls = joinIndexUrls([
450
+ indexes.runtimeIndexUrl,
451
+ "https://pypi.org/simple",
452
+ env.VENDIAN_UV_EXTRA_INDEX_URL
453
+ ]);
454
+ return {
455
+ VENDIAN_PIP_INDEX_URL: indexes.sdkIndexUrl,
456
+ VENDIAN_PIP_EXTRA_INDEX_URL: extraIndexUrls,
457
+ VENDIAN_UV_INDEX_URL: indexes.sdkIndexUrl,
458
+ VENDIAN_UV_EXTRA_INDEX_URL: uvExtraIndexUrls
459
+ };
460
+ }
461
+ function joinIndexUrls(urls) {
462
+ return urls.flatMap((value) => String(value || "").split(/\s+/)).map((value) => value.trim()).filter(Boolean).filter((value, index, all) => all.indexOf(value) === index).join(" ");
463
+ }
432
464
  function maybeAutoUpdateManagedEnv({ env = process.env, platform = process.platform, venvPath = managedVenvPath(env, platform) } = {}) {
433
465
  if (env.VENDIAN_SKIP_AUTO_UPDATE === "1") {
434
466
  return false;
@@ -817,7 +849,7 @@ var import_node_readline = __toESM(require("node:readline"), 1);
817
849
  var import_promises = __toESM(require("node:readline/promises"), 1);
818
850
 
819
851
  // src/version.js
820
- var CLI_VERSION = true ? "0.0.5" : process.env.npm_package_version || "0.0.0-dev";
852
+ var CLI_VERSION = true ? "0.0.6" : process.env.npm_package_version || "0.0.0-dev";
821
853
 
822
854
  // src/tui.js
823
855
  var RESET = "\x1B[0m";
@@ -939,6 +971,10 @@ async function runAction(action, { env, platform, input, output }) {
939
971
  }
940
972
  if (action === "serve") {
941
973
  const agentsDir = await prompt(input, output, "Agents directory", "./agents");
974
+ output.write(`${CLEAR}${SHOW_CURSOR}`);
975
+ output.write(`[vendian] Starting local agent server for ${agentsDir || "./agents"}
976
+
977
+ `);
942
978
  await forwardToPythonVendian(["cloud", "local", "serve", "--agents-dir", agentsDir || "./agents"], { env, platform });
943
979
  return true;
944
980
  }
@@ -1135,7 +1171,20 @@ function parseSetupOptions(args) {
1135
1171
  return options;
1136
1172
  }
1137
1173
 
1174
+ // src/terminal-title.js
1175
+ function setTerminalTitle(title, { output = process.stdout, processRef = process } = {}) {
1176
+ const safeTitle = String(title).replace(/[\x00-\x1f\x7f]/g, " ").trim();
1177
+ if (!safeTitle) {
1178
+ return;
1179
+ }
1180
+ processRef.title = safeTitle;
1181
+ if (output?.isTTY && typeof output.write === "function") {
1182
+ output.write(`\x1B]0;${safeTitle}\x07`);
1183
+ }
1184
+ }
1185
+
1138
1186
  // src/entry.js
1187
+ setTerminalTitle("Vendian CLI");
1139
1188
  main(process.argv.slice(2)).catch((error) => {
1140
1189
  const message = error && typeof error.message === "string" ? error.message : String(error);
1141
1190
  console.error(`[vendian] ${message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendian/cli",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Public Vendian CLI bootstrapper and launcher",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -21,7 +21,8 @@
21
21
  "scripts": {
22
22
  "build": "node scripts/build-package.mjs",
23
23
  "prepack": "npm run build",
24
- "prepublishOnly": "npm test",
24
+ "prepublishOnly": "npm run release:sync-version && npm test",
25
+ "release:sync-version": "node scripts/sync-release-version.mjs",
25
26
  "test": "node --test"
26
27
  },
27
28
  "engines": {