usertrust 0.2.2 → 0.2.4
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/dist/audit/canonical.d.ts.map +1 -1
- package/dist/audit/canonical.js +11 -0
- package/dist/audit/canonical.js.map +1 -1
- package/dist/audit/chain.d.ts +1 -1
- package/dist/audit/chain.d.ts.map +1 -1
- package/dist/audit/chain.js +104 -57
- package/dist/audit/chain.js.map +1 -1
- package/dist/audit/rotation.d.ts +1 -1
- package/dist/audit/rotation.js +1 -1
- package/dist/audit/verify.d.ts +1 -0
- package/dist/audit/verify.d.ts.map +1 -1
- package/dist/audit/verify.js +13 -3
- package/dist/audit/verify.js.map +1 -1
- package/dist/board/board.d.ts +1 -1
- package/dist/board/board.js +1 -1
- package/dist/detect.d.ts +19 -2
- package/dist/detect.d.ts.map +1 -1
- package/dist/detect.js +7 -2
- package/dist/detect.js.map +1 -1
- package/dist/govern.d.ts +2 -0
- package/dist/govern.d.ts.map +1 -1
- package/dist/govern.js +378 -260
- package/dist/govern.js.map +1 -1
- package/dist/ledger/engine.d.ts +1 -1
- package/dist/ledger/engine.d.ts.map +1 -1
- package/dist/ledger/engine.js +35 -12
- package/dist/ledger/engine.js.map +1 -1
- package/dist/memory/patterns.d.ts +4 -1
- package/dist/memory/patterns.d.ts.map +1 -1
- package/dist/memory/patterns.js +46 -14
- package/dist/memory/patterns.js.map +1 -1
- package/dist/policy/gate.d.ts.map +1 -1
- package/dist/policy/gate.js +38 -6
- package/dist/policy/gate.js.map +1 -1
- package/dist/proxy.d.ts +3 -0
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +14 -0
- package/dist/proxy.js.map +1 -1
- package/dist/resilience/scope.d.ts +32 -4
- package/dist/resilience/scope.d.ts.map +1 -1
- package/dist/resilience/scope.js +83 -35
- package/dist/resilience/scope.js.map +1 -1
- package/dist/shared/errors.d.ts +14 -0
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/errors.js +49 -7
- package/dist/shared/errors.js.map +1 -1
- package/package.json +1 -1
package/dist/resilience/scope.js
CHANGED
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
* Each lease locks a set of glob patterns; overlapping patterns from different
|
|
8
8
|
* actors are rejected.
|
|
9
9
|
*
|
|
10
|
-
* Store path: `.
|
|
10
|
+
* Store path: `.usertrust/leases.json`
|
|
11
11
|
*/
|
|
12
|
+
import { randomUUID } from "node:crypto";
|
|
12
13
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
13
14
|
import { join } from "node:path";
|
|
14
15
|
import { minimatch } from "minimatch";
|
|
@@ -16,33 +17,39 @@ import { VAULT_DIR } from "../shared/constants.js";
|
|
|
16
17
|
// ---------------------------------------------------------------------------
|
|
17
18
|
// Path Resolution
|
|
18
19
|
// ---------------------------------------------------------------------------
|
|
19
|
-
let
|
|
20
|
+
let moduleStoreDir = join(process.cwd(), VAULT_DIR);
|
|
20
21
|
/**
|
|
21
22
|
* Set the store directory path (for testing).
|
|
23
|
+
*
|
|
24
|
+
* @deprecated Use the `storeDir` constructor parameter on `ScopeManager` instead.
|
|
25
|
+
* This function mutates module-level state shared by all ScopeManager instances
|
|
26
|
+
* that were created without an explicit storeDir.
|
|
22
27
|
*/
|
|
23
28
|
export function setStoreDir(dir) {
|
|
24
|
-
|
|
29
|
+
moduleStoreDir = dir;
|
|
25
30
|
}
|
|
26
31
|
/**
|
|
27
|
-
* Get the current store directory.
|
|
32
|
+
* Get the current module-level store directory.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated Use the `storeDir` constructor parameter on `ScopeManager` instead.
|
|
28
35
|
*/
|
|
29
36
|
export function getStoreDir() {
|
|
30
|
-
return
|
|
37
|
+
return moduleStoreDir;
|
|
31
38
|
}
|
|
32
|
-
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
// File Operations (parameterized by storeDir)
|
|
41
|
+
// ---------------------------------------------------------------------------
|
|
42
|
+
function getLeasesPath(storeDir) {
|
|
33
43
|
return join(storeDir, "leases.json");
|
|
34
44
|
}
|
|
35
|
-
function ensureStoreDir() {
|
|
45
|
+
function ensureStoreDir(storeDir) {
|
|
36
46
|
if (!existsSync(storeDir)) {
|
|
37
47
|
mkdirSync(storeDir, { recursive: true });
|
|
38
48
|
}
|
|
39
49
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
function readLeases() {
|
|
44
|
-
ensureStoreDir();
|
|
45
|
-
const path = getLeasesPath();
|
|
50
|
+
function readLeases(storeDir) {
|
|
51
|
+
ensureStoreDir(storeDir);
|
|
52
|
+
const path = getLeasesPath(storeDir);
|
|
46
53
|
if (!existsSync(path)) {
|
|
47
54
|
return {};
|
|
48
55
|
}
|
|
@@ -54,16 +61,15 @@ function readLeases() {
|
|
|
54
61
|
return {};
|
|
55
62
|
}
|
|
56
63
|
}
|
|
57
|
-
function writeLeases(store) {
|
|
58
|
-
ensureStoreDir();
|
|
59
|
-
writeFileSync(getLeasesPath(), JSON.stringify(store, null, "\t"));
|
|
64
|
+
function writeLeases(store, storeDir) {
|
|
65
|
+
ensureStoreDir(storeDir);
|
|
66
|
+
writeFileSync(getLeasesPath(storeDir), JSON.stringify(store, null, "\t"));
|
|
60
67
|
}
|
|
61
68
|
// ---------------------------------------------------------------------------
|
|
62
|
-
// ID Generation
|
|
69
|
+
// ID Generation (AUD-466: crypto.randomUUID replaces Math.random)
|
|
63
70
|
// ---------------------------------------------------------------------------
|
|
64
71
|
function generateLeaseId() {
|
|
65
|
-
|
|
66
|
-
return `ls_${hex}`;
|
|
72
|
+
return `ls_${randomUUID().replace(/-/g, "").substring(0, 16)}`;
|
|
67
73
|
}
|
|
68
74
|
// ---------------------------------------------------------------------------
|
|
69
75
|
// Scope Overlap
|
|
@@ -111,18 +117,35 @@ export function fileMatchesScope(file, scope) {
|
|
|
111
117
|
*
|
|
112
118
|
* Provides `acquireLease`, `releaseLease`, `findConflicts`, and `expireStale`
|
|
113
119
|
* for coordinating parallel workers operating on overlapping file scopes.
|
|
120
|
+
*
|
|
121
|
+
* AUD-465: Accepts an optional `storeDir` constructor parameter to avoid
|
|
122
|
+
* reliance on module-level mutable state. Falls back to the module-level
|
|
123
|
+
* `moduleStoreDir` for backward compatibility.
|
|
114
124
|
*/
|
|
115
125
|
export class ScopeManager {
|
|
116
126
|
clock;
|
|
117
|
-
|
|
118
|
-
|
|
127
|
+
storeDir;
|
|
128
|
+
/**
|
|
129
|
+
* @param optionsOrClock - Either an options object `{ clock?, storeDir? }`
|
|
130
|
+
* or a legacy clock function `() => number` for backward compatibility.
|
|
131
|
+
*/
|
|
132
|
+
constructor(optionsOrClock) {
|
|
133
|
+
if (typeof optionsOrClock === "function") {
|
|
134
|
+
// Legacy constructor: ScopeManager(clock)
|
|
135
|
+
this.clock = optionsOrClock;
|
|
136
|
+
this.storeDir = moduleStoreDir;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
this.clock = optionsOrClock?.clock ?? Date.now;
|
|
140
|
+
this.storeDir = optionsOrClock?.storeDir ?? moduleStoreDir;
|
|
141
|
+
}
|
|
119
142
|
}
|
|
120
143
|
/**
|
|
121
144
|
* Acquire a lease for the given scope.
|
|
122
145
|
* Throws if scope overlaps with another actor's active lease.
|
|
123
146
|
*/
|
|
124
147
|
acquireLease(options) {
|
|
125
|
-
const store = readLeases();
|
|
148
|
+
const store = readLeases(this.storeDir);
|
|
126
149
|
const ttlMin = options.ttlMin ?? 60;
|
|
127
150
|
// Expire stale leases first
|
|
128
151
|
this.expireStaleInStore(store);
|
|
@@ -147,14 +170,28 @@ export class ScopeManager {
|
|
|
147
170
|
status: "active",
|
|
148
171
|
};
|
|
149
172
|
store[leaseId] = lease;
|
|
150
|
-
writeLeases(store);
|
|
173
|
+
writeLeases(store, this.storeDir);
|
|
151
174
|
return lease;
|
|
152
175
|
}
|
|
153
176
|
/**
|
|
154
177
|
* Renew an existing lease, extending its TTL.
|
|
178
|
+
*
|
|
179
|
+
* AUD-466: When `actor` is provided, verifies the caller matches the lease
|
|
180
|
+
* owner to prevent unauthorized renewal by a different actor. Callers SHOULD
|
|
181
|
+
* always pass `actor` — omitting it is supported only for backward
|
|
182
|
+
* compatibility and will be removed in a future major version.
|
|
155
183
|
*/
|
|
156
|
-
renewLease(leaseId, ttlMin
|
|
157
|
-
|
|
184
|
+
renewLease(leaseId, actorOrTtl, ttlMin) {
|
|
185
|
+
let actor;
|
|
186
|
+
let ttl;
|
|
187
|
+
if (typeof actorOrTtl === "string") {
|
|
188
|
+
actor = actorOrTtl;
|
|
189
|
+
ttl = ttlMin ?? 60;
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
ttl = actorOrTtl ?? 60;
|
|
193
|
+
}
|
|
194
|
+
const store = readLeases(this.storeDir);
|
|
158
195
|
const lease = store[leaseId];
|
|
159
196
|
if (!lease) {
|
|
160
197
|
throw new Error(`Lease ${leaseId} not found`);
|
|
@@ -162,29 +199,40 @@ export class ScopeManager {
|
|
|
162
199
|
if (lease.status !== "active") {
|
|
163
200
|
throw new Error(`Lease ${leaseId} is ${lease.status}, cannot renew`);
|
|
164
201
|
}
|
|
165
|
-
|
|
202
|
+
if (actor !== undefined && lease.actor !== actor) {
|
|
203
|
+
throw new Error(`Actor "${actor}" cannot renew lease ${leaseId} owned by "${lease.actor}"`);
|
|
204
|
+
}
|
|
205
|
+
lease.expires_at = new Date(this.clock() + ttl * 60_000).toISOString();
|
|
166
206
|
lease.last_renewed_at = new Date(this.clock()).toISOString();
|
|
167
|
-
writeLeases(store);
|
|
207
|
+
writeLeases(store, this.storeDir);
|
|
168
208
|
return lease;
|
|
169
209
|
}
|
|
170
210
|
/**
|
|
171
211
|
* Release a lease, marking it as released.
|
|
212
|
+
*
|
|
213
|
+
* AUD-466: When `actor` is provided, verifies the caller matches the lease
|
|
214
|
+
* owner to prevent unauthorized release by a different actor. Callers SHOULD
|
|
215
|
+
* always pass `actor` — omitting it is supported only for backward
|
|
216
|
+
* compatibility and will be removed in a future major version.
|
|
172
217
|
*/
|
|
173
|
-
releaseLease(leaseId) {
|
|
174
|
-
const store = readLeases();
|
|
218
|
+
releaseLease(leaseId, actor) {
|
|
219
|
+
const store = readLeases(this.storeDir);
|
|
175
220
|
const lease = store[leaseId];
|
|
176
221
|
if (!lease) {
|
|
177
222
|
throw new Error(`Lease ${leaseId} not found`);
|
|
178
223
|
}
|
|
224
|
+
if (actor !== undefined && lease.actor !== actor) {
|
|
225
|
+
throw new Error(`Actor "${actor}" cannot release lease ${leaseId} owned by "${lease.actor}"`);
|
|
226
|
+
}
|
|
179
227
|
lease.status = "released";
|
|
180
|
-
writeLeases(store);
|
|
228
|
+
writeLeases(store, this.storeDir);
|
|
181
229
|
return lease;
|
|
182
230
|
}
|
|
183
231
|
/**
|
|
184
232
|
* Find conflicts for a proposed scope against active leases.
|
|
185
233
|
*/
|
|
186
234
|
findConflicts(scope, excludeActor) {
|
|
187
|
-
const store = readLeases();
|
|
235
|
+
const store = readLeases(this.storeDir);
|
|
188
236
|
this.expireStaleInStore(store);
|
|
189
237
|
return this.findConflictsInStore(store, scope, excludeActor);
|
|
190
238
|
}
|
|
@@ -193,10 +241,10 @@ export class ScopeManager {
|
|
|
193
241
|
* Returns the number of leases expired.
|
|
194
242
|
*/
|
|
195
243
|
expireStale() {
|
|
196
|
-
const store = readLeases();
|
|
244
|
+
const store = readLeases(this.storeDir);
|
|
197
245
|
const count = this.expireStaleInStore(store);
|
|
198
246
|
if (count > 0) {
|
|
199
|
-
writeLeases(store);
|
|
247
|
+
writeLeases(store, this.storeDir);
|
|
200
248
|
}
|
|
201
249
|
return count;
|
|
202
250
|
}
|
|
@@ -204,14 +252,14 @@ export class ScopeManager {
|
|
|
204
252
|
* Get all active leases.
|
|
205
253
|
*/
|
|
206
254
|
getActiveLeases() {
|
|
207
|
-
const store = readLeases();
|
|
255
|
+
const store = readLeases(this.storeDir);
|
|
208
256
|
return Object.values(store).filter((l) => l.status === "active");
|
|
209
257
|
}
|
|
210
258
|
/**
|
|
211
259
|
* Get a lease by ID.
|
|
212
260
|
*/
|
|
213
261
|
getLease(leaseId) {
|
|
214
|
-
const store = readLeases();
|
|
262
|
+
const store = readLeases(this.storeDir);
|
|
215
263
|
return store[leaseId];
|
|
216
264
|
}
|
|
217
265
|
// ── Private helpers ──
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../src/resilience/scope.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AAEjC;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAoCnD,8EAA8E;AAC9E,kBAAkB;AAClB,8EAA8E;AAE9E,IAAI,
|
|
1
|
+
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../src/resilience/scope.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AAEjC;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAoCnD,8EAA8E;AAC9E,kBAAkB;AAClB,8EAA8E;AAE9E,IAAI,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW;IACt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AAC,CAAC;YACJ,CAAC;QACF,CAAC;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;IAEO,kBAAkB,CAAC,KAAiB;QAC3C,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QACnC,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1C,IAAI,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,GAAG,EAAE,CAAC;gBACnE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;gBACzB,KAAK,EAAE,CAAC;YACT,CAAC;QACF,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC;CACD"}
|
package/dist/shared/errors.d.ts
CHANGED
|
@@ -2,30 +2,44 @@ export declare class InsufficientBalanceError extends Error {
|
|
|
2
2
|
readonly userId: string;
|
|
3
3
|
readonly required: number;
|
|
4
4
|
readonly available: number;
|
|
5
|
+
readonly hint: string;
|
|
6
|
+
readonly docsUrl: string;
|
|
5
7
|
constructor(userId: string, required: number, available: number);
|
|
6
8
|
}
|
|
7
9
|
export declare class PolicyDeniedError extends Error {
|
|
8
10
|
readonly reason: string;
|
|
11
|
+
readonly hint: string;
|
|
12
|
+
readonly docsUrl: string;
|
|
9
13
|
constructor(reason: string);
|
|
10
14
|
}
|
|
11
15
|
export declare class AccountNotFoundError extends Error {
|
|
12
16
|
readonly userId: string;
|
|
17
|
+
readonly hint: string;
|
|
18
|
+
readonly docsUrl: string;
|
|
13
19
|
constructor(userId: string);
|
|
14
20
|
}
|
|
15
21
|
export declare class IdempotencyConflictError extends Error {
|
|
16
22
|
readonly key: string;
|
|
23
|
+
readonly hint: string;
|
|
24
|
+
readonly docsUrl: string;
|
|
17
25
|
constructor(key: string);
|
|
18
26
|
}
|
|
19
27
|
export declare class LedgerUnavailableError extends Error {
|
|
20
28
|
readonly cause_message: string;
|
|
29
|
+
readonly hint: string;
|
|
30
|
+
readonly docsUrl: string;
|
|
21
31
|
constructor(reason: string);
|
|
22
32
|
}
|
|
23
33
|
export declare class AuditDegradedError extends Error {
|
|
24
34
|
readonly cause_message: string;
|
|
35
|
+
readonly hint: string;
|
|
36
|
+
readonly docsUrl: string;
|
|
25
37
|
constructor(reason: string);
|
|
26
38
|
}
|
|
27
39
|
export declare class VaultNotInitializedError extends Error {
|
|
28
40
|
readonly path: string;
|
|
41
|
+
readonly hint: string;
|
|
42
|
+
readonly docsUrl: string;
|
|
29
43
|
constructor(path: string);
|
|
30
44
|
}
|
|
31
45
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"AAGA,qBAAa,wBAAyB,SAAQ,KAAK;IAClD,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,SAAS,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"AAGA,qBAAa,wBAAyB,SAAQ,KAAK;IAClD,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,OAAO,EAAE,MAAM,CAAC;gBAEpB,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAa/D;AAED,qBAAa,iBAAkB,SAAQ,KAAK;IAC3C,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,OAAO,EAAE,MAAM,CAAC;gBAEpB,MAAM,EAAE,MAAM;CAU1B;AAED,qBAAa,oBAAqB,SAAQ,KAAK;IAC9C,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,OAAO,EAAE,MAAM,CAAC;gBAEpB,MAAM,EAAE,MAAM;CAU1B;AAED,qBAAa,wBAAyB,SAAQ,KAAK;IAClD,SAAgB,GAAG,EAAE,MAAM,CAAC;IAC5B,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,OAAO,EAAE,MAAM,CAAC;gBAEpB,GAAG,EAAE,MAAM;CASvB;AAED,qBAAa,sBAAuB,SAAQ,KAAK;IAChD,SAAgB,aAAa,EAAE,MAAM,CAAC;IACtC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,OAAO,EAAE,MAAM,CAAC;gBAEpB,MAAM,EAAE,MAAM;CAU1B;AAED,qBAAa,kBAAmB,SAAQ,KAAK;IAC5C,SAAgB,aAAa,EAAE,MAAM,CAAC;IACtC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,OAAO,EAAE,MAAM,CAAC;gBAEpB,MAAM,EAAE,MAAM;CAS1B;AAED,qBAAa,wBAAyB,SAAQ,KAAK;IAClD,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,OAAO,EAAE,MAAM,CAAC;gBAEpB,IAAI,EAAE,MAAM;CASxB"}
|
package/dist/shared/errors.js
CHANGED
|
@@ -4,60 +4,102 @@ export class InsufficientBalanceError extends Error {
|
|
|
4
4
|
userId;
|
|
5
5
|
required;
|
|
6
6
|
available;
|
|
7
|
+
hint;
|
|
8
|
+
docsUrl;
|
|
7
9
|
constructor(userId, required, available) {
|
|
8
|
-
|
|
10
|
+
const hint = "Increase the budget in trust() options or add funds via the ledger.";
|
|
11
|
+
const docsUrl = "https://usertrust.ai/docs/errors/insufficient-balance";
|
|
12
|
+
super(`Insufficient balance for user ${userId}: need ${required}, have ${available}\n\n Hint: ${hint}\n Docs: ${docsUrl}`);
|
|
9
13
|
this.name = "InsufficientBalanceError";
|
|
10
14
|
this.userId = userId;
|
|
11
15
|
this.required = required;
|
|
12
16
|
this.available = available;
|
|
17
|
+
this.hint = hint;
|
|
18
|
+
this.docsUrl = docsUrl;
|
|
13
19
|
}
|
|
14
20
|
}
|
|
15
21
|
export class PolicyDeniedError extends Error {
|
|
16
22
|
reason;
|
|
23
|
+
hint;
|
|
24
|
+
docsUrl;
|
|
17
25
|
constructor(reason) {
|
|
18
|
-
|
|
26
|
+
const hint = 'Check your policy rules in .usertrust/policies/ or use { pii: "warn" } to downgrade PII enforcement.';
|
|
27
|
+
const docsUrl = "https://usertrust.ai/docs/errors/policy-denied";
|
|
28
|
+
super(`Policy denied: ${reason}\n\n Hint: ${hint}\n Docs: ${docsUrl}`);
|
|
19
29
|
this.name = "PolicyDeniedError";
|
|
20
30
|
this.reason = reason;
|
|
31
|
+
this.hint = hint;
|
|
32
|
+
this.docsUrl = docsUrl;
|
|
21
33
|
}
|
|
22
34
|
}
|
|
23
35
|
export class AccountNotFoundError extends Error {
|
|
24
36
|
userId;
|
|
37
|
+
hint;
|
|
38
|
+
docsUrl;
|
|
25
39
|
constructor(userId) {
|
|
26
|
-
|
|
40
|
+
const hint = 'Run "npx usertrust init" to create accounts, or verify the userId matches your config.';
|
|
41
|
+
const docsUrl = "https://usertrust.ai/docs/errors/account-not-found";
|
|
42
|
+
super(`Account not found for user: ${userId}\n\n Hint: ${hint}\n Docs: ${docsUrl}`);
|
|
27
43
|
this.name = "AccountNotFoundError";
|
|
28
44
|
this.userId = userId;
|
|
45
|
+
this.hint = hint;
|
|
46
|
+
this.docsUrl = docsUrl;
|
|
29
47
|
}
|
|
30
48
|
}
|
|
31
49
|
export class IdempotencyConflictError extends Error {
|
|
32
50
|
key;
|
|
51
|
+
hint;
|
|
52
|
+
docsUrl;
|
|
33
53
|
constructor(key) {
|
|
34
|
-
|
|
54
|
+
const hint = "This transfer was already submitted. Use a unique transferId for retries.";
|
|
55
|
+
const docsUrl = "https://usertrust.ai/docs/errors/idempotency-conflict";
|
|
56
|
+
super(`Idempotency conflict for key: ${key}\n\n Hint: ${hint}\n Docs: ${docsUrl}`);
|
|
35
57
|
this.name = "IdempotencyConflictError";
|
|
36
58
|
this.key = key;
|
|
59
|
+
this.hint = hint;
|
|
60
|
+
this.docsUrl = docsUrl;
|
|
37
61
|
}
|
|
38
62
|
}
|
|
39
63
|
export class LedgerUnavailableError extends Error {
|
|
40
64
|
cause_message;
|
|
65
|
+
hint;
|
|
66
|
+
docsUrl;
|
|
41
67
|
constructor(reason) {
|
|
42
|
-
|
|
68
|
+
const hint = 'Start TigerBeetle with "npx usertrust tb start" or use { dryRun: true } to skip the ledger.';
|
|
69
|
+
const docsUrl = "https://usertrust.ai/docs/errors/ledger-unavailable";
|
|
70
|
+
super(`Ledger unavailable: ${reason}\n\n Hint: ${hint}\n Docs: ${docsUrl}`);
|
|
43
71
|
this.name = "LedgerUnavailableError";
|
|
44
72
|
this.cause_message = reason;
|
|
73
|
+
this.hint = hint;
|
|
74
|
+
this.docsUrl = docsUrl;
|
|
45
75
|
}
|
|
46
76
|
}
|
|
47
77
|
export class AuditDegradedError extends Error {
|
|
48
78
|
cause_message;
|
|
79
|
+
hint;
|
|
80
|
+
docsUrl;
|
|
49
81
|
constructor(reason) {
|
|
50
|
-
|
|
82
|
+
const hint = "Check disk space and permissions on the .usertrust/audit/ directory.";
|
|
83
|
+
const docsUrl = "https://usertrust.ai/docs/errors/audit-degraded";
|
|
84
|
+
super(`Audit degraded: ${reason}\n\n Hint: ${hint}\n Docs: ${docsUrl}`);
|
|
51
85
|
this.name = "AuditDegradedError";
|
|
52
86
|
this.cause_message = reason;
|
|
87
|
+
this.hint = hint;
|
|
88
|
+
this.docsUrl = docsUrl;
|
|
53
89
|
}
|
|
54
90
|
}
|
|
55
91
|
export class VaultNotInitializedError extends Error {
|
|
56
92
|
path;
|
|
93
|
+
hint;
|
|
94
|
+
docsUrl;
|
|
57
95
|
constructor(path) {
|
|
58
|
-
|
|
96
|
+
const hint = 'Run "npx usertrust init" to create the vault directory.';
|
|
97
|
+
const docsUrl = "https://usertrust.ai/docs/errors/vault-not-initialized";
|
|
98
|
+
super(`Vault not initialized at: ${path}\n\n Hint: ${hint}\n Docs: ${docsUrl}`);
|
|
59
99
|
this.name = "VaultNotInitializedError";
|
|
60
100
|
this.path = path;
|
|
101
|
+
this.hint = hint;
|
|
102
|
+
this.docsUrl = docsUrl;
|
|
61
103
|
}
|
|
62
104
|
}
|
|
63
105
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AAEjC,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IAClC,MAAM,CAAS;IACf,QAAQ,CAAS;IACjB,SAAS,CAAS;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AAEjC,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IAClC,MAAM,CAAS;IACf,QAAQ,CAAS;IACjB,SAAS,CAAS;IAClB,IAAI,CAAS;IACb,OAAO,CAAS;IAEhC,YAAY,MAAc,EAAE,QAAgB,EAAE,SAAiB;QAC9D,MAAM,IAAI,GAAG,qEAAqE,CAAC;QACnF,MAAM,OAAO,GAAG,uDAAuD,CAAC;QACxE,KAAK,CACJ,iCAAiC,MAAM,UAAU,QAAQ,UAAU,SAAS,eAAe,IAAI,aAAa,OAAO,EAAE,CACrH,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,Q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ClC,IAAI,CAAS;IACb,IAAI,CAAS;IACb,OAAO,CAAS;IAEhC,YAAY,IAAY;QACvB,MAAM,IAAI,GAAG,yDAAyD,CAAC;QACvE,MAAM,OAAO,GAAG,wDAAwD,CAAC;QACzE,KAAK,CAAC,6BAA6B,IAAI,eAAe,IAAI,aAAa,OAAO,EAAE,CAAC,CAAC;QAClF,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;QACvC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC;CACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "usertrust",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Financial governance for AI agents. Every LLM call becomes an immutable, auditable transaction.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Usertools, Inc. <hello@usertools.ai> (https://usertrust.ai)",
|