@stndrds/schema 1.0.0-alpha.82 → 1.0.0-alpha.84
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/{chunk-OR44EVWO.mjs → chunk-HTE7NOF3.mjs} +0 -93
- package/dist/{chunk-WHDJLJRK.js → chunk-I4D33CVC.js} +212 -305
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/index.mjs +1 -1
- package/dist/{runtime-Ttkdn9W7.d.mts → runtime-BGZqT9aX.d.mts} +7 -48
- package/dist/{runtime-B6Dt5_Gc.d.ts → runtime-BUk5CZfD.d.ts} +7 -48
- package/dist/runtime.d.mts +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +2 -2
- package/dist/runtime.mjs +1 -1
- package/package.json +2 -2
|
@@ -3458,96 +3458,6 @@ function createMockAIConversationsRepository(stores) {
|
|
|
3458
3458
|
}
|
|
3459
3459
|
};
|
|
3460
3460
|
}
|
|
3461
|
-
function createMockAIUserMemoryRepository(stores) {
|
|
3462
|
-
const getKey = () => {
|
|
3463
|
-
const tenantId = getTenantId();
|
|
3464
|
-
const userId = requireUserId();
|
|
3465
|
-
return `${tenantId}:${userId}`;
|
|
3466
|
-
};
|
|
3467
|
-
return {
|
|
3468
|
-
get() {
|
|
3469
|
-
const key = getKey();
|
|
3470
|
-
return Promise.resolve(stores.aiUserMemory.get(key) ?? null);
|
|
3471
|
-
},
|
|
3472
|
-
upsert(data) {
|
|
3473
|
-
const key = getKey();
|
|
3474
|
-
const tenantId = getTenantId();
|
|
3475
|
-
const userId = requireUserId();
|
|
3476
|
-
const now = /* @__PURE__ */ new Date();
|
|
3477
|
-
const existing = stores.aiUserMemory.get(key);
|
|
3478
|
-
const memory = {
|
|
3479
|
-
id: existing?.id ?? generateId(),
|
|
3480
|
-
tenantId,
|
|
3481
|
-
userId,
|
|
3482
|
-
preferences: data.preferences ?? existing?.preferences ?? {},
|
|
3483
|
-
facts: data.facts ?? existing?.facts ?? [],
|
|
3484
|
-
createdAt: existing?.createdAt ?? now,
|
|
3485
|
-
updatedAt: now
|
|
3486
|
-
};
|
|
3487
|
-
stores.aiUserMemory.set(key, memory);
|
|
3488
|
-
return Promise.resolve(memory);
|
|
3489
|
-
},
|
|
3490
|
-
addFact(fact) {
|
|
3491
|
-
const key = getKey();
|
|
3492
|
-
const tenantId = getTenantId();
|
|
3493
|
-
const userId = requireUserId();
|
|
3494
|
-
const now = /* @__PURE__ */ new Date();
|
|
3495
|
-
const existing = stores.aiUserMemory.get(key);
|
|
3496
|
-
const memory = {
|
|
3497
|
-
id: existing?.id ?? generateId(),
|
|
3498
|
-
tenantId,
|
|
3499
|
-
userId,
|
|
3500
|
-
preferences: existing?.preferences ?? {},
|
|
3501
|
-
facts: [...existing?.facts ?? [], fact],
|
|
3502
|
-
createdAt: existing?.createdAt ?? now,
|
|
3503
|
-
updatedAt: now
|
|
3504
|
-
};
|
|
3505
|
-
stores.aiUserMemory.set(key, memory);
|
|
3506
|
-
return Promise.resolve(memory);
|
|
3507
|
-
},
|
|
3508
|
-
removeFact(fact) {
|
|
3509
|
-
const key = getKey();
|
|
3510
|
-
const tenantId = getTenantId();
|
|
3511
|
-
const userId = requireUserId();
|
|
3512
|
-
const now = /* @__PURE__ */ new Date();
|
|
3513
|
-
const existing = stores.aiUserMemory.get(key);
|
|
3514
|
-
const memory = {
|
|
3515
|
-
id: existing?.id ?? generateId(),
|
|
3516
|
-
tenantId,
|
|
3517
|
-
userId,
|
|
3518
|
-
preferences: existing?.preferences ?? {},
|
|
3519
|
-
facts: (existing?.facts ?? []).filter((f) => f !== fact),
|
|
3520
|
-
createdAt: existing?.createdAt ?? now,
|
|
3521
|
-
updatedAt: now
|
|
3522
|
-
};
|
|
3523
|
-
stores.aiUserMemory.set(key, memory);
|
|
3524
|
-
return Promise.resolve(memory);
|
|
3525
|
-
},
|
|
3526
|
-
setPreference(prefKey, value) {
|
|
3527
|
-
const memoryKey = getKey();
|
|
3528
|
-
const tenantId = getTenantId();
|
|
3529
|
-
const userId = requireUserId();
|
|
3530
|
-
const now = /* @__PURE__ */ new Date();
|
|
3531
|
-
const existing = stores.aiUserMemory.get(memoryKey);
|
|
3532
|
-
const memory = {
|
|
3533
|
-
id: existing?.id ?? generateId(),
|
|
3534
|
-
tenantId,
|
|
3535
|
-
userId,
|
|
3536
|
-
preferences: { ...existing?.preferences ?? {}, [prefKey]: value },
|
|
3537
|
-
facts: existing?.facts ?? [],
|
|
3538
|
-
createdAt: existing?.createdAt ?? now,
|
|
3539
|
-
updatedAt: now
|
|
3540
|
-
};
|
|
3541
|
-
stores.aiUserMemory.set(memoryKey, memory);
|
|
3542
|
-
return Promise.resolve(memory);
|
|
3543
|
-
},
|
|
3544
|
-
clear() {
|
|
3545
|
-
const key = getKey();
|
|
3546
|
-
stores.aiUserMemory.delete(key);
|
|
3547
|
-
return Promise.resolve();
|
|
3548
|
-
}
|
|
3549
|
-
};
|
|
3550
|
-
}
|
|
3551
3461
|
function createMockAIUsageMetricsRepository(stores) {
|
|
3552
3462
|
const getDateKey = (date2) => {
|
|
3553
3463
|
const tenantId = getTenantId();
|
|
@@ -4592,7 +4502,6 @@ function createEmptyStores() {
|
|
|
4592
4502
|
workflowAccessGrants: /* @__PURE__ */ new Map(),
|
|
4593
4503
|
aiConversations: /* @__PURE__ */ new Map(),
|
|
4594
4504
|
aiMessages: /* @__PURE__ */ new Map(),
|
|
4595
|
-
aiUserMemory: /* @__PURE__ */ new Map(),
|
|
4596
4505
|
aiUsageMetrics: /* @__PURE__ */ new Map(),
|
|
4597
4506
|
relationAttributes: /* @__PURE__ */ new Map()
|
|
4598
4507
|
};
|
|
@@ -5556,7 +5465,6 @@ function createMockAdapter() {
|
|
|
5556
5465
|
workflowAccessGrants: createMockWorkflowAccessGrantsRepository(stores),
|
|
5557
5466
|
// AI repositories
|
|
5558
5467
|
aiConversations: createMockAIConversationsRepository(stores),
|
|
5559
|
-
aiUserMemory: createMockAIUserMemoryRepository(stores),
|
|
5560
5468
|
aiUsageMetrics: createMockAIUsageMetricsRepository(stores),
|
|
5561
5469
|
// Relation attributes repository
|
|
5562
5470
|
relationAttributes: createMockRelationAttributesRepository(stores),
|
|
@@ -5583,7 +5491,6 @@ function createMockAdapter() {
|
|
|
5583
5491
|
stores.workflowAccessGrants.clear();
|
|
5584
5492
|
stores.aiConversations.clear();
|
|
5585
5493
|
stores.aiMessages.clear();
|
|
5586
|
-
stores.aiUserMemory.clear();
|
|
5587
5494
|
stores.aiUsageMetrics.clear();
|
|
5588
5495
|
stores.relationAttributes.clear();
|
|
5589
5496
|
}
|