Enforce bounded operation guardrails
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

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a028de-e2c8-7732-8521-46a7fc5db82f
This commit is contained in:
tegwick 2026-08-23 12:31:13 +02:00
parent c384f60530
commit 26934e25b9
51 changed files with 1843 additions and 472 deletions

View file

@ -1,27 +1,124 @@
{
"$defs": {
"ContextSource": {
"description": "Describes one external data source that the workflow queries to build\nthe context snapshot passed to evaluate_templates.",
"ActionDef": {
"properties": {
"name": {
"description": "Logical name; referenced as 'context.<name>' in task templates.",
"title": "Name",
"task_template": {
"description": "Path to task template .md, relative to repo root.",
"title": "Task Template",
"type": "string"
},
"type": {
"description": "Source adapter type: 'db_query' | 'http_get' | 'static'.",
"title": "Type",
"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"
},
"config": {
"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,
"description": "Source-specific configuration (SQL, URL, static value, etc.).",
"title": "Config",
"title": "Execution Refs",
"type": "object"
}
},
"required": [
"name",
"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",
@ -42,27 +139,40 @@
},
"timezone": {
"default": "UTC",
"description": "IANA timezone name, e.g. 'Europe/Berlin'.",
"description": "IANA timezone name.",
"title": "Timezone",
"type": "string"
},
"jitter_seconds": {
"default": 0,
"description": "Maximum random delay (seconds) added to each trigger to spread load.",
"minimum": 0,
"title": "Jitter Seconds",
"type": "integer"
},
"misfire_policy": {
"default": "skip",
"description": "skip: ignore any missed runs. catchup: replay missed runs up to a bounded limit. compress: run once covering the full missed window.",
"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": [
@ -80,13 +190,13 @@
"type": "string"
},
"event_type": {
"description": "Matches EventEnvelope.type. The router fires this activity when an event with this type is received.",
"description": "Matches EventEnvelope.type. Router fires this activity on match.",
"title": "Event Type",
"type": "string"
},
"filters": {
"additionalProperties": true,
"description": "Optional predicate filters applied to EventEnvelope.payload before routing. All filters must match for the activity to fire.",
"description": "All filters must match EventEnvelope.attributes for routing.",
"title": "Filters",
"type": "object"
}
@ -97,11 +207,225 @@
"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": "Template for one task instance produced by RunActivityWorkflow.\n\nevaluate_templates() expands each template against the context snapshot\nto produce a concrete TaskInstance.",
"description": "Legacy persisted shape; no in-repo task executor consumes it.",
"properties": {
"task_type": {
"description": "Maps to a registered TaskExecutorWorkflow type, e.g. 'send_email'.",
"description": "Legacy downstream task type metadata; not an executor selector.",
"title": "Task Type",
"type": "string"
},
@ -115,12 +439,10 @@
}
],
"default": null,
"description": "Optional Python expression evaluated against the context snapshot. Task is skipped if the expression is falsy. Example: \"context['user']['is_active'] == True\"",
"title": "Condition"
},
"params_template": {
"additionalProperties": true,
"description": "Parameter template. String values starting with '{context.' are interpolated from the context snapshot at evaluation time.",
"title": "Params Template",
"type": "object"
}
@ -132,31 +454,28 @@
"type": "object"
}
},
"description": "Versioned definition of a single activity: its trigger, context resolution\nstrategy, and the task templates it can spawn.",
"description": "Versioned definition: trigger + context sources + rules/instructions.",
"properties": {
"id": {
"description": "Stable UUID. Used as the Temporal Schedule ID prefix (f'activity-schedule-{id}') and as the workflow ID component.",
"format": "uuid",
"title": "Id",
"type": "string"
},
"name": {
"description": "Human-readable name.",
"title": "Name",
"type": "string"
},
"enabled": {
"default": true,
"description": "When False the corresponding Temporal Schedule is paused and event routing is suppressed.",
"title": "Enabled",
"type": "boolean"
},
"trigger_config": {
"description": "Cron or event trigger configuration.",
"discriminator": {
"mapping": {
"cron": "#/$defs/CronTriggerConfig",
"event": "#/$defs/EventTriggerConfig"
"event": "#/$defs/EventTriggerConfig",
"scheduled": "#/$defs/ScheduledTriggerConfig"
},
"propertyName": "trigger_type"
},
@ -166,6 +485,9 @@
},
{
"$ref": "#/$defs/EventTriggerConfig"
},
{
"$ref": "#/$defs/ScheduledTriggerConfig"
}
],
"title": "Trigger Config"
@ -177,6 +499,20 @@
"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"
@ -186,7 +522,8 @@
},
"dedupe_key_strategy": {
"default": "skip",
"description": "How to handle duplicate or missed trigger events. Should match CronTriggerConfig.misfire_policy for cron activities.",
"deprecated": true,
"description": "Legacy persistence compatibility metadata; runtime scheduling uses trigger_config.misfire_policy and this field does not deduplicate content",
"enum": [
"skip",
"catchup",
@ -197,10 +534,14 @@
},
"version": {
"default": 1,
"description": "Incremented on breaking schema changes. Stored in activity_runs for audit purposes.",
"minimum": 1,
"title": "Version",
"type": "integer"
},
"status": {
"default": "active",
"title": "Status",
"type": "string"
}
},
"required": [