@palettelab/cli 0.3.57 → 0.3.58
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/README.md +20 -1
- package/docs/python-backend-sdk.md +6 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,20 @@ Developer CLI for building plugins for the Palette platform. Works without any a
|
|
|
4
4
|
|
|
5
5
|
The installed executable is `pltt`.
|
|
6
6
|
|
|
7
|
+
## API Surface Split
|
|
8
|
+
|
|
9
|
+
Use the right helper for the runtime you are coding in:
|
|
10
|
+
|
|
11
|
+
| Runtime | Package/helper | Use it for |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| Frontend TypeScript/React | `@palettelab/sdk`, `createPaletteClient(...)`, `palette.*` | UI code, current-user OS APIs, frontend broker clients, Data Room browsing/upload from the browser, toasts, and current-user OS notifications |
|
|
14
|
+
| Backend Python/FastAPI | `palette_sdk`, `PluginContext`, `ctx.*`, `services(ctx)` | Backend routes, permission gates, app-owned data, migrations, cross-user notifications, server-side Data Rooms, managed services, app-to-app service handlers, and lifecycle hooks |
|
|
15
|
+
| CLI tooling | `pltt ...` | Scaffolding, local dev, testing, packaging, publishing, hosted sandbox previews, and generating frontend/backend typed service clients |
|
|
16
|
+
|
|
17
|
+
The CLI bundles `palette_sdk` for local backend simulation, but backend app
|
|
18
|
+
code should import `palette_sdk`, not `@palettelab/sdk`. Frontend app code
|
|
19
|
+
should import `@palettelab/sdk`, not `palette_sdk`.
|
|
20
|
+
|
|
7
21
|
## Requirements
|
|
8
22
|
|
|
9
23
|
- Node.js 18+
|
|
@@ -337,7 +351,12 @@ async def sync_invoices(ctx: PluginContext = Depends(get_plugin_context)):
|
|
|
337
351
|
|
|
338
352
|
Storage upload responses include both snake_case and camelCase aliases for object metadata (`object_path`/`objectPath`, `file_url`/`fileUrl`, `content_type`/`contentType`) so local simulator and hosted OS responses can be consumed with the same app code.
|
|
339
353
|
|
|
340
|
-
App storage is different from Data Room uploads.
|
|
354
|
+
App storage is different from Data Room uploads. Backend Python code uses
|
|
355
|
+
`ctx.storage`; frontend TypeScript code uses `palette.storage`. Both write
|
|
356
|
+
app-owned files directly to the OS-configured storage backend, currently GCS in
|
|
357
|
+
hosted environments. Use backend `ctx.data_rooms` or frontend
|
|
358
|
+
`palette.dataRooms` only when the file should be managed as a Data Room
|
|
359
|
+
document.
|
|
341
360
|
|
|
342
361
|
Python backend app-storage example:
|
|
343
362
|
|
|
@@ -881,7 +881,12 @@ Example mock:
|
|
|
881
881
|
}
|
|
882
882
|
```
|
|
883
883
|
|
|
884
|
-
App storage is separate from Data Rooms.
|
|
884
|
+
App storage is separate from Data Rooms. Backend Python code uses
|
|
885
|
+
`ctx.storage`; frontend TypeScript code uses `palette.storage`. Both write
|
|
886
|
+
app-owned files directly to the OS-configured storage backend, currently GCS in
|
|
887
|
+
hosted environments. Use backend `ctx.data_rooms` or frontend
|
|
888
|
+
`palette.dataRooms` only when the file should be visible and governed as a Data
|
|
889
|
+
Room document.
|
|
885
890
|
|
|
886
891
|
Palette scopes storage the same way. Files written through `ctx.storage` or the
|
|
887
892
|
frontend storage client live under:
|