You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cf7b488
Browse filesBrowse the repository at this point in the historyBrowse files
fix(workspace-source): locate every finding, hint nested folder creates, and plan managed rows as stored (#10558)
* fix(workspace-source): locate every finding, hint nested folder creates, and plan managed rows as stored
- kindFinding defaults file to the kind's declarationPath; rows and doc findings point at their file
- E_TABLE_FOLDER/E_KB_FOLDER hint one folders create per missing level, parent first
- E_PLAN_REF_DELETED and hold findings point at the workflow line using the resource
- a workspace plan reads secrets.ts names as known, so E_SECRET_MISSING (at the read) replaces W_ENV_UNKNOWN
- E_NAME_TAKEN names the refused declaration
- planRows compares coerced declared cells and reports +added ~patched -removed
- docs: a get prints only secrets that have a value
* fix(workspace-source): keep reference spans through id resolution and locate E_PLAN_REF_HELD
Copy file name to clipboardExpand all lines: apps/docs/content/docs/workflows/code/diagnostics.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -239,7 +239,7 @@ Workspace source reports every workflow code above for the files of `workflows/<
239
239
| Code | Meaning |
240
240
| --- | --- |
241
241
|`E_SECRET_NAME`| A declared name outside the secret name format. |
242
-
|`E_SECRET_MISSING`| A workflow uses a declared secret the workspace holds no value for: it is held back. |
242
+
|`E_SECRET_MISSING`| A workflow reads a declared secret the workspace holds no value for: it is held back. The finding points at the first line that reads it, and replaces `W_ENV_UNKNOWN` for that name. |
243
243
|`W_SECRET_MISSING`| A declared secret the workspace holds no value for. |
244
244
245
245
#### Credentials (`credentials.ts`)
@@ -260,7 +260,7 @@ Workspace source reports every workflow code above for the files of `workflows/<
260
260
|`E_TABLE_TOO_MANY_COLUMNS`| More columns than a table may hold: a size limit, classed like `E_LIMIT_EXCEEDED`. |
261
261
|`E_TABLE_OPTIONS`| A select column without options, an option declared twice, or options on another type. |
262
262
|`E_TABLE_TYPE_CONVERSION`| A type change the stored cells cannot convert to. |
263
-
|`E_TABLE_FOLDER`| A table folder that does not exist in the workspace. |
263
+
|`E_TABLE_FOLDER`| A table folder that does not exist in the workspace. The hint creates each missing folder, parent first. |
264
264
|`E_TABLE_ROWS`| The declaration's `rows` or its `tables/<key>.rows.jsonl`: a bad mode or key column, a line that is not a row of declared columns, a managed row without its key or repeating one. |
265
265
|`I_TABLE_SEED_SKIPPED`| Seed rows declared for a table that already holds rows: only a new or empty table is seeded. |
266
266
|`I_TABLE_ROWS_UNKEYED`| Managed rows whose key cell is empty (a row the table's "add row" made and nobody keyed): no file line can name them, so a get leaves them out and an apply keeps them as they are. |
@@ -311,7 +311,7 @@ Workspace source reports every workflow code above for the files of `workflows/<
311
311
|`E_KB_DOC_NAME`| A document file name or type the knowledge base cannot hold. |
312
312
|`E_KB_DOC_EMPTY`| An empty document, which a knowledge base cannot index. |
313
313
|`E_KB_CHUNKING`| Chunking settings outside what a knowledge base accepts. |
314
-
|`E_KB_FOLDER`| A knowledge base folder that does not exist in the workspace. |
314
+
|`E_KB_FOLDER`| A knowledge base folder that does not exist in the workspace. The hint creates each missing folder, parent first. |
315
315
|`W_KB_DOC_UNCHECKED`| A stored document whose bytes this request had no budget left to download and compare. |
316
316
|`W_KB_DOC_FAILED`| Documents whose indexing failed: search does not find them until they are indexed again. |
317
317
|`I_KB_REEMBED`| How many documents the apply indexes (embeds) after it writes them. |
@@ -346,7 +346,7 @@ Workspace source reports every workflow code above for the files of `workflows/<
346
346
|`E_APPLY_REFUSED`| A change a child operation refused, with its message. |
347
347
|`E_APPLY_FAILED`| A write failed for a reason that is not the source's (logged on the server). |
348
348
|`E_PLAN_TOO_LARGE`| The apply would make more changes or touch more workflows than one request may. |
349
-
|`E_PLAN_REF_DELETED`| A declared resource references one this apply deletes. |
349
+
|`E_PLAN_REF_DELETED`| A declared resource references one this apply deletes. For an edited workflow, the finding points at the line that uses it. |
350
350
|`E_PLAN_REF_HELD`| A declared resource references one this apply holds back, so it is held back too. |
351
351
|`W_RESOURCE_IN_USE`| A resource this apply deletes is still used by stored workflows. |
352
352
|`W_TABLE_COLUMN_RENAMED_IN_USE`| A table column this apply renames is still written, filtered or sorted by its old name in a stored workflow's Table block, which the run then drops. |
Copy file name to clipboardExpand all lines: apps/docs/content/docs/workflows/code/directory.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ A resource's key is its file or folder name, and a workflow names it by that key
54
54
55
55
{/* workflow-code-docs:directory-kinds:begin — generated by `bun run generate:workflow-code-docs`; do not edit between markers */}
56
56
57
-
-`secrets.ts`: `export default defineSecrets({ NAME: { description? } })`, the workspace secrets workflows read, by name and description only (never a value: set one with `sim secrets set NAME --scope workspace`). A workflow: `env.NAME`; one using a declared secret the workspace has no value for is held back, and the rest apply.
57
+
-`secrets.ts`: `export default defineSecrets({ NAME: { description? } })`, the workspace secrets workflows read, by name and description only (never a value: set one with `sim secrets set NAME --scope workspace`). A workflow: `env.NAME`; one using a declared secret the workspace has no value for is held back, and the rest apply. A get prints only the secrets the workspace has a value for, so a declared secret without one stays only in your directory.
58
58
-`credentials.ts`: `export default defineCredentials({ <key>: { provider, name? } })`, binding each key to this workspace's credential for that provider (never a token): the one bound already, else the only one, else the one whose display name is `name`. A workflow: `credential('<key>')`; one using a key no credential binds to is held back, and the rest apply.
59
59
-`tools/<key>.ts` (`defineTool({ title, schema, code: codeFile('./<key>.js') })`) and its code in `tools/<key>.js`, where each schema parameter is a variable. Code holding a literal credential prints as `code: stored()`, which keeps the stored code. A workflow: `customTool('<key>')`.
60
60
-`skills/<key>.md`: a frontmatter block of `name` and `description`, then the content. A workflow: `skills: [skill('<key>')]` on an agent.
0 commit comments