@khotan/cli 0.4.0 → 0.6.0
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/khotan.js +53 -12
- package/package.json +1 -1
package/dist/khotan.js
CHANGED
|
@@ -19,7 +19,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
19
19
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
20
20
|
|
|
21
21
|
// ../khotan-core/src/version.ts
|
|
22
|
-
var CATALOG_SCHEMA_VERSION = 1, CATALOG_VERSION = "2026-06-
|
|
22
|
+
var CATALOG_SCHEMA_VERSION = 1, CATALOG_VERSION = "2026-06-23", KHOTAN_ADAPTER_NAME = "khotan", KHOTAN_ADAPTER_VERSION = "0.6.0", SUPPORTED_CATALOG_SCHEMA_VERSIONS;
|
|
23
23
|
var init_version = __esm(() => {
|
|
24
24
|
SUPPORTED_CATALOG_SCHEMA_VERSIONS = [
|
|
25
25
|
CATALOG_SCHEMA_VERSION
|
|
@@ -115,6 +115,12 @@ function platformDomain(config) {
|
|
|
115
115
|
const idArg = idField(resourceParam, `The ${noun} id.`);
|
|
116
116
|
const cap = domain;
|
|
117
117
|
const a = article(noun);
|
|
118
|
+
const envWriteTargetField = {
|
|
119
|
+
name: "target",
|
|
120
|
+
location: "body",
|
|
121
|
+
type: "string[]",
|
|
122
|
+
description: "Environments to write, any of: production, preview, development (comma-separated or repeatable). Omit to write all environments."
|
|
123
|
+
};
|
|
118
124
|
const tool = (suffix) => `khotan_${domain}_${suffix}`;
|
|
119
125
|
const operations = [
|
|
120
126
|
{
|
|
@@ -187,6 +193,19 @@ function platformDomain(config) {
|
|
|
187
193
|
cli: { command: [domain, "redeploy"], summary: `Redeploy ${a} ${noun}`, defaultOutput: "detail" },
|
|
188
194
|
mcp: { tool: { name: tool("redeploy"), title: `Redeploy ${a} ${noun}`, description: `Trigger a new deployment of ${a} ${noun}.` } }
|
|
189
195
|
},
|
|
196
|
+
{
|
|
197
|
+
id: `${cap}.source`,
|
|
198
|
+
kind: "operation",
|
|
199
|
+
domain,
|
|
200
|
+
safety: "read",
|
|
201
|
+
auth: true,
|
|
202
|
+
title: `Download ${a} ${noun}'s source`,
|
|
203
|
+
description: `Download the ${noun}'s source files (its subdirectory in the org mono-root repo) as a JSON listing with paths rooted at the ${noun}. Text files come back utf-8, binary files base64.`,
|
|
204
|
+
input: [idArg],
|
|
205
|
+
http: { method: "GET", path: `${base}/{${resourceParam}}/source`, operationId: operationIds.source },
|
|
206
|
+
cli: { command: [domain, "source"], summary: `Download ${a} ${noun}'s source`, defaultOutput: "detail" },
|
|
207
|
+
mcp: { tool: { name: tool("source"), title: `Download ${a} ${noun}'s source`, description: `Download the ${noun}'s source files as a JSON listing. Text files utf-8, binary base64.` } }
|
|
208
|
+
},
|
|
190
209
|
{
|
|
191
210
|
id: `${cap}.env.list`,
|
|
192
211
|
kind: "operation",
|
|
@@ -207,14 +226,15 @@ function platformDomain(config) {
|
|
|
207
226
|
safety: "write",
|
|
208
227
|
auth: true,
|
|
209
228
|
title: `Bulk upsert ${noun} environment variables`,
|
|
210
|
-
description: `Create or update many env vars in one request.`,
|
|
229
|
+
description: `Create or update many env vars in one request. Writes every environment unless you pass target.`,
|
|
211
230
|
input: [
|
|
212
231
|
idArg,
|
|
213
|
-
{ name: "variables", location: "body", type: "json", required: true, description: "Array of { key, value } to upsert." }
|
|
232
|
+
{ name: "variables", location: "body", type: "json", required: true, description: "Array of { key, value } to upsert." },
|
|
233
|
+
envWriteTargetField
|
|
214
234
|
],
|
|
215
235
|
http: { method: "POST", path: `${base}/{${resourceParam}}/env`, operationId: operationIds.envBulkSet, bodyMode: "json" },
|
|
216
236
|
cli: { command: [domain, "env", "bulk-set"], summary: "Bulk upsert env vars" },
|
|
217
|
-
mcp: { tool: { name: tool("env_bulk_set"), title: "Bulk upsert env vars", description: "Create or update many env vars in one request." } }
|
|
237
|
+
mcp: { tool: { name: tool("env_bulk_set"), title: "Bulk upsert env vars", description: "Create or update many env vars in one request. Writes every environment unless target is provided." } }
|
|
218
238
|
},
|
|
219
239
|
{
|
|
220
240
|
id: `${cap}.env.reveal`,
|
|
@@ -223,8 +243,17 @@ function platformDomain(config) {
|
|
|
223
243
|
safety: "secret",
|
|
224
244
|
auth: true,
|
|
225
245
|
title: `Reveal one ${noun} environment variable value`,
|
|
226
|
-
description: `Reveal a single decrypted env var value. Secret-bearing; explicit-only.`,
|
|
227
|
-
input: [
|
|
246
|
+
description: `Reveal a single decrypted env var value for one environment. Secret-bearing; explicit-only.`,
|
|
247
|
+
input: [
|
|
248
|
+
idArg,
|
|
249
|
+
idField("key", "The env var key to reveal."),
|
|
250
|
+
{
|
|
251
|
+
name: "target",
|
|
252
|
+
location: "query",
|
|
253
|
+
type: "string",
|
|
254
|
+
description: "Environment to read: production, preview, or development. Omit to default to production."
|
|
255
|
+
}
|
|
256
|
+
],
|
|
228
257
|
http: { method: "GET", path: `${base}/{${resourceParam}}/env/{key}`, operationId: operationIds.envReveal },
|
|
229
258
|
cli: { command: [domain, "env", "reveal"], summary: "Reveal one env var value (secret)", defaultOutput: "raw" },
|
|
230
259
|
mcp: { tool: { name: tool("env_reveal"), title: "Reveal one env var value (secret)", description: "Reveal one decrypted env var value. Secret-bearing — returns a credential, not a list." } }
|
|
@@ -236,15 +265,16 @@ function platformDomain(config) {
|
|
|
236
265
|
safety: "write",
|
|
237
266
|
auth: true,
|
|
238
267
|
title: `Set one ${noun} environment variable`,
|
|
239
|
-
description: `Create or update one env var
|
|
268
|
+
description: `Create or update one env var. Writes every environment unless you pass target.`,
|
|
240
269
|
input: [
|
|
241
270
|
idArg,
|
|
242
271
|
idField("key", "The env var key."),
|
|
243
|
-
{ name: "value", location: "body", type: "string", required: true, secret: true, description: "The env var value." }
|
|
272
|
+
{ name: "value", location: "body", type: "string", required: true, secret: true, description: "The env var value." },
|
|
273
|
+
envWriteTargetField
|
|
244
274
|
],
|
|
245
275
|
http: { method: "PUT", path: `${base}/{${resourceParam}}/env/{key}`, operationId: operationIds.envSet, bodyMode: "json" },
|
|
246
276
|
cli: { command: [domain, "env", "set"], summary: "Set one env var" },
|
|
247
|
-
mcp: { tool: { name: tool("env_set"), title: "Set one env var", description: "Create or update one env var
|
|
277
|
+
mcp: { tool: { name: tool("env_set"), title: "Set one env var", description: "Create or update one env var. Writes every environment unless target is provided." } }
|
|
248
278
|
},
|
|
249
279
|
{
|
|
250
280
|
id: `${cap}.env.unset`,
|
|
@@ -253,11 +283,20 @@ function platformDomain(config) {
|
|
|
253
283
|
safety: "destructive",
|
|
254
284
|
auth: true,
|
|
255
285
|
title: `Unset one ${noun} environment variable`,
|
|
256
|
-
description: `Delete one env var
|
|
257
|
-
input: [
|
|
286
|
+
description: `Delete one env var. Removes it from every environment unless you pass target.`,
|
|
287
|
+
input: [
|
|
288
|
+
idArg,
|
|
289
|
+
idField("key", "The env var key to delete."),
|
|
290
|
+
{
|
|
291
|
+
name: "target",
|
|
292
|
+
location: "query",
|
|
293
|
+
type: "string",
|
|
294
|
+
description: "Environment to remove from: production, preview, or development. Omit to remove from all environments."
|
|
295
|
+
}
|
|
296
|
+
],
|
|
258
297
|
http: { method: "DELETE", path: `${base}/{${resourceParam}}/env/{key}`, operationId: operationIds.envDelete },
|
|
259
298
|
cli: { command: [domain, "env", "unset"], summary: "Unset one env var" },
|
|
260
|
-
mcp: { tool: { name: tool("env_unset"), title: "Unset one env var", description: "Delete one env var
|
|
299
|
+
mcp: { tool: { name: tool("env_unset"), title: "Unset one env var", description: "Delete one env var. Removes it from every environment unless target is provided. Requires confirmation." } }
|
|
261
300
|
}
|
|
262
301
|
];
|
|
263
302
|
const resource = {
|
|
@@ -907,6 +946,7 @@ var init_catalog = __esm(() => {
|
|
|
907
946
|
create: "createApp",
|
|
908
947
|
delete: "deleteApp",
|
|
909
948
|
redeploy: "redeployApp",
|
|
949
|
+
source: "getAppSource",
|
|
910
950
|
envList: "listAppEnvVars",
|
|
911
951
|
envBulkSet: "bulkUpsertAppEnvVars",
|
|
912
952
|
envReveal: "revealAppEnvVar",
|
|
@@ -925,6 +965,7 @@ var init_catalog = __esm(() => {
|
|
|
925
965
|
create: "createPipeline",
|
|
926
966
|
delete: "deletePipeline",
|
|
927
967
|
redeploy: "redeployPipeline",
|
|
968
|
+
source: "getPipelineSource",
|
|
928
969
|
envList: "listPipelineEnvVars",
|
|
929
970
|
envBulkSet: "bulkUpsertPipelineEnvVars",
|
|
930
971
|
envReveal: "revealPipelineEnvVar",
|
package/package.json
CHANGED