@thinkai/tai-api-contract 2.180.0 → 2.181.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.
@@ -66,6 +66,48 @@ export interface paths {
66
66
  patch?: never;
67
67
  trace?: never;
68
68
  };
69
+ "/admin/workspaces/{workspaceId}/assessment-preflight": {
70
+ parameters: {
71
+ query?: never;
72
+ header?: never;
73
+ path?: never;
74
+ cookie?: never;
75
+ };
76
+ get?: never;
77
+ put?: never;
78
+ /**
79
+ * Evaluate assessment preflight from server-loaded evidence
80
+ * @description Loads repository scope, readiness scan age, and window coverage for one workspace. Client fields for scope, scans, windows, and engineer counts are ignored, so an unscanned source cannot be marked fresh. The five-business-day clock uses Monday–Friday in America/New_York and is stored on the first passing result. A later blocker does not clear it. Active-engineer counts stay unloaded until stored activity can be counted.
81
+ * **Authorization:** Bearer JWT required. Caller email must appear in `PLATFORM_ADMIN_EMAILS`.
82
+ */
83
+ post: operations["runLiveAssessmentPreflight"];
84
+ delete?: never;
85
+ options?: never;
86
+ head?: never;
87
+ patch?: never;
88
+ trace?: never;
89
+ };
90
+ "/admin/assessment-queue": {
91
+ parameters: {
92
+ query?: never;
93
+ header?: never;
94
+ path?: never;
95
+ cookie?: never;
96
+ };
97
+ /**
98
+ * List operator assessment records
99
+ * @description Returns the stored assessment record for each workspace an operator has evaluated. The next blocker is on this list. A second workspace is not required.
100
+ * **Authorization:** Bearer JWT required. Caller email must appear in `PLATFORM_ADMIN_EMAILS`.
101
+ */
102
+ get: operations["listAssessmentQueue"];
103
+ put?: never;
104
+ post?: never;
105
+ delete?: never;
106
+ options?: never;
107
+ head?: never;
108
+ patch?: never;
109
+ trace?: never;
110
+ };
69
111
  "/admin/assessment-manifest-validation": {
70
112
  parameters: {
71
113
  query?: never;
@@ -12734,6 +12776,182 @@ export interface operations {
12734
12776
  };
12735
12777
  };
12736
12778
  };
12779
+ runLiveAssessmentPreflight: {
12780
+ parameters: {
12781
+ query?: never;
12782
+ header?: never;
12783
+ path: {
12784
+ workspaceId: components["parameters"]["WorkspaceId"];
12785
+ };
12786
+ cookie?: never;
12787
+ };
12788
+ requestBody: {
12789
+ content: {
12790
+ "application/json": {
12791
+ /** @enum {string} */
12792
+ offerId: "engineering_readiness_baseline" | "agentic_ai_roi";
12793
+ /** @enum {string} */
12794
+ sourceControl: "connected" | "pending_approval" | "setup_in_progress" | "revoked" | "stale" | "missing";
12795
+ platformExecutionReady: boolean;
12796
+ premiumAi: {
12797
+ cursor: boolean;
12798
+ claude: boolean;
12799
+ copilot: boolean;
12800
+ };
12801
+ jiraSelected: boolean;
12802
+ incidentSelected: boolean;
12803
+ incidentAvailable: boolean;
12804
+ owner?: string | null;
12805
+ };
12806
+ };
12807
+ };
12808
+ responses: {
12809
+ /** @description Preflight result. `dueDate` is set once the clock has started and stays set if a later check is blocked. */
12810
+ 200: {
12811
+ headers: {
12812
+ [name: string]: unknown;
12813
+ };
12814
+ content: {
12815
+ "application/json": {
12816
+ ready: boolean;
12817
+ clockStarted: boolean;
12818
+ /** Format: date */
12819
+ dueDate: string | null;
12820
+ owner: string | null;
12821
+ blocker: string | null;
12822
+ nextAction: {
12823
+ label: string;
12824
+ href: string | null;
12825
+ } | null;
12826
+ failures: {
12827
+ code: string;
12828
+ blocker: string;
12829
+ nextAction: {
12830
+ label: string;
12831
+ href: string | null;
12832
+ };
12833
+ }[];
12834
+ chapters: {
12835
+ /** @enum {string} */
12836
+ id: "jira" | "incidents";
12837
+ /** @enum {string} */
12838
+ status: "unavailable";
12839
+ reason: string;
12840
+ }[];
12841
+ };
12842
+ };
12843
+ };
12844
+ /** @description Body or workspace id failed validation. */
12845
+ 400: {
12846
+ headers: {
12847
+ [name: string]: unknown;
12848
+ };
12849
+ content: {
12850
+ /**
12851
+ * @example {
12852
+ * "error": "offerId is not a known assessment offer",
12853
+ * "code": "invalid_body"
12854
+ * }
12855
+ */
12856
+ "application/json": components["schemas"]["ErrorMessageDto"];
12857
+ };
12858
+ };
12859
+ /** @description Missing or invalid JWT. */
12860
+ 401: {
12861
+ headers: {
12862
+ [name: string]: unknown;
12863
+ };
12864
+ content: {
12865
+ "application/json": components["schemas"]["ErrorMessageDto"];
12866
+ };
12867
+ };
12868
+ /** @description Caller is not a platform admin. */
12869
+ 403: {
12870
+ headers: {
12871
+ [name: string]: unknown;
12872
+ };
12873
+ content: {
12874
+ /**
12875
+ * @example {
12876
+ * "error": "Forbidden",
12877
+ * "code": "forbidden"
12878
+ * }
12879
+ */
12880
+ "application/json": components["schemas"]["ErrorMessageDto"];
12881
+ };
12882
+ };
12883
+ /** @description Evidence store is unavailable. */
12884
+ 503: {
12885
+ headers: {
12886
+ [name: string]: unknown;
12887
+ };
12888
+ content: {
12889
+ "application/json": components["schemas"]["ErrorMessageDto"];
12890
+ };
12891
+ };
12892
+ };
12893
+ };
12894
+ listAssessmentQueue: {
12895
+ parameters: {
12896
+ query?: never;
12897
+ header?: never;
12898
+ path?: never;
12899
+ cookie?: never;
12900
+ };
12901
+ requestBody?: never;
12902
+ responses: {
12903
+ /** @description Operator queue. */
12904
+ 200: {
12905
+ headers: {
12906
+ [name: string]: unknown;
12907
+ };
12908
+ content: {
12909
+ "application/json": {
12910
+ records: {
12911
+ /** Format: uuid */
12912
+ workspaceId: string;
12913
+ /** @enum {string} */
12914
+ offerId: "engineering_readiness_baseline" | "agentic_ai_roi";
12915
+ ready: boolean;
12916
+ blocker: string | null;
12917
+ nextAction: {
12918
+ label: string;
12919
+ href: string | null;
12920
+ } | null;
12921
+ /** Format: date */
12922
+ dueDate: string | null;
12923
+ /** Format: date-time */
12924
+ evaluatedAt: string;
12925
+ }[];
12926
+ };
12927
+ };
12928
+ };
12929
+ /** @description Missing or invalid JWT. */
12930
+ 401: {
12931
+ headers: {
12932
+ [name: string]: unknown;
12933
+ };
12934
+ content: {
12935
+ "application/json": components["schemas"]["ErrorMessageDto"];
12936
+ };
12937
+ };
12938
+ /** @description Caller is not a platform admin. */
12939
+ 403: {
12940
+ headers: {
12941
+ [name: string]: unknown;
12942
+ };
12943
+ content: {
12944
+ /**
12945
+ * @example {
12946
+ * "error": "Forbidden",
12947
+ * "code": "forbidden"
12948
+ * }
12949
+ */
12950
+ "application/json": components["schemas"]["ErrorMessageDto"];
12951
+ };
12952
+ };
12953
+ };
12954
+ };
12737
12955
  runAssessmentManifestValidation: {
12738
12956
  parameters: {
12739
12957
  query?: never;