Skip to content

Schema: autotask

Part of the generated database reference.

audit_log

  • Domain: autotask Β· Feature gate: #[cfg(feature = "autotask")] Β· Migration: 6.5.27-audit-log
  • Rust source: botschema/src/autotask.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
timestamp TIMESTAMPTZ no NOW() β€” β€”
event_type VARCHAR(100) no β€” β€” β€”
actor_type VARCHAR(50) no β€” β€” β€”
actor_id UUID no β€” β€” β€”
action VARCHAR(255) no β€” β€” β€”
target_type VARCHAR(50) yes β€” β€” β€”
target_id UUID yes β€” β€” β€”
outcome_success BOOLEAN no TRUE β€” β€”
details TEXT yes β€” β€” β€”
session_id UUID yes β€” β€” β€”
bot_id UUID no β€” β€” β€”
task_id UUID yes β€” β€” β€”
step_id UUID yes β€” β€” β€”
risk_level VARCHAR(20) no 'info' β€” β€”

Indexes: idx_audit_log_bot(bot_id), idx_audit_log_event(event_type), idx_audit_log_timestamp(timestamp)

conversation_autotasks

  • Domain: autotask Β· Feature gate: #[cfg(feature = "autotask")] Β· Migration: 6.8.1-conversation-autotasks
  • Rust source: botschema/src/autotask.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
conversation_id UUID no β€” β€” β€”
bot_id UUID no β€” β€” β€”
user_id UUID no β€” β€” β€”
title TEXT no β€” β€” β€”
kind VARCHAR(24) no 'cron' β€” β€”
schedule VARCHAR(128) no β€” β€” β€”
schedule_human VARCHAR(160) yes β€” β€” β€”
command TEXT no β€” β€” β€”
unit_name VARCHAR(128) yes β€” β€” β€”
status VARCHAR(24) no 'pending' β€” β€”
output_path TEXT yes β€” β€” β€”
last_run_at TIMESTAMPTZ yes β€” β€” β€”
next_run_at TIMESTAMPTZ yes β€” β€” β€”
last_error TEXT yes β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”

designer_changes

  • Domain: autotask Β· Feature gate: #[cfg(feature = "autotask")] Β· Migration: 6.5.23-branch-scope-cleanup
  • Rust source: botschema/src/autotask.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
bot_id UUID no β€” FK bots.id
session_id UUID yes β€” FK user_sessions.id
change_type VARCHAR(50) no β€” β€” β€”
description TEXT no β€” β€” β€”
file_path VARCHAR(500) no β€” β€” β€”
original_content TEXT no β€” β€” β€”
new_content TEXT no β€” β€” β€”
created_at TIMESTAMPTZ yes NOW() β€” β€”
branch_id UUID yes β€” FK branches.id

designer_pending_changes

  • Domain: autotask Β· Feature gate: #[cfg(feature = "autotask")] Β· Migration: 6.0.0-01-core
  • Rust source: botschema/src/autotask.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
bot_id UUID no β€” FK bots.id
session_id UUID yes β€” FK user_sessions.id
analysis_json TEXT no β€” β€” β€”
instruction TEXT no β€” β€” β€”
expires_at TIMESTAMPTZ no β€” β€” β€”
created_at TIMESTAMPTZ yes NOW() β€” β€”

intent_classifications

  • Domain: autotask Β· Feature gate: #[cfg(feature = "autotask")] Β· Migration: 6.5.23-branch-scope-cleanup
  • Rust source: botschema/src/autotask.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
bot_id UUID no β€” FK bots.id
session_id UUID yes β€” FK user_sessions.id
original_text TEXT no β€” β€” β€”
intent_type VARCHAR(50) no β€” β€” β€”
confidence FLOAT no 0.0 β€” β€”
entities JSONB yes '{}'::jsonb β€” β€”
suggested_name VARCHAR(255) yes β€” β€” β€”
was_correct BOOLEAN yes β€” β€” β€”
corrected_type VARCHAR(50) yes β€” β€” β€”
feedback TEXT yes β€” β€” β€”
created_at TIMESTAMPTZ yes NOW() β€” β€”
branch_id UUID yes β€” FK branches.id

safety_constraints

  • Domain: autotask Β· Feature gate: #[cfg(feature = "autotask")] Β· Migration: 6.7.8-safety-constraints
  • Rust source: botschema/src/autotask.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
branch_id UUID no β€” FK branches.id
bot_id UUID no β€” β€” β€”
name TEXT no β€” β€” β€”
constraint_type VARCHAR(50) no β€” β€” β€”
description TEXT yes β€” β€” β€”
expression TEXT yes β€” β€” β€”
threshold TEXT yes β€” β€” β€”
severity TEXT no β€” β€” β€”
enabled BOOLEAN no TRUE β€” β€”
applies_to TEXT yes β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”

Indexes: idx_safety_constraints_bot(bot_id, enabled)