@contractspec/lib.ai-agent 1.61.0 → 2.0.0
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/dist/agent/agent-factory.d.ts +5 -1
- package/dist/agent/agent-factory.js +2293 -31
- package/dist/agent/agent.test.d.ts +0 -1
- package/dist/agent/contract-spec-agent.d.ts +6 -1
- package/dist/agent/contract-spec-agent.js +2292 -31
- package/dist/agent/index.d.ts +0 -1
- package/dist/agent/index.js +2408 -91
- package/dist/agent/json-runner.d.ts +1 -1
- package/dist/agent/json-runner.js +2326 -57
- package/dist/agent/json-runner.test.d.ts +0 -1
- package/dist/agent/unified-agent.d.ts +0 -1
- package/dist/agent/unified-agent.js +2374 -65
- package/dist/approval/index.d.ts +0 -1
- package/dist/approval/index.js +2122 -2
- package/dist/approval/workflow.d.ts +7 -2
- package/dist/approval/workflow.js +2122 -2
- package/dist/exporters/claude-agent-exporter.d.ts +0 -1
- package/dist/exporters/claude-agent-exporter.js +2144 -35
- package/dist/exporters/index.d.ts +0 -1
- package/dist/exporters/index.js +2193 -69
- package/dist/exporters/opencode-exporter.d.ts +0 -1
- package/dist/exporters/opencode-exporter.js +2152 -39
- package/dist/exporters/types.d.ts +0 -1
- package/dist/i18n/catalogs/en.d.ts +8 -0
- package/dist/i18n/catalogs/en.js +614 -0
- package/dist/i18n/catalogs/es.d.ts +8 -0
- package/dist/i18n/catalogs/es.js +663 -0
- package/dist/i18n/catalogs/fr.d.ts +8 -0
- package/dist/i18n/catalogs/fr.js +629 -0
- package/dist/i18n/catalogs/index.d.ts +8 -0
- package/dist/i18n/catalogs/index.js +1875 -0
- package/dist/i18n/i18n.test.d.ts +1 -0
- package/dist/i18n/index.d.ts +29 -0
- package/dist/i18n/index.js +2127 -0
- package/dist/i18n/keys.d.ts +552 -0
- package/dist/i18n/keys.js +188 -0
- package/dist/i18n/locale.d.ts +33 -0
- package/dist/i18n/locale.js +41 -0
- package/dist/i18n/messages.d.ts +65 -0
- package/dist/i18n/messages.js +1939 -0
- package/dist/index.d.ts +0 -13
- package/dist/index.js +2106 -3254
- package/dist/interop/index.d.ts +0 -1
- package/dist/interop/index.js +2182 -47
- package/dist/interop/spec-consumer.d.ts +0 -1
- package/dist/interop/spec-consumer.js +2151 -34
- package/dist/interop/tool-consumer.d.ts +0 -1
- package/dist/interop/tool-consumer.js +2122 -13
- package/dist/interop/types.d.ts +0 -1
- package/dist/knowledge/index.d.ts +0 -1
- package/dist/knowledge/index.js +2105 -7
- package/dist/knowledge/injector.d.ts +2 -3
- package/dist/knowledge/injector.js +2104 -7
- package/dist/memory/in-memory.d.ts +0 -1
- package/dist/memory/index.d.ts +0 -1
- package/dist/memory/manager.d.ts +0 -1
- package/dist/memory/memory.test.d.ts +0 -1
- package/dist/node/agent/agent-factory.js +2293 -31
- package/dist/node/agent/contract-spec-agent.js +2292 -31
- package/dist/node/agent/index.js +2408 -91
- package/dist/node/agent/json-runner.js +2326 -57
- package/dist/node/agent/unified-agent.js +2374 -65
- package/dist/node/approval/index.js +2122 -2
- package/dist/node/approval/workflow.js +2122 -2
- package/dist/node/exporters/claude-agent-exporter.js +2144 -35
- package/dist/node/exporters/index.js +2193 -69
- package/dist/node/exporters/opencode-exporter.js +2152 -39
- package/dist/node/i18n/catalogs/en.js +614 -0
- package/dist/node/i18n/catalogs/es.js +663 -0
- package/dist/node/i18n/catalogs/fr.js +629 -0
- package/dist/node/i18n/catalogs/index.js +1875 -0
- package/dist/node/i18n/index.js +2127 -0
- package/dist/node/i18n/keys.js +188 -0
- package/dist/node/i18n/locale.js +41 -0
- package/dist/node/i18n/messages.js +1939 -0
- package/dist/node/index.js +2106 -3254
- package/dist/node/interop/index.js +2182 -47
- package/dist/node/interop/spec-consumer.js +2151 -34
- package/dist/node/interop/tool-consumer.js +2122 -13
- package/dist/node/knowledge/index.js +2105 -7
- package/dist/node/knowledge/injector.js +2104 -7
- package/dist/node/providers/claude-agent-sdk/adapter.js +2143 -22
- package/dist/node/providers/claude-agent-sdk/index.js +2144 -22
- package/dist/node/providers/claude-agent-sdk/tool-bridge.js +2101 -3
- package/dist/node/providers/index.js +2182 -39
- package/dist/node/providers/opencode-sdk/adapter.js +2148 -27
- package/dist/node/providers/opencode-sdk/agent-bridge.js +2110 -10
- package/dist/node/providers/opencode-sdk/index.js +2149 -27
- package/dist/node/providers/opencode-sdk/tool-bridge.js +2101 -3
- package/dist/node/providers/registry.js +2094 -2
- package/dist/node/session/index.js +37 -2
- package/dist/node/session/store.js +37 -2
- package/dist/node/spec/index.js +2111 -7
- package/dist/node/spec/registry.js +2096 -2
- package/dist/node/spec/spec.js +2105 -5
- package/dist/node/telemetry/index.js +117 -1
- package/dist/node/telemetry/posthog-types.js +0 -0
- package/dist/node/telemetry/posthog.js +132 -0
- package/dist/node/tools/index.js +2117 -17
- package/dist/node/tools/knowledge-tool.js +2105 -11
- package/dist/node/tools/mcp-server.js +2101 -5
- package/dist/node/tools/tool-adapter.js +2093 -1
- package/dist/providers/claude-agent-sdk/adapter.d.ts +0 -1
- package/dist/providers/claude-agent-sdk/adapter.js +2143 -22
- package/dist/providers/claude-agent-sdk/index.d.ts +0 -1
- package/dist/providers/claude-agent-sdk/index.js +2144 -22
- package/dist/providers/claude-agent-sdk/session-bridge.d.ts +0 -1
- package/dist/providers/claude-agent-sdk/tool-bridge.d.ts +0 -1
- package/dist/providers/claude-agent-sdk/tool-bridge.js +2101 -3
- package/dist/providers/index.d.ts +0 -1
- package/dist/providers/index.js +2182 -39
- package/dist/providers/opencode-sdk/adapter.d.ts +0 -1
- package/dist/providers/opencode-sdk/adapter.js +2148 -27
- package/dist/providers/opencode-sdk/agent-bridge.d.ts +0 -1
- package/dist/providers/opencode-sdk/agent-bridge.js +2110 -10
- package/dist/providers/opencode-sdk/index.d.ts +0 -1
- package/dist/providers/opencode-sdk/index.js +2149 -27
- package/dist/providers/opencode-sdk/tool-bridge.d.ts +0 -1
- package/dist/providers/opencode-sdk/tool-bridge.js +2101 -3
- package/dist/providers/registry.d.ts +0 -1
- package/dist/providers/registry.js +2094 -2
- package/dist/providers/types.d.ts +0 -1
- package/dist/schema/index.d.ts +0 -1
- package/dist/schema/json-schema-to-zod.d.ts +0 -1
- package/dist/schema/schema-output.d.ts +0 -1
- package/dist/session/index.d.ts +0 -1
- package/dist/session/index.js +37 -2
- package/dist/session/store.d.ts +12 -2
- package/dist/session/store.js +37 -2
- package/dist/spec/index.d.ts +0 -1
- package/dist/spec/index.js +2111 -7
- package/dist/spec/registry.d.ts +1 -2
- package/dist/spec/registry.js +2096 -2
- package/dist/spec/spec.d.ts +5 -4
- package/dist/spec/spec.js +2105 -5
- package/dist/telemetry/adapter.d.ts +0 -1
- package/dist/telemetry/index.d.ts +2 -1
- package/dist/telemetry/index.js +117 -1
- package/dist/telemetry/posthog-types.d.ts +59 -0
- package/dist/telemetry/posthog-types.js +1 -0
- package/dist/telemetry/posthog.d.ts +80 -0
- package/dist/telemetry/posthog.js +132 -0
- package/dist/telemetry/posthog.test.d.ts +1 -0
- package/dist/tools/index.d.ts +0 -1
- package/dist/tools/index.js +2117 -17
- package/dist/tools/knowledge-tool.d.ts +1 -2
- package/dist/tools/knowledge-tool.js +2105 -11
- package/dist/tools/mcp-client.d.ts +0 -1
- package/dist/tools/mcp-server.d.ts +0 -1
- package/dist/tools/mcp-server.js +2101 -5
- package/dist/tools/tool-adapter.d.ts +0 -1
- package/dist/tools/tool-adapter.js +2093 -1
- package/dist/tools/tools.test.d.ts +0 -1
- package/dist/types.d.ts +4 -1
- package/package.json +166 -13
- package/dist/agent/agent-factory.d.ts.map +0 -1
- package/dist/agent/agent.test.d.ts.map +0 -1
- package/dist/agent/contract-spec-agent.d.ts.map +0 -1
- package/dist/agent/index.d.ts.map +0 -1
- package/dist/agent/json-runner.d.ts.map +0 -1
- package/dist/agent/json-runner.test.d.ts.map +0 -1
- package/dist/agent/unified-agent.d.ts.map +0 -1
- package/dist/approval/index.d.ts.map +0 -1
- package/dist/approval/workflow.d.ts.map +0 -1
- package/dist/exporters/claude-agent-exporter.d.ts.map +0 -1
- package/dist/exporters/index.d.ts.map +0 -1
- package/dist/exporters/opencode-exporter.d.ts.map +0 -1
- package/dist/exporters/types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/interop/index.d.ts.map +0 -1
- package/dist/interop/spec-consumer.d.ts.map +0 -1
- package/dist/interop/tool-consumer.d.ts.map +0 -1
- package/dist/interop/types.d.ts.map +0 -1
- package/dist/knowledge/index.d.ts.map +0 -1
- package/dist/knowledge/injector.d.ts.map +0 -1
- package/dist/memory/in-memory.d.ts.map +0 -1
- package/dist/memory/index.d.ts.map +0 -1
- package/dist/memory/manager.d.ts.map +0 -1
- package/dist/memory/memory.test.d.ts.map +0 -1
- package/dist/providers/claude-agent-sdk/adapter.d.ts.map +0 -1
- package/dist/providers/claude-agent-sdk/index.d.ts.map +0 -1
- package/dist/providers/claude-agent-sdk/session-bridge.d.ts.map +0 -1
- package/dist/providers/claude-agent-sdk/tool-bridge.d.ts.map +0 -1
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/providers/opencode-sdk/adapter.d.ts.map +0 -1
- package/dist/providers/opencode-sdk/agent-bridge.d.ts.map +0 -1
- package/dist/providers/opencode-sdk/index.d.ts.map +0 -1
- package/dist/providers/opencode-sdk/tool-bridge.d.ts.map +0 -1
- package/dist/providers/registry.d.ts.map +0 -1
- package/dist/providers/types.d.ts.map +0 -1
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/json-schema-to-zod.d.ts.map +0 -1
- package/dist/schema/schema-output.d.ts.map +0 -1
- package/dist/session/index.d.ts.map +0 -1
- package/dist/session/store.d.ts.map +0 -1
- package/dist/spec/index.d.ts.map +0 -1
- package/dist/spec/registry.d.ts.map +0 -1
- package/dist/spec/spec.d.ts.map +0 -1
- package/dist/telemetry/adapter.d.ts.map +0 -1
- package/dist/telemetry/index.d.ts.map +0 -1
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/knowledge-tool.d.ts.map +0 -1
- package/dist/tools/mcp-client.d.ts.map +0 -1
- package/dist/tools/mcp-server.d.ts.map +0 -1
- package/dist/tools/tool-adapter.d.ts.map +0 -1
- package/dist/tools/tools.test.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
|
@@ -12,24 +12,2119 @@ var __export = (target, all) => {
|
|
|
12
12
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
13
13
|
var __require = import.meta.require;
|
|
14
14
|
|
|
15
|
+
// src/i18n/catalogs/en.ts
|
|
16
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
17
|
+
var enMessages;
|
|
18
|
+
var init_en = __esm(() => {
|
|
19
|
+
enMessages = defineTranslation({
|
|
20
|
+
meta: {
|
|
21
|
+
key: "ai-agent.messages",
|
|
22
|
+
version: "1.0.0",
|
|
23
|
+
domain: "ai-agent",
|
|
24
|
+
description: "All user-facing, LLM-facing, and developer-facing strings for the ai-agent package",
|
|
25
|
+
owners: ["platform"],
|
|
26
|
+
stability: "experimental"
|
|
27
|
+
},
|
|
28
|
+
locale: "en",
|
|
29
|
+
fallback: "en",
|
|
30
|
+
messages: {
|
|
31
|
+
"agent.json.rules.validJsonOnly": {
|
|
32
|
+
value: "You MUST output valid JSON ONLY.",
|
|
33
|
+
description: "JSON runner rule: output must be valid JSON"
|
|
34
|
+
},
|
|
35
|
+
"agent.json.rules.noMarkdownFences": {
|
|
36
|
+
value: "Do not wrap the output in markdown fences.",
|
|
37
|
+
description: "JSON runner rule: no markdown code fences"
|
|
38
|
+
},
|
|
39
|
+
"agent.json.rules.noCommentary": {
|
|
40
|
+
value: "Do not include commentary or explanation.",
|
|
41
|
+
description: "JSON runner rule: no extra text"
|
|
42
|
+
},
|
|
43
|
+
"agent.json.rules.doubleQuotes": {
|
|
44
|
+
value: "Use double quotes for all keys and string values.",
|
|
45
|
+
description: "JSON runner rule: double quotes only"
|
|
46
|
+
},
|
|
47
|
+
"agent.json.rules.noTrailingCommas": {
|
|
48
|
+
value: "Do not include trailing commas.",
|
|
49
|
+
description: "JSON runner rule: no trailing commas"
|
|
50
|
+
},
|
|
51
|
+
"agent.json.defaultDescription": {
|
|
52
|
+
value: "JSON-only agent runner for deterministic pipelines.",
|
|
53
|
+
description: "Default description for the JSON runner spec"
|
|
54
|
+
},
|
|
55
|
+
"agent.json.systemPrompt": {
|
|
56
|
+
value: "You are a precise JSON generator.",
|
|
57
|
+
description: "Default system prompt for the JSON runner"
|
|
58
|
+
},
|
|
59
|
+
"knowledge.header": {
|
|
60
|
+
value: "# Reference Knowledge",
|
|
61
|
+
description: "Header for injected knowledge section in system prompt"
|
|
62
|
+
},
|
|
63
|
+
"knowledge.description": {
|
|
64
|
+
value: "The following information is provided for your reference. Use it to inform your responses.",
|
|
65
|
+
description: "Description below the knowledge header"
|
|
66
|
+
},
|
|
67
|
+
"tool.knowledge.description": {
|
|
68
|
+
value: "Query knowledge bases for relevant information. Use this tool when you need to look up specific information that may not be in your context.",
|
|
69
|
+
description: "Description for the knowledge query tool shown to the LLM"
|
|
70
|
+
},
|
|
71
|
+
"tool.knowledge.availableSpaces": {
|
|
72
|
+
value: "Available knowledge spaces:",
|
|
73
|
+
description: "Label before listing available knowledge spaces"
|
|
74
|
+
},
|
|
75
|
+
"tool.knowledge.spaceDefault": {
|
|
76
|
+
value: "Knowledge space",
|
|
77
|
+
description: "Fallback description for unnamed knowledge spaces"
|
|
78
|
+
},
|
|
79
|
+
"tool.knowledge.param.query": {
|
|
80
|
+
value: "The question or search query to find relevant information",
|
|
81
|
+
description: "Parameter description for the query field"
|
|
82
|
+
},
|
|
83
|
+
"tool.knowledge.param.spaceKey": {
|
|
84
|
+
value: "Specific knowledge space to query. If omitted, searches all available spaces.",
|
|
85
|
+
description: "Parameter description for the spaceKey field"
|
|
86
|
+
},
|
|
87
|
+
"tool.knowledge.param.topK": {
|
|
88
|
+
value: "Maximum number of results to return",
|
|
89
|
+
description: "Parameter description for the topK field"
|
|
90
|
+
},
|
|
91
|
+
"tool.knowledge.noResults": {
|
|
92
|
+
value: "No relevant information found in the knowledge bases.",
|
|
93
|
+
description: "Message when no knowledge results are found"
|
|
94
|
+
},
|
|
95
|
+
"tool.knowledge.sourceLabel": {
|
|
96
|
+
value: "[Source {index} - {space}] (relevance: {score}%)",
|
|
97
|
+
description: "Label for each knowledge search result",
|
|
98
|
+
placeholders: [
|
|
99
|
+
{ name: "index", type: "number", description: "1-based source index" },
|
|
100
|
+
{ name: "space", type: "string", description: "Knowledge space name" },
|
|
101
|
+
{ name: "score", type: "number", description: "Relevance percentage" }
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"tool.fallbackDescription": {
|
|
105
|
+
value: "Execute {name}",
|
|
106
|
+
description: "Fallback description when a tool has no explicit description",
|
|
107
|
+
placeholders: [
|
|
108
|
+
{ name: "name", type: "string", description: "Tool name" }
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"tool.mcp.param.message": {
|
|
112
|
+
value: "The message or query to send to the agent",
|
|
113
|
+
description: "MCP server: message parameter description"
|
|
114
|
+
},
|
|
115
|
+
"tool.mcp.param.sessionId": {
|
|
116
|
+
value: "Optional session ID to continue a conversation",
|
|
117
|
+
description: "MCP server: sessionId parameter description"
|
|
118
|
+
},
|
|
119
|
+
"tool.mcp.agentDescription": {
|
|
120
|
+
value: "Interact with {key} agent",
|
|
121
|
+
description: "MCP server: agent tool description",
|
|
122
|
+
placeholders: [
|
|
123
|
+
{ name: "key", type: "string", description: "Agent spec key" }
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"tool.mcp.executePrompt": {
|
|
127
|
+
value: "Execute the {name} tool with the following arguments: {args}",
|
|
128
|
+
description: "MCP server: prompt sent when executing an individual tool",
|
|
129
|
+
placeholders: [
|
|
130
|
+
{ name: "name", type: "string", description: "Tool name" },
|
|
131
|
+
{
|
|
132
|
+
name: "args",
|
|
133
|
+
type: "string",
|
|
134
|
+
description: "JSON-stringified arguments"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"tool.mcp.toolDescription": {
|
|
139
|
+
value: "Execute {name} tool",
|
|
140
|
+
description: "MCP server: individual tool description",
|
|
141
|
+
placeholders: [
|
|
142
|
+
{ name: "name", type: "string", description: "Tool name" }
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"interop.prompt.agentIdentity": {
|
|
146
|
+
value: "# Agent Identity",
|
|
147
|
+
description: "Section header for agent identity in LLM prompt"
|
|
148
|
+
},
|
|
149
|
+
"interop.prompt.youAre": {
|
|
150
|
+
value: "You are {key} (v{version}).",
|
|
151
|
+
description: "Agent identity statement in LLM prompt",
|
|
152
|
+
placeholders: [
|
|
153
|
+
{ name: "key", type: "string" },
|
|
154
|
+
{ name: "version", type: "string" }
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"interop.prompt.description": {
|
|
158
|
+
value: "## Description",
|
|
159
|
+
description: "Section header for description"
|
|
160
|
+
},
|
|
161
|
+
"interop.prompt.instructions": {
|
|
162
|
+
value: "## Instructions",
|
|
163
|
+
description: "Section header for instructions"
|
|
164
|
+
},
|
|
165
|
+
"interop.prompt.availableTools": {
|
|
166
|
+
value: "## Available Tools",
|
|
167
|
+
description: "Section header for available tools"
|
|
168
|
+
},
|
|
169
|
+
"interop.prompt.toolsIntro": {
|
|
170
|
+
value: "You have access to the following tools:",
|
|
171
|
+
description: "Introduction before listing tools"
|
|
172
|
+
},
|
|
173
|
+
"interop.prompt.parameters": {
|
|
174
|
+
value: "Parameters:",
|
|
175
|
+
description: "Label before tool parameters block"
|
|
176
|
+
},
|
|
177
|
+
"interop.prompt.knowledgeContext": {
|
|
178
|
+
value: "## Knowledge Context",
|
|
179
|
+
description: "Section header for knowledge context"
|
|
180
|
+
},
|
|
181
|
+
"interop.prompt.additionalContext": {
|
|
182
|
+
value: "## Additional Context",
|
|
183
|
+
description: "Section header for additional context"
|
|
184
|
+
},
|
|
185
|
+
"interop.md.toc": {
|
|
186
|
+
value: "## Table of Contents",
|
|
187
|
+
description: "TOC header"
|
|
188
|
+
},
|
|
189
|
+
"interop.md.overview": {
|
|
190
|
+
value: "## Overview",
|
|
191
|
+
description: "Overview header"
|
|
192
|
+
},
|
|
193
|
+
"interop.md.tools": { value: "## Tools", description: "Tools header" },
|
|
194
|
+
"interop.md.knowledge": {
|
|
195
|
+
value: "## Knowledge",
|
|
196
|
+
description: "Knowledge header"
|
|
197
|
+
},
|
|
198
|
+
"interop.md.policy": { value: "## Policy", description: "Policy header" },
|
|
199
|
+
"interop.md.metaKey": {
|
|
200
|
+
value: "- **Key**: `{key}`",
|
|
201
|
+
description: "Metadata line for key",
|
|
202
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
203
|
+
},
|
|
204
|
+
"interop.md.metaVersion": {
|
|
205
|
+
value: "- **Version**: {version}",
|
|
206
|
+
description: "Metadata line for version",
|
|
207
|
+
placeholders: [{ name: "version", type: "string" }]
|
|
208
|
+
},
|
|
209
|
+
"interop.md.metaStability": {
|
|
210
|
+
value: "- **Stability**: {stability}",
|
|
211
|
+
description: "Metadata line for stability",
|
|
212
|
+
placeholders: [{ name: "stability", type: "string" }]
|
|
213
|
+
},
|
|
214
|
+
"interop.md.metaOwners": {
|
|
215
|
+
value: "- **Owners**: {owners}",
|
|
216
|
+
description: "Metadata line for owners",
|
|
217
|
+
placeholders: [{ name: "owners", type: "string" }]
|
|
218
|
+
},
|
|
219
|
+
"interop.md.metaTags": {
|
|
220
|
+
value: "- **Tags**: {tags}",
|
|
221
|
+
description: "Metadata line for tags",
|
|
222
|
+
placeholders: [{ name: "tags", type: "string" }]
|
|
223
|
+
},
|
|
224
|
+
"interop.md.schema": { value: "**Schema:**", description: "Schema label" },
|
|
225
|
+
"interop.md.automationSafe": {
|
|
226
|
+
value: "**Automation Safe**: {value}",
|
|
227
|
+
description: "Automation safe field",
|
|
228
|
+
placeholders: [{ name: "value", type: "string" }]
|
|
229
|
+
},
|
|
230
|
+
"interop.md.required": {
|
|
231
|
+
value: "(required)",
|
|
232
|
+
description: "Required marker"
|
|
233
|
+
},
|
|
234
|
+
"interop.md.optional": {
|
|
235
|
+
value: "(optional)",
|
|
236
|
+
description: "Optional marker"
|
|
237
|
+
},
|
|
238
|
+
"interop.md.minConfidence": {
|
|
239
|
+
value: "- **Minimum Confidence**: {min}",
|
|
240
|
+
description: "Minimum confidence policy line",
|
|
241
|
+
placeholders: [{ name: "min", type: "number" }]
|
|
242
|
+
},
|
|
243
|
+
"interop.md.escalationThreshold": {
|
|
244
|
+
value: "- **Escalation Threshold**: {threshold}",
|
|
245
|
+
description: "Escalation threshold policy line",
|
|
246
|
+
placeholders: [{ name: "threshold", type: "number" }]
|
|
247
|
+
},
|
|
248
|
+
"interop.md.escalateToolFailure": {
|
|
249
|
+
value: "- **Escalate on Tool Failure**: Yes",
|
|
250
|
+
description: "Escalate on tool failure policy line"
|
|
251
|
+
},
|
|
252
|
+
"interop.md.escalateTimeout": {
|
|
253
|
+
value: "- **Escalate on Timeout**: Yes",
|
|
254
|
+
description: "Escalate on timeout policy line"
|
|
255
|
+
},
|
|
256
|
+
"interop.md.yes": { value: "Yes", description: "Yes label" },
|
|
257
|
+
"interop.md.no": { value: "No", description: "No label" },
|
|
258
|
+
"error.jsonRunner.requiresModel": {
|
|
259
|
+
value: "createAgentJsonRunner requires a model or provider config",
|
|
260
|
+
description: "Error when JSON runner has no model or provider"
|
|
261
|
+
},
|
|
262
|
+
"error.missingToolHandler": {
|
|
263
|
+
value: "Missing handler for tool: {name}",
|
|
264
|
+
description: "Error when a tool handler is not registered",
|
|
265
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
266
|
+
},
|
|
267
|
+
"error.unknownBackend": {
|
|
268
|
+
value: "Unknown backend: {backend}",
|
|
269
|
+
description: "Error when an unknown backend is specified",
|
|
270
|
+
placeholders: [{ name: "backend", type: "string" }]
|
|
271
|
+
},
|
|
272
|
+
"error.claudeSdk.notAvailable": {
|
|
273
|
+
value: "Claude Agent SDK not available. Install @anthropic-ai/claude-agent-sdk",
|
|
274
|
+
description: "Error when Claude Agent SDK is not available"
|
|
275
|
+
},
|
|
276
|
+
"error.claudeSdk.notInstalled": {
|
|
277
|
+
value: "Claude Agent SDK not installed. Run: npm install @anthropic-ai/claude-agent-sdk",
|
|
278
|
+
description: "Error when Claude Agent SDK module is not found"
|
|
279
|
+
},
|
|
280
|
+
"error.opencodeSdk.notAvailable": {
|
|
281
|
+
value: "OpenCode SDK not available. Install @opencode-ai/sdk",
|
|
282
|
+
description: "Error when OpenCode SDK is not available"
|
|
283
|
+
},
|
|
284
|
+
"error.opencodeSdk.notInstalled": {
|
|
285
|
+
value: "OpenCode SDK not installed. Run: npm install @opencode-ai/sdk",
|
|
286
|
+
description: "Error when OpenCode SDK module is not found"
|
|
287
|
+
},
|
|
288
|
+
"error.providerNotInitialized": {
|
|
289
|
+
value: "Provider not initialized",
|
|
290
|
+
description: "Error when provider has not been initialized before use"
|
|
291
|
+
},
|
|
292
|
+
"error.agentKeyRequired": {
|
|
293
|
+
value: "Agent key is required",
|
|
294
|
+
description: "Validation error: missing agent key"
|
|
295
|
+
},
|
|
296
|
+
"error.agentMissingVersion": {
|
|
297
|
+
value: "Agent {key} is missing a string version",
|
|
298
|
+
description: "Validation error: version not a string",
|
|
299
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
300
|
+
},
|
|
301
|
+
"error.agentRequiresInstructions": {
|
|
302
|
+
value: "Agent {key} requires instructions",
|
|
303
|
+
description: "Validation error: missing instructions",
|
|
304
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
305
|
+
},
|
|
306
|
+
"error.agentRequiresTool": {
|
|
307
|
+
value: "Agent {key} must expose at least one tool",
|
|
308
|
+
description: "Validation error: no tools defined",
|
|
309
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
310
|
+
},
|
|
311
|
+
"error.agentDuplicateTool": {
|
|
312
|
+
value: "Agent {key} has duplicate tool name: {name}",
|
|
313
|
+
description: "Validation error: duplicate tool name",
|
|
314
|
+
placeholders: [
|
|
315
|
+
{ name: "key", type: "string" },
|
|
316
|
+
{ name: "name", type: "string" }
|
|
317
|
+
]
|
|
318
|
+
},
|
|
319
|
+
"error.agentSpecNotFound": {
|
|
320
|
+
value: "Agent spec not found for {name}",
|
|
321
|
+
description: "Error when agent spec is not in the registry",
|
|
322
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
323
|
+
},
|
|
324
|
+
"error.specNotFound": {
|
|
325
|
+
value: "Spec not found: {specKey}",
|
|
326
|
+
description: "Error when a spec key is not found",
|
|
327
|
+
placeholders: [{ name: "specKey", type: "string" }]
|
|
328
|
+
},
|
|
329
|
+
"error.toolNotFound": {
|
|
330
|
+
value: "Tool not found: {name}",
|
|
331
|
+
description: "Error when a tool is not found",
|
|
332
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
333
|
+
},
|
|
334
|
+
"error.noHandlerForTool": {
|
|
335
|
+
value: "No handler registered for tool: {name}",
|
|
336
|
+
description: "Error when no handler is registered for a tool",
|
|
337
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
338
|
+
},
|
|
339
|
+
"error.noToolHandler": {
|
|
340
|
+
value: "No handler for tool: {name}",
|
|
341
|
+
description: "Short error when no handler exists",
|
|
342
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
343
|
+
},
|
|
344
|
+
"error.unknownExportFormat": {
|
|
345
|
+
value: "Unknown export format: {format}",
|
|
346
|
+
description: "Error for unsupported export format",
|
|
347
|
+
placeholders: [{ name: "format", type: "string" }]
|
|
348
|
+
},
|
|
349
|
+
"error.handlerNotFoundForTool": {
|
|
350
|
+
value: "Handler not found for tool {name}",
|
|
351
|
+
description: "Error in tool bridge when handler is missing",
|
|
352
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
353
|
+
},
|
|
354
|
+
"error.toolNotFoundOrNoHandler": {
|
|
355
|
+
value: "Error: Tool '{name}' not found or has no handler",
|
|
356
|
+
description: "Error returned to LLM when tool execution fails",
|
|
357
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
358
|
+
},
|
|
359
|
+
"error.toolNoExecuteHandler": {
|
|
360
|
+
value: "Tool {name} has no execute handler",
|
|
361
|
+
description: "Error when tool lacks an execute function",
|
|
362
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
363
|
+
},
|
|
364
|
+
"error.provider.notRegistered": {
|
|
365
|
+
value: "not registered",
|
|
366
|
+
description: "Provider availability reason: not registered"
|
|
367
|
+
},
|
|
368
|
+
"error.provider.depsNotInstalled": {
|
|
369
|
+
value: "dependencies not installed or not configured",
|
|
370
|
+
description: "Provider availability reason: deps missing"
|
|
371
|
+
},
|
|
372
|
+
"error.provider.sdkNotConfigured": {
|
|
373
|
+
value: "SDK not installed or API key not configured",
|
|
374
|
+
description: "Provider availability reason: SDK or key missing"
|
|
375
|
+
},
|
|
376
|
+
"error.provider.claudeSdkMissing": {
|
|
377
|
+
value: "@anthropic-ai/claude-agent-sdk is not installed",
|
|
378
|
+
description: "Error when Claude Agent SDK require.resolve fails"
|
|
379
|
+
},
|
|
380
|
+
"error.provider.opencodeSdkMissing": {
|
|
381
|
+
value: "@opencode-ai/sdk is not installed",
|
|
382
|
+
description: "Error when OpenCode SDK require.resolve fails"
|
|
383
|
+
},
|
|
384
|
+
"error.provider.sdkNotInstalled": {
|
|
385
|
+
value: "SDK not installed",
|
|
386
|
+
description: "Generic provider error: SDK not installed"
|
|
387
|
+
},
|
|
388
|
+
"error.provider.contextCreation": {
|
|
389
|
+
value: "Failed to create context: {error}",
|
|
390
|
+
description: "Error during provider context creation",
|
|
391
|
+
placeholders: [{ name: "error", type: "string" }]
|
|
392
|
+
},
|
|
393
|
+
"error.provider.executionFailed": {
|
|
394
|
+
value: "Execution failed: {error}",
|
|
395
|
+
description: "Error during provider execution",
|
|
396
|
+
placeholders: [{ name: "error", type: "string" }]
|
|
397
|
+
},
|
|
398
|
+
"error.provider.streamFailed": {
|
|
399
|
+
value: "Stream failed: {error}",
|
|
400
|
+
description: "Error during provider streaming",
|
|
401
|
+
placeholders: [{ name: "error", type: "string" }]
|
|
402
|
+
},
|
|
403
|
+
"export.agentConfiguration": {
|
|
404
|
+
value: "# Agent Configuration",
|
|
405
|
+
description: "Markdown heading"
|
|
406
|
+
},
|
|
407
|
+
"export.metadata": {
|
|
408
|
+
value: "## Metadata",
|
|
409
|
+
description: "Markdown heading"
|
|
410
|
+
},
|
|
411
|
+
"export.metaName": {
|
|
412
|
+
value: "- **Name**: {name}",
|
|
413
|
+
description: "Metadata line",
|
|
414
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
415
|
+
},
|
|
416
|
+
"export.metaVersion": {
|
|
417
|
+
value: "- **Version**: {version}",
|
|
418
|
+
description: "Metadata line",
|
|
419
|
+
placeholders: [{ name: "version", type: "string" }]
|
|
420
|
+
},
|
|
421
|
+
"export.metaOwners": {
|
|
422
|
+
value: "- **Owners**: {owners}",
|
|
423
|
+
description: "Metadata line",
|
|
424
|
+
placeholders: [{ name: "owners", type: "string" }]
|
|
425
|
+
},
|
|
426
|
+
"export.metaModel": {
|
|
427
|
+
value: "- **Model**: {model}",
|
|
428
|
+
description: "Metadata line",
|
|
429
|
+
placeholders: [{ name: "model", type: "string" }]
|
|
430
|
+
},
|
|
431
|
+
"export.instructions": {
|
|
432
|
+
value: "## Instructions",
|
|
433
|
+
description: "Markdown heading"
|
|
434
|
+
},
|
|
435
|
+
"export.availableTools": {
|
|
436
|
+
value: "## Available Tools",
|
|
437
|
+
description: "Markdown heading"
|
|
438
|
+
},
|
|
439
|
+
"export.tools": { value: "## Tools", description: "Markdown heading" },
|
|
440
|
+
"export.knowledgeSources": {
|
|
441
|
+
value: "## Knowledge Sources",
|
|
442
|
+
description: "Markdown heading"
|
|
443
|
+
},
|
|
444
|
+
"export.policy": { value: "## Policy", description: "Markdown heading" },
|
|
445
|
+
"export.additionalContext": {
|
|
446
|
+
value: "## Additional Context",
|
|
447
|
+
description: "Markdown heading"
|
|
448
|
+
},
|
|
449
|
+
"export.configuration": {
|
|
450
|
+
value: "## Configuration",
|
|
451
|
+
description: "Markdown heading"
|
|
452
|
+
},
|
|
453
|
+
"export.mcpServers": {
|
|
454
|
+
value: "## MCP Servers",
|
|
455
|
+
description: "Markdown heading"
|
|
456
|
+
},
|
|
457
|
+
"export.parameters": {
|
|
458
|
+
value: "**Parameters:**",
|
|
459
|
+
description: "Parameters label"
|
|
460
|
+
},
|
|
461
|
+
"export.requiresApproval": {
|
|
462
|
+
value: "requires approval",
|
|
463
|
+
description: "Tool flag"
|
|
464
|
+
},
|
|
465
|
+
"export.notAutomationSafe": {
|
|
466
|
+
value: "not automation safe",
|
|
467
|
+
description: "Tool flag"
|
|
468
|
+
},
|
|
469
|
+
"export.requiresApprovalMd": {
|
|
470
|
+
value: "*(requires approval)*",
|
|
471
|
+
description: "Markdown tool flag"
|
|
472
|
+
},
|
|
473
|
+
"export.notAutomationSafeMd": {
|
|
474
|
+
value: "*(not automation safe)*",
|
|
475
|
+
description: "Markdown tool flag"
|
|
476
|
+
},
|
|
477
|
+
"export.required": { value: "(required)", description: "Required marker" },
|
|
478
|
+
"export.optional": { value: "(optional)", description: "Optional marker" },
|
|
479
|
+
"export.minConfidence": {
|
|
480
|
+
value: "- Minimum confidence: {min}",
|
|
481
|
+
description: "Policy line",
|
|
482
|
+
placeholders: [{ name: "min", type: "number" }]
|
|
483
|
+
},
|
|
484
|
+
"export.escalationConfigured": {
|
|
485
|
+
value: "- Escalation policy is configured",
|
|
486
|
+
description: "Policy line for system prompt"
|
|
487
|
+
},
|
|
488
|
+
"export.escalationPolicyConfigured": {
|
|
489
|
+
value: "- Escalation policy configured",
|
|
490
|
+
description: "Policy line for markdown export"
|
|
491
|
+
},
|
|
492
|
+
"export.featureFlags": {
|
|
493
|
+
value: "- Feature flags: {flags}",
|
|
494
|
+
description: "Feature flags policy line",
|
|
495
|
+
placeholders: [{ name: "flags", type: "string" }]
|
|
496
|
+
},
|
|
497
|
+
"export.generatedFrom": {
|
|
498
|
+
value: "*Generated from ContractSpec: {key}*",
|
|
499
|
+
description: "Footer attribution line",
|
|
500
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
501
|
+
},
|
|
502
|
+
"export.exportedAt": {
|
|
503
|
+
value: "*Exported at: {date}*",
|
|
504
|
+
description: "Footer timestamp",
|
|
505
|
+
placeholders: [{ name: "date", type: "string" }]
|
|
506
|
+
},
|
|
507
|
+
"export.agentType": {
|
|
508
|
+
value: "> Agent type: **{type}**",
|
|
509
|
+
description: "Agent type callout",
|
|
510
|
+
placeholders: [{ name: "type", type: "string" }]
|
|
511
|
+
},
|
|
512
|
+
"export.noDescription": {
|
|
513
|
+
value: "No description",
|
|
514
|
+
description: "Fallback when tool has no description"
|
|
515
|
+
},
|
|
516
|
+
"export.validation.requiresKey": {
|
|
517
|
+
value: "Spec must have a meta.key",
|
|
518
|
+
description: "Validation error"
|
|
519
|
+
},
|
|
520
|
+
"export.validation.requiresInstructions": {
|
|
521
|
+
value: "Spec must have instructions",
|
|
522
|
+
description: "Validation error"
|
|
523
|
+
},
|
|
524
|
+
"export.validation.requiresTool": {
|
|
525
|
+
value: "Spec must have at least one tool",
|
|
526
|
+
description: "Validation error"
|
|
527
|
+
},
|
|
528
|
+
"export.validation.toolRequiresName": {
|
|
529
|
+
value: "All tools must have a name",
|
|
530
|
+
description: "Validation error"
|
|
531
|
+
},
|
|
532
|
+
"export.validation.toolRequiresDescOrName": {
|
|
533
|
+
value: "Tool must have a description or name",
|
|
534
|
+
description: "Validation error"
|
|
535
|
+
},
|
|
536
|
+
"export.validation.toolInvalidName": {
|
|
537
|
+
value: "Tool name '{name}' should be a valid identifier (letters, numbers, underscores)",
|
|
538
|
+
description: "Validation error for invalid tool name",
|
|
539
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
540
|
+
},
|
|
541
|
+
"export.agentType.build": {
|
|
542
|
+
value: "Primary agent with full tool access for code generation and modification.",
|
|
543
|
+
description: "Build agent type description"
|
|
544
|
+
},
|
|
545
|
+
"export.agentType.plan": {
|
|
546
|
+
value: "Restricted agent for analysis and planning. File edits and bash commands require approval.",
|
|
547
|
+
description: "Plan agent type description"
|
|
548
|
+
},
|
|
549
|
+
"export.agentType.general": {
|
|
550
|
+
value: "General-purpose subagent for complex questions and multi-step tasks.",
|
|
551
|
+
description: "General agent type description"
|
|
552
|
+
},
|
|
553
|
+
"export.agentType.explore": {
|
|
554
|
+
value: "Fast subagent optimized for codebase exploration and pattern searching.",
|
|
555
|
+
description: "Explore agent type description"
|
|
556
|
+
},
|
|
557
|
+
"export.bridge.requiresApproval": {
|
|
558
|
+
value: "(requires approval)",
|
|
559
|
+
description: "Tool permission label"
|
|
560
|
+
},
|
|
561
|
+
"export.bridge.askMode": {
|
|
562
|
+
value: "(ask mode)",
|
|
563
|
+
description: "Tool permission label"
|
|
564
|
+
},
|
|
565
|
+
"approval.toolRequiresApproval": {
|
|
566
|
+
value: 'Tool "{name}" requires approval',
|
|
567
|
+
description: "Default reason for tool approval requests",
|
|
568
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
569
|
+
},
|
|
570
|
+
"log.unifiedAgent.fallback": {
|
|
571
|
+
value: "[UnifiedAgent] {backend} failed, falling back to {fallback}",
|
|
572
|
+
description: "Warning when a backend fails and fallback is used",
|
|
573
|
+
placeholders: [
|
|
574
|
+
{ name: "backend", type: "string" },
|
|
575
|
+
{ name: "fallback", type: "string" }
|
|
576
|
+
]
|
|
577
|
+
},
|
|
578
|
+
"log.knowledge.spaceNotAvailable": {
|
|
579
|
+
value: 'Required knowledge space "{key}" is not available',
|
|
580
|
+
description: "Warning when a required knowledge space is missing",
|
|
581
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
582
|
+
},
|
|
583
|
+
"log.knowledge.loadFailed": {
|
|
584
|
+
value: 'Failed to load required knowledge "{key}":',
|
|
585
|
+
description: "Warning when knowledge loading fails",
|
|
586
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
587
|
+
},
|
|
588
|
+
"log.knowledge.queryFailed": {
|
|
589
|
+
value: "Failed to query knowledge space {space}:",
|
|
590
|
+
description: "Warning when knowledge querying fails",
|
|
591
|
+
placeholders: [{ name: "space", type: "string" }]
|
|
592
|
+
},
|
|
593
|
+
"log.mcpServer.started": {
|
|
594
|
+
value: "[MCPToolServer] Started {name}@{version} with {count} tools",
|
|
595
|
+
description: "Log message when MCP tool server starts",
|
|
596
|
+
placeholders: [
|
|
597
|
+
{ name: "name", type: "string" },
|
|
598
|
+
{ name: "version", type: "string" },
|
|
599
|
+
{ name: "count", type: "number" }
|
|
600
|
+
]
|
|
601
|
+
},
|
|
602
|
+
"log.mcpServer.stopped": {
|
|
603
|
+
value: "[MCPToolServer] Stopped {name}",
|
|
604
|
+
description: "Log message when MCP tool server stops",
|
|
605
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
});
|
|
610
|
+
|
|
611
|
+
// src/i18n/catalogs/fr.ts
|
|
612
|
+
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
613
|
+
var frMessages;
|
|
614
|
+
var init_fr = __esm(() => {
|
|
615
|
+
frMessages = defineTranslation2({
|
|
616
|
+
meta: {
|
|
617
|
+
key: "ai-agent.messages",
|
|
618
|
+
version: "1.0.0",
|
|
619
|
+
domain: "ai-agent",
|
|
620
|
+
description: "Toutes les cha\xEEnes destin\xE9es aux utilisateurs, aux LLM et aux d\xE9veloppeurs pour le package ai-agent",
|
|
621
|
+
owners: ["platform"],
|
|
622
|
+
stability: "experimental"
|
|
623
|
+
},
|
|
624
|
+
locale: "fr",
|
|
625
|
+
fallback: "en",
|
|
626
|
+
messages: {
|
|
627
|
+
"agent.json.rules.validJsonOnly": {
|
|
628
|
+
value: "Vous DEVEZ produire uniquement du JSON valide.",
|
|
629
|
+
description: "JSON runner rule: output must be valid JSON"
|
|
630
|
+
},
|
|
631
|
+
"agent.json.rules.noMarkdownFences": {
|
|
632
|
+
value: "N'encapsulez pas la sortie dans des blocs de code markdown.",
|
|
633
|
+
description: "JSON runner rule: no markdown code fences"
|
|
634
|
+
},
|
|
635
|
+
"agent.json.rules.noCommentary": {
|
|
636
|
+
value: "N'incluez ni commentaire ni explication.",
|
|
637
|
+
description: "JSON runner rule: no extra text"
|
|
638
|
+
},
|
|
639
|
+
"agent.json.rules.doubleQuotes": {
|
|
640
|
+
value: "Utilisez des guillemets doubles pour toutes les cl\xE9s et valeurs de type cha\xEEne.",
|
|
641
|
+
description: "JSON runner rule: double quotes only"
|
|
642
|
+
},
|
|
643
|
+
"agent.json.rules.noTrailingCommas": {
|
|
644
|
+
value: "N'incluez pas de virgules finales.",
|
|
645
|
+
description: "JSON runner rule: no trailing commas"
|
|
646
|
+
},
|
|
647
|
+
"agent.json.defaultDescription": {
|
|
648
|
+
value: "Ex\xE9cuteur d'agent JSON uniquement pour les pipelines d\xE9terministes.",
|
|
649
|
+
description: "Default description for the JSON runner spec"
|
|
650
|
+
},
|
|
651
|
+
"agent.json.systemPrompt": {
|
|
652
|
+
value: "Vous \xEAtes un g\xE9n\xE9rateur JSON pr\xE9cis.",
|
|
653
|
+
description: "Default system prompt for the JSON runner"
|
|
654
|
+
},
|
|
655
|
+
"knowledge.header": {
|
|
656
|
+
value: "# Connaissances de r\xE9f\xE9rence",
|
|
657
|
+
description: "Header for injected knowledge section in system prompt"
|
|
658
|
+
},
|
|
659
|
+
"knowledge.description": {
|
|
660
|
+
value: "Les informations suivantes sont fournies \xE0 titre de r\xE9f\xE9rence. Utilisez-les pour \xE9clairer vos r\xE9ponses.",
|
|
661
|
+
description: "Description below the knowledge header"
|
|
662
|
+
},
|
|
663
|
+
"tool.knowledge.description": {
|
|
664
|
+
value: "Interrogez les bases de connaissances pour obtenir des informations pertinentes. Utilisez cet outil lorsque vous avez besoin de rechercher des informations sp\xE9cifiques qui ne sont pas dans votre contexte.",
|
|
665
|
+
description: "Description for the knowledge query tool shown to the LLM"
|
|
666
|
+
},
|
|
667
|
+
"tool.knowledge.availableSpaces": {
|
|
668
|
+
value: "Espaces de connaissances disponibles :",
|
|
669
|
+
description: "Label before listing available knowledge spaces"
|
|
670
|
+
},
|
|
671
|
+
"tool.knowledge.spaceDefault": {
|
|
672
|
+
value: "Espace de connaissances",
|
|
673
|
+
description: "Fallback description for unnamed knowledge spaces"
|
|
674
|
+
},
|
|
675
|
+
"tool.knowledge.param.query": {
|
|
676
|
+
value: "La question ou la requ\xEAte de recherche pour trouver des informations pertinentes",
|
|
677
|
+
description: "Parameter description for the query field"
|
|
678
|
+
},
|
|
679
|
+
"tool.knowledge.param.spaceKey": {
|
|
680
|
+
value: "Espace de connaissances sp\xE9cifique \xE0 interroger. Si omis, recherche dans tous les espaces disponibles.",
|
|
681
|
+
description: "Parameter description for the spaceKey field"
|
|
682
|
+
},
|
|
683
|
+
"tool.knowledge.param.topK": {
|
|
684
|
+
value: "Nombre maximum de r\xE9sultats \xE0 retourner",
|
|
685
|
+
description: "Parameter description for the topK field"
|
|
686
|
+
},
|
|
687
|
+
"tool.knowledge.noResults": {
|
|
688
|
+
value: "Aucune information pertinente trouv\xE9e dans les bases de connaissances.",
|
|
689
|
+
description: "Message when no knowledge results are found"
|
|
690
|
+
},
|
|
691
|
+
"tool.knowledge.sourceLabel": {
|
|
692
|
+
value: "[Source {index} - {space}] (pertinence : {score} %)",
|
|
693
|
+
description: "Label for each knowledge search result",
|
|
694
|
+
placeholders: [
|
|
695
|
+
{ name: "index", type: "number", description: "1-based source index" },
|
|
696
|
+
{ name: "space", type: "string", description: "Knowledge space name" },
|
|
697
|
+
{ name: "score", type: "number", description: "Relevance percentage" }
|
|
698
|
+
]
|
|
699
|
+
},
|
|
700
|
+
"tool.fallbackDescription": {
|
|
701
|
+
value: "Ex\xE9cuter {name}",
|
|
702
|
+
description: "Fallback description when a tool has no explicit description",
|
|
703
|
+
placeholders: [
|
|
704
|
+
{ name: "name", type: "string", description: "Tool name" }
|
|
705
|
+
]
|
|
706
|
+
},
|
|
707
|
+
"tool.mcp.param.message": {
|
|
708
|
+
value: "Le message ou la requ\xEAte \xE0 envoyer \xE0 l'agent",
|
|
709
|
+
description: "MCP server: message parameter description"
|
|
710
|
+
},
|
|
711
|
+
"tool.mcp.param.sessionId": {
|
|
712
|
+
value: "Identifiant de session optionnel pour poursuivre une conversation",
|
|
713
|
+
description: "MCP server: sessionId parameter description"
|
|
714
|
+
},
|
|
715
|
+
"tool.mcp.agentDescription": {
|
|
716
|
+
value: "Interagir avec l'agent {key}",
|
|
717
|
+
description: "MCP server: agent tool description",
|
|
718
|
+
placeholders: [
|
|
719
|
+
{ name: "key", type: "string", description: "Agent spec key" }
|
|
720
|
+
]
|
|
721
|
+
},
|
|
722
|
+
"tool.mcp.executePrompt": {
|
|
723
|
+
value: "Ex\xE9cutez l'outil {name} avec les arguments suivants : {args}",
|
|
724
|
+
description: "MCP server: prompt sent when executing an individual tool",
|
|
725
|
+
placeholders: [
|
|
726
|
+
{ name: "name", type: "string", description: "Tool name" },
|
|
727
|
+
{
|
|
728
|
+
name: "args",
|
|
729
|
+
type: "string",
|
|
730
|
+
description: "JSON-stringified arguments"
|
|
731
|
+
}
|
|
732
|
+
]
|
|
733
|
+
},
|
|
734
|
+
"tool.mcp.toolDescription": {
|
|
735
|
+
value: "Ex\xE9cuter l'outil {name}",
|
|
736
|
+
description: "MCP server: individual tool description",
|
|
737
|
+
placeholders: [
|
|
738
|
+
{ name: "name", type: "string", description: "Tool name" }
|
|
739
|
+
]
|
|
740
|
+
},
|
|
741
|
+
"interop.prompt.agentIdentity": {
|
|
742
|
+
value: "# Identit\xE9 de l'agent",
|
|
743
|
+
description: "Section header for agent identity in LLM prompt"
|
|
744
|
+
},
|
|
745
|
+
"interop.prompt.youAre": {
|
|
746
|
+
value: "Vous \xEAtes {key} (v{version}).",
|
|
747
|
+
description: "Agent identity statement in LLM prompt",
|
|
748
|
+
placeholders: [
|
|
749
|
+
{ name: "key", type: "string" },
|
|
750
|
+
{ name: "version", type: "string" }
|
|
751
|
+
]
|
|
752
|
+
},
|
|
753
|
+
"interop.prompt.description": {
|
|
754
|
+
value: "## Description",
|
|
755
|
+
description: "Section header for description"
|
|
756
|
+
},
|
|
757
|
+
"interop.prompt.instructions": {
|
|
758
|
+
value: "## Instructions",
|
|
759
|
+
description: "Section header for instructions"
|
|
760
|
+
},
|
|
761
|
+
"interop.prompt.availableTools": {
|
|
762
|
+
value: "## Outils disponibles",
|
|
763
|
+
description: "Section header for available tools"
|
|
764
|
+
},
|
|
765
|
+
"interop.prompt.toolsIntro": {
|
|
766
|
+
value: "Vous avez acc\xE8s aux outils suivants :",
|
|
767
|
+
description: "Introduction before listing tools"
|
|
768
|
+
},
|
|
769
|
+
"interop.prompt.parameters": {
|
|
770
|
+
value: "Param\xE8tres :",
|
|
771
|
+
description: "Label before tool parameters block"
|
|
772
|
+
},
|
|
773
|
+
"interop.prompt.knowledgeContext": {
|
|
774
|
+
value: "## Contexte de connaissances",
|
|
775
|
+
description: "Section header for knowledge context"
|
|
776
|
+
},
|
|
777
|
+
"interop.prompt.additionalContext": {
|
|
778
|
+
value: "## Contexte suppl\xE9mentaire",
|
|
779
|
+
description: "Section header for additional context"
|
|
780
|
+
},
|
|
781
|
+
"interop.md.toc": {
|
|
782
|
+
value: "## Table des mati\xE8res",
|
|
783
|
+
description: "TOC header"
|
|
784
|
+
},
|
|
785
|
+
"interop.md.overview": {
|
|
786
|
+
value: "## Aper\xE7u",
|
|
787
|
+
description: "Overview header"
|
|
788
|
+
},
|
|
789
|
+
"interop.md.tools": { value: "## Outils", description: "Tools header" },
|
|
790
|
+
"interop.md.knowledge": {
|
|
791
|
+
value: "## Connaissances",
|
|
792
|
+
description: "Knowledge header"
|
|
793
|
+
},
|
|
794
|
+
"interop.md.policy": {
|
|
795
|
+
value: "## Politique",
|
|
796
|
+
description: "Policy header"
|
|
797
|
+
},
|
|
798
|
+
"interop.md.metaKey": {
|
|
799
|
+
value: "- **Cl\xE9** : `{key}`",
|
|
800
|
+
description: "Metadata line for key",
|
|
801
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
802
|
+
},
|
|
803
|
+
"interop.md.metaVersion": {
|
|
804
|
+
value: "- **Version** : {version}",
|
|
805
|
+
description: "Metadata line for version",
|
|
806
|
+
placeholders: [{ name: "version", type: "string" }]
|
|
807
|
+
},
|
|
808
|
+
"interop.md.metaStability": {
|
|
809
|
+
value: "- **Stabilit\xE9** : {stability}",
|
|
810
|
+
description: "Metadata line for stability",
|
|
811
|
+
placeholders: [{ name: "stability", type: "string" }]
|
|
812
|
+
},
|
|
813
|
+
"interop.md.metaOwners": {
|
|
814
|
+
value: "- **Propri\xE9taires** : {owners}",
|
|
815
|
+
description: "Metadata line for owners",
|
|
816
|
+
placeholders: [{ name: "owners", type: "string" }]
|
|
817
|
+
},
|
|
818
|
+
"interop.md.metaTags": {
|
|
819
|
+
value: "- **Tags** : {tags}",
|
|
820
|
+
description: "Metadata line for tags",
|
|
821
|
+
placeholders: [{ name: "tags", type: "string" }]
|
|
822
|
+
},
|
|
823
|
+
"interop.md.schema": {
|
|
824
|
+
value: "**Sch\xE9ma :**",
|
|
825
|
+
description: "Schema label"
|
|
826
|
+
},
|
|
827
|
+
"interop.md.automationSafe": {
|
|
828
|
+
value: "**Compatible avec l'automatisation** : {value}",
|
|
829
|
+
description: "Automation safe field",
|
|
830
|
+
placeholders: [{ name: "value", type: "string" }]
|
|
831
|
+
},
|
|
832
|
+
"interop.md.required": {
|
|
833
|
+
value: "(obligatoire)",
|
|
834
|
+
description: "Required marker"
|
|
835
|
+
},
|
|
836
|
+
"interop.md.optional": {
|
|
837
|
+
value: "(optionnel)",
|
|
838
|
+
description: "Optional marker"
|
|
839
|
+
},
|
|
840
|
+
"interop.md.minConfidence": {
|
|
841
|
+
value: "- **Confiance minimale** : {min}",
|
|
842
|
+
description: "Minimum confidence policy line",
|
|
843
|
+
placeholders: [{ name: "min", type: "number" }]
|
|
844
|
+
},
|
|
845
|
+
"interop.md.escalationThreshold": {
|
|
846
|
+
value: "- **Seuil d'escalade** : {threshold}",
|
|
847
|
+
description: "Escalation threshold policy line",
|
|
848
|
+
placeholders: [{ name: "threshold", type: "number" }]
|
|
849
|
+
},
|
|
850
|
+
"interop.md.escalateToolFailure": {
|
|
851
|
+
value: "- **Escalader en cas d'\xE9chec d'outil** : Oui",
|
|
852
|
+
description: "Escalate on tool failure policy line"
|
|
853
|
+
},
|
|
854
|
+
"interop.md.escalateTimeout": {
|
|
855
|
+
value: "- **Escalader en cas de d\xE9lai d'attente d\xE9pass\xE9** : Oui",
|
|
856
|
+
description: "Escalate on timeout policy line"
|
|
857
|
+
},
|
|
858
|
+
"interop.md.yes": { value: "Oui", description: "Yes label" },
|
|
859
|
+
"interop.md.no": { value: "Non", description: "No label" },
|
|
860
|
+
"error.jsonRunner.requiresModel": {
|
|
861
|
+
value: "createAgentJsonRunner n\xE9cessite un mod\xE8le ou une configuration de fournisseur",
|
|
862
|
+
description: "Error when JSON runner has no model or provider"
|
|
863
|
+
},
|
|
864
|
+
"error.missingToolHandler": {
|
|
865
|
+
value: "Gestionnaire manquant pour l'outil : {name}",
|
|
866
|
+
description: "Error when a tool handler is not registered",
|
|
867
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
868
|
+
},
|
|
869
|
+
"error.unknownBackend": {
|
|
870
|
+
value: "Backend inconnu : {backend}",
|
|
871
|
+
description: "Error when an unknown backend is specified",
|
|
872
|
+
placeholders: [{ name: "backend", type: "string" }]
|
|
873
|
+
},
|
|
874
|
+
"error.claudeSdk.notAvailable": {
|
|
875
|
+
value: "Claude Agent SDK non disponible. Installez @anthropic-ai/claude-agent-sdk",
|
|
876
|
+
description: "Error when Claude Agent SDK is not available"
|
|
877
|
+
},
|
|
878
|
+
"error.claudeSdk.notInstalled": {
|
|
879
|
+
value: "Claude Agent SDK non install\xE9. Ex\xE9cutez : npm install @anthropic-ai/claude-agent-sdk",
|
|
880
|
+
description: "Error when Claude Agent SDK module is not found"
|
|
881
|
+
},
|
|
882
|
+
"error.opencodeSdk.notAvailable": {
|
|
883
|
+
value: "OpenCode SDK non disponible. Installez @opencode-ai/sdk",
|
|
884
|
+
description: "Error when OpenCode SDK is not available"
|
|
885
|
+
},
|
|
886
|
+
"error.opencodeSdk.notInstalled": {
|
|
887
|
+
value: "OpenCode SDK non install\xE9. Ex\xE9cutez : npm install @opencode-ai/sdk",
|
|
888
|
+
description: "Error when OpenCode SDK module is not found"
|
|
889
|
+
},
|
|
890
|
+
"error.providerNotInitialized": {
|
|
891
|
+
value: "Fournisseur non initialis\xE9",
|
|
892
|
+
description: "Error when provider has not been initialized before use"
|
|
893
|
+
},
|
|
894
|
+
"error.agentKeyRequired": {
|
|
895
|
+
value: "La cl\xE9 de l'agent est obligatoire",
|
|
896
|
+
description: "Validation error: missing agent key"
|
|
897
|
+
},
|
|
898
|
+
"error.agentMissingVersion": {
|
|
899
|
+
value: "L'agent {key} n'a pas de version sous forme de cha\xEEne de caract\xE8res",
|
|
900
|
+
description: "Validation error: version not a string",
|
|
901
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
902
|
+
},
|
|
903
|
+
"error.agentRequiresInstructions": {
|
|
904
|
+
value: "L'agent {key} n\xE9cessite des instructions",
|
|
905
|
+
description: "Validation error: missing instructions",
|
|
906
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
907
|
+
},
|
|
908
|
+
"error.agentRequiresTool": {
|
|
909
|
+
value: "L'agent {key} doit exposer au moins un outil",
|
|
910
|
+
description: "Validation error: no tools defined",
|
|
911
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
912
|
+
},
|
|
913
|
+
"error.agentDuplicateTool": {
|
|
914
|
+
value: "L'agent {key} a un nom d'outil en double : {name}",
|
|
915
|
+
description: "Validation error: duplicate tool name",
|
|
916
|
+
placeholders: [
|
|
917
|
+
{ name: "key", type: "string" },
|
|
918
|
+
{ name: "name", type: "string" }
|
|
919
|
+
]
|
|
920
|
+
},
|
|
921
|
+
"error.agentSpecNotFound": {
|
|
922
|
+
value: "Sp\xE9cification d'agent introuvable pour {name}",
|
|
923
|
+
description: "Error when agent spec is not in the registry",
|
|
924
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
925
|
+
},
|
|
926
|
+
"error.specNotFound": {
|
|
927
|
+
value: "Sp\xE9cification introuvable : {specKey}",
|
|
928
|
+
description: "Error when a spec key is not found",
|
|
929
|
+
placeholders: [{ name: "specKey", type: "string" }]
|
|
930
|
+
},
|
|
931
|
+
"error.toolNotFound": {
|
|
932
|
+
value: "Outil introuvable : {name}",
|
|
933
|
+
description: "Error when a tool is not found",
|
|
934
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
935
|
+
},
|
|
936
|
+
"error.noHandlerForTool": {
|
|
937
|
+
value: "Aucun gestionnaire enregistr\xE9 pour l'outil : {name}",
|
|
938
|
+
description: "Error when no handler is registered for a tool",
|
|
939
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
940
|
+
},
|
|
941
|
+
"error.noToolHandler": {
|
|
942
|
+
value: "Aucun gestionnaire pour l'outil : {name}",
|
|
943
|
+
description: "Short error when no handler exists",
|
|
944
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
945
|
+
},
|
|
946
|
+
"error.unknownExportFormat": {
|
|
947
|
+
value: "Format d'export inconnu : {format}",
|
|
948
|
+
description: "Error for unsupported export format",
|
|
949
|
+
placeholders: [{ name: "format", type: "string" }]
|
|
950
|
+
},
|
|
951
|
+
"error.handlerNotFoundForTool": {
|
|
952
|
+
value: "Gestionnaire introuvable pour l'outil {name}",
|
|
953
|
+
description: "Error in tool bridge when handler is missing",
|
|
954
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
955
|
+
},
|
|
956
|
+
"error.toolNotFoundOrNoHandler": {
|
|
957
|
+
value: "Erreur : L'outil \xAB {name} \xBB est introuvable ou n'a pas de gestionnaire",
|
|
958
|
+
description: "Error returned to LLM when tool execution fails",
|
|
959
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
960
|
+
},
|
|
961
|
+
"error.toolNoExecuteHandler": {
|
|
962
|
+
value: "L'outil {name} n'a pas de gestionnaire d'ex\xE9cution",
|
|
963
|
+
description: "Error when tool lacks an execute function",
|
|
964
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
965
|
+
},
|
|
966
|
+
"error.provider.notRegistered": {
|
|
967
|
+
value: "non enregistr\xE9",
|
|
968
|
+
description: "Provider availability reason: not registered"
|
|
969
|
+
},
|
|
970
|
+
"error.provider.depsNotInstalled": {
|
|
971
|
+
value: "d\xE9pendances non install\xE9es ou non configur\xE9es",
|
|
972
|
+
description: "Provider availability reason: deps missing"
|
|
973
|
+
},
|
|
974
|
+
"error.provider.sdkNotConfigured": {
|
|
975
|
+
value: "SDK non install\xE9 ou cl\xE9 d'API non configur\xE9e",
|
|
976
|
+
description: "Provider availability reason: SDK or key missing"
|
|
977
|
+
},
|
|
978
|
+
"error.provider.claudeSdkMissing": {
|
|
979
|
+
value: "@anthropic-ai/claude-agent-sdk n'est pas install\xE9",
|
|
980
|
+
description: "Error when Claude Agent SDK require.resolve fails"
|
|
981
|
+
},
|
|
982
|
+
"error.provider.opencodeSdkMissing": {
|
|
983
|
+
value: "@opencode-ai/sdk n'est pas install\xE9",
|
|
984
|
+
description: "Error when OpenCode SDK require.resolve fails"
|
|
985
|
+
},
|
|
986
|
+
"error.provider.sdkNotInstalled": {
|
|
987
|
+
value: "SDK non install\xE9",
|
|
988
|
+
description: "Generic provider error: SDK not installed"
|
|
989
|
+
},
|
|
990
|
+
"error.provider.contextCreation": {
|
|
991
|
+
value: "\xC9chec de la cr\xE9ation du contexte : {error}",
|
|
992
|
+
description: "Error during provider context creation",
|
|
993
|
+
placeholders: [{ name: "error", type: "string" }]
|
|
994
|
+
},
|
|
995
|
+
"error.provider.executionFailed": {
|
|
996
|
+
value: "\xC9chec de l'ex\xE9cution : {error}",
|
|
997
|
+
description: "Error during provider execution",
|
|
998
|
+
placeholders: [{ name: "error", type: "string" }]
|
|
999
|
+
},
|
|
1000
|
+
"error.provider.streamFailed": {
|
|
1001
|
+
value: "\xC9chec du flux : {error}",
|
|
1002
|
+
description: "Error during provider streaming",
|
|
1003
|
+
placeholders: [{ name: "error", type: "string" }]
|
|
1004
|
+
},
|
|
1005
|
+
"export.agentConfiguration": {
|
|
1006
|
+
value: "# Configuration de l'agent",
|
|
1007
|
+
description: "Markdown heading"
|
|
1008
|
+
},
|
|
1009
|
+
"export.metadata": {
|
|
1010
|
+
value: "## M\xE9tadonn\xE9es",
|
|
1011
|
+
description: "Markdown heading"
|
|
1012
|
+
},
|
|
1013
|
+
"export.metaName": {
|
|
1014
|
+
value: "- **Nom** : {name}",
|
|
1015
|
+
description: "Metadata line",
|
|
1016
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1017
|
+
},
|
|
1018
|
+
"export.metaVersion": {
|
|
1019
|
+
value: "- **Version** : {version}",
|
|
1020
|
+
description: "Metadata line",
|
|
1021
|
+
placeholders: [{ name: "version", type: "string" }]
|
|
1022
|
+
},
|
|
1023
|
+
"export.metaOwners": {
|
|
1024
|
+
value: "- **Propri\xE9taires** : {owners}",
|
|
1025
|
+
description: "Metadata line",
|
|
1026
|
+
placeholders: [{ name: "owners", type: "string" }]
|
|
1027
|
+
},
|
|
1028
|
+
"export.metaModel": {
|
|
1029
|
+
value: "- **Mod\xE8le** : {model}",
|
|
1030
|
+
description: "Metadata line",
|
|
1031
|
+
placeholders: [{ name: "model", type: "string" }]
|
|
1032
|
+
},
|
|
1033
|
+
"export.instructions": {
|
|
1034
|
+
value: "## Instructions",
|
|
1035
|
+
description: "Markdown heading"
|
|
1036
|
+
},
|
|
1037
|
+
"export.availableTools": {
|
|
1038
|
+
value: "## Outils disponibles",
|
|
1039
|
+
description: "Markdown heading"
|
|
1040
|
+
},
|
|
1041
|
+
"export.tools": { value: "## Outils", description: "Markdown heading" },
|
|
1042
|
+
"export.knowledgeSources": {
|
|
1043
|
+
value: "## Sources de connaissances",
|
|
1044
|
+
description: "Markdown heading"
|
|
1045
|
+
},
|
|
1046
|
+
"export.policy": {
|
|
1047
|
+
value: "## Politique",
|
|
1048
|
+
description: "Markdown heading"
|
|
1049
|
+
},
|
|
1050
|
+
"export.additionalContext": {
|
|
1051
|
+
value: "## Contexte suppl\xE9mentaire",
|
|
1052
|
+
description: "Markdown heading"
|
|
1053
|
+
},
|
|
1054
|
+
"export.configuration": {
|
|
1055
|
+
value: "## Configuration",
|
|
1056
|
+
description: "Markdown heading"
|
|
1057
|
+
},
|
|
1058
|
+
"export.mcpServers": {
|
|
1059
|
+
value: "## Serveurs MCP",
|
|
1060
|
+
description: "Markdown heading"
|
|
1061
|
+
},
|
|
1062
|
+
"export.parameters": {
|
|
1063
|
+
value: "**Param\xE8tres :**",
|
|
1064
|
+
description: "Parameters label"
|
|
1065
|
+
},
|
|
1066
|
+
"export.requiresApproval": {
|
|
1067
|
+
value: "n\xE9cessite une approbation",
|
|
1068
|
+
description: "Tool flag"
|
|
1069
|
+
},
|
|
1070
|
+
"export.notAutomationSafe": {
|
|
1071
|
+
value: "non compatible avec l'automatisation",
|
|
1072
|
+
description: "Tool flag"
|
|
1073
|
+
},
|
|
1074
|
+
"export.requiresApprovalMd": {
|
|
1075
|
+
value: "*(n\xE9cessite une approbation)*",
|
|
1076
|
+
description: "Markdown tool flag"
|
|
1077
|
+
},
|
|
1078
|
+
"export.notAutomationSafeMd": {
|
|
1079
|
+
value: "*(non compatible avec l'automatisation)*",
|
|
1080
|
+
description: "Markdown tool flag"
|
|
1081
|
+
},
|
|
1082
|
+
"export.required": {
|
|
1083
|
+
value: "(obligatoire)",
|
|
1084
|
+
description: "Required marker"
|
|
1085
|
+
},
|
|
1086
|
+
"export.optional": {
|
|
1087
|
+
value: "(optionnel)",
|
|
1088
|
+
description: "Optional marker"
|
|
1089
|
+
},
|
|
1090
|
+
"export.minConfidence": {
|
|
1091
|
+
value: "- Confiance minimale : {min}",
|
|
1092
|
+
description: "Policy line",
|
|
1093
|
+
placeholders: [{ name: "min", type: "number" }]
|
|
1094
|
+
},
|
|
1095
|
+
"export.escalationConfigured": {
|
|
1096
|
+
value: "- La politique d'escalade est configur\xE9e",
|
|
1097
|
+
description: "Policy line for system prompt"
|
|
1098
|
+
},
|
|
1099
|
+
"export.escalationPolicyConfigured": {
|
|
1100
|
+
value: "- Politique d'escalade configur\xE9e",
|
|
1101
|
+
description: "Policy line for markdown export"
|
|
1102
|
+
},
|
|
1103
|
+
"export.featureFlags": {
|
|
1104
|
+
value: "- Indicateurs de fonctionnalit\xE9s : {flags}",
|
|
1105
|
+
description: "Feature flags policy line",
|
|
1106
|
+
placeholders: [{ name: "flags", type: "string" }]
|
|
1107
|
+
},
|
|
1108
|
+
"export.generatedFrom": {
|
|
1109
|
+
value: "*G\xE9n\xE9r\xE9 \xE0 partir de ContractSpec : {key}*",
|
|
1110
|
+
description: "Footer attribution line",
|
|
1111
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
1112
|
+
},
|
|
1113
|
+
"export.exportedAt": {
|
|
1114
|
+
value: "*Export\xE9 le : {date}*",
|
|
1115
|
+
description: "Footer timestamp",
|
|
1116
|
+
placeholders: [{ name: "date", type: "string" }]
|
|
1117
|
+
},
|
|
1118
|
+
"export.agentType": {
|
|
1119
|
+
value: "> Type d'agent : **{type}**",
|
|
1120
|
+
description: "Agent type callout",
|
|
1121
|
+
placeholders: [{ name: "type", type: "string" }]
|
|
1122
|
+
},
|
|
1123
|
+
"export.noDescription": {
|
|
1124
|
+
value: "Aucune description",
|
|
1125
|
+
description: "Fallback when tool has no description"
|
|
1126
|
+
},
|
|
1127
|
+
"export.validation.requiresKey": {
|
|
1128
|
+
value: "La sp\xE9cification doit avoir une meta.key",
|
|
1129
|
+
description: "Validation error"
|
|
1130
|
+
},
|
|
1131
|
+
"export.validation.requiresInstructions": {
|
|
1132
|
+
value: "La sp\xE9cification doit avoir des instructions",
|
|
1133
|
+
description: "Validation error"
|
|
1134
|
+
},
|
|
1135
|
+
"export.validation.requiresTool": {
|
|
1136
|
+
value: "La sp\xE9cification doit avoir au moins un outil",
|
|
1137
|
+
description: "Validation error"
|
|
1138
|
+
},
|
|
1139
|
+
"export.validation.toolRequiresName": {
|
|
1140
|
+
value: "Tous les outils doivent avoir un nom",
|
|
1141
|
+
description: "Validation error"
|
|
1142
|
+
},
|
|
1143
|
+
"export.validation.toolRequiresDescOrName": {
|
|
1144
|
+
value: "L'outil doit avoir une description ou un nom",
|
|
1145
|
+
description: "Validation error"
|
|
1146
|
+
},
|
|
1147
|
+
"export.validation.toolInvalidName": {
|
|
1148
|
+
value: "Le nom d'outil \xAB {name} \xBB doit \xEAtre un identifiant valide (lettres, chiffres, underscores)",
|
|
1149
|
+
description: "Validation error for invalid tool name",
|
|
1150
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1151
|
+
},
|
|
1152
|
+
"export.agentType.build": {
|
|
1153
|
+
value: "Agent principal avec acc\xE8s complet aux outils pour la g\xE9n\xE9ration et la modification de code.",
|
|
1154
|
+
description: "Build agent type description"
|
|
1155
|
+
},
|
|
1156
|
+
"export.agentType.plan": {
|
|
1157
|
+
value: "Agent restreint pour l'analyse et la planification. Les modifications de fichiers et les commandes bash n\xE9cessitent une approbation.",
|
|
1158
|
+
description: "Plan agent type description"
|
|
1159
|
+
},
|
|
1160
|
+
"export.agentType.general": {
|
|
1161
|
+
value: "Sous-agent g\xE9n\xE9raliste pour les questions complexes et les t\xE2ches en plusieurs \xE9tapes.",
|
|
1162
|
+
description: "General agent type description"
|
|
1163
|
+
},
|
|
1164
|
+
"export.agentType.explore": {
|
|
1165
|
+
value: "Sous-agent rapide optimis\xE9 pour l'exploration de la base de code et la recherche de motifs.",
|
|
1166
|
+
description: "Explore agent type description"
|
|
1167
|
+
},
|
|
1168
|
+
"export.bridge.requiresApproval": {
|
|
1169
|
+
value: "(n\xE9cessite une approbation)",
|
|
1170
|
+
description: "Tool permission label"
|
|
1171
|
+
},
|
|
1172
|
+
"export.bridge.askMode": {
|
|
1173
|
+
value: "(mode interrogation)",
|
|
1174
|
+
description: "Tool permission label"
|
|
1175
|
+
},
|
|
1176
|
+
"approval.toolRequiresApproval": {
|
|
1177
|
+
value: "L'outil \xAB {name} \xBB n\xE9cessite une approbation",
|
|
1178
|
+
description: "Default reason for tool approval requests",
|
|
1179
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1180
|
+
},
|
|
1181
|
+
"log.unifiedAgent.fallback": {
|
|
1182
|
+
value: "[UnifiedAgent] {backend} a \xE9chou\xE9, repli sur {fallback}",
|
|
1183
|
+
description: "Warning when a backend fails and fallback is used",
|
|
1184
|
+
placeholders: [
|
|
1185
|
+
{ name: "backend", type: "string" },
|
|
1186
|
+
{ name: "fallback", type: "string" }
|
|
1187
|
+
]
|
|
1188
|
+
},
|
|
1189
|
+
"log.knowledge.spaceNotAvailable": {
|
|
1190
|
+
value: "L'espace de connaissances requis \xAB {key} \xBB n'est pas disponible",
|
|
1191
|
+
description: "Warning when a required knowledge space is missing",
|
|
1192
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
1193
|
+
},
|
|
1194
|
+
"log.knowledge.loadFailed": {
|
|
1195
|
+
value: "\xC9chec du chargement des connaissances requises \xAB {key} \xBB :",
|
|
1196
|
+
description: "Warning when knowledge loading fails",
|
|
1197
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
1198
|
+
},
|
|
1199
|
+
"log.knowledge.queryFailed": {
|
|
1200
|
+
value: "\xC9chec de l'interrogation de l'espace de connaissances {space} :",
|
|
1201
|
+
description: "Warning when knowledge querying fails",
|
|
1202
|
+
placeholders: [{ name: "space", type: "string" }]
|
|
1203
|
+
},
|
|
1204
|
+
"log.mcpServer.started": {
|
|
1205
|
+
value: "[MCPToolServer] {name}@{version} d\xE9marr\xE9 avec {count} outils",
|
|
1206
|
+
description: "Log message when MCP tool server starts",
|
|
1207
|
+
placeholders: [
|
|
1208
|
+
{ name: "name", type: "string" },
|
|
1209
|
+
{ name: "version", type: "string" },
|
|
1210
|
+
{ name: "count", type: "number" }
|
|
1211
|
+
]
|
|
1212
|
+
},
|
|
1213
|
+
"log.mcpServer.stopped": {
|
|
1214
|
+
value: "[MCPToolServer] {name} arr\xEAt\xE9",
|
|
1215
|
+
description: "Log message when MCP tool server stops",
|
|
1216
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
});
|
|
1220
|
+
});
|
|
1221
|
+
|
|
1222
|
+
// src/i18n/catalogs/es.ts
|
|
1223
|
+
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
1224
|
+
var esMessages;
|
|
1225
|
+
var init_es = __esm(() => {
|
|
1226
|
+
esMessages = defineTranslation3({
|
|
1227
|
+
meta: {
|
|
1228
|
+
key: "ai-agent.messages",
|
|
1229
|
+
version: "1.0.0",
|
|
1230
|
+
domain: "ai-agent",
|
|
1231
|
+
description: "Todas las cadenas de texto orientadas al usuario, al LLM y al desarrollador del paquete ai-agent",
|
|
1232
|
+
owners: ["platform"],
|
|
1233
|
+
stability: "experimental"
|
|
1234
|
+
},
|
|
1235
|
+
locale: "es",
|
|
1236
|
+
fallback: "en",
|
|
1237
|
+
messages: {
|
|
1238
|
+
"agent.json.rules.validJsonOnly": {
|
|
1239
|
+
value: "Usted DEBE generar \xDANICAMENTE JSON v\xE1lido.",
|
|
1240
|
+
description: "Regla del ejecutor JSON: la salida debe ser JSON v\xE1lido"
|
|
1241
|
+
},
|
|
1242
|
+
"agent.json.rules.noMarkdownFences": {
|
|
1243
|
+
value: "No envuelva la salida en bloques de c\xF3digo markdown.",
|
|
1244
|
+
description: "Regla del ejecutor JSON: sin bloques de c\xF3digo markdown"
|
|
1245
|
+
},
|
|
1246
|
+
"agent.json.rules.noCommentary": {
|
|
1247
|
+
value: "No incluya comentarios ni explicaciones.",
|
|
1248
|
+
description: "Regla del ejecutor JSON: sin texto adicional"
|
|
1249
|
+
},
|
|
1250
|
+
"agent.json.rules.doubleQuotes": {
|
|
1251
|
+
value: "Utilice comillas dobles para todas las claves y valores de cadena.",
|
|
1252
|
+
description: "Regla del ejecutor JSON: solo comillas dobles"
|
|
1253
|
+
},
|
|
1254
|
+
"agent.json.rules.noTrailingCommas": {
|
|
1255
|
+
value: "No incluya comas finales.",
|
|
1256
|
+
description: "Regla del ejecutor JSON: sin comas finales"
|
|
1257
|
+
},
|
|
1258
|
+
"agent.json.defaultDescription": {
|
|
1259
|
+
value: "Ejecutor de agentes exclusivamente JSON para pipelines deterministas.",
|
|
1260
|
+
description: "Descripci\xF3n predeterminada para la especificaci\xF3n del ejecutor JSON"
|
|
1261
|
+
},
|
|
1262
|
+
"agent.json.systemPrompt": {
|
|
1263
|
+
value: "Usted es un generador preciso de JSON.",
|
|
1264
|
+
description: "Prompt de sistema predeterminado para el ejecutor JSON"
|
|
1265
|
+
},
|
|
1266
|
+
"knowledge.header": {
|
|
1267
|
+
value: "# Conocimiento de referencia",
|
|
1268
|
+
description: "Encabezado para la secci\xF3n de conocimiento inyectado en el prompt del sistema"
|
|
1269
|
+
},
|
|
1270
|
+
"knowledge.description": {
|
|
1271
|
+
value: "La siguiente informaci\xF3n se proporciona como referencia. Util\xEDcela para fundamentar sus respuestas.",
|
|
1272
|
+
description: "Descripci\xF3n debajo del encabezado de conocimiento"
|
|
1273
|
+
},
|
|
1274
|
+
"tool.knowledge.description": {
|
|
1275
|
+
value: "Consultar bases de conocimiento para obtener informaci\xF3n relevante. Utilice esta herramienta cuando necesite buscar informaci\xF3n espec\xEDfica que pueda no estar en su contexto.",
|
|
1276
|
+
description: "Descripci\xF3n de la herramienta de consulta de conocimiento mostrada al LLM"
|
|
1277
|
+
},
|
|
1278
|
+
"tool.knowledge.availableSpaces": {
|
|
1279
|
+
value: "Espacios de conocimiento disponibles:",
|
|
1280
|
+
description: "Etiqueta antes de listar los espacios de conocimiento disponibles"
|
|
1281
|
+
},
|
|
1282
|
+
"tool.knowledge.spaceDefault": {
|
|
1283
|
+
value: "Espacio de conocimiento",
|
|
1284
|
+
description: "Descripci\xF3n de respaldo para espacios de conocimiento sin nombre"
|
|
1285
|
+
},
|
|
1286
|
+
"tool.knowledge.param.query": {
|
|
1287
|
+
value: "La pregunta o consulta de b\xFAsqueda para encontrar informaci\xF3n relevante",
|
|
1288
|
+
description: "Descripci\xF3n del par\xE1metro para el campo de consulta"
|
|
1289
|
+
},
|
|
1290
|
+
"tool.knowledge.param.spaceKey": {
|
|
1291
|
+
value: "Espacio de conocimiento espec\xEDfico a consultar. Si se omite, busca en todos los espacios disponibles.",
|
|
1292
|
+
description: "Descripci\xF3n del par\xE1metro para el campo spaceKey"
|
|
1293
|
+
},
|
|
1294
|
+
"tool.knowledge.param.topK": {
|
|
1295
|
+
value: "N\xFAmero m\xE1ximo de resultados a devolver",
|
|
1296
|
+
description: "Descripci\xF3n del par\xE1metro para el campo topK"
|
|
1297
|
+
},
|
|
1298
|
+
"tool.knowledge.noResults": {
|
|
1299
|
+
value: "No se encontr\xF3 informaci\xF3n relevante en las bases de conocimiento.",
|
|
1300
|
+
description: "Mensaje cuando no se encuentran resultados de conocimiento"
|
|
1301
|
+
},
|
|
1302
|
+
"tool.knowledge.sourceLabel": {
|
|
1303
|
+
value: "[Fuente {index} - {space}] (relevancia: {score}%)",
|
|
1304
|
+
description: "Etiqueta para cada resultado de b\xFAsqueda de conocimiento",
|
|
1305
|
+
placeholders: [
|
|
1306
|
+
{
|
|
1307
|
+
name: "index",
|
|
1308
|
+
type: "number",
|
|
1309
|
+
description: "\xCDndice de fuente basado en 1"
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
name: "space",
|
|
1313
|
+
type: "string",
|
|
1314
|
+
description: "Nombre del espacio de conocimiento"
|
|
1315
|
+
},
|
|
1316
|
+
{
|
|
1317
|
+
name: "score",
|
|
1318
|
+
type: "number",
|
|
1319
|
+
description: "Porcentaje de relevancia"
|
|
1320
|
+
}
|
|
1321
|
+
]
|
|
1322
|
+
},
|
|
1323
|
+
"tool.fallbackDescription": {
|
|
1324
|
+
value: "Ejecutar {name}",
|
|
1325
|
+
description: "Descripci\xF3n de respaldo cuando una herramienta no tiene descripci\xF3n expl\xEDcita",
|
|
1326
|
+
placeholders: [
|
|
1327
|
+
{
|
|
1328
|
+
name: "name",
|
|
1329
|
+
type: "string",
|
|
1330
|
+
description: "Nombre de la herramienta"
|
|
1331
|
+
}
|
|
1332
|
+
]
|
|
1333
|
+
},
|
|
1334
|
+
"tool.mcp.param.message": {
|
|
1335
|
+
value: "El mensaje o consulta a enviar al agente",
|
|
1336
|
+
description: "Servidor MCP: descripci\xF3n del par\xE1metro message"
|
|
1337
|
+
},
|
|
1338
|
+
"tool.mcp.param.sessionId": {
|
|
1339
|
+
value: "ID de sesi\xF3n opcional para continuar una conversaci\xF3n",
|
|
1340
|
+
description: "Servidor MCP: descripci\xF3n del par\xE1metro sessionId"
|
|
1341
|
+
},
|
|
1342
|
+
"tool.mcp.agentDescription": {
|
|
1343
|
+
value: "Interactuar con el agente {key}",
|
|
1344
|
+
description: "Servidor MCP: descripci\xF3n de la herramienta de agente",
|
|
1345
|
+
placeholders: [
|
|
1346
|
+
{
|
|
1347
|
+
name: "key",
|
|
1348
|
+
type: "string",
|
|
1349
|
+
description: "Clave de la especificaci\xF3n del agente"
|
|
1350
|
+
}
|
|
1351
|
+
]
|
|
1352
|
+
},
|
|
1353
|
+
"tool.mcp.executePrompt": {
|
|
1354
|
+
value: "Ejecute la herramienta {name} con los siguientes argumentos: {args}",
|
|
1355
|
+
description: "Servidor MCP: prompt enviado al ejecutar una herramienta individual",
|
|
1356
|
+
placeholders: [
|
|
1357
|
+
{
|
|
1358
|
+
name: "name",
|
|
1359
|
+
type: "string",
|
|
1360
|
+
description: "Nombre de la herramienta"
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
name: "args",
|
|
1364
|
+
type: "string",
|
|
1365
|
+
description: "Argumentos serializados como JSON"
|
|
1366
|
+
}
|
|
1367
|
+
]
|
|
1368
|
+
},
|
|
1369
|
+
"tool.mcp.toolDescription": {
|
|
1370
|
+
value: "Ejecutar la herramienta {name}",
|
|
1371
|
+
description: "Servidor MCP: descripci\xF3n de herramienta individual",
|
|
1372
|
+
placeholders: [
|
|
1373
|
+
{
|
|
1374
|
+
name: "name",
|
|
1375
|
+
type: "string",
|
|
1376
|
+
description: "Nombre de la herramienta"
|
|
1377
|
+
}
|
|
1378
|
+
]
|
|
1379
|
+
},
|
|
1380
|
+
"interop.prompt.agentIdentity": {
|
|
1381
|
+
value: "# Identidad del agente",
|
|
1382
|
+
description: "Encabezado de secci\xF3n para la identidad del agente en el prompt del LLM"
|
|
1383
|
+
},
|
|
1384
|
+
"interop.prompt.youAre": {
|
|
1385
|
+
value: "Usted es {key} (v{version}).",
|
|
1386
|
+
description: "Declaraci\xF3n de identidad del agente en el prompt del LLM",
|
|
1387
|
+
placeholders: [
|
|
1388
|
+
{ name: "key", type: "string" },
|
|
1389
|
+
{ name: "version", type: "string" }
|
|
1390
|
+
]
|
|
1391
|
+
},
|
|
1392
|
+
"interop.prompt.description": {
|
|
1393
|
+
value: "## Descripci\xF3n",
|
|
1394
|
+
description: "Encabezado de secci\xF3n para la descripci\xF3n"
|
|
1395
|
+
},
|
|
1396
|
+
"interop.prompt.instructions": {
|
|
1397
|
+
value: "## Instrucciones",
|
|
1398
|
+
description: "Encabezado de secci\xF3n para las instrucciones"
|
|
1399
|
+
},
|
|
1400
|
+
"interop.prompt.availableTools": {
|
|
1401
|
+
value: "## Herramientas disponibles",
|
|
1402
|
+
description: "Encabezado de secci\xF3n para las herramientas disponibles"
|
|
1403
|
+
},
|
|
1404
|
+
"interop.prompt.toolsIntro": {
|
|
1405
|
+
value: "Usted tiene acceso a las siguientes herramientas:",
|
|
1406
|
+
description: "Introducci\xF3n antes de listar las herramientas"
|
|
1407
|
+
},
|
|
1408
|
+
"interop.prompt.parameters": {
|
|
1409
|
+
value: "Par\xE1metros:",
|
|
1410
|
+
description: "Etiqueta antes del bloque de par\xE1metros de la herramienta"
|
|
1411
|
+
},
|
|
1412
|
+
"interop.prompt.knowledgeContext": {
|
|
1413
|
+
value: "## Contexto de conocimiento",
|
|
1414
|
+
description: "Encabezado de secci\xF3n para el contexto de conocimiento"
|
|
1415
|
+
},
|
|
1416
|
+
"interop.prompt.additionalContext": {
|
|
1417
|
+
value: "## Contexto adicional",
|
|
1418
|
+
description: "Encabezado de secci\xF3n para el contexto adicional"
|
|
1419
|
+
},
|
|
1420
|
+
"interop.md.toc": {
|
|
1421
|
+
value: "## Tabla de contenidos",
|
|
1422
|
+
description: "Encabezado de tabla de contenidos"
|
|
1423
|
+
},
|
|
1424
|
+
"interop.md.overview": {
|
|
1425
|
+
value: "## Resumen general",
|
|
1426
|
+
description: "Encabezado de resumen general"
|
|
1427
|
+
},
|
|
1428
|
+
"interop.md.tools": {
|
|
1429
|
+
value: "## Herramientas",
|
|
1430
|
+
description: "Encabezado de herramientas"
|
|
1431
|
+
},
|
|
1432
|
+
"interop.md.knowledge": {
|
|
1433
|
+
value: "## Conocimiento",
|
|
1434
|
+
description: "Encabezado de conocimiento"
|
|
1435
|
+
},
|
|
1436
|
+
"interop.md.policy": {
|
|
1437
|
+
value: "## Pol\xEDtica",
|
|
1438
|
+
description: "Encabezado de pol\xEDtica"
|
|
1439
|
+
},
|
|
1440
|
+
"interop.md.metaKey": {
|
|
1441
|
+
value: "- **Clave**: `{key}`",
|
|
1442
|
+
description: "L\xEDnea de metadatos para la clave",
|
|
1443
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
1444
|
+
},
|
|
1445
|
+
"interop.md.metaVersion": {
|
|
1446
|
+
value: "- **Versi\xF3n**: {version}",
|
|
1447
|
+
description: "L\xEDnea de metadatos para la versi\xF3n",
|
|
1448
|
+
placeholders: [{ name: "version", type: "string" }]
|
|
1449
|
+
},
|
|
1450
|
+
"interop.md.metaStability": {
|
|
1451
|
+
value: "- **Estabilidad**: {stability}",
|
|
1452
|
+
description: "L\xEDnea de metadatos para la estabilidad",
|
|
1453
|
+
placeholders: [{ name: "stability", type: "string" }]
|
|
1454
|
+
},
|
|
1455
|
+
"interop.md.metaOwners": {
|
|
1456
|
+
value: "- **Propietarios**: {owners}",
|
|
1457
|
+
description: "L\xEDnea de metadatos para los propietarios",
|
|
1458
|
+
placeholders: [{ name: "owners", type: "string" }]
|
|
1459
|
+
},
|
|
1460
|
+
"interop.md.metaTags": {
|
|
1461
|
+
value: "- **Etiquetas**: {tags}",
|
|
1462
|
+
description: "L\xEDnea de metadatos para las etiquetas",
|
|
1463
|
+
placeholders: [{ name: "tags", type: "string" }]
|
|
1464
|
+
},
|
|
1465
|
+
"interop.md.schema": {
|
|
1466
|
+
value: "**Esquema:**",
|
|
1467
|
+
description: "Etiqueta de esquema"
|
|
1468
|
+
},
|
|
1469
|
+
"interop.md.automationSafe": {
|
|
1470
|
+
value: "**Seguro para automatizaci\xF3n**: {value}",
|
|
1471
|
+
description: "Campo de seguridad para automatizaci\xF3n",
|
|
1472
|
+
placeholders: [{ name: "value", type: "string" }]
|
|
1473
|
+
},
|
|
1474
|
+
"interop.md.required": {
|
|
1475
|
+
value: "(obligatorio)",
|
|
1476
|
+
description: "Marcador de obligatorio"
|
|
1477
|
+
},
|
|
1478
|
+
"interop.md.optional": {
|
|
1479
|
+
value: "(opcional)",
|
|
1480
|
+
description: "Marcador de opcional"
|
|
1481
|
+
},
|
|
1482
|
+
"interop.md.minConfidence": {
|
|
1483
|
+
value: "- **Confianza m\xEDnima**: {min}",
|
|
1484
|
+
description: "L\xEDnea de pol\xEDtica de confianza m\xEDnima",
|
|
1485
|
+
placeholders: [{ name: "min", type: "number" }]
|
|
1486
|
+
},
|
|
1487
|
+
"interop.md.escalationThreshold": {
|
|
1488
|
+
value: "- **Umbral de escalamiento**: {threshold}",
|
|
1489
|
+
description: "L\xEDnea de pol\xEDtica de umbral de escalamiento",
|
|
1490
|
+
placeholders: [{ name: "threshold", type: "number" }]
|
|
1491
|
+
},
|
|
1492
|
+
"interop.md.escalateToolFailure": {
|
|
1493
|
+
value: "- **Escalar ante fallo de herramienta**: S\xED",
|
|
1494
|
+
description: "L\xEDnea de pol\xEDtica de escalamiento ante fallo de herramienta"
|
|
1495
|
+
},
|
|
1496
|
+
"interop.md.escalateTimeout": {
|
|
1497
|
+
value: "- **Escalar ante tiempo de espera agotado**: S\xED",
|
|
1498
|
+
description: "L\xEDnea de pol\xEDtica de escalamiento ante tiempo de espera"
|
|
1499
|
+
},
|
|
1500
|
+
"interop.md.yes": { value: "S\xED", description: "Etiqueta de S\xED" },
|
|
1501
|
+
"interop.md.no": { value: "No", description: "Etiqueta de No" },
|
|
1502
|
+
"error.jsonRunner.requiresModel": {
|
|
1503
|
+
value: "createAgentJsonRunner requiere un modelo o configuraci\xF3n de proveedor",
|
|
1504
|
+
description: "Error cuando el ejecutor JSON no tiene modelo ni proveedor"
|
|
1505
|
+
},
|
|
1506
|
+
"error.missingToolHandler": {
|
|
1507
|
+
value: "Falta el manejador para la herramienta: {name}",
|
|
1508
|
+
description: "Error cuando un manejador de herramienta no est\xE1 registrado",
|
|
1509
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1510
|
+
},
|
|
1511
|
+
"error.unknownBackend": {
|
|
1512
|
+
value: "Backend desconocido: {backend}",
|
|
1513
|
+
description: "Error cuando se especifica un backend desconocido",
|
|
1514
|
+
placeholders: [{ name: "backend", type: "string" }]
|
|
1515
|
+
},
|
|
1516
|
+
"error.claudeSdk.notAvailable": {
|
|
1517
|
+
value: "Claude Agent SDK no disponible. Instale @anthropic-ai/claude-agent-sdk",
|
|
1518
|
+
description: "Error cuando el Claude Agent SDK no est\xE1 disponible"
|
|
1519
|
+
},
|
|
1520
|
+
"error.claudeSdk.notInstalled": {
|
|
1521
|
+
value: "Claude Agent SDK no instalado. Ejecute: npm install @anthropic-ai/claude-agent-sdk",
|
|
1522
|
+
description: "Error cuando no se encuentra el m\xF3dulo del Claude Agent SDK"
|
|
1523
|
+
},
|
|
1524
|
+
"error.opencodeSdk.notAvailable": {
|
|
1525
|
+
value: "OpenCode SDK no disponible. Instale @opencode-ai/sdk",
|
|
1526
|
+
description: "Error cuando el OpenCode SDK no est\xE1 disponible"
|
|
1527
|
+
},
|
|
1528
|
+
"error.opencodeSdk.notInstalled": {
|
|
1529
|
+
value: "OpenCode SDK no instalado. Ejecute: npm install @opencode-ai/sdk",
|
|
1530
|
+
description: "Error cuando no se encuentra el m\xF3dulo del OpenCode SDK"
|
|
1531
|
+
},
|
|
1532
|
+
"error.providerNotInitialized": {
|
|
1533
|
+
value: "Proveedor no inicializado",
|
|
1534
|
+
description: "Error cuando el proveedor no ha sido inicializado antes de su uso"
|
|
1535
|
+
},
|
|
1536
|
+
"error.agentKeyRequired": {
|
|
1537
|
+
value: "La clave del agente es obligatoria",
|
|
1538
|
+
description: "Error de validaci\xF3n: falta la clave del agente"
|
|
1539
|
+
},
|
|
1540
|
+
"error.agentMissingVersion": {
|
|
1541
|
+
value: "Al agente {key} le falta una versi\xF3n de tipo cadena",
|
|
1542
|
+
description: "Error de validaci\xF3n: la versi\xF3n no es una cadena de texto",
|
|
1543
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
1544
|
+
},
|
|
1545
|
+
"error.agentRequiresInstructions": {
|
|
1546
|
+
value: "El agente {key} requiere instrucciones",
|
|
1547
|
+
description: "Error de validaci\xF3n: faltan instrucciones",
|
|
1548
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
1549
|
+
},
|
|
1550
|
+
"error.agentRequiresTool": {
|
|
1551
|
+
value: "El agente {key} debe exponer al menos una herramienta",
|
|
1552
|
+
description: "Error de validaci\xF3n: no hay herramientas definidas",
|
|
1553
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
1554
|
+
},
|
|
1555
|
+
"error.agentDuplicateTool": {
|
|
1556
|
+
value: "El agente {key} tiene un nombre de herramienta duplicado: {name}",
|
|
1557
|
+
description: "Error de validaci\xF3n: nombre de herramienta duplicado",
|
|
1558
|
+
placeholders: [
|
|
1559
|
+
{ name: "key", type: "string" },
|
|
1560
|
+
{ name: "name", type: "string" }
|
|
1561
|
+
]
|
|
1562
|
+
},
|
|
1563
|
+
"error.agentSpecNotFound": {
|
|
1564
|
+
value: "Especificaci\xF3n de agente no encontrada para {name}",
|
|
1565
|
+
description: "Error cuando la especificaci\xF3n del agente no est\xE1 en el registro",
|
|
1566
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1567
|
+
},
|
|
1568
|
+
"error.specNotFound": {
|
|
1569
|
+
value: "Especificaci\xF3n no encontrada: {specKey}",
|
|
1570
|
+
description: "Error cuando no se encuentra una clave de especificaci\xF3n",
|
|
1571
|
+
placeholders: [{ name: "specKey", type: "string" }]
|
|
1572
|
+
},
|
|
1573
|
+
"error.toolNotFound": {
|
|
1574
|
+
value: "Herramienta no encontrada: {name}",
|
|
1575
|
+
description: "Error cuando no se encuentra una herramienta",
|
|
1576
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1577
|
+
},
|
|
1578
|
+
"error.noHandlerForTool": {
|
|
1579
|
+
value: "No hay manejador registrado para la herramienta: {name}",
|
|
1580
|
+
description: "Error cuando no hay manejador registrado para una herramienta",
|
|
1581
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1582
|
+
},
|
|
1583
|
+
"error.noToolHandler": {
|
|
1584
|
+
value: "Sin manejador para la herramienta: {name}",
|
|
1585
|
+
description: "Error breve cuando no existe manejador",
|
|
1586
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1587
|
+
},
|
|
1588
|
+
"error.unknownExportFormat": {
|
|
1589
|
+
value: "Formato de exportaci\xF3n desconocido: {format}",
|
|
1590
|
+
description: "Error para formato de exportaci\xF3n no soportado",
|
|
1591
|
+
placeholders: [{ name: "format", type: "string" }]
|
|
1592
|
+
},
|
|
1593
|
+
"error.handlerNotFoundForTool": {
|
|
1594
|
+
value: "Manejador no encontrado para la herramienta {name}",
|
|
1595
|
+
description: "Error en el puente de herramientas cuando falta el manejador",
|
|
1596
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1597
|
+
},
|
|
1598
|
+
"error.toolNotFoundOrNoHandler": {
|
|
1599
|
+
value: "Error: La herramienta '{name}' no fue encontrada o no tiene manejador",
|
|
1600
|
+
description: "Error devuelto al LLM cuando la ejecuci\xF3n de la herramienta falla",
|
|
1601
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1602
|
+
},
|
|
1603
|
+
"error.toolNoExecuteHandler": {
|
|
1604
|
+
value: "La herramienta {name} no tiene manejador de ejecuci\xF3n",
|
|
1605
|
+
description: "Error cuando la herramienta carece de una funci\xF3n de ejecuci\xF3n",
|
|
1606
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1607
|
+
},
|
|
1608
|
+
"error.provider.notRegistered": {
|
|
1609
|
+
value: "no registrado",
|
|
1610
|
+
description: "Raz\xF3n de disponibilidad del proveedor: no registrado"
|
|
1611
|
+
},
|
|
1612
|
+
"error.provider.depsNotInstalled": {
|
|
1613
|
+
value: "dependencias no instaladas o no configuradas",
|
|
1614
|
+
description: "Raz\xF3n de disponibilidad del proveedor: faltan dependencias"
|
|
1615
|
+
},
|
|
1616
|
+
"error.provider.sdkNotConfigured": {
|
|
1617
|
+
value: "SDK no instalado o clave de API no configurada",
|
|
1618
|
+
description: "Raz\xF3n de disponibilidad del proveedor: falta SDK o clave"
|
|
1619
|
+
},
|
|
1620
|
+
"error.provider.claudeSdkMissing": {
|
|
1621
|
+
value: "@anthropic-ai/claude-agent-sdk no est\xE1 instalado",
|
|
1622
|
+
description: "Error cuando falla require.resolve del Claude Agent SDK"
|
|
1623
|
+
},
|
|
1624
|
+
"error.provider.opencodeSdkMissing": {
|
|
1625
|
+
value: "@opencode-ai/sdk no est\xE1 instalado",
|
|
1626
|
+
description: "Error cuando falla require.resolve del OpenCode SDK"
|
|
1627
|
+
},
|
|
1628
|
+
"error.provider.sdkNotInstalled": {
|
|
1629
|
+
value: "SDK no instalado",
|
|
1630
|
+
description: "Error gen\xE9rico del proveedor: SDK no instalado"
|
|
1631
|
+
},
|
|
1632
|
+
"error.provider.contextCreation": {
|
|
1633
|
+
value: "Error al crear el contexto: {error}",
|
|
1634
|
+
description: "Error durante la creaci\xF3n del contexto del proveedor",
|
|
1635
|
+
placeholders: [{ name: "error", type: "string" }]
|
|
1636
|
+
},
|
|
1637
|
+
"error.provider.executionFailed": {
|
|
1638
|
+
value: "La ejecuci\xF3n fall\xF3: {error}",
|
|
1639
|
+
description: "Error durante la ejecuci\xF3n del proveedor",
|
|
1640
|
+
placeholders: [{ name: "error", type: "string" }]
|
|
1641
|
+
},
|
|
1642
|
+
"error.provider.streamFailed": {
|
|
1643
|
+
value: "El stream fall\xF3: {error}",
|
|
1644
|
+
description: "Error durante el streaming del proveedor",
|
|
1645
|
+
placeholders: [{ name: "error", type: "string" }]
|
|
1646
|
+
},
|
|
1647
|
+
"export.agentConfiguration": {
|
|
1648
|
+
value: "# Configuraci\xF3n del agente",
|
|
1649
|
+
description: "Encabezado Markdown"
|
|
1650
|
+
},
|
|
1651
|
+
"export.metadata": {
|
|
1652
|
+
value: "## Metadatos",
|
|
1653
|
+
description: "Encabezado Markdown"
|
|
1654
|
+
},
|
|
1655
|
+
"export.metaName": {
|
|
1656
|
+
value: "- **Nombre**: {name}",
|
|
1657
|
+
description: "L\xEDnea de metadatos",
|
|
1658
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1659
|
+
},
|
|
1660
|
+
"export.metaVersion": {
|
|
1661
|
+
value: "- **Versi\xF3n**: {version}",
|
|
1662
|
+
description: "L\xEDnea de metadatos",
|
|
1663
|
+
placeholders: [{ name: "version", type: "string" }]
|
|
1664
|
+
},
|
|
1665
|
+
"export.metaOwners": {
|
|
1666
|
+
value: "- **Propietarios**: {owners}",
|
|
1667
|
+
description: "L\xEDnea de metadatos",
|
|
1668
|
+
placeholders: [{ name: "owners", type: "string" }]
|
|
1669
|
+
},
|
|
1670
|
+
"export.metaModel": {
|
|
1671
|
+
value: "- **Modelo**: {model}",
|
|
1672
|
+
description: "L\xEDnea de metadatos",
|
|
1673
|
+
placeholders: [{ name: "model", type: "string" }]
|
|
1674
|
+
},
|
|
1675
|
+
"export.instructions": {
|
|
1676
|
+
value: "## Instrucciones",
|
|
1677
|
+
description: "Encabezado Markdown"
|
|
1678
|
+
},
|
|
1679
|
+
"export.availableTools": {
|
|
1680
|
+
value: "## Herramientas disponibles",
|
|
1681
|
+
description: "Encabezado Markdown"
|
|
1682
|
+
},
|
|
1683
|
+
"export.tools": {
|
|
1684
|
+
value: "## Herramientas",
|
|
1685
|
+
description: "Encabezado Markdown"
|
|
1686
|
+
},
|
|
1687
|
+
"export.knowledgeSources": {
|
|
1688
|
+
value: "## Fuentes de conocimiento",
|
|
1689
|
+
description: "Encabezado Markdown"
|
|
1690
|
+
},
|
|
1691
|
+
"export.policy": {
|
|
1692
|
+
value: "## Pol\xEDtica",
|
|
1693
|
+
description: "Encabezado Markdown"
|
|
1694
|
+
},
|
|
1695
|
+
"export.additionalContext": {
|
|
1696
|
+
value: "## Contexto adicional",
|
|
1697
|
+
description: "Encabezado Markdown"
|
|
1698
|
+
},
|
|
1699
|
+
"export.configuration": {
|
|
1700
|
+
value: "## Configuraci\xF3n",
|
|
1701
|
+
description: "Encabezado Markdown"
|
|
1702
|
+
},
|
|
1703
|
+
"export.mcpServers": {
|
|
1704
|
+
value: "## Servidores MCP",
|
|
1705
|
+
description: "Encabezado Markdown"
|
|
1706
|
+
},
|
|
1707
|
+
"export.parameters": {
|
|
1708
|
+
value: "**Par\xE1metros:**",
|
|
1709
|
+
description: "Etiqueta de par\xE1metros"
|
|
1710
|
+
},
|
|
1711
|
+
"export.requiresApproval": {
|
|
1712
|
+
value: "requiere aprobaci\xF3n",
|
|
1713
|
+
description: "Indicador de herramienta"
|
|
1714
|
+
},
|
|
1715
|
+
"export.notAutomationSafe": {
|
|
1716
|
+
value: "no es seguro para automatizaci\xF3n",
|
|
1717
|
+
description: "Indicador de herramienta"
|
|
1718
|
+
},
|
|
1719
|
+
"export.requiresApprovalMd": {
|
|
1720
|
+
value: "*(requiere aprobaci\xF3n)*",
|
|
1721
|
+
description: "Indicador de herramienta en Markdown"
|
|
1722
|
+
},
|
|
1723
|
+
"export.notAutomationSafeMd": {
|
|
1724
|
+
value: "*(no es seguro para automatizaci\xF3n)*",
|
|
1725
|
+
description: "Indicador de herramienta en Markdown"
|
|
1726
|
+
},
|
|
1727
|
+
"export.required": {
|
|
1728
|
+
value: "(obligatorio)",
|
|
1729
|
+
description: "Marcador de obligatorio"
|
|
1730
|
+
},
|
|
1731
|
+
"export.optional": {
|
|
1732
|
+
value: "(opcional)",
|
|
1733
|
+
description: "Marcador de opcional"
|
|
1734
|
+
},
|
|
1735
|
+
"export.minConfidence": {
|
|
1736
|
+
value: "- Confianza m\xEDnima: {min}",
|
|
1737
|
+
description: "L\xEDnea de pol\xEDtica",
|
|
1738
|
+
placeholders: [{ name: "min", type: "number" }]
|
|
1739
|
+
},
|
|
1740
|
+
"export.escalationConfigured": {
|
|
1741
|
+
value: "- La pol\xEDtica de escalamiento est\xE1 configurada",
|
|
1742
|
+
description: "L\xEDnea de pol\xEDtica para el prompt del sistema"
|
|
1743
|
+
},
|
|
1744
|
+
"export.escalationPolicyConfigured": {
|
|
1745
|
+
value: "- Pol\xEDtica de escalamiento configurada",
|
|
1746
|
+
description: "L\xEDnea de pol\xEDtica para la exportaci\xF3n en Markdown"
|
|
1747
|
+
},
|
|
1748
|
+
"export.featureFlags": {
|
|
1749
|
+
value: "- Indicadores de caracter\xEDsticas: {flags}",
|
|
1750
|
+
description: "L\xEDnea de pol\xEDtica de indicadores de caracter\xEDsticas",
|
|
1751
|
+
placeholders: [{ name: "flags", type: "string" }]
|
|
1752
|
+
},
|
|
1753
|
+
"export.generatedFrom": {
|
|
1754
|
+
value: "*Generado desde ContractSpec: {key}*",
|
|
1755
|
+
description: "L\xEDnea de atribuci\xF3n en el pie",
|
|
1756
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
1757
|
+
},
|
|
1758
|
+
"export.exportedAt": {
|
|
1759
|
+
value: "*Exportado el: {date}*",
|
|
1760
|
+
description: "Marca de tiempo en el pie",
|
|
1761
|
+
placeholders: [{ name: "date", type: "string" }]
|
|
1762
|
+
},
|
|
1763
|
+
"export.agentType": {
|
|
1764
|
+
value: "> Tipo de agente: **{type}**",
|
|
1765
|
+
description: "Llamada de tipo de agente",
|
|
1766
|
+
placeholders: [{ name: "type", type: "string" }]
|
|
1767
|
+
},
|
|
1768
|
+
"export.noDescription": {
|
|
1769
|
+
value: "Sin descripci\xF3n",
|
|
1770
|
+
description: "Texto de respaldo cuando la herramienta no tiene descripci\xF3n"
|
|
1771
|
+
},
|
|
1772
|
+
"export.validation.requiresKey": {
|
|
1773
|
+
value: "La especificaci\xF3n debe tener una meta.key",
|
|
1774
|
+
description: "Error de validaci\xF3n"
|
|
1775
|
+
},
|
|
1776
|
+
"export.validation.requiresInstructions": {
|
|
1777
|
+
value: "La especificaci\xF3n debe tener instrucciones",
|
|
1778
|
+
description: "Error de validaci\xF3n"
|
|
1779
|
+
},
|
|
1780
|
+
"export.validation.requiresTool": {
|
|
1781
|
+
value: "La especificaci\xF3n debe tener al menos una herramienta",
|
|
1782
|
+
description: "Error de validaci\xF3n"
|
|
1783
|
+
},
|
|
1784
|
+
"export.validation.toolRequiresName": {
|
|
1785
|
+
value: "Todas las herramientas deben tener un nombre",
|
|
1786
|
+
description: "Error de validaci\xF3n"
|
|
1787
|
+
},
|
|
1788
|
+
"export.validation.toolRequiresDescOrName": {
|
|
1789
|
+
value: "La herramienta debe tener una descripci\xF3n o un nombre",
|
|
1790
|
+
description: "Error de validaci\xF3n"
|
|
1791
|
+
},
|
|
1792
|
+
"export.validation.toolInvalidName": {
|
|
1793
|
+
value: "El nombre de herramienta '{name}' debe ser un identificador v\xE1lido (letras, n\xFAmeros, guiones bajos)",
|
|
1794
|
+
description: "Error de validaci\xF3n para nombre de herramienta inv\xE1lido",
|
|
1795
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1796
|
+
},
|
|
1797
|
+
"export.agentType.build": {
|
|
1798
|
+
value: "Agente principal con acceso completo a herramientas para la generaci\xF3n y modificaci\xF3n de c\xF3digo.",
|
|
1799
|
+
description: "Descripci\xF3n del tipo de agente de construcci\xF3n"
|
|
1800
|
+
},
|
|
1801
|
+
"export.agentType.plan": {
|
|
1802
|
+
value: "Agente restringido para an\xE1lisis y planificaci\xF3n. Las ediciones de archivos y los comandos bash requieren aprobaci\xF3n.",
|
|
1803
|
+
description: "Descripci\xF3n del tipo de agente de planificaci\xF3n"
|
|
1804
|
+
},
|
|
1805
|
+
"export.agentType.general": {
|
|
1806
|
+
value: "Subagente de prop\xF3sito general para preguntas complejas y tareas de m\xFAltiples pasos.",
|
|
1807
|
+
description: "Descripci\xF3n del tipo de agente general"
|
|
1808
|
+
},
|
|
1809
|
+
"export.agentType.explore": {
|
|
1810
|
+
value: "Subagente r\xE1pido optimizado para exploraci\xF3n de c\xF3digo y b\xFAsqueda de patrones.",
|
|
1811
|
+
description: "Descripci\xF3n del tipo de agente de exploraci\xF3n"
|
|
1812
|
+
},
|
|
1813
|
+
"export.bridge.requiresApproval": {
|
|
1814
|
+
value: "(requiere aprobaci\xF3n)",
|
|
1815
|
+
description: "Etiqueta de permiso de herramienta"
|
|
1816
|
+
},
|
|
1817
|
+
"export.bridge.askMode": {
|
|
1818
|
+
value: "(modo consulta)",
|
|
1819
|
+
description: "Etiqueta de permiso de herramienta"
|
|
1820
|
+
},
|
|
1821
|
+
"approval.toolRequiresApproval": {
|
|
1822
|
+
value: 'La herramienta "{name}" requiere aprobaci\xF3n',
|
|
1823
|
+
description: "Raz\xF3n predeterminada para solicitudes de aprobaci\xF3n de herramientas",
|
|
1824
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1825
|
+
},
|
|
1826
|
+
"log.unifiedAgent.fallback": {
|
|
1827
|
+
value: "[UnifiedAgent] {backend} fall\xF3, recurriendo a {fallback}",
|
|
1828
|
+
description: "Advertencia cuando un backend falla y se utiliza el respaldo",
|
|
1829
|
+
placeholders: [
|
|
1830
|
+
{ name: "backend", type: "string" },
|
|
1831
|
+
{ name: "fallback", type: "string" }
|
|
1832
|
+
]
|
|
1833
|
+
},
|
|
1834
|
+
"log.knowledge.spaceNotAvailable": {
|
|
1835
|
+
value: 'El espacio de conocimiento requerido "{key}" no est\xE1 disponible',
|
|
1836
|
+
description: "Advertencia cuando un espacio de conocimiento requerido no existe",
|
|
1837
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
1838
|
+
},
|
|
1839
|
+
"log.knowledge.loadFailed": {
|
|
1840
|
+
value: 'Error al cargar el conocimiento requerido "{key}":',
|
|
1841
|
+
description: "Advertencia cuando falla la carga de conocimiento",
|
|
1842
|
+
placeholders: [{ name: "key", type: "string" }]
|
|
1843
|
+
},
|
|
1844
|
+
"log.knowledge.queryFailed": {
|
|
1845
|
+
value: "Error al consultar el espacio de conocimiento {space}:",
|
|
1846
|
+
description: "Advertencia cuando falla la consulta de conocimiento",
|
|
1847
|
+
placeholders: [{ name: "space", type: "string" }]
|
|
1848
|
+
},
|
|
1849
|
+
"log.mcpServer.started": {
|
|
1850
|
+
value: "[MCPToolServer] Iniciado {name}@{version} con {count} herramientas",
|
|
1851
|
+
description: "Mensaje de registro cuando el servidor de herramientas MCP se inicia",
|
|
1852
|
+
placeholders: [
|
|
1853
|
+
{ name: "name", type: "string" },
|
|
1854
|
+
{ name: "version", type: "string" },
|
|
1855
|
+
{ name: "count", type: "number" }
|
|
1856
|
+
]
|
|
1857
|
+
},
|
|
1858
|
+
"log.mcpServer.stopped": {
|
|
1859
|
+
value: "[MCPToolServer] Detenido {name}",
|
|
1860
|
+
description: "Mensaje de registro cuando el servidor de herramientas MCP se detiene",
|
|
1861
|
+
placeholders: [{ name: "name", type: "string" }]
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
});
|
|
1865
|
+
});
|
|
1866
|
+
|
|
1867
|
+
// src/i18n/locale.ts
|
|
1868
|
+
function resolveLocale(specLocale, runtimeLocale) {
|
|
1869
|
+
const raw = runtimeLocale ?? specLocale ?? DEFAULT_LOCALE;
|
|
1870
|
+
if (isSupportedLocale(raw)) {
|
|
1871
|
+
return raw;
|
|
1872
|
+
}
|
|
1873
|
+
const base = raw.split("-")[0];
|
|
1874
|
+
if (base && isSupportedLocale(base)) {
|
|
1875
|
+
return base;
|
|
1876
|
+
}
|
|
1877
|
+
return DEFAULT_LOCALE;
|
|
1878
|
+
}
|
|
1879
|
+
function isSupportedLocale(locale) {
|
|
1880
|
+
return SUPPORTED_LOCALES.includes(locale);
|
|
1881
|
+
}
|
|
1882
|
+
var DEFAULT_LOCALE = "en", SUPPORTED_LOCALES;
|
|
1883
|
+
var init_locale = __esm(() => {
|
|
1884
|
+
SUPPORTED_LOCALES = ["en", "fr", "es"];
|
|
1885
|
+
});
|
|
1886
|
+
|
|
1887
|
+
// src/i18n/messages.ts
|
|
1888
|
+
import { TranslationRegistry } from "@contractspec/lib.contracts-spec/translations";
|
|
1889
|
+
function getRegistry() {
|
|
1890
|
+
if (!sharedRegistry) {
|
|
1891
|
+
sharedRegistry = new TranslationRegistry([
|
|
1892
|
+
enMessages,
|
|
1893
|
+
frMessages,
|
|
1894
|
+
esMessages
|
|
1895
|
+
]);
|
|
1896
|
+
}
|
|
1897
|
+
return sharedRegistry;
|
|
1898
|
+
}
|
|
1899
|
+
function interpolate(template, params) {
|
|
1900
|
+
if (!params)
|
|
1901
|
+
return template;
|
|
1902
|
+
return template.replace(/\{(\w+)\}/g, (match, key) => {
|
|
1903
|
+
if (key in params) {
|
|
1904
|
+
return String(params[key]);
|
|
1905
|
+
}
|
|
1906
|
+
return match;
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
function createAgentI18n(specLocale, runtimeLocale) {
|
|
1910
|
+
const locale = resolveLocale(specLocale, runtimeLocale);
|
|
1911
|
+
const registry = getRegistry();
|
|
1912
|
+
return {
|
|
1913
|
+
locale,
|
|
1914
|
+
t(key, params) {
|
|
1915
|
+
const raw = registry.getValue(SPEC_KEY, key, locale, key);
|
|
1916
|
+
return interpolate(raw, params);
|
|
1917
|
+
}
|
|
1918
|
+
};
|
|
1919
|
+
}
|
|
1920
|
+
function getDefaultI18n() {
|
|
1921
|
+
return createAgentI18n(DEFAULT_LOCALE);
|
|
1922
|
+
}
|
|
1923
|
+
function resetI18nRegistry() {
|
|
1924
|
+
sharedRegistry = null;
|
|
1925
|
+
}
|
|
1926
|
+
var SPEC_KEY = "ai-agent.messages", sharedRegistry = null;
|
|
1927
|
+
var init_messages = __esm(() => {
|
|
1928
|
+
init_en();
|
|
1929
|
+
init_fr();
|
|
1930
|
+
init_es();
|
|
1931
|
+
init_locale();
|
|
1932
|
+
});
|
|
1933
|
+
|
|
1934
|
+
// src/i18n/keys.ts
|
|
1935
|
+
var AGENT_KEYS, KNOWLEDGE_KEYS, TOOL_KEYS, INTEROP_KEYS, ERROR_KEYS, EXPORT_KEYS, APPROVAL_KEYS, LOG_KEYS, I18N_KEYS;
|
|
1936
|
+
var init_keys = __esm(() => {
|
|
1937
|
+
AGENT_KEYS = {
|
|
1938
|
+
"agent.json.rules.validJsonOnly": "agent.json.rules.validJsonOnly",
|
|
1939
|
+
"agent.json.rules.noMarkdownFences": "agent.json.rules.noMarkdownFences",
|
|
1940
|
+
"agent.json.rules.noCommentary": "agent.json.rules.noCommentary",
|
|
1941
|
+
"agent.json.rules.doubleQuotes": "agent.json.rules.doubleQuotes",
|
|
1942
|
+
"agent.json.rules.noTrailingCommas": "agent.json.rules.noTrailingCommas",
|
|
1943
|
+
"agent.json.defaultDescription": "agent.json.defaultDescription",
|
|
1944
|
+
"agent.json.systemPrompt": "agent.json.systemPrompt"
|
|
1945
|
+
};
|
|
1946
|
+
KNOWLEDGE_KEYS = {
|
|
1947
|
+
"knowledge.header": "knowledge.header",
|
|
1948
|
+
"knowledge.description": "knowledge.description"
|
|
1949
|
+
};
|
|
1950
|
+
TOOL_KEYS = {
|
|
1951
|
+
"tool.knowledge.description": "tool.knowledge.description",
|
|
1952
|
+
"tool.knowledge.availableSpaces": "tool.knowledge.availableSpaces",
|
|
1953
|
+
"tool.knowledge.spaceDefault": "tool.knowledge.spaceDefault",
|
|
1954
|
+
"tool.knowledge.param.query": "tool.knowledge.param.query",
|
|
1955
|
+
"tool.knowledge.param.spaceKey": "tool.knowledge.param.spaceKey",
|
|
1956
|
+
"tool.knowledge.param.topK": "tool.knowledge.param.topK",
|
|
1957
|
+
"tool.knowledge.noResults": "tool.knowledge.noResults",
|
|
1958
|
+
"tool.knowledge.sourceLabel": "tool.knowledge.sourceLabel",
|
|
1959
|
+
"tool.fallbackDescription": "tool.fallbackDescription",
|
|
1960
|
+
"tool.mcp.param.message": "tool.mcp.param.message",
|
|
1961
|
+
"tool.mcp.param.sessionId": "tool.mcp.param.sessionId",
|
|
1962
|
+
"tool.mcp.agentDescription": "tool.mcp.agentDescription",
|
|
1963
|
+
"tool.mcp.executePrompt": "tool.mcp.executePrompt",
|
|
1964
|
+
"tool.mcp.toolDescription": "tool.mcp.toolDescription"
|
|
1965
|
+
};
|
|
1966
|
+
INTEROP_KEYS = {
|
|
1967
|
+
"interop.prompt.agentIdentity": "interop.prompt.agentIdentity",
|
|
1968
|
+
"interop.prompt.youAre": "interop.prompt.youAre",
|
|
1969
|
+
"interop.prompt.description": "interop.prompt.description",
|
|
1970
|
+
"interop.prompt.instructions": "interop.prompt.instructions",
|
|
1971
|
+
"interop.prompt.availableTools": "interop.prompt.availableTools",
|
|
1972
|
+
"interop.prompt.toolsIntro": "interop.prompt.toolsIntro",
|
|
1973
|
+
"interop.prompt.parameters": "interop.prompt.parameters",
|
|
1974
|
+
"interop.prompt.knowledgeContext": "interop.prompt.knowledgeContext",
|
|
1975
|
+
"interop.prompt.additionalContext": "interop.prompt.additionalContext",
|
|
1976
|
+
"interop.md.toc": "interop.md.toc",
|
|
1977
|
+
"interop.md.overview": "interop.md.overview",
|
|
1978
|
+
"interop.md.tools": "interop.md.tools",
|
|
1979
|
+
"interop.md.knowledge": "interop.md.knowledge",
|
|
1980
|
+
"interop.md.policy": "interop.md.policy",
|
|
1981
|
+
"interop.md.metaKey": "interop.md.metaKey",
|
|
1982
|
+
"interop.md.metaVersion": "interop.md.metaVersion",
|
|
1983
|
+
"interop.md.metaStability": "interop.md.metaStability",
|
|
1984
|
+
"interop.md.metaOwners": "interop.md.metaOwners",
|
|
1985
|
+
"interop.md.metaTags": "interop.md.metaTags",
|
|
1986
|
+
"interop.md.schema": "interop.md.schema",
|
|
1987
|
+
"interop.md.automationSafe": "interop.md.automationSafe",
|
|
1988
|
+
"interop.md.required": "interop.md.required",
|
|
1989
|
+
"interop.md.optional": "interop.md.optional",
|
|
1990
|
+
"interop.md.minConfidence": "interop.md.minConfidence",
|
|
1991
|
+
"interop.md.escalationThreshold": "interop.md.escalationThreshold",
|
|
1992
|
+
"interop.md.escalateToolFailure": "interop.md.escalateToolFailure",
|
|
1993
|
+
"interop.md.escalateTimeout": "interop.md.escalateTimeout",
|
|
1994
|
+
"interop.md.yes": "interop.md.yes",
|
|
1995
|
+
"interop.md.no": "interop.md.no"
|
|
1996
|
+
};
|
|
1997
|
+
ERROR_KEYS = {
|
|
1998
|
+
"error.jsonRunner.requiresModel": "error.jsonRunner.requiresModel",
|
|
1999
|
+
"error.missingToolHandler": "error.missingToolHandler",
|
|
2000
|
+
"error.unknownBackend": "error.unknownBackend",
|
|
2001
|
+
"error.claudeSdk.notAvailable": "error.claudeSdk.notAvailable",
|
|
2002
|
+
"error.claudeSdk.notInstalled": "error.claudeSdk.notInstalled",
|
|
2003
|
+
"error.opencodeSdk.notAvailable": "error.opencodeSdk.notAvailable",
|
|
2004
|
+
"error.opencodeSdk.notInstalled": "error.opencodeSdk.notInstalled",
|
|
2005
|
+
"error.providerNotInitialized": "error.providerNotInitialized",
|
|
2006
|
+
"error.agentKeyRequired": "error.agentKeyRequired",
|
|
2007
|
+
"error.agentMissingVersion": "error.agentMissingVersion",
|
|
2008
|
+
"error.agentRequiresInstructions": "error.agentRequiresInstructions",
|
|
2009
|
+
"error.agentRequiresTool": "error.agentRequiresTool",
|
|
2010
|
+
"error.agentDuplicateTool": "error.agentDuplicateTool",
|
|
2011
|
+
"error.agentSpecNotFound": "error.agentSpecNotFound",
|
|
2012
|
+
"error.specNotFound": "error.specNotFound",
|
|
2013
|
+
"error.toolNotFound": "error.toolNotFound",
|
|
2014
|
+
"error.noHandlerForTool": "error.noHandlerForTool",
|
|
2015
|
+
"error.noToolHandler": "error.noToolHandler",
|
|
2016
|
+
"error.unknownExportFormat": "error.unknownExportFormat",
|
|
2017
|
+
"error.handlerNotFoundForTool": "error.handlerNotFoundForTool",
|
|
2018
|
+
"error.toolNotFoundOrNoHandler": "error.toolNotFoundOrNoHandler",
|
|
2019
|
+
"error.toolNoExecuteHandler": "error.toolNoExecuteHandler",
|
|
2020
|
+
"error.provider.notRegistered": "error.provider.notRegistered",
|
|
2021
|
+
"error.provider.depsNotInstalled": "error.provider.depsNotInstalled",
|
|
2022
|
+
"error.provider.sdkNotConfigured": "error.provider.sdkNotConfigured",
|
|
2023
|
+
"error.provider.claudeSdkMissing": "error.provider.claudeSdkMissing",
|
|
2024
|
+
"error.provider.opencodeSdkMissing": "error.provider.opencodeSdkMissing",
|
|
2025
|
+
"error.provider.sdkNotInstalled": "error.provider.sdkNotInstalled",
|
|
2026
|
+
"error.provider.contextCreation": "error.provider.contextCreation",
|
|
2027
|
+
"error.provider.executionFailed": "error.provider.executionFailed",
|
|
2028
|
+
"error.provider.streamFailed": "error.provider.streamFailed"
|
|
2029
|
+
};
|
|
2030
|
+
EXPORT_KEYS = {
|
|
2031
|
+
"export.agentConfiguration": "export.agentConfiguration",
|
|
2032
|
+
"export.metadata": "export.metadata",
|
|
2033
|
+
"export.metaName": "export.metaName",
|
|
2034
|
+
"export.metaVersion": "export.metaVersion",
|
|
2035
|
+
"export.metaOwners": "export.metaOwners",
|
|
2036
|
+
"export.metaModel": "export.metaModel",
|
|
2037
|
+
"export.instructions": "export.instructions",
|
|
2038
|
+
"export.availableTools": "export.availableTools",
|
|
2039
|
+
"export.tools": "export.tools",
|
|
2040
|
+
"export.knowledgeSources": "export.knowledgeSources",
|
|
2041
|
+
"export.policy": "export.policy",
|
|
2042
|
+
"export.additionalContext": "export.additionalContext",
|
|
2043
|
+
"export.configuration": "export.configuration",
|
|
2044
|
+
"export.mcpServers": "export.mcpServers",
|
|
2045
|
+
"export.parameters": "export.parameters",
|
|
2046
|
+
"export.requiresApproval": "export.requiresApproval",
|
|
2047
|
+
"export.notAutomationSafe": "export.notAutomationSafe",
|
|
2048
|
+
"export.requiresApprovalMd": "export.requiresApprovalMd",
|
|
2049
|
+
"export.notAutomationSafeMd": "export.notAutomationSafeMd",
|
|
2050
|
+
"export.required": "export.required",
|
|
2051
|
+
"export.optional": "export.optional",
|
|
2052
|
+
"export.minConfidence": "export.minConfidence",
|
|
2053
|
+
"export.escalationConfigured": "export.escalationConfigured",
|
|
2054
|
+
"export.escalationPolicyConfigured": "export.escalationPolicyConfigured",
|
|
2055
|
+
"export.featureFlags": "export.featureFlags",
|
|
2056
|
+
"export.generatedFrom": "export.generatedFrom",
|
|
2057
|
+
"export.exportedAt": "export.exportedAt",
|
|
2058
|
+
"export.agentType": "export.agentType",
|
|
2059
|
+
"export.noDescription": "export.noDescription",
|
|
2060
|
+
"export.validation.requiresKey": "export.validation.requiresKey",
|
|
2061
|
+
"export.validation.requiresInstructions": "export.validation.requiresInstructions",
|
|
2062
|
+
"export.validation.requiresTool": "export.validation.requiresTool",
|
|
2063
|
+
"export.validation.toolRequiresName": "export.validation.toolRequiresName",
|
|
2064
|
+
"export.validation.toolRequiresDescOrName": "export.validation.toolRequiresDescOrName",
|
|
2065
|
+
"export.validation.toolInvalidName": "export.validation.toolInvalidName",
|
|
2066
|
+
"export.agentType.build": "export.agentType.build",
|
|
2067
|
+
"export.agentType.plan": "export.agentType.plan",
|
|
2068
|
+
"export.agentType.general": "export.agentType.general",
|
|
2069
|
+
"export.agentType.explore": "export.agentType.explore",
|
|
2070
|
+
"export.bridge.requiresApproval": "export.bridge.requiresApproval",
|
|
2071
|
+
"export.bridge.askMode": "export.bridge.askMode"
|
|
2072
|
+
};
|
|
2073
|
+
APPROVAL_KEYS = {
|
|
2074
|
+
"approval.toolRequiresApproval": "approval.toolRequiresApproval"
|
|
2075
|
+
};
|
|
2076
|
+
LOG_KEYS = {
|
|
2077
|
+
"log.unifiedAgent.fallback": "log.unifiedAgent.fallback",
|
|
2078
|
+
"log.knowledge.spaceNotAvailable": "log.knowledge.spaceNotAvailable",
|
|
2079
|
+
"log.knowledge.loadFailed": "log.knowledge.loadFailed",
|
|
2080
|
+
"log.knowledge.queryFailed": "log.knowledge.queryFailed",
|
|
2081
|
+
"log.mcpServer.started": "log.mcpServer.started",
|
|
2082
|
+
"log.mcpServer.stopped": "log.mcpServer.stopped"
|
|
2083
|
+
};
|
|
2084
|
+
I18N_KEYS = {
|
|
2085
|
+
...AGENT_KEYS,
|
|
2086
|
+
...KNOWLEDGE_KEYS,
|
|
2087
|
+
...TOOL_KEYS,
|
|
2088
|
+
...INTEROP_KEYS,
|
|
2089
|
+
...ERROR_KEYS,
|
|
2090
|
+
...EXPORT_KEYS,
|
|
2091
|
+
...APPROVAL_KEYS,
|
|
2092
|
+
...LOG_KEYS
|
|
2093
|
+
};
|
|
2094
|
+
});
|
|
2095
|
+
|
|
2096
|
+
// src/i18n/index.ts
|
|
2097
|
+
var init_i18n = __esm(() => {
|
|
2098
|
+
init_messages();
|
|
2099
|
+
init_locale();
|
|
2100
|
+
init_keys();
|
|
2101
|
+
init_en();
|
|
2102
|
+
init_fr();
|
|
2103
|
+
init_es();
|
|
2104
|
+
});
|
|
2105
|
+
|
|
15
2106
|
// src/spec/spec.ts
|
|
16
2107
|
function defineAgent(spec) {
|
|
2108
|
+
const i18n = getDefaultI18n();
|
|
17
2109
|
if (!spec.meta?.key) {
|
|
18
|
-
throw new Error("
|
|
2110
|
+
throw new Error(i18n.t("error.agentKeyRequired"));
|
|
19
2111
|
}
|
|
20
2112
|
if (typeof spec.meta.version !== "string") {
|
|
21
|
-
throw new Error(
|
|
2113
|
+
throw new Error(i18n.t("error.agentMissingVersion", { key: spec.meta.key }));
|
|
22
2114
|
}
|
|
23
2115
|
if (!spec.instructions?.trim()) {
|
|
24
|
-
throw new Error(
|
|
2116
|
+
throw new Error(i18n.t("error.agentRequiresInstructions", { key: spec.meta.key }));
|
|
25
2117
|
}
|
|
26
2118
|
if (!spec.tools?.length) {
|
|
27
|
-
throw new Error(
|
|
2119
|
+
throw new Error(i18n.t("error.agentRequiresTool", { key: spec.meta.key }));
|
|
28
2120
|
}
|
|
29
2121
|
const toolNames = new Set;
|
|
30
2122
|
for (const tool of spec.tools) {
|
|
31
2123
|
if (toolNames.has(tool.name)) {
|
|
32
|
-
throw new Error(
|
|
2124
|
+
throw new Error(i18n.t("error.agentDuplicateTool", {
|
|
2125
|
+
key: spec.meta.key,
|
|
2126
|
+
name: tool.name
|
|
2127
|
+
}));
|
|
33
2128
|
}
|
|
34
2129
|
toolNames.add(tool.name);
|
|
35
2130
|
}
|
|
@@ -38,6 +2133,9 @@ function defineAgent(spec) {
|
|
|
38
2133
|
function agentKey(meta) {
|
|
39
2134
|
return `${meta.key}.v${meta.version}`;
|
|
40
2135
|
}
|
|
2136
|
+
var init_spec = __esm(() => {
|
|
2137
|
+
init_i18n();
|
|
2138
|
+
});
|
|
41
2139
|
|
|
42
2140
|
// src/schema/json-schema-to-zod.ts
|
|
43
2141
|
import { z } from "zod";
|
|
@@ -197,7 +2295,7 @@ function specToolsToAISDKTools(specTools, handlers, context = {}) {
|
|
|
197
2295
|
for (const specTool of specTools) {
|
|
198
2296
|
const handler = handlers.get(specTool.name);
|
|
199
2297
|
if (!handler) {
|
|
200
|
-
throw new Error(
|
|
2298
|
+
throw new Error(getDefaultI18n().t("error.missingToolHandler", { name: specTool.name }));
|
|
201
2299
|
}
|
|
202
2300
|
tools[specTool.name] = specToolToAISDKTool(specTool, handler, context);
|
|
203
2301
|
}
|
|
@@ -213,27 +2311,29 @@ function buildToolHandlers(handlersObj) {
|
|
|
213
2311
|
}
|
|
214
2312
|
var init_tool_adapter = __esm(() => {
|
|
215
2313
|
init_json_schema_to_zod();
|
|
2314
|
+
init_i18n();
|
|
216
2315
|
});
|
|
217
2316
|
|
|
218
2317
|
// src/tools/knowledge-tool.ts
|
|
219
2318
|
import { tool as tool2 } from "ai";
|
|
220
2319
|
import * as z2 from "zod";
|
|
221
|
-
function createKnowledgeQueryTool(retriever, knowledgeRefs) {
|
|
2320
|
+
function createKnowledgeQueryTool(retriever, knowledgeRefs, locale) {
|
|
2321
|
+
const i18n = createAgentI18n(locale);
|
|
222
2322
|
const optionalSpaces = knowledgeRefs.filter((k) => !k.required).map((k) => k.key).filter((key) => retriever.supportsSpace(key));
|
|
223
2323
|
if (optionalSpaces.length === 0) {
|
|
224
2324
|
return null;
|
|
225
2325
|
}
|
|
226
|
-
const spaceDescriptions = knowledgeRefs.filter((k) => !k.required && retriever.supportsSpace(k.key)).map((k) => `- ${k.key}: ${k.instructions ?? "
|
|
2326
|
+
const spaceDescriptions = knowledgeRefs.filter((k) => !k.required && retriever.supportsSpace(k.key)).map((k) => `- ${k.key}: ${k.instructions ?? i18n.t("tool.knowledge.spaceDefault")}`).join(`
|
|
227
2327
|
`);
|
|
228
2328
|
return tool2({
|
|
229
|
-
description:
|
|
2329
|
+
description: `${i18n.t("tool.knowledge.description")}
|
|
230
2330
|
|
|
231
|
-
|
|
2331
|
+
${i18n.t("tool.knowledge.availableSpaces")}
|
|
232
2332
|
${spaceDescriptions}`,
|
|
233
2333
|
inputSchema: z2.object({
|
|
234
|
-
query: z2.string().describe("
|
|
235
|
-
spaceKey: z2.enum(optionalSpaces).optional().describe("
|
|
236
|
-
topK: z2.number().optional().default(5).describe("
|
|
2334
|
+
query: z2.string().describe(i18n.t("tool.knowledge.param.query")),
|
|
2335
|
+
spaceKey: z2.enum(optionalSpaces).optional().describe(i18n.t("tool.knowledge.param.spaceKey")),
|
|
2336
|
+
topK: z2.number().optional().default(5).describe(i18n.t("tool.knowledge.param.topK"))
|
|
237
2337
|
}),
|
|
238
2338
|
execute: async ({ query, spaceKey, topK }) => {
|
|
239
2339
|
const spacesToSearch = spaceKey ? [spaceKey] : optionalSpaces;
|
|
@@ -252,15 +2352,15 @@ ${spaceDescriptions}`,
|
|
|
252
2352
|
});
|
|
253
2353
|
}
|
|
254
2354
|
} catch (error) {
|
|
255
|
-
console.warn(
|
|
2355
|
+
console.warn(i18n.t("log.knowledge.queryFailed", { space }), error);
|
|
256
2356
|
}
|
|
257
2357
|
}
|
|
258
2358
|
if (allResults.length === 0) {
|
|
259
|
-
return "
|
|
2359
|
+
return i18n.t("tool.knowledge.noResults");
|
|
260
2360
|
}
|
|
261
2361
|
allResults.sort((a, b) => b.score - a.score);
|
|
262
2362
|
const topResults = allResults.slice(0, topK ?? 5);
|
|
263
|
-
return topResults.map((r, i) =>
|
|
2363
|
+
return topResults.map((r, i) => `${i18n.t("tool.knowledge.sourceLabel", { index: i + 1, space: r.space, score: (r.score * 100).toFixed(0) })}
|
|
264
2364
|
${r.content}`).join(`
|
|
265
2365
|
|
|
266
2366
|
---
|
|
@@ -269,19 +2369,22 @@ ${r.content}`).join(`
|
|
|
269
2369
|
}
|
|
270
2370
|
});
|
|
271
2371
|
}
|
|
272
|
-
var init_knowledge_tool = () => {
|
|
2372
|
+
var init_knowledge_tool = __esm(() => {
|
|
2373
|
+
init_i18n();
|
|
2374
|
+
});
|
|
273
2375
|
|
|
274
2376
|
// src/knowledge/injector.ts
|
|
275
|
-
async function injectStaticKnowledge(instructions, knowledgeRefs, retriever) {
|
|
2377
|
+
async function injectStaticKnowledge(instructions, knowledgeRefs, retriever, locale) {
|
|
276
2378
|
if (!retriever)
|
|
277
2379
|
return instructions;
|
|
278
2380
|
const requiredRefs = knowledgeRefs.filter((ref) => ref.required);
|
|
279
2381
|
if (requiredRefs.length === 0)
|
|
280
2382
|
return instructions;
|
|
2383
|
+
const i18n = createAgentI18n(locale);
|
|
281
2384
|
const blocks = [];
|
|
282
2385
|
for (const ref of requiredRefs) {
|
|
283
2386
|
if (!retriever.supportsSpace(ref.key)) {
|
|
284
|
-
console.warn(
|
|
2387
|
+
console.warn(i18n.t("log.knowledge.spaceNotAvailable", { key: ref.key }));
|
|
285
2388
|
continue;
|
|
286
2389
|
}
|
|
287
2390
|
try {
|
|
@@ -294,7 +2397,7 @@ ${ref.instructions}` : `## ${ref.key}`;
|
|
|
294
2397
|
${content}`);
|
|
295
2398
|
}
|
|
296
2399
|
} catch (error) {
|
|
297
|
-
console.warn(
|
|
2400
|
+
console.warn(i18n.t("log.knowledge.loadFailed", { key: ref.key }), error);
|
|
298
2401
|
}
|
|
299
2402
|
}
|
|
300
2403
|
if (blocks.length === 0)
|
|
@@ -303,9 +2406,9 @@ ${content}`);
|
|
|
303
2406
|
|
|
304
2407
|
---
|
|
305
2408
|
|
|
306
|
-
#
|
|
2409
|
+
# ${i18n.t("knowledge.header")}
|
|
307
2410
|
|
|
308
|
-
|
|
2411
|
+
${i18n.t("knowledge.description")}
|
|
309
2412
|
|
|
310
2413
|
${blocks.join(`
|
|
311
2414
|
|
|
@@ -313,21 +2416,33 @@ ${blocks.join(`
|
|
|
313
2416
|
|
|
314
2417
|
`)}`;
|
|
315
2418
|
}
|
|
316
|
-
function createKnowledgeInjector(retriever) {
|
|
2419
|
+
function createKnowledgeInjector(retriever, locale) {
|
|
317
2420
|
return {
|
|
318
|
-
inject: (instructions, knowledgeRefs) => injectStaticKnowledge(instructions, knowledgeRefs, retriever),
|
|
2421
|
+
inject: (instructions, knowledgeRefs) => injectStaticKnowledge(instructions, knowledgeRefs, retriever, locale),
|
|
319
2422
|
hasSpace: (spaceKey) => retriever?.supportsSpace(spaceKey) ?? false,
|
|
320
2423
|
listSpaces: () => retriever?.listSpaces() ?? []
|
|
321
2424
|
};
|
|
322
2425
|
}
|
|
2426
|
+
var init_injector = __esm(() => {
|
|
2427
|
+
init_i18n();
|
|
2428
|
+
});
|
|
323
2429
|
|
|
324
2430
|
// src/session/store.ts
|
|
325
2431
|
class InMemorySessionStore {
|
|
326
2432
|
sessions = new Map;
|
|
2433
|
+
maxSessions;
|
|
2434
|
+
maxMessagesPerSession;
|
|
2435
|
+
maxStepsPerSession;
|
|
2436
|
+
constructor(options = {}) {
|
|
2437
|
+
this.maxSessions = options.maxSessions ?? 500;
|
|
2438
|
+
this.maxMessagesPerSession = options.maxMessagesPerSession ?? 200;
|
|
2439
|
+
this.maxStepsPerSession = options.maxStepsPerSession ?? 200;
|
|
2440
|
+
}
|
|
327
2441
|
async get(sessionId) {
|
|
328
2442
|
return this.sessions.get(sessionId) ?? null;
|
|
329
2443
|
}
|
|
330
2444
|
async create(session) {
|
|
2445
|
+
this.evictIfNeeded();
|
|
331
2446
|
const now = new Date;
|
|
332
2447
|
const fullSession = {
|
|
333
2448
|
...session,
|
|
@@ -341,6 +2456,7 @@ class InMemorySessionStore {
|
|
|
341
2456
|
const session = this.sessions.get(sessionId);
|
|
342
2457
|
if (session) {
|
|
343
2458
|
session.steps.push(step);
|
|
2459
|
+
this.trimArray(session.steps, this.maxStepsPerSession);
|
|
344
2460
|
session.updatedAt = new Date;
|
|
345
2461
|
}
|
|
346
2462
|
}
|
|
@@ -348,6 +2464,7 @@ class InMemorySessionStore {
|
|
|
348
2464
|
const session = this.sessions.get(sessionId);
|
|
349
2465
|
if (session) {
|
|
350
2466
|
session.messages.push(message);
|
|
2467
|
+
this.trimArray(session.messages, this.maxMessagesPerSession);
|
|
351
2468
|
session.updatedAt = new Date;
|
|
352
2469
|
}
|
|
353
2470
|
}
|
|
@@ -385,9 +2502,33 @@ class InMemorySessionStore {
|
|
|
385
2502
|
clear() {
|
|
386
2503
|
this.sessions.clear();
|
|
387
2504
|
}
|
|
2505
|
+
evictIfNeeded() {
|
|
2506
|
+
if (this.sessions.size < this.maxSessions) {
|
|
2507
|
+
return;
|
|
2508
|
+
}
|
|
2509
|
+
let oldestSessionId = null;
|
|
2510
|
+
let oldestUpdatedAt = Number.POSITIVE_INFINITY;
|
|
2511
|
+
for (const [sessionId, session] of this.sessions.entries()) {
|
|
2512
|
+
const updatedAt = session.updatedAt.getTime();
|
|
2513
|
+
if (updatedAt < oldestUpdatedAt) {
|
|
2514
|
+
oldestUpdatedAt = updatedAt;
|
|
2515
|
+
oldestSessionId = sessionId;
|
|
2516
|
+
}
|
|
2517
|
+
}
|
|
2518
|
+
if (oldestSessionId) {
|
|
2519
|
+
this.sessions.delete(oldestSessionId);
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
trimArray(items, maxItems) {
|
|
2523
|
+
if (items.length <= maxItems) {
|
|
2524
|
+
return;
|
|
2525
|
+
}
|
|
2526
|
+
const overflow = items.length - maxItems;
|
|
2527
|
+
items.splice(0, overflow);
|
|
2528
|
+
}
|
|
388
2529
|
}
|
|
389
|
-
function createInMemorySessionStore() {
|
|
390
|
-
return new InMemorySessionStore;
|
|
2530
|
+
function createInMemorySessionStore(options) {
|
|
2531
|
+
return new InMemorySessionStore(options);
|
|
391
2532
|
}
|
|
392
2533
|
function generateSessionId() {
|
|
393
2534
|
return `sess_${Date.now()}_${Math.random().toString(36).slice(2, 11)}`;
|
|
@@ -457,6 +2598,118 @@ var init_adapter = __esm(() => {
|
|
|
457
2598
|
};
|
|
458
2599
|
});
|
|
459
2600
|
|
|
2601
|
+
// src/telemetry/posthog.ts
|
|
2602
|
+
var exports_posthog = {};
|
|
2603
|
+
__export(exports_posthog, {
|
|
2604
|
+
createPostHogTracedModel: () => createPostHogTracedModel,
|
|
2605
|
+
createPostHogTelemetryCollector: () => createPostHogTelemetryCollector,
|
|
2606
|
+
createCompositeTelemetryCollector: () => createCompositeTelemetryCollector,
|
|
2607
|
+
PostHogTelemetryCollector: () => PostHogTelemetryCollector,
|
|
2608
|
+
CompositeTelemetryCollector: () => CompositeTelemetryCollector
|
|
2609
|
+
});
|
|
2610
|
+
async function createPostHogTracedModel(model, config, overrides) {
|
|
2611
|
+
const { withTracing } = await importPostHogAI();
|
|
2612
|
+
const phClient = await resolvePostHogClient(config);
|
|
2613
|
+
const tracingOptions = {
|
|
2614
|
+
...config.defaults,
|
|
2615
|
+
...overrides
|
|
2616
|
+
};
|
|
2617
|
+
return withTracing(model, phClient, tracingOptions);
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
class PostHogTelemetryCollector {
|
|
2621
|
+
phClient;
|
|
2622
|
+
config;
|
|
2623
|
+
initPromise;
|
|
2624
|
+
constructor(config) {
|
|
2625
|
+
this.config = config;
|
|
2626
|
+
this.phClient = config.client;
|
|
2627
|
+
}
|
|
2628
|
+
async collect(sample) {
|
|
2629
|
+
const client = await this.getClient();
|
|
2630
|
+
const distinctId = this.config.defaults?.posthogDistinctId ?? sample.metadata?.["actorId"] ?? "system";
|
|
2631
|
+
client.capture({
|
|
2632
|
+
distinctId,
|
|
2633
|
+
event: "$ai_generation",
|
|
2634
|
+
properties: {
|
|
2635
|
+
$ai_model: sample.operation.name,
|
|
2636
|
+
$ai_provider: "contractspec",
|
|
2637
|
+
$ai_latency: sample.durationMs / 1000,
|
|
2638
|
+
$ai_is_error: !sample.success,
|
|
2639
|
+
$ai_trace_id: this.config.defaults?.posthogTraceId,
|
|
2640
|
+
...sample.metadata?.["tokenUsage"] ? mapTokenUsage(sample.metadata["tokenUsage"]) : {},
|
|
2641
|
+
...this.config.defaults?.posthogProperties,
|
|
2642
|
+
contractspec_operation: sample.operation.name,
|
|
2643
|
+
contractspec_version: sample.operation.version,
|
|
2644
|
+
contractspec_agent_id: sample.metadata?.["agentId"],
|
|
2645
|
+
contractspec_finish_reason: sample.metadata?.["finishReason"],
|
|
2646
|
+
contractspec_tool_count: sample.metadata?.["toolCallCount"]
|
|
2647
|
+
},
|
|
2648
|
+
groups: this.config.defaults?.posthogGroups
|
|
2649
|
+
});
|
|
2650
|
+
}
|
|
2651
|
+
async shutdown() {
|
|
2652
|
+
if (this.phClient?.shutdown) {
|
|
2653
|
+
await this.phClient.shutdown();
|
|
2654
|
+
}
|
|
2655
|
+
}
|
|
2656
|
+
async getClient() {
|
|
2657
|
+
if (this.phClient)
|
|
2658
|
+
return this.phClient;
|
|
2659
|
+
if (!this.initPromise) {
|
|
2660
|
+
this.initPromise = resolvePostHogClient(this.config).then((client) => {
|
|
2661
|
+
this.phClient = client;
|
|
2662
|
+
return client;
|
|
2663
|
+
});
|
|
2664
|
+
}
|
|
2665
|
+
return this.initPromise;
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2668
|
+
function createPostHogTelemetryCollector(config) {
|
|
2669
|
+
return new PostHogTelemetryCollector(config);
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2672
|
+
class CompositeTelemetryCollector {
|
|
2673
|
+
collectors;
|
|
2674
|
+
constructor(collectors) {
|
|
2675
|
+
this.collectors = collectors;
|
|
2676
|
+
}
|
|
2677
|
+
async collect(sample) {
|
|
2678
|
+
await Promise.all(this.collectors.map((c) => c.collect(sample)));
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
function createCompositeTelemetryCollector(collectors) {
|
|
2682
|
+
return new CompositeTelemetryCollector(collectors);
|
|
2683
|
+
}
|
|
2684
|
+
async function importPostHogAI() {
|
|
2685
|
+
try {
|
|
2686
|
+
return await import("@posthog/ai");
|
|
2687
|
+
} catch {
|
|
2688
|
+
throw new Error("PostHog LLM Analytics requires @posthog/ai to be installed. Run: npm install @posthog/ai posthog-node");
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2691
|
+
async function resolvePostHogClient(config) {
|
|
2692
|
+
if (config.client)
|
|
2693
|
+
return config.client;
|
|
2694
|
+
if (!config.apiKey) {
|
|
2695
|
+
throw new Error("PostHog LLM Analytics requires either a client instance or an apiKey.");
|
|
2696
|
+
}
|
|
2697
|
+
try {
|
|
2698
|
+
const { PostHog } = await import("posthog-node");
|
|
2699
|
+
return new PostHog(config.apiKey, {
|
|
2700
|
+
host: config.host ?? "https://us.i.posthog.com"
|
|
2701
|
+
});
|
|
2702
|
+
} catch {
|
|
2703
|
+
throw new Error("PostHog LLM Analytics requires posthog-node to be installed. Run: npm install posthog-node");
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
function mapTokenUsage(usage) {
|
|
2707
|
+
return {
|
|
2708
|
+
$ai_input_tokens: usage["promptTokens"],
|
|
2709
|
+
$ai_output_tokens: usage["completionTokens"]
|
|
2710
|
+
};
|
|
2711
|
+
}
|
|
2712
|
+
|
|
460
2713
|
// src/agent/contract-spec-agent.ts
|
|
461
2714
|
var exports_contract_spec_agent = {};
|
|
462
2715
|
__export(exports_contract_spec_agent, {
|
|
@@ -494,15 +2747,21 @@ class ContractSpecAgent {
|
|
|
494
2747
|
});
|
|
495
2748
|
}
|
|
496
2749
|
static async create(config) {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
2750
|
+
let effectiveConfig = config;
|
|
2751
|
+
if (config.posthogConfig) {
|
|
2752
|
+
const { createPostHogTracedModel: createPostHogTracedModel2 } = await Promise.resolve().then(() => exports_posthog);
|
|
2753
|
+
const tracedModel = await createPostHogTracedModel2(config.model, config.posthogConfig, config.posthogConfig.tracingOptions);
|
|
2754
|
+
effectiveConfig = { ...config, model: tracedModel };
|
|
2755
|
+
}
|
|
2756
|
+
const instructions = await injectStaticKnowledge(effectiveConfig.spec.instructions, effectiveConfig.spec.knowledge ?? [], effectiveConfig.knowledgeRetriever);
|
|
2757
|
+
const specTools = specToolsToAISDKTools(effectiveConfig.spec.tools, effectiveConfig.toolHandlers, { agentId: agentKey(effectiveConfig.spec.meta) });
|
|
2758
|
+
const knowledgeTool = effectiveConfig.knowledgeRetriever ? createKnowledgeQueryTool(effectiveConfig.knowledgeRetriever, effectiveConfig.spec.knowledge ?? []) : null;
|
|
500
2759
|
const tools = {
|
|
501
2760
|
...specTools,
|
|
502
2761
|
...knowledgeTool ? { query_knowledge: knowledgeTool } : {},
|
|
503
|
-
...
|
|
2762
|
+
...effectiveConfig.additionalTools ?? {}
|
|
504
2763
|
};
|
|
505
|
-
return new ContractSpecAgent(
|
|
2764
|
+
return new ContractSpecAgent(effectiveConfig, instructions, tools);
|
|
506
2765
|
}
|
|
507
2766
|
async generate(params) {
|
|
508
2767
|
const sessionId = params.options?.sessionId ?? generateSessionId();
|
|
@@ -590,8 +2849,10 @@ ${params.prompt}` : params.prompt;
|
|
|
590
2849
|
}
|
|
591
2850
|
var ContractSpecCallOptionsSchema;
|
|
592
2851
|
var init_contract_spec_agent = __esm(() => {
|
|
2852
|
+
init_spec();
|
|
593
2853
|
init_tool_adapter();
|
|
594
2854
|
init_knowledge_tool();
|
|
2855
|
+
init_injector();
|
|
595
2856
|
init_adapter();
|
|
596
2857
|
ContractSpecCallOptionsSchema = z3.object({
|
|
597
2858
|
tenantId: z3.string().optional(),
|
|
@@ -632,6 +2893,7 @@ class AgentFactory {
|
|
|
632
2893
|
knowledgeRetriever: this.config.knowledgeRetriever,
|
|
633
2894
|
sessionStore: this.config.sessionStore,
|
|
634
2895
|
telemetryCollector: this.config.telemetryCollector,
|
|
2896
|
+
posthogConfig: this.config.posthogConfig,
|
|
635
2897
|
additionalTools: mergedTools
|
|
636
2898
|
});
|
|
637
2899
|
}
|