@ai-matrx/agents 0.18.5 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/content-transfer/index.cjs.map +1 -1
- package/dist/content-transfer/index.js.map +1 -1
- package/dist/content-transfer/react/index.cjs.map +1 -1
- package/dist/content-transfer/react/index.js.map +1 -1
- package/dist/mandates/index.cjs +2 -2
- package/dist/mandates/index.cjs.map +1 -1
- package/dist/mandates/index.d.cts +4 -4
- package/dist/mandates/index.d.ts +4 -4
- package/dist/mandates/index.js +2 -2
- package/dist/mandates/index.js.map +1 -1
- package/dist/sources/react/index.cjs +14 -4
- package/dist/sources/react/index.cjs.map +1 -1
- package/dist/sources/react/index.d.cts +11 -3
- package/dist/sources/react/index.d.ts +11 -3
- package/dist/sources/react/index.js +14 -4
- package/dist/sources/react/index.js.map +1 -1
- package/dist/sources/runtime/index.cjs +15 -4
- package/dist/sources/runtime/index.cjs.map +1 -1
- package/dist/sources/runtime/index.d.cts +22 -5
- package/dist/sources/runtime/index.d.ts +22 -5
- package/dist/sources/runtime/index.js +15 -4
- package/dist/sources/runtime/index.js.map +1 -1
- package/mandates/snapshots/keys.0.19.1.json +652 -0
- package/package.json +3 -3
|
@@ -447,8 +447,14 @@ interface SourceSetController extends SourceSetActions {
|
|
|
447
447
|
toSourceSet(options?: {
|
|
448
448
|
targetModelId?: string | undefined;
|
|
449
449
|
}): SourceSet;
|
|
450
|
-
/**
|
|
451
|
-
|
|
450
|
+
/**
|
|
451
|
+
* Apply a set the review returned (forms, parts, caps, delivery). Pass
|
|
452
|
+
* `reviewed` — the set sent INTO the review — and every Source removed there
|
|
453
|
+
* leaves the list too (only those; one that landed meanwhile stays).
|
|
454
|
+
*/
|
|
455
|
+
applySourceSet(set: SourceSet, options?: {
|
|
456
|
+
reviewed?: SourceSet | undefined;
|
|
457
|
+
}): void;
|
|
452
458
|
/** POST /sources/resolve — the grounded text for a generator, named as the cards name them. */
|
|
453
459
|
resolve(options?: {
|
|
454
460
|
targetModelId?: string | undefined;
|
|
@@ -723,7 +729,9 @@ interface UseSourceSetResult extends SourceSetActions {
|
|
|
723
729
|
targetModelId?: string | undefined;
|
|
724
730
|
}) => SourceSet;
|
|
725
731
|
/** Apply a set the review page returned (forms, parts, caps, delivery). */
|
|
726
|
-
applySourceSet: (set: SourceSet
|
|
732
|
+
applySourceSet: (set: SourceSet, options?: {
|
|
733
|
+
reviewed?: SourceSet | undefined;
|
|
734
|
+
}) => void;
|
|
727
735
|
/** POST /sources/resolve — the grounded text for a generator. */
|
|
728
736
|
resolve: (options?: {
|
|
729
737
|
targetModelId?: string | undefined;
|
|
@@ -447,8 +447,14 @@ interface SourceSetController extends SourceSetActions {
|
|
|
447
447
|
toSourceSet(options?: {
|
|
448
448
|
targetModelId?: string | undefined;
|
|
449
449
|
}): SourceSet;
|
|
450
|
-
/**
|
|
451
|
-
|
|
450
|
+
/**
|
|
451
|
+
* Apply a set the review returned (forms, parts, caps, delivery). Pass
|
|
452
|
+
* `reviewed` — the set sent INTO the review — and every Source removed there
|
|
453
|
+
* leaves the list too (only those; one that landed meanwhile stays).
|
|
454
|
+
*/
|
|
455
|
+
applySourceSet(set: SourceSet, options?: {
|
|
456
|
+
reviewed?: SourceSet | undefined;
|
|
457
|
+
}): void;
|
|
452
458
|
/** POST /sources/resolve — the grounded text for a generator, named as the cards name them. */
|
|
453
459
|
resolve(options?: {
|
|
454
460
|
targetModelId?: string | undefined;
|
|
@@ -723,7 +729,9 @@ interface UseSourceSetResult extends SourceSetActions {
|
|
|
723
729
|
targetModelId?: string | undefined;
|
|
724
730
|
}) => SourceSet;
|
|
725
731
|
/** Apply a set the review page returned (forms, parts, caps, delivery). */
|
|
726
|
-
applySourceSet: (set: SourceSet
|
|
732
|
+
applySourceSet: (set: SourceSet, options?: {
|
|
733
|
+
reviewed?: SourceSet | undefined;
|
|
734
|
+
}) => void;
|
|
727
735
|
/** POST /sources/resolve — the grounded text for a generator. */
|
|
728
736
|
resolve: (options?: {
|
|
729
737
|
targetModelId?: string | undefined;
|
|
@@ -356,9 +356,19 @@ function setCardWaitForClean(state, id, wait) {
|
|
|
356
356
|
function setSourceTopic(state, topic) {
|
|
357
357
|
return state.topic === topic ? state : { ...state, topic };
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function removedInReview(reviewed, answer) {
|
|
360
|
+
const kept = new Set(answer.sources.map(sourceKey));
|
|
361
|
+
return new Set(reviewed.sources.map(sourceKey).filter((k) => !kept.has(k)));
|
|
362
|
+
}
|
|
363
|
+
function applyReviewedSourceSet(state, set, reviewed) {
|
|
360
364
|
let next = state;
|
|
361
|
-
|
|
365
|
+
if (reviewed) {
|
|
366
|
+
const removed = removedInReview(reviewed, set);
|
|
367
|
+
for (const card of state.cards) {
|
|
368
|
+
if (card.draft.ref && removed.has(sourceKey(card.draft.ref))) next = removeCard(next, card.id);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
for (const card of next.cards) {
|
|
362
372
|
const ref = card.draft.ref;
|
|
363
373
|
if (!ref) continue;
|
|
364
374
|
const match = set.sources.find((r) => sameSourceRef(r, ref));
|
|
@@ -574,8 +584,8 @@ function createSourceSetController(adapter) {
|
|
|
574
584
|
hasRef: (resourceType, resourceId) => hasSourceRef(store.getState(), resourceType, resourceId),
|
|
575
585
|
liveCount: () => store.getState().cards.length,
|
|
576
586
|
toSourceSet: (options = {}) => selectSourceSet(store.getState(), options),
|
|
577
|
-
applySourceSet(set) {
|
|
578
|
-
commit(applyReviewedSourceSet(store.getState(), set));
|
|
587
|
+
applySourceSet(set, options = {}) {
|
|
588
|
+
commit(applyReviewedSourceSet(store.getState(), set, options.reviewed));
|
|
579
589
|
},
|
|
580
590
|
async manifest() {
|
|
581
591
|
const refs = readySourceRefs(store.getState());
|