@company-semantics/contracts 93.1.0 → 93.3.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": "93.1.0",
3
+ "version": "93.3.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -190,5 +190,5 @@
190
190
  "*.md": "markdownlint-cli2",
191
191
  "package.json": "node -e \"JSON.parse(require('fs').readFileSync('package.json'))\""
192
192
  },
193
- "securityRequirementsVersion": "71a26f10642b9fc598f6da99c75200fd174ebd0e6a9e32437a3f1b245e906792"
193
+ "securityRequirementsVersion": "de02746ca60e867b39184ea7854dc6103cda94855ef4f1d65b2a465fbfb8fd8c"
194
194
  }
@@ -158,6 +158,7 @@ describe("resource-keys: system-scoped internalAdmin* types", () => {
158
158
  "factorySnapshot",
159
159
  "factoryKpis",
160
160
  "factoryLineage",
161
+ "factoryProduction",
161
162
  ] as const;
162
163
 
163
164
  for (const type of systemTypes) {
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
2
- export const SPEC_HASH = 'aebd06a13983' as const;
3
- export const SPEC_HASH_FULL = 'aebd06a139833549518e70adbcd3af333598cf06fa6669a838f605231395c8cf' as const;
2
+ export const SPEC_HASH = '694bbd340597' as const;
3
+ export const SPEC_HASH_FULL = '694bbd3405976ed940683994c167242174ad628748e5694fc6f138ccd4802cee' as const;
@@ -3928,6 +3928,23 @@ export interface paths {
3928
3928
  patch?: never;
3929
3929
  trace?: never;
3930
3930
  };
3931
+ "/api/factory/production": {
3932
+ parameters: {
3933
+ query?: never;
3934
+ header?: never;
3935
+ path?: never;
3936
+ cookie?: never;
3937
+ };
3938
+ /** Read the production view: each production signal with its verdict, age, staleness and breach run */
3939
+ get: operations["factoryProduction"];
3940
+ put?: never;
3941
+ post?: never;
3942
+ delete?: never;
3943
+ options?: never;
3944
+ head?: never;
3945
+ patch?: never;
3946
+ trace?: never;
3947
+ };
3931
3948
  "/api/factory/quality/changes": {
3932
3949
  parameters: {
3933
3950
  query?: never;
@@ -9458,7 +9475,45 @@ export interface components {
9458
9475
  stationId: string;
9459
9476
  executorId: string;
9460
9477
  } | null;
9478
+ ci?: {
9479
+ /** @enum {string} */
9480
+ conclusion: "success" | "failure" | "neutral" | "pending" | "unknown";
9481
+ failed: number;
9482
+ } | null;
9483
+ servedBy?: string | null;
9461
9484
  }[];
9485
+ rollbackTarget?: {
9486
+ [key: string]: string | null;
9487
+ } | null;
9488
+ postReleaseHealth?: {
9489
+ /** @enum {string} */
9490
+ verdict: "ok" | "unavailable" | "breach" | "unknown";
9491
+ signals: string[];
9492
+ complete: boolean;
9493
+ };
9494
+ }[];
9495
+ };
9496
+ FactoryProductionResponse: {
9497
+ generatedAt: string;
9498
+ signals: {
9499
+ /** @enum {string} */
9500
+ signal: "api_availability" | "http_5xx" | "latency_p95" | "ecs_tasks" | "database" | "deploy_lag" | "app_host_edge" | "chat_success" | "ingestion_backlog" | "release_safety";
9501
+ /** @enum {string} */
9502
+ source: "hosted" | "computed";
9503
+ targetText: string;
9504
+ cadenceMinutes: number;
9505
+ /** @enum {string} */
9506
+ verdict: "ok" | "breach" | "unavailable";
9507
+ value: number | null;
9508
+ target: number | null;
9509
+ unit: string | null;
9510
+ detail: string | null;
9511
+ windowMinutes: number | null;
9512
+ sampledAt: string | null;
9513
+ ageSeconds: number | null;
9514
+ stale: boolean;
9515
+ consecutiveBreaches: number;
9516
+ passRate30d: number | null;
9462
9517
  }[];
9463
9518
  };
9464
9519
  CreateQualityChangeResponse: {
@@ -18006,6 +18061,40 @@ export interface operations {
18006
18061
  };
18007
18062
  };
18008
18063
  };
18064
+ factoryProduction: {
18065
+ parameters: {
18066
+ query?: never;
18067
+ header?: never;
18068
+ path?: never;
18069
+ cookie?: never;
18070
+ };
18071
+ requestBody?: never;
18072
+ responses: {
18073
+ /** @description The ten production signals */
18074
+ 200: {
18075
+ headers: {
18076
+ [name: string]: unknown;
18077
+ };
18078
+ content: {
18079
+ "application/json": components["schemas"]["FactoryProductionResponse"];
18080
+ };
18081
+ };
18082
+ /** @description Not authenticated */
18083
+ 401: {
18084
+ headers: {
18085
+ [name: string]: unknown;
18086
+ };
18087
+ content?: never;
18088
+ };
18089
+ /** @description Not an internal admin */
18090
+ 403: {
18091
+ headers: {
18092
+ [name: string]: unknown;
18093
+ };
18094
+ content?: never;
18095
+ };
18096
+ };
18097
+ };
18009
18098
  createQualityChange: {
18010
18099
  parameters: {
18011
18100
  query?: never;
@@ -96,6 +96,7 @@ export const openApiRoutes = {
96
96
  '/api/factory/floor': ['GET'],
97
97
  '/api/factory/kpis': ['GET'],
98
98
  '/api/factory/lineage': ['GET'],
99
+ '/api/factory/production': ['GET'],
99
100
  '/api/factory/quality/changes': ['POST'],
100
101
  '/api/factory/quality/corpus': ['GET'],
101
102
  '/api/factory/quality/deployments': ['POST'],
@@ -162,6 +162,7 @@ export const SYSTEM_SCOPED_TYPES = [
162
162
  "factorySnapshot",
163
163
  "factoryKpis",
164
164
  "factoryLineage",
165
+ "factoryProduction",
165
166
  ] as const satisfies readonly SystemScopedType[];
166
167
 
167
168
  /** Every literal `fromQueryKey` can route, across all five tables. */
@@ -160,6 +160,9 @@ export type ResourceKey =
160
160
  // Change lineage over the release ledger (ADR-CONTRACTS-222, backend
161
161
  // ADR-BE-926): each release with its commits, PRDs, workers, run and health.
162
162
  | { type: "factoryLineage"; scope: "system" }
163
+ // The production view (ADR-CONTRACTS-224, backend ADR-BE-929): the ten
164
+ // production signals with verdict, age, staleness and breach run.
165
+ | { type: "factoryProduction"; scope: "system" }
163
166
  // Everything awaiting the viewer's decision, across every domain
164
167
  // (ADR-CONT-104). ORG-scoped, not user-scoped, even though the content is
165
168
  // per-viewer: the bucket differs per org, so a user-keyed entry would serve
@@ -138,6 +138,7 @@ export function toQueryKey(key: ResourceKey): readonly string[] {
138
138
  case "factorySnapshot":
139
139
  case "factoryKpis":
140
140
  case "factoryLineage":
141
+ case "factoryProduction":
141
142
  return [key.type, key.scope] as const;
142
143
 
143
144
  default: {