@veilio-inc/cli 0.5.4 → 0.6.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.
Files changed (69) hide show
  1. package/README.md +62 -15
  2. package/dist/args.d.ts +20 -2
  3. package/dist/args.d.ts.map +1 -1
  4. package/dist/args.js +48 -3
  5. package/dist/args.js.map +1 -1
  6. package/dist/client/index.d.ts +9 -0
  7. package/dist/client/index.d.ts.map +1 -0
  8. package/dist/client/index.js +13 -0
  9. package/dist/client/index.js.map +1 -0
  10. package/dist/client/keys.d.ts +22 -0
  11. package/dist/client/keys.d.ts.map +1 -0
  12. package/dist/client/keys.js +170 -0
  13. package/dist/client/keys.js.map +1 -0
  14. package/dist/client/maps.d.ts +115 -0
  15. package/dist/client/maps.d.ts.map +1 -0
  16. package/dist/client/maps.js +798 -0
  17. package/dist/client/maps.js.map +1 -0
  18. package/dist/client/personal-maps-key.d.ts +42 -0
  19. package/dist/client/personal-maps-key.d.ts.map +1 -0
  20. package/dist/client/personal-maps-key.js +168 -0
  21. package/dist/client/personal-maps-key.js.map +1 -0
  22. package/dist/client/project-scope.d.ts +87 -0
  23. package/dist/client/project-scope.d.ts.map +1 -0
  24. package/dist/client/project-scope.js +132 -0
  25. package/dist/client/project-scope.js.map +1 -0
  26. package/dist/client/projects.d.ts +53 -0
  27. package/dist/client/projects.d.ts.map +1 -0
  28. package/dist/client/projects.js +129 -0
  29. package/dist/client/projects.js.map +1 -0
  30. package/dist/client/status.d.ts +21 -0
  31. package/dist/client/status.d.ts.map +1 -0
  32. package/dist/client/status.js +71 -0
  33. package/dist/client/status.js.map +1 -0
  34. package/dist/client/team-key-bootstrap.d.ts +55 -0
  35. package/dist/client/team-key-bootstrap.d.ts.map +1 -0
  36. package/dist/client/team-key-bootstrap.js +127 -0
  37. package/dist/client/team-key-bootstrap.js.map +1 -0
  38. package/dist/client/vault-key.d.ts +5 -0
  39. package/dist/client/vault-key.d.ts.map +1 -0
  40. package/dist/client/vault-key.js +35 -0
  41. package/dist/client/vault-key.js.map +1 -0
  42. package/dist/client/wording.d.ts +62 -0
  43. package/dist/client/wording.d.ts.map +1 -0
  44. package/dist/client/wording.js +358 -0
  45. package/dist/client/wording.js.map +1 -0
  46. package/dist/cloud-commands.d.ts +34 -43
  47. package/dist/cloud-commands.d.ts.map +1 -1
  48. package/dist/cloud-commands.js +282 -466
  49. package/dist/cloud-commands.js.map +1 -1
  50. package/dist/cloud.d.ts +101 -2
  51. package/dist/cloud.d.ts.map +1 -1
  52. package/dist/cloud.js +91 -7
  53. package/dist/cloud.js.map +1 -1
  54. package/dist/commands.d.ts +14 -1
  55. package/dist/commands.d.ts.map +1 -1
  56. package/dist/commands.js +24 -0
  57. package/dist/commands.js.map +1 -1
  58. package/dist/credential.d.ts +7 -0
  59. package/dist/credential.d.ts.map +1 -1
  60. package/dist/credential.js +10 -1
  61. package/dist/credential.js.map +1 -1
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +24 -5
  64. package/dist/index.js.map +1 -1
  65. package/dist/team-namespace.d.ts +74 -2
  66. package/dist/team-namespace.d.ts.map +1 -1
  67. package/dist/team-namespace.js +78 -18
  68. package/dist/team-namespace.js.map +1 -1
  69. package/package.json +4 -3
package/README.md CHANGED
@@ -44,9 +44,14 @@ veilio maps list # ids, scope and symbol counts for everything in
44
44
  veilio maps pull <id> # decrypt locally, write second — never a partial write
45
45
  veilio maps push [name] # upload the local map under a new Cloud name
46
46
  veilio maps push --team [name] # publish it as the team's shared map instead
47
+ veilio maps update <id> # replace a Cloud map's entries with the local map's, in place
47
48
  veilio maps rm <id> # remove a map from Cloud
49
+ veilio projects # the projects your team works in; * marks the one in use
50
+ veilio projects use <name> # work in that project (kept with the sign-in)
48
51
  veilio team unlock # open the team key with your vault passphrase (kept 7 days)
49
52
  veilio team lock # remove the unlocked team key from this machine
53
+ veilio vault unlock # keep the personal-maps key here (7 days), for the MCP server
54
+ veilio vault lock # remove it from this machine
50
55
  veilio rules pull # fetch your custom rules; scrub then applies them offline
51
56
  veilio logout # revokes server-side, then removes the local credential
52
57
  ```
@@ -61,16 +66,52 @@ derives the key here, on your machine — the passphrase and the key never
61
66
  leave it. A team map is sealed under the team key, which the server cannot
62
67
  read either; `veilio team unlock` opens it here with your vault passphrase.
63
68
 
64
- **Creating and removing a shared map are here; replacing one is not.** There is
65
- no `maps update --team`, and that is a decision rather than a gap. Replacing the
66
- contents of a map teammates already rely on changes what their placeholders
67
- mean after they have sent text using them — the old meaning is what their
68
- `restore` still needs, and nothing in a shared map records which version a given
69
- piece of text was masked under. Publish a new map and remove the old one when
70
- you are sure nobody is still restoring against it. Cloud does have a route that
71
- rewrites a team map's contents, used by key rotation to re-seal the same pairs
72
- under a new key; it exists for that one purpose and does not change what any
73
- placeholder means.
69
+ **Updating a map in place.** `veilio maps update <id>` replaces a Cloud map's
70
+ entries with the local map's and keeps its id, name and project, so refreshing a
71
+ map never leaves a second copy behind. Before anything is sent it refuses, and
72
+ says why:
73
+
74
+ - an update that would **drop entries** the Cloud map holds (a placeholder the
75
+ local map lacks, or gives another name), with the count, unless you pass
76
+ `--allow-drop` - text masked under the old meaning still depends on it;
77
+ - for a team map, a placeholder that **another team map** gives a different
78
+ name - publishing it would leave it unrestorable for every member;
79
+ - a **teammate's map** - only its publisher updates or removes it.
80
+
81
+ The server refuses the rest: a team that owes a key change, and a map that
82
+ changed in Cloud since it was read (two writers never silently overwrite each
83
+ other). A team map is sealed with the team's current key; a personal map with
84
+ the personal-maps key.
85
+
86
+ **Projects.** A team map belongs to one project. `veilio projects use <name>`
87
+ chooses the one this sign-in works in: listing, pushing, updating and
88
+ `scrub --team` then use that project's team maps only, and the MCP server uses
89
+ the same choice. With none chosen, team maps of every project are used.
90
+
91
+ **`VEILIO_PROJECT`.** Set to a project's name or id, it overrides the stored
92
+ choice for that process only, and is never written down. That is what a CI job
93
+ needs: a runner starts clean, with no `projects use` behind it.
94
+
95
+ ```sh
96
+ VEILIO_PROJECT=billing veilio scrub src/ledger.ts
97
+ ```
98
+
99
+ The order is `VEILIO_PROJECT`, then the stored choice, then none. An empty
100
+ value counts as unset. A value that names no project your team works in, or a
101
+ name two projects share, is refused, naming the value: nothing falls back to
102
+ the stored choice or the default, and `scrub` and `restore` refuse rather than
103
+ number from the local map. Lines that name the project say so, as in "team maps
104
+ of project billing (from VEILIO_PROJECT)". `veilio projects` marks the one the
105
+ variable picked, and `veilio projects use` still stores a choice, but warns that
106
+ the variable overrides it in that shell. Signed out, it changes nothing.
107
+
108
+ **The personal-maps key.** `veilio vault unlock` asks for the vault passphrase
109
+ once and keeps, on this machine, only a key that opens personal maps - not the
110
+ passphrase, not the vault key, which also unlocks your team keys. The first time,
111
+ it creates that key and stores it in Cloud wrapped under your vault key, where
112
+ the server cannot read it; it also re-seals older personal maps under it. Then
113
+ `maps pull`, `push` and `update` - and the MCP server - open personal maps
114
+ without a passphrase. Without it, the CLI asks for the passphrase as before.
74
115
 
75
116
  Custom rules (whitelist and replace, set in the web app) are applied by
76
117
  `scrub` from a local copy that `veilio rules pull` writes to
@@ -78,9 +119,11 @@ Custom rules (whitelist and replace, set in the web app) are applied by
78
119
  offline - and says on every run how many rules it applied and how old the copy
79
120
  is. Pull again after the rules change; `logout` removes the copy.
80
121
 
81
- Three files, all `0600`, all under `~/.veilio/`: `credential.json` (the session,
82
- removed by `logout`), `rules.json` (the rules copy) and `team-keys.json` (the
83
- keys `team unlock` opened, kept seven days).
122
+ Four files, all `0600`, all under `~/.veilio/`: `credential.json` (the session
123
+ and the chosen project, removed by `logout`), `rules.json` (the rules copy),
124
+ `team-keys.json` (the keys `team unlock` opened, kept seven days) and
125
+ `personal-maps-key.json` (the key `vault unlock` opened, kept seven days). `logout`
126
+ removes all of them.
84
127
 
85
128
  ### Scrubbing with the team's numbering
86
129
 
@@ -116,8 +159,8 @@ with the real names:
116
159
  - **The counts are this project's.** "Restored 8 of 9" is measured against your
117
160
  own map, not against a team namespace of four hundred entries.
118
161
 
119
- The map commands are clients of `GET /api/maps`, `GET /api/maps/:id` and
120
- `POST /api/maps` — the exact same routes the browser uses, behind the exact
162
+ The map commands are clients of `GET /api/maps`, `GET /api/maps/:id`,
163
+ `POST /api/maps` and `PATCH /api/maps/:id` — the exact same routes the browser uses, behind the exact
121
164
  same entitlement check. There is no CLI-shaped API and nothing here can reach
122
165
  a plan feature the web app couldn't.
123
166
 
@@ -134,6 +177,10 @@ a plan feature the web app couldn't.
134
177
  nothing and exit 1 if a placeholder would be left
135
178
  --keep-docs restore: keep JSDoc blocks the model wrote
136
179
  -f, --force Allow a map write that would drop existing entries
180
+ --days <n> vault unlock, team unlock: keep the key for n days
181
+ (1 to 30; 7 by default)
182
+ --allow-drop maps update: allow dropping entries the Cloud map has
183
+ and the local map does not
137
184
  --device login: sign in through a browser instead of typing a
138
185
  password here. Required for an SSO-bound account, and
139
186
  used automatically when the instance asks for a CAPTCHA
package/dist/args.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type LanguageOption } from '@veilio-inc/engine';
2
2
  import type { SecretPolicy } from '@veilio-inc/engine';
3
- export type Command = 'scrub' | 'restore' | 'scan' | 'map' | 'login' | 'logout' | 'whoami' | 'maps' | 'team' | 'rules' | 'help' | 'version';
3
+ export type Command = 'scrub' | 'restore' | 'scan' | 'map' | 'login' | 'logout' | 'whoami' | 'maps' | 'team' | 'vault' | 'projects' | 'rules' | 'help' | 'version';
4
4
  export interface ParsedArgs {
5
5
  command: Command;
6
6
  /** Positional file paths. Empty means read stdin (or, for `scan`, error). */
@@ -49,7 +49,14 @@ export interface ParsedArgs {
49
49
  * reads like they are the same thing. `maps <verb>` keeps the cloud surface
50
50
  * visibly separate from the offline one.
51
51
  */
52
- mapsAction: 'list' | 'pull' | 'push' | 'rm' | null;
52
+ mapsAction: 'list' | 'pull' | 'push' | 'update' | 'rm' | null;
53
+ /**
54
+ * `maps update --allow-drop`: let an update remove entries the Cloud map
55
+ * holds and the local map does not (spec 052 FR-005). Its own flag rather
56
+ * than `--force`, which already means "overwrite the LOCAL map" on a pull:
57
+ * one word for two opposite directions is how somebody loses the wrong copy.
58
+ */
59
+ allowDrop: boolean;
53
60
  /**
54
61
  * `team unlock` / `team lock`.
55
62
  *
@@ -58,6 +65,17 @@ export interface ParsedArgs {
58
65
  * keys rather than the account or the local store.
59
66
  */
60
67
  teamAction: 'unlock' | 'lock' | null;
68
+ /**
69
+ * `vault unlock` / `vault lock` (spec 052): the personal-maps key, kept on
70
+ * this machine so personal maps open without a passphrase - for the MCP
71
+ * server above all. `vault`, not `team`: it is the account's own key.
72
+ */
73
+ vaultAction: 'unlock' | 'lock' | null;
74
+ /** `vault unlock --days N`, `team unlock --days N`: how long the unlock
75
+ * lasts. Null: the default, 7 days. */
76
+ days: number | null;
77
+ /** `projects` (or `projects list`) and `projects use <name|id>`. */
78
+ projectsAction: 'list' | 'use' | null;
61
79
  /** `rules pull`. */
62
80
  rulesAction: 'pull' | null;
63
81
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAIA,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAClF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD,MAAM,MAAM,OAAO,GACf,OAAO,GACP,SAAS,GACT,MAAM,GACN,KAAK,GACL,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,SAAS,CAAA;AAEb,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAA;IAChB,6EAA6E;IAC7E,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,QAAQ,EAAE,cAAc,CAAA;IACxB,OAAO,EAAE,YAAY,CAAA;IACrB,qEAAqE;IACrE,QAAQ,EAAE,OAAO,CAAA;IACjB,uCAAuC;IACvC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,sCAAsC;IACtC,IAA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SAAS,MAAM,EAAE,GAAG,UAAU,CAiN7D"}
package/dist/args.js CHANGED
@@ -14,6 +14,8 @@ const COMMANDS = new Set([
14
14
  'whoami',
15
15
  'maps',
16
16
  'team',
17
+ 'vault',
18
+ 'projects',
17
19
  'rules',
18
20
  'help',
19
21
  'version',
@@ -30,6 +32,8 @@ export const CLOUD_COMMANDS = new Set([
30
32
  'whoami',
31
33
  'maps',
32
34
  'team',
35
+ 'vault',
36
+ 'projects',
33
37
  'rules',
34
38
  ]);
35
39
  const SECRET_POLICIES = new Set(['redact', 'warn', 'off']);
@@ -58,7 +62,11 @@ export function parseArgs(argv) {
58
62
  device: false,
59
63
  instance: null,
60
64
  mapsAction: null,
65
+ allowDrop: false,
61
66
  teamAction: null,
67
+ vaultAction: null,
68
+ projectsAction: null,
69
+ days: null,
62
70
  rulesAction: null,
63
71
  };
64
72
  if (argv.length === 0)
@@ -76,8 +84,12 @@ export function parseArgs(argv) {
76
84
  if (parsed.command === 'maps') {
77
85
  const verb = argv[1];
78
86
  if (verb !== undefined && !verb.startsWith('-')) {
79
- if (verb !== 'list' && verb !== 'pull' && verb !== 'push' && verb !== 'rm') {
80
- throw new UsageError(`unknown maps action "${verb}" — expected list, pull, push or rm`);
87
+ if (verb !== 'list' &&
88
+ verb !== 'pull' &&
89
+ verb !== 'push' &&
90
+ verb !== 'update' &&
91
+ verb !== 'rm') {
92
+ throw new UsageError(`unknown maps action "${verb}" — expected list, pull, push, update or rm`);
81
93
  }
82
94
  parsed.mapsAction = verb;
83
95
  i = 2;
@@ -93,6 +105,26 @@ export function parseArgs(argv) {
93
105
  i = 2;
94
106
  }
95
107
  }
108
+ if (parsed.command === 'vault') {
109
+ const verb = argv[1];
110
+ if (verb !== undefined && !verb.startsWith('-')) {
111
+ if (verb !== 'unlock' && verb !== 'lock') {
112
+ throw new UsageError(`unknown vault action "${verb}" — expected unlock or lock`);
113
+ }
114
+ parsed.vaultAction = verb;
115
+ i = 2;
116
+ }
117
+ }
118
+ if (parsed.command === 'projects') {
119
+ const verb = argv[1];
120
+ if (verb !== undefined && !verb.startsWith('-')) {
121
+ if (verb !== 'list' && verb !== 'use') {
122
+ throw new UsageError(`unknown projects action "${verb}" — expected list or use`);
123
+ }
124
+ parsed.projectsAction = verb;
125
+ i = 2;
126
+ }
127
+ }
96
128
  if (parsed.command === 'rules') {
97
129
  const verb = argv[1];
98
130
  if (verb !== undefined && !verb.startsWith('-')) {
@@ -157,16 +189,29 @@ export function parseArgs(argv) {
157
189
  case '--keep-docs':
158
190
  parsed.keepDocs = true;
159
191
  break;
160
- case '-f':
161
192
  case '--team':
162
193
  parsed.team = true;
163
194
  break;
164
195
  case '--device':
165
196
  parsed.device = true;
166
197
  break;
198
+ case '-f':
167
199
  case '--force':
168
200
  parsed.force = true;
169
201
  break;
202
+ case '--days': {
203
+ const value = requireValue(arg, argv[++i]);
204
+ // Whole days, and not for ever: what is kept is key material, and a
205
+ // forgotten unlock should run out on its own.
206
+ if (!/^\d+$/.test(value) || Number(value) < 1 || Number(value) > 30) {
207
+ throw new UsageError(`--days must be a whole number from 1 to 30 (got "${value}")`);
208
+ }
209
+ parsed.days = Number(value);
210
+ break;
211
+ }
212
+ case '--allow-drop':
213
+ parsed.allowDrop = true;
214
+ break;
170
215
  case '--instance': {
171
216
  const value = requireValue(arg, argv[++i]);
172
217
  // Parsed here rather than at use, so a typo is a usage error before any
package/dist/args.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,2EAA2E;AAC3E,8DAA8D;AAE9D,OAAO,EAAE,SAAS,EAAsC,MAAM,oBAAoB,CAAA;AAwFlF,MAAM,OAAO,UAAW,SAAQ,KAAK;CAAG;AAExC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAU;IAChC,OAAO;IACP,SAAS;IACT,MAAM;IACN,KAAK;IACL,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,M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;gBAC/C,CAAC;gBACD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAC1B,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -0,0 +1,9 @@
1
+ export { setClientIdentity, clientIdentity, type ClientIdentity } from '../cloud.js';
2
+ export * from './wording.js';
3
+ export * from './maps.js';
4
+ export * from './keys.js';
5
+ export * from './projects.js';
6
+ export * from './status.js';
7
+ export * from './project-scope.js';
8
+ export { personalMapsKeyExpiry, personalMapsKeyPath, readPersonalMapsKey, removePersonalMapsKey, } from './personal-maps-key.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AACpF,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,wBAAwB,CAAA"}
@@ -0,0 +1,13 @@
1
+ // `@veilio-inc/cli/client`: the Cloud operations the CLI's commands and the MCP
2
+ // server's map tools share (spec 052 §3). One implementation of every rule and
3
+ // one table of words for every refusal, so the two clients cannot drift apart.
4
+ // Nothing here prints; every operation answers an `Outcome`.
5
+ export { setClientIdentity, clientIdentity } from '../cloud.js';
6
+ export * from './wording.js';
7
+ export * from './maps.js';
8
+ export * from './keys.js';
9
+ export * from './projects.js';
10
+ export * from './status.js';
11
+ export * from './project-scope.js';
12
+ export { personalMapsKeyExpiry, personalMapsKeyPath, readPersonalMapsKey, removePersonalMapsKey, } from './personal-maps-key.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+EAA+E;AAC/E,+EAA+E;AAC/E,6DAA6D;AAE7D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAuB,MAAM,aAAa,CAAA;AACpF,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,wBAAwB,CAAA"}
@@ -0,0 +1,22 @@
1
+ import { type Outcome } from './wording.js';
2
+ import type { ClientContext } from './maps.js';
3
+ export interface VaultUnlocked {
4
+ path: string;
5
+ expiresAt: string;
6
+ /** This unlock made the account's personal-maps key (the first one). */
7
+ created: boolean;
8
+ /** Older personal maps re-sealed under it now. */
9
+ resealed: number;
10
+ /** Ones that could not be, by id and name, with the reason. */
11
+ failed: {
12
+ id: string;
13
+ name: string;
14
+ reason: string;
15
+ }[];
16
+ }
17
+ export declare function vaultUnlock(ctx: ClientContext, opts?: {
18
+ days?: number;
19
+ }): Promise<Outcome<VaultUnlocked>>;
20
+ /** Remove the personal-maps key from this machine. Whether there was one. */
21
+ export declare function vaultLock(ctx: ClientContext): boolean;
22
+ //# sourceMappingURL=keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/client/keys.ts"],"names":[],"mappings":"AA2CA,OAAO,EAAiC,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAE9C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,wEAAwE;IACxE,OAAO,EAAE,OAAO,CAAA;IAChB,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAA;IAChB,+DAA+D;IAC/D,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CACvD;AAED,wBAAsB,WAAW,CAC/B,GAAG,EAAE,aAAa,EAClB,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAC3B,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAsEjC;AAyED,6EAA6E;AAC7E,wBAAgB,SAAS,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAErD"}
@@ -0,0 +1,170 @@
1
+ // `veilio vault unlock` and `vault lock`: the personal-maps key on this machine
2
+ // (spec 052 FR-011, research §1 and §8).
3
+ //
4
+ // Unlock asks for the passphrase ONCE, derives the vault key in memory, and
5
+ // uses it for exactly two things before it is dropped:
6
+ //
7
+ // 1. to unwrap the account's personal-maps key - or, the first time, to wrap
8
+ // a new one for the server to keep;
9
+ // 2. to re-seal the account's older personal maps, still under the vault
10
+ // key, under the personal-maps key - the only moment a terminal holds both.
11
+ //
12
+ // Then only the personal-maps key is written, 0600, with an expiry. The vault
13
+ // key is non-extractable and is never written anywhere; the passphrase is not
14
+ // either. A passphrase-less process - the MCP server - can then open personal
15
+ // maps, and nothing else the vault protects.
16
+ import { decryptMapFromVault, encryptMapForVault, parseVaultEnvelope, toBase64, } from '@veilio-inc/engine';
17
+ import { CloudError, getMap, getPersonalMapsKeyWrap, listMaps, putPersonalMapsKeyWrap, updateMapContent, } from '../cloud.js';
18
+ import { readCredential } from '../credential.js';
19
+ import { expiryFrom } from '../team-unlock.js';
20
+ import { importPersonalMapsKey, newPersonalMapsKey, personalMapsKeyPath, removePersonalMapsKey, unwrapPersonalMapsKey, wrapPersonalMapsKey, writePersonalMapsKey, } from './personal-maps-key.js';
21
+ import { vaultKeyFor } from './vault-key.js';
22
+ import { refuse, refusalFromCloudError } from './wording.js';
23
+ export async function vaultUnlock(ctx, opts = {}) {
24
+ const credential = readCredential(ctx.home);
25
+ if (!credential)
26
+ return refuse('not_signed_in');
27
+ if (!ctx.passphrase)
28
+ return refuse('no_passphrase');
29
+ const fail = (err) => ({
30
+ ok: false,
31
+ refusal: refusalFromCloudError(err, { project: credential.project }),
32
+ });
33
+ const derived = await vaultKeyFor(credential, ctx.passphrase);
34
+ if (!derived.ok)
35
+ return derived;
36
+ const vaultKey = derived.value;
37
+ let raw;
38
+ let created = false;
39
+ try {
40
+ const held = (await getPersonalMapsKeyWrap(credential)).wrapped;
41
+ if (typeof held === 'string' && held !== '') {
42
+ const opened = await unwrapped(vaultKey, held);
43
+ if (!opened)
44
+ return refuse('pmk_unopenable');
45
+ raw = opened;
46
+ }
47
+ else {
48
+ const fresh = newPersonalMapsKey();
49
+ try {
50
+ await putPersonalMapsKeyWrap(credential, await wrapPersonalMapsKey(vaultKey, fresh));
51
+ raw = fresh;
52
+ created = true;
53
+ }
54
+ catch (err) {
55
+ // Another client - a browser tab, a second terminal - stored one
56
+ // between our read and our write. Its key wins: maps may already be
57
+ // sealed under it, and replacing it is exactly what the server's 409
58
+ // exists to stop. Ours was never used for anything.
59
+ if (!(err instanceof CloudError && err.status === 409))
60
+ return fail(err);
61
+ // Two 409s, told apart by code. One is an account with no keypair
62
+ // yet: there is no race to recover from, only a step in the web app.
63
+ if (err.body?.code === 'keys_not_set_up')
64
+ return refuse('keys_not_set_up');
65
+ const theirs = (await getPersonalMapsKeyWrap(credential)).wrapped;
66
+ const opened = typeof theirs === 'string' ? await unwrapped(vaultKey, theirs) : null;
67
+ if (!opened)
68
+ return refuse('pmk_unopenable');
69
+ raw = opened;
70
+ }
71
+ }
72
+ }
73
+ catch (err) {
74
+ return fail(err);
75
+ }
76
+ const expiresAt = expiryFrom(new Date(), opts.days);
77
+ writePersonalMapsKey({
78
+ v: 1,
79
+ instance: credential.instance,
80
+ account: credential.account,
81
+ expiresAt,
82
+ key: toBase64(raw),
83
+ }, ctx.home);
84
+ const pmk = await importPersonalMapsKey(raw);
85
+ const resealing = await reseal(credential, vaultKey, pmk);
86
+ return {
87
+ ok: true,
88
+ value: {
89
+ path: personalMapsKeyPath(ctx.home),
90
+ expiresAt,
91
+ created,
92
+ resealed: resealing.resealed,
93
+ failed: resealing.failed,
94
+ },
95
+ };
96
+ }
97
+ async function unwrapped(vaultKey, wrapped) {
98
+ try {
99
+ return await unwrapPersonalMapsKey(vaultKey, wrapped);
100
+ }
101
+ catch {
102
+ return null;
103
+ }
104
+ }
105
+ /**
106
+ * Re-seal every personal map still under the vault key, while it is in hand.
107
+ *
108
+ * One at a time, each with the version it read, so a map changed meanwhile is
109
+ * reported rather than overwritten. A failure stops nothing else: each map
110
+ * that did not move is named, and running unlock again picks it up.
111
+ */
112
+ async function reseal(credential, vaultKey, pmk) {
113
+ const failed = [];
114
+ let resealed = 0;
115
+ let personal;
116
+ try {
117
+ personal = (await listMaps(credential)).personalMaps.filter((m) => m.scope === 'personal');
118
+ }
119
+ catch (err) {
120
+ return {
121
+ resealed,
122
+ failed: [
123
+ {
124
+ id: '-',
125
+ name: 'the list of maps',
126
+ reason: err instanceof Error ? err.message : String(err),
127
+ },
128
+ ],
129
+ };
130
+ }
131
+ for (const summary of personal) {
132
+ try {
133
+ const full = await getMap(credential, summary.id);
134
+ if (typeof full.map_data !== 'string')
135
+ throw new Error('not an encrypted envelope');
136
+ const envelope = parseVaultEnvelope(full.map_data);
137
+ try {
138
+ await decryptMapFromVault(pmk, envelope);
139
+ continue; // already under the personal-maps key
140
+ }
141
+ catch {
142
+ // under the vault key, or damaged: the next step says which
143
+ }
144
+ const map = await decryptMapFromVault(vaultKey, envelope);
145
+ await updateMapContent(credential, summary.id, {
146
+ map_data: JSON.stringify(await encryptMapForVault(pmk, map)),
147
+ identifier_count: Object.keys(map).length,
148
+ if_updated_at: full.updated_at,
149
+ });
150
+ resealed++;
151
+ }
152
+ catch (err) {
153
+ failed.push({
154
+ id: summary.id,
155
+ name: summary.name,
156
+ reason: err instanceof CloudError && err.status === 409
157
+ ? 'it changed in Cloud while this ran'
158
+ : err instanceof Error
159
+ ? err.message
160
+ : String(err),
161
+ });
162
+ }
163
+ }
164
+ return { resealed, failed };
165
+ }
166
+ /** Remove the personal-maps key from this machine. Whether there was one. */
167
+ export function vaultLock(ctx) {
168
+ return removePersonalMapsKey(ctx.home);
169
+ }
170
+ //# sourceMappingURL=keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/client/keys.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,4EAA4E;AAC5E,uDAAuD;AACvD,EAAE;AACF,+EAA+E;AAC/E,yCAAyC;AACzC,2EAA2E;AAC3E,iFAAiF;AACjF,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAC9E,6CAA6C;AAE7C,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,QAAQ,GAET,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,UAAU,EACV,MAAM,EACN,sBAAsB,EACtB,QAAQ,EACR,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,cAAc,EAAmB,MAAM,kBAAkB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAgB,MAAM,cAAc,CAAA;AAc1E,MAAM,CAAC,KAAK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