backend-manager 5.7.0 → 5.7.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.
package/CHANGELOG.md CHANGED
@@ -14,6 +14,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
14
14
  - `Fixed` for any bug fixes.
15
15
  - `Security` in case of vulnerabilities.
16
16
 
17
+ # [5.7.1] - 2026-06-17
18
+
19
+ ### Added
20
+ - **MCP shorthand URL.** MCP endpoint now accessible at `/mcp` in addition to `/backend-manager/mcp`. Hosting rewrites updated; consumer projects pick up on next `npx mgr setup`.
21
+ - **`/register` hosting rewrite.** Dynamic client registration endpoint now included in the default hosting rewrite pattern.
22
+
17
23
  # [5.7.0] - 2026-06-17
18
24
 
19
25
  ### Added
package/PROGRESS.md CHANGED
@@ -2,13 +2,20 @@
2
2
  > Agents and maintainers should update this file regularly to reflect the current state of the project.
3
3
 
4
4
  ## 🎯 Current Focus
5
- * **Goal:** MCP role-based tool scoping + consumer extensibility
6
- * **Current Phase:** Complete all phases done, 44 tests passing, docs finalized
5
+ * **Goal:** Fix newsletter generation ReferenceError (beehiivConfig newsletterRoleConfig)
6
+ * **Current Phase:** Fix applied, pending deploy + Firestore sendAt reset
7
7
  * **Priority:** High
8
- * **Last Updated:** 2026-06-17 3:42 AM PDT
9
- * **Notes:** Ready to ship. Full OAuth flow verified in Claude Desktop. Role reassignment (16 admin / 2 user / 1 public), annotations, HTTPS serve, dynamic client registration all working.
8
+ * **Last Updated:** 2026-06-17 4:10 PM PDT
9
+ * **Notes:** v5.5.0 refactor missed renaming `beehiivConfig` at 3 sites in newsletter.js (lines 331, 336, 340). Fix applied to framework source. Consumer (somiibo-backend) needs deploy + Firestore `_recurring-newsletter.sendAt` advanced to 1782322200 (Jun 24 17:30 UTC). Separate issue: Beehiiv send API requires Enterprise plan — all generated newsletters fail at send step.
10
10
 
11
11
  ## 📌 Active Task List
12
+ * [ ] Phase 3: Newsletter generation fix (beehiivConfig ReferenceError)
13
+ * [x] Diagnose: traced prod logs + Firestore to find generation crashes after AI completes
14
+ * [x] Root cause: v5.5.0 missed renaming `beehiivConfig` → `newsletterRoleConfig` at lines 331/336/340
15
+ * [x] Fix applied to framework source (`src/manager/libraries/email/generators/newsletter.js`)
16
+ * [ ] Commit + publish framework fix
17
+ * [ ] Deploy consumer (somiibo-backend): `cd functions && npx mgr deploy`
18
+ * [ ] Advance stuck sendAt: `npx mgr firestore:set marketing-campaigns/_recurring-newsletter --merge --data '{"sendAt": 1782322200}'`
12
19
 
13
20
  ## ✅ Completed Task List
14
21
  * [x] Phase 1: MCP role-based tool scoping + consumer extensibility
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend-manager",
3
- "version": "5.7.0",
3
+ "version": "5.7.1",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -5,7 +5,7 @@ const _ = require('lodash');
5
5
  // The expected source pattern for bm_api hosting rewrite
6
6
  // Includes /backend-manager/* routes and root-level MCP OAuth paths
7
7
  // that Claude Chat sends directly (e.g. /authorize, /token, /.well-known/*)
8
- const BM_API_SOURCE = '{/backend-manager,/backend-manager/**,/.well-known/oauth-protected-resource,/.well-known/oauth-authorization-server,/authorize,/token}';
8
+ const BM_API_SOURCE = '{/backend-manager,/backend-manager/**,/mcp,/mcp/**,/.well-known/oauth-protected-resource,/.well-known/oauth-authorization-server,/authorize,/token,/register}';
9
9
 
10
10
  class HostingRewritesTest extends BaseTest {
11
11
  getName() {
@@ -1335,7 +1335,7 @@ function requireJSON5(file, throwError) {
1335
1335
  * @returns {string|null} - Normalized MCP route path, or null if not MCP
1336
1336
  */
1337
1337
  function resolveMcpRoutePath(routePath) {
1338
- // Direct MCP paths (via /backend-manager/mcp/*)
1338
+ // Direct MCP paths (via /mcp/* or /backend-manager/mcp/*)
1339
1339
  if (routePath === 'mcp' || routePath.startsWith('mcp/')) {
1340
1340
  return routePath;
1341
1341
  }
@@ -328,16 +328,16 @@ async function generate(Manager, assistant, settings, opts = {}) {
328
328
  // post-creation API requires Enterprise plan), but we ship it anyway
329
329
  // so the day we upgrade to Enterprise it Just Works. Failure is logged,
330
330
  // never thrown — the rest of the pipeline (GH archive, Firestore doc)
331
- // succeeds regardless. beehiivConfig was already resolved at the top
331
+ // succeeds regardless. newsletterRoleConfig was already resolved at the top
332
332
  // of the function for the initial enabled-check.
333
333
  let beehiivPostId = null;
334
334
  let beehiivFailureReason = null;
335
335
 
336
- if (host === 'github' && beehiivConfig?.enabled) {
336
+ if (host === 'github' && newsletterRoleConfig?.enabled) {
337
337
  try {
338
338
  const beehiivProvider = require('../providers/beehiiv.js');
339
339
  const result = await beehiivProvider.createPost({
340
- publicationId: beehiivConfig.publicationId, // explicit — avoids singleton-Manager dependency
340
+ publicationId: newsletterRoleConfig.publicationId, // explicit — avoids singleton-Manager dependency
341
341
  title: structure.subject,
342
342
  subject: structure.subject,
343
343
  preheader: structure.preheader,
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "rewrites": [
10
10
  {
11
- "source": "{/backend-manager,/backend-manager/**,/.well-known/oauth-protected-resource,/.well-known/oauth-authorization-server,/authorize,/token}",
11
+ "source": "{/backend-manager,/backend-manager/**,/mcp,/mcp/**,/.well-known/oauth-protected-resource,/.well-known/oauth-authorization-server,/authorize,/token,/register}",
12
12
  "function": "bm_api"
13
13
  }
14
14
  ]