fix(knowledge): persist document tags in agent flows#5771
Conversation
|
Too many files changed for review. ( Bypass the limit by tagging |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Copilot
Reviewed by Cursor Bugbot for commit 7e5e5b6. Bugbot is set up for automated code reviews on this repo. Configure here. |
1924da7 to
7942b36
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7942b36. Configure here.
- Treat parsed-empty tag inputs as absent - Add regression coverage for query and document updates
Resolution: confirmed against the current |
Resolved/confirmed for the current head: the canonical |
|
Closing as superseded by mothership#360. Sim’s existing VFS already exposes the required tag metadata, so no Sim-side changes are needed. |

Summary
Agent-authored knowledge document tags now persist through create and update flows, and agents can query documents using tag filters. Document writes use the established Sim shape
{ tagName, value }; the runtime adapter still accepts the legacy{ tagName, tagValue }shape for backward compatibility. Empty tag inputs are treated as absent so they do not block otherwise valid searches or document updates.Related: simstudioai/mothership#360
Type of Change
Testing
bun run lintbun run check:api-validation:strictapps/sim:bun run type-checkbun run mship-tools:checkapps/sim:bunx vitest run lib/copilot/tools/server/knowledge/knowledge-base.test.ts tools/knowledge/knowledge.test.ts(20 tests passing)apps/sim:bun run scripts/sync-tool-catalog.ts --input=/Users/justin/code/.worktrees/mothership-knowledge-document-tags/copilot/contracts/tool-catalog-v1.json --checkapps/sim:bunx biome check lib/copilot/generated/tool-catalog-v1.ts lib/copilot/generated/tool-schemas-v1.ts lib/copilot/tools/server/knowledge/knowledge-base.test.tsChecklist
Screenshots/Videos
N/A — no UI changes.
Post-Deploy Monitoring & Validation
update_documentflow with a typed document tag and confirm the tag is visible on the saved document.{ tagName, value }is rejected, or the update succeeds without the tag. If observed, revert this PR and the related Mothership PR together.