@company-semantics/contracts 0.94.0 → 0.95.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/index.ts +7 -7
- package/src/org/__tests__/view-scopes.test.ts +2 -2
- package/src/org/{strategy.ts → goals.ts} +17 -17
- package/src/org/index.ts +11 -11
- package/src/org/view-scopes.ts +1 -1
- package/src/usage/types.ts +1 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -243,13 +243,13 @@ export type {
|
|
|
243
243
|
IdentityTrustLevel,
|
|
244
244
|
TransferEligibilityResult,
|
|
245
245
|
TransferMemberEligibility,
|
|
246
|
-
//
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
246
|
+
// Goals domain types (PRD-00173)
|
|
247
|
+
GoalVisibility,
|
|
248
|
+
GoalDocLevel,
|
|
249
|
+
GoalSource,
|
|
250
|
+
GoalDependency,
|
|
251
|
+
GoalTreeNode,
|
|
252
|
+
GoalDoc,
|
|
253
253
|
} from './org/index'
|
|
254
254
|
|
|
255
255
|
export { ROLE_DISPLAY_MAP, VIEW_SCOPE_MAP, getViewScope, TRANSFER_RESPONSIBILITIES, IDENTITY_TRUST_LEVEL_LABELS } from './org/index'
|
|
@@ -7,7 +7,7 @@ describe('VIEW_SCOPE_MAP golden snapshot', () => {
|
|
|
7
7
|
workspace: 'org.view_workspace',
|
|
8
8
|
timeline: 'org.view_timeline',
|
|
9
9
|
activity: 'org.view_activity',
|
|
10
|
-
|
|
10
|
+
goals: 'org.view_goals',
|
|
11
11
|
'internal-admin': 'internal.view_admin',
|
|
12
12
|
chat: null,
|
|
13
13
|
settings: null,
|
|
@@ -22,7 +22,7 @@ describe('getViewScope', () => {
|
|
|
22
22
|
expect(getViewScope('workspace')).toBe('org.view_workspace')
|
|
23
23
|
expect(getViewScope('timeline')).toBe('org.view_timeline')
|
|
24
24
|
expect(getViewScope('activity')).toBe('org.view_activity')
|
|
25
|
-
expect(getViewScope('
|
|
25
|
+
expect(getViewScope('goals')).toBe('org.view_goals')
|
|
26
26
|
expect(getViewScope('internal-admin')).toBe('internal.view_admin')
|
|
27
27
|
})
|
|
28
28
|
|
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Goals Domain Types
|
|
3
3
|
*
|
|
4
|
-
* Vocabulary types for the Company.md
|
|
4
|
+
* Vocabulary types for the Company.md goals 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
|
|
9
|
+
export type GoalVisibility = 'public' | 'private';
|
|
10
10
|
|
|
11
|
-
export type
|
|
11
|
+
export type GoalDocLevel = 'root' | 'department';
|
|
12
12
|
|
|
13
|
-
export interface
|
|
13
|
+
export interface GoalSource {
|
|
14
14
|
readonly label: string;
|
|
15
15
|
readonly sourceType: 'meeting' | 'document' | 'conversation' | 'manual';
|
|
16
16
|
readonly referencedAt: string;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export interface
|
|
19
|
+
export interface GoalDependency {
|
|
20
20
|
readonly targetSlug: string;
|
|
21
21
|
readonly description: string;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export interface
|
|
24
|
+
export interface GoalTreeNode {
|
|
25
25
|
readonly id: string;
|
|
26
26
|
readonly slug: string;
|
|
27
27
|
readonly title: string;
|
|
28
|
-
readonly level:
|
|
28
|
+
readonly level: GoalDocLevel;
|
|
29
29
|
readonly department: string | null;
|
|
30
|
-
readonly visibility:
|
|
30
|
+
readonly visibility: GoalVisibility;
|
|
31
31
|
readonly canEdit: boolean;
|
|
32
32
|
readonly memberCount: number;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
export interface
|
|
35
|
+
export interface GoalDocCore {
|
|
36
36
|
readonly id: string;
|
|
37
37
|
readonly slug: string;
|
|
38
38
|
readonly title: string;
|
|
39
|
-
readonly level:
|
|
39
|
+
readonly level: GoalDocLevel;
|
|
40
40
|
readonly department: string | null;
|
|
41
41
|
readonly content: string;
|
|
42
|
-
readonly visibility:
|
|
42
|
+
readonly visibility: GoalVisibility;
|
|
43
43
|
readonly parentId: string | null;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export interface
|
|
46
|
+
export interface GoalDocCollaborators {
|
|
47
47
|
readonly owner: { readonly id: string; readonly name: string } | null;
|
|
48
48
|
readonly coOwners: ReadonlyArray<{ readonly id: string; readonly name: string }>;
|
|
49
49
|
readonly canEdit: boolean;
|
|
50
50
|
readonly members: ReadonlyArray<{ readonly id: string; readonly name: string }>;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
export interface
|
|
53
|
+
export interface GoalDocRelations {
|
|
54
54
|
readonly inheritsFrom: string | null;
|
|
55
|
-
readonly sources: readonly
|
|
56
|
-
readonly dependencies: readonly
|
|
55
|
+
readonly sources: readonly GoalSource[];
|
|
56
|
+
readonly dependencies: readonly GoalDependency[];
|
|
57
57
|
readonly createdAt: string;
|
|
58
58
|
readonly updatedAt: string;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export type
|
|
61
|
+
export type GoalDoc = GoalDocCore & GoalDocCollaborators & GoalDocRelations;
|
package/src/org/index.ts
CHANGED
|
@@ -80,15 +80,15 @@ export type {
|
|
|
80
80
|
export type { AuthorizableView } from './view-scopes';
|
|
81
81
|
export { VIEW_SCOPE_MAP, getViewScope } from './view-scopes';
|
|
82
82
|
|
|
83
|
-
//
|
|
83
|
+
// Goals domain types (PRD-00173)
|
|
84
84
|
export type {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
} from './
|
|
85
|
+
GoalVisibility,
|
|
86
|
+
GoalDocLevel,
|
|
87
|
+
GoalSource,
|
|
88
|
+
GoalDependency,
|
|
89
|
+
GoalTreeNode,
|
|
90
|
+
GoalDocCore,
|
|
91
|
+
GoalDocCollaborators,
|
|
92
|
+
GoalDocRelations,
|
|
93
|
+
GoalDoc,
|
|
94
|
+
} from './goals';
|
package/src/org/view-scopes.ts
CHANGED
|
@@ -20,7 +20,7 @@ export const VIEW_SCOPE_MAP = {
|
|
|
20
20
|
workspace: 'org.view_workspace',
|
|
21
21
|
timeline: 'org.view_timeline',
|
|
22
22
|
activity: 'org.view_activity',
|
|
23
|
-
|
|
23
|
+
goals: 'org.view_goals',
|
|
24
24
|
'internal-admin': 'internal.view_admin',
|
|
25
25
|
// Public views (require only authentication)
|
|
26
26
|
chat: null,
|
package/src/usage/types.ts
CHANGED
|
@@ -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' | '
|
|
7
|
+
export type AiFeature = 'chat' | 'chat_title' | 'ingest_summarize' | 'ingest_embedding' | 'goal_extraction';
|
|
8
8
|
|
|
9
9
|
export interface UsageSummary {
|
|
10
10
|
totalTokens: number;
|