@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 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)
@@ -154,4 +154,4 @@ __all__ = [
154
154
  "LocalStorageService",
155
155
  ]
156
156
 
157
- __version__ = "0.1.18"
157
+ __version__ = "0.1.19"
@@ -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
  )
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "palette-sdk"
3
- version = "0.1.18"
3
+ version = "0.1.19"
4
4
  description = "Palette Platform SDK for building backend plugins"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@palettelab/cli",
3
- "version": "0.3.69",
3
+ "version": "0.3.70",
4
4
  "description": "Developer CLI for building Palette platform plugins — no platform source access required.",
5
5
  "bin": {
6
6
  "pltt": "bin/pltt.js"
@@ -4,7 +4,7 @@
4
4
  "private": true,
5
5
  "description": "A Palette platform plugin",
6
6
  "dependencies": {
7
- "@palettelab/sdk": "^0.1.35"
7
+ "@palettelab/sdk": "^0.1.36"
8
8
  },
9
9
  "devDependencies": {
10
10
  "typescript": "^5.0.0",
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@palettelab/sdk": "^0.1.35",
5
+ "@palettelab/sdk": "^0.1.36",
6
6
  "react": "^19.0.0",
7
7
  "react-dom": "^19.0.0"
8
8
  }
@@ -3,7 +3,7 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@palettelab/sdk": "^0.1.35",
6
+ "@palettelab/sdk": "^0.1.36",
7
7
  "react": "^19.0.0"
8
8
  }
9
9
  }
@@ -2,5 +2,5 @@
2
2
  "name": "my-db-plugin",
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
- "dependencies": { "@palettelab/sdk": "^0.1.35", "react": "^19.0.0" }
5
+ "dependencies": { "@palettelab/sdk": "^0.1.36", "react": "^19.0.0" }
6
6
  }
@@ -2,5 +2,5 @@
2
2
  "name": "my-external-svc",
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
- "dependencies": { "@palettelab/sdk": "^0.1.35", "react": "^19.0.0" }
5
+ "dependencies": { "@palettelab/sdk": "^0.1.36", "react": "^19.0.0" }
6
6
  }
@@ -3,7 +3,7 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@palettelab/sdk": "^0.1.35",
6
+ "@palettelab/sdk": "^0.1.36",
7
7
  "react": "^19.0.0"
8
8
  }
9
9
  }
@@ -3,7 +3,7 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@palettelab/sdk": "^0.1.35",
6
+ "@palettelab/sdk": "^0.1.36",
7
7
  "react": "^19.0.0"
8
8
  },
9
9
  "devDependencies": {
@@ -3,7 +3,7 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@palettelab/sdk": "^0.1.35",
6
+ "@palettelab/sdk": "^0.1.36",
7
7
  "react": "^19.0.0"
8
8
  },
9
9
  "devDependencies": {
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@palettelab/sdk": "^0.1.35",
5
+ "@palettelab/sdk": "^0.1.36",
6
6
  "react": "^19.0.0"
7
7
  }
8
8
  }