Liking cljdoc? Tell your friends :D

us.whitford.fulcro.rad.database-adapters.git

Git database adapter for Fulcro RAD.

Agent-scoped, git-backed storage. Entities are EDN files in directories, commits are the transaction log. Designed for agent communication and knowledge persistence via the mementum protocol.

Hybrid engine: JGit in-process is the primary path for most read and write operations (10-50x faster than CLI shell-outs). The git CLI is used as a fallback and for worktree operations JGit 7.x does not support. Repository objects are cached in a pool — call close-jgit-repos! at shutdown.

Main functions:

  • start-repositories: Initialize git repos from config
  • stop-repositories: Shut down repos
  • wrap-env: Pathom env middleware to inject repos
  • generate-resolvers: Auto-generate resolvers from RAD attributes
  • wrap-git-save: Form save middleware (EDN write + git commit)
  • wrap-git-delete: Form delete middleware (file remove + git commit)
Git database adapter for Fulcro RAD.

Agent-scoped, git-backed storage. Entities are EDN files in directories,
commits are the transaction log. Designed for agent communication and
knowledge persistence via the mementum protocol.

Hybrid engine: JGit in-process is the primary path for most read and write
operations (10-50x faster than CLI shell-outs). The git CLI is used as a
fallback and for worktree operations JGit 7.x does not support. Repository
objects are cached in a pool — call close-jgit-repos! at shutdown.

Main functions:
- start-repositories: Initialize git repos from config
- stop-repositories: Shut down repos
- wrap-env: Pathom env middleware to inject repos
- generate-resolvers: Auto-generate resolvers from RAD attributes
- wrap-git-save: Form save middleware (EDN write + git commit)
- wrap-git-delete: Form delete middleware (file remove + git commit)
raw docstring

add-worktree!clj

Add a new worktree with a new branch. Returns {:success :path :branch}.

Add a new worktree with a new branch. Returns {:success :path :branch}.
sourceraw docstring

bare-repo-statusclj

source

bare-repo?clj

source

child-entity-pathclj

Build the file path for a scoped child entity inside a parent directory.

Build the file path for a scoped child entity inside a parent directory.
sourceraw docstring

close-jgit-repos!clj

Close all cached JGit Repository objects. Call at shutdown.

Close all cached JGit Repository objects. Call at shutdown.
sourceraw docstring

commit-entity!clj

Stage and commit only the entity file — nothing else in the index. Uses git commit --only. Returns {:success bool, :commit string}.

Stage and commit only the entity file — nothing else in the index.
Uses git commit --only. Returns {:success bool, :commit string}.
sourceraw docstring

commit-files!clj

Stage and commit multiple files atomically — one commit for all paths. Each file-spec: {:path string, :action :add|:delete}. Returns {:success bool, :commit string}.

Stage and commit multiple files atomically — one commit for all paths.
Each file-spec: {:path string, :action :add|:delete}.
Returns {:success bool, :commit string}.
sourceraw docstring

delete-and-commit!clj

Remove a file and commit only the deletion. Returns {:success bool}.

Remove a file and commit only the deletion.
Returns {:success bool}.
sourceraw docstring

delete-branch!clj

Delete a branch. Use after remove-worktree!. Returns {:success bool}.

Delete a branch. Use after remove-worktree!. Returns {:success bool}.
sourceraw docstring

delete-entity-dir!clj

Recursively delete an entity directory and all its contents.

Recursively delete an entity directory and all its contents.
sourceraw docstring

delete-entity-file!clj

source

embed-available?clj

Returns true if git-embed is installed and accessible on the PATH. git-embed provides semantic similarity search over git repository content.

Returns true if git-embed is installed and accessible on the PATH.
git-embed provides semantic similarity search over git repository content.
sourceraw docstring

embed-gc!clj

Remove embeddings for deleted files. Returns {:success bool}.

Remove embeddings for deleted files. Returns {:success bool}.
sourceraw docstring

embed-install!clj

Install git-embed hooks (post-commit, post-merge, post-checkout). After installation, embeddings auto-update on every commit.

Install git-embed hooks (post-commit, post-merge, post-checkout).
After installation, embeddings auto-update on every commit.
sourceraw docstring

Semantic search across indexed content. Returns [{:score :path}] or nil. Requires git-embed. See (embed-available?).

Semantic search across indexed content. Returns [{:score :path}] or nil.
Requires git-embed. See (embed-available?).
sourceraw docstring

embed-similarclj

Find files similar to a given file. Returns [{:score :path}] or nil. Index-only operation (~6ms, no model load). Requires git-embed.

Find files similar to a given file. Returns [{:score :path}] or nil.
Index-only operation (~6ms, no model load). Requires git-embed.
sourceraw docstring

embed-statusclj

Get embedding index status. Returns {:model :indexed :total :dims :ref :hooks} or nil.

Get embedding index status. Returns {:model :indexed :total :dims :ref :hooks} or nil.
sourceraw docstring

embed-uninstall!clj

Remove git-embed hooks from a repo. Returns {:success bool}.

Remove git-embed hooks from a repo. Returns {:success bool}.
sourceraw docstring

embed-update!clj

Index all unindexed text files in HEAD. Returns {:success :message}.

Index all unindexed text files in HEAD. Returns {:success :message}.
sourceraw docstring

entity-historyclj

source

entity-pathclj

source

evict-jgit-repo!clj

Remove and close a specific JGit Repository from the pool.

Remove and close a specific JGit Repository from the pool.
sourceraw docstring

fork-worktree!clj

Add a worktree branching from a specific commit. Returns {:success :path :branch}.

Add a worktree branching from a specific commit. Returns {:success :path :branch}.
sourceraw docstring

gc!clj

Run git garbage collection. Returns {:success bool}.

Run git garbage collection. Returns {:success bool}.
sourceraw docstring

generate-resolversclj

Generate all Pathom 2 resolvers for the given git-backed schema (the default).

Arguments:

  • attributes: collection of RAD attributes
  • schema: schema keyword (e.g. :knowledge)

Returns: sequence of Pathom 2 resolver maps.

For Pathom 3, use generate-resolvers-pathom3 (requires pathom3 on the classpath).

Generate all Pathom 2 resolvers for the given git-backed schema (the default).

Arguments:
- attributes: collection of RAD attributes
- schema: schema keyword (e.g. :knowledge)

Returns: sequence of Pathom 2 resolver maps.

For Pathom 3, use `generate-resolvers-pathom3` (requires pathom3 on the
classpath).
sourceraw docstring

generate-resolvers-pathom3clj

Generate all resolvers as Pathom 3 resolvers for the given git-backed schema.

Same shape as generate-resolvers, but returns pathom3 Resolver objects. Requires pathom3 on the classpath (loaded lazily; not a hard dependency).

Generate all resolvers as Pathom 3 resolvers for the given git-backed schema.

Same shape as `generate-resolvers`, but returns pathom3 Resolver objects.
Requires pathom3 on the classpath (loaded lazily; not a hard dependency).
sourceraw docstring

git!clj

source

git-available?clj

Returns true if git is installed and accessible on the PATH.

Returns true if git is installed and accessible on the PATH.
sourceraw docstring

index-file-pathclj

Build the full path to a directory entity's index file.

Build the full path to a directory entity's index file.
sourceraw docstring

index-filenameclj

Derive the index filename for a directory entity. E.g. "experiment" + ".edn" → "experiment.edn".

Derive the index filename for a directory entity. E.g. "experiment" + ".edn" → "experiment.edn".
sourceraw docstring

init-bare!clj

Initialize a bare git repository. Returns canonical path.

Initialize a bare git repository. Returns canonical path.
sourceraw docstring

invalidate-branch-cache!clj

Invalidate the branch name cache for a repo directory.

Invalidate the branch name cache for a repo directory.
sourceraw docstring

list-branch-namesclj

List all branch names. Returns set of strings. Cached per repo-dir.

List all branch names. Returns set of strings. Cached per repo-dir.
sourceraw docstring

list-childrenclj

List child entity files in a subdirectory of a parent directory entity.

List child entity files in a subdirectory of a parent directory entity.
sourceraw docstring

list-directory-entitiesclj

List directory entities — each subdirectory is an entity instance.

List directory entities — each subdirectory is an entity instance.
sourceraw docstring

list-entitiesclj

source

list-entities-sortedclj

List entity files sorted by caller-provided function. Returns sorted vector of {:id :path :entity}.

List entity files sorted by caller-provided function.
Returns sorted vector of {:id :path :entity}.
sourceraw docstring

list-worktreesclj

List all worktrees. Returns seq of {:path :head :branch}.

List all worktrees. Returns seq of {:path :head :branch}.
sourceraw docstring

prune-worktrees!clj

Prune stale worktree references. Returns {:success bool}.

Prune stale worktree references. Returns {:success bool}.
sourceraw docstring

read-entityclj

source

remove-worktree!clj

Remove a worktree, keeping the branch. Returns {:success bool}.

Remove a worktree, keeping the branch. Returns {:success bool}.
sourceraw docstring

restore-worktree!clj

Re-attach a worktree to an existing branch on restart. Prunes stale metadata first. Returns {:success :path :branch}.

Re-attach a worktree to an existing branch on restart.
Prunes stale metadata first. Returns {:success :path :branch}.
sourceraw docstring

search-contentclj

source

source-file-pathclj

Build the full path to a named file within a directory entity.

Build the full path to a named file within a directory entity.
sourceraw docstring

start-repositoriesclj

source

start-repository!clj

source

stop-repositoriesclj

source

stop-repository!clj

source

worktree-commit!clj

Stage and commit a file within a worktree. Returns {:success :commit}.

Stage and commit a file within a worktree. Returns {:success :commit}.
sourceraw docstring

wrap-envclj

source

wrap-git-deleteclj

source

wrap-git-saveclj

source

write-entity!clj

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close