@a3s-lab/office 0.7.0 → 0.7.2

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.
@@ -87,13 +87,18 @@ Status: implemented in the browser library.
87
87
  navigate only on explicit activation; passive Awareness updates preserve
88
88
  local focus, selection, and viewport.
89
89
  - React, Vue, and Web Component session and presence plumbing.
90
+ - A runnable A3S Boot reference backend now provides signed room tickets,
91
+ Origin validation, permission enforcement, WebSocket rooms, durable Yrs
92
+ persistence, ephemeral Awareness relay, reconnect repair, and service-owned
93
+ durable update polling. Its browser adapter converts bounded base64 wire
94
+ payloads back to the package's typed `Uint8Array` transport envelope.
90
95
  - Convergence, offline/reconnect, transport-boundary, presence, permission,
91
- StrictMode, framework-parity, and ownership tests.
96
+ StrictMode, framework-parity, ownership, backend persistence, room broadcast,
97
+ ticket tamper, and read-only authorization tests.
92
98
 
93
- Remaining before this phase is production complete:
94
-
95
- - Add reference WebSocket/WebTransport relay examples with provider-side
96
- authorization and persistent update replay.
99
+ The reference backend is complete for one service process. Multi-replica
100
+ deployments still require host-selected sticky room routing or shared
101
+ Redis/NATS fan-out plus a distributed writer/lock policy.
97
102
 
98
103
  ### Phase 2: Document
99
104
 
@@ -356,7 +361,7 @@ projection are pending.
356
361
  canonical replay preserves genuinely missing updates while resolving Yrs
357
362
  array items whose causal dependencies arrived out of order.
358
363
  - `a3s-office collab` exposes non-interactive `create`, `join`, `inspect`,
359
- `diff`/`synchronize`, `apply`, `mutate`, `checkpoint`, `watch`, and `leave`
364
+ `read`, `diff`/`synchronize`, `apply`, `mutate`, `checkpoint`, `watch`, and `leave`
360
365
  commands
361
366
  with JSON output and optional no-clobber binary output. `sync-step1`,
362
367
  `encode-update`, and `handle-message` expose standard y-sync document
@@ -389,6 +394,15 @@ projection are pending.
389
394
  incremental updates through the same durable
390
395
  receipt/checkpoint path. Canonical typed mutations require `edit`; raw remote
391
396
  updates remain receivable in every mode so read-only peers still converge.
397
+ - Rust `project`, `collab read`, and `office_collaboration_read` interpret the
398
+ Office-owned browser schema inside Office rather than in a product host.
399
+ Markdown returns its exact canonical source. Document returns bounded
400
+ traversal-order paragraph records, stable `paragraphId`/`textId` pairs,
401
+ structural ancestry, option fields, and subordinate plain text together
402
+ with the exact state vector. `document-replace-paragraph` uses those stable
403
+ identities plus complete expected text to reject a stale same-paragraph
404
+ browser/agent edit before writing, while unrelated changes can proceed
405
+ without replacing the full document.
392
406
  - Spreadsheet cell mutations create or recursively patch one zero-based
393
407
  coordinate after matching the caller's observed cell, or delete it only after
394
408
  an exact complete-cell match. They preserve the browser's field-addressed
package/README.md CHANGED
@@ -23,6 +23,7 @@
23
23
  <a href="https://a3s-lab.github.io/Office/docs/">Documentation</a> ·
24
24
  <a href="#quick-start">Quick start</a> ·
25
25
  <a href="#five-format-native-surfaces">Editors</a> ·
26
+ <a href="#real-time-collaboration">Collaboration</a> ·
26
27
  <a href="#native-automation">Automation</a> ·
27
28
  <a href="#architecture">Architecture</a> ·
28
29
  <a href="ROADMAP.md">WPS gap roadmap</a> ·
@@ -43,6 +44,8 @@ workflows, and a separate Rust automation plane.
43
44
  lowest-common-denominator model.
44
45
  - **Own the product boundary**: your application controls content, storage,
45
46
  permissions, collaboration, and model providers.
47
+ - **Collaborate across every editor** with shared Yjs/Yrs content, Awareness
48
+ participants and remote locations, plus browser, CLI, MCP, and A3S Code peers.
46
49
  - **Automate deterministically** through the native CLI, standard MCP server,
47
50
  or packaged Office Skill.
48
51
 
@@ -143,6 +146,25 @@ The images below are committed visual-regression baselines from the real
143
146
  review changes, retain browser/native actor attribution, and checkpoint
144
147
  without replacing a whole Office file.
145
148
 
149
+ ## Real-time collaboration
150
+
151
+ Document, Markdown, Spreadsheet, Presentation, and PDF expose the same
152
+ transport-neutral collaboration boundary. Two browser clients can edit one
153
+ artifact live, render an accessible participant roster, and project remote
154
+ text selections, cells, scene objects, pages, or annotations without moving
155
+ the local user's viewport or focus. Native Yrs replicas join the same state
156
+ through the CLI, standard MCP server, or A3S Code.
157
+
158
+ The host owns rooms, authentication, authorization, network delivery, offline
159
+ buffering, persistence, and the `Y.Doc`; A3S Office owns format-specific
160
+ bindings, local undo, validated presence, and conflict-local typed mutations.
161
+ See the bilingual [real-time collaboration guide](https://a3s-lab.github.io/Office/docs/components/collaboration.html)
162
+ for React, Vue, Web Component, reconnect, security, and native-agent setup.
163
+ The repository also ships a runnable
164
+ [A3S Boot collaboration server](examples/collaboration-server/) with signed
165
+ room tickets, Origin validation, durable Yrs storage, Awareness relay, a typed
166
+ browser adapter, and actor-scoped browser or native room messages.
167
+
146
168
  ## Quick start
147
169
 
148
170
  ### Try the product locally
@@ -1092,9 +1114,16 @@ controller as a shared participant roster, remote canvas projection, and
1092
1114
  participant-to-location navigation; neither component creates an account or
1093
1115
  backend. The native CLI's JSONL session bridges the same host-channel envelope,
1094
1116
  including reconnect handshakes, durable agent updates, and remote-echo
1095
- suppression, without opening its own network provider. Typed Markdown
1117
+ suppression, without opening its own network provider. Native Rust `project`,
1118
+ `collab read`, and `office_collaboration_read` return the exact canonical
1119
+ Markdown source or an Office-owned bounded Document projection with stable
1120
+ paragraph/text identities, structural ancestry, option fields, subordinate
1121
+ plain text, and the current state vector. Product hosts therefore do not need
1122
+ to interpret Office's private Yjs schema. Typed Markdown
1096
1123
  replace/splice operations use browser UTF-16 offsets. Document mutations edit
1097
- ProseMirror `Y.XmlText` in place, rotate the affected Word `textId`, insert a
1124
+ ProseMirror `Y.XmlText` in place, rotate the affected Word `textId`, replace one
1125
+ stable plain paragraph only after its `paragraphId`, `textId`, and complete
1126
+ text still match, insert a
1098
1127
  plain paragraph beside a stable identity in a bounded section, list-item,
1099
1128
  table-cell/header, or blockquote container, or delete one only after its
1100
1129
  complete text and `textId` still match. Required container blocks and each list
@@ -1198,6 +1227,8 @@ without hard-coded return URLs.
1198
1227
 
1199
1228
  - [Live Playground](https://a3s-lab.github.io/Office/)
1200
1229
  - [Documentation center](https://a3s-lab.github.io/Office/docs/)
1230
+ - [A3S Office 0.7.2 documentation](https://a3s-lab.github.io/Office/docs/0.7.2/)
1231
+ - [A3S Office 0.7.1 documentation](https://a3s-lab.github.io/Office/docs/0.7.1/)
1201
1232
  - [A3S Office 0.7.0 documentation](https://a3s-lab.github.io/Office/docs/0.7.0/)
1202
1233
  - [A3S Office 0.6.0 documentation](https://a3s-lab.github.io/Office/docs/0.6.0/)
1203
1234
  - [A3S Office 0.5.0 documentation](https://a3s-lab.github.io/Office/docs/0.5.0/)
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@a3s-lab/office",
3
- "version": "0.7.0",
4
- "description": "Open-source browser editors for documents, Markdown, spreadsheets, presentations, and PDFs.",
3
+ "version": "0.7.2",
4
+ "description": "Open-source collaborative browser editors for documents, Markdown, spreadsheets, presentations, and PDFs.",
5
5
  "keywords": [
6
6
  "office",
7
7
  "document-editor",
@@ -9,6 +9,8 @@
9
9
  "spreadsheet",
10
10
  "presentation",
11
11
  "pdf",
12
+ "collaboration",
13
+ "yjs",
12
14
  "react",
13
15
  "vue",
14
16
  "web-components"
@@ -68,6 +70,7 @@
68
70
  },
69
71
  "scripts": {
70
72
  "build": "bun run kernel:build && rslib",
73
+ "collaboration-server:typecheck": "tsc --noEmit -p examples/collaboration-server/tsconfig.json",
71
74
  "dev": "bun run kernel:build && rslib --watch",
72
75
  "docs:build": "rspress build -c website/rspress.config.ts && bun scripts/rewrite-docs-base.ts",
73
76
  "docs:dev": "rspress -c website/rspress.config.ts",
@@ -87,13 +90,15 @@
87
90
  "playground:visual:spreadsheet-ribbon": "playwright test visual-tests/spreadsheet-ribbon.functional.spec.ts --config playwright.config.ts",
88
91
  "playground:visual:update": "playwright test --config playwright.config.ts --update-snapshots",
89
92
  "test": "rstest",
90
- "test:e2e": "bun run test:e2e:fixtures && a3s-test run tests/e2e/word-page-color.acl --json && a3s-test run tests/e2e/word-page-setup-phone.acl --json && a3s-test run tests/e2e/word-paragraph-layout-phone.acl --json && a3s-test run tests/e2e/word-list-formatting-phone.acl --json && a3s-test run tests/e2e/word-font-picker-phone.acl --json && a3s-test run tests/e2e/word-comments-drawer.acl --json && a3s-test run tests/e2e/word-comment-windowing.acl --json && a3s-test run tests/e2e/word-citations-phone.acl --json && a3s-test run tests/e2e/word-navigation-search.acl --json && a3s-test run tests/e2e/word-navigation-windowing.acl --json && a3s-test run tests/e2e/word-find-replace-phone.acl --json && a3s-test run tests/e2e/word-page-navigation.acl --json && a3s-test run tests/e2e/word-page-windowing.acl --json && a3s-test run tests/e2e/word-ai-question.acl --json && a3s-test run tests/e2e/word-picture-insert.acl --json && a3s-test run tests/e2e/word-picture-alt-text-phone.acl --json && a3s-test run tests/e2e/word-track-changes-phone.acl --json && a3s-test run tests/e2e/word-review-conflict-phone.acl --json && a3s-test run tests/e2e/word-revision-windowing.acl --json && a3s-test run tests/e2e/word-table-phone.acl --json && a3s-test run tests/e2e/word-table-borders.acl --json && a3s-test run tests/e2e/word-theme-table.acl --json && a3s-test run tests/e2e/word-styled-table.acl --json && a3s-test run tests/e2e/word-multi-page-table.acl --json && a3s-test run tests/e2e/word-cross-reference-phone.acl --json && a3s-test run tests/e2e/word-bookmark-links-phone.acl --json && a3s-test run tests/e2e/word-notes-phone.acl --json && a3s-test run tests/e2e/word-fields-phone.acl --json && a3s-test run tests/e2e/spreadsheet-phone-rename.acl --json && a3s-test run tests/e2e/spreadsheet-phone-find.acl --json && a3s-test run tests/e2e/spreadsheet-phone-context-menu.acl --json && a3s-test run tests/e2e/spreadsheet-phone-task-pane.acl --json && a3s-test run tests/e2e/presentation-cut-paste-focus.acl --json && a3s-test run tests/e2e/presentation-presenter-view.acl --json && a3s-test run tests/e2e/presentation-phone-chart-pane.acl --json && a3s-test run tests/e2e/presentation-phone-comments.acl --json && a3s-test run tests/e2e/pdf-thumbnail-keyboard.acl --json && a3s-test run tests/e2e/pdf-page-drawer-phone.acl --json && a3s-test run tests/e2e/markdown-phone-modes.acl --json && a3s-test run tests/e2e/office-sidebar-breakpoint.acl --json && a3s-test run tests/e2e/office-docs-navigation.acl --json && a3s-test run tests/e2e/collaboration-participants.acl --json && a3s-test run tests/e2e/collaboration-pdf-annotations.acl --json && a3s-test run tests/e2e/collaboration-spreadsheet-cells.acl --json && a3s-test run tests/e2e/collaboration-presentation-elements.acl --json",
91
- "test:e2e:check": "bun run test:e2e:fixtures && a3s-test check tests/e2e/word-page-color.acl --json && a3s-test check tests/e2e/word-page-setup-phone.acl --json && a3s-test check tests/e2e/word-paragraph-layout-phone.acl --json && a3s-test check tests/e2e/word-list-formatting-phone.acl --json && a3s-test check tests/e2e/word-font-picker-phone.acl --json && a3s-test check tests/e2e/word-comments-drawer.acl --json && a3s-test check tests/e2e/word-comment-windowing.acl --json && a3s-test check tests/e2e/word-citations-phone.acl --json && a3s-test check tests/e2e/word-navigation-search.acl --json && a3s-test check tests/e2e/word-navigation-windowing.acl --json && a3s-test check tests/e2e/word-find-replace-phone.acl --json && a3s-test check tests/e2e/word-page-navigation.acl --json && a3s-test check tests/e2e/word-page-windowing.acl --json && a3s-test check tests/e2e/word-ai-question.acl --json && a3s-test check tests/e2e/word-picture-insert.acl --json && a3s-test check tests/e2e/word-picture-alt-text-phone.acl --json && a3s-test check tests/e2e/word-track-changes-phone.acl --json && a3s-test check tests/e2e/word-review-conflict-phone.acl --json && a3s-test check tests/e2e/word-revision-windowing.acl --json && a3s-test check tests/e2e/word-table-phone.acl --json && a3s-test check tests/e2e/word-table-borders.acl --json && a3s-test check tests/e2e/word-theme-table.acl --json && a3s-test check tests/e2e/word-styled-table.acl --json && a3s-test check tests/e2e/word-multi-page-table.acl --json && a3s-test check tests/e2e/word-cross-reference-phone.acl --json && a3s-test check tests/e2e/word-bookmark-links-phone.acl --json && a3s-test check tests/e2e/word-notes-phone.acl --json && a3s-test check tests/e2e/word-fields-phone.acl --json && a3s-test check tests/e2e/spreadsheet-phone-rename.acl --json && a3s-test check tests/e2e/spreadsheet-phone-find.acl --json && a3s-test check tests/e2e/spreadsheet-phone-context-menu.acl --json && a3s-test check tests/e2e/spreadsheet-phone-task-pane.acl --json && a3s-test check tests/e2e/presentation-cut-paste-focus.acl --json && a3s-test check tests/e2e/presentation-presenter-view.acl --json && a3s-test check tests/e2e/presentation-phone-chart-pane.acl --json && a3s-test check tests/e2e/presentation-phone-comments.acl --json && a3s-test check tests/e2e/pdf-thumbnail-keyboard.acl --json && a3s-test check tests/e2e/pdf-page-drawer-phone.acl --json && a3s-test check tests/e2e/markdown-phone-modes.acl --json && a3s-test check tests/e2e/office-sidebar-breakpoint.acl --json && a3s-test check tests/e2e/office-docs-navigation.acl --json && a3s-test check tests/e2e/collaboration-participants.acl --json && a3s-test check tests/e2e/collaboration-pdf-annotations.acl --json && a3s-test check tests/e2e/collaboration-spreadsheet-cells.acl --json && a3s-test check tests/e2e/collaboration-presentation-elements.acl --json",
93
+ "test:e2e": "bun run test:e2e:fixtures && a3s-test run tests/e2e/word-page-color.acl --json && a3s-test run tests/e2e/word-page-setup-phone.acl --json && a3s-test run tests/e2e/word-paragraph-layout-phone.acl --json && a3s-test run tests/e2e/word-list-formatting-phone.acl --json && a3s-test run tests/e2e/word-font-picker-phone.acl --json && a3s-test run tests/e2e/word-comments-drawer.acl --json && a3s-test run tests/e2e/word-comment-windowing.acl --json && a3s-test run tests/e2e/word-citations-phone.acl --json && a3s-test run tests/e2e/word-navigation-search.acl --json && a3s-test run tests/e2e/word-navigation-windowing.acl --json && a3s-test run tests/e2e/word-find-replace-phone.acl --json && a3s-test run tests/e2e/word-page-navigation.acl --json && a3s-test run tests/e2e/word-page-windowing.acl --json && a3s-test run tests/e2e/word-ai-question.acl --json && a3s-test run tests/e2e/word-picture-insert.acl --json && a3s-test run tests/e2e/word-picture-alt-text-phone.acl --json && a3s-test run tests/e2e/word-track-changes-phone.acl --json && a3s-test run tests/e2e/word-review-conflict-phone.acl --json && a3s-test run tests/e2e/word-revision-windowing.acl --json && a3s-test run tests/e2e/word-table-phone.acl --json && a3s-test run tests/e2e/word-table-borders.acl --json && a3s-test run tests/e2e/word-theme-table.acl --json && a3s-test run tests/e2e/word-styled-table.acl --json && a3s-test run tests/e2e/word-multi-page-table.acl --json && a3s-test run tests/e2e/word-cross-reference-phone.acl --json && a3s-test run tests/e2e/word-bookmark-links-phone.acl --json && a3s-test run tests/e2e/word-notes-phone.acl --json && a3s-test run tests/e2e/word-fields-phone.acl --json && a3s-test run tests/e2e/spreadsheet-phone-rename.acl --json && a3s-test run tests/e2e/spreadsheet-phone-find.acl --json && a3s-test run tests/e2e/spreadsheet-phone-context-menu.acl --json && a3s-test run tests/e2e/spreadsheet-phone-task-pane.acl --json && a3s-test run tests/e2e/presentation-cut-paste-focus.acl --json && a3s-test run tests/e2e/presentation-presenter-view.acl --json && a3s-test run tests/e2e/presentation-phone-chart-pane.acl --json && a3s-test run tests/e2e/presentation-phone-comments.acl --json && a3s-test run tests/e2e/pdf-thumbnail-keyboard.acl --json && a3s-test run tests/e2e/pdf-page-drawer-phone.acl --json && a3s-test run tests/e2e/markdown-phone-modes.acl --json && a3s-test run tests/e2e/office-sidebar-breakpoint.acl --json && a3s-test run tests/e2e/office-docs-navigation.acl --json && a3s-test run tests/e2e/collaboration-playground-entry.acl --json && a3s-test run tests/e2e/collaboration-participants.acl --json && a3s-test run tests/e2e/collaboration-pdf-annotations.acl --json && a3s-test run tests/e2e/collaboration-spreadsheet-cells.acl --json && a3s-test run tests/e2e/collaboration-presentation-elements.acl --json",
94
+ "test:e2e:check": "bun run test:e2e:fixtures && a3s-test check tests/e2e/word-page-color.acl --json && a3s-test check tests/e2e/word-page-setup-phone.acl --json && a3s-test check tests/e2e/word-paragraph-layout-phone.acl --json && a3s-test check tests/e2e/word-list-formatting-phone.acl --json && a3s-test check tests/e2e/word-font-picker-phone.acl --json && a3s-test check tests/e2e/word-comments-drawer.acl --json && a3s-test check tests/e2e/word-comment-windowing.acl --json && a3s-test check tests/e2e/word-citations-phone.acl --json && a3s-test check tests/e2e/word-navigation-search.acl --json && a3s-test check tests/e2e/word-navigation-windowing.acl --json && a3s-test check tests/e2e/word-find-replace-phone.acl --json && a3s-test check tests/e2e/word-page-navigation.acl --json && a3s-test check tests/e2e/word-page-windowing.acl --json && a3s-test check tests/e2e/word-ai-question.acl --json && a3s-test check tests/e2e/word-picture-insert.acl --json && a3s-test check tests/e2e/word-picture-alt-text-phone.acl --json && a3s-test check tests/e2e/word-track-changes-phone.acl --json && a3s-test check tests/e2e/word-review-conflict-phone.acl --json && a3s-test check tests/e2e/word-revision-windowing.acl --json && a3s-test check tests/e2e/word-table-phone.acl --json && a3s-test check tests/e2e/word-table-borders.acl --json && a3s-test check tests/e2e/word-theme-table.acl --json && a3s-test check tests/e2e/word-styled-table.acl --json && a3s-test check tests/e2e/word-multi-page-table.acl --json && a3s-test check tests/e2e/word-cross-reference-phone.acl --json && a3s-test check tests/e2e/word-bookmark-links-phone.acl --json && a3s-test check tests/e2e/word-notes-phone.acl --json && a3s-test check tests/e2e/word-fields-phone.acl --json && a3s-test check tests/e2e/spreadsheet-phone-rename.acl --json && a3s-test check tests/e2e/spreadsheet-phone-find.acl --json && a3s-test check tests/e2e/spreadsheet-phone-context-menu.acl --json && a3s-test check tests/e2e/spreadsheet-phone-task-pane.acl --json && a3s-test check tests/e2e/presentation-cut-paste-focus.acl --json && a3s-test check tests/e2e/presentation-presenter-view.acl --json && a3s-test check tests/e2e/presentation-phone-chart-pane.acl --json && a3s-test check tests/e2e/presentation-phone-comments.acl --json && a3s-test check tests/e2e/pdf-thumbnail-keyboard.acl --json && a3s-test check tests/e2e/pdf-page-drawer-phone.acl --json && a3s-test check tests/e2e/markdown-phone-modes.acl --json && a3s-test check tests/e2e/office-sidebar-breakpoint.acl --json && a3s-test check tests/e2e/office-docs-navigation.acl --json && a3s-test check tests/e2e/collaboration-playground-entry.acl --json && a3s-test check tests/e2e/collaboration-participants.acl --json && a3s-test check tests/e2e/collaboration-pdf-annotations.acl --json && a3s-test check tests/e2e/collaboration-spreadsheet-cells.acl --json && a3s-test check tests/e2e/collaboration-presentation-elements.acl --json",
92
95
  "test:e2e:fixtures": "bun scripts/create-e2e-fixtures.ts",
93
96
  "test:e2e:initial-focus": "a3s-test run tests/e2e/office-editor-initial-focus.acl --json",
94
97
  "test:e2e:initial-focus:check": "a3s-test check tests/e2e/office-editor-initial-focus.acl --json",
95
98
  "test:e2e:collaboration-participants": "a3s-test run tests/e2e/collaboration-participants.acl --json",
96
99
  "test:e2e:collaboration-participants:check": "a3s-test check tests/e2e/collaboration-participants.acl --json",
100
+ "test:e2e:collaboration-playground": "a3s-test run tests/e2e/collaboration-playground-entry.acl --json",
101
+ "test:e2e:collaboration-playground:check": "a3s-test check tests/e2e/collaboration-playground-entry.acl --json",
97
102
  "test:e2e:collaboration-pdf-annotations": "a3s-test run tests/e2e/collaboration-pdf-annotations.acl --json",
98
103
  "test:e2e:collaboration-pdf-annotations:check": "a3s-test check tests/e2e/collaboration-pdf-annotations.acl --json",
99
104
  "test:e2e:collaboration-spreadsheet-cells": "a3s-test run tests/e2e/collaboration-spreadsheet-cells.acl --json",
@@ -193,6 +198,7 @@
193
198
  "private": false,
194
199
  "patchedDependencies": {
195
200
  "@fortune-sheet/react@1.0.4": "patches/@fortune-sheet%2Freact@1.0.4.patch",
201
+ "@tiptap/y-tiptap@3.0.8": "patches/@tiptap%2Fy-tiptap@3.0.8.patch",
196
202
  "html2canvas@1.4.1": "patches/html2canvas@1.4.1.patch"
197
203
  }
198
204
  }