Skip to content

The open-source app everyone uses to manage agents at work

Merge public-gh/master into review/pr-162

Dotta1a5eaba622d9
diff --cc .gitignore
index 6b68f7375d,1f867cca39..f2c9b9a7b2
--- a/.gitignore
+++ b/.gitignore
@@@ -37,5 -37,11 +37,13 @@@ tmp
.vscode/
.claude/settings.local.json
.paperclip-local/
+/.idea/
+/.agents/
+
+ # Doc maintenance cursor
+ .doc-review-cursor
+
+ # Playwright
+ tests/e2e/test-results/
+ tests/e2e/playwright-report/
-.superset/
++.superset/
diff --cc packages/db/src/migrations/0030_hot_slipstream.sql
index 0000000000,0000000000..c00d29a3cb
new file mode 100644
--- /dev/null
+++ b/packages/db/src/migrations/0030_hot_slipstream.sql
@@@ -1,0 -1,0 +1,1 @@@
++ALTER TABLE "companies" ADD COLUMN "logo_url" text;
diff --cc packages/db/src/migrations/meta/0030_snapshot.json
index 0000000000,a3ebaad736..539d4be0c6
mode 000000,100644..100644
--- a/packages/db/src/migrations/meta/0030_snapshot.json
+++ b/packages/db/src/migrations/meta/0030_snapshot.json
@@@ -1,0 -1,6193 +1,7905 @@@
+ {
- "id": "5f8dd541-9e28-4a42-890b-fc4a301604ac",
- "prevId": "bd8d9b8d-3012-4c58-bcfd-b3215c164f82",
++ "id": "eb9b85ec-2048-4168-bff1-0e987773342a",
++ "prevId": "fdb36f4e-6463-497d-b704-22d33be9b450",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.activity_log": {
+ "name": "activity_log",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "actor_type": {
+ "name": "actor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'system'"
+ },
+ "actor_id": {
+ "name": "actor_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_id": {
+ "name": "entity_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "agent_id": {
+ "name": "agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "run_id": {
+ "name": "run_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "activity_log_company_created_idx": {
+ "name": "activity_log_company_created_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "activity_log_run_id_idx": {
+ "name": "activity_log_run_id_idx",
+ "columns": [
+ {
+ "expression": "run_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "activity_log_entity_type_id_idx": {
+ "name": "activity_log_entity_type_id_idx",
+ "columns": [
+ {
+ "expression": "entity_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "entity_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "activity_log_company_id_companies_id_fk": {
+ "name": "activity_log_company_id_companies_id_fk",
+ "tableFrom": "activity_log",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "activity_log_agent_id_agents_id_fk": {
+ "name": "activity_log_agent_id_agents_id_fk",
+ "tableFrom": "activity_log",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "activity_log_run_id_heartbeat_runs_id_fk": {
+ "name": "activity_log_run_id_heartbeat_runs_id_fk",
+ "tableFrom": "activity_log",
+ "tableTo": "heartbeat_runs",
+ "columnsFrom": [
+ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_api_keys": {
+ "name": "agent_api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "agent_id": {
+ "name": "agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_hash": {
+ "name": "key_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_api_keys_key_hash_idx": {
+ "name": "agent_api_keys_key_hash_idx",
+ "columns": [
+ {
+ "expression": "key_hash",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_api_keys_company_agent_idx": {
+ "name": "agent_api_keys_company_agent_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_api_keys_agent_id_agents_id_fk": {
+ "name": "agent_api_keys_agent_id_agents_id_fk",
+ "tableFrom": "agent_api_keys",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "agent_api_keys_company_id_companies_id_fk": {
+ "name": "agent_api_keys_company_id_companies_id_fk",
+ "tableFrom": "agent_api_keys",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_config_revisions": {
+ "name": "agent_config_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "agent_id": {
+ "name": "agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_by_agent_id": {
+ "name": "created_by_agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_user_id": {
+ "name": "created_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'patch'"
+ },
+ "rolled_back_from_revision_id": {
+ "name": "rolled_back_from_revision_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "changed_keys": {
+ "name": "changed_keys",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'[]'::jsonb"
+ },
+ "before_config": {
+ "name": "before_config",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "after_config": {
+ "name": "after_config",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_config_revisions_company_agent_created_idx": {
+ "name": "agent_config_revisions_company_agent_created_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_config_revisions_agent_created_idx": {
+ "name": "agent_config_revisions_agent_created_idx",
+ "columns": [
+ {
+ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_config_revisions_company_id_companies_id_fk": {
+ "name": "agent_config_revisions_company_id_companies_id_fk",
+ "tableFrom": "agent_config_revisions",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "agent_config_revisions_agent_id_agents_id_fk": {
+ "name": "agent_config_revisions_agent_id_agents_id_fk",
+ "tableFrom": "agent_config_revisions",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_config_revisions_created_by_agent_id_agents_id_fk": {
+ "name": "agent_config_revisions_created_by_agent_id_agents_id_fk",
+ "tableFrom": "agent_config_revisions",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "created_by_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_runtime_state": {
+ "name": "agent_runtime_state",
+ "schema": "",
+ "columns": {
+ "agent_id": {
+ "name": "agent_id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "adapter_type": {
+ "name": "adapter_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "state_json": {
+ "name": "state_json",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "last_run_id": {
+ "name": "last_run_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_run_status": {
+ "name": "last_run_status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_input_tokens": {
+ "name": "total_input_tokens",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_output_tokens": {
+ "name": "total_output_tokens",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_cached_input_tokens": {
+ "name": "total_cached_input_tokens",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "total_cost_cents": {
+ "name": "total_cost_cents",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_error": {
+ "name": "last_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_runtime_state_company_agent_idx": {
+ "name": "agent_runtime_state_company_agent_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_runtime_state_company_updated_idx": {
+ "name": "agent_runtime_state_company_updated_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_runtime_state_agent_id_agents_id_fk": {
+ "name": "agent_runtime_state_agent_id_agents_id_fk",
+ "tableFrom": "agent_runtime_state",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "agent_runtime_state_company_id_companies_id_fk": {
+ "name": "agent_runtime_state_company_id_companies_id_fk",
+ "tableFrom": "agent_runtime_state",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_task_sessions": {
+ "name": "agent_task_sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "agent_id": {
+ "name": "agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "adapter_type": {
+ "name": "adapter_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "task_key": {
+ "name": "task_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_params_json": {
+ "name": "session_params_json",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "session_display_id": {
+ "name": "session_display_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_run_id": {
+ "name": "last_run_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_error": {
+ "name": "last_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_task_sessions_company_agent_adapter_task_uniq": {
+ "name": "agent_task_sessions_company_agent_adapter_task_uniq",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "adapter_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "task_key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_task_sessions_company_agent_updated_idx": {
+ "name": "agent_task_sessions_company_agent_updated_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_task_sessions_company_task_updated_idx": {
+ "name": "agent_task_sessions_company_task_updated_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "task_key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_task_sessions_company_id_companies_id_fk": {
+ "name": "agent_task_sessions_company_id_companies_id_fk",
+ "tableFrom": "agent_task_sessions",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "agent_task_sessions_agent_id_agents_id_fk": {
+ "name": "agent_task_sessions_agent_id_agents_id_fk",
+ "tableFrom": "agent_task_sessions",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "agent_task_sessions_last_run_id_heartbeat_runs_id_fk": {
+ "name": "agent_task_sessions_last_run_id_heartbeat_runs_id_fk",
+ "tableFrom": "agent_task_sessions",
+ "tableTo": "heartbeat_runs",
+ "columnsFrom": [
+ "last_run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_wakeup_requests": {
+ "name": "agent_wakeup_requests",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "agent_id": {
+ "name": "agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "trigger_detail": {
+ "name": "trigger_detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reason": {
+ "name": "reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'queued'"
+ },
+ "coalesced_count": {
+ "name": "coalesced_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "requested_by_actor_type": {
+ "name": "requested_by_actor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_by_actor_id": {
+ "name": "requested_by_actor_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "idempotency_key": {
+ "name": "idempotency_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "run_id": {
+ "name": "run_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "claimed_at": {
+ "name": "claimed_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_wakeup_requests_company_agent_status_idx": {
+ "name": "agent_wakeup_requests_company_agent_status_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_wakeup_requests_company_requested_idx": {
+ "name": "agent_wakeup_requests_company_requested_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "requested_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_wakeup_requests_agent_requested_idx": {
+ "name": "agent_wakeup_requests_agent_requested_idx",
+ "columns": [
+ {
+ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "requested_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_wakeup_requests_company_id_companies_id_fk": {
+ "name": "agent_wakeup_requests_company_id_companies_id_fk",
+ "tableFrom": "agent_wakeup_requests",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "agent_wakeup_requests_agent_id_agents_id_fk": {
+ "name": "agent_wakeup_requests_agent_id_agents_id_fk",
+ "tableFrom": "agent_wakeup_requests",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agents": {
+ "name": "agents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'general'"
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "reports_to": {
+ "name": "reports_to",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "capabilities": {
+ "name": "capabilities",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "adapter_type": {
+ "name": "adapter_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'process'"
+ },
+ "adapter_config": {
+ "name": "adapter_config",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "runtime_config": {
+ "name": "runtime_config",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "budget_monthly_cents": {
+ "name": "budget_monthly_cents",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "spent_monthly_cents": {
+ "name": "spent_monthly_cents",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "last_heartbeat_at": {
+ "name": "last_heartbeat_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agents_company_status_idx": {
+ "name": "agents_company_status_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agents_company_reports_to_idx": {
+ "name": "agents_company_reports_to_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "reports_to",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agents_company_id_companies_id_fk": {
+ "name": "agents_company_id_companies_id_fk",
+ "tableFrom": "agents",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "agents_reports_to_agents_id_fk": {
+ "name": "agents_reports_to_agents_id_fk",
+ "tableFrom": "agents",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "reports_to"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.approval_comments": {
+ "name": "approval_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "approval_id": {
+ "name": "approval_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "author_agent_id": {
+ "name": "author_agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "author_user_id": {
+ "name": "author_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "body": {
+ "name": "body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "approval_comments_company_idx": {
+ "name": "approval_comments_company_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "approval_comments_approval_idx": {
+ "name": "approval_comments_approval_idx",
+ "columns": [
+ {
+ "expression": "approval_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "approval_comments_approval_created_idx": {
+ "name": "approval_comments_approval_created_idx",
+ "columns": [
+ {
+ "expression": "approval_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "approval_comments_company_id_companies_id_fk": {
+ "name": "approval_comments_company_id_companies_id_fk",
+ "tableFrom": "approval_comments",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "approval_comments_approval_id_approvals_id_fk": {
+ "name": "approval_comments_approval_id_approvals_id_fk",
+ "tableFrom": "approval_comments",
+ "tableTo": "approvals",
+ "columnsFrom": [
+ "approval_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "approval_comments_author_agent_id_agents_id_fk": {
+ "name": "approval_comments_author_agent_id_agents_id_fk",
+ "tableFrom": "approval_comments",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "author_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.approvals": {
+ "name": "approvals",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requested_by_agent_id": {
+ "name": "requested_by_agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_by_user_id": {
+ "name": "requested_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "decision_note": {
+ "name": "decision_note",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "decided_by_user_id": {
+ "name": "decided_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "decided_at": {
+ "name": "decided_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "approvals_company_status_type_idx": {
+ "name": "approvals_company_status_type_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "approvals_company_id_companies_id_fk": {
+ "name": "approvals_company_id_companies_id_fk",
+ "tableFrom": "approvals",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "approvals_requested_by_agent_id_agents_id_fk": {
+ "name": "approvals_requested_by_agent_id_agents_id_fk",
+ "tableFrom": "approvals",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "requested_by_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.assets": {
+ "name": "assets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "object_key": {
+ "name": "object_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content_type": {
+ "name": "content_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "byte_size": {
+ "name": "byte_size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sha256": {
+ "name": "sha256",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "original_filename": {
+ "name": "original_filename",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_agent_id": {
+ "name": "created_by_agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_user_id": {
+ "name": "created_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "assets_company_created_idx": {
+ "name": "assets_company_created_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "assets_company_provider_idx": {
+ "name": "assets_company_provider_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "provider",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "assets_company_object_key_uq": {
+ "name": "assets_company_object_key_uq",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "object_key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "assets_company_id_companies_id_fk": {
+ "name": "assets_company_id_companies_id_fk",
+ "tableFrom": "assets",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "assets_created_by_agent_id_agents_id_fk": {
+ "name": "assets_created_by_agent_id_agents_id_fk",
+ "tableFrom": "assets",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "created_by_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.account": {
+ "name": "account",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "account_id": {
+ "name": "account_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "id_token": {
+ "name": "id_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token_expires_at": {
+ "name": "access_token_expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token_expires_at": {
+ "name": "refresh_token_expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "account_user_id_user_id_fk": {
+ "name": "account_user_id_user_id_fk",
+ "tableFrom": "account",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session": {
+ "name": "session",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_user_id_user_id_fk": {
+ "name": "session_user_id_user_id_fk",
+ "tableFrom": "session",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_verified": {
+ "name": "email_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.verification": {
+ "name": "verification",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identifier": {
+ "name": "identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.companies": {
+ "name": "companies",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "issue_prefix": {
+ "name": "issue_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'PAP'"
+ },
+ "issue_counter": {
+ "name": "issue_counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "budget_monthly_cents": {
+ "name": "budget_monthly_cents",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "spent_monthly_cents": {
+ "name": "spent_monthly_cents",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "require_board_approval_for_new_agents": {
+ "name": "require_board_approval_for_new_agents",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "brand_color": {
+ "name": "brand_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
++ "logo_url": {
++ "name": "logo_url",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "companies_issue_prefix_idx": {
+ "name": "companies_issue_prefix_idx",
+ "columns": [
+ {
+ "expression": "issue_prefix",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_memberships": {
+ "name": "company_memberships",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "principal_type": {
+ "name": "principal_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "principal_id": {
+ "name": "principal_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "membership_role": {
+ "name": "membership_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "company_memberships_company_principal_unique_idx": {
+ "name": "company_memberships_company_principal_unique_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "principal_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "principal_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "company_memberships_principal_status_idx": {
+ "name": "company_memberships_principal_status_idx",
+ "columns": [
+ {
+ "expression": "principal_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "principal_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "company_memberships_company_status_idx": {
+ "name": "company_memberships_company_status_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "company_memberships_company_id_companies_id_fk": {
+ "name": "company_memberships_company_id_companies_id_fk",
+ "tableFrom": "company_memberships",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_secret_versions": {
+ "name": "company_secret_versions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "secret_id": {
+ "name": "secret_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "material": {
+ "name": "material",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value_sha256": {
+ "name": "value_sha256",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_by_agent_id": {
+ "name": "created_by_agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_user_id": {
+ "name": "created_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "company_secret_versions_secret_idx": {
+ "name": "company_secret_versions_secret_idx",
+ "columns": [
+ {
+ "expression": "secret_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "company_secret_versions_value_sha256_idx": {
+ "name": "company_secret_versions_value_sha256_idx",
+ "columns": [
+ {
+ "expression": "value_sha256",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "company_secret_versions_secret_version_uq": {
+ "name": "company_secret_versions_secret_version_uq",
+ "columns": [
+ {
+ "expression": "secret_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "version",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "company_secret_versions_secret_id_company_secrets_id_fk": {
+ "name": "company_secret_versions_secret_id_company_secrets_id_fk",
+ "tableFrom": "company_secret_versions",
+ "tableTo": "company_secrets",
+ "columnsFrom": [
+ "secret_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "company_secret_versions_created_by_agent_id_agents_id_fk": {
+ "name": "company_secret_versions_created_by_agent_id_agents_id_fk",
+ "tableFrom": "company_secret_versions",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "created_by_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_secrets": {
+ "name": "company_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'local_encrypted'"
+ },
+ "external_ref": {
+ "name": "external_ref",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "latest_version": {
+ "name": "latest_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_agent_id": {
+ "name": "created_by_agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_user_id": {
+ "name": "created_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "company_secrets_company_idx": {
+ "name": "company_secrets_company_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "company_secrets_company_provider_idx": {
+ "name": "company_secrets_company_provider_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "provider",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "company_secrets_company_name_uq": {
+ "name": "company_secrets_company_name_uq",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "company_secrets_company_id_companies_id_fk": {
+ "name": "company_secrets_company_id_companies_id_fk",
+ "tableFrom": "company_secrets",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "company_secrets_created_by_agent_id_agents_id_fk": {
+ "name": "company_secrets_created_by_agent_id_agents_id_fk",
+ "tableFrom": "company_secrets",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "created_by_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.cost_events": {
+ "name": "cost_events",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "agent_id": {
+ "name": "agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "goal_id": {
+ "name": "goal_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "billing_code": {
+ "name": "billing_code",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "input_tokens": {
+ "name": "input_tokens",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "output_tokens": {
+ "name": "output_tokens",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "cost_cents": {
+ "name": "cost_cents",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "occurred_at": {
+ "name": "occurred_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "cost_events_company_occurred_idx": {
+ "name": "cost_events_company_occurred_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "occurred_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "cost_events_company_agent_occurred_idx": {
+ "name": "cost_events_company_agent_occurred_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "occurred_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "cost_events_company_id_companies_id_fk": {
+ "name": "cost_events_company_id_companies_id_fk",
+ "tableFrom": "cost_events",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cost_events_agent_id_agents_id_fk": {
+ "name": "cost_events_agent_id_agents_id_fk",
+ "tableFrom": "cost_events",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cost_events_issue_id_issues_id_fk": {
+ "name": "cost_events_issue_id_issues_id_fk",
+ "tableFrom": "cost_events",
+ "tableTo": "issues",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cost_events_project_id_projects_id_fk": {
+ "name": "cost_events_project_id_projects_id_fk",
+ "tableFrom": "cost_events",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cost_events_goal_id_goals_id_fk": {
+ "name": "cost_events_goal_id_goals_id_fk",
+ "tableFrom": "cost_events",
+ "tableTo": "goals",
+ "columnsFrom": [
+ "goal_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
- "public.goals": {
- "name": "goals",
++ "public.document_revisions": {
++ "name": "document_revisions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
- "title": {
- "name": "title",
- "type": "text",
++ "document_id": {
++ "name": "document_id",
++ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
- "description": {
- "name": "description",
- "type": "text",
++ "revision_number": {
++ "name": "revision_number",
++ "type": "integer",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true
+ },
- "level": {
- "name": "level",
++ "body": {
++ "name": "body",
+ "type": "text",
+ "primaryKey": false,
- "notNull": true,
- "default": "'task'"
++ "notNull": true
+ },
- "status": {
- "name": "status",
++ "change_summary": {
++ "name": "change_summary",
+ "type": "text",
+ "primaryKey": false,
- "notNull": true,
- "default": "'planned'"
++ "notNull": false
+ },
- "parent_id": {
- "name": "parent_id",
++ "created_by_agent_id": {
++ "name": "created_by_agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
- "owner_agent_id": {
- "name": "owner_agent_id",
- "type": "uuid",
++ "created_by_user_id": {
++ "name": "created_by_user_id",
++ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
+ }
+ },
+ "indexes": {
- "goals_company_idx": {
- "name": "goals_company_idx",
++ "document_revisions_document_revision_uq": {
++ "name": "document_revisions_document_revision_uq",
++ "columns": [
++ {
++ "expression": "document_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "revision_number",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": true,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "document_revisions_company_document_created_idx": {
++ "name": "document_revisions_company_document_created_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
++ },
++ {
++ "expression": "document_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "created_at",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
- "goals_company_id_companies_id_fk": {
- "name": "goals_company_id_companies_id_fk",
- "tableFrom": "goals",
++ "document_revisions_company_id_companies_id_fk": {
++ "name": "document_revisions_company_id_companies_id_fk",
++ "tableFrom": "document_revisions",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
- "goals_parent_id_goals_id_fk": {
- "name": "goals_parent_id_goals_id_fk",
- "tableFrom": "goals",
- "tableTo": "goals",
++ "document_revisions_document_id_documents_id_fk": {
++ "name": "document_revisions_document_id_documents_id_fk",
++ "tableFrom": "document_revisions",
++ "tableTo": "documents",
+ "columnsFrom": [
- "parent_id"
++ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
- "onDelete": "no action",
++ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
- "goals_owner_agent_id_agents_id_fk": {
- "name": "goals_owner_agent_id_agents_id_fk",
- "tableFrom": "goals",
++ "document_revisions_created_by_agent_id_agents_id_fk": {
++ "name": "document_revisions_created_by_agent_id_agents_id_fk",
++ "tableFrom": "document_revisions",
+ "tableTo": "agents",
+ "columnsFrom": [
- "owner_agent_id"
++ "created_by_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
- "onDelete": "no action",
++ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
- "public.heartbeat_run_events": {
- "name": "heartbeat_run_events",
++ "public.documents": {
++ "name": "documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
- "type": "bigserial",
++ "type": "uuid",
+ "primaryKey": true,
- "notNull": true
++ "notNull": true,
++ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
- "run_id": {
- "name": "run_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": true
- },
- "agent_id": {
- "name": "agent_id",
- "type": "uuid",
++ "title": {
++ "name": "title",
++ "type": "text",
+ "primaryKey": false,
- "notNull": true
++ "notNull": false
+ },
- "seq": {
- "name": "seq",
- "type": "integer",
++ "format": {
++ "name": "format",
++ "type": "text",
+ "primaryKey": false,
- "notNull": true
++ "notNull": true,
++ "default": "'markdown'"
+ },
- "event_type": {
- "name": "event_type",
++ "latest_body": {
++ "name": "latest_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
- "stream": {
- "name": "stream",
- "type": "text",
++ "latest_revision_id": {
++ "name": "latest_revision_id",
++ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
- "level": {
- "name": "level",
- "type": "text",
++ "latest_revision_number": {
++ "name": "latest_revision_number",
++ "type": "integer",
++ "primaryKey": false,
++ "notNull": true,
++ "default": 1
++ },
++ "created_by_agent_id": {
++ "name": "created_by_agent_id",
++ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
- "color": {
- "name": "color",
++ "created_by_user_id": {
++ "name": "created_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
- "message": {
- "name": "message",
- "type": "text",
++ "updated_by_agent_id": {
++ "name": "updated_by_agent_id",
++ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
- "payload": {
- "name": "payload",
- "type": "jsonb",
++ "updated_by_user_id": {
++ "name": "updated_by_user_id",
++ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
++ },
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
+ }
+ },
+ "indexes": {
- "heartbeat_run_events_run_seq_idx": {
- "name": "heartbeat_run_events_run_seq_idx",
- "columns": [
- {
- "expression": "run_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "seq",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
- ],
- "isUnique": false,
- "concurrently": false,
- "method": "btree",
- "with": {}
- },
- "heartbeat_run_events_company_run_idx": {
- "name": "heartbeat_run_events_company_run_idx",
++ "documents_company_updated_idx": {
++ "name": "documents_company_updated_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
- "expression": "run_id",
++ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "heartbeat_run_events_company_created_idx": {
- "name": "heartbeat_run_events_company_created_idx",
++ "documents_company_created_idx": {
++ "name": "documents_company_created_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
- "heartbeat_run_events_company_id_companies_id_fk": {
- "name": "heartbeat_run_events_company_id_companies_id_fk",
- "tableFrom": "heartbeat_run_events",
++ "documents_company_id_companies_id_fk": {
++ "name": "documents_company_id_companies_id_fk",
++ "tableFrom": "documents",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
- "heartbeat_run_events_run_id_heartbeat_runs_id_fk": {
- "name": "heartbeat_run_events_run_id_heartbeat_runs_id_fk",
- "tableFrom": "heartbeat_run_events",
- "tableTo": "heartbeat_runs",
++ "documents_created_by_agent_id_agents_id_fk": {
++ "name": "documents_created_by_agent_id_agents_id_fk",
++ "tableFrom": "documents",
++ "tableTo": "agents",
+ "columnsFrom": [
- "run_id"
++ "created_by_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
- "onDelete": "no action",
++ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
- "heartbeat_run_events_agent_id_agents_id_fk": {
- "name": "heartbeat_run_events_agent_id_agents_id_fk",
- "tableFrom": "heartbeat_run_events",
++ "documents_updated_by_agent_id_agents_id_fk": {
++ "name": "documents_updated_by_agent_id_agents_id_fk",
++ "tableFrom": "documents",
+ "tableTo": "agents",
+ "columnsFrom": [
- "agent_id"
++ "updated_by_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
- "onDelete": "no action",
++ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
- "public.heartbeat_runs": {
- "name": "heartbeat_runs",
++ "public.goals": {
++ "name": "goals",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
- "agent_id": {
- "name": "agent_id",
- "type": "uuid",
++ "title": {
++ "name": "title",
++ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
- "invocation_source": {
- "name": "invocation_source",
++ "description": {
++ "name": "description",
+ "type": "text",
+ "primaryKey": false,
- "notNull": true,
- "default": "'on_demand'"
++ "notNull": false
+ },
- "trigger_detail": {
- "name": "trigger_detail",
++ "level": {
++ "name": "level",
+ "type": "text",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true,
++ "default": "'task'"
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
- "default": "'queued'"
++ "default": "'planned'"
+ },
- "started_at": {
- "name": "started_at",
- "type": "timestamp with time zone",
++ "parent_id": {
++ "name": "parent_id",
++ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
- "finished_at": {
- "name": "finished_at",
- "type": "timestamp with time zone",
++ "owner_agent_id": {
++ "name": "owner_agent_id",
++ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
- "error": {
- "name": "error",
- "type": "text",
++ "created_at": {
++ "name": "created_at",
++ "type": "timestamp with time zone",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true,
++ "default": "now()"
+ },
- "wakeup_request_id": {
- "name": "wakeup_request_id",
- "type": "uuid",
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
+ "primaryKey": false,
- "notNull": false
- },
- "exit_code": {
- "name": "exit_code",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "signal": {
- "name": "signal",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "usage_json": {
- "name": "usage_json",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
++ "notNull": true,
++ "default": "now()"
++ }
++ },
++ "indexes": {
++ "goals_company_idx": {
++ "name": "goals_company_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ }
++ },
++ "foreignKeys": {
++ "goals_company_id_companies_id_fk": {
++ "name": "goals_company_id_companies_id_fk",
++ "tableFrom": "goals",
++ "tableTo": "companies",
++ "columnsFrom": [
++ "company_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
+ },
- "result_json": {
- "name": "result_json",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
++ "goals_parent_id_goals_id_fk": {
++ "name": "goals_parent_id_goals_id_fk",
++ "tableFrom": "goals",
++ "tableTo": "goals",
++ "columnsFrom": [
++ "parent_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
+ },
- "session_id_before": {
- "name": "session_id_before",
- "type": "text",
- "primaryKey": false,
- "notNull": false
++ "goals_owner_agent_id_agents_id_fk": {
++ "name": "goals_owner_agent_id_agents_id_fk",
++ "tableFrom": "goals",
++ "tableTo": "agents",
++ "columnsFrom": [
++ "owner_agent_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {},
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.heartbeat_run_events": {
++ "name": "heartbeat_run_events",
++ "schema": "",
++ "columns": {
++ "id": {
++ "name": "id",
++ "type": "bigserial",
++ "primaryKey": true,
++ "notNull": true
+ },
- "session_id_after": {
- "name": "session_id_after",
- "type": "text",
++ "company_id": {
++ "name": "company_id",
++ "type": "uuid",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true
+ },
- "log_store": {
- "name": "log_store",
- "type": "text",
++ "run_id": {
++ "name": "run_id",
++ "type": "uuid",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true
+ },
- "log_ref": {
- "name": "log_ref",
- "type": "text",
++ "agent_id": {
++ "name": "agent_id",
++ "type": "uuid",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true
+ },
- "log_bytes": {
- "name": "log_bytes",
- "type": "bigint",
++ "seq": {
++ "name": "seq",
++ "type": "integer",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true
+ },
- "log_sha256": {
- "name": "log_sha256",
++ "event_type": {
++ "name": "event_type",
+ "type": "text",
+ "primaryKey": false,
- "notNull": false
- },
- "log_compressed": {
- "name": "log_compressed",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
++ "notNull": true
+ },
- "stdout_excerpt": {
- "name": "stdout_excerpt",
++ "stream": {
++ "name": "stream",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
- "stderr_excerpt": {
- "name": "stderr_excerpt",
++ "level": {
++ "name": "level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
- "error_code": {
- "name": "error_code",
++ "color": {
++ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
- "external_run_id": {
- "name": "external_run_id",
++ "message": {
++ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
- "context_snapshot": {
- "name": "context_snapshot",
++ "payload": {
++ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
+ }
+ },
+ "indexes": {
- "heartbeat_runs_company_agent_started_idx": {
- "name": "heartbeat_runs_company_agent_started_idx",
++ "heartbeat_run_events_run_seq_idx": {
++ "name": "heartbeat_run_events_run_seq_idx",
++ "columns": [
++ {
++ "expression": "run_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "seq",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "heartbeat_run_events_company_run_idx": {
++ "name": "heartbeat_run_events_company_run_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
- "expression": "agent_id",
++ "expression": "run_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "heartbeat_run_events_company_created_idx": {
++ "name": "heartbeat_run_events_company_created_idx",
++ "columns": [
++ {
++ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
- "expression": "started_at",
++ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
- "heartbeat_runs_company_id_companies_id_fk": {
- "name": "heartbeat_runs_company_id_companies_id_fk",
- "tableFrom": "heartbeat_runs",
++ "heartbeat_run_events_company_id_companies_id_fk": {
++ "name": "heartbeat_run_events_company_id_companies_id_fk",
++ "tableFrom": "heartbeat_run_events",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
- "heartbeat_runs_agent_id_agents_id_fk": {
- "name": "heartbeat_runs_agent_id_agents_id_fk",
- "tableFrom": "heartbeat_runs",
- "tableTo": "agents",
++ "heartbeat_run_events_run_id_heartbeat_runs_id_fk": {
++ "name": "heartbeat_run_events_run_id_heartbeat_runs_id_fk",
++ "tableFrom": "heartbeat_run_events",
++ "tableTo": "heartbeat_runs",
+ "columnsFrom": [
- "agent_id"
++ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
- "heartbeat_runs_wakeup_request_id_agent_wakeup_requests_id_fk": {
- "name": "heartbeat_runs_wakeup_request_id_agent_wakeup_requests_id_fk",
- "tableFrom": "heartbeat_runs",
- "tableTo": "agent_wakeup_requests",
++ "heartbeat_run_events_agent_id_agents_id_fk": {
++ "name": "heartbeat_run_events_agent_id_agents_id_fk",
++ "tableFrom": "heartbeat_run_events",
++ "tableTo": "agents",
+ "columnsFrom": [
- "wakeup_request_id"
++ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
- "public.instance_user_roles": {
- "name": "instance_user_roles",
++ "public.heartbeat_runs": {
++ "name": "heartbeat_runs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
- "user_id": {
- "name": "user_id",
- "type": "text",
++ "company_id": {
++ "name": "company_id",
++ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
- "role": {
- "name": "role",
- "type": "text",
++ "agent_id": {
++ "name": "agent_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "invocation_source": {
++ "name": "invocation_source",
++ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
- "default": "'instance_admin'"
++ "default": "'on_demand'"
+ },
- "created_at": {
- "name": "created_at",
- "type": "timestamp with time zone",
++ "trigger_detail": {
++ "name": "trigger_detail",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "status": {
++ "name": "status",
++ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
- "default": "now()"
++ "default": "'queued'"
+ },
- "updated_at": {
- "name": "updated_at",
++ "started_at": {
++ "name": "started_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
- "notNull": true,
- "default": "now()"
- }
- },
- "indexes": {
- "instance_user_roles_user_role_unique_idx": {
- "name": "instance_user_roles_user_role_unique_idx",
- "columns": [
- {
- "expression": "user_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "role",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
- ],
- "isUnique": true,
- "concurrently": false,
- "method": "btree",
- "with": {}
++ "notNull": false
+ },
- "instance_user_roles_role_idx": {
- "name": "instance_user_roles_role_idx",
- "columns": [
- {
- "expression": "role",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
- ],
- "isUnique": false,
- "concurrently": false,
- "method": "btree",
- "with": {}
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.invites": {
- "name": "invites",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
++ "finished_at": {
++ "name": "finished_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": false
+ },
- "company_id": {
- "name": "company_id",
++ "error": {
++ "name": "error",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "wakeup_request_id": {
++ "name": "wakeup_request_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
- "invite_type": {
- "name": "invite_type",
++ "exit_code": {
++ "name": "exit_code",
++ "type": "integer",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "signal": {
++ "name": "signal",
+ "type": "text",
+ "primaryKey": false,
- "notNull": true,
- "default": "'company_join'"
++ "notNull": false
+ },
- "token_hash": {
- "name": "token_hash",
++ "usage_json": {
++ "name": "usage_json",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "result_json": {
++ "name": "result_json",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "session_id_before": {
++ "name": "session_id_before",
+ "type": "text",
+ "primaryKey": false,
- "notNull": true
++ "notNull": false
+ },
- "allowed_join_types": {
- "name": "allowed_join_types",
++ "session_id_after": {
++ "name": "session_id_after",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "log_store": {
++ "name": "log_store",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "log_ref": {
++ "name": "log_ref",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "log_bytes": {
++ "name": "log_bytes",
++ "type": "bigint",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "log_sha256": {
++ "name": "log_sha256",
+ "type": "text",
+ "primaryKey": false,
++ "notNull": false
++ },
++ "log_compressed": {
++ "name": "log_compressed",
++ "type": "boolean",
++ "primaryKey": false,
+ "notNull": true,
- "default": "'both'"
++ "default": false
+ },
- "defaults_payload": {
- "name": "defaults_payload",
- "type": "jsonb",
++ "stdout_excerpt": {
++ "name": "stdout_excerpt",
++ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp with time zone",
++ "stderr_excerpt": {
++ "name": "stderr_excerpt",
++ "type": "text",
+ "primaryKey": false,
- "notNull": true
++ "notNull": false
+ },
- "invited_by_user_id": {
- "name": "invited_by_user_id",
++ "error_code": {
++ "name": "error_code",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
- "revoked_at": {
- "name": "revoked_at",
- "type": "timestamp with time zone",
++ "external_run_id": {
++ "name": "external_run_id",
++ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
- "accepted_at": {
- "name": "accepted_at",
- "type": "timestamp with time zone",
++ "context_snapshot": {
++ "name": "context_snapshot",
++ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
- "invites_token_hash_unique_idx": {
- "name": "invites_token_hash_unique_idx",
- "columns": [
- {
- "expression": "token_hash",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
- ],
- "isUnique": true,
- "concurrently": false,
- "method": "btree",
- "with": {}
- },
- "invites_company_invite_state_idx": {
- "name": "invites_company_invite_state_idx",
++ "heartbeat_runs_company_agent_started_idx": {
++ "name": "heartbeat_runs_company_agent_started_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
- "expression": "invite_type",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "revoked_at",
++ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
- "expression": "expires_at",
++ "expression": "started_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
- "invites_company_id_companies_id_fk": {
- "name": "invites_company_id_companies_id_fk",
- "tableFrom": "invites",
++ "heartbeat_runs_company_id_companies_id_fk": {
++ "name": "heartbeat_runs_company_id_companies_id_fk",
++ "tableFrom": "heartbeat_runs",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.issue_approvals": {
- "name": "issue_approvals",
- "schema": "",
- "columns": {
- "company_id": {
- "name": "company_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": true
+ },
- "issue_id": {
- "name": "issue_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": true
++ "heartbeat_runs_agent_id_agents_id_fk": {
++ "name": "heartbeat_runs_agent_id_agents_id_fk",
++ "tableFrom": "heartbeat_runs",
++ "tableTo": "agents",
++ "columnsFrom": [
++ "agent_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
+ },
- "approval_id": {
- "name": "approval_id",
++ "heartbeat_runs_wakeup_request_id_agent_wakeup_requests_id_fk": {
++ "name": "heartbeat_runs_wakeup_request_id_agent_wakeup_requests_id_fk",
++ "tableFrom": "heartbeat_runs",
++ "tableTo": "agent_wakeup_requests",
++ "columnsFrom": [
++ "wakeup_request_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {},
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.instance_user_roles": {
++ "name": "instance_user_roles",
++ "schema": "",
++ "columns": {
++ "id": {
++ "name": "id",
+ "type": "uuid",
- "primaryKey": false,
- "notNull": true
++ "primaryKey": true,
++ "notNull": true,
++ "default": "gen_random_uuid()"
+ },
- "linked_by_agent_id": {
- "name": "linked_by_agent_id",
- "type": "uuid",
++ "user_id": {
++ "name": "user_id",
++ "type": "text",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true
+ },
- "linked_by_user_id": {
- "name": "linked_by_user_id",
++ "role": {
++ "name": "role",
+ "type": "text",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true,
++ "default": "'instance_admin'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
++ },
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
+ }
+ },
+ "indexes": {
- "issue_approvals_issue_idx": {
- "name": "issue_approvals_issue_idx",
++ "instance_user_roles_user_role_unique_idx": {
++ "name": "instance_user_roles_user_role_unique_idx",
+ "columns": [
+ {
- "expression": "issue_id",
++ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
- }
- ],
- "isUnique": false,
- "concurrently": false,
- "method": "btree",
- "with": {}
- },
- "issue_approvals_approval_idx": {
- "name": "issue_approvals_approval_idx",
- "columns": [
++ },
+ {
- "expression": "approval_id",
++ "expression": "role",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
- "isUnique": false,
++ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "issue_approvals_company_idx": {
- "name": "issue_approvals_company_idx",
++ "instance_user_roles_role_idx": {
++ "name": "instance_user_roles_role_idx",
+ "columns": [
+ {
- "expression": "company_id",
++ "expression": "role",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
- "foreignKeys": {
- "issue_approvals_company_id_companies_id_fk": {
- "name": "issue_approvals_company_id_companies_id_fk",
- "tableFrom": "issue_approvals",
- "tableTo": "companies",
- "columnsFrom": [
- "company_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "issue_approvals_issue_id_issues_id_fk": {
- "name": "issue_approvals_issue_id_issues_id_fk",
- "tableFrom": "issue_approvals",
- "tableTo": "issues",
- "columnsFrom": [
- "issue_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "issue_approvals_approval_id_approvals_id_fk": {
- "name": "issue_approvals_approval_id_approvals_id_fk",
- "tableFrom": "issue_approvals",
- "tableTo": "approvals",
- "columnsFrom": [
- "approval_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "issue_approvals_linked_by_agent_id_agents_id_fk": {
- "name": "issue_approvals_linked_by_agent_id_agents_id_fk",
- "tableFrom": "issue_approvals",
- "tableTo": "agents",
- "columnsFrom": [
- "linked_by_agent_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {
- "issue_approvals_pk": {
- "name": "issue_approvals_pk",
- "columns": [
- "issue_id",
- "approval_id"
- ]
- }
- },
++ "foreignKeys": {},
++ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
- "public.issue_attachments": {
- "name": "issue_attachments",
++ "public.invites": {
++ "name": "invites",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
- "notNull": true
++ "notNull": false
+ },
- "issue_id": {
- "name": "issue_id",
- "type": "uuid",
++ "invite_type": {
++ "name": "invite_type",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "'company_join'"
++ },
++ "token_hash": {
++ "name": "token_hash",
++ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
- "asset_id": {
- "name": "asset_id",
- "type": "uuid",
++ "allowed_join_types": {
++ "name": "allowed_join_types",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "'both'"
++ },
++ "defaults_payload": {
++ "name": "defaults_payload",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "expires_at": {
++ "name": "expires_at",
++ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
- "issue_comment_id": {
- "name": "issue_comment_id",
- "type": "uuid",
++ "invited_by_user_id": {
++ "name": "invited_by_user_id",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "revoked_at": {
++ "name": "revoked_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "accepted_at": {
++ "name": "accepted_at",
++ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
- "issue_attachments_company_issue_idx": {
- "name": "issue_attachments_company_issue_idx",
++ "invites_token_hash_unique_idx": {
++ "name": "invites_token_hash_unique_idx",
+ "columns": [
+ {
- "expression": "company_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "issue_id",
++ "expression": "token_hash",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
- "isUnique": false,
++ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "issue_attachments_issue_comment_idx": {
- "name": "issue_attachments_issue_comment_idx",
++ "invites_company_invite_state_idx": {
++ "name": "invites_company_invite_state_idx",
+ "columns": [
+ {
- "expression": "issue_comment_id",
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "invite_type",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "revoked_at",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
- },
- "issue_attachments_asset_uq": {
- "name": "issue_attachments_asset_uq",
- "columns": [
- {
- "expression": "asset_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
- ],
- "isUnique": true,
- "concurrently": false,
- "method": "btree",
- "with": {}
+ }
+ },
+ "foreignKeys": {
- "issue_attachments_company_id_companies_id_fk": {
- "name": "issue_attachments_company_id_companies_id_fk",
- "tableFrom": "issue_attachments",
++ "invites_company_id_companies_id_fk": {
++ "name": "invites_company_id_companies_id_fk",
++ "tableFrom": "invites",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
- },
- "issue_attachments_issue_id_issues_id_fk": {
- "name": "issue_attachments_issue_id_issues_id_fk",
- "tableFrom": "issue_attachments",
- "tableTo": "issues",
- "columnsFrom": [
- "issue_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "issue_attachments_asset_id_assets_id_fk": {
- "name": "issue_attachments_asset_id_assets_id_fk",
- "tableFrom": "issue_attachments",
- "tableTo": "assets",
- "columnsFrom": [
- "asset_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "issue_attachments_issue_comment_id_issue_comments_id_fk": {
- "name": "issue_attachments_issue_comment_id_issue_comments_id_fk",
- "tableFrom": "issue_attachments",
- "tableTo": "issue_comments",
- "columnsFrom": [
- "issue_comment_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
- "public.issue_comments": {
- "name": "issue_comments",
++ "public.issue_approvals": {
++ "name": "issue_approvals",
+ "schema": "",
+ "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
- "author_agent_id": {
- "name": "author_agent_id",
++ "approval_id": {
++ "name": "approval_id",
+ "type": "uuid",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true
+ },
- "author_user_id": {
- "name": "author_user_id",
- "type": "text",
++ "linked_by_agent_id": {
++ "name": "linked_by_agent_id",
++ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
- "body": {
- "name": "body",
++ "linked_by_user_id": {
++ "name": "linked_by_user_id",
+ "type": "text",
+ "primaryKey": false,
- "notNull": true
++ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
+ }
+ },
+ "indexes": {
- "issue_comments_issue_idx": {
- "name": "issue_comments_issue_idx",
++ "issue_approvals_issue_idx": {
++ "name": "issue_approvals_issue_idx",
+ "columns": [
+ {
+ "expression": "issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "issue_comments_company_idx": {
- "name": "issue_comments_company_idx",
- "columns": [
- {
- "expression": "company_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
- ],
- "isUnique": false,
- "concurrently": false,
- "method": "btree",
- "with": {}
- },
- "issue_comments_company_issue_created_at_idx": {
- "name": "issue_comments_company_issue_created_at_idx",
++ "issue_approvals_approval_idx": {
++ "name": "issue_approvals_approval_idx",
+ "columns": [
+ {
- "expression": "company_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "issue_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "created_at",
++ "expression": "approval_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "issue_comments_company_author_issue_created_at_idx": {
- "name": "issue_comments_company_author_issue_created_at_idx",
++ "issue_approvals_company_idx": {
++ "name": "issue_approvals_company_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
- },
- {
- "expression": "author_user_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "issue_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "created_at",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
- "issue_comments_company_id_companies_id_fk": {
- "name": "issue_comments_company_id_companies_id_fk",
- "tableFrom": "issue_comments",
++ "issue_approvals_company_id_companies_id_fk": {
++ "name": "issue_approvals_company_id_companies_id_fk",
++ "tableFrom": "issue_approvals",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
- "issue_comments_issue_id_issues_id_fk": {
- "name": "issue_comments_issue_id_issues_id_fk",
- "tableFrom": "issue_comments",
++ "issue_approvals_issue_id_issues_id_fk": {
++ "name": "issue_approvals_issue_id_issues_id_fk",
++ "tableFrom": "issue_approvals",
+ "tableTo": "issues",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
- "onDelete": "no action",
++ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
- "issue_comments_author_agent_id_agents_id_fk": {
- "name": "issue_comments_author_agent_id_agents_id_fk",
- "tableFrom": "issue_comments",
++ "issue_approvals_approval_id_approvals_id_fk": {
++ "name": "issue_approvals_approval_id_approvals_id_fk",
++ "tableFrom": "issue_approvals",
++ "tableTo": "approvals",
++ "columnsFrom": [
++ "approval_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
++ },
++ "issue_approvals_linked_by_agent_id_agents_id_fk": {
++ "name": "issue_approvals_linked_by_agent_id_agents_id_fk",
++ "tableFrom": "issue_approvals",
+ "tableTo": "agents",
+ "columnsFrom": [
- "author_agent_id"
++ "linked_by_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
- "onDelete": "no action",
++ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
- "compositePrimaryKeys": {},
++ "compositePrimaryKeys": {
++ "issue_approvals_pk": {
++ "name": "issue_approvals_pk",
++ "columns": [
++ "issue_id",
++ "approval_id"
++ ]
++ }
++ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
- "public.issue_labels": {
- "name": "issue_labels",
++ "public.issue_attachments": {
++ "name": "issue_attachments",
+ "schema": "",
+ "columns": {
++ "id": {
++ "name": "id",
++ "type": "uuid",
++ "primaryKey": true,
++ "notNull": true,
++ "default": "gen_random_uuid()"
++ },
++ "company_id": {
++ "name": "company_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
- "label_id": {
- "name": "label_id",
++ "asset_id": {
++ "name": "asset_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
- "company_id": {
- "name": "company_id",
++ "issue_comment_id": {
++ "name": "issue_comment_id",
+ "type": "uuid",
+ "primaryKey": false,
- "notNull": true
++ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
++ },
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
+ }
+ },
+ "indexes": {
- "issue_labels_issue_idx": {
- "name": "issue_labels_issue_idx",
++ "issue_attachments_company_issue_idx": {
++ "name": "issue_attachments_company_issue_idx",
+ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
+ {
+ "expression": "issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "issue_labels_label_idx": {
- "name": "issue_labels_label_idx",
++ "issue_attachments_issue_comment_idx": {
++ "name": "issue_attachments_issue_comment_idx",
+ "columns": [
+ {
- "expression": "label_id",
++ "expression": "issue_comment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "issue_labels_company_idx": {
- "name": "issue_labels_company_idx",
++ "issue_attachments_asset_uq": {
++ "name": "issue_attachments_asset_uq",
+ "columns": [
+ {
- "expression": "company_id",
++ "expression": "asset_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
- "isUnique": false,
++ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
- "issue_labels_issue_id_issues_id_fk": {
- "name": "issue_labels_issue_id_issues_id_fk",
- "tableFrom": "issue_labels",
++ "issue_attachments_company_id_companies_id_fk": {
++ "name": "issue_attachments_company_id_companies_id_fk",
++ "tableFrom": "issue_attachments",
++ "tableTo": "companies",
++ "columnsFrom": [
++ "company_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ },
++ "issue_attachments_issue_id_issues_id_fk": {
++ "name": "issue_attachments_issue_id_issues_id_fk",
++ "tableFrom": "issue_attachments",
+ "tableTo": "issues",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
- "issue_labels_label_id_labels_id_fk": {
- "name": "issue_labels_label_id_labels_id_fk",
- "tableFrom": "issue_labels",
- "tableTo": "labels",
++ "issue_attachments_asset_id_assets_id_fk": {
++ "name": "issue_attachments_asset_id_assets_id_fk",
++ "tableFrom": "issue_attachments",
++ "tableTo": "assets",
+ "columnsFrom": [
- "label_id"
++ "asset_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
- "issue_labels_company_id_companies_id_fk": {
- "name": "issue_labels_company_id_companies_id_fk",
- "tableFrom": "issue_labels",
- "tableTo": "companies",
++ "issue_attachments_issue_comment_id_issue_comments_id_fk": {
++ "name": "issue_attachments_issue_comment_id_issue_comments_id_fk",
++ "tableFrom": "issue_attachments",
++ "tableTo": "issue_comments",
+ "columnsFrom": [
- "company_id"
++ "issue_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
- "onDelete": "cascade",
++ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
- "compositePrimaryKeys": {
- "issue_labels_pk": {
- "name": "issue_labels_pk",
- "columns": [
- "issue_id",
- "label_id"
- ]
- }
- },
++ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
- "public.issue_read_states": {
- "name": "issue_read_states",
++ "public.issue_comments": {
++ "name": "issue_comments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
- "user_id": {
- "name": "user_id",
++ "author_agent_id": {
++ "name": "author_agent_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "author_user_id": {
++ "name": "author_user_id",
+ "type": "text",
+ "primaryKey": false,
- "notNull": true
++ "notNull": false
+ },
- "last_read_at": {
- "name": "last_read_at",
- "type": "timestamp with time zone",
++ "body": {
++ "name": "body",
++ "type": "text",
+ "primaryKey": false,
- "notNull": true,
- "default": "now()"
++ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
- "issue_read_states_company_issue_idx": {
- "name": "issue_read_states_company_issue_idx",
++ "issue_comments_issue_idx": {
++ "name": "issue_comments_issue_idx",
+ "columns": [
+ {
- "expression": "company_id",
++ "expression": "issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
- },
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "issue_comments_company_idx": {
++ "name": "issue_comments_company_idx",
++ "columns": [
+ {
- "expression": "issue_id",
++ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "issue_read_states_company_user_idx": {
- "name": "issue_read_states_company_user_idx",
++ "issue_comments_company_issue_created_at_idx": {
++ "name": "issue_comments_company_issue_created_at_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
- "expression": "user_id",
++ "expression": "issue_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "issue_read_states_company_issue_user_idx": {
- "name": "issue_read_states_company_issue_user_idx",
++ "issue_comments_company_author_issue_created_at_idx": {
++ "name": "issue_comments_company_author_issue_created_at_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
++ {
++ "expression": "author_user_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
+ {
+ "expression": "issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
- "expression": "user_id",
++ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
- "isUnique": true,
++ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
- "issue_read_states_company_id_companies_id_fk": {
- "name": "issue_read_states_company_id_companies_id_fk",
- "tableFrom": "issue_read_states",
++ "issue_comments_company_id_companies_id_fk": {
++ "name": "issue_comments_company_id_companies_id_fk",
++ "tableFrom": "issue_comments",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
- "issue_read_states_issue_id_issues_id_fk": {
- "name": "issue_read_states_issue_id_issues_id_fk",
- "tableFrom": "issue_read_states",
++ "issue_comments_issue_id_issues_id_fk": {
++ "name": "issue_comments_issue_id_issues_id_fk",
++ "tableFrom": "issue_comments",
+ "tableTo": "issues",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
++ },
++ "issue_comments_author_agent_id_agents_id_fk": {
++ "name": "issue_comments_author_agent_id_agents_id_fk",
++ "tableFrom": "issue_comments",
++ "tableTo": "agents",
++ "columnsFrom": [
++ "author_agent_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
- "public.issues": {
- "name": "issues",
++ "public.issue_documents": {
++ "name": "issue_documents",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
- "project_id": {
- "name": "project_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "goal_id": {
- "name": "goal_id",
++ "issue_id": {
++ "name": "issue_id",
+ "type": "uuid",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true
+ },
- "parent_id": {
- "name": "parent_id",
++ "document_id": {
++ "name": "document_id",
+ "type": "uuid",
+ "primaryKey": false,
- "notNull": false
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
+ "notNull": true
+ },
- "description": {
- "name": "description",
++ "key": {
++ "name": "key",
+ "type": "text",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true
+ },
- "status": {
- "name": "status",
- "type": "text",
++ "created_at": {
++ "name": "created_at",
++ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
- "default": "'backlog'"
++ "default": "now()"
+ },
- "priority": {
- "name": "priority",
- "type": "text",
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
- "default": "'medium'"
- },
- "assignee_agent_id": {
- "name": "assignee_agent_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "assignee_user_id": {
- "name": "assignee_user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "checkout_run_id": {
- "name": "checkout_run_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "execution_run_id": {
- "name": "execution_run_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
++ "default": "now()"
++ }
++ },
++ "indexes": {
++ "issue_documents_company_issue_key_uq": {
++ "name": "issue_documents_company_issue_key_uq",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "issue_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "key",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": true,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
+ },
- "execution_agent_name_key": {
- "name": "execution_agent_name_key",
- "type": "text",
- "primaryKey": false,
- "notNull": false
++ "issue_documents_document_uq": {
++ "name": "issue_documents_document_uq",
++ "columns": [
++ {
++ "expression": "document_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": true,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "issue_documents_company_issue_updated_idx": {
++ "name": "issue_documents_company_issue_updated_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "issue_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "updated_at",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ }
++ },
++ "foreignKeys": {
++ "issue_documents_company_id_companies_id_fk": {
++ "name": "issue_documents_company_id_companies_id_fk",
++ "tableFrom": "issue_documents",
++ "tableTo": "companies",
++ "columnsFrom": [
++ "company_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ },
++ "issue_documents_issue_id_issues_id_fk": {
++ "name": "issue_documents_issue_id_issues_id_fk",
++ "tableFrom": "issue_documents",
++ "tableTo": "issues",
++ "columnsFrom": [
++ "issue_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
++ },
++ "issue_documents_document_id_documents_id_fk": {
++ "name": "issue_documents_document_id_documents_id_fk",
++ "tableFrom": "issue_documents",
++ "tableTo": "documents",
++ "columnsFrom": [
++ "document_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {},
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.issue_labels": {
++ "name": "issue_labels",
++ "schema": "",
++ "columns": {
++ "issue_id": {
++ "name": "issue_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "label_id": {
++ "name": "label_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "company_id": {
++ "name": "company_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "created_at": {
++ "name": "created_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ }
++ },
++ "indexes": {
++ "issue_labels_issue_idx": {
++ "name": "issue_labels_issue_idx",
++ "columns": [
++ {
++ "expression": "issue_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "issue_labels_label_idx": {
++ "name": "issue_labels_label_idx",
++ "columns": [
++ {
++ "expression": "label_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "issue_labels_company_idx": {
++ "name": "issue_labels_company_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ }
++ },
++ "foreignKeys": {
++ "issue_labels_issue_id_issues_id_fk": {
++ "name": "issue_labels_issue_id_issues_id_fk",
++ "tableFrom": "issue_labels",
++ "tableTo": "issues",
++ "columnsFrom": [
++ "issue_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
++ },
++ "issue_labels_label_id_labels_id_fk": {
++ "name": "issue_labels_label_id_labels_id_fk",
++ "tableFrom": "issue_labels",
++ "tableTo": "labels",
++ "columnsFrom": [
++ "label_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
++ },
++ "issue_labels_company_id_companies_id_fk": {
++ "name": "issue_labels_company_id_companies_id_fk",
++ "tableFrom": "issue_labels",
++ "tableTo": "companies",
++ "columnsFrom": [
++ "company_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {
++ "issue_labels_pk": {
++ "name": "issue_labels_pk",
++ "columns": [
++ "issue_id",
++ "label_id"
++ ]
++ }
++ },
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.issue_read_states": {
++ "name": "issue_read_states",
++ "schema": "",
++ "columns": {
++ "id": {
++ "name": "id",
++ "type": "uuid",
++ "primaryKey": true,
++ "notNull": true,
++ "default": "gen_random_uuid()"
++ },
++ "company_id": {
++ "name": "company_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "issue_id": {
++ "name": "issue_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "user_id": {
++ "name": "user_id",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "last_read_at": {
++ "name": "last_read_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ },
++ "created_at": {
++ "name": "created_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ },
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ }
++ },
++ "indexes": {
++ "issue_read_states_company_issue_idx": {
++ "name": "issue_read_states_company_issue_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "issue_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "issue_read_states_company_user_idx": {
++ "name": "issue_read_states_company_user_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "user_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "issue_read_states_company_issue_user_idx": {
++ "name": "issue_read_states_company_issue_user_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "issue_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "user_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": true,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ }
++ },
++ "foreignKeys": {
++ "issue_read_states_company_id_companies_id_fk": {
++ "name": "issue_read_states_company_id_companies_id_fk",
++ "tableFrom": "issue_read_states",
++ "tableTo": "companies",
++ "columnsFrom": [
++ "company_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ },
++ "issue_read_states_issue_id_issues_id_fk": {
++ "name": "issue_read_states_issue_id_issues_id_fk",
++ "tableFrom": "issue_read_states",
++ "tableTo": "issues",
++ "columnsFrom": [
++ "issue_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {},
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.issues": {
++ "name": "issues",
++ "schema": "",
++ "columns": {
++ "id": {
++ "name": "id",
++ "type": "uuid",
++ "primaryKey": true,
++ "notNull": true,
++ "default": "gen_random_uuid()"
++ },
++ "company_id": {
++ "name": "company_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "project_id": {
++ "name": "project_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "goal_id": {
++ "name": "goal_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "parent_id": {
++ "name": "parent_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "title": {
++ "name": "title",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "description": {
++ "name": "description",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "status": {
++ "name": "status",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "'backlog'"
++ },
++ "priority": {
++ "name": "priority",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "'medium'"
++ },
++ "assignee_agent_id": {
++ "name": "assignee_agent_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "assignee_user_id": {
++ "name": "assignee_user_id",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "checkout_run_id": {
++ "name": "checkout_run_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "execution_run_id": {
++ "name": "execution_run_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "execution_agent_name_key": {
++ "name": "execution_agent_name_key",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
+ },
+ "execution_locked_at": {
+ "name": "execution_locked_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
- "notNull": false
++ "notNull": false
++ },
++ "created_by_agent_id": {
++ "name": "created_by_agent_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "created_by_user_id": {
++ "name": "created_by_user_id",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "issue_number": {
++ "name": "issue_number",
++ "type": "integer",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "identifier": {
++ "name": "identifier",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "request_depth": {
++ "name": "request_depth",
++ "type": "integer",
++ "primaryKey": false,
++ "notNull": true,
++ "default": 0
++ },
++ "billing_code": {
++ "name": "billing_code",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "assignee_adapter_overrides": {
++ "name": "assignee_adapter_overrides",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "execution_workspace_settings": {
++ "name": "execution_workspace_settings",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "started_at": {
++ "name": "started_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "completed_at": {
++ "name": "completed_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "cancelled_at": {
++ "name": "cancelled_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "hidden_at": {
++ "name": "hidden_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "created_at": {
++ "name": "created_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ },
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ }
++ },
++ "indexes": {
++ "issues_company_status_idx": {
++ "name": "issues_company_status_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "status",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "issues_company_assignee_status_idx": {
++ "name": "issues_company_assignee_status_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "assignee_agent_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "status",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "issues_company_assignee_user_status_idx": {
++ "name": "issues_company_assignee_user_status_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "assignee_user_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "status",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "issues_company_parent_idx": {
++ "name": "issues_company_parent_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "parent_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "issues_company_project_idx": {
++ "name": "issues_company_project_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "project_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "issues_identifier_idx": {
++ "name": "issues_identifier_idx",
++ "columns": [
++ {
++ "expression": "identifier",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": true,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ }
++ },
++ "foreignKeys": {
++ "issues_company_id_companies_id_fk": {
++ "name": "issues_company_id_companies_id_fk",
++ "tableFrom": "issues",
++ "tableTo": "companies",
++ "columnsFrom": [
++ "company_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ },
++ "issues_project_id_projects_id_fk": {
++ "name": "issues_project_id_projects_id_fk",
++ "tableFrom": "issues",
++ "tableTo": "projects",
++ "columnsFrom": [
++ "project_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ },
++ "issues_goal_id_goals_id_fk": {
++ "name": "issues_goal_id_goals_id_fk",
++ "tableFrom": "issues",
++ "tableTo": "goals",
++ "columnsFrom": [
++ "goal_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ },
++ "issues_parent_id_issues_id_fk": {
++ "name": "issues_parent_id_issues_id_fk",
++ "tableFrom": "issues",
++ "tableTo": "issues",
++ "columnsFrom": [
++ "parent_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ },
++ "issues_assignee_agent_id_agents_id_fk": {
++ "name": "issues_assignee_agent_id_agents_id_fk",
++ "tableFrom": "issues",
++ "tableTo": "agents",
++ "columnsFrom": [
++ "assignee_agent_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ },
++ "issues_checkout_run_id_heartbeat_runs_id_fk": {
++ "name": "issues_checkout_run_id_heartbeat_runs_id_fk",
++ "tableFrom": "issues",
++ "tableTo": "heartbeat_runs",
++ "columnsFrom": [
++ "checkout_run_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "set null",
++ "onUpdate": "no action"
++ },
++ "issues_execution_run_id_heartbeat_runs_id_fk": {
++ "name": "issues_execution_run_id_heartbeat_runs_id_fk",
++ "tableFrom": "issues",
++ "tableTo": "heartbeat_runs",
++ "columnsFrom": [
++ "execution_run_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "set null",
++ "onUpdate": "no action"
++ },
++ "issues_created_by_agent_id_agents_id_fk": {
++ "name": "issues_created_by_agent_id_agents_id_fk",
++ "tableFrom": "issues",
++ "tableTo": "agents",
++ "columnsFrom": [
++ "created_by_agent_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {},
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.join_requests": {
++ "name": "join_requests",
++ "schema": "",
++ "columns": {
++ "id": {
++ "name": "id",
++ "type": "uuid",
++ "primaryKey": true,
++ "notNull": true,
++ "default": "gen_random_uuid()"
++ },
++ "invite_id": {
++ "name": "invite_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "company_id": {
++ "name": "company_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "request_type": {
++ "name": "request_type",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "status": {
++ "name": "status",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "'pending_approval'"
++ },
++ "request_ip": {
++ "name": "request_ip",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "requesting_user_id": {
++ "name": "requesting_user_id",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "request_email_snapshot": {
++ "name": "request_email_snapshot",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "agent_name": {
++ "name": "agent_name",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "adapter_type": {
++ "name": "adapter_type",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "capabilities": {
++ "name": "capabilities",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "agent_defaults_payload": {
++ "name": "agent_defaults_payload",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "claim_secret_hash": {
++ "name": "claim_secret_hash",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "claim_secret_expires_at": {
++ "name": "claim_secret_expires_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "claim_secret_consumed_at": {
++ "name": "claim_secret_consumed_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "created_agent_id": {
++ "name": "created_agent_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "approved_by_user_id": {
++ "name": "approved_by_user_id",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "approved_at": {
++ "name": "approved_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "rejected_by_user_id": {
++ "name": "rejected_by_user_id",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "rejected_at": {
++ "name": "rejected_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "created_at": {
++ "name": "created_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ },
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ }
++ },
++ "indexes": {
++ "join_requests_invite_unique_idx": {
++ "name": "join_requests_invite_unique_idx",
++ "columns": [
++ {
++ "expression": "invite_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": true,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "join_requests_company_status_type_created_idx": {
++ "name": "join_requests_company_status_type_created_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "status",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "request_type",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "created_at",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ }
++ },
++ "foreignKeys": {
++ "join_requests_invite_id_invites_id_fk": {
++ "name": "join_requests_invite_id_invites_id_fk",
++ "tableFrom": "join_requests",
++ "tableTo": "invites",
++ "columnsFrom": [
++ "invite_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ },
++ "join_requests_company_id_companies_id_fk": {
++ "name": "join_requests_company_id_companies_id_fk",
++ "tableFrom": "join_requests",
++ "tableTo": "companies",
++ "columnsFrom": [
++ "company_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ },
++ "join_requests_created_agent_id_agents_id_fk": {
++ "name": "join_requests_created_agent_id_agents_id_fk",
++ "tableFrom": "join_requests",
++ "tableTo": "agents",
++ "columnsFrom": [
++ "created_agent_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "no action",
++ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {},
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.labels": {
++ "name": "labels",
++ "schema": "",
++ "columns": {
++ "id": {
++ "name": "id",
++ "type": "uuid",
++ "primaryKey": true,
++ "notNull": true,
++ "default": "gen_random_uuid()"
++ },
++ "company_id": {
++ "name": "company_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "name": {
++ "name": "name",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "color": {
++ "name": "color",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "created_at": {
++ "name": "created_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ },
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ }
++ },
++ "indexes": {
++ "labels_company_idx": {
++ "name": "labels_company_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "labels_company_name_idx": {
++ "name": "labels_company_name_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "name",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": true,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ }
++ },
++ "foreignKeys": {
++ "labels_company_id_companies_id_fk": {
++ "name": "labels_company_id_companies_id_fk",
++ "tableFrom": "labels",
++ "tableTo": "companies",
++ "columnsFrom": [
++ "company_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {},
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.plugin_company_settings": {
++ "name": "plugin_company_settings",
++ "schema": "",
++ "columns": {
++ "id": {
++ "name": "id",
++ "type": "uuid",
++ "primaryKey": true,
++ "notNull": true,
++ "default": "gen_random_uuid()"
++ },
++ "company_id": {
++ "name": "company_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "plugin_id": {
++ "name": "plugin_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "enabled": {
++ "name": "enabled",
++ "type": "boolean",
++ "primaryKey": false,
++ "notNull": true,
++ "default": true
++ },
++ "settings_json": {
++ "name": "settings_json",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "'{}'::jsonb"
++ },
++ "last_error": {
++ "name": "last_error",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "created_at": {
++ "name": "created_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ },
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ }
++ },
++ "indexes": {
++ "plugin_company_settings_company_idx": {
++ "name": "plugin_company_settings_company_idx",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "plugin_company_settings_plugin_idx": {
++ "name": "plugin_company_settings_plugin_idx",
++ "columns": [
++ {
++ "expression": "plugin_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "plugin_company_settings_company_plugin_uq": {
++ "name": "plugin_company_settings_company_plugin_uq",
++ "columns": [
++ {
++ "expression": "company_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "plugin_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": true,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ }
++ },
++ "foreignKeys": {
++ "plugin_company_settings_company_id_companies_id_fk": {
++ "name": "plugin_company_settings_company_id_companies_id_fk",
++ "tableFrom": "plugin_company_settings",
++ "tableTo": "companies",
++ "columnsFrom": [
++ "company_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
++ },
++ "plugin_company_settings_plugin_id_plugins_id_fk": {
++ "name": "plugin_company_settings_plugin_id_plugins_id_fk",
++ "tableFrom": "plugin_company_settings",
++ "tableTo": "plugins",
++ "columnsFrom": [
++ "plugin_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {},
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.plugin_config": {
++ "name": "plugin_config",
++ "schema": "",
++ "columns": {
++ "id": {
++ "name": "id",
++ "type": "uuid",
++ "primaryKey": true,
++ "notNull": true,
++ "default": "gen_random_uuid()"
++ },
++ "plugin_id": {
++ "name": "plugin_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "config_json": {
++ "name": "config_json",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "'{}'::jsonb"
++ },
++ "last_error": {
++ "name": "last_error",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "created_at": {
++ "name": "created_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ },
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ }
++ },
++ "indexes": {
++ "plugin_config_plugin_id_idx": {
++ "name": "plugin_config_plugin_id_idx",
++ "columns": [
++ {
++ "expression": "plugin_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": true,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ }
++ },
++ "foreignKeys": {
++ "plugin_config_plugin_id_plugins_id_fk": {
++ "name": "plugin_config_plugin_id_plugins_id_fk",
++ "tableFrom": "plugin_config",
++ "tableTo": "plugins",
++ "columnsFrom": [
++ "plugin_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {},
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.plugin_entities": {
++ "name": "plugin_entities",
++ "schema": "",
++ "columns": {
++ "id": {
++ "name": "id",
++ "type": "uuid",
++ "primaryKey": true,
++ "notNull": true,
++ "default": "gen_random_uuid()"
++ },
++ "plugin_id": {
++ "name": "plugin_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "entity_type": {
++ "name": "entity_type",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "scope_kind": {
++ "name": "scope_kind",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "scope_id": {
++ "name": "scope_id",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "external_id": {
++ "name": "external_id",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "title": {
++ "name": "title",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "status": {
++ "name": "status",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "data": {
++ "name": "data",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "'{}'::jsonb"
++ },
++ "created_at": {
++ "name": "created_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ },
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ }
++ },
++ "indexes": {
++ "plugin_entities_plugin_idx": {
++ "name": "plugin_entities_plugin_idx",
++ "columns": [
++ {
++ "expression": "plugin_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
+ },
- "created_by_agent_id": {
- "name": "created_by_agent_id",
++ "plugin_entities_type_idx": {
++ "name": "plugin_entities_type_idx",
++ "columns": [
++ {
++ "expression": "entity_type",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "plugin_entities_scope_idx": {
++ "name": "plugin_entities_scope_idx",
++ "columns": [
++ {
++ "expression": "scope_kind",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "scope_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "plugin_entities_external_idx": {
++ "name": "plugin_entities_external_idx",
++ "columns": [
++ {
++ "expression": "plugin_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "entity_type",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "external_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": true,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ }
++ },
++ "foreignKeys": {
++ "plugin_entities_plugin_id_plugins_id_fk": {
++ "name": "plugin_entities_plugin_id_plugins_id_fk",
++ "tableFrom": "plugin_entities",
++ "tableTo": "plugins",
++ "columnsFrom": [
++ "plugin_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {},
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.plugin_job_runs": {
++ "name": "plugin_job_runs",
++ "schema": "",
++ "columns": {
++ "id": {
++ "name": "id",
++ "type": "uuid",
++ "primaryKey": true,
++ "notNull": true,
++ "default": "gen_random_uuid()"
++ },
++ "job_id": {
++ "name": "job_id",
+ "type": "uuid",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true
+ },
- "created_by_user_id": {
- "name": "created_by_user_id",
- "type": "text",
++ "plugin_id": {
++ "name": "plugin_id",
++ "type": "uuid",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true
+ },
- "issue_number": {
- "name": "issue_number",
- "type": "integer",
++ "trigger": {
++ "name": "trigger",
++ "type": "text",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true
+ },
- "identifier": {
- "name": "identifier",
++ "status": {
++ "name": "status",
+ "type": "text",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true,
++ "default": "'pending'"
+ },
- "request_depth": {
- "name": "request_depth",
++ "duration_ms": {
++ "name": "duration_ms",
+ "type": "integer",
+ "primaryKey": false,
- "notNull": true,
- "default": 0
++ "notNull": false
+ },
- "billing_code": {
- "name": "billing_code",
++ "error": {
++ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
- "assignee_adapter_overrides": {
- "name": "assignee_adapter_overrides",
++ "logs": {
++ "name": "logs",
+ "type": "jsonb",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true,
++ "default": "'[]'::jsonb"
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
- "completed_at": {
- "name": "completed_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": false
- },
- "cancelled_at": {
- "name": "cancelled_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": false
- },
- "hidden_at": {
- "name": "hidden_at",
++ "finished_at": {
++ "name": "finished_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
+ }
+ },
+ "indexes": {
- "issues_company_status_idx": {
- "name": "issues_company_status_idx",
++ "plugin_job_runs_job_idx": {
++ "name": "plugin_job_runs_job_idx",
+ "columns": [
+ {
- "expression": "company_id",
++ "expression": "job_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
- },
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "plugin_job_runs_plugin_idx": {
++ "name": "plugin_job_runs_plugin_idx",
++ "columns": [
++ {
++ "expression": "plugin_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "plugin_job_runs_status_idx": {
++ "name": "plugin_job_runs_status_idx",
++ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
++ }
++ },
++ "foreignKeys": {
++ "plugin_job_runs_job_id_plugin_jobs_id_fk": {
++ "name": "plugin_job_runs_job_id_plugin_jobs_id_fk",
++ "tableFrom": "plugin_job_runs",
++ "tableTo": "plugin_jobs",
++ "columnsFrom": [
++ "job_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
+ },
- "issues_company_assignee_status_idx": {
- "name": "issues_company_assignee_status_idx",
++ "plugin_job_runs_plugin_id_plugins_id_fk": {
++ "name": "plugin_job_runs_plugin_id_plugins_id_fk",
++ "tableFrom": "plugin_job_runs",
++ "tableTo": "plugins",
++ "columnsFrom": [
++ "plugin_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {},
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.plugin_jobs": {
++ "name": "plugin_jobs",
++ "schema": "",
++ "columns": {
++ "id": {
++ "name": "id",
++ "type": "uuid",
++ "primaryKey": true,
++ "notNull": true,
++ "default": "gen_random_uuid()"
++ },
++ "plugin_id": {
++ "name": "plugin_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "job_key": {
++ "name": "job_key",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "schedule": {
++ "name": "schedule",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "status": {
++ "name": "status",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "'active'"
++ },
++ "last_run_at": {
++ "name": "last_run_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "next_run_at": {
++ "name": "next_run_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "created_at": {
++ "name": "created_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ },
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ }
++ },
++ "indexes": {
++ "plugin_jobs_plugin_idx": {
++ "name": "plugin_jobs_plugin_idx",
+ "columns": [
+ {
- "expression": "company_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "assignee_agent_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "status",
++ "expression": "plugin_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "issues_company_assignee_user_status_idx": {
- "name": "issues_company_assignee_user_status_idx",
++ "plugin_jobs_next_run_idx": {
++ "name": "plugin_jobs_next_run_idx",
+ "columns": [
+ {
- "expression": "company_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "assignee_user_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "status",
++ "expression": "next_run_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "issues_company_parent_idx": {
- "name": "issues_company_parent_idx",
++ "plugin_jobs_unique_idx": {
++ "name": "plugin_jobs_unique_idx",
+ "columns": [
+ {
- "expression": "company_id",
++ "expression": "plugin_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
- "expression": "parent_id",
++ "expression": "job_key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
- "isUnique": false,
++ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
++ }
++ },
++ "foreignKeys": {
++ "plugin_jobs_plugin_id_plugins_id_fk": {
++ "name": "plugin_jobs_plugin_id_plugins_id_fk",
++ "tableFrom": "plugin_jobs",
++ "tableTo": "plugins",
++ "columnsFrom": [
++ "plugin_id"
++ ],
++ "columnsTo": [
++ "id"
++ ],
++ "onDelete": "cascade",
++ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {},
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.plugin_logs": {
++ "name": "plugin_logs",
++ "schema": "",
++ "columns": {
++ "id": {
++ "name": "id",
++ "type": "uuid",
++ "primaryKey": true,
++ "notNull": true,
++ "default": "gen_random_uuid()"
+ },
- "issues_company_project_idx": {
- "name": "issues_company_project_idx",
++ "plugin_id": {
++ "name": "plugin_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "level": {
++ "name": "level",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "'info'"
++ },
++ "message": {
++ "name": "message",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "meta": {
++ "name": "meta",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "created_at": {
++ "name": "created_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ }
++ },
++ "indexes": {
++ "plugin_logs_plugin_time_idx": {
++ "name": "plugin_logs_plugin_time_idx",
+ "columns": [
+ {
- "expression": "company_id",
++ "expression": "plugin_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
- "expression": "project_id",
++ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "issues_identifier_idx": {
- "name": "issues_identifier_idx",
++ "plugin_logs_level_idx": {
++ "name": "plugin_logs_level_idx",
+ "columns": [
+ {
- "expression": "identifier",
++ "expression": "level",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
- "isUnique": true,
++ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
- "issues_company_id_companies_id_fk": {
- "name": "issues_company_id_companies_id_fk",
- "tableFrom": "issues",
- "tableTo": "companies",
++ "plugin_logs_plugin_id_plugins_id_fk": {
++ "name": "plugin_logs_plugin_id_plugins_id_fk",
++ "tableFrom": "plugin_logs",
++ "tableTo": "plugins",
+ "columnsFrom": [
- "company_id"
++ "plugin_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
- "onDelete": "no action",
++ "onDelete": "cascade",
+ "onUpdate": "no action"
++ }
++ },
++ "compositePrimaryKeys": {},
++ "uniqueConstraints": {},
++ "policies": {},
++ "checkConstraints": {},
++ "isRLSEnabled": false
++ },
++ "public.plugin_state": {
++ "name": "plugin_state",
++ "schema": "",
++ "columns": {
++ "id": {
++ "name": "id",
++ "type": "uuid",
++ "primaryKey": true,
++ "notNull": true,
++ "default": "gen_random_uuid()"
+ },
- "issues_project_id_projects_id_fk": {
- "name": "issues_project_id_projects_id_fk",
- "tableFrom": "issues",
- "tableTo": "projects",
- "columnsFrom": [
- "project_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
++ "plugin_id": {
++ "name": "plugin_id",
++ "type": "uuid",
++ "primaryKey": false,
++ "notNull": true
+ },
- "issues_goal_id_goals_id_fk": {
- "name": "issues_goal_id_goals_id_fk",
- "tableFrom": "issues",
- "tableTo": "goals",
- "columnsFrom": [
- "goal_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
++ "scope_kind": {
++ "name": "scope_kind",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true
+ },
- "issues_parent_id_issues_id_fk": {
- "name": "issues_parent_id_issues_id_fk",
- "tableFrom": "issues",
- "tableTo": "issues",
- "columnsFrom": [
- "parent_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
++ "scope_id": {
++ "name": "scope_id",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
+ },
- "issues_assignee_agent_id_agents_id_fk": {
- "name": "issues_assignee_agent_id_agents_id_fk",
- "tableFrom": "issues",
- "tableTo": "agents",
- "columnsFrom": [
- "assignee_agent_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
++ "namespace": {
++ "name": "namespace",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "'default'"
+ },
- "issues_checkout_run_id_heartbeat_runs_id_fk": {
- "name": "issues_checkout_run_id_heartbeat_runs_id_fk",
- "tableFrom": "issues",
- "tableTo": "heartbeat_runs",
- "columnsFrom": [
- "checkout_run_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
++ "state_key": {
++ "name": "state_key",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true
+ },
- "issues_execution_run_id_heartbeat_runs_id_fk": {
- "name": "issues_execution_run_id_heartbeat_runs_id_fk",
- "tableFrom": "issues",
- "tableTo": "heartbeat_runs",
- "columnsFrom": [
- "execution_run_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
++ "value_json": {
++ "name": "value_json",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": true
+ },
- "issues_created_by_agent_id_agents_id_fk": {
- "name": "issues_created_by_agent_id_agents_id_fk",
- "tableFrom": "issues",
- "tableTo": "agents",
++ "updated_at": {
++ "name": "updated_at",
++ "type": "timestamp with time zone",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "now()"
++ }
++ },
++ "indexes": {
++ "plugin_state_plugin_scope_idx": {
++ "name": "plugin_state_plugin_scope_idx",
++ "columns": [
++ {
++ "expression": "plugin_id",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ },
++ {
++ "expression": "scope_kind",
++ "isExpression": false,
++ "asc": true,
++ "nulls": "last"
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ }
++ },
++ "foreignKeys": {
++ "plugin_state_plugin_id_plugins_id_fk": {
++ "name": "plugin_state_plugin_id_plugins_id_fk",
++ "tableFrom": "plugin_state",
++ "tableTo": "plugins",
+ "columnsFrom": [
- "created_by_agent_id"
++ "plugin_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
- "onDelete": "no action",
++ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
- "uniqueConstraints": {},
++ "uniqueConstraints": {
++ "plugin_state_unique_entry_idx": {
++ "name": "plugin_state_unique_entry_idx",
++ "nullsNotDistinct": true,
++ "columns": [
++ "plugin_id",
++ "scope_kind",
++ "scope_id",
++ "namespace",
++ "state_key"
++ ]
++ }
++ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
- "public.join_requests": {
- "name": "join_requests",
++ "public.plugin_webhook_deliveries": {
++ "name": "plugin_webhook_deliveries",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
- "invite_id": {
- "name": "invite_id",
++ "plugin_id": {
++ "name": "plugin_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
- "company_id": {
- "name": "company_id",
- "type": "uuid",
++ "webhook_key": {
++ "name": "webhook_key",
++ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
- "request_type": {
- "name": "request_type",
++ "external_id": {
++ "name": "external_id",
+ "type": "text",
+ "primaryKey": false,
- "notNull": true
++ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
- "default": "'pending_approval'"
- },
- "request_ip": {
- "name": "request_ip",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "requesting_user_id": {
- "name": "requesting_user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "request_email_snapshot": {
- "name": "request_email_snapshot",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "agent_name": {
- "name": "agent_name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
++ "default": "'pending'"
+ },
- "adapter_type": {
- "name": "adapter_type",
- "type": "text",
++ "duration_ms": {
++ "name": "duration_ms",
++ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
- "capabilities": {
- "name": "capabilities",
++ "error": {
++ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
- "agent_defaults_payload": {
- "name": "agent_defaults_payload",
++ "payload": {
++ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
- "notNull": false
- },
- "claim_secret_hash": {
- "name": "claim_secret_hash",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "claim_secret_expires_at": {
- "name": "claim_secret_expires_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": false
- },
- "claim_secret_consumed_at": {
- "name": "claim_secret_consumed_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": false
- },
- "created_agent_id": {
- "name": "created_agent_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
++ "notNull": true
+ },
- "approved_by_user_id": {
- "name": "approved_by_user_id",
- "type": "text",
++ "headers": {
++ "name": "headers",
++ "type": "jsonb",
+ "primaryKey": false,
- "notNull": false
++ "notNull": true,
++ "default": "'{}'::jsonb"
+ },
- "approved_at": {
- "name": "approved_at",
++ "started_at": {
++ "name": "started_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
- "rejected_by_user_id": {
- "name": "rejected_by_user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "rejected_at": {
- "name": "rejected_at",
++ "finished_at": {
++ "name": "finished_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
+ }
+ },
+ "indexes": {
- "join_requests_invite_unique_idx": {
- "name": "join_requests_invite_unique_idx",
++ "plugin_webhook_deliveries_plugin_idx": {
++ "name": "plugin_webhook_deliveries_plugin_idx",
+ "columns": [
+ {
- "expression": "invite_id",
++ "expression": "plugin_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
- "isUnique": true,
++ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "join_requests_company_status_type_created_idx": {
- "name": "join_requests_company_status_type_created_idx",
++ "plugin_webhook_deliveries_status_idx": {
++ "name": "plugin_webhook_deliveries_status_idx",
+ "columns": [
- {
- "expression": "company_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
- },
- {
- "expression": "request_type",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
++ }
++ ],
++ "isUnique": false,
++ "concurrently": false,
++ "method": "btree",
++ "with": {}
++ },
++ "plugin_webhook_deliveries_key_idx": {
++ "name": "plugin_webhook_deliveries_key_idx",
++ "columns": [
+ {
- "expression": "created_at",
++ "expression": "webhook_key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
- "join_requests_invite_id_invites_id_fk": {
- "name": "join_requests_invite_id_invites_id_fk",
- "tableFrom": "join_requests",
- "tableTo": "invites",
- "columnsFrom": [
- "invite_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "join_requests_company_id_companies_id_fk": {
- "name": "join_requests_company_id_companies_id_fk",
- "tableFrom": "join_requests",
- "tableTo": "companies",
- "columnsFrom": [
- "company_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "join_requests_created_agent_id_agents_id_fk": {
- "name": "join_requests_created_agent_id_agents_id_fk",
- "tableFrom": "join_requests",
- "tableTo": "agents",
++ "plugin_webhook_deliveries_plugin_id_plugins_id_fk": {
++ "name": "plugin_webhook_deliveries_plugin_id_plugins_id_fk",
++ "tableFrom": "plugin_webhook_deliveries",
++ "tableTo": "plugins",
+ "columnsFrom": [
- "created_agent_id"
++ "plugin_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
- "onDelete": "no action",
++ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
- "public.labels": {
- "name": "labels",
++ "public.plugins": {
++ "name": "plugins",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
- "company_id": {
- "name": "company_id",
- "type": "uuid",
++ "plugin_key": {
++ "name": "plugin_key",
++ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
- "name": {
- "name": "name",
++ "package_name": {
++ "name": "package_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
- "color": {
- "name": "color",
++ "version": {
++ "name": "version",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
- "created_at": {
- "name": "created_at",
++ "api_version": {
++ "name": "api_version",
++ "type": "integer",
++ "primaryKey": false,
++ "notNull": true,
++ "default": 1
++ },
++ "categories": {
++ "name": "categories",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "'[]'::jsonb"
++ },
++ "manifest_json": {
++ "name": "manifest_json",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": true
++ },
++ "status": {
++ "name": "status",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": true,
++ "default": "'installed'"
++ },
++ "install_order": {
++ "name": "install_order",
++ "type": "integer",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "package_path": {
++ "name": "package_path",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "last_error": {
++ "name": "last_error",
++ "type": "text",
++ "primaryKey": false,
++ "notNull": false
++ },
++ "installed_at": {
++ "name": "installed_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
- "labels_company_idx": {
- "name": "labels_company_idx",
++ "plugins_plugin_key_idx": {
++ "name": "plugins_plugin_key_idx",
+ "columns": [
+ {
- "expression": "company_id",
++ "expression": "plugin_key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
- "isUnique": false,
++ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
- "labels_company_name_idx": {
- "name": "labels_company_name_idx",
++ "plugins_status_idx": {
++ "name": "plugins_status_idx",
+ "columns": [
+ {
- "expression": "company_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "name",
++ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
- "isUnique": true,
++ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
- "foreignKeys": {
- "labels_company_id_companies_id_fk": {
- "name": "labels_company_id_companies_id_fk",
- "tableFrom": "labels",
- "tableTo": "companies",
- "columnsFrom": [
- "company_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
++ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.principal_permission_grants": {
+ "name": "principal_permission_grants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "principal_type": {
+ "name": "principal_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "principal_id": {
+ "name": "principal_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_key": {
+ "name": "permission_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "scope": {
+ "name": "scope",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by_user_id": {
+ "name": "granted_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "principal_permission_grants_unique_idx": {
+ "name": "principal_permission_grants_unique_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "principal_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "principal_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "permission_key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "principal_permission_grants_company_permission_idx": {
+ "name": "principal_permission_grants_company_permission_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "permission_key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "principal_permission_grants_company_id_companies_id_fk": {
+ "name": "principal_permission_grants_company_id_companies_id_fk",
+ "tableFrom": "principal_permission_grants",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_goals": {
+ "name": "project_goals",
+ "schema": "",
+ "columns": {
+ "project_id": {
+ "name": "project_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "goal_id": {
+ "name": "goal_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "project_goals_project_idx": {
+ "name": "project_goals_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "project_goals_goal_idx": {
+ "name": "project_goals_goal_idx",
+ "columns": [
+ {
+ "expression": "goal_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "project_goals_company_idx": {
+ "name": "project_goals_company_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_goals_project_id_projects_id_fk": {
+ "name": "project_goals_project_id_projects_id_fk",
+ "tableFrom": "project_goals",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "project_goals_goal_id_goals_id_fk": {
+ "name": "project_goals_goal_id_goals_id_fk",
+ "tableFrom": "project_goals",
+ "tableTo": "goals",
+ "columnsFrom": [
+ "goal_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "project_goals_company_id_companies_id_fk": {
+ "name": "project_goals_company_id_companies_id_fk",
+ "tableFrom": "project_goals",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "project_goals_project_id_goal_id_pk": {
+ "name": "project_goals_project_id_goal_id_pk",
+ "columns": [
+ "project_id",
+ "goal_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_workspaces": {
+ "name": "project_workspaces",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cwd": {
+ "name": "cwd",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "repo_url": {
+ "name": "repo_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "repo_ref": {
+ "name": "repo_ref",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_primary": {
+ "name": "is_primary",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "project_workspaces_company_project_idx": {
+ "name": "project_workspaces_company_project_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "project_workspaces_project_primary_idx": {
+ "name": "project_workspaces_project_primary_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "is_primary",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_workspaces_company_id_companies_id_fk": {
+ "name": "project_workspaces_company_id_companies_id_fk",
+ "tableFrom": "project_workspaces",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "project_workspaces_project_id_projects_id_fk": {
+ "name": "project_workspaces_project_id_projects_id_fk",
+ "tableFrom": "project_workspaces",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.projects": {
+ "name": "projects",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "goal_id": {
+ "name": "goal_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'backlog'"
+ },
+ "lead_agent_id": {
+ "name": "lead_agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_date": {
+ "name": "target_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
++ },
++ "execution_workspace_policy": {
++ "name": "execution_workspace_policy",
++ "type": "jsonb",
++ "primaryKey": false,
++ "notNull": false
+ },
+ "archived_at": {
+ "name": "archived_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "projects_company_idx": {
+ "name": "projects_company_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "projects_company_id_companies_id_fk": {
+ "name": "projects_company_id_companies_id_fk",
+ "tableFrom": "projects",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "projects_goal_id_goals_id_fk": {
+ "name": "projects_goal_id_goals_id_fk",
+ "tableFrom": "projects",
+ "tableTo": "goals",
+ "columnsFrom": [
+ "goal_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "projects_lead_agent_id_agents_id_fk": {
+ "name": "projects_lead_agent_id_agents_id_fk",
+ "tableFrom": "projects",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "lead_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.workspace_runtime_services": {
+ "name": "workspace_runtime_services",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "project_workspace_id": {
+ "name": "project_workspace_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scope_type": {
+ "name": "scope_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "scope_id": {
+ "name": "scope_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "service_name": {
+ "name": "service_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "lifecycle": {
+ "name": "lifecycle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reuse_key": {
+ "name": "reuse_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cwd": {
+ "name": "cwd",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider_ref": {
+ "name": "provider_ref",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner_agent_id": {
+ "name": "owner_agent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_by_run_id": {
+ "name": "started_by_run_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "stopped_at": {
+ "name": "stopped_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stop_policy": {
+ "name": "stop_policy",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "health_status": {
+ "name": "health_status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'unknown'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "workspace_runtime_services_company_workspace_status_idx": {
+ "name": "workspace_runtime_services_company_workspace_status_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "project_workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "workspace_runtime_services_company_project_status_idx": {
+ "name": "workspace_runtime_services_company_project_status_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "workspace_runtime_services_run_idx": {
+ "name": "workspace_runtime_services_run_idx",
+ "columns": [
+ {
+ "expression": "started_by_run_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "workspace_runtime_services_company_updated_idx": {
+ "name": "workspace_runtime_services_company_updated_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "workspace_runtime_services_company_id_companies_id_fk": {
+ "name": "workspace_runtime_services_company_id_companies_id_fk",
+ "tableFrom": "workspace_runtime_services",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "workspace_runtime_services_project_id_projects_id_fk": {
+ "name": "workspace_runtime_services_project_id_projects_id_fk",
+ "tableFrom": "workspace_runtime_services",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "workspace_runtime_services_project_workspace_id_project_workspaces_id_fk": {
+ "name": "workspace_runtime_services_project_workspace_id_project_workspaces_id_fk",
+ "tableFrom": "workspace_runtime_services",
+ "tableTo": "project_workspaces",
+ "columnsFrom": [
+ "project_workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "workspace_runtime_services_issue_id_issues_id_fk": {
+ "name": "workspace_runtime_services_issue_id_issues_id_fk",
+ "tableFrom": "workspace_runtime_services",
+ "tableTo": "issues",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "workspace_runtime_services_owner_agent_id_agents_id_fk": {
+ "name": "workspace_runtime_services_owner_agent_id_agents_id_fk",
+ "tableFrom": "workspace_runtime_services",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "owner_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "workspace_runtime_services_started_by_run_id_heartbeat_runs_id_fk": {
+ "name": "workspace_runtime_services_started_by_run_id_heartbeat_runs_id_fk",
+ "tableFrom": "workspace_runtime_services",
+ "tableTo": "heartbeat_runs",
+ "columnsFrom": [
+ "started_by_run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+ }
diff --cc packages/db/src/migrations/meta/_journal.json
index 22a695b4c0,b061a56abd..852fa998b4
--- a/packages/db/src/migrations/meta/_journal.json
+++ b/packages/db/src/migrations/meta/_journal.json
@@@ -187,9 -187,30 +187,37 @@@
{
"idx": 26,
"version": "7",
- "when": 1772823634634,
- "tag": "0026_high_anita_blake",
+ "when": 1773089625430,
+ "tag": "0026_lying_pete_wisdom",
+ "breakpoints": true
+ },
+ {
+ "idx": 27,
+ "version": "7",
+ "when": 1773150731736,
+ "tag": "0027_tranquil_tenebrous",
+ "breakpoints": true
+ },
+ {
+ "idx": 28,
+ "version": "7",
+ "when": 1773432085646,
+ "tag": "0028_harsh_goliath",
+ "breakpoints": true
+ },
+ {
+ "idx": 29,
+ "version": "7",
+ "when": 1773417600000,
+ "tag": "0029_plugin_tables",
+ "breakpoints": true
++ },
++ {
++ "idx": 30,
++ "version": "7",
++ "when": 1773668505562,
++ "tag": "0030_hot_slipstream",
+ "breakpoints": true
}
]
-}
+}
diff --cc pnpm-lock.yaml
index 7d3bd1a005,f6820f52ec..ddd2d955a7
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@@ -211,8 -244,8 +244,182 @@@ importers
version: 5.9.3
vitest:
specifier: ^3.0.5
+
++ packages/plugins/create-paperclip-plugin:
++ dependencies:
++ '@paperclipai/plugin-sdk':
++ specifier: workspace:*
++ version: link:../sdk
++ devDependencies:
++ '@types/node':
++ specifier: ^24.6.0
++ version: 24.12.0
++ typescript:
++ specifier: ^5.7.3
++ version: 5.9.3
++
++ packages/plugins/examples/plugin-authoring-smoke-example:
++ dependencies:
++ '@paperclipai/plugin-sdk':
++ specifier: workspace:*
++ version: link:../../sdk
++ react:
++ specifier: '>=18'
++ version: 19.2.4
++ devDependencies:
++ '@rollup/plugin-node-resolve':
++ specifier: ^16.0.1
++ version: 16.0.3([email protected])
++ '@rollup/plugin-typescript':
++ specifier: ^12.1.2
++ '@types/node':
++ specifier: ^24.6.0
++ version: 24.12.0
++ '@types/react':
++ specifier: ^19.0.8
++ version: 19.2.14
++ esbuild:
++ specifier: ^0.27.3
++ version: 0.27.3
++ rollup:
++ specifier: ^4.38.0
++ version: 4.57.1
++ tslib:
++ specifier: ^2.8.1
++ version: 2.8.1
++ typescript:
++ specifier: ^5.7.3
++ version: 5.9.3
++ vitest:
++ specifier: ^3.0.5
++
++ packages/plugins/examples/plugin-file-browser-example:
++ dependencies:
++ '@codemirror/lang-javascript':
++ specifier: ^6.2.2
++ version: 6.2.4
++ '@codemirror/language':
++ specifier: ^6.11.0
++ version: 6.12.1
++ '@codemirror/state':
++ specifier: ^6.4.0
++ version: 6.5.4
++ '@codemirror/view':
++ specifier: ^6.28.0
++ version: 6.39.15
++ '@lezer/highlight':
++ specifier: ^1.2.1
++ version: 1.2.3
++ '@paperclipai/plugin-sdk':
++ specifier: workspace:*
++ version: link:../../sdk
++ codemirror:
++ specifier: ^6.0.1
++ version: 6.0.2
++ devDependencies:
++ '@types/node':
++ specifier: ^24.6.0
++ version: 24.12.0
++ '@types/react':
++ specifier: ^19.0.8
++ version: 19.2.14
++ '@types/react-dom':
++ specifier: ^19.0.3
++ version: 19.2.3(@types/[email protected])
++ esbuild:
++ specifier: ^0.27.3
++ version: 0.27.3
++ react:
++ specifier: ^19.0.0
++ version: 19.2.4
++ react-dom:
++ specifier: ^19.0.0
++ version: 19.2.4([email protected])
++ typescript:
++ specifier: ^5.7.3
++ version: 5.9.3
++
++ packages/plugins/examples/plugin-hello-world-example:
++ dependencies:
++ '@paperclipai/plugin-sdk':
++ specifier: workspace:*
++ version: link:../../sdk
++ devDependencies:
++ '@types/node':
++ specifier: ^24.6.0
++ version: 24.12.0
++ '@types/react':
++ specifier: ^19.0.8
++ version: 19.2.14
++ '@types/react-dom':
++ specifier: ^19.0.3
++ version: 19.2.3(@types/[email protected])
++ react:
++ specifier: ^19.0.0
++ version: 19.2.4
++ react-dom:
++ specifier: ^19.0.0
++ version: 19.2.4([email protected])
++ typescript:
++ specifier: ^5.7.3
++ version: 5.9.3
++
++ packages/plugins/examples/plugin-kitchen-sink-example:
++ dependencies:
++ '@paperclipai/plugin-sdk':
++ specifier: workspace:*
++ version: link:../../sdk
++ '@paperclipai/shared':
++ specifier: workspace:*
++ version: link:../../../shared
++ devDependencies:
++ '@types/node':
++ specifier: ^24.6.0
++ version: 24.12.0
++ '@types/react':
++ specifier: ^19.0.8
++ version: 19.2.14
++ '@types/react-dom':
++ specifier: ^19.0.3
++ version: 19.2.3(@types/[email protected])
++ esbuild:
++ specifier: ^0.27.3
++ version: 0.27.3
++ react:
++ specifier: ^19.0.0
++ version: 19.2.4
++ react-dom:
++ specifier: ^19.0.0
++ version: 19.2.4([email protected])
++ typescript:
++ specifier: ^5.7.3
++ version: 5.9.3
++
++ packages/plugins/sdk:
++ dependencies:
++ '@paperclipai/shared':
++ specifier: workspace:*
++ version: link:../../shared
++ react:
++ specifier: '>=18'
++ version: 19.2.4
++ zod:
++ specifier: ^3.24.2
++ version: 3.25.76
++ devDependencies:
++ '@types/node':
++ specifier: ^24.6.0
++ version: 24.12.0
++ '@types/react':
++ specifier: ^19.0.8
++ version: 19.2.14
++ typescript:
++ specifier: ^5.7.3
++ version: 5.9.3
+
packages/shared:
dependencies:
zod:
@@@ -252,12 -288,12 +462,24 @@@
'@paperclipai/db':
specifier: workspace:*
version: link:../packages/db
++ '@paperclipai/plugin-sdk':
++ specifier: workspace:*
++ version: link:../packages/plugins/sdk
'@paperclipai/shared':
specifier: workspace:*
version: link:../packages/shared
++ ajv:
++ specifier: ^8.18.0
++ version: 8.18.0
++ ajv-formats:
++ specifier: ^3.0.1
++ version: 3.0.1([email protected])
better-auth:
specifier: 1.4.18
++ chokidar:
++ specifier: ^4.0.3
++ version: 4.0.3
detect-port:
specifier: ^2.1.0
version: 2.1.0
@@@ -276,9 -309,6 +498,12 @@@
express:
specifier: ^5.1.0
version: 5.2.1
++ hermes-paperclip-adapter:
++ specifier: 0.1.1
++ version: 0.1.1
+ jsdom:
+ specifier: ^28.1.0
+ version: 28.1.0(@noble/[email protected])
multer:
specifier: ^2.0.2
version: 2.0.2
@@@ -449,19 -485,9 +683,22 @@@
packages:
+ '@acemir/[email protected]':
+ resolution: {integrity: sha512-ZnR3GSaH+/vJ0YlHau21FjfLYjMpYVIzTD8M8vIEQvIGxeOXyXdzCI140rrCY862p/C/BbzWsjc1dgnM9mkoTA==}
+
+ '@antfu/[email protected]':
+ resolution: {integrity: sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==}
+
+ '@asamuzakjp/[email protected]':
+ resolution: {integrity: sha512-2SZFvqMyvboVV1d15lMf7XiI3m7SDqXUuKaTymJYLN6dSGadqp+fVojqJlVoMlbZnlTmu3S0TLwLTJpvBMO1Aw==}
+ engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
+
+ '@asamuzakjp/[email protected]':
+ resolution: {integrity: sha512-MvRz1nCqW0fsy8Qz4dnLIvhOlMzqDVBabZx6lH+YywFDdjXhMY37SmpV1XFX3JzG5GWHn63j6HX6QPr3lZXHvQ==}
+
+ '@asamuzakjp/[email protected]':
+ resolution: {integrity: sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q==}
+
'@aws-crypto/[email protected]':
resolution: {integrity: sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==}
engines: {node: '>=16.0.0'}
@@@ -737,10 -763,9 +974,13 @@@
'@better-fetch/[email protected]':
resolution: {integrity: sha512-/ImESw0sskqlVR94jB+5+Pxjf+xBwDZF/N5+y2/q4EqD7IARUTSpPfIo8uf39SYpCxyOCtbyYpUrZ3F/k0zT4A==}
+ '@braintree/[email protected]':
+ resolution: {integrity: sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==}
+
+ '@bramus/[email protected]':
+ resolution: {integrity: sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw==}
+ hasBin: true
+
'@changesets/[email protected]':
resolution: {integrity: sha512-yq8ML3YS7koKQ/9bk1PqO0HMzApIFNwjlwCnwFEXMzNe8NpzeeYYKCmnhWJGkN8g7E51MnWaSbqRcTcdIxUgnQ==}
@@@ -907,37 -947,6 +1162,42 @@@
react: ^16.8.0 || ^17 || ^18 || ^19
react-dom: ^16.8.0 || ^17 || ^18 || ^19
+ '@csstools/[email protected]':
+ resolution: {integrity: sha512-LMGQLS9EuADloEFkcTBR3BwV/CGHV7zyDxVRtVDTwdI2Ca4it0CCVTT9wCkxSgokjE5Ho41hEPgb8OEUwoXr6Q==}
+ engines: {node: '>=20.19.0'}
+
+ '@csstools/[email protected]':
+ resolution: {integrity: sha512-HJ26Z/vmsZQqs/o3a6bgKslXGFAungXGbinULZO3eMsOyNJHeBBZfup5FiZInOghgoM4Hwnmw+OgbJCNg1wwUQ==}
+ engines: {node: '>=20.19.0'}
+ peerDependencies:
+ '@csstools/css-parser-algorithms': ^4.0.0
+ '@csstools/css-tokenizer': ^4.0.0
+
+ '@csstools/[email protected]':
+ resolution: {integrity: sha512-0GEfbBLmTFf0dJlpsNU7zwxRIH0/BGEMuXLTCvFYxuL1tNhqzTbtnFICyJLTNK4a+RechKP75e7w42ClXSnJQw==}
+ engines: {node: '>=20.19.0'}
+ peerDependencies:
+ '@csstools/css-parser-algorithms': ^4.0.0
+ '@csstools/css-tokenizer': ^4.0.0
+
+ '@csstools/[email protected]':
+ resolution: {integrity: sha512-+B87qS7fIG3L5h3qwJ/IFbjoVoOe/bpOdh9hAjXbvx0o8ImEmUsGXN0inFOnk2ChCFgqkkGFQ+TpM5rbhkKe4w==}
+ engines: {node: '>=20.19.0'}
+ peerDependencies:
+ '@csstools/css-tokenizer': ^4.0.0
+
- '@csstools/[email protected]':
- resolution: {integrity: sha512-H4tuz2nhWgNKLt1inYpoVCfbJbMwX/lQKp3g69rrrIMIYlFD9+zTykOKhNR8uGrAmbS/kT9n6hTFkmDkxLgeTA==}
++ '@csstools/[email protected]':
++ resolution: {integrity: sha512-BvqN0AMWNAnLk9G8jnUT77D+mUbY/H2b3uDTvg2isJkHaOufUE2R3AOwxWo7VBQKT1lOdwdvorddo2B/lk64+w==}
++ peerDependencies:
++ css-tree: ^3.2.1
++ peerDependenciesMeta:
++ css-tree:
++ optional: true
+
+ '@csstools/[email protected]':
+ resolution: {integrity: sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==}
+ engines: {node: '>=20.19.0'}
+
'@dnd-kit/[email protected]':
resolution: {integrity: sha512-2P+YgaXF+gRsIihwwY1gCsQSYnu9Zyj2py8kY5fFvUM1qm2WA2u639R6YNVfU4GWr+ZM5mqEsfHZZLoRONbemw==}
peerDependencies:
@@@ -1693,6 -1705,6 +1965,9 @@@
'@open-draft/[email protected]':
resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==}
++ '@paperclipai/[email protected]':
++ resolution: {integrity: sha512-W66k+hJkQE8ma0asM/Sd90AC8HHy/BLG/sd0aOC+rDWw+gOasQyUkTnDoPv1zhQuTyKEEvLFV6ByOOKqEiAz/A==}
++
'@paralleldrive/[email protected]':
resolution: {integrity: sha512-XO7cAxhnTZl0Yggq6jOgjiOHhbgcO4NqFqwSmQpjK3b6TEE6Uj/jfSk6wzYyemh3+I0sHirKSetjQwn5cZktFw==}
@@@ -2419,6 -2436,6 +2699,37 @@@
'@rolldown/[email protected]':
resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==}
++ '@rollup/[email protected]':
++ resolution: {integrity: sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==}
++ engines: {node: '>=14.0.0'}
++ peerDependencies:
++ rollup: ^2.78.0||^3.0.0||^4.0.0
++ peerDependenciesMeta:
++ rollup:
++ optional: true
++
++ '@rollup/[email protected]':
++ resolution: {integrity: sha512-7DP0/p7y3t67+NabT9f8oTBFE6gGkto4SA6Np2oudYmZE/m1dt8RB0SjL1msMxFpLo631qjRCcBlAbq1ml/Big==}
++ engines: {node: '>=14.0.0'}
++ peerDependencies:
++ rollup: ^2.14.0||^3.0.0||^4.0.0
++ tslib: '*'
++ typescript: '>=3.7.0'
++ peerDependenciesMeta:
++ rollup:
++ optional: true
++ tslib:
++ optional: true
++
++ '@rollup/[email protected]':
++ resolution: {integrity: sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==}
++ engines: {node: '>=14.0.0'}
++ peerDependencies:
++ rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
++ peerDependenciesMeta:
++ rollup:
++ optional: true
++
'@rollup/[email protected]':
resolution: {integrity: sha512-A6ehUVSiSaaliTxai040ZpZ2zTevHYbvu/lDoeAteHI8QnaosIzm4qwtezfRg1jOYaUmnzLX1AOD6Z+UJjtifg==}
cpu: [arm]
@@@ -2958,6 -3068,6 +3365,9 @@@
resolution: {integrity: sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==}
++ '@types/[email protected]':
++ resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==}
++
resolution: {integrity: sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==}
@@@ -3041,10 -3148,6 +3451,21 @@@
resolution: {integrity: sha512-XNAb/a6TCqou+TufU8/u11HCu9x1gYvOoxLwtlXgIqmkrYQADVv6ljyW2zwiPhHz9R1gItAWpuDrdJMmrOBFEA==}
engines: {node: '>= 16.0.0'}
+ resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==}
+ engines: {node: '>= 14'}
+
++ resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==}
++ peerDependencies:
++ ajv: ^8.0.0
++ peerDependenciesMeta:
++ ajv:
++ optional: true
++
++ resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==}
++
resolution: {integrity: sha512-vcZjxvvVoxTeR5XBNJB38oTu/7eDCZlwdz32N1eNgpyPF7j/Z7Idf+CUwQOkKKpJ7RJyjxgLHCM7vdIK0iCNMQ==}
@@@ -3253,6 -3353,14 +3674,18 @@@
resolution: {integrity: sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==}
engines: {node: '>= 16'}
+ resolution: {integrity: sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw==}
+ peerDependencies:
+ chevrotain: ^11.0.0
+
+ resolution: {integrity: sha512-opLQzEVriiH1uUQ4Kctsd49bRoFDXGGSC4GUqj7pGyxM3RehRhvTlZJc1FL/Flew2p5uwxa1tUDWKzI4wNM8pg==}
+
++ resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}
++ engines: {node: '>= 14.16.0'}
++
resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==}
@@@ -3360,10 -3635,9 +3968,13 @@@
resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==}
engines: {node: '>=0.12'}
+ resolution: {integrity: sha512-efEhnxpSuwpYOKRm/L5KbqoZmNNukHa/Flty4Wp62JRvgH2ojwVgPgdYyr4twpieZnyRDdIH7PY2mopX26+j2Q==}
+
+ resolution: {integrity: sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA==}
+ engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
+
resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==}
@@@ -3386,6 -3660,6 +4000,10 @@@
resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==}
engines: {node: '>=6'}
++ resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
++ engines: {node: '>=0.10.0'}
++
resolution: {integrity: sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==}
engines: {node: '>=18'}
@@@ -3668,6 -3941,6 +4289,9 @@@
resolution: {integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==}
++ resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
++
resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}
@@@ -3698,6 -3971,6 +4322,9 @@@
resolution: {integrity: sha512-ybA6PDXIXOXivLJK/z9e+Otk7ve13I4ckBvGO5I2RRmBU1gMHLVDJYEuJYhGwez7YNlYji2M2DvVU+a9mSFDlw==}
++ resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
++
resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}
engines: {node: '>=8.6.0'}
@@@ -3705,6 -3978,6 +4332,9 @@@
resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==}
++ resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==}
++
resolution: {integrity: sha512-QNI3sAvSvaOiaMl8FYU4trnEzCwiRr8XMWgAHzlrWpTSj+QaCSvOf1h82OEP1s4hiAXhnbXSyFWCf4ldZzZRVA==}
hasBin: true
@@@ -3831,10 -4112,6 +4469,14 @@@
resolution: {integrity: sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==}
++ resolution: {integrity: sha512-kbdX349VxExSkVL8n4RwTpP9fUBf2yWpsTsJp02X12A9NynRJatlpYqt0vEkFyE/X7qEXqdJvpBm9tlvUHahsA==}
++ engines: {node: '>=20.0.0'}
++
+ resolution: {integrity: sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==}
+ engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
+
resolution: {integrity: sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==}
@@@ -3885,6 -4165,6 +4538,10 @@@
resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==}
++ resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==}
++ engines: {node: '>= 0.4'}
++
resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==}
@@@ -3913,6 -4193,6 +4570,9 @@@
engines: {node: '>=14.16'}
hasBin: true
++ resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==}
++
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'}
@@@ -3984,6 -4252,6 +4644,9 @@@
engines: {node: '>=6'}
hasBin: true
++ resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==}
++
resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
engines: {node: '>=6'}
@@@ -4095,10 -4383,6 +4778,10 @@@
resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==}
- resolution: {integrity: sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==}
++ resolution: {integrity: sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA==}
+ engines: {node: 20 || >=22}
+
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
@@@ -4450,6 -4742,6 +5150,9 @@@
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
engines: {node: '>=8'}
++ resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
++
resolution: {integrity: sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==}
@@@ -4723,6 -5030,6 +5445,10 @@@
resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}
engines: {node: '>= 6'}
++ resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
++ engines: {node: '>= 14.18.0'}
++
resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==}
engines: {node: '>= 12.13.0'}
@@@ -4750,6 -5053,6 +5476,11 @@@
resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
++ resolution: {integrity: sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==}
++ engines: {node: '>= 0.4'}
++ hasBin: true
++
resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==}
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
@@@ -4946,9 -5257,6 +5689,13 @@@
resolution: {integrity: sha512-oK8WG9diS3DlhdUkcFn4tkNIiIbBx9lI2ClF8K+b2/m8Eyv47LSawxUzZQSNKUrVb2KsqeTDCcjAAVPYaSLVTA==}
engines: {node: '>=14.18.0'}
++ resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
++ engines: {node: '>= 0.4'}
++
+ resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
+
resolution: {integrity: sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg==}
@@@ -4991,13 -5303,6 +5742,13 @@@
resolution: {integrity: sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==}
engines: {node: '>=14.0.0'}
- resolution: {integrity: sha512-ZjCZK0rppSBu7rjHYDYsEaMOIbbT+nWF57hKkv4IUmZWBNrBWBOjIElc0mKRgLM8bm7x/BBlof6t2gi/Oq/Asw==}
++ resolution: {integrity: sha512-5WJ2SqFsv4G2Dwi7ZFVRnz6b2H1od39QME1lc2y5Ew3eWiZMAeqOAfWpRP9jHvhUl881406QtZTODvjttJs+ew==}
+
- resolution: {integrity: sha512-keinCnPbwXEUG3ilrWQZU+CqcTTzHq9m2HhoUP2l7Xmi8l1LuijAXLpAJ5zRW+ifKTNscs4NdCkfkDCBYm352w==}
++ resolution: {integrity: sha512-WiGwQjr0qYdNNG8KpMKlSvpxz652lqa3Rd+/hSaDcY4Uo6SKWZq2LAF+hsAhUewTtYhXlorBKgNF3Kk8hnjGoQ==}
+ hasBin: true
+
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
engines: {node: '>=8.0'}
@@@ -5006,14 -5311,6 +5757,14 @@@
resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==}
engines: {node: '>=0.6'}
- resolution: {integrity: sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w==}
++ resolution: {integrity: sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==}
+ engines: {node: '>=16'}
+
+ resolution: {integrity: sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==}
+ engines: {node: '>=20'}
+
resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}
@@@ -5053,13 -5357,6 +5811,13 @@@
resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==}
- resolution: {integrity: sha512-RKZvifiL60xdsIuC80UY0dq8Z7DbJUV8/l2hOVbyZAxBzEeQU4Z58+4ZzJ6WN2Lidi9KzT5EbiGX+PI/UGYuRw==}
++ resolution: {integrity: sha512-cRaY9PagdEZoRmcwzk3tUV3SVGrVQkR6bcSilav/A0vXsfpW4Lvd0BvgRMwTEDTLLGN+QdyBTG+nnvTgJhdt6w==}
+
- resolution: {integrity: sha512-RqslV2Us5BrllB+JeiZnK4peryVTndy9Dnqq62S3yYRRTj0tFQCwEniUy2167skdGOy3vqRzEvl1Dm4sV2ReDg==}
++ resolution: {integrity: sha512-BM/JzwwaRXxrLdElV2Uo6cTLEjhSb3WXboncJamZ15NgUURmvlXvxa6xkwIOILIjPNo9i8ku136ZvWV0Uly8+w==}
+ engines: {node: '>=20.18.1'}
+
resolution: {integrity: sha512-ynU0vsAXw0ir8roa+xPCUHmnJ5goc5BTM2Kuc3IJd8UwgaeRs7VSD5+eeaQL+xp1JtB92hu/Zy/Lgy7RZcr1pQ==}
@@@ -5331,26 -5629,11 +6113,31 @@@
snapshots:
+ '@acemir/[email protected]': {}
+
+ '@antfu/[email protected]':
+ dependencies:
+ package-manager-detector: 1.6.0
+ tinyexec: 1.0.2
+
+ '@asamuzakjp/[email protected]':
+ dependencies:
+ '@csstools/css-calc': 3.1.1(@csstools/[email protected](@csstools/[email protected]))(@csstools/[email protected])
+ '@csstools/css-color-parser': 4.0.2(@csstools/[email protected](@csstools/[email protected]))(@csstools/[email protected])
+ '@csstools/css-parser-algorithms': 4.0.0(@csstools/[email protected])
+ '@csstools/css-tokenizer': 4.0.0
- lru-cache: 11.2.6
++ lru-cache: 11.2.7
+
+ '@asamuzakjp/[email protected]':
+ dependencies:
+ '@asamuzakjp/nwsapi': 2.3.9
+ bidi-js: 1.0.3
+ css-tree: 3.2.1
+ is-potential-custom-element-name: 1.0.1
- lru-cache: 11.2.6
++ lru-cache: 11.2.7
+
+ '@asamuzakjp/[email protected]': {}
+
'@aws-crypto/[email protected]':
dependencies:
'@aws-crypto/util': 5.2.0
@@@ -5979,10 -6262,8 +6766,12 @@@
'@better-fetch/[email protected]': {}
+ '@braintree/[email protected]': {}
+
+ '@bramus/[email protected]':
+ dependencies:
+ css-tree: 3.2.1
+
'@changesets/[email protected]':
dependencies:
'@changesets/config': 3.1.3
@@@ -6431,28 -6729,6 +7237,30 @@@
react-dom: 19.2.4([email protected])
react-is: 17.0.2
+ '@csstools/[email protected]': {}
+
+ '@csstools/[email protected](@csstools/[email protected](@csstools/[email protected]))(@csstools/[email protected])':
+ dependencies:
+ '@csstools/css-parser-algorithms': 4.0.0(@csstools/[email protected])
+ '@csstools/css-tokenizer': 4.0.0
+
+ '@csstools/[email protected](@csstools/[email protected](@csstools/[email protected]))(@csstools/[email protected])':
+ dependencies:
+ '@csstools/color-helpers': 6.0.2
+ '@csstools/css-calc': 3.1.1(@csstools/[email protected](@csstools/[email protected]))(@csstools/[email protected])
+ '@csstools/css-parser-algorithms': 4.0.0(@csstools/[email protected])
+ '@csstools/css-tokenizer': 4.0.0
+
+ '@csstools/[email protected](@csstools/[email protected])':
+ dependencies:
+ '@csstools/css-tokenizer': 4.0.0
+
- '@csstools/[email protected]': {}
++ optionalDependencies:
++ css-tree: 3.2.1
+
+ '@csstools/[email protected]': {}
+
dependencies:
react: 19.2.4
@@@ -7144,6 -7430,6 +7966,8 @@@
'@open-draft/[email protected]': {}
++ '@paperclipai/[email protected]': {}
++
'@paralleldrive/[email protected]':
dependencies:
'@noble/hashes': 1.8.0
@@@ -7922,6 -8212,6 +8750,33 @@@
'@rolldown/[email protected]': {}
++ dependencies:
++ '@rollup/pluginutils': 5.3.0([email protected])
++ '@types/resolve': 1.20.2
++ deepmerge: 4.3.1
++ is-module: 1.0.0
++ resolve: 1.22.11
++ optionalDependencies:
++ rollup: 4.57.1
++
++ dependencies:
++ '@rollup/pluginutils': 5.3.0([email protected])
++ resolve: 1.22.11
++ typescript: 5.9.3
++ optionalDependencies:
++ rollup: 4.57.1
++ tslib: 2.8.1
++
++ dependencies:
++ '@types/estree': 1.0.8
++ estree-walker: 2.0.2
++ picomatch: 4.0.3
++ optionalDependencies:
++ rollup: 4.57.1
++
'@rollup/[email protected]':
optional: true
@@@ -8487,13 -8896,6 +9461,13 @@@
'@types/[email protected]': {}
+ '@types/[email protected]':
+ dependencies:
+ '@types/node': 25.2.3
+ '@types/tough-cookie': 4.0.5
+ parse5: 7.3.0
- undici-types: 7.22.0
++ undici-types: 7.24.4
+
dependencies:
'@types/unist': 3.0.3
@@@ -8532,6 -8934,6 +9506,8 @@@
dependencies:
csstype: 3.2.3
++ '@types/[email protected]': {}
++
dependencies:
'@types/node': 25.2.3
@@@ -8643,8 -9043,6 +9619,19 @@@
+
++ optionalDependencies:
++ ajv: 8.18.0
++
++ dependencies:
++ fast-deep-equal: 3.1.3
++ fast-uri: 3.1.0
++ json-schema-traverse: 1.0.0
++ require-from-string: 2.0.2
++
@@@ -8801,6 -9195,20 +9788,24 @@@
+ dependencies:
+ chevrotain: 11.1.2
+ lodash-es: 4.17.23
+
+ dependencies:
+ '@chevrotain/cst-dts-gen': 11.1.2
+ '@chevrotain/gast': 11.1.2
+ '@chevrotain/regexp-to-ast': 11.1.2
+ '@chevrotain/types': 11.1.2
+ '@chevrotain/utils': 11.1.2
+ lodash-es: 4.17.23
+
++ dependencies:
++ readdirp: 4.1.2
++
dependencies:
clsx: 2.1.1
@@@ -8883,36 -9310,203 +9907,222 @@@
shebang-command: 2.0.0
which: 2.0.2
+ dependencies:
+ mdn-data: 2.27.1
+ source-map-js: 1.2.1
+
+ dependencies:
+ '@asamuzakjp/css-color': 5.0.1
- '@csstools/css-syntax-patches-for-csstree': 1.1.0
++ '@csstools/css-syntax-patches-for-csstree': 1.1.1([email protected])
+ css-tree: 3.2.1
- lru-cache: 11.2.6
++ lru-cache: 11.2.7
+
+ dependencies:
+ cose-base: 1.0.3
+ cytoscape: 3.33.1
+
+ dependencies:
+ cose-base: 2.2.0
+ cytoscape: 3.33.1
+
+
+ dependencies:
+ internmap: 1.0.1
+
+ dependencies:
+ internmap: 2.0.3
+
+
+ dependencies:
+ d3-dispatch: 3.0.1
+ d3-drag: 3.0.0
+ d3-interpolate: 3.0.1
+ d3-selection: 3.0.0
+ d3-transition: 3.0.1([email protected])
+
+ dependencies:
+ d3-path: 3.1.0
+
+
+ dependencies:
+ d3-array: 3.2.4
+
+ dependencies:
+ delaunator: 5.0.1
+
+
+ dependencies:
+ d3-dispatch: 3.0.1
+ d3-selection: 3.0.0
+
+ dependencies:
+ commander: 7.2.0
+ iconv-lite: 0.6.3
+ rw: 1.3.3
+
+
+ dependencies:
+ d3-dsv: 3.0.1
+
+ dependencies:
+ d3-dispatch: 3.0.1
+ d3-quadtree: 3.0.1
+ d3-timer: 3.0.1
+
+
+ dependencies:
+ d3-array: 3.2.4
+
+
+ dependencies:
+ d3-color: 3.1.0
+
+
+
+
+
+
+ dependencies:
+ d3-array: 2.12.1
+ d3-shape: 1.3.7
+
+ dependencies:
+ d3-color: 3.1.0
+ d3-interpolate: 3.0.1
+
+ dependencies:
+ d3-array: 3.2.4
+ d3-format: 3.1.2
+ d3-interpolate: 3.0.1
+ d3-time: 3.1.0
+ d3-time-format: 4.1.0
+
+
+ dependencies:
+ d3-path: 1.0.9
+
+ dependencies:
+ d3-path: 3.1.0
+
+ dependencies:
+ d3-time: 3.1.0
+
+ dependencies:
+ d3-array: 3.2.4
+
+
+ dependencies:
+ d3-color: 3.1.0
+ d3-dispatch: 3.0.1
+ d3-ease: 3.0.1
+ d3-interpolate: 3.0.1
+ d3-selection: 3.0.0
+ d3-timer: 3.0.1
+
+ dependencies:
+ d3-dispatch: 3.0.1
+ d3-drag: 3.0.0
+ d3-interpolate: 3.0.1
+ d3-selection: 3.0.0
+ d3-transition: 3.0.1([email protected])
+
+ dependencies:
+ d3-array: 3.2.4
+ d3-axis: 3.0.0
+ d3-brush: 3.0.0
+ d3-chord: 3.0.1
+ d3-color: 3.1.0
+ d3-contour: 4.0.2
+ d3-delaunay: 6.0.4
+ d3-dispatch: 3.0.1
+ d3-drag: 3.0.0
+ d3-dsv: 3.0.1
+ d3-ease: 3.0.1
+ d3-fetch: 3.0.1
+ d3-force: 3.0.0
+ d3-format: 3.1.2
+ d3-geo: 3.1.1
+ d3-hierarchy: 3.1.2
+ d3-interpolate: 3.0.1
+ d3-path: 3.1.0
+ d3-polygon: 3.0.1
+ d3-quadtree: 3.0.1
+ d3-random: 3.0.1
+ d3-scale: 4.0.2
+ d3-scale-chromatic: 3.1.0
+ d3-selection: 3.0.0
+ d3-shape: 3.2.0
+ d3-time: 3.1.0
+ d3-time-format: 4.1.0
+ d3-timer: 3.0.1
+ d3-transition: 3.0.1([email protected])
+ d3-zoom: 3.0.0
+
dependencies:
es5-ext: 0.10.64
type: 2.7.3
+ dependencies:
+ d3: 7.9.0
+ lodash-es: 4.17.23
+
+ dependencies:
+ whatwg-mimetype: 5.0.0
+ whatwg-url: 16.0.1(@noble/[email protected])
+ transitivePeerDependencies:
+ - '@noble/hashes'
+
+
dependencies:
ms: 2.1.3
@@@ -8925,6 -9517,6 +10135,8 @@@
++
@@@ -9195,6 -9789,6 +10411,8 @@@
'@types/estree-jsx': 1.0.5
'@types/unist': 3.0.3
++
dependencies:
'@types/estree': 1.0.8
@@@ -9251,6 -9845,6 +10469,8 @@@
++
dependencies:
'@nodelib/fs.stat': 2.0.5
@@@ -9261,6 -9855,6 +10481,8 @@@
++
dependencies:
strnum: 2.1.2
@@@ -9415,12 -10014,6 +10642,17 @@@
++ dependencies:
++ '@paperclipai/adapter-utils': 0.3.1
++ picocolors: 1.1.1
++
+ dependencies:
+ '@exodus/bytes': 1.15.0(@noble/[email protected])
+ transitivePeerDependencies:
+ - '@noble/hashes'
+
@@@ -9431,22 -10024,12 +10663,26 @@@
statuses: 2.0.2
toidentifier: 1.0.1
+ dependencies:
+ agent-base: 7.1.4
+ debug: 4.4.3
+ transitivePeerDependencies:
+ - supports-color
+
+ dependencies:
+ agent-base: 7.1.4
+ debug: 4.4.3
+ transitivePeerDependencies:
+ - supports-color
+
+ dependencies:
+ safer-buffer: 2.1.2
+
dependencies:
safer-buffer: 2.1.2
@@@ -9470,6 -10057,6 +10710,10 @@@
is-alphabetical: 2.0.1
is-decimal: 2.0.1
++ dependencies:
++ hasown: 2.0.2
++
@@@ -9488,6 -10075,6 +10732,8 @@@
dependencies:
is-docker: 3.0.0
++
@@@ -9529,35 -10114,8 +10775,37 @@@
dependencies:
argparse: 2.0.1
+ dependencies:
+ '@acemir/cssom': 0.9.31
+ '@asamuzakjp/dom-selector': 6.8.1
+ '@bramus/specificity': 2.4.2
+ '@exodus/bytes': 1.15.0(@noble/[email protected])
+ cssstyle: 6.2.0
+ data-urls: 7.0.0(@noble/[email protected])
+ decimal.js: 10.6.0
+ html-encoding-sniffer: 6.0.0(@noble/[email protected])
+ http-proxy-agent: 7.0.2
+ https-proxy-agent: 7.0.6
+ is-potential-custom-element-name: 1.0.1
+ parse5: 8.0.0
+ saxes: 6.0.0
+ symbol-tree: 3.2.4
- tough-cookie: 6.0.0
- undici: 7.22.0
++ tough-cookie: 6.0.1
++ undici: 7.24.4
+ w3c-xmlserializer: 5.0.0
+ webidl-conversions: 8.0.1
+ whatwg-mimetype: 5.0.0
+ whatwg-url: 16.0.1(@noble/[email protected])
+ xml-name-validator: 5.0.0
+ transitivePeerDependencies:
+ - '@noble/hashes'
+ - supports-color
+
++
@@@ -9637,8 -10215,6 +10905,8 @@@
+
dependencies:
yallist: 3.1.1
@@@ -10257,20 -10865,14 +11559,24 @@@
is-decimal: 2.0.1
is-hexadecimal: 2.0.1
+ dependencies:
+ entities: 6.0.1
+
+ dependencies:
+ entities: 6.0.1
+
+
++
@@@ -10600,6 -11221,6 +11927,8 @@@
string_decoder: 1.3.0
util-deprecate: 1.0.2
++
@@@ -10642,8 -11261,10 +11971,16 @@@
++ dependencies:
++ is-core-module: 2.16.1
++ path-parse: 1.0.7
++ supports-preserve-symlinks-flag: 1.0.0
++
+
dependencies:
'@types/estree': 1.0.8
@@@ -10882,8 -11510,6 +12230,10 @@@
transitivePeerDependencies:
- supports-color
++
+
@@@ -10913,26 -11541,12 +12265,26 @@@
+
+ dependencies:
- tldts-core: 7.0.25
++ tldts-core: 7.0.26
+
dependencies:
is-number: 7.0.0
+ dependencies:
- tldts: 7.0.25
++ tldts: 7.0.26
+
+ dependencies:
+ punycode: 2.3.1
+
@@@ -10967,10 -11585,6 +12323,10 @@@
+
+
dependencies:
diff: 5.2.2
@@@ -11250,24 -11864,25 +12608,41 @@@
- tsx
- yaml
+
+ dependencies:
+ vscode-jsonrpc: 8.2.0
+ vscode-languageserver-types: 3.17.5
+
+
+
+ dependencies:
+ vscode-languageserver-protocol: 3.17.5
+
+
+ dependencies:
+ xml-name-validator: 5.0.0
+
+
+
+ dependencies:
+ '@exodus/bytes': 1.15.0(@noble/[email protected])
+ tr46: 6.0.0
+ webidl-conversions: 8.0.1
+ transitivePeerDependencies:
+ - '@noble/hashes'
+
dependencies:
isexe: 2.0.0
diff --cc server/package.json
index b6279f5bfe,1887d64c42..464d73957d
--- a/server/package.json
+++ b/server/package.json
@@@ -34,17 -37,20 +37,21 @@@
"@paperclipai/adapter-claude-local": "workspace:*",
"@paperclipai/adapter-codex-local": "workspace:*",
"@paperclipai/adapter-cursor-local": "workspace:*",
-
+ "@paperclipai/adapter-gemini-local": "workspace:*",
+ "@paperclipai/adapter-openclaw-gateway": "workspace:*",
"@paperclipai/adapter-opencode-local": "workspace:*",
"@paperclipai/adapter-pi-local": "workspace:*",
- "@paperclipai/adapter-openclaw": "workspace:*",
- "@paperclipai/adapter-opencode-local": "workspace:*",
+ "hermes-paperclip-adapter": "0.1.1",
"@paperclipai/adapter-utils": "workspace:*",
"@paperclipai/db": "workspace:*",
+ "@paperclipai/plugin-sdk": "workspace:*",
"@paperclipai/shared": "workspace:*",
+ "ajv": "^8.18.0",
+ "ajv-formats": "^3.0.1",
"better-auth": "1.4.18",
+ "chokidar": "^4.0.3",
"detect-port": "^2.1.0",
+ "dompurify": "^3.3.2",
"dotenv": "^17.0.1",
"drizzle-orm": "^0.38.4",
"embedded-postgres": "^18.1.0-beta.16",
diff --cc server/src/routes/assets.ts
index 7af319e05f,bd2f154d2e..67c9751f00
--- a/server/src/routes/assets.ts
+++ b/server/src/routes/assets.ts
@@@ -6,83 -4,8 +6,74 @@@ import type { Db } from "@paperclipai/d
import { createAssetImageMetadataSchema } from "@paperclipai/shared";
import type { StorageService } from "../storage/types.js";
import { assetService, logActivity } from "../services/index.js";
-import { assertCompanyAccess, getActorInfo } from "./authz.js";
+ import { isAllowedContentType, MAX_ATTACHMENT_BYTES } from "../attachment-types.js";
+import { assertCompanyAccess, getActorInfo } from "./authz.js";
-
- const MAX_ASSET_IMAGE_BYTES = Number(process.env.PAPERCLIP_ATTACHMENT_MAX_BYTES) || 10 * 1024 * 1024;
+const MAX_COMPANY_LOGO_BYTES = 100 * 1024;
+const SVG_CONTENT_TYPE = "image/svg+xml";
- const ALLOWED_IMAGE_CONTENT_TYPES = new Set([
- "image/png",
- "image/jpeg",
- "image/jpg",
- "image/webp",
- "image/gif",
- SVG_CONTENT_TYPE,
- ]);
+
+function sanitizeSvgBuffer(input: Buffer): Buffer | null {
+ const raw = input.toString("utf8").trim();
+ if (!raw) return null;
+
+ const baseDom = new JSDOM("");
+ const domPurify = createDOMPurify(
+ baseDom.window as unknown as Parameters<typeof createDOMPurify>[0],
+ );
+ domPurify.addHook("uponSanitizeAttribute", (_node, data) => {
+ const attrName = data.attrName.toLowerCase();
+ const attrValue = (data.attrValue ?? "").trim();
+
+ if (attrName.startsWith("on")) {
+ data.keepAttr = false;
+ return;
+ }
+
+ if ((attrName === "href" || attrName === "xlink:href") && attrValue && !attrValue.startsWith("#")) {
+ data.keepAttr = false;
+ }
+ });
+
+ let parsedDom: JSDOM | null = null;
+ try {
+ const sanitized = domPurify.sanitize(raw, {
+ USE_PROFILES: { svg: true, svgFilters: true, html: false },
+ FORBID_TAGS: ["script", "foreignObject"],
+ FORBID_CONTENTS: ["script", "foreignObject"],
+ RETURN_TRUSTED_TYPE: false,
+ });
+
+ parsedDom = new JSDOM(sanitized, { contentType: SVG_CONTENT_TYPE });
+ const document = parsedDom.window.document;
+ const root = document.documentElement;
+ if (!root || root.tagName.toLowerCase() !== "svg") return null;
+
+ for (const el of Array.from(root.querySelectorAll("script, foreignObject"))) {
+ el.remove();
+ }
+ for (const el of Array.from(root.querySelectorAll("*"))) {
+ for (const attr of Array.from(el.attributes)) {
+ const attrName = attr.name.toLowerCase();
+ const attrValue = attr.value.trim();
+ if (attrName.startsWith("on")) {
+ el.removeAttribute(attr.name);
+ continue;
+ }
+ if ((attrName === "href" || attrName === "xlink:href") && attrValue && !attrValue.startsWith("#")) {
+ el.removeAttribute(attr.name);
+ }
+ }
+ }
+
+ const output = root.outerHTML.trim();
+ if (!output || !/^<svg[\s>]/i.test(output)) return null;
+ return Buffer.from(output, "utf8");
+ } catch {
+ return null;
+ } finally {
+ parsedDom?.window.close();
+ baseDom.window.close();
+ }
+}
export function assetRoutes(db: Db, storage: StorageService) {
const router = Router();
@@@ -125,21 -48,12 +116,21 @@@
return;
}
- let contentType = (file.mimetype || "").toLowerCase();
- if (!ALLOWED_IMAGE_CONTENT_TYPES.has(contentType)) {
- res.status(422).json({ error: `Unsupported image type: ${contentType || "unknown"}` });
+ const contentType = (file.mimetype || "").toLowerCase();
- if (!isAllowedContentType(contentType)) {
++ if (contentType !== SVG_CONTENT_TYPE && !isAllowedContentType(contentType)) {
+ res.status(422).json({ error: `Unsupported file type: ${contentType || "unknown"}` });
return;
}
- if (file.buffer.length <= 0) {
+ let fileBody = file.buffer;
+ if (contentType === SVG_CONTENT_TYPE) {
+ const sanitized = sanitizeSvgBuffer(file.buffer);
+ if (!sanitized || sanitized.length <= 0) {
+ res.status(422).json({ error: "SVG could not be sanitized" });
+ return;
+ }
+ fileBody = sanitized;
+ }
+ if (fileBody.length <= 0) {
res.status(422).json({ error: "Image is empty" });
return;
}