@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 CHANGED
@@ -1,35 +1,31 @@
1
1
  /**
2
2
  * Agent OS SDK
3
3
  *
4
- * Two APIs available:
4
+ * 100% Auto-Generated from OpenAPI + Custom Client with modules.
5
5
  *
6
- * 1. AUTO-GENERATED (openapi-fetch) - Types + endpoints 100% from Swagger
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 { createClient, type paths, type Schema } from "@agent-os-sdk/client";
8
+ * import type { Schema } from "@agent-os-sdk/client";
12
9
  *
13
- * const api = createClient({
14
- * baseUrl: "https://api.example.com",
15
- * headers: { Authorization: `Bearer ${token}` }
16
- * });
10
+ * type Run = Schema<"RunDetailResponse">;
11
+ * type Agent = Schema<"AgentDraftResponse">;
12
+ * // Any schema from the backend is available!
13
+ * ```
17
14
  *
18
- * const { data } = await api.POST("/v1/api/graph/commit", {
19
- * body: { agent_id: "...", graph_spec: {...} }
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 (existing, has auth + ergonomic modules)
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
- * baseUrl: "https://api.example.com",
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAMH,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;A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AO,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
- * Two APIs available:
4
+ * 100% Auto-Generated from OpenAPI + Custom Client with modules.
5
5
  *
6
- * 1. AUTO-GENERATED (openapi-fetch) - Types + endpoints 100% from Swagger
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 { createClient, type paths, type Schema } from "@agent-os-sdk/client";
8
+ * import type { Schema } from "@agent-os-sdk/client";
12
9
  *
13
- * const api = createClient({
14
- * baseUrl: "https://api.example.com",
15
- * headers: { Authorization: `Bearer ${token}` }
16
- * });
10
+ * type Run = Schema<"RunDetailResponse">;
11
+ * type Agent = Schema<"AgentDraftResponse">;
12
+ * // Any schema from the backend is available!
13
+ * ```
17
14
  *
18
- * const { data } = await api.POST("/v1/api/graph/commit", {
19
- * body: { agent_id: "...", graph_spec: {...} }
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 (existing, has auth + ergonomic modules)
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
- * baseUrl: "https://api.example.com",
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
- // 1. AUTO-GENERATED CLIENT (openapi-fetch)
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
- // 2. CUSTOM CLIENT (AgentOsClient with modules)
37
+ // CUSTOM CLIENT (AgentOsClient with modules)
41
38
  // ============================================================
42
39
  export { AgentOsClient } from "./client/AgentOsClient.js";
43
40
  // ============================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-os-sdk/client",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "Official TypeScript SDK for Agent OS platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -1,47 +1,44 @@
1
1
  /**
2
2
  * Agent OS SDK
3
3
  *
4
- * Two APIs available:
4
+ * 100% Auto-Generated from OpenAPI + Custom Client with modules.
5
5
  *
6
- * 1. AUTO-GENERATED (openapi-fetch) - Types + endpoints 100% from Swagger
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 { createClient, type paths, type Schema } from "@agent-os-sdk/client";
8
+ * import type { Schema } from "@agent-os-sdk/client";
12
9
  *
13
- * const api = createClient({
14
- * baseUrl: "https://api.example.com",
15
- * headers: { Authorization: `Bearer ${token}` }
16
- * });
10
+ * type Run = Schema<"RunDetailResponse">;
11
+ * type Agent = Schema<"AgentDraftResponse">;
12
+ * // Any schema from the backend is available!
13
+ * ```
17
14
  *
18
- * const { data } = await api.POST("/v1/api/graph/commit", {
19
- * body: { agent_id: "...", graph_spec: {...} }
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 (existing, has auth + ergonomic modules)
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
- * baseUrl: "https://api.example.com",
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
- // 1. AUTO-GENERATED CLIENT (openapi-fetch)
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
- // 2. CUSTOM CLIENT (AgentOsClient with modules)
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
- // OpenAPI Types (use these for type-safe API calls)
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";