refactor(agent)!: migrate to Pi Durable and embed the agent queue (#525)

* refactor(agent)!: migrate sessions to Pi Durable

Replace patched AgentHarness storage with per-session SQLite and PostgreSQL commit mirroring. Migrate legacy history automatically and run agent queues with the main server.

BREAKING CHANGE: Remove standalone agent workers and return native Pi entry records from chat history APIs.

* fix(agent): constrain session log dialog scrolling

Keep the header visible and wrap long output while log entries and expanded records scroll within the dialog. Cover desktop and narrow viewports through the dashboard Sessions flow.

* fix(agent): hide entry IDs from session log card headers

Retain internal entry IDs in expanded raw records for debugging. Verify that card headers omit the IDs while raw JSON preserves them.

* test(e2e): handle browser wheel limits in session log checks

Verify that a normal wheel event moves the viewport before explicitly scrolling to the final record. Keep the dialog bounds, fixed header, wrapping, and expanded-record assertions.

* fix(agent): select model providers without inheriting unrelated auth

* fix(webui): prevent resize feedback when toggling agent panel

* test(agent): reproduce concurrent comment session races

* fix(agent): serialize comment sessions and deduplicate history

* docs(changelog): consolidate Pi Durable changes into one entry
This commit is contained in:
Yiling-J
2026-11-11 16:05:18 +08:00
committed by GitHub
parent 843a56304c
commit 35a0e82284
120 changed files with 7593 additions and 5972 deletions
+68 -63
View File
@@ -2,11 +2,11 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
// @ts-nocheck
/*
* This file should be your main import to use Prisma-related types and utilities in a browser.
* This file should be your main import to use Prisma-related types and utilities in a browser.
* Use it to get access to models, enums, and input types.
*
*
* This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only.
* See `client.ts` for the standard, server-side entry point.
*
@@ -19,301 +19,306 @@ export * as $Enums from './enums.ts'
export * from './enums.ts';
/**
* Model User
*
*
*/
export type User = Prisma.UserModel
/**
* Model Session
*
*
*/
export type Session = Prisma.SessionModel
/**
* Model Account
*
*
*/
export type Account = Prisma.AccountModel
/**
* Model Verification
*
*
*/
export type Verification = Prisma.VerificationModel
/**
* Model AuthToken
*
*
*/
export type AuthToken = Prisma.AuthTokenModel
/**
* Model Team
*
*
*/
export type Team = Prisma.TeamModel
/**
* Model Sandbox
*
*
*/
export type Sandbox = Prisma.SandboxModel
/**
* Model Skill
*
*
*/
export type Skill = Prisma.SkillModel
/**
* Model TeamMember
*
*
*/
export type TeamMember = Prisma.TeamMemberModel
/**
* Model Project
*
*
*/
export type Project = Prisma.ProjectModel
/**
* Model ProjectMember
*
*
*/
export type ProjectMember = Prisma.ProjectMemberModel
/**
* Model ShareLink
*
*
*/
export type ShareLink = Prisma.ShareLinkModel
/**
* Model WatermarkConfig
*
*
*/
export type WatermarkConfig = Prisma.WatermarkConfigModel
/**
* Model WatermarkTemplate
*
*
*/
export type WatermarkTemplate = Prisma.WatermarkTemplateModel
/**
* Model WatermarkFile
*
*
*/
export type WatermarkFile = Prisma.WatermarkFileModel
/**
* Model Asset
*
*
*/
export type Asset = Prisma.AssetModel
/**
* Model StorageKey
*
*
*/
export type StorageKey = Prisma.StorageKeyModel
/**
* Model AssetMetadataValue
*
*
*/
export type AssetMetadataValue = Prisma.AssetMetadataValueModel
/**
* Model AssetAgentMd
*
*
*/
export type AssetAgentMd = Prisma.AssetAgentMdModel
/**
* Model AssetComment
*
*
*/
export type AssetComment = Prisma.AssetCommentModel
/**
* Model AssetCommentAttachment
*
*
*/
export type AssetCommentAttachment = Prisma.AssetCommentAttachmentModel
/**
* Model AssetCommentReaction
*
*
*/
export type AssetCommentReaction = Prisma.AssetCommentReactionModel
/**
* Model AssetEmbedding
*
*
*/
export type AssetEmbedding = Prisma.AssetEmbeddingModel
/**
* Model Invite
*
*
*/
export type Invite = Prisma.InviteModel
/**
* Model MetadataField
*
*
*/
export type MetadataField = Prisma.MetadataFieldModel
/**
* Model Notification
*
*
*/
export type Notification = Prisma.NotificationModel
/**
* Model SystemSettings
*
*
*/
export type SystemSettings = Prisma.SystemSettingsModel
/**
* Model Task
*
*
*/
export type Task = Prisma.TaskModel
/**
* Model WorkflowTask
*
*
*/
export type WorkflowTask = Prisma.WorkflowTaskModel
/**
* Model Agent
*
*
*/
export type Agent = Prisma.AgentModel
/**
* Model AgentSkill
*
*
*/
export type AgentSkill = Prisma.AgentSkillModel
/**
* Model McpServer
*
*
*/
export type McpServer = Prisma.McpServerModel
/**
* Model AgentMcpServer
*
*
*/
export type AgentMcpServer = Prisma.AgentMcpServerModel
/**
* Model McpServerCredential
*
*
*/
export type McpServerCredential = Prisma.McpServerCredentialModel
/**
* Model AgentSession
*
*
*/
export type AgentSession = Prisma.AgentSessionModel
/**
* Model AgentSessionCommit
*
*/
export type AgentSessionCommit = Prisma.AgentSessionCommitModel
/**
* Model AgentSessionEntry
*
*
*/
export type AgentSessionEntry = Prisma.AgentSessionEntryModel
/**
* Model UserMetadata
*
*
*/
export type UserMetadata = Prisma.UserMetadataModel
/**
* Model Model
*
*
*/
export type Model = Prisma.ModelModel
/**
* Model Provider
*
*
*/
export type Provider = Prisma.ProviderModel
/**
* Model Collection
*
*
*/
export type Collection = Prisma.CollectionModel
/**
* Model ApiToken
*
*
*/
export type ApiToken = Prisma.ApiTokenModel
/**
* Model AiUsage
*
*
*/
export type AiUsage = Prisma.AiUsageModel
/**
* Model AuditLog
*
*
*/
export type AuditLog = Prisma.AuditLogModel
/**
* Model QuotaRule
*
*
*/
export type QuotaRule = Prisma.QuotaRuleModel
/**
* Model QuotaRecord
*
*
*/
export type QuotaRecord = Prisma.QuotaRecordModel
/**
* Model KanbanGoal
*
*
*/
export type KanbanGoal = Prisma.KanbanGoalModel
/**
* Model KanbanTask
*
*
*/
export type KanbanTask = Prisma.KanbanTaskModel
/**
* Model KanbanTaskLink
*
*
*/
export type KanbanTaskLink = Prisma.KanbanTaskLinkModel
/**
* Model KanbanTaskAsset
*
*
*/
export type KanbanTaskAsset = Prisma.KanbanTaskAssetModel
/**
* Model KanbanTaskComment
*
*
*/
export type KanbanTaskComment = Prisma.KanbanTaskCommentModel
/**
* Model KanbanTaskEvent
*
*
*/
export type KanbanTaskEvent = Prisma.KanbanTaskEventModel
/**
* Model RecentFileItem
*
*
*/
export type RecentFileItem = Prisma.RecentFileItemModel
/**
* Model Jwks
*
*
*/
export type Jwks = Prisma.JwksModel
/**
* Model OauthClient
*
*
*/
export type OauthClient = Prisma.OauthClientModel
/**
* Model OauthResource
*
*
*/
export type OauthResource = Prisma.OauthResourceModel
/**
* Model OauthClientResource
*
*
*/
export type OauthClientResource = Prisma.OauthClientResourceModel
/**
* Model OauthRefreshToken
*
*
*/
export type OauthRefreshToken = Prisma.OauthRefreshTokenModel
/**
* Model OauthAccessToken
*
*
*/
export type OauthAccessToken = Prisma.OauthAccessTokenModel
/**
* Model OauthConsent
*
*
*/
export type OauthConsent = Prisma.OauthConsentModel
/**
* Model OauthClientAssertion
*
*
*/
export type OauthClientAssertion = Prisma.OauthClientAssertionModel