@ai-matrx/agents 0.18.5 → 0.19.2

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/content-transfer/index.cjs.map +1 -1
  3. package/dist/content-transfer/index.js.map +1 -1
  4. package/dist/content-transfer/react/index.cjs.map +1 -1
  5. package/dist/content-transfer/react/index.js.map +1 -1
  6. package/dist/index.cjs +2 -2
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.js +2 -2
  9. package/dist/index.js.map +1 -1
  10. package/dist/mandates/index.cjs +2 -2
  11. package/dist/mandates/index.cjs.map +1 -1
  12. package/dist/mandates/index.d.cts +4 -4
  13. package/dist/mandates/index.d.ts +4 -4
  14. package/dist/mandates/index.js +2 -2
  15. package/dist/mandates/index.js.map +1 -1
  16. package/dist/matrx/index.cjs +2 -2
  17. package/dist/matrx/index.cjs.map +1 -1
  18. package/dist/matrx/index.js +2 -2
  19. package/dist/matrx/index.js.map +1 -1
  20. package/dist/react/index.cjs +1 -0
  21. package/dist/react/index.cjs.map +1 -1
  22. package/dist/react/index.js +1 -0
  23. package/dist/react/index.js.map +1 -1
  24. package/dist/sources/react/index.cjs +14 -4
  25. package/dist/sources/react/index.cjs.map +1 -1
  26. package/dist/sources/react/index.d.cts +11 -3
  27. package/dist/sources/react/index.d.ts +11 -3
  28. package/dist/sources/react/index.js +14 -4
  29. package/dist/sources/react/index.js.map +1 -1
  30. package/dist/sources/runtime/index.cjs +15 -4
  31. package/dist/sources/runtime/index.cjs.map +1 -1
  32. package/dist/sources/runtime/index.d.cts +22 -5
  33. package/dist/sources/runtime/index.d.ts +22 -5
  34. package/dist/sources/runtime/index.js +15 -4
  35. package/dist/sources/runtime/index.js.map +1 -1
  36. package/mandates/snapshots/keys.0.19.1.json +652 -0
  37. package/mandates/snapshots/keys.0.19.2.json +652 -0
  38. package/package.json +2 -2
@@ -78,6 +78,7 @@ __export(runtime_exports, {
78
78
  reloadedCard: () => reloadedCard,
79
79
  rememberPickedParts: () => rememberPickedParts,
80
80
  removeCard: () => removeCard,
81
+ removedInReview: () => removedInReview,
81
82
  renderedPartChars: () => renderedPartChars,
82
83
  restartCard: () => restartCard,
83
84
  restoredCards: () => restoredCards,
@@ -501,9 +502,19 @@ function setCardWaitForClean(state, id, wait) {
501
502
  function setSourceTopic(state, topic) {
502
503
  return state.topic === topic ? state : { ...state, topic };
503
504
  }
504
- function applyReviewedSourceSet(state, set) {
505
+ function removedInReview(reviewed, answer) {
506
+ const kept = new Set(answer.sources.map(sourceKey));
507
+ return new Set(reviewed.sources.map(sourceKey).filter((k) => !kept.has(k)));
508
+ }
509
+ function applyReviewedSourceSet(state, set, reviewed) {
505
510
  let next = state;
506
- for (const card of state.cards) {
511
+ if (reviewed) {
512
+ const removed = removedInReview(reviewed, set);
513
+ for (const card of state.cards) {
514
+ if (card.draft.ref && removed.has(sourceKey(card.draft.ref))) next = removeCard(next, card.id);
515
+ }
516
+ }
517
+ for (const card of next.cards) {
507
518
  const ref = card.draft.ref;
508
519
  if (!ref) continue;
509
520
  const match = set.sources.find((r) => sameSourceRef(r, ref));
@@ -956,8 +967,8 @@ function createSourceSetController(adapter) {
956
967
  hasRef: (resourceType, resourceId) => hasSourceRef(store.getState(), resourceType, resourceId),
957
968
  liveCount: () => store.getState().cards.length,
958
969
  toSourceSet: (options = {}) => selectSourceSet(store.getState(), options),
959
- applySourceSet(set) {
960
- commit(applyReviewedSourceSet(store.getState(), set));
970
+ applySourceSet(set, options = {}) {
971
+ commit(applyReviewedSourceSet(store.getState(), set, options.reviewed));
961
972
  },
962
973
  async manifest() {
963
974
  const refs = readySourceRefs(store.getState());