@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.
- package/dist/client.d.ts +98 -0
- package/dist/client.js +198 -0
- package/dist/errors.d.ts +46 -0
- package/dist/errors.js +187 -0
- package/dist/generated/AgentAuthority.d.ts +4 -0
- package/dist/generated/AgentAuthority.js +2 -0
- package/dist/generated/AgentListResponse.d.ts +4 -0
- package/dist/generated/AgentListResponse.js +1 -0
- package/dist/generated/AgentProfile.d.ts +29 -0
- package/dist/generated/AgentProfile.js +1 -0
- package/dist/generated/AgentScope.d.ts +4 -0
- package/dist/generated/AgentScope.js +2 -0
- package/dist/generated/AgentTone.d.ts +4 -0
- package/dist/generated/AgentTone.js +2 -0
- package/dist/generated/ApiError.d.ts +25 -0
- package/dist/generated/ApiError.js +1 -0
- package/dist/generated/ApiErrorCode.d.ts +6 -0
- package/dist/generated/ApiErrorCode.js +2 -0
- package/dist/generated/ApiKeyBatchRevokeRequest.d.ts +3 -0
- package/dist/generated/ApiKeyBatchRevokeRequest.js +2 -0
- package/dist/generated/ApiKeyBatchRevokeResponse.d.ts +4 -0
- package/dist/generated/ApiKeyBatchRevokeResponse.js +1 -0
- package/dist/generated/ApiKeyListResponse.d.ts +4 -0
- package/dist/generated/ApiKeyListResponse.js +1 -0
- package/dist/generated/AuthRequest.d.ts +15 -0
- package/dist/generated/AuthRequest.js +2 -0
- package/dist/generated/AuthResponse.d.ts +16 -0
- package/dist/generated/AuthResponse.js +2 -0
- package/dist/generated/ChangePasswordRequest.d.ts +15 -0
- package/dist/generated/ChangePasswordRequest.js +2 -0
- package/dist/generated/Channel.d.ts +8 -0
- package/dist/generated/Channel.js +2 -0
- package/dist/generated/CheckRequest.d.ts +21 -0
- package/dist/generated/CheckRequest.js +1 -0
- package/dist/generated/CreateApiKeyRequest.d.ts +3 -0
- package/dist/generated/CreateApiKeyRequest.js +2 -0
- package/dist/generated/CreateApiKeyResponse.d.ts +8 -0
- package/dist/generated/CreateApiKeyResponse.js +1 -0
- package/dist/generated/CreateInviteRequest.d.ts +8 -0
- package/dist/generated/CreateInviteRequest.js +1 -0
- package/dist/generated/CreateInviteResponse.d.ts +18 -0
- package/dist/generated/CreateInviteResponse.js +1 -0
- package/dist/generated/CreateKnowledgeSourceRequest.d.ts +9 -0
- package/dist/generated/CreateKnowledgeSourceRequest.js +1 -0
- package/dist/generated/CreateRunEventRequest.d.ts +13 -0
- package/dist/generated/CreateRunEventRequest.js +1 -0
- package/dist/generated/CreateRunRequest.d.ts +9 -0
- package/dist/generated/CreateRunRequest.js +1 -0
- package/dist/generated/CreateWorkspaceRequest.d.ts +7 -0
- package/dist/generated/CreateWorkspaceRequest.js +2 -0
- package/dist/generated/DashboardApiKey.d.ts +15 -0
- package/dist/generated/DashboardApiKey.js +2 -0
- package/dist/generated/DashboardKnowledgeSourceKind.d.ts +1 -0
- package/dist/generated/DashboardKnowledgeSourceKind.js +2 -0
- package/dist/generated/Decision.d.ts +17 -0
- package/dist/generated/Decision.js +1 -0
- package/dist/generated/GuardrailGenerateResponse.d.ts +11 -0
- package/dist/generated/GuardrailGenerateResponse.js +1 -0
- package/dist/generated/GuardrailListResponse.d.ts +7 -0
- package/dist/generated/GuardrailListResponse.js +1 -0
- package/dist/generated/InviteListResponse.d.ts +4 -0
- package/dist/generated/InviteListResponse.js +1 -0
- package/dist/generated/InviteStatus.d.ts +4 -0
- package/dist/generated/InviteStatus.js +2 -0
- package/dist/generated/KnowledgeFileInput.d.ts +5 -0
- package/dist/generated/KnowledgeFileInput.js +2 -0
- package/dist/generated/KnowledgeFileMetadata.d.ts +6 -0
- package/dist/generated/KnowledgeFileMetadata.js +2 -0
- package/dist/generated/KnowledgeSource.d.ts +7 -0
- package/dist/generated/KnowledgeSource.js +1 -0
- package/dist/generated/KnowledgeSourceDocument.d.ts +22 -0
- package/dist/generated/KnowledgeSourceDocument.js +1 -0
- package/dist/generated/KnowledgeSourceFileResponse.d.ts +6 -0
- package/dist/generated/KnowledgeSourceFileResponse.js +2 -0
- package/dist/generated/KnowledgeSourceKind.d.ts +1 -0
- package/dist/generated/KnowledgeSourceKind.js +2 -0
- package/dist/generated/KnowledgeSourceListResponse.d.ts +4 -0
- package/dist/generated/KnowledgeSourceListResponse.js +1 -0
- package/dist/generated/KnowledgeSourceStatus.d.ts +1 -0
- package/dist/generated/KnowledgeSourceStatus.js +2 -0
- package/dist/generated/MemberListResponse.d.ts +4 -0
- package/dist/generated/MemberListResponse.js +1 -0
- package/dist/generated/MyWorkspace.d.ts +12 -0
- package/dist/generated/MyWorkspace.js +1 -0
- package/dist/generated/MyWorkspacesResponse.d.ts +4 -0
- package/dist/generated/MyWorkspacesResponse.js +1 -0
- package/dist/generated/PolicyAction.d.ts +4 -0
- package/dist/generated/PolicyAction.js +2 -0
- package/dist/generated/PolicyBatchSetEnabledRequest.d.ts +4 -0
- package/dist/generated/PolicyBatchSetEnabledRequest.js +2 -0
- package/dist/generated/PolicyBatchSetEnabledResponse.d.ts +4 -0
- package/dist/generated/PolicyBatchSetEnabledResponse.js +1 -0
- package/dist/generated/PolicyDocument.d.ts +8 -0
- package/dist/generated/PolicyDocument.js +1 -0
- package/dist/generated/PolicyDraft.d.ts +17 -0
- package/dist/generated/PolicyDraft.js +1 -0
- package/dist/generated/PolicyDraftRequest.d.ts +6 -0
- package/dist/generated/PolicyDraftRequest.js +2 -0
- package/dist/generated/PolicyDraftResponse.d.ts +4 -0
- package/dist/generated/PolicyDraftResponse.js +1 -0
- package/dist/generated/PolicyListResponse.d.ts +4 -0
- package/dist/generated/PolicyListResponse.js +1 -0
- package/dist/generated/PolicyMatchType.d.ts +5 -0
- package/dist/generated/PolicyMatchType.js +2 -0
- package/dist/generated/PolicySetEnabledRequest.d.ts +3 -0
- package/dist/generated/PolicySetEnabledRequest.js +2 -0
- package/dist/generated/PolicySummary.d.ts +9 -0
- package/dist/generated/PolicySummary.js +1 -0
- package/dist/generated/PolicyValidateResponse.d.ts +6 -0
- package/dist/generated/PolicyValidateResponse.js +1 -0
- package/dist/generated/PolicyValidationIssue.d.ts +4 -0
- package/dist/generated/PolicyValidationIssue.js +2 -0
- package/dist/generated/RunDetail.d.ts +8 -0
- package/dist/generated/RunDetail.js +1 -0
- package/dist/generated/RunEventKind.d.ts +1 -0
- package/dist/generated/RunEventKind.js +2 -0
- package/dist/generated/RunEventListResponse.d.ts +4 -0
- package/dist/generated/RunEventListResponse.js +1 -0
- package/dist/generated/RunEventSummary.d.ts +20 -0
- package/dist/generated/RunEventSummary.js +1 -0
- package/dist/generated/RunKind.d.ts +1 -0
- package/dist/generated/RunKind.js +2 -0
- package/dist/generated/RunListResponse.d.ts +4 -0
- package/dist/generated/RunListResponse.js +1 -0
- package/dist/generated/RunStatus.d.ts +1 -0
- package/dist/generated/RunStatus.js +2 -0
- package/dist/generated/RunSummary.d.ts +32 -0
- package/dist/generated/RunSummary.js +1 -0
- package/dist/generated/Severity.d.ts +1 -0
- package/dist/generated/Severity.js +2 -0
- package/dist/generated/Tier.d.ts +4 -0
- package/dist/generated/Tier.js +2 -0
- package/dist/generated/TierResult.d.ts +12 -0
- package/dist/generated/TierResult.js +1 -0
- package/dist/generated/TierStatus.d.ts +4 -0
- package/dist/generated/TierStatus.js +2 -0
- package/dist/generated/TraceListResponse.d.ts +4 -0
- package/dist/generated/TraceListResponse.js +1 -0
- package/dist/generated/TraceSummary.d.ts +13 -0
- package/dist/generated/TraceSummary.js +2 -0
- package/dist/generated/TriggeredPolicy.d.ts +6 -0
- package/dist/generated/TriggeredPolicy.js +1 -0
- package/dist/generated/UpdateRunRequest.d.ts +10 -0
- package/dist/generated/UpdateRunRequest.js +1 -0
- package/dist/generated/Verdict.d.ts +4 -0
- package/dist/generated/Verdict.js +2 -0
- package/dist/generated/WorkspaceInvite.d.ts +20 -0
- package/dist/generated/WorkspaceInvite.js +1 -0
- package/dist/generated/WorkspaceMember.d.ts +13 -0
- package/dist/generated/WorkspaceMember.js +1 -0
- package/dist/generated/WorkspaceRole.d.ts +5 -0
- package/dist/generated/WorkspaceRole.js +2 -0
- package/dist/generated/WorkspaceSettings.d.ts +11 -0
- package/dist/generated/WorkspaceSettings.js +2 -0
- package/dist/guard.d.ts +193 -0
- package/dist/guard.js +211 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +64 -0
- package/dist/retry.d.ts +18 -0
- package/dist/retry.js +48 -0
- package/package.json +39 -0
- package/src/client.ts +453 -0
- package/src/errors.ts +202 -0
- package/src/generated/AgentAuthority.ts +3 -0
- package/src/generated/AgentListResponse.ts +4 -0
- package/src/generated/AgentProfile.ts +23 -0
- package/src/generated/AgentScope.ts +3 -0
- package/src/generated/AgentTone.ts +3 -0
- package/src/generated/ApiError.ts +24 -0
- package/src/generated/ApiErrorCode.ts +8 -0
- package/src/generated/ApiKeyBatchRevokeRequest.ts +3 -0
- package/src/generated/ApiKeyBatchRevokeResponse.ts +4 -0
- package/src/generated/ApiKeyListResponse.ts +4 -0
- package/src/generated/AuthRequest.ts +16 -0
- package/src/generated/AuthResponse.ts +15 -0
- package/src/generated/ChangePasswordRequest.ts +15 -0
- package/src/generated/Channel.ts +10 -0
- package/src/generated/CheckRequest.ts +11 -0
- package/src/generated/CreateApiKeyRequest.ts +3 -0
- package/src/generated/CreateApiKeyResponse.ts +8 -0
- package/src/generated/CreateInviteRequest.ts +7 -0
- package/src/generated/CreateInviteResponse.ts +14 -0
- package/src/generated/CreateKnowledgeSourceRequest.ts +5 -0
- package/src/generated/CreateRunEventRequest.ts +8 -0
- package/src/generated/CreateRunRequest.ts +5 -0
- package/src/generated/CreateWorkspaceRequest.ts +7 -0
- package/src/generated/DashboardApiKey.ts +11 -0
- package/src/generated/DashboardKnowledgeSourceKind.ts +3 -0
- package/src/generated/Decision.ts +12 -0
- package/src/generated/GuardrailGenerateResponse.ts +11 -0
- package/src/generated/GuardrailListResponse.ts +7 -0
- package/src/generated/InviteListResponse.ts +4 -0
- package/src/generated/InviteStatus.ts +6 -0
- package/src/generated/KnowledgeFileInput.ts +3 -0
- package/src/generated/KnowledgeFileMetadata.ts +3 -0
- package/src/generated/KnowledgeSource.ts +4 -0
- package/src/generated/KnowledgeSourceDocument.ts +17 -0
- package/src/generated/KnowledgeSourceFileResponse.ts +3 -0
- package/src/generated/KnowledgeSourceKind.ts +3 -0
- package/src/generated/KnowledgeSourceListResponse.ts +4 -0
- package/src/generated/KnowledgeSourceStatus.ts +3 -0
- package/src/generated/MemberListResponse.ts +4 -0
- package/src/generated/MyWorkspace.ts +8 -0
- package/src/generated/MyWorkspacesResponse.ts +4 -0
- package/src/generated/PolicyAction.ts +6 -0
- package/src/generated/PolicyBatchSetEnabledRequest.ts +3 -0
- package/src/generated/PolicyBatchSetEnabledResponse.ts +4 -0
- package/src/generated/PolicyDocument.ts +4 -0
- package/src/generated/PolicyDraft.ts +11 -0
- package/src/generated/PolicyDraftRequest.ts +6 -0
- package/src/generated/PolicyDraftResponse.ts +4 -0
- package/src/generated/PolicyListResponse.ts +4 -0
- package/src/generated/PolicyMatchType.ts +7 -0
- package/src/generated/PolicySetEnabledRequest.ts +3 -0
- package/src/generated/PolicySummary.ts +4 -0
- package/src/generated/PolicyValidateResponse.ts +4 -0
- package/src/generated/PolicyValidationIssue.ts +3 -0
- package/src/generated/README.md +1 -0
- package/src/generated/RunDetail.ts +6 -0
- package/src/generated/RunEventKind.ts +3 -0
- package/src/generated/RunEventListResponse.ts +4 -0
- package/src/generated/RunEventSummary.ts +12 -0
- package/src/generated/RunKind.ts +3 -0
- package/src/generated/RunListResponse.ts +4 -0
- package/src/generated/RunStatus.ts +3 -0
- package/src/generated/RunSummary.ts +21 -0
- package/src/generated/Severity.ts +3 -0
- package/src/generated/Tier.ts +6 -0
- package/src/generated/TierResult.ts +9 -0
- package/src/generated/TierStatus.ts +6 -0
- package/src/generated/TraceListResponse.ts +4 -0
- package/src/generated/TraceSummary.ts +7 -0
- package/src/generated/TriggeredPolicy.ts +4 -0
- package/src/generated/UpdateRunRequest.ts +9 -0
- package/src/generated/Verdict.ts +6 -0
- package/src/generated/WorkspaceInvite.ts +14 -0
- package/src/generated/WorkspaceMember.ts +11 -0
- package/src/generated/WorkspaceRole.ts +7 -0
- package/src/generated/WorkspaceSettings.ts +7 -0
- package/src/guard.ts +492 -0
- package/src/index.ts +97 -0
- 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,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,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,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 { 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,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,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 { 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,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,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 @@
|
|
|
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,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,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,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,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,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,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, };
|