@agent-os-sdk/client 0.5.3 → 0.7.0

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.
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Agent OS SDK - 100% Auto-Generated Client
3
+ *
4
+ * This client is fully generated from the OpenAPI specification.
5
+ * NO manual types, NO manual endpoints - everything comes from swagger.json.
6
+ */
7
+ export type { paths, components } from "./openapi.js";
8
+ import { type ClientOptions as OpenapiClientOptions } from "openapi-fetch";
9
+ import type { paths } from "./openapi.js";
10
+ export type ClientOptions = OpenapiClientOptions & {
11
+ baseUrl: string;
12
+ };
13
+ /**
14
+ * Create a fully typed API client.
15
+ * All endpoints and types are auto-generated from OpenAPI spec.
16
+ */
17
+ export declare function createClient(options: ClientOptions): import("openapi-fetch").Client<paths, `${string}/${string}`>;
18
+ export type AgentOsClient = ReturnType<typeof createClient>;
19
+ export type Schema<T extends keyof import("./openapi.js").components["schemas"]> = import("./openapi.js").components["schemas"][T];
20
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/generated/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGtD,OAAsB,EAAE,KAAK,aAAa,IAAI,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,MAAM,aAAa,GAAG,oBAAoB,GAAG;IAC/C,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,aAAa,gEAElD;AAGD,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAG5D,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,MAAM,OAAO,cAAc,EAAE,UAAU,CAAC,SAAS,CAAC,IAC3E,OAAO,cAAc,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Agent OS SDK - 100% Auto-Generated Client
3
+ *
4
+ * This client is fully generated from the OpenAPI specification.
5
+ * NO manual types, NO manual endpoints - everything comes from swagger.json.
6
+ */
7
+ // Re-export openapi-fetch createClient
8
+ import _createClient, {} from "openapi-fetch";
9
+ /**
10
+ * Create a fully typed API client.
11
+ * All endpoints and types are auto-generated from OpenAPI spec.
12
+ */
13
+ export function createClient(options) {
14
+ return _createClient(options);
15
+ }
package/dist/index.d.ts CHANGED
@@ -1,83 +1,67 @@
1
1
  /**
2
- * Agent OS SDK - Fully Typed
2
+ * Agent OS SDK
3
3
  *
4
- * Internal typed SDK for Agent OS platform.
5
- * All API calls are fully typed from OpenAPI specification.
4
+ * Two APIs available:
6
5
  *
7
- * @example
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)
8
10
  * ```ts
9
- * import { AgentOsClient, unwrap } from "@agent-os/sdk";
11
+ * import { createClient, type paths, type Schema } from "@agent-os-sdk/client";
12
+ *
13
+ * const api = createClient({
14
+ * baseUrl: "https://api.example.com",
15
+ * headers: { Authorization: `Bearer ${token}` }
16
+ * });
10
17
  *
11
- * const api = new AgentOsClient({
12
- * baseUrl: import.meta.env.VITE_API_URL,
13
- * tenantId: auth.tenantId,
14
- * workspaceId: auth.workspaceId,
15
- * token: auth.token,
18
+ * const { data } = await api.POST("/v1/api/graph/commit", {
19
+ * body: { agent_id: "...", graph_spec: {...} }
16
20
  * });
21
+ * ```
17
22
  *
18
- * // Style 1: Handle response manually
19
- * const { data, error } = await api.agents.list();
20
- * if (data) {
21
- * data.items.forEach(agent => console.log(agent.name));
22
- * }
23
+ * @example Custom Client (existing, has auth + ergonomic modules)
24
+ * ```ts
25
+ * import { AgentOsClient } from "@agent-os-sdk/client";
23
26
  *
24
- * // Style 2: Unwrap (throws on error, returns data directly)
25
- * const agents = await unwrap(api.agents.list());
26
- * agents.items.forEach(agent => console.log(agent.name));
27
+ * const client = new AgentOsClient({
28
+ * baseUrl: "https://api.example.com",
29
+ * auth: { type: "jwt", getToken: () => token, getWorkspaceId: () => wsId }
30
+ * });
27
31
  *
28
- * // Streaming
29
- * for await (const event of api.runs.createAndStream({
30
- * agent_id: "...",
31
- * input: { message: "Hello" },
32
- * })) {
33
- * console.log(event);
34
- * }
32
+ * const { data } = await client.graphs.commit({ agent_id: "...", graph_spec: {...} });
35
33
  * ```
36
34
  */
37
- export { AgentOsClient, type AgentOsClientOptions, type AuthProvider } from "./client/AgentOsClient.js";
38
- export { isApiToken, isApiTokenAuth, isBrowser, isJwtAuth, isJwtToken, type ApiTokenAuth, type JwtAuth } from "./client/auth.js";
39
- export { SDKError, toResult, unwrap, type PaginatedResponse, type PaginationParams, type Result, type Unwrapped } from "./client/helpers.js";
40
- export { AgentOsError, ConflictError, ForbiddenError, NetworkError, NotFoundError, RateLimitError, ServerError, TimeoutError, UnauthorizedError, ValidationError, isAgentOsError, isAuthError, isClientError, isRetryableError, isServerError, type ErrorOptions, type FieldError } from "./errors/index.js";
41
- export { createErrorFromResponse } from "./errors/factory.js";
42
- export { BACKGROUND_NETWORK_CONFIG, DEFAULT_NETWORK_CONFIG, INTERACTIVE_NETWORK_CONFIG, mergeNetworkConfig, type NetworkConfig, type RetryConfig } from "./client/config.js";
43
- export { sleep, withRetry, type RetryContext } from "./client/retry.js";
44
- export { createTimeoutController, withTimeout } from "./client/timeout.js";
45
- export { collectAll, getFirst, paginate, type CursorPaginatedResponse, type CursorParams, type OffsetPaginatedResponse, type OffsetParams, type PaginateOptions } from "./client/pagination.js";
46
- export { createRawClient, createTypedClient, type APIResponse, type ClientOptions, type HookErrorContext, type HookRequestContext, type HookResponseContext, type RawClient, type SDKHooks, type TypedClient } from "./client/raw.js";
47
- export type { components, paths } from "./client/raw.js";
48
- export { AgentsModule, type Agent, type AgentGraphResponse, type AgentListResponse } from "./modules/agents.js";
49
- export { BuilderModule, type BuilderChatRequest, type BuilderChatResponse, type BuilderStreamEvent, type GraphUpdateAction, type HintModel, type HintTargetModel, type HintDataModel } from "./modules/builder.js";
50
- export { CredentialsModule, type Credential, type CredentialListResponse, type CredentialType } from "./modules/credentials.js";
51
- export { KnowledgeModule, type KnowledgeDataset, type KnowledgeSearchResponse } from "./modules/knowledge.js";
52
- export { MembersModule, type Member, type MemberListResponse, type Role } from "./modules/members.js";
53
- export { RunsModule, type CreateRunResponse, type FollowEvent, type FollowOptions, type Run, type RunEvent, type RunEventDto, type RunEventsPollResponse, type RunEventsResponse, type RunListResponse, type RunStatus } from "./modules/runs.js";
54
- export { TenantsModule, type Tenant } from "./modules/tenants.js";
55
- export { ThreadsModule, type Thread, type ThreadListResponse, type ThreadMessage, type ThreadMessagesResponse, type ThreadRun, type ThreadState } from "./modules/threads.js";
56
- export { ToolsModule, type Tool, type ToolListResponse } from "./modules/tools.js";
57
- export { TriggersModule, type Trigger, type TriggerListResponse } from "./modules/triggers.js";
58
- export { WorkspacesModule, type Workspace, type WorkspaceListResponse } from "./modules/workspaces.js";
59
- export { A2aModule, type A2aAgentCard, type JsonRpcRequest, type JsonRpcResponse } from "./modules/a2a.js";
60
- export { AuditModule, type AuditListResponse, type AuditLogEntry } from "./modules/audit.js";
61
- export { CatalogModule, type CatalogVersions, type NodeCatalogResponse, type NodeDefinition, type ToolCatalogResponse, type ToolDefinition, type TriggerCatalogResponse, type TriggerTemplate } from "./modules/catalog.js";
62
- export { CheckpointsModule, type Checkpoint, type CheckpointsResponse } from "./modules/checkpoints.js";
63
- export { CronsModule, type CronJob, type CronJobListResponse } from "./modules/crons.js";
64
- export { DlqModule, type DlqListResponse, type DlqMessage } from "./modules/dlq.js";
65
- export { EvaluationModule, type EvalDataset, type ExampleData, type Experiment } from "./modules/evaluation.js";
66
- export { FilesModule, type FileListResponse, type PresignedUpload, type StoredFile } from "./modules/files.js";
67
- export { GraphsModule, type GraphsGetResponse, type GraphsCommitRequest, type GraphsCommitResponse, type GraphsConflictPayload, type GraphsRevisionsListResponse, type GraphsRevisionResponse, type GraphsValidateRequest, type GraphsValidateResponse, type GraphsIntrospectRequest, type GraphsIntrospectResponse, type GraphsValidationMessage, type GraphsValidationResult } from "./modules/graphs.js";
68
- export { InfoModule, type ServerCapabilities, type ServerInfo } from "./modules/info.js";
69
- export { McpModule, type McpServer } from "./modules/mcp.js";
70
- export { MeModule, type MeResponse } from "./modules/me.js";
71
- export { MetricsModule, type MetricsResponse } from "./modules/metrics.js";
72
- export { PlaygroundModule, type PlaygroundSession } from "./modules/playground.js";
73
- export { PromptsModule, type Prompt, type PromptListResponse, type PromptVersion } from "./modules/prompts.js";
74
- export { StoreModule, type StoreValue } from "./modules/store.js";
75
- export { TracesModule, type FeedbackRequest, type Span, type SpanData, type Trace, type TraceListResponse } from "./modules/traces.js";
76
- export { UsageModule, type UsageQuota, type UsageResponse } from "./modules/usage.js";
77
- export { VectorStoresModule, type VectorQueryResult, type VectorStore, type VectorStoreListResponse } from "./modules/vectorStores.js";
78
- export { ApprovalsModule, type Approval, type ApprovalDecision, type ApprovalListResponse, type ApprovalStatus, type ApprovalStatusResponse } from "./modules/approvals.js";
79
- export { ApiTokensModule, type ApiToken, type ApiTokenSecret, type CreateTokenRequest, type RotateTokenResponse } from "./modules/apiTokens.js";
80
- export { MembershipsModule, type EnsureMembershipRequest, type MembershipResponse } from "./modules/memberships.js";
81
- export { parseSSE, streamSSE, type RunSSEEvent, type RunStreamEvent, type SSEEvent, type SSEOptions, type RunEventDto as SSERunEventDto } from "./sse/client.js";
82
- export type { AddMessageRequest, AgentBundle, Agent as AgentSchema, BatchRunResponse, CancelRunResponse, CheckpointDetail, CheckpointListResponse, CreateAgentRequest, CreateCredentialRequest, CreateCronJobRequest, CreateDatasetRequest, CreateExperimentRequest, CreatePresignedUploadRequest, CreatePromptRequest, CreatePromptVersionRequest, InviteMemberRequest, PresignedUploadResponse, ProblemDetails, ReplayRequest, RunDetailResponse, RunResponse, ThreadRequest, ThreadSearchRequest, UpdateAgentRequest, UpdateCredentialRequest, UpdateCronJobRequest, UpdateMemberRequest, VectorQueryRequest, VectorQueryResponse, VectorStoreResponse, WaitRunResponse } from "./client/raw.js";
35
+ export { createClient, type AgentOsClient as GeneratedClient, type ClientOptions, type Schema } from "./generated/client.js";
36
+ export type { paths, components } from "./generated/openapi.js";
37
+ export { AgentOsClient } from "./client/AgentOsClient.js";
38
+ export type { AgentOsClientOptions, AuthProvider } from "./client/auth.js";
39
+ export { AgentOsError, NetworkError, TimeoutError, ValidationError, UnauthorizedError, ForbiddenError, NotFoundError, ConflictError, RateLimitError, ServerError, isAuthError, isRetryableError, } from "./errors/index.js";
40
+ export { withRetry } from "./client/retry.js";
41
+ export { paginate, collectAll, getFirst } from "./client/pagination.js";
42
+ export type CommitGraphSpecRequest = import("./generated/openapi.js").components["schemas"]["CommitGraphSpecRequest"];
43
+ export type CommitGraphSpecResponse = import("./generated/openapi.js").components["schemas"]["CommitGraphSpecResponse"];
44
+ export type GetGraphSpecResponse = import("./generated/openapi.js").components["schemas"]["GetGraphSpecResponse"];
45
+ export type { Agent } from "./modules/agents.js";
46
+ export type { RunEvent, RunEventDto, FollowEvent, FollowOptions } from "./modules/runs.js";
47
+ export type { Thread, ThreadMessage, ThreadState } from "./modules/threads.js";
48
+ export type { Trigger } from "./modules/triggers.js";
49
+ export type { Credential } from "./modules/credentials.js";
50
+ export type { BuilderChatRequest, BuilderChatResponse, BuilderStreamEvent, GraphUpdateAction } from "./modules/builder.js";
51
+ export type { Member, Role } from "./modules/members.js";
52
+ export type { Workspace } from "./modules/workspaces.js";
53
+ export type { Tenant } from "./modules/tenants.js";
54
+ export type { StoredFile } from "./modules/files.js";
55
+ export type { EvalDataset, Experiment } from "./modules/evaluation.js";
56
+ export type { Prompt } from "./modules/prompts.js";
57
+ export type { Trace, Span } from "./modules/traces.js";
58
+ export type { CronJob } from "./modules/crons.js";
59
+ export type { DlqMessage } from "./modules/dlq.js";
60
+ export type { VectorStore } from "./modules/vectorStores.js";
61
+ export type { AuditLogEntry } from "./modules/audit.js";
62
+ export type { ServerCapabilities } from "./modules/info.js";
63
+ export type { Checkpoint } from "./modules/checkpoints.js";
64
+ export type { Tool } from "./modules/tools.js";
65
+ export type { SSEEvent, SSEOptions } from "./sse/client.js";
66
+ export type { APIResponse } from "./client/raw.js";
83
67
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAKH,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGxG,OAAO,EACH,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,YAAY,EAC/E,KAAK,OAAO,EACf,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EACH,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,MAAM,EACtF,KAAK,SAAS,EACjB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAEH,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EACxF,WAAW,EAAE,YAAY,EAEzB,iBAAiB,EAAE,eAAe,EAElC,cAAc,EAAE,WAAW,EAC3B,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,KAAK,YAAY,EAEjE,KAAK,UAAU,EAClB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;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C,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -1,117 +1,51 @@
1
1
  /**
2
- * Agent OS SDK - Fully Typed
2
+ * Agent OS SDK
3
3
  *
4
- * Internal typed SDK for Agent OS platform.
5
- * All API calls are fully typed from OpenAPI specification.
4
+ * Two APIs available:
6
5
  *
7
- * @example
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)
8
10
  * ```ts
9
- * import { AgentOsClient, unwrap } from "@agent-os/sdk";
11
+ * import { createClient, type paths, type Schema } from "@agent-os-sdk/client";
12
+ *
13
+ * const api = createClient({
14
+ * baseUrl: "https://api.example.com",
15
+ * headers: { Authorization: `Bearer ${token}` }
16
+ * });
10
17
  *
11
- * const api = new AgentOsClient({
12
- * baseUrl: import.meta.env.VITE_API_URL,
13
- * tenantId: auth.tenantId,
14
- * workspaceId: auth.workspaceId,
15
- * token: auth.token,
18
+ * const { data } = await api.POST("/v1/api/graph/commit", {
19
+ * body: { agent_id: "...", graph_spec: {...} }
16
20
  * });
21
+ * ```
17
22
  *
18
- * // Style 1: Handle response manually
19
- * const { data, error } = await api.agents.list();
20
- * if (data) {
21
- * data.items.forEach(agent => console.log(agent.name));
22
- * }
23
+ * @example Custom Client (existing, has auth + ergonomic modules)
24
+ * ```ts
25
+ * import { AgentOsClient } from "@agent-os-sdk/client";
23
26
  *
24
- * // Style 2: Unwrap (throws on error, returns data directly)
25
- * const agents = await unwrap(api.agents.list());
26
- * agents.items.forEach(agent => console.log(agent.name));
27
+ * const client = new AgentOsClient({
28
+ * baseUrl: "https://api.example.com",
29
+ * auth: { type: "jwt", getToken: () => token, getWorkspaceId: () => wsId }
30
+ * });
27
31
  *
28
- * // Streaming
29
- * for await (const event of api.runs.createAndStream({
30
- * agent_id: "...",
31
- * input: { message: "Hello" },
32
- * })) {
33
- * console.log(event);
34
- * }
32
+ * const { data } = await client.graphs.commit({ agent_id: "...", graph_spec: {...} });
35
33
  * ```
36
34
  */
37
- // ============================================================================
38
- // Main Client
39
- // ============================================================================
35
+ // ============================================================
36
+ // 1. AUTO-GENERATED CLIENT (openapi-fetch)
37
+ // ============================================================
38
+ export { createClient } from "./generated/client.js";
39
+ // ============================================================
40
+ // 2. CUSTOM CLIENT (AgentOsClient with modules)
41
+ // ============================================================
40
42
  export { AgentOsClient } from "./client/AgentOsClient.js";
41
- // Auth Provider Types
42
- export { isApiToken, isApiTokenAuth, isBrowser, isJwtAuth, isJwtToken } from "./client/auth.js";
43
- // ============================================================================
44
- // Helpers & Utilities
45
- // ============================================================================
46
- export { SDKError, toResult, unwrap } from "./client/helpers.js";
47
- // ============================================================================
48
- // Typed Errors (Enterprise)
49
- // ============================================================================
50
- export {
51
- // Base class
52
- AgentOsError, ConflictError, ForbiddenError, NetworkError, NotFoundError, RateLimitError, ServerError, TimeoutError,
53
- // Error classes
54
- UnauthorizedError, ValidationError,
55
- // Type guards
56
- isAgentOsError, isAuthError, isClientError, isRetryableError, isServerError } from "./errors/index.js";
57
- export { createErrorFromResponse } from "./errors/factory.js";
58
- // ============================================================================
59
- // Network Configuration
60
- // ============================================================================
61
- export { BACKGROUND_NETWORK_CONFIG, DEFAULT_NETWORK_CONFIG, INTERACTIVE_NETWORK_CONFIG, mergeNetworkConfig } from "./client/config.js";
62
- // ============================================================================
63
- // Retry & Timeout Utilities
64
- // ============================================================================
65
- export { sleep, withRetry } from "./client/retry.js";
66
- export { createTimeoutController, withTimeout } from "./client/timeout.js";
67
- // ============================================================================
68
- // Pagination Utilities
69
- // ============================================================================
70
- export { collectAll, getFirst, paginate } from "./client/pagination.js";
71
- // ============================================================================
72
- // Raw Client & Core Types
73
- // ============================================================================
74
- export { createRawClient, createTypedClient } from "./client/raw.js";
75
- // ============================================================================
76
- // Module Classes
77
- // ============================================================================
78
- // Core modules
79
- export { AgentsModule } from "./modules/agents.js";
80
- export { BuilderModule } from "./modules/builder.js";
81
- export { CredentialsModule } from "./modules/credentials.js";
82
- export { KnowledgeModule } from "./modules/knowledge.js";
83
- export { MembersModule } from "./modules/members.js";
84
- export { RunsModule } from "./modules/runs.js";
85
- export { TenantsModule } from "./modules/tenants.js";
86
- export { ThreadsModule } from "./modules/threads.js";
87
- export { ToolsModule } from "./modules/tools.js";
88
- export { TriggersModule } from "./modules/triggers.js";
89
- export { WorkspacesModule } from "./modules/workspaces.js";
90
- // Platform modules
91
- export { A2aModule } from "./modules/a2a.js";
92
- export { AuditModule } from "./modules/audit.js";
93
- export { CatalogModule } from "./modules/catalog.js";
94
- export { CheckpointsModule } from "./modules/checkpoints.js";
95
- export { CronsModule } from "./modules/crons.js";
96
- export { DlqModule } from "./modules/dlq.js";
97
- export { EvaluationModule } from "./modules/evaluation.js";
98
- export { FilesModule } from "./modules/files.js";
99
- export { GraphsModule } from "./modules/graphs.js";
100
- export { InfoModule } from "./modules/info.js";
101
- export { McpModule } from "./modules/mcp.js";
102
- export { MeModule } from "./modules/me.js";
103
- export { MetricsModule } from "./modules/metrics.js";
104
- export { PlaygroundModule } from "./modules/playground.js";
105
- export { PromptsModule } from "./modules/prompts.js";
106
- export { StoreModule } from "./modules/store.js";
107
- export { TracesModule } from "./modules/traces.js";
108
- export { UsageModule } from "./modules/usage.js";
109
- export { VectorStoresModule } from "./modules/vectorStores.js";
110
- // Approvals is real (has backend implementation)
111
- export { ApprovalsModule } from "./modules/approvals.js";
112
- export { ApiTokensModule } from "./modules/apiTokens.js";
113
- export { MembershipsModule } from "./modules/memberships.js";
114
- // ============================================================================
115
- // SSE Streaming
116
- // ============================================================================
117
- export { parseSSE, streamSSE } from "./sse/client.js";
43
+ // ============================================================
44
+ // Errors
45
+ // ============================================================
46
+ export { AgentOsError, NetworkError, TimeoutError, ValidationError, UnauthorizedError, ForbiddenError, NotFoundError, ConflictError, RateLimitError, ServerError, isAuthError, isRetryableError, } from "./errors/index.js";
47
+ // ============================================================
48
+ // Utilities
49
+ // ============================================================
50
+ export { withRetry } from "./client/retry.js";
51
+ export { paginate, collectAll, getFirst } from "./client/pagination.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-os-sdk/client",
3
- "version": "0.5.3",
3
+ "version": "0.7.0",
4
4
  "description": "Official TypeScript SDK for Agent OS platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Agent OS SDK - 100% Auto-Generated Client
3
+ *
4
+ * This client is fully generated from the OpenAPI specification.
5
+ * NO manual types, NO manual endpoints - everything comes from swagger.json.
6
+ */
7
+
8
+ // Re-export the generated types
9
+ export type { paths, components } from "./openapi.js";
10
+
11
+ // Re-export openapi-fetch createClient
12
+ import _createClient, { type ClientOptions as OpenapiClientOptions } from "openapi-fetch";
13
+ import type { paths } from "./openapi.js";
14
+
15
+ export type ClientOptions = OpenapiClientOptions & {
16
+ baseUrl: string;
17
+ };
18
+
19
+ /**
20
+ * Create a fully typed API client.
21
+ * All endpoints and types are auto-generated from OpenAPI spec.
22
+ */
23
+ export function createClient(options: ClientOptions) {
24
+ return _createClient<paths>(options);
25
+ }
26
+
27
+ // Type alias for the generated client
28
+ export type AgentOsClient = ReturnType<typeof createClient>;
29
+
30
+ // Convenience type for extracting schema types
31
+ export type Schema<T extends keyof import("./openapi.js").components["schemas"]> =
32
+ import("./openapi.js").components["schemas"][T];
package/src/index.ts CHANGED
@@ -1,211 +1,109 @@
1
1
  /**
2
- * Agent OS SDK - Fully Typed
2
+ * Agent OS SDK
3
3
  *
4
- * Internal typed SDK for Agent OS platform.
5
- * All API calls are fully typed from OpenAPI specification.
4
+ * Two APIs available:
6
5
  *
7
- * @example
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)
8
10
  * ```ts
9
- * import { AgentOsClient, unwrap } from "@agent-os/sdk";
11
+ * import { createClient, type paths, type Schema } from "@agent-os-sdk/client";
10
12
  *
11
- * const api = new AgentOsClient({
12
- * baseUrl: import.meta.env.VITE_API_URL,
13
- * tenantId: auth.tenantId,
14
- * workspaceId: auth.workspaceId,
15
- * token: auth.token,
13
+ * const api = createClient({
14
+ * baseUrl: "https://api.example.com",
15
+ * headers: { Authorization: `Bearer ${token}` }
16
16
  * });
17
17
  *
18
- * // Style 1: Handle response manually
19
- * const { data, error } = await api.agents.list();
20
- * if (data) {
21
- * data.items.forEach(agent => console.log(agent.name));
22
- * }
18
+ * const { data } = await api.POST("/v1/api/graph/commit", {
19
+ * body: { agent_id: "...", graph_spec: {...} }
20
+ * });
21
+ * ```
23
22
  *
24
- * // Style 2: Unwrap (throws on error, returns data directly)
25
- * const agents = await unwrap(api.agents.list());
26
- * agents.items.forEach(agent => console.log(agent.name));
23
+ * @example Custom Client (existing, has auth + ergonomic modules)
24
+ * ```ts
25
+ * import { AgentOsClient } from "@agent-os-sdk/client";
27
26
  *
28
- * // Streaming
29
- * for await (const event of api.runs.createAndStream({
30
- * agent_id: "...",
31
- * input: { message: "Hello" },
32
- * })) {
33
- * console.log(event);
34
- * }
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: {...} });
35
33
  * ```
36
34
  */
37
35
 
38
- // ============================================================================
39
- // Main Client
40
- // ============================================================================
41
- export { AgentOsClient, type AgentOsClientOptions, type AuthProvider } from "./client/AgentOsClient.js";
42
-
43
- // Auth Provider Types
44
- export {
45
- isApiToken, isApiTokenAuth, isBrowser, isJwtAuth, isJwtToken, type ApiTokenAuth,
46
- type JwtAuth
47
- } from "./client/auth.js";
48
-
49
- // ============================================================================
50
- // Helpers & Utilities
51
- // ============================================================================
52
- export {
53
- SDKError, toResult, unwrap, type PaginatedResponse, type PaginationParams, type Result,
54
- type Unwrapped
55
- } from "./client/helpers.js";
56
-
57
- // ============================================================================
58
- // Typed Errors (Enterprise)
59
- // ============================================================================
60
- export {
61
- // Base class
62
- AgentOsError, ConflictError, ForbiddenError, NetworkError, NotFoundError, RateLimitError,
63
- ServerError, TimeoutError,
64
- // Error classes
65
- UnauthorizedError, ValidationError,
66
- // Type guards
67
- isAgentOsError, isAuthError,
68
- isClientError, isRetryableError, isServerError, type ErrorOptions,
69
- // Field errors
70
- type FieldError
71
- } from "./errors/index.js";
72
-
73
- export { createErrorFromResponse } from "./errors/factory.js";
36
+ // ============================================================
37
+ // 1. AUTO-GENERATED CLIENT (openapi-fetch)
38
+ // ============================================================
74
39
 
75
- // ============================================================================
76
- // Network Configuration
77
- // ============================================================================
78
- export {
79
- BACKGROUND_NETWORK_CONFIG, DEFAULT_NETWORK_CONFIG,
80
- INTERACTIVE_NETWORK_CONFIG, mergeNetworkConfig, type NetworkConfig, type RetryConfig
81
- } from "./client/config.js";
40
+ export { createClient, type AgentOsClient as GeneratedClient, type ClientOptions, type Schema } from "./generated/client.js";
41
+ export type { paths, components } from "./generated/openapi.js";
82
42
 
83
- // ============================================================================
84
- // Retry & Timeout Utilities
85
- // ============================================================================
86
- export { sleep, withRetry, type RetryContext } from "./client/retry.js";
87
- export { createTimeoutController, withTimeout } from "./client/timeout.js";
43
+ // ============================================================
44
+ // 2. CUSTOM CLIENT (AgentOsClient with modules)
45
+ // ============================================================
88
46
 
89
- // ============================================================================
90
- // Pagination Utilities
91
- // ============================================================================
92
- export {
93
- collectAll,
94
- getFirst, paginate, type CursorPaginatedResponse, type CursorParams, type OffsetPaginatedResponse, type OffsetParams, type PaginateOptions
95
- } from "./client/pagination.js";
47
+ export { AgentOsClient } from "./client/AgentOsClient.js";
48
+ export type { AgentOsClientOptions, AuthProvider } from "./client/auth.js";
96
49
 
50
+ // ============================================================
51
+ // Errors
52
+ // ============================================================
97
53
 
98
- // ============================================================================
99
- // Raw Client & Core Types
100
- // ============================================================================
101
54
  export {
102
- createRawClient,
103
- createTypedClient, type APIResponse, type ClientOptions, type HookErrorContext, type HookRequestContext,
104
- type HookResponseContext, type RawClient,
105
- // SDK Hooks for observability (OTEL, Sentry, etc.)
106
- type SDKHooks, type TypedClient
107
- } from "./client/raw.js";
108
-
109
- // Export OpenAPI types
110
- export type { components, paths } from "./client/raw.js";
111
-
112
- // ============================================================================
113
- // Module Classes
114
- // ============================================================================
115
-
116
- // Core modules
117
- export { AgentsModule, type Agent, type AgentGraphResponse, type AgentListResponse } from "./modules/agents.js";
118
- export { BuilderModule, type BuilderChatRequest, type BuilderChatResponse, type BuilderStreamEvent, type GraphUpdateAction, type HintModel, type HintTargetModel, type HintDataModel } from "./modules/builder.js";
119
- export { CredentialsModule, type Credential, type CredentialListResponse, type CredentialType } from "./modules/credentials.js";
120
- export { KnowledgeModule, type KnowledgeDataset, type KnowledgeSearchResponse } from "./modules/knowledge.js";
121
- export { MembersModule, type Member, type MemberListResponse, type Role } from "./modules/members.js";
122
- export { RunsModule, type CreateRunResponse, type FollowEvent, type FollowOptions, type Run, type RunEvent, type RunEventDto, type RunEventsPollResponse, type RunEventsResponse, type RunListResponse, type RunStatus } from "./modules/runs.js";
123
- export { TenantsModule, type Tenant } from "./modules/tenants.js";
124
- export { ThreadsModule, type Thread, type ThreadListResponse, type ThreadMessage, type ThreadMessagesResponse, type ThreadRun, type ThreadState } from "./modules/threads.js";
125
- export { ToolsModule, type Tool, type ToolListResponse } from "./modules/tools.js";
126
- export { TriggersModule, type Trigger, type TriggerListResponse } from "./modules/triggers.js";
127
- export { WorkspacesModule, type Workspace, type WorkspaceListResponse } from "./modules/workspaces.js";
128
-
129
- // Platform modules
130
- export { A2aModule, type A2aAgentCard, type JsonRpcRequest, type JsonRpcResponse } from "./modules/a2a.js";
131
- export { AuditModule, type AuditListResponse, type AuditLogEntry } from "./modules/audit.js";
132
- export { CatalogModule, type CatalogVersions, type NodeCatalogResponse, type NodeDefinition, type ToolCatalogResponse, type ToolDefinition, type TriggerCatalogResponse, type TriggerTemplate } from "./modules/catalog.js";
133
- export { CheckpointsModule, type Checkpoint, type CheckpointsResponse } from "./modules/checkpoints.js";
134
- export { CronsModule, type CronJob, type CronJobListResponse } from "./modules/crons.js";
135
- export { DlqModule, type DlqListResponse, type DlqMessage } from "./modules/dlq.js";
136
- export { EvaluationModule, type EvalDataset, type ExampleData, type Experiment } from "./modules/evaluation.js";
137
- export { FilesModule, type FileListResponse, type PresignedUpload, type StoredFile } from "./modules/files.js";
138
- export {
139
- GraphsModule,
140
- type GraphsGetResponse,
141
- type GraphsCommitRequest,
142
- type GraphsCommitResponse,
143
- type GraphsConflictPayload,
144
- type GraphsRevisionsListResponse,
145
- type GraphsRevisionResponse,
146
- type GraphsValidateRequest,
147
- type GraphsValidateResponse,
148
- type GraphsIntrospectRequest,
149
- type GraphsIntrospectResponse,
150
- type GraphsValidationMessage,
151
- type GraphsValidationResult
152
- } from "./modules/graphs.js";
153
- export { InfoModule, type ServerCapabilities, type ServerInfo } from "./modules/info.js";
154
- export { McpModule, type McpServer } from "./modules/mcp.js";
155
- export { MeModule, type MeResponse } from "./modules/me.js";
156
- export { MetricsModule, type MetricsResponse } from "./modules/metrics.js";
157
- export { PlaygroundModule, type PlaygroundSession } from "./modules/playground.js";
158
- export { PromptsModule, type Prompt, type PromptListResponse, type PromptVersion } from "./modules/prompts.js";
159
- export { StoreModule, type StoreValue } from "./modules/store.js";
160
- export { TracesModule, type FeedbackRequest, type Span, type SpanData, type Trace, type TraceListResponse } from "./modules/traces.js";
161
- export { UsageModule, type UsageQuota, type UsageResponse } from "./modules/usage.js";
162
- export { VectorStoresModule, type VectorQueryResult, type VectorStore, type VectorStoreListResponse } from "./modules/vectorStores.js";
163
-
164
- // Approvals is real (has backend implementation)
165
- export { ApprovalsModule, type Approval, type ApprovalDecision, type ApprovalListResponse, type ApprovalStatus, type ApprovalStatusResponse } from "./modules/approvals.js";
166
-
167
- export { ApiTokensModule, type ApiToken, type ApiTokenSecret, type CreateTokenRequest, type RotateTokenResponse } from "./modules/apiTokens.js";
168
- export { MembershipsModule, type EnsureMembershipRequest, type MembershipResponse } from "./modules/memberships.js";
169
-
170
- // ============================================================================
171
- // SSE Streaming
172
- // ============================================================================
173
- export { parseSSE, streamSSE, type RunSSEEvent, type RunStreamEvent, type SSEEvent, type SSEOptions, type RunEventDto as SSERunEventDto } from "./sse/client.js";
174
-
175
- // ============================================================================
176
- // Convenience Type Re-exports
177
- // ============================================================================
178
- export type {
179
- AddMessageRequest, AgentBundle,
180
- // Agent types
181
- Agent as AgentSchema, BatchRunResponse,
182
- CancelRunResponse,
183
- // Checkpoint types
184
- CheckpointDetail,
185
- CheckpointListResponse, CreateAgentRequest,
186
- // Credential types
187
- CreateCredentialRequest,
188
- // Cron types
189
- CreateCronJobRequest,
190
- // Evaluation types
191
- CreateDatasetRequest,
192
- CreateExperimentRequest,
193
- // File types
194
- CreatePresignedUploadRequest,
195
- // Prompt types
196
- CreatePromptRequest,
197
- CreatePromptVersionRequest,
198
- // Member types
199
- InviteMemberRequest, PresignedUploadResponse,
200
- // Error types
201
- ProblemDetails, ReplayRequest, RunDetailResponse,
202
- // Run types
203
- RunResponse,
204
- // Thread types
205
- ThreadRequest,
206
- ThreadSearchRequest, UpdateAgentRequest, UpdateCredentialRequest, UpdateCronJobRequest, UpdateMemberRequest, VectorQueryRequest,
207
- VectorQueryResponse,
208
- // Vector Store types
209
- VectorStoreResponse, WaitRunResponse
210
- } from "./client/raw.js";
55
+ AgentOsError,
56
+ NetworkError,
57
+ TimeoutError,
58
+ ValidationError,
59
+ UnauthorizedError,
60
+ ForbiddenError,
61
+ NotFoundError,
62
+ ConflictError,
63
+ RateLimitError,
64
+ ServerError,
65
+ isAuthError,
66
+ isRetryableError,
67
+ } from "./errors/index.js";
211
68
 
69
+ // ============================================================
70
+ // Utilities
71
+ // ============================================================
72
+
73
+ export { withRetry } from "./client/retry.js";
74
+ export { paginate, collectAll, getFirst } from "./client/pagination.js";
75
+
76
+ // ============================================================
77
+ // OpenAPI Types (use these for type-safe API calls)
78
+ // ============================================================
79
+
80
+ export type CommitGraphSpecRequest = import("./generated/openapi.js").components["schemas"]["CommitGraphSpecRequest"];
81
+ export type CommitGraphSpecResponse = import("./generated/openapi.js").components["schemas"]["CommitGraphSpecResponse"];
82
+ export type GetGraphSpecResponse = import("./generated/openapi.js").components["schemas"]["GetGraphSpecResponse"];
83
+
84
+ // ============================================================
85
+ // Module Types (legacy - from manual modules)
86
+ // ============================================================
87
+
88
+ export type { Agent } from "./modules/agents.js";
89
+ export type { RunEvent, RunEventDto, FollowEvent, FollowOptions } from "./modules/runs.js";
90
+ export type { Thread, ThreadMessage, ThreadState } from "./modules/threads.js";
91
+ export type { Trigger } from "./modules/triggers.js";
92
+ export type { Credential } from "./modules/credentials.js";
93
+ export type { BuilderChatRequest, BuilderChatResponse, BuilderStreamEvent, GraphUpdateAction } from "./modules/builder.js";
94
+ export type { Member, Role } from "./modules/members.js";
95
+ export type { Workspace } from "./modules/workspaces.js";
96
+ export type { Tenant } from "./modules/tenants.js";
97
+ export type { StoredFile } from "./modules/files.js";
98
+ export type { EvalDataset, Experiment } from "./modules/evaluation.js";
99
+ export type { Prompt } from "./modules/prompts.js";
100
+ export type { Trace, Span } from "./modules/traces.js";
101
+ export type { CronJob } from "./modules/crons.js";
102
+ export type { DlqMessage } from "./modules/dlq.js";
103
+ export type { VectorStore } from "./modules/vectorStores.js";
104
+ export type { AuditLogEntry } from "./modules/audit.js";
105
+ export type { ServerCapabilities } from "./modules/info.js";
106
+ export type { Checkpoint } from "./modules/checkpoints.js";
107
+ export type { Tool } from "./modules/tools.js";
108
+ export type { SSEEvent, SSEOptions } from "./sse/client.js";
109
+ export type { APIResponse } from "./client/raw.js";