@inkeep/agents-run-api 0.0.0-dev-20251222222417 → 0.0.0-dev-20251222224725
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.
|
@@ -13,6 +13,7 @@ declare class Phase1Config implements VersionConfig<SystemPromptV1> {
|
|
|
13
13
|
private generateThinkingPreparationSection;
|
|
14
14
|
private generateTransferInstructions;
|
|
15
15
|
private generateDelegationInstructions;
|
|
16
|
+
private getArtifactInstructionsTokens;
|
|
16
17
|
private getArtifactCreationGuidance;
|
|
17
18
|
private getArtifactReferencingRules;
|
|
18
19
|
private getArtifactCreationInstructions;
|
|
@@ -61,9 +61,11 @@ var Phase1Config = class Phase1Config {
|
|
|
61
61
|
...tool,
|
|
62
62
|
inputSchema: this.normalizeSchema(tool.inputSchema)
|
|
63
63
|
}));
|
|
64
|
-
const hasArtifactComponents = config.artifactComponents && config.artifactComponents.length > 0;
|
|
64
|
+
const hasArtifactComponents = Boolean(config.artifactComponents && config.artifactComponents.length > 0);
|
|
65
65
|
const artifactsSection = this.generateArtifactsSection(templates, config.artifacts, hasArtifactComponents, config.artifactComponents, config.hasAgentArtifactComponents);
|
|
66
|
-
|
|
66
|
+
const artifactInstructionsTokens = this.getArtifactInstructionsTokens(templates, hasArtifactComponents, config.artifactComponents, config.hasAgentArtifactComponents, (config.artifacts?.length ?? 0) > 0);
|
|
67
|
+
breakdown.systemPromptTemplate += artifactInstructionsTokens;
|
|
68
|
+
breakdown.artifactsSection = estimateTokens(config.artifacts?.length > 0 ? config.artifacts.map((artifact) => this.generateArtifactXml(templates, artifact)).join("\n ") : "");
|
|
67
69
|
if (hasArtifactComponents) breakdown.artifactComponents = estimateTokens(this.getArtifactCreationInstructions(hasArtifactComponents, config.artifactComponents));
|
|
68
70
|
systemPrompt = systemPrompt.replace("{{ARTIFACTS_SECTION}}", artifactsSection);
|
|
69
71
|
const toolsSection = this.generateToolsSection(templates, toolData);
|
|
@@ -124,6 +126,15 @@ Your goal: preserve the illusion of a single, seamless, intelligent assistant. A
|
|
|
124
126
|
- Treat these exactly like other tools - call them to get results
|
|
125
127
|
- Present results as YOUR work: "I found", "I've analyzed"
|
|
126
128
|
- NEVER say you're delegating or that another agent helped`;
|
|
129
|
+
}
|
|
130
|
+
getArtifactInstructionsTokens(templates, hasArtifactComponents, artifactComponents, hasAgentArtifactComponents, hasArtifacts) {
|
|
131
|
+
const shouldShowReferencingRules = hasAgentArtifactComponents || hasArtifacts;
|
|
132
|
+
const rules = this.getArtifactReferencingRules(hasArtifactComponents, templates, shouldShowReferencingRules);
|
|
133
|
+
return estimateTokens(`<available_artifacts description="${hasArtifacts ? "These are the artifacts available for you to use in generating responses." : "No artifacts are currently available, but you may create them during execution."}
|
|
134
|
+
|
|
135
|
+
${rules}
|
|
136
|
+
|
|
137
|
+
"></available_artifacts>`);
|
|
127
138
|
}
|
|
128
139
|
getArtifactCreationGuidance() {
|
|
129
140
|
return `🚨 MANDATORY ARTIFACT CREATION 🚨
|
|
@@ -211,8 +222,8 @@ THE details PROPERTY MUST CONTAIN JMESPATH SELECTORS THAT EXTRACT DATA FROM THE
|
|
|
211
222
|
❌ NEVER: [?text ~ contains(@, 'word')] (~ with @ operator)
|
|
212
223
|
❌ NEVER: contains(@, 'text') (@ operator usage)
|
|
213
224
|
❌ NEVER: [?field=="value"] (double quotes in filters)
|
|
214
|
-
❌ NEVER: [?field
|
|
215
|
-
❌ NEVER: [?field=='
|
|
225
|
+
❌ NEVER: [?field=='value'] (escaped quotes in filters)
|
|
226
|
+
❌ NEVER: [?field=='"'"'value'"'"'] (nightmare quote mixing)
|
|
216
227
|
❌ NEVER: result.items[?type=='doc'][?status=='active'] (chained filters)
|
|
217
228
|
|
|
218
229
|
✅ CORRECT JMESPATH SYNTAX:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-run-api",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20251222224725",
|
|
4
4
|
"description": "Agents Run API for Inkeep Agent Framework - handles chat, agent execution, and streaming",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"hono": "^4.10.4",
|
|
42
42
|
"jmespath": "^0.16.0",
|
|
43
43
|
"llm-info": "^1.0.69",
|
|
44
|
-
"@inkeep/agents-core": "^0.0.0-dev-
|
|
44
|
+
"@inkeep/agents-core": "^0.0.0-dev-20251222224725"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@hono/zod-openapi": "^1.1.5",
|