@decocms/bindings 1.0.1-alpha.24 → 1.0.1-alpha.25
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.
- package/package.json +1 -1
- package/src/well-known/agent.ts +31 -13
package/package.json
CHANGED
package/src/well-known/agent.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Defines the interface for AI agent providers.
|
|
5
5
|
* Any MCP that implements this binding can provide configurable AI agents
|
|
6
|
-
* with
|
|
6
|
+
* with a system prompt and runtime configuration (gateway + model).
|
|
7
7
|
*
|
|
8
|
-
* This binding uses collection bindings for LIST and GET operations
|
|
8
|
+
* This binding uses collection bindings for LIST and GET operations.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { z } from "zod";
|
|
@@ -21,17 +21,35 @@ import {
|
|
|
21
21
|
* Base schema already includes: id, title, created_at, updated_at, created_by, updated_by
|
|
22
22
|
*/
|
|
23
23
|
export const AgentSchema = BaseCollectionEntitySchema.extend({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Agent avatar.
|
|
26
|
+
* Can be a regular URL or a data URI.
|
|
27
|
+
*/
|
|
28
|
+
avatar: z.string().describe("URL or data URI to the agent's avatar image"),
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* System prompt that defines the agent's behavior.
|
|
32
|
+
*/
|
|
33
|
+
system_prompt: z
|
|
27
34
|
.string()
|
|
28
|
-
.describe("System
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
.describe("System prompt that defines the agent's behavior"),
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Selected gateway for this agent (single gateway).
|
|
39
|
+
* This gateway determines which MCP tools are exposed to chat.
|
|
40
|
+
*/
|
|
41
|
+
gateway_id: z.string().describe("Gateway ID to use for this agent"),
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Selected model for this agent (model id + the connection where it lives).
|
|
45
|
+
* This allows the UI/runtime to call the correct model provider connection.
|
|
46
|
+
*/
|
|
47
|
+
model: z
|
|
48
|
+
.object({
|
|
49
|
+
id: z.string().describe("Model ID"),
|
|
50
|
+
connectionId: z.string().describe("Connection ID that provides the model"),
|
|
51
|
+
})
|
|
52
|
+
.describe("Selected model reference for this agent"),
|
|
35
53
|
});
|
|
36
54
|
|
|
37
55
|
/**
|
|
@@ -53,7 +71,7 @@ export const AGENTS_COLLECTION_BINDING = createCollectionBindings(
|
|
|
53
71
|
*
|
|
54
72
|
* Required tools:
|
|
55
73
|
* - COLLECTION_AGENT_LIST: List available AI agents with their configurations
|
|
56
|
-
* - COLLECTION_AGENT_GET: Get a single agent by ID (includes
|
|
74
|
+
* - COLLECTION_AGENT_GET: Get a single agent by ID (includes system_prompt, gateway_id, model)
|
|
57
75
|
*/
|
|
58
76
|
export const AGENTS_BINDING = [
|
|
59
77
|
...AGENTS_COLLECTION_BINDING,
|