@ai-matrx/api 0.0.0-stage → 0.1.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.
Files changed (146) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE +21 -0
  3. package/README.md +22 -2
  4. package/dist/account.cjs +670 -0
  5. package/dist/account.d.cts +3246 -0
  6. package/dist/account.d.ts +3246 -0
  7. package/dist/account.js +558 -0
  8. package/dist/agents.cjs +598 -0
  9. package/dist/agents.d.cts +3417 -0
  10. package/dist/agents.d.ts +3417 -0
  11. package/dist/agents.js +497 -0
  12. package/dist/ai.cjs +109 -0
  13. package/dist/ai.d.cts +493 -0
  14. package/dist/ai.d.ts +493 -0
  15. package/dist/ai.js +91 -0
  16. package/dist/apps.cjs +394 -0
  17. package/dist/apps.d.cts +1094 -0
  18. package/dist/apps.d.ts +1094 -0
  19. package/dist/apps.js +328 -0
  20. package/dist/architecture.cjs +1223 -0
  21. package/dist/architecture.d.cts +4701 -0
  22. package/dist/architecture.d.ts +4701 -0
  23. package/dist/architecture.js +1016 -0
  24. package/dist/audio.cjs +226 -0
  25. package/dist/audio.d.cts +723 -0
  26. package/dist/audio.d.ts +723 -0
  27. package/dist/audio.js +188 -0
  28. package/dist/chat.cjs +538 -0
  29. package/dist/chat.d.cts +2251 -0
  30. package/dist/chat.d.ts +2251 -0
  31. package/dist/chat.js +447 -0
  32. package/dist/chunk-2SXAAKGV.cjs +279 -0
  33. package/dist/chunk-5WJLKYH6.cjs +48 -0
  34. package/dist/chunk-FNIYADWI.cjs +59 -0
  35. package/dist/chunk-HER22VVH.cjs +1047 -0
  36. package/dist/chunk-KIEAFMKB.js +264 -0
  37. package/dist/chunk-TSHL7Z53.js +1012 -0
  38. package/dist/chunk-VTZKJMSY.js +43 -0
  39. package/dist/chunk-YTEOFGFC.js +57 -0
  40. package/dist/code.cjs +561 -0
  41. package/dist/code.d.cts +1976 -0
  42. package/dist/code.d.ts +1976 -0
  43. package/dist/code.js +467 -0
  44. package/dist/commerce.cjs +22 -0
  45. package/dist/commerce.d.cts +45 -0
  46. package/dist/commerce.d.ts +45 -0
  47. package/dist/commerce.js +18 -0
  48. package/dist/communications.cjs +215 -0
  49. package/dist/communications.d.cts +948 -0
  50. package/dist/communications.d.ts +948 -0
  51. package/dist/communications.js +179 -0
  52. package/dist/computer.cjs +330 -0
  53. package/dist/computer.d.cts +733 -0
  54. package/dist/computer.d.ts +733 -0
  55. package/dist/computer.js +275 -0
  56. package/dist/content.cjs +425 -0
  57. package/dist/content.d.cts +1796 -0
  58. package/dist/content.d.ts +1796 -0
  59. package/dist/content.js +354 -0
  60. package/dist/credentials.cjs +22 -0
  61. package/dist/credentials.d.cts +82 -0
  62. package/dist/credentials.d.ts +82 -0
  63. package/dist/credentials.js +1 -0
  64. package/dist/crm.cjs +271 -0
  65. package/dist/crm.d.cts +1731 -0
  66. package/dist/crm.d.ts +1731 -0
  67. package/dist/crm.js +226 -0
  68. package/dist/data.cjs +382 -0
  69. package/dist/data.d.cts +1860 -0
  70. package/dist/data.d.ts +1860 -0
  71. package/dist/data.js +318 -0
  72. package/dist/education.cjs +28 -0
  73. package/dist/education.d.cts +73 -0
  74. package/dist/education.d.ts +73 -0
  75. package/dist/education.js +23 -0
  76. package/dist/files.cjs +1330 -0
  77. package/dist/files.d.cts +4956 -0
  78. package/dist/files.d.ts +4956 -0
  79. package/dist/files.js +1104 -0
  80. package/dist/human-resources.cjs +178 -0
  81. package/dist/human-resources.d.cts +1208 -0
  82. package/dist/human-resources.d.ts +1208 -0
  83. package/dist/human-resources.js +148 -0
  84. package/dist/index-C2E-Cp19.d.ts +385 -0
  85. package/dist/index-wC2vtb70.d.cts +385 -0
  86. package/dist/index.cjs +2016 -0
  87. package/dist/index.d.cts +2069 -0
  88. package/dist/index.d.ts +2069 -0
  89. package/dist/index.js +1746 -0
  90. package/dist/integrations.cjs +5116 -0
  91. package/dist/integrations.d.cts +19213 -0
  92. package/dist/integrations.d.ts +19213 -0
  93. package/dist/integrations.js +4263 -0
  94. package/dist/intelligence.cjs +1305 -0
  95. package/dist/intelligence.d.cts +4658 -0
  96. package/dist/intelligence.d.ts +4658 -0
  97. package/dist/intelligence.js +1196 -0
  98. package/dist/knowledge.cjs +1113 -0
  99. package/dist/knowledge.d.cts +5427 -0
  100. package/dist/knowledge.d.ts +5427 -0
  101. package/dist/knowledge.js +921 -0
  102. package/dist/legal.cjs +225 -0
  103. package/dist/legal.d.cts +1038 -0
  104. package/dist/legal.d.ts +1038 -0
  105. package/dist/legal.js +187 -0
  106. package/dist/marketing.cjs +1155 -0
  107. package/dist/marketing.d.cts +7741 -0
  108. package/dist/marketing.d.ts +7741 -0
  109. package/dist/marketing.js +951 -0
  110. package/dist/masterwork.cjs +283 -0
  111. package/dist/masterwork.d.cts +1938 -0
  112. package/dist/masterwork.d.ts +1938 -0
  113. package/dist/masterwork.js +231 -0
  114. package/dist/media.cjs +610 -0
  115. package/dist/media.d.cts +2270 -0
  116. package/dist/media.d.ts +2270 -0
  117. package/dist/media.js +507 -0
  118. package/dist/net.cjs +67 -0
  119. package/dist/net.d.cts +204 -0
  120. package/dist/net.d.ts +204 -0
  121. package/dist/net.js +2 -0
  122. package/dist/platform.cjs +150 -0
  123. package/dist/platform.d.cts +572 -0
  124. package/dist/platform.d.ts +572 -0
  125. package/dist/platform.js +125 -0
  126. package/dist/publish.cjs +248 -0
  127. package/dist/publish.d.cts +1431 -0
  128. package/dist/publish.d.ts +1431 -0
  129. package/dist/publish.js +206 -0
  130. package/dist/schemas.cjs +2 -0
  131. package/dist/schemas.d.cts +1353 -0
  132. package/dist/schemas.d.ts +1353 -0
  133. package/dist/schemas.js +1 -0
  134. package/dist/stream.cjs +44 -0
  135. package/dist/stream.d.cts +2 -0
  136. package/dist/stream.d.ts +2 -0
  137. package/dist/stream.js +3 -0
  138. package/dist/web.cjs +1045 -0
  139. package/dist/web.d.cts +4186 -0
  140. package/dist/web.d.ts +4186 -0
  141. package/dist/web.js +867 -0
  142. package/dist/workflows.cjs +825 -0
  143. package/dist/workflows.d.cts +4699 -0
  144. package/dist/workflows.d.ts +4699 -0
  145. package/dist/workflows.js +686 -0
  146. package/package.json +419 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,31 @@
1
+ # Changelog — @ai-matrx/api
2
+
3
+ ## 0.1.1
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/api/v0.1.0..npm/api/v0.1.1 -- apps/shared/api`).
7
+ No source changes intended and no consumer action required.
8
+
9
+ ## 0.1.0 addendum — 2026-10-09 (before the first npm release)
10
+
11
+ The credentials port MOVED to `@ai-matrx/auth/credentials`; `@ai-matrx/api/credentials` and the
12
+ root re-export it unchanged. The build inlines it (code and types) until `@ai-matrx/auth` is on npm.
13
+
14
+ ### Consumer action
15
+
16
+ None.
17
+
18
+ ## 0.1.0 — 2026-10-08
19
+
20
+ First release (package lines v3 steps 3–4).
21
+
22
+ - Root: `createApi` — base URL per deployment from the contract's deployment map, `X-Request-Id` on every call, connect/total timeouts, retry of idempotent reads, one error model (`MatrxApiError`, `NetError`, `OrganizationContextError`).
23
+ - ONE credentials setting, five kinds named after the contract's auth tiers: `user`, `guest`, `api_key`, `service`, `scoped` (`MATRX_HEADERS` names every shared header).
24
+ - Organization binding per operation's `x-matrx-org`: `required` fails closed before the wire, `optional` sends when bound, `exempt` never sends.
25
+ - Moved in (behavior verbatim): the Matrx transport, call pipeline, protocol fallback, org context, server error model, warm-up, run-wait, operations/rejoin/follow-server-job, provider failures (from `@ai-matrx/agents/matrx`); credentials and the net resilience trio (from `@ai-matrx/data`).
26
+ - Generated from aidream `api-contract/`: one section per domain (`@ai-matrx/api/<domain>`, 28), each operation a standalone typed function; `/schemas` (schemas reached from more than one domain); a per-domain path-keyed `call`; `/stream` (NDJSON, SSE, conditional `*_or_json`); mandate keys in `/intelligence`. `node scripts/generate.mjs --check` fails on drift; the generator is red on an unmapped route.
27
+
28
+ ### Consumer action
29
+
30
+ None. `@ai-matrx/agents/matrx`, `@ai-matrx/agents/stream/*` and `@ai-matrx/data`'s credentials and `/net` keep their paths (they re-export from here from their next release).
31
+
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AI Matrix Engine
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,23 @@
1
- # Temporary Holding Version
1
+ # @ai-matrx/api
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The one way every app talks to every AI Matrx server. Generated from the server contract and split by area, so an app only loads the requests it calls. It never holds screens, app state or database code.
4
+
5
+ ```ts
6
+ import { createApi } from "@ai-matrx/api";
7
+ import { listAssets } from "@ai-matrx/api/files";
8
+
9
+ const api = createApi({ credentials: { kind: "api_key", apiKey: process.env.MATRX_API_KEY! }, organizationId });
10
+ const page = await listAssets(api, { query: { limit: 50 } });
11
+ ```
12
+
13
+ - **Credentials** — one setting: a credential, a getter, or a `CredentialsPort` (`user`, `guest`, `api_key`, `service`, `scoped`).
14
+ - **Organization** — bound once; sent per each operation's contract rule (required / optional / exempt).
15
+ - **Routing** — each operation knows which deployment answers; override with `baseUrls` or `resolveBaseUrl`.
16
+ - **Streams** — NDJSON/SSE operations return an async iterable; `*_or_json` operations return `{ kind: "json" } | { kind: "stream" }`.
17
+ - **Sections** — `@ai-matrx/api/<domain>` per domain, `/schemas`, `/stream`, `/net`, `/credentials`. Importing one domain loads no other domain's code.
18
+
19
+ Regenerate after a server contract change: `node scripts/generate.mjs` (input: aidream `api-contract/`). `--check` fails on drift.
20
+
21
+ ## Gates
22
+
23
+ `pnpm check:package` runs the generator `--check`, the build, exports agreement, publint and the section probe (`scripts/section-probe.mjs`: no domain section loads another domain's code; one imported operation bundles exactly one operation descriptor).