@agent-os-sdk/client 0.9.14 → 0.9.15

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.
Files changed (50) hide show
  1. package/dist/client/AgentOsClient.d.ts +8 -4
  2. package/dist/client/AgentOsClient.d.ts.map +1 -1
  3. package/dist/client/AgentOsClient.js +12 -6
  4. package/dist/errors/factory.d.ts +2 -0
  5. package/dist/errors/factory.d.ts.map +1 -1
  6. package/dist/errors/factory.js +5 -1
  7. package/dist/generated/openapi.d.ts +544 -744
  8. package/dist/generated/openapi.d.ts.map +1 -1
  9. package/dist/index.d.ts +8 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +8 -2
  12. package/dist/modules/agents.d.ts +25 -7
  13. package/dist/modules/agents.d.ts.map +1 -1
  14. package/dist/modules/agents.js +36 -7
  15. package/dist/modules/contracts.d.ts +48 -0
  16. package/dist/modules/contracts.d.ts.map +1 -0
  17. package/dist/modules/contracts.js +25 -0
  18. package/dist/modules/evaluation.d.ts +64 -0
  19. package/dist/modules/evaluation.d.ts.map +1 -1
  20. package/dist/modules/evaluation.js +12 -0
  21. package/dist/modules/improvements.d.ts +52 -0
  22. package/dist/modules/improvements.d.ts.map +1 -0
  23. package/dist/modules/improvements.js +27 -0
  24. package/dist/modules/metaAgent.d.ts +62 -0
  25. package/dist/modules/metaAgent.d.ts.map +1 -0
  26. package/dist/modules/metaAgent.js +25 -0
  27. package/dist/modules/presets.d.ts.map +1 -1
  28. package/dist/modules/presets.js +113 -44
  29. package/dist/modules/runs.d.ts +9 -0
  30. package/dist/modules/runs.d.ts.map +1 -1
  31. package/dist/modules/runs.js +14 -1
  32. package/dist/modules/templates.d.ts +28 -0
  33. package/dist/modules/templates.d.ts.map +1 -0
  34. package/dist/modules/templates.js +19 -0
  35. package/package.json +2 -2
  36. package/src/client/AgentOsClient.ts +12 -6
  37. package/src/errors/factory.ts +7 -2
  38. package/src/generated/openapi.ts +544 -744
  39. package/src/generated/swagger.json +551 -924
  40. package/src/index.ts +22 -2
  41. package/src/modules/agents.ts +62 -8
  42. package/src/modules/contracts.ts +80 -0
  43. package/src/modules/evaluation.ts +80 -0
  44. package/src/modules/improvements.ts +71 -0
  45. package/src/modules/metaAgent.ts +87 -0
  46. package/src/modules/presets.ts +118 -50
  47. package/src/modules/runs.ts +20 -1
  48. package/src/modules/templates.ts +40 -0
  49. package/src/modules/builder.ts +0 -456
  50. package/src/modules/graphs.ts +0 -188
@@ -1,188 +0,0 @@
1
- /**
2
- * Graphs Module - V2 Graph Specification Management
3
- *
4
- * Pure V2 contract - no legacy. All types namespaced with "Graphs" prefix.
5
- */
6
-
7
- import type { RawClient, APIResponse } from "../client/raw.js";
8
-
9
- // ============ Shared Types ============
10
-
11
- export interface GraphsValidationMessage {
12
- code: string;
13
- message: string;
14
- path?: string;
15
- node_id?: string;
16
- severity?: "error" | "warning";
17
- }
18
-
19
- export interface GraphsValidationResult {
20
- valid: boolean;
21
- errors?: GraphsValidationMessage[];
22
- }
23
-
24
- // ============ GET /v2/api/graph/{agentId} ============
25
-
26
- export interface GraphsGetResponse {
27
- agent_id: string;
28
- revision: string;
29
- canonical_spec: unknown;
30
- committed_at: string;
31
- warnings?: GraphsValidationMessage[];
32
- validation?: GraphsValidationResult;
33
- }
34
-
35
- // ============ POST /v2/api/graph/commit ============
36
-
37
- export interface GraphsCommitRequest {
38
- agent_id: string;
39
- graph_spec: unknown;
40
- expected_revision?: string;
41
- source?: string;
42
- }
43
-
44
- export type GraphsCommitStatus = "committed" | "no_change";
45
-
46
- export interface GraphsCommitResponse {
47
- status: GraphsCommitStatus;
48
- agent_id: string;
49
- revision: string;
50
- canonical_spec: unknown;
51
- committed_at: string;
52
- warnings?: GraphsValidationMessage[];
53
- validation?: GraphsValidationResult;
54
- }
55
-
56
- // 409 Conflict body (ProblemDetails.Extensions)
57
- // Envelope around GET response - agent_id lives in current.agent_id
58
- export interface GraphsConflictPayload {
59
- hint: "reload_and_retry";
60
- expected_revision: string;
61
- current: GraphsGetResponse;
62
- }
63
-
64
- // ============ GET /v2/api/graph/{agentId}/revisions ============
65
-
66
- export interface GraphsRevisionSummary {
67
- revision: string;
68
- created_at: string;
69
- source?: string;
70
- }
71
-
72
- export interface GraphsRevisionsListResponse {
73
- agent_id: string;
74
- revisions: GraphsRevisionSummary[];
75
- }
76
-
77
- // ============ GET /v2/api/graph/{agentId}/revisions/{revision} ============
78
-
79
- export interface GraphsRevisionResponse {
80
- revision: string;
81
- canonical_spec: unknown;
82
- created_at: string;
83
- source?: string;
84
- warnings?: GraphsValidationMessage[];
85
- validation?: GraphsValidationResult;
86
- }
87
-
88
- // ============ Validation (DP) ============
89
-
90
- export interface GraphsValidateRequest {
91
- graph_spec: unknown;
92
- normalize?: boolean;
93
- catalog_versions?: Record<string, string>;
94
- }
95
-
96
- export interface GraphsValidateResponse {
97
- valid: boolean;
98
- canonical_spec_json?: string;
99
- mermaid?: string;
100
- nodes?: string[];
101
- edges?: [string, string][];
102
- errors?: GraphsValidationMessage[];
103
- warnings?: GraphsValidationMessage[];
104
- }
105
-
106
- // ============ Introspection (DP) ============
107
-
108
- export interface GraphsIntrospectRequest {
109
- agent_id?: string;
110
- graph_spec?: unknown;
111
- catalog_versions?: Record<string, string>;
112
- }
113
-
114
- export interface GraphsIntrospectResponse {
115
- mermaid: string;
116
- nodes: string[];
117
- edges: [string, string][];
118
- type?: string;
119
- }
120
-
121
- // ============ Module ============
122
-
123
- export class GraphsModule {
124
- constructor(private client: RawClient, private headers: () => Record<string, string>) { }
125
-
126
- // ============ V2 Graph Spec (CP) ============
127
-
128
- /**
129
- * Get current graph spec by revision.
130
- * @returns 200 with graph spec, or 404 if not initialized
131
- */
132
- async get(agentId: string): Promise<APIResponse<GraphsGetResponse>> {
133
- return this.client.GET<GraphsGetResponse>(`/v1/api/graph/${agentId}`, {
134
- headers: this.headers(),
135
- });
136
- }
137
-
138
- /**
139
- * Commit graph spec atomically.
140
- * @returns 200 (committed/no_change), or 409 on conflict
141
- */
142
- async commit(request: GraphsCommitRequest): Promise<APIResponse<GraphsCommitResponse>> {
143
- return this.client.POST<GraphsCommitResponse>("/v1/api/graph/commit", {
144
- body: request,
145
- headers: this.headers(),
146
- });
147
- }
148
-
149
- /**
150
- * List revision history for an agent.
151
- */
152
- async listRevisions(agentId: string): Promise<APIResponse<GraphsRevisionsListResponse>> {
153
- return this.client.GET<GraphsRevisionsListResponse>(`/v1/api/graph/${agentId}/revisions`, {
154
- headers: this.headers(),
155
- });
156
- }
157
-
158
- /**
159
- * Get a specific revision.
160
- */
161
- async getRevision(agentId: string, revision: string): Promise<APIResponse<GraphsRevisionResponse>> {
162
- return this.client.GET<GraphsRevisionResponse>(`/v1/api/graph/${agentId}/revisions/${revision}`, {
163
- headers: this.headers(),
164
- });
165
- }
166
-
167
- // ============ Validation (DP proxy) ============
168
-
169
- /**
170
- * Validate a graph specification.
171
- */
172
- async validate(body: GraphsValidateRequest): Promise<APIResponse<GraphsValidateResponse>> {
173
- return this.client.POST<GraphsValidateResponse>("/v1/api/graphs/validate", {
174
- body,
175
- headers: this.headers(),
176
- });
177
- }
178
-
179
- /**
180
- * Introspect a graph structure.
181
- */
182
- async introspect(body: GraphsIntrospectRequest): Promise<APIResponse<GraphsIntrospectResponse>> {
183
- return this.client.POST<GraphsIntrospectResponse>("/v1/api/graphs/introspect", {
184
- body,
185
- headers: this.headers(),
186
- });
187
- }
188
- }