@apex-inc/mcp-server 0.25.0 → 0.26.0
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/dist/tools.d.ts +55 -3
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +64 -6
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
- package/skills/apex-adoption/SKILL.md +2 -0
- package/skills/apex-communications/SKILL.md +10 -0
- package/skills/apex-experimentation/SKILL.md +1 -1
- package/skills/apex-growth-tracking/SKILL.md +9 -9
- package/skills/apex-integration-cookbook/SKILL.md +7 -6
package/package.json
CHANGED
|
@@ -17,6 +17,8 @@ The Adoption Engine tracks whether each end-user has adopted each feature, nudge
|
|
|
17
17
|
- **Celebration** (fires once on adoption): congratulates the user the moment they *do* reach the milestone, and tells them what's next. Scaffold both legs in one call with `compose_adoption_milestone` + `scaffold: "both"` (this mirrors the dashboard sentence on-ramp).
|
|
18
18
|
- Milestones can be given a sequence **order** (which one accounts reach first). Ordering the full set unlocks the account-view "Path" funnel (a step-by-step drop-off chart). Unordered milestones are treated as independent (order-agnostic coverage).
|
|
19
19
|
|
|
20
|
+
Name live hosts (`list_workspace_environments` / `set_workspace_environments` or Foundations) before you trust Production adoption numbers. Unmatched hosts stay Unclassified.
|
|
21
|
+
|
|
20
22
|
## When to Activate
|
|
21
23
|
|
|
22
24
|
- "Nudge users who signed up but never ran their first report."
|
|
@@ -7,6 +7,8 @@ description: Help users set up and manage lifecycle communications through Apex
|
|
|
7
7
|
|
|
8
8
|
Use these tools to help users build a communication program that sends the right message at the right time — without building email infrastructure from scratch.
|
|
9
9
|
|
|
10
|
+
One communication object. `audience_bucket` on create/edit is who gets it (`production` default, or `beta` / `dev`). Never All. Never Unclassified. Same email on TestFlight and the store is two contacts — a live send uses the live row only. Do not create a staging copy.
|
|
11
|
+
|
|
10
12
|
## When to Activate
|
|
11
13
|
|
|
12
14
|
- User asks about setting up emails, notifications, or onboarding messages
|
|
@@ -180,6 +182,14 @@ Cart-recovery is a Journey (multi-step sequence with a wait) — not a single co
|
|
|
180
182
|
|
|
181
183
|
The key is that the **journey** owns the wait, the branching on cart state, and the exit semantics. The **communications** are just the payloads the journey fires.
|
|
182
184
|
|
|
185
|
+
## Writing copy
|
|
186
|
+
|
|
187
|
+
When you draft or edit a letter:
|
|
188
|
+
|
|
189
|
+
- Use contractions (we'll, it's, don't). People talk that way.
|
|
190
|
+
- If the letter has pictures of variants, put them right after the title. Do not bury them under a wall of copy.
|
|
191
|
+
- Write what the recipient needs: their experiment, their metric, their workspace. Do not write how the composer or a block works. The button label is enough.
|
|
192
|
+
|
|
183
193
|
## Theme vs Template
|
|
184
194
|
|
|
185
195
|
**Template** is the job: event, attributes, slots, copy. Activate from the library. There is no extra theme step.
|
|
@@ -72,7 +72,7 @@ Interactive flows: MCP prompts `new-experiment` and `experiment-review` orchestr
|
|
|
72
72
|
- **Screenshots are first-class.** For public web URLs, `create_experiment` auto-captures control + variant screenshots and shows them on the dashboard experiment card + detail gallery. For localhost / auth-gated / mobile screens, capture the image yourself and call `attach_experiment_asset({ experimentId, variantKey, imageBase64 })`.
|
|
73
73
|
- **Mobile/Capacitor experiments capture on-device.** When the experiment runs on an authed in-app screen (servers can't reach it), tell the dev to call `Apex.captureVariantScreenshot({ experimentId, variantKey })` on the variant's screen, keyed to the resolved variant in a `useEffect`, in a debug build (`Apex.initialize({ ..., debug: true })`). It no-ops in production and lands the shot on the dashboard card + gallery like web/agent captures.
|
|
74
74
|
- **Exposure auto-fires.** When a variant resolves via `useApexVariant` (web) or `Apex.getVariant()` (mobile), the SDK fires the canonical `experiment_exposure` event — the denominator for results. You don't fire it manually.
|
|
75
|
-
- **Don't launch a dead experiment.** `activate_experiment` is gated on `verify_experiment_wiring`. Code-wired (SDK-hook) web experiments are safe to activate before their code ships: the server holds them in `pending_deployment` ("Waiting on deploy")
|
|
75
|
+
- **Don't launch a dead experiment.** `activate_experiment` is gated on `verify_experiment_wiring`. Code-wired (SDK-hook) web experiments are safe to activate before their code ships: the server holds them in `pending_deployment` ("Waiting on deploy"). The 14-day clock starts at the first **live customer** exposure — not merge, not activate, not TestFlight. Testers can still get an arm while waiting. Assign with no Origin is Unclassified (no enrollment). Backend assign must send `environment` or `x-apex-web-environment`. Non-SDK experiments with unwired arms are refused (pass `force: true` to override). Run `verify_experiment_wiring({ experimentId })` after the deploy lands to confirm both arms are live.
|
|
76
76
|
|
|
77
77
|
### Journey-arm experiments (any surface)
|
|
78
78
|
|
|
@@ -133,18 +133,18 @@ curl "https://app.apex.inc/api/v1/people/$(printf %s 'user@example.com' | jq -rR
|
|
|
133
133
|
|
|
134
134
|
## Environment separation — same key everywhere
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
Use the **same `workspaceKey`** in Xcode, TestFlight, and the store. The phone files the build. Do not guess `staging.` / `qa.` / `dev.` hosts and do not set `environment` from `NODE_ENV`.
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
Four buckets:
|
|
139
139
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
140
|
+
- **Production** — hosts the merchant named live, plus App Store / Play production.
|
|
141
|
+
- **Beta** — TestFlight, Play closed tracks, vendor preview hosts Apex can prove, plus hosts they named as Beta.
|
|
142
|
+
- **Dev** — Xcode Run, Gradle DEBUG, sideloaded, localhost.
|
|
143
|
+
- **Unclassified** — we could not prove a bucket. This is never Production.
|
|
144
|
+
|
|
145
|
+
Every environment bills. Client-sent `environment` is dashboard slicing, never money truth. Do not create a second workspace. Name live hosts with `list_workspace_environments` / `set_workspace_environments` (or Foundations) before you trust the Production slice. Unmatched merchant hosts stay Unclassified. To clear the Unclassified Notice, name the host — do not add a second key and do not set `environment: production` on a server purchase to "fix" dollars. See `/docs/mobile/test-vs-production`.
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
Server events may send `environment` / `release_channel`. Missing stays Unclassified. Required for honesty, not required to ingest.
|
|
148
148
|
|
|
149
149
|
## Data Sources & unified analytics
|
|
150
150
|
|
|
@@ -221,16 +221,17 @@ Use Gradle `buildConfigField` to inject the channel per build variant so the val
|
|
|
221
221
|
|
|
222
222
|
### Billing implications
|
|
223
223
|
|
|
224
|
-
|
|
225
|
-
- **Beta** (TestFlight, Play internal/closed): always **free**.
|
|
226
|
-
- **Production** (App Store, Play production): **billable**.
|
|
227
|
-
- **Unknown** (older SDK without detection): billable, but the dashboard surfaces a fix-it nudge with an SDK upgrade prompt.
|
|
224
|
+
Every environment bills — Dev, Beta, Production, and Unclassified. The monthly-reset free tier is the relief valve, not an environment exemption. `testMode` is a dry-run flag, not a free TestFlight bucket.
|
|
228
225
|
|
|
229
|
-
|
|
226
|
+
Naming a site reclassifies events from that hostname immediately. Stored identity is not rewritten. Do not set `environment: production` to "fix" Unclassified money.
|
|
227
|
+
|
|
228
|
+
### Name live sites before you trust Production
|
|
229
|
+
|
|
230
|
+
Call `list_workspace_environments` (it also returns `unclassified_hosts_seen`) then `set_workspace_environments` with `production_hosts` and optional `beta_hosts`. Apex will not guess `staging.`. Naming reclassifies events from those sites at read time. Stripe / server purchase recipes must not set `environment: production` to "fix" Unclassified money.
|
|
230
231
|
|
|
231
232
|
### When NOT to recommend a separate workspace
|
|
232
233
|
|
|
233
|
-
Some MMP vendors require two workspace keys (sandbox + live). Apex does not. If a merchant asks "should I use a different workspace for beta?" or "do I need a sandbox key?", the answer is **no**: point to `/docs/mobile/test-vs-production` and walk them through
|
|
234
|
+
Some MMP vendors require two workspace keys (sandbox + live). Apex does not. If a merchant asks "should I use a different workspace for beta?" or "do I need a sandbox key?", the answer is **no**: point to `/docs/mobile/test-vs-production` and walk them through Foundations → Tell Apex which hosts are live.
|
|
234
235
|
|
|
235
236
|
## Related
|
|
236
237
|
|