sim 2.1.6-preview.83.1 → 2.1.6-preview.84.1
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/index.js +121 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8263,6 +8263,22 @@ var V2_OPERATIONS = {
|
|
|
8263
8263
|
}
|
|
8264
8264
|
}
|
|
8265
8265
|
},
|
|
8266
|
+
editFileContent: {
|
|
8267
|
+
method: "PATCH",
|
|
8268
|
+
path: "/api/v2/files/[fileId]/content",
|
|
8269
|
+
pathParams: ["fileId"],
|
|
8270
|
+
pathParamDocs: { fileId: "File identifier." },
|
|
8271
|
+
responseMode: "json",
|
|
8272
|
+
summary: "Edit File Content",
|
|
8273
|
+
body: {
|
|
8274
|
+
workspaceId: { kind: "string", required: true, describe: "Workspace that owns the file." },
|
|
8275
|
+
edit: {
|
|
8276
|
+
kind: "unknown",
|
|
8277
|
+
required: true,
|
|
8278
|
+
describe: "One exact or anchor-based edit: search_replace, replace_between, insert_after, or delete_between."
|
|
8279
|
+
}
|
|
8280
|
+
}
|
|
8281
|
+
},
|
|
8266
8282
|
executeTool: {
|
|
8267
8283
|
method: "POST",
|
|
8268
8284
|
path: "/api/v2/tools/[toolId]/execute",
|
|
@@ -9263,6 +9279,28 @@ var V2_OPERATIONS = {
|
|
|
9263
9279
|
values: ["active", "archived"],
|
|
9264
9280
|
default: "active",
|
|
9265
9281
|
describe: "Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive delete soft-deleted, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both."
|
|
9282
|
+
},
|
|
9283
|
+
recursive: {
|
|
9284
|
+
kind: "enum",
|
|
9285
|
+
values: [
|
|
9286
|
+
"true",
|
|
9287
|
+
"1",
|
|
9288
|
+
"yes",
|
|
9289
|
+
"on",
|
|
9290
|
+
"y",
|
|
9291
|
+
"enabled",
|
|
9292
|
+
"false",
|
|
9293
|
+
"0",
|
|
9294
|
+
"no",
|
|
9295
|
+
"off",
|
|
9296
|
+
"n",
|
|
9297
|
+
"disabled"
|
|
9298
|
+
],
|
|
9299
|
+
describe: "Whether parentPath includes every descendant instead of direct children only."
|
|
9300
|
+
},
|
|
9301
|
+
depth: {
|
|
9302
|
+
kind: "integer",
|
|
9303
|
+
describe: "Deepest level below parentPath to include when recursive is true."
|
|
9266
9304
|
}
|
|
9267
9305
|
}
|
|
9268
9306
|
},
|
|
@@ -10440,6 +10478,14 @@ var V2_OPERATIONS = {
|
|
|
10440
10478
|
maxBytes: {
|
|
10441
10479
|
kind: "integer",
|
|
10442
10480
|
describe: "Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit."
|
|
10481
|
+
},
|
|
10482
|
+
offset: {
|
|
10483
|
+
kind: "integer",
|
|
10484
|
+
describe: "First line to return, 1-based. Absent starts at the first line."
|
|
10485
|
+
},
|
|
10486
|
+
limit: {
|
|
10487
|
+
kind: "integer",
|
|
10488
|
+
describe: "How many lines to return from `offset`. Absent reads to the end."
|
|
10443
10489
|
}
|
|
10444
10490
|
}
|
|
10445
10491
|
},
|
|
@@ -10770,6 +10816,50 @@ var V2_OPERATIONS = {
|
|
|
10770
10816
|
workspaceId: { kind: "string", required: true, describe: "Unique workspace identifier." }
|
|
10771
10817
|
}
|
|
10772
10818
|
},
|
|
10819
|
+
searchFileContent: {
|
|
10820
|
+
method: "GET",
|
|
10821
|
+
path: "/api/v2/files/search",
|
|
10822
|
+
pathParams: [],
|
|
10823
|
+
responseMode: "json",
|
|
10824
|
+
summary: "Search File Content",
|
|
10825
|
+
query: {
|
|
10826
|
+
workspaceId: { kind: "string", required: true, describe: "Workspace to search." },
|
|
10827
|
+
query: {
|
|
10828
|
+
kind: "string",
|
|
10829
|
+
required: true,
|
|
10830
|
+
describe: "Regular expression, or exact text when `mode` is `exact`."
|
|
10831
|
+
},
|
|
10832
|
+
mode: {
|
|
10833
|
+
kind: "enum",
|
|
10834
|
+
values: ["exact", "regex"],
|
|
10835
|
+
default: "regex",
|
|
10836
|
+
describe: "How `query` is read."
|
|
10837
|
+
},
|
|
10838
|
+
maxResults: { kind: "integer", default: 50, describe: "Maximum matching lines to return." },
|
|
10839
|
+
folderPaths: {
|
|
10840
|
+
kind: "string",
|
|
10841
|
+
describe: "Folders the search is confined to, comma-separated. Absent searches the whole workspace. The scope also narrows `indexStatus`, so `complete` describes the folders searched rather than the workspace."
|
|
10842
|
+
},
|
|
10843
|
+
includeSubfolders: {
|
|
10844
|
+
kind: "enum",
|
|
10845
|
+
values: [
|
|
10846
|
+
"true",
|
|
10847
|
+
"1",
|
|
10848
|
+
"yes",
|
|
10849
|
+
"on",
|
|
10850
|
+
"y",
|
|
10851
|
+
"enabled",
|
|
10852
|
+
"false",
|
|
10853
|
+
"0",
|
|
10854
|
+
"no",
|
|
10855
|
+
"off",
|
|
10856
|
+
"n",
|
|
10857
|
+
"disabled"
|
|
10858
|
+
],
|
|
10859
|
+
describe: "Whether the scope descends into nested folders. Absent means yes. The listed spellings are the whole accepted vocabulary and are case-sensitive; any other value is rejected."
|
|
10860
|
+
}
|
|
10861
|
+
}
|
|
10862
|
+
},
|
|
10773
10863
|
searchKnowledge: {
|
|
10774
10864
|
method: "POST",
|
|
10775
10865
|
path: "/api/v2/knowledge/search",
|
|
@@ -12019,6 +12109,7 @@ var TABLE_SORT_HELP = 'Ordered sort keys: [{"field":"createdAt","direction":"des
|
|
|
12019
12109
|
var KNOWLEDGE_TAG_DEFINITIONS_HELP = 'Tag definitions: [{"tagSlot":"tag1","displayName":"category","fieldType":"text"}]';
|
|
12020
12110
|
var CUSTOM_TOOL_SCHEMA_HELP = 'OpenAI function schema: {"type":"function","function":{"name":"...","parameters":{"type":"object","properties":{}}}}';
|
|
12021
12111
|
var DISPATCH_ROW_LIMIT_HELP = "Stop after this many eligible rows have run (1-1,000,000). Omit for an unbounded run";
|
|
12112
|
+
var FILE_EDIT_HELP = 'One edit object: {"mode":"search_replace","search":"old","content":"new","replaceAll":false}, {"mode":"replace_between","beforeAnchor":"start line","afterAnchor":"end line","content":"new"}, {"mode":"insert_after","anchor":"line","content":"new"}, or {"mode":"delete_between","startAnchor":"first line deleted","endAnchor":"ending line kept"}. Anchored modes also accept occurrence starting at 1';
|
|
12022
12113
|
var WORKFLOW_OPERATIONS_HELP = 'Edits to apply, in a single batch, keyed by operation_type: [{"operation_type":"add","block_id":"my-fn","params":{"type":"function","name":"My Fn","inputs":{"code":"return {ok:true}"}}},{"operation_type":"edit","block_id":"<uuid>","params":{"name":"Renamed","connections":{"success":"my-fn"}}},{"operation_type":"delete","block_id":"<uuid>"}]. Also extract_from_subflow, whose params carry {"subflowId":"<loop-id>"}, and insert_into_subflow, which creates a block and so takes an add’s params plus that subflowId';
|
|
12023
12114
|
var WORKFLOW_SET_BLOCK_ENABLED_HELP = 'Blocks to enable or disable, applied after --operations: [{"block_id":"<uuid>","enabled":false}]. Disabling a loop or parallel cascades to its unlocked descendants; enabling a block whose container is disabled is declined';
|
|
12024
12115
|
var WORKFLOW_VARIABLE_OPERATIONS_HELP = 'Variable changes to apply in order, keyed by operation: [{"operation":"add","name":"my_var","type":"string","value":"hello"},{"operation":"edit","name":"my_var","value":"updated"},{"operation":"delete","name":"my_var"}]';
|
|
@@ -12399,6 +12490,25 @@ var CLI_CONTRACT = {
|
|
|
12399
12490
|
flags: { folderPaths: FOLDER_PATHS_FLAG },
|
|
12400
12491
|
confirm: "This deletes every listed table and all of their rows."
|
|
12401
12492
|
},
|
|
12493
|
+
searchFileContent: {
|
|
12494
|
+
flags: {
|
|
12495
|
+
folderPaths: {
|
|
12496
|
+
...FOLDER_PATHS_FLAG,
|
|
12497
|
+
describe: "Folders to search, by path as shown in the app; omit to search the whole workspace"
|
|
12498
|
+
},
|
|
12499
|
+
includeSubfolders: {
|
|
12500
|
+
boolean: true,
|
|
12501
|
+
negatable: true,
|
|
12502
|
+
describe: "Whether each folder scope includes nested folders; on by default"
|
|
12503
|
+
}
|
|
12504
|
+
},
|
|
12505
|
+
itemsPath: "results",
|
|
12506
|
+
columns: [
|
|
12507
|
+
{ header: "file", path: "fileId" },
|
|
12508
|
+
{ header: "line", path: "lineNumber" },
|
|
12509
|
+
{ header: "text" }
|
|
12510
|
+
]
|
|
12511
|
+
},
|
|
12402
12512
|
searchKnowledge: {
|
|
12403
12513
|
flags: {
|
|
12404
12514
|
knowledgeBaseIds: { name: "kb", list: true, describe: "Knowledge base ID (repeatable)" },
|
|
@@ -12818,6 +12928,13 @@ var CLI_CONTRACT = {
|
|
|
12818
12928
|
folderPaths: FOLDER_PATHS_FLAG
|
|
12819
12929
|
}
|
|
12820
12930
|
},
|
|
12931
|
+
editFileContent: {
|
|
12932
|
+
command: "files edit",
|
|
12933
|
+
describe: "Apply one exact or anchor-based edit to a text file",
|
|
12934
|
+
flags: {
|
|
12935
|
+
edit: { describe: FILE_EDIT_HELP }
|
|
12936
|
+
}
|
|
12937
|
+
},
|
|
12821
12938
|
updateFileContent: {
|
|
12822
12939
|
command: "files set-content",
|
|
12823
12940
|
describe: "Replace a file’s contents",
|
|
@@ -13531,7 +13648,7 @@ function withoutWireVocabulary(documented) {
|
|
|
13531
13648
|
return documented.replace(WIRE_VOCABULARY_SENTENCE, " ").trim();
|
|
13532
13649
|
}
|
|
13533
13650
|
var NON_PAGINATED_LIMIT_HINT = " (caps a --filter match only; omit it to act on every match, and note 0 is not accepted)";
|
|
13534
|
-
function addFieldOption(command, operation, field, descriptor, slot, paginates) {
|
|
13651
|
+
function addFieldOption(command, operation, field, descriptor, slot, paginates, capsAFilter) {
|
|
13535
13652
|
if (field === PROFILE_INJECTED_FIELD || field === "cursor")
|
|
13536
13653
|
return;
|
|
13537
13654
|
const flag = flagSpecFor(operation, field);
|
|
@@ -13543,7 +13660,7 @@ function addFieldOption(command, operation, field, descriptor, slot, paginates)
|
|
|
13543
13660
|
command.option("--limit <n>", "Maximum items to return (0 for everything)", String(DEFAULT_LIMIT));
|
|
13544
13661
|
return;
|
|
13545
13662
|
}
|
|
13546
|
-
const documented = `${describeField(flag, descriptor, name, field)}${field === "limit" && (descriptor.kind === "number" || descriptor.kind === "integer") ? NON_PAGINATED_LIMIT_HINT : ""}`;
|
|
13663
|
+
const documented = `${describeField(flag, descriptor, name, field)}${capsAFilter && field === "limit" && (descriptor.kind === "number" || descriptor.kind === "integer") ? NON_PAGINATED_LIMIT_HINT : ""}`;
|
|
13547
13664
|
if (descriptor.kind === "boolean" || flag.boolean) {
|
|
13548
13665
|
const booleanDoc = withoutWireVocabulary(documented);
|
|
13549
13666
|
if (descriptor.required) {
|
|
@@ -13591,13 +13708,14 @@ function addOperationOptions(command, operation, commandSpec, operationSpec) {
|
|
|
13591
13708
|
command.addOption(new Option(`${short}--${name} <${flag.placeholder ?? "value"}>`, `${flag.describe ?? operationSpec.pathParamDocs?.[param] ?? `Set ${name.replaceAll("-", " ")}`} (required)`).makeOptionMandatory());
|
|
13592
13709
|
}
|
|
13593
13710
|
const paginates = cursorSlot(operationSpec) !== null;
|
|
13711
|
+
const capsAFilter = ["query", "body", "headers"].some((slot) => operationSpec[slot] !== undefined && ("filter" in operationSpec[slot]));
|
|
13594
13712
|
for (const slot of ["query", "body", "headers"]) {
|
|
13595
13713
|
for (const [field, descriptor] of Object.entries(operationSpec[slot] ?? {})) {
|
|
13596
13714
|
if (commandSpec.requestFields && !commandSpec.requestFields.includes(field))
|
|
13597
13715
|
continue;
|
|
13598
13716
|
if (commandSpec.positionals?.includes(field))
|
|
13599
13717
|
continue;
|
|
13600
|
-
addFieldOption(command, operation, field, descriptor, slot, paginates);
|
|
13718
|
+
addFieldOption(command, operation, field, descriptor, slot, paginates, capsAFilter);
|
|
13601
13719
|
}
|
|
13602
13720
|
}
|
|
13603
13721
|
if (commandSpec.allWorkspaces) {
|