khal-os 1.260324.2
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/.env.example +23 -0
- package/.genie/mailbox/cli-sent.jsonl +3 -0
- package/.genie/mailbox/ds1-wave2-engineer-1.json +15 -0
- package/.genie/mailbox/ds1-wave2-engineer-2.json +15 -0
- package/.genie/mailbox/ds1-wave2-engineer-3.json +15 -0
- package/.genie/state/os-observability.json +39 -0
- package/.genie/state/tmux-control-mode-terminal.json +28 -0
- package/.genie/wishes/genieos-one-theme/WISH.md +417 -0
- package/.genie/wishes/workos-prod-rbac/WISH.md +345 -0
- package/.github/workflows/ci.yml +39 -0
- package/.github/workflows/release.yml +78 -0
- package/.github/workflows/version.yml +122 -0
- package/.husky/pre-commit +1 -0
- package/.pnpm-approve-builds.json +1 -0
- package/CLAUDE.md +117 -0
- package/LICENSE +21 -0
- package/README.md +38 -0
- package/biome.json +124 -0
- package/bun.lock +1249 -0
- package/docs/workos-setup.md +116 -0
- package/ecosystem.config.cjs +26 -0
- package/instrumentation.ts +8 -0
- package/knip.json +35 -0
- package/nats.conf +7 -0
- package/next.config.ts +25 -0
- package/package.json +78 -0
- package/packages/dev3000-app/components.ts +12 -0
- package/packages/dev3000-app/manifest.ts +19 -0
- package/packages/dev3000-app/package.json +23 -0
- package/packages/dev3000-app/views/dev3000/Dev3000App.tsx +758 -0
- package/packages/dev3000-app/views/dev3000/ErrorsPanel.tsx +160 -0
- package/packages/dev3000-app/views/dev3000/dev3000-context.tsx +21 -0
- package/packages/dev3000-app/views/dev3000/index.ts +4 -0
- package/packages/dev3000-app/views/dev3000/schema.ts +55 -0
- package/packages/dev3000-app/views/dev3000/service/index.ts +358 -0
- package/packages/dev3000-app/views/dev3000/service/runtime +1 -0
- package/packages/dev3000-app/views/dev3000/subjects.ts +9 -0
- package/packages/dev3000-app/views/dev3000/types.ts +77 -0
- package/packages/files-app/components.ts +12 -0
- package/packages/files-app/manifest.ts +19 -0
- package/packages/files-app/package.json +23 -0
- package/packages/files-app/views/files/ContextMenu.tsx +151 -0
- package/packages/files-app/views/files/DeleteConfirmDialog.tsx +39 -0
- package/packages/files-app/views/files/FileItem.tsx +128 -0
- package/packages/files-app/views/files/FilesApp.tsx +509 -0
- package/packages/files-app/views/files/FilesListView.tsx +201 -0
- package/packages/files-app/views/files/FilesToolbar.tsx +117 -0
- package/packages/files-app/views/files/GridView.tsx +90 -0
- package/packages/files-app/views/files/InlineInput.tsx +131 -0
- package/packages/files-app/views/files/UploadOverlay.tsx +61 -0
- package/packages/files-app/views/files/schema.ts +49 -0
- package/packages/files-app/views/files/service/index.ts +184 -0
- package/packages/files-app/views/files/service/runtime +1 -0
- package/packages/files-app/views/files/use-files.ts +201 -0
- package/packages/files-app/views/files/use-upload.ts +105 -0
- package/packages/genie-app/components.ts +12 -0
- package/packages/genie-app/lib/subjects.ts +87 -0
- package/packages/genie-app/manifest.ts +19 -0
- package/packages/genie-app/package.json +29 -0
- package/packages/genie-app/views/genie/service/agent-lifecycle.ts +136 -0
- package/packages/genie-app/views/genie/service/cli.ts +114 -0
- package/packages/genie-app/views/genie/service/comms.ts +141 -0
- package/packages/genie-app/views/genie/service/directory.ts +167 -0
- package/packages/genie-app/views/genie/service/index.ts +219 -0
- package/packages/genie-app/views/genie/service/system.ts +123 -0
- package/packages/genie-app/views/genie/service/teams.ts +191 -0
- package/packages/genie-app/views/genie/service/terminal-proxy.ts +184 -0
- package/packages/genie-app/views/genie/service/tmux-control.ts +318 -0
- package/packages/genie-app/views/genie/service/wishes.ts +270 -0
- package/packages/genie-app/views/genie/ui/GenieApp.tsx +5 -0
- package/packages/genie-app/views/genie/ui/PaneCard.tsx +307 -0
- package/packages/genie-app/views/genie/ui/Sidebar.tsx +212 -0
- package/packages/genie-app/views/genie/ui/TabBar.tsx +70 -0
- package/packages/genie-app/views/genie/ui/WorkspaceCanvas.tsx +343 -0
- package/packages/genie-app/views/genie/ui/XTermPane.tsx +306 -0
- package/packages/genie-app/views/genie/ui/hooks/useNatsAction.ts +54 -0
- package/packages/genie-app/views/genie/ui/hooks/useNatsRequest.ts +68 -0
- package/packages/genie-app/views/genie/ui/panels/AgentsPanel.tsx +399 -0
- package/packages/genie-app/views/genie/ui/panels/ChatPanel.tsx +351 -0
- package/packages/genie-app/views/genie/ui/panels/SystemPanel.tsx +195 -0
- package/packages/genie-app/views/genie/ui/panels/TeamsPanel.tsx +560 -0
- package/packages/genie-app/views/genie/ui/panels/WishesPanel.tsx +424 -0
- package/packages/nats-viewer-app/components.ts +12 -0
- package/packages/nats-viewer-app/manifest.ts +18 -0
- package/packages/nats-viewer-app/package.json +14 -0
- package/packages/nats-viewer-app/views/nats-viewer/ActiveSubs.tsx +34 -0
- package/packages/nats-viewer-app/views/nats-viewer/MessageLog.tsx +247 -0
- package/packages/nats-viewer-app/views/nats-viewer/NatsViewer.tsx +209 -0
- package/packages/nats-viewer-app/views/nats-viewer/PublishPanel.tsx +111 -0
- package/packages/nats-viewer-app/views/nats-viewer/RequestPanel.tsx +165 -0
- package/packages/nats-viewer-app/views/nats-viewer/Sidebar.tsx +59 -0
- package/packages/nats-viewer-app/views/nats-viewer/SubjectCatalog.tsx +63 -0
- package/packages/nats-viewer-app/views/nats-viewer/SubscribeInput.tsx +59 -0
- package/packages/nats-viewer-app/views/nats-viewer/index.ts +5 -0
- package/packages/nats-viewer-app/views/nats-viewer/nats-viewer-context.tsx +31 -0
- package/packages/nats-viewer-app/views/nats-viewer/types.ts +7 -0
- package/packages/nats-viewer-app/views/nats-viewer/use-message-buffer.ts +55 -0
- package/packages/os-cli/package.json +18 -0
- package/packages/os-cli/src/commands/events.ts +176 -0
- package/packages/os-cli/src/commands/logs.ts +96 -0
- package/packages/os-cli/src/commands/status.ts +53 -0
- package/packages/os-cli/src/commands/traces.ts +115 -0
- package/packages/os-cli/src/index.ts +15 -0
- package/packages/os-cli/src/lib/formatter.ts +123 -0
- package/packages/os-cli/src/lib/nats.ts +16 -0
- package/packages/os-cli/src/lib/trace-tree.ts +144 -0
- package/packages/os-cli/tsconfig.json +12 -0
- package/packages/os-sdk/package.json +27 -0
- package/packages/os-sdk/src/api/handler.ts +67 -0
- package/packages/os-sdk/src/config.ts +68 -0
- package/packages/os-sdk/src/db/factory.test.ts +42 -0
- package/packages/os-sdk/src/db/factory.ts +72 -0
- package/packages/os-sdk/src/db/migrate.ts +140 -0
- package/packages/os-sdk/src/db/provision.ts +44 -0
- package/packages/os-sdk/src/index.ts +36 -0
- package/packages/os-sdk/src/service/console-intercept.ts +60 -0
- package/packages/os-sdk/src/service/logger.ts +88 -0
- package/packages/os-sdk/src/service/o11y-streams.ts +88 -0
- package/packages/os-sdk/src/service/runtime.ts +259 -0
- package/packages/os-sdk/src/service/trace.ts +71 -0
- package/packages/os-sdk/tsconfig.json +16 -0
- package/packages/os-ui/package.json +13 -0
- package/packages/os-ui/src/index.ts +29 -0
- package/packages/os-ui/src/server.ts +4 -0
- package/packages/os-ui/tsconfig.json +19 -0
- package/packages/settings-app/components.ts +12 -0
- package/packages/settings-app/manifest.ts +18 -0
- package/packages/settings-app/package.json +14 -0
- package/packages/settings-app/views/settings/Settings.tsx +492 -0
- package/packages/terminal-app/components.ts +12 -0
- package/packages/terminal-app/manifest.ts +20 -0
- package/packages/terminal-app/package.json +23 -0
- package/packages/terminal-app/views/terminal/schema.ts +82 -0
- package/packages/terminal-app/views/terminal/service/index.ts +133 -0
- package/packages/terminal-app/views/terminal/service/runtime +1 -0
- package/packages/terminal-app/views/terminal/service/session.ts +290 -0
- package/packages/terminal-app/views/terminal/service/shell-hooks/bashrc-hook.sh +21 -0
- package/packages/terminal-app/views/terminal/types.ts +26 -0
- package/packages/terminal-app/views/terminal/ui/MultiTerminalApp.tsx +615 -0
- package/packages/terminal-app/views/terminal/ui/SplitDragHandle.tsx +91 -0
- package/packages/terminal-app/views/terminal/ui/SplitPaneRenderer.tsx +112 -0
- package/packages/terminal-app/views/terminal/ui/TerminalPane.tsx +478 -0
- package/packages/terminal-app/views/terminal/ui/TerminalTabBar.tsx +131 -0
- package/pnpm-workspace.yaml +9 -0
- package/postcss.config.mjs +7 -0
- package/public/file.svg +1 -0
- package/public/globe.svg +1 -0
- package/public/icons/code-server.svg +6 -0
- package/public/icons/default.svg +5 -0
- package/public/icons/dusk/1password.svg +1 -0
- package/public/icons/dusk/activity_monitor.svg +1 -0
- package/public/icons/dusk/app_store.svg +1 -0
- package/public/icons/dusk/atom.svg +1 -0
- package/public/icons/dusk/brave.svg +1 -0
- package/public/icons/dusk/calculator.svg +1 -0
- package/public/icons/dusk/calendar.svg +1 -0
- package/public/icons/dusk/chrome.svg +1 -0
- package/public/icons/dusk/chrome2.svg +1 -0
- package/public/icons/dusk/dashboard.svg +13 -0
- package/public/icons/dusk/discord.svg +1 -0
- package/public/icons/dusk/dropbox.svg +1 -0
- package/public/icons/dusk/electron.svg +1 -0
- package/public/icons/dusk/figma.svg +1 -0
- package/public/icons/dusk/finder.svg +1 -0
- package/public/icons/dusk/finder2.svg +1 -0
- package/public/icons/dusk/finder3.svg +1 -0
- package/public/icons/dusk/firefox.svg +1 -0
- package/public/icons/dusk/framer.svg +1 -0
- package/public/icons/dusk/gimp.svg +1 -0
- package/public/icons/dusk/github_desktop.svg +1 -0
- package/public/icons/dusk/hyper.svg +1 -0
- package/public/icons/dusk/hyper3.svg +1 -0
- package/public/icons/dusk/intellij.svg +1 -0
- package/public/icons/dusk/iterm2.svg +1 -0
- package/public/icons/dusk/itunes.svg +1 -0
- package/public/icons/dusk/mail.svg +1 -0
- package/public/icons/dusk/messenger.svg +1 -0
- package/public/icons/dusk/mongodb.svg +1 -0
- package/public/icons/dusk/notes.svg +1 -0
- package/public/icons/dusk/notion.svg +1 -0
- package/public/icons/dusk/obs.svg +1 -0
- package/public/icons/dusk/pages.svg +1 -0
- package/public/icons/dusk/photos.svg +1 -0
- package/public/icons/dusk/postman.svg +1 -0
- package/public/icons/dusk/preview.svg +1 -0
- package/public/icons/dusk/reminders.svg +1 -0
- package/public/icons/dusk/safari.svg +1 -0
- package/public/icons/dusk/sequel_pro.svg +1 -0
- package/public/icons/dusk/sketch.svg +1 -0
- package/public/icons/dusk/skype.svg +1 -0
- package/public/icons/dusk/slack.svg +1 -0
- package/public/icons/dusk/slack2.svg +1 -0
- package/public/icons/dusk/spotify.svg +1 -0
- package/public/icons/dusk/steam.svg +1 -0
- package/public/icons/dusk/system_preferences.svg +1 -0
- package/public/icons/dusk/tableplus.svg +1 -0
- package/public/icons/dusk/teams.svg +1 -0
- package/public/icons/dusk/telegram.svg +1 -0
- package/public/icons/dusk/terminal.svg +1 -0
- package/public/icons/dusk/todoist.svg +1 -0
- package/public/icons/dusk/trash.svg +1 -0
- package/public/icons/dusk/trello.svg +1 -0
- package/public/icons/dusk/vivaldi.svg +1 -0
- package/public/icons/dusk/vlc.svg +1 -0
- package/public/icons/dusk/vscode.svg +1 -0
- package/public/icons/dusk/whatsapp.svg +1 -0
- package/public/icons/dusk/xeyes.svg +1 -0
- package/public/icons/dusk/zoom.svg +1 -0
- package/public/icons/files.svg +5 -0
- package/public/icons/pwa/icon-192.png +0 -0
- package/public/icons/pwa/icon-512.png +0 -0
- package/public/icons/settings.svg +14 -0
- package/public/icons/terminal.svg +5 -0
- package/public/icons/text-editor.svg +7 -0
- package/public/manifest.json +38 -0
- package/public/next.svg +1 -0
- package/public/sw.js +41 -0
- package/public/vercel.svg +1 -0
- package/public/wallpapers/default.svg +10 -0
- package/public/window.svg +1 -0
- package/scripts/generate-pwa-icons.mjs +33 -0
- package/scripts/install-nats.sh +37 -0
- package/sentry.client.config.ts +21 -0
- package/sentry.edge.config.ts +12 -0
- package/sentry.server.config.ts +12 -0
- package/src/app/api/files/download/route.ts +81 -0
- package/src/app/api/files/download-zip/route.ts +102 -0
- package/src/app/api/files/upload/route.ts +58 -0
- package/src/app/api/webhooks/workos/route.ts +98 -0
- package/src/app/auth/callback/route.ts +16 -0
- package/src/app/auth/logout/route.ts +15 -0
- package/src/app/desktop/desktop-shell.tsx +110 -0
- package/src/app/desktop/layout.tsx +8 -0
- package/src/app/desktop/page.tsx +24 -0
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +7 -0
- package/src/app/layout.tsx +64 -0
- package/src/app/offline/page.tsx +83 -0
- package/src/app/page.tsx +5 -0
- package/src/app/standalone/[appId]/page.tsx +28 -0
- package/src/app/standalone/layout.tsx +10 -0
- package/src/components/app-icon.tsx +55 -0
- package/src/components/apps/_echo/schema.ts +14 -0
- package/src/components/apps/_echo/service/index.ts +42 -0
- package/src/components/apps/app-manifest.ts +97 -0
- package/src/components/apps/app-registry.ts +55 -0
- package/src/components/apps/dev3000/Dev3000App.tsx +224 -0
- package/src/components/apps/dev3000/ErrorsPanel.tsx +160 -0
- package/src/components/apps/dev3000/Sidebar.tsx +41 -0
- package/src/components/apps/dev3000/TimelineLog.tsx +173 -0
- package/src/components/apps/dev3000/dev3000-context.tsx +29 -0
- package/src/components/apps/dev3000/index.ts +4 -0
- package/src/components/apps/dev3000/schema.ts +48 -0
- package/src/components/apps/dev3000/service/index.ts +520 -0
- package/src/components/apps/dev3000/service/runtime +1 -0
- package/src/components/apps/dev3000/types.ts +15 -0
- package/src/components/apps/dev3000/use-message-buffer.ts +46 -0
- package/src/components/apps/files/ContextMenu.tsx +151 -0
- package/src/components/apps/files/DeleteConfirmDialog.tsx +78 -0
- package/src/components/apps/files/FileItem.tsx +128 -0
- package/src/components/apps/files/FilesApp.tsx +509 -0
- package/src/components/apps/files/FilesListView.tsx +201 -0
- package/src/components/apps/files/FilesToolbar.tsx +117 -0
- package/src/components/apps/files/GridView.tsx +90 -0
- package/src/components/apps/files/InlineInput.tsx +131 -0
- package/src/components/apps/files/UploadOverlay.tsx +61 -0
- package/src/components/apps/files/schema.ts +49 -0
- package/src/components/apps/files/service/index.ts +227 -0
- package/src/components/apps/files/service/runtime +1 -0
- package/src/components/apps/files/use-files.ts +201 -0
- package/src/components/apps/files/use-upload.ts +105 -0
- package/src/components/apps/nats-viewer/ActiveSubs.tsx +34 -0
- package/src/components/apps/nats-viewer/MessageLog.tsx +247 -0
- package/src/components/apps/nats-viewer/NatsViewer.tsx +209 -0
- package/src/components/apps/nats-viewer/PublishPanel.tsx +113 -0
- package/src/components/apps/nats-viewer/RequestPanel.tsx +167 -0
- package/src/components/apps/nats-viewer/Sidebar.tsx +62 -0
- package/src/components/apps/nats-viewer/SubjectCatalog.tsx +64 -0
- package/src/components/apps/nats-viewer/SubscribeInput.tsx +59 -0
- package/src/components/apps/nats-viewer/index.ts +5 -0
- package/src/components/apps/nats-viewer/nats-viewer-context.tsx +31 -0
- package/src/components/apps/nats-viewer/types.ts +7 -0
- package/src/components/apps/nats-viewer/use-message-buffer.ts +55 -0
- package/src/components/apps/settings/Settings.tsx +492 -0
- package/src/components/apps/terminal/schema.ts +82 -0
- package/src/components/apps/terminal/service/index.ts +189 -0
- package/src/components/apps/terminal/service/runtime +1 -0
- package/src/components/apps/terminal/service/session.ts +296 -0
- package/src/components/apps/terminal/service/shell-hooks/bashrc-hook.sh +21 -0
- package/src/components/apps/terminal/types.ts +26 -0
- package/src/components/apps/terminal/ui/MultiTerminalApp.tsx +617 -0
- package/src/components/apps/terminal/ui/SplitDragHandle.tsx +91 -0
- package/src/components/apps/terminal/ui/SplitPaneRenderer.tsx +112 -0
- package/src/components/apps/terminal/ui/TerminalPane.tsx +476 -0
- package/src/components/apps/terminal/ui/TerminalTabBar.tsx +131 -0
- package/src/components/desktop/AnimatedBackground.tsx +69 -0
- package/src/components/desktop/Desktop.tsx +79 -0
- package/src/components/desktop/DesktopBackground.tsx +16 -0
- package/src/components/desktop/DesktopIcon.tsx +49 -0
- package/src/components/desktop/ShortcutViewer.tsx +136 -0
- package/src/components/desktop/WindowRenderer.tsx +34 -0
- package/src/components/desktop/WindowSwitcher.tsx +42 -0
- package/src/components/notifications/NotificationCenter.tsx +153 -0
- package/src/components/notifications/NotificationToasts.tsx +66 -0
- package/src/components/notifications/OrphanSessionToast.tsx +293 -0
- package/src/components/os-primitives/collapsible-sidebar.tsx +226 -0
- package/src/components/os-primitives/dialog.tsx +76 -0
- package/src/components/os-primitives/empty-state.tsx +43 -0
- package/src/components/os-primitives/index.ts +21 -0
- package/src/components/os-primitives/list-view.tsx +155 -0
- package/src/components/os-primitives/property-panel.tsx +108 -0
- package/src/components/os-primitives/section-header.tsx +19 -0
- package/src/components/os-primitives/sidebar-nav.tsx +110 -0
- package/src/components/os-primitives/split-pane.tsx +146 -0
- package/src/components/os-primitives/status-badge.tsx +10 -0
- package/src/components/os-primitives/status-bar.tsx +100 -0
- package/src/components/os-primitives/toolbar.tsx +152 -0
- package/src/components/taskbar/AppLauncher.tsx +114 -0
- package/src/components/taskbar/RunningApps.tsx +71 -0
- package/src/components/taskbar/SystemTray.tsx +134 -0
- package/src/components/taskbar/Taskbar.tsx +45 -0
- package/src/components/taskbar/UserMenu.tsx +138 -0
- package/src/components/taskbar/WorkspaceSwitcher.tsx +9 -0
- package/src/components/ui/ContextMenu.tsx +130 -0
- package/src/components/ui/badge.tsx +39 -0
- package/src/components/ui/button.tsx +102 -0
- package/src/components/ui/command.tsx +165 -0
- package/src/components/ui/dropdown-menu.tsx +233 -0
- package/src/components/ui/input.tsx +48 -0
- package/src/components/ui/note.tsx +55 -0
- package/src/components/ui/separator.tsx +25 -0
- package/src/components/ui/spinner.tsx +42 -0
- package/src/components/ui/switch.tsx +36 -0
- package/src/components/ui/theme-provider.tsx +24 -0
- package/src/components/ui/theme-switcher.tsx +51 -0
- package/src/components/ui/tooltip.tsx +62 -0
- package/src/components/window/MobileWindowStack.tsx +218 -0
- package/src/components/window/SnapPreview.tsx +37 -0
- package/src/components/window/StandaloneFrame.tsx +170 -0
- package/src/components/window/Window.tsx +423 -0
- package/src/components/window/WindowContent.tsx +14 -0
- package/src/components/window/WindowControlsOverlay.tsx +89 -0
- package/src/components/window/WindowFrame.tsx +124 -0
- package/src/lib/auth/index.ts +27 -0
- package/src/lib/auth/roles.ts +50 -0
- package/src/lib/auth/types.ts +32 -0
- package/src/lib/auth/use-auth.ts +53 -0
- package/src/lib/auth/webhook-handler.ts +87 -0
- package/src/lib/auth/workos.ts +67 -0
- package/src/lib/constants.ts +1 -0
- package/src/lib/desktop/dedup.ts +57 -0
- package/src/lib/desktop/schema.ts +55 -0
- package/src/lib/files/filename-validation.ts +41 -0
- package/src/lib/files/safe-path.ts +49 -0
- package/src/lib/hooks/use-desktop-nats.ts +438 -0
- package/src/lib/hooks/use-is-mobile.ts +23 -0
- package/src/lib/hooks/use-launch-app.ts +79 -0
- package/src/lib/hooks/use-nats-notifications.ts +84 -0
- package/src/lib/hooks/use-nats.ts +60 -0
- package/src/lib/hooks/use-visual-viewport.ts +72 -0
- package/src/lib/icons/resolve-window-icon.ts +10 -0
- package/src/lib/keyboard/defaults.ts +146 -0
- package/src/lib/keyboard/types.ts +52 -0
- package/src/lib/keyboard/use-global-keybinds.ts +231 -0
- package/src/lib/nats-client.ts +255 -0
- package/src/lib/nats.ts +35 -0
- package/src/lib/notifications/schema.ts +12 -0
- package/src/lib/service-loader.ts +171 -0
- package/src/lib/subjects.ts +64 -0
- package/src/lib/utils.ts +6 -0
- package/src/lib/ws-bridge.ts +288 -0
- package/src/lib/ws-protocol.ts +53 -0
- package/src/lib/ws-server.ts +167 -0
- package/src/middleware.ts +57 -0
- package/src/stores/desktop-store.ts +112 -0
- package/src/stores/keybind-store.ts +66 -0
- package/src/stores/notification-store.ts +271 -0
- package/src/stores/theme-store.ts +25 -0
- package/src/stores/window-store.ts +294 -0
- package/src/theme/animations.css +68 -0
- package/src/theme/base.css +123 -0
- package/src/theme/controls.css +35 -0
- package/src/theme/design-tokens.css +276 -0
- package/src/theme/index.css +23 -0
- package/src/theme/menus.css +45 -0
- package/src/theme/status.css +41 -0
- package/src/theme/surfaces.css +94 -0
- package/src/theme/tailwind-map.css +138 -0
- package/src/theme/taskbar.css +25 -0
- package/src/theme/terminal.css +55 -0
- package/src/theme/typography.css +26 -0
- package/src/theme/utilities.css +156 -0
- package/src/theme/window.css +103 -0
- package/src/types/desktop-entry.ts +12 -0
- package/src/types/use-descendants.d.ts +13 -0
- package/src/types/window.ts +28 -0
- package/src/types.d.ts +9 -0
- package/tauri/Cargo.lock +5464 -0
- package/tauri/Cargo.toml +19 -0
- package/tauri/build.rs +3 -0
- package/tauri/capabilities/default.json +36 -0
- package/tauri/icons/128x128.png +0 -0
- package/tauri/icons/128x128@2x.png +0 -0
- package/tauri/icons/32x32.png +0 -0
- package/tauri/icons/icon.png +0 -0
- package/tauri/src/main.rs +396 -0
- package/tauri/tauri.conf.json +23 -0
- package/tsconfig.json +43 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# WorkOS Dashboard Setup
|
|
2
|
+
|
|
3
|
+
Step-by-step guide for configuring WorkOS for Genie OS (Phase 1 — platform scope).
|
|
4
|
+
|
|
5
|
+
## 1. Create Production Environment
|
|
6
|
+
|
|
7
|
+
1. Log in to [WorkOS Dashboard](https://dashboard.workos.com)
|
|
8
|
+
2. Navigate to **Environments** and select the **Production** environment
|
|
9
|
+
3. Copy the following credentials to your `.env`:
|
|
10
|
+
- **API Key** (`WORKOS_API_KEY`): `sk_live_...`
|
|
11
|
+
- **Client ID** (`WORKOS_CLIENT_ID`): `client_...`
|
|
12
|
+
4. Set `NEXT_PUBLIC_WORKOS_REDIRECT_URI` to your production callback URL:
|
|
13
|
+
```
|
|
14
|
+
https://<prod-domain>/auth/callback
|
|
15
|
+
```
|
|
16
|
+
5. Generate a 32+ character random string for `WORKOS_COOKIE_PASSWORD`
|
|
17
|
+
|
|
18
|
+
## 2. Create NamasteX Organization
|
|
19
|
+
|
|
20
|
+
1. Go to **Organizations** > **Create Organization**
|
|
21
|
+
2. Name: `NamasteX`
|
|
22
|
+
3. Note the Organization ID (`org_...`) — you'll assign members to this org
|
|
23
|
+
|
|
24
|
+
## 3. Define Roles
|
|
25
|
+
|
|
26
|
+
Navigate to **Roles** and create the following roles. These slugs are forward-compatible with Phase 2 multi-org (WorkOS auto-prefixes org roles with `org-`, so platform roles need distinct slugs).
|
|
27
|
+
|
|
28
|
+
| Role Slug | Description | Assigned To |
|
|
29
|
+
|-----------|-------------|-------------|
|
|
30
|
+
| `platform-owner` | Full platform access — all permissions | NamasteX founders |
|
|
31
|
+
| `platform-admin` | All apps + settings + member management | NamasteX senior team |
|
|
32
|
+
| `platform-dev` | App access for development | NamasteX builders |
|
|
33
|
+
| `member` | Base access (WorkOS default role for new memberships) | All new users |
|
|
34
|
+
|
|
35
|
+
### Role → Permission Mapping
|
|
36
|
+
|
|
37
|
+
| Role | Permissions |
|
|
38
|
+
|------|------------|
|
|
39
|
+
| `platform-owner` | `apps:access`, `apps:install`, `settings:manage`, `members:manage`, `billing:manage`, `instances:manage` |
|
|
40
|
+
| `platform-admin` | `apps:access`, `settings:manage`, `members:manage` |
|
|
41
|
+
| `platform-dev` | `apps:access` |
|
|
42
|
+
| `member` | _(no explicit permissions — base access only)_ |
|
|
43
|
+
|
|
44
|
+
## 4. Define Permissions
|
|
45
|
+
|
|
46
|
+
Navigate to **Permissions** and create permissions using the `resource:action` pattern:
|
|
47
|
+
|
|
48
|
+
| Permission Slug | Description | Phase |
|
|
49
|
+
|----------------|-------------|-------|
|
|
50
|
+
| `apps:access` | Base app access | Phase 1 |
|
|
51
|
+
| `apps:install` | Install apps from marketplace | Future (Phase 6) |
|
|
52
|
+
| `settings:manage` | OS settings management | Phase 1 |
|
|
53
|
+
| `members:manage` | Invite/remove organization users | Phase 1 |
|
|
54
|
+
| `billing:manage` | Billing and subscription management | Future (Phase 5) |
|
|
55
|
+
| `instances:manage` | Fleet instance management | Future (Phase 3) |
|
|
56
|
+
|
|
57
|
+
Assign permissions to roles as shown in the mapping table above.
|
|
58
|
+
|
|
59
|
+
## 5. Configure Authentication
|
|
60
|
+
|
|
61
|
+
### Redirect URI
|
|
62
|
+
|
|
63
|
+
1. Go to **Authentication** > **Redirect URIs**
|
|
64
|
+
2. Add your production callback: `https://<prod-domain>/auth/callback`
|
|
65
|
+
3. Remove any staging URIs if present
|
|
66
|
+
|
|
67
|
+
### Email Verification
|
|
68
|
+
|
|
69
|
+
1. Under **Authentication** > **Email Verification**, enable email verification
|
|
70
|
+
2. This ensures users verify their email before accessing the platform
|
|
71
|
+
|
|
72
|
+
### Session Configuration
|
|
73
|
+
|
|
74
|
+
1. Under **Authentication** > **Sessions**:
|
|
75
|
+
- Session lifetime: 7 days (default)
|
|
76
|
+
- Inactivity timeout: 24 hours (recommended)
|
|
77
|
+
- Cookie settings are managed by AuthKit SDK via `WORKOS_COOKIE_PASSWORD`
|
|
78
|
+
|
|
79
|
+
## 6. Configure Webhook
|
|
80
|
+
|
|
81
|
+
1. Go to **Webhooks** > **Create Endpoint**
|
|
82
|
+
2. Endpoint URL: `https://<prod-domain>/api/webhooks/workos`
|
|
83
|
+
3. Select events to subscribe:
|
|
84
|
+
- `organization_membership.updated` — role changes
|
|
85
|
+
- `organization_membership.deleted` — membership revocations
|
|
86
|
+
- `user.updated` — user metadata changes
|
|
87
|
+
4. Copy the **Signing Secret** to `WORKOS_WEBHOOK_SECRET` in your `.env`
|
|
88
|
+
|
|
89
|
+
## 7. Assign Members
|
|
90
|
+
|
|
91
|
+
1. Go to **Organizations** > **NamasteX** > **Members**
|
|
92
|
+
2. Add team members and assign roles:
|
|
93
|
+
- Founders: `platform-owner`
|
|
94
|
+
- Senior team: `platform-admin`
|
|
95
|
+
- Developers: `platform-dev`
|
|
96
|
+
- New users default to: `member`
|
|
97
|
+
|
|
98
|
+
## Environment Variables Summary
|
|
99
|
+
|
|
100
|
+
```env
|
|
101
|
+
WORKOS_API_KEY=sk_live_...
|
|
102
|
+
WORKOS_CLIENT_ID=client_...
|
|
103
|
+
NEXT_PUBLIC_WORKOS_REDIRECT_URI=https://<prod-domain>/auth/callback
|
|
104
|
+
WORKOS_COOKIE_PASSWORD=<32+ char random string>
|
|
105
|
+
WORKOS_WEBHOOK_SECRET=whsec_...
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Phase 1 Scope
|
|
109
|
+
|
|
110
|
+
This configuration covers the **platform scope** only (NamasteX org, platform roles).
|
|
111
|
+
|
|
112
|
+
- **Phase 2** will add client organizations with `client-owner`, `client-admin`, `client-member` roles
|
|
113
|
+
- **Phase 3** will add instance fleet management
|
|
114
|
+
- **Phase 4** will add FGA per-app permissions
|
|
115
|
+
- **Phase 5** will enable Admin Portal, SCIM, and Audit Logs
|
|
116
|
+
- **Phase 6** will add the app marketplace
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
apps: [
|
|
3
|
+
{
|
|
4
|
+
name: 'khal-nats',
|
|
5
|
+
script: 'nats-server',
|
|
6
|
+
args: '-c nats.conf',
|
|
7
|
+
cwd: __dirname,
|
|
8
|
+
autorestart: true,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: 'khal-services',
|
|
12
|
+
script: 'bun',
|
|
13
|
+
args: 'run src/lib/service-loader.ts',
|
|
14
|
+
cwd: __dirname,
|
|
15
|
+
autorestart: true,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'khal-ws-bridge',
|
|
19
|
+
script: 'bun',
|
|
20
|
+
args: 'run src/lib/ws-server.ts',
|
|
21
|
+
cwd: __dirname,
|
|
22
|
+
autorestart: true,
|
|
23
|
+
env: { WS_BRIDGE_PORT: '4280' },
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
};
|
package/knip.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/knip@5/schema.json",
|
|
3
|
+
"project": ["src/**/*.{ts,tsx}"],
|
|
4
|
+
"ignoreDependencies": [
|
|
5
|
+
"tailwindcss",
|
|
6
|
+
"@json-render/core",
|
|
7
|
+
"@json-render/react",
|
|
8
|
+
"@radix-ui/react-label",
|
|
9
|
+
"zod",
|
|
10
|
+
"@types/uuid"
|
|
11
|
+
],
|
|
12
|
+
"ignoreBinaries": ["d3k"],
|
|
13
|
+
"ignoreExportsUsedInFile": true,
|
|
14
|
+
"paths": {
|
|
15
|
+
"src/components/ui/*": ["src/components/ui/*"],
|
|
16
|
+
"src/components/os-primitives/*": ["src/components/os-primitives/*"]
|
|
17
|
+
},
|
|
18
|
+
"ignore": [
|
|
19
|
+
"src/components/ui/command.tsx",
|
|
20
|
+
"src/components/ui/ContextMenu.tsx",
|
|
21
|
+
"src/components/ui/dropdown-menu.tsx",
|
|
22
|
+
"src/components/os-primitives/collapsible-sidebar.tsx",
|
|
23
|
+
"src/components/os-primitives/list-view.tsx",
|
|
24
|
+
"src/components/os-primitives/status-badge.tsx",
|
|
25
|
+
"src/components/os-primitives/toolbar.tsx"
|
|
26
|
+
],
|
|
27
|
+
"rules": {
|
|
28
|
+
"unlisted": "off",
|
|
29
|
+
"files": "warn",
|
|
30
|
+
"exports": "warn",
|
|
31
|
+
"types": "warn",
|
|
32
|
+
"dependencies": "warn",
|
|
33
|
+
"devDependencies": "warn"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/nats.conf
ADDED
package/next.config.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { withSentryConfig } from '@sentry/nextjs';
|
|
2
|
+
import type { NextConfig } from 'next';
|
|
3
|
+
|
|
4
|
+
const nextConfig: NextConfig = {
|
|
5
|
+
allowedDevOrigins: ['dev.khal.namastex.io'],
|
|
6
|
+
typescript: {
|
|
7
|
+
ignoreBuildErrors: true,
|
|
8
|
+
},
|
|
9
|
+
images: {
|
|
10
|
+
dangerouslyAllowSVG: true,
|
|
11
|
+
},
|
|
12
|
+
// node-pty is server-only (used by pty-server.mjs, not by Next.js)
|
|
13
|
+
// but it's in dependencies, so tell webpack to skip it for client bundles
|
|
14
|
+
serverExternalPackages: ['node-pty', 'archiver'],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default withSentryConfig(nextConfig, {
|
|
18
|
+
// Suppresses source map uploading logs during build
|
|
19
|
+
silent: true,
|
|
20
|
+
// Upload source maps only when SENTRY_AUTH_TOKEN is set
|
|
21
|
+
org: process.env.SENTRY_ORG,
|
|
22
|
+
project: process.env.SENTRY_PROJECT,
|
|
23
|
+
// Disable telemetry
|
|
24
|
+
telemetry: false,
|
|
25
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "khal-os",
|
|
3
|
+
"version": "1.260324.2",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"dev": "next dev --port 8888",
|
|
6
|
+
"build": "NEXT_PRIVATE_BUILD_WORKER=false next build",
|
|
7
|
+
"start": "next start --port 8888",
|
|
8
|
+
"pty-server": "node pty-server.mjs",
|
|
9
|
+
"lint": "biome check .",
|
|
10
|
+
"lint:fix": "biome check --write .",
|
|
11
|
+
"knip": "knip",
|
|
12
|
+
"dev:d3k": "d3k",
|
|
13
|
+
"services": "bun run src/lib/service-loader.ts",
|
|
14
|
+
"tauri": "cd tauri && cargo run",
|
|
15
|
+
"tauri:build": "cd tauri && cargo build --release",
|
|
16
|
+
"prepare": "husky"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@genie-os/dev3000-app": "workspace:*",
|
|
20
|
+
"@genie-os/files-app": "workspace:*",
|
|
21
|
+
"@genie-os/genie-app": "workspace:*",
|
|
22
|
+
"@genie-os/nats-viewer-app": "workspace:*",
|
|
23
|
+
"@genie-os/sdk": "workspace:*",
|
|
24
|
+
"@genie-os/settings-app": "workspace:*",
|
|
25
|
+
"@genie-os/terminal-app": "workspace:*",
|
|
26
|
+
"@genie-os/ui": "workspace:*",
|
|
27
|
+
"@json-render/core": "^0.7.0",
|
|
28
|
+
"@json-render/react": "^0.7.0",
|
|
29
|
+
"@nats-io/jetstream": "^3.3.1",
|
|
30
|
+
"@nats-io/transport-node": "^3.3.1",
|
|
31
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
32
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
33
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
34
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
35
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
36
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
37
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
38
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
39
|
+
"@sentry/nextjs": "^10.39.0",
|
|
40
|
+
"@sinclair/typebox": "^0.34.48",
|
|
41
|
+
"@tauri-apps/api": "^2.10.1",
|
|
42
|
+
"@types/archiver": "^7.0.0",
|
|
43
|
+
"@workos-inc/authkit-nextjs": "^2.14.0",
|
|
44
|
+
"@xterm/addon-fit": "^0.11.0",
|
|
45
|
+
"@xterm/addon-webgl": "^0.19.0",
|
|
46
|
+
"@xterm/xterm": "^6.0.0",
|
|
47
|
+
"archiver": "^7.0.1",
|
|
48
|
+
"class-variance-authority": "^0.7.1",
|
|
49
|
+
"clsx": "^2.1.1",
|
|
50
|
+
"cmdk": "^1.1.1",
|
|
51
|
+
"iron-session": "^8.0.4",
|
|
52
|
+
"jose": "^6.1.3",
|
|
53
|
+
"lucide-react": "^0.563.0",
|
|
54
|
+
"next": "16.1.6",
|
|
55
|
+
"next-themes": "^0.4.6",
|
|
56
|
+
"node-pty": "^1.1.0",
|
|
57
|
+
"react": "19.2.3",
|
|
58
|
+
"react-dom": "19.2.3",
|
|
59
|
+
"tailwind-merge": "^3.4.0",
|
|
60
|
+
"uuid": "^13.0.0",
|
|
61
|
+
"zod": "^4.3.6",
|
|
62
|
+
"zustand": "^5.0.11"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@biomejs/biome": "^2.4.2",
|
|
66
|
+
"@tailwindcss/postcss": "^4",
|
|
67
|
+
"@types/node": "^20",
|
|
68
|
+
"@types/react": "^19",
|
|
69
|
+
"@types/react-dom": "^19",
|
|
70
|
+
"@types/uuid": "^11.0.0",
|
|
71
|
+
"husky": "^9.1.7",
|
|
72
|
+
"knip": "^5.85.0",
|
|
73
|
+
"tailwindcss": "^4",
|
|
74
|
+
"tsx": "^4.21.0",
|
|
75
|
+
"typescript": "^5"
|
|
76
|
+
},
|
|
77
|
+
"packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264"
|
|
78
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { type ComponentType, lazy } from 'react';
|
|
4
|
+
|
|
5
|
+
interface AppComponentProps {
|
|
6
|
+
windowId: string;
|
|
7
|
+
meta?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const components: Record<string, ComponentType<AppComponentProps>> = {
|
|
11
|
+
dev3000: lazy(() => import('./views/dev3000/Dev3000App').then((m) => ({ default: m.Dev3000App }))),
|
|
12
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: 'dev3000-app',
|
|
3
|
+
views: [
|
|
4
|
+
{
|
|
5
|
+
id: 'dev3000',
|
|
6
|
+
label: 'dev3000',
|
|
7
|
+
permission: 'dev3000',
|
|
8
|
+
minRole: 'platform-dev' as const,
|
|
9
|
+
natsPrefix: 'dev3000',
|
|
10
|
+
defaultSize: { width: 960, height: 640 },
|
|
11
|
+
component: './views/dev3000/Dev3000App',
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
desktop: {
|
|
15
|
+
icon: '/icons/dusk/dashboard.svg',
|
|
16
|
+
categories: ['Development'],
|
|
17
|
+
comment: 'dev3000 unified development logs',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@genie-os/dev3000-app",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./manifest.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./manifest.ts",
|
|
8
|
+
"./components": "./components.ts",
|
|
9
|
+
"./views/*": "./views/*"
|
|
10
|
+
},
|
|
11
|
+
"genieOs": {
|
|
12
|
+
"services": [
|
|
13
|
+
{
|
|
14
|
+
"name": "dev3000",
|
|
15
|
+
"entry": "./views/dev3000/service/index.ts",
|
|
16
|
+
"runtime": "node"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"react": ">=19"
|
|
22
|
+
}
|
|
23
|
+
}
|