@lambdacurry/arbor 0.20.17 → 0.20.18

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/arbor.js +29 -21
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -20810,7 +20810,13 @@ var BY_COMMAND = new Map(CLI_ACTIONS.map((a) => [commandWords(a), a]));
20810
20810
  var MAX_WORDS = Math.max(1, ...CLI_ACTIONS.map((a) => commandWords(a).split(" ").length));
20811
20811
  var POSITIONAL_FIELDS = {
20812
20812
  app_fetch: ["appId", "path"],
20813
- app_request: ["appId", "path"]
20813
+ app_request: ["appId", "path"],
20814
+ computer_run_start: ["computerSessionId", "mode"],
20815
+ code_symbols: ["path"],
20816
+ code_find_symbol: ["namePath", "path"],
20817
+ code_references: ["namePath", "path"],
20818
+ code_implementations: ["namePath", "path"],
20819
+ code_diagnostics: ["path"]
20814
20820
  };
20815
20821
  function positionalSpecs(action) {
20816
20822
  const fields = POSITIONAL_FIELDS[action.name];
@@ -20879,7 +20885,7 @@ function toolNameAlias(action) {
20879
20885
  function helpLine(action) {
20880
20886
  const positionals = positionalSpecs(action);
20881
20887
  const positionalFlags = new Set(positionals.map((spec) => spec.flag));
20882
- const args = positionals.map((spec) => ` <${spec.field}>`).join("");
20888
+ const args = positionals.map((spec) => spec.required ? ` <${spec.field}>` : ` [<${spec.field}>]`).join("");
20883
20889
  const flags = flagsForSchema(action.inputSchema).filter((spec) => !positionalFlags.has(spec.flag)).map((f) => {
20884
20890
  const token = f.kind === "boolean" ? `--${f.flag}` : `--${f.flag} <>`;
20885
20891
  return f.required ? token : `[${token}]`;
@@ -20904,7 +20910,7 @@ function commandHelp(positionals) {
20904
20910
  const token = f.kind === "boolean" ? `--${f.flag}` : `--${f.flag} <${f.kind}>`;
20905
20911
  return f.required ? token : `[${token}]`;
20906
20912
  }).join(" ");
20907
- const explicitArgs = explicitPositionals.map((spec) => ` <${spec.field}>`).join("");
20913
+ const explicitArgs = explicitPositionals.map((spec) => spec.required ? ` <${spec.field}>` : ` [<${spec.field}>]`).join("");
20908
20914
  const usage = `Usage: arbor ${commandWords(action)}${explicitArgs}${primary ? ` [<${primary.field}>]` : ""}${usageFlags ? ` ${usageFlags}` : ""}`;
20909
20915
  const lines = specs.map((f) => {
20910
20916
  const req = f.required ? "required" : "optional";
@@ -20948,6 +20954,25 @@ function commandCatalog() {
20948
20954
  }))
20949
20955
  }));
20950
20956
  }
20957
+ function applyPositionals(action, extras, flags) {
20958
+ if (extras.length === 0)
20959
+ return;
20960
+ const explicitPositionals = positionalSpecs(action);
20961
+ const positionalTargets = explicitPositionals.length > 0 ? explicitPositionals : [primaryPositionalField(action.inputSchema)].filter((spec) => spec !== undefined);
20962
+ if (positionalTargets.length === 0) {
20963
+ throw new UsageError(`unexpected argument: ${extras[0]} (\`${commandWords(action)}\` takes no positional — use flags)`);
20964
+ }
20965
+ if (extras.length > positionalTargets.length) {
20966
+ throw new UsageError(`too many arguments: \`${commandWords(action)}\` takes ${positionalTargets.length === 1 ? "one positional" : `${positionalTargets.length} positionals`}; pass the rest as flags`);
20967
+ }
20968
+ for (const [index2, value] of extras.entries()) {
20969
+ const target = positionalTargets[index2];
20970
+ if (flags[target.flag] !== undefined || flags[`${target.flag}-file`] !== undefined) {
20971
+ throw new UsageError(`pass --${target.flag} either as a flag or as the positional argument, not both`);
20972
+ }
20973
+ flags[target.flag] = value;
20974
+ }
20975
+ }
20951
20976
  async function runObjectVerb(positionals, flags, ctx) {
20952
20977
  const match = matchCommand(positionals);
20953
20978
  if (!match) {
@@ -20955,24 +20980,7 @@ async function runObjectVerb(positionals, flags, ctx) {
20955
20980
  throw new UsageError(`unknown command: ${typed} — ${suggestCommand(positionals)}`);
20956
20981
  }
20957
20982
  const { action, words } = match;
20958
- const extras = positionals.slice(words);
20959
- if (extras.length > 0) {
20960
- const explicitPositionals = positionalSpecs(action);
20961
- const positionalTargets = explicitPositionals.length > 0 ? explicitPositionals : [primaryPositionalField(action.inputSchema)].filter((spec) => spec !== undefined);
20962
- if (positionalTargets.length === 0) {
20963
- throw new UsageError(`unexpected argument: ${extras[0]} (\`${commandWords(action)}\` takes no positional — use flags)`);
20964
- }
20965
- if (extras.length > positionalTargets.length) {
20966
- throw new UsageError(`too many arguments: \`${commandWords(action)}\` takes ${positionalTargets.length === 1 ? "one positional" : `${positionalTargets.length} positionals`}; pass the rest as flags`);
20967
- }
20968
- for (const [index2, value2] of extras.entries()) {
20969
- const target = positionalTargets[index2];
20970
- if (flags[target.flag] !== undefined || flags[`${target.flag}-file`] !== undefined) {
20971
- throw new UsageError(`pass --${target.flag} either as a flag or as the positional argument, not both`);
20972
- }
20973
- flags[target.flag] = value2;
20974
- }
20975
- }
20983
+ applyPositionals(action, positionals.slice(words), flags);
20976
20984
  const accepted = acceptedFlags(action.inputSchema);
20977
20985
  const unknown2 = Object.keys(flags).filter((f) => !accepted.has(f) && !RESERVED_FLAGS.has(f));
20978
20986
  if (unknown2.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.20.17",
3
+ "version": "0.20.18",
4
4
  "description": "The Arbor CLI — a shared workspace for people and agents. The human + headless-agent write path over Arbor's guarded operation surface.",
5
5
  "keywords": [
6
6
  "agents",