Skip to content

About

Bounded format-neutral document structure contracts and HTML/CommonMark adapters

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

51 Commits

Folders and files

Document Processing

Location Public package / crate Responsibility
repository root @zixcel/document-structure Validate format-neutral structured documents
packages/document-html @zixcel/document-html Parse bounded HTML into the current structure
packages/document-markdown @zixcel/document-markdown Parse bounded Markdown into the current structure
crates/document-output zixcel-document-output (source-only) Inspect PDFs and render local document output with separate read/write capabilities
playground/parse-documents development only Public import parsing and legacy refusal example

Existing package names and wire/schema identifiers remain unchanged. The repository is the maintenance unit; each package owns its exports, validation and release. Product SQL, identity, business policy and hosting belong to their consumers. Imported Git history, LICENSE and NOTICE are preserved.

The repository-metadata patch versions in this branch are release candidates until official registry verification. The Node packages use public registry dependencies; Rust document-output remains publish=false. CI and publication are independent of a private central checkout. OIDC publishes only the immutable reviewed archives built by the separate verification job.

Run the examples and checks

pnpm install --frozen-lockfile --ignore-scripts
pnpm -r --include-workspace-root test
pnpm test:consumer
node playground/parse-documents/demo.mjs
cargo +1.97 test --locked --all-features

Package-specific interface

@zixcel/document-structure

日本語

A bounded, format-neutral document structure contract. Use it to preserve source evidence before interpretation.

Install and use

npm install @zixcel/document-structure
import { createPlainTextSurface, visibleSurfaceText } from '@zixcel/document-structure'
const surface = createPlainTextSurface({ source: 'A local note', sourceRef: 'urn:example:note' })
console.log(visibleSurfaceText(surface))

Type declarations ship with the ESM exports. Node.js 22 or later is required. Source references are identifiers, not instructions to fetch content. Parsing and validation enforce bounded input and output; semantic interpretation and storage belong to the caller.

Package responsibilities

  • @zixcel/document-structure: shared contract, plain-text extraction and validation.
  • @zixcel/document-html: HTML adapter using the shared contract.
  • @zixcel/document-markdown: CommonMark adapter using the shared contract.

The adapters use an exact public registry version of the contract. Development links that version within this repository; published manifests contain no local paths.

Currency extraction and item-candidate rules belong to the consuming product. Release 0.12.0 admits only the current zixcel.document.structure wire model 0.11.0. Package versions and wire-model versions are separate. Current fields are unchanged; legacy sem.lang.structure.surface acceptance and types are removed. Historical distributions remain immutable. Update owned consumers to the current formal artifacts before adoption. Product DB conversion is a separate operation.

Public API playground packs all three packages into an isolated consumer, checks public types and runs plain/HTML/Markdown examples including legacy refusal. Owner CI runs this gate before publication.

Development

From the repository root, run pnpm install --frozen-lockfile --ignore-scripts, pnpm run typecheck and pnpm -r --include-workspace-root test.

License · Notices · Security reporting

Package ownership and scope migration

保守正本と移行条件。The maintained source and npm scope are owned by Zixcel. Current dependencies use the official registry. Historical @hathq releases retain their provenance; new breaking releases are verified before consumer updates.

Release provenance

Starting with 0.11.1, releases use GitHub Actions OIDC trusted publishing from zixcel/document-structure (publish-npm.yml), without a stored npm publishing token. The workflow verifies reviewed archive hashes and requires npm provenance metadata. Check the published version on npm and verify registry signatures and provenance with npm audit signatures in an installed consumer project. Release 0.12.0 removes legacy product-schema acceptance; current generic fields and validation bounds are retained.

Source structure

crates/json-structure owns bounded, source-linked JSON structure without language meaning or authority. API and example · Playground · OSS source contract. The public crate is source-only; an exact Git revision is required until a separately accepted registry release.

Dependency updates: repository policy. Registry releases: version tags and GitHub OIDC.

CI validates builds, type checking, workspace tests, dependency audit, tooling and packed consumers on the latest Node.js 22 patch and Node.js 24.22.1. Reviewed publication archives are produced only on Node.js 24.22.1, and both matrix jobs must pass. Keep @types/node on 22.x to match the minimum supported runtime; Dependabot continues minor and patch updates while major type updates require a deliberate runtime-baseline change.

About

Bounded format-neutral document structure contracts and HTML/CommonMark adapters

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

⌂ Proxy