@palettelab/cli 0.3.76 → 0.3.77

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 (52) hide show
  1. package/README.md +36 -4
  2. package/backend-sdk/palette_sdk/__init__.py +1 -1
  3. package/backend-sdk/palette_sdk/agent_routes.py +28 -2
  4. package/backend-sdk/palette_sdk/apps.py +16 -1
  5. package/backend-sdk/palette_sdk/connections_generated.py +27 -0
  6. package/backend-sdk/palette_sdk/data_rooms.py +59 -0
  7. package/backend-sdk/palette_sdk/manifest.py +10 -0
  8. package/backend-sdk/palette_sdk/mcp.py +11 -2
  9. package/backend-sdk/palette_sdk/tool_definition.py +21 -1
  10. package/backend-sdk/pyproject.toml +1 -1
  11. package/docs/connectors.md +154 -0
  12. package/docs/python-backend-sdk.md +106 -4
  13. package/lib/bundler.js +5 -2
  14. package/lib/cli.js +2 -2
  15. package/lib/commands/capabilities.js +30 -9
  16. package/lib/commands/check.js +7 -0
  17. package/lib/commands/package.js +5 -1
  18. package/lib/commands/publish.js +17 -0
  19. package/lib/commands/test.js +15 -3
  20. package/lib/connection-catalog.json +167 -0
  21. package/lib/connector.js +148 -0
  22. package/lib/manifest.js +22 -1
  23. package/package.json +1 -1
  24. package/template-fallback/backend/api/main.py +4 -2
  25. package/template-fallback/backend/tools/example_tool.py +4 -0
  26. package/template-fallback/package.json +1 -1
  27. package/template-fallback/palette-plugin.json +4 -0
  28. package/template-fallback/templates/agent-tool/README.md +3 -0
  29. package/template-fallback/templates/agent-tool/palette-plugin.json +4 -0
  30. package/template-fallback/templates/agent-tool/skills/echo-check/SKILL.md +15 -0
  31. package/template-fallback/templates/consumer-app/backend/api/main.py +3 -2
  32. package/template-fallback/templates/consumer-app/package.json +1 -1
  33. package/template-fallback/templates/consumer-app/palette-plugin.json +4 -0
  34. package/template-fallback/templates/dashboard/backend/api/main.py +2 -2
  35. package/template-fallback/templates/dashboard/package.json +1 -1
  36. package/template-fallback/templates/dashboard/palette-plugin.json +4 -0
  37. package/template-fallback/templates/database/backend/api/main.py +3 -3
  38. package/template-fallback/templates/database/package.json +1 -1
  39. package/template-fallback/templates/database/palette-plugin.json +4 -0
  40. package/template-fallback/templates/external-service/backend/api/main.py +3 -2
  41. package/template-fallback/templates/external-service/package.json +1 -1
  42. package/template-fallback/templates/external-service/palette-plugin.json +4 -0
  43. package/template-fallback/templates/frontend-only/package.json +1 -1
  44. package/template-fallback/templates/frontend-only/palette-plugin.json +4 -0
  45. package/template-fallback/templates/next/package.json +1 -1
  46. package/template-fallback/templates/next/palette-plugin.json +4 -0
  47. package/template-fallback/templates/palette-app/backend/api/main.py +2 -2
  48. package/template-fallback/templates/palette-app/package.json +1 -1
  49. package/template-fallback/templates/palette-app/palette-plugin.json +4 -0
  50. package/template-fallback/templates/provider-app/backend/api/main.py +2 -2
  51. package/template-fallback/templates/provider-app/package.json +1 -1
  52. package/template-fallback/templates/provider-app/palette-plugin.json +5 -0
@@ -0,0 +1,148 @@
1
+ "use strict"
2
+
3
+ // The app as a connector: what an agent will see of it (`pltt capabilities`), what `pltt test` and `pltt check` say
4
+ // about it, and what a publish sends to review. Everything here reads the manifest and the app's files; the routes
5
+ // come from the backend probe in `pltt test`, which is the only place that imports the app.
6
+
7
+ const fs = require("fs")
8
+ const path = require("path")
9
+
10
+ const SKIPPED_DIRS = new Set(["__pycache__", ".venv", "node_modules", ".palette", "dist", "palette_sdk"])
11
+
12
+ // The app's skills/<name>/SKILL.md packs. `error` marks one the platform would leave out.
13
+ // ponytail: reads single-line `key: value` frontmatter, which is what the platform's own packs use; a YAML parser if
14
+ // apps start writing block scalars.
15
+ function skills(cwd) {
16
+ const base = path.join(cwd, "skills")
17
+ if (!fs.existsSync(base)) return []
18
+ return fs.readdirSync(base, { withFileTypes: true })
19
+ .filter((entry) => entry.isDirectory() && fs.existsSync(path.join(base, entry.name, "SKILL.md")))
20
+ .map((entry) => {
21
+ const file = `skills/${entry.name}/SKILL.md`
22
+ const front = /^---\s*\n([\s\S]*?)\n---/.exec(fs.readFileSync(path.join(cwd, file), "utf8"))
23
+ const field = (key) => {
24
+ const match = new RegExp(`^${key}:[ \\t]*(.*)$`, "m").exec(front ? front[1] : "")
25
+ return match ? match[1].trim().replace(/^(["'])(.*)\1$/, "$2") : ""
26
+ }
27
+ const skill = { name: entry.name, description: field("description"), tools: field("allowed-tools").split(/[\s,]+/).filter(Boolean), file }
28
+ return field("name") === entry.name && skill.description ? skill : { ...skill, error: true }
29
+ })
30
+ .sort((a, b) => a.name.localeCompare(b.name))
31
+ }
32
+
33
+ function events(manifest) {
34
+ return (manifest.provides?.events || []).map((event) => {
35
+ const item = typeof event === "string" ? { topic: event } : event
36
+ const missing = [!item.description && "description", (item.payload_schema ?? item.schema) === undefined && "payload schema"].filter(Boolean)
37
+ return { topic: item.topic || item.name, description: item.description || "", missing }
38
+ })
39
+ }
40
+
41
+ function view(cwd, manifest) {
42
+ return {
43
+ summary: manifest.agent?.summary || null,
44
+ instructions: manifest.agent?.instructions || null,
45
+ skills: skills(cwd).filter((skill) => !skill.error).map((skill) => ({ name: skill.name, description: skill.description, tools: skill.tools })),
46
+ events: events(manifest).map((event) => ({ topic: event.topic, description: event.description, trigger: event.missing.length === 0 })),
47
+ }
48
+ }
49
+
50
+ // Lines that use the path-style call to another app, which skips the typed contract.
51
+ function pathStyleCalls(cwd) {
52
+ const found = []
53
+ const visit = (dir) => {
54
+ if (!fs.existsSync(dir)) return
55
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
56
+ if (SKIPPED_DIRS.has(entry.name)) continue
57
+ const abs = path.join(dir, entry.name)
58
+ if (entry.isDirectory()) visit(abs)
59
+ else if (entry.name.endsWith(".py")) {
60
+ fs.readFileSync(abs, "utf8").split("\n").forEach((line, i) => {
61
+ if (/\bapps\.call\(/.test(line) && !/^\s*#/.test(line)) found.push({ file: path.relative(cwd, abs).split(path.sep).join("/"), line: i + 1 })
62
+ })
63
+ }
64
+ }
65
+ }
66
+ visit(path.join(cwd, "backend"))
67
+ return found
68
+ }
69
+
70
+ // What makes the app a poor connector. Every entry is a warning: none of it stops the app working as it does today.
71
+ // `tools` is `collect(manifest)` from commands/capabilities; `routes` is the backend probe's list, or null when the
72
+ // backend could not be imported, in which case the app's full tool list is unknown.
73
+ function findings({ cwd, manifest, tools, routes = [] }) {
74
+ const out = []
75
+ for (const tool of tools) {
76
+ // The manifest validator already requires all three of a service method and of an MCP tool.
77
+ if (tool.source !== "legacy") continue
78
+ const missing = [!tool.description && "description", !tool.input_schema && "input schema", "risk mark"].filter(Boolean)
79
+ out.push({
80
+ message: `agent-exposed action ${tool.name} has no ${missing.join(", ")}`,
81
+ fix: "Move it to an agent_exposable provides.services method with a description, input_schema and risk (pltt capabilities add).",
82
+ })
83
+ }
84
+ for (const route of routes || []) {
85
+ if (!route.offered || route.agent === "hidden") continue
86
+ const label = `${route.methods.join(",")} ${route.path}`
87
+ if (!route.agent) {
88
+ out.push({
89
+ message: `route ${label} is offered to agents with no agent_route mark`,
90
+ fix: 'Add openapi_extra=agent_route("read"), agent_route("write") or agent_route("hidden") to the route.',
91
+ route: { path: route.path, methods: route.methods },
92
+ })
93
+ }
94
+ if (!route.described) {
95
+ out.push({
96
+ message: `agent-exposed route ${label} has no description`,
97
+ fix: "Give the handler a docstring or agent_route(..., description=...); an assistant reads it to choose this action.",
98
+ route: { path: route.path, methods: route.methods },
99
+ })
100
+ }
101
+ }
102
+ const own = [...tools.map((tool) => tool.name), ...(routes || []).map((route) => route.name).filter(Boolean)]
103
+ const known = new Set([...own, ...tools.flatMap((tool) => [tool.capability_id, `app__${manifest.id}__${tool.name}`])])
104
+ for (const skill of skills(cwd)) {
105
+ if (skill.error) {
106
+ out.push({
107
+ message: `skill ${skill.name} will not load: SKILL.md needs frontmatter with name: ${skill.name} and a description`,
108
+ fix: `Start ${skill.file} with ---, "name: ${skill.name}", "description: ...", ---.`,
109
+ file: skill.file,
110
+ })
111
+ continue
112
+ }
113
+ // ponytail: only the declared allowed-tools are checked; tool names in the skill's prose are not parsed.
114
+ for (const tool of skill.tools.filter((name) => routes && !known.has(name))) {
115
+ out.push({
116
+ message: `skill ${skill.name} names a tool the app does not have: ${tool}`,
117
+ fix: `Use one of the app's tools (${own.join(", ") || "it has none"}) or remove it from allowed-tools.`,
118
+ file: skill.file,
119
+ })
120
+ }
121
+ }
122
+ for (const event of events(manifest)) {
123
+ if (!event.missing.length) continue
124
+ out.push({
125
+ message: `event ${event.topic} is not offered as an agent trigger: it has no ${event.missing.join(", ")}`,
126
+ fix: "Add a description and a payload_schema to its provides.events entry. Without them it still reaches other apps.",
127
+ })
128
+ }
129
+ for (const call of pathStyleCalls(cwd)) {
130
+ out.push({
131
+ message: "path-style ctx.apps.call(app_id, path) is deprecated",
132
+ fix: 'Call the typed method instead: await services(ctx).call("namespace/version#method", {...}), declared in consumes.services.',
133
+ ...call,
134
+ })
135
+ }
136
+ return out
137
+ }
138
+
139
+ // What a publish adds to the store's review, or null when the app sends neither.
140
+ function reviewNote(cwd, manifest) {
141
+ const parts = [
142
+ ...(manifest.agent?.summary || manifest.agent?.instructions ? ["agent summary and instructions"] : []),
143
+ ...skills(cwd).map((skill) => `skills/${skill.name}`),
144
+ ]
145
+ return parts.length ? `reviewed by the store with this version: ${parts.join(", ")}` : null
146
+ }
147
+
148
+ module.exports = { skills, view, findings, reviewNote }
package/lib/manifest.js CHANGED
@@ -22,6 +22,7 @@ const KNOWN_PERMISSIONS = new Set([
22
22
  ])
23
23
 
24
24
  const TOP_LEVEL_KEYS = new Set([
25
+ "agent",
25
26
  "manifest_version",
26
27
  "id",
27
28
  "name",
@@ -219,7 +220,7 @@ const CTX_PERMISSIONS = [
219
220
  {
220
221
  accessor: "ctx.data_rooms",
221
222
  permissions: ["data_rooms:read", "data_rooms:write"],
222
- summary: "The organisation's Drive — search and read indexed documents",
223
+ summary: "The organisation's Drive — search and read indexed documents, share links for people outside the workspace",
223
224
  python: 'hits = await ctx.data_rooms.search("supplier contract")',
224
225
  },
225
226
  {
@@ -699,6 +700,25 @@ function validateConsumes(value, errors) {
699
700
  }
700
701
  }
701
702
 
703
+ // The same limits as the platform's validator and schema/palette-plugin.schema.json.
704
+ const AGENT_TEXT_LIMITS = { summary: 160, instructions: 2000 }
705
+
706
+ // What the app says to assistants in its own words. Bounded: this text reaches a model's prompt.
707
+ function validateAgent(value, errors) {
708
+ if (value === undefined) return
709
+ if (!isObject(value)) {
710
+ errors.push("agent must be an object")
711
+ return
712
+ }
713
+ unknownKeys(value, new Set(Object.keys(AGENT_TEXT_LIMITS)), "agent", errors)
714
+ for (const [key, limit] of Object.entries(AGENT_TEXT_LIMITS)) {
715
+ requireString(value, key, "agent", errors)
716
+ if (typeof value[key] === "string" && value[key].length > limit) {
717
+ errors.push(`agent.${key} must be at most ${limit} characters`)
718
+ }
719
+ }
720
+ }
721
+
702
722
  function validateMcp(value, errors) {
703
723
  if (value === undefined) return
704
724
  if (!isObject(value)) {
@@ -880,6 +900,7 @@ function validateManifest(m) {
880
900
  validateProvides(m.provides, errors)
881
901
  validateRequires(m.requires, errors)
882
902
  validateConsumes(m.consumes, errors)
903
+ validateAgent(m.agent, errors)
883
904
  validateMcp(m.mcp, errors)
884
905
 
885
906
  if (m.sdk) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@palettelab/cli",
3
- "version": "0.3.76",
3
+ "version": "0.3.77",
4
4
  "description": "Developer CLI for building Palette platform plugins — no platform source access required.",
5
5
  "bin": {
6
6
  "pltt": "bin/pltt.js"
@@ -22,6 +22,7 @@ from palette_sdk import (
22
22
  PluginRouter,
23
23
  PluginContext,
24
24
  SuccessResponse,
25
+ agent_route,
25
26
  get_plugin_context,
26
27
  require_permission,
27
28
  )
@@ -29,7 +30,8 @@ from palette_sdk import (
29
30
  router = PluginRouter(tags=["my-plugin"])
30
31
 
31
32
 
32
- @router.get("/status", dependencies=[require_permission("data_rooms:read")])
33
+ # agent_route says how an assistant may use a route: "read", "write" (a change), or "hidden" (never offered).
34
+ @router.get("/status", dependencies=[require_permission("data_rooms:read")], openapi_extra=agent_route("read"))
33
35
  async def get_status(ctx: PluginContext = Depends(get_plugin_context)):
34
36
  """Example endpoint — returns plugin status."""
35
37
  return SuccessResponse(
@@ -42,7 +44,7 @@ async def get_status(ctx: PluginContext = Depends(get_plugin_context)):
42
44
  )
43
45
 
44
46
 
45
- @router.get("/hello", dependencies=[require_permission("data_rooms:read")])
47
+ @router.get("/hello", dependencies=[require_permission("data_rooms:read")], openapi_extra=agent_route("read"))
46
48
  async def hello(ctx: PluginContext = Depends(get_plugin_context)):
47
49
  """Example endpoint — simple hello."""
48
50
  return {"message": f"Hello from plugin! User: {ctx.user_id}"}
@@ -1,5 +1,9 @@
1
1
  """Example custom agent tool.
2
2
 
3
+ Deprecated: ToolDefinition and the manifest's "tools" list are the legacy way to give agents a tool.
4
+ For a new tool run `pltt capabilities add <domain.resource.action>`, which scaffolds a typed
5
+ @capability handler and its provides.services entry.
6
+
3
7
  To register this tool, add it to your palette-plugin.json:
4
8
  {
5
9
  "tools": [{
@@ -4,7 +4,7 @@
4
4
  "private": true,
5
5
  "description": "A Palette platform plugin",
6
6
  "dependencies": {
7
- "@palettelab/sdk": "^0.1.39"
7
+ "@palettelab/sdk": "^0.1.40"
8
8
  },
9
9
  "devDependencies": {
10
10
  "typescript": "^5.0.0",
@@ -8,6 +8,10 @@
8
8
  "category": "Productivity",
9
9
  "tagline": "A short description of what this plugin does",
10
10
  "description": "A longer description explaining the plugin's features and capabilities.",
11
+ "agent": {
12
+ "summary": "Reports this plugin's status and greets the member.",
13
+ "instructions": "Read the status to check the plugin is running, and say hello when asked. Both only read. Replace this text with when an assistant should reach for your app and what it should check first."
14
+ },
11
15
  "icon": "Puzzle",
12
16
  "gradient": {
13
17
  "bg": "linear-gradient(135deg, #6366F1, #8B5CF6)",
@@ -6,3 +6,6 @@ and scheduled tasks discover the same capability automatically.
6
6
 
7
7
  Run `pltt capabilities list` to inspect the agent surface and `pltt test --agent`
8
8
  before publishing.
9
+
10
+ `skills/echo-check/SKILL.md` is a sample skill: a recipe an assistant follows with your tools. Skills and
11
+ the manifest's `agent` text are sent with the app on publish and reviewed by the store.
@@ -8,6 +8,10 @@
8
8
  "category": "Productivity",
9
9
  "tagline": "A tool an agent can call",
10
10
  "description": "Registers a callable tool that any agent in the org can invoke.",
11
+ "agent": {
12
+ "summary": "Echoes text back as a structured result.",
13
+ "instructions": "Use echo when the member asks to repeat or confirm a piece of text. It only reads and changes nothing. Replace this text with when an assistant should reach for your app and what it should check first."
14
+ },
11
15
  "icon": "Toolbox",
12
16
  "gradient": { "bg": "linear-gradient(135deg, #F59E0B, #EF4444)", "text": "#fff" },
13
17
  "sdk": { "backend": "^0.1.0" },
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: echo-check
3
+ description: Confirm a piece of text with the member by echoing it back before it is used anywhere else.
4
+ allowed-tools: echo
5
+ ---
6
+
7
+ # Confirm text by echoing it
8
+
9
+ A sample skill: a recipe an assistant follows for one of your app's multi-step jobs. Replace it with
10
+ your own, and keep `allowed-tools` to tools your app has (`pltt check` reports any it does not).
11
+
12
+ 1. Take the exact text the member wants confirmed. Do not correct or shorten it.
13
+ 2. Call `echo` with that text as `message`.
14
+ 3. Show the member the `echoed` value and ask whether it is right.
15
+ 4. If they change it, call `echo` again with the new text. Stop when they confirm.
@@ -1,11 +1,12 @@
1
1
  from fastapi import Depends
2
- from palette_sdk import PluginContext, PluginRouter, get_plugin_context, services
2
+ from palette_sdk import PluginContext, PluginRouter, agent_route, get_plugin_context, require_permission, services
3
3
 
4
4
  router = PluginRouter()
5
5
 
6
6
 
7
- @router.post("/leave-requests")
7
+ @router.post("/leave-requests", dependencies=[require_permission("resources:write")], openapi_extra=agent_route("write"))
8
8
  async def create_leave_request(payload: dict, ctx: PluginContext = Depends(get_plugin_context)):
9
+ """Submit a leave request; the HR app says who approves it."""
9
10
  chain = await services(ctx).call("hr/v1#approvalChain.get", {
10
11
  "user_id": payload.get("user_id", ctx.user_id),
11
12
  })
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@palettelab/sdk": "^0.1.39",
5
+ "@palettelab/sdk": "^0.1.40",
6
6
  "react": "^19.0.0",
7
7
  "react-dom": "^19.0.0"
8
8
  }
@@ -8,6 +8,10 @@
8
8
  "category": "Productivity",
9
9
  "tagline": "Consume governed services from other apps",
10
10
  "description": "Example consumer app that asks an HR provider for approval routing.",
11
+ "agent": {
12
+ "summary": "Submits leave requests and routes them to the right approver.",
13
+ "instructions": "Submitting a leave request is a change, so confirm the details with the member first. The approval chain comes from the HR provider app; never guess an approver."
14
+ },
11
15
  "icon": "ClipboardText",
12
16
  "gradient": {
13
17
  "bg": "linear-gradient(135deg, #7C3AED, #DB2777)",
@@ -6,12 +6,12 @@ would source this from the org's data rooms or installed data sources.
6
6
 
7
7
  from fastapi import Depends
8
8
 
9
- from palette_sdk import PluginRouter, PluginContext, get_plugin_context, require_permission
9
+ from palette_sdk import PluginRouter, PluginContext, agent_route, get_plugin_context, require_permission
10
10
 
11
11
  router = PluginRouter(tags=["my-dashboard"])
12
12
 
13
13
 
14
- @router.get("/series", dependencies=[require_permission("data_rooms:read")])
14
+ @router.get("/series", dependencies=[require_permission("data_rooms:read")], openapi_extra=agent_route("read"))
15
15
  async def series(ctx: PluginContext = Depends(get_plugin_context)) -> list[dict]:
16
16
  """Stub data source — replace with a query against the org's tables."""
17
17
  return [
@@ -3,7 +3,7 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@palettelab/sdk": "^0.1.39",
6
+ "@palettelab/sdk": "^0.1.40",
7
7
  "react": "^19.0.0"
8
8
  }
9
9
  }
@@ -8,6 +8,10 @@
8
8
  "category": "Analytics",
9
9
  "tagline": "A dashboard widget",
10
10
  "description": "A widget that exposes a dashboard data source and renders a chart from it.",
11
+ "agent": {
12
+ "summary": "Shows a weekly series as a chart.",
13
+ "instructions": "Read the series to answer questions about the week's values. This app only reads; it has nothing to create or change."
14
+ },
11
15
  "icon": "ChartBar",
12
16
  "gradient": { "bg": "linear-gradient(135deg, #06B6D4, #6366F1)", "text": "#fff" },
13
17
  "sdk": { "frontend": "^0.1.16", "backend": "^0.1.8" },
@@ -2,7 +2,7 @@
2
2
 
3
3
  from fastapi import Depends, HTTPException, Query
4
4
  from pydantic import BaseModel, Field
5
- from palette_sdk import PluginRouter, PluginContext, get_plugin_context, require_permission
5
+ from palette_sdk import PluginRouter, PluginContext, agent_route, get_plugin_context, require_permission
6
6
  from models import Note
7
7
 
8
8
  router = PluginRouter(tags=["my-db-plugin"])
@@ -12,7 +12,7 @@ class NoteIn(BaseModel):
12
12
  body: str = Field(max_length=4000)
13
13
 
14
14
 
15
- @router.get("/notes", dependencies=[require_permission("resources:read")])
15
+ @router.get("/notes", dependencies=[require_permission("resources:read")], openapi_extra=agent_route("read"))
16
16
  async def list_notes(
17
17
  limit: int = Query(50, ge=1, le=500),
18
18
  offset: int = Query(0, ge=0),
@@ -24,7 +24,7 @@ async def list_notes(
24
24
  return [{"id": r.id, "body": r.body} for r in rows]
25
25
 
26
26
 
27
- @router.post("/notes", dependencies=[require_permission("resources:write")])
27
+ @router.post("/notes", dependencies=[require_permission("resources:write")], openapi_extra=agent_route("write"))
28
28
  async def create_note(
29
29
  body: NoteIn,
30
30
  ctx: PluginContext = Depends(get_plugin_context),
@@ -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.39", "react": "^19.0.0" }
5
+ "dependencies": { "@palettelab/sdk": "^0.1.40", "react": "^19.0.0" }
6
6
  }
@@ -8,6 +8,10 @@
8
8
  "category": "Productivity",
9
9
  "tagline": "Org-isolated database CRUD",
10
10
  "description": "Stores notes per organization with RLS-enforced isolation.",
11
+ "agent": {
12
+ "summary": "Keeps each member's notes.",
13
+ "instructions": "List the member's notes before creating one, so a note is not written twice. Creating a note is a change. Notes belong to the member who wrote them."
14
+ },
11
15
  "icon": "Database",
12
16
  "gradient": { "bg": "linear-gradient(135deg, #8B5CF6, #EC4899)", "text": "#fff" },
13
17
  "sdk": { "frontend": "^0.1.16", "backend": "^0.1.8" },
@@ -9,15 +9,16 @@ allowlist at runtime.
9
9
 
10
10
  from fastapi import Depends, HTTPException
11
11
 
12
- from palette_sdk import PluginRouter, PluginContext, get_plugin_context, require_permission
12
+ from palette_sdk import PluginRouter, PluginContext, agent_route, get_plugin_context, require_permission
13
13
 
14
14
  router = PluginRouter(tags=["my-external-svc"])
15
15
 
16
16
  EXTERNAL_HOST = "https://api.example.com"
17
17
 
18
18
 
19
- @router.get("/proxy", dependencies=[require_permission("resources:read")])
19
+ @router.get("/proxy", dependencies=[require_permission("resources:read")], openapi_extra=agent_route("read"))
20
20
  async def proxy(ctx: PluginContext = Depends(get_plugin_context)) -> dict:
21
+ """Check that the external service answers, using the organization's token."""
21
22
  import httpx
22
23
 
23
24
  connection = await ctx.connections.status("example_oauth")
@@ -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.39", "react": "^19.0.0" }
5
+ "dependencies": { "@palettelab/sdk": "^0.1.40", "react": "^19.0.0" }
6
6
  }
@@ -8,6 +8,10 @@
8
8
  "category": "Productivity",
9
9
  "tagline": "Calls a third-party API",
10
10
  "description": "Demonstrates declared external_network access and a scoped per-org config token.",
11
+ "agent": {
12
+ "summary": "Checks the connection to an external service.",
13
+ "instructions": "Use the proxy route to check that the external service answers. It only reads. If the API token is not configured, tell the member to ask an admin to set it; never ask the member for the token."
14
+ },
11
15
  "icon": "CloudArrowUp",
12
16
  "gradient": { "bg": "linear-gradient(135deg, #10B981, #06B6D4)", "text": "#fff" },
13
17
  "sdk": { "frontend": "^0.1.16", "backend": "^0.1.8" },
@@ -3,7 +3,7 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@palettelab/sdk": "^0.1.39",
6
+ "@palettelab/sdk": "^0.1.40",
7
7
  "react": "^19.0.0"
8
8
  }
9
9
  }
@@ -8,6 +8,10 @@
8
8
  "category": "Productivity",
9
9
  "tagline": "A pure-frontend widget",
10
10
  "description": "A frontend-only plugin — renders inside the platform iframe sandbox with no backend.",
11
+ "agent": {
12
+ "summary": "A widget members open on screen.",
13
+ "instructions": "This app has no actions an assistant can call. Offer to open it when the member asks for it."
14
+ },
11
15
  "icon": "Puzzle",
12
16
  "gradient": { "bg": "linear-gradient(135deg, #6366F1, #8B5CF6)", "text": "#fff" },
13
17
  "sdk": { "frontend": "^0.1.16" },
@@ -3,7 +3,7 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@palettelab/sdk": "^0.1.39",
6
+ "@palettelab/sdk": "^0.1.40",
7
7
  "react": "^19.0.0"
8
8
  },
9
9
  "devDependencies": {
@@ -8,6 +8,10 @@
8
8
  "category": "Productivity",
9
9
  "tagline": "A native Palette app with Next-compatible frontend config",
10
10
  "description": "Uses frontend.framework=next so pltt reads frontend/next.config.ts while still publishing a native Palette module.",
11
+ "agent": {
12
+ "summary": "A screen members open inside Palette.",
13
+ "instructions": "This app has no actions an assistant can call. Offer to open it when the member asks for it."
14
+ },
11
15
  "icon": "Puzzle",
12
16
  "gradient": { "bg": "linear-gradient(135deg, #0F766E, #2563EB)", "text": "#fff" },
13
17
  "sdk": { "frontend": "^0.1.16" },
@@ -1,9 +1,9 @@
1
1
  from fastapi import APIRouter
2
- from palette_sdk import require_permission
2
+ from palette_sdk import agent_route, require_permission
3
3
 
4
4
  router = APIRouter()
5
5
 
6
6
 
7
- @router.get("/health", dependencies=[require_permission("data_rooms:read")])
7
+ @router.get("/health", dependencies=[require_permission("data_rooms:read")], openapi_extra=agent_route("hidden"))
8
8
  async def health():
9
9
  return {"ok": True}
@@ -3,7 +3,7 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@palettelab/sdk": "^0.1.39",
6
+ "@palettelab/sdk": "^0.1.40",
7
7
  "react": "^19.0.0"
8
8
  },
9
9
  "devDependencies": {
@@ -8,6 +8,10 @@
8
8
  "category": "Productivity",
9
9
  "tagline": "A routed Palette OS app",
10
10
  "description": "Uses Palette-native app-directory routing while publishing as a safe frontend bundle.",
11
+ "agent": {
12
+ "summary": "A routed app with a meetings screen.",
13
+ "instructions": "This app has no actions an assistant can call yet. Offer to open it when the member asks about their meetings."
14
+ },
11
15
  "icon": "PanelTop",
12
16
  "gradient": { "bg": "linear-gradient(135deg, #0F766E, #2563EB)", "text": "#fff" },
13
17
  "sdk": { "frontend": "^0.1.16", "backend": "^0.1.8" },
@@ -1,5 +1,5 @@
1
1
  from fastapi import Depends
2
- from palette_sdk import PluginContext, PluginRouter, get_plugin_context, service
2
+ from palette_sdk import PluginContext, PluginRouter, agent_route, get_plugin_context, require_permission, service
3
3
 
4
4
  router = PluginRouter()
5
5
 
@@ -20,6 +20,6 @@ async def approval_chain(ctx: PluginContext, payload: dict) -> dict:
20
20
  }
21
21
 
22
22
 
23
- @router.get("/health")
23
+ @router.get("/health", dependencies=[require_permission("resources:read")], openapi_extra=agent_route("hidden"))
24
24
  async def health(ctx: PluginContext = Depends(get_plugin_context)):
25
25
  return {"ok": True, "plugin_id": ctx.plugin_id}
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@palettelab/sdk": "^0.1.39",
5
+ "@palettelab/sdk": "^0.1.40",
6
6
  "react": "^19.0.0"
7
7
  }
8
8
  }
@@ -8,6 +8,10 @@
8
8
  "category": "Productivity",
9
9
  "tagline": "Expose governed services to other apps",
10
10
  "description": "Example provider app exposing employee hierarchy through the OS broker.",
11
+ "agent": {
12
+ "summary": "Answers who approves a request for an employee.",
13
+ "instructions": "Other apps ask this app for an employee's approval chain through the OS broker. It only reads. It raises hierarchy.updated when a reporting line changes."
14
+ },
11
15
  "icon": "UsersThree",
12
16
  "gradient": {
13
17
  "bg": "linear-gradient(135deg, #0F766E, #2563EB)",
@@ -43,6 +47,7 @@
43
47
  {
44
48
  "topic": "hierarchy.updated",
45
49
  "version": "v1",
50
+ "description": "An employee's reporting line changed.",
46
51
  "schema": "schemas/hierarchy.updated.json"
47
52
  }
48
53
  ]