@trustloopguard/sdk 0.0.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 (242) hide show
  1. package/dist/client.d.ts +98 -0
  2. package/dist/client.js +198 -0
  3. package/dist/errors.d.ts +46 -0
  4. package/dist/errors.js +187 -0
  5. package/dist/generated/AgentAuthority.d.ts +4 -0
  6. package/dist/generated/AgentAuthority.js +2 -0
  7. package/dist/generated/AgentListResponse.d.ts +4 -0
  8. package/dist/generated/AgentListResponse.js +1 -0
  9. package/dist/generated/AgentProfile.d.ts +29 -0
  10. package/dist/generated/AgentProfile.js +1 -0
  11. package/dist/generated/AgentScope.d.ts +4 -0
  12. package/dist/generated/AgentScope.js +2 -0
  13. package/dist/generated/AgentTone.d.ts +4 -0
  14. package/dist/generated/AgentTone.js +2 -0
  15. package/dist/generated/ApiError.d.ts +25 -0
  16. package/dist/generated/ApiError.js +1 -0
  17. package/dist/generated/ApiErrorCode.d.ts +6 -0
  18. package/dist/generated/ApiErrorCode.js +2 -0
  19. package/dist/generated/ApiKeyBatchRevokeRequest.d.ts +3 -0
  20. package/dist/generated/ApiKeyBatchRevokeRequest.js +2 -0
  21. package/dist/generated/ApiKeyBatchRevokeResponse.d.ts +4 -0
  22. package/dist/generated/ApiKeyBatchRevokeResponse.js +1 -0
  23. package/dist/generated/ApiKeyListResponse.d.ts +4 -0
  24. package/dist/generated/ApiKeyListResponse.js +1 -0
  25. package/dist/generated/AuthRequest.d.ts +15 -0
  26. package/dist/generated/AuthRequest.js +2 -0
  27. package/dist/generated/AuthResponse.d.ts +16 -0
  28. package/dist/generated/AuthResponse.js +2 -0
  29. package/dist/generated/ChangePasswordRequest.d.ts +15 -0
  30. package/dist/generated/ChangePasswordRequest.js +2 -0
  31. package/dist/generated/Channel.d.ts +8 -0
  32. package/dist/generated/Channel.js +2 -0
  33. package/dist/generated/CheckRequest.d.ts +21 -0
  34. package/dist/generated/CheckRequest.js +1 -0
  35. package/dist/generated/CreateApiKeyRequest.d.ts +3 -0
  36. package/dist/generated/CreateApiKeyRequest.js +2 -0
  37. package/dist/generated/CreateApiKeyResponse.d.ts +8 -0
  38. package/dist/generated/CreateApiKeyResponse.js +1 -0
  39. package/dist/generated/CreateInviteRequest.d.ts +8 -0
  40. package/dist/generated/CreateInviteRequest.js +1 -0
  41. package/dist/generated/CreateInviteResponse.d.ts +18 -0
  42. package/dist/generated/CreateInviteResponse.js +1 -0
  43. package/dist/generated/CreateKnowledgeSourceRequest.d.ts +9 -0
  44. package/dist/generated/CreateKnowledgeSourceRequest.js +1 -0
  45. package/dist/generated/CreateRunEventRequest.d.ts +13 -0
  46. package/dist/generated/CreateRunEventRequest.js +1 -0
  47. package/dist/generated/CreateRunRequest.d.ts +9 -0
  48. package/dist/generated/CreateRunRequest.js +1 -0
  49. package/dist/generated/CreateWorkspaceRequest.d.ts +7 -0
  50. package/dist/generated/CreateWorkspaceRequest.js +2 -0
  51. package/dist/generated/DashboardApiKey.d.ts +15 -0
  52. package/dist/generated/DashboardApiKey.js +2 -0
  53. package/dist/generated/DashboardKnowledgeSourceKind.d.ts +1 -0
  54. package/dist/generated/DashboardKnowledgeSourceKind.js +2 -0
  55. package/dist/generated/Decision.d.ts +17 -0
  56. package/dist/generated/Decision.js +1 -0
  57. package/dist/generated/GuardrailGenerateResponse.d.ts +11 -0
  58. package/dist/generated/GuardrailGenerateResponse.js +1 -0
  59. package/dist/generated/GuardrailListResponse.d.ts +7 -0
  60. package/dist/generated/GuardrailListResponse.js +1 -0
  61. package/dist/generated/InviteListResponse.d.ts +4 -0
  62. package/dist/generated/InviteListResponse.js +1 -0
  63. package/dist/generated/InviteStatus.d.ts +4 -0
  64. package/dist/generated/InviteStatus.js +2 -0
  65. package/dist/generated/KnowledgeFileInput.d.ts +5 -0
  66. package/dist/generated/KnowledgeFileInput.js +2 -0
  67. package/dist/generated/KnowledgeFileMetadata.d.ts +6 -0
  68. package/dist/generated/KnowledgeFileMetadata.js +2 -0
  69. package/dist/generated/KnowledgeSource.d.ts +7 -0
  70. package/dist/generated/KnowledgeSource.js +1 -0
  71. package/dist/generated/KnowledgeSourceDocument.d.ts +22 -0
  72. package/dist/generated/KnowledgeSourceDocument.js +1 -0
  73. package/dist/generated/KnowledgeSourceFileResponse.d.ts +6 -0
  74. package/dist/generated/KnowledgeSourceFileResponse.js +2 -0
  75. package/dist/generated/KnowledgeSourceKind.d.ts +1 -0
  76. package/dist/generated/KnowledgeSourceKind.js +2 -0
  77. package/dist/generated/KnowledgeSourceListResponse.d.ts +4 -0
  78. package/dist/generated/KnowledgeSourceListResponse.js +1 -0
  79. package/dist/generated/KnowledgeSourceStatus.d.ts +1 -0
  80. package/dist/generated/KnowledgeSourceStatus.js +2 -0
  81. package/dist/generated/MemberListResponse.d.ts +4 -0
  82. package/dist/generated/MemberListResponse.js +1 -0
  83. package/dist/generated/MyWorkspace.d.ts +12 -0
  84. package/dist/generated/MyWorkspace.js +1 -0
  85. package/dist/generated/MyWorkspacesResponse.d.ts +4 -0
  86. package/dist/generated/MyWorkspacesResponse.js +1 -0
  87. package/dist/generated/PolicyAction.d.ts +4 -0
  88. package/dist/generated/PolicyAction.js +2 -0
  89. package/dist/generated/PolicyBatchSetEnabledRequest.d.ts +4 -0
  90. package/dist/generated/PolicyBatchSetEnabledRequest.js +2 -0
  91. package/dist/generated/PolicyBatchSetEnabledResponse.d.ts +4 -0
  92. package/dist/generated/PolicyBatchSetEnabledResponse.js +1 -0
  93. package/dist/generated/PolicyDocument.d.ts +8 -0
  94. package/dist/generated/PolicyDocument.js +1 -0
  95. package/dist/generated/PolicyDraft.d.ts +17 -0
  96. package/dist/generated/PolicyDraft.js +1 -0
  97. package/dist/generated/PolicyDraftRequest.d.ts +6 -0
  98. package/dist/generated/PolicyDraftRequest.js +2 -0
  99. package/dist/generated/PolicyDraftResponse.d.ts +4 -0
  100. package/dist/generated/PolicyDraftResponse.js +1 -0
  101. package/dist/generated/PolicyListResponse.d.ts +4 -0
  102. package/dist/generated/PolicyListResponse.js +1 -0
  103. package/dist/generated/PolicyMatchType.d.ts +5 -0
  104. package/dist/generated/PolicyMatchType.js +2 -0
  105. package/dist/generated/PolicySetEnabledRequest.d.ts +3 -0
  106. package/dist/generated/PolicySetEnabledRequest.js +2 -0
  107. package/dist/generated/PolicySummary.d.ts +9 -0
  108. package/dist/generated/PolicySummary.js +1 -0
  109. package/dist/generated/PolicyValidateResponse.d.ts +6 -0
  110. package/dist/generated/PolicyValidateResponse.js +1 -0
  111. package/dist/generated/PolicyValidationIssue.d.ts +4 -0
  112. package/dist/generated/PolicyValidationIssue.js +2 -0
  113. package/dist/generated/RunDetail.d.ts +8 -0
  114. package/dist/generated/RunDetail.js +1 -0
  115. package/dist/generated/RunEventKind.d.ts +1 -0
  116. package/dist/generated/RunEventKind.js +2 -0
  117. package/dist/generated/RunEventListResponse.d.ts +4 -0
  118. package/dist/generated/RunEventListResponse.js +1 -0
  119. package/dist/generated/RunEventSummary.d.ts +20 -0
  120. package/dist/generated/RunEventSummary.js +1 -0
  121. package/dist/generated/RunKind.d.ts +1 -0
  122. package/dist/generated/RunKind.js +2 -0
  123. package/dist/generated/RunListResponse.d.ts +4 -0
  124. package/dist/generated/RunListResponse.js +1 -0
  125. package/dist/generated/RunStatus.d.ts +1 -0
  126. package/dist/generated/RunStatus.js +2 -0
  127. package/dist/generated/RunSummary.d.ts +32 -0
  128. package/dist/generated/RunSummary.js +1 -0
  129. package/dist/generated/Severity.d.ts +1 -0
  130. package/dist/generated/Severity.js +2 -0
  131. package/dist/generated/Tier.d.ts +4 -0
  132. package/dist/generated/Tier.js +2 -0
  133. package/dist/generated/TierResult.d.ts +12 -0
  134. package/dist/generated/TierResult.js +1 -0
  135. package/dist/generated/TierStatus.d.ts +4 -0
  136. package/dist/generated/TierStatus.js +2 -0
  137. package/dist/generated/TraceListResponse.d.ts +4 -0
  138. package/dist/generated/TraceListResponse.js +1 -0
  139. package/dist/generated/TraceSummary.d.ts +13 -0
  140. package/dist/generated/TraceSummary.js +2 -0
  141. package/dist/generated/TriggeredPolicy.d.ts +6 -0
  142. package/dist/generated/TriggeredPolicy.js +1 -0
  143. package/dist/generated/UpdateRunRequest.d.ts +10 -0
  144. package/dist/generated/UpdateRunRequest.js +1 -0
  145. package/dist/generated/Verdict.d.ts +4 -0
  146. package/dist/generated/Verdict.js +2 -0
  147. package/dist/generated/WorkspaceInvite.d.ts +20 -0
  148. package/dist/generated/WorkspaceInvite.js +1 -0
  149. package/dist/generated/WorkspaceMember.d.ts +13 -0
  150. package/dist/generated/WorkspaceMember.js +1 -0
  151. package/dist/generated/WorkspaceRole.d.ts +5 -0
  152. package/dist/generated/WorkspaceRole.js +2 -0
  153. package/dist/generated/WorkspaceSettings.d.ts +11 -0
  154. package/dist/generated/WorkspaceSettings.js +2 -0
  155. package/dist/guard.d.ts +193 -0
  156. package/dist/guard.js +211 -0
  157. package/dist/index.d.ts +64 -0
  158. package/dist/index.js +64 -0
  159. package/dist/retry.d.ts +18 -0
  160. package/dist/retry.js +48 -0
  161. package/package.json +39 -0
  162. package/src/client.ts +453 -0
  163. package/src/errors.ts +202 -0
  164. package/src/generated/AgentAuthority.ts +3 -0
  165. package/src/generated/AgentListResponse.ts +4 -0
  166. package/src/generated/AgentProfile.ts +23 -0
  167. package/src/generated/AgentScope.ts +3 -0
  168. package/src/generated/AgentTone.ts +3 -0
  169. package/src/generated/ApiError.ts +24 -0
  170. package/src/generated/ApiErrorCode.ts +8 -0
  171. package/src/generated/ApiKeyBatchRevokeRequest.ts +3 -0
  172. package/src/generated/ApiKeyBatchRevokeResponse.ts +4 -0
  173. package/src/generated/ApiKeyListResponse.ts +4 -0
  174. package/src/generated/AuthRequest.ts +16 -0
  175. package/src/generated/AuthResponse.ts +15 -0
  176. package/src/generated/ChangePasswordRequest.ts +15 -0
  177. package/src/generated/Channel.ts +10 -0
  178. package/src/generated/CheckRequest.ts +11 -0
  179. package/src/generated/CreateApiKeyRequest.ts +3 -0
  180. package/src/generated/CreateApiKeyResponse.ts +8 -0
  181. package/src/generated/CreateInviteRequest.ts +7 -0
  182. package/src/generated/CreateInviteResponse.ts +14 -0
  183. package/src/generated/CreateKnowledgeSourceRequest.ts +5 -0
  184. package/src/generated/CreateRunEventRequest.ts +8 -0
  185. package/src/generated/CreateRunRequest.ts +5 -0
  186. package/src/generated/CreateWorkspaceRequest.ts +7 -0
  187. package/src/generated/DashboardApiKey.ts +11 -0
  188. package/src/generated/DashboardKnowledgeSourceKind.ts +3 -0
  189. package/src/generated/Decision.ts +12 -0
  190. package/src/generated/GuardrailGenerateResponse.ts +11 -0
  191. package/src/generated/GuardrailListResponse.ts +7 -0
  192. package/src/generated/InviteListResponse.ts +4 -0
  193. package/src/generated/InviteStatus.ts +6 -0
  194. package/src/generated/KnowledgeFileInput.ts +3 -0
  195. package/src/generated/KnowledgeFileMetadata.ts +3 -0
  196. package/src/generated/KnowledgeSource.ts +4 -0
  197. package/src/generated/KnowledgeSourceDocument.ts +17 -0
  198. package/src/generated/KnowledgeSourceFileResponse.ts +3 -0
  199. package/src/generated/KnowledgeSourceKind.ts +3 -0
  200. package/src/generated/KnowledgeSourceListResponse.ts +4 -0
  201. package/src/generated/KnowledgeSourceStatus.ts +3 -0
  202. package/src/generated/MemberListResponse.ts +4 -0
  203. package/src/generated/MyWorkspace.ts +8 -0
  204. package/src/generated/MyWorkspacesResponse.ts +4 -0
  205. package/src/generated/PolicyAction.ts +6 -0
  206. package/src/generated/PolicyBatchSetEnabledRequest.ts +3 -0
  207. package/src/generated/PolicyBatchSetEnabledResponse.ts +4 -0
  208. package/src/generated/PolicyDocument.ts +4 -0
  209. package/src/generated/PolicyDraft.ts +11 -0
  210. package/src/generated/PolicyDraftRequest.ts +6 -0
  211. package/src/generated/PolicyDraftResponse.ts +4 -0
  212. package/src/generated/PolicyListResponse.ts +4 -0
  213. package/src/generated/PolicyMatchType.ts +7 -0
  214. package/src/generated/PolicySetEnabledRequest.ts +3 -0
  215. package/src/generated/PolicySummary.ts +4 -0
  216. package/src/generated/PolicyValidateResponse.ts +4 -0
  217. package/src/generated/PolicyValidationIssue.ts +3 -0
  218. package/src/generated/README.md +1 -0
  219. package/src/generated/RunDetail.ts +6 -0
  220. package/src/generated/RunEventKind.ts +3 -0
  221. package/src/generated/RunEventListResponse.ts +4 -0
  222. package/src/generated/RunEventSummary.ts +12 -0
  223. package/src/generated/RunKind.ts +3 -0
  224. package/src/generated/RunListResponse.ts +4 -0
  225. package/src/generated/RunStatus.ts +3 -0
  226. package/src/generated/RunSummary.ts +21 -0
  227. package/src/generated/Severity.ts +3 -0
  228. package/src/generated/Tier.ts +6 -0
  229. package/src/generated/TierResult.ts +9 -0
  230. package/src/generated/TierStatus.ts +6 -0
  231. package/src/generated/TraceListResponse.ts +4 -0
  232. package/src/generated/TraceSummary.ts +7 -0
  233. package/src/generated/TriggeredPolicy.ts +4 -0
  234. package/src/generated/UpdateRunRequest.ts +9 -0
  235. package/src/generated/Verdict.ts +6 -0
  236. package/src/generated/WorkspaceInvite.ts +14 -0
  237. package/src/generated/WorkspaceMember.ts +11 -0
  238. package/src/generated/WorkspaceRole.ts +7 -0
  239. package/src/generated/WorkspaceSettings.ts +7 -0
  240. package/src/guard.ts +492 -0
  241. package/src/index.ts +97 -0
  242. package/src/retry.ts +67 -0
@@ -0,0 +1,24 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { ApiErrorCode } from "./ApiErrorCode";
3
+
4
+ /**
5
+ * Canonical error envelope returned on non-2xx responses from every
6
+ * TrustLoopGuard endpoint. SDKs deserialize this body to produce typed
7
+ * errors; integrators don't have to inspect status codes by hand.
8
+ *
9
+ * The shape is intentionally minimal — `code` drives SDK-side fan-out,
10
+ * `message` is for logs, `retriable` tells callers whether the same
11
+ * request may be retried, and `details` is opaque so the server can
12
+ * add validation field paths without breaking SDKs.
13
+ */
14
+ export type ApiError = { code: ApiErrorCode, message: string,
15
+ /**
16
+ * Whether the caller may retry the same request without modification.
17
+ * SDKs honor `Retry-After` when present in addition to this flag.
18
+ */
19
+ retriable: boolean,
20
+ /**
21
+ * Opaque structured details (e.g. validation field path).
22
+ * Defaults to `null`; servers may add fields without breaking SDKs.
23
+ */
24
+ details: Record<string, unknown> | null, };
@@ -0,0 +1,8 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Stable error code dictionary. Add variants here when introducing new
5
+ * failure modes; never repurpose an existing variant — SDK callers may
6
+ * be branching on it.
7
+ */
8
+ export type ApiErrorCode = "invalid" | "unauthorized" | "forbidden" | "not_found" | "gone" | "unprocessable" | "rate_limited" | "internal" | "unavailable";
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type ApiKeyBatchRevokeRequest = { ids: Array<string>, };
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { DashboardApiKey } from "./DashboardApiKey";
3
+
4
+ export type ApiKeyBatchRevokeResponse = { api_keys: Array<DashboardApiKey>, };
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { DashboardApiKey } from "./DashboardApiKey";
3
+
4
+ export type ApiKeyListResponse = { api_keys: Array<DashboardApiKey>, };
@@ -0,0 +1,16 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Login + signup request body. `password` is the SHA-256 hex digest
5
+ * of the user's plaintext password — see `tl-server::auth_user` for
6
+ * the storage-side argon2 wrap.
7
+ */
8
+ export type AuthRequest = {
9
+ /**
10
+ * Account identifier. Stored as-given, matched case-insensitively.
11
+ */
12
+ username: string,
13
+ /**
14
+ * SHA-256-hex of the user's plaintext password.
15
+ */
16
+ password: string, };
@@ -0,0 +1,15 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Login + signup success response. `user_id` is a v4 UUID rendered as
5
+ * a string so SDK type generation stays uniform across languages.
6
+ */
7
+ export type AuthResponse = { user_id: string, username: string,
8
+ /**
9
+ * Signed bearer token (HS256) issued by `tl-server` on successful
10
+ * signup or login. The web dashboard stashes this in the
11
+ * NextAuth session and forwards it on every Rust API call as
12
+ * `Authorization: Bearer <jwt>`. Absent when the server runs
13
+ * without `TL_JWT_SECRET` configured (memory-only dev mode).
14
+ */
15
+ jwt: string | null, };
@@ -0,0 +1,15 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Change-password request body. The caller demonstrates knowledge of
5
+ * the current password by hashing it the same way as a login.
6
+ */
7
+ export type ChangePasswordRequest = { username: string,
8
+ /**
9
+ * SHA-256-hex of the user's current password.
10
+ */
11
+ current_password: string,
12
+ /**
13
+ * SHA-256-hex of the new password to store.
14
+ */
15
+ new_password: string, };
@@ -0,0 +1,10 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Channel an agent is operating on. Drives latency budget and matcher selection.
5
+ *
6
+ * Flat enum on the wire so SDK type generation stays clean across languages.
7
+ * New channels are added as variants here; we don't carry a free-form
8
+ * `Other(String)` because it pollutes the Pydantic / TS surface.
9
+ */
10
+ export type Channel = "voice" | "chat" | "email";
@@ -0,0 +1,11 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Channel } from "./Channel";
3
+ import type { CreateRunEventRequest } from "./CreateRunEventRequest";
4
+
5
+ export type CheckRequest = { workspace_id?: string, run_id?: string, run_event_id?: string, run_event?: CreateRunEventRequest, agent_id: string, channel: Channel, input: string, proposed_output: string,
6
+ /**
7
+ * Optional domain selector for the dispatcher. Defaults to
8
+ * `customer_support` server-side when absent. Reserved for future
9
+ * `voice_agent` / `coding_agent` handlers.
10
+ */
11
+ domain: string | null, policies: Array<string>, context: Record<string, unknown>, trace_id: string | null, };
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type CreateApiKeyRequest = { name: string, };
@@ -0,0 +1,8 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { DashboardApiKey } from "./DashboardApiKey";
3
+
4
+ export type CreateApiKeyResponse = { api_key: DashboardApiKey,
5
+ /**
6
+ * Full bearer key. Returned only once at creation time.
7
+ */
8
+ plaintext_key: string, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { WorkspaceRole } from "./WorkspaceRole";
3
+
4
+ /**
5
+ * POST `/v1/team/invites` request body.
6
+ */
7
+ export type CreateInviteRequest = { email: string, role: WorkspaceRole, };
@@ -0,0 +1,14 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { WorkspaceInvite } from "./WorkspaceInvite";
3
+ import type { WorkspaceMember } from "./WorkspaceMember";
4
+
5
+ /**
6
+ * POST `/v1/team/invites` outcome. Discriminated by `kind`:
7
+ * - `added` — the email matched an existing user; they're now a
8
+ * workspace member. No accept step needed.
9
+ * - `invited` — no account exists for that email yet; we recorded
10
+ * a pending membership intent. When the user signs up with this
11
+ * email (any time, anywhere), they're auto-joined on their next
12
+ * page load via the `accept_pending_invites_for_email` path.
13
+ */
14
+ export type CreateInviteResponse = { "kind": "added", member: WorkspaceMember, } | { "kind": "invited", invite: WorkspaceInvite, };
@@ -0,0 +1,5 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { DashboardKnowledgeSourceKind } from "./DashboardKnowledgeSourceKind";
3
+ import type { KnowledgeFileInput } from "./KnowledgeFileInput";
4
+
5
+ export type CreateKnowledgeSourceRequest = { title: string, kind: DashboardKnowledgeSourceKind, location: string | null, notes: string | null, file: KnowledgeFileInput | null, };
@@ -0,0 +1,8 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { RunEventKind } from "./RunEventKind";
3
+
4
+ export type CreateRunEventRequest = { kind: RunEventKind, sequence?: number, label?: string, input_summary?: string, output_summary?: string, metadata: Record<string, unknown>,
5
+ /**
6
+ * RFC 3339 timestamp. Defaults to now when omitted.
7
+ */
8
+ occurred_at?: string, };
@@ -0,0 +1,5 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { RunKind } from "./RunKind";
3
+ import type { RunStatus } from "./RunStatus";
4
+
5
+ export type CreateRunRequest = { agent_id: string, kind: RunKind, status?: RunStatus, external_id?: string, metadata: Record<string, unknown>, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * POST `/v1/team/my-workspaces` body. Creates a fresh organization +
5
+ * workspace pair and grants the calling user `owner` on both.
6
+ */
7
+ export type CreateWorkspaceRequest = { name: string, };
@@ -0,0 +1,11 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type DashboardApiKey = { id: string, name: string, prefix: string, status: string,
4
+ /**
5
+ * RFC 3339 timestamp.
6
+ */
7
+ created_at: string,
8
+ /**
9
+ * RFC 3339 timestamp.
10
+ */
11
+ last_used_at: string | null, created_by: string | null, };
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type DashboardKnowledgeSourceKind = "url" | "file" | "note";
@@ -0,0 +1,12 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { TierResult } from "./TierResult";
3
+ import type { TriggeredPolicy } from "./TriggeredPolicy";
4
+ import type { Verdict } from "./Verdict";
5
+
6
+ export type Decision = { trace_id: string, verdict: Verdict, reason: string, triggered_policies: Array<TriggeredPolicy>, safe_output: string | null, latency_ms: bigint,
7
+ /**
8
+ * Per-tier breakdown produced by the parallel-cancel orchestrator.
9
+ * Empty for callers that only ran the synchronous `Engine::check`
10
+ * path; populated when `Engine::check_async` is used.
11
+ */
12
+ tier_results: Array<TierResult>, };
@@ -0,0 +1,11 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { PolicyDocument } from "./PolicyDocument";
3
+
4
+ /**
5
+ * Successful response from `POST /v1/agents/{id}/guardrails:generate`.
6
+ *
7
+ * Each item is a freshly persisted policy with `enabled=false` —
8
+ * callers review the set and flip individual policies on via
9
+ * `PATCH /v1/policies/{id}/enabled`.
10
+ */
11
+ export type GuardrailGenerateResponse = { generated: Array<PolicyDocument>, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { PolicySummary } from "./PolicySummary";
3
+
4
+ /**
5
+ * Response from `GET /v1/agents/{id}/guardrails`.
6
+ */
7
+ export type GuardrailListResponse = { policies: Array<PolicySummary>, };
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { WorkspaceInvite } from "./WorkspaceInvite";
3
+
4
+ export type InviteListResponse = { invites: Array<WorkspaceInvite>, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Lifecycle state of an invite row.
5
+ */
6
+ export type InviteStatus = "pending" | "accepted" | "revoked" | "expired";
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type KnowledgeFileInput = { file_name: string, media_type: string, data_base64: string, };
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type KnowledgeFileMetadata = { file_name: string, media_type: string, byte_size: number, checksum_sha256: string, };
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { KnowledgeSourceKind } from "./KnowledgeSourceKind";
3
+
4
+ export type KnowledgeSource = { kb_id: string, kind?: KnowledgeSourceKind, url?: string, description?: string, };
@@ -0,0 +1,17 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { DashboardKnowledgeSourceKind } from "./DashboardKnowledgeSourceKind";
3
+ import type { KnowledgeSourceStatus } from "./KnowledgeSourceStatus";
4
+
5
+ export type KnowledgeSourceDocument = { id: string, title: string, kind: DashboardKnowledgeSourceKind, location: string | null, status: KnowledgeSourceStatus, metadata: Record<string, unknown>,
6
+ /**
7
+ * RFC 3339 timestamp.
8
+ */
9
+ created_at: string,
10
+ /**
11
+ * RFC 3339 timestamp.
12
+ */
13
+ updated_at: string,
14
+ /**
15
+ * RFC 3339 timestamp.
16
+ */
17
+ last_indexed_at: string | null, };
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type KnowledgeSourceFileResponse = { file_name: string, media_type: string, byte_size: number, data_base64: string, };
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type KnowledgeSourceKind = "local" | "web";
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { KnowledgeSourceDocument } from "./KnowledgeSourceDocument";
3
+
4
+ export type KnowledgeSourceListResponse = { knowledge_sources: Array<KnowledgeSourceDocument>, };
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type KnowledgeSourceStatus = "draft" | "indexing" | "ready" | "failed";
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { WorkspaceMember } from "./WorkspaceMember";
3
+
4
+ export type MemberListResponse = { members: Array<WorkspaceMember>, };
@@ -0,0 +1,8 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { WorkspaceRole } from "./WorkspaceRole";
3
+
4
+ /**
5
+ * A workspace the signed-in user belongs to. Drives the dashboard's
6
+ * workspace switcher and the "no workspace yet" redirect.
7
+ */
8
+ export type MyWorkspace = { id: string, slug: string, name: string, role: WorkspaceRole, organization_id: string, };
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { MyWorkspace } from "./MyWorkspace";
3
+
4
+ export type MyWorkspacesResponse = { workspaces: Array<MyWorkspace>, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Action a policy takes when matched.
5
+ */
6
+ export type PolicyAction = "block" | "rewrite" | "escalate";
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type PolicyBatchSetEnabledRequest = { ids: Array<string>, enabled: boolean, };
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { PolicySummary } from "./PolicySummary";
3
+
4
+ export type PolicyBatchSetEnabledResponse = { policies: Array<PolicySummary>, };
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Severity } from "./Severity";
3
+
4
+ export type PolicyDocument = { id: string, description?: string, severity: Severity, enabled: boolean, source_yaml: string, };
@@ -0,0 +1,11 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { PolicyAction } from "./PolicyAction";
3
+ import type { PolicyMatchType } from "./PolicyMatchType";
4
+ import type { Severity } from "./Severity";
5
+
6
+ /**
7
+ * LLM-drafted policy skeleton. Returned by `POST /v1/policies/draft`,
8
+ * rendered as YAML by the caller, then submitted to `/v1/policies` as
9
+ * usual. The server does not persist drafts.
10
+ */
11
+ export type PolicyDraft = { id: string, description: string, match_type: PolicyMatchType, match_value: string, action: PolicyAction, severity: Severity, rewrite?: string, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Natural-language description posted to `POST /v1/policies/draft`.
5
+ */
6
+ export type PolicyDraftRequest = { prompt: string, };
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { PolicyDraft } from "./PolicyDraft";
3
+
4
+ export type PolicyDraftResponse = { draft: PolicyDraft, };
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { PolicySummary } from "./PolicySummary";
3
+
4
+ export type PolicyListResponse = { policies: Array<PolicySummary>, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Match-type discriminator for a `PolicyDraft`. Mirrors the YAML shape:
5
+ * `match: { literal: "..." }` or `match: { regex: "..." }`.
6
+ */
7
+ export type PolicyMatchType = "literal" | "regex";
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type PolicySetEnabledRequest = { enabled: boolean, };
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Severity } from "./Severity";
3
+
4
+ export type PolicySummary = { id: string, description?: string, severity: Severity, action?: string, enabled: boolean, owner_agent_id?: string, };
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { PolicyValidationIssue } from "./PolicyValidationIssue";
3
+
4
+ export type PolicyValidateResponse = { valid: boolean, policy_id?: string, errors: Array<PolicyValidationIssue>, };
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type PolicyValidationIssue = { path: string, message: string, };
@@ -0,0 +1 @@
1
+ Generated by `cargo run -p tl-codegen`. Do not edit by hand.
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { RunEventSummary } from "./RunEventSummary";
3
+ import type { RunSummary } from "./RunSummary";
4
+ import type { TraceSummary } from "./TraceSummary";
5
+
6
+ export type RunDetail = { run: RunSummary, events: Array<RunEventSummary>, traces: Array<TraceSummary>, };
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type RunEventKind = "user_turn" | "assistant_turn" | "tool_call" | "workflow_step" | "interruption" | "retry" | "system_event" | "other";
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { RunEventSummary } from "./RunEventSummary";
3
+
4
+ export type RunEventListResponse = { events: Array<RunEventSummary>, };
@@ -0,0 +1,12 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { RunEventKind } from "./RunEventKind";
3
+
4
+ export type RunEventSummary = { id: string, workspace_id: string, run_id: string, sequence: number, kind: RunEventKind, label: string | null, input_summary: string | null, output_summary: string | null, metadata: Record<string, unknown>,
5
+ /**
6
+ * RFC 3339 timestamp.
7
+ */
8
+ occurred_at: string,
9
+ /**
10
+ * RFC 3339 timestamp.
11
+ */
12
+ created_at: string, };
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type RunKind = "chat_session" | "live_call" | "workflow" | "job" | "other";
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { RunSummary } from "./RunSummary";
3
+
4
+ export type RunListResponse = { runs: Array<RunSummary>, };
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type RunStatus = "warming" | "running" | "completed" | "failed" | "canceled";
@@ -0,0 +1,21 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { RunKind } from "./RunKind";
3
+ import type { RunStatus } from "./RunStatus";
4
+
5
+ export type RunSummary = { id: string, workspace_id: string, agent_id: string, kind: RunKind, status: RunStatus, external_id: string | null, metadata: Record<string, unknown>,
6
+ /**
7
+ * RFC 3339 timestamp.
8
+ */
9
+ started_at: string,
10
+ /**
11
+ * RFC 3339 timestamp.
12
+ */
13
+ ended_at: string | null,
14
+ /**
15
+ * RFC 3339 timestamp.
16
+ */
17
+ created_at: string,
18
+ /**
19
+ * RFC 3339 timestamp.
20
+ */
21
+ updated_at: string, trace_count: number, blocked_count: number, rewritten_count: number, escalated_count: number, p95_latency_ms: number | null, };
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type Severity = "low" | "medium" | "high" | "critical";
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Which pipeline tier produced a result.
5
+ */
6
+ export type Tier = "deterministic" | "fuzzy" | "llm";
@@ -0,0 +1,9 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Tier } from "./Tier";
3
+ import type { TierStatus } from "./TierStatus";
4
+ import type { TriggeredPolicy } from "./TriggeredPolicy";
5
+
6
+ /**
7
+ * One row of evidence per tier in the final `Decision`.
8
+ */
9
+ export type TierResult = { tier: Tier, status: TierStatus, reasons: Array<TriggeredPolicy>, elapsed_ms: bigint, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * How a tier finished.
5
+ */
6
+ export type TierStatus = "completed" | "cancelled" | "timed_out" | "skipped";
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { TraceSummary } from "./TraceSummary";
3
+
4
+ export type TraceListResponse = { traces: Array<TraceSummary>, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type TraceSummary = { trace_id: string, run_id: string | null, run_event_id: string | null, domain: string, decision: string, elapsed_ms: number, payload: Record<string, unknown>,
4
+ /**
5
+ * RFC 3339 timestamp.
6
+ */
7
+ created_at: string, };
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Severity } from "./Severity";
3
+
4
+ export type TriggeredPolicy = { id: string, severity: Severity, reason: string, };
@@ -0,0 +1,9 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { RunStatus } from "./RunStatus";
3
+
4
+ export type UpdateRunRequest = { status?: RunStatus, metadata?: Record<string, unknown> | null,
5
+ /**
6
+ * RFC 3339 timestamp. Defaults to now when completing/failing/canceling
7
+ * a run without an explicit timestamp.
8
+ */
9
+ ended_at?: string, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * What TrustLoopGuard tells the caller to do with the proposed output.
5
+ */
6
+ export type Verdict = "allow" | "block" | "rewrite" | "escalate";
@@ -0,0 +1,14 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { InviteStatus } from "./InviteStatus";
3
+ import type { WorkspaceRole } from "./WorkspaceRole";
4
+
5
+ /**
6
+ * A pending or historical invite. The `id` doubles as the bearer
7
+ * token: it's an opaque URL-safe random string, single-use, and
8
+ * invalidated on accept/revoke/expire.
9
+ */
10
+ export type WorkspaceInvite = { id: string, workspace_id: string, email: string, role: WorkspaceRole, status: InviteStatus, invited_by_user_id: string | null,
11
+ /**
12
+ * RFC3339 timestamps.
13
+ */
14
+ created_at: string, expires_at: string, };