veryfront 0.1.452 → 0.1.454
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 +23 -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<TAttributes extends HostToolTraceAttributes = HostToolTraceAttributes> = {
|
|
30
|
+
authToken: string;
|
|
31
|
+
apiUrl: string;
|
|
32
|
+
durableChildRun?: HostedChildRunIdentifiers;
|
|
33
|
+
conversationId?: string;
|
|
34
|
+
parentRunId?: string;
|
|
35
|
+
description: string;
|
|
36
|
+
instrumentation?: HostedChildForkExecutionInstrumentation<TAttributes>;
|
|
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<TAttributes>) => 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,EA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B,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,4BAA4B,KAAK,IAAI,CAAC;IACzD,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CAClD,CAAC;AAiDF,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.454";
|
|
2
2
|
//# sourceMappingURL=version-constant.d.ts.map
|
package/package.json
CHANGED
package/src/deno.js
CHANGED
|
@@ -60,6 +60,19 @@ export type HostedChildForkExecutionInstrumentation<
|
|
|
60
60
|
error?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
+
export type HostedChildForkExecutionRunContextFactoryInput<
|
|
64
|
+
TAttributes extends HostToolTraceAttributes = HostToolTraceAttributes,
|
|
65
|
+
> = {
|
|
66
|
+
authToken: string;
|
|
67
|
+
apiUrl: string;
|
|
68
|
+
durableChildRun?: HostedChildRunIdentifiers;
|
|
69
|
+
conversationId?: string;
|
|
70
|
+
parentRunId?: string;
|
|
71
|
+
description: string;
|
|
72
|
+
instrumentation?: HostedChildForkExecutionInstrumentation<TAttributes>;
|
|
73
|
+
pendingToolLogWriter?: { warn: (message: string, metadata?: Record<string, unknown>) => void };
|
|
74
|
+
};
|
|
75
|
+
|
|
63
76
|
export type ExecuteHostedChildForkWithPreparedToolsInput<
|
|
64
77
|
TAttributes extends HostToolTraceAttributes = HostToolTraceAttributes,
|
|
65
78
|
> = {
|
|
@@ -87,6 +100,9 @@ export type ExecuteHostedChildForkWithPreparedToolsInput<
|
|
|
87
100
|
buildInstructions?: () => string;
|
|
88
101
|
onBeforeStop?: StartHostedChildForkRuntimeWithHostToolsInput<TAttributes>["onBeforeStop"];
|
|
89
102
|
runStep?: AgentRuntimeForkStepRunner;
|
|
103
|
+
createRunContext?: (
|
|
104
|
+
input: HostedChildForkExecutionRunContextFactoryInput<TAttributes>,
|
|
105
|
+
) => HostedDurableChildForkRunContext;
|
|
90
106
|
startRuntime?: (
|
|
91
107
|
input: StartHostedChildForkRuntimeWithHostToolsInput<TAttributes>,
|
|
92
108
|
) => StartedHostedChildForkRuntime | Promise<StartedHostedChildForkRuntime>;
|
|
@@ -101,16 +117,11 @@ export type ExecuteHostedChildForkWithPreparedToolsInput<
|
|
|
101
117
|
shouldRethrowError?: (error: unknown) => boolean;
|
|
102
118
|
};
|
|
103
119
|
|
|
104
|
-
function createForkRunContext
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
parentRunId?: string;
|
|
110
|
-
description: string;
|
|
111
|
-
instrumentation?: HostedChildForkExecutionInstrumentation;
|
|
112
|
-
pendingToolLogWriter?: { warn: (message: string, metadata?: Record<string, unknown>) => void };
|
|
113
|
-
}): HostedDurableChildForkRunContext {
|
|
120
|
+
function createForkRunContext<
|
|
121
|
+
TAttributes extends HostToolTraceAttributes = HostToolTraceAttributes,
|
|
122
|
+
>(
|
|
123
|
+
input: HostedChildForkExecutionRunContextFactoryInput<TAttributes>,
|
|
124
|
+
): HostedDurableChildForkRunContext {
|
|
114
125
|
const sourceInstrumentation = input.instrumentation;
|
|
115
126
|
const sourceTrace = sourceInstrumentation?.trace;
|
|
116
127
|
const instrumentation: HostedConversationRunChunkMirrorInstrumentation | undefined =
|
|
@@ -159,7 +170,8 @@ export async function executeHostedChildForkWithPreparedTools<
|
|
|
159
170
|
input: ExecuteHostedChildForkWithPreparedToolsInput<TAttributes>,
|
|
160
171
|
): Promise<ChildRunExecutionResult> {
|
|
161
172
|
const startTime = input.startTime ?? Date.now();
|
|
162
|
-
const
|
|
173
|
+
const createRunContext = input.createRunContext ?? createForkRunContext;
|
|
174
|
+
const runContext = createRunContext({
|
|
163
175
|
authToken: input.authToken,
|
|
164
176
|
apiUrl: input.apiUrl,
|
|
165
177
|
durableChildRun: input.durableChildRun,
|