@agent-os-sdk/client 0.9.18 → 0.9.20

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
@@ -50,10 +50,11 @@ export interface NodeCatalogResponse extends CatalogMetadata {
50
50
  }
51
51
 
52
52
  export interface NodeDefinition {
53
- capability_ref?: string;
54
- capability_version?: string;
55
- execution_binding?: string;
56
- kind: string;
53
+ capability_ref: string;
54
+ capability_version: string;
55
+ execution_binding: string;
56
+ required_credentials: string[];
57
+ kind: string; // visual hint only
57
58
  title: string;
58
59
  category: string;
59
60
  description?: string;
@@ -68,14 +69,17 @@ export interface ToolCatalogResponse extends CatalogMetadata {
68
69
  }
69
70
 
70
71
  export interface ToolDefinition {
71
- slug: string;
72
+ capability_ref: string;
73
+ capability_version: string;
74
+ execution_binding: string;
75
+ slug?: string; // compatibility/display only
76
+ required_credentials: string[];
72
77
  name: string;
73
78
  description?: string;
74
79
  type: string;
75
80
  version?: number;
76
81
  input_schema?: Record<string, unknown>;
77
82
  output_schema?: Record<string, unknown>;
78
- credential_requirements?: unknown[];
79
83
  }
80
84
 
81
85
  export interface TriggerCatalogResponse extends CatalogMetadata {
@@ -83,8 +87,10 @@ export interface TriggerCatalogResponse extends CatalogMetadata {
83
87
  }
84
88
 
85
89
  export interface TriggerTemplate {
86
- slug: string;
87
- kind: string;
90
+ capability_ref: string;
91
+ capability_version: string;
92
+ slug?: string; // compatibility/display only
93
+ kind: string; // visual hint only
88
94
  description?: string;
89
95
  run_input_schema?: Record<string, unknown>;
90
96
  }
@@ -107,9 +113,39 @@ export class CatalogModule {
107
113
  constructor(private client: RawClient) { }
108
114
 
109
115
  async getPalette(version: string = "1"): Promise<APIResponse<PaletteCatalogResponse>> {
110
- return this.client.GET<PaletteCatalogResponse>("/v1/api/catalog/palette", {
111
- params: { query: { version } },
112
- });
116
+ const [nodesRes, toolsRes, triggersRes, presetsRes] = await Promise.all([
117
+ this.getNodes(version),
118
+ this.getTools(version),
119
+ this.getTriggers(version),
120
+ this.getPresets(version),
121
+ ]);
122
+
123
+ const fallbackResponse =
124
+ nodesRes.response || toolsRes.response || triggersRes.response || presetsRes.response;
125
+
126
+ if (nodesRes.error || toolsRes.error || triggersRes.error || presetsRes.error) {
127
+ return {
128
+ data: undefined,
129
+ error:
130
+ nodesRes.error ||
131
+ toolsRes.error ||
132
+ triggersRes.error ||
133
+ presetsRes.error || { code: "NOT_FOUND", message: "Palette catalog is unavailable" },
134
+ response: fallbackResponse,
135
+ };
136
+ }
137
+
138
+ return {
139
+ data: {
140
+ version,
141
+ nodes: nodesRes.data?.nodes || [],
142
+ tools: toolsRes.data?.tools || [],
143
+ triggers: triggersRes.data?.templates || [],
144
+ presets: presetsRes.data?.presets || [],
145
+ },
146
+ error: undefined,
147
+ response: fallbackResponse,
148
+ };
113
149
  }
114
150
 
115
151
  /**
@@ -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,
@@ -17,7 +17,8 @@ export interface MetaAgentPreviewValidationIssue {
17
17
  export interface MetaAgentPatchOp {
18
18
  op: string;
19
19
  node_id?: string | null;
20
- kind?: string | null;
20
+ capability_ref?: string | null;
21
+ capability_version?: string | null;
21
22
  label?: string | null;
22
23
  data?: Record<string, unknown> | null;
23
24
  set?: Record<string, unknown> | null;
@@ -37,6 +38,7 @@ export interface MetaAgentPatchProposalResponse {
37
38
  draft_revision?: string | null;
38
39
  draft_etag: string;
39
40
  source_contract: "agent_ir.v1";
41
+ mode?: "chat" | "proposal";
40
42
  patch?: MetaAgentPatchProposal | null;
41
43
  preview_draft_ir?: Record<string, unknown> | null;
42
44
  preview_valid: boolean;
@@ -62,6 +64,14 @@ export interface MetaAgentApplyPatchResponse {
62
64
  export class MetaAgentModule {
63
65
  constructor(private client: RawClient, private headers: () => Record<string, string>) {}
64
66
 
67
+ async chat(agentId: string, message: string): Promise<APIResponse<MetaAgentPatchProposalResponse>> {
68
+ return this.client.POST<MetaAgentPatchProposalResponse>("/v1/api/agents/{id}/meta-agent/chat", {
69
+ params: { path: { id: agentId } },
70
+ headers: this.headers(),
71
+ body: { message },
72
+ });
73
+ }
74
+
65
75
  async propose(agentId: string, instruction: string): Promise<APIResponse<MetaAgentPatchProposalResponse>> {
66
76
  return this.client.POST<MetaAgentPatchProposalResponse>("/v1/api/agents/{id}/meta-agent/proposals", {
67
77
  params: { path: { id: agentId } },
@@ -9,7 +9,7 @@ export interface AgentTemplateConfig {
9
9
  llm?: {
10
10
  credential_id?: string;
11
11
  model?: string;
12
- system_prompt?: string;
12
+ instructions?: string;
13
13
  };
14
14
  bindings?: Array<{
15
15
  credential_id: string;
@@ -108,6 +108,7 @@ function generateAgentIr(config: AgentTemplateConfig): Record<string, unknown> {
108
108
  {
109
109
  id: "start",
110
110
  kind: "start",
111
+ capability_ref: "capability://agent-ir/start",
111
112
  label: triggerLabel,
112
113
  config: {},
113
114
  bindings: {},
@@ -116,6 +117,7 @@ function generateAgentIr(config: AgentTemplateConfig): Record<string, unknown> {
116
117
  {
117
118
  id: "draft_output",
118
119
  kind: "end",
120
+ capability_ref: "capability://agent-ir/end",
119
121
  label: outputLabel,
120
122
  config: {},
121
123
  bindings: {},
@@ -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
  }
@@ -20,17 +20,17 @@ export interface ToolListResponse {
20
20
  }
21
21
 
22
22
  export interface ToolDefinition {
23
- slug: string;
24
- capability_ref?: string;
25
- capability_version?: string;
26
- execution_binding?: string;
23
+ capability_ref: string;
24
+ capability_version: string;
25
+ execution_binding: string;
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,