@lambdacurry/arbor 0.20.16 → 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.
- package/dist/arbor.js +46 -50
- package/package.json +1 -1
package/dist/arbor.js
CHANGED
|
@@ -17802,21 +17802,14 @@ var MCP_OUTPUT_SCHEMAS = {
|
|
|
17802
17802
|
replayed: exports_external.boolean()
|
|
17803
17803
|
}),
|
|
17804
17804
|
computer_stop: exports_external.looseObject({ checkpoint, stopped: jsonObject }),
|
|
17805
|
-
code_symbols: exports_external.
|
|
17806
|
-
computerSessionId: id,
|
|
17807
|
-
path: exports_external.string(),
|
|
17805
|
+
code_symbols: exports_external.object({
|
|
17808
17806
|
symbols: exports_external.array(codeSymbol)
|
|
17809
17807
|
}),
|
|
17810
|
-
code_find_symbol: exports_external.
|
|
17811
|
-
computerSessionId: id,
|
|
17812
|
-
namePath: exports_external.string(),
|
|
17808
|
+
code_find_symbol: exports_external.object({
|
|
17813
17809
|
symbols: exports_external.array(codeSymbol)
|
|
17814
17810
|
}),
|
|
17815
|
-
code_references: exports_external.
|
|
17816
|
-
|
|
17817
|
-
namePath: exports_external.string(),
|
|
17818
|
-
path: exports_external.string(),
|
|
17819
|
-
references: exports_external.array(exports_external.looseObject({
|
|
17811
|
+
code_references: exports_external.object({
|
|
17812
|
+
references: exports_external.array(exports_external.object({
|
|
17820
17813
|
path: exports_external.string(),
|
|
17821
17814
|
namePath: exports_external.string().optional(),
|
|
17822
17815
|
startLine: exports_external.number().optional(),
|
|
@@ -17824,16 +17817,11 @@ var MCP_OUTPUT_SCHEMAS = {
|
|
|
17824
17817
|
})),
|
|
17825
17818
|
truncated: exports_external.boolean()
|
|
17826
17819
|
}),
|
|
17827
|
-
code_implementations: exports_external.
|
|
17828
|
-
computerSessionId: id,
|
|
17829
|
-
namePath: exports_external.string(),
|
|
17830
|
-
path: exports_external.string(),
|
|
17820
|
+
code_implementations: exports_external.object({
|
|
17831
17821
|
symbols: exports_external.array(codeSymbol)
|
|
17832
17822
|
}),
|
|
17833
|
-
code_diagnostics: exports_external.
|
|
17834
|
-
|
|
17835
|
-
path: exports_external.string(),
|
|
17836
|
-
diagnostics: exports_external.array(exports_external.looseObject({
|
|
17823
|
+
code_diagnostics: exports_external.object({
|
|
17824
|
+
diagnostics: exports_external.array(exports_external.object({
|
|
17837
17825
|
severity: exports_external.enum(["error", "warning", "information", "hint"]),
|
|
17838
17826
|
message: exports_external.string(),
|
|
17839
17827
|
path: exports_external.string(),
|
|
@@ -18713,8 +18701,8 @@ var ACTION_DEFINITIONS = [
|
|
|
18713
18701
|
title: "Outline a file's symbols",
|
|
18714
18702
|
description: "READ ONLY: Outline real declarations in a file or directory when you need structure without reading or searching the whole source. Uses the language server to return symbols and kinds, distinguishing declarations from textual matches.",
|
|
18715
18703
|
inputSchema: {
|
|
18716
|
-
computerSessionId: exports_external.string().describe("
|
|
18717
|
-
runId: exports_external.string().optional().describe("
|
|
18704
|
+
computerSessionId: exports_external.string().optional().describe("parent Computer target; optional when runId is supplied, otherwise required; if both are supplied they must agree"),
|
|
18705
|
+
runId: exports_external.string().optional().describe("Run target that resolves its owning Computer session, run_…"),
|
|
18718
18706
|
path: exports_external.string().max(512).describe("file or directory, absolute under /workspace or workspace-relative")
|
|
18719
18707
|
},
|
|
18720
18708
|
surfaces: ["computer-mcp", "computer-cli"],
|
|
@@ -18726,8 +18714,8 @@ var ACTION_DEFINITIONS = [
|
|
|
18726
18714
|
title: "Find a symbol by name path",
|
|
18727
18715
|
description: "READ ONLY: Locate a declaration by name path when you need the definition rather than text matches. Uses the language server and can include the symbol body and bounded child depth.",
|
|
18728
18716
|
inputSchema: {
|
|
18729
|
-
computerSessionId: exports_external.string().describe("
|
|
18730
|
-
runId: exports_external.string().optional().describe("
|
|
18717
|
+
computerSessionId: exports_external.string().optional().describe("parent Computer target; optional when runId is supplied, otherwise required; if both are supplied they must agree"),
|
|
18718
|
+
runId: exports_external.string().optional().describe("Run target that resolves its owning Computer session, run_…"),
|
|
18731
18719
|
namePath: exports_external.string().min(1).max(200).describe("symbol name path within a file, e.g. MyClass/myMethod"),
|
|
18732
18720
|
path: exports_external.string().max(512).optional().describe("optional file or directory to restrict the search to"),
|
|
18733
18721
|
includeBody: exports_external.boolean().optional().describe("include each symbol's source body"),
|
|
@@ -18742,8 +18730,8 @@ var ACTION_DEFINITIONS = [
|
|
|
18742
18730
|
title: "Find what references a symbol",
|
|
18743
18731
|
description: "READ ONLY: Find semantic references to a declaration when you need to know what actually depends on it before a change. Uses the language server to return resolved references with snippets, excluding unrelated textual matches.",
|
|
18744
18732
|
inputSchema: {
|
|
18745
|
-
computerSessionId: exports_external.string().describe("
|
|
18746
|
-
runId: exports_external.string().optional().describe("
|
|
18733
|
+
computerSessionId: exports_external.string().optional().describe("parent Computer target; optional when runId is supplied, otherwise required; if both are supplied they must agree"),
|
|
18734
|
+
runId: exports_external.string().optional().describe("Run target that resolves its owning Computer session, run_…"),
|
|
18747
18735
|
namePath: exports_external.string().min(1).max(200).describe("name path of the symbol to trace"),
|
|
18748
18736
|
path: exports_external.string().max(512).describe("the file declaring that symbol, absolute under /workspace or workspace-relative")
|
|
18749
18737
|
},
|
|
@@ -18756,8 +18744,8 @@ var ACTION_DEFINITIONS = [
|
|
|
18756
18744
|
title: "Find implementations of a symbol",
|
|
18757
18745
|
description: "READ ONLY: Find concrete implementations or subtypes of an interface, abstract type, or method. Uses the language server to resolve type relationships that text search cannot follow.",
|
|
18758
18746
|
inputSchema: {
|
|
18759
|
-
computerSessionId: exports_external.string().describe("
|
|
18760
|
-
runId: exports_external.string().optional().describe("
|
|
18747
|
+
computerSessionId: exports_external.string().optional().describe("parent Computer target; optional when runId is supplied, otherwise required; if both are supplied they must agree"),
|
|
18748
|
+
runId: exports_external.string().optional().describe("Run target that resolves its owning Computer session, run_…"),
|
|
18761
18749
|
namePath: exports_external.string().min(1).max(200).describe("name path of the interface, type, or method"),
|
|
18762
18750
|
path: exports_external.string().max(512).describe("the file declaring that symbol, absolute under /workspace or workspace-relative")
|
|
18763
18751
|
},
|
|
@@ -18770,8 +18758,8 @@ var ACTION_DEFINITIONS = [
|
|
|
18770
18758
|
title: "Read language-server diagnostics for a file",
|
|
18771
18759
|
description: "READ ONLY: Check live language-server errors and warnings for one file, especially after an edit. Returns diagnostics mapped to symbols for fast local feedback; it does not replace a whole-project build or typecheck.",
|
|
18772
18760
|
inputSchema: {
|
|
18773
|
-
computerSessionId: exports_external.string().describe("
|
|
18774
|
-
runId: exports_external.string().optional().describe("
|
|
18761
|
+
computerSessionId: exports_external.string().optional().describe("parent Computer target; optional when runId is supplied, otherwise required; if both are supplied they must agree"),
|
|
18762
|
+
runId: exports_external.string().optional().describe("Run target that resolves its owning Computer session, run_…"),
|
|
18775
18763
|
path: exports_external.string().max(512).describe("the file to inspect, absolute under /workspace or workspace-relative")
|
|
18776
18764
|
},
|
|
18777
18765
|
surfaces: ["computer-mcp", "computer-cli"],
|
|
@@ -20822,7 +20810,13 @@ var BY_COMMAND = new Map(CLI_ACTIONS.map((a) => [commandWords(a), a]));
|
|
|
20822
20810
|
var MAX_WORDS = Math.max(1, ...CLI_ACTIONS.map((a) => commandWords(a).split(" ").length));
|
|
20823
20811
|
var POSITIONAL_FIELDS = {
|
|
20824
20812
|
app_fetch: ["appId", "path"],
|
|
20825
|
-
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"]
|
|
20826
20820
|
};
|
|
20827
20821
|
function positionalSpecs(action) {
|
|
20828
20822
|
const fields = POSITIONAL_FIELDS[action.name];
|
|
@@ -20891,7 +20885,7 @@ function toolNameAlias(action) {
|
|
|
20891
20885
|
function helpLine(action) {
|
|
20892
20886
|
const positionals = positionalSpecs(action);
|
|
20893
20887
|
const positionalFlags = new Set(positionals.map((spec) => spec.flag));
|
|
20894
|
-
const args = positionals.map((spec) => ` <${spec.field}>`).join("");
|
|
20888
|
+
const args = positionals.map((spec) => spec.required ? ` <${spec.field}>` : ` [<${spec.field}>]`).join("");
|
|
20895
20889
|
const flags = flagsForSchema(action.inputSchema).filter((spec) => !positionalFlags.has(spec.flag)).map((f) => {
|
|
20896
20890
|
const token = f.kind === "boolean" ? `--${f.flag}` : `--${f.flag} <>`;
|
|
20897
20891
|
return f.required ? token : `[${token}]`;
|
|
@@ -20916,7 +20910,7 @@ function commandHelp(positionals) {
|
|
|
20916
20910
|
const token = f.kind === "boolean" ? `--${f.flag}` : `--${f.flag} <${f.kind}>`;
|
|
20917
20911
|
return f.required ? token : `[${token}]`;
|
|
20918
20912
|
}).join(" ");
|
|
20919
|
-
const explicitArgs = explicitPositionals.map((spec) => ` <${spec.field}>`).join("");
|
|
20913
|
+
const explicitArgs = explicitPositionals.map((spec) => spec.required ? ` <${spec.field}>` : ` [<${spec.field}>]`).join("");
|
|
20920
20914
|
const usage = `Usage: arbor ${commandWords(action)}${explicitArgs}${primary ? ` [<${primary.field}>]` : ""}${usageFlags ? ` ${usageFlags}` : ""}`;
|
|
20921
20915
|
const lines = specs.map((f) => {
|
|
20922
20916
|
const req = f.required ? "required" : "optional";
|
|
@@ -20960,6 +20954,25 @@ function commandCatalog() {
|
|
|
20960
20954
|
}))
|
|
20961
20955
|
}));
|
|
20962
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
|
+
}
|
|
20963
20976
|
async function runObjectVerb(positionals, flags, ctx) {
|
|
20964
20977
|
const match = matchCommand(positionals);
|
|
20965
20978
|
if (!match) {
|
|
@@ -20967,24 +20980,7 @@ async function runObjectVerb(positionals, flags, ctx) {
|
|
|
20967
20980
|
throw new UsageError(`unknown command: ${typed} — ${suggestCommand(positionals)}`);
|
|
20968
20981
|
}
|
|
20969
20982
|
const { action, words } = match;
|
|
20970
|
-
|
|
20971
|
-
if (extras.length > 0) {
|
|
20972
|
-
const explicitPositionals = positionalSpecs(action);
|
|
20973
|
-
const positionalTargets = explicitPositionals.length > 0 ? explicitPositionals : [primaryPositionalField(action.inputSchema)].filter((spec) => spec !== undefined);
|
|
20974
|
-
if (positionalTargets.length === 0) {
|
|
20975
|
-
throw new UsageError(`unexpected argument: ${extras[0]} (\`${commandWords(action)}\` takes no positional — use flags)`);
|
|
20976
|
-
}
|
|
20977
|
-
if (extras.length > positionalTargets.length) {
|
|
20978
|
-
throw new UsageError(`too many arguments: \`${commandWords(action)}\` takes ${positionalTargets.length === 1 ? "one positional" : `${positionalTargets.length} positionals`}; pass the rest as flags`);
|
|
20979
|
-
}
|
|
20980
|
-
for (const [index2, value2] of extras.entries()) {
|
|
20981
|
-
const target = positionalTargets[index2];
|
|
20982
|
-
if (flags[target.flag] !== undefined || flags[`${target.flag}-file`] !== undefined) {
|
|
20983
|
-
throw new UsageError(`pass --${target.flag} either as a flag or as the positional argument, not both`);
|
|
20984
|
-
}
|
|
20985
|
-
flags[target.flag] = value2;
|
|
20986
|
-
}
|
|
20987
|
-
}
|
|
20983
|
+
applyPositionals(action, positionals.slice(words), flags);
|
|
20988
20984
|
const accepted = acceptedFlags(action.inputSchema);
|
|
20989
20985
|
const unknown2 = Object.keys(flags).filter((f) => !accepted.has(f) && !RESERVED_FLAGS.has(f));
|
|
20990
20986
|
if (unknown2.length > 0) {
|
package/package.json
CHANGED