@company-semantics/contracts 39.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "39.4.0",
3
+ "version": "39.6.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -162,5 +162,5 @@
162
162
  "*.md": "markdownlint-cli2",
163
163
  "package.json": "node -e \"JSON.parse(require('fs').readFileSync('package.json'))\""
164
164
  },
165
- "securityRequirementsVersion": "888e8f888ed3bee8311fd39dee4b24b4f23a6638f1df183e3e6b4e0455704ae2"
165
+ "securityRequirementsVersion": "9ffb1b974fa033f13a73539f8338cad319b62bb95695aa4ac7b5215a50493513"
166
166
  }
@@ -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. An action item whose href only *shows* the thing
74
- * is a notification, not an action item — see `./kinds`.
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(),
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
2
- export const SPEC_HASH = '578211b8b148' as const;
3
- export const SPEC_HASH_FULL = '578211b8b1489b1d26938629c14b09a94ee3bf636085a5f058f1b573747f8fce' as const;
2
+ export const SPEC_HASH = 'b02ad24e598a' as const;
3
+ export const SPEC_HASH_FULL = 'b02ad24e598abefeaaa58e146e9784fea88bc3abbd1af8b24a7d9c5d947db757' as const;
@@ -2876,6 +2876,23 @@ export interface paths {
2876
2876
  patch?: never;
2877
2877
  trace?: never;
2878
2878
  };
2879
+ "/api/me/action-items": {
2880
+ parameters: {
2881
+ query?: never;
2882
+ header?: never;
2883
+ path?: never;
2884
+ cookie?: never;
2885
+ };
2886
+ /** Everything awaiting my decision, across every domain */
2887
+ get: operations["listMyActionItems"];
2888
+ put?: never;
2889
+ post?: never;
2890
+ delete?: never;
2891
+ options?: never;
2892
+ head?: never;
2893
+ patch?: never;
2894
+ trace?: never;
2895
+ };
2879
2896
  "/api/me/meetings/recordings/start": {
2880
2897
  parameters: {
2881
2898
  query?: never;
@@ -5488,6 +5505,24 @@ export interface components {
5488
5505
  UpdateWorkItemTitleRequest: {
5489
5506
  title: string;
5490
5507
  };
5508
+ ActionItemListResponse: {
5509
+ items: {
5510
+ id: string;
5511
+ /** @enum {string} */
5512
+ kind: "companyMd.access_request_pending" | "execution.confirmation_pending";
5513
+ target: {
5514
+ /** @enum {string} */
5515
+ type: "company_md" | "org_unit" | "org" | "execution";
5516
+ id: string;
5517
+ };
5518
+ unitPath: string | null;
5519
+ title: string;
5520
+ detail: string | null;
5521
+ contextLabel: string;
5522
+ href: string;
5523
+ createdAt: string;
5524
+ }[];
5525
+ };
5491
5526
  /** @description Recording + work_item ids and the transcription session grant. */
5492
5527
  StartMeetingRecordingResponse: {
5493
5528
  /** @description ULID; unified trace key for the recording (INV-MTG-7). */
@@ -10745,6 +10780,26 @@ export interface operations {
10745
10780
  };
10746
10781
  };
10747
10782
  };
10783
+ listMyActionItems: {
10784
+ parameters: {
10785
+ query?: never;
10786
+ header?: never;
10787
+ path?: never;
10788
+ cookie?: never;
10789
+ };
10790
+ requestBody?: never;
10791
+ responses: {
10792
+ /** @description Outstanding decisions for the current user, newest first */
10793
+ 200: {
10794
+ headers: {
10795
+ [name: string]: unknown;
10796
+ };
10797
+ content: {
10798
+ "application/json": components["schemas"]["ActionItemListResponse"];
10799
+ };
10800
+ };
10801
+ };
10802
+ };
10748
10803
  startMeetingRecording: {
10749
10804
  parameters: {
10750
10805
  query?: never;
@@ -75,6 +75,7 @@ export const openApiRoutes = {
75
75
  '/api/internal-admin/impersonate/start': ['POST'],
76
76
  '/api/me': ['GET'],
77
77
  '/api/me/access-list': ['GET'],
78
+ '/api/me/action-items': ['GET'],
78
79
  '/api/me/meetings/recordings/start': ['POST'],
79
80
  '/api/me/meetings/recordings/{id}': ['DELETE'],
80
81
  '/api/me/meetings/recordings/{id}/complete': ['POST'],
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,