Skip to content

Releases: peedrr/agent-kb

akb v0.22.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 13:18

Changed

  • BREAKING: akb init inside a git repository refuses until the KB's versioning mode is
    chosen.
    The invocation exits 2 naming the repository it found and what each flag does:
    --embed puts the KB into that repository's history — akb commits only kb/, raw/ and
    .agent-kb/, never the host's other worktree changes — and --no-git leaves the KB
    unversioned and out of the host's git status through .git/info/exclude, a file local
    to the clone. Previously the same invocation created a repository nested inside the
    host's, and akb init wrote user.name into it. A KB that is not inside a repository is
    unchanged: akb init <name> with no flag still creates a repository of its own.

  • The versioning mode is recorded in .agent-kb/akb.yaml as versioning: git or
    versioning: none, written explicitly at init in both modes.
    A config that predates
    the key means git — the mode those bases were created in — so an existing KB keeps
    working unchanged; any other value is rejected rather than read as git, so a misspelled
    mode never commits under the wrong assumption. A none base invokes no git at all:
    mutations write their files and stop, the base takes its lock on .agent-kb/akb.lock
    instead of on the host repository, and akb status reports Versioning: none in place of
    the git line. --no-commit is a no-op there, as it is for any base that never commits.

  • Commit identity resolves from the environment, then the base, then git, and is exported
    to the commit instead of passed as -c user.name=….
    AKB_AUTHOR_NAME/AKB_AUTHOR_EMAIL
    win, then git-author/git-email in the base's akb.yaml, then git's own resolution
    (GIT_AUTHOR_* in the environment, then the merged repository and global configuration).
    An identity akb supplies is exported as GIT_AUTHOR_* and GIT_COMMITTER_*; when it
    supplies none, git resolves the identity itself, which leaves a user-set GIT_AUTHOR_*
    working as a documented escape hatch. No source naming an identity is a usage refusal
    (exit 2) that fires before anything is written, replacing the raw
    Committer identity unknown fatal an agent could only hit after its page was staged.

  • A mutation blocked by an in-progress merge is refused up front instead of failing at
    the commit.
    Detecting a clean in-progress merge (MERGE_HEAD), not only unmerged paths,
    closes the gap where a git status --porcelain scan passed and
    fatal: cannot do a partial commit during a merge surfaced after the page had been
    written and staged. The refusal names the host repository and the path it changed, and
    states that the merge belongs to the host project rather than to the KB.

  • Every mutating command goes through one mode-aware storage helper. storage.OpenStore
    selects the provider from the recorded mode and owns the lock, the identity and merge
    preflight, and the commit, replacing the hardcoded NewGitProvider call sites and the
    direct LockRepo/CommitFiles/NothingToCommit calls across the command packages. The
    base lock is now held across the kb/log.md appends too.

Added

  • akb init gained --embed, --no-git, --force, --author-name/--author-email,
    and akb init ..
    --force bypasses the refusal to write .agent-kb/, kb/ and
    raw/ directly into a repository root; it selects no versioning mode, so a repository-root
    invocation still names one (akb init . --embed --force). --author-name/
    --author-email supply the init commit's identity for that commit only and are never
    written to akb.yaml: the akb default (agent-kb <agent@agent-kb>) is recorded there
    only when neither the environment nor git config names an identity, because an identity
    baked into a file that travels with the base would be mis-attributed after a clone.
    akb init . initializes the directory it runs in and adopts that directory's basename as
    the KB name, reported on the exit-0 line. akb init honors --no-commit: it scaffolds and
    stages the base and leaves the commit to the caller, so an orchestrator can bundle init
    with templates and an overview into one commit.

  • KNOWN-LIMITATIONS.md records that a KB cannot be a git submodule of the host
    project
    , with the reason (a base's repository is local to the machine that initialized
    it and akb has no remote or push machinery, while git refuses the local-path clone form
    since CVE-2022-39253: fatal: transport 'file' not allowed) and the supported answers
    (--embed, --no-git, or a human-run git submodule add over a hosted repository).

Fixed

  • akb init no longer clobbers an existing .gitignore. Both files it writes append
    the lines they need and keep every rule already there, so re-running init over a
    directory that carries an ignore file is safe instead of destructive.

  • Repository-root .git/info/exclude entries are anchored with a leading slash
    (/.agent-kb/, /kb/, /raw/). Unanchored, they also matched a same-named directory
    anywhere below the root, hiding unrelated host files from git status.

  • The integration suite no longer takes its git identity from the machine it runs on.
    Once akb init stopped writing repo-local user.name (identity moved to akb.yaml),
    the testscripts that shell out to raw git commit had no git-visible identity of their
    own: they passed on hosts whose system-level git config supplies one (NixOS does, even
    with HOME moved) and failed on CI runners, which have none. The testscript Setup
    now injects an ambient GIT_CONFIG_* identity every scenario inherits; scenarios that
    exercise identity resolution itself override or empty those same slots. The release
    preconditions gained a test gate that runs the suite under a CI-simulated git
    environment (no system or global config, no identity environment), so a
    machine-dependent scenario blocks the tag instead of the published release workflow.

  • A --no-git base at a repository root no longer writes a root .gitignore for
    exclusions the host's exclude file already carries.

  • An invocation with nothing to record no longer fails on a commit identity it would
    never use.
    akb raw sync, akb index remove and akb template write settle the
    no-change case under the base lock before the preflight; a sync that finds nothing also
    stops rewriting the manifest.

  • Post-write failure guidance is mode-accurate: an unversioned base is no longer told to
    resolve a merge or finish a commit by hand.

akb v0.20.0

Choose a tag to compare

@github-actions github-actions released this 25 Sep 14:03

Changed

  • BREAKING: the knowledge-base state directory is renamed .akb/ → .agent-kb/,
    and its config file loses the redundant leading dot: .akb.yaml → akb.yaml.

    The directory now carries the project's name; the tool-facing files inside it
    keep the tool's. akb init creates the new layout, and every command —
    discovery, path resolution, read/write, lint, templates, search — recognizes
    only it. There is no compatibility shim: a base in the old layout is reported
    as not a knowledge base, with the expected marker path named. Migrate an
    existing base by renaming the directory and config file (mv .akb .agent-kb && mv .agent-kb/.akb.yaml .agent-kb/akb.yaml) and updating the .akb/search.db*
    line in the base's .gitignore. Tool-named surfaces are unchanged: the
    AKB_KB environment variable, the *.akb.bak backup extension, and the
    page.akb CEL map key.
  • The on-disk layout now has one definition site. internal/path exports
    StateDirName, ConfigFileName, and the StateDir/ConfigPath/
    TemplatesDir/SearchDBPath helpers, replacing the ".akb" string literals
    scattered across the command and internal packages.

akb v0.19.1

Choose a tag to compare

@github-actions github-actions released this 25 Sep 11:53

Fixed

  • akb init stages and commits the new base through the index-lock retry. A concurrent
    process holding the git index lock no longer aborts the initial staging of base files;
    the retry now covers both stages.
  • The compute-budget error is identified by sentinel, not by text. internal/cel
    exports ErrComputeBudget, and a rule's evaluation error embeds the key names the rule
    reads — so text matching handed the budget remedy to rules whose field names collide with
    the phrase. Write-path dispatch now matches with errors.Is.
  • akb template get --example warns about every broken mockup rule, not just the first.
    Revalidation previously stopped at the first unevaluable rule, hiding later failures and
    dropping the variant's staleness headline. Every failed rule is collected, then named.
  • The template-load failure is the error reported, not a stale page-read error. When
    akb index add falls back to templates and the template set fails to load, the wrapped
    load error is surfaced — it names the cause where the old message named only the page;
    the per-file guard at the append, index-add, lint, and type-directory call sites keeps
    its own error, its classification, and its exit code.