@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.
- package/README.md +62 -15
- package/dist/args.d.ts +20 -2
- package/dist/args.d.ts.map +1 -1
- package/dist/args.js +48 -3
- package/dist/args.js.map +1 -1
- package/dist/client/index.d.ts +9 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +13 -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 +115 -0
- package/dist/client/maps.d.ts.map +1 -0
- package/dist/client/maps.js +798 -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/project-scope.d.ts +87 -0
- package/dist/client/project-scope.d.ts.map +1 -0
- package/dist/client/project-scope.js +132 -0
- package/dist/client/project-scope.js.map +1 -0
- package/dist/client/projects.d.ts +53 -0
- package/dist/client/projects.d.ts.map +1 -0
- package/dist/client/projects.js +129 -0
- package/dist/client/projects.js.map +1 -0
- package/dist/client/status.d.ts +21 -0
- package/dist/client/status.d.ts.map +1 -0
- package/dist/client/status.js +71 -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 +62 -0
- package/dist/client/wording.d.ts.map +1 -0
- package/dist/client/wording.js +358 -0
- package/dist/client/wording.js.map +1 -0
- package/dist/cloud-commands.d.ts +34 -43
- package/dist/cloud-commands.d.ts.map +1 -1
- package/dist/cloud-commands.js +282 -466
- 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 +14 -1
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +24 -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 +10 -1
- package/dist/credential.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -5
- package/dist/index.js.map +1 -1
- package/dist/team-namespace.d.ts +74 -2
- package/dist/team-namespace.d.ts.map +1 -1
- package/dist/team-namespace.js +78 -18
- package/dist/team-namespace.js.map +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { type Env } from './project-scope.js';
|
|
2
|
+
import { type Outcome } from './wording.js';
|
|
3
|
+
export interface ClientContext {
|
|
4
|
+
/** Home directory the credential and unlocked keys live under. */
|
|
5
|
+
home?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Ask for the vault passphrase. The CLI passes its hidden prompt; the MCP
|
|
8
|
+
* server passes nothing, and a passphrase is then never asked for - it
|
|
9
|
+
* opens personal maps with the personal-maps key or not at all (FR-011).
|
|
10
|
+
*/
|
|
11
|
+
passphrase?: () => Promise<string>;
|
|
12
|
+
/**
|
|
13
|
+
* Where `VEILIO_PROJECT` is read from (FR-012a). Undefined: this process's
|
|
14
|
+
* environment. The MCP server passes its own; tests pass theirs.
|
|
15
|
+
*/
|
|
16
|
+
env?: Env;
|
|
17
|
+
}
|
|
18
|
+
export interface ListedMap {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
scope: 'personal' | 'team';
|
|
22
|
+
count: number | null;
|
|
23
|
+
/** Whether this account published it. A team map that is not is a
|
|
24
|
+
* teammate's: readable, not ours to update or remove. */
|
|
25
|
+
mine: boolean;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function listCloudMaps(ctx: ClientContext): Promise<Outcome<{
|
|
29
|
+
maps: ListedMap[];
|
|
30
|
+
teamId: string | null;
|
|
31
|
+
project: string | null;
|
|
32
|
+
/** VEILIO_PROJECT chose `project`: `projects use` does not change it here. */
|
|
33
|
+
projectFromEnv: boolean;
|
|
34
|
+
}>>;
|
|
35
|
+
export declare function pullCloudMap(ctx: ClientContext, id: string | null, opts: {
|
|
36
|
+
mapPath: string;
|
|
37
|
+
force?: boolean;
|
|
38
|
+
}): Promise<Outcome<{
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
count: number;
|
|
42
|
+
path: string;
|
|
43
|
+
}>>;
|
|
44
|
+
/**
|
|
45
|
+
* Placeholders the local map and the team's namespace use for DIFFERENT names.
|
|
46
|
+
*
|
|
47
|
+
* Publishing one creates a DISPUTED placeholder, which then restores for no
|
|
48
|
+
* member of the team until somebody deletes a map. One person's push, a cost
|
|
49
|
+
* paid by everyone, and nothing errors at the time - so it is checked before
|
|
50
|
+
* anything is sealed. An identifier the team holds under a DIFFERENT
|
|
51
|
+
* placeholder is an alias, not a conflict: both still restore (spec 017).
|
|
52
|
+
*/
|
|
53
|
+
export declare function conflictsWithTeam(local: Record<string, string>, teamNamespace: Record<string, string>): {
|
|
54
|
+
placeholder: string;
|
|
55
|
+
mine: string;
|
|
56
|
+
theirs: string;
|
|
57
|
+
}[];
|
|
58
|
+
export interface Created {
|
|
59
|
+
id: string;
|
|
60
|
+
name: string;
|
|
61
|
+
scope: 'personal' | 'team';
|
|
62
|
+
count: number;
|
|
63
|
+
/** Team only: identifiers in the team's shared set after this one. */
|
|
64
|
+
teamTotal?: number;
|
|
65
|
+
/** Team only: placeholders the team's maps disagree on. */
|
|
66
|
+
disputed?: number;
|
|
67
|
+
/** Things worth saying that are not refusals. */
|
|
68
|
+
notes: string[];
|
|
69
|
+
}
|
|
70
|
+
/** Seal the local map and upload it as a new map, personal or the team's. */
|
|
71
|
+
export declare function createCloudMap(ctx: ClientContext, opts: {
|
|
72
|
+
name: string | null;
|
|
73
|
+
scope: 'personal' | 'team';
|
|
74
|
+
mapPath: string;
|
|
75
|
+
}): Promise<Outcome<Created>>;
|
|
76
|
+
export interface Updated {
|
|
77
|
+
id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
scope: 'personal' | 'team';
|
|
80
|
+
count: number;
|
|
81
|
+
/** Entries the Cloud map held that it no longer does - only with allowDrop. */
|
|
82
|
+
dropped: number;
|
|
83
|
+
updatedAt: string;
|
|
84
|
+
notes: string[];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Replace a Cloud map's entries with the local map's, in place: same id, name
|
|
88
|
+
* and project (spec 052 US1).
|
|
89
|
+
*
|
|
90
|
+
* The server cannot read names, so the two checks that need them are made
|
|
91
|
+
* here, before anything is sealed: the entries the update would drop (FR-005),
|
|
92
|
+
* and - for a team map - clashes with the project's OTHER team maps (FR-003).
|
|
93
|
+
* The server decides the rest: owner or publisher, the rotation lock, and the
|
|
94
|
+
* version this read (`if_updated_at`), so a teammate's write in between is
|
|
95
|
+
* reported rather than overwritten.
|
|
96
|
+
*/
|
|
97
|
+
export declare function updateCloudMap(ctx: ClientContext, id: string | null, opts: {
|
|
98
|
+
mapPath: string;
|
|
99
|
+
allowDrop?: boolean;
|
|
100
|
+
}): Promise<Outcome<Updated>>;
|
|
101
|
+
/**
|
|
102
|
+
* Remove a map from Cloud. Who may remove a team map is the server's decision;
|
|
103
|
+
* this says what each refusal means and changes nothing locally either way.
|
|
104
|
+
*
|
|
105
|
+
* `confirmName`, when given (the MCP server, FR-010), must equal the map's
|
|
106
|
+
* exact name, and is checked before the removal is sent. Without it the name
|
|
107
|
+
* is read only so the confirmation can say WHICH map went.
|
|
108
|
+
*/
|
|
109
|
+
export declare function removeCloudMap(ctx: ClientContext, id: string | null, opts?: {
|
|
110
|
+
confirmName?: string;
|
|
111
|
+
}): Promise<Outcome<{
|
|
112
|
+
id: string;
|
|
113
|
+
name: string | null;
|
|
114
|
+
}>>;
|
|
115
|
+
//# sourceMappingURL=maps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maps.d.ts","sourceRoot":"","sources":["../../src/client/maps.ts"],"names":[],"mappings":"AAwDA,OAAO,EAKL,KAAK,GAAG,EAET,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAiC,KAAK,OAAO,EAAgB,MAAM,cAAc,CAAA;AAExF,MAAM,WAAW,aAAa;IAC5B,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;IAClC;;;OAGG;IACH,GAAG,CAAC,EAAE,GAAG,CAAA;CACV;AAuBD,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,UAAU,GAAG,MAAM,CAAA;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB;8DAC0D;IAC1D,IAAI,EAAE,OAAO,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAC9D,OAAO,CAAC;IACN,IAAI,EAAE,SAAS,EAAE,CAAA;IACjB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,8EAA8E;IAC9E,cAAc,EAAE,OAAO,CAAA;CACxB,CAAC,CACH,CA0BA;AA8KD,wBAAsB,YAAY,CAChC,GAAG,EAAE,aAAa,EAClB,EAAE,EAAE,MAAM,GAAG,IAAI,EACjB,IAAI,EAAE;IAAE,OA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