Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a2c9744
rust(feat): generalize bulk creates into a bulk-write core
liam-sift Nov 12, 2026
766c6e9
rust(feat): take bulk items in the rule update and archive tools
liam-sift Nov 12, 2026
4e8d7a0
docs: describe bulk update and archive tools in the skill and changelog
liam-sift Nov 12, 2026
77060de
rust(feat): take bulk items in calculated channel write tools
liam-sift Nov 12, 2026
2d4b7a5
rust(feat): take bulk items in user defined function write tools
liam-sift Nov 12, 2026
69b7fa6
rust(feat): take bulk items in report updates
liam-sift Nov 12, 2026
6ff5ae8
rust(feat): take bulk items in report template updates
liam-sift Nov 12, 2026
35bc777
rust(feat): take bulk items in artifact run and asset writes
liam-sift Nov 12, 2026
8671473
rust(fix): import the bulk core at the top of the report tools
liam-sift Nov 12, 2026
48acacf
rust(fix): fail only the item on a FailedPrecondition in bulk writes
liam-sift Nov 12, 2026
896ddae
rust(refactor): share bulk selection and result building
liam-sift Nov 12, 2026
61e4933
rust(feat): approve update_annotation ids per item
liam-sift Nov 12, 2026
b2a072c
rust(fix): map annotation results by requested id and flag partial ar…
liam-sift Nov 12, 2026
e88be09
docs: describe per-id update_annotation approval
liam-sift Nov 12, 2026
917472f
rust(refactor): simplify bulk write validation and quote enum examples
liam-sift Nov 12, 2026
8b064d8
Merge remote-tracking branch 'origin/main' into eng-16918-add-bulk-su…
liam-sift Nov 13, 2026
e60aacb
rust(refactor): share bulk write plumbing and drop per-item next_step
liam-sift Nov 13, 2026
0615059
rust(fix): address bulk write review findings
liam-sift Nov 13, 2026
d5de4cd
docs: drop stale artifact relay comments
liam-sift Nov 13, 2026
5ca9210
test: stop the artifact bulk test on a code that is not retried
liam-sift Nov 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions rust/crates/sift_cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,33 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### What's New

- MCP update, archive and unarchive tools now write 1 to 100 resources per
call: `update_rule`, `archive_rule`, `unarchive_rule`, `update_artifact`,
`archive_artifact`, `unarchive_artifact`, `update_run`, `update_asset`,
`update_calculated_channel`, `archive_calculated_channel`,
`unarchive_calculated_channel`, `update_user_defined_function`,
`archive_user_defined_function`, `unarchive_user_defined_function`,
`update_report`, and `update_report_template`. Each takes an `items` array
of the fields it took before. This is a breaking change for existing
callers; pass a one-element `items` list for one resource. Results use the
same per-item `successes`, `failures`, and `not_attempted` lists as creates.
A missing or forbidden resource fails only its own item.
- `archive_rule` and `unarchive_rule` now report a missing rule as not found
instead of reporting success.
- `update_annotation` takes `selected_indices` over `annotation_ids`, so an
approval host can apply the shared changes to some ids and not others. It
takes up to 1000 ids, or up to 100 when it runs under an approval host
(`sift-cli mcp --chat`). Archiving and unarchiving now run per id. The result
now uses the same per-item `successes`, `failures`, and `not_attempted` lists
as the other bulk writes, indexed by position in `annotation_ids`. Each
success holds a compact `annotation_id`, `name`, `state`, `is_archived` and
`url`, not the full annotation. This is a breaking change: the
`batch_archive_error` and `archive_skipped` fields are removed.
- Bulk write results no longer repeat a `next_step` inside every item. The
call-level `next_step` covers the whole batch, and an item carries a `warning`
only when it needs attention, such as a calculated channel that will not
evaluate on some assets. `create_artifact` and `update_artifact` items keep a
one-line `next_step` naming the artifact and version.
- MCP `create_declarative_chart` takes an optional `surface`: `explore`,
`canvas`, `edge`, or `agents` (agent chat). The default is `agents` inside
Sift Agents and `explore` elsewhere. It validates the spec for that surface and
Expand Down
13 changes: 9 additions & 4 deletions rust/crates/sift_cli/assets/skills/sift/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,13 @@ tool.
available in read-only mode and need no confirmation.
- **Links:** `explore_url`.
- **Docs:** `search_docs`.
- **Creates:** every `create_*` write takes an `items` array of 1 to 100
objects. Pass one item to create one resource, or several to create a batch
in one call. Results report each item by its index in `items`.
- **Bulk writes:** every `create_*` write, and every `update_*`, `archive_*`
and `unarchive_*` write except `update_annotation`, takes an `items` array of
1 to 100 objects. Pass one item to write one resource, or several to write a
batch in one call. `update_annotation` instead applies one set of changes to
every id in `annotation_ids`. Results report each item by its position in
`items` or `annotation_ids`. Never replay a whole call after a partial
failure; retry only the failed items.
- **Writes:** `create_rule`, `update_rule`, `archive_rule`, `unarchive_rule`,
`create_annotation`, `update_annotation`, `create_report`, `update_report`,
`create_report_template`, `update_report_template`,
Expand All @@ -131,7 +135,8 @@ tool.
`create_user_defined_function`, `update_user_defined_function`,
`archive_user_defined_function`, `unarchive_user_defined_function`,
`create_test_report`, `append_test_measurements`, `update_asset`,
`update_run`, `create_artifact`, `archive_artifact`, `unarchive_artifact`.
`update_run`, `create_artifact`, `update_artifact`, `archive_artifact`,
`unarchive_artifact`.

## Workflows that span tools

Expand Down
9 changes: 9 additions & 0 deletions rust/crates/sift_mcp/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,15 @@ pub async fn list_webhooks(&self, params: Parameters<ListParams>) -> error::McpR
set both the structured `next_step` field and `result.content = vec![Content::text(next_step)]`
so the calling agent sees it. `get_data` and `explore_url` are the reference patterns. Write
tools use `next_step` to force a confirmation before the agent proceeds.
- **Bulk writes.** A tool that takes `items` gates itself first, then calls
`self.bulk_write(op, params.0, resource, validate, target, write)` from `tool/common/bulk.rs`.
`validate` checks one item before any write, `target` returns the key that must not repeat
across items, and `write` performs one item. Use `self.bulk_write_partial` instead when one
item takes several RPCs, so a failure can follow a committed change (`create_artifact`,
`update_report`). The
call-level `next_step` covers the batch, so an item result carries no `next_step` of its own,
only a `warning` when that item needs the user's attention. Do not repeat the
`selected_indices` or `items` bounds in the description; the `BulkItems` schema documents them.
- **Read tools keep their payload in `content`.** Clients such as Claude Code show the model
`content`, not `structuredContent`. Replacing `content` with `next_step` alone hides the payload
from the agent. A `list_*` tool built on `list_body` passes its `next_step` to `into_result`
Expand Down
6 changes: 5 additions & 1 deletion rust/crates/sift_mcp/src/error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,19 @@ pub fn from_anyhow(error: anyhow::Error) -> rmcp::ErrorData {

let message = format!("{error:?}");
let mut code = ErrorCode::INTERNAL_ERROR;
let mut data = None;

if let Ok(grpc_status) = error.downcast::<Status>() {
code = from_grpc_code(grpc_status.code());
if grpc_status.code() == Code::FailedPrecondition {
data = Some(serde_json::json!({"reason": "FailedPrecondition"}));
}
}

rmcp::ErrorData {
code,
message: message.into(),
data: None,
data,
}
}

Expand Down
Loading
Loading