flash-context 0.3.2__tar.gz → 0.4.0__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.
- {flash_context-0.3.2 → flash_context-0.4.0}/.env.example +5 -0
- {flash_context-0.3.2 → flash_context-0.4.0}/CHANGELOG.md +42 -0
- {flash_context-0.3.2 → flash_context-0.4.0}/PKG-INFO +11 -5
- {flash_context-0.3.2 → flash_context-0.4.0}/README.md +8 -4
- {flash_context-0.3.2 → flash_context-0.4.0}/config.yaml.example +3 -1
- {flash_context-0.3.2 → flash_context-0.4.0}/pyproject.toml +5 -1
- flash_context-0.4.0/src/flash_context/agent.py +848 -0
- flash_context-0.4.0/src/flash_context/citations.py +439 -0
- {flash_context-0.3.2 → flash_context-0.4.0}/src/flash_context/cli.py +5 -13
- {flash_context-0.3.2 → flash_context-0.4.0}/src/flash_context/config.py +53 -145
- flash_context-0.4.0/src/flash_context/execution.py +373 -0
- {flash_context-0.3.2 → flash_context-0.4.0}/src/flash_context/logging.py +2 -1
- {flash_context-0.3.2 → flash_context-0.4.0}/src/flash_context/mcp_server.py +0 -2
- flash_context-0.4.0/src/flash_context/queries.py +163 -0
- {flash_context-0.3.2 → flash_context-0.4.0}/src/flash_context/tools/glob.py +2 -2
- {flash_context-0.3.2 → flash_context-0.4.0}/src/flash_context/tools/grep.py +7 -12
- {flash_context-0.3.2 → flash_context-0.4.0}/src/flash_context/tools/read.py +2 -2
- {flash_context-0.3.2 → flash_context-0.4.0}/src/flash_context/tools/safety.py +6 -6
- {flash_context-0.3.2 → flash_context-0.4.0}/src/flash_context/types.py +91 -13
- flash_context-0.3.2/src/flash_context/agent.py +0 -1731
- {flash_context-0.3.2 → flash_context-0.4.0}/.gitignore +0 -0
- {flash_context-0.3.2 → flash_context-0.4.0}/LICENSE +0 -0
- {flash_context-0.3.2 → flash_context-0.4.0}/src/flash_context/__init__.py +0 -0
- {flash_context-0.3.2 → flash_context-0.4.0}/src/flash_context/llm.py +0 -0
- {flash_context-0.3.2 → flash_context-0.4.0}/src/flash_context/tools/__init__.py +0 -0
|
@@ -15,3 +15,8 @@ FLASH_CONTEXT_MAX_SCAN_BYTES=16777216
|
|
|
15
15
|
FLASH_CONTEXT_MAX_SCAN_ENTRIES=10000
|
|
16
16
|
FLASH_CONTEXT_TOOL_TIMEOUT_SECONDS=5
|
|
17
17
|
FLASH_CONTEXT_MAX_TOOL_CALLS_PER_TURN=16
|
|
18
|
+
|
|
19
|
+
# Controller-owned citation precision
|
|
20
|
+
FLASH_CONTEXT_MAX_CITATION_LINES=120
|
|
21
|
+
FLASH_CONTEXT_MAX_TOTAL_CITATION_LINES=240
|
|
22
|
+
FLASH_CONTEXT_MAX_PARSE_BYTES=1048576
|
|
@@ -4,6 +4,48 @@ User-visible changes and migration instructions for each release.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.4.0] - 2026-11-01
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Bundled parsers for controller-owned symbol and line-anchor boundaries, with
|
|
12
|
+
citation precision metadata and an opt-in pinned quality benchmark.
|
|
13
|
+
- Configurable per-citation, total-line and parser-byte limits (120, 240 and
|
|
14
|
+
1 MiB by default), supporting the existing configuration precedence.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Keep citation repair feedback local to each model turn; successful repair after
|
|
19
|
+
a tool-only turn no longer reports a precision failure. Preserve overlapping
|
|
20
|
+
anchor mappings, LF/CRLF source lines, and snippet/metadata source snapshots.
|
|
21
|
+
- Report parser input/deadline limits explicitly and use diagnostic identities
|
|
22
|
+
for truncation and CLI exit behavior.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- Consolidate contracts under `docs/`, remove planning scaffolds and separate
|
|
27
|
+
agent instructions, and keep contributor guidance in `CONTRIBUTING.md`.
|
|
28
|
+
Simplify query routing, configuration, loop finalization, test fixtures,
|
|
29
|
+
live evaluation, and CI jobs.
|
|
30
|
+
- Benchmark against independent reviewed ranges, recording package/parser
|
|
31
|
+
versions and effective settings. Live probes share the same pinned cases.
|
|
32
|
+
|
|
33
|
+
### Migration
|
|
34
|
+
|
|
35
|
+
- Models must propose symbol or single-line anchors; model-selected ranges receive
|
|
36
|
+
bounded correction feedback. Public line labels remain unchanged. Adjacent
|
|
37
|
+
definitions remain separate, and the final citation cap increases to twelve.
|
|
38
|
+
- Unselected read observations no longer become final citations. Consumers should
|
|
39
|
+
accept the additive precision object. Explicit user ranges retain old behavior.
|
|
40
|
+
- Parser dependencies ship with installation; exploration does not download grammars.
|
|
41
|
+
- CLI `--no-citation` now enables prose; `--citation` remains the default.
|
|
42
|
+
Remove the previously ignored `explorer.citation` YAML key. Python callers
|
|
43
|
+
should stop passing the ignored `load_settings(repo_root=...)` argument or
|
|
44
|
+
the adapter-only `ExploreRequest.format` field. `Citation` now requires both
|
|
45
|
+
line bounds; typed warnings use `Diagnostic` members and serialize as strings.
|
|
46
|
+
- Empty results after parser input/deadline exhaustion exit 6, matching scan
|
|
47
|
+
exhaustion. Ordinary syntax fallback and complete empty results still exit 0.
|
|
48
|
+
|
|
7
49
|
## [0.3.2] - 2026-11-01
|
|
8
50
|
|
|
9
51
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: flash-context
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Read-only context exploration and retrieval for AI agents, starting with codebases and repositories.
|
|
5
5
|
Project-URL: Repository, https://github.com/zyf0717/flash-context
|
|
6
6
|
Project-URL: Issues, https://github.com/zyf0717/flash-context/issues
|
|
@@ -17,6 +17,8 @@ Requires-Python: >=3.13
|
|
|
17
17
|
Requires-Dist: httpx>=0.28.0
|
|
18
18
|
Requires-Dist: pyyaml>=6.0.0
|
|
19
19
|
Requires-Dist: regex>=2026.9.29
|
|
20
|
+
Requires-Dist: tree-sitter-language-pack==0.13.0
|
|
21
|
+
Requires-Dist: tree-sitter==0.25.2
|
|
20
22
|
Provides-Extra: mcp
|
|
21
23
|
Requires-Dist: mcp<2,>=1.13.0; extra == 'mcp'
|
|
22
24
|
Description-Content-Type: text/markdown
|
|
@@ -36,7 +38,7 @@ source snippets.
|
|
|
36
38
|
|
|
37
39
|
CLI and MCP share a read-only core for exploring code, documentation,
|
|
38
40
|
configuration, and other local text files with path safety and resource limits.
|
|
39
|
-
See [safety and evidence validation](docs/
|
|
41
|
+
See [safety and evidence validation](docs/contracts.md#read-only-tools-and-safety)
|
|
40
42
|
for details and limitations.
|
|
41
43
|
|
|
42
44
|
Inspired by [FastContext](https://arxiv.org/abs/2606.14066), a now-withdrawn paper
|
|
@@ -67,10 +69,10 @@ Default output is repository-relative citations:
|
|
|
67
69
|
src/api/validation.py:42-88
|
|
68
70
|
```
|
|
69
71
|
|
|
70
|
-
Use `--format json` for
|
|
72
|
+
Use `--no-citation` for prose, `--format json` for results with snippets, or
|
|
71
73
|
`--max-turns 6` to set the exploration limit. Exact path and unique symbol
|
|
72
74
|
lookups can resolve locally without an endpoint. See the
|
|
73
|
-
[CLI contract](
|
|
75
|
+
[CLI contract](docs/cli.md) for options,
|
|
74
76
|
output schemas, and exit codes.
|
|
75
77
|
|
|
76
78
|
For example, `--query 'httpx/_client.py'` returns a bounded file preview, while
|
|
@@ -81,6 +83,10 @@ Warnings go to stderr in both output formats. An empty result after scan-budget
|
|
|
81
83
|
exhaustion exits **6** while preserving stdout; a complete empty search exits
|
|
82
84
|
**0**. For large repositories, see [scan-budget tuning](docs/configuration.md#large-repositories).
|
|
83
85
|
|
|
86
|
+
Models select symbol or line anchors; the controller resolves bounded syntax
|
|
87
|
+
regions and returns structural precision metadata. See the
|
|
88
|
+
[shared contract](docs/contracts.md) for evidence rules and limits.
|
|
89
|
+
|
|
84
90
|
## MCP
|
|
85
91
|
|
|
86
92
|
```bash
|
|
@@ -93,7 +99,7 @@ See [MCP integration](docs/mcp.md) for editor configuration and source launches.
|
|
|
93
99
|
## Documentation
|
|
94
100
|
|
|
95
101
|
- [Configuration](docs/configuration.md): endpoint settings, precedence, and limits.
|
|
96
|
-
- [Architecture and scope](docs/architecture.md):
|
|
102
|
+
- [Architecture and scope](docs/architecture.md): shared core and module responsibilities.
|
|
97
103
|
- [Contributing](CONTRIBUTING.md): development setup, tests, and pull requests.
|
|
98
104
|
- [Changelog](CHANGELOG.md): release history and migration instructions.
|
|
99
105
|
- [Releasing](docs/releasing.md): package checks and tag-driven TestPyPI/PyPI publishing.
|
|
@@ -13,7 +13,7 @@ source snippets.
|
|
|
13
13
|
|
|
14
14
|
CLI and MCP share a read-only core for exploring code, documentation,
|
|
15
15
|
configuration, and other local text files with path safety and resource limits.
|
|
16
|
-
See [safety and evidence validation](docs/
|
|
16
|
+
See [safety and evidence validation](docs/contracts.md#read-only-tools-and-safety)
|
|
17
17
|
for details and limitations.
|
|
18
18
|
|
|
19
19
|
Inspired by [FastContext](https://arxiv.org/abs/2606.14066), a now-withdrawn paper
|
|
@@ -44,10 +44,10 @@ Default output is repository-relative citations:
|
|
|
44
44
|
src/api/validation.py:42-88
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
Use `--format json` for
|
|
47
|
+
Use `--no-citation` for prose, `--format json` for results with snippets, or
|
|
48
48
|
`--max-turns 6` to set the exploration limit. Exact path and unique symbol
|
|
49
49
|
lookups can resolve locally without an endpoint. See the
|
|
50
|
-
[CLI contract](
|
|
50
|
+
[CLI contract](docs/cli.md) for options,
|
|
51
51
|
output schemas, and exit codes.
|
|
52
52
|
|
|
53
53
|
For example, `--query 'httpx/_client.py'` returns a bounded file preview, while
|
|
@@ -58,6 +58,10 @@ Warnings go to stderr in both output formats. An empty result after scan-budget
|
|
|
58
58
|
exhaustion exits **6** while preserving stdout; a complete empty search exits
|
|
59
59
|
**0**. For large repositories, see [scan-budget tuning](docs/configuration.md#large-repositories).
|
|
60
60
|
|
|
61
|
+
Models select symbol or line anchors; the controller resolves bounded syntax
|
|
62
|
+
regions and returns structural precision metadata. See the
|
|
63
|
+
[shared contract](docs/contracts.md) for evidence rules and limits.
|
|
64
|
+
|
|
61
65
|
## MCP
|
|
62
66
|
|
|
63
67
|
```bash
|
|
@@ -70,7 +74,7 @@ See [MCP integration](docs/mcp.md) for editor configuration and source launches.
|
|
|
70
74
|
## Documentation
|
|
71
75
|
|
|
72
76
|
- [Configuration](docs/configuration.md): endpoint settings, precedence, and limits.
|
|
73
|
-
- [Architecture and scope](docs/architecture.md):
|
|
77
|
+
- [Architecture and scope](docs/architecture.md): shared core and module responsibilities.
|
|
74
78
|
- [Contributing](CONTRIBUTING.md): development setup, tests, and pull requests.
|
|
75
79
|
- [Changelog](CHANGELOG.md): release history and migration instructions.
|
|
76
80
|
- [Releasing](docs/releasing.md): package checks and tag-driven TestPyPI/PyPI publishing.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
explorer:
|
|
2
2
|
max_turns: 6
|
|
3
|
-
|
|
3
|
+
max_citation_lines: 120
|
|
4
|
+
max_total_citation_lines: 240
|
|
4
5
|
ignore:
|
|
5
6
|
- ".git"
|
|
6
7
|
- ".venv"
|
|
@@ -20,6 +21,7 @@ model:
|
|
|
20
21
|
|
|
21
22
|
tools:
|
|
22
23
|
max_read_bytes: 12000
|
|
24
|
+
max_parse_bytes: 1048576
|
|
23
25
|
max_grep_results: 50
|
|
24
26
|
max_observation_chars: 6000
|
|
25
27
|
max_read_lines: 120
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "flash-context"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.4.0"
|
|
4
4
|
description = "Read-only context exploration and retrieval for AI agents, starting with codebases and repositories."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.13"
|
|
@@ -19,6 +19,8 @@ dependencies = [
|
|
|
19
19
|
"httpx>=0.28.0",
|
|
20
20
|
"PyYAML>=6.0.0",
|
|
21
21
|
"regex>=2026.9.29",
|
|
22
|
+
"tree-sitter==0.25.2",
|
|
23
|
+
"tree-sitter-language-pack==0.13.0",
|
|
22
24
|
]
|
|
23
25
|
|
|
24
26
|
[project.urls]
|
|
@@ -60,12 +62,14 @@ include = [
|
|
|
60
62
|
|
|
61
63
|
[tool.pytest.ini_options]
|
|
62
64
|
testpaths = ["tests"]
|
|
65
|
+
pythonpath = ["."]
|
|
63
66
|
norecursedirs = ["tests/fixtures"]
|
|
64
67
|
markers = [
|
|
65
68
|
"e2e: endpoint-backed opt-in end-to-end tests",
|
|
66
69
|
]
|
|
67
70
|
|
|
68
71
|
[tool.ruff]
|
|
72
|
+
extend-exclude = ["tests/fixtures/httpx_0_28_1"]
|
|
69
73
|
line-length = 88
|
|
70
74
|
target-version = "py313"
|
|
71
75
|
|