diff --git a/packages/notch-mod/.claude-plugin/plugin.json b/packages/notch-mod/.claude-plugin/plugin.json index 1af9aef..aa0c228 100644 --- a/packages/notch-mod/.claude-plugin/plugin.json +++ b/packages/notch-mod/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "switchboard-notch", - "version": "0.1.0", + "version": "0.1.1", "description": "Claude's questions drop from your Mac's notch as a native card. Pick with 1-4, type your own answer, or press esc to answer in Claude Code as usual.", "author": { "name": "sameeeeeeep", @@ -8,11 +8,17 @@ }, "displayName": "Switchboard Notch", "homepage": "https://thelastprompt.ai/switchboard", + "repository": "https://github.com/sameeeeeeep/switchboard-notch", "license": "MIT", "keywords": [ "notch", "macos", "mod", + "questions", "AskUserQuestion" - ] + ], + "icon": "./assets/icon.png", + "documentationUrl": "https://github.com/sameeeeeeep/switchboard-notch#readme", + "supportUrl": "https://github.com/sameeeeeeep/switchboard-notch/issues", + "privacyPolicyUrl": "https://github.com/sameeeeeeep/switchboard-notch#privacy" } diff --git a/packages/notch-mod/README.md b/packages/notch-mod/README.md index 391af16..e119d55 100644 --- a/packages/notch-mod/README.md +++ b/packages/notch-mod/README.md @@ -3,6 +3,8 @@ When Claude asks you something, the question drops from your Mac's notch as a native card, so you can answer without switching back to the terminal. +![A question from Claude shown as a card at the Mac notch, with three numbered options and a text box](assets/card-light.png) + - **1–4** picks an option, **↵** confirms the highlighted one (Claude's recommendation starts highlighted) - **Type** in the box to answer in your own words - **esc** dismisses the card and the question appears in Claude Code as usual, so it is never lost @@ -16,7 +18,7 @@ tool and nothing else. Nothing is installed and nothing is written to your settings: ```sh -claude --plugin-url https://github.com/sameeeeeeep/switchboard-notch/releases/download/v0.1.0/switchboard-notch.zip +claude --plugin-url https://github.com/sameeeeeeep/switchboard-notch/releases/latest/download/switchboard-notch.zip ``` Ask Claude something that makes it ask you back, or run `/notch test`. @@ -42,11 +44,33 @@ Updates: `claude plugin update switchboard-notch@switchboard-notch`. Multi-select, free-text and number questions always use Claude Code's own form. +## Examples + +Any request where Claude stops to ask you a question shows the card. Three to try: + +1. **A design choice.** "Add a settings page to this app. Ask me which layout to use before you + build it." The card shows the layouts Claude proposes, with its pick highlighted. Press **1–4** or **↵**. +2. **A risky step.** "Clean up the old migration files, but ask me before deleting anything." Claude's + question lands at the notch while you work in another app; answer it there and Claude carries on. +3. **Your own answer.** "Help me name this CLI tool and ask me to choose." Ignore the options, type + a name in the card's text box, and press **↵**. Claude receives exactly what you typed. + +`/notch test` shows a sample card without asking Claude anything. + ## Where it works Cards appear when Claude Code runs on your Mac: the `claude` CLI in any terminal, and the Desktop app's Code tab once it ships Claude Code v2.1.287. In other places, such as cloud sessions, the mod -steps aside and Claude Code asks as usual. +steps aside and Claude Code asks as usual. Chat on claude.ai and Cowork don't run Claude Code mods, +so the plugin does nothing there. On Windows and Linux the card can't open, and Claude Code asks +as usual. + +## Troubleshooting + +- **No card appears.** Run `claude --version` (needs v2.1.287+), then `/plugin` and look for + `switchboard-notch` in the `mods active` line under the tabs. Run `/notch test`. If `/notch` is off, run `/notch on`. +- **The card opens on the wrong screen.** Run `/notch cursor` to open it beside the pointer. +- **You'd rather answer in the terminal.** Press **esc** on any card, or run `/notch off`. ## What it does on your machine @@ -56,6 +80,19 @@ answer. The binary is signed with Developer ID (STAYOFT VENTURES PRIVATE LIMITED notarized by Apple. Its source is [`helper/sb-card.swift`](helper/sb-card.swift). Source of truth: [`packages/notch-mod`](https://github.com/sameeeeeeep/switchboard/tree/main/packages/notch-mod) in the switchboard repo. To see what the mod hooks before you load it, run `claude plugin validate` on this directory. +## Privacy + +Switchboard Notch collects nothing. The question, its options and your answer pass only between +Claude Code and `helper/sb-card` on your Mac. There is no network access, no analytics and no +account. The only thing saved is your `/notch` setting (on or off, notch or cursor), in Claude +Code's local storage for this plugin; uninstalling the plugin removes it. + +## Support + +Report problems or ask questions at +[github.com/sameeeeeeep/switchboard-notch/issues](https://github.com/sameeeeeeep/switchboard-notch/issues). +For security issues, email [sameeeeeeep@gmail.com](mailto:sameeeeeeep@gmail.com) instead of opening a public issue. + ## Develop ```sh diff --git a/packages/notch-mod/assets/card-dark.png b/packages/notch-mod/assets/card-dark.png new file mode 100644 index 0000000..57d24a9 Binary files /dev/null and b/packages/notch-mod/assets/card-dark.png differ diff --git a/packages/notch-mod/assets/card-light.png b/packages/notch-mod/assets/card-light.png new file mode 100644 index 0000000..7201942 Binary files /dev/null and b/packages/notch-mod/assets/card-light.png differ diff --git a/packages/notch-mod/assets/icon.png b/packages/notch-mod/assets/icon.png new file mode 100644 index 0000000..71c23ac Binary files /dev/null and b/packages/notch-mod/assets/icon.png differ diff --git a/packages/notch-mod/build.sh b/packages/notch-mod/build.sh index 03c9b25..5a48f29 100755 --- a/packages/notch-mod/build.sh +++ b/packages/notch-mod/build.sh @@ -24,5 +24,5 @@ fi mkdir -p dist rm -f dist/switchboard-notch.zip -zip -qr dist/switchboard-notch.zip .claude-plugin/plugin.json hooks helper/sb-card README.md +zip -qr dist/switchboard-notch.zip .claude-plugin/plugin.json hooks helper/sb-card assets README.md echo "built dist/switchboard-notch.zip" diff --git a/packages/notch-mod/hooks/hooks.json b/packages/notch-mod/hooks/hooks.json index 25dbace..7c4fe5e 100644 --- a/packages/notch-mod/hooks/hooks.json +++ b/packages/notch-mod/hooks/hooks.json @@ -1,4 +1,5 @@ { "description": "Routes AskUserQuestion to the native notch card (helper/sb-card)", - "modules": ["./register.js"] + "modules": ["./register.js"], + "hooks": {} } diff --git a/packages/notch-mod/listing/LISTING.md b/packages/notch-mod/listing/LISTING.md new file mode 100644 index 0000000..957d485 --- /dev/null +++ b/packages/notch-mod/listing/LISTING.md @@ -0,0 +1,98 @@ +# Switchboard Notch: directory listing draft + +Portal: https://claude.ai/directory/manage → **Submit new** → **Plugin bundle**. +For plugins, the portal reads the listing from `.claude-plugin/plugin.json` and `README.md`. You don't +type most of it into a form: to change a field, edit the file, run `./publish.sh`, and **Re-validate**. +Everything below is either already in those files, or is an answer you give in the form. + +## Source step (typed in the portal) + +| Field | Value | +| --- | --- | +| Repository | `sameeeeeeep/switchboard-notch` | +| Plugin path | leave empty (the plugin is at the repository root) | +| Branch or tag | leave empty (follows `main`) | + +Submit the small mirror repo, not `sameeeeeeep/switchboard` with path `packages/notch-mod`. In a subfolder, +the validator also holds `hooks/register.js` ("Scripts the validator couldn't follow"), and `packages/` holds +other plugins. + +## Listing details (read from plugin.json and README.md) + +| Field | Value | Source | Status | +| --- | --- | --- | --- | +| Name (permanent) | `switchboard-notch` | plugin.json `name` | set | +| Display name | Switchboard Notch | plugin.json `displayName` | set | +| Short description | Claude's questions drop from your Mac's notch as a native card. Pick with 1-4, type your own answer, or press esc to answer in Claude Code as usual. | plugin.json `description` | set | +| Long description | The README, shown as the listing description | `README.md` | set (about 690 words outside code blocks; 40 needed) | +| Icon | `./assets/icon.png` (512×512 PNG, the Switchboard lime dot mark) | plugin.json `icon` | set; reaches GitHub on the next `./publish.sh` | +| Version | 0.1.0 | plugin.json `version` | set | +| Author / publisher | sameeeeeeep | plugin.json `author.name` | set (consider `Sameep Rehlan` or `The Last Prompt` if you want a recognisable publisher) | +| License | MIT | plugin.json `license` + `LICENSE` file | set | +| Homepage | https://thelastprompt.ai/switchboard | plugin.json `homepage` | live (200) | +| Repository | https://github.com/sameeeeeeep/switchboard-notch | plugin.json `repository` | live | +| Documentation URL | https://github.com/sameeeeeeep/switchboard-notch#readme | plugin.json `documentationUrl` | live | +| Support URL | https://github.com/sameeeeeeep/switchboard-notch/issues | plugin.json `supportUrl` | live (issues enabled) | +| Privacy policy URL | https://github.com/sameeeeeeep/switchboard-notch#privacy | plugin.json `privacyPolicyUrl` | **NOT LIVE YET**: the `## Privacy` README section exists only locally until `./publish.sh` runs. The existing https://thelastprompt.ai/switchboard/privacy covers the browser extension and daemon only, not this plugin, so it isn't used. | +| Terms of service URL | not set | plugin.json `termsOfServiceUrl` | optional; there is no thelastprompt.ai terms page (404) | +| Keywords | notch, macos, mod, questions, AskUserQuestion | plugin.json `keywords` | set | +| Category | not asked for plugins in the current docs (only connectors have "one to five categories"). If the form asks, pick **Developer tools**, then **Productivity**. | portal | n/a | +| Supported surfaces | Claude Code only (macOS). The portal works this out from the components. Hooks are "Ignored" in Chat, so the listing will show it doing nothing in claude.ai chat. | derived | expected | + +### Short description, alternatives if you want a different one (edit plugin.json `description`) + +- Current: "Claude's questions drop from your Mac's notch as a native card. Pick with 1-4, type your own answer, or press esc to answer in Claude Code as usual." +- Shorter: "Answer Claude Code's questions from a native card at your Mac's notch." + +### Long description + +This is the README. Its sections: what it does (with screenshot) · Try it for one session · Keep it · Settings · +Examples (3 use cases, which Directory Policy 3.E asks for) · Where it works · Troubleshooting · What it does on your +machine · Privacy · Support · Develop. + +## Data handling step (answer in the form) + +| Question | Answer | +| --- | --- | +| Does the plugin read or store personal data? | **No.** It reads the text of Claude's `AskUserQuestion` call to draw the card. It stores only the `/notch` setting (on/off, notch/cursor) in Claude Code's local mod storage. | +| Does it send data to services other than its declared connectors? | **No.** It has no connectors and makes no network requests. `helper/sb-card` is a local, one-shot window that prints the answer to stdout. | +| How long does it keep data? | It keeps no data. The setting stays until the plugin is uninstalled. | +| Is it intended for people under 18? | **No.** | + +## Compliance step + +1. Check that the prefilled contact email is one you read. Anthropic emails it about the submission. + Security contact: sameeeeeeep@gmail.com (also in the README Support section). +2. Select all four acknowledgements (Directory Terms and Directory Policy). + +## Review and submit step + +- **How new versions reach the directory**: keep **GitHub push webhook**, then select **Set up push updates** + (needs admin on the mirror repo). `./publish.sh` pushes to `main`, so each publish becomes a new directory version. +- **Auto-publish passing versions**: leave it off for the first submission. A reviewer publishes the first version anyway. +- Select **Submit for review**. + +## Reviewer notes (paste if the form has a notes box, or keep for a reply to a hold) + +> Switchboard Notch is a Claude Code mod (hooks/register.js, Claude Code v2.1.287+) that handles only the +> `AskUserQuestion` tool call. For single-choice questions it runs `helper/sb-card`, a native macOS window, +> and returns the picked label in the same shape as Claude Code's own dialog. Esc, a 9-minute timeout, +> multi-select, or any helper failure falls through to Claude Code's own dialog (`next(e)`), so a question is +> never lost. `helper/sb-card` is a universal Mach-O built from `helper/sb-card.swift` (in the repo, about 230 +> lines, AppKit + SwiftUI). It is signed with Developer ID (STAYOFT VENTURES PRIVATE LIMITED, 55354KFTHU) and +> notarized. You can rebuild it with `./build.sh`. It makes no network requests and writes no files. +> `claude plugin validate` lists every hook and call. No test account is needed. To test: install, +> run `/notch test` on a Mac, or ask Claude "ask me which layout to use for a settings page". + +## Three working examples (Directory Policy 3.E, also in the README) + +1. "Add a settings page to this app. Ask me which layout to use before you build it." → the card shows the layouts, with Claude's pick highlighted. +2. "Clean up the old migration files, but ask me before deleting anything." → the confirmation question appears at the notch while you're in another app. +3. "Help me name this CLI tool and ask me to choose." → type your own name in the card's text box and press ↵. + +## Assets in this folder + +- `card-light.png`, `card-dark.png`: 880×624 captures of the real card (`SB_CARD_APPEARANCE=light|dark helper/sb-card ...`). + Plugin listings don't take screenshots in the current docs; only MCP Apps have a carousel. The light one is + embedded in the README from `assets/card-light.png`, which is the published copy. +- The icon is `../assets/icon.png`, rendered from `landing/public/favicon.svg`. diff --git a/packages/notch-mod/listing/card-dark.png b/packages/notch-mod/listing/card-dark.png new file mode 100644 index 0000000..57d24a9 Binary files /dev/null and b/packages/notch-mod/listing/card-dark.png differ diff --git a/packages/notch-mod/listing/card-light.png b/packages/notch-mod/listing/card-light.png new file mode 100644 index 0000000..7201942 Binary files /dev/null and b/packages/notch-mod/listing/card-light.png differ diff --git a/packages/notch-mod/publish.sh b/packages/notch-mod/publish.sh index dfae5fe..855976e 100755 --- a/packages/notch-mod/publish.sh +++ b/packages/notch-mod/publish.sh @@ -22,8 +22,10 @@ git rm -rq --ignore-unmatch . >/dev/null cd - >/dev/null # Plugin files, plus a marketplace file so the repo is its own marketplace. -cp -R .claude-plugin hooks helper tests README.md build.sh publish.sh .gitignore "$TMP/repo/" +cp -R .claude-plugin hooks helper tests assets README.md build.sh publish.sh .gitignore "$TMP/repo/" rm -rf "$TMP/repo/.claude-plugin/types" +# The directory's validator blocks macOS/Windows system files anywhere in the plugin folder. +find "$TMP/repo" \( -name .DS_Store -o -name Thumbs.db -o -name desktop.ini -o -name __MACOSX \) -prune -exec rm -rf {} + cp ../../LICENSE "$TMP/repo/LICENSE" cat > "$TMP/repo/.claude-plugin/marketplace.json" <<'EOF' { @@ -55,7 +57,7 @@ if gh release view "v$VERSION" -R "$REPO" >/dev/null 2>&1; then gh release upload "v$VERSION" dist/switchboard-notch.zip -R "$REPO" --clobber else gh release create "v$VERSION" dist/switchboard-notch.zip -R "$REPO" --title "Switchboard Notch $VERSION" \ - --notes "Try for one session: \`claude --plugin-url https://github.com/$REPO/releases/download/v$VERSION/switchboard-notch.zip\` + --notes "Try for one session: \`claude --plugin-url https://github.com/$REPO/releases/latest/download/switchboard-notch.zip\` Keep it, in Claude Code: \`/plugin install switchboard-notch --marketplace $REPO\`" fi