openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1,743 lines • 47.1 kB
TypeScript
import { ColumnType } from "kysely";
//#region .artifacts/kysely/openclaw-state-db.generated.d.ts
type Generated<T> = T extends ColumnType<infer S, infer I, infer U> ? ColumnType<S, I | undefined, U> : ColumnType<T, T | undefined, T>;
interface AcpReplayEvents {
at: number;
estimated_bytes: Generated<number>;
run_id: string | null;
seq: number;
session_id: string;
session_key: string;
update_json: string;
}
interface AcpReplaySessions {
complete: number;
created_at: number;
cwd: string;
estimated_bytes: Generated<number>;
next_seq: number;
session_id: string;
session_key: string;
updated_at: number;
}
interface AcpSessions {
agent: string;
backend: string;
cwd: string | null;
identity_json: string | null;
last_activity_at: number;
last_error: string | null;
mode: string;
runtime_options_json: string | null;
runtime_session_name: string;
session_id: string | null;
session_key: string;
state: string;
updated_at: number;
}
interface AgentDatabaseLeases {
agent_id: string;
lease_id: string;
opened_at: number;
owner_pid: number;
owner_start_time: number | null;
path: string;
provenance: string | null;
}
interface AgentDatabases {
agent_id: string;
last_seen_at: number;
path: string;
schema_version: number;
size_bytes: number | null;
}
interface AgentDeletionJournal {
agent_dir: string;
agent_id: string;
cleanup_completed: Generated<number>;
cleanup_paths_json: Generated<string>;
created_at: number;
database_paths_json: Generated<string>;
delete_files: Generated<number>;
operation_id: Generated<string>;
sessions_dir: string;
workspace_dir: string;
}
interface AgentProvenance {
agent_id: string;
created_at_ms: number;
created_via: string;
creator_agent_id: string | null;
}
interface ApnsRegistrationTombstones {
deleted_at_ms: number;
node_id: string;
}
interface ApnsRegistrations {
distribution: string | null;
environment: string;
installation_id: string | null;
node_id: string;
relay_handle: string | null;
relay_origin: string | null;
send_grant: string | null;
token: string | null;
token_debug_suffix: string | null;
topic: string;
transport: string;
updated_at_ms: number;
}
interface AuditEvents {
account_ref: string | null;
action: string;
actor_id: string;
actor_type: string;
agent_id: string | null;
channel: string | null;
conversation_kind: string | null;
conversation_ref: string | null;
delivery_kind: string | null;
direction: string | null;
duration_ms: number | null;
error_code: string | null;
event_id: string;
failure_stage: string | null;
kind: string;
message_outcome: string | null;
message_ref: string | null;
occurred_at: number;
reason_code: string | null;
result_count: number | null;
run_id: string | null;
schema_version: Generated<number>;
sequence: Generated<number>;
session_id: string | null;
session_key: string | null;
source_id: string;
source_sequence: number;
status: string;
target_ref: string | null;
tool_call_id: string | null;
tool_name: string | null;
}
interface AuditIdentityKeys {
created_at: number;
id: Generated<number>;
key: Uint8Array;
key_id: string;
}
interface BackupRuns {
archive_path: string;
created_at: number;
id: string;
manifest_json: string;
status: string;
}
interface CaptureBlobs {
blob_id: string;
content_type: string | null;
created_at: number;
data: Uint8Array;
encoding: string;
sha256: string;
size_bytes: number;
}
interface CaptureEvents {
close_code: number | null;
content_type: string | null;
data_blob_id: string | null;
data_sha256: string | null;
data_text: string | null;
direction: string;
error_text: string | null;
flow_id: string;
headers_json: string | null;
host: string | null;
id: Generated<number>;
kind: string;
meta_json: string | null;
method: string | null;
path: string | null;
protocol: string;
session_id: string;
source_process: string;
source_scope: string;
status: number | null;
ts: number;
}
interface CaptureSessions {
ended_at: number | null;
id: string;
mode: string;
proxy_url: string | null;
source_process: string;
source_scope: string;
started_at: number;
}
interface ChannelIngressEvents {
account_id: string;
attempts: Generated<number>;
channel_id: string;
claim_owner: string | null;
claim_token: string | null;
claimed_at: number | null;
completed_at: number | null;
completed_metadata_json: string | null;
event_id: string;
failed_at: number | null;
failed_reason: string | null;
lane_key: string | null;
last_attempt_at: number | null;
last_error: string | null;
metadata_json: string | null;
payload_json: string;
queue_name: string;
received_at: number;
status: string;
updated_at: number;
}
interface ChannelPairingAllowEntries {
account_id: string;
channel_key: string;
entry: string;
sort_order: number;
updated_at: number;
}
interface ChannelPairingRequests {
account_id: string;
channel_key: string;
code: string;
created_at: string;
last_seen_at: string;
meta_json: string | null;
request_id: string;
}
interface ClawCronRefs {
agent_id: string;
created_at_ms: number;
declaration_key: string;
error: string | null;
job_json: string;
manifest_id: string;
scheduler_job_id: string | null;
schema_version: string;
status: string;
updated_at_ms: number;
}
interface ClawInstalls {
added_at_ms: number;
agent_config_digest: string;
agent_id: string;
agent_owned_paths_json: string;
bootstrap_content_digest: string | null;
bootstrap_source_path: string | null;
claw_name: string;
claw_version: string;
integrity: string;
integrity_kind: string;
manifest_path: string;
manifest_schema_version: number;
package_root: string;
plan_integrity: string;
schema_version: string;
source_byte_length: number;
source_kind: string;
status: string;
updated_at_ms: number;
workspace: string;
}
interface ClawMcpServerRefs {
agent_id: string;
config_digest: string;
created_at_ms: number;
error: string | null;
independent_owner: Generated<number>;
name: string;
origin: string;
relationship: string;
schema_version: string;
status: string;
updated_at_ms: number;
}
interface ClawPackageRefs {
agent_id: string;
claw_name: string;
extension_adapter_identity: string | null;
extension_detected_format: string | null;
extension_format: string | null;
extension_id: string | null;
extension_mapped_json: string | null;
extension_unavailable_json: string | null;
independent_owner: number;
installed_at_ms: number;
origin: string;
package_integrity: string;
package_kind: string;
package_ref: string;
package_source: string;
package_status: string;
package_version: string;
relationship: string;
schema_version: string;
updated_at_ms: number;
}
interface ClawWorkspaceFiles {
agent_id: string;
content_digest: string;
created_at_ms: number;
schema_version: string;
source_path: string;
status: string;
target_path: string;
updated_at_ms: number;
workspace: string;
}
interface ClawhubPromotionClaims {
claimed_at_ms: number;
ends_at_ms: number;
model_keys_json: string;
provider: string | null;
slug: string;
}
interface ConfigHealthEntries {
config_path: string;
last_known_good_json: string | null;
last_observed_suspicious_signature: string | null;
last_promoted_good_json: string | null;
updated_at_ms: number;
}
interface ConfigMachineState {
state_key: string;
updated_at_ms: number;
value_json: string;
}
interface ConfigRevisionKeys {
hmac_key: Uint8Array;
id: Generated<number>;
}
interface CronJobRuntimeAuthorities {
authority_input_fingerprint: string | null;
authority_json: string | null;
job_id: string;
recovery_required: number;
store_key: string;
}
interface CronJobScratch {
content: string | null;
job_id: string;
revision: number;
source_sha256: string | null;
store_key: string;
updated_at_ms: number;
}
interface CronJobs {
agent_id: string | null;
declaration_key: string | null;
description: string | null;
enabled: number;
grant_definition_generation: number | null;
grant_definition_revision: string | null;
grant_definition_updated_at: number | null;
job_id: string;
job_json: string;
name: string;
owner_agent_id: string | null;
payload_kind: string;
runtime_updated_at_ms: number | null;
schedule_identity: string | null;
sort_order: Generated<number>;
state_json: Generated<string>;
store_key: string;
updated_at: number;
}
interface CronRunReceipts {
agent_id: string;
config_revision: string;
delivery_attempt_state: Generated<string>;
error_text: string | null;
finished_at_ms: number | null;
job_id: string;
owner_pid: number;
owner_start_time: number | null;
receipt_id: string;
request_run_id: string | null;
started_at_ms: number;
status: string;
store_key: string;
}
interface CronRunTriggerStateRetirements {
receipt_id: string;
}
interface CurrentConversationBindings {
account_id: string;
binding_id: string;
binding_key: string;
bound_at: number;
channel: string;
conversation_id: string;
conversation_kind: string;
expires_at: number | null;
metadata_json: string | null;
parent_conversation_id: string | null;
record_json: string;
status: string;
target_kind: string;
target_session_key: string;
updated_at: number;
}
interface DeliveryQueueEntries {
account_id: string | null;
channel: string | null;
enqueued_at: number;
entry_json: string;
entry_kind: string | null;
failed_at: number | null;
id: string;
last_attempt_at: number | null;
last_error: string | null;
platform_send_started_at: number | null;
queue_name: string;
recovery_state: string | null;
retry_count: Generated<number>;
session_key: string | null;
status: string;
target: string | null;
updated_at: number;
}
interface DeviceAuthTokens {
device_id: string;
role: string;
scopes_json: string;
token: string;
updated_at_ms: number;
}
interface DeviceBootstrapTokens {
device_id: string | null;
issued_at_ms: number;
last_used_at_ms: number | null;
pending_profile_json: string | null;
profile_json: string | null;
public_key: string | null;
redeemed_profile_json: string | null;
setup_id: string | null;
token: string;
token_key: string;
ts: number;
}
interface DeviceIdentities {
created_at_ms: number;
device_id: string;
identity_key: string;
private_key_pem: string;
public_key_pem: string;
updated_at_ms: number;
}
interface DevicePairSetupCompletions {
access: string;
completed_at_ms: number;
delivery_state: string;
device_id: string;
device_name: string | null;
retain_until_ms: number;
setup_id: string;
}
interface DevicePairingJoinCodes {
created_at_ms: number | null;
expires_at_ms: number | null;
payload_json: string | null;
shortcode: string | null;
}
interface DevicePairingPaired {
approved_at_ms: number;
approved_scopes_json: string | null;
approved_via: string | null;
browser_origin: string | null;
client_id: string | null;
client_mode: string | null;
created_at_ms: number;
device_family: string | null;
device_id: string;
display_name: string | null;
last_seen_at_ms: number | null;
last_seen_reason: string | null;
node_surface_json: string | null;
operator_label: string | null;
pending_node_surface_json: string | null;
platform: string | null;
public_key: string;
remote_ip: string | null;
role: string | null;
roles_json: string | null;
scopes_json: string | null;
tokens_json: string | null;
}
interface DevicePairingPending {
browser_origin: string | null;
client_id: string | null;
client_mode: string | null;
device_family: string | null;
device_id: string;
display_name: string | null;
is_repair: number | null;
platform: string | null;
public_key: string;
refreshed_at_ms: number | null;
remote_ip: string | null;
request_id: string;
role: string | null;
roles_json: string | null;
scopes_json: string | null;
silent: number | null;
ts: number;
}
interface DiagnosticEvents {
created_at: number;
event_key: string;
payload_json: string;
scope: string;
sequence: Generated<number>;
}
interface ExecApprovalsConfig {
agent_count: number;
allowlist_count: number;
auto_allow_skills: number | null;
config_key: string;
default_ask: string | null;
default_ask_fallback: string | null;
default_security: string | null;
has_socket_token: number;
raw_json: string;
socket_path: string | null;
updated_at_ms: number;
}
interface ExecutionDecisionFacts {
action_family: string;
action_id: string | null;
context_id: string;
coverage_state: string;
decision_outcome: string;
execution_id: string;
occurred_at: number;
owner: string;
reason_code: string;
receipt_bytes: number;
receipt_id: string;
receipt_json: string;
run_id: string;
source_ref: string;
}
interface ExecutionIdentityContexts {
context_bytes: number;
context_id: string;
context_json: string;
coverage_state: string;
created_at: number;
execution_id: string;
run_id: string;
}
interface ExecutionOwnerLifecycleBindings {
context_id: string;
execution_id: string;
owner_id: string;
owner_kind: string;
}
interface FlowRuns {
blocked_summary: string | null;
blocked_task_id: string | null;
cancel_requested_at: number | null;
controller_id: string | null;
created_at: number;
current_step: string | null;
ended_at: number | null;
flow_id: string;
goal: string;
notify_policy: string;
owner_key: string;
requester_origin_json: string | null;
revision: Generated<number>;
shape: string | null;
state_json: string | null;
status: string;
sync_mode: Generated<string>;
updated_at: number;
wait_json: string | null;
}
interface GatewayBootLifecycle {
boot_id: string;
completed_at_ms: number | null;
outcome: string | null;
pid: number;
reason: string | null;
started_at_ms: number;
startup_reason: string | null;
}
interface GatewayOriginDeviceTokens {
device_id: string;
gateway_scope: string;
role: string;
scopes_json: string;
token: string;
updated_at_ms: number;
}
interface GatewayRestartHandoff {
created_at: number;
expires_at: number;
handoff_key: string;
intent_id: string;
kind: string;
pid: number;
process_instance_id: string | null;
reason: string | null;
restart_kind: string;
restart_trace_last_at: number | null;
restart_trace_started_at: number | null;
source: string;
supervisor_mode: string;
updated_at_ms: number;
version: number;
}
interface GatewayRestartIntent {
created_at: number;
force: number | null;
intent_key: string;
kind: string;
pid: number;
reason: string | null;
updated_at_ms: number;
wait_ms: number | null;
}
interface GatewayRestartSentinel {
continuation_json: string | null;
delivery_account_id: string | null;
delivery_channel: string | null;
delivery_to: string | null;
doctor_hint: string | null;
kind: string;
message: string | null;
payload_json: string;
sentinel_key: string;
session_key: string | null;
stats_json: string | null;
status: string;
thread_id: string | null;
ts: number;
updated_at_ms: number;
version: number;
}
interface GithubPersonalPublicationRequests {
agent_id: string;
base_branch: string;
body: string | null;
branch: string;
connection_generation: string;
created_at_ms: number;
effect_state: string | null;
error_code: string | null;
execution_id: string | null;
gateway_instance_id: string | null;
head_commit: string | null;
idempotency_key: string;
identity_account_id: number;
identity_login: string;
identity_profile_id: string;
identity_source: string;
last_effect: string | null;
next_action: string | null;
owner_profile_id: string;
pull_request_url: string | null;
push_repository: string;
reported_at_ms: number | null;
repository: string;
repository_fingerprint: string;
request_digest: string;
request_id: string;
session_id: string;
session_key: string;
source_head_commit: string;
source_index_tree: string;
status: string;
title: string | null;
updated_at_ms: number;
workspace_tree: string;
worktree_id: string;
}
interface GithubPublicationRequests {
agent_id: string;
base_branch: string | null;
body: string | null;
branch: string;
claim_id: string | null;
created_at_ms: number;
environment_id: string | null;
error_code: string | null;
gateway_instance_id: string | null;
head_commit: string | null;
idempotency_key: string;
identity_account_id: number;
identity_login: string;
identity_profile_id: string | null;
identity_source: string;
next_action: string | null;
owner_epoch: number | null;
placement_generation: number | null;
pull_request_url: string | null;
reported_at_ms: number | null;
repository: string | null;
repository_fingerprint: string;
request_digest: string;
request_id: string;
run_id: string | null;
session_id: string;
session_key: string;
source_head_commit: string | null;
source_index_tree: string | null;
status: string;
title: string | null;
updated_at_ms: number;
workspace_tree: string | null;
worktree_id: string;
}
interface GithubPublicationSessionLifecycles {
lifecycle_revision: string | null;
publication_kind: string;
request_id: string;
requester_authority_json: string | null;
}
interface GithubRepositoryPublicationRequests {
agent_id: string;
base_branch: string | null;
body: string | null;
branch: string;
checkpoint_digest: string | null;
checkpoint_ref: string | null;
claim_id: string | null;
connection_generation: string | null;
created_at_ms: number;
effect_state: string | null;
environment_id: string | null;
error_code: string | null;
execution_id: string | null;
gateway_instance_id: string | null;
head_commit: string | null;
idempotency_key: string;
identity_account_id: number;
identity_login: string;
identity_profile_id: string | null;
identity_source: string;
last_effect: string | null;
next_action: string | null;
owner_epoch: number | null;
owner_profile_id: string | null;
placement_generation: number | null;
previous_head_commit: string | null;
pull_request_url: string | null;
push_repository: string | null;
pushed_head_commit: string | null;
reported_at_ms: number | null;
repository: string | null;
request_digest: string;
request_id: string;
requester_authority_json: string | null;
run_id: string | null;
session_id: string;
session_key: string;
session_lifecycle_revision: string | null;
source_head_commit: string | null;
source_index_tree: string | null;
status: string;
title: string | null;
updated_at_ms: number;
workspace_id: string;
workspace_tree: string | null;
}
interface LocalWorkspaceProjections {
agent_id: string;
base_commit: string;
baseline_json: string | null;
baseline_ref: string | null;
created_at_ms: number;
journal_json: string | null;
journal_pack: Uint8Array | null;
lifecycle_revision: string | null;
paused_runtimes_json: string | null;
pending_ref: string | null;
pending_target: string | null;
projection_path: string;
revision: Generated<number>;
session_id: string;
session_key: string;
source_paths_json: string;
worktree_id: string;
}
interface MacosPortGuardianRecords {
command: string;
mode: string;
pid: Generated<number>;
port: number;
timestamp: number;
}
interface ManagedOutgoingImageRecords {
agent_id: string | null;
alt: string;
attachment_id: string;
cleanup_pending: Generated<number>;
created_at: string;
message_id: string | null;
original_content_type: string;
original_filename: string | null;
original_height: number | null;
original_media_id: string;
original_media_root: string;
original_media_subdir: string;
original_size_bytes: number | null;
original_width: number | null;
record_json: string;
retention_class: string | null;
session_key: string;
updated_at: string | null;
}
interface McpOauthPendingAuthorizations {
create_time: number;
state: string;
store_key: string;
}
interface McpOauthStores {
format_version: number;
store_json: string;
store_key: string;
updated_at: number;
}
interface MeetingTranscriptSessions {
created_at_ms: number;
export_key: string;
export_manifest_json: Generated<string>;
export_pending_json: Generated<string>;
metadata_json: string | null;
next_utterance_seq: Generated<number>;
provider_id: string;
selector: string;
session_id: string;
session_slug: string;
source_json: string;
started_at: string;
stopped_at: string | null;
title: string | null;
updated_at_ms: number;
}
interface MeetingTranscriptSummaries {
generated_at: string | null;
markdown: string | null;
session_id: string;
session_started_at: string;
summary_json: string | null;
utterance_count: number;
}
interface MeetingTranscriptUtterances {
ended_at: string | null;
final: number | null;
metadata_json: string | null;
sequence: number;
session_id: string;
session_started_at: string;
speaker_id: string | null;
speaker_label: string | null;
started_at: string | null;
text: string;
utterance_id: string | null;
}
interface MigrationRuns {
finished_at: number | null;
id: string;
report_json: string;
started_at: number;
status: string;
}
interface MigrationSources {
imported_at: number;
last_run_id: string;
migration_kind: string;
removed_source: Generated<number>;
report_json: string;
source_key: string;
source_path: string;
source_record_count: number | null;
source_sha256: string | null;
source_size_bytes: number | null;
status: string;
target_table: string;
}
interface NativeHookRelayBridges {
expires_at_ms: number;
hostname: string;
pid: number;
port: number;
relay_id: string;
token: string;
updated_at_ms: number;
}
interface NodeWorkerLaunchBoots {
boot_id: string | null;
launch_id: string;
}
interface NodeWorkerLaunchCleanup {
cleanup_mode: string;
launch_id: string;
lineage_settled: number | null;
}
interface NodeWorkerLaunchContainers {
container_json: string | null;
launch_id: string;
}
interface NodeWorkerLaunchProcessScopes {
descendants_reaped: number | null;
launch_id: string;
scope_kind: string;
}
interface NodeWorkerLaunches {
completed_at_ms: number | null;
created_at_ms: number;
environment_id: string;
error_text: string | null;
gateway_namespace: string;
launch_id: string;
owner_epoch: number;
placement_generation: number;
plan_hash: string;
result_json: string | null;
run_id: string;
session_id: string;
state: string;
supervisor_pid: number;
supervisor_start_time: number;
updated_at_ms: number;
worker_pid: number | null;
worker_start_time: number | null;
}
interface NodeWorkerPreparedWorkspaces {
bound_at_ms: number | null;
cache_key: string;
created_at_ms: number;
environment_id: string;
gateway_namespace: string;
home_dir: string;
owner_epoch: number | null;
preparation_key: string;
prepared_manifest_ref: string;
retired_at_ms: number | null;
session_id: string | null;
session_key: string | null;
source_manifest_ref: string;
state: string;
workspace_dir: string;
}
interface NodeWorkerTurns {
completed_at_ms: number | null;
created_at_ms: number;
error_text: string | null;
owner_launch_id: string;
plan_hash: string;
result_json: string | null;
run_id: string;
state: string;
turn_id: string;
updated_at_ms: number;
}
interface OfficialExternalPluginCatalogSnapshots {
body: string;
checksum: string;
etag: string | null;
feed_url: string;
last_modified: string | null;
saved_at: string;
status: number;
trust_key_id: string | null;
trust_mode: string | null;
trust_signature_count: number | null;
trust_threshold: number | null;
trust_verified_at: string | null;
updated_at_ms: number;
}
interface OperatorApprovalExecutionIdentities {
approval_id: string;
source_context_id: string;
source_execution_id: string;
}
interface OperatorApprovalStandingGrantGenerations {
grant_id: string;
job_definition_generation: number;
}
interface OperatorApprovalStandingGrants {
agent_id: string;
created_at_ms: number;
cron_job_id: string;
expires_at_ms: number | null;
grant_id: string;
job_config_revision: string;
last_used_at_ms: number | null;
minted_by_approval_id: string;
operation_binding: string;
revoked_at_ms: number | null;
revoked_by: string | null;
use_count: Generated<number>;
}
interface OperatorApprovals {
approval_id: string;
audience_session_keys_json: string;
consumed_at_ms: number | null;
consumed_by: string | null;
created_at_ms: number;
decision: string | null;
expires_at_ms: number;
kind: string;
presentation_json: string;
requested_by_client_id: string | null;
requested_by_device_id: string | null;
requested_by_device_token_auth: Generated<number>;
resolution_ref: string;
resolved_at_ms: number | null;
resolver_id: string | null;
resolver_kind: string | null;
reviewer_device_ids_json: string;
runtime_epoch: string;
source_agent_id: string | null;
source_run_id: string | null;
source_session_id: string | null;
source_session_key: string | null;
source_tool_call_id: string | null;
source_tool_name: string | null;
status: string;
terminal_reason: string | null;
updated_at_ms: number;
}
interface OutboundMediaProvenance {
created_at_ms: number;
kind: string;
realpath: string;
sha256: string;
size_bytes: number;
version: number;
}
interface OutboundMessageExecutionBindings {
context_id: string;
event_id: string;
execution_id: string;
run_id: string;
}
interface OutboundMessageProgress {
account_ref: string | null;
action: string;
actor_id: string;
actor_type: string;
agent_id: string | null;
channel: string;
context_id: string | null;
conversation_kind: string;
conversation_ref: string | null;
duration_ms: number | null;
execution_id: string | null;
occurred_at: number;
outcome: string;
progress_id: string;
run_id: string | null;
schema_version: number;
sequence: Generated<number>;
source_id: string;
source_sequence: number;
target_ref: string | null;
}
interface PluginBindingApprovals {
account_id: string;
approved_at: number;
channel: string;
plugin_id: string;
plugin_name: string | null;
plugin_root: string;
}
interface PluginBlobEntries {
blob: Uint8Array;
created_at: number;
entry_key: string;
expires_at: number | null;
metadata_json: string;
namespace: string;
plugin_id: string;
}
interface PluginStateEntries {
created_at: number;
entry_key: string;
expires_at: number | null;
namespace: string;
plugin_id: string;
value_json: string;
}
interface Projects {
created_at_ms: number;
display_name: string;
id: string;
origin_url: string | null;
repo_root: string;
source: string;
updated_at_ms: number;
}
interface SandboxRegistryEntries {
backend_id: string | null;
cdp_port: number | null;
config_hash: string | null;
config_label_kind: string | null;
container_name: string;
created_at_ms: number | null;
entry_json: string;
image: string | null;
last_used_at_ms: number | null;
no_vnc_port: number | null;
registry_kind: string;
runtime_label: string | null;
session_key: string | null;
updated_at: number;
}
interface SchemaMeta {
agent_id: string | null;
app_version: string | null;
created_at: number;
meta_key: string;
role: string;
schema_version: number;
updated_at: number;
}
interface SecretStoreEntries {
allowed_hosts: string | null;
created_at_ms: number;
deleted_at_ms: number | null;
kind: string;
name: string;
scope_id: string;
scope_kind: string;
updated_at_ms: number;
updated_by: string | null;
value: string;
}
interface SessionGroups {
created_at: number;
cwd: string | null;
name: string;
position: number;
worktree: number | null;
}
interface SessionRepositoryWorkspaces {
agent_id: string;
base_commit: string | null;
base_manifest_hash: string | null;
branch: string;
checkpoint_ref: string | null;
created_at_ms: number;
manifest_hash: string | null;
requested_ref: string | null;
revision: number;
run_setup_script: Generated<number>;
session_key: string;
updated_at_ms: number;
url: string;
workspace_id: string;
}
interface SessionStateEvents {
actor_id: string | null;
actor_type: string;
agent_id: string;
dedupe_key: string | null;
kind: string;
occurred_at: number;
payload_json: string | null;
run_id: string | null;
sequence: Generated<number>;
session_id: string | null;
session_key: string;
summary: string;
}
interface SessionStateHeads {
agent_id: string;
last_sequence: number;
pruned_max_sequence: Generated<number>;
session_key: string;
updated_at: number;
}
interface SessionUpstreamLinks {
agent_id: string;
catalog_id: string;
created_at: number;
host_id: string;
last_marker_json: string | null;
last_scanned_at: number | null;
session_key: string;
thread_id: string;
updated_at: number;
upstream_kind: string;
upstream_ref_json: string | null;
}
interface SessionWatchCursors {
last_seen_sequence: Generated<number>;
material_sequence: Generated<number>;
notified_sequence: Generated<number>;
provenance: Generated<string>;
target_session_key: string;
updated_at: number;
watcher_session_key: string;
watcher_store_path: string | null;
}
interface SkillLibraryEntries {
author_profile_id: string;
created_at: number;
current_revision: string;
enabled: number;
owner_profile_id: string | null;
removed: number;
shared: number;
skill_id: string;
slug: string;
updated_at: number;
}
interface SkillLibraryEvents {
action: string;
actor_profile_id: string;
created_at: number;
event_id: string;
revision: string;
skill_id: string;
}
interface SkillLibraryRevisions {
created_at: number;
description: string;
files_json: string;
revision: string;
skill_id: string;
}
interface SkillLibraryUploads {
archive_blob: Uint8Array;
expires_at: number;
owner_profile_id: string;
published_skill_id: string | null;
sha256: string;
size_bytes: number;
slug: string;
upload_id: string;
}
interface SkillUploadChunks {
byte_offset: number;
chunk_blob: Uint8Array;
size_bytes: number;
upload_id: string;
}
interface SkillUploads {
actual_sha256: string | null;
archive_blob: Uint8Array;
committed: number;
committed_at: number | null;
created_at: number;
expires_at: number;
force: number;
idempotency_key_hash: string | null;
kind: string;
received_bytes: number;
sha256: string | null;
size_bytes: number;
slug: string;
upload_id: string;
}
interface SkillUsage {
first_used_at_ms: number;
last_agent_id: string | null;
last_used_at_ms: number;
skill_file: string;
skill_key: string;
skill_name: string;
skill_source: string;
use_count: number;
}
interface SkillWorkshopChanges {
action: string;
actor: string;
agent_id: string;
change_id: string;
created_at_ms: number;
run_id: string | null;
session_key: string | null;
skill_name: string;
summary: string;
version_id: string | null;
}
interface StateLeases {
created_at: number;
expires_at: number | null;
heartbeat_at: number | null;
lease_key: string;
owner: string;
payload_json: string | null;
scope: string;
updated_at: number;
}
interface SubagentRuns {
child_session_key: string;
controller_session_key: string | null;
controller_store_path: string | null;
created_at: number;
payload_json: Generated<string>;
requester_session_key: string;
requester_store_path: string | null;
run_id: string;
}
interface TaskDeliveryState {
last_notified_event_at: number | null;
requester_origin_json: string | null;
task_id: string;
}
interface TaskRuns {
agent_id: string | null;
child_session_key: string | null;
cleanup_after: number | null;
created_at: number;
delivery_status: string;
detail_json: string | null;
ended_at: number | null;
error: string | null;
execution_owner_host: string | null;
execution_owner_pid: number | null;
execution_owner_start_identity: number | null;
label: string | null;
last_event_at: number | null;
last_tool_name: string | null;
notify_policy: string;
owner_key: string;
parent_flow_id: string | null;
parent_task_id: string | null;
progress_summary: string | null;
requester_agent_id: string | null;
requester_session_key: string | null;
run_id: string | null;
runtime: string;
scope_kind: string;
source_id: string | null;
started_at: number | null;
status: string;
task: string;
task_id: string;
task_kind: string | null;
terminal_outcome: string | null;
terminal_summary: string | null;
tool_use_count: number | null;
}
interface UpdateRuns {
after_json: string;
before_json: string;
confirmed_at_ms: number | null;
created_at_ms: number;
downtime_ms: number | null;
finished_at_ms: number | null;
origin_json: string;
phase: string;
reason: string | null;
repair_json: string;
run_id: string;
status: string;
steps_json: string;
target_json: string;
trigger: string;
updated_at_ms: number;
verification_json: string;
}
interface UserPreferences {
pref_key: string;
profile_id: string;
updated_at_ms: number;
value_json: string;
}
interface UserProfileIdentities {
authorization_basis_json: string | null;
authorization_id: string | null;
canonical_login: string | null;
created_at: number;
profile_id: string;
provider: string;
subject: string;
}
interface WebPushApprovalDeliveries {
approval_id: string;
device_id: string;
prepared_at_ms: number;
subscription_id: string;
user_profile_id: string | null;
}
interface WebPushSubscriptions {
auth: string;
created_at_ms: number;
device_id: string | null;
endpoint: string;
endpoint_hash: string;
p256dh: string;
preferences_json: string | null;
subscription_id: string;
updated_at_ms: number;
user_profile_id: string | null;
}
interface WorkerEnvironmentCredentials {
bundle_hash: string;
credential_hash: string;
delivered_at_ms: number | null;
environment_id: string;
expires_at_ms: number;
owner_epoch: number;
rpc_set_version: number;
session_id: string | null;
}
interface WorkerEnvironmentSshFallbackPorts {
environment_id: string;
port: number;
position: number;
}
interface WorkerEnvironments {
attached_session_ids_json: Generated<string>;
bootstrap_bundle_hash: string | null;
bootstrap_install_kind: string | null;
bootstrap_openclaw_version: string | null;
bootstrap_protocol_features_json: string | null;
created_at_ms: number;
desktop_json: string | null;
destroy_requested_at_ms: number | null;
environment_id: string;
idle_since_at_ms: number | null;
last_activated_at_ms: number | null;
last_error: string | null;
lease_id: string | null;
node_device_id: string | null;
node_setup_id: string | null;
owner_epoch: Generated<number>;
preparation_consumed_at_ms: number | null;
preparation_demand_at_ms: number | null;
preparation_expires_at_ms: number | null;
preparation_key: string | null;
preparation_purpose: string | null;
profile_id: string;
profile_snapshot_json: string;
provider_id: string;
provision_operation_id: string;
shared_host: number | null;
ssh_host: string | null;
ssh_host_key: string | null;
ssh_key_ref_json: string | null;
ssh_port: number | null;
ssh_user: string | null;
state: string;
state_changed_at_ms: number;
teardown_terminal_state: string | null;
updated_at_ms: number;
}
interface WorkerInferenceTurns {
created_at_ms: number;
environment_id: string;
request_hash: string;
run_epoch: number;
run_id: string;
session_id: string;
state: string;
terminal_json: string | null;
turn_id: string;
updated_at_ms: number;
}
interface WorkerSessionPlacementMoves {
abandon_source: number | null;
created_at_ms: number;
last_error: string | null;
operation_id: string;
session_id: string;
source_environment_id: string;
source_generation: number;
source_owner_epoch: number;
target_id: string | null;
target_kind: string;
target_machine_class: string | null;
target_os: string | null;
updated_at_ms: number;
}
interface WorkerSessionPlacements {
active_owner_epoch: number | null;
agent_id: string;
created_at_ms: number;
environment_id: string | null;
execution_mode: string | null;
last_live_event_ack_cursor: number | null;
last_transcript_ack_cursor: number | null;
recovery_error: string | null;
remote_workspace_dir: string | null;
session_id: string;
session_key: string;
state: string;
state_changed_at_ms: number;
terminal_at_ms: number | null;
terminal_reason: string | null;
transition_generation: Generated<number>;
turn_claim_generation: number | null;
turn_claim_id: string | null;
turn_claim_owner: string | null;
turn_claim_owner_epoch: number | null;
turn_claim_run_id: string | null;
updated_at_ms: number;
worker_bundle_hash: string | null;
workspace_base_manifest_ref: string | null;
}
interface WorkerSessionToolOperations {
child_session_key: string | null;
created_at_ms: number;
gateway_instance_id: string;
operation_seed: string;
request_digest: string;
result_json: string | null;
source_claim_id: string;
source_session_id: string;
status: string;
tool_call_id: string;
tool_name: string;
updated_at_ms: number;
}
interface WorkerTranscriptCommitHeads {
environment_id: string;
next_seq: number;
run_epoch: number;
session_id: string;
updated_at_ms: number;
}
interface WorkerTranscriptCommits {
created_at_ms: number;
request_hash: string;
result_json: string | null;
run_epoch: number;
seq: number;
session_id: string;
state: string;
updated_at_ms: number;
}
interface WorkerTurnToolAuthorities {
claim_id: string;
environment_id: string;
owner_epoch: number;
placement_generation: number;
run_id: string;
session_id: string;
tool_names_json: string;
updated_at_ms: number;
}
interface WorkerWorkspacePendingResults {
claim_id: string;
created_at_ms: number;
environment_id: string;
gateway_instance_id: string;
owner_epoch: number;
placement_generation: number;
recovery_requested_at_ms: number | null;
repository_workspace_id: string | null;
run_id: string;
session_id: string;
staged_result_ref: string | null;
workspace_accepted_at_ms: number | null;
}
interface WorkerWorkspaceReconciliations {
base_manifest_ref: string;
base_pack: Uint8Array;
created_at_ms: number;
current_manifest_ref: string;
environment_id: string;
owner_epoch: number;
placement_generation: number;
plan_json: string;
session_id: string;
}
interface WorkspaceGeneratedBootstrapHashes {
filename: string;
sha256: string;
workspace_key: string;
}
interface WorkspacePathAliases {
alias_key: string;
alias_path: string;
updated_at_ms: number;
workspace_key: string;
workspace_path: string;
}
interface WorkspaceSetupState {
attestation_updated_at_ms: number | null;
attested_at_ms: number | null;
bootstrap_seeded_at: string | null;
setup_completed_at: string | null;
updated_at: number | null;
version: number | null;
workspace_key: string;
workspace_path: string | null;
}
interface WorktreeProvisionedFileChunks {
chunk_index: number;
data: Uint8Array;
path: string;
worktree_id: string;
}
interface WorktreeTemplates {
backend: string;
cache_key: string;
common_dir: string;
content_key: string;
created_at: number;
id: string;
last_used_at: number;
path: string;
repo_root: string;
source_commit: string;
status: string;
worktree_root: string;
}
interface Worktrees {
base_ref: string;
branch: string;
created_at: number;
gc_protection_json: string | null;
id: string;
last_active_at: number;
owner_id: string | null;
owner_kind: string;
path: string;
provisioned_paths_json: string | null;
removed_at: number | null;
repo_fingerprint: string;
repo_root: string;
run_end_cleanup_json: string | null;
snapshot_ref: string | null;
}
interface DB {
acp_replay_events: AcpReplayEvents;
acp_replay_sessions: AcpReplaySessions;
acp_sessions: AcpSessions;
agent_database_leases: AgentDatabaseLeases;
agent_databases: AgentDatabases;
agent_deletion_journal: AgentDeletionJournal;
agent_provenance: AgentProvenance;
apns_registration_tombstones: ApnsRegistrationTombstones;
apns_registrations: ApnsRegistrations;
audit_events: AuditEvents;
audit_identity_keys: AuditIdentityKeys;
backup_runs: BackupRuns;
capture_blobs: CaptureBlobs;
capture_events: CaptureEvents;
capture_sessions: CaptureSessions;
channel_ingress_events: ChannelIngressEvents;
channel_pairing_allow_entries: ChannelPairingAllowEntries;
channel_pairing_requests: ChannelPairingRequests;
claw_cron_refs: ClawCronRefs;
claw_installs: ClawInstalls;
claw_mcp_server_refs: ClawMcpServerRefs;
claw_package_refs: ClawPackageRefs;
claw_workspace_files: ClawWorkspaceFiles;
clawhub_promotion_claims: ClawhubPromotionClaims;
config_health_entries: ConfigHealthEntries;
config_machine_state: ConfigMachineState;
config_revision_keys: ConfigRevisionKeys;
cron_job_runtime_authorities: CronJobRuntimeAuthorities;
cron_job_scratch: CronJobScratch;
cron_jobs: CronJobs;
cron_run_receipts: CronRunReceipts;
cron_run_trigger_state_retirements: CronRunTriggerStateRetirements;
current_conversation_bindings: CurrentConversationBindings;
delivery_queue_entries: DeliveryQueueEntries;
device_auth_tokens: DeviceAuthTokens;
device_bootstrap_tokens: DeviceBootstrapTokens;
device_identities: DeviceIdentities;
device_pair_setup_completions: DevicePairSetupCompletions;
device_pairing_join_codes: DevicePairingJoinCodes;
device_pairing_paired: DevicePairingPaired;
device_pairing_pending: DevicePairingPending;
diagnostic_events: DiagnosticEvents;
exec_approvals_config: ExecApprovalsConfig;
execution_decision_facts: ExecutionDecisionFacts;
execution_identity_contexts: ExecutionIdentityContexts;
execution_owner_lifecycle_bindings: ExecutionOwnerLifecycleBindings;
flow_runs: FlowRuns;
gateway_boot_lifecycle: GatewayBootLifecycle;
gateway_origin_device_tokens: GatewayOriginDeviceTokens;
gateway_restart_handoff: GatewayRestartHandoff;
gateway_restart_intent: GatewayRestartIntent;
gateway_restart_sentinel: GatewayRestartSentinel;
github_personal_publication_requests: GithubPersonalPublicationRequests;
github_publication_requests: GithubPublicationRequests;
github_publication_session_lifecycles: GithubPublicationSessionLifecycles;
github_repository_publication_requests: GithubRepositoryPublicationRequests;
local_workspace_projections: LocalWorkspaceProjections;
macos_port_guardian_records: MacosPortGuardianRecords;
managed_outgoing_image_records: ManagedOutgoingImageRecords;
mcp_oauth_pending_authorizations: McpOauthPendingAuthorizations;
mcp_oauth_stores: McpOauthStores;
meeting_transcript_sessions: MeetingTranscriptSessions;
meeting_transcript_summaries: MeetingTranscriptSummaries;
meeting_transcript_utterances: MeetingTranscriptUtterances;
migration_runs: MigrationRuns;
migration_sources: MigrationSources;
native_hook_relay_bridges: NativeHookRelayBridges;
node_worker_launch_boots: NodeWorkerLaunchBoots;
node_worker_launch_cleanup: NodeWorkerLaunchCleanup;
node_worker_launch_containers: NodeWorkerLaunchContainers;
node_worker_launch_process_scopes: NodeWorkerLaunchProcessScopes;
node_worker_launches: NodeWorkerLaunches;
node_worker_prepared_workspaces: NodeWorkerPreparedWorkspaces;
node_worker_turns: NodeWorkerTurns;
official_external_plugin_catalog_snapshots: OfficialExternalPluginCatalogSnapshots;
operator_approval_execution_identities: OperatorApprovalExecutionIdentities;
operator_approval_standing_grant_generations: OperatorApprovalStandingGrantGenerations;
operator_approval_standing_grants: OperatorApprovalStandingGrants;
operator_approvals: OperatorApprovals;
outbound_media_provenance: OutboundMediaProvenance;
outbound_message_execution_bindings: OutboundMessageExecutionBindings;
outbound_message_progress: OutboundMessageProgress;
plugin_binding_approvals: PluginBindingApprovals;
plugin_blob_entries: PluginBlobEntries;
plugin_state_entries: PluginStateEntries;
projects: Projects;
sandbox_registry_entries: SandboxRegistryEntries;
schema_meta: SchemaMeta;
secret_store_entries: SecretStoreEntries;
session_groups: SessionGroups;
session_repository_workspaces: SessionRepositoryWorkspaces;
session_state_events: SessionStateEvents;
session_state_heads: SessionStateHeads;
session_upstream_links: SessionUpstreamLinks;
session_watch_cursors: SessionWatchCursors;
skill_library_entries: SkillLibraryEntries;
skill_library_events: SkillLibraryEvents;
skill_library_revisions: SkillLibraryRevisions;
skill_library_uploads: SkillLibraryUploads;
skill_upload_chunks: SkillUploadChunks;
skill_uploads: SkillUploads;
skill_usage: SkillUsage;
skill_workshop_changes: SkillWorkshopChanges;
state_leases: StateLeases;
subagent_runs: SubagentRuns;
task_delivery_state: TaskDeliveryState;
task_runs: TaskRuns;
update_runs: UpdateRuns;
user_preferences: UserPreferences;
user_profile_identities: UserProfileIdentities;
web_push_approval_deliveries: WebPushApprovalDeliveries;
web_push_subscriptions: WebPushSubscriptions;
worker_environment_credentials: WorkerEnvironmentCredentials;
worker_environment_ssh_fallback_ports: WorkerEnvironmentSshFallbackPorts;
worker_environments: WorkerEnvironments;
worker_inference_turns: WorkerInferenceTurns;
worker_session_placement_moves: WorkerSessionPlacementMoves;
worker_session_placements: WorkerSessionPlacements;
worker_session_tool_operations: WorkerSessionToolOperations;
worker_transcript_commit_heads: WorkerTranscriptCommitHeads;
worker_transcript_commits: WorkerTranscriptCommits;
worker_turn_tool_authorities: WorkerTurnToolAuthorities;
worker_workspace_pending_results: WorkerWorkspacePendingResults;
worker_workspace_reconciliations: WorkerWorkspaceReconciliations;
workspace_generated_bootstrap_hashes: WorkspaceGeneratedBootstrapHashes;
workspace_path_aliases: WorkspacePathAliases;
workspace_setup_state: WorkspaceSetupState;
worktree_provisioned_file_chunks: WorktreeProvisionedFileChunks;
worktree_templates: WorktreeTemplates;
worktrees: Worktrees;
}
//#endregion
export { WorkerEnvironments as n, DB as t };