veryfront 0.1.1109 → 0.1.1111
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/composition/composition.d.ts.map +1 -1
- package/esm/src/agent/composition/composition.js +15 -2
- package/esm/src/agent/hosted/veryfront-cloud-agent-service.d.ts +8 -0
- package/esm/src/agent/hosted/veryfront-cloud-agent-service.d.ts.map +1 -1
- package/esm/src/agent/hosted/veryfront-cloud-agent-service.js +23 -9
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +2 -1
- package/esm/src/agent/runtime/mcp-server-tool-sources.d.ts.map +1 -1
- package/esm/src/agent/runtime/mcp-server-tool-sources.js +8 -1
- package/esm/src/agent/runtime/remote-tool-source-context.d.ts +6 -0
- package/esm/src/agent/runtime/remote-tool-source-context.d.ts.map +1 -0
- package/esm/src/agent/runtime/remote-tool-source-context.js +10 -0
- package/esm/src/modules/react-loader/ssr-module-loader/cache/index.d.ts +1 -0
- package/esm/src/modules/react-loader/ssr-module-loader/cache/index.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/cache/memory.d.ts +10 -1
- package/esm/src/modules/react-loader/ssr-module-loader/cache/memory.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/cache/memory.js +14 -8
- package/esm/src/modules/react-loader/ssr-module-loader/index.d.ts +1 -0
- package/esm/src/modules/react-loader/ssr-module-loader/index.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/pipeline.js +2 -2
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +5 -5
package/esm/deno.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/composition/composition.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,KAAK,EAAiB,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAIhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/composition/composition.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,KAAK,EAAiB,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAIhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAgDhF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CA+BnE;AAED,6CAA6C;AAC7C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACzE;AAED,sCAAsC;AACtC,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;AAED,qCAAqC;AACrC,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,uBAAuB;AACvB,wBAAgB,cAAc,CAC5B,MAAM,EAAE,cAAc,GACrB;IAAE,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;CAAE,CAsDrD;AAID,cAAM,kBAAmB,SAAQ,oBAAoB,CAAC,KAAK,CAAC;CAAG;AAG/D,eAAO,MAAM,aAAa,oBAAuC,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAe9B,uBAAuB;AACvB,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAU5D;AAED,oBAAoB;AACpB,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAOtD;AAED,4BAA4B;AAC5B,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAOzC;AA+BD,8BAA8B;AAC9B,wBAAgB,gBAAgB,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAU5F"}
|
|
@@ -15,6 +15,7 @@ import { ProjectScopedRegistryManager } from "../../registry/project-scoped-regi
|
|
|
15
15
|
import { getAgentToolInputSchema } from "../schemas/index.js";
|
|
16
16
|
import { getRuntimeSourceIntegrationPolicyFromContext } from "../runtime/runtime-tool-config.js";
|
|
17
17
|
import { runWithExactSourceIntegrationPolicy } from "../../integrations/source-policy-context.js";
|
|
18
|
+
import { streamDataStreamEvents } from "../streaming/data-stream.js";
|
|
18
19
|
/** Agent as tool helper. */
|
|
19
20
|
async function runAgentAsStreamingTool(agent, input, sourceIntegrationPolicy) {
|
|
20
21
|
const execute = async () => {
|
|
@@ -25,10 +26,22 @@ async function runAgentAsStreamingTool(agent, input, sourceIntegrationPolicy) {
|
|
|
25
26
|
finalResponse = response;
|
|
26
27
|
},
|
|
27
28
|
});
|
|
28
|
-
|
|
29
|
+
let streamError;
|
|
30
|
+
const response = stream.toDataStreamResponse();
|
|
31
|
+
if (response.body) {
|
|
32
|
+
for await (const event of streamDataStreamEvents(response.body)) {
|
|
33
|
+
if (event.type !== "error")
|
|
34
|
+
continue;
|
|
35
|
+
streamError = typeof event.errorText === "string"
|
|
36
|
+
? event.errorText
|
|
37
|
+
: typeof event.error === "string"
|
|
38
|
+
? event.error
|
|
39
|
+
: "Child agent stream failed";
|
|
40
|
+
}
|
|
41
|
+
}
|
|
29
42
|
if (!finalResponse) {
|
|
30
43
|
throw AGENT_ERROR.create({
|
|
31
|
-
detail: `Agent "${agent.id}" stream completed without a final response.`,
|
|
44
|
+
detail: streamError ?? `Agent "${agent.id}" stream completed without a final response.`,
|
|
32
45
|
});
|
|
33
46
|
}
|
|
34
47
|
return finalResponse;
|
|
@@ -150,11 +150,19 @@ declare function buildHostedChildToolContext(globalToolContext: ChildRunContext,
|
|
|
150
150
|
/** Internal test seams for hosted project-agent materialization. */
|
|
151
151
|
export declare const veryfrontCloudAgentServiceInternals: {
|
|
152
152
|
buildHostedChildToolContext: typeof buildHostedChildToolContext;
|
|
153
|
+
resolveHostedDelegationBinding: typeof resolveHostedDelegationBinding;
|
|
153
154
|
resolveHostedChildAgentExecutionConfig: typeof resolveHostedChildAgentExecutionConfig;
|
|
154
155
|
resolveHostedChildToolNames: typeof resolveHostedChildToolNames;
|
|
155
156
|
resolveMcpServers: typeof resolveMcpServers;
|
|
156
157
|
};
|
|
157
158
|
declare function resolveHostedChildAgentExecutionConfig(context: NodeVeryfrontCloudAgentServiceContext, taskContext: ChildRunContext, childAgentId: string, projectId: string): Promise<DefaultHostedChildAgentExecutionConfig | undefined>;
|
|
159
|
+
type HostedDelegationBinding = {
|
|
160
|
+
kind: "scoped";
|
|
161
|
+
delegateIds: string[];
|
|
162
|
+
} | {
|
|
163
|
+
kind: "legacy";
|
|
164
|
+
};
|
|
165
|
+
declare function resolveHostedDelegationBinding(agentConfig: RuntimeAgentMarkdownDefinition | undefined): HostedDelegationBinding;
|
|
158
166
|
/** Create node Veryfront Cloud agent service runtime. */
|
|
159
167
|
export declare function createNodeVeryfrontCloudAgentServiceRuntime(options?: NodeVeryfrontCloudAgentServiceOptions): Promise<AgentServiceRuntimeBundle<NodeVeryfrontCloudAgentServicePreparedExecution>>;
|
|
160
168
|
/** Starts node Veryfront Cloud agent service. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"veryfront-cloud-agent-service.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/hosted/veryfront-cloud-agent-service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAqB9E,OAAO,EAGL,KAAK,WAAW,EAIjB,MAAM,qBAAqB,CAAC;AAsB7B,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAC9F,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAUzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EACV,sCAAsC,EAEtC,+BAA+B,EAChC,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAMnE,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAsB,6BAA6B,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAMjF,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"veryfront-cloud-agent-service.d.ts","sourceRoot":"","sources":["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E,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEvB,iBAAS,8BAA8B,CACrC,WAAW,EAAE,8BAA8B,GAAG,SAAS,GACtD,uBAAuB,CAazB;AA6bD,yDAAyD;AACzD,wBAAsB,2CAA2C,CAC/D,OAAO,GAAE,qCAA0C,GAClD,OAAO,CAAC,yBAAyB,CAAC,+CAA+C,CAAC,CAAC,CAKrF;AAED,iDAAiD;AACjD,wBAAsB,mCAAmC,CACvD,OAAO,GAAE,qCAA0C,GAClD,OAAO,CAAC,2BAA2B,CAAC,+CAA+C,CAAC,CAAC,CAgBvF;AAED,4BAA4B;AAC5B,wBAAsB,iBAAiB,CACrC,OAAO,GAAE,qCAA0C,GAClD,OAAO,CAAC,IAAI,CAAC,CAiDf"}
|
|
@@ -34,6 +34,7 @@ import { createDefaultHostedProjectSteeringRefresh, fetchDefaultHostedProjectSte
|
|
|
34
34
|
import { defaultAgentServiceMcpServers, } from "../service/mcp-server-config.js";
|
|
35
35
|
import { resolveRuntimeSkillsForAgent, } from "../runtime/skill-metadata.js";
|
|
36
36
|
import { buildAgentDelegateTools } from "../runtime/agent-delegation.js";
|
|
37
|
+
import { AGENT_DELEGATE_TOOL_PREFIX } from "../runtime/agent-delegation-names.js";
|
|
37
38
|
import { createRuntimeAgentDefinitionFromAgent, describeProjectAgentRuntimeAgentIdCandidates, discoverProjectAgentRuntime, doesProjectAgentRuntimeAgentMatchSource, getProjectAgentRuntimeAgentIdCandidates, resolveSingleProjectAgentRuntimeAgentId, runWithProjectAgentRuntime, } from "../project/agent-runtime.js";
|
|
38
39
|
import { buildVeryfrontCloudRuntimeInstructions } from "./cloud-runtime-system-messages.js";
|
|
39
40
|
import { flattenSystemInstructions } from "../runtime/tool-inventory.js";
|
|
@@ -484,6 +485,7 @@ function buildHostedChildToolContext(globalToolContext, childAgentId, childConfi
|
|
|
484
485
|
/** Internal test seams for hosted project-agent materialization. */
|
|
485
486
|
export const veryfrontCloudAgentServiceInternals = {
|
|
486
487
|
buildHostedChildToolContext,
|
|
488
|
+
resolveHostedDelegationBinding,
|
|
487
489
|
resolveHostedChildAgentExecutionConfig,
|
|
488
490
|
resolveHostedChildToolNames,
|
|
489
491
|
resolveMcpServers,
|
|
@@ -584,12 +586,19 @@ function buildHostedDelegateTools(context, input) {
|
|
|
584
586
|
}, executionContext),
|
|
585
587
|
});
|
|
586
588
|
}
|
|
587
|
-
function
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
589
|
+
function resolveHostedDelegationBinding(agentConfig) {
|
|
590
|
+
if (agentConfig?.delegates !== undefined) {
|
|
591
|
+
return { kind: "scoped", delegateIds: agentConfig.delegates };
|
|
592
|
+
}
|
|
593
|
+
if (agentConfig?.tools !== true) {
|
|
594
|
+
const delegateIds = agentConfig?.tools
|
|
595
|
+
?.filter((toolName) => toolName.startsWith(AGENT_DELEGATE_TOOL_PREFIX))
|
|
596
|
+
.map((toolName) => toolName.slice(AGENT_DELEGATE_TOOL_PREFIX.length));
|
|
597
|
+
if (delegateIds?.length) {
|
|
598
|
+
return { kind: "scoped", delegateIds };
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
return { kind: "legacy" };
|
|
593
602
|
}
|
|
594
603
|
function buildLocalTools(context, options, taskContext) {
|
|
595
604
|
const config = context.infrastructure.getConfig();
|
|
@@ -602,12 +611,17 @@ function buildLocalTools(context, options, taskContext) {
|
|
|
602
611
|
};
|
|
603
612
|
if (options.allowDelegation !== false) {
|
|
604
613
|
const agentConfig = options.liveProjectSteering?.agent;
|
|
605
|
-
|
|
606
|
-
|
|
614
|
+
const binding = resolveHostedDelegationBinding(agentConfig);
|
|
615
|
+
if (binding.kind === "scoped") {
|
|
616
|
+
Object.assign(tools, buildHostedDelegateTools(context, {
|
|
617
|
+
delegates: binding.delegateIds,
|
|
618
|
+
selfId: agentConfig?.id ?? taskContext.agentId ?? "veryfront",
|
|
619
|
+
taskContext,
|
|
620
|
+
}));
|
|
607
621
|
}
|
|
608
622
|
else {
|
|
609
623
|
// Agents authored before declarative delegates retain the legacy hosted
|
|
610
|
-
// child-fork tool.
|
|
624
|
+
// child-fork tool. Explicit scoped delegate bindings opt out.
|
|
611
625
|
tools.invoke_agent = createInvokeAgentTool(context, taskContext);
|
|
612
626
|
}
|
|
613
627
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,6BAA6B,EAClC,KAAK,aAAa,EAGlB,KAAK,OAAO,EAIZ,KAAK,QAAQ,EAGd,MAAM,aAAa,CAAC;AAIrB,OAAO,EAAqB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,6BAA6B,EAClC,KAAK,aAAa,EAGlB,KAAK,OAAO,EAIZ,KAAK,QAAQ,EAGd,MAAM,aAAa,CAAC;AAIrB,OAAO,EAAqB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAgEpE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,8BAA8B,EAC9B,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,qBAAqB,GACtB,MAAM,m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GnC"}
|
|
@@ -21,6 +21,7 @@ import { setActiveSpanAttributes as setOtelActiveSpanAttributes } from "../../ob
|
|
|
21
21
|
import { convertToTextGenerationRuntimeRequestMessages } from "./text-generation-runtime-message-converter.js";
|
|
22
22
|
import { convertToolsToRuntimeTools } from "./model-tool-converter.js";
|
|
23
23
|
import { getRuntimeRemoteToolSources } from "./mcp-server-tool-sources.js";
|
|
24
|
+
import { runWithExactRuntimeRemoteToolSources } from "./remote-tool-source-context.js";
|
|
24
25
|
import { createStreamState, processStream, } from "./chat-stream-handler.js";
|
|
25
26
|
import { repairToolCall } from "./repair-tool-call.js";
|
|
26
27
|
import { MiddlewareChain } from "../middleware/chain.js";
|
|
@@ -209,7 +210,7 @@ async function traceConfiguredToolExecution(input) {
|
|
|
209
210
|
inputSizeBytes,
|
|
210
211
|
}));
|
|
211
212
|
try {
|
|
212
|
-
const result = await executeConfiguredTool(input.toolName, input.args, input.toolsConfig, input.context, input.allowedRemoteToolNames, input.remoteToolSources, input.sourceIntegrationPolicy, { strictConfiguredToolsOnly: input.strictConfiguredToolsOnly });
|
|
213
|
+
const result = await runWithExactRuntimeRemoteToolSources(input.remoteToolSources ?? [], () => executeConfiguredTool(input.toolName, input.args, input.toolsConfig, input.context, input.allowedRemoteToolNames, input.remoteToolSources, input.sourceIntegrationPolicy, { strictConfiguredToolsOnly: input.strictConfiguredToolsOnly }));
|
|
213
214
|
const resultError = getToolResultError(result);
|
|
214
215
|
if (resultError !== undefined) {
|
|
215
216
|
setOtelActiveSpanErrorStatus(resultError);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server-tool-sources.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/mcp-server-tool-sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EACV,WAAW,EAKZ,MAAM,aAAa,CAAC;AAErB,OA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xB,SAAS,EAAE,MAAM,GAChB,gBAAgB,CAsBlB;AAmED,kEAAkE;AAClE,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,WAAW,EACnB,YAAY,GAAE,sCAA2C,EACzD,OAAO,qBAAY,GAClB,gBAAgB,EAAE,GAAG,SAAS,CA2DhC"}
|
|
@@ -2,6 +2,7 @@ import { createProjectScopedRemoteToolCatalog, createRemoteMCPToolSource, isTool
|
|
|
2
2
|
import { CONFIG_INVALID, PERMISSION_DENIED } from "../../errors/index.js";
|
|
3
3
|
import { getVeryfrontCloudHostBootstrap, } from "../../platform/cloud/resolver.js";
|
|
4
4
|
import { createAgentServiceRemoteMcpConfig } from "../service/mcp-server-config.js";
|
|
5
|
+
import { getActiveRuntimeRemoteToolSources } from "./remote-tool-source-context.js";
|
|
5
6
|
/** Canonical source id for the Veryfront API MCP server. */
|
|
6
7
|
export const VERYFRONT_API_MCP_SOURCE_ID = "veryfront-platform-mcp";
|
|
7
8
|
/** Canonical source id for the Veryfront Studio MCP server. */
|
|
@@ -187,11 +188,17 @@ function getFirstPartyMcpSourceId(server) {
|
|
|
187
188
|
/** Return remote tool sources for direct agent runtime config. */
|
|
188
189
|
export function getRuntimeRemoteToolSources(config, dependencies = {}, agentId = config.id) {
|
|
189
190
|
const runtimeConfig = config;
|
|
190
|
-
const
|
|
191
|
+
const configuredInjectedSources = Object.hasOwn(runtimeConfig, "__vfRemoteToolSources")
|
|
192
|
+
? runtimeConfig.__vfRemoteToolSources ?? []
|
|
193
|
+
: undefined;
|
|
191
194
|
const hasExplicitMcpServers = config.mcpServers !== undefined;
|
|
192
195
|
const implicitToolNames = hasExplicitMcpServers
|
|
193
196
|
? []
|
|
194
197
|
: getRequestedUnresolvedBooleanToolNames({ tools: config.tools, agentId });
|
|
198
|
+
const inheritedSources = hasExplicitMcpServers || implicitToolNames.length > 0
|
|
199
|
+
? getActiveRuntimeRemoteToolSources() ?? []
|
|
200
|
+
: [];
|
|
201
|
+
const injectedSources = configuredInjectedSources ?? inheritedSources;
|
|
195
202
|
const configuredServers = config.mcpServers ??
|
|
196
203
|
(implicitToolNames.length > 0
|
|
197
204
|
? [{ kind: "veryfront-api", toolPolicy: { allow: implicitToolNames } }]
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RemoteToolSource } from "../../tool/index.js";
|
|
2
|
+
/** Return the exact request-scoped remote tool sources active at this runtime boundary. */
|
|
3
|
+
export declare function getActiveRuntimeRemoteToolSources(): RemoteToolSource[] | undefined;
|
|
4
|
+
/** Establish the exact remote tool sources available to nested local execution. */
|
|
5
|
+
export declare function runWithExactRuntimeRemoteToolSources<T>(sources: RemoteToolSource[], fn: () => T): T;
|
|
6
|
+
//# sourceMappingURL=remote-tool-source-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-tool-source-context.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/remote-tool-source-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAI5D,2FAA2F;AAC3F,wBAAgB,iCAAiC,IAAI,gBAAgB,EAAE,GAAG,SAAS,CAElF;AAED,mFAAmF;AACnF,wBAAgB,oCAAoC,CAAC,CAAC,EACpD,OAAO,EAAE,gBAAgB,EAAE,EAC3B,EAAE,EAAE,MAAM,CAAC,GACV,CAAC,CAEH"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
const remoteToolSourceStorage = new AsyncLocalStorage();
|
|
3
|
+
/** Return the exact request-scoped remote tool sources active at this runtime boundary. */
|
|
4
|
+
export function getActiveRuntimeRemoteToolSources() {
|
|
5
|
+
return remoteToolSourceStorage.getStore();
|
|
6
|
+
}
|
|
7
|
+
/** Establish the exact remote tool sources available to nested local execution. */
|
|
8
|
+
export function runWithExactRuntimeRemoteToolSources(sources, fn) {
|
|
9
|
+
return remoteToolSourceStorage.run(sources, fn);
|
|
10
|
+
}
|
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
* @module modules/react-loader/ssr-module-loader/cache
|
|
5
5
|
*/
|
|
6
6
|
export { acquireTransformSlot, clearSSRModuleCache, clearSSRModuleCacheForProject, failedComponents, getTransformSemaphore, getTransformStats, globalCrossProjectCache, globalInProgress, globalModuleCache, globalTmpDirs, releaseTransformSlot, tryAcquireTransformSlot, } from "./memory.js";
|
|
7
|
+
export type { ClearSSRModuleCacheForProjectOptions } from "./memory.js";
|
|
7
8
|
export { getFromRedis, initializeSSRDistributedCache, isSSRDistributedCacheEnabled, setInRedis, } from "./redis.js";
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/src/modules/react-loader/ssr-module-loader/cache/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,6BAA6B,EAC7B,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,YAAY,EACZ,6BAA6B,EAC7B,4BAA4B,EAC5B,UAAU,GACX,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/src/modules/react-loader/ssr-module-loader/cache/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,6BAA6B,EAC7B,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,oCAAoC,EAAE,MAAM,aAAa,CAAC;AAExE,OAAO,EACL,YAAY,EACZ,6BAA6B,EAC7B,4BAA4B,EAC5B,UAAU,GACX,MAAM,YAAY,CAAC"}
|
|
@@ -20,6 +20,15 @@ export declare const globalCrossProjectCache: LRUCache<string, ModuleCacheEntry>
|
|
|
20
20
|
export declare const globalInProgress: Map<string, Promise<void>>;
|
|
21
21
|
export declare const globalTmpDirs: LRUCache<string, string>;
|
|
22
22
|
export declare const failedComponents: Map<string, FailureRecord>;
|
|
23
|
+
export interface ClearSSRModuleCacheForProjectOptions {
|
|
24
|
+
/**
|
|
25
|
+
* Preserve live transform ownership and per-project capacity waiters while
|
|
26
|
+
* clearing request-visible cache entries. Dev SSR request starts use this so
|
|
27
|
+
* concurrent cold requests do not delete another request's transform leader
|
|
28
|
+
* before it can publish its completed cache entry.
|
|
29
|
+
*/
|
|
30
|
+
preserveActiveTransforms?: boolean;
|
|
31
|
+
}
|
|
23
32
|
export declare function getTransformSemaphore(): Semaphore;
|
|
24
33
|
/**
|
|
25
34
|
* Attempt to acquire a project-level transform slot immediately.
|
|
@@ -55,5 +64,5 @@ export declare function getTransformStats(): {
|
|
|
55
64
|
activeProjects: Map<string, number>;
|
|
56
65
|
};
|
|
57
66
|
export declare function clearSSRModuleCache(): void;
|
|
58
|
-
export declare function clearSSRModuleCacheForProject(projectId: string): void;
|
|
67
|
+
export declare function clearSSRModuleCacheForProject(projectId: string, options?: ClearSSRModuleCacheForProjectOptions): void;
|
|
59
68
|
//# sourceMappingURL=memory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../../../../src/src/modules/react-loader/ssr-module-loader/cache/memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAO5D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,EA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;;GAEG;AACH,wBAAgB,iBAAiB,IAAI;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,CAOA;AAkDD,wBAAgB,mBAAmB,IAAI,IAAI,CAsB1C;AAED,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,oCAAyC,GACjD,IAAI,CAwDN"}
|
|
@@ -248,9 +248,10 @@ export function clearSSRModuleCache() {
|
|
|
248
248
|
transformSlotsCleared: transformSlotsCount,
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
export function clearSSRModuleCacheForProject(projectId) {
|
|
251
|
+
export function clearSSRModuleCacheForProject(projectId, options = {}) {
|
|
252
252
|
let cleared = 0;
|
|
253
253
|
const encodedProjectId = hashCodeHex(projectId);
|
|
254
|
+
const preserveActiveTransforms = options.preserveActiveTransforms === true;
|
|
254
255
|
for (const key of globalModuleCache.keys()) {
|
|
255
256
|
if (!isKeyForProject(key, projectId))
|
|
256
257
|
continue;
|
|
@@ -262,10 +263,12 @@ export function clearSSRModuleCacheForProject(projectId) {
|
|
|
262
263
|
continue;
|
|
263
264
|
globalCrossProjectCache.delete(key);
|
|
264
265
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
if (!preserveActiveTransforms) {
|
|
267
|
+
for (const key of globalInProgress.keys()) {
|
|
268
|
+
if (!isKeyForProject(key, projectId))
|
|
269
|
+
continue;
|
|
270
|
+
globalInProgress.delete(key);
|
|
271
|
+
}
|
|
269
272
|
}
|
|
270
273
|
for (const key of failedComponents.keys()) {
|
|
271
274
|
if (!isKeyForProject(key, projectId))
|
|
@@ -274,7 +277,7 @@ export function clearSSRModuleCacheForProject(projectId) {
|
|
|
274
277
|
}
|
|
275
278
|
for (const key of globalTmpDirs.keys()) {
|
|
276
279
|
const parts = key.split("|");
|
|
277
|
-
if (parts
|
|
280
|
+
if (parts[2] === encodedProjectId || parts[1] === encodedProjectId) {
|
|
278
281
|
globalTmpDirs.delete(key);
|
|
279
282
|
continue;
|
|
280
283
|
}
|
|
@@ -283,14 +286,17 @@ export function clearSSRModuleCacheForProject(projectId) {
|
|
|
283
286
|
globalTmpDirs.delete(key);
|
|
284
287
|
}
|
|
285
288
|
}
|
|
286
|
-
|
|
287
|
-
|
|
289
|
+
if (!preserveActiveTransforms) {
|
|
290
|
+
projectTransformCounts.delete(projectId);
|
|
291
|
+
rejectProjectTransformWaiters(projectId);
|
|
292
|
+
}
|
|
288
293
|
// Clear verified HTTP bundle paths — keys are tempPath:contentHash (not project-scoped),
|
|
289
294
|
// so full clear is needed. This just forces re-verification on next access.
|
|
290
295
|
verifiedHttpBundlePaths.clear();
|
|
291
296
|
logger.debug("✓ Project cache cleared", {
|
|
292
297
|
projectId,
|
|
293
298
|
entriesCleared: cleared,
|
|
299
|
+
activeTransformsPreserved: preserveActiveTransforms,
|
|
294
300
|
remainingModules: globalModuleCache.size,
|
|
295
301
|
});
|
|
296
302
|
}
|
|
@@ -7,6 +7,7 @@ export { SSRModuleLoader } from "./loader.js";
|
|
|
7
7
|
export type { FailureRecord, ModuleCacheEntry, SSRModuleCacheStats, SSRModuleLoaderOptions, } from "./types.js";
|
|
8
8
|
export { CIRCUIT_BREAKER_RESET_MS, CIRCUIT_BREAKER_THRESHOLD, getMaxConcurrentTransforms, getTransformPerProjectLimit, REDIS_KEY_PREFIX, SSR_MODULE_CACHE_MAX_ENTRIES, SSR_MODULE_CACHE_TTL_MS, SSR_TMP_DIRS_MAX_ENTRIES, } from "./constants.js";
|
|
9
9
|
export { clearSSRModuleCache, clearSSRModuleCacheForProject, globalModuleCache, initializeSSRDistributedCache, isSSRDistributedCacheEnabled, } from "./cache/index.js";
|
|
10
|
+
export type { ClearSSRModuleCacheForProjectOptions } from "./cache/index.js";
|
|
10
11
|
export { Semaphore } from "./concurrency/index.js";
|
|
11
12
|
import type { SSRModuleCacheStats } from "./types.js";
|
|
12
13
|
export declare function getSSRModuleCacheStats(): SSRModuleCacheStats;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/src/modules/react-loader/ssr-module-loader/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,YAAY,EACV,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,4BAA4B,EAC5B,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAC7B,iBAAiB,EACjB,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAInD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,wBAAgB,sBAAsB,IAAI,mBAAmB,CAO5D"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/src/modules/react-loader/ssr-module-loader/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,YAAY,EACV,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,4BAA4B,EAC5B,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAC7B,iBAAiB,EACjB,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EAAE,oCAAoC,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAInD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,wBAAgB,sBAAsB,IAAI,mBAAmB,CAO5D"}
|
|
@@ -314,7 +314,7 @@ export class RenderPipeline {
|
|
|
314
314
|
}
|
|
315
315
|
setupSSRGlobals();
|
|
316
316
|
if (this.config.mode === "development") {
|
|
317
|
-
clearSSRModuleCacheForProject(projectId);
|
|
317
|
+
clearSSRModuleCacheForProject(projectId, { preserveActiveTransforms: true });
|
|
318
318
|
}
|
|
319
319
|
const renderOnce = () => withSpan("render.page", async () => {
|
|
320
320
|
const { result } = await runWithCSSCollector(async () => {
|
|
@@ -488,7 +488,7 @@ export class RenderPipeline {
|
|
|
488
488
|
setupSSRGlobals();
|
|
489
489
|
const projectId = options?.projectId ?? this.config.projectId ?? this.config.projectDir;
|
|
490
490
|
if (this.config.mode === "development") {
|
|
491
|
-
clearSSRModuleCacheForProject(projectId);
|
|
491
|
+
clearSSRModuleCacheForProject(projectId, { preserveActiveTransforms: true });
|
|
492
492
|
}
|
|
493
493
|
const pageInfo = await profilePhase("page_data.resolve_page", () => this.config.pageResolver.resolvePage(slug));
|
|
494
494
|
const skipLayouts = isDotPath(slug, pageInfo.entity.path);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1111",
|
|
4
4
|
"description": "The simplest way to build AI-powered apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -332,10 +332,10 @@
|
|
|
332
332
|
"@types/react": "19.2.14",
|
|
333
333
|
"@types/react-dom": "19.2.3",
|
|
334
334
|
"ws": "8.21.0",
|
|
335
|
-
"@veryfront/ext-bundler-esbuild": "0.1.
|
|
336
|
-
"@veryfront/ext-content-mdx": "0.1.
|
|
337
|
-
"@veryfront/ext-css-tailwind": "0.1.
|
|
338
|
-
"@veryfront/ext-parser-babel": "0.1.
|
|
335
|
+
"@veryfront/ext-bundler-esbuild": "0.1.1111",
|
|
336
|
+
"@veryfront/ext-content-mdx": "0.1.1111",
|
|
337
|
+
"@veryfront/ext-css-tailwind": "0.1.1111",
|
|
338
|
+
"@veryfront/ext-parser-babel": "0.1.1111"
|
|
339
339
|
},
|
|
340
340
|
"devDependencies": {
|
|
341
341
|
"@types/node": "20.9.0"
|