sim 2.2.6 → 2.2.7-preview.194.1
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.
|
@@ -10,20 +10,16 @@ export interface FollowOptions {
|
|
|
10
10
|
}
|
|
11
11
|
type WorkflowRunSelection = {
|
|
12
12
|
source: 'manual';
|
|
13
|
-
|
|
14
|
-
source: 'manual';
|
|
15
|
-
entry: {
|
|
13
|
+
entry?: {
|
|
16
14
|
type: 'trigger';
|
|
17
15
|
blockId?: string;
|
|
18
16
|
useMockPayload?: boolean;
|
|
19
|
-
}
|
|
20
|
-
} | {
|
|
21
|
-
source: 'manual';
|
|
22
|
-
entry: {
|
|
17
|
+
} | {
|
|
23
18
|
type: 'block';
|
|
24
19
|
blockId: string;
|
|
25
20
|
sourceRunId: string;
|
|
26
21
|
};
|
|
22
|
+
stopAfterBlockId?: string;
|
|
27
23
|
};
|
|
28
24
|
/** Projects friendly CLI flags into the API's strict nested run selector. */
|
|
29
25
|
export declare function resolveWorkflowRunSelection(flags: Record<string, unknown>): WorkflowRunSelection | undefined;
|
package/dist/index.js
CHANGED
|
@@ -22265,7 +22265,8 @@ var DONE_SENTINEL = "[DONE]";
|
|
|
22265
22265
|
function resolveWorkflowRunSelection(flags) {
|
|
22266
22266
|
const trigger = typeof flags.trigger === "string" ? flags.trigger : undefined;
|
|
22267
22267
|
const useMockPayload = flags.mockPayload === true;
|
|
22268
|
-
const
|
|
22268
|
+
const stopAfter = typeof flags.stopAfter === "string" ? flags.stopAfter : undefined;
|
|
22269
|
+
const manual = flags.manual === true || trigger !== undefined || useMockPayload || stopAfter !== undefined;
|
|
22269
22270
|
const fromBlock = typeof flags.fromBlock === "string" ? flags.fromBlock : undefined;
|
|
22270
22271
|
const sourceRun = typeof flags.sourceRun === "string" ? flags.sourceRun : undefined;
|
|
22271
22272
|
if (fromBlock && (trigger || useMockPayload)) {
|
|
@@ -22283,23 +22284,29 @@ function resolveWorkflowRunSelection(flags) {
|
|
|
22283
22284
|
if (useMockPayload && flags.input !== undefined) {
|
|
22284
22285
|
throw new SimApiError("--mock-payload cannot be combined with --input", 0);
|
|
22285
22286
|
}
|
|
22287
|
+
if (stopAfter !== undefined && stopAfter.trim() === "") {
|
|
22288
|
+
throw new SimApiError("--stop-after requires a block ID", 0);
|
|
22289
|
+
}
|
|
22290
|
+
const stop = stopAfter !== undefined ? { stopAfterBlockId: stopAfter } : {};
|
|
22286
22291
|
if (fromBlock && sourceRun) {
|
|
22287
22292
|
return {
|
|
22288
22293
|
source: "manual",
|
|
22289
|
-
entry: { type: "block", blockId: fromBlock, sourceRunId: sourceRun }
|
|
22294
|
+
entry: { type: "block", blockId: fromBlock, sourceRunId: sourceRun },
|
|
22295
|
+
...stop
|
|
22290
22296
|
};
|
|
22291
22297
|
}
|
|
22292
22298
|
if (!manual)
|
|
22293
22299
|
return;
|
|
22294
22300
|
if (!trigger && !useMockPayload)
|
|
22295
|
-
return { source: "manual" };
|
|
22301
|
+
return { source: "manual", ...stop };
|
|
22296
22302
|
return {
|
|
22297
22303
|
source: "manual",
|
|
22298
22304
|
entry: {
|
|
22299
22305
|
type: "trigger",
|
|
22300
22306
|
...trigger ? { blockId: trigger } : {},
|
|
22301
22307
|
...useMockPayload ? { useMockPayload: true } : {}
|
|
22302
|
-
}
|
|
22308
|
+
},
|
|
22309
|
+
...stop
|
|
22303
22310
|
};
|
|
22304
22311
|
}
|
|
22305
22312
|
function stringField(frame, key) {
|
|
@@ -22551,7 +22558,7 @@ function attachWorkflowRunFollow(workflows) {
|
|
|
22551
22558
|
}
|
|
22552
22559
|
const held = run._actionHandler;
|
|
22553
22560
|
const previous = typeof held === "function" ? held : null;
|
|
22554
|
-
run.option("--manual", "Run the current saved workflow state instead of the active deployment").option("--trigger <blockId>", "Enter the run through this runnable trigger; runs the current saved workflow state (implies --manual)").option("--mock-payload", "Use the selected trigger's server-derived mock payload; runs the current saved workflow state (implies --manual)").option("--from-block <blockId>", "Run manually from this saved workflow block").option("--source-run <runId>", "Prior run whose persisted state supplies upstream outputs (requires --from-block)").option("--follow", "Stream the run as it happens; progress on stderr, result on stdout. The stream reports only success and output, so the result omits the run id and timings a non-streaming run returns").option("--include-thinking", "Show model reasoning while following (requires --follow)").option("--include-tool-calls", "Show tool calls while following (requires --follow)").action(followOrDelegate(previous));
|
|
22561
|
+
run.option("--manual", "Run the current saved workflow state instead of the active deployment").option("--trigger <blockId>", "Enter the run through this runnable trigger; runs the current saved workflow state (implies --manual)").option("--mock-payload", "Use the selected trigger's server-derived mock payload; runs the current saved workflow state (implies --manual)").option("--from-block <blockId>", "Run manually from this saved workflow block").option("--source-run <runId>", "Prior run whose persisted state supplies upstream outputs (requires --from-block)").option("--stop-after <blockId>", "Stop the run after this saved block; with --from-block on the same block, re-runs only that block (implies --manual)").option("--follow", "Stream the run as it happens; progress on stderr, result on stdout. The stream reports only success and output, so the result omits the run id and timings a non-streaming run returns").option("--include-thinking", "Show model reasoning while following (requires --follow)").option("--include-tool-calls", "Show tool calls while following (requires --follow)").action(followOrDelegate(previous));
|
|
22555
22562
|
}
|
|
22556
22563
|
|
|
22557
22564
|
// src/commands/protocol/workflow-run-get.ts
|
package/dist/runtime.js
CHANGED
|
@@ -22314,7 +22314,8 @@ var DONE_SENTINEL = "[DONE]";
|
|
|
22314
22314
|
function resolveWorkflowRunSelection(flags) {
|
|
22315
22315
|
const trigger = typeof flags.trigger === "string" ? flags.trigger : undefined;
|
|
22316
22316
|
const useMockPayload = flags.mockPayload === true;
|
|
22317
|
-
const
|
|
22317
|
+
const stopAfter = typeof flags.stopAfter === "string" ? flags.stopAfter : undefined;
|
|
22318
|
+
const manual = flags.manual === true || trigger !== undefined || useMockPayload || stopAfter !== undefined;
|
|
22318
22319
|
const fromBlock = typeof flags.fromBlock === "string" ? flags.fromBlock : undefined;
|
|
22319
22320
|
const sourceRun = typeof flags.sourceRun === "string" ? flags.sourceRun : undefined;
|
|
22320
22321
|
if (fromBlock && (trigger || useMockPayload)) {
|
|
@@ -22332,23 +22333,29 @@ function resolveWorkflowRunSelection(flags) {
|
|
|
22332
22333
|
if (useMockPayload && flags.input !== undefined) {
|
|
22333
22334
|
throw new SimApiError("--mock-payload cannot be combined with --input", 0);
|
|
22334
22335
|
}
|
|
22336
|
+
if (stopAfter !== undefined && stopAfter.trim() === "") {
|
|
22337
|
+
throw new SimApiError("--stop-after requires a block ID", 0);
|
|
22338
|
+
}
|
|
22339
|
+
const stop = stopAfter !== undefined ? { stopAfterBlockId: stopAfter } : {};
|
|
22335
22340
|
if (fromBlock && sourceRun) {
|
|
22336
22341
|
return {
|
|
22337
22342
|
source: "manual",
|
|
22338
|
-
entry: { type: "block", blockId: fromBlock, sourceRunId: sourceRun }
|
|
22343
|
+
entry: { type: "block", blockId: fromBlock, sourceRunId: sourceRun },
|
|
22344
|
+
...stop
|
|
22339
22345
|
};
|
|
22340
22346
|
}
|
|
22341
22347
|
if (!manual)
|
|
22342
22348
|
return;
|
|
22343
22349
|
if (!trigger && !useMockPayload)
|
|
22344
|
-
return { source: "manual" };
|
|
22350
|
+
return { source: "manual", ...stop };
|
|
22345
22351
|
return {
|
|
22346
22352
|
source: "manual",
|
|
22347
22353
|
entry: {
|
|
22348
22354
|
type: "trigger",
|
|
22349
22355
|
...trigger ? { blockId: trigger } : {},
|
|
22350
22356
|
...useMockPayload ? { useMockPayload: true } : {}
|
|
22351
|
-
}
|
|
22357
|
+
},
|
|
22358
|
+
...stop
|
|
22352
22359
|
};
|
|
22353
22360
|
}
|
|
22354
22361
|
function stringField(frame, key) {
|
|
@@ -22600,7 +22607,7 @@ function attachWorkflowRunFollow(workflows) {
|
|
|
22600
22607
|
}
|
|
22601
22608
|
const held = run._actionHandler;
|
|
22602
22609
|
const previous = typeof held === "function" ? held : null;
|
|
22603
|
-
run.option("--manual", "Run the current saved workflow state instead of the active deployment").option("--trigger <blockId>", "Enter the run through this runnable trigger; runs the current saved workflow state (implies --manual)").option("--mock-payload", "Use the selected trigger's server-derived mock payload; runs the current saved workflow state (implies --manual)").option("--from-block <blockId>", "Run manually from this saved workflow block").option("--source-run <runId>", "Prior run whose persisted state supplies upstream outputs (requires --from-block)").option("--follow", "Stream the run as it happens; progress on stderr, result on stdout. The stream reports only success and output, so the result omits the run id and timings a non-streaming run returns").option("--include-thinking", "Show model reasoning while following (requires --follow)").option("--include-tool-calls", "Show tool calls while following (requires --follow)").action(followOrDelegate(previous));
|
|
22610
|
+
run.option("--manual", "Run the current saved workflow state instead of the active deployment").option("--trigger <blockId>", "Enter the run through this runnable trigger; runs the current saved workflow state (implies --manual)").option("--mock-payload", "Use the selected trigger's server-derived mock payload; runs the current saved workflow state (implies --manual)").option("--from-block <blockId>", "Run manually from this saved workflow block").option("--source-run <runId>", "Prior run whose persisted state supplies upstream outputs (requires --from-block)").option("--stop-after <blockId>", "Stop the run after this saved block; with --from-block on the same block, re-runs only that block (implies --manual)").option("--follow", "Stream the run as it happens; progress on stderr, result on stdout. The stream reports only success and output, so the result omits the run id and timings a non-streaming run returns").option("--include-thinking", "Show model reasoning while following (requires --follow)").option("--include-tool-calls", "Show tool calls while following (requires --follow)").action(followOrDelegate(previous));
|
|
22604
22611
|
}
|
|
22605
22612
|
|
|
22606
22613
|
// src/commands/protocol/workflow-run-get.ts
|