@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
@@ -382,9 +382,19 @@ function setCardWaitForClean(state, id, wait) {
382
382
  function setSourceTopic(state, topic) {
383
383
  return state.topic === topic ? state : { ...state, topic };
384
384
  }
385
- function applyReviewedSourceSet(state, set) {
385
+ function removedInReview(reviewed, answer) {
386
+ const kept = new Set(answer.sources.map(sourceKey));
387
+ return new Set(reviewed.sources.map(sourceKey).filter((k) => !kept.has(k)));
388
+ }
389
+ function applyReviewedSourceSet(state, set, reviewed) {
386
390
  let next = state;
387
- for (const card of state.cards) {
391
+ if (reviewed) {
392
+ const removed = removedInReview(reviewed, set);
393
+ for (const card of state.cards) {
394
+ if (card.draft.ref && removed.has(sourceKey(card.draft.ref))) next = removeCard(next, card.id);
395
+ }
396
+ }
397
+ for (const card of next.cards) {
388
398
  const ref = card.draft.ref;
389
399
  if (!ref) continue;
390
400
  const match = set.sources.find((r) => sameSourceRef(r, ref));
@@ -600,8 +610,8 @@ function createSourceSetController(adapter) {
600
610
  hasRef: (resourceType, resourceId) => hasSourceRef(store.getState(), resourceType, resourceId),
601
611
  liveCount: () => store.getState().cards.length,
602
612
  toSourceSet: (options = {}) => selectSourceSet(store.getState(), options),
603
- applySourceSet(set) {
604
- commit(applyReviewedSourceSet(store.getState(), set));
613
+ applySourceSet(set, options = {}) {
614
+ commit(applyReviewedSourceSet(store.getState(), set, options.reviewed));
605
615
  },
606
616
  async manifest() {
607
617
  const refs = readySourceRefs(store.getState());