Skip to content

Obsidian client

The engine runs as a service (datanotes serve); Obsidian is one of its clients. The plugin Datanotes client (project datanotes-obsidian, plugin id datanotes-client) holds no engine: every action is a call to the engine’s HTTP API, made with the JavaScript client. It works on desktop and on phones.

Build it from its repository and copy main.js and manifest.json into <vault>/.obsidian/plugins/datanotes-client/, then enable Datanotes client under Community plugins.

Address and device name are kept per device in Obsidian’s local storage, the token in its secret storage; only the public address is synced with the vault (data.json).

  • Engine address: default http://127.0.0.1:27150 on desktop.
  • Token of this device: an app token, one per device (see Apps), created with the owner’s token, e.g. {"name": "phone", "write": ["personal.*"]} for a phone that writes only personal tables.
  • Public engine address (synced to every device): what phones without an address of their own use, an HTTPS address that reaches the engine through a reverse proxy or a tunnel.
  • Device name: recorded with every write.
  • Complete the task in this note and Reopen the task in this note: on a note of a task table (personal.tasks.task, or any table named task); they call the complete_task / reopen_task tools of the planning app, which must be registered.
  • Check this note (values valid for its table): on a note with a table property.
  • Semantic search.
  • Check the connection to the engine.

Datacore or DataviewJS views call the engine through the plugin:

const db = app.plugins.plugins["datanotes-client"].api;
const tasks = await db.call("select_rows", { table: "personal.tasks.task", limit: 10 });
await db.call("complete_task", { task: path }); // a tool of a registered app

call runs an engine operation, or else a registered app’s tool of that name. It returns the result, and throws with the engine’s message when the call is refused, or with a connection or token error.