Manifest Schema
Complete reference for manifest.json.
Top-Level Fields
| Field | Type | Required | Description |
|---|---|---|---|
schemaVersion | number | Yes | Schema version (currently 1) |
id | string | Yes | Unique identifier |
name | string | Yes | Human-readable name |
description | string | Yes | What the trik does |
version | string | Yes | Semantic version |
actions | object | Yes | Available operations |
capabilities | object | Yes | Feature flags |
limits | object | Yes | Execution constraints |
entry | object | Yes | Code entry point |
config | object | No | Configuration requirements |
author | string | No | Author name |
repository | string | No | Repository URL |
license | string | No | License identifier |
Full Schema
{
"schemaVersion": 1,
"id": "@publisher/trik-name",
"name": "Trik Name",
"description": "Description of what this trik does.",
"version": "1.0.0",
"actions": {
"actionName": {
"description": "What this action does",
"responseMode": "template | passthrough",
"inputSchema": { /* JSON Schema */ },
"agentDataSchema": { /* JSON Schema (template mode) */ },
"userContentSchema": { /* JSON Schema (passthrough mode) */ },
"responseTemplates": {
"templateName": { "text": "Response with {{placeholders}}." }
}
}
},
"capabilities": {
"tools": [],
"session": {
"enabled": true,
"maxDurationMs": 1800000,
"maxHistoryEntries": 10
},
"storage": {
"enabled": false,
"maxSizeBytes": 104857600,
"persistent": true
}
},
"limits": {
"maxExecutionTimeMs": 5000
},
"entry": {
"module": "./dist/graph.js",
"export": "default",
"runtime": "node"
},
"config": {
"required": [],
"optional": []
}
}ID Format
@publisher/trik-name
publisher/trik-name- Must be unique in the registry
- Use lowercase letters, numbers, hyphens
- Scoped with
@recommended for personal triks
Actions
Action Definition
interface ActionDefinition {
description: string;
responseMode: 'template' | 'passthrough';
inputSchema: JSONSchema;
agentDataSchema?: JSONSchema;
userContentSchema?: JSONSchema;
responseTemplates?: Record<string, { text: string }>;
}Response Mode
| Mode | Use When |
|---|---|
template | Agent needs to understand and reason about the result |
passthrough | Content should go directly to user |
Input Schema
Standard JSON Schema for validating action inputs:
{
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search query",
"minLength": 1,
"maxLength": 500
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 10
},
"category": {
"type": "string",
"enum": ["news", "blogs", "docs"]
}
},
"required": ["query"]
}
}Agent Data Schema (Template Mode)
{
"agentDataSchema": {
"type": "object",
"properties": {
"template": {
"type": "string",
"enum": ["success", "empty", "error"],
"description": "Which template to use"
},
"count": {
"type": "integer",
"minimum": 0
},
"ids": {
"type": "array",
"items": { "type": "string" }
}
},
"required": ["template"]
}
}Security constraints:
- Use
enumfor constrained values - Use
integerfor counts - Use arrays of IDs, not full objects
- Never include free-form strings
User Content Schema (Passthrough Mode)
{
"userContentSchema": {
"type": "object",
"properties": {
"contentType": {
"type": "string",
"enum": ["article", "document", "code"]
},
"content": {
"type": "string"
},
"metadata": {
"type": "object",
"properties": {
"title": { "type": "string" },
"wordCount": { "type": "integer" }
}
}
},
"required": ["contentType", "content"]
}
}Response Templates
{
"responseTemplates": {
"success": { "text": "Found {{count}} results." },
"empty": { "text": "No results found for {{query}}." },
"error": { "text": "An error occurred." }
}
}Placeholders use {{fieldName}} syntax, populated from agentData.
Capabilities
Session
{
"session": {
"enabled": true,
"maxDurationMs": 1800000,
"maxHistoryEntries": 10
}
}| Field | Type | Default | Description |
|---|---|---|---|
enabled | boolean | false | Enable session support |
maxDurationMs | integer | 1800000 | Session timeout (30 min) |
maxHistoryEntries | integer | 10 | Max history items |
Storage
{
"storage": {
"enabled": true,
"maxSizeBytes": 104857600,
"persistent": true
}
}| Field | Type | Default | Description |
|---|---|---|---|
enabled | boolean | false | Enable persistent storage |
maxSizeBytes | integer | 104857600 | Max storage size (100MB) |
persistent | boolean | true | Persist across sessions |
Tools
{
"tools": []
}Declares external tools the trik uses. Used for registry search and tooling.
Limits
{
"limits": {
"maxExecutionTimeMs": 5000
}
}| Field | Type | Default | Description |
|---|---|---|---|
maxExecutionTimeMs | integer | 30000 | Maximum runtime before timeout |
Entry Point
{
"entry": {
"module": "./dist/graph.js",
"export": "default",
"runtime": "node"
}
}| Field | Type | Required | Description |
|---|---|---|---|
module | string | Yes | Path to JavaScript/Python file |
export | string | Yes | Export name or “default” |
runtime | string | No | "node" (default) or "python" |
Configuration
Declare required and optional configuration values (API keys, tokens):
{
"config": {
"required": [
{ "key": "API_KEY", "description": "API key for the service" }
],
"optional": [
{ "key": "TIMEOUT", "description": "Request timeout", "default": "30000" }
]
}
}Config Requirement
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Configuration key name |
description | string | Yes | Human-readable description |
default | string | No | Default value (optional configs only) |
Enforcement Status
Fields have different enforcement behaviors:
| Field | Enforcement | Description |
|---|---|---|
capabilities.tools | Declarative | Registry search; not runtime enforced |
capabilities.session | Enforced | Gateway creates/manages sessions |
capabilities.storage | Enforced | Gateway provides storage, enforces quotas |
limits.maxExecutionTimeMs | Enforced | Gateway aborts after timeout |
config.required | Enforced | Gateway validates before execution |
Declarative fields inform tooling and registry but are not runtime-enforced. Enforced fields are validated and enforced by the gateway at runtime.
JSON Schema Types
Supported JSON Schema features:
| Type | Supported |
|---|---|
string | Yes |
integer | Yes |
number | Yes |
boolean | Yes |
array | Yes |
object | Yes |
null | Yes |
Supported keywords:
type,enum,constproperties,required,additionalPropertiesitems,minItems,maxItemsminimum,maximum,minLength,maxLengthpattern,formatdescription,default