@elizaos/app-core 2.0.0-alpha.153 → 2.0.0-alpha.155

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.
@@ -1 +1 @@
1
- {"version":3,"file":"life.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/life.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AAqCvB,OAAO,EAEL,KAAK,sBAAsB,EAE5B,MAAM,qBAAqB,CAAC;AAqC7B,KAAK,aAAa,GAAG,sBAAsB,CAAC;AA6M5C,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAoE5D;AAiyED,eAAO,MAAM,UAAU,EAAE,MAAM,GAAG;IAChC,8BAA8B,CAAC,EAAE,OAAO,CAAC;CA8lD1C,CAAC"}
1
+ {"version":3,"file":"life.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/life.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AAqCvB,OAAO,EAEL,KAAK,sBAAsB,EAE5B,MAAM,qBAAqB,CAAC;AAqC7B,KAAK,aAAa,GAAG,sBAAsB,CAAC;AA6M5C,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAoE5D;AA2zED,eAAO,MAAM,UAAU,EAAE,MAAM,GAAG;IAChC,8BAA8B,CAAC,EAAE,OAAO,CAAC;CA8lD1C,CAAC"}
@@ -753,6 +753,10 @@ function formatOccurrenceDisambiguationLabel(occurrence) {
753
753
  ? `${occurrence.title} (${hints.join(", ")})`
754
754
  : occurrence.title;
755
755
  }
756
+ function narrowOccurrenceCandidates(matches) {
757
+ const actionableMatches = matches.filter((occurrence) => occurrence.state === "visible" || occurrence.state === "snoozed");
758
+ return actionableMatches.length > 0 ? actionableMatches : matches;
759
+ }
756
760
  async function resolveOccurrence(service, target, domain) {
757
761
  if (!target)
758
762
  return { match: null, ambiguousCandidates: [] };
@@ -772,9 +776,13 @@ async function resolveOccurrence(service, target, domain) {
772
776
  return { match: exactMatches[0], ambiguousCandidates: [] };
773
777
  }
774
778
  if (exactMatches.length > 1) {
779
+ const narrowedMatches = narrowOccurrenceCandidates(exactMatches);
780
+ if (narrowedMatches.length === 1) {
781
+ return { match: narrowedMatches[0], ambiguousCandidates: [] };
782
+ }
775
783
  return {
776
784
  match: null,
777
- ambiguousCandidates: exactMatches.map(formatOccurrenceDisambiguationLabel),
785
+ ambiguousCandidates: narrowedMatches.map(formatOccurrenceDisambiguationLabel),
778
786
  };
779
787
  }
780
788
  // Substring matches — disambiguate when multiple
@@ -783,8 +791,12 @@ async function resolveOccurrence(service, target, domain) {
783
791
  return { match: substringMatches[0], ambiguousCandidates: [] };
784
792
  }
785
793
  if (substringMatches.length > 1) {
794
+ const narrowedSubstringMatches = narrowOccurrenceCandidates(substringMatches);
795
+ if (narrowedSubstringMatches.length === 1) {
796
+ return { match: narrowedSubstringMatches[0], ambiguousCandidates: [] };
797
+ }
786
798
  // Prefer startsWith over generic includes
787
- const startsWithMatches = substringMatches.filter((o) => normalizeTitle(o.title).startsWith(normalized));
799
+ const startsWithMatches = narrowedSubstringMatches.filter((o) => normalizeTitle(o.title).startsWith(normalized));
788
800
  if (startsWithMatches.length === 1) {
789
801
  return { match: startsWithMatches[0], ambiguousCandidates: [] };
790
802
  }
@@ -797,7 +809,7 @@ async function resolveOccurrence(service, target, domain) {
797
809
  // Still ambiguous — return candidates for the caller to list
798
810
  return {
799
811
  match: null,
800
- ambiguousCandidates: substringMatches.map(formatOccurrenceDisambiguationLabel),
812
+ ambiguousCandidates: narrowedSubstringMatches.map(formatOccurrenceDisambiguationLabel),
801
813
  };
802
814
  }
803
815
  const targetTokens = normalized.split(/\s+/).filter(Boolean);
@@ -810,9 +822,13 @@ async function resolveOccurrence(service, target, domain) {
810
822
  return { match: tokenSetMatches[0], ambiguousCandidates: [] };
811
823
  }
812
824
  if (tokenSetMatches.length > 1) {
825
+ const narrowedTokenSetMatches = narrowOccurrenceCandidates(tokenSetMatches);
826
+ if (narrowedTokenSetMatches.length === 1) {
827
+ return { match: narrowedTokenSetMatches[0], ambiguousCandidates: [] };
828
+ }
813
829
  return {
814
830
  match: null,
815
- ambiguousCandidates: tokenSetMatches.map(formatOccurrenceDisambiguationLabel),
831
+ ambiguousCandidates: narrowedTokenSetMatches.map(formatOccurrenceDisambiguationLabel),
816
832
  };
817
833
  }
818
834
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elizaos/app-core",
3
- "version": "2.0.0-alpha.153",
3
+ "version": "2.0.0-alpha.155",
4
4
  "description": "Shared application core for elizaOS white-label agent apps.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -411,17 +411,17 @@
411
411
  "@capacitor/keyboard": "8.0.0",
412
412
  "@capacitor/preferences": "^8.0.1",
413
413
  "@clack/prompts": "^1.0.0",
414
- "@elizaos/agent": "^2.0.0-alpha.153",
414
+ "@elizaos/agent": "^2.0.0-alpha.155",
415
415
  "@elizaos/app-companion": "^0.0.0",
416
416
  "@elizaos/app-shopify": "^0.0.0",
417
417
  "@elizaos/app-steward": "^0.0.0",
418
418
  "@elizaos/app-task-coordinator": "^0.0.0",
419
419
  "@elizaos/app-training": "^0.0.1",
420
420
  "@elizaos/app-vincent": "^0.0.0",
421
- "@elizaos/core": "^2.0.0-alpha.153",
421
+ "@elizaos/core": "^2.0.0-alpha.155",
422
422
  "@elizaos/plugin-wechat": "github:milady-ai/plugin-wechat",
423
- "@elizaos/shared": "^2.0.0-alpha.153",
424
- "@elizaos/ui": "^2.0.0-alpha.153",
423
+ "@elizaos/shared": "^2.0.0-alpha.155",
424
+ "@elizaos/ui": "^2.0.0-alpha.155",
425
425
  "@radix-ui/react-checkbox": "^1.3.3",
426
426
  "@radix-ui/react-dialog": "^1.1.15",
427
427
  "@radix-ui/react-dropdown-menu": "^2.1.16",