* 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
* fix(security): improve access control and storage security
* fix(security): set NODE_ENV in dockerfiles and sign local storage get urls with lru cache
- Upgrade Bun to 1.4.4 across Dockerfiles, CI workflows, and release configurations.
- Update @types/bun and bun-types.
- Remove eslint-plugin-prettier and update format script to use native bun fmt.
- Configure .prettierignore to exclude packages/webui/public and minified files.
* feat(workflow): migrate workflow engine from temporal to dbos
Replace Temporal and LocalExecutor with DBOS Transact (@dbos-inc/dbos-sdk) as the unified workflow engine. Background tasks, media transcoding, and AI agent workflows now execute with durable steps and task queues directly against PostgreSQL, eliminating the need for an external Temporal cluster and separate polling executors.
* fix(workflow): submit tasks via DBOSClient to allow enqueueing from steps
Enqueuing workflows using DBOS.enqueueWorkflowWithOptions threw a
DBOSInvalidWorkflowTransitionError when triggered from within a running
step or activity (e.g. creating embedding or autofill tasks during
video transcoding).
Use DBOSClient to submit and cancel workflow tasks directly against the
system database, detaching execution from the ambient workflow/step
context.
* feat(web): support SHUMAI_WORKERS environment variable
* fix(workflow): ensure CLI tasks are enqueued to DBOS and run DBOS migrations in global setup
- Initialize workflows and wait for pending DBOS submissions in shumai regenerate-embeddings CLI
- Remove no-op submit bypass and enqueue tasks via DBOSClient in producer and CLI contexts
- Add DBOS migration runner in test global setup to avoid concurrent migration deadlocks across test forks
- Update changelog and add regression tests
* fix(workflow): ensure unique per-instance executor identity for worker replicas
- Derive unique per-instance DBOS executor IDs across worker replicas
- Support SHUMAI_WORKER_ID, DBOS__VMID, and POD_NAME (Kubernetes Downward API)
- Disambiguate multi-replica bare metal/container deployments with host, PID, and instance suffix
- Prevent startup recovery from re-enqueueing workflows actively executed by other live workers
- Add multi-instance startup recovery tests and update deployment documentation
* fix(workflow): only register listened queues and update concurrency on change
- Only register queues that the executor instance actively listens to
- Use always_update conflict resolution so environment variable changes take effect on restart
- Prevent dedicated workers from overwriting unmanaged queue concurrency configurations
- Add tests verifying concurrency updates and queue isolation across worker roles
* refactor(workflow): simplify activities to use defineStep and direct calls (#482)
* refactor(workflow): simplify activities to use defineStep and direct calls
- Wrap activities using defineStep from @shumai/workflow-core
- Remove obsolete getActivities, registerActivities, dynamic activity proxies, and workerQueue arguments
- Remove executor.ts and registry.ts, consolidating workflow registration into workflow.ts
- Call activities directly across transcode and agent workflows
- Update all corresponding workflow tests and developer guide documentation
* fix(workflow): properly detect DBOSWorkflowCancelledError in runOnCancel fallback
- DBOSWorkflowCancelledError in DBOS SDK does not set name, inheriting 'Error'
- Implement isDbosWorkflowCancelledError checking instanceof, constructor.name, and dbosErrorCode
- Update unit tests to verify real DBOS SDK cancellation error instances
* docs(workflow): update documentation and readme for dbos migration
- Rename docs/configuration/temporal.mdx to docs/configuration/distributed.mdx
- Document DBOS-based distributed worker architecture and task queues
- Remove obsolete docker-compose/temporal/
- Update environment variables documentation in docs/configuration/env-variables.mdx
- Update references in README.md, README_CN.md, docs/docs.json, and related guides
* feat(deploy): implement KEDA ScaledJob and scale-to-zero On-Demand transcoding (#483)
* feat(deploy): add shumai-transcode docker image and k8s autoscaling example with garage s3
* docs(k8s): document port-forwarding and in-cluster s3 domain mapping
* feat(storage): support public s3 endpoint for browser uploads and update k8s example
* fix(k8s): configure s3 bucket cors rules in garage initialization
* fix(k8s): increase transcode worker memory limit to 4Gi for 4K video encoding
* feat(deploy): add AWS EKS deployment with Graviton3 Spot nodegroups and autoscaling
* docs(deploy): redesign EKS documentation, rename k8s to eks, and add scalable deployment feature
* docs: rephrase DBOS feature bullet to Durable Workflows via DBOS
* docs(eks): upgrade default instances to Graviton5 c9g.large and c9g.xlarge
* feat(eks): use On-Demand for general nodegroup and add spot capacity diversification
* docs(eks): fix Architecture diagram to locate all transcode worker pods in Transcode Compute Pool
* feat(deploy): implement KEDA ScaledJob and scale-to-zero On-Demand transcoding
* feat(transcode): support idle-timeout auto-drain for KEDA scaled jobs
* fix(deploy): fix EKS deployment manifests and documentation based on cluster verification
- Upgrade @inlang/paraglide-js to 2.25.0 in root devDependencies
- Untrack 2,700+ generated paraglide files from git index
- Ignore packages/webui/paraglide in .gitignore and .dockerignore
- Remove --no-emit-git-ignore flag from i18n:compile and i18n:watch
- Chain bun run i18n:compile into build and build-npm scripts
- Add i18n compile step in Dockerfile builder stage
- Add i18n compile step in CI workflows (.github/workflows/ci.yaml, release-npm.yaml)
- Update README.md and README_CN.md with local setup instructions for i18n compilation
* chore(deps): upgrade bun to 1.4.2 and update packages
- Upgrade Bun to 1.4.2 in Dockerfile, CI workflows, and release workflows.
- Update dependencies across workspace with Bun 1.4.2.
- Preserve @earendil-works/pi-agent-core at 0.82.1.
- Retain stable compatible versions for database adapters and pdfjs-dist.
- Add explicit Buffer type annotation in transcode service.
* chore(deps): upgrade prisma to 7.10.0, pg to 8.23.0, and pdfjs-dist to 6.3.289
* chore(deps): revert dotenv-expand to 13.0.0
* feat(auth): add admin password reset CLI command and reset password web UI
* fix(auth): invalidate previous reset tokens and use AsyncLocalStorage for link capture
* feat(kanban): implement AI-native kanban database models, services, and REST APIs
* feat(webui): implement team kanban board and task management
* style(webui): increase kanban dialog widths and form container
* fix(webui): ensure kanban dialogs override sm:max-w-lg base class
* style(webui): set edit task dialog max width to 5xl
* chore: untrack kanban plan markdown files
* feat(webui): update kanban page layout to 2 columns and refine task activity UI
* fix(webui): constrain kanban column and board heights for vertical scrolling
* feat(kanban): unify task status transition into updateTask API and allow unconstrained human task transitions
* fix(webui): add optimistic updates to kanban drag-and-drop to eliminate flash
* refactor(webui): remove client-side search box from kanban header
* feat(kanban): redesign task dialog comments area and add attachment support
* refactor(webui): remove top status action bar from task info dialog
* fix(webui): narrow query cache predicate and add defensive guards for kanban drag optimistic update
* feat(kanban): add drag-and-drop task reordering with fractional indexing (#331)
* feat(kanban): add drag-and-drop task reordering with fractional indexing
* fix(kanban): improve card drop zones, snap indicators, and column highlight
* fix(kanban): enable card droppables only during active drag
* fix(kanban): refine hover styles and drop indicators for column boundaries
* fix(kanban): unify bottom drop indicator and fix top indicator clipping
* fix(kanban): ensure full column highlight and full coverage drop target
* minor change
* feat(kanban): allow agent tasks free drag-and-drop and enforce status change permissions (#332)
* refactor(kanban): rename task_type_agentic translation keys to task_type_agent
* feat(kanban): refactor task type enum to isAgentTask boolean (#333)
* refactor(kanban): remove phase 2 agent execution logic and streamline phase 1 kanban
* feat(kanban): add notifications and audit logging for kanban (#334)
* feat(kanban): redesign config area layout and add parent tasks multi-selector (#335)
* feat(webui): redesign kanban task dialog config area
* feat(kanban): simplify task dependencies with parent tasks multi-selector
* refactor(kanban): remove unused links routes and legacy dependency methods
* feat(kanban): connect assets and kanban tasks with many-to-many relationship (#336)
* feat(kanban): connect assets and kanban tasks with many-to-many relationship
* feat(kanban): improve asset picker layout, infinite scrolling, and breadcrumb icon styling
* fix(kanban): ensure asset picker scrollarea is scrollable with min-h-0 and shrink-0 flex styling
* fix(kanban): hide recently deleted in folder tree picker and adjust header padding
* fix(kanban): use lucide files icon instead of paperclip for linked assets
* feat(kanban): improve task deletion, goal sidebar interaction, and card styling (#337)
* feat(kanban): improve task deletion, goal sidebar interaction, and card styling
* feat(kanban): move agent task badge after priority and update to orange style
* feat(kanban): add status Compare-And-Swap (CAS) to prevent drag-and-drop race conditions (#338)
* feat(kanban): add status Compare-And-Swap (CAS) to prevent drag-and-drop race conditions
* style(kanban): rotate kanban icon 180 degrees in sidebar and top nav
* style(kanban): remove rotate-180 from SquareKanban icons
* feat(kanban): add unassigned goal record and fix all tasks count (#339)
* feat(kanban): add unassigned goal record and fix all tasks count
* feat(kanban): toggle task count with three-dot action button on goal card hover
* fix(ci): pin bun version to 1.3.14 across CI and Docker (#340)
* fix(webui): truncate goal name to max 2 lines in kanban sidebar (#341)
* feat(agent): type-safe CREATION_CONTEXT metadata on create_file/create_version
Build the create_file and create_version tool metadata parameter from the
project's CREATION_CONTEXT fields at harness creation time, instead of the
schemaless key-value map that required the agent to call list_autofill_fields
first.
- Thread projectId from the chat workflow into createAgentSession and build
a strict, all-required (nullable) metadata schema via fieldsToTypeBoxSchema
(additionalProperties: false, option IDs enforced via enum).
- Remove the list_autofill_fields tool and its activity case.
- Reject metadata keys that are not CREATION_CONTEXT fields of the target
project with a clear non-retryable error telling the agent to omit metadata.
- Skip null metadata values when persisting (create_file/create_version and
the autofill workflow).
- Switch the touched schemas from @sinclair/typebox 0.34 to typebox v1 to
match the harness validator.
* refactor(agent): migrate remaining tools from @sinclair/typebox 0.34 to typebox v1
All agent tool schemas now use the same typebox v1 package as the harness
validator; drop the @sinclair/typebox 0.34 dependency from @shumai/agent.
* test(agent): reproduce null coercion in harness tool validation
The pi-ai harness (<=0.82.1) coerces null values in [string, null] unions to
'' during tool argument validation for typebox v1 schemas. A valid create_file
call with path: null + data: {...} therefore arrives at execute with path: ''
and fails with 'Provide exactly one of path or data'. Null metadata values
(the 'unknown' sentinel) are likewise turned into ''.
This test reproduces both failures. It is expected to fail until
@earendil-works/pi-ai is upgraded to >=0.84.0 (#7328), which preserves values
that already match a union arm.
* fix(agent): patch pi-ai 0.82.1 to preserve null in nullable union tool args
Apply the upstream fix for earendil-works/pi#7328 (PR #7373) via a bun
patch instead of upgrading pi-ai. coerceWithUnionSchema now returns the
original value when it already validates against any union member,
instead of coercing null in [string, null] unions into "".
Fixes the create_file false "Provide exactly one of path or data" error
when the model passes path: null with data. Reproduced by
packages/agent/src/reproduce-tool-null-coercion.test.ts, which now passes.
* fix(docker): copy bun patch dir before frozen-lockfile install
The pi-ai patchedDependencies entry makes bun install --frozen-lockfile
fail in the builder stage because patches/ was not present in the image
yet. Copy it alongside package.json/bun.lock so the patch applies.
* refactor(agent): simplify metadata guidance in system prompt and error message
Shorten the create_file/create_version metadata instructions in the system
prompt and reword the invalid-metadata-key error to not reference
CREATION_CONTEXT internals. Update the matching test assertion.
This updates the Dockerfile and adds a scripts/docker-entrypoint.sh script.
Under native Linux (like Debian), when docker-compose mounts a host folder
as a volume (e.g. `./data:/app/data`), and the folder doesn't exist, the
docker daemon creates the folder as root-owned (`root:root`).
Because the container runs as a non-root user `bun`, it gets permission
denied (`EACCES`) when trying to write to the data directory.
To resolve this in a beginner-friendly way without manual host-side
permissions updates:
1. The runner stage now installs `gosu`.
2. At the end of the Dockerfile, the user switches back to `root` so the
container launches as root.
3. On launch, the entrypoint script executes. Since it runs as root, it
automatically changes ownership of `/app/data` to `bun:bun`.
4. The entrypoint script then uses `gosu` to drop privileges and launch the
actual server processes as the non-root `bun` user.