@ai-matrx/agents 0.59.169 → 0.59.171

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 CHANGED
@@ -2,13 +2,25 @@
2
2
 
3
3
  ### Unreleased
4
4
 
5
+ - **`useAgentSummary` looks an agent up by server search once per id per catalog (2026-10-19, Board remount law).** An agent tile that woke or remounted searched (`agx_search`) three times each time when the search found nothing; a found, missing or in-flight id is now asked once per tab, and a lookup that failed is forgotten so the next mount asks again. Consumer action: none.
6
+
5
7
  - **`toolPriceText` returns null for a zero-cost tool instead of "Free" (2026-10-18, law 14: no "Free").** Positive hints still read "N pts". Consumer action: none (callers already handle null).
6
8
 
7
- ## 0.59.169
9
+ ## 0.59.171
8
10
 
9
11
  UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
10
12
  Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/matrx-agents/src`.
11
13
 
14
+ ## 0.59.170
15
+
16
+ Automatic changed-only republish (docs/metadata drift since the last published version; verified: `git diff e9c25acd07 9c0ddc1922 -- apps/shared/matrx-agents/src`
17
+ has no shipped-source changes outside tests, fixtures and docs). No consumer action required.
18
+
19
+ ## 0.59.169
20
+
21
+ Automatic changed-only republish (docs/metadata drift since the last published version; verified: `git diff cae8c2b935 e9c25acd07 -- apps/shared/matrx-agents/src`
22
+ has no shipped-source changes outside tests, fixtures and docs). No consumer action required.
23
+
12
24
  ## 0.59.168
13
25
 
14
26
  Automatic changed-only republish (docs/metadata drift since the last published version; verified: `git diff 5535e3bb42 cae8c2b935 -- apps/shared/matrx-agents/src`
@@ -176,6 +176,22 @@ function AgentCatalogProvider({
176
176
  // catalog/react/useAgentSummary.ts
177
177
  var import_react3 = require("react");
178
178
  var noopSubscribe = () => () => void 0;
179
+ var looked = /* @__PURE__ */ new WeakMap();
180
+ function lookUpAgentOnce(catalog, agentId) {
181
+ let byId = looked.get(catalog);
182
+ if (!byId) {
183
+ byId = /* @__PURE__ */ new Map();
184
+ looked.set(catalog, byId);
185
+ }
186
+ const kept = byId.get(agentId);
187
+ if (kept) return kept;
188
+ const lookup = catalog.searchServer(agentId).then(() => void 0).catch((error) => {
189
+ byId?.delete(agentId);
190
+ throw error;
191
+ });
192
+ byId.set(agentId, lookup);
193
+ return lookup;
194
+ }
179
195
  function useAgentSummary(catalog, agentId) {
180
196
  const row = (0, import_react3.useSyncExternalStore)(
181
197
  catalog ? catalog.subscribe : noopSubscribe,
@@ -188,7 +204,7 @@ function useAgentSummary(catalog, agentId) {
188
204
  let cancelled = false;
189
205
  void catalog.ensureLoaded().then(() => {
190
206
  if (cancelled || catalog.getState().byId[agentId]) return;
191
- return catalog.searchServer(agentId).then(() => void 0);
207
+ return lookUpAgentOnce(catalog, agentId);
192
208
  }).catch(() => void 0);
193
209
  return () => {
194
210
  cancelled = true;
@@ -564,7 +564,8 @@ declare function AgentCatalogProvider({ catalog, children, ...ports }: AgentCata
564
564
  * ONE agent's catalog row — name, description, category, tags, star, access — read straight from
565
565
  * the catalog store (the ONE holder of agent identity; no host mirror). When the row is missing the
566
566
  * catalog is loaded (its own TTL and in-flight dedupe make this safe on every mount); an id the
567
- * list does not carry is looked up by server search, which merges it into the catalog.
567
+ * list does not carry is looked up by server search, which merges it into the catalog — once per
568
+ * id per catalog (the Board's remount law: a woken or remounted tile asks nothing again).
568
569
  *
569
570
  * Takes the catalog explicitly so a host without `AgentCatalogProvider` (chat, workers) binds it.
570
571
  */
@@ -564,7 +564,8 @@ declare function AgentCatalogProvider({ catalog, children, ...ports }: AgentCata
564
564
  * ONE agent's catalog row — name, description, category, tags, star, access — read straight from
565
565
  * the catalog store (the ONE holder of agent identity; no host mirror). When the row is missing the
566
566
  * catalog is loaded (its own TTL and in-flight dedupe make this safe on every mount); an id the
567
- * list does not carry is looked up by server search, which merges it into the catalog.
567
+ * list does not carry is looked up by server search, which merges it into the catalog — once per
568
+ * id per catalog (the Board's remount law: a woken or remounted tile asks nothing again).
568
569
  *
569
570
  * Takes the catalog explicitly so a host without `AgentCatalogProvider` (chat, workers) binds it.
570
571
  */
@@ -118,6 +118,22 @@ function AgentCatalogProvider({
118
118
  // catalog/react/useAgentSummary.ts
119
119
  import { useEffect, useSyncExternalStore as useSyncExternalStore2 } from "react";
120
120
  var noopSubscribe = () => () => void 0;
121
+ var looked = /* @__PURE__ */ new WeakMap();
122
+ function lookUpAgentOnce(catalog, agentId) {
123
+ let byId = looked.get(catalog);
124
+ if (!byId) {
125
+ byId = /* @__PURE__ */ new Map();
126
+ looked.set(catalog, byId);
127
+ }
128
+ const kept = byId.get(agentId);
129
+ if (kept) return kept;
130
+ const lookup = catalog.searchServer(agentId).then(() => void 0).catch((error) => {
131
+ byId?.delete(agentId);
132
+ throw error;
133
+ });
134
+ byId.set(agentId, lookup);
135
+ return lookup;
136
+ }
121
137
  function useAgentSummary(catalog, agentId) {
122
138
  const row = useSyncExternalStore2(
123
139
  catalog ? catalog.subscribe : noopSubscribe,
@@ -130,7 +146,7 @@ function useAgentSummary(catalog, agentId) {
130
146
  let cancelled = false;
131
147
  void catalog.ensureLoaded().then(() => {
132
148
  if (cancelled || catalog.getState().byId[agentId]) return;
133
- return catalog.searchServer(agentId).then(() => void 0);
149
+ return lookUpAgentOnce(catalog, agentId);
134
150
  }).catch(() => void 0);
135
151
  return () => {
136
152
  cancelled = true;
@@ -703,7 +703,7 @@ var MANDATE_KEYS = {
703
703
  */
704
704
  brand_discovery__offering_roles: "brand_discovery.offering_roles",
705
705
  /**
706
- * @deprecated retiring since 0.59.169 — no longer declared in
706
+ * @deprecated retiring since 0.59.171 — no longer declared in
707
707
  * aidream. It leaves this union once no snapshot within the last
708
708
  * 3 published versions still carries it as active.
709
709
  */
@@ -680,7 +680,7 @@ var MANDATE_KEYS = {
680
680
  */
681
681
  brand_discovery__offering_roles: "brand_discovery.offering_roles",
682
682
  /**
683
- * @deprecated retiring since 0.59.169 — no longer declared in
683
+ * @deprecated retiring since 0.59.171 — no longer declared in
684
684
  * aidream. It leaves this union once no snapshot within the last
685
685
  * 3 published versions still carries it as active.
686
686
  */
@@ -656,7 +656,7 @@ var MANDATE_KEYS = {
656
656
  */
657
657
  brand_discovery__offering_roles: "brand_discovery.offering_roles",
658
658
  /**
659
- * @deprecated retiring since 0.59.169 — no longer declared in
659
+ * @deprecated retiring since 0.59.171 — no longer declared in
660
660
  * aidream. It leaves this union once no snapshot within the last
661
661
  * 3 published versions still carries it as active.
662
662
  */
@@ -628,7 +628,7 @@ var MANDATE_KEYS = {
628
628
  */
629
629
  brand_discovery__offering_roles: "brand_discovery.offering_roles",
630
630
  /**
631
- * @deprecated retiring since 0.59.169 — no longer declared in
631
+ * @deprecated retiring since 0.59.171 — no longer declared in
632
632
  * aidream. It leaves this union once no snapshot within the last
633
633
  * 3 published versions still carries it as active.
634
634
  */
@@ -47,9 +47,9 @@ module.exports = __toCommonJS(mandates_exports);
47
47
 
48
48
  // mandates/keys.generated.ts
49
49
  var MANDATE_KEYS_META = {
50
- aidreamRevision: "e9c25acd070fae3e6f85b1bce3abc175429d6d03",
50
+ aidreamRevision: "51e05980ffffd69bb62aac74c488fecb4b2686b3",
51
51
  generatorVersion: "1.0.0",
52
- packageVersion: "0.59.169",
52
+ packageVersion: "0.59.171",
53
53
  retireWindow: 3
54
54
  };
55
55
  var MANDATE_KEYS = {
@@ -666,7 +666,7 @@ var MANDATE_KEYS = {
666
666
  */
667
667
  brand_discovery__offering_roles: "brand_discovery.offering_roles",
668
668
  /**
669
- * @deprecated retiring since 0.59.169 — no longer declared in
669
+ * @deprecated retiring since 0.59.171 — no longer declared in
670
670
  * aidream. It leaves this union once no snapshot within the last
671
671
  * 3 published versions still carries it as active.
672
672
  */
@@ -693,7 +693,7 @@ var MANDATE_KEYS = {
693
693
  var ALL_MANDATE_KEYS = Object.values(MANDATE_KEYS);
694
694
  var RETIRING_MANDATE_KEYS = {
695
695
  "brand_discovery.offering_roles": "0.59.0",
696
- "coding_session.managed_translation_reference": "0.59.169",
696
+ "coding_session.managed_translation_reference": "0.59.171",
697
697
  "pdf.content_cleaner": "0.59.0",
698
698
  "sms.owner_beta": "0.59.0",
699
699
  "voice.owner_beta": "0.59.0"
@@ -6,9 +6,9 @@
6
6
  * from the IN-PROCESS mandate declarations — the same `declared_mandates()` the
7
7
  * boot sync writes to the database from. There is no hand list anywhere.
8
8
  *
9
- * aidream revision: e9c25acd070fae3e6f85b1bce3abc175429d6d03
9
+ * aidream revision: 51e05980ffffd69bb62aac74c488fecb4b2686b3
10
10
  * generator version: 1.0.0
11
- * package version: 0.59.169
11
+ * package version: 0.59.171
12
12
  * active keys: 606
13
13
  * retiring keys: 5
14
14
  *
@@ -19,9 +19,9 @@
19
19
  */
20
20
  /** Where this module came from — surfaced so a report can name the exact build. */
21
21
  declare const MANDATE_KEYS_META: {
22
- readonly aidreamRevision: "e9c25acd070fae3e6f85b1bce3abc175429d6d03";
22
+ readonly aidreamRevision: "51e05980ffffd69bb62aac74c488fecb4b2686b3";
23
23
  readonly generatorVersion: "1.0.0";
24
- readonly packageVersion: "0.59.169";
24
+ readonly packageVersion: "0.59.171";
25
25
  readonly retireWindow: 3;
26
26
  };
27
27
  /** Every declared mandate key, by THE IDENTIFIER RULE. */
@@ -639,7 +639,7 @@ declare const MANDATE_KEYS: {
639
639
  */
640
640
  readonly brand_discovery__offering_roles: "brand_discovery.offering_roles";
641
641
  /**
642
- * @deprecated retiring since 0.59.169 — no longer declared in
642
+ * @deprecated retiring since 0.59.171 — no longer declared in
643
643
  * aidream. It leaves this union once no snapshot within the last
644
644
  * 3 published versions still carries it as active.
645
645
  */
@@ -670,7 +670,7 @@ declare const ALL_MANDATE_KEYS: readonly MandateKey[];
670
670
  /** Keys still in the union but no longer declared (two-phase retire, phase 1). */
671
671
  declare const RETIRING_MANDATE_KEYS: {
672
672
  readonly "brand_discovery.offering_roles": "0.59.0";
673
- readonly "coding_session.managed_translation_reference": "0.59.169";
673
+ readonly "coding_session.managed_translation_reference": "0.59.171";
674
674
  readonly "pdf.content_cleaner": "0.59.0";
675
675
  readonly "sms.owner_beta": "0.59.0";
676
676
  readonly "voice.owner_beta": "0.59.0";
@@ -6,9 +6,9 @@
6
6
  * from the IN-PROCESS mandate declarations — the same `declared_mandates()` the
7
7
  * boot sync writes to the database from. There is no hand list anywhere.
8
8
  *
9
- * aidream revision: e9c25acd070fae3e6f85b1bce3abc175429d6d03
9
+ * aidream revision: 51e05980ffffd69bb62aac74c488fecb4b2686b3
10
10
  * generator version: 1.0.0
11
- * package version: 0.59.169
11
+ * package version: 0.59.171
12
12
  * active keys: 606
13
13
  * retiring keys: 5
14
14
  *
@@ -19,9 +19,9 @@
19
19
  */
20
20
  /** Where this module came from — surfaced so a report can name the exact build. */
21
21
  declare const MANDATE_KEYS_META: {
22
- readonly aidreamRevision: "e9c25acd070fae3e6f85b1bce3abc175429d6d03";
22
+ readonly aidreamRevision: "51e05980ffffd69bb62aac74c488fecb4b2686b3";
23
23
  readonly generatorVersion: "1.0.0";
24
- readonly packageVersion: "0.59.169";
24
+ readonly packageVersion: "0.59.171";
25
25
  readonly retireWindow: 3;
26
26
  };
27
27
  /** Every declared mandate key, by THE IDENTIFIER RULE. */
@@ -639,7 +639,7 @@ declare const MANDATE_KEYS: {
639
639
  */
640
640
  readonly brand_discovery__offering_roles: "brand_discovery.offering_roles";
641
641
  /**
642
- * @deprecated retiring since 0.59.169 — no longer declared in
642
+ * @deprecated retiring since 0.59.171 — no longer declared in
643
643
  * aidream. It leaves this union once no snapshot within the last
644
644
  * 3 published versions still carries it as active.
645
645
  */
@@ -670,7 +670,7 @@ declare const ALL_MANDATE_KEYS: readonly MandateKey[];
670
670
  /** Keys still in the union but no longer declared (two-phase retire, phase 1). */
671
671
  declare const RETIRING_MANDATE_KEYS: {
672
672
  readonly "brand_discovery.offering_roles": "0.59.0";
673
- readonly "coding_session.managed_translation_reference": "0.59.169";
673
+ readonly "coding_session.managed_translation_reference": "0.59.171";
674
674
  readonly "pdf.content_cleaner": "0.59.0";
675
675
  readonly "sms.owner_beta": "0.59.0";
676
676
  readonly "voice.owner_beta": "0.59.0";
@@ -1,8 +1,8 @@
1
1
  // mandates/keys.generated.ts
2
2
  var MANDATE_KEYS_META = {
3
- aidreamRevision: "e9c25acd070fae3e6f85b1bce3abc175429d6d03",
3
+ aidreamRevision: "51e05980ffffd69bb62aac74c488fecb4b2686b3",
4
4
  generatorVersion: "1.0.0",
5
- packageVersion: "0.59.169",
5
+ packageVersion: "0.59.171",
6
6
  retireWindow: 3
7
7
  };
8
8
  var MANDATE_KEYS = {
@@ -619,7 +619,7 @@ var MANDATE_KEYS = {
619
619
  */
620
620
  brand_discovery__offering_roles: "brand_discovery.offering_roles",
621
621
  /**
622
- * @deprecated retiring since 0.59.169 — no longer declared in
622
+ * @deprecated retiring since 0.59.171 — no longer declared in
623
623
  * aidream. It leaves this union once no snapshot within the last
624
624
  * 3 published versions still carries it as active.
625
625
  */
@@ -646,7 +646,7 @@ var MANDATE_KEYS = {
646
646
  var ALL_MANDATE_KEYS = Object.values(MANDATE_KEYS);
647
647
  var RETIRING_MANDATE_KEYS = {
648
648
  "brand_discovery.offering_roles": "0.59.0",
649
- "coding_session.managed_translation_reference": "0.59.169",
649
+ "coding_session.managed_translation_reference": "0.59.171",
650
650
  "pdf.content_cleaner": "0.59.0",
651
651
  "sms.owner_beta": "0.59.0",
652
652
  "voice.owner_beta": "0.59.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/agents",
3
- "version": "0.59.169",
3
+ "version": "0.59.171",
4
4
  "description": "Portable AI Matrx agent stream protocol, event projection, and safe result-presentation primitives.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -492,8 +492,8 @@
492
492
  "@ai-matrx/api": "latest",
493
493
  "@ai-matrx/associations": "latest",
494
494
  "@ai-matrx/content-ir": "latest",
495
- "@ai-matrx/design-system": "latest",
496
495
  "@ai-matrx/data": "latest",
496
+ "@ai-matrx/design-system": "latest",
497
497
  "@ai-matrx/icons": "latest",
498
498
  "@ai-matrx/kit": "latest"
499
499
  },
@@ -540,5 +540,5 @@
540
540
  "verify:tarball": "node ./scripts/verify-tarball.mjs",
541
541
  "typegen:self-test": "node scripts/typegen/drop-guard.self-test.mjs && node scripts/typegen/check-api-types-fresh.mjs --self-test"
542
542
  },
543
- "gitHead": "e9c25acd070fae3e6f85b1bce3abc175429d6d03"
543
+ "gitHead": "51e05980ffffd69bb62aac74c488fecb4b2686b3"
544
544
  }