@rzx/ohs 1.1.16 → 1.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/frontend/index.js +1968 -1297
  2. package/dist/frontend/index.js.map +45 -19
  3. package/dist/index.js +40420 -33343
  4. package/dist/index.js.map +194 -132
  5. package/dist/migrations/0000_current_schema.sql +436 -0
  6. package/dist/migrations/meta/0000_snapshot.json +3442 -0
  7. package/dist/migrations/meta/_journal.json +3 -136
  8. package/package.json +12 -12
  9. package/dist/migrations/0000_session_runtime.sql +0 -68
  10. package/dist/migrations/0001_event_sequence.sql +0 -8
  11. package/dist/migrations/0002_cron.sql +0 -33
  12. package/dist/migrations/0003_projects.sql +0 -30
  13. package/dist/migrations/0004_project_default_shell.sql +0 -1
  14. package/dist/migrations/0005_scheduled_tasks.sql +0 -57
  15. package/dist/migrations/0006_event_schema_version.sql +0 -1
  16. package/dist/migrations/0007_projection_settlement.sql +0 -19
  17. package/dist/migrations/0008_run_attempt.sql +0 -23
  18. package/dist/migrations/0009_external_channels.sql +0 -45
  19. package/dist/migrations/0010_workflow_and_owner.sql +0 -68
  20. package/dist/migrations/0011_storage_format.sql +0 -6
  21. package/dist/migrations/0012_job_admission.sql +0 -6
  22. package/dist/migrations/0013_attachments.sql +0 -20
  23. package/dist/migrations/0014_session_input_attachments.sql +0 -45
  24. package/dist/migrations/0015_attachment_representations.sql +0 -22
  25. package/dist/migrations/0016_attachment_lifecycle.sql +0 -16
  26. package/dist/migrations/0017_structured_input_items.sql +0 -1
  27. package/dist/migrations/0018_session_goals.sql +0 -17
  28. package/dist/migrations/0019_session_goal_progress.sql +0 -3
@@ -4,142 +4,9 @@
4
4
  "entries": [
5
5
  {
6
6
  "idx": 0,
7
- "version": "1",
8
- "when": 1780000000000,
9
- "tag": "0000_session_runtime",
10
- "breakpoints": true
11
- },
12
- {
13
- "idx": 1,
14
- "version": "1",
15
- "when": 1786464000000,
16
- "tag": "0001_event_sequence",
17
- "breakpoints": true
18
- },
19
- {
20
- "idx": 2,
21
- "version": "1",
22
- "when": 1786492800000,
23
- "tag": "0002_cron",
24
- "breakpoints": true
25
- },
26
- {
27
- "idx": 3,
28
- "version": "1",
29
- "when": 1786723200000,
30
- "tag": "0003_projects",
31
- "breakpoints": true
32
- },
33
- {
34
- "idx": 4,
35
- "version": "1",
36
- "when": 1786809600000,
37
- "tag": "0004_project_default_shell",
38
- "breakpoints": true
39
- },
40
- {
41
- "idx": 5,
42
- "version": "1",
43
- "when": 1787040000000,
44
- "tag": "0005_scheduled_tasks",
45
- "breakpoints": true
46
- },
47
- {
48
- "idx": 6,
49
- "version": "1",
50
- "when": 1787356800000,
51
- "tag": "0006_event_schema_version",
52
- "breakpoints": true
53
- },
54
- {
55
- "idx": 7,
56
- "version": "1",
57
- "when": 1787443200000,
58
- "tag": "0007_projection_settlement",
59
- "breakpoints": true
60
- },
61
- {
62
- "idx": 8,
63
- "version": "1",
64
- "when": 1787529600000,
65
- "tag": "0008_run_attempt",
66
- "breakpoints": true
67
- },
68
- {
69
- "idx": 9,
70
- "version": "1",
71
- "when": 1787616000000,
72
- "tag": "0009_external_channels",
73
- "breakpoints": true
74
- },
75
- {
76
- "idx": 10,
77
- "version": "1",
78
- "when": 1787702400000,
79
- "tag": "0010_workflow_and_owner",
80
- "breakpoints": true
81
- },
82
- {
83
- "idx": 11,
84
- "version": "1",
85
- "when": 1787788800000,
86
- "tag": "0011_storage_format",
87
- "breakpoints": true
88
- },
89
- {
90
- "idx": 12,
91
- "version": "1",
92
- "when": 1787875200000,
93
- "tag": "0012_job_admission",
94
- "breakpoints": true
95
- },
96
- {
97
- "idx": 13,
98
- "version": "1",
99
- "when": 1787961600000,
100
- "tag": "0013_attachments",
101
- "breakpoints": true
102
- },
103
- {
104
- "idx": 14,
105
- "version": "1",
106
- "when": 1788048000000,
107
- "tag": "0014_session_input_attachments",
108
- "breakpoints": true
109
- },
110
- {
111
- "idx": 15,
112
- "version": "1",
113
- "when": 1788134400000,
114
- "tag": "0015_attachment_representations",
115
- "breakpoints": true
116
- },
117
- {
118
- "idx": 16,
119
- "version": "1",
120
- "when": 1788220800000,
121
- "tag": "0016_attachment_lifecycle",
122
- "breakpoints": true
123
- },
124
- {
125
- "idx": 17,
126
- "version": "1",
127
- "when": 1788307200000,
128
- "tag": "0017_structured_input_items",
129
- "breakpoints": true
130
- },
131
- {
132
- "idx": 18,
133
- "version": "1",
134
- "when": 1788393600000,
135
- "tag": "0018_session_goals",
136
- "breakpoints": true
137
- },
138
- {
139
- "idx": 19,
140
- "version": "1",
141
- "when": 1789171200000,
142
- "tag": "0019_session_goal_progress",
7
+ "version": "6",
8
+ "when": 1789578587412,
9
+ "tag": "0000_current_schema",
143
10
  "breakpoints": true
144
11
  }
145
12
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rzx/ohs",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "description": "OpenHarness terminal CLI — interactive TUI and headless agent for your codebase",
5
5
  "type": "module",
6
6
  "bin": {
@@ -53,28 +53,28 @@
53
53
  "tsx": "^4.21.0",
54
54
  "typescript": "^5.7.3",
55
55
  "vitest": "^3.1.1",
56
- "@openharness/auth": "0.1.0",
57
56
  "@openharness/agent-runtime": "0.1.0",
57
+ "@openharness/api": "0.1.0",
58
+ "@openharness/auth": "0.1.0",
59
+ "@openharness/commands": "0.1.0",
60
+ "@openharness/client": "0.1.0",
58
61
  "@openharness/channels": "0.1.0",
59
62
  "@openharness/coordinator": "0.1.0",
60
63
  "@openharness/core": "0.1.0",
61
- "@openharness/commands": "0.1.0",
62
- "@openharness/hooks": "0.1.0",
64
+ "@openharness/memory": "0.1.0",
63
65
  "@openharness/mcp": "0.1.0",
64
- "@openharness/client": "0.1.0",
65
- "@openharness/permissions": "0.1.0",
66
66
  "@openharness/output-styles": "0.1.0",
67
- "@openharness/memory": "0.1.0",
68
67
  "@openharness/personalization": "0.1.0",
69
- "@openharness/plugins": "0.1.0",
70
68
  "@openharness/plugin-converters": "0.1.0",
71
- "@openharness/sandbox": "0.1.0",
72
- "@openharness/server": "0.1.0",
73
- "@openharness/api": "0.1.0",
69
+ "@openharness/hooks": "0.1.0",
70
+ "@openharness/plugins": "0.1.0",
74
71
  "@openharness/prompts": "0.1.0",
72
+ "@openharness/permissions": "0.1.0",
73
+ "@openharness/sandbox": "0.1.0",
75
74
  "@openharness/services": "0.1.0",
76
- "@openharness/tools": "0.1.0",
75
+ "@openharness/server": "0.1.0",
77
76
  "@openharness/skills": "0.1.0",
77
+ "@openharness/tools": "0.1.0",
78
78
  "@openharness/themes": "0.1.0"
79
79
  },
80
80
  "scripts": {
@@ -1,68 +0,0 @@
1
- CREATE TABLE IF NOT EXISTS session (
2
- id TEXT PRIMARY KEY, parent_id TEXT, cwd TEXT NOT NULL, title TEXT NOT NULL,
3
- model TEXT NOT NULL, agent TEXT, status TEXT NOT NULL, metadata_json TEXT NOT NULL,
4
- created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, archived_at INTEGER
5
- );
6
- --> statement-breakpoint
7
- CREATE TABLE IF NOT EXISTS session_input (
8
- id TEXT PRIMARY KEY, session_id TEXT NOT NULL, seq INTEGER NOT NULL, delivery TEXT NOT NULL,
9
- content TEXT NOT NULL, metadata_json TEXT NOT NULL, created_at INTEGER NOT NULL,
10
- UNIQUE(session_id, seq)
11
- );
12
- --> statement-breakpoint
13
- CREATE TABLE IF NOT EXISTS session_message (
14
- id TEXT PRIMARY KEY, session_id TEXT NOT NULL, seq INTEGER NOT NULL, role TEXT NOT NULL,
15
- run_id TEXT, input_id TEXT, metadata_json TEXT NOT NULL, created_at INTEGER NOT NULL,
16
- updated_at INTEGER NOT NULL, UNIQUE(session_id, seq)
17
- );
18
- --> statement-breakpoint
19
- CREATE TABLE IF NOT EXISTS session_message_part (
20
- id TEXT PRIMARY KEY, session_id TEXT NOT NULL, message_id TEXT NOT NULL, seq INTEGER NOT NULL,
21
- type TEXT NOT NULL, status TEXT NOT NULL, text TEXT, tool_use_id TEXT, tool_name TEXT,
22
- input_json TEXT, output_json TEXT, is_error INTEGER, metadata_json TEXT NOT NULL,
23
- created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, UNIQUE(session_id, seq)
24
- );
25
- --> statement-breakpoint
26
- CREATE TABLE IF NOT EXISTS session_run (
27
- id TEXT PRIMARY KEY, session_id TEXT NOT NULL, input_id TEXT, status TEXT NOT NULL,
28
- started_at INTEGER, finished_at INTEGER, error TEXT, metadata_json TEXT NOT NULL,
29
- created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL
30
- );
31
- --> statement-breakpoint
32
- CREATE TABLE IF NOT EXISTS session_task (
33
- id TEXT PRIMARY KEY, session_id TEXT NOT NULL, child_session_id TEXT, run_id TEXT,
34
- type TEXT NOT NULL, status TEXT NOT NULL, description TEXT NOT NULL, cwd TEXT NOT NULL,
35
- output TEXT, error TEXT, metadata_json TEXT NOT NULL, created_at INTEGER NOT NULL,
36
- started_at INTEGER, finished_at INTEGER, updated_at INTEGER NOT NULL
37
- );
38
- --> statement-breakpoint
39
- CREATE TABLE IF NOT EXISTS permission_request (
40
- id TEXT PRIMARY KEY, session_id TEXT NOT NULL, run_id TEXT, tool_name TEXT NOT NULL,
41
- payload_json TEXT NOT NULL, status TEXT NOT NULL, decision TEXT, decided_by_client_id TEXT,
42
- created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL
43
- );
44
- --> statement-breakpoint
45
- CREATE TABLE IF NOT EXISTS session_event (
46
- id TEXT PRIMARY KEY, seq INTEGER NOT NULL UNIQUE, type TEXT NOT NULL, session_id TEXT,
47
- payload_json TEXT NOT NULL, created_at INTEGER NOT NULL
48
- );
49
- --> statement-breakpoint
50
- CREATE INDEX IF NOT EXISTS session_parent_idx ON session(parent_id);
51
- --> statement-breakpoint
52
- CREATE INDEX IF NOT EXISTS session_cwd_updated_idx ON session(cwd, updated_at);
53
- --> statement-breakpoint
54
- CREATE INDEX IF NOT EXISTS session_input_session_idx ON session_input(session_id);
55
- --> statement-breakpoint
56
- CREATE INDEX IF NOT EXISTS session_message_session_idx ON session_message(session_id);
57
- --> statement-breakpoint
58
- CREATE INDEX IF NOT EXISTS session_part_message_idx ON session_message_part(message_id);
59
- --> statement-breakpoint
60
- CREATE INDEX IF NOT EXISTS session_run_session_idx ON session_run(session_id, created_at);
61
- --> statement-breakpoint
62
- CREATE INDEX IF NOT EXISTS session_run_input_idx ON session_run(input_id);
63
- --> statement-breakpoint
64
- CREATE INDEX IF NOT EXISTS session_task_session_idx ON session_task(session_id, created_at);
65
- --> statement-breakpoint
66
- CREATE INDEX IF NOT EXISTS permission_session_status_idx ON permission_request(session_id, status);
67
- --> statement-breakpoint
68
- CREATE INDEX IF NOT EXISTS session_event_session_seq_idx ON session_event(session_id, seq);
@@ -1,8 +0,0 @@
1
- CREATE TABLE IF NOT EXISTS session_event_sequence (
2
- id INTEGER PRIMARY KEY CHECK (id = 1),
3
- reserved_through INTEGER NOT NULL
4
- );
5
- --> statement-breakpoint
6
- INSERT INTO session_event_sequence (id, reserved_through)
7
- VALUES (1, 0)
8
- ON CONFLICT(id) DO NOTHING;
@@ -1,33 +0,0 @@
1
- CREATE TABLE `cron_job` (
2
- `id` text PRIMARY KEY NOT NULL,
3
- `name` text NOT NULL,
4
- `expression` text NOT NULL,
5
- `command` text NOT NULL,
6
- `cwd` text NOT NULL,
7
- `timezone` text,
8
- `enabled` integer NOT NULL,
9
- `last_run_at` integer,
10
- `next_run_at` integer,
11
- `created_at` integer NOT NULL,
12
- `updated_at` integer NOT NULL
13
- );
14
- --> statement-breakpoint
15
- CREATE UNIQUE INDEX `cron_job_name_unique` ON `cron_job` (`name`);
16
- --> statement-breakpoint
17
- CREATE INDEX `cron_job_enabled_next_idx` ON `cron_job` (`enabled`,`next_run_at`);
18
- --> statement-breakpoint
19
- CREATE TABLE `cron_run` (
20
- `id` text PRIMARY KEY NOT NULL,
21
- `job_id` text NOT NULL,
22
- `job_name` text NOT NULL,
23
- `cause` text NOT NULL,
24
- `status` text NOT NULL,
25
- `output` text,
26
- `error` text,
27
- `started_at` integer NOT NULL,
28
- `finished_at` integer
29
- );
30
- --> statement-breakpoint
31
- CREATE INDEX `cron_run_job_started_idx` ON `cron_run` (`job_id`,`started_at`);
32
- --> statement-breakpoint
33
- CREATE INDEX `cron_run_status_idx` ON `cron_run` (`status`);
@@ -1,30 +0,0 @@
1
- CREATE TABLE `project` (
2
- `id` text PRIMARY KEY NOT NULL,
3
- `name` text NOT NULL,
4
- `pinned_at` integer,
5
- `last_opened_at` integer NOT NULL,
6
- `archived_at` integer,
7
- `created_at` integer NOT NULL,
8
- `updated_at` integer NOT NULL
9
- );
10
- --> statement-breakpoint
11
- CREATE TABLE `project_location` (
12
- `id` text PRIMARY KEY NOT NULL,
13
- `project_id` text NOT NULL,
14
- `path` text NOT NULL,
15
- `normalized_path` text NOT NULL,
16
- `status` text NOT NULL,
17
- `bound_at` integer NOT NULL,
18
- `last_verified_at` integer,
19
- FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON UPDATE no action ON DELETE cascade
20
- );
21
- --> statement-breakpoint
22
- CREATE UNIQUE INDEX `project_location_active_project` ON `project_location` (`project_id`) WHERE `status` = 'active';
23
- --> statement-breakpoint
24
- CREATE UNIQUE INDEX `project_location_active_path` ON `project_location` (`normalized_path`) WHERE `status` = 'active';
25
- --> statement-breakpoint
26
- CREATE INDEX `project_location_project_idx` ON `project_location` (`project_id`, `status`);
27
- --> statement-breakpoint
28
- ALTER TABLE `session` ADD `project_id` text REFERENCES project(id);
29
- --> statement-breakpoint
30
- ALTER TABLE `session` ADD `cwd_relative` text;
@@ -1 +0,0 @@
1
- ALTER TABLE `project` ADD `default_shell` text;
@@ -1,57 +0,0 @@
1
- CREATE TABLE `scheduled_task` (
2
- `id` text PRIMARY KEY NOT NULL,
3
- `name` text NOT NULL,
4
- `description` text,
5
- `prompt` text NOT NULL,
6
- `recurrence` text NOT NULL,
7
- `recurrence_format` text NOT NULL,
8
- `timezone` text NOT NULL,
9
- `status` text NOT NULL,
10
- `destination` text NOT NULL,
11
- `session_id` text,
12
- `project_paths_json` text NOT NULL,
13
- `execution_mode` text NOT NULL,
14
- `model` text,
15
- `effort` text,
16
- `skill_names_json` text NOT NULL,
17
- `plugin_names_json` text NOT NULL,
18
- `permission_profile_json` text NOT NULL,
19
- `overlap_policy` text NOT NULL,
20
- `missed_run_policy` text NOT NULL,
21
- `stop_policy_json` text,
22
- `created_by` text NOT NULL,
23
- `created_from_session_id` text,
24
- `last_run_at` integer,
25
- `next_run_at` integer,
26
- `run_count` integer NOT NULL,
27
- `created_at` integer NOT NULL,
28
- `updated_at` integer NOT NULL
29
- );
30
- --> statement-breakpoint
31
- CREATE INDEX `scheduled_task_status_next_idx` ON `scheduled_task` (`status`,`next_run_at`);
32
- --> statement-breakpoint
33
- CREATE INDEX `scheduled_task_session_idx` ON `scheduled_task` (`session_id`);
34
- --> statement-breakpoint
35
- CREATE TABLE `scheduled_run` (
36
- `id` text PRIMARY KEY NOT NULL,
37
- `task_id` text NOT NULL,
38
- `cause` text NOT NULL,
39
- `status` text NOT NULL,
40
- `scheduled_for` integer NOT NULL,
41
- `session_id` text,
42
- `run_id` text,
43
- `summary` text,
44
- `error` text,
45
- `unread` integer NOT NULL,
46
- `attention_reason` text,
47
- `created_at` integer NOT NULL,
48
- `started_at` integer,
49
- `finished_at` integer,
50
- `updated_at` integer NOT NULL
51
- );
52
- --> statement-breakpoint
53
- CREATE INDEX `scheduled_run_task_created_idx` ON `scheduled_run` (`task_id`,`created_at`);
54
- --> statement-breakpoint
55
- CREATE INDEX `scheduled_run_status_idx` ON `scheduled_run` (`status`);
56
- --> statement-breakpoint
57
- CREATE INDEX `scheduled_run_unread_idx` ON `scheduled_run` (`unread`,`created_at`);
@@ -1 +0,0 @@
1
- ALTER TABLE `session_event` ADD `schema_version` integer DEFAULT 1 NOT NULL;
@@ -1,19 +0,0 @@
1
- CREATE TABLE `projection_settlement` (
2
- `id` text PRIMARY KEY NOT NULL,
3
- `projector` text NOT NULL,
4
- `root_session_id` text NOT NULL,
5
- `event_sequence` integer NOT NULL,
6
- `action` text NOT NULL,
7
- `payload_json` text NOT NULL,
8
- `status` text NOT NULL,
9
- `attempt_count` integer DEFAULT 0 NOT NULL,
10
- `last_error` text,
11
- `next_retry_at` integer,
12
- `created_at` integer NOT NULL,
13
- `updated_at` integer NOT NULL,
14
- `resolved_at` integer
15
- );
16
- --> statement-breakpoint
17
- CREATE UNIQUE INDEX `projection_settlement_event_idx` ON `projection_settlement` (`projector`,`root_session_id`,`event_sequence`);
18
- --> statement-breakpoint
19
- CREATE INDEX `projection_settlement_status_retry_idx` ON `projection_settlement` (`status`,`next_retry_at`);
@@ -1,23 +0,0 @@
1
- CREATE TABLE `session_run_attempt` (
2
- `id` text PRIMARY KEY NOT NULL,
3
- `run_id` text NOT NULL,
4
- `sequence` integer NOT NULL,
5
- `status` text NOT NULL,
6
- `provider` text,
7
- `model` text,
8
- `retry_reason` text,
9
- `error_kind` text,
10
- `error` text,
11
- `input_tokens` integer,
12
- `output_tokens` integer,
13
- `started_at` integer,
14
- `finished_at` integer,
15
- `created_at` integer NOT NULL,
16
- `updated_at` integer NOT NULL
17
- );
18
- --> statement-breakpoint
19
- CREATE UNIQUE INDEX `session_run_attempt_run_sequence_unique` ON `session_run_attempt` (`run_id`,`sequence`);
20
- --> statement-breakpoint
21
- CREATE INDEX `session_run_attempt_run_idx` ON `session_run_attempt` (`run_id`);
22
- --> statement-breakpoint
23
- CREATE INDEX `session_run_attempt_status_idx` ON `session_run_attempt` (`status`);
@@ -1,45 +0,0 @@
1
- CREATE TABLE `external_conversation` (
2
- `id` text PRIMARY KEY NOT NULL,
3
- `connector` text NOT NULL,
4
- `account_id` text NOT NULL,
5
- `workspace_id` text,
6
- `chat_id` text NOT NULL,
7
- `thread_id` text NOT NULL DEFAULT '',
8
- `session_id` text NOT NULL,
9
- `created_at` integer NOT NULL,
10
- `updated_at` integer NOT NULL,
11
- FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON UPDATE no action ON DELETE cascade
12
- );
13
- --> statement-breakpoint
14
- CREATE UNIQUE INDEX `external_conversation_identity_unique` ON `external_conversation` (`connector`,`account_id`,`chat_id`,`thread_id`);
15
- --> statement-breakpoint
16
- CREATE INDEX `external_conversation_session_idx` ON `external_conversation` (`session_id`);
17
- --> statement-breakpoint
18
- CREATE TABLE `channel_delivery` (
19
- `id` text PRIMARY KEY NOT NULL,
20
- `conversation_id` text NOT NULL,
21
- `connector` text NOT NULL,
22
- `account_id` text NOT NULL,
23
- `chat_id` text NOT NULL,
24
- `thread_id` text NOT NULL DEFAULT '',
25
- `session_id` text NOT NULL,
26
- `input_id` text NOT NULL,
27
- `run_id` text NOT NULL,
28
- `external_message_id` text NOT NULL,
29
- `content` text NOT NULL,
30
- `status` text NOT NULL,
31
- `attempt_count` integer NOT NULL DEFAULT 0,
32
- `external_delivery_id` text,
33
- `error` text,
34
- `created_at` integer NOT NULL,
35
- `updated_at` integer NOT NULL,
36
- `sent_at` integer,
37
- FOREIGN KEY (`conversation_id`) REFERENCES `external_conversation`(`id`) ON UPDATE no action ON DELETE cascade,
38
- FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON UPDATE no action ON DELETE cascade,
39
- FOREIGN KEY (`input_id`) REFERENCES `session_input`(`id`) ON UPDATE no action ON DELETE cascade,
40
- FOREIGN KEY (`run_id`) REFERENCES `session_run`(`id`) ON UPDATE no action ON DELETE cascade
41
- );
42
- --> statement-breakpoint
43
- CREATE UNIQUE INDEX `channel_delivery_input_unique` ON `channel_delivery` (`input_id`);
44
- --> statement-breakpoint
45
- CREATE INDEX `channel_delivery_status_idx` ON `channel_delivery` (`status`,`updated_at`);
@@ -1,68 +0,0 @@
1
- CREATE TABLE `workflow_run` (
2
- `run_id` text PRIMARY KEY NOT NULL,
3
- `owner_session_id` text,
4
- `owner_input_id` text,
5
- `owner_run_id` text,
6
- `status` text NOT NULL,
7
- `termination` text,
8
- `snapshot_json` text NOT NULL,
9
- `created_at` integer NOT NULL,
10
- `updated_at` integer NOT NULL,
11
- FOREIGN KEY (`owner_session_id`) REFERENCES `session`(`id`) ON UPDATE no action ON DELETE set null,
12
- FOREIGN KEY (`owner_input_id`) REFERENCES `session_input`(`id`) ON UPDATE no action ON DELETE set null,
13
- FOREIGN KEY (`owner_run_id`) REFERENCES `session_run`(`id`) ON UPDATE no action ON DELETE set null
14
- );
15
- --> statement-breakpoint
16
- CREATE INDEX `workflow_run_owner_idx` ON `workflow_run` (`owner_session_id`,`updated_at`);
17
- --> statement-breakpoint
18
- CREATE INDEX `workflow_run_status_idx` ON `workflow_run` (`status`,`updated_at`);
19
- --> statement-breakpoint
20
- CREATE TABLE `workflow_task_attempt` (
21
- `workflow_run_id` text NOT NULL,
22
- `task_id` text NOT NULL,
23
- `attempt` integer NOT NULL,
24
- `status` text NOT NULL,
25
- `payload_json` text NOT NULL,
26
- `started_at` integer NOT NULL,
27
- `finished_at` integer,
28
- PRIMARY KEY (`workflow_run_id`,`task_id`,`attempt`),
29
- FOREIGN KEY (`workflow_run_id`) REFERENCES `workflow_run`(`run_id`) ON UPDATE no action ON DELETE cascade
30
- );
31
- --> statement-breakpoint
32
- CREATE TABLE `workflow_event` (
33
- `seq` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
34
- `workflow_run_id` text NOT NULL,
35
- `type` text NOT NULL,
36
- `event_json` text NOT NULL,
37
- `created_at` integer NOT NULL,
38
- FOREIGN KEY (`workflow_run_id`) REFERENCES `workflow_run`(`run_id`) ON UPDATE no action ON DELETE cascade
39
- );
40
- --> statement-breakpoint
41
- CREATE INDEX `workflow_event_run_seq_idx` ON `workflow_event` (`workflow_run_id`,`seq`);
42
- --> statement-breakpoint
43
- CREATE TABLE `workflow_execution_claim` (
44
- `workflow_run_id` text PRIMARY KEY NOT NULL,
45
- `owner_id` text NOT NULL,
46
- `generation` integer NOT NULL,
47
- `claimed_at` integer NOT NULL,
48
- `heartbeat_at` integer NOT NULL,
49
- `finished_at` integer,
50
- `status` text NOT NULL,
51
- FOREIGN KEY (`workflow_run_id`) REFERENCES `workflow_run`(`run_id`) ON UPDATE no action ON DELETE cascade
52
- );
53
- --> statement-breakpoint
54
- CREATE TABLE `application_owner` (
55
- `key` text PRIMARY KEY NOT NULL,
56
- `owner_id` text NOT NULL,
57
- `pid` integer NOT NULL,
58
- `generation` integer NOT NULL,
59
- `started_at` integer NOT NULL,
60
- `heartbeat_at` integer NOT NULL
61
- );
62
- --> statement-breakpoint
63
- CREATE TABLE `retention_audit` (
64
- `id` text PRIMARY KEY NOT NULL,
65
- `policy` text NOT NULL,
66
- `result_json` text NOT NULL,
67
- `created_at` integer NOT NULL
68
- );
@@ -1,6 +0,0 @@
1
- CREATE TABLE `application_storage_format` (
2
- `id` integer PRIMARY KEY NOT NULL CHECK (`id` = 1),
3
- `version` integer NOT NULL
4
- );
5
- --> statement-breakpoint
6
- INSERT INTO `application_storage_format` (`id`, `version`) VALUES (1, 2);
@@ -1,6 +0,0 @@
1
- ALTER TABLE `session_task` ADD `request_namespace` text;
2
- --> statement-breakpoint
3
- ALTER TABLE `session_task` ADD `request_id` text;
4
- --> statement-breakpoint
5
- CREATE UNIQUE INDEX `session_task_request_identity_idx`
6
- ON `session_task` (`session_id`, `request_namespace`, `request_id`);
@@ -1,20 +0,0 @@
1
- CREATE TABLE `attachment_asset` (
2
- `id` text PRIMARY KEY NOT NULL,
3
- `display_name` text NOT NULL,
4
- `declared_media_type` text,
5
- `media_type` text,
6
- `size_bytes` integer,
7
- `sha256` text,
8
- `status` text NOT NULL,
9
- `staging_name` text,
10
- `failure_code` text,
11
- `created_at` integer NOT NULL,
12
- `updated_at` integer NOT NULL,
13
- `deleted_at` integer
14
- );
15
- --> statement-breakpoint
16
- CREATE INDEX `attachment_asset_hash_status_idx`
17
- ON `attachment_asset` (`sha256`, `status`);
18
- --> statement-breakpoint
19
- CREATE INDEX `attachment_asset_status_updated_idx`
20
- ON `attachment_asset` (`status`, `updated_at`);
@@ -1,45 +0,0 @@
1
- CREATE TABLE `session_input_attachment` (
2
- `id` text PRIMARY KEY NOT NULL,
3
- `session_id` text NOT NULL,
4
- `input_id` text NOT NULL,
5
- `asset_id` text NOT NULL,
6
- `seq` integer NOT NULL,
7
- `intent` text NOT NULL,
8
- `display_name` text NOT NULL,
9
- `media_type` text NOT NULL,
10
- `size_bytes` integer NOT NULL,
11
- `metadata_json` text NOT NULL,
12
- `created_at` integer NOT NULL,
13
- FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON UPDATE no action ON DELETE cascade,
14
- FOREIGN KEY (`input_id`) REFERENCES `session_input`(`id`) ON UPDATE no action ON DELETE cascade,
15
- FOREIGN KEY (`asset_id`) REFERENCES `attachment_asset`(`id`) ON UPDATE no action ON DELETE restrict,
16
- CONSTRAINT `session_input_attachment_input_seq_unique` UNIQUE(`input_id`, `seq`),
17
- CONSTRAINT `session_input_attachment_input_asset_unique` UNIQUE(`input_id`, `asset_id`)
18
- );
19
- --> statement-breakpoint
20
- CREATE INDEX `session_input_attachment_input_seq_idx`
21
- ON `session_input_attachment` (`input_id`, `seq`);
22
- --> statement-breakpoint
23
- CREATE INDEX `session_input_attachment_asset_idx`
24
- ON `session_input_attachment` (`asset_id`);
25
- --> statement-breakpoint
26
- CREATE INDEX `session_input_attachment_session_idx`
27
- ON `session_input_attachment` (`session_id`);
28
- --> statement-breakpoint
29
- ALTER TABLE `session_message_part` ADD `asset_id` text;
30
- --> statement-breakpoint
31
- ALTER TABLE `session_message_part` ADD `attachment_intent` text;
32
- --> statement-breakpoint
33
- ALTER TABLE `session_message_part` ADD `display_name` text;
34
- --> statement-breakpoint
35
- ALTER TABLE `session_message_part` ADD `media_type` text;
36
- --> statement-breakpoint
37
- ALTER TABLE `session_message_part` ADD `size_bytes` integer;
38
- --> statement-breakpoint
39
- ALTER TABLE `session_message_part` ADD `transformation_kind` text;
40
- --> statement-breakpoint
41
- ALTER TABLE `session_message_part` ADD `representation_id` text;
42
- --> statement-breakpoint
43
- ALTER TABLE `session_message_part` ADD `processor` text;
44
- --> statement-breakpoint
45
- ALTER TABLE `session_message_part` ADD `transformation_error` text;
@@ -1,22 +0,0 @@
1
- CREATE TABLE `attachment_representation` (
2
- `id` text PRIMARY KEY NOT NULL,
3
- `asset_id` text NOT NULL,
4
- `kind` text NOT NULL,
5
- `status` text NOT NULL,
6
- `processor` text NOT NULL,
7
- `processor_version` text NOT NULL,
8
- `cache_key` text NOT NULL,
9
- `media_type` text NOT NULL,
10
- `text` text,
11
- `error` text,
12
- `metadata_json` text NOT NULL,
13
- `created_at` integer NOT NULL,
14
- `updated_at` integer NOT NULL,
15
- FOREIGN KEY (`asset_id`) REFERENCES `attachment_asset`(`id`) ON UPDATE no action ON DELETE cascade
16
- );
17
- --> statement-breakpoint
18
- CREATE UNIQUE INDEX `attachment_representation_asset_kind_cache_unique`
19
- ON `attachment_representation` (`asset_id`, `kind`, `cache_key`);
20
- --> statement-breakpoint
21
- CREATE INDEX `attachment_representation_asset_idx`
22
- ON `attachment_representation` (`asset_id`, `created_at`);