@company-semantics/contracts 89.1.0 → 89.2.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": "89.1.0",
3
+ "version": "89.2.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -177,8 +177,9 @@
177
177
  "picomatch@<4.0.4": ">=4.0.4",
178
178
  "esbuild@<0.28.1": ">=0.28.1",
179
179
  "linkify-it@<5.0.2": ">=5.0.2",
180
- "postcss@<8.5.18": ">=8.5.18",
181
- "markdown-it@<14.2.0": ">=14.2.0"
180
+ "postcss@<8.5.23": ">=8.5.23",
181
+ "markdown-it@<14.2.0": ">=14.2.0",
182
+ "@humanfs/node@<0.16.8": ">=0.16.8 <0.17.0"
182
183
  }
183
184
  },
184
185
  "lint-staged": {
@@ -186,5 +187,5 @@
186
187
  "*.md": "markdownlint-cli2",
187
188
  "package.json": "node -e \"JSON.parse(require('fs').readFileSync('package.json'))\""
188
189
  },
189
- "securityRequirementsVersion": "bfd57aaebc7d47d195f06ba507ed3fb56da0faa9c40aca3c00f2e63dbd3b617b"
190
+ "securityRequirementsVersion": "8700b9fe36f8c948f12970ec54128e4f1955986dd9b634114f7501fdb1884267"
190
191
  }
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
2
- export const SPEC_HASH = '50b15a02e5ef' as const;
3
- export const SPEC_HASH_FULL = '50b15a02e5efb3a03bd903551f31a4c74693891d2577816c34a030d09909e389' as const;
2
+ export const SPEC_HASH = '7144c9a832d5' as const;
3
+ export const SPEC_HASH_FULL = '7144c9a832d55cf9179e5825c6c8fa486bf7130c0d1022d1b721f175dcf99f6d' as const;
@@ -1675,7 +1675,7 @@ export interface paths {
1675
1675
  };
1676
1676
  /**
1677
1677
  * Read one analysis workflow’s generic lifecycle envelope
1678
- * @description The domain-agnostic projection a client polls: identity, registered type, activity-free lifecycle state, start and completion times, the opaque domain progress and result payloads (null until the domain adapter supplies them), a closed failure class on a failed workflow, and the capabilities the surface may offer — canStop from the generic layer, canContinue as the domain declares it. Org-scoped: a workflow in another workspace answers 404.
1678
+ * @description The domain-agnostic projection a client polls: identity, registered type, activity-free lifecycle state, start and completion times, the opaque domain progress and result payloads (null until the domain adapter supplies them), a closed failure class on a failed workflow, the frozen typed outcome of the current execution epoch once it settles (null until then), and the capabilities the surface may offer — canStop from the generic layer, canContinue as the domain declares it. Org-scoped: a workflow in another workspace answers 404.
1679
1679
  */
1680
1680
  get: operations["getAnalysisWorkflow"];
1681
1681
  put?: never;
@@ -1706,6 +1706,26 @@ export interface paths {
1706
1706
  patch?: never;
1707
1707
  trace?: never;
1708
1708
  };
1709
+ "/api/analysis-workflows/{id}/settlement": {
1710
+ parameters: {
1711
+ query?: never;
1712
+ header?: never;
1713
+ path?: never;
1714
+ cookie?: never;
1715
+ };
1716
+ get?: never;
1717
+ put?: never;
1718
+ /**
1719
+ * Deliver a settled analysis workflow’s outcome into its launching conversation now
1720
+ * @description An ACCELERATOR, never required for correctness (control ADR-CTRL-540): every terminal transition records a settlement that the server delivers on its own — immediately after settling, and on the reconciler sweep. The app calls this when its poll sees the current execution epoch settle, so the settlement turn appears without waiting. Idempotent: a second call for the same epoch answers skipped or delivered and writes nothing new. Answers not_settled while the epoch is still moving. Org-scoped: a workflow in another workspace answers 404.
1721
+ */
1722
+ post: operations["deliverAnalysisWorkflowSettlement"];
1723
+ delete?: never;
1724
+ options?: never;
1725
+ head?: never;
1726
+ patch?: never;
1727
+ trace?: never;
1728
+ };
1709
1729
  "/api/company-md/tree": {
1710
1730
  parameters: {
1711
1731
  query?: never;
@@ -4200,6 +4220,57 @@ export interface paths {
4200
4220
  patch?: never;
4201
4221
  trace?: never;
4202
4222
  };
4223
+ "/api/internal-admin/quality/graders": {
4224
+ parameters: {
4225
+ query?: never;
4226
+ header?: never;
4227
+ path?: never;
4228
+ cookie?: never;
4229
+ };
4230
+ /** Every grader version with its calibration and the severities it may gate */
4231
+ get: operations["listQualityGraders"];
4232
+ put?: never;
4233
+ post?: never;
4234
+ delete?: never;
4235
+ options?: never;
4236
+ head?: never;
4237
+ patch?: never;
4238
+ trace?: never;
4239
+ };
4240
+ "/api/internal-admin/quality/graders/{id}/label-queue": {
4241
+ parameters: {
4242
+ query?: never;
4243
+ header?: never;
4244
+ path?: never;
4245
+ cookie?: never;
4246
+ };
4247
+ /** A judge's unlabeled samples with their case content; the judge's verdict is hidden */
4248
+ get: operations["getQualityGraderLabelQueue"];
4249
+ put?: never;
4250
+ post?: never;
4251
+ delete?: never;
4252
+ options?: never;
4253
+ head?: never;
4254
+ patch?: never;
4255
+ trace?: never;
4256
+ };
4257
+ "/api/internal-admin/quality/graders/{id}/labels": {
4258
+ parameters: {
4259
+ query?: never;
4260
+ header?: never;
4261
+ path?: never;
4262
+ cookie?: never;
4263
+ };
4264
+ get?: never;
4265
+ put?: never;
4266
+ /** Label a judged sample, then recalibrate the judge; reveals the judge's verdict */
4267
+ post: operations["submitQualityGraderLabel"];
4268
+ delete?: never;
4269
+ options?: never;
4270
+ head?: never;
4271
+ patch?: never;
4272
+ trace?: never;
4273
+ };
4203
4274
  "/api/comments": {
4204
4275
  parameters: {
4205
4276
  query?: never;
@@ -6915,6 +6986,7 @@ export interface components {
6915
6986
  completedAt: string | null;
6916
6987
  progress: unknown | null;
6917
6988
  result: unknown | null;
6989
+ outcome: unknown | null;
6918
6990
  error?: string;
6919
6991
  capabilities: {
6920
6992
  canStop: boolean;
@@ -6934,6 +7006,10 @@ export interface components {
6934
7006
  /** @constant */
6935
7007
  reason: "not_running";
6936
7008
  };
7009
+ DeliverWorkflowSettlementResponse: {
7010
+ /** @enum {string} */
7011
+ result: "delivered" | "deferred" | "busy" | "skipped" | "not_settled";
7012
+ };
6937
7013
  CompanyMdListResponse: {
6938
7014
  items: {
6939
7015
  id: string;
@@ -13002,6 +13078,42 @@ export interface operations {
13002
13078
  };
13003
13079
  };
13004
13080
  };
13081
+ deliverAnalysisWorkflowSettlement: {
13082
+ parameters: {
13083
+ query?: never;
13084
+ header?: never;
13085
+ path: {
13086
+ id: string;
13087
+ };
13088
+ cookie?: never;
13089
+ };
13090
+ requestBody?: never;
13091
+ responses: {
13092
+ /** @description What the delivery attempt did */
13093
+ 200: {
13094
+ headers: {
13095
+ [name: string]: unknown;
13096
+ };
13097
+ content: {
13098
+ "application/json": components["schemas"]["DeliverWorkflowSettlementResponse"];
13099
+ };
13100
+ };
13101
+ /** @description The workflow id is not a uuid */
13102
+ 400: {
13103
+ headers: {
13104
+ [name: string]: unknown;
13105
+ };
13106
+ content?: never;
13107
+ };
13108
+ /** @description No such workflow in this workspace */
13109
+ 404: {
13110
+ headers: {
13111
+ [name: string]: unknown;
13112
+ };
13113
+ content?: never;
13114
+ };
13115
+ };
13116
+ };
13005
13117
  getCompanyMdTree: {
13006
13118
  parameters: {
13007
13119
  query?: {
@@ -17743,6 +17855,133 @@ export interface operations {
17743
17855
  };
17744
17856
  };
17745
17857
  };
17858
+ listQualityGraders: {
17859
+ parameters: {
17860
+ query?: never;
17861
+ header?: never;
17862
+ path?: never;
17863
+ cookie?: never;
17864
+ };
17865
+ requestBody?: never;
17866
+ responses: {
17867
+ /** @description Grader versions with confusion matrices by severity and failure kind */
17868
+ 200: {
17869
+ headers: {
17870
+ [name: string]: unknown;
17871
+ };
17872
+ content?: never;
17873
+ };
17874
+ /** @description Not an internal admin, or missing internal.manage_quality */
17875
+ 403: {
17876
+ headers: {
17877
+ [name: string]: unknown;
17878
+ };
17879
+ content?: never;
17880
+ };
17881
+ };
17882
+ };
17883
+ getQualityGraderLabelQueue: {
17884
+ parameters: {
17885
+ query?: {
17886
+ limit?: number;
17887
+ };
17888
+ header?: never;
17889
+ path: {
17890
+ id: string;
17891
+ };
17892
+ cookie?: never;
17893
+ };
17894
+ requestBody?: never;
17895
+ responses: {
17896
+ /** @description Samples waiting for a label, newest run first, without verdicts */
17897
+ 200: {
17898
+ headers: {
17899
+ [name: string]: unknown;
17900
+ };
17901
+ content?: never;
17902
+ };
17903
+ /** @description Validation error */
17904
+ 400: {
17905
+ headers: {
17906
+ [name: string]: unknown;
17907
+ };
17908
+ content?: never;
17909
+ };
17910
+ /** @description Not an internal admin, or missing internal.manage_quality */
17911
+ 403: {
17912
+ headers: {
17913
+ [name: string]: unknown;
17914
+ };
17915
+ content?: never;
17916
+ };
17917
+ /** @description No such judge */
17918
+ 404: {
17919
+ headers: {
17920
+ [name: string]: unknown;
17921
+ };
17922
+ content?: never;
17923
+ };
17924
+ };
17925
+ };
17926
+ submitQualityGraderLabel: {
17927
+ parameters: {
17928
+ query?: never;
17929
+ header?: never;
17930
+ path: {
17931
+ id: string;
17932
+ };
17933
+ cookie?: never;
17934
+ };
17935
+ requestBody: {
17936
+ content: {
17937
+ "application/json": {
17938
+ /** Format: uuid */
17939
+ runId: string;
17940
+ caseId: string;
17941
+ sample: number;
17942
+ humanPassed: boolean;
17943
+ humanFailureKind?: string | null;
17944
+ };
17945
+ };
17946
+ };
17947
+ responses: {
17948
+ /** @description The label, the judge's verdict and the recomputed calibration */
17949
+ 200: {
17950
+ headers: {
17951
+ [name: string]: unknown;
17952
+ };
17953
+ content?: never;
17954
+ };
17955
+ /** @description Validation error */
17956
+ 400: {
17957
+ headers: {
17958
+ [name: string]: unknown;
17959
+ };
17960
+ content?: never;
17961
+ };
17962
+ /** @description Not an internal admin, missing internal.manage_quality, or no CSRF token */
17963
+ 403: {
17964
+ headers: {
17965
+ [name: string]: unknown;
17966
+ };
17967
+ content?: never;
17968
+ };
17969
+ /** @description No such judge, or the judge graded no such sample */
17970
+ 404: {
17971
+ headers: {
17972
+ [name: string]: unknown;
17973
+ };
17974
+ content?: never;
17975
+ };
17976
+ /** @description The sample is already labeled, or the judge gave no valid verdict */
17977
+ 409: {
17978
+ headers: {
17979
+ [name: string]: unknown;
17980
+ };
17981
+ content?: never;
17982
+ };
17983
+ };
17984
+ };
17746
17985
  listCommentThreads: {
17747
17986
  parameters: {
17748
17987
  query: {
@@ -10,6 +10,7 @@ export const openApiRoutes = {
10
10
  '/api/account/sessions': ['GET'],
11
11
  '/api/account/sessions/{sessionId}': ['DELETE'],
12
12
  '/api/analysis-workflows/{id}': ['GET'],
13
+ '/api/analysis-workflows/{id}/settlement': ['POST'],
13
14
  '/api/analysis-workflows/{id}/stop': ['POST'],
14
15
  '/api/auth/consent/grant': ['POST'],
15
16
  '/api/billing/price-list': ['GET'],
@@ -111,6 +112,9 @@ export const openApiRoutes = {
111
112
  '/api/internal-admin/quality/changes/manual': ['POST'],
112
113
  '/api/internal-admin/quality/escalations': ['GET'],
113
114
  '/api/internal-admin/quality/escalations/{id}/resolve': ['POST'],
115
+ '/api/internal-admin/quality/graders': ['GET'],
116
+ '/api/internal-admin/quality/graders/{id}/label-queue': ['GET'],
117
+ '/api/internal-admin/quality/graders/{id}/labels': ['POST'],
114
118
  '/api/internal-admin/quality/plans/{planId}/status': ['GET'],
115
119
  '/api/internal-admin/quality/references/floor': ['PUT'],
116
120
  '/api/internal-admin/quality/spend': ['GET'],