Manifest reference
A manifest is the JSON document that defines a Kit. It is a consent document: everything a Kit may do in a workspace is declared here, and the admin who installs the Kit sees it.
JSON Schema: /schemas/kit-manifest/v1.json (draft 2020-12). Its canonical id
is https://ketvia.com/schemas/kit-manifest/v1.json. Point your editor at it for completion and validation. Ketvia
also runs checks that a JSON Schema cannot express (listed below), so a manifest that passes the schema can still be
rejected with a precise message.
General rules
Section titled “General rules”schemaVersionis1. Unknown keys are rejected at every level.- Localized strings are objects such as
{ "en": "Acme CI", "tr": "Acme CI" }.enis required;tris optional and falls back toen. Strings are trimmed and must not be empty. - URLs must be
https, without credentials (user:pass@) or a fragment (#…), at most 2000 characters. - The whole manifest is at most 64 KB.
Example
Section titled “Example”{ "schemaVersion": 1, "slug": "acme-ci-notify", "version": "0.1.0", "displayName": { "en": "Acme CI" }, "description": { "en": "Posts build results to a channel." }, "developer": { "name": "Acme Inc.", "url": "https://acme.dev", "supportEmail": "[email protected]" }, "privacyPolicyUrl": "https://acme.dev/privacy", "bot": { "displayName": { "en": "Acme CI" }, "scopes": ["incoming-webhook"] }, "incomingWebhooks": { "maxPerInstallation": 5 }, "distribution": "private"}Fields
Section titled “Fields”| Field | Type | Required | Rules |
|---|---|---|---|
schemaVersion |
1 |
Yes | Always 1. |
slug |
string | Yes | ^[a-z][a-z0-9-]{1,39}$: 2 to 40 characters, lowercase letters, digits and hyphens, starting with a letter. Global across Ketvia; some slugs are reserved. Never changes. |
version |
string | Yes | major.minor.patch, digits only, no leading zeros, no pre-release suffix (for example 1.4.0). |
displayName |
localized, ≤ 60 | Yes | The Kit’s name. |
description |
localized, ≤ 500 | Yes | What the Kit does, shown at install. |
developer.name |
string, ≤ 80 | Yes | Who publishes the Kit. |
developer.url |
URL | Yes | The developer’s website. |
developer.supportEmail |
email, ≤ 254 | Yes | Where workspace admins get help. |
privacyPolicyUrl |
URL | Yes | The Kit’s privacy policy. |
icon |
URL | No | The Kit’s icon. |
categories |
string[] ≤ 5 | No | Each ^[a-z][a-z0-9-]{1,30}$. Default []. |
locales |
"en" | "tr", 1–2 |
No | Languages the Kit supports. Default ["en"]. Every listed locale other than en needs a displayName in that language. |
bot.displayName |
localized, ≤ 60 | Yes | The Kit bot’s name, shown as the author of its messages. |
bot.scopes |
scope[] | No | Bot scopes. Default []. See Scopes. |
userScopes |
scope[] | No | Scopes a member can grant to a user token. Default []. |
incomingWebhooks |
object | No | { "maxPerInstallation": 1–20 }. Requires the incoming-webhook bot scope. |
oauth.redirectUrls |
URL[] 1–10 | No | Where Ketvia may send the member back in the kit.access flow. The redirect_uri of each request must equal one of them. |
distribution |
string | Yes | private, unlisted or directory. unlisted needs verified domains for every endpoint host (see Distribution); directory is not available yet. |
requestedModelDataPolicy |
"none" | "answer" |
No | Default none. Must be none in this phase. See Model data policy. |
tools |
object | No | Assistant tools served by your endpoint (endpoint, items, planner). Write tools end in an approval card; read results are cards. See Tools and Planner hook. |
failureCodes |
object | No | Maps a tool’s machine error codes to Ketvia failure codes. Only meaningful with tools. |
events |
object | No | { url, subscribe[] }. See Events. |
interactivity |
object | No | { url }. See Interactivity. |
commands |
object[] | No | Slash commands. Needs the commands bot scope; built-in names are reserved. See Slash commands. |
externalAuth |
object | No | OAuth that Ketvia performs towards the Kit’s own service. Not available to private Kits yet. |
settings |
object | No | The installation settings form: a JSON Schema object with x-ketvia-* annotations. See Settings and Installation settings. |
feeds |
object[] | No | Event types the Kit publishes (at most 20). Needs the feeds:publish bot scope. See Feeds and Event feeds. |
records |
object[] | No | The record types your product has (at most 10), and optionally the tool that returns a record’s balance. See Records and Records and notes. |
linkDomains |
string[] | No | Host names (at most 10) that link buttons in your result cards may open. See Link domains. |
The tools object declares what Ketvia’s assistants may call: endpoint, auth, timezone and items, plus these
fields:
| Field | Type | Meaning |
|---|---|---|
tools.planner.endpoint |
URL (https), optional | Your planner hook: Ketvia asks it which tool answers a question before any model, with a 1.5 second budget. It follows the same verified-host rule as tools.endpoint, and the consent screen says the Kit receives the questions asked to the assistant. |
tools.auth |
signature (default), externalAuth or signature+externalToken |
How a call to your endpoint is authenticated. signature: Ketvia’s signature only. signature+externalToken: the signature plus the installation’s current access token for the connected external account in Ketvia-External-Authorization: Bearer <token>; a Kit with it may also fetch that token itself with POST /installation/external-token (scope external-token:read). externalAuth: the installation’s external OAuth bearer token in Authorization. Both token modes need an externalAuth section. |
tools.items[].selection |
{ "argument": string }, optional |
Marks a tool that can answer “which record?”. argument is the free-text input (for example query) and must name one of the tool’s input properties. When a follow-up’s previous run used it, the planner hook gets previous.choice. |
Attachments
Section titled “Attachments”A tool may declare that it works from a document the requester posted (a photo or a PDF). The assistant reads the
document with its vision model and calls the tool with what it read: the declaration says nothing about the arguments,
which still follow the tool’s ordinary inputSchema.
"attachments": { "accept": ["image/jpeg", "image/png", "application/pdf"], "maxFiles": 5, "dataClass": "personal" }| Field | Rule |
|---|---|
accept |
A non-empty list of distinct types out of image/jpeg, image/png and application/pdf. |
maxFiles |
1 to 5 (several photos of one document set, or a multi-page PDF). |
dataClass |
What the documents contain: standard, personal or sensitive, never above the tool’s own dataClass. |
A tool with attachments must have "audience": "private" (a document is the requester’s own and never goes through
a channel run), and at most 3 tools of a manifest may declare it. Each file is at most 4.5 MB and a request at most
10 MB in total; a PDF is read up to 10 pages and an image is scaled to at most 2000 pixels on its longer edge. The
install consent does not list attachments: whether documents may reach the model is the owner’s decision in the
model data policy.
Records
Section titled “Records”records declares the kinds of thing people talk about in your product, so that a note a member saves from one of your
result cards, or that the assistant saves after reading your data, can be linked to the record. A link is stored on the
note as kit:<slug>:<type>, the record id and a label.
"records": [ { "type": "customer", "label": { "en": "Customer", "tr": "Müşteri" }, "balance": { "tool": "customer_balance", "argument": "customerId", "remainingPath": "remaining", "currencyPath": "currency" } }]type:^[a-z][a-z0-9_]{0,31}$(no:), unique in the manifest.label: localized, up to 60 characters.balance(optional) tells Ketvia how to ask your Kit what a record’s balance is, so a member can compare it with the figures in their own notes.toolmust be a read tool of this manifest andargumentone of its inputs (the record id goes there).remainingPathnames a numeric property of the tool’soutputSchemaholding what is still owed, in major units. Give exactly one ofcurrency(a fixed ISO 4217 code) andcurrencyPath(a string property of the output that carries the code).- The balance is read by an ordinary private assistant run that calls your tool. It needs the member’s own private grant of that tool, so it follows the usual grants and fences. Ketvia compares your figure with its own notes and shows a notice when they differ; it never changes anything in your product, and never corrects its notes from your figure.
- A
recordin a card button, in a tool result’s_meta.ketvia.records, or in a batch item’s follow-up must use a declaredtype.
Link domains
Section titled “Link domains”linkDomains lists the host names that link buttons in your result cards may open, for example
["app.acme.example"]. A card button’s url must be https and its host must equal one of them or be a subdomain of one;
a card with any other link is not shown (Ketvia renders the template card from your manifest instead). Each entry is a
lower-case host name of 3 to 253 characters. For unlisted and directory Kits the domains must be verified like the
endpoint hosts (see Distribution). A link button never reaches your Kit: it opens after Ketvia’s
“Leaving Ketvia” confirmation.
Settings
Section titled “Settings”settings declares the form an admin fills in on the Kit’s admin page: an object schema in the
safe subset whose fields carry x-ketvia-widget (channel, time, weekday,
toggle or select), x-ketvia-label and x-ketvia-order, and optionally x-ketvia-help, x-ketvia-group (a key of
x-ketvia-groups), x-ketvia-ownerOnly and x-ketvia-enumLabels. 1 to 30 fields, at most 10 groups and 8 KB. The Kit
reads the values with GET /installation/settings and learns about changes from the kit.settings_changed event. The
full rules and an example are on Installation settings.
feeds lists the event types the Kit can publish:
"feeds": [ { "type": "payment.received", "title": { "en": "Payment received" }, "description": { "en": "A payment was recorded." }, "dataClasses": ["standard"] }]type matches ^[a-z][a-z0-9_.]{0,39}$ and is unique; title is up to 60 characters and description up to 200;
dataClasses lists 1 to 4 distinct classes the messages may contain. At most 20 feeds. A manifest with feeds needs
the feeds:publish bot scope and the scope needs at least one feed. Adding a feed is a new manifest version. See
Event feeds.
Cross-field checks
Section titled “Cross-field checks”Beyond the JSON Schema, Ketvia checks:
incomingWebhooksneedsincoming-webhookinbot.scopes.commandsneeds thecommandsbot scope; each event subscription needs the matching read scope.- Each locale in
localesother thanenhas adisplayNamein that language. - Private Kits in this phase:
distributionisprivate,requestedModelDataPolicyisnone, and there is noexternalAuthsection and noassistant:toolsbot scope (declaringtoolsgrants it).tools,events,interactivityandcommandsare available; a command may not use a reserved Ketvia name. tools[].selection.argumentmust name one of the tool’s input properties.feedsneeds thefeeds:publishbot scope, andfeeds:publishneeds at least one feed.tools[].attachmentsneeds"audience": "private"and adataClassno higher than the tool’s; at most 3 tools declare it.records[].balance.toolis a read tool of the manifest,argumentis one of its inputs,remainingPatha numeric andcurrencyPatha string property of itsoutputSchema, with exactly one ofcurrencyandcurrencyPath; record types are unique.tools.authexternalAuthorsignature+externalTokenneedsexternalAuth, and theexternal-token:readscope needs both.
Ketvia answers the first problem it finds with the field path, for example
Invalid manifest: bot.scopes.0: ….
Versions and updates
Section titled “Versions and updates”To update a private Kit, upload a manifest with the same slug and a higher version through Create a private
Kit. The Kit and the workspace’s installation move to the new version at once.
- A version equal to or lower than the installed one is rejected.
- Uploading an existing version with different content is rejected: versions are immutable.
- If the new version requests fewer scopes, existing tokens lose the removed scopes at once. Tokens never gain scopes they were not issued with.
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Manifest size | 64 KB |
| Tools | 50 |
| Slash commands | 25 |
| Event subscriptions | 30 |
| Record types | 10 |
| Link domains | 10 |
| Feeds | 20 |
| Tool schema size | 8 KB each |
| Tool schema depth | 6 |
maxLength on schema strings |
≤ 4096 |
maxItems on schema arrays |
≤ 200 |
| Incoming webhooks per installation | 1–20 |
| OAuth redirect URLs | 1–10 |
The safe JSON Schema subset
Section titled “The safe JSON Schema subset”Tool input and output schemas (later phase) use a restricted JSON Schema, so that Ketvia can validate every argument and result without running remote regular expressions or following references:
- Allowed keywords:
type(one ofobject,string,integer,number,boolean,array),properties,required,additionalProperties,enum(1 to 100 primitive values),const,minimum,maximum,minLength,maxLength,minItems,maxItems,items,description,title(≤ 1000 characters) andx-ketvia-dataClass(aggregate,standard,personalorsensitive). formatonly on strings, one ofdate,date-time,uuid,email,uri.- Objects must set
"additionalProperties": false; at most 50 properties, named^[A-Za-z_][A-Za-z0-9_]{0,63}$. - Strings must set
maxLength(≤ 4096). Arrays must setminItemsandmaxItems(≤ 200) anditems. - Not allowed:
$ref,pattern,oneOf,anyOf,allOf,ifand any other keyword. - Depth at most 6, at most 8 KB per schema, and the top level is an object.