bopodev-db 0.1.12 → 0.1.13
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/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-typecheck.log +1 -1
- package/dist/repositories.d.ts +203 -4
- package/dist/schema.d.ts +2536 -698
- package/package.json +1 -1
- package/src/bootstrap.ts +109 -0
- package/src/repositories.ts +434 -3
- package/src/schema.ts +94 -0
package/.turbo/turbo-build.log
CHANGED
package/dist/repositories.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BopoDb } from "./client";
|
|
2
|
+
import { heartbeatRunMessages } from "./schema";
|
|
2
3
|
export declare class RepositoryValidationError extends Error {
|
|
3
4
|
constructor(message: string);
|
|
4
5
|
}
|
|
@@ -39,6 +40,7 @@ export declare function listProjects(db: BopoDb, companyId: string): Promise<{
|
|
|
39
40
|
createdAt: Date;
|
|
40
41
|
}[]>;
|
|
41
42
|
export declare function createProject(db: BopoDb, input: {
|
|
43
|
+
id?: string;
|
|
42
44
|
companyId: string;
|
|
43
45
|
name: string;
|
|
44
46
|
description?: string | null;
|
|
@@ -47,6 +49,7 @@ export declare function createProject(db: BopoDb, input: {
|
|
|
47
49
|
workspaceLocalPath?: string | null;
|
|
48
50
|
workspaceGithubRepo?: string | null;
|
|
49
51
|
}): Promise<{
|
|
52
|
+
id: string;
|
|
50
53
|
companyId: string;
|
|
51
54
|
name: string;
|
|
52
55
|
description?: string | null;
|
|
@@ -54,7 +57,6 @@ export declare function createProject(db: BopoDb, input: {
|
|
|
54
57
|
plannedStartAt?: Date | null;
|
|
55
58
|
workspaceLocalPath?: string | null;
|
|
56
59
|
workspaceGithubRepo?: string | null;
|
|
57
|
-
id: string;
|
|
58
60
|
}>;
|
|
59
61
|
export declare function updateProject(db: BopoDb, input: {
|
|
60
62
|
companyId: string;
|
|
@@ -152,6 +154,68 @@ export declare function updateIssue(db: BopoDb, input: {
|
|
|
152
154
|
updatedAt: Date;
|
|
153
155
|
} | null>;
|
|
154
156
|
export declare function deleteIssue(db: BopoDb, companyId: string, id: string): Promise<boolean>;
|
|
157
|
+
export declare function addIssueAttachment(db: BopoDb, input: {
|
|
158
|
+
id?: string;
|
|
159
|
+
companyId: string;
|
|
160
|
+
issueId: string;
|
|
161
|
+
projectId: string;
|
|
162
|
+
fileName: string;
|
|
163
|
+
mimeType?: string | null;
|
|
164
|
+
fileSizeBytes: number;
|
|
165
|
+
relativePath: string;
|
|
166
|
+
uploadedByActorType?: "human" | "agent" | "system";
|
|
167
|
+
uploadedByActorId?: string | null;
|
|
168
|
+
}): Promise<{
|
|
169
|
+
id: string;
|
|
170
|
+
companyId: string;
|
|
171
|
+
issueId: string;
|
|
172
|
+
projectId: string;
|
|
173
|
+
fileName: string;
|
|
174
|
+
mimeType?: string | null;
|
|
175
|
+
fileSizeBytes: number;
|
|
176
|
+
relativePath: string;
|
|
177
|
+
uploadedByActorType?: "human" | "agent" | "system";
|
|
178
|
+
uploadedByActorId?: string | null;
|
|
179
|
+
}>;
|
|
180
|
+
export declare function listIssueAttachments(db: BopoDb, companyId: string, issueId: string): Promise<{
|
|
181
|
+
id: string;
|
|
182
|
+
companyId: string;
|
|
183
|
+
issueId: string;
|
|
184
|
+
projectId: string;
|
|
185
|
+
fileName: string;
|
|
186
|
+
mimeType: string | null;
|
|
187
|
+
fileSizeBytes: number;
|
|
188
|
+
relativePath: string;
|
|
189
|
+
uploadedByActorType: string;
|
|
190
|
+
uploadedByActorId: string | null;
|
|
191
|
+
createdAt: Date;
|
|
192
|
+
}[]>;
|
|
193
|
+
export declare function getIssueAttachment(db: BopoDb, companyId: string, issueId: string, attachmentId: string): Promise<{
|
|
194
|
+
id: string;
|
|
195
|
+
companyId: string;
|
|
196
|
+
issueId: string;
|
|
197
|
+
projectId: string;
|
|
198
|
+
fileName: string;
|
|
199
|
+
mimeType: string | null;
|
|
200
|
+
fileSizeBytes: number;
|
|
201
|
+
relativePath: string;
|
|
202
|
+
uploadedByActorType: string;
|
|
203
|
+
uploadedByActorId: string | null;
|
|
204
|
+
createdAt: Date;
|
|
205
|
+
} | null>;
|
|
206
|
+
export declare function deleteIssueAttachment(db: BopoDb, companyId: string, issueId: string, attachmentId: string): Promise<{
|
|
207
|
+
id: string;
|
|
208
|
+
createdAt: Date;
|
|
209
|
+
companyId: string;
|
|
210
|
+
projectId: string;
|
|
211
|
+
issueId: string;
|
|
212
|
+
fileName: string;
|
|
213
|
+
mimeType: string | null;
|
|
214
|
+
fileSizeBytes: number;
|
|
215
|
+
relativePath: string;
|
|
216
|
+
uploadedByActorType: string;
|
|
217
|
+
uploadedByActorId: string | null;
|
|
218
|
+
} | null>;
|
|
155
219
|
export declare function addIssueComment(db: BopoDb, input: {
|
|
156
220
|
companyId: string;
|
|
157
221
|
issueId: string;
|
|
@@ -255,7 +319,7 @@ export declare function createAgent(db: BopoDb, input: {
|
|
|
255
319
|
managerAgentId?: string | null;
|
|
256
320
|
role: string;
|
|
257
321
|
name: string;
|
|
258
|
-
providerType: "claude_code" | "codex" | "cursor" | "opencode" | "http" | "shell";
|
|
322
|
+
providerType: "claude_code" | "codex" | "cursor" | "opencode" | "openai_api" | "anthropic_api" | "http" | "shell";
|
|
259
323
|
heartbeatCron: string;
|
|
260
324
|
monthlyBudgetUsd: string;
|
|
261
325
|
canHireAgents?: boolean;
|
|
@@ -277,7 +341,7 @@ export declare function createAgent(db: BopoDb, input: {
|
|
|
277
341
|
managerAgentId?: string | null;
|
|
278
342
|
role: string;
|
|
279
343
|
name: string;
|
|
280
|
-
providerType: "claude_code" | "codex" | "cursor" | "opencode" | "http" | "shell";
|
|
344
|
+
providerType: "claude_code" | "codex" | "cursor" | "opencode" | "openai_api" | "anthropic_api" | "http" | "shell";
|
|
281
345
|
heartbeatCron: string;
|
|
282
346
|
monthlyBudgetUsd: string;
|
|
283
347
|
canHireAgents?: boolean;
|
|
@@ -328,7 +392,7 @@ export declare function updateAgent(db: BopoDb, input: {
|
|
|
328
392
|
managerAgentId?: string | null;
|
|
329
393
|
role?: string;
|
|
330
394
|
name?: string;
|
|
331
|
-
providerType?: "claude_code" | "codex" | "cursor" | "opencode" | "http" | "shell";
|
|
395
|
+
providerType?: "claude_code" | "codex" | "cursor" | "opencode" | "openai_api" | "anthropic_api" | "http" | "shell";
|
|
332
396
|
status?: string;
|
|
333
397
|
heartbeatCron?: string;
|
|
334
398
|
monthlyBudgetUsd?: string;
|
|
@@ -478,6 +542,61 @@ export declare function listHeartbeatRuns(db: BopoDb, companyId: string, limit?:
|
|
|
478
542
|
finishedAt: Date | null;
|
|
479
543
|
message: string | null;
|
|
480
544
|
}[]>;
|
|
545
|
+
export declare function getHeartbeatRun(db: BopoDb, companyId: string, runId: string): Promise<{
|
|
546
|
+
id: string;
|
|
547
|
+
companyId: string;
|
|
548
|
+
agentId: string;
|
|
549
|
+
status: string;
|
|
550
|
+
startedAt: Date;
|
|
551
|
+
finishedAt: Date | null;
|
|
552
|
+
message: string | null;
|
|
553
|
+
} | null>;
|
|
554
|
+
export declare function appendHeartbeatRunMessages(db: BopoDb, input: {
|
|
555
|
+
companyId: string;
|
|
556
|
+
runId: string;
|
|
557
|
+
messages: Array<{
|
|
558
|
+
id?: string;
|
|
559
|
+
sequence: number;
|
|
560
|
+
kind: string;
|
|
561
|
+
label?: string | null;
|
|
562
|
+
text?: string | null;
|
|
563
|
+
payloadJson?: string | null;
|
|
564
|
+
signalLevel?: "high" | "medium" | "low" | "noise" | null;
|
|
565
|
+
groupKey?: string | null;
|
|
566
|
+
source?: "stdout" | "stderr" | "trace_fallback" | null;
|
|
567
|
+
createdAt?: Date;
|
|
568
|
+
}>;
|
|
569
|
+
}): Promise<string[]>;
|
|
570
|
+
export declare function listHeartbeatRunMessages(db: BopoDb, input: {
|
|
571
|
+
companyId: string;
|
|
572
|
+
runId: string;
|
|
573
|
+
afterSequence?: number;
|
|
574
|
+
limit?: number;
|
|
575
|
+
}): Promise<{
|
|
576
|
+
items: {
|
|
577
|
+
id: string;
|
|
578
|
+
companyId: string;
|
|
579
|
+
runId: string;
|
|
580
|
+
sequence: number;
|
|
581
|
+
kind: string;
|
|
582
|
+
label: string | null;
|
|
583
|
+
text: string | null;
|
|
584
|
+
payloadJson: string | null;
|
|
585
|
+
signalLevel: string | null;
|
|
586
|
+
groupKey: string | null;
|
|
587
|
+
source: string | null;
|
|
588
|
+
createdAt: Date;
|
|
589
|
+
}[];
|
|
590
|
+
nextCursor: string | null;
|
|
591
|
+
}>;
|
|
592
|
+
export declare function listHeartbeatRunMessagesForRuns(db: BopoDb, input: {
|
|
593
|
+
companyId: string;
|
|
594
|
+
runIds: string[];
|
|
595
|
+
perRunLimit?: number;
|
|
596
|
+
}): Promise<Map<string, {
|
|
597
|
+
items: Array<(typeof heartbeatRunMessages.$inferSelect)>;
|
|
598
|
+
nextCursor: string | null;
|
|
599
|
+
}>>;
|
|
481
600
|
export declare function appendActivity(db: BopoDb, input: {
|
|
482
601
|
companyId: string;
|
|
483
602
|
issueId?: string | null;
|
|
@@ -486,3 +605,83 @@ export declare function appendActivity(db: BopoDb, input: {
|
|
|
486
605
|
eventType: string;
|
|
487
606
|
payload: Record<string, unknown>;
|
|
488
607
|
}): Promise<string>;
|
|
608
|
+
export declare function upsertPlugin(db: BopoDb, input: {
|
|
609
|
+
id: string;
|
|
610
|
+
name: string;
|
|
611
|
+
version: string;
|
|
612
|
+
kind: string;
|
|
613
|
+
runtimeType: string;
|
|
614
|
+
runtimeEntrypoint: string;
|
|
615
|
+
hooksJson?: string;
|
|
616
|
+
capabilitiesJson?: string;
|
|
617
|
+
manifestJson?: string;
|
|
618
|
+
}): Promise<string>;
|
|
619
|
+
export declare function listPlugins(db: BopoDb): Promise<{
|
|
620
|
+
id: string;
|
|
621
|
+
name: string;
|
|
622
|
+
version: string;
|
|
623
|
+
kind: string;
|
|
624
|
+
runtimeType: string;
|
|
625
|
+
runtimeEntrypoint: string;
|
|
626
|
+
hooksJson: string;
|
|
627
|
+
capabilitiesJson: string;
|
|
628
|
+
manifestJson: string;
|
|
629
|
+
createdAt: Date;
|
|
630
|
+
updatedAt: Date;
|
|
631
|
+
}[]>;
|
|
632
|
+
export declare function updatePluginConfig(db: BopoDb, input: {
|
|
633
|
+
companyId: string;
|
|
634
|
+
pluginId: string;
|
|
635
|
+
enabled?: boolean;
|
|
636
|
+
priority?: number;
|
|
637
|
+
configJson?: string;
|
|
638
|
+
grantedCapabilitiesJson?: string;
|
|
639
|
+
}): Promise<void>;
|
|
640
|
+
export declare function deletePluginConfig(db: BopoDb, input: {
|
|
641
|
+
companyId: string;
|
|
642
|
+
pluginId: string;
|
|
643
|
+
}): Promise<void>;
|
|
644
|
+
export declare function deletePluginById(db: BopoDb, pluginId: string): Promise<void>;
|
|
645
|
+
export declare function listCompanyPluginConfigs(db: BopoDb, companyId: string): Promise<{
|
|
646
|
+
companyId: string;
|
|
647
|
+
pluginId: string;
|
|
648
|
+
enabled: boolean;
|
|
649
|
+
priority: number;
|
|
650
|
+
configJson: string;
|
|
651
|
+
grantedCapabilitiesJson: string;
|
|
652
|
+
pluginName: string;
|
|
653
|
+
pluginVersion: string;
|
|
654
|
+
pluginKind: string;
|
|
655
|
+
runtimeType: string;
|
|
656
|
+
runtimeEntrypoint: string;
|
|
657
|
+
hooksJson: string;
|
|
658
|
+
capabilitiesJson: string;
|
|
659
|
+
manifestJson: string;
|
|
660
|
+
}[]>;
|
|
661
|
+
export declare function appendPluginRun(db: BopoDb, input: {
|
|
662
|
+
companyId: string;
|
|
663
|
+
runId?: string | null;
|
|
664
|
+
pluginId: string;
|
|
665
|
+
hook: string;
|
|
666
|
+
status: string;
|
|
667
|
+
durationMs: number;
|
|
668
|
+
error?: string | null;
|
|
669
|
+
diagnosticsJson?: string;
|
|
670
|
+
}): Promise<string>;
|
|
671
|
+
export declare function listPluginRuns(db: BopoDb, input: {
|
|
672
|
+
companyId: string;
|
|
673
|
+
pluginId?: string;
|
|
674
|
+
runId?: string;
|
|
675
|
+
limit?: number;
|
|
676
|
+
}): Promise<{
|
|
677
|
+
id: string;
|
|
678
|
+
companyId: string;
|
|
679
|
+
runId: string | null;
|
|
680
|
+
pluginId: string;
|
|
681
|
+
hook: string;
|
|
682
|
+
status: string;
|
|
683
|
+
durationMs: number;
|
|
684
|
+
error: string | null;
|
|
685
|
+
diagnosticsJson: string;
|
|
686
|
+
createdAt: Date;
|
|
687
|
+
}[]>;
|