@hailer/mcp 2.0.0-beta.10 → 2.0.0-beta.12
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.
|
@@ -48,6 +48,10 @@ Replace `src/App.tsx` and add components (load `hailer-app-builder` + `hailer-de
|
|
|
48
48
|
- `hailer.activity.list(workflowId, phaseId, options)` — one call per phase, in parallel with `Promise.all`
|
|
49
49
|
- `hailer.ui.activity.open(id)` / `hailer.ui.activity.create(workflowId)` for the sidebar/create form
|
|
50
50
|
- Apps must render outside Hailer too — empty state, never an error
|
|
51
|
+
|
|
52
|
+
**Two scaffold facts that save a rabbit hole every build:**
|
|
53
|
+
1. **The scaffold ships with ONE known `tsc` error** — `src/hailer/use-app.ts` types `StoreSet` `replace?: boolean`; it must be `replace?: false`. Fix that one line as your very first edit and tsc is clean. (Upstream create-app bug; not your code.)
|
|
54
|
+
2. **Verify with `npm run build-production`, NOT `tsc` / `npm run build`.** `build-production` is vite-only — it's the exact command the publish runs. `npm run build` and `npx tsc --noEmit` run `tsc`, which trips on the scaffold error above and sends you chasing a problem the publish never sees. Verify the way you ship.
|
|
51
55
|
</build>
|
|
52
56
|
|
|
53
57
|
<dev-publish>
|
|
@@ -105,19 +109,31 @@ If a publish reports success but the app still serves the old/localhost version,
|
|
|
105
109
|
<prod-publish>
|
|
106
110
|
## Step 5 — Production Publish (only when the user explicitly asks)
|
|
107
111
|
|
|
112
|
+
**FIRST, decide first-publish vs update by READING `public/manifest.json` — never guess, never fail-first.** The scaffold ships a placeholder `appId` of `65143728d2bd678b13daf289` (the "Magic Apps" demo). That value, or empty/missing, means this app has never been published:
|
|
113
|
+
|
|
114
|
+
| manifest `appId` | This is a… | Command |
|
|
115
|
+
|---|---|---|
|
|
116
|
+
| `65143728d2bd678b13daf289`, `""`, or missing | **FIRST publish** | `--create --app-name "<Name>" --workspace <wsId> --force` (all three required with `--create`) |
|
|
117
|
+
| a real 24-char id you created earlier | **update** | `--force` only |
|
|
118
|
+
|
|
119
|
+
A plain publish against the scaffold's placeholder appId silently uploads to the demo app (wrong) or errors — so on a fresh scaffold, ALWAYS take the `--create` path on the very first publish. Get `<wsId>` from `config.json` (`workspaceId`); derive `<Name>` from the project (e.g. "Upcoming Matches") or ask.
|
|
120
|
+
|
|
108
121
|
```bash
|
|
109
|
-
#
|
|
122
|
+
# FIRST publish (fresh scaffold) — local machine
|
|
110
123
|
npm run publish-production -- --create --app-name "<App Name>" --workspace <workspaceId> --force
|
|
111
124
|
|
|
112
|
-
# Hailer Studio (cluster
|
|
125
|
+
# FIRST publish — Hailer Studio (cluster, cannot reach api.hailer.com)
|
|
113
126
|
npm run publish-production -- --host http://hailer-api:1337 --create --app-name "<App Name>" --workspace <workspaceId> --force
|
|
127
|
+
|
|
128
|
+
# UPDATE (manifest already has a real appId)
|
|
129
|
+
npm run publish-production -- --force
|
|
114
130
|
```
|
|
115
131
|
|
|
116
132
|
**PUBLISH FAILURE PLAYBOOK — exact error → exact action, no improvising:**
|
|
117
133
|
| Failure | Meaning | Action |
|
|
118
134
|
|---|---|---|
|
|
119
135
|
| exit 10, usage printed | no auth | start `npx hailer-mcp` once (mints the key), or `-- --user-api-key <key>` |
|
|
120
|
-
| exit 2, "app was not found using <identity>" | manifest appId doesn't belong to this user/workspace | re-run with `--create --app-name "<Name>" --workspace <wsId> --force`. **NEVER "register the app first" via workspace/apps.ts** — that creates a registry entry with a URL you'd have to invent (placeholder URLs break the app: Hailer fetches `<url>/manifest.json` → "manifest missing"). `--create` makes the entry AND sets the real CDN URL |
|
|
136
|
+
| exit 2, "app was not found using <identity>" | manifest appId doesn't belong to this user/workspace (first publish, or a wrong appId) | re-run with **all three flags together — `--create` REQUIRES `--app-name "<Name>"` AND `--workspace <wsId>`** (`--create` alone, or with just `--force`, fails): `npm run publish-production -- --create --app-name "<Name>" --workspace <wsId> --force`. **NEVER "register the app first" via workspace/apps.ts** — that creates a registry entry with a URL you'd have to invent (placeholder URLs break the app: Hailer fetches `<url>/manifest.json` → "manifest missing"). `--create` makes the entry AND sets the real CDN URL |
|
|
121
137
|
| exit 8 | login failed | the key/credentials are bad — re-mint or ask the user |
|
|
122
138
|
| hangs at "Overwrite the app? (Y/n)" | missing `--force` | always pass it |
|
|
123
139
|
|