@agent-os-sdk/client 0.7.2 → 0.7.4
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/index.d.ts +16 -45
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -22
- package/package.json +1 -1
- package/src/index.ts +20 -53
package/dist/index.d.ts
CHANGED
|
@@ -1,35 +1,31 @@
|
|
|
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";
|
|
12
9
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
10
|
+
* type Run = Schema<"RunDetailResponse">;
|
|
11
|
+
* type Agent = Schema<"AgentDraftResponse">;
|
|
12
|
+
* // Any schema from the backend is available!
|
|
13
|
+
* ```
|
|
17
14
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* }
|
|
15
|
+
* @example Auto-Generated Client (openapi-fetch)
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { createClient } from "@agent-os-sdk/client";
|
|
18
|
+
*
|
|
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
|
export { createClient, type AgentOsClient as GeneratedClient, type ClientOptions, type Schema } from "./generated/client.js";
|
|
@@ -41,31 +37,6 @@ export { withRetry } from "./client/retry.js";
|
|
|
41
37
|
export { withTimeout } from "./client/timeout.js";
|
|
42
38
|
export { DEFAULT_NETWORK_CONFIG, INTERACTIVE_NETWORK_CONFIG, BACKGROUND_NETWORK_CONFIG, type NetworkConfig, } from "./client/config.js";
|
|
43
39
|
export { paginate, collectAll, getFirst, type PaginatedResponse, type PaginationParams, type OffsetPaginatedResponse, type CursorPaginatedResponse, type PaginateOptions, } from "./client/pagination.js";
|
|
44
|
-
export type CommitGraphSpecRequest = import("./generated/openapi.js").components["schemas"]["CommitGraphSpecRequest"];
|
|
45
|
-
export type CommitGraphSpecResponse = import("./generated/openapi.js").components["schemas"]["CommitGraphSpecResponse"];
|
|
46
|
-
export type GetGraphSpecResponse = import("./generated/openapi.js").components["schemas"]["GetGraphSpecResponse"];
|
|
47
|
-
export type ApprovalDecision = import("./generated/openapi.js").components["schemas"]["ApprovalDecision"];
|
|
48
|
-
export type { Agent } from "./modules/agents.js";
|
|
49
|
-
export type { RunEvent, RunEventDto, FollowEvent, FollowOptions } from "./modules/runs.js";
|
|
50
|
-
export type { Thread, ThreadMessage, ThreadState } from "./modules/threads.js";
|
|
51
|
-
export type { Trigger } from "./modules/triggers.js";
|
|
52
|
-
export type { Credential } from "./modules/credentials.js";
|
|
53
|
-
export type { BuilderChatRequest, BuilderChatResponse, BuilderStreamEvent, GraphUpdateAction } from "./modules/builder.js";
|
|
54
|
-
export type { Member, Role } from "./modules/members.js";
|
|
55
|
-
export type { Workspace } from "./modules/workspaces.js";
|
|
56
|
-
export type { Tenant } from "./modules/tenants.js";
|
|
57
|
-
export type { StoredFile } from "./modules/files.js";
|
|
58
|
-
export type { EvalDataset, Experiment } from "./modules/evaluation.js";
|
|
59
|
-
export type { Prompt } from "./modules/prompts.js";
|
|
60
|
-
export type { Trace, Span } from "./modules/traces.js";
|
|
61
|
-
export type { CronJob } from "./modules/crons.js";
|
|
62
|
-
export type { DlqMessage } from "./modules/dlq.js";
|
|
63
|
-
export type { VectorStore } from "./modules/vectorStores.js";
|
|
64
|
-
export type { AuditLogEntry } from "./modules/audit.js";
|
|
65
|
-
export type { ServerCapabilities } from "./modules/info.js";
|
|
66
|
-
export type { Checkpoint } from "./modules/checkpoints.js";
|
|
67
|
-
export type { Tool } from "./modules/tools.js";
|
|
68
|
-
export type { Approval, ApprovalStatus } from "./modules/approvals.js";
|
|
69
40
|
export type { SSEEvent, SSEOptions } from "./sse/client.js";
|
|
70
41
|
export type { APIResponse } from "./client/raw.js";
|
|
71
42
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAOH,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,IAAI,eAAe,EAAE,KAAK,aAAa,EAAE,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7H,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMhE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAM3E,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAW,EACX,WAAW,EACX,gBAAgB,GACnB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EACH,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EACzB,KAAK,aAAa,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,eAAe,GACvB,MAAM,wBAAwB,CAAC;AAMhC,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,43 +1,40 @@
|
|
|
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";
|
|
12
9
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
10
|
+
* type Run = Schema<"RunDetailResponse">;
|
|
11
|
+
* type Agent = Schema<"AgentDraftResponse">;
|
|
12
|
+
* // Any schema from the backend is available!
|
|
13
|
+
* ```
|
|
17
14
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* }
|
|
15
|
+
* @example Auto-Generated Client (openapi-fetch)
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { createClient } from "@agent-os-sdk/client";
|
|
18
|
+
*
|
|
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
|
+
// AUTO-GENERATED (100% from Swagger)
|
|
37
33
|
// ============================================================
|
|
34
|
+
// Client + types - ALL schemas available via Schema<"Name">
|
|
38
35
|
export { createClient } from "./generated/client.js";
|
|
39
36
|
// ============================================================
|
|
40
|
-
//
|
|
37
|
+
// CUSTOM CLIENT (AgentOsClient with modules)
|
|
41
38
|
// ============================================================
|
|
42
39
|
export { AgentOsClient } from "./client/AgentOsClient.js";
|
|
43
40
|
// ============================================================
|
package/package.json
CHANGED
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";
|
|
12
9
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
10
|
+
* type Run = Schema<"RunDetailResponse">;
|
|
11
|
+
* type Agent = Schema<"AgentDraftResponse">;
|
|
12
|
+
* // Any schema from the backend is available!
|
|
13
|
+
* ```
|
|
17
14
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* }
|
|
15
|
+
* @example Auto-Generated Client (openapi-fetch)
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { createClient } from "@agent-os-sdk/client";
|
|
18
|
+
*
|
|
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,38 +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
|
-
// ============================================================
|
|
102
|
-
// Module Types (from manual modules)
|
|
90
|
+
// SSE
|
|
103
91
|
// ============================================================
|
|
104
92
|
|
|
105
|
-
export type { Agent } from "./modules/agents.js";
|
|
106
|
-
export type { RunEvent, RunEventDto, FollowEvent, FollowOptions } from "./modules/runs.js";
|
|
107
|
-
export type { Thread, ThreadMessage, ThreadState } from "./modules/threads.js";
|
|
108
|
-
export type { Trigger } from "./modules/triggers.js";
|
|
109
|
-
export type { Credential } from "./modules/credentials.js";
|
|
110
|
-
export type { BuilderChatRequest, BuilderChatResponse, BuilderStreamEvent, GraphUpdateAction } from "./modules/builder.js";
|
|
111
|
-
export type { Member, Role } from "./modules/members.js";
|
|
112
|
-
export type { Workspace } from "./modules/workspaces.js";
|
|
113
|
-
export type { Tenant } from "./modules/tenants.js";
|
|
114
|
-
export type { StoredFile } from "./modules/files.js";
|
|
115
|
-
export type { EvalDataset, Experiment } from "./modules/evaluation.js";
|
|
116
|
-
export type { Prompt } from "./modules/prompts.js";
|
|
117
|
-
export type { Trace, Span } from "./modules/traces.js";
|
|
118
|
-
export type { CronJob } from "./modules/crons.js";
|
|
119
|
-
export type { DlqMessage } from "./modules/dlq.js";
|
|
120
|
-
export type { VectorStore } from "./modules/vectorStores.js";
|
|
121
|
-
export type { AuditLogEntry } from "./modules/audit.js";
|
|
122
|
-
export type { ServerCapabilities } from "./modules/info.js";
|
|
123
|
-
export type { Checkpoint } from "./modules/checkpoints.js";
|
|
124
|
-
export type { Tool } from "./modules/tools.js";
|
|
125
|
-
export type { Approval, ApprovalStatus } from "./modules/approvals.js";
|
|
126
93
|
export type { SSEEvent, SSEOptions } from "./sse/client.js";
|
|
127
94
|
export type { APIResponse } from "./client/raw.js";
|