Files
goodbuddy/src/main/obsidian
mesalogo 5cdffee9ee
GoodBuddy Agents / Validate Agent source (push) Canceled after 0s
GoodBuddy Agents / Build darwin arm64 Agent (push) Canceled after 0s
GoodBuddy Agents / Build linux arm64 Agent (push) Canceled after 0s
GoodBuddy Agents / Build linux x64 Agent (push) Canceled after 0s
Cross-platform packages / Validate source (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s
release: validate the complete 0.15.0 branch snapshot
Account for concurrent composer, conversation-order, desktop-notification,
and Supervisor discussion changes in bilingual notes and feature matrices.
Correct the removed entity-writeback description in the companion article.

Align the configuration fixture with the default-on notification setting,
scope note-source UI queries and wait for completed actions, and preserve
all real Obsidian child-process checks with a 15-second scenario allowance.

Validation: frozen complete tree passed 5371 Linux tests with 51 skipped;
19 focused Windows tests, typecheck, lint, and release-note validation passed.
The older 5345-test Host result did not cover all concurrent branch changes
and is not treated as validation of this complete candidate.
2026-09-28 03:06:41 +08:00
..

Obsidian Service

Construct ObsidianService from ./obsidian with:

const obsidian = new ObsidianService({
  appPath: app.getAppPath(),
  launchEnvironmentProvider: localToolEnvironmentService.launchEnvironmentProvider
})

Optional homePath, platform, and environment overrides support isolated tests. The provider is read on every launch. Its prepared PATH selects the managed node shim, including Electron-as-Node; the service never invokes npm or npx.

API

  • listVaults(settings): Promise<ObsidianVault[]> returns { id, name, path }.
  • testConnection(settings): Promise<{ vaults: ObsidianVault[]; toolCount: number }> opens each vault and lists its tools without writing. toolCount is the count of unique upstream tool names, not the count multiplied by the number of vaults.
  • listTools(settings): Promise<Tool[]> returns the complete upstream schemas from the first vault. The gateway can wrap each tool with vaultId.
  • callTool(settings, { vaultId?, name, arguments }, signal?): Promise<CallToolResult> forwards the request unchanged. Omitting vaultId requires exactly one vault.

Settings accept { vaultPath?: string }. A nonempty explicit absolute folder bypasses discovery and receives a SHA-256 path ID. Empty settings discover all registered vaults, retaining their registry IDs, regardless of their open flag. Discovery reads obsidian/obsidian.json beneath %APPDATA% on Windows, ~/Library/Application Support on macOS, or $XDG_CONFIG_HOME (default ~/.config) on Linux. Missing registries, empty registries, invalid folders, and unknown IDs produce explicit errors. Ordinary folders are accepted, as upstream does not require an .obsidian directory.

Each operation creates and closes its own stdio client. Cancellation reaches both initialization and tool requests, and cleanup is awaited even when the SDK also initiates cleanup. No read-only option or tool filtering is added.

Packaging

@bitbonsai/mcpvault is pinned to 0.16.0 as a build dependency. The Electron Vite main build copies its production dependency closure to out/main/obsidian-mcpvault/node_modules, preserving package-relative assets and all included license files. Electron Builder unpacks that directory; the service maps app.asar to app.asar.unpacked before launching the upstream dist/server.js. This preserves trash's Windows and macOS binaries and Linux implementation. Runtime installation and network access are unnecessary.

obsidian-service.test.ts copies the same production package to an isolated temporary app directory, launches it via a managed Node shim, and exercises registry discovery, every advertised schema, connection probes, note read/write, patches, frontmatter changes, listing, local-trash deletion, and cancellation. These tests never discover or modify the user's real vaults. Cross-platform discovery is tested with fixtures; native runtime execution follows the host OS.