Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
404d3a2
test(diagnostics): require explicit package subpath RED
seonghobae Aug 12, 2026
ed76f6d
ci(diagnostics): exercise package boundary RED
seonghobae Aug 12, 2026
0b1679d
feat(diagnostics): expose framework-neutral contract
seonghobae Aug 12, 2026
3a6dd52
build(diagnostics): add explicit package bundle
seonghobae Aug 12, 2026
f741e14
test(diagnostics): verify packed framework-neutral consumers
seonghobae Aug 12, 2026
9e0a712
test(diagnostics): align package contract names
seonghobae Aug 12, 2026
43c3ccf
ci(diagnostics): finalize package boundary once
seonghobae Aug 12, 2026
aa87a05
docs(diagnostics): describe neutral package without names
seonghobae Aug 12, 2026
02b4088
feat(diagnostics): publish explicit package subpath
github-actions[bot] Aug 12, 2026
3362161
ci(diagnostics): run complete package acceptance
seonghobae Aug 12, 2026
8f4ff4e
ci(diagnostics): document public diagnostics subpath once
seonghobae Aug 12, 2026
54dba4a
docs(diagnostics): document public package boundary
github-actions[bot] Aug 12, 2026
d26f9cc
feat(diagnostics): export selector evidence errors
seonghobae Aug 12, 2026
6169b81
test(diagnostics): execute selector evidence errors
seonghobae Aug 12, 2026
cb49b1a
fix(ci): pin package TDD pnpm bootstrap
seonghobae Aug 12, 2026
04175f7
merge(diagnostics): restack package surface on collaboration
seonghobae Aug 13, 2026
9c678f1
merge(diagnostics): restack package surface on current collaboration
seonghobae Aug 17, 2026
0f82a88
merge(stack): synchronize diagnostics package with current collaborat…
seonghobae Aug 18, 2026
e48adb3
Merge commit 'ec52d96' into HEAD
seonghobae Aug 21, 2026
368f663
Merge commit 'cc47d2b' into HEAD
seonghobae Aug 21, 2026
076135f
Merge current collaboration security repair into package
seonghobae Aug 22, 2026
03e626e
Merge current collaboration Semgrep repair into package
seonghobae Aug 22, 2026
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
52 changes: 52 additions & 0 deletions .github/workflows/writing-diagnostics-package-tdd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Writing Diagnostics Package TDD

on:
push:
branches:
- feat/writing-diagnostics-package
workflow_dispatch:

permissions:
contents: read

concurrency:
group: writing-diagnostics-package-tdd-${{ github.ref }}
cancel-in-progress: true

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
framework-neutral-package:
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.sha }}
persist-credentials: false
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Run package-boundary acceptance
run: >-
pnpm exec vitest run
src/writingDiagnosticsPackage.test.ts
src/writingDiagnosticsExports.test.ts
--pool=forks
--maxWorkers=1
- name: Typecheck package contracts
run: pnpm typecheck
- name: Run complete production coverage gate
env:
NODE_OPTIONS: --max-old-space-size=6144
run: pnpm coverage
- name: Build all package entrypoints
run: pnpm build
- name: Verify isolated packed-package consumers
run: pnpm verify:package
- name: Build demonstration application
run: pnpm build:demo
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Office Open XML renderer for DOCX, XLSX, and PPTX.
or runtime font request.
- **Standalone conversion utilities** — browser/Node data-URI and base64 helpers
are available without React or TipTap.
- **Framework-neutral writing diagnostics** — `@contextualwisdomlab/cwl-editor/writing-diagnostics` validates host-supplied revision-bound diagnostics and resolves exact text-position ranges without importing React, Yjs, a model SDK, credentials, or network authority. Semantic judgment and mutation remain host-owned.
- **AI-authored Office files** — a network-free Python package renders strict
JSON to DOCX, XLSX, or PPTX with formula-injection protection, losslessness
checks, atomic publication, and a bundled JSON Schema.
Expand All @@ -70,6 +71,7 @@ runtime.
| Envelope identity | `@contextualwisdomlab/cwl-editor/envelope-identity` | Framework-independent bounded schema identity for host-owned migration routing |
| Revision evidence | `@contextualwisdomlab/cwl-editor/revision-evidence` | Framework-independent canonical envelope, strong revision, and transition evidence |
| Text-position selector | `@contextualwisdomlab/cwl-editor/text-position-selector` | React-free deterministic W3C `TextPositionSelector` projection core |
| Writing diagnostics | `@contextualwisdomlab/cwl-editor/writing-diagnostics` | React-free revision-bound diagnostic validation and exact text-position projection/resolution core |
| Autosave | `@contextualwisdomlab/cwl-editor/autosave` | Provider-neutral bounded single-flight persistence coordination |
| Headless Markdown | `@contextualwisdomlab/cwl-editor/markdown` | React-free deterministic Markdown/HTML/email/plain-text conversion |
| Styles | `@contextualwisdomlab/cwl-editor/styles.css` | Editor layout and theming |
Expand Down
10 changes: 9 additions & 1 deletion docs/package-distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ integrations.
| `@contextualwisdomlab/cwl-editor/envelope-identity` | Framework-independent identity-only envelope routing for bounded schema identity inspection; migration remains host-owned |
| `@contextualwisdomlab/cwl-editor/revision-evidence` | Framework-independent revision evidence and document-transition evidence for local content equality/lineage claims |
| `@contextualwisdomlab/cwl-editor/text-position-selector` | `implemented_on_protected_main` — React-free text-position projection core implementing W3C `TextPositionSelector`; interactive capture, revision binding, authorization, persistence, and re-anchoring remain outside this subpath |
| `@contextualwisdomlab/cwl-editor/writing-diagnostics` | React-free revision-bound writing-diagnostic validation and text-position projection/resolution utilities; semantic review, model calls, policy, persistence, authorization, and editor mutation remain outside this subpath |
| `@contextualwisdomlab/cwl-editor/markdown` | `implemented_on_active_pr` — headless deterministic Markdown/HTML/email/plain-text conversion with the same safe-link and strict inline-raster policies as the editor, without importing the React/TipTap editor graph |
| `@contextualwisdomlab/cwl-editor/styles.css` | Editor layout and theming |
| `@contextualwisdomlab/cwl-editor/fonts.css` | Full offline KR/EN/JP/SC/TC/VI font bundle |
Expand Down Expand Up @@ -81,6 +82,13 @@ embedded in the npm tarball.
state or bind a selector to a document revision. Hosts remain responsible for
annotation identifiers/bodies, source-resource identity, authorization,
tenancy, persistence, audit, and cross-revision re-anchoring.
- The writing-diagnostics subpath deliberately exposes only strict diagnostic
validation, bounded diagnostic errors, deterministic text-projection mapping,
and exact `TextPositionSelector` resolution. It imports no React, Yjs, provider,
network, credential, model, naruon, or contextual-orchestrator runtime. It never
decides whether authored text is wrong and never applies a replacement. The
host owns semantic review, policy admission, authorization, persistence,
revision capture, and any editor mutation.
- Envelope identity output is routing metadata only. It does not accept an
unsupported document generation as current semantics and does not move schema
registry, migration, persistence, rollback, or authorization authority into
Expand Down Expand Up @@ -109,7 +117,7 @@ production library build. The verification chain:
4. rejects internal source, tests, demos, Office files, coverage output, and
workflow files from the npm tarball;
5. imports the root, collaboration, converter, autosave, envelope-identity,
revision-evidence, text-position-selector, and Markdown surfaces through their
revision-evidence, text-position-selector, writing-diagnostics, and Markdown surfaces through their
dedicated packed-consumer checks, including framework-free isolation where
that is part of the public contract;
6. exercises supported ESM/CommonJS entrypoints and compiles strict TypeScript
Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@
"import": "./dist/cwl-text-position-selector.js",
"require": "./dist/cwl-text-position-selector.cjs"
},
"./writing-diagnostics": {
"types": "./dist/writing-diagnostics/index.d.ts",
"import": "./dist/cwl-writing-diagnostics.js",
"require": "./dist/cwl-writing-diagnostics.cjs"
},
"./markdown": {
"types": "./dist/markdown/index.d.ts",
"import": "./dist/cwl-markdown.js",
Expand All @@ -99,7 +104,7 @@
],
"scripts": {
"dev": "vite",
"build": "tsc --noEmit && vite build && vite build --config vite.collaboration.config.ts && vite build --config vite.converter.config.ts && vite build --config vite.envelope-identity.config.ts && vite build --config vite.revision-evidence.config.ts && vite build --config vite.autosave.config.ts && vite build --config vite.text-position-selector.config.ts && vite build --config vite.markdown.config.ts && node ./scripts/copy-styles.mjs",
"build": "tsc --noEmit && vite build && vite build --config vite.collaboration.config.ts && vite build --config vite.converter.config.ts && vite build --config vite.envelope-identity.config.ts && vite build --config vite.revision-evidence.config.ts && vite build --config vite.autosave.config.ts && vite build --config vite.text-position-selector.config.ts && vite build --config vite.writing-diagnostics.config.ts && vite build --config vite.markdown.config.ts && node ./scripts/copy-styles.mjs",
"build:demo": "vite build --config vite.demo.config.ts",
"fonts": "node ./scripts/fetch-fonts.mjs",
"preview": "vite preview",
Expand All @@ -108,7 +113,7 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"test:package-config": "node --test ./scripts/revision-evidence-consumer-config.test.mjs ./scripts/release-metadata.test.mjs ./scripts/javascript-runtime-authority.test.mjs",
"verify:package": "pnpm run test:package-config && node ./tests/package/verify-package.mjs && node ./tests/package/verify-editor-placeholder-package.mjs && node ./scripts/verify-canonical-envelope-package.mjs && node ./scripts/verify-revision-evidence-package.mjs && node ./scripts/verify-framework-free-revision-evidence-package.mjs && node ./scripts/verify-framework-free-envelope-identity-package.mjs && node ./tests/package/verify-framework-free-autosave-package.mjs && node ./scripts/verify-text-position-selector-package.mjs && node ./scripts/verify-text-position-selector-subpath-package.mjs && node ./scripts/verify-markdown-subpath-package.mjs"
"verify:package": "pnpm run test:package-config && node ./tests/package/verify-package.mjs && node ./tests/package/verify-editor-placeholder-package.mjs && node ./scripts/verify-canonical-envelope-package.mjs && node ./scripts/verify-revision-evidence-package.mjs && node ./scripts/verify-framework-free-revision-evidence-package.mjs && node ./scripts/verify-framework-free-envelope-identity-package.mjs && node ./tests/package/verify-framework-free-autosave-package.mjs && node ./scripts/verify-text-position-selector-package.mjs && node ./scripts/verify-text-position-selector-subpath-package.mjs && node ./scripts/verify-writing-diagnostics-subpath-package.mjs && node ./scripts/verify-markdown-subpath-package.mjs"
},
"peerDependencies": {
"react": "^18.0.0 || ^19.0.0",
Expand Down
Loading