@agent-os-sdk/client 0.7.3 → 0.7.5
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/generated/openapi.d.ts +82 -5
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +16 -52
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -22
- package/dist/modules/runs.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/generated/openapi.ts +82 -5
- package/src/generated/swagger.json +223 -5
- package/src/index.ts +20 -64
package/src/index.ts
CHANGED
|
@@ -1,47 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent OS SDK
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* 100% Auto-Generated from OpenAPI + Custom Client with modules.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* 2. CUSTOM CLIENT (AgentOsClient) - Ergonomic wrapper with auth, modules, etc.
|
|
8
|
-
*
|
|
9
|
-
* @example Auto-Generated (new, recommended for typed endpoints)
|
|
6
|
+
* @example Types (all come from backend automatically)
|
|
10
7
|
* ```ts
|
|
11
|
-
* import
|
|
8
|
+
* import type { Schema } from "@agent-os-sdk/client";
|
|
9
|
+
*
|
|
10
|
+
* type Run = Schema<"RunDetailResponse">;
|
|
11
|
+
* type Agent = Schema<"AgentDraftResponse">;
|
|
12
|
+
* // Any schema from the backend is available!
|
|
13
|
+
* ```
|
|
12
14
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* });
|
|
15
|
+
* @example Auto-Generated Client (openapi-fetch)
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { createClient } from "@agent-os-sdk/client";
|
|
17
18
|
*
|
|
18
|
-
* const
|
|
19
|
-
*
|
|
20
|
-
* });
|
|
19
|
+
* const api = createClient({ baseUrl, headers });
|
|
20
|
+
* const { data } = await api.POST("/v1/api/graph/commit", { body: {...} });
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
23
|
-
* @example Custom Client (
|
|
23
|
+
* @example Custom Client (ergonomic wrapper)
|
|
24
24
|
* ```ts
|
|
25
25
|
* import { AgentOsClient } from "@agent-os-sdk/client";
|
|
26
26
|
*
|
|
27
|
-
* const client = new AgentOsClient({
|
|
28
|
-
*
|
|
29
|
-
* auth: { type: "jwt", getToken: () => token, getWorkspaceId: () => wsId }
|
|
30
|
-
* });
|
|
31
|
-
*
|
|
32
|
-
* const { data } = await client.graphs.commit({ agent_id: "...", graph_spec: {...} });
|
|
27
|
+
* const client = new AgentOsClient({ baseUrl, auth: {...} });
|
|
28
|
+
* const { data } = await client.graphs.commit({...});
|
|
33
29
|
* ```
|
|
34
30
|
*/
|
|
35
31
|
|
|
36
32
|
// ============================================================
|
|
37
|
-
//
|
|
33
|
+
// AUTO-GENERATED (100% from Swagger)
|
|
38
34
|
// ============================================================
|
|
39
35
|
|
|
36
|
+
// Client + types - ALL schemas available via Schema<"Name">
|
|
40
37
|
export { createClient, type AgentOsClient as GeneratedClient, type ClientOptions, type Schema } from "./generated/client.js";
|
|
41
38
|
export type { paths, components } from "./generated/openapi.js";
|
|
42
39
|
|
|
43
40
|
// ============================================================
|
|
44
|
-
//
|
|
41
|
+
// CUSTOM CLIENT (AgentOsClient with modules)
|
|
45
42
|
// ============================================================
|
|
46
43
|
|
|
47
44
|
export { AgentOsClient } from "./client/AgentOsClient.js";
|
|
@@ -90,49 +87,8 @@ export {
|
|
|
90
87
|
} from "./client/pagination.js";
|
|
91
88
|
|
|
92
89
|
// ============================================================
|
|
93
|
-
//
|
|
94
|
-
// ============================================================
|
|
95
|
-
|
|
96
|
-
export type CommitGraphSpecRequest = import("./generated/openapi.js").components["schemas"]["CommitGraphSpecRequest"];
|
|
97
|
-
export type CommitGraphSpecResponse = import("./generated/openapi.js").components["schemas"]["CommitGraphSpecResponse"];
|
|
98
|
-
export type GetGraphSpecResponse = import("./generated/openapi.js").components["schemas"]["GetGraphSpecResponse"];
|
|
99
|
-
export type ApprovalDecision = import("./generated/openapi.js").components["schemas"]["ApprovalDecision"];
|
|
100
|
-
|
|
101
|
-
// Run types from OpenAPI
|
|
102
|
-
export type RunResponse = import("./generated/openapi.js").components["schemas"]["RunResponse"];
|
|
103
|
-
export type RunDetailResponse = import("./generated/openapi.js").components["schemas"]["RunDetailResponse"];
|
|
104
|
-
export type RunListItem = import("./generated/openapi.js").components["schemas"]["RunListItem"];
|
|
105
|
-
export type RunListResponse = import("./generated/openapi.js").components["schemas"]["RunListResponse"];
|
|
106
|
-
export type RunEventsPollResponse = import("./generated/openapi.js").components["schemas"]["RunEventsPollResponse"];
|
|
107
|
-
export type RunStatus = import("./generated/openapi.js").components["schemas"]["RunStatus"];
|
|
108
|
-
|
|
109
|
-
// Alias for backwards compat
|
|
110
|
-
export type Run = RunDetailResponse;
|
|
111
|
-
|
|
112
|
-
// ============================================================
|
|
113
|
-
// Module Types (from manual modules)
|
|
90
|
+
// SSE
|
|
114
91
|
// ============================================================
|
|
115
92
|
|
|
116
|
-
export type { Agent } from "./modules/agents.js";
|
|
117
|
-
export type { RunEvent, RunEventDto, FollowEvent, FollowOptions } from "./modules/runs.js";
|
|
118
|
-
export type { Thread, ThreadMessage, ThreadState } from "./modules/threads.js";
|
|
119
|
-
export type { Trigger } from "./modules/triggers.js";
|
|
120
|
-
export type { Credential } from "./modules/credentials.js";
|
|
121
|
-
export type { BuilderChatRequest, BuilderChatResponse, BuilderStreamEvent, GraphUpdateAction } from "./modules/builder.js";
|
|
122
|
-
export type { Member, Role } from "./modules/members.js";
|
|
123
|
-
export type { Workspace } from "./modules/workspaces.js";
|
|
124
|
-
export type { Tenant } from "./modules/tenants.js";
|
|
125
|
-
export type { StoredFile } from "./modules/files.js";
|
|
126
|
-
export type { EvalDataset, Experiment } from "./modules/evaluation.js";
|
|
127
|
-
export type { Prompt } from "./modules/prompts.js";
|
|
128
|
-
export type { Trace, Span } from "./modules/traces.js";
|
|
129
|
-
export type { CronJob } from "./modules/crons.js";
|
|
130
|
-
export type { DlqMessage } from "./modules/dlq.js";
|
|
131
|
-
export type { VectorStore } from "./modules/vectorStores.js";
|
|
132
|
-
export type { AuditLogEntry } from "./modules/audit.js";
|
|
133
|
-
export type { ServerCapabilities } from "./modules/info.js";
|
|
134
|
-
export type { Checkpoint } from "./modules/checkpoints.js";
|
|
135
|
-
export type { Tool } from "./modules/tools.js";
|
|
136
|
-
export type { Approval, ApprovalStatus } from "./modules/approvals.js";
|
|
137
93
|
export type { SSEEvent, SSEOptions } from "./sse/client.js";
|
|
138
94
|
export type { APIResponse } from "./client/raw.js";
|