[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BXN41EYMY1F455N3YS4AM0":3,"skill-same:01M6BXN41EYMY1F455N3YS4AM0":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":61,"ownerHtmlUrl":62,"ownerBlogUrl":63,"ownerDescription":64,"updatedAt":65,"install":66,"resources":79},"01M6BXN41EYMY1F455N3YS4AM0","vertesia-api","Vertesia 客户端 API 参考","Reference for the Vertesia client API (@vertesia\u002Fclient). Covers available APIs, common operations (objects, workflows, interactions, files), authentication helpers, and query patterns. Use when building tools or UI that call the Vertesia platform.","Vertesia 客户端 API（@vertesia\u002Fclient）参考。涵盖可用 API、常见操作（对象、工作流、交互、文件）、认证辅助函数和查询模式。在构建调用 Vertesia 平台的工具或 UI 时使用。","vertesia\u002Fcomposableai","vertesia","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F143534049?v=4","01M6BXMXK8EF2HWVKP7PKVM3FY","Vertesia","01M6BXMXPZ80586HD1BDGV7RYR",5,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fvertesia\u002Fcomposableai\u002Fblob\u002Fmain\u002Ftemplates\u002Fplugin-template\u002F.agents\u002Fskills\u002Fvertesia-api\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TKQDF2K4KQS863Q79P4","开发参考","SCENARIO","使用场景",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"api","vertesia api","helpers","patterns","reference","client","operations","common","query","when","use","files","call","objects","for","platform","Tools","workflows","ui","authentication","2026-11-10 10:12:30",false,"---\nname: vertesia-api\ndescription: Reference for the Vertesia client API (@vertesia\u002Fclient). Covers available APIs, common operations (objects, workflows, interactions, files), authentication helpers, and query patterns. Use when building tools or UI that call the Vertesia platform.\n---\n\n# Vertesia Client API\n\nThe `@vertesia\u002Fclient` package provides a typed client for the Vertesia platform.\n\n## Getting the Client\n\n```typescript\n\u002F\u002F In tool server code (inside tool run())\nconst client = await context.getClient();\n\n\u002F\u002F In UI code (React component)\nimport { useUserSession } from \"@vertesia\u002Fui\u002Fsession\";\nconst { client, user, project } = useUserSession();\n```\n\n## Available APIs\n\n### Studio APIs\n\n| API                   | Description                          |\n| --------------------- | ------------------------------------ |\n| `client.projects`     | Project management                   |\n| `client.environments` | Environment configuration            |\n| `client.interactions` | Interaction execution and management |\n| `client.prompts`      | Prompt templates                     |\n| `client.runs`         | Run history and analytics            |\n| `client.account`      | Current account operations           |\n| `client.analytics`    | Analytics data                       |\n| `client.apps`         | Application management               |\n| `client.iam`          | Identity and access management       |\n| `client.users`        | User management                      |\n| `client.apikeys`      | API key management                   |\n| `client.refs`         | Reference management                 |\n| `client.commands`     | Command execution                    |\n\n### Store APIs\n\nAccessible via `client.store.*` or shortcuts:\n\n| API                        | Shortcut           | Description                         |\n| -------------------------- | ------------------ | ----------------------------------- |\n| `client.store.objects`     | `client.objects`   | Content object CRUD, search, upload |\n| `client.store.files`       | `client.files`     | File operations                     |\n| `client.store.types`       | `client.types`     | Content type definitions            |\n| `client.store.workflows`   | `client.workflows` | Workflow management, conversations  |\n| `client.store.collections` | —                  | Collection management               |\n| `client.store.embeddings`  | —                  | Embedding operations                |\n| `client.store.agents`      | —                  | Agent operations                    |\n\n## Object Operations\n\n```typescript\n\u002F\u002F Retrieve by ID\nconst object = await client.objects.retrieve(objectId);\n\n\u002F\u002F List with pagination\nconst objects = await client.objects.list({ limit: 100, offset: 0 });\n\n\u002F\u002F Search by text\nconst results = await client.objects.search({ query: 'search terms' });\n\n\u002F\u002F Find with MongoDB-style queries\nconst objects = await client.objects.find({\n    where: { status: 'active', type: 'article' },\n    limit: 50,\n});\n\n\u002F\u002F Count\nconst { count } = await client.objects.count({ where: { status: 'active' } });\n\n\u002F\u002F Upload content\nawait client.objects.upload(payload);\n\n\u002F\u002F Get download URL\nconst { url } = await client.objects.getDownloadUrl(fileUri);\n\n\u002F\u002F Analyze document\nconst analysis = await client.objects.analyze(objectId);\n```\n\n### Creating an object with an app-owned type\n\nAn object's `type` is either a stored type ObjectId or an in-code app type string. For an app-owned type, pass\nthe portable string directly:\n\n```typescript\nconst appName = import.meta.env.VITE_APP_NAME;\nawait client.objects.create({\n    type: `app:${appName}:bookmark`,\n    properties: { title, url },\n});\n```\n\nDo not resolve app-owned types to project-local ObjectIds with `types.list()` or `getTypeByName()`. The platform\nresolves the `app:\u003Capp-name>:\u003Ctype-name>` string from the app package, including preview builds for the owner.\n\n## Workflow \u002F Conversation Operations\n\n```typescript\n\u002F\u002F List conversations for an interaction\nconst { runs } = await client.store.workflows.listConversations({\n    interaction: 'app:my-app:collection:interaction-name',\n    page_size: 20,\n});\n\u002F\u002F Returns: { runs: WorkflowRun[], next_page_token?, has_more? }\n\u002F\u002F WorkflowRun has: run_id, workflow_id, started_at, status, topic\n\u002F\u002F NOTE: listConversations does NOT return input field — use getRunDetails for that\n\n\u002F\u002F Get full run details (includes input, history)\nconst run = await client.store.workflows.getRunDetails(runId, workflowId);\n\n\u002F\u002F Search runs with filters\nconst results = await client.store.workflows.searchRuns({\n    interaction: 'interaction-name',\n    status: 'completed',\n    page_size: 10,\n});\n\n\u002F\u002F Send signal to active workflow\nawait client.store.workflows.sendSignal(workflowId, runId, 'signal-name', payload);\n```\n\n## Agent Runs (`client.agents`)\n\nFor listing\u002Fsearching the runs that show up in chat sidebars and conversation pages.\n\n```typescript\n\u002F\u002F List recent runs (date-sorted; supports filter + cursor pagination)\nconst { items, total_count, next_cursor } = await client.agents.list({\n    limit: 100,\n    sort: 'started_at',         \u002F\u002F ⚠️ ONLY 'started_at' or 'updated_at' — no other fields\n    order: 'desc',\n    interaction: 'sys:my_agent',  \u002F\u002F optional, single interaction code\n    status: 'completed',          \u002F\u002F optional, single or array\n});\n\n\u002F\u002F Backend full-text search (Elasticsearch)\nconst { hits, total } = await client.agents.search({\n    query: 'invoice review',\n    interaction: 'sys:my_agent',\n    status: ['running', 'completed'],\n    limit: 50,\n});\n```\n\n### Field-name gotchas (the ones that will bite you)\n\n`AgentRunResponse = AgentRun | ProcessRun`. Only `AgentRun` (`run_kind === 'agent'`) has `interaction`, `topic`, `data`. Common mistakes:\n\n| Field                  | What it is                                                                      | Trap                                                                                         |\n| ---------------------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| `run.interaction`      | The interaction **code** (e.g. `\"sys:GeneralAgent\"`) — always set on agent runs | This is what the backend filter accepts and what stable IDs should use.                      |\n| `run.interaction_name` | A _human-readable display name_ — **optional, often empty**                     | Don't filter or key on this; it'll silently drop most rows. Use it as a label fallback only. |\n| `run.topic`            | Long topic generated by topic analysis — **optional, set asynchronously**       | Empty for new conversations.                                                                 |\n| `run.title`            | Short title — **optional, may be empty**                                        | Often unset.                                                                                 |\n| `run.data.user_prompt` | The user's first message — usually present                                      | Best fallback for a label when topic+title are missing.                                      |\n\n**Display-label fallback chain** for conversation rows \u002F sidebars:\n\n```typescript\nconst isAgent = run.run_kind === 'agent';\nconst label =\n    (isAgent ? run.topic : undefined) ||\n    run.title ||\n    (isAgent && typeof run.data === 'object' && run.data\n        ? String((run.data as { user_prompt?: unknown }).user_prompt ?? '').trim() || undefined\n        : undefined) ||\n    'Untitled conversation';\n```\n\n**Agent display + filter values** — use `interaction` as the value, `interaction_name || interaction` as the label:\n\n```typescript\nconst value = isAgent ? run.interaction : undefined;       \u002F\u002F for filters \u002F keys\nconst label = run.interaction_name || run.interaction;     \u002F\u002F for display\n```\n\n### Sort limitations\n\n`agents.list` only sorts by `'started_at' | 'updated_at'`. To sort by any other column (topic, status, agent code), apply the sort **client-side** to the loaded page. `agents.search` doesn't accept a sort parameter at all (results come back by relevance).\n\n## Interaction Execution\n\n```typescript\n\u002F\u002F Synchronous execution (wait for result)\nconst result = await client.interactions.execute({\n    interaction: 'app:my-app:collection:interaction-name',\n    data: { input: 'some data' },\n});\n\n\u002F\u002F Asynchronous execution (start and get run IDs)\nconst result = await client.interactions.executeAsync({\n    type: 'conversation',\n    interaction: 'app:my-app:collection:interaction-name',\n    interactive: true,\n    data: { user_prompt: 'Hello' },\n});\n\u002F\u002F result: { runId: string, workflowId: string }\n```\n\n### Interaction naming convention\n\nInteractions registered by plugins follow this pattern:\n\n```text\napp:\u003Cplugin-name>:\u003Ccollection-name>:\u003Cinteraction-name>\n```\n\n## Authentication Helpers\n\n```typescript\n\u002F\u002F Get raw JWT token\nconst jwt = await client.getRawJWT();\n\n\u002F\u002F Get decoded JWT payload\nconst payload = await client.getDecodedJWT();\n\n\u002F\u002F Get current project from JWT\nconst project = await client.getProject();\n\n\u002F\u002F Get current account from JWT\nconst account = await client.getAccount();\n```\n\n## Client Initialization (standalone)\n\nWhen creating the client directly (outside Vertesia host):\n\n```typescript\nimport { VertesiaClient } from \"@vertesia\u002Fclient\";\n\nconst client = new VertesiaClient({\n    site: 'api.vertesia.io',  \u002F\u002F or 'api-preview.vertesia.io'\n    apikey: 'your-api-key',\n    sessionTags: ['your-session-tag'],\n});\n\n\u002F\u002F Or from an auth token:\nconst client = await VertesiaClient.fromAuthToken(jwtToken);\n```\n\n## Query Patterns\n\nUse MongoDB-style query operators in `find()` and `count()`:\n\n```typescript\n\u002F\u002F Equality\n{ where: { status: 'active' } }\n\n\u002F\u002F Comparison\n{ where: { score: { $gt: 80, $lte: 100 } } }\n\n\u002F\u002F Logical\n{ where: { $and: [{ status: 'active' }, { type: 'article' }] } }\n{ where: { $or: [{ status: 'draft' }, { status: 'review' }] } }\n\n\u002F\u002F In set\n{ where: { category: { $in: ['news', 'blog'] } } }\n```\n\n**Security:** Never pass user input directly as query operators. Validate and whitelist allowed operators to prevent injection.\n\n## Security\n\n### Input Validation\n\nAlways validate user inputs before passing to API calls:\n\n```typescript\n\u002F\u002F Validate ID format before querying\nif (typeof objectId !== 'string' || !objectId.match(\u002F^[0-9a-f]{24}$\u002F)) {\n    throw new Error('Invalid object ID');\n}\nconst object = await client.objects.retrieve(objectId);\n```\n\n### Query Injection Prevention\n\nNever construct queries from raw user input:\n\n```typescript\n\u002F\u002F ❌ BAD — user could inject operators like $where, $regex\nconst filter = JSON.parse(userInput);\nawait client.objects.find({ where: filter });\n\n\u002F\u002F ✅ GOOD — whitelist allowed fields and values\nawait client.objects.find({\n    where: { status: { $eq: validatedStatus }, type: { $eq: validatedType } }\n});\n```\n\n### Authorization\n\nCheck authentication state before accessing protected resources:\n\n```typescript\nconst { client, user } = useUserSession();\n\n\u002F\u002F Verify user has access before performing actions\nif (!user) {\n    throw new Error('Not authenticated');\n}\n```\n\nIn tool server code, the SDK handles JWT validation automatically. Access the authenticated client:\n\n```typescript\nasync run(payload, context) {\n    const client = await context.getClient();\n    \u002F\u002F client is pre-authenticated — org\u002Fproject scoped from the JWT\n}\n```\n\n### Error Handling\n\nNever expose internal API details to users:\n\n```typescript\ntry {\n    await client.objects.delete(objectId);\n} catch (error) {\n    console.error('Delete failed:', error);  \u002F\u002F Log full error server-side\n    throw new Error('Unable to delete item');  \u002F\u002F Generic user-facing message\n}\n```\n\n### Sensitive Data\n\n- Never log JWT tokens, API keys, or user credentials\n- Use `VERTESIA_ALLOWED_ORGS` to restrict tool server access to specific organizations\n- Store secrets in environment variables, never in code\n","# Vertesia Client API\n\nThe `@vertesia\u002Fclient` package provides a typed client for the Vertesia platform.\n\n## Getting the Client\n\n```typescript\n\u002F\u002F In tool server code (inside tool run())\nconst client = await context.getClient();\n\n\u002F\u002F In UI code (React component)\nimport { useUserSession } from \"@vertesia\u002Fui\u002Fsession\";\nconst { client, user, project } = useUserSession();\n```\n\n## Available APIs\n\n### Studio APIs\n\n| API                   | Description                          |\n| --------------------- | ------------------------------------ |\n| `client.projects`     | Project management                   |\n| `client.environments` | Environment configuration            |\n| `client.interactions` | Interaction execution and management |\n| `client.prompts`      | Prompt templates                     |\n| `client.runs`         | Run history and analytics            |\n| `client.account`      | Current account operations           |\n| `client.analytics`    | Analytics data                       |\n| `client.apps`         | Application management               |\n| `client.iam`          | Identity and access management       |\n| `client.users`        | User management                      |\n| `client.apikeys`      | API key management                   |\n| `client.refs`         | Reference management                 |\n| `client.commands`     | Command execution                    |\n\n### Store APIs\n\nAccessible via `client.store.*` or shortcuts:\n\n| API                        | Shortcut           | Description                         |\n| -------------------------- | ------------------ | ----------------------------------- |\n| `client.store.objects`     | `client.objects`   | Content object CRUD, search, upload |\n| `client.store.files`       | `client.files`     | File operations                     |\n| `client.store.types`       | `client.types`     | Content type definitions            |\n| `client.store.workflows`   | `client.workflows` | Workflow management, conversations  |\n| `client.store.collections` | —                  | Collection management               |\n| `client.store.embeddings`  | —                  | Embedding operations                |\n| `client.store.agents`      | —                  | Agent operations                    |\n\n## Object Operations\n\n```typescript\n\u002F\u002F Retrieve by ID\nconst object = await client.objects.retrieve(objectId);\n\n\u002F\u002F List with pagination\nconst objects = await client.objects.list({ limit: 100, offset: 0 });\n\n\u002F\u002F Search by text\nconst results = await client.objects.search({ query: 'search terms' });\n\n\u002F\u002F Find with MongoDB-style queries\nconst objects = await client.objects.find({\n    where: { status: 'active', type: 'article' },\n    limit: 50,\n});\n\n\u002F\u002F Count\nconst { count } = await client.objects.count({ where: { status: 'active' } });\n\n\u002F\u002F Upload content\nawait client.objects.upload(payload);\n\n\u002F\u002F Get download URL\nconst { url } = await client.objects.getDownloadUrl(fileUri);\n\n\u002F\u002F Analyze document\nconst analysis = await client.objects.analyze(objectId);\n```\n\n### Creating an object with an app-owned type\n\nAn object's `type` is either a stored type ObjectId or an in-code app type string. For an app-owned type, pass\nthe portable string directly:\n\n```typescript\nconst appName = import.meta.env.VITE_APP_NAME;\nawait client.objects.create({\n    type: `app:${appName}:bookmark`,\n    properties: { title, url },\n});\n```\n\nDo not resolve app-owned types to project-local ObjectIds with `types.list()` or `getTypeByName()`. The platform\nresolves the `app:\u003Capp-name>:\u003Ctype-name>` string from the app package, including preview builds for the owner.\n\n## Workflow \u002F Conversation Operations\n\n```typescript\n\u002F\u002F List conversations for an interaction\nconst { runs } = await client.store.workflows.listConversations({\n    interaction: 'app:my-app:collection:interaction-name',\n    page_size: 20,\n});\n\u002F\u002F Returns: { runs: WorkflowRun[], next_page_token?, has_more? }\n\u002F\u002F WorkflowRun has: run_id, workflow_id, started_at, status, topic\n\u002F\u002F NOTE: listConversations does NOT return input field — use getRunDetails for that\n\n\u002F\u002F Get full run details (includes input, history)\nconst run = await client.store.workflows.getRunDetails(runId, workflowId);\n\n\u002F\u002F Search runs with filters\nconst results = await client.store.workflows.searchRuns({\n    interaction: 'interaction-name',\n    status: 'completed',\n    page_size: 10,\n});\n\n\u002F\u002F Send signal to active workflow\nawait client.store.workflows.sendSignal(workflowId, runId, 'signal-name', payload);\n```\n\n## Agent Runs (`client.agents`)\n\nFor listing\u002Fsearching the runs that show up in chat sidebars and conversation pages.\n\n```typescript\n\u002F\u002F List recent runs (date-sorted; supports filter + cursor pagination)\nconst { items, total_count, next_cursor } = await client.agents.list({\n    limit: 100,\n    sort: 'started_at',         \u002F\u002F ⚠️ ONLY 'started_at' or 'updated_at' — no other fields\n    order: 'desc',\n    interaction: 'sys:my_agent',  \u002F\u002F optional, single interaction code\n    status: 'completed',          \u002F\u002F optional, single or array\n});\n\n\u002F\u002F Backend full-text search (Elasticsearch)\nconst { hits, total } = await client.agents.search({\n    query: 'invoice review',\n    interaction: 'sys:my_agent',\n    status: ['running', 'completed'],\n    limit: 50,\n});\n```\n\n### Field-name gotchas (the ones that will bite you)\n\n`AgentRunResponse = AgentRun | ProcessRun`. Only `AgentRun` (`run_kind === 'agent'`) has `interaction`, `topic`, `data`. Common mistakes:\n\n| Field                  | What it is                                                                      | Trap                                                                                         |\n| ---------------------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| `run.interaction`      | The interaction **code** (e.g. `\"sys:GeneralAgent\"`) — always set on agent runs | This is what the backend filter accepts and what stable IDs should use.                      |\n| `run.interaction_name` | A _human-readable display name_ — **optional, often empty**                     | Don't filter or key on this; it'll silently drop most rows. Use it as a label fallback only. |\n| `run.topic`            | Long topic generated by topic analysis — **optional, set asynchronously**       | Empty for new conversations.                                                                 |\n| `run.title`            | Short title — **optional, may be empty**                                        | Often unset.                                                                                 |\n| `run.data.user_prompt` | The user's first message — usually present                                      | Best fallback for a label when topic+title are missing.                                      |\n\n**Display-label fallback chain** for conversation rows \u002F sidebars:\n\n```typescript\nconst isAgent = run.run_kind === 'agent';\nconst label =\n    (isAgent ? run.topic : undefined) ||\n    run.title ||\n    (isAgent && typeof run.data === 'object' && run.data\n        ? String((run.data as { user_prompt?: unknown }).user_prompt ?? '').trim() || undefined\n        : undefined) ||\n    'Untitled conversation';\n```\n\n**Agent display + filter values** — use `interaction` as the value, `interaction_name || interaction` as the label:\n\n```typescript\nconst value = isAgent ? run.interaction : undefined;       \u002F\u002F for filters \u002F keys\nconst label = run.interaction_name || run.interaction;     \u002F\u002F for display\n```\n\n### Sort limitations\n\n`agents.list` only sorts by `'started_at' | 'updated_at'`. To sort by any other column (topic, status, agent code), apply the sort **client-side** to the loaded page. `agents.search` doesn't accept a sort parameter at all (results come back by relevance).\n\n## Interaction Execution\n\n```typescript\n\u002F\u002F Synchronous execution (wait for result)\nconst result = await client.interactions.execute({\n    interaction: 'app:my-app:collection:interaction-name',\n    data: { input: 'some data' },\n});\n\n\u002F\u002F Asynchronous execution (start and get run IDs)\nconst result = await client.interactions.executeAsync({\n    type: 'conversation',\n    interaction: 'app:my-app:collection:interaction-name',\n    interactive: true,\n    data: { user_prompt: 'Hello' },\n});\n\u002F\u002F result: { runId: string, workflowId: string }\n```\n\n### Interaction naming convention\n\nInteractions registered by plugins follow this pattern:\n\n```text\napp:\u003Cplugin-name>:\u003Ccollection-name>:\u003Cinteraction-name>\n```\n\n## Authentication Helpers\n\n```typescript\n\u002F\u002F Get raw JWT token\nconst jwt = await client.getRawJWT();\n\n\u002F\u002F Get decoded JWT payload\nconst payload = await client.getDecodedJWT();\n\n\u002F\u002F Get current project from JWT\nconst project = await client.getProject();\n\n\u002F\u002F Get current account from JWT\nconst account = await client.getAccount();\n```\n\n## Client Initialization (standalone)\n\nWhen creating the client directly (outside Vertesia host):\n\n```typescript\nimport { VertesiaClient } from \"@vertesia\u002Fclient\";\n\nconst client = new VertesiaClient({\n    site: 'api.vertesia.io',  \u002F\u002F or 'api-preview.vertesia.io'\n    apikey: 'your-api-key',\n    sessionTags: ['your-session-tag'],\n});\n\n\u002F\u002F Or from an auth token:\nconst client = await VertesiaClient.fromAuthToken(jwtToken);\n```\n\n## Query Patterns\n\nUse MongoDB-style query operators in `find()` and `count()`:\n\n```typescript\n\u002F\u002F Equality\n{ where: { status: 'active' } }\n\n\u002F\u002F Comparison\n{ where: { score: { $gt: 80, $lte: 100 } } }\n\n\u002F\u002F Logical\n{ where: { $and: [{ status: 'active' }, { type: 'article' }] } }\n{ where: { $or: [{ status: 'draft' }, { status: 'review' }] } }\n\n\u002F\u002F In set\n{ where: { category: { $in: ['news', 'blog'] } } }\n```\n\n**Security:** Never pass user input directly as query operators. Validate and whitelist allowed operators to prevent injection.\n\n## Security\n\n### Input Validation\n\nAlways validate user inputs before passing to API calls:\n\n```typescript\n\u002F\u002F Validate ID format before querying\nif (typeof objectId !== 'string' || !objectId.match(\u002F^[0-9a-f]{24}$\u002F)) {\n    throw new Error('Invalid object ID');\n}\nconst object = await client.objects.retrieve(objectId);\n```\n\n### Query Injection Prevention\n\nNever construct queries from raw user input:\n\n```typescript\n\u002F\u002F ❌ BAD — user could inject operators like $where, $regex\nconst filter = JSON.parse(userInput);\nawait client.objects.find({ where: filter });\n\n\u002F\u002F ✅ GOOD — whitelist allowed fields and values\nawait client.objects.find({\n    where: { status: { $eq: validatedStatus }, type: { $eq: validatedType } }\n});\n```\n\n### Authorization\n\nCheck authentication state before accessing protected resources:\n\n```typescript\nconst { client, user } = useUserSession();\n\n\u002F\u002F Verify user has access before performing actions\nif (!user) {\n    throw new Error('Not authenticated');\n}\n```\n\nIn tool server code, the SDK handles JWT validation automatically. Access the authenticated client:\n\n```typescript\nasync run(payload, context) {\n    const client = await context.getClient();\n    \u002F\u002F client is pre-authenticated — org\u002Fproject scoped from the JWT\n}\n```\n\n### Error Handling\n\nNever expose internal API details to users:\n\n```typescript\ntry {\n    await client.objects.delete(objectId);\n} catch (error) {\n    console.error('Delete failed:', error);  \u002F\u002F Log full error server-side\n    throw new Error('Unable to delete item');  \u002F\u002F Generic user-facing message\n}\n```\n\n### Sensitive Data\n\n- Never log JWT tokens, API keys, or user credentials\n- Use `VERTESIA_ALLOWED_ORGS` to restrict tool server access to specific organizations\n- Store secrets in environment variables, never in code\n",{"name":5,"description":7},"main","8539475c1fe2b5c28892aee0ebf4ae2ede63d6fe","templates\u002Fplugin-template\u002F.agents\u002Fskills\u002Fvertesia-api",2,"https:\u002F\u002Fgithub.com\u002Fvertesia\u002Fcomposableai","https:\u002F\u002Fdocs.vertesiahq.com\u002F","https:\u002F\u002Fgithub.com\u002Fvertesia","https:\u002F\u002Fvertesiahq.com\u002F","Vertesia Platform enables the delivery of AI agents for the enterprise","2026-11-14 17:11:16",{"source":9,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add vertesia\u002Fcomposableai --skill vertesia-api",{"tool":72,"command":73},"bunx","bunx skills add vertesia\u002Fcomposableai --skill vertesia-api",{"tool":75,"command":76},"pnpm","pnpm dlx skills add vertesia\u002Fcomposableai --skill vertesia-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvertesia\u002Fcomposableai\u002Fblob\u002Fmain\u002Ftemplates\u002Fplugin-template\u002F.agents\u002Fskills\u002Fvertesia-api\u002FSKILL.md",true,[],[81,111,143,175,194,226],{"skillNo":82,"name":83,"nameZh":84,"description":85,"descriptionZh":86,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":87,"categories":88,"keywords":95,"publishedAt":51},"01M6BXNN3ZE6PEC91D9ZZTQE2N","user-select","用户选项收集","Present users with choices and collect their selections for interactive decision-making","向用户呈现选项并收集其选择，用于交互式决策","https:\u002F\u002Fgithub.com\u002Fvertesia\u002Fcomposableai\u002Fblob\u002Fmain\u002Ftemplates\u002Fplugin-template\u002Fsrc\u002Fmodules\u002Fexamples\u002Fresources\u002Fskills\u002Fuser-select\u002FSKILL.md",[89,92],{"categoryNo":90,"categoryName":91,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BS5011KJDVSRXG1DC4P666","普通用户",{"categoryNo":93,"categoryName":94,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C9XZ92SSCN913ZXMSBA095","通用助手与问答",[96,97,98,99,100,101,102,103,104,45,105,106,107,108,109,110],"user select","user","choice","select","choose","collect","option","pick","decision","selection","decision-making","interactive","users","with","present",{"skillNo":112,"name":113,"nameZh":114,"description":115,"descriptionZh":116,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":117,"categories":118,"keywords":123,"publishedAt":51},"01M6BXNJ345BFTENXS7FX21HF5","vertesia-ui","Vertesia React UI 组件开发","Reference for building UIs with @vertesia\u002Fui. Covers component API (Input, Button, VModal, VTabs, Table), list\u002Fdetail tables with infinite scroll, sortable headers, FilterProvider with URL persistence and inline row filters, layout (Sidebar, FullHeightLayout, GenericPageNavHeader), routing (NestedRouterProvider, useParams, useNavigate), agent conversation (ModernAgentConversation), styling, and security. Use when creating or modifying React UI pages or components.","使用 @vertesia\u002Fui 构建 UI 的参考资料。涵盖组件 API（Input、Button、VModal、VTabs、Table）、支持无限滚动的列表\u002F详情表格、可排序表头、带 URL 持久化和内联行过滤的 FilterProvider、布局组件（Sidebar、FullHeightLayout、GenericPageNavHeader）、路由（NestedRouterProvider、useParams、useNavigate）、智能体对话（ModernAgentConversation）、样式与安全。当创建或修改 React UI 页面或组件时使用。","https:\u002F\u002Fgithub.com\u002Fvertesia\u002Fcomposableai\u002Fblob\u002Fmain\u002Ftemplates\u002Fplugin-template\u002F.agents\u002Fskills\u002Fvertesia-ui\u002FSKILL.md",[119,120],{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":121,"categoryName":122,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现",[124,49,125,126,127,128,129,31,130,131,132,133,134,40,135,136,137,138,139,140,141,142,45],"vertesia ui","routing","component","security","persistence","components","react ui","react","table","conversation","filters","URL","inline","layout","headers","input","list","styling","tables",{"skillNo":144,"name":145,"nameZh":146,"description":147,"descriptionZh":148,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":149,"categories":150,"keywords":155,"publishedAt":51},"01M6BXNFE34HBA36Z762ZFX5KZ","vertesia-tool-server-resource","Vertesia 工具服务器资源创建","Creates tools, skills, interactions, content types, rendering templates, hooks, and event subscriptions for the Vertesia plugin tool server. Handles file scaffolding and module resource index wiring. Use when adding new tool server resources to this plugin.","为 Vertesia 插件工具服务器创建工具、技能、交互、内容类型、渲染模板、钩子和事件订阅。处理文件脚手架搭建与模块资源索引接线。当向此插件添加新的工具服务器资源时使用。","https:\u002F\u002Fgithub.com\u002Fvertesia\u002Fcomposableai\u002Fblob\u002Fmain\u002Ftemplates\u002Fplugin-template\u002F.agents\u002Fskills\u002Fvertesia-tool-server-resource\u002FSKILL.md",[151,152],{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":153,"categoryName":154,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理",[156,157,158,159,160,161,162,47,163,164,165,166,45,167,168,169,170,171,41,40,172,173,174],"server","vertesia tool server resource","tool","vertesia plugin","plugin","templates","index","file","content","resources","types","event","scaffolding","hooks","module","new","wiring","subscriptions","rendering",{"skillNo":176,"name":177,"nameZh":178,"description":179,"descriptionZh":180,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":181,"categories":182,"keywords":185,"publishedAt":51},"01M6BXNCQ0HSADEWKBYMHWW911","vertesia-plugin","Vertesia 插件架构参考","Reference for plugin architecture, dual build system, import hooks, and deployment. Use when understanding plugin structure or build configuration. For creating resources use vertesia-tool-server-resource; for UI use vertesia-ui; for client API use vertesia-api.","关于插件架构、双构建系统、导入钩子和部署的参考资料。用于理解插件结构或构建配置。创建资源请使用 vertesia-tool-server-resource；构建 UI 请使用 vertesia-ui；客户端 API 请使用 vertesia-api。","https:\u002F\u002Fgithub.com\u002Fvertesia\u002Fcomposableai\u002Fblob\u002Fmain\u002Ftemplates\u002Fplugin-template\u002F.agents\u002Fskills\u002Fvertesia-plugin\u002FSKILL.md",[183,184],{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":153,"categoryName":154,"taxonomyType":23,"taxonomyTypeDesc":24},[159,160,156,186,187,158,49,188,31,189,190,165,45,191,169,41,40,192,193,36,35],"deployment","system","architecture","Plugin Structure","import","plugin architecture","structure","build",{"skillNo":195,"name":196,"nameZh":197,"description":198,"descriptionZh":199,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":200,"categories":201,"keywords":206,"publishedAt":51},"01M6BXNADJ2AVJ13K483WGYX52","vertesia-gap-assessment","Vertesia 需求能力差距评估","Assess the gap between arbitrary requirements and existing Vertesia capabilities before proposing implementation work. Use when reviewing requirement documents, discovery notes, demo asks, or feature requests for a Vertesia app, plugin, workflow, or agent so you can separate native platform support, installed project capabilities, current app implementation, and true custom work.","在提出实现方案之前，评估任意需求与现有 Vertesia 能力之间的差距。在审查 Vertesia 应用、插件、工作流或智能体的需求文档、调研笔记、演示请求或功能请求时使用，以便区分平台原生支持、已安装的项目能力、当前应用实现和真正需要自定义开发的工作。","https:\u002F\u002Fgithub.com\u002Fvertesia\u002Fcomposableai\u002Fblob\u002Fmain\u002Ftemplates\u002Fplugin-template\u002F.agents\u002Fskills\u002Fvertesia-gap-assessment\u002FSKILL.md",[202,203],{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":204,"categoryName":205,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C4MZTN2Z748WNZF599EMBT","需求澄清与上下文补全",[207,208,209,210,160,211,212,213,214,215,216,217,218,219,40,220,221,222,223,46,45,224,225],"assessment","vertesia gap assessment","gap","notes","support","discovery","feature requests","documents","workflow","capabilities","demo","app","project","you","work","native","feature","custom","true",{"skillNo":227,"name":228,"nameZh":229,"description":230,"descriptionZh":231,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":232,"categories":233,"keywords":236,"publishedAt":51},"01M6BXN8KCREMS04Z0NF2Z77RP","vertesia-dsl-workflow","Vertesia DSL 工作流参考","Reference for DSL workflow definitions, remote activities, variable resolution, and conditions. Use when creating or debugging DSL workflows that call remote activities from plugins.","DSL 工作流定义、远程活动、变量解析和条件处理的参考。在创建或调试调用插件远程活动的 DSL 工作流时使用。","https:\u002F\u002Fgithub.com\u002Fvertesia\u002Fcomposableai\u002Fblob\u002Fmain\u002Ftemplates\u002Fplugin-template\u002F.agents\u002Fskills\u002Fvertesia-dsl-workflow\u002FSKILL.md",[234,235],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[237,215,238,239,240,48,45,43,241,41,40,242,35],"vertesia dsl workflow","dsl","plugins","debugging","remote","resolution"]