Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

✨ feat(home): add a team tab with the workspace agent run board (#22614)

Arvin Xua7f3b0e4f058
diff --git a/apps/server/src/routers/lambda/agentRunBoard.ts b/apps/server/src/routers/lambda/agentRunBoard.ts
new file mode 100644
index 00000000000..bb6fc7c951c
--- /dev/null
+++ b/apps/server/src/routers/lambda/agentRunBoard.ts
@@ -0,0 +1,47 @@
+import { AGENT_RUN_BOARD_WINDOW_HOURS } from '@lobechat/types';
+import { TRPCError } from '@trpc/server';
+import { z } from 'zod';
+
+import { wsCompatProcedure } from '@/business/server/trpc-middlewares/workspaceAuth';
+import { AgentRunBoardModel } from '@/database/models/agentRunBoard';
+import { router } from '@/libs/trpc/lambda';
+import { serverDatabase } from '@/libs/trpc/lambda/middleware';
+import { buildAgentRunBoard } from '@/server/services/agentRunBoard';
+
+const agentRunBoardProcedure = wsCompatProcedure.use(serverDatabase);
+
+export const agentRunBoardRouter = router({
+ get: agentRunBoardProcedure
+ .input(
+ z.object({
+ windowHours: z
+ .number()
+ .refine((value) => (AGENT_RUN_BOARD_WINDOW_HOURS as readonly number[]).includes(value)),
+ }),
+ )
+ .query(async ({ input, ctx }) => {
+ if (!ctx.workspaceId)
+ throw new TRPCError({ code: 'BAD_REQUEST', message: 'A workspace is required' });
+
+ try {
+ const generatedAt = new Date();
+ const windowStart = new Date(generatedAt.getTime() - input.windowHours * 60 * 60_000);
+ const rows = await new AgentRunBoardModel(ctx.serverDB, ctx.workspaceId).listRuns({
+ now: generatedAt,
+ since: windowStart,
+ });
+
+ return {
+ data: buildAgentRunBoard({ generatedAt, rows, viewerId: ctx.userId, windowStart }),
+ success: true,
+ };
+ } catch (error) {
+ console.error('[agentRunBoard:get]', error);
+ throw new TRPCError({
+ cause: error,
+ code: 'INTERNAL_SERVER_ERROR',
+ message: 'Failed to load the agent run board',
+ });
+ }
+ }),
+});
diff --git a/apps/server/src/routers/lambda/index.ts b/apps/server/src/routers/lambda/index.ts
index 255f49bbc4a..c44cce46b91 100644
--- a/apps/server/src/routers/lambda/index.ts
+++ b/apps/server/src/routers/lambda/index.ts
@@ -35,6 +35,7 @@ import { agentGroupRouter } from './agentGroup';
import { agentLabelRouter } from './agentLabel';
import { agentNotifyRouter } from './agentNotify';
import { agentQuotaRouter } from './agentQuota';
+import { agentRunBoardRouter } from './agentRunBoard';
import { agentShareRouter } from './agentShare';
import { agentSignalRouter } from './agentSignal';
import { agentSkillsRouter } from './agentSkills';
@@ -145,6 +146,7 @@ export const lambdaRouter = router({
sandboxStorage: sandboxStorageRouter,
agentTrace: agentTraceRouter,
expertise: expertiseRouter,
+ agentRunBoard: agentRunBoardRouter,
agentSignal: agentSignalRouter,
agentSteerQueue: agentSteerQueueRouter,
canvas: canvasRouter,
diff --git a/apps/server/src/services/agentRunBoard/index.test.ts b/apps/server/src/services/agentRunBoard/index.test.ts
new file mode 100644
index 00000000000..480210b2008
--- /dev/null
+++ b/apps/server/src/services/agentRunBoard/index.test.ts
@@ -0,0 +1,203 @@
+// @vitest-environment node
+import { describe, expect, it } from 'vitest';
+
+import type { AgentRunBoardRow } from '@/database/models/agentRunBoard';
+
+import { buildAgentRunBoard, classifyRun } from './index';
+
+const generatedAt = new Date('2026-11-08T12:00:00Z');
+const now = generatedAt.getTime();
+const windowStart = new Date('2026-11-08T06:00:00Z');
+const minutesAgo = (m: number) => new Date(now - m * 60_000);
+
+const row = (overrides: Partial<AgentRunBoardRow> = {}): AgentRunBoardRow => ({
+ agentAvatar: null,
+ agentBackgroundColor: null,
+ agentId: 'a1',
+ agentOwnerId: 'owner',
+ agentTitle: 'Agent',
+ completedAt: null,
+ createdAt: minutesAgo(30),
+ errorMessage: null,
+ errorType: null,
+ heteroType: null,
+ id: 'op',
+ interventions: [],
+ model: 'm',
+ startedAt: minutesAgo(30),
+ status: 'running',
+ runningOperation: null,
+ taskName: null,
+ topicId: 't',
+ topicTitle: 'Topic',
+ trigger: 'chat',
+ updatedAt: minutesAgo(1),
+ userId: 'teammate',
+ ...overrides,
+});
+
+const intervention = (overrides = {}) => ({
+ canonicalToolKey: 'stripe.refund',
+ createdAt: minutesAgo(14),
+ deadline: minutesAgo(-60),
+ operationId: 'op',
+ status: 'pending',
+ userId: 'teammate',
+ ...overrides,
+});
+
+describe('classifyRun', () => {
+ it('treats a running row with a frozen lease as stopped', () => {
+ expect(classifyRun(row(), now)).toBe('running');
+ expect(classifyRun(row({ updatedAt: minutesAgo(6) }), now)).toBe('stopped');
+ });
+
+ it('gives heterogeneous runs the longer silence window', () => {
+ expect(classifyRun(row({ heteroType: 'claude-code', updatedAt: minutesAgo(30) }), now)).toBe(
+ 'running',
+ );
+ });
+
+ it('needs a human while an ask is pending or no intervention row exists', () => {
+ const waiting = { status: 'waiting_for_human' as const, updatedAt: minutesAgo(20) };
+ expect(classifyRun(row({ ...waiting, interventions: [intervention()] }), now)).toBe(
+ 'needs_human',
+ );
+ expect(classifyRun(row(waiting), now)).toBe('needs_human');
+ });
+
+ it('stops counting an ask that expired or was answered', () => {
+ const waiting = { status: 'waiting_for_human' as const, updatedAt: minutesAgo(20) };
+ expect(
+ classifyRun(
+ row({ ...waiting, interventions: [intervention({ deadline: minutesAgo(1) })] }),
+ now,
+ ),
+ ).toBe('stopped');
+ expect(
+ classifyRun(
+ row({
+ interventions: [intervention({ status: 'resolved' })],
+ status: 'waiting_for_human',
+ updatedAt: minutesAgo(1),
+ }),
+ now,
+ ),
+ ).toBe('running');
+ });
+
+ it('skips reserved idle rows and maps terminal statuses', () => {
+ expect(classifyRun(row({ status: 'idle' }), now)).toBeNull();
+ expect(classifyRun(row({ status: 'abandoned' }), now)).toBe('failed');
+ expect(classifyRun(row({ status: 'interrupted' }), now)).toBe('stopped');
+ });
+});
+
+describe('buildAgentRunBoard', () => {
+ const build = (rows: AgentRunBoardRow[], viewerId = 'me') =>
+ buildAgentRunBoard({ generatedAt, rows, viewerId, windowStart });
+
+ it('groups by agent and counts each status', () => {
+ const board = build([
+ row({ id: '1' }),
+ row({ completedAt: minutesAgo(2), id: '2', status: 'done' }),
+ row({ agentId: 'a2', completedAt: minutesAgo(3), id: '3', status: 'error' }),
+ ]);
+
+ expect(board.summary).toEqual({ done: 1, failed: 1, needsHuman: 0, running: 1 });
+ expect(board.lanes.map((l) => l.agentId)).toEqual(['a2', 'a1']);
+ expect(board.lanes[1].runs).toHaveLength(2);
+ });
+
+ it('puts the asks the viewer can answer first, then the longest wait', () => {
+ const waiting = { status: 'waiting_for_human' as const, updatedAt: minutesAgo(1) };
+ const board = build([
+ row({
+ ...waiting,
+ id: 'older-team',
+ interventions: [intervention({ createdAt: minutesAgo(50), operationId: 'older-team' })],
+ }),
+ row({
+ ...waiting,
+ id: 'mine',
+ interventions: [intervention({ operationId: 'mine', userId: 'me' })],
+ }),
+ ]);
+
+ expect(board.attention.map((a) => [a.operationId, a.isMine])).toEqual([
+ ['mine', true],
+ ['older-team', false],
+ ]);
+ expect(board.attention[0].detail).toBe('stripe.refund');
+ const older = board.lanes[0].runs.find((run) => run.id === 'older-team');
+ expect(older?.waitingSince).toEqual(minutesAgo(50));
+ expect(board.lanes[0].ownerUserId).toBe('owner');
+ });
+
+ it('prefers the task title and truncates failure detail', () => {
+ const board = build([
+ row({
+ completedAt: minutesAgo(1),
+ errorMessage: 'x'.repeat(500),
+ status: 'error',
+ taskName: 'Refund',
+ }),
+ ]);
+
+ expect(board.attention[0].title).toBe('Refund');
+ expect(board.attention[0].detail).toHaveLength(200);
+ });
+
+ it('hands the stream marker only to the viewer who started the run', () => {
+ const runningOperation = { assistantMessageId: 'msg', operationId: 'op' };
+ const mine = build([row({ runningOperation, userId: 'me' })]);
+ const theirs = build([row({ runningOperation })]);
+ const stale = build([
+ row({ runningOperation: { ...runningOperation, operationId: 'newer' }, userId: 'me' }),
+ ]);
+
+ expect(mine.lanes[0].runs[0].runningOperation).toEqual(runningOperation);
+ expect(theirs.lanes[0].runs[0].runningOperation).toBeNull();
+ expect(stale.lanes[0].runs[0].runningOperation).toBeNull();
+ });
+
+ it('drops a dead run whose lease froze before the window', () => {
+ const board = build([row({ createdAt: minutesAgo(600), updatedAt: minutesAgo(500) })]);
+
+ expect(board.lanes).toEqual([]);
+ expect(board.summary.running).toBe(0);
+ });
+
+ it('counts started runs per slice, from every run rather than the capped lanes', () => {
+ const rows = Array.from({ length: 33 }, (_, i) => row({ agentId: `a${i}`, id: `${i}` }));
+ const board = build([
+ ...rows,
+ row({ completedAt: minutesAgo(1), id: 'old', startedAt: minutesAgo(600), status: 'done' }),
+ row({ id: 'dead', updatedAt: minutesAgo(10) }),
+ ]);
+
+ expect(board.activity).toHaveLength(24);
+ expect(board.activity.at(-2)?.running).toBe(33);
+ expect(board.activity[0].done).toBe(1);
+ expect(board.activity.reduce((sum, b) => sum + b.running + b.done, 0)).toBe(34);
+ });
+
+ it('uses 5-minute slices for the one-hour window', () => {
+ const board = buildAgentRunBoard({
+ generatedAt,
+ rows: [],
+ viewerId: 'me',
+ windowStart: minutesAgo(60),
+ });
+
+ expect(board.activity).toHaveLength(12);
+ });
+
+ it('caps lanes and reports how many were left out', () => {
+ const rows = Array.from({ length: 33 }, (_, i) => row({ agentId: `a${i}`, id: `${i}` }));
+ const board = build(rows);
+
+ expect(board.lanes).toHaveLength(30);
+ expect(board.hiddenLaneCount).toBe(3);
+ });
+});
diff --git a/apps/server/src/services/agentRunBoard/index.ts b/apps/server/src/services/agentRunBoard/index.ts
new file mode 100644
index 00000000000..9c8a226c6b9
--- /dev/null
+++ b/apps/server/src/services/agentRunBoard/index.ts
@@ -0,0 +1,264 @@
+import type {
+ AgentRunBoardActivityBucket,
+ AgentRunBoardAttentionItem,
+ AgentRunBoardData,
+ AgentRunBoardLane,
+ AgentRunBoardRun,
+ AgentRunBoardRunStatus,
+} from '@lobechat/types';
+
+import type {
+ AgentRunBoardInterventionRow,
+ AgentRunBoardRow,
+} from '@/database/models/agentRunBoard';
+
+import { HETERO_OPERATION_SILENCE_MS, isOperationLeaseFresh } from '../agentRuntime/operationLease';
+
+const MAX_LANES = 30;
+const MAX_FAILED_ATTENTION = 20;
+const MAX_DETAIL_LENGTH = 200;
+const ACTIVITY_BUCKETS = 24;
+/** An hour reads better in whole 5-minute slices. */
+const SHORT_WINDOW_BUCKETS = 12;
+const HOUR_MS = 60 * 60_000;
+
+const pendingInterventions = (row: AgentRunBoardRow, now: number): AgentRunBoardInterventionRow[] =>
+ // Interventions time out lazily on read, so a past deadline can still say `pending`.
+ row.interventions.filter((i) => i.status === 'pending' && i.deadline.getTime() > now);
+
+/**
+ * Turn a stored operation status into what the team should believe. `running`
+ * alone is unreliable: dead rows keep it until something settles them, so a
+ * row without a fresh lease reads as stopped rather than as live work.
+ */
+export const classifyRun = (row: AgentRunBoardRow, now: number): AgentRunBoardRunStatus | null => {
+ const leaseFresh = isOperationLeaseFresh(row, {
+ heterogeneous: Boolean(row.heteroType),
+ now,
+ });
+
+ switch (row.status) {
+ case 'done': {
+ return 'done';
+ }
+ case 'error':
+ case 'abandoned': {
+ return 'failed';
+ }
+ case 'interrupted': {
+ return 'stopped';
+ }
+ case 'running': {
+ return leaseFresh ? 'running' : 'stopped';
+ }
+ // Parked on something external: no step heartbeat, so only the long window applies.
+ case 'waiting_for_async_tool':
+ case 'waiting_for_client': {
+ return now - row.updatedAt.getTime() < HETERO_OPERATION_SILENCE_MS ? 'running' : 'stopped';
+ }
+ case 'waiting_for_human': {
+ if (row.interventions.length === 0 || pendingInterventions(row, now).length > 0)
+ return 'needs_human';
+ // Every ask was answered or expired, but the row may stay parked until the run ends.
+ return leaseFresh ? 'running' : 'stopped';
+ }
+ default: {
+ return null;
+ }
+ }
+};
+
+// Not the thread's title: a click opens the parent topic, so the label has to match it.
+const runTitle = (row: AgentRunBoardRow) => row.taskName || row.topicTitle || null;
+
+/** Only the viewer's own run: the marker is what the drawer reattaches to the stream with. */
+const ownRunningOperation = (row: AgentRunBoardRow, viewerId: string) =>
+ row.userId === viewerId && row.runningOperation?.operationId === row.id
+ ? row.runningOperation
+ : null;
+
+const oldestPending = (row: AgentRunBoardRow, now: number) =>
+ pendingInterventions(row, now).sort((a, b) => a.createdAt.getTime() - b.createdAt.getTime())[0];
+
+const toRun = (
+ row: AgentRunBoardRow,
+ status: AgentRunBoardRunStatus,
+ now: number,
+ viewerId: string,
+): AgentRunBoardRun => ({
+ endedAt:
+ status === 'running' || status === 'needs_human' ? null : (row.completedAt ?? row.updatedAt),
+ id: row.id,
+ model: row.model,
+ runningOperation:
+ status === 'running' || status === 'needs_human' ? ownRunningOperation(row, viewerId) : null,
+ startedAt: row.startedAt ?? row.createdAt,
+ status,
+ title: runTitle(row),
+ topicId: row.topicId,
+ trigger: row.trigger,
+ userId: row.userId,
+ waitingSince:
+ status === 'needs_human' ? (oldestPending(row, now)?.createdAt ?? row.updatedAt) : null,
+});
+
+const laneRank = (lane: AgentRunBoardLane) => {
+ const has = (status: AgentRunBoardRunStatus) => lane.runs.some((r) => r.status === status);
+ if (has('needs_human')) return 0;
+ if (has('failed')) return 1;
+ if (has('running')) return 2;
+ return 3;
+};
+
+const latestStart = (lane: AgentRunBoardLane) =>
+ Math.max(...lane.runs.map((r) => r.startedAt.getTime()));
+
+const attentionBase = (row: AgentRunBoardRow, viewerId: string) => ({
+ agentAvatar: row.agentAvatar,
+ agentBackgroundColor: row.agentBackgroundColor,
+ agentId: row.agentId,
+ agentTitle: row.agentTitle,
+ operationId: row.id,
+ runningOperation: ownRunningOperation(row, viewerId),
+ title: runTitle(row),
+ topicId: row.topicId,
+});
+
+const toNeedsHuman = (
+ row: AgentRunBoardRow,
+ viewerId: string,
+ now: number,
+): AgentRunBoardAttentionItem => {
+ const first = oldestPending(row, now);
+ const ownerUserId = first?.userId ?? row.userId;
+
+ return {
+ ...attentionBase(row, viewerId),
+ detail: first?.canonicalToolKey ?? null,
+ isMine: ownerUserId === viewerId,
+ kind: 'needs_human',
+ ownerUserId,
+ since: first?.createdAt ?? row.updatedAt,
+ };
+};
+
+const toFailed = (row: AgentRunBoardRow, viewerId: string): AgentRunBoardAttentionItem => ({
+ ...attentionBase(row, viewerId),
+ detail: (row.errorMessage || row.errorType)?.slice(0, MAX_DETAIL_LENGTH) ?? null,
+ isMine: row.userId === viewerId,
+ kind: 'failed',
+ ownerUserId: row.userId,
+ since: row.completedAt ?? row.updatedAt,
+});
+
+/**
+ * Counted from every visible run, not the capped lanes, so the chart stays true
+ * for a workspace with more agents than the timeline shows. A run that began
+ * before the window lands in its first slice.
+ */
+const buildActivity = (
+ runs: AgentRunBoardRun[],
+ windowStart: Date,
+ generatedAt: Date,
+): AgentRunBoardActivityBucket[] => {
+ const start = windowStart.getTime();
+ const span = generatedAt.getTime() - start;
+ const bucketCount = span <= HOUR_MS ? SHORT_WINDOW_BUCKETS : ACTIVITY_BUCKETS;
+ const step = span / bucketCount;
+ const buckets: AgentRunBoardActivityBucket[] = Array.from(
+ { length: bucketCount },
+ (_, index) => ({
+ done: 0,
+ failed: 0,
+ needsHuman: 0,
+ running: 0,
+ startedAt: new Date(start + step * index),
+ }),
+ );
+
+ for (const run of runs) {
+ if (run.status === 'stopped') continue;
+ const index = Math.floor((run.startedAt.getTime() - start) / step);
+ const bucket = buckets[Math.min(bucketCount - 1, Math.max(0, index))];
+ if (run.status === 'needs_human') bucket.needsHuman += 1;
+ else bucket[run.status] += 1;
+ }
+
+ return buckets;
+};
+
+export const buildAgentRunBoard = ({
+ generatedAt,
+ rows,
+ viewerId,
+ windowStart,
+}: {
+ generatedAt: Date;
+ rows: AgentRunBoardRow[];
+ viewerId: string;
+ windowStart: Date;
+}): AgentRunBoardData => {
+ const now = generatedAt.getTime();
+ const summary = { done: 0, failed: 0, needsHuman: 0, running: 0 };
+ const lanesByAgent = new Map<string, AgentRunBoardLane>();
+ const needsHuman: AgentRunBoardAttentionItem[] = [];
+ const failed: AgentRunBoardAttentionItem[] = [];
+ const visibleRuns: AgentRunBoardRun[] = [];
+
+ for (const row of rows) {
+ const status = classifyRun(row, now);
+ if (!status) continue;
+
+ const run = toRun(row, status, now, viewerId);
+ // A dead row keeps a recent `created_at`, but it can have stopped before the window.
+ if (run.endedAt && run.endedAt.getTime() < windowStart.getTime()) continue;
+
+ visibleRuns.push(run);
+ if (status === 'running') summary.running += 1;
+ if (status === 'done') summary.done += 1;
+ if (status === 'needs_human') {
+ summary.needsHuman += 1;
+ needsHuman.push(toNeedsHuman(row, viewerId, now));
+ }
+ if (status === 'failed') {
+ summary.failed += 1;
+ failed.push(toFailed(row, viewerId));
+ }
+
+ const lane = lanesByAgent.get(row.agentId);
+ if (lane) {
+ lane.runs.push(run);
+ continue;
+ }
+ lanesByAgent.set(row.agentId, {
+ agentId: row.agentId,
+ avatar: row.agentAvatar,
+ backgroundColor: row.agentBackgroundColor,
+ ownerUserId: row.agentOwnerId,
+ runs: [run],
+ title: row.agentTitle,
+ });
+ }
+
+ const lanes = [...lanesByAgent.values()].sort(
+ (a, b) => laneRank(a) - laneRank(b) || latestStart(b) - latestStart(a),
+ );
+
+ return {
+ activity: buildActivity(visibleRuns, windowStart, generatedAt),
+ attention: [
+ // Mine first, then the longest wait: what the viewer can unblock leads.
+ ...needsHuman.sort(
+ (a, b) => Number(b.isMine) - Number(a.isMine) || a.since.getTime() - b.since.getTime(),
+ ),
+ ...failed
+ .sort((a, b) => b.since.getTime() - a.since.getTime())
+ .slice(0, MAX_FAILED_ATTENTION),
+ ],
+ generatedAt,
+ hiddenLaneCount: Math.max(0, lanes.length - MAX_LANES),
+ lanes: lanes.slice(0, MAX_LANES),
+ summary,
+ windowStart,
+ };
+};
diff --git a/docs/development/database-schema.dbml b/docs/development/database-schema.dbml
index b1ccaf94a79..fc737ba84ce 100644
--- a/docs/development/database-schema.dbml
+++ b/docs/development/database-schema.dbml
@@ -849,6 +849,7 @@ table agent_operations {
parent_operation_id [name: 'agent_operations_parent_operation_id_idx']
status [name: 'agent_operations_status_idx']
(user_id, created_at) [name: 'agent_operations_user_id_created_at_idx']
+ (workspace_id, created_at) [name: 'agent_operations_workspace_id_created_at_idx']
metadata [name: 'agent_operations_metadata_idx']
}
}
diff --git a/locales/en-US/home.json b/locales/en-US/home.json
index 238f90d5f73..820df51288d 100644
--- a/locales/en-US/home.json
+++ b/locales/en-US/home.json
@@ -166,7 +166,6 @@
"inbox.running.title": "{{count}} task running",
"inbox.running.title_plural": "{{count}} tasks running",
"inbox.scope.mine": "Mine",
- "inbox.scope.onlyMe": "Only mine",
"inbox.scope.team": "Team",
"inbox.unread.followUp": "Follow up",
"inbox.unread.followUpPlaceholder": "Reply to continue this run…",
@@ -189,5 +188,32 @@
"starter.modelInUse": "Already using {{name}}",
"starter.modelSwitched": "Switched to {{name}}",
"starter.newLabel": "New",
- "starter.write": "Write"
+ "starter.write": "Write",
+ "team.agent.untitled": "Untitled agent",
+ "team.attention.blocked": "Waiting on teammates",
+ "team.attention.empty": "Nothing is waiting on anyone right now.",
+ "team.attention.failed": "Failed",
+ "team.attention.failedAgo": "Failed {{time}} ago",
+ "team.attention.needsYou": "Needs you",
+ "team.attention.waiting": "Waiting {{time}}",
+ "team.axis.now": "Now",
+ "team.calendar.more": "+{{count}}",
+ "team.empty_one": "No team agent runs in the last hour.",
+ "team.empty_other": "No team agent runs in the last {{count}} hours.",
+ "team.lane.more_one": "+{{count}} more topic",
+ "team.lane.more_other": "+{{count}} more topics",
+ "team.lanes.hidden_one": "{{count}} more agent not shown",
+ "team.lanes.hidden_other": "{{count}} more agents not shown",
+ "team.run.untitled": "Untitled run",
+ "team.status.done": "Done",
+ "team.status.failed": "Failed",
+ "team.status.needs_human": "Needs a person",
+ "team.status.running": "Running",
+ "team.status.stopped": "Stopped",
+ "team.summary.done": "Done",
+ "team.summary.failed": "Failed",
+ "team.summary.needsHuman": "Waiting on people",
+ "team.summary.running": "Running",
+ "team.window_one": "{{count}}h",
+ "team.window_other": "{{count}}h"
}
diff --git a/locales/zh-CN/home.json b/locales/zh-CN/home.json
index f2433aa76dc..143234e1d61 100644
--- a/locales/zh-CN/home.json
+++ b/locales/zh-CN/home.json
@@ -166,7 +166,6 @@
"inbox.running.title": "{{count}} 个任务正在执行",
"inbox.running.title_plural": "{{count}} 个任务正在执行",
"inbox.scope.mine": "我的",
- "inbox.scope.onlyMe": "仅我",
"inbox.scope.team": "团队",
"inbox.unread.followUp": "继续追问",
"inbox.unread.followUpPlaceholder": "回复以继续这次运行…",
@@ -189,5 +188,28 @@
"starter.modelInUse": "已在使用 {{name}}",
"starter.modelSwitched": "已切换至 {{name}}",
"starter.newLabel": "上新",
- "starter.write": "写作"
+ "starter.write": "写作",
+ "team.agent.untitled": "未命名助手",
+ "team.attention.blocked": "等待团队成员",
+ "team.attention.empty": "目前没有需要处理的事项。",
+ "team.attention.failed": "失败",
+ "team.attention.failedAgo": "{{time}}前失败",
+ "team.attention.needsYou": "需要你处理",
+ "team.attention.waiting": "已等待 {{time}}",
+ "team.axis.now": "现在",
+ "team.calendar.more": "+{{count}}",
+ "team.empty_other": "最近 {{count}} 小时团队没有 Agent 运行。",
+ "team.lane.more_other": "还有 {{count}} 个话题",
+ "team.lanes.hidden_other": "还有 {{count}} 个助手未显示",
+ "team.run.untitled": "未命名运行",
+ "team.status.done": "已完成",
+ "team.status.failed": "失败",
+ "team.status.needs_human": "等待人工处理",
+ "team.status.running": "运行中",
+ "team.status.stopped": "已停止",
+ "team.summary.done": "已完成",
+ "team.summary.failed": "失败",
+ "team.summary.needsHuman": "等待人工处理",
+ "team.summary.running": "运行中",
+ "team.window_other": "{{count}} 小时"
}
diff --git a/packages/alint/fixtures/no-unguarded-response-field/good-whole-payload-field-reads.tsx b/packages/alint/fixtures/no-unguarded-response-field/good-whole-payload-field-reads.tsx
new file mode 100644
index 00000000000..76f53b0896c
--- /dev/null
+++ b/packages/alint/fixtures/no-unguarded-response-field/good-whole-payload-field-reads.tsx
@@ -0,0 +1,23 @@
+import type { AgentRunBoardData } from '@lobechat/types';
+
+import { buildHourCells } from './layout';
+
+// The prop is a whole named payload, so nothing read from it is marked as a response.
+export const Calendar = ({ board }: { board: AgentRunBoardData }) => {
+ const cells = buildHourCells(board.lanes, board.generatedAt);
+
+ return <div>{cells.length}</div>;
+};
+
+export const Timeline = ({ board }: { board: AgentRunBoardData }) => {
+ const { hiddenLaneCount, lanes } = board;
+
+ return (
+ <div>
+ {lanes.map((lane) => (
+ <span key={lane.agentId}>{lane.title}</span>
+ ))}
+ {board.attention.length + hiddenLaneCount}
+ </div>
+ );
+};
diff --git a/packages/alint/rules/no-unguarded-response-field/rule.alint.toml b/packages/alint/rules/no-unguarded-response-field/rule.alint.toml
index 5fc6e814b6d..700bcb1d620 100644
--- a/packages/alint/rules/no-unguarded-response-field/rule.alint.toml
+++ b/packages/alint/rules/no-unguarded-response-field/rule.alint.toml
@@ -24,11 +24,13 @@ Do not report — these are the places the rule does not apply:
- scalar fields that are rendered, compared or formatted (`{data.title}`, `data.count > 0`, `` `#${pr.number}` ``, `formatDate(data.createdAt)`): an undefined scalar renders nothing or compares false; it does not crash;
- values that come from a zustand store or its selectors, React state, context, URL params, `localStorage`, constants, or something the file built itself — even if they were originally fetched; the store owns normalization;
- props or parameters typed with a plain interface or an element type (`items: Item[]`, `pullRequests: PullRequestLink[]`) rather than a slice of a response type. The file cannot see where those come from;
-- props or parameters typed with a whole named payload type (`detail: ChannelDetail`, `message: ChannelPublicMessage`), even when it is imported from `@lobechat/types` or an endpoint returns it. Every shared payload shape lives in `@lobechat/types`, so the type's name or package does not show that this value came from the server rather than from a store that already holds it. Only the indexed-access, `ReturnType` and `RouterOutput` forms above mark a prop as a response;
+- props or parameters typed with a whole named payload type (`detail: ChannelDetail`, `message: ChannelPublicMessage`), even when it is imported from `@lobechat/types` or an endpoint returns it. Every shared payload shape lives in `@lobechat/types`, so the type's name or package does not show that this value came from the server rather than from a store that already holds it. Only the indexed-access, `ReturnType` and `RouterOutput` forms above mark a prop as a response. This covers everything read from such a prop too: `board.lanes.length`, or `const { lanes } = board` followed by `lanes.map(...)`, is out of scope when `board: AgentRunBoardData`;
- an array the client derived from a response (`data.items.map(...)` is one finding at `.map`; the `.filter` chained after it is not another);
- local bridges rather than the server: anything imported from `@/services/electron/*` whatever the service is named (`imessageBridgeService`, `electronDevtoolsService`), `window.electron`, `ipcRenderer`, the device gateway, the local file system;
- fields the server type itself marks optional (`field?:`) when the file already handles them — TypeScript forces that path;
- test files, stories, fixtures and mock data.
If an exclusion applies, return no finding. If you cannot tell from this file whether the value is a server response, return no finding rather than a low-confidence guess.
+
+Every finding you return is a defect someone must fix. Before returning one, read its message: if it says the value is excluded, that no change is required, or that there is no finding, delete it. Never use a finding to record why you decided not to report something.
"""
diff --git a/packages/const/src/apiKeyScope.ts b/packages/const/src/apiKeyScope.ts
index aa5af908cb0..39e7a90dad1 100644
--- a/packages/const/src/apiKeyScope.ts
+++ b/packages/const/src/apiKeyScope.ts
@@ -210,6 +210,7 @@ export const TRPC_NAMESPACE_API_KEY_RULES: Record<string, TrpcNamespaceScopeRule
// memory, tool results — and `getSnapshotUrl` hands back a presigned URL that
// needs no further auth, so a restricted key holding one would read past its
// own scope. Same call as `llmGenerationTracing`.
+ agentRunBoard: 'blocked',
agentTrace: 'blocked',
aiAgent: rw('agent:read', 'agent:write'),
aiChat: { any: 'model:invoke' },
diff --git a/packages/database/migrations/0210_agent_operations_workspace_created_at_idx.sql b/packages/database/migrations/0210_agent_operations_workspace_created_at_idx.sql
new file mode 100644
index 00000000000..1b936bde2bc
--- /dev/null
+++ b/packages/database/migrations/0210_agent_operations_workspace_created_at_idx.sql
@@ -0,0 +1 @@
+CREATE INDEX IF NOT EXISTS "agent_operations_workspace_id_created_at_idx" ON "agent_operations" USING btree ("workspace_id","created_at");
\ No newline at end of file
diff --git a/packages/database/migrations/meta/0200_snapshot.json b/packages/database/migrations/meta/0210_snapshot.json
similarity index 90%
rename from packages/database/migrations/meta/0200_snapshot.json
rename to packages/database/migrations/meta/0210_snapshot.json
index fddc7f5f3e4..e915ca8cab7 100644
--- a/packages/database/migrations/meta/0200_snapshot.json
+++ b/packages/database/migrations/meta/0210_snapshot.json
@@ -1,28 +1,8 @@
{
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- },
+ "id": "cde6aca7-5edb-4f76-9a5c-e9a8d7f3721e",
+ "prevId": "c1058806-e910-4f65-99ad-9f434bc92441",
+ "version": "7",
"dialect": "postgresql",
- "enums": {},
- "id": "be44ceb9-0874-47bd-9473-386a5c55c022",
- "policies": {},
- "prevId": "15428217-3557-46ba-8f4f-431a23829ead",
- "roles": {},
- "schemas": {},
- "sequences": {
- "public.fts_search_sync_revision_seq": {
- "name": "fts_search_sync_revision_seq",
- "schema": "public",
- "increment": "1",
- "startWith": "1",
- "minValue": "1",
- "maxValue": "9223372036854775807",
- "cache": "1",
- "cycle": false
- }
- },
"tables": {
"public.acceptance_comments": {
"name": "acceptance_comments",
@@ -307,8 +287,12 @@
"name": "acceptance_comments_acceptance_id_acceptances_id_fk",
"tableFrom": "acceptance_comments",
"tableTo": "acceptances",
- "columnsFrom": ["acceptance_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "acceptance_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -316,8 +300,12 @@
"name": "acceptance_comments_author_user_id_users_id_fk",
"tableFrom": "acceptance_comments",
"tableTo": "users",
- "columnsFrom": ["author_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "author_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -325,8 +313,12 @@
"name": "acceptance_comments_author_agent_id_agents_id_fk",
"tableFrom": "acceptance_comments",
"tableTo": "agents",
- "columnsFrom": ["author_agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "author_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -334,8 +326,12 @@
"name": "acceptance_comments_workspace_id_workspaces_id_fk",
"tableFrom": "acceptance_comments",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -343,8 +339,12 @@
"name": "acceptance_comments_parent_comment_id_acceptance_comments_id_fk",
"tableFrom": "acceptance_comments",
"tableTo": "acceptance_comments",
- "columnsFrom": ["parent_comment_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
},
@@ -352,8 +352,12 @@
"name": "acceptance_comments_context_run_id_verify_runs_id_fk",
"tableFrom": "acceptance_comments",
"tableTo": "verify_runs",
- "columnsFrom": ["context_run_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "context_run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -361,8 +365,12 @@
"name": "acceptance_comments_evidence_id_verify_evidence_id_fk",
"tableFrom": "acceptance_comments",
"tableTo": "verify_evidence",
- "columnsFrom": ["evidence_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "evidence_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -370,8 +378,12 @@
"name": "acceptance_comments_resolved_by_user_id_users_id_fk",
"tableFrom": "acceptance_comments",
"tableTo": "users",
- "columnsFrom": ["resolved_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "resolved_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -480,8 +492,12 @@
"name": "acceptance_flow_edges_flow_id_acceptance_flows_id_fk",
"tableFrom": "acceptance_flow_edges",
"tableTo": "acceptance_flows",
- "columnsFrom": ["flow_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "flow_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -489,8 +505,14 @@
"name": "acceptance_flow_edges_flow_id_source_node_id_acceptance_flow_nodes_flow_id_id_fk",
"tableFrom": "acceptance_flow_edges",
"tableTo": "acceptance_flow_nodes",
- "columnsFrom": ["flow_id", "source_node_id"],
- "columnsTo": ["flow_id", "id"],
+ "columnsFrom": [
+ "flow_id",
+ "source_node_id"
+ ],
+ "columnsTo": [
+ "flow_id",
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -498,8 +520,14 @@
"name": "acceptance_flow_edges_flow_id_target_node_id_acceptance_flow_nodes_flow_id_id_fk",
"tableFrom": "acceptance_flow_edges",
"tableTo": "acceptance_flow_nodes",
- "columnsFrom": ["flow_id", "target_node_id"],
- "columnsTo": ["flow_id", "id"],
+ "columnsFrom": [
+ "flow_id",
+ "target_node_id"
+ ],
+ "columnsTo": [
+ "flow_id",
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -627,8 +655,12 @@
"name": "acceptance_flow_nodes_flow_id_acceptance_flows_id_fk",
"tableFrom": "acceptance_flow_nodes",
"tableTo": "acceptance_flows",
- "columnsFrom": ["flow_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "flow_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -636,8 +668,12 @@
"name": "acceptance_flow_nodes_criterion_id_verify_criteria_id_fk",
"tableFrom": "acceptance_flow_nodes",
"tableTo": "verify_criteria",
- "columnsFrom": ["criterion_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "criterion_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
},
@@ -645,8 +681,12 @@
"name": "acceptance_flow_nodes_sub_flow_id_acceptance_flows_id_fk",
"tableFrom": "acceptance_flow_nodes",
"tableTo": "acceptance_flows",
- "columnsFrom": ["sub_flow_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "sub_flow_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
}
@@ -729,8 +769,12 @@
"name": "acceptance_flows_acceptance_id_acceptances_id_fk",
"tableFrom": "acceptance_flows",
"tableTo": "acceptances",
- "columnsFrom": ["acceptance_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "acceptance_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1159,8 +1203,12 @@
"name": "agents_user_id_users_id_fk",
"tableFrom": "agents",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1168,8 +1216,12 @@
"name": "agents_workspace_id_workspaces_id_fk",
"tableFrom": "agents",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1177,8 +1229,12 @@
"name": "agents_session_group_id_session_groups_id_fk",
"tableFrom": "agents",
"tableTo": "session_groups",
- "columnsFrom": ["session_group_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "session_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1313,8 +1369,12 @@
"name": "agents_files_file_id_files_id_fk",
"tableFrom": "agents_files",
"tableTo": "files",
- "columnsFrom": ["file_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1322,8 +1382,12 @@
"name": "agents_files_agent_id_agents_id_fk",
"tableFrom": "agents_files",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1331,8 +1395,12 @@
"name": "agents_files_user_id_users_id_fk",
"tableFrom": "agents_files",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1340,8 +1408,12 @@
"name": "agents_files_workspace_id_workspaces_id_fk",
"tableFrom": "agents_files",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1349,7 +1421,11 @@
"compositePrimaryKeys": {
"agents_files_file_id_agent_id_user_id_pk": {
"name": "agents_files_file_id_agent_id_user_id_pk",
- "columns": ["file_id", "agent_id", "user_id"]
+ "columns": [
+ "file_id",
+ "agent_id",
+ "user_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -1481,8 +1557,12 @@
"name": "agents_knowledge_bases_agent_id_agents_id_fk",
"tableFrom": "agents_knowledge_bases",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1490,8 +1570,12 @@
"name": "agents_knowledge_bases_knowledge_base_id_knowledge_bases_id_fk",
"tableFrom": "agents_knowledge_bases",
"tableTo": "knowledge_bases",
- "columnsFrom": ["knowledge_base_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "knowledge_base_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1499,8 +1583,12 @@
"name": "agents_knowledge_bases_user_id_users_id_fk",
"tableFrom": "agents_knowledge_bases",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1508,8 +1596,12 @@
"name": "agents_knowledge_bases_workspace_id_workspaces_id_fk",
"tableFrom": "agents_knowledge_bases",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1517,7 +1609,10 @@
"compositePrimaryKeys": {
"agents_knowledge_bases_agent_id_knowledge_base_id_pk": {
"name": "agents_knowledge_bases_agent_id_knowledge_base_id_pk",
- "columns": ["agent_id", "knowledge_base_id"]
+ "columns": [
+ "agent_id",
+ "knowledge_base_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -1610,232 +1705,251 @@
"notNull": false,
"default": "'{}'::jsonb"
},
- "revoked_at": {
- "name": "revoked_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": false
- },
- "accessed_at": {
- "name": "accessed_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- }
- },
- "indexes": {
- "agent_accounts_agent_kind_provider_identifier_unique": {
- "name": "agent_accounts_agent_kind_provider_identifier_unique",
- "columns": [
- {
- "expression": "agent_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "kind",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "provider",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "identifier",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
- ],
- "isUnique": true,
- "where": "\"agent_accounts\".\"status\" <> 'revoked'",
- "concurrently": false,
- "method": "btree",
- "with": {}
- },
- "agent_accounts_provider_identifier_unique": {
- "name": "agent_accounts_provider_identifier_unique",
- "columns": [
- {
- "expression": "provider",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- },
- {
- "expression": "identifier",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
- ],
- "isUnique": true,
- "where": "\"agent_accounts\".\"status\" <> 'revoked'",
- "concurrently": false,
- "method": "btree",
- "with": {}
- },
- "agent_accounts_agent_id_idx": {
- "name": "agent_accounts_agent_id_idx",
- "columns": [
- {
- "expression": "agent_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
- ],
- "isUnique": false,
- "concurrently": false,
- "method": "btree",
- "with": {}
- },
- "agent_accounts_user_id_idx": {
- "name": "agent_accounts_user_id_idx",
- "columns": [
- {
- "expression": "user_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
- ],
- "isUnique": false,
- "concurrently": false,
- "method": "btree",
- "with": {}
- },
- "agent_accounts_workspace_id_idx": {
- "name": "agent_accounts_workspace_id_idx",
- "columns": [
- {
- "expression": "workspace_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
- ],
- "isUnique": false,
- "concurrently": false,
- "method": "btree",
- "with": {}
- }
- },
- "foreignKeys": {
- "agent_accounts_agent_id_agents_id_fk": {
- "name": "agent_accounts_agent_id_agents_id_fk",
- "tableFrom": "agent_accounts",
- "tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "agent_accounts_user_id_users_id_fk": {
- "name": "agent_accounts_user_id_users_id_fk",
- "tableFrom": "agent_accounts",
- "tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "agent_accounts_workspace_id_workspaces_id_fk": {
- "name": "agent_accounts_workspace_id_workspaces_id_fk",
- "tableFrom": "agent_accounts",
- "tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.agent_bot_providers": {
- "name": "agent_bot_providers",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "agent_id": {
- "name": "agent_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "platform": {
- "name": "platform",
- "type": "varchar(50)",
- "primaryKey": false,
- "notNull": true
- },
- "application_id": {
- "name": "application_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
"settings": {
"name": "settings",
"type": "jsonb",
"primaryKey": false,
- "notNull": false,
+ "notNull": true,
"default": "'{}'::jsonb"
},
- "enabled": {
- "name": "enabled",
- "type": "boolean",
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "timestamp with time zone",
"primaryKey": false,
- "notNull": true,
- "default": true
+ "notNull": false
+ },
+ "accessed_at": {
+ "name": "accessed_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_accounts_agent_kind_provider_identifier_unique": {
+ "name": "agent_accounts_agent_kind_provider_identifier_unique",
+ "columns": [
+ {
+ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "kind",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "provider",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "identifier",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"agent_accounts\".\"status\" <> 'revoked'",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_accounts_provider_identifier_unique": {
+ "name": "agent_accounts_provider_identifier_unique",
+ "columns": [
+ {
+ "expression": "provider",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "identifier",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"agent_accounts\".\"status\" <> 'revoked'",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_accounts_agent_id_idx": {
+ "name": "agent_accounts_agent_id_idx",
+ "columns": [
+ {
+ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_accounts_user_id_idx": {
+ "name": "agent_accounts_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_accounts_workspace_id_idx": {
+ "name": "agent_accounts_workspace_id_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_accounts_agent_id_agents_id_fk": {
+ "name": "agent_accounts_agent_id_agents_id_fk",
+ "tableFrom": "agent_accounts",
+ "tableTo": "agents",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_accounts_user_id_users_id_fk": {
+ "name": "agent_accounts_user_id_users_id_fk",
+ "tableFrom": "agent_accounts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_accounts_workspace_id_workspaces_id_fk": {
+ "name": "agent_accounts_workspace_id_workspaces_id_fk",
+ "tableFrom": "agent_accounts",
+ "tableTo": "workspaces",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_bot_providers": {
+ "name": "agent_bot_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "agent_id": {
+ "name": "agent_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "application_id": {
+ "name": "application_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credentials": {
+ "name": "credentials",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "settings": {
+ "name": "settings",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{}'::jsonb"
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
},
"accessed_at": {
"name": "accessed_at",
@@ -1947,8 +2061,12 @@
"name": "agent_bot_providers_agent_id_agents_id_fk",
"tableFrom": "agent_bot_providers",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1956,8 +2074,12 @@
"name": "agent_bot_providers_user_id_users_id_fk",
"tableFrom": "agent_bot_providers",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1965,8 +2087,12 @@
"name": "agent_bot_providers_workspace_id_workspaces_id_fk",
"tableFrom": "agent_bot_providers",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2232,8 +2358,12 @@
"name": "agent_cron_jobs_agent_id_agents_id_fk",
"tableFrom": "agent_cron_jobs",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2241,8 +2371,12 @@
"name": "agent_cron_jobs_group_id_chat_groups_id_fk",
"tableFrom": "agent_cron_jobs",
"tableTo": "chat_groups",
- "columnsFrom": ["group_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2250,8 +2384,12 @@
"name": "agent_cron_jobs_user_id_users_id_fk",
"tableFrom": "agent_cron_jobs",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2259,8 +2397,12 @@
"name": "agent_cron_jobs_workspace_id_workspaces_id_fk",
"tableFrom": "agent_cron_jobs",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2698,8 +2840,12 @@
"name": "agent_documents_user_id_users_id_fk",
"tableFrom": "agent_documents",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2707,8 +2853,12 @@
"name": "agent_documents_workspace_id_workspaces_id_fk",
"tableFrom": "agent_documents",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2716,8 +2866,12 @@
"name": "agent_documents_agent_id_agents_id_fk",
"tableFrom": "agent_documents",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2725,8 +2879,12 @@
"name": "agent_documents_document_id_documents_id_fk",
"tableFrom": "agent_documents",
"tableTo": "documents",
- "columnsFrom": ["document_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2734,8 +2892,12 @@
"name": "agent_documents_deleted_by_user_id_users_id_fk",
"tableFrom": "agent_documents",
"tableTo": "users",
- "columnsFrom": ["deleted_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "deleted_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2743,8 +2905,12 @@
"name": "agent_documents_deleted_by_agent_id_agents_id_fk",
"tableFrom": "agent_documents",
"tableTo": "agents",
- "columnsFrom": ["deleted_by_agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "deleted_by_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2755,70 +2921,388 @@
"checkConstraints": {},
"isRLSEnabled": false
},
- "public.agent_eval_benchmarks": {
- "name": "agent_eval_benchmarks",
+ "public.agent_eval_memories": {
+ "name": "agent_eval_memories",
"schema": "",
"columns": {
"id": {
"name": "id",
- "type": "text",
+ "type": "uuid",
"primaryKey": true,
- "notNull": true
+ "notNull": true,
+ "default": "gen_random_uuid()"
},
- "identifier": {
- "name": "identifier",
+ "user_id": {
+ "name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
- "name": {
- "name": "name",
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "run_id": {
+ "name": "run_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
- "description": {
- "name": "description",
+ "topic_id": {
+ "name": "topic_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
- "rubrics": {
- "name": "rubrics",
- "type": "jsonb",
+ "thread_id": {
+ "name": "thread_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "attempt_id": {
+ "name": "attempt_id",
+ "type": "text",
"primaryKey": false,
"notNull": true
},
- "reference_url": {
- "name": "reference_url",
+ "layer": {
+ "name": "layer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fixture_hash": {
+ "name": "fixture_hash",
"type": "text",
"primaryKey": false,
"notNull": false
},
- "metadata": {
- "name": "metadata",
- "type": "jsonb",
+ "title": {
+ "name": "title",
+ "type": "text",
"primaryKey": false,
"notNull": false
},
- "user_id": {
- "name": "user_id",
+ "summary": {
+ "name": "summary",
"type": "text",
"primaryKey": false,
"notNull": false
},
- "workspace_id": {
- "name": "workspace_id",
+ "details": {
+ "name": "details",
"type": "text",
"primaryKey": false,
"notNull": false
},
- "is_system": {
- "name": "is_system",
- "type": "boolean",
+ "memory_category": {
+ "name": "memory_category",
+ "type": "text",
"primaryKey": false,
- "notNull": true,
- "default": true
+ "notNull": false
+ },
+ "memory_type": {
+ "name": "memory_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "embedding": {
+ "name": "embedding",
+ "type": "vector(1024)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "captured_at": {
+ "name": "captured_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "removed_reason": {
+ "name": "removed_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessed_at": {
+ "name": "accessed_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_eval_memories_attempt_id_idx": {
+ "name": "agent_eval_memories_attempt_id_idx",
+ "columns": [
+ {
+ "expression": "attempt_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_eval_memories_run_id_idx": {
+ "name": "agent_eval_memories_run_id_idx",
+ "columns": [
+ {
+ "expression": "run_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_eval_memories_topic_id_idx": {
+ "name": "agent_eval_memories_topic_id_idx",
+ "columns": [
+ {
+ "expression": "topic_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_eval_memories_thread_id_idx": {
+ "name": "agent_eval_memories_thread_id_idx",
+ "columns": [
+ {
+ "expression": "thread_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_eval_memories_user_id_idx": {
+ "name": "agent_eval_memories_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_eval_memories_workspace_id_idx": {
+ "name": "agent_eval_memories_workspace_id_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_eval_memories_user_id_users_id_fk": {
+ "name": "agent_eval_memories_user_id_users_id_fk",
+ "tableFrom": "agent_eval_memories",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_eval_memories_workspace_id_workspaces_id_fk": {
+ "name": "agent_eval_memories_workspace_id_workspaces_id_fk",
+ "tableFrom": "agent_eval_memories",
+ "tableTo": "workspaces",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_eval_memories_run_id_agent_eval_runs_id_fk": {
+ "name": "agent_eval_memories_run_id_agent_eval_runs_id_fk",
+ "tableFrom": "agent_eval_memories",
+ "tableTo": "agent_eval_runs",
+ "columnsFrom": [
+ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_eval_memories_topic_id_topics_id_fk": {
+ "name": "agent_eval_memories_topic_id_topics_id_fk",
+ "tableFrom": "agent_eval_memories",
+ "tableTo": "topics",
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "agent_eval_memories_thread_id_threads_id_fk": {
+ "name": "agent_eval_memories_thread_id_threads_id_fk",
+ "tableFrom": "agent_eval_memories",
+ "tableTo": "threads",
+ "columnsFrom": [
+ "thread_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_eval_benchmarks": {
+ "name": "agent_eval_benchmarks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identifier": {
+ "name": "identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rubrics": {
+ "name": "rubrics",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reference_url": {
+ "name": "reference_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
},
"accessed_at": {
"name": "accessed_at",
@@ -2938,8 +3422,12 @@
"name": "agent_eval_benchmarks_user_id_users_id_fk",
"tableFrom": "agent_eval_benchmarks",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2947,8 +3435,12 @@
"name": "agent_eval_benchmarks_workspace_id_workspaces_id_fk",
"tableFrom": "agent_eval_benchmarks",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3162,8 +3654,12 @@
"name": "agent_eval_datasets_benchmark_id_agent_eval_benchmarks_id_fk",
"tableFrom": "agent_eval_datasets",
"tableTo": "agent_eval_benchmarks",
- "columnsFrom": ["benchmark_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "benchmark_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3171,8 +3667,12 @@
"name": "agent_eval_datasets_source_experiment_id_agent_eval_experiments_id_fk",
"tableFrom": "agent_eval_datasets",
"tableTo": "agent_eval_experiments",
- "columnsFrom": ["source_experiment_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "source_experiment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -3180,8 +3680,12 @@
"name": "agent_eval_datasets_user_id_users_id_fk",
"tableFrom": "agent_eval_datasets",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3189,8 +3693,197 @@
"name": "agent_eval_datasets_workspace_id_workspaces_id_fk",
"tableFrom": "agent_eval_datasets",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_eval_environments": {
+ "name": "agent_eval_environments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier": {
+ "name": "identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessed_at": {
+ "name": "accessed_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_eval_environments_user_id_idx": {
+ "name": "agent_eval_environments_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_eval_environments_workspace_id_idx": {
+ "name": "agent_eval_environments_workspace_id_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_eval_environments_identifier_user_id_unique": {
+ "name": "agent_eval_environments_identifier_user_id_unique",
+ "columns": [
+ {
+ "expression": "identifier",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"agent_eval_environments\".\"identifier\" IS NOT NULL AND \"agent_eval_environments\".\"workspace_id\" IS NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_eval_environments_identifier_workspace_id_unique": {
+ "name": "agent_eval_environments_identifier_workspace_id_unique",
+ "columns": [
+ {
+ "expression": "identifier",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"agent_eval_environments\".\"identifier\" IS NOT NULL AND \"agent_eval_environments\".\"workspace_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_eval_environments_user_id_users_id_fk": {
+ "name": "agent_eval_environments_user_id_users_id_fk",
+ "tableFrom": "agent_eval_environments",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_eval_environments_workspace_id_workspaces_id_fk": {
+ "name": "agent_eval_environments_workspace_id_workspaces_id_fk",
+ "tableFrom": "agent_eval_environments",
+ "tableTo": "workspaces",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3289,8 +3982,12 @@
"name": "agent_eval_experiment_benchmarks_experiment_id_agent_eval_experiments_id_fk",
"tableFrom": "agent_eval_experiment_benchmarks",
"tableTo": "agent_eval_experiments",
- "columnsFrom": ["experiment_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "experiment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3298,8 +3995,12 @@
"name": "agent_eval_experiment_benchmarks_benchmark_id_agent_eval_benchmarks_id_fk",
"tableFrom": "agent_eval_experiment_benchmarks",
"tableTo": "agent_eval_benchmarks",
- "columnsFrom": ["benchmark_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "benchmark_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3307,8 +4008,12 @@
"name": "agent_eval_experiment_benchmarks_user_id_users_id_fk",
"tableFrom": "agent_eval_experiment_benchmarks",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3316,8 +4021,12 @@
"name": "agent_eval_experiment_benchmarks_workspace_id_workspaces_id_fk",
"tableFrom": "agent_eval_experiment_benchmarks",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3325,7 +4034,10 @@
"compositePrimaryKeys": {
"agent_eval_experiment_benchmarks_experiment_id_benchmark_id_pk": {
"name": "agent_eval_experiment_benchmarks_experiment_id_benchmark_id_pk",
- "columns": ["experiment_id", "benchmark_id"]
+ "columns": [
+ "experiment_id",
+ "benchmark_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -3432,8 +4144,12 @@
"name": "agent_eval_experiments_user_id_users_id_fk",
"tableFrom": "agent_eval_experiments",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3441,8 +4157,12 @@
"name": "agent_eval_experiments_workspace_id_workspaces_id_fk",
"tableFrom": "agent_eval_experiments",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3586,8 +4306,12 @@
"name": "agent_eval_run_topics_user_id_users_id_fk",
"tableFrom": "agent_eval_run_topics",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3595,8 +4319,12 @@
"name": "agent_eval_run_topics_workspace_id_workspaces_id_fk",
"tableFrom": "agent_eval_run_topics",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3604,8 +4332,12 @@
"name": "agent_eval_run_topics_run_id_agent_eval_runs_id_fk",
"tableFrom": "agent_eval_run_topics",
"tableTo": "agent_eval_runs",
- "columnsFrom": ["run_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3613,8 +4345,12 @@
"name": "agent_eval_run_topics_topic_id_topics_id_fk",
"tableFrom": "agent_eval_run_topics",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3622,8 +4358,12 @@
"name": "agent_eval_run_topics_test_case_id_agent_eval_test_cases_id_fk",
"tableFrom": "agent_eval_run_topics",
"tableTo": "agent_eval_test_cases",
- "columnsFrom": ["test_case_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "test_case_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3631,7 +4371,10 @@
"compositePrimaryKeys": {
"agent_eval_run_topics_run_id_topic_id_pk": {
"name": "agent_eval_run_topics_run_id_topic_id_pk",
- "columns": ["run_id", "topic_id"]
+ "columns": [
+ "run_id",
+ "topic_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -3850,8 +4593,12 @@
"name": "agent_eval_runs_dataset_id_agent_eval_datasets_id_fk",
"tableFrom": "agent_eval_runs",
"tableTo": "agent_eval_datasets",
- "columnsFrom": ["dataset_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "dataset_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3859,8 +4606,12 @@
"name": "agent_eval_runs_experiment_id_agent_eval_experiments_id_fk",
"tableFrom": "agent_eval_runs",
"tableTo": "agent_eval_experiments",
- "columnsFrom": ["experiment_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "experiment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
},
@@ -3868,8 +4619,12 @@
"name": "agent_eval_runs_target_agent_id_agents_id_fk",
"tableFrom": "agent_eval_runs",
"tableTo": "agents",
- "columnsFrom": ["target_agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "target_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3877,8 +4632,12 @@
"name": "agent_eval_runs_user_id_users_id_fk",
"tableFrom": "agent_eval_runs",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3886,8 +4645,12 @@
"name": "agent_eval_runs_workspace_id_workspaces_id_fk",
"tableFrom": "agent_eval_runs",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3895,8 +4658,12 @@
"name": "agent_eval_runs_parent_run_id_agent_eval_runs_id_fk",
"tableFrom": "agent_eval_runs",
"tableTo": "agent_eval_runs",
- "columnsFrom": ["parent_run_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
}
@@ -3921,7 +4688,7 @@
"name": "user_id",
"type": "text",
"primaryKey": false,
- "notNull": true
+ "notNull": false
},
"workspace_id": {
"name": "workspace_id",
@@ -3935,6 +4702,12 @@
"primaryKey": false,
"notNull": true
},
+ "environment_id": {
+ "name": "environment_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
"content": {
"name": "content",
"type": "jsonb",
@@ -4018,6 +4791,21 @@
"method": "btree",
"with": {}
},
+ "agent_eval_test_cases_environment_id_idx": {
+ "name": "agent_eval_test_cases_environment_id_idx",
+ "columns": [
+ {
+ "expression": "environment_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
"agent_eval_test_cases_sort_order_idx": {
"name": "agent_eval_test_cases_sort_order_idx",
"columns": [
@@ -4054,8 +4842,12 @@
"name": "agent_eval_test_cases_user_id_users_id_fk",
"tableFrom": "agent_eval_test_cases",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -4063,8 +4855,12 @@
"name": "agent_eval_test_cases_workspace_id_workspaces_id_fk",
"tableFrom": "agent_eval_test_cases",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -4072,10 +4868,27 @@
"name": "agent_eval_test_cases_dataset_id_agent_eval_datasets_id_fk",
"tableFrom": "agent_eval_test_cases",
"tableTo": "agent_eval_datasets",
- "columnsFrom": ["dataset_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "dataset_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
+ },
+ "agent_eval_test_cases_environment_id_agent_eval_environments_id_fk": {
+ "name": "agent_eval_test_cases_environment_id_agent_eval_environments_id_fk",
+ "tableFrom": "agent_eval_test_cases",
+ "tableTo": "agent_eval_environments",
+ "columnsFrom": [
+ "environment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4151,8 +4964,12 @@
"name": "agent_history_job_agents_job_id_agent_history_jobs_id_fk",
"tableFrom": "agent_history_job_agents",
"tableTo": "agent_history_jobs",
- "columnsFrom": ["job_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "job_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -4160,8 +4977,12 @@
"name": "agent_history_job_agents_agent_id_agents_id_fk",
"tableFrom": "agent_history_job_agents",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -4239,8 +5060,12 @@
"name": "agent_history_job_groups_job_id_agent_history_jobs_id_fk",
"tableFrom": "agent_history_job_groups",
"tableTo": "agent_history_jobs",
- "columnsFrom": ["job_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "job_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -4248,8 +5073,12 @@
"name": "agent_history_job_groups_group_id_chat_groups_id_fk",
"tableFrom": "agent_history_job_groups",
"tableTo": "chat_groups",
- "columnsFrom": ["group_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -4373,8 +5202,12 @@
"name": "agent_history_job_topics_job_id_agent_history_jobs_id_fk",
"tableFrom": "agent_history_job_topics",
"tableTo": "agent_history_jobs",
- "columnsFrom": ["job_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "job_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -4382,8 +5215,12 @@
"name": "agent_history_job_topics_topic_id_topics_id_fk",
"tableFrom": "agent_history_job_topics",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -4849,6 +5686,21 @@
"method": "btree",
"with": {}
},
+ "agent_inbox_messages_topic_id_idx": {
+ "name": "agent_inbox_messages_topic_id_idx",
+ "columns": [
+ {
+ "expression": "topic_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
"agent_inbox_messages_user_id_idx": {
"name": "agent_inbox_messages_user_id_idx",
"columns": [
@@ -4870,8 +5722,12 @@
"name": "agent_inbox_messages_agent_id_agents_id_fk",
"tableFrom": "agent_inbox_messages",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -4879,8 +5735,12 @@
"name": "agent_inbox_messages_user_id_users_id_fk",
"tableFrom": "agent_inbox_messages",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -4888,8 +5748,12 @@
"name": "agent_inbox_messages_workspace_id_workspaces_id_fk",
"tableFrom": "agent_inbox_messages",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -4897,8 +5761,12 @@
"name": "agent_inbox_messages_account_id_agent_accounts_id_fk",
"tableFrom": "agent_inbox_messages",
"tableTo": "agent_accounts",
- "columnsFrom": ["account_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "account_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -4906,8 +5774,12 @@
"name": "agent_inbox_messages_topic_id_topics_id_fk",
"tableFrom": "agent_inbox_messages",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -5221,8 +6093,12 @@
"name": "agent_intervention_resolutions_operation_id_agent_operations_id_fk",
"tableFrom": "agent_intervention_resolutions",
"tableTo": "agent_operations",
- "columnsFrom": ["operation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "operation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -5230,8 +6106,12 @@
"name": "agent_intervention_resolutions_user_id_users_id_fk",
"tableFrom": "agent_intervention_resolutions",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -5239,8 +6119,12 @@
"name": "agent_intervention_resolutions_workspace_id_workspaces_id_fk",
"tableFrom": "agent_intervention_resolutions",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -5704,8 +6588,12 @@
"name": "agent_interventions_operation_id_agent_operations_id_fk",
"tableFrom": "agent_interventions",
"tableTo": "agent_operations",
- "columnsFrom": ["operation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "operation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -5713,8 +6601,12 @@
"name": "agent_interventions_user_id_users_id_fk",
"tableFrom": "agent_interventions",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -5722,8 +6614,12 @@
"name": "agent_interventions_workspace_id_workspaces_id_fk",
"tableFrom": "agent_interventions",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -5731,8 +6627,12 @@
"name": "agent_interventions_resolution_id_agent_intervention_resolutions_id_fk",
"tableFrom": "agent_interventions",
"tableTo": "agent_intervention_resolutions",
- "columnsFrom": ["resolution_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "resolution_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -5894,8 +6794,12 @@
"name": "agent_label_assignments_label_id_agent_labels_id_fk",
"tableFrom": "agent_label_assignments",
"tableTo": "agent_labels",
- "columnsFrom": ["label_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "label_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -5903,8 +6807,12 @@
"name": "agent_label_assignments_agent_id_agents_id_fk",
"tableFrom": "agent_label_assignments",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -5912,8 +6820,12 @@
"name": "agent_label_assignments_user_id_users_id_fk",
"tableFrom": "agent_label_assignments",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -5921,8 +6833,12 @@
"name": "agent_label_assignments_workspace_id_workspaces_id_fk",
"tableFrom": "agent_label_assignments",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -6084,8 +7000,12 @@
"name": "agent_labels_user_id_users_id_fk",
"tableFrom": "agent_labels",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -6093,8 +7013,12 @@
"name": "agent_labels_workspace_id_workspaces_id_fk",
"tableFrom": "agent_labels",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -6377,8 +7301,12 @@
"name": "agent_mails_agent_id_agents_id_fk",
"tableFrom": "agent_mails",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -6386,8 +7314,12 @@
"name": "agent_mails_user_id_users_id_fk",
"tableFrom": "agent_mails",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -6395,8 +7327,12 @@
"name": "agent_mails_workspace_id_workspaces_id_fk",
"tableFrom": "agent_mails",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -6404,8 +7340,12 @@
"name": "agent_mails_account_id_agent_accounts_id_fk",
"tableFrom": "agent_mails",
"tableTo": "agent_accounts",
- "columnsFrom": ["account_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "account_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -6413,8 +7353,12 @@
"name": "agent_mails_signal_id_signals_id_fk",
"tableFrom": "agent_mails",
"tableTo": "signals",
- "columnsFrom": ["signal_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "signal_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -6856,6 +7800,27 @@
"method": "btree",
"with": {}
},
+ "agent_operations_workspace_id_created_at_idx": {
+ "name": "agent_operations_workspace_id_created_at_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
"agent_operations_metadata_idx": {
"name": "agent_operations_metadata_idx",
"columns": [
@@ -6877,8 +7842,12 @@
"name": "agent_operations_workspace_id_workspaces_id_fk",
"tableFrom": "agent_operations",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -6886,8 +7855,12 @@
"name": "agent_operations_agent_id_agents_id_fk",
"tableFrom": "agent_operations",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -6895,8 +7868,12 @@
"name": "agent_operations_topic_id_topics_id_fk",
"tableFrom": "agent_operations",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -6904,8 +7881,12 @@
"name": "agent_operations_thread_id_threads_id_fk",
"tableFrom": "agent_operations",
"tableTo": "threads",
- "columnsFrom": ["thread_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "thread_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -6913,8 +7894,12 @@
"name": "agent_operations_task_id_tasks_id_fk",
"tableFrom": "agent_operations",
"tableTo": "tasks",
- "columnsFrom": ["task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -6922,8 +7907,12 @@
"name": "agent_operations_chat_group_id_chat_groups_id_fk",
"tableFrom": "agent_operations",
"tableTo": "chat_groups",
- "columnsFrom": ["chat_group_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "chat_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -7123,8 +8112,12 @@
"name": "agent_account_bindings_agent_id_agents_id_fk",
"tableFrom": "agent_account_bindings",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -7132,8 +8125,12 @@
"name": "agent_account_bindings_account_id_agent_provider_accounts_id_fk",
"tableFrom": "agent_account_bindings",
"tableTo": "agent_provider_accounts",
- "columnsFrom": ["account_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "account_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -7141,8 +8138,12 @@
"name": "agent_account_bindings_user_id_users_id_fk",
"tableFrom": "agent_account_bindings",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -7150,8 +8151,12 @@
"name": "agent_account_bindings_workspace_id_workspaces_id_fk",
"tableFrom": "agent_account_bindings",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -7319,8 +8324,12 @@
"name": "agent_device_account_bindings_agent_id_agents_id_fk",
"tableFrom": "agent_device_account_bindings",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -7328,8 +8337,12 @@
"name": "agent_device_account_bindings_user_id_users_id_fk",
"tableFrom": "agent_device_account_bindings",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -7337,8 +8350,12 @@
"name": "agent_device_account_bindings_workspace_id_workspaces_id_fk",
"tableFrom": "agent_device_account_bindings",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -7346,8 +8363,12 @@
"name": "agent_device_account_bindings_device_id_devices_id_fk",
"tableFrom": "agent_device_account_bindings",
"tableTo": "devices",
- "columnsFrom": ["device_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "device_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -7355,8 +8376,12 @@
"name": "agent_device_account_bindings_account_id_agent_provider_accounts_id_fk",
"tableFrom": "agent_device_account_bindings",
"tableTo": "agent_provider_accounts",
- "columnsFrom": ["account_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "account_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -7364,8 +8389,14 @@
"name": "agent_device_account_bindings_login_fk",
"tableFrom": "agent_device_account_bindings",
"tableTo": "agent_provider_account_logins",
- "columnsFrom": ["account_id", "device_id"],
- "columnsTo": ["account_id", "device_id"],
+ "columnsFrom": [
+ "account_id",
+ "device_id"
+ ],
+ "columnsTo": [
+ "account_id",
+ "device_id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -7499,8 +8530,12 @@
"name": "agent_provider_account_logins_account_id_agent_provider_accounts_id_fk",
"tableFrom": "agent_provider_account_logins",
"tableTo": "agent_provider_accounts",
- "columnsFrom": ["account_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "account_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -7508,8 +8543,12 @@
"name": "agent_provider_account_logins_device_id_devices_id_fk",
"tableFrom": "agent_provider_account_logins",
"tableTo": "devices",
- "columnsFrom": ["device_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "device_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -7517,8 +8556,12 @@
"name": "agent_provider_account_logins_user_id_users_id_fk",
"tableFrom": "agent_provider_account_logins",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -7526,8 +8569,12 @@
"name": "agent_provider_account_logins_workspace_id_workspaces_id_fk",
"tableFrom": "agent_provider_account_logins",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -7537,7 +8584,10 @@
"agent_provider_account_logins_account_device_unique": {
"name": "agent_provider_account_logins_account_device_unique",
"nullsNotDistinct": false,
- "columns": ["account_id", "device_id"]
+ "columns": [
+ "account_id",
+ "device_id"
+ ]
}
},
"policies": {},
@@ -7830,8 +8880,12 @@
"name": "agent_provider_accounts_user_id_users_id_fk",
"tableFrom": "agent_provider_accounts",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -7839,8 +8893,12 @@
"name": "agent_provider_accounts_workspace_id_workspaces_id_fk",
"tableFrom": "agent_provider_accounts",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -8026,8 +9084,12 @@
"name": "agent_quota_calibrations_account_id_agent_provider_accounts_id_fk",
"tableFrom": "agent_quota_calibrations",
"tableTo": "agent_provider_accounts",
- "columnsFrom": ["account_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "account_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -8035,8 +9097,12 @@
"name": "agent_quota_calibrations_user_id_users_id_fk",
"tableFrom": "agent_quota_calibrations",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -8044,8 +9110,12 @@
"name": "agent_quota_calibrations_workspace_id_workspaces_id_fk",
"tableFrom": "agent_quota_calibrations",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -8255,8 +9325,12 @@
"name": "agent_quota_snapshots_account_id_agent_provider_accounts_id_fk",
"tableFrom": "agent_quota_snapshots",
"tableTo": "agent_provider_accounts",
- "columnsFrom": ["account_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "account_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -8264,8 +9338,12 @@
"name": "agent_quota_snapshots_user_id_users_id_fk",
"tableFrom": "agent_quota_snapshots",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -8273,8 +9351,12 @@
"name": "agent_quota_snapshots_workspace_id_workspaces_id_fk",
"tableFrom": "agent_quota_snapshots",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -8282,8 +9364,12 @@
"name": "agent_quota_snapshots_device_id_devices_id_fk",
"tableFrom": "agent_quota_snapshots",
"tableTo": "devices",
- "columnsFrom": ["device_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "device_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -8558,8 +9644,12 @@
"name": "agent_quota_usage_ledger_account_id_agent_provider_accounts_id_fk",
"tableFrom": "agent_quota_usage_ledger",
"tableTo": "agent_provider_accounts",
- "columnsFrom": ["account_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "account_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -8567,8 +9657,12 @@
"name": "agent_quota_usage_ledger_user_id_users_id_fk",
"tableFrom": "agent_quota_usage_ledger",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -8576,8 +9670,12 @@
"name": "agent_quota_usage_ledger_workspace_id_workspaces_id_fk",
"tableFrom": "agent_quota_usage_ledger",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -8585,8 +9683,12 @@
"name": "agent_quota_usage_ledger_message_id_messages_id_fk",
"tableFrom": "agent_quota_usage_ledger",
"tableTo": "messages",
- "columnsFrom": ["message_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "message_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -8594,8 +9696,12 @@
"name": "agent_quota_usage_ledger_operation_id_agent_operations_id_fk",
"tableFrom": "agent_quota_usage_ledger",
"tableTo": "agent_operations",
- "columnsFrom": ["operation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "operation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -8603,8 +9709,12 @@
"name": "agent_quota_usage_ledger_topic_id_topics_id_fk",
"tableFrom": "agent_quota_usage_ledger",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -8612,8 +9722,12 @@
"name": "agent_quota_usage_ledger_agent_id_agents_id_fk",
"tableFrom": "agent_quota_usage_ledger",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -8853,8 +9967,12 @@
"name": "agent_quota_windows_account_id_agent_provider_accounts_id_fk",
"tableFrom": "agent_quota_windows",
"tableTo": "agent_provider_accounts",
- "columnsFrom": ["account_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "account_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -8862,8 +9980,12 @@
"name": "agent_quota_windows_user_id_users_id_fk",
"tableFrom": "agent_quota_windows",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -8871,8 +9993,12 @@
"name": "agent_quota_windows_workspace_id_workspaces_id_fk",
"tableFrom": "agent_quota_windows",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -8979,8 +10105,12 @@
"name": "agent_shares_agent_id_agents_id_fk",
"tableFrom": "agent_shares",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -9229,8 +10359,12 @@
"name": "agent_skills_zip_file_hash_global_files_hash_id_fk",
"tableFrom": "agent_skills",
"tableTo": "global_files",
- "columnsFrom": ["zip_file_hash"],
- "columnsTo": ["hash_id"],
+ "columnsFrom": [
+ "zip_file_hash"
+ ],
+ "columnsTo": [
+ "hash_id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -9238,8 +10372,12 @@
"name": "agent_skills_user_id_users_id_fk",
"tableFrom": "agent_skills",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -9247,8 +10385,12 @@
"name": "agent_skills_workspace_id_workspaces_id_fk",
"tableFrom": "agent_skills",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -9503,8 +10645,12 @@
"name": "ai_models_user_id_users_id_fk",
"tableFrom": "ai_models",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -9512,8 +10658,12 @@
"name": "ai_models_workspace_id_workspaces_id_fk",
"tableFrom": "ai_models",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -9728,8 +10878,12 @@
"name": "ai_providers_user_id_users_id_fk",
"tableFrom": "ai_providers",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -9737,8 +10891,12 @@
"name": "ai_providers_workspace_id_workspaces_id_fk",
"tableFrom": "ai_providers",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -9873,8 +11031,12 @@
"name": "api_keys_user_id_users_id_fk",
"tableFrom": "api_keys",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -9882,8 +11044,12 @@
"name": "api_keys_workspace_id_workspaces_id_fk",
"tableFrom": "api_keys",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -9893,12 +11059,16 @@
"api_keys_key_unique": {
"name": "api_keys_key_unique",
"nullsNotDistinct": false,
- "columns": ["key"]
+ "columns": [
+ "key"
+ ]
},
"api_keys_key_hash_unique": {
"name": "api_keys_key_hash_unique",
"nullsNotDistinct": false,
- "columns": ["key_hash"]
+ "columns": [
+ "key_hash"
+ ]
}
},
"policies": {},
@@ -10096,8 +11266,12 @@
"name": "async_tasks_user_id_users_id_fk",
"tableFrom": "async_tasks",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -10105,8 +11279,12 @@
"name": "async_tasks_workspace_id_workspaces_id_fk",
"tableFrom": "async_tasks",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -10223,8 +11401,12 @@
"name": "accounts_user_id_users_id_fk",
"tableFrom": "accounts",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -10344,8 +11526,12 @@
"name": "passkey_userId_users_id_fk",
"tableFrom": "passkey",
"tableTo": "users",
- "columnsFrom": ["userId"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -10438,8 +11624,12 @@
"name": "auth_sessions_user_id_users_id_fk",
"tableFrom": "auth_sessions",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -10449,7 +11639,9 @@
"auth_sessions_token_unique": {
"name": "auth_sessions_token_unique",
"nullsNotDistinct": false,
- "columns": ["token"]
+ "columns": [
+ "token"
+ ]
}
},
"policies": {},
@@ -10522,8 +11714,12 @@
"name": "two_factor_user_id_users_id_fk",
"tableFrom": "two_factor",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -10706,8 +11902,12 @@
"name": "channel_audit_channel_id_channels_id_fk",
"tableFrom": "channel_audit",
"tableTo": "channels",
- "columnsFrom": ["channel_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -10796,6 +11996,12 @@
"primaryKey": false,
"notNull": false
},
+ "wake": {
+ "name": "wake",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
"manifest": {
"name": "manifest",
"type": "jsonb",
@@ -11069,8 +12275,12 @@
"name": "channel_jobs_channel_id_channels_id_fk",
"tableFrom": "channel_jobs",
"tableTo": "channels",
- "columnsFrom": ["channel_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -11078,8 +12288,12 @@
"name": "channel_jobs_topic_id_topics_id_fk",
"tableFrom": "channel_jobs",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -11087,8 +12301,12 @@
"name": "channel_jobs_operation_id_agent_operations_id_fk",
"tableFrom": "channel_jobs",
"tableTo": "agent_operations",
- "columnsFrom": ["operation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "operation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -11096,8 +12314,14 @@
"name": "channel_jobs_member_fk",
"tableFrom": "channel_jobs",
"tableTo": "channel_members",
- "columnsFrom": ["channel_id", "member_id"],
- "columnsTo": ["channel_id", "id"],
+ "columnsFrom": [
+ "channel_id",
+ "member_id"
+ ],
+ "columnsTo": [
+ "channel_id",
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
},
@@ -11105,8 +12329,14 @@
"name": "channel_jobs_requester_fk",
"tableFrom": "channel_jobs",
"tableTo": "channel_members",
- "columnsFrom": ["channel_id", "requester_member_id"],
- "columnsTo": ["channel_id", "id"],
+ "columnsFrom": [
+ "channel_id",
+ "requester_member_id"
+ ],
+ "columnsTo": [
+ "channel_id",
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
},
@@ -11114,8 +12344,14 @@
"name": "channel_jobs_message_fk",
"tableFrom": "channel_jobs",
"tableTo": "channel_messages",
- "columnsFrom": ["channel_id", "message_id"],
- "columnsTo": ["channel_id", "id"],
+ "columnsFrom": [
+ "channel_id",
+ "message_id"
+ ],
+ "columnsTo": [
+ "channel_id",
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
},
@@ -11123,8 +12359,14 @@
"name": "channel_jobs_thread_fk",
"tableFrom": "channel_jobs",
"tableTo": "channel_threads",
- "columnsFrom": ["channel_id", "thread_id"],
- "columnsTo": ["channel_id", "id"],
+ "columnsFrom": [
+ "channel_id",
+ "thread_id"
+ ],
+ "columnsTo": [
+ "channel_id",
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
}
@@ -11134,12 +12376,17 @@
"channel_jobs_operation_id_unique": {
"name": "channel_jobs_operation_id_unique",
"nullsNotDistinct": false,
- "columns": ["operation_id"]
+ "columns": [
+ "operation_id"
+ ]
},
"channel_jobs_scope_unique": {
"name": "channel_jobs_scope_unique",
"nullsNotDistinct": false,
- "columns": ["channel_id", "id"]
+ "columns": [
+ "channel_id",
+ "id"
+ ]
}
},
"policies": {},
@@ -11283,8 +12530,12 @@
"name": "channel_member_grants_channel_id_channels_id_fk",
"tableFrom": "channel_member_grants",
"tableTo": "channels",
- "columnsFrom": ["channel_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -11292,8 +12543,12 @@
"name": "channel_member_grants_device_owner_id_users_id_fk",
"tableFrom": "channel_member_grants",
"tableTo": "users",
- "columnsFrom": ["device_owner_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "device_owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -11301,8 +12556,14 @@
"name": "channel_member_grants_member_fk",
"tableFrom": "channel_member_grants",
"tableTo": "channel_members",
- "columnsFrom": ["channel_id", "member_id"],
- "columnsTo": ["channel_id", "id"],
+ "columnsFrom": [
+ "channel_id",
+ "member_id"
+ ],
+ "columnsTo": [
+ "channel_id",
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
},
@@ -11310,8 +12571,14 @@
"name": "channel_member_grants_requester_fk",
"tableFrom": "channel_member_grants",
"tableTo": "channel_members",
- "columnsFrom": ["channel_id", "requested_by_member_id"],
- "columnsTo": ["channel_id", "id"],
+ "columnsFrom": [
+ "channel_id",
+ "requested_by_member_id"
+ ],
+ "columnsTo": [
+ "channel_id",
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
}
@@ -11476,8 +12743,12 @@
"name": "channel_members_channel_id_channels_id_fk",
"tableFrom": "channel_members",
"tableTo": "channels",
- "columnsFrom": ["channel_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -11485,8 +12756,12 @@
"name": "channel_members_user_id_users_id_fk",
"tableFrom": "channel_members",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -11494,8 +12769,12 @@
"name": "channel_members_agent_id_agents_id_fk",
"tableFrom": "channel_members",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -11505,7 +12784,10 @@
"channel_members_scope_unique": {
"name": "channel_members_scope_unique",
"nullsNotDistinct": false,
- "columns": ["channel_id", "id"]
+ "columns": [
+ "channel_id",
+ "id"
+ ]
}
},
"policies": {},
@@ -11593,8 +12875,12 @@
"name": "channel_message_files_message_id_channel_messages_id_fk",
"tableFrom": "channel_message_files",
"tableTo": "channel_messages",
- "columnsFrom": ["message_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "message_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -11602,8 +12888,12 @@
"name": "channel_message_files_file_id_files_id_fk",
"tableFrom": "channel_message_files",
"tableTo": "files",
- "columnsFrom": ["file_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -11613,7 +12903,10 @@
"channel_message_files_message_file_unique": {
"name": "channel_message_files_message_file_unique",
"nullsNotDistinct": false,
- "columns": ["message_id", "file_id"]
+ "columns": [
+ "message_id",
+ "file_id"
+ ]
}
},
"policies": {},
@@ -11859,8 +13152,12 @@
"name": "channel_messages_channel_id_channels_id_fk",
"tableFrom": "channel_messages",
"tableTo": "channels",
- "columnsFrom": ["channel_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -11868,8 +13165,12 @@
"name": "channel_messages_user_id_users_id_fk",
"tableFrom": "channel_messages",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -11877,8 +13178,12 @@
"name": "channel_messages_agent_id_agents_id_fk",
"tableFrom": "channel_messages",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -11886,8 +13191,14 @@
"name": "channel_messages_thread_fk",
"tableFrom": "channel_messages",
"tableTo": "channel_threads",
- "columnsFrom": ["channel_id", "thread_id"],
- "columnsTo": ["channel_id", "id"],
+ "columnsFrom": [
+ "channel_id",
+ "thread_id"
+ ],
+ "columnsTo": [
+ "channel_id",
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
}
@@ -11897,7 +13208,10 @@
"channel_messages_scope_unique": {
"name": "channel_messages_scope_unique",
"nullsNotDistinct": false,
- "columns": ["channel_id", "id"]
+ "columns": [
+ "channel_id",
+ "id"
+ ]
}
},
"policies": {},
@@ -12015,8 +13329,12 @@
"name": "channel_threads_channel_id_channels_id_fk",
"tableFrom": "channel_threads",
"tableTo": "channels",
- "columnsFrom": ["channel_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -12024,8 +13342,14 @@
"name": "channel_threads_root_fk",
"tableFrom": "channel_threads",
"tableTo": "channel_messages",
- "columnsFrom": ["channel_id", "root_message_id"],
- "columnsTo": ["channel_id", "id"],
+ "columnsFrom": [
+ "channel_id",
+ "root_message_id"
+ ],
+ "columnsTo": [
+ "channel_id",
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
}
@@ -12035,7 +13359,10 @@
"channel_threads_scope_unique": {
"name": "channel_threads_scope_unique",
"nullsNotDistinct": false,
- "columns": ["channel_id", "id"]
+ "columns": [
+ "channel_id",
+ "id"
+ ]
}
},
"policies": {},
@@ -12230,8 +13557,12 @@
"name": "channels_user_id_users_id_fk",
"tableFrom": "channels",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -12239,8 +13570,12 @@
"name": "channels_workspace_id_workspaces_id_fk",
"tableFrom": "channels",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -12248,8 +13583,12 @@
"name": "channels_project_id_projects_id_fk",
"tableFrom": "channels",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -12257,8 +13596,12 @@
"name": "channels_agent_id_agents_id_fk",
"tableFrom": "channels",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -12504,8 +13847,12 @@
"name": "chat_groups_user_id_users_id_fk",
"tableFrom": "chat_groups",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -12513,8 +13860,12 @@
"name": "chat_groups_workspace_id_workspaces_id_fk",
"tableFrom": "chat_groups",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -12522,8 +13873,12 @@
"name": "chat_groups_group_id_session_groups_id_fk",
"tableFrom": "chat_groups",
"tableTo": "session_groups",
- "columnsFrom": ["group_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -12642,8 +13997,12 @@
"name": "chat_groups_agents_chat_group_id_chat_groups_id_fk",
"tableFrom": "chat_groups_agents",
"tableTo": "chat_groups",
- "columnsFrom": ["chat_group_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "chat_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -12651,8 +14010,12 @@
"name": "chat_groups_agents_agent_id_agents_id_fk",
"tableFrom": "chat_groups_agents",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -12660,8 +14023,12 @@
"name": "chat_groups_agents_user_id_users_id_fk",
"tableFrom": "chat_groups_agents",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -12669,8 +14036,12 @@
"name": "chat_groups_agents_workspace_id_workspaces_id_fk",
"tableFrom": "chat_groups_agents",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -12678,7 +14049,10 @@
"compositePrimaryKeys": {
"chat_groups_agents_chat_group_id_agent_id_pk": {
"name": "chat_groups_agents_chat_group_id_agent_id_pk",
- "columns": ["chat_group_id", "agent_id"]
+ "columns": [
+ "chat_group_id",
+ "agent_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -12883,8 +14257,12 @@
"name": "user_connector_tools_user_connector_id_user_connectors_id_fk",
"tableFrom": "user_connector_tools",
"tableTo": "user_connectors",
- "columnsFrom": ["user_connector_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_connector_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -12892,8 +14270,12 @@
"name": "user_connector_tools_user_id_users_id_fk",
"tableFrom": "user_connector_tools",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -12901,8 +14283,12 @@
"name": "user_connector_tools_workspace_id_workspaces_id_fk",
"tableFrom": "user_connector_tools",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -13176,8 +14562,12 @@
"name": "user_connectors_user_id_users_id_fk",
"tableFrom": "user_connectors",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -13185,8 +14575,12 @@
"name": "user_connectors_workspace_id_workspaces_id_fk",
"tableFrom": "user_connectors",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -13194,8 +14588,12 @@
"name": "user_connectors_agent_id_agents_id_fk",
"tableFrom": "user_connectors",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -13302,8 +14700,12 @@
"name": "user_installed_plugins_user_id_users_id_fk",
"tableFrom": "user_installed_plugins",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -13311,8 +14713,12 @@
"name": "user_installed_plugins_workspace_id_workspaces_id_fk",
"tableFrom": "user_installed_plugins",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -13320,7 +14726,10 @@
"compositePrimaryKeys": {
"user_installed_plugins_user_id_identifier_pk": {
"name": "user_installed_plugins_user_id_identifier_pk",
- "columns": ["user_id", "identifier"]
+ "columns": [
+ "user_id",
+ "identifier"
+ ]
}
},
"uniqueConstraints": {},
@@ -13492,8 +14901,12 @@
"name": "dashboard_items_dashboard_id_dashboards_id_fk",
"tableFrom": "dashboard_items",
"tableTo": "dashboards",
- "columnsFrom": ["dashboard_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "dashboard_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -13501,8 +14914,12 @@
"name": "dashboard_items_widget_id_widgets_id_fk",
"tableFrom": "dashboard_items",
"tableTo": "widgets",
- "columnsFrom": ["widget_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "widget_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -13510,8 +14927,12 @@
"name": "dashboard_items_user_id_users_id_fk",
"tableFrom": "dashboard_items",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -13519,8 +14940,12 @@
"name": "dashboard_items_workspace_id_workspaces_id_fk",
"tableFrom": "dashboard_items",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -13763,8 +15188,12 @@
"name": "dashboards_user_id_users_id_fk",
"tableFrom": "dashboards",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -13772,8 +15201,12 @@
"name": "dashboards_workspace_id_workspaces_id_fk",
"tableFrom": "dashboards",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -13781,8 +15214,12 @@
"name": "dashboards_project_id_projects_id_fk",
"tableFrom": "dashboards",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -13790,8 +15227,12 @@
"name": "dashboards_agent_id_agents_id_fk",
"tableFrom": "dashboards",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -14044,8 +15485,12 @@
"name": "devices_user_id_users_id_fk",
"tableFrom": "devices",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -14053,8 +15498,12 @@
"name": "devices_workspace_id_workspaces_id_fk",
"tableFrom": "devices",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -14166,8 +15615,12 @@
"name": "document_comment_mentions_comment_id_document_comments_id_fk",
"tableFrom": "document_comment_mentions",
"tableTo": "document_comments",
- "columnsFrom": ["comment_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -14175,8 +15628,12 @@
"name": "document_comment_mentions_mentioned_user_id_users_id_fk",
"tableFrom": "document_comment_mentions",
"tableTo": "users",
- "columnsFrom": ["mentioned_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "mentioned_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -14184,8 +15641,12 @@
"name": "document_comment_mentions_workspace_id_workspaces_id_fk",
"tableFrom": "document_comment_mentions",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -14415,8 +15876,12 @@
"name": "document_comments_document_id_documents_id_fk",
"tableFrom": "document_comments",
"tableTo": "documents",
- "columnsFrom": ["document_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -14424,8 +15889,12 @@
"name": "document_comments_parent_comment_id_document_comments_id_fk",
"tableFrom": "document_comments",
"tableTo": "document_comments",
- "columnsFrom": ["parent_comment_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
},
@@ -14433,8 +15902,12 @@
"name": "document_comments_reply_to_comment_id_document_comments_id_fk",
"tableFrom": "document_comments",
"tableTo": "document_comments",
- "columnsFrom": ["reply_to_comment_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "reply_to_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -14442,8 +15915,12 @@
"name": "document_comments_author_user_id_users_id_fk",
"tableFrom": "document_comments",
"tableTo": "users",
- "columnsFrom": ["author_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "author_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -14451,8 +15928,12 @@
"name": "document_comments_workspace_id_workspaces_id_fk",
"tableFrom": "document_comments",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -14600,8 +16081,12 @@
"name": "document_histories_document_id_documents_id_fk",
"tableFrom": "document_histories",
"tableTo": "documents",
- "columnsFrom": ["document_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -14609,8 +16094,12 @@
"name": "document_histories_user_id_users_id_fk",
"tableFrom": "document_histories",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -14618,8 +16107,12 @@
"name": "document_histories_workspace_id_workspaces_id_fk",
"tableFrom": "document_histories",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -14746,8 +16239,12 @@
"name": "document_likes_document_id_documents_id_fk",
"tableFrom": "document_likes",
"tableTo": "documents",
- "columnsFrom": ["document_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -14755,8 +16252,12 @@
"name": "document_likes_user_id_users_id_fk",
"tableFrom": "document_likes",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -14764,8 +16265,12 @@
"name": "document_likes_workspace_id_workspaces_id_fk",
"tableFrom": "document_likes",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -14900,8 +16405,12 @@
"name": "document_shares_document_id_documents_id_fk",
"tableFrom": "document_shares",
"tableTo": "documents",
- "columnsFrom": ["document_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -14909,8 +16418,12 @@
"name": "document_shares_user_id_users_id_fk",
"tableFrom": "document_shares",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -14918,8 +16431,12 @@
"name": "document_shares_workspace_id_workspaces_id_fk",
"tableFrom": "document_shares",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -15121,8 +16638,12 @@
"name": "environments_user_id_users_id_fk",
"tableFrom": "environments",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -15130,8 +16651,12 @@
"name": "environments_workspace_id_workspaces_id_fk",
"tableFrom": "environments",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "restrict",
"onUpdate": "no action"
}
@@ -15375,8 +16900,12 @@
"name": "environment_instances_environment_id_environments_id_fk",
"tableFrom": "environment_instances",
"tableTo": "environments",
- "columnsFrom": ["environment_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "environment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -15384,8 +16913,12 @@
"name": "environment_instances_device_id_devices_id_fk",
"tableFrom": "environment_instances",
"tableTo": "devices",
- "columnsFrom": ["device_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "device_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "restrict",
"onUpdate": "no action"
}
@@ -15638,8 +17171,12 @@
"name": "expertise_bindings_domain_id_expertise_domains_id_fk",
"tableFrom": "expertise_bindings",
"tableTo": "expertise_domains",
- "columnsFrom": ["domain_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "domain_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -15647,8 +17184,12 @@
"name": "expertise_bindings_agent_id_agents_id_fk",
"tableFrom": "expertise_bindings",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -15656,8 +17197,12 @@
"name": "expertise_bindings_project_id_projects_id_fk",
"tableFrom": "expertise_bindings",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -15665,8 +17210,12 @@
"name": "expertise_bindings_bound_workspace_id_workspaces_id_fk",
"tableFrom": "expertise_bindings",
"tableTo": "workspaces",
- "columnsFrom": ["bound_workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "bound_workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -15674,8 +17223,12 @@
"name": "expertise_bindings_bound_user_id_users_id_fk",
"tableFrom": "expertise_bindings",
"tableTo": "users",
- "columnsFrom": ["bound_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "bound_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -15683,8 +17236,12 @@
"name": "expertise_bindings_added_by_user_id_users_id_fk",
"tableFrom": "expertise_bindings",
"tableTo": "users",
- "columnsFrom": ["added_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "added_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -15692,8 +17249,12 @@
"name": "expertise_bindings_workspace_id_workspaces_id_fk",
"tableFrom": "expertise_bindings",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -15923,8 +17484,12 @@
"name": "expertise_domain_snapshots_domain_id_expertise_domains_id_fk",
"tableFrom": "expertise_domain_snapshots",
"tableTo": "expertise_domains",
- "columnsFrom": ["domain_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "domain_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -15932,8 +17497,12 @@
"name": "expertise_domain_snapshots_run_id_expertise_runs_id_fk",
"tableFrom": "expertise_domain_snapshots",
"tableTo": "expertise_runs",
- "columnsFrom": ["run_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -15941,8 +17510,14 @@
"name": "expertise_domain_snapshots_run_domain_fk",
"tableFrom": "expertise_domain_snapshots",
"tableTo": "expertise_runs",
- "columnsFrom": ["run_id", "domain_id"],
- "columnsTo": ["id", "domain_id"],
+ "columnsFrom": [
+ "run_id",
+ "domain_id"
+ ],
+ "columnsTo": [
+ "id",
+ "domain_id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
}
@@ -16227,8 +17802,12 @@
"name": "expertise_domains_user_id_users_id_fk",
"tableFrom": "expertise_domains",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -16236,8 +17815,12 @@
"name": "expertise_domains_workspace_id_workspaces_id_fk",
"tableFrom": "expertise_domains",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -16245,8 +17828,12 @@
"name": "expertise_domains_parent_domain_id_expertise_domains_id_fk",
"tableFrom": "expertise_domains",
"tableTo": "expertise_domains",
- "columnsFrom": ["parent_domain_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_domain_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -16254,8 +17841,12 @@
"name": "expertise_domains_canon_document_id_documents_id_fk",
"tableFrom": "expertise_domains",
"tableTo": "documents",
- "columnsFrom": ["canon_document_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "canon_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -16263,8 +17854,12 @@
"name": "expertise_domains_lesson_base_document_id_documents_id_fk",
"tableFrom": "expertise_domains",
"tableTo": "documents",
- "columnsFrom": ["lesson_base_document_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "lesson_base_document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -16272,8 +17867,12 @@
"name": "expertise_domains_anchor_chosen_by_user_id_users_id_fk",
"tableFrom": "expertise_domains",
"tableTo": "users",
- "columnsFrom": ["anchor_chosen_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "anchor_chosen_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -16482,8 +18081,12 @@
"name": "expertise_hits_domain_id_expertise_domains_id_fk",
"tableFrom": "expertise_hits",
"tableTo": "expertise_domains",
- "columnsFrom": ["domain_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "domain_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -16491,8 +18094,12 @@
"name": "expertise_hits_evidence_id_verify_evidence_id_fk",
"tableFrom": "expertise_hits",
"tableTo": "verify_evidence",
- "columnsFrom": ["evidence_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "evidence_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -16500,8 +18107,12 @@
"name": "expertise_hits_operation_id_agent_operations_id_fk",
"tableFrom": "expertise_hits",
"tableTo": "agent_operations",
- "columnsFrom": ["operation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "operation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -16509,8 +18120,12 @@
"name": "expertise_hits_source_check_result_id_verify_check_results_id_fk",
"tableFrom": "expertise_hits",
"tableTo": "verify_check_results",
- "columnsFrom": ["source_check_result_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "source_check_result_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -16518,8 +18133,12 @@
"name": "expertise_hits_source_message_id_messages_id_fk",
"tableFrom": "expertise_hits",
"tableTo": "messages",
- "columnsFrom": ["source_message_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "source_message_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -16527,8 +18146,14 @@
"name": "expertise_hits_run_domain_fk",
"tableFrom": "expertise_hits",
"tableTo": "expertise_runs",
- "columnsFrom": ["run_id", "domain_id"],
- "columnsTo": ["id", "domain_id"],
+ "columnsFrom": [
+ "run_id",
+ "domain_id"
+ ],
+ "columnsTo": [
+ "id",
+ "domain_id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -16536,8 +18161,14 @@
"name": "expertise_hits_lesson_domain_fk",
"tableFrom": "expertise_hits",
"tableTo": "expertise_lessons",
- "columnsFrom": ["lesson_id", "domain_id"],
- "columnsTo": ["id", "domain_id"],
+ "columnsFrom": [
+ "lesson_id",
+ "domain_id"
+ ],
+ "columnsTo": [
+ "id",
+ "domain_id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -16724,8 +18355,12 @@
"name": "expertise_insights_domain_id_expertise_domains_id_fk",
"tableFrom": "expertise_insights",
"tableTo": "expertise_domains",
- "columnsFrom": ["domain_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "domain_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -16733,8 +18368,12 @@
"name": "expertise_insights_user_id_users_id_fk",
"tableFrom": "expertise_insights",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -16742,8 +18381,12 @@
"name": "expertise_insights_workspace_id_workspaces_id_fk",
"tableFrom": "expertise_insights",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -16751,8 +18394,12 @@
"name": "expertise_insights_generated_by_operation_id_agent_operations_id_fk",
"tableFrom": "expertise_insights",
"tableTo": "agent_operations",
- "columnsFrom": ["generated_by_operation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "generated_by_operation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -16892,8 +18539,12 @@
"name": "expertise_lesson_revisions_lesson_id_expertise_lessons_id_fk",
"tableFrom": "expertise_lesson_revisions",
"tableTo": "expertise_lessons",
- "columnsFrom": ["lesson_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "lesson_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -16901,8 +18552,12 @@
"name": "expertise_lesson_revisions_changed_by_user_id_users_id_fk",
"tableFrom": "expertise_lesson_revisions",
"tableTo": "users",
- "columnsFrom": ["changed_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "changed_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -16910,8 +18565,12 @@
"name": "expertise_lesson_revisions_operation_id_agent_operations_id_fk",
"tableFrom": "expertise_lesson_revisions",
"tableTo": "agent_operations",
- "columnsFrom": ["operation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "operation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -17245,8 +18904,12 @@
"name": "expertise_lessons_domain_id_expertise_domains_id_fk",
"tableFrom": "expertise_lessons",
"tableTo": "expertise_domains",
- "columnsFrom": ["domain_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "domain_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -17254,8 +18917,12 @@
"name": "expertise_lessons_created_by_user_id_users_id_fk",
"tableFrom": "expertise_lessons",
"tableTo": "users",
- "columnsFrom": ["created_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "created_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -17263,8 +18930,12 @@
"name": "expertise_lessons_salvaged_from_id_expertise_lessons_id_fk",
"tableFrom": "expertise_lessons",
"tableTo": "expertise_lessons",
- "columnsFrom": ["salvaged_from_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "salvaged_from_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -17272,8 +18943,12 @@
"name": "expertise_lessons_compiled_criterion_id_verify_criteria_id_fk",
"tableFrom": "expertise_lessons",
"tableTo": "verify_criteria",
- "columnsFrom": ["compiled_criterion_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "compiled_criterion_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -17283,7 +18958,10 @@
"expertise_lessons_id_domain_unique": {
"name": "expertise_lessons_id_domain_unique",
"nullsNotDistinct": false,
- "columns": ["id", "domain_id"]
+ "columns": [
+ "id",
+ "domain_id"
+ ]
}
},
"policies": {},
@@ -17550,8 +19228,12 @@
"name": "expertise_runs_domain_id_expertise_domains_id_fk",
"tableFrom": "expertise_runs",
"tableTo": "expertise_domains",
- "columnsFrom": ["domain_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "domain_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -17559,8 +19241,12 @@
"name": "expertise_runs_user_id_users_id_fk",
"tableFrom": "expertise_runs",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -17568,8 +19254,12 @@
"name": "expertise_runs_workspace_id_workspaces_id_fk",
"tableFrom": "expertise_runs",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -17579,7 +19269,10 @@
"expertise_runs_id_domain_unique": {
"name": "expertise_runs_id_domain_unique",
"nullsNotDistinct": false,
- "columns": ["id", "domain_id"]
+ "columns": [
+ "id",
+ "domain_id"
+ ]
}
},
"policies": {},
@@ -17767,8 +19460,12 @@
"name": "user_favorites_user_id_users_id_fk",
"tableFrom": "user_favorites",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -17776,8 +19473,12 @@
"name": "user_favorites_workspace_id_workspaces_id_fk",
"tableFrom": "user_favorites",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -18172,8 +19873,12 @@
"name": "documents_file_id_files_id_fk",
"tableFrom": "documents",
"tableTo": "files",
- "columnsFrom": ["file_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -18181,8 +19886,12 @@
"name": "documents_knowledge_base_id_knowledge_bases_id_fk",
"tableFrom": "documents",
"tableTo": "knowledge_bases",
- "columnsFrom": ["knowledge_base_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "knowledge_base_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -18190,8 +19899,12 @@
"name": "documents_parent_id_documents_id_fk",
"tableFrom": "documents",
"tableTo": "documents",
- "columnsFrom": ["parent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -18199,8 +19912,12 @@
"name": "documents_user_id_users_id_fk",
"tableFrom": "documents",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -18208,8 +19925,12 @@
"name": "documents_workspace_id_workspaces_id_fk",
"tableFrom": "documents",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -18426,8 +20147,12 @@
"name": "file_uploads_user_id_users_id_fk",
"tableFrom": "file_uploads",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -18435,8 +20160,12 @@
"name": "file_uploads_workspace_id_workspaces_id_fk",
"tableFrom": "file_uploads",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -18444,8 +20173,12 @@
"name": "file_uploads_file_id_files_id_fk",
"tableFrom": "file_uploads",
"tableTo": "files",
- "columnsFrom": ["file_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -18730,8 +20463,12 @@
"name": "files_user_id_users_id_fk",
"tableFrom": "files",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -18739,8 +20476,12 @@
"name": "files_file_hash_global_files_hash_id_fk",
"tableFrom": "files",
"tableTo": "global_files",
- "columnsFrom": ["file_hash"],
- "columnsTo": ["hash_id"],
+ "columnsFrom": [
+ "file_hash"
+ ],
+ "columnsTo": [
+ "hash_id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
},
@@ -18748,8 +20489,12 @@
"name": "files_parent_id_documents_id_fk",
"tableFrom": "files",
"tableTo": "documents",
- "columnsFrom": ["parent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -18757,8 +20502,12 @@
"name": "files_chunk_task_id_async_tasks_id_fk",
"tableFrom": "files",
"tableTo": "async_tasks",
- "columnsFrom": ["chunk_task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "chunk_task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -18766,8 +20515,12 @@
"name": "files_embedding_task_id_async_tasks_id_fk",
"tableFrom": "files",
"tableTo": "async_tasks",
- "columnsFrom": ["embedding_task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "embedding_task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -18775,8 +20528,12 @@
"name": "files_workspace_id_workspaces_id_fk",
"tableFrom": "files",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -18864,8 +20621,12 @@
"name": "global_files_creator_users_id_fk",
"tableFrom": "global_files",
"tableTo": "users",
- "columnsFrom": ["creator"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "creator"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -18979,8 +20740,12 @@
"name": "knowledge_base_files_knowledge_base_id_knowledge_bases_id_fk",
"tableFrom": "knowledge_base_files",
"tableTo": "knowledge_bases",
- "columnsFrom": ["knowledge_base_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "knowledge_base_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -18988,8 +20753,12 @@
"name": "knowledge_base_files_file_id_files_id_fk",
"tableFrom": "knowledge_base_files",
"tableTo": "files",
- "columnsFrom": ["file_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -18997,8 +20766,12 @@
"name": "knowledge_base_files_user_id_users_id_fk",
"tableFrom": "knowledge_base_files",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -19006,8 +20779,12 @@
"name": "knowledge_base_files_workspace_id_workspaces_id_fk",
"tableFrom": "knowledge_base_files",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -19015,7 +20792,10 @@
"compositePrimaryKeys": {
"knowledge_base_files_knowledge_base_id_file_id_pk": {
"name": "knowledge_base_files_knowledge_base_id_file_id_pk",
- "columns": ["knowledge_base_id", "file_id"]
+ "columns": [
+ "knowledge_base_id",
+ "file_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -19214,8 +20994,12 @@
"name": "knowledge_bases_user_id_users_id_fk",
"tableFrom": "knowledge_bases",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -19223,8 +21007,12 @@
"name": "knowledge_bases_workspace_id_workspaces_id_fk",
"tableFrom": "knowledge_bases",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -19363,8 +21151,12 @@
"name": "file_shares_file_id_files_id_fk",
"tableFrom": "file_shares",
"tableTo": "files",
- "columnsFrom": ["file_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -19372,8 +21164,12 @@
"name": "file_shares_user_id_users_id_fk",
"tableFrom": "file_shares",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -19381,8 +21177,12 @@
"name": "file_shares_workspace_id_workspaces_id_fk",
"tableFrom": "file_shares",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -19748,8 +21548,12 @@
"name": "generation_batches_user_id_users_id_fk",
"tableFrom": "generation_batches",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -19757,8 +21561,12 @@
"name": "generation_batches_workspace_id_workspaces_id_fk",
"tableFrom": "generation_batches",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -19766,8 +21574,12 @@
"name": "generation_batches_generation_topic_id_generation_topics_id_fk",
"tableFrom": "generation_batches",
"tableTo": "generation_topics",
- "columnsFrom": ["generation_topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "generation_topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -19924,8 +21736,12 @@
"name": "generation_topics_user_id_users_id_fk",
"tableFrom": "generation_topics",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -19933,8 +21749,12 @@
"name": "generation_topics_workspace_id_workspaces_id_fk",
"tableFrom": "generation_topics",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -20098,8 +21918,12 @@
"name": "generations_user_id_users_id_fk",
"tableFrom": "generations",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -20107,8 +21931,12 @@
"name": "generations_workspace_id_workspaces_id_fk",
"tableFrom": "generations",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -20116,8 +21944,12 @@
"name": "generations_generation_batch_id_generation_batches_id_fk",
"tableFrom": "generations",
"tableTo": "generation_batches",
- "columnsFrom": ["generation_batch_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "generation_batch_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -20125,8 +21957,12 @@
"name": "generations_async_task_id_async_tasks_id_fk",
"tableFrom": "generations",
"tableTo": "async_tasks",
- "columnsFrom": ["async_task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "async_task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -20134,8 +21970,12 @@
"name": "generations_file_id_files_id_fk",
"tableFrom": "generations",
"tableTo": "files",
- "columnsFrom": ["file_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -20241,6 +22081,12 @@
"primaryKey": false,
"notNull": false
},
+ "archived_at": {
+ "name": "archived_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
"visibility": {
"name": "visibility",
"type": "text",
@@ -20405,8 +22251,12 @@
"name": "goals_user_id_users_id_fk",
"tableFrom": "goals",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -20414,8 +22264,12 @@
"name": "goals_workspace_id_workspaces_id_fk",
"tableFrom": "goals",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -20423,8 +22277,12 @@
"name": "goals_agent_id_agents_id_fk",
"tableFrom": "goals",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -20432,8 +22290,12 @@
"name": "goals_project_id_projects_id_fk",
"tableFrom": "goals",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -20551,8 +22413,12 @@
"name": "goal_edges_goal_id_goals_id_fk",
"tableFrom": "goal_edges",
"tableTo": "goals",
- "columnsFrom": ["goal_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "goal_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -20560,8 +22426,14 @@
"name": "goal_edges_goal_source_node_fk",
"tableFrom": "goal_edges",
"tableTo": "goal_nodes",
- "columnsFrom": ["goal_id", "source_node_id"],
- "columnsTo": ["goal_id", "id"],
+ "columnsFrom": [
+ "goal_id",
+ "source_node_id"
+ ],
+ "columnsTo": [
+ "goal_id",
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -20569,8 +22441,14 @@
"name": "goal_edges_goal_target_node_fk",
"tableFrom": "goal_edges",
"tableTo": "goal_nodes",
- "columnsFrom": ["goal_id", "target_node_id"],
- "columnsTo": ["goal_id", "id"],
+ "columnsFrom": [
+ "goal_id",
+ "target_node_id"
+ ],
+ "columnsTo": [
+ "goal_id",
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -20738,8 +22616,12 @@
"name": "goal_events_goal_id_goals_id_fk",
"tableFrom": "goal_events",
"tableTo": "goals",
- "columnsFrom": ["goal_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "goal_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -20747,8 +22629,12 @@
"name": "goal_events_task_id_tasks_id_fk",
"tableFrom": "goal_events",
"tableTo": "tasks",
- "columnsFrom": ["task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -20950,8 +22836,12 @@
"name": "goal_node_decisions_node_id_goal_nodes_id_fk",
"tableFrom": "goal_node_decisions",
"tableTo": "goal_nodes",
- "columnsFrom": ["node_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "node_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -20959,8 +22849,12 @@
"name": "goal_node_decisions_requested_user_id_users_id_fk",
"tableFrom": "goal_node_decisions",
"tableTo": "users",
- "columnsFrom": ["requested_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "requested_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -20968,8 +22862,12 @@
"name": "goal_node_decisions_resolved_by_user_id_users_id_fk",
"tableFrom": "goal_node_decisions",
"tableTo": "users",
- "columnsFrom": ["resolved_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "resolved_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -20977,8 +22875,12 @@
"name": "goal_node_decisions_resolved_by_agent_id_agents_id_fk",
"tableFrom": "goal_node_decisions",
"tableTo": "agents",
- "columnsFrom": ["resolved_by_agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "resolved_by_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -21075,8 +22977,12 @@
"name": "goal_node_work_versions_node_id_goal_nodes_id_fk",
"tableFrom": "goal_node_work_versions",
"tableTo": "goal_nodes",
- "columnsFrom": ["node_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "node_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -21084,8 +22990,12 @@
"name": "goal_node_work_versions_work_version_id_work_versions_id_fk",
"tableFrom": "goal_node_work_versions",
"tableTo": "work_versions",
- "columnsFrom": ["work_version_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "work_version_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -21277,8 +23187,12 @@
"name": "goal_nodes_goal_id_goals_id_fk",
"tableFrom": "goal_nodes",
"tableTo": "goals",
- "columnsFrom": ["goal_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "goal_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -21286,8 +23200,12 @@
"name": "goal_nodes_task_id_tasks_id_fk",
"tableFrom": "goal_nodes",
"tableTo": "tasks",
- "columnsFrom": ["task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -21295,8 +23213,12 @@
"name": "goal_nodes_created_by_user_id_users_id_fk",
"tableFrom": "goal_nodes",
"tableTo": "users",
- "columnsFrom": ["created_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "created_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -21304,8 +23226,12 @@
"name": "goal_nodes_created_by_agent_id_agents_id_fk",
"tableFrom": "goal_nodes",
"tableTo": "agents",
- "columnsFrom": ["created_by_agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "created_by_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -21315,7 +23241,10 @@
"goal_nodes_goal_id_id_unique": {
"name": "goal_nodes_goal_id_id_unique",
"nullsNotDistinct": false,
- "columns": ["goal_id", "id"]
+ "columns": [
+ "goal_id",
+ "id"
+ ]
}
},
"policies": {},
@@ -21455,8 +23384,12 @@
"name": "goal_shares_goal_id_goals_id_fk",
"tableFrom": "goal_shares",
"tableTo": "goals",
- "columnsFrom": ["goal_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "goal_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -21464,8 +23397,12 @@
"name": "goal_shares_user_id_users_id_fk",
"tableFrom": "goal_shares",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -21473,8 +23410,12 @@
"name": "goal_shares_workspace_id_workspaces_id_fk",
"tableFrom": "goal_shares",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -21773,8 +23714,12 @@
"name": "goal_subscriptions_goal_id_goals_id_fk",
"tableFrom": "goal_subscriptions",
"tableTo": "goals",
- "columnsFrom": ["goal_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "goal_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -21782,8 +23727,12 @@
"name": "goal_subscriptions_widget_id_widgets_id_fk",
"tableFrom": "goal_subscriptions",
"tableTo": "widgets",
- "columnsFrom": ["widget_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "widget_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -21791,8 +23740,12 @@
"name": "goal_subscriptions_metric_id_metrics_id_fk",
"tableFrom": "goal_subscriptions",
"tableTo": "metrics",
- "columnsFrom": ["metric_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "metric_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -21800,8 +23753,12 @@
"name": "goal_subscriptions_user_id_users_id_fk",
"tableFrom": "goal_subscriptions",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -21809,8 +23766,12 @@
"name": "goal_subscriptions_workspace_id_workspaces_id_fk",
"tableFrom": "goal_subscriptions",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -21818,8 +23779,12 @@
"name": "goal_subscriptions_confirmed_version_id_widget_versions_id_fk",
"tableFrom": "goal_subscriptions",
"tableTo": "widget_versions",
- "columnsFrom": ["confirmed_version_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "confirmed_version_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -22005,8 +23970,12 @@
"name": "goal_traces_goal_id_goals_id_fk",
"tableFrom": "goal_traces",
"tableTo": "goals",
- "columnsFrom": ["goal_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "goal_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -22204,8 +24173,12 @@
"name": "linear_connections_user_id_users_id_fk",
"tableFrom": "linear_connections",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -22213,8 +24186,12 @@
"name": "linear_connections_workspace_id_workspaces_id_fk",
"tableFrom": "linear_connections",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -22391,8 +24368,12 @@
"name": "linear_sync_rules_project_id_projects_id_fk",
"tableFrom": "linear_sync_rules",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -22400,8 +24381,12 @@
"name": "linear_sync_rules_connection_id_linear_connections_id_fk",
"tableFrom": "linear_sync_rules",
"tableTo": "linear_connections",
- "columnsFrom": ["connection_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "connection_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -22409,8 +24394,12 @@
"name": "linear_sync_rules_user_id_users_id_fk",
"tableFrom": "linear_sync_rules",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -22418,8 +24407,12 @@
"name": "linear_sync_rules_workspace_id_workspaces_id_fk",
"tableFrom": "linear_sync_rules",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -22839,225 +24832,913 @@
"name": "llm_generation_tracing_workspace_id_workspaces_id_fk",
"tableFrom": "llm_generation_tracing",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.message_chunks": {
- "name": "message_chunks",
- "schema": "",
- "columns": {
- "message_id": {
- "name": "message_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "chunk_id": {
- "name": "chunk_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {
- "message_chunks_user_id_idx": {
- "name": "message_chunks_user_id_idx",
- "columns": [
- {
- "expression": "user_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
+ "columnsFrom": [
+ "workspace_id"
],
- "isUnique": false,
- "concurrently": false,
- "method": "btree",
- "with": {}
- },
- "message_chunks_message_id_idx": {
- "name": "message_chunks_message_id_idx",
- "columns": [
- {
- "expression": "message_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
+ "columnsTo": [
+ "id"
],
- "isUnique": false,
- "concurrently": false,
- "method": "btree",
- "with": {}
- },
- "message_chunks_workspace_id_idx": {
- "name": "message_chunks_workspace_id_idx",
- "columns": [
- {
- "expression": "workspace_id",
- "isExpression": false,
- "asc": true,
- "nulls": "last"
- }
- ],
- "isUnique": false,
- "concurrently": false,
- "method": "btree",
- "with": {}
- }
- },
- "foreignKeys": {
- "message_chunks_message_id_messages_id_fk": {
- "name": "message_chunks_message_id_messages_id_fk",
- "tableFrom": "message_chunks",
- "tableTo": "messages",
- "columnsFrom": ["message_id"],
- "columnsTo": ["id"],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "message_chunks_chunk_id_chunks_id_fk": {
- "name": "message_chunks_chunk_id_chunks_id_fk",
- "tableFrom": "message_chunks",
- "tableTo": "chunks",
- "columnsFrom": ["chunk_id"],
- "columnsTo": ["id"],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "message_chunks_user_id_users_id_fk": {
- "name": "message_chunks_user_id_users_id_fk",
- "tableFrom": "message_chunks",
- "tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "message_chunks_workspace_id_workspaces_id_fk": {
- "name": "message_chunks_workspace_id_workspaces_id_fk",
- "tableFrom": "message_chunks",
- "tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
- "compositePrimaryKeys": {
- "message_chunks_chunk_id_message_id_pk": {
- "name": "message_chunks_chunk_id_message_id_pk",
- "columns": ["chunk_id", "message_id"]
- }
- },
+ "compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
- "public.message_groups": {
- "name": "message_groups",
+ "public.meeting_minutes": {
+ "name": "meeting_minutes",
"schema": "",
"columns": {
"id": {
"name": "id",
- "type": "varchar(255)",
+ "type": "uuid",
"primaryKey": true,
- "notNull": true
- },
- "topic_id": {
- "name": "topic_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
+ "notNull": true,
+ "default": "gen_random_uuid()"
},
- "user_id": {
- "name": "user_id",
- "type": "text",
+ "meeting_id": {
+ "name": "meeting_id",
+ "type": "uuid",
"primaryKey": false,
"notNull": true
},
- "workspace_id": {
- "name": "workspace_id",
+ "summary": {
+ "name": "summary",
"type": "text",
"primaryKey": false,
"notNull": false
},
- "parent_group_id": {
- "name": "parent_group_id",
- "type": "varchar(255)",
+ "chapters": {
+ "name": "chapters",
+ "type": "jsonb",
"primaryKey": false,
- "notNull": false
+ "notNull": true,
+ "default": "'[]'::jsonb"
},
- "parent_message_id": {
- "name": "parent_message_id",
- "type": "text",
+ "decisions": {
+ "name": "decisions",
+ "type": "jsonb",
"primaryKey": false,
- "notNull": false
+ "notNull": true,
+ "default": "'[]'::jsonb"
},
- "title": {
- "name": "title",
- "type": "varchar(255)",
+ "action_items": {
+ "name": "action_items",
+ "type": "jsonb",
"primaryKey": false,
- "notNull": false
+ "notNull": true,
+ "default": "'[]'::jsonb"
},
- "description": {
- "name": "description",
- "type": "text",
+ "keywords": {
+ "name": "keywords",
+ "type": "jsonb",
"primaryKey": false,
- "notNull": false
+ "notNull": true,
+ "default": "'[]'::jsonb"
},
- "type": {
- "name": "type",
+ "document_id": {
+ "name": "document_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
- "content": {
- "name": "content",
+ "model": {
+ "name": "model",
"type": "text",
"primaryKey": false,
"notNull": false
},
- "editor_data": {
- "name": "editor_data",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
- },
- "client_id": {
- "name": "client_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false
- },
+ "accessed_at": {
+ "name": "accessed_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "meeting_minutes_meeting_id_unique": {
+ "name": "meeting_minutes_meeting_id_unique",
+ "columns": [
+ {
+ "expression": "meeting_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "meeting_minutes_document_id_idx": {
+ "name": "meeting_minutes_document_id_idx",
+ "columns": [
+ {
+ "expression": "document_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "meeting_minutes_meeting_id_meetings_id_fk": {
+ "name": "meeting_minutes_meeting_id_meetings_id_fk",
+ "tableFrom": "meeting_minutes",
+ "tableTo": "meetings",
+ "columnsFrom": [
+ "meeting_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "meeting_minutes_document_id_documents_id_fk": {
+ "name": "meeting_minutes_document_id_documents_id_fk",
+ "tableFrom": "meeting_minutes",
+ "tableTo": "documents",
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.meeting_segments": {
+ "name": "meeting_segments",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "meeting_id": {
+ "name": "meeting_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "speaker_id": {
+ "name": "speaker_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "seq": {
+ "name": "seq",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "start_ms": {
+ "name": "start_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "end_ms": {
+ "name": "end_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "text": {
+ "name": "text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "accessed_at": {
+ "name": "accessed_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "meeting_segments_meeting_id_source_seq_unique": {
+ "name": "meeting_segments_meeting_id_source_seq_unique",
+ "columns": [
+ {
+ "expression": "meeting_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "source",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "seq",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "meeting_segments_meeting_id_source_start_ms_idx": {
+ "name": "meeting_segments_meeting_id_source_start_ms_idx",
+ "columns": [
+ {
+ "expression": "meeting_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "source",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "start_ms",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "meeting_segments_speaker_id_idx": {
+ "name": "meeting_segments_speaker_id_idx",
+ "columns": [
+ {
+ "expression": "speaker_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "meeting_segments_meeting_id_meetings_id_fk": {
+ "name": "meeting_segments_meeting_id_meetings_id_fk",
+ "tableFrom": "meeting_segments",
+ "tableTo": "meetings",
+ "columnsFrom": [
+ "meeting_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "meeting_segments_speaker_id_meeting_speakers_id_fk": {
+ "name": "meeting_segments_speaker_id_meeting_speakers_id_fk",
+ "tableFrom": "meeting_segments",
+ "tableTo": "meeting_speakers",
+ "columnsFrom": [
+ "speaker_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.meeting_speakers": {
+ "name": "meeting_speakers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "meeting_id": {
+ "name": "meeting_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessed_at": {
+ "name": "accessed_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "meeting_speakers_meeting_id_label_unique": {
+ "name": "meeting_speakers_meeting_id_label_unique",
+ "columns": [
+ {
+ "expression": "meeting_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "label",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "meeting_speakers_meeting_id_meetings_id_fk": {
+ "name": "meeting_speakers_meeting_id_meetings_id_fk",
+ "tableFrom": "meeting_speakers",
+ "tableTo": "meetings",
+ "columnsFrom": [
+ "meeting_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.meetings": {
+ "name": "meetings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'recording'"
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "realtime_provider": {
+ "name": "realtime_provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refine_provider": {
+ "name": "refine_provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'auto'"
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration_ms": {
+ "name": "duration_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audio_file_id": {
+ "name": "audio_file_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "local_audio_path": {
+ "name": "local_audio_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error": {
+ "name": "error",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "visibility": {
+ "name": "visibility",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'private'"
+ },
+ "accessed_at": {
+ "name": "accessed_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "meetings_user_id_workspace_id_created_at_idx": {
+ "name": "meetings_user_id_workspace_id_created_at_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "meetings_workspace_id_created_at_idx": {
+ "name": "meetings_workspace_id_created_at_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "meetings_audio_file_id_idx": {
+ "name": "meetings_audio_file_id_idx",
+ "columns": [
+ {
+ "expression": "audio_file_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "meetings_user_id_users_id_fk": {
+ "name": "meetings_user_id_users_id_fk",
+ "tableFrom": "meetings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "meetings_workspace_id_workspaces_id_fk": {
+ "name": "meetings_workspace_id_workspaces_id_fk",
+ "tableFrom": "meetings",
+ "tableTo": "workspaces",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "meetings_audio_file_id_files_id_fk": {
+ "name": "meetings_audio_file_id_files_id_fk",
+ "tableFrom": "meetings",
+ "tableTo": "files",
+ "columnsFrom": [
+ "audio_file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.message_chunks": {
+ "name": "message_chunks",
+ "schema": "",
+ "columns": {
+ "message_id": {
+ "name": "message_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "chunk_id": {
+ "name": "chunk_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "message_chunks_user_id_idx": {
+ "name": "message_chunks_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "message_chunks_message_id_idx": {
+ "name": "message_chunks_message_id_idx",
+ "columns": [
+ {
+ "expression": "message_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "message_chunks_workspace_id_idx": {
+ "name": "message_chunks_workspace_id_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "message_chunks_message_id_messages_id_fk": {
+ "name": "message_chunks_message_id_messages_id_fk",
+ "tableFrom": "message_chunks",
+ "tableTo": "messages",
+ "columnsFrom": [
+ "message_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "message_chunks_chunk_id_chunks_id_fk": {
+ "name": "message_chunks_chunk_id_chunks_id_fk",
+ "tableFrom": "message_chunks",
+ "tableTo": "chunks",
+ "columnsFrom": [
+ "chunk_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "message_chunks_user_id_users_id_fk": {
+ "name": "message_chunks_user_id_users_id_fk",
+ "tableFrom": "message_chunks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "message_chunks_workspace_id_workspaces_id_fk": {
+ "name": "message_chunks_workspace_id_workspaces_id_fk",
+ "tableFrom": "message_chunks",
+ "tableTo": "workspaces",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "message_chunks_chunk_id_message_id_pk": {
+ "name": "message_chunks_chunk_id_message_id_pk",
+ "columns": [
+ "chunk_id",
+ "message_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.message_groups": {
+ "name": "message_groups",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "topic_id": {
+ "name": "topic_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_group_id": {
+ "name": "parent_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_message_id": {
+ "name": "parent_message_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "editor_data": {
+ "name": "editor_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
"accessed_at": {
"name": "accessed_at",
"type": "timestamp with time zone",
@@ -23198,8 +25879,12 @@
"name": "message_groups_topic_id_topics_id_fk",
"tableFrom": "message_groups",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23207,8 +25892,12 @@
"name": "message_groups_user_id_users_id_fk",
"tableFrom": "message_groups",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23216,8 +25905,12 @@
"name": "message_groups_workspace_id_workspaces_id_fk",
"tableFrom": "message_groups",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23225,8 +25918,12 @@
"name": "message_groups_parent_group_id_message_groups_id_fk",
"tableFrom": "message_groups",
"tableTo": "message_groups",
- "columnsFrom": ["parent_group_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23234,8 +25931,12 @@
"name": "message_groups_parent_message_id_messages_id_fk",
"tableFrom": "message_groups",
"tableTo": "messages",
- "columnsFrom": ["parent_message_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_message_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -23397,8 +26098,12 @@
"name": "message_plugins_id_messages_id_fk",
"tableFrom": "message_plugins",
"tableTo": "messages",
- "columnsFrom": ["id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23406,8 +26111,12 @@
"name": "message_plugins_user_id_users_id_fk",
"tableFrom": "message_plugins",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23415,8 +26124,12 @@
"name": "message_plugins_workspace_id_workspaces_id_fk",
"tableFrom": "message_plugins",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -23569,8 +26282,12 @@
"name": "message_queries_message_id_messages_id_fk",
"tableFrom": "message_queries",
"tableTo": "messages",
- "columnsFrom": ["message_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "message_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23578,8 +26295,12 @@
"name": "message_queries_user_id_users_id_fk",
"tableFrom": "message_queries",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23587,8 +26308,12 @@
"name": "message_queries_workspace_id_workspaces_id_fk",
"tableFrom": "message_queries",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23596,8 +26321,12 @@
"name": "message_queries_embeddings_id_embeddings_id_fk",
"tableFrom": "message_queries",
"tableTo": "embeddings",
- "columnsFrom": ["embeddings_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "embeddings_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -23716,8 +26445,12 @@
"name": "message_query_chunks_id_messages_id_fk",
"tableFrom": "message_query_chunks",
"tableTo": "messages",
- "columnsFrom": ["id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23725,8 +26458,12 @@
"name": "message_query_chunks_query_id_message_queries_id_fk",
"tableFrom": "message_query_chunks",
"tableTo": "message_queries",
- "columnsFrom": ["query_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "query_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23734,8 +26471,12 @@
"name": "message_query_chunks_chunk_id_chunks_id_fk",
"tableFrom": "message_query_chunks",
"tableTo": "chunks",
- "columnsFrom": ["chunk_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "chunk_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23743,8 +26484,12 @@
"name": "message_query_chunks_user_id_users_id_fk",
"tableFrom": "message_query_chunks",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23752,8 +26497,12 @@
"name": "message_query_chunks_workspace_id_workspaces_id_fk",
"tableFrom": "message_query_chunks",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -23761,7 +26510,11 @@
"compositePrimaryKeys": {
"message_query_chunks_chunk_id_id_query_id_pk": {
"name": "message_query_chunks_chunk_id_id_query_id_pk",
- "columns": ["chunk_id", "id", "query_id"]
+ "columns": [
+ "chunk_id",
+ "id",
+ "query_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -23874,8 +26627,12 @@
"name": "message_tts_id_messages_id_fk",
"tableFrom": "message_tts",
"tableTo": "messages",
- "columnsFrom": ["id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23883,8 +26640,12 @@
"name": "message_tts_file_id_files_id_fk",
"tableFrom": "message_tts",
"tableTo": "files",
- "columnsFrom": ["file_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23892,8 +26653,12 @@
"name": "message_tts_user_id_users_id_fk",
"tableFrom": "message_tts",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -23901,8 +26666,12 @@
"name": "message_tts_workspace_id_workspaces_id_fk",
"tableFrom": "message_tts",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -24018,8 +26787,12 @@
"name": "message_translates_id_messages_id_fk",
"tableFrom": "message_translates",
"tableTo": "messages",
- "columnsFrom": ["id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -24027,8 +26800,12 @@
"name": "message_translates_user_id_users_id_fk",
"tableFrom": "message_translates",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -24036,8 +26813,12 @@
"name": "message_translates_workspace_id_workspaces_id_fk",
"tableFrom": "message_translates",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -24499,8 +27280,12 @@
"name": "messages_user_id_users_id_fk",
"tableFrom": "messages",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -24508,8 +27293,12 @@
"name": "messages_session_id_sessions_id_fk",
"tableFrom": "messages",
"tableTo": "sessions",
- "columnsFrom": ["session_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -24517,8 +27306,12 @@
"name": "messages_topic_id_topics_id_fk",
"tableFrom": "messages",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -24526,8 +27319,12 @@
"name": "messages_thread_id_threads_id_fk",
"tableFrom": "messages",
"tableTo": "threads",
- "columnsFrom": ["thread_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "thread_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -24535,8 +27332,12 @@
"name": "messages_parent_id_messages_id_fk",
"tableFrom": "messages",
"tableTo": "messages",
- "columnsFrom": ["parent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -24544,8 +27345,12 @@
"name": "messages_quota_id_messages_id_fk",
"tableFrom": "messages",
"tableTo": "messages",
- "columnsFrom": ["quota_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "quota_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -24553,8 +27358,12 @@
"name": "messages_agent_id_agents_id_fk",
"tableFrom": "messages",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -24562,8 +27371,12 @@
"name": "messages_group_id_chat_groups_id_fk",
"tableFrom": "messages",
"tableTo": "chat_groups",
- "columnsFrom": ["group_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -24571,8 +27384,12 @@
"name": "messages_message_group_id_message_groups_id_fk",
"tableFrom": "messages",
"tableTo": "message_groups",
- "columnsFrom": ["message_group_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "message_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -24580,8 +27397,12 @@
"name": "messages_workspace_id_workspaces_id_fk",
"tableFrom": "messages",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -24673,8 +27494,12 @@
"name": "messages_files_file_id_files_id_fk",
"tableFrom": "messages_files",
"tableTo": "files",
- "columnsFrom": ["file_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -24682,8 +27507,12 @@
"name": "messages_files_message_id_messages_id_fk",
"tableFrom": "messages_files",
"tableTo": "messages",
- "columnsFrom": ["message_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "message_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -24691,8 +27520,12 @@
"name": "messages_files_user_id_users_id_fk",
"tableFrom": "messages_files",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -24700,8 +27533,12 @@
"name": "messages_files_workspace_id_workspaces_id_fk",
"tableFrom": "messages_files",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -24709,7 +27546,10 @@
"compositePrimaryKeys": {
"messages_files_file_id_message_id_pk": {
"name": "messages_files_file_id_message_id_pk",
- "columns": ["file_id", "message_id"]
+ "columns": [
+ "file_id",
+ "message_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -24924,8 +27764,12 @@
"name": "messenger_account_links_user_id_users_id_fk",
"tableFrom": "messenger_account_links",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -24933,8 +27777,12 @@
"name": "messenger_account_links_workspace_id_workspaces_id_fk",
"tableFrom": "messenger_account_links",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -24942,8 +27790,12 @@
"name": "messenger_account_links_active_agent_id_agents_id_fk",
"tableFrom": "messenger_account_links",
"tableTo": "agents",
- "columnsFrom": ["active_agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "active_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -25118,8 +27970,12 @@
"name": "messenger_installations_installed_by_user_id_users_id_fk",
"tableFrom": "messenger_installations",
"tableTo": "users",
- "columnsFrom": ["installed_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "installed_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -25267,8 +28123,12 @@
"name": "metric_points_metric_id_metrics_id_fk",
"tableFrom": "metric_points",
"tableTo": "metrics",
- "columnsFrom": ["metric_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "metric_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -25276,8 +28136,12 @@
"name": "metric_points_user_id_users_id_fk",
"tableFrom": "metric_points",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -25285,8 +28149,12 @@
"name": "metric_points_workspace_id_workspaces_id_fk",
"tableFrom": "metric_points",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -25459,8 +28327,12 @@
"name": "metrics_user_id_users_id_fk",
"tableFrom": "metrics",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -25468,8 +28340,12 @@
"name": "metrics_workspace_id_workspaces_id_fk",
"tableFrom": "metrics",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -25573,8 +28449,12 @@
"name": "nextauth_accounts_user_id_users_id_fk",
"tableFrom": "nextauth_accounts",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -25582,7 +28462,10 @@
"compositePrimaryKeys": {
"nextauth_accounts_provider_providerAccountId_pk": {
"name": "nextauth_accounts_provider_providerAccountId_pk",
- "columns": ["provider", "providerAccountId"]
+ "columns": [
+ "provider",
+ "providerAccountId"
+ ]
}
},
"uniqueConstraints": {},
@@ -25649,8 +28532,12 @@
"name": "nextauth_authenticators_user_id_users_id_fk",
"tableFrom": "nextauth_authenticators",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -25658,14 +28545,19 @@
"compositePrimaryKeys": {
"nextauth_authenticators_user_id_credentialID_pk": {
"name": "nextauth_authenticators_user_id_credentialID_pk",
- "columns": ["user_id", "credentialID"]
+ "columns": [
+ "user_id",
+ "credentialID"
+ ]
}
},
"uniqueConstraints": {
"nextauth_authenticators_credentialID_unique": {
"name": "nextauth_authenticators_credentialID_unique",
"nullsNotDistinct": false,
- "columns": ["credentialID"]
+ "columns": [
+ "credentialID"
+ ]
}
},
"policies": {},
@@ -25717,8 +28609,12 @@
"name": "nextauth_sessions_user_id_users_id_fk",
"tableFrom": "nextauth_sessions",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -25757,7 +28653,10 @@
"compositePrimaryKeys": {
"nextauth_verificationtokens_identifier_token_pk": {
"name": "nextauth_verificationtokens_identifier_token_pk",
- "columns": ["identifier", "token"]
+ "columns": [
+ "identifier",
+ "token"
+ ]
}
},
"uniqueConstraints": {},
@@ -25872,8 +28771,12 @@
"name": "notification_deliveries_notification_id_notifications_id_fk",
"tableFrom": "notification_deliveries",
"tableTo": "notifications",
- "columnsFrom": ["notification_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "notification_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -26129,8 +29032,12 @@
"name": "notifications_user_id_users_id_fk",
"tableFrom": "notifications",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -26138,8 +29045,12 @@
"name": "notifications_workspace_id_workspaces_id_fk",
"tableFrom": "notifications",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -26292,8 +29203,12 @@
"name": "oidc_access_tokens_user_id_users_id_fk",
"tableFrom": "oidc_access_tokens",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -26394,8 +29309,12 @@
"name": "oidc_authorization_codes_user_id_users_id_fk",
"tableFrom": "oidc_authorization_codes",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -26584,8 +29503,12 @@
"name": "oidc_clients_user_id_users_id_fk",
"tableFrom": "oidc_clients",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -26593,8 +29516,12 @@
"name": "oidc_clients_workspace_id_workspaces_id_fk",
"tableFrom": "oidc_clients",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -26661,8 +29588,12 @@
"name": "oidc_consents_user_id_users_id_fk",
"tableFrom": "oidc_consents",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -26670,8 +29601,12 @@
"name": "oidc_consents_client_id_oidc_clients_id_fk",
"tableFrom": "oidc_consents",
"tableTo": "oidc_clients",
- "columnsFrom": ["client_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "client_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -26679,7 +29614,10 @@
"compositePrimaryKeys": {
"oidc_consents_user_id_client_id_pk": {
"name": "oidc_consents_user_id_client_id_pk",
- "columns": ["user_id", "client_id"]
+ "columns": [
+ "user_id",
+ "client_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -26783,8 +29721,12 @@
"name": "oidc_device_codes_user_id_users_id_fk",
"tableFrom": "oidc_device_codes",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -26879,8 +29821,12 @@
"name": "oidc_grants_user_id_users_id_fk",
"tableFrom": "oidc_grants",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -27033,8 +29979,12 @@
"name": "oidc_refresh_tokens_user_id_users_id_fk",
"tableFrom": "oidc_refresh_tokens",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -27117,8 +30067,12 @@
"name": "oidc_sessions_user_id_users_id_fk",
"tableFrom": "oidc_sessions",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -27291,8 +30245,12 @@
"name": "project_agents_project_id_projects_id_fk",
"tableFrom": "project_agents",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -27300,8 +30258,12 @@
"name": "project_agents_agent_id_agents_id_fk",
"tableFrom": "project_agents",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -27309,8 +30271,12 @@
"name": "project_agents_added_by_user_id_users_id_fk",
"tableFrom": "project_agents",
"tableTo": "users",
- "columnsFrom": ["added_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "added_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -27318,8 +30284,12 @@
"name": "project_agents_workspace_id_workspaces_id_fk",
"tableFrom": "project_agents",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -27492,8 +30462,12 @@
"name": "project_chat_groups_project_id_projects_id_fk",
"tableFrom": "project_chat_groups",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -27501,8 +30475,12 @@
"name": "project_chat_groups_chat_group_id_chat_groups_id_fk",
"tableFrom": "project_chat_groups",
"tableTo": "chat_groups",
- "columnsFrom": ["chat_group_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "chat_group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -27510,8 +30488,12 @@
"name": "project_chat_groups_added_by_user_id_users_id_fk",
"tableFrom": "project_chat_groups",
"tableTo": "users",
- "columnsFrom": ["added_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "added_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -27519,8 +30501,12 @@
"name": "project_chat_groups_workspace_id_workspaces_id_fk",
"tableFrom": "project_chat_groups",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -27679,8 +30665,12 @@
"name": "project_completion_reviews_project_id_projects_id_fk",
"tableFrom": "project_completion_reviews",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -27688,8 +30678,12 @@
"name": "project_completion_reviews_reviewer_user_id_users_id_fk",
"tableFrom": "project_completion_reviews",
"tableTo": "users",
- "columnsFrom": ["reviewer_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "reviewer_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -27697,8 +30691,12 @@
"name": "project_completion_reviews_workspace_id_workspaces_id_fk",
"tableFrom": "project_completion_reviews",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -27864,8 +30862,12 @@
"name": "project_knowledge_bases_project_id_projects_id_fk",
"tableFrom": "project_knowledge_bases",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -27873,8 +30875,12 @@
"name": "project_knowledge_bases_knowledge_base_id_knowledge_bases_id_fk",
"tableFrom": "project_knowledge_bases",
"tableTo": "knowledge_bases",
- "columnsFrom": ["knowledge_base_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "knowledge_base_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -27882,8 +30888,12 @@
"name": "project_knowledge_bases_added_by_user_id_users_id_fk",
"tableFrom": "project_knowledge_bases",
"tableTo": "users",
- "columnsFrom": ["added_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "added_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -27891,8 +30901,12 @@
"name": "project_knowledge_bases_workspace_id_workspaces_id_fk",
"tableFrom": "project_knowledge_bases",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -28094,8 +31108,12 @@
"name": "project_working_directories_project_id_projects_id_fk",
"tableFrom": "project_working_directories",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -28103,8 +31121,12 @@
"name": "project_working_directories_device_id_devices_id_fk",
"tableFrom": "project_working_directories",
"tableTo": "devices",
- "columnsFrom": ["device_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "device_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -28112,8 +31134,12 @@
"name": "project_working_directories_workspace_id_workspaces_id_fk",
"tableFrom": "project_working_directories",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -28121,8 +31147,12 @@
"name": "project_working_directories_added_by_user_id_users_id_fk",
"tableFrom": "project_working_directories",
"tableTo": "users",
- "columnsFrom": ["added_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "added_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -28508,8 +31538,12 @@
"name": "projects_coordinator_agent_id_agents_id_fk",
"tableFrom": "projects",
"tableTo": "agents",
- "columnsFrom": ["coordinator_agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "coordinator_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -28517,8 +31551,12 @@
"name": "projects_user_id_users_id_fk",
"tableFrom": "projects",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -28526,8 +31564,12 @@
"name": "projects_workspace_id_workspaces_id_fk",
"tableFrom": "projects",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -28752,8 +31794,12 @@
"name": "project_environments_project_id_projects_id_fk",
"tableFrom": "project_environments",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -28761,8 +31807,12 @@
"name": "project_environments_environment_id_environments_id_fk",
"tableFrom": "project_environments",
"tableTo": "environments",
- "columnsFrom": ["environment_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "environment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -28770,8 +31820,12 @@
"name": "project_environments_workspace_id_workspaces_id_fk",
"tableFrom": "project_environments",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -28779,8 +31833,12 @@
"name": "project_environments_added_by_user_id_users_id_fk",
"tableFrom": "project_environments",
"tableTo": "users",
- "columnsFrom": ["added_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "added_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -28788,8 +31846,14 @@
"name": "project_environments_default_instance_fk",
"tableFrom": "project_environments",
"tableTo": "environment_instances",
- "columnsFrom": ["environment_id", "default_instance_id"],
- "columnsTo": ["environment_id", "id"],
+ "columnsFrom": [
+ "environment_id",
+ "default_instance_id"
+ ],
+ "columnsTo": [
+ "environment_id",
+ "id"
+ ],
"onDelete": "restrict",
"onUpdate": "no action"
}
@@ -28927,8 +31991,12 @@
"name": "project_members_project_id_projects_id_fk",
"tableFrom": "project_members",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -28936,8 +32004,12 @@
"name": "project_members_user_id_users_id_fk",
"tableFrom": "project_members",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -28945,8 +32017,12 @@
"name": "project_members_added_by_user_id_users_id_fk",
"tableFrom": "project_members",
"tableTo": "users",
- "columnsFrom": ["added_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "added_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -29003,6 +32079,12 @@
"primaryKey": false,
"notNull": false
},
+ "last_seen_at": {
+ "name": "last_seen_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
"accessed_at": {
"name": "accessed_at",
"type": "timestamp with time zone",
@@ -29062,8 +32144,12 @@
"name": "project_sites_project_id_projects_id_fk",
"tableFrom": "project_sites",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -29071,8 +32157,12 @@
"name": "project_sites_workspace_id_workspaces_id_fk",
"tableFrom": "project_sites",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -29080,8 +32170,12 @@
"name": "project_sites_created_by_user_id_users_id_fk",
"tableFrom": "project_sites",
"tableTo": "users",
- "columnsFrom": ["created_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "created_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -29089,8 +32183,12 @@
"name": "project_sites_acceptance_id_acceptances_id_fk",
"tableFrom": "project_sites",
"tableTo": "acceptances",
- "columnsFrom": ["acceptance_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "acceptance_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -29253,8 +32351,12 @@
"name": "project_works_project_id_projects_id_fk",
"tableFrom": "project_works",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -29262,8 +32364,12 @@
"name": "project_works_work_id_works_id_fk",
"tableFrom": "project_works",
"tableTo": "works",
- "columnsFrom": ["work_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -29271,8 +32377,12 @@
"name": "project_works_added_by_user_id_users_id_fk",
"tableFrom": "project_works",
"tableTo": "users",
- "columnsFrom": ["added_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "added_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -29280,8 +32390,12 @@
"name": "project_works_workspace_id_workspaces_id_fk",
"tableFrom": "project_works",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -29451,8 +32565,12 @@
"name": "push_live_activities_user_id_users_id_fk",
"tableFrom": "push_live_activities",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -29600,8 +32718,12 @@
"name": "push_tokens_user_id_users_id_fk",
"tableFrom": "push_tokens",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -29756,8 +32878,12 @@
"name": "chunks_user_id_users_id_fk",
"tableFrom": "chunks",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -29765,8 +32891,12 @@
"name": "chunks_workspace_id_workspaces_id_fk",
"tableFrom": "chunks",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -29886,8 +33016,12 @@
"name": "document_chunks_document_id_documents_id_fk",
"tableFrom": "document_chunks",
"tableTo": "documents",
- "columnsFrom": ["document_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -29895,8 +33029,12 @@
"name": "document_chunks_chunk_id_chunks_id_fk",
"tableFrom": "document_chunks",
"tableTo": "chunks",
- "columnsFrom": ["chunk_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "chunk_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -29904,8 +33042,12 @@
"name": "document_chunks_user_id_users_id_fk",
"tableFrom": "document_chunks",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -29913,8 +33055,12 @@
"name": "document_chunks_workspace_id_workspaces_id_fk",
"tableFrom": "document_chunks",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -29922,7 +33068,10 @@
"compositePrimaryKeys": {
"document_chunks_document_id_chunk_id_pk": {
"name": "document_chunks_document_id_chunk_id_pk",
- "columns": ["document_id", "chunk_id"]
+ "columns": [
+ "document_id",
+ "chunk_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -30051,8 +33200,12 @@
"name": "embeddings_chunk_id_chunks_id_fk",
"tableFrom": "embeddings",
"tableTo": "chunks",
- "columnsFrom": ["chunk_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "chunk_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30060,8 +33213,12 @@
"name": "embeddings_user_id_users_id_fk",
"tableFrom": "embeddings",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30069,8 +33226,12 @@
"name": "embeddings_workspace_id_workspaces_id_fk",
"tableFrom": "embeddings",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -30080,7 +33241,9 @@
"embeddings_chunk_id_unique": {
"name": "embeddings_chunk_id_unique",
"nullsNotDistinct": false,
- "columns": ["chunk_id"]
+ "columns": [
+ "chunk_id"
+ ]
}
},
"policies": {},
@@ -30268,8 +33431,12 @@
"name": "unstructured_chunks_composite_id_chunks_id_fk",
"tableFrom": "unstructured_chunks",
"tableTo": "chunks",
- "columnsFrom": ["composite_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "composite_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30277,8 +33444,12 @@
"name": "unstructured_chunks_user_id_users_id_fk",
"tableFrom": "unstructured_chunks",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30286,8 +33457,12 @@
"name": "unstructured_chunks_workspace_id_workspaces_id_fk",
"tableFrom": "unstructured_chunks",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30295,8 +33470,12 @@
"name": "unstructured_chunks_file_id_files_id_fk",
"tableFrom": "unstructured_chunks",
"tableTo": "files",
- "columnsFrom": ["file_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -30418,8 +33597,12 @@
"name": "rag_eval_dataset_records_dataset_id_rag_eval_datasets_id_fk",
"tableFrom": "rag_eval_dataset_records",
"tableTo": "rag_eval_datasets",
- "columnsFrom": ["dataset_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "dataset_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30427,8 +33610,12 @@
"name": "rag_eval_dataset_records_user_id_users_id_fk",
"tableFrom": "rag_eval_dataset_records",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30436,8 +33623,12 @@
"name": "rag_eval_dataset_records_workspace_id_workspaces_id_fk",
"tableFrom": "rag_eval_dataset_records",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -30547,8 +33738,12 @@
"name": "rag_eval_datasets_knowledge_base_id_knowledge_bases_id_fk",
"tableFrom": "rag_eval_datasets",
"tableTo": "knowledge_bases",
- "columnsFrom": ["knowledge_base_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "knowledge_base_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30556,8 +33751,12 @@
"name": "rag_eval_datasets_user_id_users_id_fk",
"tableFrom": "rag_eval_datasets",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30565,8 +33764,12 @@
"name": "rag_eval_datasets_workspace_id_workspaces_id_fk",
"tableFrom": "rag_eval_datasets",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -30712,8 +33915,12 @@
"name": "rag_eval_evaluations_dataset_id_rag_eval_datasets_id_fk",
"tableFrom": "rag_eval_evaluations",
"tableTo": "rag_eval_datasets",
- "columnsFrom": ["dataset_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "dataset_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30721,8 +33928,12 @@
"name": "rag_eval_evaluations_knowledge_base_id_knowledge_bases_id_fk",
"tableFrom": "rag_eval_evaluations",
"tableTo": "knowledge_bases",
- "columnsFrom": ["knowledge_base_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "knowledge_base_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30730,8 +33941,12 @@
"name": "rag_eval_evaluations_user_id_users_id_fk",
"tableFrom": "rag_eval_evaluations",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30739,8 +33954,12 @@
"name": "rag_eval_evaluations_workspace_id_workspaces_id_fk",
"tableFrom": "rag_eval_evaluations",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -30904,8 +34123,12 @@
"name": "rag_eval_evaluation_records_question_embedding_id_embeddings_id_fk",
"tableFrom": "rag_eval_evaluation_records",
"tableTo": "embeddings",
- "columnsFrom": ["question_embedding_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "question_embedding_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -30913,8 +34136,12 @@
"name": "rag_eval_evaluation_records_dataset_record_id_rag_eval_dataset_records_id_fk",
"tableFrom": "rag_eval_evaluation_records",
"tableTo": "rag_eval_dataset_records",
- "columnsFrom": ["dataset_record_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "dataset_record_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30922,8 +34149,12 @@
"name": "rag_eval_evaluation_records_evaluation_id_rag_eval_evaluations_id_fk",
"tableFrom": "rag_eval_evaluation_records",
"tableTo": "rag_eval_evaluations",
- "columnsFrom": ["evaluation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "evaluation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30931,8 +34162,12 @@
"name": "rag_eval_evaluation_records_user_id_users_id_fk",
"tableFrom": "rag_eval_evaluation_records",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -30940,8 +34175,12 @@
"name": "rag_eval_evaluation_records_workspace_id_workspaces_id_fk",
"tableFrom": "rag_eval_evaluation_records",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -31022,7 +34261,9 @@
"rbac_permissions_code_unique": {
"name": "rbac_permissions_code_unique",
"nullsNotDistinct": false,
- "columns": ["code"]
+ "columns": [
+ "code"
+ ]
}
},
"policies": {},
@@ -31090,8 +34331,12 @@
"name": "rbac_role_permissions_role_id_rbac_roles_id_fk",
"tableFrom": "rbac_role_permissions",
"tableTo": "rbac_roles",
- "columnsFrom": ["role_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -31099,8 +34344,12 @@
"name": "rbac_role_permissions_permission_id_rbac_permissions_id_fk",
"tableFrom": "rbac_role_permissions",
"tableTo": "rbac_permissions",
- "columnsFrom": ["permission_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -31108,7 +34357,10 @@
"compositePrimaryKeys": {
"rbac_role_permissions_role_id_permission_id_pk": {
"name": "rbac_role_permissions_role_id_permission_id_pk",
- "columns": ["role_id", "permission_id"]
+ "columns": [
+ "role_id",
+ "permission_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -31236,8 +34488,12 @@
"name": "rbac_roles_workspace_id_workspaces_id_fk",
"tableFrom": "rbac_roles",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -31370,8 +34626,12 @@
"name": "rbac_user_roles_user_id_users_id_fk",
"tableFrom": "rbac_user_roles",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -31379,8 +34639,12 @@
"name": "rbac_user_roles_role_id_rbac_roles_id_fk",
"tableFrom": "rbac_user_roles",
"tableTo": "rbac_roles",
- "columnsFrom": ["role_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -31388,8 +34652,12 @@
"name": "rbac_user_roles_workspace_id_workspaces_id_fk",
"tableFrom": "rbac_user_roles",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -31496,8 +34764,12 @@
"name": "agents_to_sessions_agent_id_agents_id_fk",
"tableFrom": "agents_to_sessions",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -31505,8 +34777,12 @@
"name": "agents_to_sessions_session_id_sessions_id_fk",
"tableFrom": "agents_to_sessions",
"tableTo": "sessions",
- "columnsFrom": ["session_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -31514,8 +34790,12 @@
"name": "agents_to_sessions_user_id_users_id_fk",
"tableFrom": "agents_to_sessions",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -31523,8 +34803,12 @@
"name": "agents_to_sessions_workspace_id_workspaces_id_fk",
"tableFrom": "agents_to_sessions",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -31532,7 +34816,10 @@
"compositePrimaryKeys": {
"agents_to_sessions_agent_id_session_id_pk": {
"name": "agents_to_sessions_agent_id_session_id_pk",
- "columns": ["agent_id", "session_id"]
+ "columns": [
+ "agent_id",
+ "session_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -31643,8 +34930,12 @@
"name": "file_chunks_file_id_files_id_fk",
"tableFrom": "file_chunks",
"tableTo": "files",
- "columnsFrom": ["file_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -31652,8 +34943,12 @@
"name": "file_chunks_chunk_id_chunks_id_fk",
"tableFrom": "file_chunks",
"tableTo": "chunks",
- "columnsFrom": ["chunk_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "chunk_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -31661,8 +34956,12 @@
"name": "file_chunks_user_id_users_id_fk",
"tableFrom": "file_chunks",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -31670,8 +34969,12 @@
"name": "file_chunks_workspace_id_workspaces_id_fk",
"tableFrom": "file_chunks",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -31679,7 +34982,10 @@
"compositePrimaryKeys": {
"file_chunks_file_id_chunk_id_pk": {
"name": "file_chunks_file_id_chunk_id_pk",
- "columns": ["file_id", "chunk_id"]
+ "columns": [
+ "file_id",
+ "chunk_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -31783,8 +35089,12 @@
"name": "files_to_sessions_file_id_files_id_fk",
"tableFrom": "files_to_sessions",
"tableTo": "files",
- "columnsFrom": ["file_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -31792,8 +35102,12 @@
"name": "files_to_sessions_session_id_sessions_id_fk",
"tableFrom": "files_to_sessions",
"tableTo": "sessions",
- "columnsFrom": ["session_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -31801,8 +35115,12 @@
"name": "files_to_sessions_user_id_users_id_fk",
"tableFrom": "files_to_sessions",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -31810,8 +35128,12 @@
"name": "files_to_sessions_workspace_id_workspaces_id_fk",
"tableFrom": "files_to_sessions",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -31819,7 +35141,10 @@
"compositePrimaryKeys": {
"files_to_sessions_file_id_session_id_pk": {
"name": "files_to_sessions_file_id_session_id_pk",
- "columns": ["file_id", "session_id"]
+ "columns": [
+ "file_id",
+ "session_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -32052,8 +35377,12 @@
"name": "resource_permissions_workspace_id_workspaces_id_fk",
"tableFrom": "resource_permissions",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -32061,8 +35390,12 @@
"name": "resource_permissions_user_id_users_id_fk",
"tableFrom": "resource_permissions",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -32070,8 +35403,12 @@
"name": "resource_permissions_created_by_users_id_fk",
"tableFrom": "resource_permissions",
"tableTo": "users",
- "columnsFrom": ["created_by"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -32241,8 +35578,12 @@
"name": "resource_transfer_requests_workspace_id_workspaces_id_fk",
"tableFrom": "resource_transfer_requests",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -32250,8 +35591,12 @@
"name": "resource_transfer_requests_initiator_id_users_id_fk",
"tableFrom": "resource_transfer_requests",
"tableTo": "users",
- "columnsFrom": ["initiator_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "initiator_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -32259,8 +35604,12 @@
"name": "resource_transfer_requests_recipient_id_users_id_fk",
"tableFrom": "resource_transfer_requests",
"tableTo": "users",
- "columnsFrom": ["recipient_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "recipient_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -32268,8 +35617,12 @@
"name": "resource_transfer_requests_previous_owner_id_users_id_fk",
"tableFrom": "resource_transfer_requests",
"tableTo": "users",
- "columnsFrom": ["previous_owner_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "previous_owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -32664,8 +36017,12 @@
"name": "scm_change_requests_user_id_users_id_fk",
"tableFrom": "scm_change_requests",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -32673,8 +36030,12 @@
"name": "scm_change_requests_workspace_id_workspaces_id_fk",
"tableFrom": "scm_change_requests",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -32682,8 +36043,12 @@
"name": "scm_change_requests_installation_id_scm_installations_id_fk",
"tableFrom": "scm_change_requests",
"tableTo": "scm_installations",
- "columnsFrom": ["installation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "installation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -32691,8 +36056,12 @@
"name": "scm_change_requests_acceptance_id_acceptances_id_fk",
"tableFrom": "scm_change_requests",
"tableTo": "acceptances",
- "columnsFrom": ["acceptance_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "acceptance_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -32700,8 +36069,12 @@
"name": "scm_change_requests_work_id_works_id_fk",
"tableFrom": "scm_change_requests",
"tableTo": "works",
- "columnsFrom": ["work_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -32709,8 +36082,12 @@
"name": "scm_change_requests_topic_id_topics_id_fk",
"tableFrom": "scm_change_requests",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -32718,8 +36095,12 @@
"name": "scm_change_requests_task_id_tasks_id_fk",
"tableFrom": "scm_change_requests",
"tableTo": "tasks",
- "columnsFrom": ["task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -32870,8 +36251,12 @@
"name": "scm_identities_user_id_users_id_fk",
"tableFrom": "scm_identities",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -33080,8 +36465,12 @@
"name": "scm_installations_user_id_users_id_fk",
"tableFrom": "scm_installations",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -33089,8 +36478,12 @@
"name": "scm_installations_workspace_id_workspaces_id_fk",
"tableFrom": "scm_installations",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -33391,8 +36784,12 @@
"name": "session_groups_user_id_users_id_fk",
"tableFrom": "session_groups",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -33400,8 +36797,12 @@
"name": "session_groups_workspace_id_workspaces_id_fk",
"tableFrom": "session_groups",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -33671,8 +37072,12 @@
"name": "sessions_user_id_users_id_fk",
"tableFrom": "sessions",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -33680,8 +37085,12 @@
"name": "sessions_group_id_session_groups_id_fk",
"tableFrom": "sessions",
"tableTo": "session_groups",
- "columnsFrom": ["group_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -33689,8 +37098,12 @@
"name": "sessions_workspace_id_workspaces_id_fk",
"tableFrom": "sessions",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -33968,8 +37381,12 @@
"name": "signals_user_id_users_id_fk",
"tableFrom": "signals",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -33977,8 +37394,12 @@
"name": "signals_workspace_id_workspaces_id_fk",
"tableFrom": "signals",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -33986,8 +37407,12 @@
"name": "signals_account_id_agent_accounts_id_fk",
"tableFrom": "signals",
"tableTo": "agent_accounts",
- "columnsFrom": ["account_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "account_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -33995,8 +37420,12 @@
"name": "signals_agent_id_agents_id_fk",
"tableFrom": "signals",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -34091,8 +37520,12 @@
"name": "signal_decision_labels_decision_id_signal_decisions_id_fk",
"tableFrom": "signal_decision_labels",
"tableTo": "signal_decisions",
- "columnsFrom": ["decision_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "decision_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -34306,8 +37739,12 @@
"name": "signal_decisions_signal_id_signals_id_fk",
"tableFrom": "signal_decisions",
"tableTo": "signals",
- "columnsFrom": ["signal_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "signal_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -34315,8 +37752,12 @@
"name": "signal_decisions_agent_id_agents_id_fk",
"tableFrom": "signal_decisions",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -34324,8 +37765,12 @@
"name": "signal_decisions_user_id_users_id_fk",
"tableFrom": "signal_decisions",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -34333,8 +37778,12 @@
"name": "signal_decisions_workspace_id_workspaces_id_fk",
"tableFrom": "signal_decisions",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -34342,8 +37791,12 @@
"name": "signal_decisions_topic_id_topics_id_fk",
"tableFrom": "signal_decisions",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -34724,8 +38177,12 @@
"name": "briefs_user_id_users_id_fk",
"tableFrom": "briefs",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -34733,8 +38190,12 @@
"name": "briefs_workspace_id_workspaces_id_fk",
"tableFrom": "briefs",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -34742,8 +38203,12 @@
"name": "briefs_task_id_tasks_id_fk",
"tableFrom": "briefs",
"tableTo": "tasks",
- "columnsFrom": ["task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -34751,8 +38216,12 @@
"name": "briefs_cron_job_id_agent_cron_jobs_id_fk",
"tableFrom": "briefs",
"tableTo": "agent_cron_jobs",
- "columnsFrom": ["cron_job_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "cron_job_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -34910,8 +38379,12 @@
"name": "task_activities_task_id_tasks_id_fk",
"tableFrom": "task_activities",
"tableTo": "tasks",
- "columnsFrom": ["task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -34919,8 +38392,12 @@
"name": "task_activities_user_id_users_id_fk",
"tableFrom": "task_activities",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -34928,8 +38405,12 @@
"name": "task_activities_workspace_id_workspaces_id_fk",
"tableFrom": "task_activities",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -34937,8 +38418,12 @@
"name": "task_activities_actor_user_id_users_id_fk",
"tableFrom": "task_activities",
"tableTo": "users",
- "columnsFrom": ["actor_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "actor_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -34946,8 +38431,12 @@
"name": "task_activities_actor_agent_id_agents_id_fk",
"tableFrom": "task_activities",
"tableTo": "agents",
- "columnsFrom": ["actor_agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "actor_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -35190,8 +38679,12 @@
"name": "task_comments_task_id_tasks_id_fk",
"tableFrom": "task_comments",
"tableTo": "tasks",
- "columnsFrom": ["task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -35199,8 +38692,12 @@
"name": "task_comments_user_id_users_id_fk",
"tableFrom": "task_comments",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -35208,8 +38705,12 @@
"name": "task_comments_workspace_id_workspaces_id_fk",
"tableFrom": "task_comments",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -35217,8 +38718,12 @@
"name": "task_comments_author_user_id_users_id_fk",
"tableFrom": "task_comments",
"tableTo": "users",
- "columnsFrom": ["author_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "author_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -35226,8 +38731,12 @@
"name": "task_comments_author_agent_id_agents_id_fk",
"tableFrom": "task_comments",
"tableTo": "agents",
- "columnsFrom": ["author_agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "author_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -35235,8 +38744,12 @@
"name": "task_comments_brief_id_briefs_id_fk",
"tableFrom": "task_comments",
"tableTo": "briefs",
- "columnsFrom": ["brief_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "brief_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -35244,8 +38757,12 @@
"name": "task_comments_topic_id_topics_id_fk",
"tableFrom": "task_comments",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -35434,8 +38951,12 @@
"name": "task_dependencies_task_id_tasks_id_fk",
"tableFrom": "task_dependencies",
"tableTo": "tasks",
- "columnsFrom": ["task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -35443,8 +38964,12 @@
"name": "task_dependencies_depends_on_id_tasks_id_fk",
"tableFrom": "task_dependencies",
"tableTo": "tasks",
- "columnsFrom": ["depends_on_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "depends_on_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -35452,8 +38977,12 @@
"name": "task_dependencies_user_id_users_id_fk",
"tableFrom": "task_dependencies",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -35461,8 +38990,12 @@
"name": "task_dependencies_workspace_id_workspaces_id_fk",
"tableFrom": "task_dependencies",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -35645,8 +39178,12 @@
"name": "task_documents_task_id_tasks_id_fk",
"tableFrom": "task_documents",
"tableTo": "tasks",
- "columnsFrom": ["task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -35654,8 +39191,12 @@
"name": "task_documents_document_id_documents_id_fk",
"tableFrom": "task_documents",
"tableTo": "documents",
- "columnsFrom": ["document_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -35663,8 +39204,12 @@
"name": "task_documents_user_id_users_id_fk",
"tableFrom": "task_documents",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -35672,8 +39217,12 @@
"name": "task_documents_workspace_id_workspaces_id_fk",
"tableFrom": "task_documents",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -35945,8 +39494,12 @@
"name": "task_topics_task_id_tasks_id_fk",
"tableFrom": "task_topics",
"tableTo": "tasks",
- "columnsFrom": ["task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -35954,8 +39507,12 @@
"name": "task_topics_topic_id_topics_id_fk",
"tableFrom": "task_topics",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -35963,8 +39520,12 @@
"name": "task_topics_user_id_users_id_fk",
"tableFrom": "task_topics",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -35972,8 +39533,12 @@
"name": "task_topics_workspace_id_workspaces_id_fk",
"tableFrom": "task_topics",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -36483,8 +40048,12 @@
"name": "tasks_created_by_user_id_users_id_fk",
"tableFrom": "tasks",
"tableTo": "users",
- "columnsFrom": ["created_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "created_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -36492,8 +40061,12 @@
"name": "tasks_workspace_id_workspaces_id_fk",
"tableFrom": "tasks",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -36501,8 +40074,12 @@
"name": "tasks_project_id_projects_id_fk",
"tableFrom": "tasks",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -36510,8 +40087,12 @@
"name": "tasks_created_by_agent_id_agents_id_fk",
"tableFrom": "tasks",
"tableTo": "agents",
- "columnsFrom": ["created_by_agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "created_by_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -36519,8 +40100,12 @@
"name": "tasks_assignee_user_id_users_id_fk",
"tableFrom": "tasks",
"tableTo": "users",
- "columnsFrom": ["assignee_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "assignee_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -36528,8 +40113,12 @@
"name": "tasks_assignee_agent_id_agents_id_fk",
"tableFrom": "tasks",
"tableTo": "agents",
- "columnsFrom": ["assignee_agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "assignee_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -36537,8 +40126,12 @@
"name": "tasks_current_topic_id_topics_id_fk",
"tableFrom": "tasks",
"tableTo": "topics",
- "columnsFrom": ["current_topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "current_topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -36546,8 +40139,12 @@
"name": "tasks_parent_task_id_tasks_id_fk",
"tableFrom": "tasks",
"tableTo": "tasks",
- "columnsFrom": ["parent_task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -36779,8 +40376,12 @@
"name": "task_external_links_task_id_tasks_id_fk",
"tableFrom": "task_external_links",
"tableTo": "tasks",
- "columnsFrom": ["task_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -36788,8 +40389,12 @@
"name": "task_external_links_user_id_users_id_fk",
"tableFrom": "task_external_links",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -36797,8 +40402,404 @@
"name": "task_external_links_workspace_id_workspaces_id_fk",
"tableFrom": "task_external_links",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.task_label_links": {
+ "name": "task_label_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "task_id": {
+ "name": "task_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label_id": {
+ "name": "label_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "task_label_links_task_id_label_id_unique": {
+ "name": "task_label_links_task_id_label_id_unique",
+ "columns": [
+ {
+ "expression": "task_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "label_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "task_label_links_label_id_idx": {
+ "name": "task_label_links_label_id_idx",
+ "columns": [
+ {
+ "expression": "label_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "task_label_links_user_id_idx": {
+ "name": "task_label_links_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "task_label_links_workspace_id_idx": {
+ "name": "task_label_links_workspace_id_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "task_label_links_task_id_tasks_id_fk": {
+ "name": "task_label_links_task_id_tasks_id_fk",
+ "tableFrom": "task_label_links",
+ "tableTo": "tasks",
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "task_label_links_label_id_task_labels_id_fk": {
+ "name": "task_label_links_label_id_task_labels_id_fk",
+ "tableFrom": "task_label_links",
+ "tableTo": "task_labels",
+ "columnsFrom": [
+ "label_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "task_label_links_user_id_users_id_fk": {
+ "name": "task_label_links_user_id_users_id_fk",
+ "tableFrom": "task_label_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "task_label_links_workspace_id_workspaces_id_fk": {
+ "name": "task_label_links_workspace_id_workspaces_id_fk",
+ "tableFrom": "task_label_links",
+ "tableTo": "workspaces",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.task_labels": {
+ "name": "task_labels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_group": {
+ "name": "is_group",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "accessed_at": {
+ "name": "accessed_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "task_labels_user_id_idx": {
+ "name": "task_labels_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "task_labels_workspace_id_idx": {
+ "name": "task_labels_workspace_id_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "task_labels_parent_id_idx": {
+ "name": "task_labels_parent_id_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "task_labels_user_id_name_unique": {
+ "name": "task_labels_user_id_name_unique",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "lower(\"name\")",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"task_labels\".\"workspace_id\" IS NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "task_labels_workspace_id_name_unique": {
+ "name": "task_labels_workspace_id_name_unique",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "lower(\"name\")",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"task_labels\".\"workspace_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "task_labels_user_id_users_id_fk": {
+ "name": "task_labels_user_id_users_id_fk",
+ "tableFrom": "task_labels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "task_labels_workspace_id_workspaces_id_fk": {
+ "name": "task_labels_workspace_id_workspaces_id_fk",
+ "tableFrom": "task_labels",
+ "tableTo": "workspaces",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "task_labels_parent_id_task_labels_id_fk": {
+ "name": "task_labels_parent_id_task_labels_id_fk",
+ "tableFrom": "task_labels",
+ "tableTo": "task_labels",
+ "columnsFrom": [
+ "parent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -37077,8 +41078,12 @@
"name": "threads_topic_id_topics_id_fk",
"tableFrom": "threads",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -37086,8 +41091,12 @@
"name": "threads_parent_thread_id_threads_id_fk",
"tableFrom": "threads",
"tableTo": "threads",
- "columnsFrom": ["parent_thread_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_thread_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -37095,8 +41104,12 @@
"name": "threads_agent_id_agents_id_fk",
"tableFrom": "threads",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -37104,8 +41117,12 @@
"name": "threads_group_id_chat_groups_id_fk",
"tableFrom": "threads",
"tableTo": "chat_groups",
- "columnsFrom": ["group_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -37113,8 +41130,12 @@
"name": "threads_user_id_users_id_fk",
"tableFrom": "threads",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -37122,8 +41143,12 @@
"name": "threads_workspace_id_workspaces_id_fk",
"tableFrom": "threads",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -37237,8 +41262,12 @@
"name": "topic_documents_document_id_documents_id_fk",
"tableFrom": "topic_documents",
"tableTo": "documents",
- "columnsFrom": ["document_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -37246,8 +41275,12 @@
"name": "topic_documents_topic_id_topics_id_fk",
"tableFrom": "topic_documents",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -37255,8 +41288,12 @@
"name": "topic_documents_user_id_users_id_fk",
"tableFrom": "topic_documents",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -37264,8 +41301,12 @@
"name": "topic_documents_workspace_id_workspaces_id_fk",
"tableFrom": "topic_documents",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -37273,7 +41314,10 @@
"compositePrimaryKeys": {
"topic_documents_document_id_topic_id_pk": {
"name": "topic_documents_document_id_topic_id_pk",
- "columns": ["document_id", "topic_id"]
+ "columns": [
+ "document_id",
+ "topic_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -37397,8 +41441,12 @@
"name": "topic_shares_topic_id_topics_id_fk",
"tableFrom": "topic_shares",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -37406,8 +41454,12 @@
"name": "topic_shares_user_id_users_id_fk",
"tableFrom": "topic_shares",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -37415,8 +41467,12 @@
"name": "topic_shares_workspace_id_workspaces_id_fk",
"tableFrom": "topic_shares",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -37922,8 +41978,12 @@
"name": "topics_session_id_sessions_id_fk",
"tableFrom": "topics",
"tableTo": "sessions",
- "columnsFrom": ["session_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "session_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -37931,8 +41991,12 @@
"name": "topics_agent_id_agents_id_fk",
"tableFrom": "topics",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -37940,8 +42004,12 @@
"name": "topics_group_id_chat_groups_id_fk",
"tableFrom": "topics",
"tableTo": "chat_groups",
- "columnsFrom": ["group_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -37949,8 +42017,12 @@
"name": "topics_project_id_projects_id_fk",
"tableFrom": "topics",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -37958,8 +42030,12 @@
"name": "topics_project_working_directory_id_project_working_directories_id_fk",
"tableFrom": "topics",
"tableTo": "project_working_directories",
- "columnsFrom": ["project_working_directory_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_working_directory_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -37967,8 +42043,12 @@
"name": "topics_user_id_users_id_fk",
"tableFrom": "topics",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -37976,8 +42056,12 @@
"name": "topics_workspace_id_workspaces_id_fk",
"tableFrom": "topics",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -38257,8 +42341,12 @@
"name": "topic_analyses_topic_id_topics_id_fk",
"tableFrom": "topic_analyses",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -38266,8 +42354,12 @@
"name": "topic_analyses_user_id_users_id_fk",
"tableFrom": "topic_analyses",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -38275,8 +42367,12 @@
"name": "topic_analyses_workspace_id_workspaces_id_fk",
"tableFrom": "topic_analyses",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -38388,8 +42484,12 @@
"name": "topic_comment_mentions_comment_id_topic_comments_id_fk",
"tableFrom": "topic_comment_mentions",
"tableTo": "topic_comments",
- "columnsFrom": ["comment_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -38397,8 +42497,12 @@
"name": "topic_comment_mentions_mentioned_user_id_users_id_fk",
"tableFrom": "topic_comment_mentions",
"tableTo": "users",
- "columnsFrom": ["mentioned_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "mentioned_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -38406,8 +42510,12 @@
"name": "topic_comment_mentions_workspace_id_workspaces_id_fk",
"tableFrom": "topic_comment_mentions",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -38705,8 +42813,12 @@
"name": "topic_comments_topic_id_topics_id_fk",
"tableFrom": "topic_comments",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -38714,8 +42826,12 @@
"name": "topic_comments_message_id_messages_id_fk",
"tableFrom": "topic_comments",
"tableTo": "messages",
- "columnsFrom": ["message_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "message_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -38723,8 +42839,12 @@
"name": "topic_comments_parent_comment_id_topic_comments_id_fk",
"tableFrom": "topic_comments",
"tableTo": "topic_comments",
- "columnsFrom": ["parent_comment_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_comment_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "no action",
"onUpdate": "no action"
},
@@ -38732,8 +42852,12 @@
"name": "topic_comments_author_user_id_users_id_fk",
"tableFrom": "topic_comments",
"tableTo": "users",
- "columnsFrom": ["author_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "author_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -38741,8 +42865,12 @@
"name": "topic_comments_workspace_id_workspaces_id_fk",
"tableFrom": "topic_comments",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -38750,8 +42878,12 @@
"name": "topic_comments_moderated_by_user_id_users_id_fk",
"tableFrom": "topic_comments",
"tableTo": "users",
- "columnsFrom": ["moderated_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "moderated_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -38998,8 +43130,12 @@
"name": "trash_items_root_id_trash_items_id_fk",
"tableFrom": "trash_items",
"tableTo": "trash_items",
- "columnsFrom": ["root_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "root_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -39007,8 +43143,12 @@
"name": "trash_items_user_id_users_id_fk",
"tableFrom": "trash_items",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -39016,8 +43156,12 @@
"name": "trash_items_workspace_id_workspaces_id_fk",
"tableFrom": "trash_items",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -39025,8 +43169,12 @@
"name": "trash_items_deleted_by_user_id_users_id_fk",
"tableFrom": "trash_items",
"tableTo": "users",
- "columnsFrom": ["deleted_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "deleted_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -39126,8 +43274,12 @@
"name": "user_settings_id_users_id_fk",
"tableFrom": "user_settings",
"tableTo": "users",
- "columnsFrom": ["id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -39382,22 +43534,30 @@
"users_username_unique": {
"name": "users_username_unique",
"nullsNotDistinct": false,
- "columns": ["username"]
+ "columns": [
+ "username"
+ ]
},
"users_email_unique": {
"name": "users_email_unique",
"nullsNotDistinct": false,
- "columns": ["email"]
+ "columns": [
+ "email"
+ ]
},
"users_normalized_email_unique": {
"name": "users_normalized_email_unique",
"nullsNotDistinct": false,
- "columns": ["normalized_email"]
+ "columns": [
+ "normalized_email"
+ ]
},
"users_phone_unique": {
"name": "users_phone_unique",
"nullsNotDistinct": false,
- "columns": ["phone"]
+ "columns": [
+ "phone"
+ ]
}
},
"policies": {},
@@ -39674,8 +43834,12 @@
"name": "user_memories_activities_user_id_users_id_fk",
"tableFrom": "user_memories_activities",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -39683,8 +43847,12 @@
"name": "user_memories_activities_user_memory_id_user_memories_id_fk",
"tableFrom": "user_memories_activities",
"tableTo": "user_memories",
- "columnsFrom": ["user_memory_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_memory_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -39692,8 +43860,12 @@
"name": "user_memories_activities_dossier_id_user_memories_dossiers_id_fk",
"tableFrom": "user_memories_activities",
"tableTo": "user_memories_dossiers",
- "columnsFrom": ["dossier_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "dossier_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -39907,8 +44079,12 @@
"name": "user_memories_user_id_users_id_fk",
"tableFrom": "user_memories",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -40054,8 +44230,12 @@
"name": "user_memories_context_projects_context_id_user_memories_contexts_id_fk",
"tableFrom": "user_memories_context_projects",
"tableTo": "user_memories_contexts",
- "columnsFrom": ["context_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "context_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -40063,8 +44243,12 @@
"name": "user_memories_context_projects_project_id_projects_id_fk",
"tableFrom": "user_memories_context_projects",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -40072,8 +44256,12 @@
"name": "user_memories_context_projects_user_id_users_id_fk",
"tableFrom": "user_memories_context_projects",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -40349,8 +44537,12 @@
"name": "user_memories_contexts_user_id_users_id_fk",
"tableFrom": "user_memories_contexts",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -40358,8 +44550,12 @@
"name": "user_memories_contexts_user_memory_id_user_memories_id_fk",
"tableFrom": "user_memories_contexts",
"tableTo": "user_memories",
- "columnsFrom": ["user_memory_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_memory_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -40638,8 +44834,12 @@
"name": "user_memories_dossiers_context_id_user_memories_contexts_id_fk",
"tableFrom": "user_memories_dossiers",
"tableTo": "user_memories_contexts",
- "columnsFrom": ["context_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "context_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -40647,8 +44847,12 @@
"name": "user_memories_dossiers_user_id_users_id_fk",
"tableFrom": "user_memories_dossiers",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -40656,8 +44860,12 @@
"name": "user_memories_dossiers_workspace_id_workspaces_id_fk",
"tableFrom": "user_memories_dossiers",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -40665,8 +44873,12 @@
"name": "user_memories_dossiers_agent_id_agents_id_fk",
"tableFrom": "user_memories_dossiers",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -40674,8 +44886,12 @@
"name": "user_memories_dossiers_project_id_projects_id_fk",
"tableFrom": "user_memories_dossiers",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -40683,8 +44899,12 @@
"name": "user_memories_dossiers_user_memory_id_user_memories_id_fk",
"tableFrom": "user_memories_dossiers",
"tableTo": "user_memories",
- "columnsFrom": ["user_memory_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_memory_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -40868,8 +45088,12 @@
"name": "user_memories_edges_source_memory_id_user_memories_id_fk",
"tableFrom": "user_memories_edges",
"tableTo": "user_memories",
- "columnsFrom": ["source_memory_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "source_memory_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -40877,8 +45101,12 @@
"name": "user_memories_edges_target_memory_id_user_memories_id_fk",
"tableFrom": "user_memories_edges",
"tableTo": "user_memories",
- "columnsFrom": ["target_memory_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "target_memory_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -40886,8 +45114,12 @@
"name": "user_memories_edges_user_id_users_id_fk",
"tableFrom": "user_memories_edges",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -40895,8 +45127,12 @@
"name": "user_memories_edges_workspace_id_workspaces_id_fk",
"tableFrom": "user_memories_edges",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -41173,8 +45409,12 @@
"name": "user_memories_entities_parent_entity_id_user_memories_entities_id_fk",
"tableFrom": "user_memories_entities",
"tableTo": "user_memories_entities",
- "columnsFrom": ["parent_entity_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_entity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -41182,8 +45422,12 @@
"name": "user_memories_entities_user_id_users_id_fk",
"tableFrom": "user_memories_entities",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -41191,8 +45435,12 @@
"name": "user_memories_entities_workspace_id_workspaces_id_fk",
"tableFrom": "user_memories_entities",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -41200,8 +45448,12 @@
"name": "user_memories_entities_agent_id_agents_id_fk",
"tableFrom": "user_memories_entities",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -41209,8 +45461,12 @@
"name": "user_memories_entities_project_id_projects_id_fk",
"tableFrom": "user_memories_entities",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -41218,8 +45474,12 @@
"name": "user_memories_entities_user_memory_id_user_memories_id_fk",
"tableFrom": "user_memories_entities",
"tableTo": "user_memories",
- "columnsFrom": ["user_memory_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_memory_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -41382,8 +45642,12 @@
"name": "user_memories_entity_names_entity_id_user_memories_entities_id_fk",
"tableFrom": "user_memories_entity_names",
"tableTo": "user_memories_entities",
- "columnsFrom": ["entity_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "entity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -41391,8 +45655,12 @@
"name": "user_memories_entity_names_user_id_users_id_fk",
"tableFrom": "user_memories_entity_names",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -41400,8 +45668,12 @@
"name": "user_memories_entity_names_workspace_id_workspaces_id_fk",
"tableFrom": "user_memories_entity_names",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -41409,8 +45681,12 @@
"name": "user_memories_entity_names_source_memory_id_user_memories_id_fk",
"tableFrom": "user_memories_entity_names",
"tableTo": "user_memories",
- "columnsFrom": ["source_memory_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "source_memory_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -41645,8 +45921,12 @@
"name": "user_memories_experiences_user_id_users_id_fk",
"tableFrom": "user_memories_experiences",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -41654,8 +45934,12 @@
"name": "user_memories_experiences_user_memory_id_user_memories_id_fk",
"tableFrom": "user_memories_experiences",
"tableTo": "user_memories",
- "columnsFrom": ["user_memory_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_memory_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -41854,8 +46138,12 @@
"name": "user_memories_identities_user_id_users_id_fk",
"tableFrom": "user_memories_identities",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -41863,8 +46151,12 @@
"name": "user_memories_identities_user_memory_id_user_memories_id_fk",
"tableFrom": "user_memories_identities",
"tableTo": "user_memories",
- "columnsFrom": ["user_memory_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_memory_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -41872,8 +46164,12 @@
"name": "user_memories_identities_entity_id_user_memories_entities_id_fk",
"tableFrom": "user_memories_identities",
"tableTo": "user_memories_entities",
- "columnsFrom": ["entity_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "entity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -42055,8 +46351,12 @@
"name": "user_memories_operations_user_id_users_id_fk",
"tableFrom": "user_memories_operations",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -42064,8 +46364,12 @@
"name": "user_memories_operations_workspace_id_workspaces_id_fk",
"tableFrom": "user_memories_operations",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -42265,8 +46569,12 @@
"name": "user_memory_persona_document_histories_user_id_users_id_fk",
"tableFrom": "user_memory_persona_document_histories",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -42274,8 +46582,12 @@
"name": "user_memory_persona_document_histories_persona_id_user_memory_persona_documents_id_fk",
"tableFrom": "user_memory_persona_document_histories",
"tableTo": "user_memory_persona_documents",
- "columnsFrom": ["persona_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "persona_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -42418,8 +46730,12 @@
"name": "user_memory_persona_documents_user_id_users_id_fk",
"tableFrom": "user_memory_persona_documents",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -42644,8 +46960,12 @@
"name": "user_memories_preferences_user_id_users_id_fk",
"tableFrom": "user_memories_preferences",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -42653,8 +46973,12 @@
"name": "user_memories_preferences_user_memory_id_user_memories_id_fk",
"tableFrom": "user_memories_preferences",
"tableTo": "user_memories",
- "columnsFrom": ["user_memory_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_memory_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -42662,8 +46986,12 @@
"name": "user_memories_preferences_holder_entity_id_user_memories_entities_id_fk",
"tableFrom": "user_memories_preferences",
"tableTo": "user_memories_entities",
- "columnsFrom": ["holder_entity_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "holder_entity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -42671,8 +46999,12 @@
"name": "user_memories_preferences_applies_to_entity_id_user_memories_entities_id_fk",
"tableFrom": "user_memories_preferences",
"tableTo": "user_memories_entities",
- "columnsFrom": ["applies_to_entity_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "applies_to_entity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -42962,8 +47294,12 @@
"name": "acceptances_user_id_users_id_fk",
"tableFrom": "acceptances",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -42971,8 +47307,12 @@
"name": "acceptances_workspace_id_workspaces_id_fk",
"tableFrom": "acceptances",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -42980,8 +47320,12 @@
"name": "acceptances_project_id_projects_id_fk",
"tableFrom": "acceptances",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -43368,8 +47712,12 @@
"name": "verify_check_results_verify_run_id_verify_runs_id_fk",
"tableFrom": "verify_check_results",
"tableTo": "verify_runs",
- "columnsFrom": ["verify_run_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "verify_run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -43377,8 +47725,12 @@
"name": "verify_check_results_operation_id_agent_operations_id_fk",
"tableFrom": "verify_check_results",
"tableTo": "agent_operations",
- "columnsFrom": ["operation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "operation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -43386,8 +47738,12 @@
"name": "verify_check_results_user_id_users_id_fk",
"tableFrom": "verify_check_results",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -43395,8 +47751,12 @@
"name": "verify_check_results_workspace_id_workspaces_id_fk",
"tableFrom": "verify_check_results",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -43404,8 +47764,12 @@
"name": "verify_check_results_source_criterion_id_verify_criteria_id_fk",
"tableFrom": "verify_check_results",
"tableTo": "verify_criteria",
- "columnsFrom": ["source_criterion_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "source_criterion_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -43413,8 +47777,12 @@
"name": "verify_check_results_verifier_operation_id_agent_operations_id_fk",
"tableFrom": "verify_check_results",
"tableTo": "agent_operations",
- "columnsFrom": ["verifier_operation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "verifier_operation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -43422,8 +47790,12 @@
"name": "verify_check_results_verifier_tracing_id_llm_generation_tracing_id_fk",
"tableFrom": "verify_check_results",
"tableTo": "llm_generation_tracing",
- "columnsFrom": ["verifier_tracing_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "verifier_tracing_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -43431,8 +47803,12 @@
"name": "verify_check_results_repair_operation_id_agent_operations_id_fk",
"tableFrom": "verify_check_results",
"tableTo": "agent_operations",
- "columnsFrom": ["repair_operation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "repair_operation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -43619,8 +47995,12 @@
"name": "verify_criteria_user_id_users_id_fk",
"tableFrom": "verify_criteria",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -43628,8 +48008,12 @@
"name": "verify_criteria_document_id_documents_id_fk",
"tableFrom": "verify_criteria",
"tableTo": "documents",
- "columnsFrom": ["document_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -43637,8 +48021,12 @@
"name": "verify_criteria_workspace_id_workspaces_id_fk",
"tableFrom": "verify_criteria",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -43816,8 +48204,12 @@
"name": "verify_evidence_check_result_id_verify_check_results_id_fk",
"tableFrom": "verify_evidence",
"tableTo": "verify_check_results",
- "columnsFrom": ["check_result_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "check_result_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -43825,8 +48217,12 @@
"name": "verify_evidence_document_id_documents_id_fk",
"tableFrom": "verify_evidence",
"tableTo": "documents",
- "columnsFrom": ["document_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "document_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -43834,8 +48230,12 @@
"name": "verify_evidence_file_id_files_id_fk",
"tableFrom": "verify_evidence",
"tableTo": "files",
- "columnsFrom": ["file_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -43843,8 +48243,12 @@
"name": "verify_evidence_user_id_users_id_fk",
"tableFrom": "verify_evidence",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -43852,8 +48256,12 @@
"name": "verify_evidence_workspace_id_workspaces_id_fk",
"tableFrom": "verify_evidence",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -44043,8 +48451,12 @@
"name": "verify_reports_verify_run_id_verify_runs_id_fk",
"tableFrom": "verify_reports",
"tableTo": "verify_runs",
- "columnsFrom": ["verify_run_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "verify_run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -44052,8 +48464,12 @@
"name": "verify_reports_operation_id_agent_operations_id_fk",
"tableFrom": "verify_reports",
"tableTo": "agent_operations",
- "columnsFrom": ["operation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "operation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -44061,8 +48477,12 @@
"name": "verify_reports_user_id_users_id_fk",
"tableFrom": "verify_reports",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -44070,8 +48490,12 @@
"name": "verify_reports_workspace_id_workspaces_id_fk",
"tableFrom": "verify_reports",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -44321,8 +48745,12 @@
"name": "verify_review_predictions_check_result_id_verify_check_results_id_fk",
"tableFrom": "verify_review_predictions",
"tableTo": "verify_check_results",
- "columnsFrom": ["check_result_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "check_result_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -44330,8 +48758,12 @@
"name": "verify_review_predictions_user_id_users_id_fk",
"tableFrom": "verify_review_predictions",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -44339,8 +48771,12 @@
"name": "verify_review_predictions_workspace_id_workspaces_id_fk",
"tableFrom": "verify_review_predictions",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -44450,8 +48886,12 @@
"name": "verify_rubric_criteria_rubric_id_verify_rubrics_id_fk",
"tableFrom": "verify_rubric_criteria",
"tableTo": "verify_rubrics",
- "columnsFrom": ["rubric_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "rubric_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -44459,8 +48899,12 @@
"name": "verify_rubric_criteria_criterion_id_verify_criteria_id_fk",
"tableFrom": "verify_rubric_criteria",
"tableTo": "verify_criteria",
- "columnsFrom": ["criterion_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "criterion_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -44468,8 +48912,12 @@
"name": "verify_rubric_criteria_user_id_users_id_fk",
"tableFrom": "verify_rubric_criteria",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -44477,8 +48925,12 @@
"name": "verify_rubric_criteria_workspace_id_workspaces_id_fk",
"tableFrom": "verify_rubric_criteria",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -44486,7 +48938,10 @@
"compositePrimaryKeys": {
"verify_rubric_criteria_rubric_id_criterion_id_pk": {
"name": "verify_rubric_criteria_rubric_id_criterion_id_pk",
- "columns": ["rubric_id", "criterion_id"]
+ "columns": [
+ "rubric_id",
+ "criterion_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -44595,8 +49050,12 @@
"name": "verify_rubrics_user_id_users_id_fk",
"tableFrom": "verify_rubrics",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -44604,8 +49063,12 @@
"name": "verify_rubrics_workspace_id_workspaces_id_fk",
"tableFrom": "verify_rubrics",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -44877,8 +49340,12 @@
"name": "verify_runs_user_id_users_id_fk",
"tableFrom": "verify_runs",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -44886,8 +49353,12 @@
"name": "verify_runs_workspace_id_workspaces_id_fk",
"tableFrom": "verify_runs",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -44895,8 +49366,12 @@
"name": "verify_runs_acceptance_id_acceptances_id_fk",
"tableFrom": "verify_runs",
"tableTo": "acceptances",
- "columnsFrom": ["acceptance_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "acceptance_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -44904,8 +49379,12 @@
"name": "verify_runs_operation_id_agent_operations_id_fk",
"tableFrom": "verify_runs",
"tableTo": "agent_operations",
- "columnsFrom": ["operation_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "operation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -45111,8 +49590,12 @@
"name": "widget_runs_widget_id_widgets_id_fk",
"tableFrom": "widget_runs",
"tableTo": "widgets",
- "columnsFrom": ["widget_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "widget_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -45120,8 +49603,12 @@
"name": "widget_runs_version_id_widget_versions_id_fk",
"tableFrom": "widget_runs",
"tableTo": "widget_versions",
- "columnsFrom": ["version_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "version_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -45129,8 +49616,12 @@
"name": "widget_runs_user_id_users_id_fk",
"tableFrom": "widget_runs",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -45138,8 +49629,12 @@
"name": "widget_runs_workspace_id_workspaces_id_fk",
"tableFrom": "widget_runs",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -45400,8 +49895,12 @@
"name": "widget_versions_widget_id_widgets_id_fk",
"tableFrom": "widget_versions",
"tableTo": "widgets",
- "columnsFrom": ["widget_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "widget_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -45409,8 +49908,12 @@
"name": "widget_versions_user_id_users_id_fk",
"tableFrom": "widget_versions",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -45418,8 +49921,12 @@
"name": "widget_versions_workspace_id_workspaces_id_fk",
"tableFrom": "widget_versions",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -45427,8 +49934,12 @@
"name": "widget_versions_published_by_user_id_users_id_fk",
"tableFrom": "widget_versions",
"tableTo": "users",
- "columnsFrom": ["published_by_user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "published_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -45436,8 +49947,12 @@
"name": "widget_versions_source_agent_id_agents_id_fk",
"tableFrom": "widget_versions",
"tableTo": "agents",
- "columnsFrom": ["source_agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "source_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -45445,8 +49960,12 @@
"name": "widget_versions_source_topic_id_topics_id_fk",
"tableFrom": "widget_versions",
"tableTo": "topics",
- "columnsFrom": ["source_topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "source_topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -45454,8 +49973,12 @@
"name": "widget_versions_parent_version_id_widget_versions_id_fk",
"tableFrom": "widget_versions",
"tableTo": "widget_versions",
- "columnsFrom": ["parent_version_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "parent_version_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -45825,8 +50348,12 @@
"name": "widgets_user_id_users_id_fk",
"tableFrom": "widgets",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -45834,8 +50361,12 @@
"name": "widgets_workspace_id_workspaces_id_fk",
"tableFrom": "widgets",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -45843,8 +50374,12 @@
"name": "widgets_project_id_projects_id_fk",
"tableFrom": "widgets",
"tableTo": "projects",
- "columnsFrom": ["project_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -45852,8 +50387,12 @@
"name": "widgets_agent_id_agents_id_fk",
"tableFrom": "widgets",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -45861,8 +50400,12 @@
"name": "widgets_published_version_id_widget_versions_id_fk",
"tableFrom": "widgets",
"tableTo": "widget_versions",
- "columnsFrom": ["published_version_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "published_version_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -45870,8 +50413,12 @@
"name": "widgets_draft_version_id_widget_versions_id_fk",
"tableFrom": "widgets",
"tableTo": "widget_versions",
- "columnsFrom": ["draft_version_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "draft_version_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -45879,8 +50426,12 @@
"name": "widgets_metric_id_metrics_id_fk",
"tableFrom": "widgets",
"tableTo": "metrics",
- "columnsFrom": ["metric_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "metric_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -46194,8 +50745,12 @@
"name": "work_versions_work_id_works_id_fk",
"tableFrom": "work_versions",
"tableTo": "works",
- "columnsFrom": ["work_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "work_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -46203,8 +50758,12 @@
"name": "work_versions_topic_id_topics_id_fk",
"tableFrom": "work_versions",
"tableTo": "topics",
- "columnsFrom": ["topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -46212,8 +50771,12 @@
"name": "work_versions_thread_id_threads_id_fk",
"tableFrom": "work_versions",
"tableTo": "threads",
- "columnsFrom": ["thread_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "thread_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -46221,8 +50784,12 @@
"name": "work_versions_message_id_messages_id_fk",
"tableFrom": "work_versions",
"tableTo": "messages",
- "columnsFrom": ["message_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "message_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -46230,8 +50797,12 @@
"name": "work_versions_agent_id_agents_id_fk",
"tableFrom": "work_versions",
"tableTo": "agents",
- "columnsFrom": ["agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -46620,8 +51191,12 @@
"name": "works_origin_topic_id_topics_id_fk",
"tableFrom": "works",
"tableTo": "topics",
- "columnsFrom": ["origin_topic_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "origin_topic_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -46629,8 +51204,12 @@
"name": "works_origin_thread_id_threads_id_fk",
"tableFrom": "works",
"tableTo": "threads",
- "columnsFrom": ["origin_thread_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "origin_thread_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -46638,8 +51217,12 @@
"name": "works_origin_agent_id_agents_id_fk",
"tableFrom": "works",
"tableTo": "agents",
- "columnsFrom": ["origin_agent_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "origin_agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -46647,8 +51230,12 @@
"name": "works_user_id_users_id_fk",
"tableFrom": "works",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -46656,8 +51243,12 @@
"name": "works_workspace_id_workspaces_id_fk",
"tableFrom": "works",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -46781,8 +51372,12 @@
"name": "workspace_audit_logs_workspace_id_workspaces_id_fk",
"tableFrom": "workspace_audit_logs",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -46841,11 +51436,18 @@
"notNull": true,
"default": "'pending'"
},
+ "reusable": {
+ "name": "reusable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
"expires_at": {
"name": "expires_at",
"type": "timestamp with time zone",
"primaryKey": false,
- "notNull": true
+ "notNull": false
},
"created_at": {
"name": "created_at",
@@ -46929,8 +51531,12 @@
"name": "workspace_invitations_workspace_id_workspaces_id_fk",
"tableFrom": "workspace_invitations",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -46938,8 +51544,12 @@
"name": "workspace_invitations_inviter_id_users_id_fk",
"tableFrom": "workspace_invitations",
"tableTo": "users",
- "columnsFrom": ["inviter_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "inviter_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -46949,11 +51559,18 @@
"workspace_invitations_token_unique": {
"name": "workspace_invitations_token_unique",
"nullsNotDistinct": false,
- "columns": ["token"]
+ "columns": [
+ "token"
+ ]
}
},
"policies": {},
- "checkConstraints": {},
+ "checkConstraints": {
+ "workspace_invitations_expiry_required": {
+ "name": "workspace_invitations_expiry_required",
+ "value": "\"workspace_invitations\".\"reusable\" OR \"workspace_invitations\".\"expires_at\" IS NOT NULL"
+ }
+ },
"isRLSEnabled": false
},
"public.workspace_members": {
@@ -47050,8 +51667,12 @@
"name": "workspace_members_workspace_id_workspaces_id_fk",
"tableFrom": "workspace_members",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -47059,8 +51680,12 @@
"name": "workspace_members_user_id_users_id_fk",
"tableFrom": "workspace_members",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -47068,7 +51693,10 @@
"compositePrimaryKeys": {
"workspace_members_workspace_id_user_id_pk": {
"name": "workspace_members_workspace_id_user_id_pk",
- "columns": ["workspace_id", "user_id"]
+ "columns": [
+ "workspace_id",
+ "user_id"
+ ]
}
},
"uniqueConstraints": {},
@@ -47184,8 +51812,12 @@
"name": "workspace_team_members_workspace_id_workspaces_id_fk",
"tableFrom": "workspace_team_members",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -47193,8 +51825,12 @@
"name": "workspace_team_members_user_id_users_id_fk",
"tableFrom": "workspace_team_members",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -47202,8 +51838,14 @@
"name": "workspace_team_members_team_workspace_fk",
"tableFrom": "workspace_team_members",
"tableTo": "workspace_teams",
- "columnsFrom": ["team_id", "workspace_id"],
- "columnsTo": ["id", "workspace_id"],
+ "columnsFrom": [
+ "team_id",
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id",
+ "workspace_id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -47333,8 +51975,12 @@
"name": "workspace_teams_workspace_id_workspaces_id_fk",
"tableFrom": "workspace_teams",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -47342,8 +51988,12 @@
"name": "workspace_teams_created_by_users_id_fk",
"tableFrom": "workspace_teams",
"tableTo": "users",
- "columnsFrom": ["created_by"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -47353,7 +52003,10 @@
"workspace_teams_id_workspace_unique": {
"name": "workspace_teams_id_workspace_unique",
"nullsNotDistinct": false,
- "columns": ["id", "workspace_id"]
+ "columns": [
+ "id",
+ "workspace_id"
+ ]
}
},
"policies": {},
@@ -47448,8 +52101,12 @@
"name": "workspace_user_settings_workspace_id_workspaces_id_fk",
"tableFrom": "workspace_user_settings",
"tableTo": "workspaces",
- "columnsFrom": ["workspace_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -47457,8 +52114,12 @@
"name": "workspace_user_settings_user_id_users_id_fk",
"tableFrom": "workspace_user_settings",
"tableTo": "users",
- "columnsFrom": ["user_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -47587,8 +52248,12 @@
"name": "workspaces_primary_owner_id_users_id_fk",
"tableFrom": "workspaces",
"tableTo": "users",
- "columnsFrom": ["primary_owner_id"],
- "columnsTo": ["id"],
+ "columnsFrom": [
+ "primary_owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -47600,6 +52265,26 @@
"isRLSEnabled": false
}
},
- "version": "7",
- "views": {}
-}
+ "enums": {},
+ "schemas": {},
+ "sequences": {
+ "public.fts_search_sync_revision_seq": {
+ "name": "fts_search_sync_revision_seq",
+ "schema": "public",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "9223372036854775807",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/database/migrations/meta/_journal.json b/packages/database/migrations/meta/_journal.json
index 1e2ca1679b1..f7423c196b0 100644
--- a/packages/database/migrations/meta/_journal.json
+++ b/packages/database/migrations/meta/_journal.json
@@ -1470,7 +1470,14 @@
"when": 1794149966527,
"tag": "0209_add_meeting_error",
"breakpoints": true
+ },
+ {
+ "idx": 210,
+ "version": "7",
+ "when": 1794152994440,
+ "tag": "0210_agent_operations_workspace_created_at_idx",
+ "breakpoints": true
}
],
"version": "6"
-}
+}
\ No newline at end of file
diff --git a/packages/database/src/models/__tests__/agentRunBoard.test.ts b/packages/database/src/models/__tests__/agentRunBoard.test.ts
new file mode 100644
index 00000000000..205dcb36327
--- /dev/null
+++ b/packages/database/src/models/__tests__/agentRunBoard.test.ts
@@ -0,0 +1,216 @@
+// @vitest-environment node
+import { afterEach, beforeEach, describe, expect, it } from 'vitest';
+
+import { getTestDB } from '../../core/getTestDB';
+import {
+ agentInterventions,
+ agentOperations,
+ agents,
+ tasks,
+ taskTopics,
+ topics,
+ users,
+ workspaces,
+} from '../../schemas';
+import type { LobeChatDatabase } from '../../type';
+import { AgentRunBoardModel } from '../agentRunBoard';
+
+const serverDB: LobeChatDatabase = await getTestDB();
+
+const owner = 'run-board-owner';
+const teammate = 'run-board-teammate';
+const workspaceId = 'run-board-ws';
+const otherWorkspaceId = 'run-board-other-ws';
+
+const now = new Date('2026-11-08T12:00:00Z');
+const since = new Date('2026-11-08T06:00:00Z');
+const inWindow = new Date('2026-11-08T10:00:00Z');
+
+const insertRun = (id: string, values: Partial<typeof agentOperations.$inferInsert> = {}) =>
+ serverDB.insert(agentOperations).values({
+ agentId: 'public-agent',
+ createdAt: inWindow,
+ id,
+ startedAt: inWindow,
+ status: 'running',
+ topicId: 'base-topic',
+ updatedAt: inWindow,
+ userId: teammate,
+ workspaceId,
+ ...values,
+ });
+
+const ids = async () =>
+ (await new AgentRunBoardModel(serverDB, workspaceId).listRuns({ now, since }))
+ .map((r) => r.id)
+ .sort();
+
+beforeEach(async () => {
+ await serverDB.delete(users);
+ await serverDB.insert(users).values([{ id: owner }, { id: teammate }]);
+ await serverDB.insert(workspaces).values([
+ { id: workspaceId, name: 'A', primaryOwnerId: owner, slug: workspaceId },
+ { id: otherWorkspaceId, name: 'B', primaryOwnerId: owner, slug: otherWorkspaceId },
+ ]);
+ await serverDB.insert(agents).values([
+ { id: 'public-agent', title: 'Public', userId: teammate, visibility: 'public', workspaceId },
+ { id: 'private-agent', title: 'Secret', userId: owner, visibility: 'private', workspaceId },
+ ]);
+ await serverDB.insert(topics).values({ id: 'base-topic', userId: teammate, workspaceId });
+});
+
+afterEach(async () => {
+ await serverDB.delete(agentOperations);
+ await serverDB.delete(workspaces);
+ await serverDB.delete(users);
+});
+
+describe('AgentRunBoardModel.listRuns', () => {
+ it('returns teammates runs with the task title and error message but no stack', async () => {
+ await serverDB.insert(tasks).values({
+ createdByUserId: teammate,
+ id: 'task-1',
+ identifier: 'T-1',
+ instruction: 'Do it',
+ name: 'Ship it',
+ seq: 1,
+ workspaceId,
+ });
+ await insertRun('failed-run', {
+ completedAt: inWindow,
+ error: { message: 'boom', stack: 'secret stack', type: 'ToolError' },
+ status: 'error',
+ taskId: 'task-1',
+ });
+
+ const [row] = await new AgentRunBoardModel(serverDB, workspaceId).listRuns({ now, since });
+
+ expect(row).toMatchObject({
+ agentOwnerId: teammate,
+ agentTitle: 'Public',
+ errorMessage: 'boom',
+ errorType: 'ToolError',
+ taskName: 'Ship it',
+ userId: teammate,
+ });
+ expect(JSON.stringify(row)).not.toContain('secret stack');
+ });
+
+ it('excludes other workspaces, private agents, sub-agent runs and idle rows', async () => {
+ await serverDB.insert(agents).values({
+ id: 'other-agent',
+ userId: owner,
+ visibility: 'public',
+ workspaceId: otherWorkspaceId,
+ });
+ await insertRun('visible');
+ await insertRun('private', { agentId: 'private-agent', userId: owner });
+ await insertRun('child', { parentOperationId: 'visible' });
+ await insertRun('reserved', { status: 'idle' });
+ await insertRun('elsewhere', { agentId: 'other-agent', workspaceId: otherWorkspaceId });
+
+ expect(await ids()).toEqual(['visible']);
+ });
+
+ it('excludes share-visitor, trashed and channel topics', async () => {
+ await serverDB
+ .insert(topics)
+ .values([
+ { id: 'visitor-topic', senderId: 'guest', userId: teammate, workspaceId },
+ { id: 'trashed-topic', isDeleted: true, userId: teammate, workspaceId } as never,
+ { id: 'channel-topic', trigger: 'channel', userId: teammate, workspaceId },
+ { id: 'ok-topic', userId: teammate, workspaceId },
+ ]);
+ await insertRun('visitor', { topicId: 'visitor-topic' });
+ await insertRun('trashed', { topicId: 'trashed-topic' });
+ await insertRun('channel', { topicId: 'channel-topic' });
+ await insertRun('ok', { topicId: 'ok-topic' });
+
+ expect(await ids()).toEqual(['ok']);
+ });
+
+ it('excludes a run whose topic was purged', async () => {
+ await insertRun('purged', { taskId: null, topicId: null });
+
+ expect(await ids()).toEqual([]);
+ });
+
+ it('excludes a run whose task-run snapshot was private', async () => {
+ await serverDB.insert(tasks).values({
+ createdByUserId: teammate,
+ id: 'task-2',
+ identifier: 'T-2',
+ instruction: 'Do it',
+ name: 'Now public',
+ seq: 2,
+ workspaceId,
+ });
+ await serverDB.insert(topics).values({ id: 'snap-topic', userId: teammate, workspaceId });
+ await serverDB.insert(taskTopics).values({
+ seq: 1,
+ taskId: 'task-2',
+ topicId: 'snap-topic',
+ userId: teammate,
+ visibility: 'private',
+ workspaceId,
+ });
+ await insertRun('snapshot-private', { taskId: 'task-2', topicId: 'snap-topic' });
+
+ expect(await ids()).toEqual([]);
+ });
+
+ it('drops runs that ended before the window but keeps long waiting asks', async () => {
+ const old = new Date('2026-11-08T05:00:00Z');
+ await insertRun('ended-before', { completedAt: old, createdAt: old, status: 'done' });
+ await insertRun('spanning', {
+ completedAt: inWindow,
+ createdAt: old,
+ status: 'done',
+ });
+ await insertRun('old-ask', {
+ createdAt: new Date('2026-11-05T05:00:00Z'),
+ status: 'waiting_for_human',
+ });
+ await insertRun('ancient-ask', {
+ createdAt: new Date('2026-10-20T05:00:00Z'),
+ status: 'waiting_for_human',
+ });
+
+ expect(await ids()).toEqual(['old-ask', 'spanning']);
+ });
+
+ it('attaches intervention rows to waiting runs', async () => {
+ await insertRun('asking', { status: 'waiting_for_human' });
+ await serverDB.insert(agentInterventions).values({
+ activityKey: 'activity',
+ allowedActions: [],
+ batchId: 'batch',
+ canonicalToolKey: 'stripe.refund',
+ deadline: new Date('2026-11-08T13:00:00Z'),
+ interactionKind: 'approval',
+ itemCount: 1,
+ itemIndex: 0,
+ operationId: 'asking',
+ requestRevisionHash: 'a'.repeat(64),
+ reviewContext: {},
+ reviewTokenHash: 'b'.repeat(64),
+ sanitizedRequest: {},
+ source: 'server',
+ stepIndex: 0,
+ surface: 'chat',
+ systemActionEligibility: 'none',
+ toolCallId: 'call',
+ userId: teammate,
+ workspaceId,
+ } as never);
+
+ const [row] = await new AgentRunBoardModel(serverDB, workspaceId).listRuns({ now, since });
+
+ expect(row.interventions).toHaveLength(1);
+ expect(row.interventions[0]).toMatchObject({
+ canonicalToolKey: 'stripe.refund',
+ status: 'pending',
+ userId: teammate,
+ });
+ });
+});
diff --git a/packages/database/src/models/agentRunBoard.ts b/packages/database/src/models/agentRunBoard.ts
new file mode 100644
index 00000000000..51a528dabfc
--- /dev/null
+++ b/packages/database/src/models/agentRunBoard.ts
@@ -0,0 +1,182 @@
+import type { AgentOperationStatus, AgentRunBoardRunningOperation } from '@lobechat/types';
+import { and, desc, eq, gte, inArray, isNotNull, isNull, ne, or, sql } from 'drizzle-orm';
+
+import {
+ agentInterventions,
+ agentOperations,
+ agents,
+ chatGroups,
+ tasks,
+ taskTopics,
+ topics,
+} from '../schemas';
+import type { LobeChatDatabase } from '../type';
+import { notTrashed } from '../utils/softDelete';
+import { notChannelTopic } from '../utils/topicVisibility';
+
+/** A run longer than this has no bar worth drawing; it also bounds the index scan. */
+const MAX_RUN_SPAN_MS = 24 * 60 * 60_000;
+/** Parked rows have no reaper, so an unanswered ask must age out of the board. */
+const MAX_WAITING_AGE_MS = 7 * 24 * 60 * 60_000;
+const RUN_LIMIT = 500;
+const WAITING_RUN_LIMIT = 100;
+
+export interface AgentRunBoardRow {
+ agentAvatar: string | null;
+ agentBackgroundColor: string | null;
+ agentId: string;
+ agentOwnerId: string;
+ agentTitle: string | null;
+ completedAt: Date | null;
+ createdAt: Date;
+ errorMessage: string | null;
+ errorType: string | null;
+ heteroType: string | null;
+ id: string;
+ /** Empty when the run never wrote an intervention row (client-side asks, self-hosted). */
+ interventions: AgentRunBoardInterventionRow[];
+ model: string | null;
+ runningOperation: AgentRunBoardRunningOperation | null;
+ startedAt: Date | null;
+ status: AgentOperationStatus;
+ taskName: string | null;
+ topicId: string | null;
+ topicTitle: string | null;
+ trigger: string | null;
+ updatedAt: Date;
+ userId: string;
+}
+
+export interface AgentRunBoardInterventionRow {
+ canonicalToolKey: string | null;
+ createdAt: Date;
+ deadline: Date;
+ operationId: string;
+ status: string;
+ userId: string;
+}
+
+/**
+ * Team-wide read of agent runs. Unlike {@link AgentOperationModel} it answers
+ * for the workspace rather than one owner, and `agent_operations` has no
+ * visibility of its own, so every read carries the parents' visibility.
+ *
+ * Private agents, groups and tasks are excluded even for their owner: this is
+ * what the workspace can see together, matching the team inbox.
+ */
+export class AgentRunBoardModel {
+ private readonly db: LobeChatDatabase;
+ private readonly workspaceId: string;
+
+ constructor(db: LobeChatDatabase, workspaceId: string) {
+ this.db = db;
+ this.workspaceId = workspaceId;
+ }
+
+ listRuns = async ({ now, since }: { now: Date; since: Date }): Promise<AgentRunBoardRow[]> => {
+ const [windowRows, waitingRows] = await Promise.all([
+ this.selectRuns(
+ and(
+ gte(agentOperations.createdAt, new Date(since.getTime() - MAX_RUN_SPAN_MS)),
+ ne(agentOperations.status, 'idle'),
+ or(isNull(agentOperations.completedAt), gte(agentOperations.completedAt, since)),
+ ),
+ RUN_LIMIT,
+ ),
+ this.selectRuns(
+ and(
+ gte(agentOperations.createdAt, new Date(now.getTime() - MAX_WAITING_AGE_MS)),
+ eq(agentOperations.status, 'waiting_for_human'),
+ ),
+ WAITING_RUN_LIMIT,
+ ),
+ ]);
+
+ const rows = [...new Map([...windowRows, ...waitingRows].map((r) => [r.id, r])).values()];
+ if (rows.length === 0) return [];
+
+ // Keyed by operation: the workspace column isn't indexed here, and the
+ // operation's own unique index already serves this lookup.
+ const waitingIds = rows.filter((r) => r.status === 'waiting_for_human').map((r) => r.id);
+ if (waitingIds.length === 0) return rows.map((row) => ({ ...row, interventions: [] }));
+
+ const interventions = await this.db
+ .select({
+ canonicalToolKey: agentInterventions.canonicalToolKey,
+ createdAt: agentInterventions.createdAt,
+ deadline: agentInterventions.deadline,
+ operationId: agentInterventions.operationId,
+ status: agentInterventions.status,
+ userId: agentInterventions.userId,
+ })
+ .from(agentInterventions)
+ .where(inArray(agentInterventions.operationId, waitingIds));
+
+ const byOperation = Map.groupBy(interventions, (i) => i.operationId);
+
+ return rows.map((row) => ({ ...row, interventions: byOperation.get(row.id) ?? [] }));
+ };
+
+ private selectRuns = async (condition: ReturnType<typeof and>, limit: number) => {
+ const rows = await this.db
+ .select({
+ agentAvatar: agents.avatar,
+ agentBackgroundColor: agents.backgroundColor,
+ agentId: agents.id,
+ agentOwnerId: agents.userId,
+ agentTitle: agents.title,
+ completedAt: agentOperations.completedAt,
+ createdAt: agentOperations.createdAt,
+ // Only the message and type: `error` also carries the stack.
+ errorMessage: sql<string | null>`${agentOperations.error} ->> 'message'`,
+ errorType: sql<string | null>`${agentOperations.error} ->> 'type'`,
+ heteroType: sql<string | null>`${topics.metadata} -> 'runningOperation' ->> 'heteroType'`,
+ id: agentOperations.id,
+ model: agentOperations.model,
+ runningOperation: sql<AgentRunBoardRunningOperation | null>`${topics.metadata} -> 'runningOperation'`,
+ startedAt: agentOperations.startedAt,
+ status: agentOperations.status,
+ taskName: tasks.name,
+ topicId: agentOperations.topicId,
+ topicTitle: topics.title,
+ trigger: agentOperations.trigger,
+ updatedAt: agentOperations.updatedAt,
+ userId: agentOperations.userId,
+ })
+ .from(agentOperations)
+ .innerJoin(agents, eq(agentOperations.agentId, agents.id))
+ // Inner on purpose: purging a private task or group nulls these references
+ // and drops its visibility snapshot, so a run without its topic can no
+ // longer prove it was ever public.
+ .innerJoin(topics, eq(agentOperations.topicId, topics.id))
+ .leftJoin(chatGroups, eq(agentOperations.chatGroupId, chatGroups.id))
+ .leftJoin(tasks, eq(agentOperations.taskId, tasks.id))
+ .where(
+ and(
+ eq(agentOperations.workspaceId, this.workspaceId),
+ // Sub-agent runs belong to their parent's bar.
+ isNull(agentOperations.parentOperationId),
+ isNotNull(agentOperations.agentId),
+ eq(agents.workspaceId, this.workspaceId),
+ eq(agents.visibility, 'public'),
+ notTrashed(agents.isDeleted),
+ or(
+ isNull(agentOperations.chatGroupId),
+ and(eq(chatGroups.visibility, 'public'), notTrashed(chatGroups.isDeleted)),
+ ),
+ or(isNull(tasks.id), and(eq(tasks.visibility, 'public'), notTrashed(tasks.isDeleted))),
+ // The per-run snapshot: a task made public later must not expose
+ // runs that happened while it was private.
+ sql`NOT EXISTS (SELECT 1 FROM ${taskTopics} WHERE ${taskTopics.topicId} = ${agentOperations.topicId} AND ${taskTopics.visibility} = 'private')`,
+ isNull(topics.senderId),
+ notTrashed(topics.isDeleted),
+ notChannelTopic(),
+ condition,
+ ),
+ )
+ .orderBy(desc(agentOperations.createdAt))
+ .limit(limit);
+
+ return rows;
+ };
+}
diff --git a/packages/database/src/schemas/agentOperations.ts b/packages/database/src/schemas/agentOperations.ts
index 7d1fdcd1a49..3828cf98301 100644
--- a/packages/database/src/schemas/agentOperations.ts
+++ b/packages/database/src/schemas/agentOperations.ts
@@ -146,6 +146,7 @@ export const agentOperations = pgTable(
index('agent_operations_parent_operation_id_idx').on(t.parentOperationId),
index('agent_operations_status_idx').on(t.status),
index('agent_operations_user_id_created_at_idx').on(t.userId, t.createdAt),
+ index('agent_operations_workspace_id_created_at_idx').on(t.workspaceId, t.createdAt),
index('agent_operations_metadata_idx').using('gin', t.metadata),
],
);
diff --git a/packages/locales/src/default/home.ts b/packages/locales/src/default/home.ts
index 0be9eb20b09..fdbce66687b 100644
--- a/packages/locales/src/default/home.ts
+++ b/packages/locales/src/default/home.ts
@@ -171,7 +171,6 @@ export default {
'inbox.running.title': '{{count}} task running',
'inbox.running.title_plural': '{{count}} tasks running',
'inbox.scope.mine': 'Mine',
- 'inbox.scope.onlyMe': 'Only mine',
'inbox.scope.team': 'Team',
'inbox.unread.followUp': 'Follow up',
'inbox.unread.followUpPlaceholder': 'Reply to continue this run…',
@@ -197,4 +196,31 @@ export default {
'starter.modelSwitched': 'Switched to {{name}}',
'starter.newLabel': 'New',
'starter.write': 'Write',
+ 'team.agent.untitled': 'Untitled agent',
+ 'team.attention.blocked': 'Waiting on teammates',
+ 'team.attention.empty': 'Nothing is waiting on anyone right now.',
+ 'team.attention.failed': 'Failed',
+ 'team.attention.failedAgo': 'Failed {{time}} ago',
+ 'team.attention.needsYou': 'Needs you',
+ 'team.attention.waiting': 'Waiting {{time}}',
+ 'team.axis.now': 'Now',
+ 'team.calendar.more': '+{{count}}',
+ 'team.empty_one': 'No team agent runs in the last hour.',
+ 'team.empty_other': 'No team agent runs in the last {{count}} hours.',
+ 'team.lane.more_one': '+{{count}} more topic',
+ 'team.lane.more_other': '+{{count}} more topics',
+ 'team.lanes.hidden_one': '{{count}} more agent not shown',
+ 'team.lanes.hidden_other': '{{count}} more agents not shown',
+ 'team.run.untitled': 'Untitled run',
+ 'team.status.done': 'Done',
+ 'team.status.failed': 'Failed',
+ 'team.status.needs_human': 'Needs a person',
+ 'team.status.running': 'Running',
+ 'team.status.stopped': 'Stopped',
+ 'team.summary.done': 'Done',
+ 'team.summary.failed': 'Failed',
+ 'team.summary.needsHuman': 'Waiting on people',
+ 'team.summary.running': 'Running',
+ 'team.window_one': '{{count}}h',
+ 'team.window_other': '{{count}}h',
};
diff --git a/packages/types/src/agentRunBoard.ts b/packages/types/src/agentRunBoard.ts
new file mode 100644
index 00000000000..4a49a29c6bf
--- /dev/null
+++ b/packages/types/src/agentRunBoard.ts
@@ -0,0 +1,80 @@
+import type { ChatTopicMetadata } from './topic';
+
+/** Lets the viewer's own live run reattach to its stream when opened. */
+export type AgentRunBoardRunningOperation = NonNullable<ChatTopicMetadata['runningOperation']>;
+
+export const AGENT_RUN_BOARD_WINDOW_HOURS = [1, 6, 24] as const;
+
+export type AgentRunBoardWindowHours = (typeof AGENT_RUN_BOARD_WINDOW_HOURS)[number];
+
+export type AgentRunBoardRunStatus = 'done' | 'failed' | 'needs_human' | 'running' | 'stopped';
+
+export interface AgentRunBoardRun {
+ /** Null while the run is live; the bar then extends to `generatedAt`. */
+ endedAt: Date | null;
+ id: string;
+ model: string | null;
+ runningOperation: AgentRunBoardRunningOperation | null;
+ startedAt: Date;
+ status: AgentRunBoardRunStatus;
+ /** Task or topic title, matching the conversation a click opens. Null until one exists. */
+ title: string | null;
+ topicId: string | null;
+ trigger: string | null;
+ userId: string;
+ /** When a run that needs a person began waiting; it was running until then. */
+ waitingSince: Date | null;
+}
+
+export interface AgentRunBoardLane {
+ agentId: string;
+ avatar: string | null;
+ backgroundColor: string | null;
+ /** The member the agent belongs to. */
+ ownerUserId: string;
+ runs: AgentRunBoardRun[];
+ title: string | null;
+}
+
+export interface AgentRunBoardAttentionItem {
+ agentAvatar: string | null;
+ agentBackgroundColor: string | null;
+ agentId: string;
+ agentTitle: string | null;
+ /** Failure message, or the tool awaiting approval. */
+ detail: string | null;
+ /** Whether the viewer is the member who can act on this item. */
+ isMine: boolean;
+ kind: 'failed' | 'needs_human';
+ operationId: string;
+ /** The member who can approve, or who started the failed run. */
+ ownerUserId: string;
+ runningOperation: AgentRunBoardRunningOperation | null;
+ /** When the wait began or the run failed. */
+ since: Date;
+ title: string | null;
+ topicId: string | null;
+}
+
+export interface AgentRunBoardSummary {
+ done: number;
+ failed: number;
+ needsHuman: number;
+ running: number;
+}
+
+/** Runs that started in one slice of the window, counted by their current status. */
+export interface AgentRunBoardActivityBucket extends AgentRunBoardSummary {
+ startedAt: Date;
+}
+
+export interface AgentRunBoardData {
+ activity: AgentRunBoardActivityBucket[];
+ attention: AgentRunBoardAttentionItem[];
+ generatedAt: Date;
+ /** Active agents left out of `lanes` by the lane cap. */
+ hiddenLaneCount: number;
+ lanes: AgentRunBoardLane[];
+ summary: AgentRunBoardSummary;
+ windowStart: Date;
+}
diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts
index f31a3347967..91d0bc2b49c 100644
--- a/packages/types/src/index.ts
+++ b/packages/types/src/index.ts
@@ -7,6 +7,7 @@ export * from './agentHookResponse';
export * from './agentMail';
export * from './agentOperation';
export * from './agentQuota';
+export * from './agentRunBoard';
export * from './aiChat';
export * from './aiProvider';
export * from './apiKey';
diff --git a/src/features/AgentTasks/AgentTaskDetail/TopicChatDrawer/index.tsx b/src/features/AgentTasks/AgentTaskDetail/TopicChatDrawer/index.tsx
index 6484a234b76..3fb898fe6cf 100644
--- a/src/features/AgentTasks/AgentTaskDetail/TopicChatDrawer/index.tsx
+++ b/src/features/AgentTasks/AgentTaskDetail/TopicChatDrawer/index.tsx
@@ -176,6 +176,7 @@ const TopicChatDrawer = memo<TopicChatDrawerProps>(({ defaultExpanded = false })
const activeTaskId = useTaskStore((s) => s.activeTaskId);
const agentId = useTaskStore(taskDetailSelectors.topicDrawerAgentId);
const drawerTitle = useTaskStore(taskDetailSelectors.topicDrawerTitle);
+ const fallbackRunningOperation = useTaskStore((s) => s.activeTopicDrawerRunningOperation);
const inputFocusRequest = useTaskStore(taskDetailSelectors.topicDrawerFocusRequest);
const activity = useTaskStore(taskActivitySelectors.activeDrawerTopicActivity);
const closeTopicDrawer = useTaskStore((s) => s.closeTopicDrawer);
@@ -433,7 +434,7 @@ const TopicChatDrawer = memo<TopicChatDrawerProps>(({ defaultExpanded = false })
<TopicChatDrawerBody
agentId={agentId!}
inputFocusRequest={inputFocusRequest}
- runningOperation={activity?.runningOperation}
+ runningOperation={activity?.runningOperation ?? fallbackRunningOperation}
topicId={topicId!}
/>
))}
diff --git a/src/features/Home/HomeModeContent.tsx b/src/features/Home/HomeModeContent.tsx
index 6775be688b0..8fa936d5190 100644
--- a/src/features/Home/HomeModeContent.tsx
+++ b/src/features/Home/HomeModeContent.tsx
@@ -2,21 +2,11 @@ import { TASK_STATUSES } from '@lobechat/builtin-tool-task';
import type { RecentItem, TaskStatus } from '@lobechat/types';
import { agentDisplayName } from '@lobechat/types';
import type { FlexboxProps } from '@lobehub/ui';
-import {
- createStaticStyles,
- cssVar,
- cx,
- Flexbox,
- Icon,
- Segmented,
- Skeleton,
- Text,
-} from '@lobehub/ui';
+import { createStaticStyles, cssVar, cx, Flexbox, Icon, Skeleton, Text } from '@lobehub/ui';
import { HashIcon } from 'lucide-react';
-import { memo, type ReactNode, useMemo, useState } from 'react';
+import { memo, type ReactNode, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
-import { useWorkspaceMemberProfiles } from '@/business/client/hooks/useWorkspaceMemberProfiles';
import AgentAvatar from '@/components/AgentAvatar';
import AsyncError from '@/components/AsyncError';
import AssigneeAvatar from '@/features/AgentTasks/features/AssigneeAvatar';
@@ -28,8 +18,7 @@ import { useAgentDisplayMeta } from '@/features/AgentTasks/shared/useAgentDispla
// HomeInbox, and this surface must not pull it into its own chunk.
import { EntityLinkHostProvider } from '@/features/EntityLink/host';
import HomeInbox from '@/features/HomeInbox';
-import AuthorChip from '@/features/HomeInbox/AuthorChip';
-import { filterTopicsForInboxScope } from '@/features/HomeInbox/scopeTogglePlacement';
+import { filterMyInboxTopics } from '@/features/HomeInbox/scopeTogglePlacement';
import { splitBriefs } from '@/features/HomeInbox/splitBriefs';
import { useHomeInboxTopics } from '@/features/HomeInbox/useHomeInboxTopics';
import Recommendations from '@/features/Recommendations';
@@ -208,47 +197,44 @@ const Row = memo<RowProps>(({ description, href, icon, title, titleExtra, traili
</WorkspaceLink>
));
-const RecentTopicRow = memo<{ showAuthor?: boolean; topic: RecentItem }>(
- ({ showAuthor, topic }) => {
- const agent = useAgentDisplayMeta(topic.agentId);
- const raw = topic.description?.trim() || topic.lastAssistantMessage?.trim();
- // The snippet is raw markdown (a user note or the last assistant reply);
- // rendered as one plain line, its syntax markers are just noise.
- const description = useMemo(
- () => (raw ? markdownToTxt(raw).replaceAll(/\s+/g, ' ').trim() : undefined),
- [raw],
- );
+const RecentTopicRow = memo<{ topic: RecentItem }>(({ topic }) => {
+ const agent = useAgentDisplayMeta(topic.agentId);
+ const raw = topic.description?.trim() || topic.lastAssistantMessage?.trim();
+ // The snippet is raw markdown (a user note or the last assistant reply);
+ // rendered as one plain line, its syntax markers are just noise.
+ const description = useMemo(
+ () => (raw ? markdownToTxt(raw).replaceAll(/\s+/g, ' ').trim() : undefined),
+ [raw],
+ );
- return (
- <Row
- description={description}
- href={topic.routePath}
- title={topic.title}
- icon={
- agent ? (
- <AgentAvatar
- agentId={topic.agentId}
- avatar={agent.avatar}
- background={agent.backgroundColor}
- className={styles.topicAvatar}
- shape={'circle'}
- size={22}
- title={agentDisplayName(agent)}
- />
- ) : (
- <Icon color={cssVar.colorTextDescription} icon={HashIcon} size={16} />
- )
- }
- trailing={
- <Flexbox horizontal align={'center'} flex={'none'} gap={8}>
- {showAuthor && <AuthorChip userId={topic.userId} />}
- <Time date={topic.updatedAt} minWidth={TIME_COLUMN_WIDTH} />
- </Flexbox>
- }
- />
- );
- },
-);
+ return (
+ <Row
+ description={description}
+ href={topic.routePath}
+ title={topic.title}
+ icon={
+ agent ? (
+ <AgentAvatar
+ agentId={topic.agentId}
+ avatar={agent.avatar}
+ background={agent.backgroundColor}
+ className={styles.topicAvatar}
+ shape={'circle'}
+ size={22}
+ title={agentDisplayName(agent)}
+ />
+ ) : (
+ <Icon color={cssVar.colorTextDescription} icon={HashIcon} size={16} />
+ )
+ }
+ trailing={
+ <Flexbox horizontal align={'center'} flex={'none'} gap={8}>
+ <Time date={topic.updatedAt} minWidth={TIME_COLUMN_WIDTH} />
+ </Flexbox>
+ }
+ />
+ );
+});
interface SkeletonLineProps {
/** Height of the painted band inside the line box. */
@@ -484,32 +470,24 @@ const HomeModeContent = memo<HomeModeContentProps>(({ inlineRail, mode, onSugges
const scheduledTasksHidden = isHomeWidgetHidden('scheduledTasks', hiddenWidgets);
const cacheScope = useCacheScope();
- // One page-level mine/team scope, shared by the inbox sections and Recent
- // topics. In personal mode the member map is empty, `isTeam` stays false and
- // the whole layer is inert.
- const memberProfiles = useWorkspaceMemberProfiles();
- const isTeam = memberProfiles.size > 1;
- const [scope, setScope] = useState<'mine' | 'team'>('mine');
- const teamView = isTeam && scope === 'team';
-
// Workspace topics are shared, so "mine" must be narrowed server-side —
// client-filtering the top N of a team-wide feed could starve out the
// viewer's own topics entirely.
const recentsSWR = useClientDataSWR(
isLogin && !recentsHidden
- ? recentKeys.topicList(HOME_TOPIC_RECENT_LIMIT, cacheScope, teamView ? 'team' : 'mine')
+ ? recentKeys.topicList(HOME_TOPIC_RECENT_LIMIT, cacheScope, 'mine')
: null,
- () => recentService.getAll(HOME_TOPIC_RECENT_LIMIT, ['topic'], true, !teamView, teamView),
+ () => recentService.getAll(HOME_TOPIC_RECENT_LIMIT, ['topic'], true, true, false),
{ revalidateOnFocus: false },
);
const inboxTopics = useHomeInboxTopics(isLogin);
const mineUnreadCount = useMemo(
- () => filterTopicsForInboxScope(inboxTopics.unread, myId, false).length,
+ () => filterMyInboxTopics(inboxTopics.unread, myId).length,
[inboxTopics.unread, myId],
);
const mineRunningCount = useMemo(
- () => filterTopicsForInboxScope(inboxTopics.running, myId, false).length,
+ () => filterMyInboxTopics(inboxTopics.running, myId).length,
[inboxTopics.running, myId],
);
const useFetchBriefs = useBriefStore((s) => s.useFetchBriefs);
@@ -562,31 +540,12 @@ const HomeModeContent = memo<HomeModeContentProps>(({ inlineRail, mode, onSugges
return (
<Flexbox gap={32}>
<EntityLinkHostProvider portal={HOME_ENTITY_PORTAL_SCOPE}>
- <HomeInbox
- inlineRail={inlineRail}
- scope={scope}
- variant={'main'}
- onScopeChange={setScope}
- />
+ <HomeInbox inlineRail={inlineRail} variant={'main'} />
</EntityLinkHostProvider>
{!recentsHidden && (state !== 'ready' || topicRecents.length > 0) && (
<GroupBlock
- actionAlwaysVisible
count={resolveRecentsBadgeCount(topicRecents.length, recentsCount)}
title={t('dashboard.chat.recents')}
- action={
- isTeam ? (
- <Segmented
- size={'small'}
- value={scope}
- options={[
- { label: t('inbox.scope.mine'), value: 'mine' },
- { label: t('inbox.scope.team'), value: 'team' },
- ]}
- onChange={(value) => setScope(value as 'mine' | 'team')}
- />
- ) : undefined
- }
>
{state === 'error' ? (
<AsyncError error={recentsSWR.error} variant={'inline'} onRetry={recentsSWR.mutate} />
@@ -595,7 +554,7 @@ const HomeModeContent = memo<HomeModeContentProps>(({ inlineRail, mode, onSugges
) : (
<Flexbox gap={4}>
{topicRecents.slice(0, recentsCount).map((item) => (
- <RecentTopicRow key={item.id} showAuthor={teamView} topic={item} />
+ <RecentTopicRow key={item.id} topic={item} />
))}
</Flexbox>
)}
diff --git a/src/features/Home/HomeNavHeader.tsx b/src/features/Home/HomeNavHeader.tsx
index ffacba5e387..8ce41fd72e1 100644
--- a/src/features/Home/HomeNavHeader.tsx
+++ b/src/features/Home/HomeNavHeader.tsx
@@ -1,5 +1,5 @@
import { createStaticStyles, Flexbox } from '@lobehub/ui';
-import { memo } from 'react';
+import { memo, type ReactNode } from 'react';
import { useHomeUsageWidgetActive } from '@/business/client/features/HomeUsageWidget';
import NavHeader from '@/features/NavHeader';
@@ -23,7 +23,13 @@ const styles = createStaticStyles(({ css }) => ({
`,
}));
-const HomeNavHeader = memo(() => {
+interface HomeNavHeaderProps {
+ /** The customize and rail controls only apply to the personal dashboard. */
+ showControls?: boolean;
+ tabs?: ReactNode;
+}
+
+const HomeNavHeader = memo<HomeNavHeaderProps>(({ showControls = true, tabs }) => {
const isLogin = useUserStore(authSelectors.isLogin);
const [showHomeRail, toggleHomeRail, isStatusInit] = useGlobalStore((s) => [
systemStatusSelectors.showHomeRail(s),
@@ -36,8 +42,9 @@ const HomeNavHeader = memo(() => {
return (
<NavHeader
className={styles.header}
+ left={tabs}
right={
- isLogin && isStatusInit ? (
+ showControls && isLogin && isStatusInit ? (
<Flexbox horizontal align={'center'} gap={4}>
<CustomizeButton />
{canHostRail(hiddenWidgets, usageActive) && (
diff --git a/src/features/Home/HomeViewTabs.tsx b/src/features/Home/HomeViewTabs.tsx
new file mode 100644
index 00000000000..1eca1a65210
--- /dev/null
+++ b/src/features/Home/HomeViewTabs.tsx
@@ -0,0 +1,66 @@
+import { Flexbox } from '@lobehub/ui';
+import { cssVar } from '@lobehub/ui/stylex/cssVar.stylex';
+import * as stylex from '@stylexjs/stylex';
+import { useTranslation } from 'react-i18next';
+
+import type { HomeView } from './useHomeView';
+
+const VIEWS: HomeView[] = ['mine', 'team'];
+
+const styles = stylex.create({
+ tab: {
+ backgroundColor: 'transparent',
+ borderStyle: 'none',
+ borderWidth: 0,
+ color: { 'default': cssVar.colorTextTertiary, ':hover': cssVar.colorTextSecondary },
+ cursor: 'pointer',
+ fontSize: 14,
+ fontWeight: 400,
+ paddingBlock: 4,
+ paddingInline: 8,
+ position: 'relative',
+ },
+ active: {
+ color: { 'default': cssVar.colorText, ':hover': cssVar.colorText },
+ fontWeight: 600,
+ },
+ dot: {
+ backgroundColor: cssVar.colorText,
+ borderRadius: 2,
+ bottom: -2,
+ height: 4,
+ insetInlineStart: 'calc(50% - 2px)',
+ position: 'absolute',
+ width: 4,
+ },
+});
+
+interface HomeViewTabsProps {
+ onChange: (view: HomeView) => void;
+ value: HomeView;
+}
+
+const HomeViewTabs = ({ onChange, value }: HomeViewTabsProps) => {
+ const { t } = useTranslation('home');
+
+ return (
+ <Flexbox horizontal gap={4} role={'tablist'}>
+ {VIEWS.map((view) => (
+ <button
+ aria-selected={value === view}
+ data-testid={`home-view-${view}`}
+ key={view}
+ role={'tab'}
+ type={'button'}
+ {...stylex.props(styles.tab, value === view && styles.active)}
+ onClick={() => onChange(view)}
+ >
+ {t(`inbox.scope.${view}`)}
+ {value === view && <span {...stylex.props(styles.dot)} />}
+ </button>
+ ))}
+ </Flexbox>
+ );
+};
+
+export default HomeViewTabs;
diff --git a/src/features/Home/index.tsx b/src/features/Home/index.tsx
index 1211fba1b34..d0930034ee5 100644
--- a/src/features/Home/index.tsx
+++ b/src/features/Home/index.tsx
@@ -391,6 +391,24 @@ const Home = memo(() => {
[handleInputValueChange],
);
+ // FloatingPanel portals to the app element, so where this sits in the tree
+ // doesn't affect its viewport-anchored position. Mounted in both layouts: the
+ // team board opens runs here even when the personal page is minimal.
+ const drawers = (
+ <>
+ {drawerMounted && (
+ <Suspense fallback={null}>
+ <TopicChatDrawer />
+ </Suspense>
+ )}
+ {acceptanceDrawerMounted && (
+ <Suspense fallback={null}>
+ <AcceptancePortalDrawer />
+ </Suspense>
+ )}
+ </>
+ );
+
if (minimal)
return (
<Flexbox className={styles.minimal} gap={MINIMAL_STACK_GAP}>
@@ -403,6 +421,7 @@ const Home = memo(() => {
onModeChange={setMode}
/>
</div>
+ {drawers}
</Flexbox>
);
@@ -467,18 +486,7 @@ const Home = memo(() => {
</aside>
)}
- {/* FloatingPanel portals to the app element, so where this sits in the
- tree doesn't affect its viewport-anchored position. */}
- {drawerMounted && (
- <Suspense fallback={null}>
- <TopicChatDrawer />
- </Suspense>
- )}
- {acceptanceDrawerMounted && (
- <Suspense fallback={null}>
- <AcceptancePortalDrawer />
- </Suspense>
- )}
+ {drawers}
</Flexbox>
);
});
diff --git a/src/features/Home/useHomeView.test.ts b/src/features/Home/useHomeView.test.ts
new file mode 100644
index 00000000000..55478d8256b
--- /dev/null
+++ b/src/features/Home/useHomeView.test.ts
@@ -0,0 +1,18 @@
+import { describe, expect, it } from 'vitest';
+
+import { resolveHomeView } from './useHomeView';
+
+describe('resolveHomeView', () => {
+ it('opens the team view from the URL in a workspace', () => {
+ expect(resolveHomeView(new URLSearchParams('view=team'), true)).toBe('team');
+ });
+
+ it('stays on mine in personal mode, even with the param', () => {
+ expect(resolveHomeView(new URLSearchParams('view=team'), false)).toBe('mine');
+ });
+
+ it('reads a missing or unknown param as mine', () => {
+ expect(resolveHomeView(new URLSearchParams(''), true)).toBe('mine');
+ expect(resolveHomeView(new URLSearchParams('view=other'), true)).toBe('mine');
+ });
+});
diff --git a/src/features/Home/useHomeView.ts b/src/features/Home/useHomeView.ts
new file mode 100644
index 00000000000..445aa1affd1
--- /dev/null
+++ b/src/features/Home/useHomeView.ts
@@ -0,0 +1,40 @@
+import { useCallback } from 'react';
+import { useSearchParams } from 'react-router';
+
+import { useWorkspaceMemberProfiles } from '@/business/client/hooks/useWorkspaceMemberProfiles';
+
+export type HomeView = 'mine' | 'team';
+
+const HOME_VIEW_PARAM = 'view';
+
+/** Every workspace has a team view, even with one member; personal mode does not. */
+export const resolveHomeView = (search: URLSearchParams, isWorkspace: boolean): HomeView =>
+ isWorkspace && search.get(HOME_VIEW_PARAM) === 'team' ? 'team' : 'mine';
+
+/**
+ * The active Home tab lives in the URL so a refresh keeps it and a teammate can
+ * be sent the board. Home stays mounted behind other routes; their URLs carry
+ * no param, so the board unmounts and stops polling while Home is hidden.
+ */
+export const useHomeView = () => {
+ // Personal mode (and OSS) has no member map at all.
+ const isWorkspace = useWorkspaceMemberProfiles().size > 0;
+ const [searchParams, setSearchParams] = useSearchParams();
+ const view = resolveHomeView(searchParams, isWorkspace);
+
+ const setView = useCallback(
+ (next: HomeView) => {
+ setSearchParams(
+ (previous) => {
+ if (next === 'team') previous.set(HOME_VIEW_PARAM, 'team');
+ else previous.delete(HOME_VIEW_PARAM);
+ return previous;
+ },
+ { replace: true },
+ );
+ },
+ [setSearchParams],
+ );
+
+ return { isWorkspace, setView, view };
+};
diff --git a/src/features/HomeInbox/AuthorChip.tsx b/src/features/HomeInbox/AuthorChip.tsx
index 63b506dd06f..c66551f22b0 100644
--- a/src/features/HomeInbox/AuthorChip.tsx
+++ b/src/features/HomeInbox/AuthorChip.tsx
@@ -20,6 +20,8 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
}));
interface AuthorChipProps {
+ /** Just the face (or the schedule glyph), where the row already has its own text. */
+ avatarOnly?: boolean;
/** `topic.trigger` — a `cron` run has no human triggerer, only an owning schedule. */
trigger?: string | null;
/** `topic.userId` — the member who started (or owns) this run. */
@@ -34,7 +36,7 @@ interface AuthorChipProps {
* A `cron`-triggered run has no person behind it, so it reads as a schedule
* rather than borrowing its owner's face (which would imply they just ran it).
*/
-const AuthorChip = memo<AuthorChipProps>(({ userId, trigger }) => {
+const AuthorChip = memo<AuthorChipProps>(({ avatarOnly, userId, trigger }) => {
const { t } = useTranslation('home');
const profiles = useWorkspaceMemberProfiles();
@@ -42,7 +44,7 @@ const AuthorChip = memo<AuthorChipProps>(({ userId, trigger }) => {
return (
<Flexbox horizontal align={'center'} className={styles.chip} gap={4}>
<Icon color={cssVar.colorTextQuaternary} icon={AlarmClockIcon} size={12} />
- <span className={styles.label}>{t('inbox.author.scheduled')}</span>
+ {!avatarOnly && <span className={styles.label}>{t('inbox.author.scheduled')}</span>}
</Flexbox>
);
@@ -60,9 +62,11 @@ const AuthorChip = memo<AuthorChipProps>(({ userId, trigger }) => {
size={AVATAR_SIZE}
/>
</Tooltip>
- <Text ellipsis className={styles.label} style={{ maxWidth: 72 }}>
- {name}
- </Text>
+ {!avatarOnly && (
+ <Text ellipsis className={styles.label} style={{ maxWidth: 72 }}>
+ {name}
+ </Text>
+ )}
</Flexbox>
);
});
diff --git a/src/features/HomeInbox/NeedsYouRailCard.tsx b/src/features/HomeInbox/NeedsYouRailCard.tsx
index 8d608f569d7..0dc0a3cf884 100644
--- a/src/features/HomeInbox/NeedsYouRailCard.tsx
+++ b/src/features/HomeInbox/NeedsYouRailCard.tsx
@@ -1,6 +1,6 @@
import { ActionIcon, createStaticStyles, Flexbox } from '@lobehub/ui';
import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
-import { memo, type ReactNode, useState } from 'react';
+import { memo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { type BriefItem } from '@/features/DailyBrief/types';
@@ -22,49 +22,42 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
* a pager, so a pile of five decisions still costs the same vertical space as
* one and the rail below it stays reachable.
*/
-const NeedsYouRailCard = memo<{ briefs: BriefItem[]; scopeControl?: ReactNode }>(
- ({ briefs, scopeControl }) => {
- const { t } = useTranslation('home');
- const [index, setIndex] = useState(0);
+const NeedsYouRailCard = memo<{ briefs: BriefItem[] }>(({ briefs }) => {
+ const { t } = useTranslation('home');
+ const [index, setIndex] = useState(0);
- // Resolving a brief drops it from the list, so the held index can outrun it.
- const current = Math.min(index, briefs.length - 1);
- const brief = briefs[current];
+ // Resolving a brief drops it from the list, so the held index can outrun it.
+ const current = Math.min(index, briefs.length - 1);
+ const brief = briefs[current];
- return (
- <RailCard
- title={t('inbox.needsYou.title')}
- action={
- scopeControl || briefs.length > 1 ? (
- <Flexbox horizontal align={'center'} gap={4}>
- {scopeControl}
- {briefs.length > 1 && (
- <>
- <ActionIcon
- disabled={current === 0}
- icon={ChevronLeftIcon}
- size={'small'}
- onClick={() => setIndex(current - 1)}
- />
- <span className={styles.pager}>
- {current + 1}/{briefs.length}
- </span>
- <ActionIcon
- disabled={current === briefs.length - 1}
- icon={ChevronRightIcon}
- size={'small'}
- onClick={() => setIndex(current + 1)}
- />
- </>
- )}
- </Flexbox>
- ) : null
- }
- >
- <InboxBriefCard bare brief={brief} key={brief.id} />
- </RailCard>
- );
- },
-);
+ return (
+ <RailCard
+ title={t('inbox.needsYou.title')}
+ action={
+ briefs.length > 1 ? (
+ <Flexbox horizontal align={'center'} gap={4}>
+ <ActionIcon
+ disabled={current === 0}
+ icon={ChevronLeftIcon}
+ size={'small'}
+ onClick={() => setIndex(current - 1)}
+ />
+ <span className={styles.pager}>
+ {current + 1}/{briefs.length}
+ </span>
+ <ActionIcon
+ disabled={current === briefs.length - 1}
+ icon={ChevronRightIcon}
+ size={'small'}
+ onClick={() => setIndex(current + 1)}
+ />
+ </Flexbox>
+ ) : null
+ }
+ >
+ <InboxBriefCard bare brief={brief} key={brief.id} />
+ </RailCard>
+ );
+});
export default NeedsYouRailCard;
diff --git a/src/features/HomeInbox/RunningTasksCard.tsx b/src/features/HomeInbox/RunningTasksCard.tsx
index 3f0e4ccf0d2..2a28cacb681 100644
--- a/src/features/HomeInbox/RunningTasksCard.tsx
+++ b/src/features/HomeInbox/RunningTasksCard.tsx
@@ -9,7 +9,6 @@ import { useAgentDisplayMeta } from '@/features/AgentTasks/shared/useAgentDispla
import { homeType } from '@/features/Home/components/homeType';
import RunningGlyph from '@/features/Home/components/RunningGlyph';
-import AuthorChip from './AuthorChip';
import TopicRow from './TopicRow';
import { type InboxTopic } from './useHomeInboxTopics';
@@ -127,8 +126,6 @@ interface RunningTasksCardProps {
/** Rendered inside a rail card, which already draws the shell. */
bare?: boolean;
running: InboxTopic[];
- /** Team view: tag each expanded row with whose run it is. */
- showAuthor?: boolean;
}
/**
@@ -136,7 +133,7 @@ interface RunningTasksCardProps {
* single line by default and only opens on demand. Nothing here is actionable;
* it exists so the user knows work is in flight.
*/
-const RunningTasksCard = memo<RunningTasksCardProps>(({ action, bare, running, showAuthor }) => {
+const RunningTasksCard = memo<RunningTasksCardProps>(({ action, bare, running }) => {
const { t } = useTranslation('home');
const [open, setOpen] = useState(false);
@@ -169,16 +166,7 @@ const RunningTasksCard = memo<RunningTasksCardProps>(({ action, bare, running, s
{open && (
<Flexbox className={cx(styles.body, bare && styles.bareBody)}>
{running.map((topic) => (
- <TopicRow
- key={topic.id}
- leading={<RunningGlyph size={14} />}
- topic={topic}
- trailing={
- showAuthor ? (
- <AuthorChip trigger={topic.trigger} userId={topic.userId} />
- ) : undefined
- }
- />
+ <TopicRow key={topic.id} leading={<RunningGlyph size={14} />} topic={topic} />
))}
</Flexbox>
)}
diff --git a/src/features/HomeInbox/UnreadTopicList.tsx b/src/features/HomeInbox/UnreadTopicList.tsx
index 77b451af1d9..8e991def8a7 100644
--- a/src/features/HomeInbox/UnreadTopicList.tsx
+++ b/src/features/HomeInbox/UnreadTopicList.tsx
@@ -24,7 +24,6 @@ import Time from '@/features/Home/components/Time';
import { useWorkspaceAwareNavigate } from '@/features/Workspace/useWorkspaceAwareNavigate';
import { useChatStore } from '@/store/chat';
-import AuthorChip from './AuthorChip';
import { sanitizeInboxPreview } from './sanitizeInboxPreview';
import { type InboxTopic } from './useHomeInboxTopics';
@@ -99,8 +98,6 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
interface UnreadTopicItemProps {
bare?: boolean;
onFollowUpSent?: (topicId: string) => void;
- /** Team view: show who triggered the run, right of the title. */
- showAuthor?: boolean;
topic: InboxTopic;
}
@@ -111,162 +108,157 @@ interface UnreadTopicItemProps {
* already said "I want to read this". The full thread lives one click deeper, in
* the topic itself.
*/
-const UnreadTopicItem = memo<UnreadTopicItemProps>(
- ({ bare, topic, onFollowUpSent, showAuthor }) => {
- const { t } = useTranslation('home');
- const agent = useAgentDisplayMeta(topic.agentId);
- const navigate = useWorkspaceAwareNavigate();
- const updateTopicStatus = useChatStore((s) => s.updateTopicStatus);
- const sendMessage = useChatStore((s) => s.sendMessage);
- const prefetchMessages = useChatStore((s) => s.prefetchMessages);
- const markdownProps = useEntityMarkdown();
- const assistantPreview = sanitizeInboxPreview(topic.lastAssistantMessage ?? '');
+const UnreadTopicItem = memo<UnreadTopicItemProps>(({ bare, topic, onFollowUpSent }) => {
+ const { t } = useTranslation('home');
+ const agent = useAgentDisplayMeta(topic.agentId);
+ const navigate = useWorkspaceAwareNavigate();
+ const updateTopicStatus = useChatStore((s) => s.updateTopicStatus);
+ const sendMessage = useChatStore((s) => s.sendMessage);
+ const prefetchMessages = useChatStore((s) => s.prefetchMessages);
+ const markdownProps = useEntityMarkdown();
+ const assistantPreview = sanitizeInboxPreview(topic.lastAssistantMessage ?? '');
- const [expanded, setExpanded] = useState(false);
- const [read, setRead] = useState(false);
- const [replying, setReplying] = useState(false);
+ const [expanded, setExpanded] = useState(false);
+ const [read, setRead] = useState(false);
+ const [replying, setReplying] = useState(false);
- const agentId = topic.agentId ?? undefined;
+ const agentId = topic.agentId ?? undefined;
- // Engaging with the row IS the read: this is an inbox, not a topic list — a row
- // the user has answered or opened has been triaged. The persisted status drops
- // it from the next inbox fetch; locally the row stays put so it doesn't yank
- // out from under the reader.
- const markRead = useCallback(() => {
- if (read) return;
- setRead(true);
- void updateTopicStatus({ agentId, status: 'active', topicId: topic.id });
- }, [agentId, read, topic.id, updateTopicStatus]);
+ // Engaging with the row IS the read: this is an inbox, not a topic list — a row
+ // the user has answered or opened has been triaged. The persisted status drops
+ // it from the next inbox fetch; locally the row stays put so it doesn't yank
+ // out from under the reader.
+ const markRead = useCallback(() => {
+ if (read) return;
+ setRead(true);
+ void updateTopicStatus({ agentId, status: 'active', topicId: topic.id });
+ }, [agentId, read, topic.id, updateTopicStatus]);
- const toggle = useCallback(() => {
- setExpanded((prev) => {
- if (!prev) markRead();
- return !prev;
- });
- }, [markRead]);
+ const toggle = useCallback(() => {
+ setExpanded((prev) => {
+ if (!prev) markRead();
+ return !prev;
+ });
+ }, [markRead]);
- // Open the run in place — navigate straight into the topic's chat, the same
- // destination the running-topics rows go to, rather than surfacing it in a
- // drawer stacked over the home page.
- const viewChat = useCallback(() => {
+ // Open the run in place — navigate straight into the topic's chat, the same
+ // destination the running-topics rows go to, rather than surfacing it in a
+ // drawer stacked over the home page.
+ const viewChat = useCallback(() => {
+ if (!agentId) return;
+ markRead();
+ navigate(AGENT_CHAT_TOPIC_URL(agentId, topic.id));
+ }, [agentId, markRead, navigate, topic.id]);
+
+ // Reply in place, continuing the topic exactly like the chat drawer does:
+ // hydrate the topic's messages into the store first so the reply threads onto
+ // the last one (without it `sendMessage` reads an empty history and orphans
+ // the message — no parentId), then send over the gateway so the run keeps
+ // going server-side. No navigation.
+ const submitFollowUp = useCallback(
+ async (text: string) => {
if (!agentId) return;
markRead();
- navigate(AGENT_CHAT_TOPIC_URL(agentId, topic.id));
- }, [agentId, markRead, navigate, topic.id]);
-
- // Reply in place, continuing the topic exactly like the chat drawer does:
- // hydrate the topic's messages into the store first so the reply threads onto
- // the last one (without it `sendMessage` reads an empty history and orphans
- // the message — no parentId), then send over the gateway so the run keeps
- // going server-side. No navigation.
- const submitFollowUp = useCallback(
- async (text: string) => {
- if (!agentId) return;
- markRead();
- const context: ConversationContext = {
- agentId,
- isolatedTopic: true,
- scope: 'main',
- topicId: topic.id,
- };
- await prefetchMessages(context);
- await sendMessage({ context, forceRuntime: 'gateway', message: text });
- setReplying(false);
- // Move the row into the running card immediately so the send visibly does
- // something; the hook reconciles with the server a beat later.
- onFollowUpSent?.(topic.id);
- },
- [agentId, markRead, onFollowUpSent, prefetchMessages, sendMessage, topic.id],
- );
+ const context: ConversationContext = {
+ agentId,
+ isolatedTopic: true,
+ scope: 'main',
+ topicId: topic.id,
+ };
+ await prefetchMessages(context);
+ await sendMessage({ context, forceRuntime: 'gateway', message: text });
+ setReplying(false);
+ // Move the row into the running card immediately so the send visibly does
+ // something; the hook reconciles with the server a beat later.
+ onFollowUpSent?.(topic.id);
+ },
+ [agentId, markRead, onFollowUpSent, prefetchMessages, sendMessage, topic.id],
+ );
- return (
- <Flexbox className={bare ? undefined : styles.section}>
- <Flexbox
- horizontal
- align={'center'}
- className={cx(styles.row, bare && styles.bareRow)}
- gap={ROW_GAP}
- onClick={toggle}
+ return (
+ <Flexbox className={bare ? undefined : styles.section}>
+ <Flexbox
+ horizontal
+ align={'center'}
+ className={cx(styles.row, bare && styles.bareRow)}
+ gap={ROW_GAP}
+ onClick={toggle}
+ >
+ {read ? <span className={styles.dotPlaceholder} /> : <UnreadDot />}
+ {agent && (
+ <AgentAvatar
+ agentId={topic.agentId}
+ avatar={agent.avatar}
+ background={agent.backgroundColor}
+ shape={'circle'}
+ size={AVATAR_SIZE}
+ style={{ flex: 'none' }}
+ title={agentDisplayName(agent)}
+ />
+ )}
+ <Text
+ ellipsis
+ className={homeType.itemTitle}
+ style={{ flex: 1, fontWeight: read ? 400 : undefined, minWidth: 0 }}
>
- {read ? <span className={styles.dotPlaceholder} /> : <UnreadDot />}
- {agent && (
- <AgentAvatar
- agentId={topic.agentId}
- avatar={agent.avatar}
- background={agent.backgroundColor}
- shape={'circle'}
- size={AVATAR_SIZE}
- style={{ flex: 'none' }}
- title={agentDisplayName(agent)}
- />
+ {topic.title}
+ </Text>
+ <Time date={topic.updatedAt ?? topic.createdAt} />
+ <Icon
+ color={cssVar.colorTextQuaternary}
+ icon={expanded ? ChevronDownIcon : ChevronRightIcon}
+ size={14}
+ />
+ </Flexbox>
+
+ {expanded && (
+ <Flexbox className={bare ? styles.bareBody : styles.body} gap={8}>
+ {assistantPreview && (
+ <Suspense fallback={null}>
+ <MarkdownMessage {...markdownProps} style={{ overflow: 'unset' }}>
+ {assistantPreview}
+ </MarkdownMessage>
+ </Suspense>
)}
- <Text
- ellipsis
- className={homeType.itemTitle}
- style={{ flex: 1, fontWeight: read ? 400 : undefined, minWidth: 0 }}
- >
- {topic.title}
- </Text>
- {showAuthor && <AuthorChip trigger={topic.trigger} userId={topic.userId} />}
- <Time date={topic.updatedAt ?? topic.createdAt} />
- <Icon
- color={cssVar.colorTextQuaternary}
- icon={expanded ? ChevronDownIcon : ChevronRightIcon}
- size={14}
- />
- </Flexbox>
- {expanded && (
- <Flexbox className={bare ? styles.bareBody : styles.body} gap={8}>
- {assistantPreview && (
- <Suspense fallback={null}>
- <MarkdownMessage {...markdownProps} style={{ overflow: 'unset' }}>
- {assistantPreview}
- </MarkdownMessage>
+ {replying ? (
+ <Flexbox onClick={stopPropagation}>
+ <Suspense fallback={<div aria-hidden className={styles.replyEditorFallback} />}>
+ <RunReplyEditor
+ placeholder={t('inbox.unread.followUpPlaceholder')}
+ onCancel={() => setReplying(false)}
+ onSubmit={submitFollowUp}
+ />
</Suspense>
- )}
-
- {replying ? (
- <Flexbox onClick={stopPropagation}>
- <Suspense fallback={<div aria-hidden className={styles.replyEditorFallback} />}>
- <RunReplyEditor
- placeholder={t('inbox.unread.followUpPlaceholder')}
- onCancel={() => setReplying(false)}
- onSubmit={submitFollowUp}
- />
- </Suspense>
- </Flexbox>
- ) : (
- <Flexbox horizontal align={'center'} justify={'space-between'}>
- <Button size={'small'} type={'text'} onClick={viewChat}>
- {t('inbox.unread.viewChat')}
- </Button>
- <Button
- disabled={!agentId}
- icon={MessageSquarePlus}
- size={'small'}
- type={'fill'}
- onClick={() => setReplying(true)}
- onFocus={preloadRunReplyEditor}
- onPointerEnter={preloadRunReplyEditor}
- >
- {t('inbox.unread.followUp')}
- </Button>
- </Flexbox>
- )}
- </Flexbox>
- )}
- </Flexbox>
- );
- },
-);
+ </Flexbox>
+ ) : (
+ <Flexbox horizontal align={'center'} justify={'space-between'}>
+ <Button size={'small'} type={'text'} onClick={viewChat}>
+ {t('inbox.unread.viewChat')}
+ </Button>
+ <Button
+ disabled={!agentId}
+ icon={MessageSquarePlus}
+ size={'small'}
+ type={'fill'}
+ onClick={() => setReplying(true)}
+ onFocus={preloadRunReplyEditor}
+ onPointerEnter={preloadRunReplyEditor}
+ >
+ {t('inbox.unread.followUp')}
+ </Button>
+ </Flexbox>
+ )}
+ </Flexbox>
+ )}
+ </Flexbox>
+ );
+});
interface UnreadTopicListProps {
/** Rendered inside a rail card, which already draws the shell. */
bare?: boolean;
onFollowUpSent?: (topicId: string) => void;
- /** Team view: tag each row with who triggered it. */
- showAuthor?: boolean;
topics: InboxTopic[];
}
@@ -274,20 +266,12 @@ interface UnreadTopicListProps {
* Runs that finished while you were away. One line each, like the news list —
* a week of finished runs still fits on screen, and the reply is one click deep.
*/
-const UnreadTopicList = memo<UnreadTopicListProps>(
- ({ bare, topics, onFollowUpSent, showAuthor }) => (
- <Flexbox className={bare ? styles.bareList : styles.list}>
- {topics.map((topic) => (
- <UnreadTopicItem
- bare={bare}
- key={topic.id}
- showAuthor={showAuthor}
- topic={topic}
- onFollowUpSent={onFollowUpSent}
- />
- ))}
- </Flexbox>
- ),
-);
+const UnreadTopicList = memo<UnreadTopicListProps>(({ bare, topics, onFollowUpSent }) => (
+ <Flexbox className={bare ? styles.bareList : styles.list}>
+ {topics.map((topic) => (
+ <UnreadTopicItem bare={bare} key={topic.id} topic={topic} onFollowUpSent={onFollowUpSent} />
+ ))}
+ </Flexbox>
+));
export default UnreadTopicList;
diff --git a/src/features/HomeInbox/hiddenWidgets.test.ts b/src/features/HomeInbox/hiddenWidgets.test.ts
index d2d86db3d40..2e8b69beaf4 100644
--- a/src/features/HomeInbox/hiddenWidgets.test.ts
+++ b/src/features/HomeInbox/hiddenWidgets.test.ts
@@ -1,7 +1,6 @@
import { describe, expect, it } from 'vitest';
import { filterHiddenWidgetSections, hasVisibleRailWidget } from './hiddenWidgets';
-import { resolveInboxScopeToggleSection } from './scopeTogglePlacement';
const assembled = [
{ key: 'needsYou' },
@@ -122,73 +121,3 @@ describe('hasVisibleRailWidget', () => {
).toBe(false);
});
});
-
-describe('resolveInboxScopeToggleSection', () => {
- const populated = { needsYouCount: 2, unreadCount: 3 };
-
- it('keeps the scope toggle on needs-you while that widget is visible', () => {
- expect(resolveInboxScopeToggleSection({ ...populated, hiddenWidgets: [] })).toBe('needsYou');
- });
-
- it('moves the scope toggle to unread when needs-you is hidden', () => {
- expect(resolveInboxScopeToggleSection({ ...populated, hiddenWidgets: ['needsYou'] })).toBe(
- 'unread',
- );
- });
-
- it('hides the scope toggle when both titled topic widgets are hidden', () => {
- expect(
- resolveInboxScopeToggleSection({ ...populated, hiddenWidgets: ['needsYou', 'unread'] }),
- ).toBeNull();
- });
-
- it('gives up the scope toggle only once every host widget is hidden', () => {
- expect(
- resolveInboxScopeToggleSection({
- ...populated,
- hiddenWidgets: ['needsYou', 'unread', 'running'],
- }),
- ).toBeNull();
- });
-
- it('suppresses titled sections through the task-mode props as well as the hidden set', () => {
- expect(
- resolveInboxScopeToggleSection({
- ...populated,
- hiddenWidgets: [],
- hideNeedsYou: true,
- hideUnread: true,
- }),
- ).toBeNull();
- });
-
- it('still leads with unread in the main column when needs-you is hidden', () => {
- expect(
- resolveInboxScopeToggleSection({
- ...populated,
- hiddenWidgets: ['needsYou'],
- preferUnread: true,
- }),
- ).toBe('unread');
- });
-
- it('skips a hidden unread widget even when the main column prefers it', () => {
- expect(
- resolveInboxScopeToggleSection({
- ...populated,
- hiddenWidgets: ['unread'],
- preferUnread: true,
- }),
- ).toBe('needsYou');
- });
-
- it('skips sections with nothing in them and lands on the one that has content', () => {
- expect(
- resolveInboxScopeToggleSection({
- hiddenWidgets: [],
- needsYouCount: 0,
- unreadCount: 4,
- }),
- ).toBe('unread');
- });
-});
diff --git a/src/features/HomeInbox/index.tsx b/src/features/HomeInbox/index.tsx
index 22f41242e5a..335ffe45258 100644
--- a/src/features/HomeInbox/index.tsx
+++ b/src/features/HomeInbox/index.tsx
@@ -1,4 +1,4 @@
-import { ActionIcon, createStaticStyles, cx, Flexbox, Segmented } from '@lobehub/ui';
+import { ActionIcon, createStaticStyles, cx, Flexbox } from '@lobehub/ui';
import dayjs from 'dayjs';
import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
import { Fragment, memo, type ReactNode, useEffect, useMemo, useState } from 'react';
@@ -8,7 +8,6 @@ import {
useHomeUsageWidget,
useHomeUsageWidgetActive,
} from '@/business/client/features/HomeUsageWidget';
-import { useWorkspaceMemberProfiles } from '@/business/client/hooks/useWorkspaceMemberProfiles';
import AsyncError from '@/components/AsyncError';
import { BriefCardSkeleton } from '@/features/DailyBrief/BriefCardSkeleton';
import GroupBlock from '@/features/Home/components/GroupBlock';
@@ -38,18 +37,12 @@ import { resolveShownNewsOffset, shouldShowNewsItemTime } from './newsDayOffset'
import NewsList from './NewsList';
import { ownsRailSections } from './railSectionPlacement';
import RunningTasksCard from './RunningTasksCard';
-import { filterTopicsForInboxScope, resolveInboxScopeToggleSection } from './scopeTogglePlacement';
+import { filterMyInboxTopics } from './scopeTogglePlacement';
import { arrangeDayNews, splitBriefs } from './splitBriefs';
import UnreadTopicList from './UnreadTopicList';
import { useHomeInboxTopics } from './useHomeInboxTopics';
-const styles = createStaticStyles(({ css, cssVar }) => ({
- onlyMe: css`
- margin-inline-start: 8px;
- padding-inline: 5px;
- border-radius: 3px;
- background: ${cssVar.colorFillQuaternary};
- `,
+const styles = createStaticStyles(({ css }) => ({
subtitle: css`
margin-inline-start: 8px;
`,
@@ -106,13 +99,8 @@ interface InboxSection {
* needs nothing from you.
* - **News** — `insight` + `result` briefs (reports of finished work); read them
* or don't.
- *
- * **Workspace mode** adds a mine/team split, but only over the sections it can
- * honestly widen. Topics are workspace-shared, so the unread + running feeds
- * already carry every member's runs — the toggle filters them by triggerer, and
- * team view tags each row with whose it is. Briefs are per-user by a deliberate
- * ownership rule (a member never sees another's brief), so Needs-you and News
- * stay mine in both views; team view marks News as such rather than pretending.
+ * In a workspace this page stays the viewer's own: everyone's runs live on the
+ * team tab of Home (`HomeTeamBoard`).
*
* Sections are siblings, never nested: each names itself and carries its own
* count, and one absent section never hides another's heading.
@@ -133,9 +121,6 @@ interface HomeInboxProps {
* the main column without guessing from a loading rail.
*/
onRailEmptyChange?: (empty: boolean) => void;
- /** Controlled mine/team scope — lets the page share one scope across sibling sections. */
- onScopeChange?: (scope: 'mine' | 'team') => void;
- scope?: 'mine' | 'team';
variant?: 'default' | 'main' | 'rail';
}
@@ -146,8 +131,6 @@ const HomeInbox = memo<HomeInboxProps>((props) => {
hideUnread,
inlineRail,
onRailEmptyChange,
- onScopeChange,
- scope: controlledScope,
variant = 'default',
} = props;
const isRail = variant === 'rail';
@@ -222,32 +205,20 @@ const HomeInbox = memo<HomeInboxProps>((props) => {
isLogin === true && usageActive && showRailSections && !hiddenWidgets.includes('usage'),
);
- // A team context is a workspace with more than the viewer in it. In personal
- // mode this map is empty, so `isTeam` is false and the whole mine/team layer
- // stays dark — the inbox is byte-for-byte the personal one.
- const memberProfiles = useWorkspaceMemberProfiles();
- const isTeam = memberProfiles.size > 1;
-
- const [internalScope, setInternalScope] = useState<'mine' | 'team'>('mine');
- const scope = controlledScope ?? internalScope;
- const setScope = onScopeChange ?? setInternalScope;
- const teamView = isTeam && scope === 'team';
-
const { needsYou } = useMemo(() => splitBriefs(briefs), [briefs]);
// Urgent briefs already waiting in "Needs you" leave the digest; the rest
// lead with urgent, then normal, then info.
const news = useMemo(() => arrangeDayNews(dayNews ?? [], briefs), [dayNews, briefs]);
- // Topics are already workspace-wide from the server; "mine" is the viewer's
- // own runs, "team" is everyone's. Personal mode has only the viewer's, so the
- // filter is a no-op there.
+ // Topics are workspace-wide from the server; this page only shows the
+ // viewer's own, and the team tab owns everyone's.
const unreadTopics = useMemo(
- () => filterTopicsForInboxScope(topics.unread, myId, teamView),
- [teamView, topics.unread, myId],
+ () => filterMyInboxTopics(topics.unread, myId),
+ [topics.unread, myId],
);
const runningTopics = useMemo(
- () => filterTopicsForInboxScope(topics.running, myId, teamView),
- [teamView, topics.running, myId],
+ () => filterMyInboxTopics(topics.running, myId),
+ [topics.running, myId],
);
if (!isLogin) return null;
@@ -291,33 +262,6 @@ const HomeInbox = memo<HomeInboxProps>((props) => {
);
}
- // Mine/team lives at page level (governs the topic sections), so it rides on
- // the first titled section's header — the primary "Needs you", or Unread when
- // there's nothing to handle. Only shown in a team workspace.
- const scopeToggle = isTeam ? (
- <Segmented
- size={'small'}
- value={scope}
- options={[
- { label: t('inbox.scope.mine'), value: 'mine' },
- { label: t('inbox.scope.team'), value: 'team' },
- ]}
- onChange={(value) => setScope(value as 'mine' | 'team')}
- />
- ) : undefined;
- const toggleSectionKey = scopeToggle
- ? resolveInboxScopeToggleSection({
- hiddenWidgets,
- hideNeedsYou,
- hideUnread,
- needsYouCount: needsYou.length,
- preferUnread: isMain,
- unreadCount: unreadTopics.length,
- })
- : null;
- const placeToggle = (key: typeof toggleSectionKey): ReactNode =>
- key === toggleSectionKey ? scopeToggle : undefined;
-
const sections: InboxSection[] = [];
// A goal feed failure must not be silent: without this the card just vanishes,
@@ -356,11 +300,10 @@ const HomeInbox = memo<HomeInboxProps>((props) => {
isRail
? {
key: 'needsYou',
- node: <NeedsYouRailCard briefs={needsYou} scopeControl={placeToggle('needsYou')} />,
+ node: <NeedsYouRailCard briefs={needsYou} />,
selfShelled: true,
}
: {
- action: placeToggle('needsYou'),
count: needsYou.length,
key: 'needsYou',
label: t('inbox.needsYou.title'),
@@ -386,7 +329,6 @@ const HomeInbox = memo<HomeInboxProps>((props) => {
if (!hideUnread && unreadTopics.length > 0)
sections.push({
- action: placeToggle('unread'),
count: unreadTopics.length,
key: 'unread',
label: t('inbox.unread.title'),
@@ -394,7 +336,6 @@ const HomeInbox = memo<HomeInboxProps>((props) => {
node: (
<UnreadTopicList
bare={isRail}
- showAuthor={teamView}
topics={unreadTopics}
onFollowUpSent={topics.promoteToRunning}
/>
@@ -418,7 +359,6 @@ const HomeInbox = memo<HomeInboxProps>((props) => {
sections.push({ key: 'needsYou-loading', node: <BriefCardSkeleton /> });
} else if (!hideNeedsYou && needsYou.length > 0) {
sections.push({
- action: placeToggle('needsYou'),
count: needsYou.length,
key: 'needsYou',
label: t('inbox.needsYou.title'),
@@ -440,7 +380,7 @@ const HomeInbox = memo<HomeInboxProps>((props) => {
if (!hideRunning && !isRail && runningTopics.length > 0)
sections.push({
key: 'running',
- node: <RunningTasksCard bare={isRail} running={runningTopics} showAuthor={teamView} />,
+ node: <RunningTasksCard bare={isRail} running={runningTopics} />,
});
// A first-load failure of the day feed must not make the whole section
@@ -508,11 +448,6 @@ const HomeInbox = memo<HomeInboxProps>((props) => {
// Mid-paging (or on an empty day) the arrows are the section's only
// controls — they must not vanish when the pointer leaves the header.
actionAlwaysVisible: shownNewsOffset > 0 || news.length === 0,
- // Team view: News is still only mine (briefs are per-user), so say so
- // rather than let a team-scoped page imply it spans the team.
- badge: teamView && (
- <span className={cx(homeType.meta, styles.onlyMe)}>{t('inbox.scope.onlyMe')}</span>
- ),
count: news.length || undefined,
key: 'news',
label: newsLabel,
@@ -632,7 +567,7 @@ const HomeInbox = memo<HomeInboxProps>((props) => {
return (
<GroupBlock
action={action}
- actionAlwaysVisible={actionAlwaysVisible || key === toggleSectionKey}
+ actionAlwaysVisible={actionAlwaysVisible}
collapsed={collapsed}
count={count}
key={key}
diff --git a/src/features/HomeInbox/scopeTogglePlacement.test.ts b/src/features/HomeInbox/scopeTogglePlacement.test.ts
index 012e07b150a..f028b489a99 100644
--- a/src/features/HomeInbox/scopeTogglePlacement.test.ts
+++ b/src/features/HomeInbox/scopeTogglePlacement.test.ts
@@ -1,53 +1,14 @@
import { describe, expect, it } from 'vitest';
-import { filterTopicsForInboxScope, resolveScopeToggleSection } from './scopeTogglePlacement';
+import { filterMyInboxTopics } from './scopeTogglePlacement';
-describe('resolveScopeToggleSection', () => {
- it('keeps the team scope control on a rail Needs-you card', () => {
- expect(resolveScopeToggleSection({ hasNeedsYou: true, hasUnread: false })).toBe('needsYou');
- });
-
- it('does not place the team scope control on the running card', () => {
- expect(resolveScopeToggleSection({ hasNeedsYou: false, hasUnread: false })).toBeNull();
- });
-
- it('places the scope control on unread when the main feed leads with unread', () => {
- expect(
- resolveScopeToggleSection({
- hasNeedsYou: true,
- hasUnread: true,
- preferUnread: true,
- }),
- ).toBe('unread');
- });
-
- it('keeps the default inbox scope restricted to the current user', () => {
+describe('filterMyInboxTopics', () => {
+ it('keeps only the rows the viewer started', () => {
const topics = [
{ id: 'mine', userId: 'me' },
{ id: 'theirs', userId: 'teammate' },
];
- expect(filterTopicsForInboxScope(topics, 'me', false)).toEqual([topics[0]]);
- expect(filterTopicsForInboxScope(topics, 'me', true)).toEqual(topics);
- });
-
- it('keeps private-agent conversations out of the team scope, including the viewer own', () => {
- const topics = [
- { id: 'shared', parentVisibility: 'public', userId: 'teammate' },
- { id: 'mine-private', parentVisibility: 'private', userId: 'me' },
- { id: 'their-private', parentVisibility: 'private', userId: 'teammate' },
- { id: 'legacy-parentless', parentVisibility: null, userId: 'me' },
- ];
-
- expect(filterTopicsForInboxScope(topics, 'me', true)).toEqual([topics[0], topics[3]]);
- });
-
- it('keeps the viewer own private conversations in the mine scope', () => {
- const topics = [
- { id: 'mine-private', parentVisibility: 'private', userId: 'me' },
- { id: 'their-private', parentVisibility: 'private', userId: 'teammate' },
- ];
-
- expect(filterTopicsForInboxScope(topics, 'me', false)).toEqual([topics[0]]);
+ expect(filterMyInboxTopics(topics, 'me')).toEqual([topics[0]]);
});
});
diff --git a/src/features/HomeInbox/scopeTogglePlacement.ts b/src/features/HomeInbox/scopeTogglePlacement.ts
index cfd4af4ab68..add633f6810 100644
--- a/src/features/HomeInbox/scopeTogglePlacement.ts
+++ b/src/features/HomeInbox/scopeTogglePlacement.ts
@@ -1,60 +1,5 @@
-interface ScopeTogglePlacementInput {
- hasNeedsYou: boolean;
- hasUnread: boolean;
- preferUnread?: boolean;
-}
-
-/** Place the team scope control on the first section whose contents it governs. */
-export const resolveScopeToggleSection = ({
- hasNeedsYou,
- hasUnread,
- preferUnread,
-}: ScopeTogglePlacementInput): 'needsYou' | 'unread' | null => {
- if (preferUnread && hasUnread) return 'unread';
- if (hasNeedsYou) return 'needsYou';
- if (hasUnread) return 'unread';
- return null;
-};
-
-interface InboxScopeTogglePlacementInput {
- hiddenWidgets: string[];
- hideNeedsYou?: boolean;
- hideUnread?: boolean;
- needsYouCount: number;
- preferUnread?: boolean;
- unreadCount: number;
-}
-
-export const resolveInboxScopeToggleSection = ({
- hiddenWidgets,
- hideNeedsYou,
- hideUnread,
- needsYouCount,
- preferUnread,
- unreadCount,
-}: InboxScopeTogglePlacementInput): 'needsYou' | 'unread' | null =>
- resolveScopeToggleSection({
- hasNeedsYou: !hideNeedsYou && needsYouCount > 0 && !hiddenWidgets.includes('needsYou'),
- hasUnread: !hideUnread && unreadCount > 0 && !hiddenWidgets.includes('unread'),
- preferUnread,
- });
-
-/**
- * Narrow the workspace-wide inbox feed to one scope.
- *
- * - `team`: what the workspace is working on. A topic owned by a PRIVATE
- * agent/group is a personal conversation and never belongs here — not even
- * the viewer's own, which is how a private agent's topic used to show up
- * under the team tab.
- * - `mine`: the viewer's own rows, private conversations included.
- */
-export const filterTopicsForInboxScope = <
- T extends { parentVisibility?: string | null; userId?: string },
->(
+/** Narrow the workspace-wide inbox feed to the viewer's own rows, private conversations included. */
+export const filterMyInboxTopics = <T extends { userId?: string }>(
topics: readonly T[],
myId: string | undefined,
- teamView: boolean,
-): T[] =>
- teamView
- ? topics.filter((topic) => topic.parentVisibility !== 'private')
- : topics.filter((topic) => topic.userId === myId);
+): T[] => topics.filter((topic) => topic.userId === myId);
diff --git a/src/features/HomeTeamBoard/ActivityPanel.tsx b/src/features/HomeTeamBoard/ActivityPanel.tsx
new file mode 100644
index 00000000000..9e98839a699
--- /dev/null
+++ b/src/features/HomeTeamBoard/ActivityPanel.tsx
@@ -0,0 +1,96 @@
+import type {
+ AgentRunBoardActivityBucket,
+ AgentRunBoardRunStatus,
+ AgentRunBoardSummary,
+} from '@lobechat/types';
+import { BarChart } from '@lobehub/charts';
+import { Flexbox, Icon } from '@lobehub/ui';
+import { cssVar } from '@lobehub/ui/stylex/cssVar.stylex';
+import * as stylex from '@stylexjs/stylex';
+import dayjs from 'dayjs';
+import type { ReactNode } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { extendActivityWithFuture } from './layout';
+import { RUN_STATUS_VISUALS } from './statusVisuals';
+
+const styles = stylex.create({
+ card: {
+ backgroundColor: cssVar.colorBgContainer,
+ borderColor: cssVar.colorBorderSecondary,
+ borderRadius: 12,
+ borderStyle: 'solid',
+ borderWidth: 1,
+ paddingBlock: 20,
+ paddingInline: 20,
+ },
+ label: { color: cssVar.colorTextSecondary, fontSize: 13 },
+ value: {
+ color: cssVar.colorText,
+ fontSize: 24,
+ fontVariantNumeric: 'tabular-nums',
+ fontWeight: 600,
+ lineHeight: 1.2,
+ },
+});
+
+const STATS: { key: keyof AgentRunBoardSummary; status: AgentRunBoardRunStatus }[] = [
+ { key: 'running', status: 'running' },
+ { key: 'needsHuman', status: 'needs_human' },
+ { key: 'failed', status: 'failed' },
+ { key: 'done', status: 'done' },
+];
+
+interface ActivityPanelProps {
+ action: ReactNode;
+ activity: AgentRunBoardActivityBucket[];
+ summary: AgentRunBoardSummary;
+}
+
+/** The numbers double as the chart's legend: each one carries its series' icon and color. */
+const ActivityPanel = ({ action, activity, summary }: ActivityPanelProps) => {
+ const { t } = useTranslation('home');
+ const series = STATS.map((stat) => ({
+ ...stat,
+ color: RUN_STATUS_VISUALS[stat.status].color,
+ label: t(`team.summary.${stat.key}`),
+ }));
+
+ const data = extendActivityWithFuture(activity).map((bucket) => ({
+ ...Object.fromEntries(series.map(({ key, label }) => [label, bucket[key]])),
+ time: dayjs(bucket.startedAt).format('HH:mm'),
+ }));
+
+ return (
+ <Flexbox gap={16} {...stylex.props(styles.card)} data-testid={'team-board-activity'}>
+ <Flexbox horizontal align={'flex-start'} gap={16} justify={'space-between'} wrap={'wrap'}>
+ <Flexbox horizontal gap={40} wrap={'wrap'}>
+ {series.map(({ color, key, label, status }) => (
+ <Flexbox gap={4} key={key}>
+ <Flexbox horizontal align={'center'} gap={6}>
+ <Icon color={color} icon={RUN_STATUS_VISUALS[status].icon} size={14} />
+ <span {...stylex.props(styles.label)}>{label}</span>
+ </Flexbox>
+ <span {...stylex.props(styles.value)} data-testid={`team-board-count-${key}`}>
+ {summary[key]}
+ </span>
+ </Flexbox>
+ ))}
+ </Flexbox>
+ {action}
+ </Flexbox>
+ <BarChart
+ stack
+ allowDecimals={false}
+ categories={series.map(({ label }) => label)}
+ colors={series.map(({ color }) => color)}
+ data={data}
+ height={120}
+ index={'time'}
+ showLegend={false}
+ />
+ </Flexbox>
+ );
+};
+
+export default ActivityPanel;
diff --git a/src/features/HomeTeamBoard/AttentionList.tsx b/src/features/HomeTeamBoard/AttentionList.tsx
new file mode 100644
index 00000000000..c7818b0b315
--- /dev/null
+++ b/src/features/HomeTeamBoard/AttentionList.tsx
@@ -0,0 +1,153 @@
+import type { AgentRunBoardAttentionItem } from '@lobechat/types';
+import { Flexbox, Text } from '@lobehub/ui';
+import { cssVar } from '@lobehub/ui/stylex/cssVar.stylex';
+import * as stylex from '@stylexjs/stylex';
+import { useTranslation } from 'react-i18next';
+
+import AgentAvatar from '@/components/AgentAvatar';
+import AuthorChip from '@/features/HomeInbox/AuthorChip';
+import { sx } from '@/styles/sx';
+
+import { formatDuration } from './layout';
+import { RUN_STATUS_VISUALS } from './statusVisuals';
+import { useOpenRunDrawer } from './useOpenRunDrawer';
+
+const styles = stylex.create({
+ card: {
+ backgroundColor: cssVar.colorBgContainer,
+ borderColor: cssVar.colorBorderSecondary,
+ borderRadius: 12,
+ borderStyle: 'solid',
+ borderWidth: 1,
+ paddingBlock: 16,
+ paddingInline: 16,
+ },
+ count: { color: cssVar.colorTextTertiary, fontSize: 12 },
+ detail: {
+ color: cssVar.colorTextSecondary,
+ fontSize: 13,
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ whiteSpace: 'nowrap',
+ },
+ empty: { color: cssVar.colorTextTertiary, fontSize: 13 },
+ heading: { color: cssVar.colorTextTertiary, fontSize: 12, fontWeight: 500 },
+ item: {
+ backgroundColor: { 'default': 'transparent', ':hover': cssVar.colorFillQuaternary },
+ borderRadius: 8,
+ borderStyle: 'none',
+ borderWidth: 0,
+ color: 'inherit',
+ cursor: { 'default': 'pointer', ':disabled': 'default' },
+ display: 'block',
+ marginInline: -8,
+ paddingBlock: 8,
+ paddingInline: 8,
+ textAlign: 'start',
+ width: 'calc(100% + 16px)',
+ },
+ meta: { flexShrink: 0, fontSize: 12, whiteSpace: 'nowrap' },
+});
+
+const Item = ({ item, now }: { item: AgentRunBoardAttentionItem; now: Date }) => {
+ const { t } = useTranslation('home');
+ const openDrawer = useOpenRunDrawer();
+ const failed = item.kind === 'failed';
+ const elapsed = formatDuration(now.getTime() - item.since.getTime());
+ const title = item.title || t('team.run.untitled');
+
+ return (
+ <button
+ data-testid={`team-board-attention-${item.kind}`}
+ disabled={!item.topicId}
+ type={'button'}
+ {...stylex.props(styles.item)}
+ onClick={() =>
+ openDrawer({
+ agentId: item.agentId,
+ runningOperation: item.runningOperation,
+ title,
+ topicId: item.topicId,
+ })
+ }
+ >
+ <Flexbox gap={4}>
+ <Flexbox horizontal align={'center'} gap={8}>
+ <AgentAvatar
+ agentId={item.agentId}
+ avatar={item.agentAvatar ?? undefined}
+ background={item.agentBackgroundColor ?? undefined}
+ name={item.agentTitle ?? undefined}
+ size={20}
+ />
+ <Text ellipsis style={{ flex: 1 }} weight={500}>
+ {title}
+ </Text>
+ {!item.isMine && <AuthorChip avatarOnly userId={item.ownerUserId} />}
+ <span
+ {...sx(styles.meta, {
+ color: RUN_STATUS_VISUALS[failed ? 'failed' : 'needs_human'].color,
+ })}
+ >
+ {t(failed ? 'team.attention.failedAgo' : 'team.attention.waiting', { time: elapsed })}
+ </span>
+ </Flexbox>
+ {item.detail && <span {...stylex.props(styles.detail)}>{item.detail}</span>}
+ </Flexbox>
+ </button>
+ );
+};
+
+const Section = ({
+ items,
+ now,
+ title,
+}: {
+ items: AgentRunBoardAttentionItem[];
+ now: Date;
+ title: string;
+}) => {
+ if (items.length === 0) return null;
+
+ return (
+ <Flexbox gap={4}>
+ <Flexbox horizontal gap={6}>
+ <span {...stylex.props(styles.heading)}>{title}</span>
+ <span {...stylex.props(styles.count)}>{items.length}</span>
+ </Flexbox>
+ {items.map((item) => (
+ <Item item={item} key={item.operationId} now={now} />
+ ))}
+ </Flexbox>
+ );
+};
+
+const AttentionList = ({ items, now }: { items: AgentRunBoardAttentionItem[]; now: Date }) => {
+ const { t } = useTranslation('home');
+ const waiting = items.filter((item) => item.kind === 'needs_human');
+
+ return (
+ <Flexbox gap={16} {...stylex.props(styles.card)} data-testid={'team-board-attention'}>
+ <Section
+ items={waiting.filter((item) => item.isMine)}
+ now={now}
+ title={t('team.attention.needsYou')}
+ />
+ <Section
+ items={waiting.filter((item) => !item.isMine)}
+ now={now}
+ title={t('team.attention.blocked')}
+ />
+ <Section
+ items={items.filter((item) => item.kind === 'failed')}
+ now={now}
+ title={t('team.attention.failed')}
+ />
+ {items.length === 0 && (
+ <span {...stylex.props(styles.empty)}>{t('team.attention.empty')}</span>
+ )}
+ </Flexbox>
+ );
+};
+
+export default AttentionList;
diff --git a/src/features/HomeTeamBoard/DayCalendar.tsx b/src/features/HomeTeamBoard/DayCalendar.tsx
new file mode 100644
index 00000000000..c0b471feaad
--- /dev/null
+++ b/src/features/HomeTeamBoard/DayCalendar.tsx
@@ -0,0 +1,124 @@
+import type { AgentRunBoardData } from '@lobechat/types';
+import { Flexbox } from '@lobehub/ui';
+import { cssVar } from '@lobehub/ui/stylex/cssVar.stylex';
+import * as stylex from '@stylexjs/stylex';
+import dayjs from 'dayjs';
+import { useTranslation } from 'react-i18next';
+
+import { sx } from '@/styles/sx';
+
+import { buildHourCells, type HourCellItem } from './layout';
+import { RUN_STATUS_VISUALS } from './statusVisuals';
+import { useOpenRunDrawer } from './useOpenRunDrawer';
+
+const MAX_CELL_ITEMS = 3;
+
+const styles = stylex.create({
+ card: {
+ backgroundColor: cssVar.colorBgContainer,
+ borderColor: cssVar.colorBorderSecondary,
+ borderRadius: 12,
+ borderStyle: 'solid',
+ borderWidth: 1,
+ minWidth: 0,
+ paddingBlock: 16,
+ paddingInline: 16,
+ },
+ cell: {
+ backgroundColor: cssVar.colorFillQuaternary,
+ borderRadius: 8,
+ boxSizing: 'border-box',
+ minHeight: 104,
+ minWidth: 0,
+ paddingBlock: 8,
+ paddingInline: 8,
+ },
+ current: { outlineColor: cssVar.colorPrimary, outlineStyle: 'solid', outlineWidth: 1 },
+ dot: { borderRadius: 3, flexShrink: 0, height: 6, width: 6 },
+ grid: { display: 'grid', gap: 8, gridTemplateColumns: 'repeat(4, minmax(0, 1fr))' },
+ hour: {
+ color: cssVar.colorTextTertiary,
+ fontSize: 12,
+ fontVariantNumeric: 'tabular-nums',
+ },
+ item: {
+ alignItems: 'center',
+ backgroundColor: { 'default': 'transparent', ':hover': cssVar.colorFillSecondary },
+ borderRadius: 4,
+ borderStyle: 'none',
+ borderWidth: 0,
+ color: cssVar.colorTextSecondary,
+ cursor: { 'default': 'pointer', ':disabled': 'default' },
+ display: 'flex',
+ fontSize: 12,
+ gap: 6,
+ paddingBlock: 1,
+ paddingInline: 2,
+ textAlign: 'start',
+ width: '100%',
+ },
+ more: { color: cssVar.colorTextTertiary, fontSize: 12, paddingInline: 2 },
+ title: { minWidth: 0, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' },
+});
+
+const CalendarItem = ({ item }: { item: HourCellItem }) => {
+ const { t } = useTranslation('home');
+ const openDrawer = useOpenRunDrawer();
+ const { agentId, run } = item;
+ const title = run.title || t('team.run.untitled');
+
+ return (
+ <button
+ data-status={run.status}
+ data-testid={'team-board-calendar-run'}
+ disabled={!run.topicId}
+ title={`${title} · ${t(`team.status.${run.status}`)}`}
+ type={'button'}
+ {...stylex.props(styles.item)}
+ onClick={() =>
+ openDrawer({
+ agentId,
+ runningOperation: run.runningOperation,
+ title,
+ topicId: run.topicId,
+ })
+ }
+ >
+ <span {...sx(styles.dot, { backgroundColor: RUN_STATUS_VISUALS[run.status].color })} />
+ <span {...stylex.props(styles.title)}>{title}</span>
+ </button>
+ );
+};
+
+/** A day reads best as a calendar: 24 hour cells, each listing what started in it. */
+const DayCalendar = ({ board }: { board: AgentRunBoardData }) => {
+ const { t } = useTranslation('home');
+ const cells = buildHourCells(board.lanes, board.generatedAt);
+
+ return (
+ <div {...stylex.props(styles.card)}>
+ <div {...stylex.props(styles.grid)} data-testid={'team-board-calendar'}>
+ {cells.map((cell, index) => (
+ <Flexbox
+ gap={2}
+ key={cell.hour.getTime()}
+ {...stylex.props(styles.cell, index === cells.length - 1 && styles.current)}
+ data-testid={'team-board-calendar-cell'}
+ >
+ <span {...stylex.props(styles.hour)}>{dayjs(cell.hour).format('HH:00')}</span>
+ {cell.items.slice(0, MAX_CELL_ITEMS).map((item) => (
+ <CalendarItem item={item} key={item.run.id} />
+ ))}
+ {cell.items.length > MAX_CELL_ITEMS && (
+ <span {...stylex.props(styles.more)}>
+ {t('team.calendar.more', { count: cell.items.length - MAX_CELL_ITEMS })}
+ </span>
+ )}
+ </Flexbox>
+ ))}
+ </div>
+ </div>
+ );
+};
+
+export default DayCalendar;
diff --git a/src/features/HomeTeamBoard/Timeline.tsx b/src/features/HomeTeamBoard/Timeline.tsx
new file mode 100644
index 00000000000..e8c3ad7fdc0
--- /dev/null
+++ b/src/features/HomeTeamBoard/Timeline.tsx
@@ -0,0 +1,312 @@
+import type { AgentRunBoardData, AgentRunBoardLane, AgentRunBoardRunStatus } from '@lobechat/types';
+import { Flexbox, Text, Tooltip } from '@lobehub/ui';
+import { cssVar } from '@lobehub/ui/stylex/cssVar.stylex';
+import * as stylex from '@stylexjs/stylex';
+import dayjs from 'dayjs';
+import { useTranslation } from 'react-i18next';
+
+import { useWorkspaceMemberProfiles } from '@/business/client/hooks/useWorkspaceMemberProfiles';
+import AgentAvatar from '@/components/AgentAvatar';
+import { useAgentDisplayMeta } from '@/features/AgentTasks/shared/useAgentDisplayMeta';
+import AuthorChip from '@/features/HomeInbox/AuthorChip';
+import { sx } from '@/styles/sx';
+
+import {
+ buildAxisTicks,
+ formatDuration,
+ layoutLaneTopics,
+ NOW_TICK_INDEX,
+ type PlacedRun,
+ resolveRowLabel,
+ type TopicRow,
+} from './layout';
+import { RUN_STATUS_VISUALS } from './statusVisuals';
+import { useOpenRunDrawer } from './useOpenRunDrawer';
+
+const BAR_HEIGHT = 22;
+
+const styles = stylex.create({
+ agent: { paddingBlock: 6 },
+ axis: { height: 20, position: 'relative' },
+ bar: {
+ borderRadius: 5,
+ borderStyle: 'none',
+ borderWidth: 0,
+ cursor: { 'default': 'pointer', ':disabled': 'default' },
+ display: 'flex',
+ height: BAR_HEIGHT,
+ overflow: 'hidden',
+ opacity: { 'default': 1, ':hover': 0.75 },
+ paddingBlock: 0,
+ paddingInline: 0,
+ position: 'absolute',
+ top: 3,
+ },
+ card: {
+ backgroundColor: cssVar.colorBgContainer,
+ borderColor: cssVar.colorBorderSecondary,
+ borderRadius: 12,
+ borderStyle: 'solid',
+ borderWidth: 1,
+ minWidth: 0,
+ paddingBlock: 16,
+ paddingInline: 16,
+ },
+ gridLine: {
+ backgroundColor: cssVar.colorFillQuaternary,
+ bottom: 0,
+ position: 'absolute',
+ top: 0,
+ width: 1,
+ },
+ nowLine: { backgroundColor: cssVar.colorTextQuaternary },
+ gridLines: {
+ bottom: 0,
+ insetInlineEnd: 0,
+ insetInlineStart: 0,
+ pointerEvents: 'none',
+ position: 'absolute',
+ top: 0,
+ },
+ lane: {
+ borderBlockStartColor: cssVar.colorBorderSecondary,
+ borderBlockStartStyle: 'solid',
+ borderBlockStartWidth: 1,
+ paddingBlock: 6,
+ },
+ lanes: { position: 'relative' },
+ meta: { color: cssVar.colorTextTertiary, fontSize: 12 },
+ row: { height: 28 },
+ tick: {
+ color: cssVar.colorTextQuaternary,
+ fontSize: 11,
+ fontVariantNumeric: 'tabular-nums',
+ position: 'absolute',
+ transform: 'translateX(-50%)',
+ whiteSpace: 'nowrap',
+ },
+ tickEnd: { transform: 'translateX(-100%)' },
+ tickStart: { transform: 'none' },
+ barLabel: {
+ alignItems: 'center',
+ color: cssVar.colorText,
+ display: 'flex',
+ fontSize: 12,
+ gap: 6,
+ height: BAR_HEIGHT,
+ paddingInline: 6,
+ pointerEvents: 'none',
+ position: 'absolute',
+ top: 3,
+ },
+ barLabelAuthor: { flexShrink: 0, pointerEvents: 'auto' },
+ barLabelText: {
+ minWidth: 0,
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ whiteSpace: 'nowrap',
+ },
+ segment: { display: 'block', height: '100%' },
+ track: { flexGrow: 1, height: 28, minWidth: 0, position: 'relative' },
+});
+
+const tint = (status: AgentRunBoardRunStatus) =>
+ `color-mix(in srgb, ${RUN_STATUS_VISUALS[status].color} 32%, transparent)`;
+
+const Bar = ({
+ agentId,
+ placed,
+ title,
+ now,
+}: {
+ agentId: string;
+ placed: PlacedRun;
+ title: string;
+ now: Date;
+}) => {
+ const { t } = useTranslation('home');
+ const openDrawer = useOpenRunDrawer();
+ const profiles = useWorkspaceMemberProfiles();
+ const { left, run, runningShare, width } = placed;
+ const member = profiles.get(run.userId);
+ const duration = formatDuration((run.endedAt ?? now).getTime() - run.startedAt.getTime());
+
+ return (
+ <Tooltip
+ title={[
+ title,
+ t(`team.status.${run.status}`),
+ duration,
+ member?.fullName || member?.username,
+ run.model,
+ ]
+ .filter(Boolean)
+ .join(' · ')}
+ >
+ <button
+ aria-label={title}
+ data-status={run.status}
+ data-testid={'team-board-run'}
+ disabled={!run.topicId}
+ type={'button'}
+ {...sx(styles.bar, {
+ insetInlineStart: `${left}%`,
+ width: `${width}%`,
+ })}
+ onClick={() =>
+ openDrawer({
+ agentId,
+ runningOperation: run.runningOperation,
+ title,
+ topicId: run.topicId,
+ })
+ }
+ >
+ {runningShare !== null && (
+ <span
+ data-testid={'team-board-run-before-ask'}
+ {...sx(styles.segment, {
+ backgroundColor: tint('running'),
+ flexBasis: `${runningShare}%`,
+ })}
+ />
+ )}
+ <span {...sx(styles.segment, { backgroundColor: tint(run.status), flexGrow: 1 })} />
+ </button>
+ </Tooltip>
+ );
+};
+
+const RowLabel = ({ row, title }: { row: TopicRow; title: string }) => {
+ const { anchor, offset, room } = resolveRowLabel(row.runs);
+
+ return (
+ <span
+ data-testid={'team-board-topic-title'}
+ {...sx(styles.barLabel, {
+ ...(anchor === 'start'
+ ? { insetInlineStart: `${offset}%` }
+ : { insetInlineEnd: `${offset}%` }),
+ maxWidth: `${room}%`,
+ })}
+ >
+ <span {...stylex.props(styles.barLabelAuthor)}>
+ <AuthorChip avatarOnly trigger={row.trigger} userId={row.startedBy} />
+ </span>
+ <span {...stylex.props(styles.barLabelText)}>{title}</span>
+ </span>
+ );
+};
+
+const Lane = ({
+ lane,
+ now,
+ windowStart,
+}: {
+ lane: AgentRunBoardLane;
+ now: Date;
+ windowStart: Date;
+}) => {
+ const { t } = useTranslation('home');
+ const meta = useAgentDisplayMeta(lane.agentId);
+ const { overflow, rows } = layoutLaneTopics(lane.runs, windowStart, now);
+ const agentTitle = lane.title || meta?.title || t('team.agent.untitled');
+
+ return (
+ <div {...stylex.props(styles.lane)} data-testid={'team-board-lane'}>
+ <Flexbox horizontal align={'center'} gap={8} {...stylex.props(styles.agent)}>
+ <AgentAvatar
+ agentId={lane.agentId}
+ avatar={lane.avatar ?? undefined}
+ background={lane.backgroundColor ?? undefined}
+ name={agentTitle}
+ size={24}
+ />
+ <Text ellipsis weight={500}>
+ {agentTitle}
+ </Text>
+ <AuthorChip avatarOnly userId={lane.ownerUserId} />
+ </Flexbox>
+ {rows.map((row) => {
+ const title = row.title || t('team.run.untitled');
+
+ return (
+ <Flexbox
+ horizontal
+ align={'center'}
+ data-testid={'team-board-topic'}
+ key={row.key}
+ {...stylex.props(styles.row)}
+ >
+ <div {...stylex.props(styles.track)}>
+ {row.runs.map((placed) => (
+ <Bar
+ agentId={lane.agentId}
+ key={placed.run.id}
+ now={now}
+ placed={placed}
+ title={title}
+ />
+ ))}
+ <RowLabel row={row} title={title} />
+ </div>
+ </Flexbox>
+ );
+ })}
+ {overflow > 0 && (
+ <span {...sx(styles.meta, { paddingInlineStart: 0 })}>
+ {t('team.lane.more', { count: overflow })}
+ </span>
+ )}
+ </div>
+ );
+};
+
+const Timeline = ({ board }: { board: AgentRunBoardData }) => {
+ const { t } = useTranslation('home');
+ const { generatedAt, hiddenLaneCount, lanes, windowStart } = board;
+ const ticks = buildAxisTicks(windowStart, generatedAt);
+ const tickPercent = (index: number) => `${(index / (ticks.length - 1)) * 100}%`;
+
+ return (
+ <div {...stylex.props(styles.card)}>
+ <div {...stylex.props(styles.axis)}>
+ {ticks.map((tick, index) => (
+ <span
+ key={tick.getTime()}
+ {...sx(
+ styles.tick,
+ index === 0 && styles.tickStart,
+ index === ticks.length - 1 && styles.tickEnd,
+ { insetInlineStart: tickPercent(index) },
+ )}
+ >
+ {index === NOW_TICK_INDEX ? t('team.axis.now') : dayjs(tick).format('HH:mm')}
+ </span>
+ ))}
+ </div>
+ <div {...stylex.props(styles.lanes)}>
+ <div {...stylex.props(styles.gridLines)}>
+ {ticks.map((tick, index) => (
+ <span
+ key={tick.getTime()}
+ {...sx(styles.gridLine, index === NOW_TICK_INDEX && styles.nowLine, {
+ insetInlineStart: tickPercent(index),
+ })}
+ />
+ ))}
+ </div>
+ {lanes.map((lane) => (
+ <Lane key={lane.agentId} lane={lane} now={generatedAt} windowStart={windowStart} />
+ ))}
+ </div>
+ {hiddenLaneCount > 0 && (
+ <span {...stylex.props(styles.meta)}>
+ {t('team.lanes.hidden', { count: hiddenLaneCount })}
+ </span>
+ )}
+ </div>
+ );
+};
+
+export default Timeline;
diff --git a/src/features/HomeTeamBoard/index.tsx b/src/features/HomeTeamBoard/index.tsx
new file mode 100644
index 00000000000..a944faef9cb
--- /dev/null
+++ b/src/features/HomeTeamBoard/index.tsx
@@ -0,0 +1,103 @@
+import type { AgentRunBoardWindowHours } from '@lobechat/types';
+import { Flexbox, Segmented, Skeleton } from '@lobehub/ui';
+import { cssVar } from '@lobehub/ui/stylex/cssVar.stylex';
+import * as stylex from '@stylexjs/stylex';
+import { useState } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import AsyncError from '@/components/AsyncError';
+import { useClientPollingSWR } from '@/libs/swr';
+import { useCacheScope } from '@/libs/swr/useCacheScope';
+import { agentRunBoardService } from '@/services/agentRunBoard';
+
+import ActivityPanel from './ActivityPanel';
+import AttentionList from './AttentionList';
+import DayCalendar from './DayCalendar';
+import Timeline from './Timeline';
+
+// Matches the other overview pages; the gateway only streams a user's own runs.
+const POLL_INTERVAL = 15_000;
+const WINDOW_OPTIONS: AgentRunBoardWindowHours[] = [1, 6, 24];
+
+const styles = stylex.create({
+ // Clears the floating Home tabs above.
+ root: { paddingBlockStart: 24 },
+ columns: {
+ display: 'grid',
+ gap: 16,
+ gridTemplateColumns: {
+ 'default': 'minmax(0, 1fr) 340px',
+ '@media (max-width: 1100px)': 'minmax(0, 1fr)',
+ },
+ alignItems: 'start',
+ },
+ empty: {
+ borderColor: cssVar.colorBorderSecondary,
+ borderRadius: 12,
+ borderStyle: 'dashed',
+ borderWidth: 1,
+ color: cssVar.colorTextTertiary,
+ fontSize: 14,
+ paddingBlock: 48,
+ paddingInline: 16,
+ textAlign: 'center',
+ },
+});
+
+const HomeTeamBoard = () => {
+ const { t } = useTranslation('home');
+ const cacheScope = useCacheScope();
+ const [windowHours, setWindowHours] = useState<AgentRunBoardWindowHours>(1);
+
+ const { data, error, mutate } = useClientPollingSWR(
+ ['agentRunBoard', cacheScope, windowHours],
+ () => agentRunBoardService.get(windowHours),
+ {
+ // The polling default dedupes for 30s, which would swallow every other tick.
+ dedupingInterval: POLL_INTERVAL / 2,
+ keepPreviousData: true,
+ refreshInterval: POLL_INTERVAL,
+ revalidateOnFocus: true,
+ },
+ );
+
+ if (error && !data) return <AsyncError error={error} variant={'inline'} onRetry={mutate} />;
+
+ return (
+ <Flexbox data-testid={'team-board'} gap={20} {...stylex.props(styles.root)}>
+ {!data ? (
+ <Skeleton height={420} width={'100%'} />
+ ) : (
+ <Flexbox gap={16}>
+ <ActivityPanel
+ activity={data.activity}
+ summary={data.summary}
+ action={
+ <Segmented
+ size={'small'}
+ value={String(windowHours)}
+ options={WINDOW_OPTIONS.map((value) => ({
+ label: t('team.window', { count: value }),
+ value: String(value),
+ }))}
+ onChange={(value) => setWindowHours(Number(value) as AgentRunBoardWindowHours)}
+ />
+ }
+ />
+ <div {...stylex.props(styles.columns)}>
+ {!data.lanes?.length ? (
+ <div {...stylex.props(styles.empty)}>{t('team.empty', { count: windowHours })}</div>
+ ) : windowHours === 24 ? (
+ <DayCalendar board={data} />
+ ) : (
+ <Timeline board={data} />
+ )}
+ <AttentionList items={data.attention} now={data.generatedAt} />
+ </div>
+ </Flexbox>
+ )}
+ </Flexbox>
+ );
+};
+
+export default HomeTeamBoard;
diff --git a/src/features/HomeTeamBoard/layout.test.ts b/src/features/HomeTeamBoard/layout.test.ts
new file mode 100644
index 00000000000..6469b1d9313
--- /dev/null
+++ b/src/features/HomeTeamBoard/layout.test.ts
@@ -0,0 +1,211 @@
+import type { AgentRunBoardRun } from '@lobechat/types';
+import { describe, expect, it } from 'vitest';
+
+import {
+ buildAxisTicks,
+ buildHourCells,
+ extendActivityWithFuture,
+ formatDuration,
+ layoutLaneTopics,
+ MAX_TOPIC_ROWS,
+ MIN_BAR_PERCENT,
+ NOW_TICK_INDEX,
+ resolveRowLabel,
+} from './layout';
+
+const start = new Date('2026-11-08T10:00:00Z');
+const end = new Date('2026-11-08T11:00:00Z');
+const at = (minute: number) => new Date(start.getTime() + minute * 60_000);
+
+const run = (
+ id: string,
+ from: number,
+ to: number | null,
+ overrides: Partial<AgentRunBoardRun> = {},
+): AgentRunBoardRun => ({
+ endedAt: to === null ? null : at(to),
+ id,
+ model: null,
+ runningOperation: null,
+ startedAt: at(from),
+ status: to === null ? 'running' : 'done',
+ title: null,
+ topicId: null,
+ trigger: null,
+ userId: 'u',
+ waitingSince: null,
+ ...overrides,
+});
+
+describe('layoutLaneTopics', () => {
+ it('positions a run as percentages and extends a live run to the end', () => {
+ const { rows } = layoutLaneTopics([run('a', 30, null)], start, end);
+
+ expect(rows[0].runs[0]).toMatchObject({ left: 40, width: 40 });
+ });
+
+ it('clamps a run that began before the window', () => {
+ const { rows } = layoutLaneTopics([run('a', -30, 6)], start, end);
+
+ expect(rows[0].runs[0].left).toBe(0);
+ expect(rows[0].runs[0].width).toBe(8);
+ });
+
+ it('gives concurrent topics their own rows and lines up turns of one topic', () => {
+ const { rows } = layoutLaneTopics(
+ [
+ run('a1', 0, 10, { title: 'First', topicId: 't1' }),
+ run('b', 5, 20, { title: 'Other', topicId: 't2' }),
+ run('a2', 30, 40, { title: 'Renamed', topicId: 't1' }),
+ ],
+ start,
+ end,
+ );
+
+ expect(rows).toHaveLength(2);
+ const t1 = rows.find((row) => row.topicId === 't1');
+ expect(t1?.runs.map((p) => p.run.id)).toEqual(['a1', 'a2']);
+ expect(t1?.title).toBe('Renamed');
+ });
+
+ it('keeps a topic-less run on its own row', () => {
+ const { rows } = layoutLaneTopics([run('a', 0, 5), run('b', 10, 15)], start, end);
+
+ expect(rows.map((row) => row.key).sort()).toEqual(['a', 'b']);
+ });
+
+ it('leads with topics that need attention', () => {
+ const { rows } = layoutLaneTopics(
+ [
+ run('done', 50, 55, { topicId: 't1' }),
+ run('ask', 0, null, { status: 'needs_human', topicId: 't2' }),
+ ],
+ start,
+ end,
+ );
+
+ expect(rows[0].topicId).toBe('t2');
+ });
+
+ it('counts topics past the cap instead of growing the lane', () => {
+ const runs = Array.from({ length: 7 }, (_, i) => run(`r${i}`, i, i + 1));
+ const layout = layoutLaneTopics(runs, start, end);
+
+ expect(layout.rows).toHaveLength(MAX_TOPIC_ROWS);
+ expect(layout.overflow).toBe(2);
+ });
+
+ it('splits a waiting run at the moment it asked', () => {
+ const { rows } = layoutLaneTopics(
+ [run('a', 0, null, { status: 'needs_human', waitingSince: at(45) })],
+ start,
+ end,
+ );
+
+ expect(rows[0].runs[0].runningShare).toBe(75);
+ expect(rows[0].startedBy).toBe('u');
+ });
+
+ it('keeps an instant run visible at the present', () => {
+ const { rows } = layoutLaneTopics([run('a', 60, 60)], start, end);
+
+ expect(rows[0].runs[0].width).toBe(MIN_BAR_PERCENT);
+ expect(rows[0].runs[0].left).toBe(80);
+ });
+});
+
+describe('resolveRowLabel', () => {
+ const placed = (left: number, width: number) => ({
+ left,
+ run: run('a', 0, 1),
+ runningShare: null,
+ width,
+ });
+
+ it('starts the title at the first bar', () => {
+ expect(resolveRowLabel([placed(10, 5), placed(40, 5)])).toEqual({
+ anchor: 'start',
+ offset: 10,
+ room: 90,
+ });
+ });
+
+ it('hangs a late row back from its last bar, using the room on its left', () => {
+ expect(resolveRowLabel([placed(70, 5), placed(78, 2)])).toEqual({
+ anchor: 'end',
+ offset: 20,
+ room: 80,
+ });
+ });
+});
+
+describe('buildHourCells', () => {
+ const now = new Date(2026, 10, 8, 14, 30);
+ const atHour = (hour: number, status: AgentRunBoardRun['status'] = 'done') =>
+ run(`r-${hour}-${status}`, 0, 1, { startedAt: new Date(2026, 10, 8, hour, 10), status });
+ const lane = (runs: AgentRunBoardRun[]) => [
+ { agentId: 'a', avatar: null, backgroundColor: null, runs, title: null },
+ ];
+
+ it('lists 24 clock hours ending with the current one', () => {
+ const cells = buildHourCells([], now);
+
+ expect(cells).toHaveLength(24);
+ expect(cells.at(-1)?.hour).toEqual(new Date(2026, 10, 8, 14));
+ expect(cells[0].hour).toEqual(new Date(2026, 10, 7, 15));
+ });
+
+ it('puts a run in the hour it started and an older one in the first cell', () => {
+ const cells = buildHourCells(
+ lane([atHour(14), run('old', 0, 1, { startedAt: new Date(2026, 10, 1) })]),
+ now,
+ );
+
+ expect(cells.at(-1)?.items.map((i) => i.run.id)).toEqual(['r-14-done']);
+ expect(cells[0].items.map((i) => i.run.id)).toEqual(['old']);
+ });
+
+ it('leads each hour with what needs attention', () => {
+ const cells = buildHourCells(lane([atHour(14), atHour(14, 'needs_human')]), now);
+
+ expect(cells.at(-1)?.items[0].run.status).toBe('needs_human');
+ });
+});
+
+describe('buildAxisTicks', () => {
+ it('puts the present at 4/5 of the axis', () => {
+ const ticks = buildAxisTicks(start, end);
+
+ expect(ticks).toHaveLength(6);
+ expect(ticks[0]).toEqual(start);
+ expect(ticks[NOW_TICK_INDEX]).toEqual(end);
+ });
+});
+
+describe('extendActivityWithFuture', () => {
+ it('appends empty slices for the last 1/5 of the axis', () => {
+ const empty = { done: 0, failed: 0, needsHuman: 0, running: 0 };
+ const activity = Array.from({ length: 12 }, (_, i) => ({
+ ...empty,
+ done: 1,
+ startedAt: at(i * 5),
+ }));
+ const extended = extendActivityWithFuture(activity);
+
+ expect(extended).toHaveLength(15);
+ expect(extended[12]).toEqual({ ...empty, startedAt: at(60) });
+ });
+});
+
+describe('formatDuration', () => {
+ it.each([
+ [45_000, '45s'],
+ [14 * 60_000, '14m'],
+ [125 * 60_000, '2h 5m'],
+ [120 * 60_000, '2h'],
+ [72 * 3_600_000, '3d'],
+ [-5, '0s'],
+ ])('formats %d', (ms, expected) => {
+ expect(formatDuration(ms)).toBe(expected);
+ });
+});
diff --git a/src/features/HomeTeamBoard/layout.ts b/src/features/HomeTeamBoard/layout.ts
new file mode 100644
index 00000000000..410c229236c
--- /dev/null
+++ b/src/features/HomeTeamBoard/layout.ts
@@ -0,0 +1,224 @@
+import type {
+ AgentRunBoardActivityBucket,
+ AgentRunBoardLane,
+ AgentRunBoardRun,
+ AgentRunBoardRunStatus,
+} from '@lobechat/types';
+
+/** Short runs still need a mark wide enough to see and click. */
+export const MIN_BAR_PERCENT = 0.8;
+/** Past this an agent stops growing; the rest are counted. */
+export const MAX_TOPIC_ROWS = 5;
+/** The window fills the first 4/5 of the axis; the rest is room for what comes next. */
+const FUTURE_RATIO = 1 / 4;
+const TICKS_PER_PAST = 4;
+const TICK_COUNT = 5;
+/** A title starting past this would run out of room, so it hangs left of its bar's end. */
+const LABEL_FLIP_PERCENT = 55;
+/** Which of the axis ticks is the present. */
+export const NOW_TICK_INDEX = TICKS_PER_PAST;
+
+const STATUS_RANK: Record<AgentRunBoardRunStatus, number> = {
+ done: 3,
+ failed: 1,
+ needs_human: 0,
+ running: 2,
+ stopped: 3,
+};
+
+export interface PlacedRun {
+ /** Inline-start offset, as a percentage of the time axis. */
+ left: number;
+ run: AgentRunBoardRun;
+ /** For a run waiting on a person: how much of its bar, in %, it ran before asking. */
+ runningShare: number | null;
+ width: number;
+}
+
+export interface TopicRow {
+ key: string;
+ runs: PlacedRun[];
+ /** The member who started the topic. */
+ startedBy: string;
+ title: string | null;
+ topicId: string | null;
+ trigger: string | null;
+}
+
+export interface LaneLayout {
+ /** Topics that did not fit in {@link MAX_TOPIC_ROWS}. */
+ overflow: number;
+ rows: TopicRow[];
+}
+
+/** The present sits at 4/5 of the axis, leaving the rest for time still to come. */
+export const resolveAxisEnd = (windowStart: Date, now: Date) =>
+ new Date(now.getTime() + (now.getTime() - windowStart.getTime()) * FUTURE_RATIO);
+
+const toPercent = (time: number, start: number, end: number) =>
+ Math.min(100, Math.max(0, ((time - start) / (end - start)) * 100));
+
+const placeRun = (run: AgentRunBoardRun, start: number, end: number, now: Date): PlacedRun => {
+ const from = toPercent(run.startedAt.getTime(), start, end);
+ const to = toPercent((run.endedAt ?? now).getTime(), start, end);
+ const width = Math.max(to - from, MIN_BAR_PERCENT);
+ const left = Math.min(from, 100 - width);
+ const waitingAt = run.waitingSince && toPercent(run.waitingSince.getTime(), start, end);
+
+ return {
+ left,
+ run,
+ runningShare:
+ waitingAt === null ? null : Math.min(100, Math.max(0, ((waitingAt - left) / width) * 100)),
+ width,
+ };
+};
+
+const latestStart = (runs: PlacedRun[]) =>
+ Math.max(...runs.map(({ run }) => run.startedAt.getTime()));
+
+const rowRank = (runs: PlacedRun[]) => Math.min(...runs.map(({ run }) => STATUS_RANK[run.status]));
+
+/**
+ * One row per topic. An agent can serve many conversations at once, so the
+ * conversation is what a reader tracks; its turns line up along one row.
+ */
+export const layoutLaneTopics = (
+ runs: AgentRunBoardRun[],
+ windowStart: Date,
+ now: Date,
+): LaneLayout => {
+ const start = windowStart.getTime();
+ const end = resolveAxisEnd(windowStart, now).getTime();
+ const groups = Map.groupBy(runs, (run) => run.topicId ?? run.id);
+
+ const rows = [...groups.entries()]
+ .map(([key, group]): TopicRow => {
+ const ordered = [...group].sort((a, b) => a.startedAt.getTime() - b.startedAt.getTime());
+
+ return {
+ key,
+ runs: ordered.map((run) => placeRun(run, start, end, now)),
+ title: ordered.findLast((run) => run.title)?.title ?? null,
+ startedBy: ordered[0].userId,
+ topicId: ordered[0].topicId,
+ trigger: ordered[0].trigger,
+ };
+ })
+ .sort((a, b) => rowRank(a.runs) - rowRank(b.runs) || latestStart(b.runs) - latestStart(a.runs));
+
+ return {
+ overflow: Math.max(0, rows.length - MAX_TOPIC_ROWS),
+ rows: rows.slice(0, MAX_TOPIC_ROWS),
+ };
+};
+
+export interface RowLabelPlacement {
+ anchor: 'end' | 'start';
+ /** Distance from that edge of the axis, as a percentage. */
+ offset: number;
+ /** The room the title has, as a percentage of the axis. */
+ room: number;
+}
+
+/**
+ * Where a topic's title sits along its row: from the first bar's start, or back
+ * from the last bar's end when the row begins too late to fit it.
+ */
+export const resolveRowLabel = (runs: PlacedRun[]): RowLabelPlacement => {
+ const first = runs[0];
+ if (first.left <= LABEL_FLIP_PERCENT)
+ return { anchor: 'start', offset: first.left, room: 100 - first.left };
+
+ const last = runs.at(-1)!;
+ const end = last.left + last.width;
+ return { anchor: 'end', offset: 100 - end, room: end };
+};
+
+const HOUR_MS = 60 * 60_000;
+const DAY_HOURS = 24;
+
+export interface HourCellItem {
+ agentId: string;
+ run: AgentRunBoardRun;
+}
+
+export interface HourCell {
+ hour: Date;
+ items: HourCellItem[];
+}
+
+/**
+ * The last 24 clock hours, oldest first, ending with the current one. A run
+ * lands in the hour it started; anything older sits in the first cell.
+ */
+export const buildHourCells = (lanes: AgentRunBoardLane[], now: Date): HourCell[] => {
+ const currentHour = new Date(now);
+ currentHour.setMinutes(0, 0, 0);
+ const firstHour = currentHour.getTime() - (DAY_HOURS - 1) * HOUR_MS;
+
+ const cells: HourCell[] = Array.from({ length: DAY_HOURS }, (_, index) => ({
+ hour: new Date(firstHour + index * HOUR_MS),
+ items: [],
+ }));
+
+ for (const lane of lanes) {
+ for (const run of lane.runs) {
+ const index = Math.floor((run.startedAt.getTime() - firstHour) / HOUR_MS);
+ cells[Math.min(DAY_HOURS - 1, Math.max(0, index))].items.push({
+ agentId: lane.agentId,
+ run,
+ });
+ }
+ }
+
+ for (const cell of cells)
+ cell.items.sort(
+ (a, b) =>
+ STATUS_RANK[a.run.status] - STATUS_RANK[b.run.status] ||
+ b.run.startedAt.getTime() - a.run.startedAt.getTime(),
+ );
+
+ return cells;
+};
+
+/** Evenly spaced times along the axis, with the present at {@link NOW_TICK_INDEX}. */
+export const buildAxisTicks = (windowStart: Date, now: Date): Date[] => {
+ const start = windowStart.getTime();
+ const step = (now.getTime() - start) / TICKS_PER_PAST;
+
+ return Array.from({ length: TICK_COUNT + 1 }, (_, i) => new Date(start + step * i));
+};
+
+/** Empty slices after the present, so the chart shares the timeline's 4/5 axis. */
+export const extendActivityWithFuture = (
+ activity: AgentRunBoardActivityBucket[],
+): AgentRunBoardActivityBucket[] => {
+ if (activity.length < 2) return activity;
+
+ const last = activity.at(-1)!.startedAt.getTime();
+ const step = last - activity.at(-2)!.startedAt.getTime();
+ const future = Array.from({ length: Math.round(activity.length * FUTURE_RATIO) }, (_, i) => ({
+ done: 0,
+ failed: 0,
+ needsHuman: 0,
+ running: 0,
+ startedAt: new Date(last + step * (i + 1)),
+ }));
+
+ return [...activity, ...future];
+};
+
+/** A compact duration: `45s`, `14m`, `2h 5m`, `3d`. */
+export const formatDuration = (ms: number): string => {
+ const seconds = Math.max(0, Math.floor(ms / 1000));
+ if (seconds < 60) return `${seconds}s`;
+
+ const minutes = Math.floor(seconds / 60);
+ if (minutes < 60) return `${minutes}m`;
+
+ const hours = Math.floor(minutes / 60);
+ if (hours < 24) return minutes % 60 ? `${hours}h ${minutes % 60}m` : `${hours}h`;
+
+ return `${Math.floor(hours / 24)}d`;
+};
diff --git a/src/features/HomeTeamBoard/statusVisuals.ts b/src/features/HomeTeamBoard/statusVisuals.ts
new file mode 100644
index 00000000000..77a1d1f23d0
--- /dev/null
+++ b/src/features/HomeTeamBoard/statusVisuals.ts
@@ -0,0 +1,17 @@
+import type { AgentRunBoardRunStatus } from '@lobechat/types';
+import { cssVar } from '@lobehub/ui';
+
+import { type ExecutionStatusVisual, TASK_STATUS_VISUALS } from '@/components/ExecutionStatus';
+
+/**
+ * The product's status glyphs and colors, so a run reads the same here as on
+ * tasks and topics. Finished work is the bulk of a board and needs nothing from
+ * anyone, so it recedes to gray and leaves color to what is live or stuck.
+ */
+export const RUN_STATUS_VISUALS: Record<AgentRunBoardRunStatus, ExecutionStatusVisual> = {
+ done: { ...TASK_STATUS_VISUALS.completed, color: cssVar.colorTextQuaternary },
+ failed: TASK_STATUS_VISUALS.failed,
+ needs_human: TASK_STATUS_VISUALS.paused,
+ running: TASK_STATUS_VISUALS.running,
+ stopped: TASK_STATUS_VISUALS.canceled,
+};
diff --git a/src/features/HomeTeamBoard/useOpenRunDrawer.ts b/src/features/HomeTeamBoard/useOpenRunDrawer.ts
new file mode 100644
index 00000000000..aee4a6f794b
--- /dev/null
+++ b/src/features/HomeTeamBoard/useOpenRunDrawer.ts
@@ -0,0 +1,27 @@
+import type { AgentRunBoardRunningOperation } from '@lobechat/types';
+import { useCallback } from 'react';
+
+import { useTaskStore } from '@/store/task';
+
+export interface RunDrawerTarget {
+ agentId: string;
+ runningOperation: AgentRunBoardRunningOperation | null;
+ title: string;
+ topicId: string | null;
+}
+
+/** Opens a run's conversation in Home's drawer, keeping the board in view behind it. */
+export const useOpenRunDrawer = () => {
+ const setActiveTaskId = useTaskStore((s) => s.setActiveTaskId);
+ const openTopicDrawer = useTaskStore((s) => s.openTopicDrawer);
+
+ return useCallback(
+ ({ agentId, runningOperation, title, topicId }: RunDrawerTarget) => {
+ if (!topicId) return;
+ // Clears any prior drawer state, so it has to run before opening.
+ setActiveTaskId(undefined);
+ openTopicDrawer(topicId, { agentId, runningOperation: runningOperation ?? undefined, title });
+ },
+ [openTopicDrawer, setActiveTaskId],
+ );
+};
diff --git a/src/routes/(main)/home/index.tsx b/src/routes/(main)/home/index.tsx
index 27c351bd6c6..47d2a306605 100644
--- a/src/routes/(main)/home/index.tsx
+++ b/src/routes/(main)/home/index.tsx
@@ -1,24 +1,33 @@
import { ScrollArea } from '@lobehub/ui';
-import { type FC } from 'react';
+import { type FC, lazy, Suspense } from 'react';
import HomePageTracker from '@/components/Analytics/HomePageTracker';
import HomeContent from '@/features/Home';
import { useHomeMinimalLayout } from '@/features/Home/CustomizeModal/useHomeCustomization';
import HomeNavHeader from '@/features/Home/HomeNavHeader';
+import HomeViewTabs from '@/features/Home/HomeViewTabs';
+import { useHomeView } from '@/features/Home/useHomeView';
import WideScreenContainer from '@/features/WideScreenContainer';
// Keep in sync with NavHeader's height so the track starts at its bottom edge.
const HOME_NAV_HEADER_HEIGHT = 44;
+const HomeTeamBoard = lazy(() => import('@/features/HomeTeamBoard'));
+
const Home: FC = () => {
// Auto margins are what center a flex item inside the scroll lane, and they
// have to sit on the item itself — the dashboard never wants them.
const minimal = useHomeMinimalLayout();
+ const { isWorkspace, setView, view } = useHomeView();
+ const teamBoard = view === 'team';
return (
<>
<HomePageTracker />
- <HomeNavHeader />
+ <HomeNavHeader
+ showControls={!teamBoard}
+ tabs={isWorkspace ? <HomeViewTabs value={view} onChange={setView} /> : undefined}
+ />
<ScrollArea
disableContentFit
scrollFade
@@ -39,9 +48,18 @@ const Home: FC = () => {
<WideScreenContainer
fullWidth
style={{ marginInline: 'auto', maxWidth: 1240 }}
- wrapperStyle={{ flex: 'none', marginBlock: minimal ? 'auto' : undefined }}
+ wrapperStyle={{ flex: 'none', marginBlock: minimal && !teamBoard ? 'auto' : undefined }}
>
- <HomeContent />
+ {/* CSS only: Activity tears down effects, which resets the composer's editor
+ and loses a draft on a look at the board. */}
+ <div style={{ display: teamBoard ? 'none' : undefined }}>
+ <HomeContent />
+ </div>
+ {teamBoard && (
+ <Suspense fallback={null}>
+ <HomeTeamBoard />
+ </Suspense>
+ )}
</WideScreenContainer>
</ScrollArea>
</>
diff --git a/src/services/agentRunBoard.ts b/src/services/agentRunBoard.ts
new file mode 100644
index 00000000000..89dd21557cb
--- /dev/null
+++ b/src/services/agentRunBoard.ts
@@ -0,0 +1,12 @@
+import type { AgentRunBoardWindowHours } from '@lobechat/types';
+
+import { lambdaClient } from '@/libs/trpc/client';
+
+class AgentRunBoardService {
+ get = async (windowHours: AgentRunBoardWindowHours) => {
+ const { data } = await lambdaClient.agentRunBoard.get.query({ windowHours });
+ return data;
+ };
+}
+
+export const agentRunBoardService = new AgentRunBoardService();
diff --git a/src/store/task/slices/detail/action.ts b/src/store/task/slices/detail/action.ts
index f01c91c21b7..14f16e82f6b 100644
--- a/src/store/task/slices/detail/action.ts
+++ b/src/store/task/slices/detail/action.ts
@@ -1,4 +1,4 @@
-import type { TaskDetailActivityAuthor, TaskDetailData } from '@lobechat/types';
+import type { TaskDetailActivity, TaskDetailActivityAuthor, TaskDetailData } from '@lobechat/types';
import {
clearTaskReposSelection,
readTaskExecutionConfig,
@@ -404,6 +404,7 @@ export class TaskDetailSliceActionImpl {
activeTaskId: cachedTaskId(taskId, this.#get().taskRefIndex),
activeTopicDrawerAgentId: undefined,
activeTopicDrawerFocusRequest: undefined,
+ activeTopicDrawerRunningOperation: undefined,
activeTopicDrawerTitle: undefined,
activeTopicDrawerTopicId: undefined,
},
@@ -422,7 +423,12 @@ export class TaskDetailSliceActionImpl {
*/
openTopicDrawer = (
topicId: string,
- topic?: { agentId?: string; autoFocus?: boolean; title?: string },
+ topic?: {
+ agentId?: string;
+ autoFocus?: boolean;
+ runningOperation?: TaskDetailActivity['runningOperation'];
+ title?: string;
+ },
): void => {
const current = this.#get();
if (current.activeTopicDrawerTopicId === topicId && !topic?.autoFocus) return;
@@ -432,6 +438,7 @@ export class TaskDetailSliceActionImpl {
activeTopicDrawerFocusRequest: topic?.autoFocus
? (current.activeTopicDrawerFocusRequest ?? 0) + 1
: undefined,
+ activeTopicDrawerRunningOperation: topic?.runningOperation,
activeTopicDrawerTitle: topic?.title,
activeTopicDrawerTopicId: topicId,
},
@@ -446,6 +453,7 @@ export class TaskDetailSliceActionImpl {
{
activeTopicDrawerAgentId: undefined,
activeTopicDrawerFocusRequest: undefined,
+ activeTopicDrawerRunningOperation: undefined,
activeTopicDrawerTitle: undefined,
activeTopicDrawerTopicId: undefined,
},
diff --git a/src/store/task/slices/detail/initialState.ts b/src/store/task/slices/detail/initialState.ts
index a570a2b3d7d..d23eeb0223a 100644
--- a/src/store/task/slices/detail/initialState.ts
+++ b/src/store/task/slices/detail/initialState.ts
@@ -1,4 +1,4 @@
-import type { TaskDetailData } from '@lobechat/types';
+import type { TaskDetailActivity, TaskDetailData } from '@lobechat/types';
import { createReplicaState, type ReplicaState } from '@/libs/replica';
import { type SaveStatus } from '@/types/saveState';
@@ -16,6 +16,8 @@ export interface TaskDetailSliceState {
focuses its reply composer each time it changes, so a repeated request
on an already-open drawer is still observable. */
activeTopicDrawerFocusRequest?: number;
+ /** A live run opened outside a task detail, where no activity carries its stream marker. */
+ activeTopicDrawerRunningOperation?: TaskDetailActivity['runningOperation'];
activeTopicDrawerTitle?: string;
activeTopicDrawerTopicId?: string;
isCreatingTask: boolean;