mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-24 22:49:30 +00:00
feat(agent): propagate autofill context from chat to autofill workflow
Add an optional 'context' parameter to the create_file and create_version agent tools so the chat agent can pass generation/source context (e.g. 'Generated using gemini') to the AI metadata autofill workflow. - Add Asset.autofillContext column, persisted in the same transaction as asset creation when context is provided - Add new list_autofill_fields agent tool exposing autofillable metadata fields (name, type, description, options) per project - Autofill workflow reads the stored context and includes it in the autofill AI prompt - Add short chat system-prompt guidance to use list_autofill_fields and pass <=50 word context when creating files/versions
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
updateCommentActivity,
|
||||
getAgentChatContextActivity,
|
||||
getAgentAutofillContextActivity,
|
||||
getAssetAutofillContextActivity,
|
||||
getAssetActivity,
|
||||
getCommentActivity,
|
||||
getProjectAutofillFieldsActivity,
|
||||
@@ -458,6 +459,106 @@ describe('Agent Activities', () => {
|
||||
expect(res.text).toBe('{"f1":"val"}')
|
||||
expect(res.usage.inputTokens).toBe(5)
|
||||
})
|
||||
|
||||
it('should include agentContext in the autofill prompt when provided', async () => {
|
||||
const mockHarness = {
|
||||
subscribe: vi.fn(),
|
||||
prompt: vi.fn().mockResolvedValue({
|
||||
content: [{ type: 'text', text: 'Captured' }],
|
||||
usage: { input: 5, output: 5 },
|
||||
}),
|
||||
}
|
||||
const mockSession = {
|
||||
getEntries: vi.fn().mockResolvedValue([]),
|
||||
getStorage: vi.fn().mockReturnValue({ sessionId: 'mock-session-id' }),
|
||||
}
|
||||
|
||||
vi.mocked(piAgent.createAgentSession).mockImplementation(async (config: unknown) => {
|
||||
const params = config as {
|
||||
customTools: Array<{
|
||||
name: string
|
||||
execute: (id: string, args: Record<string, unknown>) => Promise<unknown>
|
||||
}>
|
||||
}
|
||||
const tool = params.customTools.find((t) => t.name === 'autofill_metadata')
|
||||
if (tool) {
|
||||
await tool.execute('1', { f1: 'val' })
|
||||
}
|
||||
return {
|
||||
session: mockSession as unknown as Session<DatabaseSessionMetadata>,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Mock AgentHarness instance for activity test
|
||||
harness: mockHarness as unknown as AgentHarness<any, any, any, any>,
|
||||
}
|
||||
})
|
||||
|
||||
const context = {
|
||||
agent: { id: 'b1', provider: { name: 'google' }, modelRef: { modelId: 'gemini' } },
|
||||
dbProviders: [],
|
||||
teamSkills: [],
|
||||
allowedDomains: [],
|
||||
} as unknown as AgentExecutionContext
|
||||
|
||||
await autofillAiActivity({
|
||||
teamId: 't1',
|
||||
images: [],
|
||||
fields: [{ id: 'f1', config: { name: 'F1', type: 'text' } }],
|
||||
context,
|
||||
agentContext: 'Generated using gemini',
|
||||
})
|
||||
|
||||
const capturedPrompt = mockHarness.prompt.mock.calls[0]?.[0] ?? ''
|
||||
expect(capturedPrompt).toContain('Generated using gemini')
|
||||
expect(capturedPrompt).toContain('<context>')
|
||||
})
|
||||
|
||||
it('should not include agentContext in the autofill prompt when absent', async () => {
|
||||
const mockHarness = {
|
||||
subscribe: vi.fn(),
|
||||
prompt: vi.fn().mockResolvedValue({
|
||||
content: [{ type: 'text', text: 'Captured' }],
|
||||
usage: { input: 5, output: 5 },
|
||||
}),
|
||||
}
|
||||
const mockSession = {
|
||||
getEntries: vi.fn().mockResolvedValue([]),
|
||||
getStorage: vi.fn().mockReturnValue({ sessionId: 'mock-session-id' }),
|
||||
}
|
||||
|
||||
vi.mocked(piAgent.createAgentSession).mockImplementation(async (config: unknown) => {
|
||||
const params = config as {
|
||||
customTools: Array<{
|
||||
name: string
|
||||
execute: (id: string, args: Record<string, unknown>) => Promise<unknown>
|
||||
}>
|
||||
}
|
||||
const tool = params.customTools.find((t) => t.name === 'autofill_metadata')
|
||||
if (tool) {
|
||||
await tool.execute('1', { f1: 'val' })
|
||||
}
|
||||
return {
|
||||
session: mockSession as unknown as Session<DatabaseSessionMetadata>,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Mock AgentHarness instance for activity test
|
||||
harness: mockHarness as unknown as AgentHarness<any, any, any, any>,
|
||||
}
|
||||
})
|
||||
|
||||
const context = {
|
||||
agent: { id: 'b1', provider: { name: 'google' }, modelRef: { modelId: 'gemini' } },
|
||||
dbProviders: [],
|
||||
teamSkills: [],
|
||||
allowedDomains: [],
|
||||
} as unknown as AgentExecutionContext
|
||||
|
||||
await autofillAiActivity({
|
||||
teamId: 't1',
|
||||
images: [],
|
||||
fields: [{ id: 'f1', config: { name: 'F1', type: 'text' } }],
|
||||
context,
|
||||
})
|
||||
|
||||
const capturedPrompt = mockHarness.prompt.mock.calls[0]?.[0] ?? ''
|
||||
expect(capturedPrompt).not.toContain('<context>')
|
||||
})
|
||||
})
|
||||
|
||||
describe('Agent Database Activities Integration', () => {
|
||||
@@ -1163,6 +1264,37 @@ describe('Agent Database Activities Integration', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('getAssetAutofillContextActivity', () => {
|
||||
it('should return the stored autofill context for an asset', async () => {
|
||||
const withContext = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'ctx.png',
|
||||
type: AssetType.file,
|
||||
status: AssetStatus.uploaded,
|
||||
projectId: project.id,
|
||||
autofillContext: 'Generated using gemini',
|
||||
},
|
||||
})
|
||||
|
||||
const ctx = await getAssetAutofillContextActivity(withContext.id)
|
||||
expect(ctx).toBe('Generated using gemini')
|
||||
})
|
||||
|
||||
it('should return null when the asset has no autofill context', async () => {
|
||||
const noContext = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'plain.png',
|
||||
type: AssetType.file,
|
||||
status: AssetStatus.uploaded,
|
||||
projectId: project.id,
|
||||
},
|
||||
})
|
||||
|
||||
const ctx = await getAssetAutofillContextActivity(noContext.id)
|
||||
expect(ctx).toBeNull()
|
||||
})
|
||||
})
|
||||
|
||||
describe('executeAgentToolActivity', () => {
|
||||
beforeEach(() => {
|
||||
vi.spyOn(authzService, 'hasPermission').mockResolvedValue()
|
||||
@@ -1273,6 +1405,65 @@ describe('Agent Database Activities Integration', () => {
|
||||
expect(Number(parentFolder?.sizeByte)).toBe(500)
|
||||
expect(uploadService.triggerPostUploadWorkflows).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should persist autofillContext on the created file when context is provided', async () => {
|
||||
const folder = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'WorkspaceFolder',
|
||||
type: AssetType.folder,
|
||||
status: AssetStatus.uploaded,
|
||||
projectId: project.id,
|
||||
fileCount: 0,
|
||||
sizeByte: 0,
|
||||
},
|
||||
})
|
||||
|
||||
const res = await executeAgentToolActivity({
|
||||
taskId: 'task-1',
|
||||
toolName: 'create_file',
|
||||
args: {
|
||||
parent: folder.id,
|
||||
s3Key: 'uploads/ctx.txt',
|
||||
name: 'ctx.txt',
|
||||
size: 100,
|
||||
contentType: 'text/plain',
|
||||
context: 'Generated using gemini',
|
||||
},
|
||||
userId: user.id,
|
||||
})
|
||||
|
||||
const created = await prisma.asset.findUnique({ where: { id: res.id } })
|
||||
expect(created?.autofillContext).toBe('Generated using gemini')
|
||||
})
|
||||
|
||||
it('should not set autofillContext when context is not provided', async () => {
|
||||
const folder = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'WorkspaceFolder',
|
||||
type: AssetType.folder,
|
||||
status: AssetStatus.uploaded,
|
||||
projectId: project.id,
|
||||
fileCount: 0,
|
||||
sizeByte: 0,
|
||||
},
|
||||
})
|
||||
|
||||
const res = await executeAgentToolActivity({
|
||||
taskId: 'task-1',
|
||||
toolName: 'create_file',
|
||||
args: {
|
||||
parent: folder.id,
|
||||
s3Key: 'uploads/plain.txt',
|
||||
name: 'plain.txt',
|
||||
size: 100,
|
||||
contentType: 'text/plain',
|
||||
},
|
||||
userId: user.id,
|
||||
})
|
||||
|
||||
const created = await prisma.asset.findUnique({ where: { id: res.id } })
|
||||
expect(created?.autofillContext).toBeNull()
|
||||
})
|
||||
})
|
||||
|
||||
describe('create_version', () => {
|
||||
@@ -1381,6 +1572,220 @@ describe('Agent Database Activities Integration', () => {
|
||||
expect(updatedStack?.fileCount).toBe(2)
|
||||
expect(Number(updatedStack?.sizeByte)).toBe(350)
|
||||
})
|
||||
|
||||
it('should persist autofillContext when creating a new version stack', async () => {
|
||||
const folder = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'WorkspaceFolder',
|
||||
type: AssetType.folder,
|
||||
status: AssetStatus.uploaded,
|
||||
projectId: project.id,
|
||||
fileCount: 1,
|
||||
sizeByte: 200,
|
||||
},
|
||||
})
|
||||
|
||||
const fileAsset = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'v1.txt',
|
||||
type: AssetType.file,
|
||||
status: AssetStatus.uploaded,
|
||||
projectId: project.id,
|
||||
parentId: folder.id,
|
||||
sizeByte: 200,
|
||||
},
|
||||
})
|
||||
|
||||
const res = await executeAgentToolActivity({
|
||||
taskId: 'task-1',
|
||||
toolName: 'create_version',
|
||||
args: {
|
||||
parent: fileAsset.id,
|
||||
s3Key: 'uploads/v2.txt',
|
||||
name: 'v2.txt',
|
||||
size: 300,
|
||||
contentType: 'text/plain',
|
||||
context: 'Generated using seedance',
|
||||
},
|
||||
userId: user.id,
|
||||
})
|
||||
|
||||
const created = await prisma.asset.findUnique({ where: { id: res.id } })
|
||||
expect(created?.autofillContext).toBe('Generated using seedance')
|
||||
})
|
||||
|
||||
it('should persist autofillContext when adding to an existing version stack', async () => {
|
||||
const folder = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'WorkspaceFolder',
|
||||
type: AssetType.folder,
|
||||
status: AssetStatus.uploaded,
|
||||
projectId: project.id,
|
||||
},
|
||||
})
|
||||
|
||||
const stack = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'VersionStack',
|
||||
type: AssetType.version_stack,
|
||||
status: AssetStatus.uploaded,
|
||||
projectId: project.id,
|
||||
parentId: folder.id,
|
||||
fileCount: 1,
|
||||
sizeByte: 100,
|
||||
},
|
||||
})
|
||||
|
||||
const existingFileVersion = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'v1.txt',
|
||||
type: AssetType.file,
|
||||
status: AssetStatus.uploaded,
|
||||
projectId: project.id,
|
||||
parentId: stack.id,
|
||||
sizeByte: 100,
|
||||
},
|
||||
})
|
||||
|
||||
const res = await executeAgentToolActivity({
|
||||
taskId: 'task-1',
|
||||
toolName: 'create_version',
|
||||
args: {
|
||||
parent: existingFileVersion.id,
|
||||
s3Key: 'uploads/v2.txt',
|
||||
name: 'v2.txt',
|
||||
size: 250,
|
||||
contentType: 'text/plain',
|
||||
context: 'Generated using sora2',
|
||||
},
|
||||
userId: user.id,
|
||||
})
|
||||
|
||||
const created = await prisma.asset.findUnique({ where: { id: res.id } })
|
||||
expect(created?.autofillContext).toBe('Generated using sora2')
|
||||
})
|
||||
})
|
||||
|
||||
describe('list_autofill_fields', () => {
|
||||
it('should return only aiAutofill fields with their options', async () => {
|
||||
const folder = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'WorkspaceFolder',
|
||||
type: AssetType.folder,
|
||||
status: AssetStatus.uploaded,
|
||||
projectId: project.id,
|
||||
},
|
||||
})
|
||||
|
||||
await prisma.metadataField.create({
|
||||
data: {
|
||||
key: 'source',
|
||||
scope: 'PROJECT',
|
||||
projectId: project.id,
|
||||
teamId: team.id,
|
||||
aiAutofill: true,
|
||||
config: {
|
||||
name: 'Source',
|
||||
type: 'select',
|
||||
select: {
|
||||
options: [
|
||||
{ id: 'gemini', displayName: 'Gemini', color: '#ffffff' },
|
||||
{ id: 'seedance', displayName: 'Seedance', color: '#ffffff' },
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'Generation source',
|
||||
},
|
||||
})
|
||||
await prisma.metadataField.create({
|
||||
data: {
|
||||
key: 'title',
|
||||
scope: 'PROJECT',
|
||||
projectId: project.id,
|
||||
teamId: team.id,
|
||||
aiAutofill: true,
|
||||
config: { name: 'Title', type: 'text' },
|
||||
},
|
||||
})
|
||||
await prisma.metadataField.create({
|
||||
data: {
|
||||
key: 'manual_notes',
|
||||
scope: 'PROJECT',
|
||||
projectId: project.id,
|
||||
teamId: team.id,
|
||||
aiAutofill: false,
|
||||
config: { name: 'Manual Notes', type: 'text' },
|
||||
},
|
||||
})
|
||||
|
||||
const res = await executeAgentToolActivity({
|
||||
taskId: 'task-1',
|
||||
toolName: 'list_autofill_fields',
|
||||
args: { parent: folder.id },
|
||||
userId: user.id,
|
||||
})
|
||||
|
||||
expect(res.fields).toHaveLength(2)
|
||||
const source = res.fields.find((f: { id: string }) => f.id === 'source')
|
||||
expect(source?.name).toBe('Source')
|
||||
expect(source?.type).toBe('select')
|
||||
expect(source?.description).toBe('Generation source')
|
||||
expect(source?.options).toEqual([
|
||||
{ id: 'gemini', displayName: 'Gemini', color: '#ffffff' },
|
||||
{ id: 'seedance', displayName: 'Seedance', color: '#ffffff' },
|
||||
])
|
||||
expect(res.fields.find((f: { id: string }) => f.id === 'manual_notes')).toBeUndefined()
|
||||
})
|
||||
|
||||
it('should resolve the project through the ancestor chain', async () => {
|
||||
const rootFolder = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'Root',
|
||||
type: AssetType.folder,
|
||||
status: AssetStatus.uploaded,
|
||||
projectId: project.id,
|
||||
},
|
||||
})
|
||||
const subFolder = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'Sub',
|
||||
type: AssetType.folder,
|
||||
status: AssetStatus.uploaded,
|
||||
parentId: rootFolder.id,
|
||||
},
|
||||
})
|
||||
|
||||
await prisma.metadataField.create({
|
||||
data: {
|
||||
key: 'title_2',
|
||||
scope: 'PROJECT',
|
||||
projectId: project.id,
|
||||
teamId: team.id,
|
||||
aiAutofill: true,
|
||||
config: { name: 'Title 2', type: 'text' },
|
||||
},
|
||||
})
|
||||
|
||||
const res = await executeAgentToolActivity({
|
||||
taskId: 'task-1',
|
||||
toolName: 'list_autofill_fields',
|
||||
args: { parent: subFolder.id },
|
||||
userId: user.id,
|
||||
})
|
||||
|
||||
expect(res.fields.length).toBeGreaterThan(0)
|
||||
})
|
||||
|
||||
it('should fail when parent is missing', async () => {
|
||||
await expect(
|
||||
executeAgentToolActivity({
|
||||
taskId: 'task-1',
|
||||
toolName: 'list_autofill_fields',
|
||||
args: {},
|
||||
userId: user.id,
|
||||
}),
|
||||
).rejects.toThrow('parent parameter is required')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -94,7 +94,9 @@ shumai is a professional creative collaboration platform similar to frame.io, wh
|
||||
|
||||
shumai has its own cloud file system. If a user asks you to perform file system operations (for example: creating a folder, creating a file, stacking a version, or listing assets), you MUST use the corresponding agent system tools (e.g., 'create_folder', 'create_file', 'create_version', 'list_assets'). Before calling 'create_folder', first check if the folder exists using 'list_assets'. Do NOT use local bash commands or the local bash tool to perform these operations locally on the host environment; all operations must be executed through the platform's cloud file system tools so they are correctly registered and visible within the platform.
|
||||
|
||||
If you need to create files in the local filesystem (for example, a temporary file for uploading), only the '.pi' folder in the current directory has write permissions. Do NOT attempt to create files in any other directories.`
|
||||
If you need to create files in the local filesystem (for example, a temporary file for uploading), only the '.pi' folder in the current directory has write permissions. Do NOT attempt to create files in any other directories.
|
||||
|
||||
Before creating a file or version, use 'list_autofill_fields' to check the project's AI-autofillable metadata fields. If relevant, pass a short, simple context (max 50 words) about the file's source or how it was generated via the 'context' parameter of 'create_file' or 'create_version'.`
|
||||
|
||||
if (agent.soul) {
|
||||
systemPrompt = `${systemPrompt}\n\nAgent Personality and Core Instructions:\n${agent.soul}`
|
||||
@@ -404,10 +406,17 @@ export interface AutofillAiParams {
|
||||
images: string[]
|
||||
fields: AutofillField[]
|
||||
context: AgentExecutionContext
|
||||
agentContext?: string
|
||||
}
|
||||
|
||||
export async function autofillAiActivity(params: AutofillAiParams) {
|
||||
const prompt = 'Analyze the provided images and extract metadata.'
|
||||
let prompt = 'Analyze the provided images and extract metadata.'
|
||||
if (params.agentContext && params.agentContext.trim()) {
|
||||
prompt +=
|
||||
'\n\nAdditional context about this file, provided during creation:\n' +
|
||||
`<context>\n${params.agentContext.trim()}\n</context>\n` +
|
||||
'Use this context to inform your answers, especially for fields that cannot be determined from the images alone (e.g. generation model/source).'
|
||||
}
|
||||
const toolSchema = fieldsToTypeBoxSchema(params.fields)
|
||||
let capturedData: Record<string, unknown> | null = null
|
||||
|
||||
@@ -997,6 +1006,14 @@ export async function getProjectAutofillFieldsActivity(projectId: string) {
|
||||
return fields.filter((f) => f.field.aiAutofill).map((f) => f.field)
|
||||
}
|
||||
|
||||
export async function getAssetAutofillContextActivity(assetId: string): Promise<string | null> {
|
||||
const asset = await prisma.asset.findUnique({
|
||||
where: { id: assetId },
|
||||
select: { autofillContext: true },
|
||||
})
|
||||
return asset?.autofillContext ?? null
|
||||
}
|
||||
|
||||
export async function updateAssetMetadataActivity(params: {
|
||||
assetId: string
|
||||
metadata: UpdateAssetMetadataRequest[]
|
||||
@@ -1170,6 +1187,7 @@ export async function executeAgentToolActivity(params: ExecuteAgentToolParams):
|
||||
const name = args.name as string
|
||||
const fileSize = args.size as number
|
||||
const mimeType = args.contentType as string
|
||||
const context = typeof args.context === 'string' ? args.context : undefined
|
||||
if (!parent || !s3Key || !name || fileSize === undefined || !mimeType) {
|
||||
throw ApplicationFailure.create({
|
||||
message: 'parent, s3Key, name, size, and contentType parameters are required',
|
||||
@@ -1219,6 +1237,14 @@ export async function executeAgentToolActivity(params: ExecuteAgentToolParams):
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
await assetService.updateAncestorsSize(tx as any, parent, fileSize)
|
||||
|
||||
// Persist autofill context provided by the agent (used by the autofill workflow)
|
||||
if (context) {
|
||||
await tx.asset.update({
|
||||
where: { id: newFile.id },
|
||||
data: { autofillContext: context },
|
||||
})
|
||||
}
|
||||
|
||||
// Trigger post-upload transcode and AI workflows
|
||||
await uploadService.triggerPostUploadWorkflows(
|
||||
tx,
|
||||
@@ -1242,6 +1268,7 @@ export async function executeAgentToolActivity(params: ExecuteAgentToolParams):
|
||||
const name = args.name as string
|
||||
const fileSize = args.size as number
|
||||
const mimeType = args.contentType as string
|
||||
const context = typeof args.context === 'string' ? args.context : undefined
|
||||
if (!parent || !s3Key || !name || fileSize === undefined || !mimeType) {
|
||||
throw ApplicationFailure.create({
|
||||
message: 'parent, s3Key, name, size, and contentType parameters are required',
|
||||
@@ -1306,6 +1333,13 @@ export async function executeAgentToolActivity(params: ExecuteAgentToolParams):
|
||||
where: { id: newFile.id },
|
||||
data: { sortIndex: newSortIndex },
|
||||
})
|
||||
// Persist autofill context provided by the agent (used by the autofill workflow)
|
||||
if (context) {
|
||||
await tx.asset.update({
|
||||
where: { id: newFile.id },
|
||||
data: { autofillContext: context },
|
||||
})
|
||||
}
|
||||
// Increment stack's size (fileCount is incremented by createAsset already)
|
||||
const updatedStack = await tx.asset.update({
|
||||
where: { id: stackId },
|
||||
@@ -1364,6 +1398,13 @@ export async function executeAgentToolActivity(params: ExecuteAgentToolParams):
|
||||
projectId: parentFile.projectId!,
|
||||
creatorId: userId,
|
||||
})
|
||||
// Persist autofill context provided by the agent (used by the autofill workflow)
|
||||
if (context) {
|
||||
await tx.asset.update({
|
||||
where: { id: newFile.id },
|
||||
data: { autofillContext: context },
|
||||
})
|
||||
}
|
||||
// Update ancestors' size (add size of the new file version)
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
await assetService.updateAncestorsSize(tx as any, folderParentId!, fileSize)
|
||||
@@ -1386,6 +1427,46 @@ export async function executeAgentToolActivity(params: ExecuteAgentToolParams):
|
||||
}
|
||||
}
|
||||
|
||||
case 'list_autofill_fields': {
|
||||
const parent = args.parent
|
||||
if (!parent) {
|
||||
throw ApplicationFailure.create({
|
||||
message: 'parent parameter is required',
|
||||
nonRetryable: true,
|
||||
})
|
||||
}
|
||||
|
||||
// Authz check
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.Asset,
|
||||
id: parent,
|
||||
})
|
||||
|
||||
// Resolve projectId from the parent asset (climb ancestor chain if needed)
|
||||
const projectId = await resolveAssetProjectId(parent)
|
||||
if (!projectId) {
|
||||
throw ApplicationFailure.create({
|
||||
message: `Could not resolve project for parent: ${parent}`,
|
||||
nonRetryable: true,
|
||||
})
|
||||
}
|
||||
|
||||
const fields = await metadataService.listProjectFields(userId, projectId)
|
||||
const autofillFields = fields
|
||||
.filter((f) => f.field.aiAutofill)
|
||||
.map((f) => ({
|
||||
id: f.field.key,
|
||||
name: f.field.config?.name,
|
||||
type: f.field.config?.type,
|
||||
description: f.field.description,
|
||||
options: f.field.config?.select?.options ?? f.field.config?.selectMulti?.options ?? [],
|
||||
}))
|
||||
|
||||
return { fields: autofillFields }
|
||||
}
|
||||
|
||||
default:
|
||||
throw ApplicationFailure.create({
|
||||
message: `Unsupported tool name: ${toolName}`,
|
||||
@@ -1394,6 +1475,21 @@ export async function executeAgentToolActivity(params: ExecuteAgentToolParams):
|
||||
}
|
||||
}
|
||||
|
||||
async function resolveAssetProjectId(assetId: string): Promise<string | null> {
|
||||
let currentId: string | null = assetId
|
||||
while (currentId) {
|
||||
/* prettier-ignore */
|
||||
const assetNode = (await prisma.asset.findUnique({
|
||||
where: { id: currentId },
|
||||
select: { id: true, projectId: true, parentId: true },
|
||||
})) as { id: string; projectId: string | null; parentId: string | null } | null
|
||||
if (!assetNode) break
|
||||
if (assetNode.projectId) return assetNode.projectId
|
||||
currentId = assetNode.parentId
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
export interface GenerateSessionNameParams {
|
||||
teamId: string
|
||||
agentId: string
|
||||
|
||||
@@ -17,6 +17,7 @@ import * as path from 'path'
|
||||
import { DatabaseSessionStorage } from './database-session-storage'
|
||||
import { createAnalyzeImageTool } from './tools/analyze-image'
|
||||
import { createCreateFileTool } from './tools/create-file'
|
||||
import { createListAutofillFieldsTool } from './tools/list-autofill-fields'
|
||||
import { createCreateFolderTool } from './tools/create-folder'
|
||||
import { createCreateVersionTool } from './tools/create-version'
|
||||
import { createDownloadAssetTool } from './tools/download-asset'
|
||||
@@ -322,6 +323,7 @@ export async function createAgentSession(params: CreateAgentSessionParams) {
|
||||
createCreateFileTool(userId),
|
||||
createCreateVersionTool(userId),
|
||||
createDownloadAssetTool(userId),
|
||||
createListAutofillFieldsTool(userId),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,33 @@ describe('createCreateFileTool', () => {
|
||||
expect(result.details).toEqual({ id: 'file-1', name: 'test', type: 'file' })
|
||||
})
|
||||
|
||||
it('should forward the optional context to the agent tool workflow when provided', async () => {
|
||||
const filePath = createTempFile('# Hello from disk', 'create-file-context.md')
|
||||
|
||||
const tool = createCreateFileTool('user-1')
|
||||
await tool.execute('call-1', {
|
||||
parent: 'folder-1',
|
||||
path: filePath,
|
||||
context: 'Generated using gemini',
|
||||
})
|
||||
|
||||
expect(executeAgentToolWorkflow).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
args: expect.objectContaining({ context: 'Generated using gemini' }),
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
it('should not include context in args when not provided', async () => {
|
||||
const filePath = createTempFile('# Hello from disk', 'create-file-no-context.md')
|
||||
|
||||
const tool = createCreateFileTool('user-1')
|
||||
await tool.execute('call-1', { parent: 'folder-1', path: filePath })
|
||||
|
||||
const callArgs = vi.mocked(executeAgentToolWorkflow).mock.calls[0][0].args
|
||||
expect(callArgs).not.toHaveProperty('context')
|
||||
})
|
||||
|
||||
it('should throw when the local file does not exist', async () => {
|
||||
const tool = createCreateFileTool('user-1')
|
||||
await expect(
|
||||
|
||||
@@ -30,6 +30,14 @@ const createFileSchema = Type.Object({
|
||||
}),
|
||||
}),
|
||||
),
|
||||
context: Type.Optional(
|
||||
Type.String({
|
||||
description:
|
||||
'Optional short context about this file and how it was generated (max 50 words, e.g. "Generated using gemini"). ' +
|
||||
'Passed to the AI metadata autofill workflow to fill fields that cannot be determined from file content alone. ' +
|
||||
'Check autofillable fields with list_autofill_fields first.',
|
||||
}),
|
||||
),
|
||||
})
|
||||
|
||||
function assertExactlyOneSource(params: {
|
||||
@@ -92,6 +100,7 @@ export function createCreateFileTool(userId: string): AgentTool<typeof createFil
|
||||
name,
|
||||
size,
|
||||
contentType: mimeType,
|
||||
...(params.context ? { context: params.context } : {}),
|
||||
},
|
||||
userId,
|
||||
assetId: params.parent,
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
|
||||
import { createCreateVersionTool } from './create-version'
|
||||
import { s3Service } from '@shumai/core/src/s3/s3'
|
||||
import { executeAgentToolWorkflow } from './utils'
|
||||
import * as fs from 'fs'
|
||||
import * as os from 'os'
|
||||
import * as path from 'path'
|
||||
|
||||
vi.mock('@shumai/core/src/s3/s3', () => ({
|
||||
s3Service: {
|
||||
uploadFileToKey: vi.fn(),
|
||||
},
|
||||
}))
|
||||
|
||||
vi.mock('./utils', () => ({
|
||||
executeAgentToolWorkflow: vi.fn().mockResolvedValue({ id: 'file-1', name: 'v2', type: 'file' }),
|
||||
}))
|
||||
|
||||
describe('createCreateVersionTool', () => {
|
||||
const createdFiles: string[] = []
|
||||
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
for (const f of createdFiles) {
|
||||
if (fs.existsSync(f)) {
|
||||
fs.unlinkSync(f)
|
||||
}
|
||||
}
|
||||
createdFiles.length = 0
|
||||
})
|
||||
|
||||
const createTempFile = (content: string | Buffer, filename: string): string => {
|
||||
const filePath = path.join(os.tmpdir(), filename)
|
||||
fs.writeFileSync(filePath, content)
|
||||
createdFiles.push(filePath)
|
||||
return filePath
|
||||
}
|
||||
|
||||
it('should upload a local file and create a version via the agent tool workflow', async () => {
|
||||
const filePath = createTempFile('# Hello from disk', 'create-version-test.md')
|
||||
|
||||
const tool = createCreateVersionTool('user-1')
|
||||
const result = await tool.execute('call-1', { parent: 'file-1', path: filePath })
|
||||
|
||||
expect(s3Service.uploadFileToKey).toHaveBeenCalledTimes(1)
|
||||
const uploadArgs = vi.mocked(s3Service.uploadFileToKey).mock.calls[0]
|
||||
const s3Key = uploadArgs[1]
|
||||
expect(s3Key).toMatch(/^files\/.+\.md$/)
|
||||
expect(uploadArgs[2]).toBe('text/markdown')
|
||||
|
||||
expect(executeAgentToolWorkflow).toHaveBeenCalledWith({
|
||||
toolName: 'create_version',
|
||||
args: {
|
||||
parent: 'file-1',
|
||||
s3Key,
|
||||
name: 'create-version-test.md',
|
||||
size: Buffer.byteLength('# Hello from disk', 'utf-8'),
|
||||
contentType: 'text/markdown',
|
||||
},
|
||||
userId: 'user-1',
|
||||
assetId: 'file-1',
|
||||
})
|
||||
|
||||
expect(result.details).toEqual({ id: 'file-1', name: 'v2', type: 'file' })
|
||||
})
|
||||
|
||||
it('should forward the optional context to the agent tool workflow when provided', async () => {
|
||||
const filePath = createTempFile('# Hello from disk', 'create-version-context.md')
|
||||
|
||||
const tool = createCreateVersionTool('user-1')
|
||||
await tool.execute('call-1', {
|
||||
parent: 'file-1',
|
||||
path: filePath,
|
||||
context: 'Generated using gemini',
|
||||
})
|
||||
|
||||
expect(executeAgentToolWorkflow).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
args: expect.objectContaining({ context: 'Generated using gemini' }),
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
it('should not include context in args when not provided', async () => {
|
||||
const filePath = createTempFile('# Hello from disk', 'create-version-no-context.md')
|
||||
|
||||
const tool = createCreateVersionTool('user-1')
|
||||
await tool.execute('call-1', { parent: 'file-1', path: filePath })
|
||||
|
||||
const callArgs = vi.mocked(executeAgentToolWorkflow).mock.calls[0][0].args
|
||||
expect(callArgs).not.toHaveProperty('context')
|
||||
})
|
||||
|
||||
it('should throw when the local file does not exist', async () => {
|
||||
const tool = createCreateVersionTool('user-1')
|
||||
await expect(
|
||||
tool.execute('call-1', { parent: 'file-1', path: '/nonexistent/file.md' }),
|
||||
).rejects.toThrow('Local file not found at path: /nonexistent/file.md')
|
||||
expect(s3Service.uploadFileToKey).not.toHaveBeenCalled()
|
||||
expect(executeAgentToolWorkflow).not.toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
@@ -17,6 +17,14 @@ const createVersionSchema = Type.Object({
|
||||
description:
|
||||
'The absolute or relative local path to the file on disk. This parameter is required.',
|
||||
}),
|
||||
context: Type.Optional(
|
||||
Type.String({
|
||||
description:
|
||||
'Optional short context about this version and how it was generated (max 50 words, e.g. "Generated using gemini"). ' +
|
||||
'Passed to the AI metadata autofill workflow to fill fields that cannot be determined from file content alone. ' +
|
||||
'Check autofillable fields with list_autofill_fields first.',
|
||||
}),
|
||||
),
|
||||
})
|
||||
|
||||
export function createCreateVersionTool(userId: string): AgentTool<typeof createVersionSchema> {
|
||||
@@ -46,6 +54,7 @@ export function createCreateVersionTool(userId: string): AgentTool<typeof create
|
||||
name: path.basename(absolutePath),
|
||||
size: fileSize,
|
||||
contentType: mimeType,
|
||||
...(params.context ? { context: params.context } : {}),
|
||||
},
|
||||
userId,
|
||||
assetId: params.parent,
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
||||
import { createListAutofillFieldsTool } from './list-autofill-fields'
|
||||
import { executeAgentToolWorkflow } from './utils'
|
||||
|
||||
vi.mock('./utils', () => ({
|
||||
executeAgentToolWorkflow: vi.fn().mockResolvedValue({
|
||||
fields: [{ id: 'source', name: 'Source', type: 'select', options: [] }],
|
||||
}),
|
||||
}))
|
||||
|
||||
describe('createListAutofillFieldsTool', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
})
|
||||
|
||||
it('should list autofill fields for the parent folder via the agent tool workflow', async () => {
|
||||
const tool = createListAutofillFieldsTool('user-1')
|
||||
const result = await tool.execute('call-1', { parent: 'folder-1' })
|
||||
|
||||
expect(executeAgentToolWorkflow).toHaveBeenCalledWith({
|
||||
toolName: 'list_autofill_fields',
|
||||
args: { parent: 'folder-1' },
|
||||
userId: 'user-1',
|
||||
assetId: 'folder-1',
|
||||
})
|
||||
|
||||
expect(result.details).toEqual({
|
||||
fields: [{ id: 'source', name: 'Source', type: 'select', options: [] }],
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,35 @@
|
||||
import { Type } from '@sinclair/typebox'
|
||||
import { type AgentTool } from '@earendil-works/pi-agent-core'
|
||||
import { executeAgentToolWorkflow } from './utils'
|
||||
|
||||
const listAutofillFieldsSchema = Type.Object({
|
||||
parent: Type.String({
|
||||
description:
|
||||
'The parent folder ID whose project autofillable metadata fields to list. This parameter is required.',
|
||||
}),
|
||||
})
|
||||
|
||||
export function createListAutofillFieldsTool(
|
||||
userId: string,
|
||||
): AgentTool<typeof listAutofillFieldsSchema> {
|
||||
return {
|
||||
name: 'list_autofill_fields',
|
||||
label: 'List Autofill Fields',
|
||||
description:
|
||||
'List the AI-autofillable metadata fields defined for the project of a parent folder, including their types and available options. ' +
|
||||
'Use this before creating a file or version so you can pass relevant context (e.g. generation source) to create_file/create_version.',
|
||||
parameters: listAutofillFieldsSchema,
|
||||
execute: async (_toolCallId, params) => {
|
||||
const result = await executeAgentToolWorkflow({
|
||||
toolName: 'list_autofill_fields',
|
||||
args: params,
|
||||
userId,
|
||||
assetId: params.parent,
|
||||
})
|
||||
return {
|
||||
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
||||
details: result,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,9 @@ describe('Agent Autofill Workflow', () => {
|
||||
getAgentAutofillContextActivity: Object.assign(vi.fn(), {
|
||||
_activityName: 'getAgentAutofillContextActivity',
|
||||
}),
|
||||
getAssetAutofillContextActivity: Object.assign(vi.fn(), {
|
||||
_activityName: 'getAssetAutofillContextActivity',
|
||||
}),
|
||||
autofillAiActivity: Object.assign(vi.fn(), { _activityName: 'autofillAiActivity' }),
|
||||
updateTaskUsageActivity: Object.assign(vi.fn(), { _activityName: 'updateTaskUsageActivity' }),
|
||||
updateAssetMetadataActivity: Object.assign(vi.fn(), {
|
||||
@@ -75,6 +78,7 @@ describe('Agent Autofill Workflow', () => {
|
||||
{ key: 'title', config: { name: 'Title', type: 'text' }, description: 'The title' },
|
||||
])
|
||||
mockActivities.getAgentAutofillContextActivity.mockResolvedValue({ agent: { id: 'b1' } })
|
||||
mockActivities.getAssetAutofillContextActivity.mockResolvedValue('Generated using gemini')
|
||||
mockActivities.autofillAiActivity.mockResolvedValue({
|
||||
text: '{"title":"Extracted Title"}',
|
||||
sessionId: 'session-123',
|
||||
@@ -136,6 +140,7 @@ describe('Agent Autofill Workflow', () => {
|
||||
expect(mockActivities.getAgentAutofillContextActivity).toHaveBeenCalledWith({
|
||||
teamId: 't1',
|
||||
})
|
||||
expect(mockActivities.getAssetAutofillContextActivity).toHaveBeenCalledWith('a1')
|
||||
|
||||
// Verify AI autofill called with mapped fields
|
||||
expect(mockActivities.autofillAiActivity).toHaveBeenCalledWith({
|
||||
@@ -149,6 +154,7 @@ describe('Agent Autofill Workflow', () => {
|
||||
},
|
||||
],
|
||||
context: { agent: { id: 'b1' } },
|
||||
agentContext: 'Generated using gemini',
|
||||
})
|
||||
|
||||
// Verify task usage update
|
||||
@@ -189,6 +195,42 @@ describe('Agent Autofill Workflow', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('should run autofill without agentContext when the asset has no context', async () => {
|
||||
mockActivities.getAssetAutofillContextActivity.mockResolvedValue(null)
|
||||
|
||||
const task = await prisma.workflowTask.create({
|
||||
data: {
|
||||
type: 'ai_metadata_autofill',
|
||||
status: 'pending',
|
||||
assetId: 'a1',
|
||||
payload: {
|
||||
projectId: 'p1',
|
||||
agent: { sessionId: 's1', agentId: 'agent-1' },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
await agentAutofillMedia(task)
|
||||
|
||||
expect(mockActivities.getAssetAutofillContextActivity).toHaveBeenCalledWith('a1')
|
||||
expect(mockActivities.autofillAiActivity).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
teamId: 't1',
|
||||
images: ['/tmp/test-dir/1.webp'],
|
||||
fields: [
|
||||
{
|
||||
id: 'title',
|
||||
config: { name: 'Title', type: 'text' },
|
||||
description: 'The title',
|
||||
},
|
||||
],
|
||||
context: { agent: { id: 'b1' } },
|
||||
}),
|
||||
)
|
||||
const aiCallArgs = mockActivities.autofillAiActivity.mock.calls[0][0]
|
||||
expect(aiCallArgs).not.toHaveProperty('agentContext')
|
||||
})
|
||||
|
||||
it('should complete early if no image files could be extracted', async () => {
|
||||
mockActivities.extractAiMetadataActivity.mockResolvedValue([])
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ export async function agentAutofillMedia(task: WorkflowTask): Promise<void> {
|
||||
extractAiMetadataActivity,
|
||||
getProjectAutofillFieldsActivity,
|
||||
getAgentAutofillContextActivity,
|
||||
getAssetAutofillContextActivity,
|
||||
autofillAiActivity,
|
||||
updateTaskUsageActivity,
|
||||
updateAssetMetadataActivity,
|
||||
@@ -131,6 +132,13 @@ export async function agentAutofillMedia(task: WorkflowTask): Promise<void> {
|
||||
teamId,
|
||||
})
|
||||
|
||||
// 3c. Fetch Agent-Provided Autofill Context (from create_file/create_version)
|
||||
const agentContext = await executeActivity(
|
||||
agentWorkerQueue,
|
||||
getAssetAutofillContextActivity,
|
||||
asset.id,
|
||||
)
|
||||
|
||||
// 4. Call AI Service
|
||||
const aiResult = await executeActivity(agentWorkerQueue, autofillAiActivity, {
|
||||
teamId,
|
||||
@@ -143,6 +151,7 @@ export async function agentAutofillMedia(task: WorkflowTask): Promise<void> {
|
||||
}),
|
||||
),
|
||||
context,
|
||||
...(agentContext ? { agentContext } : {}),
|
||||
})
|
||||
|
||||
if (aiResult.usage) {
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "assets" ADD COLUMN "autofill_context" TEXT;
|
||||
@@ -382,6 +382,7 @@ model Asset {
|
||||
transcodeTaskId String? @map("transcode_task_id")
|
||||
/// [MediaInfo]
|
||||
media Json?
|
||||
autofillContext String? @map("autofill_context")
|
||||
isDeleted Boolean @default(false) @map("is_deleted")
|
||||
deletedAt DateTime? @map("deleted_at")
|
||||
sortIndex String? @map("sort_index")
|
||||
|
||||
+4
-4
File diff suppressed because one or more lines are too long
@@ -3249,6 +3249,7 @@ export const AssetScalarFieldEnum = {
|
||||
status: 'status',
|
||||
transcodeTaskId: 'transcodeTaskId',
|
||||
media: 'media',
|
||||
autofillContext: 'autofillContext',
|
||||
isDeleted: 'isDeleted',
|
||||
deletedAt: 'deletedAt',
|
||||
sortIndex: 'sortIndex',
|
||||
|
||||
@@ -286,6 +286,7 @@ export const AssetScalarFieldEnum = {
|
||||
status: 'status',
|
||||
transcodeTaskId: 'transcodeTaskId',
|
||||
media: 'media',
|
||||
autofillContext: 'autofillContext',
|
||||
isDeleted: 'isDeleted',
|
||||
deletedAt: 'deletedAt',
|
||||
sortIndex: 'sortIndex',
|
||||
|
||||
+114
-1
@@ -47,6 +47,7 @@ export type AssetMinAggregateOutputType = {
|
||||
sizeByte: bigint | null
|
||||
status: $Enums.AssetStatus | null
|
||||
transcodeTaskId: string | null
|
||||
autofillContext: string | null
|
||||
isDeleted: boolean | null
|
||||
deletedAt: Date | null
|
||||
sortIndex: string | null
|
||||
@@ -69,6 +70,7 @@ export type AssetMaxAggregateOutputType = {
|
||||
sizeByte: bigint | null
|
||||
status: $Enums.AssetStatus | null
|
||||
transcodeTaskId: string | null
|
||||
autofillContext: string | null
|
||||
isDeleted: boolean | null
|
||||
deletedAt: Date | null
|
||||
sortIndex: string | null
|
||||
@@ -93,6 +95,7 @@ export type AssetCountAggregateOutputType = {
|
||||
status: number
|
||||
transcodeTaskId: number
|
||||
media:PrismaJson.MediaInfo
|
||||
autofillContext: number
|
||||
isDeleted: number
|
||||
deletedAt: number
|
||||
sortIndex: number
|
||||
@@ -127,6 +130,7 @@ export type AssetMinAggregateInputType = {
|
||||
sizeByte?: true
|
||||
status?: true
|
||||
transcodeTaskId?: true
|
||||
autofillContext?: true
|
||||
isDeleted?: true
|
||||
deletedAt?: true
|
||||
sortIndex?: true
|
||||
@@ -149,6 +153,7 @@ export type AssetMaxAggregateInputType = {
|
||||
sizeByte?: true
|
||||
status?: true
|
||||
transcodeTaskId?: true
|
||||
autofillContext?: true
|
||||
isDeleted?: true
|
||||
deletedAt?: true
|
||||
sortIndex?: true
|
||||
@@ -173,6 +178,7 @@ export type AssetCountAggregateInputType = {
|
||||
status?: true
|
||||
transcodeTaskId?: true
|
||||
media?: true
|
||||
autofillContext?: true
|
||||
isDeleted?: true
|
||||
deletedAt?: true
|
||||
sortIndex?: true
|
||||
@@ -284,6 +290,7 @@ export type AssetGroupByOutputType = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId: string | null
|
||||
media:PrismaJson.MediaInfo | null
|
||||
autofillContext: string | null
|
||||
isDeleted: boolean
|
||||
deletedAt: Date | null
|
||||
sortIndex: string | null
|
||||
@@ -331,6 +338,7 @@ export type AssetWhereInput = {
|
||||
status?: Prisma.EnumAssetStatusFilter<"Asset"> | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.StringNullableFilter<"Asset"> | string | null
|
||||
media?: Prisma.JsonNullableFilter<"Asset">
|
||||
autofillContext?: Prisma.StringNullableFilter<"Asset"> | string | null
|
||||
isDeleted?: Prisma.BoolFilter<"Asset"> | boolean
|
||||
deletedAt?: Prisma.DateTimeNullableFilter<"Asset"> | Date | string | null
|
||||
sortIndex?: Prisma.StringNullableFilter<"Asset"> | string | null
|
||||
@@ -373,6 +381,7 @@ export type AssetOrderByWithRelationInput = {
|
||||
status?: Prisma.SortOrder
|
||||
transcodeTaskId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
media?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
autofillContext?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
isDeleted?: Prisma.SortOrder
|
||||
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
sortIndex?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
@@ -419,6 +428,7 @@ export type AssetWhereUniqueInput = Prisma.AtLeast<{
|
||||
status?: Prisma.EnumAssetStatusFilter<"Asset"> | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.StringNullableFilter<"Asset"> | string | null
|
||||
media?: Prisma.JsonNullableFilter<"Asset">
|
||||
autofillContext?: Prisma.StringNullableFilter<"Asset"> | string | null
|
||||
isDeleted?: Prisma.BoolFilter<"Asset"> | boolean
|
||||
deletedAt?: Prisma.DateTimeNullableFilter<"Asset"> | Date | string | null
|
||||
sortIndex?: Prisma.StringNullableFilter<"Asset"> | string | null
|
||||
@@ -461,6 +471,7 @@ export type AssetOrderByWithAggregationInput = {
|
||||
status?: Prisma.SortOrder
|
||||
transcodeTaskId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
media?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
autofillContext?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
isDeleted?: Prisma.SortOrder
|
||||
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
sortIndex?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
@@ -493,6 +504,7 @@ export type AssetScalarWhereWithAggregatesInput = {
|
||||
status?: Prisma.EnumAssetStatusWithAggregatesFilter<"Asset"> | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.StringNullableWithAggregatesFilter<"Asset"> | string | null
|
||||
media?: Prisma.JsonNullableWithAggregatesFilter<"Asset">
|
||||
autofillContext?: Prisma.StringNullableWithAggregatesFilter<"Asset"> | string | null
|
||||
isDeleted?: Prisma.BoolWithAggregatesFilter<"Asset"> | boolean
|
||||
deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Asset"> | Date | string | null
|
||||
sortIndex?: Prisma.StringNullableWithAggregatesFilter<"Asset"> | string | null
|
||||
@@ -517,6 +529,7 @@ export type AssetCreateInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -553,6 +566,7 @@ export type AssetUncheckedCreateInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -589,6 +603,7 @@ export type AssetUpdateInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -625,6 +640,7 @@ export type AssetUncheckedUpdateInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -661,6 +677,7 @@ export type AssetCreateManyInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -685,6 +702,7 @@ export type AssetUpdateManyMutationInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -703,6 +721,7 @@ export type AssetUncheckedUpdateManyInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -752,6 +771,7 @@ export type AssetCountOrderByAggregateInput = {
|
||||
status?: Prisma.SortOrder
|
||||
transcodeTaskId?: Prisma.SortOrder
|
||||
media?: Prisma.SortOrder
|
||||
autofillContext?: Prisma.SortOrder
|
||||
isDeleted?: Prisma.SortOrder
|
||||
deletedAt?: Prisma.SortOrder
|
||||
sortIndex?: Prisma.SortOrder
|
||||
@@ -779,6 +799,7 @@ export type AssetMaxOrderByAggregateInput = {
|
||||
sizeByte?: Prisma.SortOrder
|
||||
status?: Prisma.SortOrder
|
||||
transcodeTaskId?: Prisma.SortOrder
|
||||
autofillContext?: Prisma.SortOrder
|
||||
isDeleted?: Prisma.SortOrder
|
||||
deletedAt?: Prisma.SortOrder
|
||||
sortIndex?: Prisma.SortOrder
|
||||
@@ -801,6 +822,7 @@ export type AssetMinOrderByAggregateInput = {
|
||||
sizeByte?: Prisma.SortOrder
|
||||
status?: Prisma.SortOrder
|
||||
transcodeTaskId?: Prisma.SortOrder
|
||||
autofillContext?: Prisma.SortOrder
|
||||
isDeleted?: Prisma.SortOrder
|
||||
deletedAt?: Prisma.SortOrder
|
||||
sortIndex?: Prisma.SortOrder
|
||||
@@ -1297,6 +1319,7 @@ export type AssetCreateWithoutCreatorInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -1332,6 +1355,7 @@ export type AssetUncheckedCreateWithoutCreatorInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -1396,6 +1420,7 @@ export type AssetScalarWhereInput = {
|
||||
status?: Prisma.EnumAssetStatusFilter<"Asset"> | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.StringNullableFilter<"Asset"> | string | null
|
||||
media?: Prisma.JsonNullableFilter<"Asset">
|
||||
autofillContext?: Prisma.StringNullableFilter<"Asset"> | string | null
|
||||
isDeleted?: Prisma.BoolFilter<"Asset"> | boolean
|
||||
deletedAt?: Prisma.DateTimeNullableFilter<"Asset"> | Date | string | null
|
||||
sortIndex?: Prisma.StringNullableFilter<"Asset"> | string | null
|
||||
@@ -1420,6 +1445,7 @@ export type AssetCreateWithoutTeamRootFolderInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -1455,6 +1481,7 @@ export type AssetUncheckedCreateWithoutTeamRootFolderInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -1506,6 +1533,7 @@ export type AssetUpdateWithoutTeamRootFolderInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -1541,6 +1569,7 @@ export type AssetUncheckedUpdateWithoutTeamRootFolderInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -1576,6 +1605,7 @@ export type AssetCreateWithoutProjectRootFolderInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -1611,6 +1641,7 @@ export type AssetUncheckedCreateWithoutProjectRootFolderInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -1651,6 +1682,7 @@ export type AssetCreateWithoutProjectShareRootInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -1686,6 +1718,7 @@ export type AssetUncheckedCreateWithoutProjectShareRootInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -1726,6 +1759,7 @@ export type AssetCreateWithoutProjectInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -1761,6 +1795,7 @@ export type AssetUncheckedCreateWithoutProjectInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -1817,6 +1852,7 @@ export type AssetUpdateWithoutProjectRootFolderInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -1852,6 +1888,7 @@ export type AssetUncheckedUpdateWithoutProjectRootFolderInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -1898,6 +1935,7 @@ export type AssetUpdateWithoutProjectShareRootInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -1933,6 +1971,7 @@ export type AssetUncheckedUpdateWithoutProjectShareRootInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -1984,6 +2023,7 @@ export type AssetCreateWithoutShareLinkRootFolderInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2019,6 +2059,7 @@ export type AssetUncheckedCreateWithoutShareLinkRootFolderInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2070,6 +2111,7 @@ export type AssetUpdateWithoutShareLinkRootFolderInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -2105,6 +2147,7 @@ export type AssetUncheckedUpdateWithoutShareLinkRootFolderInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -2140,6 +2183,7 @@ export type AssetCreateWithoutChildrenInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2175,6 +2219,7 @@ export type AssetUncheckedCreateWithoutChildrenInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2215,6 +2260,7 @@ export type AssetCreateWithoutParentInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2250,6 +2296,7 @@ export type AssetUncheckedCreateWithoutParentInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2295,6 +2342,7 @@ export type AssetCreateWithoutSymlinksInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2330,6 +2378,7 @@ export type AssetUncheckedCreateWithoutSymlinksInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2370,6 +2419,7 @@ export type AssetCreateWithoutTargetInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2405,6 +2455,7 @@ export type AssetUncheckedCreateWithoutTargetInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2461,6 +2512,7 @@ export type AssetUpdateWithoutChildrenInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -2496,6 +2548,7 @@ export type AssetUncheckedUpdateWithoutChildrenInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -2558,6 +2611,7 @@ export type AssetUpdateWithoutSymlinksInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -2593,6 +2647,7 @@ export type AssetUncheckedUpdateWithoutSymlinksInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -2644,6 +2699,7 @@ export type AssetCreateWithoutStorageKeyInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2679,6 +2735,7 @@ export type AssetUncheckedCreateWithoutStorageKeyInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2740,6 +2797,7 @@ export type AssetCreateWithoutMetadataValuesInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2775,6 +2833,7 @@ export type AssetUncheckedCreateWithoutMetadataValuesInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2826,6 +2885,7 @@ export type AssetUpdateWithoutMetadataValuesInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -2861,6 +2921,7 @@ export type AssetUncheckedUpdateWithoutMetadataValuesInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -2896,6 +2957,7 @@ export type AssetCreateWithoutCommentsInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2931,6 +2993,7 @@ export type AssetUncheckedCreateWithoutCommentsInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -2982,6 +3045,7 @@ export type AssetUpdateWithoutCommentsInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3017,6 +3081,7 @@ export type AssetUncheckedUpdateWithoutCommentsInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3052,6 +3117,7 @@ export type AssetCreateWithoutCommentAttachmentsInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -3087,6 +3153,7 @@ export type AssetUncheckedCreateWithoutCommentAttachmentsInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -3138,6 +3205,7 @@ export type AssetUpdateWithoutCommentAttachmentsInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3173,6 +3241,7 @@ export type AssetUncheckedUpdateWithoutCommentAttachmentsInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3208,6 +3277,7 @@ export type AssetCreateWithoutEmbeddingsInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -3243,6 +3313,7 @@ export type AssetUncheckedCreateWithoutEmbeddingsInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -3294,6 +3365,7 @@ export type AssetUpdateWithoutEmbeddingsInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3329,6 +3401,7 @@ export type AssetUncheckedUpdateWithoutEmbeddingsInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3364,6 +3437,7 @@ export type AssetCreateWithoutNotificationsInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -3399,6 +3473,7 @@ export type AssetUncheckedCreateWithoutNotificationsInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -3450,6 +3525,7 @@ export type AssetUpdateWithoutNotificationsInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3485,6 +3561,7 @@ export type AssetUncheckedUpdateWithoutNotificationsInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3520,6 +3597,7 @@ export type AssetCreateWithoutTaskInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -3555,6 +3633,7 @@ export type AssetUncheckedCreateWithoutTaskInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -3616,6 +3695,7 @@ export type AssetCreateWithoutAgentSessionsInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -3651,6 +3731,7 @@ export type AssetUncheckedCreateWithoutAgentSessionsInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -3702,6 +3783,7 @@ export type AssetUpdateWithoutAgentSessionsInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3737,6 +3819,7 @@ export type AssetUncheckedUpdateWithoutAgentSessionsInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3772,6 +3855,7 @@ export type AssetCreateManyCreatorInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -3795,6 +3879,7 @@ export type AssetUpdateWithoutCreatorInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3830,6 +3915,7 @@ export type AssetUncheckedUpdateWithoutCreatorInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3865,6 +3951,7 @@ export type AssetUncheckedUpdateManyWithoutCreatorInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3888,6 +3975,7 @@ export type AssetCreateManyProjectInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -3911,6 +3999,7 @@ export type AssetUpdateWithoutProjectInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3946,6 +4035,7 @@ export type AssetUncheckedUpdateWithoutProjectInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -3981,6 +4071,7 @@ export type AssetUncheckedUpdateManyWithoutProjectInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -4004,6 +4095,7 @@ export type AssetCreateManyParentInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -4027,6 +4119,7 @@ export type AssetCreateManyTargetInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -4050,6 +4143,7 @@ export type AssetUpdateWithoutParentInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -4085,6 +4179,7 @@ export type AssetUncheckedUpdateWithoutParentInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -4120,6 +4215,7 @@ export type AssetUncheckedUpdateManyWithoutParentInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -4143,6 +4239,7 @@ export type AssetUpdateWithoutTargetInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -4178,6 +4275,7 @@ export type AssetUncheckedUpdateWithoutTargetInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -4213,6 +4311,7 @@ export type AssetUncheckedUpdateManyWithoutTargetInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -4236,6 +4335,7 @@ export type AssetCreateManyStorageKeyInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -4259,6 +4359,7 @@ export type AssetUpdateWithoutStorageKeyInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -4294,6 +4395,7 @@ export type AssetUncheckedUpdateWithoutStorageKeyInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -4329,6 +4431,7 @@ export type AssetUncheckedUpdateManyWithoutStorageKeyInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -4352,6 +4455,7 @@ export type AssetCreateManyTaskInput = {
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: string | null
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
@@ -4375,6 +4479,7 @@ export type AssetUpdateWithoutTaskInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -4410,6 +4515,7 @@ export type AssetUncheckedUpdateWithoutTaskInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -4445,6 +4551,7 @@ export type AssetUncheckedUpdateManyWithoutTaskInput = {
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
autofillContext?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -4562,6 +4669,7 @@ export type AssetSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
status?: boolean
|
||||
transcodeTaskId?: boolean
|
||||
media?: boolean
|
||||
autofillContext?: boolean
|
||||
isDeleted?: boolean
|
||||
deletedAt?: boolean
|
||||
sortIndex?: boolean
|
||||
@@ -4605,6 +4713,7 @@ export type AssetSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensi
|
||||
status?: boolean
|
||||
transcodeTaskId?: boolean
|
||||
media?: boolean
|
||||
autofillContext?: boolean
|
||||
isDeleted?: boolean
|
||||
deletedAt?: boolean
|
||||
sortIndex?: boolean
|
||||
@@ -4635,6 +4744,7 @@ export type AssetSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensi
|
||||
status?: boolean
|
||||
transcodeTaskId?: boolean
|
||||
media?: boolean
|
||||
autofillContext?: boolean
|
||||
isDeleted?: boolean
|
||||
deletedAt?: boolean
|
||||
sortIndex?: boolean
|
||||
@@ -4665,6 +4775,7 @@ export type AssetSelectScalar = {
|
||||
status?: boolean
|
||||
transcodeTaskId?: boolean
|
||||
media?: boolean
|
||||
autofillContext?: boolean
|
||||
isDeleted?: boolean
|
||||
deletedAt?: boolean
|
||||
sortIndex?: boolean
|
||||
@@ -4678,7 +4789,7 @@ export type AssetSelectScalar = {
|
||||
projectId?: boolean
|
||||
}
|
||||
|
||||
export type AssetOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "nameNgram" | "type" | "mediaType" | "fileCount" | "sizeByte" | "status" | "transcodeTaskId" | "media" | "isDeleted" | "deletedAt" | "sortIndex" | "createdAt" | "updatedAt" | "parentId" | "targetId" | "storageKeyId" | "creatorId" | "taskId" | "projectId", ExtArgs["result"]["asset"]>
|
||||
export type AssetOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "nameNgram" | "type" | "mediaType" | "fileCount" | "sizeByte" | "status" | "transcodeTaskId" | "media" | "autofillContext" | "isDeleted" | "deletedAt" | "sortIndex" | "createdAt" | "updatedAt" | "parentId" | "targetId" | "storageKeyId" | "creatorId" | "taskId" | "projectId", ExtArgs["result"]["asset"]>
|
||||
export type AssetInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
parent?: boolean | Prisma.Asset$parentArgs<ExtArgs>
|
||||
children?: boolean | Prisma.Asset$childrenArgs<ExtArgs>
|
||||
@@ -4753,6 +4864,7 @@ export type $AssetPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
* [MediaInfo]
|
||||
*/
|
||||
media:PrismaJson.MediaInfo | null
|
||||
autofillContext: string | null
|
||||
isDeleted: boolean
|
||||
deletedAt: Date | null
|
||||
sortIndex: string | null
|
||||
@@ -5215,6 +5327,7 @@ export interface AssetFieldRefs {
|
||||
readonly status: Prisma.FieldRef<"Asset", 'AssetStatus'>
|
||||
readonly transcodeTaskId: Prisma.FieldRef<"Asset", 'String'>
|
||||
readonly media: Prisma.FieldRef<"Asset", 'Json'>
|
||||
readonly autofillContext: Prisma.FieldRef<"Asset", 'String'>
|
||||
readonly isDeleted: Prisma.FieldRef<"Asset", 'Boolean'>
|
||||
readonly deletedAt: Prisma.FieldRef<"Asset", 'DateTime'>
|
||||
readonly sortIndex: Prisma.FieldRef<"Asset", 'String'>
|
||||
|
||||
@@ -20,6 +20,7 @@ describe.each(['local', 'temporal'] as const)(
|
||||
|
||||
let agentWorkerPromise: Promise<void> | null = null
|
||||
let transcodeWorkerPromise: Promise<void> | null = null
|
||||
let lastAutofillPrompt = ''
|
||||
|
||||
beforeAll(async () => {
|
||||
// Set bucket environment
|
||||
@@ -35,7 +36,11 @@ describe.each(['local', 'temporal'] as const)(
|
||||
// Spy on the harness prompt method to intercept the LLM call while running real activities & tools
|
||||
vi.spyOn(AgentHarness.prototype, 'prompt').mockImplementation(async function (
|
||||
this: AgentHarness,
|
||||
...args: unknown[]
|
||||
) {
|
||||
// Capture the prompt to verify agent-provided context is propagated
|
||||
lastAutofillPrompt = typeof args[0] === 'string' ? args[0] : ''
|
||||
|
||||
// Find the real autofill_metadata tool configured on the harness
|
||||
const tools = this.getTools()
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Tool execution mock for E2E harness test
|
||||
@@ -239,6 +244,7 @@ describe.each(['local', 'temporal'] as const)(
|
||||
mediaType: 'image/png',
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- partial MediaInfo mock for testing
|
||||
media: { proxyType: 'image' } as any,
|
||||
autofillContext: 'Generated using gemini',
|
||||
projectId: project.id,
|
||||
storageKeyId: storageKey.id,
|
||||
},
|
||||
@@ -278,6 +284,10 @@ describe.each(['local', 'temporal'] as const)(
|
||||
// 5. Verification
|
||||
expect(completedTask.status).toBe('completed')
|
||||
|
||||
// Verify the agent-provided autofill context was included in the LLM prompt
|
||||
expect(lastAutofillPrompt).toContain('Generated using gemini')
|
||||
expect(lastAutofillPrompt).toContain('<context>')
|
||||
|
||||
// Verify placeholder comment is updated correctly
|
||||
const comments = await prisma.assetComment.findMany({
|
||||
where: { assetId: asset.id },
|
||||
|
||||
Reference in New Issue
Block a user