veryfront 0.1.770 → 0.1.772
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/esm/deno.js +1 -1
- package/esm/src/agent/hosted/form-input-tool.d.ts.map +1 -1
- package/esm/src/agent/hosted/form-input-tool.js +1 -1
- package/esm/src/agent/runtime/load-skill-tool.d.ts +1 -0
- package/esm/src/agent/runtime/load-skill-tool.d.ts.map +1 -1
- package/esm/src/agent/runtime/load-skill-tool.js +30 -2
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +1 -1
package/esm/deno.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-input-tool.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/hosted/form-input-tool.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAmBjF,0CAA0C;AAC1C,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,wBAAwB,CAAC,EAAE,8BAA8B,CAAC;CAC3D;AAED,qCAAqC;AACrC,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,0BAA0B,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAQ5F;
|
|
1
|
+
{"version":3,"file":"form-input-tool.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/hosted/form-input-tool.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAmBjF,0CAA0C;AAC1C,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,wBAAwB,CAAC,EAAE,8BAA8B,CAAC;CAC3D;AAED,qCAAqC;AACrC,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,0BAA0B,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAQ5F;AAuJD,4EAA4E;AAC5E,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,SAAS,aAAa,EAAE,GACjC,8BAA8B,GAAG,SAAS,CAU5C"}
|
|
@@ -28,7 +28,7 @@ async function executeDurableFormInputFlow(context, apiUrl, input, execContext)
|
|
|
28
28
|
values: context.submittedFormInputResult.values,
|
|
29
29
|
inputRequestId: context.submittedFormInputResult.inputRequestId,
|
|
30
30
|
reused: true,
|
|
31
|
-
reason: "A submitted form_input result already exists for this run.",
|
|
31
|
+
reason: "A submitted form_input result already exists for this run. Use these values as final input, do not call form_input again, and continue to the requested output.",
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
const toolCallId = typeof execContext?.toolCallId === "string" && execContext.toolCallId.length > 0
|
|
@@ -10,6 +10,7 @@ export declare const RUNTIME_LOAD_SKILL_DESCRIPTION = "Load the full instruction
|
|
|
10
10
|
export type RuntimeLoadSkillToolContext = RuntimeProjectSkillContext & {
|
|
11
11
|
availableSkillIds?: readonly string[];
|
|
12
12
|
availableToolNames?: readonly string[];
|
|
13
|
+
loadedSkillResponses?: Record<string, RuntimeLoadedSkillResponse>;
|
|
13
14
|
};
|
|
14
15
|
/** Public API contract for runtime load skill builtin store. */
|
|
15
16
|
export type RuntimeLoadSkillBuiltinStore = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-skill-tool.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/load-skill-tool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAchD,OAAO,KAAK,EAEV,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGL,KAAK,0BAA0B,EAC/B,KAAK,kCAAkC,EACvC,KAAK,0BAA0B,EAChC,MAAM,qBAAqB,CAAC;AAE7B,yDAAyD;AACzD,eAAO,MAAM,oCAAoC,2mBACqP,CAAC;AAEvS,mDAAmD;AACnD,eAAO,MAAM,8BAA8B,unBAC0a,CAAC;AAatd,2CAA2C;AAC3C,MAAM,MAAM,2BAA2B,GAAG,0BAA0B,GAAG;IACrE,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"load-skill-tool.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/load-skill-tool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAchD,OAAO,KAAK,EAEV,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGL,KAAK,0BAA0B,EAC/B,KAAK,kCAAkC,EACvC,KAAK,0BAA0B,EAChC,MAAM,qBAAqB,CAAC;AAE7B,yDAAyD;AACzD,eAAO,MAAM,oCAAoC,2mBACqP,CAAC;AAEvS,mDAAmD;AACnD,eAAO,MAAM,8BAA8B,unBAC0a,CAA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D,CAAC;AAEF,qDAAqD;AACrD,MAAM,MAAM,mCAAmC,GAAG;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,4CAA4C;AAC5C,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,2CAA2C;AAC3C,MAAM,MAAM,0BAA0B,GAClC,0BAA0B,GAC1B,mCAAmC,GACnC,2BAA2B,CAAC;AA+KhC,sCAAsC;AACtC,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,2BAA2B,GACnC,IAAI,CAAC,yBAAyB,EAAE,0BAA0B,CAAC,CA6C7D"}
|
|
@@ -55,6 +55,25 @@ function buildLoadedSkillResponse(input) {
|
|
|
55
55
|
logger: input.options.logger,
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
+
function buildAlreadyLoadedSkillResponse(skillId, response) {
|
|
59
|
+
const finishAllowedTools = response.allowedTools?.filter((toolName) => toolName !== "form_input");
|
|
60
|
+
return {
|
|
61
|
+
...response,
|
|
62
|
+
instructions: `Skill "${skillId}" is already loaded in this turn. Do not call load_skill for "${skillId}" again. ` +
|
|
63
|
+
"Continue from the existing user request and any submitted tool results, then produce the next useful response now. " +
|
|
64
|
+
"If a form_input result already exists, treat it as final for this turn and do not call form_input again.",
|
|
65
|
+
nextStep: "Continue now. Do not reload this skill or restart intake; use the existing context and finish the current turn.",
|
|
66
|
+
...(finishAllowedTools
|
|
67
|
+
? {
|
|
68
|
+
allowedTools: finishAllowedTools,
|
|
69
|
+
note: finishAllowedTools.length > 0
|
|
70
|
+
? response.note
|
|
71
|
+
: "IMPORTANT: Intake is complete for this turn. Do not call form_input again; finish with the existing context.",
|
|
72
|
+
}
|
|
73
|
+
: {}),
|
|
74
|
+
references: response.references,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
58
77
|
function buildMissingSkillError(options, skillId) {
|
|
59
78
|
const knownIds = new Set([
|
|
60
79
|
...(options.context.availableSkillIds ?? []),
|
|
@@ -131,23 +150,32 @@ export function createRuntimeLoadSkillTool(options) {
|
|
|
131
150
|
if (file) {
|
|
132
151
|
return await loadRuntimeSkillReferenceFile(options, skillId, file);
|
|
133
152
|
}
|
|
153
|
+
const loadedSkillResponses = options.context.loadedSkillResponses ??= {};
|
|
154
|
+
const loadedResponse = loadedSkillResponses[skillId];
|
|
155
|
+
if (loadedResponse) {
|
|
156
|
+
return buildAlreadyLoadedSkillResponse(skillId, loadedResponse);
|
|
157
|
+
}
|
|
134
158
|
const projectSkill = await loadRuntimeSkillBody(options, skillId);
|
|
135
159
|
if (projectSkill) {
|
|
136
|
-
|
|
160
|
+
const response = buildLoadedSkillResponse({
|
|
137
161
|
options,
|
|
138
162
|
skillId,
|
|
139
163
|
instructions: projectSkill.instructions,
|
|
140
164
|
references: projectSkill.references,
|
|
141
165
|
});
|
|
166
|
+
loadedSkillResponses[skillId] = response;
|
|
167
|
+
return response;
|
|
142
168
|
}
|
|
143
169
|
const localContent = builtinStore.readSkill(options.skillsDir, skillId);
|
|
144
170
|
if (localContent) {
|
|
145
|
-
|
|
171
|
+
const response = buildLoadedSkillResponse({
|
|
146
172
|
options,
|
|
147
173
|
skillId,
|
|
148
174
|
instructions: localContent,
|
|
149
175
|
references: builtinStore.listReferences(options.skillsDir, skillId),
|
|
150
176
|
});
|
|
177
|
+
loadedSkillResponses[skillId] = response;
|
|
178
|
+
return response;
|
|
151
179
|
}
|
|
152
180
|
return buildMissingSkillError(options, skillId);
|
|
153
181
|
},
|