TaskExecutionConfig
The foundational configuration schema for all Cognotik tasks, defining identity, user-facing descriptions, and execution dependencies.
Core Infrastructure
Polymorphic Type Resolver
Base JSON Structure
{
"task_type": "FileModificationTask",
"task_description": "Refactor API client",
"task_dependencies": ["init_workspace_01"]
}
→
Orchestrator View
Refactor API client
Type: FileModificationTask
Waiting for: init_workspace_01
Test Workspace Browser
Explore the execution artifacts and state files generated during TaskExecutionConfig validation.
Configuration Parameters
| Field | Type | Description |
|---|---|---|
task_type * |
String | The unique identifier for the task logic (e.g., FileModificationTask). Used by the PlanTaskTypeIdResolver. |
task_description |
String | A brief, user-facing summary of what this specific task instance is intended to achieve. |
task_dependencies |
List<String> | IDs of tasks that must successfully complete before this task can start. |
state |
TaskState | Internal execution state (Ignored in initial configuration). |
Embedding Cognotik
To invoke tasks programmatically using the UnifiedHarness, use the following pattern:
val harness = UnifiedHarness(serverless = true, openBrowser = false)
harness.start()
// Example: Running a task with TaskExecutionConfig parameters
harness.runTask(
taskType = TaskType.FileModificationTask,
typeConfig = FileModificationTaskTypeConfig(name = "MyTool"),
executionConfig = FileModificationTaskExecutionConfigData(
task_description = "Update documentation",
task_dependencies = mutableListOf("previous_task_id"),
files = listOf("README.md"),
modifications = "Add installation steps"
),
workspace = File("./my-project")
)
Pro Tip: In headless/CI environments, ensure
serverless = true is set to disable the Jetty server and UI components.