context-loader 1.3.7__tar.gz → 1.3.9__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.7
3
+ Version: 1.3.9
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.7**. Local CLI for coding-agent workflows; renders deterministic Markdown or JSON.
222
+ Current stable release: **1.3.9**. Local CLI for coding-agent workflows; renders deterministic Markdown or JSON.
223
223
 
224
224
  ```bash
225
- uv tool install 'context-loader==1.3.7'
225
+ uv tool install 'context-loader==1.3.9'
226
226
  ```
227
227
 
228
228
  ```bash
229
- pip install 'context-loader==1.3.7'
229
+ pip install 'context-loader==1.3.9'
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.7`. Install its matching published release or an exact source commit.
242
+ Source version: `1.3.9`. 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.7'
247
+ uv tool install 'context-loader==1.3.9'
248
248
  ```
249
249
 
250
250
  Install via `pip`:
251
251
 
252
252
  ```bash
253
- pip install 'context-loader==1.3.7'
253
+ pip install 'context-loader==1.3.9'
254
254
  ```
255
255
 
256
- For development or source-based installs tracking current repository (`1.3.7`):
256
+ For development or source-based installs tracking current repository (`1.3.9`):
257
257
 
258
258
  ```bash
259
259
  uv tool install git+https://github.com/xuanheng-tech/context-loader.git
@@ -336,6 +336,8 @@ order:
336
336
  7. `Directory Tree`
337
337
 
338
338
  The output has no generated timestamp, AI summary, architecture inference, or diff body.
339
+ The Markdown CLI skips the nested-instruction presence scan, which contributes only to
340
+ the machine formats; this does not change Markdown content or its byte budgets.
339
341
 
340
342
  ## JSON Output
341
343
 
@@ -350,7 +352,7 @@ set differs, as described under “Compact model consumption”. The declared co
350
352
  "schema_version": 3,
351
353
  "tool": {
352
354
  "name": "context-loader",
353
- "version": "1.3.7"
355
+ "version": "1.3.9"
354
356
  },
355
357
  "repository": {
356
358
  "requested_path": "/canonical/requested/path",
@@ -445,6 +447,9 @@ semantics.
445
447
 
446
448
  ### Compact model consumption (`--format json-compact`)
447
449
 
450
+ Model callers should prefer `json-compact` when they consume the assembled `context`;
451
+ use full `json` when a consumer explicitly needs separate source bodies.
452
+
448
453
  `--format json-compact` emits a `schema_version` 4 document: exactly the version-3 document with
449
454
  `sources[*].content` omitted. Every other field — `context`, `context_sha256`, `statuses`,
450
455
  `nested_context`, `warnings`, `tool`, `repository`, and each source's `ordinal`, `kind`, `scope`,
@@ -470,7 +475,7 @@ although 1.1.0 added the top-level `statuses` key. From release 1.2.0 onward eac
470
475
  names exactly one key set, and a new number is issued whenever a key set would otherwise be reused.
471
476
 
472
477
  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.7`. Version 1
478
+ for `--format json` and `4` for `--format json-compact`, while `tool.version` is `1.3.9`. Version 1
474
479
  and 2 are the exact shapes already published in release 1.2.0 and are never reused: because
475
480
  `nested_context` changes the default document's key set, version 3 names the current full-document
476
481
  key set and version 4 names the compact projection.
@@ -595,16 +600,22 @@ bullet is a per-component, read or capture bound, as each one states:
595
600
  removes that many bytes of entries, and the `truncated` status plus the marker inside the
596
601
  fence say so. The heading and the code-fence lines are not metered, so the whole Markdown
597
602
  section can exceed 12 KiB by that fixed few dozen bytes.
598
- - Nested `AGENTS.md` presence scan: depth 4, 2,000 directories, at most 32 reported paths, a
603
+ - Nested `AGENTS.md` presence scan: depth 4, 2,000 directory-open attempts (including the root
604
+ and failed attempts), at most 32 reported paths, a
599
605
  4 KiB budget metered on the emitted array, and at most 1,024 entries retained and classified
600
606
  per directory. Names are scanned to select that prefix, subject to the separate hard
601
607
  name-scan bound below; file contents are never read
608
+ - A tree entry whose type cannot be determined is shown as `Skipped: unable to classify.`
609
+ and reports an `unreadable` tree-entry status; it is not presented as an ordinary file.
602
610
  - Directory name scans stop on the first entry beyond 65,536 names per directory. An
603
611
  over-limit directory's entire partial prefix is discarded to keep results independent of
604
612
  operating system order. The tree emits `Skipped: directory name scan limit reached.` and
605
613
  a `directory_scan_limit_exceeded` status; the nested presence scan sets `scan_truncated`.
606
614
  This bounds name iteration, not elapsed time on a blocked filesystem call.
607
615
  - Working-tree changes: 100 paths and 4 KiB
616
+ - Working-tree status is parsed incrementally, retaining only the first 100 paths sorted
617
+ by raw filesystem bytes. All records remain subject to validation, the shared Git
618
+ deadline and the 16 MiB output limit, including records beyond the displayed prefix.
608
619
  - Recent commits: 8
609
620
  - JSON-only listings have no byte budget of their own: `statuses` subjects are escaped names bounded
610
621
  by the entry counts above, while `repository` and `sources[*].path` are emitted verbatim, so a
@@ -662,7 +673,7 @@ or candidate-file content.
662
673
 
663
674
  ## Not Included
664
675
 
665
- Version 1.3.7 does not provide AI summaries, project-type detection, loading or transport of
676
+ Version 1.3.9 does not provide AI summaries, project-type detection, loading or transport of
666
677
  nested `AGENTS.md` contents (the JSON `nested_context` field reports bounded existence only),
667
678
  Memory retrieval, semantic ranking, ignore-rule parsing, plugins, profiles, caches, databases,
668
679
  network services, MCP, daemons, GUIs, CI/CD, telemetry, or automatic updates.
@@ -708,13 +719,40 @@ scratch directory:
708
719
  python scripts/benchmark.py --cli /absolute/path/to/project-context --scratch /absolute/empty/scratch
709
720
  ```
710
721
 
711
- The opt-in benchmark creates only synthetic repositories under that directory and reports median
712
- elapsed time, peak RSS (KiB) and JSON-compact output bytes over five runs. It checks identical output
713
- between runs and covers 1,000 AGENTS headings, a 5,000-file directory, and 1,000 untracked files.
722
+ The opt-in benchmark creates synthetic repositories under that directory and reports median,
723
+ minimum and maximum elapsed time, peak RSS (KiB), output bytes, digest and individual samples.
724
+ The default measures five runs after one warm-up and checks identical output throughout. It covers
725
+ 1,000 AGENTS headings, a 5,000-file directory, and 1,000 untracked files.
726
+ Use `--runs 10 --format json-compact --repo /absolute/working-tree-root` to add an existing
727
+ repository as a read-only case; `--format markdown` and `--format json` measure the other formats.
728
+ The scratch directory must be outside that repository. Fixtures and timing files always remain
729
+ under scratch, including for real-repository measurements. Concurrent repository changes fail the
730
+ output-stability check instead of producing a comparable baseline.
714
731
  Keep the CLI version, scratch path, interpreter and machine comparable when comparing runs;
715
732
  measurements are observations, not timing thresholds in CI. Retain or remove the scratch directory
716
733
  through your own temporary-resource workflow after inspection.
717
734
 
735
+ Measured baseline on 2026-10-19: Context Loader 1.3.8, CLI CPython 3.12.13, benchmark Python 3.12.3,
736
+ Git 2.43.0, Linux x86-64 and local NVMe storage. Each case used two warm-ups and ten measured runs;
737
+ outputs were identical within each case. These sequential observations include process startup and
738
+ host load, and provide a baseline for future comparisons under matching conditions. The existing
739
+ repository case describes one local checkout state; its output size changes with repository inputs.
740
+
741
+ | Case | Format | Median ms | Peak RSS KiB | Output bytes |
742
+ | --- | --- | ---: | ---: | ---: |
743
+ | Long AGENTS | markdown | 90.8 | 20804 | 17304 |
744
+ | Long AGENTS | json | 77.4 | 20612 | 63797 |
745
+ | Long AGENTS | json-compact | 73.4 | 20644 | 59471 |
746
+ | Large directory | markdown | 82.3 | 20136 | 9170 |
747
+ | Large directory | json | 76.5 | 20212 | 11237 |
748
+ | Large directory | json-compact | 70.5 | 19580 | 11233 |
749
+ | Large status | markdown | 80.4 | 19904 | 5986 |
750
+ | Large status | json | 66.3 | 20012 | 7945 |
751
+ | Large status | json-compact | 70.0 | 19904 | 7941 |
752
+ | Existing repository | markdown | 114.0 | 20888 | 29466 |
753
+ | Existing repository | json | 115.2 | 20876 | 55464 |
754
+ | Existing repository | json-compact | 113.6 | 21416 | 33495 |
755
+
718
756
  ## Version maintenance
719
757
 
720
758
  The versions in `pyproject.toml` and `context_loader/__init__.py`, the `tool_version` in
@@ -735,6 +773,15 @@ only verifies the public release, mirrors its exact formal tag object if missing
735
773
  the Gitea Release record. It builds no package and has no PyPI publishing credentials.
736
774
  No private endpoint or credential is needed on GitHub.
737
775
 
776
+ Public tag fetches use `FETCH_HEAD` without replacing a local tag ref that checkout may have
777
+ materialized as a lightweight tag. Identity checks and any missing-tag push use the fetched
778
+ object; an existing remote tag must match that exact object. Repeating synchronization leaves
779
+ matching tags and records unchanged. Public Git failures report only a fixed diagnostic category,
780
+ never the raw stderr, command arguments or credential-bearing URLs.
781
+ To close an existing published release after a synchronization-script fix, dispatch the Gitea
782
+ `release` workflow from current `master` with that existing tag as its `tag` input. Rerunning an
783
+ older tag-triggered job still executes the script at that old tag.
784
+
738
785
  For environments that permit direct public reads but share an exhausted proxy quota,
739
786
  set the Gitea Actions repository variable `RELEASE_PUBLIC_API_DIRECT=true`. The record
740
787
  step appends only public GitHub API/PyPI hosts to the existing proxy bypass lists. Without
@@ -8,14 +8,14 @@ Python standard library.
8
8
 
9
9
  ## Open-source quick start
10
10
 
11
- Current stable release: **1.3.7**. Local CLI for coding-agent workflows; renders deterministic Markdown or JSON.
11
+ Current stable release: **1.3.9**. Local CLI for coding-agent workflows; renders deterministic Markdown or JSON.
12
12
 
13
13
  ```bash
14
- uv tool install 'context-loader==1.3.7'
14
+ uv tool install 'context-loader==1.3.9'
15
15
  ```
16
16
 
17
17
  ```bash
18
- pip install 'context-loader==1.3.7'
18
+ pip install 'context-loader==1.3.9'
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.7`. Install its matching published release or an exact source commit.
31
+ Source version: `1.3.9`. 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.7'
36
+ uv tool install 'context-loader==1.3.9'
37
37
  ```
38
38
 
39
39
  Install via `pip`:
40
40
 
41
41
  ```bash
42
- pip install 'context-loader==1.3.7'
42
+ pip install 'context-loader==1.3.9'
43
43
  ```
44
44
 
45
- For development or source-based installs tracking current repository (`1.3.7`):
45
+ For development or source-based installs tracking current repository (`1.3.9`):
46
46
 
47
47
  ```bash
48
48
  uv tool install git+https://github.com/xuanheng-tech/context-loader.git
@@ -125,6 +125,8 @@ order:
125
125
  7. `Directory Tree`
126
126
 
127
127
  The output has no generated timestamp, AI summary, architecture inference, or diff body.
128
+ The Markdown CLI skips the nested-instruction presence scan, which contributes only to
129
+ the machine formats; this does not change Markdown content or its byte budgets.
128
130
 
129
131
  ## JSON Output
130
132
 
@@ -139,7 +141,7 @@ set differs, as described under “Compact model consumption”. The declared co
139
141
  "schema_version": 3,
140
142
  "tool": {
141
143
  "name": "context-loader",
142
- "version": "1.3.7"
144
+ "version": "1.3.9"
143
145
  },
144
146
  "repository": {
145
147
  "requested_path": "/canonical/requested/path",
@@ -234,6 +236,9 @@ semantics.
234
236
 
235
237
  ### Compact model consumption (`--format json-compact`)
236
238
 
239
+ Model callers should prefer `json-compact` when they consume the assembled `context`;
240
+ use full `json` when a consumer explicitly needs separate source bodies.
241
+
237
242
  `--format json-compact` emits a `schema_version` 4 document: exactly the version-3 document with
238
243
  `sources[*].content` omitted. Every other field — `context`, `context_sha256`, `statuses`,
239
244
  `nested_context`, `warnings`, `tool`, `repository`, and each source's `ordinal`, `kind`, `scope`,
@@ -259,7 +264,7 @@ although 1.1.0 added the top-level `statuses` key. From release 1.2.0 onward eac
259
264
  names exactly one key set, and a new number is issued whenever a key set would otherwise be reused.
260
265
 
261
266
  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.7`. Version 1
267
+ for `--format json` and `4` for `--format json-compact`, while `tool.version` is `1.3.9`. Version 1
263
268
  and 2 are the exact shapes already published in release 1.2.0 and are never reused: because
264
269
  `nested_context` changes the default document's key set, version 3 names the current full-document
265
270
  key set and version 4 names the compact projection.
@@ -384,16 +389,22 @@ bullet is a per-component, read or capture bound, as each one states:
384
389
  removes that many bytes of entries, and the `truncated` status plus the marker inside the
385
390
  fence say so. The heading and the code-fence lines are not metered, so the whole Markdown
386
391
  section can exceed 12 KiB by that fixed few dozen bytes.
387
- - Nested `AGENTS.md` presence scan: depth 4, 2,000 directories, at most 32 reported paths, a
392
+ - Nested `AGENTS.md` presence scan: depth 4, 2,000 directory-open attempts (including the root
393
+ and failed attempts), at most 32 reported paths, a
388
394
  4 KiB budget metered on the emitted array, and at most 1,024 entries retained and classified
389
395
  per directory. Names are scanned to select that prefix, subject to the separate hard
390
396
  name-scan bound below; file contents are never read
397
+ - A tree entry whose type cannot be determined is shown as `Skipped: unable to classify.`
398
+ and reports an `unreadable` tree-entry status; it is not presented as an ordinary file.
391
399
  - Directory name scans stop on the first entry beyond 65,536 names per directory. An
392
400
  over-limit directory's entire partial prefix is discarded to keep results independent of
393
401
  operating system order. The tree emits `Skipped: directory name scan limit reached.` and
394
402
  a `directory_scan_limit_exceeded` status; the nested presence scan sets `scan_truncated`.
395
403
  This bounds name iteration, not elapsed time on a blocked filesystem call.
396
404
  - Working-tree changes: 100 paths and 4 KiB
405
+ - Working-tree status is parsed incrementally, retaining only the first 100 paths sorted
406
+ by raw filesystem bytes. All records remain subject to validation, the shared Git
407
+ deadline and the 16 MiB output limit, including records beyond the displayed prefix.
397
408
  - Recent commits: 8
398
409
  - JSON-only listings have no byte budget of their own: `statuses` subjects are escaped names bounded
399
410
  by the entry counts above, while `repository` and `sources[*].path` are emitted verbatim, so a
@@ -451,7 +462,7 @@ or candidate-file content.
451
462
 
452
463
  ## Not Included
453
464
 
454
- Version 1.3.7 does not provide AI summaries, project-type detection, loading or transport of
465
+ Version 1.3.9 does not provide AI summaries, project-type detection, loading or transport of
455
466
  nested `AGENTS.md` contents (the JSON `nested_context` field reports bounded existence only),
456
467
  Memory retrieval, semantic ranking, ignore-rule parsing, plugins, profiles, caches, databases,
457
468
  network services, MCP, daemons, GUIs, CI/CD, telemetry, or automatic updates.
@@ -497,13 +508,40 @@ scratch directory:
497
508
  python scripts/benchmark.py --cli /absolute/path/to/project-context --scratch /absolute/empty/scratch
498
509
  ```
499
510
 
500
- The opt-in benchmark creates only synthetic repositories under that directory and reports median
501
- elapsed time, peak RSS (KiB) and JSON-compact output bytes over five runs. It checks identical output
502
- between runs and covers 1,000 AGENTS headings, a 5,000-file directory, and 1,000 untracked files.
511
+ The opt-in benchmark creates synthetic repositories under that directory and reports median,
512
+ minimum and maximum elapsed time, peak RSS (KiB), output bytes, digest and individual samples.
513
+ The default measures five runs after one warm-up and checks identical output throughout. It covers
514
+ 1,000 AGENTS headings, a 5,000-file directory, and 1,000 untracked files.
515
+ Use `--runs 10 --format json-compact --repo /absolute/working-tree-root` to add an existing
516
+ repository as a read-only case; `--format markdown` and `--format json` measure the other formats.
517
+ The scratch directory must be outside that repository. Fixtures and timing files always remain
518
+ under scratch, including for real-repository measurements. Concurrent repository changes fail the
519
+ output-stability check instead of producing a comparable baseline.
503
520
  Keep the CLI version, scratch path, interpreter and machine comparable when comparing runs;
504
521
  measurements are observations, not timing thresholds in CI. Retain or remove the scratch directory
505
522
  through your own temporary-resource workflow after inspection.
506
523
 
524
+ Measured baseline on 2026-10-19: Context Loader 1.3.8, CLI CPython 3.12.13, benchmark Python 3.12.3,
525
+ Git 2.43.0, Linux x86-64 and local NVMe storage. Each case used two warm-ups and ten measured runs;
526
+ outputs were identical within each case. These sequential observations include process startup and
527
+ host load, and provide a baseline for future comparisons under matching conditions. The existing
528
+ repository case describes one local checkout state; its output size changes with repository inputs.
529
+
530
+ | Case | Format | Median ms | Peak RSS KiB | Output bytes |
531
+ | --- | --- | ---: | ---: | ---: |
532
+ | Long AGENTS | markdown | 90.8 | 20804 | 17304 |
533
+ | Long AGENTS | json | 77.4 | 20612 | 63797 |
534
+ | Long AGENTS | json-compact | 73.4 | 20644 | 59471 |
535
+ | Large directory | markdown | 82.3 | 20136 | 9170 |
536
+ | Large directory | json | 76.5 | 20212 | 11237 |
537
+ | Large directory | json-compact | 70.5 | 19580 | 11233 |
538
+ | Large status | markdown | 80.4 | 19904 | 5986 |
539
+ | Large status | json | 66.3 | 20012 | 7945 |
540
+ | Large status | json-compact | 70.0 | 19904 | 7941 |
541
+ | Existing repository | markdown | 114.0 | 20888 | 29466 |
542
+ | Existing repository | json | 115.2 | 20876 | 55464 |
543
+ | Existing repository | json-compact | 113.6 | 21416 | 33495 |
544
+
507
545
  ## Version maintenance
508
546
 
509
547
  The versions in `pyproject.toml` and `context_loader/__init__.py`, the `tool_version` in
@@ -524,6 +562,15 @@ only verifies the public release, mirrors its exact formal tag object if missing
524
562
  the Gitea Release record. It builds no package and has no PyPI publishing credentials.
525
563
  No private endpoint or credential is needed on GitHub.
526
564
 
565
+ Public tag fetches use `FETCH_HEAD` without replacing a local tag ref that checkout may have
566
+ materialized as a lightweight tag. Identity checks and any missing-tag push use the fetched
567
+ object; an existing remote tag must match that exact object. Repeating synchronization leaves
568
+ matching tags and records unchanged. Public Git failures report only a fixed diagnostic category,
569
+ never the raw stderr, command arguments or credential-bearing URLs.
570
+ To close an existing published release after a synchronization-script fix, dispatch the Gitea
571
+ `release` workflow from current `master` with that existing tag as its `tag` input. Rerunning an
572
+ older tag-triggered job still executes the script at that old tag.
573
+
527
574
  For environments that permit direct public reads but share an exhausted proxy quota,
528
575
  set the Gitea Actions repository variable `RELEASE_PUBLIC_API_DIRECT=true`. The record
529
576
  step appends only public GitHub API/PyPI hosts to the existing proxy bypass lists. Without
@@ -1,3 +1,3 @@
1
1
  """Project Context Loader."""
2
2
 
3
- __version__ = "1.3.7"
3
+ __version__ = "1.3.9"