@yottagraph-app/aether-instructions 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,163 @@
1
+ # Deploy MCP Server
2
+
3
+ Deploy a custom MCP server from the `mcp-servers/` directory to Google Cloud Run via the Broadchurch Portal.
4
+
5
+ ## Overview
6
+
7
+ This command deploys a Python MCP server (typically built with FastMCP) by triggering a GitHub Actions workflow through the Portal API. No local GCP credentials are needed -- the workflow authenticates via Workload Identity Federation, builds a container with Cloud Build, and deploys to Cloud Run.
8
+
9
+ The server must live in `mcp-servers/<name>/` with at minimum `server.py` and `requirements.txt`. A `Dockerfile` is auto-generated if not provided.
10
+
11
+ **Prerequisite:** The project must have a valid `broadchurch.yaml` (created during provisioning).
12
+
13
+ ---
14
+
15
+ ## Step 1: Read Configuration
16
+
17
+ Read `broadchurch.yaml` from the project root.
18
+
19
+ ```bash
20
+ cat broadchurch.yaml
21
+ ```
22
+
23
+ **If the file does not exist:**
24
+
25
+ > This project hasn't been provisioned yet. Create it in the Broadchurch Portal first.
26
+
27
+ Stop here.
28
+
29
+ Extract these values:
30
+
31
+ - `tenant.org_id` (tenant org ID)
32
+ - `gateway.url` (Portal Gateway URL)
33
+
34
+ ---
35
+
36
+ ## Step 2: Discover MCP Servers
37
+
38
+ List the directories under `mcp-servers/`:
39
+
40
+ ```bash
41
+ ls -d mcp-servers/*/
42
+ ```
43
+
44
+ **If no directories exist:**
45
+
46
+ > No MCP servers found. Create one by making a directory under `mcp-servers/` with:
47
+ >
48
+ > ```
49
+ > mcp-servers/my-server/
50
+ > ├── server.py # FastMCP server definition
51
+ > └── requirements.txt # Must include 'fastmcp'
52
+ > ```
53
+
54
+ Stop here.
55
+
56
+ **If multiple servers exist:** Ask which one to deploy.
57
+
58
+ **If only one exists:** Confirm with the user.
59
+
60
+ ---
61
+
62
+ ## Step 3: Validate Server Structure
63
+
64
+ Verify required files:
65
+
66
+ ```bash
67
+ ls mcp-servers/<name>/server.py mcp-servers/<name>/requirements.txt
68
+ ```
69
+
70
+ **If missing:** Tell the user what's needed.
71
+
72
+ ---
73
+
74
+ ## Step 4: Ensure Code is Pushed
75
+
76
+ The deployment workflow runs on the code in the GitHub repo. Make sure the server code is committed and pushed:
77
+
78
+ ```bash
79
+ git status
80
+ ```
81
+
82
+ **If there are uncommitted changes in `mcp-servers/<name>/`:**
83
+
84
+ > Your server code has local changes that aren't pushed yet. The deployment will use the version on GitHub. Would you like me to commit and push first?
85
+
86
+ If yes, commit and push. If no, warn them and continue.
87
+
88
+ ---
89
+
90
+ ## Step 5: Trigger Deployment
91
+
92
+ Call the Portal API to trigger the deploy workflow:
93
+
94
+ ```bash
95
+ curl -sf -X POST "<GATEWAY_URL>/api/projects/<ORG_ID>/deploy" \
96
+ -H "Content-Type: application/json" \
97
+ -d '{"type": "mcp", "name": "<SERVER_NAME>"}'
98
+ ```
99
+
100
+ **If this fails with 404:** The server directory may not exist on GitHub yet. Push your code first.
101
+
102
+ **If this succeeds:** The Portal has triggered the `deploy-mcp.yml` GitHub Actions workflow.
103
+
104
+ ---
105
+
106
+ ## Step 6: Monitor Progress
107
+
108
+ > Deployment triggered! The MCP server is being deployed via GitHub Actions.
109
+ >
110
+ > - **Server:** <name>
111
+ > - **Workflow:** deploy-mcp.yml
112
+ >
113
+ > This typically takes 2-5 minutes (container build + Cloud Run deploy).
114
+ > You can monitor progress:
115
+ >
116
+ > - In the Broadchurch Portal under your project's Deployment Status section
117
+ > - On GitHub: `https://github.com/<REPO>/actions`
118
+ >
119
+ > Once complete, the Cloud Run service URL will be available.
120
+
121
+ ---
122
+
123
+ ## Step 7: Register in Cursor MCP Config
124
+
125
+ After deployment completes, add the new server to `.cursor/mcp.json` so Cursor can connect to it through the Portal Gateway proxy.
126
+
127
+ Read `.cursor/mcp.json`, then add a new entry for the server:
128
+
129
+ ```json
130
+ {
131
+ "<SERVER_NAME>": {
132
+ "url": "<GATEWAY_URL>/api/mcp/<ORG_ID>/<SERVER_NAME>/mcp"
133
+ }
134
+ }
135
+ ```
136
+
137
+ Where `<SERVER_NAME>`, `<GATEWAY_URL>`, and `<ORG_ID>` are the values from Steps 1-2.
138
+
139
+ Write the updated JSON back to `.cursor/mcp.json`.
140
+
141
+ > The MCP server is now registered. Cursor will connect to it through the Portal Gateway proxy — no credentials needed.
142
+ >
143
+ > You may need to reload Cursor (Cmd+Shift+P → "Developer: Reload Window") for the new MCP server to appear in your tool list.
144
+
145
+ ---
146
+
147
+ ## Troubleshooting
148
+
149
+ ### Build fails
150
+
151
+ Check the GitHub Actions logs for the `Deploy MCP Server` workflow. Common issues:
152
+
153
+ - **"requirements.txt" errors**: Make sure `fastmcp` and all dependencies are listed.
154
+ - **Dockerfile issues**: If you have a custom Dockerfile, ensure it exposes port 8080.
155
+ - **WIF auth failure**: The Broadchurch admin needs to run the WIF setup script.
156
+
157
+ ### "Permission denied" when agents call the server
158
+
159
+ The Cloud Run service is deployed with `--no-allow-unauthenticated`. Only the tenant's service account can invoke it. The deployment workflow grants this automatically.
160
+
161
+ ### Need to update an existing server
162
+
163
+ Just run `/deploy_mcp` again. It will rebuild and redeploy to the same Cloud Run service.
@@ -0,0 +1,123 @@
1
+ # Update Branding
2
+
3
+ Refresh the Lovelace Brand R2 files from the canonical source repository.
4
+
5
+ ## Overview
6
+
7
+ Aether's branding files are wholesale copies from the `moongoose/ui/news-ui` directory of the Lovelace repo. This command copies the latest versions and checks for new dependencies.
8
+
9
+ **Do not hardcode any local paths.** Always ask the user for the Lovelace repo location.
10
+
11
+ ---
12
+
13
+ ## Step 1: Ask for the Lovelace Repo Path
14
+
15
+ ```
16
+ AskQuestion({
17
+ title: "Lovelace Repository Path",
18
+ questions: [
19
+ {
20
+ id: "repo-path",
21
+ prompt: "Where is your local clone of the Lovelace repository?",
22
+ options: [
23
+ { id: "home-lovelace", label: "~/lovelace" },
24
+ { id: "custom", label: "Other location (I'll specify)" }
25
+ ]
26
+ }
27
+ ]
28
+ })
29
+ ```
30
+
31
+ If the user selects "Other location", ask them to provide the full path.
32
+
33
+ Expand `~` to the user's home directory. Store the result as `{repo}`.
34
+
35
+ ---
36
+
37
+ ## Step 2: Validate the Source Path
38
+
39
+ Confirm the branding source directory exists:
40
+
41
+ ```bash
42
+ ls {repo}/moongoose/ui/news-ui/BRANDING.md
43
+ ```
44
+
45
+ **If the file does not exist:** Tell the user the path doesn't contain the expected branding files and ask them to double-check. Stop.
46
+
47
+ Also verify the other expected source files exist:
48
+
49
+ ```bash
50
+ ls {repo}/moongoose/ui/news-ui/composables/useNewsTheme.ts
51
+ ls {repo}/moongoose/ui/news-ui/composables/useThemeClasses.ts
52
+ ls {repo}/moongoose/ui/news-ui/assets/theme-styles.css
53
+ ls {repo}/moongoose/ui/news-ui/assets/fonts.css
54
+ ls {repo}/moongoose/ui/news-ui/public/fonts/README.md
55
+ ls {repo}/moongoose/ui/news-ui/public/LL-logo-full-wht.svg
56
+ ```
57
+
58
+ Report any missing files. If critical files are missing (BRANDING.md, useNewsTheme.ts, theme-styles.css), stop. If optional files are missing (logo, fonts README), warn but continue.
59
+
60
+ ---
61
+
62
+ ## Step 3: Copy the Branding Files
63
+
64
+ The base source path is `{repo}/moongoose/ui/news-ui`.
65
+
66
+ Copy these files to their Aether destinations:
67
+
68
+ | Source (relative to base) | Destination (relative to Aether root) |
69
+ | -------------------------------- | ------------------------------------- |
70
+ | `BRANDING.md` | `branding/BRANDING.md` |
71
+ | `composables/useNewsTheme.ts` | `composables/useNewsTheme.ts` |
72
+ | `composables/useThemeClasses.ts` | `composables/useThemeClasses.ts` |
73
+ | `assets/theme-styles.css` | `assets/theme-styles.css` |
74
+ | `assets/fonts.css` | `assets/fonts.css` |
75
+ | `public/fonts/README.md` | `public/fonts/README.md` |
76
+ | `public/LL-logo-full-wht.svg` | `public/LL-logo-full-wht.svg` |
77
+
78
+ For `app.vue`, extract only the `<style>` block contents (not the `<style>` tags themselves) and write them to `assets/brand-globals.css`. Read the source `app.vue`, find the content between `<style>` and `</style>`, and overwrite `assets/brand-globals.css` with that content.
79
+
80
+ ---
81
+
82
+ ## Step 4: Dependency Audit
83
+
84
+ After copying, read through each copied file and check for new references that weren't present before:
85
+
86
+ 1. **TypeScript imports**: Check `useNewsTheme.ts` and `useThemeClasses.ts` for any new `import` statements referencing files that don't exist in Aether.
87
+
88
+ 2. **CSS references**: Check `theme-styles.css`, `fonts.css`, and `brand-globals.css` for:
89
+ - `url()` paths pointing to files not in `public/`
90
+ - `@import` statements referencing files not in `assets/`
91
+
92
+ 3. **Documentation references**: Check `BRANDING.md` for references to new files (logos, assets, CSS files) that should be copied.
93
+
94
+ **If new dependencies are found:**
95
+
96
+ - Static assets (images, SVGs, fonts) -> copy to `public/` in the equivalent subdirectory
97
+ - CSS files -> copy to `assets/`
98
+ - TypeScript/JS files -> copy to `composables/` or the equivalent directory
99
+ - Report what was copied to the user
100
+
101
+ ---
102
+
103
+ ## Step 5: Verify Integration
104
+
105
+ Check that the adapter (`composables/useCustomTheme.ts`) is still compatible:
106
+
107
+ 1. Read `composables/useNewsTheme.ts` and check what it exports.
108
+ 2. Read `composables/useCustomTheme.ts` and confirm it re-exports the expected interface.
109
+ 3. If `useNewsTheme.ts` has added new named exports that aren't re-exported by the adapter, tell the user:
110
+
111
+ > `useNewsTheme.ts` has new exports that aren't exposed through `useCustomTheme.ts`: [list them]. You may want to add these to the adapter if components need them.
112
+
113
+ 4. Check that `nuxt.config.ts` still includes the three CSS files:
114
+
115
+ ```typescript
116
+ css: ['~/assets/fonts.css', '~/assets/brand-globals.css', '~/assets/theme-styles.css'],
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Step 6: Commit
122
+
123
+ Follow the `git-support.mdc` workflow to commit the change.
@@ -0,0 +1,183 @@
1
+ # Update Aether Instructions
2
+
3
+ Update Cursor rules, commands, and skills from the `@yottagraph-app/aether-instructions` npm package.
4
+
5
+ ## Overview
6
+
7
+ This command downloads the latest version of the Aether instructions package and extracts it to your `.cursor/` directory. All package files are prefixed with `aether_` to distinguish them from your own custom files.
8
+
9
+ **What happens:**
10
+ 1. Downloads the latest `@yottagraph-app/aether-instructions` package
11
+ 2. Deletes all existing `aether_*` files in `.cursor/rules/` and `.cursor/commands/`
12
+ 3. Deletes all existing `aether_*/` directories in `.cursor/skills/`
13
+ 4. Extracts fresh files from the package
14
+ 5. Commits the changes
15
+
16
+ **Your files are safe:** Only files with the `aether_` prefix are touched. Your custom rules, commands, and skills (without the prefix) are never modified.
17
+
18
+ ---
19
+
20
+ ## Step 1: Check Current Version
21
+
22
+ Read the current installed version:
23
+
24
+ ```bash
25
+ cat .cursor/.aether-instructions-version 2>/dev/null || echo "Not installed"
26
+ ```
27
+
28
+ Report to user:
29
+ > Current version: X.Y.Z (or "Not installed")
30
+
31
+ ---
32
+
33
+ ## Step 2: Check Latest Version
34
+
35
+ Query npm for the latest version:
36
+
37
+ ```bash
38
+ npm view @yottagraph-app/aether-instructions version
39
+ ```
40
+
41
+ Compare with current:
42
+ - If same version: Ask user if they want to reinstall anyway
43
+ - If newer version: Proceed with update
44
+ - If current is newer: Warn user (they may have a pre-release)
45
+
46
+ ---
47
+
48
+ ## Step 3: Download Package
49
+
50
+ Create a temporary directory and download the package:
51
+
52
+ ```bash
53
+ TEMP_DIR=$(mktemp -d)
54
+ npm pack @yottagraph-app/aether-instructions@latest --pack-destination "$TEMP_DIR"
55
+ ```
56
+
57
+ Extract the tarball:
58
+
59
+ ```bash
60
+ tar -xzf "$TEMP_DIR"/*.tgz -C "$TEMP_DIR"
61
+ ```
62
+
63
+ The extracted content is in `$TEMP_DIR/package/`.
64
+
65
+ ---
66
+
67
+ ## Step 4: Delete Existing aether_* Files
68
+
69
+ Remove all `aether_*` files from `.cursor/rules/` and `.cursor/commands/`:
70
+
71
+ ```bash
72
+ rm -f .cursor/rules/aether_*.mdc
73
+ rm -f .cursor/commands/aether_*.md
74
+ ```
75
+
76
+ Remove all `aether_*/` directories from `.cursor/skills/`:
77
+
78
+ ```bash
79
+ rm -rf .cursor/skills/aether_*/
80
+ ```
81
+
82
+ ---
83
+
84
+ ## Step 5: Copy New Files
85
+
86
+ Create directories if needed:
87
+
88
+ ```bash
89
+ mkdir -p .cursor/rules .cursor/commands .cursor/skills
90
+ ```
91
+
92
+ Copy files from the extracted package:
93
+
94
+ ```bash
95
+ cp "$TEMP_DIR/package/rules/"* .cursor/rules/ 2>/dev/null || true
96
+ cp "$TEMP_DIR/package/commands/"* .cursor/commands/ 2>/dev/null || true
97
+ cp -r "$TEMP_DIR/package/skills/"* .cursor/skills/ 2>/dev/null || true
98
+ ```
99
+
100
+ ---
101
+
102
+ ## Step 6: Update Version Marker
103
+
104
+ Read the new version from the package:
105
+
106
+ ```bash
107
+ grep '"version"' "$TEMP_DIR/package/package.json"
108
+ ```
109
+
110
+ Write the version marker:
111
+
112
+ ```bash
113
+ echo "X.Y.Z" > .cursor/.aether-instructions-version
114
+ ```
115
+
116
+ ---
117
+
118
+ ## Step 7: Cleanup
119
+
120
+ Remove the temporary directory:
121
+
122
+ ```bash
123
+ rm -rf "$TEMP_DIR"
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Step 8: Report Changes
129
+
130
+ Count what was installed:
131
+
132
+ ```bash
133
+ echo "=== Installed ==="
134
+ ls .cursor/rules/aether_*.mdc 2>/dev/null | wc -l
135
+ ls .cursor/commands/aether_*.md 2>/dev/null | wc -l
136
+ ls -d .cursor/skills/aether_*/ 2>/dev/null | wc -l
137
+ ```
138
+
139
+ Report to user:
140
+ > Updated to @yottagraph-app/aether-instructions@X.Y.Z
141
+ > - Rules: N files
142
+ > - Commands: N files
143
+ > - Skills: N directories
144
+
145
+ ---
146
+
147
+ ## Step 9: Commit Changes
148
+
149
+ Commit the updated instruction files:
150
+
151
+ ```bash
152
+ git add .cursor/rules/aether_* .cursor/commands/aether_* .cursor/skills/aether_* .cursor/.aether-instructions-version
153
+ git commit -m "Update Aether instructions to vX.Y.Z"
154
+ ```
155
+
156
+ > Changes committed. Your Aether instructions are now up to date.
157
+
158
+ ---
159
+
160
+ ## Troubleshooting
161
+
162
+ ### npm pack fails
163
+
164
+ If `npm pack` fails with a registry error:
165
+ > Make sure you have network access to npmjs.com. If you're behind a proxy, configure npm: `npm config set proxy <url>`
166
+
167
+ ### Permission denied
168
+
169
+ If you get permission errors:
170
+ > Try running with appropriate permissions, or check that `.cursor/` is writable.
171
+
172
+ ### Want to customize a rule/command?
173
+
174
+ If you need to modify one of the `aether_*` files:
175
+ 1. Copy it to a new name without the `aether_` prefix
176
+ 2. Make your changes to the copy
177
+ 3. Your copy won't be affected by future updates
178
+
179
+ Example:
180
+ ```bash
181
+ cp .cursor/rules/aether_api.mdc .cursor/rules/api_custom.mdc
182
+ # Edit api_custom.mdc as needed
183
+ ```