veryfront 0.1.1201 → 0.1.1203
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/cli/shared/deployment/deploy-project.d.ts.map +1 -1
- package/esm/cli/shared/deployment/deploy-project.js +17 -4
- package/esm/cli/templates/manifest.js +1 -1
- package/esm/deno.js +1 -1
- package/esm/src/agent/factory.d.ts.map +1 -1
- package/esm/src/agent/factory.js +217 -133
- package/esm/src/agent/runtime/agent-runtime-step.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-runtime-step.js +7 -1
- package/esm/src/agent/runtime/tool-inventory.d.ts +14 -2
- package/esm/src/agent/runtime/tool-inventory.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-inventory.js +43 -8
- package/esm/src/config/declarative-evaluator-worker-runner.d.ts +10 -1
- package/esm/src/config/declarative-evaluator-worker-runner.d.ts.map +1 -1
- package/esm/src/config/declarative-evaluator-worker-runner.js +12 -3
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
- package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
- package/esm/src/provider/runtime-loader/json-snapshot.d.ts +9 -0
- package/esm/src/provider/runtime-loader/json-snapshot.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/json-snapshot.js +13 -2
- package/esm/src/provider/runtime-loader.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader.js +4 -1
- package/esm/src/release-assets/index.d.ts +1 -1
- package/esm/src/release-assets/index.d.ts.map +1 -1
- package/esm/src/release-assets/index.js +1 -1
- package/esm/src/release-assets/manifest-schema.d.ts +14 -0
- package/esm/src/release-assets/manifest-schema.d.ts.map +1 -1
- package/esm/src/release-assets/manifest-schema.js +41 -0
- package/esm/src/skill/tools.js +1 -1
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-project.d.ts","sourceRoot":"","sources":["../../../../src/cli/shared/deployment/deploy-project.ts"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"deploy-project.d.ts","sourceRoot":"","sources":["../../../../src/cli/shared/deployment/deploy-project.ts"],"names":[],"mappings":"AAKA,OAAO,EAKL,KAAK,iCAAiC,EAGvC,MAAM,sCAAsC,CAAC;AA6B9C,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAEL,KAAK,kBAAkB,EAKxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE;QAAE,IAAI,EAAE,eAAe,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,gBAAgB,CAAA;KAAE,CAAC;CAChE;AAED,MAAM,WAAW,mBAAmB;IAClC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,MAAM,cAAc,GACtB,gBAAgB,GAChB,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,uBAAuB,GACvB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,sBAAsB,CAAC;AAE3B,MAAM,MAAM,WAAW,GACnB;IACA,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAA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GAAE;IAC3C,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,kBAAkB,CAAC;CACjE,GAAG,aAAa,CAkNrB"}
|
|
@@ -3,7 +3,7 @@ import { createFileSystem, isNotFoundError, runtime } from "../../../src/platfor
|
|
|
3
3
|
import { join, relative, resolve } from "../../../src/platform/compat/path/index.js";
|
|
4
4
|
import { isWithinDirectory, normalizePath } from "../../../src/utils/index.js";
|
|
5
5
|
import { parseProjectDomain } from "../../../src/server/index.js";
|
|
6
|
-
import { isSafeBoundedText, parseReadyReleaseAssetManifestResponse, readUntrustedOwnDataProperty, routeForPage, } from "../../../src/release-assets/index.js";
|
|
6
|
+
import { describeReadyReleaseAssetManifestRejection, isSafeBoundedText, parseReadyReleaseAssetManifestResponse, readUntrustedOwnDataProperty, routeForPage, } from "../../../src/release-assets/index.js";
|
|
7
7
|
import { DEPLOYMENT_ERROR, ENVIRONMENT_NOT_FOUND, RELEASE_MISSING_VERSION, SOURCE_DIGEST_MISMATCH, VeryfrontError, } from "../../../src/errors/index.js";
|
|
8
8
|
import { computeSourceDigest, PUSH_RECEIPT_RELATIVE_PATH, readPushReceipt, resolveGitSource, validatePushReceipt, } from "../deployment-provenance.js";
|
|
9
9
|
import { normalizeProjectSlug } from "../slug.js";
|
|
@@ -375,16 +375,29 @@ export async function waitForReleaseAssetManifest(controlPlane, projectSlug, rel
|
|
|
375
375
|
if (state === "ready") {
|
|
376
376
|
const result = parseReadyReleaseAssetManifestResponse(raw, releaseId);
|
|
377
377
|
if (!result) {
|
|
378
|
-
|
|
378
|
+
// Naming the failing check matters: a schema mismatch is fixed by
|
|
379
|
+
// deploying a matching framework build, while "rebuild the assets"
|
|
380
|
+
// sends the operator to rebuild against the same mismatched builder.
|
|
381
|
+
const reason = describeReadyReleaseAssetManifestRejection(raw, releaseId);
|
|
382
|
+
throw DEPLOYMENT_ERROR.create({
|
|
383
|
+
detail: `Release assets for ${releaseId} could not be read: ${reason}.`,
|
|
384
|
+
context: { releaseId },
|
|
385
|
+
});
|
|
379
386
|
}
|
|
380
387
|
assertReadyManifestCoversPageRoutes(releaseId, result, expectedRoutes);
|
|
381
388
|
return result;
|
|
382
389
|
}
|
|
383
390
|
if (state === "partial") {
|
|
384
|
-
throw
|
|
391
|
+
throw DEPLOYMENT_ERROR.create({
|
|
392
|
+
detail: `Release asset build produced an unsupported partial manifest for release ${releaseId}.`,
|
|
393
|
+
context: { releaseId },
|
|
394
|
+
});
|
|
385
395
|
}
|
|
386
396
|
if (state === "failed") {
|
|
387
|
-
throw
|
|
397
|
+
throw DEPLOYMENT_ERROR.create({
|
|
398
|
+
detail: `Release asset build failed for release ${releaseId}.`,
|
|
399
|
+
context: { releaseId },
|
|
400
|
+
});
|
|
388
401
|
}
|
|
389
402
|
if (state === "superseded") {
|
|
390
403
|
throw new Error(`Release assets for ${releaseId} were superseded by a newer build. Run deploy again.`);
|
|
@@ -22,7 +22,7 @@ export default {
|
|
|
22
22
|
},
|
|
23
23
|
"ai-agent": {
|
|
24
24
|
"files": {
|
|
25
|
-
"agents/assistant.ts": "import { agent } from \"veryfront/agent\";\n\nexport default agent({\n id: \"assistant\",\n name: \"Assistant\",\n description: \"Turn a rough idea into a clear next move.\",\n system:\n \"Be direct and practical. Structure complex answers clearly. Use the calculator tool for arithmetic instead of calculating mentally. Plan the calculation before calling the calculator, use the fewest calls needed, and answer immediately after you have the result. For currency splits, make rounded shares add exactly to the total and explain any remainder. Use other tools when they improve accuracy, and state assumptions that affect the result.\",\n tools: true,\n maxSteps: 20,\n suggestions: [\n {\n type: \"prompt\",\n title: \"Shape an idea\",\n prompt: \"Turn this rough idea into a focused plan with the first three steps: \",\n },\n {\n type: \"prompt\",\n title: \"Run the numbers\",\n prompt:\n \"Calculate an 18% tip on $84.50, split the total among three people, and explain the result briefly.\",\n },\n ],\n});\n",
|
|
25
|
+
"agents/assistant.ts": "import { agent } from \"veryfront/agent\";\n\nexport default agent({\n id: \"assistant\",\n name: \"Assistant\",\n description: \"Turn a rough idea into a clear next move.\",\n system:\n \"Be direct and practical. Structure complex answers clearly. Use the calculator tool for arithmetic instead of calculating mentally. Plan the calculation before calling the calculator, use the fewest calls needed, and answer immediately after you have the result. For currency splits, make rounded shares add exactly to the total and explain any remainder. Write the numbers you get back in plain text, using x and / for operators, never in LaTeX or MathJax. Use other tools when they improve accuracy, and state assumptions that affect the result.\",\n tools: { calculator: true },\n maxSteps: 20,\n suggestions: [\n {\n type: \"prompt\",\n title: \"Shape an idea\",\n prompt: \"Turn this rough idea into a focused plan with the first three steps: \",\n },\n {\n type: \"prompt\",\n title: \"Run the numbers\",\n prompt:\n \"Calculate an 18% tip on $84.50, split the total among three people, and explain the result briefly.\",\n },\n ],\n});\n",
|
|
26
26
|
"app/api/ag-ui/route.ts": "import { createAgUiHandler } from \"veryfront/agent\";\n\nexport const POST = createAgUiHandler(\"assistant\");\n",
|
|
27
27
|
"app/layout.tsx": "import \"../globals.css\";\nimport { Head } from \"veryfront/head\";\n\nexport default function RootLayout({\n children,\n}: {\n children: React.ReactNode;\n}): React.ReactNode {\n return (\n <>\n <Head>\n <title>Assistant</title>\n <link rel=\"icon\" href=\"/favicon.svg\" type=\"image/svg+xml\" />\n </Head>\n {children}\n </>\n );\n}\n",
|
|
28
28
|
"app/markdown-renderer.tsx": "\"use client\";\n\nimport ReactMarkdown from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport type { MarkdownRendererProps } from \"veryfront/markdown\";\n\n/**\n * Rich Markdown for assistant answers.\n *\n * `veryfront/markdown` presents plain source until a renderer is installed, so\n * this component supplies one. Swap in any renderer that accepts\n * `MarkdownRendererProps` to change how answers are parsed and rendered.\n */\nexport function MarkdownRenderer({ source }: MarkdownRendererProps): React.JSX.Element {\n return <ReactMarkdown remarkPlugins={[remarkGfm]}>{source}</ReactMarkdown>;\n}\n",
|
package/esm/deno.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/src/agent/factory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,eAAe,EAKhB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/src/agent/factory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,eAAe,EAKhB,MAAM,YAAY,CAAC;AAqXpB,oBAAoB;AACpB,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,KAAK,CAyEhD;AAcD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,YAAY,CAAC,GACnD,eAAe,EAAE,CAanB"}
|
package/esm/src/agent/factory.js
CHANGED
|
@@ -88,142 +88,22 @@ function createAgentStreamResult(stream) {
|
|
|
88
88
|
},
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
const resolveSkillSnapshot = () => skillRegistryInternal.resolveSelectorForAgent(skillsConfig, { agentId: id });
|
|
104
|
-
if (Array.isArray(skillsConfig) && skillsConfig.length > 0) {
|
|
105
|
-
resolveSkillSnapshot();
|
|
106
|
-
}
|
|
107
|
-
const publicConfig = {
|
|
108
|
-
...config,
|
|
109
|
-
...(delegates === undefined ? {} : { delegates }),
|
|
110
|
-
model: resolveConfiguredAgentModel(config.model),
|
|
111
|
-
};
|
|
112
|
-
if (config.tools && config.tools !== true) {
|
|
113
|
-
for (const [name, entry] of Object.entries(config.tools)) {
|
|
114
|
-
if (!entry || typeof entry !== "object")
|
|
115
|
-
continue;
|
|
116
|
-
assertLocalToolId(name);
|
|
117
|
-
assertLocalToolId(entry.id);
|
|
118
|
-
if (isRuntimeLocalTool(entry))
|
|
119
|
-
continue;
|
|
120
|
-
const normalizedTool = entry.id === name ? entry : { ...entry, id: name };
|
|
121
|
-
registerTool(normalizedTool.id, normalizedTool);
|
|
122
|
-
config.tools[name] = normalizedTool;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
// Skill tools are framework infrastructure shared by skill-enabled agents.
|
|
126
|
-
// Project skills remain project-scoped and owner-aware at resolution time.
|
|
127
|
-
let mergedToolsConfig = config.tools;
|
|
128
|
-
const shouldExposeSkillTools = !isExplicitNoneSkillSelector(config.skills);
|
|
129
|
-
ensureBuiltinSchemaValidator();
|
|
130
|
-
for (const registration of SKILL_TOOL_REGISTRATIONS) {
|
|
131
|
-
if (!toolRegistry.has(registration.id)) {
|
|
132
|
-
toolRegistryInternal.registerShared(registration.id, registration.create());
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
if (config.tools !== true) {
|
|
136
|
-
const configuredTools = { ...(config.tools ?? {}) };
|
|
137
|
-
for (const registration of SKILL_TOOL_REGISTRATIONS) {
|
|
138
|
-
if (!shouldExposeSkillTools) {
|
|
139
|
-
delete configuredTools[registration.id];
|
|
140
|
-
continue;
|
|
141
|
-
}
|
|
142
|
-
const configuredTool = configuredTools[registration.id];
|
|
143
|
-
if (typeof configuredTool === "object" && configuredTool !== null) {
|
|
144
|
-
continue;
|
|
145
|
-
}
|
|
146
|
-
configuredTools[registration.id] = registration.create({
|
|
147
|
-
resolveAllowedSkillIds: () => resolveSkillSnapshot().allowedSkillIds,
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
const hasConfiguredTools = Object.keys(configuredTools).length > 0;
|
|
151
|
-
mergedToolsConfig = hasConfiguredTools || config.tools !== undefined
|
|
152
|
-
? configuredTools
|
|
153
|
-
: undefined;
|
|
154
|
-
}
|
|
155
|
-
if (delegates?.length) {
|
|
156
|
-
if (mergedToolsConfig === true) {
|
|
157
|
-
throw INVALID_ARGUMENT.create({
|
|
158
|
-
detail: `Agent "${id}" cannot combine delegates with tools: true. ` +
|
|
159
|
-
"Declare the required tools by name so delegate capabilities remain explicit.",
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
mergedToolsConfig = {
|
|
163
|
-
...(mergedToolsConfig ?? {}),
|
|
164
|
-
...buildAgentDelegateTools({ delegates, selfId: id }),
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
// Call context assembled at invocation time so registry-backed skills pick up
|
|
168
|
-
// HMR changes and host-supplied project/environment facts stay current.
|
|
169
|
-
const originalSystem = config.system;
|
|
170
|
-
const configuredToolNames = mergedToolsConfig === true
|
|
171
|
-
? [
|
|
172
|
-
"form_input",
|
|
173
|
-
...(shouldExposeSkillTools ? ["load_skill"] : []),
|
|
174
|
-
"tool_search",
|
|
175
|
-
...(config.providerTools ?? []),
|
|
176
|
-
].sort()
|
|
177
|
-
: mergedToolsConfig === undefined
|
|
178
|
-
? undefined
|
|
179
|
-
: Object.entries(mergedToolsConfig)
|
|
180
|
-
.filter(([, entry]) => entry !== false)
|
|
181
|
-
.map(([name]) => name)
|
|
182
|
-
.sort();
|
|
183
|
-
const augmentedSystem = async () => {
|
|
184
|
-
// Owner-aware: omitted selectors advertise every skill visible to this
|
|
185
|
-
// agent (unowned project skills plus its own). Explicit lists, including
|
|
186
|
-
// an empty list, retain their authored catalog selection.
|
|
187
|
-
const snapshot = resolveSkillSnapshot();
|
|
188
|
-
const basePrompt = (typeof originalSystem === "function" ? await originalSystem() : originalSystem) ??
|
|
189
|
-
"You are a helpful assistant.";
|
|
190
|
-
return flattenSystemInstructions(buildAgentCallContext({
|
|
191
|
-
instructions: basePrompt,
|
|
192
|
-
skills: snapshot.definitions.map(toRuntimeSkillDefinition),
|
|
193
|
-
includeSkillToolUsage: true,
|
|
194
|
-
...(configuredToolNames === undefined ? {} : { availableToolNames: configuredToolNames }),
|
|
195
|
-
...(config.projectContext ? { projectContext: config.projectContext } : {}),
|
|
196
|
-
...(config.environmentContext ? { environmentContext: config.environmentContext } : {}),
|
|
197
|
-
}));
|
|
198
|
-
};
|
|
199
|
-
const resolvedMiddleware = resolveSecurityMiddleware(config);
|
|
200
|
-
const platform = detectPlatform();
|
|
201
|
-
const compatibility = validatePlatformCompatibility({
|
|
202
|
-
maxSteps: config.maxSteps,
|
|
203
|
-
streaming: config.streaming,
|
|
204
|
-
requiresFileSystem: false,
|
|
205
|
-
requiresMCP: false,
|
|
206
|
-
}, platform);
|
|
207
|
-
if (!compatibility.compatible) {
|
|
208
|
-
throw toError(createError({
|
|
209
|
-
type: "agent",
|
|
210
|
-
message: `Agent "${id}" is not compatible with current platform:\n${compatibility.errors.join("\n")}`,
|
|
211
|
-
}));
|
|
212
|
-
}
|
|
213
|
-
if (compatibility.warnings.length) {
|
|
214
|
-
agentLogger.warn(`Agent "${id}" warnings:\n${compatibility.warnings.join("\n")}`);
|
|
215
|
-
}
|
|
216
|
-
const runtime = new AgentRuntime(id, {
|
|
217
|
-
...publicConfig,
|
|
218
|
-
tools: mergedToolsConfig,
|
|
219
|
-
system: augmentedSystem,
|
|
220
|
-
middleware: resolvedMiddleware,
|
|
221
|
-
});
|
|
222
|
-
const agentInstance = {
|
|
91
|
+
/**
|
|
92
|
+
* Build the public agent surface over a constructed runtime.
|
|
93
|
+
*
|
|
94
|
+
* Separated from `agent()` so the three request paths can be read without the
|
|
95
|
+
* construction that precedes them. Each resolves the skill snapshot per call
|
|
96
|
+
* rather than capturing it, so registry changes during a long-lived process are
|
|
97
|
+
* picked up on the next invocation instead of being frozen at creation.
|
|
98
|
+
*/
|
|
99
|
+
function createAgentInstance(deps) {
|
|
100
|
+
const { id, publicConfig, toolsConfig, runtime, shouldAttachAllowedSkillIds } = deps;
|
|
101
|
+
const resolveSkillSnapshot = deps.resolveSkillSnapshot;
|
|
102
|
+
return {
|
|
223
103
|
id,
|
|
224
104
|
config: {
|
|
225
105
|
...publicConfig,
|
|
226
|
-
tools:
|
|
106
|
+
tools: toolsConfig,
|
|
227
107
|
},
|
|
228
108
|
generate(input) {
|
|
229
109
|
return withSpan("agent.factory.generate", () => {
|
|
@@ -284,6 +164,142 @@ export function agent(config) {
|
|
|
284
164
|
return runtime.clearMemory();
|
|
285
165
|
},
|
|
286
166
|
};
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Merge skill tooling and delegate tooling into the authored tool selection.
|
|
170
|
+
*
|
|
171
|
+
* Skill tools are framework infrastructure shared by every skill-enabled agent,
|
|
172
|
+
* so they are registered once in the shared registry and then added to this
|
|
173
|
+
* agent's selection. Project skills stay project-scoped and owner-aware, which
|
|
174
|
+
* is why the allowed ids are resolved per call rather than captured here.
|
|
175
|
+
*
|
|
176
|
+
* `tools: true` is left as-is: it authorizes the whole catalog, so there is
|
|
177
|
+
* nothing to merge into. That is also why it cannot be combined with delegates,
|
|
178
|
+
* whose capabilities have to stay individually declared.
|
|
179
|
+
*/
|
|
180
|
+
function resolveToolsConfiguration(input) {
|
|
181
|
+
const { config, id, delegates, exposeSkillTools, resolveSkillSnapshot } = input;
|
|
182
|
+
let merged = config.tools;
|
|
183
|
+
ensureBuiltinSchemaValidator();
|
|
184
|
+
for (const registration of SKILL_TOOL_REGISTRATIONS) {
|
|
185
|
+
if (!toolRegistry.has(registration.id)) {
|
|
186
|
+
toolRegistryInternal.registerShared(registration.id, registration.create());
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (config.tools !== true) {
|
|
190
|
+
const configuredTools = { ...(config.tools ?? {}) };
|
|
191
|
+
for (const registration of SKILL_TOOL_REGISTRATIONS) {
|
|
192
|
+
if (!exposeSkillTools) {
|
|
193
|
+
delete configuredTools[registration.id];
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
const configuredTool = configuredTools[registration.id];
|
|
197
|
+
if (typeof configuredTool === "object" && configuredTool !== null) {
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
configuredTools[registration.id] = registration.create({
|
|
201
|
+
resolveAllowedSkillIds: () => resolveSkillSnapshot().allowedSkillIds,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
const hasConfiguredTools = Object.keys(configuredTools).length > 0;
|
|
205
|
+
merged = hasConfiguredTools || config.tools !== undefined ? configuredTools : undefined;
|
|
206
|
+
}
|
|
207
|
+
if (delegates?.length) {
|
|
208
|
+
if (merged === true) {
|
|
209
|
+
throw INVALID_ARGUMENT.create({
|
|
210
|
+
detail: `Agent "${id}" cannot combine delegates with tools: true. ` +
|
|
211
|
+
"Declare the required tools by name so delegate capabilities remain explicit.",
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
merged = {
|
|
215
|
+
...(merged ?? {}),
|
|
216
|
+
...buildAgentDelegateTools({ delegates, selfId: id }),
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
return merged;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Build the system prompt lazily, per invocation.
|
|
223
|
+
*
|
|
224
|
+
* Assembled at call time rather than construction time so registry-backed
|
|
225
|
+
* skills pick up HMR changes and host-supplied project and environment facts
|
|
226
|
+
* stay current across a long-lived process.
|
|
227
|
+
*/
|
|
228
|
+
function createAugmentedSystem(input) {
|
|
229
|
+
const { config, configuredToolNames, resolveSkillSnapshot } = input;
|
|
230
|
+
const originalSystem = config.system;
|
|
231
|
+
return async () => {
|
|
232
|
+
// Owner-aware: omitted selectors advertise every skill visible to this
|
|
233
|
+
// agent (unowned project skills plus its own). Explicit lists, including
|
|
234
|
+
// an empty list, retain their authored catalog selection.
|
|
235
|
+
const snapshot = resolveSkillSnapshot();
|
|
236
|
+
const basePrompt = (typeof originalSystem === "function" ? await originalSystem() : originalSystem) ??
|
|
237
|
+
"You are a helpful assistant.";
|
|
238
|
+
return flattenSystemInstructions(buildAgentCallContext({
|
|
239
|
+
instructions: basePrompt,
|
|
240
|
+
skills: snapshot.definitions.map(toRuntimeSkillDefinition),
|
|
241
|
+
includeSkillToolUsage: true,
|
|
242
|
+
...(configuredToolNames === undefined ? {} : { availableToolNames: configuredToolNames }),
|
|
243
|
+
...(config.projectContext ? { projectContext: config.projectContext } : {}),
|
|
244
|
+
...(config.environmentContext ? { environmentContext: config.environmentContext } : {}),
|
|
245
|
+
}));
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
/** Agent helper. */
|
|
249
|
+
export function agent(config) {
|
|
250
|
+
if (typeof config.id === "string" && config.id.trim().length === 0) {
|
|
251
|
+
throw toError(createError({
|
|
252
|
+
type: "agent",
|
|
253
|
+
message: "Agent id cannot be empty.",
|
|
254
|
+
}));
|
|
255
|
+
}
|
|
256
|
+
const id = config.id ?? generateAgentId();
|
|
257
|
+
const delegates = normalizeAgentDelegateIds(id, config.delegates);
|
|
258
|
+
const skillsConfig = config.skills === false ? [] : config.skills;
|
|
259
|
+
const shouldAttachAllowedSkillIds = skillsConfig !== undefined;
|
|
260
|
+
const resolveSkillSnapshot = () => skillRegistryInternal.resolveSelectorForAgent(skillsConfig, { agentId: id });
|
|
261
|
+
if (Array.isArray(skillsConfig) && skillsConfig.length > 0) {
|
|
262
|
+
resolveSkillSnapshot();
|
|
263
|
+
}
|
|
264
|
+
const publicConfig = {
|
|
265
|
+
...config,
|
|
266
|
+
...(delegates === undefined ? {} : { delegates }),
|
|
267
|
+
model: resolveConfiguredAgentModel(config.model),
|
|
268
|
+
};
|
|
269
|
+
registerConfiguredLocalTools(config);
|
|
270
|
+
const shouldExposeSkillTools = !isExplicitNoneSkillSelector(config.skills);
|
|
271
|
+
const mergedToolsConfig = resolveToolsConfiguration({
|
|
272
|
+
config,
|
|
273
|
+
id,
|
|
274
|
+
delegates,
|
|
275
|
+
exposeSkillTools: shouldExposeSkillTools,
|
|
276
|
+
resolveSkillSnapshot,
|
|
277
|
+
});
|
|
278
|
+
const configuredToolNames = resolveConfiguredToolNames(mergedToolsConfig, {
|
|
279
|
+
exposeSkillTools: shouldExposeSkillTools,
|
|
280
|
+
providerTools: config.providerTools,
|
|
281
|
+
});
|
|
282
|
+
const augmentedSystem = createAugmentedSystem({
|
|
283
|
+
config,
|
|
284
|
+
configuredToolNames,
|
|
285
|
+
resolveSkillSnapshot,
|
|
286
|
+
});
|
|
287
|
+
const resolvedMiddleware = resolveSecurityMiddleware(config);
|
|
288
|
+
assertPlatformCompatible(config, id);
|
|
289
|
+
const runtime = new AgentRuntime(id, {
|
|
290
|
+
...publicConfig,
|
|
291
|
+
tools: mergedToolsConfig,
|
|
292
|
+
system: augmentedSystem,
|
|
293
|
+
middleware: resolvedMiddleware,
|
|
294
|
+
});
|
|
295
|
+
const agentInstance = createAgentInstance({
|
|
296
|
+
id,
|
|
297
|
+
publicConfig,
|
|
298
|
+
toolsConfig: mergedToolsConfig,
|
|
299
|
+
runtime,
|
|
300
|
+
resolveSkillSnapshot,
|
|
301
|
+
shouldAttachAllowedSkillIds,
|
|
302
|
+
});
|
|
287
303
|
setEffectiveAgentSystem(agentInstance, augmentedSystem);
|
|
288
304
|
agentRegistry.register(id, agentInstance);
|
|
289
305
|
return agentInstance;
|
|
@@ -324,6 +340,74 @@ export function resolveSecurityMiddleware(config) {
|
|
|
324
340
|
];
|
|
325
341
|
}
|
|
326
342
|
let agentIdCounter = 0;
|
|
343
|
+
/**
|
|
344
|
+
* Names advertised to the model in the system-prompt tool inventory.
|
|
345
|
+
*
|
|
346
|
+
* `tools: true` authorizes the whole catalog but sends only the tools that make
|
|
347
|
+
* the deferred catalog reachable: `tool_search` finds schemas, `load_skill`
|
|
348
|
+
* loads instructions, and `form_input` asks the user. Project tools are
|
|
349
|
+
* deferred and are named by the runtime inventory instead.
|
|
350
|
+
*
|
|
351
|
+
* An explicit map advertises exactly what it authorizes, minus entries switched
|
|
352
|
+
* off with `false`. `undefined` advertises nothing, which is distinct from an
|
|
353
|
+
* empty list: the caller renders no inventory at all.
|
|
354
|
+
*/
|
|
355
|
+
function resolveConfiguredToolNames(toolsConfig, options) {
|
|
356
|
+
if (toolsConfig === true) {
|
|
357
|
+
return [
|
|
358
|
+
"form_input",
|
|
359
|
+
...(options.exposeSkillTools ? ["load_skill"] : []),
|
|
360
|
+
"tool_search",
|
|
361
|
+
...(options.providerTools ?? []),
|
|
362
|
+
].sort();
|
|
363
|
+
}
|
|
364
|
+
if (toolsConfig === undefined)
|
|
365
|
+
return undefined;
|
|
366
|
+
return Object.entries(toolsConfig)
|
|
367
|
+
.filter(([, entry]) => entry !== false)
|
|
368
|
+
.map(([name]) => name)
|
|
369
|
+
.sort();
|
|
370
|
+
}
|
|
371
|
+
/** Reject a platform that cannot run this configuration, and warn about the rest. */
|
|
372
|
+
function assertPlatformCompatible(config, id) {
|
|
373
|
+
const compatibility = validatePlatformCompatibility({
|
|
374
|
+
maxSteps: config.maxSteps,
|
|
375
|
+
streaming: config.streaming,
|
|
376
|
+
requiresFileSystem: false,
|
|
377
|
+
requiresMCP: false,
|
|
378
|
+
}, detectPlatform());
|
|
379
|
+
if (!compatibility.compatible) {
|
|
380
|
+
throw toError(createError({
|
|
381
|
+
type: "agent",
|
|
382
|
+
message: `Agent "${id}" is not compatible with current platform:\n${compatibility.errors.join("\n")}`,
|
|
383
|
+
}));
|
|
384
|
+
}
|
|
385
|
+
if (compatibility.warnings.length) {
|
|
386
|
+
agentLogger.warn(`Agent "${id}" warnings:\n${compatibility.warnings.join("\n")}`);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Register inline tool objects so the runtime can resolve them by id later.
|
|
391
|
+
*
|
|
392
|
+
* Authored entries are normalized in place: an entry whose `id` disagrees with
|
|
393
|
+
* its key is rewritten to match the key, because the key is what the model
|
|
394
|
+
* calls.
|
|
395
|
+
*/
|
|
396
|
+
function registerConfiguredLocalTools(config) {
|
|
397
|
+
if (!config.tools || config.tools === true)
|
|
398
|
+
return;
|
|
399
|
+
for (const [name, entry] of Object.entries(config.tools)) {
|
|
400
|
+
if (!entry || typeof entry !== "object")
|
|
401
|
+
continue;
|
|
402
|
+
assertLocalToolId(name);
|
|
403
|
+
assertLocalToolId(entry.id);
|
|
404
|
+
if (isRuntimeLocalTool(entry))
|
|
405
|
+
continue;
|
|
406
|
+
const normalizedTool = entry.id === name ? entry : { ...entry, id: name };
|
|
407
|
+
registerTool(normalizedTool.id, normalizedTool);
|
|
408
|
+
config.tools[name] = normalizedTool;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
327
411
|
function generateAgentId() {
|
|
328
412
|
return `agent_${Date.now()}_${agentIdCounter++}`;
|
|
329
413
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-runtime-step.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/agent-runtime-step.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAClG,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAuB,KAAK,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AAK3F,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACvB,MAAM,oBAAoB,CAAC;AAQ5B,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEzD,MAAM,MAAM,qBAAqB,GAAG,CAClC,WAAW,EAAE,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,SAAS,EAC/D,OAAO,CAAC,EAAE;IACR,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAClC,8BAA8B,CAAC,EAAE,cAAc,EAAE,CAA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AAC,CAoGnC"}
|
|
@@ -74,7 +74,13 @@ export async function prepareAgentRuntimeStep(input) {
|
|
|
74
74
|
const systemPrompt = hasRuntimeToolInventory(runtimeState.systemPrompt)
|
|
75
75
|
? flattenSystemInstructions(withRuntimeToolInventory(runtimeState.systemPrompt, [...toolExposurePlan.visible.map((tool) => tool.name), ...(input.providerToolNames ?? [])]
|
|
76
76
|
.filter((name, index, names) => names.indexOf(name) === index)
|
|
77
|
-
.sort()
|
|
77
|
+
.sort(),
|
|
78
|
+
// Naming what is deferred is the difference between a tool the model
|
|
79
|
+
// can seek and one it has no reason to believe exists.
|
|
80
|
+
toolExposurePlan.deferred.map((tool) => ({
|
|
81
|
+
name: tool.name,
|
|
82
|
+
description: tool.description,
|
|
83
|
+
}))))
|
|
78
84
|
: runtimeState.systemPrompt;
|
|
79
85
|
return {
|
|
80
86
|
runtimeContext: trustedAllowedSkillIds === undefined
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import type { ChatSystemMessage } from "../../chat/types.js";
|
|
2
|
+
/** A tool the model may load but cannot yet call. */
|
|
3
|
+
export interface DeferredToolSummary {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly description?: string;
|
|
6
|
+
}
|
|
2
7
|
/** Returns whether instructions already carry a hosted runtime tool inventory. */
|
|
3
8
|
export declare function hasRuntimeToolInventory(instructions: string | readonly ChatSystemMessage[]): boolean;
|
|
4
|
-
/**
|
|
5
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Applies runtime tool inventory.
|
|
11
|
+
*
|
|
12
|
+
* `deferredTools` names capabilities the model is authorized to use but cannot
|
|
13
|
+
* call yet. Listing them is what keeps an authorized tool from being invisible:
|
|
14
|
+
* a tool absent from both the provider tool list and this inventory cannot even
|
|
15
|
+
* be searched for, because the model has no reason to believe it exists.
|
|
16
|
+
*/
|
|
17
|
+
export declare function withRuntimeToolInventory(instructions: string | readonly ChatSystemMessage[], toolNames: readonly string[], deferredTools?: readonly DeferredToolSummary[]): ChatSystemMessage[];
|
|
6
18
|
/** Flatten system instructions helper. */
|
|
7
19
|
export declare function flattenSystemInstructions(instructions: readonly ChatSystemMessage[]): string;
|
|
8
20
|
//# sourceMappingURL=tool-inventory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-inventory.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/tool-inventory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-inventory.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/tool-inventory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAe7D,qDAAqD;AACrD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AA4ED,kFAAkF;AAClF,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,MAAM,GAAG,SAAS,iBAAiB,EAAE,GAClD,OAAO,CAIT;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,MAAM,GAAG,SAAS,iBAAiB,EAAE,EACnD,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,aAAa,GAAE,SAAS,mBAAmB,EAAO,GACjD,iBAAiB,EAAE,CAarB;AAED,0CAA0C;AAC1C,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,SAAS,iBAAiB,EAAE,GAAG,MAAM,CAK5F"}
|
|
@@ -3,22 +3,46 @@ const RUNTIME_TOOL_INVENTORY_FOOTER = `Only treat the tools listed above as actu
|
|
|
3
3
|
If the list is "- none", say plainly that no tools are available.
|
|
4
4
|
Do NOT infer tool availability from examples, skills, or the base prompt.`;
|
|
5
5
|
const RUNTIME_TOOL_SEARCH_GUIDANCE = "When tool_search is listed, additional authorized tools may be deferred. You MUST call tool_search before declaring a requested or required tool unavailable. Query with one exact tool name when known, or one short capability phrase; do not combine alternatives in one query. A loaded match becomes callable on the next model step.";
|
|
6
|
+
const RUNTIME_DEFERRED_TOOL_HEADER = "Authorized but not loaded. You cannot call these until they are loaded:";
|
|
7
|
+
const RUNTIME_DEFERRED_TOOL_FOOTER = "Load one by calling tool_search with its exact name. It becomes callable on the next model step. You must not call a deferred tool directly.";
|
|
6
8
|
function getRuntimeToolInventoryFooter(toolNames) {
|
|
7
9
|
return toolNames.includes("tool_search")
|
|
8
10
|
? `${RUNTIME_TOOL_INVENTORY_FOOTER}\n${RUNTIME_TOOL_SEARCH_GUIDANCE}`
|
|
9
11
|
: RUNTIME_TOOL_INVENTORY_FOOTER;
|
|
10
12
|
}
|
|
11
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Render the deferred catalog.
|
|
15
|
+
*
|
|
16
|
+
* Kept out of the callable list on purpose. The footer above it tells the model
|
|
17
|
+
* to treat that list as the tools it actually has, so a deferred name mixed in
|
|
18
|
+
* would invite a direct call that cannot succeed. Descriptions are included
|
|
19
|
+
* because a bare name gives the model nothing to match a task against, which is
|
|
20
|
+
* the whole reason an unloaded tool is worth mentioning at all.
|
|
21
|
+
*/
|
|
22
|
+
function createDeferredToolSection(deferredTools) {
|
|
23
|
+
const entries = deferredTools
|
|
24
|
+
.map((tool) => tool.description === undefined || tool.description.length === 0
|
|
25
|
+
? `- ${tool.name}`
|
|
26
|
+
: `- ${tool.name}: ${tool.description}`)
|
|
27
|
+
.join("\n");
|
|
28
|
+
return `\n\n${RUNTIME_DEFERRED_TOOL_HEADER}
|
|
29
|
+
|
|
30
|
+
${entries}
|
|
31
|
+
|
|
32
|
+
${RUNTIME_DEFERRED_TOOL_FOOTER}`;
|
|
33
|
+
}
|
|
34
|
+
function createRuntimeToolInventoryMessage(toolNames, deferredTools) {
|
|
12
35
|
const toolList = toolNames.length > 0
|
|
13
36
|
? toolNames.map((toolName) => `- ${toolName}`).join("\n")
|
|
14
37
|
: "- none";
|
|
38
|
+
const deferredSection = deferredTools.length > 0 ? createDeferredToolSection(deferredTools) : "";
|
|
15
39
|
return {
|
|
16
40
|
role: "system",
|
|
17
41
|
content: `${RUNTIME_TOOL_INVENTORY_HEADER}
|
|
18
42
|
|
|
19
43
|
${toolList}
|
|
20
44
|
|
|
21
|
-
${getRuntimeToolInventoryFooter(toolNames)}`,
|
|
45
|
+
${getRuntimeToolInventoryFooter(toolNames)}${deferredSection}`,
|
|
22
46
|
};
|
|
23
47
|
}
|
|
24
48
|
function isRuntimeToolInventoryMessage(message) {
|
|
@@ -30,9 +54,13 @@ function removeFlattenedRuntimeToolInventory(instructions) {
|
|
|
30
54
|
return instructions;
|
|
31
55
|
}
|
|
32
56
|
const inventory = instructions.slice(headerIndex);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
57
|
+
// A deferred section, when present, is the last thing written, so it carries
|
|
58
|
+
// the terminator. Missing it here would leave the previous inventory in place
|
|
59
|
+
// and append a second one on the next step.
|
|
60
|
+
const terminatesInventory = inventory.endsWith(RUNTIME_TOOL_INVENTORY_FOOTER) ||
|
|
61
|
+
inventory.endsWith(`${RUNTIME_TOOL_INVENTORY_FOOTER}\n${RUNTIME_TOOL_SEARCH_GUIDANCE}`) ||
|
|
62
|
+
inventory.endsWith(RUNTIME_DEFERRED_TOOL_FOOTER);
|
|
63
|
+
if (!inventory.startsWith(`${RUNTIME_TOOL_INVENTORY_HEADER}\n\n- `) || !terminatesInventory) {
|
|
36
64
|
return instructions;
|
|
37
65
|
}
|
|
38
66
|
return instructions.slice(0, headerIndex).trimEnd();
|
|
@@ -43,9 +71,16 @@ export function hasRuntimeToolInventory(instructions) {
|
|
|
43
71
|
? instructions.includes(RUNTIME_TOOL_INVENTORY_HEADER)
|
|
44
72
|
: instructions.some(isRuntimeToolInventoryMessage);
|
|
45
73
|
}
|
|
46
|
-
/**
|
|
47
|
-
|
|
48
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Applies runtime tool inventory.
|
|
76
|
+
*
|
|
77
|
+
* `deferredTools` names capabilities the model is authorized to use but cannot
|
|
78
|
+
* call yet. Listing them is what keeps an authorized tool from being invisible:
|
|
79
|
+
* a tool absent from both the provider tool list and this inventory cannot even
|
|
80
|
+
* be searched for, because the model has no reason to believe it exists.
|
|
81
|
+
*/
|
|
82
|
+
export function withRuntimeToolInventory(instructions, toolNames, deferredTools = []) {
|
|
83
|
+
const inventoryMessage = createRuntimeToolInventoryMessage(toolNames, deferredTools);
|
|
49
84
|
if (typeof instructions === "string") {
|
|
50
85
|
const baseInstructions = removeFlattenedRuntimeToolInventory(instructions);
|
|
51
86
|
return baseInstructions.length > 0
|
|
@@ -57,7 +57,16 @@ declare class DeclarativeConfigWorkerStartupController {
|
|
|
57
57
|
}>;
|
|
58
58
|
}
|
|
59
59
|
declare function evaluateWithEndpointFactory(payload: PreparedDeclarativeConfigWorkerPayload, options: DeclarativeConfigWorkerRunnerOptions, endpointFactory: DeclarativeConfigWorkerEndpointFactory, terminationDrainTimeoutMs?: number): Promise<ConfigSnapshotRecord>;
|
|
60
|
-
declare function evaluateWithAdmissionController(payload: PreparedDeclarativeConfigWorkerPayload, options: DeclarativeConfigWorkerRunnerOptions, endpointFactory: DeclarativeConfigWorkerEndpointFactory, admissionController: DeclarativeConfigWorkerAdmissionController, terminationDrainTimeoutMs?: number, startupController?: DeclarativeConfigWorkerStartupController
|
|
60
|
+
declare function evaluateWithAdmissionController(payload: PreparedDeclarativeConfigWorkerPayload, options: DeclarativeConfigWorkerRunnerOptions, endpointFactory: DeclarativeConfigWorkerEndpointFactory, admissionController: DeclarativeConfigWorkerAdmissionController, terminationDrainTimeoutMs?: number, startupController?: DeclarativeConfigWorkerStartupController,
|
|
61
|
+
/**
|
|
62
|
+
* Monotonic clock used to charge admission wait time against the caller
|
|
63
|
+
* deadline. Seamed so a test can hold it still: the budget check below
|
|
64
|
+
* otherwise races real time spent inside `acquire`, and a starved worker can
|
|
65
|
+
* exhaust a short deadline before the startup permit is ever taken. Both
|
|
66
|
+
* outcomes report `worker-timeout`, but only one leaves the orphan accounted
|
|
67
|
+
* for, so a test asserting that accounting cannot depend on wall time.
|
|
68
|
+
*/
|
|
69
|
+
now?: () => number): Promise<ConfigSnapshotRecord>;
|
|
61
70
|
/**
|
|
62
71
|
* Evaluate one prepared hosted configuration in a fresh, bounded worker.
|
|
63
72
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declarative-evaluator-worker-runner.d.ts","sourceRoot":"","sources":["../../../src/src/config/declarative-evaluator-worker-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,4BAA4B,CAAC;AACzF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAoI1D;;;;;;GAMG;AACH,eAAO,MAAM,0CAA0C;;;CAGrD,CAAC;AAEH,kEAAkE;AAClE,MAAM,WAAW,oCAAoC;IACnD,4EAA4E;IAC5E,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED,UAAU,wCAAwC;IAChD,QAAQ,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,IAAI,CAAC;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,UAAU,+BAA+B;IACvC,WAAW,CAAC,KAAK,EAAE,sCAAsC,GAAG,IAAI,CAAC;IACjE,SAAS,CAAC,SAAS,EAAE,wCAAwC,GAAG,MAAM,IAAI,CAAC;IAC3E,SAAS,IAAI,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtC;AAED,KAAK,sCAAsC,GAAG,MAAM,OAAO,CACzD,+BAA+B,CAChC,CAAC;AA+BF,cAAM,0CAA0C;;gBAMlC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAehD,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC;IA8CrE,QAAQ,IAAI,QAAQ,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAgDzD;AAED,cAAM,wCAAwC;;gBAIhC,UAAU,EAAE,MAAM;IAS9B,OAAO,IAAI,MAAM,IAAI;IAgBrB,QAAQ,IAAI,QAAQ,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAM9D;AA4WD,iBAAe,2BAA2B,CACxC,OAAO,EAAE,sCAAsC,EAC/C,OAAO,EAAE,oCAAoC,EAC7C,eAAe,EAAE,sCAAsC,EACvD,yBAAyB,SAA8C,GACtE,OAAO,CAAC,oBAAoB,CAAC,CAO/B;AAED,iBAAe,+BAA+B,CAC5C,OAAO,EAAE,sCAAsC,EAC/C,OAAO,EAAE,oCAAoC,EAC7C,eAAe,EAAE,sCAAsC,EACvD,mBAAmB,EAAE,0CAA0C,EAC/D,yBAAyB,SAA8C,EACvE,iBAAiB,GAAE,wCAAkE,
|
|
1
|
+
{"version":3,"file":"declarative-evaluator-worker-runner.d.ts","sourceRoot":"","sources":["../../../src/src/config/declarative-evaluator-worker-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,4BAA4B,CAAC;AACzF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAoI1D;;;;;;GAMG;AACH,eAAO,MAAM,0CAA0C;;;CAGrD,CAAC;AAEH,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