{"owner":"Vinzent03","repo":"obsidian-git","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"skills":{"AGENTS.md":"## Project overview\n\nThis repository contains the `obsidian-git` Obsidian community plugin. It\nbundles TypeScript and Svelte source into the root-level `main.js` loaded by\nObsidian, with `manifest.json` and `styles.css` as the other release\nartifacts. The plugin manages Git repositories inside an Obsidian vault,\nincluding source control, history, diff views, automatic routines, and editor\nline authoring.\n\nThe main runtime boundary is:\n\n-   `src/main.ts` owns plugin lifecycle, settings, commands/views registration,\n    refresh/reload orchestration, user-facing notices, and cleanup.\n-   `src/gitManager/gitManager.ts` defines the Git capability interface.\n-   `src/gitManager/simpleGit.ts` is the desktop/native Git implementation.\n-   `src/gitManager/isomorphicGit.ts` is the mobile/browser-compatible\n    implementation.\n-   `src/commands.ts` registers stable user-facing command IDs.\n-   `src/ui/` contains source-control, history, diff, modal, and status-bar UI.\n-   `src/editor/` contains CodeMirror integrations for diff signs, hunk actions,\n    and line authoring.\n-   `src/setting/` contains persisted settings and local-storage migrations.\n-   `tests/` contains Vitest tests and Obsidian stubs/helpers.\n\nBefore changing behavior, identify whether it belongs in the shared\n`GitManager` contract, both Git backends, the plugin orchestration layer, or a\nspecific UI/editor feature. Changes that work only with native Git are not\nautomatically valid on mobile.\n\n## Environment and commands\n\nUse Node.js `>=24` and pnpm `>=11`, as declared in `package.json`. Use pnpm,\nnot npm or yarn; commit changes to `pnpm-lock.yaml` when dependency versions\nchange. Install dependencies with:\n\n```sh\npnpm install\n```\n\nUseful commands:\n\n```sh\npnpm run dev          # watch and rebuild main.js with inline source maps\npnpm run build        # production bundle; writes the ignored root main.js\npnpm run tsc          # strict TypeScript check\npnpm run svelte       # Svelte type/check validation\npnpm run format       # Prettier check (does not rewrite files)\npnpm run lint         # ESLint for src, tests, and vitest.config.ts\npnpm run test         # Vitest test suite\npnpm run test:watch   # interactive Vitest watch mode\npnpm run test:coverage\npnpm run all          # tsc, Svelte, format, lint, and tests\n```\n\nThe CI workflow runs the checks separately and also verifies the production\nbuild. For a normal source change, run at least the focused tests plus\n`pnpm run tsc`, `pnpm run svelte`, `pnpm run lint`, and `pnpm run format`; run\n`pnpm run all` before handoff when practical. Run `pnpm run build` for changes\nto bundling, dependencies, manifest/release behavior, or runtime imports.\n\n## Source and implementation conventions\n\n-   Use the existing double-quote and Prettier formatting style. Do not make\n    unrelated formatting changes.\n-   Keep command IDs stable after release. Add or change commands in\n    `src/commands.ts`, and preserve their checks for active files and Git\n    readiness where applicable.\n-   Keep `src/main.ts` focused on lifecycle and coordination. Put Git behavior in\n    the manager abstraction/backend, reusable logic in focused modules, and UI\n    behavior in the relevant view/modal/component.\n-   When adding a Git operation, update the abstract contract and both\n    implementations. Preserve the shared operation-state handling in\n    `GitManager.withGitOperation` and make failure paths restore state.\n-   Prefer `async`/`await`; surface failures through the plugin's existing\n    `displayError`/`displayMessage` mechanisms. Do not silently swallow Git\n    errors, authentication failures, conflicts, cancellation, or offline-mode\n    transitions.\n-   Use Obsidian's `registerEvent`, `registerDomEvent`, `registerInterval`, and\n    view registration helpers for resources owned by the plugin. If a feature\n    also creates a timer, queue task, editor extension, or status-bar element,\n    clean it up in its unload path. Check both ordinary unload and settings\n    reload (`unloadPlugin` followed by `init`).\n-   Route serialized or competing Git actions through `PromiseQueue`; do not\n    introduce concurrent mutations to the working tree, index, or repository\n    state without examining the existing queueing behavior.\n-   Keep filesystem paths vault/repository-relative at API boundaries where the\n    existing code does so. Git repository relative paths should be contained\n    within the git manager and vault relative paths should be used as in/output\n    to the git manager. Avoid absolute paths, and do not reach outside the vault or\n    repository for any reason.\n-   Preserve the desktop/mobile split. Desktop uses Node/Electron, whereas\n    mobile uses Capcitor. Therefore on desktop a native Git installation is used\n    via `simple-git` and on mobile a javascript implementation of git:\n    `isomorphic-git` that uses the Obsidian adapter and `requestUrl`. Note that\n    some features are desktop only. Test or reason about both implementations\n    when changing shared Git semantics.\n-   Svelte components are compiled by `esbuild-svelte` with injected CSS. Keep\n    component state and event handlers local where possible, and coordinate with\n    their owning TypeScript view through the established props/events rather than\n    reaching into unrelated plugin state.\n\n## Testing\n\nTests run in the Node environment with Vitest. `vitest.config.ts` aliases\n`obsidian` to `tests/stubs/obsidian.ts` and `src` to the source directory, and\nloads `tests/setup.ts` for every test file. Refer to tests/README.md for details.\n"},"files":{"AGENTS.md":"## Project overview\n\nThis repository contains the `obsidian-git` Obsidian community plugin. It\nbundles TypeScript and Svelte source into the root-level `main.js` loaded by\nObsidian, with `manifest.json` and `styles.css` as the other release\nartifacts. The plugin manages Git repositories inside an Obsidian vault,\nincluding source control, history, diff views, automatic routines, and editor\nline authoring.\n\nThe main runtime boundary is:\n\n-   `src/main.ts` owns plugin lifecycle, settings, commands/views registration,\n    refresh/reload orchestration, user-facing notices, and cleanup.\n-   `src/gitManager/gitManager.ts` defines the Git capability interface.\n-   `src/gitManager/simpleGit.ts` is the desktop/native Git implementation.\n-   `src/gitManager/isomorphicGit.ts` is the mobile/browser-compatible\n    implementation.\n-   `src/commands.ts` registers stable user-facing command IDs.\n-   `src/ui/` contains source-control, history, diff, modal, and status-bar UI.\n-   `src/editor/` contains CodeMirror integrations for diff signs, hunk actions,\n    and line authoring.\n-   `src/setting/` contains persisted settings and local-storage migrations.\n-   `tests/` contains Vitest tests and Obsidian stubs/helpers.\n\nBefore changing behavior, identify whether it belongs in the shared\n`GitManager` contract, both Git backends, the plugin orchestration layer, or a\nspecific UI/editor feature. Changes that work only with native Git are not\nautomatically valid on mobile.\n\n## Environment and commands\n\nUse Node.js `>=24` and pnpm `>=11`, as declared in `package.json`. Use pnpm,\nnot npm or yarn; commit changes to `pnpm-lock.yaml` when dependency versions\nchange. Install dependencies with:\n\n```sh\npnpm install\n```\n\nUseful commands:\n\n```sh\npnpm run dev          # watch and rebuild main.js with inline source maps\npnpm run build        # production bundle; writes the ignored root main.js\npnpm run tsc          # strict TypeScript check\npnpm run svelte       # Svelte type/check validation\npnpm run format       # Prettier check (does not rewrite files)\npnpm run lint         # ESLint for src, tests, and vitest.config.ts\npnpm run test         # Vitest test suite\npnpm run test:watch   # interactive Vitest watch mode\npnpm run test:coverage\npnpm run all          # tsc, Svelte, format, lint, and tests\n```\n\nThe CI workflow runs the checks separately and also verifies the production\nbuild. For a normal source change, run at least the focused tests plus\n`pnpm run tsc`, `pnpm run svelte`, `pnpm run lint`, and `pnpm run format`; run\n`pnpm run all` before handoff when practical. Run `pnpm run build` for changes\nto bundling, dependencies, manifest/release behavior, or runtime imports.\n\n## Source and implementation conventions\n\n-   Use the existing double-quote and Prettier formatting style. Do not make\n    unrelated formatting changes.\n-   Keep command IDs stable after release. Add or change commands in\n    `src/commands.ts`, and preserve their checks for active files and Git\n    readiness where applicable.\n-   Keep `src/main.ts` focused on lifecycle and coordination. Put Git behavior in\n    the manager abstraction/backend, reusable logic in focused modules, and UI\n    behavior in the relevant view/modal/component.\n-   When adding a Git operation, update the abstract contract and both\n    implementations. Preserve the shared operation-state handling in\n    `GitManager.withGitOperation` and make failure paths restore state.\n-   Prefer `async`/`await`; surface failures through the plugin's existing\n    `displayError`/`displayMessage` mechanisms. Do not silently swallow Git\n    errors, authentication failures, conflicts, cancellation, or offline-mode\n    transitions.\n-   Use Obsidian's `registerEvent`, `registerDomEvent`, `registerInterval`, and\n    view registration helpers for resources owned by the plugin. If a feature\n    also creates a timer, queue task, editor extension, or status-bar element,\n    clean it up in its unload path. Check both ordinary unload and settings\n    reload (`unloadPlugin` followed by `init`).\n-   Route serialized or competing Git actions through `PromiseQueue`; do not\n    introduce concurrent mutations to the working tree, index, or repository\n    state without examining the existing queueing behavior.\n-   Keep filesystem paths vault/repository-relative at API boundaries where the\n    existing code does so. Git repository relative paths should be contained\n    within the git manager and vault relative paths should be used as in/output\n    to the git manager. Avoid absolute paths, and do not reach outside the vault or\n    repository for any reason.\n-   Preserve the desktop/mobile split. Desktop uses Node/Electron, whereas\n    mobile uses Capcitor. Therefore on desktop a native Git installation is used\n    via `simple-git` and on mobile a javascript implementation of git:\n    `isomorphic-git` that uses the Obsidian adapter and `requestUrl`. Note that\n    some features are desktop only. Test or reason about both implementations\n    when changing shared Git semantics.\n-   Svelte components are compiled by `esbuild-svelte` with injected CSS. Keep\n    component state and event handlers local where possible, and coordinate with\n    their owning TypeScript view through the established props/events rather than\n    reaching into unrelated plugin state.\n\n## Testing\n\nTests run in the Node environment with Vitest. `vitest.config.ts` aliases\n`obsidian` to `tests/stubs/obsidian.ts` and `src` to the source directory, and\nloads `tests/setup.ts` for every test file. Refer to tests/README.md for details.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"## Project overview\n\nThis repository contains the `obsidian-git` Obsidian community plugin. It\nbundles TypeScript and Svelte source into the root-level `main.js` loaded by\nObsidian, with `manifest.json` and `styles.css` as the other release\nartifacts. The plugin manages Git repositories inside an Obsidian vault,\nincluding source control, history, diff views, automatic routines, and editor\nline authoring.\n\nThe main runtime boundary is:\n\n-   `src/main.ts` owns plugin lifecycle, settings, commands/views registration,\n    refresh/reload orchestration, user-facing notices, and cleanup.\n-   `src/gitManager/gitManager.ts` defines the Git capability interface.\n-   `src/gitManager/simpleGit.ts` is the desktop/native Git implementation.\n-   `src/gitManager/isomorphicGit.ts` is the mobile/browser-compatible\n    implementation.\n-   `src/commands.ts` registers stable user-facing command IDs.\n-   `src/ui/` contains source-control, history, diff, modal, and status-bar UI.\n-   `src/editor/` contains CodeMirror integrations for diff signs, hunk actions,\n    and line authoring.\n-   `src/setting/` contains persisted settings and local-storage migrations.\n-   `tests/` contains Vitest tests and Obsidian stubs/helpers.\n\nBefore changing behavior, identify whether it belongs in the shared\n`GitManager` contract, both Git backends, the plugin orchestration layer, or a\nspecific UI/editor feature. Changes that work only with native Git are not\nautomatically valid on mobile.\n\n## Environment and commands\n\nUse Node.js `>=24` and pnpm `>=11`, as declared in `package.json`. Use pnpm,\nnot npm or yarn; commit changes to `pnpm-lock.yaml` when dependency versions\nchange. Install dependencies with:\n\n```sh\npnpm install\n```\n\nUseful commands:\n\n```sh\npnpm run dev          # watch and rebuild main.js with inline source maps\npnpm run build        # production bundle; writes the ignored root main.js\npnpm run tsc          # strict TypeScript check\npnpm run svelte       # Svelte type/check validation\npnpm run format       # Prettier check (does not rewrite files)\npnpm run lint         # ESLint for src, tests, and vitest.config.ts\npnpm run test         # Vitest test suite\npnpm run test:watch   # interactive Vitest watch mode\npnpm run test:coverage\npnpm run all          # tsc, Svelte, format, lint, and tests\n```\n\nThe CI workflow runs the checks separately and also verifies the production\nbuild. For a normal source change, run at least the focused tests plus\n`pnpm run tsc`, `pnpm run svelte`, `pnpm run lint`, and `pnpm run format`; run\n`pnpm run all` before handoff when practical. Run `pnpm run build` for changes\nto bundling, dependencies, manifest/release behavior, or runtime imports.\n\n## Source and implementation conventions\n\n-   Use the existing double-quote and Prettier formatting style. Do not make\n    unrelated formatting changes.\n-   Keep command IDs stable after release. Add or change commands in\n    `src/commands.ts`, and preserve their checks for active files and Git\n    readiness where applicable.\n-   Keep `src/main.ts` focused on lifecycle and coordination. Put Git behavior in\n    the manager abstraction/backend, reusable logic in focused modules, and UI\n    behavior in the relevant view/modal/component.\n-   When adding a Git operation, update the abstract contract and both\n    implementations. Preserve the shared operation-state handling in\n    `GitManager.withGitOperation` and make failure paths restore state.\n-   Prefer `async`/`await`; surface failures through the plugin's existing\n    `displayError`/`displayMessage` mechanisms. Do not silently swallow Git\n    errors, authentication failures, conflicts, cancellation, or offline-mode\n    transitions.\n-   Use Obsidian's `registerEvent`, `registerDomEvent`, `registerInterval`, and\n    view registration helpers for resources owned by the plugin. If a feature\n    also creates a timer, queue task, editor extension, or status-bar element,\n    clean it up in its unload path. Check both ordinary unload and settings\n    reload (`unloadPlugin` followed by `init`).\n-   Route serialized or competing Git actions through `PromiseQueue`; do not\n    introduce concurrent mutations to the working tree, index, or repository\n    state without examining the existing queueing behavior.\n-   Keep filesystem paths vault/repository-relative at API boundaries where the\n    existing code does so. Git repository relative paths should be contained\n    within the git manager and vault relative paths should be used as in/output\n    to the git manager. Avoid absolute paths, and do not reach outside the vault or\n    repository for any reason.\n-   Preserve the desktop/mobile split. Desktop uses Node/Electron, whereas\n    mobile uses Capcitor. Therefore on desktop a native Git installation is used\n    via `simple-git` and on mobile a javascript implementation of git:\n    `isomorphic-git` that uses the Obsidian adapter and `requestUrl`. Note that\n    some features are desktop only. Test or reason about both implementations\n    when changing shared Git semantics.\n-   Svelte components are compiled by `esbuild-svelte` with injected CSS. Keep\n    component state and event handlers local where possible, and coordinate with\n    their owning TypeScript view through the established props/events rather than\n    reaching into unrelated plugin state.\n\n## Testing\n\nTests run in the Node environment with Vitest. `vitest.config.ts` aliases\n`obsidian` to `tests/stubs/obsidian.ts` and `src` to the source directory, and\nloads `tests/setup.ts` for every test file. Refer to tests/README.md for details.\n","category":"root","tokens":1392}]}