Repository navigation
feat: nan notifications (Slack, Teams, Discord, HTTPS channels) (0.1.34) - #56
Merged
Merged
Conversation
…with golden responses Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… rotate, deliveries and subscriptions Webhook URLs only from --url-file or --url-stdin (never an argument), the https signing secret printed once, exit 64 with a portal hint when the account has no notifications, httptest tests with cloud-api's golden objects, and every new --json command held to the stdout contract. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he wire, no dead code, automation ids compared in lower case, subscriptions --json documented) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… default events only in tests, generic invalid_request pinned) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sre-helmcode
pushed a commit
that referenced
this pull request
Oct 20, 2026
Brings #50, #51, #52, #53, #54, #56 and #57 onto the new structure: - mimo-v2.6-flash, qwen3.8-flash at 1M, and the Codex model catalogue: the writer changes go to internal/tools, the catalogue and its embedded prompt to internal/tools/codexprompt. - BYOK runs, secrets and automation writes, and notifications: the commands go to internal/cli and hang off NewRootCmd; their goldens to internal/cli/testdata. - The --json contract test counts the commands with a --json of their own, not the one every command inherits from the root. - The embedded Codex prompt is Apache-2.0: its NOTICE and licence are now in THIRD-PARTY-NOTICES.txt. - Messages without em dashes, and the new code lint-clean.
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.
What
nan notifications: manage notification channels (Slack, Microsoft Teams, Discord, HTTPS) from the CLI, against/v1/notification-channels(helmcode/nan-cloud-api#349, spec helmcode/nan-devopsAGENT-AUTOMATIONS-PHASE3-NOTIFICATIONS.md§4 and §5).ls,show <NAME|id>,add NAME --kind ... (--url-file PATH | --url-stdin) [--event E]... [--no-events] [--automation REF],edit [--name] [--enable|--disable] [--url-file|--url-stdin],rm [--yes],test(exit 1 when not delivered, with the reason and what to do),rotate(https only),deliveries [--limit 1..100],subscriptions [--set|--add|--remove EVENT[=AUTOMATION]]... [--clear];--jsonon all butrm.--url-fileor--url-stdin(never a terminal). A URL as an argument or--urlis refused before anything is sent, without echoing it. Request types redact the URL in%v/%+v/%#v.--jsonit is in the JSON (signing_secret) and the note stays on stderr.features.notifications/features.write_apifrom/api/auth/me; a token gets the mount's 404. Both exit 64 pointing at the portal (Settings > Notifications) and https://nan.builders/docs/notifications.invalid_url(with a per-kind URL hint),name_taken,too_many_channels,automation_not_found,channel_disabled,signing_not_supported,rate_limited(write bucket vs test limit),notifications_unavailable,token_scope_denied,credential_not_allowed,workspace_key_not_allowed.notifications:writeonly can act on a channel by id (it cannot list to resolve names).Tests
internal/api: golden channel, create (with signing_secret), deliveries, test and rotate objects shaped exactly as cloud-api's handler serialises them; every route/method/body; URL redaction; both error envelopes.cmd/notifications_test.go: httptest fake for every subcommand, human output golden files (cmd/testdata/notifications/), URL never leaks (stdout, stderr, message, other requests, files in HOME), every refusal, feature off for session and token, write-only token.cmd/json_output_test.go: every new--jsoncommand is covered by the generic one-JSON-document-on-stdout test (and asserts the URL never prints).resetCommandFlagsreset slice flags withSet("[]"), which appends a literal[]; it now usesReplace(nil).go build ./... && go vet ./... && gofmt -l . && go test -count=1 ./...: all green.Deploy
Merging publishes 0.1.34. Needs
NOTIFICATIONS_ENABLEDand the write API on for the member to be useful; otherwise the commands exit 64 with the portal hint.🤖 Generated with Claude Code