@se-studio/contentful-cms 3.16.11 → 3.16.13
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 +12 -0
- package/dist/commands/diagnose.js +2 -2
- package/dist/commands/diagnose.js.map +1 -1
- package/dist/contentful/cma-user-agent.d.ts +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/hosted/next/routes/mcp.js +9 -5
- package/dist/hosted/next/routes/mcp.js.map +1 -1
- package/dist/hosted/oauth/auth.d.ts +1 -0
- package/dist/hosted/oauth/auth.d.ts.map +1 -1
- package/dist/hosted/oauth/auth.js +3 -2
- package/dist/hosted/oauth/auth.js.map +1 -1
- package/dist/hosted/oauth/cached-cma.d.ts +1 -1
- package/dist/hosted/oauth/cached-cma.d.ts.map +1 -1
- package/dist/hosted/oauth/cached-cma.js +1 -1
- package/dist/hosted/oauth/cached-cma.js.map +1 -1
- package/dist/hosted/oauth/client-name.d.ts +4 -0
- package/dist/hosted/oauth/client-name.d.ts.map +1 -0
- package/dist/hosted/oauth/client-name.js +12 -0
- package/dist/hosted/oauth/client-name.js.map +1 -0
- package/dist/hosted/oauth/complete.d.ts +3 -1
- package/dist/hosted/oauth/complete.d.ts.map +1 -1
- package/dist/hosted/oauth/complete.js +5 -1
- package/dist/hosted/oauth/complete.js.map +1 -1
- package/dist/hosted/oauth/handlers.d.ts.map +1 -1
- package/dist/hosted/oauth/handlers.js +27 -10
- package/dist/hosted/oauth/handlers.js.map +1 -1
- package/dist/hosted/oauth/jwt.d.ts +3 -1
- package/dist/hosted/oauth/jwt.d.ts.map +1 -1
- package/dist/hosted/oauth/jwt.js +6 -3
- package/dist/hosted/oauth/jwt.js.map +1 -1
- package/dist/hosted/oauth/refresh.d.ts +3 -1
- package/dist/hosted/oauth/refresh.d.ts.map +1 -1
- package/dist/hosted/oauth/refresh.js +5 -1
- package/dist/hosted/oauth/refresh.js.map +1 -1
- package/dist/mcp/http-handler.d.ts.map +1 -1
- package/dist/mcp/http-handler.js +2 -1
- package/dist/mcp/http-handler.js.map +1 -1
- package/dist/runtime/context.d.ts +4 -0
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/context.js.map +1 -1
- package/dist/session/file-session-store.d.ts +1 -0
- package/dist/session/file-session-store.d.ts.map +1 -1
- package/dist/session/file-session-store.js +1 -0
- package/dist/session/file-session-store.js.map +1 -1
- package/dist/session/redis-session-store.d.ts +3 -1
- package/dist/session/redis-session-store.d.ts.map +1 -1
- package/dist/session/redis-session-store.js +16 -1
- package/dist/session/redis-session-store.js.map +1 -1
- package/dist/session/session-store.d.ts +3 -0
- package/dist/session/session-store.d.ts.map +1 -1
- package/dist/session/session-store.js +6 -0
- package/dist/session/session-store.js.map +1 -1
- package/dist/session/store.js +4 -3
- package/dist/session/store.js.map +1 -1
- package/dist/telemetry/enrich.d.ts.map +1 -1
- package/dist/telemetry/enrich.js +11 -1
- package/dist/telemetry/enrich.js.map +1 -1
- package/dist/telemetry/identity.d.ts +22 -0
- package/dist/telemetry/identity.d.ts.map +1 -0
- package/dist/telemetry/identity.js +48 -0
- package/dist/telemetry/identity.js.map +1 -0
- package/dist/telemetry/index.d.ts +2 -1
- package/dist/telemetry/index.d.ts.map +1 -1
- package/dist/telemetry/index.js +2 -1
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/record.d.ts +5 -2
- package/dist/telemetry/record.d.ts.map +1 -1
- package/dist/telemetry/record.js +8 -3
- package/dist/telemetry/record.js.map +1 -1
- package/dist/telemetry/types.d.ts +11 -2
- package/dist/telemetry/types.d.ts.map +1 -1
- package/docs/FUNCTIONAL_SPEC.md +1 -1
- package/docs/TELEMETRY_AXIOM.md +29 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/telemetry/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.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CAAC;IACpC,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB"}
|
package/docs/FUNCTIONAL_SPEC.md
CHANGED
|
@@ -292,7 +292,7 @@ When `devBaseUrl` is configured, `preview url` and `preview showcase` build URLs
|
|
|
292
292
|
|
|
293
293
|
## 13. Telemetry
|
|
294
294
|
|
|
295
|
-
Opt in with `CMS_EDIT_TELEMETRY=1` (opt out with `0`). The tool emits telemetry events recording the command name, outcome (`success`, `error`, or `exit`), duration, package version, and deployment `project_key`.
|
|
295
|
+
Opt in with `CMS_EDIT_TELEMETRY=1` (opt out with `0`). The tool emits telemetry events recording the command name, outcome (`success`, `error`, or `exit`), duration, package version, and deployment `project_key`. Hosted events also record the signed-in editor, space, and MCP client. Slugs, field values, entry IDs, query text, and error messages are not included.
|
|
296
296
|
|
|
297
297
|
- **Local CLI:** newline-delimited JSON at `~/.contentful-cms/telemetry.log`
|
|
298
298
|
- **Hosted (Vercel):** batched ingest to Axiom when `AXIOM_TOKEN` and `AXIOM_DATASET` are set
|
package/docs/TELEMETRY_AXIOM.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# cms-edit telemetry (Axiom)
|
|
2
2
|
|
|
3
|
-
Hosted cms-edit deployments can emit
|
|
3
|
+
Hosted cms-edit deployments can emit usage telemetry to [Axiom](https://axiom.co). Events name the command, outcome, duration, signed-in editor, site, and MCP client. They do not contain slugs, entry ids, field values, query text, tokens, or error message text.
|
|
4
4
|
|
|
5
5
|
## Enable on Vercel
|
|
6
6
|
|
|
@@ -32,7 +32,11 @@ Each event is one JSON object:
|
|
|
32
32
|
| `duration_ms` | Wall-clock duration |
|
|
33
33
|
| `cms_edit_version` | Package version |
|
|
34
34
|
| `mode` | `hosted-mcp` on Vercel, `cli` locally |
|
|
35
|
-
| `project_key` |
|
|
35
|
+
| `project_key` | Tenant key on a hosted request, otherwise `CMS_EDIT_PROJECT_KEY` |
|
|
36
|
+
| `user_id` | Contentful user id. Hosted only, when the request is signed in |
|
|
37
|
+
| `user_email` | Contentful account email. Hosted only |
|
|
38
|
+
| `space_id` | Contentful space id for that tenant |
|
|
39
|
+
| `client_name` | MCP client name (`Cursor`, `Claude`, `Grok`). Omitted until the access token is refreshed after this release |
|
|
36
40
|
| `node_version` | Node runtime |
|
|
37
41
|
| `platform` | `process.platform` |
|
|
38
42
|
|
|
@@ -44,7 +48,29 @@ OAuth events emit `command: oauth` with route-specific `subcommand` values:
|
|
|
44
48
|
| `authorization-code` | Initial MCP connect via `/oauth/token` (`authorization_code` grant) |
|
|
45
49
|
| `refresh-token` | Silent token refresh via `/oauth/token` (`refresh_token` grant) |
|
|
46
50
|
|
|
47
|
-
`error_name` uses stable reason codes only — never token values
|
|
51
|
+
`error_name` uses stable reason codes only — never token values or error message text. Examples: `invalid_contentful_token`, `space_access_denied`, `invalid_refresh_token`, `refresh_client_mismatch`, `invalid_authorization_code`.
|
|
52
|
+
|
|
53
|
+
OAuth `authorization-code` and `refresh-token` successes include the same editor, site, and client fields. Failures that happen before the editor is known stay anonymous.
|
|
54
|
+
|
|
55
|
+
The host `AXIOM_TOKEN` is an ingest token. Query these in the Axiom UI, or with a separate query token kept off Vercel.
|
|
56
|
+
|
|
57
|
+
**Editors by site (last 7 days):**
|
|
58
|
+
|
|
59
|
+
```apl
|
|
60
|
+
['cms-edit']
|
|
61
|
+
| where _time > ago(7d) and isnotempty(user_email)
|
|
62
|
+
| summarize commands = count(), last = max(_time) by user_email, project_key, client_name
|
|
63
|
+
| order by commands desc
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Commands per editor:**
|
|
67
|
+
|
|
68
|
+
```apl
|
|
69
|
+
['cms-edit']
|
|
70
|
+
| where _time > ago(7d) and isnotempty(user_email)
|
|
71
|
+
| summarize commands = count() by user_email, project_key, command, outcome
|
|
72
|
+
| order by commands desc
|
|
73
|
+
```
|
|
48
74
|
|
|
49
75
|
## Local development
|
|
50
76
|
|
package/package.json
CHANGED