@company-semantics/contracts 2.10.0 → 2.12.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 -3
- package/src/api/generated-spec-hash.ts +2 -2
- package/src/api/generated.ts +81 -0
- package/src/org/company-md.ts +16 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@company-semantics/contracts",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -81,8 +81,6 @@
|
|
|
81
81
|
"lint:md": "markdownlint-cli2 '**/*.md' '#node_modules'",
|
|
82
82
|
"lint:json": "node -e \"JSON.parse(require('fs').readFileSync('package.json'))\"",
|
|
83
83
|
"prepare": "husky",
|
|
84
|
-
"guard:decision": "npx tsx scripts/ci/decision-guard.ts",
|
|
85
|
-
"guard:decision:json": "npx tsx scripts/ci/decision-guard.ts --json",
|
|
86
84
|
"guard:export": "npx tsx scripts/ci/export-guard.ts",
|
|
87
85
|
"guard:export:json": "npx tsx scripts/ci/export-guard.ts --json",
|
|
88
86
|
"guard:vocabulary": "npx tsx scripts/ci/vocabulary-guard.ts",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
|
|
2
|
-
export const SPEC_HASH = '
|
|
3
|
-
export const SPEC_HASH_FULL = '
|
|
2
|
+
export const SPEC_HASH = 'ed5f74bd901b' as const;
|
|
3
|
+
export const SPEC_HASH_FULL = 'ed5f74bd901b8b8cf6bfd08165b7f885e0493ca1d1f83db11ddb8df8c65d5732' as const;
|
package/src/api/generated.ts
CHANGED
|
@@ -1402,6 +1402,23 @@ export interface paths {
|
|
|
1402
1402
|
patch?: never;
|
|
1403
1403
|
trace?: never;
|
|
1404
1404
|
};
|
|
1405
|
+
"/api/company-md/search": {
|
|
1406
|
+
parameters: {
|
|
1407
|
+
query?: never;
|
|
1408
|
+
header?: never;
|
|
1409
|
+
path?: never;
|
|
1410
|
+
cookie?: never;
|
|
1411
|
+
};
|
|
1412
|
+
get?: never;
|
|
1413
|
+
put?: never;
|
|
1414
|
+
/** Search Company.md knowledge across opted-in sources */
|
|
1415
|
+
post: operations["searchCompanyMd"];
|
|
1416
|
+
delete?: never;
|
|
1417
|
+
options?: never;
|
|
1418
|
+
head?: never;
|
|
1419
|
+
patch?: never;
|
|
1420
|
+
trace?: never;
|
|
1421
|
+
};
|
|
1405
1422
|
"/api/company-md/docs/{slug}/sharing": {
|
|
1406
1423
|
parameters: {
|
|
1407
1424
|
query?: never;
|
|
@@ -3417,6 +3434,32 @@ export interface components {
|
|
|
3417
3434
|
AssociateContextDocRequest: {
|
|
3418
3435
|
contextDocSlug: string;
|
|
3419
3436
|
};
|
|
3437
|
+
/** @description Ranked retrieval hits plus the source kinds actually searched. */
|
|
3438
|
+
CompanyMdSearchResponse: {
|
|
3439
|
+
hits: {
|
|
3440
|
+
/** @enum {string} */
|
|
3441
|
+
sourceKind: "docs" | "slack" | "meetings";
|
|
3442
|
+
documentId: string;
|
|
3443
|
+
recordingId: string | null;
|
|
3444
|
+
title: string | null;
|
|
3445
|
+
snippet: string;
|
|
3446
|
+
score: number;
|
|
3447
|
+
/** @enum {string} */
|
|
3448
|
+
matchedVia: "fts" | "vector";
|
|
3449
|
+
}[];
|
|
3450
|
+
searchedSources: ("docs" | "slack" | "meetings")[];
|
|
3451
|
+
};
|
|
3452
|
+
/** @description A Company.md retrieval query with optional per-source opt-in. */
|
|
3453
|
+
CompanyMdSearchRequest: {
|
|
3454
|
+
query: string;
|
|
3455
|
+
limit?: number;
|
|
3456
|
+
/** @description Per-source opt-in. Server defaults: docs/slack ON, meetings OFF (INV-MTG-23) — applied even when this object or the meetings field is omitted. */
|
|
3457
|
+
includeSources?: {
|
|
3458
|
+
docs?: boolean;
|
|
3459
|
+
slack?: boolean;
|
|
3460
|
+
meetings?: boolean;
|
|
3461
|
+
};
|
|
3462
|
+
};
|
|
3420
3463
|
CompanyMdShareResponse: {
|
|
3421
3464
|
/** @enum {string} */
|
|
3422
3465
|
sharingPolicy: "restricted" | "org_read" | "org_comment" | "org_edit";
|
|
@@ -6442,6 +6485,44 @@ export interface operations {
|
|
|
6442
6485
|
};
|
|
6443
6486
|
};
|
|
6444
6487
|
};
|
|
6488
|
+
searchCompanyMd: {
|
|
6489
|
+
parameters: {
|
|
6490
|
+
query?: never;
|
|
6491
|
+
header?: never;
|
|
6492
|
+
path?: never;
|
|
6493
|
+
cookie?: never;
|
|
6494
|
+
};
|
|
6495
|
+
requestBody: {
|
|
6496
|
+
content: {
|
|
6497
|
+
"application/json": components["schemas"]["CompanyMdSearchRequest"];
|
|
6498
|
+
};
|
|
6499
|
+
};
|
|
6500
|
+
responses: {
|
|
6501
|
+
/** @description Ranked retrieval hits plus the source kinds searched */
|
|
6502
|
+
200: {
|
|
6503
|
+
headers: {
|
|
6504
|
+
[name: string]: unknown;
|
|
6505
|
+
};
|
|
6506
|
+
content: {
|
|
6507
|
+
"application/json": components["schemas"]["CompanyMdSearchResponse"];
|
|
6508
|
+
};
|
|
6509
|
+
};
|
|
6510
|
+
/** @description Invalid query body */
|
|
6511
|
+
400: {
|
|
6512
|
+
headers: {
|
|
6513
|
+
[name: string]: unknown;
|
|
6514
|
+
};
|
|
6515
|
+
content?: never;
|
|
6516
|
+
};
|
|
6517
|
+
/** @description Requires org.view_company_md scope */
|
|
6518
|
+
403: {
|
|
6519
|
+
headers: {
|
|
6520
|
+
[name: string]: unknown;
|
|
6521
|
+
};
|
|
6522
|
+
content?: never;
|
|
6523
|
+
};
|
|
6524
|
+
};
|
|
6525
|
+
};
|
|
6445
6526
|
getCompanyMdDocSharing: {
|
|
6446
6527
|
parameters: {
|
|
6447
6528
|
query?: never;
|
package/src/org/company-md.ts
CHANGED
|
@@ -6,7 +6,22 @@
|
|
|
6
6
|
* @see PRD-00173 for design rationale
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Visibility band for a Company.md document — the canonical AUTH
|
|
11
|
+
* `entity_visibility` vocabulary (ADR-CONT-049, backend ADR-BE-178).
|
|
12
|
+
*
|
|
13
|
+
* - `private`: owner, co-owners, and explicit ACL grantees only.
|
|
14
|
+
* - `unit`: the doc's owning `org_unit` (members + delegated authorities).
|
|
15
|
+
* This is the default for tree-nav docs, so availability shrinks toward the
|
|
16
|
+
* root (the root doc's owning unit is leadership ⇒ CEO/leadership-only).
|
|
17
|
+
* - `org`: every member of the org (the former `public`).
|
|
18
|
+
*
|
|
19
|
+
* Widened from the legacy `'public' | 'private'` model: `public` is replaced by
|
|
20
|
+
* `org` and the intermediate `unit` band is added. Enforcement of the narrowed
|
|
21
|
+
* bands is the AUTH-005 evaluator; the backend tags docs with the correct band
|
|
22
|
+
* in AUTH-004.
|
|
23
|
+
*/
|
|
24
|
+
export type CompanyMdVisibility = "private" | "unit" | "org";
|
|
10
25
|
|
|
11
26
|
/**
|
|
12
27
|
* @deprecated Since 1.12.0. `CompanyMdDocLevel` is superseded by `CompanyMdDocKind` + `depth`.
|