@ai-matrx/agents 0.35.0 → 0.37.0

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 (54) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/content-transfer/index.cjs +12 -12
  3. package/dist/content-transfer/index.cjs.map +1 -1
  4. package/dist/content-transfer/index.d.cts +1 -1
  5. package/dist/content-transfer/index.d.ts +1 -1
  6. package/dist/content-transfer/index.js +12 -12
  7. package/dist/content-transfer/index.js.map +1 -1
  8. package/dist/content-transfer/react/index.cjs +12 -12
  9. package/dist/content-transfer/react/index.cjs.map +1 -1
  10. package/dist/content-transfer/react/index.d.cts +1 -1
  11. package/dist/content-transfer/react/index.d.ts +1 -1
  12. package/dist/content-transfer/react/index.js +12 -12
  13. package/dist/content-transfer/react/index.js.map +1 -1
  14. package/dist/index.cjs +1458 -1220
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.cts +2 -2
  17. package/dist/index.d.ts +2 -2
  18. package/dist/index.js +1461 -1223
  19. package/dist/index.js.map +1 -1
  20. package/dist/{keys.generated-BLDTm66e.d.cts → keys.generated-klzs6I1T.d.cts} +4 -4
  21. package/dist/{keys.generated-BLDTm66e.d.ts → keys.generated-klzs6I1T.d.ts} +4 -4
  22. package/dist/mandates/index.cjs +2 -2
  23. package/dist/mandates/index.cjs.map +1 -1
  24. package/dist/mandates/index.d.cts +2 -2
  25. package/dist/mandates/index.d.ts +2 -2
  26. package/dist/mandates/index.js +2 -2
  27. package/dist/mandates/index.js.map +1 -1
  28. package/dist/matrx/index.cjs +1721 -1483
  29. package/dist/matrx/index.cjs.map +1 -1
  30. package/dist/matrx/index.d.cts +376 -211
  31. package/dist/matrx/index.d.ts +376 -211
  32. package/dist/matrx/index.js +1724 -1486
  33. package/dist/matrx/index.js.map +1 -1
  34. package/dist/message-parts/index.cjs +27 -0
  35. package/dist/message-parts/index.cjs.map +1 -0
  36. package/dist/message-parts/index.d.cts +105 -0
  37. package/dist/message-parts/index.d.ts +105 -0
  38. package/dist/message-parts/index.js +6 -0
  39. package/dist/message-parts/index.js.map +1 -0
  40. package/dist/portable/mcp.cjs +99 -11
  41. package/dist/portable/mcp.cjs.map +1 -1
  42. package/dist/portable/mcp.js +99 -11
  43. package/dist/portable/mcp.js.map +1 -1
  44. package/dist/react/index.cjs +145 -57
  45. package/dist/react/index.cjs.map +1 -1
  46. package/dist/react/index.d.cts +3 -1
  47. package/dist/react/index.d.ts +3 -1
  48. package/dist/react/index.js +145 -57
  49. package/dist/react/index.js.map +1 -1
  50. package/mandates/snapshots/keys.0.36.0.json +653 -0
  51. package/mandates/snapshots/keys.0.37.0.json +653 -0
  52. package/package.json +13 -3
  53. package/dist/{operations-BT5kKMHl.d.cts → operations-DqOe2zob.d.cts} +34 -34
  54. package/dist/{operations-BT5kKMHl.d.ts → operations-DqOe2zob.d.ts} +34 -34
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.37.0
4
+
5
+ - **The request pipeline moves in** (chat package independence P9b — one `callApi`, not two). New `./matrx` module `call`: `buildMatrxRequestUrl`, `buildMatrxRequestBody` (scope injection, UI-only strip, fail-closed body-vs-context organization check), `executeMatrxCall` (JSON or NDJSON over the v2 → v1 fallback; stream callbacks, `consumeStream`, 204 = no data), `parseMatrxNdjsonResponse` (broken body → resumable `StreamTransportError`, with `onEvent` / `onTransportError` hooks), `bareStatusSentence`, `isBareTransportCode`, `honestTransportMessage`, `buildSafeRequestLog`, `redactUrlForRequestLog`, `shouldReportMatrxCallError`, and the types `MatrxCallScope`, `MatrxCallResult`, `MatrxHttpMethod`, `MatrxStreamParse`, `ExecuteMatrxCallRequest`, `ExecuteMatrxCallHooks`.
6
+ - `normalizeMatrxError` is now THE classifier matrx-frontend's `callApi` used: typed `BackendApiError` / `StreamTransportError` keep their `code` and `details` (as `serverDetail`), and no message is ever a bare status line ("HTTP 503" becomes the status sentence; the status rides `status`). `MatrxCallError` gains `raw?`.
7
+ - Consumer action: build host request clients on `executeMatrxCall` + `normalizeMatrxError`; supply only base URL, credential/org headers, and diagnostics hooks.
8
+
9
+ ## 0.36.1
10
+
11
+ - Build fix (0.36.0 never reached npm: the publish job's DTS worker ran out of heap). `./message-parts` is now built in the generated group, so the 6.8 MB `generated/api-types` declaration is rolled up by exactly one DTS pass. No API change from 0.36.0.
12
+
13
+ ## 0.36.0
14
+
15
+ - **`./message-parts`** (chat package independence P15 batch 2): `UserInputPart` — the exact generated user-input union every agent route accepts — and its derived part types (`TextBlock`, `ImageBlock`, `AudioBlock`, `VideoBlock`, `DocumentBlock`, `YouTubeVideoBlock`, the structured input blocks, table/list bookmarks, data refs, `ContentBlock`, `UserInput`). Moved from matrx-frontend chat `agents/types/message-types.ts` + `request.types.ts` so chat and the files feature depend on agents, not on each other. Pure; derived from `./generated/api-types` only.
16
+ - Consumer action: import these from `@ai-matrx/agents/message-parts`; delete host copies.
17
+
3
18
  ## 0.35.0
4
19
 
5
20
  - **The server's client contract lives here** (chat package independence P15, chair ruling 2026-10-02). New pure subpaths `./generated/{api-types,stream-events,llm-enums,llm-params-enums,source-attribution,workflow-events,canvas-chat,provision-offers,hr-contracts}` — emitted by aidream `scripts/generate_types.py` / `scripts/mandates_generate.py` straight into `generated/`, so a server change and its types land in one commit and ship on the publish train. `api-types` and `hr-contracts` are type-only (empty runtime modules).
@@ -709,18 +709,6 @@ function extractMatrxErrorCode(serverDetail) {
709
709
  return null;
710
710
  }
711
711
 
712
- // matrx/conversation.ts
713
- function mintMatrxConversationId() {
714
- return crypto.randomUUID();
715
- }
716
- function newStoredConversationStart(conversationId) {
717
- return {
718
- conversation_id: conversationId ?? mintMatrxConversationId(),
719
- is_new: true,
720
- store: true
721
- };
722
- }
723
-
724
712
  // stream/ndjson.ts
725
713
  var DEFAULT_MATRX_NDJSON_READ_AHEAD = 64;
726
714
  function isRecord2(value) {
@@ -941,6 +929,18 @@ async function* readMatrxNdjsonStream(body, options = {}) {
941
929
  }
942
930
  }
943
931
 
932
+ // matrx/conversation.ts
933
+ function mintMatrxConversationId() {
934
+ return crypto.randomUUID();
935
+ }
936
+ function newStoredConversationStart(conversationId) {
937
+ return {
938
+ conversation_id: conversationId ?? mintMatrxConversationId(),
939
+ is_new: true,
940
+ store: true
941
+ };
942
+ }
943
+
944
944
  // matrx/internal.ts
945
945
  function encodePathSegment(value) {
946
946
  return encodeURIComponent(value);