@elevasis/sdk 1.53.0 → 1.55.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/{chunk-FUOIYRIZ.js → chunk-72ZGICTR.js} +304 -71
- package/dist/{chunk-HB7DC5LT.js → chunk-QF2RNYYX.js} +1 -8
- package/dist/{chunk-B2KAVPNB.js → chunk-R3J6BEPO.js} +116 -2069
- package/dist/cli.cjs +477 -362
- package/dist/index.d.ts +142 -49
- package/dist/index.js +2 -2
- package/dist/node/index.js +1 -1
- package/dist/test-utils/index.js +5 -3
- package/dist/worker/index.d.ts +11 -2
- package/dist/worker/index.js +3 -3
- package/package.json +14 -6
- package/reference/_navigation.md +1 -1
- package/reference/packages/core/src/knowledge/README.md +1 -1
- package/reference/scaffold/core/organization-model.mdx +1 -1
- package/reference/scaffold/recipes/extend-lead-gen.md +2 -1
- package/reference/scaffold/reference/contracts.md +239 -226
- package/reference/sdk/cli-management.mdx +2 -0
- package/reference/sdk/define-builders.mdx +28 -15
- package/reference/sdk/exports.mdx +1 -1
- package/reference/sdk/index.mdx +1 -1
- package/reference/sdk/platform-tools/adapters-platform.mdx +1 -1
- package/reference/sdk/project-deployment-spec.mdx +17 -1
package/dist/cli.cjs
CHANGED
|
@@ -34,12 +34,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
));
|
|
35
35
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
36
|
|
|
37
|
-
// ../../node_modules/.pnpm/dotenv@
|
|
37
|
+
// ../../node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.json
|
|
38
38
|
var require_package = __commonJS({
|
|
39
|
-
"../../node_modules/.pnpm/dotenv@
|
|
39
|
+
"../../node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.json"(exports2, module2) {
|
|
40
40
|
module2.exports = {
|
|
41
41
|
name: "dotenv",
|
|
42
|
-
version: "
|
|
42
|
+
version: "17.2.3",
|
|
43
43
|
description: "Loads environment variables from .env file",
|
|
44
44
|
main: "lib/main.js",
|
|
45
45
|
types: "lib/main.d.ts",
|
|
@@ -61,8 +61,8 @@ var require_package = __commonJS({
|
|
|
61
61
|
"dts-check": "tsc --project tests/types/tsconfig.json",
|
|
62
62
|
lint: "standard",
|
|
63
63
|
pretest: "npm run lint && npm run dts-check",
|
|
64
|
-
test: "tap run --allow-empty-coverage --disable-coverage --timeout=60000",
|
|
65
|
-
"test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
|
|
64
|
+
test: "tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000",
|
|
65
|
+
"test:coverage": "tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
|
|
66
66
|
prerelease: "npm test",
|
|
67
67
|
release: "standard-version"
|
|
68
68
|
},
|
|
@@ -102,15 +102,48 @@ var require_package = __commonJS({
|
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
104
|
|
|
105
|
-
// ../../node_modules/.pnpm/dotenv@
|
|
105
|
+
// ../../node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.js
|
|
106
106
|
var require_main = __commonJS({
|
|
107
|
-
"../../node_modules/.pnpm/dotenv@
|
|
107
|
+
"../../node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
108
108
|
var fs2 = require("fs");
|
|
109
109
|
var path3 = require("path");
|
|
110
110
|
var os3 = require("os");
|
|
111
111
|
var crypto = require("crypto");
|
|
112
112
|
var packageJson = require_package();
|
|
113
113
|
var version2 = packageJson.version;
|
|
114
|
+
var TIPS = [
|
|
115
|
+
"\u{1F510} encrypt with Dotenvx: https://dotenvx.com",
|
|
116
|
+
"\u{1F510} prevent committing .env to code: https://dotenvx.com/precommit",
|
|
117
|
+
"\u{1F510} prevent building .env in docker: https://dotenvx.com/prebuild",
|
|
118
|
+
"\u{1F4E1} add observability to secrets: https://dotenvx.com/ops",
|
|
119
|
+
"\u{1F465} sync secrets across teammates & machines: https://dotenvx.com/ops",
|
|
120
|
+
"\u{1F5C2}\uFE0F backup and recover secrets: https://dotenvx.com/ops",
|
|
121
|
+
"\u2705 audit secrets and track compliance: https://dotenvx.com/ops",
|
|
122
|
+
"\u{1F504} add secrets lifecycle management: https://dotenvx.com/ops",
|
|
123
|
+
"\u{1F511} add access controls to secrets: https://dotenvx.com/ops",
|
|
124
|
+
"\u{1F6E0}\uFE0F run anywhere with `dotenvx run -- yourcommand`",
|
|
125
|
+
"\u2699\uFE0F specify custom .env file path with { path: '/custom/path/.env' }",
|
|
126
|
+
"\u2699\uFE0F enable debug logging with { debug: true }",
|
|
127
|
+
"\u2699\uFE0F override existing env vars with { override: true }",
|
|
128
|
+
"\u2699\uFE0F suppress all logs with { quiet: true }",
|
|
129
|
+
"\u2699\uFE0F write to custom object with { processEnv: myObject }",
|
|
130
|
+
"\u2699\uFE0F load multiple .env files with { path: ['.env.local', '.env'] }"
|
|
131
|
+
];
|
|
132
|
+
function _getRandomTip() {
|
|
133
|
+
return TIPS[Math.floor(Math.random() * TIPS.length)];
|
|
134
|
+
}
|
|
135
|
+
function parseBoolean(value) {
|
|
136
|
+
if (typeof value === "string") {
|
|
137
|
+
return !["false", "0", "no", "off", ""].includes(value.toLowerCase());
|
|
138
|
+
}
|
|
139
|
+
return Boolean(value);
|
|
140
|
+
}
|
|
141
|
+
function supportsAnsi() {
|
|
142
|
+
return process.stdout.isTTY;
|
|
143
|
+
}
|
|
144
|
+
function dim(text) {
|
|
145
|
+
return supportsAnsi() ? `\x1B[2m${text}\x1B[0m` : text;
|
|
146
|
+
}
|
|
114
147
|
var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
|
115
148
|
function parse3(src) {
|
|
116
149
|
const obj = {};
|
|
@@ -159,7 +192,7 @@ var require_main = __commonJS({
|
|
|
159
192
|
return DotenvModule.parse(decrypted);
|
|
160
193
|
}
|
|
161
194
|
function _warn(message) {
|
|
162
|
-
console.
|
|
195
|
+
console.error(`[dotenv@${version2}][WARN] ${message}`);
|
|
163
196
|
}
|
|
164
197
|
function _debug(message) {
|
|
165
198
|
console.log(`[dotenv@${version2}][DEBUG] ${message}`);
|
|
@@ -233,8 +266,8 @@ var require_main = __commonJS({
|
|
|
233
266
|
return envPath2[0] === "~" ? path3.join(os3.homedir(), envPath2.slice(1)) : envPath2;
|
|
234
267
|
}
|
|
235
268
|
function _configVault(options) {
|
|
236
|
-
const debug =
|
|
237
|
-
const quiet =
|
|
269
|
+
const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
270
|
+
const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || options && options.quiet);
|
|
238
271
|
if (debug || !quiet) {
|
|
239
272
|
_log("Loading env from encrypted .env.vault");
|
|
240
273
|
}
|
|
@@ -249,8 +282,12 @@ var require_main = __commonJS({
|
|
|
249
282
|
function configDotenv(options) {
|
|
250
283
|
const dotenvPath = path3.resolve(process.cwd(), ".env");
|
|
251
284
|
let encoding = "utf8";
|
|
252
|
-
|
|
253
|
-
|
|
285
|
+
let processEnv = process.env;
|
|
286
|
+
if (options && options.processEnv != null) {
|
|
287
|
+
processEnv = options.processEnv;
|
|
288
|
+
}
|
|
289
|
+
let debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
290
|
+
let quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || options && options.quiet);
|
|
254
291
|
if (options && options.encoding) {
|
|
255
292
|
encoding = options.encoding;
|
|
256
293
|
} else {
|
|
@@ -282,13 +319,11 @@ var require_main = __commonJS({
|
|
|
282
319
|
lastError = e;
|
|
283
320
|
}
|
|
284
321
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
DotenvModule.populate(processEnv, parsedAll, options);
|
|
322
|
+
const populated = DotenvModule.populate(processEnv, parsedAll, options);
|
|
323
|
+
debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || debug);
|
|
324
|
+
quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || quiet);
|
|
290
325
|
if (debug || !quiet) {
|
|
291
|
-
const keysCount = Object.keys(
|
|
326
|
+
const keysCount = Object.keys(populated).length;
|
|
292
327
|
const shortPaths = [];
|
|
293
328
|
for (const filePath of optionPaths) {
|
|
294
329
|
try {
|
|
@@ -301,7 +336,7 @@ var require_main = __commonJS({
|
|
|
301
336
|
lastError = e;
|
|
302
337
|
}
|
|
303
338
|
}
|
|
304
|
-
_log(`injecting env (${keysCount}) from ${shortPaths.join(",")}`);
|
|
339
|
+
_log(`injecting env (${keysCount}) from ${shortPaths.join(",")} ${dim(`-- tip: ${_getRandomTip()}`)}`);
|
|
305
340
|
}
|
|
306
341
|
if (lastError) {
|
|
307
342
|
return { parsed: parsedAll, error: lastError };
|
|
@@ -350,6 +385,7 @@ var require_main = __commonJS({
|
|
|
350
385
|
function populate(processEnv, parsed, options = {}) {
|
|
351
386
|
const debug = Boolean(options && options.debug);
|
|
352
387
|
const override = Boolean(options && options.override);
|
|
388
|
+
const populated = {};
|
|
353
389
|
if (typeof parsed !== "object") {
|
|
354
390
|
const err = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
|
355
391
|
err.code = "OBJECT_REQUIRED";
|
|
@@ -359,6 +395,7 @@ var require_main = __commonJS({
|
|
|
359
395
|
if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
|
|
360
396
|
if (override === true) {
|
|
361
397
|
processEnv[key] = parsed[key];
|
|
398
|
+
populated[key] = parsed[key];
|
|
362
399
|
}
|
|
363
400
|
if (debug) {
|
|
364
401
|
if (override === true) {
|
|
@@ -369,8 +406,10 @@ var require_main = __commonJS({
|
|
|
369
406
|
}
|
|
370
407
|
} else {
|
|
371
408
|
processEnv[key] = parsed[key];
|
|
409
|
+
populated[key] = parsed[key];
|
|
372
410
|
}
|
|
373
411
|
}
|
|
412
|
+
return populated;
|
|
374
413
|
}
|
|
375
414
|
var DotenvModule = {
|
|
376
415
|
configDotenv,
|
|
@@ -22369,16 +22408,9 @@ var init_define_contract = __esm({
|
|
|
22369
22408
|
}
|
|
22370
22409
|
});
|
|
22371
22410
|
|
|
22372
|
-
// src/define-step.ts
|
|
22373
|
-
var
|
|
22374
|
-
"src/define-step.ts"() {
|
|
22375
|
-
"use strict";
|
|
22376
|
-
}
|
|
22377
|
-
});
|
|
22378
|
-
|
|
22379
|
-
// src/define-workflow.ts
|
|
22380
|
-
var init_define_workflow = __esm({
|
|
22381
|
-
"src/define-workflow.ts"() {
|
|
22411
|
+
// src/define-single-step-workflow.ts
|
|
22412
|
+
var init_define_single_step_workflow = __esm({
|
|
22413
|
+
"src/define-single-step-workflow.ts"() {
|
|
22382
22414
|
"use strict";
|
|
22383
22415
|
}
|
|
22384
22416
|
});
|
|
@@ -23759,14 +23791,25 @@ var init_systems = __esm({
|
|
|
23759
23791
|
* position-derived paths. Both still exist on this schema for backward compat.
|
|
23760
23792
|
*/
|
|
23761
23793
|
systems: external_exports.lazy(() => external_exports.record(external_exports.string().trim().min(1).max(100), SystemEntrySchema)).optional(),
|
|
23762
|
-
/**
|
|
23794
|
+
/**
|
|
23795
|
+
* @deprecated Use systems. Accepted as a compatibility alias during the ontology bridge.
|
|
23796
|
+
*
|
|
23797
|
+
* Accepted on INPUT only. Parsing used to mirror `systems` into this key so that
|
|
23798
|
+
* either spelling could be read off a parsed model, which meant every parsed System
|
|
23799
|
+
* carried the same children twice. Readers that walked both keys then visited each
|
|
23800
|
+
* nested System twice -- `getOrgOsRouteContractSystems` reported 11 checked paths
|
|
23801
|
+
* against command-center's 7 real Systems and would have raised every nested-System
|
|
23802
|
+
* failure as two failures -- and readers that walked this key alone looked correct
|
|
23803
|
+
* while depending entirely on the mirror. Both defects were live. The mirror is gone:
|
|
23804
|
+
* a parsed model now carries children under whichever key the author wrote, so read
|
|
23805
|
+
* `system.systems ?? system.subsystems` (helpers.ts, validation.ts, ontology.ts,
|
|
23806
|
+
* selectDeclaredSystems.ts, validateManifests.ts and SystemOpsView.tsx all do).
|
|
23807
|
+
*/
|
|
23763
23808
|
subsystems: external_exports.lazy(() => external_exports.record(external_exports.string().trim().min(1).max(100), SystemEntrySchema)).optional()
|
|
23764
23809
|
}).strict().refine((system) => system.label !== void 0 || system.title !== void 0, {
|
|
23765
23810
|
path: ["label"],
|
|
23766
23811
|
message: "System must provide label or title"
|
|
23767
|
-
})
|
|
23768
|
-
(system) => system.systems !== void 0 && system.subsystems === void 0 ? { ...system, subsystems: system.systems } : system
|
|
23769
|
-
);
|
|
23812
|
+
});
|
|
23770
23813
|
SystemsDomainSchema = external_exports.record(external_exports.string(), SystemEntrySchema).refine((record2) => Object.entries(record2).every(([key, entry]) => entry.id === key), {
|
|
23771
23814
|
message: "Each system entry id must match its map key"
|
|
23772
23815
|
}).default({});
|
|
@@ -26861,7 +26904,7 @@ function createPayloadSizeValidator(maxSizeBytes, options) {
|
|
|
26861
26904
|
}
|
|
26862
26905
|
});
|
|
26863
26906
|
}
|
|
26864
|
-
var UuidSchema, NonEmptyStringSchema, ResourceTypeSchema, OriginResourceTypeSchema, CredentialNameSchema, OAuthProviderSchema, OAuthCodeSchema, OAuthStateParamSchema, SanitizedStringSchema, EmailSchema, UrlSchema, PaginationSchema, TimestampSchema, DateRangeSchema;
|
|
26907
|
+
var UuidSchema, NonEmptyStringSchema, ResourceTypeSchema, OriginResourceTypeSchema, CredentialNameSchema, OAuthProviderSchema, OAuthCodeSchema, OAuthStateParamSchema, SanitizedStringSchema, EmailSchema, UrlSchema, PaginationSchema, DEFAULT_PAGE_LIMIT, MAX_PAGE_LIMIT, PageLimitSchema, PageOffsetSchema, PaginationQuerySchema, TimestampSchema, DateRangeSchema;
|
|
26865
26908
|
var init_validation = __esm({
|
|
26866
26909
|
"../core/src/platform/utils/validation.ts"() {
|
|
26867
26910
|
"use strict";
|
|
@@ -26884,6 +26927,14 @@ var init_validation = __esm({
|
|
|
26884
26927
|
limit: external_exports.coerce.number().int().min(1).max(100).default(20),
|
|
26885
26928
|
offset: external_exports.coerce.number().int().min(0).default(0)
|
|
26886
26929
|
});
|
|
26930
|
+
DEFAULT_PAGE_LIMIT = 50;
|
|
26931
|
+
MAX_PAGE_LIMIT = 100;
|
|
26932
|
+
PageLimitSchema = external_exports.coerce.number().int().min(1).max(MAX_PAGE_LIMIT);
|
|
26933
|
+
PageOffsetSchema = external_exports.coerce.number().int().min(0).default(0);
|
|
26934
|
+
PaginationQuerySchema = external_exports.object({
|
|
26935
|
+
limit: PageLimitSchema.default(DEFAULT_PAGE_LIMIT),
|
|
26936
|
+
offset: PageOffsetSchema
|
|
26937
|
+
});
|
|
26887
26938
|
TimestampSchema = external_exports.string().datetime();
|
|
26888
26939
|
DateRangeSchema = external_exports.object({
|
|
26889
26940
|
startDate: external_exports.string().datetime(),
|
|
@@ -47008,6 +47059,20 @@ var init_api2 = __esm({
|
|
|
47008
47059
|
}
|
|
47009
47060
|
});
|
|
47010
47061
|
|
|
47062
|
+
// ../core/src/platform/errors/index.ts
|
|
47063
|
+
var init_errors6 = __esm({
|
|
47064
|
+
"../core/src/platform/errors/index.ts"() {
|
|
47065
|
+
"use strict";
|
|
47066
|
+
}
|
|
47067
|
+
});
|
|
47068
|
+
|
|
47069
|
+
// ../core/src/platform/errors/disclosure.ts
|
|
47070
|
+
var init_disclosure = __esm({
|
|
47071
|
+
"../core/src/platform/errors/disclosure.ts"() {
|
|
47072
|
+
"use strict";
|
|
47073
|
+
}
|
|
47074
|
+
});
|
|
47075
|
+
|
|
47011
47076
|
// ../core/src/platform/index.ts
|
|
47012
47077
|
var init_platform = __esm({
|
|
47013
47078
|
"../core/src/platform/index.ts"() {
|
|
@@ -47017,6 +47082,8 @@ var init_platform = __esm({
|
|
|
47017
47082
|
init_registry();
|
|
47018
47083
|
init_sse();
|
|
47019
47084
|
init_api2();
|
|
47085
|
+
init_errors6();
|
|
47086
|
+
init_disclosure();
|
|
47020
47087
|
}
|
|
47021
47088
|
});
|
|
47022
47089
|
|
|
@@ -47384,7 +47451,7 @@ var init_sse_executions = __esm({
|
|
|
47384
47451
|
});
|
|
47385
47452
|
|
|
47386
47453
|
// ../core/src/execution/core/api-schemas.ts
|
|
47387
|
-
var PayloadSchema, OptionalPayloadSchema, ExecutionTargetSchema, OriginTrackingSchema, ExternalExecuteRequestSchema, ExternalExecuteResponseSchema, ExecutionEngineExecuteRequestSchema, ExecutionEngineExecuteResponseSchema, CreateCommandQueueTaskSchema, SubmitDecisionSchema, ListCommandQueueTasksSchema, ListExecutionsSchema, DeleteExecutionsSchema;
|
|
47454
|
+
var PayloadSchema, OptionalPayloadSchema, ExecutionTargetSchema, OriginTrackingSchema, ExternalExecuteRequestSchema, ExternalExecuteResponseSchema, ExecutionEngineExecuteRequestSchema, ExecutionEngineExecuteResponseSchema, CreateCommandQueueTaskSchema, SubmitDecisionSchema, ListCommandQueueTasksSchema, ExecutionStatusSchema, ResourceIdParamSchema, ResourceExecutionParamsSchema, ListExecutionsSchema, ListAllExecutionsSchema, DeleteExecutionsSchema, PatchExecutionBodySchema;
|
|
47388
47455
|
var init_api_schemas = __esm({
|
|
47389
47456
|
"../core/src/execution/core/api-schemas.ts"() {
|
|
47390
47457
|
"use strict";
|
|
@@ -47464,14 +47531,37 @@ var init_api_schemas = __esm({
|
|
|
47464
47531
|
}).strict();
|
|
47465
47532
|
ListCommandQueueTasksSchema = external_exports.object({
|
|
47466
47533
|
status: external_exports.enum(["pending", "approved", "rejected", "expired"]).optional(),
|
|
47467
|
-
limit:
|
|
47534
|
+
limit: PageLimitSchema.default(20)
|
|
47468
47535
|
}).strict();
|
|
47469
|
-
|
|
47470
|
-
|
|
47536
|
+
ExecutionStatusSchema = external_exports.enum(["pending", "running", "completed", "failed", "warning"]);
|
|
47537
|
+
ResourceIdParamSchema = external_exports.object({
|
|
47538
|
+
resourceId: NonEmptyStringSchema.max(255)
|
|
47471
47539
|
}).strict();
|
|
47540
|
+
ResourceExecutionParamsSchema = external_exports.object({
|
|
47541
|
+
resourceId: NonEmptyStringSchema.max(255),
|
|
47542
|
+
executionId: NonEmptyStringSchema.max(255)
|
|
47543
|
+
}).strict();
|
|
47544
|
+
ListExecutionsSchema = external_exports.object({
|
|
47545
|
+
resourceStatus: external_exports.enum(["dev", "prod", "all"]).default("all"),
|
|
47546
|
+
limit: PageLimitSchema.default(DEFAULT_PAGE_LIMIT),
|
|
47547
|
+
offset: PageOffsetSchema
|
|
47548
|
+
});
|
|
47549
|
+
ListAllExecutionsSchema = external_exports.object({
|
|
47550
|
+
resourceId: NonEmptyStringSchema.max(255).optional(),
|
|
47551
|
+
status: external_exports.enum([...ExecutionStatusSchema.options, "all"]).optional(),
|
|
47552
|
+
resourceStatus: external_exports.enum(["dev", "prod", "all"]).optional(),
|
|
47553
|
+
startDate: external_exports.coerce.number().int().nonnegative().optional(),
|
|
47554
|
+
endDate: external_exports.coerce.number().int().nonnegative().optional(),
|
|
47555
|
+
limit: PageLimitSchema.default(DEFAULT_PAGE_LIMIT),
|
|
47556
|
+
offset: PageOffsetSchema
|
|
47557
|
+
});
|
|
47472
47558
|
DeleteExecutionsSchema = external_exports.object({
|
|
47473
47559
|
resourceStatus: external_exports.enum(["dev", "prod"]).optional()
|
|
47474
47560
|
}).strict();
|
|
47561
|
+
PatchExecutionBodySchema = external_exports.object({
|
|
47562
|
+
status: external_exports.enum(["completed", "failed", "warning"]),
|
|
47563
|
+
error: external_exports.string().max(5e3).optional()
|
|
47564
|
+
}).strict();
|
|
47475
47565
|
}
|
|
47476
47566
|
});
|
|
47477
47567
|
|
|
@@ -48027,8 +48117,7 @@ var init_api_schemas2 = __esm({
|
|
|
48027
48117
|
init_validation();
|
|
48028
48118
|
NotificationCategorySchema = external_exports.enum(["info", "queue", "alert", "error", "system"]);
|
|
48029
48119
|
GetNotificationsQuerySchema = external_exports.object({
|
|
48030
|
-
|
|
48031
|
-
offset: external_exports.coerce.number().int().min(0).default(0)
|
|
48120
|
+
...PaginationQuerySchema.shape
|
|
48032
48121
|
});
|
|
48033
48122
|
MarkAsReadParamsSchema = external_exports.object({
|
|
48034
48123
|
id: UuidSchema
|
|
@@ -48110,6 +48199,85 @@ var init_schemas6 = __esm({
|
|
|
48110
48199
|
}
|
|
48111
48200
|
});
|
|
48112
48201
|
|
|
48202
|
+
// ../core/src/operations/observability/api-schemas.ts
|
|
48203
|
+
var ErrorSeveritySchema, ExecutionIdParamSchema, ErrorIdParamSchema, ObservabilityDateRangeQuerySchema, ExecutionLogsQuerySchema, ErrorDetailsQuerySchema, ErrorDistributionQuerySchema, ErrorTrendsQuerySchema, TopFailingResourcesQuerySchema, RecentExecutionsByResourceQuerySchema, CostTrendsQuerySchema, ResourceHealthTargetSchema, ResourcesHealthBodySchema, SystemHealthResourceKindSchema, SystemHealthResourceDescriptorSchema, SystemHealthBodySchema;
|
|
48204
|
+
var init_api_schemas3 = __esm({
|
|
48205
|
+
"../core/src/operations/observability/api-schemas.ts"() {
|
|
48206
|
+
"use strict";
|
|
48207
|
+
init_zod();
|
|
48208
|
+
init_validation();
|
|
48209
|
+
ErrorSeveritySchema = external_exports.enum(["critical", "warning", "info"]);
|
|
48210
|
+
ExecutionIdParamSchema = external_exports.object({ executionId: NonEmptyStringSchema.max(255) }).strict();
|
|
48211
|
+
ErrorIdParamSchema = external_exports.object({ errorId: external_exports.string().uuid() }).strict();
|
|
48212
|
+
ObservabilityDateRangeQuerySchema = external_exports.object({
|
|
48213
|
+
startDate: TimestampSchema.optional(),
|
|
48214
|
+
endDate: TimestampSchema.optional()
|
|
48215
|
+
});
|
|
48216
|
+
ExecutionLogsQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48217
|
+
page: external_exports.coerce.number().int().min(1).default(1),
|
|
48218
|
+
limit: PageLimitSchema.default(DEFAULT_PAGE_LIMIT),
|
|
48219
|
+
// Left as bounded strings rather than enums. The service passes both straight into `.eq()`, and an
|
|
48220
|
+
// unknown value returns an empty page rather than misbehaving — so an enum here would assert a
|
|
48221
|
+
// catalog this schema has no way to keep in step with the column.
|
|
48222
|
+
resourceType: external_exports.string().max(100).optional(),
|
|
48223
|
+
status: external_exports.string().max(50).optional(),
|
|
48224
|
+
search: external_exports.string().max(200).optional()
|
|
48225
|
+
});
|
|
48226
|
+
ErrorDetailsQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48227
|
+
page: external_exports.coerce.number().int().min(1).default(1),
|
|
48228
|
+
limit: PageLimitSchema.default(DEFAULT_PAGE_LIMIT),
|
|
48229
|
+
errorType: external_exports.string().max(100).optional(),
|
|
48230
|
+
severity: ErrorSeveritySchema.optional(),
|
|
48231
|
+
search: external_exports.string().max(200).optional(),
|
|
48232
|
+
// Tri-state on the wire: 'true' and 'false' filter, anything else (including 'all', which the
|
|
48233
|
+
// Command Center sends) means no filter. Coercing to a boolean here would make 'all' read as true.
|
|
48234
|
+
resolved: external_exports.enum(["true", "false", "all"]).optional()
|
|
48235
|
+
});
|
|
48236
|
+
ErrorDistributionQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48237
|
+
groupBy: external_exports.enum(["type", "severity"]).default("type")
|
|
48238
|
+
});
|
|
48239
|
+
ErrorTrendsQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48240
|
+
granularity: external_exports.enum(["hour", "day"]).default("day")
|
|
48241
|
+
});
|
|
48242
|
+
TopFailingResourcesQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48243
|
+
limit: PageLimitSchema.default(10)
|
|
48244
|
+
});
|
|
48245
|
+
RecentExecutionsByResourceQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48246
|
+
limit: PageLimitSchema.optional()
|
|
48247
|
+
});
|
|
48248
|
+
CostTrendsQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48249
|
+
granularity: external_exports.enum(["hour", "day"]).default("hour")
|
|
48250
|
+
});
|
|
48251
|
+
ResourceHealthTargetSchema = external_exports.object({
|
|
48252
|
+
entityType: NonEmptyStringSchema.max(100),
|
|
48253
|
+
entityId: NonEmptyStringSchema.max(255)
|
|
48254
|
+
}).strict();
|
|
48255
|
+
ResourcesHealthBodySchema = external_exports.object({
|
|
48256
|
+
resources: external_exports.array(ResourceHealthTargetSchema).min(1).max(20),
|
|
48257
|
+
startDate: TimestampSchema,
|
|
48258
|
+
endDate: TimestampSchema,
|
|
48259
|
+
granularity: external_exports.enum(["hour", "day"])
|
|
48260
|
+
}).strict();
|
|
48261
|
+
SystemHealthResourceKindSchema = external_exports.enum(["workflow", "agent", "integration", "script"]);
|
|
48262
|
+
SystemHealthResourceDescriptorSchema = external_exports.object({
|
|
48263
|
+
id: NonEmptyStringSchema.max(255),
|
|
48264
|
+
kind: SystemHealthResourceKindSchema,
|
|
48265
|
+
systemPath: external_exports.string().max(500).optional(),
|
|
48266
|
+
executable: external_exports.boolean().optional()
|
|
48267
|
+
}).strict();
|
|
48268
|
+
SystemHealthBodySchema = external_exports.object({
|
|
48269
|
+
systemPath: NonEmptyStringSchema.max(500),
|
|
48270
|
+
includeDescendants: external_exports.boolean().optional(),
|
|
48271
|
+
startDate: TimestampSchema,
|
|
48272
|
+
endDate: TimestampSchema,
|
|
48273
|
+
granularity: external_exports.enum(["hour", "day"]).optional(),
|
|
48274
|
+
directResources: external_exports.array(SystemHealthResourceDescriptorSchema).optional(),
|
|
48275
|
+
descendantResources: external_exports.array(SystemHealthResourceDescriptorSchema).optional(),
|
|
48276
|
+
resources: external_exports.array(SystemHealthResourceDescriptorSchema).optional()
|
|
48277
|
+
}).strict();
|
|
48278
|
+
}
|
|
48279
|
+
});
|
|
48280
|
+
|
|
48113
48281
|
// ../core/src/operations/observability/utils.ts
|
|
48114
48282
|
var init_utils5 = __esm({
|
|
48115
48283
|
"../core/src/operations/observability/utils.ts"() {
|
|
@@ -48123,6 +48291,7 @@ var init_observability = __esm({
|
|
|
48123
48291
|
"use strict";
|
|
48124
48292
|
init_types13();
|
|
48125
48293
|
init_schemas6();
|
|
48294
|
+
init_api_schemas3();
|
|
48126
48295
|
init_utils5();
|
|
48127
48296
|
}
|
|
48128
48297
|
});
|
|
@@ -48153,7 +48322,7 @@ var init_types14 = __esm({
|
|
|
48153
48322
|
|
|
48154
48323
|
// ../core/src/operations/activities/api-schemas.ts
|
|
48155
48324
|
var ActivityTypeSchema, ActivityStatusSchema, MetadataSchema, CreateActivitySchema, ActivityTrendQuerySchema, ListActivitiesQuerySchema;
|
|
48156
|
-
var
|
|
48325
|
+
var init_api_schemas4 = __esm({
|
|
48157
48326
|
"../core/src/operations/activities/api-schemas.ts"() {
|
|
48158
48327
|
"use strict";
|
|
48159
48328
|
init_zod();
|
|
@@ -48187,8 +48356,7 @@ var init_api_schemas3 = __esm({
|
|
|
48187
48356
|
endDate: external_exports.string().datetime().optional()
|
|
48188
48357
|
}).strict();
|
|
48189
48358
|
ListActivitiesQuerySchema = external_exports.object({
|
|
48190
|
-
|
|
48191
|
-
offset: external_exports.coerce.number().int().min(0).default(0),
|
|
48359
|
+
...PaginationQuerySchema.shape,
|
|
48192
48360
|
activityType: ActivityTypeSchema.optional(),
|
|
48193
48361
|
entityType: external_exports.string().max(100).optional(),
|
|
48194
48362
|
entityId: external_exports.string().max(255).optional(),
|
|
@@ -48212,7 +48380,7 @@ var init_activities = __esm({
|
|
|
48212
48380
|
"../core/src/operations/activities/index.ts"() {
|
|
48213
48381
|
"use strict";
|
|
48214
48382
|
init_types14();
|
|
48215
|
-
|
|
48383
|
+
init_api_schemas4();
|
|
48216
48384
|
init_sse_events3();
|
|
48217
48385
|
}
|
|
48218
48386
|
});
|
|
@@ -48651,7 +48819,7 @@ var init_acquisition = __esm({
|
|
|
48651
48819
|
|
|
48652
48820
|
// ../core/src/business/clients/api-schemas.ts
|
|
48653
48821
|
var ClientStatusSchema, ClientSourceSchema, ClientIdParamsSchema, ListClientsQuerySchema, ClientRefSchema, ClientResponseSchema, ClientDealRefSchema, ClientProjectRefSchema, ClientCompanyRefSchema, ClientContactRefSchema, ClientLineageSchema, ClientDetailResponseSchema, ClientListResponseSchema, ClientStatusResponseSchema, CreateClientRequestSchema, UpdateClientRequestSchema;
|
|
48654
|
-
var
|
|
48822
|
+
var init_api_schemas5 = __esm({
|
|
48655
48823
|
"../core/src/business/clients/api-schemas.ts"() {
|
|
48656
48824
|
"use strict";
|
|
48657
48825
|
init_zod();
|
|
@@ -48665,8 +48833,7 @@ var init_api_schemas4 = __esm({
|
|
|
48665
48833
|
status: ClientStatusSchema.optional(),
|
|
48666
48834
|
source: ClientSourceSchema.optional(),
|
|
48667
48835
|
search: external_exports.string().trim().min(1).max(255).optional(),
|
|
48668
|
-
|
|
48669
|
-
offset: external_exports.coerce.number().int().min(0).default(0)
|
|
48836
|
+
...PaginationQuerySchema.shape
|
|
48670
48837
|
}).strict();
|
|
48671
48838
|
ClientRefSchema = external_exports.object({
|
|
48672
48839
|
id: external_exports.string(),
|
|
@@ -48766,7 +48933,7 @@ var init_api_schemas4 = __esm({
|
|
|
48766
48933
|
var init_clients = __esm({
|
|
48767
48934
|
"../core/src/business/clients/index.ts"() {
|
|
48768
48935
|
"use strict";
|
|
48769
|
-
|
|
48936
|
+
init_api_schemas5();
|
|
48770
48937
|
}
|
|
48771
48938
|
});
|
|
48772
48939
|
|
|
@@ -48914,18 +49081,26 @@ var init_provider_registry = __esm({
|
|
|
48914
49081
|
}
|
|
48915
49082
|
});
|
|
48916
49083
|
|
|
49084
|
+
// ../core/src/integrations/oauth/errors.ts
|
|
49085
|
+
var init_errors7 = __esm({
|
|
49086
|
+
"../core/src/integrations/oauth/errors.ts"() {
|
|
49087
|
+
"use strict";
|
|
49088
|
+
}
|
|
49089
|
+
});
|
|
49090
|
+
|
|
48917
49091
|
// ../core/src/integrations/oauth/index.ts
|
|
48918
49092
|
var init_oauth = __esm({
|
|
48919
49093
|
"../core/src/integrations/oauth/index.ts"() {
|
|
48920
49094
|
"use strict";
|
|
48921
49095
|
init_types19();
|
|
48922
49096
|
init_provider_registry();
|
|
49097
|
+
init_errors7();
|
|
48923
49098
|
}
|
|
48924
49099
|
});
|
|
48925
49100
|
|
|
48926
49101
|
// ../core/src/integrations/credentials/api-schemas.ts
|
|
48927
49102
|
var CredentialTypeSchema, CredentialValueSchema, CreateCredentialRequestSchema, CreateCredentialResponseSchema, ListCredentialsResponseSchema, UpdateCredentialParamsSchema, UpdateCredentialRequestSchema, DeleteCredentialParamsSchema, VerifyCredentialParamsSchema, VerifyCredentialResponseSchema;
|
|
48928
|
-
var
|
|
49103
|
+
var init_api_schemas6 = __esm({
|
|
48929
49104
|
"../core/src/integrations/credentials/api-schemas.ts"() {
|
|
48930
49105
|
"use strict";
|
|
48931
49106
|
init_zod();
|
|
@@ -49001,7 +49176,7 @@ var init_api_schemas5 = __esm({
|
|
|
49001
49176
|
var init_credentials2 = __esm({
|
|
49002
49177
|
"../core/src/integrations/credentials/index.ts"() {
|
|
49003
49178
|
"use strict";
|
|
49004
|
-
|
|
49179
|
+
init_api_schemas6();
|
|
49005
49180
|
}
|
|
49006
49181
|
});
|
|
49007
49182
|
|
|
@@ -49062,8 +49237,7 @@ var init_index = __esm({
|
|
|
49062
49237
|
init_types();
|
|
49063
49238
|
init_config();
|
|
49064
49239
|
init_define_contract();
|
|
49065
|
-
|
|
49066
|
-
init_define_workflow();
|
|
49240
|
+
init_define_single_step_workflow();
|
|
49067
49241
|
init_contract_ref();
|
|
49068
49242
|
init_utils();
|
|
49069
49243
|
init_runtime();
|
|
@@ -49096,6 +49270,12 @@ function resolveApiKey(prod) {
|
|
|
49096
49270
|
function isProdApiUrl(apiUrl) {
|
|
49097
49271
|
return !apiUrl.includes("localhost");
|
|
49098
49272
|
}
|
|
49273
|
+
function withTarget(command, options = {}) {
|
|
49274
|
+
return command.option("--prod", "Target production (overrides NODE_ENV=development)").option("--api-url <url>", options.apiUrlDescription ?? "API base URL");
|
|
49275
|
+
}
|
|
49276
|
+
function printJson(value) {
|
|
49277
|
+
console.log(JSON.stringify(value, null, 2));
|
|
49278
|
+
}
|
|
49099
49279
|
function resolveApiKeyForUrl(apiUrl) {
|
|
49100
49280
|
return resolveApiKey(isProdApiUrl(apiUrl));
|
|
49101
49281
|
}
|
|
@@ -49397,7 +49577,7 @@ var init_package = __esm({
|
|
|
49397
49577
|
"package.json"() {
|
|
49398
49578
|
package_default = {
|
|
49399
49579
|
name: "@elevasis/sdk",
|
|
49400
|
-
version: "1.
|
|
49580
|
+
version: "1.55.0",
|
|
49401
49581
|
description: "SDK for building Elevasis organization resources",
|
|
49402
49582
|
type: "module",
|
|
49403
49583
|
bin: {
|
|
@@ -49436,14 +49616,14 @@ var init_package = __esm({
|
|
|
49436
49616
|
scripts: {
|
|
49437
49617
|
lint: "eslint src --max-warnings 0",
|
|
49438
49618
|
build: `node -e "require('fs').rmSync('dist',{recursive:true,force:true})" && tsc -p tsconfig.core-dts.json && tsc -p tsconfig.build.json && tsup && rollup -c rollup.dts.config.mjs && esbuild src/cli/index.ts --bundle --platform=node --outfile=dist/cli.cjs --format=cjs --external:esbuild --banner:js="#!/usr/bin/env node" && node scripts/verify-skill-coverage.mjs && node scripts/copy-reference-docs.mjs && node ../../scripts/monorepo/generate-reference-artifacts.js`,
|
|
49439
|
-
"
|
|
49440
|
-
"check-types": "pnpm type-check",
|
|
49619
|
+
"check-types": "tsc --noEmit",
|
|
49441
49620
|
test: "pnpm test:bundle",
|
|
49442
49621
|
"test:source": "vitest run --config vitest.config.ts",
|
|
49443
49622
|
"test:dist": "pnpm build && node ../../scripts/monorepo/validate-reference-artifacts.js && vitest run --config vitest.bundle.config.ts",
|
|
49444
49623
|
"test:bundle": "pnpm test:source && pnpm test:dist"
|
|
49445
49624
|
},
|
|
49446
49625
|
dependencies: {
|
|
49626
|
+
"@alcyone-labs/zod-to-json-schema": "^4.0.10",
|
|
49447
49627
|
"@mdx-js/mdx": "^3.1.1",
|
|
49448
49628
|
esbuild: "^0.25.0",
|
|
49449
49629
|
"remark-gfm": "^4.0.1"
|
|
@@ -49464,8 +49644,7 @@ var init_package = __esm({
|
|
|
49464
49644
|
"@types/node": "^22.0.0",
|
|
49465
49645
|
chalk: "^5.3.0",
|
|
49466
49646
|
commander: "^11.0.0",
|
|
49467
|
-
dotenv: "^
|
|
49468
|
-
"gray-matter": "^4.0.3",
|
|
49647
|
+
dotenv: "^17.2.3",
|
|
49469
49648
|
ora: "^7.0.1",
|
|
49470
49649
|
rollup: "^4.59.0",
|
|
49471
49650
|
"rollup-plugin-dts": "^6.3.0",
|
|
@@ -49473,6 +49652,15 @@ var init_package = __esm({
|
|
|
49473
49652
|
typescript: "5.9.2",
|
|
49474
49653
|
vitest: "^3.2.4",
|
|
49475
49654
|
zod: "^4.1.0"
|
|
49655
|
+
},
|
|
49656
|
+
license: "MIT",
|
|
49657
|
+
engines: {
|
|
49658
|
+
node: ">=22"
|
|
49659
|
+
},
|
|
49660
|
+
repository: {
|
|
49661
|
+
type: "git",
|
|
49662
|
+
url: "git+https://github.com/Elevasis/elevasis-monorepo.git",
|
|
49663
|
+
directory: "packages/sdk"
|
|
49476
49664
|
}
|
|
49477
49665
|
};
|
|
49478
49666
|
}
|
|
@@ -51224,12 +51412,7 @@ function formatRuntimeArguments(args) {
|
|
|
51224
51412
|
}).join(" ");
|
|
51225
51413
|
}
|
|
51226
51414
|
function renderCliCatalogMarkdown(catalog) {
|
|
51227
|
-
const lines = [
|
|
51228
|
-
"# elevasis-sdk CLI Catalog",
|
|
51229
|
-
"",
|
|
51230
|
-
`Source: \`${catalog.sourceRoot}\``,
|
|
51231
|
-
""
|
|
51232
|
-
];
|
|
51415
|
+
const lines = ["# elevasis-sdk CLI Catalog", "", `Source: \`${catalog.sourceRoot}\``, ""];
|
|
51233
51416
|
if (catalog.domains.length === 0) {
|
|
51234
51417
|
lines.push("No commands found.");
|
|
51235
51418
|
return lines.join("\n");
|
|
@@ -51534,11 +51717,11 @@ async function pollForCompletion(resourceId, executionId, apiUrl) {
|
|
|
51534
51717
|
}
|
|
51535
51718
|
}
|
|
51536
51719
|
function registerExecCommand(program3) {
|
|
51537
|
-
program3.command("exec <resourceId>").description(`Execute a deployed resource
|
|
51720
|
+
withTarget(program3.command("exec <resourceId>").description(`Execute a deployed resource
|
|
51538
51721
|
Example: elevasis-sdk exec my-workflow -i '{"key":"value"}'`).option("-i, --input <json>", "Input data as JSON string").option(
|
|
51539
51722
|
"-f, --input-file <path>",
|
|
51540
51723
|
"Read input from a JSON file (avoids shell escaping issues). Relative paths resolve against the project root."
|
|
51541
|
-
).option("--async", "Execute asynchronously with polling")
|
|
51724
|
+
).option("--async", "Execute asynchronously with polling"), { apiUrlDescription: "API URL" }).option(
|
|
51542
51725
|
"--cleanup-input",
|
|
51543
51726
|
"Delete the input file after a successful execution (only files under <projectRoot>/tmp/ are eligible; files outside tmp/ produce a warning and are left untouched)"
|
|
51544
51727
|
).action(
|
|
@@ -51636,7 +51819,7 @@ function getResourceType(resource) {
|
|
|
51636
51819
|
return resource.type ?? resource.resourceType;
|
|
51637
51820
|
}
|
|
51638
51821
|
function registerResourcesCommand(program3) {
|
|
51639
|
-
program3.command("resources").description("List deployed resources for your organization")
|
|
51822
|
+
withTarget(program3.command("resources").description("List deployed resources for your organization"), { apiUrlDescription: "API URL" }).option("--json", "Output as JSON").action(wrapAction("resources", async (options) => {
|
|
51640
51823
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
51641
51824
|
const spinner = ora("Fetching resources...").start();
|
|
51642
51825
|
const data = await apiGet(
|
|
@@ -51687,7 +51870,7 @@ init_api_client();
|
|
|
51687
51870
|
init_config2();
|
|
51688
51871
|
init_wrap_action();
|
|
51689
51872
|
function registerExecutionsCommand(program3) {
|
|
51690
|
-
program3.command("executions <resourceId>").description("List execution history for a resource\n Example: elevasis-sdk executions my-workflow --limit 10")
|
|
51873
|
+
withTarget(program3.command("executions <resourceId>").description("List execution history for a resource\n Example: elevasis-sdk executions my-workflow --limit 10"), { apiUrlDescription: "API URL" }).option("--json", "Output as JSON").option("--limit <number>", "Limit number of results (default: 50)").option("--status <status>", "Filter by status (running|completed|failed)").action(wrapAction("executions", async (resourceId, options) => {
|
|
51691
51874
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
51692
51875
|
const spinner = ora(`Fetching executions for ${resourceId}...`).start();
|
|
51693
51876
|
const params = new URLSearchParams();
|
|
@@ -51750,7 +51933,7 @@ init_api_client();
|
|
|
51750
51933
|
init_config2();
|
|
51751
51934
|
init_wrap_action();
|
|
51752
51935
|
function registerExecutionCommand(program3) {
|
|
51753
|
-
program3.command("execution <resourceId> <executionId>").description("Get detailed information about a specific execution\n Example: elevasis-sdk execution my-workflow abc-123-uuid --logs-only")
|
|
51936
|
+
withTarget(program3.command("execution <resourceId> <executionId>").description("Get detailed information about a specific execution\n Example: elevasis-sdk execution my-workflow abc-123-uuid --logs-only"), { apiUrlDescription: "API URL" }).option("--json", "Output raw JSON response").option("--logs-only", "Show only execution logs").option("--input", "Include input data in output").option("--result", "Include result data in output").action(wrapAction("execution", async (resourceId, executionId, options) => {
|
|
51754
51937
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
51755
51938
|
const spinner = ora("Fetching execution details...").start();
|
|
51756
51939
|
const execution = await apiGet(
|
|
@@ -51857,9 +52040,9 @@ init_api_client();
|
|
|
51857
52040
|
init_config2();
|
|
51858
52041
|
init_wrap_action();
|
|
51859
52042
|
function registerExecutionCancelCommand(program3) {
|
|
51860
|
-
program3.command("execution:cancel <resourceId> <executionId>").description(
|
|
52043
|
+
withTarget(program3.command("execution:cancel <resourceId> <executionId>").description(
|
|
51861
52044
|
"Cancel a running execution\n Example: elevasis-sdk execution:cancel my-workflow 9c47c944-67eb-4c84-98cb-bb951d05ede3"
|
|
51862
|
-
)
|
|
52045
|
+
)).option("--json", "Output raw JSON response").action(
|
|
51863
52046
|
wrapAction("execution:cancel", async (resourceId, executionId, options) => {
|
|
51864
52047
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
51865
52048
|
const spinner = options.json ? void 0 : ora("Cancelling execution...").start();
|
|
@@ -51900,9 +52083,9 @@ init_api_client();
|
|
|
51900
52083
|
init_config2();
|
|
51901
52084
|
init_wrap_action();
|
|
51902
52085
|
function registerExecutionsDeleteCommand(program3) {
|
|
51903
|
-
program3.command("executions:delete <resourceId>").description(
|
|
52086
|
+
withTarget(program3.command("executions:delete <resourceId>").description(
|
|
51904
52087
|
"Delete a resource\u2019s execution history (destructive)\n Example: elevasis-sdk executions:delete my-workflow --force"
|
|
51905
|
-
)
|
|
52088
|
+
)).option("--resource-status <status>", "Only delete runs from this deployment lane (dev|prod)").option("--force", "Skip the typed confirmation prompt").option("--json", "Output raw JSON response").action(
|
|
51906
52089
|
wrapAction("executions:delete", async (resourceId, options) => {
|
|
51907
52090
|
if (options.resourceStatus && options.resourceStatus !== "dev" && options.resourceStatus !== "prod") {
|
|
51908
52091
|
throw new Error('--resource-status must be "dev" or "prod"');
|
|
@@ -51950,7 +52133,7 @@ init_api_client();
|
|
|
51950
52133
|
init_config2();
|
|
51951
52134
|
init_wrap_action();
|
|
51952
52135
|
function registerDeploymentsCommand(program3) {
|
|
51953
|
-
program3.command("deployments").description("List deployments for your organization")
|
|
52136
|
+
withTarget(program3.command("deployments").description("List deployments for your organization"), { apiUrlDescription: "API URL" }).option("--json", "Output as JSON").action(wrapAction("deployments", async (options) => {
|
|
51954
52137
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
51955
52138
|
const spinner = ora("Fetching deployments...").start();
|
|
51956
52139
|
const data = await apiGet(
|
|
@@ -52034,7 +52217,7 @@ function formatJsonSchema(schema, indent = 2) {
|
|
|
52034
52217
|
return JSON.stringify(schema, null, 2);
|
|
52035
52218
|
}
|
|
52036
52219
|
function registerDescribeCommand(program3) {
|
|
52037
|
-
program3.command("describe <resourceId>").description("Show resource definition (metadata + schemas)\n Example: elevasis-sdk describe my-workflow")
|
|
52220
|
+
withTarget(program3.command("describe <resourceId>").description("Show resource definition (metadata + schemas)\n Example: elevasis-sdk describe my-workflow"), { apiUrlDescription: "API URL" }).option("--json", "Output raw JSON response").action(
|
|
52038
52221
|
wrapAction("describe", async (resourceId, options) => {
|
|
52039
52222
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
52040
52223
|
const spinner = ora("Fetching resource definition...").start();
|
|
@@ -52295,27 +52478,27 @@ Credential '${name}' deleted successfully.`));
|
|
|
52295
52478
|
// src/cli/commands/creds/creds.ts
|
|
52296
52479
|
function registerCredsCommand(program3) {
|
|
52297
52480
|
const creds = program3.command("creds").description("Manage organization credentials");
|
|
52298
|
-
creds.command("list").description("List all credentials (metadata only, no secrets)")
|
|
52481
|
+
withTarget(creds.command("list").description("List all credentials (metadata only, no secrets)"), { apiUrlDescription: "API URL" }).option("--json", "Output as JSON").action(
|
|
52299
52482
|
wrapAction("creds list", async (options) => {
|
|
52300
52483
|
await listCreds(resolveApiUrl(options.apiUrl, options.prod), options.json);
|
|
52301
52484
|
})
|
|
52302
52485
|
);
|
|
52303
|
-
creds.command("create").description("Create a new credential").requiredOption("--name <name>", "Credential name (lowercase, digits, hyphens)").requiredOption("--type <type>", "Credential type (api-key, webhook-secret, api-key-secret, clickup, instagram)").option("--value <json>", "Credential value as JSON string (or @json:<path> to read it from a file)")
|
|
52486
|
+
withTarget(creds.command("create").description("Create a new credential").requiredOption("--name <name>", "Credential name (lowercase, digits, hyphens)").requiredOption("--type <type>", "Credential type (api-key, webhook-secret, api-key-secret, clickup, instagram)").option("--value <json>", "Credential value as JSON string (or @json:<path> to read it from a file)"), { apiUrlDescription: "API URL" }).action(
|
|
52304
52487
|
wrapAction("creds create", async (options) => {
|
|
52305
52488
|
await createCreds(resolveApiUrl(options.apiUrl, options.prod), options.name, options.type, options.value);
|
|
52306
52489
|
})
|
|
52307
52490
|
);
|
|
52308
|
-
creds.command("update <name>").description("Update a credential value").requiredOption("--value <json>", "New credential value as JSON string (or @json:<path> to read it from a file)")
|
|
52491
|
+
withTarget(creds.command("update <name>").description("Update a credential value").requiredOption("--value <json>", "New credential value as JSON string (or @json:<path> to read it from a file)"), { apiUrlDescription: "API URL" }).action(
|
|
52309
52492
|
wrapAction("creds update", async (name, options) => {
|
|
52310
52493
|
await updateCreds(resolveApiUrl(options.apiUrl, options.prod), name, options.value);
|
|
52311
52494
|
})
|
|
52312
52495
|
);
|
|
52313
|
-
creds.command("rename <name>").description("Rename a credential").requiredOption("--to <newName>", "New credential name")
|
|
52496
|
+
withTarget(creds.command("rename <name>").description("Rename a credential").requiredOption("--to <newName>", "New credential name"), { apiUrlDescription: "API URL" }).action(
|
|
52314
52497
|
wrapAction("creds rename", async (name, options) => {
|
|
52315
52498
|
await renameCreds(resolveApiUrl(options.apiUrl, options.prod), name, options.to);
|
|
52316
52499
|
})
|
|
52317
52500
|
);
|
|
52318
|
-
creds.command("delete <name>").description("Delete a credential").option("--force", "Skip confirmation prompt")
|
|
52501
|
+
withTarget(creds.command("delete <name>").description("Delete a credential").option("--force", "Skip confirmation prompt"), { apiUrlDescription: "API URL" }).action(
|
|
52319
52502
|
wrapAction("creds delete", async (name, options) => {
|
|
52320
52503
|
await deleteCreds(resolveApiUrl(options.apiUrl, options.prod), name, options.force);
|
|
52321
52504
|
})
|
|
@@ -52352,12 +52535,12 @@ ${result.count} error(s) resolved for execution '${executionId}'.`));
|
|
|
52352
52535
|
// src/cli/commands/error/error.ts
|
|
52353
52536
|
function registerErrorCommand(program3) {
|
|
52354
52537
|
const error46 = program3.command("error").description("Manage execution errors");
|
|
52355
|
-
error46.command("resolve <errorId>").description("Mark a specific execution error as resolved")
|
|
52538
|
+
withTarget(error46.command("resolve <errorId>").description("Mark a specific execution error as resolved"), { apiUrlDescription: "API URL" }).action(
|
|
52356
52539
|
wrapAction("error resolve", async (errorId, options) => {
|
|
52357
52540
|
await resolveError(resolveApiUrl(options.apiUrl, options.prod), errorId);
|
|
52358
52541
|
})
|
|
52359
52542
|
);
|
|
52360
|
-
error46.command("resolve-execution <executionId>").description("Mark all errors for an execution as resolved")
|
|
52543
|
+
withTarget(error46.command("resolve-execution <executionId>").description("Mark all errors for an execution as resolved"), { apiUrlDescription: "API URL" }).action(
|
|
52361
52544
|
wrapAction("error resolve-execution", async (executionId, options) => {
|
|
52362
52545
|
await resolveErrorsByExecution(resolveApiUrl(options.apiUrl, options.prod), executionId);
|
|
52363
52546
|
})
|
|
@@ -52371,7 +52554,7 @@ init_api_client();
|
|
|
52371
52554
|
init_config2();
|
|
52372
52555
|
init_wrap_action();
|
|
52373
52556
|
function registerRenameCommand(program3) {
|
|
52374
|
-
program3.command("rename <oldResourceId>").description("Rename a resource ID across all platform tables (dry run by default)").requiredOption("--to <newResourceId>", "New resource ID").option("--execute", "Apply the rename (default: dry run preview only)")
|
|
52557
|
+
withTarget(program3.command("rename <oldResourceId>").description("Rename a resource ID across all platform tables (dry run by default)").requiredOption("--to <newResourceId>", "New resource ID").option("--execute", "Apply the rename (default: dry run preview only)"), { apiUrlDescription: "API URL" }).action(
|
|
52375
52558
|
wrapAction("rename", async (oldResourceId, options) => {
|
|
52376
52559
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
52377
52560
|
const dryRun = !options.execute;
|
|
@@ -52701,9 +52884,6 @@ async function resolveClient(query, apiUrl) {
|
|
|
52701
52884
|
}
|
|
52702
52885
|
throw new Error(`Multiple clients matched "${trimmedQuery}": ${formatClientCandidates(clients)}`);
|
|
52703
52886
|
}
|
|
52704
|
-
function printJson(value) {
|
|
52705
|
-
console.log(JSON.stringify(value, null, 2));
|
|
52706
|
-
}
|
|
52707
52887
|
function appendQuery(params, key, value) {
|
|
52708
52888
|
if (value === void 0 || value === null || value === "") return;
|
|
52709
52889
|
params.set(key, String(value));
|
|
@@ -52713,7 +52893,7 @@ function endpointWithQuery(endpoint, params) {
|
|
|
52713
52893
|
return query ? `${endpoint}?${query}` : endpoint;
|
|
52714
52894
|
}
|
|
52715
52895
|
function registerClientList(program3) {
|
|
52716
|
-
program3.command("client:list").description("List clients\n Example: elevasis-sdk client:list --status active").option("--status <status>", "Filter by status: active | onboarding | paused | completed | churned").option("--search <query>", "Search by client name").option("--limit <limit>", "Maximum number of clients to return").option("--offset <offset>", "Number of clients to skip")
|
|
52896
|
+
withTarget(program3.command("client:list").description("List clients\n Example: elevasis-sdk client:list --status active").option("--status <status>", "Filter by status: active | onboarding | paused | completed | churned").option("--search <query>", "Search by client name").option("--limit <limit>", "Maximum number of clients to return").option("--offset <offset>", "Number of clients to skip")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
52717
52897
|
wrapAction(
|
|
52718
52898
|
"client:list",
|
|
52719
52899
|
async (options) => {
|
|
@@ -52746,7 +52926,7 @@ Clients (${result.data.length} of ${result.total}):
|
|
|
52746
52926
|
);
|
|
52747
52927
|
}
|
|
52748
52928
|
function registerClientGet(program3) {
|
|
52749
|
-
program3.command("client:get <id>").description("Get a client by ID\n Example: elevasis-sdk client:get <uuid>")
|
|
52929
|
+
withTarget(program3.command("client:get <id>").description("Get a client by ID\n Example: elevasis-sdk client:get <uuid>")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
52750
52930
|
wrapAction("client:get", async (id, options) => {
|
|
52751
52931
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
52752
52932
|
const result = await apiGet(`/api/external/clients/${id}`, apiUrl);
|
|
@@ -52765,7 +52945,7 @@ Client: ${result.name}`));
|
|
|
52765
52945
|
);
|
|
52766
52946
|
}
|
|
52767
52947
|
function registerClientStatus(program3) {
|
|
52768
|
-
program3.command("client:status").description("Show client portfolio status")
|
|
52948
|
+
withTarget(program3.command("client:status").description("Show client portfolio status")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
52769
52949
|
wrapAction("client:status", async (options) => {
|
|
52770
52950
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
52771
52951
|
const result = await apiGet("/api/external/clients/status", apiUrl);
|
|
@@ -52790,9 +52970,9 @@ function registerClientStatus(program3) {
|
|
|
52790
52970
|
);
|
|
52791
52971
|
}
|
|
52792
52972
|
function registerClientResolve(program3) {
|
|
52793
|
-
program3.command("client:resolve <query>").description(
|
|
52973
|
+
withTarget(program3.command("client:resolve <query>").description(
|
|
52794
52974
|
'Resolve a client ID from a name, UUID, or search query\n Example: elevasis-sdk client:resolve "Acme"'
|
|
52795
|
-
)
|
|
52975
|
+
)).option("--pretty", "Render client details instead of only the resolved ID").action(
|
|
52796
52976
|
wrapAction("client:resolve", async (query, options) => {
|
|
52797
52977
|
const client = await resolveClient(query, resolveApiUrl(options.apiUrl, options.prod));
|
|
52798
52978
|
if (options.pretty) {
|
|
@@ -52809,11 +52989,10 @@ Resolved client: ${client.name}`));
|
|
|
52809
52989
|
}
|
|
52810
52990
|
|
|
52811
52991
|
// src/cli/commands/project/projects.ts
|
|
52812
|
-
function printJson2(value) {
|
|
52813
|
-
console.log(JSON.stringify(value, null, 2));
|
|
52814
|
-
}
|
|
52815
52992
|
function registerProjectList(program3) {
|
|
52816
|
-
|
|
52993
|
+
withTarget(
|
|
52994
|
+
program3.command("project:list").description("List projects\n Example: elevasis-sdk project:list --search alpha").option("--kind <kind>", "Filter by kind: client_engagement | internal | research | other").option("--status <status>", "Filter by status: active | on_track | at_risk | blocked | completed | paused").option("--search <query>", "Search by project name or description").option("--client <id-or-name>", "Filter by client hub record (UUID or fuzzy name)")
|
|
52995
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
52817
52996
|
wrapAction(
|
|
52818
52997
|
"project:list",
|
|
52819
52998
|
async (options) => {
|
|
@@ -52831,10 +53010,6 @@ function registerProjectList(program3) {
|
|
|
52831
53010
|
const qs = params.toString();
|
|
52832
53011
|
const endpoint = `/api/external/projects${qs ? `?${qs}` : ""}`;
|
|
52833
53012
|
const result = await apiGet(endpoint, apiUrl);
|
|
52834
|
-
if (options.json) {
|
|
52835
|
-
printJson2(result);
|
|
52836
|
-
return;
|
|
52837
|
-
}
|
|
52838
53013
|
if (options.pretty) {
|
|
52839
53014
|
const projects = result.projects;
|
|
52840
53015
|
if (projects.length === 0) {
|
|
@@ -52858,13 +53033,15 @@ Projects (${projects.length}):
|
|
|
52858
53033
|
);
|
|
52859
53034
|
}
|
|
52860
53035
|
function registerProjectResolve(program3) {
|
|
52861
|
-
|
|
52862
|
-
|
|
52863
|
-
|
|
53036
|
+
withTarget(
|
|
53037
|
+
program3.command("project:resolve <query>").description(
|
|
53038
|
+
'Resolve a project ID from a name, UUID, or search query\n Example: elevasis-sdk project:resolve "Alpha"'
|
|
53039
|
+
)
|
|
53040
|
+
).option("--pretty", "Render project details instead of only the resolved ID").option("--json", "Output as JSON").action(
|
|
52864
53041
|
wrapAction("project:resolve", async (query, options) => {
|
|
52865
53042
|
const project = await resolveProject(query, resolveApiUrl(options.apiUrl, options.prod));
|
|
52866
53043
|
if (options.json) {
|
|
52867
|
-
|
|
53044
|
+
printJson(project);
|
|
52868
53045
|
return;
|
|
52869
53046
|
}
|
|
52870
53047
|
if (options.pretty) {
|
|
@@ -52882,9 +53059,11 @@ Resolved project: ${project.name}`));
|
|
|
52882
53059
|
);
|
|
52883
53060
|
}
|
|
52884
53061
|
function registerProjectWork(program3) {
|
|
52885
|
-
|
|
52886
|
-
|
|
52887
|
-
|
|
53062
|
+
withTarget(
|
|
53063
|
+
program3.command("project:work <query>").alias("project:open").description(
|
|
53064
|
+
'Resolve a project and print a lifecycle-aware work brief\n Example: elevasis-sdk project:work "Alpha"'
|
|
53065
|
+
)
|
|
53066
|
+
).option("--json", "Render the structured work brief as JSON").action(
|
|
52888
53067
|
wrapAction("project:work", async (query, options) => {
|
|
52889
53068
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
52890
53069
|
const resolved = await resolveProject(query, apiUrl);
|
|
@@ -52904,14 +53083,12 @@ ${renderProjectWorkBrief(brief)}
|
|
|
52904
53083
|
);
|
|
52905
53084
|
}
|
|
52906
53085
|
function registerProjectGet(program3) {
|
|
52907
|
-
|
|
53086
|
+
withTarget(
|
|
53087
|
+
program3.command("project:get <id>").description("Get a project by ID\n Example: elevasis-sdk project:get <uuid>")
|
|
53088
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
52908
53089
|
wrapAction("project:get", async (id, options) => {
|
|
52909
53090
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
52910
53091
|
const result = await apiGet(`/api/external/projects/${id}`, apiUrl);
|
|
52911
|
-
if (options.json) {
|
|
52912
|
-
printJson2(result);
|
|
52913
|
-
return;
|
|
52914
|
-
}
|
|
52915
53092
|
if (options.pretty) {
|
|
52916
53093
|
const p = result.project;
|
|
52917
53094
|
console.log(source_default.cyan(`
|
|
@@ -52928,7 +53105,9 @@ Project: ${p.name}`));
|
|
|
52928
53105
|
);
|
|
52929
53106
|
}
|
|
52930
53107
|
function registerProjectCreate(program3) {
|
|
52931
|
-
|
|
53108
|
+
withTarget(
|
|
53109
|
+
program3.command("project:create").description('Create a new project\n Example: elevasis-sdk project:create --name "My Project" --kind internal').requiredOption("--name <name>", "Project name").requiredOption("--kind <kind>", "Project kind: client_engagement | internal | research | other").option("--status <status>", "Project status: active | on_track | at_risk | blocked | completed | paused").option("--description <description>", "Project description").option("--deal-id <uuid>", "Link to a deal (UUID)").option("--client <id-or-name>", "Link to a client hub record (UUID or fuzzy name)").option("--client-company-id <uuid>", "Link to a client company (UUID)").option("--start-date <date>", "Start date (ISO 8601, e.g. 2026-06-01)").option("--target-end-date <date>", "Target end date (ISO 8601, e.g. 2026-12-31)").option("--contract-value <amount>", "Contract value (number)", parseFloat).option("--metadata <json>", "Arbitrary metadata (JSON string)")
|
|
53110
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
52932
53111
|
wrapAction(
|
|
52933
53112
|
"project:create",
|
|
52934
53113
|
async (options) => {
|
|
@@ -52952,10 +53131,6 @@ function registerProjectCreate(program3) {
|
|
|
52952
53131
|
if (options.contractValue !== void 0) body.contract_value = options.contractValue;
|
|
52953
53132
|
if (options.metadata) body.metadata = JSON.parse(options.metadata);
|
|
52954
53133
|
const result = await apiPost("/api/external/projects", body, apiUrl);
|
|
52955
|
-
if (options.json) {
|
|
52956
|
-
printJson2(result);
|
|
52957
|
-
return;
|
|
52958
|
-
}
|
|
52959
53134
|
if (options.pretty) {
|
|
52960
53135
|
const p = result.project;
|
|
52961
53136
|
console.log(source_default.green(`
|
|
@@ -52972,7 +53147,9 @@ Project created: ${p.name}`));
|
|
|
52972
53147
|
);
|
|
52973
53148
|
}
|
|
52974
53149
|
function registerProjectUpdate(program3) {
|
|
52975
|
-
|
|
53150
|
+
withTarget(
|
|
53151
|
+
program3.command("project:update <id>").description("Update a project\n Example: elevasis-sdk project:update <uuid> --status completed").option("--name <name>", "New project name").option("--status <status>", "New status: active | on_track | at_risk | blocked | completed | paused").option("--description <description>", "New description").option("--deal-id <uuid>", "Link to a deal (UUID)").option("--client <id-or-name>", "Link to a client hub record (UUID or fuzzy name)").option("--clear-client", "Remove the client hub link (sets client_id to null)").option("--client-company-id <uuid>", "Link to a client company (UUID)").option("--start-date <date>", "Start date (ISO 8601, e.g. 2026-06-01)").option("--target-end-date <date>", "Target end date (ISO 8601, e.g. 2026-12-31)").option("--actual-end-date <date>", "Actual end date (ISO 8601)").option("--contract-value <amount>", "Contract value (number)", parseFloat).option("--metadata <json>", "Arbitrary metadata (JSON string)")
|
|
53152
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
52976
53153
|
wrapAction(
|
|
52977
53154
|
"project:update",
|
|
52978
53155
|
async (id, options) => {
|
|
@@ -53015,10 +53192,6 @@ function registerProjectUpdate(program3) {
|
|
|
53015
53192
|
process.exit(1);
|
|
53016
53193
|
}
|
|
53017
53194
|
const result = await apiPatch(`/api/external/projects/${id}`, body, apiUrl);
|
|
53018
|
-
if (options.json) {
|
|
53019
|
-
printJson2(result);
|
|
53020
|
-
return;
|
|
53021
|
-
}
|
|
53022
53195
|
if (options.pretty) {
|
|
53023
53196
|
const p = result.project;
|
|
53024
53197
|
console.log(source_default.green(`
|
|
@@ -53033,14 +53206,12 @@ Project updated: ${p.name}`));
|
|
|
53033
53206
|
);
|
|
53034
53207
|
}
|
|
53035
53208
|
function registerProjectDelete(program3) {
|
|
53036
|
-
|
|
53209
|
+
withTarget(
|
|
53210
|
+
program3.command("project:delete <id>").description("Delete a project\n Example: elevasis-sdk project:delete <uuid>")
|
|
53211
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53037
53212
|
wrapAction("project:delete", async (id, options) => {
|
|
53038
53213
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
53039
53214
|
const result = await apiDelete(`/api/external/projects/${id}`, apiUrl);
|
|
53040
|
-
if (options.json) {
|
|
53041
|
-
printJson2(result);
|
|
53042
|
-
return;
|
|
53043
|
-
}
|
|
53044
53215
|
if (options.pretty) {
|
|
53045
53216
|
console.log(source_default.green(`
|
|
53046
53217
|
Project ${id} deleted.`));
|
|
@@ -53058,9 +53229,6 @@ init_source();
|
|
|
53058
53229
|
init_wrap_action();
|
|
53059
53230
|
init_config2();
|
|
53060
53231
|
init_api_client();
|
|
53061
|
-
function printJson3(value) {
|
|
53062
|
-
console.log(JSON.stringify(value, null, 2));
|
|
53063
|
-
}
|
|
53064
53232
|
function parseSequenceOption(value) {
|
|
53065
53233
|
const parsed = Number(value);
|
|
53066
53234
|
if (!Number.isInteger(parsed) || parsed < 0) {
|
|
@@ -53091,14 +53259,12 @@ function parseChecklistOption(options) {
|
|
|
53091
53259
|
}
|
|
53092
53260
|
}
|
|
53093
53261
|
function registerMilestoneList(program3) {
|
|
53094
|
-
|
|
53262
|
+
withTarget(
|
|
53263
|
+
program3.command("project:milestone:list").description("List milestones for a project\n Example: elevasis-sdk project:milestone:list --project <uuid>").requiredOption("--project <project-id>", "Project ID (UUID)")
|
|
53264
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53095
53265
|
wrapAction("project:milestone:list", async (options) => {
|
|
53096
53266
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
53097
53267
|
const result = await apiGet(`/api/external/projects/${options.project}/milestones`, apiUrl);
|
|
53098
|
-
if (options.json) {
|
|
53099
|
-
printJson3(result);
|
|
53100
|
-
return;
|
|
53101
|
-
}
|
|
53102
53268
|
if (options.pretty) {
|
|
53103
53269
|
const milestones = result.milestones;
|
|
53104
53270
|
if (milestones.length === 0) {
|
|
@@ -53121,9 +53287,11 @@ Milestones (${milestones.length}):
|
|
|
53121
53287
|
);
|
|
53122
53288
|
}
|
|
53123
53289
|
function registerMilestoneCreate(program3) {
|
|
53124
|
-
|
|
53125
|
-
|
|
53126
|
-
|
|
53290
|
+
withTarget(
|
|
53291
|
+
program3.command("project:milestone:create").description(
|
|
53292
|
+
'Create a milestone\n Example: elevasis-sdk project:milestone:create --project <uuid> --name "Phase 1"'
|
|
53293
|
+
).requiredOption("--project <project-id>", "Project ID (UUID)").requiredOption("--name <name>", "Milestone name").option("--status <status>", "Status: upcoming | in_progress | completed | overdue | blocked").option("--due-date <date>", "Due date (ISO 8601, e.g. 2026-06-01)").option("--sequence <n>", "Display order within the project (non-negative integer)", parseSequenceOption).option("--description <description>", "Milestone description")
|
|
53294
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53127
53295
|
wrapAction(
|
|
53128
53296
|
"project:milestone:create",
|
|
53129
53297
|
async (options) => {
|
|
@@ -53138,10 +53306,6 @@ function registerMilestoneCreate(program3) {
|
|
|
53138
53306
|
body,
|
|
53139
53307
|
apiUrl
|
|
53140
53308
|
);
|
|
53141
|
-
if (options.json) {
|
|
53142
|
-
printJson3(result);
|
|
53143
|
-
return;
|
|
53144
|
-
}
|
|
53145
53309
|
if (options.pretty) {
|
|
53146
53310
|
const m = result.milestone;
|
|
53147
53311
|
console.log(source_default.green(`
|
|
@@ -53158,10 +53322,12 @@ Milestone created: ${m.name}`));
|
|
|
53158
53322
|
);
|
|
53159
53323
|
}
|
|
53160
53324
|
function registerMilestoneUpdate(program3) {
|
|
53161
|
-
|
|
53162
|
-
"--
|
|
53163
|
-
|
|
53164
|
-
|
|
53325
|
+
withTarget(
|
|
53326
|
+
program3.command("project:milestone:update <id>").description("Update a milestone\n Example: elevasis-sdk project:milestone:update <uuid> --status completed").option("--name <name>", "New milestone name").option("--status <status>", "New status: upcoming | in_progress | completed | overdue | blocked").option("--description <description>", "New description").option("--due-date <date>", "New due date (ISO 8601)").option("--sequence <n>", "New display order within the project (non-negative integer)", parseSequenceOption).option("--checklist <json>", `Replace checklist (full array): '[{"id":"1","label":"Step","completed":false}]'`).option(
|
|
53327
|
+
"--checklist-file <path>",
|
|
53328
|
+
"Read replacement checklist from a JSON file. Relative paths resolve against the project root."
|
|
53329
|
+
)
|
|
53330
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53165
53331
|
wrapAction(
|
|
53166
53332
|
"project:milestone:update",
|
|
53167
53333
|
async (id, options) => {
|
|
@@ -53184,10 +53350,6 @@ function registerMilestoneUpdate(program3) {
|
|
|
53184
53350
|
}
|
|
53185
53351
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
53186
53352
|
const result = await apiPatch(`/api/external/milestones/${id}`, body, apiUrl);
|
|
53187
|
-
if (options.json) {
|
|
53188
|
-
printJson3(result);
|
|
53189
|
-
return;
|
|
53190
|
-
}
|
|
53191
53353
|
if (options.pretty) {
|
|
53192
53354
|
const m = result.milestone;
|
|
53193
53355
|
console.log(source_default.green(`
|
|
@@ -53202,14 +53364,12 @@ Milestone updated: ${m.name}`));
|
|
|
53202
53364
|
);
|
|
53203
53365
|
}
|
|
53204
53366
|
function registerMilestoneDelete(program3) {
|
|
53205
|
-
|
|
53367
|
+
withTarget(
|
|
53368
|
+
program3.command("project:milestone:delete <id>").description("Delete a milestone\n Example: elevasis-sdk project:milestone:delete <uuid>")
|
|
53369
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53206
53370
|
wrapAction("project:milestone:delete", async (id, options) => {
|
|
53207
53371
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
53208
53372
|
const result = await apiDelete(`/api/external/milestones/${id}`, apiUrl);
|
|
53209
|
-
if (options.json) {
|
|
53210
|
-
printJson3(result);
|
|
53211
|
-
return;
|
|
53212
|
-
}
|
|
53213
53373
|
if (options.pretty) {
|
|
53214
53374
|
console.log(source_default.green(`
|
|
53215
53375
|
Milestone ${id} deleted.`));
|
|
@@ -53227,9 +53387,6 @@ init_source();
|
|
|
53227
53387
|
init_wrap_action();
|
|
53228
53388
|
init_config2();
|
|
53229
53389
|
init_api_client();
|
|
53230
|
-
function printJson4(value) {
|
|
53231
|
-
console.log(JSON.stringify(value, null, 2));
|
|
53232
|
-
}
|
|
53233
53390
|
function failConflictingFlags(message) {
|
|
53234
53391
|
process.stderr.write(JSON.stringify({ error: message, code: "CONFLICTING_FLAGS" }) + "\n");
|
|
53235
53392
|
process.exit(1);
|
|
@@ -53248,12 +53405,14 @@ function parseChecklistOption2(options) {
|
|
|
53248
53405
|
}
|
|
53249
53406
|
}
|
|
53250
53407
|
function registerTaskList(program3) {
|
|
53251
|
-
|
|
53252
|
-
"
|
|
53253
|
-
|
|
53254
|
-
"--
|
|
53255
|
-
|
|
53256
|
-
|
|
53408
|
+
withTarget(
|
|
53409
|
+
program3.command("project:task:list").description(
|
|
53410
|
+
"List tasks for a project\n Example: elevasis-sdk project:task:list --project <uuid> --status in_progress"
|
|
53411
|
+
).requiredOption("--project <project-id>", "Project ID (UUID)").option(
|
|
53412
|
+
"--status <status>",
|
|
53413
|
+
"Filter by status: planned | in_progress | blocked | completed | cancelled | submitted | approved | rejected | revision_requested"
|
|
53414
|
+
).option("--milestone <milestone-id>", "Filter by milestone ID (UUID)").option("--parent <parent-task-id>", "Filter by parent task ID (UUID)")
|
|
53415
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53257
53416
|
wrapAction(
|
|
53258
53417
|
"project:task:list",
|
|
53259
53418
|
async (options) => {
|
|
@@ -53265,10 +53424,6 @@ function registerTaskList(program3) {
|
|
|
53265
53424
|
const qs = params.toString();
|
|
53266
53425
|
const endpoint = `/api/external/projects/${options.project}/tasks${qs ? `?${qs}` : ""}`;
|
|
53267
53426
|
const result = await apiGet(endpoint, apiUrl);
|
|
53268
|
-
if (options.json) {
|
|
53269
|
-
printJson4(result);
|
|
53270
|
-
return;
|
|
53271
|
-
}
|
|
53272
53427
|
if (options.pretty) {
|
|
53273
53428
|
const tasks = result.tasks;
|
|
53274
53429
|
if (tasks.length === 0) {
|
|
@@ -53292,14 +53447,12 @@ Tasks (${tasks.length}):
|
|
|
53292
53447
|
);
|
|
53293
53448
|
}
|
|
53294
53449
|
function registerTaskGet(program3) {
|
|
53295
|
-
|
|
53450
|
+
withTarget(
|
|
53451
|
+
program3.command("project:task:get <id>").description("Get a task by ID\n Example: elevasis-sdk project:task:get <uuid>")
|
|
53452
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53296
53453
|
wrapAction("project:task:get", async (id, options) => {
|
|
53297
53454
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
53298
53455
|
const result = await apiGet(`/api/external/project-tasks/${id}`, apiUrl);
|
|
53299
|
-
if (options.json) {
|
|
53300
|
-
printJson4(result);
|
|
53301
|
-
return;
|
|
53302
|
-
}
|
|
53303
53456
|
if (options.pretty) {
|
|
53304
53457
|
const t = result.task;
|
|
53305
53458
|
console.log(source_default.cyan(`
|
|
@@ -53317,15 +53470,17 @@ Task: ${t.name}`));
|
|
|
53317
53470
|
);
|
|
53318
53471
|
}
|
|
53319
53472
|
function registerTaskCreate(program3) {
|
|
53320
|
-
|
|
53321
|
-
|
|
53322
|
-
|
|
53323
|
-
"--
|
|
53324
|
-
|
|
53325
|
-
|
|
53326
|
-
"--
|
|
53327
|
-
|
|
53328
|
-
|
|
53473
|
+
withTarget(
|
|
53474
|
+
program3.command("project:task:create").description(
|
|
53475
|
+
'Create a task\n Example: elevasis-sdk project:task:create --project <uuid> --title "Implement feature"'
|
|
53476
|
+
).requiredOption("--project <project-id>", "Project ID (UUID)").requiredOption("--title <title>", "Task title / name").option("--status <status>", "Status: planned | in_progress | blocked | completed | cancelled").option(
|
|
53477
|
+
"--type <type>",
|
|
53478
|
+
"Type: documentation | code | report | design | refactor | feature | bug | research | other"
|
|
53479
|
+
).option("--milestone <milestone-id>", "Milestone ID (UUID)").option("--parent <parent-task-id>", "Parent task ID (UUID) for subtasks").option("--due-date <date>", "Due date (ISO 8601, e.g. 2026-06-01)").option("--description <description>", "Task description").option("--checklist <json>", `Checklist items as JSON array: '[{"id":"1","label":"Step","completed":false}]'`).option(
|
|
53480
|
+
"--checklist-file <path>",
|
|
53481
|
+
"Read checklist items from a JSON file. Relative paths resolve against the project root."
|
|
53482
|
+
)
|
|
53483
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53329
53484
|
wrapAction(
|
|
53330
53485
|
"project:task:create",
|
|
53331
53486
|
async (options) => {
|
|
@@ -53350,10 +53505,6 @@ function registerTaskCreate(program3) {
|
|
|
53350
53505
|
)
|
|
53351
53506
|
);
|
|
53352
53507
|
}
|
|
53353
|
-
if (options.json) {
|
|
53354
|
-
printJson4(result);
|
|
53355
|
-
return;
|
|
53356
|
-
}
|
|
53357
53508
|
if (options.pretty) {
|
|
53358
53509
|
const t = result.task;
|
|
53359
53510
|
console.log(source_default.green(`
|
|
@@ -53369,16 +53520,18 @@ Task created: ${t.name}`));
|
|
|
53369
53520
|
);
|
|
53370
53521
|
}
|
|
53371
53522
|
function registerTaskUpdate(program3) {
|
|
53372
|
-
|
|
53373
|
-
"--status <
|
|
53374
|
-
|
|
53375
|
-
|
|
53376
|
-
|
|
53377
|
-
|
|
53378
|
-
|
|
53379
|
-
"--
|
|
53380
|
-
|
|
53381
|
-
|
|
53523
|
+
withTarget(
|
|
53524
|
+
program3.command("project:task:update <id>").description("Update a task\n Example: elevasis-sdk project:task:update <uuid> --status completed").option("--title <title>", "New task title").option(
|
|
53525
|
+
"--status <status>",
|
|
53526
|
+
"New status: planned | in_progress | blocked | completed | cancelled | submitted | approved | rejected | revision_requested"
|
|
53527
|
+
).option(
|
|
53528
|
+
"--type <type>",
|
|
53529
|
+
"New type: documentation | code | report | design | refactor | feature | bug | research | other"
|
|
53530
|
+
).option("--milestone <milestone-id>", "New milestone ID (UUID)").option("--clear-milestone", "Detach from its milestone (sets milestone_id to null)").option("--parent <parent-task-id>", "New parent task ID (UUID) \u2014 re-parents this task as a subtask").option("--clear-parent", "Detach from its parent task (sets parent_task_id to null)").option("--due-date <date>", "New due date (ISO 8601, e.g. 2026-06-01)").option("--description <description>", "New description").option("--file-url <url>", "Link to a deliverable file").option("--checklist <json>", `Replace checklist (full array): '[{"id":"1","label":"Step","completed":false}]'`).option(
|
|
53531
|
+
"--checklist-file <path>",
|
|
53532
|
+
"Read replacement checklist from a JSON file. Relative paths resolve against the project root."
|
|
53533
|
+
)
|
|
53534
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53382
53535
|
wrapAction(
|
|
53383
53536
|
"project:task:update",
|
|
53384
53537
|
async (id, options) => {
|
|
@@ -53412,10 +53565,6 @@ function registerTaskUpdate(program3) {
|
|
|
53412
53565
|
}
|
|
53413
53566
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
53414
53567
|
const result = await apiPatch(`/api/external/project-tasks/${id}`, body, apiUrl);
|
|
53415
|
-
if (options.json) {
|
|
53416
|
-
printJson4(result);
|
|
53417
|
-
return;
|
|
53418
|
-
}
|
|
53419
53568
|
if (options.pretty) {
|
|
53420
53569
|
const t = result.task;
|
|
53421
53570
|
console.log(source_default.green(`
|
|
@@ -53430,14 +53579,12 @@ Task updated: ${t.name}`));
|
|
|
53430
53579
|
);
|
|
53431
53580
|
}
|
|
53432
53581
|
function registerTaskDelete(program3) {
|
|
53433
|
-
|
|
53582
|
+
withTarget(
|
|
53583
|
+
program3.command("project:task:delete <id>").description("Delete a task\n Example: elevasis-sdk project:task:delete <uuid>")
|
|
53584
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53434
53585
|
wrapAction("project:task:delete", async (id, options) => {
|
|
53435
53586
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
53436
53587
|
const result = await apiDelete(`/api/external/project-tasks/${id}`, apiUrl);
|
|
53437
|
-
if (options.json) {
|
|
53438
|
-
printJson4(result);
|
|
53439
|
-
return;
|
|
53440
|
-
}
|
|
53441
53588
|
if (options.pretty) {
|
|
53442
53589
|
console.log(source_default.green(`
|
|
53443
53590
|
Task ${id} deleted.`));
|
|
@@ -53449,18 +53596,16 @@ Task ${id} deleted.`));
|
|
|
53449
53596
|
);
|
|
53450
53597
|
}
|
|
53451
53598
|
function registerTaskResume(program3) {
|
|
53452
|
-
|
|
53453
|
-
"
|
|
53454
|
-
|
|
53599
|
+
withTarget(
|
|
53600
|
+
program3.command("project:task:resume <id>").description(
|
|
53601
|
+
"Fetch the resume_context JSONB for a task (used by /work resume)\n Example: elevasis-sdk project:task:resume <uuid>"
|
|
53602
|
+
)
|
|
53603
|
+
).option("--pretty", "Render a human-readable resume briefing instead of raw JSON").action(
|
|
53455
53604
|
wrapAction("project:task:resume", async (id, options) => {
|
|
53456
53605
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
53457
53606
|
const result = await apiGet(`/api/external/project-tasks/${id}`, apiUrl);
|
|
53458
53607
|
const task = result.task;
|
|
53459
53608
|
const ctx = task.resume_context ?? {};
|
|
53460
|
-
if (options.json) {
|
|
53461
|
-
printJson4(ctx);
|
|
53462
|
-
return;
|
|
53463
|
-
}
|
|
53464
53609
|
if (options.pretty) {
|
|
53465
53610
|
console.log(source_default.cyan(`
|
|
53466
53611
|
Resume briefing for task: ${task.name}`));
|
|
@@ -53501,10 +53646,12 @@ Resume briefing for task: ${task.name}`));
|
|
|
53501
53646
|
);
|
|
53502
53647
|
}
|
|
53503
53648
|
function registerTaskSave(program3) {
|
|
53504
|
-
|
|
53505
|
-
|
|
53649
|
+
withTarget(
|
|
53650
|
+
program3.command("project:task:save <id>").description(
|
|
53651
|
+
`Merge fields into resume_context for a task (used by /work save)
|
|
53506
53652
|
Example: elevasis-sdk project:task:save <uuid> --current-state "Implemented X" --files-modified '["src/foo.ts"]'`
|
|
53507
|
-
|
|
53653
|
+
).requiredOption("--current-state <text>", "Current state description").option("--files-modified <json>", "JSON array of modified file paths").option("--next-steps <text>", "Next steps description").option("--key-docs <json>", "JSON array of key doc paths").option("--tools <json>", "JSON array of tool names used")
|
|
53654
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53508
53655
|
wrapAction(
|
|
53509
53656
|
"project:task:save",
|
|
53510
53657
|
async (id, options) => {
|
|
@@ -53546,10 +53693,6 @@ function registerTaskSave(program3) {
|
|
|
53546
53693
|
}
|
|
53547
53694
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
53548
53695
|
const result = await apiPatch(`/api/external/project-tasks/${id}/resume-context`, body, apiUrl);
|
|
53549
|
-
if (options.json) {
|
|
53550
|
-
printJson4(result);
|
|
53551
|
-
return;
|
|
53552
|
-
}
|
|
53553
53696
|
if (options.pretty) {
|
|
53554
53697
|
console.log(source_default.green(`
|
|
53555
53698
|
Resume context saved for task ${id}`));
|
|
@@ -53832,19 +53975,14 @@ var DeleteSuccessResponseSchema = external_exports.object({ success: external_ex
|
|
|
53832
53975
|
init_wrap_action();
|
|
53833
53976
|
init_config2();
|
|
53834
53977
|
init_api_client();
|
|
53835
|
-
function printJson5(value) {
|
|
53836
|
-
console.log(JSON.stringify(value, null, 2));
|
|
53837
|
-
}
|
|
53838
53978
|
var NOTE_TYPE_HELP = NoteTypeSchema.options.join(" | ");
|
|
53839
53979
|
function registerNoteList(program3) {
|
|
53840
|
-
|
|
53980
|
+
withTarget(
|
|
53981
|
+
program3.command("project:note:list").description("List notes for a project\n Example: elevasis-sdk project:note:list --project <uuid>").requiredOption("--project <project-id>", "Project ID (UUID)")
|
|
53982
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53841
53983
|
wrapAction("project:note:list", async (options) => {
|
|
53842
53984
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
53843
53985
|
const result = await apiGet(`/api/external/projects/${options.project}/notes`, apiUrl);
|
|
53844
|
-
if (options.json) {
|
|
53845
|
-
printJson5(result);
|
|
53846
|
-
return;
|
|
53847
|
-
}
|
|
53848
53986
|
if (options.pretty) {
|
|
53849
53987
|
const notes = result.notes;
|
|
53850
53988
|
if (notes.length === 0) {
|
|
@@ -53867,9 +54005,11 @@ Notes (${notes.length}):
|
|
|
53867
54005
|
);
|
|
53868
54006
|
}
|
|
53869
54007
|
function registerNoteCreate(program3) {
|
|
53870
|
-
|
|
53871
|
-
|
|
53872
|
-
|
|
54008
|
+
withTarget(
|
|
54009
|
+
program3.command("project:note:create").description(
|
|
54010
|
+
'Create a note\n Example: elevasis-sdk project:note:create --project <uuid> --content "Status update"'
|
|
54011
|
+
).requiredOption("--project <project-id>", "Project ID (UUID)").requiredOption("--content <content>", "Note content").option("--task <task-id>", "Attach to a task (UUID)").option("--milestone <milestone-id>", "Attach to a milestone (UUID)").option("--type <type>", `Note type: ${NOTE_TYPE_HELP}`)
|
|
54012
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53873
54013
|
wrapAction(
|
|
53874
54014
|
"project:note:create",
|
|
53875
54015
|
async (options) => {
|
|
@@ -53882,10 +54022,6 @@ function registerNoteCreate(program3) {
|
|
|
53882
54022
|
if (options.type) body.type = options.type;
|
|
53883
54023
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
53884
54024
|
const result = await apiPost("/api/external/project-notes", body, apiUrl);
|
|
53885
|
-
if (options.json) {
|
|
53886
|
-
printJson5(result);
|
|
53887
|
-
return;
|
|
53888
|
-
}
|
|
53889
54025
|
if (options.pretty) {
|
|
53890
54026
|
const n = result.note;
|
|
53891
54027
|
console.log(source_default.green(`
|
|
@@ -53901,7 +54037,9 @@ Note created`));
|
|
|
53901
54037
|
);
|
|
53902
54038
|
}
|
|
53903
54039
|
function registerNoteUpdate(program3) {
|
|
53904
|
-
|
|
54040
|
+
withTarget(
|
|
54041
|
+
program3.command("project:note:update <id>").description('Update a note\n Example: elevasis-sdk project:note:update <uuid> --content "Updated content"').requiredOption("--content <content>", "New note content")
|
|
54042
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53905
54043
|
wrapAction("project:note:update", async (id, options) => {
|
|
53906
54044
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
53907
54045
|
const result = await apiPatch(
|
|
@@ -53909,10 +54047,6 @@ function registerNoteUpdate(program3) {
|
|
|
53909
54047
|
{ content: options.content },
|
|
53910
54048
|
apiUrl
|
|
53911
54049
|
);
|
|
53912
|
-
if (options.json) {
|
|
53913
|
-
printJson5(result);
|
|
53914
|
-
return;
|
|
53915
|
-
}
|
|
53916
54050
|
if (options.pretty) {
|
|
53917
54051
|
console.log(source_default.green(`
|
|
53918
54052
|
Note ${id} updated.`));
|
|
@@ -53924,14 +54058,12 @@ Note ${id} updated.`));
|
|
|
53924
54058
|
);
|
|
53925
54059
|
}
|
|
53926
54060
|
function registerNoteDelete(program3) {
|
|
53927
|
-
|
|
54061
|
+
withTarget(
|
|
54062
|
+
program3.command("project:note:delete <id>").description("Delete a note\n Example: elevasis-sdk project:note:delete <uuid>")
|
|
54063
|
+
).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
53928
54064
|
wrapAction("project:note:delete", async (id, options) => {
|
|
53929
54065
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
53930
54066
|
const result = await apiDelete(`/api/external/project-notes/${id}`, apiUrl);
|
|
53931
|
-
if (options.json) {
|
|
53932
|
-
printJson5(result);
|
|
53933
|
-
return;
|
|
53934
|
-
}
|
|
53935
54067
|
if (options.pretty) {
|
|
53936
54068
|
console.log(source_default.green(`
|
|
53937
54069
|
Note ${id} deleted.`));
|
|
@@ -54639,7 +54771,7 @@ function formatText(results) {
|
|
|
54639
54771
|
const divider = "-".repeat(header.length + 20);
|
|
54640
54772
|
const rows = results.map((n) => {
|
|
54641
54773
|
const summary = n.summary.length > 80 ? n.summary.slice(0, 77) + "..." : n.summary;
|
|
54642
|
-
return `${n.kind.padEnd(kindWidth)} ${n.id.padEnd(idWidth)} ${n.title} \
|
|
54774
|
+
return `${n.kind.padEnd(kindWidth)} ${n.id.padEnd(idWidth)} ${n.title} \u2014 ${summary}`;
|
|
54643
54775
|
});
|
|
54644
54776
|
return [header, divider, ...rows].join("\n");
|
|
54645
54777
|
}
|
|
@@ -55797,7 +55929,7 @@ var REQUEST_CATEGORY_HELP = RequestCategoryEnum.options.join(" | ");
|
|
|
55797
55929
|
var REQUEST_SEVERITY_HELP = RequestSeverityEnum.options.join(" | ");
|
|
55798
55930
|
var REQUEST_STATUS_HELP = RequestStatusEnum.options.join(" | ");
|
|
55799
55931
|
function registerRequestCommands(program3) {
|
|
55800
|
-
program3.command("request:submit").description(
|
|
55932
|
+
withTarget(program3.command("request:submit").description(
|
|
55801
55933
|
`Submit a structured request report via POST /api/external/requests
|
|
55802
55934
|
Example: elevasis-sdk request:submit -f ./request-report.json
|
|
55803
55935
|
type: ${REQUEST_TYPE_HELP}
|
|
@@ -55806,7 +55938,7 @@ function registerRequestCommands(program3) {
|
|
|
55806
55938
|
).option("-i, --input <json>", "Request body as JSON string").option(
|
|
55807
55939
|
"-f, --input-file <path>",
|
|
55808
55940
|
"Read request body from a JSON file (e.g. request-report.json, avoids shell escaping). Relative paths resolve against the project root."
|
|
55809
|
-
)
|
|
55941
|
+
)).option("--pretty", "Render human-readable output instead of raw JSON").option(
|
|
55810
55942
|
"--cleanup-input",
|
|
55811
55943
|
"Delete the input file after a successful submission (only files under <projectRoot>/tmp/ are eligible; files outside tmp/ produce a warning and are left untouched)"
|
|
55812
55944
|
).action(
|
|
@@ -55851,12 +55983,12 @@ ${issues}`);
|
|
|
55851
55983
|
}
|
|
55852
55984
|
})
|
|
55853
55985
|
);
|
|
55854
|
-
program3.command("request:list").description(
|
|
55986
|
+
withTarget(program3.command("request:list").description(
|
|
55855
55987
|
`List reported requests via GET /api/external/requests
|
|
55856
55988
|
Example: elevasis-sdk request:list --status open --severity critical
|
|
55857
55989
|
status: ${REQUEST_STATUS_HELP}
|
|
55858
55990
|
severity: ${REQUEST_SEVERITY_HELP}`
|
|
55859
|
-
).option("--status <status>", `Filter by status (${REQUEST_STATUS_HELP})`).option("--severity <severity>", `Filter by severity (${REQUEST_SEVERITY_HELP})`).option("--project-id <uuid>", "Filter by project id").option("--limit <n>", "Max rows to return (1-200, default 50)")
|
|
55991
|
+
).option("--status <status>", `Filter by status (${REQUEST_STATUS_HELP})`).option("--severity <severity>", `Filter by severity (${REQUEST_SEVERITY_HELP})`).option("--project-id <uuid>", "Filter by project id").option("--limit <n>", "Max rows to return (1-200, default 50)")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
55860
55992
|
wrapAction("request:list", async (options) => {
|
|
55861
55993
|
const params = new URLSearchParams();
|
|
55862
55994
|
if (options.status) params.set("status", options.status);
|
|
@@ -55883,9 +56015,9 @@ ${rows.length} request${rows.length === 1 ? "" : "s"}`));
|
|
|
55883
56015
|
}
|
|
55884
56016
|
})
|
|
55885
56017
|
);
|
|
55886
|
-
program3.command("request:get <id>").description(
|
|
56018
|
+
withTarget(program3.command("request:get <id>").description(
|
|
55887
56019
|
"Get a reported request by id via GET /api/external/requests/:id\n Example: elevasis-sdk request:get 1a2b3c4d-5e6f-7890-abcd-ef1234567890"
|
|
55888
|
-
)
|
|
56020
|
+
)).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
55889
56021
|
wrapAction("request:get", async (id, options) => {
|
|
55890
56022
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
55891
56023
|
const result = await apiGet(`/api/external/requests/${encodeURIComponent(id)}`, apiUrl);
|
|
@@ -55904,7 +56036,7 @@ ${rows.length} request${rows.length === 1 ? "" : "s"}`));
|
|
|
55904
56036
|
}
|
|
55905
56037
|
})
|
|
55906
56038
|
);
|
|
55907
|
-
program3.command("request:update <id>").description(
|
|
56039
|
+
withTarget(program3.command("request:update <id>").description(
|
|
55908
56040
|
`Amend a request you filed via PATCH /api/external/requests/:id
|
|
55909
56041
|
Example: elevasis-sdk request:update <uuid> -i '{"project_id":"<uuid>"}'
|
|
55910
56042
|
Backfills project_id / task_id on rows filed before those were populated.
|
|
@@ -55915,7 +56047,7 @@ ${rows.length} request${rows.length === 1 ? "" : "s"}`));
|
|
|
55915
56047
|
).option("-i, --input <json>", "Fields to change, as a JSON object").option(
|
|
55916
56048
|
"-f, --input-file <path>",
|
|
55917
56049
|
"Read the changed fields from a JSON file (avoids shell escaping). Relative paths resolve against the project root."
|
|
55918
|
-
)
|
|
56050
|
+
)).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
55919
56051
|
wrapAction("request:update", async (id, options) => {
|
|
55920
56052
|
if (!options.input && !options.inputFile) {
|
|
55921
56053
|
throw new Error("Provide --input <json> or --input-file <path>");
|
|
@@ -55948,9 +56080,9 @@ ${issues}`);
|
|
|
55948
56080
|
}
|
|
55949
56081
|
})
|
|
55950
56082
|
);
|
|
55951
|
-
program3.command("request:delete <id>").description(
|
|
56083
|
+
withTarget(program3.command("request:delete <id>").description(
|
|
55952
56084
|
"Withdraw a request you filed via DELETE /api/external/requests/:id\n Example: elevasis-sdk request:delete <uuid>\n Permanent - the row is removed, not archived. Use request:update to amend instead."
|
|
55953
|
-
)
|
|
56085
|
+
)).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
55954
56086
|
wrapAction("request:delete", async (id, options) => {
|
|
55955
56087
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
55956
56088
|
const result = await apiDelete(`/api/external/requests/${encodeURIComponent(id)}`, apiUrl);
|
|
@@ -56130,7 +56262,11 @@ function listDeployedReadinessTargets(model) {
|
|
|
56130
56262
|
const targets = SYSTEM_INTERFACE_PROFILES.map((profile) => ({
|
|
56131
56263
|
systemPath: profile.systemPath,
|
|
56132
56264
|
interfaceKey: profile.interfaceKey,
|
|
56133
|
-
|
|
56265
|
+
// `declared` is built from apiInterface declarations, which are statements about
|
|
56266
|
+
// the `api` interface only. A System can carry several catalog profiles (sales.lead-gen
|
|
56267
|
+
// has both `api` and the derived `crm-handoff`), so matching on systemPath alone marked
|
|
56268
|
+
// a tenant as having declared a bridge it cannot author, and cost it the not-adopted opt-out.
|
|
56269
|
+
declaredLocally: profile.interfaceKey === "api" && declared.has(profile.systemPath)
|
|
56134
56270
|
}));
|
|
56135
56271
|
const covered = new Set(targets.map((target) => `${target.systemPath}::${target.interfaceKey}`));
|
|
56136
56272
|
for (const systemPath of declared) {
|
|
@@ -56427,9 +56563,6 @@ function endpointWithQuery2(endpoint, params) {
|
|
|
56427
56563
|
const query = params.toString();
|
|
56428
56564
|
return query ? `${endpoint}?${query}` : endpoint;
|
|
56429
56565
|
}
|
|
56430
|
-
function printJson6(value) {
|
|
56431
|
-
console.log(JSON.stringify(value, null, 2));
|
|
56432
|
-
}
|
|
56433
56566
|
function dealEmail(deal) {
|
|
56434
56567
|
return deal.contactEmail ?? deal.contact_email ?? "unknown contact";
|
|
56435
56568
|
}
|
|
@@ -56443,7 +56576,7 @@ function dealListId(deal) {
|
|
|
56443
56576
|
return deal.sourceListId ?? deal.source_list_id ?? null;
|
|
56444
56577
|
}
|
|
56445
56578
|
function registerAcquisitionDealList(program3) {
|
|
56446
|
-
program3.command("acquisition:deal:list").description("List acquisition deals\n Example: elevasis-sdk acquisition:deal:list --stage discovery").option("--stage <stage>", "Filter by CRM stage").option("--list <id>", "Filter by source acquisition list ID").option("--batch <batch>", "Filter by source batch ID").option("--stale-since <datetime>", "Filter to deals stale since an ISO datetime").option("--search <query>", "Search by contact, company, or deal label").option("--limit <limit>", "Maximum number of deals to return").option("--offset <offset>", "Number of deals to skip")
|
|
56579
|
+
withTarget(program3.command("acquisition:deal:list").description("List acquisition deals\n Example: elevasis-sdk acquisition:deal:list --stage discovery").option("--stage <stage>", "Filter by CRM stage").option("--list <id>", "Filter by source acquisition list ID").option("--batch <batch>", "Filter by source batch ID").option("--stale-since <datetime>", "Filter to deals stale since an ISO datetime").option("--search <query>", "Search by contact, company, or deal label").option("--limit <limit>", "Maximum number of deals to return").option("--offset <offset>", "Number of deals to skip")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
56447
56580
|
wrapAction(
|
|
56448
56581
|
"acquisition:deal:list",
|
|
56449
56582
|
async (options) => {
|
|
@@ -56458,7 +56591,7 @@ function registerAcquisitionDealList(program3) {
|
|
|
56458
56591
|
appendQuery2(params, "offset", options.offset);
|
|
56459
56592
|
const result = await apiGet(endpointWithQuery2("/api/external/deals", params), apiUrl);
|
|
56460
56593
|
if (!options.pretty) {
|
|
56461
|
-
|
|
56594
|
+
printJson(result);
|
|
56462
56595
|
return;
|
|
56463
56596
|
}
|
|
56464
56597
|
if (result.data.length === 0) {
|
|
@@ -56481,12 +56614,12 @@ Acquisition deals (${result.data.length} of ${result.total}):
|
|
|
56481
56614
|
);
|
|
56482
56615
|
}
|
|
56483
56616
|
function registerAcquisitionDealGet(program3) {
|
|
56484
|
-
program3.command("acquisition:deal:get <id>").description("Get an acquisition deal by ID\n Example: elevasis-sdk acquisition:deal:get <uuid>")
|
|
56617
|
+
withTarget(program3.command("acquisition:deal:get <id>").description("Get an acquisition deal by ID\n Example: elevasis-sdk acquisition:deal:get <uuid>")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
56485
56618
|
wrapAction("acquisition:deal:get", async (id, options) => {
|
|
56486
56619
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
56487
56620
|
const result = await apiGet("/api/external/deals/" + id, apiUrl);
|
|
56488
56621
|
if (!options.pretty) {
|
|
56489
|
-
|
|
56622
|
+
printJson(result);
|
|
56490
56623
|
return;
|
|
56491
56624
|
}
|
|
56492
56625
|
console.log(source_default.cyan(`
|
|
@@ -56503,12 +56636,12 @@ Acquisition deal: ${dealEmail(result)}`));
|
|
|
56503
56636
|
);
|
|
56504
56637
|
}
|
|
56505
56638
|
function registerAcquisitionDealStatus(program3) {
|
|
56506
|
-
program3.command("acquisition:deal:status").description("Show CRM funnel status for acquisition deals")
|
|
56639
|
+
withTarget(program3.command("acquisition:deal:status").description("Show CRM funnel status for acquisition deals")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
56507
56640
|
wrapAction("acquisition:deal:status", async (options) => {
|
|
56508
56641
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
56509
56642
|
const result = await apiGet("/api/external/deals/summary", apiUrl);
|
|
56510
56643
|
if (!options.pretty) {
|
|
56511
|
-
|
|
56644
|
+
printJson(result);
|
|
56512
56645
|
return;
|
|
56513
56646
|
}
|
|
56514
56647
|
console.log(source_default.cyan("\nAcquisition deal status"));
|
|
@@ -56540,9 +56673,6 @@ function endpointWithQuery3(endpoint, params) {
|
|
|
56540
56673
|
const query = params.toString();
|
|
56541
56674
|
return query ? `${endpoint}?${query}` : endpoint;
|
|
56542
56675
|
}
|
|
56543
|
-
function printJson7(value) {
|
|
56544
|
-
console.log(JSON.stringify(value, null, 2));
|
|
56545
|
-
}
|
|
56546
56676
|
function renderListSummary(list) {
|
|
56547
56677
|
const batches = list.batchIds?.length ? `${list.batchIds.length} batch(es)` : "no batches";
|
|
56548
56678
|
const vertical = typeof list.scrapingConfig?.vertical === "string" ? ` ${list.scrapingConfig.vertical}` : "";
|
|
@@ -56552,7 +56682,7 @@ function renderListSummary(list) {
|
|
|
56552
56682
|
if (list.description) console.log(source_default.gray(` ${list.description}`));
|
|
56553
56683
|
}
|
|
56554
56684
|
function registerAcquisitionListList(program3) {
|
|
56555
|
-
program3.command("acquisition:list:list").description("List acquisition lists\n Example: elevasis-sdk acquisition:list:list --status launched").option("--status <status>", "Filter by status: draft | enriching | launched | closing | archived").option("--batch <batch>", "Filter by batch ID").option("--vertical <vertical>", "Filter by scraping vertical").option("--limit <limit>", "Maximum number of lists to return").option("--offset <offset>", "Number of lists to skip")
|
|
56685
|
+
withTarget(program3.command("acquisition:list:list").description("List acquisition lists\n Example: elevasis-sdk acquisition:list:list --status launched").option("--status <status>", "Filter by status: draft | enriching | launched | closing | archived").option("--batch <batch>", "Filter by batch ID").option("--vertical <vertical>", "Filter by scraping vertical").option("--limit <limit>", "Maximum number of lists to return").option("--offset <offset>", "Number of lists to skip")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
56556
56686
|
wrapAction(
|
|
56557
56687
|
"acquisition:list:list",
|
|
56558
56688
|
async (options) => {
|
|
@@ -56568,7 +56698,7 @@ function registerAcquisitionListList(program3) {
|
|
|
56568
56698
|
apiUrl
|
|
56569
56699
|
);
|
|
56570
56700
|
if (!options.pretty) {
|
|
56571
|
-
|
|
56701
|
+
printJson(result);
|
|
56572
56702
|
return;
|
|
56573
56703
|
}
|
|
56574
56704
|
if (result.length === 0) {
|
|
@@ -56585,7 +56715,7 @@ Acquisition lists (${result.length}):
|
|
|
56585
56715
|
);
|
|
56586
56716
|
}
|
|
56587
56717
|
function registerAcquisitionListGet(program3) {
|
|
56588
|
-
program3.command("acquisition:list:get <id>").description("Get an acquisition list by ID\n Example: elevasis-sdk acquisition:list:get <uuid>").option("--no-include-deals", "Exclude thin deal lineage refs").option("--deal-limit <limit>", "Maximum number of thin deal refs to include").option("--include-progress", "Include processing progress aggregates")
|
|
56718
|
+
withTarget(program3.command("acquisition:list:get <id>").description("Get an acquisition list by ID\n Example: elevasis-sdk acquisition:list:get <uuid>").option("--no-include-deals", "Exclude thin deal lineage refs").option("--deal-limit <limit>", "Maximum number of thin deal refs to include").option("--include-progress", "Include processing progress aggregates")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
56589
56719
|
wrapAction(
|
|
56590
56720
|
"acquisition:list:get",
|
|
56591
56721
|
async (id, options) => {
|
|
@@ -56599,7 +56729,7 @@ function registerAcquisitionListGet(program3) {
|
|
|
56599
56729
|
apiUrl
|
|
56600
56730
|
);
|
|
56601
56731
|
if (!options.pretty) {
|
|
56602
|
-
|
|
56732
|
+
printJson(result);
|
|
56603
56733
|
return;
|
|
56604
56734
|
}
|
|
56605
56735
|
console.log(source_default.cyan(`
|
|
@@ -56616,12 +56746,12 @@ Acquisition list: ${result.name}`));
|
|
|
56616
56746
|
);
|
|
56617
56747
|
}
|
|
56618
56748
|
function registerAcquisitionListStatus(program3) {
|
|
56619
|
-
program3.command("acquisition:list:status").description("Show portfolio status across acquisition lists")
|
|
56749
|
+
withTarget(program3.command("acquisition:list:status").description("Show portfolio status across acquisition lists")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
56620
56750
|
wrapAction("acquisition:list:status", async (options) => {
|
|
56621
56751
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
56622
56752
|
const result = await apiGet("/api/external/acquisition/lists/status", apiUrl);
|
|
56623
56753
|
if (!options.pretty) {
|
|
56624
|
-
|
|
56754
|
+
printJson(result);
|
|
56625
56755
|
return;
|
|
56626
56756
|
}
|
|
56627
56757
|
console.log(source_default.cyan("\nAcquisition list status"));
|
|
@@ -56654,7 +56784,7 @@ init_wrap_action();
|
|
|
56654
56784
|
init_config2();
|
|
56655
56785
|
init_api_client();
|
|
56656
56786
|
function registerClientCreate(program3) {
|
|
56657
|
-
program3.command("client:create").description('Create a new client\n Example: elevasis-sdk client:create --name "Acme Corp"').requiredOption("--name <name>", "Client name").option("--status <status>", "Client status: active | onboarding | paused | completed | churned").option("--source <source>", "Client source (for example: acquisition | word_of_mouth)").option("--source-deal-id <uuid>", "UUID of the source deal").option("--primary-company-id <uuid>", "UUID of the primary company").option("--primary-contact-id <uuid>", "UUID of the primary contact").option("--metadata <json>", "Arbitrary metadata (JSON string)")
|
|
56787
|
+
withTarget(program3.command("client:create").description('Create a new client\n Example: elevasis-sdk client:create --name "Acme Corp"').requiredOption("--name <name>", "Client name").option("--status <status>", "Client status: active | onboarding | paused | completed | churned").option("--source <source>", "Client source (for example: acquisition | word_of_mouth)").option("--source-deal-id <uuid>", "UUID of the source deal").option("--primary-company-id <uuid>", "UUID of the primary company").option("--primary-contact-id <uuid>", "UUID of the primary contact").option("--metadata <json>", "Arbitrary metadata (JSON string)")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
56658
56788
|
wrapAction(
|
|
56659
56789
|
"client:create",
|
|
56660
56790
|
async (options) => {
|
|
@@ -56681,7 +56811,7 @@ Client created: ${result.name}`));
|
|
|
56681
56811
|
);
|
|
56682
56812
|
}
|
|
56683
56813
|
function registerClientUpdate(program3) {
|
|
56684
|
-
program3.command("client:update <id>").description("Update a client\n Example: elevasis-sdk client:update <uuid> --status active").option("--name <name>", "New client name").option("--status <status>", "New status: active | onboarding | paused | completed | churned").option("--source <source>", "Set client source (for example: acquisition | word_of_mouth)").option("--source-deal-id <uuid>", "Set source deal (UUID)").option("--clear-source-deal", "Remove the source deal link (sets sourceDealId to null)").option("--primary-company-id <uuid>", "Set primary company (UUID)").option("--clear-primary-company", "Remove the primary company link (sets primaryCompanyId to null)").option("--primary-contact-id <uuid>", "Set primary contact (UUID)").option("--clear-primary-contact", "Remove the primary contact link (sets primaryContactId to null)").option("--metadata <json>", "Arbitrary metadata (JSON string)")
|
|
56814
|
+
withTarget(program3.command("client:update <id>").description("Update a client\n Example: elevasis-sdk client:update <uuid> --status active").option("--name <name>", "New client name").option("--status <status>", "New status: active | onboarding | paused | completed | churned").option("--source <source>", "Set client source (for example: acquisition | word_of_mouth)").option("--source-deal-id <uuid>", "Set source deal (UUID)").option("--clear-source-deal", "Remove the source deal link (sets sourceDealId to null)").option("--primary-company-id <uuid>", "Set primary company (UUID)").option("--clear-primary-company", "Remove the primary company link (sets primaryCompanyId to null)").option("--primary-contact-id <uuid>", "Set primary contact (UUID)").option("--clear-primary-contact", "Remove the primary contact link (sets primaryContactId to null)").option("--metadata <json>", "Arbitrary metadata (JSON string)")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
56685
56815
|
wrapAction(
|
|
56686
56816
|
"client:update",
|
|
56687
56817
|
async (id, options) => {
|
|
@@ -56758,7 +56888,7 @@ Client updated: ${result.name}`));
|
|
|
56758
56888
|
);
|
|
56759
56889
|
}
|
|
56760
56890
|
function registerClientDelete(program3) {
|
|
56761
|
-
program3.command("client:delete <id>").description("Delete a client\n Example: elevasis-sdk client:delete <uuid>")
|
|
56891
|
+
withTarget(program3.command("client:delete <id>").description("Delete a client\n Example: elevasis-sdk client:delete <uuid>")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
56762
56892
|
wrapAction("client:delete", async (id, options) => {
|
|
56763
56893
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
56764
56894
|
const client = await resolveClient(id, apiUrl);
|
|
@@ -56795,9 +56925,9 @@ function appendQuery4(params, key, value) {
|
|
|
56795
56925
|
params.set(key, String(value));
|
|
56796
56926
|
}
|
|
56797
56927
|
function registerContentList(program3) {
|
|
56798
|
-
program3.command("content:list").description(
|
|
56928
|
+
withTarget(program3.command("content:list").description(
|
|
56799
56929
|
'List content pipeline items\n Example: elevasis-sdk content:list --status <status> --pipeline-id <pipelineId>\n Note: both values come from the org model this project declares, not a platform enum --\n read them from the content:catalog/status catalog and content:pipeline.\n Note: "awaiting review" is not a status -- that read is content:queue.'
|
|
56800
|
-
).option("--status <status>", "Filter by content item status").option("--pillar <pillar>", "Filter by content pillar").option("--pipeline-id <id>", "Filter by pipeline template id").option("--client-id <id>", "Filter by client id").option("--reviewed-by <id>", "Filter by reviewer user id").option("--search <query>", "Search by title").option("--limit <n>", "Maximum number of results").option("--offset <n>", "Pagination offset")
|
|
56930
|
+
).option("--status <status>", "Filter by content item status").option("--pillar <pillar>", "Filter by content pillar").option("--pipeline-id <id>", "Filter by pipeline template id").option("--client-id <id>", "Filter by client id").option("--reviewed-by <id>", "Filter by reviewer user id").option("--search <query>", "Search by title").option("--limit <n>", "Maximum number of results").option("--offset <n>", "Pagination offset")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
56801
56931
|
wrapAction("content:list", async (options) => {
|
|
56802
56932
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
56803
56933
|
const params = new URLSearchParams();
|
|
@@ -56840,9 +56970,9 @@ init_api_client();
|
|
|
56840
56970
|
init_config2();
|
|
56841
56971
|
init_wrap_action();
|
|
56842
56972
|
function registerContentGet(program3) {
|
|
56843
|
-
program3.command("content:get <itemId>").description(
|
|
56973
|
+
withTarget(program3.command("content:get <itemId>").description(
|
|
56844
56974
|
"Get a content item, its attempts, and its distributions in one call\n Example: elevasis-sdk content:get <uuid>"
|
|
56845
|
-
)
|
|
56975
|
+
)).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
56846
56976
|
wrapAction("content:get", async (itemId, options) => {
|
|
56847
56977
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
56848
56978
|
const result = await apiGet(`/api/external/content/items/${itemId}`, apiUrl);
|
|
@@ -57033,9 +57163,9 @@ function printCards(cards, stepsByKey) {
|
|
|
57033
57163
|
}
|
|
57034
57164
|
}
|
|
57035
57165
|
function registerContentBoard(program3) {
|
|
57036
|
-
program3.command("content:board <pipelineId>").description(
|
|
57166
|
+
withTarget(program3.command("content:board <pipelineId>").description(
|
|
57037
57167
|
"Render one pipeline as a board -- columns, review gates, and waiting counts\n Example: elevasis-sdk content:board <pipelineId> --pretty\n Note: pipeline ids come from the org model this project declares -- list them with content:pipeline."
|
|
57038
|
-
).option("--limit <n>", `Items to pull before deriving (default and API maximum ${DEFAULT_ITEM_LIMIT})`)
|
|
57168
|
+
).option("--limit <n>", `Items to pull before deriving (default and API maximum ${DEFAULT_ITEM_LIMIT})`)).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57039
57169
|
wrapAction("content:board", async (pipelineId, options) => {
|
|
57040
57170
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
57041
57171
|
const limit = options.limit ?? String(DEFAULT_ITEM_LIMIT);
|
|
@@ -57092,7 +57222,7 @@ init_api_client();
|
|
|
57092
57222
|
init_config2();
|
|
57093
57223
|
init_wrap_action();
|
|
57094
57224
|
function registerContentQueue(program3) {
|
|
57095
|
-
program3.command("content:queue").description("List content items awaiting a `queued`-gate review\n Example: elevasis-sdk content:queue --pretty")
|
|
57225
|
+
withTarget(program3.command("content:queue").description("List content items awaiting a `queued`-gate review\n Example: elevasis-sdk content:queue --pretty")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57096
57226
|
wrapAction("content:queue", async (options) => {
|
|
57097
57227
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
57098
57228
|
const result = await apiGet("/api/external/content/queue", apiUrl);
|
|
@@ -57134,9 +57264,9 @@ Pipeline: ${pipeline.id}`));
|
|
|
57134
57264
|
console.log();
|
|
57135
57265
|
}
|
|
57136
57266
|
function registerContentPipeline(program3) {
|
|
57137
|
-
program3.command("content:pipeline [id]").description(
|
|
57267
|
+
withTarget(program3.command("content:pipeline [id]").description(
|
|
57138
57268
|
"List content pipeline templates, or show one pipeline's step contract\n Example: elevasis-sdk content:pipeline <pipelineId>\n Note: run without an id to list the pipeline ids this project declares in its org model."
|
|
57139
|
-
)
|
|
57269
|
+
)).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57140
57270
|
wrapAction("content:pipeline", async (id, options) => {
|
|
57141
57271
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
57142
57272
|
if (!id) {
|
|
@@ -57179,9 +57309,9 @@ function appendQuery5(params, key, value) {
|
|
|
57179
57309
|
params.set(key, String(value));
|
|
57180
57310
|
}
|
|
57181
57311
|
function registerContentDistributions(program3) {
|
|
57182
|
-
program3.command("content:distributions").description(
|
|
57312
|
+
withTarget(program3.command("content:distributions").description(
|
|
57183
57313
|
"List content distributions\n Example: elevasis-sdk content:distributions --pipeline-id <pipelineId>\n Note: pipeline ids come from the org model this project declares -- list them with content:pipeline."
|
|
57184
|
-
).option("--content-item-id <id>", "Filter by content item id").option("--pipeline-id <id>", "Filter by pipeline template id").option("--platform <platform>", "Filter by distribution platform").option("--status <status>", "Filter by distribution status").option("--limit <n>", "Maximum number of results").option("--offset <n>", "Pagination offset")
|
|
57314
|
+
).option("--content-item-id <id>", "Filter by content item id").option("--pipeline-id <id>", "Filter by pipeline template id").option("--platform <platform>", "Filter by distribution platform").option("--status <status>", "Filter by distribution status").option("--limit <n>", "Maximum number of results").option("--offset <n>", "Pagination offset")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57185
57315
|
wrapAction("content:distributions", async (options) => {
|
|
57186
57316
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
57187
57317
|
const params = new URLSearchParams();
|
|
@@ -57223,12 +57353,12 @@ init_api_client();
|
|
|
57223
57353
|
init_config2();
|
|
57224
57354
|
init_wrap_action();
|
|
57225
57355
|
function registerContentReview(program3) {
|
|
57226
|
-
program3.command("content:review <itemId>").description(
|
|
57356
|
+
withTarget(program3.command("content:review <itemId>").description(
|
|
57227
57357
|
"Clear a queued review gate on a content item\n Example: elevasis-sdk content:review <uuid> --step draft-review --approve --user reviewer@example.com"
|
|
57228
57358
|
).requiredOption("--step <key>", "The stepKey of the queued gate to clear (from `content:queue`)").requiredOption(
|
|
57229
57359
|
"--user <email>",
|
|
57230
57360
|
"The acting reviewer\u2019s email -- must be an active member of the API key\u2019s organization"
|
|
57231
|
-
).option("--approve", "Approve the item at this step").option("--reject", "Reject the item at this step (requires --reason)").option("--feedback <text>", "Optional reviewer feedback (1..5000 chars)").option("--reason <text>", "Reason for rejection -- required when --reject is set")
|
|
57361
|
+
).option("--approve", "Approve the item at this step").option("--reject", "Reject the item at this step (requires --reason)").option("--feedback <text>", "Optional reviewer feedback (1..5000 chars)").option("--reason <text>", "Reason for rejection -- required when --reject is set")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57232
57362
|
wrapAction("content:review", async (itemId, options) => {
|
|
57233
57363
|
if (options.approve && options.reject) {
|
|
57234
57364
|
throw new Error("Pass exactly one of --approve or --reject, not both");
|
|
@@ -57276,9 +57406,9 @@ function appendQuery6(params, key, value) {
|
|
|
57276
57406
|
params.set(key, String(value));
|
|
57277
57407
|
}
|
|
57278
57408
|
function registerContentSourceAssets(program3) {
|
|
57279
|
-
program3.command("content:source-assets").description(
|
|
57409
|
+
withTarget(program3.command("content:source-assets").description(
|
|
57280
57410
|
"List content source assets (raw material)\n Example: elevasis-sdk content:source-assets --kind transcript --limit 10"
|
|
57281
|
-
).option("--kind <kind>", "Filter by source asset kind (e.g. transcript)").option("--limit <n>", "Maximum number of results").option("--offset <n>", "Pagination offset")
|
|
57411
|
+
).option("--kind <kind>", "Filter by source asset kind (e.g. transcript)").option("--limit <n>", "Maximum number of results").option("--offset <n>", "Pagination offset")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57282
57412
|
wrapAction("content:source-assets", async (options) => {
|
|
57283
57413
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
57284
57414
|
const params = new URLSearchParams();
|
|
@@ -57316,9 +57446,9 @@ init_api_client();
|
|
|
57316
57446
|
init_config2();
|
|
57317
57447
|
init_wrap_action();
|
|
57318
57448
|
function registerContentSourceAsset(program3) {
|
|
57319
|
-
program3.command("content:source-asset <sourceAssetId>").description(
|
|
57449
|
+
withTarget(program3.command("content:source-asset <sourceAssetId>").description(
|
|
57320
57450
|
"Get one content source asset, including its payload\n Example: elevasis-sdk content:source-asset <uuid>"
|
|
57321
|
-
)
|
|
57451
|
+
)).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57322
57452
|
wrapAction("content:source-asset", async (sourceAssetId, options) => {
|
|
57323
57453
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
57324
57454
|
const asset = await apiGet(`/api/external/content/source-assets/${sourceAssetId}`, apiUrl);
|
|
@@ -57395,7 +57525,7 @@ function resolveMetadataOption(options) {
|
|
|
57395
57525
|
return parsed;
|
|
57396
57526
|
}
|
|
57397
57527
|
function registerContentSourceAssetCreate(program3) {
|
|
57398
|
-
program3.command("content:source-asset:create").description(
|
|
57528
|
+
withTarget(program3.command("content:source-asset:create").description(
|
|
57399
57529
|
'Create a content source asset from inline text or a URL, optionally linking it to an item\n Example: elevasis-sdk content:source-asset:create --kind transcript --title "Episode 12" --text @transcript.txt --item <uuid>'
|
|
57400
57530
|
).requiredOption("--kind <kind>", "Source asset kind (e.g. transcript) -- validated against the org model catalog").requiredOption("--title <title>", "Human-readable title (1..500 chars)").option("--text <value>", "Inline text, or @path to read a local file. Mutually exclusive with --url").option(
|
|
57401
57531
|
"--field <key>",
|
|
@@ -57403,7 +57533,7 @@ function registerContentSourceAssetCreate(program3) {
|
|
|
57403
57533
|
).option("--url <url>", "External URL the asset references. Mutually exclusive with --text").option("--duration <seconds>", "Duration in seconds, for time-based referenced media").option("--storage-path <path>", "Storage path the asset references (1..2000 chars)").option("--metadata <json>", "Arbitrary metadata as a JSON object string. Mutually exclusive with --metadata-file").option(
|
|
57404
57534
|
"--metadata-file <path>",
|
|
57405
57535
|
"Path to a JSON file containing metadata (project-relative unless absolute). Mutually exclusive with --metadata"
|
|
57406
|
-
).option("--item <itemId>", "Link the new asset to this content item after creating it")
|
|
57536
|
+
).option("--item <itemId>", "Link the new asset to this content item after creating it")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57407
57537
|
wrapAction("content:source-asset:create", async (options) => {
|
|
57408
57538
|
if (options.text !== void 0 && options.url !== void 0) {
|
|
57409
57539
|
throw new Error("Pass exactly one of --text or --url, not both");
|
|
@@ -57482,9 +57612,6 @@ init_source();
|
|
|
57482
57612
|
init_api_client();
|
|
57483
57613
|
init_config2();
|
|
57484
57614
|
init_wrap_action();
|
|
57485
|
-
function printJson8(value) {
|
|
57486
|
-
console.log(JSON.stringify(value, null, 2));
|
|
57487
|
-
}
|
|
57488
57615
|
function appendQuery7(params, key, value) {
|
|
57489
57616
|
if (value === void 0 || value === null || value === "") return;
|
|
57490
57617
|
params.set(key, String(value));
|
|
@@ -57505,7 +57632,7 @@ function taskTitle(task) {
|
|
|
57505
57632
|
return task.description || task.humanCheckpoint || task.id;
|
|
57506
57633
|
}
|
|
57507
57634
|
function registerQueueList(program3) {
|
|
57508
|
-
program3.command("queue:list").description("List HITL command queue tasks\n Example: elevasis-sdk queue:list --status pending --pretty").option("--status <status>", "Filter by status: pending | processing | completed | failed | expired").option("--human-checkpoint <id>", 'Filter by checkpoint ID, or "ungrouped" for tasks without a checkpoint').option("--time-range <range>", "Filter by created time range: 1h | 24h | 7d | 30d").option("--priority-min <number>", "Minimum priority, 1-10").option("--priority-max <number>", "Maximum priority, 1-10").option("--limit <limit>", "Maximum number of tasks to return").option("--offset <offset>", "Number of tasks to skip")
|
|
57635
|
+
withTarget(program3.command("queue:list").description("List HITL command queue tasks\n Example: elevasis-sdk queue:list --status pending --pretty").option("--status <status>", "Filter by status: pending | processing | completed | failed | expired").option("--human-checkpoint <id>", 'Filter by checkpoint ID, or "ungrouped" for tasks without a checkpoint').option("--time-range <range>", "Filter by created time range: 1h | 24h | 7d | 30d").option("--priority-min <number>", "Minimum priority, 1-10").option("--priority-max <number>", "Maximum priority, 1-10").option("--limit <limit>", "Maximum number of tasks to return").option("--offset <offset>", "Number of tasks to skip")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57509
57636
|
wrapAction(
|
|
57510
57637
|
"queue:list",
|
|
57511
57638
|
async (options) => {
|
|
@@ -57523,7 +57650,7 @@ function registerQueueList(program3) {
|
|
|
57523
57650
|
apiUrl
|
|
57524
57651
|
);
|
|
57525
57652
|
if (!options.pretty) {
|
|
57526
|
-
|
|
57653
|
+
printJson(result);
|
|
57527
57654
|
return;
|
|
57528
57655
|
}
|
|
57529
57656
|
if (result.tasks.length === 0) {
|
|
@@ -57546,12 +57673,12 @@ Queue tasks (${result.tasks.length} of ${result.total}):
|
|
|
57546
57673
|
);
|
|
57547
57674
|
}
|
|
57548
57675
|
function registerQueueGet(program3) {
|
|
57549
|
-
program3.command("queue:get <id>").description("Get a HITL command queue task\n Example: elevasis-sdk queue:get <uuid>")
|
|
57676
|
+
withTarget(program3.command("queue:get <id>").description("Get a HITL command queue task\n Example: elevasis-sdk queue:get <uuid>")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57550
57677
|
wrapAction("queue:get", async (id, options) => {
|
|
57551
57678
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
57552
57679
|
const result = await apiGet(`/api/external/command-queue/${id}`, apiUrl);
|
|
57553
57680
|
if (!options.pretty) {
|
|
57554
|
-
|
|
57681
|
+
printJson(result);
|
|
57555
57682
|
return;
|
|
57556
57683
|
}
|
|
57557
57684
|
const task = result.task;
|
|
@@ -57567,9 +57694,9 @@ Queue task: ${taskTitle(task)}`));
|
|
|
57567
57694
|
);
|
|
57568
57695
|
}
|
|
57569
57696
|
function registerQueueSelect(program3) {
|
|
57570
|
-
program3.command("queue:select <id>").description(
|
|
57697
|
+
withTarget(program3.command("queue:select <id>").description(
|
|
57571
57698
|
"Select and execute a HITL queue action\n Example: elevasis-sdk queue:select <uuid> --action-id approve"
|
|
57572
|
-
).requiredOption("--action-id <id>", "Action ID to select").option("--payload <json>", "Optional action payload as JSON").option("--notes <notes>", "Optional human decision notes")
|
|
57699
|
+
).requiredOption("--action-id <id>", "Action ID to select").option("--payload <json>", "Optional action payload as JSON").option("--notes <notes>", "Optional human decision notes")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57573
57700
|
wrapAction(
|
|
57574
57701
|
"queue:select",
|
|
57575
57702
|
async (id, options) => {
|
|
@@ -57584,7 +57711,7 @@ function registerQueueSelect(program3) {
|
|
|
57584
57711
|
apiUrl
|
|
57585
57712
|
);
|
|
57586
57713
|
if (!options.pretty) {
|
|
57587
|
-
|
|
57714
|
+
printJson(result);
|
|
57588
57715
|
return;
|
|
57589
57716
|
}
|
|
57590
57717
|
console.log(source_default.green(`
|
|
@@ -57596,7 +57723,7 @@ Selected action ${options.actionId} for queue task ${id}.`));
|
|
|
57596
57723
|
);
|
|
57597
57724
|
}
|
|
57598
57725
|
function registerQueueExpire(program3) {
|
|
57599
|
-
program3.command("queue:expire <id>").description("Mark a HITL queue task as expired\n Example: elevasis-sdk queue:expire <uuid>")
|
|
57726
|
+
withTarget(program3.command("queue:expire <id>").description("Mark a HITL queue task as expired\n Example: elevasis-sdk queue:expire <uuid>")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57600
57727
|
wrapAction("queue:expire", async (id, options) => {
|
|
57601
57728
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
57602
57729
|
const result = await apiPatch(
|
|
@@ -57605,7 +57732,7 @@ function registerQueueExpire(program3) {
|
|
|
57605
57732
|
apiUrl
|
|
57606
57733
|
);
|
|
57607
57734
|
if (!options.pretty) {
|
|
57608
|
-
|
|
57735
|
+
printJson(result);
|
|
57609
57736
|
return;
|
|
57610
57737
|
}
|
|
57611
57738
|
console.log(source_default.green(`
|
|
@@ -57616,7 +57743,7 @@ Expired queue task ${id}.`));
|
|
|
57616
57743
|
);
|
|
57617
57744
|
}
|
|
57618
57745
|
function registerQueueStatus(program3) {
|
|
57619
|
-
program3.command("queue:status").description("Show HITL queue checkpoint and status counts").option("--time-range <range>", "Filter by created time range: 1h | 24h | 7d | 30d").option("--priority-min <number>", "Minimum priority, 1-10").option("--priority-max <number>", "Maximum priority, 1-10").option("--status <status>", "Filter checkpoint totals by status: pending | completed | expired")
|
|
57746
|
+
withTarget(program3.command("queue:status").description("Show HITL queue checkpoint and status counts").option("--time-range <range>", "Filter by created time range: 1h | 24h | 7d | 30d").option("--priority-min <number>", "Minimum priority, 1-10").option("--priority-max <number>", "Maximum priority, 1-10").option("--status <status>", "Filter checkpoint totals by status: pending | completed | expired")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57620
57747
|
wrapAction(
|
|
57621
57748
|
"queue:status",
|
|
57622
57749
|
async (options) => {
|
|
@@ -57631,7 +57758,7 @@ function registerQueueStatus(program3) {
|
|
|
57631
57758
|
apiUrl
|
|
57632
57759
|
);
|
|
57633
57760
|
if (!options.pretty) {
|
|
57634
|
-
|
|
57761
|
+
printJson(result);
|
|
57635
57762
|
return;
|
|
57636
57763
|
}
|
|
57637
57764
|
console.log(source_default.cyan("\nQueue status"));
|
|
@@ -57671,9 +57798,6 @@ init_source();
|
|
|
57671
57798
|
init_api_client();
|
|
57672
57799
|
init_config2();
|
|
57673
57800
|
init_wrap_action();
|
|
57674
|
-
function printJson9(value) {
|
|
57675
|
-
console.log(JSON.stringify(value, null, 2));
|
|
57676
|
-
}
|
|
57677
57801
|
function appendQuery8(params, key, value) {
|
|
57678
57802
|
if (value === void 0 || value === null || value === "") return;
|
|
57679
57803
|
params.set(key, String(value));
|
|
@@ -57697,7 +57821,7 @@ function printSchedule(schedule) {
|
|
|
57697
57821
|
if (schedule.nextRunAt) console.log(source_default.gray(` Next: ${new Date(schedule.nextRunAt).toLocaleString()}`));
|
|
57698
57822
|
}
|
|
57699
57823
|
function registerScheduleList(program3) {
|
|
57700
|
-
program3.command("schedule:list").description("List task schedules\n Example: elevasis-sdk schedule:list --status active --pretty").option("--status <status>", "Filter by status: active | paused | completed | cancelled").option("--target-resource-type <type>", "Filter by target resource type: agent | workflow").option("--target-resource-id <id>", "Filter by target resource ID").option("--limit <limit>", "Maximum number of schedules to return").option("--offset <offset>", "Number of schedules to skip")
|
|
57824
|
+
withTarget(program3.command("schedule:list").description("List task schedules\n Example: elevasis-sdk schedule:list --status active --pretty").option("--status <status>", "Filter by status: active | paused | completed | cancelled").option("--target-resource-type <type>", "Filter by target resource type: agent | workflow").option("--target-resource-id <id>", "Filter by target resource ID").option("--limit <limit>", "Maximum number of schedules to return").option("--offset <offset>", "Number of schedules to skip")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57701
57825
|
wrapAction(
|
|
57702
57826
|
"schedule:list",
|
|
57703
57827
|
async (options) => {
|
|
@@ -57713,7 +57837,7 @@ function registerScheduleList(program3) {
|
|
|
57713
57837
|
apiUrl
|
|
57714
57838
|
);
|
|
57715
57839
|
if (!options.pretty) {
|
|
57716
|
-
|
|
57840
|
+
printJson(result);
|
|
57717
57841
|
return;
|
|
57718
57842
|
}
|
|
57719
57843
|
if (result.schedules.length === 0) {
|
|
@@ -57732,7 +57856,7 @@ Schedules (${result.schedules.length} of ${result.total}):
|
|
|
57732
57856
|
);
|
|
57733
57857
|
}
|
|
57734
57858
|
function registerScheduleGet(program3) {
|
|
57735
|
-
program3.command("schedule:get <id>").description("Get a task schedule\n Example: elevasis-sdk schedule:get <uuid>")
|
|
57859
|
+
withTarget(program3.command("schedule:get <id>").description("Get a task schedule\n Example: elevasis-sdk schedule:get <uuid>")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57736
57860
|
wrapAction("schedule:get", async (id, options) => {
|
|
57737
57861
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
57738
57862
|
const result = await apiGet(
|
|
@@ -57740,7 +57864,7 @@ function registerScheduleGet(program3) {
|
|
|
57740
57864
|
apiUrl
|
|
57741
57865
|
);
|
|
57742
57866
|
if (!options.pretty) {
|
|
57743
|
-
|
|
57867
|
+
printJson(result);
|
|
57744
57868
|
return;
|
|
57745
57869
|
}
|
|
57746
57870
|
console.log(source_default.cyan(`
|
|
@@ -57758,10 +57882,10 @@ Schedule: ${result.schedule.name}`));
|
|
|
57758
57882
|
);
|
|
57759
57883
|
}
|
|
57760
57884
|
function registerScheduleCreate(program3) {
|
|
57761
|
-
program3.command("schedule:create").description(
|
|
57885
|
+
withTarget(program3.command("schedule:create").description(
|
|
57762
57886
|
`Create a task schedule
|
|
57763
57887
|
Example: elevasis-sdk schedule:create --name "Weekly report" --target-resource-type workflow --target-resource-id weekly-report --schedule-config '{"type":"recurring","interval":"weekly","time":"09:00","timezone":"America/New_York","payload":{}}'`
|
|
57764
|
-
).requiredOption("--name <name>", "Schedule name").option("--description <description>", "Schedule description").requiredOption("--target-resource-type <type>", "Target resource type: agent | workflow").requiredOption("--target-resource-id <id>", "Target resource ID").requiredOption("--schedule-config <json>", "Schedule config JSON").option("--max-retries <number>", "Maximum retry attempts, 0-10").option("--idempotency-key <key>", "Idempotency key").option("--origin-execution-id <uuid>", "Origin execution UUID").option("--origin-resource-type <type>", "Origin resource type").option("--origin-resource-id <id>", "Origin resource ID")
|
|
57888
|
+
).requiredOption("--name <name>", "Schedule name").option("--description <description>", "Schedule description").requiredOption("--target-resource-type <type>", "Target resource type: agent | workflow").requiredOption("--target-resource-id <id>", "Target resource ID").requiredOption("--schedule-config <json>", "Schedule config JSON").option("--max-retries <number>", "Maximum retry attempts, 0-10").option("--idempotency-key <key>", "Idempotency key").option("--origin-execution-id <uuid>", "Origin execution UUID").option("--origin-resource-type <type>", "Origin resource type").option("--origin-resource-id <id>", "Origin resource ID")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57765
57889
|
wrapAction(
|
|
57766
57890
|
"schedule:create",
|
|
57767
57891
|
async (options) => {
|
|
@@ -57790,7 +57914,7 @@ function registerScheduleCreate(program3) {
|
|
|
57790
57914
|
apiUrl
|
|
57791
57915
|
);
|
|
57792
57916
|
if (!options.pretty) {
|
|
57793
|
-
|
|
57917
|
+
printJson(result);
|
|
57794
57918
|
return;
|
|
57795
57919
|
}
|
|
57796
57920
|
console.log(source_default.green(`
|
|
@@ -57803,7 +57927,7 @@ Schedule created: ${result.schedule.name}`));
|
|
|
57803
57927
|
);
|
|
57804
57928
|
}
|
|
57805
57929
|
function registerScheduleUpdate(program3) {
|
|
57806
|
-
program3.command("schedule:update <id>").description('Update a task schedule\n Example: elevasis-sdk schedule:update <uuid> --name "New name"').option("--name <name>", "New schedule name").option("--description <description>", "New schedule description").option("--clear-description", "Remove the schedule description").option("--schedule-config <json>", "Replacement schedule config JSON").option("--max-retries <number>", "Maximum retry attempts, 0-10")
|
|
57930
|
+
withTarget(program3.command("schedule:update <id>").description('Update a task schedule\n Example: elevasis-sdk schedule:update <uuid> --name "New name"').option("--name <name>", "New schedule name").option("--description <description>", "New schedule description").option("--clear-description", "Remove the schedule description").option("--schedule-config <json>", "Replacement schedule config JSON").option("--max-retries <number>", "Maximum retry attempts, 0-10")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57807
57931
|
wrapAction(
|
|
57808
57932
|
"schedule:update",
|
|
57809
57933
|
async (id, options) => {
|
|
@@ -57842,7 +57966,7 @@ function registerScheduleUpdate(program3) {
|
|
|
57842
57966
|
apiUrl
|
|
57843
57967
|
);
|
|
57844
57968
|
if (!options.pretty) {
|
|
57845
|
-
|
|
57969
|
+
printJson(result);
|
|
57846
57970
|
return;
|
|
57847
57971
|
}
|
|
57848
57972
|
console.log(source_default.green(`
|
|
@@ -57855,8 +57979,8 @@ Schedule updated: ${result.schedule.name}`));
|
|
|
57855
57979
|
);
|
|
57856
57980
|
}
|
|
57857
57981
|
function registerScheduleStatusMutation(program3, commandName, description) {
|
|
57858
|
-
program3.command(`schedule:${commandName} <id>`).description(`${description}
|
|
57859
|
-
Example: elevasis-sdk schedule:${commandName} <uuid>`)
|
|
57982
|
+
withTarget(program3.command(`schedule:${commandName} <id>`).description(`${description}
|
|
57983
|
+
Example: elevasis-sdk schedule:${commandName} <uuid>`)).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57860
57984
|
wrapAction(`schedule:${commandName}`, async (id, options) => {
|
|
57861
57985
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
57862
57986
|
const result = await apiPost(
|
|
@@ -57865,7 +57989,7 @@ function registerScheduleStatusMutation(program3, commandName, description) {
|
|
|
57865
57989
|
apiUrl
|
|
57866
57990
|
);
|
|
57867
57991
|
if (!options.pretty) {
|
|
57868
|
-
|
|
57992
|
+
printJson(result);
|
|
57869
57993
|
return;
|
|
57870
57994
|
}
|
|
57871
57995
|
const verb = commandName === "pause" ? "paused" : commandName === "resume" ? "resumed" : "cancelled";
|
|
@@ -57905,9 +58029,9 @@ init_config2();
|
|
|
57905
58029
|
init_api_client();
|
|
57906
58030
|
var PRIORITY_HELP = "low | normal | high | urgent";
|
|
57907
58031
|
function registerNoteCreate2(program3) {
|
|
57908
|
-
program3.command("note:create").description(
|
|
58032
|
+
withTarget(program3.command("note:create").description(
|
|
57909
58033
|
'Create a personal note for a user\n Example: elevasis-sdk note:create --content "Deal X stalled" --user agent@example.com'
|
|
57910
|
-
).requiredOption("--content <text>", "Note content").option("--user <email>", "Target user email (required -- the API rejects the call without it)").option("--title <text>", "Optional note title").option("--priority <priority>", `Priority: ${PRIORITY_HELP}`).option("--pinned", "Pin the note to the top of the panel").option("--source <id>", "Source identifier (e.g. workflow or agent ID)")
|
|
58034
|
+
).requiredOption("--content <text>", "Note content").option("--user <email>", "Target user email (required -- the API rejects the call without it)").option("--title <text>", "Optional note title").option("--priority <priority>", `Priority: ${PRIORITY_HELP}`).option("--pinned", "Pin the note to the top of the panel").option("--source <id>", "Source identifier (e.g. workflow or agent ID)")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57911
58035
|
wrapAction(
|
|
57912
58036
|
"note:create",
|
|
57913
58037
|
async (options) => {
|
|
@@ -57937,7 +58061,7 @@ Note created`));
|
|
|
57937
58061
|
);
|
|
57938
58062
|
}
|
|
57939
58063
|
function registerNoteList2(program3) {
|
|
57940
|
-
program3.command("note:list").description("List notes for a user\n Example: elevasis-sdk note:list --user agent@example.com").requiredOption("--user <email>", "User email to list notes for (required by the external API)").option("--priority <priority>", `Filter by priority: ${PRIORITY_HELP}`).option("--pinned", "Return only pinned notes").option("--limit <n>", "Maximum number of results").option("--offset <n>", "Pagination offset")
|
|
58064
|
+
withTarget(program3.command("note:list").description("List notes for a user\n Example: elevasis-sdk note:list --user agent@example.com").requiredOption("--user <email>", "User email to list notes for (required by the external API)").option("--priority <priority>", `Filter by priority: ${PRIORITY_HELP}`).option("--pinned", "Return only pinned notes").option("--limit <n>", "Maximum number of results").option("--offset <n>", "Pagination offset")).option("--pretty", "Render human-readable output instead of raw JSON").action(
|
|
57941
58065
|
wrapAction(
|
|
57942
58066
|
"note:list",
|
|
57943
58067
|
async (options) => {
|
|
@@ -57986,17 +58110,14 @@ init_wrap_action();
|
|
|
57986
58110
|
function getResourceType2(resource) {
|
|
57987
58111
|
return resource.type ?? resource.resourceType;
|
|
57988
58112
|
}
|
|
57989
|
-
function printJson10(value) {
|
|
57990
|
-
console.log(JSON.stringify(value, null, 2));
|
|
57991
|
-
}
|
|
57992
58113
|
function registerAgentList(program3) {
|
|
57993
|
-
program3.command("agent:list").description("List deployed agents for your organization")
|
|
58114
|
+
withTarget(program3.command("agent:list").description("List deployed agents for your organization")).option("--json", "Output as JSON").action(
|
|
57994
58115
|
wrapAction("agent:list", async (options) => {
|
|
57995
58116
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
57996
58117
|
const result = await apiGet("/api/external/resources", apiUrl);
|
|
57997
58118
|
const agents = result.resources.filter((resource) => getResourceType2(resource) === "agent");
|
|
57998
58119
|
if (options.json) {
|
|
57999
|
-
|
|
58120
|
+
printJson({ agents, total: agents.length });
|
|
58000
58121
|
return;
|
|
58001
58122
|
}
|
|
58002
58123
|
if (agents.length === 0) {
|
|
@@ -58019,12 +58140,12 @@ function registerAgentList(program3) {
|
|
|
58019
58140
|
);
|
|
58020
58141
|
}
|
|
58021
58142
|
function registerAgentGet(program3) {
|
|
58022
|
-
program3.command("agent:get <id>").description("Get full agent metadata and organization model linkage")
|
|
58143
|
+
withTarget(program3.command("agent:get <id>").description("Get full agent metadata and organization model linkage")).option("--json", "Output as JSON").action(
|
|
58023
58144
|
wrapAction("agent:get", async (id, options) => {
|
|
58024
58145
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
58025
58146
|
const definition = await apiGet(`/api/external/resources/${id}/definition`, apiUrl);
|
|
58026
58147
|
if (options.json) {
|
|
58027
|
-
|
|
58148
|
+
printJson(definition);
|
|
58028
58149
|
return;
|
|
58029
58150
|
}
|
|
58030
58151
|
const config3 = definition.config ?? {};
|
|
@@ -58060,9 +58181,6 @@ init_source();
|
|
|
58060
58181
|
init_api_client();
|
|
58061
58182
|
init_config2();
|
|
58062
58183
|
init_wrap_action();
|
|
58063
|
-
function printJson11(value) {
|
|
58064
|
-
console.log(JSON.stringify(value, null, 2));
|
|
58065
|
-
}
|
|
58066
58184
|
function appendQuery9(params, key, value) {
|
|
58067
58185
|
if (value === void 0 || value === null || value === "") return;
|
|
58068
58186
|
params.set(key, String(value));
|
|
@@ -58160,7 +58278,7 @@ function printMessage(message) {
|
|
|
58160
58278
|
}
|
|
58161
58279
|
}
|
|
58162
58280
|
function registerSessionCreate(program3) {
|
|
58163
|
-
program3.command("session:create <resourceId>").description("Create a multi-turn agent session").option("--user-id <id>", "User ID for the session").option("--metadata <json>", "Session metadata as JSON")
|
|
58281
|
+
withTarget(program3.command("session:create <resourceId>").description("Create a multi-turn agent session").option("--user-id <id>", "User ID for the session").option("--metadata <json>", "Session metadata as JSON")).option("--json", "Output as JSON").action(
|
|
58164
58282
|
wrapAction("session:create", async (resourceId, options) => {
|
|
58165
58283
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
58166
58284
|
const body = { resourceId };
|
|
@@ -58168,7 +58286,7 @@ function registerSessionCreate(program3) {
|
|
|
58168
58286
|
if (options.metadata) body.metadata = parseJson(options.metadata, "--metadata");
|
|
58169
58287
|
const session = await apiPost("/api/external/sessions", body, apiUrl);
|
|
58170
58288
|
if (options.json) {
|
|
58171
|
-
|
|
58289
|
+
printJson(session);
|
|
58172
58290
|
return;
|
|
58173
58291
|
}
|
|
58174
58292
|
console.log(source_default.green(`Created session ${session.sessionId}.`));
|
|
@@ -58179,7 +58297,7 @@ function registerSessionCreate(program3) {
|
|
|
58179
58297
|
);
|
|
58180
58298
|
}
|
|
58181
58299
|
function registerSessionList(program3) {
|
|
58182
|
-
program3.command("session:list").description("List multi-turn agent sessions").option("--resource-id <id>", "Filter by agent resource ID").option("--user-id <id>", "Filter by user ID").option("--limit <limit>", "Maximum number of sessions to return")
|
|
58300
|
+
withTarget(program3.command("session:list").description("List multi-turn agent sessions").option("--resource-id <id>", "Filter by agent resource ID").option("--user-id <id>", "Filter by user ID").option("--limit <limit>", "Maximum number of sessions to return")).option("--json", "Output as JSON").action(
|
|
58183
58301
|
wrapAction("session:list", async (options) => {
|
|
58184
58302
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
58185
58303
|
const params = new URLSearchParams();
|
|
@@ -58188,7 +58306,7 @@ function registerSessionList(program3) {
|
|
|
58188
58306
|
appendQuery9(params, "limit", options.limit);
|
|
58189
58307
|
const result = await apiGet(endpointWithQuery6("/api/external/sessions", params), apiUrl);
|
|
58190
58308
|
if (options.json) {
|
|
58191
|
-
|
|
58309
|
+
printJson(result);
|
|
58192
58310
|
return;
|
|
58193
58311
|
}
|
|
58194
58312
|
if (result.sessions.length === 0) {
|
|
@@ -58209,12 +58327,12 @@ function registerSessionList(program3) {
|
|
|
58209
58327
|
);
|
|
58210
58328
|
}
|
|
58211
58329
|
function registerSessionGet(program3) {
|
|
58212
|
-
program3.command("session:get <id>").description("Get session details")
|
|
58330
|
+
withTarget(program3.command("session:get <id>").description("Get session details")).option("--json", "Output as JSON").action(
|
|
58213
58331
|
wrapAction("session:get", async (id, options) => {
|
|
58214
58332
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
58215
58333
|
const session = await apiGet(`/api/external/sessions/${id}`, apiUrl);
|
|
58216
58334
|
if (options.json) {
|
|
58217
|
-
|
|
58335
|
+
printJson(session);
|
|
58218
58336
|
return;
|
|
58219
58337
|
}
|
|
58220
58338
|
console.log(source_default.cyan(`Session: ${session.title ?? session.sessionId}`));
|
|
@@ -58230,13 +58348,13 @@ function registerSessionGet(program3) {
|
|
|
58230
58348
|
);
|
|
58231
58349
|
}
|
|
58232
58350
|
function registerSessionTurn(program3) {
|
|
58233
|
-
program3.command("session:turn <id>").description("Execute a turn in an active agent session").option("-i, --input <json>", "Turn input as JSON").option("-f, --input-file <path>", "Read turn input from a JSON file")
|
|
58351
|
+
withTarget(program3.command("session:turn <id>").description("Execute a turn in an active agent session").option("-i, --input <json>", "Turn input as JSON").option("-f, --input-file <path>", "Read turn input from a JSON file")).option("--json", "Output as JSON").action(
|
|
58234
58352
|
wrapAction("session:turn", async (id, options) => {
|
|
58235
58353
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
58236
58354
|
const input = resolveTurnInput(options);
|
|
58237
58355
|
const result = await apiPost(`/api/external/sessions/${id}/turns`, { input }, apiUrl);
|
|
58238
58356
|
if (options.json) {
|
|
58239
|
-
|
|
58357
|
+
printJson(result);
|
|
58240
58358
|
return;
|
|
58241
58359
|
}
|
|
58242
58360
|
console.log(source_default.green(`Turn ${result.turnNumber} complete.`));
|
|
@@ -58263,12 +58381,12 @@ function registerSessionTurn(program3) {
|
|
|
58263
58381
|
);
|
|
58264
58382
|
}
|
|
58265
58383
|
function registerSessionMessages(program3) {
|
|
58266
|
-
program3.command("session:messages <id>").description("Export session transcript messages").option("--limit <limit>", "Messages per API page").option("--cursor <cursor>", "Message_index cursor to start after").option("--page", "Fetch one API page instead of the full transcript").option("--all", "Fetch all pages (default)")
|
|
58384
|
+
withTarget(program3.command("session:messages <id>").description("Export session transcript messages").option("--limit <limit>", "Messages per API page").option("--cursor <cursor>", "Message_index cursor to start after").option("--page", "Fetch one API page instead of the full transcript").option("--all", "Fetch all pages (default)")).option("--json", "Output as JSON").action(
|
|
58267
58385
|
wrapAction("session:messages", async (id, options) => {
|
|
58268
58386
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
58269
58387
|
const result = await fetchSessionMessages(id, apiUrl, options);
|
|
58270
58388
|
if (options.json) {
|
|
58271
|
-
|
|
58389
|
+
printJson(result);
|
|
58272
58390
|
return;
|
|
58273
58391
|
}
|
|
58274
58392
|
const total = result.total === void 0 ? result.messages.length : result.total;
|
|
@@ -58285,7 +58403,7 @@ function registerSessionMessages(program3) {
|
|
|
58285
58403
|
);
|
|
58286
58404
|
}
|
|
58287
58405
|
function registerSessionEnd(program3) {
|
|
58288
|
-
program3.command("session:end <id>").description("End an active agent session")
|
|
58406
|
+
withTarget(program3.command("session:end <id>").description("End an active agent session")).option("--json", "Output as JSON").action(
|
|
58289
58407
|
wrapAction("session:end", async (id, options) => {
|
|
58290
58408
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
58291
58409
|
const result = await apiPost(
|
|
@@ -58294,7 +58412,7 @@ function registerSessionEnd(program3) {
|
|
|
58294
58412
|
apiUrl
|
|
58295
58413
|
);
|
|
58296
58414
|
if (options.json) {
|
|
58297
|
-
|
|
58415
|
+
printJson(result);
|
|
58298
58416
|
return;
|
|
58299
58417
|
}
|
|
58300
58418
|
console.log(source_default.green(`Ended session ${result.sessionId ?? id}.`));
|
|
@@ -58317,9 +58435,6 @@ init_source();
|
|
|
58317
58435
|
init_api_client();
|
|
58318
58436
|
init_config2();
|
|
58319
58437
|
init_wrap_action();
|
|
58320
|
-
function printJson12(value) {
|
|
58321
|
-
console.log(JSON.stringify(value, null, 2));
|
|
58322
|
-
}
|
|
58323
58438
|
function appendQuery10(params, key, value) {
|
|
58324
58439
|
if (value === void 0 || value === null || value === "" || value === false) return;
|
|
58325
58440
|
params.set(key, String(value));
|
|
@@ -58381,7 +58496,7 @@ function printGrant(grant) {
|
|
|
58381
58496
|
if (grant.disabledAt) console.log(source_default.gray(` Disabled: ${new Date(grant.disabledAt).toLocaleString()}`));
|
|
58382
58497
|
}
|
|
58383
58498
|
function registerGrantList(program3) {
|
|
58384
|
-
program3.command("grant:list").description("List public/code-gated agent access grants").option("--resource-id <id>", "Filter by agent resource ID").option("--include-disabled", "Include disabled grants")
|
|
58499
|
+
withTarget(program3.command("grant:list").description("List public/code-gated agent access grants").option("--resource-id <id>", "Filter by agent resource ID").option("--include-disabled", "Include disabled grants")).option("--json", "Output as JSON").action(
|
|
58385
58500
|
wrapAction("grant:list", async (options) => {
|
|
58386
58501
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
58387
58502
|
const params = new URLSearchParams();
|
|
@@ -58392,7 +58507,7 @@ function registerGrantList(program3) {
|
|
|
58392
58507
|
apiUrl
|
|
58393
58508
|
);
|
|
58394
58509
|
if (options.json) {
|
|
58395
|
-
|
|
58510
|
+
printJson(result);
|
|
58396
58511
|
return;
|
|
58397
58512
|
}
|
|
58398
58513
|
if (result.grants.length === 0) {
|
|
@@ -58408,7 +58523,7 @@ function registerGrantList(program3) {
|
|
|
58408
58523
|
);
|
|
58409
58524
|
}
|
|
58410
58525
|
function registerGrantCreate(program3) {
|
|
58411
|
-
program3.command("grant:create").description("Create a public/code-gated agent access grant").requiredOption("--resource <id>", "Agent resource ID to expose").option("--slug <slug>", "Public slug; defaults to normalized --resource").option("--mode <mode>", "Access mode: public | code", "public").option("--code <code>", "Access code for --mode code").option("--origins <origins>", "Comma-separated allowed origins; omit for any origin").option("--expires-at <iso>", "ISO timestamp when the grant expires").option("--max-turns <number>", "Maximum turns per public session").option("--max-sessions <number>", "Maximum sessions per visitor").option("--branding <json>", "Branding metadata JSON object").option("--capture-fields <json>", "Capture fields JSON array").option("--tool-policy <json>", "Tool policy JSON object").option("--public-base-url <url>", "Client public app base URL for printed public URL")
|
|
58526
|
+
withTarget(program3.command("grant:create").description("Create a public/code-gated agent access grant").requiredOption("--resource <id>", "Agent resource ID to expose").option("--slug <slug>", "Public slug; defaults to normalized --resource").option("--mode <mode>", "Access mode: public | code", "public").option("--code <code>", "Access code for --mode code").option("--origins <origins>", "Comma-separated allowed origins; omit for any origin").option("--expires-at <iso>", "ISO timestamp when the grant expires").option("--max-turns <number>", "Maximum turns per public session").option("--max-sessions <number>", "Maximum sessions per visitor").option("--branding <json>", "Branding metadata JSON object").option("--capture-fields <json>", "Capture fields JSON array").option("--tool-policy <json>", "Tool policy JSON object").option("--public-base-url <url>", "Client public app base URL for printed public URL")).option("--json", "Output as JSON").action(
|
|
58412
58527
|
wrapAction("grant:create", async (options) => {
|
|
58413
58528
|
const mode = options.mode ?? "public";
|
|
58414
58529
|
if (mode !== "public" && mode !== "code") {
|
|
@@ -58440,7 +58555,7 @@ function registerGrantCreate(program3) {
|
|
|
58440
58555
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
58441
58556
|
const result = await apiPost("/api/external/agent-access-grants", body, apiUrl);
|
|
58442
58557
|
if (options.json) {
|
|
58443
|
-
|
|
58558
|
+
printJson(result.grant);
|
|
58444
58559
|
return;
|
|
58445
58560
|
}
|
|
58446
58561
|
console.log(source_default.green(`Created agent access grant ${result.grant.slug}.`));
|
|
@@ -58450,7 +58565,7 @@ function registerGrantCreate(program3) {
|
|
|
58450
58565
|
);
|
|
58451
58566
|
}
|
|
58452
58567
|
function registerGrantUpdate(program3) {
|
|
58453
|
-
program3.command("grant:update <slug>").description("Update mutable fields on an existing agent access grant (branding, limits, mode, origins)").option("--mode <mode>", "Access mode: public | code").option("--code <code>", "Access code; required when switching --mode code without an existing code").option("--origins <origins>", "Comma-separated allowed origins (replaces existing)").option("--expires-at <iso>", "ISO timestamp when the grant expires").option("--max-turns <number>", "Maximum turns per public session").option("--max-sessions <number>", "Maximum sessions per visitor").option("--branding <json>", "Branding metadata JSON object (full replace)").option("--capture-fields <json>", "Capture fields JSON array (full replace)").option("--tool-policy <json>", "Tool policy JSON object (full replace)").option("--public-base-url <url>", "Client public app base URL for printed public URL")
|
|
58568
|
+
withTarget(program3.command("grant:update <slug>").description("Update mutable fields on an existing agent access grant (branding, limits, mode, origins)").option("--mode <mode>", "Access mode: public | code").option("--code <code>", "Access code; required when switching --mode code without an existing code").option("--origins <origins>", "Comma-separated allowed origins (replaces existing)").option("--expires-at <iso>", "ISO timestamp when the grant expires").option("--max-turns <number>", "Maximum turns per public session").option("--max-sessions <number>", "Maximum sessions per visitor").option("--branding <json>", "Branding metadata JSON object (full replace)").option("--capture-fields <json>", "Capture fields JSON array (full replace)").option("--tool-policy <json>", "Tool policy JSON object (full replace)").option("--public-base-url <url>", "Client public app base URL for printed public URL")).option("--json", "Output as JSON").action(
|
|
58454
58569
|
wrapAction("grant:update", async (slug, options) => {
|
|
58455
58570
|
const body = {};
|
|
58456
58571
|
if (options.mode !== void 0) {
|
|
@@ -58483,7 +58598,7 @@ function registerGrantUpdate(program3) {
|
|
|
58483
58598
|
apiUrl
|
|
58484
58599
|
);
|
|
58485
58600
|
if (options.json) {
|
|
58486
|
-
|
|
58601
|
+
printJson(result.grant);
|
|
58487
58602
|
return;
|
|
58488
58603
|
}
|
|
58489
58604
|
console.log(source_default.green(`Updated agent access grant ${result.grant.slug}.`));
|
|
@@ -58493,7 +58608,7 @@ function registerGrantUpdate(program3) {
|
|
|
58493
58608
|
);
|
|
58494
58609
|
}
|
|
58495
58610
|
function registerGrantDisable(program3) {
|
|
58496
|
-
program3.command("grant:disable <slug>").description("Disable an agent access grant without deleting it")
|
|
58611
|
+
withTarget(program3.command("grant:disable <slug>").description("Disable an agent access grant without deleting it")).option("--json", "Output as JSON").action(
|
|
58497
58612
|
wrapAction("grant:disable", async (slug, options) => {
|
|
58498
58613
|
const apiUrl = resolveApiUrl(options.apiUrl, options.prod);
|
|
58499
58614
|
const result = await apiPost(
|
|
@@ -58502,7 +58617,7 @@ function registerGrantDisable(program3) {
|
|
|
58502
58617
|
apiUrl
|
|
58503
58618
|
);
|
|
58504
58619
|
if (options.json) {
|
|
58505
|
-
|
|
58620
|
+
printJson(result.grant);
|
|
58506
58621
|
return;
|
|
58507
58622
|
}
|
|
58508
58623
|
console.log(source_default.green(`Disabled agent access grant ${result.grant.slug}.`));
|
|
@@ -58842,12 +58957,12 @@ function formatOmDoctorReport(report) {
|
|
|
58842
58957
|
|
|
58843
58958
|
// src/cli/commands/om/doctor.ts
|
|
58844
58959
|
function registerOmDoctorCommand(program3) {
|
|
58845
|
-
program3.command("om:doctor").description(
|
|
58960
|
+
withTarget(program3.command("om:doctor").description(
|
|
58846
58961
|
"Reduced model doctor \u2014 runs 3 of the platform's 5 checks, plus deployed readiness\n Checks: ontology references, knowledge links, rename-orphan hints\n NOT run (monorepo-only): UI-manifest consistency, contract-ref resolution\n Readiness is read from the deployed snapshot; it reports NOT RUN when offline\n Example: elevasis-sdk om:doctor\n Example: elevasis-sdk om:doctor --scope sales.crm\n Example: elevasis-sdk om:doctor --skip-deployed\n Example: elevasis-sdk om:doctor --require-deployed\n Example: elevasis-sdk om:doctor --json"
|
|
58847
58962
|
).option("--json", "Output as grouped JSON envelope").option("--scope <systemPath>", "Limit diagnostics to a system path and descendants").option("--skip-deployed", "Structural checks only \u2014 do not ask the API about readiness").option(
|
|
58848
58963
|
"--require-deployed",
|
|
58849
58964
|
"Fail (non-zero exit) if the deployed-snapshot readiness check is unavailable \u2014 API unreachable or no platform key \u2014 instead of the default degraded pass. Opt-in: default behavior is unchanged, and this is rejected together with --skip-deployed."
|
|
58850
|
-
)
|
|
58965
|
+
), { apiUrlDescription: "API URL" }).action(
|
|
58851
58966
|
wrapAction("om:doctor", async (options) => {
|
|
58852
58967
|
if (options.requireDeployed && options.skipDeployed) {
|
|
58853
58968
|
throw new Error("--require-deployed and --skip-deployed are mutually exclusive");
|
|
@@ -59659,7 +59774,7 @@ function runPreflight() {
|
|
|
59659
59774
|
}
|
|
59660
59775
|
var envPath = findEnvFile();
|
|
59661
59776
|
if (envPath) {
|
|
59662
|
-
const result = (0, import_dotenv.config)({ path: envPath, override: true });
|
|
59777
|
+
const result = (0, import_dotenv.config)({ path: envPath, override: true, quiet: true });
|
|
59663
59778
|
if (result.error) {
|
|
59664
59779
|
console.error(source_default.yellow(`\u26A0 Found .env at ${envPath} but failed to load it: ${result.error.message}`));
|
|
59665
59780
|
}
|