@settlemint/dalp-cli 3.1.26-main.37123896382 → 3.1.26-main.37130318643

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dalp.js CHANGED
@@ -33250,7 +33250,7 @@ globalConfig.postProcessor = (inst) => {
33250
33250
  // ../node_modules/.bun/zod@4.6.5/node_modules/zod/index.js
33251
33251
  init_external();
33252
33252
  init_external();
33253
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Cli.js
33253
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Cli.js
33254
33254
  import * as fs7 from "fs/promises";
33255
33255
  import * as os4 from "os";
33256
33256
  import * as path6 from "path";
@@ -33398,19 +33398,19 @@ function extractSegmentPart(segment, segmentTokenStart, segmentTokenCount, targe
33398
33398
  return segment.slice(charStart, charEnd);
33399
33399
  }
33400
33400
 
33401
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Binary.js
33401
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Binary.js
33402
33402
  import * as fs3 from "fs";
33403
33403
  import * as path2 from "path";
33404
33404
  import * as util from "util";
33405
33405
  import * as zlib from "zlib";
33406
33406
 
33407
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/internal/update.js
33407
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/internal/update.js
33408
33408
  import * as childProcess from "child_process";
33409
33409
  import * as fs2 from "fs";
33410
33410
  import * as os from "os";
33411
33411
  import * as path from "path";
33412
33412
 
33413
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/internal/pm.js
33413
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/internal/pm.js
33414
33414
  import * as fs from "fs";
33415
33415
  function detectPackageManager() {
33416
33416
  const userAgent = process.env.npm_config_user_agent ?? "";
@@ -33459,7 +33459,7 @@ function globalInstall(name) {
33459
33459
  return { args: ["install", "--global", `${name}@latest`], command: "npm" };
33460
33460
  }
33461
33461
 
33462
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/internal/update.js
33462
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/internal/update.js
33463
33463
  var defaultInterval = 24 * 60 * 60 * 1000;
33464
33464
  var checkFlag = "--incur-update-check";
33465
33465
  function check2(name, options = {}) {
@@ -33715,7 +33715,7 @@ function notificationsDisabled() {
33715
33715
  return Boolean(process.env.CI && process.env.CI !== "false");
33716
33716
  }
33717
33717
 
33718
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Binary.js
33718
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Binary.js
33719
33719
  var handoffTimeout = 60000;
33720
33720
  var gunzip2 = util.promisify(zlib.gunzip);
33721
33721
  var applyFlag = "--incur-binary-apply";
@@ -33839,7 +33839,7 @@ function message(error) {
33839
33839
  return error instanceof Error ? error.message : String(error);
33840
33840
  }
33841
33841
 
33842
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/internal/helpers.js
33842
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/internal/helpers.js
33843
33843
  function isRecord(value) {
33844
33844
  return typeof value === "object" && value !== null && !Array.isArray(value);
33845
33845
  }
@@ -33887,7 +33887,7 @@ function suggest(input, candidates) {
33887
33887
  return best;
33888
33888
  }
33889
33889
 
33890
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Completions.js
33890
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Completions.js
33891
33891
  function register(shell, name) {
33892
33892
  switch (shell) {
33893
33893
  case "bash":
@@ -34152,7 +34152,7 @@ let _incur_complete_${id} = {|spans|
34152
34152
  }`;
34153
34153
  }
34154
34154
 
34155
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Errors.js
34155
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Errors.js
34156
34156
  class BaseError extends Error {
34157
34157
  name = "Incur.BaseError";
34158
34158
  shortMessage;
@@ -34217,7 +34217,7 @@ function walk(error, fn) {
34217
34217
  return current;
34218
34218
  }
34219
34219
 
34220
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Fetch.js
34220
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Fetch.js
34221
34221
  var reservedFlags = new Set(["method", "body", "data", "header"]);
34222
34222
  var reservedShort = { X: "method", d: "data", H: "header" };
34223
34223
  function parseArgv(argv) {
@@ -34353,8 +34353,23 @@ async function parseResponse(response) {
34353
34353
  headers: response.headers
34354
34354
  };
34355
34355
  }
34356
+ function parseError(output) {
34357
+ const { data, status } = output;
34358
+ const error = isRecord(data) && isRecord(data.error) ? data.error : undefined;
34359
+ const code = typeof error?.code === "string" && error.code ? error.code : `HTTP_${status}`;
34360
+ const message = (() => {
34361
+ if (isRecord(data) && "message" in data)
34362
+ return String(data.message);
34363
+ if (error && "message" in error)
34364
+ return String(error.message);
34365
+ if (typeof data === "string")
34366
+ return data;
34367
+ return `HTTP ${status}`;
34368
+ })();
34369
+ return { code, message };
34370
+ }
34356
34371
 
34357
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Filter.js
34372
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Filter.js
34358
34373
  function parse5(expression) {
34359
34374
  const paths = [];
34360
34375
  const tokens = [];
@@ -34942,7 +34957,7 @@ function resolveOptions2(options) {
34942
34957
  };
34943
34958
  }
34944
34959
 
34945
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/internal/json.js
34960
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/internal/json.js
34946
34961
  function stringify(value, space) {
34947
34962
  return JSON.stringify(value, (_key, value) => {
34948
34963
  if (typeof value === "bigint")
@@ -34954,7 +34969,7 @@ function normalize(value) {
34954
34969
  return JSON.parse(stringify(value));
34955
34970
  }
34956
34971
 
34957
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/internal/yaml.js
34972
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/internal/yaml.js
34958
34973
  import { createRequire } from "module";
34959
34974
  var cached2;
34960
34975
  async function load() {
@@ -34966,7 +34981,7 @@ function loadSync() {
34966
34981
  return cached2;
34967
34982
  }
34968
34983
 
34969
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Formatter.js
34984
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Formatter.js
34970
34985
  function format2(value, fmt = "toon") {
34971
34986
  if (value == null)
34972
34987
  return "";
@@ -35077,7 +35092,7 @@ ${String(val)}`;
35077
35092
  return kvTable(obj);
35078
35093
  }
35079
35094
 
35080
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Parser.js
35095
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Parser.js
35081
35096
  function parse6(argv, options = {}) {
35082
35097
  const { args: argsSchema, options: optionsSchema, alias, defaults } = options;
35083
35098
  const optionNames = createOptionNames(optionsSchema, alias);
@@ -35443,7 +35458,7 @@ function defaultEnvSource() {
35443
35458
  return {};
35444
35459
  }
35445
35460
 
35446
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/internal/command.js
35461
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/internal/command.js
35447
35462
  var sentinel = Symbol.for("incur.sentinel");
35448
35463
  async function execute(command, options) {
35449
35464
  const { argv, inputOptions, agent, format, formatExplicit, name, path, version, envSource = process.env, env: envSchema, globals = {}, vars: varsSchema, middlewares = [], request } = options;
@@ -35695,9 +35710,9 @@ function findBuiltinSubcommand(builtin, token) {
35695
35710
  return builtin.subcommands?.find((sub) => sub.name === token || sub.aliases?.includes(token));
35696
35711
  }
35697
35712
 
35698
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Help.js
35713
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Help.js
35699
35714
  function formatRoot(name, options = {}) {
35700
- const { aliases, configFlag, description, globals, version, commands = [], root = false } = options;
35715
+ const { aliases, configFlag, description, globals, hideSkills = false, version, commands = [], root = false } = options;
35701
35716
  const lines = [];
35702
35717
  const title = version ? `${name}@${version}` : name;
35703
35718
  lines.push(description ? `${title} \u2014 ${description}` : title);
@@ -35717,12 +35732,12 @@ function formatRoot(name, options = {}) {
35717
35732
  lines.push(` ${cmd.name}`);
35718
35733
  }
35719
35734
  }
35720
- lines.push(...globalOptionsLines(root, configFlag, globals));
35735
+ lines.push(...globalOptionsLines(root, configFlag, globals, hideSkills));
35721
35736
  return lines.join(`
35722
35737
  `);
35723
35738
  }
35724
35739
  function formatCommand(name, options = {}) {
35725
- const { alias, aliases, configFlag, description, globals, version, args, env, envSource, hint, root = false, options: opts, examples } = options;
35740
+ const { alias, aliases, configFlag, description, globals, hideSkills = false, version, args, env, envSource, hint, root = false, options: opts, examples } = options;
35726
35741
  const lines = [];
35727
35742
  const title = version ? `${name}@${version}` : name;
35728
35743
  lines.push(description ? `${title} \u2014 ${description}` : title);
@@ -35809,7 +35824,7 @@ function formatCommand(name, options = {}) {
35809
35824
  }
35810
35825
  }
35811
35826
  if (!options.hideGlobalOptions)
35812
- lines.push(...globalOptionsLines(root, configFlag, globals));
35827
+ lines.push(...globalOptionsLines(root, configFlag, globals, hideSkills));
35813
35828
  if (env) {
35814
35829
  const entries = envEntries(env);
35815
35830
  if (entries.length > 0) {
@@ -35927,10 +35942,10 @@ function extractDeprecated(schema) {
35927
35942
  const meta = schema?.meta?.();
35928
35943
  return meta?.deprecated === true ? true : undefined;
35929
35944
  }
35930
- function globalOptionsLines(root = false, configFlag, globals) {
35945
+ function globalOptionsLines(root = false, configFlag, globals, hideSkills = false) {
35931
35946
  const lines = [];
35932
35947
  if (root) {
35933
- const builtins = builtinCommands.flatMap((b) => {
35948
+ const builtins = builtinCommands.filter((b) => !hideSkills || b.name !== "skills").flatMap((b) => {
35934
35949
  if (!b.subcommands)
35935
35950
  return [{ name: b.name, desc: b.description }];
35936
35951
  if (b.subcommands.length === 1)
@@ -35984,7 +35999,7 @@ function redact(value) {
35984
35999
  return `****${value.slice(-4)}`;
35985
36000
  }
35986
36001
 
35987
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/internal/cta.js
36002
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/internal/cta.js
35988
36003
  function formatCtaBlock(name, block) {
35989
36004
  if (!block || block.commands.length === 0)
35990
36005
  return;
@@ -36014,7 +36029,7 @@ function formatCta(name, cta) {
36014
36029
  return { command: cmd, ...cta.description ? { description: cta.description } : undefined };
36015
36030
  }
36016
36031
 
36017
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/internal/fsCommands.js
36032
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/internal/fsCommands.js
36018
36033
  import * as fs4 from "fs/promises";
36019
36034
  import * as path3 from "path";
36020
36035
  var extensions = [".cts", ".cjs", ".mts", ".mjs", ".ts", ".js"];
@@ -36082,7 +36097,7 @@ function assertSegment(segment, source) {
36082
36097
  throw new Error(`Invalid filesystem command segment '${segment}' from '${source}'. Use lowercase kebab-case names.`);
36083
36098
  }
36084
36099
 
36085
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Schema.js
36100
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Schema.js
36086
36101
  function toJsonSchema(schema) {
36087
36102
  const result = toJSONSchema(schema, {
36088
36103
  unrepresentable: "any",
@@ -36096,7 +36111,7 @@ function toJsonSchema(schema) {
36096
36111
  return result;
36097
36112
  }
36098
36113
 
36099
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Mcp.js
36114
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Mcp.js
36100
36115
  async function serve(name, version, commands, options = {}) {
36101
36116
  const stdio = importStdioModule();
36102
36117
  const mcp = await Promise.resolve().then(() => (init_dist(), exports_dist));
@@ -36439,7 +36454,7 @@ function buildToolSchema(args, options) {
36439
36454
  return { type: "object", properties };
36440
36455
  }
36441
36456
 
36442
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/internal/dereference.js
36457
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/internal/dereference.js
36443
36458
  function dereference(root) {
36444
36459
  const cache = new Map;
36445
36460
  return walk2(root, root, cache);
@@ -36491,7 +36506,7 @@ function resolvePointer(root, pointer) {
36491
36506
  return current;
36492
36507
  }
36493
36508
 
36494
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Openapi.js
36509
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Openapi.js
36495
36510
  function fromCli(cli, options = {}) {
36496
36511
  const commands = toCommands.get(cli);
36497
36512
  if (!commands)
@@ -37054,10 +37069,7 @@ function createHandler(config) {
37054
37069
  const response = await config.fetch(request);
37055
37070
  const output = await parseResponse(response);
37056
37071
  if (!output.ok)
37057
- return context.error({
37058
- code: `HTTP_${output.status}`,
37059
- message: typeof output.data === "object" && output.data !== null && "message" in output.data ? String(output.data.message) : typeof output.data === "string" ? output.data : `HTTP ${output.status}`
37060
- });
37072
+ return context.error(parseError(output));
37061
37073
  return output.data;
37062
37074
  };
37063
37075
  }
@@ -37087,7 +37099,7 @@ function coerceIfNeeded(schema) {
37087
37099
  return desc ? coerced.describe(desc) : coerced;
37088
37100
  }
37089
37101
 
37090
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/McpSource.js
37102
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/McpSource.js
37091
37103
  var protocolVersion = "2025-06-18";
37092
37104
  async function resolve4(source, options = {}) {
37093
37105
  const session = sourceSession(source);
@@ -37256,7 +37268,7 @@ function resultValue(result) {
37256
37268
  return textItems;
37257
37269
  }
37258
37270
 
37259
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Skill.js
37271
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Skill.js
37260
37272
  import { createHash } from "crypto";
37261
37273
  function index(name, commands, description) {
37262
37274
  const lines = [`# ${name}`];
@@ -37523,14 +37535,16 @@ function resolveTypeName2(prop) {
37523
37535
  return "unknown";
37524
37536
  }
37525
37537
 
37526
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/SyncMcp.js
37538
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/SyncMcp.js
37527
37539
  import { execFile as execFile2 } from "child_process";
37528
37540
  import { existsSync, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
37529
37541
  import { homedir as homedir2 } from "os";
37530
37542
  import { dirname as dirname3, join as join4 } from "path";
37543
+ var exactVersionPattern = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*)?(?:\+[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*)?$/;
37544
+ var safePackageNamePattern = /^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/;
37531
37545
  async function register3(name, options = {}) {
37532
37546
  const runner = detectRunner();
37533
- const command = options.command ?? defaultCommand(options.cli ?? name, runner);
37547
+ const command = options.command ?? defaultCommand(options.cli ?? name, runner, options.package, options.version);
37534
37548
  const targetAgents = options.agents ?? [];
37535
37549
  const ampOnly = targetAgents.length === 1 && targetAgents[0] === "amp";
37536
37550
  const agents = [];
@@ -37575,8 +37589,9 @@ function registerAmp(name, command) {
37575
37589
  `);
37576
37590
  return true;
37577
37591
  }
37578
- function defaultCommand(name, runner) {
37579
- return shouldUseBareCommand(name) ? `${name} --mcp` : `${runner} ${detectPackageSpecifier(name)} --mcp`;
37592
+ function defaultCommand(name, runner, pkg, version) {
37593
+ const specifier = pkg !== undefined ? detectPackageSpecifier(name, pkg, version) : undefined;
37594
+ return shouldUseBareCommand(name, pkg) ? `${name} --mcp` : `${runner} ${specifier ?? detectPackageSpecifier(name)} --mcp`;
37580
37595
  }
37581
37596
  function nodeModulesInfo() {
37582
37597
  const normalized = process.argv[1]?.replace(/\\/g, "/");
@@ -37585,13 +37600,13 @@ function nodeModulesInfo() {
37585
37600
  return null;
37586
37601
  return { root: match[1], entry: match[2] };
37587
37602
  }
37588
- function shouldUseBareCommand(name) {
37603
+ function shouldUseBareCommand(name, pkg) {
37589
37604
  const bin = process.argv[1];
37590
37605
  if (!bin)
37591
37606
  return false;
37592
37607
  const info = nodeModulesInfo();
37593
37608
  if (info)
37594
- return !info.entry.startsWith(".bin/") && !packageDependsOn(info.root, name);
37609
+ return !info.entry.startsWith(".bin/") && !packageDependsOn(info.root, pkg ?? name);
37595
37610
  const file = bin.replace(/\\/g, "/").split("/").pop();
37596
37611
  return file === name || file === `${name}.cmd` || file === `${name}.ps1`;
37597
37612
  }
@@ -37609,21 +37624,14 @@ function packageDependsOn(root, name) {
37609
37624
  return false;
37610
37625
  }
37611
37626
  }
37612
- function detectPackageSpecifier(name) {
37613
- const info = nodeModulesInfo();
37614
- if (!info)
37615
- return name;
37616
- try {
37617
- const pkg = JSON.parse(readFileSync2(join4(info.root, "package.json"), "utf-8"));
37618
- const deps = pkg.dependencies ?? {};
37619
- const spec = deps[name];
37620
- if (!spec || Object.keys(deps).length !== 1)
37621
- return name;
37622
- if (/^https?:\/\//.test(spec) || spec.startsWith("file:"))
37623
- return spec;
37624
- if (/^\d/.test(spec))
37625
- return `${name}@${spec}`;
37626
- } catch {}
37627
+ function detectPackageSpecifier(name, pkg, version) {
37628
+ if (pkg !== undefined) {
37629
+ if (!safePackageNamePattern.test(pkg))
37630
+ throw new Error(`Invalid npm package name: ${pkg}`);
37631
+ if (version !== undefined && !exactVersionPattern.test(version))
37632
+ throw new Error(`Invalid exact package version: ${version}`);
37633
+ return version === undefined ? pkg : `${pkg}@${version}`;
37634
+ }
37627
37635
  return name;
37628
37636
  }
37629
37637
  function splitCommand(input) {
@@ -37663,13 +37671,13 @@ function exec2(cmd, args) {
37663
37671
  });
37664
37672
  }
37665
37673
 
37666
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/SyncSkills.js
37674
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/SyncSkills.js
37667
37675
  import fsSync from "fs";
37668
37676
  import fs6 from "fs/promises";
37669
37677
  import os3 from "os";
37670
37678
  import path5 from "path";
37671
37679
 
37672
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/internal/agents.js
37680
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/internal/agents.js
37673
37681
  import * as fs5 from "fs";
37674
37682
  import * as os2 from "os";
37675
37683
  import * as path4 from "path";
@@ -37945,7 +37953,7 @@ function resolveParent(dir) {
37945
37953
  }
37946
37954
  }
37947
37955
 
37948
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/SyncSkills.js
37956
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/SyncSkills.js
37949
37957
  async function sync(name, commands, options = {}) {
37950
37958
  const { depth = 1, description, global = true } = options;
37951
37959
  const cwd = options.cwd ?? (global ? resolvePackageRoot() : process.cwd());
@@ -38104,7 +38112,7 @@ function readHash(name) {
38104
38112
  return readMeta(name)?.hash;
38105
38113
  }
38106
38114
 
38107
- // ../node_modules/.bun/incur@0.5.1/node_modules/incur/dist/Cli.js
38115
+ // ../node_modules/.bun/incur@0.6.1/node_modules/incur/dist/Cli.js
38108
38116
  var destructiveCommandHint = "Confirm with the user before executing this destructive command.";
38109
38117
  var fileCommandSymbol = Symbol.for("incur.fileCommand");
38110
38118
  function create(nameOrDefinition, definition) {
@@ -38270,6 +38278,7 @@ function create(nameOrDefinition, definition) {
38270
38278
  mcp: def.mcp,
38271
38279
  middlewares,
38272
38280
  outputPolicy: def.outputPolicy,
38281
+ package: def.package,
38273
38282
  rootCommand: rootDef,
38274
38283
  rootFetch,
38275
38284
  sync: def.sync,
@@ -38340,6 +38349,9 @@ async function serveImpl(name, commands, argv, options = {}) {
38340
38349
  const configEnabled = options.config !== undefined;
38341
38350
  const configFlag = options.config?.flag;
38342
38351
  const displayName = resolveDisplayName(name, options.aliases);
38352
+ const skillsEnabled = options.sync !== false;
38353
+ const sync2 = options.sync === false ? undefined : options.sync;
38354
+ const builtins = skillsEnabled ? builtinCommands : builtinCommands.filter((command) => command.name !== "skills");
38343
38355
  function writeln(s) {
38344
38356
  stdout(s.endsWith(`
38345
38357
  `) ? s : `${s}
@@ -38465,7 +38477,7 @@ async function serveImpl(name, commands, argv, options = {}) {
38465
38477
  const current = words[index] ?? "";
38466
38478
  const nonFlags = words.slice(0, index).filter((w) => !w.startsWith("-"));
38467
38479
  if (nonFlags.length <= 1) {
38468
- for (const b of builtinCommands) {
38480
+ for (const b of builtins) {
38469
38481
  if (b.name.startsWith(current) && !candidates.some((c) => c.value === b.name))
38470
38482
  candidates.push({
38471
38483
  value: b.name,
@@ -38476,7 +38488,7 @@ async function serveImpl(name, commands, argv, options = {}) {
38476
38488
  } else if (nonFlags.length === 2) {
38477
38489
  const parent = nonFlags[nonFlags.length - 1];
38478
38490
  const builtin = findBuiltin(parent);
38479
- if (builtin?.subcommands) {
38491
+ if (builtin?.subcommands && builtins.includes(builtin)) {
38480
38492
  for (const sub of builtin.subcommands)
38481
38493
  for (const value of [sub.name, ...sub.aliases ?? []])
38482
38494
  if (value.startsWith(current) && !candidates.some((c) => c.value === value))
@@ -38490,16 +38502,16 @@ async function serveImpl(name, commands, argv, options = {}) {
38490
38502
  return;
38491
38503
  }
38492
38504
  let skillsCta;
38493
- if (!llms && !llmsFull && !schema && !help && !update && !updateCheck && !version) {
38505
+ if (skillsEnabled && !llms && !llmsFull && !schema && !help && !update && !updateCheck && !version) {
38494
38506
  const isSkillsAdd = builtinIdx(filtered, name, "skills") !== -1;
38495
38507
  const isMcpAdd = builtinIdx(filtered, name, "mcp") !== -1;
38496
38508
  if (!isSkillsAdd && !isMcpAdd) {
38497
38509
  const stored = readHash(name);
38498
- if (stored && hasInstalledSkills(name, { cwd: options.sync?.cwd })) {
38510
+ if (stored && hasInstalledSkills(name, { cwd: sync2?.cwd })) {
38499
38511
  const groups = new Map;
38500
38512
  const entries = collectSkillCommands(commands, [], groups, options.rootCommand);
38501
38513
  if (hash2(entries) !== stored) {
38502
- const command = process.env.npm_config_user_agent || process.env.npm_execpath ? `${detectRunner()} ${detectPackageSpecifier(name)} skills add` : `${displayName} skills add`;
38514
+ const command = process.env.npm_config_user_agent || process.env.npm_execpath ? `${detectRunner()} ${detectPackageSpecifier(name, options.package, options.version)} skills add` : `${displayName} skills add`;
38503
38515
  skillsCta = {
38504
38516
  description: "Skills are out of date:",
38505
38517
  commands: [{ command, description: "sync outdated skills" }]
@@ -38579,7 +38591,7 @@ async function serveImpl(name, commands, argv, options = {}) {
38579
38591
  `));
38580
38592
  return;
38581
38593
  }
38582
- const skillsIdx = builtinIdx(filtered, name, "skills");
38594
+ const skillsIdx = skillsEnabled ? builtinIdx(filtered, name, "skills") : -1;
38583
38595
  if (skillsIdx !== -1) {
38584
38596
  const builtin = findBuiltin("skills");
38585
38597
  const skillsSub = filtered[skillsIdx + 1];
@@ -38621,10 +38633,10 @@ async function serveImpl(name, commands, argv, options = {}) {
38621
38633
  }
38622
38634
  try {
38623
38635
  const result = await list(name, commands, {
38624
- cwd: options.sync?.cwd,
38625
- depth: options.sync?.depth ?? 1,
38636
+ cwd: sync2?.cwd,
38637
+ depth: sync2?.depth ?? 1,
38626
38638
  description: options.description,
38627
- include: options.sync?.include,
38639
+ include: sync2?.include,
38628
38640
  rootCommand: options.rootCommand
38629
38641
  });
38630
38642
  if (result.length === 0) {
@@ -38659,16 +38671,16 @@ async function serveImpl(name, commands, argv, options = {}) {
38659
38671
  const rest = filtered.slice(skillsIdx + 2);
38660
38672
  const depthArg = rest.indexOf("--depth");
38661
38673
  const depthEq = rest.find((t) => t.startsWith("--depth="));
38662
- const depth = depthArg !== -1 ? Number(rest[depthArg + 1]) : depthEq ? Number(depthEq.split("=")[1]) : options.sync?.depth ?? 1;
38674
+ const depth = depthArg !== -1 ? Number(rest[depthArg + 1]) : depthEq ? Number(depthEq.split("=")[1]) : sync2?.depth ?? 1;
38663
38675
  const global = rest.includes("--no-global") ? false : undefined;
38664
38676
  try {
38665
38677
  stdout("Syncing...");
38666
38678
  const result = await sync(name, commands, {
38667
- cwd: options.sync?.cwd,
38679
+ cwd: sync2?.cwd,
38668
38680
  depth,
38669
38681
  description: options.description,
38670
38682
  global,
38671
- include: options.sync?.include,
38683
+ include: sync2?.include,
38672
38684
  rootCommand: options.rootCommand
38673
38685
  });
38674
38686
  stdout("\r\x1B[K");
@@ -38682,12 +38694,12 @@ async function serveImpl(name, commands, argv, options = {}) {
38682
38694
  }
38683
38695
  lines.push("");
38684
38696
  lines.push(`${result.skills.length} skill${result.skills.length === 1 ? "" : "s"} synced`);
38685
- const body = options.sync?.body;
38697
+ const body = sync2?.body;
38686
38698
  if (body) {
38687
38699
  lines.push("");
38688
38700
  lines.push(body);
38689
38701
  }
38690
- const suggestions = options.sync?.suggestions;
38702
+ const suggestions = sync2?.suggestions;
38691
38703
  if (suggestions && suggestions.length > 0) {
38692
38704
  lines.push("");
38693
38705
  lines.push(`Your agent can now use ${name}. Try asking:`);
@@ -38772,7 +38784,8 @@ async function serveImpl(name, commands, argv, options = {}) {
38772
38784
  ...mcpName === name ? undefined : { cli: name },
38773
38785
  command,
38774
38786
  global,
38775
- agents
38787
+ agents,
38788
+ ...options.package !== undefined ? { package: options.package, version: options.version } : undefined
38776
38789
  });
38777
38790
  stdout("\r\x1B[K");
38778
38791
  const lines = [];
@@ -38781,7 +38794,7 @@ async function serveImpl(name, commands, argv, options = {}) {
38781
38794
  lines.push(` Agents: ${result.agents.join(", ")}`);
38782
38795
  lines.push("");
38783
38796
  lines.push(`Agents can now use ${mcpName} tools.`);
38784
- const suggestions = options.sync?.suggestions;
38797
+ const suggestions = sync2?.suggestions;
38785
38798
  if (suggestions && suggestions.length > 0) {
38786
38799
  lines.push("");
38787
38800
  lines.push("Try asking:");
@@ -38821,6 +38834,7 @@ async function serveImpl(name, commands, argv, options = {}) {
38821
38834
  examples: formatExamples(cmd.examples),
38822
38835
  usage: cmd.usage,
38823
38836
  commands: commands.size > 0 ? collectHelpCommands(commands) : undefined,
38837
+ hideSkills: !skillsEnabled,
38824
38838
  root: true
38825
38839
  }));
38826
38840
  return;
@@ -38834,6 +38848,7 @@ async function serveImpl(name, commands, argv, options = {}) {
38834
38848
  globals: options.globals,
38835
38849
  version: options.version,
38836
38850
  commands: collectHelpCommands(commands),
38851
+ hideSkills: !skillsEnabled,
38837
38852
  root: true
38838
38853
  }));
38839
38854
  return;
@@ -38858,6 +38873,7 @@ async function serveImpl(name, commands, argv, options = {}) {
38858
38873
  description: options.description,
38859
38874
  version: options.version,
38860
38875
  commands: collectHelpCommands(commands),
38876
+ hideSkills: !skillsEnabled,
38861
38877
  root: true
38862
38878
  }));
38863
38879
  else
@@ -38887,6 +38903,7 @@ async function serveImpl(name, commands, argv, options = {}) {
38887
38903
  examples: formatExamples(cmd.examples),
38888
38904
  usage: cmd.usage,
38889
38905
  commands: collectHelpCommands(helpCmds),
38906
+ hideSkills: !skillsEnabled,
38890
38907
  root: true
38891
38908
  }));
38892
38909
  } else {
@@ -38897,6 +38914,7 @@ async function serveImpl(name, commands, argv, options = {}) {
38897
38914
  globals: options.globals,
38898
38915
  version: isRoot ? options.version : undefined,
38899
38916
  commands: collectHelpCommands(helpCmds),
38917
+ hideSkills: !skillsEnabled,
38900
38918
  root: isRoot
38901
38919
  }));
38902
38920
  }
@@ -38920,6 +38938,7 @@ async function serveImpl(name, commands, argv, options = {}) {
38920
38938
  examples: formatExamples(cmd.examples),
38921
38939
  usage: cmd.usage,
38922
38940
  commands: helpSubcommands,
38941
+ hideSkills: !skillsEnabled,
38923
38942
  root: isRootCmd
38924
38943
  }));
38925
38944
  }
@@ -38995,7 +39014,7 @@ async function serveImpl(name, commands, argv, options = {}) {
38995
39014
  await load();
38996
39015
  const rootFallbackBlocked = "error" in resolved && !resolved.path && (() => {
38997
39016
  const candidates = [...resolved.commands.keys()];
38998
- for (const b of builtinCommands)
39017
+ for (const b of builtins)
38999
39018
  candidates.push(b.name);
39000
39019
  return suggest(resolved.error, candidates) !== undefined;
39001
39020
  })();
@@ -39092,7 +39111,7 @@ async function serveImpl(name, commands, argv, options = {}) {
39092
39111
  const parent = effective.path ? `${name} ${effective.path}` : name;
39093
39112
  const candidates = "commands" in effective ? [...effective.commands.keys()] : [];
39094
39113
  if (!effective.path)
39095
- for (const b of builtinCommands)
39114
+ for (const b of builtins)
39096
39115
  candidates.push(b.name);
39097
39116
  const suggestion = suggest(effective.error, candidates);
39098
39117
  const didYouMean = suggestion ? ` Did you mean '${suggestion}'?` : "";
@@ -39171,10 +39190,7 @@ async function serveImpl(name, commands, argv, options = {}) {
39171
39190
  } else {
39172
39191
  write({
39173
39192
  ok: false,
39174
- error: {
39175
- code: `HTTP_${output.status}`,
39176
- message: typeof output.data === "object" && output.data !== null && "message" in output.data ? String(output.data.message) : typeof output.data === "string" ? output.data : `HTTP ${output.status}`
39177
- },
39193
+ error: parseError(output),
39178
39194
  meta: {
39179
39195
  command: path,
39180
39196
  duration: `${Math.round(performance.now() - start)}ms`
@@ -41653,30 +41669,38 @@ function pathTarget(route, path) {
41653
41669
  }
41654
41670
 
41655
41671
  // ../sdk/src/proxy/transport.ts
41656
- var CONTEXT_HEADERS = {
41672
+ var DALP_CONTEXT_HEADERS = {
41657
41673
  organizationId: "X-Organization-Id",
41658
41674
  participant: "X-Participant",
41659
41675
  executor: "X-Executor",
41660
41676
  chainId: "X-Chain-Id",
41677
+ networkId: "X-Network-Id",
41661
41678
  selectedSigners: "X-Selected-Signers",
41679
+ custodyAccountId: "X-Custody-Account-Id",
41662
41680
  idempotencyKey: "Idempotency-Key"
41663
41681
  };
41682
+ var CONTEXT_HEADERS = DALP_CONTEXT_HEADERS;
41683
+ function serializeDalpContextHeaders(context) {
41684
+ const headers = new Headers;
41685
+ setNonEmptyHeader(headers, DALP_CONTEXT_HEADERS.organizationId, context.organizationId);
41686
+ setNonEmptyHeader(headers, DALP_CONTEXT_HEADERS.participant, context.participant);
41687
+ setNonEmptyHeader(headers, DALP_CONTEXT_HEADERS.executor, context.executor);
41688
+ setNonEmptyHeader(headers, DALP_CONTEXT_HEADERS.chainId, context.chainId);
41689
+ setNonEmptyHeader(headers, DALP_CONTEXT_HEADERS.networkId, context.networkId);
41690
+ setNonEmptyHeader(headers, DALP_CONTEXT_HEADERS.custodyAccountId, context.custodyAccountId);
41691
+ setNonEmptyHeader(headers, DALP_CONTEXT_HEADERS.idempotencyKey, context.idempotencyKey);
41692
+ if (context.selectedSigners !== undefined && context.selectedSigners.length > 0) {
41693
+ headers.set(DALP_CONTEXT_HEADERS.selectedSigners, JSON.stringify(context.selectedSigners));
41694
+ }
41695
+ return headers;
41696
+ }
41664
41697
  function setNonEmptyHeader(headers, name, value) {
41665
41698
  if (value !== undefined && String(value).trim().length > 0) {
41666
41699
  headers.set(name, String(value));
41667
41700
  }
41668
41701
  }
41669
41702
  function createDalpContextHeaders(context) {
41670
- const headers = new Headers;
41671
- setNonEmptyHeader(headers, CONTEXT_HEADERS.organizationId, context.organizationId);
41672
- setNonEmptyHeader(headers, CONTEXT_HEADERS.participant, context.participant);
41673
- setNonEmptyHeader(headers, CONTEXT_HEADERS.executor, context.executor);
41674
- setNonEmptyHeader(headers, CONTEXT_HEADERS.chainId, context.chainId);
41675
- setNonEmptyHeader(headers, CONTEXT_HEADERS.idempotencyKey, context.idempotencyKey);
41676
- if (context.selectedSigners !== undefined && context.selectedSigners.length > 0) {
41677
- headers.set(CONTEXT_HEADERS.selectedSigners, JSON.stringify(context.selectedSigners));
41678
- }
41679
- return headers;
41703
+ return serializeDalpContextHeaders(context);
41680
41704
  }
41681
41705
  var DEFAULT_PREFER_WAIT_SECONDS = 15;
41682
41706
  var MIN_PREFER_WAIT_SECONDS = 5;
@@ -43377,7 +43401,7 @@ var data5 = JSON.parse('{"version":1,"entries":{"BAD_REQUEST":{"id":"DALP-0001",
43377
43401
  // ../sdk/package.json
43378
43402
  var package_default = {
43379
43403
  name: "@settlemint/dalp-sdk",
43380
- version: "3.1.26-main.37123896382",
43404
+ version: "3.1.26-main.37130318643",
43381
43405
  private: false,
43382
43406
  description: "Fully typed SDK for the DALP tokenization platform API",
43383
43407
  homepage: "https://settlemint.com",
@@ -100840,7 +100864,7 @@ async function runCommand(context, operation, errorContext = UNKNOWN_COMMAND_ERR
100840
100864
  // package.json
100841
100865
  var package_default2 = {
100842
100866
  name: "@settlemint/dalp-cli",
100843
- version: "3.1.26-main.37123896382",
100867
+ version: "3.1.26-main.37130318643",
100844
100868
  private: false,
100845
100869
  description: "CLI for the Digital Asset Lifecycle Platform \u2014 manage tokens, identities, compliance, and more from the command line.",
100846
100870
  homepage: "https://settlemint.com",
@@ -100886,7 +100910,7 @@ var package_default2 = {
100886
100910
  },
100887
100911
  dependencies: {
100888
100912
  "@settlemint/dalp-sdk": "workspace:*",
100889
- incur: "0.5.1",
100913
+ incur: "0.6.1",
100890
100914
  zod: "4.6.5"
100891
100915
  },
100892
100916
  devDependencies: {
@@ -102203,4 +102227,4 @@ if (false) {}
102203
102227
  // src/bin.ts
102204
102228
  await cli.serve();
102205
102229
 
102206
- //# debugId=00FB4F3D8D796E6464756E2164756E21
102230
+ //# debugId=160C9FB9CC7B436F64756E2164756E21