WeKnora/migrations/sqlite
nullptr-error 22cbcdfa57
feat(sandbox): run unpinned Lite sessions on the host OS sandbox (#3549)
* feat(sandbox): resolve workspace paths through WorkspaceLayout

Keep remote sessions on the /workspace contract, while file, shell, and
artifact code follow the session layout instead of hardcoded paths.

* fix(sandbox): fail closed on host layout lookup and restore the shell blacklist

Treat host vs remote as an explicit origin, refuse inspect outside ReadRoots,
and skip collection when the output tree is missing or equals the project root.

* fix(sandbox): close leftover fail-open holes in the layout path

Keep host copy, collection, and prompt text from falling back to /workspace when a lookup fails or an adapter returns unclean roots.

* fix(sandbox): satisfy golangci-lint on the layout helpers

Wrap new copy and test lines to 120 columns, and add the exported comments revive requires.

* fix(sandbox): gofmt the read_file layout copy wrap

* feat(sandbox): add host as an OS-enforced backend type

Host is not a named/pinnable config: each command is a fresh local process, unlike Docker, Cube, and E2B.

* feat(session): persist Lite host workspace directory

Empty means an auto-allocated folder. Standard edition leaves the column unused so the shared session model still loads. SQLite also gains the tenant skill tables Lite shell_exec already expects.

* feat(localsandbox): adapt the host OS sandbox to session interfaces

File tools stay outside Seatbelt and are bounded by PathGuard. A revoked project directory fails closed instead of allocating a replacement workspace.

* feat(sandbox): run unpinned Lite sessions on the host backend

Lite opts into host explicitly; web stays disabled when no named remote config exists. Host workspaces are not destroyed or auto-committed.

* feat(desktop): pick and persist host project directories

The native folder dialog is the authorization path; typed paths are rejected. settings.sandbox.host tells the client when this edition can use it.

* fix(sandbox): fail closed on Lite host layout lookup misses

Unpinned host sessions were described as /workspace when pin read or
sandbox resolve failed. Prompts and attachment staging now share the
same fallback so Lite never pretends the remote tree exists.

* fix(frontend): keep settings.sandbox.host in sync with the backend keys

TestDeploymentCapabilityKeysMatchFrontend requires the lists to match. Host stays fail-closed like docker so a missed probe does not show Lite-only UI.

* fix(lint): satisfy golangci-lint on the host sandbox wiring

Check c.Error, wrap lines over 120 columns, put context first on versionsWorkspace, and document exported adapter methods.

---------

Co-authored-by: hailongzhao <hailongzhao@tencent.com>
2026-09-22 19:35:03 +08:00
..
000000_init.down.sql Remove redundant Wiki operation log 2026-07-28 11:18:33 +08:00
000000_init.up.sql feat(sandbox) (#2301) 2026-08-10 21:28:20 +08:00
000001_remove_wiki_log.down.sql Remove redundant Wiki operation log 2026-07-28 11:18:33 +08:00
000001_remove_wiki_log.up.sql Remove redundant Wiki operation log 2026-07-28 11:18:33 +08:00
000002_knowledge_folder_path.down.sql feat(knowledge): store folder path for folder uploads and expose folder tree API 2026-08-04 20:45:29 +08:00
000002_knowledge_folder_path.up.sql feat(knowledge): store folder path for folder uploads and expose folder tree API 2026-08-04 20:45:29 +08:00
000003_knowledge_base_auto_tag_config.down.sql feat: 增加自动添加标签的功能 2026-08-07 15:01:01 +08:00
000003_knowledge_base_auto_tag_config.up.sql feat: 增加自动添加标签的功能 2026-08-07 15:01:01 +08:00
000004_memory.down.sql feat(memory): add cross-session long-term memory 2026-08-13 18:00:02 +08:00
000004_memory.up.sql feat(memory): add forced consolidation feature and related i18n updates 2026-08-13 18:00:02 +08:00
000005_messages_attachments_and_invitation_fields.down.sql fix(migrations): 补齐 SQLite 迁移与 versioned 的索引与数据迁移缺口 2026-08-20 14:35:49 +08:00
000005_messages_attachments_and_invitation_fields.up.sql fix(migrations): 补齐 SQLite 迁移与 versioned 的索引与数据迁移缺口 2026-08-20 14:35:49 +08:00
000006_task_queue_and_dead_letters.down.sql fix(migrations): 补齐 Lite 模式缺失的 SQLite 版本化迁移 2026-08-20 14:35:49 +08:00
000006_task_queue_and_dead_letters.up.sql fix(migrations): 补齐 Lite 模式缺失的 SQLite 版本化迁移 2026-08-20 14:35:49 +08:00
000007_system_admin_and_settings.down.sql fix(migrations): 补齐 Lite 模式缺失的 SQLite 版本化迁移 2026-08-20 14:35:49 +08:00
000007_system_admin_and_settings.up.sql fix(migrations): 补齐 Lite 模式缺失的 SQLite 版本化迁移 2026-08-20 14:35:49 +08:00
000008_processing_spans_and_pending_subtasks.down.sql fix(migrations): 补齐 Lite 模式缺失的 SQLite 版本化迁移 2026-08-20 14:35:49 +08:00
000008_processing_spans_and_pending_subtasks.up.sql fix(migrations): 补齐 SQLite 迁移与 versioned 的索引与数据迁移缺口 2026-08-20 14:35:49 +08:00
000009_embed_channel_memory_flag.down.sql fix(migrations): 补齐 Lite 模式缺失的 SQLite 版本化迁移 2026-08-20 14:35:49 +08:00
000009_embed_channel_memory_flag.up.sql fix(migrations): 补齐 Lite 模式缺失的 SQLite 版本化迁移 2026-08-20 14:35:49 +08:00
000010_knowledge_multi_tags.down.sql fix(migrations): 补齐 SQLite 迁移与 versioned 的索引与数据迁移缺口 2026-08-20 14:35:49 +08:00
000010_knowledge_multi_tags.up.sql fix(migrations): 补齐 SQLite 迁移与 versioned 的索引与数据迁移缺口 2026-08-20 14:35:49 +08:00
000011_principal_model.down.sql fix(migrations): 补齐 SQLite 迁移与 versioned 的索引与数据迁移缺口 2026-08-20 14:35:49 +08:00
000011_principal_model.up.sql fix(migrations): 补齐 SQLite 迁移与 versioned 的索引与数据迁移缺口 2026-08-20 14:35:49 +08:00
000012_message_usage.down.sql feat(agent): report and attribute per-turn LLM token usage 2026-08-24 10:36:19 +08:00
000012_message_usage.up.sql feat(agent): report and attribute per-turn LLM token usage 2026-08-24 10:36:19 +08:00
000013_mcp_tool_enabled.down.sql feat(mcp): add per-tool enable toggle (#2989) 2026-09-05 17:19:20 +08:00
000013_mcp_tool_enabled.up.sql feat(mcp): add per-tool enable toggle (#2989) 2026-09-05 17:19:20 +08:00
000014_browser_authorization.down.sql feat(browser): connect local Chrome with task controls and display modes (#3180) 2026-09-11 17:59:27 +08:00
000014_browser_authorization.up.sql feat(browser): connect local Chrome with task controls and display modes (#3180) 2026-09-11 17:59:27 +08:00
000015_memory_consistency.down.sql fix(memory): preserve extraction progress and atomic memory updates (#3224) 2026-09-13 00:04:16 +08:00
000015_memory_consistency.up.sql fix(memory): preserve extraction progress and atomic memory updates (#3224) 2026-09-13 00:04:16 +08:00
000016_memory_vector_search.down.sql fix(memory): rank memories by the query, not by importance 2026-09-13 11:43:17 +08:00
000016_memory_vector_search.up.sql fix(memory): rank memories by the query, not by importance 2026-09-13 11:43:17 +08:00
000017_dingtalk_stream_only.down.sql fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
000017_dingtalk_stream_only.up.sql fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
000018_session_fork.down.sql feat(session): fork conversations from a historical user message (#3304) 2026-09-17 14:20:18 +08:00
000018_session_fork.up.sql feat(session): fork conversations from a historical user message (#3304) 2026-09-17 14:20:18 +08:00
000019_fork_snapshot_lease.down.sql feat(session): fork conversations from a historical user message (#3304) 2026-09-17 14:20:18 +08:00
000019_fork_snapshot_lease.up.sql feat(session): fork conversations from a historical user message (#3304) 2026-09-17 14:20:18 +08:00
000020_chunks_index_diet.down.sql perf(chunk): speed up chunk ingestion and batch updates (#3369) 2026-09-17 21:38:15 +08:00
000020_chunks_index_diet.up.sql perf(chunk): speed up chunk ingestion and batch updates (#3369) 2026-09-17 21:38:15 +08:00
000021_knowledge_profiles.down.sql feat(knowledge): derive knowledge base descriptions from document profiles (#3370) 2026-09-17 22:21:55 +08:00
000021_knowledge_profiles.up.sql feat(knowledge): derive knowledge base descriptions from document profiles (#3370) 2026-09-17 22:21:55 +08:00
000022_mcp_endpoints.down.sql feat(mcp): add built-in MCP server with per-workspace endpoints (#3371) 2026-09-17 22:40:05 +08:00
000022_mcp_endpoints.up.sql feat(mcp): add built-in MCP server with per-workspace endpoints (#3371) 2026-09-17 22:40:05 +08:00
000023_message_artifacts_table.down.sql feat(artifacts): artifacts library page backed by a message_artifacts table (#3384) 2026-09-18 12:10:19 +08:00
000023_message_artifacts_table.up.sql feat(artifacts): artifacts library page backed by a message_artifacts table (#3384) 2026-09-18 12:10:19 +08:00
000024_message_context_checkpoint.down.sql feat(agent): persist compaction checkpoints across turns (#3407) 2026-09-18 20:38:56 +08:00
000024_message_context_checkpoint.up.sql fix(migrations): renumber the context checkpoint migration to 000105 2026-09-18 21:26:26 +08:00
000025_messages_session_created_index.down.sql feat(agent): size agent history by the window and calibrate token estimates (#3413) 2026-09-18 22:51:31 +08:00
000025_messages_session_created_index.up.sql feat(agent): size agent history by the window and calibrate token estimates (#3413) 2026-09-18 22:51:31 +08:00
000026_message_artifacts_deleted_at.down.sql feat(artifacts): let users delete generated files (#3447) 2026-09-20 13:01:46 +08:00
000026_message_artifacts_deleted_at.up.sql feat(artifacts): let users delete generated files (#3447) 2026-09-20 13:01:46 +08:00
000027_session_sandbox_config_tenant.down.sql fix(sandbox): resolve a session's pinned sandbox in the workspace that owns it (#3471) 2026-09-21 15:38:39 +08:00
000027_session_sandbox_config_tenant.up.sql fix(sandbox): resolve a session's pinned sandbox in the workspace that owns it (#3471) 2026-09-21 15:38:39 +08:00
000028_tenant_skills_and_env_vars.down.sql feat(sandbox): run unpinned Lite sessions on the host OS sandbox (#3549) 2026-09-22 19:35:03 +08:00
000028_tenant_skills_and_env_vars.up.sql feat(sandbox): run unpinned Lite sessions on the host OS sandbox (#3549) 2026-09-22 19:35:03 +08:00
000029_session_host_workspace_dir.down.sql feat(sandbox): run unpinned Lite sessions on the host OS sandbox (#3549) 2026-09-22 19:35:03 +08:00
000029_session_host_workspace_dir.up.sql feat(sandbox): run unpinned Lite sessions on the host OS sandbox (#3549) 2026-09-22 19:35:03 +08:00