@agent-os-sdk/client 0.7.7 → 0.7.8

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/README.md CHANGED
@@ -1,131 +1,118 @@
1
1
  # Agent OS SDK
2
2
 
3
- Internal typed SDK for Agent OS platform. Generated from Swagger.
3
+ The official, fully typed TypeScript SDK for the Agent OS platform.
4
4
 
5
- ## Setup
5
+ ## Installation
6
6
 
7
7
  ```bash
8
- cd sdk/agent-os-sdk
9
- pnpm install
8
+ pnpm add @agent-os-sdk/client
9
+ # or
10
+ npm install @agent-os-sdk/client
10
11
  ```
11
12
 
12
- ## Generate Types
13
+ ## Usage
13
14
 
14
- Ensure backend is running, then:
15
+ The SDK supports two authentication modes:
15
16
 
16
- ```bash
17
- pnpm generate
18
- ```
17
+ ### 1. Frontend (JWT)
19
18
 
20
- This downloads `swagger.json` and generates TypeScript types.
19
+ Use this when running in a browser (e.g., Next.js, React). The SDK will automatically attach the user's session token and workspace context.
21
20
 
22
- ## Build
21
+ ```ts
22
+ import { AgentOsClient } from "@agent-os-sdk/client";
23
23
 
24
- ```bash
25
- pnpm build
24
+ // In your app's API client singleton
25
+ const api = new AgentOsClient({
26
+ baseUrl: process.env.NEXT_PUBLIC_CONTROL_PLANE_URL, // e.g., http://localhost:5000
27
+ auth: {
28
+ type: "jwt",
29
+ // These functions are called on every request to get the freshest token
30
+ getToken: async () => await supabase.auth.getSession().then((s) => s.data.session?.access_token),
31
+ getWorkspaceId: () => localStorage.getItem("agentos.workspace-id"),
32
+ },
33
+ });
34
+
35
+ // Usage
36
+ const { data: agents } = await api.agents.list();
26
37
  ```
27
38
 
28
- ## Usage in Frontend
39
+ ### 2. Backend
40
+
41
+ Use this for server-side integrations, cron jobs, or external scripts.
42
+
43
+ 1. Go to **Resources > API Keys** in the Agent OS Dashboard.
44
+ 2. Create a new key (e.g., `aosk_live_...`).
45
+ 3. Use it in your script:
29
46
 
30
47
  ```ts
31
- import { AgentOsClient } from "@agent-os/sdk";
48
+ import { AgentOsClient } from "@agent-os-sdk/client";
32
49
 
33
50
  const api = new AgentOsClient({
34
- baseUrl: import.meta.env.VITE_API_URL,
35
- tenantId: auth.tenantId,
36
- workspaceId: auth.workspaceId,
37
- token: auth.token,
51
+ baseUrl: "http://localhost:5000", // Your Control Plane URL
52
+ auth: {
53
+ type: "api_token",
54
+ apiKey: "aosk_live_a1b2c3d4e5...",
55
+ },
56
+ });
57
+
58
+ // No login required - the key authenticates the workspace automatically
59
+ const run = await api.runs.create({
60
+ agent_id: "agent_123",
61
+ input: { task: "Analyze this data" },
38
62
  });
63
+ console.log("Run started:", run.data.id);
64
+ ```
65
+
66
+ ## Modules
67
+
68
+ The client is organized into modules mirroring the API resources:
69
+
70
+ | Property | Description |
71
+ | ----------------- | ---------------------------------------------- |
72
+ | `api.agents` | Manage Agents, versions, and graph definitions |
73
+ | `api.runs` | Create, list, and stream execution runs |
74
+ | `api.threads` | Manage chat threads and messages |
75
+ | `api.credentials` | Store and retrieve secrets (BYOK) |
76
+ | `api.knowledge` | Vector stores and RAG datasets |
77
+ | `api.triggers` | Webhooks and cron jobs |
78
+ | `api.files` | File storage and retrieval |
79
+ | `api.tools` | Tool registry management |
80
+ | `api.apiTokens` | Manage programmatic access keys |
81
+
82
+ ## Streaming
39
83
 
40
- // Create and stream a run
84
+ The SDK has built-in support for Server-Sent Events (SSE).
85
+
86
+ ```ts
87
+ // Start a run and stream events in real-time
41
88
  for await (const event of api.runs.createAndStream({
42
- agent_id: "...",
43
- input: { message: "Hello" },
89
+ agent_id: "agent_123",
90
+ input: { message: "Hello world" },
44
91
  })) {
45
- console.log(event.type, event.data);
92
+ if (event.type === "token") {
93
+ process.stdout.write(event.data);
94
+ }
46
95
  }
96
+ ```
47
97
 
48
- // Thread state
49
- const state = await api.threads.getState(threadId);
98
+ ## Error Handling
50
99
 
51
- // Resume HITL
52
- await api.runs.resume(runId, { approved: true });
53
- ```
100
+ All methods return a standardized `APIResponse<T>` object or throw typed errors if `unwrap()` is used.
54
101
 
55
- ## Modules
102
+ ```ts
103
+ // Standard style (Go-like)
104
+ const { data, error } = await api.agents.list();
105
+ if (error) {
106
+ console.error("Failed:", error.message);
107
+ return;
108
+ }
56
109
 
57
- | Module | Description |
58
- |--------|-------------|
59
- | `agents` | Agent CRUD, versions, graph |
60
- | `runs` | Execution, streaming, HITL |
61
- | `threads` | Conversations, messages, state |
62
- | `tools` | Tool definitions registry |
63
- | `knowledge` | Vector stores, RAG |
64
- | `triggers` | Webhooks, crons |
65
- | `credentials` | BYOK secrets |
66
-
67
- ## Hints (hints.v1) — o que são
68
-
69
- **Hints** são um **side-channel** de UX: o DP/meta-agent **sugere** ações/atenções visuais, o **CP repassa** (sem virar fonte de verdade), e o **Frontend anima** (glow, badge, shake, toast etc).
70
- Eles **não alteram** `graph_spec` e não são “estado do sistema” — são **sugestões descartáveis**.
71
-
72
- ### Onde aparecem
73
-
74
- Hoje, no builder do meta-agent, eles saem **junto do update do grafo**:
75
-
76
- * **SSE event**: `graph_update`
77
- Payload inclui `graph_spec` e `hints`.
78
-
79
- E também existem no modelo de retorno não-streaming (`ChatResponse.hints`), se você usar o caminho sync.
80
-
81
- **Regra kernel**: `Content-Type: text/event-stream` só depois de validações; hints são dados normais dentro do JSON do evento.
82
-
83
- ### Estrutura rápida do HintModel
84
-
85
- Campos principais:
86
-
87
- * `type` *(string)*: um dos 12 tipos canônicos
88
- * `severity` *(info|warn|error|success)*
89
- * `scope` *(graph|thread|run)* — onde isso “vive”
90
- * `target` *(opcional)*: `{ node_id?, edge_id?, panel?, action? }`
91
- * `message` *(opcional)*: texto curto pra UI
92
- * `ttl_ms` *(opcional)*: tempo pra auto-dismiss
93
- * `id` *(opcional)*: fingerprint pra dedupe
94
- * `data` *(opcional)*: payload pequeno (ex.: `code`, `path`, `credential_slug`, `fields`…)
95
-
96
- ### Como usar (frontend)
97
-
98
- Fluxo recomendado:
99
-
100
- 1. Consumir evento `graph_update`
101
- 2. Ler `payload.hints[]`
102
- 3. Para cada hint, despachar por `hint.type`
103
- 4. Aplicar animação/efeito no alvo (`hint.target`) e opcionalmente mostrar mensagem (`hint.message`)
104
- 5. Respeitar `ttl_ms` quando existir (auto-remover/auto-dismiss)
105
-
106
- ### Mini exemplo
107
-
108
- ```json
109
- event: graph_update
110
- data: {
111
- "type": "graph_update",
112
- "graph_spec": { "...": "..." },
113
- "hints": [
114
- {
115
- "type": "error_marker",
116
- "id": "error:node_1:UNKNOWN_TOOL:/nodes/3/config/tool",
117
- "scope": "graph",
118
- "severity": "error",
119
- "target": { "node_id": "node_1" },
120
- "message": "Unknown tool slug",
121
- "data": { "code": "UNKNOWN_TOOL", "path": "/nodes/3/config/tool" }
122
- }
123
- ]
110
+ // Exception style
111
+ try {
112
+ const agents = await unwrap(api.agents.list());
113
+ } catch (err) {
114
+ if (err instanceof NotFoundError) {
115
+ // Handle 404
116
+ }
124
117
  }
125
118
  ```
126
-
127
- ## Rule
128
-
129
- > ❌ **NEVER** use `fetch`, `axios`, or `ky` in frontend.
130
- >
131
- > ✅ **ALWAYS** use `AgentOsClient`.
@@ -1,4 +1,4 @@
1
- import type { RawClient, APIResponse } from "../client/raw.js";
1
+ import type { APIResponse, RawClient } from "../client/raw.js";
2
2
  export interface ApiToken {
3
3
  id: string;
4
4
  name: string;
@@ -21,6 +21,13 @@ export interface CreateTokenRequest {
21
21
  export interface RotateTokenResponse extends ApiTokenSecret {
22
22
  rotated_from: string;
23
23
  }
24
+ export interface ScopeInfo {
25
+ key: string;
26
+ description: string;
27
+ }
28
+ export interface ScopeListResponse {
29
+ scopes: ScopeInfo[];
30
+ }
24
31
  export declare class ApiTokensModule {
25
32
  private client;
26
33
  constructor(client: RawClient);
@@ -36,6 +43,10 @@ export declare class ApiTokensModule {
36
43
  * The full token secret is only returned in this response.
37
44
  */
38
45
  create(body: CreateTokenRequest): Promise<APIResponse<ApiTokenSecret>>;
46
+ /**
47
+ * List all available scopes.
48
+ */
49
+ listScopes(): Promise<APIResponse<ScopeListResponse>>;
39
50
  /**
40
51
  * Revoke an API token immediately.
41
52
  */
@@ -1 +1 @@
1
- {"version":3,"file":"apiTokens.d.ts","sourceRoot":"","sources":["../../src/modules/apiTokens.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/D,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,cAAe,SAAQ,QAAQ;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACvD,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,eAAe;IACxB,OAAO,CAAC,MAAM,CAAY;gBAEd,MAAM,EAAE,SAAS;IAI7B,OAAO,CAAC,OAAO;IAMf;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,WAAW,CAAC;QAAE,MAAM,EAAE,QAAQ,EAAE,CAAA;KAAE,CAAC,CAAC;IAM1D;;;OAGG;IACG,MAAM,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAO5E;;OAEG;IACG,MAAM,CAAC,EAAE,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AE,SAAS;IAI7B,OAAO,CAAC,OAAO;IAMf;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,WAAW,CAAC;QAAE,MAAM,EAAE,QAAQ,EAAE,CAAA;KAAE,CAAC,CAAC;IAM1D;;;OAGG;IACG,MAAM,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAO5E;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAM3D;;OAEG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAOnE;;;OAGG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;CAMtE"}
@@ -26,6 +26,14 @@ export class ApiTokensModule {
26
26
  headers: this.headers(),
27
27
  });
28
28
  }
29
+ /**
30
+ * List all available scopes.
31
+ */
32
+ async listScopes() {
33
+ return this.client.GET("/v1/api/tokens/available-scopes", {
34
+ headers: this.headers(),
35
+ });
36
+ }
29
37
  /**
30
38
  * Revoke an API token immediately.
31
39
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-os-sdk/client",
3
- "version": "0.7.7",
3
+ "version": "0.7.8",
4
4
  "description": "Official TypeScript SDK for Agent OS platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,4 +49,4 @@
49
49
  "dist",
50
50
  "src"
51
51
  ]
52
- }
52
+ }
@@ -1,5 +1,5 @@
1
1
 
2
- import type { RawClient, APIResponse } from "../client/raw.js";
2
+ import type { APIResponse, RawClient } from "../client/raw.js";
3
3
 
4
4
  export interface ApiToken {
5
5
  id: string;
@@ -27,6 +27,15 @@ export interface RotateTokenResponse extends ApiTokenSecret {
27
27
  rotated_from: string;
28
28
  }
29
29
 
30
+ export interface ScopeInfo {
31
+ key: string;
32
+ description: string;
33
+ }
34
+
35
+ export interface ScopeListResponse {
36
+ scopes: ScopeInfo[];
37
+ }
38
+
30
39
  export class ApiTokensModule {
31
40
  private client: RawClient;
32
41
 
@@ -60,6 +69,15 @@ export class ApiTokensModule {
60
69
  });
61
70
  }
62
71
 
72
+ /**
73
+ * List all available scopes.
74
+ */
75
+ async listScopes(): Promise<APIResponse<ScopeListResponse>> {
76
+ return this.client.GET<ScopeListResponse>("/v1/api/tokens/available-scopes", {
77
+ headers: this.headers(),
78
+ });
79
+ }
80
+
63
81
  /**
64
82
  * Revoke an API token immediately.
65
83
  */
@@ -1,49 +0,0 @@
1
- /**
2
- * Artifacts Module - Run Output Management
3
- *
4
- * NOT IMPLEMENTED - Backend endpoint not available.
5
- * All methods return 501 NotImplemented.
6
- */
7
- import type { RawClient, APIResponse } from "../client/raw.js";
8
- export type ArtifactType = "file" | "image" | "json" | "text" | "log" | "report";
9
- export interface Artifact {
10
- id: string;
11
- run_id: string;
12
- name: string;
13
- type: ArtifactType;
14
- mime_type?: string;
15
- size_bytes: number;
16
- checksum?: string;
17
- download_url?: string;
18
- preview_url?: string;
19
- metadata?: Record<string, unknown>;
20
- created_at: string;
21
- expires_at?: string;
22
- }
23
- export interface ArtifactUploadUrl {
24
- upload_url: string;
25
- artifact_id: string;
26
- expires_at: string;
27
- }
28
- export declare class ArtifactsModule {
29
- private client;
30
- private headers;
31
- constructor(client: RawClient, headers: () => Record<string, string>);
32
- /** @returns 501 Not Implemented */
33
- list(runId: string): Promise<APIResponse<{
34
- items: Artifact[];
35
- total: number;
36
- }>>;
37
- /** @returns 501 Not Implemented */
38
- get(artifactId: string): Promise<APIResponse<Artifact>>;
39
- /** @returns 501 Not Implemented */
40
- getDownloadUrl(artifactId: string): Promise<APIResponse<{
41
- url: string;
42
- expires_at: string;
43
- }>>;
44
- /** @returns 501 Not Implemented */
45
- createUploadUrl(runId: string, name: string, type: ArtifactType): Promise<APIResponse<ArtifactUploadUrl>>;
46
- /** @returns 501 Not Implemented */
47
- delete(artifactId: string): Promise<APIResponse<void>>;
48
- }
49
- //# sourceMappingURL=artifacts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../src/modules/artifacts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEjF,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB;AAqBD,qBAAa,eAAe;IACZ,OAAO,CAAC,MAAM;IAAa,OAAO,CAAC,OAAO;gBAAlC,MAAM,EAAE,SAAS,EAAU,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAEpF,mCAAmC;IAC7B,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;QAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAIrF,mCAAmC;IAC7B,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAI7D,mCAAmC;IAC7B,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAInG,mCAAmC;IAC7B,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAI/G,mCAAmC;IAC7B,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;CAG/D"}
@@ -1,50 +0,0 @@
1
- /**
2
- * Artifacts Module - Run Output Management
3
- *
4
- * NOT IMPLEMENTED - Backend endpoint not available.
5
- * All methods return 501 NotImplemented.
6
- */
7
- // ============================================================================
8
- // Helper for 501 responses
9
- // ============================================================================
10
- function notImplemented(method) {
11
- return {
12
- data: undefined,
13
- error: {
14
- code: "NOT_IMPLEMENTED",
15
- message: `ArtifactsModule.${method}() is not implemented. Backend endpoint not available.`,
16
- },
17
- response: new Response(null, { status: 501, statusText: "Not Implemented" }),
18
- };
19
- }
20
- // ============================================================================
21
- // Module
22
- // ============================================================================
23
- export class ArtifactsModule {
24
- client;
25
- headers;
26
- constructor(client, headers) {
27
- this.client = client;
28
- this.headers = headers;
29
- }
30
- /** @returns 501 Not Implemented */
31
- async list(runId) {
32
- return notImplemented("list");
33
- }
34
- /** @returns 501 Not Implemented */
35
- async get(artifactId) {
36
- return notImplemented("get");
37
- }
38
- /** @returns 501 Not Implemented */
39
- async getDownloadUrl(artifactId) {
40
- return notImplemented("getDownloadUrl");
41
- }
42
- /** @returns 501 Not Implemented */
43
- async createUploadUrl(runId, name, type) {
44
- return notImplemented("createUploadUrl");
45
- }
46
- /** @returns 501 Not Implemented */
47
- async delete(artifactId) {
48
- return notImplemented("delete");
49
- }
50
- }
@@ -1,81 +0,0 @@
1
- /**
2
- * Budgets Module - Cost & Token Management
3
- *
4
- * NOT IMPLEMENTED - Backend endpoint not available.
5
- * All methods return 501 NotImplemented.
6
- */
7
- import type { RawClient, APIResponse } from "../client/raw.js";
8
- export type BudgetScope = "agent" | "workspace" | "tenant" | "user";
9
- export type BudgetPeriod = "daily" | "weekly" | "monthly" | "total";
10
- export type BudgetResourceType = "tokens" | "cost" | "api_calls";
11
- export interface Budget {
12
- id: string;
13
- name: string;
14
- scope: BudgetScope;
15
- scope_id: string;
16
- resource_type: BudgetResourceType;
17
- limit_value: number;
18
- current_value: number;
19
- period: BudgetPeriod;
20
- period_start: string;
21
- period_end: string;
22
- alert_threshold_percent?: number;
23
- created_at: string;
24
- }
25
- export interface BudgetUsage {
26
- budget_id: string;
27
- current_value: number;
28
- limit_value: number;
29
- percent_used: number;
30
- remaining: number;
31
- period_start: string;
32
- period_end: string;
33
- breakdown: BudgetBreakdownItem[];
34
- }
35
- export interface BudgetBreakdownItem {
36
- agent_id?: string;
37
- agent_name?: string;
38
- model?: string;
39
- value: number;
40
- percent_of_total: number;
41
- }
42
- export interface BudgetAlert {
43
- id: string;
44
- budget_id: string;
45
- type: "threshold_warning" | "limit_reached" | "limit_exceeded";
46
- message: string;
47
- triggered_at: string;
48
- acknowledged: boolean;
49
- }
50
- export declare class BudgetsModule {
51
- private client;
52
- private headers;
53
- constructor(client: RawClient, headers: () => Record<string, string>);
54
- /** @returns 501 Not Implemented */
55
- list(params?: {
56
- scope?: BudgetScope;
57
- scope_id?: string;
58
- limit?: number;
59
- offset?: number;
60
- }): Promise<APIResponse<{
61
- items: Budget[];
62
- total: number;
63
- }>>;
64
- /** @returns 501 Not Implemented */
65
- get(budgetId: string): Promise<APIResponse<Budget>>;
66
- /** @returns 501 Not Implemented */
67
- create(body: {
68
- name: string;
69
- scope: BudgetScope;
70
- scope_id: string;
71
- resource_type: BudgetResourceType;
72
- limit_value: number;
73
- period: BudgetPeriod;
74
- alert_threshold_percent?: number;
75
- }): Promise<APIResponse<Budget>>;
76
- /** @returns 501 Not Implemented */
77
- getUsage(budgetId: string): Promise<APIResponse<BudgetUsage>>;
78
- /** @returns 501 Not Implemented */
79
- getAlerts(budgetId: string): Promise<APIResponse<BudgetAlert[]>>;
80
- }
81
- //# sourceMappingURL=budgets.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"budgets.d.ts","sourceRoot":"","sources":["../../src/modules/budgets.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/D,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;AACpE,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AACpE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;AAEjE,MAAM,WAAW,MAAM;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,kBAAkB,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,YAAY,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa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zD,mCAAmC;IAC7B,MAAM,CAAC,IAAI,EAAE;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,WAAW,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,kBAAkB,CAAC;QAClC,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,YAAY,CAAC;QACrB,uBAAuB,CAAC,EAAE,MAAM,CAAC;KACpC,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAIhC,mCAAmC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAInE,mCAAmC;IAC7B,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;CAGzE"}
@@ -1,50 +0,0 @@
1
- /**
2
- * Budgets Module - Cost & Token Management
3
- *
4
- * NOT IMPLEMENTED - Backend endpoint not available.
5
- * All methods return 501 NotImplemented.
6
- */
7
- // ============================================================================
8
- // Helper for 501 responses
9
- // ============================================================================
10
- function notImplemented(method) {
11
- return {
12
- data: undefined,
13
- error: {
14
- code: "NOT_IMPLEMENTED",
15
- message: `BudgetsModule.${method}() is not implemented. Backend endpoint not available.`,
16
- },
17
- response: new Response(null, { status: 501, statusText: "Not Implemented" }),
18
- };
19
- }
20
- // ============================================================================
21
- // Module
22
- // ============================================================================
23
- export class BudgetsModule {
24
- client;
25
- headers;
26
- constructor(client, headers) {
27
- this.client = client;
28
- this.headers = headers;
29
- }
30
- /** @returns 501 Not Implemented */
31
- async list(params) {
32
- return notImplemented("list");
33
- }
34
- /** @returns 501 Not Implemented */
35
- async get(budgetId) {
36
- return notImplemented("get");
37
- }
38
- /** @returns 501 Not Implemented */
39
- async create(body) {
40
- return notImplemented("create");
41
- }
42
- /** @returns 501 Not Implemented */
43
- async getUsage(budgetId) {
44
- return notImplemented("getUsage");
45
- }
46
- /** @returns 501 Not Implemented */
47
- async getAlerts(budgetId) {
48
- return notImplemented("getAlerts");
49
- }
50
- }
@@ -1,57 +0,0 @@
1
- /**
2
- * Capabilities Module - Agent Capability Discovery
3
- *
4
- * NOT IMPLEMENTED - Backend endpoint not available.
5
- * All methods return 501 NotImplemented.
6
- */
7
- import type { RawClient, APIResponse } from "../client/raw.js";
8
- export type CapabilityType = "tool" | "skill" | "knowledge" | "integration" | "model_feature";
9
- export interface Capability {
10
- id: string;
11
- name: string;
12
- type: CapabilityType;
13
- description?: string;
14
- agent_id?: string;
15
- is_available: boolean;
16
- required_credentials?: string[];
17
- required_permissions?: string[];
18
- metadata?: Record<string, unknown>;
19
- }
20
- export interface CapabilityTest {
21
- capability_id: string;
22
- test_name: string;
23
- passed: boolean;
24
- message?: string;
25
- duration_ms: number;
26
- }
27
- export interface CapabilityMatrix {
28
- agent_id: string;
29
- capabilities: Capability[];
30
- total: number;
31
- available: number;
32
- unavailable: number;
33
- }
34
- export declare class CapabilitiesModule {
35
- private client;
36
- private headers;
37
- constructor(client: RawClient, headers: () => Record<string, string>);
38
- /** @returns 501 Not Implemented */
39
- list(params?: {
40
- agent_id?: string;
41
- type?: CapabilityType;
42
- limit?: number;
43
- offset?: number;
44
- }): Promise<APIResponse<{
45
- items: Capability[];
46
- total: number;
47
- }>>;
48
- /** @returns 501 Not Implemented */
49
- get(capabilityId: string): Promise<APIResponse<Capability>>;
50
- /** @returns 501 Not Implemented */
51
- getMatrix(agentId: string): Promise<APIResponse<CapabilityMatrix>>;
52
- /** @returns 501 Not Implemented */
53
- test(agentId: string, capabilityId: string): Promise<APIResponse<CapabilityTest>>;
54
- /** @returns 501 Not Implemented */
55
- testAll(agentId: string): Promise<APIResponse<CapabilityTest[]>>;
56
- }
57
- //# sourceMappingURL=capabilities.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/modules/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;GAKG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