@treeseed/sdk 0.13.0-rc.11 → 0.13.0-rc.111

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 (453) hide show
  1. package/README.md +23 -9
  2. package/dist/.treeseed-build-complete.json +1 -0
  3. package/dist/accounts/account-contracts.d.ts +6 -0
  4. package/dist/agent-capacity/artifact-mutation-receipt.d.ts +1 -1
  5. package/dist/agent-capacity/artifacts.d.ts +17 -1
  6. package/dist/agent-capacity/authority/agent-authority-presets.js +2 -1
  7. package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +304 -0
  8. package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.js +44 -0
  9. package/dist/agent-capacity/contracts/capacity/assignments/assignment-records.d.ts +10 -1
  10. package/dist/agent-capacity/contracts/capacity/assignments/context-pack-compiler.d.ts +25 -0
  11. package/dist/agent-capacity/contracts/capacity/assignments/context-pack-compiler.js +67 -0
  12. package/dist/agent-capacity/contracts/capacity/communication/communication-records.d.ts +1 -1
  13. package/dist/agent-capacity/contracts/capacity/providers/supply-policy.d.ts +0 -2
  14. package/dist/agent-capacity/contracts/capacity/workdays/workday-records.d.ts +1 -1
  15. package/dist/agent-capacity/contracts/configuration/configuration.js +1 -1
  16. package/dist/agent-capacity/contracts/projects/agents/project-agent-class.d.ts +0 -1
  17. package/dist/agent-capacity/contracts/runtime/runtime-observability.d.ts +3 -3
  18. package/dist/agent-capacity/contracts/support/decision-work.d.ts +2 -3
  19. package/dist/agent-capacity/validation/activity-profile.js +25 -12
  20. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +1092 -1170
  21. package/dist/agent-capacity/validation/agent-definition-schema.js +11 -29
  22. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +20 -20
  23. package/dist/agent-capacity/validation/configuration.d.ts +1 -1
  24. package/dist/agent-capacity/validation/configuration.js +1 -2
  25. package/dist/capacity/agents/agent-capacity.d.ts +2 -0
  26. package/dist/capacity/agents/agent-capacity.js +2 -0
  27. package/dist/capacity-provider/capability-ontology.d.ts +1495 -0
  28. package/dist/capacity-provider/capability-ontology.js +221 -0
  29. package/dist/capacity-provider/client.d.ts +24 -0
  30. package/dist/capacity-provider/client.js +11 -1
  31. package/dist/capacity-provider/contracts/environment-profiles.d.ts +255 -0
  32. package/dist/capacity-provider/contracts/environment-profiles.js +71 -0
  33. package/dist/capacity-provider/contracts/governance.d.ts +103 -35
  34. package/dist/capacity-provider/contracts/index.d.ts +1 -0
  35. package/dist/capacity-provider/contracts/index.js +1 -0
  36. package/dist/capacity-provider/core-capability-catalog.d.ts +47 -0
  37. package/dist/capacity-provider/core-capability-catalog.js +49 -0
  38. package/dist/capacity-provider/environment-catalog.d.ts +877 -0
  39. package/dist/capacity-provider/environment-catalog.js +116 -0
  40. package/dist/capacity-provider/index.d.ts +5 -0
  41. package/dist/capacity-provider/index.js +5 -0
  42. package/dist/capacity-provider/install-configuration.d.ts +39 -0
  43. package/dist/capacity-provider/install-configuration.js +18 -0
  44. package/dist/capacity-provider/sandbox-contracts.d.ts +548 -0
  45. package/dist/capacity-provider/sandbox-contracts.js +86 -0
  46. package/dist/capacity-provider/sandbox.d.ts +1 -0
  47. package/dist/capacity-provider/sandbox.js +1 -0
  48. package/dist/capacity-provider/validation.d.ts +2 -2
  49. package/dist/capacity-provider/validation.js +91 -55
  50. package/dist/configuration/secrets-capability.d.ts +5 -1
  51. package/dist/configuration/secrets-capability.js +5 -1
  52. package/dist/content/validation/agent-operational-content-schemas.d.ts +490 -168
  53. package/dist/content/validation/agent-operational-content-schemas.js +18 -3
  54. package/dist/content/validation/auxiliary-content-schemas.d.ts +160 -160
  55. package/dist/content/validation/content-model-schemas.d.ts +2943 -2747
  56. package/dist/content/validation/portable-content-data.d.ts +296 -292
  57. package/dist/deployment/ai/storage.d.ts +158 -0
  58. package/dist/deployment/ai/storage.js +32 -0
  59. package/dist/deployment/ai-hosting.d.ts +297 -0
  60. package/dist/deployment/ai-hosting.js +63 -0
  61. package/dist/deployment/ai-instance.d.ts +65 -0
  62. package/dist/deployment/ai-instance.js +30 -0
  63. package/dist/deployment/ai-mode.d.ts +454 -0
  64. package/dist/deployment/ai-mode.js +67 -0
  65. package/dist/deployment/canonical.d.ts +2 -0
  66. package/dist/deployment/canonical.js +17 -0
  67. package/dist/deployment/catalog.d.ts +16 -0
  68. package/dist/deployment/catalog.js +48 -0
  69. package/dist/deployment/hosted-topology-template.d.ts +449 -0
  70. package/dist/deployment/hosted-topology-template.js +56 -0
  71. package/dist/deployment/hosted-topology.d.ts +2698 -0
  72. package/dist/deployment/hosted-topology.js +468 -0
  73. package/dist/deployment/index.d.ts +13 -0
  74. package/dist/deployment/index.js +13 -0
  75. package/dist/deployment/postgres/contracts.d.ts +418 -0
  76. package/dist/deployment/postgres/contracts.js +83 -0
  77. package/dist/deployment/postgres/requirements.d.ts +14 -0
  78. package/dist/deployment/postgres/requirements.js +30 -0
  79. package/dist/deployment/postgres/transfer.d.ts +97 -0
  80. package/dist/deployment/postgres/transfer.js +29 -0
  81. package/dist/deployment/schemas.d.ts +8625 -0
  82. package/dist/deployment/schemas.js +455 -0
  83. package/dist/deployment/topology.d.ts +9 -0
  84. package/dist/deployment/topology.js +35 -0
  85. package/dist/development/index.d.ts +1 -0
  86. package/dist/development/index.js +1 -0
  87. package/dist/development/schemas.d.ts +3578 -0
  88. package/dist/development/schemas.js +199 -0
  89. package/dist/development/session-migration.d.ts +3 -0
  90. package/dist/development/session-migration.js +25 -0
  91. package/dist/entrypoints/clients/control-plane-client.d.ts +9 -1
  92. package/dist/entrypoints/clients/control-plane-client.js +17 -5
  93. package/dist/graph/context-query-contracts.d.ts +16 -1
  94. package/dist/graph/context-query-contracts.js +5 -0
  95. package/dist/guarantees/evidence-trust.d.ts +32 -0
  96. package/dist/guarantees/evidence-trust.js +47 -0
  97. package/dist/guarantees/index.d.ts +130 -0
  98. package/dist/guarantees/index.js +44 -0
  99. package/dist/identity/browser-session.d.ts +233 -0
  100. package/dist/identity/browser-session.js +51 -0
  101. package/dist/identity/contracts.d.ts +191 -0
  102. package/dist/identity/contracts.js +72 -0
  103. package/dist/identity/index.d.ts +3 -0
  104. package/dist/identity/index.js +3 -0
  105. package/dist/identity/runtime.d.ts +186 -0
  106. package/dist/identity/runtime.js +49 -0
  107. package/dist/model-registry/agent-operational-models.js +1 -1
  108. package/dist/operator-contracts/canonical-command-tree.js +465 -16
  109. package/dist/operator-contracts/catalog/admin-account-team-operations.d.ts +36 -0
  110. package/dist/operator-contracts/catalog/admin-account-team-operations.js +52 -0
  111. package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +163 -0
  112. package/dist/operator-contracts/catalog/capability-ontology-operations.js +24 -0
  113. package/dist/operator-contracts/catalog/communication-operations.d.ts +437 -0
  114. package/dist/operator-contracts/catalog/communication-operations.js +92 -0
  115. package/dist/operator-contracts/catalog/control-plane-catalog.d.ts +6 -0
  116. package/dist/operator-contracts/catalog/control-plane-catalog.js +18 -0
  117. package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +399 -0
  118. package/dist/operator-contracts/catalog/hosted-topology-operations.js +79 -0
  119. package/dist/operator-contracts/catalog/inbox-operations.d.ts +261 -0
  120. package/dist/operator-contracts/catalog/inbox-operations.js +36 -0
  121. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +53 -0
  122. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.js +23 -0
  123. package/dist/operator-contracts/catalog/infrastructure/command-tree-paths.d.ts +3 -0
  124. package/dist/operator-contracts/catalog/infrastructure/command-tree-paths.js +15 -0
  125. package/dist/operator-contracts/catalog/knowledge-share-operations.d.ts +127 -0
  126. package/dist/operator-contracts/catalog/knowledge-share-operations.js +25 -0
  127. package/dist/operator-contracts/catalog/provider-environment-commands.d.ts +4 -0
  128. package/dist/operator-contracts/catalog/provider-environment-commands.js +69 -0
  129. package/dist/operator-contracts/catalog/provider-environment-operations.d.ts +41 -0
  130. package/dist/operator-contracts/catalog/provider-environment-operations.js +61 -0
  131. package/dist/operator-contracts/catalog/services/identity-commands.d.ts +2 -0
  132. package/dist/operator-contracts/catalog/services/identity-commands.js +13 -0
  133. package/dist/operator-contracts/catalog/services/secret-commands.d.ts +2 -0
  134. package/dist/operator-contracts/catalog/services/secret-commands.js +31 -0
  135. package/dist/operator-contracts/catalog/services/secret-operations.d.ts +62 -0
  136. package/dist/operator-contracts/catalog/services/secret-operations.js +51 -0
  137. package/dist/operator-contracts/catalog/treeai-operations.d.ts +13 -0
  138. package/dist/operator-contracts/catalog/treeai-operations.js +61 -0
  139. package/dist/operator-contracts/command-tree.d.ts +28 -0
  140. package/dist/operator-contracts/command-tree.js +49 -0
  141. package/dist/operator-contracts/communication/addressing.d.ts +8 -0
  142. package/dist/operator-contracts/communication/addressing.js +57 -0
  143. package/dist/operator-contracts/communication/contracts.d.ts +1818 -0
  144. package/dist/operator-contracts/communication/contracts.js +188 -0
  145. package/dist/operator-contracts/control-plane-operation.d.ts +9 -0
  146. package/dist/operator-contracts/control-plane-operation.js +12 -2
  147. package/dist/operator-contracts/control-plane-operations.d.ts +2255 -195
  148. package/dist/operator-contracts/control-plane-operations.js +247 -85
  149. package/dist/operator-contracts/inbox/contracts.d.ts +1099 -0
  150. package/dist/operator-contracts/inbox/contracts.js +134 -0
  151. package/dist/operator-contracts/index.d.ts +6 -0
  152. package/dist/operator-contracts/index.js +6 -0
  153. package/dist/operator-contracts/knowledge/contracts.d.ts +130 -0
  154. package/dist/operator-contracts/knowledge/contracts.js +39 -0
  155. package/dist/operator-contracts/mcp.d.ts +5 -0
  156. package/dist/operator-contracts/mcp.js +61 -0
  157. package/dist/operator-contracts/oauth.d.ts +45 -0
  158. package/dist/operator-contracts/oauth.js +7 -0
  159. package/dist/operator-contracts/operation-builder.d.ts +18 -0
  160. package/dist/operator-contracts/operation-builder.js +78 -0
  161. package/dist/operator-contracts/seed/seed-bundle.d.ts +138 -0
  162. package/dist/operator-contracts/seed/seed-bundle.js +68 -0
  163. package/dist/platform/contracts.d.ts +429 -0
  164. package/dist/platform/contracts.js +93 -0
  165. package/dist/platform/index.d.ts +6 -0
  166. package/dist/platform/index.js +6 -0
  167. package/dist/platform/inventory.d.ts +11 -0
  168. package/dist/platform/inventory.js +53 -0
  169. package/dist/platform/project-create.d.ts +49 -0
  170. package/dist/platform/project-create.js +75 -0
  171. package/dist/platform/schemas.d.ts +986 -0
  172. package/dist/platform/schemas.js +73 -0
  173. package/dist/platform/verification.d.ts +9 -0
  174. package/dist/platform/verification.js +104 -0
  175. package/dist/platform/workset.d.ts +21 -0
  176. package/dist/platform/workset.js +106 -0
  177. package/dist/secrets-capability/github-actions-encryption.d.ts +2 -0
  178. package/dist/secrets-capability/github-actions-encryption.js +11 -0
  179. package/dist/secrets-capability/provider-operation-contracts.d.ts +15 -1
  180. package/dist/secrets-capability/secret-contracts.d.ts +33 -0
  181. package/dist/secrets-capability/secret-contracts.js +49 -0
  182. package/dist/secrets-capability/service-provider-contracts.d.ts +5 -3
  183. package/dist/secrets-capability/service-provider-contracts.js +66 -50
  184. package/dist/secrets-capability/shared-access.d.ts +51 -0
  185. package/dist/secrets-capability/shared-access.js +36 -0
  186. package/dist/secrets-capability/shared-resources.d.ts +376 -0
  187. package/dist/secrets-capability/shared-resources.js +91 -0
  188. package/dist/secrets-capability/vault-contracts.d.ts +132 -0
  189. package/dist/secrets-capability/vault-contracts.js +56 -0
  190. package/dist/security/encrypted-envelope.d.ts +177 -0
  191. package/dist/security/encrypted-envelope.js +34 -0
  192. package/dist/security/envelope-codec.d.ts +38 -0
  193. package/dist/security/envelope-codec.js +96 -0
  194. package/dist/security/index.d.ts +2 -0
  195. package/dist/security/index.js +2 -0
  196. package/dist/site-contracts/catalog.d.ts +16 -0
  197. package/dist/site-contracts/catalog.js +19 -0
  198. package/dist/site-contracts/cloudflare.d.ts +48 -0
  199. package/dist/site-contracts/platform.d.ts +94 -0
  200. package/dist/site-contracts/plugin.d.ts +63 -0
  201. package/dist/site-contracts/plugin.js +26 -0
  202. package/dist/treeai/catalog.d.ts +1 -0
  203. package/dist/treeai/catalog.js +1 -0
  204. package/dist/treeai/client.d.ts +793 -0
  205. package/dist/treeai/client.js +44 -0
  206. package/dist/treeai/contract.d.ts +41 -0
  207. package/dist/treeai/contract.js +51 -0
  208. package/dist/treeai/generated/upstream.d.ts +770 -0
  209. package/dist/treeai/generated/upstream.js +4 -0
  210. package/dist/treeai/index.d.ts +4 -0
  211. package/dist/treeai/index.js +4 -0
  212. package/dist/treedx/client.d.ts +605 -0
  213. package/dist/treedx/client.js +39 -0
  214. package/dist/treedx/contract.d.ts +32 -0
  215. package/dist/treedx/contract.js +63 -0
  216. package/dist/treedx/index.d.ts +3 -0
  217. package/dist/treedx/index.js +2 -0
  218. package/dist/treedx/types.d.ts +8 -7
  219. package/dist/treedx/types.js +0 -7
  220. package/dist/types/agents/agent-activity-profile.d.ts +18 -36
  221. package/dist/types/agents/agent-trigger-kinds.d.ts +3 -5
  222. package/dist/types/agents/agent-trigger-kinds.js +1 -13
  223. package/package.json +64 -11
  224. package/dist/secrets-capability/service-vault-contracts.d.ts +0 -61
  225. package/dist/secrets-capability/service-vault-contracts.js +0 -39
  226. package/dist/treedx/accounts/auth.d.ts +0 -17
  227. package/dist/treedx/accounts/auth.js +0 -48
  228. package/dist/treedx/client/accounts/contracts/auth-mode.d.ts +0 -3
  229. package/dist/treedx/client/accounts/contracts/auth-mode.js +0 -6
  230. package/dist/treedx/client/build/creation/build-context.d.ts +0 -3
  231. package/dist/treedx/client/build/creation/build-context.js +0 -7
  232. package/dist/treedx/client/build/creation/build-snapshot.d.ts +0 -3
  233. package/dist/treedx/client/build/creation/build-snapshot.js +0 -8
  234. package/dist/treedx/client/capacity/allocations/contracts/put-capability-grant.d.ts +0 -3
  235. package/dist/treedx/client/capacity/allocations/contracts/put-capability-grant.js +0 -7
  236. package/dist/treedx/client/capacity/allocations/queries/list-capability-grants.d.ts +0 -6
  237. package/dist/treedx/client/capacity/allocations/queries/list-capability-grants.js +0 -10
  238. package/dist/treedx/client/methods.d.ts +0 -102
  239. package/dist/treedx/client/methods.js +0 -209
  240. package/dist/treedx/client/persistence/contracts/restore-storage.d.ts +0 -3
  241. package/dist/treedx/client/persistence/contracts/restore-storage.js +0 -6
  242. package/dist/treedx/client/persistence/lifecycle/verify-storage-restore.d.ts +0 -3
  243. package/dist/treedx/client/persistence/lifecycle/verify-storage-restore.js +0 -6
  244. package/dist/treedx/client/repositories/creation/register-repository.d.ts +0 -3
  245. package/dist/treedx/client/repositories/creation/register-repository.js +0 -7
  246. package/dist/treedx/client/repositories/queries/get-repository.d.ts +0 -3
  247. package/dist/treedx/client/repositories/queries/get-repository.js +0 -7
  248. package/dist/treedx/client/repositories/queries/list-repository-paths.d.ts +0 -3
  249. package/dist/treedx/client/repositories/queries/list-repository-paths.js +0 -7
  250. package/dist/treedx/client/repositories/queries/list-repository-refs.d.ts +0 -3
  251. package/dist/treedx/client/repositories/queries/list-repository-refs.js +0 -12
  252. package/dist/treedx/client/repositories/queries/query-repository.d.ts +0 -3
  253. package/dist/treedx/client/repositories/queries/query-repository.js +0 -7
  254. package/dist/treedx/client/repositories/queries/read-repository-file.d.ts +0 -3
  255. package/dist/treedx/client/repositories/queries/read-repository-file.js +0 -6
  256. package/dist/treedx/client/repositories/queries/read-repository-files.d.ts +0 -3
  257. package/dist/treedx/client/repositories/queries/read-repository-files.js +0 -7
  258. package/dist/treedx/client/repositories/queries/search-repository-files.d.ts +0 -3
  259. package/dist/treedx/client/repositories/queries/search-repository-files.js +0 -7
  260. package/dist/treedx/client/support/contracts/treedx/artifacts/contracts/download-artifact.d.ts +0 -3
  261. package/dist/treedx/client/support/contracts/treedx/artifacts/contracts/download-artifact.js +0 -9
  262. package/dist/treedx/client/support/contracts/treedx/authorization/contracts/whoami.d.ts +0 -3
  263. package/dist/treedx/client/support/contracts/treedx/authorization/contracts/whoami.js +0 -6
  264. package/dist/treedx/client/support/contracts/treedx/graph/contracts/parse-context-dsl.d.ts +0 -3
  265. package/dist/treedx/client/support/contracts/treedx/graph/contracts/parse-context-dsl.js +0 -7
  266. package/dist/treedx/client/support/contracts/treedx/health/contracts/deep-health.d.ts +0 -5
  267. package/dist/treedx/client/support/contracts/treedx/health/contracts/deep-health.js +0 -7
  268. package/dist/treedx/client/support/contracts/treedx/health/contracts/health.d.ts +0 -3
  269. package/dist/treedx/client/support/contracts/treedx/health/contracts/health.js +0 -6
  270. package/dist/treedx/client/support/contracts/treedx/health/contracts/metrics.d.ts +0 -3
  271. package/dist/treedx/client/support/contracts/treedx/health/contracts/metrics.js +0 -7
  272. package/dist/treedx/client/support/contracts/treedx/health/contracts/prometheus-metrics.d.ts +0 -2
  273. package/dist/treedx/client/support/contracts/treedx/health/contracts/prometheus-metrics.js +0 -19
  274. package/dist/treedx/client/support/contracts/treedx/health/contracts/ready.d.ts +0 -3
  275. package/dist/treedx/client/support/contracts/treedx/health/contracts/ready.js +0 -7
  276. package/dist/treedx/client/support/contracts/treedx/health/contracts/status.d.ts +0 -3
  277. package/dist/treedx/client/support/contracts/treedx/health/contracts/status.js +0 -6
  278. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/commit.d.ts +0 -3
  279. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/commit.js +0 -7
  280. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/diff.d.ts +0 -3
  281. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/diff.js +0 -6
  282. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/fetch-remote.d.ts +0 -3
  283. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/fetch-remote.js +0 -7
  284. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/push.d.ts +0 -6
  285. package/dist/treedx/client/support/contracts/treedx/repositories/contracts/push.js +0 -23
  286. package/dist/treedx/client/support/contracts/treedx/search/contracts/compact-search-index.d.ts +0 -3
  287. package/dist/treedx/client/support/contracts/treedx/search/contracts/compact-search-index.js +0 -8
  288. package/dist/treedx/client/support/contracts/treedx/search/contracts/search.d.ts +0 -3
  289. package/dist/treedx/client/support/contracts/treedx/search/contracts/search.js +0 -7
  290. package/dist/treedx/client/support/contracts/treedx/storage/contracts/backup-storage.d.ts +0 -3
  291. package/dist/treedx/client/support/contracts/treedx/storage/contracts/backup-storage.js +0 -8
  292. package/dist/treedx/client/support/contracts/treedx/storage/contracts/compact-storage.d.ts +0 -3
  293. package/dist/treedx/client/support/contracts/treedx/storage/contracts/compact-storage.js +0 -8
  294. package/dist/treedx/client/support/contracts/treedx/transport/contracts/assert-binary-ok.d.ts +0 -2
  295. package/dist/treedx/client/support/contracts/treedx/transport/contracts/assert-binary-ok.js +0 -15
  296. package/dist/treedx/client/support/contracts/treedx/transport/contracts/fetch-with-timeout.d.ts +0 -2
  297. package/dist/treedx/client/support/contracts/treedx/transport/contracts/fetch-with-timeout.js +0 -38
  298. package/dist/treedx/client/support/contracts/treedx/transport/contracts/headers.d.ts +0 -2
  299. package/dist/treedx/client/support/contracts/treedx/transport/contracts/headers.js +0 -15
  300. package/dist/treedx/client/support/contracts/treedx/transport/contracts/parse-json-response.d.ts +0 -2
  301. package/dist/treedx/client/support/contracts/treedx/transport/contracts/parse-json-response.js +0 -15
  302. package/dist/treedx/client/support/contracts/treedx/transport/contracts/query.d.ts +0 -2
  303. package/dist/treedx/client/support/contracts/treedx/transport/contracts/query.js +0 -14
  304. package/dist/treedx/client/support/contracts/treedx/transport/contracts/repo-id.d.ts +0 -2
  305. package/dist/treedx/client/support/contracts/treedx/transport/contracts/repo-id.js +0 -14
  306. package/dist/treedx/client/support/contracts/treedx/transport/contracts/request.d.ts +0 -6
  307. package/dist/treedx/client/support/contracts/treedx/transport/contracts/request.js +0 -41
  308. package/dist/treedx/client/support/contracts/treedx/transport/contracts/throw-api-error.d.ts +0 -2
  309. package/dist/treedx/client/support/contracts/treedx/transport/contracts/throw-api-error.js +0 -14
  310. package/dist/treedx/client/support/contracts/treedx/workspaces/contracts/exec.d.ts +0 -3
  311. package/dist/treedx/client/support/contracts/treedx/workspaces/contracts/exec.js +0 -7
  312. package/dist/treedx/client/support/creation/apply-changeset.d.ts +0 -3
  313. package/dist/treedx/client/support/creation/apply-changeset.js +0 -10
  314. package/dist/treedx/client/support/creation/apply-storage-migration.d.ts +0 -3
  315. package/dist/treedx/client/support/creation/apply-storage-migration.js +0 -7
  316. package/dist/treedx/client/support/creation/create-migration.d.ts +0 -6
  317. package/dist/treedx/client/support/creation/create-migration.js +0 -7
  318. package/dist/treedx/client/support/creation/export-artifact.d.ts +0 -3
  319. package/dist/treedx/client/support/creation/export-artifact.js +0 -8
  320. package/dist/treedx/client/support/creation/plan-storage-migration.d.ts +0 -3
  321. package/dist/treedx/client/support/creation/plan-storage-migration.js +0 -7
  322. package/dist/treedx/client/support/creation/request-binary.d.ts +0 -6
  323. package/dist/treedx/client/support/creation/request-binary.js +0 -42
  324. package/dist/treedx/client/support/creation/write-file.d.ts +0 -3
  325. package/dist/treedx/client/support/creation/write-file.js +0 -10
  326. package/dist/treedx/client/support/creation/write-files.d.ts +0 -3
  327. package/dist/treedx/client/support/creation/write-files.js +0 -12
  328. package/dist/treedx/client/support/queries/treedx/artifacts/queries/get-artifact.d.ts +0 -3
  329. package/dist/treedx/client/support/queries/treedx/artifacts/queries/get-artifact.js +0 -7
  330. package/dist/treedx/client/support/queries/treedx/artifacts/queries/list-artifacts.d.ts +0 -3
  331. package/dist/treedx/client/support/queries/treedx/artifacts/queries/list-artifacts.js +0 -7
  332. package/dist/treedx/client/support/queries/treedx/authorization/queries/effective-scope.d.ts +0 -3
  333. package/dist/treedx/client/support/queries/treedx/authorization/queries/effective-scope.js +0 -9
  334. package/dist/treedx/client/support/queries/treedx/authorization/queries/list-capabilities.d.ts +0 -4
  335. package/dist/treedx/client/support/queries/treedx/authorization/queries/list-capabilities.js +0 -6
  336. package/dist/treedx/client/support/queries/treedx/federation/queries/get-placement.d.ts +0 -3
  337. package/dist/treedx/client/support/queries/treedx/federation/queries/get-placement.js +0 -7
  338. package/dist/treedx/client/support/queries/treedx/graph/queries/get-node.d.ts +0 -3
  339. package/dist/treedx/client/support/queries/treedx/graph/queries/get-node.js +0 -7
  340. package/dist/treedx/client/support/queries/treedx/graph/queries/get-related.d.ts +0 -3
  341. package/dist/treedx/client/support/queries/treedx/graph/queries/get-related.js +0 -7
  342. package/dist/treedx/client/support/queries/treedx/graph/queries/list-nodes.d.ts +0 -3
  343. package/dist/treedx/client/support/queries/treedx/graph/queries/list-nodes.js +0 -7
  344. package/dist/treedx/client/support/queries/treedx/repositories/queries/list-tree.d.ts +0 -3
  345. package/dist/treedx/client/support/queries/treedx/repositories/queries/list-tree.js +0 -10
  346. package/dist/treedx/client/support/queries/treedx/repositories/queries/read-file.d.ts +0 -3
  347. package/dist/treedx/client/support/queries/treedx/repositories/queries/read-file.js +0 -9
  348. package/dist/treedx/client/support/queries/treedx/search/queries/get-search-index-status.d.ts +0 -3
  349. package/dist/treedx/client/support/queries/treedx/search/queries/get-search-index-status.js +0 -7
  350. package/dist/treedx/client/support/queries/treedx/storage/queries/get-migration.d.ts +0 -6
  351. package/dist/treedx/client/support/queries/treedx/storage/queries/get-migration.js +0 -7
  352. package/dist/treedx/client/support/queries/treedx/storage/queries/get-snapshot.d.ts +0 -6
  353. package/dist/treedx/client/support/queries/treedx/storage/queries/get-snapshot.js +0 -7
  354. package/dist/treedx/client/support/queries/treedx/storage/queries/list-storage-migrations.d.ts +0 -6
  355. package/dist/treedx/client/support/queries/treedx/storage/queries/list-storage-migrations.js +0 -6
  356. package/dist/treedx/client/support/queries/treedx/transport/queries/list-audit-events.d.ts +0 -15
  357. package/dist/treedx/client/support/queries/treedx/transport/queries/list-audit-events.js +0 -6
  358. package/dist/treedx/client/support/queries/treedx/transport/queries/list-repositories.d.ts +0 -3
  359. package/dist/treedx/client/support/queries/treedx/transport/queries/list-repositories.js +0 -7
  360. package/dist/treedx/client/support/retirement/cleanup-artifacts.d.ts +0 -3
  361. package/dist/treedx/client/support/retirement/cleanup-artifacts.js +0 -7
  362. package/dist/treedx/client/support/retirement/delete-artifact.d.ts +0 -3
  363. package/dist/treedx/client/support/retirement/delete-artifact.js +0 -7
  364. package/dist/treedx/client/support/retirement/delete-file.d.ts +0 -3
  365. package/dist/treedx/client/support/retirement/delete-file.js +0 -10
  366. package/dist/treedx/client/support/retirement/rollback-storage-migration.d.ts +0 -3
  367. package/dist/treedx/client/support/retirement/rollback-storage-migration.js +0 -7
  368. package/dist/treedx/client/support/updates/patch-file.d.ts +0 -3
  369. package/dist/treedx/client/support/updates/patch-file.js +0 -10
  370. package/dist/treedx/client/support/updates/refresh-search-index.d.ts +0 -3
  371. package/dist/treedx/client/support/updates/refresh-search-index.js +0 -8
  372. package/dist/treedx/client/treedx/blobs/contracts/download-blob.d.ts +0 -3
  373. package/dist/treedx/client/treedx/blobs/contracts/download-blob.js +0 -6
  374. package/dist/treedx/client/treedx/blobs/creation/create-blob-upload.d.ts +0 -3
  375. package/dist/treedx/client/treedx/blobs/creation/create-blob-upload.js +0 -8
  376. package/dist/treedx/client/treedx/blobs/creation/request-blob-download.d.ts +0 -3
  377. package/dist/treedx/client/treedx/blobs/creation/request-blob-download.js +0 -27
  378. package/dist/treedx/client/treedx/blobs/creation/request-blob-upload.d.ts +0 -3
  379. package/dist/treedx/client/treedx/blobs/creation/request-blob-upload.js +0 -41
  380. package/dist/treedx/client/treedx/blobs/creation/upload-blob-part.d.ts +0 -3
  381. package/dist/treedx/client/treedx/blobs/creation/upload-blob-part.js +0 -27
  382. package/dist/treedx/client/treedx/blobs/creation/upload-blob.d.ts +0 -3
  383. package/dist/treedx/client/treedx/blobs/creation/upload-blob.js +0 -6
  384. package/dist/treedx/client/treedx/blobs/creation/write-blob.d.ts +0 -3
  385. package/dist/treedx/client/treedx/blobs/creation/write-blob.js +0 -8
  386. package/dist/treedx/client/treedx/blobs/lifecycle/complete-blob-upload.d.ts +0 -3
  387. package/dist/treedx/client/treedx/blobs/lifecycle/complete-blob-upload.js +0 -8
  388. package/dist/treedx/client/treedx/blobs/queries/read-blob.d.ts +0 -3
  389. package/dist/treedx/client/treedx/blobs/queries/read-blob.js +0 -10
  390. package/dist/treedx/client/treedx/blobs/retirement/abort-blob-upload.d.ts +0 -3
  391. package/dist/treedx/client/treedx/blobs/retirement/abort-blob-upload.js +0 -7
  392. package/dist/treedx/client/treedx/blobs/retirement/delete-blob.d.ts +0 -3
  393. package/dist/treedx/client/treedx/blobs/retirement/delete-blob.js +0 -8
  394. package/dist/treedx/client/treedx/federation/contracts/federated-query.d.ts +0 -3
  395. package/dist/treedx/client/treedx/federation/contracts/federated-query.js +0 -7
  396. package/dist/treedx/client/treedx/federation/creation/plan-federated-query.d.ts +0 -3
  397. package/dist/treedx/client/treedx/federation/creation/plan-federated-query.js +0 -6
  398. package/dist/treedx/client/treedx/federation/queries/check-mirror-health.d.ts +0 -3
  399. package/dist/treedx/client/treedx/federation/queries/check-mirror-health.js +0 -7
  400. package/dist/treedx/client/treedx/federation/updates/promote-mirror.d.ts +0 -3
  401. package/dist/treedx/client/treedx/federation/updates/promote-mirror.js +0 -7
  402. package/dist/treedx/client/treedx/federation/updates/sync-mirror.d.ts +0 -3
  403. package/dist/treedx/client/treedx/federation/updates/sync-mirror.js +0 -7
  404. package/dist/treedx/client/treedx/graph/contracts/federated-context.d.ts +0 -3
  405. package/dist/treedx/client/treedx/graph/contracts/federated-context.js +0 -7
  406. package/dist/treedx/client/treedx/graph/contracts/federated-graph.d.ts +0 -3
  407. package/dist/treedx/client/treedx/graph/contracts/federated-graph.js +0 -7
  408. package/dist/treedx/client/treedx/graph/contracts/graph-search.d.ts +0 -3
  409. package/dist/treedx/client/treedx/graph/contracts/graph-search.js +0 -8
  410. package/dist/treedx/client/treedx/graph/queries/get-graph-node.d.ts +0 -3
  411. package/dist/treedx/client/treedx/graph/queries/get-graph-node.js +0 -10
  412. package/dist/treedx/client/treedx/graph/queries/get-graph-refresh-job.d.ts +0 -3
  413. package/dist/treedx/client/treedx/graph/queries/get-graph-refresh-job.js +0 -7
  414. package/dist/treedx/client/treedx/graph/queries/get-subgraph.d.ts +0 -3
  415. package/dist/treedx/client/treedx/graph/queries/get-subgraph.js +0 -7
  416. package/dist/treedx/client/treedx/graph/queries/query-graph.d.ts +0 -3
  417. package/dist/treedx/client/treedx/graph/queries/query-graph.js +0 -7
  418. package/dist/treedx/client/treedx/graph/queries/search-graph-entities.d.ts +0 -3
  419. package/dist/treedx/client/treedx/graph/queries/search-graph-entities.js +0 -6
  420. package/dist/treedx/client/treedx/graph/queries/search-graph-files.d.ts +0 -3
  421. package/dist/treedx/client/treedx/graph/queries/search-graph-files.js +0 -6
  422. package/dist/treedx/client/treedx/graph/queries/search-graph-sections.d.ts +0 -3
  423. package/dist/treedx/client/treedx/graph/queries/search-graph-sections.js +0 -6
  424. package/dist/treedx/client/treedx/graph/updates/refresh-graph.d.ts +0 -3
  425. package/dist/treedx/client/treedx/graph/updates/refresh-graph.js +0 -7
  426. package/dist/treedx/client/treedx/search/contracts/federated-search.d.ts +0 -3
  427. package/dist/treedx/client/treedx/search/contracts/federated-search.js +0 -7
  428. package/dist/treedx/client/treedx/workspaces/creation/create-workspace.d.ts +0 -3
  429. package/dist/treedx/client/treedx/workspaces/creation/create-workspace.js +0 -7
  430. package/dist/treedx/client/treedx/workspaces/retirement/abandon-workspace.d.ts +0 -3
  431. package/dist/treedx/client/treedx/workspaces/retirement/abandon-workspace.js +0 -12
  432. package/dist/treedx/client/treedx/workspaces/retirement/close-workspace.d.ts +0 -2
  433. package/dist/treedx/client/treedx/workspaces/retirement/close-workspace.js +0 -6
  434. package/dist/treedx/generated/openapi-types.d.ts +0 -3662
  435. package/dist/treedx/support/client.d.ts +0 -251
  436. package/dist/treedx/support/client.js +0 -252
  437. package/dist/treedx/support/errors.d.ts +0 -13
  438. package/dist/treedx/support/errors.js +0 -17
  439. package/dist/treedx/types/tree-dx-actor.d.ts +0 -209
  440. package/dist/treedx/types/tree-dx-actor.js +0 -8
  441. package/dist/treedx/types/tree-dx-artifact-list-response.d.ts +0 -13
  442. package/dist/treedx/types/tree-dx-changeset.d.ts +0 -51
  443. package/dist/treedx/types/tree-dx-changeset.js +0 -6
  444. package/dist/treedx/types/tree-dx-context-request.d.ts +0 -245
  445. package/dist/treedx/types/tree-dx-context-request.js +0 -0
  446. package/dist/treedx/types/tree-dx-exec-result.d.ts +0 -249
  447. package/dist/treedx/types/tree-dx-exec-result.js +0 -0
  448. package/dist/treedx/types/tree-dx-list-tree-request.d.ts +0 -222
  449. package/dist/treedx/types/tree-dx-list-tree-request.js +0 -0
  450. package/dist/treedx/types/tree-dx-push-request.d.ts +0 -229
  451. package/dist/treedx/types/tree-dx-push-request.js +0 -0
  452. /package/dist/{treedx/generated/openapi-types.js → site-contracts/cloudflare.js} +0 -0
  453. /package/dist/{treedx/types/tree-dx-artifact-list-response.js → site-contracts/platform.js} +0 -0
@@ -0,0 +1,233 @@
1
+ import { z } from 'zod';
2
+ /** Encrypted, single-use server-side state; never an application cookie value. */
3
+ export declare const browserLoginTransactionSchema: z.ZodObject<{
4
+ state: z.ZodString;
5
+ nonce: z.ZodString;
6
+ verifier: z.ZodString;
7
+ expiresAt: z.ZodNumber;
8
+ issuer: z.ZodEffects<z.ZodString, string, string>;
9
+ clientId: z.ZodString;
10
+ redirectUri: z.ZodEffects<z.ZodString, string, string>;
11
+ resource: z.ZodEffects<z.ZodString, string, string>;
12
+ scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
13
+ }, "strict", z.ZodTypeAny, {
14
+ issuer: string;
15
+ resource: string;
16
+ scopes: string[];
17
+ clientId: string;
18
+ state: string;
19
+ nonce: string;
20
+ verifier: string;
21
+ expiresAt: number;
22
+ redirectUri: string;
23
+ }, {
24
+ issuer: string;
25
+ resource: string;
26
+ scopes: string[];
27
+ clientId: string;
28
+ state: string;
29
+ nonce: string;
30
+ verifier: string;
31
+ expiresAt: number;
32
+ redirectUri: string;
33
+ }>;
34
+ export type BrowserLoginTransaction = z.infer<typeof browserLoginTransactionSchema>;
35
+ /** Private BFF protocol, authenticated with a registered application workload.
36
+ * These operations are not user/browser or agent-tool credential endpoints.
37
+ * The server chooses the app namespace from authentication, not request fields.
38
+ */
39
+ export declare const BROWSER_SESSION_BRIDGE_PATH = "/internal/identity/browser/v1";
40
+ export declare const BROWSER_SESSION_PERMISSION = "identity:sessions:manage";
41
+ export declare const BROWSER_SESSION_SCOPE = "treeseed:identity:sessions";
42
+ export declare const browserSessionRequests: {
43
+ begin: z.ZodObject<{
44
+ browserBinding: z.ZodString;
45
+ }, "strict", z.ZodTypeAny, {
46
+ browserBinding: string;
47
+ }, {
48
+ browserBinding: string;
49
+ }>;
50
+ finish: z.ZodObject<{
51
+ browserBinding: z.ZodString;
52
+ callback: z.ZodEffects<z.ZodString, string, string>;
53
+ }, "strict", z.ZodTypeAny, {
54
+ browserBinding: string;
55
+ callback: string;
56
+ }, {
57
+ browserBinding: string;
58
+ callback: string;
59
+ }>;
60
+ credentials: z.ZodObject<{
61
+ handle: z.ZodString;
62
+ }, "strict", z.ZodTypeAny, {
63
+ handle: string;
64
+ }, {
65
+ handle: string;
66
+ }>;
67
+ logout: z.ZodObject<{
68
+ handle: z.ZodString;
69
+ }, "strict", z.ZodTypeAny, {
70
+ handle: string;
71
+ }, {
72
+ handle: string;
73
+ }>;
74
+ };
75
+ export declare const browserSessionResponses: {
76
+ begin: z.ZodObject<{
77
+ authorizationUrl: z.ZodEffects<z.ZodString, string, string>;
78
+ }, "strict", z.ZodTypeAny, {
79
+ authorizationUrl: string;
80
+ }, {
81
+ authorizationUrl: string;
82
+ }>;
83
+ finish: z.ZodObject<{
84
+ handle: z.ZodString;
85
+ expiresAt: z.ZodString;
86
+ }, "strict", z.ZodTypeAny, {
87
+ expiresAt: string;
88
+ handle: string;
89
+ }, {
90
+ expiresAt: string;
91
+ handle: string;
92
+ }>;
93
+ credentials: z.ZodEffects<z.ZodObject<{
94
+ accessToken: z.ZodString;
95
+ resource: z.ZodEffects<z.ZodString, string, string>;
96
+ expiresAt: z.ZodNumber;
97
+ principal: z.ZodObject<{
98
+ principalId: z.ZodEffects<z.ZodString, string, string>;
99
+ kind: z.ZodEnum<["human", "service", "provider", "agent"]>;
100
+ identity: z.ZodObject<{
101
+ issuer: z.ZodEffects<z.ZodString, string, string>;
102
+ subject: z.ZodEffects<z.ZodString, string, string>;
103
+ }, "strict", z.ZodTypeAny, {
104
+ issuer: string;
105
+ subject: string;
106
+ }, {
107
+ issuer: string;
108
+ subject: string;
109
+ }>;
110
+ actor: z.ZodOptional<z.ZodObject<{
111
+ issuer: z.ZodEffects<z.ZodString, string, string>;
112
+ subject: z.ZodEffects<z.ZodString, string, string>;
113
+ }, "strict", z.ZodTypeAny, {
114
+ issuer: string;
115
+ subject: string;
116
+ }, {
117
+ issuer: string;
118
+ subject: string;
119
+ }>>;
120
+ audience: z.ZodEffects<z.ZodString, string, string>;
121
+ scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
122
+ }, "strict", z.ZodTypeAny, {
123
+ scopes: string[];
124
+ identity: {
125
+ issuer: string;
126
+ subject: string;
127
+ };
128
+ principalId: string;
129
+ kind: "human" | "service" | "provider" | "agent";
130
+ audience: string;
131
+ actor?: {
132
+ issuer: string;
133
+ subject: string;
134
+ } | undefined;
135
+ }, {
136
+ scopes: string[];
137
+ identity: {
138
+ issuer: string;
139
+ subject: string;
140
+ };
141
+ principalId: string;
142
+ kind: "human" | "service" | "provider" | "agent";
143
+ audience: string;
144
+ actor?: {
145
+ issuer: string;
146
+ subject: string;
147
+ } | undefined;
148
+ }>;
149
+ }, "strict", z.ZodTypeAny, {
150
+ resource: string;
151
+ expiresAt: number;
152
+ accessToken: string;
153
+ principal: {
154
+ scopes: string[];
155
+ identity: {
156
+ issuer: string;
157
+ subject: string;
158
+ };
159
+ principalId: string;
160
+ kind: "human" | "service" | "provider" | "agent";
161
+ audience: string;
162
+ actor?: {
163
+ issuer: string;
164
+ subject: string;
165
+ } | undefined;
166
+ };
167
+ }, {
168
+ resource: string;
169
+ expiresAt: number;
170
+ accessToken: string;
171
+ principal: {
172
+ scopes: string[];
173
+ identity: {
174
+ issuer: string;
175
+ subject: string;
176
+ };
177
+ principalId: string;
178
+ kind: "human" | "service" | "provider" | "agent";
179
+ audience: string;
180
+ actor?: {
181
+ issuer: string;
182
+ subject: string;
183
+ } | undefined;
184
+ };
185
+ }>, {
186
+ resource: string;
187
+ expiresAt: number;
188
+ accessToken: string;
189
+ principal: {
190
+ scopes: string[];
191
+ identity: {
192
+ issuer: string;
193
+ subject: string;
194
+ };
195
+ principalId: string;
196
+ kind: "human" | "service" | "provider" | "agent";
197
+ audience: string;
198
+ actor?: {
199
+ issuer: string;
200
+ subject: string;
201
+ } | undefined;
202
+ };
203
+ }, {
204
+ resource: string;
205
+ expiresAt: number;
206
+ accessToken: string;
207
+ principal: {
208
+ scopes: string[];
209
+ identity: {
210
+ issuer: string;
211
+ subject: string;
212
+ };
213
+ principalId: string;
214
+ kind: "human" | "service" | "provider" | "agent";
215
+ audience: string;
216
+ actor?: {
217
+ issuer: string;
218
+ subject: string;
219
+ } | undefined;
220
+ };
221
+ }>;
222
+ logout: z.ZodObject<{
223
+ loggedOut: z.ZodLiteral<true>;
224
+ upstreamRevoked: z.ZodBoolean;
225
+ }, "strict", z.ZodTypeAny, {
226
+ loggedOut: true;
227
+ upstreamRevoked: boolean;
228
+ }, {
229
+ loggedOut: true;
230
+ upstreamRevoked: boolean;
231
+ }>;
232
+ };
233
+ export type BrowserSessionCredentials = z.infer<typeof browserSessionResponses.credentials>;
@@ -0,0 +1,51 @@
1
+ import { z } from "zod";
2
+ import { identityEndpointSchema, identityPrincipalSchema, resourceTokenRequestSchema } from "./contracts.js";
3
+ const opaque = z.string().regex(/^[A-Za-z0-9_-]{43}$/u);
4
+ const clientId = z.string().min(1).max(256);
5
+ const authorizationUrl = z.string().url().max(8192).superRefine((value, context) => {
6
+ const url = new URL(value);
7
+ if (url.protocol !== "https:" || url.username || url.password || url.hash)
8
+ context.addIssue({ code: z.ZodIssueCode.custom, message: "Authorization URLs require HTTPS without credentials or fragments." });
9
+ });
10
+ const browserLoginTransactionSchema = z.object({
11
+ state: opaque,
12
+ nonce: opaque,
13
+ verifier: opaque,
14
+ expiresAt: z.number().int().positive(),
15
+ issuer: identityEndpointSchema,
16
+ clientId,
17
+ redirectUri: identityEndpointSchema,
18
+ resource: identityEndpointSchema,
19
+ scopes: resourceTokenRequestSchema.shape.scopes
20
+ }).strict();
21
+ const BROWSER_SESSION_BRIDGE_PATH = "/internal/identity/browser/v1";
22
+ const BROWSER_SESSION_PERMISSION = "identity:sessions:manage";
23
+ const BROWSER_SESSION_SCOPE = "treeseed:identity:sessions";
24
+ const browserSessionRequests = {
25
+ begin: z.object({ browserBinding: opaque }).strict(),
26
+ finish: z.object({ browserBinding: opaque, callback: authorizationUrl }).strict(),
27
+ credentials: z.object({ handle: opaque }).strict(),
28
+ logout: z.object({ handle: opaque }).strict()
29
+ };
30
+ const browserSessionResponses = {
31
+ begin: z.object({ authorizationUrl }).strict(),
32
+ finish: z.object({ handle: opaque, expiresAt: z.string().datetime() }).strict(),
33
+ credentials: z.object({
34
+ accessToken: z.string().min(1).max(16384),
35
+ resource: identityEndpointSchema,
36
+ expiresAt: z.number().int().positive(),
37
+ principal: identityPrincipalSchema
38
+ }).strict().superRefine((value, context) => {
39
+ if (value.resource !== value.principal.audience || value.principal.kind !== "human")
40
+ context.addIssue({ code: z.ZodIssueCode.custom, message: "Browser credentials require a human principal for this resource." });
41
+ }),
42
+ logout: z.object({ loggedOut: z.literal(true), upstreamRevoked: z.boolean() }).strict()
43
+ };
44
+ export {
45
+ BROWSER_SESSION_BRIDGE_PATH,
46
+ BROWSER_SESSION_PERMISSION,
47
+ BROWSER_SESSION_SCOPE,
48
+ browserLoginTransactionSchema,
49
+ browserSessionRequests,
50
+ browserSessionResponses
51
+ };
@@ -0,0 +1,191 @@
1
+ import { z } from 'zod';
2
+ /** Discovery descriptors are identifiers, not permission to fetch arbitrary URLs. */
3
+ export declare const identityEndpointSchema: z.ZodEffects<z.ZodString, string, string>;
4
+ /** Always qualify a subject by its issuer; email is never an identity key. */
5
+ export declare const externalIdentitySchema: z.ZodObject<{
6
+ issuer: z.ZodEffects<z.ZodString, string, string>;
7
+ subject: z.ZodEffects<z.ZodString, string, string>;
8
+ }, "strict", z.ZodTypeAny, {
9
+ issuer: string;
10
+ subject: string;
11
+ }, {
12
+ issuer: string;
13
+ subject: string;
14
+ }>;
15
+ export declare const resourceTokenRequestSchema: z.ZodObject<{
16
+ resource: z.ZodEffects<z.ZodString, string, string>;
17
+ scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
18
+ }, "strict", z.ZodTypeAny, {
19
+ resource: string;
20
+ scopes: string[];
21
+ }, {
22
+ resource: string;
23
+ scopes: string[];
24
+ }>;
25
+ export type ResourceTokenRequest = z.infer<typeof resourceTokenRequestSchema>;
26
+ /** RFC 9728 resource discovery. Unknown extensions are not authority. Consumers
27
+ * must match resource exactly and explicitly select one advertised issuer.
28
+ * TreeSeed credentials are transported only in the Authorization header.
29
+ */
30
+ export declare const protectedResourceMetadataSchema: z.ZodObject<{
31
+ resource: z.ZodEffects<z.ZodString, string, string>;
32
+ authorization_servers: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, string[], string[]>;
33
+ scopes_supported: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>, string[], string[]>>;
34
+ bearer_methods_supported: z.ZodOptional<z.ZodArray<z.ZodLiteral<"header">, "many">>;
35
+ resource_documentation: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ resource: string;
38
+ authorization_servers: string[];
39
+ scopes_supported?: string[] | undefined;
40
+ bearer_methods_supported?: "header"[] | undefined;
41
+ resource_documentation?: string | undefined;
42
+ }, {
43
+ resource: string;
44
+ authorization_servers: string[];
45
+ scopes_supported?: string[] | undefined;
46
+ bearer_methods_supported?: "header"[] | undefined;
47
+ resource_documentation?: string | undefined;
48
+ }>;
49
+ export type ProtectedResourceMetadata = z.infer<typeof protectedResourceMetadataSchema>;
50
+ /** Persist with encrypted native-client tokens. Refresh must revalidate this
51
+ * issuer/subject and client; email or an API URL cannot substitute for it. */
52
+ export declare const publicClientSessionBindingSchema: z.ZodObject<{
53
+ identity: z.ZodObject<{
54
+ issuer: z.ZodEffects<z.ZodString, string, string>;
55
+ subject: z.ZodEffects<z.ZodString, string, string>;
56
+ }, "strict", z.ZodTypeAny, {
57
+ issuer: string;
58
+ subject: string;
59
+ }, {
60
+ issuer: string;
61
+ subject: string;
62
+ }>;
63
+ clientId: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
64
+ scopes: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>, string[], string[]>;
65
+ }, "strict", z.ZodTypeAny, {
66
+ scopes: string[];
67
+ identity: {
68
+ issuer: string;
69
+ subject: string;
70
+ };
71
+ clientId: string;
72
+ }, {
73
+ scopes: string[];
74
+ identity: {
75
+ issuer: string;
76
+ subject: string;
77
+ };
78
+ clientId: string;
79
+ }>;
80
+ export type PublicClientSessionBinding = z.infer<typeof publicClientSessionBindingSchema>;
81
+ /** Implemented by Identity; implementations must isolate caches by resource and authority. */
82
+ export interface IdentityCredentials {
83
+ token(request: ResourceTokenRequest): Promise<string>;
84
+ }
85
+ /** Authenticated input to local authorization, never a role or membership grant. */
86
+ export declare const identityPrincipalSchema: z.ZodObject<{
87
+ principalId: z.ZodEffects<z.ZodString, string, string>;
88
+ kind: z.ZodEnum<["human", "service", "provider", "agent"]>;
89
+ identity: z.ZodObject<{
90
+ issuer: z.ZodEffects<z.ZodString, string, string>;
91
+ subject: z.ZodEffects<z.ZodString, string, string>;
92
+ }, "strict", z.ZodTypeAny, {
93
+ issuer: string;
94
+ subject: string;
95
+ }, {
96
+ issuer: string;
97
+ subject: string;
98
+ }>;
99
+ actor: z.ZodOptional<z.ZodObject<{
100
+ issuer: z.ZodEffects<z.ZodString, string, string>;
101
+ subject: z.ZodEffects<z.ZodString, string, string>;
102
+ }, "strict", z.ZodTypeAny, {
103
+ issuer: string;
104
+ subject: string;
105
+ }, {
106
+ issuer: string;
107
+ subject: string;
108
+ }>>;
109
+ audience: z.ZodEffects<z.ZodString, string, string>;
110
+ scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
111
+ }, "strict", z.ZodTypeAny, {
112
+ scopes: string[];
113
+ identity: {
114
+ issuer: string;
115
+ subject: string;
116
+ };
117
+ principalId: string;
118
+ kind: "human" | "service" | "provider" | "agent";
119
+ audience: string;
120
+ actor?: {
121
+ issuer: string;
122
+ subject: string;
123
+ } | undefined;
124
+ }, {
125
+ scopes: string[];
126
+ identity: {
127
+ issuer: string;
128
+ subject: string;
129
+ };
130
+ principalId: string;
131
+ kind: "human" | "service" | "provider" | "agent";
132
+ audience: string;
133
+ actor?: {
134
+ issuer: string;
135
+ subject: string;
136
+ } | undefined;
137
+ }>;
138
+ export declare const federationRelationshipSchema: z.ZodEffects<z.ZodObject<{
139
+ id: z.ZodEffects<z.ZodString, string, string>;
140
+ version: z.ZodNumber;
141
+ localIssuer: z.ZodEffects<z.ZodString, string, string>;
142
+ trustedIssuer: z.ZodEffects<z.ZodString, string, string>;
143
+ status: z.ZodEnum<["active", "disabled"]>;
144
+ permittedClientIds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "atleastone">;
145
+ releasedClaims: z.ZodArray<z.ZodEnum<["name", "email", "email_verified", "preferred_username"]>, "many">;
146
+ transitive: z.ZodLiteral<false>;
147
+ accountLinking: z.ZodLiteral<"authenticated-proof">;
148
+ }, "strict", z.ZodTypeAny, {
149
+ status: "active" | "disabled";
150
+ id: string;
151
+ version: number;
152
+ localIssuer: string;
153
+ trustedIssuer: string;
154
+ permittedClientIds: [string, ...string[]];
155
+ releasedClaims: ("name" | "email" | "email_verified" | "preferred_username")[];
156
+ transitive: false;
157
+ accountLinking: "authenticated-proof";
158
+ }, {
159
+ status: "active" | "disabled";
160
+ id: string;
161
+ version: number;
162
+ localIssuer: string;
163
+ trustedIssuer: string;
164
+ permittedClientIds: [string, ...string[]];
165
+ releasedClaims: ("name" | "email" | "email_verified" | "preferred_username")[];
166
+ transitive: false;
167
+ accountLinking: "authenticated-proof";
168
+ }>, {
169
+ status: "active" | "disabled";
170
+ id: string;
171
+ version: number;
172
+ localIssuer: string;
173
+ trustedIssuer: string;
174
+ permittedClientIds: [string, ...string[]];
175
+ releasedClaims: ("name" | "email" | "email_verified" | "preferred_username")[];
176
+ transitive: false;
177
+ accountLinking: "authenticated-proof";
178
+ }, {
179
+ status: "active" | "disabled";
180
+ id: string;
181
+ version: number;
182
+ localIssuer: string;
183
+ trustedIssuer: string;
184
+ permittedClientIds: [string, ...string[]];
185
+ releasedClaims: ("name" | "email" | "email_verified" | "preferred_username")[];
186
+ transitive: false;
187
+ accountLinking: "authenticated-proof";
188
+ }>;
189
+ export type ExternalIdentity = z.infer<typeof externalIdentitySchema>;
190
+ export type IdentityPrincipal = z.infer<typeof identityPrincipalSchema>;
191
+ export type FederationRelationship = z.infer<typeof federationRelationshipSchema>;
@@ -0,0 +1,72 @@
1
+ import { z } from "zod";
2
+ const identityEndpointSchema = z.string().url().superRefine((value, context) => {
3
+ const url = new URL(value);
4
+ if (url.protocol !== "https:" || url.username || url.password || url.hash || url.search) {
5
+ context.addIssue({ code: z.ZodIssueCode.custom, message: "Identity endpoints require HTTPS without credentials, query, or fragment." });
6
+ }
7
+ });
8
+ const identifier = z.string().min(1).refine((value) => value.trim() === value, "Identifier must not have surrounding whitespace.");
9
+ const scopes = z.array(z.string().regex(/^[\x21\x23-\x5B\x5D-\x7E]+$/u)).refine(
10
+ (value) => new Set(value).size === value.length,
11
+ "Scopes must be unique."
12
+ );
13
+ const externalIdentitySchema = z.object({
14
+ issuer: identityEndpointSchema,
15
+ subject: identifier
16
+ }).strict();
17
+ const resourceTokenRequestSchema = z.object({
18
+ resource: identityEndpointSchema,
19
+ scopes
20
+ }).strict();
21
+ const protectedResourceMetadataSchema = z.object({
22
+ resource: identityEndpointSchema,
23
+ authorization_servers: z.array(identityEndpointSchema).min(1).max(16).refine(
24
+ (value) => new Set(value).size === value.length,
25
+ "Authorization servers must be unique."
26
+ ),
27
+ scopes_supported: scopes.refine((value) => value.length <= 256 && value.every((scope) => scope.length <= 128), "Scope inventory is too large.").optional(),
28
+ bearer_methods_supported: z.array(z.literal("header")).length(1).optional(),
29
+ resource_documentation: identityEndpointSchema.optional()
30
+ });
31
+ const publicClientSessionBindingSchema = z.object({
32
+ identity: externalIdentitySchema,
33
+ clientId: identifier.refine((value) => value.length <= 256, "Client identifier is too long."),
34
+ scopes: scopes.refine((value) => value.length <= 256, "Scope inventory is too large.")
35
+ }).strict();
36
+ const identityPrincipalSchema = z.object({
37
+ principalId: identifier,
38
+ kind: z.enum(["human", "service", "provider", "agent"]),
39
+ identity: externalIdentitySchema,
40
+ actor: externalIdentitySchema.optional(),
41
+ audience: identityEndpointSchema,
42
+ scopes
43
+ }).strict();
44
+ const federationRelationshipSchema = z.object({
45
+ id: identifier,
46
+ version: z.number().int().positive(),
47
+ localIssuer: identityEndpointSchema,
48
+ trustedIssuer: identityEndpointSchema,
49
+ status: z.enum(["active", "disabled"]),
50
+ permittedClientIds: z.array(identifier).nonempty(),
51
+ releasedClaims: z.array(z.enum(["name", "email", "email_verified", "preferred_username"])),
52
+ transitive: z.literal(false),
53
+ accountLinking: z.literal("authenticated-proof")
54
+ }).strict().superRefine((value, context) => {
55
+ if (value.localIssuer === value.trustedIssuer) {
56
+ context.addIssue({ code: z.ZodIssueCode.custom, path: ["trustedIssuer"], message: "Federation must identify a different issuer." });
57
+ }
58
+ for (const field of ["permittedClientIds", "releasedClaims"]) {
59
+ if (new Set(value[field]).size !== value[field].length) {
60
+ context.addIssue({ code: z.ZodIssueCode.custom, path: [field], message: "Entries must be unique." });
61
+ }
62
+ }
63
+ });
64
+ export {
65
+ externalIdentitySchema,
66
+ federationRelationshipSchema,
67
+ identityEndpointSchema,
68
+ identityPrincipalSchema,
69
+ protectedResourceMetadataSchema,
70
+ publicClientSessionBindingSchema,
71
+ resourceTokenRequestSchema
72
+ };
@@ -0,0 +1,3 @@
1
+ export * from './contracts.js';
2
+ export * from './browser-session.js';
3
+ export * from './runtime.js';
@@ -0,0 +1,3 @@
1
+ export * from "./contracts.js";
2
+ export * from "./browser-session.js";
3
+ export * from "./runtime.js";