2026-05-20 22:43:31 +08:00
import { SandboxManager } from '@anthropic-ai/sandbox-runtime'
2026-06-22 09:58:35 +08:00
import {
2026-07-28 16:13:40 +08:00
AgentHarness ,
Session ,
type AgentTool ,
type ThinkingLevel ,
2026-06-22 09:58:35 +08:00
} from '@earendil-works/pi-agent-core'
2026-08-02 14:26:03 +08:00
import type { Api , Model } from '@earendil-works/pi-ai'
2026-08-03 10:25:10 +08:00
import { createModels , InMemoryCredentialStore } from '@earendil-works/pi-ai'
import { builtinProviders } from '@earendil-works/pi-ai/providers/all'
2026-07-23 11:02:54 +08:00
import { agentService } from '@shumai/core/src/agent/agent'
2026-08-04 16:08:04 +08:00
import { prisma , type TeamMemberRole } from '@shumai/db'
2026-05-20 22:43:31 +08:00
import { Type , type TSchema } from '@sinclair/typebox'
import * as fs from 'fs'
2026-07-30 16:35:36 +08:00
import * as os from 'os'
2026-05-31 19:11:27 +08:00
import * as path from 'path'
2026-05-21 11:50:09 +08:00
import { DatabaseSessionStorage } from './database-session-storage'
2026-06-05 21:25:08 +08:00
import { createAnalyzeImageTool } from './tools/analyze-image'
2026-05-30 18:50:12 +08:00
import { createCreateFileTool } from './tools/create-file'
import { createCreateFolderTool } from './tools/create-folder'
import { createCreateVersionTool } from './tools/create-version'
2026-07-29 16:56:06 +08:00
import { createDownloadAssetTool } from './tools/download-asset'
2026-05-30 18:50:12 +08:00
import { createListAssetsTool } from './tools/list-assets'
2026-07-23 11:02:54 +08:00
import { createReadPdfPagesTool } from './tools/read-pdf-pages'
2026-05-20 22:43:31 +08:00
import { createReadSkillTool } from './tools/read-skill'
2026-07-28 11:21:31 +08:00
import { createReadThreadTool } from './tools/read-thread'
2026-05-20 22:43:31 +08:00
import { createSandboxedBashTool } from './tools/sandboxed-bash'
2026-07-23 11:02:54 +08:00
import { createScreenshotTool } from './tools/screenshot'
2026-05-20 22:43:31 +08:00
2026-07-11 20:54:09 +08:00
export interface DbModelInfo {
modelId : string
name : string | null
config : PrismaJson.ModelConfig
}
export interface DbProviderInfo {
name : string
config : PrismaJson.ProviderConfig
models : DbModelInfo []
}
export function getModelFromDb ( providers : DbProviderInfo [], providerName : string , modelId : string ) {
const dbProvider = providers . find (( p ) => p . name === providerName )
const dbModel = dbProvider ? . models . find (( m ) => m . modelId === modelId )
2026-08-02 14:26:03 +08:00
if ( ! dbProvider || ! dbModel ) {
throw new Error (
`Provider " ${ providerName } " or model " ${ modelId } " not found in database configuration` ,
)
}
2026-07-11 20:54:09 +08:00
2026-08-02 14:26:03 +08:00
const m = {
id : modelId ,
name : dbModel.name || modelId ,
provider : providerName ,
api : 'openai-responses' ,
baseUrl : '' ,
reasoning : false ,
input : [ 'text' ],
cost : { input : 0 , output : 0 , cacheRead : 0 , cacheWrite : 0 },
contextWindow : 4096 ,
maxTokens : 4096 ,
2026-07-11 20:54:09 +08:00
}
// Override with database config
if ( dbProvider . config . baseUrl ) {
m . baseUrl = dbProvider . config . baseUrl
}
if ( dbProvider . config . api ) {
m . api = dbProvider . config . api
}
Object . assign ( m , dbModel . config )
if ( dbModel . name ) {
m . name = dbModel . name
}
2026-08-02 14:26:03 +08:00
return m as Model < Api >
2026-07-11 20:54:09 +08:00
}
export function getApiKeyAndHeadersFromDb ( providers : DbProviderInfo [], providerName : string ) {
// Helper to resolve key from ENV if it matches an ENV var name
const resolveKey = ( key : string | undefined ) => ( key ? process . env [ key ] || key : undefined )
// Look up the provider in our providers list
const dbProvider = providers . find (( p ) => p . name === providerName )
const providerApiKey = dbProvider ? . config ? . apiKey
if ( providerApiKey ) {
return { apiKey : resolveKey ( providerApiKey ) ! }
}
return undefined
}
2026-05-20 22:43:31 +08:00
export interface CreateAgentSessionParams {
2026-06-15 00:01:55 +08:00
teamId : string
2026-05-20 22:43:31 +08:00
agentId : string
providerName : string
modelId : string
systemPrompt : string
teamSkills : Array < { id : string ; name : string ; description? : string | null } >
allowedDomains : string []
2026-05-20 22:52:54 +08:00
sessionId? : string
userId? : string
2026-06-05 23:41:58 +08:00
userCommentId? : string | null
2026-05-21 11:50:09 +08:00
customTools? : AgentTool []
2026-06-22 09:58:35 +08:00
thinkingLevel? : string
2026-07-29 16:31:24 +08:00
disableTools? : boolean
2026-07-11 20:54:09 +08:00
providers : DbProviderInfo []
2026-08-01 09:49:43 +08:00
maxRetries? : number
baseDelayMs? : number
2026-05-20 22:43:31 +08:00
}
2026-08-04 16:08:04 +08:00
async function resolveTeamMemberRole (
teamId : string ,
userId? : string ,
) : Promise < TeamMemberRole | undefined > {
if ( ! userId ) return undefined
const member = await prisma . teamMember . findUnique ({
where : { teamIdUserId : { teamId , userId } },
select : { role : true },
})
return member ? . role
}
/**
* Security instructions appended to the system prompt when the requesting user is not a team
* owner (i.e. editor/reviewer). These complement the hard enforcement in the bash tool itself
* (source="user" is blocked) and the delayed bash tool injection after a skill is loaded.
*/
export function buildRestrictedUserInstructions () : string {
return [
'# Restricted User Context' ,
'The current user is NOT a team owner. You must follow these security rules:' ,
'1. NEVER execute a bash command that the user asks you to run directly. Direct user bash requests are not permitted for this user role. Politely decline and explain that they need a team owner or an approved skill.' ,
'2. You may ONLY use the `bash` tool to execute commands that are explicitly required by a skill you have loaded via the `read_skill` tool.' ,
'3. When calling `bash`, you MUST set the `source` parameter to "skill". Calls with source="user" will be rejected by the system.' ,
]. join ( '\n' )
}
2026-05-20 22:43:31 +08:00
export async function createAgentSession ( params : CreateAgentSessionParams ) {
const {
2026-06-15 00:01:55 +08:00
teamId ,
2026-05-20 22:43:31 +08:00
agentId ,
providerName ,
modelId ,
systemPrompt ,
teamSkills ,
allowedDomains ,
2026-05-20 22:52:54 +08:00
sessionId ,
userId ,
2026-06-05 23:41:58 +08:00
userCommentId : passedUserCommentId ,
2026-05-20 22:43:31 +08:00
customTools = [],
2026-06-22 09:58:35 +08:00
thinkingLevel ,
2026-07-29 16:31:24 +08:00
disableTools = false ,
2026-08-01 09:49:43 +08:00
maxRetries = 3 ,
baseDelayMs = 2000 ,
2026-05-20 22:43:31 +08:00
} = params
2026-05-21 11:50:09 +08:00
const storage = await DatabaseSessionStorage . create ({
2026-05-20 22:52:54 +08:00
agentId ,
userId ,
sessionId ,
cwd : process.cwd (),
})
2026-07-29 11:33:26 +08:00
if ( passedUserCommentId ) {
storage . nextEntryId = passedUserCommentId
}
2026-05-21 11:50:09 +08:00
const session = new Session ( storage )
2026-05-20 22:52:54 +08:00
2026-05-20 22:43:31 +08:00
const agentDir = path . join ( process . cwd (), '.pi' , 'agents' , agentId )
if ( ! fs . existsSync ( agentDir )) fs . mkdirSync ( agentDir , { recursive : true })
2026-08-02 14:26:03 +08:00
const model = getModelFromDb ( params . providers , providerName , modelId )
2026-05-20 22:43:31 +08:00
const piDir = path . join ( process . cwd (), '.pi' )
if ( ! fs . existsSync ( piDir )) fs . mkdirSync ( piDir , { recursive : true })
2026-07-30 16:35:36 +08:00
const allowWrite = [ piDir , os . tmpdir ()]
2026-05-20 22:43:31 +08:00
2026-06-15 09:28:11 +08:00
const sandboxState = {
blockedHost : '' ,
}
2026-06-15 10:52:53 +08:00
const sandboxAskCallback = async ({ host } : { host : string ; port? : number }) => {
2026-06-15 00:01:55 +08:00
try {
const sandbox = await prisma . sandbox . findUnique ({
where : { teamId },
})
const pendingDomains = sandbox ? . pendingDomains || []
2026-06-15 10:52:53 +08:00
if ( ! pendingDomains . includes ( host )) {
2026-06-15 00:01:55 +08:00
await prisma . sandbox . upsert ({
where : { teamId },
create : {
teamId ,
2026-06-15 10:52:53 +08:00
pendingDomains : [ host ],
2026-06-15 00:01:55 +08:00
},
update : {
pendingDomains : {
2026-06-15 10:52:53 +08:00
push : host ,
2026-06-15 00:01:55 +08:00
},
},
})
}
} catch ( err ) {
console . error ( 'Failed to update sandbox pending domains:' , err )
}
2026-06-15 10:52:53 +08:00
sandboxState . blockedHost = host
2026-06-15 00:01:55 +08:00
return false
}
2026-05-20 22:43:31 +08:00
// SandboxManager.initialize is a global operation that applies to the entire process.
2026-06-15 10:36:01 +08:00
// We reset it first to ensure any previous process-global SOCKS/HTTP proxy servers
// and callbacks are cleaned up, allowing the new callback and allowedDomains to take effect.
await SandboxManager . reset ()
2026-06-15 00:01:55 +08:00
await SandboxManager . initialize (
{
network : {
allowedDomains ,
deniedDomains : [],
},
filesystem : {
denyRead : [ '.env' , '.env.*' , '*.pem' , '*.key' ],
allowWrite ,
denyWrite : [ '.env' , '.env.*' , '*.pem' , '*.key' ],
},
2026-07-28 18:27:32 +08:00
enableWeakerNestedSandbox : process.env.ENABLE_WEAKER_NESTED_SANDBOX === 'true' ,
2026-05-20 22:43:31 +08:00
},
2026-06-15 00:01:55 +08:00
sandboxAskCallback ,
)
2026-05-20 22:43:31 +08:00
2026-05-21 11:50:09 +08:00
const skillEnvs : Record < string , string > = {}
const onEnvsAdded = ( envs : Record < string , string >) => {
Object . assign ( skillEnvs , envs )
}
2026-05-20 22:43:31 +08:00
2026-08-04 16:26:16 +08:00
// Resolve the requesting user's team role to enforce owner-only bash privileges.
// A user who is not a member of the team is treated as restricted (fail-closed),
// while flows without a user context (e.g. autofill) remain unrestricted.
2026-08-04 16:08:04 +08:00
const role = await resolveTeamMemberRole ( teamId , userId )
2026-08-04 16:26:16 +08:00
const isOwner = ! userId || role === 'owner'
2026-08-04 16:08:04 +08:00
const restricted = ! isOwner
2026-06-01 14:34:23 +08:00
// Restore env variables from previously loaded skills in this session
2026-08-04 16:08:04 +08:00
let skillLoadedInSession = false
2026-06-01 14:34:23 +08:00
if ( sessionId ) {
try {
const entries = await storage . getEntries ()
for ( const entry of entries ) {
if (
entry . type === 'message' &&
entry . message . role === 'toolResult' &&
entry . message . toolName === 'read_skill' &&
! entry . message . isError
) {
const details = entry . message . details as { skillId? : string } | undefined
if ( details ? . skillId ) {
2026-08-04 16:08:04 +08:00
skillLoadedInSession = true
2026-06-01 14:34:23 +08:00
const envs = await agentService . getSkillEnvs ( details . skillId )
onEnvsAdded ( envs )
}
}
}
} catch ( err ) {
console . error ( 'Failed to restore skill environment variables:' , err )
}
}
2026-06-05 21:25:08 +08:00
const metadata = await storage . getMetadata ()
2026-06-05 23:41:58 +08:00
const userCommentId =
passedUserCommentId !== undefined ? passedUserCommentId : metadata.userCommentId
2026-06-05 21:25:08 +08:00
2026-07-21 16:22:14 +08:00
const mediaTools : AgentTool [] = []
if ( userId ) {
mediaTools . push (
createAnalyzeImageTool ( userId , userCommentId ),
createScreenshotTool ( userId , userCommentId ),
createReadPdfPagesTool ( userId , userCommentId ),
)
}
2026-06-05 21:25:08 +08:00
2026-08-04 16:08:04 +08:00
const agent = await prisma . agent . findUnique ({
where : { id : agentId },
})
const agentConfig = agent ? . config as PrismaJson . AgentConfig | null | undefined
const deniedTools = agentConfig ? . deniedTools || []
2026-06-15 09:28:11 +08:00
const sandboxedBash = createSandboxedBashTool ( process . cwd (), skillEnvs , {
getBlockedHost : () => sandboxState . blockedHost ,
clearBlockedHost : () => {
sandboxState . blockedHost = ''
},
2026-08-04 16:08:04 +08:00
// Non-owner users can only run bash commands required by a loaded skill
restrictedUser : restricted ,
2026-06-15 09:28:11 +08:00
})
2026-08-04 16:08:04 +08:00
// For non-owner users, the bash tool is not injected initially. It becomes available
// only after a skill is successfully loaded via the read_skill tool (or immediately when
// a skill was already loaded earlier in this session).
let harness : AgentHarness | undefined = undefined
const bashIncludedFromStart = isOwner || skillLoadedInSession
let bashInjected = bashIncludedFromStart
const onSkillLoaded = async () => {
if ( ! harness || bashInjected || deniedTools . includes ( 'bash' )) return
if ( harness . getTools (). some (( t ) => t . name === 'bash' )) return
bashInjected = true
await harness . setTools ([... harness . getTools (), sandboxedBash ])
}
const readSkill = createReadSkillTool ( userId , onEnvsAdded , restricted ? onSkillLoaded : undefined )
2026-05-21 11:50:09 +08:00
2026-05-30 17:09:18 +08:00
const systemTools : AgentTool [] = []
if ( userId ) {
systemTools . push (
createListAssetsTool ( userId ),
createCreateFolderTool ( userId ),
createCreateFileTool ( userId ),
createCreateVersionTool ( userId ),
2026-07-29 16:56:06 +08:00
createDownloadAssetTool ( userId ),
2026-05-30 17:09:18 +08:00
)
}
2026-07-28 11:21:31 +08:00
const readThread = createReadThreadTool ()
const allTools = [
... mediaTools ,
readSkill ,
readThread ,
2026-08-04 16:08:04 +08:00
...( bashIncludedFromStart ? [ sandboxedBash ] : []),
2026-07-28 11:21:31 +08:00
... systemTools ,
... customTools ,
]
2026-07-29 16:31:24 +08:00
const enabledTools = disableTools
? []
: allTools . filter (( tool ) => ! deniedTools . includes ( tool . name ))
2026-07-16 15:12:26 +08:00
2026-08-03 10:25:10 +08:00
const credentials = new InMemoryCredentialStore ()
const resolveKey = ( key : string | undefined ) => ( key ? process . env [ key ] || key : undefined )
for ( const p of params . providers ) {
const apiKey = resolveKey ( p . config ? . apiKey )
if ( apiKey ) {
await credentials . modify ( p . name , async () => ({ type : 'api_key' as const , key : apiKey }))
}
}
const modelsStore = createModels ({ credentials })
for ( const provider of builtinProviders ()) {
modelsStore . setProvider ( provider )
}
2026-08-04 16:08:04 +08:00
harness = new AgentHarness ({
2026-05-21 11:50:09 +08:00
session ,
2026-08-03 10:25:10 +08:00
models : modelsStore ,
2026-05-20 22:43:31 +08:00
model ,
2026-06-22 09:58:35 +08:00
thinkingLevel : ( thinkingLevel || 'off' ) as ThinkingLevel ,
2026-08-01 09:49:43 +08:00
streamOptions : {
maxRetries ,
maxRetryDelayMs : baseDelayMs ,
},
2026-05-21 11:50:09 +08:00
systemPrompt : async () => {
let prompt = systemPrompt
2026-05-31 12:55:45 +08:00
2026-07-29 16:31:24 +08:00
if ( disableTools ) {
return prompt
}
2026-08-04 16:08:04 +08:00
if ( restricted ) {
prompt += ` \ n \ n ${ buildRestrictedUserInstructions () } `
}
2026-05-31 12:55:45 +08:00
// Sandbox environment restrictions
prompt +=
'\n\n' +
[
'# Sandbox Environment Restrictions' ,
'Your shell environment (the `bash` tool) is highly sandboxed to protect the host system:' ,
'1. **Filesystem Isolation**: You only have read and write permissions to the `.pi` folder in the project root directory.' ,
'2. **Read/Write Restrictions**: All reading and writing to directories outside `.pi` (e.g. your home directory `~/`, `/tmp`, `/etc`, or the rest of the workspace) are strictly denied by the sandbox security policy.' ,
"3. **Avoid System Temp Directory Writes**: You must strictly avoid any commands or shell constructs that attempt to write to the system temporary directory `/tmp` or `/var/tmp`. For example, do not use Bash here documents (`<<EOF` or `<<'EOF'`) in your commands, as the bash shell internally implements here documents by writing temporary files to `/tmp`. If you need to create a file or write content, write it directly using file creation tools or write to files located inside the `.pi` directory without utilizing here documents." ,
2026-07-29 16:56:06 +08:00
'4. **Temporary File Cleanup**: If you download workspace assets to `.pi` using the `download_asset` tool for local processing or script execution, you MUST delete the temporary downloaded files from `.pi` after finishing your task.' ,
2026-05-31 12:55:45 +08:00
]. join ( '\n' )
2026-05-21 11:50:09 +08:00
if ( teamSkills . length > 0 ) {
2026-05-31 10:20:20 +08:00
prompt += formatSkillsForPrompt ( teamSkills )
2026-05-21 11:50:09 +08:00
}
return prompt
},
2026-07-16 15:12:26 +08:00
tools : enabledTools ,
2026-05-20 22:43:31 +08:00
})
2026-05-21 11:50:09 +08:00
return { session , harness }
2026-05-20 22:43:31 +08:00
}
export interface AutofillField {
id : string
config : PrismaJson.FieldConfig
description? : string | null
}
export function fieldsToTypeBoxSchema ( fields : AutofillField []) {
const properties : Record < string , TSchema > = {}
for ( const f of fields ) {
let schema : TSchema
2026-07-28 21:32:47 +08:00
const fieldName = f . config . name
2026-07-28 21:44:56 +08:00
const fieldDesc = f . description || fieldName
2026-05-20 22:43:31 +08:00
switch ( f . config . type ) {
case 'text' :
case 'longText' :
2026-07-28 21:42:06 +08:00
schema = Type . String ()
2026-05-20 22:43:31 +08:00
break
case 'number' :
case 'rating' :
2026-07-28 21:42:06 +08:00
schema = Type . Number ()
2026-05-20 22:43:31 +08:00
break
case 'toggle' :
2026-07-28 21:42:06 +08:00
schema = Type . Boolean ()
2026-05-20 22:43:31 +08:00
break
2026-07-28 21:32:47 +08:00
case 'select' : {
const options = f . config . select ? . options || []
2026-05-20 22:43:31 +08:00
schema = Type . String ({
2026-07-28 21:32:47 +08:00
enum : options . map (( o ) => o . id ),
2026-05-20 22:43:31 +08:00
})
2026-07-28 21:32:47 +08:00
if ( options . length > 0 ) {
2026-07-28 21:44:56 +08:00
const optionLines = options . map (( o ) => `- ${ o . displayName } => ${ o . id } ` ). join ( '\n' )
schema . description = `The field ' ${ fieldName } ' represents ${ fieldDesc } . \ nSelect one option and return the option ID as the value. \ n \ nAvailable options: \ n ${ optionLines } `
2026-07-28 21:32:47 +08:00
}
2026-05-20 22:43:31 +08:00
break
2026-07-28 21:32:47 +08:00
}
case 'selectMulti' : {
const options = f . config . selectMulti ? . options || []
schema = Type . Array (
Type . String ({
enum : options . map (( o ) => o . id ),
}),
)
if ( options . length > 0 ) {
2026-07-28 21:44:56 +08:00
const optionLines = options . map (( o ) => `- ${ o . displayName } => ${ o . id } ` ). join ( '\n' )
schema . description = `The field ' ${ fieldName } ' represents ${ fieldDesc } . \ nSelect applicable options and return the option IDs as the value. \ n \ nAvailable options: \ n ${ optionLines } `
2026-07-28 21:32:47 +08:00
}
break
}
2026-05-20 22:43:31 +08:00
default :
2026-07-28 21:42:06 +08:00
schema = Type . String ()
2026-05-20 22:43:31 +08:00
}
2026-07-28 21:32:47 +08:00
if ( ! schema . description ) {
2026-07-28 21:44:56 +08:00
schema . description = `The field ' ${ fieldName } ' represents ${ fieldDesc } .`
2026-05-20 22:43:31 +08:00
}
properties [ f . id ] = schema
}
return Type . Object ( properties )
}
2026-05-31 10:20:20 +08:00
function escapeXml ( str : string ) : string {
return str
. replace ( /&/g , '&' )
. replace ( /</g , '<' )
. replace ( />/g , '>' )
. replace ( /"/g , '"' )
. replace ( /'/g , ''' )
}
export function formatSkillsForPrompt (
skills : Array < { id : string ; name : string ; description? : string | null } > ,
) : string {
if ( skills . length === 0 ) {
return ''
}
const lines = [
'\n\nThe following skills provide specialized instructions for specific tasks.' ,
"Use the read_skill tool to load a skill's file when the task matches its description." ,
'When a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.' ,
'' ,
'<available_skills>' ,
]
for ( const skill of skills ) {
const filePath = path . join ( process . cwd (), '.pi' , 'skills' , skill . id , 'SKILL.md' )
lines . push ( ' <skill>' )
2026-07-21 10:42:01 +08:00
lines . push ( ` <id> ${ escapeXml ( skill . id ) } </id>` )
2026-05-31 10:20:20 +08:00
lines . push ( ` <name> ${ escapeXml ( skill . name ) } </name>` )
lines . push ( ` <description> ${ escapeXml ( skill . description || 'No description' ) } </description>` )
lines . push ( ` <location> ${ escapeXml ( filePath ) } </location>` )
lines . push ( ' </skill>' )
}
lines . push ( '</available_skills>' )
return lines . join ( '\n' )
}
2026-06-01 23:29:11 +08:00
import { WorkflowTaskType } from '@shumai/db'
2026-07-23 11:02:54 +08:00
import { registerActivities , registerWorkflow } from '@shumai/workflow-core'
2026-06-01 23:29:11 +08:00
import * as agentActivities from './activities/agent'
import * as aiActivities from './activities/ai'
2026-07-23 11:02:54 +08:00
import { agentAutofillMedia } from './workflows/agent-autofill'
import { agentChat } from './workflows/agent-chat'
import { agentEmbeddingMedia } from './workflows/agent-embedding'
import { agentToolCall } from './workflows/agent-tool-call'
import { queryEmbeddingForSearch } from './workflows/query-embedding-for-search'
2026-06-01 23:29:11 +08:00
export function initAgentWorkflows() {
registerWorkflow ( WorkflowTaskType . ai_embedding , agentEmbeddingMedia )
registerWorkflow ( WorkflowTaskType . query_embedding_for_search , queryEmbeddingForSearch )
registerWorkflow ( WorkflowTaskType . ai_metadata_autofill , agentAutofillMedia )
registerWorkflow ( WorkflowTaskType . chat , agentChat )
registerWorkflow ( WorkflowTaskType . agent_tool_call , agentToolCall )
registerActivities ( agentActivities )
registerActivities ( aiActivities )
}
export * from './activities/agent'
export {
2026-07-28 16:13:40 +08:00
extractAiMetadataActivity ,
generateEmbeddingActivity ,
generateImageEmbeddingActivity ,
generateTextEmbeddingActivity ,
generateVideoChunkEmbeddingActivity ,
type ExtractAiMetadataParams ,
type GeneratedEmbedding ,
type GenerateEmbeddingParams ,
type GenerateTextEmbeddingParams ,
2026-06-01 23:29:11 +08:00
} from './activities/ai'
2026-07-23 11:02:54 +08:00
export * from './database-session-storage'
2026-06-01 23:29:11 +08:00
export * from './workflows/agent-autofill'
export * from './workflows/agent-chat'
export * from './workflows/agent-embedding'
export * from './workflows/agent-tool-call'
export * from './workflows/query-embedding-for-search'