@assembly-js/app-foundation 0.0.8 → 0.0.9

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/CLAUDE.md CHANGED
@@ -25,6 +25,9 @@ Assembly-specific gotchas live in `.claude/skills/<name>/SKILL.md`. Invoke them
25
25
  - `assembly-companies` — many-to-many with clients; placeholder companies (excluded from `listCompanies` by default for these apps)
26
26
  - `assembly-clients-companies` — REQUIRED when the app stores or scopes data by client or company: scoped tables carry BOTH a `clientId` and a `companyId` column and are filtered on the intersection (never one dimension); a client viewer always has an active `companyId`; `companyIds[]` builds pickers only and `client.companyId` is deprecated
27
27
  - `assembly-custom-fields` — workspace-defined fields, multiSelect rules
28
+ <!-- feature:platform-mcp -->
29
+ - `assembly-platform-mcp` — provisioning workspace configuration at build time via the scoped `mcp__platform__` tools: create a custom field the app depends on instead of shipping an app that gates on missing workspace setup. Workspace configuration only — never client-facing data.
30
+ <!-- /feature:platform-mcp -->
28
31
  - `assembly-native-resources` — native message channels, forms, portal files/file channels: never hardcode their IDs, discover them at runtime
29
32
  - `assembly-mutations` — minimal `requestBody` rule for `update*` calls
30
33
  <!-- !feature:notification-settings -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assembly-js/app-foundation",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Versioned foundation helpers and build context for Assembly generated apps",
5
5
  "type": "module",
6
6
  "files": [
@@ -0,0 +1,23 @@
1
+ <!-- feature:platform-mcp -->
2
+ ---
3
+ name: assembly-platform-mcp
4
+ description: Use when the app you are building depends on workspace configuration that does not exist yet — most commonly a custom field on clients or companies (the user asked for "call clients at their phone number" and no Phone-type client field exists). You have a scoped platform MCP server (tool prefix mcp__platform__) for provisioning that configuration at build time instead of shipping an app that gates on missing workspace setup. Workspace configuration only — never client-facing data (no creating clients, sending messages, notifications, or invoices).
5
+ ---
6
+
7
+ ## Provisioning custom fields at build time
8
+
9
+ You have a scoped platform MCP server (tool prefix `mcp__platform__`). When the app you are building depends on a custom field the workspace does not have yet — the user asked for "call clients at their phone number" and no Phone-type client field exists — provision it yourself at build time instead of shipping an app that gates on missing workspace config:
10
+
11
+ ```
12
+ mcp__platform__custom_fields with action "list" — check what exists first
13
+ mcp__platform__custom_fields with action "create" — create the missing field
14
+ ```
15
+
16
+ Rules:
17
+
18
+ - **Check before creating** (`list`, match case-insensitively by name) — never create a duplicate of a field that already exists under a slightly different name.
19
+ - **Creating a field does not replace graceful handling.** The app's runtime code must still handle the field being absent or renamed later (discover by name, render a setup hint — see the assembly-custom-fields skill for the runtime contract) — you provision the field the app *starts* with; you don't get to assume it forever.
20
+ - **Never delete fields.** Deletion is not available to you by policy: fields carry data on real client records.
21
+ - **This tool is for workspace configuration only.** Do not reach for `mcp__platform__*` to create clients, send messages/notifications/invoices, or touch any client-facing data — those denials are enforced server-side and the attempt wastes a turn.
22
+ - Tell the user in chat, in product terms, when you create a field ("I added a Phone number field to your client records so the app can call them").
23
+ <!-- /feature:platform-mcp -->