@a3s-lab/office 0.9.1 → 0.10.0
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 +30 -9
- package/README.md +23 -8
- package/dist/{0~7754.js → 0~4705.js} +500 -3
- package/dist/0~document-editor.js +7 -1
- package/dist/0~work-docx-export.js +260 -13
- package/dist/0~work-docx-import.js +9 -391
- package/dist/0~work-office-diagnostics.js +6 -4
- package/dist/8928.js +325 -22
- package/dist/internal/features/work/work-document-format-change-tracking.d.ts +9 -0
- package/dist/internal/features/work/work-document-format-changes.d.ts +28 -0
- package/dist/internal/features/work/work-docx-format-change-export.d.ts +17 -0
- package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +10 -0
- package/dist/internal/features/work/work-types.d.ts +1 -1
- package/dist/office-kernel.wasm +0 -0
- package/dist/styles.css +20 -0
- package/package.json +5 -3
package/COLLABORATION_ROADMAP.md
CHANGED
|
@@ -110,15 +110,17 @@ Redis/NATS fan-out plus a distributed writer/lock policy.
|
|
|
110
110
|
|
|
111
111
|
Status: browser collaboration foundation, participant roster, remote
|
|
112
112
|
selection/caret projection, participant navigation, durable review-only
|
|
113
|
-
comment and suggestion modes,
|
|
114
|
-
text/options/bounded structural
|
|
115
|
-
implemented; rich native mutation
|
|
113
|
+
comment and suggestion modes, character-formatting revisions, immutable
|
|
114
|
+
decision audit, and native text/options/bounded structural
|
|
115
|
+
paragraph/comment/suggestion mutations implemented; rich native mutation
|
|
116
|
+
parity remains pending.
|
|
116
117
|
|
|
117
118
|
- TipTap is bound to `document.content` through
|
|
118
119
|
`@tiptap/extension-collaboration`; StarterKit undo/redo is disabled and the
|
|
119
120
|
collaboration binding owns local history.
|
|
120
|
-
- Section/page OOXML state, comment anchors, and
|
|
121
|
-
in the ProseMirror fragment. Document-level
|
|
121
|
+
- Section/page OOXML state, comment anchors, and text or character-formatting
|
|
122
|
+
tracked-change marks converge in the ProseMirror fragment. Document-level
|
|
123
|
+
page color, tracking mode,
|
|
122
124
|
comment threads/replies, and bibliography sources use conflict-local typed
|
|
123
125
|
roots instead of a serialized document blob.
|
|
124
126
|
- React, Vue, and Web Component adapters accept the same initialized session.
|
|
@@ -166,6 +168,12 @@ implemented; rich native mutation parity remains pending.
|
|
|
166
168
|
converge, a second conflicting final decision fails closed, old Documents
|
|
167
169
|
without the additive roots remain readable, and a final decision clears
|
|
168
170
|
local history that could otherwise resurrect the decided mark.
|
|
171
|
+
- Character-formatting commands over existing text create one `formatting`
|
|
172
|
+
change mark with a bounded prior-direct-mark snapshot. Accept removes only
|
|
173
|
+
the revision wrapper and keeps the new formatting; reject restores the prior
|
|
174
|
+
bold, italic, underline, strike, sub/superscript, font, size, color,
|
|
175
|
+
highlight, and grid marks without changing text. Supported DOCX
|
|
176
|
+
`w:rPrChange` records import into the same model and export natively.
|
|
169
177
|
- Rust, CLI, MCP, and A3S Code expose `document-comment-create`,
|
|
170
178
|
`document-comment-reply`, `document-comment-set-resolved`,
|
|
171
179
|
`document-comment-delete`, `document-suggestion-create`, and
|
|
@@ -183,6 +191,12 @@ implemented; rich native mutation parity remains pending.
|
|
|
183
191
|
content, structure, options, non-suggestion formatting, authorship, order,
|
|
184
192
|
claims, anchors, foreign deletion, or foreign suggestion changes fail before
|
|
185
193
|
the durable store changes.
|
|
194
|
+
- Native Yrs validation admits only the bounded formatting-change schema,
|
|
195
|
+
preserves it across restart and duplicate/reordered delivery, exposes
|
|
196
|
+
`formatting` in immutable decision projections, and makes `suggest` updates
|
|
197
|
+
retain existing formatting revisions byte-semantically. Formatting is a
|
|
198
|
+
Document change kind, not a native insertion/deletion suggestion kind; the
|
|
199
|
+
current closed `document-suggestion-*` mutations remain text-only.
|
|
186
200
|
|
|
187
201
|
Remaining:
|
|
188
202
|
|
|
@@ -395,8 +409,9 @@ projection, a host-injected live CLI transport session, authenticated browser
|
|
|
395
409
|
suggestion-update authorization, and typed Markdown, Document
|
|
396
410
|
content/comment/suggestion, Spreadsheet cell, Presentation scene-element, PDF
|
|
397
411
|
annotation/form-value, and PDF redaction/page-operation review mutation surfaces
|
|
398
|
-
are implemented
|
|
399
|
-
|
|
412
|
+
are implemented. The live CLI session also projects ephemeral native Presence
|
|
413
|
+
and format-specific locations through standard Yjs Awareness; remaining typed
|
|
414
|
+
format mutations are pending.
|
|
400
415
|
|
|
401
416
|
- Yrs `0.27.3` now uses 53-bit Yjs-compatible client IDs and exchanges standard
|
|
402
417
|
Yjs v1 updates, state vectors, and y-sync `SyncStep1`/`Update` messages with
|
|
@@ -426,6 +441,14 @@ are pending.
|
|
|
426
441
|
stdin/stdout for a coding-agent or product host. The host still owns the
|
|
427
442
|
WebSocket or IPC channel, room selection, authentication, authorization,
|
|
428
443
|
buffering, and delivery identities; the CLI never opens a provider itself.
|
|
444
|
+
- Supplying `--actor-name` gives the live session a separate in-memory Yrs
|
|
445
|
+
Awareness peer. Typed active/idle/away state and Document, Markdown,
|
|
446
|
+
Spreadsheet, Presentation, or PDF locations are emitted as bounded
|
|
447
|
+
`outbound-awareness` records, while validated remote updates and peer-left
|
|
448
|
+
events become sorted participant snapshots. Reconnect clears stale remote
|
|
449
|
+
state and republishes the local participant; orderly close emits an
|
|
450
|
+
Awareness tombstone. No Presence state or clock enters the replica,
|
|
451
|
+
checkpoint, durable update log, or operation receipts.
|
|
429
452
|
- Each replica binds one stable actor ID, actor kind, permission mode, artifact
|
|
430
453
|
identity/kind, namespace, and client ID. Apply/checkpoint/leave require the
|
|
431
454
|
same identity plus a stable operation ID and accept an optional state-vector
|
|
@@ -518,8 +541,6 @@ Remaining:
|
|
|
518
541
|
structural/rich-text operations plus PDF signatures; deepen Document
|
|
519
542
|
mutations to additional nested structures and complete table/list/section
|
|
520
543
|
revision workflows.
|
|
521
|
-
- Project editor-visible presence and selection state while keeping Awareness
|
|
522
|
-
ephemeral and outside native replica persistence.
|
|
523
544
|
|
|
524
545
|
Exit criterion: a browser, `office` CLI, MCP client, and `a3s code` agent edit
|
|
525
546
|
the same artifact concurrently, converge at the shared-model level, reconnect
|
package/README.md
CHANGED
|
@@ -47,8 +47,10 @@ workflows, and a separate Rust automation plane.
|
|
|
47
47
|
- **Collaborate across every editor** with shared Yjs/Yrs content, Awareness
|
|
48
48
|
participants and remote locations, plus browser, CLI, MCP, and A3S Code peers.
|
|
49
49
|
Document reviewers can submit attributed insertions, deletions, and
|
|
50
|
-
replacements without directly changing canonical text
|
|
51
|
-
|
|
50
|
+
replacements without directly changing canonical text. Editors can also
|
|
51
|
+
track character-formatting revisions, accept the new formatting or restore
|
|
52
|
+
the exact prior marks, and retain either result in the immutable shared
|
|
53
|
+
decision audit.
|
|
52
54
|
- **Automate deterministically** through the native CLI, standard MCP server,
|
|
53
55
|
or packaged Office Skill.
|
|
54
56
|
|
|
@@ -148,7 +150,8 @@ The images below are committed visual-regression baselines from the real
|
|
|
148
150
|
Presentation scene-element and z-order, and PDF annotation, form-value, and
|
|
149
151
|
review changes, including attributable Document selection comments, replies,
|
|
150
152
|
text suggestions, and atomic final decisions, retain browser/native actor
|
|
151
|
-
attribution,
|
|
153
|
+
attribution, validate browser-created formatting revisions and their audit
|
|
154
|
+
records, and checkpoint without replacing a whole Office file.
|
|
152
155
|
|
|
153
156
|
## Real-time collaboration
|
|
154
157
|
|
|
@@ -171,9 +174,13 @@ deletions, and replacements while canonical text, structure, formatting,
|
|
|
171
174
|
options, comments, and other actors' suggestions remain protected. An `edit`
|
|
172
175
|
participant accepts or rejects a proposal and appends the final actor-attributed
|
|
173
176
|
decision to the immutable `document.change-decisions` audit trail. The A3S Boot
|
|
174
|
-
service
|
|
175
|
-
|
|
176
|
-
|
|
177
|
+
service also persists `edit`-mode character-formatting revisions and validates
|
|
178
|
+
their bounded prior-format snapshot before broadcast. Accept keeps the new
|
|
179
|
+
bold, italic, underline, strike, vertical position, font, size, color, or
|
|
180
|
+
highlight; reject restores the prior direct marks without deleting the text.
|
|
181
|
+
Authenticated `suggest` updates must preserve those formatting revisions and
|
|
182
|
+
cannot rewrite their identity or snapshot. `suggest` on non-Document formats
|
|
183
|
+
remains receive-only.
|
|
177
184
|
See the bilingual [real-time collaboration guide](https://a3s-lab.github.io/Office/docs/components/collaboration.html)
|
|
178
185
|
for React, Vue, Web Component, reconnect, security, and native-agent setup.
|
|
179
186
|
The repository also ships a runnable
|
|
@@ -196,6 +203,8 @@ bun run playground
|
|
|
196
203
|
|
|
197
204
|
Then open the local URL printed by the development server. For a zero-install
|
|
198
205
|
tour, use the [live Playground](https://a3s-lab.github.io/Office/).
|
|
206
|
+
Choose **体验格式修订**, open **审阅**, then **查看修订(1)** to inspect the
|
|
207
|
+
Formatting card and exercise accept or reject semantics.
|
|
199
208
|
|
|
200
209
|
### Embed a controlled React editor
|
|
201
210
|
|
|
@@ -1042,7 +1051,7 @@ cargo run -p a3s-office-cli -- collab diff .a3s/report.replica \
|
|
|
1042
1051
|
|
|
1043
1052
|
# Bridge that replica to a host-owned room over machine-readable JSONL.
|
|
1044
1053
|
cargo run -p a3s-office-cli -- collab session .a3s/report.replica \
|
|
1045
|
-
--poll-ms 100 --json
|
|
1054
|
+
--poll-ms 100 --actor-name "A3S Agent" --json
|
|
1046
1055
|
|
|
1047
1056
|
# Make a typed local change in an initialized Markdown replica. A running
|
|
1048
1057
|
# session publishes the resulting incremental Yjs update automatically.
|
|
@@ -1180,7 +1189,11 @@ controller as a shared participant roster, remote canvas projection, and
|
|
|
1180
1189
|
participant-to-location navigation; neither component creates an account or
|
|
1181
1190
|
backend. The native CLI's JSONL session bridges the same host-channel envelope,
|
|
1182
1191
|
including reconnect handshakes, durable agent updates, and remote-echo
|
|
1183
|
-
suppression, without opening its own network provider.
|
|
1192
|
+
suppression, without opening its own network provider. With `--actor-name`, it
|
|
1193
|
+
also emits standard, bounded `outbound-awareness` records for ephemeral agent
|
|
1194
|
+
activity and format-specific locations, accepts remote Awareness and peer-left
|
|
1195
|
+
records, and publishes participant snapshots without changing the durable
|
|
1196
|
+
replica. Native Rust `project`,
|
|
1184
1197
|
`collab read`, and `office_collaboration_read` return the exact canonical
|
|
1185
1198
|
Markdown source or an Office-owned bounded Document projection with stable
|
|
1186
1199
|
paragraph/text identities, structural ancestry, option fields, subordinate
|
|
@@ -1323,6 +1336,8 @@ without hard-coded return URLs.
|
|
|
1323
1336
|
|
|
1324
1337
|
- [Live Playground](https://a3s-lab.github.io/Office/)
|
|
1325
1338
|
- [Documentation center](https://a3s-lab.github.io/Office/docs/)
|
|
1339
|
+
- [A3S Office 0.10.0 documentation](https://a3s-lab.github.io/Office/docs/0.10.0/)
|
|
1340
|
+
- [A3S Office 0.9.2 documentation](https://a3s-lab.github.io/Office/docs/0.9.2/)
|
|
1326
1341
|
- [A3S Office 0.9.1 documentation](https://a3s-lab.github.io/Office/docs/0.9.1/)
|
|
1327
1342
|
- [A3S Office 0.9.0 documentation](https://a3s-lab.github.io/Office/docs/0.9.0/)
|
|
1328
1343
|
- [A3S Office 0.8.1 documentation](https://a3s-lab.github.io/Office/docs/0.8.1/)
|