@veilio-inc/cli 0.7.1 → 0.9.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 +157 -14
- package/dist/client/blocks.d.ts +30 -0
- package/dist/client/blocks.d.ts.map +1 -0
- package/dist/client/blocks.js +125 -0
- package/dist/client/blocks.js.map +1 -0
- package/dist/client/maps.d.ts +8 -0
- package/dist/client/maps.d.ts.map +1 -1
- package/dist/client/maps.js +260 -16
- package/dist/client/maps.js.map +1 -1
- package/dist/client/rules-skipped.d.ts +22 -0
- package/dist/client/rules-skipped.d.ts.map +1 -0
- package/dist/client/rules-skipped.js +30 -0
- package/dist/client/rules-skipped.js.map +1 -0
- package/dist/client/wording.d.ts +2 -2
- package/dist/client/wording.d.ts.map +1 -1
- package/dist/client/wording.js +15 -0
- package/dist/client/wording.js.map +1 -1
- package/dist/cloud-commands.d.ts +5 -3
- package/dist/cloud-commands.d.ts.map +1 -1
- package/dist/cloud-commands.js +109 -28
- package/dist/cloud-commands.js.map +1 -1
- package/dist/cloud.d.ts +74 -7
- package/dist/cloud.d.ts.map +1 -1
- package/dist/cloud.js +205 -3
- package/dist/cloud.js.map +1 -1
- package/dist/commands.d.ts +10 -0
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +90 -15
- package/dist/commands.js.map +1 -1
- package/dist/credential.d.ts +12 -0
- package/dist/credential.d.ts.map +1 -1
- package/dist/credential.js +48 -0
- package/dist/credential.js.map +1 -1
- package/dist/flags.js +2 -2
- package/dist/flags.js.map +1 -1
- package/dist/hashed-bases.d.ts +12 -0
- package/dist/hashed-bases.d.ts.map +1 -0
- package/dist/hashed-bases.js +45 -0
- package/dist/hashed-bases.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/reservations.d.ts +145 -0
- package/dist/reservations.d.ts.map +1 -0
- package/dist/reservations.js +348 -0
- package/dist/reservations.js.map +1 -0
- package/dist/rules-open.d.ts +16 -0
- package/dist/rules-open.d.ts.map +1 -0
- package/dist/rules-open.js +87 -0
- package/dist/rules-open.js.map +1 -0
- package/dist/rules.d.ts +20 -2
- package/dist/rules.d.ts.map +1 -1
- package/dist/rules.js +86 -4
- package/dist/rules.js.map +1 -1
- package/dist/store.d.ts +3 -0
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +19 -1
- package/dist/store.js.map +1 -1
- package/dist/team-anonymize.d.ts +16 -1
- package/dist/team-anonymize.d.ts.map +1 -1
- package/dist/team-anonymize.js +39 -13
- package/dist/team-anonymize.js.map +1 -1
- package/dist/team-namespace.d.ts +59 -4
- package/dist/team-namespace.d.ts.map +1 -1
- package/dist/team-namespace.js +133 -11
- package/dist/team-namespace.js.map +1 -1
- package/package.json +7 -5
package/dist/rules.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type CustomRule } from '@veilio-inc/engine';
|
|
2
|
+
import type { RulesSkipped } from './client/rules-skipped.js';
|
|
2
3
|
export declare const RULES_FILE = "rules.json";
|
|
3
4
|
export interface CachedRules {
|
|
4
5
|
/** Which account these belong to - a different sign-in does not inherit them. */
|
|
@@ -8,6 +9,9 @@ export interface CachedRules {
|
|
|
8
9
|
pulledAt: string;
|
|
9
10
|
/** Already merged into the order the engine applies them in. */
|
|
10
11
|
rules: CustomRule[];
|
|
12
|
+
/** Served but not applied here, by cause (spec 065). Absent in a cache
|
|
13
|
+
* written before it, which reads as all zeros. */
|
|
14
|
+
skipped?: RulesSkipped;
|
|
11
15
|
}
|
|
12
16
|
export declare function rulesPath(home?: string): string;
|
|
13
17
|
/**
|
|
@@ -21,11 +25,25 @@ export declare function rulesPath(home?: string): string;
|
|
|
21
25
|
* Must match `useMergedRules` in the Cloud frontend.
|
|
22
26
|
*/
|
|
23
27
|
export declare function mergeRules(personal: readonly CustomRule[], team: readonly CustomRule[]): CustomRule[];
|
|
24
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* The cached rules for this account, or null. Null for every kind of failure.
|
|
30
|
+
*
|
|
31
|
+
* Only the rules whose key is still held are returned: a rule opened while the
|
|
32
|
+
* vault or team key was unlocked must not outlive that key - a lock, an expiry,
|
|
33
|
+
* an unlock of another team. The rest are counted as vaultLocked/teamLocked.
|
|
34
|
+
*/
|
|
25
35
|
export declare function readRules(owner: {
|
|
26
36
|
instance: string;
|
|
27
37
|
account: string;
|
|
28
|
-
}, home?: string): CachedRules | null;
|
|
38
|
+
}, home?: string, now?: Date): CachedRules | null;
|
|
39
|
+
/**
|
|
40
|
+
* Remove one scope's rules from the cache when its key is locked, and count
|
|
41
|
+
* them as skipped, so the opened content does not stay readable on disk. Reads
|
|
42
|
+
* the file without the owner check: removing never needs to be ours. Returns
|
|
43
|
+
* how many were removed; a missing or damaged cache removes none. The file is
|
|
44
|
+
* rewritten 0600.
|
|
45
|
+
*/
|
|
46
|
+
export declare function purgeRules(scope: 'personal' | 'team', home?: string): number;
|
|
29
47
|
/** 0600: the patterns name what a team considers sensitive. */
|
|
30
48
|
export declare function writeRules(cached: CachedRules, home?: string): void;
|
|
31
49
|
/** Remove the cache. Missing is not an error; failing to delete is. */
|
package/dist/rules.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../src/rules.ts"],"names":[],"mappings":"AAiBA,OAAO,
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../src/rules.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAyB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAI7D,eAAO,MAAM,UAAU,eAAe,CAAA;AAEtC,MAAM,WAAW,WAAW;IAC1B,iFAAiF;IACjF,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAA;IAChB,gEAAgE;IAChE,KAAK,EAAE,UAAU,EAAE,CAAA;IACnB;uDACmD;IACnD,OAAO,CAAC,EAAE,YAAY,CAAA;CACvB;AAED,wBAAgB,SAAS,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAE1D;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,SAAS,UAAU,EAAE,EAC/B,IAAI,EAAE,SAAS,UAAU,EAAE,GAC1B,UAAU,EAAE,CAUd;AAqDD;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAC5C,IAAI,GAAE,MAAkB,EACxB,GAAG,GAAE,IAAiB,GACrB,WAAW,GAAG,IAAI,CAsBpB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,EAAE,IAAI,GAAE,MAAkB,GAAG,MAAM,CAgBvF;AAED,+DAA+D;AAC/D,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,GAAE,MAAkB,GAAG,IAAI,CAK9E;AAED,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,IAAI,GAAE,MAAkB,GAAG,OAAO,CAS7D;AAED,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,GAAE,IAAiB,GAAG,MAAM,CAQ5E"}
|
package/dist/rules.js
CHANGED
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
import { chmodSync, mkdirSync, readFileSync, rmSync, statSync, writeFileSync } from 'node:fs';
|
|
15
15
|
import { dirname, join } from 'node:path';
|
|
16
16
|
import { homedir } from 'node:os';
|
|
17
|
-
import { STORE_DIR } from '@veilio-inc/engine';
|
|
17
|
+
import { STORE_DIR, fromBase64 } from '@veilio-inc/engine';
|
|
18
|
+
import { readPersonalMapsKey } from './client/personal-maps-key.js';
|
|
19
|
+
import { readTeamUnlock } from './team-unlock.js';
|
|
18
20
|
export const RULES_FILE = 'rules.json';
|
|
19
21
|
export function rulesPath(home = homedir()) {
|
|
20
22
|
return join(home, STORE_DIR, RULES_FILE);
|
|
@@ -39,6 +41,16 @@ export function mergeRules(personal, team) {
|
|
|
39
41
|
...on(personal, 'replace'),
|
|
40
42
|
].map((r, i) => ({ ...r, sort_order: i }));
|
|
41
43
|
}
|
|
44
|
+
function readSkipped(value) {
|
|
45
|
+
const v = (typeof value === 'object' && value !== null ? value : {});
|
|
46
|
+
const n = (x) => (Number.isInteger(x) && x >= 0 ? x : 0);
|
|
47
|
+
return {
|
|
48
|
+
vaultLocked: n(v.vaultLocked),
|
|
49
|
+
teamLocked: n(v.teamLocked),
|
|
50
|
+
unopenable: n(v.unopenable),
|
|
51
|
+
refused: n(v.refused),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
42
54
|
function isRule(value) {
|
|
43
55
|
if (typeof value !== 'object' || value === null)
|
|
44
56
|
return false;
|
|
@@ -49,8 +61,42 @@ function isRule(value) {
|
|
|
49
61
|
return true;
|
|
50
62
|
return r.type === 'replace' && typeof r.placeholder === 'string';
|
|
51
63
|
}
|
|
52
|
-
/**
|
|
53
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Which keys this machine still holds - THE definition of "held" for applying
|
|
66
|
+
* cached rules (spec 065 FR-006). The guard mirrors it in
|
|
67
|
+
* plugins/veilio-guard/lib/rules.ts; both suites run the same table
|
|
68
|
+
* (rules-lock-purge.test.ts, custom-rules.test.ts).
|
|
69
|
+
*
|
|
70
|
+
* Personal: `personal-maps-key.json` is v1, this instance and account,
|
|
71
|
+
* unexpired, and its key decodes to 32 bytes (readPersonalMapsKey).
|
|
72
|
+
* Team T: `team-keys.json` is v1, this instance and account, unexpired, its
|
|
73
|
+
* teamId is T, and at least one key decodes to 32 bytes - what heldTeamKeys
|
|
74
|
+
* keeps after importTeamKey drops a damaged one. Absent, damaged, expired or
|
|
75
|
+
* somebody else's: not held.
|
|
76
|
+
*/
|
|
77
|
+
function keysHeld(owner, home, now) {
|
|
78
|
+
const unlock = readTeamUnlock(owner, home, now);
|
|
79
|
+
const usable = (key) => {
|
|
80
|
+
try {
|
|
81
|
+
return fromBase64(key).byteLength === 32;
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
return {
|
|
88
|
+
personal: readPersonalMapsKey(owner, home, now) !== null,
|
|
89
|
+
team: unlock && unlock.keys.some((k) => usable(k.key)) ? unlock.teamId : null,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The cached rules for this account, or null. Null for every kind of failure.
|
|
94
|
+
*
|
|
95
|
+
* Only the rules whose key is still held are returned: a rule opened while the
|
|
96
|
+
* vault or team key was unlocked must not outlive that key - a lock, an expiry,
|
|
97
|
+
* an unlock of another team. The rest are counted as vaultLocked/teamLocked.
|
|
98
|
+
*/
|
|
99
|
+
export function readRules(owner, home = homedir(), now = new Date()) {
|
|
54
100
|
let parsed;
|
|
55
101
|
try {
|
|
56
102
|
parsed = JSON.parse(readFileSync(rulesPath(home), 'utf8'));
|
|
@@ -66,7 +112,43 @@ export function readRules(owner, home = homedir()) {
|
|
|
66
112
|
if (typeof c.pulledAt !== 'string' || !Array.isArray(c.rules) || !c.rules.every(isRule)) {
|
|
67
113
|
return null;
|
|
68
114
|
}
|
|
69
|
-
|
|
115
|
+
const skipped = readSkipped(c.skipped);
|
|
116
|
+
const held = keysHeld(owner, home, now);
|
|
117
|
+
const rules = c.rules.filter((r) => {
|
|
118
|
+
// Anything not marked team is treated as personal: it needs a key either way.
|
|
119
|
+
const ok = r.scope === 'team' ? r.team_id !== null && r.team_id === held.team : held.personal;
|
|
120
|
+
if (!ok)
|
|
121
|
+
skipped[r.scope === 'team' ? 'teamLocked' : 'vaultLocked']++;
|
|
122
|
+
return ok;
|
|
123
|
+
});
|
|
124
|
+
return { ...parsed, rules, skipped };
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Remove one scope's rules from the cache when its key is locked, and count
|
|
128
|
+
* them as skipped, so the opened content does not stay readable on disk. Reads
|
|
129
|
+
* the file without the owner check: removing never needs to be ours. Returns
|
|
130
|
+
* how many were removed; a missing or damaged cache removes none. The file is
|
|
131
|
+
* rewritten 0600.
|
|
132
|
+
*/
|
|
133
|
+
export function purgeRules(scope, home = homedir()) {
|
|
134
|
+
let parsed;
|
|
135
|
+
try {
|
|
136
|
+
parsed = JSON.parse(readFileSync(rulesPath(home), 'utf8'));
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
return 0;
|
|
140
|
+
}
|
|
141
|
+
if (typeof parsed !== 'object' || parsed === null || !Array.isArray(parsed.rules))
|
|
142
|
+
return 0;
|
|
143
|
+
const isScope = (r) => (r.scope === 'team') === (scope === 'team');
|
|
144
|
+
const removed = parsed.rules.filter(isScope).length;
|
|
145
|
+
if (removed === 0)
|
|
146
|
+
return 0;
|
|
147
|
+
const skipped = readSkipped(parsed.skipped);
|
|
148
|
+
skipped[scope === 'team' ? 'teamLocked' : 'vaultLocked'] += removed;
|
|
149
|
+
// Never removed outright: the count just added is something to report.
|
|
150
|
+
writeRules({ ...parsed, rules: parsed.rules.filter((r) => !isScope(r)), skipped }, home);
|
|
151
|
+
return removed;
|
|
70
152
|
}
|
|
71
153
|
/** 0600: the patterns name what a team considers sensitive. */
|
|
72
154
|
export function writeRules(cached, home = homedir()) {
|
package/dist/rules.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../src/rules.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,EAAE;AACF,8EAA8E;AAC9E,2EAA2E;AAC3E,4EAA4E;AAC5E,2EAA2E;AAC3E,wBAAwB;AACxB,EAAE;AACF,iFAAiF;AACjF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7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,CAAC,KAAK,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,CAAA;IACpD,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,cAAc,CAAA;IAC7E,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAA;IACtC,IAAI,KAAK,GAAG,EAAE;QAAE,OAAO,GAAG,KAAK,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,CAAA;IACnE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,WAAW,CAAA;AAC7C,CAAC"}
|
package/dist/store.d.ts
CHANGED
|
@@ -62,5 +62,8 @@ export declare function saveMap(path: string, map: SymbolMap, options?: {
|
|
|
62
62
|
force?: boolean;
|
|
63
63
|
remote?: StoredMap['remote'];
|
|
64
64
|
}): void;
|
|
65
|
+
/** Throws when any of `paths` is a link: the store's files are written only
|
|
66
|
+
* where they appear to be (security audit 2026-11-01). */
|
|
67
|
+
export declare function refuseLinks(what: string, ...paths: string[]): void;
|
|
65
68
|
export declare function clearMap(path: string): boolean;
|
|
66
69
|
//# sourceMappingURL=store.d.ts.map
|
package/dist/store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9D,OAAO,EAAE,SAAS,EAAE,CAAA;AACpB,eAAO,MAAM,UAAU,aAAa,CAAA;AAEpC;;oCAEoC;AACpC,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQpD;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAG3E;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,SAAS,CAAA;IACd;qCACiC;IACjC,OAAO,EAAE,CAAC,CAAA;IACV;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE;QACP,EAAE,EAAE,MAAM,CAAA;QACV,oDAAoD;QACpD,SAAS,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAOD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,SAAS,CAYxE;AAED;;qEAEqE;AACrE,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAgB/C;AAED,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,SAAS,EACd,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAA;CAAO,GAC9D,IAAI,CAoCN;AAED;2DAC2D;AAC3D,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAElE;AAUD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAI9C"}
|
package/dist/store.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// The map holds real identifier names, so it is written 0600 and the store
|
|
9
9
|
// directory carries a .gitignore. Committing it would undo the anonymization
|
|
10
10
|
// for anyone reading the repo.
|
|
11
|
-
import { chmodSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
11
|
+
import { chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, rmSync, writeFileSync, } from 'node:fs';
|
|
12
12
|
import { dirname, join, resolve } from 'node:path';
|
|
13
13
|
import { STORE_DIR } from '@veilio-inc/engine';
|
|
14
14
|
export { STORE_DIR };
|
|
@@ -113,6 +113,9 @@ export function saveMap(path, map, options = {}) {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
const dir = dirname(path);
|
|
116
|
+
// Security audit 2026-11-01: a store that is a link (one a repository
|
|
117
|
+
// committed) would put the real names in a file outside the project.
|
|
118
|
+
refuseLinks('the map', dir, path);
|
|
116
119
|
mkdirSync(dir, { recursive: true });
|
|
117
120
|
// A store directory inside a repo must never be committed — it holds the real
|
|
118
121
|
// names the anonymization exists to hide.
|
|
@@ -129,6 +132,21 @@ export function saveMap(path, map, options = {}) {
|
|
|
129
132
|
// rewrite too so a pre-existing world-readable map gets locked down.
|
|
130
133
|
chmodSync(path, 0o600);
|
|
131
134
|
}
|
|
135
|
+
/** Throws when any of `paths` is a link: the store's files are written only
|
|
136
|
+
* where they appear to be (security audit 2026-11-01). */
|
|
137
|
+
export function refuseLinks(what, ...paths) {
|
|
138
|
+
for (const p of paths)
|
|
139
|
+
if (isLink(p))
|
|
140
|
+
throw new Error(`refusing to write ${what}: ${p} is a link`);
|
|
141
|
+
}
|
|
142
|
+
function isLink(path) {
|
|
143
|
+
try {
|
|
144
|
+
return lstatSync(path).isSymbolicLink();
|
|
145
|
+
}
|
|
146
|
+
catch {
|
|
147
|
+
return false; // not there yet
|
|
148
|
+
}
|
|
149
|
+
}
|
|
132
150
|
export function clearMap(path) {
|
|
133
151
|
if (!existsSync(path))
|
|
134
152
|
return false;
|
package/dist/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names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C,CAAA;AACxB,CAAC;AAED;2DAC2D;AAC3D,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,GAAG,KAAe;IAC1D,KAAK,MAAM,CAAC,IAAI,KAAK;QAAE,IAAI,MAAM,CAAC,CAAC,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,KAAK,CAAC,YAAY,CAAC,CAAA;AACpG,CAAC;AAED,SAAS,MAAM,CAAC,IAAY;IAC1B,IAAI,CAAC;QACH,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,CAAA;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA,CAAC,gBAAgB;IAC/B,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAA;IACnC,MAAM,CAAC,IAAI,CAAC,CAAA;IACZ,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/dist/team-anonymize.d.ts
CHANGED
|
@@ -50,7 +50,22 @@ export declare function anonymizeOverTeam(source: string, local: Record<string,
|
|
|
50
50
|
highest: Record<string, number>;
|
|
51
51
|
/** Placeholders the team's maps give different names: never emitted (spec 028). */
|
|
52
52
|
conflicts?: Record<string, number>;
|
|
53
|
-
}, options: Omit<AnonymizeOptions, 'existingMap'
|
|
53
|
+
}, options: Omit<AnonymizeOptions, 'existingMap' | 'team'>,
|
|
54
|
+
/**
|
|
55
|
+
* This checkout's blocks and local tag (spec 066 R3, from `teamNumbering`):
|
|
56
|
+
* new names go inside a usable block, else into the local family - never
|
|
57
|
+
* above the team's highest, which is where the next teammate's block starts.
|
|
58
|
+
* Absent: no team numbering applies, and new names go above the floor.
|
|
59
|
+
*/
|
|
60
|
+
numbering?: {
|
|
61
|
+
blocks: Record<string, {
|
|
62
|
+
start: number;
|
|
63
|
+
end: number;
|
|
64
|
+
}>;
|
|
65
|
+
tag: string;
|
|
66
|
+
/** Placeholders a publish retired (aliases.json): never minted again. */
|
|
67
|
+
retired?: readonly string[];
|
|
68
|
+
}): {
|
|
54
69
|
result: ReturnType<typeof anonymize>;
|
|
55
70
|
toPersist: Record<string, string>;
|
|
56
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team-anonymize.d.ts","sourceRoot":"","sources":["../src/team-anonymize.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"team-anonymize.d.ts","sourceRoot":"","sources":["../src/team-anonymize.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,SAAS,EAGT,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgBxB;AAED;;wEAEwE;AACxE,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAGzE;AAKD;;;;;;;;GAQG;AACH,qFAAqF;AACrF,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC5B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOxB;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,gBAAgB,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,EACnE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B,UAAU,CAAC,OAAO,SAAS,CAAC,CAsB9B;AAED;;;;;;GAMG;AACH,wBAAgB,i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AAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC,CAAA;AAE5D,gEAAgE;AAChE,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,WAAW,EAAE,MAAM;CAIhC;AAED,gFAAgF;AAChF,qBAAa,iBAAkB,SAAQ,KAAK;IAC9B,QAAQ,CAAC,KAAK,EAAE,OAAO;gBAAd,KAAK,EAAE,OAAO;CAIpC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,IAAI,EAAE;IACJ,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACnC,EACD,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,aAAa,CAAC,EAC9C,OAAO,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,MAAM,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC,CA0DtF"}
|
package/dist/team-anonymize.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// 2026-09-30 walk). It lived in the MCP server, so the CLI numbered from the
|
|
4
4
|
// project's own map only and gave a member's terminal placeholders that meant
|
|
5
5
|
// something else in the team.
|
|
6
|
-
import { anonymize } from '@veilio-inc/engine';
|
|
6
|
+
import { anonymize, isSaneBlock, MAX_PLACEHOLDER_NUMBER, } from '@veilio-inc/engine';
|
|
7
7
|
/**
|
|
8
8
|
* The map handed to the engine to anonymize: this project's store and the
|
|
9
9
|
* team's namespace, reconciled so that nothing emitted can mean something else
|
|
@@ -68,8 +68,8 @@ export function floorsWith(highest, local) {
|
|
|
68
68
|
const floors = { ...highest };
|
|
69
69
|
for (const placeholder of Object.keys(local)) {
|
|
70
70
|
const m = NUMBERED.exec(placeholder);
|
|
71
|
-
if (m &&
|
|
72
|
-
floors[m[1]] =
|
|
71
|
+
if (m && counted(m[2]) > (floors[m[1]] ?? 0))
|
|
72
|
+
floors[m[1]] = counted(m[2]);
|
|
73
73
|
}
|
|
74
74
|
return floors;
|
|
75
75
|
}
|
|
@@ -77,12 +77,16 @@ export function anonymizeAbove(source, options, floors) {
|
|
|
77
77
|
const inMap = {};
|
|
78
78
|
for (const p of Object.keys(options.existingMap)) {
|
|
79
79
|
const m = NUMBERED.exec(p);
|
|
80
|
-
if (m &&
|
|
81
|
-
inMap[m[1]] =
|
|
80
|
+
if (m && counted(m[2]) > (inMap[m[1]] ?? 0))
|
|
81
|
+
inMap[m[1]] = counted(m[2]);
|
|
82
82
|
}
|
|
83
83
|
const seeded = { ...options.existingMap };
|
|
84
84
|
for (const [base, floor] of Object.entries(floors)) {
|
|
85
|
-
|
|
85
|
+
// Never above 1e8 (the engine ignores it there) and never over an entry
|
|
86
|
+
// the map holds: the marker is dropped from the result, and the entry with it.
|
|
87
|
+
if (floor > (inMap[base] ?? 0) &&
|
|
88
|
+
floor <= MAX_PLACEHOLDER_NUMBER &&
|
|
89
|
+
!(`${base}${floor}` in options.existingMap))
|
|
86
90
|
seeded[`${base}${floor}`] = `${FLOOR_MARKER}${base}`;
|
|
87
91
|
}
|
|
88
92
|
const result = anonymize(source, { ...options, existingMap: seeded });
|
|
@@ -96,13 +100,30 @@ export function anonymizeAbove(source, options, floors) {
|
|
|
96
100
|
* team's namespace (spec 005 US4: those would outlive the entitlement that
|
|
97
101
|
* fetched them).
|
|
98
102
|
*/
|
|
99
|
-
export function anonymizeOverTeam(source, local, team, options
|
|
103
|
+
export function anonymizeOverTeam(source, local, team, options,
|
|
104
|
+
/**
|
|
105
|
+
* This checkout's blocks and local tag (spec 066 R3, from `teamNumbering`):
|
|
106
|
+
* new names go inside a usable block, else into the local family - never
|
|
107
|
+
* above the team's highest, which is where the next teammate's block starts.
|
|
108
|
+
* Absent: no team numbering applies, and new names go above the floor.
|
|
109
|
+
*/
|
|
110
|
+
numbering) {
|
|
100
111
|
// A disputed placeholder keeps its first meaning in the engine's namespace
|
|
101
112
|
// (for numbering); it is never emitted - the name gets a fresh number above
|
|
102
113
|
// it (code review, spec 030: scrub emitted it, the MCP never did).
|
|
103
114
|
const settled = Object.fromEntries(Object.entries(team.namespace).filter(([p]) => !(p in (team.conflicts ?? {}))));
|
|
104
115
|
const existingMap = mergeNamespace(local, settled);
|
|
105
|
-
const result =
|
|
116
|
+
const result = numbering
|
|
117
|
+
? anonymize(source, {
|
|
118
|
+
...options,
|
|
119
|
+
existingMap,
|
|
120
|
+
team: {
|
|
121
|
+
blocks: numbering.blocks,
|
|
122
|
+
tag: numbering.tag,
|
|
123
|
+
...(numbering.retired?.length ? { retired: numbering.retired } : {}),
|
|
124
|
+
},
|
|
125
|
+
})
|
|
126
|
+
: anonymizeAbove(source, { ...options, existingMap }, floorsWith(team.highest, local));
|
|
106
127
|
return { result, toPersist: persisted(local, result, settled) };
|
|
107
128
|
}
|
|
108
129
|
// ─── reserved numbering ──────────────────────────────────────────────────────
|
|
@@ -122,13 +143,18 @@ export function anonymizeOverTeam(source, local, team, options) {
|
|
|
122
143
|
// publishes a shared map (FR-009) and so must never reach the network to
|
|
123
144
|
// reserve. An agent that reserved numbers it then discarded would consume the
|
|
124
145
|
// team's allocation on every tool call.
|
|
146
|
+
/** A placeholder's number as a floor: one above 1e8 (planted) counts as none. */
|
|
147
|
+
function counted(digits) {
|
|
148
|
+
const n = Number(digits);
|
|
149
|
+
return n <= MAX_PLACEHOLDER_NUMBER ? n : 0;
|
|
150
|
+
}
|
|
125
151
|
/** Highest number per base in a map. */
|
|
126
152
|
export function highestPerBase(map) {
|
|
127
153
|
const out = {};
|
|
128
154
|
for (const placeholder of Object.keys(map)) {
|
|
129
155
|
const m = NUMBERED.exec(placeholder);
|
|
130
|
-
if (m &&
|
|
131
|
-
out[m[1]] =
|
|
156
|
+
if (m && counted(m[2]) > (out[m[1]] ?? 0))
|
|
157
|
+
out[m[1]] = counted(m[2]);
|
|
132
158
|
}
|
|
133
159
|
return out;
|
|
134
160
|
}
|
|
@@ -145,8 +171,8 @@ const TOKEN = /(?<![A-Za-z0-9_$])(__[A-Z][A-Z0-9_]*__)(\d+)(?![A-Za-z0-9_$])/g;
|
|
|
145
171
|
export function highestInText(text) {
|
|
146
172
|
const out = {};
|
|
147
173
|
for (const m of text.matchAll(TOKEN)) {
|
|
148
|
-
if (
|
|
149
|
-
out[m[1]] =
|
|
174
|
+
if (counted(m[2]) > (out[m[1]] ?? 0))
|
|
175
|
+
out[m[1]] = counted(m[2]);
|
|
150
176
|
}
|
|
151
177
|
return out;
|
|
152
178
|
}
|
|
@@ -225,7 +251,7 @@ export async function reservedAnonymizeOverTeam(source, local, team, options, re
|
|
|
225
251
|
const floors = {};
|
|
226
252
|
for (const { base } of requests) {
|
|
227
253
|
const range = byBase.get(base);
|
|
228
|
-
if (!range)
|
|
254
|
+
if (!range || !isSaneBlock(range))
|
|
229
255
|
throw new ReservationMismatch(`${base}*`);
|
|
230
256
|
floors[base] = range.start - 1;
|
|
231
257
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team-anonymize.js","sourceRoot":"","sources":["../src/team-anonymize.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,+EAA+E;AAC/E,6EAA6E;AAC7E,8EAA8E;AAC9E,8BAA8B;AAE9B,OAAO,
|
|
1
|
+
{"version":3,"file":"team-anonymize.js","sourceRoot":"","sources":["../src/team-anonymize.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,+EAA+E;AAC/E,6EAA6E;AAC7E,8EAA8E;AAC9E,8BAA8B;AAE9B,OAAO,EACL,SAAS,EACT,WAAW,EACX,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AAC,WAAW,CACnB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAC/B,CAAC,CAAC,WAAW,CAAC,EAAE,EAAE,CAChB,CAAC,CAAC,WAAW,IAAI,OAAO,CAAC;YACzB,WAAW,IAAI,KAAK;YACpB,cAAc,CAAC,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,CACjD,CACF;KACF,CAAA;AACH,CAAC"}
|
package/dist/team-namespace.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type TeamNamespaceAnalysis } from '@veilio-inc/engine';
|
|
1
|
+
import { type CryptoKeyLike, type TeamNamespaceAnalysis } from '@veilio-inc/engine';
|
|
2
2
|
import { type Credential } from './credential.js';
|
|
3
|
-
import { type CloudMapList } from './cloud.js';
|
|
3
|
+
import { type CloudMapList, type PlaceholderReservation } from './cloud.js';
|
|
4
4
|
import { type Env } from './client/project-scope.js';
|
|
5
5
|
import type { Refusal } from './client/wording.js';
|
|
6
6
|
export type TeamNamespaceResult =
|
|
@@ -13,6 +13,8 @@ export type TeamNamespaceResult =
|
|
|
13
13
|
{
|
|
14
14
|
status: 'team';
|
|
15
15
|
analysis: TeamNamespaceAnalysis;
|
|
16
|
+
/** Spec 063: placeholders whose number another member reserved (also in analysis.conflicts). */
|
|
17
|
+
misattributed?: string[];
|
|
16
18
|
conflictDetection: boolean;
|
|
17
19
|
/**
|
|
18
20
|
* The team whose namespace this is, for reserving placeholder numbers
|
|
@@ -42,14 +44,27 @@ export type TeamNamespaceResult =
|
|
|
42
44
|
excluded?: {
|
|
43
45
|
map: Record<string, string> | null;
|
|
44
46
|
};
|
|
47
|
+
/** Spec 063: who holds which of the team's numbers, as the read listed
|
|
48
|
+
* them. Absent on an instance that keeps no record. */
|
|
49
|
+
reservations?: PlaceholderReservation[];
|
|
50
|
+
/** Round 4 (D): placeholders numbered outside every run the server
|
|
51
|
+
* issued for their base: no floor, and above the base's highest issued
|
|
52
|
+
* number, left by restore. */
|
|
53
|
+
unvouched?: number;
|
|
54
|
+
/** Round 4 (D): those above the base's highest issued number (also in
|
|
55
|
+
* analysis.conflicts): restore leaves them. */
|
|
56
|
+
unissued?: string[];
|
|
45
57
|
}
|
|
46
58
|
/** Nothing to read: signed out, or not in a team. The local namespace is right. */
|
|
47
59
|
| {
|
|
48
60
|
status: 'local';
|
|
49
61
|
}
|
|
50
|
-
/** In a team, but no team key on this machine: `veilio team unlock`.
|
|
62
|
+
/** In a team, but no team key on this machine: `veilio team unlock`.
|
|
63
|
+
* `teamId`: which team, so new names can still be numbered from this
|
|
64
|
+
* checkout's reserved.json (spec 066). */
|
|
51
65
|
| {
|
|
52
66
|
status: 'locked';
|
|
67
|
+
teamId?: string;
|
|
53
68
|
}
|
|
54
69
|
/** In a team, and the maps could not be read. `reason` says why. */
|
|
55
70
|
| {
|
|
@@ -103,17 +118,57 @@ export declare function resolveTeamNamespace(home: string | undefined, opts: Res
|
|
|
103
118
|
status: 'refused';
|
|
104
119
|
}>>;
|
|
105
120
|
export declare function resolveTeamNamespace(home?: string, opts?: ResolveOptions): Promise<TeamNamespaceResult>;
|
|
121
|
+
/**
|
|
122
|
+
* Placeholders the team's maps give a name although the member who reserved
|
|
123
|
+
* the number published no map that gives it that name. A number in no
|
|
124
|
+
* reservation (from before spec 063) is not judged: it restores as before.
|
|
125
|
+
*/
|
|
126
|
+
export declare function misattributedIn(analysis: {
|
|
127
|
+
namespace: Record<string, string>;
|
|
128
|
+
aliases: Record<string, string>;
|
|
129
|
+
}, entries: readonly {
|
|
130
|
+
owner?: string;
|
|
131
|
+
map: Record<string, string> | null;
|
|
132
|
+
}[], reservations: readonly PlaceholderReservation[],
|
|
133
|
+
/** The team's raw keys: a rule's base is listed under its hash (Cloud audit M1). */
|
|
134
|
+
keys?: readonly Uint8Array[]): string[];
|
|
135
|
+
export { misattributedNote, unissuedNote } from './reservations.js';
|
|
136
|
+
/**
|
|
137
|
+
* Round 4 (D): a team's numbers, judged against the runs the server issued.
|
|
138
|
+
* Only a number inside an issued run of its base floors it (`highest`); a
|
|
139
|
+
* base never reserved keeps its maps' floor up to 10000, the server's own
|
|
140
|
+
* margin, so maps numbered before the team existed still floor its first
|
|
141
|
+
* run. A number outside every run is unvouched, and `beyond` holds those
|
|
142
|
+
* above the base's highest issued number: restore leaves them, as it leaves
|
|
143
|
+
* a disputed one. At or below it, a number from before spec 063 restores as
|
|
144
|
+
* before. (A legacy number above 10000 on a base never reserved floors
|
|
145
|
+
* nothing: teams from before spec 063 exist only on staging.)
|
|
146
|
+
*/
|
|
147
|
+
export declare function vouchNumbers(maps: readonly (Record<string, string> | null)[], reservations: readonly PlaceholderReservation[], keys: readonly Uint8Array[],
|
|
148
|
+
/** The server's highest per listed base, when it said: the restore threshold. */
|
|
149
|
+
served?: Record<string, number>): {
|
|
150
|
+
highest: Record<string, number>;
|
|
151
|
+
beyond: string[];
|
|
152
|
+
unvouched: number;
|
|
153
|
+
};
|
|
106
154
|
/** `"billing" (m-1), m-2` - the names a person recognises, beside the ids they
|
|
107
155
|
* would type to remove one. Five at most, then a count. */
|
|
108
156
|
export declare function describeMaps(maps: readonly {
|
|
109
157
|
id: string;
|
|
110
158
|
name: string | null;
|
|
111
159
|
}[]): string;
|
|
160
|
+
/**
|
|
161
|
+
* The team keys this machine has unlocked. Absent, expired, for another
|
|
162
|
+
* account or another team all read the same way: none.
|
|
163
|
+
*/
|
|
164
|
+
export declare function heldTeamKeys(credential: Credential, home: string | undefined, teamId: string): Promise<{
|
|
165
|
+
version: number;
|
|
166
|
+
key: CryptoKeyLike;
|
|
167
|
+
}[]>;
|
|
112
168
|
/**
|
|
113
169
|
* What a restore says when it needed the team's maps and did not get them -
|
|
114
170
|
* the same words from `veilio restore` and the MCP's `restore_text`.
|
|
115
171
|
* `missing`: the placeholders the own map could not explain.
|
|
116
172
|
*/
|
|
117
173
|
export declare function teamLayerNote(result: TeamNamespaceResult, missing: readonly string[]): string | null;
|
|
118
|
-
export {};
|
|
119
174
|
//# sourceMappingURL=team-namespace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team-namespace.d.ts","sourceRoot":"","sources":["../src/team-namespace.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"team-namespace.d.ts","sourceRoot":"","sources":["../src/team-namespace.ts"],"names":[],"mappings":"AAcA,OAAO,EAOL,KAAK,aAAa,EAIlB,KAAK,qBAAqB,EAC3B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAqD,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEpG,OAAO,EAML,KAAK,YAAY,EAEjB,KAAK,sBAAsB,EAC5B,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAoC,KAAK,GAAG,EAAE,MAAM,2BAA2B,CAAA;AACtF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,MAAM,MAAM,mBAAmB;AAC7B;;;;;GAKG;AACD;IACE,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,qBAAqB,CAAA;IAC/B,gGAAgG;IAChG,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,iBAAiB,EAAE,OAAO,CAAA;IAC1B;;;;;;;OAOG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB;;;;;OAKG;IACH,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,EAAE,CAAA;IACjD;;;;;OAKG;IACH,QAAQ,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAA;KAAE,CAAA;IACjD;4DACwD;IACxD,YAAY,CAAC,EAAE,sBAAsB,EAAE,CAAA;IACvC;;mCAE+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;oDACgD;IAChD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACp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