sim 2.1.4-dev.64.1 → 2.1.4-dev.67.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.
Files changed (2) hide show
  1. package/dist/index.js +12 -5
  2. package/package.json +6 -5
package/dist/index.js CHANGED
@@ -2316,6 +2316,13 @@ import { dirname } from "node:path";
2316
2316
 
2317
2317
  // src/embed-context.ts
2318
2318
  import { AsyncLocalStorage } from "node:async_hooks";
2319
+ function setSoftExitCode(code) {
2320
+ const ctx = embedStore.getStore();
2321
+ if (ctx)
2322
+ ctx.softExitCode = code;
2323
+ else
2324
+ process.exitCode = code;
2325
+ }
2319
2326
  var embedStore = new AsyncLocalStorage;
2320
2327
  function embeddedProfile() {
2321
2328
  const ctx = embedStore.getStore();
@@ -8328,7 +8335,7 @@ var V2_OPERATIONS = {
8328
8335
  },
8329
8336
  selectedOutputs: {
8330
8337
  kind: "array",
8331
- describe: "Block output references to include in the response, as `blockId`, `blockId.path`, or `BlockName.path` (resolved against the workflow state being run). On a sync request the named outputs come back in `blockOutputs`, keyed by these selector strings; on a stream they shape the streamed envelope. Selectors that resolve to no block or no value are omitted. Rejected when `async` is true — a queued run has produced nothing to select; narrow the finished run via the run resource instead."
8338
+ describe: "Block output references to include in the response. Use `<blockName>.<outputPath>` for the executed workflow or `<childWorkflowId>.<blockName>.<outputPath>` for a child workflow; block names are normalized workflow reference names, and selecting a child workflow applies to every invocation of it. On a sync request the named outputs come back in `blockOutputs`, keyed by these selector strings; on a stream they shape the streamed envelope. Selectors that resolve to no block or no value are omitted. Rejected when `async` is true — a queued run has produced nothing to select; narrow the finished run via the run resource instead."
8332
8339
  },
8333
8340
  includeThinking: {
8334
8341
  kind: "boolean",
@@ -11860,7 +11867,7 @@ function whoamiCommand() {
11860
11867
  });
11861
11868
  const exitCode = WHOAMI_EXIT_CODES[verification.status];
11862
11869
  if (exitCode !== 0)
11863
- process.exitCode = exitCode;
11870
+ setSoftExitCode(exitCode);
11864
11871
  });
11865
11872
  }
11866
11873
  var PROFILE_COLUMNS = [
@@ -13071,7 +13078,7 @@ var CLI_CONTRACT = {
13071
13078
  selectedOutputs: {
13072
13079
  name: "select-output",
13073
13080
  list: true,
13074
- describe: "Return blockName.field values (e.g. agent_1.content) — in blockOutputs on a sync run, or from the streamed result with --follow; missing fields are omitted. Not available with --async"
13081
+ describe: "Return blockName.path values (e.g. agent_1.content), or childWorkflowId.blockName.path for a child workflow (applies to every invocation) — in blockOutputs on a sync run, or from the streamed result with --follow; missing paths are omitted. Not available with --async"
13075
13082
  },
13076
13083
  stream: { omit: true },
13077
13084
  includeThinking: { omit: true },
@@ -16089,7 +16096,7 @@ function attachWorkflowRunWait(runs) {
16089
16096
  const message = explain(outcome, runId, options.workflow, snapshot);
16090
16097
  if (message)
16091
16098
  console.error(source_default.red(message));
16092
- process.exitCode = WAIT_EXIT_CODES[outcome];
16099
+ setSoftExitCode(WAIT_EXIT_CODES[outcome]);
16093
16100
  return;
16094
16101
  }
16095
16102
  const remainingMs = deadline - Date.now();
@@ -16097,7 +16104,7 @@ function attachWorkflowRunWait(runs) {
16097
16104
  progress.finish();
16098
16105
  renderResult("getWorkflowRun", profile.output, raw, runSpec());
16099
16106
  console.error(source_default.red(`Timed out after ${timeoutSeconds}s waiting for run ${runId} (status: ${snapshot.status}${snapshot.resumeAt ? `, resuming at ${snapshot.resumeAt}` : ""}). Raise ${WAIT_TIMEOUT_FLAG}, or set it to 0 to wait indefinitely.`));
16100
- process.exitCode = WAIT_EXIT_CODES.timeout;
16107
+ setSoftExitCode(WAIT_EXIT_CODES.timeout);
16101
16108
  return;
16102
16109
  }
16103
16110
  progress.advance(snapshot.status, Date.now() - startedAt);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim",
3
- "version": "2.1.4-dev.64.1",
3
+ "version": "2.1.4-dev.67.1",
4
4
  "description": "Sim CLI - talk to the Sim API from your terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -46,14 +46,15 @@
46
46
  "engines": {
47
47
  "node": ">=20"
48
48
  },
49
+ "dependencies": {
50
+ "chalk": "5.6.2",
51
+ "commander": "^11.1.0",
52
+ "js-yaml": "4.3.1"
53
+ },
49
54
  "devDependencies": {
50
55
  "@sim/tsconfig": "0.0.0",
51
56
  "@types/js-yaml": "4.0.9",
52
57
  "@types/node": "24.2.1",
53
- "@xterm/headless": "6.0.0",
54
- "chalk": "5.6.2",
55
- "commander": "^11.1.0",
56
- "js-yaml": "4.3.1",
57
58
  "typescript": "^7.0.2",
58
59
  "vitest": "^4.1.0"
59
60
  },