@ai-matrx/agents 0.20.6 → 0.21.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 CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.1
4
+
5
+ First published build of 0.21.0's content: the `npm/matrx-agents/v0.21.0` tag was cut without
6
+ its mandate-key snapshot and never reached npm. Contents: see 0.21.0 below.
7
+
8
+ ### Consumer action
9
+
10
+ - matrx-frontend: adopt `@ai-matrx/agents/context` — build the request `context` only through
11
+ `buildContextWire(rows)`, resolve rows with `resolveContextRow` against the person's
12
+ `users.user_surface_state` rows (`feature = "context_rules"`), run `compareReceipt` on the
13
+ `context_receipt` event, and render the composer chip / panel with `./context/react`.
14
+
15
+ ## 0.21.0 (not published)
16
+
17
+ ### Added — `./context` and `./context/react` (context value rules)
18
+
19
+ Contract: common-docs `systems/scopes-context/context-delivery/RULES.md`; parity corpus
20
+ `context/rules-corpus.json` (also run by aidream pytest against the Python twin).
21
+
22
+ - `./context` (pure): `resolveContextRule`, `contextValueChars` (code points),
23
+ `lookupSavedRule`, `resolveContextRow`, `buildContextWire` (the only producer of a request's
24
+ `context`: excluded rows never ship; the envelope carries the page limit only),
25
+ `compareReceipt`, `formatChars`, constants `CONTEXT_RULES_FEATURE`, `DEFAULT_SURFACE_KEY`,
26
+ `DEFAULT_INLINE_MAX_CHARS`, `DEFAULT_INLINE_CAP`, and the `ContextReceipt` wire types.
27
+ - `./context/react` (client): `ContextRulesTable`, `ContextRulesChip`, `ContextRulesPanelBody`,
28
+ `InlineMaxInput` — presentational; the host persists every `onChange`.
29
+
3
30
  ## 0.20.6
4
31
 
5
32
  Automatic changed-only republish (docs/metadata drift since the last tag — see
package/README.md CHANGED
@@ -243,6 +243,23 @@ const grounded = await set.resolve();
243
243
  `./sources/react` binds it: `useSourceSet(adapter)`, `useSourceIntake(set, deps)`,
244
244
  `useSourceRecovery(set, intake, runner, options)`, `useSourcePartsSearch(client, ref, query)`.
245
245
 
246
+ ## Context value rules (`./context`, `./context/react`)
247
+
248
+ Per value, a person controls two knobs: whether it reaches the model (`include`) and the size up
249
+ to which it is inlined (`max_inline_chars`; above it the agent reads it on request).
250
+
251
+ ```ts
252
+ import { resolveContextRow, buildContextWire, compareReceipt } from "@ai-matrx/agents/context";
253
+
254
+ const rows = values.map((v) => resolveContextRow(v, savedRules, cap)); // what the table shows
255
+ const context = buildContextWire(rows); // what the request sends
256
+ // on the `context_receipt` event:
257
+ const { mismatches, systemRows } = compareReceipt(rows, receipt);
258
+ ```
259
+
260
+ `./context/react` renders them: `ContextRulesTable`, `ContextRulesChip`, `ContextRulesPanelBody`
261
+ (presentational; the host persists every `onChange`).
262
+
246
263
  ## Runtime support
247
264
 
248
265
  The package targets modern browsers, browser-based desktop shells,
@@ -250,7 +267,7 @@ extensions, Next.js client or server modules, and Node 20+. Its one runtime
250
267
  dependencies are `@ai-matrx/data` (the shared net-resilience + credentials
251
268
  layer), `@ai-matrx/design-system` (the picker's primitives) and
252
269
  `@ai-matrx/associations` (the per-user star chokepoint); `react >= 18`
253
- is an optional peer needed only by `./react`, `./sources/react` and `./catalog/react`. No entry
270
+ is an optional peer needed only by `./react`, `./sources/react`, `./catalog/react` and `./context/react`. No entry
254
271
  point performs work at import time.
255
272
 
256
273
  ## Development