@safetech/inheriti-cli 0.0.23-dev.0 → 0.0.25-dev.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/main.js +4808 -3609
- package/dist/main.js.map +4 -4
- package/package.json +1 -1
- package/skill/inheriti-cli/SKILL.md +1 -1
- package/skill/inheriti-cli/references/automation-providers.md +3 -1
- package/skill/inheriti-cli/references/automations.md +7 -2
- package/skill/inheriti-cli/references/github-workflow.md +17 -2
- package/skill/inheriti-cli/references/identity-and-discovery.md +1 -1
- package/skill/manifest.json +1 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: inheriti-cli
|
|
3
3
|
description: Use the Inheriti® CLI to find, create, inspect, reveal, download, or use protected plans and to configure Business automations from a user's natural-language request.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.0.
|
|
5
|
+
version: 0.0.25-dev.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Inheriti® CLI
|
|
@@ -4,7 +4,9 @@ Read only the section for the workload that will actually execute the protected
|
|
|
4
4
|
|
|
5
5
|
## GitHub Actions
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
For automatic configuration from the user's repository/project folder, prefer the [automatic setup path](github-workflow.md#automatic-setup-from-the-project-folder). It discovers the repository and installs a dedicated generated workflow; do not ask the user to inspect or edit YAML. Use the detailed inspection below when the request specifically concerns an existing application workflow.
|
|
8
|
+
|
|
9
|
+
Use repository, GitHub job environment, workflow file, and ref already selected in Business; resolve only missing inputs before binding `automations create --provider GITHUB` to the exact `--repository OWNER/REPO`, `--environment NAME`, and `--workflow OWNER/REPO/.github/workflows/FILE.yml@refs/heads/BRANCH`. For an empty repository, propose a dedicated pairing workflow file and explicit ref instead of assuming one exists. Keep the Business deployment (`local`/`dev`), connection deployment-environment, and GitHub environment distinct; do not infer one from another. The generic `automations create --provider GITHUB` command creates only Inheriti metadata. The automatic `automations setup github` command installs and runs its dedicated pairing workflow; it does not create the repository.
|
|
8
10
|
|
|
9
11
|
### Resolve missing context
|
|
10
12
|
|
|
@@ -8,12 +8,17 @@ For a selected provider, establish the intended AWS account/profile and region o
|
|
|
8
8
|
|
|
9
9
|
Inspect existing connections and grants before proposing changes. If Business supplied a connection ID, inspect that exact connection's provider, workload identity, environment, trust, and current plan grant using available safe metadata. Preserve the selected connection only when those details match the requested setup; if a detail cannot be verified or conflicts, explain what is missing or mismatched and ask for a new choice. Do not silently substitute or create another connection. `automations grant create` can list members as candidates, but that list does not prove plan-specific eligibility; Business validates the chosen member and grant at creation and activation. If Business supplied a responsible member, do not replace that choice silently. If the grant is rejected, report the reason safely and ask for a newly eligible member. Before a mutating command, show the connection, plan, member, workload and exact effect; let the CLI handle its required confirmations and approvals. If the CLI lacks automation commands, the workload does not exist, or permissions are missing, stop at the prerequisite and explain the next step. A copied prompt or preview is not evidence that a connection, grant, runtime, or run succeeded; report each confirmed status separately.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
For GitHub, use the four-stage [automatic project-folder flow](github-workflow.md#automatic-setup-from-the-project-folder): create the Inheriti connection, configure/verify GitHub, grant plan access, then run. For other providers the order is: existing workload and CLI runtime → connection (`automations create`) → identity pairing or verification (`automations pair ...` or `automations verify`) → plan grant (`automations grant create`, then `activate`) → mapping and runtime setup (`automations setup`) → run and inspect safe plan/member logs. `automations trust` changes the non-secret identity policy and may require reverification; `automations disable` stops a connection. `automations grant member` changes its responsible member; `revoke` ends a grant. Present the exact connection, plan, member, and effect before these changes. Never pass a workload proof, private key, or credential as an argument or through chat.
|
|
12
12
|
|
|
13
13
|
`automations pair start [--connection ID]` opens a ten-minute window; `pair redeem` runs inside the configured workload and sends a fresh native proof directly to Business. Provider helpers can pair a temporary ECS task, Cloud Run job, or SSM-managed EC2 instance after target/revision inspection and confirmation. `automations verify` opens a native proof-entry window only when there is already a secure transfer route; it does not fetch proof from Cloud Run or ECS. Review the provider-specific route in [provider workflows](automation-providers.md); for GitHub, read its first-pairing, existing-workflow, reuse, and recovery guidance before preparing a job.
|
|
14
14
|
|
|
15
15
|
For a verified workload, pass non-secret operation context before the child separator: `inheriti secrets exec PLAN_ID --automation --env TOKEN=asset.field --reason 'Deploy service' --target service-name --version 1.2.3 -- command`. Optional flags are `--reason`, `--commit`, `--workflow`, `--pipeline`, `--target`, `--image`, and `--version`; repeat none. GitHub Actions automatically supplies the commit, workflow, and run URL from its allowlisted environment when present; flags override those values. Launchers may set `INHERITI_AUTOMATION_REASON`, `INHERITI_AUTOMATION_TARGET`, `INHERITI_AUTOMATION_IMAGE`, and `INHERITI_AUTOMATION_VERSION`. Do not put secrets or arbitrary child arguments in context. This requires a CLI built against a Client SDK release carrying operation context; do not package against the older published SDK.
|
|
16
16
|
|
|
17
|
-
`automations setup --plan PLAN_ID --connection CONNECTION_ID ...` maps plan fields to runtime inputs. Select each needed `ASSET.FIELD` with repeatable `--only` and use `--map NAME=ASSET.FIELD` for an application variable; inspect the complete mapping before action. Use `--map-all` only when the user explicitly wants every eligible field. It can print or save a launcher for a custom/container runner, preview a managed ECS/Cloud Run change, or prepare an EC2 launcher and systemd unit. Cloud changes require an explicit `--apply` with a prepared image and reviewed target revision; EC2 writes require `--install` and confirmation.
|
|
17
|
+
`automations setup --plan PLAN_ID --connection CONNECTION_ID ...` maps plan fields to runtime inputs. Select each needed `ASSET.FIELD` with repeatable `--only` and use `--map NAME=ASSET.FIELD` for an application variable; inspect the complete mapping before action. Use `--map-all` only when the user explicitly wants every eligible field. It can print or save a launcher for a custom/container runner, preview a managed ECS/Cloud Run change, or prepare an EC2 launcher and systemd unit. Cloud changes require an explicit `--apply` with a prepared image and reviewed target revision; EC2 writes require `--install` and confirmation. These runtime commands do not create an app, cloud workload, IAM role, or account. The separate `automations setup github` path can install its dedicated generated workflow in an existing GitHub repository. `automations usage` generates a GitHub workflow only for a verified connection, active grant, and Business-verified Action/CLI release.
|
|
18
18
|
|
|
19
19
|
For an application that already reads a provider secret store, `secrets publish aws|google` previews exact field-to-destination mappings and applies only with `--apply`. This is a **one-time copy**: later plan edits or revocation do not rotate or delete the provider copy. Prefer direct `secrets exec --automation` inside a verified workload when ongoing plan control is intended. Check `inheriti help secrets publish aws|google` for current target flags; never put values in them.
|
|
20
|
+
|
|
21
|
+
Use `inheriti automations status --organization ID --plan ID --connection ID [--job ID] [--json|--watch]` to inspect setup and safe execution progress for any provider. It reports the next action and actor; an absent job filter lists up to 20 recent attempts. Keep the known job ID when correlating a particular run. `--watch` polls read-only every five seconds until Ctrl+C; `--watch --json` emits one JSON object per line. Provider run status is unverified because this command does not query GitHub, AWS, Google Cloud, or a portable runner. A ready setup does not mean a first reveal or a real provider run has succeeded. Never infer completion from a revoked workload session.
|
|
22
|
+
# CLI selection behavior
|
|
23
|
+
|
|
24
|
+
`automations list` and `automations grants PLAN_ID` show operational records by default. Add `--all` to inspect disabled connections or revoked grants. Responsible-member selectors show active members with their name, email and Organisation-key status; Business still validates their eligibility for the selected plan. Interactive setup prompts only for missing safe IDs, and GitHub setup reports progress through workflow preparation, pairing, and identity verification.
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
# GitHub project inspection and pairing workflow
|
|
2
2
|
|
|
3
|
-
Use this only for a selected GitHub Actions automation.
|
|
3
|
+
Use this only for a selected GitHub Actions automation. Carry forward any organisation, plan, field, responsible member, repository, workflow/ref, and job environment already selected in Business or supplied by the user; do not ask for them again. Keep the selected Business deployment and connection environment distinct from the GitHub job environment throughout inspection, connection creation, pairing, and protected execution.
|
|
4
|
+
|
|
5
|
+
## Automatic setup from the project folder
|
|
6
|
+
|
|
7
|
+
When the user identifies their current repository/project folder, derive its GitHub identity with the CLI; do not ask them to inspect workflows or type the repository name. Keep all selected toolbar values and follow the same separate stages as the manual guide:
|
|
8
|
+
|
|
9
|
+
1. `inheriti automations create github --organization ORGANISATION_ID` creates or reuses the **Inheriti connection** only. Optional `--environment` and `--workflow` set the identity; defaults are `inheriti` and `inheriti.yml`. No plan or member belongs to connection creation. Reuse an explicitly selected existing active connection; a disabled match remains disabled, so a fresh connection is created.
|
|
10
|
+
2. `inheriti automations setup github --organization ORGANISATION_ID --connection CONNECTION_ID --plan PLAN_ID --field ASSET.FIELD` prepares technical setup from the connection's stored trust. It previews by default; authorised `--apply` commits the dedicated workflow and verifies identity through GitHub. It never creates a connection or grants plan access. The generated workflow's narrow push trigger registers it in Actions; both jobs are gated to manual dispatch, so that registration run is skipped. The commit can also trigger other existing push workflows in the repository. Pairing starts only through the separate explicit manual dispatch. No manual YAML preparation is needed.
|
|
11
|
+
3. After `VERIFIED`, use the separate `automations grant create --organization ORGANISATION_ID` and `grant activate --organization ORGANISATION_ID` commands with the selected plan, connection and responsible member. Preserve the same grant ID on retries: create succeeds again only when that exact ID, connection and member already have a `PENDING_VERIFICATION` or `ACTIVE` grant; activation succeeds again only when that exact grant is `ACTIVE`. Conflicting grants still need review. Let Business validate eligibility.
|
|
12
|
+
4. Only after access is active, the generated workflow can run normally. The protected plan's usual SafeKey Mobile approval may still be required during that run. Do not dispatch protected usage merely to prove setup. Resolve its filename from the selected connection's trust, not unrelated creation-field state.
|
|
13
|
+
|
|
14
|
+
An unrelated existing file, mismatched connection, missing verified release/permission or expired pairing stops the relevant stage; do not invent success or expand publication scope. Use the detailed steps below only when adapting an existing application workflow or troubleshooting. Do that inspection yourself rather than delegating file inspection or YAML editing back to the user.
|
|
15
|
+
|
|
16
|
+
Before either automatic GitHub command mutates state, the CLI checks that `gh` is installed and authenticated. A classic GitHub OAuth token needs the `workflow` scope to write `.github/workflows/`; when the CLI reports it missing, run `gh auth refresh -h github.com -s workflow`. Fine-grained tokens may not expose the classic scopes header; the CLI checks actual repository access separately. Never request a token value in chat.
|
|
17
|
+
|
|
18
|
+
For a channel-locked **DEV** CLI with a protected local `github-dev-cli.json` profile, setup can use a local packaged CLI artifact while the Business-verified public Action/CLI release is unavailable. The profile is prepared by the supervised local harness at the CLI state root and points to a dev-marked `.tgz`, local upload API, and HTTPS download origin. Do not ask for its token, signed URL, or tarball contents in chat. Preview validates it without upload. `--apply` uploads the package, stores the short-lived signed download URL as a GitHub Actions secret through stdin, and generates a workflow pinned to the artifact version and SHA-256 for both pairing and normal usage. A later setup run refreshes the URL; it can replace only an untouched generated DEV workflow. This path does not publish npm packages, replace an arbitrary workflow, or bypass the release gate for local, staging, or production builds.
|
|
4
19
|
|
|
5
20
|
## Inspect the selected project
|
|
6
21
|
|
|
7
|
-
1.
|
|
22
|
+
1. If a repository is selected, confirm its local checkout if one exists. Read its git root, current branch and status, remote **names**, and a sanitized repository identity. Do not print raw remote URLs: they can contain credentials. Compare the identity with the selected GitHub repository; do not infer intent from the current directory or a single checkout. For a new or empty repository, propose a dedicated `.github/workflows/inheriti.yml` file and explicit job environment and ref; do not pretend an existing workflow was found.
|
|
8
23
|
2. For the selected app, inspect package manifests, lockfiles, declared scripts and runtime engines, Dockerfile or deployment configuration, and `.github/workflows` files. In a monorepo, trace the actual app path and working directory. Inspect text without executing package scripts. Never read `.env` files, credential stores, secret values, workflow logs containing values, or full unfiltered provider metadata.
|
|
9
24
|
3. Trace the command that will consume protected values and the required environment variable **names** from source, schema, or safe documentation. Compare these with safe plan field selectors and the existing workflow's trigger, environment, permissions, install steps, and run command. Ask only for technical choices still unresolved, such as a target workflow, environment, mapping, or command when no reliable source establishes it.
|
|
10
25
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Identity and discovery
|
|
2
2
|
|
|
3
|
-
Run `inheriti help` or `inheriti help COMMAND SUBCOMMAND` before using an unfamiliar command; `inheriti version` reports the installed build. `inheriti update` checks its channel, while `inheriti update --install` installs an offered build after confirmation. A required Business CLI update is checked after login and before authenticated commands.
|
|
3
|
+
Run `inheriti help` or `inheriti help COMMAND SUBCOMMAND` before using an unfamiliar command; `inheriti version` reports the installed build. `inheriti update` checks its channel, while `inheriti update --install` installs an offered build after confirmation. A required Business CLI update is checked after login and before authenticated commands. Run `inheriti skill install` in a terminal to choose Codex, Claude Code, both, or another skills folder. In scripts, specify `--target codex|claude|all` or `--directory ABSOLUTE_PATH`; a pipe never chooses an agent. The CLI remembers a successful choice and reconciles that skill on later commands and upgrades. A running agent may need a new session to load updated instructions. `inheriti setup` configures shell autocomplete, and `inheriti completion bash|zsh|fish` prints a completion script; neither is needed to install this skill.
|
|
4
4
|
|
|
5
5
|
`inheriti login` opens a browser and needs an interactive terminal. `inheriti logout` clears the local operator session, not plans. In Business, run `inheriti organizations list` to see eligible Organisations and the selected one; use `inheriti organizations use [ID]` to select. If more than one Organisation could contain the requested plan, establish the right one before searching or changing anything. The CLI and server enforce membership and permissions.
|
|
6
6
|
|
package/skill/manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schema":1,"cliVersion":"0.0.
|
|
1
|
+
{"schema":1,"cliVersion":"0.0.25-dev.0","deployment":"dev","sha256":"c4bfc9ff8d1dd9268d424f87d6e31f1f37db4697977b3e83323a6466dfa4ec02"}
|