@openparachute/vault 0.5.0-rc.1 → 0.6.0-rc.1
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 +7 -7
- package/core/src/schema.ts +5 -5
- package/package.json +1 -1
- package/src/auth-hub-jwt.test.ts +1 -1
- package/src/auth-status.ts +2 -2
- package/src/auth.test.ts +2 -2
- package/src/auth.ts +2 -2
- package/src/cli.ts +5 -5
- package/src/init-summary.ts +1 -1
- package/src/mcp-tools.ts +1 -1
- package/src/routes.ts +1 -1
- package/src/routing.test.ts +3 -3
- package/src/routing.ts +1 -1
- package/src/scopes.ts +1 -1
- package/src/token-store.ts +7 -7
- package/src/vault.test.ts +1 -1
package/README.md
CHANGED
|
@@ -99,7 +99,7 @@ The daemon binds `0.0.0.0:1940` (or whatever you set in `PORT`) and serves REST,
|
|
|
99
99
|
|
|
100
100
|
`vault init` asks two explicit questions: (1) install vault as an MCP server in `~/.claude.json`? (2) also surface the access token so you can paste it into other MCP clients (Codex, Goose, OpenCode, Cursor, Zed, Cline), scripts, or `curl`? Both default yes. Pass `--mcp` / `--no-mcp` and `--token` / `--no-token` for non-interactive installs.
|
|
101
101
|
|
|
102
|
-
If you said yes to (2), the hub-issued JWT is printed prominently at the end — it's the same token baked into `~/.claude.json` (if you also said yes to (1)). It's not stored anywhere retrievable — save it if you need it for `curl`, cron, or any other script. Lost it? Mint a fresh one with `parachute auth mint-token --scope vault:<name>:<verb>` (or rewire an MCP client with `parachute-vault mcp-install`, or use the admin SPA Tokens page). As of vault 0.
|
|
102
|
+
If you said yes to (2), the hub-issued JWT is printed prominently at the end — it's the same token baked into `~/.claude.json` (if you also said yes to (1)). It's not stored anywhere retrievable — save it if you need it for `curl`, cron, or any other script. Lost it? Mint a fresh one with `parachute auth mint-token --scope vault:<name>:<verb>` (or rewire an MCP client with `parachute-vault mcp-install`, or use the admin SPA Tokens page). As of vault 0.6.0 (vault#282 Stage 2) vault no longer mints its own `pvt_*` tokens — minting is the hub's job.
|
|
103
103
|
|
|
104
104
|
### OAuth lives on the hub
|
|
105
105
|
|
|
@@ -122,7 +122,7 @@ Two ways to authenticate — pick based on the client, not the deployment:
|
|
|
122
122
|
| **OAuth 2.1 + PKCE (browser flow, via hub)** | Claude Desktop, Parachute Daily, any third-party MCP client set up interactively | Click "Add integration", enter the vault MCP URL, a browser opens to the **hub's** consent page, sign in with hub credentials, done — no token ever touches your clipboard |
|
|
123
123
|
| **Bearer token (hub JWT)** | Claude Code (auto-wired by `vault init`), CLI scripts, cron jobs, any non-interactive caller | `curl -H "Authorization: Bearer <hub-jwt>"` — mint one with `parachute-vault mcp-install` (MCP clients) or `parachute auth mint-token --scope vault:<name>:<verb>` (scripts) |
|
|
124
124
|
|
|
125
|
-
As of 0.
|
|
125
|
+
As of 0.6.0 (vault#282 Stage 2) vault is a **pure hub resource-server**: both paths use a hub-signed JWT that vault validates against the hub's JWKS. (The OAuth path is the interactive browser handshake; the bearer path mints the same kind of JWT non-interactively.) The old vault-local `pvt_*` opaque token was dropped — vault no longer mints or accepts it. The server-wide `VAULT_AUTH_TOKEN` operator bearer remains for the no-granular-auth / cross-container path.
|
|
126
126
|
|
|
127
127
|
### Claude Code
|
|
128
128
|
|
|
@@ -219,7 +219,7 @@ parachute-vault 2fa backup-codes # regenerate backup codes
|
|
|
219
219
|
# Tokens — vault#282 Stage 2: vault no longer mints its own tokens. Mint a
|
|
220
220
|
# hub JWT with `parachute-vault mcp-install` (MCP clients) or
|
|
221
221
|
# `parachute auth mint-token --scope vault:<name>:<verb>` (scripts).
|
|
222
|
-
parachute-vault tokens # list any vestigial pre-0.
|
|
222
|
+
parachute-vault tokens # list any vestigial pre-0.6.0 token rows (all vaults)
|
|
223
223
|
parachute-vault tokens revoke <token-id> # revoke a vestigial row (default vault; add --vault to target)
|
|
224
224
|
|
|
225
225
|
# Obsidian
|
|
@@ -531,7 +531,7 @@ The SSG / sync pattern. Two equivalent forms — bracket-style is canonical goin
|
|
|
531
531
|
curl -H "Authorization: Bearer $VAULT_TOKEN" \
|
|
532
532
|
"http://localhost:1940/vault/default/api/notes?meta[updated_at][gte]=2026-04-01T00:00:00Z"
|
|
533
533
|
|
|
534
|
-
# Flat form (DEPRECATED in 0.4.3; planned removal
|
|
534
|
+
# Flat form (DEPRECATED in 0.4.3; planned removal 0.6.0 per vault#288)
|
|
535
535
|
curl -H "Authorization: Bearer $VAULT_TOKEN" \
|
|
536
536
|
"http://localhost:1940/vault/default/api/notes?date_field=updated_at&date_from=2026-04-01T00:00:00Z"
|
|
537
537
|
```
|
|
@@ -704,13 +704,13 @@ For wiring up an AI client (Claude Code, Claude Desktop, Parachute Daily), see [
|
|
|
704
704
|
|
|
705
705
|
### Passing the key
|
|
706
706
|
|
|
707
|
-
As of 0.
|
|
707
|
+
As of 0.6.0 (vault#282 Stage 2) vault accepts these bearers at every authenticated endpoint:
|
|
708
708
|
|
|
709
709
|
- **Hub-issued JWT** (`eyJ...`) — the user-credential path; what OAuth issues and what `parachute-vault mcp-install` / `parachute auth mint-token` produce. Audience-bound to `vault.<name>`, scope-narrowed (`vault:<name>:<verb>`).
|
|
710
710
|
- **`VAULT_AUTH_TOKEN`** — the server-wide operator bearer (env var; full-admin against any vault on the server).
|
|
711
711
|
- **`pvk_...`** — legacy global API keys from `config.yaml` / per-vault `vault.yaml` (still honored for existing deployments).
|
|
712
712
|
|
|
713
|
-
The old vault-local `pvt_*` opaque token was **dropped at 0.
|
|
713
|
+
The old vault-local `pvt_*` opaque token was **dropped at 0.6.0** — vault no longer mints or accepts it.
|
|
714
714
|
|
|
715
715
|
```bash
|
|
716
716
|
# Header (preferred)
|
|
@@ -742,7 +742,7 @@ Two permission levels carry through the JWT scope verb:
|
|
|
742
742
|
| `read` | Query, list, find-path, vault-info only |
|
|
743
743
|
|
|
744
744
|
`parachute-vault tokens list` / `tokens revoke` remain only to clean up any
|
|
745
|
-
vestigial pre-0.
|
|
745
|
+
vestigial pre-0.6.0 rows. Legacy `pvk_...` keys from config.yaml still work at
|
|
746
746
|
runtime; the `vault keys` CLI commands were removed long ago.
|
|
747
747
|
|
|
748
748
|
### Public endpoints
|
package/core/src/schema.ts
CHANGED
|
@@ -96,7 +96,7 @@ CREATE TABLE IF NOT EXISTS indexed_fields (
|
|
|
96
96
|
|
|
97
97
|
-- Tokens: API authentication with OAuth-standard scopes.
|
|
98
98
|
--
|
|
99
|
-
-- VESTIGIAL as of 0.
|
|
99
|
+
-- VESTIGIAL as of 0.6.0 (vault#282 Stage 2). Vault is a pure hub
|
|
100
100
|
-- resource-server: it no longer mints (pvt_*) or validates rows in this
|
|
101
101
|
-- table — auth runs through hub-issued JWTs + VAULT_AUTH_TOKEN + legacy YAML
|
|
102
102
|
-- api_keys only. The table is KEPT (not dropped) because migrateVaultKeys
|
|
@@ -105,7 +105,7 @@ CREATE TABLE IF NOT EXISTS indexed_fields (
|
|
|
105
105
|
-- leftover rows. A future cosmetic migration may drop it alongside
|
|
106
106
|
-- oauth_clients/oauth_codes. 'tokens list' / 'tokens revoke' (CLI) still
|
|
107
107
|
-- read/delete here for cleanup of leftover rows. See the field docs below for
|
|
108
|
-
-- the historical (pre-0.
|
|
108
|
+
-- the historical (pre-0.6.0) semantics.
|
|
109
109
|
--
|
|
110
110
|
-- scopes is a whitespace-separated list of granted scopes (OAuth 2.0 §3.3)
|
|
111
111
|
-- — e.g. "vault:read vault:write". Introduced in v12 alongside enforcement;
|
|
@@ -140,7 +140,7 @@ CREATE TABLE IF NOT EXISTS indexed_fields (
|
|
|
140
140
|
-- session. Session-pinned list+revoke in manage-token filters on this.
|
|
141
141
|
--
|
|
142
142
|
-- revoked_at (v19) marked soft-revocation of vault-DB tokens. Vestigial
|
|
143
|
-
-- post-0.
|
|
143
|
+
-- post-0.6.0 (vault#282 Stage 2) — the validation path that read it
|
|
144
144
|
-- (resolveToken) was removed alongside the pvt_* mint.
|
|
145
145
|
CREATE TABLE IF NOT EXISTS tokens (
|
|
146
146
|
token_hash TEXT PRIMARY KEY,
|
|
@@ -420,7 +420,7 @@ export function initSchema(db: Database): void {
|
|
|
420
420
|
// Migrate v15 → v16: add `vault_name` column to tokens. Existing rows
|
|
421
421
|
// backfilled to NULL ("server-wide / legacy" semantic) — at the time auth
|
|
422
422
|
// accepted NULL for any vault so pre-v16 pvt_* tokens kept working. (pvt_*
|
|
423
|
-
// validation was dropped at 0.
|
|
423
|
+
// validation was dropped at 0.6.0 / vault#282 Stage 2; the column is now
|
|
424
424
|
// vestigial.) See vault#257.
|
|
425
425
|
migrateToV16(db);
|
|
426
426
|
|
|
@@ -852,7 +852,7 @@ function migrateToV15(db: Database): void {
|
|
|
852
852
|
* "server-wide / legacy" semantic. At the time, `authenticateVaultRequest`
|
|
853
853
|
* accepted NULL for any vault so pre-v16 pvt_* tokens kept working. (pvt_*
|
|
854
854
|
* validation + the `/vault/<name>/tokens` mint route were both removed at
|
|
855
|
-
* 0.
|
|
855
|
+
* 0.6.0 / vault#282 Stage 2 — the column + index are now vestigial; the
|
|
856
856
|
* index still speeds the per-vault `listTokens` cleanup listing.)
|
|
857
857
|
*
|
|
858
858
|
* Wrapped in BEGIN IMMEDIATE / COMMIT (with try/catch ROLLBACK) per the
|
package/package.json
CHANGED
package/src/auth-hub-jwt.test.ts
CHANGED
|
@@ -668,7 +668,7 @@ describe("authenticateVaultRequest — hub JWT tag-scoping (auth-unification C0)
|
|
|
668
668
|
|
|
669
669
|
// ---------------------------------------------------------------------------
|
|
670
670
|
// pvt_* DROP (vault#282 Stage 2 — BREAKING). pvt_* tokens were the only
|
|
671
|
-
// non-JWT, non-YAML credential vault used to mint + validate. At 0.
|
|
671
|
+
// non-JWT, non-YAML credential vault used to mint + validate. At 0.6.0 the
|
|
672
672
|
// mint + validation were removed entirely: a pvt_*-prefixed bearer is no
|
|
673
673
|
// longer JWT-shaped (skips authenticateHubJwt) and matches no surviving
|
|
674
674
|
// credential, so it 401s. The hub JWT — the migration target — keeps working.
|
package/src/auth-status.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* What gets exposed:
|
|
10
10
|
* - `initialized` — at least one vault exists
|
|
11
|
-
* - `auth_modes` — accepted bearer formats. As of 0.
|
|
11
|
+
* - `auth_modes` — accepted bearer formats. As of 0.6.0 (vault#282 Stage 2)
|
|
12
12
|
* vault is a pure hub resource-server: the only first-class user
|
|
13
13
|
* credential is a hub-issued JWT, so this is `["hub_jwt"]`. (The
|
|
14
14
|
* server-wide VAULT_AUTH_TOKEN operator bearer + legacy YAML api_keys
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* - `vaults` — list of `{ name, url }` for client-side dispatch
|
|
18
18
|
* - `hasOwnerPassword`, `hasTotp` — OAuth consent prerequisites
|
|
19
19
|
* - `hasTokens` — boolean | null. Probes the vestigial `tokens` table for
|
|
20
|
-
* any leftover pre-0.
|
|
20
|
+
* any leftover pre-0.6.0 rows (the table is kept inert as the YAML-import
|
|
21
21
|
* landing zone + a future-cosmetic-drop target). `null` ≈ "we couldn't
|
|
22
22
|
* read all DBs, don't trust this answer"; `true`/`false` are honest yes/no.
|
|
23
23
|
*
|
package/src/auth.test.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auth invariants — vault as a pure hub resource-server (vault#282 Stage 2).
|
|
3
3
|
*
|
|
4
|
-
* The `pvt_*` opaque vault-DB token was dropped at 0.
|
|
4
|
+
* The `pvt_*` opaque vault-DB token was dropped at 0.6.0: vault no longer
|
|
5
5
|
* mints or validates it. The surviving auth surfaces tested here are:
|
|
6
6
|
* - VAULT_AUTH_TOKEN — the server-wide operator bearer.
|
|
7
7
|
* - Legacy YAML api_keys (vault.yaml / config.yaml) — hashed keys.
|
|
@@ -91,7 +91,7 @@ describe("auth — pvt_* tokens are unvalidatable (fail closed)", () => {
|
|
|
91
91
|
// API key" a non-pvt_ bad token gets) — the prefix is the user-meaningful
|
|
92
92
|
// signal that the mechanism was dropped, not that the key was mistyped.
|
|
93
93
|
const PVT_MESSAGE =
|
|
94
|
-
"pvt_* tokens are no longer supported (vault 0.
|
|
94
|
+
"pvt_* tokens are no longer supported (vault 0.6.0). Re-add this vault via your hub to get an access token.";
|
|
95
95
|
|
|
96
96
|
test("a pvt_* bearer is 401-rejected with the dropped-token message on the per-vault surface", async () => {
|
|
97
97
|
seedVault("journal");
|
package/src/auth.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Authentication and authorization for the vault server.
|
|
3
3
|
*
|
|
4
|
-
* As of 0.
|
|
4
|
+
* As of 0.6.0 vault is a PURE HUB RESOURCE-SERVER (vault#282 Stage 2). The
|
|
5
5
|
* opaque `pvt_*` vault-DB token was dropped — vault no longer mints or
|
|
6
6
|
* validates it. Three auth paths survive:
|
|
7
7
|
*
|
|
@@ -310,7 +310,7 @@ function droppedPvtTokenResponse(): Response {
|
|
|
310
310
|
{
|
|
311
311
|
error: "Unauthorized",
|
|
312
312
|
message:
|
|
313
|
-
"pvt_* tokens are no longer supported (vault 0.
|
|
313
|
+
"pvt_* tokens are no longer supported (vault 0.6.0). Re-add this vault via your hub to get an access token.",
|
|
314
314
|
},
|
|
315
315
|
{ status: 401 },
|
|
316
316
|
);
|
package/src/cli.ts
CHANGED
|
@@ -1586,15 +1586,15 @@ function cmdTokens(args: string[]) {
|
|
|
1586
1586
|
return;
|
|
1587
1587
|
}
|
|
1588
1588
|
|
|
1589
|
-
// `tokens create` was removed at 0.
|
|
1589
|
+
// `tokens create` was removed at 0.6.0 (vault#282 Stage 2). Vault no longer
|
|
1590
1590
|
// mints its own (pvt_*) tokens — it's a pure hub resource-server. Tokens are
|
|
1591
1591
|
// now hub-issued JWTs: run `parachute-vault mcp-install` to mint + wire one
|
|
1592
1592
|
// for an MCP client, or `parachute auth mint-token --scope vault:<name>:<verb>`
|
|
1593
1593
|
// for scripts. `tokens list` / `tokens revoke` remain for cleaning up any
|
|
1594
|
-
// vestigial pre-0.
|
|
1594
|
+
// vestigial pre-0.6.0 rows.
|
|
1595
1595
|
if (subcmd === "create") {
|
|
1596
1596
|
console.error(
|
|
1597
|
-
"`parachute-vault tokens create` was removed at 0.
|
|
1597
|
+
"`parachute-vault tokens create` was removed at 0.6.0 — vault no longer mints its own tokens.\n" +
|
|
1598
1598
|
" Mint a hub-issued JWT instead:\n" +
|
|
1599
1599
|
" parachute-vault mcp-install --scope vault:<verb> # wire an MCP client\n" +
|
|
1600
1600
|
" parachute auth mint-token --scope vault:<name>:<verb> # for scripts\n" +
|
|
@@ -3359,7 +3359,7 @@ async function createVault(name: string): Promise<VaultCredential> {
|
|
|
3359
3359
|
writeVaultConfig(config);
|
|
3360
3360
|
|
|
3361
3361
|
// Touch the store so the vault's SQLite DB + schema are created. No token
|
|
3362
|
-
// row is written — vault is a pure hub resource-server post-0.
|
|
3362
|
+
// row is written — vault is a pure hub resource-server post-0.6.0.
|
|
3363
3363
|
getVaultStore(name);
|
|
3364
3364
|
return mintBootstrapCredential(name);
|
|
3365
3365
|
}
|
|
@@ -3539,7 +3539,7 @@ Vaults:
|
|
|
3539
3539
|
Tokens (vault#282 Stage 2 — vault is a pure hub resource-server; it no longer
|
|
3540
3540
|
mints its own tokens. Mint a hub-issued JWT with \`parachute-vault mcp-install\`
|
|
3541
3541
|
or \`parachute auth mint-token --scope vault:<name>:<verb>\`. \`list\` / \`revoke\`
|
|
3542
|
-
below operate on any vestigial pre-0.
|
|
3542
|
+
below operate on any vestigial pre-0.6.0 rows for cleanup.):
|
|
3543
3543
|
parachute-vault tokens List vault-DB tokens (every vault)
|
|
3544
3544
|
parachute-vault tokens list --vault <name> List tokens for one vault only
|
|
3545
3545
|
parachute-vault tokens revoke <token-id> Revoke a vestigial token (default vault)
|
package/src/init-summary.ts
CHANGED
|
@@ -23,7 +23,7 @@ export type InitSummaryInput = {
|
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Build the post-install summary lines for `vault init`, branched on the
|
|
26
|
-
* (addMcp, addToken, apiKey) decision matrix. Post-0.
|
|
26
|
+
* (addMcp, addToken, apiKey) decision matrix. Post-0.6.0 the token is a
|
|
27
27
|
* hub-issued JWT minted via operator.token; when no hub is reachable `apiKey`
|
|
28
28
|
* is undefined even though the operator opted in (`addToken`/`addMcp`):
|
|
29
29
|
*
|
package/src/mcp-tools.ts
CHANGED
|
@@ -463,7 +463,7 @@ function resolveHubOrigin(): { url: string; source: string } {
|
|
|
463
463
|
*
|
|
464
464
|
* After the auth-unification arc (vault#403, MGT) the tool is a thin proxy to
|
|
465
465
|
* hub's mint-token attenuation endpoint: it mints short-TTL HUB JWTs. The
|
|
466
|
-
* `pvt_*` vault-DB mint infra it replaced was removed at 0.
|
|
466
|
+
* `pvt_*` vault-DB mint infra it replaced was removed at 0.6.0 (vault#282
|
|
467
467
|
* Stage 2 — vault is a pure hub resource-server).
|
|
468
468
|
*
|
|
469
469
|
* Closure-captured context:
|
package/src/routes.ts
CHANGED
|
@@ -564,7 +564,7 @@ async function handleNotesInner(
|
|
|
564
564
|
//
|
|
565
565
|
// - **Flat date params** (DEPRECATED): `?date_field=created_at&
|
|
566
566
|
// date_from=…&date_to=…` and the legacy `?date_from=…&date_to=…`.
|
|
567
|
-
// Still functional through 0.5.x; planned removal in
|
|
567
|
+
// Still functional through 0.5.x; planned removal in 0.6.0
|
|
568
568
|
// (vault#288). New consumers should use bracket-style.
|
|
569
569
|
//
|
|
570
570
|
// Precedence on overlap: bracket-style wins. If a caller passes both
|
package/src/routing.test.ts
CHANGED
|
@@ -100,8 +100,8 @@ function createVault(name: string, description?: string): void {
|
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
* Seed a vestigial row directly into a vault's `tokens` table (raw INSERT).
|
|
103
|
-
* Post-0.
|
|
104
|
-
* survives + `/auth/status` probes it for leftover pre-0.
|
|
103
|
+
* Post-0.6.0 (vault#282 Stage 2) vault no longer mints these, but the table
|
|
104
|
+
* survives + `/auth/status` probes it for leftover pre-0.6.0 rows. This is how
|
|
105
105
|
* we exercise the `hasTokens=true` branch now that there's no mint path.
|
|
106
106
|
*/
|
|
107
107
|
function seedVestigialTokenRow(vaultName: string): void {
|
|
@@ -114,7 +114,7 @@ function seedVestigialTokenRow(vaultName: string): void {
|
|
|
114
114
|
/**
|
|
115
115
|
* Seed a vestigial tag-scoped row (raw INSERT, `scoped_tags` JSON populated).
|
|
116
116
|
* The tag-delete / -rename / -merge fail-closed guard (`findTokensReferencingTag`)
|
|
117
|
-
* reads this column. Post-0.
|
|
117
|
+
* reads this column. Post-0.6.0 hub-JWT tag scopes live in the JWT claim, not
|
|
118
118
|
* the DB, so the guard now protects only these vestigial rows — these tests
|
|
119
119
|
* pin that the DB-row guard still fires.
|
|
120
120
|
*/
|
package/src/routing.ts
CHANGED
|
@@ -463,7 +463,7 @@ export async function route(
|
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
// The per-vault `/tokens` REST surface (pvt_* mint/list/revoke) was removed
|
|
466
|
-
// at 0.
|
|
466
|
+
// at 0.6.0 (vault#282 Stage 2 — vault is a pure hub resource-server). Hub
|
|
467
467
|
// JWTs are minted via hub's registry (`/api/auth/mint-token`); a `/tokens`
|
|
468
468
|
// request now falls through to the catch-all 404 below.
|
|
469
469
|
|
package/src/scopes.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* VAULT_AUTH_TOKEN operator bearer, which are vault-pinned by context
|
|
8
8
|
* (the YAML key lives under a specific vault; the operator bearer is
|
|
9
9
|
* server-wide full-admin). (The `pvt_*` vault-DB token that also used
|
|
10
|
-
* this shape was dropped at 0.
|
|
10
|
+
* this shape was dropped at 0.6.0 — vault#282 Stage 2.)
|
|
11
11
|
* - **Narrowed** `vault:<name>:<verb>` — used by hub-issued JWTs, which are
|
|
12
12
|
* not pinned by storage and so MUST name the resource they grant access
|
|
13
13
|
* to. Hub JWTs carrying broad `vault:<verb>` are rejected at validation
|
package/src/token-store.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Token operations for the per-vault `tokens` table.
|
|
3
3
|
*
|
|
4
|
-
* VESTIGIAL as of 0.
|
|
4
|
+
* VESTIGIAL as of 0.6.0 (vault#282 Stage 2). Vault is a pure hub
|
|
5
5
|
* resource-server: it no longer mints (`pvt_*`) or validates rows in this
|
|
6
6
|
* table. What survives here:
|
|
7
7
|
* - `listTokens` / `revokeToken` / `findTokensReferencingTag` — read/clean up
|
|
8
|
-
* any leftover pre-0.
|
|
8
|
+
* any leftover pre-0.6.0 rows.
|
|
9
9
|
* - `migrateVaultKeys` — the legacy-YAML-api_keys import landing zone (raw
|
|
10
10
|
* INSERT; the only writer left).
|
|
11
11
|
* - the `mcp_mint_ledger` helpers — hub-JWT attribution for manage-token.
|
|
12
12
|
*
|
|
13
|
-
* The `Token`/field docs below describe the historical (pre-0.
|
|
13
|
+
* The `Token`/field docs below describe the historical (pre-0.6.0) auth
|
|
14
14
|
* semantics for the surviving read/cleanup paths; no validation path reads
|
|
15
15
|
* `scoped_tags` / `vault_name` off these rows anymore.
|
|
16
16
|
*
|
|
@@ -76,13 +76,13 @@ export interface Token {
|
|
|
76
76
|
/**
|
|
77
77
|
* Session pin (v19). When this token was minted via manage-token, this
|
|
78
78
|
* is the hub JWT's jti claim of the minting session. NULL otherwise.
|
|
79
|
-
* (Vestigial post-0.
|
|
79
|
+
* (Vestigial post-0.6.0 — no new rows are written; vault no longer mints
|
|
80
80
|
* vault-DB tokens. See vault#282 Stage 2.)
|
|
81
81
|
*/
|
|
82
82
|
parent_jti: string | null;
|
|
83
83
|
/**
|
|
84
84
|
* Soft-revoke timestamp (v19). Marked the row revoked while keeping it in
|
|
85
|
-
* place for audit history. Vestigial post-0.
|
|
85
|
+
* place for audit history. Vestigial post-0.6.0 (vault#282 Stage 2) — no
|
|
86
86
|
* validation path reads these rows anymore. NULL = active.
|
|
87
87
|
*/
|
|
88
88
|
revoked_at: string | null;
|
|
@@ -110,9 +110,9 @@ export function parseScopedTags(raw: string | null): string[] | null {
|
|
|
110
110
|
// Token operations
|
|
111
111
|
//
|
|
112
112
|
// vault#282 Stage 2: the pvt_* mint (`generateToken` / `createToken`) and
|
|
113
|
-
// validation (`resolveToken`) were removed at 0.
|
|
113
|
+
// validation (`resolveToken`) were removed at 0.6.0 — vault is a pure hub
|
|
114
114
|
// resource-server and no longer issues or accepts opaque vault-DB tokens.
|
|
115
|
-
// What survives: `listTokens` / `revokeToken` (cleanup of vestigial pre-0.
|
|
115
|
+
// What survives: `listTokens` / `revokeToken` (cleanup of vestigial pre-0.6.0
|
|
116
116
|
// rows), the YAML-import landing zone (`migrateVaultKeys`, raw INSERT), and the
|
|
117
117
|
// `mcp_mint_ledger` machinery (hub-JWT attribution for manage-token).
|
|
118
118
|
// ---------------------------------------------------------------------------
|
package/src/vault.test.ts
CHANGED
|
@@ -1382,7 +1382,7 @@ describe("scoped MCP wrapper", async () => {
|
|
|
1382
1382
|
await store.createNote("h", { tags: ["health"] });
|
|
1383
1383
|
|
|
1384
1384
|
// Seed a vestigial tag-scoped row referencing "health" (raw INSERT —
|
|
1385
|
-
// vault no longer mints these post-0.
|
|
1385
|
+
// vault no longer mints these post-0.6.0, but findTokensReferencingTag
|
|
1386
1386
|
// still guards the tag-delete path against leftover rows). vault#282.
|
|
1387
1387
|
store.db
|
|
1388
1388
|
.prepare(
|