@vectros-ai/cli 0.7.0 → 0.10.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/AUTHORING.md CHANGED
@@ -142,8 +142,9 @@ accessProfile:
142
142
  allowedActions: [records:r, records:c, records:u, search:r, schemas:r]
143
143
  # dataScope binds the key to specific owners. Include `null` to ALSO grant
144
144
  # tenant-level (shared) records — without it the key sees ONLY the listed
145
- # owners' records, not shared/seed data:
146
- # dataScope: { orgId: [<org-uuid>, null] }
145
+ # owners' records, not shared/seed data. Keys are userId + namespaced scopes
146
+ # (scope:org, scope:client, ...):
147
+ # dataScope: { "scope:org": [<org-uuid>, null] }
147
148
 
148
149
  servicePrincipal:
149
150
  externalId: my-thing-sp # stable; the principal the profile + key bind to
@@ -214,7 +215,7 @@ than one surface, so the surface disambiguates which lookup resolves the link):
214
215
  - fieldId: establishedByDecision
215
216
  fieldType: reference
216
217
  targetTypeName: decision # the typeName it points at
217
- targetSurface: record # record | document | user | org | client (REQUIRED)
218
+ targetSurface: record # record | document | user | a namespace (org, client, ...) — REQUIRED
218
219
  targetField: externalId # the target's UNIQUE lookup to match (defaults to externalId)
219
220
  cardinality: one # one (a single id) | many (an array of ids)
220
221
  ```
package/CHANGELOG.md CHANGED
@@ -3,6 +3,142 @@
3
3
  All notable changes to `@vectros-ai/cli` are documented here.
4
4
  This project adheres to [Semantic Versioning](https://semver.org).
5
5
 
6
+ ## 0.10.0
7
+
8
+ ### Changed (breaking)
9
+
10
+ - **Organization and client identities are now namespaces.** `org` and `client`
11
+ join any namespace you define (teams, projects, …), so the `identity` command
12
+ and ownership flags generalize:
13
+ - `identity create|list|get|delete --type <user|namespace>` — `user` for a
14
+ user, or a namespace (`org`, `client`, or one you define). `--type org` and
15
+ `--type client` keep working.
16
+ - `--scope <namespace>:<value>` (repeatable) replaces `--org <id>` on
17
+ `identity create`, `access grant`, and `join` — e.g. `--scope org:<id>`.
18
+ - Schema ownership in blueprints uses `scopes` instead of `orgId` / `clientId`,
19
+ and `--data-scope` keys use the `scope:<namespace>` form. The old `orgId` /
20
+ `clientId` keys are no longer accepted.
21
+
22
+ ### Added
23
+
24
+ - **Keys are now kept in your OS credential store** (Windows Credential Manager,
25
+ Linux Secret Service) instead of an encrypted file, on machines that have one —
26
+ so a copy of your `~/.vectros` directory no longer gives up a key. Existing
27
+ secrets migrate automatically the first time each key is used. Where no store is
28
+ usable (a headless Linux box, or no prebuilt for the optional native package) the
29
+ encrypted file remains the fallback. Set `VECTROS_KEYRING_BACKEND=file` to opt
30
+ out. macOS keeps using the encrypted file for now. Note: `vectros bootstrap`
31
+ still writes its key as plain JSON to `~/.vectros/<pack>.key.json`, so treat
32
+ `~/.vectros` as a secret if you use it.
33
+ - **The keyring is now a credential helper.** `keyring show --format raw` prints
34
+ the bare secret and is the contract other tools resolve through:
35
+ `@vectros-ai/mcp-server` 0.10.0+ runs it when `VECTROS_API_KEY` is unset, so a
36
+ key lives in the keyring instead of being copied into each tool's config. Set
37
+ `VECTROS_KEYRING_ALIAS` to target a specific entry.
38
+ - **`vectros keyring doctor`** — a health check for the keyring: the active entry,
39
+ whether each secret is readable, where each lives, and which hold live keys.
40
+ Exits non-zero when it finds anything to fix; `--json` for scripts.
41
+ - **`vectros keyring prune`** — drop orphaned entries (an index entry with no
42
+ stored secret). Narrow by design: an entry whose secret is merely unreadable or
43
+ locked is reported, never removed. `--dry-run` previews; `--force` skips the prompt.
44
+ - **`vectros context list` now enumerates the whole tenant**, not just contexts you
45
+ have joined, with an `active`/`purging` status column. `--mine` limits it to the
46
+ contexts you hold an access profile in. Now account-owner-only (a sub-user reads a
47
+ single context with `context get`).
48
+ - **`vectros key list --all-contexts`** — every active scoped key across all your
49
+ contexts and both tenants, the account-wide view a context-scoped `key list`
50
+ cannot show. Owner-only.
51
+ - **Actionable error messages** for known server errors — the active-key limit
52
+ (enumerate → revoke → retry), a 403 (owner/scope), a 404 (`context list`) —
53
+ instead of the raw SDK error. Correlation id under `VECTROS_MCP_DEBUG`.
54
+ - **`bootstrap` apply is now legible** — the preview states that apply is a
55
+ non-destructive reconcile, and each resource reports `created` vs `reconciled`.
56
+
57
+ ### Fixed
58
+
59
+ - **Two `vectros` commands running at once can no longer lose each other's keyring
60
+ entries** — index updates now take a lock and queue instead of overwriting. A
61
+ process killed mid-write leaves a lock the next command clears automatically.
62
+ - **`vectros keyring remove` refuses instead of silently stranding a key.** If it
63
+ cannot confirm the secret was deleted (a locked store), it declines and prints the
64
+ key id rather than discarding the only local record of a still-live key.
65
+ - **`vectros join` now reports a key it had to abandon** — when a replaced key's
66
+ secret cannot be deleted, it prints that key's id and the `vectros key revoke`
67
+ command, the last time you will see the id.
68
+
69
+ ### Changed
70
+
71
+ - The internal `--env` flag is no longer advertised in customer-facing output (help
72
+ text, examples, the post-login hint). It remains fully functional; production is
73
+ the default.
74
+
75
+ ## 0.9.0
76
+
77
+ ### Added
78
+
79
+ - **Ownership scopes across the provisioning verbs.** `role create` gains
80
+ `--data-scope <json>` to confine a role's clause to owned data (e.g.
81
+ `'{"userId":["${{ self.userId }}"]}'` for per-request "records I own", or
82
+ `'{"scope:org":["<orgId>", null]}'` for one org's data plus scope-less records).
83
+ `access grant` and `vectros join` gain `--org <orgId>` (and `access grant` the
84
+ general `--identity-overrides <json>`), placing the principal under an
85
+ organization for the context so its key can write org/team-scoped data — a
86
+ credential can only stamp ownership its identity carries.
87
+ - **`vectros access explain`** — renders what a principal's binding actually
88
+ grants: the clause list plus a concrete access matrix (your private records, a
89
+ teammate's shared records, another team's, scope-less content, …) evaluated
90
+ under the documented matching rules — per-dimension match, AND across a
91
+ clause's keys, UNION across clauses, and the `null` opt-in for scope-less
92
+ items. Answers "who can see what?" before any data exists, and catches the
93
+ classic one-clause mis-authoring that silently denies teammates' shared
94
+ records.
95
+ - **`vectros join` + the multi-principal keyring** — `vectros join <context>
96
+ (--role <r> | --actions <csv>) [--as me|usr_<id>] [--alias <name>]` enrolls a
97
+ principal in a context in one step: it grants the role, issues a scoped key,
98
+ and stores that key as a named keyring entry, then makes it the active
99
+ identity. Several identities can now live side by side. `vectros switch
100
+ <alias>` (or `vectros keyring use <alias>`) flips the active one; `vectros
101
+ keyring list` shows them all with the active one marked; `vectros keyring show
102
+ [--format env|raw]` reveals the active key (e.g. `--format env` prints
103
+ `VECTROS_API_KEY=…` to export into the MCP server); `vectros keyring remove
104
+ <alias>` drops one. Re-joining an alias whose key is still held is idempotent
105
+ (it re-activates without churning the key); it only rotates when the local
106
+ secret is missing.
107
+ - **Keys are encrypted at rest** — keyring secrets are stored AES-256-GCM
108
+ encrypted under a machine-derived key, rather than in plaintext. (An OS-native
109
+ secret store is a planned follow-up for login/hardware-gated protection.)
110
+ - **Bundled blueprints updated to `0.7.0`** — `agentic-sdlc` gains governed agent
111
+ memory (enroll with `vectros join agentic-sdlc --role member`), and the blueprint
112
+ format gains `accessProfile.identityOverrides` + per-seed `scopes`, which
113
+ `bootstrap`/`blueprint-test` apply. **Full detail in the `@vectros-ai/blueprints`
114
+ changelog** — this entry is an overview; the schema, role, and format specifics
115
+ live there.
116
+
117
+ ## 0.8.1 — 2026-07-10
118
+
119
+ ### Changed
120
+
121
+ - **Dependency maintenance** — repinned the bundled `@vectros-ai/sdk` to `0.34.0`
122
+ (additive `scopes` read-back on record/document/folder responses, plus webhooks).
123
+ The CLI bundles the SDK into its published binary, so this is a rebuild against the
124
+ current SDK; no CLI behavior changes.
125
+
126
+ ## 0.8.0
127
+
128
+ ### Added
129
+
130
+ - **Blueprint identity resolution** — a blueprint can now declare a top-level
131
+ `identities:` block (tenant-wide principals: `user`, `org`, or `client`) and reference
132
+ them with `${{ identities.<name> }}` tokens in ownership and data-scope positions
133
+ (schema `userId`/`orgId`/`clientId`, access-profile and role `dataScope`). At apply
134
+ time (`vectros bootstrap` / `vectros blueprint-test`) each declared identity is ensured
135
+ (idempotent by `externalId`) and every token is substituted with the principal's
136
+ resolved id — so a blueprint can provision data owned by, or a credential scoped to,
137
+ specific principals. `vectros blueprint validate` / `plan` accept an identity-using
138
+ blueprint offline (linting that every reference is declared) and defer resolution to
139
+ apply time; the plan preview discloses the identities that will be ensured. Declared
140
+ identities are tenant-global and are never removed by `blueprint-test` teardown.
141
+
6
142
  ## 0.7.0 — 2026-07-08
7
143
 
8
144
  ### Added
package/README.md CHANGED
@@ -3,15 +3,17 @@
3
3
  [![npm](https://img.shields.io/npm/v/@vectros-ai/cli)](https://www.npmjs.com/package/@vectros-ai/cli)
4
4
  [![license](https://img.shields.io/npm/l/@vectros-ai/cli)](https://www.apache.org/licenses/LICENSE-2.0)
5
5
 
6
- The Vectros provisioning CLI — the `vectros` binary. Two command groups:
6
+ The Vectros provisioning CLI — the `vectros` binary:
7
7
 
8
8
  - **`vectros bootstrap`** — provision a least-privilege MCP credential (+ optional blueprint).
9
9
  - **`vectros blueprint`** — author + inspect blueprints (`init` / `validate` / `plan` / `list`), creds-free.
10
10
  - **`vectros blueprint-test`** — apply a blueprint to a live env, assert it provisioned a working credential, then tear it down.
11
+ - **`vectros keyring`** — hold several identities on one machine, pick which is active, and let other tools resolve keys from one place.
11
12
 
12
13
  ```bash
13
14
  npx -y @vectros-ai/cli bootstrap # provision a credential
14
15
  npx -y @vectros-ai/cli blueprint --help # the authoring commands
16
+ npx -y @vectros-ai/cli keyring list # the identities on this machine
15
17
  ```
16
18
 
17
19
  Every command has `--help`. The authoring loop is documented in
@@ -108,6 +110,76 @@ Exit `0` = applied and every assertion passed; `1` = an assertion failed or appl
108
110
  errored; `2` = no credential, or the blueprint requested control-plane scope.
109
111
  The app-context is intentionally **not** deleted (it's idempotent and reused).
110
112
 
113
+ ## `vectros keyring` — one home for your keys
114
+
115
+ A machine can hold several Vectros identities (one per context or principal).
116
+ The keyring stores them as named entries plus one **active** pointer, so you can
117
+ switch between them without re-issuing keys. `vectros join <context>` adds an
118
+ entry and activates it; `vectros switch <alias>` flips the active one.
119
+
120
+ ```bash
121
+ vectros keyring list # the entries; * marks the active one
122
+ vectros switch <alias> # make <alias> active (= keyring use)
123
+ vectros keyring show # the active entry's fields + its key
124
+ vectros keyring show --format raw # JUST the secret, for scripts (see below)
125
+ vectros keyring doctor # is the keyring healthy? which keys are live?
126
+ vectros keyring prune # drop entries whose stored secret is gone
127
+ vectros keyring remove <alias> # drop one entry + its secret
128
+ ```
129
+
130
+ These are local — no network, no auth. The index itself never holds a secret.
131
+
132
+ **Where your keys are kept.** In your **OS credential store** (Windows Credential
133
+ Manager, Linux Secret Service) where one is available, so they are protected by
134
+ your OS login. Where none is — a headless Linux box with no Secret Service, or a
135
+ platform with no prebuilt for the optional native package — the CLI falls back to
136
+ an encrypted file under `~/.vectros/secrets` rather than failing. Be aware of what
137
+ that fallback does and doesn't buy you: it protects a single stray `.enc` file, but
138
+ its encryption key is derived from material stored alongside it, so anyone with a
139
+ copy of your **whole `~/.vectros` directory** can decrypt it. Treat that directory
140
+ as a secret in its own right. `vectros keyring doctor` tells you which store you
141
+ are on and why; `VECTROS_KEYRING_BACKEND=file` forces the fallback (existing keychain keys keep
142
+ working and move back to the file as you use them).
143
+
144
+ On **macOS** the encrypted file is used for now. A Keychain item grants access to
145
+ the application that created it and prompts for anything else — and the
146
+ "application" here is the `node` binary running this CLI, which is not stable
147
+ across installs. We expect that to put a password prompt in the startup path of
148
+ any tool resolving a key unattended, which on a headless host nobody can answer.
149
+ We have not yet verified it on real hardware, and would rather ship the honest
150
+ fallback than a claim we haven't tested.
151
+
152
+ Upgrading from an older CLI needs no action: an existing encrypted secret moves
153
+ into the credential store the first time that key is used.
154
+
155
+ **Resolving a key from another tool.** `keyring show --format raw` prints the bare
156
+ secret and nothing else, which makes it a credential helper in the shape of
157
+ `git credential` / `docker-credential-*` / `aws credential_process`:
158
+
159
+ ```bash
160
+ export VECTROS_API_KEY=$(vectros keyring show --format raw) # active
161
+ export VECTROS_API_KEY=$(vectros keyring show --format raw --alias support-bot) # a specific entry
162
+ ```
163
+
164
+ [`@vectros-ai/mcp-server`](https://www.npmjs.com/package/@vectros-ai/mcp-server)
165
+ does this for you: leave `VECTROS_API_KEY` unset and it resolves the key from
166
+ this keyring, so you don't paste a copy into its config. Exit codes: `0` secret
167
+ printed, `2` no such (or no active) entry, `1` the entry exists but its secret
168
+ can't be read.
169
+
170
+ **When something's off**, `vectros keyring doctor` is the first stop — it shows
171
+ which entry is active, whether each secret is readable, which entries are live
172
+ keys (the ones that act on real data), and which store is holding them, exiting
173
+ non-zero when it finds something to fix.
174
+
175
+ `vectros keyring prune` drops entries whose secret is gone, but only where "gone"
176
+ is knowable — that is, on the encrypted-file store. **Entries kept in the OS
177
+ credential store are never pruned.** That store can't tell us "no such secret"
178
+ apart from "couldn't read it right now", so a locked keychain would otherwise
179
+ look like a keyring full of dead entries; deleting one would throw away the key
180
+ id you need to revoke a key that may still be live. Use
181
+ `vectros keyring remove <alias>` to drop one deliberately.
182
+
111
183
  ## The scope gate (the trust boundary)
112
184
 
113
185
  Blueprints are **untrusted input** (agent- or community-authored) and the
@@ -130,6 +202,13 @@ after the window resets, or split a large blueprint. See the
130
202
  - [`@vectros-ai/mcp-server`](https://www.npmjs.com/package/@vectros-ai/mcp-server) — the runtime this CLI provisions for.
131
203
  - [`@vectros-ai/blueprints`](https://www.npmjs.com/package/@vectros-ai/blueprints) — the curated use-case library the CLI applies.
132
204
 
205
+ ## Security & trust
206
+
207
+ Vectros enforces per-customer, fail-closed isolation and least-privilege scoped keys, with a
208
+ tamper-evident audit and version history. Customer-facing surfaces are hardened through extensive
209
+ adversarial security review. For the full trust posture, drawn plainly with its boundaries, see the
210
+ [compliance and trust guide](https://docs.vectros.ai/guides/operations-trust/compliance).
211
+
133
212
  ## License
134
213
 
135
214
  Apache-2.0. See the LICENSE file.
@@ -0,0 +1,117 @@
1
+ # Third-party notices
2
+
3
+ `@vectros-ai/cli` compiles the following third-party packages directly into its
4
+ published binary (`dist/cli.js`). Their licenses require that these notices travel
5
+ with the code, so they are reproduced in full below.
6
+
7
+ This file is GENERATED by `pipelines/third_party_notices.mjs` from the `noExternal`
8
+ lists in `packages/*/tsup.config.ts`. Do not edit it by hand — run
9
+ `node pipelines/third_party_notices.mjs --write`. CI fails if it is stale, because a
10
+ notices file that silently drifts is worse than none: it asserts a compliance that
11
+ nobody checked.
12
+
13
+ Packages resolved at RUNTIME (ordinary dependencies) are not listed here — the
14
+ consumer's own install carries their licenses.
15
+
16
+ ---
17
+
18
+ ## graceful-fs 4.2.11
19
+
20
+ License: ISC
21
+
22
+ ```
23
+ The ISC License
24
+
25
+ Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
26
+
27
+ Permission to use, copy, modify, and/or distribute this software for any
28
+ purpose with or without fee is hereby granted, provided that the above
29
+ copyright notice and this permission notice appear in all copies.
30
+
31
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
32
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
33
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
34
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
35
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
36
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
37
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
38
+ ```
39
+
40
+ ## proper-lockfile 4.1.2
41
+
42
+ License: MIT
43
+
44
+ ```
45
+ The MIT License (MIT)
46
+
47
+ Copyright (c) 2018 Made With MOXY Lda <hello@moxy.studio>
48
+
49
+ Permission is hereby granted, free of charge, to any person obtaining a copy
50
+ of this software and associated documentation files (the "Software"), to deal
51
+ in the Software without restriction, including without limitation the rights
52
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
53
+ copies of the Software, and to permit persons to whom the Software is
54
+ furnished to do so, subject to the following conditions:
55
+
56
+ The above copyright notice and this permission notice shall be included in
57
+ all copies or substantial portions of the Software.
58
+
59
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
60
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
61
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
62
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
63
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
64
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
65
+ THE SOFTWARE.
66
+ ```
67
+
68
+ ## retry 0.12.0
69
+
70
+ License: MIT
71
+
72
+ ```
73
+ Copyright (c) 2011:
74
+ Tim Koschützki (tim@debuggable.com)
75
+ Felix Geisendörfer (felix@debuggable.com)
76
+
77
+ Permission is hereby granted, free of charge, to any person obtaining a copy
78
+ of this software and associated documentation files (the "Software"), to deal
79
+ in the Software without restriction, including without limitation the rights
80
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
81
+ copies of the Software, and to permit persons to whom the Software is
82
+ furnished to do so, subject to the following conditions:
83
+
84
+ The above copyright notice and this permission notice shall be included in
85
+ all copies or substantial portions of the Software.
86
+
87
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
88
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
89
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
90
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
91
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
92
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
93
+ THE SOFTWARE.
94
+ ```
95
+
96
+ ## signal-exit 3.0.7
97
+
98
+ License: ISC
99
+
100
+ ```
101
+ The ISC License
102
+
103
+ Copyright (c) 2015, Contributors
104
+
105
+ Permission to use, copy, modify, and/or distribute this software
106
+ for any purpose with or without fee is hereby granted, provided
107
+ that the above copyright notice and this permission notice
108
+ appear in all copies.
109
+
110
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
111
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
112
+ OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
113
+ LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
114
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
115
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
116
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
117
+ ```