No description
Find a file
Moritz Jung d514c73a79 mvp
2026-05-11 23:51:53 +02:00
.github init 2026-05-11 22:36:26 +02:00
docs mvp 2026-05-11 23:51:53 +02:00
exampleVault mvp 2026-05-11 23:51:53 +02:00
packages/obsidian/src mvp 2026-05-11 23:51:53 +02:00
test mvp 2026-05-11 23:51:53 +02:00
.editorconfig init 2026-05-11 22:36:26 +02:00
.gitattributes init 2026-05-11 22:36:26 +02:00
.gitignore mvp 2026-05-11 23:51:53 +02:00
.npmrc init 2026-05-11 22:36:26 +02:00
.prettierignore init 2026-05-11 22:36:26 +02:00
.prettierrc.json init 2026-05-11 22:36:26 +02:00
AGENTS.md mvp 2026-05-11 23:51:53 +02:00
bun.lock mvp 2026-05-11 23:51:53 +02:00
eslint.config.mjs init 2026-05-11 22:36:26 +02:00
LICENSE.md init 2026-05-11 22:36:26 +02:00
manifest-beta.json init 2026-05-11 22:36:26 +02:00
manifest.json init 2026-05-11 22:36:26 +02:00
package.json mvp 2026-05-11 23:51:53 +02:00
README.md init 2026-05-11 22:36:26 +02:00
repo-automation.config.json init 2026-05-11 22:36:26 +02:00
svelte.config.mjs init 2026-05-11 22:36:26 +02:00
tsconfig.json init 2026-05-11 22:36:26 +02:00
versions.json init 2026-05-11 22:36:26 +02:00
vite.config.mts mvp 2026-05-11 23:51:53 +02:00

Obsidian Safe JS Plugin

Safe JS is an Obsidian plugin for running note-owned JavaScript with a deliberately small host API. The planned execution model is sandboxing inside Web Workers plus a constrained RPC layer over postMessage.

Current Status

This repository is prepared for planning and implementation. The plugin metadata, package name, lint paths, and development vault paths use the safe-js plugin id. The Obsidian entry point is still intentionally minimal while the sandbox and RPC contracts are designed.

Design Goals

  • Execute user scripts away from the Obsidian UI thread.
  • Expose only explicit host capabilities through validated RPC messages.
  • Keep worker lifetime, cancellation, timeout, and cleanup behavior predictable.
  • Make the supported API small enough to audit and document.
  • Prefer structured data contracts over stringly typed host calls.

Non-Goals

  • Full Node.js, Electron, DOM, or Obsidian API access inside user scripts.
  • Compatibility with unrestricted script runner plugins.
  • Implicit access to vault files, network, shell commands, or global app state.

Planned Code Block Languages

  • safe-js for normal execution.
  • safe-js-debug for debug rendering and execution diagnostics.

Implementation Plan

See docs/IMPLEMENTATION_PLAN.md.