veryfront 0.1.452 → 0.1.453
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-child-fork-execution-runner.d.ts +14 -0
- package/esm/src/agent/hosted-child-fork-execution-runner.d.ts.map +1 -1
- package/esm/src/agent/hosted-child-fork-execution-runner.js +2 -1
- 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/src/deno.js +1 -1
- package/src/src/agent/hosted-child-fork-execution-runner.ts +19 -11
- package/src/src/utils/version-constant.ts +1 -1
package/esm/deno.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { HostToolTraceAttributes } from "../tool/index.js";
|
|
2
|
+
import { type HostedDurableChildForkRunContext } from "./hosted-child-fork-run-context.js";
|
|
2
3
|
import { type DefaultHostedChildForkToolAssemblyResult } from "./hosted-child-requested-tools.js";
|
|
3
4
|
import { type HostedChildForkInstructionsContext } from "./hosted-child-fork-instructions.js";
|
|
4
5
|
import { type HostedChildForkRuntimeStepSystemResolver } from "./hosted-child-fork-step-message-preparation.js";
|
|
@@ -25,6 +26,18 @@ export type HostedChildForkExecutionInstrumentation<TAttributes extends HostTool
|
|
|
25
26
|
warn?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
26
27
|
error?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
27
28
|
};
|
|
29
|
+
export type HostedChildForkExecutionRunContextFactoryInput = {
|
|
30
|
+
authToken: string;
|
|
31
|
+
apiUrl: string;
|
|
32
|
+
durableChildRun?: HostedChildRunIdentifiers;
|
|
33
|
+
conversationId?: string;
|
|
34
|
+
parentRunId?: string;
|
|
35
|
+
description: string;
|
|
36
|
+
instrumentation?: HostedChildForkExecutionInstrumentation;
|
|
37
|
+
pendingToolLogWriter?: {
|
|
38
|
+
warn: (message: string, metadata?: Record<string, unknown>) => void;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
28
41
|
export type ExecuteHostedChildForkWithPreparedToolsInput<TAttributes extends HostToolTraceAttributes = HostToolTraceAttributes> = {
|
|
29
42
|
authToken: string;
|
|
30
43
|
apiUrl: string;
|
|
@@ -52,6 +65,7 @@ export type ExecuteHostedChildForkWithPreparedToolsInput<TAttributes extends Hos
|
|
|
52
65
|
buildInstructions?: () => string;
|
|
53
66
|
onBeforeStop?: StartHostedChildForkRuntimeWithHostToolsInput<TAttributes>["onBeforeStop"];
|
|
54
67
|
runStep?: AgentRuntimeForkStepRunner;
|
|
68
|
+
createRunContext?: (input: HostedChildForkExecutionRunContextFactoryInput) => HostedDurableChildForkRunContext;
|
|
55
69
|
startRuntime?: (input: StartHostedChildForkRuntimeWithHostToolsInput<TAttributes>) => StartedHostedChildForkRuntime | Promise<StartedHostedChildForkRuntime>;
|
|
56
70
|
childRunMonitorPollIntervalMs?: number;
|
|
57
71
|
idleTimeoutMs?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-child-fork-execution-runner.d.ts","sourceRoot":"","sources":["../../../src/src/agent/hosted-child-fork-execution-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"hosted-child-fork-execution-runner.d.ts","sourceRoot":"","sources":["../../../src/src/agent/hosted-child-fork-execution-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAKL,KAAK,gCAAgC,EACtC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,KAAK,wCAAwC,EAAE,MAAM,mCAAmC,CAAC;AAKlG,OAAO,EAEL,KAAK,kCAAkC,EACxC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,KAAK,wCAAwC,EAE9C,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,KAAK,6BAA6B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AAkB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CAClD,CAAC;AA+CF,wBAAsB,uCAAuC,CAC3D,WAAW,SAAS,uBAAuB,GAAG,uBAAuB,EAErE,KAAK,EAAE,4CAA4C,CAAC,WAAW,CAAC,GAC/D,OAAO,CAAC,uBAAuB,CAAC,CAqIlC"}
|
|
@@ -47,7 +47,8 @@ function defaultResolveSystem(input) {
|
|
|
47
47
|
}
|
|
48
48
|
export async function executeHostedChildForkWithPreparedTools(input) {
|
|
49
49
|
const startTime = input.startTime ?? Date.now();
|
|
50
|
-
const
|
|
50
|
+
const createRunContext = input.createRunContext ?? createForkRunContext;
|
|
51
|
+
const runContext = createRunContext({
|
|
51
52
|
authToken: input.authToken,
|
|
52
53
|
apiUrl: input.apiUrl,
|
|
53
54
|
durableChildRun: input.durableChildRun,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.453";
|
|
2
2
|
//# sourceMappingURL=version-constant.d.ts.map
|
package/package.json
CHANGED
package/src/deno.js
CHANGED
|
@@ -60,6 +60,17 @@ export type HostedChildForkExecutionInstrumentation<
|
|
|
60
60
|
error?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
+
export type HostedChildForkExecutionRunContextFactoryInput = {
|
|
64
|
+
authToken: string;
|
|
65
|
+
apiUrl: string;
|
|
66
|
+
durableChildRun?: HostedChildRunIdentifiers;
|
|
67
|
+
conversationId?: string;
|
|
68
|
+
parentRunId?: string;
|
|
69
|
+
description: string;
|
|
70
|
+
instrumentation?: HostedChildForkExecutionInstrumentation;
|
|
71
|
+
pendingToolLogWriter?: { warn: (message: string, metadata?: Record<string, unknown>) => void };
|
|
72
|
+
};
|
|
73
|
+
|
|
63
74
|
export type ExecuteHostedChildForkWithPreparedToolsInput<
|
|
64
75
|
TAttributes extends HostToolTraceAttributes = HostToolTraceAttributes,
|
|
65
76
|
> = {
|
|
@@ -87,6 +98,9 @@ export type ExecuteHostedChildForkWithPreparedToolsInput<
|
|
|
87
98
|
buildInstructions?: () => string;
|
|
88
99
|
onBeforeStop?: StartHostedChildForkRuntimeWithHostToolsInput<TAttributes>["onBeforeStop"];
|
|
89
100
|
runStep?: AgentRuntimeForkStepRunner;
|
|
101
|
+
createRunContext?: (
|
|
102
|
+
input: HostedChildForkExecutionRunContextFactoryInput,
|
|
103
|
+
) => HostedDurableChildForkRunContext;
|
|
90
104
|
startRuntime?: (
|
|
91
105
|
input: StartHostedChildForkRuntimeWithHostToolsInput<TAttributes>,
|
|
92
106
|
) => StartedHostedChildForkRuntime | Promise<StartedHostedChildForkRuntime>;
|
|
@@ -101,16 +115,9 @@ export type ExecuteHostedChildForkWithPreparedToolsInput<
|
|
|
101
115
|
shouldRethrowError?: (error: unknown) => boolean;
|
|
102
116
|
};
|
|
103
117
|
|
|
104
|
-
function createForkRunContext(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
durableChildRun?: HostedChildRunIdentifiers;
|
|
108
|
-
conversationId?: string;
|
|
109
|
-
parentRunId?: string;
|
|
110
|
-
description: string;
|
|
111
|
-
instrumentation?: HostedChildForkExecutionInstrumentation;
|
|
112
|
-
pendingToolLogWriter?: { warn: (message: string, metadata?: Record<string, unknown>) => void };
|
|
113
|
-
}): HostedDurableChildForkRunContext {
|
|
118
|
+
function createForkRunContext(
|
|
119
|
+
input: HostedChildForkExecutionRunContextFactoryInput,
|
|
120
|
+
): HostedDurableChildForkRunContext {
|
|
114
121
|
const sourceInstrumentation = input.instrumentation;
|
|
115
122
|
const sourceTrace = sourceInstrumentation?.trace;
|
|
116
123
|
const instrumentation: HostedConversationRunChunkMirrorInstrumentation | undefined =
|
|
@@ -159,7 +166,8 @@ export async function executeHostedChildForkWithPreparedTools<
|
|
|
159
166
|
input: ExecuteHostedChildForkWithPreparedToolsInput<TAttributes>,
|
|
160
167
|
): Promise<ChildRunExecutionResult> {
|
|
161
168
|
const startTime = input.startTime ?? Date.now();
|
|
162
|
-
const
|
|
169
|
+
const createRunContext = input.createRunContext ?? createForkRunContext;
|
|
170
|
+
const runContext = createRunContext({
|
|
163
171
|
authToken: input.authToken,
|
|
164
172
|
apiUrl: input.apiUrl,
|
|
165
173
|
durableChildRun: input.durableChildRun,
|