sim 2.2.25-preview.287.1 → 2.2.25-preview.289.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.
@@ -12,6 +12,8 @@ export interface AuthRequest {
12
12
  export interface MintedKey {
13
13
  id: string;
14
14
  apiKey: string;
15
+ /** The name the key is listed under, or null from a server that predates it. */
16
+ name: string | null;
15
17
  scope: CliAuthScope;
16
18
  /** The workspace picked in the browser — the profile's default target. */
17
19
  workspaceId: string | null;
@@ -4191,6 +4191,7 @@ export type GetBlockQuery = {
4191
4191
  type GetBlockResponseRef0 = {
4192
4192
  id: string;
4193
4193
  type: string;
4194
+ valueType?: 'string' | 'number' | 'boolean' | 'json' | 'array' | 'file';
4194
4195
  title?: string;
4195
4196
  required?: boolean;
4196
4197
  requiredWhen?: GetBlockResponseRef1;
@@ -5793,6 +5794,33 @@ type GetWorkflowMcpServerResponseRef0 = {
5793
5794
  export type GetWorkflowMcpServerResponse = {
5794
5795
  data: GetWorkflowMcpServerResponseRef0;
5795
5796
  };
5797
+ /** `GET /api/v2/workflows/[workflowId]/outline` */
5798
+ export type GetWorkflowOutlineParams = {
5799
+ workflowId: string;
5800
+ };
5801
+ export type GetWorkflowOutlineQuery = Record<string, unknown>;
5802
+ type GetWorkflowOutlineResponseRef0 = {
5803
+ type: string;
5804
+ name: string;
5805
+ enabled: boolean;
5806
+ inputs?: Record<string, unknown>;
5807
+ connections?: Record<string, string | Array<string>>;
5808
+ nestedNodes?: Record<string, unknown>;
5809
+ advancedMode?: boolean;
5810
+ errorEnabled?: boolean;
5811
+ retry?: {
5812
+ enabled: boolean;
5813
+ maxTries: number;
5814
+ waitBetweenTriesMs: number;
5815
+ };
5816
+ triggerMode?: boolean;
5817
+ };
5818
+ type GetWorkflowOutlineResponseRef1 = {
5819
+ blocks: Record<string, GetWorkflowOutlineResponseRef0>;
5820
+ };
5821
+ export type GetWorkflowOutlineResponse = {
5822
+ data: GetWorkflowOutlineResponseRef1;
5823
+ };
5796
5824
  /** `GET /api/v2/workflows/[workflowId]/runs/[runId]` */
5797
5825
  export type GetWorkflowRunParams = {
5798
5826
  workflowId: string;
@@ -8299,6 +8327,31 @@ export type ListWorkspacesResponse = {
8299
8327
  data: Array<ListWorkspacesResponseRef0>;
8300
8328
  nextCursor: string | null;
8301
8329
  };
8330
+ /** `GET /api/v2/schedules` */
8331
+ export type ListWorkspaceSchedulesQuery = {
8332
+ workspaceId: string;
8333
+ limit?: number;
8334
+ cursor?: string;
8335
+ sortBy?: 'createdAt';
8336
+ sortOrder?: 'asc' | 'desc';
8337
+ };
8338
+ type ListWorkspaceSchedulesResponseRef0 = {
8339
+ blockId: string;
8340
+ enabled: boolean;
8341
+ status: 'active' | 'disabled' | 'completed';
8342
+ failedCount: number;
8343
+ lastFailedAt: string | null;
8344
+ nextRunAt: string | null;
8345
+ lastRanAt: string | null;
8346
+ cronExpression: string | null;
8347
+ workflowId: string;
8348
+ workflowName: string;
8349
+ timezone: string;
8350
+ };
8351
+ export type ListWorkspaceSchedulesResponse = {
8352
+ data: Array<ListWorkspaceSchedulesResponseRef0>;
8353
+ nextCursor: string | null;
8354
+ };
8302
8355
  /** `POST /api/v2/files/move` */
8303
8356
  export type MoveFileItemsQuery = Record<string, unknown>;
8304
8357
  type MoveFileItemsBodyRef0 = string;
@@ -15862,6 +15915,16 @@ export declare const V2_OPERATIONS: {
15862
15915
  readonly summary: 'Get workflow MCP server';
15863
15916
  readonly workspaceKeyUnsupported: true;
15864
15917
  };
15918
+ readonly getWorkflowOutline: {
15919
+ readonly method: 'GET';
15920
+ readonly path: '/api/v2/workflows/[workflowId]/outline';
15921
+ readonly pathParams: readonly ['workflowId'];
15922
+ readonly pathParamDocs: {
15923
+ readonly workflowId: 'Unique workflow identifier.';
15924
+ };
15925
+ readonly responseMode: 'json';
15926
+ readonly summary: 'Get workflow outline';
15927
+ };
15865
15928
  readonly getWorkflowRun: {
15866
15929
  readonly method: 'GET';
15867
15930
  readonly path: '/api/v2/workflows/[workflowId]/runs/[runId]';
@@ -18457,6 +18520,41 @@ export declare const V2_OPERATIONS: {
18457
18520
  };
18458
18521
  };
18459
18522
  };
18523
+ readonly listWorkspaceSchedules: {
18524
+ readonly method: 'GET';
18525
+ readonly path: '/api/v2/schedules';
18526
+ readonly pathParams: readonly [];
18527
+ readonly responseMode: 'json';
18528
+ readonly summary: 'List workspace schedules';
18529
+ readonly query: {
18530
+ readonly workspaceId: {
18531
+ readonly kind: 'string';
18532
+ readonly required: true;
18533
+ readonly describe: 'Workspace whose schedules should be listed.';
18534
+ };
18535
+ readonly limit: {
18536
+ readonly kind: 'integer';
18537
+ readonly default: 50;
18538
+ readonly describe: 'Maximum schedules to return per page. Must be a whole number from 1 to 100. Defaults to 50.';
18539
+ };
18540
+ readonly cursor: {
18541
+ readonly kind: 'string';
18542
+ readonly describe: 'Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.';
18543
+ };
18544
+ readonly sortBy: {
18545
+ readonly kind: 'enum';
18546
+ readonly values: readonly ['createdAt'];
18547
+ readonly default: 'createdAt';
18548
+ readonly describe: "Field used to sort the result. `createdAt` is when the schedule was created for the deployment version that runs it: each deploy creates new schedule rows, so a redeployed workflow's schedules move to the newest end.";
18549
+ };
18550
+ readonly sortOrder: {
18551
+ readonly kind: 'enum';
18552
+ readonly values: readonly ['asc', 'desc'];
18553
+ readonly default: 'desc';
18554
+ readonly describe: 'Sort direction.';
18555
+ };
18556
+ };
18557
+ };
18460
18558
  readonly moveFileItems: {
18461
18559
  readonly method: 'POST';
18462
18560
  readonly path: '/api/v2/files/move';
package/dist/index.js CHANGED
@@ -9485,6 +9485,7 @@ async function pollForKey(endpoint, auth, signal) {
9485
9485
  return {
9486
9486
  id: body.key.id,
9487
9487
  apiKey: body.key.apiKey,
9488
+ name: typeof body.key.name === "string" ? body.key.name : null,
9488
9489
  scope: body.scope ?? "copilot",
9489
9490
  workspaceId: body.workspaceId ?? null,
9490
9491
  workspaceBound: body.workspaceBound === true,
@@ -13060,6 +13061,14 @@ var V2_OPERATIONS = {
13060
13061
  summary: "Get workflow MCP server",
13061
13062
  workspaceKeyUnsupported: true
13062
13063
  },
13064
+ getWorkflowOutline: {
13065
+ method: "GET",
13066
+ path: "/api/v2/workflows/[workflowId]/outline",
13067
+ pathParams: ["workflowId"],
13068
+ pathParamDocs: { workflowId: "Unique workflow identifier." },
13069
+ responseMode: "json",
13070
+ summary: "Get workflow outline"
13071
+ },
13063
13072
  getWorkflowRun: {
13064
13073
  method: "GET",
13065
13074
  path: "/api/v2/workflows/[workflowId]/runs/[runId]",
@@ -15716,6 +15725,41 @@ var V2_OPERATIONS = {
15716
15725
  }
15717
15726
  }
15718
15727
  },
15728
+ listWorkspaceSchedules: {
15729
+ method: "GET",
15730
+ path: "/api/v2/schedules",
15731
+ pathParams: [],
15732
+ responseMode: "json",
15733
+ summary: "List workspace schedules",
15734
+ query: {
15735
+ workspaceId: {
15736
+ kind: "string",
15737
+ required: true,
15738
+ describe: "Workspace whose schedules should be listed."
15739
+ },
15740
+ limit: {
15741
+ kind: "integer",
15742
+ default: 50,
15743
+ describe: "Maximum schedules to return per page. Must be a whole number from 1 to 100. Defaults to 50."
15744
+ },
15745
+ cursor: {
15746
+ kind: "string",
15747
+ describe: "Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor."
15748
+ },
15749
+ sortBy: {
15750
+ kind: "enum",
15751
+ values: ["createdAt"],
15752
+ default: "createdAt",
15753
+ describe: "Field used to sort the result. `createdAt` is when the schedule was created for the deployment version that runs it: each deploy creates new schedule rows, so a redeployed workflow's schedules move to the newest end."
15754
+ },
15755
+ sortOrder: {
15756
+ kind: "enum",
15757
+ values: ["asc", "desc"],
15758
+ default: "desc",
15759
+ describe: "Sort direction."
15760
+ }
15761
+ }
15762
+ },
15719
15763
  moveFileItems: {
15720
15764
  method: "POST",
15721
15765
  path: "/api/v2/files/move",
@@ -18581,6 +18625,8 @@ async function chooseLoginFlow(profile, options) {
18581
18625
  if (status === "unreachable") {
18582
18626
  throw new SimApiError(`Could not reach ${profile.endpoint}. Check the endpoint.`, 0);
18583
18627
  }
18628
+ if (options.method === undefined && options.expiresIn !== undefined)
18629
+ return "handoff";
18584
18630
  if (status === "unavailable") {
18585
18631
  if (options.method === "oauth") {
18586
18632
  throw new SimApiError(`${profile.endpoint} does not offer OAuth sign-in. Enable OAuth on the server or explicitly choose sim login --method api-key.`, 0);
@@ -18663,7 +18709,7 @@ Waiting for you to approve in the browser…`));
18663
18709
  }
18664
18710
  }
18665
18711
  function loginCommand() {
18666
- return new Command("login").description("Log in through the browser and store the login for the profile").addOption(new Option("--method <method>", "Credential to obtain: oauth requires OAuth support; api-key creates an API key through pairing (auto-selects when omitted)").choices(["oauth", "api-key"])).option("--no-browser", "Print the approval URL without opening it (either login method)").option("--read-only", "Ask only for permission to read, never to change anything").option("--expires-in <days>", `API-key login only: days until the key expires (${MIN_KEY_EXPIRY_DAYS}-${MAX_KEY_EXPIRY_DAYS}); omit for a key that never expires`).option("--callback-port <port>", "Pin the local port the browser returns to").option("-y, --yes", "Overwrite an existing API-key profile without prompting").action(async (options, command) => {
18712
+ return new Command("login").description("Log in through the browser and store the login for the profile").addOption(new Option("--method <method>", "Credential to obtain: oauth requires OAuth support; api-key creates an API key through pairing (auto-selects when omitted)").choices(["oauth", "api-key"])).option("--no-browser", "Print the approval URL without opening it (either login method)").option("--read-only", "Ask only for permission to read, never to change anything").option("--expires-in <days>", `Log in with an API key that expires after this many days (${MIN_KEY_EXPIRY_DAYS}-${MAX_KEY_EXPIRY_DAYS}); without it an API key never expires`).option("--callback-port <port>", "Pin the local port the browser returns to").option("-y, --yes", "Overwrite an existing API-key profile without prompting").action(async (options, command) => {
18667
18713
  const profile = profileFrom(command, { allowUnknownProfile: true });
18668
18714
  const authProfile = resolveAuthenticationProfileName(profile.name);
18669
18715
  if (authProfile !== profile.name) {
@@ -18703,7 +18749,7 @@ function loginCommand() {
18703
18749
  var DAY_MS = 24 * 60 * 60 * 1000;
18704
18750
  var EXPIRY_TOLERANCE_MS = 60 * 60 * 1000;
18705
18751
  function requireRequestedKey(key, keyRequest) {
18706
- const refuse = (issued, flag) => new SimApiError(`The server issued ${issued}, not the key requested. Nothing was stored; update the Sim deployment or adjust ${flag}.`, 0);
18752
+ const refuse = (issued, flag) => new SimApiError(`The server issued ${issued}, not the key requested, so the CLI did not store it. Revoke that key as described above, then update the Sim deployment or adjust ${flag}.`, 0);
18707
18753
  const requestedAccess = keyRequest.readOnly ? "read" : "write";
18708
18754
  const issuedAccess = key.access ?? "write";
18709
18755
  if (issuedAccess !== requestedAccess) {
@@ -18770,7 +18816,8 @@ Waiting for approval…`));
18770
18816
  });
18771
18817
  } catch (error) {
18772
18818
  const keyId = typeof key.id === "string" && key.id ? safeOneLine(key.id) : "unknown";
18773
- printLine(styles3().yellow(`API key ${keyId} was created but could not be stored safely. Revoke it in Settings → API keys.`));
18819
+ const listedAs = key.name ? `"${safeOneLine(key.name)}"` : `the newest key named "CLI (…Z)", created at about ${new Date().toISOString().slice(0, 19).replace("T", " ")}Z,`;
18820
+ printLine(styles3().yellow(`API key ${keyId} was created on your account but could not be stored safely. Revoke ${listedAs} in Settings → API keys.`));
18774
18821
  throw error;
18775
18822
  }
18776
18823
  printLine(styles3().green(`
@@ -19447,6 +19494,18 @@ var CLI_CONTRACT = {
19447
19494
  updateWorkflowTrigger: {
19448
19495
  describe: "Enable or disable one trigger of the live deployment"
19449
19496
  },
19497
+ listWorkspaceSchedules: {
19498
+ describe: "Show the timing and health of every schedule the workspace’s deployments run",
19499
+ columns: [
19500
+ { header: "workflow", path: "workflowName" },
19501
+ { header: "block", path: "blockId" },
19502
+ { header: "cron", path: "cronExpression" },
19503
+ { header: "timezone" },
19504
+ { header: "status" },
19505
+ { header: "failures", path: "failedCount" },
19506
+ { header: "next run", path: "nextRunAt", format: "timestamp" }
19507
+ ]
19508
+ },
19450
19509
  setSecret: { hidden: true },
19451
19510
  deleteTable: {
19452
19511
  confirm: "This archives the table and all of its rows; restore with `tables restore`."
@@ -19631,6 +19690,10 @@ var CLI_CONTRACT = {
19631
19690
  flags: { folderPath: FOLDER_PATH_FLAG }
19632
19691
  },
19633
19692
  getWorkflowState: { command: "workflows state get" },
19693
+ getWorkflowOutline: {
19694
+ command: "workflows outline",
19695
+ describe: "Show a workflow’s draft as a compact read-only outline"
19696
+ },
19634
19697
  replaceWorkflowState: {
19635
19698
  command: "workflows state replace",
19636
19699
  confirm: "This replaces the entire draft graph and cannot be undone."
@@ -22605,6 +22668,15 @@ function retypeMessage(message, spellings) {
22605
22668
  }
22606
22669
  return retyped;
22607
22670
  }
22671
+ var LOCATION_PREFIX = /^(?:path|query|header|body)\.([^:\s]+): /;
22672
+ function retypeLocatedMessage(message, spellings) {
22673
+ const match = LOCATION_PREFIX.exec(message);
22674
+ if (!match)
22675
+ return retypeMessage(message, spellings);
22676
+ const [head, ...rest] = match[1].split(".");
22677
+ const location = [spellings.get(head) ?? head, ...rest].join(".");
22678
+ return `${location}: ${retypeMessage(message.slice(match[0].length), spellings)}`;
22679
+ }
22608
22680
  function retypeDetails(details, spellings) {
22609
22681
  if (Array.isArray(details))
22610
22682
  return details.map((issue) => retypeDetails(issue, spellings));
@@ -22632,7 +22704,7 @@ function retypeApiError(error, operation, commandSpec, operationSpec) {
22632
22704
  const spellings = typeableFields(operation, commandSpec, operationSpec);
22633
22705
  if (spellings.size === 0)
22634
22706
  return error;
22635
- return new SimApiError(retypeMessage(error.message, spellings), error.status, error.code, error.details === undefined ? undefined : retypeDetails(error.details, spellings));
22707
+ return new SimApiError(retypeLocatedMessage(error.message, spellings), error.status, error.code, error.details === undefined ? undefined : retypeDetails(error.details, spellings));
22636
22708
  }
22637
22709
 
22638
22710
  // src/runtime/build.ts
@@ -22646,6 +22718,7 @@ var GROUP_ALIASES = {
22646
22718
  logs: "log",
22647
22719
  "mcp-servers": "mcp-server",
22648
22720
  sandboxes: "sandbox",
22721
+ schedules: "schedule",
22649
22722
  secrets: "secret",
22650
22723
  skills: "skill",
22651
22724
  tables: "table",
package/dist/runtime.js CHANGED
@@ -9194,6 +9194,7 @@ async function pollForKey(endpoint, auth, signal) {
9194
9194
  return {
9195
9195
  id: body.key.id,
9196
9196
  apiKey: body.key.apiKey,
9197
+ name: typeof body.key.name === "string" ? body.key.name : null,
9197
9198
  scope: body.scope ?? "copilot",
9198
9199
  workspaceId: body.workspaceId ?? null,
9199
9200
  workspaceBound: body.workspaceBound === true,
@@ -13109,6 +13110,14 @@ var V2_OPERATIONS = {
13109
13110
  summary: "Get workflow MCP server",
13110
13111
  workspaceKeyUnsupported: true
13111
13112
  },
13113
+ getWorkflowOutline: {
13114
+ method: "GET",
13115
+ path: "/api/v2/workflows/[workflowId]/outline",
13116
+ pathParams: ["workflowId"],
13117
+ pathParamDocs: { workflowId: "Unique workflow identifier." },
13118
+ responseMode: "json",
13119
+ summary: "Get workflow outline"
13120
+ },
13112
13121
  getWorkflowRun: {
13113
13122
  method: "GET",
13114
13123
  path: "/api/v2/workflows/[workflowId]/runs/[runId]",
@@ -15765,6 +15774,41 @@ var V2_OPERATIONS = {
15765
15774
  }
15766
15775
  }
15767
15776
  },
15777
+ listWorkspaceSchedules: {
15778
+ method: "GET",
15779
+ path: "/api/v2/schedules",
15780
+ pathParams: [],
15781
+ responseMode: "json",
15782
+ summary: "List workspace schedules",
15783
+ query: {
15784
+ workspaceId: {
15785
+ kind: "string",
15786
+ required: true,
15787
+ describe: "Workspace whose schedules should be listed."
15788
+ },
15789
+ limit: {
15790
+ kind: "integer",
15791
+ default: 50,
15792
+ describe: "Maximum schedules to return per page. Must be a whole number from 1 to 100. Defaults to 50."
15793
+ },
15794
+ cursor: {
15795
+ kind: "string",
15796
+ describe: "Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor."
15797
+ },
15798
+ sortBy: {
15799
+ kind: "enum",
15800
+ values: ["createdAt"],
15801
+ default: "createdAt",
15802
+ describe: "Field used to sort the result. `createdAt` is when the schedule was created for the deployment version that runs it: each deploy creates new schedule rows, so a redeployed workflow's schedules move to the newest end."
15803
+ },
15804
+ sortOrder: {
15805
+ kind: "enum",
15806
+ values: ["asc", "desc"],
15807
+ default: "desc",
15808
+ describe: "Sort direction."
15809
+ }
15810
+ }
15811
+ },
15768
15812
  moveFileItems: {
15769
15813
  method: "POST",
15770
15814
  path: "/api/v2/files/move",
@@ -18630,6 +18674,8 @@ async function chooseLoginFlow(profile, options) {
18630
18674
  if (status === "unreachable") {
18631
18675
  throw new SimApiError(`Could not reach ${profile.endpoint}. Check the endpoint.`, 0);
18632
18676
  }
18677
+ if (options.method === undefined && options.expiresIn !== undefined)
18678
+ return "handoff";
18633
18679
  if (status === "unavailable") {
18634
18680
  if (options.method === "oauth") {
18635
18681
  throw new SimApiError(`${profile.endpoint} does not offer OAuth sign-in. Enable OAuth on the server or explicitly choose sim login --method api-key.`, 0);
@@ -18712,7 +18758,7 @@ Waiting for you to approve in the browser…`));
18712
18758
  }
18713
18759
  }
18714
18760
  function loginCommand() {
18715
- return new Command("login").description("Log in through the browser and store the login for the profile").addOption(new Option("--method <method>", "Credential to obtain: oauth requires OAuth support; api-key creates an API key through pairing (auto-selects when omitted)").choices(["oauth", "api-key"])).option("--no-browser", "Print the approval URL without opening it (either login method)").option("--read-only", "Ask only for permission to read, never to change anything").option("--expires-in <days>", `API-key login only: days until the key expires (${MIN_KEY_EXPIRY_DAYS}-${MAX_KEY_EXPIRY_DAYS}); omit for a key that never expires`).option("--callback-port <port>", "Pin the local port the browser returns to").option("-y, --yes", "Overwrite an existing API-key profile without prompting").action(async (options, command) => {
18761
+ return new Command("login").description("Log in through the browser and store the login for the profile").addOption(new Option("--method <method>", "Credential to obtain: oauth requires OAuth support; api-key creates an API key through pairing (auto-selects when omitted)").choices(["oauth", "api-key"])).option("--no-browser", "Print the approval URL without opening it (either login method)").option("--read-only", "Ask only for permission to read, never to change anything").option("--expires-in <days>", `Log in with an API key that expires after this many days (${MIN_KEY_EXPIRY_DAYS}-${MAX_KEY_EXPIRY_DAYS}); without it an API key never expires`).option("--callback-port <port>", "Pin the local port the browser returns to").option("-y, --yes", "Overwrite an existing API-key profile without prompting").action(async (options, command) => {
18716
18762
  const profile = profileFrom(command, { allowUnknownProfile: true });
18717
18763
  const authProfile = resolveAuthenticationProfileName(profile.name);
18718
18764
  if (authProfile !== profile.name) {
@@ -18752,7 +18798,7 @@ function loginCommand() {
18752
18798
  var DAY_MS = 24 * 60 * 60 * 1000;
18753
18799
  var EXPIRY_TOLERANCE_MS = 60 * 60 * 1000;
18754
18800
  function requireRequestedKey(key, keyRequest) {
18755
- const refuse = (issued, flag) => new SimApiError(`The server issued ${issued}, not the key requested. Nothing was stored; update the Sim deployment or adjust ${flag}.`, 0);
18801
+ const refuse = (issued, flag) => new SimApiError(`The server issued ${issued}, not the key requested, so the CLI did not store it. Revoke that key as described above, then update the Sim deployment or adjust ${flag}.`, 0);
18756
18802
  const requestedAccess = keyRequest.readOnly ? "read" : "write";
18757
18803
  const issuedAccess = key.access ?? "write";
18758
18804
  if (issuedAccess !== requestedAccess) {
@@ -18819,7 +18865,8 @@ Waiting for approval…`));
18819
18865
  });
18820
18866
  } catch (error) {
18821
18867
  const keyId = typeof key.id === "string" && key.id ? safeOneLine(key.id) : "unknown";
18822
- printLine(styles3().yellow(`API key ${keyId} was created but could not be stored safely. Revoke it in Settings → API keys.`));
18868
+ const listedAs = key.name ? `"${safeOneLine(key.name)}"` : `the newest key named "CLI (…Z)", created at about ${new Date().toISOString().slice(0, 19).replace("T", " ")}Z,`;
18869
+ printLine(styles3().yellow(`API key ${keyId} was created on your account but could not be stored safely. Revoke ${listedAs} in Settings → API keys.`));
18823
18870
  throw error;
18824
18871
  }
18825
18872
  printLine(styles3().green(`
@@ -19496,6 +19543,18 @@ var CLI_CONTRACT = {
19496
19543
  updateWorkflowTrigger: {
19497
19544
  describe: "Enable or disable one trigger of the live deployment"
19498
19545
  },
19546
+ listWorkspaceSchedules: {
19547
+ describe: "Show the timing and health of every schedule the workspace’s deployments run",
19548
+ columns: [
19549
+ { header: "workflow", path: "workflowName" },
19550
+ { header: "block", path: "blockId" },
19551
+ { header: "cron", path: "cronExpression" },
19552
+ { header: "timezone" },
19553
+ { header: "status" },
19554
+ { header: "failures", path: "failedCount" },
19555
+ { header: "next run", path: "nextRunAt", format: "timestamp" }
19556
+ ]
19557
+ },
19499
19558
  setSecret: { hidden: true },
19500
19559
  deleteTable: {
19501
19560
  confirm: "This archives the table and all of its rows; restore with `tables restore`."
@@ -19680,6 +19739,10 @@ var CLI_CONTRACT = {
19680
19739
  flags: { folderPath: FOLDER_PATH_FLAG }
19681
19740
  },
19682
19741
  getWorkflowState: { command: "workflows state get" },
19742
+ getWorkflowOutline: {
19743
+ command: "workflows outline",
19744
+ describe: "Show a workflow’s draft as a compact read-only outline"
19745
+ },
19683
19746
  replaceWorkflowState: {
19684
19747
  command: "workflows state replace",
19685
19748
  confirm: "This replaces the entire draft graph and cannot be undone."
@@ -22654,6 +22717,15 @@ function retypeMessage(message, spellings) {
22654
22717
  }
22655
22718
  return retyped;
22656
22719
  }
22720
+ var LOCATION_PREFIX = /^(?:path|query|header|body)\.([^:\s]+): /;
22721
+ function retypeLocatedMessage(message, spellings) {
22722
+ const match = LOCATION_PREFIX.exec(message);
22723
+ if (!match)
22724
+ return retypeMessage(message, spellings);
22725
+ const [head, ...rest] = match[1].split(".");
22726
+ const location = [spellings.get(head) ?? head, ...rest].join(".");
22727
+ return `${location}: ${retypeMessage(message.slice(match[0].length), spellings)}`;
22728
+ }
22657
22729
  function retypeDetails(details, spellings) {
22658
22730
  if (Array.isArray(details))
22659
22731
  return details.map((issue) => retypeDetails(issue, spellings));
@@ -22681,7 +22753,7 @@ function retypeApiError(error, operation, commandSpec, operationSpec) {
22681
22753
  const spellings = typeableFields(operation, commandSpec, operationSpec);
22682
22754
  if (spellings.size === 0)
22683
22755
  return error;
22684
- return new SimApiError(retypeMessage(error.message, spellings), error.status, error.code, error.details === undefined ? undefined : retypeDetails(error.details, spellings));
22756
+ return new SimApiError(retypeLocatedMessage(error.message, spellings), error.status, error.code, error.details === undefined ? undefined : retypeDetails(error.details, spellings));
22685
22757
  }
22686
22758
 
22687
22759
  // src/runtime/build.ts
@@ -22695,6 +22767,7 @@ var GROUP_ALIASES = {
22695
22767
  logs: "log",
22696
22768
  "mcp-servers": "mcp-server",
22697
22769
  sandboxes: "sandbox",
22770
+ schedules: "schedule",
22698
22771
  secrets: "secret",
22699
22772
  skills: "skill",
22700
22773
  tables: "table",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim",
3
- "version": "2.2.25-preview.287.1",
3
+ "version": "2.2.25-preview.289.1",
4
4
  "description": "Sim CLI - talk to the Sim API from your terminal",
5
5
  "type": "module",
6
6
  "bin": {