@aopslab/aops-server 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/NOTICE +6 -0
- package/README.md +21 -0
- package/aops-server-runtime.json +11 -0
- package/build/client/_app/immutable/chunks/2_TffmqH.js +1 -0
- package/build/client/_app/immutable/chunks/3DOfIKW0.js +1 -0
- package/build/client/_app/immutable/chunks/B2EkC-sy.js +1 -0
- package/build/client/_app/immutable/chunks/CMkIcmi1.js +2 -0
- package/build/client/_app/immutable/chunks/rqnVXeyB.js +1 -0
- package/build/client/_app/immutable/chunks/sZYZbj9W.js +1 -0
- package/build/client/_app/immutable/chunks/wbPk3Yxo.js +81 -0
- package/build/client/_app/immutable/entry/app.C7STLTX8.js +2 -0
- package/build/client/_app/immutable/entry/start.BC94hOaC.js +1 -0
- package/build/client/_app/immutable/nodes/0.BYBfjxZ5.js +1 -0
- package/build/client/_app/immutable/nodes/1.BNXFXajG.js +1 -0
- package/build/client/_app/version.json +1 -0
- package/build/env.js +70 -0
- package/build/env.js.map +1 -0
- package/build/handler.js +16 -0
- package/build/handler.js.map +1 -0
- package/build/index.js +139 -0
- package/build/index.js.map +1 -0
- package/build/server/chunks/0-RfB6m2nq.js +7 -0
- package/build/server/chunks/0-RfB6m2nq.js.map +1 -0
- package/build/server/chunks/1-_gg8Q0UT.js +9 -0
- package/build/server/chunks/1-_gg8Q0UT.js.map +1 -0
- package/build/server/chunks/_server.ts-6276EQIF.js +44 -0
- package/build/server/chunks/_server.ts-6276EQIF.js.map +1 -0
- package/build/server/chunks/_server.ts-B59WFQzX.js +174 -0
- package/build/server/chunks/_server.ts-B59WFQzX.js.map +1 -0
- package/build/server/chunks/_server.ts-BauJsLZI.js +40 -0
- package/build/server/chunks/_server.ts-BauJsLZI.js.map +1 -0
- package/build/server/chunks/_server.ts-BnGzJw2-.js +81 -0
- package/build/server/chunks/_server.ts-BnGzJw2-.js.map +1 -0
- package/build/server/chunks/_server.ts-CP7qM24V.js +34 -0
- package/build/server/chunks/_server.ts-CP7qM24V.js.map +1 -0
- package/build/server/chunks/_server.ts-Cbq_u99d.js +9 -0
- package/build/server/chunks/_server.ts-Cbq_u99d.js.map +1 -0
- package/build/server/chunks/_server.ts-Ch8fPT-o.js +92 -0
- package/build/server/chunks/_server.ts-Ch8fPT-o.js.map +1 -0
- package/build/server/chunks/_server.ts-Cv-yaXZI.js +7 -0
- package/build/server/chunks/_server.ts-Cv-yaXZI.js.map +1 -0
- package/build/server/chunks/_server.ts-D6lBwOON.js +34 -0
- package/build/server/chunks/_server.ts-D6lBwOON.js.map +1 -0
- package/build/server/chunks/_server.ts-D84K3pp9.js +11 -0
- package/build/server/chunks/_server.ts-D84K3pp9.js.map +1 -0
- package/build/server/chunks/_server.ts-DNzU1ToA.js +277 -0
- package/build/server/chunks/_server.ts-DNzU1ToA.js.map +1 -0
- package/build/server/chunks/_server.ts-DQQnw77t.js +17 -0
- package/build/server/chunks/_server.ts-DQQnw77t.js.map +1 -0
- package/build/server/chunks/_server.ts-DSxr5l15.js +18 -0
- package/build/server/chunks/_server.ts-DSxr5l15.js.map +1 -0
- package/build/server/chunks/_server.ts-DZYokvuR.js +80 -0
- package/build/server/chunks/_server.ts-DZYokvuR.js.map +1 -0
- package/build/server/chunks/_server.ts-Dcqwpz2t.js +144 -0
- package/build/server/chunks/_server.ts-Dcqwpz2t.js.map +1 -0
- package/build/server/chunks/_server.ts-Di9VJnF4.js +81 -0
- package/build/server/chunks/_server.ts-Di9VJnF4.js.map +1 -0
- package/build/server/chunks/_server.ts-FBEHFT8b.js +33 -0
- package/build/server/chunks/_server.ts-FBEHFT8b.js.map +1 -0
- package/build/server/chunks/_server.ts-gZytCuiJ.js +10 -0
- package/build/server/chunks/_server.ts-gZytCuiJ.js.map +1 -0
- package/build/server/chunks/_server.ts-tNULLyEO.js +261 -0
- package/build/server/chunks/_server.ts-tNULLyEO.js.map +1 -0
- package/build/server/chunks/agent-gateway-runtime-DTZ4SxaC.js +2598 -0
- package/build/server/chunks/agent-gateway-runtime-DTZ4SxaC.js.map +1 -0
- package/build/server/chunks/aops-runtime-config-wpVmg7T-.js +179 -0
- package/build/server/chunks/aops-runtime-config-wpVmg7T-.js.map +1 -0
- package/build/server/chunks/discovery-D9JnSgfu.js +894 -0
- package/build/server/chunks/discovery-D9JnSgfu.js.map +1 -0
- package/build/server/chunks/error.svelte-DgUOqi-L.js +45 -0
- package/build/server/chunks/error.svelte-DgUOqi-L.js.map +1 -0
- package/build/server/chunks/handler-BN3-p5rP.js +1733 -0
- package/build/server/chunks/handler-BN3-p5rP.js.map +1 -0
- package/build/server/chunks/hooks.server-C4wxiH5m.js +52 -0
- package/build/server/chunks/hooks.server-C4wxiH5m.js.map +1 -0
- package/build/server/chunks/index.js-nbqdVuWC.js +10698 -0
- package/build/server/chunks/index.js-nbqdVuWC.js.map +1 -0
- package/build/server/chunks/manifest.js-_Re-Wj-y.js +167 -0
- package/build/server/chunks/manifest.js-_Re-Wj-y.js.map +1 -0
- package/build/server/chunks/plugin-error-normalize-Bq14Qbz3.js +297 -0
- package/build/server/chunks/plugin-error-normalize-Bq14Qbz3.js.map +1 -0
- package/build/server/chunks/project-alias-DqE2v58Q.js +29 -0
- package/build/server/chunks/project-alias-DqE2v58Q.js.map +1 -0
- package/build/server/chunks/registry-5amIZito.js +289 -0
- package/build/server/chunks/registry-5amIZito.js.map +1 -0
- package/build/server/chunks/request-base-url-BDdrsaga.js +24 -0
- package/build/server/chunks/request-base-url-BDdrsaga.js.map +1 -0
- package/build/server/chunks/request-context-tNeFQjgb.js +422 -0
- package/build/server/chunks/request-context-tNeFQjgb.js.map +1 -0
- package/build/server/chunks/xf-result-BRDjvftr.js +17 -0
- package/build/server/chunks/xf-result-BRDjvftr.js.map +1 -0
- package/build/shims.js +33 -0
- package/build/shims.js.map +1 -0
- package/cockpit/.vite/manifest.json +198 -0
- package/cockpit/assets/dm-sans-latin-400-normal-BwCSEQnW.woff +0 -0
- package/cockpit/assets/dm-sans-latin-400-normal-CW0RaeGs.woff2 +0 -0
- package/cockpit/assets/dm-sans-latin-500-normal-B9HHJjqV.woff2 +0 -0
- package/cockpit/assets/dm-sans-latin-500-normal-Dr3UlScf.woff +0 -0
- package/cockpit/assets/dm-sans-latin-700-normal-CUSSCpQX.woff +0 -0
- package/cockpit/assets/dm-sans-latin-700-normal-DvUfVpUG.woff2 +0 -0
- package/cockpit/assets/dm-sans-latin-ext-400-normal-BjWJ59Pq.woff +0 -0
- package/cockpit/assets/dm-sans-latin-ext-400-normal-BtiwyxMk.woff2 +0 -0
- package/cockpit/assets/dm-sans-latin-ext-500-normal-BJfUCQsA.woff2 +0 -0
- package/cockpit/assets/dm-sans-latin-ext-500-normal-DR84L5F-.woff +0 -0
- package/cockpit/assets/dm-sans-latin-ext-700-normal-BLI3TTWz.woff +0 -0
- package/cockpit/assets/dm-sans-latin-ext-700-normal-CJIcxD6K.woff2 +0 -0
- package/cockpit/assets/index-DDswO4B1.css +1 -0
- package/cockpit/assets/index-bovtnZ98.js +18 -0
- package/cockpit/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/cockpit/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/cockpit/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/cockpit/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/cockpit/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/cockpit/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/cockpit/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/cockpit/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/cockpit/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/cockpit/assets/outfit-latin-400-normal-BGsTXAXT.woff2 +0 -0
- package/cockpit/assets/outfit-latin-400-normal-DMwTpYkH.woff +0 -0
- package/cockpit/assets/outfit-latin-600-normal-B7SfZ07L.woff2 +0 -0
- package/cockpit/assets/outfit-latin-600-normal-BEfTtDA7.woff +0 -0
- package/cockpit/assets/outfit-latin-ext-400-normal-5tcqmc2S.woff2 +0 -0
- package/cockpit/assets/outfit-latin-ext-400-normal-DHm7mdGe.woff +0 -0
- package/cockpit/assets/outfit-latin-ext-600-normal-B85nYjL1.woff2 +0 -0
- package/cockpit/assets/outfit-latin-ext-600-normal-CWJcPgd7.woff +0 -0
- package/cockpit/assets/unbounded-cyrillic-600-normal-B-s5c2Kn.woff +0 -0
- package/cockpit/assets/unbounded-cyrillic-600-normal-DW6uzIMB.woff2 +0 -0
- package/cockpit/assets/unbounded-latin-600-normal-BPdB_PEv.woff +0 -0
- package/cockpit/assets/unbounded-latin-600-normal-oRSANpZr.woff2 +0 -0
- package/cockpit/assets/unbounded-latin-ext-600-normal-0iZLtTDV.woff2 +0 -0
- package/cockpit/assets/unbounded-latin-ext-600-normal-ClMPf-bu.woff +0 -0
- package/cockpit/assets/unbounded-vietnamese-600-normal-BzfrgZ_C.woff +0 -0
- package/cockpit/assets/unbounded-vietnamese-600-normal-Cx2bTSHN.woff2 +0 -0
- package/cockpit/community.module-inventory.json +2389 -0
- package/cockpit/index.html +14 -0
- package/community-postgres.json +13 -0
- package/migrations/agentspace/0000_thin_carlie_cooper.sql +764 -0
- package/migrations/agentspace/meta/0000_snapshot.json +6885 -0
- package/migrations/agentspace/meta/_journal.json +13 -0
- package/migrations/chatv3/0000_dry_ego.sql +218 -0
- package/migrations/chatv3/0001_nosy_obadiah_stane.sql +35 -0
- package/migrations/chatv3/0002_narrow_darkhawk.sql +4 -0
- package/migrations/chatv3/0003_damp_zarek.sql +2 -0
- package/migrations/chatv3/0004_nervous_martin_li.sql +60 -0
- package/migrations/chatv3/0005_chatv3_server_encrypted_mode.sql +1 -0
- package/migrations/chatv3/meta/0000_snapshot.json +1887 -0
- package/migrations/chatv3/meta/0001_snapshot.json +2175 -0
- package/migrations/chatv3/meta/0002_snapshot.json +2229 -0
- package/migrations/chatv3/meta/0003_snapshot.json +2241 -0
- package/migrations/chatv3/meta/0004_snapshot.json +2746 -0
- package/migrations/chatv3/meta/_journal.json +48 -0
- package/migrations/docman/0000_curvy_valeria_richards.sql +257 -0
- package/migrations/docman/0001_massive_risque.sql +2 -0
- package/migrations/docman/0002_simple_logan.sql +50 -0
- package/migrations/docman/0003_quick_index.sql +45 -0
- package/migrations/docman/0004_known_summary.sql +9 -0
- package/migrations/docman/0005_vector_signal.sql +9 -0
- package/migrations/docman/0006_document_version_current_invariant.sql +15 -0
- package/migrations/docman/meta/_journal.json +55 -0
- package/migrations/projectman/0000_smooth_klaw.sql +257 -0
- package/migrations/projectman/0001_worthless_zodiak.sql +9 -0
- package/migrations/projectman/0002_board_rename.sql +108 -0
- package/migrations/projectman/0003_review_request.sql +62 -0
- package/migrations/projectman/0004_review_request_idempotency.sql +3 -0
- package/migrations/projectman/0005_allow_multi_sprint_per_task.sql +1 -0
- package/migrations/projectman/meta/_journal.json +48 -0
- package/migrations/sys/0000_loose_praxagora.sql +31 -0
- package/migrations/sys/0001_awesome_ronan.sql +2 -0
- package/migrations/sys/0002_steady_maximus.sql +2 -0
- package/migrations/sys/0003_escalating_rate_limiter.sql +2 -0
- package/migrations/sys/0004_rate_limiter_timestamptz.sql +22 -0
- package/migrations/sys/0005_sys_counters.sql +21 -0
- package/migrations/sys/meta/_journal.json +48 -0
- package/npm-shrinkwrap.json +4375 -0
- package/package.json +62 -0
- package/runtime/agentspace-host-adapter.mjs +64 -0
- package/runtime/agentspace-tooling.mjs +389 -0
- package/runtime/docman-host-adapter.mjs +177 -0
- package/runtime/docman-policy.mjs +450 -0
- package/runtime/docman-tooling.mjs +20 -0
- package/runtime/projectman-host-adapter.mjs +597 -0
- package/runtime/scope-context.mjs +99 -0
- package/scripts/community-host.mjs +626 -0
- package/scripts/community-migration-policy-v1.json +296 -0
|
@@ -0,0 +1,764 @@
|
|
|
1
|
+
CREATE TABLE "activity-items" (
|
|
2
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
3
|
+
"tenantId" text NOT NULL,
|
|
4
|
+
"scopeId" uuid NOT NULL,
|
|
5
|
+
"projectId" uuid,
|
|
6
|
+
"sourceKind" text NOT NULL,
|
|
7
|
+
"sourceId" text NOT NULL,
|
|
8
|
+
"action" text NOT NULL,
|
|
9
|
+
"status" text NOT NULL,
|
|
10
|
+
"summary" text NOT NULL,
|
|
11
|
+
"refs" jsonb DEFAULT '[]'::jsonb NOT NULL,
|
|
12
|
+
"payload" jsonb,
|
|
13
|
+
"meta" jsonb,
|
|
14
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
15
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
16
|
+
);
|
|
17
|
+
--> statement-breakpoint
|
|
18
|
+
CREATE TABLE "agent-profiles" (
|
|
19
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
20
|
+
"tenantId" text NOT NULL,
|
|
21
|
+
"scopeId" uuid NOT NULL,
|
|
22
|
+
"projectId" uuid,
|
|
23
|
+
"slug" text NOT NULL,
|
|
24
|
+
"name" text NOT NULL,
|
|
25
|
+
"role" text NOT NULL,
|
|
26
|
+
"version" integer,
|
|
27
|
+
"kind" text,
|
|
28
|
+
"defaultAgents" jsonb,
|
|
29
|
+
"capabilities" jsonb,
|
|
30
|
+
"allowedSurfaces" jsonb,
|
|
31
|
+
"requiresApprovalFor" jsonb,
|
|
32
|
+
"promptRef" text,
|
|
33
|
+
"skillRefs" jsonb,
|
|
34
|
+
"resourceRefs" jsonb,
|
|
35
|
+
"overlayRefs" jsonb,
|
|
36
|
+
"additionalContextRefs" jsonb,
|
|
37
|
+
"body" text,
|
|
38
|
+
"tags" jsonb,
|
|
39
|
+
"createdBy" text,
|
|
40
|
+
"updatedBy" text,
|
|
41
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
42
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
43
|
+
);
|
|
44
|
+
--> statement-breakpoint
|
|
45
|
+
CREATE TABLE "agent-run-events" (
|
|
46
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
47
|
+
"tenantId" text NOT NULL,
|
|
48
|
+
"scopeId" uuid NOT NULL,
|
|
49
|
+
"agentRunId" uuid NOT NULL,
|
|
50
|
+
"runId" text NOT NULL,
|
|
51
|
+
"eventId" text NOT NULL,
|
|
52
|
+
"sequence" integer NOT NULL,
|
|
53
|
+
"eventType" text NOT NULL,
|
|
54
|
+
"status" text,
|
|
55
|
+
"payload" jsonb,
|
|
56
|
+
"meta" jsonb,
|
|
57
|
+
"emittedAt" timestamp with time zone NOT NULL,
|
|
58
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
59
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
60
|
+
);
|
|
61
|
+
--> statement-breakpoint
|
|
62
|
+
CREATE TABLE "agent-runs" (
|
|
63
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
64
|
+
"tenantId" text NOT NULL,
|
|
65
|
+
"scopeId" uuid NOT NULL,
|
|
66
|
+
"projectId" uuid,
|
|
67
|
+
"agentSessionId" uuid NOT NULL,
|
|
68
|
+
"taskId" uuid,
|
|
69
|
+
"runId" text NOT NULL,
|
|
70
|
+
"sessionId" text NOT NULL,
|
|
71
|
+
"agent" text NOT NULL,
|
|
72
|
+
"profile" text,
|
|
73
|
+
"model" text,
|
|
74
|
+
"outputFormat" text,
|
|
75
|
+
"tokensUsed" integer,
|
|
76
|
+
"costUsd" double precision,
|
|
77
|
+
"exitCode" integer,
|
|
78
|
+
"stdout" text,
|
|
79
|
+
"stderr" text,
|
|
80
|
+
"resultText" text,
|
|
81
|
+
"startedAt" timestamp with time zone,
|
|
82
|
+
"endedAt" timestamp with time zone,
|
|
83
|
+
"durationMs" integer,
|
|
84
|
+
"meta" jsonb,
|
|
85
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
86
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
87
|
+
);
|
|
88
|
+
--> statement-breakpoint
|
|
89
|
+
CREATE TABLE "agent-sessions" (
|
|
90
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
91
|
+
"tenantId" text NOT NULL,
|
|
92
|
+
"scopeId" uuid NOT NULL,
|
|
93
|
+
"missionId" uuid,
|
|
94
|
+
"sessionId" text NOT NULL,
|
|
95
|
+
"agent" text NOT NULL,
|
|
96
|
+
"profile" text,
|
|
97
|
+
"model" text,
|
|
98
|
+
"status" text NOT NULL,
|
|
99
|
+
"startedAt" timestamp with time zone,
|
|
100
|
+
"endedAt" timestamp with time zone,
|
|
101
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
102
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
103
|
+
);
|
|
104
|
+
--> statement-breakpoint
|
|
105
|
+
CREATE TABLE "artifact-links" (
|
|
106
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
107
|
+
"tenantId" text NOT NULL,
|
|
108
|
+
"projectId" uuid NOT NULL,
|
|
109
|
+
"artifactId" uuid NOT NULL,
|
|
110
|
+
"refType" text NOT NULL,
|
|
111
|
+
"refId" text NOT NULL,
|
|
112
|
+
"createdBy" text,
|
|
113
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
114
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
115
|
+
);
|
|
116
|
+
--> statement-breakpoint
|
|
117
|
+
CREATE TABLE "artifacts" (
|
|
118
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
119
|
+
"tenantId" text NOT NULL,
|
|
120
|
+
"scopeId" uuid NOT NULL,
|
|
121
|
+
"artifactType" text NOT NULL,
|
|
122
|
+
"label" text,
|
|
123
|
+
"storagePath" text NOT NULL,
|
|
124
|
+
"mimeType" text,
|
|
125
|
+
"sizeBytes" integer,
|
|
126
|
+
"hash" text,
|
|
127
|
+
"meta" jsonb,
|
|
128
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
129
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
130
|
+
);
|
|
131
|
+
--> statement-breakpoint
|
|
132
|
+
CREATE TABLE "chat-messages" (
|
|
133
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
134
|
+
"tenantId" text NOT NULL,
|
|
135
|
+
"scopeId" uuid NOT NULL,
|
|
136
|
+
"roomId" uuid NOT NULL,
|
|
137
|
+
"seq" integer NOT NULL,
|
|
138
|
+
"authorAgentId" text NOT NULL,
|
|
139
|
+
"kind" text NOT NULL,
|
|
140
|
+
"text" text NOT NULL,
|
|
141
|
+
"mentions" jsonb,
|
|
142
|
+
"replyToSeq" integer,
|
|
143
|
+
"idempotencyKey" text,
|
|
144
|
+
"createdBy" text,
|
|
145
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
146
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
147
|
+
);
|
|
148
|
+
--> statement-breakpoint
|
|
149
|
+
CREATE TABLE "chat-room-bindings" (
|
|
150
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
151
|
+
"tenantId" text NOT NULL,
|
|
152
|
+
"scopeId" uuid NOT NULL,
|
|
153
|
+
"roomId" uuid NOT NULL,
|
|
154
|
+
"bindingType" text NOT NULL,
|
|
155
|
+
"refId" text,
|
|
156
|
+
"uri" text,
|
|
157
|
+
"title" text,
|
|
158
|
+
"note" text,
|
|
159
|
+
"createdBy" text,
|
|
160
|
+
"updatedBy" text,
|
|
161
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
162
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
163
|
+
);
|
|
164
|
+
--> statement-breakpoint
|
|
165
|
+
CREATE TABLE "chat-room-members" (
|
|
166
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
167
|
+
"tenantId" text NOT NULL,
|
|
168
|
+
"scopeId" uuid NOT NULL,
|
|
169
|
+
"roomId" uuid NOT NULL,
|
|
170
|
+
"agentId" text NOT NULL,
|
|
171
|
+
"roleKey" text NOT NULL,
|
|
172
|
+
"brief" text,
|
|
173
|
+
"status" text NOT NULL,
|
|
174
|
+
"lastReadSeq" integer DEFAULT 0 NOT NULL,
|
|
175
|
+
"joinedAt" timestamp with time zone NOT NULL,
|
|
176
|
+
"leftAt" timestamp with time zone,
|
|
177
|
+
"createdBy" text,
|
|
178
|
+
"updatedBy" text,
|
|
179
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
180
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
181
|
+
);
|
|
182
|
+
--> statement-breakpoint
|
|
183
|
+
CREATE TABLE "chat-rooms" (
|
|
184
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
185
|
+
"tenantId" text NOT NULL,
|
|
186
|
+
"scopeId" uuid NOT NULL,
|
|
187
|
+
"projectId" uuid,
|
|
188
|
+
"slug" text NOT NULL,
|
|
189
|
+
"title" text NOT NULL,
|
|
190
|
+
"kind" text NOT NULL,
|
|
191
|
+
"purpose" text,
|
|
192
|
+
"guidanceMarkdown" text,
|
|
193
|
+
"status" text NOT NULL,
|
|
194
|
+
"dmKey" text,
|
|
195
|
+
"lastSeq" integer DEFAULT 0 NOT NULL,
|
|
196
|
+
"lastMessageAt" timestamp with time zone,
|
|
197
|
+
"createdBy" text,
|
|
198
|
+
"updatedBy" text,
|
|
199
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
200
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
201
|
+
);
|
|
202
|
+
--> statement-breakpoint
|
|
203
|
+
CREATE TABLE "codex-chat-messages" (
|
|
204
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
205
|
+
"tenantId" text NOT NULL,
|
|
206
|
+
"projectId" uuid NOT NULL,
|
|
207
|
+
"threadId" uuid NOT NULL,
|
|
208
|
+
"externalThreadId" text,
|
|
209
|
+
"role" text NOT NULL,
|
|
210
|
+
"text" text NOT NULL,
|
|
211
|
+
"turnId" text,
|
|
212
|
+
"itemId" text,
|
|
213
|
+
"messageAt" timestamp with time zone NOT NULL,
|
|
214
|
+
"seq" integer NOT NULL,
|
|
215
|
+
"createdBy" text,
|
|
216
|
+
"updatedBy" text,
|
|
217
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
218
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
219
|
+
);
|
|
220
|
+
--> statement-breakpoint
|
|
221
|
+
CREATE TABLE "codex-chat-settings" (
|
|
222
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
223
|
+
"tenantId" text NOT NULL,
|
|
224
|
+
"projectId" uuid NOT NULL,
|
|
225
|
+
"userId" text NOT NULL,
|
|
226
|
+
"binaryPath" text,
|
|
227
|
+
"model" text,
|
|
228
|
+
"modelProvider" text,
|
|
229
|
+
"reasoningEffort" text,
|
|
230
|
+
"profile" text,
|
|
231
|
+
"serviceTier" text,
|
|
232
|
+
"personality" text,
|
|
233
|
+
"approvalsReviewer" text,
|
|
234
|
+
"executionMode" text NOT NULL,
|
|
235
|
+
"sandboxMode" text NOT NULL,
|
|
236
|
+
"manualCwd" text,
|
|
237
|
+
"autoStart" boolean,
|
|
238
|
+
"persistExtendedHistory" boolean,
|
|
239
|
+
"experimentalApi" boolean,
|
|
240
|
+
"optOutNotificationMethods" text,
|
|
241
|
+
"createdBy" text,
|
|
242
|
+
"updatedBy" text,
|
|
243
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
244
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
245
|
+
);
|
|
246
|
+
--> statement-breakpoint
|
|
247
|
+
CREATE TABLE "codex-chat-threads" (
|
|
248
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
249
|
+
"tenantId" text NOT NULL,
|
|
250
|
+
"scopeId" uuid NOT NULL,
|
|
251
|
+
"externalThreadId" text NOT NULL,
|
|
252
|
+
"scopeLabel" text,
|
|
253
|
+
"cwd" text,
|
|
254
|
+
"title" text,
|
|
255
|
+
"tags" jsonb,
|
|
256
|
+
"lastPrompt" text,
|
|
257
|
+
"lastAssistant" text,
|
|
258
|
+
"tokenInput" integer,
|
|
259
|
+
"tokenOutput" integer,
|
|
260
|
+
"tokenTotal" integer,
|
|
261
|
+
"lastMessageAt" timestamp with time zone,
|
|
262
|
+
"createdBy" text,
|
|
263
|
+
"updatedBy" text,
|
|
264
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
265
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
266
|
+
);
|
|
267
|
+
--> statement-breakpoint
|
|
268
|
+
CREATE TABLE "discussion-outputs" (
|
|
269
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
270
|
+
"tenantId" text NOT NULL,
|
|
271
|
+
"scopeId" uuid NOT NULL,
|
|
272
|
+
"topicId" uuid NOT NULL,
|
|
273
|
+
"outputKind" text NOT NULL,
|
|
274
|
+
"ownerAgentId" text NOT NULL,
|
|
275
|
+
"content" text NOT NULL,
|
|
276
|
+
"createdBy" text,
|
|
277
|
+
"updatedBy" text,
|
|
278
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
279
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
280
|
+
);
|
|
281
|
+
--> statement-breakpoint
|
|
282
|
+
CREATE TABLE "discussion-topics" (
|
|
283
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
284
|
+
"tenantId" text NOT NULL,
|
|
285
|
+
"scopeId" uuid NOT NULL,
|
|
286
|
+
"projectId" uuid,
|
|
287
|
+
"parentTopicId" uuid,
|
|
288
|
+
"lineageKind" text,
|
|
289
|
+
"referencedOutputs" jsonb,
|
|
290
|
+
"referencedTurnRefs" jsonb,
|
|
291
|
+
"referencedMemoryRefs" jsonb,
|
|
292
|
+
"abandonReason" text,
|
|
293
|
+
"slug" text NOT NULL,
|
|
294
|
+
"title" text NOT NULL,
|
|
295
|
+
"question" text NOT NULL,
|
|
296
|
+
"participants" jsonb,
|
|
297
|
+
"initiatorAgentId" text NOT NULL,
|
|
298
|
+
"status" text NOT NULL,
|
|
299
|
+
"blockedOn" text,
|
|
300
|
+
"blockingTurnSeq" integer,
|
|
301
|
+
"subjectType" text,
|
|
302
|
+
"subjectId" uuid,
|
|
303
|
+
"rules" jsonb,
|
|
304
|
+
"tags" jsonb,
|
|
305
|
+
"lastSeq" integer DEFAULT 0 NOT NULL,
|
|
306
|
+
"lastTurnAt" timestamp with time zone,
|
|
307
|
+
"createdBy" text,
|
|
308
|
+
"updatedBy" text,
|
|
309
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
310
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
311
|
+
);
|
|
312
|
+
--> statement-breakpoint
|
|
313
|
+
CREATE TABLE "discussion-turns" (
|
|
314
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
315
|
+
"tenantId" text NOT NULL,
|
|
316
|
+
"scopeId" uuid NOT NULL,
|
|
317
|
+
"topicId" uuid NOT NULL,
|
|
318
|
+
"seq" integer NOT NULL,
|
|
319
|
+
"agentId" text NOT NULL,
|
|
320
|
+
"kind" text NOT NULL,
|
|
321
|
+
"text" text NOT NULL,
|
|
322
|
+
"addressedTo" text,
|
|
323
|
+
"replyToSeq" integer,
|
|
324
|
+
"idempotencyKey" text,
|
|
325
|
+
"createdBy" text,
|
|
326
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
327
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
328
|
+
);
|
|
329
|
+
--> statement-breakpoint
|
|
330
|
+
CREATE TABLE "experience-items" (
|
|
331
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
332
|
+
"tenantId" text NOT NULL,
|
|
333
|
+
"scopeId" uuid NOT NULL,
|
|
334
|
+
"type" text NOT NULL,
|
|
335
|
+
"title" text NOT NULL,
|
|
336
|
+
"problem" text,
|
|
337
|
+
"solution" text,
|
|
338
|
+
"content" text NOT NULL,
|
|
339
|
+
"areas" jsonb,
|
|
340
|
+
"stack" jsonb,
|
|
341
|
+
"commands" jsonb,
|
|
342
|
+
"files" jsonb,
|
|
343
|
+
"sourceRefs" jsonb,
|
|
344
|
+
"tags" jsonb,
|
|
345
|
+
"confidence" text,
|
|
346
|
+
"reusability" text,
|
|
347
|
+
"meta" jsonb,
|
|
348
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
349
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
350
|
+
);
|
|
351
|
+
--> statement-breakpoint
|
|
352
|
+
CREATE TABLE "memory-items" (
|
|
353
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
354
|
+
"tenantId" text NOT NULL,
|
|
355
|
+
"scopeId" uuid NOT NULL,
|
|
356
|
+
"kind" text NOT NULL,
|
|
357
|
+
"durability" text NOT NULL,
|
|
358
|
+
"content" text NOT NULL,
|
|
359
|
+
"tags" jsonb,
|
|
360
|
+
"importance" integer,
|
|
361
|
+
"sourceType" text,
|
|
362
|
+
"sourceId" text,
|
|
363
|
+
"meta" jsonb,
|
|
364
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
365
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
366
|
+
);
|
|
367
|
+
--> statement-breakpoint
|
|
368
|
+
CREATE TABLE "missions" (
|
|
369
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
370
|
+
"tenantId" text NOT NULL,
|
|
371
|
+
"scopeId" uuid NOT NULL,
|
|
372
|
+
"slug" text,
|
|
373
|
+
"status" text NOT NULL,
|
|
374
|
+
"objective" text NOT NULL,
|
|
375
|
+
"taskDefinition" text,
|
|
376
|
+
"successCriteria" jsonb,
|
|
377
|
+
"constraints" jsonb,
|
|
378
|
+
"policy" jsonb,
|
|
379
|
+
"roles" jsonb,
|
|
380
|
+
"references" jsonb,
|
|
381
|
+
"visionDocRef" jsonb,
|
|
382
|
+
"activeImplementationPlanRef" jsonb,
|
|
383
|
+
"lineage" jsonb,
|
|
384
|
+
"sourceTemplateRef" jsonb,
|
|
385
|
+
"bodyMarkdown" text,
|
|
386
|
+
"meta" jsonb,
|
|
387
|
+
"createdBy" text,
|
|
388
|
+
"updatedBy" text,
|
|
389
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
390
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
391
|
+
);
|
|
392
|
+
--> statement-breakpoint
|
|
393
|
+
CREATE TABLE "project-members" (
|
|
394
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
395
|
+
"tenantId" text NOT NULL,
|
|
396
|
+
"projectId" uuid NOT NULL,
|
|
397
|
+
"userId" uuid NOT NULL,
|
|
398
|
+
"role" text NOT NULL,
|
|
399
|
+
"createdBy" text,
|
|
400
|
+
"updatedBy" text,
|
|
401
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
402
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
403
|
+
);
|
|
404
|
+
--> statement-breakpoint
|
|
405
|
+
CREATE TABLE "project-paths" (
|
|
406
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
407
|
+
"tenantId" text NOT NULL,
|
|
408
|
+
"projectId" uuid NOT NULL,
|
|
409
|
+
"pathKey" text NOT NULL,
|
|
410
|
+
"path" text NOT NULL,
|
|
411
|
+
"description" text,
|
|
412
|
+
"createdBy" text,
|
|
413
|
+
"updatedBy" text,
|
|
414
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
415
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
416
|
+
);
|
|
417
|
+
--> statement-breakpoint
|
|
418
|
+
CREATE TABLE "projects" (
|
|
419
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
420
|
+
"tenantId" text NOT NULL,
|
|
421
|
+
"scopeId" uuid NOT NULL,
|
|
422
|
+
"name" text NOT NULL,
|
|
423
|
+
"description" text,
|
|
424
|
+
"tags" jsonb,
|
|
425
|
+
"slug" text,
|
|
426
|
+
"status" text,
|
|
427
|
+
"visibility" text,
|
|
428
|
+
"projectType" text,
|
|
429
|
+
"ownerId" text,
|
|
430
|
+
"createdBy" text,
|
|
431
|
+
"updatedBy" text,
|
|
432
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
433
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
434
|
+
);
|
|
435
|
+
--> statement-breakpoint
|
|
436
|
+
CREATE TABLE "prompts" (
|
|
437
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
438
|
+
"tenantId" text NOT NULL,
|
|
439
|
+
"scopeId" uuid NOT NULL,
|
|
440
|
+
"name" text NOT NULL,
|
|
441
|
+
"description" text,
|
|
442
|
+
"tags" jsonb,
|
|
443
|
+
"status" text DEFAULT 'draft' NOT NULL,
|
|
444
|
+
"currentVersionId" uuid,
|
|
445
|
+
"createdBy" text,
|
|
446
|
+
"updatedBy" text,
|
|
447
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
448
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
449
|
+
);
|
|
450
|
+
--> statement-breakpoint
|
|
451
|
+
CREATE TABLE "prompt-versions" (
|
|
452
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
453
|
+
"tenantId" text NOT NULL,
|
|
454
|
+
"projectId" uuid NOT NULL,
|
|
455
|
+
"promptId" uuid NOT NULL,
|
|
456
|
+
"version" integer NOT NULL,
|
|
457
|
+
"status" text NOT NULL,
|
|
458
|
+
"content" text NOT NULL,
|
|
459
|
+
"variables" jsonb,
|
|
460
|
+
"meta" jsonb,
|
|
461
|
+
"refType" text,
|
|
462
|
+
"refId" text,
|
|
463
|
+
"createdBy" text,
|
|
464
|
+
"updatedBy" text,
|
|
465
|
+
"publishedAt" timestamp with time zone,
|
|
466
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
467
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
468
|
+
);
|
|
469
|
+
--> statement-breakpoint
|
|
470
|
+
CREATE TABLE "resources" (
|
|
471
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
472
|
+
"tenantId" text NOT NULL,
|
|
473
|
+
"scopeId" uuid NOT NULL,
|
|
474
|
+
"name" text NOT NULL,
|
|
475
|
+
"description" text,
|
|
476
|
+
"resourceType" text NOT NULL,
|
|
477
|
+
"uri" text,
|
|
478
|
+
"tags" jsonb,
|
|
479
|
+
"refType" text,
|
|
480
|
+
"refId" text,
|
|
481
|
+
"meta" jsonb,
|
|
482
|
+
"createdBy" text,
|
|
483
|
+
"updatedBy" text,
|
|
484
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
485
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
486
|
+
);
|
|
487
|
+
--> statement-breakpoint
|
|
488
|
+
CREATE TABLE "scopes" (
|
|
489
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
490
|
+
"tenantId" text NOT NULL,
|
|
491
|
+
"type" text NOT NULL,
|
|
492
|
+
"parentScopeId" uuid,
|
|
493
|
+
"createdBy" text,
|
|
494
|
+
"updatedBy" text,
|
|
495
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
496
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
497
|
+
);
|
|
498
|
+
--> statement-breakpoint
|
|
499
|
+
CREATE TABLE "skills" (
|
|
500
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
501
|
+
"tenantId" text NOT NULL,
|
|
502
|
+
"scopeId" uuid NOT NULL,
|
|
503
|
+
"name" text NOT NULL,
|
|
504
|
+
"description" text,
|
|
505
|
+
"shortDescription" text,
|
|
506
|
+
"tags" jsonb,
|
|
507
|
+
"currentVersionId" uuid,
|
|
508
|
+
"createdBy" text,
|
|
509
|
+
"updatedBy" text,
|
|
510
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
511
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
512
|
+
);
|
|
513
|
+
--> statement-breakpoint
|
|
514
|
+
CREATE TABLE "skill-versions" (
|
|
515
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
516
|
+
"tenantId" text NOT NULL,
|
|
517
|
+
"projectId" uuid NOT NULL,
|
|
518
|
+
"skillId" uuid NOT NULL,
|
|
519
|
+
"version" integer NOT NULL,
|
|
520
|
+
"status" text NOT NULL,
|
|
521
|
+
"content" text NOT NULL,
|
|
522
|
+
"entryFile" text,
|
|
523
|
+
"skillStandard" text DEFAULT 'aops-skill-v1' NOT NULL,
|
|
524
|
+
"files" jsonb,
|
|
525
|
+
"meta" jsonb,
|
|
526
|
+
"refType" text,
|
|
527
|
+
"refId" text,
|
|
528
|
+
"createdBy" text,
|
|
529
|
+
"updatedBy" text,
|
|
530
|
+
"publishedAt" timestamp with time zone,
|
|
531
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
532
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
533
|
+
);
|
|
534
|
+
--> statement-breakpoint
|
|
535
|
+
CREATE TABLE "tags" (
|
|
536
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
537
|
+
"tenantId" text NOT NULL,
|
|
538
|
+
"scopeId" uuid NOT NULL,
|
|
539
|
+
"scopeType" text NOT NULL,
|
|
540
|
+
"name" text NOT NULL,
|
|
541
|
+
"createdBy" text,
|
|
542
|
+
"updatedBy" text,
|
|
543
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
544
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
545
|
+
);
|
|
546
|
+
--> statement-breakpoint
|
|
547
|
+
CREATE TABLE "workflow-definitions" (
|
|
548
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
549
|
+
"tenantId" text NOT NULL,
|
|
550
|
+
"scopeId" uuid NOT NULL,
|
|
551
|
+
"definitionId" text NOT NULL,
|
|
552
|
+
"name" text NOT NULL,
|
|
553
|
+
"mode" text NOT NULL,
|
|
554
|
+
"subjectType" text,
|
|
555
|
+
"runtimeProfile" text,
|
|
556
|
+
"steps" jsonb NOT NULL,
|
|
557
|
+
"policies" jsonb,
|
|
558
|
+
"meta" jsonb,
|
|
559
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
560
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
561
|
+
);
|
|
562
|
+
--> statement-breakpoint
|
|
563
|
+
CREATE TABLE "workflow-instances" (
|
|
564
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
565
|
+
"tenantId" text NOT NULL,
|
|
566
|
+
"scopeId" uuid NOT NULL,
|
|
567
|
+
"workflowInstanceId" text NOT NULL,
|
|
568
|
+
"definitionId" text,
|
|
569
|
+
"mode" text NOT NULL,
|
|
570
|
+
"status" text NOT NULL,
|
|
571
|
+
"subjectType" text NOT NULL,
|
|
572
|
+
"subjectId" text NOT NULL,
|
|
573
|
+
"subjectLabel" text,
|
|
574
|
+
"subjectMeta" jsonb,
|
|
575
|
+
"input" jsonb,
|
|
576
|
+
"currentStepId" text,
|
|
577
|
+
"activeApprovalId" text,
|
|
578
|
+
"runtimeProfile" text,
|
|
579
|
+
"runRecordIds" jsonb NOT NULL,
|
|
580
|
+
"steps" jsonb NOT NULL,
|
|
581
|
+
"definitionSnapshot" jsonb,
|
|
582
|
+
"meta" jsonb,
|
|
583
|
+
"openedAt" timestamp with time zone NOT NULL,
|
|
584
|
+
"closedAt" timestamp with time zone,
|
|
585
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
586
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
587
|
+
);
|
|
588
|
+
--> statement-breakpoint
|
|
589
|
+
CREATE TABLE "workflow-step-runs" (
|
|
590
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
591
|
+
"tenantId" text NOT NULL,
|
|
592
|
+
"scopeId" uuid NOT NULL,
|
|
593
|
+
"workflowId" uuid NOT NULL,
|
|
594
|
+
"workflowInstanceId" text NOT NULL,
|
|
595
|
+
"stepId" text NOT NULL,
|
|
596
|
+
"sequence" integer NOT NULL,
|
|
597
|
+
"kind" text NOT NULL,
|
|
598
|
+
"title" text,
|
|
599
|
+
"status" text NOT NULL,
|
|
600
|
+
"agentRunId" uuid,
|
|
601
|
+
"approvalId" text,
|
|
602
|
+
"childWorkflowId" uuid,
|
|
603
|
+
"childWorkflowInstanceId" text,
|
|
604
|
+
"input" jsonb,
|
|
605
|
+
"approval" jsonb,
|
|
606
|
+
"error" jsonb,
|
|
607
|
+
"meta" jsonb,
|
|
608
|
+
"openedAt" timestamp with time zone NOT NULL,
|
|
609
|
+
"closedAt" timestamp with time zone,
|
|
610
|
+
"createdAt" timestamp with time zone DEFAULT now(),
|
|
611
|
+
"updatedAt" timestamp with time zone DEFAULT now()
|
|
612
|
+
);
|
|
613
|
+
--> statement-breakpoint
|
|
614
|
+
ALTER TABLE "agent-profiles" ADD CONSTRAINT "agent-profiles_projectId_projects_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."projects"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
|
615
|
+
ALTER TABLE "agent-run-events" ADD CONSTRAINT "agent-run-events_agentRunId_agent-runs_id_fk" FOREIGN KEY ("agentRunId") REFERENCES "public"."agent-runs"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
616
|
+
ALTER TABLE "agent-runs" ADD CONSTRAINT "agent-runs_projectId_projects_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."projects"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
|
617
|
+
ALTER TABLE "agent-runs" ADD CONSTRAINT "agent-runs_agentSessionId_agent-sessions_id_fk" FOREIGN KEY ("agentSessionId") REFERENCES "public"."agent-sessions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
618
|
+
ALTER TABLE "artifact-links" ADD CONSTRAINT "artifact-links_projectId_projects_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
619
|
+
ALTER TABLE "artifact-links" ADD CONSTRAINT "artifact-links_artifactId_artifacts_id_fk" FOREIGN KEY ("artifactId") REFERENCES "public"."artifacts"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
620
|
+
ALTER TABLE "chat-messages" ADD CONSTRAINT "chat-messages_roomId_chat-rooms_id_fk" FOREIGN KEY ("roomId") REFERENCES "public"."chat-rooms"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
621
|
+
ALTER TABLE "chat-room-bindings" ADD CONSTRAINT "chat-room-bindings_roomId_chat-rooms_id_fk" FOREIGN KEY ("roomId") REFERENCES "public"."chat-rooms"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
622
|
+
ALTER TABLE "chat-room-members" ADD CONSTRAINT "chat-room-members_roomId_chat-rooms_id_fk" FOREIGN KEY ("roomId") REFERENCES "public"."chat-rooms"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
623
|
+
ALTER TABLE "chat-rooms" ADD CONSTRAINT "chat-rooms_projectId_projects_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."projects"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
|
624
|
+
ALTER TABLE "codex-chat-messages" ADD CONSTRAINT "codex-chat-messages_projectId_projects_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
625
|
+
ALTER TABLE "codex-chat-messages" ADD CONSTRAINT "codex-chat-messages_threadId_codex-chat-threads_id_fk" FOREIGN KEY ("threadId") REFERENCES "public"."codex-chat-threads"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
626
|
+
ALTER TABLE "discussion-outputs" ADD CONSTRAINT "discussion-outputs_topicId_discussion-topics_id_fk" FOREIGN KEY ("topicId") REFERENCES "public"."discussion-topics"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
627
|
+
ALTER TABLE "discussion-topics" ADD CONSTRAINT "discussion-topics_projectId_projects_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."projects"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
|
628
|
+
ALTER TABLE "discussion-topics" ADD CONSTRAINT "discussion-topics_parentTopicId_discussion-topics_id_fk" FOREIGN KEY ("parentTopicId") REFERENCES "public"."discussion-topics"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
|
629
|
+
ALTER TABLE "discussion-turns" ADD CONSTRAINT "discussion-turns_topicId_discussion-topics_id_fk" FOREIGN KEY ("topicId") REFERENCES "public"."discussion-topics"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
630
|
+
ALTER TABLE "project-members" ADD CONSTRAINT "project-members_projectId_projects_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
631
|
+
ALTER TABLE "project-paths" ADD CONSTRAINT "project-paths_projectId_projects_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
632
|
+
ALTER TABLE "projects" ADD CONSTRAINT "projects_scopeId_scopes_id_fk" FOREIGN KEY ("scopeId") REFERENCES "public"."scopes"("id") ON DELETE restrict ON UPDATE no action;--> statement-breakpoint
|
|
633
|
+
ALTER TABLE "prompt-versions" ADD CONSTRAINT "prompt-versions_projectId_projects_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
634
|
+
ALTER TABLE "prompt-versions" ADD CONSTRAINT "prompt-versions_promptId_prompts_id_fk" FOREIGN KEY ("promptId") REFERENCES "public"."prompts"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
635
|
+
ALTER TABLE "skill-versions" ADD CONSTRAINT "skill-versions_projectId_projects_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
636
|
+
ALTER TABLE "skill-versions" ADD CONSTRAINT "skill-versions_skillId_skills_id_fk" FOREIGN KEY ("skillId") REFERENCES "public"."skills"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
637
|
+
ALTER TABLE "workflow-step-runs" ADD CONSTRAINT "workflow-step-runs_workflowId_workflow-instances_id_fk" FOREIGN KEY ("workflowId") REFERENCES "public"."workflow-instances"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
638
|
+
ALTER TABLE "workflow-step-runs" ADD CONSTRAINT "workflow-step-runs_agentRunId_agent-runs_id_fk" FOREIGN KEY ("agentRunId") REFERENCES "public"."agent-runs"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
|
639
|
+
ALTER TABLE "workflow-step-runs" ADD CONSTRAINT "workflow-step-runs_childWorkflowId_workflow-instances_id_fk" FOREIGN KEY ("childWorkflowId") REFERENCES "public"."workflow-instances"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
|
640
|
+
CREATE INDEX "activity_item_idx_scope_created" ON "activity-items" USING btree ("tenantId","scopeId","createdAt");--> statement-breakpoint
|
|
641
|
+
CREATE INDEX "activity_item_idx_project_created" ON "activity-items" USING btree ("tenantId","projectId","createdAt");--> statement-breakpoint
|
|
642
|
+
CREATE INDEX "activity_item_idx_source_kind_created" ON "activity-items" USING btree ("tenantId","sourceKind","createdAt");--> statement-breakpoint
|
|
643
|
+
CREATE UNIQUE INDEX "agent_profile_tenant_scope_slug_unique" ON "agent-profiles" USING btree ("tenantId","scopeId","slug");--> statement-breakpoint
|
|
644
|
+
CREATE INDEX "agent_profile_idx_tenant" ON "agent-profiles" USING btree ("tenantId");--> statement-breakpoint
|
|
645
|
+
CREATE INDEX "agent_profile_idx_scope_role" ON "agent-profiles" USING btree ("tenantId","scopeId","role");--> statement-breakpoint
|
|
646
|
+
CREATE INDEX "agent_profile_idx_scope_updated" ON "agent-profiles" USING btree ("tenantId","scopeId","updatedAt");--> statement-breakpoint
|
|
647
|
+
CREATE UNIQUE INDEX "agent_run_event_unique_run_sequence" ON "agent-run-events" USING btree ("tenantId","agentRunId","sequence");--> statement-breakpoint
|
|
648
|
+
CREATE INDEX "agent_run_event_idx_scope_emitted" ON "agent-run-events" USING btree ("tenantId","scopeId","emittedAt");--> statement-breakpoint
|
|
649
|
+
CREATE INDEX "agent_run_event_idx_run_id" ON "agent-run-events" USING btree ("tenantId","runId");--> statement-breakpoint
|
|
650
|
+
CREATE INDEX "agent_run_event_idx_type" ON "agent-run-events" USING btree ("tenantId","eventType");--> statement-breakpoint
|
|
651
|
+
CREATE INDEX "agent_run_idx_tenant" ON "agent-runs" USING btree ("tenantId");--> statement-breakpoint
|
|
652
|
+
CREATE INDEX "agent_run_idx_scope" ON "agent-runs" USING btree ("tenantId","scopeId");--> statement-breakpoint
|
|
653
|
+
CREATE INDEX "agent_run_idx_session_started" ON "agent-runs" USING btree ("tenantId","agentSessionId","startedAt");--> statement-breakpoint
|
|
654
|
+
CREATE INDEX "agent_run_idx_task_started" ON "agent-runs" USING btree ("tenantId","taskId","startedAt");--> statement-breakpoint
|
|
655
|
+
CREATE INDEX "agent_run_idx_project" ON "agent-runs" USING btree ("tenantId","projectId");--> statement-breakpoint
|
|
656
|
+
CREATE INDEX "agent_session_idx_tenant" ON "agent-sessions" USING btree ("tenantId");--> statement-breakpoint
|
|
657
|
+
CREATE INDEX "agent_session_idx_scope" ON "agent-sessions" USING btree ("tenantId","scopeId");--> statement-breakpoint
|
|
658
|
+
CREATE INDEX "agent_session_idx_mission" ON "agent-sessions" USING btree ("tenantId","missionId");--> statement-breakpoint
|
|
659
|
+
CREATE INDEX "agent_session_idx_scope_started" ON "agent-sessions" USING btree ("tenantId","scopeId","startedAt");--> statement-breakpoint
|
|
660
|
+
CREATE INDEX "artifact_link_idx_tenant" ON "artifact-links" USING btree ("tenantId");--> statement-breakpoint
|
|
661
|
+
CREATE INDEX "artifact_link_idx_artifact" ON "artifact-links" USING btree ("tenantId","artifactId");--> statement-breakpoint
|
|
662
|
+
CREATE INDEX "artifact_link_idx_project_ref_created" ON "artifact-links" USING btree ("tenantId","projectId","refType","refId","createdAt");--> statement-breakpoint
|
|
663
|
+
CREATE INDEX "artifact_idx_tenant" ON "artifacts" USING btree ("tenantId");--> statement-breakpoint
|
|
664
|
+
CREATE INDEX "artifact_idx_scope_created" ON "artifacts" USING btree ("tenantId","scopeId","createdAt");--> statement-breakpoint
|
|
665
|
+
CREATE UNIQUE INDEX "chat_message_tenant_room_seq_unique" ON "chat-messages" USING btree ("tenantId","roomId","seq");--> statement-breakpoint
|
|
666
|
+
CREATE UNIQUE INDEX "chat_message_tenant_room_idempotency_unique" ON "chat-messages" USING btree ("tenantId","roomId","idempotencyKey");--> statement-breakpoint
|
|
667
|
+
CREATE INDEX "chat_message_idx_tenant" ON "chat-messages" USING btree ("tenantId");--> statement-breakpoint
|
|
668
|
+
CREATE INDEX "chat_message_idx_room_seq" ON "chat-messages" USING btree ("tenantId","roomId","seq");--> statement-breakpoint
|
|
669
|
+
CREATE INDEX "chat_message_idx_room_created" ON "chat-messages" USING btree ("tenantId","roomId","createdAt");--> statement-breakpoint
|
|
670
|
+
CREATE INDEX "chat_message_idx_scope_created" ON "chat-messages" USING btree ("tenantId","scopeId","createdAt");--> statement-breakpoint
|
|
671
|
+
CREATE INDEX "chat_message_idx_author_created" ON "chat-messages" USING btree ("tenantId","authorAgentId","createdAt");--> statement-breakpoint
|
|
672
|
+
CREATE INDEX "chat_room_binding_idx_tenant" ON "chat-room-bindings" USING btree ("tenantId");--> statement-breakpoint
|
|
673
|
+
CREATE INDEX "chat_room_binding_idx_room_type" ON "chat-room-bindings" USING btree ("tenantId","roomId","bindingType");--> statement-breakpoint
|
|
674
|
+
CREATE INDEX "chat_room_binding_idx_scope_type" ON "chat-room-bindings" USING btree ("tenantId","scopeId","bindingType");--> statement-breakpoint
|
|
675
|
+
CREATE UNIQUE INDEX "chat_room_member_tenant_room_agent_unique" ON "chat-room-members" USING btree ("tenantId","roomId","agentId");--> statement-breakpoint
|
|
676
|
+
CREATE INDEX "chat_room_member_idx_tenant" ON "chat-room-members" USING btree ("tenantId");--> statement-breakpoint
|
|
677
|
+
CREATE INDEX "chat_room_member_idx_room_status" ON "chat-room-members" USING btree ("tenantId","roomId","status");--> statement-breakpoint
|
|
678
|
+
CREATE INDEX "chat_room_member_idx_scope_agent" ON "chat-room-members" USING btree ("tenantId","scopeId","agentId","status");--> statement-breakpoint
|
|
679
|
+
CREATE UNIQUE INDEX "chat_room_tenant_scope_slug_unique" ON "chat-rooms" USING btree ("tenantId","scopeId","slug");--> statement-breakpoint
|
|
680
|
+
CREATE UNIQUE INDEX "chat_room_tenant_scope_dm_key_unique" ON "chat-rooms" USING btree ("tenantId","scopeId","dmKey");--> statement-breakpoint
|
|
681
|
+
CREATE INDEX "chat_room_idx_tenant" ON "chat-rooms" USING btree ("tenantId");--> statement-breakpoint
|
|
682
|
+
CREATE INDEX "chat_room_idx_scope_updated" ON "chat-rooms" USING btree ("tenantId","scopeId","updatedAt");--> statement-breakpoint
|
|
683
|
+
CREATE INDEX "chat_room_idx_project_updated" ON "chat-rooms" USING btree ("tenantId","projectId","updatedAt");--> statement-breakpoint
|
|
684
|
+
CREATE INDEX "chat_room_idx_scope_last_message" ON "chat-rooms" USING btree ("tenantId","scopeId","lastMessageAt");--> statement-breakpoint
|
|
685
|
+
CREATE UNIQUE INDEX "codex_chat_message_tenant_thread_seq_unique" ON "codex-chat-messages" USING btree ("tenantId","threadId","seq");--> statement-breakpoint
|
|
686
|
+
CREATE INDEX "codex_chat_message_idx_tenant" ON "codex-chat-messages" USING btree ("tenantId");--> statement-breakpoint
|
|
687
|
+
CREATE INDEX "codex_chat_message_idx_thread_messageat" ON "codex-chat-messages" USING btree ("tenantId","threadId","messageAt");--> statement-breakpoint
|
|
688
|
+
CREATE INDEX "codex_chat_message_idx_project_messageat" ON "codex-chat-messages" USING btree ("tenantId","projectId","messageAt");--> statement-breakpoint
|
|
689
|
+
CREATE UNIQUE INDEX "codex_chat_setting_tenant_project_user_unique" ON "codex-chat-settings" USING btree ("tenantId","projectId","userId");--> statement-breakpoint
|
|
690
|
+
CREATE INDEX "codex_chat_setting_idx_tenant" ON "codex-chat-settings" USING btree ("tenantId");--> statement-breakpoint
|
|
691
|
+
CREATE INDEX "codex_chat_setting_idx_project_user" ON "codex-chat-settings" USING btree ("tenantId","projectId","userId");--> statement-breakpoint
|
|
692
|
+
CREATE UNIQUE INDEX "codex_chat_thread_tenant_scope_external_unique" ON "codex-chat-threads" USING btree ("tenantId","scopeId","externalThreadId");--> statement-breakpoint
|
|
693
|
+
CREATE INDEX "codex_chat_thread_idx_tenant" ON "codex-chat-threads" USING btree ("tenantId");--> statement-breakpoint
|
|
694
|
+
CREATE INDEX "codex_chat_thread_idx_scope_updated" ON "codex-chat-threads" USING btree ("tenantId","scopeId","updatedAt");--> statement-breakpoint
|
|
695
|
+
CREATE UNIQUE INDEX "discussion_output_tenant_topic_kind_unique" ON "discussion-outputs" USING btree ("tenantId","topicId","outputKind");--> statement-breakpoint
|
|
696
|
+
CREATE INDEX "discussion_output_idx_tenant" ON "discussion-outputs" USING btree ("tenantId");--> statement-breakpoint
|
|
697
|
+
CREATE INDEX "discussion_output_idx_topic" ON "discussion-outputs" USING btree ("tenantId","topicId");--> statement-breakpoint
|
|
698
|
+
CREATE UNIQUE INDEX "discussion_topic_tenant_scope_slug_unique" ON "discussion-topics" USING btree ("tenantId","scopeId","slug");--> statement-breakpoint
|
|
699
|
+
CREATE INDEX "discussion_topic_idx_tenant" ON "discussion-topics" USING btree ("tenantId");--> statement-breakpoint
|
|
700
|
+
CREATE INDEX "discussion_topic_idx_scope_updated" ON "discussion-topics" USING btree ("tenantId","scopeId","updatedAt");--> statement-breakpoint
|
|
701
|
+
CREATE INDEX "discussion_topic_idx_project_updated" ON "discussion-topics" USING btree ("tenantId","projectId","updatedAt");--> statement-breakpoint
|
|
702
|
+
CREATE INDEX "discussion_topic_idx_scope_status" ON "discussion-topics" USING btree ("tenantId","scopeId","status");--> statement-breakpoint
|
|
703
|
+
CREATE INDEX "discussion_topic_idx_tenant_parent" ON "discussion-topics" USING btree ("tenantId","parentTopicId");--> statement-breakpoint
|
|
704
|
+
CREATE UNIQUE INDEX "discussion_turn_tenant_topic_seq_unique" ON "discussion-turns" USING btree ("tenantId","topicId","seq");--> statement-breakpoint
|
|
705
|
+
CREATE UNIQUE INDEX "discussion_turn_tenant_topic_idempotency_unique" ON "discussion-turns" USING btree ("tenantId","topicId","idempotencyKey");--> statement-breakpoint
|
|
706
|
+
CREATE INDEX "discussion_turn_idx_tenant" ON "discussion-turns" USING btree ("tenantId");--> statement-breakpoint
|
|
707
|
+
CREATE INDEX "discussion_turn_idx_topic_seq" ON "discussion-turns" USING btree ("tenantId","topicId","seq");--> statement-breakpoint
|
|
708
|
+
CREATE INDEX "discussion_turn_idx_topic_created" ON "discussion-turns" USING btree ("tenantId","topicId","createdAt");--> statement-breakpoint
|
|
709
|
+
CREATE INDEX "experience_item_idx_tenant" ON "experience-items" USING btree ("tenantId");--> statement-breakpoint
|
|
710
|
+
CREATE INDEX "experience_item_idx_scope" ON "experience-items" USING btree ("tenantId","scopeId");--> statement-breakpoint
|
|
711
|
+
CREATE INDEX "experience_item_idx_type" ON "experience-items" USING btree ("tenantId","type");--> statement-breakpoint
|
|
712
|
+
CREATE INDEX "memory_item_idx_tenant" ON "memory-items" USING btree ("tenantId");--> statement-breakpoint
|
|
713
|
+
CREATE INDEX "memory_item_idx_scope" ON "memory-items" USING btree ("tenantId","scopeId");--> statement-breakpoint
|
|
714
|
+
CREATE INDEX "memory_item_idx_kind" ON "memory-items" USING btree ("tenantId","kind");--> statement-breakpoint
|
|
715
|
+
CREATE INDEX "memory_item_idx_durability" ON "memory-items" USING btree ("tenantId","durability");--> statement-breakpoint
|
|
716
|
+
CREATE UNIQUE INDEX "mission_scope_slug_unique" ON "missions" USING btree ("tenantId","scopeId","slug");--> statement-breakpoint
|
|
717
|
+
CREATE INDEX "mission_idx_tenant" ON "missions" USING btree ("tenantId");--> statement-breakpoint
|
|
718
|
+
CREATE INDEX "mission_idx_scope" ON "missions" USING btree ("tenantId","scopeId");--> statement-breakpoint
|
|
719
|
+
CREATE INDEX "mission_idx_status" ON "missions" USING btree ("tenantId","scopeId","status");--> statement-breakpoint
|
|
720
|
+
CREATE UNIQUE INDEX "project_member_unique_user" ON "project-members" USING btree ("tenantId","projectId","userId");--> statement-breakpoint
|
|
721
|
+
CREATE INDEX "project_member_idx_tenant" ON "project-members" USING btree ("tenantId");--> statement-breakpoint
|
|
722
|
+
CREATE INDEX "project_member_idx_project" ON "project-members" USING btree ("tenantId","projectId");--> statement-breakpoint
|
|
723
|
+
CREATE INDEX "project_member_idx_user" ON "project-members" USING btree ("tenantId","userId");--> statement-breakpoint
|
|
724
|
+
CREATE UNIQUE INDEX "project_path_unique_key" ON "project-paths" USING btree ("tenantId","projectId","pathKey");--> statement-breakpoint
|
|
725
|
+
CREATE INDEX "project_path_idx_tenant" ON "project-paths" USING btree ("tenantId");--> statement-breakpoint
|
|
726
|
+
CREATE INDEX "project_path_idx_project" ON "project-paths" USING btree ("tenantId","projectId");--> statement-breakpoint
|
|
727
|
+
CREATE UNIQUE INDEX "project_scope_unique" ON "projects" USING btree ("scopeId");--> statement-breakpoint
|
|
728
|
+
CREATE UNIQUE INDEX "project_slug_tenant_unique" ON "projects" USING btree ("tenantId","slug");--> statement-breakpoint
|
|
729
|
+
CREATE INDEX "project_idx_tenant" ON "projects" USING btree ("tenantId");--> statement-breakpoint
|
|
730
|
+
CREATE UNIQUE INDEX "prompt_scope_name_tenant_unique" ON "prompts" USING btree ("tenantId","scopeId","name");--> statement-breakpoint
|
|
731
|
+
CREATE INDEX "prompt_idx_tenant" ON "prompts" USING btree ("tenantId");--> statement-breakpoint
|
|
732
|
+
CREATE INDEX "prompt_idx_scope" ON "prompts" USING btree ("tenantId","scopeId");--> statement-breakpoint
|
|
733
|
+
CREATE UNIQUE INDEX "prompt_version_unique" ON "prompt-versions" USING btree ("tenantId","promptId","version");--> statement-breakpoint
|
|
734
|
+
CREATE INDEX "prompt_version_idx_tenant" ON "prompt-versions" USING btree ("tenantId");--> statement-breakpoint
|
|
735
|
+
CREATE INDEX "prompt_version_idx_project" ON "prompt-versions" USING btree ("tenantId","projectId");--> statement-breakpoint
|
|
736
|
+
CREATE INDEX "prompt_version_idx_prompt" ON "prompt-versions" USING btree ("tenantId","promptId");--> statement-breakpoint
|
|
737
|
+
CREATE UNIQUE INDEX "resource_scope_ref_unique" ON "resources" USING btree ("tenantId","scopeId","refType","refId");--> statement-breakpoint
|
|
738
|
+
CREATE INDEX "resource_idx_tenant" ON "resources" USING btree ("tenantId");--> statement-breakpoint
|
|
739
|
+
CREATE INDEX "resource_idx_scope" ON "resources" USING btree ("tenantId","scopeId");--> statement-breakpoint
|
|
740
|
+
CREATE INDEX "scope_idx_tenant" ON "scopes" USING btree ("tenantId");--> statement-breakpoint
|
|
741
|
+
CREATE INDEX "scope_idx_parent" ON "scopes" USING btree ("tenantId","parentScopeId");--> statement-breakpoint
|
|
742
|
+
CREATE UNIQUE INDEX "skill_scope_name_tenant_unique" ON "skills" USING btree ("tenantId","scopeId","name");--> statement-breakpoint
|
|
743
|
+
CREATE INDEX "skill_idx_tenant" ON "skills" USING btree ("tenantId");--> statement-breakpoint
|
|
744
|
+
CREATE INDEX "skill_idx_scope" ON "skills" USING btree ("tenantId","scopeId");--> statement-breakpoint
|
|
745
|
+
CREATE UNIQUE INDEX "skill_version_unique" ON "skill-versions" USING btree ("tenantId","skillId","version");--> statement-breakpoint
|
|
746
|
+
CREATE INDEX "skill_version_idx_tenant" ON "skill-versions" USING btree ("tenantId");--> statement-breakpoint
|
|
747
|
+
CREATE INDEX "skill_version_idx_project" ON "skill-versions" USING btree ("tenantId","projectId");--> statement-breakpoint
|
|
748
|
+
CREATE INDEX "skill_version_idx_skill" ON "skill-versions" USING btree ("tenantId","skillId");--> statement-breakpoint
|
|
749
|
+
CREATE UNIQUE INDEX "tag_scope_name_tenant_unique" ON "tags" USING btree ("tenantId","scopeId","scopeType","name");--> statement-breakpoint
|
|
750
|
+
CREATE INDEX "tag_idx_tenant" ON "tags" USING btree ("tenantId");--> statement-breakpoint
|
|
751
|
+
CREATE INDEX "tag_idx_scope" ON "tags" USING btree ("tenantId","scopeId");--> statement-breakpoint
|
|
752
|
+
CREATE INDEX "tag_idx_target_type" ON "tags" USING btree ("tenantId","scopeType");--> statement-breakpoint
|
|
753
|
+
CREATE UNIQUE INDEX "workflow_definition_unique_definition_id" ON "workflow-definitions" USING btree ("tenantId","scopeId","definitionId");--> statement-breakpoint
|
|
754
|
+
CREATE INDEX "workflow_definition_idx_scope_mode" ON "workflow-definitions" USING btree ("tenantId","scopeId","mode");--> statement-breakpoint
|
|
755
|
+
CREATE INDEX "workflow_definition_idx_scope_subject" ON "workflow-definitions" USING btree ("tenantId","scopeId","subjectType");--> statement-breakpoint
|
|
756
|
+
CREATE UNIQUE INDEX "workflow_instance_unique_instance_id" ON "workflow-instances" USING btree ("tenantId","scopeId","workflowInstanceId");--> statement-breakpoint
|
|
757
|
+
CREATE INDEX "workflow_instance_idx_scope_status" ON "workflow-instances" USING btree ("tenantId","scopeId","status");--> statement-breakpoint
|
|
758
|
+
CREATE INDEX "workflow_instance_idx_subject" ON "workflow-instances" USING btree ("tenantId","subjectType","subjectId");--> statement-breakpoint
|
|
759
|
+
CREATE UNIQUE INDEX "workflow_step_run_unique_sequence" ON "workflow-step-runs" USING btree ("tenantId","workflowId","sequence");--> statement-breakpoint
|
|
760
|
+
CREATE INDEX "workflow_step_run_idx_scope" ON "workflow-step-runs" USING btree ("tenantId","scopeId");--> statement-breakpoint
|
|
761
|
+
CREATE INDEX "workflow_step_run_idx_workflow_step" ON "workflow-step-runs" USING btree ("tenantId","workflowId","stepId");--> statement-breakpoint
|
|
762
|
+
CREATE INDEX "workflow_step_run_idx_instance" ON "workflow-step-runs" USING btree ("tenantId","workflowInstanceId");--> statement-breakpoint
|
|
763
|
+
CREATE INDEX "workflow_step_run_idx_agent_run" ON "workflow-step-runs" USING btree ("tenantId","agentRunId");--> statement-breakpoint
|
|
764
|
+
CREATE INDEX "workflow_step_run_idx_child_workflow" ON "workflow-step-runs" USING btree ("tenantId","childWorkflowId");
|