Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to Context are documented here.

## 0.7.86 - 2026-10-26

- Website emphasis now follows the CJK-friendly amendment to CommonMark through `markdown-it-cjk-friendly`, replacing 0.7.85's built-in rule. Any East Asian wide or full-width character beside a `*` run, including full-width punctuation, counts like whitespace when deciding whether the run opens or closes emphasis; `_` and runs with no CJK character beside them keep the CommonMark result. Clean content renders as in 0.7.85.
- `context build` keeps the shared `context-knowledge-query` Skill current. When a kb template's copy differs from the shipped Skill in the same language, the build replaces it and reports a `package-query-skill-refreshed` agent hint, so a package no longer declares one Context version while carrying an older version's Skill. Package-specific search hints stay in `others/context/search-guide.md`; a package that needs its own query Skill adds it under a different name.
- Lark capture merges adjacent runs of the same inline style and keeps whitespace outside emphasis markers, so `<b>A</b><b> </b><b>B</b>` becomes `**A B**` instead of `**A**** ****B**`. Paragraphs inside table cells and list items stay on separate lines (`<br>` in tables) instead of running together. Existing snapshots change only when they are captured again.

## 0.7.85 - 2026-10-25

- Website bold and italic text now closes after CJK punctuation. CommonMark only ends `**…**` after punctuation such as `?`, `)` or `、` when whitespace or more punctuation follows, so Chinese like `**用 MCP 还是知识包?**不在…` showed the asterisks literally. The site renderer now treats a Chinese, Japanese or Korean letter on the outer side of the markers like whitespace. Delimiters with no CJK letter beside them render exactly as before, and sites built with an earlier CLI re-render on the next build.
Expand Down
51 changes: 34 additions & 17 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "context",
"version": "0.7.85",
"version": "0.7.86",
"packageManager": "bun@1.3.9",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/context-cli/context-workflow/provider.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
schema: agent-graph.provider.v1
id: c4a/context
version: 0.7.85
version: 0.7.86
name: Context workflow
description: Internal work contract for Context knowledge workspaces.
graphs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ records establish what the package actually says. Package authors edit the sourc
template when project-specific terminology, entry points or task workflows are
needed: put terms, synonyms, common questions and preferred entry pages in
`others/context/search-guide.md`, which the Skill reads first, and keep the
shared Skill unchanged. Editing the Skill makes it package-specific; rename its
shared Skill unchanged. Context manages the shared Skill: `context build`
replaces a template copy that differs from the shipped one, so edits to it do
not survive. A package that needs its own query Skill adds it under a different
directory and `name` so it installs separately. When a page's text does not
settle a question, the Skill follows the page's `Sources` entries: repository
links are read at their recorded commit through authorized host tools, document
Expand All @@ -290,7 +292,11 @@ Workspaces created before the rename keep `skills/knowledge-query/` in their
template. `context build` replaces it with `context-knowledge-query` in the old
Skill's language, adds `others/context/search-guide.md` when it is missing, and
reports the replacement as an agent hint. Move any package-specific wording the
old Skill carried into the search guide.
old Skill carried into the search guide. Every build also compares
`skills/context-knowledge-query/` with the shipped Skill in the same language
and replaces an older or edited copy, reporting a `package-query-skill-refreshed`
agent hint, so a package never declares one Context version while carrying
another version's Skill.

When approved pages reference materialized resources, Context keeps their
production copies in content-addressed `knowledge/assets/` paths and bundles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ The default kb template includes:
attribution, follows repository sources at their recorded commit when the page
text is not enough, and reports gaps instead of inventing unsupported answers.
It uses no package-specific template values, so every package renders the same
file. The
file, and `context build` replaces a template copy that differs from the
shipped Skill in its language. The
default entry OKF root is `wikis/`; packages that select additional internal
collections expose
`guides/`, `rules/`, or `feats/` indexes when those roots are selected.
Expand Down
3 changes: 2 additions & 1 deletion packages/context-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@c4a/context-cli",
"description": "Local runtime and Agent integration for traceable knowledge production",
"version": "0.7.85",
"version": "0.7.86",
"type": "module",
"license": "MIT",
"engines": {
Expand Down Expand Up @@ -71,6 +71,7 @@
"handlebars": "^4.7.8",
"ink": "^5.0.0",
"jiti": "^2.7.0",
"markdown-it-cjk-friendly": "3.0.0",
"mdast-util-to-string": "^4.0.0",
"mermaid": "11.12.0",
"react": "^18.3.1",
Expand Down
19 changes: 19 additions & 0 deletions packages/context-cli/src/__tests__/documentLarkXmlV062.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,25 @@ describe("Lark Docx XML readable projection", () => {
expectClosedCounts(projection.fidelity);
});

test("merges split style runs and keeps paragraphs inside table cells apart", () => {
const projection = projectLarkDocxXml({
sourceUrl: "https://example.larkoffice.com/wiki/source-token",
xml: [
"<title>Quarterly review</title>",
"<p><b>整体总结:oncall</b><b> </b><b>问题数维持在低位</b>,完成了<b>API</b><b> </b><b>封装</b>。</p>",
"<p>Plain <i>split</i><i> italic</i> and<b> padded </b>text.</p>",
"<table><tr><td>Area</td><td>Result</td></tr>",
"<tr><td>质量</td><td><p><b>评分</b>: 0.7</p><p><b>总结</b>:</p><ul><li>details</li></ul></td></tr></table>",
].join("\n"),
});

expect(projection.markdown).toContain("**整体总结:oncall 问题数维持在低位**,完成了**API 封装**。");
expect(projection.markdown).toContain("Plain *split italic* and **padded** text.");
expect(projection.markdown).toContain("| 质量 | **评分**: 0.7<br>**总结**:<br>");
expect(projection.markdown).not.toContain("****");
expectClosedCounts(projection.fidelity);
});

test("distinguishes inline and token-backed diagrams without guessing from prose", () => {
const projection = projectLarkDocxXml({
sourceUrl: "https://example.larkoffice.com/docx/source-token",
Expand Down
Loading
Loading