Repository navigation
improvement(cli): accept the file references, list shapes and multi-file values models send - #9589
Conversation
…ile values models send files batch-delete answers to --ids and --paths, reads a JSON array or a comma-joined run of ids as its entries, and the v2 bulk delete resolves files/ VFS paths through the canonical resolver after authorization, refusing the whole batch when one path names no single live file. tables rows batch-delete answers to --row-ids and the log reads to --workflow-ids, the request fields behind their shortened flags. Workflow edits store a multi-file upload field as the list of file objects the editor writes, and an empty list clears it. A document page selection that lists separate pages says to read one range per call.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[Medium impact] The PR appears safe to merge; no new blocking issues were found. SummaryThe PR broadens accepted CLI flags and file-reference lists, adds bulk deletion by file path, and accepts multi-file workflow values.
Reviews (3) · Last reviewed commit: "improvement(cli): name the metadata comm..." · Reviewed by Greptile |
There was a problem hiding this comment.
All reported issues were addressed
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
… refuses binary output
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
files batch-deleteanswers to--idsand--paths(hidden, silent aliases of--file-ids), and reads a JSON array (["wf_a","wf_b"]) or a comma-joined run of ids (wf_a,wf_b) as its entries. A comma splits only a value with no/: no file id contains a comma or/, so afiles/…path keeps a comma in its name. Combining spellings is refused; the--yesgate is unchangedfiles/<folder>/<name>VFS paths alongside ids, through the canonical resolverfiles delete <path>uses. Paths resolve only after authorization, so a refused caller triggers no lookup and learns nothing. One path that names no single live file (missing, ambiguous, chat upload, archived) refuses the whole batch and deletes nothing. At most 100 entries per request may be paths, since each path is its own lookuptables rows batch-deleteanswers to--row-ids, and the log reads answer to--workflow-ids: these are the request field names behind the shortened--row/--workflowflags (andtables dispatches createalready spells it--row-ids)FlagSpec.hiddenAliases: hidden from help, docs, and the command inventory likerenamedFrom, but with no rename warning. The worker grammar is unchanged; the only advertised change is the--file-idsdescriptionfile-uploadvalue (e.g. agentattachmentFiles) as the list of file objects the editor itself stores. The validator used to reject every array, which dropped the whole atomic edit; an empty list now clears the field the way removing the last file does. Single-file fields are unchangedfiles getrefuses to put binary bytes in a text result, the refusal now namessim files describe <id>for metadata, because that is usually what the caller wanted.knowledge export -o -namessim knowledge get <id>the same way. Wording only--pagesvalue that lists separate pages (5,9,17) now gets an error saying to pass one page or contiguous range per read, instead of the generic format errorType of Change
Testing
packages/sim-cli/src/runtime/file-references.test.ts. All 7 cases fail on the pre-change code, and removing the/guard turns the comma-in-path case reddownload-refusal.test.ts: both cases fail before the change.file-references.test.tsalso refuses empty entries in a joined listvalidation.test.tsfile-upload cases: 3 fail before the changerender-document-for-vision.test.tscomma-list case: fails before the changearchive-workspace-file-items.test.ts: the 100-path cap case fails before the change. The case "refused caller looks up nothing" fails when resolution is moved ahead of authorizationfile-path-references.integration.ts: added a bulk-delete block on real Postgres covering all-or-nothing refusal, authz parity for non-members, opt-in only, and same-named files elsewhere left untouched. CI runs it, because local Docker storage was unavailablesrc/contract+src/runtimeand apps/sim editing + workspace-files application suites pass. Lint,check:cli-docs,check:openapi,check:test-patterns, andcheck:comment-hygienepass, and the generators are clean. Full audits and type-check run in CIChecklist
test-auditauthoring gate)