thenomad 0.5.1 → 0.5.2

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 (128) hide show
  1. package/dist/nomad.js +238 -48
  2. package/package.json +1 -1
  3. package/web/404.html +1 -1
  4. package/web/__next.__PAGE__.txt +3 -3
  5. package/web/__next._full.txt +3 -3
  6. package/web/__next._tree.txt +1 -1
  7. package/web/_next/static/chunks/{1x9sijct2al7p.js → 2ey6g40ex3wx5.js} +1 -1
  8. package/web/_not-found/__next._full.txt +1 -1
  9. package/web/_not-found/__next._not-found.__PAGE__.txt +1 -1
  10. package/web/_not-found/__next._tree.txt +1 -1
  11. package/web/_not-found.html +1 -1
  12. package/web/_not-found.txt +1 -1
  13. package/web/app/__next._full.txt +1 -1
  14. package/web/app/__next._tree.txt +1 -1
  15. package/web/app/__next.app.__PAGE__.txt +1 -1
  16. package/web/app/__next.app.txt +1 -1
  17. package/web/app/agents/__next._full.txt +1 -1
  18. package/web/app/agents/__next._tree.txt +1 -1
  19. package/web/app/agents/__next.app.agents.__PAGE__.txt +1 -1
  20. package/web/app/agents/__next.app.txt +1 -1
  21. package/web/app/agents/view/__next._full.txt +1 -1
  22. package/web/app/agents/view/__next._tree.txt +1 -1
  23. package/web/app/agents/view/__next.app.agents.view.__PAGE__.txt +1 -1
  24. package/web/app/agents/view/__next.app.txt +1 -1
  25. package/web/app/agents/view.html +1 -1
  26. package/web/app/agents/view.txt +1 -1
  27. package/web/app/agents.html +1 -1
  28. package/web/app/agents.txt +1 -1
  29. package/web/app/backups/__next._full.txt +1 -1
  30. package/web/app/backups/__next._tree.txt +1 -1
  31. package/web/app/backups/__next.app.backups.__PAGE__.txt +1 -1
  32. package/web/app/backups/__next.app.txt +1 -1
  33. package/web/app/backups.html +1 -1
  34. package/web/app/backups.txt +1 -1
  35. package/web/app/compatibility/__next._full.txt +3 -3
  36. package/web/app/compatibility/__next._tree.txt +1 -1
  37. package/web/app/compatibility/__next.app.compatibility.__PAGE__.txt +3 -3
  38. package/web/app/compatibility/__next.app.txt +1 -1
  39. package/web/app/compatibility.html +1 -1
  40. package/web/app/compatibility.txt +3 -3
  41. package/web/app/export/__next._full.txt +3 -3
  42. package/web/app/export/__next._tree.txt +1 -1
  43. package/web/app/export/__next.app.export.__PAGE__.txt +3 -3
  44. package/web/app/export/__next.app.txt +1 -1
  45. package/web/app/export.html +1 -1
  46. package/web/app/export.txt +3 -3
  47. package/web/app/history/__next._full.txt +3 -3
  48. package/web/app/history/__next._tree.txt +1 -1
  49. package/web/app/history/__next.app.history.__PAGE__.txt +3 -3
  50. package/web/app/history/__next.app.txt +1 -1
  51. package/web/app/history.html +1 -1
  52. package/web/app/history.txt +3 -3
  53. package/web/app/import/__next._full.txt +1 -1
  54. package/web/app/import/__next._tree.txt +1 -1
  55. package/web/app/import/__next.app.import.__PAGE__.txt +1 -1
  56. package/web/app/import/__next.app.txt +1 -1
  57. package/web/app/import.html +1 -1
  58. package/web/app/import.txt +1 -1
  59. package/web/app/migrate/__next._full.txt +3 -3
  60. package/web/app/migrate/__next._tree.txt +1 -1
  61. package/web/app/migrate/__next.app.migrate.__PAGE__.txt +3 -3
  62. package/web/app/migrate/__next.app.txt +1 -1
  63. package/web/app/migrate.html +1 -1
  64. package/web/app/migrate.txt +3 -3
  65. package/web/app/settings/__next._full.txt +1 -1
  66. package/web/app/settings/__next._tree.txt +1 -1
  67. package/web/app/settings/__next.app.settings.__PAGE__.txt +1 -1
  68. package/web/app/settings/__next.app.txt +1 -1
  69. package/web/app/settings.html +1 -1
  70. package/web/app/settings.txt +1 -1
  71. package/web/app/versions/__next._full.txt +1 -1
  72. package/web/app/versions/__next._tree.txt +1 -1
  73. package/web/app/versions/__next.app.txt +1 -1
  74. package/web/app/versions/__next.app.versions.__PAGE__.txt +1 -1
  75. package/web/app/versions.html +1 -1
  76. package/web/app/versions.txt +1 -1
  77. package/web/app.html +1 -1
  78. package/web/app.txt +1 -1
  79. package/web/docs/__next._full.txt +1 -1
  80. package/web/docs/__next._tree.txt +1 -1
  81. package/web/docs/__next.docs.__PAGE__.txt +1 -1
  82. package/web/docs/adapters/__next._full.txt +18 -16
  83. package/web/docs/adapters/__next._tree.txt +1 -1
  84. package/web/docs/adapters/__next.docs.adapters.__PAGE__.txt +15 -13
  85. package/web/docs/adapters.html +1 -1
  86. package/web/docs/adapters.txt +18 -16
  87. package/web/docs/format/__next._full.txt +1 -1
  88. package/web/docs/format/__next._tree.txt +1 -1
  89. package/web/docs/format/__next.docs.format.__PAGE__.txt +1 -1
  90. package/web/docs/format.html +1 -1
  91. package/web/docs/format.txt +1 -1
  92. package/web/docs/security/__next._full.txt +1 -1
  93. package/web/docs/security/__next._tree.txt +1 -1
  94. package/web/docs/security/__next.docs.security.__PAGE__.txt +1 -1
  95. package/web/docs/security.html +1 -1
  96. package/web/docs/security.txt +1 -1
  97. package/web/docs/token/__next._full.txt +1 -1
  98. package/web/docs/token/__next._tree.txt +1 -1
  99. package/web/docs/token/__next.docs.token.__PAGE__.txt +1 -1
  100. package/web/docs/token.html +1 -1
  101. package/web/docs/token.txt +1 -1
  102. package/web/docs.html +1 -1
  103. package/web/docs.txt +1 -1
  104. package/web/index.html +2 -2
  105. package/web/index.txt +3 -3
  106. package/web/inspect/__next._full.txt +3 -3
  107. package/web/inspect/__next._tree.txt +1 -1
  108. package/web/inspect/__next.inspect.__PAGE__.txt +3 -3
  109. package/web/inspect.html +1 -1
  110. package/web/inspect.txt +3 -3
  111. package/web/privacy/__next._full.txt +1 -1
  112. package/web/privacy/__next._tree.txt +1 -1
  113. package/web/privacy/__next.privacy.__PAGE__.txt +1 -1
  114. package/web/privacy.html +1 -1
  115. package/web/privacy.txt +1 -1
  116. package/web/terms/__next._full.txt +1 -1
  117. package/web/terms/__next._tree.txt +1 -1
  118. package/web/terms/__next.terms.__PAGE__.txt +1 -1
  119. package/web/terms.html +1 -1
  120. package/web/terms.txt +1 -1
  121. package/web/vote/__next._full.txt +1 -1
  122. package/web/vote/__next._tree.txt +1 -1
  123. package/web/vote/__next.vote.__PAGE__.txt +1 -1
  124. package/web/vote.html +1 -1
  125. package/web/vote.txt +1 -1
  126. /package/web/_next/static/{QinUk6PjXyM9AWH7_9ASp → 17hXNNJlnLuiGSqi7wSeA}/_buildManifest.js +0 -0
  127. /package/web/_next/static/{QinUk6PjXyM9AWH7_9ASp → 17hXNNJlnLuiGSqi7wSeA}/_clientMiddlewareManifest.js +0 -0
  128. /package/web/_next/static/{QinUk6PjXyM9AWH7_9ASp → 17hXNNJlnLuiGSqi7wSeA}/_ssgManifest.js +0 -0
package/dist/nomad.js CHANGED
@@ -905,10 +905,10 @@ function mergeEntries(existing, incoming, delimiter) {
905
905
  a.push(e);
906
906
  added++;
907
907
  }
908
- const sep5 = delimiter.trim() === delimiter ? `
908
+ const sep6 = delimiter.trim() === delimiter ? `
909
909
  ${delimiter}
910
910
  ` : delimiter;
911
- return { value: a.join(sep5) + (a.length ? "\n" : ""), added, duplicates };
911
+ return { value: a.join(sep6) + (a.length ? "\n" : ""), added, duplicates };
912
912
  }
913
913
  var init_merge = __esm({
914
914
  "../../packages/core/src/merge.ts"() {
@@ -928,7 +928,7 @@ var init_src2 = __esm({
928
928
  init_markdown();
929
929
  init_document();
930
930
  init_merge();
931
- NOMAD_VERSION = "0.5.1";
931
+ NOMAD_VERSION = "0.5.2";
932
932
  NomadError = class extends Error {
933
933
  constructor(message, code, hint) {
934
934
  super(message);
@@ -979,9 +979,15 @@ var init_keymaterial = __esm({
979
979
  /(^|\/)\.hedgehood(\/|$)/,
980
980
  // BrainChain: the payer and worker key files and the daily spending record (~/.brainchain), and the worker's state.
981
981
  /(^|\/)\.brainchain(\/|$)/,
982
- /(^|\/)\.config\/brainchain-worker(\/|$)/
982
+ /(^|\/)\.config\/brainchain-worker(\/|$)/,
983
+ // Rushr: the agent wallet made by create_wallet, the registered API key and the daily spend ledger.
984
+ /(^|\/)\.rushr(\/|$)/
985
+ ];
986
+ KEY_MATERIAL_FILES = [
987
+ /(^|\/)agent(-\d+)?\.key$/,
988
+ // Rushr's and its Talos example agent's wallet file ({ "privateKey": ... }), wherever it is kept.
989
+ /(^|\/)\.?agent-wallet\.json$/
983
990
  ];
984
- KEY_MATERIAL_FILES = [/(^|\/)agent(-\d+)?\.key$/];
985
991
  skipped = /* @__PURE__ */ new Set();
986
992
  }
987
993
  });
@@ -3406,7 +3412,7 @@ function applyKnownServerProfile(tool, platformName = "the destination") {
3406
3412
  if (keys.length > 1) {
3407
3413
  for (const k of keys) delete env[k];
3408
3414
  out2.manualSteps.push(
3409
- `"${tool.name}" listed both ${keys.join(" and ")}, which ${profile.id === "priors" ? "Priors" : "the server"} refuses together, so Nomad wrote neither. Set one: ${keys[0]} (recommended: a path to an owner-only key file, chmod 600, for a dedicated wallet) or ${keys[1]}.`
3415
+ `"${tool.name}" listed both ${keys.join(" and ")}, which ${profile.id === "priors" || profile.id === "rushr" ? profile.vendor : "the server"} refuses together, so Nomad wrote neither. Set one: ${keys[0]} (recommended: a path to an owner-only key file, chmod 600, for a dedicated wallet) or ${keys[1]}.`
3410
3416
  );
3411
3417
  }
3412
3418
  for (const k of profile.keyVars) {
@@ -3439,7 +3445,7 @@ function applyKnownServerProfile(tool, platformName = "the destination") {
3439
3445
  function knownServerId(tool) {
3440
3446
  return PROFILES.find((p) => p.matches(tool))?.id ?? null;
3441
3447
  }
3442
- var NPM_SPEC, escapeRe2, isPackageArg, isPackageInScript, isPriorsPackage, isPriorsScript, isPriorsHost, PRIORS, isOakCommand, OAK, HEDGEHOOD_HOSTS, isHedgehoodHost, isHedgehoodCommand, HEDGEHOOD_KEY_VARS, HEDGEHOOD, BRAINCHAIN_PKG, isBrainChainCommand, literal, amount, BRAINCHAIN, isHeyHost, isHeyCommand, isHeyPackage, HEY_API, HEY, PROFILES;
3448
+ var NPM_SPEC, escapeRe2, isPackageArg, isPackageInScript, isPriorsPackage, isPriorsScript, isPriorsHost, PRIORS, isOakCommand, OAK, HEDGEHOOD_HOSTS, isHedgehoodHost, isHedgehoodCommand, HEDGEHOOD_KEY_VARS, HEDGEHOOD, BRAINCHAIN_PKG, isBrainChainCommand, literal, amount, BRAINCHAIN, isHeyHost, isHeyCommand, isHeyPackage, HEY_API, HEY, isRushrCommand, isRushrPackage, RUSHR_LIMITS, RUSHR, PROFILES;
3443
3449
  var init_known_servers = __esm({
3444
3450
  "../../packages/adapters/src/known-servers.ts"() {
3445
3451
  "use strict";
@@ -3775,7 +3781,68 @@ var init_known_servers = __esm({
3775
3781
  }
3776
3782
  }
3777
3783
  };
3778
- PROFILES = [PRIORS, OAK, HEDGEHOOD, BRAINCHAIN, HEY];
3784
+ isRushrCommand = (command) => !!command && /(^|[\\/])rushr-mcp(\.cmd|\.exe)?$/i.test(command);
3785
+ isRushrPackage = isPackageArg("@rushr/mcp");
3786
+ RUSHR_LIMITS = ["RUSHR_MAX_TRADE_USD", "RUSHR_DAILY_USD", "RUSHR_DRY_RUN", "RUSHR_MAX_SIZE_IMPACT_BPS", "RUSHR_MAX_TOTAL_IMPACT_BPS", "RUSHR_SLIPPAGE_BPS", "RUSHR_GAS_RESERVE_ETH", "RUSHR_STATE_DIR"];
3787
+ RUSHR = {
3788
+ id: "rushr",
3789
+ vendor: "Rushr",
3790
+ label: "Rushr (a social trading terminal for humans and AI agents on Robinhood Chain)",
3791
+ matches: (t) => !!t.mcp && t.mcp.transport === "stdio" && (isRushrCommand(t.mcp.command) || t.mcp.args.some(isRushrPackage)),
3792
+ keyVars: ["RUSHR_WALLET_FILE", "RUSHR_PRIVATE_KEY"],
3793
+ emptyOkEnv: [],
3794
+ limitVars: RUSHR_LIMITS,
3795
+ looserDefaults: {
3796
+ RUSHR_MAX_TRADE_USD: "$10 per buy",
3797
+ RUSHR_DAILY_USD: "$50 per 24 hours",
3798
+ RUSHR_DRY_RUN: "real trades, signed and sent",
3799
+ RUSHR_MAX_SIZE_IMPACT_BPS: "3% price impact from the trade's size",
3800
+ RUSHR_MAX_TOTAL_IMPACT_BPS: "5% total price impact",
3801
+ RUSHR_SLIPPAGE_BPS: "1.5% slippage",
3802
+ RUSHR_GAS_RESERVE_ETH: "0.001 ETH kept for gas",
3803
+ RUSHR_STATE_DIR: "~/.rushr"
3804
+ },
3805
+ apply(t, out2, platform) {
3806
+ const mcp = t.mcp;
3807
+ const lit = (k) => {
3808
+ const v = mcp.env[k];
3809
+ return v && "value" in v ? v.value.trim() : void 0;
3810
+ };
3811
+ out2.notes.push({
3812
+ level: "info",
3813
+ category: "integrations",
3814
+ message: "Rushr's wallet, API key and daily spend record stay on this computer in ~/.rushr (and in any agent-wallet.json key file). Nomad never reads them, and never moves holdings, trades, callouts or the agent's registration."
3815
+ });
3816
+ const raw = mcp.env.RUSHR_PRIVATE_KEY;
3817
+ if (raw && "value" in raw) mcp.env.RUSHR_PRIVATE_KEY = { secretRef: "RUSHR_PRIVATE_KEY", redacted: true };
3818
+ const hadWallet = out2.unsupported.some((u) => u.item === `${t.name}: RUSHR_WALLET_FILE` || u.item === `${t.name}: RUSHR_PRIVATE_KEY`);
3819
+ if (!hadWallet && !mcp.env.RUSHR_WALLET_FILE && !mcp.env.RUSHR_PRIVATE_KEY) {
3820
+ out2.notes.push({ level: "info", category: "tools", message: `"${t.name}" names no wallet, so Rushr uses ~/.rushr/agent-wallet.json on the computer ${platform} runs on (made by its create_wallet tool). Without that file it can only read.` });
3821
+ }
3822
+ const dryRef = out2.unsupported.some((u) => u.item === `${t.name}: RUSHR_DRY_RUN`);
3823
+ const dry = lit("RUSHR_DRY_RUN");
3824
+ const perBuy = lit("RUSHR_MAX_TRADE_USD") ?? "10";
3825
+ const perDay = lit("RUSHR_DAILY_USD") ?? "50";
3826
+ if (dryRef) {
3827
+ out2.notes.push({ level: "warning", category: "tools", message: `"${t.name}" took RUSHR_DRY_RUN from a variable on the source. Without it on ${platform}, Rushr trades for real: it signs and sends trades with real ETH on Robinhood Chain mainnet (4663). Set RUSHR_DRY_RUN=1 there to keep it in dry run.` });
3828
+ } else if (dry === "1") {
3829
+ out2.notes.push({ level: "info", category: "tools", message: `"${t.name}" is in dry run (RUSHR_DRY_RUN=1): it quotes, builds and simulates trades but never signs or sends them, and cannot register.` });
3830
+ } else {
3831
+ out2.notes.push({ level: "warning", category: "tools", message: `"${t.name}" trades real ETH on Robinhood Chain mainnet (4663): up to $${perBuy} per buy and $${perDay} per 24 hours. Set RUSHR_DRY_RUN=1 on ${platform} to try it without signing anything.` });
3832
+ }
3833
+ out2.notes.push({
3834
+ level: "warning",
3835
+ category: "tools",
3836
+ message: `Rushr: if ${platform} runs on another computer, the wallet and its API key do not come along, and the daily spend count starts again there. Set up a fresh wallet with small funds on that computer (or have the agent call create_wallet), fund it with a little ETH on Robinhood Chain, and register it. Its rank on the leaderboard belongs to the wallet.`
3837
+ });
3838
+ if (isRushrCommand(mcp.command)) {
3839
+ out2.manualSteps.push(`Install Rushr's MCP server for "${t.name}": npm install -g @rushr/mcp. It needs Node.js 20 or later, and the rushr-mcp command must be on the PATH ${platform} uses.`);
3840
+ } else {
3841
+ out2.manualSteps.push(`"${t.name}" runs Rushr through npx: ${platform} needs Node.js 20 or later on its PATH.`);
3842
+ }
3843
+ }
3844
+ };
3845
+ PROFILES = [PRIORS, OAK, HEDGEHOOD, BRAINCHAIN, HEY, RUSHR];
3779
3846
  }
3780
3847
  });
3781
3848
 
@@ -4138,8 +4205,9 @@ function integrationStep(i, platformName, otherwise) {
4138
4205
  if (i.kind === "elizaos-plugin") {
4139
4206
  return `${i.name} was an ElizaOS plugin. ${elizaosPluginHint(i.name)}`;
4140
4207
  }
4141
- if (i.kind === "claude-code-plugin" || i.kind === "hermes-plugin") {
4142
- return `${i.name} was an installed ${i.kind === "hermes-plugin" ? "Hermes" : "Claude Code"} plugin (installed plugin read, not installed). Its servers and skills are written to ${platformName} as ordinary entries where ${platformName} has a place for them.`;
4208
+ if (i.kind === "claude-code-plugin" || i.kind === "hermes-plugin" || i.kind === "codex-plugin") {
4209
+ const host = i.kind === "hermes-plugin" ? "Hermes" : i.kind === "codex-plugin" ? "Codex" : "Claude Code";
4210
+ return `${i.name} was an installed ${host} plugin (installed plugin read, not installed). Its servers and skills are written to ${platformName} as ordinary entries where ${platformName} has a place for them.`;
4143
4211
  }
4144
4212
  return otherwise;
4145
4213
  }
@@ -5011,7 +5079,8 @@ var init_claude_code = __esm({
5011
5079
  P = "claude-code";
5012
5080
  KNOWN_MARKETPLACE_REPOS = {
5013
5081
  "oak-agent-kit": "OakAgentKit/oak",
5014
- hedgehood: "0xHedgeHood/hedgehood-agent-kit"
5082
+ hedgehood: "0xHedgeHood/hedgehood-agent-kit",
5083
+ rushr: "rushr-dev/platform"
5015
5084
  };
5016
5085
  TOOL_CAP = {
5017
5086
  Bash: "shell",
@@ -5123,7 +5192,8 @@ var init_claude_code = __esm({
5123
5192
  });
5124
5193
 
5125
5194
  // ../../packages/adapters/src/codex.ts
5126
- import { basename as basename4, join as join5 } from "path";
5195
+ import { realpathSync as realpathSync4 } from "fs";
5196
+ import { basename as basename4, join as join5, resolve as resolve3, sep as sep3 } from "path";
5127
5197
  import { parse as parseToml, stringify as stringifyToml } from "smol-toml";
5128
5198
  async function layoutOf2(root) {
5129
5199
  const user = basename4(root) === ".codex" || await pathExists(join5(root, "config.toml"));
@@ -5139,6 +5209,104 @@ async function readConfig(path, notes) {
5139
5209
  return void 0;
5140
5210
  }
5141
5211
  }
5212
+ async function readJsonFile(path, notes) {
5213
+ const text3 = await readTextIfExists(path);
5214
+ if (text3 === null) return void 0;
5215
+ try {
5216
+ return JSON.parse(text3);
5217
+ } catch (e) {
5218
+ notes.push({ level: "warning", message: `Could not parse ${path}: ${e.message}` });
5219
+ return void 0;
5220
+ }
5221
+ }
5222
+ function codexMarketplaceSource(source) {
5223
+ if (typeof source !== "string" || !source) return null;
5224
+ const gh = /^https:\/\/github\.com\/([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(\.git)?\/?$/.exec(source);
5225
+ return gh ? `${gh[1]}/${gh[2]}` : source;
5226
+ }
5227
+ async function readCodexPlugins(root, cfg, notes) {
5228
+ const out2 = { tools: [], skills: [], integrations: [], sourceFiles: [] };
5229
+ const plugins = cfg.plugins && typeof cfg.plugins === "object" ? cfg.plugins : {};
5230
+ const cache = join5(root, "plugins", "cache");
5231
+ let cacheReal;
5232
+ try {
5233
+ cacheReal = realpathSync4(cache);
5234
+ } catch {
5235
+ cacheReal = cache;
5236
+ }
5237
+ for (const [id, entry] of Object.entries(plugins)) {
5238
+ if (entry?.enabled === false) continue;
5239
+ const [name, market] = id.split("@");
5240
+ if (!name || !market || id.split("@").length !== 2) {
5241
+ notes.push({ level: "warning", category: "integrations", message: `Codex plugin ${JSON.stringify(id)} has an unexpected name, so it was not read.` });
5242
+ continue;
5243
+ }
5244
+ const base = join5(cache, market, name);
5245
+ const versions2 = (await listDir(base)).filter((e) => !e.file).map((e) => e.name).sort(byVersion);
5246
+ const version = versions2[versions2.length - 1];
5247
+ if (!version) {
5248
+ notes.push({ level: "warning", category: "integrations", message: `Codex plugin ${id} is enabled but its files were not found, so it was not read.` });
5249
+ continue;
5250
+ }
5251
+ let dir;
5252
+ try {
5253
+ dir = realpathSync4(join5(base, version));
5254
+ } catch {
5255
+ continue;
5256
+ }
5257
+ if (!dir.startsWith(cacheReal + sep3)) {
5258
+ notes.push({ level: "warning", category: "integrations", message: `Codex plugin ${id} points outside Codex's plugin folder, so it was not read.` });
5259
+ continue;
5260
+ }
5261
+ const provenance = { note: `plugin ${id}`, extra: { plugin: id, pluginHost: P2 } };
5262
+ let manifest = {};
5263
+ for (const m of ["plugin.json", ".codex-plugin/plugin.json"]) {
5264
+ const found = await readJsonFile(join5(dir, m), notes);
5265
+ if (found && typeof found === "object") {
5266
+ manifest = found;
5267
+ out2.sourceFiles.push(join5(dir, m));
5268
+ break;
5269
+ }
5270
+ }
5271
+ const servers = {};
5272
+ if (manifest.mcpServers && typeof manifest.mcpServers === "object") Object.assign(servers, manifest.mcpServers);
5273
+ const mcpFiles = typeof manifest.mcpServers === "string" ? [manifest.mcpServers] : ["mcp.json", ".mcp.json"];
5274
+ for (const rel of mcpFiles) {
5275
+ const abs = resolve3(dir, rel);
5276
+ if (!abs.startsWith(dir + sep3)) continue;
5277
+ const file = await readJsonFile(abs, notes);
5278
+ if (file?.mcpServers && typeof file.mcpServers === "object") {
5279
+ out2.sourceFiles.push(abs);
5280
+ Object.assign(servers, file.mcpServers);
5281
+ break;
5282
+ }
5283
+ }
5284
+ out2.tools.push(...toolsFromMcpServers(servers, P2, `plugins/${id}`, { notes, ...provenance }));
5285
+ const skillDirs = Array.isArray(manifest.skills) ? manifest.skills : typeof manifest.skills === "string" ? [manifest.skills] : ["skills"];
5286
+ for (const rel of skillDirs) {
5287
+ if (typeof rel !== "string") continue;
5288
+ const abs = resolve3(dir, rel);
5289
+ if (abs !== dir && !abs.startsWith(dir + sep3)) continue;
5290
+ if (!await isDirectory(abs)) continue;
5291
+ const single = abs !== dir ? await readSkillDir(abs, P2, notes) : null;
5292
+ for (const sk of single ? [single] : await readSkillsTree(abs, P2, notes, 1)) {
5293
+ sk.source = { ...sk.source ?? { platform: P2 }, note: provenance.note, ...provenance.extra };
5294
+ out2.skills.push(sk);
5295
+ }
5296
+ }
5297
+ const source = codexMarketplaceSource(cfg.marketplaces?.[market]?.source);
5298
+ out2.integrations.push({
5299
+ name: id,
5300
+ kind: "codex-plugin",
5301
+ requiresAuth: false,
5302
+ config: { version: typeof manifest.version === "string" ? manifest.version : version, marketplace: market, ...source ? { marketplaceSource: source } : {}, plugin: name },
5303
+ notes: "Installed Codex plugin",
5304
+ source: { platform: P2, path: `plugins/${id}` }
5305
+ });
5306
+ notes.push({ level: "info", category: "integrations", message: `Read installed Codex plugin ${id} (installed plugin read, not installed anywhere by Nomad).` });
5307
+ }
5308
+ return out2;
5309
+ }
5142
5310
  function policyFromCodexConfig(cfg) {
5143
5311
  const rules = [];
5144
5312
  const notes = [];
@@ -5193,7 +5361,7 @@ function codexSettingsFromPolicy(policy) {
5193
5361
  }
5194
5362
  return { settings: settings2, unenforced };
5195
5363
  }
5196
- var P2, codexAdapter;
5364
+ var P2, byVersion, codexAdapter;
5197
5365
  var init_codex = __esm({
5198
5366
  "../../packages/adapters/src/codex.ts"() {
5199
5367
  "use strict";
@@ -5202,6 +5370,7 @@ var init_codex = __esm({
5202
5370
  init_catalog();
5203
5371
  init_util();
5204
5372
  P2 = "codex";
5373
+ byVersion = (a, b) => a.localeCompare(b, void 0, { numeric: true });
5205
5374
  codexAdapter = {
5206
5375
  info: CODEX_INFO,
5207
5376
  async detect(root) {
@@ -5269,6 +5438,16 @@ var init_codex = __esm({
5269
5438
  if (cfg.profiles) doc.extensions["x-codex"] = { profiles: cfg.profiles };
5270
5439
  }
5271
5440
  doc.skills.push(...await readSkillsTree(join5(root, L.skills), P2, notes, 1));
5441
+ if (cfg && L.user) {
5442
+ const plugins = await readCodexPlugins(root, cfg, notes);
5443
+ for (const t of plugins.tools) {
5444
+ if (doc.tools.some((d) => d.name === t.name)) t.name = `${t.name}-plugin`;
5445
+ doc.tools.push(t);
5446
+ }
5447
+ doc.skills.push(...plugins.skills.filter((sk) => !doc.skills.some((d) => d.name === sk.name)));
5448
+ doc.integrations.push(...plugins.integrations);
5449
+ sourceFiles.push(...plugins.sourceFiles);
5450
+ }
5272
5451
  for (const e of await listDir(join5(root, L.prompts))) {
5273
5452
  if (!e.file || !e.name.endsWith(".md")) continue;
5274
5453
  const text3 = await readTextIfExists(join5(root, L.prompts, e.name));
@@ -5308,8 +5487,16 @@ var init_codex = __esm({
5308
5487
  files.push({ path: L.agentsMd, content: body2, strategy: "managed-block", blockKey: nomadBlockKey(doc), component: "instructions", description: "Agent persona, instructions and memory in a Nomad managed section of AGENTS.md" });
5309
5488
  if (doc.identity.persona) conversions.push({ category: "identity", item: "persona", from: "persona", to: "Persona section in AGENTS.md" });
5310
5489
  if (wants(ctx, "memory") && doc.memory.length) conversions.push({ category: "memory", item: `${doc.memory.length} entries`, from: "structured memory", to: "Memory section in AGENTS.md" });
5490
+ const fromPlugins = new Set([...doc.tools, ...doc.skills].map((x) => pluginOf(x, P2)).filter((x) => !!x));
5491
+ for (const id of fromPlugins) {
5492
+ const info = doc.integrations.find((i) => i.kind === "codex-plugin" && i.name === id)?.config;
5493
+ const source = typeof info?.marketplaceSource === "string" ? info.marketplaceSource : null;
5494
+ manualSteps.push(
5495
+ isPlainCliWord(id, "path") && source && isPlainCliWord(source, "path") ? `Install the plugin ${id} in Codex: codex plugin marketplace add ${source}, then codex plugin add ${id}. Nomad does not copy plugin servers or skills.` : `Install the plugin ${JSON.stringify(id)} in Codex from its marketplace (codex plugin add). Nomad prints no command for it${source ? ", because its name or source has characters a terminal could misread," : ", because the source did not record where its marketplace is,"} and does not copy plugin servers or skills.`
5496
+ );
5497
+ }
5311
5498
  if (wants(ctx, "skills")) {
5312
- for (const s of doc.skills) {
5499
+ for (const s of doc.skills.filter((x) => !pluginOf(x, P2))) {
5313
5500
  const isCommand = s.frontmatter["x-codex-prompt"] === true || s.frontmatter["x-claude-code-command"] === true;
5314
5501
  const { "x-codex-prompt": _p, "x-claude-code-command": _c, ...fm } = s.frontmatter;
5315
5502
  if (isCommand) {
@@ -5341,7 +5528,7 @@ var init_codex = __esm({
5341
5528
  conversions.push({ category: "permissions", item: "policy", from: "permission rules", to: `approval_policy=${p.settings.approval_policy}, sandbox_mode=${p.settings.sandbox_mode}` });
5342
5529
  }
5343
5530
  if (wants(ctx, "tools")) {
5344
- const mcpTools = doc.tools.filter((t) => t.kind === "mcp" && t.mcp);
5531
+ const mcpTools = doc.tools.filter((t) => t.kind === "mcp" && t.mcp && !pluginOf(t, P2));
5345
5532
  if (mcpTools.length) {
5346
5533
  const r = mcpServersFromTools(mcpTools, { platformName: "Codex", envRefStyle: "none" });
5347
5534
  const servers = {};
@@ -5373,7 +5560,7 @@ var init_codex = __esm({
5373
5560
  for (const w of doc.workflows) unsupported.push({ category: "workflows", item: w.name, reason: "Codex has no scheduler." });
5374
5561
  manualSteps.push(...workflowManualSteps(doc, "Codex"));
5375
5562
  }
5376
- if (wants(ctx, "integrations")) for (const i of doc.integrations) manualSteps.push(integrationStep(i, "Codex", `Reconnect the ${i.name} integration for Codex.`));
5563
+ if (wants(ctx, "integrations")) for (const i of doc.integrations.filter((x) => !(x.kind === "codex-plugin" && fromPlugins.has(x.name)))) manualSteps.push(integrationStep(i, "Codex", `Reconnect the ${i.name} integration for Codex.`));
5377
5564
  if (wants(ctx, "knowledge") && (doc.knowledge.length || doc.files.length)) manualSteps.push(`Copy ${doc.knowledge.length + doc.files.length} knowledge file(s) into the project and mention them in AGENTS.md.`);
5378
5565
  return { nativeId: "main", files, notes, manualSteps, conversions, unsupported };
5379
5566
  },
@@ -6264,15 +6451,15 @@ async function planHome(doc, ctx) {
6264
6451
  const user = doc.memory.filter((m) => m.scope === "user" || m.kind === "profile");
6265
6452
  const logs = doc.memory.filter((m) => m.kind === "daily-log" || m.kind === "document");
6266
6453
  const rest = doc.memory.filter((m) => !user.includes(m) && !logs.includes(m));
6267
- const sep5 = `
6454
+ const sep6 = `
6268
6455
  ${HERMES_DELIMITER}
6269
6456
  `;
6270
6457
  const check = async (rel, entries, limit, label) => {
6271
6458
  if (!entries.length) return;
6272
6459
  const existing = splitEntries(await readTextIfExists(join7(h, rel)) ?? "");
6273
6460
  const all = [...existing, ...entries.map((e) => plainEntry(e.content)).filter((e) => !existing.includes(e))];
6274
- const size = all.join(sep5).length;
6275
- files.push({ path: `${prefix}${rel}`, content: entries.map((e) => plainEntry(e.content)).join(sep5) + "\n", strategy: "append-entries", entryDelimiter: HERMES_DELIMITER, component: "memory", description: `${entries.length} ${label} entries` });
6461
+ const size = all.join(sep6).length;
6462
+ files.push({ path: `${prefix}${rel}`, content: entries.map((e) => plainEntry(e.content)).join(sep6) + "\n", strategy: "append-entries", entryDelimiter: HERMES_DELIMITER, component: "memory", description: `${entries.length} ${label} entries` });
6276
6463
  if (size > limit) {
6277
6464
  notes.push({ level: "warning", category: "memory", message: `${rel} will hold ${size} characters, above the Hermes default limit of ${limit}. Hermes keeps loading it but refuses new memory until it is consolidated.` });
6278
6465
  manualSteps.push(`Raise memory.${label === "user" ? "user_char_limit" : "memory_char_limit"} in config.yaml to at least ${size}, or ask Hermes to consolidate ${rel}.`);
@@ -9196,7 +9383,7 @@ __export(src_exports4, {
9196
9383
  import { McpServer as McpServer2 } from "@modelcontextprotocol/sdk/server/mcp.js";
9197
9384
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
9198
9385
  import { readFileSync as readFileSync5 } from "fs";
9199
- import { join as join19, resolve as resolve6 } from "path";
9386
+ import { join as join19, resolve as resolve7 } from "path";
9200
9387
  import { z as z4 } from "zod";
9201
9388
  function text2(data) {
9202
9389
  return { content: [{ type: "text", text: typeof data === "string" ? data : JSON.stringify(data, null, 2) }] };
@@ -9229,7 +9416,7 @@ function summarizePlan(p) {
9229
9416
  };
9230
9417
  }
9231
9418
  function createMcpServer(options = {}) {
9232
- const nomad = new Nomad({ home: options.home ? resolve6(options.home) : nomadHome() });
9419
+ const nomad = new Nomad({ home: options.home ? resolve7(options.home) : nomadHome() });
9233
9420
  const server = new McpServer2({ name: "nomad", version: NOMAD_VERSION });
9234
9421
  const exportsDir = join19(nomad.store.home, "exports");
9235
9422
  server.registerTool(
@@ -9301,7 +9488,7 @@ function createMcpServer(options = {}) {
9301
9488
  { title: "Validate a package", description: "Check a .nomad, .agentpack or .jetpack package for structure, integrity and security problems.", inputSchema: { path: z4.string().describe("Path to a package file") } },
9302
9489
  async ({ path }) => {
9303
9490
  try {
9304
- const p = resolve6(expandHome(path));
9491
+ const p = resolve7(expandHome(path));
9305
9492
  if (!/\.(nomad|agentpack|jetpack)$/.test(p)) throw new NomadError("Only .nomad, .agentpack or .jetpack files can be validated.", "usage");
9306
9493
  const r = nomad.validatePackage(new Uint8Array(readFileSync5(p)));
9307
9494
  return text2({ ok: r.ok, name: r.doc?.name, issues: r.issues, warnings: r.warnings, secretsFound: r.scan?.findings.length ?? 0 });
@@ -9427,7 +9614,7 @@ import { Command, Option } from "commander";
9427
9614
  import { createInterface } from "readline/promises";
9428
9615
  import { spawn as spawn2 } from "child_process";
9429
9616
  import { existsSync as existsSync7, mkdirSync as mkdirSync4, writeFileSync as writeFileSync4 } from "fs";
9430
- import { dirname as dirname7, join as join20, resolve as resolve7 } from "path";
9617
+ import { dirname as dirname7, join as join20, resolve as resolve8 } from "path";
9431
9618
  import { fileURLToPath } from "url";
9432
9619
  import { randomBytes as randomBytes4 } from "crypto";
9433
9620
 
@@ -9561,6 +9748,9 @@ function summaryText(p) {
9561
9748
  if (p.conversions.length) lines.push(`Adapted: ${p.conversions.map((c2) => `${c2.item} ${dim("\u2192 " + c2.to)}`).join("; ")}.`);
9562
9749
  if (p.unsupported.length) lines.push(yellow(`Can't move: ${p.unsupported.map((u) => u.item).join(", ")}`) + dim(" (kept in the report with setup steps)"));
9563
9750
  if (p.disabledRoutines.length) lines.push(`Routines arrive paused: ${p.disabledRoutines.join(", ")}.`);
9751
+ const warns = p.notes.filter((n) => n.level === "warning" && !/cannot tell who made it/.test(n.message));
9752
+ for (const n of warns.slice(0, 6)) lines.push(yellow(`Warning: ${n.message}`));
9753
+ if (warns.length > 6) lines.push(dim(` and ${warns.length - 6} more warning${warns.length - 6 === 1 ? "" : "s"} (use --details)`));
9564
9754
  if (p.source.signer === "unsigned" || p.source.signer === "unknown") lines.push(yellow(p.source.signer === "unsigned" ? "Not signed: Nomad cannot tell who made this package. Move it only if you trust where it came from." : "Signed by a key you have not trusted: Nomad cannot tell who made this package."));
9565
9755
  for (const c2 of p.commands ?? []) lines.push(yellow(`Starts by itself on ${p.destination.displayName}: "${c2.tool}" runs ${c2.command}`) + (c2.env.length ? dim(` (with ${c2.env.join(", ")} set)`) : ""));
9566
9756
  if (p.secrets.findings || p.secrets.strippedEnv.length) {
@@ -9592,14 +9782,14 @@ function shellQuote(s) {
9592
9782
  return `'${s.replace(/'/g, `'\\''`)}'`;
9593
9783
  }
9594
9784
  function run(cmd, args, input) {
9595
- return new Promise((resolve8, reject) => {
9785
+ return new Promise((resolve9, reject) => {
9596
9786
  const p = spawn(cmd, args, { stdio: ["pipe", "pipe", "pipe"] });
9597
9787
  let stdout = "";
9598
9788
  let stderr = "";
9599
9789
  p.stdout.on("data", (d) => stdout += d);
9600
9790
  p.stderr.on("data", (d) => stderr += d);
9601
9791
  p.on("error", (e) => reject(new NomadError(`${cmd} is not available: ${e.message}`, "ssh-missing", "Install OpenSSH to use remote migration.")));
9602
- p.on("close", (code) => resolve8({ code: code ?? 1, stdout, stderr }));
9792
+ p.on("close", (code) => resolve9({ code: code ?? 1, stdout, stderr }));
9603
9793
  if (input) p.stdin.end(input);
9604
9794
  else p.stdin.end();
9605
9795
  });
@@ -9639,12 +9829,12 @@ async function remoteMigrate(o, packagePath, args) {
9639
9829
  // src/ui.ts
9640
9830
  import { createServer } from "http";
9641
9831
  import { existsSync as existsSync6, readFileSync as readFileSync4, statSync as statSync3 } from "fs";
9642
- import { extname, join as join18, normalize, resolve as resolve5, sep as sep4 } from "path";
9832
+ import { extname, join as join18, normalize, resolve as resolve6, sep as sep5 } from "path";
9643
9833
 
9644
9834
  // ../../packages/local/src/index.ts
9645
9835
  import { timingSafeEqual } from "crypto";
9646
9836
  import { mkdir, readFile, writeFile } from "fs/promises";
9647
- import { basename as basename10, join as join16, resolve as resolve3, sep as sep3 } from "path";
9837
+ import { basename as basename10, join as join16, resolve as resolve4, sep as sep4 } from "path";
9648
9838
  var SESSION_COOKIE = "nomad_session";
9649
9839
  var HttpError = class extends Error {
9650
9840
  constructor(status, message) {
@@ -9713,8 +9903,8 @@ function safeSource(nomadHome2, s) {
9713
9903
  if (s.kind === "stored") return { kind: "stored", agentId: String(s.agentId), version: s.version ? Number(s.version) : void 0 };
9714
9904
  if (s.kind === "package") {
9715
9905
  const uploads = join16(nomadHome2, "uploads");
9716
- const p = resolve3(String(s.path));
9717
- if (!p.startsWith(uploads + sep3) || !/\.(nomad|agentpack|jetpack)$/.test(p)) throw new HttpError(400, "Packages must be uploaded first.");
9906
+ const p = resolve4(String(s.path));
9907
+ if (!p.startsWith(uploads + sep4) || !/\.(nomad|agentpack|jetpack)$/.test(p)) throw new HttpError(400, "Packages must be uploaded first.");
9718
9908
  return { kind: "package", path: p };
9719
9909
  }
9720
9910
  throw new HttpError(400, "Unknown source kind.");
@@ -9862,7 +10052,7 @@ init_src2();
9862
10052
  import { spawnSync } from "child_process";
9863
10053
  import { createHash, randomBytes as randomBytes3 } from "crypto";
9864
10054
  import { chmodSync as chmodSync2, cpSync, existsSync as existsSync5, mkdirSync as mkdirSync3, readdirSync, readFileSync as readFileSync3, renameSync, rmSync, statSync as statSync2, writeFileSync as writeFileSync3 } from "fs";
9865
- import { basename as basename11, dirname as dirname6, join as join17, resolve as resolve4 } from "path";
10055
+ import { basename as basename11, dirname as dirname6, join as join17, resolve as resolve5 } from "path";
9866
10056
  var REPO = "kadiri-seer/nomad";
9867
10057
  var VERSION_RE = /^\d+\.\d+\.\d+$/;
9868
10058
  function currentInstall(execPath = process.execPath) {
@@ -10010,7 +10200,7 @@ async function applyUpdate(install, version, log = () => void 0) {
10010
10200
  if (check.status !== 0 || check.stdout.trim() !== version) throw new Error(`The new version did not start correctly. Nothing was changed.${check.stderr ? `
10011
10201
  ${check.stderr.trim()}` : ""}`);
10012
10202
  const target = join17(install.root, "app", version);
10013
- if (resolve4(target) === resolve4(dirname6(process.execPath))) throw new Error(`Nomad ${version} is the version running now.`);
10203
+ if (resolve5(target) === resolve5(dirname6(process.execPath))) throw new Error(`Nomad ${version} is the version running now.`);
10014
10204
  removeQuietly(target);
10015
10205
  renameWithRetry(staged, target);
10016
10206
  for (const need of [process.platform === "win32" ? "node.exe" : "node", "launcher", join17("node_modules", "thenomad", "dist", "nomad.js")]) {
@@ -10036,9 +10226,9 @@ ${check.stderr.trim()}` : ""}`);
10036
10226
  const reg = join17(process.env.SystemRoot ?? "C:\\Windows", "System32", "reg.exe");
10037
10227
  spawnSync(reg, ["add", "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\thenomad.website", "/v", "DisplayVersion", "/t", "REG_SZ", "/d", version, "/f"], { stdio: "ignore" });
10038
10228
  }
10039
- const running = resolve4(dirname6(process.execPath));
10229
+ const running = resolve5(dirname6(process.execPath));
10040
10230
  for (const v of readdirSync(join17(install.root, "app"))) {
10041
- const dir = resolve4(install.root, "app", v);
10231
+ const dir = resolve5(install.root, "app", v);
10042
10232
  if (v === version) continue;
10043
10233
  if (dir === running) removeAfterExit(dir);
10044
10234
  else removeQuietly(dir);
@@ -10087,7 +10277,7 @@ var SECURITY_HEADERS = {
10087
10277
  "Permissions-Policy": "camera=(), microphone=(), geolocation=()"
10088
10278
  };
10089
10279
  function findSite(here) {
10090
- const candidates = [resolve5(here, "../web"), resolve5(here, "../../web/.next-export"), resolve5(process.cwd(), "apps/web/.next-export")];
10280
+ const candidates = [resolve6(here, "../web"), resolve6(here, "../../web/.next-export"), resolve6(process.cwd(), "apps/web/.next-export")];
10091
10281
  return candidates.find((d) => existsSync6(join18(d, "app.html"))) ?? null;
10092
10282
  }
10093
10283
  function fileFor(site, pathname) {
@@ -10099,7 +10289,7 @@ function fileFor(site, pathname) {
10099
10289
  }
10100
10290
  if (rel.includes("\0")) return null;
10101
10291
  const base = normalize(join18(site, rel));
10102
- if (base !== site && !base.startsWith(site + sep4)) return null;
10292
+ if (base !== site && !base.startsWith(site + sep5)) return null;
10103
10293
  for (const p of [base, `${base}.html`, join18(base, "index.html")]) {
10104
10294
  try {
10105
10295
  if (statSync3(p).isFile()) return p;
@@ -10216,8 +10406,8 @@ function out() {
10216
10406
  }
10217
10407
  function engine() {
10218
10408
  const home2 = program.opts().home;
10219
- if (home2) process.env.NOMAD_HOME = resolve7(home2);
10220
- return new Nomad({ home: home2 ? resolve7(home2) : nomadHome() });
10409
+ if (home2) process.env.NOMAD_HOME = resolve8(home2);
10410
+ return new Nomad({ home: home2 ? resolve8(home2) : nomadHome() });
10221
10411
  }
10222
10412
  function components(list) {
10223
10413
  if (!list) return void 0;
@@ -10347,7 +10537,7 @@ program.command("inspect <source>").description("show what an agent contains (re
10347
10537
  program.command("validate <package>").description("check a package (.nomad, .agentpack or .jetpack) without importing it").action(
10348
10538
  (pkg) => run2(async (nomad) => {
10349
10539
  const { readFileSync: readFileSync6 } = await import("fs");
10350
- const r = nomad.validatePackage(new Uint8Array(readFileSync6(resolve7(pkg))));
10540
+ const r = nomad.validatePackage(new Uint8Array(readFileSync6(resolve8(pkg))));
10351
10541
  const { describeSigner: describeSigner2 } = await Promise.resolve().then(() => (init_src8(), src_exports3));
10352
10542
  print(out(), () => r.ok ? [green("Valid package") + ` ${r.doc.name} (${r.doc.id})`, `Format ${r.format}. ${describeSigner2(r.signer)}`, `${r.fileCount} files, ${r.totalBytes} bytes`, ...r.warnings.map((w) => yellow("! ") + w), ...r.scan?.findings.length ? [yellow(`${r.scan.findings.length} secret(s) found in the package`)] : []] : [red("Invalid package"), ...r.issues.map((i) => ` ${i.path}: ${i.message}`)], { ok: r.ok, format: r.format, signer: r.signer, issues: r.issues, warnings: r.warnings, info: r.info, findings: r.scan?.findings ?? [] });
10353
10543
  return r.ok ? EXIT.ok : EXIT.invalid;
@@ -10357,7 +10547,7 @@ program.command("export <source>").description("export an agent to a portable .n
10357
10547
  (source, o) => run2(async (nomad) => {
10358
10548
  const spec = await parseSource(nomad, source, { sourceDir: o.sourceDir, agent: o.agent });
10359
10549
  if (o.includeSecrets && !out().json) process.stderr.write(yellow("Warning: secret values will be stored in the package. Share it only with people who may see them.\n"));
10360
- const r = await nomad.exportAgent(spec, { outPath: resolve7(o.out), includeSecrets: o.includeSecrets, includeFiles: o.includeFiles, includeSensitiveFiles: o.includeSensitiveFiles, components: components(o.components), format: o.format === "jetpack" ? "interchange" : "nomad", sign: o.sign });
10550
+ const r = await nomad.exportAgent(spec, { outPath: resolve8(o.out), includeSecrets: o.includeSecrets, includeFiles: o.includeFiles, includeSensitiveFiles: o.includeSensitiveFiles, components: components(o.components), format: o.format === "jetpack" ? "interchange" : "nomad", sign: o.sign });
10361
10551
  print(out(), () => [green("Exported") + ` ${r.path}`, ...r.receipt.signedBy ? [`Signed with your key ${r.receipt.signedBy}`] : [], ...r.receipt.notIncluded.length ? [yellow(`Not representable in this format: ${r.receipt.notIncluded.join(", ")}`)] : [], `${r.files.size} files, ${r.bytes.length} bytes`, ...r.sanitize.redactedText || r.sanitize.strippedEnvValues.length ? [yellow(`${r.sanitize.redactedText} secret(s) redacted, ${r.sanitize.strippedEnvValues.length} credential(s) replaced by references`)] : [], ...r.sanitize.removedFiles.length ? [yellow(`Left out credential files: ${r.sanitize.removedFiles.join(", ")}`)] : [], ...r.sanitize.walletKeysKept ? [yellow(`Left out ${r.sanitize.walletKeysKept} wallet key(s) or recovery phrase(s): Nomad never stores them as values, even with --include-secrets.`)] : []], r.receipt);
10362
10552
  })
10363
10553
  );
@@ -10365,7 +10555,7 @@ approvalOptions(
10365
10555
  program.command("import <package>").description("import a package into the library, and optionally into a platform").option("--to <platform>", "also write the agent to this platform").option("--dest-dir <dir>", "destination directory").addOption(new Option("--mode <mode>", "conflict handling").choices(["merge", "copy", "replace"]).default("merge")).option("--name <name>", "name for copy mode").option("--components <list>", "only these components")
10366
10556
  ).action(
10367
10557
  (pkg, o) => run2(async (nomad) => {
10368
- const path = resolve7(pkg);
10558
+ const path = resolve8(pkg);
10369
10559
  const r = await nomad.importPackage({ path });
10370
10560
  if (!r.ok) {
10371
10561
  print(out(), () => [red("The package was rejected"), ...r.issues.map((i) => ` ${i.path}: ${i.message}`)], r);
@@ -10397,7 +10587,7 @@ approvalOptions(
10397
10587
  })
10398
10588
  );
10399
10589
  function parseDestination(spec) {
10400
- if (/\.(nomad|jetpack)$/i.test(spec)) return { kind: "file", path: resolve7(spec.replace(/^~(?=$|\/)/, process.env.HOME ?? "~")) };
10590
+ if (/\.(nomad|jetpack)$/i.test(spec)) return { kind: "file", path: resolve8(spec.replace(/^~(?=$|\/)/, process.env.HOME ?? "~")) };
10401
10591
  const m = /^([a-z0-9-]+)(?::(.*?))?(?:#(.+))?$/.exec(spec);
10402
10592
  const adapter = m ? findAdapter(m[1]) : void 0;
10403
10593
  if (!adapter || !m) throw new NomadError(`"${spec}" is not a platform or a package file.`, "usage", `Use a platform (${listAdapters().map((a) => a.info.id).slice(0, 5).join(", ")}, ...), a platform with a folder such as claude-code:~/project, or a file ending in .nomad.`);
@@ -10435,7 +10625,7 @@ program.command("keys").description("show your signing key, and the keys you tru
10435
10625
  program.command("trust <package>").description("trust the key that signed a package").requiredOption("--name <who>", "a name for this key, such as a person or team").action(
10436
10626
  (pkg, o) => run2(async (nomad) => {
10437
10627
  const { readFileSync: readFileSync6 } = await import("fs");
10438
- const k = nomad.trustPackageSigner(new Uint8Array(readFileSync6(resolve7(pkg))), o.name);
10628
+ const k = nomad.trustPackageSigner(new Uint8Array(readFileSync6(resolve8(pkg))), o.name);
10439
10629
  print(out(), () => [green("Trusted") + ` ${k.fingerprint} ${k.name}`, dim("Check this fingerprint with them through another channel.")], k);
10440
10630
  })
10441
10631
  );
@@ -10552,7 +10742,7 @@ remote.command("push <source>").description("export locally, copy over SSH, and
10552
10742
  program.command("schema").description("write the Universal Agent Format JSON Schemas").option("-o, --out <dir>", "output directory", ".").action(
10553
10743
  (o) => run2(async () => {
10554
10744
  const s = jsonSchemas();
10555
- const dir = resolve7(o.out);
10745
+ const dir = resolve8(o.out);
10556
10746
  mkdirSync4(dir, { recursive: true });
10557
10747
  writeFileSync4(join20(dir, "agent-document.schema.json"), JSON.stringify(s.agentDocument, null, 2));
10558
10748
  writeFileSync4(join20(dir, "package-manifest.schema.json"), JSON.stringify(s.packageManifest, null, 2));
@@ -10613,7 +10803,7 @@ If you installed it with npm, update with: ${bold("npm install -g thenomad@lates
10613
10803
  });
10614
10804
  program.command("uninstall").description("remove Nomad from this computer (your agents are not touched)").option("-y, --yes", "do not ask; keeps your library, backups and history").option("--remove-data", "also delete the library, backups and history").action(async (o) => {
10615
10805
  const install = currentInstall();
10616
- const dataDir = program.opts().home ? resolve7(program.opts().home) : nomadHome();
10806
+ const dataDir = program.opts().home ? resolve8(program.opts().home) : nomadHome();
10617
10807
  if (!install) {
10618
10808
  process.stderr.write(
10619
10809
  `This copy of Nomad was not installed with the installer from thenomad.website.
@@ -10660,13 +10850,13 @@ program.command("ui").description("open the dashboard in your browser (only this
10660
10850
  spawn2(cmd, args, { stdio: "ignore", detached: true }).on("error", () => void 0).unref();
10661
10851
  };
10662
10852
  if (o.dev) {
10663
- const webDir = [resolve7(here, "../../web"), resolve7(process.cwd(), "apps/web")].find((d) => existsSync7(join20(d, "package.json")));
10853
+ const webDir = [resolve8(here, "../../web"), resolve8(process.cwd(), "apps/web")].find((d) => existsSync7(join20(d, "package.json")));
10664
10854
  if (!webDir) {
10665
10855
  process.stderr.write(red("--dev needs the repository checkout.\n"));
10666
10856
  process.exitCode = 1;
10667
10857
  return;
10668
10858
  }
10669
- const env = { ...process.env, NOMAD_LOCAL: "1", NOMAD_LOCAL_TOKEN: token, NOMAD_HOME: program.opts().home ? resolve7(program.opts().home) : nomadHome(), PORT: String(port) };
10859
+ const env = { ...process.env, NOMAD_LOCAL: "1", NOMAD_LOCAL_TOKEN: token, NOMAD_HOME: program.opts().home ? resolve8(program.opts().home) : nomadHome(), PORT: String(port) };
10670
10860
  process.stderr.write(`${bold("Nomad")} dev server at ${url}
10671
10861
  `);
10672
10862
  const child = spawn2(process.execPath, [join20(webDir, "node_modules", "next", "dist", "bin", "next"), "dev", "-H", "127.0.0.1", "-p", String(port)], { cwd: webDir, env, stdio: ["ignore", "inherit", "inherit"] });
@@ -10743,7 +10933,7 @@ async function guided(nomad) {
10743
10933
  if (items.length === 1) process.stderr.write(dim("No agents were found at the usual places. You can open a package file.") + "\n");
10744
10934
  const pick = await choose(rl, "Which agent?", items);
10745
10935
  if (pick === "file") {
10746
- const path = resolve7((await rl.question("Path to the file: ")).trim().replace(/^~(?=$|\/)/, process.env.HOME ?? "~"));
10936
+ const path = resolve8((await rl.question("Path to the file: ")).trim().replace(/^~(?=$|\/)/, process.env.HOME ?? "~"));
10747
10937
  if (!existsSync7(path)) throw new NomadError(`There is no file at ${path}.`, "not-found");
10748
10938
  source = { kind: "package", path };
10749
10939
  from = null;
@@ -10766,7 +10956,7 @@ async function guided(nomad) {
10766
10956
  const name = (await nomad.loadSource(source).catch(() => null))?.doc.name ?? "agent";
10767
10957
  const def = `./${name.replace(/[^A-Za-z0-9._-]+/g, "-")}.nomad`;
10768
10958
  const a = (await rl.question(`Save to ${dim(`[${def}]`)}: `)).trim();
10769
- dest = { kind: "file", path: resolve7(a || def) };
10959
+ dest = { kind: "file", path: resolve8(a || def) };
10770
10960
  } else {
10771
10961
  const info = getAdapter(where).info;
10772
10962
  const def = info.defaultLocations[0] ?? displayPath(process.cwd());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thenomad",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Move AI agents between OpenClaw, Claude Code, Codex, Hermes and more, with a preview, a backup and one question.",
5
5
  "keywords": [
6
6
  "ai",