@hailer/mcp 2.0.0-beta.4 → 2.0.0-beta.7
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.
|
@@ -111,6 +111,10 @@ npm run publish-production -- --create --app-name "<App Name>" --workspace <work
|
|
|
111
111
|
npm run publish-production -- --host http://hailer-api:1337 --create --app-name "<App Name>" --workspace <workspaceId> --force
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
+
**FIRST-PUBLISH GOTCHA — the `--create` bundle embeds a stale manifest. Do these two things:**
|
|
115
|
+
1. **Before publishing, fix `public/manifest.json`**: the scaffold leaves a placeholder `author` (e.g. "Magic Apps Ltd.") and `description`. Set the real values now — the agent controls these.
|
|
116
|
+
2. **After the `--create` publish, republish once** (plain `npm run publish-production -- --force`). Reason: the script packs the tarball *before* `--create` learns the new `appId`, so the first uploaded bundle has the placeholder `appId` baked in. The second publish embeds the correct one (the manifest now holds the real `appId`). This is a known app-sdk ordering bug — the double-publish is the workaround, not optional.
|
|
117
|
+
|
|
114
118
|
**What the CLI itself does** (`@hailer/app-sdk` publish.cjs): `--create` makes the app entry (`v3.app.create`) and writes the `appId` to the manifest; the bundle is packed (`package/` prefix) and POSTed to `/app/publish`; the server hosts it at `https://apps.hailer.com/{workspaceId}/{appId}/`.
|
|
115
119
|
|
|
116
120
|
**What the CLI does NOT do:** icon, name/description updates, workspace sharing. Finish those after publishing: share with `manage_app({ action: 'add_member', appId, member: 'network_<wsId>' })`, and set an icon with `manage_app({ action: 'update', appId, image: <fileId> })` if wanted (icon files MUST be uploaded `isPublic: true`, PNG/JPEG only).
|
|
@@ -12,6 +12,24 @@ triggers:
|
|
|
12
12
|
|
|
13
13
|
Patterns and templates for building Hailer apps with @hailer/app-sdk.
|
|
14
14
|
|
|
15
|
+
<build-philosophy>
|
|
16
|
+
## How to Build Fast: Correct Data First, Theme Does the Looks
|
|
17
|
+
|
|
18
|
+
The goal of the first version is **showing the correct data the user asked for** — not a custom-designed UI. Get the data right; the user iterates on looks afterward. Two rules make apps both fast and good:
|
|
19
|
+
|
|
20
|
+
1. **Spend your effort on the data layer, because that's what's easy to get wrong.** Read the real field/phase/workflow IDs from `workspace/enums.ts` + `fields.ts` (never guess, never use labels as keys), fetch with the SDK, and read field values by ID. A dashboard that shows the *wrong* numbers beautifully is a failure; correct numbers in plain components is a success.
|
|
21
|
+
|
|
22
|
+
2. **Do NOT hand-design UI or build a component library — the scaffold already installed the Hailer theme.** `main.tsx` wires `<ChakraProvider theme={hailerTheme}>`, so **every stock Chakra component is already on Hailer brand** (Nunito Sans, the full Hailer palette, light/dark via system) and there are **214 ready icons** in `src/hailer/theme/icons/`. Compose the UI from plain Chakra primitives — they look right for free:
|
|
23
|
+
- Layout: `Box`, `Flex`, `Grid`, `SimpleGrid`, `Stack`, `Container`
|
|
24
|
+
- Data: `Stat`/`StatLabel`/`StatNumber`/`StatHelpText` (stat cards), `Table`/`Thead`/`Tbody`/`Tr`/`Td`, `Card`/`CardHeader`/`CardBody`
|
|
25
|
+
- Text/state: `Heading`, `Text`, `Badge`, `Tag`, `Spinner`, `Skeleton`, `Alert`
|
|
26
|
+
- Import icons like `import { HailerSearch } from './hailer/theme/icons/HailerSearch'`
|
|
27
|
+
|
|
28
|
+
Don't write custom CSS, custom color values, or bespoke styled components on the first pass. Reach for a Chakra component; it's already themed. The user refines the look later — your job is correct data in a clean themed shell.
|
|
29
|
+
|
|
30
|
+
3. **Always handle the three states** — loading (`Spinner`/`Skeleton`), empty (a `Text`, never a crash), and outside-Hailer (the app must render standalone — never block on `inside`). Real data is async; assume it's missing first.
|
|
31
|
+
</build-philosophy>
|
|
32
|
+
|
|
15
33
|
<critical-rules>
|
|
16
34
|
## CRITICAL: Scaffolding and Data Sources
|
|
17
35
|
|
package/CLAUDE.md
CHANGED
|
@@ -142,4 +142,6 @@ Load in sub-agents via the Skill tool. Never in main context.
|
|
|
142
142
|
|
|
143
143
|
**Essential:** `/save`, `/handoff`, `/prd`, `/autoplan`, `/ws-pull`
|
|
144
144
|
|
|
145
|
-
**Squads** (drive the native Workflow tool): `/
|
|
145
|
+
**Squads** (drive the native Workflow tool): `/review-squad [target]`, `/debug-squad "<bug>"`
|
|
146
|
+
|
|
147
|
+
Build apps with a single agent + the `hailer-app-builder` / `create-and-publish-app` skills — faster than fanning out a squad (no shared-contract prep, no cross-agent integration fixups).
|
package/package.json
CHANGED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Build a Hailer app with hyper-parallel component teams
|
|
3
|
-
argument-hint: "app description"
|
|
4
|
-
allowed-tools: Workflow, Bash, Read, Skill, Agent
|
|
5
|
-
---
|
|
6
|
-
# App Squad
|
|
7
|
-
|
|
8
|
-
Hyper-parallel app build: the orchestrator does ALL prep, then a Workflow fans out one agent per component with everything pre-loaded. Component agents do ZERO discovery — they just write code.
|
|
9
|
-
|
|
10
|
-
**Goal:** $ARGUMENTS
|
|
11
|
-
|
|
12
|
-
## Step 1: Prep (you, before the Workflow)
|
|
13
|
-
|
|
14
|
-
- **Schema**: read `workspace/enums.ts` + relevant `workspace/<Name>_<id>/fields.ts`/`phases.ts` via a fast sub-agent (never in main context). Only if there's no `workspace/` dir, fall back to MCP `describe_workflows` (+ `include: ["schema","phases"]`).
|
|
15
|
-
- **Scaffold**: `npx @hailer/create-app` — NEVER copy an existing app. (Apps are script-only — no MCP scaffold tool exists.)
|
|
16
|
-
- **Read the scaffold SDK**: `src/hailer/use-app.ts` (store API), `src/main.tsx` (providers), `ls src/hailer/theme/icons/`. Read one working app from `apps/` for live SDK patterns.
|
|
17
|
-
- **Skills**: load `hailer-app-builder` + `hailer-design-system` once; their content goes into the contract.
|
|
18
|
-
|
|
19
|
-
## Step 2: Shared contract
|
|
20
|
-
|
|
21
|
-
One document every agent receives verbatim: all workflow/field/phase IDs; the actual use-app.ts store shape and fetch patterns; helper functions; the component manifest (name, file path, props, renders what); exact import paths incl. icons; the working-app SDK patterns (**apps must render outside Hailer — never block on `inside`**); both skills' content.
|
|
22
|
-
|
|
23
|
-
## Step 3: Workflow fan-out
|
|
24
|
-
|
|
25
|
-
Author a Workflow script (this command is your opt-in to call the Workflow tool): `parallel()` over the component manifest — Shell (App.tsx: nav, state, fetching), Overview (dashboard), List (table: filters, sorting), Detail (modal), plus one per extra workflow. Each agent gets the full contract + its mission and returns ONLY complete TypeScript/React code as its final text.
|
|
26
|
-
|
|
27
|
-
## Step 4: Assemble + verify (you)
|
|
28
|
-
|
|
29
|
-
Write each component to its file, delete scaffold demo components, fix import/prop mismatches, then `npx tsc --noEmit` and `npx vite build`. Under ~5 errors: fix directly; structural failures: re-spawn that one agent with the error and contract.
|
|
30
|
-
|
|
31
|
-
Report: path, component count, build/TS status, next steps (`cd apps/<name> && npm run dev`, test in the Hailer iframe).
|
|
32
|
-
|
|
33
|
-
## Rules
|
|
34
|
-
|
|
35
|
-
- NEVER copy existing apps — scaffold fresh
|
|
36
|
-
- Agents never load skills or read files — you pre-load and paste
|
|
37
|
-
- Include ACTUAL SDK code in the contract, not summaries
|