mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-19 14:16:29 +00:00
* refactor(agent)!: migrate sessions to Pi Durable Replace patched AgentHarness storage with per-session SQLite and PostgreSQL commit mirroring. Migrate legacy history automatically and run agent queues with the main server. BREAKING CHANGE: Remove standalone agent workers and return native Pi entry records from chat history APIs. * fix(agent): constrain session log dialog scrolling Keep the header visible and wrap long output while log entries and expanded records scroll within the dialog. Cover desktop and narrow viewports through the dashboard Sessions flow. * fix(agent): hide entry IDs from session log card headers Retain internal entry IDs in expanded raw records for debugging. Verify that card headers omit the IDs while raw JSON preserves them. * test(e2e): handle browser wheel limits in session log checks Verify that a normal wheel event moves the viewport before explicitly scrolling to the final record. Keep the dialog bounds, fixed header, wrapping, and expanded-record assertions. * fix(agent): select model providers without inheriting unrelated auth * fix(webui): prevent resize feedback when toggling agent panel * test(agent): reproduce concurrent comment session races * fix(agent): serialize comment sessions and deduplicate history * docs(changelog): consolidate Pi Durable changes into one entry
60 lines
1.5 KiB
TypeScript
60 lines
1.5 KiB
TypeScript
#!/usr/bin/env bun
|
|
import { bunPluginPino } from 'bun-plugin-pino'
|
|
import tailwindPlugin from 'bun-plugin-tailwind'
|
|
import { existsSync } from 'fs'
|
|
import { rm } from 'fs/promises'
|
|
|
|
console.log('\n🚀 Starting build process...\n')
|
|
|
|
const outdir = 'dist'
|
|
const target = process.argv[2] || 'all'
|
|
|
|
if (existsSync(outdir) && target === 'all') {
|
|
console.log(`🗑️ Cleaning previous build at ${outdir}`)
|
|
await rm(outdir, { recursive: true, force: true })
|
|
}
|
|
|
|
if (target === 'all' || target === 'web') {
|
|
await Bun.build({
|
|
entrypoints: ['./apps/web/src/index.ts'],
|
|
root: '.',
|
|
target: 'bun',
|
|
outdir: outdir,
|
|
minify: true,
|
|
splitting: true,
|
|
naming: '[name].[ext]',
|
|
plugins: [tailwindPlugin, bunPluginPino({ transports: ['pino-pretty'] })],
|
|
external: ['@dbos-inc/dbos-sdk', 'pg', 'pdfkit'],
|
|
define: {
|
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
},
|
|
})
|
|
}
|
|
|
|
const allWorkers = [
|
|
{
|
|
name: 'transcode',
|
|
entrypoint: './apps/transcode/src/index.ts',
|
|
naming: 'transcode-worker.[ext]',
|
|
},
|
|
]
|
|
|
|
const workersToBuild = target === 'all' ? allWorkers : allWorkers.filter((w) => w.name === target)
|
|
|
|
for (const worker of workersToBuild) {
|
|
await Bun.build({
|
|
entrypoints: [worker.entrypoint],
|
|
root: '.',
|
|
target: 'bun',
|
|
outdir: outdir,
|
|
minify: true,
|
|
splitting: false,
|
|
naming: worker.naming,
|
|
plugins: [bunPluginPino({ transports: ['pino-pretty'] })],
|
|
external: ['@dbos-inc/dbos-sdk', 'pg', 'pdfkit'],
|
|
define: {
|
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
},
|
|
})
|
|
}
|