Add --subscribe / --no-subscribe to recording creation commands#187
Merged
Add --subscribe / --no-subscribe to recording creation commands#187
Conversation
Picks up Subscriptions field on create request types (CreateMessageRequest, CreateDocumentRequest, CreateScheduleEntryRequest).
Controls who gets subscribed and notified when creating messages, docs, and schedule entries. Critical for bot/agent use cases that need silent creation. --no-subscribe subscribe nobody (no notifications) --subscribe "X,Y" subscribe specific people (names, emails, IDs, "me") Mutually exclusive. Neither flag preserves server default (everyone). Explicit --subscribe with no resolvable people is a hard error, including --subscribe "" (via cmd.Flags().Changed detection). Available on: message, messages create, docs create, schedule create. Closes #182
There was a problem hiding this comment.
Pull request overview
Adds opt-in/opt-out subscription control to several “recording creation” CLI commands by wiring new flags into SDK request payloads, enabling silent/bot-friendly creates.
Changes:
- Introduce
--subscribe/--no-subscribeflags for message, document, and schedule-entry creation, mapping to the SDKSubscriptions *[]int64field. - Add shared helper logic (
applySubscribeFlags+ token resolution) and unit tests for validation semantics (mutual exclusion, explicit empty). - Bump
github.com/basecamp/basecamp-sdk/gotov0.2.2and update provenance/docs.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/commands/helpers.go | Adds resolvePersonIDs + applySubscribeFlags to interpret subscription flags and produce *[]int64 for SDK requests. |
| internal/commands/helpers_test.go | Unit tests for applySubscribeFlags validation behavior (mutual exclusion, empty/whitespace/comma-only, no-subscribe). |
| internal/commands/messages.go | Adds flags to messages create and message shortcut; sets CreateMessageRequest.Subscriptions. |
| internal/commands/messages_test.go | Adds command-level tests for new flags and validation errors. |
| internal/commands/files.go | Adds flags to files documents create; sets CreateDocumentRequest.Subscriptions. |
| internal/commands/files_test.go | Adds command-level tests for docs create flag presence and validation errors. |
| internal/commands/schedule.go | Adds flags to schedule create; sets CreateScheduleEntryRequest.Subscriptions. |
| internal/commands/schedule_test.go | Adds command-level tests for schedule create flag presence and validation errors. |
| go.mod | Bumps Basecamp Go SDK dependency to v0.2.2. |
| go.sum | Updates sums for the SDK version bump. |
| internal/version/sdk-provenance.json | Syncs SDK provenance metadata (version/revision/timestamp). |
| API-COVERAGE.md | Notes new subscribe/no-subscribe support on relevant “create” commands. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Wrap ParseInt error in resolvePersonIDs for better diagnostics - Add happy-path tests verifying --no-subscribe sends empty subscriptions array and default omits the field entirely - Update --no-subscribe help text to "Don't subscribe anyone else" since the server always auto-subscribes the creator
jeremy
added a commit
that referenced
this pull request
Mar 5, 2026
Add v0.2.2 features from PR #187 that were missing from the agent skill: - Output modes: --md/-m, --styled, -v/-vv - Quick reference: "Post silently" row - Messages: --no-subscribe/--subscribe flags with examples - Files & Documents: --no-subscribe example for doc create - Schedule: --no-subscribe/--subscribe flags and example Closes #189
2 tasks
jeremy
added a commit
that referenced
this pull request
Mar 5, 2026
* Document --no-subscribe, --subscribe, and output mode flags in SKILL.md Add v0.2.2 features from PR #187 that were missing from the agent skill: - Output modes: --md/-m, --styled, -v/-vv - Quick reference: "Post silently" row - Messages: --no-subscribe/--subscribe flags with examples - Files & Documents: --no-subscribe example for doc create - Schedule: --no-subscribe/--subscribe flags and example Closes #189 * Document config trust/untrust commands in SKILL.md Add v0.2.2 feature from PR #181: config trust subsection explaining authority key protection and trust/untrust commands. * Add --markdown alias to output modes in SKILL.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--subscribe/--no-subscribeflags tomessage,messages create,docs create, andschedule createSubscriptions *[]int64field--subscribeaccepts comma-separated names, emails, IDs, or"me"via the existingResolvePersoninfrastructure--no-subscribesends an empty subscriber list (nobody notified) — critical for bot/agent use cases--subscribe ""is a hard error (detected viacmd.Flags().Changed), not a silent fallback to server defaultTest plan
make checkpasses (fmt, vet, lint, test, e2e, naming, surface, provenance, tidy)applySubscribeFlags: mutual exclusion, no-subscribe, neither, explicit empty string, whitespace-only, comma-onlybasecamp message --subject "..." --no-subscribe --in <project> --json→ 1 subscriber (creator only, server-enforced) vs 5 defaultbasecamp message --subject "..." --subscribe me --in <project> --json→ 1 subscriber (Jeremy Daer)basecamp message --subject "Bad" --subscribe me --no-subscribe→ usage error: mutually exclusiveCloses #182