@veilio-inc/cli 0.5.3 → 0.6.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/README.md +45 -15
- package/dist/args.d.ts +20 -2
- package/dist/args.d.ts.map +1 -1
- package/dist/args.js +47 -2
- package/dist/args.js.map +1 -1
- package/dist/client/index.d.ts +8 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +12 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/keys.d.ts +22 -0
- package/dist/client/keys.d.ts.map +1 -0
- package/dist/client/keys.js +170 -0
- package/dist/client/keys.js.map +1 -0
- package/dist/client/maps.d.ts +107 -0
- package/dist/client/maps.d.ts.map +1 -0
- package/dist/client/maps.js +702 -0
- package/dist/client/maps.js.map +1 -0
- package/dist/client/personal-maps-key.d.ts +42 -0
- package/dist/client/personal-maps-key.d.ts.map +1 -0
- package/dist/client/personal-maps-key.js +168 -0
- package/dist/client/personal-maps-key.js.map +1 -0
- package/dist/client/projects.d.ts +23 -0
- package/dist/client/projects.d.ts.map +1 -0
- package/dist/client/projects.js +68 -0
- package/dist/client/projects.js.map +1 -0
- package/dist/client/status.d.ts +19 -0
- package/dist/client/status.d.ts.map +1 -0
- package/dist/client/status.js +62 -0
- package/dist/client/status.js.map +1 -0
- package/dist/client/team-key-bootstrap.d.ts +55 -0
- package/dist/client/team-key-bootstrap.d.ts.map +1 -0
- package/dist/client/team-key-bootstrap.js +127 -0
- package/dist/client/team-key-bootstrap.js.map +1 -0
- package/dist/client/vault-key.d.ts +5 -0
- package/dist/client/vault-key.d.ts.map +1 -0
- package/dist/client/vault-key.js +35 -0
- package/dist/client/vault-key.js.map +1 -0
- package/dist/client/wording.d.ts +59 -0
- package/dist/client/wording.d.ts.map +1 -0
- package/dist/client/wording.js +336 -0
- package/dist/client/wording.js.map +1 -0
- package/dist/cloud-commands.d.ts +30 -41
- package/dist/cloud-commands.d.ts.map +1 -1
- package/dist/cloud-commands.js +271 -461
- package/dist/cloud-commands.js.map +1 -1
- package/dist/cloud.d.ts +101 -2
- package/dist/cloud.d.ts.map +1 -1
- package/dist/cloud.js +91 -7
- package/dist/cloud.js.map +1 -1
- package/dist/commands.d.ts +1 -1
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +15 -0
- package/dist/commands.js.map +1 -1
- package/dist/credential.d.ts +7 -0
- package/dist/credential.d.ts.map +1 -1
- package/dist/credential.js +4 -0
- package/dist/credential.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -16
- package/dist/index.js.map +1 -1
- package/dist/secret-input.d.ts +23 -0
- package/dist/secret-input.d.ts.map +1 -0
- package/dist/secret-input.js +47 -0
- package/dist/secret-input.js.map +1 -0
- package/dist/team-namespace.d.ts +37 -0
- package/dist/team-namespace.d.ts.map +1 -1
- package/dist/team-namespace.js +61 -17
- package/dist/team-namespace.js.map +1 -1
- package/package.json +3 -2
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,35 @@ 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
|
-
**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
+
**The personal-maps key.** `veilio vault unlock` asks for the vault passphrase
|
|
92
|
+
once and keeps, on this machine, only a key that opens personal maps - not the
|
|
93
|
+
passphrase, not the vault key, which also unlocks your team keys. The first time,
|
|
94
|
+
it creates that key and stores it in Cloud wrapped under your vault key, where
|
|
95
|
+
the server cannot read it; it also re-seals older personal maps under it. Then
|
|
96
|
+
`maps pull`, `push` and `update` - and the MCP server - open personal maps
|
|
97
|
+
without a passphrase. Without it, the CLI asks for the passphrase as before.
|
|
74
98
|
|
|
75
99
|
Custom rules (whitelist and replace, set in the web app) are applied by
|
|
76
100
|
`scrub` from a local copy that `veilio rules pull` writes to
|
|
@@ -78,9 +102,11 @@ Custom rules (whitelist and replace, set in the web app) are applied by
|
|
|
78
102
|
offline - and says on every run how many rules it applied and how old the copy
|
|
79
103
|
is. Pull again after the rules change; `logout` removes the copy.
|
|
80
104
|
|
|
81
|
-
|
|
82
|
-
removed by `logout`), `rules.json` (the rules copy)
|
|
83
|
-
keys `team unlock` opened, kept seven days)
|
|
105
|
+
Four files, all `0600`, all under `~/.veilio/`: `credential.json` (the session
|
|
106
|
+
and the chosen project, removed by `logout`), `rules.json` (the rules copy),
|
|
107
|
+
`team-keys.json` (the keys `team unlock` opened, kept seven days) and
|
|
108
|
+
`personal-maps-key.json` (the key `vault unlock` opened, kept seven days). `logout`
|
|
109
|
+
removes all of them.
|
|
84
110
|
|
|
85
111
|
### Scrubbing with the team's numbering
|
|
86
112
|
|
|
@@ -116,8 +142,8 @@ with the real names:
|
|
|
116
142
|
- **The counts are this project's.** "Restored 8 of 9" is measured against your
|
|
117
143
|
own map, not against a team namespace of four hundred entries.
|
|
118
144
|
|
|
119
|
-
The map commands are clients of `GET /api/maps`, `GET /api/maps/:id
|
|
120
|
-
`POST /api/maps` — the exact same routes the browser uses, behind the exact
|
|
145
|
+
The map commands are clients of `GET /api/maps`, `GET /api/maps/:id`,
|
|
146
|
+
`POST /api/maps` and `PATCH /api/maps/:id` — the exact same routes the browser uses, behind the exact
|
|
121
147
|
same entitlement check. There is no CLI-shaped API and nothing here can reach
|
|
122
148
|
a plan feature the web app couldn't.
|
|
123
149
|
|
|
@@ -134,6 +160,10 @@ a plan feature the web app couldn't.
|
|
|
134
160
|
nothing and exit 1 if a placeholder would be left
|
|
135
161
|
--keep-docs restore: keep JSDoc blocks the model wrote
|
|
136
162
|
-f, --force Allow a map write that would drop existing entries
|
|
163
|
+
--days <n> vault unlock, team unlock: keep the key for n days
|
|
164
|
+
(1 to 30; 7 by default)
|
|
165
|
+
--allow-drop maps update: allow dropping entries the Cloud map has
|
|
166
|
+
and the local map does not
|
|
137
167
|
--device login: sign in through a browser instead of typing a
|
|
138
168
|
password here. Required for an SSO-bound account, and
|
|
139
169
|
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
|
/**
|
package/dist/args.d.ts.map
CHANGED
|
@@ -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,CAA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,6DAA6D;IAC7D,MAAM,EAAE,OAAO,CAAA;IACf,wCAAwC;IACxC,QAAQ,EAAE,OAAO,CAAA;IACjB,iEAAiE;IACjE,KAAK,EAAE,OAAO,CAAA;IACd;;;;;;;OAOG;IACH,MAAM,EAAE,OAAO,CAAA;IACf;;;;;;;OAOG;IACH,IAAI,EAAE,OAAO,CAAA;IACb;;;;;;;OAOG;IACH,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAA;IAC7D;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAA;IAElB;;;;;;OAMG;IACH,UAAU,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAA;IACpC;;;;OAIG;IACH,WAAW,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAA;IACrC;4CACwC;IACxC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,oEAAoE;IACpE,cAAc,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAAA;IACrC,oBAAoB;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAE1B;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAED,qBAAa,UAAW,SAAQ,KAAK;CAAG;AAmBxC;;;;;GAKG;AACH,eAAO,MAAM,cAAc,cASzB,CAAA;AAWF,wBAAgB,SAAS,CAAC,IAAI,EAAE,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' &&
|
|
80
|
-
|
|
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('-')) {
|
|
@@ -167,6 +199,19 @@ export function parseArgs(argv) {
|
|
|
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;
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,2EAA2E;AAC3E,8DAA8D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A;gBACvB,MAAK;YACP,CAAC;YACD;gBACE,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,GAAG,EAAE,CAAC;oBACvC,MAAM,IAAI,UAAU,CAAC,iBAAiB,GAAG,GAAG,CAAC,CAAA;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,8 @@
|
|
|
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 { personalMapsKeyExpiry, personalMapsKeyPath, readPersonalMapsKey, removePersonalMapsKey, } from './personal-maps-key.js';
|
|
8
|
+
//# 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,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 { personalMapsKeyExpiry, personalMapsKeyPath, readPersonalMapsKey, removePersonalMapsKey, } from './personal-maps-key.js';
|
|
12
|
+
//# 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,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,EAC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gBACzC,aAAa,EAAE,IAAI,CAAC,UAAU;aAC/B,CAAC,CAAA;YACF,QAAQ,EAAE,CAAA;QACZ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,IAAI,CAAC;gBACV,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EACJ,GAAG,YAAY,UAAU,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;oBAC7C,CAAC,CAAC,oCAAoC;oBACtC,CAAC,CAAC,GAAG,YAAY,KAAK;wBACpB,CAAC,CAAC,GAAG,CAAC,OAAO;wBACb,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACpB,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;AAC7B,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,SAAS,CAAC,GAAkB;IAC1C,OAAO,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AACxC,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { type Outcome } from './wording.js';
|
|
2
|
+
export interface ClientContext {
|
|
3
|
+
/** Home directory the credential and unlocked keys live under. */
|
|
4
|
+
home?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Ask for the vault passphrase. The CLI passes its hidden prompt; the MCP
|
|
7
|
+
* server passes nothing, and a passphrase is then never asked for - it
|
|
8
|
+
* opens personal maps with the personal-maps key or not at all (FR-011).
|
|
9
|
+
*/
|
|
10
|
+
passphrase?: () => Promise<string>;
|
|
11
|
+
}
|
|
12
|
+
export interface ListedMap {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
scope: 'personal' | 'team';
|
|
16
|
+
count: number | null;
|
|
17
|
+
/** Whether this account published it. A team map that is not is a
|
|
18
|
+
* teammate's: readable, not ours to update or remove. */
|
|
19
|
+
mine: boolean;
|
|
20
|
+
updatedAt: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function listCloudMaps(ctx: ClientContext): Promise<Outcome<{
|
|
23
|
+
maps: ListedMap[];
|
|
24
|
+
teamId: string | null;
|
|
25
|
+
project: string | null;
|
|
26
|
+
}>>;
|
|
27
|
+
export declare function pullCloudMap(ctx: ClientContext, id: string | null, opts: {
|
|
28
|
+
mapPath: string;
|
|
29
|
+
force?: boolean;
|
|
30
|
+
}): Promise<Outcome<{
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
count: number;
|
|
34
|
+
path: string;
|
|
35
|
+
}>>;
|
|
36
|
+
/**
|
|
37
|
+
* Placeholders the local map and the team's namespace use for DIFFERENT names.
|
|
38
|
+
*
|
|
39
|
+
* Publishing one creates a DISPUTED placeholder, which then restores for no
|
|
40
|
+
* member of the team until somebody deletes a map. One person's push, a cost
|
|
41
|
+
* paid by everyone, and nothing errors at the time - so it is checked before
|
|
42
|
+
* anything is sealed. An identifier the team holds under a DIFFERENT
|
|
43
|
+
* placeholder is an alias, not a conflict: both still restore (spec 017).
|
|
44
|
+
*/
|
|
45
|
+
export declare function conflictsWithTeam(local: Record<string, string>, teamNamespace: Record<string, string>): {
|
|
46
|
+
placeholder: string;
|
|
47
|
+
mine: string;
|
|
48
|
+
theirs: string;
|
|
49
|
+
}[];
|
|
50
|
+
export interface Created {
|
|
51
|
+
id: string;
|
|
52
|
+
name: string;
|
|
53
|
+
scope: 'personal' | 'team';
|
|
54
|
+
count: number;
|
|
55
|
+
/** Team only: identifiers in the team's shared set after this one. */
|
|
56
|
+
teamTotal?: number;
|
|
57
|
+
/** Team only: placeholders the team's maps disagree on. */
|
|
58
|
+
disputed?: number;
|
|
59
|
+
/** Things worth saying that are not refusals. */
|
|
60
|
+
notes: string[];
|
|
61
|
+
}
|
|
62
|
+
/** Seal the local map and upload it as a new map, personal or the team's. */
|
|
63
|
+
export declare function createCloudMap(ctx: ClientContext, opts: {
|
|
64
|
+
name: string | null;
|
|
65
|
+
scope: 'personal' | 'team';
|
|
66
|
+
mapPath: string;
|
|
67
|
+
}): Promise<Outcome<Created>>;
|
|
68
|
+
export interface Updated {
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
scope: 'personal' | 'team';
|
|
72
|
+
count: number;
|
|
73
|
+
/** Entries the Cloud map held that it no longer does - only with allowDrop. */
|
|
74
|
+
dropped: number;
|
|
75
|
+
updatedAt: string;
|
|
76
|
+
notes: string[];
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Replace a Cloud map's entries with the local map's, in place: same id, name
|
|
80
|
+
* and project (spec 052 US1).
|
|
81
|
+
*
|
|
82
|
+
* The server cannot read names, so the two checks that need them are made
|
|
83
|
+
* here, before anything is sealed: the entries the update would drop (FR-005),
|
|
84
|
+
* and - for a team map - clashes with the project's OTHER team maps (FR-003).
|
|
85
|
+
* The server decides the rest: owner or publisher, the rotation lock, and the
|
|
86
|
+
* version this read (`if_updated_at`), so a teammate's write in between is
|
|
87
|
+
* reported rather than overwritten.
|
|
88
|
+
*/
|
|
89
|
+
export declare function updateCloudMap(ctx: ClientContext, id: string | null, opts: {
|
|
90
|
+
mapPath: string;
|
|
91
|
+
allowDrop?: boolean;
|
|
92
|
+
}): Promise<Outcome<Updated>>;
|
|
93
|
+
/**
|
|
94
|
+
* Remove a map from Cloud. Who may remove a team map is the server's decision;
|
|
95
|
+
* this says what each refusal means and changes nothing locally either way.
|
|
96
|
+
*
|
|
97
|
+
* `confirmName`, when given (the MCP server, FR-010), must equal the map's
|
|
98
|
+
* exact name, and is checked before the removal is sent. Without it the name
|
|
99
|
+
* is read only so the confirmation can say WHICH map went.
|
|
100
|
+
*/
|
|
101
|
+
export declare function removeCloudMap(ctx: ClientContext, id: string | null, opts?: {
|
|
102
|
+
confirmName?: string;
|
|
103
|
+
}): Promise<Outcome<{
|
|
104
|
+
id: string;
|
|
105
|
+
name: string | null;
|
|
106
|
+
}>>;
|
|
107
|
+
//# sourceMappingURL=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