spb/worthdoing Public
Autonomous investigation agent that discovers, challenges, and ranks things genuinely worth doing — Claude + Firecrawl, Next.js 16, PostgreSQL
TypeScript 91.5%
SQL 5.8%
CSS 2.2%
1{2 "id": "49f14a86-25bb-4d42-9edd-e69115c7a650",3 "prevId": "00000000-0000-0000-0000-000000000000",4 "version": "7",5 "dialect": "postgresql",6 "tables": {7 "public.agent_events": {8 "name": "agent_events",9 "schema": "",10 "columns": {11 "id": {12 "name": "id",13 "type": "bigserial",14 "primaryKey": true,15 "notNull": true16 },17 "investigation_id": {18 "name": "investigation_id",19 "type": "uuid",20 "primaryKey": false,21 "notNull": true22 },23 "seq": {24 "name": "seq",25 "type": "integer",26 "primaryKey": false,27 "notNull": true28 },29 "type": {30 "name": "type",31 "type": "text",32 "primaryKey": false,33 "notNull": true34 },35 "payload": {36 "name": "payload",37 "type": "jsonb",38 "primaryKey": false,39 "notNull": true40 },41 "created_at": {42 "name": "created_at",43 "type": "timestamp with time zone",44 "primaryKey": false,45 "notNull": true,46 "default": "now()"47 }48 },49 "indexes": {50 "agent_events_seq_idx": {51 "name": "agent_events_seq_idx",52 "columns": [53 {54 "expression": "investigation_id",55 "isExpression": false,56 "asc": true,57 "nulls": "last"58 },59 {60 "expression": "seq",61 "isExpression": false,62 "asc": true,63 "nulls": "last"64 }65 ],66 "isUnique": true,67 "concurrently": false,68 "method": "btree",69 "with": {}70 }71 },72 "foreignKeys": {73 "agent_events_investigation_id_investigations_id_fk": {74 "name": "agent_events_investigation_id_investigations_id_fk",75 "tableFrom": "agent_events",76 "tableTo": "investigations",77 "columnsFrom": [78 "investigation_id"79 ],80 "columnsTo": [81 "id"82 ],83 "onDelete": "cascade",84 "onUpdate": "no action"85 }86 },87 "compositePrimaryKeys": {},88 "uniqueConstraints": {},89 "policies": {},90 "checkConstraints": {},91 "isRLSEnabled": false92 },93 "public.claims": {94 "name": "claims",95 "schema": "",96 "columns": {97 "id": {98 "name": "id",99 "type": "uuid",100 "primaryKey": true,101 "notNull": true,102 "default": "gen_random_uuid()"103 },104 "investigation_id": {105 "name": "investigation_id",106 "type": "uuid",107 "primaryKey": false,108 "notNull": true109 },110 "text": {111 "name": "text",112 "type": "text",113 "primaryKey": false,114 "notNull": true115 },116 "status": {117 "name": "status",118 "type": "text",119 "primaryKey": false,120 "notNull": true,121 "default": "'open'"122 },123 "confidence": {124 "name": "confidence",125 "type": "real",126 "primaryKey": false,127 "notNull": true,128 "default": 0.5129 },130 "created_at": {131 "name": "created_at",132 "type": "timestamp with time zone",133 "primaryKey": false,134 "notNull": true,135 "default": "now()"136 }137 },138 "indexes": {139 "claims_investigation_idx": {140 "name": "claims_investigation_idx",141 "columns": [142 {143 "expression": "investigation_id",144 "isExpression": false,145 "asc": true,146 "nulls": "last"147 }148 ],149 "isUnique": false,150 "concurrently": false,151 "method": "btree",152 "with": {}153 }154 },155 "foreignKeys": {156 "claims_investigation_id_investigations_id_fk": {157 "name": "claims_investigation_id_investigations_id_fk",158 "tableFrom": "claims",159 "tableTo": "investigations",160 "columnsFrom": [161 "investigation_id"162 ],163 "columnsTo": [164 "id"165 ],166 "onDelete": "cascade",167 "onUpdate": "no action"168 }169 },170 "compositePrimaryKeys": {},171 "uniqueConstraints": {},172 "policies": {},173 "checkConstraints": {},174 "isRLSEnabled": false175 },176 "public.competitors": {177 "name": "competitors",178 "schema": "",179 "columns": {180 "id": {181 "name": "id",182 "type": "uuid",183 "primaryKey": true,184 "notNull": true,185 "default": "gen_random_uuid()"186 },187 "name": {188 "name": "name",189 "type": "text",190 "primaryKey": false,191 "notNull": true192 },193 "url": {194 "name": "url",195 "type": "text",196 "primaryKey": false,197 "notNull": false198 },199 "description": {200 "name": "description",201 "type": "text",202 "primaryKey": false,203 "notNull": false204 },205 "created_at": {206 "name": "created_at",207 "type": "timestamp with time zone",208 "primaryKey": false,209 "notNull": true,210 "default": "now()"211 }212 },213 "indexes": {214 "competitors_name_idx": {215 "name": "competitors_name_idx",216 "columns": [217 {218 "expression": "name",219 "isExpression": false,220 "asc": true,221 "nulls": "last"222 }223 ],224 "isUnique": true,225 "concurrently": false,226 "method": "btree",227 "with": {}228 }229 },230 "foreignKeys": {},231 "compositePrimaryKeys": {},232 "uniqueConstraints": {},233 "policies": {},234 "checkConstraints": {},235 "isRLSEnabled": false236 },237 "public.evidence": {238 "name": "evidence",239 "schema": "",240 "columns": {241 "id": {242 "name": "id",243 "type": "uuid",244 "primaryKey": true,245 "notNull": true,246 "default": "gen_random_uuid()"247 },248 "investigation_id": {249 "name": "investigation_id",250 "type": "uuid",251 "primaryKey": false,252 "notNull": true253 },254 "source_id": {255 "name": "source_id",256 "type": "uuid",257 "primaryKey": false,258 "notNull": true259 },260 "claim_id": {261 "name": "claim_id",262 "type": "uuid",263 "primaryKey": false,264 "notNull": false265 },266 "kind": {267 "name": "kind",268 "type": "text",269 "primaryKey": false,270 "notNull": true271 },272 "quote": {273 "name": "quote",274 "type": "text",275 "primaryKey": false,276 "notNull": true277 },278 "summary": {279 "name": "summary",280 "type": "text",281 "primaryKey": false,282 "notNull": true283 },284 "strength": {285 "name": "strength",286 "type": "real",287 "primaryKey": false,288 "notNull": true,289 "default": 0.5290 },291 "fingerprint": {292 "name": "fingerprint",293 "type": "text",294 "primaryKey": false,295 "notNull": true296 },297 "created_at": {298 "name": "created_at",299 "type": "timestamp with time zone",300 "primaryKey": false,301 "notNull": true,302 "default": "now()"303 }304 },305 "indexes": {306 "evidence_investigation_idx": {307 "name": "evidence_investigation_idx",308 "columns": [309 {310 "expression": "investigation_id",311 "isExpression": false,312 "asc": true,313 "nulls": "last"314 }315 ],316 "isUnique": false,317 "concurrently": false,318 "method": "btree",319 "with": {}320 },321 "evidence_fingerprint_idx": {322 "name": "evidence_fingerprint_idx",323 "columns": [324 {325 "expression": "investigation_id",326 "isExpression": false,327 "asc": true,328 "nulls": "last"329 },330 {331 "expression": "fingerprint",332 "isExpression": false,333 "asc": true,334 "nulls": "last"335 }336 ],337 "isUnique": true,338 "concurrently": false,339 "method": "btree",340 "with": {}341 }342 },343 "foreignKeys": {344 "evidence_investigation_id_investigations_id_fk": {345 "name": "evidence_investigation_id_investigations_id_fk",346 "tableFrom": "evidence",347 "tableTo": "investigations",348 "columnsFrom": [349 "investigation_id"350 ],351 "columnsTo": [352 "id"353 ],354 "onDelete": "cascade",355 "onUpdate": "no action"356 },357 "evidence_source_id_sources_id_fk": {358 "name": "evidence_source_id_sources_id_fk",359 "tableFrom": "evidence",360 "tableTo": "sources",361 "columnsFrom": [362 "source_id"363 ],364 "columnsTo": [365 "id"366 ],367 "onDelete": "no action",368 "onUpdate": "no action"369 },370 "evidence_claim_id_claims_id_fk": {371 "name": "evidence_claim_id_claims_id_fk",372 "tableFrom": "evidence",373 "tableTo": "claims",374 "columnsFrom": [375 "claim_id"376 ],377 "columnsTo": [378 "id"379 ],380 "onDelete": "no action",381 "onUpdate": "no action"382 }383 },384 "compositePrimaryKeys": {},385 "uniqueConstraints": {},386 "policies": {},387 "checkConstraints": {},388 "isRLSEnabled": false389 },390 "public.hypotheses": {391 "name": "hypotheses",392 "schema": "",393 "columns": {394 "id": {395 "name": "id",396 "type": "uuid",397 "primaryKey": true,398 "notNull": true,399 "default": "gen_random_uuid()"400 },401 "investigation_id": {402 "name": "investigation_id",403 "type": "uuid",404 "primaryKey": false,405 "notNull": true406 },407 "parent_hypothesis_id": {408 "name": "parent_hypothesis_id",409 "type": "uuid",410 "primaryKey": false,411 "notNull": false412 },413 "title": {414 "name": "title",415 "type": "text",416 "primaryKey": false,417 "notNull": true418 },419 "statement": {420 "name": "statement",421 "type": "text",422 "primaryKey": false,423 "notNull": true424 },425 "status": {426 "name": "status",427 "type": "text",428 "primaryKey": false,429 "notNull": true,430 "default": "'proposed'"431 },432 "confidence": {433 "name": "confidence",434 "type": "real",435 "primaryKey": false,436 "notNull": true,437 "default": 0.5438 },439 "rationale": {440 "name": "rationale",441 "type": "text",442 "primaryKey": false,443 "notNull": false444 },445 "adversarial_checked": {446 "name": "adversarial_checked",447 "type": "boolean",448 "primaryKey": false,449 "notNull": true,450 "default": false451 },452 "created_at": {453 "name": "created_at",454 "type": "timestamp with time zone",455 "primaryKey": false,456 "notNull": true,457 "default": "now()"458 },459 "updated_at": {460 "name": "updated_at",461 "type": "timestamp with time zone",462 "primaryKey": false,463 "notNull": true,464 "default": "now()"465 }466 },467 "indexes": {468 "hypotheses_investigation_idx": {469 "name": "hypotheses_investigation_idx",470 "columns": [471 {472 "expression": "investigation_id",473 "isExpression": false,474 "asc": true,475 "nulls": "last"476 }477 ],478 "isUnique": false,479 "concurrently": false,480 "method": "btree",481 "with": {}482 }483 },484 "foreignKeys": {485 "hypotheses_investigation_id_investigations_id_fk": {486 "name": "hypotheses_investigation_id_investigations_id_fk",487 "tableFrom": "hypotheses",488 "tableTo": "investigations",489 "columnsFrom": [490 "investigation_id"491 ],492 "columnsTo": [493 "id"494 ],495 "onDelete": "cascade",496 "onUpdate": "no action"497 }498 },499 "compositePrimaryKeys": {},500 "uniqueConstraints": {},501 "policies": {},502 "checkConstraints": {},503 "isRLSEnabled": false504 },505 "public.hypothesis_evidence": {506 "name": "hypothesis_evidence",507 "schema": "",508 "columns": {509 "hypothesis_id": {510 "name": "hypothesis_id",511 "type": "uuid",512 "primaryKey": false,513 "notNull": true514 },515 "evidence_id": {516 "name": "evidence_id",517 "type": "uuid",518 "primaryKey": false,519 "notNull": true520 },521 "relation": {522 "name": "relation",523 "type": "text",524 "primaryKey": false,525 "notNull": true526 },527 "weight": {528 "name": "weight",529 "type": "real",530 "primaryKey": false,531 "notNull": true,532 "default": 0.5533 }534 },535 "indexes": {},536 "foreignKeys": {537 "hypothesis_evidence_hypothesis_id_hypotheses_id_fk": {538 "name": "hypothesis_evidence_hypothesis_id_hypotheses_id_fk",539 "tableFrom": "hypothesis_evidence",540 "tableTo": "hypotheses",541 "columnsFrom": [542 "hypothesis_id"543 ],544 "columnsTo": [545 "id"546 ],547 "onDelete": "cascade",548 "onUpdate": "no action"549 },550 "hypothesis_evidence_evidence_id_evidence_id_fk": {551 "name": "hypothesis_evidence_evidence_id_evidence_id_fk",552 "tableFrom": "hypothesis_evidence",553 "tableTo": "evidence",554 "columnsFrom": [555 "evidence_id"556 ],557 "columnsTo": [558 "id"559 ],560 "onDelete": "cascade",561 "onUpdate": "no action"562 }563 },564 "compositePrimaryKeys": {565 "hypothesis_evidence_hypothesis_id_evidence_id_pk": {566 "name": "hypothesis_evidence_hypothesis_id_evidence_id_pk",567 "columns": [568 "hypothesis_id",569 "evidence_id"570 ]571 }572 },573 "uniqueConstraints": {},574 "policies": {},575 "checkConstraints": {},576 "isRLSEnabled": false577 },578 "public.investigation_steps": {579 "name": "investigation_steps",580 "schema": "",581 "columns": {582 "id": {583 "name": "id",584 "type": "uuid",585 "primaryKey": true,586 "notNull": true,587 "default": "gen_random_uuid()"588 },589 "investigation_id": {590 "name": "investigation_id",591 "type": "uuid",592 "primaryKey": false,593 "notNull": true594 },595 "step_number": {596 "name": "step_number",597 "type": "integer",598 "primaryKey": false,599 "notNull": true600 },601 "model": {602 "name": "model",603 "type": "text",604 "primaryKey": false,605 "notNull": true606 },607 "input_tokens": {608 "name": "input_tokens",609 "type": "integer",610 "primaryKey": false,611 "notNull": true,612 "default": 0613 },614 "output_tokens": {615 "name": "output_tokens",616 "type": "integer",617 "primaryKey": false,618 "notNull": true,619 "default": 0620 },621 "cost_usd": {622 "name": "cost_usd",623 "type": "real",624 "primaryKey": false,625 "notNull": true,626 "default": 0627 },628 "latency_ms": {629 "name": "latency_ms",630 "type": "integer",631 "primaryKey": false,632 "notNull": true,633 "default": 0634 },635 "tool_name": {636 "name": "tool_name",637 "type": "text",638 "primaryKey": false,639 "notNull": false640 },641 "tool_args": {642 "name": "tool_args",643 "type": "jsonb",644 "primaryKey": false,645 "notNull": false646 },647 "tool_result_summary": {648 "name": "tool_result_summary",649 "type": "text",650 "primaryKey": false,651 "notNull": false652 },653 "decision_summary": {654 "name": "decision_summary",655 "type": "text",656 "primaryKey": false,657 "notNull": false658 },659 "error": {660 "name": "error",661 "type": "text",662 "primaryKey": false,663 "notNull": false664 },665 "created_at": {666 "name": "created_at",667 "type": "timestamp with time zone",668 "primaryKey": false,669 "notNull": true,670 "default": "now()"671 }672 },673 "indexes": {674 "steps_investigation_idx": {675 "name": "steps_investigation_idx",676 "columns": [677 {678 "expression": "investigation_id",679 "isExpression": false,680 "asc": true,681 "nulls": "last"682 },683 {684 "expression": "step_number",685 "isExpression": false,686 "asc": true,687 "nulls": "last"688 }689 ],690 "isUnique": false,691 "concurrently": false,692 "method": "btree",693 "with": {}694 }695 },696 "foreignKeys": {697 "investigation_steps_investigation_id_investigations_id_fk": {698 "name": "investigation_steps_investigation_id_investigations_id_fk",699 "tableFrom": "investigation_steps",700 "tableTo": "investigations",701 "columnsFrom": [702 "investigation_id"703 ],704 "columnsTo": [705 "id"706 ],707 "onDelete": "cascade",708 "onUpdate": "no action"709 }710 },711 "compositePrimaryKeys": {},712 "uniqueConstraints": {},713 "policies": {},714 "checkConstraints": {},715 "isRLSEnabled": false716 },717 "public.investigations": {718 "name": "investigations",719 "schema": "",720 "columns": {721 "id": {722 "name": "id",723 "type": "uuid",724 "primaryKey": true,725 "notNull": true,726 "default": "gen_random_uuid()"727 },728 "user_id": {729 "name": "user_id",730 "type": "uuid",731 "primaryKey": false,732 "notNull": false733 },734 "objective": {735 "name": "objective",736 "type": "text",737 "primaryKey": false,738 "notNull": true739 },740 "status": {741 "name": "status",742 "type": "text",743 "primaryKey": false,744 "notNull": true,745 "default": "'pending'"746 },747 "phase": {748 "name": "phase",749 "type": "text",750 "primaryKey": false,751 "notNull": true,752 "default": "'scouting'"753 },754 "stop_reason": {755 "name": "stop_reason",756 "type": "text",757 "primaryKey": false,758 "notNull": false759 },760 "budget": {761 "name": "budget",762 "type": "jsonb",763 "primaryKey": false,764 "notNull": true765 },766 "budget_used": {767 "name": "budget_used",768 "type": "jsonb",769 "primaryKey": false,770 "notNull": true771 },772 "prompt_version": {773 "name": "prompt_version",774 "type": "text",775 "primaryKey": false,776 "notNull": true777 },778 "tool_schema_version": {779 "name": "tool_schema_version",780 "type": "text",781 "primaryKey": false,782 "notNull": true783 },784 "model": {785 "name": "model",786 "type": "text",787 "primaryKey": false,788 "notNull": true789 },790 "error": {791 "name": "error",792 "type": "text",793 "primaryKey": false,794 "notNull": false795 },796 "created_at": {797 "name": "created_at",798 "type": "timestamp with time zone",799 "primaryKey": false,800 "notNull": true,801 "default": "now()"802 },803 "started_at": {804 "name": "started_at",805 "type": "timestamp with time zone",806 "primaryKey": false,807 "notNull": false808 },809 "completed_at": {810 "name": "completed_at",811 "type": "timestamp with time zone",812 "primaryKey": false,813 "notNull": false814 }815 },816 "indexes": {817 "investigations_status_idx": {818 "name": "investigations_status_idx",819 "columns": [820 {821 "expression": "status",822 "isExpression": false,823 "asc": true,824 "nulls": "last"825 }826 ],827 "isUnique": false,828 "concurrently": false,829 "method": "btree",830 "with": {}831 },832 "investigations_created_idx": {833 "name": "investigations_created_idx",834 "columns": [835 {836 "expression": "created_at",837 "isExpression": false,838 "asc": true,839 "nulls": "last"840 }841 ],842 "isUnique": false,843 "concurrently": false,844 "method": "btree",845 "with": {}846 }847 },848 "foreignKeys": {849 "investigations_user_id_users_id_fk": {850 "name": "investigations_user_id_users_id_fk",851 "tableFrom": "investigations",852 "tableTo": "users",853 "columnsFrom": [854 "user_id"855 ],856 "columnsTo": [857 "id"858 ],859 "onDelete": "no action",860 "onUpdate": "no action"861 }862 },863 "compositePrimaryKeys": {},864 "uniqueConstraints": {},865 "policies": {},866 "checkConstraints": {},867 "isRLSEnabled": false868 },869 "public.opportunities": {870 "name": "opportunities",871 "schema": "",872 "columns": {873 "id": {874 "name": "id",875 "type": "uuid",876 "primaryKey": true,877 "notNull": true,878 "default": "gen_random_uuid()"879 },880 "investigation_id": {881 "name": "investigation_id",882 "type": "uuid",883 "primaryKey": false,884 "notNull": true885 },886 "hypothesis_id": {887 "name": "hypothesis_id",888 "type": "uuid",889 "primaryKey": false,890 "notNull": false891 },892 "title": {893 "name": "title",894 "type": "text",895 "primaryKey": false,896 "notNull": true897 },898 "summary": {899 "name": "summary",900 "type": "text",901 "primaryKey": false,902 "notNull": true903 },904 "problem": {905 "name": "problem",906 "type": "text",907 "primaryKey": false,908 "notNull": true909 },910 "why_now": {911 "name": "why_now",912 "type": "text",913 "primaryKey": false,914 "notNull": true915 },916 "risks": {917 "name": "risks",918 "type": "text",919 "primaryKey": false,920 "notNull": true921 },922 "skeptic_case": {923 "name": "skeptic_case",924 "type": "text",925 "primaryKey": false,926 "notNull": true927 },928 "report_md": {929 "name": "report_md",930 "type": "text",931 "primaryKey": false,932 "notNull": false933 },934 "status": {935 "name": "status",936 "type": "text",937 "primaryKey": false,938 "notNull": true,939 "default": "'candidate'"940 },941 "worth_score": {942 "name": "worth_score",943 "type": "real",944 "primaryKey": false,945 "notNull": false946 },947 "evidence_confidence": {948 "name": "evidence_confidence",949 "type": "real",950 "primaryKey": false,951 "notNull": false952 },953 "created_at": {954 "name": "created_at",955 "type": "timestamp with time zone",956 "primaryKey": false,957 "notNull": true,958 "default": "now()"959 },960 "updated_at": {961 "name": "updated_at",962 "type": "timestamp with time zone",963 "primaryKey": false,964 "notNull": true,965 "default": "now()"966 }967 },968 "indexes": {969 "opportunities_investigation_idx": {970 "name": "opportunities_investigation_idx",971 "columns": [972 {973 "expression": "investigation_id",974 "isExpression": false,975 "asc": true,976 "nulls": "last"977 }978 ],979 "isUnique": false,980 "concurrently": false,981 "method": "btree",982 "with": {}983 },984 "opportunities_score_idx": {985 "name": "opportunities_score_idx",986 "columns": [987 {988 "expression": "worth_score",989 "isExpression": false,990 "asc": true,991 "nulls": "last"992 }993 ],994 "isUnique": false,995 "concurrently": false,996 "method": "btree",997 "with": {}998 }999 },1000 "foreignKeys": {1001 "opportunities_investigation_id_investigations_id_fk": {1002 "name": "opportunities_investigation_id_investigations_id_fk",1003 "tableFrom": "opportunities",1004 "tableTo": "investigations",1005 "columnsFrom": [1006 "investigation_id"1007 ],1008 "columnsTo": [1009 "id"1010 ],1011 "onDelete": "cascade",1012 "onUpdate": "no action"1013 },1014 "opportunities_hypothesis_id_hypotheses_id_fk": {1015 "name": "opportunities_hypothesis_id_hypotheses_id_fk",1016 "tableFrom": "opportunities",1017 "tableTo": "hypotheses",1018 "columnsFrom": [1019 "hypothesis_id"1020 ],1021 "columnsTo": [1022 "id"1023 ],1024 "onDelete": "no action",1025 "onUpdate": "no action"1026 }1027 },1028 "compositePrimaryKeys": {},1029 "uniqueConstraints": {},1030 "policies": {},1031 "checkConstraints": {},1032 "isRLSEnabled": false1033 },1034 "public.opportunity_competitors": {1035 "name": "opportunity_competitors",1036 "schema": "",1037 "columns": {1038 "opportunity_id": {1039 "name": "opportunity_id",1040 "type": "uuid",1041 "primaryKey": false,1042 "notNull": true1043 },1044 "competitor_id": {1045 "name": "competitor_id",1046 "type": "uuid",1047 "primaryKey": false,1048 "notNull": true1049 },1050 "note": {1051 "name": "note",1052 "type": "text",1053 "primaryKey": false,1054 "notNull": false1055 }1056 },1057 "indexes": {},1058 "foreignKeys": {1059 "opportunity_competitors_opportunity_id_opportunities_id_fk": {1060 "name": "opportunity_competitors_opportunity_id_opportunities_id_fk",1061 "tableFrom": "opportunity_competitors",1062 "tableTo": "opportunities",1063 "columnsFrom": [1064 "opportunity_id"1065 ],1066 "columnsTo": [1067 "id"1068 ],1069 "onDelete": "cascade",1070 "onUpdate": "no action"1071 },1072 "opportunity_competitors_competitor_id_competitors_id_fk": {1073 "name": "opportunity_competitors_competitor_id_competitors_id_fk",1074 "tableFrom": "opportunity_competitors",1075 "tableTo": "competitors",1076 "columnsFrom": [1077 "competitor_id"1078 ],1079 "columnsTo": [1080 "id"1081 ],1082 "onDelete": "cascade",1083 "onUpdate": "no action"1084 }1085 },1086 "compositePrimaryKeys": {1087 "opportunity_competitors_opportunity_id_competitor_id_pk": {1088 "name": "opportunity_competitors_opportunity_id_competitor_id_pk",1089 "columns": [1090 "opportunity_id",1091 "competitor_id"1092 ]1093 }1094 },1095 "uniqueConstraints": {},1096 "policies": {},1097 "checkConstraints": {},1098 "isRLSEnabled": false1099 },1100 "public.opportunity_evidence": {1101 "name": "opportunity_evidence",1102 "schema": "",1103 "columns": {1104 "opportunity_id": {1105 "name": "opportunity_id",1106 "type": "uuid",1107 "primaryKey": false,1108 "notNull": true1109 },1110 "evidence_id": {1111 "name": "evidence_id",1112 "type": "uuid",1113 "primaryKey": false,1114 "notNull": true1115 },1116 "role": {1117 "name": "role",1118 "type": "text",1119 "primaryKey": false,1120 "notNull": true,1121 "default": "'context'"1122 }1123 },1124 "indexes": {},1125 "foreignKeys": {1126 "opportunity_evidence_opportunity_id_opportunities_id_fk": {1127 "name": "opportunity_evidence_opportunity_id_opportunities_id_fk",1128 "tableFrom": "opportunity_evidence",1129 "tableTo": "opportunities",1130 "columnsFrom": [1131 "opportunity_id"1132 ],1133 "columnsTo": [1134 "id"1135 ],1136 "onDelete": "cascade",1137 "onUpdate": "no action"1138 },1139 "opportunity_evidence_evidence_id_evidence_id_fk": {1140 "name": "opportunity_evidence_evidence_id_evidence_id_fk",1141 "tableFrom": "opportunity_evidence",1142 "tableTo": "evidence",1143 "columnsFrom": [1144 "evidence_id"1145 ],1146 "columnsTo": [1147 "id"1148 ],1149 "onDelete": "cascade",1150 "onUpdate": "no action"1151 }1152 },1153 "compositePrimaryKeys": {1154 "opportunity_evidence_opportunity_id_evidence_id_pk": {1155 "name": "opportunity_evidence_opportunity_id_evidence_id_pk",1156 "columns": [1157 "opportunity_id",1158 "evidence_id"1159 ]1160 }1161 },1162 "uniqueConstraints": {},1163 "policies": {},1164 "checkConstraints": {},1165 "isRLSEnabled": false1166 },1167 "public.opportunity_scores": {1168 "name": "opportunity_scores",1169 "schema": "",1170 "columns": {1171 "id": {1172 "name": "id",1173 "type": "uuid",1174 "primaryKey": true,1175 "notNull": true,1176 "default": "gen_random_uuid()"1177 },1178 "opportunity_id": {1179 "name": "opportunity_id",1180 "type": "uuid",1181 "primaryKey": false,1182 "notNull": true1183 },1184 "dimension": {1185 "name": "dimension",1186 "type": "text",1187 "primaryKey": false,1188 "notNull": true1189 },1190 "score": {1191 "name": "score",1192 "type": "real",1193 "primaryKey": false,1194 "notNull": true1195 },1196 "confidence": {1197 "name": "confidence",1198 "type": "real",1199 "primaryKey": false,1200 "notNull": true1201 },1202 "reasoning": {1203 "name": "reasoning",1204 "type": "text",1205 "primaryKey": false,1206 "notNull": true1207 },1208 "evidence_ids": {1209 "name": "evidence_ids",1210 "type": "jsonb",1211 "primaryKey": false,1212 "notNull": true1213 },1214 "created_at": {1215 "name": "created_at",1216 "type": "timestamp with time zone",1217 "primaryKey": false,1218 "notNull": true,1219 "default": "now()"1220 }1221 },1222 "indexes": {1223 "opportunity_scores_dim_idx": {1224 "name": "opportunity_scores_dim_idx",1225 "columns": [1226 {1227 "expression": "opportunity_id",1228 "isExpression": false,1229 "asc": true,1230 "nulls": "last"1231 },1232 {1233 "expression": "dimension",1234 "isExpression": false,1235 "asc": true,1236 "nulls": "last"1237 }1238 ],1239 "isUnique": true,1240 "concurrently": false,1241 "method": "btree",1242 "with": {}1243 }1244 },1245 "foreignKeys": {1246 "opportunity_scores_opportunity_id_opportunities_id_fk": {1247 "name": "opportunity_scores_opportunity_id_opportunities_id_fk",1248 "tableFrom": "opportunity_scores",1249 "tableTo": "opportunities",1250 "columnsFrom": [1251 "opportunity_id"1252 ],1253 "columnsTo": [1254 "id"1255 ],1256 "onDelete": "cascade",1257 "onUpdate": "no action"1258 }1259 },1260 "compositePrimaryKeys": {},1261 "uniqueConstraints": {},1262 "policies": {},1263 "checkConstraints": {},1264 "isRLSEnabled": false1265 },1266 "public.saved_opportunities": {1267 "name": "saved_opportunities",1268 "schema": "",1269 "columns": {1270 "user_id": {1271 "name": "user_id",1272 "type": "uuid",1273 "primaryKey": false,1274 "notNull": true1275 },1276 "opportunity_id": {1277 "name": "opportunity_id",1278 "type": "uuid",1279 "primaryKey": false,1280 "notNull": true1281 },1282 "created_at": {1283 "name": "created_at",1284 "type": "timestamp with time zone",1285 "primaryKey": false,1286 "notNull": true,1287 "default": "now()"1288 }1289 },1290 "indexes": {},1291 "foreignKeys": {1292 "saved_opportunities_user_id_users_id_fk": {1293 "name": "saved_opportunities_user_id_users_id_fk",1294 "tableFrom": "saved_opportunities",1295 "tableTo": "users",1296 "columnsFrom": [1297 "user_id"1298 ],1299 "columnsTo": [1300 "id"1301 ],1302 "onDelete": "cascade",1303 "onUpdate": "no action"1304 },1305 "saved_opportunities_opportunity_id_opportunities_id_fk": {1306 "name": "saved_opportunities_opportunity_id_opportunities_id_fk",1307 "tableFrom": "saved_opportunities",1308 "tableTo": "opportunities",1309 "columnsFrom": [1310 "opportunity_id"1311 ],1312 "columnsTo": [1313 "id"1314 ],1315 "onDelete": "cascade",1316 "onUpdate": "no action"1317 }1318 },1319 "compositePrimaryKeys": {1320 "saved_opportunities_user_id_opportunity_id_pk": {1321 "name": "saved_opportunities_user_id_opportunity_id_pk",1322 "columns": [1323 "user_id",1324 "opportunity_id"1325 ]1326 }1327 },1328 "uniqueConstraints": {},1329 "policies": {},1330 "checkConstraints": {},1331 "isRLSEnabled": false1332 },1333 "public.searches": {1334 "name": "searches",1335 "schema": "",1336 "columns": {1337 "id": {1338 "name": "id",1339 "type": "uuid",1340 "primaryKey": true,1341 "notNull": true,1342 "default": "gen_random_uuid()"1343 },1344 "investigation_id": {1345 "name": "investigation_id",1346 "type": "uuid",1347 "primaryKey": false,1348 "notNull": true1349 },1350 "query": {1351 "name": "query",1352 "type": "text",1353 "primaryKey": false,1354 "notNull": true1355 },1356 "intent": {1357 "name": "intent",1358 "type": "text",1359 "primaryKey": false,1360 "notNull": false1361 },1362 "provider": {1363 "name": "provider",1364 "type": "text",1365 "primaryKey": false,1366 "notNull": true,1367 "default": "'firecrawl'"1368 },1369 "result_count": {1370 "name": "result_count",1371 "type": "integer",1372 "primaryKey": false,1373 "notNull": true,1374 "default": 01375 },1376 "results": {1377 "name": "results",1378 "type": "jsonb",1379 "primaryKey": false,1380 "notNull": true1381 },1382 "created_at": {1383 "name": "created_at",1384 "type": "timestamp with time zone",1385 "primaryKey": false,1386 "notNull": true,1387 "default": "now()"1388 }1389 },1390 "indexes": {1391 "searches_investigation_idx": {1392 "name": "searches_investigation_idx",1393 "columns": [1394 {1395 "expression": "investigation_id",1396 "isExpression": false,1397 "asc": true,1398 "nulls": "last"1399 }1400 ],1401 "isUnique": false,1402 "concurrently": false,1403 "method": "btree",1404 "with": {}1405 }1406 },1407 "foreignKeys": {1408 "searches_investigation_id_investigations_id_fk": {1409 "name": "searches_investigation_id_investigations_id_fk",1410 "tableFrom": "searches",1411 "tableTo": "investigations",1412 "columnsFrom": [1413 "investigation_id"1414 ],1415 "columnsTo": [1416 "id"1417 ],1418 "onDelete": "cascade",1419 "onUpdate": "no action"1420 }1421 },1422 "compositePrimaryKeys": {},1423 "uniqueConstraints": {},1424 "policies": {},1425 "checkConstraints": {},1426 "isRLSEnabled": false1427 },1428 "public.source_contents": {1429 "name": "source_contents",1430 "schema": "",1431 "columns": {1432 "id": {1433 "name": "id",1434 "type": "uuid",1435 "primaryKey": true,1436 "notNull": true,1437 "default": "gen_random_uuid()"1438 },1439 "source_id": {1440 "name": "source_id",1441 "type": "uuid",1442 "primaryKey": false,1443 "notNull": true1444 },1445 "content_hash": {1446 "name": "content_hash",1447 "type": "text",1448 "primaryKey": false,1449 "notNull": true1450 },1451 "markdown": {1452 "name": "markdown",1453 "type": "text",1454 "primaryKey": false,1455 "notNull": true1456 },1457 "http_status": {1458 "name": "http_status",1459 "type": "integer",1460 "primaryKey": false,1461 "notNull": false1462 },1463 "word_count": {1464 "name": "word_count",1465 "type": "integer",1466 "primaryKey": false,1467 "notNull": true,1468 "default": 01469 },1470 "retrieved_at": {1471 "name": "retrieved_at",1472 "type": "timestamp with time zone",1473 "primaryKey": false,1474 "notNull": true,1475 "default": "now()"1476 }1477 },1478 "indexes": {1479 "source_contents_source_idx": {1480 "name": "source_contents_source_idx",1481 "columns": [1482 {1483 "expression": "source_id",1484 "isExpression": false,1485 "asc": true,1486 "nulls": "last"1487 },1488 {1489 "expression": "retrieved_at",1490 "isExpression": false,1491 "asc": true,1492 "nulls": "last"1493 }1494 ],1495 "isUnique": false,1496 "concurrently": false,1497 "method": "btree",1498 "with": {}1499 },1500 "source_contents_hash_idx": {1501 "name": "source_contents_hash_idx",1502 "columns": [1503 {1504 "expression": "content_hash",1505 "isExpression": false,1506 "asc": true,1507 "nulls": "last"1508 }1509 ],1510 "isUnique": false,1511 "concurrently": false,1512 "method": "btree",1513 "with": {}1514 }1515 },1516 "foreignKeys": {1517 "source_contents_source_id_sources_id_fk": {1518 "name": "source_contents_source_id_sources_id_fk",1519 "tableFrom": "source_contents",1520 "tableTo": "sources",1521 "columnsFrom": [1522 "source_id"1523 ],1524 "columnsTo": [1525 "id"1526 ],1527 "onDelete": "cascade",1528 "onUpdate": "no action"1529 }1530 },1531 "compositePrimaryKeys": {},1532 "uniqueConstraints": {},1533 "policies": {},1534 "checkConstraints": {},1535 "isRLSEnabled": false1536 },1537 "public.sources": {1538 "name": "sources",1539 "schema": "",1540 "columns": {1541 "id": {1542 "name": "id",1543 "type": "uuid",1544 "primaryKey": true,1545 "notNull": true,1546 "default": "gen_random_uuid()"1547 },1548 "url": {1549 "name": "url",1550 "type": "text",1551 "primaryKey": false,1552 "notNull": true1553 },1554 "canonical_url": {1555 "name": "canonical_url",1556 "type": "text",1557 "primaryKey": false,1558 "notNull": true1559 },1560 "domain": {1561 "name": "domain",1562 "type": "text",1563 "primaryKey": false,1564 "notNull": true1565 },1566 "title": {1567 "name": "title",1568 "type": "text",1569 "primaryKey": false,1570 "notNull": false1571 },1572 "description": {1573 "name": "description",1574 "type": "text",1575 "primaryKey": false,1576 "notNull": false1577 },1578 "first_seen_investigation_id": {1579 "name": "first_seen_investigation_id",1580 "type": "uuid",1581 "primaryKey": false,1582 "notNull": false1583 },1584 "created_at": {1585 "name": "created_at",1586 "type": "timestamp with time zone",1587 "primaryKey": false,1588 "notNull": true,1589 "default": "now()"1590 }1591 },1592 "indexes": {1593 "sources_canonical_idx": {1594 "name": "sources_canonical_idx",1595 "columns": [1596 {1597 "expression": "canonical_url",1598 "isExpression": false,1599 "asc": true,1600 "nulls": "last"1601 }1602 ],1603 "isUnique": true,1604 "concurrently": false,1605 "method": "btree",1606 "with": {}1607 },1608 "sources_domain_idx": {1609 "name": "sources_domain_idx",1610 "columns": [1611 {1612 "expression": "domain",1613 "isExpression": false,1614 "asc": true,1615 "nulls": "last"1616 }1617 ],1618 "isUnique": false,1619 "concurrently": false,1620 "method": "btree",1621 "with": {}1622 }1623 },1624 "foreignKeys": {1625 "sources_first_seen_investigation_id_investigations_id_fk": {1626 "name": "sources_first_seen_investigation_id_investigations_id_fk",1627 "tableFrom": "sources",1628 "tableTo": "investigations",1629 "columnsFrom": [1630 "first_seen_investigation_id"1631 ],1632 "columnsTo": [1633 "id"1634 ],1635 "onDelete": "no action",1636 "onUpdate": "no action"1637 }1638 },1639 "compositePrimaryKeys": {},1640 "uniqueConstraints": {},1641 "policies": {},1642 "checkConstraints": {},1643 "isRLSEnabled": false1644 },1645 "public.users": {1646 "name": "users",1647 "schema": "",1648 "columns": {1649 "id": {1650 "name": "id",1651 "type": "uuid",1652 "primaryKey": true,1653 "notNull": true,1654 "default": "gen_random_uuid()"1655 },1656 "email": {1657 "name": "email",1658 "type": "text",1659 "primaryKey": false,1660 "notNull": false1661 },1662 "name": {1663 "name": "name",1664 "type": "text",1665 "primaryKey": false,1666 "notNull": false1667 },1668 "created_at": {1669 "name": "created_at",1670 "type": "timestamp with time zone",1671 "primaryKey": false,1672 "notNull": true,1673 "default": "now()"1674 }1675 },1676 "indexes": {},1677 "foreignKeys": {},1678 "compositePrimaryKeys": {},1679 "uniqueConstraints": {1680 "users_email_unique": {1681 "name": "users_email_unique",1682 "nullsNotDistinct": false,1683 "columns": [1684 "email"1685 ]1686 }1687 },1688 "policies": {},1689 "checkConstraints": {},1690 "isRLSEnabled": false1691 }1692 },1693 "enums": {},1694 "schemas": {},1695 "sequences": {},1696 "roles": {},1697 "policies": {},1698 "views": {},1699 "_meta": {1700 "columns": {},1701 "schemas": {},1702 "tables": {}1703 }1704}