@a3s-lab/office 0.7.2 → 0.7.3
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/COLLABORATION_ROADMAP.md +47 -19
- package/README.md +36 -4
- package/dist/0~document-editor.js +318 -223
- package/dist/8928.js +299 -31
- package/dist/9787.js +13 -4
- package/dist/core.d.ts +1 -1
- package/dist/internal/collaboration/office-collaboration.d.ts +4 -2
- package/dist/internal/collaboration/office-document-collaboration-comment-permissions.d.ts +3 -0
- package/dist/internal/features/work/editors/document-comment-composer.d.ts +1 -0
- package/dist/internal/features/work/editors/document-comments-panel.d.ts +3 -1
- package/dist/internal/features/work/editors/document-selection-toolbar.d.ts +2 -1
- package/dist/internal/features/work/editors/document-toolbar.d.ts +2 -1
- package/dist/internal/features/work/editors/use-document-comments.d.ts +6 -1
- package/dist/internal/features/work/work-document-comments.d.ts +5 -1
- package/dist/internal/features/work/work-types.d.ts +2 -0
- package/dist/office-kernel.wasm +0 -0
- package/dist/styles.css +11 -0
- package/package.json +10 -3
package/COLLABORATION_ROADMAP.md
CHANGED
|
@@ -22,8 +22,9 @@ which tracks editor capability parity with WPS.
|
|
|
22
22
|
the local binding origin, so one participant cannot undo another
|
|
23
23
|
participant's operation.
|
|
24
24
|
- `view`, `comment`, `suggest`, and `edit` are explicit session modes. A format
|
|
25
|
-
enables a mode only after its durable model exists
|
|
26
|
-
|
|
25
|
+
enables a mode only after its durable model exists. Document now enables
|
|
26
|
+
durable review-only `comment`; unsupported mode/format pairs remain
|
|
27
|
+
read-only.
|
|
27
28
|
- Editors never collaborate by repeatedly replacing one serialized OOXML file
|
|
28
29
|
or one universal JSON blob. Each format gets a typed, conflict-local model.
|
|
29
30
|
|
|
@@ -90,8 +91,12 @@ Status: implemented in the browser library.
|
|
|
90
91
|
- A runnable A3S Boot reference backend now provides signed room tickets,
|
|
91
92
|
Origin validation, permission enforcement, WebSocket rooms, durable Yrs
|
|
92
93
|
persistence, ephemeral Awareness relay, reconnect repair, and service-owned
|
|
93
|
-
durable update polling.
|
|
94
|
-
|
|
94
|
+
durable update polling. Version-2 tickets bind actor display name and the
|
|
95
|
+
durable store semantically authorizes Document comment-mode updates under
|
|
96
|
+
the room lock before persistence or broadcast. Its browser adapter converts
|
|
97
|
+
bounded base64 wire payloads back to the package's typed `Uint8Array`
|
|
98
|
+
transport envelope and verifies the ready identity against the local
|
|
99
|
+
session.
|
|
95
100
|
- Convergence, offline/reconnect, transport-boundary, presence, permission,
|
|
96
101
|
StrictMode, framework-parity, ownership, backend persistence, room broadcast,
|
|
97
102
|
ticket tamper, and read-only authorization tests.
|
|
@@ -103,9 +108,10 @@ Redis/NATS fan-out plus a distributed writer/lock policy.
|
|
|
103
108
|
### Phase 2: Document
|
|
104
109
|
|
|
105
110
|
Status: browser collaboration foundation, participant roster, remote
|
|
106
|
-
selection/caret projection, participant navigation,
|
|
107
|
-
text/options/bounded structural paragraph
|
|
108
|
-
parity and
|
|
111
|
+
selection/caret projection, participant navigation, durable review-only
|
|
112
|
+
comment mode, and native text/options/bounded structural paragraph/comment
|
|
113
|
+
mutations implemented; rich native parity and suggestion authorization are
|
|
114
|
+
pending.
|
|
109
115
|
|
|
110
116
|
- TipTap is bound to `document.content` through
|
|
111
117
|
`@tiptap/extension-collaboration`; StarterKit undo/redo is disabled and the
|
|
@@ -139,11 +145,30 @@ parity and the remaining review authorization matrix are pending.
|
|
|
139
145
|
after durable restart and replay, including concurrent native and browser
|
|
140
146
|
paragraph insertion across nested lists and nested tables. Real CLI and MCP
|
|
141
147
|
subprocess tests exercise the same bounded structural mutations.
|
|
148
|
+
- Document `comment` sessions now create selection-anchored threads, append
|
|
149
|
+
replies, resolve or reopen threads, and delete only their actor's own comment
|
|
150
|
+
or reply records while canonical text, structure, options, bibliography, and
|
|
151
|
+
non-comment formatting stay read-only. Records persist by stable ID and
|
|
152
|
+
immutable creation claim; removing an anchor through an authorized content
|
|
153
|
+
edit retains a detached thread. Remote review changes do not enter local undo
|
|
154
|
+
history.
|
|
155
|
+
- Rust, CLI, MCP, and A3S Code expose `document-comment-create`,
|
|
156
|
+
`document-comment-reply`, `document-comment-set-resolved`, and
|
|
157
|
+
`document-comment-delete`. Projection schema v2 returns attributable threads,
|
|
158
|
+
replies, anchor text, paragraph/text identities, browser-compatible UTF-16
|
|
159
|
+
offsets, resolution, and detached state. Native and browser fixtures cover
|
|
160
|
+
restart, reordered delivery, stale anchor guards, idempotent retries,
|
|
161
|
+
ownership failures, and cross-language convergence.
|
|
162
|
+
- The A3S Boot backend permits `edit` content/review updates and semantically
|
|
163
|
+
validated Document `comment` review-only updates. Signed actor display name
|
|
164
|
+
must match the session actor and every new record author. Forged roots,
|
|
165
|
+
content, structure, options, authorship, order, claims, anchors, or foreign
|
|
166
|
+
deletion fail before the durable store changes.
|
|
142
167
|
|
|
143
168
|
Remaining:
|
|
144
169
|
|
|
145
170
|
- Add suggestion-only authorization and durable accept/reject decision audit
|
|
146
|
-
records; `
|
|
171
|
+
records; `suggest` remains read-only until that model exists.
|
|
147
172
|
- Prove concurrent full-table, list-restructure, section, comment, and revision
|
|
148
173
|
workflows, plus DOCX import/export after merged edits.
|
|
149
174
|
- Expand native convergence from bounded paragraph edits to complete table,
|
|
@@ -345,7 +370,7 @@ destructive actions remain attributable, reviewable, and non-retryable.
|
|
|
345
370
|
|
|
346
371
|
Status: native Yrs replica store, resumable CLI/MCP event streams, `a3s code`
|
|
347
372
|
projection, a host-injected live CLI transport session, and typed Markdown,
|
|
348
|
-
Document, Spreadsheet cell, Presentation scene-element, PDF
|
|
373
|
+
Document content/comment, Spreadsheet cell, Presentation scene-element, PDF
|
|
349
374
|
annotation/form-value, and PDF redaction/page-operation review mutation
|
|
350
375
|
surfaces are implemented; the remaining format mutations and native presence
|
|
351
376
|
projection are pending.
|
|
@@ -390,16 +415,20 @@ projection are pending.
|
|
|
390
415
|
if the declared match count is stale. Bounded section/list/table/blockquote
|
|
391
416
|
paragraph insert/delete uses explicit stable identities and exact deletion
|
|
392
417
|
guards, while table-contained edits rotate all ancestor row text identities;
|
|
393
|
-
page color and track-changes write their typed option fields.
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
418
|
+
page color and track-changes write their typed option fields. Document comment
|
|
419
|
+
create/reply/resolve/delete writes attributable browser-compatible review
|
|
420
|
+
records and exact selection marks. All emit minimal incremental updates
|
|
421
|
+
through the same durable receipt/checkpoint path. Canonical content mutations
|
|
422
|
+
require `edit`; Document review mutations accept `edit` or `comment`, with
|
|
423
|
+
ownership-restricted deletion in `comment`. Raw remote updates remain
|
|
424
|
+
receivable in every mode so read-only peers still converge.
|
|
397
425
|
- Rust `project`, `collab read`, and `office_collaboration_read` interpret the
|
|
398
426
|
Office-owned browser schema inside Office rather than in a product host.
|
|
399
427
|
Markdown returns its exact canonical source. Document returns bounded
|
|
400
428
|
traversal-order paragraph records, stable `paragraphId`/`textId` pairs,
|
|
401
|
-
structural ancestry, option fields,
|
|
402
|
-
with the exact state vector.
|
|
429
|
+
structural ancestry, option fields, subordinate plain text, and projection-v2
|
|
430
|
+
comment/reply/anchor/detached records together with the exact state vector.
|
|
431
|
+
`document-replace-paragraph` uses those stable
|
|
403
432
|
identities plus complete expected text to reject a stale same-paragraph
|
|
404
433
|
browser/agent edit before writing, while unrelated changes can proceed
|
|
405
434
|
without replacing the full document.
|
|
@@ -441,7 +470,7 @@ projection are pending.
|
|
|
441
470
|
source browser operation, and source attribution is audit data rather than
|
|
442
471
|
an authorization token.
|
|
443
472
|
- Cross-language tests apply deterministic native UTF-16 Markdown, ProseMirror
|
|
444
|
-
Document text/options/paragraph, Spreadsheet cell, Presentation
|
|
473
|
+
Document text/options/paragraph/comment, Spreadsheet cell, Presentation
|
|
445
474
|
scene-element content/z-order, and PDF annotation/form-value updates in browser Yjs,
|
|
446
475
|
including concurrent browser/native paragraph, cell-leaf, element-field,
|
|
447
476
|
annotation-leaf, and PDF form edits, in addition to importing browser Yjs
|
|
@@ -454,9 +483,8 @@ Remaining:
|
|
|
454
483
|
|
|
455
484
|
- Extend typed format-model mutations to Spreadsheet and remaining Presentation
|
|
456
485
|
structural/rich-text operations plus PDF signatures; deepen Document
|
|
457
|
-
mutations to additional nested structures and
|
|
458
|
-
|
|
459
|
-
mutation.
|
|
486
|
+
mutations to additional nested structures and tracked suggestion decisions
|
|
487
|
+
before enabling `suggest` for local mutation.
|
|
460
488
|
- Project editor-visible presence and selection state while keeping Awareness
|
|
461
489
|
ephemeral and outside native replica persistence.
|
|
462
490
|
|
package/README.md
CHANGED
|
@@ -143,8 +143,9 @@ The images below are committed visual-regression baselines from the real
|
|
|
143
143
|
also keep a durable Yrs replica, exchange standard Yjs v1 updates and state
|
|
144
144
|
vectors, perform authorized typed Markdown, Document, Spreadsheet cell,
|
|
145
145
|
Presentation scene-element and z-order, and PDF annotation, form-value, and
|
|
146
|
-
review changes,
|
|
147
|
-
|
|
146
|
+
review changes, including attributable Document selection comments and
|
|
147
|
+
replies, retain browser/native actor attribution, and checkpoint without
|
|
148
|
+
replacing a whole Office file.
|
|
148
149
|
|
|
149
150
|
## Real-time collaboration
|
|
150
151
|
|
|
@@ -158,6 +159,10 @@ through the CLI, standard MCP server, or A3S Code.
|
|
|
158
159
|
The host owns rooms, authentication, authorization, network delivery, offline
|
|
159
160
|
buffering, persistence, and the `Y.Doc`; A3S Office owns format-specific
|
|
160
161
|
bindings, local undo, validated presence, and conflict-local typed mutations.
|
|
162
|
+
An authenticated Document `comment` session can select text, create a durable
|
|
163
|
+
thread, reply, resolve or reopen it, and delete only review records owned by
|
|
164
|
+
its actor while canonical content remains read-only. The server independently
|
|
165
|
+
validates that review-only boundary before persistence and broadcast.
|
|
161
166
|
See the bilingual [real-time collaboration guide](https://a3s-lab.github.io/Office/docs/components/collaboration.html)
|
|
162
167
|
for React, Vue, Web Component, reconnect, security, and native-agent setup.
|
|
163
168
|
The repository also ships a runnable
|
|
@@ -1046,6 +1051,19 @@ cargo run -p a3s-office-cli -- collab mutate .a3s/report.replica \
|
|
|
1046
1051
|
--operation-id edit-44 \
|
|
1047
1052
|
--mutation '{"type":"document-insert-paragraph","anchorParagraphId":"00000001","position":"after","paragraphId":"00000012","textId":"00000013","text":"Native paragraph"}' --json
|
|
1048
1053
|
|
|
1054
|
+
# Add a durable selection comment from a comment-mode native replica. Read the
|
|
1055
|
+
# projection first and use its exact paragraph/text IDs, anchor text, and UTF-16
|
|
1056
|
+
# offsets. The author must match the authenticated actor display name.
|
|
1057
|
+
cargo run -p a3s-office-cli -- collab join .a3s/report-review.replica \
|
|
1058
|
+
--artifact-id report --kind document --actor-id agent-7 \
|
|
1059
|
+
--actor-kind agent --mode comment --operation-id comment-join-1 \
|
|
1060
|
+
--input browser.update --json
|
|
1061
|
+
cargo run -p a3s-office-cli -- collab read .a3s/report-review.replica --json
|
|
1062
|
+
cargo run -p a3s-office-cli -- collab mutate .a3s/report-review.replica \
|
|
1063
|
+
--artifact-id report --kind document --actor-id agent-7 --mode comment \
|
|
1064
|
+
--operation-id comment-45 \
|
|
1065
|
+
--mutation '{"type":"document-comment-create","commentId":"comment-1","paragraphId":"00000001","expectedTextId":"00000002","startUtf16":6,"endUtf16":12,"expectedText":"review","author":"Ada Reviewer","createdAt":"2026-08-17T00:00:00.000Z","text":"Clarify this review point."}' --json
|
|
1066
|
+
|
|
1049
1067
|
# Recursively patch one Spreadsheet cell after matching the observed value.
|
|
1050
1068
|
# Zero-based row/column coordinates follow the browser collaboration model.
|
|
1051
1069
|
cargo run -p a3s-office-cli -- collab mutate .a3s/plan.replica \
|
|
@@ -1118,8 +1136,10 @@ suppression, without opening its own network provider. Native Rust `project`,
|
|
|
1118
1136
|
`collab read`, and `office_collaboration_read` return the exact canonical
|
|
1119
1137
|
Markdown source or an Office-owned bounded Document projection with stable
|
|
1120
1138
|
paragraph/text identities, structural ancestry, option fields, subordinate
|
|
1121
|
-
plain text,
|
|
1122
|
-
|
|
1139
|
+
plain text, durable comments, replies, resolution and detached state, exact
|
|
1140
|
+
paragraph-local UTF-16 anchors, and the current state vector. Projection schema
|
|
1141
|
+
version 2 is the contract for these review fields. Product hosts therefore do
|
|
1142
|
+
not need to interpret Office's private Yjs schema. Typed Markdown
|
|
1123
1143
|
replace/splice operations use browser UTF-16 offsets. Document mutations edit
|
|
1124
1144
|
ProseMirror `Y.XmlText` in place, rotate the affected Word `textId`, replace one
|
|
1125
1145
|
stable plain paragraph only after its `paragraphId`, `textId`, and complete
|
|
@@ -1164,6 +1184,17 @@ targets, or a second final decision. None of these paths puts source or
|
|
|
1164
1184
|
signature bytes in Yjs. Validated browser source origins survive native
|
|
1165
1185
|
persistence and are re-emitted separately from host delivery IDs.
|
|
1166
1186
|
|
|
1187
|
+
Document review mutations use `document-comment-create`,
|
|
1188
|
+
`document-comment-reply`, `document-comment-set-resolved`, and
|
|
1189
|
+
`document-comment-delete`. Create validates an exact paragraph/text identity,
|
|
1190
|
+
UTF-16 range, and selected text before writing both the thread and its
|
|
1191
|
+
`documentComment` mark. Replies append to the stable thread; resolution can be
|
|
1192
|
+
set or cleared; and `comment` mode can delete only records attributed to its
|
|
1193
|
+
own actor. Removing selected text through a separately authorized edit keeps
|
|
1194
|
+
the thread as a detached review record. Browser and native comment changes
|
|
1195
|
+
share immutable claims and remain isolated from another participant's undo
|
|
1196
|
+
history.
|
|
1197
|
+
|
|
1167
1198
|
Read the [native engine design](docs/latest/en/native-office-engine.md), the
|
|
1168
1199
|
complete [CLI reference](docs/latest/en/cli-reference.md), or the published
|
|
1169
1200
|
[CLI and Skill guide](https://a3s-lab.github.io/Office/docs/automation/).
|
|
@@ -1227,6 +1258,7 @@ without hard-coded return URLs.
|
|
|
1227
1258
|
|
|
1228
1259
|
- [Live Playground](https://a3s-lab.github.io/Office/)
|
|
1229
1260
|
- [Documentation center](https://a3s-lab.github.io/Office/docs/)
|
|
1261
|
+
- [A3S Office 0.7.3 documentation](https://a3s-lab.github.io/Office/docs/0.7.3/)
|
|
1230
1262
|
- [A3S Office 0.7.2 documentation](https://a3s-lab.github.io/Office/docs/0.7.2/)
|
|
1231
1263
|
- [A3S Office 0.7.1 documentation](https://a3s-lab.github.io/Office/docs/0.7.1/)
|
|
1232
1264
|
- [A3S Office 0.7.0 documentation](https://a3s-lab.github.io/Office/docs/0.7.0/)
|