activity-core/schemas/activity-definition.json
tegwick 26934e25b9
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Build and Publish Container Image / build-and-push (push) Successful in 21s
Enforce bounded operation guardrails
Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a028de-e2c8-7732-8521-46a7fc5db82f
2026-08-23 12:31:13 +02:00

554 lines
No EOL
14 KiB
JSON

{
"$defs": {
"ActionDef": {
"properties": {
"task_template": {
"description": "Path to task template .md, relative to repo root.",
"title": "Task Template",
"type": "string"
},
"target_repo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Attribute-access expression or literal repo slug.",
"title": "Target Repo"
},
"priority": {
"default": "medium",
"title": "Priority",
"type": "string"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
},
"due_in_days": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Due In Days"
},
"approach_hint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Approach Hint"
},
"harness_profile_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Harness Profile Ref"
},
"execution_refs": {
"additionalProperties": true,
"title": "Execution Refs",
"type": "object"
}
},
"required": [
"task_template"
],
"title": "ActionDef",
"type": "object"
},
"ContextSource": {
"description": "One external data source that the workflow queries to build the context snapshot.",
"properties": {
"name": {
"default": "",
"description": "Logical name; referenced as 'context.<name>' in templates.",
"title": "Name",
"type": "string"
},
"type": {
"description": "Source adapter type: 'repo-scoping' | 'state-hub' | etc.",
"title": "Type",
"type": "string"
},
"query": {
"default": "",
"description": "Named query to execute against the source.",
"title": "Query",
"type": "string"
},
"params": {
"additionalProperties": true,
"title": "Params",
"type": "object"
},
"bind_to": {
"default": "",
"description": "Context key to bind the result to.",
"title": "Bind To",
"type": "string"
},
"required": {
"default": false,
"description": "When true, resolver failures fail the activity run instead of binding {}.",
"title": "Required",
"type": "boolean"
}
},
"required": [
"type"
],
"title": "ContextSource",
"type": "object"
},
"CronTriggerConfig": {
"properties": {
"trigger_type": {
"const": "cron",
"default": "cron",
"title": "Trigger Type",
"type": "string"
},
"cron_expression": {
"description": "Standard 5-field cron expression, e.g. '0 9 * * 1-5'.",
"title": "Cron Expression",
"type": "string"
},
"timezone": {
"default": "UTC",
"description": "IANA timezone name.",
"title": "Timezone",
"type": "string"
},
"jitter_seconds": {
"default": 0,
"minimum": 0,
"title": "Jitter Seconds",
"type": "integer"
},
"misfire_policy": {
"default": "skip",
"enum": [
"skip",
"catchup_all",
"catchup_latest",
"catchup",
"compress"
],
"title": "Misfire Policy",
"type": "string"
},
"catchup_window_seconds": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Catchup Window Seconds"
}
},
"required": [
"cron_expression"
],
"title": "CronTriggerConfig",
"type": "object"
},
"EventTriggerConfig": {
"properties": {
"trigger_type": {
"const": "event",
"default": "event",
"title": "Trigger Type",
"type": "string"
},
"event_type": {
"description": "Matches EventEnvelope.type. Router fires this activity on match.",
"title": "Event Type",
"type": "string"
},
"filters": {
"additionalProperties": true,
"description": "All filters must match EventEnvelope.attributes for routing.",
"title": "Filters",
"type": "object"
}
},
"required": [
"event_type"
],
"title": "EventTriggerConfig",
"type": "object"
},
"InstructionDef": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"condition": {
"default": "",
"description": "Optional pre-filter using Rule DSL; empty means always execute.",
"title": "Condition",
"type": "string"
},
"trusted_fields": {
"description": "Allowlist of event/context fields that may appear in the prompt template.",
"items": {
"type": "string"
},
"title": "Trusted Fields",
"type": "array"
},
"model": {
"description": "LLM model identifier, e.g. 'claude-sonnet-4-6'.",
"title": "Model",
"type": "string"
},
"temperature": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Temperature"
},
"max_tokens": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Tokens"
},
"max_depth": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Depth"
},
"model_params": {
"additionalProperties": true,
"title": "Model Params",
"type": "object"
},
"prompt": {
"description": "Prompt template with {field.path} placeholders.",
"title": "Prompt",
"type": "string"
},
"output_schema": {
"description": "Path to JSON Schema file for output validation.",
"title": "Output Schema",
"type": "string"
},
"review_advisory": {
"default": false,
"description": "Advisory evidence only; activity-core applies no review gate.",
"title": "Review Advisory",
"type": "boolean"
},
"review_required": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"deprecated": true,
"description": "Deprecated input alias for review_advisory.",
"title": "Review Required"
},
"report_sinks": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Report Sinks",
"type": "array"
},
"approach_hint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Approach Hint"
},
"harness_profile_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Harness Profile Ref"
},
"execution_refs": {
"additionalProperties": true,
"title": "Execution Refs",
"type": "object"
}
},
"required": [
"id",
"trusted_fields",
"model",
"prompt",
"output_schema"
],
"title": "InstructionDef",
"type": "object"
},
"RuleDef": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"for_each": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional event/context path to a list for per-item rule expansion.",
"title": "For Each"
},
"bind_as": {
"default": "item",
"description": "Context key used for each item when for_each is set.",
"title": "Bind As",
"type": "string"
},
"condition": {
"default": "",
"description": "Rule DSL expression; empty string means always true.",
"title": "Condition",
"type": "string"
},
"action": {
"$ref": "#/$defs/ActionDef"
}
},
"required": [
"id",
"action"
],
"title": "RuleDef",
"type": "object"
},
"ScheduledTriggerConfig": {
"description": "One-off future trigger that fires once at a specified UTC datetime.",
"properties": {
"trigger_type": {
"const": "scheduled",
"default": "scheduled",
"title": "Trigger Type",
"type": "string"
},
"at": {
"description": "UTC datetime when the workflow should be triggered.",
"format": "date-time",
"title": "At",
"type": "string"
},
"timezone": {
"default": "UTC",
"description": "IANA timezone name (informational).",
"title": "Timezone",
"type": "string"
}
},
"required": [
"at"
],
"title": "ScheduledTriggerConfig",
"type": "object"
},
"TaskTemplate": {
"description": "Legacy persisted shape; no in-repo task executor consumes it.",
"properties": {
"task_type": {
"description": "Legacy downstream task type metadata; not an executor selector.",
"title": "Task Type",
"type": "string"
},
"condition": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Condition"
},
"params_template": {
"additionalProperties": true,
"title": "Params Template",
"type": "object"
}
},
"required": [
"task_type"
],
"title": "TaskTemplate",
"type": "object"
}
},
"description": "Versioned definition: trigger + context sources + rules/instructions.",
"properties": {
"id": {
"format": "uuid",
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"enabled": {
"default": true,
"title": "Enabled",
"type": "boolean"
},
"trigger_config": {
"discriminator": {
"mapping": {
"cron": "#/$defs/CronTriggerConfig",
"event": "#/$defs/EventTriggerConfig",
"scheduled": "#/$defs/ScheduledTriggerConfig"
},
"propertyName": "trigger_type"
},
"oneOf": [
{
"$ref": "#/$defs/CronTriggerConfig"
},
{
"$ref": "#/$defs/EventTriggerConfig"
},
{
"$ref": "#/$defs/ScheduledTriggerConfig"
}
],
"title": "Trigger Config"
},
"context_sources": {
"items": {
"$ref": "#/$defs/ContextSource"
},
"title": "Context Sources",
"type": "array"
},
"rules": {
"items": {
"$ref": "#/$defs/RuleDef"
},
"title": "Rules",
"type": "array"
},
"instructions": {
"items": {
"$ref": "#/$defs/InstructionDef"
},
"title": "Instructions",
"type": "array"
},
"task_templates": {
"items": {
"$ref": "#/$defs/TaskTemplate"
},
"title": "Task Templates",
"type": "array"
},
"dedupe_key_strategy": {
"default": "skip",
"deprecated": true,
"description": "Legacy persistence compatibility metadata; runtime scheduling uses trigger_config.misfire_policy and this field does not deduplicate content",
"enum": [
"skip",
"catchup",
"compress"
],
"title": "Dedupe Key Strategy",
"type": "string"
},
"version": {
"default": 1,
"minimum": 1,
"title": "Version",
"type": "integer"
},
"status": {
"default": "active",
"title": "Status",
"type": "string"
}
},
"required": [
"id",
"name",
"trigger_config"
],
"title": "ActivityDefinition",
"type": "object"
}