@cryptiklemur/lattice 4.0.2 → 5.0.1
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/bin/lattice +1 -9
- package/dist/client/assets/{angular-html-N8PCEquT.js → angular-html-DKTL-XDO.js} +1 -1
- package/dist/client/assets/{angular-ts-CJ8RJIPD.js → angular-ts-tvBzOwQR.js} +1 -1
- package/dist/client/assets/{apl-BD6tCLWN.js → apl-CCzl5qFl.js} +1 -1
- package/dist/client/assets/{astro-CpIIfBs6.js → astro-DNQTpO2Y.js} +1 -1
- package/dist/client/assets/{blade-D3qgnjiV.js → blade-CyJoIMeJ.js} +1 -1
- package/dist/client/assets/{c-Dr6ADN_t.js → c-OEwk5KN8.js} +1 -1
- package/dist/client/assets/{cobol-BIfDE0Hr.js → cobol-DpHyJzz2.js} +1 -1
- package/dist/client/assets/{coffee-DHQ57vfY.js → coffee-BX5dbDzZ.js} +1 -1
- package/dist/client/assets/{cpp-CEBY6JOp.js → cpp-BTBjNg2U.js} +1 -1
- package/dist/client/assets/{crystal-D125CSmP.js → crystal-CNzZd6DW.js} +1 -1
- package/dist/client/assets/{css-CBmrkYSr.js → css-BuKsNmms.js} +1 -1
- package/dist/client/assets/{dist-A_mCRD1f.js → dist-CKpDHMy6.js} +2 -2
- package/dist/client/assets/{edge-Ccsz7cJW.js → edge-DzhnGgJE.js} +1 -1
- package/dist/client/assets/{elixir-Do6gk14X.js → elixir-Dqs0waqF.js} +1 -1
- package/dist/client/assets/{elm-Db22zT4C.js → elm-BtWwjxWn.js} +1 -1
- package/dist/client/assets/{erb-MXVqAAJD.js → erb-iPD89b4v.js} +1 -1
- package/dist/client/assets/{git-rebase-B-LLWBOA.js → git-rebase-BxVNXJL4.js} +1 -1
- package/dist/client/assets/{glimmer-js-eWszRU73.js → glimmer-js-BlyCupwF.js} +1 -1
- package/dist/client/assets/{glimmer-ts-VQmwGqUp.js → glimmer-ts-DjIxWOS9.js} +1 -1
- package/dist/client/assets/{glsl-B8ilOfAl.js → glsl-CGIL-65r.js} +1 -1
- package/dist/client/assets/{graphql-DnTqxeOc.js → graphql-DeOn6mNV.js} +1 -1
- package/dist/client/assets/{hack-XJsHYSQb.js → hack-DVppeCmS.js} +1 -1
- package/dist/client/assets/{haml-CQ7Vqzwp.js → haml-WDhua0Mp.js} +1 -1
- package/dist/client/assets/{handlebars-C4szooBf.js → handlebars-i2Fu_9HI.js} +1 -1
- package/dist/client/assets/{html-B6EgAiSd.js → html-B1e6oxzK.js} +1 -1
- package/dist/client/assets/{html-derivative-DdinogQX.js → html-derivative-MofKXIVd.js} +1 -1
- package/dist/client/assets/{http-BSLxCgRq.js → http-Dk6S5pRD.js} +1 -1
- package/dist/client/assets/{hurl-pOsTwNfp.js → hurl-CroFYYJG.js} +1 -1
- package/dist/client/assets/{index-BHQ_8mvl.js → index-CVu-S6Yk.js} +2 -2
- package/dist/client/assets/{java-DRQLiiST.js → java-B89FYjqS.js} +1 -1
- package/dist/client/assets/{javascript-DvEK2-47.js → javascript-m6CO1Uiy.js} +1 -1
- package/dist/client/assets/{jinja-D2NYJ25y.js → jinja-DC9Wi41X.js} +1 -1
- package/dist/client/assets/{jison-DDZaLNAp.js → jison-6xiegwDk.js} +1 -1
- package/dist/client/assets/{json-TGR0NIWd.js → json-HA-96-qr.js} +1 -1
- package/dist/client/assets/{jsx-BjUoPYga.js → jsx-Wt1a8i8U.js} +1 -1
- package/dist/client/assets/{julia-C4gjSpFu.js → julia-7M93VBON.js} +1 -1
- package/dist/client/assets/{just-H351x5u_.js → just-CjfDLYLv.js} +1 -1
- package/dist/client/assets/{latex-BiTmf6gf.js → latex-CitsJ46x.js} +1 -1
- package/dist/client/assets/{liquid-86ufjRy-.js → liquid-C8VIFin8.js} +1 -1
- package/dist/client/assets/{lua-BNxR0F_8.js → lua-Ba2N7esc.js} +1 -1
- package/dist/client/assets/{marko-CvRxpRjM.js → marko-lTLvb2wu.js} +1 -1
- package/dist/client/assets/{mdc-CYbAIy2C.js → mdc-D6IV-8FD.js} +1 -1
- package/dist/client/assets/{nginx-egdgMq-F.js → nginx-Ch5AjE6S.js} +1 -1
- package/dist/client/assets/{nim-CXBJVz_w.js → nim-WmDDC6LW.js} +1 -1
- package/dist/client/assets/{perl-XRfMobzg.js → perl-CQv0gYuq.js} +1 -1
- package/dist/client/assets/{php-Br7a8uil.js → php-BJmH0qOB.js} +1 -1
- package/dist/client/assets/{pug-BVbbUVvy.js → pug-CsHPkzc9.js} +1 -1
- package/dist/client/assets/{qml-ByKvrL1j.js → qml-B36ecArG.js} +1 -1
- package/dist/client/assets/{r-mVoV0Ni6.js → r-D5Yi5Z4y.js} +1 -1
- package/dist/client/assets/{razor-T5O-9UJL.js → razor-CHAxVq4R.js} +1 -1
- package/dist/client/assets/{regexp-CioRuhuN.js → regexp-gfs--3M7.js} +1 -1
- package/dist/client/assets/{rst-V__uTudD.js → rst-ugdlp-hl.js} +1 -1
- package/dist/client/assets/{ruby-C_PuKPTI.js → ruby-CDRRW37j.js} +1 -1
- package/dist/client/assets/{sas-D_DqqQH4.js → sas-DZaNQaIP.js} +1 -1
- package/dist/client/assets/{scss-D-TjzZ4c.js → scss-CzWQEplj.js} +1 -1
- package/dist/client/assets/{shellscript-E5759VHu.js → shellscript-fgYvpu9N.js} +1 -1
- package/dist/client/assets/{shellsession-AESTM-Pv.js → shellsession-BoAohHh7.js} +1 -1
- package/dist/client/assets/{soy-QrbrrcDv.js → soy-DBzVgv9x.js} +1 -1
- package/dist/client/assets/{sql-0M8VcDHD.js → sql-BYXpAYTs.js} +1 -1
- package/dist/client/assets/{stata-CgeIpGtc.js → stata-I71MMY3p.js} +1 -1
- package/dist/client/assets/{surrealql-DBGwnZbw.js → surrealql-C9U8_1VO.js} +1 -1
- package/dist/client/assets/{svelte-Cv0PvUc_.js → svelte-VOFrPnWT.js} +1 -1
- package/dist/client/assets/{templ-B9t7xRE4.js → templ-BIaxAEtC.js} +1 -1
- package/dist/client/assets/{tex-DhZZ8dr2.js → tex-D1dwnBE5.js} +1 -1
- package/dist/client/assets/{ts-tags-BFv8sbnd.js → ts-tags-C0L2Q0r5.js} +1 -1
- package/dist/client/assets/{tsx-CXC9KSbY.js → tsx-BqcycEv1.js} +1 -1
- package/dist/client/assets/{twig-CM_OO66r.js → twig-vyWqOhpM.js} +1 -1
- package/dist/client/assets/{typescript-BdgOTaoD.js → typescript-B2YbovqG.js} +1 -1
- package/dist/client/assets/{vue-BnQhjnCm.js → vue-CbXxGdjo.js} +1 -1
- package/dist/client/assets/{vue-html-CNnGecRI.js → vue-html-DDX4KXW7.js} +1 -1
- package/dist/client/assets/{vue-vine-DCuMkRhK.js → vue-vine-DsyY1LR5.js} +1 -1
- package/dist/client/assets/{xml-CbTD7cB8.js → xml-Ddi0-r0D.js} +1 -1
- package/dist/client/assets/{xsl-uOqqo7cf.js → xsl-CsFcZHFS.js} +1 -1
- package/dist/client/assets/{yaml-BNrLoH59.js → yaml-tGJWoH6Y.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/sw.js +1 -1
- package/dist/server/analytics/engine.js +832 -0
- package/dist/server/assets.js +39 -0
- package/dist/server/auth/passphrase.js +70 -0
- package/dist/server/config.js +47 -0
- package/dist/server/daemon.js +533 -0
- package/dist/server/features/ralph-loop.js +138 -0
- package/dist/server/features/scheduler.js +260 -0
- package/dist/server/features/sticky-notes.js +99 -0
- package/dist/server/handlers/analytics.js +28 -0
- package/dist/server/handlers/attachment.js +158 -0
- package/dist/server/handlers/bookmarks.js +41 -0
- package/dist/server/handlers/chat.js +350 -0
- package/dist/server/handlers/editor.js +72 -0
- package/dist/server/handlers/fs.js +234 -0
- package/dist/server/handlers/loop.js +33 -0
- package/dist/server/handlers/memory.js +181 -0
- package/dist/server/handlers/mesh.js +322 -0
- package/dist/server/handlers/notes.js +36 -0
- package/dist/server/handlers/plugins.js +593 -0
- package/dist/server/handlers/project-settings.js +166 -0
- package/dist/server/handlers/scheduler.js +52 -0
- package/dist/server/handlers/session.js +194 -0
- package/dist/server/handlers/settings.js +148 -0
- package/dist/server/handlers/skills.js +360 -0
- package/dist/server/handlers/terminal.js +75 -0
- package/dist/server/handlers/themes.js +102 -0
- package/dist/server/handlers/update.js +124 -0
- package/dist/server/identity.js +45 -0
- package/dist/server/index.js +435 -0
- package/dist/server/logger.js +20 -0
- package/dist/server/mesh/connector.js +355 -0
- package/dist/server/mesh/crypto.js +88 -0
- package/dist/server/mesh/discovery.js +95 -0
- package/dist/server/mesh/pairing.js +104 -0
- package/dist/server/mesh/peers.js +54 -0
- package/dist/server/mesh/proxy.js +86 -0
- package/dist/server/mesh/session-sync.js +85 -0
- package/dist/server/project/bookmarks.js +77 -0
- package/dist/server/project/context-breakdown.js +279 -0
- package/dist/server/project/file-browser.js +97 -0
- package/dist/server/project/project-files.js +274 -0
- package/dist/server/project/registry.js +51 -0
- package/dist/server/project/sdk-bridge.js +960 -0
- package/dist/server/project/session.js +696 -0
- package/dist/server/project/terminal.js +87 -0
- package/dist/server/project/warmup.js +242 -0
- package/dist/server/push.js +87 -0
- package/dist/server/tls.js +50 -0
- package/dist/server/tui.js +83 -0
- package/dist/server/update-checker.js +119 -0
- package/dist/server/ws/broadcast.js +50 -0
- package/dist/server/ws/router.js +105 -0
- package/dist/server/ws/server.js +2 -0
- package/dist/shared/analytics.js +1 -0
- package/dist/shared/messages.js +1 -0
- package/dist/shared/models.js +1 -0
- package/dist/shared/project-settings.js +1 -0
- package/package.json +5 -8
- package/themes/alabaster.json +9 -0
- package/themes/amoled.json +20 -0
- package/themes/ayu-light.json +9 -0
- package/themes/catppuccin-latte.json +9 -0
- package/themes/catppuccin-mocha.json +9 -0
- package/themes/clay-light.json +10 -0
- package/themes/clay.json +10 -0
- package/themes/dracula.json +9 -0
- package/themes/everforest-light.json +9 -0
- package/themes/everforest.json +9 -0
- package/themes/github-light.json +9 -0
- package/themes/gruvbox-dark.json +9 -0
- package/themes/gruvbox-light.json +9 -0
- package/themes/horizon-light.json +9 -0
- package/themes/kanagawa-lotus.json +9 -0
- package/themes/kanagawa.json +9 -0
- package/themes/modus-operandi.json +9 -0
- package/themes/monokai.json +9 -0
- package/themes/nightfox.json +9 -0
- package/themes/nord-light.json +9 -0
- package/themes/nord.json +9 -0
- package/themes/one-dark.json +9 -0
- package/themes/one-light.json +9 -0
- package/themes/palenight.json +9 -0
- package/themes/paper.json +9 -0
- package/themes/penumbra-light.json +9 -0
- package/themes/poimandres.json +9 -0
- package/themes/quiet-light.json +9 -0
- package/themes/rose-pine-dawn.json +9 -0
- package/themes/rose-pine.json +9 -0
- package/themes/solarized-dark.json +9 -0
- package/themes/solarized-light.json +9 -0
- package/themes/synthwave84.json +9 -0
- package/themes/tokyo-night-light.json +9 -0
- package/themes/tokyo-night.json +9 -0
- package/themes/vesper.json +9 -0
- package/index.html +0 -20
- package/public/icons/icon-192.svg +0 -11
- package/public/icons/icon-512.svg +0 -11
- package/public/sw-push.js +0 -53
- package/src/client/App.tsx +0 -42
- package/src/client/commands.ts +0 -36
- package/src/client/components/analytics/AnalyticsView.tsx +0 -244
- package/src/client/components/analytics/ChartCard.tsx +0 -194
- package/src/client/components/analytics/PeriodSelector.tsx +0 -42
- package/src/client/components/analytics/QuickStats.tsx +0 -122
- package/src/client/components/analytics/chartTokens.ts +0 -188
- package/src/client/components/analytics/charts/ActivityCalendar.tsx +0 -204
- package/src/client/components/analytics/charts/CacheEfficiencyChart.tsx +0 -56
- package/src/client/components/analytics/charts/ContextUtilizationChart.tsx +0 -106
- package/src/client/components/analytics/charts/CostAreaChart.tsx +0 -79
- package/src/client/components/analytics/charts/CostDistributionChart.tsx +0 -59
- package/src/client/components/analytics/charts/CostDonutChart.tsx +0 -84
- package/src/client/components/analytics/charts/CumulativeCostChart.tsx +0 -59
- package/src/client/components/analytics/charts/DailySummaryCards.tsx +0 -86
- package/src/client/components/analytics/charts/HourlyHeatmap.tsx +0 -133
- package/src/client/components/analytics/charts/NodeFleetOverview.tsx +0 -89
- package/src/client/components/analytics/charts/PermissionBreakdown.tsx +0 -98
- package/src/client/components/analytics/charts/ProjectRadar.tsx +0 -126
- package/src/client/components/analytics/charts/ResponseTimeScatter.tsx +0 -96
- package/src/client/components/analytics/charts/SessionBubbleChart.tsx +0 -114
- package/src/client/components/analytics/charts/SessionComplexityList.tsx +0 -65
- package/src/client/components/analytics/charts/SessionTimeline.tsx +0 -107
- package/src/client/components/analytics/charts/TokenFlowChart.tsx +0 -78
- package/src/client/components/analytics/charts/TokenSankeyChart.tsx +0 -93
- package/src/client/components/analytics/charts/ToolSunburst.tsx +0 -123
- package/src/client/components/analytics/charts/ToolTreemap.tsx +0 -110
- package/src/client/components/auth/PassphrasePrompt.tsx +0 -70
- package/src/client/components/chat/AttachmentChips.tsx +0 -116
- package/src/client/components/chat/ChatInput.tsx +0 -533
- package/src/client/components/chat/ChatView.tsx +0 -1076
- package/src/client/components/chat/CommandPalette.tsx +0 -162
- package/src/client/components/chat/ElicitationCard.tsx +0 -238
- package/src/client/components/chat/Message.tsx +0 -825
- package/src/client/components/chat/ModelSelector.tsx +0 -108
- package/src/client/components/chat/PermissionModeSelector.tsx +0 -41
- package/src/client/components/chat/PromptQuestion.tsx +0 -271
- package/src/client/components/chat/StatusBar.tsx +0 -50
- package/src/client/components/chat/TodoCard.tsx +0 -57
- package/src/client/components/chat/ToolGroup.tsx +0 -129
- package/src/client/components/chat/ToolResultRenderer.tsx +0 -348
- package/src/client/components/chat/VoiceRecorder.tsx +0 -85
- package/src/client/components/chat/toolSummary.ts +0 -41
- package/src/client/components/dashboard/DashboardView.tsx +0 -200
- package/src/client/components/dashboard/ProjectDashboardView.tsx +0 -179
- package/src/client/components/mesh/NodeBadge.tsx +0 -24
- package/src/client/components/mesh/PairingDialog.tsx +0 -340
- package/src/client/components/project-settings/ProjectClaude.tsx +0 -318
- package/src/client/components/project-settings/ProjectEnvironment.tsx +0 -235
- package/src/client/components/project-settings/ProjectGeneral.tsx +0 -76
- package/src/client/components/project-settings/ProjectMcp.tsx +0 -232
- package/src/client/components/project-settings/ProjectMemory.tsx +0 -488
- package/src/client/components/project-settings/ProjectNotifications.tsx +0 -48
- package/src/client/components/project-settings/ProjectPermissions.tsx +0 -209
- package/src/client/components/project-settings/ProjectPlugins.tsx +0 -117
- package/src/client/components/project-settings/ProjectRules.tsx +0 -286
- package/src/client/components/project-settings/ProjectSettingsView.tsx +0 -117
- package/src/client/components/project-settings/ProjectSkills.tsx +0 -91
- package/src/client/components/settings/Appearance.tsx +0 -275
- package/src/client/components/settings/BudgetSettings.tsx +0 -165
- package/src/client/components/settings/ClaudeSettings.tsx +0 -175
- package/src/client/components/settings/Editor.tsx +0 -123
- package/src/client/components/settings/Environment.tsx +0 -185
- package/src/client/components/settings/GlobalMcp.tsx +0 -216
- package/src/client/components/settings/GlobalMemory.tsx +0 -19
- package/src/client/components/settings/GlobalPlugins.tsx +0 -806
- package/src/client/components/settings/GlobalRules.tsx +0 -149
- package/src/client/components/settings/GlobalSkills.tsx +0 -140
- package/src/client/components/settings/MeshStatus.tsx +0 -183
- package/src/client/components/settings/Notifications.tsx +0 -123
- package/src/client/components/settings/SettingsView.tsx +0 -75
- package/src/client/components/settings/SkillMarketplace.tsx +0 -175
- package/src/client/components/settings/ThemePreview.tsx +0 -140
- package/src/client/components/settings/ThemeWizard.tsx +0 -405
- package/src/client/components/settings/mcp-shared.tsx +0 -194
- package/src/client/components/settings/skill-shared.tsx +0 -186
- package/src/client/components/setup/SetupWizard.tsx +0 -755
- package/src/client/components/sidebar/AddProjectModal.tsx +0 -438
- package/src/client/components/sidebar/NodeSettingsModal.tsx +0 -206
- package/src/client/components/sidebar/ProjectDropdown.tsx +0 -211
- package/src/client/components/sidebar/ProjectRail.tsx +0 -353
- package/src/client/components/sidebar/SearchFilter.tsx +0 -52
- package/src/client/components/sidebar/SessionList.tsx +0 -599
- package/src/client/components/sidebar/SettingsSidebar.tsx +0 -139
- package/src/client/components/sidebar/Sidebar.tsx +0 -469
- package/src/client/components/sidebar/UserIsland.tsx +0 -282
- package/src/client/components/sidebar/UserMenu.tsx +0 -107
- package/src/client/components/ui/CommandPalette.tsx +0 -321
- package/src/client/components/ui/ContextMenu.tsx +0 -153
- package/src/client/components/ui/ErrorBoundary.tsx +0 -56
- package/src/client/components/ui/IconPicker.tsx +0 -184
- package/src/client/components/ui/KeyboardShortcuts.tsx +0 -129
- package/src/client/components/ui/LatticeLogomark.tsx +0 -19
- package/src/client/components/ui/NodeDisconnectedOverlay.tsx +0 -35
- package/src/client/components/ui/PopupMenu.tsx +0 -120
- package/src/client/components/ui/SaveFooter.tsx +0 -63
- package/src/client/components/ui/Toast.tsx +0 -132
- package/src/client/components/ui/UpdateBanner.tsx +0 -110
- package/src/client/components/ui/UpdatePrompt.tsx +0 -47
- package/src/client/components/workspace/BookmarksView.tsx +0 -156
- package/src/client/components/workspace/FileBrowser.tsx +0 -174
- package/src/client/components/workspace/FileTree.tsx +0 -129
- package/src/client/components/workspace/FileViewer.tsx +0 -211
- package/src/client/components/workspace/NoteCard.tsx +0 -120
- package/src/client/components/workspace/NotesView.tsx +0 -102
- package/src/client/components/workspace/ScheduledTasksView.tsx +0 -117
- package/src/client/components/workspace/SplitPane.tsx +0 -81
- package/src/client/components/workspace/TabBar.tsx +0 -170
- package/src/client/components/workspace/TaskCard.tsx +0 -159
- package/src/client/components/workspace/TaskEditModal.tsx +0 -129
- package/src/client/components/workspace/TerminalInstance.tsx +0 -171
- package/src/client/components/workspace/TerminalView.tsx +0 -110
- package/src/client/components/workspace/WorkspaceView.tsx +0 -141
- package/src/client/hooks/useAnalytics.ts +0 -84
- package/src/client/hooks/useAttachments.ts +0 -313
- package/src/client/hooks/useBookmarks.ts +0 -57
- package/src/client/hooks/useEditorConfig.ts +0 -28
- package/src/client/hooks/useFocusTrap.ts +0 -74
- package/src/client/hooks/useIdleDetection.ts +0 -50
- package/src/client/hooks/useInstallPrompt.ts +0 -53
- package/src/client/hooks/useMesh.ts +0 -89
- package/src/client/hooks/useNotifications.ts +0 -54
- package/src/client/hooks/useOnline.ts +0 -6
- package/src/client/hooks/useProjectSettings.ts +0 -56
- package/src/client/hooks/useProjects.ts +0 -98
- package/src/client/hooks/usePushNotifications.ts +0 -92
- package/src/client/hooks/useSaveState.ts +0 -65
- package/src/client/hooks/useSession.ts +0 -580
- package/src/client/hooks/useSidebar.ts +0 -90
- package/src/client/hooks/useSkills.ts +0 -30
- package/src/client/hooks/useSpinnerVerb.ts +0 -36
- package/src/client/hooks/useSwipeDrawer.ts +0 -299
- package/src/client/hooks/useTheme.ts +0 -114
- package/src/client/hooks/useTimeTick.ts +0 -35
- package/src/client/hooks/useVoiceRecorder.ts +0 -169
- package/src/client/hooks/useWebSocket.ts +0 -27
- package/src/client/hooks/useWorkspace.ts +0 -57
- package/src/client/lib/theme-derive.ts +0 -196
- package/src/client/lib/workspace-url.ts +0 -219
- package/src/client/main.tsx +0 -10
- package/src/client/providers/WebSocketProvider.tsx +0 -186
- package/src/client/router.tsx +0 -578
- package/src/client/stores/analytics.ts +0 -68
- package/src/client/stores/bookmarks.ts +0 -45
- package/src/client/stores/mesh.ts +0 -78
- package/src/client/stores/session.ts +0 -569
- package/src/client/stores/sidebar.ts +0 -530
- package/src/client/stores/theme.ts +0 -44
- package/src/client/stores/workspace.ts +0 -518
- package/src/client/styles/global.css +0 -391
- package/src/client/styles/theme-vars.css +0 -18
- package/src/client/themes/index.ts +0 -105
- package/src/client/utils/editorUrl.ts +0 -55
- package/src/client/utils/findDuplicateKeys.ts +0 -12
- package/src/client/utils/formatSessionTitle.ts +0 -17
- package/src/client/vite-env.d.ts +0 -6
- package/src/server/analytics/engine.ts +0 -920
- package/src/server/assets.ts +0 -45
- package/src/server/auth/passphrase.ts +0 -78
- package/src/server/config.ts +0 -55
- package/src/server/daemon.ts +0 -567
- package/src/server/features/ralph-loop.ts +0 -173
- package/src/server/features/scheduler.ts +0 -304
- package/src/server/features/sticky-notes.ts +0 -104
- package/src/server/handlers/analytics.ts +0 -39
- package/src/server/handlers/attachment.ts +0 -189
- package/src/server/handlers/bookmarks.ts +0 -50
- package/src/server/handlers/chat.ts +0 -381
- package/src/server/handlers/editor.ts +0 -76
- package/src/server/handlers/fs.ts +0 -251
- package/src/server/handlers/loop.ts +0 -37
- package/src/server/handlers/memory.ts +0 -182
- package/src/server/handlers/mesh.ts +0 -362
- package/src/server/handlers/notes.ts +0 -47
- package/src/server/handlers/plugins.ts +0 -655
- package/src/server/handlers/project-settings.ts +0 -180
- package/src/server/handlers/scheduler.ts +0 -64
- package/src/server/handlers/session.ts +0 -226
- package/src/server/handlers/settings.ts +0 -157
- package/src/server/handlers/skills.ts +0 -378
- package/src/server/handlers/terminal.ts +0 -88
- package/src/server/handlers/themes.ts +0 -121
- package/src/server/handlers/update.ts +0 -133
- package/src/server/identity.ts +0 -56
- package/src/server/index.ts +0 -457
- package/src/server/logger.ts +0 -21
- package/src/server/mesh/connector.ts +0 -419
- package/src/server/mesh/crypto.ts +0 -106
- package/src/server/mesh/discovery.ts +0 -126
- package/src/server/mesh/pairing.ts +0 -123
- package/src/server/mesh/peers.ts +0 -60
- package/src/server/mesh/proxy.ts +0 -106
- package/src/server/mesh/session-sync.ts +0 -107
- package/src/server/project/bookmarks.ts +0 -83
- package/src/server/project/context-breakdown.ts +0 -307
- package/src/server/project/file-browser.ts +0 -106
- package/src/server/project/project-files.ts +0 -267
- package/src/server/project/pty-worker.cjs +0 -83
- package/src/server/project/registry.ts +0 -57
- package/src/server/project/sdk-bridge.ts +0 -1100
- package/src/server/project/session.ts +0 -723
- package/src/server/project/terminal.ts +0 -111
- package/src/server/project/warmup.ts +0 -285
- package/src/server/push.ts +0 -121
- package/src/server/tls.ts +0 -65
- package/src/server/tui.ts +0 -103
- package/src/server/update-checker.ts +0 -147
- package/src/server/ws/broadcast.ts +0 -61
- package/src/server/ws/router.ts +0 -123
- package/src/server/ws/server.ts +0 -2
- package/src/shared/analytics.ts +0 -40
- package/src/shared/messages.ts +0 -1302
- package/src/shared/models.ts +0 -255
- package/src/shared/project-settings.ts +0 -45
- package/tsconfig.json +0 -25
- package/vite.config.ts +0 -71
- /package/{src/server/runtime.ts → dist/server/runtime.js} +0 -0
- /package/{src/shared/constants.ts → dist/shared/constants.js} +0 -0
- /package/{src/shared/index.ts → dist/shared/index.js} +0 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import { log } from "../logger.js";
|
|
2
|
+
import { handleProxyResponse } from "../mesh/proxy.js";
|
|
3
|
+
import { registerHandler } from "../ws/router.js";
|
|
4
|
+
import { sendTo, broadcast } from "../ws/broadcast.js";
|
|
5
|
+
import { loadConfig } from "../config.js";
|
|
6
|
+
import { loadOrCreateIdentity } from "../identity.js";
|
|
7
|
+
import { generateInviteCode, parseInviteCode, validatePairingToken, consumePairingToken } from "../mesh/pairing.js";
|
|
8
|
+
import { addPeer, removePeer, loadPeers, getPeer } from "../mesh/peers.js";
|
|
9
|
+
import { getConnectedPeerIds, connectToPeer, reconnectPeer, getPeerConnection, disconnectPeer, getConnectedPeerProjects, registerInboundPeer } from "../mesh/connector.js";
|
|
10
|
+
import { getClientWebSocket, registerVirtualClient, removeVirtualClient } from "../ws/broadcast.js";
|
|
11
|
+
import { networkInterfaces } from "node:os";
|
|
12
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
13
|
+
import { execSync } from "node:child_process";
|
|
14
|
+
function getLocalAddress() {
|
|
15
|
+
var all = getAllAddresses();
|
|
16
|
+
return all.length > 0 ? all[0].address : "localhost";
|
|
17
|
+
}
|
|
18
|
+
function getAllAddresses() {
|
|
19
|
+
var interfaces = networkInterfaces();
|
|
20
|
+
var keys = Object.keys(interfaces);
|
|
21
|
+
var results = [];
|
|
22
|
+
for (var i = 0; i < keys.length; i++) {
|
|
23
|
+
var addrs = interfaces[keys[i]];
|
|
24
|
+
if (!addrs)
|
|
25
|
+
continue;
|
|
26
|
+
for (var j = 0; j < addrs.length; j++) {
|
|
27
|
+
if (!addrs[j].internal && addrs[j].family === "IPv4") {
|
|
28
|
+
results.push({ name: keys[i], address: addrs[j].address });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (isWSL()) {
|
|
33
|
+
var windowsAddrs = getWindowsHostAddresses();
|
|
34
|
+
for (var w = 0; w < windowsAddrs.length; w++) {
|
|
35
|
+
var exists = results.some(function (r) { return r.address === windowsAddrs[w].address; });
|
|
36
|
+
if (!exists) {
|
|
37
|
+
results.push(windowsAddrs[w]);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return results;
|
|
42
|
+
}
|
|
43
|
+
function isWSL() {
|
|
44
|
+
try {
|
|
45
|
+
if (existsSync("/proc/version")) {
|
|
46
|
+
var version = readFileSync("/proc/version", "utf-8");
|
|
47
|
+
return version.toLowerCase().includes("microsoft");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch { }
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
function getWindowsHostAddresses() {
|
|
54
|
+
var results = [];
|
|
55
|
+
try {
|
|
56
|
+
var output = execSync("powershell.exe -NoProfile -Command \"Get-NetIPAddress -AddressFamily IPv4 | ForEach-Object { \\$_.IPAddress + '|' + \\$_.InterfaceAlias }\"", { encoding: "utf-8", timeout: 5000, stdio: ["pipe", "pipe", "pipe"] });
|
|
57
|
+
var lines = output.trim().split(/\r?\n/);
|
|
58
|
+
for (var i = 0; i < lines.length; i++) {
|
|
59
|
+
var parts = lines[i].trim().split("|");
|
|
60
|
+
var ip = parts[0];
|
|
61
|
+
var iface = parts[1] || "windows";
|
|
62
|
+
if (!ip || ip === "127.0.0.1")
|
|
63
|
+
continue;
|
|
64
|
+
if (ip.startsWith("169.254."))
|
|
65
|
+
continue;
|
|
66
|
+
if (iface.includes("WSL"))
|
|
67
|
+
continue;
|
|
68
|
+
results.push({ name: iface.toLowerCase().replace(/\s+/g, "-"), address: ip });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
catch { }
|
|
72
|
+
return results;
|
|
73
|
+
}
|
|
74
|
+
function getLocalProjectsList() {
|
|
75
|
+
var config = loadConfig();
|
|
76
|
+
return config.projects.map(function (p) {
|
|
77
|
+
return { slug: p.slug, title: p.title };
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
export function buildNodesMessage() {
|
|
81
|
+
var peers = loadPeers();
|
|
82
|
+
var config = loadConfig();
|
|
83
|
+
var identity = loadOrCreateIdentity();
|
|
84
|
+
var connectedIds = new Set(getConnectedPeerIds());
|
|
85
|
+
var localAddrs = getAllAddresses().map(function (a) { return a.address + ":" + config.port; });
|
|
86
|
+
var local = {
|
|
87
|
+
id: identity.id,
|
|
88
|
+
name: config.name,
|
|
89
|
+
address: localAddrs[0] ?? "localhost:" + config.port,
|
|
90
|
+
addresses: localAddrs.length > 0 ? localAddrs : ["localhost:" + config.port],
|
|
91
|
+
port: config.port,
|
|
92
|
+
online: true,
|
|
93
|
+
isLocal: true,
|
|
94
|
+
projects: config.projects.map(function (p) {
|
|
95
|
+
return { slug: p.slug, path: p.path, title: p.title, nodeId: identity.id };
|
|
96
|
+
}),
|
|
97
|
+
};
|
|
98
|
+
var remotes = peers.map(function (peer) {
|
|
99
|
+
var peerProjects = getConnectedPeerProjects(peer.id);
|
|
100
|
+
return {
|
|
101
|
+
id: peer.id,
|
|
102
|
+
name: peer.name,
|
|
103
|
+
address: peer.addresses[0] ?? "",
|
|
104
|
+
addresses: peer.addresses,
|
|
105
|
+
port: 0,
|
|
106
|
+
online: connectedIds.has(peer.id),
|
|
107
|
+
isLocal: false,
|
|
108
|
+
projects: peerProjects.map(function (p) {
|
|
109
|
+
return { slug: p.slug, path: "", title: p.title, nodeId: peer.id };
|
|
110
|
+
}),
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
return [local, ...remotes];
|
|
114
|
+
}
|
|
115
|
+
registerHandler("mesh", function (clientId, message) {
|
|
116
|
+
log.meshHello("mesh message: %s from %s", message.type, clientId.slice(0, 8));
|
|
117
|
+
if (message.type === "mesh:generate_invite") {
|
|
118
|
+
var genMsg = message;
|
|
119
|
+
var config = loadConfig();
|
|
120
|
+
var address = genMsg.address || getLocalAddress();
|
|
121
|
+
generateInviteCode(address, config.port).then(function (result) {
|
|
122
|
+
sendTo(clientId, {
|
|
123
|
+
type: "mesh:invite_code",
|
|
124
|
+
code: result.code,
|
|
125
|
+
qrDataUrl: result.qrDataUrl,
|
|
126
|
+
});
|
|
127
|
+
}).catch(function (err) {
|
|
128
|
+
console.error("[lattice] Failed to generate invite code:", err);
|
|
129
|
+
});
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (message.type === "mesh:addresses") {
|
|
133
|
+
var addresses = getAllAddresses();
|
|
134
|
+
sendTo(clientId, { type: "mesh:addresses_result", addresses: addresses });
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (message.type === "mesh:pair") {
|
|
138
|
+
var pairMsg = message;
|
|
139
|
+
var parsed = parseInviteCode(pairMsg.code);
|
|
140
|
+
if (!parsed) {
|
|
141
|
+
sendTo(clientId, { type: "mesh:pair_failed", message: "Invalid invite code format" });
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
var wsUrl = "ws://" + parsed.address + ":" + parsed.port + "/ws";
|
|
145
|
+
var pairWs = new WebSocket(wsUrl);
|
|
146
|
+
var pairTimeout = setTimeout(function () {
|
|
147
|
+
pairWs.close();
|
|
148
|
+
sendTo(clientId, { type: "mesh:pair_failed", message: "Connection timed out" });
|
|
149
|
+
}, 15000);
|
|
150
|
+
pairWs.addEventListener("open", function () {
|
|
151
|
+
var identity = loadOrCreateIdentity();
|
|
152
|
+
var pairConfig = loadConfig();
|
|
153
|
+
pairWs.send(JSON.stringify({
|
|
154
|
+
type: "mesh:hello",
|
|
155
|
+
nodeId: identity.id,
|
|
156
|
+
name: pairConfig.name,
|
|
157
|
+
publicKey: identity.publicKey,
|
|
158
|
+
token: parsed.token,
|
|
159
|
+
port: pairConfig.port,
|
|
160
|
+
addresses: getAllAddresses().map(function (a) { return a.address + ":" + pairConfig.port; }),
|
|
161
|
+
projects: getLocalProjectsList(),
|
|
162
|
+
}));
|
|
163
|
+
});
|
|
164
|
+
pairWs.addEventListener("message", function (event) {
|
|
165
|
+
try {
|
|
166
|
+
var data = JSON.parse(event.data);
|
|
167
|
+
if (data.type === "mesh:hello_rejected") {
|
|
168
|
+
clearTimeout(pairTimeout);
|
|
169
|
+
pairWs.close();
|
|
170
|
+
sendTo(clientId, { type: "mesh:pair_failed", message: data.error ?? "Pairing rejected by remote node" });
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
if (data.type === "mesh:hello" && data.nodeId && data.name) {
|
|
174
|
+
clearTimeout(pairTimeout);
|
|
175
|
+
var peerAddr = parsed.address + ":" + parsed.port;
|
|
176
|
+
var peer = {
|
|
177
|
+
id: data.nodeId,
|
|
178
|
+
name: data.name,
|
|
179
|
+
addresses: [peerAddr],
|
|
180
|
+
publicKey: data.publicKey ?? "",
|
|
181
|
+
pairedAt: Date.now(),
|
|
182
|
+
};
|
|
183
|
+
addPeer(peer);
|
|
184
|
+
pairWs.close();
|
|
185
|
+
connectToPeer(peer.id, peerAddr);
|
|
186
|
+
var remoteProjectsList = data.projects ?? [];
|
|
187
|
+
var nodeInfo = {
|
|
188
|
+
id: peer.id,
|
|
189
|
+
name: peer.name,
|
|
190
|
+
address: peerAddr,
|
|
191
|
+
addresses: [peerAddr],
|
|
192
|
+
port: parsed.port,
|
|
193
|
+
online: true,
|
|
194
|
+
isLocal: false,
|
|
195
|
+
projects: remoteProjectsList.map(function (rp) {
|
|
196
|
+
return { slug: rp.slug, path: "", title: rp.title, nodeId: peer.id };
|
|
197
|
+
}),
|
|
198
|
+
};
|
|
199
|
+
sendTo(clientId, { type: "mesh:paired", node: nodeInfo });
|
|
200
|
+
broadcast({ type: "mesh:nodes", nodes: buildNodesMessage() });
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
catch {
|
|
204
|
+
console.error("[lattice] mesh:pair — invalid handshake response");
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
pairWs.addEventListener("error", function () {
|
|
208
|
+
clearTimeout(pairTimeout);
|
|
209
|
+
sendTo(clientId, { type: "mesh:pair_failed", message: "Failed to connect to " + parsed.address + ":" + parsed.port });
|
|
210
|
+
});
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
if (message.type === "mesh:hello") {
|
|
214
|
+
var hello = message;
|
|
215
|
+
var knownPeer = hello.nodeId ? getPeer(hello.nodeId) : undefined;
|
|
216
|
+
log.meshHello("mesh:hello from nodeId=%s name=%s known=%s", hello.nodeId?.slice(0, 8), hello.name, !!knownPeer);
|
|
217
|
+
if (knownPeer) {
|
|
218
|
+
if (knownPeer.publicKey && hello.publicKey && knownPeer.publicKey !== hello.publicKey) {
|
|
219
|
+
log.meshHello(" ✗ public key mismatch for %s", hello.name);
|
|
220
|
+
sendTo(clientId, { type: "mesh:hello_rejected", error: "Public key mismatch — possible impersonation" });
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
var inboundWs = getClientWebSocket(clientId);
|
|
224
|
+
log.meshHello(" registering inbound connection for %s (ws=%s, projects=%d)", hello.name, !!inboundWs, hello.projects?.length ?? 0);
|
|
225
|
+
if (inboundWs) {
|
|
226
|
+
registerInboundPeer(hello.nodeId, inboundWs, hello.projects ?? []);
|
|
227
|
+
}
|
|
228
|
+
var identity = loadOrCreateIdentity();
|
|
229
|
+
sendTo(clientId, {
|
|
230
|
+
type: "mesh:hello",
|
|
231
|
+
nodeId: identity.id,
|
|
232
|
+
name: loadConfig().name,
|
|
233
|
+
publicKey: identity.publicKey,
|
|
234
|
+
projects: getLocalProjectsList(),
|
|
235
|
+
});
|
|
236
|
+
broadcast({ type: "mesh:nodes", nodes: buildNodesMessage() });
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
if (!hello.token || !validatePairingToken(hello.token)) {
|
|
240
|
+
sendTo(clientId, { type: "mesh:hello_rejected", error: "Invalid or expired invite code" });
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
consumePairingToken(hello.token);
|
|
244
|
+
var peerAddresses = hello.addresses ?? [];
|
|
245
|
+
var peer = {
|
|
246
|
+
id: hello.nodeId,
|
|
247
|
+
name: hello.name,
|
|
248
|
+
addresses: peerAddresses,
|
|
249
|
+
publicKey: hello.publicKey ?? "",
|
|
250
|
+
pairedAt: Date.now(),
|
|
251
|
+
};
|
|
252
|
+
addPeer(peer);
|
|
253
|
+
if (peerAddresses.length > 0) {
|
|
254
|
+
connectToPeer(peer.id, peerAddresses[0]);
|
|
255
|
+
}
|
|
256
|
+
var identity2 = loadOrCreateIdentity();
|
|
257
|
+
sendTo(clientId, {
|
|
258
|
+
type: "mesh:hello",
|
|
259
|
+
nodeId: identity2.id,
|
|
260
|
+
name: loadConfig().name,
|
|
261
|
+
publicKey: identity2.publicKey,
|
|
262
|
+
projects: [],
|
|
263
|
+
});
|
|
264
|
+
broadcast({ type: "mesh:nodes", nodes: buildNodesMessage() });
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
if (message.type === "mesh:proxy_request") {
|
|
268
|
+
var proxyReq = message;
|
|
269
|
+
log.meshProxy("received proxy_request via handler from %s: %s for %s", clientId.slice(0, 8), proxyReq.payload.type, proxyReq.projectSlug);
|
|
270
|
+
registerVirtualClient("mesh-proxy:" + clientId + ":" + proxyReq.requestId, function (response) {
|
|
271
|
+
log.meshProxy(" → sending proxy_response %s back to client %s", response.type, clientId.slice(0, 8));
|
|
272
|
+
sendTo(clientId, {
|
|
273
|
+
type: "mesh:proxy_response",
|
|
274
|
+
projectSlug: proxyReq.projectSlug,
|
|
275
|
+
requestId: proxyReq.requestId,
|
|
276
|
+
payload: response,
|
|
277
|
+
});
|
|
278
|
+
removeVirtualClient("mesh-proxy:" + clientId + ":" + proxyReq.requestId);
|
|
279
|
+
});
|
|
280
|
+
import("../ws/router.js").then(function (mod) {
|
|
281
|
+
mod.routeMessage("mesh-proxy:" + clientId + ":" + proxyReq.requestId, proxyReq.payload);
|
|
282
|
+
});
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
if (message.type === "mesh:proxy_response") {
|
|
286
|
+
var proxyRes = message;
|
|
287
|
+
log.meshProxy("received proxy_response via handler: %s", proxyRes.payload.type);
|
|
288
|
+
handleProxyResponse(proxyRes);
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
if (message.type === "mesh:reconnect") {
|
|
292
|
+
var reconnectMsg = message;
|
|
293
|
+
reconnectPeer(reconnectMsg.nodeId);
|
|
294
|
+
setTimeout(function () {
|
|
295
|
+
broadcast({ type: "mesh:nodes", nodes: buildNodesMessage() });
|
|
296
|
+
}, 2000);
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
if (message.type === "mesh:unpair") {
|
|
300
|
+
var unpairMsg = message;
|
|
301
|
+
var identity = loadOrCreateIdentity();
|
|
302
|
+
var peerWs = getPeerConnection(unpairMsg.nodeId);
|
|
303
|
+
if (peerWs) {
|
|
304
|
+
peerWs.send(JSON.stringify({ type: "mesh:unpaired", nodeId: identity.id }));
|
|
305
|
+
}
|
|
306
|
+
disconnectPeer(unpairMsg.nodeId);
|
|
307
|
+
var removed = removePeer(unpairMsg.nodeId);
|
|
308
|
+
if (removed) {
|
|
309
|
+
broadcast({ type: "mesh:nodes", nodes: buildNodesMessage() });
|
|
310
|
+
}
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
if (message.type === "mesh:unpaired") {
|
|
314
|
+
var unpaired = message;
|
|
315
|
+
disconnectPeer(unpaired.nodeId);
|
|
316
|
+
var wasRemoved = removePeer(unpaired.nodeId);
|
|
317
|
+
if (wasRemoved) {
|
|
318
|
+
broadcast({ type: "mesh:nodes", nodes: buildNodesMessage() });
|
|
319
|
+
}
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { registerHandler } from "../ws/router.js";
|
|
2
|
+
import { sendTo, broadcast } from "../ws/broadcast.js";
|
|
3
|
+
import { listNotes, createNote, updateNote, deleteNote } from "../features/sticky-notes.js";
|
|
4
|
+
registerHandler("notes", function (clientId, message) {
|
|
5
|
+
if (message.type === "notes:list") {
|
|
6
|
+
var listMsg = message;
|
|
7
|
+
sendTo(clientId, { type: "notes:list_result", notes: listNotes(listMsg.projectSlug) });
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (message.type === "notes:create") {
|
|
11
|
+
var createMsg = message;
|
|
12
|
+
var note = createNote(createMsg.content, createMsg.projectSlug);
|
|
13
|
+
broadcast({ type: "notes:created", note });
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (message.type === "notes:update") {
|
|
17
|
+
var updateMsg = message;
|
|
18
|
+
var updated = updateNote(updateMsg.id, updateMsg.content);
|
|
19
|
+
if (!updated) {
|
|
20
|
+
sendTo(clientId, { type: "chat:error", message: "Note not found" });
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
broadcast({ type: "notes:updated", note: updated });
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (message.type === "notes:delete") {
|
|
27
|
+
var deleteMsg = message;
|
|
28
|
+
var deleted = deleteNote(deleteMsg.id);
|
|
29
|
+
if (!deleted) {
|
|
30
|
+
sendTo(clientId, { type: "chat:error", message: "Note not found" });
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
broadcast({ type: "notes:deleted", id: deleteMsg.id });
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
});
|