context-loader 1.3.6__tar.gz → 1.3.7__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: context-loader
3
- Version: 1.3.6
3
+ Version: 1.3.7
4
4
  Summary: Render deterministic local Git context for any executor
5
5
  License: Apache License
6
6
  Version 2.0, January 2004
@@ -219,14 +219,14 @@ Python standard library.
219
219
 
220
220
  ## Open-source quick start
221
221
 
222
- Current stable release: **1.3.6**. Local CLI for coding-agent workflows; renders deterministic Markdown or JSON.
222
+ Current stable release: **1.3.7**. Local CLI for coding-agent workflows; renders deterministic Markdown or JSON.
223
223
 
224
224
  ```bash
225
- uv tool install 'context-loader==1.3.6'
225
+ uv tool install 'context-loader==1.3.7'
226
226
  ```
227
227
 
228
228
  ```bash
229
- pip install 'context-loader==1.3.6'
229
+ pip install 'context-loader==1.3.7'
230
230
  ```
231
231
 
232
232
  ```bash
@@ -239,21 +239,21 @@ project-context --repo /path/to/repo --format json
239
239
 
240
240
  ## Install
241
241
 
242
- Source version: `1.3.6`. Install its matching published release or an exact source commit.
242
+ Source version: `1.3.7`. Install its matching published release or an exact source commit.
243
243
 
244
244
  Install via `uv`:
245
245
 
246
246
  ```bash
247
- uv tool install 'context-loader==1.3.6'
247
+ uv tool install 'context-loader==1.3.7'
248
248
  ```
249
249
 
250
250
  Install via `pip`:
251
251
 
252
252
  ```bash
253
- pip install 'context-loader==1.3.6'
253
+ pip install 'context-loader==1.3.7'
254
254
  ```
255
255
 
256
- For development or source-based installs tracking current repository (`1.3.6`):
256
+ For development or source-based installs tracking current repository (`1.3.7`):
257
257
 
258
258
  ```bash
259
259
  uv tool install git+https://github.com/xuanheng-tech/context-loader.git
@@ -350,7 +350,7 @@ set differs, as described under “Compact model consumption”. The declared co
350
350
  "schema_version": 3,
351
351
  "tool": {
352
352
  "name": "context-loader",
353
- "version": "1.3.6"
353
+ "version": "1.3.7"
354
354
  },
355
355
  "repository": {
356
356
  "requested_path": "/canonical/requested/path",
@@ -470,7 +470,7 @@ although 1.1.0 added the top-level `statuses` key. From release 1.2.0 onward eac
470
470
  names exactly one key set, and a new number is issued whenever a key set would otherwise be reused.
471
471
 
472
472
  The JSON schema version and package version are independent: this build emits `schema_version` `3`
473
- for `--format json` and `4` for `--format json-compact`, while `tool.version` is `1.3.6`. Version 1
473
+ for `--format json` and `4` for `--format json-compact`, while `tool.version` is `1.3.7`. Version 1
474
474
  and 2 are the exact shapes already published in release 1.2.0 and are never reused: because
475
475
  `nested_context` changes the default document's key set, version 3 names the current full-document
476
476
  key set and version 4 names the compact projection.
@@ -526,6 +526,13 @@ so `CI` does not match `special`. Existing stopwords, scoring and byte budgets s
526
526
  a Han term in a heading and body does not increase its score. This is literal matching without word
527
527
  segmentation, synonyms or translation.
528
528
 
529
+ Two distinct eligible focus terms in the same section body can select that section even when its
530
+ heading does not contain them; a single incidental body term is not enough on its own. Heading
531
+ terms keep their stronger weighting. Generic directory components such as `packages`,
532
+ `data` and `research` are ignored as path terms; exact path occurrences and specific components
533
+ remain eligible. For long instructions, use terms from the actual headings or rule text and inspect
534
+ the omitted-heading index before assuming a rule is absent.
535
+
529
536
  `Omitted source characters` is measured against the whole normalized source, so a bounded source
530
537
  scan that ends before EOF still reports the characters it could not select.
531
538
 
@@ -655,7 +662,7 @@ or candidate-file content.
655
662
 
656
663
  ## Not Included
657
664
 
658
- Version 1.3.6 does not provide AI summaries, project-type detection, loading or transport of
665
+ Version 1.3.7 does not provide AI summaries, project-type detection, loading or transport of
659
666
  nested `AGENTS.md` contents (the JSON `nested_context` field reports bounded existence only),
660
667
  Memory retrieval, semantic ranking, ignore-rule parsing, plugins, profiles, caches, databases,
661
668
  network services, MCP, daemons, GUIs, CI/CD, telemetry, or automatic updates.
@@ -8,14 +8,14 @@ Python standard library.
8
8
 
9
9
  ## Open-source quick start
10
10
 
11
- Current stable release: **1.3.6**. Local CLI for coding-agent workflows; renders deterministic Markdown or JSON.
11
+ Current stable release: **1.3.7**. Local CLI for coding-agent workflows; renders deterministic Markdown or JSON.
12
12
 
13
13
  ```bash
14
- uv tool install 'context-loader==1.3.6'
14
+ uv tool install 'context-loader==1.3.7'
15
15
  ```
16
16
 
17
17
  ```bash
18
- pip install 'context-loader==1.3.6'
18
+ pip install 'context-loader==1.3.7'
19
19
  ```
20
20
 
21
21
  ```bash
@@ -28,21 +28,21 @@ project-context --repo /path/to/repo --format json
28
28
 
29
29
  ## Install
30
30
 
31
- Source version: `1.3.6`. Install its matching published release or an exact source commit.
31
+ Source version: `1.3.7`. Install its matching published release or an exact source commit.
32
32
 
33
33
  Install via `uv`:
34
34
 
35
35
  ```bash
36
- uv tool install 'context-loader==1.3.6'
36
+ uv tool install 'context-loader==1.3.7'
37
37
  ```
38
38
 
39
39
  Install via `pip`:
40
40
 
41
41
  ```bash
42
- pip install 'context-loader==1.3.6'
42
+ pip install 'context-loader==1.3.7'
43
43
  ```
44
44
 
45
- For development or source-based installs tracking current repository (`1.3.6`):
45
+ For development or source-based installs tracking current repository (`1.3.7`):
46
46
 
47
47
  ```bash
48
48
  uv tool install git+https://github.com/xuanheng-tech/context-loader.git
@@ -139,7 +139,7 @@ set differs, as described under “Compact model consumption”. The declared co
139
139
  "schema_version": 3,
140
140
  "tool": {
141
141
  "name": "context-loader",
142
- "version": "1.3.6"
142
+ "version": "1.3.7"
143
143
  },
144
144
  "repository": {
145
145
  "requested_path": "/canonical/requested/path",
@@ -259,7 +259,7 @@ although 1.1.0 added the top-level `statuses` key. From release 1.2.0 onward eac
259
259
  names exactly one key set, and a new number is issued whenever a key set would otherwise be reused.
260
260
 
261
261
  The JSON schema version and package version are independent: this build emits `schema_version` `3`
262
- for `--format json` and `4` for `--format json-compact`, while `tool.version` is `1.3.6`. Version 1
262
+ for `--format json` and `4` for `--format json-compact`, while `tool.version` is `1.3.7`. Version 1
263
263
  and 2 are the exact shapes already published in release 1.2.0 and are never reused: because
264
264
  `nested_context` changes the default document's key set, version 3 names the current full-document
265
265
  key set and version 4 names the compact projection.
@@ -315,6 +315,13 @@ so `CI` does not match `special`. Existing stopwords, scoring and byte budgets s
315
315
  a Han term in a heading and body does not increase its score. This is literal matching without word
316
316
  segmentation, synonyms or translation.
317
317
 
318
+ Two distinct eligible focus terms in the same section body can select that section even when its
319
+ heading does not contain them; a single incidental body term is not enough on its own. Heading
320
+ terms keep their stronger weighting. Generic directory components such as `packages`,
321
+ `data` and `research` are ignored as path terms; exact path occurrences and specific components
322
+ remain eligible. For long instructions, use terms from the actual headings or rule text and inspect
323
+ the omitted-heading index before assuming a rule is absent.
324
+
318
325
  `Omitted source characters` is measured against the whole normalized source, so a bounded source
319
326
  scan that ends before EOF still reports the characters it could not select.
320
327
 
@@ -444,7 +451,7 @@ or candidate-file content.
444
451
 
445
452
  ## Not Included
446
453
 
447
- Version 1.3.6 does not provide AI summaries, project-type detection, loading or transport of
454
+ Version 1.3.7 does not provide AI summaries, project-type detection, loading or transport of
448
455
  nested `AGENTS.md` contents (the JSON `nested_context` field reports bounded existence only),
449
456
  Memory retrieval, semantic ranking, ignore-rule parsing, plugins, profiles, caches, databases,
450
457
  network services, MCP, daemons, GUIs, CI/CD, telemetry, or automatic updates.
@@ -1,3 +1,3 @@
1
1
  """Project Context Loader."""
2
2
 
3
- __version__ = "1.3.6"
3
+ __version__ = "1.3.7"
@@ -118,9 +118,11 @@ _PATH_TOKEN_STOPWORDS = _MATCH_TOKEN_STOPWORDS | {
118
118
  "py",
119
119
  "python",
120
120
  "quant",
121
+ "research",
121
122
  "scripts",
122
123
  "src",
123
124
  }
125
+ _MIN_SECTION_RELEVANCE = 4
124
126
  _SELECTION_REASON_ORDER = (
125
127
  "head",
126
128
  "focus_match",
@@ -371,7 +373,11 @@ def _section_relevance(
371
373
  focus_body = _matched_terms(signals.focus_tokens, body_tokens) - focus_heading
372
374
  if focus_heading or focus_body:
373
375
  reasons.add("focus_match")
374
- score += 6 * len(focus_heading) + len(focus_body)
376
+ focus_score = 6 * len(focus_heading) + len(focus_body)
377
+ # Two distinct terms in one body suffice without outranking a heading match.
378
+ if len(focus_body) >= 2:
379
+ focus_score = max(_MIN_SECTION_RELEVANCE, focus_score)
380
+ score += focus_score
375
381
 
376
382
  path_heading = _matched_terms(signals.path_tokens, heading_tokens)
377
383
  path_body = _matched_terms(signals.path_tokens, body_tokens) - path_heading
@@ -560,7 +566,7 @@ def _select_agents_content(source: CollectedFile, signals: _SelectionSignals) ->
560
566
  for index, section in enumerate(sections):
561
567
  if signals.focus_tokens or signals.path_tokens or signals.normalized_path:
562
568
  score, section_reasons = _section_relevance(section, signals)
563
- if score >= 4:
569
+ if score >= _MIN_SECTION_RELEVANCE:
564
570
  ranked.append((score, index, section_reasons))
565
571
  ranked.sort(key=lambda item: (-item[0], sections[item[1]].start))
566
572
 
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "context-loader"
7
- version = "1.3.6"
7
+ version = "1.3.7"
8
8
  description = "Render deterministic local Git context for any executor"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12,<3.15"
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "context-loader"
7
- version = "1.3.6"
7
+ version = "1.3.7"
8
8
  description = "Render deterministic local Git context for any executor"
9
9
  license = { file = "LICENSE" }
10
10
  readme = "README.md"
@@ -46,5 +46,5 @@
46
46
  ],
47
47
  "schema_version": 1,
48
48
  "tool_name": "context-loader",
49
- "tool_version": "1.3.6"
49
+ "tool_version": "1.3.7"
50
50
  }
File without changes