@perstack/runtime 0.0.75 → 0.0.77
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/dist/bin/cli.js +24 -5
- package/dist/bin/cli.js.map +1 -1
- package/dist/{chunk-ITK5SV5X.js → chunk-J26GYDJQ.js} +343 -286
- package/dist/chunk-J26GYDJQ.js.map +1 -0
- package/dist/src/index.d.ts +41 -18
- package/dist/src/index.js +2 -2
- package/package.json +13 -13
- package/dist/chunk-ITK5SV5X.js.map +0 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -190,6 +190,8 @@ interface StreamCallbacks {
|
|
|
190
190
|
onResultStart?: () => void;
|
|
191
191
|
/** Called for each result delta */
|
|
192
192
|
onResultDelta?: (delta: string) => void;
|
|
193
|
+
/** Called when result phase completes */
|
|
194
|
+
onResultComplete?: (text: string) => void;
|
|
193
195
|
}
|
|
194
196
|
/** Parameters for streaming text generation */
|
|
195
197
|
interface StreamTextParams {
|
|
@@ -229,6 +231,15 @@ declare const runtimeStateMachine: xstate.StateMachine<{
|
|
|
229
231
|
} & {
|
|
230
232
|
initialCheckpoint: Checkpoint;
|
|
231
233
|
inputMessages: (_perstack_core.InstructionMessage | _perstack_core.UserMessage | _perstack_core.ToolMessage)[];
|
|
234
|
+
}) | (_perstack_core.BaseEvent & {
|
|
235
|
+
type: "resumeFromStop";
|
|
236
|
+
} & {
|
|
237
|
+
checkpoint: Checkpoint;
|
|
238
|
+
}) | (_perstack_core.BaseEvent & {
|
|
239
|
+
type: "proceedToInteractiveTools";
|
|
240
|
+
} & {
|
|
241
|
+
pendingToolCalls: _perstack_core.ToolCall[];
|
|
242
|
+
partialToolResults: _perstack_core.ToolResult[];
|
|
232
243
|
}) | (_perstack_core.BaseEvent & {
|
|
233
244
|
type: "startGeneration";
|
|
234
245
|
} & {
|
|
@@ -248,18 +259,13 @@ declare const runtimeStateMachine: xstate.StateMachine<{
|
|
|
248
259
|
toolCalls: _perstack_core.ToolCall[];
|
|
249
260
|
usage: _perstack_core.Usage;
|
|
250
261
|
}) | (_perstack_core.BaseEvent & {
|
|
251
|
-
type: "
|
|
262
|
+
type: "finishMcpTools";
|
|
252
263
|
} & {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
usage: _perstack_core.Usage;
|
|
256
|
-
}) | (_perstack_core.BaseEvent & {
|
|
257
|
-
type: "callDelegate";
|
|
258
|
-
} & {
|
|
259
|
-
newMessage: _perstack_core.ExpertMessage;
|
|
260
|
-
toolCalls: _perstack_core.ToolCall[];
|
|
261
|
-
usage: _perstack_core.Usage;
|
|
264
|
+
partialToolResults: _perstack_core.ToolResult[];
|
|
265
|
+
pendingToolCalls: _perstack_core.ToolCall[];
|
|
262
266
|
}) | (_perstack_core.BaseEvent & {
|
|
267
|
+
type: "skipDelegates";
|
|
268
|
+
} & object) | (_perstack_core.BaseEvent & {
|
|
263
269
|
type: "resolveToolResults";
|
|
264
270
|
} & {
|
|
265
271
|
toolResults: _perstack_core.ToolResult[];
|
|
@@ -276,10 +282,6 @@ declare const runtimeStateMachine: xstate.StateMachine<{
|
|
|
276
282
|
} & {
|
|
277
283
|
pendingToolCalls: _perstack_core.ToolCall[];
|
|
278
284
|
partialToolResults: _perstack_core.ToolResult[];
|
|
279
|
-
}) | (_perstack_core.BaseEvent & {
|
|
280
|
-
type: "finishAllToolCalls";
|
|
281
|
-
} & {
|
|
282
|
-
newMessages: (_perstack_core.UserMessage | _perstack_core.ToolMessage)[];
|
|
283
285
|
}) | (_perstack_core.BaseEvent & {
|
|
284
286
|
type: "continueToNextStep";
|
|
285
287
|
} & {
|
|
@@ -319,7 +321,27 @@ declare const runtimeStateMachine: xstate.StateMachine<{
|
|
|
319
321
|
step: Step;
|
|
320
322
|
text: string;
|
|
321
323
|
usage: _perstack_core.Usage;
|
|
322
|
-
})
|
|
324
|
+
}) | (_perstack_core.BaseEvent & {
|
|
325
|
+
type: "startStreamingReasoning";
|
|
326
|
+
} & object) | (_perstack_core.BaseEvent & {
|
|
327
|
+
type: "streamReasoning";
|
|
328
|
+
} & {
|
|
329
|
+
delta: string;
|
|
330
|
+
}) | (_perstack_core.BaseEvent & {
|
|
331
|
+
type: "completeStreamingReasoning";
|
|
332
|
+
} & {
|
|
333
|
+
text: string;
|
|
334
|
+
}) | (_perstack_core.BaseEvent & {
|
|
335
|
+
type: "startStreamingRunResult";
|
|
336
|
+
} & object) | (_perstack_core.BaseEvent & {
|
|
337
|
+
type: "streamRunResult";
|
|
338
|
+
} & {
|
|
339
|
+
delta: string;
|
|
340
|
+
}) | (_perstack_core.BaseEvent & {
|
|
341
|
+
type: "completeStreamingRunResult";
|
|
342
|
+
} & {
|
|
343
|
+
text: string;
|
|
344
|
+
}), {}, never, never, never, never, "Init" | "PreparingForStep" | "ResumingFromStop" | "GeneratingToolCall" | "CallingInteractiveTools" | "ResolvingToolResult" | "FinishingStep" | "Stopped" | "CallingMcpTools" | "GeneratingRunResult" | "CallingDelegates", string, {
|
|
323
345
|
setting: RunSetting;
|
|
324
346
|
initialCheckpoint: Checkpoint;
|
|
325
347
|
eventListener: (event: RunEvent | RuntimeEvent) => Promise<void>;
|
|
@@ -330,12 +352,13 @@ declare const runtimeStateMachine: xstate.StateMachine<{
|
|
|
330
352
|
states: {
|
|
331
353
|
readonly Init: {};
|
|
332
354
|
readonly PreparingForStep: {};
|
|
355
|
+
readonly ResumingFromStop: {};
|
|
333
356
|
readonly GeneratingToolCall: {};
|
|
334
|
-
readonly
|
|
357
|
+
readonly CallingMcpTools: {};
|
|
358
|
+
readonly CallingDelegates: {};
|
|
359
|
+
readonly CallingInteractiveTools: {};
|
|
335
360
|
readonly ResolvingToolResult: {};
|
|
336
361
|
readonly GeneratingRunResult: {};
|
|
337
|
-
readonly CallingInteractiveTool: {};
|
|
338
|
-
readonly CallingDelegate: {};
|
|
339
362
|
readonly FinishingStep: {};
|
|
340
363
|
readonly Stopped: {};
|
|
341
364
|
};
|
package/dist/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { package_default, findLockfile, loadLockfile, run } from '../chunk-
|
|
2
|
-
export { findLockfile, getLockfileExpertToolDefinitions, getModel, loadLockfile, run, runtimeStateMachine } from '../chunk-
|
|
1
|
+
import { package_default, findLockfile, loadLockfile, run } from '../chunk-J26GYDJQ.js';
|
|
2
|
+
export { findLockfile, getLockfileExpertToolDefinitions, getModel, loadLockfile, run, runtimeStateMachine } from '../chunk-J26GYDJQ.js';
|
|
3
3
|
export { collectToolDefinitionsForExpert } from '../chunk-RG4QHAGG.js';
|
|
4
4
|
import { registerAdapter, BaseAdapter, getFilteredEnv, checkpointSchema } from '@perstack/core';
|
|
5
5
|
import { spawn } from 'child_process';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perstack/runtime",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.77",
|
|
4
4
|
"description": "Perstack Runtime",
|
|
5
5
|
"author": "Wintermute Technologies, Inc.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"ts-dedent": "^2.2.0",
|
|
36
36
|
"undici": "^7.16.0",
|
|
37
37
|
"xstate": "^5.25.0",
|
|
38
|
-
"@perstack/api-client": "0.0.
|
|
39
|
-
"@perstack/base": "0.0.
|
|
40
|
-
"@perstack/core": "0.0.
|
|
38
|
+
"@perstack/api-client": "0.0.41",
|
|
39
|
+
"@perstack/base": "0.0.41",
|
|
40
|
+
"@perstack/core": "0.0.33"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@tsconfig/node22": "^22.0.5",
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"tsup": "^8.5.1",
|
|
47
47
|
"typescript": "^5.9.3",
|
|
48
48
|
"vitest": "^4.0.16",
|
|
49
|
-
"@perstack/anthropic-provider": "0.0.
|
|
50
|
-
"@perstack/azure-openai-provider": "0.0.
|
|
51
|
-
"@perstack/bedrock-provider": "0.0.
|
|
52
|
-
"@perstack/deepseek-provider": "0.0.
|
|
53
|
-
"@perstack/
|
|
54
|
-
"@perstack/
|
|
55
|
-
"@perstack/openai-provider": "0.0.
|
|
56
|
-
"@perstack/provider-core": "0.0.
|
|
57
|
-
"@perstack/vertex-provider": "0.0.
|
|
49
|
+
"@perstack/anthropic-provider": "0.0.2",
|
|
50
|
+
"@perstack/azure-openai-provider": "0.0.2",
|
|
51
|
+
"@perstack/bedrock-provider": "0.0.2",
|
|
52
|
+
"@perstack/deepseek-provider": "0.0.2",
|
|
53
|
+
"@perstack/google-provider": "0.0.2",
|
|
54
|
+
"@perstack/ollama-provider": "0.0.2",
|
|
55
|
+
"@perstack/openai-provider": "0.0.2",
|
|
56
|
+
"@perstack/provider-core": "0.0.2",
|
|
57
|
+
"@perstack/vertex-provider": "0.0.2"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=22.0.0"
|