@company-semantics/contracts 2.11.0 → 2.13.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": "2.11.0",
3
+ "version": "2.13.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",
@@ -38,7 +38,7 @@ const CompanyMdTreeNodeSchema = z.object({
38
38
  title: z.string(),
39
39
  level: z.enum(['root', 'department', 'team', 'context']),
40
40
  parentId: z.string().nullable(),
41
- visibility: z.enum(['public', 'private']),
41
+ visibility: z.enum(['private', 'unit', 'org']),
42
42
  owningUnitId: z.string().nullable(),
43
43
  type: z.enum(['company', 'department', 'team', 'cross_team', 'doc', 'goal', 'source', 'map', 'context_bank']),
44
44
  canEdit: z.boolean(),
@@ -62,7 +62,7 @@ export const CompanyMdDocResponseSchema = z.object({
62
62
  title: z.string(),
63
63
  level: z.enum(['root', 'department', 'team', 'context']),
64
64
  content: z.string(),
65
- visibility: z.enum(['public', 'private']),
65
+ visibility: z.enum(['private', 'unit', 'org']),
66
66
  parentId: z.string().nullable(),
67
67
  owningUnitId: z.string().nullable(),
68
68
  owner: CompanyMdPersonSchema.nullable(),
@@ -131,7 +131,7 @@ const CompanyMdContextBankItemSchema = z.object({
131
131
  id: z.string(),
132
132
  slug: z.string(),
133
133
  title: z.string(),
134
- visibility: z.enum(['public', 'private']),
134
+ visibility: z.enum(['private', 'unit', 'org']),
135
135
  updatedAt: z.string(),
136
136
  });
137
137
 
@@ -6,7 +6,22 @@
6
6
  * @see PRD-00173 for design rationale
7
7
  */
8
8
 
9
- export type CompanyMdVisibility = "public" | "private";
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`.