Manifest Schema

Complete reference for manifest.json.

Top-Level Fields

FieldTypeRequiredDescription
schemaVersionnumberYesSchema version (currently 1)
idstringYesUnique identifier
namestringYesHuman-readable name
descriptionstringYesWhat the trik does
versionstringYesSemantic version
actionsobjectYesAvailable operations
capabilitiesobjectYesFeature flags
limitsobjectYesExecution constraints
entryobjectYesCode entry point
configobjectNoConfiguration requirements
authorstringNoAuthor name
repositorystringNoRepository URL
licensestringNoLicense 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

ModeUse When
templateAgent needs to understand and reason about the result
passthroughContent 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 enum for constrained values
  • Use integer for 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 } }
FieldTypeDefaultDescription
enabledbooleanfalseEnable session support
maxDurationMsinteger1800000Session timeout (30 min)
maxHistoryEntriesinteger10Max history items

Storage

{ "storage": { "enabled": true, "maxSizeBytes": 104857600, "persistent": true } }
FieldTypeDefaultDescription
enabledbooleanfalseEnable persistent storage
maxSizeBytesinteger104857600Max storage size (100MB)
persistentbooleantruePersist across sessions

Tools

{ "tools": [] }

Declares external tools the trik uses. Used for registry search and tooling.

Limits

{ "limits": { "maxExecutionTimeMs": 5000 } }
FieldTypeDefaultDescription
maxExecutionTimeMsinteger30000Maximum runtime before timeout

Entry Point

{ "entry": { "module": "./dist/graph.js", "export": "default", "runtime": "node" } }
FieldTypeRequiredDescription
modulestringYesPath to JavaScript/Python file
exportstringYesExport name or “default”
runtimestringNo"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

FieldTypeRequiredDescription
keystringYesConfiguration key name
descriptionstringYesHuman-readable description
defaultstringNoDefault value (optional configs only)

Enforcement Status

Fields have different enforcement behaviors:

FieldEnforcementDescription
capabilities.toolsDeclarativeRegistry search; not runtime enforced
capabilities.sessionEnforcedGateway creates/manages sessions
capabilities.storageEnforcedGateway provides storage, enforces quotas
limits.maxExecutionTimeMsEnforcedGateway aborts after timeout
config.requiredEnforcedGateway 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:

TypeSupported
stringYes
integerYes
numberYes
booleanYes
arrayYes
objectYes
nullYes

Supported keywords:

  • type, enum, const
  • properties, required, additionalProperties
  • items, minItems, maxItems
  • minimum, maximum, minLength, maxLength
  • pattern, format
  • description, default