@palettelab/cli 0.3.69 → 0.3.70
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 +2 -1
- package/backend-sdk/palette_sdk/__init__.py +1 -1
- package/backend-sdk/palette_sdk/data_rooms.py +12 -0
- package/backend-sdk/pyproject.toml +1 -1
- package/docs/python-backend-sdk.md +5 -0
- package/package.json +1 -1
- package/template-fallback/package.json +1 -1
- package/template-fallback/templates/consumer-app/package.json +1 -1
- package/template-fallback/templates/dashboard/package.json +1 -1
- package/template-fallback/templates/database/package.json +1 -1
- package/template-fallback/templates/external-service/package.json +1 -1
- package/template-fallback/templates/frontend-only/package.json +1 -1
- package/template-fallback/templates/next/package.json +1 -1
- package/template-fallback/templates/palette-app/package.json +1 -1
- package/template-fallback/templates/provider-app/package.json +1 -1
package/README.md
CHANGED
|
@@ -323,7 +323,7 @@ Backend SDK features for app-owned data:
|
|
|
323
323
|
- `ctx.redis` gives a Redis-backed, plugin/org-scoped Redis API when `"redis"` is declared in `platform_services`.
|
|
324
324
|
- `ctx.vector` gives a Qdrant-backed, plugin/org-scoped vector API when `"vector"` is declared in `platform_services`.
|
|
325
325
|
- `ctx.storage` gives app/org-scoped file upload helpers when `"storage"` is declared in `platform_services`.
|
|
326
|
-
- `ctx.llm` gives chat, streaming, embeddings and image generation on the PLATFORM's own provider keys when `"llm"` is declared — no `OPENAI_API_KEY` secret to ship or rotate. An app picks any model the workspace's own chat offers with `model=` — the latest Claude, GPT and Gemini models, premium ones included, no declaration — and nothing bypasses the workspace's SECURE policy. `fallback=False` runs exactly the requested model or raises `ModelUnavailable`; every reply reports the model that actually ran. Tool calls (`tools=`, `tool_calls`, `reply["message"]` for the history) are supported. Calls spend the workspace's credits under its plan, seat and member limits, and are refused (the billing `CreditError`) when the workspace could not start a chat turn either.
|
|
326
|
+
- `ctx.llm` gives chat, streaming, embeddings and image generation on the PLATFORM's own provider keys when `"llm"` is declared — no `OPENAI_API_KEY` secret to ship or rotate. An app picks any model the workspace's own chat offers with `model=` — Palette's own models and the latest Claude, GPT and Gemini models, premium ones included, no declaration — and nothing bypasses the workspace's SECURE policy. `fallback=False` runs exactly the requested model or raises `ModelUnavailable`; every reply reports the model that actually ran. Tool calls (`tools=`, `tool_calls`, `reply["message"]` for the history) are supported. Calls spend the workspace's credits under its plan, seat and member limits, and are refused (the billing `CreditError`) when the workspace could not start a chat turn either.
|
|
327
327
|
- `ctx.llm` also takes provider passthrough (`response_format`, `top_p`, `stop`, `seed`, …) as plain keywords, and reports `ctx.llm.catalog()` (models with limits and unavailable reasons), `ctx.llm.models()` and `ctx.llm.spend()` so an app can offer a real model picker and explain a refusal.
|
|
328
328
|
- `ctx.media` gives fal.ai on the PLATFORM's key when `"media"` is declared — no `FAL_KEY` secret to ship or rotate. `ctx.media.run(model, payload)` reaches ANY fal model with the payload passed through untouched (so a model fal shipped today needs no SDK release); `image`, `video`, `speech` and `transcribe` are the same call with a default model filled in, `submit`/`status`/`result`/`cancel` handle multi-minute renders through a durable handle (`MediaStillRunning.handle`), `upload` puts bytes, public URLs or the app's own `ctx.storage` files on fal's CDN, `catalog()` lists the fal models it can run, and `save` copies an output into the app's own storage — fal's URLs expire. It spends the workspace's credits like `ctx.llm`.
|
|
329
329
|
- `ctx.web` gives web search and an SSRF-guarded page reader (HTML tables and PDFs handled) when `"web"` is declared.
|
|
@@ -1058,6 +1058,7 @@ pltt models --json --env staging
|
|
|
1058
1058
|
```text
|
|
1059
1059
|
Workspace credits: 812.50 available (normal)
|
|
1060
1060
|
|
|
1061
|
+
ok palette-llm palette chat 4096 out tok, 4 img
|
|
1061
1062
|
ok gpt-6-astra openai chat 12000 out tok, 16 img
|
|
1062
1063
|
ok claude-haiku-5-5 anthropic chat 4096 out tok, 4 img
|
|
1063
1064
|
-- gemini-4-argon google chat 4096 out tok, 4 img (billing_disabled)
|
|
@@ -117,11 +117,23 @@ class DataRoomsClient:
|
|
|
117
117
|
*,
|
|
118
118
|
folder_id: int | None = None,
|
|
119
119
|
content_type: str | None = None,
|
|
120
|
+
public: bool = False,
|
|
120
121
|
) -> dict[str, Any]:
|
|
122
|
+
"""Store a file in a Drive room.
|
|
123
|
+
|
|
124
|
+
Private by default: only members of the room can read it. With
|
|
125
|
+
``public=True`` every member of the organisation can read it (for
|
|
126
|
+
example a teammate opening an attachment you uploaded), never anyone
|
|
127
|
+
outside the organisation.
|
|
128
|
+
"""
|
|
129
|
+
# Sent only when asked for: an older platform refuses the unknown
|
|
130
|
+
# argument instead of storing a file meant to be shared as private.
|
|
131
|
+
extra = {"public": True} if public else {}
|
|
121
132
|
return await self._require_service().upload_file(
|
|
122
133
|
room_id,
|
|
123
134
|
filename,
|
|
124
135
|
content,
|
|
125
136
|
folder_id=folder_id,
|
|
126
137
|
content_type=content_type,
|
|
138
|
+
**extra,
|
|
127
139
|
)
|
|
@@ -752,9 +752,14 @@ await ctx.data_rooms.upload_file(
|
|
|
752
752
|
content,
|
|
753
753
|
folder_id=None,
|
|
754
754
|
content_type=None,
|
|
755
|
+
public=False, # True: every member of the organisation can read it
|
|
755
756
|
)
|
|
756
757
|
```
|
|
757
758
|
|
|
759
|
+
Uploads are private to the room's members. With `public=True` every member of
|
|
760
|
+
the organisation can read the file (`read_file_bytes`, Drive download/preview),
|
|
761
|
+
whoever's room holds it; nobody outside the organisation can.
|
|
762
|
+
|
|
758
763
|
In local unit tests outside the Palette runtime, inject a fake Data Room service
|
|
759
764
|
if you need to test routes that call `ctx.data_rooms`. In hosted sandbox and
|
|
760
765
|
real OS runtime, the platform injects the real service.
|
package/package.json
CHANGED