Repository navigation
feat: consolidate shareable Spaces and persistent download history - #1506
Conversation
A materialised Space records the absolute project path of the machine it was
built on - in its projectPath and in every tab's workingDirectory / filePath /
url, and shell-quoted in initialCommand - so exported verbatim it points at a
directory that exists on no other machine.
- WorkspacePortability.toPortable rewrites the Space's own project path to the
{projectPath} placeholder (the same token PredefinedWorkspaces templates use),
clearing projectPath; fromPortable substitutes a chosen project path back in,
reusing WorkspacePlaceholders.substituteProjectPath so the substitution - raw
for path fields, shell-quoted for commands - is exactly the one the host uses
when materialising a template, making a round trip faithful. Import mints a
fresh id so a shared Space cannot collide with or overwrite a local one.
- WorkspacePortabilityMcpToolProvider exposes workspace_make_portable and
workspace_resolve_portable, both readOnly = true pure transforms over the
serialized Space JSON (no host state), so an agent can produce a shareable
Space or bind a shared one to a local project; saving/opening stays with the
existing create_workspace / open_workspace tools.
- Registered beside WorkspaceMcpToolProvider in McpToolRegistryImpl.
Covered by WorkspacePortabilityTest (round-trip to the same and to a new project
path, placeholder replacement, no-project passthrough, invalid JSON) and
WorkspacePortabilityMcpToolProviderTest (each tool through its handler).
(cherry picked from commit 3372724)
…with MCP tools The browser's DownloadManager tracks live progress in memory and forgets everything on restart, so there is no record of what was downloaded in an earlier session. This adds a durable history. - DownloadHistoryManager persists ~/.boss/download-history.json following the contract every small BOSS state file follows: atomic writes via atomicWriteText, mutations serialized under a mutex, forward-coercing reads (ignoreUnknownKeys), and a bound of the 500 newest records. It exposes a StateFlow (newest first) a downloads UI can observe, plus record/remove/clear. - FluckEngine records each completed download at the existing DownloadFinished handler (one call inside the coroutine already there). - DownloadHistoryMcpToolProvider exposes downloads_history_list (readOnly = true) and downloads_history_clear (readOnly = false), so an agent that triggered a download can confirm what landed and where; the mutating gate leaves the read at ALLOW and routes the clear through the usual ASK approval. - Registered beside WorkspaceMcpToolProvider in McpToolRegistryImpl. Covered by DownloadHistoryManagerTest (record/derive-name/persist, bounded retention, remove, clear, mutex-serialized concurrent records, corrupt-file load) and DownloadHistoryMcpToolProviderTest (each tool through its handler). (cherry picked from commit 859888c)
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Claude diff review of 8c4d049 (no tests executed). Review: PR #1506 @ 8c4d049 →
|
|
This now conflicts with dev - |
fluck-boss
left a comment
There was a problem hiding this comment.
Conflicts with current dev in McpToolRegistryImpl.kt - needs a rebase before it can gate (details in comment).
|
The only conflict with current init {
registerProvider(WorkspaceMcpToolProvider)
registerProvider(WorkspacePortabilityMcpToolProvider)
registerProvider(DownloadHistoryMcpToolProvider)
registerProvider(SnippetMcpToolProvider)
registerProvider(NotificationMcpToolProvider)
registerProvider(IntrospectionMcpToolProvider)
}That is the entire clash - every other file in this PR is new (the two providers, the managers, the I've rebased both commits onto current |
56b3e1b to
4eb36a4
Compare
A materialised Space records the absolute project path of the machine it was
built on - in its projectPath and in every tab's workingDirectory / filePath /
url, and shell-quoted in initialCommand - so exported verbatim it points at a
directory that exists on no other machine.
- WorkspacePortability.toPortable rewrites the Space's own project path to the
{projectPath} placeholder (the same token PredefinedWorkspaces templates use),
clearing projectPath; fromPortable substitutes a chosen project path back in,
reusing WorkspacePlaceholders.substituteProjectPath so the substitution - raw
for path fields, shell-quoted for commands - is exactly the one the host uses
when materialising a template, making a round trip faithful. Import mints a
fresh id so a shared Space cannot collide with or overwrite a local one.
- WorkspacePortabilityMcpToolProvider exposes workspace_make_portable and
workspace_resolve_portable, both readOnly = true pure transforms over the
serialized Space JSON (no host state), so an agent can produce a shareable
Space or bind a shared one to a local project; saving/opening stays with the
existing create_workspace / open_workspace tools.
- Registered beside WorkspaceMcpToolProvider in McpToolRegistryImpl.
Covered by WorkspacePortabilityTest (round-trip to the same and to a new project
path, placeholder replacement, no-project passthrough, invalid JSON) and
WorkspacePortabilityMcpToolProviderTest (each tool through its handler).
(cherry picked from commit 3372724)
(cherry picked from commit 2ee0e91)
…with MCP tools The browser's DownloadManager tracks live progress in memory and forgets everything on restart, so there is no record of what was downloaded in an earlier session. This adds a durable history. - DownloadHistoryManager persists ~/.boss/download-history.json following the contract every small BOSS state file follows: atomic writes via atomicWriteText, mutations serialized under a mutex, forward-coercing reads (ignoreUnknownKeys), and a bound of the 500 newest records. It exposes a StateFlow (newest first) a downloads UI can observe, plus record/remove/clear. - FluckEngine records each completed download at the existing DownloadFinished handler (one call inside the coroutine already there). - DownloadHistoryMcpToolProvider exposes downloads_history_list (readOnly = true) and downloads_history_clear (readOnly = false), so an agent that triggered a download can confirm what landed and where; the mutating gate leaves the read at ALLOW and routes the clear through the usual ASK approval. - Registered beside WorkspaceMcpToolProvider in McpToolRegistryImpl. Covered by DownloadHistoryManagerTest (record/derive-name/persist, bounded retention, remove, clear, mutex-serialized concurrent records, corrupt-file load) and DownloadHistoryMcpToolProviderTest (each tool through its handler). (cherry picked from commit 859888c) (cherry picked from commit 8c4d049)
(cherry picked from commit d0a64766d211131ccb98686832d1b5d94778b3b4)
b0e2ebf to
86c7ad8
Compare
|
Claude diff review of ae06484 (no tests executed). Review — PR #1506 @
|
|
Claude diff review of a74a80f (no tests executed). Review: PR #1506 @
|
# Conflicts: # composeApp/src/commonMain/kotlin/ai/rever/boss/mcp/McpToolRegistryImpl.kt
# Conflicts: # composeApp/src/commonMain/kotlin/ai/rever/boss/mcp/McpToolRegistryImpl.kt
…iew/dev-pr1194-1195 # Conflicts: # composeApp/src/commonMain/kotlin/ai/rever/boss/components/workspaces/WorkspacePortability.kt # composeApp/src/commonMain/kotlin/ai/rever/boss/dashboard/WorkspacePlaceholders.kt # composeApp/src/commonMain/kotlin/ai/rever/boss/downloads/DownloadHistoryManager.kt # composeApp/src/commonMain/kotlin/ai/rever/boss/mcp/DownloadHistoryMcpToolProvider.kt # composeApp/src/desktopMain/kotlin/ai/rever/boss/plugin/browser/FluckEngine.kt # composeApp/src/desktopTest/kotlin/ai/rever/boss/components/workspaces/WorkspacePortabilityTest.kt # composeApp/src/desktopTest/kotlin/ai/rever/boss/downloads/DownloadHistoryManagerTest.kt # composeApp/src/desktopTest/kotlin/ai/rever/boss/mcp/DownloadHistoryMcpToolProviderTest.kt
Consolidated review of #1194 and #1195
This dev-targeted PR consolidates two legitimate, independent features from @Rushikeshiitb, reviewed together on current
origin/dev:The features do not duplicate each other. Their only shared file is
McpToolRegistryImpl, where both providers are registered. Both original commits are preserved separately, with Rushikesh's authorship and commit history intact; the registry conflict was resolved by retaining both registrations.Review / overlap search
origin/dev(bc9aa3b2f) andorigin/main(6d00b9049); this branch is based ondevand does not modify shareddevormain.boss workspace-diff- diff two saved Space files #1199, fix(security): confine DownloadDataProvider open and reveal to tracked downloads #1407, and fix(history): retain failed downloads and recent-page dismissals #1477; no true duplicate was found. fix(history): retain failed downloads and recent-page dismissals #1477 is separate failed-download/recent-page retention work and explicitly treats feat(downloads): persistent cross-session download history with MCP tools #1195 as adjacent.Validation
./gradlew :composeApp:desktopTest --tests 'ai.rever.boss.components.workspaces.WorkspacePortabilityTest' --tests 'ai.rever.boss.mcp.WorkspacePortabilityMcpToolProviderTest' --tests 'ai.rever.boss.downloads.DownloadHistoryManagerTest' --tests 'ai.rever.boss.mcp.DownloadHistoryMcpToolProviderTest':composeApp:compileKotlinDesktopcompleted as part of the focused test run.Both passed on current
dev(9.5.22). The original PRs remain available in their history and are being closed as superseded by this ready dev-targeted consolidation.