@assembly-js/app-foundation 0.0.43 → 0.0.45

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/CLAUDE.md +14 -26
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -14,6 +14,12 @@ A foundation update reads the sections between an app's version and the target:
14
14
  from every bullet except `[guidance]`, agent work from the `fixes.json` entries those `[action]`
15
15
  bullets name. Write `[fix]`, `[behavior]` and `[action]` bullets for the app's owner.
16
16
 
17
+ ## 0.0.45
18
+ - [guidance] The generated SDK method tables no longer list the session and token methods the foundation calls itself, and the module notes name each module's SDK groups.
19
+
20
+ ## 0.0.43
21
+ - [guidance] The build agent's SDK method tables are now generated from the SDK instead of hand-written.
22
+
17
23
  ## 0.0.42
18
24
  - [action: package-proxy] Sign-in and cross-site request protection now come from the package instead of code the app owns, and are checked by sending real requests through the app.
19
25
 
package/CLAUDE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Assembly App Guide
2
2
 
3
- You are an expert frontend engineer building a custom app that runs **inside an Assembly portal as an iframe**. You create beautiful, performant, mobile-first applications that follow UI/UX and shadcn best practices and provide clear user feedback. **Design mobile-first: every component and layout must start from a single-column, narrow-viewport base (down to 320px) and scale up using `sm:`, `md:`, and `lg:` breakpoints.** This applies to grids, padding, typography, tabs, and any horizontal arrangement. If a task description gives you non-responsive CSS, adapt it to be mobile-first yourself. Read this whole file before writing any code — it contains the platform model, the data model, the SDK surface, and the iframe constraints. The information here is more current than your training data. **The SDK method tables below are generated from the SDK's type definitions; read `node_modules/@assembly-js/node-sdk/dist/codegen/api/services/<Resource>Service.d.ts` only for nested parameter shapes.**
3
+ You are an expert frontend engineer building a custom app that runs **inside an Assembly portal as an iframe**. You create beautiful, performant, mobile-first applications that follow UI/UX and shadcn best practices and provide clear user feedback. **Design mobile-first: every component and layout must start from a single-column, narrow-viewport base (down to 320px) and scale up using `sm:`, `md:`, and `lg:` breakpoints.** This applies to grids, padding, typography, tabs, and any horizontal arrangement. If a task description gives you non-responsive CSS, adapt it to be mobile-first yourself. Read this whole file before writing any code — it contains the platform model, the data model, the SDK surface, and the iframe constraints. The information here is more current than your training data. **The SDK method tables below are generated from the SDK's type definitions.**
4
4
 
5
5
  ## Communication rules
6
6
 
@@ -164,14 +164,14 @@ Before adding a feature, check whether Assembly already covers it. If it does, *
164
164
 
165
165
  **Optional modules (may or may not be installed in this workspace):** Messages, Files, Contracts, Forms, Billing, Knowledge Base, Tasks, and Notes. Before suggesting one or calling its SDK, confirm it is installed — call `listAppInstalls`. If it is installed, use it through the SDK; do not rebuild it. If it is not installed, do not suggest it, do not plan the app around it, and do not ask the user to install it.
166
166
 
167
- - **Messages** — Direct messaging between staff and clients.
168
- - **Files** — Secure file/folder sharing. *For app-private uploads (attachments, exports) use the storage helpers from `@assembly-js/app-foundation/server` (see the `assembly-storage` skill) instead — Files is only for files the user wants in the portal Files tab.*
169
- - **Contracts** — eSignature contracts.
170
- - **Forms** — Intake forms / surveys (6 question types).
171
- - **Billing** — Invoices, subscriptions, payments.
172
- - **Knowledge Base** — Help articles / docs.
173
- - **Tasks** — Assign tasks to clients/team.
174
- - **Notes** — Per-client/company internal notes.
167
+ - **Messages** — Direct messaging between staff and clients. SDK groups: Messages, MessageChannels.
168
+ - **Files** — Secure file/folder sharing. *For app-private uploads (attachments, exports) use the storage helpers from `@assembly-js/app-foundation/server` (see the `assembly-storage` skill) instead — Files is only for files the user wants in the portal Files tab.* SDK groups: Files, FileChannels.
169
+ - **Contracts** — eSignature contracts. SDK groups: Contracts, ContractTemplates.
170
+ - **Forms** — Intake forms / surveys (6 question types). SDK groups: Forms, FormResponses.
171
+ - **Billing** — Invoices, subscriptions, payments. SDK groups: Invoices, InvoiceTemplates, Subscriptions, SubscriptionTemplates, Products, Prices, Payments, Refunds.
172
+ - **Knowledge Base** — Help articles / docs (no SDK methods; render-only).
173
+ - **Tasks** — Assign tasks to clients/team. SDK groups: Tasks, TaskTemplates, Comments (task comments).
174
+ - **Notes** — Per-client/company internal notes. SDK groups: Notes.
175
175
 
176
176
  If the user's prompt says "build a CRM," the answer is mostly **wire up the existing Clients + Companies** (and any optional modules that are actually installed) **in a custom view** — not invent your own.
177
177
 
@@ -189,7 +189,7 @@ If the user's prompt says "build a CRM," the answer is mostly **wire up the exis
189
189
  **SDK methods** (every service, not only the resources above):
190
190
 
191
191
  <!-- generated: sdk-methods -->
192
- Generated from the SDK's service classes. Methods are called flat (`assembly.listClients(...)`); every method takes a single object of the named parameters (`?` = optional), and a service with no methods listed is not callable. Read the `.d.ts` only for nested parameter shapes. Named return types that could not be resolved to a `{ data, nextToken }` list envelope are shown by name and need a `.d.ts` lookup.
192
+ Generated from the SDK's service classes. Methods are called flat (`assembly.listClients(...)`); every method takes a single object of the named parameters (`?` = optional). Read the `.d.ts` only for nested parameter shapes. Named return types that could not be resolved to a `{ data, nextToken }` list envelope are shown by name and need a `.d.ts` lookup.
193
193
 
194
194
  **Clients**
195
195
 
@@ -395,12 +395,6 @@ Generated from the SDK's service classes. Methods are called flat (`assembly.lis
395
395
  | `listRefunds` | `invoiceId`, `limit?`, `nextToken?` | `{ data?: Array<refund_Refund>, nextToken }` |
396
396
  | `createRefund` | `requestBody` | `refund_Refund` |
397
397
 
398
- **Session**
399
-
400
- | Method | Parameters | Returns |
401
- |---|---|---|
402
- | `sessionExchange` | `requestBody` | `session_ExchangeResponse` |
403
-
404
398
  **SubscriptionTemplates**
405
399
 
406
400
  | Method | Parameters | Returns |
@@ -433,12 +427,6 @@ Generated from the SDK's service classes. Methods are called flat (`assembly.lis
433
427
  | `retrieveTask` | `id` | `marketplace_application_Task` |
434
428
  | `updateTask` | `id`, `requestBody` | `marketplace_application_Task` |
435
429
 
436
- **Token**
437
-
438
- | Method | Parameters | Returns |
439
- |---|---|---|
440
- | `offlineTokenIssue` | — | `offline_IssueResponse` |
441
-
442
430
  **Workspaces**
443
431
 
444
432
  | Method | Parameters | Returns |
@@ -1214,8 +1202,8 @@ Method naming convention from the OpenAPI codegen:
1214
1202
 
1215
1203
  Every method, its parameter names, and its return shape are in the generated tables under "The data model"; they come from the codegen types in `node_modules/@assembly-js/node-sdk/dist/codegen/api/`, so don't guess a method that isn't listed. Read the `.d.ts` only for nested parameter shapes. Two files, two jobs:
1216
1204
 
1217
- - **`index.d.ts` — the map.** Re-exports all 31 services and every model type, and gives the exact service filename. The names are not always the obvious singular/plural: the names are not always the obvious singular/plural (`FormResponsesService`, `TaskTemplatesService`, `SubscriptionTemplatesService`, `MeService`).
1218
- - **`services/<Resource>Service.d.ts` — the nested shapes.** Parameter object fields and model types live here; the tables above already give names and return shape.
1205
+ - **`index.d.ts` — the map.** Re-exports all 31 services and every model type, and gives the exact service filename. The names are not always the obvious singular/plural (`FormResponsesService`, `TaskTemplatesService`, `SubscriptionTemplatesService`, `MeService`).
1206
+ - **`services/<Resource>Service.d.ts` — the parameter fields.** Parameter object fields and model types live here; the tables above already give names and return shape.
1219
1207
 
1220
1208
  The client flattens every service onto one object, so a method declared in `TasksService.d.ts` is still called as `assembly.retrieveTasks(...)`.
1221
1209
 
@@ -1487,10 +1475,10 @@ Use `AssemblyBridge.header.*` for breadcrumbs, CTAs, and actions menu. See `.cla
1487
1475
 
1488
1476
  ## TL;DR
1489
1477
 
1490
- 1. **Read this whole file before writing any code.** Especially the data model, "What's already built in," and the SDK method index.
1478
+ 1. **Read this whole file before writing any code.** Especially the data model, "What's already built in," and the generated method tables.
1491
1479
  2. **The middleware exchanges `?token=` (first load) for a user-scoped bearer in an HttpOnly cookie; that bearer authenticates every call.** You never handle the token.
1492
1480
  3. **Call `getAssembly()` — no token argument, ever.** `getAssembly()` (RSC/server actions) and `getAssemblyForRequest(req)` (route handlers) read the bearer cookie. Identity via `getSessionIdentity()` / `useAssembly()`. Never read `searchParams.token`, thread a token, or set `x-assembly-token`.
1493
- 4. **The SDK is flat: `assembly.listClients(...)`, not `assembly.clients.list()`.** The generated method tables list every method; `services/<Resource>Service.d.ts` has the nested parameter shapes.
1481
+ 4. **The SDK is flat: `assembly.listClients(...)`, not `assembly.clients.list()`.** The generated method tables list every method;
1494
1482
  5. **The bearer expires in 60 min; `useServerAction`/`authFetch` re-exchange it silently and retry.** You don't refresh anything or touch `AssemblyBridge.sessionToken`.
1495
1483
  <!-- !feature:app-owned-header -->
1496
1484
  6. **Use `AssemblyBridge.header.*`** for breadcrumbs/CTAs in client components. Don't render your own. (Exception: the notification surface `/n` has no header — render CTAs as inline buttons there.)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assembly-js/app-foundation",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
4
4
  "description": "Versioned foundation helpers and build context for Assembly generated apps",
5
5
  "type": "module",
6
6
  "files": [