@agent-os-sdk/client 0.9.20 → 0.9.22

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.
@@ -53,6 +53,48 @@ export interface GraphValidationResponse {
53
53
  warnings?: string[];
54
54
  }
55
55
 
56
+ export interface PublishPreviewIssue {
57
+ code: string;
58
+ message: string;
59
+ severity: string;
60
+ path?: string;
61
+ node_id?: string;
62
+ hint?: string;
63
+ }
64
+
65
+ export interface PublishPreviewValidationResult {
66
+ valid: boolean;
67
+ errors: PublishPreviewIssue[];
68
+ warnings: PublishPreviewIssue[];
69
+ }
70
+
71
+ export interface PublishPreviewCapabilityItem {
72
+ node_id: string;
73
+ capability_ref: string;
74
+ capability_version: string;
75
+ execution_binding: string;
76
+ required_credentials: string[];
77
+ }
78
+
79
+ export interface PublishPreviewBindingItem {
80
+ binding_key: string;
81
+ status: "bound" | "missing" | "ambiguous";
82
+ required_by_capabilities: string[];
83
+ credential_instance_refs: string[];
84
+ credential_type_refs: string[];
85
+ }
86
+
87
+ export interface PublishPreviewResponse {
88
+ agent_id: string;
89
+ draft_ir_revision: string;
90
+ ready: boolean;
91
+ validation_result: PublishPreviewValidationResult;
92
+ capabilities: PublishPreviewCapabilityItem[];
93
+ bindings: PublishPreviewBindingItem[];
94
+ blockers: PublishPreviewIssue[];
95
+ warnings: PublishPreviewIssue[];
96
+ }
97
+
56
98
  export interface AgentDraftIrResponse {
57
99
  id: string;
58
100
  name: string;
@@ -308,6 +350,13 @@ export class AgentsModule {
308
350
  });
309
351
  }
310
352
 
353
+ async getPublishPreview(agentId: string): Promise<APIResponse<PublishPreviewResponse>> {
354
+ return this.client.GET<PublishPreviewResponse>("/v1/api/agents/{id}/publish-preview", {
355
+ params: { path: { id: agentId } },
356
+ headers: this.headers(),
357
+ });
358
+ }
359
+
311
360
  // ======================== Draft IR ========================
312
361
 
313
362
  async getDraftIr(agentId: string): Promise<APIResponse<AgentDraftIrResponse>> {
@@ -33,6 +33,42 @@ export interface MetaAgentPatchProposal {
33
33
  ops: MetaAgentPatchOp[];
34
34
  }
35
35
 
36
+ export interface MetaAgentDiffPreview {
37
+ added_node_ids: string[];
38
+ removed_node_ids: string[];
39
+ updated_node_ids: string[];
40
+ added_edge_ids: string[];
41
+ removed_edge_ids: string[];
42
+ entrypoint_changed: boolean;
43
+ before_entrypoint?: string | null;
44
+ after_entrypoint?: string | null;
45
+ }
46
+
47
+ export interface MetaAgentBlastRadiusCredentialImpact {
48
+ required_credential: string;
49
+ status: "bound" | "missing";
50
+ binding_key?: string | null;
51
+ credential_instance_ref?: string | null;
52
+ credential_name?: string | null;
53
+ }
54
+
55
+ export interface MetaAgentBlastRadius {
56
+ affected_node_ids: string[];
57
+ affected_edge_ids: string[];
58
+ added_capabilities: string[];
59
+ removed_capabilities: string[];
60
+ changed_capabilities: string[];
61
+ impacted_credentials: MetaAgentBlastRadiusCredentialImpact[];
62
+ warnings: MetaAgentPreviewValidationIssue[];
63
+ }
64
+
65
+ export interface MetaAgentValidationResult {
66
+ valid: boolean;
67
+ preview_valid: boolean;
68
+ errors: MetaAgentPatchValidationIssue[];
69
+ warnings: MetaAgentPreviewValidationIssue[];
70
+ }
71
+
36
72
  export interface MetaAgentPatchProposalResponse {
37
73
  agent_id: string;
38
74
  draft_revision?: string | null;
@@ -41,11 +77,9 @@ export interface MetaAgentPatchProposalResponse {
41
77
  mode?: "chat" | "proposal";
42
78
  patch?: MetaAgentPatchProposal | null;
43
79
  preview_draft_ir?: Record<string, unknown> | null;
44
- preview_valid: boolean;
45
- preview_errors: MetaAgentPreviewValidationIssue[];
46
- preview_warnings: MetaAgentPreviewValidationIssue[];
47
- valid: boolean;
48
- errors: MetaAgentPatchValidationIssue[];
80
+ diff_preview?: MetaAgentDiffPreview | null;
81
+ blast_radius?: MetaAgentBlastRadius | null;
82
+ validation_result: MetaAgentValidationResult;
49
83
  message: string;
50
84
  }
51
85
 
@@ -87,6 +87,48 @@ export interface RunEventDto {
87
87
  root_operation_id: string;
88
88
  }
89
89
 
90
+ export interface RunInspectionResponse {
91
+ run: Record<string, unknown>;
92
+ replay: Record<string, unknown>;
93
+ failure: Record<string, unknown>;
94
+ attempts: Array<Record<string, unknown>>;
95
+ node_executions: Array<Record<string, unknown>>;
96
+ events: Array<Record<string, unknown>>;
97
+ }
98
+
99
+ export interface RunObservabilitySummaryResponse {
100
+ workspace_id: string;
101
+ agent_id?: string | null;
102
+ from?: string | null;
103
+ to?: string | null;
104
+ runs_total: number;
105
+ runs_completed: number;
106
+ runs_failed: number;
107
+ node_executions_total: number;
108
+ node_executions_failed: number;
109
+ retry_count: number;
110
+ replay_count: number;
111
+ handoff_count: number;
112
+ avg_run_latency_ms: number;
113
+ p95_run_latency_ms: number;
114
+ avg_node_latency_ms: number;
115
+ failure_rate: number;
116
+ top_error_categories: Array<{
117
+ error_category: string;
118
+ count: number;
119
+ }>;
120
+ }
121
+
122
+ export interface RunObservabilityCapabilityListResponse {
123
+ items: Array<Record<string, unknown>>;
124
+ count: number;
125
+ }
126
+
127
+ export interface RunObservabilityBindingListResponse {
128
+ items: Array<Record<string, unknown>>;
129
+ count: number;
130
+ }
131
+
90
132
  export class RunsModule {
91
133
  constructor(private client: RawClient) { }
92
134
 
@@ -139,6 +181,12 @@ export class RunsModule {
139
181
  });
140
182
  }
141
183
 
184
+ async getInspection(runId: string): Promise<APIResponse<RunInspectionResponse>> {
185
+ return this.client.GET<RunInspectionResponse>("/v1/api/runs/{runId}/inspection", {
186
+ params: { path: { runId } },
187
+ });
188
+ }
189
+
142
190
  /**
143
191
  * List runs with optional filters.
144
192
  */
@@ -243,6 +291,40 @@ export class RunsModule {
243
291
  });
244
292
  }
245
293
 
294
+ async getObservabilitySummary(params?: {
295
+ agent_id?: string;
296
+ from?: string;
297
+ to?: string;
298
+ }): Promise<APIResponse<RunObservabilitySummaryResponse>> {
299
+ return this.client.GET<RunObservabilitySummaryResponse>("/v1/api/runs/observability/summary", {
300
+ params: { query: params },
301
+ });
302
+ }
303
+
304
+ async getObservabilityCapabilities(params?: {
305
+ agent_id?: string;
306
+ from?: string;
307
+ to?: string;
308
+ limit?: number;
309
+ offset?: number;
310
+ }): Promise<APIResponse<RunObservabilityCapabilityListResponse>> {
311
+ return this.client.GET<RunObservabilityCapabilityListResponse>("/v1/api/runs/observability/capabilities", {
312
+ params: { query: params },
313
+ });
314
+ }
315
+
316
+ async getObservabilityBindings(params?: {
317
+ agent_id?: string;
318
+ from?: string;
319
+ to?: string;
320
+ limit?: number;
321
+ offset?: number;
322
+ }): Promise<APIResponse<RunObservabilityBindingListResponse>> {
323
+ return this.client.GET<RunObservabilityBindingListResponse>("/v1/api/runs/observability/bindings", {
324
+ params: { query: params },
325
+ });
326
+ }
327
+
246
328
  /**
247
329
  * Resume a run waiting for human input (HITL).
248
330
  * After the run reaches status 'waiting_for_human', use this to provide