@se-studio/skills 1.6.3 → 1.6.5

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
@@ -1,5 +1,17 @@
1
1
  # @se-studio/skills
2
2
 
3
+ ## 1.6.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 35c02f0: Keep hosted MCP auth alive across Grok refresh and host deploys: slide the Contentful token TTL to 30 days, refuse MCP token grants when the CMA cache is gone, and return `invalid_token` so clients re-run Contentful sign-in instead of looping on “Failed to get tools after auth”.
8
+
9
+ ## 1.6.4
10
+
11
+ ### Patch Changes
12
+
13
+ - 2c479e7: Wrap HtmlComponent customJs in an IIFE so `hcRoot` is per-instance. Two HtmlComponents with scripts on the same page no longer throw `Identifier 'hcRoot' has already been declared`.
14
+
3
15
  ## 1.6.3
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/skills",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "description": "SE Studio agent skills for marketing site development with Contentful CMS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -228,7 +228,7 @@ Never redeclare colours or typography in `customCss` — those already exist as
228
228
 
229
229
  ## Custom JavaScript (`customJs`)
230
230
 
231
- The renderer automatically injects a `hcRoot` variable pointing to this component's own `[data-hc-id]` element before your script runs. **Always use `hcRoot` as the root for DOM queries** — never `document.querySelector('[data-hc-id]')`, which matches the first component on the page, not this one.
231
+ The renderer injects `hcRoot` (this component's `[data-hc-id]` root) inside an IIFE so each instance has its own binding. Multiple HtmlComponents with `customJs` on one page are safe. **Always use `hcRoot` as the root for DOM queries** — never `document.querySelector('[data-hc-id]')`, which matches the first component on the page, not this one.
232
232
 
233
233
  ```js
234
234
  // ✓ Correct — hcRoot is scoped to this component automatically
@@ -246,6 +246,7 @@ var section = document.querySelector('[data-hc-id]');
246
246
  **Rules:**
247
247
  - Use `hcRoot.querySelector` / `hcRoot.querySelectorAll` for all DOM lookups.
248
248
  - Keep scripts small and self-contained — no module imports, no global state.
249
+ - Top-level `function` / `var` / `const` stay inside the IIFE. Do not call them from `rawHtml` (`onclick="setup()"`). Bind listeners on `hcRoot`. Assign `window.foo` only if another script must see the name.
249
250
  - Avoid `document.getElementById` unless the ID is guaranteed unique across the whole page.
250
251
  - Default `scriptStrategy` is `afterInteractive` — runs after page hydration. Use `lazyOnload` for non-critical third-party widgets.
251
252
 
@@ -86,6 +86,9 @@ Do **not** register a local `mcpServers.cms-edit` entry in Claude Desktop — us
86
86
  **OAuth / sign-in fails**
87
87
  → Confirm the user was invited to the Contentful space and is signing in with the correct account. In Grok, use `/mcps` → press `i` (not just toggle). Confirm config URL ends with `/api/mcp`.
88
88
 
89
+ **Grok: Failed to get tools after auth**
90
+ → MCP refresh succeeded but the host has no Contentful token for that space. Delete the server’s entry in `~/.grok/mcp_credentials.json`, then `/mcps` → `i` and complete Contentful sign-in. Current cms-edit refuses refresh without a CMA cache so this loop should stop after the host is bumped.
91
+
89
92
  **Grok browser flashes and closes**
90
93
  → Usually a redirect_uri mismatch before cms-edit v2.7.7+; upgrade the hosted deployment and retry OAuth.
91
94