@c4a/context-cli 0.7.70 → 0.7.72
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.
- package/README.md +9 -0
- package/README.zh-CN.md +2 -0
- package/cli.js +7902 -7853
- package/indexers/bundles/context-code-indexer/references/composers/contracts-and-chains.md +2 -2
- package/indexers/bundles/context-code-indexer/references/composers/cross-module-chain.md +2 -2
- package/indexers/bundles/context-code-indexer/references/composers/development-and-delivery.md +2 -2
- package/indexers/bundles/context-code-indexer/references/composers/event-flow.md +2 -2
- package/indexers/bundles/context-code-indexer/references/composers/examples-and-documentation.md +2 -2
- package/indexers/bundles/context-code-indexer/references/composers/persistence-boundary.md +2 -2
- package/indexers/bundles/context-code-indexer/references/composers/protocol-boundary.md +2 -2
- package/indexers/bundles/context-code-indexer/references/composers/public-contract.md +2 -2
- package/indexers/bundles/context-code-indexer/references/indexer.md +2 -2
- package/indexers/bundles/context-code-indexer/templates/data-sync-reconciliation.md +2 -1
- package/indexers/bundles/context-markdown-indexer/references/indexer.md +2 -2
- package/indexers/contracts/profile-contract.json +245 -245
- package/indexers/release-manifest.json +14 -14
- package/package.json +12 -12
- package/parserEntryWorker.js +23 -11
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/skills/context-code-indexer/references/composers/contracts-and-chains.md +2 -2
- package/plugins/skills/context-code-indexer/references/composers/cross-module-chain.md +2 -2
- package/plugins/skills/context-code-indexer/references/composers/development-and-delivery.md +2 -2
- package/plugins/skills/context-code-indexer/references/composers/event-flow.md +2 -2
- package/plugins/skills/context-code-indexer/references/composers/examples-and-documentation.md +2 -2
- package/plugins/skills/context-code-indexer/references/composers/persistence-boundary.md +2 -2
- package/plugins/skills/context-code-indexer/references/composers/protocol-boundary.md +2 -2
- package/plugins/skills/context-code-indexer/references/composers/public-contract.md +2 -2
- package/plugins/skills/context-code-indexer/references/indexer.md +2 -2
- package/plugins/skills/context-code-indexer/templates/data-sync-reconciliation.md +2 -1
- package/plugins/skills/context-markdown-indexer/references/indexer.md +2 -2
- package/providers/context/manifest.json +21 -21
- package/providers/context/provider.yaml +1 -1
- package/providers/context/resources/manuals/guides/code-indexer-skill-authoring.md +2 -1
- package/providers/context/resources/manuals/guides/knowledge-updates.md +7 -5
- package/providers/context/resources/manuals/guides/markdown-indexer-skill-authoring.md +1 -1
- package/providers/context/resources/manuals/guides/package-outputs.md +2 -2
- package/providers/context/resources/manuals/guides/site-translation.md +19 -18
- package/providers/context/resources/manuals/reference/package-templates.md +2 -2
- package/providers/context/resources/procedures/approved-revision.md +8 -4
- package/providers/context/resources/procedures/knowledge-updates.md +7 -5
- package/providers/context/resources/procedures/production-stage-files.md +6 -4
- package/providers/context/resources/procedures/source-update.md +9 -0
- package/providers/context/skills/translate-site-locales/SKILL.md +6 -7
|
@@ -45,7 +45,7 @@ submit the short stage-relative manifest. Title and description belong to the
|
|
|
45
45
|
article, not an internal layout-mapping tuple.
|
|
46
46
|
|
|
47
47
|
Keep stable article and fragment identities when revising. Each fragment cites
|
|
48
|
-
at most three
|
|
48
|
+
actual source regions from at most three files (up to eight regions). The CLI handles source digests and safety;
|
|
49
49
|
the Agent judges whether the evidence supports the explanation. For a local
|
|
50
50
|
failure, use the returned fragment identifier or position to repair the affected
|
|
51
51
|
part. Completed independent tasks can be submitted without the rest of the batch.
|
|
@@ -113,8 +113,8 @@ top bar, homepage and articles share a centered 1440px container with 32px
|
|
|
113
113
|
margins (16px on phones); on wide screens the sidebar sits at its left edge and
|
|
114
114
|
articles keep a wide reading area and a smaller outline. Navigation is centered
|
|
115
115
|
in the top bar, which ends with icon buttons for search, theme, social links and
|
|
116
|
-
reader language; search, or Cmd/Ctrl+K, opens a dialog over a blurred page. The theme
|
|
117
|
-
|
|
116
|
+
reader language; search, or Cmd/Ctrl+K, opens a dialog over a blurred page. The theme opens
|
|
117
|
+
in light mode until the reader switches it; that choice is remembered in
|
|
118
118
|
browser storage. Search runs locally, without a search service.
|
|
119
119
|
Mermaid renders in the browser using the website theme, with fit, original-size,
|
|
120
120
|
zoom, full-screen and source controls. Controls appear on hover or keyboard focus
|
|
@@ -80,23 +80,24 @@ shows the original with a notice. Navigation titles without a translation use
|
|
|
80
80
|
the translated article title, then the primary title. Site search covers every
|
|
81
81
|
language; opening a result in another language switches to it.
|
|
82
82
|
|
|
83
|
-
|
|
84
83
|
## Incremental drafts
|
|
85
84
|
|
|
86
|
-
`prepare`
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
85
|
+
`prepare` writes a draft for each pending article and a `submission_path`
|
|
86
|
+
template. A stale article's draft is its current translation; a missing
|
|
87
|
+
article's draft is the approved source. When Git history contains the approved
|
|
88
|
+
version the translation was made from, `source_diff` names a diff from that
|
|
89
|
+
version to the current article. Without such history `source_diff` is `null`;
|
|
90
|
+
compare the draft with the whole approved article. Update only what changed and
|
|
91
|
+
submit the draft. History is missing, for example, when several approve and
|
|
92
|
+
translate rounds ran without a commit in between: the version each translation
|
|
93
|
+
was made from was never recorded. Committing approved knowledge and translations
|
|
94
|
+
after a round lets the next generated draft carry a diff; it does not guarantee
|
|
95
|
+
one, because a kept draft never has a diff.
|
|
96
|
+
|
|
97
|
+
An existing edited draft is kept (`draft: kept`) as unfinished work, with
|
|
98
|
+
`source_diff: null`; a draft whose body is still the unedited starting text is
|
|
99
|
+
regenerated with its diff. A kept draft has no diff because the source may have
|
|
100
|
+
changed again, even back, since it was written, so align the whole draft with
|
|
101
|
+
the current approved article. Delete it
|
|
102
|
+
to start again from the current translation. Successful submission removes the
|
|
103
|
+
drafts and diffs it saved.
|
|
@@ -316,8 +316,8 @@ Approved Markdown under `knowledge/` and the article index in
|
|
|
316
316
|
and fragment `sections` with their region `references`.
|
|
317
317
|
- Markdown fragment markers contain only their stable ID:
|
|
318
318
|
`<!-- context:section id="usage" -->` and `<!-- /context:section -->`.
|
|
319
|
-
Structure records each corresponding ID and
|
|
320
|
-
per fragment, not
|
|
319
|
+
Structure records each corresponding ID and its source positions: at most
|
|
320
|
+
three distinct source files and eight regions per fragment, not per article.
|
|
321
321
|
- A reference contains `source_ref`, `locator: { path, start_line, end_line }`
|
|
322
322
|
and the Host-computed regional `content_digest`. Do not duplicate this in
|
|
323
323
|
Markdown frontmatter or comments.
|
|
@@ -34,6 +34,8 @@ association. Then retry the same `task adjust` without refresh and, once materia
|
|
|
34
34
|
is available, with `refresh: true`; reread the resulting revision. Do not invent
|
|
35
35
|
module references, replace an older note, delete sources or clear the task to
|
|
36
36
|
satisfy this boundary. Already imported material does not need to be imported again.
|
|
37
|
+
The adjusted source stays citable by the remaining pages queued in the same revision;
|
|
38
|
+
repeating the adjustment for an unchanged source keeps already prepared pages.
|
|
37
39
|
A managed-source `base_digest` protects file replacement from conflicts; it is not
|
|
38
40
|
source-scope authorization and is not interchangeable with a snapshot hash.
|
|
39
41
|
|
|
@@ -137,7 +139,7 @@ Action schema and the same source and baseline validation.
|
|
|
137
139
|
|
|
138
140
|
When a fragment's support changes, include `references` with its actual
|
|
139
141
|
`source_ref` and `locator` (`path`, `start_line`, `end_line`). Each fragment allows
|
|
140
|
-
up to three
|
|
142
|
+
regions from up to three source files, eight regions in total; Context reads the captured region and computes its digest.
|
|
141
143
|
For full Markdown, optional `sections` contains only `{ section_id, references }`
|
|
142
144
|
entries; for local edits it can accompany `content` or update references alone.
|
|
143
145
|
An explicit empty list removes that fragment's citations. Deleted fragments lose
|
|
@@ -174,10 +176,12 @@ accepted tasks or an empty Composer result alone do not demonstrate a correction
|
|
|
174
176
|
### Locating submitted references
|
|
175
177
|
|
|
176
178
|
Submission locators also accept `{path, heading}` or `{path, quote}` instead of
|
|
177
|
-
line numbers. Use exactly one form. A heading
|
|
178
|
-
outside code fences in a Markdown source;
|
|
179
|
+
line numbers. Use exactly one form. A heading is the title text of an exact ATX heading
|
|
180
|
+
outside code fences in a Markdown source; a leading `##` marker is optional and,
|
|
181
|
+
when present, also selects the heading level; its region ends before the next
|
|
179
182
|
same-level or higher-level heading. A quote is an exact, unique, nonempty
|
|
180
183
|
substring (line endings are normalized). Ambiguous matches return candidate
|
|
181
184
|
line ranges. Both forms resolve against authorized captured text before hashing;
|
|
182
185
|
stored references still contain only `path`, `start_line` and `end_line`.
|
|
183
|
-
The
|
|
186
|
+
The per-fragment limits (three source files, eight regions) apply after
|
|
187
|
+
resolving and deduplicating positions.
|
|
@@ -338,7 +338,7 @@ changing structure, adding a page or when a section has no unambiguous ID.
|
|
|
338
338
|
To change a fragment's citations, include `references` alongside its `section_id`:
|
|
339
339
|
each entry supplies `source_ref` and `locator` (`path`, `start_line`, `end_line`).
|
|
340
340
|
Context computes the region fingerprint. This uses the same revision submission,
|
|
341
|
-
with at most three source
|
|
341
|
+
with at most three source files and eight regions per fragment. Full Markdown may include a
|
|
342
342
|
`sections` list of reference edits; local section edits may change content,
|
|
343
343
|
references, or both. Omission preserves citations; an empty list removes them.
|
|
344
344
|
|
|
@@ -703,17 +703,19 @@ Revision section edits may supply `references` as `source_ref` plus a
|
|
|
703
703
|
`locator` containing `path`, `start_line`, and `end_line`. Context computes the
|
|
704
704
|
regional digest. Omitted references preserve the current fragment's citations;
|
|
705
705
|
an explicit empty list removes them, and deleting a fragment removes its
|
|
706
|
-
citations. Each fragment may cite at most three source
|
|
706
|
+
citations. Each fragment may cite at most three source files and eight regions. Register and
|
|
707
707
|
authorize new material before citing it, then follow normal Review, close and
|
|
708
708
|
build. Article links alone do not authorize reading new sources or prove a claim.
|
|
709
709
|
|
|
710
710
|
### Locating submitted references
|
|
711
711
|
|
|
712
712
|
Submission locators also accept `{path, heading}` or `{path, quote}` instead of
|
|
713
|
-
line numbers. Use exactly one form. A heading
|
|
714
|
-
outside code fences in a Markdown source;
|
|
713
|
+
line numbers. Use exactly one form. A heading is the title text of an exact ATX heading
|
|
714
|
+
outside code fences in a Markdown source; a leading `##` marker is optional and,
|
|
715
|
+
when present, also selects the heading level; its region ends before the next
|
|
715
716
|
same-level or higher-level heading. A quote is an exact, unique, nonempty
|
|
716
717
|
substring (line endings are normalized). Ambiguous matches return candidate
|
|
717
718
|
line ranges. Both forms resolve against authorized captured text before hashing;
|
|
718
719
|
stored references still contain only `path`, `start_line` and `end_line`.
|
|
719
|
-
The
|
|
720
|
+
The per-fragment limits (three source files, eight regions) apply after
|
|
721
|
+
resolving and deduplicating positions.
|
|
@@ -70,7 +70,7 @@ complete article with stable `context:section` markers. References contain
|
|
|
70
70
|
`sections`, each with its matching `id` and `references` list. A reference is
|
|
71
71
|
`source_ref` plus `locator: {path, start_line, end_line}` from actual authorized
|
|
72
72
|
text. CLI computes source digests. A fragment may cite at most three distinct
|
|
73
|
-
source
|
|
73
|
+
source files and eight regions; an article may have multiple fragments.
|
|
74
74
|
|
|
75
75
|
When prose names a file, directory or Skill from a cited repository, write its
|
|
76
76
|
exact repository-relative path, or the unique name of its directory such as a
|
|
@@ -108,10 +108,12 @@ Partial delivery must include the approved articles needed by its local links.
|
|
|
108
108
|
### Locating submitted references
|
|
109
109
|
|
|
110
110
|
Submission locators also accept `{path, heading}` or `{path, quote}` instead of
|
|
111
|
-
line numbers. Use exactly one form. A heading
|
|
112
|
-
outside code fences in a Markdown source;
|
|
111
|
+
line numbers. Use exactly one form. A heading is the title text of an exact ATX heading
|
|
112
|
+
outside code fences in a Markdown source; a leading `##` marker is optional and,
|
|
113
|
+
when present, also selects the heading level; its region ends before the next
|
|
113
114
|
same-level or higher-level heading. A quote is an exact, unique, nonempty
|
|
114
115
|
substring (line endings are normalized). Ambiguous matches return candidate
|
|
115
116
|
line ranges. Both forms resolve against authorized captured text before hashing;
|
|
116
117
|
stored references still contain only `path`, `start_line` and `end_line`.
|
|
117
|
-
The
|
|
118
|
+
The per-fragment limits (three source files, eight regions) apply after
|
|
119
|
+
resolving and deduplicating positions.
|
|
@@ -26,6 +26,15 @@ Use an empty list only when existing pages cover the change or the additions
|
|
|
26
26
|
are outside the confirmed purpose. New pages go through the same writing and
|
|
27
27
|
review process as revisions; a new topic is not a no-change decision.
|
|
28
28
|
|
|
29
|
+
A kept page's citations whose text only moved in the updated source are
|
|
30
|
+
relocated when the update settles. When cited text changed or cannot be
|
|
31
|
+
confirmed, the completion result lists it in `reference_warnings`; those
|
|
32
|
+
citations keep their previous locations. Listed `repo-content:` citations are
|
|
33
|
+
still re-signed to the current repository text, so `verify` will not report
|
|
34
|
+
them later; check those pages from the receipt. The warning is a receipt for the
|
|
35
|
+
accepted decision, not a request to resubmit it: after the current update queue
|
|
36
|
+
finishes, run `context revise` on each listed page that needs a correction.
|
|
37
|
+
|
|
29
38
|
The CLI keeps the previous processed version until every requested page has
|
|
30
39
|
been approved, closed and built. If temporary progress is lost, inspect again
|
|
31
40
|
from that version and preserve the pages already approved. A saved report or
|
|
@@ -8,13 +8,12 @@ knowledge map title that is missing or stale for each declared locale, with the
|
|
|
8
8
|
`expected_digest` to submit. Approved knowledge in the primary language remains
|
|
9
9
|
the only source of truth; translations never change it.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
the
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
temporary file under `.tmp/agent-payloads/`. Keep its structure exactly:
|
|
11
|
+
Edit each returned draft `file` and submit the returned `submission_path`. With
|
|
12
|
+
`draft: generated`, a stale article's draft is its current translation; when
|
|
13
|
+
`source_diff` is a path, apply those source changes. A missing article's draft
|
|
14
|
+
is the approved source to translate in a natural tone. With `draft: kept`, or
|
|
15
|
+
whenever `source_diff` is `null`, align the whole draft with the current
|
|
16
|
+
approved article before submitting. Keep the translation's structure exactly:
|
|
18
17
|
|
|
19
18
|
- frontmatter contains only a translated `title` and optional `description`;
|
|
20
19
|
- keep every `context:section` marker, id and order unchanged;
|