feat(cli,deployments): --auto-attach flag and gram.deploy.json auto_attach#2852
feat(cli,deployments): --auto-attach flag and gram.deploy.json auto_attach#2852simplesagar wants to merge 1 commit into
Conversation
…ttach Customer-facing entry point for AGE-1377. A `gram push --auto-attach my-mcp` (or `auto_attach: ["my-mcp"]` in gram.deploy.json, or both -- they set-union) subscribes the named toolsets to every function source in this push. On subsequent pushes, the AutoSyncToolsets activity from the previous PR appends any new tool URNs automatically. Server side: - CreateDeploymentForm and EvolveForm gain auto_attach_toolset_slugs. - toolsets.AddAutoSyncSourcesBySlug query set-unions "function:<slug>" entries into each toolset's auto_sync_sources, inside the same transaction that records the deployment, so the workflow's AutoSyncToolsets activity sees the updated subscription. - Unknown slug returns 404. - Missing functions in the deployment returns 400 (auto-attach is a function-source concept today). CLI side: - PushOptions.AutoAttach plumbs into workflow.CreateDeployment and workflow.EvolveDeployment. - mergeAutoAttach() de-dups the union of flag + config; deterministic ordering for tests. - StringSliceFlag is repeatable: `--auto-attach a --auto-attach b`. Tests: 6 cases on mergeAutoAttach covering both-empty, single-source, union ordering, dedup, and empty-string filtering. The server-side behavior is exercised indirectly via PR 3's auto-sync activity test (which proves the column drives extension correctly). Stacks on #2850. Refs AGE-1377. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Summary
Closes the customer-facing loop on AGE-1377. `gram push --auto-attach my-mcp` (or `auto_attach: ["my-mcp"]` in `gram.deploy.json`) sets up the toolset's subscription to this push's function sources before the workflow runs. New tool URNs from subsequent pushes flow automatically via the activity from #2850.
Stacks on #2850. Final rebase to `main` once #2834, #2848, and #2850 land.
Surface
Server
CLI
Test plan
🤖 Generated with Claude Code