WeKnora/internal/application/repository
nullptr-error 18d22b014b
feat(sandbox): expose tenant skill management over HTTP and in the console (#2789)
* feat(sandbox): enhance skill management in sandbox configurations

Updated the skill management system to allow listing, installing, and removing skills within sandbox configurations. The ListSkills function now accepts a sandboxConfigID to filter skills based on the selected configuration. Introduced a new SandboxSkillsDrawer component for managing skills through the UI, along with necessary updates to the API and localization files to support these features.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: keep skill maintenance sessions out of the console session list

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: store and expose the installer transcript locators

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: record the skill installer agent's conversation

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: stream and persist the installer transcript during a skill install

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: expose install transcript locators on the skill type

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: add the floating skill install transcript window

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: open the install transcript from the sandbox skills drawer

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(sandbox): 重构技能安装体验,支持内联时间线、编辑第4步及保留镜像指针

- 替换右下角浮窗为内联安装时间线 (SkillInstallTimeline.vue)
  - 新增 GET /api/v1/sandbox-configs/:id/skills/:skillId/transcript 接口,支持回放与追尾
  - 移除 /sessions/continue-stream 依赖,避免 404 问题
  - 事件日志以 install_prompt 开头,不再将工具调用 preamble 拼入最终答案
  - 删除 SkillInstallTranscript.vue,技能条目下可展开/折叠时间线

- 编辑向导新增第 4 步「管理技能」
  - Cube/E2B 环境:连接 → 模板 → 运行配置 → 技能(第4步)
  - Docker/Local 环境:无第4步(无快照镜像)
  - 首次创建必须按 1→2→3 顺序,第3步保存成功后自动进入第4步
  - 已有配置支持步骤条数字跳转,可直接访问任意步骤
  - 卡片菜单「管理技能」打开同一抽屉并定位至第4步
  - SandboxSkillsDrawer.vue 重命名为 SandboxSkillsPanel.vue,去除独立抽屉壳

- 修复保存运行配置时冲掉 skill_image 的问题
  - 顶部展示信息(基础模板/快照ID/版本/构建时间)读取 config.skill_image
  - 编辑器保存 payload 不再包含 skill_image,合并时保留已有 SkillImage 和 VolumeMount
  - MergeSandboxConfigForUpdate 增加对 SkillImage 和 VolumeMount 的保护
  - 已冲掉的配置需重新安装技能才能恢复镜像指针

- 「查看安装过程」在安装开始时即显示
  - 技能列表中出现「正在安装」状态即展示按钮
  - 若记录尚未写入,展示等待提示并自动重试,避免误报「没有留下记录」

* 沙盒内技能目录从 UUID 改成 SKILL.md 的 name。

* fix(sandbox): heal stuck skill rows and block planted maintenance sessions

The reaper left a mid-upgrade install spinning forever when the old snapshot was still live, and restored removals to ready after the pointer had already moved. Client session create/update can no longer hide chats behind the skill_maintenance: prefix.

* style: gofumpt the skill reaper test stubs

* style: satisfy golangci on the tenant skill admin API

* feat(sandbox): rebuild skill images at turn boundaries, not mid-exec

Hold a session turn lease through AgentQA so an install cannot tear down
the live sandbox between tool calls; the next turn's first resolve picks
up the new image. Configs can instead keep existing sandboxes and boot
the new snapshot only for new sessions.

* fix(sandbox): judge stuck skill runs from the snapshot chain

InstalledSnapshotID only records the generation that installed a skill; later
installs of other skills advance the live pointer without rewriting older rows.
Comparing those IDs made the reaper fail healthy installs and delete live
skills whose removal had stalled.

---------

Co-authored-by: hailongzhao <hailongzhao@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-08-25 11:28:12 +08:00
..
retriever feat(memory): add cross-session long-term memory 2026-08-13 18:00:02 +08:00
agent_share.go fix: harden shared agent source permissions 2026-07-30 12:28:23 +08:00
agent_share_source_test.go fix: harden shared agent source permissions 2026-07-30 12:28:23 +08:00
audit_log.go feat(knowledge): add scoped activity audit trail 2026-07-23 10:50:32 +08:00
audit_log_scope_test.go feat(knowledge): add scoped activity audit trail 2026-07-23 10:50:32 +08:00
chunk.go fix(retrieval): 分段中删除的图片不再被检索到 2026-08-20 12:01:28 +08:00
chunk_faq_diff_test.go feat(knowledge): enhance FAQ export functionality 2026-07-23 10:50:32 +08:00
chunk_revision_test.go feat(knowledge): support editable chunks and metadata 2026-07-28 20:23:48 +08:00
chunk_sqlite_test.go fix(chunk): sanitize context headers before persistence 2026-08-14 00:33:09 +08:00
custom_agent.go feat(sandbox) (#2301) 2026-08-10 21:28:20 +08:00
datasource_repo.go fix(datasource): restore sync_deletions on the in-memory object after create 2026-08-21 16:37:05 +08:00
datasource_repo_test.go fix(datasource): restore sync_deletions on the in-memory object after create 2026-08-21 16:37:05 +08:00
embed_channel.go feat(embed): add backend embed channels with auth and rate limiting (#1657) 2026-06-12 23:10:39 +08:00
kbshare.go feat(rbac): lift org membership from per-user to per-tenant (Plan 3, #1303) 2026-05-18 17:28:58 +08:00
knowledge.go fix(datasource): perform real sync deletions scoped per data source (#2690) 2026-08-13 19:52:44 +08:00
knowledge_create_test.go fix(knowledge): default custom metadata on create 2026-07-28 22:22:59 +08:00
knowledge_datasource_external_id_test.go fix(datasource): perform real sync deletions scoped per data source (#2690) 2026-08-13 19:52:44 +08:00
knowledge_duplicate_test.go fix(knowledge): harden file-type scoped duplicate detection 2026-07-29 10:36:17 +08:00
knowledge_finalize_test.go feat(knowledge): store folder path for folder uploads and expose folder tree API 2026-08-04 20:45:29 +08:00
knowledge_folder_move_test.go refactor(knowledge): improve folder path handling and add tests for underscore scenarios 2026-08-04 20:45:29 +08:00
knowledge_folder_test.go refactor(knowledge): improve folder path handling and add tests for underscore scenarios 2026-08-04 20:45:29 +08:00
knowledge_list_filter_test.go fix(knowledge): stop async delete from leaving visible/zombie rows (#2192) 2026-07-22 17:30:14 +08:00
knowledge_metadata_prefix_test.go feat(memory): add cross-session long-term memory 2026-08-13 18:00:02 +08:00
knowledge_source_schema_test.go fix(schema): expand knowledge source length 2026-06-05 15:12:25 +08:00
knowledge_span_repo.go feat: implement CancelOpenSpansByName method and related tests 2026-05-28 20:16:02 +08:00
knowledge_span_repo_test.go fix(spans): expand knowledge span name column and truncate long wiki names 2026-07-13 10:35:44 +08:00
knowledge_tag.go fix(knowledge): address auto-tag review findings 2026-08-07 15:01:01 +08:00
knowledge_tag_test.go feat: 增加自动添加标签的功能 2026-08-07 15:01:01 +08:00
knowledgebase.go fix(model): block deletion when model is referenced by KB or agent 2026-06-23 20:36:16 +08:00
knowledgebase_sqlite_test.go feat: 增加自动添加标签的功能 2026-08-07 15:01:01 +08:00
mcp_oauth.go fix(mcp): coordinate OAuth token refresh and authorization polling 2026-07-23 15:35:24 +08:00
mcp_oauth_test.go fix(mcp): coordinate OAuth token refresh and authorization polling 2026-07-23 15:35:24 +08:00
mcp_service.go feat: add built-in MCP service support 2026-03-05 21:57:01 +08:00
mcp_tool_approval_repository.go fix(agent): 加固 MCP 工具人审批的跨实例与并发语义 2026-05-10 22:57:12 +08:00
memory.go feat(memory): add forced consolidation feature and related i18n updates 2026-08-13 18:00:02 +08:00
message.go feat(memory): add cross-session long-term memory 2026-08-13 18:00:02 +08:00
message_owner_scope_test.go feat(memory): add cross-session long-term memory 2026-08-13 18:00:02 +08:00
message_suggestion.go feat(agent): add question suggestions with after-answer follow-ups 2026-07-14 11:17:25 +08:00
model.go fix(repository): correct query syntax to get correctly built-in models 2026-05-21 16:11:22 +08:00
model_usage.go feat(sandbox) (#2301) 2026-08-10 21:28:20 +08:00
model_usage_test.go feat(sandbox) (#2301) 2026-08-10 21:28:20 +08:00
organization.go feat(rbac): lift org membership from per-user to per-tenant (Plan 3, #1303) 2026-05-18 17:28:58 +08:00
resource.go perf(storage): reuse a live resource access grant per resource 2026-08-05 14:42:51 +08:00
session.go feat(sandbox): expose tenant skill management over HTTP and in the console (#2789) 2026-08-25 11:28:12 +08:00
session_test.go feat(sandbox): expose tenant skill management over HTTP and in the console (#2789) 2026-08-25 11:28:12 +08:00
storagebackend.go feat(storage): add multi-instance storage backends per workspace 2026-07-15 14:54:39 +08:00
system_setting.go feat(system): consolidate system admin and settings into one Settings panel 2026-05-26 21:13:56 +08:00
tag.go fix(knowledge): harden multi-tag data integrity and UX follow-ups 2026-06-26 10:52:52 +08:00
task_queue.go fix(wiki): prevent finalizing stalls on enqueue failure 2026-07-28 20:54:48 +08:00
task_queue_test.go fix(wiki): prevent finalizing stalls on enqueue failure 2026-07-28 20:54:48 +08:00
temporary_document.go feat(chat): add session-scoped temporary attachments with async parsing 2026-07-16 17:41:27 +08:00
tenant.go feat: add scoped tenant api keys 2026-07-07 12:00:13 +08:00
tenant_api_key.go feat: support updating API key configuration 2026-08-12 11:43:03 +08:00
tenant_api_key_test.go feat: support updating API key configuration 2026-08-12 11:43:03 +08:00
tenant_disabled_shared_agent.go feat(agent): enhance agent and skill management features 2026-02-09 11:40:25 +08:00
tenant_invitation.go feat(rbac): add multi-use share-link invitations for invite_only mode (#1504) 2026-05-27 19:42:01 +08:00
tenant_member.go fix(repository): qualify tenant_id with table name to resolve ambiguous column reference 2026-05-21 21:22:41 +08:00
tenant_sandbox_config.go feat(sandbox): expose tenant skill management over HTTP and in the console (#2789) 2026-08-25 11:28:12 +08:00
tenant_sandbox_config_test.go feat(sandbox) (#2301) 2026-08-10 21:28:20 +08:00
tenant_skill.go feat(sandbox): expose tenant skill management over HTTP and in the console (#2789) 2026-08-25 11:28:12 +08:00
tenant_skill_test.go feat(sandbox): expose tenant skill management over HTTP and in the console (#2789) 2026-08-25 11:28:12 +08:00
tenant_test.go feat: add scoped tenant api keys 2026-07-07 12:00:13 +08:00
user.go feat(auth): support tenantless provisioning and gated self-service workspace creation 2026-07-13 18:13:51 +08:00
user_resource_favorite.go feat(favorites): implement user favorites and recents functionality 2026-05-18 17:28:58 +08:00
user_tenantless_test.go feat(auth): support tenantless provisioning and gated self-service workspace creation 2026-07-13 18:13:51 +08:00
vectorstore.go feat: add VectorStore service layer with types and connection testing 2026-04-13 22:57:17 +08:00
web_search_provider.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
wiki_page.go fix(wiki): exclude archived pages from stats queries 2026-08-06 11:41:32 +08:00
wiki_page_test.go fix(wiki): exclude archived pages from stats queries 2026-08-06 11:41:32 +08:00