├── src
├── CLAUDE.md
├── .nvmrc
├── compute
│ ├── comm
│ ├── sync
│ ├── util
│ ├── backend
│ ├── conat
│ ├── jupyter
│ ├── project
│ ├── sync-fs
│ ├── terminal
│ ├── api-client
│ ├── sync-client
│ ├── tsconfig.json
│ ├── compute
│ │ ├── dev
│ │ │ ├── conf.tar
│ │ │ ├── 3-compute.sh
│ │ │ ├── 2-syncfs.sh
│ │ │ └── 1-websocketfs.sh
│ │ └── lib
│ │ │ └── index.ts
│ ├── pnpm-workspace.yaml
│ ├── README.md
│ └── .npmrc
├── packages
│ ├── backend
│ │ ├── .npmignore
│ │ ├── files
│ │ │ └── util.ts
│ │ ├── conat
│ │ │ ├── test
│ │ │ │ └── persist
│ │ │ │ │ └── README.md
│ │ │ └── index.ts
│ │ ├── test
│ │ │ └── setup.js
│ │ ├── port.test.ts
│ │ ├── index.js
│ │ ├── jest.config.js
│ │ ├── bin
│ │ │ ├── conat-watch.cjs
│ │ │ └── conat-persist.cjs
│ │ ├── misc
│ │ │ └── async-utils-node.ts
│ │ └── tsconfig.json
│ ├── frontend
│ │ ├── postcss.config.js
│ │ ├── .npmignore
│ │ ├── lib
│ │ │ └── README.md
│ │ ├── course
│ │ │ ├── common
│ │ │ │ └── types.ts
│ │ │ ├── compute
│ │ │ │ ├── README.md
│ │ │ │ └── util.ts
│ │ │ └── index.ts
│ │ ├── editors
│ │ │ ├── markdown-input
│ │ │ │ └── index.ts
│ │ │ ├── task-editor
│ │ │ │ ├── constants.ts
│ │ │ │ ├── NOTE.md
│ │ │ │ └── store.ts
│ │ │ ├── slate
│ │ │ │ ├── slate-react
│ │ │ │ │ ├── @types
│ │ │ │ │ │ └── direction.d.ts
│ │ │ │ │ ├── hooks
│ │ │ │ │ │ └── use-isomorphic-layout-effect.ts
│ │ │ │ │ ├── custom-types.ts
│ │ │ │ │ └── utils
│ │ │ │ │ │ └── key.ts
│ │ │ │ ├── elements
│ │ │ │ │ ├── init-ssr.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── code-block
│ │ │ │ │ │ └── get-mermaid.ts
│ │ │ │ │ └── meta
│ │ │ │ │ │ └── type.ts
│ │ │ │ ├── search
│ │ │ │ │ └── index.ts
│ │ │ │ ├── slate-diff
│ │ │ │ │ └── index.ts
│ │ │ │ ├── format
│ │ │ │ │ └── index.ts
│ │ │ │ ├── edit-bar
│ │ │ │ │ └── index.ts
│ │ │ │ ├── slate-emojis
│ │ │ │ │ └── index.ts
│ │ │ │ └── markdown-to-slate
│ │ │ │ │ ├── source.ts
│ │ │ │ │ └── util.ts
│ │ │ └── unknown
│ │ │ │ └── register.ts
│ │ ├── frame-editors
│ │ │ ├── crm-editor
│ │ │ │ ├── frame
│ │ │ │ │ └── README.md
│ │ │ │ ├── fields
│ │ │ │ │ └── README.md
│ │ │ │ ├── types.ts
│ │ │ │ ├── ant-hacks.css
│ │ │ │ ├── views
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── views.css
│ │ │ │ │ ├── retention
│ │ │ │ │ │ └── util.ts
│ │ │ │ │ └── json.tsx
│ │ │ │ └── tables
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── patches.ts
│ │ │ │ │ ├── central-log.ts
│ │ │ │ │ └── file-use.ts
│ │ │ ├── llm
│ │ │ │ ├── types.ts
│ │ │ │ └── consts.ts
│ │ │ ├── generic
│ │ │ │ ├── README.md
│ │ │ │ └── jquery-plugins.ts
│ │ │ ├── frame-tree
│ │ │ │ ├── style.ts
│ │ │ │ └── config.ts
│ │ │ ├── terminal-editor
│ │ │ │ ├── terminal.png
│ │ │ │ └── split-terminals.png
│ │ │ ├── slides-editor
│ │ │ │ ├── slides.tsx
│ │ │ │ └── slideshow.tsx
│ │ │ ├── jupyter-editor
│ │ │ │ └── snippets
│ │ │ │ │ └── index.ts
│ │ │ ├── settings
│ │ │ │ └── types.ts
│ │ │ ├── x11-editor
│ │ │ │ └── theme.ts
│ │ │ ├── markdown-editor
│ │ │ │ └── slate.tsx
│ │ │ └── whiteboard-editor
│ │ │ │ └── elements
│ │ │ │ └── generic.tsx
│ │ ├── i18n
│ │ │ ├── formatter.js
│ │ │ ├── components.tsx
│ │ │ └── types.ts
│ │ ├── project
│ │ │ ├── settings
│ │ │ │ ├── run-quota
│ │ │ │ │ └── index.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── software-consts.ts
│ │ │ ├── servers
│ │ │ │ └── index.ts
│ │ │ ├── explorer
│ │ │ │ ├── tour
│ │ │ │ │ └── actions.png
│ │ │ │ ├── index.ts
│ │ │ │ └── file-listing
│ │ │ │ │ └── index.ts
│ │ │ ├── history
│ │ │ │ └── index.ts
│ │ │ ├── info
│ │ │ │ └── index.ts
│ │ │ ├── new
│ │ │ │ └── index.ts
│ │ │ ├── page
│ │ │ │ ├── utils.ts
│ │ │ │ └── flyouts
│ │ │ │ │ ├── search.tsx
│ │ │ │ │ └── info.tsx
│ │ │ ├── search
│ │ │ │ └── search.tsx
│ │ │ └── warnings
│ │ │ │ └── common.ts
│ │ ├── components
│ │ │ ├── data-grid
│ │ │ │ ├── index.tsx
│ │ │ │ ├── README.md
│ │ │ │ └── grid.css
│ │ │ ├── iconfont.cn
│ │ │ │ └── index.js
│ │ │ ├── gap.tsx
│ │ │ ├── math
│ │ │ │ └── util.ts
│ │ │ ├── run-button
│ │ │ │ └── api.ts
│ │ │ ├── README.md
│ │ │ ├── llm-plain-link.tsx
│ │ │ └── saving.tsx
│ │ ├── test
│ │ │ └── setup.js
│ │ ├── purchases
│ │ │ ├── zindex.ts
│ │ │ ├── payments-page.tsx
│ │ │ ├── purchases-page.tsx
│ │ │ ├── payg-page.tsx
│ │ │ ├── statement.tsx
│ │ │ ├── global-spend-limit.tsx
│ │ │ ├── payment-methods-page.tsx
│ │ │ └── subscriptions-util.tsx
│ │ ├── declarations.d.ts
│ │ ├── projects
│ │ │ ├── tour-collabs.png
│ │ │ ├── tour-projects.png
│ │ │ └── index.ts
│ │ ├── jupyter
│ │ │ ├── llm
│ │ │ │ └── index.ts
│ │ │ ├── README.md
│ │ │ ├── insert-cell
│ │ │ │ └── types.ts
│ │ │ ├── output-messages
│ │ │ │ └── mime-types
│ │ │ │ │ ├── fallback.tsx
│ │ │ │ │ ├── simple-markdown.tsx
│ │ │ │ │ ├── simple-html.tsx
│ │ │ │ │ ├── markdown.tsx
│ │ │ │ │ └── javascript.tsx
│ │ │ └── history-actions.ts
│ │ ├── codemirror
│ │ │ ├── mode
│ │ │ │ └── mediawiki
│ │ │ │ │ └── img
│ │ │ │ │ ├── black4.png
│ │ │ │ │ ├── ext2.png
│ │ │ │ │ ├── ext4.png
│ │ │ │ │ ├── link4.png
│ │ │ │ │ ├── template4.png
│ │ │ │ │ └── template8.png
│ │ │ ├── keymaps.js
│ │ │ ├── static.js
│ │ │ ├── init.js
│ │ │ └── addon
│ │ │ │ └── types.ts
│ │ ├── crash-banner.ts
│ │ ├── .vscode
│ │ │ ├── spellright.dict
│ │ │ └── settings.json
│ │ ├── library
│ │ │ └── index.js
│ │ ├── compute
│ │ │ ├── cloud-filesystem
│ │ │ │ └── log.tsx
│ │ │ ├── index.ts
│ │ │ ├── address.tsx
│ │ │ ├── cloud
│ │ │ │ └── google-cloud
│ │ │ │ │ └── accelerator.tsx
│ │ │ └── util.ts
│ │ ├── account
│ │ │ ├── gravatar-url.ts
│ │ │ ├── dates.ts
│ │ │ └── _account.sass
│ │ ├── admin
│ │ │ ├── index.ts
│ │ │ ├── users
│ │ │ │ ├── project-search.tsx
│ │ │ │ └── project.tsx
│ │ │ ├── site-settings
│ │ │ │ └── types.ts
│ │ │ └── llm
│ │ │ │ └── value.tsx
│ │ ├── support
│ │ │ └── index.ts
│ │ ├── misc
│ │ │ ├── README.md
│ │ │ ├── commands.ts
│ │ │ └── window-globals.ts
│ │ ├── users
│ │ │ ├── types.ts
│ │ │ └── index.ts
│ │ ├── webapp-client.ts
│ │ ├── app
│ │ │ ├── README.md
│ │ │ ├── util.ts
│ │ │ └── init.ts
│ │ ├── collaborators
│ │ │ └── index.tsx
│ │ ├── landing-page
│ │ │ └── hub-landing.ts
│ │ ├── notifications
│ │ │ ├── init.ts
│ │ │ ├── mentions
│ │ │ │ ├── util.ts
│ │ │ │ └── index.ts
│ │ │ └── index.ts
│ │ └── app-framework
│ │ │ ├── toggle-hook.ts
│ │ │ ├── syncdb
│ │ │ └── syncdb-context.ts
│ │ │ └── counter-hook.ts
│ ├── hub
│ │ ├── .npmignore
│ │ ├── auth.ts
│ │ ├── email.ts
│ │ ├── fonts
│ │ │ └── Cardo-Regular.ttf
│ │ ├── run
│ │ │ └── hub.js
│ │ └── copy-path.test.ts
│ ├── project
│ │ ├── .npmignore
│ │ ├── bin
│ │ │ └── cocalc-project.js
│ │ ├── declarations.d.ts
│ │ ├── conat
│ │ │ ├── terminal
│ │ │ │ └── index.ts
│ │ │ ├── api
│ │ │ │ └── sync.ts
│ │ │ └── pubsub.ts
│ │ ├── index.js
│ │ ├── test
│ │ │ └── setup.js
│ │ ├── servers
│ │ │ └── hub
│ │ │ │ └── types.ts
│ │ ├── main.test.ts
│ │ ├── jest.config.js
│ │ ├── project-info
│ │ │ ├── index.ts
│ │ │ └── utils.ts
│ │ ├── browser-websocket
│ │ │ ├── eval-code.ts
│ │ │ └── query.ts
│ │ ├── jupyter
│ │ │ └── init.ts
│ │ └── data.test.ts
│ ├── static
│ │ ├── .npmignore
│ │ ├── test
│ │ │ └── setup.js
│ │ ├── src
│ │ │ ├── declarations.d.ts
│ │ │ ├── index.ts
│ │ │ ├── nothing.test.tsx
│ │ │ ├── app.html
│ │ │ ├── webapp-embed.ts
│ │ │ ├── init-app-base-path.ts
│ │ │ ├── webapp-cocalc.ts
│ │ │ ├── rspack-compiler.ts
│ │ │ ├── tsconfig.json
│ │ │ └── webapp-css.ts
│ │ ├── .swcrc
│ │ └── rspack.config.js
│ ├── util
│ │ ├── .npmignore
│ │ ├── consts
│ │ │ ├── files.ts
│ │ │ ├── server_settings.ts
│ │ │ ├── tracking.ts
│ │ │ ├── llm.ts
│ │ │ ├── invites.ts
│ │ │ ├── dedicated.ts
│ │ │ ├── locale.ts
│ │ │ └── bookmarks.ts
│ │ ├── test
│ │ │ └── README.md
│ │ ├── mathjax-utils.d.ts
│ │ ├── smc-version.js
│ │ ├── conat.ts
│ │ ├── heartbeat.js
│ │ ├── jest.config.js
│ │ ├── project-info.ts
│ │ ├── tsconfig.json
│ │ ├── fill
│ │ │ └── index.ts
│ │ ├── stripe
│ │ │ └── name.ts
│ │ ├── terminal
│ │ │ └── names.ts
│ │ ├── compute
│ │ │ └── images.ts
│ │ ├── types
│ │ │ ├── store.ts
│ │ │ ├── callback.ts
│ │ │ ├── index.ts
│ │ │ ├── directory-listing.ts
│ │ │ ├── stripe.ts
│ │ │ └── servers.ts
│ │ ├── README.md
│ │ └── routing
│ │ │ └── app.ts
│ ├── server
│ │ ├── purchases
│ │ │ ├── index.ts
│ │ │ ├── legacy
│ │ │ │ └── README.md
│ │ │ └── stripe
│ │ │ │ └── delete-payment-method.ts
│ │ ├── conat
│ │ │ ├── socketio
│ │ │ │ └── index.ts
│ │ │ ├── api
│ │ │ │ ├── jupyter.ts
│ │ │ │ └── purchases.ts
│ │ │ └── llm.ts
│ │ ├── projects
│ │ │ ├── connection
│ │ │ │ └── index.ts
│ │ │ └── get-title.ts
│ │ ├── email
│ │ │ ├── README.md
│ │ │ └── message.ts
│ │ ├── compute
│ │ │ ├── README.md
│ │ │ └── maintenance
│ │ │ │ └── index.ts
│ │ ├── hub
│ │ │ └── README.md
│ │ ├── support
│ │ │ └── util.ts
│ │ ├── auth
│ │ │ ├── sso
│ │ │ │ └── README.md
│ │ │ ├── tokens
│ │ │ │ └── get-requires-token.ts
│ │ │ └── is-account-available.ts
│ │ ├── mentions
│ │ │ └── types.ts
│ │ ├── jest.config.js
│ │ ├── accounts
│ │ │ └── profile
│ │ │ │ └── types.ts
│ │ ├── test
│ │ │ └── setup.js
│ │ └── tsconfig.json
│ ├── assets
│ │ ├── index.js
│ │ ├── dropzone
│ │ │ ├── README-salvus.txt
│ │ │ └── images
│ │ │ │ ├── spritemap.png
│ │ │ │ └── spritemap@2x.png
│ │ ├── art
│ │ │ ├── logo.jpg
│ │ │ ├── cloud.png
│ │ │ ├── salvus.png
│ │ │ └── templates.png
│ │ ├── favicon.ico
│ │ ├── kiran.jpeg
│ │ ├── jquery
│ │ │ ├── plugins
│ │ │ │ ├── README.salvus
│ │ │ │ └── bootstrap-colorpicker
│ │ │ │ │ └── img
│ │ │ │ │ ├── glyphicons-halflings.png
│ │ │ │ │ ├── bootstrap-colorpicker
│ │ │ │ │ ├── alpha.png
│ │ │ │ │ ├── hue.png
│ │ │ │ │ └── saturation.png
│ │ │ │ │ └── glyphicons-halflings-white.png
│ │ │ └── jquery-ui
│ │ │ │ └── css
│ │ │ │ └── humanity
│ │ │ │ └── images
│ │ │ │ ├── animated-overlay.gif
│ │ │ │ ├── ui-icons_c47a23_256x240.png
│ │ │ │ ├── ui-icons_cb672b_256x240.png
│ │ │ │ ├── ui-icons_f08000_256x240.png
│ │ │ │ ├── ui-icons_f35f07_256x240.png
│ │ │ │ ├── ui-icons_ff7519_256x240.png
│ │ │ │ ├── ui-icons_ffffff_256x240.png
│ │ │ │ ├── ui-bg_flat_75_aaaaaa_40x100.png
│ │ │ │ ├── ui-bg_glass_100_f5f0e5_1x400.png
│ │ │ │ ├── ui-bg_glass_25_cb842e_1x400.png
│ │ │ │ ├── ui-bg_glass_70_ede4d4_1x400.png
│ │ │ │ ├── ui-bg_inset-soft_100_f4f0ec_1x100.png
│ │ │ │ ├── ui-bg_highlight-hard_65_fee4bd_1x100.png
│ │ │ │ ├── ui-bg_highlight-hard_75_f5f5b5_1x100.png
│ │ │ │ └── ui-bg_highlight-hard_100_f4f0ec_1x100.png
│ │ ├── assets
│ │ │ ├── x11-01.png
│ │ │ ├── cocalc-backup-1.png
│ │ │ ├── cocalc-pythontex.png
│ │ │ ├── cocalc-sagetex.png
│ │ │ ├── latex-editor-rnw-01.png
│ │ │ ├── cocalc-jupyter-kernels.png
│ │ │ ├── latex-custom-command-02.png
│ │ │ ├── smc-side-chat-20170508.png
│ │ │ ├── cocalc-jupyter2-20170508.png
│ │ │ ├── cocalc-jupyter2-memory-cpu.png
│ │ │ ├── cocalc-latex-side-chat-v2.png
│ │ │ ├── cocalc-real-time-jupyter.png
│ │ │ ├── latex-editor-timetravel-01.png
│ │ │ ├── cocalc-share-latex-document.png
│ │ │ ├── cocalc-chat-jupyter-20171120-2.png
│ │ │ ├── cocalc-jupyter-share-20171218.png
│ │ │ └── cocalc-latex-concurrent-editing.png
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── will_conley.jpg
│ │ ├── sagepreview
│ │ │ ├── 03-latex.png
│ │ │ ├── 04-files.png
│ │ │ ├── 02-courses.png
│ │ │ ├── 01-worksheet.png
│ │ │ └── 05-sky_is_the_limit.png
│ │ ├── fonts
│ │ │ └── droid
│ │ │ │ └── DroidSansMono.ttf
│ │ ├── cocalc-icons-font
│ │ │ ├── cocalc-icons.eot
│ │ │ ├── cocalc-icons.ttf
│ │ │ └── cocalc-icons.woff
│ │ ├── term
│ │ │ └── README.txt
│ │ ├── misc
│ │ │ └── talk-20121004
│ │ │ │ └── ui
│ │ │ │ └── default
│ │ │ │ ├── blank.gif
│ │ │ │ ├── bodybg.gif
│ │ │ │ ├── opera.css
│ │ │ │ └── slides.css
│ │ ├── index.test.js
│ │ └── threejs
│ │ │ └── README.salvus
│ ├── jupyter
│ │ ├── types
│ │ │ └── index.ts
│ │ ├── kernel
│ │ │ ├── index.ts
│ │ │ └── version.ts
│ │ ├── ipynb
│ │ │ └── README.md
│ │ ├── examples
│ │ │ └── README.md
│ │ ├── jest.config.js
│ │ ├── util
│ │ │ └── misc.test.ts
│ │ ├── redux
│ │ │ └── sync.ts
│ │ └── tsconfig.json
│ ├── conat
│ │ ├── compute
│ │ │ └── README.md
│ │ ├── hub
│ │ │ ├── changefeeds
│ │ │ │ └── index.ts
│ │ │ └── api
│ │ │ │ └── purchases.ts
│ │ ├── jest.config.js
│ │ ├── socket
│ │ │ └── index.ts
│ │ ├── service
│ │ │ └── index.ts
│ │ ├── project
│ │ │ └── api
│ │ │ │ └── sync.ts
│ │ └── tsconfig.json
│ ├── sync
│ │ ├── editor
│ │ │ ├── string
│ │ │ │ ├── index.ts
│ │ │ │ └── test
│ │ │ │ │ └── sync.offline.test.ts
│ │ │ ├── db
│ │ │ │ └── index.ts
│ │ │ ├── README.md
│ │ │ └── generic
│ │ │ │ └── index.js
│ │ ├── test
│ │ │ └── setup.js
│ │ └── tsconfig.json
│ ├── database
│ │ ├── postgres
│ │ │ ├── schema
│ │ │ │ ├── index.ts
│ │ │ │ ├── types.ts
│ │ │ │ └── util.ts
│ │ │ ├── stripe
│ │ │ │ └── index.ts
│ │ │ ├── site-license
│ │ │ │ └── const.ts
│ │ │ └── server-settings.ts
│ │ ├── settings
│ │ │ └── index.ts
│ │ ├── test
│ │ │ └── setup.js
│ │ ├── jest.config.js
│ │ ├── tsconfig.json
│ │ └── pool
│ │ │ └── index.ts
│ ├── file-server
│ │ ├── btrfs
│ │ │ └── index.ts
│ │ ├── test
│ │ │ └── setup.js
│ │ ├── jest.config.js
│ │ └── tsconfig.json
│ ├── next
│ │ ├── components
│ │ │ ├── share
│ │ │ │ ├── edit
│ │ │ │ │ └── README.md
│ │ │ │ ├── header.tsx
│ │ │ │ ├── external-link.tsx
│ │ │ │ ├── site-name.tsx
│ │ │ │ └── license.tsx
│ │ │ ├── landing
│ │ │ │ ├── constants.ts
│ │ │ │ ├── navbar.tsx
│ │ │ │ ├── pricing.module.css
│ │ │ │ ├── latex.tsx
│ │ │ │ └── code.tsx
│ │ │ ├── statistics
│ │ │ │ └── misc.ts
│ │ │ ├── misc
│ │ │ │ ├── copyable.tsx
│ │ │ │ ├── anonymous.tsx
│ │ │ │ └── help-email.tsx
│ │ │ ├── auth
│ │ │ │ └── sso.module.css
│ │ │ ├── billing
│ │ │ │ └── consts.ts
│ │ │ ├── store
│ │ │ │ └── types.ts
│ │ │ ├── news
│ │ │ │ └── types.ts
│ │ │ ├── misc.ts
│ │ │ └── sso
│ │ │ │ └── index.tsx
│ │ ├── .eslintrc
│ │ ├── lib
│ │ │ ├── api
│ │ │ │ ├── index.ts
│ │ │ │ ├── latex.ts
│ │ │ │ ├── is-post.ts
│ │ │ │ └── status.ts
│ │ │ ├── types
│ │ │ │ └── sign-up.ts
│ │ │ ├── use-customize.ts
│ │ │ ├── account
│ │ │ │ └── get-account.ts
│ │ │ ├── base-path.ts
│ │ │ ├── share
│ │ │ │ ├── share-url.ts
│ │ │ │ └── project-avatar-image.ts
│ │ │ └── config.ts
│ │ ├── test
│ │ │ └── setup.js
│ │ ├── pages
│ │ │ ├── api
│ │ │ │ └── v2
│ │ │ │ │ ├── openai
│ │ │ │ │ └── chatgpt.ts
│ │ │ │ │ ├── auth
│ │ │ │ │ └── requires-token.ts
│ │ │ │ │ └── purchases
│ │ │ │ │ ├── get-prices-project-quotas.ts
│ │ │ │ │ └── get-max-project-quotas.ts
│ │ │ ├── lang
│ │ │ │ └── [locale]
│ │ │ │ │ └── _README.md
│ │ │ └── features
│ │ │ │ └── openai-chatgpt.tsx
│ │ ├── public
│ │ │ ├── jsonfeed.png
│ │ │ ├── info
│ │ │ │ ├── blog.png
│ │ │ │ ├── share.png
│ │ │ │ ├── discord.png
│ │ │ │ ├── facebook.png
│ │ │ │ ├── github.png
│ │ │ │ ├── linkedin.png
│ │ │ │ ├── twitter.png
│ │ │ │ ├── stackoverflow.png
│ │ │ │ ├── github-discussions.png
│ │ │ │ └── cocalc-mailing-list.png
│ │ │ ├── features
│ │ │ │ ├── kiran.jpeg
│ │ │ │ ├── x11-01.png
│ │ │ │ ├── chatroom.png
│ │ │ │ ├── terminal.png
│ │ │ │ ├── julia-code.png
│ │ │ │ ├── jupyter-lab.png
│ │ │ │ ├── pluto-plot.png
│ │ │ │ ├── slides-sage.png
│ │ │ │ ├── will_conley.jpg
│ │ │ │ ├── x11-firefox.png
│ │ │ │ ├── api-screenshot.png
│ │ │ │ ├── cocalc-r-latex.png
│ │ │ │ ├── cocalc-rcode.png
│ │ │ │ ├── cocalc-sagetex.png
│ │ │ │ ├── julia-jupyter.png
│ │ │ │ ├── julia-nbgrader.png
│ │ │ │ ├── sage-nbgrader.png
│ │ │ │ ├── sage-worksheet.png
│ │ │ │ ├── swirl-course.png
│ │ │ │ ├── chatgpt-fix-code.png
│ │ │ │ ├── cocalc-backup-1.png
│ │ │ │ ├── cocalc-pythontex.png
│ │ │ │ ├── cocalc-r-jupyter.png
│ │ │ │ ├── cocalc-snapshots.png
│ │ │ │ ├── cocalc-teaching.png
│ │ │ │ ├── latex-ai-formula.png
│ │ │ │ ├── sage-circular-v2.png
│ │ │ │ ├── sagemath-jupyter.png
│ │ │ │ ├── whiteboard-sage.png
│ │ │ │ ├── x11-applications.png
│ │ │ │ ├── ai-latex-generate.png
│ │ │ │ ├── ai-llm-cprogram-run.png
│ │ │ │ ├── cocalc-jupyter-bash.png
│ │ │ │ ├── cocalc-r-side-chat.png
│ │ │ │ ├── frame-editor-python.png
│ │ │ │ ├── latex-editor-rnw-01.png
│ │ │ │ ├── octave-x11-terminal.png
│ │ │ │ ├── terminal-software.png
│ │ │ │ ├── whiteboard-post-it.png
│ │ │ │ ├── ai-latex-help-me-fix.png
│ │ │ │ ├── ai-llm-cprogram-chat.png
│ │ │ │ ├── ai-llm-cprogram-query.png
│ │ │ │ ├── chatgpt-generate-code.png
│ │ │ │ ├── cocalc-python-jupyter.png
│ │ │ │ ├── cocalc-r-environment.png
│ │ │ │ ├── compute-server-select.png
│ │ │ │ ├── create-compute-server.png
│ │ │ │ ├── swirl_new_large_final.png
│ │ │ │ ├── ai-latex-maxwell-answer.png
│ │ │ │ ├── cocalc-jupyter-kernels.png
│ │ │ │ ├── cocalc-jupyter2-20170508.png
│ │ │ │ ├── cocalc-latex-pythontex.png
│ │ │ │ ├── cocalc-real-time-jupyter.png
│ │ │ │ ├── cocalc-sagemath-sagetex.png
│ │ │ │ ├── cocalc-shell-script-run.png
│ │ │ │ ├── cocalc-terminal-collab.gif
│ │ │ │ ├── latex-custom-command-02.png
│ │ │ │ ├── running-compute-server.png
│ │ │ │ ├── smc-side-chat-20170508.png
│ │ │ │ ├── chatgpt-generate-code-run.png
│ │ │ │ ├── cocalc-frame-editor-python.png
│ │ │ │ ├── cocalc-jupyter-share-nasa.png
│ │ │ │ ├── cocalc-jupyter2-memory-cpu.png
│ │ │ │ ├── cocalc-octave-x11-20200511.png
│ │ │ │ ├── latex-editor-main-20251003.png
│ │ │ │ ├── latex-editor-timetravel-01.png
│ │ │ │ ├── cocalc-jupyter-format-python.gif
│ │ │ │ ├── cocalc-jupyter-r-format-cell.mp4
│ │ │ │ ├── cocalc-jupyter-r-format-cell.webm
│ │ │ │ ├── cocalc-r-jupyter-collaborate.png
│ │ │ │ ├── cocalc-share-latex-document.png
│ │ │ │ ├── sage-sticker-1x1_inch-small.png
│ │ │ │ ├── terminal-jupyter-postgresql.png
│ │ │ │ ├── cocalc-chat-jupyter-20171120-2.png
│ │ │ │ ├── cocalc-course-assignments-2019.png
│ │ │ │ ├── cocalc-jupyter-python-sidechat.png
│ │ │ │ ├── cocalc-octave-jupyter-20200511.png
│ │ │ │ ├── cocalc-octave-terminal-20200511.png
│ │ │ │ ├── cocalc-timetravel-r-jupyter-3x.mp4
│ │ │ │ ├── cocalc-timetravel-r-jupyter-3x.webm
│ │ │ │ ├── latex-editor-darkmode-20251003.png
│ │ │ │ ├── latex-editor-multifile-20251006.png
│ │ │ │ ├── latex-editor-pythontex-20251003.png
│ │ │ │ ├── latex-editor-side-chat-20251004.png
│ │ │ │ ├── latex-forward-inverse-20251006.mp4
│ │ │ │ ├── latex-forward-inverse-20251006.webm
│ │ │ │ ├── cocalc-jupyter-nbgrader-overview.png
│ │ │ │ ├── cocalc-rmd-demo-R-python3-plotting.png
│ │ │ │ ├── latex-editor-realtime-sync-20251003.png
│ │ │ │ ├── chatgpt-jupyter-linear-regression-cell.png
│ │ │ │ ├── cocalc-jupyter2-timetravel-20170515-3x.mp4
│ │ │ │ ├── cocalc-jupyter2-timetravel-20170515-3x.webm
│ │ │ │ └── chatgpt-jupyter-linear-regression-prompt.png
│ │ │ ├── shopping
│ │ │ │ └── bella.png
│ │ │ ├── soc2-aicpa-logo.png
│ │ │ ├── logo
│ │ │ │ └── og-share-logo.png
│ │ │ ├── about
│ │ │ │ ├── blaec-bejarano.png
│ │ │ │ ├── harald-schilly.jpg
│ │ │ │ ├── william-stein.png
│ │ │ │ ├── all-about-cocalc.png
│ │ │ │ └── andrey-novoseltsev.jpeg
│ │ │ ├── software
│ │ │ │ ├── executables.png
│ │ │ │ └── julia-jupyter.png
│ │ │ ├── cocalc-sagemath-2024-11-22-nq8.png
│ │ │ ├── cocalc-screenshot-20200128-nq8.png
│ │ │ └── documents
│ │ │ │ └── SageMathInc_VPAT2.5Rev_WCAG_February2025_December2025.pdf
│ │ ├── openapitools.json
│ │ ├── next-env.d.ts
│ │ └── locales
│ │ │ ├── common.sh
│ │ │ └── misc.ts
│ ├── npmignore
│ ├── api-client
│ │ ├── index.ts
│ │ ├── src
│ │ │ ├── ssh-keys.ts
│ │ │ └── urls.ts
│ │ └── tsconfig.json
│ ├── sync-fs
│ │ ├── jest.config.js
│ │ └── lib
│ │ │ └── types.ts
│ ├── cdn
│ │ └── CHANGELOG.md
│ ├── sync-client
│ │ ├── scratch
│ │ │ └── README.md
│ │ ├── lib
│ │ │ ├── cookies.ts
│ │ │ └── version-cookie.ts
│ │ └── tsconfig.json
│ ├── comm
│ │ ├── README.md
│ │ └── tsconfig.json
│ ├── pnpm-workspace.yaml
│ └── .npmrc
├── python
│ └── cocalc-api
│ │ ├── src
│ │ └── cocalc_api
│ │ │ ├── py.typed
│ │ │ ├── __init__.py
│ │ │ └── mcp
│ │ │ ├── __main__.py
│ │ │ └── __init__.py
│ │ ├── docs
│ │ └── api
│ │ │ ├── jupyter.md
│ │ │ ├── system.md
│ │ │ ├── database.md
│ │ │ ├── messages.md
│ │ │ └── projects.md
│ │ ├── tests
│ │ └── __init__.py
│ │ ├── pytest.ini
│ │ └── pyrightconfig.json
├── smc_pyutil
│ ├── smc_pyutil
│ │ ├── templates
│ │ │ ├── linux
│ │ │ │ ├── default.sagews
│ │ │ │ └── bash_profile
│ │ │ ├── first-steps
│ │ │ │ └── first-steps.term
│ │ │ └── darwin
│ │ │ │ ├── bash_profile
│ │ │ │ ├── default.rnw
│ │ │ │ ├── default.tex
│ │ │ │ └── default.sagews
│ │ ├── bin
│ │ │ ├── smc-sage-server
│ │ │ └── cocalc-python3-clean
│ │ └── lib
│ │ │ └── __init__.py
│ ├── README.md
│ └── MANIFEST.in
├── scripts
│ ├── c
│ ├── rebuild-all
│ ├── run-ci.sh
│ ├── skel
│ │ └── .bash_profile
│ ├── dump-accounts
│ ├── use
│ ├── database-remove-locks
│ ├── smc-fix-permissions.sh
│ ├── make-user-admin
│ ├── ignore-examples
│ ├── update_local_hub
│ ├── time_test
│ └── projects-top-size
├── dev
│ ├── smc
│ │ └── conf
│ │ │ └── cloud.sagemath.com
│ │ │ ├── .gitignore
│ │ │ ├── push_conf_cron
│ │ │ └── README.md
│ ├── README.md
│ ├── single
│ │ ├── start-postgres
│ │ ├── start-compute
│ │ ├── start-hub
│ │ └── restart-hub
│ ├── docker
│ │ └── README.md
│ ├── laptop
│ │ └── util.py
│ └── minimal
│ │ ├── util.py
│ │ └── README.md
├── smc_sagews
│ └── smc_sagews
│ │ └── tests
│ │ ├── sage_init_files
│ │ ├── runtime_err.sage
│ │ ├── syntax_err.sage
│ │ └── define_var.sage
│ │ ├── a.py
│ │ ├── runtests.sh
│ │ ├── a.html
│ │ └── a.sage
├── requirements.txt
└── .claude
│ └── commands
│ └── frontend.md
├── .gitmodules
├── docs
└── README.md
└── SECURITY.md
/src/CLAUDE.md:
--------------------------------------------------------------------------------
1 | AGENTS.md
--------------------------------------------------------------------------------
/src/.nvmrc:
--------------------------------------------------------------------------------
1 | lts/hydrogen
2 |
--------------------------------------------------------------------------------
/src/compute/comm:
--------------------------------------------------------------------------------
1 | ../packages/comm/
--------------------------------------------------------------------------------
/src/compute/sync:
--------------------------------------------------------------------------------
1 | ../packages/sync
--------------------------------------------------------------------------------
/src/compute/util:
--------------------------------------------------------------------------------
1 | ../packages/util
--------------------------------------------------------------------------------
/src/compute/backend:
--------------------------------------------------------------------------------
1 | ../packages/backend
--------------------------------------------------------------------------------
/src/compute/conat:
--------------------------------------------------------------------------------
1 | ../packages/conat
--------------------------------------------------------------------------------
/src/compute/jupyter:
--------------------------------------------------------------------------------
1 | ../packages/jupyter
--------------------------------------------------------------------------------
/src/compute/project:
--------------------------------------------------------------------------------
1 | ../packages/project
--------------------------------------------------------------------------------
/src/compute/sync-fs:
--------------------------------------------------------------------------------
1 | ../packages/sync-fs
--------------------------------------------------------------------------------
/src/compute/terminal:
--------------------------------------------------------------------------------
1 | ../packages/terminal
--------------------------------------------------------------------------------
/src/packages/backend/.npmignore:
--------------------------------------------------------------------------------
1 | ../npmignore
--------------------------------------------------------------------------------
/src/packages/frontend/postcss.config.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/packages/hub/.npmignore:
--------------------------------------------------------------------------------
1 | ../npmignore
--------------------------------------------------------------------------------
/src/packages/project/.npmignore:
--------------------------------------------------------------------------------
1 | ../npmignore
--------------------------------------------------------------------------------
/src/packages/static/.npmignore:
--------------------------------------------------------------------------------
1 | ../npmignore
--------------------------------------------------------------------------------
/src/packages/util/.npmignore:
--------------------------------------------------------------------------------
1 | ../npmignore
--------------------------------------------------------------------------------
/src/compute/api-client:
--------------------------------------------------------------------------------
1 | ../packages/api-client
--------------------------------------------------------------------------------
/src/compute/sync-client:
--------------------------------------------------------------------------------
1 | ../packages/sync-client
--------------------------------------------------------------------------------
/src/packages/frontend/.npmignore:
--------------------------------------------------------------------------------
1 | ../npmignore
--------------------------------------------------------------------------------
/src/packages/server/purchases/index.ts:
--------------------------------------------------------------------------------
1 | export {}
--------------------------------------------------------------------------------
/src/python/cocalc-api/src/cocalc_api/py.typed:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/compute/tsconfig.json:
--------------------------------------------------------------------------------
1 | ../packages/tsconfig.json
--------------------------------------------------------------------------------
/src/packages/assets/index.js:
--------------------------------------------------------------------------------
1 | exports.path = __dirname;
2 |
--------------------------------------------------------------------------------
/src/smc_pyutil/smc_pyutil/templates/linux/default.sagews:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/packages/jupyter/types/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./types";
--------------------------------------------------------------------------------
/src/packages/jupyter/kernel/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./kernel";
2 |
--------------------------------------------------------------------------------
/src/scripts/c:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | node -i -e "$(< c.js)"
3 |
--------------------------------------------------------------------------------
/src/smc_pyutil/smc_pyutil/templates/first-steps/first-steps.term:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/dev/smc/conf/cloud.sagemath.com/.gitignore:
--------------------------------------------------------------------------------
1 | haproxy.cfg
2 | bkb
3 |
--------------------------------------------------------------------------------
/src/packages/hub/auth.ts:
--------------------------------------------------------------------------------
1 | export * from "@cocalc/server/hub/auth";
2 |
--------------------------------------------------------------------------------
/src/packages/hub/email.ts:
--------------------------------------------------------------------------------
1 | export * from "@cocalc/server/hub/email";
2 |
--------------------------------------------------------------------------------
/src/packages/jupyter/kernel/version.ts:
--------------------------------------------------------------------------------
1 | export const VERSION = '5.4';
2 |
--------------------------------------------------------------------------------
/src/python/cocalc-api/docs/api/jupyter.md:
--------------------------------------------------------------------------------
1 | ::: cocalc_api.hub.Jupyter
2 |
--------------------------------------------------------------------------------
/src/python/cocalc-api/docs/api/system.md:
--------------------------------------------------------------------------------
1 | ::: cocalc_api.hub.System
2 |
--------------------------------------------------------------------------------
/src/python/cocalc-api/tests/__init__.py:
--------------------------------------------------------------------------------
1 | # Tests package for cocalc-api
--------------------------------------------------------------------------------
/src/smc_sagews/smc_sagews/tests/sage_init_files/runtime_err.sage:
--------------------------------------------------------------------------------
1 | 1/0
2 |
--------------------------------------------------------------------------------
/src/smc_sagews/smc_sagews/tests/sage_init_files/syntax_err.sage:
--------------------------------------------------------------------------------
1 | 3+
2 |
--------------------------------------------------------------------------------
/src/packages/conat/compute/README.md:
--------------------------------------------------------------------------------
1 | Code related to compute servers
2 |
3 |
--------------------------------------------------------------------------------
/src/python/cocalc-api/docs/api/database.md:
--------------------------------------------------------------------------------
1 | ::: cocalc_api.hub.Database
2 |
--------------------------------------------------------------------------------
/src/python/cocalc-api/docs/api/messages.md:
--------------------------------------------------------------------------------
1 | ::: cocalc_api.hub.Messages
2 |
--------------------------------------------------------------------------------
/src/python/cocalc-api/docs/api/projects.md:
--------------------------------------------------------------------------------
1 | ::: cocalc_api.hub.Projects
2 |
--------------------------------------------------------------------------------
/src/requirements.txt:
--------------------------------------------------------------------------------
1 | pyyaml==6.0.1
2 |
3 | ./smc_pyutil
4 | ./smc_sagews
5 |
--------------------------------------------------------------------------------
/src/smc_pyutil/smc_pyutil/templates/darwin/bash_profile:
--------------------------------------------------------------------------------
1 | ../linux/bash_profile
--------------------------------------------------------------------------------
/src/smc_pyutil/smc_pyutil/templates/darwin/default.rnw:
--------------------------------------------------------------------------------
1 | ../linux/default.rnw
--------------------------------------------------------------------------------
/src/smc_pyutil/smc_pyutil/templates/darwin/default.tex:
--------------------------------------------------------------------------------
1 | ../linux/default.tex
--------------------------------------------------------------------------------
/src/packages/sync/editor/string/index.ts:
--------------------------------------------------------------------------------
1 | export { SyncString } from "./sync";
2 |
--------------------------------------------------------------------------------
/src/packages/util/consts/files.ts:
--------------------------------------------------------------------------------
1 | export const HOME_ROOT = ".smc/root";
2 |
3 |
--------------------------------------------------------------------------------
/src/smc_pyutil/smc_pyutil/templates/darwin/default.sagews:
--------------------------------------------------------------------------------
1 | ../linux/default.sagews
--------------------------------------------------------------------------------
/src/smc_sagews/smc_sagews/tests/sage_init_files/define_var.sage:
--------------------------------------------------------------------------------
1 | xyzzy = 42
2 |
3 |
--------------------------------------------------------------------------------
/src/packages/database/postgres/schema/index.ts:
--------------------------------------------------------------------------------
1 | export { syncSchema } from "./sync";
2 |
--------------------------------------------------------------------------------
/src/packages/file-server/btrfs/index.ts:
--------------------------------------------------------------------------------
1 | export { filesystem } from "./filesystem";
2 |
--------------------------------------------------------------------------------
/src/packages/jupyter/ipynb/README.md:
--------------------------------------------------------------------------------
1 | Importing and exporting to/from ipynb format
2 |
--------------------------------------------------------------------------------
/src/packages/next/components/share/edit/README.md:
--------------------------------------------------------------------------------
1 | Editing the parameters of a public path
--------------------------------------------------------------------------------
/src/scripts/rebuild-all:
--------------------------------------------------------------------------------
1 | git pull && npm run clean && npm run make && npm run test
2 |
--------------------------------------------------------------------------------
/src/scripts/run-ci.sh:
--------------------------------------------------------------------------------
1 | set -ev
2 |
3 | pnpm clean
4 | pnpm build-dev
5 | pnpm test
6 |
--------------------------------------------------------------------------------
/src/packages/frontend/lib/README.md:
--------------------------------------------------------------------------------
1 | General library code to support the frontend.
2 |
3 |
--------------------------------------------------------------------------------
/src/packages/next/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["next", "next/core-web-vitals"]
3 | }
4 |
--------------------------------------------------------------------------------
/src/packages/next/components/landing/constants.ts:
--------------------------------------------------------------------------------
1 | export const LANDING_HEADER_LEVEL = 2;
2 |
--------------------------------------------------------------------------------
/src/scripts/skel/.bash_profile:
--------------------------------------------------------------------------------
1 | if [ -f ~/.bashrc ]; then
2 | source ~/.bashrc
3 | fi
4 |
--------------------------------------------------------------------------------
/src/smc_sagews/smc_sagews/tests/a.py:
--------------------------------------------------------------------------------
1 | def f2(*args, **kwargs):
2 | print("test f2 1")
3 |
--------------------------------------------------------------------------------
/src/packages/database/settings/index.ts:
--------------------------------------------------------------------------------
1 | export { getServerSettings } from "./server-settings";
2 |
--------------------------------------------------------------------------------
/src/packages/frontend/course/common/types.ts:
--------------------------------------------------------------------------------
1 | export type ItemName = "assignment" | "handout";
2 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/markdown-input/index.ts:
--------------------------------------------------------------------------------
1 | export { MarkdownInput } from "./component";
2 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/task-editor/constants.ts:
--------------------------------------------------------------------------------
1 | export const MAX_HEIGHT = "min(50vh,30em)";
2 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/crm-editor/frame/README.md:
--------------------------------------------------------------------------------
1 | Code for working with the frame tree
2 |
--------------------------------------------------------------------------------
/src/packages/frontend/i18n/formatter.js:
--------------------------------------------------------------------------------
1 | exports.compile = function (msgs) {
2 | return msgs
3 | }
4 |
--------------------------------------------------------------------------------
/src/packages/frontend/project/settings/run-quota/index.ts:
--------------------------------------------------------------------------------
1 | export { RunQuota } from "./run-quota";
2 |
--------------------------------------------------------------------------------
/src/packages/next/lib/api/index.ts:
--------------------------------------------------------------------------------
1 | export { z, apiRoute, apiRouteOperation } from "./framework";
2 |
--------------------------------------------------------------------------------
/src/packages/server/conat/socketio/index.ts:
--------------------------------------------------------------------------------
1 | export { init as initConatServer } from "./server";
2 |
--------------------------------------------------------------------------------
/src/packages/assets/dropzone/README-salvus.txt:
--------------------------------------------------------------------------------
1 | NOTE: I had to make one change to the CSS in dropzone.css!!!
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/crm-editor/fields/README.md:
--------------------------------------------------------------------------------
1 | Code for rendering different types of fields.
--------------------------------------------------------------------------------
/src/packages/frontend/components/data-grid/index.tsx:
--------------------------------------------------------------------------------
1 | import "./grid.css";
2 | export * from "./headings";
3 |
--------------------------------------------------------------------------------
/src/packages/frontend/test/setup.js:
--------------------------------------------------------------------------------
1 | require("@testing-library/jest-dom");
2 | process.env.COCALC_TEST_MODE = true;
--------------------------------------------------------------------------------
/src/packages/next/components/statistics/misc.ts:
--------------------------------------------------------------------------------
1 | export const ZEROS = { "5m": 0, "1h": 0, "1d": 0, "30d": 0 };
2 |
--------------------------------------------------------------------------------
/src/packages/next/test/setup.js:
--------------------------------------------------------------------------------
1 | require("@testing-library/jest-dom");
2 | process.env.COCALC_TEST_MODE = true;
--------------------------------------------------------------------------------
/src/packages/project/bin/cocalc-project.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | require("@cocalc/project/project").main();
3 |
--------------------------------------------------------------------------------
/src/packages/static/test/setup.js:
--------------------------------------------------------------------------------
1 | require("@testing-library/jest-dom");
2 | process.env.COCALC_TEST_MODE = true;
--------------------------------------------------------------------------------
/src/packages/util/test/README.md:
--------------------------------------------------------------------------------
1 | this is unused -- either convert it to new tests in typescript or delete
2 |
--------------------------------------------------------------------------------
/src/compute/compute/dev/conf.tar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/compute/compute/dev/conf.tar
--------------------------------------------------------------------------------
/src/packages/assets/art/logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/art/logo.jpg
--------------------------------------------------------------------------------
/src/packages/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/favicon.ico
--------------------------------------------------------------------------------
/src/packages/assets/kiran.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/kiran.jpeg
--------------------------------------------------------------------------------
/src/packages/util/mathjax-utils.d.ts:
--------------------------------------------------------------------------------
1 | export const replace_math: Function;
2 | export const remove_math: Function;
3 |
--------------------------------------------------------------------------------
/src/packages/util/smc-version.js:
--------------------------------------------------------------------------------
1 | /* autogenerated by the update_version script */
2 | exports.version=1763609578;
3 |
--------------------------------------------------------------------------------
/src/smc_pyutil/smc_pyutil/templates/linux/bash_profile:
--------------------------------------------------------------------------------
1 | if [ -f ~/.bashrc ]; then
2 | source ~/.bashrc
3 | fi
4 |
--------------------------------------------------------------------------------
/src/dev/README.md:
--------------------------------------------------------------------------------
1 | The only thing likely to be at all useful and not totally out of date in here is the dev/ subdirectory.
--------------------------------------------------------------------------------
/src/packages/assets/art/cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/art/cloud.png
--------------------------------------------------------------------------------
/src/packages/assets/art/salvus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/art/salvus.png
--------------------------------------------------------------------------------
/src/packages/assets/jquery/plugins/README.salvus:
--------------------------------------------------------------------------------
1 | for boostrap_hide_show.js:
2 |
3 | https://gist.github.com/zimkies/8360181
--------------------------------------------------------------------------------
/src/packages/jupyter/examples/README.md:
--------------------------------------------------------------------------------
1 | This is a place to put notebooks that are useful for testing that CoCalc works.
2 |
--------------------------------------------------------------------------------
/src/packages/next/pages/api/v2/openai/chatgpt.ts:
--------------------------------------------------------------------------------
1 | import handle from "../llm/evaluate";
2 |
3 | export default handle;
4 |
--------------------------------------------------------------------------------
/src/compute/compute/dev/3-compute.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -v
4 |
5 | . env.sh
6 |
7 | node ./start-compute.js
8 |
--------------------------------------------------------------------------------
/src/packages/assets/art/templates.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/art/templates.png
--------------------------------------------------------------------------------
/src/packages/assets/assets/x11-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/x11-01.png
--------------------------------------------------------------------------------
/src/packages/assets/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/favicon-16x16.png
--------------------------------------------------------------------------------
/src/packages/assets/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/favicon-32x32.png
--------------------------------------------------------------------------------
/src/packages/assets/will_conley.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/will_conley.jpg
--------------------------------------------------------------------------------
/src/packages/frontend/components/iconfont.cn/index.js:
--------------------------------------------------------------------------------
1 | import './iconfont'
2 | import './iconfont-2'
3 | import './iconfont-3'
--------------------------------------------------------------------------------
/src/packages/frontend/course/compute/README.md:
--------------------------------------------------------------------------------
1 | Some notes:
2 |
3 | - the word "unit" refers to either a handout or an assignment
--------------------------------------------------------------------------------
/src/packages/frontend/purchases/zindex.ts:
--------------------------------------------------------------------------------
1 | export const zIndexPayAsGo = 2000;
2 | export const zIndexTip = zIndexPayAsGo + 1;
3 |
--------------------------------------------------------------------------------
/src/packages/next/components/landing/navbar.tsx:
--------------------------------------------------------------------------------
1 | export default function Navbar() {
2 | return
Navbar
;
3 | }
4 |
--------------------------------------------------------------------------------
/src/packages/next/public/jsonfeed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/jsonfeed.png
--------------------------------------------------------------------------------
/src/packages/npmignore:
--------------------------------------------------------------------------------
1 | tsconfig.tsbuildinfo
2 | .coffee
3 | *.term
4 | *.term.init
5 | *.sage-chat
6 | a
7 | out
8 | dist-measure
--------------------------------------------------------------------------------
/src/packages/project/declarations.d.ts:
--------------------------------------------------------------------------------
1 | declare module "*.png" {
2 | const value: string;
3 | export default value;
4 | }
5 |
--------------------------------------------------------------------------------
/src/packages/server/projects/connection/index.ts:
--------------------------------------------------------------------------------
1 | import getConnection from "./connect";
2 | export default getConnection;
3 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "src/examples"]
2 | path = src/examples
3 | url = https://github.com/sagemathinc/cocalc-snippets.git
4 |
--------------------------------------------------------------------------------
/src/packages/frontend/declarations.d.ts:
--------------------------------------------------------------------------------
1 | declare module "*.png" {
2 | const value: string;
3 | export default value;
4 | }
5 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/llm/types.ts:
--------------------------------------------------------------------------------
1 | export type Scope = "none" | "selection" | "cell" | "section" | "page" | "all";
2 |
--------------------------------------------------------------------------------
/src/packages/next/public/info/blog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/info/blog.png
--------------------------------------------------------------------------------
/src/packages/next/public/info/share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/info/share.png
--------------------------------------------------------------------------------
/src/packages/project/conat/terminal/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | Terminal
3 | */
4 |
5 | export { createTerminalService } from "./manager";
6 |
--------------------------------------------------------------------------------
/src/packages/static/src/declarations.d.ts:
--------------------------------------------------------------------------------
1 | declare module "*.png" {
2 | const value: string;
3 | export default value;
4 | }
5 |
--------------------------------------------------------------------------------
/src/smc_pyutil/README.md:
--------------------------------------------------------------------------------
1 | CoCalc Project-related Python utility scripts
2 |
3 | sudo /usr/bin/pip install --upgrade ./
4 |
5 |
--------------------------------------------------------------------------------
/src/packages/hub/fonts/Cardo-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/hub/fonts/Cardo-Regular.ttf
--------------------------------------------------------------------------------
/src/packages/next/public/info/discord.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/info/discord.png
--------------------------------------------------------------------------------
/src/packages/next/public/info/facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/info/facebook.png
--------------------------------------------------------------------------------
/src/packages/next/public/info/github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/info/github.png
--------------------------------------------------------------------------------
/src/packages/next/public/info/linkedin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/info/linkedin.png
--------------------------------------------------------------------------------
/src/packages/next/public/info/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/info/twitter.png
--------------------------------------------------------------------------------
/src/packages/assets/sagepreview/03-latex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/sagepreview/03-latex.png
--------------------------------------------------------------------------------
/src/packages/assets/sagepreview/04-files.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/sagepreview/04-files.png
--------------------------------------------------------------------------------
/src/packages/backend/files/util.ts:
--------------------------------------------------------------------------------
1 | export function getHome(home?: string): string {
2 | return home ?? process.env.HOME ?? "/tmp";
3 | }
4 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/crm-editor/types.ts:
--------------------------------------------------------------------------------
1 | export type ViewType = "gallery" | "calendar" | "grid" | "kanban" | "retention";
2 |
--------------------------------------------------------------------------------
/src/packages/next/lib/api/latex.ts:
--------------------------------------------------------------------------------
1 | export const DEFAULT_LATEX_COMMAND =
2 | "latexmk -pdf -f -g -bibtex -deps -interaction=nonstopmode";
3 |
--------------------------------------------------------------------------------
/src/packages/next/public/features/kiran.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/kiran.jpeg
--------------------------------------------------------------------------------
/src/packages/next/public/features/x11-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/x11-01.png
--------------------------------------------------------------------------------
/src/packages/next/public/shopping/bella.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/shopping/bella.png
--------------------------------------------------------------------------------
/src/packages/next/public/soc2-aicpa-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/soc2-aicpa-logo.png
--------------------------------------------------------------------------------
/src/packages/project/conat/api/sync.ts:
--------------------------------------------------------------------------------
1 | export async function close(path: string) {
2 | console.log("TODO: close path", { path });
3 | }
4 |
--------------------------------------------------------------------------------
/src/packages/project/index.js:
--------------------------------------------------------------------------------
1 | const { resolve, join } = require("path");
2 |
3 | exports.path = resolve(join(__dirname, "..", "dist"));
4 |
--------------------------------------------------------------------------------
/src/packages/server/email/README.md:
--------------------------------------------------------------------------------
1 | This directory contains server functionality for sending emails via:
2 |
3 | - SMTP
4 | - Sendgrid
5 |
--------------------------------------------------------------------------------
/src/packages/assets/assets/cocalc-backup-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/cocalc-backup-1.png
--------------------------------------------------------------------------------
/src/packages/assets/assets/cocalc-pythontex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/cocalc-pythontex.png
--------------------------------------------------------------------------------
/src/packages/assets/assets/cocalc-sagetex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/cocalc-sagetex.png
--------------------------------------------------------------------------------
/src/packages/assets/sagepreview/02-courses.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/sagepreview/02-courses.png
--------------------------------------------------------------------------------
/src/packages/frontend/projects/tour-collabs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/frontend/projects/tour-collabs.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/chatroom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/chatroom.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/terminal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/terminal.png
--------------------------------------------------------------------------------
/src/packages/next/public/info/stackoverflow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/info/stackoverflow.png
--------------------------------------------------------------------------------
/src/packages/next/public/logo/og-share-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/logo/og-share-logo.png
--------------------------------------------------------------------------------
/src/python/cocalc-api/src/cocalc_api/__init__.py:
--------------------------------------------------------------------------------
1 | from .hub import Hub
2 | from .project import Project
3 |
4 | __all__ = ["Hub", "Project"]
5 |
--------------------------------------------------------------------------------
/src/scripts/dump-accounts:
--------------------------------------------------------------------------------
1 | echo "select email_address, account_id, last_name, first_name from accounts limit 1000000;" | cqlsh_connect smc1dc5
2 |
--------------------------------------------------------------------------------
/src/packages/api-client/index.ts:
--------------------------------------------------------------------------------
1 | import * as project from "./src/project";
2 | export { project };
3 |
4 | export { apiCall } from "./src/call";
5 |
--------------------------------------------------------------------------------
/src/packages/api-client/src/ssh-keys.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ssh key management -- TODO
3 | */
4 |
5 | //import { apiCall } from "./call";
6 |
7 | export {};
8 |
--------------------------------------------------------------------------------
/src/packages/assets/dropzone/images/spritemap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/dropzone/images/spritemap.png
--------------------------------------------------------------------------------
/src/packages/assets/fonts/droid/DroidSansMono.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/fonts/droid/DroidSansMono.ttf
--------------------------------------------------------------------------------
/src/packages/assets/sagepreview/01-worksheet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/sagepreview/01-worksheet.png
--------------------------------------------------------------------------------
/src/packages/frontend/project/servers/index.ts:
--------------------------------------------------------------------------------
1 | export { ProjectServers } from "./project-servers";
2 | export { TITLE, ICON_NAME } from "./consts";
3 |
--------------------------------------------------------------------------------
/src/packages/frontend/projects/tour-projects.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/frontend/projects/tour-projects.png
--------------------------------------------------------------------------------
/src/packages/next/components/misc/copyable.tsx:
--------------------------------------------------------------------------------
1 | import Copyable from "@cocalc/frontend/components/copy-to-clipboard";
2 | export default Copyable;
3 |
--------------------------------------------------------------------------------
/src/packages/next/public/about/blaec-bejarano.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/about/blaec-bejarano.png
--------------------------------------------------------------------------------
/src/packages/next/public/about/harald-schilly.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/about/harald-schilly.jpg
--------------------------------------------------------------------------------
/src/packages/next/public/about/william-stein.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/about/william-stein.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/julia-code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/julia-code.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/jupyter-lab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/jupyter-lab.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/pluto-plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/pluto-plot.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/slides-sage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/slides-sage.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/will_conley.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/will_conley.jpg
--------------------------------------------------------------------------------
/src/packages/next/public/features/x11-firefox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/x11-firefox.png
--------------------------------------------------------------------------------
/src/packages/next/public/software/executables.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/software/executables.png
--------------------------------------------------------------------------------
/src/scripts/use:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # get a quick overview of what's going on in a compute node
3 |
4 | df -h /projects; sudo ls /projects|wc -l
5 |
--------------------------------------------------------------------------------
/src/packages/assets/assets/latex-editor-rnw-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/latex-editor-rnw-01.png
--------------------------------------------------------------------------------
/src/packages/assets/dropzone/images/spritemap@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/dropzone/images/spritemap@2x.png
--------------------------------------------------------------------------------
/src/packages/database/postgres/stripe/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./customer-id";
2 | import syncCustomer from "./sync-customer";
3 | export { syncCustomer };
4 |
--------------------------------------------------------------------------------
/src/packages/next/public/about/all-about-cocalc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/about/all-about-cocalc.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/api-screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/api-screenshot.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-r-latex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-r-latex.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-rcode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-rcode.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-sagetex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-sagetex.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/julia-jupyter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/julia-jupyter.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/julia-nbgrader.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/julia-nbgrader.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/sage-nbgrader.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/sage-nbgrader.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/sage-worksheet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/sage-worksheet.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/swirl-course.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/swirl-course.png
--------------------------------------------------------------------------------
/src/packages/next/public/info/github-discussions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/info/github-discussions.png
--------------------------------------------------------------------------------
/src/packages/next/public/software/julia-jupyter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/software/julia-jupyter.png
--------------------------------------------------------------------------------
/src/packages/project/test/setup.js:
--------------------------------------------------------------------------------
1 | // checked for in some code to behave differently while running unit tests.
2 | process.env.COCALC_TEST_MODE = true;
3 |
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | # Guidelines
2 |
3 | This collection of files provides general knowledge for working with the CoCalc.
4 |
5 | Last Updated: September 2024.
6 |
--------------------------------------------------------------------------------
/src/packages/assets/assets/cocalc-jupyter-kernels.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/cocalc-jupyter-kernels.png
--------------------------------------------------------------------------------
/src/packages/assets/assets/latex-custom-command-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/latex-custom-command-02.png
--------------------------------------------------------------------------------
/src/packages/assets/assets/smc-side-chat-20170508.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/smc-side-chat-20170508.png
--------------------------------------------------------------------------------
/src/packages/assets/cocalc-icons-font/cocalc-icons.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/cocalc-icons-font/cocalc-icons.eot
--------------------------------------------------------------------------------
/src/packages/assets/cocalc-icons-font/cocalc-icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/cocalc-icons-font/cocalc-icons.ttf
--------------------------------------------------------------------------------
/src/packages/frontend/jupyter/llm/index.ts:
--------------------------------------------------------------------------------
1 | import LLMError from "./error";
2 | import { LLMCellTool } from "./cell-tool";
3 | export { LLMError, LLMCellTool };
4 |
--------------------------------------------------------------------------------
/src/packages/next/pages/lang/[locale]/_README.md:
--------------------------------------------------------------------------------
1 | The URL of these pages are rewritten in the middleware.ts file.
2 | This is due to the catch-all slug [owner].
3 |
--------------------------------------------------------------------------------
/src/packages/next/public/about/andrey-novoseltsev.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/about/andrey-novoseltsev.jpeg
--------------------------------------------------------------------------------
/src/packages/next/public/features/chatgpt-fix-code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/chatgpt-fix-code.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-backup-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-backup-1.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-pythontex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-pythontex.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-r-jupyter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-r-jupyter.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-snapshots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-snapshots.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-teaching.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-teaching.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/latex-ai-formula.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/latex-ai-formula.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/sage-circular-v2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/sage-circular-v2.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/sagemath-jupyter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/sagemath-jupyter.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/whiteboard-sage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/whiteboard-sage.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/x11-applications.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/x11-applications.png
--------------------------------------------------------------------------------
/src/packages/next/public/info/cocalc-mailing-list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/info/cocalc-mailing-list.png
--------------------------------------------------------------------------------
/src/packages/server/purchases/legacy/README.md:
--------------------------------------------------------------------------------
1 | All code in this directory is for switching from our old way of using stripe to our new
2 | way in August 2023.
3 |
--------------------------------------------------------------------------------
/src/packages/util/conat.ts:
--------------------------------------------------------------------------------
1 | // Some very generic conat related parameters
2 |
3 | // how frequently
4 | export const CONAT_OPEN_FILE_TOUCH_INTERVAL = 30000;
5 |
--------------------------------------------------------------------------------
/src/packages/assets/assets/cocalc-jupyter2-20170508.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/cocalc-jupyter2-20170508.png
--------------------------------------------------------------------------------
/src/packages/assets/assets/cocalc-jupyter2-memory-cpu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/cocalc-jupyter2-memory-cpu.png
--------------------------------------------------------------------------------
/src/packages/assets/assets/cocalc-latex-side-chat-v2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/cocalc-latex-side-chat-v2.png
--------------------------------------------------------------------------------
/src/packages/assets/assets/cocalc-real-time-jupyter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/cocalc-real-time-jupyter.png
--------------------------------------------------------------------------------
/src/packages/assets/assets/latex-editor-timetravel-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/latex-editor-timetravel-01.png
--------------------------------------------------------------------------------
/src/packages/assets/cocalc-icons-font/cocalc-icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/cocalc-icons-font/cocalc-icons.woff
--------------------------------------------------------------------------------
/src/packages/assets/sagepreview/05-sky_is_the_limit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/sagepreview/05-sky_is_the_limit.png
--------------------------------------------------------------------------------
/src/packages/assets/term/README.txt:
--------------------------------------------------------------------------------
1 | I have made tons of changes to term.js (e.g, to CSS classes) so be sure
2 | to *merge* on upgrade, don't just copy over!
3 |
4 |
--------------------------------------------------------------------------------
/src/packages/frontend/project/explorer/tour/actions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/frontend/project/explorer/tour/actions.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/ai-latex-generate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/ai-latex-generate.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/ai-llm-cprogram-run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/ai-llm-cprogram-run.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-jupyter-bash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-jupyter-bash.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-r-side-chat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-r-side-chat.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/frame-editor-python.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/frame-editor-python.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/latex-editor-rnw-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/latex-editor-rnw-01.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/octave-x11-terminal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/octave-x11-terminal.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/terminal-software.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/terminal-software.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/whiteboard-post-it.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/whiteboard-post-it.png
--------------------------------------------------------------------------------
/src/packages/assets/assets/cocalc-share-latex-document.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/cocalc-share-latex-document.png
--------------------------------------------------------------------------------
/src/packages/assets/misc/talk-20121004/ui/default/blank.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/misc/talk-20121004/ui/default/blank.gif
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/crm-editor/ant-hacks.css:
--------------------------------------------------------------------------------
1 | /* This may or may not cause trouble elsewhere! */
2 |
3 | .ant-tabs-content {
4 | height: 100%;
5 | }
6 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/generic/README.md:
--------------------------------------------------------------------------------
1 | Everything here **should** be generic functionality that has nothing to do with frame-editors/, and should be moved out.
--------------------------------------------------------------------------------
/src/packages/next/public/cocalc-sagemath-2024-11-22-nq8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/cocalc-sagemath-2024-11-22-nq8.png
--------------------------------------------------------------------------------
/src/packages/next/public/cocalc-screenshot-20200128-nq8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/cocalc-screenshot-20200128-nq8.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/ai-latex-help-me-fix.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/ai-latex-help-me-fix.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/ai-llm-cprogram-chat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/ai-llm-cprogram-chat.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/ai-llm-cprogram-query.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/ai-llm-cprogram-query.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/chatgpt-generate-code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/chatgpt-generate-code.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-python-jupyter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-python-jupyter.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-r-environment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-r-environment.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/compute-server-select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/compute-server-select.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/create-compute-server.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/create-compute-server.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/swirl_new_large_final.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/swirl_new_large_final.png
--------------------------------------------------------------------------------
/src/packages/sync-fs/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: "ts-jest",
3 | testEnvironment: "node",
4 | testMatch: ["**/?(*.)+(spec|test).ts?(x)"],
5 | };
6 |
--------------------------------------------------------------------------------
/src/scripts/database-remove-locks:
--------------------------------------------------------------------------------
1 | set -ev
2 |
3 | rm -vf data/postgres/*.pid
4 | rm -vf data/postgres/socket/.s.PGSQL.5432
5 | rm -vf data/postgres/socket/.s.PGSQL.5432.lock
--------------------------------------------------------------------------------
/src/packages/assets/assets/cocalc-chat-jupyter-20171120-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/cocalc-chat-jupyter-20171120-2.png
--------------------------------------------------------------------------------
/src/packages/assets/assets/cocalc-jupyter-share-20171218.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/cocalc-jupyter-share-20171218.png
--------------------------------------------------------------------------------
/src/packages/assets/assets/cocalc-latex-concurrent-editing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/assets/cocalc-latex-concurrent-editing.png
--------------------------------------------------------------------------------
/src/packages/assets/index.test.js:
--------------------------------------------------------------------------------
1 | const index = require(".");
2 |
3 | test("index has a path ending in assets", () => {
4 | expect(index.path).toMatch(/assets$/);
5 | });
6 |
--------------------------------------------------------------------------------
/src/packages/assets/misc/talk-20121004/ui/default/bodybg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/misc/talk-20121004/ui/default/bodybg.gif
--------------------------------------------------------------------------------
/src/packages/conat/hub/changefeeds/index.ts:
--------------------------------------------------------------------------------
1 | export { changefeedServer, type ConatSocketServer } from "./server";
2 | export { changefeed, type Changefeed } from "./client";
3 |
--------------------------------------------------------------------------------
/src/packages/frontend/codemirror/mode/mediawiki/img/black4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/frontend/codemirror/mode/mediawiki/img/black4.png
--------------------------------------------------------------------------------
/src/packages/frontend/codemirror/mode/mediawiki/img/ext2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/frontend/codemirror/mode/mediawiki/img/ext2.png
--------------------------------------------------------------------------------
/src/packages/frontend/codemirror/mode/mediawiki/img/ext4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/frontend/codemirror/mode/mediawiki/img/ext4.png
--------------------------------------------------------------------------------
/src/packages/frontend/codemirror/mode/mediawiki/img/link4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/frontend/codemirror/mode/mediawiki/img/link4.png
--------------------------------------------------------------------------------
/src/packages/frontend/crash-banner.ts:
--------------------------------------------------------------------------------
1 | import $ from "jquery";
2 |
3 | export function init() {
4 | // @ts-ignore
5 | $("#cocalc-react-crash").processIcons?.();
6 | }
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/crm-editor/views/README.md:
--------------------------------------------------------------------------------
1 | # Views
2 |
3 | This directory contains code for viewing specific tables in the database in various ways.
4 |
5 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/frame-tree/style.ts:
--------------------------------------------------------------------------------
1 | import { COLORS } from "@cocalc/util/theme";
2 |
3 | export const TITLE_BAR_BORDER = `1px solid ${COLORS.GRAY_DDD}`;
4 |
--------------------------------------------------------------------------------
/src/packages/next/public/features/ai-latex-maxwell-answer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/ai-latex-maxwell-answer.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-jupyter-kernels.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-jupyter-kernels.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-jupyter2-20170508.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-jupyter2-20170508.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-latex-pythontex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-latex-pythontex.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-real-time-jupyter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-real-time-jupyter.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-sagemath-sagetex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-sagemath-sagetex.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-shell-script-run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-shell-script-run.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-terminal-collab.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-terminal-collab.gif
--------------------------------------------------------------------------------
/src/packages/next/public/features/latex-custom-command-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/latex-custom-command-02.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/running-compute-server.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/running-compute-server.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/smc-side-chat-20170508.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/smc-side-chat-20170508.png
--------------------------------------------------------------------------------
/src/packages/server/compute/README.md:
--------------------------------------------------------------------------------
1 | # Compute Server Functionality
2 |
3 | The backend api-accessible functionality related to project-level compute servers will go here.
4 |
--------------------------------------------------------------------------------
/src/packages/sync-fs/lib/types.ts:
--------------------------------------------------------------------------------
1 | export type FilesystemStatePatch = { [path: string]: number | null };
2 |
3 | export type FilesystemState = { [path: string]: number };
4 |
--------------------------------------------------------------------------------
/src/packages/sync/test/setup.js:
--------------------------------------------------------------------------------
1 | // test/setup.js
2 |
3 | // checked for in some code to behave differently while running unit tests.
4 | process.env.COCALC_TEST_MODE = true;
5 |
--------------------------------------------------------------------------------
/src/packages/backend/conat/test/persist/README.md:
--------------------------------------------------------------------------------
1 | Most tests of persist are in other test directories, via creating streams,
2 | etc. However, here we directly test some things.
3 |
--------------------------------------------------------------------------------
/src/packages/backend/test/setup.js:
--------------------------------------------------------------------------------
1 | // test/setup.js
2 |
3 | // checked for in some code to behave differently while running unit tests.
4 | process.env.COCALC_TEST_MODE = true;
5 |
--------------------------------------------------------------------------------
/src/packages/frontend/.vscode/spellright.dict:
--------------------------------------------------------------------------------
1 | Sagemath
2 | CoCalc
3 | AGPLv
4 | MS-RSL
5 | ©
6 | Jupyter
7 | jupyter
8 | tsx
9 | dropdown
10 | Antd
11 | LLM
12 | Ollama
13 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/terminal-editor/terminal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/frontend/frame-editors/terminal-editor/terminal.png
--------------------------------------------------------------------------------
/src/packages/next/lib/types/sign-up.ts:
--------------------------------------------------------------------------------
1 | export interface SignUpIssues {
2 | terms?: string;
3 | email?: string;
4 | password?: string;
5 | api?: string;
6 | }
7 |
--------------------------------------------------------------------------------
/src/packages/next/public/features/chatgpt-generate-code-run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/chatgpt-generate-code-run.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-frame-editor-python.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-frame-editor-python.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-jupyter-share-nasa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-jupyter-share-nasa.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-jupyter2-memory-cpu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-jupyter2-memory-cpu.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-octave-x11-20200511.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-octave-x11-20200511.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/latex-editor-main-20251003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/latex-editor-main-20251003.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/latex-editor-timetravel-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/latex-editor-timetravel-01.png
--------------------------------------------------------------------------------
/src/packages/server/hub/README.md:
--------------------------------------------------------------------------------
1 | This is code that was in the hub but belongs in server. It's
2 | mostly legacy, and is not written in the style of the rest of the server code.
3 |
--------------------------------------------------------------------------------
/src/packages/server/support/util.ts:
--------------------------------------------------------------------------------
1 | export function urlToUserURL(url?: string): string {
2 | return (url ?? "").replace("api/v2/tickets", "requests").replace(".json", "");
3 | }
4 |
--------------------------------------------------------------------------------
/src/smc_sagews/smc_sagews/tests/runtests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | export SAGE_ROOT=${SAGE_ROOT:-${EXT:-/ext}/sage/sage}
4 | . $SAGE_ROOT/src/bin/sage-env
5 | python -m pytest $@
6 |
--------------------------------------------------------------------------------
/src/packages/cdn/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | - 2021-05-17: rewrite to be an npm package instead of whatever it was.
2 | - 2020-04-29: initial setup including bootstrap css, katex, a font, ...
3 |
4 |
--------------------------------------------------------------------------------
/src/packages/file-server/test/setup.js:
--------------------------------------------------------------------------------
1 | // test/setup.js
2 |
3 | // checked for in some code to behave differently while running unit tests.
4 | process.env.COCALC_TEST_MODE = true;
5 |
--------------------------------------------------------------------------------
/src/packages/frontend/codemirror/mode/mediawiki/img/template4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/frontend/codemirror/mode/mediawiki/img/template4.png
--------------------------------------------------------------------------------
/src/packages/frontend/codemirror/mode/mediawiki/img/template8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/frontend/codemirror/mode/mediawiki/img/template8.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-jupyter-format-python.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-jupyter-format-python.gif
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-jupyter-r-format-cell.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-jupyter-r-format-cell.mp4
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-jupyter-r-format-cell.webm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-jupyter-r-format-cell.webm
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-r-jupyter-collaborate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-r-jupyter-collaborate.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-share-latex-document.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-share-latex-document.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/sage-sticker-1x1_inch-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/sage-sticker-1x1_inch-small.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/terminal-jupyter-postgresql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/terminal-jupyter-postgresql.png
--------------------------------------------------------------------------------
/src/packages/server/conat/api/jupyter.ts:
--------------------------------------------------------------------------------
1 | export { execute } from "@cocalc/server/jupyter/execute";
2 | import kernels from "@cocalc/server/jupyter/kernels";
3 | export { kernels };
4 |
--------------------------------------------------------------------------------
/src/packages/frontend/jupyter/README.md:
--------------------------------------------------------------------------------
1 | React implementation of a Jupyter notebook frontend client.
2 |
3 | Most of the rest of the Jupyter implementation is in the `@cocalc/jupyter` package.
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-chat-jupyter-20171120-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-chat-jupyter-20171120-2.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-course-assignments-2019.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-course-assignments-2019.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-jupyter-python-sidechat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-jupyter-python-sidechat.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-octave-jupyter-20200511.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-octave-jupyter-20200511.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-octave-terminal-20200511.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-octave-terminal-20200511.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-timetravel-r-jupyter-3x.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-timetravel-r-jupyter-3x.mp4
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-timetravel-r-jupyter-3x.webm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-timetravel-r-jupyter-3x.webm
--------------------------------------------------------------------------------
/src/packages/next/public/features/latex-editor-darkmode-20251003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/latex-editor-darkmode-20251003.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/latex-editor-multifile-20251006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/latex-editor-multifile-20251006.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/latex-editor-pythontex-20251003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/latex-editor-pythontex-20251003.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/latex-editor-side-chat-20251004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/latex-editor-side-chat-20251004.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/latex-forward-inverse-20251006.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/latex-forward-inverse-20251006.mp4
--------------------------------------------------------------------------------
/src/packages/next/public/features/latex-forward-inverse-20251006.webm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/latex-forward-inverse-20251006.webm
--------------------------------------------------------------------------------
/src/packages/sync-client/scratch/README.md:
--------------------------------------------------------------------------------
1 | These are some very lightweight demos of using websocket
2 | between nodejs processes, which were just helpful while writing
3 | this. That's all.
--------------------------------------------------------------------------------
/src/compute/compute/dev/2-syncfs.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -v
4 |
5 | . env.sh
6 |
7 | fusermount -uz $UNIONFS_UPPER 2>/dev/null || true
8 |
9 | node ./start-filesystem.js
10 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/crm-editor/tables/index.ts:
--------------------------------------------------------------------------------
1 | export {
2 | getDBTableDescription,
3 | getTableDescription,
4 | getTables,
5 | useTableDescription,
6 | } from "./tables";
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/terminal-editor/split-terminals.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/frontend/frame-editors/terminal-editor/split-terminals.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-jupyter-nbgrader-overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-jupyter-nbgrader-overview.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-rmd-demo-R-python3-plotting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-rmd-demo-R-python3-plotting.png
--------------------------------------------------------------------------------
/src/scripts/smc-fix-permissions.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # fixes the permissions to 022
3 | DIR=${1:-.}
4 | time chmod a+r -R $DIR && find $DIR -perm /u+x -execdir chmod a+x {} \; && echo "OK"
5 |
--------------------------------------------------------------------------------
/src/compute/compute/lib/index.ts:
--------------------------------------------------------------------------------
1 | export { mountProject } from "./filesystem";
2 | export { tasks } from "./tasks";
3 | export { jupyter } from "./jupyter";
4 | export { manager } from "./manager";
5 |
--------------------------------------------------------------------------------
/src/packages/frontend/codemirror/keymaps.js:
--------------------------------------------------------------------------------
1 |
2 | // Keyboard bindings
3 | require("codemirror/keymap/vim.js");
4 | require("codemirror/keymap/emacs.js");
5 | require("codemirror/keymap/sublime.js");
6 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/slides-editor/slides.tsx:
--------------------------------------------------------------------------------
1 | import Whiteboard from "../whiteboard-editor/whiteboard";
2 |
3 | export default function Slides() {
4 | return ;
5 | }
6 |
--------------------------------------------------------------------------------
/src/packages/next/components/share/header.tsx:
--------------------------------------------------------------------------------
1 | import LandingHeader from "components/landing/header";
2 |
3 | export default function Header() {
4 | return ;
5 | }
6 |
--------------------------------------------------------------------------------
/src/packages/next/public/features/latex-editor-realtime-sync-20251003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/latex-editor-realtime-sync-20251003.png
--------------------------------------------------------------------------------
/src/dev/single/start-postgres:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | export USER=wstein
3 |
4 | cd $HOME
5 | export PG_DATA=$HOME/postgres_data
6 |
7 | /usr/local/bin/postgres -D $PG_DATA 2> $HOME/logs/postgres.log &
8 |
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/animated-overlay.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/animated-overlay.gif
--------------------------------------------------------------------------------
/src/packages/backend/port.test.ts:
--------------------------------------------------------------------------------
1 | test("that the port is set to the PORT env var", () => {
2 | process.env.PORT = "6000";
3 | expect(require("./port").default).toBe(6000);
4 | });
5 |
6 | export {};
7 |
--------------------------------------------------------------------------------
/src/packages/database/test/setup.js:
--------------------------------------------------------------------------------
1 | // test/setup.js
2 |
3 | // see packages/database/pool/pool.ts for where this name is also hard coded:
4 | process.env.PGDATABASE = "smc_ephemeral_testing_database";
5 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/slate-react/@types/direction.d.ts:
--------------------------------------------------------------------------------
1 | declare module "direction" {
2 | function direction(text: string): "neutral" | "ltr" | "rtl";
3 | export default direction;
4 | }
5 |
--------------------------------------------------------------------------------
/src/packages/next/components/auth/sso.module.css:
--------------------------------------------------------------------------------
1 | .icon {
2 | margin: "0 2.5px";
3 | cursor: pointer;
4 | transition: 0.1s;
5 | }
6 |
7 | .icon:hover {
8 | transform: scale(1.1);
9 | }
10 |
--------------------------------------------------------------------------------
/src/packages/next/public/features/chatgpt-jupyter-linear-regression-cell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/chatgpt-jupyter-linear-regression-cell.png
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-jupyter2-timetravel-20170515-3x.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-jupyter2-timetravel-20170515-3x.mp4
--------------------------------------------------------------------------------
/src/packages/next/public/features/cocalc-jupyter2-timetravel-20170515-3x.webm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/cocalc-jupyter2-timetravel-20170515-3x.webm
--------------------------------------------------------------------------------
/src/smc_pyutil/smc_pyutil/bin/smc-sage-server:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if which sage >/dev/null; then
4 | sage -python -c "from smc_sagews.sage_server_command_line import main; main('$1')"
5 | fi
6 |
--------------------------------------------------------------------------------
/src/packages/next/public/features/chatgpt-jupyter-linear-regression-prompt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/features/chatgpt-jupyter-linear-regression-prompt.png
--------------------------------------------------------------------------------
/src/packages/project/servers/hub/types.ts:
--------------------------------------------------------------------------------
1 | export interface Message {
2 | event: string;
3 | id?: string;
4 | pid?: number;
5 | signal?: string | number;
6 | error?: string;
7 | name?: string;
8 | }
9 |
--------------------------------------------------------------------------------
/src/packages/server/auth/sso/README.md:
--------------------------------------------------------------------------------
1 | Eventually the single sign on implementation will be rewritten
2 | in a nice modular way here.
3 |
4 | Currently, the implementation is mostly in packages/hub/auth.ts
5 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/elements/init-ssr.ts:
--------------------------------------------------------------------------------
1 | /*
2 | Version that is suitable for use in the context of serve-side rendering.
3 | */
4 |
5 | export * from "./register";
6 | export * from "./types-ssr";
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/search/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export * from "./hook";
--------------------------------------------------------------------------------
/src/packages/frontend/library/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { Library } from "./component";
--------------------------------------------------------------------------------
/src/packages/next/components/landing/pricing.module.css:
--------------------------------------------------------------------------------
1 | .item {
2 | cursor: pointer;
3 | position: relative;
4 | transition: 0.1s;
5 | top: 0;
6 | }
7 |
8 | .item:hover {
9 | top: -5px;
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/next/openapitools.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
3 | "spaces": 2,
4 | "generator-cli": {
5 | "version": "7.5.0"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/dev/single/start-compute:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | cd /home/wstein/smc/src/
3 | . smc-env
4 | /home/wstein/smc/src/smc-hub/scripts/compute --single start > /home/wstein/.compute.log 2>/home/wstein/.compute.err &
5 |
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-icons_c47a23_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-icons_c47a23_256x240.png
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-icons_cb672b_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-icons_cb672b_256x240.png
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-icons_f08000_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-icons_f08000_256x240.png
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-icons_f35f07_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-icons_f35f07_256x240.png
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-icons_ff7519_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-icons_ff7519_256x240.png
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-icons_ffffff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-icons_ffffff_256x240.png
--------------------------------------------------------------------------------
/src/packages/backend/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | exports.misc_node = require("./misc_node");
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/slides-editor/slideshow.tsx:
--------------------------------------------------------------------------------
1 | import Whiteboard from "../whiteboard-editor/whiteboard";
2 |
3 | export default function Presentation() {
4 | return ;
5 | }
6 |
--------------------------------------------------------------------------------
/src/packages/util/heartbeat.js:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | exports.PROJECT_HUB_HEARTBEAT_INTERVAL_S = 30;
7 |
--------------------------------------------------------------------------------
/src/packages/assets/jquery/plugins/bootstrap-colorpicker/img/glyphicons-halflings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/plugins/bootstrap-colorpicker/img/glyphicons-halflings.png
--------------------------------------------------------------------------------
/src/packages/conat/jest.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('ts-jest').JestConfigWithTsJest} */
2 | module.exports = {
3 | preset: "ts-jest",
4 | testEnvironment: "node",
5 | testMatch: ["**/?(*.)+(spec|test).ts?(x)"],
6 | };
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/project/history/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { ProjectLog } from "./log";
7 |
--------------------------------------------------------------------------------
/src/packages/util/jest.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('ts-jest').JestConfigWithTsJest} */
2 | module.exports = {
3 | preset: 'ts-jest',
4 | testEnvironment: 'node',
5 | testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
6 | };
7 |
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_flat_75_aaaaaa_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_flat_75_aaaaaa_40x100.png
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_glass_100_f5f0e5_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_glass_100_f5f0e5_1x400.png
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_glass_25_cb842e_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_glass_25_cb842e_1x400.png
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_glass_70_ede4d4_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_glass_70_ede4d4_1x400.png
--------------------------------------------------------------------------------
/src/packages/database/postgres/schema/types.ts:
--------------------------------------------------------------------------------
1 | import type { DBSchema, TableSchema as TableSchema0 } from "@cocalc/util/db-schema";
2 |
3 | type TableSchema = TableSchema0;
4 |
5 | export type { DBSchema, TableSchema };
6 |
--------------------------------------------------------------------------------
/src/packages/frontend/project/explorer/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { Explorer } from "./explorer";
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/purchases/payments-page.tsx:
--------------------------------------------------------------------------------
1 | import Payments from "./payments";
2 |
3 | export default function PaymentsPage() {
4 | return (
5 |
8 | );
9 | }
10 |
--------------------------------------------------------------------------------
/src/packages/hub/run/hub.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | /*
4 | * This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
5 | * License: MS-RSL – see LICENSE.md for details
6 | */
7 |
8 | require("@cocalc/hub/hub");
9 |
--------------------------------------------------------------------------------
/src/packages/jupyter/jest.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('ts-jest').JestConfigWithTsJest} */
2 | module.exports = {
3 | preset: 'ts-jest',
4 | testEnvironment: 'node',
5 | testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
6 | };
7 |
--------------------------------------------------------------------------------
/src/smc_sagews/smc_sagews/tests/a.html:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 | TESTING 1
8 |
9 |
--------------------------------------------------------------------------------
/src/packages/assets/jquery/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha.png
--------------------------------------------------------------------------------
/src/packages/assets/jquery/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/hue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/hue.png
--------------------------------------------------------------------------------
/src/packages/assets/jquery/plugins/bootstrap-colorpicker/img/glyphicons-halflings-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/plugins/bootstrap-colorpicker/img/glyphicons-halflings-white.png
--------------------------------------------------------------------------------
/src/packages/frontend/compute/cloud-filesystem/log.tsx:
--------------------------------------------------------------------------------
1 | export default function CloudFilesystemLog({
2 | style,
3 | }: {
4 | id: number;
5 | style?;
6 | }) {
7 | return Log
;
8 | }
9 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/slate-diff/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { slateDiff } from "./diff";
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/project/info/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { ProjectInfo } from "./project-info";
7 |
--------------------------------------------------------------------------------
/src/packages/next/public/documents/SageMathInc_VPAT2.5Rev_WCAG_February2025_December2025.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/next/public/documents/SageMathInc_VPAT2.5Rev_WCAG_February2025_December2025.pdf
--------------------------------------------------------------------------------
/src/packages/util/project-info.ts:
--------------------------------------------------------------------------------
1 | export const pidFilename = "project.pid";
2 |
3 | // pid file updated once every 30s -- see https://github.com/sagemathinc/cocalc/issues/7325
4 | export const pidUpdateIntervalMs = 1000 * 30;
5 |
6 |
--------------------------------------------------------------------------------
/src/packages/util/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": "./",
5 | "outDir": "dist"
6 | },
7 | "exclude": ["node_modules", "../node_modules", "dist", "test"]
8 | }
9 |
--------------------------------------------------------------------------------
/src/scripts/make-user-admin:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -e
3 |
4 | if [[ $# -ne 1 ]] ; then
5 | echo "$0 your@email.address"
6 | exit 1
7 | fi
8 |
9 | echo "update accounts set groups='{admin}' where email_address='$1'" | psql
--------------------------------------------------------------------------------
/src/smc_pyutil/smc_pyutil/lib/__init__.py:
--------------------------------------------------------------------------------
1 | # This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
2 | # License: MS-RSL – see LICENSE.md for details
3 |
4 | from __future__ import absolute_import
5 | from .sagews_cell import *
6 |
--------------------------------------------------------------------------------
/src/dev/docker/README.md:
--------------------------------------------------------------------------------
1 | # **This is DEPRECATED!**
2 |
3 | ---
4 |
5 | # Docker Repository Moved
6 |
7 | The new stand-alone repository for the CoCalc Docker image is: https://github.com/sagemathinc/cocalc-docker
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_inset-soft_100_f4f0ec_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_inset-soft_100_f4f0ec_1x100.png
--------------------------------------------------------------------------------
/src/packages/frontend/project/settings/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { ProjectSettings } from "./settings";
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/purchases/purchases-page.tsx:
--------------------------------------------------------------------------------
1 | import Purchases from "./purchases";
2 |
3 | export default function PurchasesPage() {
4 | return (
5 |
8 | );
9 | }
10 |
--------------------------------------------------------------------------------
/src/packages/hub/copy-path.test.ts:
--------------------------------------------------------------------------------
1 | import { test_err2str } from "./copy-path";
2 |
3 | test("converting an error to a string", () => {
4 | const s = test_err2str(Error("sample error"));
5 | expect(s).toEqual("sample error");
6 | });
7 |
--------------------------------------------------------------------------------
/src/packages/project/main.test.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
3 | test("we import the main program under nodejs", async () => {
4 | // This should work. Ensures we're using nodejs code only.
5 | await import("@cocalc/project/project");
6 | });
7 |
--------------------------------------------------------------------------------
/src/packages/server/email/message.ts:
--------------------------------------------------------------------------------
1 | export interface Message {
2 | to: string;
3 | from?: string;
4 | subject: string;
5 | text: string;
6 | html: string;
7 | categories?: string[];
8 | asm_group?: number;
9 | }
10 |
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_highlight-hard_65_fee4bd_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_highlight-hard_65_fee4bd_1x100.png
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_highlight-hard_75_f5f5b5_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_highlight-hard_75_f5f5b5_1x100.png
--------------------------------------------------------------------------------
/src/packages/assets/jquery/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/saturation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/saturation.png
--------------------------------------------------------------------------------
/src/packages/frontend/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "spellright.language": [
3 | "en_US"
4 | ],
5 | "spellright.documentTypes": [
6 | "markdown",
7 | "latex",
8 | "plaintext"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/src/scripts/ignore-examples:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -ev
4 | export SRC="$( dirname "${BASH_SOURCE[0]}" )"/..
5 |
6 | # I do not think we should be using submodules, but anyways...
7 |
8 | git update-index --assume-unchanged $SRC/examples
9 |
--------------------------------------------------------------------------------
/src/scripts/update_local_hub:
--------------------------------------------------------------------------------
1 | set -e
2 | set -v
3 |
4 | cd $SALVUS_ROOT
5 | ./make_coffee
6 | echo "Updating local_hub_template .sagemathcloud directory"
7 | sudo rsync -LrxH --delete $SALVUS_ROOT/local_hub_template/ /projects/sagemathcloud/
8 |
--------------------------------------------------------------------------------
/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_highlight-hard_100_f4f0ec_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagemathinc/cocalc/HEAD/src/packages/assets/jquery/jquery-ui/css/humanity/images/ui-bg_highlight-hard_100_f4f0ec_1x100.png
--------------------------------------------------------------------------------
/src/packages/frontend/components/gap.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export function Gap() {
7 | return ;
8 | }
9 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/llm/consts.ts:
--------------------------------------------------------------------------------
1 | // number of characters we send to an LLM for context
2 | export const CUTOFF = 5000;
3 |
4 | // this came from ./create-chat, but for all frame types
5 | export const AI_ASSIST_TAG = "code-editor";
6 |
--------------------------------------------------------------------------------
/src/packages/frontend/i18n/components.tsx:
--------------------------------------------------------------------------------
1 | import { useIntl } from "react-intl";
2 |
3 | import { labels } from "./common";
4 |
5 | export function CancelText() {
6 | const intl = useIntl();
7 | return intl.formatMessage(labels.cancel);
8 | }
9 |
--------------------------------------------------------------------------------
/src/packages/frontend/jupyter/insert-cell/types.ts:
--------------------------------------------------------------------------------
1 | // above/below means in between cells or at the bottom
2 | // "replace" is when calling inside CodeMirror
3 | // null: do not show
4 | export type Position = "above" | "below" | "replace" | null;
5 |
--------------------------------------------------------------------------------
/src/packages/util/consts/server_settings.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export const SERVER_SETTINGS_ENV_PREFIX = "COCALC_SETTING";
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/account/gravatar-url.ts:
--------------------------------------------------------------------------------
1 | import md5 from "md5";
2 |
3 | export default function gravatarUrl(email: string): string {
4 | return `https://www.gravatar.com/avatar/${md5(
5 | email.toLowerCase()
6 | )}?d=identicon&s=30`;
7 | }
8 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/elements/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export * from "./register";
7 | export * from "./types";
8 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/jupyter-editor/snippets/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { JupyterSnippets } from "./main";
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/jupyter/output-messages/mime-types/fallback.tsx:
--------------------------------------------------------------------------------
1 | import { STDERR_STYLE } from "../style";
2 |
3 | export default function FallbackHandler({ type }) {
4 | return MIME type {type} not supported
;
5 | }
6 |
--------------------------------------------------------------------------------
/src/packages/next/lib/api/is-post.ts:
--------------------------------------------------------------------------------
1 | export default function isPost(req, res): boolean {
2 | if (req?.method !== "POST") {
3 | res?.status(404).json({ message: "must use a POST request" });
4 | return false;
5 | }
6 | return true;
7 | }
8 |
--------------------------------------------------------------------------------
/src/packages/util/fill/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { fill } from "./fill";
7 | export { define, required } from "./define";
8 |
--------------------------------------------------------------------------------
/src/dev/laptop/util.py:
--------------------------------------------------------------------------------
1 | import os, json
2 |
3 | join = os.path.join
4 |
5 | def cmd(s):
6 | print(s)
7 | if os.system(s):
8 | raise RuntimeError
9 |
10 | def chdir():
11 | os.chdir(os.path.split(os.path.abspath(__file__))[0])
12 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/settings/types.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export interface SettingsObject {
7 | spell?: string;
8 | }
9 |
--------------------------------------------------------------------------------
/src/packages/frontend/project/settings/software-consts.ts:
--------------------------------------------------------------------------------
1 | import type { IconName } from "@cocalc/frontend/components/icon";
2 |
3 | // this is imported from nextjs and frontend. keep it clean.
4 | export const SOFTWARE_ENVIRONMENT_ICON: IconName = "hdd";
5 |
--------------------------------------------------------------------------------
/src/packages/next/lib/api/status.ts:
--------------------------------------------------------------------------------
1 | import { OkAPIOperation, SuccessfulAPIOperation } from "./schema/common";
2 |
3 | export const OkStatus: OkAPIOperation = { status: "ok" };
4 | export const SuccessStatus: SuccessfulAPIOperation = { status: "success" };
5 |
--------------------------------------------------------------------------------
/src/packages/server/conat/llm.ts:
--------------------------------------------------------------------------------
1 | import { init as init0, close } from "@cocalc/conat/llm/server";
2 | import { evaluate } from "@cocalc/server/llm/index";
3 |
4 | export async function init() {
5 | await init0(evaluate);
6 | }
7 |
8 | export { close };
9 |
--------------------------------------------------------------------------------
/src/packages/backend/jest.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('ts-jest').JestConfigWithTsJest} */
2 | module.exports = {
3 | preset: "ts-jest",
4 | testEnvironment: "node",
5 | setupFiles: ["./test/setup.js"],
6 | testMatch: ["**/?(*.)+(spec|test).ts?(x)"],
7 | };
8 |
--------------------------------------------------------------------------------
/src/packages/conat/socket/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | */
4 |
5 | export { ServerSocket } from "./server-socket";
6 | export { ConatSocketClient } from "./client";
7 | export { ConatSocketServer } from "./server";
8 | export type { SocketConfiguration } from "./util";
9 |
--------------------------------------------------------------------------------
/src/packages/frontend/admin/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | // Official interface for the Admin Page
7 |
8 | export { AdminPage } from "./page";
9 |
--------------------------------------------------------------------------------
/src/packages/frontend/components/math/util.ts:
--------------------------------------------------------------------------------
1 |
2 | export function replaceMathBracketDelims(data: string): string {
3 | return data
4 | .replace(/\\\[/g, "$$")
5 | .replace(/\\\]/g, "$$")
6 | .replace(/\\\(/g, "$")
7 | .replace(/\\\)/g, "$");
8 | }
--------------------------------------------------------------------------------
/src/packages/jupyter/util/misc.test.ts:
--------------------------------------------------------------------------------
1 | import expect from "expect";
2 | import { times_n } from "./misc";
3 |
4 | describe("test times_n", () => {
5 | it("does what it is supposed to do", () => {
6 | expect(times_n("x", 3)).toBe("xxx");
7 | });
8 | });
9 |
--------------------------------------------------------------------------------
/src/packages/project/jest.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('ts-jest').JestConfigWithTsJest} */
2 | module.exports = {
3 | preset: 'ts-jest',
4 | testEnvironment: 'node',
5 | setupFiles: ["./test/setup.js"],
6 | testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
7 | };
8 |
--------------------------------------------------------------------------------
/src/packages/server/mentions/types.ts:
--------------------------------------------------------------------------------
1 | export interface Key {
2 | project_id: string;
3 | path: string;
4 | time: Date;
5 | target: string;
6 | fragment_id?: string;
7 | }
8 |
9 | export type Action = "ignore" | "notify" | "email" | "nothing";
10 |
--------------------------------------------------------------------------------
/src/packages/static/.swcrc:
--------------------------------------------------------------------------------
1 | {
2 | "jsc": {
3 | "parser": {
4 | "syntax": "typescript",
5 | "tsx": true,
6 | "decorators": false,
7 | "dynamicImport": true
8 | },
9 | "target": "es2017"
10 | },
11 | "minify": true
12 | }
--------------------------------------------------------------------------------
/src/packages/frontend/admin/users/project-search.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | /*
7 | Searching across all cocalc projects via various criteria
8 | */
9 |
--------------------------------------------------------------------------------
/src/packages/static/src/index.ts:
--------------------------------------------------------------------------------
1 | // Return the absolute path to the built static files, so they can be served
2 | // up by some static webserver.
3 |
4 | import { resolve, join } from "path";
5 |
6 | export const path = resolve(join(__dirname, "..", "..", "dist"));
7 |
--------------------------------------------------------------------------------
/src/packages/util/consts/tracking.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2025 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | // Cookie name for analytics tracking
7 | export const ANALYTICS_COOKIE_NAME = "CC_ANA";
8 |
--------------------------------------------------------------------------------
/src/packages/util/stripe/name.ts:
--------------------------------------------------------------------------------
1 | import { trunc_middle } from "@cocalc/util/misc";
2 |
3 | export default function stripeName(
4 | firstName: string,
5 | lastName: string
6 | ): string {
7 | return trunc_middle(`${firstName ?? ""} ${lastName ?? ""}`, 200);
8 | }
9 |
--------------------------------------------------------------------------------
/src/packages/api-client/src/urls.ts:
--------------------------------------------------------------------------------
1 | import { apiServer } from "@cocalc/backend/data";
2 |
3 | export function siteUrl(path: string): string {
4 | if (!apiServer) {
5 | throw Error("API_SERVER must be specified");
6 | }
7 | return `${apiServer}/${path}`;
8 | }
9 |
--------------------------------------------------------------------------------
/src/packages/conat/service/index.ts:
--------------------------------------------------------------------------------
1 | export type {
2 | ServiceDescription,
3 | CallConatServiceFunction,
4 | ServiceCall,
5 | CreateConatServiceFunction,
6 | ConatService,
7 | } from "./service";
8 | export { callConatService, createConatService } from "./service";
9 |
--------------------------------------------------------------------------------
/src/packages/frontend/support/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { ShowSupportLink } from "./link";
7 | export { SupportTickets } from "./tickets";
8 |
--------------------------------------------------------------------------------
/src/packages/sync/editor/db/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { SyncDB } from "./sync";
7 | export type { SyncDBOpts, SyncDBOpts0 } from "./sync";
8 |
--------------------------------------------------------------------------------
/src/smc_sagews/smc_sagews/tests/a.sage:
--------------------------------------------------------------------------------
1 | def f1(arg, *args, **kwargs):
2 | print 'f1 arg = %r'%arg
3 | for count,v in enumerate(args):
4 | print 'f1 *args',count,v
5 | for k,v in kwargs.items():
6 | print 'f1 **kwargs',k,v
7 | print "test f1 1"
8 |
--------------------------------------------------------------------------------
/src/packages/api-client/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": "./",
5 | "outDir": "dist"
6 | },
7 | "exclude": ["node_modules", "dist", "test"],
8 | "references": [{ "path": "../backend" }]
9 | }
10 |
--------------------------------------------------------------------------------
/src/packages/frontend/admin/users/project.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | /*
7 | Display of basic information about a project, with link to open that project
8 | */
9 |
--------------------------------------------------------------------------------
/src/packages/util/consts/llm.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2025 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | // the conat store name for LLM prompt history
7 | export const CONAT_LLM_HISTORY_KEY = "llm-history";
8 |
--------------------------------------------------------------------------------
/src/packages/frontend/components/run-button/api.ts:
--------------------------------------------------------------------------------
1 | import { join } from "path";
2 | import apiClient from "@cocalc/frontend/client/api";
3 |
4 | export default async function api(endpoint: string, args?: object) {
5 | return await apiClient(join("jupyter", endpoint), args);
6 | }
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/x11-editor/theme.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export const TAB_BAR_GREY = "#eee";
7 |
8 | export const TAB_BAR_BLUE = "#458ac9";
9 |
--------------------------------------------------------------------------------
/src/packages/frontend/misc/README.md:
--------------------------------------------------------------------------------
1 | # frontend/misc
2 |
3 | Code is here mostly **only** we haven't yet thought of a better place to put
4 | it. Optimally this directory would not exist.
5 |
6 | One observation: this is mostly NOT misc React components, as those are in `components`.
--------------------------------------------------------------------------------
/src/packages/static/rspack.config.js:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | const getConfig = require("./dist-ts/src/rspack.config").default;
7 |
8 | module.exports = getConfig();
9 |
--------------------------------------------------------------------------------
/src/packages/static/src/nothing.test.tsx:
--------------------------------------------------------------------------------
1 | import { render, screen } from "@testing-library/react";
2 |
3 | test("trivial test to get the ball rolling", () => {
4 | render(Hello
);
5 | // @ts-ignore
6 | expect(screen.getByText("Hello")).toBeInTheDocument();
7 | });
8 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/generic/jquery-plugins.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import "jquery";
7 |
8 | declare global {
9 | interface JQuery {}
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/markdown-editor/slate.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { EditableMarkdown } from "@cocalc/frontend/editors/slate/editable-markdown";
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/users/types.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export type UserMap = any;
7 |
8 | export interface UsersState {
9 | user_map: UserMap;
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/webapp-client.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import "./client/handle-target";
7 |
8 | export { WebappClient, webapp_client } from "./client/client";
9 |
--------------------------------------------------------------------------------
/src/packages/project/project-info/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { get_ProjectInfoServer } from "./project-info";
7 | export { ProjectInfoServer } from "./server"
8 |
--------------------------------------------------------------------------------
/src/packages/assets/threejs/README.salvus:
--------------------------------------------------------------------------------
1 | wget http://threejs.org/examples/js/controls/OrbitControls.js
2 | wget http://threejs.org/examples/js/renderers/CanvasRenderer.js
3 | wget http://threejs.org/examples/js/renderers/Projector.js
4 | wget http://threejs.org/examples/js/Detector.js
5 |
6 |
--------------------------------------------------------------------------------
/src/packages/database/jest.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('ts-jest').JestConfigWithTsJest} */
2 | module.exports = {
3 | preset: "ts-jest",
4 | testEnvironment: "node",
5 | setupFiles: ["./test/setup.js"], // Path to your setup file
6 | testMatch: ["**/?(*.)+(spec|test).ts?(x)"],
7 | };
8 |
--------------------------------------------------------------------------------
/src/packages/database/postgres/site-license/const.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | // some queries might take longer – give them a couple of minutes
7 | export const TIMEOUT_S = 300;
8 |
--------------------------------------------------------------------------------
/src/packages/file-server/jest.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('ts-jest').JestConfigWithTsJest} */
2 | module.exports = {
3 | preset: "ts-jest",
4 | testEnvironment: "node",
5 | setupFiles: ["./test/setup.js"],
6 | testMatch: ["**/?(*.)+(spec|test).ts?(x)"],
7 | maxConcurrency: 1,
8 | };
9 |
--------------------------------------------------------------------------------
/src/packages/frontend/components/data-grid/README.md:
--------------------------------------------------------------------------------
1 | As part of the CRM system, I've been developing some nice
2 | scalable "data grid" functionality on top of react-virtuoso
3 | and antd. I'm refactoring some of that code out here, so it
4 | can be useful in other places, e.g., viewing csv data.
--------------------------------------------------------------------------------
/src/packages/frontend/compute/index.ts:
--------------------------------------------------------------------------------
1 | import ComputeServers, { Docs } from "./compute-servers";
2 | export { ComputeServers };
3 | export { Docs as ComputeServerDocs };
4 | export { computeServersEnabled, cloudFilesystemsEnabled } from "./config";
5 |
6 | import "./cloud-filesystem/api";
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/crm-editor/views/views.css:
--------------------------------------------------------------------------------
1 |
2 | .cocalc-crm-views-resizer {
3 | cursor: ew-resize;
4 | width: 10px;
5 | height: 100%;
6 | margin-right: -6px;
7 | }
8 |
9 | .cocalc-crm-views-resizer:hover {
10 | border-right: 6px solid #428bca;
11 | }
12 |
--------------------------------------------------------------------------------
/src/packages/frontend/project/explorer/file-listing/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { FileListing } from "./file-listing";
7 | export { TERM_MODE_CHAR } from "./utils";
8 |
--------------------------------------------------------------------------------
/src/packages/project/browser-websocket/eval-code.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export async function eval_code(code: string): Promise {
7 | return await eval(code);
8 | }
9 |
--------------------------------------------------------------------------------
/src/packages/server/jest.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('ts-jest').JestConfigWithTsJest} */
2 | module.exports = {
3 | preset: "ts-jest",
4 | testEnvironment: "node",
5 | setupFiles: ["./test/setup.js"], // Path to your setup file
6 | testMatch: ["**/?(*.)+(spec|test).ts?(x)"],
7 | };
8 |
--------------------------------------------------------------------------------
/src/packages/sync/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": "./",
5 | "outDir": "dist"
6 | },
7 | "exclude": ["node_modules", "dist", "test"],
8 | "references": [{ "path": "../util" }, { "path": "../conat" }]
9 | }
10 |
--------------------------------------------------------------------------------
/src/python/cocalc-api/pytest.ini:
--------------------------------------------------------------------------------
1 | [tool:pytest]
2 | testpaths = tests
3 | python_files = test_*.py
4 | python_classes = Test*
5 | python_functions = test_*
6 | markers =
7 | integration: marks tests as integration tests (require live server)
8 | addopts =
9 | -v
10 | --tb=short
--------------------------------------------------------------------------------
/src/packages/frontend/misc/commands.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | // collecting all commands calling smc_pyutil
7 |
8 | export const JUPYTER_CLASSIC_OPEN = "cc-jupyter-classic-open";
9 |
--------------------------------------------------------------------------------
/src/python/cocalc-api/pyrightconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "include": [
3 | "src",
4 | "tests"
5 | ],
6 | "extraPaths": [
7 | "src"
8 | ],
9 | "venvPath": ".",
10 | "venv": ".venv",
11 | "pythonVersion": "3.12",
12 | "typeCheckingMode": "basic"
13 | }
--------------------------------------------------------------------------------
/src/.claude/commands/frontend.md:
--------------------------------------------------------------------------------
1 | # frontend
2 |
3 | Build the frontend code for development, after changing files in the frontend package. This is done by compiling the static package in dev mode.
4 |
5 | Run this command:
6 |
7 | ```bash
8 | cd packages/static && pnpm build-dev
9 | ```
10 |
--------------------------------------------------------------------------------
/src/compute/compute/dev/1-websocketfs.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -v
4 |
5 | . env.sh
6 |
7 | fusermount -uz $UNIONFS_LOWER 2>/dev/null || true
8 |
9 |
10 | export PROJECT_HOME=$UNIONFS_LOWER
11 | unset UNIONFS_LOWER
12 | unset UNIONFS_UPPER
13 |
14 | node ./start-filesystem.js
15 |
--------------------------------------------------------------------------------
/src/dev/smc/conf/cloud.sagemath.com/push_conf_cron:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | . /home/salvus/.ssh/agent
4 |
5 | # from http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
6 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
7 |
8 | $DIR/push_conf.py
9 |
--------------------------------------------------------------------------------
/src/packages/frontend/projects/index.ts:
--------------------------------------------------------------------------------
1 | import { init as init_store } from "./store";
2 | import { init as init_actions } from "./actions";
3 | import { init as init_table } from "./table";
4 |
5 | export function init() {
6 | init_store();
7 | init_actions();
8 | init_table();
9 | }
10 |
--------------------------------------------------------------------------------
/src/packages/util/consts/invites.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 |
7 | // frontend and backend (in courses) limit sending emails to the same account
8 | export const RESEND_INVITE_INTERVAL_DAYS = 1
--------------------------------------------------------------------------------
/src/scripts/time_test:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | import sys, time, os
3 |
4 | i = 0
5 | while True:
6 | t = time.time()
7 | time.sleep(.1)
8 | if time.time() - t > 0.15:
9 | i += 1
10 | os.system('date')
11 | print(i)
12 | sys.stdout.flush()
13 |
--------------------------------------------------------------------------------
/src/packages/backend/bin/conat-watch.cjs:
--------------------------------------------------------------------------------
1 | const { conat } = require('@cocalc/backend/conat')
2 |
3 | async function main() {
4 | const subject = process.argv[2] ?? '>';
5 | console.log("watching ", {subject})
6 | const cn = await conat()
7 | cn.watch(subject)
8 | }
9 |
10 | main();
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/app/README.md:
--------------------------------------------------------------------------------
1 | This is the REDUX store and actions for the overall top-level Application Page.
2 |
3 | It handles the layout, controls what tabs are visible, and generally ties
4 | everything together.
5 |
6 | NOTE: It might make more sense if this directory was called `page`?
7 |
8 |
--------------------------------------------------------------------------------
/src/packages/backend/conat/index.ts:
--------------------------------------------------------------------------------
1 | import getLogger from "@cocalc/backend/logger";
2 | import { setConatClient } from "@cocalc/conat/client";
3 | import { conat } from "./conat";
4 |
5 | export { conat };
6 |
7 | export function init() {
8 | setConatClient({ conat, getLogger });
9 | }
10 | init();
11 |
--------------------------------------------------------------------------------
/src/packages/conat/project/api/sync.ts:
--------------------------------------------------------------------------------
1 | export const sync = {
2 | close: true,
3 | // projectInfo: true,
4 |
5 | // x11: true,
6 | // synctableChannel: true,
7 | // symmetricChannel: true,
8 | };
9 |
10 | export interface Sync {
11 | close: (path: string) => Promise;
12 | }
13 |
--------------------------------------------------------------------------------
/src/packages/frontend/codemirror/static.js:
--------------------------------------------------------------------------------
1 | /*
2 | Codemirror suitable for server side rendering and static use.
3 | Also works on the frontend fine.
4 |
5 | Just load enough for modes.
6 | */
7 |
8 | import CodeMirror from "./codemirror";
9 | import "./modes";
10 |
11 | export default CodeMirror;
12 |
--------------------------------------------------------------------------------
/src/packages/frontend/collaborators/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { AddCollaborators } from "./add-collaborators";
7 | export { CurrentCollaboratorsPanel } from "./current-collabs";
8 |
--------------------------------------------------------------------------------
/src/packages/jupyter/redux/sync.ts:
--------------------------------------------------------------------------------
1 | export const SYNCDB_OPTIONS = {
2 | change_throttle: 50, // our UI/React can handle more rapid updates; plus we want output FAST.
3 | patch_interval: 50,
4 | primary_keys: ["type", "id"],
5 | string_cols: ["input"],
6 | cursors: true,
7 | persistent: true,
8 | };
9 |
--------------------------------------------------------------------------------
/src/packages/util/consts/dedicated.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { join } from "path";
7 |
8 | export const ROOT = join("/", "local");
9 | export const HOME_PREFIX = "disks";
10 |
11 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Reporting a Vulnerability
4 |
5 | Please report suspected security vulnerabilities to [security@cocalc.com](mailto:security@cocalc.com) or draft a [security advisory](https://github.com/sagemathinc/cocalc/security/advisories/new)
6 |
7 | We do not offer a bug bounty program.
8 |
--------------------------------------------------------------------------------
/src/packages/frontend/jupyter/history-actions.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | const { Actions } = require("../app-framework"); // TODO: import types
7 |
8 | export class HistoryActions extends Actions {}
9 |
--------------------------------------------------------------------------------
/src/packages/frontend/landing-page/hub-landing.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | // This is used by the hub-landing server:
7 | import ReactDOMServer from "react-dom/server";
8 | export { ReactDOMServer };
9 |
--------------------------------------------------------------------------------
/src/packages/next/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 |
5 | // NOTE: This file should not be edited
6 | // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
7 |
--------------------------------------------------------------------------------
/src/packages/util/terminal/names.ts:
--------------------------------------------------------------------------------
1 | import { aux_file } from "@cocalc/util/misc";
2 |
3 | export function termPath({
4 | path,
5 | number,
6 | cmd,
7 | }: {
8 | path: string;
9 | number: number;
10 | cmd?: string;
11 | }) {
12 | return aux_file(`${path}-${number}${cmd ?? ""}`, "term");
13 | }
14 |
--------------------------------------------------------------------------------
/src/dev/minimal/util.py:
--------------------------------------------------------------------------------
1 | from __future__ import print_function
2 |
3 | import os, json, socket
4 |
5 | join = os.path.join
6 |
7 | def cmd(s):
8 | print(s)
9 | if os.system(s):
10 | raise RuntimeError
11 |
12 | def chdir():
13 | os.chdir(os.path.split(os.path.abspath(__file__))[0])
14 |
15 |
--------------------------------------------------------------------------------
/src/packages/next/components/billing/consts.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export const MainPages = ["cards", "subscriptions", "receipts"] as const;
7 | export type MainPagesType = typeof MainPages[number];
8 |
--------------------------------------------------------------------------------
/src/packages/next/lib/use-customize.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { useCustomize, CustomizeType } from "./customize";
7 | export default useCustomize;
8 |
9 | export type { CustomizeType };
10 |
--------------------------------------------------------------------------------
/src/packages/static/src/app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/packages/sync-client/lib/cookies.ts:
--------------------------------------------------------------------------------
1 | import * as cookie from "cookie";
2 |
3 | export function toCookieHeader(obj: object): string {
4 | const pairs: string[] = [];
5 |
6 | for (const key in obj) {
7 | pairs.push(cookie.serialize(key, obj[key]));
8 | }
9 |
10 | return pairs.join("; ");
11 | }
12 |
--------------------------------------------------------------------------------
/src/packages/util/compute/images.ts:
--------------------------------------------------------------------------------
1 | // Return the default proxy.json config object for the given image.
2 | // This uses the "defaults" image if proxy isn't explicitly defined.
3 |
4 | export function defaultProxyConfig({ IMAGES, image }) {
5 | return IMAGES?.[image]?.proxy ?? IMAGES?.["defaults"]?.proxy ?? [];
6 | }
7 |
--------------------------------------------------------------------------------
/src/packages/frontend/account/dates.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export const show_announce_start = new Date("2018-08-19T00:00:00.000Z");
7 | export const show_announce_end = new Date("2018-08-28T00:00:00.000Z");
8 |
--------------------------------------------------------------------------------
/src/packages/frontend/notifications/init.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { init as init_mentions } from "./mentions/init";
7 |
8 | export function init(redux) {
9 | init_mentions(redux);
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/next/components/store/types.ts:
--------------------------------------------------------------------------------
1 | export const StorePages = [
2 | "site-license",
3 | "course",
4 | "boost",
5 | "dedicated",
6 | "cart",
7 | "checkout",
8 | "processing",
9 | "vouchers",
10 | "congrats",
11 | ] as const;
12 |
13 | export type StorePagesTypes = (typeof StorePages)[number];
14 |
--------------------------------------------------------------------------------
/src/packages/project/jupyter/init.ts:
--------------------------------------------------------------------------------
1 | /*
2 | Initialize some functionality related to using Jupyter in a cocalc project.
3 | */
4 |
5 | import { nbconvert } from "./convert";
6 | import { initNbconvert } from "@cocalc/jupyter/kernel";
7 |
8 | export default function init() {
9 | initNbconvert(nbconvert);
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/server/conat/api/purchases.ts:
--------------------------------------------------------------------------------
1 | import getBalance from "@cocalc/server/purchases/get-balance";
2 | import getMinBalance0 from "@cocalc/server/purchases/get-min-balance";
3 |
4 | export { getBalance };
5 |
6 | export async function getMinBalance({ account_id }) {
7 | return await getMinBalance0(account_id);
8 | }
9 |
--------------------------------------------------------------------------------
/src/packages/comm/README.md:
--------------------------------------------------------------------------------
1 | Support code for communication, mainly between the project and the frontend app.
2 |
3 | Motivation: we need to break the circular dependency between the project and the
4 | frontend, so we need a new place to put such code, which can't depend on either
5 | package, but may depend on several other packages.
--------------------------------------------------------------------------------
/src/packages/frontend/project/new/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { ProjectNew } from "./project-new";
7 | export { PathLink } from "./path-link";
8 | export { FileTypeSelector } from "./file-type-selector";
9 |
--------------------------------------------------------------------------------
/src/packages/next/components/misc/anonymous.tsx:
--------------------------------------------------------------------------------
1 | import A from "components/misc/A";
2 |
3 | export default function Anonymous() {
4 | return (
5 |
8 | );
9 | }
10 |
--------------------------------------------------------------------------------
/src/packages/frontend/components/data-grid/grid.css:
--------------------------------------------------------------------------------
1 | .cocalc-data-grid-column-resizer {
2 | cursor: ew-resize;
3 | position: absolute;
4 | width: 10px;
5 | right: 0;
6 | top: 0;
7 | bottom: 0;
8 | height: 100%;
9 | }
10 |
11 | .cocalc-data-grid-column-resizer:hover {
12 | border-right: 6px solid #428bca;
13 | }
14 |
--------------------------------------------------------------------------------
/src/packages/frontend/purchases/payg-page.tsx:
--------------------------------------------------------------------------------
1 | import AllQuotasConfig from "./all-quotas-config";
2 | import AutomaticPayments from "./automatic-payments";
3 |
4 | export default function PurchasesPage() {
5 | return (
6 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/src/smc_pyutil/smc_pyutil/bin/cocalc-python3-clean:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | # run python3 in a "clean" way
3 | # the main purpose is to avoid user-installed python packages to break anything
4 |
5 | unset PYTHONPATH
6 | unset PYTHONHOME
7 | unset PYTHON_EGG_CACHE
8 | unset SAGE_ROOT
9 | unset LD_LIBRARY_PATH
10 | python3 -s "$@"
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/account/_account.sass:
--------------------------------------------------------------------------------
1 | // Account page styles
2 |
3 | .account-menu-inline-collapsed
4 | .ant-menu-item,
5 | .ant-menu-submenu-title
6 | padding-inline: 0px
7 | text-align: center
8 |
9 | .ant-menu-submenu-title
10 | padding-right: 20px
11 |
12 | .ant-menu-submenu-arrow
13 | right: 5px
14 |
--------------------------------------------------------------------------------
/src/packages/frontend/components/README.md:
--------------------------------------------------------------------------------
1 | # frontend/components
2 |
3 | These are general purpose React components that are used all over CoCalc. Of
4 | course, there are many React components (e.g., for specific editors) that
5 | are not in this subdirectory.
6 |
7 | The code here would probably be better divided up into more subdirectories...
--------------------------------------------------------------------------------
/src/packages/frontend/course/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export {
7 | useStudentProjectFunctionality,
8 | getStudentProjectFunctionality,
9 | } from "./configuration/customize-student-project-functionality";
10 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/format/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { withAutoFormat } from "./auto-format";
7 | export { formatAction } from "./commands";
8 |
9 | import "./format-text"; // plugin
10 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/task-editor/NOTE.md:
--------------------------------------------------------------------------------
1 | This is a work in progress, where I'm rewriting each component of @cocalc/frontend/tasks/ from coffeescript to typescript here, then importing it from here.
2 |
3 | When done the directory @cocalc/frontend/tasks/ will disappear.
4 |
5 | In addition, I'll add frame editor support for tasks here.
--------------------------------------------------------------------------------
/src/packages/frontend/purchases/statement.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | Your most recent monthly statement and payment status.
3 | */
4 |
5 | import Statements from "./statements";
6 |
7 | export default function Statement() {
8 | return (
9 |
10 |
11 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/src/packages/sync-client/lib/version-cookie.ts:
--------------------------------------------------------------------------------
1 | import { versionCookieName } from "@cocalc/util/consts";
2 | import base_path from "@cocalc/backend/base-path";
3 | import { version } from "@cocalc/util/smc-version";
4 |
5 | export default function versionCookie(): object {
6 | return { [versionCookieName(base_path)]: `${version}` };
7 | }
8 |
--------------------------------------------------------------------------------
/src/packages/frontend/codemirror/init.js:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | require("./codemirror");
7 | require("./modes");
8 | require("./addons");
9 | require("./keymaps");
10 | require("./css");
11 | require("./extensions");
12 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/crm-editor/views/retention/util.ts:
--------------------------------------------------------------------------------
1 | import dayjs from "dayjs";
2 |
3 | export function startOfDayUTC(d): Date {
4 | const date = dayjs(d).toDate();
5 | const year = date.getFullYear();
6 | const month = date.getMonth();
7 | const day = date.getDate();
8 | return new Date(Date.UTC(year, month, day));
9 | }
--------------------------------------------------------------------------------
/src/packages/next/components/landing/latex.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import mathToHtml from "@cocalc/frontend/misc/math-to-html";
3 |
4 | const LaTeX = React.memo(() => {
5 | const { __html } = mathToHtml("\\LaTeX", true);
6 | return ;
7 | });
8 |
9 | export default LaTeX;
10 |
--------------------------------------------------------------------------------
/src/packages/server/accounts/profile/types.ts:
--------------------------------------------------------------------------------
1 | export interface Profile {
2 | account_id: string;
3 | first_name: string;
4 | last_name: string;
5 | color?: string;
6 | image?: string;
7 | name?: string;
8 | is_admin?: boolean;
9 | is_partner?: boolean;
10 | is_anonymous?: boolean;
11 | email_address?: string;
12 | }
13 |
--------------------------------------------------------------------------------
/src/packages/backend/misc/async-utils-node.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { readFile, unlink } from "node:fs/promises";
7 | import { pathExists } from "fs-extra";
8 |
9 | export { readFile, unlink, pathExists as exists };
10 |
--------------------------------------------------------------------------------
/src/packages/backend/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"],
5 | "lib": ["es7"],
6 | "rootDir": "./",
7 | "outDir": "dist"
8 | },
9 | "exclude": ["node_modules", "dist", "test"],
10 | "references": [{ "path": "../util", "path": "../conat" }]
11 | }
12 |
--------------------------------------------------------------------------------
/src/packages/comm/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": "./",
5 | "outDir": "dist"
6 | },
7 | "exclude": ["node_modules", "dist", "test"],
8 | "references": [
9 | { "path": "../sync" },
10 | { "path": "../jupyter" },
11 | { "path": "../util" },
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/task-editor/store.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { Store } from "../../app-framework";
7 | import type { TaskState } from "./types";
8 |
9 | export class TaskStore extends Store {}
10 |
--------------------------------------------------------------------------------
/src/scripts/projects-top-size:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # this script tabulates the top N projects by their disk usage
3 |
4 | N=${1:-50}
5 |
6 | echo "Calculating disk usage of all projects and then reporting the top $N:"
7 |
8 | sudo find /projects -maxdepth 1 -type d -print0 | sudo ionice -c 3 parallel --eta -q0 -j4 du -sh | sort -h | tail -$N
9 |
--------------------------------------------------------------------------------
/src/smc_pyutil/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include smc_pyutil/templates/linux/default.*
2 | include smc_pyutil/templates/linux/bashrc
3 | include smc_pyutil/templates/linux/bash_profile
4 | include smc_pyutil/templates/darwin/default.*
5 | include smc_pyutil/templates/darwin/bashrc
6 | include smc_pyutil/templates/darwin/bash_profile
7 | include fastentrypoints.py
8 |
--------------------------------------------------------------------------------
/src/packages/frontend/app-framework/toggle-hook.ts:
--------------------------------------------------------------------------------
1 | import { useState } from "react";
2 |
3 | // This is a simple boolean toggle.
4 | export default function useToggle(
5 | init: boolean = false
6 | ): [boolean, () => void] {
7 | const [val, setVal] = useState(init);
8 | const toggle = () => setVal(!val);
9 | return [val, toggle];
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/edit-bar/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export * from "./component";
7 | export * from "./marks";
8 | export { useLinkURL } from "./link-url";
9 | export { useListProperties } from "./list";
10 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/slate-emojis/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MIT (same as slate uses https://github.com/ianstormtaylor/slate/blob/master/License.md)
4 | */
5 |
6 | // Adapted from my mentions plugin, which is next to this.
7 |
8 | export { useEmojis } from "./hook";
9 |
--------------------------------------------------------------------------------
/src/packages/frontend/project/page/utils.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2023 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export function shouldOpenFileInNewWindow(e?: React.MouseEvent) {
7 | if (e == null) return false;
8 | return e.ctrlKey || e.shiftKey || e.metaKey;
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/src/packages/next/locales/common.sh:
--------------------------------------------------------------------------------
1 | LANGS="en es de zh ru fr it nl ja hi pt ko pl tr he hu ar br eu"
2 |
3 | check_api_key() {
4 | if [ -z "${SIMPLELOCALIZE_KEY_NEXT}" ]; then
5 | echo "Error: SIMPLELOCALIZE_KEY_NEXT is not set or is empty. Please provide a valid API key for the CoCalc Pages project." >&2
6 | exit 1
7 | fi
8 | }
9 |
--------------------------------------------------------------------------------
/src/packages/next/pages/features/openai-chatgpt.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import Redirect from "components/misc/redirect";
7 |
8 | export default function OpenAIChatGPT() {
9 | return ;
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/static/src/webapp-embed.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import "./webapp-libraries";
7 | import { init } from "@cocalc/frontend/embed";
8 | import { startedUp } from "./webapp-error";
9 |
10 | init();
11 | startedUp();
12 |
--------------------------------------------------------------------------------
/src/packages/util/types/store.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export type Date0 = Date | undefined;
7 |
8 | export type DateRangeType = [Date0, Date0];
9 |
10 | export type DateRangeOptional = [Date0 | undefined, Date0 | undefined];
11 |
--------------------------------------------------------------------------------
/src/packages/next/components/news/types.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2023 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { NewsItem } from "@cocalc/util/types/news";
7 |
8 | export interface NewsWithStatus extends NewsItem {
9 | future: boolean;
10 | expired?: boolean;
11 | }
12 |
--------------------------------------------------------------------------------
/src/packages/static/src/init-app-base-path.ts:
--------------------------------------------------------------------------------
1 | import { join } from "path";
2 | import { appBasePath } from "@cocalc/frontend/customize/app-base-path";
3 |
4 | // See https://webpack.js.org/guides/public-path/
5 | // and it's pretty cool this is supported!!
6 | declare var __webpack_public_path__: any;
7 | __webpack_public_path__ = join(appBasePath, "static/");
8 |
--------------------------------------------------------------------------------
/src/packages/static/src/webapp-cocalc.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import "./webapp-libraries";
7 | import { init } from "@cocalc/frontend/entry-point";
8 | import { startedUp } from "./webapp-error";
9 |
10 | init();
11 | startedUp();
12 |
--------------------------------------------------------------------------------
/src/python/cocalc-api/src/cocalc_api/mcp/__main__.py:
--------------------------------------------------------------------------------
1 | """
2 | Entry point for running the MCP server as a module.
3 |
4 | Usage:
5 | python -m cocalc_api.mcp
6 |
7 | Recommended usage (runs in local uv environment):
8 | uv run cocalc-mcp-server
9 | """
10 |
11 | from .server import main
12 |
13 | if __name__ == "__main__":
14 | main()
15 |
--------------------------------------------------------------------------------
/src/packages/sync/editor/README.md:
--------------------------------------------------------------------------------
1 | - generic: abstract base class for collaborative document editors, with history, attribution of who made changes, undo, etc., for building collaborative editors
2 |
3 | - string: editor where the underlying document being edited is a string
4 |
5 | - db: editor where underlying document is a relatively small in memory database
6 |
--------------------------------------------------------------------------------
/src/packages/assets/misc/talk-20121004/ui/default/opera.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | .slide {
7 | visibility: visible !important;
8 | position: static !important;
9 | page-break-before: always;
10 | }
11 | #slide0 {page-break-before: avoid;}
12 |
--------------------------------------------------------------------------------
/src/packages/conat/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": "./",
5 | "outDir": "dist"
6 | },
7 | "exclude": ["node_modules", "dist", "test"],
8 | "references_comment": "Do not define path:../comm because that causes a circular references.",
9 | "references": [{ "path": "../util" }]
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/i18n/types.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2024 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import {
7 | MessageFormatElement
8 | } from "react-intl";
9 |
10 |
11 | export type Messages =
12 | | Record
13 | | Record;
14 |
--------------------------------------------------------------------------------
/src/compute/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - api-client
3 | - backend
4 | - comm
5 | - jupyter
6 | - conat
7 | - project
8 | - sync
9 | - sync-fs
10 | - sync-client
11 | - util
12 | - terminal
13 | - compute
14 | - conat
15 |
16 | onlyBuiltDependencies:
17 | - '@cocalc/fuse-native'
18 | - websocket-sftp
19 | - websocketfs
20 |
21 |
--------------------------------------------------------------------------------
/src/packages/backend/bin/conat-persist.cjs:
--------------------------------------------------------------------------------
1 | /*
2 | run a persist server
3 | */
4 |
5 | const { conat } = require('@cocalc/backend/conat')
6 | require('@cocalc/backend/conat/persist');
7 | const {server} = require('@cocalc/conat/persist/server');
8 |
9 | async function main() {
10 | const client = await conat()
11 | server({client});
12 | }
13 |
14 | main();
15 |
--------------------------------------------------------------------------------
/src/packages/database/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": "./",
5 | "outDir": "./dist",
6 | "lib": ["ESNext"]
7 | },
8 | "exclude": ["node_modules", "dist"],
9 | "references": [
10 | { "path": "../backend" },
11 | { "path": "../conat" },
12 | { "path": "../util" }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/src/packages/frontend/admin/site-settings/types.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export type State = "load" | "edit" | "save" | "error";
7 |
8 | export type Data = { [name: string]: string };
9 |
10 | export type IsReadonly = { [name: string]: boolean };
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/jupyter/output-messages/mime-types/simple-markdown.tsx:
--------------------------------------------------------------------------------
1 | import register from "./register";
2 | import Markdown from "@cocalc/frontend/editors/slate/static-markdown";
3 |
4 | register("text/markdown", 4, ({ value }) => {
5 | return (
6 |
7 |
8 |
9 | );
10 | });
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/notifications/mentions/util.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import type { IconName } from "@cocalc/frontend/components/icon";
7 |
8 | export const REDUX_NAME = "mentions";
9 |
10 | export const BOOKMARK_ICON_NAME: IconName = "book";
11 |
--------------------------------------------------------------------------------
/src/packages/next/lib/account/get-account.ts:
--------------------------------------------------------------------------------
1 | // There's a ton of code that imports from this file, so just importing and exporting instead of changing all of that.
2 |
3 | // getAccount takes a req and returns the account_id, resolving either the api key or remember_me token.
4 |
5 | import getAccount from "@cocalc/server/auth/get-account";
6 | export default getAccount;
7 |
--------------------------------------------------------------------------------
/src/packages/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | # include all
3 | - "**"
4 | # but exclude cdn/dist since it is generated by npm as part of a
5 | # weird build system, and it totally messes up stuff.
6 | - "!**/cdn/dist/**"
7 | - "!compute"
8 | onlyBuiltDependencies:
9 | - better-sqlite3
10 | - websocket-sftp
11 | - websocketfs
12 | - zstd-napi
13 |
--------------------------------------------------------------------------------
/src/packages/util/types/callback.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2023 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | // Use this type to type the callback which is e.g. used in callback 2
7 | export type CB = (
8 | err?: E,
9 | result?: T
10 | ) => any;
11 |
--------------------------------------------------------------------------------
/src/compute/README.md:
--------------------------------------------------------------------------------
1 | # Compute PNPM Workspace Packages
2 |
3 | This is the code for external compute that gets added to cocalc from outside.
4 |
5 | It's in a different pnpm workspace directory since:
6 |
7 | - it's not needed internally as part of cocalc
8 | - some of the websocketfs functionality is difficult to build
9 | - we want this to be very lightweight
10 |
11 |
--------------------------------------------------------------------------------
/src/packages/conat/hub/api/purchases.ts:
--------------------------------------------------------------------------------
1 | import { authFirst } from "./util";
2 |
3 | export interface Purchases {
4 | getBalance: (opts?: { account_id?: string }) => Promise;
5 | getMinBalance: (opts?: { account_id?: string }) => Promise;
6 | }
7 |
8 | export const purchases = {
9 | getBalance: authFirst,
10 | getMinBalance: authFirst,
11 | };
12 |
--------------------------------------------------------------------------------
/src/packages/frontend/components/llm-plain-link.tsx:
--------------------------------------------------------------------------------
1 | import { LanguageModel, model2vendor } from "@cocalc/util/db-schema/llm-utils";
2 | import { modelToName } from "../frame-editors/llm/llm-selector";
3 | import { A } from "./A";
4 |
5 | export function LLMNameLink({ model }: { model: LanguageModel }) {
6 | return {modelToName(model)};
7 | }
8 |
--------------------------------------------------------------------------------
/src/packages/frontend/components/saving.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { Icon } from "./icon";
7 |
8 | export function Saving() {
9 | return (
10 |
11 | Saving...
12 |
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/slate-react/hooks/use-isomorphic-layout-effect.ts:
--------------------------------------------------------------------------------
1 | import { useLayoutEffect, useEffect } from "react";
2 |
3 | /**
4 | * Prevent warning on SSR (server side rendering) by falling back to useEffect when window is not defined
5 | */
6 | export const useIsomorphicLayoutEffect =
7 | typeof window !== "undefined" ? useLayoutEffect : useEffect;
8 |
--------------------------------------------------------------------------------
/src/packages/frontend/jupyter/output-messages/mime-types/simple-html.tsx:
--------------------------------------------------------------------------------
1 | import register from "./register";
2 | import HTML from "@cocalc/frontend/components/html-ssr";
3 |
4 | const Html = ({ value }) => {
5 | return (
6 |
7 |
8 |
9 | );
10 | };
11 |
12 | register("text/html", 3, Html);
13 |
--------------------------------------------------------------------------------
/src/packages/frontend/purchases/global-spend-limit.tsx:
--------------------------------------------------------------------------------
1 | export default function GlobalSpendLimit({ global }) {
2 | if (global == null) {
3 | return null;
4 | }
5 | const { quota, why, increase } = global;
6 | return (
7 |
8 | Global Spending Limit: {quota}
9 |
10 | {why}
11 | {increase}
12 |
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/src/packages/next/components/share/external-link.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export default function ExternalLink(props) {
7 | return (
8 |
9 | {props.children}
10 |
11 | );
12 | }
13 |
--------------------------------------------------------------------------------
/src/packages/static/src/rspack-compiler.ts:
--------------------------------------------------------------------------------
1 | import { rspack } from "@rspack/core";
2 | import getConfig from "./rspack.config";
3 |
4 | export function rspackCompiler() {
5 | if (process.env.NO_RSPACK_DEV_SERVER) {
6 | return undefined;
7 | }
8 | const config = getConfig({ middleware: true });
9 | // TODO -- typing!
10 | return rspack(config as any);
11 | }
12 |
--------------------------------------------------------------------------------
/src/python/cocalc-api/src/cocalc_api/mcp/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | CoCalc API MCP Server package.
3 |
4 | Provides Model Context Protocol (MCP) integration for CoCalc projects.
5 | Allows LLMs to interact with CoCalc through a standardized protocol.
6 |
7 | See DEVELOPMENT.md for architecture and design documentation.
8 | """
9 |
10 | __version__ = "0.1.0"
11 | __all__ = []
12 |
--------------------------------------------------------------------------------
/src/dev/single/start-hub:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | export USER=wstein
4 | export PATH=/usr/local/bin:$PATH
5 | export PGHOST='/home/wstein/postgres_data/socket'
6 |
7 |
8 | # If you put this in crontab be sure to explicitly set USER=...
9 |
10 | cd /home/wstein/smc/src
11 | . smc-env
12 |
13 | echo $PGHOST
14 | service_hub.py --host=localhost --single --update start
15 |
--------------------------------------------------------------------------------
/src/packages/database/postgres/schema/util.ts:
--------------------------------------------------------------------------------
1 | // Certain field aren't allowed without quoting in Postgres.
2 | // Also case sensitivity can be messed up by not quoting. So
3 | // we use this to quote.
4 | export function quoteField(field: string): string {
5 | if (field[0] === '"') {
6 | // already quoted
7 | return field;
8 | }
9 | return `"${field}"`;
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/compute/address.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | Not used yet, but planned.
3 | */
4 |
5 | import { redux } from "@cocalc/frontend/app-framework";
6 |
7 | export default function Address({ name }) {
8 | const dns = redux.getStore("customize")?.get("dns");
9 | if (!dns) return null;
10 | return (
11 |
12 | {name}.{dns}
13 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/elements/code-block/get-mermaid.ts:
--------------------------------------------------------------------------------
1 | let initialized = false;
2 | export default async function getMermaid(): Promise {
3 | const mermaid = (await import("mermaid")).default;
4 | if (!initialized) {
5 | mermaid.initialize({
6 | startOnLoad: false,
7 | });
8 | initialized = true;
9 | }
10 | return mermaid;
11 | }
12 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/slate-react/custom-types.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore -- typescript thinks this isn't used
2 | import { CustomTypes } from "slate";
3 |
4 | declare module "slate" {
5 | interface CustomTypes {
6 | // @ts-ignore -- typescript doesn't like the type of Text; I don't know why.
7 | Text: {
8 | placeholder: string;
9 | };
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/packages/frontend/jupyter/output-messages/mime-types/markdown.tsx:
--------------------------------------------------------------------------------
1 | import register from "./register";
2 | import StaticMarkdown from "@cocalc/frontend/editors/slate/static-markdown";
3 |
4 | register("text/markdown", 4, ({ value }) => {
5 | return (
6 |
7 |
8 |
9 | );
10 | });
11 |
12 |
--------------------------------------------------------------------------------
/src/packages/frontend/project/search/search.tsx:
--------------------------------------------------------------------------------
1 | import { ProjectSearchBody } from "./body";
2 |
3 | import { ProjectSearchHeader } from "./header";
4 |
5 | export const ProjectSearch: React.FC = () => {
6 | return (
7 |
11 | );
12 | };
13 |
--------------------------------------------------------------------------------
/src/packages/jupyter/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": "./",
5 | "outDir": "dist"
6 | },
7 | "exclude": ["node_modules", "dist", "test"],
8 | "references": [
9 | { "path": "../backend" },
10 | { "path": "../sync" },
11 | { "path": "../util" },
12 | { "path": "../conat" }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/src/packages/next/lib/base-path.ts:
--------------------------------------------------------------------------------
1 | // The basePath, as defined in CoCalc, so "/" is valid, but "" is not.
2 | // Note that in nextjs itself they define "" as a valid basePath, but not "/".
3 | // This is not part of customize, since it can't be changed at runtime
4 | // via the database.
5 |
6 | const basePath: string = process.env.BASE_PATH ?? "/";
7 |
8 | export default basePath;
9 |
--------------------------------------------------------------------------------
/src/packages/server/test/setup.js:
--------------------------------------------------------------------------------
1 | // test/setup.js
2 |
3 | // see packages/database/pool/pool.ts for where this name is also hard coded:
4 | process.env.PGDATABASE = "smc_ephemeral_testing_database";
5 |
6 | // checked for in some code to behave differently while running unit tests.
7 | process.env.COCALC_TEST_MODE = true;
8 |
9 | process.env.COCALC_MODE = "single-user";
10 |
--------------------------------------------------------------------------------
/src/packages/sync/editor/string/test/sync.offline.test.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | /*
7 | Test offline patches.
8 | */
9 |
10 | describe("Tests saving patches made when offline", () => {
11 | it("doesn't do it yet", () => {});
12 | });
13 |
14 | export {};
15 |
--------------------------------------------------------------------------------
/src/packages/next/components/misc.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { CSSProperties } from "react";
7 | export type CSS = CSSProperties;
8 |
9 | // just convenience
10 | import { Typography } from "antd";
11 | export const { Title, Paragraph, Text } = Typography;
12 |
--------------------------------------------------------------------------------
/src/compute/.npmrc:
--------------------------------------------------------------------------------
1 | # We have to hoist @ant-design/cssinjs since it is CRUCIAL that
2 | # the version we import in next/pages/_document.tsx is exactly the
3 | # same was what antd itself is using. I can't think of any other
4 | # way except for hoisting to ensure this, and of course antd doesn't
5 | # expose the module.
6 |
7 | public-hoist-pattern[]=*@ant-design/cssinjs*
8 | git-checks=false
9 |
--------------------------------------------------------------------------------
/src/packages/.npmrc:
--------------------------------------------------------------------------------
1 | # We have to hoist @ant-design/cssinjs since it is CRUCIAL that
2 | # the version we import in next/pages/_document.tsx is exactly the
3 | # same was what antd itself is using. I can't think of any other
4 | # way except for hoisting to ensure this, and of course antd doesn't
5 | # expose the module.
6 |
7 | public-hoist-pattern[]=*@ant-design/cssinjs*
8 | git-checks=false
9 |
--------------------------------------------------------------------------------
/src/packages/file-server/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"],
5 | "lib": ["es7"],
6 | "rootDir": "./",
7 | "outDir": "dist"
8 | },
9 | "exclude": ["node_modules", "dist", "test"],
10 | "references": [
11 | { "path": "../util", "path": "../conat", "path": "../backend" }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/crm-editor/views/json.tsx:
--------------------------------------------------------------------------------
1 | import StaticMarkdown from "@cocalc/frontend/editors/slate/static-markdown";
2 |
3 | interface Props {
4 | obj: object;
5 | }
6 |
7 | export default function Json({ obj }: Props) {
8 | return (
9 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/src/packages/frontend/project/page/flyouts/search.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2023 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { ProjectSearchBody } from "@cocalc/frontend/project/search/body";
7 |
8 | export function SearchFlyout({ wrap }) {
9 | return ;
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/util/types/index.ts:
--------------------------------------------------------------------------------
1 | /* Misc types that are used in frontends, backends, etc.
2 | */
3 |
4 | export type { DirectoryListingEntry } from "./directory-listing";
5 |
6 | export type { DatastoreConfig } from "./datastore";
7 |
8 | export type JSONValue =
9 | | string
10 | | number
11 | | boolean
12 | | null
13 | | { [key: string]: JSONValue }
14 | | JSONValue[];
15 |
--------------------------------------------------------------------------------
/src/packages/frontend/codemirror/addon/types.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export interface Pos {
7 | line: number;
8 | ch: number;
9 | }
10 |
11 | export interface ChangeObject {
12 | from: Pos;
13 | to: Pos;
14 | text: string[];
15 | next?: ChangeObject;
16 | }
17 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/frame-tree/config.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import type { IconName } from "@cocalc/frontend/components/icon";
7 |
8 | // the icon we use for formatting sources throughout the UI
9 | export const FORMAT_SOURCE_ICON : IconName = "sitemap";
10 |
--------------------------------------------------------------------------------
/src/packages/next/components/share/site-name.tsx:
--------------------------------------------------------------------------------
1 | import useCustomize from "lib/use-customize";
2 |
3 | export default function SiteName({ full }: { full?: boolean }) {
4 | const { siteName, siteDescription } = useCustomize();
5 | if (full) {
6 | return (
7 | <>
8 | {siteName}: {siteDescription}
9 | >
10 | );
11 | }
12 | return <>{siteName}>;
13 | }
14 |
--------------------------------------------------------------------------------
/src/packages/next/lib/share/share-url.ts:
--------------------------------------------------------------------------------
1 | import { encodePath } from "./raw-url";
2 | import { join } from "path";
3 |
4 | export default function shareURL(
5 | id: string,
6 | relativePath: string = ""
7 | ): string {
8 | // do NOT need base path since this is a link from the next server into itself.
9 | return join("/share", "public_paths", id, encodePath(relativePath));
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/project/project-info/utils.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { exec as cp_exec, spawn as cp_spawn } from "node:child_process";
7 | import { promisify } from "node:util";
8 | export const exec = promisify(cp_exec);
9 | export const spawn = promisify(cp_spawn);
10 |
--------------------------------------------------------------------------------
/src/packages/sync/editor/generic/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | exports.util = require("./util");
7 | exports.patch_value_cache = require("./patch-value-cache");
8 | exports.sorted_patch_list = require("./sorted-patch-list");
9 | exports.sync_doc = require("./sync-doc");
10 |
--------------------------------------------------------------------------------
/src/packages/util/consts/locale.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2024 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { LOCALE, DEFAULT_LOCALE, KEEP_EN_LOCALE } from "@cocalc/util/i18n";
7 | import type { Locale } from "@cocalc/util/i18n";
8 |
9 | export { LOCALE, DEFAULT_LOCALE, KEEP_EN_LOCALE };
10 | export type { Locale };
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/compute/cloud/google-cloud/accelerator.tsx:
--------------------------------------------------------------------------------
1 | export function displayAcceleratorType(acceleratorType, memory?) {
2 | let x = acceleratorType
3 | .replace("tesla-", "")
4 | .replace("nvidia-", "NVIDIA ")
5 | .replace("-", " - ")
6 | .toUpperCase();
7 | if (x.includes("GB") || !memory) {
8 | return x;
9 | }
10 | return `${x} - ${memory} GB`;
11 | }
12 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/crm-editor/tables/patches.ts:
--------------------------------------------------------------------------------
1 | import { register } from "./tables";
2 |
3 | register({
4 | name: "patches",
5 | title: "Patches",
6 | icon: "exchange",
7 | query: {
8 | crm_patches: [
9 | {
10 | string_id: null,
11 | time: null,
12 | patch: null,
13 | user_id: null,
14 | },
15 | ],
16 | },
17 | });
18 |
--------------------------------------------------------------------------------
/src/packages/frontend/project/warnings/common.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { CSSProperties } from "react";
7 |
8 | export const ALERT_STYLE: CSSProperties = Object.freeze({
9 | margin: "0px",
10 | border: "none",
11 | padding: "10px",
12 | fontSize: "13pt",
13 | });
14 |
--------------------------------------------------------------------------------
/src/packages/server/projects/get-title.ts:
--------------------------------------------------------------------------------
1 | import getPool from "@cocalc/database/pool";
2 |
3 | export default async function getTitle(project_id: string): Promise {
4 | const pool = getPool("long");
5 | const { rows } = await pool.query(
6 | "SELECT title FROM projects WHERE project_id=$1",
7 | [project_id]
8 | );
9 | return rows[0]?.title ?? "Untitled Project";
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/static/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "incremental": true,
5 | "rootDir": "./",
6 | "outDir": "../dist-ts/src",
7 | "sourceMap": true,
8 | "allowJs": true,
9 | "allowSyntheticDefaultImports": true,
10 | "moduleResolution": "node",
11 | "lib": ["es5", "es6", "es2017", "dom"]
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/packages/frontend/app-framework/syncdb/syncdb-context.ts:
--------------------------------------------------------------------------------
1 | import { createContext, useContext } from "react";
2 | import { SyncDB } from "@cocalc/sync/editor/db";
3 |
4 | interface Context {
5 | syncdb: SyncDB | null;
6 | }
7 |
8 | export const SyncdbContext = createContext({ syncdb: null });
9 |
10 | export function useSyncdbContext() {
11 | return useContext(SyncdbContext);
12 | }
13 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/markdown-to-slate/source.ts:
--------------------------------------------------------------------------------
1 | export default function getSource({
2 | start,
3 | end,
4 | lines,
5 | }: {
6 | start: number;
7 | end: number;
8 | lines: string[];
9 | }): string {
10 | let markdown = "\n" + lines.slice(start, end).join("\n") + "\n";
11 | markdown = markdown.replace(/^\n/, "").replace(/\n+$/, "") + "\n\n";
12 | return markdown;
13 | }
14 |
--------------------------------------------------------------------------------
/src/packages/frontend/notifications/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { NotificationPage } from "./notification-page";
7 | export { init } from "./init";
8 | export { MentionsActions } from "./mentions/actions";
9 | export { MentionsStore, MentionsState } from "./mentions/store";
10 |
--------------------------------------------------------------------------------
/src/packages/project/data.test.ts:
--------------------------------------------------------------------------------
1 | import * as data from "./data";
2 |
3 | test("some consistency checks on the data paths", () => {
4 | expect(data.infoJson).toMatch(/info.json$/);
5 | expect(data.hubPortFile).toMatch(/.port$/);
6 | expect(data.apiServerPortFile).toMatch(/.port$/);
7 | expect(data.browserPortFile).toMatch(/.port$/);
8 | expect(data.projectPidFile).toMatch(/.pid$/);
9 | });
10 |
--------------------------------------------------------------------------------
/src/packages/server/compute/maintenance/index.ts:
--------------------------------------------------------------------------------
1 | import { task as purchaseTask } from "./purchases";
2 | import { task as cloudTask } from "./cloud";
3 | import { tasks as storageTasks } from "./cloud-filesystem";
4 | import { deletedTask } from "./clean/deleted-projects";
5 |
6 | export const TASKS = [
7 | cloudTask,
8 | purchaseTask,
9 | deletedTask,
10 | ...storageTasks,
11 | ] as const;
12 |
--------------------------------------------------------------------------------
/src/packages/database/postgres/server-settings.ts:
--------------------------------------------------------------------------------
1 | import { AllSiteSettings } from "@cocalc/util/db-schema/types";
2 | import { callback2 } from "@cocalc/util/async-utils";
3 | import { db } from "@cocalc/database";
4 |
5 | // just to make this async friendly, that's all
6 | export async function get_server_settings(): Promise {
7 | return await callback2(db().get_server_settings_cached);
8 | }
9 |
--------------------------------------------------------------------------------
/src/packages/frontend/misc/window-globals.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | // see entry-point, and via this useful in all TS files
7 | declare global {
8 | interface Window {
9 | COCALC_FULLSCREEN: string | undefined;
10 | COCALC_MINIMAL: boolean;
11 | }
12 | }
13 |
14 | export {};
15 |
--------------------------------------------------------------------------------
/src/packages/frontend/project/page/flyouts/info.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2023 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { ProjectInfo } from "@cocalc/frontend/project/info";
7 |
8 | export function ProjectInfoFlyout({ project_id, wrap }) {
9 | return ;
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/purchases/payment-methods-page.tsx:
--------------------------------------------------------------------------------
1 | import { UseBalance } from "@cocalc/frontend/account/other-settings";
2 | import PaymentMethods from "./payment-methods";
3 |
4 | export default function PaymentsPage() {
5 | return (
6 |
11 | );
12 | }
13 |
--------------------------------------------------------------------------------
/src/packages/frontend/users/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | // Ensure the users actions, store and table are initialized:
7 | import "./actions";
8 | import "./store";
9 | import "./table";
10 |
11 | export { User } from "./user";
12 |
13 | export { recreate_users_table } from "./table";
14 |
--------------------------------------------------------------------------------
/src/packages/next/locales/misc.ts:
--------------------------------------------------------------------------------
1 | import type { Locale } from "@cocalc/util/i18n/const";
2 | export type { Locale };
3 |
4 | import { isLocale, LOCALE } from "@cocalc/util/i18n/const";
5 | export { isLocale, LOCALE };
6 |
7 | export function query2locale(query: { locale?: string | string[] }): Locale {
8 | const localeQuery = query.locale;
9 | return isLocale(localeQuery) ? localeQuery : "en";
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/project/browser-websocket/query.ts:
--------------------------------------------------------------------------------
1 | import { callback2 } from "@cocalc/util/async-utils";
2 |
3 | export default async function query(client, opts) {
4 | if (opts.changes) {
5 | // maybe they could be; however, there's no good use case (?).
6 | throw Error("changefeeds are not supported for api queries");
7 | }
8 | return await callback2(client.query.bind(client), opts);
9 | }
10 |
--------------------------------------------------------------------------------
/src/packages/project/conat/pubsub.ts:
--------------------------------------------------------------------------------
1 | import { connectToConat } from "./connection";
2 | import { PubSub } from "@cocalc/conat/sync/pubsub";
3 | import { project_id } from "@cocalc/project/data";
4 |
5 | export default function pubsub({
6 | path,
7 | name,
8 | }: {
9 | path?: string;
10 | name: string;
11 | }) {
12 | return new PubSub({ client: connectToConat(), project_id, path, name });
13 | }
14 |
--------------------------------------------------------------------------------
/src/packages/server/auth/tokens/get-requires-token.ts:
--------------------------------------------------------------------------------
1 | import getPool from "@cocalc/database/pool";
2 |
3 | export default async function getRequiresTokens(): Promise {
4 | const pool = getPool("long");
5 | const { rows } = await pool.query(
6 | "SELECT EXISTS(SELECT 1 FROM registration_tokens WHERE disabled IS NOT true) AS have_tokens"
7 | );
8 | return !!rows[0]?.have_tokens;
9 | }
10 |
--------------------------------------------------------------------------------
/src/packages/util/consts/bookmarks.ts:
--------------------------------------------------------------------------------
1 | // maximum number of stars per bookmark
2 | export const MAX_STARS = 256;
3 | // maximum length of strings in the stars string array
4 | export const MAX_LENGTH_STAR = 2048;
5 | // the type of bookmark for starring files
6 | export const STARRED_FILES = "starred-files";
7 | // the conat key for storing bookmarks
8 | export const CONAT_BOOKMARKS_KEY = "bookmark-starred-files";
9 |
--------------------------------------------------------------------------------
/src/packages/util/types/directory-listing.ts:
--------------------------------------------------------------------------------
1 | export interface DirectoryListingEntry {
2 | name: string;
3 | isdir?: boolean;
4 | issymlink?: boolean;
5 | link_target?: string; // set if issymlink is true and we're able to determine the target of the link
6 | size?: number; // bytes for file, number of entries for directory (*including* . and ..).
7 | mtime?: number;
8 | error?: string;
9 | }
10 |
--------------------------------------------------------------------------------
/src/packages/util/types/stripe.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2023 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | // used by next/v2 api
7 |
8 | export type InvoicesData = {
9 | data?: {
10 | id: string;
11 | lines?: { data: { description: string }[]; total_count?: number };
12 | hosted_invoice_url: string;
13 | }[];
14 | };
15 |
--------------------------------------------------------------------------------
/src/dev/smc/conf/cloud.sagemath.com/README.md:
--------------------------------------------------------------------------------
1 | web0, web1, web2 face the internet and proxy traffic to other nodes.
2 |
3 | This is the haproxy config to put on web0, web1, web2. Don't put it on web3 or higher! They don't even need to run haproxy, but you can have it there so you can directly connect to web3 for testing.
4 |
5 | CRITICAL: if web3 doesn't exist but the haproxy refers to it, then haproxy will not start. !!
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/crm-editor/tables/central-log.ts:
--------------------------------------------------------------------------------
1 | import { register } from "./tables";
2 |
3 | register({
4 | name: "central_log",
5 |
6 | title: "Central Log",
7 |
8 | icon: "blog",
9 |
10 | query: {
11 | central_log: [
12 | {
13 | id: null,
14 | event: null,
15 | value: null,
16 | time: null,
17 | },
18 | ],
19 | },
20 | });
21 |
--------------------------------------------------------------------------------
/src/packages/frontend/notifications/mentions/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | export { init } from "./init";
7 | export { MentionRow } from "./mention-row";
8 | export { MentionsActions } from "./actions";
9 | export { MentionsStore } from "./store";
10 | export { MentionsTable } from "./table";
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/purchases/subscriptions-util.tsx:
--------------------------------------------------------------------------------
1 | import { Tag } from "antd";
2 | import { capitalize } from "@cocalc/util/misc";
3 | import { STATUS_TO_COLOR } from "@cocalc/util/db-schema/subscriptions";
4 |
5 | export function SubscriptionStatus({ status }) {
6 | return (
7 |
8 | {capitalize(status.replace("_", " "))}
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/src/dev/minimal/README.md:
--------------------------------------------------------------------------------
1 | # **This is DEPRECATED!**
2 |
3 | ---
4 |
5 |
6 | # Development or use on your laptop or some other personal account
7 |
8 |
9 | Install all the software preqreqs (postgresql, node, etc.), then
10 |
11 |
12 | ```
13 |
14 | cd ~/cocalc/src
15 | . smc-env
16 | npm run install
17 | pip install --user smc_sagews
18 | pip install --user smc_pyutil
19 | npm install forever
20 |
21 | ```
22 |
--------------------------------------------------------------------------------
/src/dev/single/restart-hub:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | export USER=wstein
4 | export PATH=/usr/local/bin:$PATH
5 | export PGHOST='/home/wstein/postgres_data/socket'
6 |
7 |
8 | # If you put this in crontab be sure to explicitly set USER=...
9 |
10 | cd /home/wstein/smc/src
11 | . smc-env
12 |
13 | echo $PGHOST
14 | service_hub.py stop
15 | sleep .5
16 | service_hub.py --host=localhost --single --update start
17 |
--------------------------------------------------------------------------------
/src/packages/database/pool/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import getPool from "./pool";
7 | export default getPool;
8 | export * from "./pool";
9 | export type { Client, PoolClient, Pool } from "pg";
10 | export type { CacheTime } from "./cached";
11 |
12 | export { timeInSeconds } from "./util";
13 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/unknown/register.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import { register_file_editor } from "../../project-file";
7 |
8 | register_file_editor({
9 | ext: [""],
10 | icon: "question-circle",
11 | componentAsync: async () => (await import("./editor")).UnknownEditor,
12 | });
13 |
--------------------------------------------------------------------------------
/src/packages/next/components/share/license.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | interface Props {
7 | license: string;
8 | }
9 | export default function License({ license }: Props) {
10 | // TODO: make this more useful later...
11 | return {license ? license.toUpperCase() : "none"};
12 | }
13 |
--------------------------------------------------------------------------------
/src/packages/next/pages/api/v2/auth/requires-token.ts:
--------------------------------------------------------------------------------
1 | /* api call to see whether or not a token is required for creating an account. */
2 |
3 | import getRequiresToken from "@cocalc/server/auth/tokens/get-requires-token";
4 |
5 | export default async function handle(_req, res) {
6 | try {
7 | res.json(await getRequiresToken());
8 | } catch (err) {
9 | res.json({ error: err.message });
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/packages/frontend/app-framework/counter-hook.ts:
--------------------------------------------------------------------------------
1 | import { useState } from "react";
2 |
3 | // Use this to count up or down. e.g.
4 | // const {val: counter_value, inc: inc_counter} = useCounter()
5 | export default function useCounter(init: number = 0) {
6 | const [val, setVal] = useState(init);
7 | const inc = () => setVal(val + 1);
8 | const dec = () => setVal(val - 1);
9 | return { val, inc, dec };
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/app/util.ts:
--------------------------------------------------------------------------------
1 | import { webapp_client } from "@cocalc/frontend/webapp-client";
2 |
3 | export function blur_active_element(): void {
4 | if (document.activeElement == null) return;
5 | // otherwise, it'll be highlighted even when closed again
6 | (document.activeElement as any).blur?.();
7 | }
8 |
9 | export function getNow(): number {
10 | return webapp_client.server_time().getTime();
11 | }
12 |
--------------------------------------------------------------------------------
/src/packages/next/lib/config.ts:
--------------------------------------------------------------------------------
1 | /*
2 | Constants and other configuration that impact the overall
3 | look of all of the pages.
4 | */
5 |
6 | export const MAX_WIDTH = "1000px";
7 |
8 | export const SHARE_MAX_WIDTH = "1100px";
9 |
10 | export const MAX_WIDTH_LANDING = "1200px";
11 |
12 | // Return this in getServerSideProps to trigger displaying the 404 page.
13 | export const NOT_FOUND = { notFound: true } as const;
14 |
--------------------------------------------------------------------------------
/src/packages/server/auth/is-account-available.ts:
--------------------------------------------------------------------------------
1 | import getPool from "@cocalc/database/pool";
2 |
3 | export default async function isAccountAvailable(
4 | email_address: string
5 | ): Promise {
6 | const pool = getPool("medium");
7 | const { rows } = await pool.query(
8 | "SELECT account_id FROM accounts WHERE email_address=$1",
9 | [email_address]
10 | );
11 | return rows.length == 0;
12 | }
13 |
--------------------------------------------------------------------------------
/src/packages/sync-client/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"],
5 | "rootDir": "./",
6 | "outDir": "dist"
7 | },
8 | "exclude": ["node_modules", "dist", "test"],
9 | "references": [
10 | { "path": "../sync" },
11 | { "path": "../api-client" },
12 | { "path": "../backend" },
13 | { "path": "../util" }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/src/packages/frontend/course/compute/util.ts:
--------------------------------------------------------------------------------
1 | // for tasks that are "easy" to run in parallel, e.g. run code in compute servers
2 | export const MAX_PARALLEL_TASKS = 30;
3 |
4 | export function getUnitId(unit): string {
5 | const id = unit.get("assignment_id") ?? unit.get("handout_id");
6 | if (id == null) {
7 | throw Error("one of assignment_id or handout_id of unit must be defined");
8 | }
9 | return id;
10 | }
11 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/elements/meta/type.ts:
--------------------------------------------------------------------------------
1 | import { SlateElement } from "../register";
2 |
3 | export interface Meta extends SlateElement {
4 | type: "meta";
5 | value: string;
6 | isVoid: true;
7 | }
8 |
9 | export function createMetaNode(value: string) {
10 | return {
11 | type: "meta" as "meta",
12 | value,
13 | isVoid: true as true,
14 | children: [{ text: "" }],
15 | };
16 | }
17 |
--------------------------------------------------------------------------------
/src/packages/frontend/jupyter/output-messages/mime-types/javascript.tsx:
--------------------------------------------------------------------------------
1 | import register from "./register";
2 | import { Javascript } from "../javascript";
3 | import { UntrustedJavascript } from "../untrusted-javascript";
4 |
5 | register("application/javascript", 2.5, ({ value, trust }) => {
6 | if (trust) {
7 | return ;
8 | }
9 | return ;
10 | });
11 |
--------------------------------------------------------------------------------
/src/packages/server/purchases/stripe/delete-payment-method.ts:
--------------------------------------------------------------------------------
1 | import getConn from "@cocalc/server/stripe/connection";
2 |
3 | export default async function deletePaymentMethod({
4 | payment_method,
5 | }: {
6 | payment_method: string;
7 | }) {
8 | const stripe = await getConn();
9 | // note -- we don't actually check the user has this payment method.
10 | await stripe.paymentMethods.detach(payment_method);
11 | }
12 |
--------------------------------------------------------------------------------
/src/packages/static/src/webapp-css.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | // definition of the common css for webpack
7 | import "@cocalc/assets/jquery/jquery-ui/css/humanity/jquery-ui.css";
8 | import "@cocalc/assets/jquery/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.css";
9 | import "./dropzone.css";
10 |
11 |
--------------------------------------------------------------------------------
/src/packages/util/README.md:
--------------------------------------------------------------------------------
1 | CoCalc code shared between the frontend and the backend.
2 |
3 | This is pure javascript code that can be used anywhere -- the backend servers, the frontend client, etc.
4 |
5 | This code is part of https://github.com/sagemathinc/cocalc and isn't currently designed to be used standalone. Our plan is to refactor this code into smaller useful modules that are published under the @cocalc npm organization.
6 |
--------------------------------------------------------------------------------
/src/packages/util/routing/app.ts:
--------------------------------------------------------------------------------
1 | // All top level page "entry points" in the webapp must be listed here.
2 | // Should be consistent with and/or used in places like:
3 | // - @cocalc/frontend/history.ts
4 | // - @cocalc/frontend/app/actions.ts
5 | // - @cocalc/hub/servers/app/app-redirect.ts
6 |
7 | export const APP_ROUTES = new Set([
8 | "admin",
9 | "projects",
10 | "settings",
11 | "notifications",
12 | ]);
13 |
--------------------------------------------------------------------------------
/src/packages/assets/misc/talk-20121004/ui/default/slides.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | @import url(s5-core.css); /* required to make the slide show run at all */
7 | @import url(framing.css); /* sets basic placement and size of slide components */
8 | @import url(pretty.css); /* stuff that makes the slides look better than blah */
--------------------------------------------------------------------------------
/src/packages/frontend/admin/llm/value.tsx:
--------------------------------------------------------------------------------
1 | import { Icon, Text } from "@cocalc/frontend/components";
2 |
3 | export function Value({ val }: { val: any }) {
4 | switch (typeof val) {
5 | case "boolean":
6 | return val ? : ;
7 | case "number":
8 | return <>`${val}`>;
9 | default:
10 | return {JSON.stringify(val)};
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/packages/frontend/compute/util.ts:
--------------------------------------------------------------------------------
1 | import { search_match, search_split } from "@cocalc/util/misc";
2 |
3 |
4 | // Filter `option.label` match the user type `input`
5 | export function filterOption(
6 | input: string,
7 | option: { label: string; value: string; search: string },
8 | ) {
9 | const terms = search_split(input.toLowerCase());
10 | return search_match((option?.search ?? "").toLowerCase(), terms);
11 | }
12 |
--------------------------------------------------------------------------------
/src/packages/next/components/landing/code.tsx:
--------------------------------------------------------------------------------
1 | import { ReactNode, CSSProperties } from "react";
2 | import { Typography } from "antd";
3 | const { Text } = Typography;
4 |
5 | interface Props {
6 | children: ReactNode;
7 | style?: CSSProperties;
8 | }
9 |
10 | export default function Code({ children, style }: Props) {
11 | return (
12 |
13 | {children}
14 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/src/packages/next/components/misc/help-email.tsx:
--------------------------------------------------------------------------------
1 | import { useCustomize } from "lib/customize";
2 | import A from "components/misc/A";
3 |
4 | export default function HelpEmail({ lower }: { lower?: boolean }) {
5 | const { helpEmail } = useCustomize();
6 | if (!helpEmail) return null;
7 | return (
8 |
9 | {lower ? "e" : "E"}mail {helpEmail}
10 |
11 | );
12 | }
13 |
--------------------------------------------------------------------------------
/src/packages/next/components/sso/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | import Link from "next/link";
7 |
8 | import type { JSX } from "react";
9 |
10 | export function ssoNav(): JSX.Element[] {
11 | return [
12 | Home,
13 | Single Sign On,
14 | ];
15 | }
16 |
--------------------------------------------------------------------------------
/src/packages/frontend/app/init.ts:
--------------------------------------------------------------------------------
1 | import { init_actions } from "./actions";
2 | import { init_store } from "./store";
3 | import { init_ping } from "./monitor-pings";
4 | import { init_connection } from "./monitor-connection";
5 | import { init_query_params } from "./query-params";
6 |
7 | export function init() {
8 | init_actions();
9 | init_store();
10 | init_ping();
11 | init_connection();
12 | init_query_params();
13 | }
14 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/slate-react/utils/key.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * An auto-incrementing identifier for keys.
3 | */
4 |
5 | let n = 0;
6 |
7 | /**
8 | * A class that keeps track of a key string. We use a full class here because we
9 | * want to be able to use them as keys in `WeakMap` objects.
10 | */
11 |
12 | export class Key {
13 | id: string;
14 |
15 | constructor() {
16 | this.id = `${n++}`;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/packages/next/lib/share/project-avatar-image.ts:
--------------------------------------------------------------------------------
1 | import getPool from "@cocalc/database/pool";
2 |
3 | export async function getProjectAvatarTiny(
4 | project_id: string
5 | ): Promise {
6 | const pool = getPool("long");
7 | const { rows } = await pool.query(
8 | "SELECT avatar_image_tiny FROM projects WHERE project_id=$1",
9 | [project_id]
10 | );
11 | return rows[0].avatar_image_tiny;
12 | }
13 |
--------------------------------------------------------------------------------
/src/packages/next/pages/api/v2/purchases/get-prices-project-quotas.ts:
--------------------------------------------------------------------------------
1 | /*
2 | Get the configured prices for pay-as-you-go project upgrades.
3 | */
4 |
5 | import { getPrices } from "@cocalc/server/purchases/project-quotas";
6 |
7 | export default async function handle(_req, res) {
8 | try {
9 | res.json(await getPrices());
10 | } catch (err) {
11 | res.json({ error: `${err.message}` });
12 | return;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/packages/server/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"],
5 | "lib": ["ESNext"],
6 | "rootDir": "./",
7 | "outDir": "dist"
8 | },
9 | "exclude": ["node_modules", "dist"],
10 | "references": [
11 | { "path": "../backend" },
12 | { "path": "../database" },
13 | { "path": "../conat" },
14 | { "path": "../util" }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/crm-editor/tables/file-use.ts:
--------------------------------------------------------------------------------
1 | import { register } from "./tables";
2 |
3 | register({
4 | name: "file_use",
5 |
6 | title: "File Use",
7 |
8 | icon: "files",
9 |
10 | query: {
11 | crm_file_use: [
12 | {
13 | id: null,
14 | project_id: null,
15 | path: null,
16 | users: null,
17 | last_edited: null,
18 | },
19 | ],
20 | },
21 | });
22 |
--------------------------------------------------------------------------------
/src/packages/frontend/frame-editors/whiteboard-editor/elements/generic.tsx:
--------------------------------------------------------------------------------
1 | import StaticMarkdown from "@cocalc/frontend/editors/slate/static-markdown";
2 |
3 | export default function Generic({ element }) {
4 | return (
5 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/src/packages/next/pages/api/v2/purchases/get-max-project-quotas.ts:
--------------------------------------------------------------------------------
1 | /*
2 | Get the configured maximum allowed pay-as-you-go project upgrades.
3 | */
4 |
5 | import { getMaxQuotas } from "@cocalc/server/purchases/project-quotas";
6 |
7 | export default async function handle(_req, res) {
8 | try {
9 | res.json(await getMaxQuotas());
10 | } catch (err) {
11 | res.json({ error: `${err.message}` });
12 | return;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/packages/util/types/servers.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
3 | * License: MS-RSL – see LICENSE.md for details
4 | */
5 |
6 | // used by frontend and project backend
7 |
8 | export const NAMED_SERVER_NAMES = [
9 | "jupyter",
10 | "jupyterlab",
11 | "code",
12 | "pluto",
13 | "rserver",
14 | ] as const;
15 |
16 | export type NamedServerName = (typeof NAMED_SERVER_NAMES)[number];
17 |
--------------------------------------------------------------------------------
/src/packages/frontend/editors/slate/markdown-to-slate/util.ts:
--------------------------------------------------------------------------------
1 | import { load } from "cheerio";
2 |
3 | export function getAttrs(content: string, attrs: string[]): [string, string][] {
4 | const $ = load("");
5 | const x = $(content);
6 | const v: [string, string][] = [];
7 | for (const attr of attrs) {
8 | const val = x.attr(attr);
9 | if (val != null) {
10 | v.push([attr, val]);
11 | }
12 | }
13 | return v;
14 | }
15 |
--------------------------------------------------------------------------------