@company-semantics/contracts 0.110.0 → 0.112.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": "0.110.0",
3
+ "version": "0.112.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -77,6 +77,7 @@
77
77
  "guard:decisions-deprecation": "npx tsx scripts/ci/decisions-deprecation-guard.ts",
78
78
  "guard:decisions-deprecation:json": "npx tsx scripts/ci/decisions-deprecation-guard.ts --json",
79
79
  "guard:quick": "GUARD_DEPENDENCY_ROOT=../ tsx ../company-semantics-ci/run-guards.ts --config scripts/ci/guard-entries.ts --quick",
80
+ "ci:local": "pnpm typecheck && pnpm lint:md && pnpm guard:test",
80
81
  "guard": "GUARD_DEPENDENCY_ROOT=../ tsx ../company-semantics-ci/run-guards.ts --config scripts/ci/guard-entries.ts",
81
82
  "guard:test": "vitest run scripts/ci/__tests__",
82
83
  "release": "npx tsx scripts/release.ts",
@@ -95,14 +96,14 @@
95
96
  "zod": "^4.2.1"
96
97
  },
97
98
  "devDependencies": {
98
- "@types/node": "^25.0.3",
99
+ "@types/node": "^25.5.0",
99
100
  "husky": "^9.1.7",
100
- "lint-staged": "^16.2.7",
101
- "markdownlint-cli2": "^0.20.0",
101
+ "lint-staged": "^16.4.0",
102
+ "markdownlint-cli2": "^0.22.0",
102
103
  "openapi-typescript": "^7.13.0",
103
104
  "tsx": "^4.21.0",
104
105
  "typescript": "^5",
105
- "vitest": "^4.0.16",
106
+ "vitest": "^4.1.2",
106
107
  "yaml": "^2.8.3"
107
108
  },
108
109
  "pnpm": {
@@ -15,6 +15,15 @@ export const openApiRoutes = {
15
15
  '/api/chats/{id}/generate-title': ['POST'],
16
16
  '/api/chats/{id}/messages': ['POST'],
17
17
  '/api/chats/{id}/pin': ['DELETE', 'POST'],
18
+ '/api/company-md/docs/{slug}': ['GET'],
19
+ '/api/company-md/docs/{slug}/content': ['PUT'],
20
+ '/api/company-md/docs/{slug}/sharing': ['GET'],
21
+ '/api/company-md/docs/{slug}/sharing/acl': ['POST'],
22
+ '/api/company-md/docs/{slug}/sharing/acl/{aclId}': ['DELETE', 'PUT'],
23
+ '/api/company-md/docs/{slug}/sharing/policy': ['PUT'],
24
+ '/api/company-md/docs/{slug}/title': ['PUT'],
25
+ '/api/company-md/extract': ['POST'],
26
+ '/api/company-md/tree': ['GET'],
18
27
  '/api/departments': ['GET', 'POST'],
19
28
  '/api/departments/{id}': ['DELETE', 'GET', 'PATCH'],
20
29
  '/api/departments/{id}/members': ['POST'],
@@ -29,15 +38,6 @@ export const openApiRoutes = {
29
38
  '/api/executions/{executionId}/summary': ['GET'],
30
39
  '/api/executions/{executionId}/timeline': ['GET'],
31
40
  '/api/executions/{executionId}/undo': ['POST'],
32
- '/api/goals/docs/{slug}': ['GET'],
33
- '/api/goals/docs/{slug}/content': ['PUT'],
34
- '/api/goals/docs/{slug}/sharing': ['GET'],
35
- '/api/goals/docs/{slug}/sharing/acl': ['POST'],
36
- '/api/goals/docs/{slug}/sharing/acl/{aclId}': ['DELETE', 'PUT'],
37
- '/api/goals/docs/{slug}/sharing/policy': ['PUT'],
38
- '/api/goals/docs/{slug}/title': ['PUT'],
39
- '/api/goals/extract': ['POST'],
40
- '/api/goals/tree': ['GET'],
41
41
  '/api/integrations/status': ['GET'],
42
42
  '/api/me': ['GET'],
43
43
  '/api/org/cancel-deletion': ['POST'],
package/src/index.ts CHANGED
@@ -243,14 +243,14 @@ export type {
243
243
  IdentityTrustLevel,
244
244
  TransferEligibilityResult,
245
245
  TransferMemberEligibility,
246
- // Goals domain types (PRD-00173)
247
- GoalVisibility,
248
- GoalDocLevel,
249
- GoalNodeType,
250
- GoalSource,
251
- GoalDependency,
252
- GoalTreeNode,
253
- GoalDoc,
246
+ // Company.md domain types (PRD-00173)
247
+ CompanyMdVisibility,
248
+ CompanyMdDocLevel,
249
+ CompanyMdNodeType,
250
+ CompanyMdSource,
251
+ CompanyMdDependency,
252
+ CompanyMdTreeNode,
253
+ CompanyMdDoc,
254
254
  TeamDepartmentRole,
255
255
  TeamDepartmentMembership,
256
256
  // Team types (PRD-00306)
@@ -7,7 +7,7 @@ describe('VIEW_SCOPE_MAP golden snapshot', () => {
7
7
  workspace: 'org.view_workspace',
8
8
  timeline: 'org.view_timeline',
9
9
  teamwork: 'org.view_teamwork',
10
- goals: 'org.view_goals',
10
+ 'company-md': 'org.view_company_md',
11
11
  teams: 'org.view_teams',
12
12
  'internal-admin': 'internal.view_admin',
13
13
  chat: null,
@@ -24,7 +24,7 @@ describe('getViewScope', () => {
24
24
  expect(getViewScope('workspace')).toBe('org.view_workspace')
25
25
  expect(getViewScope('timeline')).toBe('org.view_timeline')
26
26
  expect(getViewScope('teamwork')).toBe('org.view_teamwork')
27
- expect(getViewScope('goals')).toBe('org.view_goals')
27
+ expect(getViewScope('company-md')).toBe('org.view_company_md')
28
28
  expect(getViewScope('internal-admin')).toBe('internal.view_admin')
29
29
  })
30
30
 
@@ -1,16 +1,16 @@
1
1
  /**
2
- * Goals Domain Types
2
+ * Company.md Domain Types
3
3
  *
4
- * Vocabulary types for the Company.md goals feature.
4
+ * Vocabulary types for the Company.md feature.
5
5
  * Shared between backend (persistence/service) and app (UI rendering).
6
6
  * @see PRD-00173 for design rationale
7
7
  */
8
8
 
9
- export type GoalVisibility = 'public' | 'private';
9
+ export type CompanyMdVisibility = 'public' | 'private';
10
10
 
11
- export type GoalDocLevel = 'root' | 'department' | 'team';
11
+ export type CompanyMdDocLevel = 'root' | 'department' | 'team';
12
12
 
13
- export type GoalNodeType = 'company' | 'department' | 'team' | 'cross_team' | 'doc' | 'goal' | 'source' | 'map';
13
+ export type CompanyMdNodeType = 'company' | 'department' | 'team' | 'cross_team' | 'doc' | 'goal' | 'source' | 'map';
14
14
 
15
15
  export type TeamDepartmentRole = 'owner' | 'participant' | 'supporting';
16
16
 
@@ -20,34 +20,34 @@ export interface TeamDepartmentMembership {
20
20
  readonly role: TeamDepartmentRole;
21
21
  }
22
22
 
23
- export interface GoalSource {
23
+ export interface CompanyMdSource {
24
24
  readonly label: string;
25
25
  readonly sourceType: 'meeting' | 'document' | 'conversation' | 'manual';
26
26
  readonly referencedAt: string;
27
27
  }
28
28
 
29
- export interface GoalDependency {
29
+ export interface CompanyMdDependency {
30
30
  readonly targetSlug: string;
31
31
  readonly description: string;
32
32
  }
33
33
 
34
- export interface GoalNodeIdentity {
34
+ export interface CompanyMdNodeIdentity {
35
35
  readonly id: string;
36
36
  readonly slug: string;
37
37
  readonly title: string;
38
- readonly level: GoalDocLevel;
38
+ readonly level: CompanyMdDocLevel;
39
39
  readonly parentId: string | null;
40
40
  /** Department name (backwards-compat) */
41
41
  readonly department: string | null;
42
42
  /** Structured department reference */
43
43
  readonly departmentId: string | null;
44
- readonly visibility: GoalVisibility;
44
+ readonly visibility: CompanyMdVisibility;
45
45
  /** Owning team. Null for root docs or when the owning team has been deleted. */
46
46
  readonly owningTeam: { readonly id: string; readonly name: string } | null;
47
47
  }
48
48
 
49
- export interface GoalTreeNode extends GoalNodeIdentity {
50
- readonly type: GoalNodeType;
49
+ export interface CompanyMdTreeNode extends CompanyMdNodeIdentity {
50
+ readonly type: CompanyMdNodeType;
51
51
  readonly canEdit: boolean;
52
52
  readonly memberCount: number;
53
53
  readonly description?: string;
@@ -55,23 +55,23 @@ export interface GoalTreeNode extends GoalNodeIdentity {
55
55
  readonly departmentIds?: readonly string[];
56
56
  }
57
57
 
58
- export interface GoalDocCore extends GoalNodeIdentity {
58
+ export interface CompanyMdDocCore extends CompanyMdNodeIdentity {
59
59
  readonly content: string;
60
60
  }
61
61
 
62
- export interface GoalDocCollaborators {
62
+ export interface CompanyMdDocCollaborators {
63
63
  readonly owner: { readonly id: string; readonly name: string } | null;
64
64
  readonly coOwners: ReadonlyArray<{ readonly id: string; readonly name: string }>;
65
65
  readonly canEdit: boolean;
66
66
  readonly members: ReadonlyArray<{ readonly id: string; readonly name: string }>;
67
67
  }
68
68
 
69
- export interface GoalDocRelations {
69
+ export interface CompanyMdDocRelations {
70
70
  readonly inheritsFrom: string | null;
71
- readonly sources: readonly GoalSource[];
72
- readonly dependencies: readonly GoalDependency[];
71
+ readonly sources: readonly CompanyMdSource[];
72
+ readonly dependencies: readonly CompanyMdDependency[];
73
73
  readonly createdAt: string;
74
74
  readonly updatedAt: string;
75
75
  }
76
76
 
77
- export type GoalDoc = GoalDocCore & GoalDocCollaborators & GoalDocRelations;
77
+ export type CompanyMdDoc = CompanyMdDocCore & CompanyMdDocCollaborators & CompanyMdDocRelations;
package/src/org/index.ts CHANGED
@@ -80,22 +80,22 @@ export type {
80
80
  export type { AuthorizableView } from './view-scopes';
81
81
  export { VIEW_SCOPE_MAP, getViewScope } from './view-scopes';
82
82
 
83
- // Goals domain types (PRD-00173)
83
+ // Company.md domain types (PRD-00173)
84
84
  export type {
85
- GoalVisibility,
86
- GoalDocLevel,
87
- GoalNodeType,
88
- GoalSource,
89
- GoalDependency,
90
- GoalNodeIdentity,
91
- GoalTreeNode,
92
- GoalDocCore,
93
- GoalDocCollaborators,
94
- GoalDocRelations,
95
- GoalDoc,
85
+ CompanyMdVisibility,
86
+ CompanyMdDocLevel,
87
+ CompanyMdNodeType,
88
+ CompanyMdSource,
89
+ CompanyMdDependency,
90
+ CompanyMdNodeIdentity,
91
+ CompanyMdTreeNode,
92
+ CompanyMdDocCore,
93
+ CompanyMdDocCollaborators,
94
+ CompanyMdDocRelations,
95
+ CompanyMdDoc,
96
96
  TeamDepartmentRole,
97
97
  TeamDepartmentMembership,
98
- } from './goals';
98
+ } from './company-md';
99
99
 
100
100
  // Team types (PRD-00306)
101
101
  export type {
@@ -20,7 +20,7 @@ export const VIEW_SCOPE_MAP = {
20
20
  workspace: 'org.view_workspace',
21
21
  timeline: 'org.view_timeline',
22
22
  teamwork: 'org.view_teamwork',
23
- goals: 'org.view_goals',
23
+ 'company-md': 'org.view_company_md',
24
24
  teams: 'org.view_teams',
25
25
  'internal-admin': 'internal.view_admin',
26
26
  // Public views (require only authentication)
@@ -4,7 +4,7 @@
4
4
  * See PRD-00166 for design rationale and invariants.
5
5
  */
6
6
 
7
- export type AiFeature = 'chat' | 'chat_title' | 'ingest_summarize' | 'ingest_embedding' | 'goal_extraction';
7
+ export type AiFeature = 'chat' | 'chat_title' | 'ingest_summarize' | 'ingest_embedding' | 'company_md_extraction';
8
8
 
9
9
  export interface UsageSummary {
10
10
  totalTokens: number;