From d43b07da93d63a4ae5afc74cf7d966c7fafc730c Mon Sep 17 00:00:00 2001 From: geobelsky Date: Fri, 13 Mar 2026 11:23:00 +0000 Subject: [PATCH 1/2] feat: enrich HumanTaskSpec in api.intents.create.request with full task model (Priority 3) Add task_type (enum with 14 types), allowed_outcomes, required_comment, assignees, and evidence_required to HumanTaskSpec in api.intents.create.request.v1.json, matching the full spec already in api.scenarios.bundle.request.v1.json. Add 7 new schema contract tests asserting each new field. Made-with: Cursor --- .../api.intents.create.request.v1.json | 52 +++++++++++++++++++ tests/test_schema_contracts.py | 32 ++++++++++++ 2 files changed, 84 insertions(+) diff --git a/schemas/public_api/api.intents.create.request.v1.json b/schemas/public_api/api.intents.create.request.v1.json index 71bf325..575bc91 100644 --- a/schemas/public_api/api.intents.create.request.v1.json +++ b/schemas/public_api/api.intents.create.request.v1.json @@ -87,6 +87,58 @@ "type": "string", "maxLength": 2000 }, + "task_type": { + "type": "string", + "description": "Semantic type of the human task. Determines the expected interaction pattern.", + "enum": [ + "approval", + "review", + "clarification", + "provide_data", + "attach_file", + "manual_action", + "confirmation", + "validate_real_world", + "validate_output", + "assignment", + "delegation", + "reroute", + "override", + "escalate" + ] + }, + "allowed_outcomes": { + "type": "array", + "description": "Permitted values for outcome in task_result. If set, resume will be rejected if outcome is not in this list.", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64 + }, + "minItems": 1, + "maxItems": 20 + }, + "required_comment": { + "type": "boolean", + "description": "When true, task_result.comment must be non-empty for the resume to be accepted.", + "default": false + }, + "assignees": { + "type": "array", + "description": "Email addresses or org_member_ids of humans who may respond to this task.", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 383 + }, + "minItems": 1, + "maxItems": 20 + }, + "evidence_required": { + "type": "boolean", + "description": "When true, task_result must include a non-empty data.evidence field.", + "default": false + }, "form_schema": { "type": "object", "description": "JSON Schema (draft 2020-12) for validating task_result submitted by the human.", diff --git a/tests/test_schema_contracts.py b/tests/test_schema_contracts.py index 9dbe5e4..07b0f4d 100644 --- a/tests/test_schema_contracts.py +++ b/tests/test_schema_contracts.py @@ -187,6 +187,38 @@ def test_human_task_field_present(self): def test_defs_has_human_task_spec(self): assert "HumanTaskSpec" in self.schema.get("$defs", {}) + def test_human_task_spec_has_task_type(self): + spec = self.schema["$defs"]["HumanTaskSpec"]["properties"] + assert "task_type" in spec + assert spec["task_type"]["type"] == "string" + assert "approval" in spec["task_type"]["enum"] + + def test_human_task_spec_task_type_includes_v1_priorities(self): + task_types = self.schema["$defs"]["HumanTaskSpec"]["properties"]["task_type"]["enum"] + for t in ["approval", "review", "clarification", "manual_action", "confirmation", + "assignment", "override"]: + assert t in task_types, f"Missing v1 priority task type: {t}" + + def test_human_task_spec_has_allowed_outcomes(self): + spec = self.schema["$defs"]["HumanTaskSpec"]["properties"] + assert "allowed_outcomes" in spec + assert spec["allowed_outcomes"]["type"] == "array" + + def test_human_task_spec_has_required_comment(self): + spec = self.schema["$defs"]["HumanTaskSpec"]["properties"] + assert "required_comment" in spec + assert spec["required_comment"]["type"] == "boolean" + + def test_human_task_spec_has_assignees(self): + spec = self.schema["$defs"]["HumanTaskSpec"]["properties"] + assert "assignees" in spec + assert spec["assignees"]["type"] == "array" + + def test_human_task_spec_has_evidence_required(self): + spec = self.schema["$defs"]["HumanTaskSpec"]["properties"] + assert "evidence_required" in spec + assert spec["evidence_required"]["type"] == "boolean" + # --------------------------------------------------------------------------- # Group 4: api.intents.create.response — TIMED_OUT in status From f494f1a3560b57c013ba3917752d024f568bb6b8 Mon Sep 17 00:00:00 2001 From: geobelsky Date: Fri, 13 Mar 2026 15:13:17 +0000 Subject: [PATCH 2/2] feat(spec): add pending_with object to intents.resolve.response schema Made-with: Cursor --- .../public_api/api.intents.resolve.response.v1.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/schemas/public_api/api.intents.resolve.response.v1.json b/schemas/public_api/api.intents.resolve.response.v1.json index 87f7e65..f72f4de 100644 --- a/schemas/public_api/api.intents.resolve.response.v1.json +++ b/schemas/public_api/api.intents.resolve.response.v1.json @@ -128,6 +128,17 @@ null ] }, + "pending_with": { + "type": [ + "object", + "null" + ], + "properties": { + "type": { "type": "string" }, + "ref": { "type": "string" }, + "name": { "type": "string" } + } + }, "handler": { "type": [ "string",