Skip to content

Commit 3d8996f

Browse files
authored
feat(api): workflow outline, workspace schedules list, clearer v2 errors, and catalog value types (#9905)
* feat(api): add traceId and field paths to v2 errors, name the read-only key remedy * feat(api): publish declared value types on block catalog fields * feat(api): add workflow outline and workspace schedules reads to v2 * fix(api): type declared catalog inputs as block params and regenerate the docs manifest * fix(api): compare member responses without their per-request traceId * improvement(api): tidy catalog field projection default and integration test comment * docs(api): say the outline's derived fields come from values state already returns
1 parent ba66dfd commit 3d8996f

45 files changed

Lines changed: 1503 additions & 65 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/docs/content/docs/api-reference/(generated)/workflows/meta.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"duplicateWorkflow",
1010
"moveWorkflows",
1111
"getWorkflowState",
12+
"getWorkflowOutline",
1213
"replaceWorkflowState",
1314
"applyWorkflowOperations",
1415
"applyWorkflowVariables",
@@ -24,6 +25,7 @@
2425
"updateWorkflowPublicApi",
2526
"listWorkflowTriggers",
2627
"updateWorkflowTrigger",
28+
"listWorkspaceSchedules",
2729
"deployWorkflow",
2830
"undeployWorkflow",
2931
"rollbackWorkflow",

‎apps/docs/content/docs/api-reference/authentication.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Delete a key from the same settings page to revoke it. Update applications that
4242

4343
A read-only key cannot change workspace resources or run, resume, or cancel workflows. Reads can still cost credits: searches use embedding credits, and search chat uses model credits and keeps a private conversation history. Selector lookups call third-party services with your connected accounts.
4444

45-
A refused request fails with `403` and the message `This API key is read-only and cannot perform this operation`. Where the surface carries a code, it is `READ_ONLY_API_KEY`: in `error.details.code` on the v2 API and the Sim MCP server, in `details.code` on the v1 API and workflow execution, and in `error.data.code` on a workflow MCP server.
45+
A refused request fails with `403` and the message `This API key is read-only and cannot perform this operation. Use a full-access API key.` Where the surface carries a code, it is `READ_ONLY_API_KEY`: in `error.details.code` on the v2 API and the Sim MCP server, in `details.code` on the v1 API and workflow execution, and in `error.data.code` on a workflow MCP server.
4646

4747
Access narrows a key; it never grants more than the key's identity already has. Access is fixed at creation, so create a new key to change it. Keys created before access levels existed have full access. Keys created from the deploy modal or for a workflow MCP server always have full access, because they exist to run workflows.
4848

‎apps/docs/content/docs/api-reference/getting-started.mdx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,14 @@ Rejected v2 requests use HTTP error status codes and a stable code/message envel
174174
{
175175
"error": {
176176
"code": "NOT_FOUND",
177-
"message": "Workflow not found"
177+
"message": "Workflow not found",
178+
"traceId": "3f9a1c7e"
178179
}
179180
}
180181
```
181182

183+
Every response carries an `x-request-id` header, and an error repeats it as `error.traceId`. Include it when you contact support about a failed request.
184+
182185
| Status | Meaning | Action |
183186
| --- | --- | --- |
184187
| `400` | Invalid request | Check the published schema and `error.details`, when present |
@@ -195,13 +198,13 @@ Other statuses and endpoint-specific recovery are documented in each reference.
195198

196199
V2 validates path parameters, query strings, and bodies against the published schema. Unknown fields return `400`; for example, `?limt=20` is an error. The rule also applies to endpoints with no query parameters: omit tracking tags, cache busters, and other undeclared fields.
197200

198-
A validation error can look like:
201+
The message names the first rejected field, prefixed with where it was sent (`path`, `query`, `header`, or `body`); `error.details` lists every issue. A validation error can look like:
199202

200203
```json
201204
{
202205
"error": {
203206
"code": "BAD_REQUEST",
204-
"message": "Invalid request",
207+
"message": "query: Unrecognized key: \"limt\"",
205208
"details": [
206209
{ "code": "unrecognized_keys", "keys": ["limt"], "path": [], "message": "Unrecognized key: \"limt\"" }
207210
]

‎apps/docs/content/docs/cli/commands.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ See [output formats](/cli/output) for the JSON default and display formats.
5858
| [`sim organizations`](/cli/organizations) | Manage organization membership, invitations, usage, access requests, and SSO. |
5959
| [`sim permission-groups`](/cli/permission-groups) | Manage organization permission groups, their configuration, and member assignments. |
6060
| [`sim sandboxes`](/cli/sandboxes) | Manage reusable dependency sets for Function blocks. |
61+
| [`sim schedules`](/cli/schedules) | List the schedules deployed workflows run across a workspace. |
6162
| [`sim secrets`](/cli/secrets) | Set and manage workspace or personal secrets. |
6263
| [`sim selectors`](/cli/selectors) | Discover destination options for registered fields, such as calendars, channels, and tables. |
6364
| [`sim skills`](/cli/skills) | Create reusable agent instructions and manage their editors. |

‎apps/docs/content/docs/cli/meta.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"organizations",
3232
"permission-groups",
3333
"sandboxes",
34+
"schedules",
3435
"secrets",
3536
"selectors",
3637
"skills",

‎apps/docs/content/docs/cli/reference.mdx‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5102,6 +5102,37 @@ sim sandboxes update <sandboxId> [options]
51025102

51035103
API request and response schemas: [updateSandbox](/api-reference/sandboxes/updateSandbox).
51045104

5105+
## sim schedules
5106+
5107+
List the schedules deployed workflows run across a workspace.
5108+
5109+
A schedule’s timing comes from its schedule block. Edit the block with `sim workflows operations apply`, then deploy; pause or resume one with `sim workflows triggers update`.
5110+
5111+
Also spelled `sim schedule`.
5112+
5113+
### sim schedules list
5114+
5115+
Show the timing and health of every schedule the workspace’s deployments run
5116+
5117+
```bash
5118+
sim schedules list [options]
5119+
```
5120+
5121+
**Options**
5122+
5123+
<CommandTable>
5124+
5125+
| Option | Required | Description |
5126+
| --- | --- | --- |
5127+
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
5128+
| `--cursor <value>` | No | Continue from nextCursor returned by a previous result. |
5129+
| `--sort-by <value>` | No | Field used to sort the result. Defaults to "createdAt". Accepted values: `createdAt`. |
5130+
| `--sort-order <value>` | No | Sort direction. Defaults to "desc". Accepted values: `asc`, `desc`. |
5131+
5132+
</CommandTable>
5133+
5134+
API request and response schemas: [listWorkspaceSchedules](/api-reference/workflows/listWorkspaceSchedules).
5135+
51055136
## sim secrets
51065137

51075138
Set and manage workspace or personal secrets.
@@ -8167,6 +8198,26 @@ sim workflows deployment update <workflowId> [options]
81678198

81688199
API request and response schemas: [updateWorkflowPublicApi](/api-reference/workflows/updateWorkflowPublicApi).
81698200

8201+
### sim workflows outline
8202+
8203+
Show a workflow’s draft as a compact read-only outline
8204+
8205+
```bash
8206+
sim workflows outline <workflowId>
8207+
```
8208+
8209+
**Arguments**
8210+
8211+
<CommandTable>
8212+
8213+
| Argument | Required | Description |
8214+
| --- | --- | --- |
8215+
| `workflowId` | Yes | Unique workflow identifier. |
8216+
8217+
</CommandTable>
8218+
8219+
API request and response schemas: [getWorkflowOutline](/api-reference/workflows/getWorkflowOutline).
8220+
81708221
### sim workflows state get
81718222

81728223
Get workflow state
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Schedules
3+
description: List the schedules deployed workflows run across a workspace.
4+
---
5+
6+
import { CommandTable } from '@/components/ui/command-table'
7+
8+
List the schedules deployed workflows run across a workspace.
9+
10+
A schedule’s timing comes from its schedule block. Edit the block with `sim workflows operations apply`, then deploy; pause or resume one with `sim workflows triggers update`.
11+
12+
`sim schedules` is also spelled `sim schedule`.
13+
14+
These commands accept the [global options](/cli/commands#global-options).
15+
16+
## Show the timing and health of every schedule the workspace’s deployments run
17+
18+
```bash
19+
sim schedules list [options]
20+
```
21+
22+
**Options**
23+
24+
<CommandTable>
25+
26+
| Option | Required | Description |
27+
| --- | --- | --- |
28+
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
29+
| `--cursor <value>` | No | Continue from nextCursor returned by a previous result. |
30+
| `--sort-by <value>` | No | Field used to sort the result. Defaults to "createdAt". Accepted values: `createdAt`. |
31+
| `--sort-order <value>` | No | Sort direction. Defaults to "desc". Accepted values: `asc`, `desc`. |
32+
33+
</CommandTable>
34+
35+
API request and response schemas: [listWorkspaceSchedules](/api-reference/workflows/listWorkspaceSchedules).

‎apps/docs/content/docs/cli/workflows.mdx‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,24 @@ sim workflows state replace <workflowId> [options]
280280

281281
API request and response schemas: [replaceWorkflowState](/api-reference/workflows/replaceWorkflowState).
282282

283+
### Show a workflow’s draft as a compact read-only outline
284+
285+
```bash
286+
sim workflows outline <workflowId>
287+
```
288+
289+
**Arguments**
290+
291+
<CommandTable>
292+
293+
| Argument | Required | Description |
294+
| --- | --- | --- |
295+
| `workflowId` | Yes | Unique workflow identifier. |
296+
297+
</CommandTable>
298+
299+
API request and response schemas: [getWorkflowOutline](/api-reference/workflows/getWorkflowOutline).
300+
283301
### Edit a workflow’s blocks, connections and settings with a batch of operations
284302

285303
OAuth login or personal API key required.

‎apps/docs/openapi-v2-billing.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,10 @@
596596
"description": "Other structured context defined by the specific error."
597597
}
598598
]
599+
},
600+
"traceId": {
601+
"description": "Identifier of this request, the same value as the `x-request-id` response header. Include it when contacting support.",
602+
"type": "string"
599603
}
600604
},
601605
"required": ["code", "message"],

‎apps/docs/openapi-v2-files-audit.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4743,6 +4743,10 @@
47434743
"description": "Other structured context defined by the specific error."
47444744
}
47454745
]
4746+
},
4747+
"traceId": {
4748+
"description": "Identifier of this request, the same value as the `x-request-id` response header. Include it when contacting support.",
4749+
"type": "string"
47464750
}
47474751
},
47484752
"required": ["code", "message"],

0 commit comments

Comments
 (0)