@palettelab/cli 0.3.68 → 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 +23 -18
- package/backend-sdk/palette_sdk/__init__.py +3 -3
- package/backend-sdk/palette_sdk/agent_routes.py +43 -0
- package/backend-sdk/palette_sdk/connections_generated.py +302 -51
- package/backend-sdk/palette_sdk/data_rooms.py +12 -0
- package/backend-sdk/palette_sdk/manifest.py +2 -2
- package/backend-sdk/palette_sdk/permissions.py +1 -3
- package/backend-sdk/palette_sdk/platform_services.py +8 -5
- package/backend-sdk/palette_sdk/plugin_context.py +10 -12
- package/backend-sdk/pyproject.toml +1 -1
- package/docs/python-backend-sdk.md +17 -60
- package/lib/commands/models.js +12 -8
- package/lib/connection-catalog.json +2687 -622
- package/lib/dev-simulator.js +2 -83
- package/lib/manifest.js +3 -10
- package/package.json +1 -1
- package/template-fallback/backend/api/main.py +2 -2
- package/template-fallback/frontend/src/index.tsx +10 -21
- package/template-fallback/frontend/src/translations.ts +6 -12
- package/template-fallback/package.json +1 -1
- package/template-fallback/palette-plugin.json +1 -3
- package/template-fallback/templates/agent-tool/README.md +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/backend/api/main.py +2 -0
- 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/frontend-only/palette-plugin.json +1 -1
- package/template-fallback/templates/next/package.json +1 -1
- package/template-fallback/templates/palette-app/backend/api/main.py +1 -1
- package/template-fallback/templates/palette-app/package.json +1 -1
- package/template-fallback/templates/palette-app/palette-plugin.json +1 -1
- package/template-fallback/templates/provider-app/package.json +1 -1
- package/backend-sdk/palette_sdk/tasks.py +0 -117
|
@@ -37,6 +37,28 @@ class CalendarTools(_Namespace):
|
|
|
37
37
|
return await self._call("google", "calendar.list_events", {"calendar_id": calendar_id, "max_results": max_results, "query": query, "time_max": time_max, "time_min": time_min})
|
|
38
38
|
|
|
39
39
|
|
|
40
|
+
class ConfluenceTools(_Namespace):
|
|
41
|
+
async def create_page(self, *, title: str, content: str | None = None, parent_id: str | None = None, site: str | None = None, space_id: str | None = None, space_key: str | None = None) -> Any:
|
|
42
|
+
"""Create a published Confluence page in a space (by key or id) from plain text, optionally under a parent page."""
|
|
43
|
+
return await self._call("atlassian", "confluence.create_page", {"title": title, "content": content, "parent_id": parent_id, "site": site, "space_id": space_id, "space_key": space_key})
|
|
44
|
+
|
|
45
|
+
async def get_page(self, *, page_id: str, site: str | None = None) -> Any:
|
|
46
|
+
"""Read a Confluence page's title, version and plain-text body by page id."""
|
|
47
|
+
return await self._call("atlassian", "confluence.get_page", {"page_id": page_id, "site": site})
|
|
48
|
+
|
|
49
|
+
async def list_spaces(self, *, limit: int | None = None, site: str | None = None, space_key: str | None = None) -> Any:
|
|
50
|
+
"""List Confluence spaces (id, key, name), optionally one space by key."""
|
|
51
|
+
return await self._call("atlassian", "confluence.list_spaces", {"limit": limit, "site": site, "space_key": space_key})
|
|
52
|
+
|
|
53
|
+
async def search(self, *, cql: str | None = None, limit: int | None = None, query: str | None = None, site: str | None = None, space_key: str | None = None) -> Any:
|
|
54
|
+
"""Search Confluence pages by text (optionally within a space) or with a raw CQL query."""
|
|
55
|
+
return await self._call("atlassian", "confluence.search", {"cql": cql, "limit": limit, "query": query, "site": site, "space_key": space_key})
|
|
56
|
+
|
|
57
|
+
async def update_page(self, *, page_id: str, append: bool | None = None, content: str | None = None, site: str | None = None, title: str | None = None, version_message: str | None = None) -> Any:
|
|
58
|
+
"""Update a Confluence page's title and/or body (replace, or append paragraphs) as a new version."""
|
|
59
|
+
return await self._call("atlassian", "confluence.update_page", {"page_id": page_id, "append": append, "content": content, "site": site, "title": title, "version_message": version_message})
|
|
60
|
+
|
|
61
|
+
|
|
40
62
|
class ContactsTools(_Namespace):
|
|
41
63
|
async def list(self, *, max_results: int | None = None) -> Any:
|
|
42
64
|
"""List the connected account's Google Contacts (most recently modified first)."""
|
|
@@ -71,6 +93,24 @@ class DriveTools(_Namespace):
|
|
|
71
93
|
return await self._call("google", "drive.search", {"query": query, "max_results": max_results})
|
|
72
94
|
|
|
73
95
|
|
|
96
|
+
class FigmaTools(_Namespace):
|
|
97
|
+
async def describe_tool(self, *, name: str) -> Any:
|
|
98
|
+
"""Read one Figma tool's full instructions and argument schema before calling it; the write tools carry Figma's usage rules there."""
|
|
99
|
+
return await self._call("figma", "figma.describe_tool", {"name": name})
|
|
100
|
+
|
|
101
|
+
async def execute(self, *, name: str, arguments: dict[str, Any] | None = None) -> Any:
|
|
102
|
+
"""Call a Figma tool that changes Figma: use_figma (run Plugin API JavaScript in a Design, FigJam or Slides file and return what the script returns), create_new_file (planKey from whoami), generate_diagram (Mermaid to a FigJam diagram), upload_assets, add_code_connect_map. fileKey and nodeId come from a Figma link: figma.com/design/<fileKey>/<name>?node-id=12-34 means nodeId "12:34" (FigJam boards are figma.com/board/<fileKey>/…). Staged for approval; Figma applies the user's seat and edit rights."""
|
|
103
|
+
return await self._call("figma", "figma.execute", {"name": name, "arguments": arguments})
|
|
104
|
+
|
|
105
|
+
async def list_tools(self, *, limit: int | None = None, query: str | None = None) -> Any:
|
|
106
|
+
"""List the Figma tools this account can use, filtered by keyword; each row says read or write. Reads include get_design_context (a frame's layout, styles and code), get_metadata (layer outline), get_screenshot, get_variable_defs (design tokens), get_figjam, search_design_system, get_libraries and whoami; writes include use_figma (edit a file with Figma Plugin API JavaScript), create_new_file, generate_diagram (Mermaid to FigJam) and upload_assets."""
|
|
107
|
+
return await self._call("figma", "figma.list_tools", {"limit": limit, "query": query})
|
|
108
|
+
|
|
109
|
+
async def query(self, *, name: str, arguments: dict[str, Any] | None = None) -> Any:
|
|
110
|
+
"""Call a read-only Figma tool (get_design_context, get_metadata, get_screenshot, get_variable_defs, get_figjam, search_design_system, get_libraries, whoami …). fileKey and nodeId come from a Figma link: figma.com/design/<fileKey>/<name>?node-id=12-34 means nodeId "12:34" (FigJam boards are figma.com/board/<fileKey>/…). Results are text: an image such as a screenshot is listed under not_shown, not returned as pixels. Refuses tools that change Figma."""
|
|
111
|
+
return await self._call("figma", "figma.query", {"name": name, "arguments": arguments})
|
|
112
|
+
|
|
113
|
+
|
|
74
114
|
class FormsTools(_Namespace):
|
|
75
115
|
async def list_responses(self, *, form_id: str, max_results: int | None = None) -> Any:
|
|
76
116
|
"""List submitted responses to a Google Form, with answers keyed by question id."""
|
|
@@ -111,6 +151,56 @@ class GmailTools(_Namespace):
|
|
|
111
151
|
return await self._call("google", "gmail.update_draft", {"body": body, "draft_id": draft_id, "subject": subject, "to": to, "cc": cc, "thread_id": thread_id})
|
|
112
152
|
|
|
113
153
|
|
|
154
|
+
class JiraTools(_Namespace):
|
|
155
|
+
async def add_comment(self, *, body: str, issue_key: str, site: str | None = None) -> Any:
|
|
156
|
+
"""Add a plain-text comment to a Jira issue."""
|
|
157
|
+
return await self._call("atlassian", "jira.add_comment", {"body": body, "issue_key": issue_key, "site": site})
|
|
158
|
+
|
|
159
|
+
async def create_issue(self, *, project_key: str, summary: str, assignee_account_id: str | None = None, description: str | None = None, due_date: str | None = None, issue_type: str | None = None, labels: list[Any] | None = None, parent_key: str | None = None, priority: str | None = None, site: str | None = None) -> Any:
|
|
160
|
+
"""Create a Jira issue (Task by default) with optional description, assignee, due date, priority, labels and parent."""
|
|
161
|
+
return await self._call("atlassian", "jira.create_issue", {"project_key": project_key, "summary": summary, "assignee_account_id": assignee_account_id, "description": description, "due_date": due_date, "issue_type": issue_type, "labels": labels, "parent_key": parent_key, "priority": priority, "site": site})
|
|
162
|
+
|
|
163
|
+
async def get_issue(self, *, issue_key: str, comment_limit: int | None = None, include_comments: bool | None = None, site: str | None = None) -> Any:
|
|
164
|
+
"""Read one Jira issue: fields, plain-text description, parent/subtasks and recent comments."""
|
|
165
|
+
return await self._call("atlassian", "jira.get_issue", {"issue_key": issue_key, "comment_limit": comment_limit, "include_comments": include_comments, "site": site})
|
|
166
|
+
|
|
167
|
+
async def list_boards(self, *, limit: int | None = None, name: str | None = None, project_key: str | None = None, site: str | None = None) -> Any:
|
|
168
|
+
"""List Jira Software boards (scrum/kanban), optionally for one project."""
|
|
169
|
+
return await self._call("atlassian", "jira.list_boards", {"limit": limit, "name": name, "project_key": project_key, "site": site})
|
|
170
|
+
|
|
171
|
+
async def list_projects(self, *, limit: int | None = None, query: str | None = None, site: str | None = None) -> Any:
|
|
172
|
+
"""List Jira projects (key, name, type), optionally filtered by a name/key query."""
|
|
173
|
+
return await self._call("atlassian", "jira.list_projects", {"limit": limit, "query": query, "site": site})
|
|
174
|
+
|
|
175
|
+
async def list_sites(self, *, query: str | None = None) -> Any:
|
|
176
|
+
"""List the Atlassian sites (cloud ids and urls) this connection can reach."""
|
|
177
|
+
return await self._call("atlassian", "jira.list_sites", {"query": query})
|
|
178
|
+
|
|
179
|
+
async def list_sprints(self, *, board_id: int, limit: int | None = None, site: str | None = None, state: str | None = None) -> Any:
|
|
180
|
+
"""List a board's sprints (active and future by default) with dates and goals."""
|
|
181
|
+
return await self._call("atlassian", "jira.list_sprints", {"board_id": board_id, "limit": limit, "site": site, "state": state})
|
|
182
|
+
|
|
183
|
+
async def move_to_sprint(self, *, issue_keys: list[Any], sprint_id: int, site: str | None = None) -> Any:
|
|
184
|
+
"""Schedule issues into a sprint (moves up to 50 issue keys into the given sprint)."""
|
|
185
|
+
return await self._call("atlassian", "jira.move_to_sprint", {"issue_keys": issue_keys, "sprint_id": sprint_id, "site": site})
|
|
186
|
+
|
|
187
|
+
async def search_issues(self, *, jql: str, limit: int | None = None, next_page_token: str | None = None, site: str | None = None) -> Any:
|
|
188
|
+
"""Search Jira issues with JQL (e.g. 'assignee = currentUser() AND statusCategory != Done ORDER BY duedate', 'project = PROJ AND duedate <= endOfWeek()'). The JQL must contain a restriction (project, assignee, created >= -30d, …); ORDER BY alone is rejected. Returns key, summary, status, assignee, priority, due date and a next_page_token for more."""
|
|
189
|
+
return await self._call("atlassian", "jira.search_issues", {"jql": jql, "limit": limit, "next_page_token": next_page_token, "site": site})
|
|
190
|
+
|
|
191
|
+
async def search_users(self, *, query: str, limit: int | None = None, site: str | None = None) -> Any:
|
|
192
|
+
"""Find Jira users by name or email (prefix match, e.g. 'Han' or 'hanish@') to get the account id used for assignment."""
|
|
193
|
+
return await self._call("atlassian", "jira.search_users", {"query": query, "limit": limit, "site": site})
|
|
194
|
+
|
|
195
|
+
async def transition_issue(self, *, issue_key: str, transition: str, comment: str | None = None, site: str | None = None) -> Any:
|
|
196
|
+
"""Move a Jira issue through its workflow by transition or target status name (e.g. 'In Progress', 'Done'), with an optional comment."""
|
|
197
|
+
return await self._call("atlassian", "jira.transition_issue", {"issue_key": issue_key, "transition": transition, "comment": comment, "site": site})
|
|
198
|
+
|
|
199
|
+
async def update_issue(self, *, issue_key: str, assignee_account_id: str | None = None, description: str | None = None, due_date: str | None = None, labels: list[Any] | None = None, priority: str | None = None, site: str | None = None, summary: str | None = None) -> Any:
|
|
200
|
+
"""Update a Jira issue's summary, description, due date, priority, labels or assignee."""
|
|
201
|
+
return await self._call("atlassian", "jira.update_issue", {"issue_key": issue_key, "assignee_account_id": assignee_account_id, "description": description, "due_date": due_date, "labels": labels, "priority": priority, "site": site, "summary": summary})
|
|
202
|
+
|
|
203
|
+
|
|
114
204
|
class MetaTools(_Namespace):
|
|
115
205
|
async def create_page_post(self, *, message: str, page_id: str, link: str | None = None) -> Any:
|
|
116
206
|
"""Publish a text post (optionally with a link) to a Facebook Page the account manages."""
|
|
@@ -126,29 +216,61 @@ class MetaTools(_Namespace):
|
|
|
126
216
|
|
|
127
217
|
|
|
128
218
|
class NotionTools(_Namespace):
|
|
129
|
-
async def
|
|
130
|
-
"""
|
|
131
|
-
return await self._call("notion", "notion.
|
|
219
|
+
async def create_comment(self, *, page_id: str, discussion_id: str | None = None, markdown: str | None = None, reply_to_comment_id: str | None = None, rich_text: list[Any] | None = None, selection_with_ellipsis: str | None = None) -> Any:
|
|
220
|
+
"""Comment on a page, start a discussion on a text selection, or reply to a discussion or comment."""
|
|
221
|
+
return await self._call("notion", "notion.create_comment", {"page_id": page_id, "discussion_id": discussion_id, "markdown": markdown, "reply_to_comment_id": reply_to_comment_id, "rich_text": rich_text, "selection_with_ellipsis": selection_with_ellipsis})
|
|
222
|
+
|
|
223
|
+
async def create_database(self, *, database_type: str | None = None, description: str | None = None, parent: dict[str, Any] | None = None, schema: str | None = None, title: str | None = None) -> Any:
|
|
224
|
+
"""Create a database (under a page, or private) from a CREATE TABLE schema or a tasks/projects/skills preset; returns its collection:// data source."""
|
|
225
|
+
return await self._call("notion", "notion.create_database", {"database_type": database_type, "description": description, "parent": parent, "schema": schema, "title": title})
|
|
226
|
+
|
|
227
|
+
async def create_pages(self, *, pages: list[Any], creation_mode: str | None = None, parent: dict[str, Any] | None = None) -> Any:
|
|
228
|
+
"""Create up to 100 pages under a page, a database or a teamspace, or as private drafts. Content is Notion-flavored Markdown (spec: notion://docs/enhanced-markdown-spec); the title goes in properties."""
|
|
229
|
+
return await self._call("notion", "notion.create_pages", {"pages": pages, "creation_mode": creation_mode, "parent": parent})
|
|
230
|
+
|
|
231
|
+
async def duplicate_page(self, *, page_id: str) -> Any:
|
|
232
|
+
"""Duplicate a page next to the original; the copy fills in asynchronously on Notion's side."""
|
|
233
|
+
return await self._call("notion", "notion.duplicate_page", {"page_id": page_id})
|
|
234
|
+
|
|
235
|
+
async def fetch(self, *, id: str, include_discussions: bool | None = None, include_file_urls: bool | None = None, include_transcript: bool | None = None) -> Any:
|
|
236
|
+
"""Read a page, database, data source (collection://…) or saved view (view://…) as Notion-flavored Markdown; notion://docs/… ids return Notion's own docs, such as the Markdown spec."""
|
|
237
|
+
return await self._call("notion", "notion.fetch", {"id": id, "include_discussions": include_discussions, "include_file_urls": include_file_urls, "include_transcript": include_transcript})
|
|
238
|
+
|
|
239
|
+
async def get_comments(self, *, page_id: str, discussion_id: str | None = None, include_all_blocks: bool | None = None, include_resolved: bool | None = None) -> Any:
|
|
240
|
+
"""List a page's comment discussions (page-level by default; block-level with include_all_blocks), optionally including resolved threads."""
|
|
241
|
+
return await self._call("notion", "notion.get_comments", {"page_id": page_id, "discussion_id": discussion_id, "include_all_blocks": include_all_blocks, "include_resolved": include_resolved})
|
|
242
|
+
|
|
243
|
+
async def get_teams(self, *, query: str | None = None) -> Any:
|
|
244
|
+
"""List teamspaces with their ids and whether the connected user is a member (up to 10 of each)."""
|
|
245
|
+
return await self._call("notion", "notion.get_teams", {"query": query})
|
|
246
|
+
|
|
247
|
+
async def get_users(self, *, page_size: int | None = None, query: str | None = None, start_cursor: str | None = None, user_id: str | None = None) -> Any:
|
|
248
|
+
"""List or look up workspace members (id, name, email when visible); user_id 'self' is the connected user."""
|
|
249
|
+
return await self._call("notion", "notion.get_users", {"page_size": page_size, "query": query, "start_cursor": start_cursor, "user_id": user_id})
|
|
250
|
+
|
|
251
|
+
async def list_pages(self, *, cursor: str | None = None, limit: int | None = None, scope: str | None = None) -> Any:
|
|
252
|
+
"""List the connected user's pages by scope: recently visited, private, shared with them, or favourites; paginate with cursor."""
|
|
253
|
+
return await self._call("notion", "notion.list_pages", {"cursor": cursor, "limit": limit, "scope": scope})
|
|
132
254
|
|
|
133
|
-
async def
|
|
134
|
-
"""
|
|
135
|
-
return await self._call("notion", "notion.
|
|
255
|
+
async def move_pages(self, *, new_parent: dict[str, Any], page_or_database_ids: list[Any]) -> Any:
|
|
256
|
+
"""Move up to 100 pages or databases under a new parent page, database or data source."""
|
|
257
|
+
return await self._call("notion", "notion.move_pages", {"new_parent": new_parent, "page_or_database_ids": page_or_database_ids})
|
|
136
258
|
|
|
137
|
-
async def
|
|
138
|
-
"""
|
|
139
|
-
return await self._call("notion", "notion.
|
|
259
|
+
async def query_data_sources(self, *, data_source_url: str | None = None, data_source_urls: list[Any] | None = None, filter: dict[str, Any] | None = None, is_archived: bool | None = None, limit: int | None = None, mode: str | None = None, page_size: int | None = None, params: list[Any] | None = None, query: str | None = None, sort: list[Any] | None = None, start_cursor: str | None = None, view_url: str | None = None) -> Any:
|
|
260
|
+
"""Query a database's rows: read-only SQL (default), structured rows with filter and sort, or a saved view. notion.fetch the database first for its collection:// URLs and column names."""
|
|
261
|
+
return await self._call("notion", "notion.query_data_sources", {"data_source_url": data_source_url, "data_source_urls": data_source_urls, "filter": filter, "is_archived": is_archived, "limit": limit, "mode": mode, "page_size": page_size, "params": params, "query": query, "sort": sort, "start_cursor": start_cursor, "view_url": view_url})
|
|
140
262
|
|
|
141
|
-
async def
|
|
142
|
-
"""
|
|
143
|
-
return await self._call("notion", "notion.
|
|
263
|
+
async def search(self, *, query: str, data_source_url: str | None = None, filters: dict[str, Any] | None = None, page_size: int | None = None, page_url: str | None = None, query_type: str | None = None, sort: str | None = None, teamspace_id: str | None = None) -> Any:
|
|
264
|
+
"""Search the workspace by short keywords, or find people with query_type 'user'; read a hit with notion.fetch."""
|
|
265
|
+
return await self._call("notion", "notion.search", {"query": query, "data_source_url": data_source_url, "filters": filters, "page_size": page_size, "page_url": page_url, "query_type": query_type, "sort": sort, "teamspace_id": teamspace_id})
|
|
144
266
|
|
|
145
|
-
async def
|
|
146
|
-
"""
|
|
147
|
-
return await self._call("notion", "notion.
|
|
267
|
+
async def update_data_source(self, *, data_source_id: str, description: str | None = None, in_trash: bool | None = None, statements: str | None = None, title: str | None = None) -> Any:
|
|
268
|
+
"""Change a database data source: DDL statements for its columns, its title or description, or move it to the trash."""
|
|
269
|
+
return await self._call("notion", "notion.update_data_source", {"data_source_id": data_source_id, "description": description, "in_trash": in_trash, "statements": statements, "title": title})
|
|
148
270
|
|
|
149
|
-
async def update_page(self, *, page_id: str,
|
|
150
|
-
"""Update a
|
|
151
|
-
return await self._call("notion", "notion.update_page", {"page_id": page_id, "
|
|
271
|
+
async def update_page(self, *, command: str, page_id: str, allow_deleting_content: bool | None = None, content: str | None = None, content_updates: list[Any] | None = None, cover: str | None = None, icon: str | None = None, new_str: str | None = None, position: dict[str, Any] | None = None, properties: dict[str, Any] | None = None, template_id: str | None = None, verification_expiry_days: int | None = None, verification_status: str | None = None) -> Any:
|
|
272
|
+
"""Update a page's properties or content (search-and-replace, insert, or replace the whole page), apply a template or set verification; notion.fetch it first. Text is Notion-flavored Markdown (spec: notion://docs/enhanced-markdown-spec)."""
|
|
273
|
+
return await self._call("notion", "notion.update_page", {"command": command, "page_id": page_id, "allow_deleting_content": allow_deleting_content, "content": content, "content_updates": content_updates, "cover": cover, "icon": icon, "new_str": new_str, "position": position, "properties": properties, "template_id": template_id, "verification_expiry_days": verification_expiry_days, "verification_status": verification_status})
|
|
152
274
|
|
|
153
275
|
|
|
154
276
|
class SheetsTools(_Namespace):
|
|
@@ -166,29 +288,81 @@ class SheetsTools(_Namespace):
|
|
|
166
288
|
|
|
167
289
|
|
|
168
290
|
class SlackTools(_Namespace):
|
|
169
|
-
async def add_reaction(self, *,
|
|
170
|
-
"""Add an emoji reaction to a message
|
|
171
|
-
return await self._call("slack", "slack.add_reaction", {"
|
|
291
|
+
async def add_reaction(self, *, channel_id: str, emoji: str, message_ts: str) -> Any:
|
|
292
|
+
"""Add an emoji reaction to a message as the user."""
|
|
293
|
+
return await self._call("slack", "slack.add_reaction", {"channel_id": channel_id, "emoji": emoji, "message_ts": message_ts})
|
|
172
294
|
|
|
173
|
-
async def
|
|
174
|
-
"""
|
|
175
|
-
return await self._call("slack", "slack.
|
|
295
|
+
async def create_canvas(self, *, content: str, title: str) -> Any:
|
|
296
|
+
"""Create a canvas from Canvas-flavoured Markdown (not on free Slack plans); returns its link."""
|
|
297
|
+
return await self._call("slack", "slack.create_canvas", {"content": content, "title": title})
|
|
176
298
|
|
|
177
|
-
async def
|
|
178
|
-
"""
|
|
179
|
-
return await self._call("slack", "slack.
|
|
299
|
+
async def create_conversation(self, *, channel_name: str | None = None, is_private: bool | None = None, user_ids: list[Any] | None = None) -> Any:
|
|
300
|
+
"""Create a channel (channel_name), or open a DM (one user id) or group DM (2-8 user ids)."""
|
|
301
|
+
return await self._call("slack", "slack.create_conversation", {"channel_name": channel_name, "is_private": is_private, "user_ids": user_ids})
|
|
180
302
|
|
|
181
|
-
async def
|
|
182
|
-
"""
|
|
183
|
-
return await self._call("slack", "slack.
|
|
303
|
+
async def get_reactions(self, *, channel_id: str, message_ts: str) -> Any:
|
|
304
|
+
"""List the emoji reactions on a message and who added them."""
|
|
305
|
+
return await self._call("slack", "slack.get_reactions", {"channel_id": channel_id, "message_ts": message_ts})
|
|
184
306
|
|
|
185
|
-
async def
|
|
186
|
-
"""
|
|
187
|
-
return await self._call("slack", "slack.
|
|
307
|
+
async def list_channel_members(self, *, channel_id: str, cursor: str | None = None, include_bots: bool | None = None, include_deleted: bool | None = None, limit: int | None = None, response_format: str | None = None) -> Any:
|
|
308
|
+
"""List the members of a channel, private channel or group DM."""
|
|
309
|
+
return await self._call("slack", "slack.list_channel_members", {"channel_id": channel_id, "cursor": cursor, "include_bots": include_bots, "include_deleted": include_deleted, "limit": limit, "response_format": response_format})
|
|
188
310
|
|
|
189
|
-
async def
|
|
190
|
-
"""
|
|
191
|
-
return await self._call("slack", "slack.
|
|
311
|
+
async def read_canvas(self, *, canvas_id: str) -> Any:
|
|
312
|
+
"""Read a canvas as Markdown plus its section ids (needed for a targeted slack.update_canvas)."""
|
|
313
|
+
return await self._call("slack", "slack.read_canvas", {"canvas_id": canvas_id})
|
|
314
|
+
|
|
315
|
+
async def read_channel(self, *, channel_id: str, cursor: str | None = None, latest: str | None = None, limit: int | None = None, oldest: str | None = None, response_format: str | None = None) -> Any:
|
|
316
|
+
"""Read a conversation's messages, newest first (pass a user id as channel_id for the DM with them)."""
|
|
317
|
+
return await self._call("slack", "slack.read_channel", {"channel_id": channel_id, "cursor": cursor, "latest": latest, "limit": limit, "oldest": oldest, "response_format": response_format})
|
|
318
|
+
|
|
319
|
+
async def read_file(self, *, file_id: str) -> Any:
|
|
320
|
+
"""Read a shared file's content (text, or base64 for binary files)."""
|
|
321
|
+
return await self._call("slack", "slack.read_file", {"file_id": file_id})
|
|
322
|
+
|
|
323
|
+
async def read_thread(self, *, channel_id: str, message_ts: str, cursor: str | None = None, latest: str | None = None, limit: int | None = None, oldest: str | None = None, response_format: str | None = None) -> Any:
|
|
324
|
+
"""Read a thread: the parent message and all its replies."""
|
|
325
|
+
return await self._call("slack", "slack.read_thread", {"channel_id": channel_id, "message_ts": message_ts, "cursor": cursor, "latest": latest, "limit": limit, "oldest": oldest, "response_format": response_format})
|
|
326
|
+
|
|
327
|
+
async def read_user_profile(self, *, include_locale: bool | None = None, response_format: str | None = None, user_id: str | None = None) -> Any:
|
|
328
|
+
"""A member's profile: name, title, contact info, status, timezone; omit user_id for the connected user."""
|
|
329
|
+
return await self._call("slack", "slack.read_user_profile", {"include_locale": include_locale, "response_format": response_format, "user_id": user_id})
|
|
330
|
+
|
|
331
|
+
async def schedule_message(self, *, channel_id: str, message: str, post_at: int, reply_broadcast: bool | None = None, thread_ts: str | None = None) -> Any:
|
|
332
|
+
"""Schedule a message as the user for later delivery (2 minutes to 120 days ahead)."""
|
|
333
|
+
return await self._call("slack", "slack.schedule_message", {"channel_id": channel_id, "message": message, "post_at": post_at, "reply_broadcast": reply_broadcast, "thread_ts": thread_ts})
|
|
334
|
+
|
|
335
|
+
async def search_channels(self, *, query: str, channel_types: str | None = None, cursor: str | None = None, include_archived: bool | None = None, limit: int | None = None, response_format: str | None = None) -> Any:
|
|
336
|
+
"""Find channels by name or description; returns ids, names, topics, purposes and archive status."""
|
|
337
|
+
return await self._call("slack", "slack.search_channels", {"query": query, "channel_types": channel_types, "cursor": cursor, "include_archived": include_archived, "limit": limit, "response_format": response_format})
|
|
338
|
+
|
|
339
|
+
async def search_emojis(self, *, query: str) -> Any:
|
|
340
|
+
"""Find the workspace's custom emoji by name."""
|
|
341
|
+
return await self._call("slack", "slack.search_emojis", {"query": query})
|
|
342
|
+
|
|
343
|
+
async def search_public(self, *, query: str, after: str | None = None, before: str | None = None, content_types: str | None = None, context_channel_id: str | None = None, cursor: str | None = None, include_bots: bool | None = None, include_context: bool | None = None, limit: int | None = None, max_context_length: int | None = None, only_my_channels: bool | None = None, response_format: str | None = None, sort: str | None = None, sort_dir: str | None = None) -> Any:
|
|
344
|
+
"""Search messages and files in public channels, ranked by relevance, with surrounding context."""
|
|
345
|
+
return await self._call("slack", "slack.search_public", {"query": query, "after": after, "before": before, "content_types": content_types, "context_channel_id": context_channel_id, "cursor": cursor, "include_bots": include_bots, "include_context": include_context, "limit": limit, "max_context_length": max_context_length, "only_my_channels": only_my_channels, "response_format": response_format, "sort": sort, "sort_dir": sort_dir})
|
|
346
|
+
|
|
347
|
+
async def search_public_and_private(self, *, query: str, after: str | None = None, before: str | None = None, channel_types: str | None = None, content_types: str | None = None, context_channel_id: str | None = None, cursor: str | None = None, include_bots: bool | None = None, include_context: bool | None = None, limit: int | None = None, max_context_length: int | None = None, only_my_channels: bool | None = None, response_format: str | None = None, sort: str | None = None, sort_dir: str | None = None) -> Any:
|
|
348
|
+
"""Search messages and files everywhere the user can read: public and private channels, DMs and group DMs."""
|
|
349
|
+
return await self._call("slack", "slack.search_public_and_private", {"query": query, "after": after, "before": before, "channel_types": channel_types, "content_types": content_types, "context_channel_id": context_channel_id, "cursor": cursor, "include_bots": include_bots, "include_context": include_context, "limit": limit, "max_context_length": max_context_length, "only_my_channels": only_my_channels, "response_format": response_format, "sort": sort, "sort_dir": sort_dir})
|
|
350
|
+
|
|
351
|
+
async def search_users(self, *, query: str, cursor: str | None = None, limit: int | None = None, response_format: str | None = None) -> Any:
|
|
352
|
+
"""Find workspace members by name, email or profile fields (title, department); returns user ids."""
|
|
353
|
+
return await self._call("slack", "slack.search_users", {"query": query, "cursor": cursor, "limit": limit, "response_format": response_format})
|
|
354
|
+
|
|
355
|
+
async def send_message(self, *, channel_id: str, message: str, draft_id: str | None = None, reply_broadcast: bool | None = None, thread_ts: str | None = None) -> Any:
|
|
356
|
+
"""Send a message as the user to a channel, DM (user id as channel_id) or thread (thread_ts); returns its link."""
|
|
357
|
+
return await self._call("slack", "slack.send_message", {"channel_id": channel_id, "message": message, "draft_id": draft_id, "reply_broadcast": reply_broadcast, "thread_ts": thread_ts})
|
|
358
|
+
|
|
359
|
+
async def send_message_draft(self, *, channel_id: str, message: str, thread_ts: str | None = None) -> Any:
|
|
360
|
+
"""Save a message as a draft in the user's Slack (Drafts & Sent) without sending it; one draft per channel."""
|
|
361
|
+
return await self._call("slack", "slack.send_message_draft", {"channel_id": channel_id, "message": message, "thread_ts": thread_ts})
|
|
362
|
+
|
|
363
|
+
async def update_canvas(self, *, canvas_id: str, action: str | None = None, content: str | None = None, section_id: str | None = None) -> Any:
|
|
364
|
+
"""Append, prepend or replace canvas content; 'replace' without section_id overwrites the whole canvas, so read it first with slack.read_canvas."""
|
|
365
|
+
return await self._call("slack", "slack.update_canvas", {"canvas_id": canvas_id, "action": action, "content": content, "section_id": section_id})
|
|
192
366
|
|
|
193
367
|
|
|
194
368
|
class SlidesTools(_Namespace):
|
|
@@ -208,34 +382,109 @@ class TasksTools(_Namespace):
|
|
|
208
382
|
|
|
209
383
|
|
|
210
384
|
class TelegramTools(_Namespace):
|
|
211
|
-
async def edit_message(self, *,
|
|
212
|
-
"""
|
|
213
|
-
return await self._call("telegram", "telegram.edit_message", {"
|
|
385
|
+
async def edit_message(self, *, message_id: int, text: str) -> Any:
|
|
386
|
+
"""Replace the text of a message Palette's bot sent the connected user (message_id from telegram.send_message)."""
|
|
387
|
+
return await self._call("telegram", "telegram.edit_message", {"message_id": message_id, "text": text})
|
|
388
|
+
|
|
389
|
+
async def send_message(self, *, text: str, silent: bool | None = None) -> Any:
|
|
390
|
+
"""Send the connected user a Telegram message from Palette's bot (alerts, summaries, reports). Plain text; anything past 4096 characters is sent as follow-up messages."""
|
|
391
|
+
return await self._call("telegram", "telegram.send_message", {"text": text, "silent": silent})
|
|
392
|
+
|
|
393
|
+
async def send_photo(self, *, photo: str, caption: str | None = None) -> Any:
|
|
394
|
+
"""Send the connected user a photo on Telegram from Palette's bot, by public image URL or Telegram file_id, with an optional caption."""
|
|
395
|
+
return await self._call("telegram", "telegram.send_photo", {"photo": photo, "caption": caption})
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
class TiktokTools(_Namespace):
|
|
399
|
+
async def describe_tool(self, *, name: str) -> Any:
|
|
400
|
+
"""Read one TikTok Ads tool's description, full argument schema and the REST endpoint it wraps before calling it."""
|
|
401
|
+
return await self._call("tiktok", "tiktok.describe_tool", {"name": name})
|
|
402
|
+
|
|
403
|
+
async def execute(self, *, name: str, arguments: dict[str, Any] | None = None) -> Any:
|
|
404
|
+
"""Call a TikTok Ads tool that changes the account (create/update/delete/upload/status, budgets, bids, audiences); staged for approval before it runs. 3 calls per second per tool."""
|
|
405
|
+
return await self._call("tiktok", "tiktok.execute", {"name": name, "arguments": arguments})
|
|
406
|
+
|
|
407
|
+
async def list_tools(self, *, limit: int | None = None, query: str | None = None) -> Any:
|
|
408
|
+
"""Discover TikTok Ads tools (~380: campaigns, ad groups, ads, creatives, audiences, catalogs, reports, Business Center) by keyword over name, category and description; each row says whether it reads or writes."""
|
|
409
|
+
return await self._call("tiktok", "tiktok.list_tools", {"limit": limit, "query": query})
|
|
410
|
+
|
|
411
|
+
async def query(self, *, name: str, arguments: dict[str, Any] | None = None) -> Any:
|
|
412
|
+
"""Call a read-only TikTok Ads tool (get/list/report/search …) with its arguments; refuses tools that change the account."""
|
|
413
|
+
return await self._call("tiktok", "tiktok.query", {"name": name, "arguments": arguments})
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
class TiroTools(_Namespace):
|
|
417
|
+
async def get_document_template(self, *, template_id: int) -> Any:
|
|
418
|
+
"""Read one document template and its sections by templateId."""
|
|
419
|
+
return await self._call("tiro", "tiro.get_document_template", {"template_id": template_id})
|
|
420
|
+
|
|
421
|
+
async def get_note(self, *, include: list[Any] | None = None, note_guid: str | None = None, url: str | None = None) -> Any:
|
|
422
|
+
"""Read one note's metadata plus, via include, its AI summary (default), full transcript and/or every generated document in full."""
|
|
423
|
+
return await self._call("tiro", "tiro.get_note", {"include": include, "note_guid": note_guid, "url": url})
|
|
424
|
+
|
|
425
|
+
async def get_note_folders(self, *, note_guid: str | None = None, url: str | None = None) -> Any:
|
|
426
|
+
"""List the folders a note is filed in (folderId, name, workspace, team or private)."""
|
|
427
|
+
return await self._call("tiro", "tiro.get_note_folders", {"note_guid": note_guid, "url": url})
|
|
428
|
+
|
|
429
|
+
async def get_note_transcript(self, *, note_guid: str | None = None, url: str | None = None) -> Any:
|
|
430
|
+
"""Read a note's full transcript as timestamped paragraphs of speaker-attributed segments. Token-heavy — prefer tiro.search_notes or tiro.get_note's summary unless exact wording matters."""
|
|
431
|
+
return await self._call("tiro", "tiro.get_note_transcript", {"note_guid": note_guid, "url": url})
|
|
432
|
+
|
|
433
|
+
async def get_share_link(self, *, note_guid: str | None = None, password: str | None = None, url: str | None = None) -> Any:
|
|
434
|
+
"""Read a note's existing public share link (read-only; links are created in the Tiro app)."""
|
|
435
|
+
return await self._call("tiro", "tiro.get_share_link", {"note_guid": note_guid, "password": password, "url": url})
|
|
436
|
+
|
|
437
|
+
async def get_wiki_graph(self, *, depth: int | None = None, folder_id: str | None = None, limit: int | None = None, mode: str | None = None, page_guid: str | None = None, page_guids: list[Any] | None = None, query: str | None = None, radius: int | None = None, since: str | None = None, type: str | None = None, workspace: str | None = None) -> Any:
|
|
438
|
+
"""Traverse the wiki knowledge graph as nodes and typed edges: seed (overview, filterable), expand (depth from a page), around (radius from a page) or links (among given pages)."""
|
|
439
|
+
return await self._call("tiro", "tiro.get_wiki_graph", {"depth": depth, "folder_id": folder_id, "limit": limit, "mode": mode, "page_guid": page_guid, "page_guids": page_guids, "query": query, "radius": radius, "since": since, "type": type, "workspace": workspace})
|
|
440
|
+
|
|
441
|
+
async def get_wiki_page(self, *, page_guid: str, workspace: str | None = None) -> Any:
|
|
442
|
+
"""Read a wiki page: description, metadata, mentions, aliases and typed links to other pages."""
|
|
443
|
+
return await self._call("tiro", "tiro.get_wiki_page", {"page_guid": page_guid, "workspace": workspace})
|
|
444
|
+
|
|
445
|
+
async def list_document_templates(self, *, query: str | None = None) -> Any:
|
|
446
|
+
"""List the document templates (one-pager, minutes, custom) available to this account."""
|
|
447
|
+
return await self._call("tiro", "tiro.list_document_templates", {"query": query})
|
|
448
|
+
|
|
449
|
+
async def list_notes(self, *, created_from: str | None = None, created_to: str | None = None, cursor: str | None = None, folder_id: str | None = None, keyword: str | None = None, limit: int | None = None, participants: list[Any] | None = None, workspace: str | None = None) -> Any:
|
|
450
|
+
"""List meeting notes (title, participants, dates, duration; no content), newest first, optionally filtered by keyword, folder and creation date; paginate with cursor. Start here, then tiro.search_notes for content."""
|
|
451
|
+
return await self._call("tiro", "tiro.list_notes", {"created_from": created_from, "created_to": created_to, "cursor": cursor, "folder_id": folder_id, "keyword": keyword, "limit": limit, "participants": participants, "workspace": workspace})
|
|
452
|
+
|
|
453
|
+
async def list_wiki_mentions(self, *, page_guid: str, cursor: str | None = None, limit: int | None = None, workspace: str | None = None) -> Any:
|
|
454
|
+
"""List the note paragraphs that mention a wiki page (source note, extracted text, kind); paginate with cursor."""
|
|
455
|
+
return await self._call("tiro", "tiro.list_wiki_mentions", {"page_guid": page_guid, "cursor": cursor, "limit": limit, "workspace": workspace})
|
|
456
|
+
|
|
457
|
+
async def list_workspaces(self, *, query: str | None = None) -> Any:
|
|
458
|
+
"""List the Tiro workspaces this account can reach, with their guid and whether the wiki is enabled."""
|
|
459
|
+
return await self._call("tiro", "tiro.list_workspaces", {"query": query})
|
|
214
460
|
|
|
215
|
-
async def
|
|
216
|
-
"""
|
|
217
|
-
return await self._call("
|
|
461
|
+
async def search_notes(self, *, keyword: str, created_from: str | None = None, created_to: str | None = None, folder_id: str | None = None, limit: int | None = None, participants: list[Any] | None = None, workspace: str | None = None) -> Any:
|
|
462
|
+
"""Search notes by keyword and get each match with its primary documents (one-pager, custom; content capped at 5,000 chars) so the context can be read in one call."""
|
|
463
|
+
return await self._call("tiro", "tiro.search_notes", {"keyword": keyword, "created_from": created_from, "created_to": created_to, "folder_id": folder_id, "limit": limit, "participants": participants, "workspace": workspace})
|
|
218
464
|
|
|
219
|
-
async def
|
|
220
|
-
"""
|
|
221
|
-
return await self._call("
|
|
465
|
+
async def search_private_folders(self, *, cursor: str | None = None, keyword: str | None = None, limit: int | None = None, workspace: str | None = None) -> Any:
|
|
466
|
+
"""Find the user's private folders by name (case-insensitive substring; no keyword lists them all) with their folderId and breadcrumb path."""
|
|
467
|
+
return await self._call("tiro", "tiro.search_private_folders", {"cursor": cursor, "keyword": keyword, "limit": limit, "workspace": workspace})
|
|
222
468
|
|
|
223
|
-
async def
|
|
224
|
-
"""
|
|
225
|
-
return await self._call("
|
|
469
|
+
async def search_team_folders(self, *, cursor: str | None = None, keyword: str | None = None, limit: int | None = None, workspace: str | None = None) -> Any:
|
|
470
|
+
"""Find shared workspace folders by name (case-insensitive substring; no keyword lists them all) with their folderId and breadcrumb path."""
|
|
471
|
+
return await self._call("tiro", "tiro.search_team_folders", {"cursor": cursor, "keyword": keyword, "limit": limit, "workspace": workspace})
|
|
226
472
|
|
|
227
|
-
async def
|
|
228
|
-
"""
|
|
229
|
-
return await self._call("
|
|
473
|
+
async def search_wiki(self, *, keyword: str, limit: int | None = None, workspace: str | None = None) -> Any:
|
|
474
|
+
"""Search the workspace wiki (people, organisations, topics and decisions extracted from meetings) by page name; needs a paid Tiro plan with the wiki enabled."""
|
|
475
|
+
return await self._call("tiro", "tiro.search_wiki", {"keyword": keyword, "limit": limit, "workspace": workspace})
|
|
230
476
|
|
|
231
477
|
|
|
232
478
|
NAMESPACES: dict[str, type[_Namespace]] = {
|
|
233
479
|
"calendar": CalendarTools,
|
|
480
|
+
"confluence": ConfluenceTools,
|
|
234
481
|
"contacts": ContactsTools,
|
|
235
482
|
"docs": DocsTools,
|
|
236
483
|
"drive": DriveTools,
|
|
484
|
+
"figma": FigmaTools,
|
|
237
485
|
"forms": FormsTools,
|
|
238
486
|
"gmail": GmailTools,
|
|
487
|
+
"jira": JiraTools,
|
|
239
488
|
"meta": MetaTools,
|
|
240
489
|
"notion": NotionTools,
|
|
241
490
|
"sheets": SheetsTools,
|
|
@@ -243,4 +492,6 @@ NAMESPACES: dict[str, type[_Namespace]] = {
|
|
|
243
492
|
"slides": SlidesTools,
|
|
244
493
|
"tasks": TasksTools,
|
|
245
494
|
"telegram": TelegramTools,
|
|
495
|
+
"tiktok": TiktokTools,
|
|
496
|
+
"tiro": TiroTools,
|
|
246
497
|
}
|
|
@@ -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
|
)
|
|
@@ -87,14 +87,14 @@ class SecretSpec(BaseModel):
|
|
|
87
87
|
class ConnectionSpec(BaseModel):
|
|
88
88
|
"""A third-party service this app reaches through the user's OS connection.
|
|
89
89
|
|
|
90
|
-
`google`/`slack`/`notion`/`telegram`/`meta` are live: the user connects once
|
|
90
|
+
`google`/`slack`/`notion`/`telegram`/`meta`/`atlassian` are live: the user connects once
|
|
91
91
|
in Connect and the app calls `ctx.connections.<tool>` with no OAuth of its
|
|
92
92
|
own. The remaining slugs are legacy and validate but dispatch nothing.
|
|
93
93
|
"""
|
|
94
94
|
|
|
95
95
|
id: str
|
|
96
96
|
provider: Literal[
|
|
97
|
-
"google", "slack", "notion", "telegram", "meta",
|
|
97
|
+
"google", "slack", "notion", "telegram", "meta", "atlassian",
|
|
98
98
|
"instagram", "linear", "hubspot", "stripe", "zendesk", "custom",
|
|
99
99
|
]
|
|
100
100
|
label: str
|
|
@@ -14,8 +14,6 @@ from fastapi import Depends, HTTPException, Request, status
|
|
|
14
14
|
# plugin authors pick from this list. Extending the list is a platform change.
|
|
15
15
|
KNOWN_PERMISSIONS: frozenset[str] = frozenset(
|
|
16
16
|
{
|
|
17
|
-
"tasks:read",
|
|
18
|
-
"tasks:write",
|
|
19
17
|
"data_rooms:read",
|
|
20
18
|
"data_rooms:write",
|
|
21
19
|
"agents:read",
|
|
@@ -47,7 +45,7 @@ def require_permission(permission: str):
|
|
|
47
45
|
|
|
48
46
|
Usage (inside a plugin's FastAPI router)::
|
|
49
47
|
|
|
50
|
-
@router.get("/my-endpoint", dependencies=[Depends(require_permission("
|
|
48
|
+
@router.get("/my-endpoint", dependencies=[Depends(require_permission("data_rooms:read"))])
|
|
51
49
|
async def handler(...):
|
|
52
50
|
...
|
|
53
51
|
|
|
@@ -586,7 +586,8 @@ def _stop_reason(raw: Any, has_calls: bool) -> str:
|
|
|
586
586
|
class LocalLLMService:
|
|
587
587
|
"""`ctx.llm` for pltt dev — the hosted call shapes and receipt keys.
|
|
588
588
|
|
|
589
|
-
Hosted, this is the
|
|
589
|
+
Hosted, this is the workspace's catalog on the platform's keys, billed to
|
|
590
|
+
the workspace's credits.
|
|
590
591
|
Locally there is no platform: OpenAI models run on the developer's own
|
|
591
592
|
`OPENAI_API_KEY` when the dev env supplies one; without a key every call
|
|
592
593
|
returns a deterministic stub, so the app's code path still runs with zero
|
|
@@ -849,8 +850,9 @@ class LocalLLMService:
|
|
|
849
850
|
return [self.model] if self.live else []
|
|
850
851
|
|
|
851
852
|
async def spend(self) -> dict[str, Any]:
|
|
852
|
-
"""Hosted, the
|
|
853
|
-
|
|
853
|
+
"""Hosted, `workspace` is the member's credits in the workspace — the
|
|
854
|
+
limit calls run under. Locally the developer's own key pays."""
|
|
855
|
+
return {"spent_usd": 0.0, "cap_usd": None, "remaining_usd": None, "workspace": None}
|
|
854
856
|
|
|
855
857
|
|
|
856
858
|
class LocalWebService:
|
|
@@ -1239,8 +1241,9 @@ class LocalMediaService:
|
|
|
1239
1241
|
return rows
|
|
1240
1242
|
|
|
1241
1243
|
async def spend(self) -> dict[str, Any]:
|
|
1242
|
-
"""Hosted, the
|
|
1243
|
-
|
|
1244
|
+
"""Hosted, `workspace` is the member's credits in the workspace — the
|
|
1245
|
+
limit calls run under. Locally the developer's own key pays."""
|
|
1246
|
+
return {"spent_usd": 0.0, "cap_usd": None, "remaining_usd": None, "workspace": None}
|
|
1244
1247
|
|
|
1245
1248
|
|
|
1246
1249
|
def _sniff_mime(content: bytes) -> str | None:
|