brainpick 0.8.3__tar.gz → 0.8.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {brainpick-0.8.3 → brainpick-0.8.4}/PKG-INFO +1 -1
- {brainpick-0.8.3 → brainpick-0.8.4}/pyproject.toml +1 -1
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/__init__.py +1 -1
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_releases/releases.yaml +21 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/sync.py +23 -2
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick.egg-info/PKG-INFO +1 -1
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_sync.py +31 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/README.md +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/setup.cfg +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/__main__.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_ritual/RITUAL.md +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_skill/SKILL.md +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/assets/Editor-K9XANZX_.js +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/assets/index-DOjNNQV2.js +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/assets/index-Dn6TTKMy.css +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/assets/virtual_pwa-register-vAnKLON8.js +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/assets/workbox-window.prod.es5-BBnX5xw4.js +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/assets/worker-CVB4_RMu.js +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/icons/apple-touch-icon.png +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/icons/favicon.svg +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/icons/icon-192.png +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/icons/icon-512.png +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/icons/icon-maskable-512.png +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/index.html +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/manifest.webmanifest +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/sw.js +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/workbox-a3c94b52.js +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/auth.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/cli.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/compile/__init__.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/compile/conventions.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/compile/pipeline.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/compile/similarity_gaps.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/compile/skills.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/compile/t1.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/compile/t2.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/compile/t3.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/compile/todos.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/config.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/core/__init__.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/core/bundle.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/core/canonical.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/core/frontmatter.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/core/fs.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/core/links.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/deltas.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/detect.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/embed.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/federation.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/integrate.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/kg.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/kgadapt/__init__.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/kgadapt/algorithmic.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/kgadapt/protocol.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/llm.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/mcp_server.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/merge.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/migrate.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/query/__init__.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/query/half_life.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/query/keyword.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/query/present.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/query/router.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/query/vectors.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/releases.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/scaffold.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/serve/__init__.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/serve/app.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/serve/live.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/serve/rest.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/serve/state.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/serve/watcher.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/skill_cmd.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/timeline.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/update.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/vectorstore.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick.egg-info/SOURCES.txt +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick.egg-info/dependency_links.txt +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick.egg-info/entry_points.txt +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick.egg-info/requires.txt +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick.egg-info/top_level.txt +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_auth.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_bundle.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_cli.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_config.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_conformance.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_conventions.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_deltas.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_detect.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_e2e_mcp.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_e2e_serve.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_federation.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_frontmatter.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_half_life.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_integrate.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_keyword.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_kg.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_links.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_llm.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_mcp_tools.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_merge.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_migrate.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_pipeline.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_present.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_releases.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_report.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_router.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_scaffold.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_serve_state.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_similarity_gaps.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_similarity_gaps_stage.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_skills.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_t1.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_t2_chunker.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_t2_embed.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_t2_stage.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_t2_store.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_t3_algorithmic.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_t3_backend.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_t3_export.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_t3_stage.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_timeline.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_todos.py +0 -0
- {brainpick-0.8.3 → brainpick-0.8.4}/tests/test_update.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "brainpick"
|
|
7
|
-
version = "0.8.
|
|
7
|
+
version = "0.8.4"
|
|
8
8
|
description = "A turn-key brain stack for agents: compile an OKF markdown bundle into a queryable, servable, visualizable brain."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -15,6 +15,27 @@
|
|
|
15
15
|
# area: brain | cli | mcp | search | config | compile | webui | docs
|
|
16
16
|
|
|
17
17
|
releases:
|
|
18
|
+
- version: 0.8.4
|
|
19
|
+
date: 2026-09-25
|
|
20
|
+
brain_format: 3
|
|
21
|
+
summary: >-
|
|
22
|
+
`brain_push` also stages the AGENTS.md report its own compile refreshed,
|
|
23
|
+
so a push of a subdirectory bundle no longer leaves the repo-root report
|
|
24
|
+
modified behind it.
|
|
25
|
+
agent_action: >-
|
|
26
|
+
If `brain_status` reports the checkout dirty right after a successful
|
|
27
|
+
`brain_push` and the only modified file is AGENTS.md, upgrade — the next
|
|
28
|
+
push carries it. Nothing to undo.
|
|
29
|
+
changes:
|
|
30
|
+
- kind: fixed
|
|
31
|
+
area: mcp
|
|
32
|
+
text: >-
|
|
33
|
+
The push staged the bundle pathspec only. The compile it runs first
|
|
34
|
+
rewrites the opt-in report block at the bundle root and at the repo
|
|
35
|
+
root above it (spec/20), both outside that pathspec for a
|
|
36
|
+
subdirectory bundle, so every push left the report uncommitted and
|
|
37
|
+
the remote's copy stale. The report files that carry the block are
|
|
38
|
+
now staged with the bundle; nothing is created.
|
|
18
39
|
- version: 0.8.3
|
|
19
40
|
date: 2026-09-25
|
|
20
41
|
brain_format: 3
|
|
@@ -342,6 +342,23 @@ def run_contract(root: str | Path, config=None) -> tuple[str, str | None]:
|
|
|
342
342
|
return "pass", None
|
|
343
343
|
|
|
344
344
|
|
|
345
|
+
def _report_pathspecs(root: Path, repo: Path) -> list[str]:
|
|
346
|
+
"""Repo-relative paths of the AGENTS.md files carrying a brainpick report block
|
|
347
|
+
(spec/20): the bundle root's and, when the bundle is a subdirectory, the repo
|
|
348
|
+
root's. Only files that exist and hold the block — never created here."""
|
|
349
|
+
from brainpick.compile.t1 import REPORT_BEGIN_PREFIX
|
|
350
|
+
|
|
351
|
+
out: list[str] = []
|
|
352
|
+
for base in {root.resolve(), repo.resolve()}:
|
|
353
|
+
agents = base / "AGENTS.md"
|
|
354
|
+
try:
|
|
355
|
+
if REPORT_BEGIN_PREFIX in agents.read_text(encoding="utf-8"):
|
|
356
|
+
out.append(os.path.relpath(agents, repo))
|
|
357
|
+
except OSError:
|
|
358
|
+
continue
|
|
359
|
+
return sorted(out)
|
|
360
|
+
|
|
361
|
+
|
|
345
362
|
def push_brain(state, message: str) -> dict:
|
|
346
363
|
"""spec/100 brain_push: compile, run the contract, stage the bundle, commit, push.
|
|
347
364
|
Hooks always run — no engine may pass --no-verify."""
|
|
@@ -401,12 +418,16 @@ def push_brain(state, message: str) -> dict:
|
|
|
401
418
|
# not the brain, and a tool that publishes on an agent's word must not sweep up
|
|
402
419
|
# work nobody reviewed.
|
|
403
420
|
pathspec = os.path.relpath(root, repo) or "."
|
|
404
|
-
|
|
421
|
+
# ...plus the opt-in AGENTS.md report the compile above just refreshed: it lives
|
|
422
|
+
# at the bundle root and, for a subdirectory bundle, at the repo root — outside
|
|
423
|
+
# the bundle pathspec, so it stayed modified after every push.
|
|
424
|
+
pathspecs = [pathspec] + _report_pathspecs(root, repo)
|
|
425
|
+
code, _, err = run_git(repo, "add", "--", *pathspecs)
|
|
405
426
|
if code != 0:
|
|
406
427
|
result["hint"] = f"git add failed: {err.strip()}"
|
|
407
428
|
return result
|
|
408
429
|
|
|
409
|
-
code, staged, _ = run_git(repo, "diff", "--cached", "--name-only", "--",
|
|
430
|
+
code, staged, _ = run_git(repo, "diff", "--cached", "--name-only", "--", *pathspecs)
|
|
410
431
|
if not staged.strip():
|
|
411
432
|
ahead = status["ahead"]
|
|
412
433
|
if ahead > 0: # nothing new to commit, but local commits still need sending
|
|
@@ -553,3 +553,34 @@ def test_push_runs_the_whole_contract_not_the_bundle_path(tmp_path, monkeypatch)
|
|
|
553
553
|
result = push_brain(state_for(local), "add uusi")
|
|
554
554
|
assert result["contract"] == "pass"
|
|
555
555
|
assert seen and seen[0][1:] == ["check", "--all"]
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
def test_push_stages_the_report_the_compile_refreshed_above_the_bundle(tmp_path):
|
|
559
|
+
"""brain_push compiles first, and a compile refreshes the opt-in AGENTS.md report
|
|
560
|
+
at the repo root above a subdirectory bundle. Staging only the bundle left that
|
|
561
|
+
report modified after every push — the remote's copy went stale and the next
|
|
562
|
+
brain_status called the checkout dirty."""
|
|
563
|
+
from brainpick.integrate import _REPORT_PLACEHOLDER
|
|
564
|
+
|
|
565
|
+
repo = tmp_path / "repo"
|
|
566
|
+
repo.mkdir()
|
|
567
|
+
shutil.copytree(FIXTURE_BUNDLES / "kotiaurinko", repo / "_brain")
|
|
568
|
+
(repo / "brainpick.toml").write_text('[bundle]\nroot = "_brain"\n', encoding="utf-8")
|
|
569
|
+
(repo / "AGENTS.md").write_text("# Agents\n\n" + _REPORT_PLACEHOLDER + "\n", encoding="utf-8")
|
|
570
|
+
git(tmp_path, "init", "-q", str(repo))
|
|
571
|
+
git(repo, "config", "user.email", "t@example.com")
|
|
572
|
+
git(repo, "config", "user.name", "T")
|
|
573
|
+
git(repo, "add", "-A")
|
|
574
|
+
git(repo, "commit", "-qm", "seed")
|
|
575
|
+
origin = tmp_path / "origin.git"
|
|
576
|
+
git(tmp_path, "clone", "-q", "--bare", str(repo), str(origin))
|
|
577
|
+
git(repo, "remote", "add", "origin", str(origin))
|
|
578
|
+
git(repo, "fetch", "-q", "origin")
|
|
579
|
+
git(repo, "branch", "--set-upstream-to", f"origin/{branch_of(repo)}", branch_of(repo))
|
|
580
|
+
(repo / "_brain" / "uusi.md").write_text(
|
|
581
|
+
"---\ntype: Concept\ntitle: Uusi\ndescription: d\n---\n\n# Uusi\n", encoding="utf-8")
|
|
582
|
+
|
|
583
|
+
result = push_brain(ServeState(repo / "_brain", load_config(repo)), "add uusi")
|
|
584
|
+
assert result["ok"] is True and result["pushed"] is True
|
|
585
|
+
assert "brainpick:begin report" in (repo / "AGENTS.md").read_text(encoding="utf-8")
|
|
586
|
+
assert "AGENTS.md" not in git(repo, "status", "--porcelain")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/assets/virtual_pwa-register-vAnKLON8.js
RENAMED
|
File without changes
|
{brainpick-0.8.3 → brainpick-0.8.4}/src/brainpick/_static/assets/workbox-window.prod.es5-BBnX5xw4.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|