robo-cortex 0.4.0__tar.gz → 0.4.2__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.
Files changed (85) hide show
  1. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/.gitignore +1 -0
  2. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/CHANGELOG.md +10 -0
  3. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/PKG-INFO +14 -4
  4. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/README.md +13 -3
  5. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/__init__.py +1 -1
  6. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/mcp_server.py +48 -10
  7. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_smoke.py +1 -1
  8. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/LICENSE +0 -0
  9. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/pyproject.toml +0 -0
  10. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/schema.sql +0 -0
  11. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/__init__.py +0 -0
  12. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/__main__.py +0 -0
  13. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/_common.py +0 -0
  14. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/_output.py +0 -0
  15. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/app.py +0 -0
  16. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/__init__.py +0 -0
  17. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/affected.py +0 -0
  18. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/completion.py +0 -0
  19. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/evidence.py +0 -0
  20. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/hooks.py +0 -0
  21. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/init.py +0 -0
  22. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/link.py +0 -0
  23. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/list_cmd.py +0 -0
  24. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/mcp.py +0 -0
  25. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/record.py +0 -0
  26. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/retrieve.py +0 -0
  27. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/search.py +0 -0
  28. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/show.py +0 -0
  29. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/status.py +0 -0
  30. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/cli/commands/transfer.py +0 -0
  31. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/__init__.py +0 -0
  32. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/assumptions.py +0 -0
  33. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/db.py +0 -0
  34. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/errors.py +0 -0
  35. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/evidence.py +0 -0
  36. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/git.py +0 -0
  37. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/hooks.py +0 -0
  38. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/init.py +0 -0
  39. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/invalidate.py +0 -0
  40. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/lifecycle.py +0 -0
  41. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/memory.py +0 -0
  42. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/retrieve.py +0 -0
  43. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/semantic.py +0 -0
  44. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/store.py +0 -0
  45. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/text.py +0 -0
  46. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/core/transfer.py +0 -0
  47. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/gitea.py +0 -0
  48. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/migrations/0001_init.sql +0 -0
  49. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/migrations/0002_add_usage_tracking.sql +0 -0
  50. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/migrations/0003_add_meta_table.sql +0 -0
  51. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/src/robo_cortex/sdk.py +0 -0
  52. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/__init__.py +0 -0
  53. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/conftest.py +0 -0
  54. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/fixtures.py +0 -0
  55. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_add_path.py +0 -0
  56. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_affected.py +0 -0
  57. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_assumptions.py +0 -0
  58. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_cli_affected.py +0 -0
  59. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_cli_init.py +0 -0
  60. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_cli_lifecycle.py +0 -0
  61. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_cli_record.py +0 -0
  62. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_cli_retrieve.py +0 -0
  63. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_cli_scope_b.py +0 -0
  64. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_completion.py +0 -0
  65. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_curation.py +0 -0
  66. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_db.py +0 -0
  67. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_evidence.py +0 -0
  68. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_gitea.py +0 -0
  69. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_hooks.py +0 -0
  70. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_init.py +0 -0
  71. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_invalidate.py +0 -0
  72. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_lifecycle.py +0 -0
  73. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_mcp_contracts.py +0 -0
  74. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_mcp_stdio.py +0 -0
  75. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_memory.py +0 -0
  76. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_output.py +0 -0
  77. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_record_batch.py +0 -0
  78. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_retrieve.py +0 -0
  79. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_reverify.py +0 -0
  80. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_scope_b.py +0 -0
  81. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_sdk.py +0 -0
  82. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_search.py +0 -0
  83. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_semantic.py +0 -0
  84. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_transfer.py +0 -0
  85. {robo_cortex-0.4.0 → robo_cortex-0.4.2}/tests/test_update_path.py +0 -0
@@ -14,3 +14,4 @@ htmlcov/
14
14
  .cortex/
15
15
  .claude/
16
16
  .commandcode/
17
+ bench-work/
@@ -4,6 +4,16 @@ All notable changes to this project are documented here. Format loosely follows
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.4.2] — 2026-07-26
8
+
9
+ ### Changed
10
+
11
+ - **`list_affected` MCP tool documentation.** Gave the tool a full `description=` (matching the other high-value tools) and per-parameter `Field` descriptions for `diff_range`/`staged`/`working`. The description now states concretely what the tool returns, excludes terminal-status memories, and — most importantly — spells out *when* to reach for it versus `retrieve_context` and `search_memory` (it is diff-driven, mapping a code delta to the memories that depend on it, not a task- or keyword-driven read). Documentation only; no behavior change. Raises the tool's Glama quality-score dimensions (behavior, completeness, parameters, purpose, usage guidelines).
12
+
13
+ ## [0.4.1] — 2026-07-15
14
+
15
+ Adds the `mcp-name` ownership-verification marker to the README, required to publish robo-cortex to the official MCP Registry (registry.modelcontextprotocol.io). No functional changes.
16
+
7
17
  ## [0.4.0] — 2026-07-15
8
18
 
9
19
  First public PyPI release. All changes below were already complete in the unpublished `0.3.1` local build — this version bump exists solely to mark the public debut, not to introduce new behavior.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: robo-cortex
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Long-term memory system for LLM coding agents working inside a Git repository
5
5
  Project-URL: Homepage, https://robotel.top
6
6
  Project-URL: Repository, https://github.com/robotel-limited/robo-cortex
@@ -29,7 +29,17 @@ Description-Content-Type: text/markdown
29
29
 
30
30
  # robo-cortex
31
31
 
32
- **A git-aware, evidence-based memory store for AI coding agents.**
32
+ <!-- mcp-name: io.github.robotel-limited/robo-cortex -->
33
+
34
+ [![PyPI version](https://badge.fury.io/py/robo-cortex.svg)](https://pypi.org/project/robo-cortex/)
35
+ [![Python Versions](https://img.shields.io/pypi/pyversions/robo-cortex.svg)](https://pypi.org/project/robo-cortex/)
36
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
37
+ [![Smithery Calls](https://smithery.ai/badge/robotel-top/robo-cortex)](https://smithery.ai/servers/robotel-top/robo-cortex)
38
+ [![robo-cortex MCP server](https://glama.ai/mcp/servers/robotel-limited/robo-cortex/badges/score.svg)](https://glama.ai/mcp/servers/robotel-limited/robo-cortex)
39
+
40
+ [![robo-cortex MCP server](https://glama.ai/mcp/servers/robotel-limited/robo-cortex/badges/card.svg)](https://glama.ai/mcp/servers/robotel-limited/robo-cortex)
41
+
42
+ **Git-aware knowledge integrity for AI coding agents.**
33
43
 
34
44
  Your AI agent debugs a bug, learns the lesson, and forgets it by next week — or worse, keeps citing a "lesson" that the code has since made false. robo-cortex is a local knowledge base built for that specific failure mode: memories are anchored to git blob hashes, so when the code they're about changes, the memory is automatically flagged for review instead of being silently trusted or silently lost.
35
45
 
@@ -44,9 +54,9 @@ Most agent-memory tools are embeddings + a vector database + a cloud dependency.
44
54
  3. **Zero dependencies, fully local.** Pure stdlib + SQLite (FTS5 for search). No embeddings, no API keys, no network calls unless you explicitly configure Gitea evidence verification. `.cortex/memory.db` is just a file — inspect it with `sqlite3` any time.
45
55
  4. **A real lifecycle with an audit trail.** Every status change (`active` → `superseded` → `archived`, etc.) requires a `--reason`, permanently recorded. Nothing disappears silently; wrong lessons are marked `invalidated`, not deleted.
46
56
 
47
- ## Pilot measurement (informative, not definitive)
57
+ ## Measured impact (benchmark, honestly stated)
48
58
 
49
- A small, real evaluation pilot (3 runs per arm, **one task only**) measured **2.7% fewer tokens and 10.6% less wall-clock time** with robo-cortex versus without, at equal fix quality. This is a real but modest signal from a limited sample see [EVALUATION.md](https://github.com/robotel-limited/robo-cortex/blob/main/EVALUATION.md) §9 for full methodology and caveats. Key limitations: n=3/arm (too small to generalize), one task type (may not represent typical workloads), and token-accounting asymmetry (doesn't credit avoided re-debugging when a stale lesson is caught before being retried, which is the real value proposition). We'd rather publish a modest number we measured than a dramatic one we didn't. **Not a benchmark** a proof of concept that robo-cortex doesn't hurt wall-clock time in a realistic scenario, and may help on tokens. Definitive performance claims await a larger study across more task types.
59
+ A 30-session benchmark (3 real historical bugs from this repo, re-introduced and solved 10× each by a small model Claude Haiku 4.5 — with and without a robo-cortex memory pack) measured, at **identical fix quality (30/30 correct, zero disqualifications)**: **~12% fewer fresh tokens and ~15% lower API-equivalent cost** (medians of paired per-task deltas), scaling up to **−26% tokens / −39% cost** on the task whose fix was hardest to locate unaided. Recording a lesson was itself metered: **a memory pays for itself after ~1–6 sessions that reuse it** (median ≈ 5). We make **no wall-clock claim** time differences were noise-dominated. Full methodology, per-run raw evidence (usage logs, diffs, prompts), and the reusable harness are in the repo: [docs/benchmark-results.md](https://github.com/robotel-limited/robo-cortex/blob/main/docs/benchmark-results.md), [benchmark-results-20260718/](https://github.com/robotel-limited/robo-cortex/tree/main/benchmark-results-20260718), [scripts/benchmark/](https://github.com/robotel-limited/robo-cortex/tree/main/scripts/benchmark). Known limits, stated plainly: one subject model (small an earlier n=3 pilot on a larger model measured a smaller 2.7% effect, see [EVALUATION.md](https://github.com/robotel-limited/robo-cortex/blob/main/EVALUATION.md) §9), one well-documented codebase (likely compresses the effect), 3 task types. We'd rather publish a modest number we measured than a dramatic one we didn't.
50
60
 
51
61
  ---
52
62
 
@@ -1,6 +1,16 @@
1
1
  # robo-cortex
2
2
 
3
- **A git-aware, evidence-based memory store for AI coding agents.**
3
+ <!-- mcp-name: io.github.robotel-limited/robo-cortex -->
4
+
5
+ [![PyPI version](https://badge.fury.io/py/robo-cortex.svg)](https://pypi.org/project/robo-cortex/)
6
+ [![Python Versions](https://img.shields.io/pypi/pyversions/robo-cortex.svg)](https://pypi.org/project/robo-cortex/)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
+ [![Smithery Calls](https://smithery.ai/badge/robotel-top/robo-cortex)](https://smithery.ai/servers/robotel-top/robo-cortex)
9
+ [![robo-cortex MCP server](https://glama.ai/mcp/servers/robotel-limited/robo-cortex/badges/score.svg)](https://glama.ai/mcp/servers/robotel-limited/robo-cortex)
10
+
11
+ [![robo-cortex MCP server](https://glama.ai/mcp/servers/robotel-limited/robo-cortex/badges/card.svg)](https://glama.ai/mcp/servers/robotel-limited/robo-cortex)
12
+
13
+ **Git-aware knowledge integrity for AI coding agents.**
4
14
 
5
15
  Your AI agent debugs a bug, learns the lesson, and forgets it by next week — or worse, keeps citing a "lesson" that the code has since made false. robo-cortex is a local knowledge base built for that specific failure mode: memories are anchored to git blob hashes, so when the code they're about changes, the memory is automatically flagged for review instead of being silently trusted or silently lost.
6
16
 
@@ -15,9 +25,9 @@ Most agent-memory tools are embeddings + a vector database + a cloud dependency.
15
25
  3. **Zero dependencies, fully local.** Pure stdlib + SQLite (FTS5 for search). No embeddings, no API keys, no network calls unless you explicitly configure Gitea evidence verification. `.cortex/memory.db` is just a file — inspect it with `sqlite3` any time.
16
26
  4. **A real lifecycle with an audit trail.** Every status change (`active` → `superseded` → `archived`, etc.) requires a `--reason`, permanently recorded. Nothing disappears silently; wrong lessons are marked `invalidated`, not deleted.
17
27
 
18
- ## Pilot measurement (informative, not definitive)
28
+ ## Measured impact (benchmark, honestly stated)
19
29
 
20
- A small, real evaluation pilot (3 runs per arm, **one task only**) measured **2.7% fewer tokens and 10.6% less wall-clock time** with robo-cortex versus without, at equal fix quality. This is a real but modest signal from a limited sample see [EVALUATION.md](https://github.com/robotel-limited/robo-cortex/blob/main/EVALUATION.md) §9 for full methodology and caveats. Key limitations: n=3/arm (too small to generalize), one task type (may not represent typical workloads), and token-accounting asymmetry (doesn't credit avoided re-debugging when a stale lesson is caught before being retried, which is the real value proposition). We'd rather publish a modest number we measured than a dramatic one we didn't. **Not a benchmark** a proof of concept that robo-cortex doesn't hurt wall-clock time in a realistic scenario, and may help on tokens. Definitive performance claims await a larger study across more task types.
30
+ A 30-session benchmark (3 real historical bugs from this repo, re-introduced and solved 10× each by a small model Claude Haiku 4.5 — with and without a robo-cortex memory pack) measured, at **identical fix quality (30/30 correct, zero disqualifications)**: **~12% fewer fresh tokens and ~15% lower API-equivalent cost** (medians of paired per-task deltas), scaling up to **−26% tokens / −39% cost** on the task whose fix was hardest to locate unaided. Recording a lesson was itself metered: **a memory pays for itself after ~1–6 sessions that reuse it** (median ≈ 5). We make **no wall-clock claim** time differences were noise-dominated. Full methodology, per-run raw evidence (usage logs, diffs, prompts), and the reusable harness are in the repo: [docs/benchmark-results.md](https://github.com/robotel-limited/robo-cortex/blob/main/docs/benchmark-results.md), [benchmark-results-20260718/](https://github.com/robotel-limited/robo-cortex/tree/main/benchmark-results-20260718), [scripts/benchmark/](https://github.com/robotel-limited/robo-cortex/tree/main/scripts/benchmark). Known limits, stated plainly: one subject model (small an earlier n=3 pilot on a larger model measured a smaller 2.7% effect, see [EVALUATION.md](https://github.com/robotel-limited/robo-cortex/blob/main/EVALUATION.md) §9), one well-documented codebase (likely compresses the effect), 3 task types. We'd rather publish a modest number we measured than a dramatic one we didn't.
21
31
 
22
32
  ---
23
33
 
@@ -1,4 +1,4 @@
1
- __version__ = "0.4.0"
1
+ __version__ = "0.4.2"
2
2
 
3
3
  from robo_cortex.sdk import RoboCortex, retrieve, record, search
4
4
 
@@ -26,7 +26,10 @@ description and dropped the prompt-injection framing below. Caught by
26
26
  testing the actual mechanism before relying on it, not by inspection.
27
27
  """
28
28
 
29
+ from typing import Annotated
30
+
29
31
  from mcp.server.fastmcp import FastMCP
32
+ from pydantic import Field
30
33
 
31
34
  from .core.errors import NotFoundError
32
35
  from .core.evidence import attach_evidence as core_attach_evidence
@@ -85,6 +88,20 @@ _VERIFY_EVIDENCE_DESCRIPTION = (
85
88
  "when this is called). `scope` disambiguates an evidence_id that "
86
89
  "collides between the repo and global stores. " + _COMMAND_IS_DATA
87
90
  )
91
+ _LIST_AFFECTED_DESCRIPTION = (
92
+ "Report which stored memories a git diff puts at risk because it touches "
93
+ "a code file they are anchored to -- the proactive half of invalidation. "
94
+ 'Returns {"data": [{"id", "statement", "reason"}], "matched": N}; each '
95
+ "`reason` names the offending path and diff source, e.g. "
96
+ "`path_changed:src/scanner.py@working_tree`. Terminal-status memories "
97
+ "(superseded/invalidated/abandoned/archived) are excluded -- already "
98
+ "history. Use it when you are about to change, or have just changed, code "
99
+ "and want to know which memories that change endangers: it is "
100
+ "diff-driven, mapping a code delta to the memories that depend on it -- "
101
+ "unlike retrieve_context (natural-language task -> context pack) and "
102
+ "search_memory (keyword query). Runs the staleness refresh first, so "
103
+ "drift already committed is flagged before the diff-scoped report."
104
+ )
88
105
 
89
106
 
90
107
  def build_server(repo_arg: str | None = None) -> FastMCP:
@@ -221,18 +238,39 @@ def build_server(repo_arg: str | None = None) -> FastMCP:
221
238
  status=status, limit=limit, global_conn=global_conn,
222
239
  )
223
240
 
224
- @server.tool(name="list_affected")
241
+ @server.tool(name="list_affected", description=_LIST_AFFECTED_DESCRIPTION)
225
242
  def list_affected_tool(
226
- diff_range: str | None = None,
227
- staged: bool = False,
228
- working: bool = False,
243
+ diff_range: Annotated[
244
+ str | None,
245
+ Field(
246
+ description=(
247
+ "Optional committed range in git syntax, e.g. 'HEAD~3..HEAD'. "
248
+ "Memories are compared against the range's end content. Takes "
249
+ "precedence over `staged`/`working` if more than one is given."
250
+ )
251
+ ),
252
+ ] = None,
253
+ staged: Annotated[
254
+ bool,
255
+ Field(
256
+ description=(
257
+ "Inspect only staged changes (`git diff --cached`). "
258
+ "Ignored if `diff_range` is set."
259
+ )
260
+ ),
261
+ ] = False,
262
+ working: Annotated[
263
+ bool,
264
+ Field(
265
+ description=(
266
+ "Inspect only unstaged working-tree changes (`git diff`). "
267
+ "Ignored if `diff_range` is set. When `diff_range`, `staged`, "
268
+ "and `working` are all omitted, staged and unstaged changes are "
269
+ "inspected together (`git diff HEAD`)."
270
+ )
271
+ ),
272
+ ] = False,
229
273
  ) -> dict:
230
- """What does a diff put at risk -- the proactive half of
231
- invalidation. Default (all omitted): working tree + staged combined.
232
- Runs the staleness refresh first, so anything already committed
233
- since the last check is flagged/healed for real before the
234
- diff-scoped report is computed.
235
- """
236
274
  return core_affected(
237
275
  local_conn, repo_root, diff_range=diff_range, staged=staged, working=working
238
276
  )
@@ -2,4 +2,4 @@ from robo_cortex import __version__
2
2
 
3
3
 
4
4
  def test_version_is_set():
5
- assert __version__ == "0.4.0"
5
+ assert __version__ == "0.4.2"
File without changes
File without changes
File without changes