@wlfi-agent/cli 1.4.15 → 1.4.17
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/Cargo.lock +22 -20
- package/Cargo.toml +2 -2
- package/README.md +10 -2
- package/crates/vault-cli-admin/src/main.rs +21 -2
- package/crates/vault-cli-admin/src/tui.rs +634 -129
- package/crates/vault-cli-daemon/Cargo.toml +1 -0
- package/crates/vault-cli-daemon/src/bin/wlfi-agent-system-keychain.rs +122 -8
- package/crates/vault-cli-daemon/src/main.rs +24 -4
- package/crates/vault-cli-daemon/src/relay_sync.rs +155 -35
- package/crates/vault-cli-daemon/tests/system_keychain_helper_acl.rs +23 -18
- package/crates/vault-daemon/src/daemon_parts/api_impl_and_utils.rs +6 -0
- package/crates/vault-daemon/src/daemon_parts/types_api_rpc.rs +6 -0
- package/crates/vault-daemon/src/tests.rs +2 -2
- package/crates/vault-daemon/src/tests_parts/part4.rs +110 -0
- package/crates/vault-transport-unix/src/lib.rs +22 -3
- package/crates/vault-transport-xpc/src/lib.rs +20 -2
- package/dist/cli.cjs +20842 -25552
- package/dist/cli.cjs.map +1 -1
- package/package.json +5 -3
- package/packages/cache/.turbo/turbo-build.log +53 -52
- package/packages/cache/coverage/base.css +224 -0
- package/packages/cache/coverage/block-navigation.js +87 -0
- package/packages/cache/coverage/clover.xml +585 -0
- package/packages/cache/coverage/coverage-final.json +5 -0
- package/packages/cache/coverage/favicon.png +0 -0
- package/packages/cache/coverage/index.html +161 -0
- package/packages/cache/coverage/prettify.css +1 -0
- package/packages/cache/coverage/prettify.js +2 -0
- package/packages/cache/coverage/sort-arrow-sprite.png +0 -0
- package/packages/cache/coverage/sorter.js +210 -0
- package/packages/cache/coverage/src/client/index.html +116 -0
- package/packages/cache/coverage/src/client/index.ts.html +253 -0
- package/packages/cache/coverage/src/errors/index.html +116 -0
- package/packages/cache/coverage/src/errors/index.ts.html +244 -0
- package/packages/cache/coverage/src/index.html +116 -0
- package/packages/cache/coverage/src/index.ts.html +94 -0
- package/packages/cache/coverage/src/service/index.html +116 -0
- package/packages/cache/coverage/src/service/index.ts.html +2212 -0
- package/packages/cache/dist/{chunk-ALQ6H7KG.cjs → chunk-QF4XKEIA.cjs} +189 -45
- package/packages/cache/dist/chunk-QF4XKEIA.cjs.map +1 -0
- package/packages/cache/dist/{chunk-FGJEEF5N.js → chunk-QNK6GOTI.js} +182 -38
- package/packages/cache/dist/chunk-QNK6GOTI.js.map +1 -0
- package/packages/cache/dist/index.cjs +2 -2
- package/packages/cache/dist/index.js +1 -1
- package/packages/cache/dist/service/index.cjs +2 -2
- package/packages/cache/dist/service/index.d.cts +2 -0
- package/packages/cache/dist/service/index.d.ts +2 -0
- package/packages/cache/dist/service/index.js +1 -1
- package/packages/cache/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/cache/src/service/index.test.ts +575 -0
- package/packages/cache/src/service/index.ts +234 -51
- package/packages/config/.turbo/turbo-build.log +2 -2
- package/packages/config/node_modules/.bin/tsc +2 -2
- package/packages/config/node_modules/.bin/tsserver +2 -2
- package/packages/config/node_modules/.bin/tsup +2 -2
- package/packages/config/node_modules/.bin/tsup-node +2 -2
- package/packages/rpc/.turbo/turbo-build.log +11 -11
- package/packages/rpc/node_modules/.bin/tsc +2 -2
- package/packages/rpc/node_modules/.bin/tsserver +2 -2
- package/packages/rpc/node_modules/.bin/tsup +2 -2
- package/packages/rpc/node_modules/.bin/tsup-node +2 -2
- package/packages/ui/.turbo/turbo-build.log +13 -13
- package/packages/ui/dist/components/badge.d.ts +1 -1
- package/packages/ui/dist/components/button.d.ts +1 -1
- package/scripts/install-rust-binaries.mjs +229 -58
- package/src/cli.ts +51 -39
- package/src/lib/admin-passthrough.js +1 -0
- package/src/lib/admin-reset.js +1 -0
- package/src/lib/admin-reset.ts +26 -16
- package/src/lib/admin-setup.js +1 -0
- package/src/lib/admin-setup.ts +32 -20
- package/src/lib/agent-auth-revoke.js +1 -0
- package/src/lib/agent-auth-rotate.js +1 -0
- package/src/lib/agent-auth.js +1 -0
- package/src/lib/config-mutation.js +1 -0
- package/src/lib/launchd-assets.js +1 -0
- package/src/lib/launchd-assets.ts +29 -0
- package/src/lib/local-admin-access.js +1 -0
- package/src/lib/rust.ts +1 -1
- package/src/lib/status-repair-cli.js +1 -0
- package/packages/cache/dist/chunk-ALQ6H7KG.cjs.map +0 -1
- package/packages/cache/dist/chunk-FGJEEF5N.js.map +0 -1
|
@@ -178,7 +178,6 @@ interface JsonCache {
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
const defaultNamespace = 'wlfi:relay';
|
|
181
|
-
const activeApprovalUpdateScanLimit = 250;
|
|
182
181
|
const approvalCapabilityFailureWindowMs = 5 * 60 * 1000;
|
|
183
182
|
const approvalCapabilityMaxFailures = 5;
|
|
184
183
|
const approvalCapabilityBlockWindowMs = 10 * 60 * 1000;
|
|
@@ -211,6 +210,42 @@ const createApprovalCapabilityToken = (): string => randomBytes(32).toString('he
|
|
|
211
210
|
const approvalCapabilityHash = (token: string): string =>
|
|
212
211
|
createHash('sha256').update(token, 'utf8').digest('hex');
|
|
213
212
|
|
|
213
|
+
const isActiveApprovalUpdateRecord = (
|
|
214
|
+
record: RelayEncryptedUpdateRecord | null | undefined,
|
|
215
|
+
approvalRequestId: string,
|
|
216
|
+
): record is RelayEncryptedUpdateRecord =>
|
|
217
|
+
Boolean(
|
|
218
|
+
record &&
|
|
219
|
+
record.type === 'manual_approval_decision' &&
|
|
220
|
+
record.targetApprovalRequestId === approvalRequestId &&
|
|
221
|
+
(record.status === 'pending' || record.status === 'inflight'),
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
const preserveRotatedApprovalCapability = (
|
|
225
|
+
incoming: RelayApprovalRequestRecord,
|
|
226
|
+
existing: RelayApprovalRequestRecord | null,
|
|
227
|
+
): RelayApprovalRequestRecord => {
|
|
228
|
+
const existingMetadata = existing?.metadata;
|
|
229
|
+
const incomingMetadata = incoming.metadata;
|
|
230
|
+
const preservedCapabilityToken = existingMetadata?.approvalCapabilityToken?.trim();
|
|
231
|
+
const preservedCapabilityHash = existingMetadata?.approvalCapabilityHash?.trim();
|
|
232
|
+
|
|
233
|
+
if (!preservedCapabilityToken && !preservedCapabilityHash) {
|
|
234
|
+
return incoming;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
return {
|
|
238
|
+
...incoming,
|
|
239
|
+
metadata: {
|
|
240
|
+
...(incomingMetadata ?? {}),
|
|
241
|
+
...(preservedCapabilityToken
|
|
242
|
+
? { approvalCapabilityToken: preservedCapabilityToken }
|
|
243
|
+
: {}),
|
|
244
|
+
...(preservedCapabilityHash ? { approvalCapabilityHash: preservedCapabilityHash } : {}),
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
|
|
214
249
|
export class RelayCacheService {
|
|
215
250
|
private readonly client: JsonCache;
|
|
216
251
|
private readonly namespace: string;
|
|
@@ -261,7 +296,13 @@ export class RelayCacheService {
|
|
|
261
296
|
|
|
262
297
|
if (input.approvalRequests) {
|
|
263
298
|
for (const approvalRequest of input.approvalRequests) {
|
|
264
|
-
const
|
|
299
|
+
const existing = await this.readJson<RelayApprovalRequestRecord>(
|
|
300
|
+
this.approvalKey(approvalRequest.approvalRequestId),
|
|
301
|
+
);
|
|
302
|
+
const normalized = preserveRotatedApprovalCapability(
|
|
303
|
+
{ ...approvalRequest, daemonId: profile.daemonId },
|
|
304
|
+
existing,
|
|
305
|
+
);
|
|
265
306
|
await this.writeJson(this.approvalKey(normalized.approvalRequestId), normalized);
|
|
266
307
|
await this.client.zadd(
|
|
267
308
|
this.daemonApprovalsKey(profile.daemonId),
|
|
@@ -343,6 +384,45 @@ export class RelayCacheService {
|
|
|
343
384
|
async createEncryptedUpdate(
|
|
344
385
|
input: CreateEncryptedUpdateInput,
|
|
345
386
|
): Promise<RelayEncryptedUpdateRecord> {
|
|
387
|
+
if (input.type === 'manual_approval_decision') {
|
|
388
|
+
if (!input.targetApprovalRequestId) {
|
|
389
|
+
throw new CacheError({
|
|
390
|
+
code: cacheErrorCodes.invalidPayload,
|
|
391
|
+
message: 'Manual approval updates require a target approval request id',
|
|
392
|
+
operation: 'createEncryptedUpdate',
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
const approvalKey = this.approvalKey(input.targetApprovalRequestId);
|
|
397
|
+
const approval = await this.readJson<RelayApprovalRequestRecord>(approvalKey);
|
|
398
|
+
if (!approval) {
|
|
399
|
+
throw new CacheError({
|
|
400
|
+
code: cacheErrorCodes.notFound,
|
|
401
|
+
key: approvalKey,
|
|
402
|
+
message: `Unknown approval '${input.targetApprovalRequestId}'`,
|
|
403
|
+
operation: 'createEncryptedUpdate',
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
if (approval.daemonId !== input.daemonId) {
|
|
408
|
+
throw new CacheError({
|
|
409
|
+
code: cacheErrorCodes.invalidPayload,
|
|
410
|
+
key: approvalKey,
|
|
411
|
+
message: `Approval '${input.targetApprovalRequestId}' belongs to daemon '${approval.daemonId}', not '${input.daemonId}'`,
|
|
412
|
+
operation: 'createEncryptedUpdate',
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
if (approval.status !== 'pending') {
|
|
417
|
+
throw new CacheError({
|
|
418
|
+
code: cacheErrorCodes.invalidPayload,
|
|
419
|
+
key: approvalKey,
|
|
420
|
+
message: `Approval '${input.targetApprovalRequestId}' is '${approval.status}' and cannot accept new updates`,
|
|
421
|
+
operation: 'createEncryptedUpdate',
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
346
426
|
const updateId = input.updateId ?? randomUUID();
|
|
347
427
|
const now = toIsoTimestamp();
|
|
348
428
|
const record: RelayEncryptedUpdateRecord = {
|
|
@@ -357,34 +437,79 @@ export class RelayCacheService {
|
|
|
357
437
|
updatedAt: now,
|
|
358
438
|
};
|
|
359
439
|
|
|
360
|
-
|
|
361
|
-
|
|
440
|
+
const activeApprovalKey =
|
|
441
|
+
input.type === 'manual_approval_decision' && input.targetApprovalRequestId
|
|
442
|
+
? this.activeApprovalUpdateKey(input.targetApprovalRequestId)
|
|
443
|
+
: null;
|
|
444
|
+
const updateKey = this.updateKey(updateId);
|
|
445
|
+
let ownsActiveApprovalSlot = false;
|
|
446
|
+
|
|
447
|
+
await this.writeJson(updateKey, record);
|
|
448
|
+
|
|
449
|
+
try {
|
|
450
|
+
if (activeApprovalKey) {
|
|
451
|
+
const reserved = await this.client.set(activeApprovalKey, updateId, 'NX');
|
|
452
|
+
if (reserved !== 'OK') {
|
|
453
|
+
const existingUpdateId = await this.client.get(activeApprovalKey);
|
|
454
|
+
const existingRecord = existingUpdateId
|
|
455
|
+
? await this.readJson<RelayEncryptedUpdateRecord>(this.updateKey(existingUpdateId))
|
|
456
|
+
: null;
|
|
457
|
+
|
|
458
|
+
if (isActiveApprovalUpdateRecord(existingRecord, input.targetApprovalRequestId!)) {
|
|
459
|
+
throw new CacheError({
|
|
460
|
+
code: cacheErrorCodes.invalidPayload,
|
|
461
|
+
key: activeApprovalKey,
|
|
462
|
+
message: `Approval '${input.targetApprovalRequestId}' already has a queued operator update`,
|
|
463
|
+
operation: 'createEncryptedUpdate',
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
await this.client.del(activeApprovalKey);
|
|
468
|
+
const retriedReservation = await this.client.set(activeApprovalKey, updateId, 'NX');
|
|
469
|
+
if (retriedReservation !== 'OK') {
|
|
470
|
+
throw new CacheError({
|
|
471
|
+
code: cacheErrorCodes.invalidPayload,
|
|
472
|
+
key: activeApprovalKey,
|
|
473
|
+
message: `Approval '${input.targetApprovalRequestId}' already has a queued operator update`,
|
|
474
|
+
operation: 'createEncryptedUpdate',
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
ownsActiveApprovalSlot = true;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
await this.client.zadd(this.daemonUpdatesKey(input.daemonId), Date.now(), updateId);
|
|
483
|
+
} catch (error) {
|
|
484
|
+
await this.client.del(updateKey);
|
|
485
|
+
if (activeApprovalKey && ownsActiveApprovalSlot) {
|
|
486
|
+
await this.client.del(activeApprovalKey);
|
|
487
|
+
}
|
|
488
|
+
throw error;
|
|
489
|
+
}
|
|
362
490
|
|
|
363
491
|
return record;
|
|
364
492
|
}
|
|
365
493
|
|
|
366
494
|
async hasActiveApprovalUpdate(daemonId: string, approvalRequestId: string): Promise<boolean> {
|
|
367
|
-
const
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
for (const updateId of updateIds) {
|
|
375
|
-
const record = await this.readJson<RelayEncryptedUpdateRecord>(this.updateKey(updateId));
|
|
376
|
-
if (!record) {
|
|
377
|
-
continue;
|
|
495
|
+
const indexedUpdateId = await this.client.get(this.activeApprovalUpdateKey(approvalRequestId));
|
|
496
|
+
if (indexedUpdateId) {
|
|
497
|
+
const indexedRecord = await this.readJson<RelayEncryptedUpdateRecord>(
|
|
498
|
+
this.updateKey(indexedUpdateId),
|
|
499
|
+
);
|
|
500
|
+
if (isActiveApprovalUpdateRecord(indexedRecord, approvalRequestId)) {
|
|
501
|
+
return true;
|
|
378
502
|
}
|
|
379
503
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
record.targetApprovalRequestId !== approvalRequestId
|
|
383
|
-
) {
|
|
384
|
-
continue;
|
|
385
|
-
}
|
|
504
|
+
await this.client.del(this.activeApprovalUpdateKey(approvalRequestId));
|
|
505
|
+
}
|
|
386
506
|
|
|
387
|
-
|
|
507
|
+
const updateIds = await this.client.zrange(this.daemonUpdatesKey(daemonId), 0, -1, 'REV');
|
|
508
|
+
|
|
509
|
+
for (const updateId of updateIds) {
|
|
510
|
+
const record = await this.readJson<RelayEncryptedUpdateRecord>(this.updateKey(updateId));
|
|
511
|
+
if (isActiveApprovalUpdateRecord(record, approvalRequestId)) {
|
|
512
|
+
await this.client.set(this.activeApprovalUpdateKey(approvalRequestId), updateId, 'NX');
|
|
388
513
|
return true;
|
|
389
514
|
}
|
|
390
515
|
}
|
|
@@ -539,37 +664,66 @@ export class RelayCacheService {
|
|
|
539
664
|
break;
|
|
540
665
|
}
|
|
541
666
|
|
|
542
|
-
const
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
667
|
+
const claimLockKey = this.updateClaimLockKey(updateId);
|
|
668
|
+
let ownsClaimLock = false;
|
|
669
|
+
|
|
670
|
+
try {
|
|
671
|
+
const reserved = await this.client.set(claimLockKey, claimUntil, 'NX');
|
|
672
|
+
if (reserved !== 'OK') {
|
|
673
|
+
const existingClaimLockUntil = await this.client.get(claimLockKey);
|
|
674
|
+
if (
|
|
675
|
+
existingClaimLockUntil &&
|
|
676
|
+
Number.isFinite(Date.parse(existingClaimLockUntil)) &&
|
|
677
|
+
Date.parse(existingClaimLockUntil) > nowMs
|
|
678
|
+
) {
|
|
679
|
+
continue;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
await this.client.del(claimLockKey);
|
|
683
|
+
const retriedReservation = await this.client.set(claimLockKey, claimUntil, 'NX');
|
|
684
|
+
if (retriedReservation !== 'OK') {
|
|
685
|
+
continue;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
546
688
|
|
|
547
|
-
|
|
548
|
-
record.status === 'applied' ||
|
|
549
|
-
record.status === 'failed' ||
|
|
550
|
-
record.status === 'rejected'
|
|
551
|
-
) {
|
|
552
|
-
continue;
|
|
553
|
-
}
|
|
689
|
+
ownsClaimLock = true;
|
|
554
690
|
|
|
555
|
-
|
|
556
|
-
record
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
) {
|
|
560
|
-
continue;
|
|
561
|
-
}
|
|
691
|
+
const record = await this.readJson<RelayEncryptedUpdateRecord>(this.updateKey(updateId));
|
|
692
|
+
if (!record) {
|
|
693
|
+
continue;
|
|
694
|
+
}
|
|
562
695
|
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
696
|
+
if (
|
|
697
|
+
record.status === 'applied' ||
|
|
698
|
+
record.status === 'failed' ||
|
|
699
|
+
record.status === 'rejected'
|
|
700
|
+
) {
|
|
701
|
+
continue;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
if (
|
|
705
|
+
record.status === 'inflight' &&
|
|
706
|
+
record.claimUntil &&
|
|
707
|
+
Date.parse(record.claimUntil) > nowMs
|
|
708
|
+
) {
|
|
709
|
+
continue;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
const nextRecord: RelayEncryptedUpdateRecord = {
|
|
713
|
+
...record,
|
|
714
|
+
claimToken: randomUUID(),
|
|
715
|
+
claimUntil,
|
|
716
|
+
lastDeliveredAt: now.toISOString(),
|
|
717
|
+
status: 'inflight',
|
|
718
|
+
updatedAt: now.toISOString(),
|
|
719
|
+
};
|
|
720
|
+
await this.writeJson(this.updateKey(updateId), nextRecord);
|
|
721
|
+
claimed.push(nextRecord);
|
|
722
|
+
} finally {
|
|
723
|
+
if (ownsClaimLock) {
|
|
724
|
+
await this.client.del(claimLockKey);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
573
727
|
}
|
|
574
728
|
|
|
575
729
|
return claimed;
|
|
@@ -617,6 +771,13 @@ export class RelayCacheService {
|
|
|
617
771
|
};
|
|
618
772
|
|
|
619
773
|
await this.writeJson(key, nextRecord);
|
|
774
|
+
if (record.targetApprovalRequestId && record.type === 'manual_approval_decision') {
|
|
775
|
+
const activeApprovalKey = this.activeApprovalUpdateKey(record.targetApprovalRequestId);
|
|
776
|
+
const indexedUpdateId = await this.client.get(activeApprovalKey);
|
|
777
|
+
if (indexedUpdateId === input.updateId) {
|
|
778
|
+
await this.client.del(activeApprovalKey);
|
|
779
|
+
}
|
|
780
|
+
}
|
|
620
781
|
return nextRecord;
|
|
621
782
|
}
|
|
622
783
|
|
|
@@ -625,8 +786,26 @@ export class RelayCacheService {
|
|
|
625
786
|
}
|
|
626
787
|
|
|
627
788
|
async removeEncryptedUpdate(daemonId: string, updateId: string): Promise<void> {
|
|
789
|
+
const key = this.updateKey(updateId);
|
|
790
|
+
const record = await this.readJson<RelayEncryptedUpdateRecord>(key);
|
|
791
|
+
if (!record || record.daemonId !== daemonId) {
|
|
792
|
+
throw new CacheError({
|
|
793
|
+
code: cacheErrorCodes.notFound,
|
|
794
|
+
key,
|
|
795
|
+
message: `Unknown update '${updateId}' for daemon '${daemonId}'`,
|
|
796
|
+
operation: 'removeEncryptedUpdate',
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
|
|
628
800
|
await this.client.zrem(this.daemonUpdatesKey(daemonId), updateId);
|
|
629
|
-
await this.client.del(
|
|
801
|
+
await this.client.del(key);
|
|
802
|
+
if (record.targetApprovalRequestId && record.type === 'manual_approval_decision') {
|
|
803
|
+
const activeApprovalKey = this.activeApprovalUpdateKey(record.targetApprovalRequestId);
|
|
804
|
+
const indexedUpdateId = await this.client.get(activeApprovalKey);
|
|
805
|
+
if (indexedUpdateId === updateId) {
|
|
806
|
+
await this.client.del(activeApprovalKey);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
630
809
|
}
|
|
631
810
|
|
|
632
811
|
private readonly daemonIndexKey = (): string => `${this.namespace}:daemons`;
|
|
@@ -649,6 +828,10 @@ export class RelayCacheService {
|
|
|
649
828
|
`${this.namespace}:approval:${approvalRequestId}:capability:${capabilityHash}:consumed`;
|
|
650
829
|
private readonly approvalCapabilityFailuresKey = (approvalRequestId: string): string =>
|
|
651
830
|
`${this.namespace}:approval:${approvalRequestId}:capability-failures`;
|
|
831
|
+
private readonly activeApprovalUpdateKey = (approvalRequestId: string): string =>
|
|
832
|
+
`${this.namespace}:approval:${approvalRequestId}:active-update`;
|
|
833
|
+
private readonly updateClaimLockKey = (updateId: string): string =>
|
|
834
|
+
`${this.namespace}:update:${updateId}:claim-lock`;
|
|
652
835
|
private readonly updateKey = (updateId: string): string => `${this.namespace}:update:${updateId}`;
|
|
653
836
|
|
|
654
837
|
private async readJson<T>(key: string): Promise<T | null> {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[34mESM[39m Build start
|
|
13
13
|
[32mESM[39m [1mdist/index.cjs [22m[32m36.27 KB[39m
|
|
14
14
|
[32mESM[39m [1mdist/index.cjs.map [22m[32m66.36 KB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 22ms
|
|
16
16
|
DTS Build start
|
|
17
|
-
DTS ⚡️ Build success in
|
|
17
|
+
DTS ⚡️ Build success in 400ms
|
|
18
18
|
DTS dist/index.d.ts 5.23 KB
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/typescript@5.9.3/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir
|
|
14
|
+
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../typescript/bin/tsc" "$@"
|
|
17
17
|
fi
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/typescript@5.9.3/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir
|
|
14
|
+
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../typescript/bin/tsserver" "$@"
|
|
17
17
|
fi
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules/tsup/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir
|
|
14
|
+
exec "$basedir/node" "$basedir/../tsup/dist/cli-default.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../tsup/dist/cli-default.js" "$@"
|
|
17
17
|
fi
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules/tsup/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir
|
|
14
|
+
exec "$basedir/node" "$basedir/../tsup/dist/cli-node.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../tsup/dist/cli-node.js" "$@"
|
|
17
17
|
fi
|
|
@@ -10,23 +10,23 @@
|
|
|
10
10
|
[34mCLI[39m Target: node20
|
|
11
11
|
[34mCLI[39m Cleaning output folder
|
|
12
12
|
[34mESM[39m Build start
|
|
13
|
+
DTS Build start
|
|
13
14
|
[32mESM[39m [1mdist/secp256k1-WCNM675D.cjs [22m[32m331.00 B[39m
|
|
14
|
-
[32mESM[39m [1mdist/chunk-QGTNTFJ7.cjs [22m[32m69.15 KB[39m
|
|
15
15
|
[32mESM[39m [1mdist/ccip-OWJLAW55.cjs [22m[32m344.00 B[39m
|
|
16
|
+
[32mESM[39m [1mdist/chunk-CDO2GWRD.cjs [22m[32m11.91 KB[39m
|
|
17
|
+
[32mESM[39m [1mdist/chunk-QGTNTFJ7.cjs [22m[32m69.15 KB[39m
|
|
18
|
+
[32mESM[39m [1mdist/index.cjs [22m[32m248.00 KB[39m
|
|
16
19
|
[32mESM[39m [1mdist/_esm-BCLXDO2R.cjs [22m[32m122.75 KB[39m
|
|
17
20
|
[32mESM[39m [1mdist/chunk-TZDTAHWR.cjs [22m[32m1.89 KB[39m
|
|
18
21
|
[32mESM[39m [1mdist/chunk-APQIFZ3B.cjs [22m[32m212.06 KB[39m
|
|
19
|
-
[32mESM[39m [1mdist/index.cjs [22m[32m248.00 KB[39m
|
|
20
|
-
[32mESM[39m [1mdist/chunk-CDO2GWRD.cjs [22m[32m11.91 KB[39m
|
|
21
|
-
[32mESM[39m [1mdist/secp256k1-WCNM675D.cjs.map [22m[32m71.00 B[39m
|
|
22
|
-
[32mESM[39m [1mdist/chunk-TZDTAHWR.cjs.map [22m[32m71.00 B[39m
|
|
23
22
|
[32mESM[39m [1mdist/ccip-OWJLAW55.cjs.map [22m[32m71.00 B[39m
|
|
24
|
-
[32mESM[39m [1mdist/
|
|
23
|
+
[32mESM[39m [1mdist/secp256k1-WCNM675D.cjs.map [22m[32m71.00 B[39m
|
|
25
24
|
[32mESM[39m [1mdist/chunk-CDO2GWRD.cjs.map [22m[32m42.64 KB[39m
|
|
26
|
-
[32mESM[39m [1mdist/
|
|
27
|
-
[32mESM[39m [1mdist/chunk-
|
|
25
|
+
[32mESM[39m [1mdist/chunk-QGTNTFJ7.cjs.map [22m[32m194.07 KB[39m
|
|
26
|
+
[32mESM[39m [1mdist/chunk-TZDTAHWR.cjs.map [22m[32m71.00 B[39m
|
|
28
27
|
[32mESM[39m [1mdist/index.cjs.map [22m[32m1011.42 KB[39m
|
|
29
|
-
[32mESM[39m
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
[32mESM[39m [1mdist/chunk-APQIFZ3B.cjs.map [22m[32m544.22 KB[39m
|
|
29
|
+
[32mESM[39m [1mdist/_esm-BCLXDO2R.cjs.map [22m[32m196.57 KB[39m
|
|
30
|
+
[32mESM[39m ⚡️ Build success in 190ms
|
|
31
|
+
DTS ⚡️ Build success in 1656ms
|
|
32
32
|
DTS dist/index.d.ts 201.02 KB
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/typescript@5.9.3/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir
|
|
14
|
+
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../typescript/bin/tsc" "$@"
|
|
17
17
|
fi
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/typescript@5.9.3/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir
|
|
14
|
+
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../typescript/bin/tsserver" "$@"
|
|
17
17
|
fi
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules/tsup/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir
|
|
14
|
+
exec "$basedir/node" "$basedir/../tsup/dist/cli-default.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../tsup/dist/cli-default.js" "$@"
|
|
17
17
|
fi
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules/tsup/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules:/Users/hanzhi/Documents/WLFI/wlfi-agent-sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir
|
|
14
|
+
exec "$basedir/node" "$basedir/../tsup/dist/cli-node.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../tsup/dist/cli-node.js" "$@"
|
|
17
17
|
fi
|
|
@@ -10,29 +10,29 @@
|
|
|
10
10
|
[34mCLI[39m Target: es2022
|
|
11
11
|
[34mCLI[39m Cleaning output folder
|
|
12
12
|
[34mESM[39m Build start
|
|
13
|
-
[32mESM[39m [1mdist/chunk-MOAFBKSA.js [22m[32m209.00 B[39m
|
|
14
|
-
[32mESM[39m [1mdist/tailwind.js [22m[32m1.59 KB[39m
|
|
15
|
-
[32mESM[39m [1mdist/components/card.js [22m[32m1.22 KB[39m
|
|
16
|
-
[32mESM[39m [1mdist/components/separator.js [22m[32m349.00 B[39m
|
|
17
|
-
[32mESM[39m [1mdist/components/label.js [22m[32m327.00 B[39m
|
|
18
|
-
[32mESM[39m [1mdist/components/textarea.js [22m[32m785.00 B[39m
|
|
19
13
|
[32mESM[39m [1mdist/utils/cn.js [22m[32m92.00 B[39m
|
|
20
14
|
[32mESM[39m [1mdist/components/badge.js [22m[32m971.00 B[39m
|
|
15
|
+
[32mESM[39m [1mdist/tailwind.js [22m[32m1.59 KB[39m
|
|
21
16
|
[32mESM[39m [1mdist/components/button.js [22m[32m1.43 KB[39m
|
|
22
17
|
[32mESM[39m [1mdist/components/input.js [22m[32m840.00 B[39m
|
|
23
|
-
[32mESM[39m [1mdist/
|
|
18
|
+
[32mESM[39m [1mdist/components/label.js [22m[32m327.00 B[39m
|
|
19
|
+
[32mESM[39m [1mdist/components/textarea.js [22m[32m785.00 B[39m
|
|
20
|
+
[32mESM[39m [1mdist/components/card.js [22m[32m1.22 KB[39m
|
|
21
|
+
[32mESM[39m [1mdist/components/separator.js [22m[32m349.00 B[39m
|
|
22
|
+
[32mESM[39m [1mdist/chunk-MOAFBKSA.js [22m[32m209.00 B[39m
|
|
24
23
|
[32mESM[39m [1mdist/tailwind.js.map [22m[32m2.39 KB[39m
|
|
25
|
-
[32mESM[39m [1mdist/components/card.js.map [22m[32m2.10 KB[39m
|
|
26
|
-
[32mESM[39m [1mdist/components/textarea.js.map [22m[32m1.05 KB[39m
|
|
27
|
-
[32mESM[39m [1mdist/components/badge.js.map [22m[32m1.50 KB[39m
|
|
28
24
|
[32mESM[39m [1mdist/utils/cn.js.map [22m[32m71.00 B[39m
|
|
25
|
+
[32mESM[39m [1mdist/components/badge.js.map [22m[32m1.50 KB[39m
|
|
29
26
|
[32mESM[39m [1mdist/components/input.js.map [22m[32m1.12 KB[39m
|
|
30
|
-
[32mESM[39m [1mdist/components/separator.js.map [22m[32m519.00 B[39m
|
|
31
27
|
[32mESM[39m [1mdist/components/button.js.map [22m[32m2.14 KB[39m
|
|
28
|
+
[32mESM[39m [1mdist/components/separator.js.map [22m[32m519.00 B[39m
|
|
32
29
|
[32mESM[39m [1mdist/components/label.js.map [22m[32m502.00 B[39m
|
|
33
|
-
[32mESM[39m
|
|
30
|
+
[32mESM[39m [1mdist/components/textarea.js.map [22m[32m1.05 KB[39m
|
|
31
|
+
[32mESM[39m [1mdist/components/card.js.map [22m[32m2.10 KB[39m
|
|
32
|
+
[32mESM[39m [1mdist/chunk-MOAFBKSA.js.map [22m[32m368.00 B[39m
|
|
33
|
+
[32mESM[39m ⚡️ Build success in 13ms
|
|
34
34
|
DTS Build start
|
|
35
|
-
DTS ⚡️ Build success in
|
|
35
|
+
DTS ⚡️ Build success in 792ms
|
|
36
36
|
DTS dist/tailwind.d.ts 1.49 KB
|
|
37
37
|
DTS dist/components/badge.d.ts 612.00 B
|
|
38
38
|
DTS dist/components/button.d.ts 715.00 B
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
|
|
5
5
|
declare const badgeVariants: (props?: ({
|
|
6
|
-
variant?: "default" | "secondary" | "
|
|
6
|
+
variant?: "default" | "secondary" | "destructive" | "success" | "warning" | null | undefined;
|
|
7
7
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
8
|
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
9
9
|
}
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "default" | "secondary" | "
|
|
6
|
+
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
7
7
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|