@myrialabs/clopen 0.4.47 → 0.4.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/backend/artifacts/project/sources.ts +1 -1
- package/backend/auth/auth-service.ts +52 -358
- package/backend/auth/onboarding.test.ts +2 -3
- package/backend/auth/permissions.test.ts +10 -20
- package/backend/auth/permissions.ts +4 -290
- package/backend/auth/rate-limiter.test.ts +8 -9
- package/backend/auth/rate-limiter.ts +0 -2
- package/backend/auth/tokens.ts +1 -8
- package/backend/bootstrap.ts +7 -0
- package/backend/chat/attachments.test.ts +88 -0
- package/backend/chat/attachments.ts +159 -0
- package/backend/chat/engine-handoff.test.ts +0 -2
- package/backend/chat/message-pages.test.ts +163 -0
- package/backend/chat/message-pages.ts +233 -0
- package/backend/chat/stream-manager.ts +91 -67
- package/backend/chat/turn-answer.test.ts +64 -0
- package/backend/chat/turn-answer.ts +125 -0
- package/backend/chat-apps/awaiting.test.ts +39 -0
- package/backend/chat-apps/awaiting.ts +49 -0
- package/backend/chat-apps/conversation.ts +746 -0
- package/backend/chat-apps/inbound.ts +324 -0
- package/backend/chat-apps/index.ts +309 -0
- package/backend/chat-apps/link-events.ts +20 -0
- package/backend/chat-apps/media.test.ts +62 -0
- package/backend/chat-apps/media.ts +208 -0
- package/backend/chat-apps/messages.test.ts +229 -0
- package/backend/chat-apps/messages.ts +365 -0
- package/backend/chat-apps/outbound.ts +243 -0
- package/backend/chat-apps/pairing.test.ts +45 -0
- package/backend/chat-apps/pairing.ts +74 -0
- package/backend/chat-apps/platforms/index.ts +20 -0
- package/backend/chat-apps/platforms/telegram.test.ts +35 -0
- package/backend/chat-apps/platforms/telegram.ts +191 -0
- package/backend/chat-apps/platforms/types.ts +114 -0
- package/backend/chat-apps/questions.ts +133 -0
- package/backend/chat-apps/runtime.ts +572 -0
- package/backend/chat-apps/storage.test.ts +201 -0
- package/backend/chat-apps/turns.test.ts +45 -0
- package/backend/chat-apps/turns.ts +208 -0
- package/backend/containers/pty.ts +3 -11
- package/backend/control/actions/accounts.ts +89 -0
- package/backend/control/actions/files.ts +116 -0
- package/backend/control/actions/models.ts +188 -0
- package/backend/control/actions/projects.ts +272 -0
- package/backend/control/actions/sessions.ts +280 -0
- package/backend/control/actions/skills.ts +111 -0
- package/backend/control/control.test.ts +169 -0
- package/backend/control/define.ts +20 -0
- package/backend/control/folders.test.ts +67 -0
- package/backend/control/index.ts +213 -0
- package/backend/control/invoke.ts +44 -0
- package/backend/control/links.ts +35 -0
- package/backend/control/paging.ts +26 -0
- package/backend/control/types.ts +117 -0
- package/backend/control/workspace.ts +127 -0
- package/backend/database/migrations/084_create_channel_links.ts +71 -0
- package/backend/database/migrations/085_add_home_projects.ts +36 -0
- package/backend/database/migrations/086_single_owner.ts +418 -0
- package/backend/database/migrations/087_create_blob_line_stats.ts +37 -0
- package/backend/database/migrations/index.ts +28 -0
- package/backend/database/queries/auth-queries.ts +7 -85
- package/backend/database/queries/blob-line-stats-queries.ts +48 -0
- package/backend/database/queries/channel-queries.ts +270 -0
- package/backend/database/queries/db-client-connection-queries.ts +18 -56
- package/backend/database/queries/file-share-queries.ts +5 -23
- package/backend/database/queries/git-identity-queries.ts +31 -42
- package/backend/database/queries/graph-queries.ts +1 -1
- package/backend/database/queries/index.ts +15 -1
- package/backend/database/queries/message-queries.test.ts +146 -0
- package/backend/database/queries/message-queries.ts +42 -1
- package/backend/database/queries/permission-set-queries.ts +1 -1
- package/backend/database/queries/profile-queries.ts +1 -1
- package/backend/database/queries/project-mcp-trust-queries.ts +1 -1
- package/backend/database/queries/project-queries.ts +50 -63
- package/backend/database/queries/session-queries.ts +28 -56
- package/backend/database/queries/ssh-connection-queries.ts +18 -41
- package/backend/db-client/env/diff.ts +9 -33
- package/backend/db-client/env/env.test.ts +8 -8
- package/backend/db-client/env/service.ts +1 -1
- package/backend/db-client/integrations/projector.ts +0 -5
- package/backend/engine/adapters/claude/message-converter.test.ts +47 -0
- package/backend/engine/adapters/claude/message-converter.ts +25 -2
- package/backend/engine/adapters/cline/message-converter.ts +0 -1
- package/backend/engine/adapters/cline/stream.ts +11 -15
- package/backend/engine/adapters/codex/message-converter.ts +0 -2
- package/backend/engine/adapters/copilot/message-converter.ts +1 -2
- package/backend/engine/adapters/cursor/message-converter.ts +0 -1
- package/backend/engine/adapters/opencode/message-converter.ts +2 -4
- package/backend/engine/adapters/opencode/stream.ts +11 -0
- package/backend/engine/adapters/parent-scope.test.ts +38 -0
- package/backend/engine/adapters/parent-scope.ts +44 -0
- package/backend/engine/adapters/pi/message-converter.ts +0 -1
- package/backend/engine/adapters/pi/stream.ts +4 -5
- package/backend/engine/adapters/qwen/message-converter.ts +0 -2
- package/backend/engine/bootstrap-default-engine.ts +2 -2
- package/backend/engine/docs/adapter-contract.md +8 -1
- package/backend/engine/install-runner.ts +8 -17
- package/backend/files/file-shares.ts +20 -44
- package/backend/files/file-size-limit.ts +3 -3
- package/backend/files/file-watcher.ts +19 -0
- package/backend/files/image-processing.ts +1 -1
- package/backend/files/os-clipboard.ts +2 -2
- package/backend/git/contributors.test.ts +35 -0
- package/backend/git/contributors.ts +46 -0
- package/backend/git/git-executor.ts +25 -5
- package/backend/git/git-service.ts +420 -19
- package/backend/git/identity/credential-helper.test.ts +2 -7
- package/backend/git/identity/import-local.test.ts +11 -16
- package/backend/git/identity/import-local.ts +12 -12
- package/backend/git/identity/index.ts +10 -24
- package/backend/git/identity/resolve.ts +13 -14
- package/backend/git/identity/scope-config.ts +33 -28
- package/backend/git/identity/service.ts +44 -47
- package/backend/git/op-lock.test.ts +111 -0
- package/backend/git/op-lock.ts +180 -0
- package/backend/git/remote-sync.test.ts +249 -0
- package/backend/host/metrics.ts +1 -1
- package/backend/http/bearer-auth.ts +1 -2
- package/backend/http/files-download.test.ts +8 -9
- package/backend/http/files-download.ts +2 -2
- package/backend/http/files-shared.test.ts +62 -89
- package/backend/http/files-shared.ts +2 -2
- package/backend/http/files-upload.test.ts +3 -7
- package/backend/http/files-upload.ts +3 -3
- package/backend/http/notes-images.test.ts +15 -38
- package/backend/http/notes-images.ts +6 -8
- package/backend/http/ssh-sftp.ts +5 -10
- package/backend/http/static-assets.test.ts +78 -0
- package/backend/http/static-assets.ts +104 -0
- package/backend/index.ts +32 -16
- package/backend/integrations/accounts.ts +61 -3
- package/backend/integrations/index.ts +2 -2
- package/backend/integrations/registry/define.ts +15 -0
- package/backend/integrations/registry/index.ts +2 -0
- package/backend/integrations/registry/providers/telegram.ts +54 -0
- package/backend/integrations/registry/types.ts +21 -1
- package/backend/integrations/webhooks/gateway.ts +7 -6
- package/backend/integrations/webhooks/verify.test.ts +30 -0
- package/backend/integrations/webhooks/verify.ts +4 -0
- package/backend/mcp/external/project.ts +1 -1
- package/backend/mcp/internal/remote-server.test.ts +1 -3
- package/backend/mcp/internal/remote-server.ts +4 -4
- package/backend/mcp/internal/servers/browser-automation/actions/dialogs.ts +67 -0
- package/backend/mcp/internal/servers/browser-automation/actions/index.ts +3 -1
- package/backend/mcp/internal/servers/browser-automation/actions/input.ts +5 -5
- package/backend/mcp/internal/servers/browser-automation/actions/tabs.ts +157 -28
- package/backend/mcp/internal/servers/browser-automation/context.ts +1 -0
- package/backend/mcp/internal/servers/browser-automation/description.ts +5 -2
- package/backend/mcp/internal/servers/browser-automation/format.ts +24 -1
- package/backend/mcp/internal/servers/browser-automation/runner.ts +68 -3
- package/backend/memory/redact.ts +1 -1
- package/backend/notes/access.test.ts +28 -29
- package/backend/notes/access.ts +6 -11
- package/backend/permissions/service.ts +1 -1
- package/backend/preview/browser/browser-clipboard.test.ts +46 -0
- package/backend/preview/browser/browser-clipboard.ts +67 -0
- package/backend/preview/browser/browser-dialog-handler.ts +95 -6
- package/backend/preview/browser/browser-host-bridge.ts +9 -0
- package/backend/preview/browser/browser-interaction-handler.ts +316 -86
- package/backend/preview/browser/browser-mcp-control.ts +34 -0
- package/backend/preview/browser/browser-pool.ts +67 -6
- package/backend/preview/browser/browser-preview-service.ts +383 -29
- package/backend/preview/browser/browser-tab-manager.ts +66 -23
- package/backend/preview/browser/browser-video-capture.ts +92 -5
- package/backend/preview/browser/element-locator.ts +190 -17
- package/backend/preview/browser/keyboard-chords.test.ts +68 -0
- package/backend/preview/browser/keyboard-chords.ts +132 -0
- package/backend/preview/browser/paste.ts +81 -0
- package/backend/preview/browser/process-usage.ts +142 -0
- package/backend/preview/browser/profile-lock.ts +209 -0
- package/backend/preview/browser/scripts/host-bridge.ts +59 -0
- package/backend/preview/browser/scripts/video-stream.ts +58 -0
- package/backend/preview/browser/types.ts +40 -2
- package/backend/preview/browser/viewport.test.ts +45 -0
- package/backend/preview/browser/viewport.ts +96 -0
- package/backend/profiles/service.ts +2 -2
- package/backend/project/status-manager.ts +43 -172
- package/backend/projects/home.ts +61 -0
- package/backend/projects/project-cleanup.integration.test.ts +2 -2
- package/backend/projects/project-cleanup.ts +0 -8
- package/backend/skills/service.ts +2 -3
- package/backend/snapshot/blob-store.ts +9 -1
- package/backend/snapshot/helpers.ts +3 -11
- package/backend/snapshot/line-stats.test.ts +80 -0
- package/backend/snapshot/line-stats.ts +64 -0
- package/backend/snapshot/restore.ts +252 -0
- package/backend/snapshot/snapshot-service.ts +14 -27
- package/backend/snapshot/turn-changes.test.ts +10 -5
- package/backend/snapshot/turn-changes.ts +78 -40
- package/backend/ssh/ptykit.ts +1 -2
- package/backend/terminal/ptykit.ts +10 -8
- package/backend/tunnel/public-origin.ts +31 -20
- package/backend/utils/user-helpers.ts +0 -55
- package/backend/utils/ws-wire.test.ts +87 -0
- package/backend/utils/ws-wire.ts +189 -0
- package/backend/utils/ws.ts +101 -192
- package/backend/worktrees/branching/engine.ts +3 -16
- package/backend/worktrees/branching/index.ts +1 -1
- package/backend/worktrees/branching/projector.ts +1 -1
- package/backend/worktrees/branching/service.ts +13 -25
- package/backend/ws/access.ts +12 -21
- package/backend/ws/artifacts/generate.ts +2 -2
- package/backend/ws/auth/device.ts +16 -71
- package/backend/ws/auth/index.ts +4 -22
- package/backend/ws/auth/login.test.ts +14 -60
- package/backend/ws/auth/login.ts +24 -124
- package/backend/ws/auth/status.ts +0 -1
- package/backend/ws/chat/composer.ts +118 -118
- package/backend/ws/chat/stream.ts +105 -57
- package/backend/ws/chat-apps/index.ts +117 -0
- package/backend/ws/containers/actions.ts +11 -25
- package/backend/ws/containers/index.ts +3 -4
- package/backend/ws/containers/list.ts +10 -36
- package/backend/ws/containers/logs.ts +2 -2
- package/backend/ws/containers/tunnel.ts +1 -2
- package/backend/ws/db-client/access.ts +2 -16
- package/backend/ws/db-client/accounts.ts +5 -15
- package/backend/ws/db-client/connections.ts +17 -25
- package/backend/ws/db-client/context.ts +1 -1
- package/backend/ws/db-client/env.ts +7 -10
- package/backend/ws/db-client/index.ts +2 -2
- package/backend/ws/db-client/io.ts +5 -5
- package/backend/ws/db-client/query-history-retention.test.ts +8 -8
- package/backend/ws/db-client/query.ts +18 -17
- package/backend/ws/db-client/schema.ts +13 -13
- package/backend/ws/db-client/structure.ts +35 -35
- package/backend/ws/db-client/supabase.ts +4 -21
- package/backend/ws/deployments/context.ts +1 -1
- package/backend/ws/deployments/crud.ts +0 -5
- package/backend/ws/engine/access.ts +7 -20
- package/backend/ws/engine/claude/accounts.ts +4 -4
- package/backend/ws/engine/cline/accounts.ts +5 -5
- package/backend/ws/engine/codex/accounts.ts +3 -3
- package/backend/ws/engine/pi/accounts.ts +5 -5
- package/backend/ws/files/clipboard.ts +8 -27
- package/backend/ws/files/image-edit.ts +6 -6
- package/backend/ws/files/index.ts +1 -1
- package/backend/ws/files/path-access.test.ts +32 -131
- package/backend/ws/files/path-access.ts +8 -87
- package/backend/ws/files/read.ts +45 -19
- package/backend/ws/files/reveal.ts +3 -3
- package/backend/ws/files/search.ts +7 -7
- package/backend/ws/files/share.ts +9 -13
- package/backend/ws/files/state.ts +9 -12
- package/backend/ws/files/watch.ts +3 -3
- package/backend/ws/files/write.ts +30 -31
- package/backend/ws/git/branch.ts +80 -59
- package/backend/ws/git/commit.ts +63 -44
- package/backend/ws/git/conflict.ts +16 -18
- package/backend/ws/git/identity-context.ts +8 -17
- package/backend/ws/git/identity.ts +17 -27
- package/backend/ws/git/index.ts +3 -1
- package/backend/ws/git/log.ts +52 -0
- package/backend/ws/git/op-state.ts +139 -0
- package/backend/ws/git/remote.ts +241 -141
- package/backend/ws/git/repo-context.ts +67 -0
- package/backend/ws/git/staging.ts +18 -28
- package/backend/ws/git/status.ts +5 -2
- package/backend/ws/index.ts +5 -1
- package/backend/ws/instructions/crud.ts +1 -1
- package/backend/ws/integrations/crud.ts +1 -3
- package/backend/ws/mcp/crud.ts +3 -5
- package/backend/ws/mcp/tools.ts +1 -1
- package/backend/ws/memory/crud.ts +14 -46
- package/backend/ws/memory/index.ts +2 -2
- package/backend/ws/messages/crud.ts +78 -8
- package/backend/ws/notes/index.ts +33 -39
- package/backend/ws/permissions/crud.ts +3 -4
- package/backend/ws/ports/index.ts +1 -2
- package/backend/ws/ports/kill.ts +5 -10
- package/backend/ws/ports/list.ts +4 -10
- package/backend/ws/preview/access.ts +1 -1
- package/backend/ws/preview/browser/interact.ts +52 -79
- package/backend/ws/preview/browser/native-ui.ts +24 -0
- package/backend/ws/preview/browser/stats.ts +98 -1
- package/backend/ws/preview/browser/tab-info.ts +15 -0
- package/backend/ws/preview/browser/tab.ts +19 -4
- package/backend/ws/preview/index.ts +29 -0
- package/backend/ws/preview/watchers.ts +84 -0
- package/backend/ws/profiles/crud.ts +6 -8
- package/backend/ws/project-artifacts/index.ts +30 -31
- package/backend/ws/projects/crud.ts +33 -35
- package/backend/ws/projects/index.ts +3 -8
- package/backend/ws/projects/info.ts +3 -3
- package/backend/ws/projects/overview.ts +19 -30
- package/backend/ws/projects/status.ts +17 -57
- package/backend/ws/sessions/crud.ts +42 -57
- package/backend/ws/sessions/index.ts +1 -1
- package/backend/ws/settings/crud.ts +1 -1
- package/backend/ws/skills/crud.ts +3 -4
- package/backend/ws/skills/index.ts +1 -1
- package/backend/ws/snapshot/changes.ts +12 -13
- package/backend/ws/snapshot/restore.ts +11 -295
- package/backend/ws/snapshot/timeline.ts +2 -4
- package/backend/ws/ssh/access.ts +6 -21
- package/backend/ws/ssh/connections.ts +21 -31
- package/backend/ws/ssh/forwards.ts +12 -12
- package/backend/ws/ssh/sftp.ts +34 -34
- package/backend/ws/ssh/tunnel.ts +1 -2
- package/backend/ws/stack/install.ts +7 -17
- package/backend/ws/subagents/crud.ts +1 -1
- package/backend/ws/terminal/tunnel.ts +2 -2
- package/backend/ws/tunnel/share.ts +0 -2
- package/backend/ws/user/crud.ts +1 -59
- package/backend/ws/user/index.ts +1 -1
- package/backend/ws/work/context.ts +1 -1
- package/backend/ws/work/crud.ts +0 -5
- package/backend/ws/workspace/state.ts +10 -13
- package/backend/ws/worktrees/branching.ts +7 -36
- package/backend/ws/worktrees/crud.ts +2 -2
- package/bin/clopen.ts +46 -41
- package/dist/assets/addon-clipboard-wHJhZAA4.js.br +0 -0
- package/dist/assets/addon-clipboard-wHJhZAA4.js.gz +0 -0
- package/dist/assets/addon-fit-DX4qG4td.js.br +1 -0
- package/dist/assets/addon-fit-DX4qG4td.js.gz +0 -0
- package/dist/assets/addon-ligatures-DpDY8N_X.js.br +0 -0
- package/dist/assets/addon-ligatures-DpDY8N_X.js.gz +0 -0
- package/dist/assets/addon-unicode11-Bt8F3D7-.js.br +0 -0
- package/dist/assets/addon-unicode11-Bt8F3D7-.js.gz +0 -0
- package/dist/assets/addon-web-links-DIbG5aQx.js.br +0 -0
- package/dist/assets/addon-web-links-DIbG5aQx.js.gz +0 -0
- package/dist/assets/diff.worker-BoHLxmr2.js +7 -0
- package/dist/assets/diff.worker-BoHLxmr2.js.br +0 -0
- package/dist/assets/diff.worker-BoHLxmr2.js.gz +0 -0
- package/dist/assets/graph-layout.worker-CRFqN7ZQ.js.br +0 -0
- package/dist/assets/graph-layout.worker-CRFqN7ZQ.js.gz +0 -0
- package/dist/assets/{index-CwuKQelV.js → index-CrVWZH_D.js} +1 -1
- package/dist/assets/index-CrVWZH_D.js.br +0 -0
- package/dist/assets/index-CrVWZH_D.js.gz +0 -0
- package/dist/assets/{index-BTcR1byF.js → index-DD0-3EWg.js} +1 -1
- package/dist/assets/index-DD0-3EWg.js.br +0 -0
- package/dist/assets/index-DD0-3EWg.js.gz +0 -0
- package/dist/assets/main-D2_TmcwQ.js +1240 -0
- package/dist/assets/main-D2_TmcwQ.js.br +0 -0
- package/dist/assets/main-D2_TmcwQ.js.gz +0 -0
- package/dist/assets/main-Yucigcmf.css +1 -0
- package/dist/assets/main-Yucigcmf.css.br +0 -0
- package/dist/assets/main-Yucigcmf.css.gz +0 -0
- package/dist/assets/preview-video.worker-DcpDhCWL.js.br +0 -0
- package/dist/assets/preview-video.worker-DcpDhCWL.js.gz +0 -0
- package/dist/assets/xterm-B-qIQCd3.js.br +0 -0
- package/dist/assets/xterm-B-qIQCd3.js.gz +0 -0
- package/dist/assets/zipkit-engine-CaR0t_Uy.wasm.br +0 -0
- package/dist/assets/zipkit-engine-CaR0t_Uy.wasm.gz +0 -0
- package/dist/fonts/dm-sans.css.br +0 -0
- package/dist/fonts/dm-sans.css.gz +0 -0
- package/dist/index.html +2 -2
- package/dist/index.html.br +0 -0
- package/dist/index.html.gz +0 -0
- package/dist/sw.js.br +0 -0
- package/dist/sw.js.gz +0 -0
- package/package.json +3 -3
- package/shared/constants/attachments.ts +14 -0
- package/shared/constants/engine-tools.ts +1 -1
- package/shared/constants/preview.test.ts +259 -0
- package/shared/constants/preview.ts +1018 -57
- package/shared/constants/tool-icons.ts +5 -0
- package/shared/types/containers/container.ts +1 -1
- package/shared/types/database/schema.ts +9 -6
- package/shared/types/git-identity.ts +1 -1
- package/shared/types/git.ts +116 -0
- package/shared/types/integrations.ts +7 -0
- package/shared/types/stores/settings.ts +1 -1
- package/shared/types/unified/index.ts +1 -1
- package/shared/types/unified/message.ts +0 -7
- package/shared/types/unified/stream.ts +13 -5
- package/shared/types/unified/tool.ts +15 -1
- package/shared/utils/ask-user-question.test.ts +319 -0
- package/shared/utils/ask-user-question.ts +154 -0
- package/shared/utils/diff-calculator.test.ts +178 -41
- package/shared/utils/diff-calculator.ts +383 -100
- package/shared/utils/home-project.ts +25 -0
- package/shared/utils/logger.ts +2 -0
- package/shared/utils/process-supervisor.test.ts +172 -0
- package/shared/utils/process-supervisor.ts +251 -0
- package/shared/utils/ws-chunk.test.ts +33 -0
- package/shared/utils/ws-chunk.ts +73 -0
- package/shared/utils/ws-client-chunks.test.ts +45 -0
- package/shared/utils/ws-client.ts +43 -0
- package/shared/utils/ws-server.ts +49 -21
- package/backend/auth/session-invalidation.test.ts +0 -112
- package/backend/auth/session-invalidation.ts +0 -77
- package/backend/project/status-manager.test.ts +0 -32
- package/backend/ws/auth/invites.ts +0 -94
- package/backend/ws/auth/users.ts +0 -112
- package/backend/ws/projects/presence.ts +0 -46
- package/backend/ws/stack/access.ts +0 -31
- package/dist/assets/main-BiDNMWb3.css +0 -1
- package/dist/assets/main-BlhKWz2B.js +0 -1241
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.html
CHANGED
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
}
|
|
64
64
|
})();
|
|
65
65
|
</script>
|
|
66
|
-
<script type="module" crossorigin src="/assets/main-
|
|
67
|
-
<link rel="stylesheet" crossorigin href="/assets/main-
|
|
66
|
+
<script type="module" crossorigin src="/assets/main-D2_TmcwQ.js"></script>
|
|
67
|
+
<link rel="stylesheet" crossorigin href="/assets/main-Yucigcmf.css">
|
|
68
68
|
</head>
|
|
69
69
|
<body
|
|
70
70
|
class="min-h-dvh bg-white text-slate-900 dark:bg-slate-950 dark:text-slate-100 transition-colors duration-200"
|
|
Binary file
|
|
Binary file
|
package/dist/sw.js.br
ADDED
|
Binary file
|
package/dist/sw.js.gz
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myrialabs/clopen",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.49",
|
|
4
4
|
"description": "All-in-one web workspace for AI coding agents — Claude Code, OpenCode, Codex, Copilot, Qwen Code, Pi, Cline, and Cursor — with chat, terminal, git, browser preview, database client, checkpoints, and real-time collaboration",
|
|
5
5
|
"author": "Myria Labs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -104,7 +104,6 @@
|
|
|
104
104
|
"@types/qrcode": "^1.5.6",
|
|
105
105
|
"@types/random-useragent": "^0.3.3",
|
|
106
106
|
"@types/ssh2": "^1.15.5",
|
|
107
|
-
"concurrently": "^9.2.1",
|
|
108
107
|
"eslint": "^9.31.0",
|
|
109
108
|
"eslint-plugin-svelte": "^3.10.1",
|
|
110
109
|
"globals": "^16.3.0",
|
|
@@ -123,7 +122,8 @@
|
|
|
123
122
|
"@iconify-json/material-icon-theme": "1.2.55",
|
|
124
123
|
"@modelcontextprotocol/sdk": "1.31.0",
|
|
125
124
|
"@monaco-editor/loader": "1.7.0",
|
|
126
|
-
"@myrialabs/
|
|
125
|
+
"@myrialabs/chatkit": "0.0.3",
|
|
126
|
+
"@myrialabs/ptykit": "0.1.0",
|
|
127
127
|
"@myrialabs/tunnelkit": "0.0.15",
|
|
128
128
|
"@myrialabs/zipkit": "0.0.11",
|
|
129
129
|
"@sinclair/typebox": "0.34.48",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attachment limits shared by the web composer, the chat apps and the stream.
|
|
3
|
+
*
|
|
4
|
+
* Any file can be attached. What the model reads inline (images and PDFs, when
|
|
5
|
+
* its modalities say so, up to the inline limit) is sent as-is; everything
|
|
6
|
+
* else is saved into the session's working tree and named in the prompt — see
|
|
7
|
+
* `backend/chat/attachments.ts`.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** Largest file accepted anywhere — Telegram's own download ceiling. */
|
|
11
|
+
export const MAX_ATTACHMENT_BYTES = 20 * 1024 * 1024;
|
|
12
|
+
|
|
13
|
+
/** Largest file sent to the model inline; a bigger image or PDF is saved instead. */
|
|
14
|
+
export const MAX_INLINE_ATTACHMENT_BYTES = 10 * 1024 * 1024;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* deny rule silently won't match. Only Claude's names are authoritative (the
|
|
8
8
|
* Agent SDK's canonical PascalCase tool names); every other engine is
|
|
9
9
|
* BEST-EFFORT — the runtime hook receives the engine's own casing/aliases, and
|
|
10
|
-
* these lists are a curated starting point
|
|
10
|
+
* these lists are a curated starting point that can be extended with free-text
|
|
11
11
|
* patterns. See {@link ENGINE_TOOLS_BEST_EFFORT}.
|
|
12
12
|
*
|
|
13
13
|
* Copilot is special: its permission hook decides by operation `kind`
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { describe, expect, test } from 'bun:test';
|
|
2
|
+
import {
|
|
3
|
+
DEVICE_PRESETS,
|
|
4
|
+
DEVICE_VIEWPORTS,
|
|
5
|
+
VIEWPORT_LIMITS,
|
|
6
|
+
clampViewport,
|
|
7
|
+
getDeviceEmulation,
|
|
8
|
+
getFrameLayout,
|
|
9
|
+
orient,
|
|
10
|
+
planDevice,
|
|
11
|
+
resolveDevicePreset,
|
|
12
|
+
resolveViewport,
|
|
13
|
+
type DeviceState
|
|
14
|
+
} from './preview';
|
|
15
|
+
|
|
16
|
+
describe('resolveViewport', () => {
|
|
17
|
+
test('falls back to the class default, turned to the rotation', () => {
|
|
18
|
+
expect(resolveViewport('mobile', 'landscape', null)).toEqual({ width: 874, height: 402 });
|
|
19
|
+
expect(resolveViewport('laptop', 'landscape')).toEqual({ width: 1440, height: 900 });
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
test('an exact size wins over the class default', () => {
|
|
23
|
+
expect(resolveViewport('mobile', 'portrait', { width: 375, height: 667 })).toEqual({ width: 375, height: 667 });
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('ignores incomplete sizes from older saves', () => {
|
|
27
|
+
expect(resolveViewport('tablet', 'portrait', { width: 500 })).toEqual({ width: 834, height: 1194 });
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
describe('clampViewport', () => {
|
|
32
|
+
test('keeps sizes inside the limits and whole', () => {
|
|
33
|
+
expect(clampViewport({ width: 10, height: 99999 })).toEqual({
|
|
34
|
+
width: VIEWPORT_LIMITS.min,
|
|
35
|
+
height: VIEWPORT_LIMITS.max
|
|
36
|
+
});
|
|
37
|
+
expect(clampViewport({ width: 400.6, height: 800.2 })).toEqual({ width: 401, height: 800 });
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
describe('presets', () => {
|
|
42
|
+
test('each class default is its first preset', () => {
|
|
43
|
+
for (const size of ['desktop', 'laptop', 'tablet', 'mobile'] as const) {
|
|
44
|
+
const first = DEVICE_PRESETS.find((preset) => preset.deviceSize === size);
|
|
45
|
+
expect(first).toMatchObject(DEVICE_VIEWPORTS[size]);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test('a model of another class falls back to the class default', () => {
|
|
50
|
+
expect(resolveDevicePreset('mobile', 'galaxy-s24')?.id).toBe('galaxy-s24');
|
|
51
|
+
expect(resolveDevicePreset('tablet', 'galaxy-s24')?.id).toBe('ipad-pro-11');
|
|
52
|
+
expect(resolveDevicePreset('responsive', 'galaxy-s24')).toBeUndefined();
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
describe('planDevice', () => {
|
|
57
|
+
const phone: DeviceState = {
|
|
58
|
+
deviceSize: 'mobile',
|
|
59
|
+
rotation: 'portrait',
|
|
60
|
+
viewport: { width: 402, height: 874 },
|
|
61
|
+
deviceModel: 'iphone-16'
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
test('a new model starts from its own size, keeping the orientation within a class', () => {
|
|
65
|
+
expect(planDevice({ ...phone, rotation: 'landscape', viewport: { width: 874, height: 402 } }, {
|
|
66
|
+
deviceSize: 'mobile',
|
|
67
|
+
deviceModel: 'galaxy-s24'
|
|
68
|
+
})).toEqual({ deviceSize: 'mobile', rotation: 'landscape', viewport: { width: 780, height: 360 }, deviceModel: 'galaxy-s24' });
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
test('a new class lands on its default model in its natural orientation', () => {
|
|
72
|
+
expect(planDevice(phone, { deviceSize: 'laptop' })).toEqual({
|
|
73
|
+
deviceSize: 'laptop',
|
|
74
|
+
rotation: 'landscape',
|
|
75
|
+
viewport: { width: 1440, height: 900 },
|
|
76
|
+
deviceModel: 'macbook-air-13'
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
test('rotation turns a custom size around without resetting it', () => {
|
|
81
|
+
const custom = { ...phone, viewport: { width: 390, height: 700 } };
|
|
82
|
+
expect(planDevice(custom, { deviceSize: 'mobile', rotation: 'landscape' }).viewport).toEqual({ width: 700, height: 390 });
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
test('an exact size wins and decides the orientation, keeping the model', () => {
|
|
86
|
+
const next = planDevice(phone, { deviceSize: 'mobile', size: { width: 900, height: 500 } });
|
|
87
|
+
expect(next).toEqual({ deviceSize: 'mobile', rotation: 'landscape', viewport: { width: 900, height: 500 }, deviceModel: 'iphone-16' });
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
test('a laptop stays landscape', () => {
|
|
91
|
+
const laptop = planDevice(phone, { deviceSize: 'laptop' });
|
|
92
|
+
expect(planDevice(laptop, { deviceSize: 'laptop', rotation: 'portrait' }).rotation).toBe('landscape');
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
test('responsive keeps the size the page had', () => {
|
|
96
|
+
expect(planDevice(phone, { deviceSize: 'responsive' })).toEqual({
|
|
97
|
+
deviceSize: 'responsive',
|
|
98
|
+
rotation: 'portrait',
|
|
99
|
+
viewport: { width: 402, height: 874 },
|
|
100
|
+
deviceModel: null
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
describe('getDeviceEmulation', () => {
|
|
106
|
+
test('only handheld classes are emulated as touch devices', () => {
|
|
107
|
+
expect(getDeviceEmulation('mobile')).toEqual({ isMobile: true, hasTouch: true });
|
|
108
|
+
expect(getDeviceEmulation('tablet')).toEqual({ isMobile: true, hasTouch: true });
|
|
109
|
+
expect(getDeviceEmulation('laptop')).toEqual({ isMobile: false, hasTouch: false });
|
|
110
|
+
expect(getDeviceEmulation('responsive')).toEqual({ isMobile: false, hasTouch: false });
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
describe('getFrameLayout', () => {
|
|
115
|
+
const inside = (inner: { x: number; y: number; width: number; height: number }, outer: typeof inner) =>
|
|
116
|
+
inner.x >= outer.x &&
|
|
117
|
+
inner.y >= outer.y &&
|
|
118
|
+
inner.x + inner.width <= outer.x + outer.width &&
|
|
119
|
+
inner.y + inner.height <= outer.y + outer.height;
|
|
120
|
+
|
|
121
|
+
test('the screen is always exactly the viewport', () => {
|
|
122
|
+
for (const size of ['desktop', 'laptop', 'tablet', 'mobile'] as const) {
|
|
123
|
+
for (const rotation of ['portrait', 'landscape'] as const) {
|
|
124
|
+
const viewport = orient(DEVICE_VIEWPORTS[size], rotation);
|
|
125
|
+
const layout = getFrameLayout(size, viewport);
|
|
126
|
+
expect(layout.screen.width).toBe(viewport.width);
|
|
127
|
+
expect(layout.screen.height).toBe(viewport.height);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
test('layers nest from the body inwards and stay inside the footprint', () => {
|
|
133
|
+
for (const size of ['desktop', 'laptop', 'tablet', 'mobile'] as const) {
|
|
134
|
+
for (const rotation of ['portrait', 'landscape'] as const) {
|
|
135
|
+
const layout = getFrameLayout(size, orient(DEVICE_VIEWPORTS[size], rotation));
|
|
136
|
+
const footprint = { x: 0, y: 0, ...layout.footprint };
|
|
137
|
+
expect(inside(layout.body, footprint)).toBe(true);
|
|
138
|
+
expect(inside(layout.glass, layout.body)).toBe(true);
|
|
139
|
+
expect(inside(layout.display, layout.glass)).toBe(true);
|
|
140
|
+
expect(inside(layout.screen, layout.display)).toBe(true);
|
|
141
|
+
for (const part of [layout.base, layout.neck, layout.foot, ...layout.buttons]) {
|
|
142
|
+
if (part) expect(inside(part, footprint)).toBe(true);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
test('the orientation is read off the viewport, not assumed', () => {
|
|
149
|
+
expect(getFrameLayout('mobile', { width: 874, height: 402 }).orientation).toBe('landscape');
|
|
150
|
+
// Phone landscape puts the island on the left.
|
|
151
|
+
const landscape = getFrameLayout('mobile', { width: 874, height: 402 });
|
|
152
|
+
expect(landscape.island!.height).toBeGreaterThan(landscape.island!.width);
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
test('responsive and a hidden frame collapse onto the page', () => {
|
|
156
|
+
for (const layout of [
|
|
157
|
+
getFrameLayout('responsive', { width: 900, height: 700 }),
|
|
158
|
+
getFrameLayout('mobile', { width: 402, height: 874 }, false)
|
|
159
|
+
]) {
|
|
160
|
+
expect(layout.kind).toBe('none');
|
|
161
|
+
expect(layout.footprint).toEqual({ width: layout.screen.width, height: layout.screen.height });
|
|
162
|
+
expect(layout.screen.x).toBe(0);
|
|
163
|
+
expect(layout.screen.y).toBe(0);
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
test('every model lays out cleanly in both orientations', () => {
|
|
168
|
+
const footprintOf = (layout: ReturnType<typeof getFrameLayout>) => ({ x: 0, y: 0, ...layout.footprint });
|
|
169
|
+
for (const preset of DEVICE_PRESETS) {
|
|
170
|
+
for (const rotation of ['portrait', 'landscape'] as const) {
|
|
171
|
+
const viewport = orient(preset, rotation);
|
|
172
|
+
const layout = getFrameLayout(preset.deviceSize, viewport, true, preset.id);
|
|
173
|
+
expect(layout.model).toBe(preset.id);
|
|
174
|
+
expect(layout.os).toBe(preset.os);
|
|
175
|
+
expect(layout.screen.width).toBe(viewport.width);
|
|
176
|
+
expect(inside(layout.screen, layout.display)).toBe(true);
|
|
177
|
+
for (const part of [layout.base, layout.neck, layout.foot, ...layout.buttons, ...layout.feet]) {
|
|
178
|
+
if (part) expect(inside(part, footprintOf(layout))).toBe(true);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
test('phones of the same class are different hardware', () => {
|
|
185
|
+
const iphone = getFrameLayout('mobile', { width: 402, height: 874 }, true, 'iphone-16');
|
|
186
|
+
const galaxy = getFrameLayout('mobile', { width: 402, height: 874 }, true, 'galaxy-s24');
|
|
187
|
+
const se = getFrameLayout('mobile', { width: 375, height: 667 }, true, 'iphone-se');
|
|
188
|
+
expect(iphone.island).not.toBeNull();
|
|
189
|
+
expect(iphone.punchHole).toBeNull();
|
|
190
|
+
expect(galaxy.island).toBeNull();
|
|
191
|
+
expect(galaxy.punchHole).not.toBeNull();
|
|
192
|
+
expect(galaxy.bodyRadius).not.toEqual(iphone.bodyRadius);
|
|
193
|
+
expect(galaxy.buttons.every((b) => b.edge === 'right')).toBe(true);
|
|
194
|
+
expect(se.homeButton).not.toBeNull();
|
|
195
|
+
expect(se.earpiece).not.toBeNull();
|
|
196
|
+
expect(se.island).toBeNull();
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
test('the page never sits under a status bar, cutout or home indicator', () => {
|
|
200
|
+
for (const preset of DEVICE_PRESETS) {
|
|
201
|
+
for (const rotation of ['portrait', 'landscape'] as const) {
|
|
202
|
+
const layout = getFrameLayout(preset.deviceSize, orient(preset, rotation), true, preset.id);
|
|
203
|
+
for (const part of [layout.statusBar, layout.bottomBar, layout.navBar, layout.island, layout.punchHole, layout.notch, layout.homeIndicator]) {
|
|
204
|
+
if (!part) continue;
|
|
205
|
+
const overlapsX = part.x < layout.screen.x + layout.screen.width && layout.screen.x < part.x + part.width;
|
|
206
|
+
const overlapsY = part.y < layout.screen.y + layout.screen.height && layout.screen.y < part.y + part.height;
|
|
207
|
+
expect(overlapsX && overlapsY).toBe(false);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
test('a computer keeps its menu bar beside the page', () => {
|
|
214
|
+
const mac = getFrameLayout('laptop', { width: 1440, height: 900 }, true, 'macbook-air-13');
|
|
215
|
+
expect(mac.screen.y).toBe(mac.statusBar!.y + mac.statusBar!.height);
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
test('Android phones use button navigation, moved to the side when turned', () => {
|
|
219
|
+
for (const model of ['pixel-9', 'galaxy-s24']) {
|
|
220
|
+
const upright = getFrameLayout('mobile', { width: 412, height: 923 }, true, model);
|
|
221
|
+
expect(upright.navBar?.direction).toBe('horizontal');
|
|
222
|
+
expect(upright.homeIndicator).toBeNull();
|
|
223
|
+
|
|
224
|
+
const turned = getFrameLayout('mobile', { width: 923, height: 412 }, true, model);
|
|
225
|
+
expect(turned.navBar?.direction).toBe('vertical');
|
|
226
|
+
expect(turned.bottomBar).toBeNull();
|
|
227
|
+
// Nothing below the page: it reaches the bottom of the display.
|
|
228
|
+
expect(turned.screen.y + turned.screen.height).toBe(turned.display.y + turned.display.height);
|
|
229
|
+
expect(turned.navBar!.x).toBe(turned.screen.x + turned.screen.width);
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
test('an Android tablet keeps its buttons along the bottom', () => {
|
|
234
|
+
const tablet = getFrameLayout('tablet', { width: 1280, height: 800 }, true, 'galaxy-tab-s9');
|
|
235
|
+
expect(tablet.navBar?.direction).toBe('horizontal');
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
test('iPhones keep the home indicator', () => {
|
|
239
|
+
expect(getFrameLayout('mobile', { width: 874, height: 402 }, true, 'iphone-16').homeIndicator).not.toBeNull();
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
test('Windows devices put their system UI at the bottom', () => {
|
|
243
|
+
const laptop = getFrameLayout('laptop', { width: 1366, height: 768 }, true, 'windows-laptop');
|
|
244
|
+
expect(laptop.statusBar).toBeNull();
|
|
245
|
+
expect(laptop.bottomBar).not.toBeNull();
|
|
246
|
+
expect(laptop.notch).toBeNull();
|
|
247
|
+
expect(laptop.homeIndicator).toBeNull();
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
test('a laptop has a deck wider than its lid, a monitor a stand', () => {
|
|
251
|
+
const laptop = getFrameLayout('laptop', DEVICE_VIEWPORTS.laptop);
|
|
252
|
+
expect(laptop.base!.width).toBeGreaterThan(laptop.body.width);
|
|
253
|
+
expect(laptop.notch).not.toBeNull();
|
|
254
|
+
const desktop = getFrameLayout('desktop', DEVICE_VIEWPORTS.desktop);
|
|
255
|
+
expect(desktop.standStyle).toBe('pedestal');
|
|
256
|
+
expect(desktop.neck).not.toBeNull();
|
|
257
|
+
expect(desktop.foot).not.toBeNull();
|
|
258
|
+
});
|
|
259
|
+
});
|