@agent-os-sdk/client 0.9.19 → 0.9.21

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.
@@ -70,8 +70,8 @@ export interface AgentDraftIrResponse {
70
70
  }
71
71
 
72
72
  export interface UpsertAgentCredentialBindingRequest {
73
- credential_id: string;
74
- alias: string;
73
+ credential_instance_ref: string;
74
+ binding_key: string;
75
75
  priority?: number;
76
76
  }
77
77
 
@@ -79,9 +79,27 @@ export interface AgentCredentialBindingUpsertResponse {
79
79
  id: string;
80
80
  updated: boolean;
81
81
  agent_id: string;
82
- credential_id: string;
83
- alias: string;
82
+ binding_key: string;
84
83
  priority: number;
84
+ credential_instance_ref: string;
85
+ credential_type_ref: string;
86
+ credential_type_key: string;
87
+ }
88
+
89
+ export interface AgentCredentialBinding {
90
+ id: string;
91
+ agent_id: string;
92
+ binding_key: string;
93
+ priority: number;
94
+ credential_instance_ref: string;
95
+ credential_type_ref: string;
96
+ credential_type_key: string;
97
+ credential_name: string;
98
+ }
99
+
100
+ export interface AgentCredentialBindingListResponse {
101
+ items: AgentCredentialBinding[];
102
+ count: number;
85
103
  }
86
104
 
87
105
  export type AgentListResponse = PaginatedResponse<Agent>;
@@ -401,7 +419,7 @@ export class AgentsModule {
401
419
  }
402
420
 
403
421
  /**
404
- * Creates or updates an agent credential binding by alias.
422
+ * Creates or updates an agent credential binding by binding key.
405
423
  */
406
424
  async upsertCredentialBinding(
407
425
  agentId: string,
@@ -410,14 +428,26 @@ export class AgentsModule {
410
428
  return this.client.POST<AgentCredentialBindingUpsertResponse>("/v1/api/agents/{id}/credential-bindings", {
411
429
  params: { path: { id: agentId } },
412
430
  body: {
413
- credential_id: body.credential_id,
414
- alias: body.alias,
431
+ credential_instance_ref: body.credential_instance_ref,
432
+ binding_key: body.binding_key,
415
433
  priority: body.priority ?? 0,
416
434
  },
417
435
  headers: this.headers(),
418
436
  });
419
437
  }
420
438
 
439
+ /**
440
+ * Lists credential bindings for an agent.
441
+ */
442
+ async listCredentialBindings(
443
+ agentId: string
444
+ ): Promise<APIResponse<AgentCredentialBindingListResponse>> {
445
+ return this.client.GET<AgentCredentialBindingListResponse>("/v1/api/agents/{id}/credential-bindings", {
446
+ params: { path: { id: agentId } },
447
+ headers: this.headers(),
448
+ });
449
+ }
450
+
421
451
  }
422
452
 
423
453
  // Bundle manifest response type
@@ -53,6 +53,7 @@ export interface NodeDefinition {
53
53
  capability_ref: string;
54
54
  capability_version: string;
55
55
  execution_binding: string;
56
+ required_credentials: string[];
56
57
  kind: string; // visual hint only
57
58
  title: string;
58
59
  category: string;
@@ -72,13 +73,13 @@ export interface ToolDefinition {
72
73
  capability_version: string;
73
74
  execution_binding: string;
74
75
  slug?: string; // compatibility/display only
76
+ required_credentials: string[];
75
77
  name: string;
76
78
  description?: string;
77
79
  type: string;
78
80
  version?: number;
79
81
  input_schema?: Record<string, unknown>;
80
82
  output_schema?: Record<string, unknown>;
81
- credential_requirements?: unknown[];
82
83
  }
83
84
 
84
85
  export interface TriggerCatalogResponse extends CatalogMetadata {
@@ -9,10 +9,12 @@ type UpdateCredentialRequest = components["schemas"]["UpdateCredentialRequest"];
9
9
 
10
10
  export interface Credential {
11
11
  id: string;
12
+ credential_instance_ref?: string;
12
13
  name: string;
13
14
  scope: "workspace" | "tenant";
14
15
  type_id?: string;
15
16
  type?: string;
17
+ credential_type_ref?: string;
16
18
  workspace_id?: string;
17
19
  tenant_id: string;
18
20
  sharing_mode: "private" | "shared";
@@ -29,8 +31,14 @@ export interface CredentialListResponse {
29
31
  export interface CredentialType {
30
32
  id: string;
31
33
  name: string;
34
+ credential_type_ref?: string;
32
35
  display_name?: string;
33
36
  description?: string;
37
+ provider_family?: string;
38
+ version?: string;
39
+ status?: string;
40
+ masking_policy?: string;
41
+ materialization_policy?: string;
34
42
  schema_public_json?: Record<string, unknown> | null;
35
43
  schema_secret_json?: Record<string, unknown> | null;
36
44
  }
@@ -154,12 +162,20 @@ export class CredentialsModule {
154
162
  .map((item) => ({
155
163
  id: String(item.id ?? ""),
156
164
  name: String(item.name ?? item.key ?? ""),
165
+ credential_type_ref: typeof item.credential_type_ref === "string"
166
+ ? item.credential_type_ref
167
+ : undefined,
157
168
  display_name: typeof item.display_name === "string"
158
169
  ? item.display_name
159
170
  : typeof item.displayName === "string"
160
171
  ? item.displayName
161
172
  : undefined,
162
173
  description: typeof item.description === "string" ? item.description : undefined,
174
+ provider_family: typeof item.provider_family === "string" ? item.provider_family : undefined,
175
+ version: typeof item.version === "string" ? item.version : undefined,
176
+ status: typeof item.status === "string" ? item.status : undefined,
177
+ masking_policy: typeof item.masking_policy === "string" ? item.masking_policy : undefined,
178
+ materialization_policy: typeof item.materialization_policy === "string" ? item.materialization_policy : undefined,
163
179
  schema_public_json: item.schema_public_json && typeof item.schema_public_json === "object"
164
180
  ? item.schema_public_json as Record<string, unknown>
165
181
  : null,
@@ -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
 
@@ -9,7 +9,7 @@ export interface Tool {
9
9
  description?: string;
10
10
  category?: string;
11
11
  parameters?: Record<string, unknown>;
12
- required_credentials?: string[];
12
+ required_credentials: string[];
13
13
  is_builtin: boolean;
14
14
  created_at?: string;
15
15
  }
@@ -24,13 +24,13 @@ export interface ToolDefinition {
24
24
  capability_version: string;
25
25
  execution_binding: string;
26
26
  slug?: string; // compatibility/display only
27
+ required_credentials: string[];
27
28
  name: string;
28
29
  description?: string;
29
30
  type: string;
30
31
  version?: number;
31
32
  input_schema?: Record<string, unknown>;
32
33
  output_schema?: Record<string, unknown>;
33
- credential_requirements?: unknown[];
34
34
  }
35
35
 
36
36
  export interface ToolDefinitionsResponse {
@@ -14,7 +14,7 @@ export interface VectorStore {
14
14
  embedding_provider: string;
15
15
  embedding_model: string;
16
16
  dimension: number;
17
- credential_binding_alias?: string;
17
+ credential_binding_key?: string;
18
18
  file_count: number;
19
19
  created_at: string;
20
20
  }
@@ -54,7 +54,7 @@ export interface VectorStoreFilesResponse {
54
54
  type VectorStoreLike = VectorStoreResponse & {
55
55
  embeddingProvider?: string;
56
56
  embeddingModel?: string;
57
- credentialBindingAlias?: string;
57
+ credentialBindingKey?: string;
58
58
  fileCount?: number;
59
59
  createdAt?: string;
60
60
  };
@@ -71,7 +71,7 @@ function toVectorStore(item: VectorStoreLike): VectorStore {
71
71
  embedding_provider: item.embedding_provider ?? item.embeddingProvider ?? "",
72
72
  embedding_model: item.embedding_model ?? item.embeddingModel ?? "",
73
73
  dimension: item.dimension ?? 0,
74
- credential_binding_alias: item.credential_binding_alias ?? item.credentialBindingAlias ?? undefined,
74
+ credential_binding_key: item.credential_binding_key ?? item.credentialBindingKey ?? undefined,
75
75
  file_count: item.file_count ?? item.fileCount ?? 0,
76
76
  created_at: item.created_at ?? item.createdAt ?? "",
77
77
  };
@@ -143,7 +143,7 @@ export class VectorStoresModule {
143
143
  embedding_provider?: string;
144
144
  embedding_model?: string;
145
145
  dimension?: number;
146
- credential_binding_alias?: string;
146
+ credential_binding_key?: string;
147
147
  }): Promise<APIResponse<VectorStore>> {
148
148
  const response = await this.client.POST<VectorStoreResponse>("/v1/api/vector-stores", {
149
149
  body,