sim 2.1.6-preview.89.1 → 2.1.6
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 +169 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7468,6 +7468,47 @@ var V2_OPERATIONS = {
|
|
|
7468
7468
|
}
|
|
7469
7469
|
}
|
|
7470
7470
|
},
|
|
7471
|
+
createSandbox: {
|
|
7472
|
+
method: "POST",
|
|
7473
|
+
path: "/api/v2/sandboxes",
|
|
7474
|
+
pathParams: [],
|
|
7475
|
+
responseMode: "json",
|
|
7476
|
+
summary: "Create Sandbox",
|
|
7477
|
+
personalKeyOnly: true,
|
|
7478
|
+
body: {
|
|
7479
|
+
workspaceId: {
|
|
7480
|
+
kind: "string",
|
|
7481
|
+
required: true,
|
|
7482
|
+
describe: "Workspace in which to create the sandbox."
|
|
7483
|
+
},
|
|
7484
|
+
name: {
|
|
7485
|
+
kind: "string",
|
|
7486
|
+
required: true,
|
|
7487
|
+
describe: "Display name, unique within the workspace; 1 to 64 characters."
|
|
7488
|
+
},
|
|
7489
|
+
language: {
|
|
7490
|
+
kind: "enum",
|
|
7491
|
+
required: true,
|
|
7492
|
+
values: ["javascript", "python"],
|
|
7493
|
+
describe: "Dependency ecosystem: `javascript` installs from npm, `python` from PyPI."
|
|
7494
|
+
},
|
|
7495
|
+
dependencies: {
|
|
7496
|
+
kind: "array",
|
|
7497
|
+
default: [],
|
|
7498
|
+
describe: "Package specifiers installed into the sandbox, one per entry."
|
|
7499
|
+
},
|
|
7500
|
+
cliTools: {
|
|
7501
|
+
kind: "array",
|
|
7502
|
+
default: [],
|
|
7503
|
+
describe: "Pinned managed CLI ids installed into the sandbox, at most 10, no duplicates."
|
|
7504
|
+
},
|
|
7505
|
+
systemPackages: {
|
|
7506
|
+
kind: "array",
|
|
7507
|
+
default: [],
|
|
7508
|
+
describe: "Debian packages installed into the sandbox, one per entry."
|
|
7509
|
+
}
|
|
7510
|
+
}
|
|
7511
|
+
},
|
|
7471
7512
|
createServiceAccountCredential: {
|
|
7472
7513
|
method: "POST",
|
|
7473
7514
|
path: "/api/v2/credentials",
|
|
@@ -7985,6 +8026,18 @@ var V2_OPERATIONS = {
|
|
|
7985
8026
|
}
|
|
7986
8027
|
}
|
|
7987
8028
|
},
|
|
8029
|
+
deleteSandbox: {
|
|
8030
|
+
method: "DELETE",
|
|
8031
|
+
path: "/api/v2/sandboxes/[sandboxId]",
|
|
8032
|
+
pathParams: ["sandboxId"],
|
|
8033
|
+
pathParamDocs: { sandboxId: "Unique sandbox identifier." },
|
|
8034
|
+
responseMode: "json",
|
|
8035
|
+
summary: "Delete Sandbox",
|
|
8036
|
+
personalKeyOnly: true,
|
|
8037
|
+
query: {
|
|
8038
|
+
workspaceId: { kind: "string", required: true, describe: "Workspace that owns the sandbox." }
|
|
8039
|
+
}
|
|
8040
|
+
},
|
|
7988
8041
|
deleteSecret: {
|
|
7989
8042
|
method: "DELETE",
|
|
7990
8043
|
path: "/api/v2/secrets/[name]",
|
|
@@ -8678,6 +8731,17 @@ var V2_OPERATIONS = {
|
|
|
8678
8731
|
workspaceId: { kind: "string", required: true, describe: "Workspace that owns the table." }
|
|
8679
8732
|
}
|
|
8680
8733
|
},
|
|
8734
|
+
getSandbox: {
|
|
8735
|
+
method: "GET",
|
|
8736
|
+
path: "/api/v2/sandboxes/[sandboxId]",
|
|
8737
|
+
pathParams: ["sandboxId"],
|
|
8738
|
+
pathParamDocs: { sandboxId: "Unique sandbox identifier." },
|
|
8739
|
+
responseMode: "json",
|
|
8740
|
+
summary: "Get Sandbox",
|
|
8741
|
+
query: {
|
|
8742
|
+
workspaceId: { kind: "string", required: true, describe: "Workspace that owns the sandbox." }
|
|
8743
|
+
}
|
|
8744
|
+
},
|
|
8681
8745
|
getSkill: {
|
|
8682
8746
|
method: "GET",
|
|
8683
8747
|
path: "/api/v2/skills/[skillId]",
|
|
@@ -9828,6 +9892,41 @@ var V2_OPERATIONS = {
|
|
|
9828
9892
|
}
|
|
9829
9893
|
}
|
|
9830
9894
|
},
|
|
9895
|
+
listSandboxes: {
|
|
9896
|
+
method: "GET",
|
|
9897
|
+
path: "/api/v2/sandboxes",
|
|
9898
|
+
pathParams: [],
|
|
9899
|
+
responseMode: "json",
|
|
9900
|
+
summary: "List Sandboxes",
|
|
9901
|
+
query: {
|
|
9902
|
+
workspaceId: { kind: "string", required: true, describe: "Workspace that owns the sandbox." },
|
|
9903
|
+
search: {
|
|
9904
|
+
kind: "string",
|
|
9905
|
+
describe: "Case-insensitive substring match against the sandbox name."
|
|
9906
|
+
},
|
|
9907
|
+
sortBy: {
|
|
9908
|
+
kind: "enum",
|
|
9909
|
+
values: ["name", "createdAt", "updatedAt"],
|
|
9910
|
+
default: "name",
|
|
9911
|
+
describe: "Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order."
|
|
9912
|
+
},
|
|
9913
|
+
sortOrder: {
|
|
9914
|
+
kind: "enum",
|
|
9915
|
+
values: ["asc", "desc"],
|
|
9916
|
+
default: "asc",
|
|
9917
|
+
describe: "Sort direction."
|
|
9918
|
+
},
|
|
9919
|
+
limit: {
|
|
9920
|
+
kind: "integer",
|
|
9921
|
+
default: 50,
|
|
9922
|
+
describe: "Maximum sandboxes to return per page. Must be a whole number from 1 to 100. Defaults to 50."
|
|
9923
|
+
},
|
|
9924
|
+
cursor: {
|
|
9925
|
+
kind: "string",
|
|
9926
|
+
describe: "Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor."
|
|
9927
|
+
}
|
|
9928
|
+
}
|
|
9929
|
+
},
|
|
9831
9930
|
listSecrets: {
|
|
9832
9931
|
method: "GET",
|
|
9833
9932
|
path: "/api/v2/secrets",
|
|
@@ -11377,6 +11476,39 @@ var V2_OPERATIONS = {
|
|
|
11377
11476
|
limit: { kind: "integer", describe: "Maximum matching rows to update." }
|
|
11378
11477
|
}
|
|
11379
11478
|
},
|
|
11479
|
+
updateSandbox: {
|
|
11480
|
+
method: "PATCH",
|
|
11481
|
+
path: "/api/v2/sandboxes/[sandboxId]",
|
|
11482
|
+
pathParams: ["sandboxId"],
|
|
11483
|
+
pathParamDocs: { sandboxId: "Unique sandbox identifier." },
|
|
11484
|
+
responseMode: "json",
|
|
11485
|
+
summary: "Update Sandbox",
|
|
11486
|
+
personalKeyOnly: true,
|
|
11487
|
+
body: {
|
|
11488
|
+
workspaceId: { kind: "string", required: true, describe: "Workspace that owns the sandbox." },
|
|
11489
|
+
name: {
|
|
11490
|
+
kind: "string",
|
|
11491
|
+
describe: "New display name, unique within the workspace; 1 to 64 characters."
|
|
11492
|
+
},
|
|
11493
|
+
language: {
|
|
11494
|
+
kind: "enum",
|
|
11495
|
+
values: ["javascript", "python"],
|
|
11496
|
+
describe: "Replacement dependency ecosystem. The whole spec is revalidated against it, so a Python dependency list does not survive a switch to JavaScript."
|
|
11497
|
+
},
|
|
11498
|
+
dependencies: {
|
|
11499
|
+
kind: "array",
|
|
11500
|
+
describe: "Replacement package list; replaces the whole list."
|
|
11501
|
+
},
|
|
11502
|
+
cliTools: {
|
|
11503
|
+
kind: "array",
|
|
11504
|
+
describe: "Replacement managed CLI list; replaces the whole list."
|
|
11505
|
+
},
|
|
11506
|
+
systemPackages: {
|
|
11507
|
+
kind: "array",
|
|
11508
|
+
describe: "Replacement Debian package list; replaces the whole list."
|
|
11509
|
+
}
|
|
11510
|
+
}
|
|
11511
|
+
},
|
|
11380
11512
|
updateSkill: {
|
|
11381
11513
|
method: "PATCH",
|
|
11382
11514
|
path: "/api/v2/skills/[skillId]",
|
|
@@ -12310,6 +12442,9 @@ var CLI_CONTRACT = {
|
|
|
12310
12442
|
confirm: "This revokes the explicit skill editor grant for the selected email."
|
|
12311
12443
|
},
|
|
12312
12444
|
deleteCustomTool: { confirm: "This deletes the custom tool." },
|
|
12445
|
+
deleteSandbox: {
|
|
12446
|
+
confirm: "This deletes the sandbox; Function blocks that select it fail until re-pointed."
|
|
12447
|
+
},
|
|
12313
12448
|
deleteMcpServer: {
|
|
12314
12449
|
confirm: "This removes the MCP server and the tools it provides."
|
|
12315
12450
|
},
|
|
@@ -12596,6 +12731,20 @@ var CLI_CONTRACT = {
|
|
|
12596
12731
|
importWorkflow: { flags: { folderPath: FOLDER_PATH_FLAG } },
|
|
12597
12732
|
createCustomTool: { flags: { schema: { json: true, describe: CUSTOM_TOOL_SCHEMA_HELP } } },
|
|
12598
12733
|
updateCustomTool: { flags: { schema: { json: true, describe: CUSTOM_TOOL_SCHEMA_HELP } } },
|
|
12734
|
+
createSandbox: {
|
|
12735
|
+
flags: {
|
|
12736
|
+
dependencies: { list: true, manifest: true },
|
|
12737
|
+
cliTools: { list: true },
|
|
12738
|
+
systemPackages: { list: true, manifest: true }
|
|
12739
|
+
}
|
|
12740
|
+
},
|
|
12741
|
+
updateSandbox: {
|
|
12742
|
+
flags: {
|
|
12743
|
+
dependencies: { list: true, manifest: true },
|
|
12744
|
+
cliTools: { list: true },
|
|
12745
|
+
systemPackages: { list: true, manifest: true }
|
|
12746
|
+
}
|
|
12747
|
+
},
|
|
12599
12748
|
listTables: {
|
|
12600
12749
|
flags: { folderPath: FOLDER_PATH_FLAG },
|
|
12601
12750
|
columns: [
|
|
@@ -12737,6 +12886,15 @@ var CLI_CONTRACT = {
|
|
|
12737
12886
|
{ header: "updated", path: "updatedAt", format: "timestamp" }
|
|
12738
12887
|
]
|
|
12739
12888
|
},
|
|
12889
|
+
listSandboxes: {
|
|
12890
|
+
columns: [
|
|
12891
|
+
{ header: "id" },
|
|
12892
|
+
{ header: "name" },
|
|
12893
|
+
{ header: "language" },
|
|
12894
|
+
{ header: "status", path: "buildStatus" },
|
|
12895
|
+
{ header: "updated", path: "updatedAt", format: "timestamp" }
|
|
12896
|
+
]
|
|
12897
|
+
},
|
|
12740
12898
|
listCredentials: {
|
|
12741
12899
|
columns: [
|
|
12742
12900
|
{ header: "id" },
|
|
@@ -13442,7 +13600,11 @@ function readArgumentSource(raw, flagName) {
|
|
|
13442
13600
|
throw new SimApiError(`--${flagName} cannot read ${path}: ${error.message}${literalAtHint(error, path)}`, 0);
|
|
13443
13601
|
}
|
|
13444
13602
|
}
|
|
13445
|
-
function
|
|
13603
|
+
function isManifestNoise(line) {
|
|
13604
|
+
const trimmed = line.trim();
|
|
13605
|
+
return trimmed === "" || trimmed.startsWith("#");
|
|
13606
|
+
}
|
|
13607
|
+
function readListValues(raw, flagName, manifest = false) {
|
|
13446
13608
|
const arguments_ = Array.isArray(raw) ? raw : [raw];
|
|
13447
13609
|
const values = arguments_.flatMap((argument) => {
|
|
13448
13610
|
if (typeof argument !== "string") {
|
|
@@ -13454,10 +13616,11 @@ function readListValues(raw, flagName) {
|
|
|
13454
13616
|
const lines = source.text.split(/\r?\n/);
|
|
13455
13617
|
if (lines.at(-1) === "")
|
|
13456
13618
|
lines.pop();
|
|
13457
|
-
|
|
13619
|
+
const kept = manifest ? lines.filter((line) => !isManifestNoise(line)) : lines;
|
|
13620
|
+
if (kept.length === 0) {
|
|
13458
13621
|
throw new SimApiError(`--${flagName}${source.from} contains no values`, 0);
|
|
13459
13622
|
}
|
|
13460
|
-
return
|
|
13623
|
+
return kept.map((line, index) => {
|
|
13461
13624
|
const value = line.trim();
|
|
13462
13625
|
if (!value) {
|
|
13463
13626
|
throw new SimApiError(`--${flagName}${source.from} has an empty value on line ${index + 1}`, 0);
|
|
@@ -13502,7 +13665,7 @@ function coerce(raw, field, flag, flagName) {
|
|
|
13502
13665
|
if (raw === undefined)
|
|
13503
13666
|
return;
|
|
13504
13667
|
if (flag.list) {
|
|
13505
|
-
const values = readListValues(raw, flagName).map((value) => flag.folderPath ? encodeFolderPath(value) : value);
|
|
13668
|
+
const values = readListValues(raw, flagName, flag.manifest === true).map((value) => flag.folderPath ? encodeFolderPath(value) : value);
|
|
13506
13669
|
return field.kind === "string" ? values.join(",") : values;
|
|
13507
13670
|
}
|
|
13508
13671
|
if (flag.rowCap)
|
|
@@ -13681,7 +13844,7 @@ function addFieldOption(command, operation, field, descriptor, slot, paginates,
|
|
|
13681
13844
|
const placeholder = takesList ? "<value...>" : flag.rowCap ? "<n>" : wantsJson ? "<json|@file>" : "<value>";
|
|
13682
13845
|
const choices = flag.choices ?? descriptor.values;
|
|
13683
13846
|
const literalNull = slot === "body" && !takesList && !wantsJson;
|
|
13684
|
-
const describe = `${documented}${takesList ? " (space-separated, or @path / @- with one value per line; @@value for a literal leading @)" : wantsJson ? " (JSON, or @path / @- to read a file or stdin)" : ""}${descriptor.required ? " (required)" : ""}${literalNull ? literalNullHint(documented, name) : ""}`;
|
|
13847
|
+
const describe = `${documented}${takesList ? flag.manifest ? " (space-separated, or @path / @- with one value per line; in a file, blank lines and # comments are ignored, while inline values are sent as typed and may not be empty; @@value for a literal leading @)" : " (space-separated, or @path / @- with one value per line; @@value for a literal leading @)" : wantsJson ? " (JSON, or @path / @- to read a file or stdin)" : ""}${descriptor.required ? " (required)" : ""}${literalNull ? literalNullHint(documented, name) : ""}`;
|
|
13685
13848
|
const renamedFrom = flag.renamedFrom ?? [];
|
|
13686
13849
|
const option = new Option(`${short}--${name} ${placeholder}`, describe);
|
|
13687
13850
|
if (flag.hidden)
|
|
@@ -14424,6 +14587,7 @@ var GROUP_ALIASES = {
|
|
|
14424
14587
|
knowledge: "kb",
|
|
14425
14588
|
logs: "log",
|
|
14426
14589
|
"mcp-servers": "mcp-server",
|
|
14590
|
+
sandboxes: "sandbox",
|
|
14427
14591
|
secrets: "secret",
|
|
14428
14592
|
skills: "skill",
|
|
14429
14593
|
tables: "table",
|