@safetech/inheriti-cli 0.0.27-dev.0 → 0.0.27
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"deployment":"
|
|
1
|
+
{"deployment":"prod"}
|
package/dist/main.js
CHANGED
|
@@ -165752,8 +165752,8 @@ var CliConfigurationInvalid = class extends Error {
|
|
|
165752
165752
|
}
|
|
165753
165753
|
code;
|
|
165754
165754
|
};
|
|
165755
|
-
var IS_DEVELOPMENT_BUILD =
|
|
165756
|
-
var BUILD_DEPLOYMENT = true ? businessDeployment("
|
|
165755
|
+
var IS_DEVELOPMENT_BUILD = false;
|
|
165756
|
+
var BUILD_DEPLOYMENT = true ? businessDeployment("prod") : void 0;
|
|
165757
165757
|
var DEFAULT_SCOPES = ["openid", "plan:list", "plan:read", "plan:reveal", "asset:copy"];
|
|
165758
165758
|
function defaultConfigurationPath(environmentVariables) {
|
|
165759
165759
|
if (environmentVariables.INHERITI_ELEMENTS_CONFIG) return environmentVariables.INHERITI_ELEMENTS_CONFIG;
|
|
@@ -176017,7 +176017,6 @@ var MESSAGES = {
|
|
|
176017
176017
|
integration_tester_required: "You are not an integration tester. Contact developer support.",
|
|
176018
176018
|
operator_not_signed_in: "Not signed in. Run `inheriti login` first.",
|
|
176019
176019
|
business_context_required: "Set business: true in the CLI configuration to use organizations.",
|
|
176020
|
-
automation_disabled: "Automation is unavailable.",
|
|
176021
176020
|
automation_aws_publication_outcome_unknown: "AWS publication was interrupted. An in-flight write may have completed; inspect target versions before retrying.",
|
|
176022
176021
|
automation_aws_publication_value_invalid: "A selected plan field could not be serialized for AWS publication.",
|
|
176023
176022
|
google_secret_project_invalid: "Enter the exact Google Cloud project ID.",
|
|
@@ -176309,12 +176308,11 @@ function write2(path9, file2) {
|
|
|
176309
176308
|
}
|
|
176310
176309
|
|
|
176311
176310
|
// src/feature-flags.ts
|
|
176312
|
-
init_node_base2();
|
|
176313
176311
|
var CLI_FEATURE_FLAGS = {
|
|
176314
|
-
local: {
|
|
176315
|
-
dev: {
|
|
176316
|
-
stg: {
|
|
176317
|
-
prod: {
|
|
176312
|
+
local: { planCreation: true },
|
|
176313
|
+
dev: { planCreation: true },
|
|
176314
|
+
stg: { planCreation: true },
|
|
176315
|
+
prod: { planCreation: true }
|
|
176318
176316
|
};
|
|
176319
176317
|
|
|
176320
176318
|
// src/commands/completion.ts
|
|
@@ -176326,7 +176324,7 @@ var ROOT = candidates(
|
|
|
176326
176324
|
["organizations", "Manage Inheriti\xAE Business organisations"],
|
|
176327
176325
|
["plans", "List and use plans"],
|
|
176328
176326
|
["secrets", "Machine-oriented secret delivery"],
|
|
176329
|
-
["automations", "Manage
|
|
176327
|
+
["automations", "Manage Inheriti\xAE Business automations"],
|
|
176330
176328
|
["skill", "Install the agent skill"],
|
|
176331
176329
|
["setup", "Enable shell autocomplete"],
|
|
176332
176330
|
["completion", "Print shell completion"],
|
|
@@ -176365,7 +176363,7 @@ async function completeWords(context, terminal, words, environmentVariables) {
|
|
|
176365
176363
|
}
|
|
176366
176364
|
async function candidatesFor(context, words, environmentVariables) {
|
|
176367
176365
|
const completion = completionFor(context, words);
|
|
176368
|
-
if (completion.kind === "static") return completion.candidates.filter((candidate) =>
|
|
176366
|
+
if (completion.kind === "static") return completion.candidates.filter((candidate) => candidate.value !== "create" || words[0] !== "plans" || Boolean(BUILD_DEPLOYMENT && CLI_FEATURE_FLAGS[BUILD_DEPLOYMENT].planCreation));
|
|
176369
176367
|
if (completion.kind === "none") return [];
|
|
176370
176368
|
if (!await context.core.getAccessToken()) return [];
|
|
176371
176369
|
const path9 = completionCachePath(environmentVariables);
|
|
@@ -176391,9 +176389,7 @@ function completionNeedsPlanContext(words) {
|
|
|
176391
176389
|
}
|
|
176392
176390
|
function completionFor(context, words) {
|
|
176393
176391
|
const [command7, subcommand, ...rest] = words;
|
|
176394
|
-
if (command7 === "automations" && !Boolean(BUILD_DEPLOYMENT && CLI_FEATURE_FLAGS[BUILD_DEPLOYMENT].automation)) return { kind: "none" };
|
|
176395
176392
|
if (command7 === "plans" && subcommand === "create" && !Boolean(BUILD_DEPLOYMENT && CLI_FEATURE_FLAGS[BUILD_DEPLOYMENT].planCreation)) return { kind: "none" };
|
|
176396
|
-
if (command7 === "secrets" && subcommand === "publish" && !Boolean(BUILD_DEPLOYMENT && CLI_FEATURE_FLAGS[BUILD_DEPLOYMENT].automation)) return { kind: "none" };
|
|
176397
176393
|
if (words.length <= 1) return { kind: "static", candidates: ROOT };
|
|
176398
176394
|
if (command7 === "setup") {
|
|
176399
176395
|
const values2 = words.at(-2) === "--shell" ? COMPLETION_SHELLS : ["--yes", "--no-completion", "--shell", "--help"];
|
|
@@ -179664,7 +179660,6 @@ function usage10(environmentVariables) {
|
|
|
179664
179660
|
standalone plans. For Inheriti\xAE Business set business: true and deployment to
|
|
179665
179661
|
local, dev or stg; prod requires a production build.
|
|
179666
179662
|
Environment defaults to TEST. Existing environment overrides still work.`;
|
|
179667
|
-
const automationEnabled = Boolean(BUILD_DEPLOYMENT && CLI_FEATURE_FLAGS[BUILD_DEPLOYMENT].automation);
|
|
179668
179663
|
const planCreationEnabled = Boolean(BUILD_DEPLOYMENT && CLI_FEATURE_FLAGS[BUILD_DEPLOYMENT].planCreation);
|
|
179669
179664
|
const protectedEnabled = Boolean(BUILD_DEPLOYMENT && PROTECTED_FILE_FLAGS[BUILD_DEPLOYMENT]);
|
|
179670
179665
|
return `${terminalWordmark({ noColor: noColorFromEnvironment(environmentVariables) })}
|
|
@@ -179675,13 +179670,13 @@ inheriti <command>
|
|
|
179675
179670
|
logout Sign out and clear the local session
|
|
179676
179671
|
organizations list List Inheriti\xAE Business organisations and the selected one
|
|
179677
179672
|
organizations use [id] Select an Inheriti\xAE Business organisation
|
|
179678
|
-
|
|
179679
|
-
|
|
179680
|
-
|
|
179681
|
-
|
|
179682
|
-
|
|
179683
|
-
|
|
179684
|
-
|
|
179673
|
+
automations list List safe connection metadata
|
|
179674
|
+
automations grants PLAN_ID List safe grant metadata for one plan
|
|
179675
|
+
automations status Show setup and execution progress
|
|
179676
|
+
automations create|verify|trust|disable|usage|runtime Manage connections and runtime guidance
|
|
179677
|
+
automations pair start|redeem|aws|google Verify a workload without copying its proof
|
|
179678
|
+
secrets publish aws|google Copy approved plan fields to cloud secret stores (optional)
|
|
179679
|
+
automations grant create|activate|member|revoke Manage a plan grant
|
|
179685
179680
|
plans list [--limit n] [--all] [--cursor c] [--organization id]
|
|
179686
179681
|
List plans in the selected context
|
|
179687
179682
|
${planCreationEnabled ? "plans create [--title NAME] [--description TEXT] [--asset TYPE ...]\n Prefill the desktop assistant with plan metadata and likely asset types" : ""}
|
|
@@ -179724,8 +179719,6 @@ function commandUsage(topic, environmentVariables) {
|
|
|
179724
179719
|
return "Usage: inheriti plans <list|show|logs|reveal|download|use|abort>";
|
|
179725
179720
|
if (command7 === "plans download" && !Boolean(BUILD_DEPLOYMENT && PROTECTED_FILE_FLAGS[BUILD_DEPLOYMENT]))
|
|
179726
179721
|
return "Usage: inheriti plans download [PLAN_ID] --asset CODE_OR_ID --output PATH\n\nAuthorize and save one media asset to a new file with owner-only permissions. Existing files are never overwritten.";
|
|
179727
|
-
if (command7 === "secrets" && !Boolean(BUILD_DEPLOYMENT && CLI_FEATURE_FLAGS[BUILD_DEPLOYMENT].automation))
|
|
179728
|
-
return "Usage: inheriti secrets <exec|resolve>\n\nRun reveal-authorized secret delivery.";
|
|
179729
179722
|
const details = {
|
|
179730
179723
|
skill: `Usage: inheriti skill install [--target codex|claude|all | --directory ABSOLUTE_PATH]
|
|
179731
179724
|
|
|
@@ -179741,7 +179734,7 @@ Sign out and clear the locally stored operator session. This does not delete pla
|
|
|
179741
179734
|
List eligible Inheriti\xAE Business organisations or select one for this account.`,
|
|
179742
179735
|
automations: `Usage: inheriti automations <list|grants PLAN_ID|status|create|verify|trust|disable|usage|runtime install-instructions|runtime install ec2|runtime image|setup|pair|grant create|activate|member|revoke>
|
|
179743
179736
|
|
|
179744
|
-
Manage Inheriti\xAE Business automation connections and grants
|
|
179737
|
+
Manage Inheriti\xAE Business automation connections and grants. Run inheriti help automations create, usage or grant for flags. Requires sign-in and a selected Organisation.`,
|
|
179745
179738
|
"automations status": `Usage: inheriti automations status [--organization ID] [--plan ID] [--connection ID] [--job ID] [--watch] [--json]
|
|
179746
179739
|
|
|
179747
179740
|
Read setup and recent execution progress for any automation provider. A terminal can select a missing plan or connection; scripts must pass both. --job narrows to one known attempt. --watch polls every five seconds until Ctrl+C; combined with --json it emits one JSON object per line. It never starts an action or verifies the external provider run.`,
|
|
@@ -180722,7 +180715,7 @@ async function run3(argv, environmentVariables, terminal) {
|
|
|
180722
180715
|
}
|
|
180723
180716
|
const topic = helpTopic(argv);
|
|
180724
180717
|
if (topic) {
|
|
180725
|
-
if (topic[0] === "
|
|
180718
|
+
if (topic[0] === "plans" && topic[1] === "create" && !Boolean(BUILD_DEPLOYMENT && CLI_FEATURE_FLAGS[BUILD_DEPLOYMENT].planCreation) || topic[0] === "plans" && topic[1] === "open" && !Boolean(BUILD_DEPLOYMENT && PROTECTED_FILE_FLAGS[BUILD_DEPLOYMENT])) {
|
|
180726
180719
|
terminal.writeError("This feature is unavailable.");
|
|
180727
180720
|
return 1;
|
|
180728
180721
|
}
|
|
@@ -180761,15 +180754,10 @@ async function run3(argv, environmentVariables, terminal) {
|
|
|
180761
180754
|
return 1;
|
|
180762
180755
|
}
|
|
180763
180756
|
const secretDelivery = command7 === "secrets" && (rest[0] === "exec" || rest[0] === "resolve");
|
|
180764
|
-
if (command7 === "automations" && (!BUILD_DEPLOYMENT || !CLI_FEATURE_FLAGS[BUILD_DEPLOYMENT].automation))
|
|
180765
|
-
throw new Error("automation_disabled");
|
|
180766
180757
|
const separator = rest.indexOf("--");
|
|
180767
180758
|
const markerIndex = secretDelivery ? rest.slice(0, separator < 0 ? void 0 : separator).indexOf("--automation") : -1;
|
|
180768
180759
|
const automation = markerIndex >= 0;
|
|
180769
180760
|
automationSecretDelivery = secretDelivery && automation;
|
|
180770
|
-
if (secretDelivery && (automation || automationSecretsRequested(environmentVariables)) && (!BUILD_DEPLOYMENT || !CLI_FEATURE_FLAGS[BUILD_DEPLOYMENT].automation)) {
|
|
180771
|
-
throw new Error("automation_disabled");
|
|
180772
|
-
}
|
|
180773
180761
|
if (automation) rest.splice(markerIndex, 1);
|
|
180774
180762
|
if (secretDelivery && (automation || automationSecretsRequested(environmentVariables))) {
|
|
180775
180763
|
if (!automation || !automationConfigurationComplete(environmentVariables))
|
|
@@ -180933,7 +180921,6 @@ async function run3(argv, environmentVariables, terminal) {
|
|
|
180933
180921
|
}
|
|
180934
180922
|
}
|
|
180935
180923
|
if (command7 === "secrets" && rest[0] === "publish") {
|
|
180936
|
-
if (!BUILD_DEPLOYMENT || !CLI_FEATURE_FLAGS[BUILD_DEPLOYMENT].automation) throw new Error("automation_disabled");
|
|
180937
180924
|
if (rest[1] !== "aws" && rest[1] !== "google") {
|
|
180938
180925
|
terminal.writeError(commandUsage(["secrets", "publish"], environmentVariables));
|
|
180939
180926
|
return 1;
|