dsh-cait 0.0.0-stage → 1.0.4
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/CHANGELOG.md +367 -0
- package/LICENSE +201 -0
- package/NOTICE +14 -0
- package/README.ja.md +413 -0
- package/README.md +423 -2
- package/README.zh-CN.md +391 -0
- package/client/components.js +2377 -0
- package/client/entry.js +111 -0
- package/client/helpers.js +103 -0
- package/client/locales.js +730 -0
- package/client/rpc.js +93 -0
- package/client/styles.js +258 -0
- package/client.js +3684 -0
- package/cordis.patch.yml +3 -0
- package/icon.svg +8 -0
- package/index.js +45 -0
- package/lib/api.js +223 -0
- package/lib/docx.js +389 -0
- package/lib/errors.js +8 -0
- package/lib/formats.js +917 -0
- package/lib/glossary.js +178 -0
- package/lib/import-export.js +605 -0
- package/lib/libraries.js +183 -0
- package/lib/markdown.js +28 -0
- package/lib/mt.js +152 -0
- package/lib/persistence.js +321 -0
- package/lib/pptx.js +89 -0
- package/lib/segmenter.js +84 -0
- package/lib/similarity.js +113 -0
- package/lib/store-utils.js +339 -0
- package/lib/store.js +734 -0
- package/lib/tm.js +160 -0
- package/lib/tmx.js +85 -0
- package/lib/tools.js +472 -0
- package/lib/xlsx.js +218 -0
- package/lib/xml.js +31 -0
- package/locale/en.json +11 -0
- package/locale/ja.json +11 -0
- package/locale/zh.json +11 -0
- package/package.json +81 -4
- package/scripts/build-client.mjs +13 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to CAIT are documented here. The project follows
|
|
4
|
+
[Semantic Versioning](https://semver.org/) and the format is based on
|
|
5
|
+
[Keep a Changelog](https://keepachangelog.com/).
|
|
6
|
+
|
|
7
|
+
## [1.0.4] - 2026-11-05
|
|
8
|
+
|
|
9
|
+
Provenance publishing.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `README.md`, `README.zh-CN.md` and `README.ja.md` carry the live npm badge, so
|
|
14
|
+
the package page and the repository show the published version.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Releases from this version on are produced by `.github/workflows/publish.yml`,
|
|
19
|
+
which attaches npm provenance and validates the GitHub trusted publisher.
|
|
20
|
+
`npm publish` from a local checkout still works and still asks for an OTP.
|
|
21
|
+
|
|
22
|
+
## [1.0.3] - 2026-11-05
|
|
23
|
+
|
|
24
|
+
npm distribution.
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- The package can now be installed from the npm registry:
|
|
29
|
+
`plugin_manager install_bundle target: dsh-cait` in DSH Desktop, or
|
|
30
|
+
`dsh plugin --profile <name> add dsh-cait`. Pin a release with
|
|
31
|
+
`dsh-cait@1.0.3`; the GitHub and local-checkout routes still work.
|
|
32
|
+
- `engines.dsh` (`>=0.2.2-rc.1`), so the plugin manager refuses an older host
|
|
33
|
+
with a compatibility report instead of a broken mount.
|
|
34
|
+
- `publishConfig.access: public`, an `author` field, and the `dsh-plugin` /
|
|
35
|
+
`cordis` keywords for the registry listing.
|
|
36
|
+
- `prepublishOnly` rebuilds the client bundle and syntax-checks it, so a
|
|
37
|
+
release cannot ship a stale `client.js`.
|
|
38
|
+
- `.github/workflows/publish.yml` publishes a GitHub release through npm
|
|
39
|
+
Trusted Publishing with `--provenance`; it checks the tag against
|
|
40
|
+
`package.json`, runs the whole test suite, and never stores an npm token.
|
|
41
|
+
- `@deepseek-ai/schemastery` is a `devDependency` as well as a peer dependency,
|
|
42
|
+
so a fresh checkout can run the tests.
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- `README.ja.md` ships in the package (`files`).
|
|
47
|
+
- The README install section leads with the npm route and keeps the GitHub and
|
|
48
|
+
local-checkout routes as alternatives.
|
|
49
|
+
- The repository no longer tracks `node_modules/`; packed tarballs are ignored.
|
|
50
|
+
|
|
51
|
+
### Removed
|
|
52
|
+
|
|
53
|
+
- `"private": true`, which blocked `npm publish`.
|
|
54
|
+
|
|
55
|
+
## [1.0.2] - 2026-11-04
|
|
56
|
+
|
|
57
|
+
Interface-language fix.
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
|
|
61
|
+
- Japanese README (`README.ja.md`), linked from the language switcher of all
|
|
62
|
+
three READMEs and listed in the project layout.
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
|
|
66
|
+
- **Follow DSH language** now follows the DSH locale instead of staying on
|
|
67
|
+
English. The client plugin declared only `slots` in its inject list, so
|
|
68
|
+
Cordis rejected the `ctx.locale` access with a throw that the registration
|
|
69
|
+
`try`/`catch` swallowed: the DSH-bound translator stayed `null`, every lookup
|
|
70
|
+
fell through to the English dictionary, and a Simplified-Chinese DSH looked
|
|
71
|
+
English. `locale` is now a declared dependency.
|
|
72
|
+
- `auto` resolves the locale service snapshot itself (`zh-CN` → `zh`,
|
|
73
|
+
`ja-JP` → `ja`, `en-US` → `en`) before consulting the DSH-bound translator,
|
|
74
|
+
so a locale tag without a registered fallback chain no longer degrades to
|
|
75
|
+
English. The export `resolveUiLang` covers this mapping.
|
|
76
|
+
- The workbench and the sidebar label subscribe to DSH locale changes, so
|
|
77
|
+
switching the DSH language while `auto` is selected re-renders CAIT
|
|
78
|
+
immediately instead of requiring a reload.
|
|
79
|
+
|
|
80
|
+
## [1.0.1] - 2026-11-04
|
|
81
|
+
|
|
82
|
+
UI languages and license metadata.
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
|
|
86
|
+
- Japanese (`ja`) UI dictionary. The workbench now ships three interface
|
|
87
|
+
languages: Simplified Chinese, English, and Japanese.
|
|
88
|
+
- **Settings → Interface → Interface language**, with *Follow DSH language*
|
|
89
|
+
(default), 简体中文, English, and 日本語. The choice is stored as
|
|
90
|
+
`settings.uiLang` in the CAIT store, applies to the workbench and the sidebar
|
|
91
|
+
label immediately, and only affects the CAIT interface — document source and
|
|
92
|
+
target languages are untouched.
|
|
93
|
+
- `NOTICE`, the attribution supplement for Apache-2.0 (section 4(d)), and an
|
|
94
|
+
explicit `license` field in `package.json`.
|
|
95
|
+
|
|
96
|
+
### Changed
|
|
97
|
+
|
|
98
|
+
- `LICENSE` appendix copyright line now reads `Copyright 2026 Jovi Lecca`.
|
|
99
|
+
- Version bumped to `1.0.1` (`package.json`, `CAIT_VERSION`, and the exported
|
|
100
|
+
document metadata move together).
|
|
101
|
+
- Verified against DSH `0.2.2-rc.1`; the README badges and development notes use
|
|
102
|
+
that version.
|
|
103
|
+
|
|
104
|
+
### Fixed
|
|
105
|
+
|
|
106
|
+
- `saveSettings` rejects an unsupported interface language with
|
|
107
|
+
`INVALID_UI_LANG` instead of silently storing it.
|
|
108
|
+
|
|
109
|
+
## [1.0.0] - 2026-11-04
|
|
110
|
+
|
|
111
|
+
First public release. CAIT was developed as `0.1.0` and renumbered to `1.0.0`
|
|
112
|
+
for the first GitHub release.
|
|
113
|
+
|
|
114
|
+
The npm package and Cordis entry are named `dsh-cait`; the UI entry, data
|
|
115
|
+
directory (`$DSH_HOME/cait`), and API route (`/cait/api`) keep the CAIT name.
|
|
116
|
+
|
|
117
|
+
### Highlights
|
|
118
|
+
|
|
119
|
+
- A complete CAT workbench inside DeepSeek Harness: sidebar entry, main panel,
|
|
120
|
+
segment list/editor, TM/glossary/MT side panel, and export flow.
|
|
121
|
+
- Seven agent tools that share the exact store used by the UI.
|
|
122
|
+
- Multiple TM and glossary libraries with mounted-only lookup and default write
|
|
123
|
+
targets.
|
|
124
|
+
- Format-preserving DOCX and PPTX export, plus a broad text, subtitle,
|
|
125
|
+
localization, and Office format matrix.
|
|
126
|
+
- Persistence with atomic snapshots, corrupt-file recovery, strict confirm
|
|
127
|
+
writes, and revision polling between agents and the open workbench.
|
|
128
|
+
|
|
129
|
+
### Added
|
|
130
|
+
|
|
131
|
+
#### Plugin and UI
|
|
132
|
+
|
|
133
|
+
- Host + Client bundle structure (`index.js`, `client.js`, `cordis.patch.yml`,
|
|
134
|
+
`package.json`, locale metadata, icon).
|
|
135
|
+
- New two-bubble A/文 icon: a bilingual speech-bubble pair that reads as
|
|
136
|
+
source/target, used both for the package icon and the DSH sidebar mark.
|
|
137
|
+
- Left-sidebar entry `cait` and main panel `cait`; all styling uses DSH
|
|
138
|
+
`--dsw-alias-*` theme tokens.
|
|
139
|
+
- English and Chinese UI dictionaries; plugin metadata locales.
|
|
140
|
+
- Workbench with document tabs, segment rail, source highlighting, glossary
|
|
141
|
+
chips, target editor, confirm/next/previous/draft actions, progress, and
|
|
142
|
+
responsive density scaling from 1× to 1.8×.
|
|
143
|
+
- Document tabs with close, reopen, new-page import, duplicate-import reuse,
|
|
144
|
+
and a recent-document cleanup dialog for one or all closed documents.
|
|
145
|
+
- Settings modal for source/target languages, fuzzy threshold, TM result limit,
|
|
146
|
+
MT route/model/temperature, and library mounts.
|
|
147
|
+
- Lightweight **库 / Libraries** modal to create, mount, and choose default TM
|
|
148
|
+
and glossary libraries.
|
|
149
|
+
- Visual save-failure/stale banner and a two-second revision poll so
|
|
150
|
+
agent-triggered document switches and confirmations appear in an open
|
|
151
|
+
workbench without discarding a dirty draft.
|
|
152
|
+
|
|
153
|
+
#### Translation memory and glossary
|
|
154
|
+
|
|
155
|
+
- Multiple TM libraries with id, name, mount state, default write library, and
|
|
156
|
+
per-library deduplication.
|
|
157
|
+
- Graded TM matching: `exact`, independent `near_exact` (ignores digits,
|
|
158
|
+
punctuation, and whitespace), `high_fuzzy >= 0.85`,
|
|
159
|
+
`medium_fuzzy 0.75–0.85`, `low_fuzzy < 0.75` above the configurable floor.
|
|
160
|
+
- Lexical fuzzy scoring: character-bigram Dice (72%) + token Jaccard (28%);
|
|
161
|
+
Latin words and CJK characters are tokenized separately.
|
|
162
|
+
- Multiple glossary libraries, source-language filtering, live highlighting,
|
|
163
|
+
click-to-insert terms, case-sensitive terms, CSV/TSV import, and notes.
|
|
164
|
+
- Mounted-only lookups in the UI and tools; unmounted write targets are rejected
|
|
165
|
+
with `TM_NOT_MOUNTED` / `GLOSSARY_NOT_MOUNTED`.
|
|
166
|
+
- Clear operations default to mounted libraries, accept explicit mounted ids, and
|
|
167
|
+
require `all: true` plus `confirm: true` to clear every library.
|
|
168
|
+
- Canonical language tags via `Intl.getCanonicalLocales` (`EN` → `en`,
|
|
169
|
+
`ZH_cn` → `zh-CN`).
|
|
170
|
+
|
|
171
|
+
#### Agent tools
|
|
172
|
+
|
|
173
|
+
- `cat_get_segment` — current segment, TM matches, glossary hits.
|
|
174
|
+
- `cat_submit_translation` — confirm target, optional mounted `targetTmId`,
|
|
175
|
+
write to TM, advance.
|
|
176
|
+
- `cat_lookup_tm` — mounted-library graded lookup.
|
|
177
|
+
- `cat_lookup_glossary` — mounted glossary query with language/case handling.
|
|
178
|
+
- `cat_list_documents` — document list and progress.
|
|
179
|
+
- `cat_switch_document` — switch active document.
|
|
180
|
+
- `cat_suggest_mt` — MT through the selected DSH route, or explicit offline
|
|
181
|
+
glossary-substitution fallback.
|
|
182
|
+
|
|
183
|
+
#### MT
|
|
184
|
+
|
|
185
|
+
- MT provider-route selector built from `ctx.llm.listProviders()` and
|
|
186
|
+
`ctx.llm.listModels()`, optionally filtered by `ctx.loader.entries()`.
|
|
187
|
+
- Calls through `ctx.llm.stream()`; concatenates `text-delta` chunks only.
|
|
188
|
+
- No CAIT-managed `baseUrl` or API key; DSH resolves credentials.
|
|
189
|
+
- Explicit offline fallback labelled **术语替换(离线) / Glossary substitution
|
|
190
|
+
(offline)** (internal id `mock`) when no route/model is available.
|
|
191
|
+
- Host-only detailed logging of stream failures; clients receive the generic
|
|
192
|
+
`MT_PROVIDER_FAILED`.
|
|
193
|
+
|
|
194
|
+
#### Persistence and configuration
|
|
195
|
+
|
|
196
|
+
- Schemastery `dataDir` config; default `$DSH_HOME/cait` or `~/.dsh/cait`.
|
|
197
|
+
- Versioned JSON snapshot (`version: 2`) containing documents, segments, open-tab
|
|
198
|
+
ids, TM, glossary, libraries, mounts, and non-secret settings.
|
|
199
|
+
- Atomic temp-file + rename writes; strict confirm writes that roll back on disk
|
|
200
|
+
failure and return `PERSISTENCE_FAILED` (503); best-effort structural writes
|
|
201
|
+
with a visible storage-error banner.
|
|
202
|
+
- Corrupt/unknown-version snapshots are backed up as
|
|
203
|
+
`store.json.corrupt-<timestamp>` and replaced with empty state.
|
|
204
|
+
- v1 → v2 migration to default TM/glossary libraries.
|
|
205
|
+
- DOCX and PPTX source sidecars under `sources/<document-id>.*` for
|
|
206
|
+
format-preserving export; sidecars are removed when the document is deleted.
|
|
207
|
+
- Open tabs and `activeDocId` persist; draft text and per-document cursor do not.
|
|
208
|
+
- Duplicate import guard based on SHA-256 of languages, source, format, and
|
|
209
|
+
exchange metadata.
|
|
210
|
+
|
|
211
|
+
#### Formats
|
|
212
|
+
|
|
213
|
+
- TXT, Markdown, DOCX body text, TMX 1.4, CSV, SRT, WebVTT, PO, XLIFF 1.2,
|
|
214
|
+
basic XLIFF 2.0, basic SDLXLIFF, HTML, JSON string paths, XLSX, PPTX, and RTF
|
|
215
|
+
import.
|
|
216
|
+
- Target-only TXT/Markdown/HTML/RTF/SRT/WebVTT export; bilingual
|
|
217
|
+
Markdown/CSV/TMX; document exports for PO, XLIFF, XLSX, and PPTX;
|
|
218
|
+
current-document JSON; structure-preserving JSON; DOCX source-package export.
|
|
219
|
+
- CSV column mapping by header name or 1-based number.
|
|
220
|
+
- SRT/VTT cue timing/settings/identifier metadata; semantic inline tags retained;
|
|
221
|
+
invalid ranges rejected; untimed cues follow the previous cue end + 2 s.
|
|
222
|
+
- PO contexts, plural forms, translator comments, and obsolete `#~` entries.
|
|
223
|
+
- XLIFF inline placeholders converted to `{n}` tokens and expanded back on
|
|
224
|
+
export; confirmation rejects dropped tokens with `PLACEHOLDER_MISMATCH`.
|
|
225
|
+
- DOCX export patches translated text into the original package, preserving
|
|
226
|
+
paragraph/run properties, styles, numbering, images, headers, tables, and
|
|
227
|
+
layout.
|
|
228
|
+
- PPTX export patches translated body text into the retained source package,
|
|
229
|
+
preserving slides, masters, shapes, images, and layout.
|
|
230
|
+
- XLSX two-column Source/Target workbook import/export.
|
|
231
|
+
- JSON original-template preservation through `formatMeta.jsonTemplate`.
|
|
232
|
+
|
|
233
|
+
#### API and security
|
|
234
|
+
|
|
235
|
+
- Same-origin JSON bridge at `GET /cait/api/health` and
|
|
236
|
+
`POST /cait/api/rpc`.
|
|
237
|
+
- `ctx.connection.requestRejection` browser/Origin check.
|
|
238
|
+
- 32 MB body limit (`413 BODY_TOO_LARGE`), JSON content-type check, and
|
|
239
|
+
allow-listed handlers.
|
|
240
|
+
- `clearTM` / `clearGlossary` require `confirm: true` (`409
|
|
241
|
+
CONFIRMATION_REQUIRED` otherwise).
|
|
242
|
+
- No API key in the browser, snapshot, RPC response, or logs.
|
|
243
|
+
|
|
244
|
+
### Changed
|
|
245
|
+
|
|
246
|
+
- Renamed the UI fallback from “mock” to **术语替换(离线) / Glossary
|
|
247
|
+
substitution (offline)** while keeping internal ids compatible.
|
|
248
|
+
- Replaced CAIT-managed OpenAI-compatible HTTP calls with DSH provider routes.
|
|
249
|
+
- Split the 1,718-line `lib/store.js` into a `CatStore` facade plus
|
|
250
|
+
`libraries.js`, `tm.js`, `glossary.js`, `persistence.js`,
|
|
251
|
+
`import-export.js`, `store-utils.js`, and `errors.js`.
|
|
252
|
+
- Split the Web UI into `client/helpers.js`, `rpc.js`, `styles.js`,
|
|
253
|
+
`components.js`, `locales.js`, and `entry.js`; `client.js` is now generated by
|
|
254
|
+
`scripts/build-client.mjs`.
|
|
255
|
+
- JSON export was renamed from a purported “project backup” to
|
|
256
|
+
`*.document.json` (current document only); structured JSON export is a
|
|
257
|
+
separate `json-tree` format.
|
|
258
|
+
- Subtitle export now renumbers cues in file order and maintains a monotonic
|
|
259
|
+
cursor for untimed cues instead of overlapping `index * 2s`.
|
|
260
|
+
- Removed the never-incremented `usageCount` TM metric.
|
|
261
|
+
- `cat_submit_translation` now returns `tm.count` as the mounted count and
|
|
262
|
+
`tm.total` as the all-library count.
|
|
263
|
+
- Open documents persist `openDocIds` and `activeDocId`; settings persist, but
|
|
264
|
+
drafts, cursor, and library-modal UI state do not.
|
|
265
|
+
- API key and endpoint fields were removed from settings; `publicSettings()`
|
|
266
|
+
exposes only route/model/temperature.
|
|
267
|
+
- README rewritten for GitHub; this changelog added.
|
|
268
|
+
|
|
269
|
+
### Fixed
|
|
270
|
+
|
|
271
|
+
- Mount checkbox was disabled for every unmounted library when only one was
|
|
272
|
+
mounted; unmounted libraries are now selectable and only the last mounted one
|
|
273
|
+
is protected.
|
|
274
|
+
- `loadDemo()` TM entries were not persisted; demo state now survives reload.
|
|
275
|
+
- Save errors were swallowed and confirmations could report success without a
|
|
276
|
+
disk write; strict confirm + rollback + banner now surface the failure.
|
|
277
|
+
- Agent-driven document switches/confirmations were invisible in an open
|
|
278
|
+
workbench; revision polling and stale/draft handling fixed this.
|
|
279
|
+
- DOCX table paragraphs were flattened into the body text despite the docs; table
|
|
280
|
+
blocks are now excluded during import.
|
|
281
|
+
- TMX inline `bpt/ept/ph` markup was silently dropped; imports now return a
|
|
282
|
+
`TMX_INLINE_MARKUP_LOST` warning with a count.
|
|
283
|
+
- Glossary language matching was case-sensitive in hits but case-insensitive in
|
|
284
|
+
the tool; both paths now canonicalize.
|
|
285
|
+
- XLIFF placeholders, PO plurals/comments/obsolete blocks, and subtitle semantic
|
|
286
|
+
tags were dropped in earlier adapters; all are preserved now.
|
|
287
|
+
- Subtitle zero/negative-duration cues were silently rewritten; they now fail
|
|
288
|
+
with an explicit parse error.
|
|
289
|
+
- Duplicate imports always created a new document; identical content now reuses
|
|
290
|
+
the existing document.
|
|
291
|
+
- Closed documents could not be cleaned up; the recent-documents dialog can now
|
|
292
|
+
delete one or all closed documents.
|
|
293
|
+
- `cat_lookup_glossary` parameter text still claimed case-insensitive matching
|
|
294
|
+
after case-sensitive support was added; corrected.
|
|
295
|
+
- PPTX export no longer silently emits an unformatted deck when the source
|
|
296
|
+
package is missing; it returns `PPTX_SOURCE_REQUIRED`.
|
|
297
|
+
- JSON `formatMeta.jsonTemplate`, XLSX metadata, and PPTX source sidecars were
|
|
298
|
+
not preserved through reload in the first integration pass; fixed and tested.
|
|
299
|
+
- Save-label text was invisible in the settings modal because the generic button
|
|
300
|
+
reset overrode `.cait-btn-primary`; fixed and covered by the mount test.
|
|
301
|
+
|
|
302
|
+
### Security
|
|
303
|
+
|
|
304
|
+
- Removed the CAIT-managed `baseUrl` and API key path, eliminating the SSRF /
|
|
305
|
+
keyless-regex / remote-error-body findings from the audit.
|
|
306
|
+
- MT failures expose only `MT_PROVIDER_FAILED`; provider/model/code/status stay in
|
|
307
|
+
the Host log.
|
|
308
|
+
- All RPC calls retain the DSH Origin/browser-trust check; clear methods require
|
|
309
|
+
explicit confirmation.
|
|
310
|
+
- Snapshot excludes API keys by design; MT credentials remain inside DSH.
|
|
311
|
+
|
|
312
|
+
### Tests
|
|
313
|
+
|
|
314
|
+
- 13 suites: `test-core`, `test-imports`, `test-formats`,
|
|
315
|
+
`test-second-tier`, `test-docx-export`, `test-api`, `test-plugin`,
|
|
316
|
+
`test-persistence`, `test-documents`, `test-libraries`, `test-mounts`,
|
|
317
|
+
`test-ui-scale`, and `test-mt`.
|
|
318
|
+
- Coverage includes TM grading and boundaries, multi-library mounts,
|
|
319
|
+
mounted-only lookup, unmounted-target rejection, clear scope/confirmation,
|
|
320
|
+
corruption fallback, v1 migration, strict persistence rollback, demo reload,
|
|
321
|
+
document tabs/dedupe/delete, DOCX/XLSX/PPTX source preservation, CSV mapping,
|
|
322
|
+
SRT/VTT timelines, PO plurals/comments/obsolete, XLIFF 1.2/2.0 placeholders,
|
|
323
|
+
second-tier round-trips, API 413/403/404/409/415, and UI helper logic.
|
|
324
|
+
- Fixtures: `sample.docx`, `sample-table.docx`, `sample-format.docx` with
|
|
325
|
+
`make-*.py` regeneration scripts.
|
|
326
|
+
|
|
327
|
+
### Documentation
|
|
328
|
+
|
|
329
|
+
- Replaced the long development README with a GitHub-oriented README: badges,
|
|
330
|
+
quick start, feature overview, format matrix, install paths, configuration,
|
|
331
|
+
tools, architecture, development, security, and limits.
|
|
332
|
+
- Added this changelog and set `package.json` version to `1.0.0`.
|
|
333
|
+
- Added a complete Simplified Chinese README (`README.zh-CN.md`) and a language
|
|
334
|
+
switcher; the English README now contains English-only prose and UI labels.
|
|
335
|
+
|
|
336
|
+
### Known limitations
|
|
337
|
+
|
|
338
|
+
- No PDF, EPUB, or image/OCR import yet; no PDF layout-preserving export.
|
|
339
|
+
- DOCX: tables, headers/footers, footnotes, fields, alt text, and tracked
|
|
340
|
+
deletions are not imported; mixed-run translation inherits the first run style.
|
|
341
|
+
- PPTX: body text only; notes, charts, SmartArt, and fields are not imported.
|
|
342
|
+
- XLSX: two-column table only; styles, formulas, merged cells, images, and extra
|
|
343
|
+
sheets are not preserved.
|
|
344
|
+
- HTML/RTF export does not round-trip original styling; JSON only translates
|
|
345
|
+
string values.
|
|
346
|
+
- TM matching is lexical, not semantic.
|
|
347
|
+
- Library rename/delete and per-tab mount state are not part of v1.0.0.
|
|
348
|
+
- Persistence is one snapshot with last-write-wins semantics, not a multi-user
|
|
349
|
+
journal.
|
|
350
|
+
- No browser pixel/click test is included; the generated client is validated by
|
|
351
|
+
`node --check`, helper tests, and plugin slot activation.
|
|
352
|
+
|
|
353
|
+
## Development history
|
|
354
|
+
|
|
355
|
+
| Date | Milestone |
|
|
356
|
+
| --- | --- |
|
|
357
|
+
| 2026-11-03 | Plugin skeleton, Host/Client split, CAT store, segmentation, TM, glossary, three tools, workbench UI, TXT/MD/DOCX/TMX import/export, mock MT. |
|
|
358
|
+
| 2026-11-03 | Persistence layer (`dataDir`, v1 snapshot, atomic writes, corrupt fallback), `tmId`/`glossaryId` reservations, reload/corruption tests. |
|
|
359
|
+
| 2026-11-03 | Graded `matchType` (`exact`/`near_exact`/three fuzzy bands) with locale labels and boundary tests. |
|
|
360
|
+
| 2026-11-03 | Four additional agent tools (`cat_lookup_glossary`, `cat_list_documents`, `cat_switch_document`, `cat_suggest_mt`). |
|
|
361
|
+
| 2026-11-03 | Multi-library TM/glossary mounts, `targetTmId`, v1→v2 migration, library modal, mounted-only semantics. |
|
|
362
|
+
| 2026-11-03 | Read-only audit and hardening: mount checkbox, MT route reuse, clear confirmation, mounted write boundaries, strict persistence, revision polling, language/metadata fixes, store/client split. |
|
|
363
|
+
| 2026-11-04 | Document tabs, close/reopen, duplicate fingerprint, recent-document cleanup. |
|
|
364
|
+
| 2026-11-04 | Source-format-preserving DOCX export with sidecar storage and fixtures. |
|
|
365
|
+
| 2026-11-04 | First-tier exchange formats: CSV mapping, SRT, WebVTT, PO, XLIFF 1.2, metadata persistence, timeline fixes. |
|
|
366
|
+
| 2026-11-04 | Second-tier formats: HTML, JSON, XLSX, PPTX, RTF; binary upload/export; source-preserving PPTX. |
|
|
367
|
+
| 2026-11-04 | Responsive UI density 1×–1.8×; button contrast fix; v1.0.0 release. |
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Jovi Lecca
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
CAIT (dsh-cait)
|
|
2
|
+
Copyright 2026 Jovi Lecca
|
|
3
|
+
|
|
4
|
+
This product includes software developed as part of the CAIT project
|
|
5
|
+
(https://github.com/JoviLecca/dsh-CAIT).
|
|
6
|
+
|
|
7
|
+
This NOTICE file is a supplement to, and does not modify, the terms of the
|
|
8
|
+
Apache License, Version 2.0, under which the work is distributed (see LICENSE).
|
|
9
|
+
It carries the attribution notice recommended by section 4(d) of that license:
|
|
10
|
+
any redistribution of the work or a derivative work must retain this notice.
|
|
11
|
+
|
|
12
|
+
Third-party components are not bundled with this work. DSH itself, the DSH
|
|
13
|
+
runtime, and any installed DSH plugins remain under their own licenses; CAIT
|
|
14
|
+
loads them from the host environment and does not redistribute them.
|