@orthacms/copilot-server 0.0.0-reserve.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 +21 -0
- package/README.md +7 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +48 -0
- package/dist/lib/chat/application/appliers-registrar.d.ts +16 -0
- package/dist/lib/chat/application/appliers-registrar.d.ts.map +1 -0
- package/dist/lib/chat/application/appliers-registrar.js +50 -0
- package/dist/lib/chat/application/capability-profile.service.d.ts +43 -0
- package/dist/lib/chat/application/capability-profile.service.d.ts.map +1 -0
- package/dist/lib/chat/application/capability-profile.service.js +75 -0
- package/dist/lib/chat/application/content-type-summary.service.d.ts +32 -0
- package/dist/lib/chat/application/content-type-summary.service.d.ts.map +1 -0
- package/dist/lib/chat/application/content-type-summary.service.js +64 -0
- package/dist/lib/chat/application/decide-proposal.service.d.ts +80 -0
- package/dist/lib/chat/application/decide-proposal.service.d.ts.map +1 -0
- package/dist/lib/chat/application/decide-proposal.service.js +112 -0
- package/dist/lib/chat/application/dto/create-run.dto.d.ts +138 -0
- package/dist/lib/chat/application/dto/create-run.dto.d.ts.map +1 -0
- package/dist/lib/chat/application/dto/create-run.dto.js +253 -0
- package/dist/lib/chat/application/dto/decide-tool-permission.dto.d.ts +20 -0
- package/dist/lib/chat/application/dto/decide-tool-permission.dto.d.ts.map +1 -0
- package/dist/lib/chat/application/dto/decide-tool-permission.dto.js +44 -0
- package/dist/lib/chat/application/dto/extend-tool-permission.dto.d.ts +18 -0
- package/dist/lib/chat/application/dto/extend-tool-permission.dto.d.ts.map +1 -0
- package/dist/lib/chat/application/dto/extend-tool-permission.dto.js +33 -0
- package/dist/lib/chat/application/dto/list-conversations-query.dto.d.ts +18 -0
- package/dist/lib/chat/application/dto/list-conversations-query.dto.d.ts.map +1 -0
- package/dist/lib/chat/application/dto/list-conversations-query.dto.js +39 -0
- package/dist/lib/chat/application/dto/list-proposals-query.dto.d.ts +15 -0
- package/dist/lib/chat/application/dto/list-proposals-query.dto.d.ts.map +1 -0
- package/dist/lib/chat/application/dto/list-proposals-query.dto.js +41 -0
- package/dist/lib/chat/application/dto/update-conversation.dto.d.ts +68 -0
- package/dist/lib/chat/application/dto/update-conversation.dto.d.ts.map +1 -0
- package/dist/lib/chat/application/dto/update-conversation.dto.js +115 -0
- package/dist/lib/chat/application/proposal-applier.registry.d.ts +27 -0
- package/dist/lib/chat/application/proposal-applier.registry.d.ts.map +1 -0
- package/dist/lib/chat/application/proposal-applier.registry.js +62 -0
- package/dist/lib/chat/application/run-engine.service.d.ts +243 -0
- package/dist/lib/chat/application/run-engine.service.d.ts.map +1 -0
- package/dist/lib/chat/application/run-engine.service.js +1058 -0
- package/dist/lib/chat/application/summarize-tool-output.d.ts +15 -0
- package/dist/lib/chat/application/summarize-tool-output.d.ts.map +1 -0
- package/dist/lib/chat/application/summarize-tool-output.js +61 -0
- package/dist/lib/chat/application/system-prompt.d.ts +81 -0
- package/dist/lib/chat/application/system-prompt.d.ts.map +1 -0
- package/dist/lib/chat/application/system-prompt.js +477 -0
- package/dist/lib/chat/application/tool-permission.broker.d.ts +118 -0
- package/dist/lib/chat/application/tool-permission.broker.d.ts.map +1 -0
- package/dist/lib/chat/application/tool-permission.broker.js +221 -0
- package/dist/lib/chat/http/controllers/create-run.controller.d.ts +30 -0
- package/dist/lib/chat/http/controllers/create-run.controller.d.ts.map +1 -0
- package/dist/lib/chat/http/controllers/create-run.controller.js +159 -0
- package/dist/lib/chat/http/controllers/get-conversation.controller.d.ts +22 -0
- package/dist/lib/chat/http/controllers/get-conversation.controller.d.ts.map +1 -0
- package/dist/lib/chat/http/controllers/get-conversation.controller.js +50 -0
- package/dist/lib/chat/http/controllers/list-conversations.controller.d.ts +20 -0
- package/dist/lib/chat/http/controllers/list-conversations.controller.d.ts.map +1 -0
- package/dist/lib/chat/http/controllers/list-conversations.controller.js +47 -0
- package/dist/lib/chat/http/controllers/list-models.controller.d.ts +35 -0
- package/dist/lib/chat/http/controllers/list-models.controller.d.ts.map +1 -0
- package/dist/lib/chat/http/controllers/list-models.controller.js +48 -0
- package/dist/lib/chat/http/controllers/proposals.controller.d.ts +43 -0
- package/dist/lib/chat/http/controllers/proposals.controller.d.ts.map +1 -0
- package/dist/lib/chat/http/controllers/proposals.controller.js +98 -0
- package/dist/lib/chat/http/controllers/tool-permission.controller.d.ts +57 -0
- package/dist/lib/chat/http/controllers/tool-permission.controller.d.ts.map +1 -0
- package/dist/lib/chat/http/controllers/tool-permission.controller.js +116 -0
- package/dist/lib/chat/http/controllers/update-conversation.controller.d.ts +37 -0
- package/dist/lib/chat/http/controllers/update-conversation.controller.d.ts.map +1 -0
- package/dist/lib/chat/http/controllers/update-conversation.controller.js +108 -0
- package/dist/lib/chat/http/sse-stream.d.ts +41 -0
- package/dist/lib/chat/http/sse-stream.d.ts.map +1 -0
- package/dist/lib/chat/http/sse-stream.js +95 -0
- package/dist/lib/chat/infrastructure/persistence/conversation.repository.d.ts +159 -0
- package/dist/lib/chat/infrastructure/persistence/conversation.repository.d.ts.map +1 -0
- package/dist/lib/chat/infrastructure/persistence/conversation.repository.js +249 -0
- package/dist/lib/chat/infrastructure/persistence/derive-title.d.ts +13 -0
- package/dist/lib/chat/infrastructure/persistence/derive-title.d.ts.map +1 -0
- package/dist/lib/chat/infrastructure/persistence/derive-title.js +35 -0
- package/dist/lib/chat/infrastructure/persistence/proposal.repository.d.ts +86 -0
- package/dist/lib/chat/infrastructure/persistence/proposal.repository.d.ts.map +1 -0
- package/dist/lib/chat/infrastructure/persistence/proposal.repository.js +152 -0
- package/dist/lib/chat/infrastructure/schema/conversations.d.ts +189 -0
- package/dist/lib/chat/infrastructure/schema/conversations.d.ts.map +1 -0
- package/dist/lib/chat/infrastructure/schema/conversations.js +100 -0
- package/dist/lib/chat/infrastructure/schema/external-refs.d.ts +67 -0
- package/dist/lib/chat/infrastructure/schema/external-refs.d.ts.map +1 -0
- package/dist/lib/chat/infrastructure/schema/external-refs.js +28 -0
- package/dist/lib/chat/infrastructure/schema/index.d.ts +5 -0
- package/dist/lib/chat/infrastructure/schema/index.d.ts.map +1 -0
- package/dist/lib/chat/infrastructure/schema/index.js +12 -0
- package/dist/lib/chat/infrastructure/schema/messages.d.ts +264 -0
- package/dist/lib/chat/infrastructure/schema/messages.d.ts.map +1 -0
- package/dist/lib/chat/infrastructure/schema/messages.js +96 -0
- package/dist/lib/chat/infrastructure/schema/proposals.d.ts +328 -0
- package/dist/lib/chat/infrastructure/schema/proposals.d.ts.map +1 -0
- package/dist/lib/chat/infrastructure/schema/proposals.js +87 -0
- package/dist/lib/chat/infrastructure/schema/tool-calls.d.ts +203 -0
- package/dist/lib/chat/infrastructure/schema/tool-calls.d.ts.map +1 -0
- package/dist/lib/chat/infrastructure/schema/tool-calls.js +50 -0
- package/dist/lib/copilot.module.d.ts +30 -0
- package/dist/lib/copilot.module.d.ts.map +1 -0
- package/dist/lib/copilot.module.js +146 -0
- package/dist/lib/copilot.tokens.d.ts +34 -0
- package/dist/lib/copilot.tokens.d.ts.map +1 -0
- package/dist/lib/copilot.tokens.js +38 -0
- package/dist/lib/infrastructure/model-registry.d.ts +22 -0
- package/dist/lib/infrastructure/model-registry.d.ts.map +1 -0
- package/dist/lib/infrastructure/model-registry.js +54 -0
- package/dist/lib/skills/application/dto/create-skill.dto.d.ts +36 -0
- package/dist/lib/skills/application/dto/create-skill.dto.d.ts.map +1 -0
- package/dist/lib/skills/application/dto/create-skill.dto.js +106 -0
- package/dist/lib/skills/application/dto/update-skill.dto.d.ts +28 -0
- package/dist/lib/skills/application/dto/update-skill.dto.d.ts.map +1 -0
- package/dist/lib/skills/application/dto/update-skill.dto.js +96 -0
- package/dist/lib/skills/application/skill-catalog.service.d.ts +97 -0
- package/dist/lib/skills/application/skill-catalog.service.d.ts.map +1 -0
- package/dist/lib/skills/application/skill-catalog.service.js +157 -0
- package/dist/lib/skills/http/controllers/list-skills.controller.d.ts +19 -0
- package/dist/lib/skills/http/controllers/list-skills.controller.d.ts.map +1 -0
- package/dist/lib/skills/http/controllers/list-skills.controller.js +50 -0
- package/dist/lib/skills/http/controllers/manage-skills.controller.d.ts +64 -0
- package/dist/lib/skills/http/controllers/manage-skills.controller.d.ts.map +1 -0
- package/dist/lib/skills/http/controllers/manage-skills.controller.js +182 -0
- package/dist/lib/skills/infrastructure/persistence/skill.repository.d.ts +78 -0
- package/dist/lib/skills/infrastructure/persistence/skill.repository.d.ts.map +1 -0
- package/dist/lib/skills/infrastructure/persistence/skill.repository.js +116 -0
- package/dist/lib/skills/infrastructure/schema/index.d.ts +2 -0
- package/dist/lib/skills/infrastructure/schema/index.d.ts.map +1 -0
- package/dist/lib/skills/infrastructure/schema/index.js +6 -0
- package/dist/lib/skills/infrastructure/schema/skills.d.ts +212 -0
- package/dist/lib/skills/infrastructure/schema/skills.d.ts.map +1 -0
- package/dist/lib/skills/infrastructure/schema/skills.js +78 -0
- package/dist/lib/types/copilot-config.d.ts +55 -0
- package/dist/lib/types/copilot-config.d.ts.map +1 -0
- package/dist/lib/types/copilot-config.js +2 -0
- package/dist/lib/utils/copilot-plugin.d.ts +66 -0
- package/dist/lib/utils/copilot-plugin.d.ts.map +1 -0
- package/dist/lib/utils/copilot-plugin.js +87 -0
- package/migrations/0000_copilot_chat.sql +48 -0
- package/migrations/0001_proposals.sql +34 -0
- package/migrations/0002_drop_workspace_policies.sql +1 -0
- package/migrations/0003_conversation_allowed_tools.sql +1 -0
- package/migrations/0004_message_attachments.sql +1 -0
- package/migrations/0005_skills.sql +19 -0
- package/migrations/0006_conversation_model_choice.sql +1 -0
- package/migrations/meta/0000_snapshot.json +390 -0
- package/migrations/meta/0001_snapshot.json +657 -0
- package/migrations/meta/0002_snapshot.json +610 -0
- package/migrations/meta/0003_snapshot.json +617 -0
- package/migrations/meta/0004_snapshot.json +623 -0
- package/migrations/meta/0005_snapshot.json +771 -0
- package/migrations/meta/0006_snapshot.json +777 -0
- package/migrations/meta/_journal.json +55 -0
- package/package.json +46 -0
|
@@ -0,0 +1,771 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "2e71fa31-0732-49f0-addf-85a5784fe2d8",
|
|
3
|
+
"prevId": "98a30ab0-4d86-4ccd-ab7f-bacdecd2d5f0",
|
|
4
|
+
"version": "7",
|
|
5
|
+
"dialect": "postgresql",
|
|
6
|
+
"tables": {
|
|
7
|
+
"public.copilot_conversations": {
|
|
8
|
+
"name": "copilot_conversations",
|
|
9
|
+
"schema": "",
|
|
10
|
+
"columns": {
|
|
11
|
+
"id": {
|
|
12
|
+
"name": "id",
|
|
13
|
+
"type": "uuid",
|
|
14
|
+
"primaryKey": true,
|
|
15
|
+
"notNull": true,
|
|
16
|
+
"default": "gen_random_uuid()"
|
|
17
|
+
},
|
|
18
|
+
"user_id": {
|
|
19
|
+
"name": "user_id",
|
|
20
|
+
"type": "uuid",
|
|
21
|
+
"primaryKey": false,
|
|
22
|
+
"notNull": true
|
|
23
|
+
},
|
|
24
|
+
"workspace_id": {
|
|
25
|
+
"name": "workspace_id",
|
|
26
|
+
"type": "uuid",
|
|
27
|
+
"primaryKey": false,
|
|
28
|
+
"notNull": true
|
|
29
|
+
},
|
|
30
|
+
"title": {
|
|
31
|
+
"name": "title",
|
|
32
|
+
"type": "text",
|
|
33
|
+
"primaryKey": false,
|
|
34
|
+
"notNull": false
|
|
35
|
+
},
|
|
36
|
+
"surface": {
|
|
37
|
+
"name": "surface",
|
|
38
|
+
"type": "text",
|
|
39
|
+
"primaryKey": false,
|
|
40
|
+
"notNull": true,
|
|
41
|
+
"default": "'chat'"
|
|
42
|
+
},
|
|
43
|
+
"archived": {
|
|
44
|
+
"name": "archived",
|
|
45
|
+
"type": "boolean",
|
|
46
|
+
"primaryKey": false,
|
|
47
|
+
"notNull": true,
|
|
48
|
+
"default": false
|
|
49
|
+
},
|
|
50
|
+
"allowed_tools": {
|
|
51
|
+
"name": "allowed_tools",
|
|
52
|
+
"type": "jsonb",
|
|
53
|
+
"primaryKey": false,
|
|
54
|
+
"notNull": true,
|
|
55
|
+
"default": "'[]'::jsonb"
|
|
56
|
+
},
|
|
57
|
+
"created_at": {
|
|
58
|
+
"name": "created_at",
|
|
59
|
+
"type": "timestamp with time zone",
|
|
60
|
+
"primaryKey": false,
|
|
61
|
+
"notNull": true,
|
|
62
|
+
"default": "now()"
|
|
63
|
+
},
|
|
64
|
+
"updated_at": {
|
|
65
|
+
"name": "updated_at",
|
|
66
|
+
"type": "timestamp with time zone",
|
|
67
|
+
"primaryKey": false,
|
|
68
|
+
"notNull": true,
|
|
69
|
+
"default": "now()"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"indexes": {
|
|
73
|
+
"copilot_conversations_owner_idx": {
|
|
74
|
+
"name": "copilot_conversations_owner_idx",
|
|
75
|
+
"columns": [
|
|
76
|
+
{
|
|
77
|
+
"expression": "user_id",
|
|
78
|
+
"isExpression": false,
|
|
79
|
+
"asc": true,
|
|
80
|
+
"nulls": "last"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"expression": "workspace_id",
|
|
84
|
+
"isExpression": false,
|
|
85
|
+
"asc": true,
|
|
86
|
+
"nulls": "last"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"expression": "updated_at",
|
|
90
|
+
"isExpression": false,
|
|
91
|
+
"asc": true,
|
|
92
|
+
"nulls": "last"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"isUnique": false,
|
|
96
|
+
"concurrently": false,
|
|
97
|
+
"method": "btree",
|
|
98
|
+
"with": {}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"foreignKeys": {
|
|
102
|
+
"copilot_conversations_user_id_users_id_fk": {
|
|
103
|
+
"name": "copilot_conversations_user_id_users_id_fk",
|
|
104
|
+
"tableFrom": "copilot_conversations",
|
|
105
|
+
"tableTo": "users",
|
|
106
|
+
"columnsFrom": [
|
|
107
|
+
"user_id"
|
|
108
|
+
],
|
|
109
|
+
"columnsTo": [
|
|
110
|
+
"id"
|
|
111
|
+
],
|
|
112
|
+
"onDelete": "cascade",
|
|
113
|
+
"onUpdate": "no action"
|
|
114
|
+
},
|
|
115
|
+
"copilot_conversations_workspace_id_workspaces_id_fk": {
|
|
116
|
+
"name": "copilot_conversations_workspace_id_workspaces_id_fk",
|
|
117
|
+
"tableFrom": "copilot_conversations",
|
|
118
|
+
"tableTo": "workspaces",
|
|
119
|
+
"columnsFrom": [
|
|
120
|
+
"workspace_id"
|
|
121
|
+
],
|
|
122
|
+
"columnsTo": [
|
|
123
|
+
"id"
|
|
124
|
+
],
|
|
125
|
+
"onDelete": "cascade",
|
|
126
|
+
"onUpdate": "no action"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"compositePrimaryKeys": {},
|
|
130
|
+
"uniqueConstraints": {},
|
|
131
|
+
"policies": {},
|
|
132
|
+
"checkConstraints": {},
|
|
133
|
+
"isRLSEnabled": false
|
|
134
|
+
},
|
|
135
|
+
"public.copilot_messages": {
|
|
136
|
+
"name": "copilot_messages",
|
|
137
|
+
"schema": "",
|
|
138
|
+
"columns": {
|
|
139
|
+
"id": {
|
|
140
|
+
"name": "id",
|
|
141
|
+
"type": "uuid",
|
|
142
|
+
"primaryKey": true,
|
|
143
|
+
"notNull": true,
|
|
144
|
+
"default": "gen_random_uuid()"
|
|
145
|
+
},
|
|
146
|
+
"conversation_id": {
|
|
147
|
+
"name": "conversation_id",
|
|
148
|
+
"type": "uuid",
|
|
149
|
+
"primaryKey": false,
|
|
150
|
+
"notNull": true
|
|
151
|
+
},
|
|
152
|
+
"run_id": {
|
|
153
|
+
"name": "run_id",
|
|
154
|
+
"type": "uuid",
|
|
155
|
+
"primaryKey": false,
|
|
156
|
+
"notNull": true
|
|
157
|
+
},
|
|
158
|
+
"role": {
|
|
159
|
+
"name": "role",
|
|
160
|
+
"type": "copilot_message_role",
|
|
161
|
+
"typeSchema": "public",
|
|
162
|
+
"primaryKey": false,
|
|
163
|
+
"notNull": true
|
|
164
|
+
},
|
|
165
|
+
"content": {
|
|
166
|
+
"name": "content",
|
|
167
|
+
"type": "jsonb",
|
|
168
|
+
"primaryKey": false,
|
|
169
|
+
"notNull": true
|
|
170
|
+
},
|
|
171
|
+
"attachments": {
|
|
172
|
+
"name": "attachments",
|
|
173
|
+
"type": "jsonb",
|
|
174
|
+
"primaryKey": false,
|
|
175
|
+
"notNull": false
|
|
176
|
+
},
|
|
177
|
+
"skills": {
|
|
178
|
+
"name": "skills",
|
|
179
|
+
"type": "jsonb",
|
|
180
|
+
"primaryKey": false,
|
|
181
|
+
"notNull": false
|
|
182
|
+
},
|
|
183
|
+
"model": {
|
|
184
|
+
"name": "model",
|
|
185
|
+
"type": "text",
|
|
186
|
+
"primaryKey": false,
|
|
187
|
+
"notNull": false
|
|
188
|
+
},
|
|
189
|
+
"provider": {
|
|
190
|
+
"name": "provider",
|
|
191
|
+
"type": "text",
|
|
192
|
+
"primaryKey": false,
|
|
193
|
+
"notNull": false
|
|
194
|
+
},
|
|
195
|
+
"stop_reason": {
|
|
196
|
+
"name": "stop_reason",
|
|
197
|
+
"type": "text",
|
|
198
|
+
"primaryKey": false,
|
|
199
|
+
"notNull": false
|
|
200
|
+
},
|
|
201
|
+
"input_tokens": {
|
|
202
|
+
"name": "input_tokens",
|
|
203
|
+
"type": "integer",
|
|
204
|
+
"primaryKey": false,
|
|
205
|
+
"notNull": false
|
|
206
|
+
},
|
|
207
|
+
"output_tokens": {
|
|
208
|
+
"name": "output_tokens",
|
|
209
|
+
"type": "integer",
|
|
210
|
+
"primaryKey": false,
|
|
211
|
+
"notNull": false
|
|
212
|
+
},
|
|
213
|
+
"position": {
|
|
214
|
+
"name": "position",
|
|
215
|
+
"type": "integer",
|
|
216
|
+
"primaryKey": false,
|
|
217
|
+
"notNull": true
|
|
218
|
+
},
|
|
219
|
+
"created_at": {
|
|
220
|
+
"name": "created_at",
|
|
221
|
+
"type": "timestamp with time zone",
|
|
222
|
+
"primaryKey": false,
|
|
223
|
+
"notNull": true,
|
|
224
|
+
"default": "now()"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"indexes": {
|
|
228
|
+
"copilot_messages_thread_idx": {
|
|
229
|
+
"name": "copilot_messages_thread_idx",
|
|
230
|
+
"columns": [
|
|
231
|
+
{
|
|
232
|
+
"expression": "conversation_id",
|
|
233
|
+
"isExpression": false,
|
|
234
|
+
"asc": true,
|
|
235
|
+
"nulls": "last"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"expression": "position",
|
|
239
|
+
"isExpression": false,
|
|
240
|
+
"asc": true,
|
|
241
|
+
"nulls": "last"
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
"isUnique": false,
|
|
245
|
+
"concurrently": false,
|
|
246
|
+
"method": "btree",
|
|
247
|
+
"with": {}
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"foreignKeys": {
|
|
251
|
+
"copilot_messages_conversation_id_copilot_conversations_id_fk": {
|
|
252
|
+
"name": "copilot_messages_conversation_id_copilot_conversations_id_fk",
|
|
253
|
+
"tableFrom": "copilot_messages",
|
|
254
|
+
"tableTo": "copilot_conversations",
|
|
255
|
+
"columnsFrom": [
|
|
256
|
+
"conversation_id"
|
|
257
|
+
],
|
|
258
|
+
"columnsTo": [
|
|
259
|
+
"id"
|
|
260
|
+
],
|
|
261
|
+
"onDelete": "cascade",
|
|
262
|
+
"onUpdate": "no action"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"compositePrimaryKeys": {},
|
|
266
|
+
"uniqueConstraints": {},
|
|
267
|
+
"policies": {},
|
|
268
|
+
"checkConstraints": {},
|
|
269
|
+
"isRLSEnabled": false
|
|
270
|
+
},
|
|
271
|
+
"public.copilot_proposals": {
|
|
272
|
+
"name": "copilot_proposals",
|
|
273
|
+
"schema": "",
|
|
274
|
+
"columns": {
|
|
275
|
+
"id": {
|
|
276
|
+
"name": "id",
|
|
277
|
+
"type": "uuid",
|
|
278
|
+
"primaryKey": true,
|
|
279
|
+
"notNull": true,
|
|
280
|
+
"default": "gen_random_uuid()"
|
|
281
|
+
},
|
|
282
|
+
"conversation_id": {
|
|
283
|
+
"name": "conversation_id",
|
|
284
|
+
"type": "uuid",
|
|
285
|
+
"primaryKey": false,
|
|
286
|
+
"notNull": true
|
|
287
|
+
},
|
|
288
|
+
"run_id": {
|
|
289
|
+
"name": "run_id",
|
|
290
|
+
"type": "uuid",
|
|
291
|
+
"primaryKey": false,
|
|
292
|
+
"notNull": true
|
|
293
|
+
},
|
|
294
|
+
"tool_call_id": {
|
|
295
|
+
"name": "tool_call_id",
|
|
296
|
+
"type": "text",
|
|
297
|
+
"primaryKey": false,
|
|
298
|
+
"notNull": true
|
|
299
|
+
},
|
|
300
|
+
"tool_name": {
|
|
301
|
+
"name": "tool_name",
|
|
302
|
+
"type": "text",
|
|
303
|
+
"primaryKey": false,
|
|
304
|
+
"notNull": true
|
|
305
|
+
},
|
|
306
|
+
"kind": {
|
|
307
|
+
"name": "kind",
|
|
308
|
+
"type": "text",
|
|
309
|
+
"primaryKey": false,
|
|
310
|
+
"notNull": true
|
|
311
|
+
},
|
|
312
|
+
"workspace_id": {
|
|
313
|
+
"name": "workspace_id",
|
|
314
|
+
"type": "uuid",
|
|
315
|
+
"primaryKey": false,
|
|
316
|
+
"notNull": true
|
|
317
|
+
},
|
|
318
|
+
"created_by": {
|
|
319
|
+
"name": "created_by",
|
|
320
|
+
"type": "uuid",
|
|
321
|
+
"primaryKey": false,
|
|
322
|
+
"notNull": true
|
|
323
|
+
},
|
|
324
|
+
"target": {
|
|
325
|
+
"name": "target",
|
|
326
|
+
"type": "jsonb",
|
|
327
|
+
"primaryKey": false,
|
|
328
|
+
"notNull": true
|
|
329
|
+
},
|
|
330
|
+
"patch": {
|
|
331
|
+
"name": "patch",
|
|
332
|
+
"type": "jsonb",
|
|
333
|
+
"primaryKey": false,
|
|
334
|
+
"notNull": true
|
|
335
|
+
},
|
|
336
|
+
"summary": {
|
|
337
|
+
"name": "summary",
|
|
338
|
+
"type": "text",
|
|
339
|
+
"primaryKey": false,
|
|
340
|
+
"notNull": true
|
|
341
|
+
},
|
|
342
|
+
"changes": {
|
|
343
|
+
"name": "changes",
|
|
344
|
+
"type": "jsonb",
|
|
345
|
+
"primaryKey": false,
|
|
346
|
+
"notNull": false
|
|
347
|
+
},
|
|
348
|
+
"status": {
|
|
349
|
+
"name": "status",
|
|
350
|
+
"type": "text",
|
|
351
|
+
"primaryKey": false,
|
|
352
|
+
"notNull": true,
|
|
353
|
+
"default": "'pending'"
|
|
354
|
+
},
|
|
355
|
+
"decided_by": {
|
|
356
|
+
"name": "decided_by",
|
|
357
|
+
"type": "uuid",
|
|
358
|
+
"primaryKey": false,
|
|
359
|
+
"notNull": false
|
|
360
|
+
},
|
|
361
|
+
"decided_at": {
|
|
362
|
+
"name": "decided_at",
|
|
363
|
+
"type": "timestamp with time zone",
|
|
364
|
+
"primaryKey": false,
|
|
365
|
+
"notNull": false
|
|
366
|
+
},
|
|
367
|
+
"result": {
|
|
368
|
+
"name": "result",
|
|
369
|
+
"type": "jsonb",
|
|
370
|
+
"primaryKey": false,
|
|
371
|
+
"notNull": false
|
|
372
|
+
},
|
|
373
|
+
"error": {
|
|
374
|
+
"name": "error",
|
|
375
|
+
"type": "text",
|
|
376
|
+
"primaryKey": false,
|
|
377
|
+
"notNull": false
|
|
378
|
+
},
|
|
379
|
+
"created_at": {
|
|
380
|
+
"name": "created_at",
|
|
381
|
+
"type": "timestamp with time zone",
|
|
382
|
+
"primaryKey": false,
|
|
383
|
+
"notNull": true,
|
|
384
|
+
"default": "now()"
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
"indexes": {
|
|
388
|
+
"copilot_proposals_workspace_idx": {
|
|
389
|
+
"name": "copilot_proposals_workspace_idx",
|
|
390
|
+
"columns": [
|
|
391
|
+
{
|
|
392
|
+
"expression": "workspace_id",
|
|
393
|
+
"isExpression": false,
|
|
394
|
+
"asc": true,
|
|
395
|
+
"nulls": "last"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"expression": "status",
|
|
399
|
+
"isExpression": false,
|
|
400
|
+
"asc": true,
|
|
401
|
+
"nulls": "last"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"expression": "created_at",
|
|
405
|
+
"isExpression": false,
|
|
406
|
+
"asc": true,
|
|
407
|
+
"nulls": "last"
|
|
408
|
+
}
|
|
409
|
+
],
|
|
410
|
+
"isUnique": false,
|
|
411
|
+
"concurrently": false,
|
|
412
|
+
"method": "btree",
|
|
413
|
+
"with": {}
|
|
414
|
+
},
|
|
415
|
+
"copilot_proposals_run_idx": {
|
|
416
|
+
"name": "copilot_proposals_run_idx",
|
|
417
|
+
"columns": [
|
|
418
|
+
{
|
|
419
|
+
"expression": "run_id",
|
|
420
|
+
"isExpression": false,
|
|
421
|
+
"asc": true,
|
|
422
|
+
"nulls": "last"
|
|
423
|
+
}
|
|
424
|
+
],
|
|
425
|
+
"isUnique": false,
|
|
426
|
+
"concurrently": false,
|
|
427
|
+
"method": "btree",
|
|
428
|
+
"with": {}
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
"foreignKeys": {
|
|
432
|
+
"copilot_proposals_conversation_id_copilot_conversations_id_fk": {
|
|
433
|
+
"name": "copilot_proposals_conversation_id_copilot_conversations_id_fk",
|
|
434
|
+
"tableFrom": "copilot_proposals",
|
|
435
|
+
"tableTo": "copilot_conversations",
|
|
436
|
+
"columnsFrom": [
|
|
437
|
+
"conversation_id"
|
|
438
|
+
],
|
|
439
|
+
"columnsTo": [
|
|
440
|
+
"id"
|
|
441
|
+
],
|
|
442
|
+
"onDelete": "cascade",
|
|
443
|
+
"onUpdate": "no action"
|
|
444
|
+
},
|
|
445
|
+
"copilot_proposals_workspace_id_workspaces_id_fk": {
|
|
446
|
+
"name": "copilot_proposals_workspace_id_workspaces_id_fk",
|
|
447
|
+
"tableFrom": "copilot_proposals",
|
|
448
|
+
"tableTo": "workspaces",
|
|
449
|
+
"columnsFrom": [
|
|
450
|
+
"workspace_id"
|
|
451
|
+
],
|
|
452
|
+
"columnsTo": [
|
|
453
|
+
"id"
|
|
454
|
+
],
|
|
455
|
+
"onDelete": "cascade",
|
|
456
|
+
"onUpdate": "no action"
|
|
457
|
+
},
|
|
458
|
+
"copilot_proposals_created_by_users_id_fk": {
|
|
459
|
+
"name": "copilot_proposals_created_by_users_id_fk",
|
|
460
|
+
"tableFrom": "copilot_proposals",
|
|
461
|
+
"tableTo": "users",
|
|
462
|
+
"columnsFrom": [
|
|
463
|
+
"created_by"
|
|
464
|
+
],
|
|
465
|
+
"columnsTo": [
|
|
466
|
+
"id"
|
|
467
|
+
],
|
|
468
|
+
"onDelete": "cascade",
|
|
469
|
+
"onUpdate": "no action"
|
|
470
|
+
},
|
|
471
|
+
"copilot_proposals_decided_by_users_id_fk": {
|
|
472
|
+
"name": "copilot_proposals_decided_by_users_id_fk",
|
|
473
|
+
"tableFrom": "copilot_proposals",
|
|
474
|
+
"tableTo": "users",
|
|
475
|
+
"columnsFrom": [
|
|
476
|
+
"decided_by"
|
|
477
|
+
],
|
|
478
|
+
"columnsTo": [
|
|
479
|
+
"id"
|
|
480
|
+
],
|
|
481
|
+
"onDelete": "set null",
|
|
482
|
+
"onUpdate": "no action"
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
"compositePrimaryKeys": {},
|
|
486
|
+
"uniqueConstraints": {},
|
|
487
|
+
"policies": {},
|
|
488
|
+
"checkConstraints": {},
|
|
489
|
+
"isRLSEnabled": false
|
|
490
|
+
},
|
|
491
|
+
"public.copilot_tool_calls": {
|
|
492
|
+
"name": "copilot_tool_calls",
|
|
493
|
+
"schema": "",
|
|
494
|
+
"columns": {
|
|
495
|
+
"id": {
|
|
496
|
+
"name": "id",
|
|
497
|
+
"type": "uuid",
|
|
498
|
+
"primaryKey": true,
|
|
499
|
+
"notNull": true,
|
|
500
|
+
"default": "gen_random_uuid()"
|
|
501
|
+
},
|
|
502
|
+
"conversation_id": {
|
|
503
|
+
"name": "conversation_id",
|
|
504
|
+
"type": "uuid",
|
|
505
|
+
"primaryKey": false,
|
|
506
|
+
"notNull": true
|
|
507
|
+
},
|
|
508
|
+
"run_id": {
|
|
509
|
+
"name": "run_id",
|
|
510
|
+
"type": "uuid",
|
|
511
|
+
"primaryKey": false,
|
|
512
|
+
"notNull": true
|
|
513
|
+
},
|
|
514
|
+
"call_id": {
|
|
515
|
+
"name": "call_id",
|
|
516
|
+
"type": "text",
|
|
517
|
+
"primaryKey": false,
|
|
518
|
+
"notNull": true
|
|
519
|
+
},
|
|
520
|
+
"name": {
|
|
521
|
+
"name": "name",
|
|
522
|
+
"type": "text",
|
|
523
|
+
"primaryKey": false,
|
|
524
|
+
"notNull": true
|
|
525
|
+
},
|
|
526
|
+
"input": {
|
|
527
|
+
"name": "input",
|
|
528
|
+
"type": "jsonb",
|
|
529
|
+
"primaryKey": false,
|
|
530
|
+
"notNull": false
|
|
531
|
+
},
|
|
532
|
+
"output_summary": {
|
|
533
|
+
"name": "output_summary",
|
|
534
|
+
"type": "text",
|
|
535
|
+
"primaryKey": false,
|
|
536
|
+
"notNull": false
|
|
537
|
+
},
|
|
538
|
+
"ok": {
|
|
539
|
+
"name": "ok",
|
|
540
|
+
"type": "boolean",
|
|
541
|
+
"primaryKey": false,
|
|
542
|
+
"notNull": true
|
|
543
|
+
},
|
|
544
|
+
"error": {
|
|
545
|
+
"name": "error",
|
|
546
|
+
"type": "text",
|
|
547
|
+
"primaryKey": false,
|
|
548
|
+
"notNull": false
|
|
549
|
+
},
|
|
550
|
+
"duration_ms": {
|
|
551
|
+
"name": "duration_ms",
|
|
552
|
+
"type": "integer",
|
|
553
|
+
"primaryKey": false,
|
|
554
|
+
"notNull": true
|
|
555
|
+
},
|
|
556
|
+
"created_at": {
|
|
557
|
+
"name": "created_at",
|
|
558
|
+
"type": "timestamp with time zone",
|
|
559
|
+
"primaryKey": false,
|
|
560
|
+
"notNull": true,
|
|
561
|
+
"default": "now()"
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
"indexes": {
|
|
565
|
+
"copilot_tool_calls_run_idx": {
|
|
566
|
+
"name": "copilot_tool_calls_run_idx",
|
|
567
|
+
"columns": [
|
|
568
|
+
{
|
|
569
|
+
"expression": "run_id",
|
|
570
|
+
"isExpression": false,
|
|
571
|
+
"asc": true,
|
|
572
|
+
"nulls": "last"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"expression": "created_at",
|
|
576
|
+
"isExpression": false,
|
|
577
|
+
"asc": true,
|
|
578
|
+
"nulls": "last"
|
|
579
|
+
}
|
|
580
|
+
],
|
|
581
|
+
"isUnique": false,
|
|
582
|
+
"concurrently": false,
|
|
583
|
+
"method": "btree",
|
|
584
|
+
"with": {}
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
"foreignKeys": {
|
|
588
|
+
"copilot_tool_calls_conversation_id_copilot_conversations_id_fk": {
|
|
589
|
+
"name": "copilot_tool_calls_conversation_id_copilot_conversations_id_fk",
|
|
590
|
+
"tableFrom": "copilot_tool_calls",
|
|
591
|
+
"tableTo": "copilot_conversations",
|
|
592
|
+
"columnsFrom": [
|
|
593
|
+
"conversation_id"
|
|
594
|
+
],
|
|
595
|
+
"columnsTo": [
|
|
596
|
+
"id"
|
|
597
|
+
],
|
|
598
|
+
"onDelete": "cascade",
|
|
599
|
+
"onUpdate": "no action"
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
"compositePrimaryKeys": {},
|
|
603
|
+
"uniqueConstraints": {},
|
|
604
|
+
"policies": {},
|
|
605
|
+
"checkConstraints": {},
|
|
606
|
+
"isRLSEnabled": false
|
|
607
|
+
},
|
|
608
|
+
"public.copilot_skills": {
|
|
609
|
+
"name": "copilot_skills",
|
|
610
|
+
"schema": "",
|
|
611
|
+
"columns": {
|
|
612
|
+
"id": {
|
|
613
|
+
"name": "id",
|
|
614
|
+
"type": "uuid",
|
|
615
|
+
"primaryKey": true,
|
|
616
|
+
"notNull": true,
|
|
617
|
+
"default": "gen_random_uuid()"
|
|
618
|
+
},
|
|
619
|
+
"workspace_id": {
|
|
620
|
+
"name": "workspace_id",
|
|
621
|
+
"type": "uuid",
|
|
622
|
+
"primaryKey": false,
|
|
623
|
+
"notNull": true
|
|
624
|
+
},
|
|
625
|
+
"name": {
|
|
626
|
+
"name": "name",
|
|
627
|
+
"type": "text",
|
|
628
|
+
"primaryKey": false,
|
|
629
|
+
"notNull": true
|
|
630
|
+
},
|
|
631
|
+
"title": {
|
|
632
|
+
"name": "title",
|
|
633
|
+
"type": "text",
|
|
634
|
+
"primaryKey": false,
|
|
635
|
+
"notNull": true
|
|
636
|
+
},
|
|
637
|
+
"description": {
|
|
638
|
+
"name": "description",
|
|
639
|
+
"type": "text",
|
|
640
|
+
"primaryKey": false,
|
|
641
|
+
"notNull": true
|
|
642
|
+
},
|
|
643
|
+
"instructions": {
|
|
644
|
+
"name": "instructions",
|
|
645
|
+
"type": "text",
|
|
646
|
+
"primaryKey": false,
|
|
647
|
+
"notNull": true
|
|
648
|
+
},
|
|
649
|
+
"mode": {
|
|
650
|
+
"name": "mode",
|
|
651
|
+
"type": "copilot_skill_mode",
|
|
652
|
+
"typeSchema": "public",
|
|
653
|
+
"primaryKey": false,
|
|
654
|
+
"notNull": true,
|
|
655
|
+
"default": "'manual'"
|
|
656
|
+
},
|
|
657
|
+
"enabled": {
|
|
658
|
+
"name": "enabled",
|
|
659
|
+
"type": "boolean",
|
|
660
|
+
"primaryKey": false,
|
|
661
|
+
"notNull": true,
|
|
662
|
+
"default": true
|
|
663
|
+
},
|
|
664
|
+
"created_by": {
|
|
665
|
+
"name": "created_by",
|
|
666
|
+
"type": "uuid",
|
|
667
|
+
"primaryKey": false,
|
|
668
|
+
"notNull": false
|
|
669
|
+
},
|
|
670
|
+
"created_at": {
|
|
671
|
+
"name": "created_at",
|
|
672
|
+
"type": "timestamp with time zone",
|
|
673
|
+
"primaryKey": false,
|
|
674
|
+
"notNull": true,
|
|
675
|
+
"default": "now()"
|
|
676
|
+
},
|
|
677
|
+
"updated_at": {
|
|
678
|
+
"name": "updated_at",
|
|
679
|
+
"type": "timestamp with time zone",
|
|
680
|
+
"primaryKey": false,
|
|
681
|
+
"notNull": true,
|
|
682
|
+
"default": "now()"
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
"indexes": {
|
|
686
|
+
"copilot_skills_workspace_name_idx": {
|
|
687
|
+
"name": "copilot_skills_workspace_name_idx",
|
|
688
|
+
"columns": [
|
|
689
|
+
{
|
|
690
|
+
"expression": "workspace_id",
|
|
691
|
+
"isExpression": false,
|
|
692
|
+
"asc": true,
|
|
693
|
+
"nulls": "last"
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
"expression": "name",
|
|
697
|
+
"isExpression": false,
|
|
698
|
+
"asc": true,
|
|
699
|
+
"nulls": "last"
|
|
700
|
+
}
|
|
701
|
+
],
|
|
702
|
+
"isUnique": true,
|
|
703
|
+
"concurrently": false,
|
|
704
|
+
"method": "btree",
|
|
705
|
+
"with": {}
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
"foreignKeys": {
|
|
709
|
+
"copilot_skills_workspace_id_workspaces_id_fk": {
|
|
710
|
+
"name": "copilot_skills_workspace_id_workspaces_id_fk",
|
|
711
|
+
"tableFrom": "copilot_skills",
|
|
712
|
+
"tableTo": "workspaces",
|
|
713
|
+
"columnsFrom": [
|
|
714
|
+
"workspace_id"
|
|
715
|
+
],
|
|
716
|
+
"columnsTo": [
|
|
717
|
+
"id"
|
|
718
|
+
],
|
|
719
|
+
"onDelete": "cascade",
|
|
720
|
+
"onUpdate": "no action"
|
|
721
|
+
},
|
|
722
|
+
"copilot_skills_created_by_users_id_fk": {
|
|
723
|
+
"name": "copilot_skills_created_by_users_id_fk",
|
|
724
|
+
"tableFrom": "copilot_skills",
|
|
725
|
+
"tableTo": "users",
|
|
726
|
+
"columnsFrom": [
|
|
727
|
+
"created_by"
|
|
728
|
+
],
|
|
729
|
+
"columnsTo": [
|
|
730
|
+
"id"
|
|
731
|
+
],
|
|
732
|
+
"onDelete": "set null",
|
|
733
|
+
"onUpdate": "no action"
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
"compositePrimaryKeys": {},
|
|
737
|
+
"uniqueConstraints": {},
|
|
738
|
+
"policies": {},
|
|
739
|
+
"checkConstraints": {},
|
|
740
|
+
"isRLSEnabled": false
|
|
741
|
+
}
|
|
742
|
+
},
|
|
743
|
+
"enums": {
|
|
744
|
+
"public.copilot_message_role": {
|
|
745
|
+
"name": "copilot_message_role",
|
|
746
|
+
"schema": "public",
|
|
747
|
+
"values": [
|
|
748
|
+
"user",
|
|
749
|
+
"assistant"
|
|
750
|
+
]
|
|
751
|
+
},
|
|
752
|
+
"public.copilot_skill_mode": {
|
|
753
|
+
"name": "copilot_skill_mode",
|
|
754
|
+
"schema": "public",
|
|
755
|
+
"values": [
|
|
756
|
+
"manual",
|
|
757
|
+
"always"
|
|
758
|
+
]
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
"schemas": {},
|
|
762
|
+
"sequences": {},
|
|
763
|
+
"roles": {},
|
|
764
|
+
"policies": {},
|
|
765
|
+
"views": {},
|
|
766
|
+
"_meta": {
|
|
767
|
+
"columns": {},
|
|
768
|
+
"schemas": {},
|
|
769
|
+
"tables": {}
|
|
770
|
+
}
|
|
771
|
+
}
|