@company-semantics/contracts 39.5.0 → 39.6.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/package.json +1 -1
- package/src/action-items/schemas.ts +9 -2
- package/src/org/README.md +2 -0
- package/src/org/company-md-collab.ts +24 -0
- package/src/org/index.ts +2 -0
package/package.json
CHANGED
|
@@ -70,8 +70,15 @@ export const ActionItemSchema = z.object({
|
|
|
70
70
|
/** The thing it is about, as the user names it, e.g. "Sales.md". */
|
|
71
71
|
contextLabel: z.string(),
|
|
72
72
|
/**
|
|
73
|
-
* Where to go to RESOLVE it
|
|
74
|
-
*
|
|
73
|
+
* Where to go to RESOLVE it — a RELATIVE app path, e.g.
|
|
74
|
+
* `/@acme/md/{docId}?share=1&request={id}`.
|
|
75
|
+
*
|
|
76
|
+
* Relative because the consumer is an in-app link and an absolute URL would
|
|
77
|
+
* drop the SPA on click. The equivalent notification builds the absolute form
|
|
78
|
+
* itself, because that one is leaving the building.
|
|
79
|
+
*
|
|
80
|
+
* An href that only *shows* the thing makes this a notification rather than
|
|
81
|
+
* an action item — see `./kinds`.
|
|
75
82
|
*/
|
|
76
83
|
href: z.string(),
|
|
77
84
|
createdAt: z.string(),
|
package/src/org/README.md
CHANGED
|
@@ -40,6 +40,8 @@ Shared type vocabulary for organization ownership, type classification, and tran
|
|
|
40
40
|
- `COMPANY_MD_COLLAB_MAX_DOC_TEXT_BYTES` — Cap on the MATERIALIZED document text, in UTF-8 bytes of the expanded result.
|
|
41
41
|
- `COMPANY_MD_COLLAB_MAX_PRESENCE_POSITION_CHARS` — Cap on ONE presence position blob (`anchor` or `head`), in base64 chars.
|
|
42
42
|
- `COMPANY_MD_COLLAB_MAX_UPDATE_B64_CHARS` — Cap on ONE encoded update, measured on the base64 payload as it is sent.
|
|
43
|
+
- `COMPANY_MD_COLLAB_PRESENCE_HEARTBEAT_MS` — The cadence clients must re-POST presence at.
|
|
44
|
+
- `COMPANY_MD_COLLAB_PRESENCE_TTL_MS` — How long the server keeps a presence entry alive with no fresh signal.
|
|
43
45
|
- `COMPANY_MD_COLLAB_TEXT_KEY` — The Y.Doc root key holding the document body — a CONTRACT, not a detail.
|
|
44
46
|
- `CanonicalFacts` _(type)_
|
|
45
47
|
- `CanonicalFactsSchema` — The full normalized batch an external-source adapter emits in one pass: every person, org unit, position…
|
|
@@ -74,6 +74,30 @@ export const COMPANY_MD_COLLAB_MAX_DOC_TEXT_BYTES = 1_000_000 as const;
|
|
|
74
74
|
*/
|
|
75
75
|
export const COMPANY_MD_COLLAB_MAX_PRESENCE_POSITION_CHARS = 512 as const;
|
|
76
76
|
|
|
77
|
+
/**
|
|
78
|
+
* How long the server keeps a presence entry alive with no fresh signal.
|
|
79
|
+
*
|
|
80
|
+
* A protocol promise, not a knob: it is how long a crashed editor haunts the
|
|
81
|
+
* roster, and BOTH sides have to reason about it. The server expires on it and
|
|
82
|
+
* broadcasts a synthetic departure; a client's own expiry net has to sit beyond
|
|
83
|
+
* it, because a client clock that could fire first would race the authority and
|
|
84
|
+
* evict peers whose heartbeat merely landed late.
|
|
85
|
+
*
|
|
86
|
+
* Lives here rather than in either implementation because the app cannot import
|
|
87
|
+
* from the backend, and a hand-copy in each repo is a silent-drift bug waiting
|
|
88
|
+
* to happen. See ADR-BE-439 and ADR-APP-089.
|
|
89
|
+
*/
|
|
90
|
+
export const COMPANY_MD_COLLAB_PRESENCE_TTL_MS = 30_000 as const;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The cadence clients must re-POST presence at.
|
|
94
|
+
*
|
|
95
|
+
* Half {@link COMPANY_MD_COLLAB_PRESENCE_TTL_MS}, so one lost heartbeat never
|
|
96
|
+
* expires a live editor. Published so the client contract and the server bound
|
|
97
|
+
* are one number in one place.
|
|
98
|
+
*/
|
|
99
|
+
export const COMPANY_MD_COLLAB_PRESENCE_HEARTBEAT_MS = 15_000 as const;
|
|
100
|
+
|
|
77
101
|
// ---------------------------------------------------------------------------
|
|
78
102
|
// Sequences
|
|
79
103
|
// ---------------------------------------------------------------------------
|
package/src/org/index.ts
CHANGED
|
@@ -235,6 +235,8 @@ export {
|
|
|
235
235
|
COMPANY_MD_COLLAB_MAX_UPDATE_B64_CHARS,
|
|
236
236
|
COMPANY_MD_COLLAB_MAX_DOC_TEXT_BYTES,
|
|
237
237
|
COMPANY_MD_COLLAB_MAX_PRESENCE_POSITION_CHARS,
|
|
238
|
+
COMPANY_MD_COLLAB_PRESENCE_TTL_MS,
|
|
239
|
+
COMPANY_MD_COLLAB_PRESENCE_HEARTBEAT_MS,
|
|
238
240
|
CompanyMdCollabSyncLimitsSchema,
|
|
239
241
|
CompanyMdCollabSyncResponseSchema,
|
|
240
242
|
CompanyMdCollabUpdateAcceptedSchema,
|