@codiac.io/codiac-cli 1.3.237 → 1.3.239
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/README.md +218 -160
- package/dist/apis/codiac-relay/gen/client.d.ts +5 -1
- package/dist/apis/codiac-relay/gen/client.js +8 -0
- package/dist/apis/codiac-relay/gen/client.js.map +1 -1
- package/dist/apis/codiac-relay/gen/contracts/types.gen.d.ts +129 -0
- package/dist/apis/codiac-relay/gen/contracts/types.gen.js.map +1 -1
- package/dist/apis/codiac-relay/i-client.d.ts +4 -0
- package/dist/apis/codiac-relay-nats/gen/client.d.ts +5 -0
- package/dist/apis/codiac-relay-nats/gen/client.js +9 -0
- package/dist/apis/codiac-relay-nats/gen/client.js.map +1 -1
- package/dist/apis/codiac-relay-nats/gen/contracts/types.gen.d.ts +62 -0
- package/dist/commands/ai/agent/install.d.ts +73 -0
- package/dist/commands/ai/agent/install.js +432 -0
- package/dist/commands/ai/agent/install.js.map +1 -0
- package/dist/commands/imageRegistry/capture.d.ts +7 -1
- package/dist/commands/imageRegistry/capture.js +63 -4
- package/dist/commands/imageRegistry/capture.js.map +1 -1
- package/dist/message-contracts/workunit-contracts.d.ts +5 -0
- package/dist/uilogic/framework-spec.d.ts +13 -0
- package/dist/uilogic/framework-spec.js +17 -0
- package/dist/uilogic/framework-spec.js.map +1 -0
- package/dist/uilogic/lrp-watcher-utils.js +15 -2
- package/dist/uilogic/lrp-watcher-utils.js.map +1 -1
- package/oclif.manifest.json +143 -1
- package/package.json +2 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const _ = require("lodash");
|
|
5
6
|
const contracts_1 = require("../../apis/codiac-api/contracts");
|
|
6
7
|
const command_base_exec_tenant_1 = require("../../command-base-exec-tenant");
|
|
7
8
|
const cloud_resource_configurator_factory_1 = require("../../uilogic/cloud-resource-configurator-factory");
|
|
@@ -35,12 +36,63 @@ class ImageRegistryCapture extends command_base_exec_tenant_1.CommandBaseExecTen
|
|
|
35
36
|
partial.provider = type_safety_utils_1.TypeSafetyUtils.toEnum(contracts_1.CloudProviderEnum, flags.provider);
|
|
36
37
|
if (flags.name)
|
|
37
38
|
partial.code = flags.name;
|
|
39
|
+
partial.pullRequiresAuth = flags.private;
|
|
38
40
|
return [partial, false];
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
|
-
|
|
43
|
+
/** Silent capture currently supports Helm chart repositories (provider `artifactHub` or
|
|
44
|
+
* `other`) -- the interactive flow's complexity is cloud-provider discovery/auth, which a
|
|
45
|
+
* Helm/OCI repo does not need: it is a direct (url, name) reference. Other providers
|
|
46
|
+
* (Azure/AWS/DockerHub image registries) still require interactive capture. Note `--name`
|
|
47
|
+
* here is the short name; the stored registry code is `helm|<provider>|<name>`. */
|
|
48
|
+
buildCandidate_silently(partial, _rootMap) {
|
|
49
|
+
var _a;
|
|
42
50
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
|
|
51
|
+
if (partial.provider == undefined)
|
|
52
|
+
throw new Error("Must specify --provider.");
|
|
53
|
+
if (partial.code == undefined || _.isEmpty(partial.code))
|
|
54
|
+
throw new Error("Must specify --name.");
|
|
55
|
+
const pullRequiresAuth = type_safety_utils_1.TypeSafetyUtils.toBoolean((_a = partial.pullRequiresAuth) !== null && _a !== void 0 ? _a : true);
|
|
56
|
+
const dupCheck = (code) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const found = (yield this._codiacApi.ImageRegistry.readMany({ all: true }, { throwNotFound: false })).find(r => r.code === code);
|
|
58
|
+
if (found)
|
|
59
|
+
throw new Error(`Image registry [${code}] already exists as [${found.type}, url: ${found.url}].`);
|
|
60
|
+
});
|
|
61
|
+
// Docker Hub OCI registry (serves both images and OCI Helm charts under an org namespace).
|
|
62
|
+
// This is the working pattern for codiacimages helm charts -- the DockerHub client
|
|
63
|
+
// implements helm creds, unlike the artifactHub client.
|
|
64
|
+
if (partial.provider === contracts_1.CloudProviderEnum.dockerHub) {
|
|
65
|
+
const code = `${contracts_1.ImageRegistryTypes.dockerHub}|${partial.code}`; // e.g. DockerHub|codiacimages -- name is the org namespace
|
|
66
|
+
yield dupCheck(code);
|
|
67
|
+
return {
|
|
68
|
+
code,
|
|
69
|
+
url: "index.docker.io",
|
|
70
|
+
provider: contracts_1.CloudProviderEnum.dockerHub,
|
|
71
|
+
type: contracts_1.ImageRegistryTypes.dockerHub,
|
|
72
|
+
organizationCode: partial.code,
|
|
73
|
+
helmSupport: "oci",
|
|
74
|
+
pullRequiresAuth,
|
|
75
|
+
useRemoteFiltering: false,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
// Helm chart repository (artifactHub / other) referenced by a direct (url, name).
|
|
79
|
+
const isHelm = partial.provider === contracts_1.CloudProviderEnum.artifactHub || partial.provider === contracts_1.CloudProviderEnum.other;
|
|
80
|
+
if (!isHelm)
|
|
81
|
+
throw new Error(`Silent capture supports --provider dockerHub, artifactHub, or other. For [${partial.provider}], use interactive capture.`);
|
|
82
|
+
if (partial.url == undefined || _.isEmpty(partial.url))
|
|
83
|
+
throw new Error("Must specify --url.");
|
|
84
|
+
const code = `${contracts_1.ImageRegistryTypes.helm}|${partial.provider}|${partial.code}`;
|
|
85
|
+
yield dupCheck(code);
|
|
86
|
+
const helmSupport = partial.url.startsWith("oci://") ? "oci" : "classic";
|
|
87
|
+
return {
|
|
88
|
+
code,
|
|
89
|
+
url: partial.url,
|
|
90
|
+
provider: partial.provider,
|
|
91
|
+
type: contracts_1.ImageRegistryTypes.helm,
|
|
92
|
+
pullRequiresAuth,
|
|
93
|
+
useRemoteFiltering: false,
|
|
94
|
+
helmSupport,
|
|
95
|
+
};
|
|
44
96
|
});
|
|
45
97
|
}
|
|
46
98
|
buildCandidate_interactively(partial, takeDefaults, rootMap) {
|
|
@@ -60,10 +112,16 @@ class ImageRegistryCapture extends command_base_exec_tenant_1.CommandBaseExecTen
|
|
|
60
112
|
});
|
|
61
113
|
}
|
|
62
114
|
buildCommandString(candidate, cmd) {
|
|
63
|
-
|
|
64
|
-
cmd.push("--name", candidate.code);
|
|
115
|
+
var _a;
|
|
65
116
|
if (candidate.provider)
|
|
66
117
|
cmd.push("--provider", candidate.provider);
|
|
118
|
+
if (candidate.url)
|
|
119
|
+
cmd.push("--url", candidate.url);
|
|
120
|
+
// The stored code is `helm|<provider>|<name>`; --name takes the short name.
|
|
121
|
+
if (candidate.code)
|
|
122
|
+
cmd.push("--name", (_a = candidate.code.split("|").pop()) !== null && _a !== void 0 ? _a : candidate.code);
|
|
123
|
+
if (candidate.pullRequiresAuth === false)
|
|
124
|
+
cmd.push("--no-private");
|
|
67
125
|
cmd.push("--silent");
|
|
68
126
|
return cmd;
|
|
69
127
|
}
|
|
@@ -93,6 +151,7 @@ ImageRegistryCapture.flags = {
|
|
|
93
151
|
name: core_1.Flags.string({ char: 'n', required: false, description: "The resource name of the container registry within the cloud provider subscription." }),
|
|
94
152
|
subscriptionId: core_1.Flags.string({ char: 's', required: false, description: "The id of the cloud provider account in which the registry resides." }),
|
|
95
153
|
location: core_1.Flags.string({ char: 'l', required: false, description: "The data center in which the registry resides (use the code name, eg: in Aws use 'us-east-1', NOT 'Virginia, US')." }),
|
|
154
|
+
private: core_1.Flags.boolean({ default: true, allowNo: true, description: 'Whether pulling from this registry requires authentication (default true; pass --no-private for a public registry).' }),
|
|
96
155
|
silent: core_1.Flags.boolean({ exclusive: ["echo", "to-script"], description: 'Executes without any user interaction; fails on missing or invalid arguments.' }),
|
|
97
156
|
echo: core_1.Flags.boolean({ exclusive: ["to-script", "silent"], description: 'Renders the equivalent non-interactive command for future use before executing.' }),
|
|
98
157
|
"to-script": core_1.Flags.boolean({ exclusive: ["echo", "silent"], description: 'Renders the equivalent non-interactive command without executing it.' }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture.js","sourceRoot":"","sources":["../../../src/commands/imageRegistry/capture.ts"],"names":[],"mappings":";;;AAAA,sCAAoC;
|
|
1
|
+
{"version":3,"file":"capture.js","sourceRoot":"","sources":["../../../src/commands/imageRegistry/capture.ts"],"names":[],"mappings":";;;AAAA,sCAAoC;AACpC,4BAA6B;AAE7B,+DAAgJ;AAEhJ,6EAAuE;AACvE,2GAAgG;AAChG,+FAA0F;AAC1F,+FAA0F;AAC1F,6EAAyE;AACzE,uEAAkE;AAIlE,MAAqB,oBAAqB,SAAQ,gDAAoC;IAqB1E,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,CAAC;QAClB,2DAA2B,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,2DAA2B,CAAC,CAAC,MAAM,EAAE,CAAC;QACpD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAmB,CAAC,CAAC,MAAM,EAAE,CAAC;IAC9C,CAAC;IAGD,uEAAuE;IACvE,yBAAyB;IAEzB,IAAc,UAAU;QACtB,IAAI,IAAI,CAAC,kBAAkB,KAAK,SAAS,EAAE;YACzC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,2DAA2B,CAAC,CAAC;SACrE;QACD,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAGD,uEAAuE;IAG1D,WAAW;;YACtB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;YAEzD,IAAI,OAAO,GAA2B,EAAE,CAAC;YACzC,IAAI,KAAK,CAAC,GAAG;gBAAE,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;YACvC,IAAI,KAAK,CAAC,QAAQ;gBAAE,OAAO,CAAC,QAAQ,GAAG,mCAAe,CAAC,MAAM,CAAoB,6BAAiB,EAAE,KAAK,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,+EAA+E,EAAE,CAAC;IACzJ,IAAI,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,iFAAiF,EAAE,CAAC;IAC3J,WAAW,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,sEAAsE,EAAE,CAAC;CACnJ,CAAC;AAEK,yBAAI,GAAG,EAAE,CAAC"}
|
|
@@ -46,6 +46,11 @@ export interface OperationStatus {
|
|
|
46
46
|
/** optional, for use as interim processing output or completion failure reason.
|
|
47
47
|
* eg: "Waiting for Azure completion". */
|
|
48
48
|
message?: string;
|
|
49
|
+
/** Optional rich domain result carried on a terminal (Completed) status, for operations
|
|
50
|
+
* whose caller needs more than success/fail/message — e.g. a structured `needs_action`
|
|
51
|
+
* remediation from ai-agent-provision. A serialized `SingleResult<T>`. Ignored by callers
|
|
52
|
+
* that only track success/fail. */
|
|
53
|
+
resultPayload?: any;
|
|
49
54
|
}
|
|
50
55
|
/** Hierarchy of opCodes by which status messages
|
|
51
56
|
* will be marked within the overall correlation.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralizes each agent framework's default asset name and supported/coming-soon
|
|
3
|
+
* status. Pure function — no `this`, no I/O, no `_ui`. Callers (silent and
|
|
4
|
+
* interactive install flows alike) use this as the single source of truth so the
|
|
5
|
+
* two flows cannot drift on framework defaults or availability.
|
|
6
|
+
*/
|
|
7
|
+
export interface FrameworkSpec {
|
|
8
|
+
framework: string;
|
|
9
|
+
defaultName: string;
|
|
10
|
+
supported: boolean;
|
|
11
|
+
comingSoon?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function resolveFrameworkSpec(type: string): FrameworkSpec;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveFrameworkSpec = void 0;
|
|
4
|
+
function resolveFrameworkSpec(type) {
|
|
5
|
+
switch (type) {
|
|
6
|
+
case 'hermes':
|
|
7
|
+
return { framework: 'hermes', defaultName: 'hermes-agent', supported: true };
|
|
8
|
+
case 'openclaw':
|
|
9
|
+
return { framework: 'openclaw', defaultName: 'openclaw-agent', supported: true };
|
|
10
|
+
case 'byoa':
|
|
11
|
+
return { framework: 'byoa', defaultName: 'my-agent', supported: false, comingSoon: 'BYOA (helm/image validation) ships after Hermes.' };
|
|
12
|
+
default:
|
|
13
|
+
throw new Error(`Unknown agent type: ${type}`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.resolveFrameworkSpec = resolveFrameworkSpec;
|
|
17
|
+
//# sourceMappingURL=framework-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"framework-spec.js","sourceRoot":"","sources":["../../src/uilogic/framework-spec.ts"],"names":[],"mappings":";;;AAaA,SAAgB,oBAAoB,CAAC,IAAY;IAC/C,QAAQ,IAAI,EAAE;QACZ,KAAK,QAAQ;YACX,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC/E,KAAK,UAAU;YACb,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QACnF,KAAK,MAAM;YACT,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,kDAAkD,EAAE,CAAC;QAC1I;YACE,MAAM,IAAI,KAAK,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC;KAClD;AACH,CAAC;AAXD,oDAWC"}
|
|
@@ -6,13 +6,26 @@ const message_contracts_1 = require("../message-contracts");
|
|
|
6
6
|
/** Shared logic between LrpWatchers. */
|
|
7
7
|
class LrpWatcherUtils {
|
|
8
8
|
static resultFromStatusMessage(status) {
|
|
9
|
-
var _a, _b;
|
|
9
|
+
var _a, _b, _c;
|
|
10
|
+
// Rich async ops (e.g. ai-agent-provision) attach their full domain result to the terminal
|
|
11
|
+
// status as `resultPayload` (a serialized SingleResult). Prefer it so structured data — e.g.
|
|
12
|
+
// a `needs_action` status + remediation — survives; the generic status only carries success/msg.
|
|
13
|
+
const rich = status.resultPayload;
|
|
14
|
+
if (rich !== undefined && rich !== null) {
|
|
15
|
+
const sr = new contracts_1.SingleResult(Boolean(rich.success));
|
|
16
|
+
sr.output = rich.output;
|
|
17
|
+
sr.message = rich.message;
|
|
18
|
+
if (rich.error) {
|
|
19
|
+
sr.error = rich.error instanceof Error ? rich.error : new Error((_a = rich.error.message) !== null && _a !== void 0 ? _a : String(rich.error));
|
|
20
|
+
}
|
|
21
|
+
return sr;
|
|
22
|
+
}
|
|
10
23
|
let result = new contracts_1.Result(false);
|
|
11
24
|
// success
|
|
12
25
|
result.success = Boolean(status.completionCode == message_contracts_1.OperationCompletionCodeEnum.Success);
|
|
13
26
|
// message
|
|
14
27
|
if (status.completionCode != message_contracts_1.OperationCompletionCodeEnum.Success) {
|
|
15
|
-
result.message = status.opCode.concat(" ", (
|
|
28
|
+
result.message = status.opCode.concat(" ", (_b = status.completionCode) !== null && _b !== void 0 ? _b : "", ": ", (_c = status.message) !== null && _c !== void 0 ? _c : "").trimEnd();
|
|
16
29
|
}
|
|
17
30
|
else if (status.message) {
|
|
18
31
|
result.message = status.message;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lrp-watcher-utils.js","sourceRoot":"","sources":["../../src/uilogic/lrp-watcher-utils.ts"],"names":[],"mappings":";;;AAAA,kEAA0E;AAC1E,4DAA8F;AAW9F,wCAAwC;AACxC,MAAsB,eAAe;IAS5B,MAAM,CAAC,uBAAuB,CAAC,MAAuB;;QAC3D,IAAI,MAAM,GAAG,IAAI,kBAAM,C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5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.3.
|
|
2
|
+
"version": "1.3.239",
|
|
3
3
|
"commands": {
|
|
4
4
|
"branch": {
|
|
5
5
|
"id": "branch",
|
|
@@ -7391,6 +7391,12 @@
|
|
|
7391
7391
|
"required": false,
|
|
7392
7392
|
"multiple": false
|
|
7393
7393
|
},
|
|
7394
|
+
"private": {
|
|
7395
|
+
"name": "private",
|
|
7396
|
+
"type": "boolean",
|
|
7397
|
+
"description": "Whether pulling from this registry requires authentication (default true; pass --no-private for a public registry).",
|
|
7398
|
+
"allowNo": true
|
|
7399
|
+
},
|
|
7394
7400
|
"silent": {
|
|
7395
7401
|
"name": "silent",
|
|
7396
7402
|
"type": "boolean",
|
|
@@ -9646,6 +9652,142 @@
|
|
|
9646
9652
|
}
|
|
9647
9653
|
}
|
|
9648
9654
|
},
|
|
9655
|
+
"ai:agent:install": {
|
|
9656
|
+
"id": "ai:agent:install",
|
|
9657
|
+
"description": "Provisions a stateful Codiac agent workload (openclaw, hermes, or byoa) into an enterprise cabinet.",
|
|
9658
|
+
"strict": true,
|
|
9659
|
+
"pluginName": "@codiac.io/codiac-cli",
|
|
9660
|
+
"pluginAlias": "@codiac.io/codiac-cli",
|
|
9661
|
+
"pluginType": "core",
|
|
9662
|
+
"aliases": [],
|
|
9663
|
+
"hiddenAliases": [],
|
|
9664
|
+
"examples": [
|
|
9665
|
+
{
|
|
9666
|
+
"description": "Install a Hermes agent into the dev cabinet of the ben enterprise.",
|
|
9667
|
+
"command": "<%= config.bin %> <%= command.id %> -e ben -t hermes -c dev"
|
|
9668
|
+
},
|
|
9669
|
+
{
|
|
9670
|
+
"description": "Non-interactive (scripted) invocation. Ingress defaults on, so a host-naming strategy must be given explicitly; shared_ingress_ip needs no --domain.",
|
|
9671
|
+
"command": "<%= config.bin %> <%= command.id %> -e ben -t hermes -c dev --silent --naming shared_ingress_ip"
|
|
9672
|
+
},
|
|
9673
|
+
{
|
|
9674
|
+
"description": "Renders the equivalent silent command and then executes.",
|
|
9675
|
+
"command": "<%= config.bin %> <%= command.id %> -e ben -t hermes -c dev --echo"
|
|
9676
|
+
},
|
|
9677
|
+
{
|
|
9678
|
+
"description": "Renders the equivalent silent command without executing.",
|
|
9679
|
+
"command": "<%= config.bin %> <%= command.id %> -e ben -t hermes -c dev --to-script"
|
|
9680
|
+
}
|
|
9681
|
+
],
|
|
9682
|
+
"flags": {
|
|
9683
|
+
"help": {
|
|
9684
|
+
"name": "help",
|
|
9685
|
+
"type": "boolean",
|
|
9686
|
+
"char": "h",
|
|
9687
|
+
"description": "Show CLI help.",
|
|
9688
|
+
"allowNo": false
|
|
9689
|
+
},
|
|
9690
|
+
"enterpriseCode": {
|
|
9691
|
+
"name": "enterpriseCode",
|
|
9692
|
+
"type": "option",
|
|
9693
|
+
"char": "e",
|
|
9694
|
+
"description": "Code name identifying the target enterprise.",
|
|
9695
|
+
"required": false,
|
|
9696
|
+
"multiple": false
|
|
9697
|
+
},
|
|
9698
|
+
"type": {
|
|
9699
|
+
"name": "type",
|
|
9700
|
+
"type": "option",
|
|
9701
|
+
"char": "t",
|
|
9702
|
+
"description": "Agent framework to install: openclaw, hermes, or byoa (bring-your-own-agent).",
|
|
9703
|
+
"multiple": false,
|
|
9704
|
+
"options": [
|
|
9705
|
+
"openclaw",
|
|
9706
|
+
"hermes",
|
|
9707
|
+
"byoa"
|
|
9708
|
+
]
|
|
9709
|
+
},
|
|
9710
|
+
"cabinet": {
|
|
9711
|
+
"name": "cabinet",
|
|
9712
|
+
"type": "option",
|
|
9713
|
+
"char": "c",
|
|
9714
|
+
"description": "Cabinet (environment) into which the agent workload is deployed.",
|
|
9715
|
+
"multiple": false
|
|
9716
|
+
},
|
|
9717
|
+
"name": {
|
|
9718
|
+
"name": "name",
|
|
9719
|
+
"type": "option",
|
|
9720
|
+
"char": "n",
|
|
9721
|
+
"description": "Asset name for the agent workload (defaults to <type>-agent).",
|
|
9722
|
+
"multiple": false
|
|
9723
|
+
},
|
|
9724
|
+
"ingress": {
|
|
9725
|
+
"name": "ingress",
|
|
9726
|
+
"type": "boolean",
|
|
9727
|
+
"char": "g",
|
|
9728
|
+
"description": "Expose the agent web terminal through an ingress host (use --no-ingress to keep it cluster-internal).",
|
|
9729
|
+
"allowNo": true
|
|
9730
|
+
},
|
|
9731
|
+
"naming": {
|
|
9732
|
+
"name": "naming",
|
|
9733
|
+
"type": "option",
|
|
9734
|
+
"description": "Host-naming strategy to use for the ingress host (prompted during install when omitted).",
|
|
9735
|
+
"multiple": false
|
|
9736
|
+
},
|
|
9737
|
+
"domain": {
|
|
9738
|
+
"name": "domain",
|
|
9739
|
+
"type": "option",
|
|
9740
|
+
"description": "Domain to use with the host-naming strategy for the ingress host.",
|
|
9741
|
+
"multiple": false
|
|
9742
|
+
},
|
|
9743
|
+
"input": {
|
|
9744
|
+
"name": "input",
|
|
9745
|
+
"type": "option",
|
|
9746
|
+
"description": "Pre-supply a needs_action input as key=value (repeatable), e.g. --input openRouterKey=sk-... . Lets --silent/headless runs resolve secret/decision prompts without interaction.",
|
|
9747
|
+
"multiple": true
|
|
9748
|
+
},
|
|
9749
|
+
"take-defaults": {
|
|
9750
|
+
"name": "take-defaults",
|
|
9751
|
+
"type": "boolean",
|
|
9752
|
+
"description": "Prevents prompting for confirmation on parameters that were passed in or were automatically set to default values (Irrelevant in --silent mode). This behavior does NOT apply to scenarios where the command needs to override invalid user input; such cases will always prompt for confirmation.",
|
|
9753
|
+
"allowNo": false,
|
|
9754
|
+
"exclusive": [
|
|
9755
|
+
"silent"
|
|
9756
|
+
]
|
|
9757
|
+
},
|
|
9758
|
+
"silent": {
|
|
9759
|
+
"name": "silent",
|
|
9760
|
+
"type": "boolean",
|
|
9761
|
+
"description": "Executes without any user interaction; fails on missing or invalid arguments.",
|
|
9762
|
+
"allowNo": false,
|
|
9763
|
+
"exclusive": [
|
|
9764
|
+
"echo",
|
|
9765
|
+
"to-script"
|
|
9766
|
+
]
|
|
9767
|
+
},
|
|
9768
|
+
"echo": {
|
|
9769
|
+
"name": "echo",
|
|
9770
|
+
"type": "boolean",
|
|
9771
|
+
"description": "Renders the equivalent non-interactive command for future use before executing.",
|
|
9772
|
+
"allowNo": false,
|
|
9773
|
+
"exclusive": [
|
|
9774
|
+
"to-script",
|
|
9775
|
+
"silent"
|
|
9776
|
+
]
|
|
9777
|
+
},
|
|
9778
|
+
"to-script": {
|
|
9779
|
+
"name": "to-script",
|
|
9780
|
+
"type": "boolean",
|
|
9781
|
+
"description": "Renders the equivalent non-interactive command without executing it.",
|
|
9782
|
+
"allowNo": false,
|
|
9783
|
+
"exclusive": [
|
|
9784
|
+
"echo",
|
|
9785
|
+
"silent"
|
|
9786
|
+
]
|
|
9787
|
+
}
|
|
9788
|
+
},
|
|
9789
|
+
"args": {}
|
|
9790
|
+
},
|
|
9649
9791
|
"asset:entrypoint:delete": {
|
|
9650
9792
|
"id": "asset:entrypoint:delete",
|
|
9651
9793
|
"description": "Removes an existing override of the image startup command for this asset (restores the original ENTRYPOINT set in the image itself, as well as any image elements specified using CMD)).",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codiac.io/codiac-cli",
|
|
3
3
|
"description": "Local command line interface for managing enterprise assets and environments.",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.239",
|
|
5
5
|
"author": "Codiac",
|
|
6
6
|
"bin": {
|
|
7
7
|
"codiac": "./bin/run",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"prepack": "oclif readme",
|
|
13
13
|
"lint": "eslint . --ext .ts --config .eslintrc",
|
|
14
14
|
"test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
|
|
15
|
+
"typecheck": "tsc --noEmit -p tsconfig.typecheck.json",
|
|
15
16
|
"version": "oclif readme && git add README.md",
|
|
16
17
|
"upgrade-toyhauler": "npm uninstall toyhauler-api-client && npm install toyhauler-auth-client@latest && npm uninstall toyhauler-auth-client && npm install toyhauler-auth-client@latest && npm uninstall @codiac.io/codiac-common && npm install @codiac.io/codiac-common@latest && npm uninstall toyhauler-domain && npm install toyhauler-domain@latest",
|
|
17
18
|
"auto-commit": "git add -A && git commit -m 'publish [skip ci]' && git push origin HEAD:master",
|