@company-semantics/contracts 0.53.0 → 0.55.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.53.0",
3
+ "version": "0.55.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -350,13 +350,13 @@ export type {
350
350
  // Ralph constants (cross-repo support)
351
351
  export { REPO_PRECEDENCE } from './ralph/index'
352
352
 
353
- // Company admin types (cross-org control plane)
353
+ // Internal admin types (cross-org control plane)
354
354
  // @see PRD-00113 for design rationale
355
355
  export type {
356
- CompanyCapability,
357
- CompanyAdminContext,
356
+ InternalAdminCapability,
357
+ InternalAdminContext,
358
358
  RequestContext,
359
- } from './company-admin'
359
+ } from './internal-admin'
360
360
 
361
361
  // Rate limit domain types
362
362
  // @see PRD-00013 for contracts integration
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Internal admin types — shared vocabulary for cross-org admin control plane.
3
+ *
4
+ * These types support the internal admin MVP (read-only).
5
+ * @see PRD-00113 for design rationale.
6
+ */
7
+
8
+ /** Read-only capabilities for internal admin MVP. */
9
+ export type InternalAdminCapability =
10
+ | 'internal.view_orgs'
11
+ | 'internal.view_audit'
12
+ | 'internal.view_system'
13
+ | 'internal.view_snapshot';
14
+
15
+ /** Context attached to internal-admin requests after auth middleware validation. */
16
+ export interface InternalAdminContext {
17
+ readonly kind: 'internal';
18
+ readonly adminEmail: string;
19
+ readonly capabilities: readonly InternalAdminCapability[];
20
+ }
21
+
22
+ /**
23
+ * Discriminated union for request contexts.
24
+ *
25
+ * Org-scoped requests carry OrgScopedContext (kind: 'org').
26
+ * Internal admin requests carry InternalAdminContext (kind: 'internal').
27
+ */
28
+ export type RequestContext =
29
+ | (import('./org/types').OrgScopedContext & { readonly kind: 'org' })
30
+ | InternalAdminContext;
@@ -21,8 +21,7 @@ export const VIEW_SCOPE_MAP = {
21
21
  timeline: 'org.view_timeline',
22
22
  dashboard: 'org.view_dashboard',
23
23
  'organization-strategy': 'org.view_strategy',
24
- 'system-snapshot': 'org.view_system',
25
- 'company-admin': 'company.view_admin',
24
+ 'internal-admin': 'internal.view_admin',
26
25
  // Public views (require only authentication)
27
26
  chat: null,
28
27
  settings: null,
@@ -1,29 +0,0 @@
1
- /**
2
- * Company admin types — shared vocabulary for cross-org admin control plane.
3
- *
4
- * These types support the company admin MVP (read-only).
5
- * @see PRD-00113 for design rationale.
6
- */
7
-
8
- /** Read-only capabilities for company admin MVP. */
9
- export type CompanyCapability =
10
- | 'company.view_orgs'
11
- | 'company.view_audit'
12
- | 'company.view_system';
13
-
14
- /** Context attached to company-admin requests after auth middleware validation. */
15
- export interface CompanyAdminContext {
16
- readonly kind: 'company';
17
- readonly adminEmail: string;
18
- readonly capabilities: readonly CompanyCapability[];
19
- }
20
-
21
- /**
22
- * Discriminated union for request contexts.
23
- *
24
- * Org-scoped requests carry OrgScopedContext (kind: 'org').
25
- * Company admin requests carry CompanyAdminContext (kind: 'company').
26
- */
27
- export type RequestContext =
28
- | (import('./org/types').OrgScopedContext & { readonly kind: 'org' })
29
- | CompanyAdminContext;