@superblocksteam/shared 0.9620.4 → 0.9622.1
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/dist/errors/http.d.ts +11 -0
- package/dist/errors/http.d.ts.map +1 -1
- package/dist/errors/http.js +11 -0
- package/dist/errors/http.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/jwt/verifier-timeout.test.d.ts +2 -0
- package/dist/jwt/verifier-timeout.test.d.ts.map +1 -0
- package/dist/jwt/verifier-timeout.test.js +120 -0
- package/dist/jwt/verifier-timeout.test.js.map +1 -0
- package/dist/jwt/verifier.d.ts +3 -0
- package/dist/jwt/verifier.d.ts.map +1 -1
- package/dist/jwt/verifier.js +4 -1
- package/dist/jwt/verifier.js.map +1 -1
- package/dist/socket/protocol.d.ts +37 -0
- package/dist/socket/protocol.d.ts.map +1 -1
- package/dist/socket/socket.d.ts +2 -0
- package/dist/socket/socket.d.ts.map +1 -1
- package/dist/socket/socket.js +6 -1
- package/dist/socket/socket.js.map +1 -1
- package/dist/socket/socket.test.js +35 -0
- package/dist/socket/socket.test.js.map +1 -1
- package/dist/types/ai/chat-changed-elsewhere.d.ts +8 -0
- package/dist/types/ai/chat-changed-elsewhere.d.ts.map +1 -0
- package/dist/types/ai/chat-changed-elsewhere.js +12 -0
- package/dist/types/ai/chat-changed-elsewhere.js.map +1 -0
- package/dist/types/ai/editor-restart-required.d.ts +8 -0
- package/dist/types/ai/editor-restart-required.d.ts.map +1 -0
- package/dist/types/ai/editor-restart-required.js +12 -0
- package/dist/types/ai/editor-restart-required.js.map +1 -0
- package/dist/types/ai/index.d.ts +2 -0
- package/dist/types/ai/index.d.ts.map +1 -1
- package/dist/types/ai/index.js +2 -0
- package/dist/types/ai/index.js.map +1 -1
- package/dist/types/ai/native-builder-model.d.ts +29 -5
- package/dist/types/ai/native-builder-model.d.ts.map +1 -1
- package/dist/types/ai/native-builder-model.js +13 -3
- package/dist/types/ai/native-builder-model.js.map +1 -1
- package/dist/types/ai/native-builder-model.test.js +6 -3
- package/dist/types/ai/native-builder-model.test.js.map +1 -1
- package/dist/types/application/index.js +1 -1
- package/dist/types/application/index.js.map +1 -1
- package/dist/types/audit/ocsf.d.ts.map +1 -1
- package/dist/types/audit/ocsf.js +37 -0
- package/dist/types/audit/ocsf.js.map +1 -1
- package/dist/types/branch/index.d.ts +4 -5
- package/dist/types/branch/index.d.ts.map +1 -1
- package/dist/types/deployedAgents.d.ts +31 -0
- package/dist/types/deployedAgents.d.ts.map +1 -0
- package/dist/types/deployedAgents.js +2 -0
- package/dist/types/deployedAgents.js.map +1 -0
- package/dist/types/deployment/currentPublish.d.ts +33 -0
- package/dist/types/deployment/currentPublish.d.ts.map +1 -0
- package/dist/types/deployment/currentPublish.js +2 -0
- package/dist/types/deployment/currentPublish.js.map +1 -0
- package/dist/types/deployment/index.d.ts +1 -0
- package/dist/types/deployment/index.d.ts.map +1 -1
- package/dist/types/git/index.js +1 -1
- package/dist/types/git/index.js.map +1 -1
- package/dist/types/git/index.test.js +5 -0
- package/dist/types/git/index.test.js.map +1 -1
- package/dist/types/policyGate/errors.d.ts +6 -0
- package/dist/types/policyGate/errors.d.ts.map +1 -1
- package/dist/types/policyGate/errors.js +3 -0
- package/dist/types/policyGate/errors.js.map +1 -1
- package/dist/types/policyGate/index.d.ts +10 -2
- package/dist/types/policyGate/index.d.ts.map +1 -1
- package/dist/types/policyGate/index.js.map +1 -1
- package/dist/types/rbac/index.d.ts +8 -0
- package/dist/types/rbac/index.d.ts.map +1 -1
- package/dist/types/rbac/index.js +8 -0
- package/dist/types/rbac/index.js.map +1 -1
- package/dist/types/reviewPolicy/index.d.ts +5 -2
- package/dist/types/reviewPolicy/index.d.ts.map +1 -1
- package/dist/types/reviewPolicy/index.js +10 -2
- package/dist/types/reviewPolicy/index.js.map +1 -1
- package/dist/types/userToken/index.d.ts +1 -0
- package/dist/types/userToken/index.d.ts.map +1 -1
- package/dist/utils/builderHarnessAvailability.d.ts +25 -0
- package/dist/utils/builderHarnessAvailability.d.ts.map +1 -0
- package/dist/utils/builderHarnessAvailability.js +34 -0
- package/dist/utils/builderHarnessAvailability.js.map +1 -0
- package/dist/utils/builderHarnessAvailability.test.d.ts +2 -0
- package/dist/utils/builderHarnessAvailability.test.d.ts.map +1 -0
- package/dist/utils/builderHarnessAvailability.test.js +31 -0
- package/dist/utils/builderHarnessAvailability.test.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/localNativeBuilderFlags.d.ts +2 -1
- package/dist/utils/localNativeBuilderFlags.d.ts.map +1 -1
- package/dist/utils/localNativeBuilderFlags.js +2 -1
- package/dist/utils/localNativeBuilderFlags.js.map +1 -1
- package/dist/utils/localNativeBuilderFlags.test.js +8 -8
- package/dist/utils/localNativeBuilderFlags.test.js.map +1 -1
- package/dist/utils/native-attachment-budget.d.ts +16 -0
- package/dist/utils/native-attachment-budget.d.ts.map +1 -0
- package/dist/utils/native-attachment-budget.js +32 -0
- package/dist/utils/native-attachment-budget.js.map +1 -0
- package/dist/utils/native-attachment-budget.test.d.ts +2 -0
- package/dist/utils/native-attachment-budget.test.d.ts.map +1 -0
- package/dist/utils/native-attachment-budget.test.js +21 -0
- package/dist/utils/native-attachment-budget.test.js.map +1 -0
- package/dist/utils/pageFixtures/v4/container.d.ts +45 -45
- package/dist/utils/pageFixtures/v4/container.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v4/form.d.ts +1 -1
- package/dist/utils/pageFixtures/v6/nested_modal.d.ts +4 -4
- package/dist/utils/pageFixtures/v6/with_main_canvas_children.d.ts +12 -12
- package/dist/utils/pageFixtures/v7/grids_and_forms.d.ts +9 -9
- package/dist/utils/platform-mcp-server-routes.d.ts +1 -1
- package/dist/utils/platform-mcp-server-routes.d.ts.map +1 -1
- package/dist/utils/platform-mcp-server-routes.js +12 -0
- package/dist/utils/platform-mcp-server-routes.js.map +1 -1
- package/package.json +1 -1
- package/src/errors/http.ts +13 -0
- package/src/index.ts +1 -0
- package/src/jwt/verifier-timeout.test.ts +62 -0
- package/src/jwt/verifier.ts +5 -1
- package/src/socket/protocol.ts +38 -2
- package/src/socket/socket.test.ts +43 -0
- package/src/socket/socket.ts +8 -1
- package/src/types/ai/chat-changed-elsewhere.ts +13 -0
- package/src/types/ai/editor-restart-required.ts +13 -0
- package/src/types/ai/index.ts +2 -0
- package/src/types/ai/native-builder-model.test.ts +7 -3
- package/src/types/ai/native-builder-model.ts +18 -3
- package/src/types/application/index.ts +1 -1
- package/src/types/audit/ocsf.ts +37 -0
- package/src/types/branch/index.ts +4 -2
- package/src/types/deployedAgents.ts +19 -0
- package/src/types/deployment/currentPublish.ts +28 -0
- package/src/types/deployment/index.ts +1 -0
- package/src/types/git/index.test.ts +8 -0
- package/src/types/git/index.ts +1 -1
- package/src/types/policyGate/errors.ts +4 -0
- package/src/types/policyGate/index.ts +17 -2
- package/src/types/rbac/index.ts +8 -0
- package/src/types/reviewPolicy/index.ts +12 -2
- package/src/types/userToken/index.ts +2 -0
- package/src/utils/builderHarnessAvailability.test.ts +33 -0
- package/src/utils/builderHarnessAvailability.ts +43 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/localNativeBuilderFlags.test.ts +8 -8
- package/src/utils/localNativeBuilderFlags.ts +4 -3
- package/src/utils/native-attachment-budget.test.ts +23 -0
- package/src/utils/native-attachment-budget.ts +39 -0
- package/src/utils/platform-mcp-server-routes.ts +12 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/utils/pageFixtures/v4/container.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/utils/pageFixtures/v4/container.ts"],"names":[],"mappings":";;;;;;;;;;;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B"}
|
|
@@ -75,10 +75,10 @@ declare const _default: Readonly<{
|
|
|
75
75
|
dynamicTriggerPathList?: undefined;
|
|
76
76
|
dynamicPropertyPathList?: undefined;
|
|
77
77
|
} | {
|
|
78
|
-
text?: undefined;
|
|
79
78
|
textStyle?: undefined;
|
|
80
79
|
textType?: undefined;
|
|
81
80
|
textAlign?: undefined;
|
|
81
|
+
text?: undefined;
|
|
82
82
|
isDefaultClickDisabled?: undefined;
|
|
83
83
|
buttonStyle?: undefined;
|
|
84
84
|
disabledWhenInvalid?: undefined;
|
|
@@ -13,10 +13,10 @@ declare const _default: Readonly<{
|
|
|
13
13
|
canExtend: boolean;
|
|
14
14
|
detachFromLayout: boolean;
|
|
15
15
|
children: ({
|
|
16
|
-
text?: undefined;
|
|
17
16
|
onClick?: undefined;
|
|
18
17
|
isDisabled?: undefined;
|
|
19
18
|
isVisible?: undefined;
|
|
19
|
+
text?: undefined;
|
|
20
20
|
isDefaultClickDisabled?: undefined;
|
|
21
21
|
buttonStyle?: undefined;
|
|
22
22
|
docsUrl?: undefined;
|
|
@@ -59,10 +59,10 @@ declare const _default: Readonly<{
|
|
|
59
59
|
snapColumns: number;
|
|
60
60
|
parentId: string;
|
|
61
61
|
} | {
|
|
62
|
-
verticalAlign?: undefined;
|
|
63
62
|
textStyle?: undefined;
|
|
64
63
|
textType?: undefined;
|
|
65
64
|
textAlign?: undefined;
|
|
65
|
+
verticalAlign?: undefined;
|
|
66
66
|
text: string;
|
|
67
67
|
buttonStyle: string;
|
|
68
68
|
widgetName: string;
|
|
@@ -90,12 +90,12 @@ declare const _default: Readonly<{
|
|
|
90
90
|
key: string;
|
|
91
91
|
}[];
|
|
92
92
|
} | {
|
|
93
|
-
|
|
93
|
+
onClick?: undefined;
|
|
94
94
|
textStyle?: undefined;
|
|
95
95
|
textType?: undefined;
|
|
96
96
|
textAlign?: undefined;
|
|
97
|
-
onClick?: undefined;
|
|
98
97
|
dynamicTriggerPathList?: undefined;
|
|
98
|
+
verticalAlign?: undefined;
|
|
99
99
|
text: string;
|
|
100
100
|
buttonStyle: string;
|
|
101
101
|
widgetName: string;
|
|
@@ -3,9 +3,11 @@ declare const _default: Readonly<{
|
|
|
3
3
|
topRow: 0;
|
|
4
4
|
version: 6;
|
|
5
5
|
children: ({
|
|
6
|
+
verticalAlign?: undefined;
|
|
7
|
+
text?: undefined;
|
|
8
|
+
textStyle?: undefined;
|
|
6
9
|
textType?: undefined;
|
|
7
10
|
textAlign?: undefined;
|
|
8
|
-
textStyle?: undefined;
|
|
9
11
|
backgroundColor?: undefined;
|
|
10
12
|
label?: undefined;
|
|
11
13
|
pageType?: undefined;
|
|
@@ -20,12 +22,10 @@ declare const _default: Readonly<{
|
|
|
20
22
|
verticalAlignment?: undefined;
|
|
21
23
|
defaultSelectedRow?: undefined;
|
|
22
24
|
horizontalAlignment?: undefined;
|
|
23
|
-
text?: undefined;
|
|
24
25
|
isFilterable?: undefined;
|
|
25
26
|
defaultFilters?: undefined;
|
|
26
27
|
children?: undefined;
|
|
27
28
|
containerStyle?: undefined;
|
|
28
|
-
verticalAlign?: undefined;
|
|
29
29
|
x: {
|
|
30
30
|
field: string;
|
|
31
31
|
dataType: string;
|
|
@@ -90,15 +90,15 @@ declare const _default: Readonly<{
|
|
|
90
90
|
onCancelChanges?: undefined;
|
|
91
91
|
cachedColumnSettings?: {};
|
|
92
92
|
} | {
|
|
93
|
+
verticalAlign?: undefined;
|
|
94
|
+
text?: undefined;
|
|
95
|
+
textStyle?: undefined;
|
|
93
96
|
textType?: undefined;
|
|
94
97
|
textAlign?: undefined;
|
|
95
|
-
textStyle?: undefined;
|
|
96
98
|
backgroundColor?: undefined;
|
|
97
|
-
text?: undefined;
|
|
98
99
|
children?: undefined;
|
|
99
100
|
containerStyle?: undefined;
|
|
100
101
|
size?: undefined;
|
|
101
|
-
verticalAlign?: undefined;
|
|
102
102
|
snapRows?: undefined;
|
|
103
103
|
type: string;
|
|
104
104
|
label: string;
|
|
@@ -340,9 +340,11 @@ declare const _default: Readonly<{
|
|
|
340
340
|
chartDefinition?: undefined;
|
|
341
341
|
plotlyChartJson?: undefined;
|
|
342
342
|
} | {
|
|
343
|
+
verticalAlign?: undefined;
|
|
344
|
+
text?: undefined;
|
|
345
|
+
textStyle?: undefined;
|
|
343
346
|
textType?: undefined;
|
|
344
347
|
textAlign?: undefined;
|
|
345
|
-
textStyle?: undefined;
|
|
346
348
|
backgroundColor?: undefined;
|
|
347
349
|
label?: undefined;
|
|
348
350
|
pageType?: undefined;
|
|
@@ -357,12 +359,10 @@ declare const _default: Readonly<{
|
|
|
357
359
|
verticalAlignment?: undefined;
|
|
358
360
|
defaultSelectedRow?: undefined;
|
|
359
361
|
horizontalAlignment?: undefined;
|
|
360
|
-
text?: undefined;
|
|
361
362
|
isFilterable?: undefined;
|
|
362
363
|
defaultFilters?: undefined;
|
|
363
364
|
children?: undefined;
|
|
364
365
|
containerStyle?: undefined;
|
|
365
|
-
verticalAlign?: undefined;
|
|
366
366
|
snapRows?: undefined;
|
|
367
367
|
compactMode?: undefined;
|
|
368
368
|
onRowClicked?: undefined;
|
|
@@ -427,9 +427,11 @@ declare const _default: Readonly<{
|
|
|
427
427
|
key: string;
|
|
428
428
|
}[];
|
|
429
429
|
} | {
|
|
430
|
+
verticalAlign?: undefined;
|
|
431
|
+
text?: undefined;
|
|
432
|
+
textStyle?: undefined;
|
|
430
433
|
textType?: undefined;
|
|
431
434
|
textAlign?: undefined;
|
|
432
|
-
textStyle?: undefined;
|
|
433
435
|
label?: undefined;
|
|
434
436
|
pageType?: undefined;
|
|
435
437
|
textSize?: undefined;
|
|
@@ -443,11 +445,9 @@ declare const _default: Readonly<{
|
|
|
443
445
|
verticalAlignment?: undefined;
|
|
444
446
|
defaultSelectedRow?: undefined;
|
|
445
447
|
horizontalAlignment?: undefined;
|
|
446
|
-
text?: undefined;
|
|
447
448
|
isFilterable?: undefined;
|
|
448
449
|
defaultFilters?: undefined;
|
|
449
450
|
size?: undefined;
|
|
450
|
-
verticalAlign?: undefined;
|
|
451
451
|
animateLoading?: undefined;
|
|
452
452
|
dynamicTriggerPathList?: undefined;
|
|
453
453
|
dynamicBindingPathList?: undefined;
|
|
@@ -161,10 +161,10 @@ declare const _default: Readonly<{
|
|
|
161
161
|
gridColumns: number;
|
|
162
162
|
parentId: string;
|
|
163
163
|
} | {
|
|
164
|
+
verticalAlign?: undefined;
|
|
165
|
+
textStyle?: undefined;
|
|
164
166
|
textType?: undefined;
|
|
165
167
|
textAlign?: undefined;
|
|
166
|
-
textStyle?: undefined;
|
|
167
|
-
verticalAlign?: undefined;
|
|
168
168
|
height: {
|
|
169
169
|
value: number;
|
|
170
170
|
mode: string;
|
|
@@ -591,11 +591,11 @@ declare const _default: Readonly<{
|
|
|
591
591
|
openParentPropertyPane: boolean;
|
|
592
592
|
disablePropertyPane: boolean;
|
|
593
593
|
children: ({
|
|
594
|
+
verticalAlign?: undefined;
|
|
595
|
+
text?: undefined;
|
|
596
|
+
textStyle?: undefined;
|
|
594
597
|
textType?: undefined;
|
|
595
598
|
textAlign?: undefined;
|
|
596
|
-
textStyle?: undefined;
|
|
597
|
-
text?: undefined;
|
|
598
|
-
verticalAlign?: undefined;
|
|
599
599
|
defaultImage: string;
|
|
600
600
|
image: string;
|
|
601
601
|
imageShape: string;
|
|
@@ -834,10 +834,10 @@ declare const _default: Readonly<{
|
|
|
834
834
|
gridColumns: number;
|
|
835
835
|
parentId: string;
|
|
836
836
|
} | {
|
|
837
|
+
verticalAlign?: undefined;
|
|
838
|
+
textStyle?: undefined;
|
|
837
839
|
textType?: undefined;
|
|
838
840
|
textAlign?: undefined;
|
|
839
|
-
textStyle?: undefined;
|
|
840
|
-
verticalAlign?: undefined;
|
|
841
841
|
height: {
|
|
842
842
|
value: number;
|
|
843
843
|
mode: string;
|
|
@@ -989,10 +989,10 @@ declare const _default: Readonly<{
|
|
|
989
989
|
gridColumns: number;
|
|
990
990
|
parentId: string;
|
|
991
991
|
} | {
|
|
992
|
+
verticalAlign?: undefined;
|
|
993
|
+
textStyle?: undefined;
|
|
992
994
|
textType?: undefined;
|
|
993
995
|
textAlign?: undefined;
|
|
994
|
-
textStyle?: undefined;
|
|
995
|
-
verticalAlign?: undefined;
|
|
996
996
|
height: {
|
|
997
997
|
value: number;
|
|
998
998
|
mode: string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* being one path segment. The gateway can only build requests from this list, and the server accepts the /mcp tools
|
|
4
4
|
* token on exactly these routes, so a Builder tool can't call a route the server would refuse it on.
|
|
5
5
|
*/
|
|
6
|
-
export declare const PLATFORM_MCP_SERVER_ROUTES: readonly ['GET /api/v1/users/me', 'GET /api/v2/applications', 'POST /api/v2/applications/', 'GET /api/v2/applications/*/environments', 'PUT /api/v2/applications/*/metadata', 'POST /api/v2/applications/*/commit', 'POST /api/v2/applications/*/branches/*/commit', 'GET /api/v2/applications/*/branch/status', 'POST /api/v2/applications/*/branch/land', 'POST /api/v2/applications/*/deployments', 'GET /api/v2/applications/*/deploy-status/*', 'GET /api/v3/applications/*/connect', 'GET /api/v3/applications/*/branches/*/connect', 'POST /api/v3/applications/*/*/builds', 'POST /api/v3/applications/*/build-bulk-status', 'GET /api/v1/integrations/superset', 'GET /api/v1/integrations/*', 'GET /api/v1/organizations/*/profiles', 'POST /api/v1/files/upload', 'POST /api/v1/ai/generate-app-name', 'POST /api/v1/builder-usage', 'GET /api/v1/public/users/me', 'POST /api/v1/token/scoped'];
|
|
6
|
+
export declare const PLATFORM_MCP_SERVER_ROUTES: readonly ['GET /api/v1/users/me', 'GET /api/v2/applications', 'POST /api/v2/applications/', 'GET /api/v2/applications/*/environments', 'PUT /api/v2/applications/*/metadata', 'POST /api/v2/applications/*/commit', 'POST /api/v2/applications/*/branches/*/commit', 'GET /api/v2/applications/*/branch/status', 'POST /api/v2/applications/*/branch/land', 'POST /api/v2/applications/*/branch/update', 'POST /api/v2/applications/*/branch/enable', 'POST /api/v2/applications/*/branch/create', 'DELETE /api/v2/applications/*/branch/*', 'GET /api/v2/applications/*/branches/*/commits', 'GET /api/v2/applications/*/branches/*/commits/compare', 'POST /api/v2/applications/*/branches/*/reset', 'POST /api/v2/applications/*/deployments', 'GET /api/v2/applications/*/deployments', 'GET /api/v2/applications/*/current-publish', 'GET /api/v2/applications/*/deploy-status/*', 'GET /api/v3/applications/*/connect', 'GET /api/v3/applications/*/branches/*/connect', 'POST /api/v3/applications/*/*/builds', 'POST /api/v3/applications/*/build-bulk-status', 'GET /api/v1/integrations/superset', 'GET /api/v1/integrations/*', 'GET /api/v1/organizations/*/profiles', 'POST /api/v1/files/upload', 'POST /api/v1/ai/generate-app-name', 'POST /api/v1/builder-usage', 'GET /api/v1/public/users/me', 'POST /api/v1/token/scoped'];
|
|
7
7
|
export type PlatformMcpServerRoute = (typeof PLATFORM_MCP_SERVER_ROUTES)[number];
|
|
8
8
|
/** One value for each `*` in the route, in order. */
|
|
9
9
|
type RouteSegments<Route extends string, Values extends string[] = []> = Route extends `${string}*${infer Rest}` ? RouteSegments<Rest, [...Values, string]> : Values;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-mcp-server-routes.d.ts","sourceRoot":"","sources":["../../src/utils/platform-mcp-server-routes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,YACrC,sBAAsB,EACtB,0BAA0B,EAC1B,4BAA4B,EAC5B,yCAAyC,EACzC,qCAAqC,EACrC,oCAAoC,EACpC,+CAA+C,EAE/C,0CAA0C,EAC1C,yCAAyC,
|
|
1
|
+
{"version":3,"file":"platform-mcp-server-routes.d.ts","sourceRoot":"","sources":["../../src/utils/platform-mcp-server-routes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,YACrC,sBAAsB,EACtB,0BAA0B,EAC1B,4BAA4B,EAC5B,yCAAyC,EACzC,qCAAqC,EACrC,oCAAoC,EACpC,+CAA+C,EAE/C,0CAA0C,EAC1C,yCAAyC,EAEzC,2CAA2C,EAC3C,2CAA2C,EAC3C,2CAA2C,EAC3C,wCAAwC,EAExC,+CAA+C,EAC/C,uDAAuD,EACvD,8CAA8C,EAC9C,yCAAyC,EAEzC,wCAAwC,EACxC,4CAA4C,EAC5C,4CAA4C,EAC5C,oCAAoC,EACpC,+CAA+C,EAC/C,sCAAsC,EACtC,+CAA+C,EAC/C,mCAAmC,EACnC,4BAA4B,EAC5B,sCAAsC,EACtC,2BAA2B,EAC3B,mCAAmC,EAEnC,4BAA4B,EAE5B,6BAA6B,EAE7B,2BAA2B,CACnB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjF,qDAAqD;AACrD,KAAK,aAAa,CAAC,KAAK,SAAS,MAAM,EAAE,MAAM,SAAS,MAAM,EAAE,GAAG,EAAE,IAAI,KAAK,SAAS,GAAG,MAAM,IAAI,MAAM,IAAI,EAAE,GAC5G,aAAa,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC,GACxC,MAAM,CAAC;AAEX;;;GAGG;AACH,qBAAa,wBAAwB;IAIjC,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM;IAJvB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAQ;IAEtC,OAAO,eAGH;IAEJ,wEAAwE;IACxE,MAAM,CAAC,EAAE,CAAC,KAAK,SAAS,sBAAsB,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,wBAAwB,CAQzH;CACF"}
|
|
@@ -14,7 +14,19 @@ export const PLATFORM_MCP_SERVER_ROUTES = [
|
|
|
14
14
|
// Publishing with branching on shares the user's branch to main first, like the editor's Publish.
|
|
15
15
|
'GET /api/v2/applications/*/branch/status',
|
|
16
16
|
'POST /api/v2/applications/*/branch/land',
|
|
17
|
+
// The branch tools act on the caller's current branch, as the editor's branch menu does.
|
|
18
|
+
'POST /api/v2/applications/*/branch/update',
|
|
19
|
+
'POST /api/v2/applications/*/branch/enable',
|
|
20
|
+
'POST /api/v2/applications/*/branch/create',
|
|
21
|
+
'DELETE /api/v2/applications/*/branch/*',
|
|
22
|
+
// Versions of the caller's branch, a compare of two of them, and a restore, as the editor's history does.
|
|
23
|
+
'GET /api/v2/applications/*/branches/*/commits',
|
|
24
|
+
'GET /api/v2/applications/*/branches/*/commits/compare',
|
|
25
|
+
'POST /api/v2/applications/*/branches/*/reset',
|
|
17
26
|
'POST /api/v2/applications/*/deployments',
|
|
27
|
+
// A rollback checks that the version was live before; the current publish is the app-wide publish state.
|
|
28
|
+
'GET /api/v2/applications/*/deployments',
|
|
29
|
+
'GET /api/v2/applications/*/current-publish',
|
|
18
30
|
'GET /api/v2/applications/*/deploy-status/*',
|
|
19
31
|
'GET /api/v3/applications/*/connect',
|
|
20
32
|
'GET /api/v3/applications/*/branches/*/connect',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-mcp-server-routes.js","sourceRoot":"","sources":["../../src/utils/platform-mcp-server-routes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,sBAAsB;IACtB,0BAA0B;IAC1B,4BAA4B;IAC5B,yCAAyC;IACzC,qCAAqC;IACrC,oCAAoC;IACpC,+CAA+C;IAC/C,kGAAkG;IAClG,0CAA0C;IAC1C,yCAAyC;IACzC,yCAAyC;IACzC,4CAA4C;IAC5C,oCAAoC;IACpC,+CAA+C;IAC/C,sCAAsC;IACtC,+CAA+C;IAC/C,mCAAmC;IACnC,4BAA4B;IAC5B,sCAAsC;IACtC,2BAA2B;IAC3B,mCAAmC;IACnC,2DAA2D;IAC3D,4BAA4B;IAC5B,qGAAqG;IACrG,6BAA6B;IAC7B,+EAA+E;IAC/E,2BAA2B;CACnB,CAAC;AASX;;;GAGG;AACH,MAAM,OAAO,wBAAwB;I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json
CHANGED
package/src/errors/http.ts
CHANGED
|
@@ -41,6 +41,19 @@ export class UnauthorizedError extends HttpError {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* The machine-readable reason on a sync-token refusal that means "this application does not own that hash". The
|
|
46
|
+
* client reads it to decide its upload cache is stale and to send the whole tree again. It is deliberately the only
|
|
47
|
+
* reason: a foreign hash and a missing hash both produce it, so it does not tell the caller which hashes are stored,
|
|
48
|
+
* and refusals about the token's app or branch binding do not carry it.
|
|
49
|
+
*/
|
|
50
|
+
export const SYNC_OBJECT_NOT_OWNED_REASON = 'sync_object_not_owned';
|
|
51
|
+
|
|
52
|
+
/** An `applications:sync` call named a hash its application does not own. The message matches every other sync-token refusal. */
|
|
53
|
+
export class SyncObjectNotOwnedError extends UnauthorizedError {
|
|
54
|
+
readonly reason = SYNC_OBJECT_NOT_OWNED_REASON;
|
|
55
|
+
}
|
|
56
|
+
|
|
44
57
|
export class ForbiddenError extends HttpError {
|
|
45
58
|
constructor(message = 'You do not have permission to perform this action.') {
|
|
46
59
|
super(403, message, 'Forbidden');
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './errors/index.js';
|
|
2
2
|
export * from './types/index.js';
|
|
3
3
|
export * from './types/customAgents.js';
|
|
4
|
+
export * from './types/deployedAgents.js';
|
|
4
5
|
export * from './utils/index.js';
|
|
5
6
|
export * from './relay/index.js';
|
|
6
7
|
export * from './plugins/index.js';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/** Exercises numeric JWKS timeouts against a real, delayed signing-key endpoint. */
|
|
2
|
+
import { generateKeyPairSync } from 'node:crypto';
|
|
3
|
+
import http from 'node:http';
|
|
4
|
+
|
|
5
|
+
import { SignJWT } from 'jose';
|
|
6
|
+
import { expect, it } from 'vitest';
|
|
7
|
+
|
|
8
|
+
import { JwtVerifier } from './verifier.js';
|
|
9
|
+
|
|
10
|
+
/** Owns a signing key and an HTTP endpoint that answers after the requested budget. */
|
|
11
|
+
class DelayedJwksEndpoint {
|
|
12
|
+
/** Leave ample ordering margin over the verifier's fifty-millisecond budget. */
|
|
13
|
+
private static readonly RESPONSE_DELAY_MS = 500;
|
|
14
|
+
private readonly keys = generateKeyPairSync('ec', { namedCurve: 'P-256' });
|
|
15
|
+
private readonly timers = new Set<NodeJS.Timeout>();
|
|
16
|
+
private readonly server = http.createServer((_req, res) => this.respond(res));
|
|
17
|
+
|
|
18
|
+
/** Starts the real JWKS listener before verification begins. */
|
|
19
|
+
async start(): Promise<void> {
|
|
20
|
+
await new Promise<void>((resolve, reject) => {
|
|
21
|
+
this.server.once('error', reject);
|
|
22
|
+
this.server.listen(0, '127.0.0.1', resolve);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Resolves the listener's loopback URL without exposing key material. */
|
|
27
|
+
get uri(): string {
|
|
28
|
+
const address = this.server.address();
|
|
29
|
+
if (!address || typeof address === 'string') throw new Error('JWKS listener is not running');
|
|
30
|
+
return `http://127.0.0.1:${address.port}/jwks`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Creates a genuine credential that the delayed response could verify. */
|
|
34
|
+
async sign(): Promise<string> {
|
|
35
|
+
return new SignJWT({}).setProtectedHeader({ alg: 'ES256', kid: 'timeout-test' }).sign(this.keys.privateKey);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Closes every request and cancels its pending delayed response. */
|
|
39
|
+
async [Symbol.asyncDispose](): Promise<void> {
|
|
40
|
+
for (const timer of this.timers) clearTimeout(timer);
|
|
41
|
+
this.server.closeAllConnections();
|
|
42
|
+
await new Promise<void>((resolve) => this.server.close(() => resolve()));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
private respond(res: http.ServerResponse): void {
|
|
46
|
+
const timer = setTimeout(() => {
|
|
47
|
+
this.timers.delete(timer);
|
|
48
|
+
res.setHeader('Content-Type', 'application/json');
|
|
49
|
+
res.end(JSON.stringify({ keys: [{ ...this.keys.publicKey.export({ format: 'jwk' }), kid: 'timeout-test', alg: 'ES256' }] }));
|
|
50
|
+
}, DelayedJwksEndpoint.RESPONSE_DELAY_MS);
|
|
51
|
+
this.timers.add(timer);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
it('honors a numeric JWKS timeout before a delayed valid key arrives', async () => {
|
|
56
|
+
await using endpoint = new DelayedJwksEndpoint();
|
|
57
|
+
await endpoint.start();
|
|
58
|
+
const verifier = new JwtVerifier({ jwksUri: endpoint.uri, timeoutMs: 50 });
|
|
59
|
+
await expect(verifier.verify(await endpoint.sign(), { algorithms: ['ES256'] })).rejects.toMatchObject({
|
|
60
|
+
cause: expect.objectContaining({ code: 'ERR_JWKS_TIMEOUT' })
|
|
61
|
+
});
|
|
62
|
+
});
|
package/src/jwt/verifier.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Resolves signing keys and verifies JWTs with caller-specified transport bounds. */
|
|
1
2
|
import { createLocalJWKSet, createRemoteJWKSet, decodeProtectedHeader, jwtVerify } from 'jose';
|
|
2
3
|
import type { JWTPayload, JWTVerifyOptions, RemoteJWKSetOptions } from 'jose';
|
|
3
4
|
import isEmpty from 'lodash-es/isEmpty.js';
|
|
@@ -11,10 +12,12 @@ export class JwtVerifier {
|
|
|
11
12
|
private readonly options: JwtVerifierOptions;
|
|
12
13
|
// Memoize the remote JWKS loader; without this, we'd recreate it on each verification and jose's own cache would never persist.
|
|
13
14
|
private remoteJwkSet?: ReturnType<typeof createRemoteJWKSet>;
|
|
15
|
+
/** Receives the JWKS source and transport options for this verifier. */
|
|
14
16
|
constructor(options: JwtVerifierOptions) {
|
|
15
17
|
this.options = options;
|
|
16
18
|
}
|
|
17
19
|
|
|
20
|
+
/** Checks signatures and claims, retaining the cause of verification failures. */
|
|
18
21
|
async verify<T extends JWTPayload>(token: string, options?: JWTVerifyOptions): Promise<T> {
|
|
19
22
|
let header: ReturnType<typeof decodeProtectedHeader>;
|
|
20
23
|
try {
|
|
@@ -79,7 +82,7 @@ export class JwtVerifier {
|
|
|
79
82
|
if (!isEmpty(this.options.requestHeaders)) {
|
|
80
83
|
opts.headers = this.options.requestHeaders;
|
|
81
84
|
}
|
|
82
|
-
if (
|
|
85
|
+
if (this.options.timeoutMs !== undefined) {
|
|
83
86
|
opts.timeoutDuration = this.options.timeoutMs;
|
|
84
87
|
}
|
|
85
88
|
if (!this.remoteJwkSet) {
|
|
@@ -108,6 +111,7 @@ export interface JwtVerifierOptions {
|
|
|
108
111
|
|
|
109
112
|
type Headers = Record<string, string>;
|
|
110
113
|
|
|
114
|
+
/** Public signing-key metadata resolved from the configured JWKS provider. */
|
|
111
115
|
export interface JwtKey {
|
|
112
116
|
kty: string;
|
|
113
117
|
kid: string;
|
package/src/socket/protocol.ts
CHANGED
|
@@ -152,9 +152,23 @@ export interface ServerMethods {
|
|
|
152
152
|
{ applicationId: string; branchName?: string | null; limit?: number },
|
|
153
153
|
{ chatSessionId: string; messages: AiChatMessageDto[] }
|
|
154
154
|
>;
|
|
155
|
+
getAttachmentMessages: ServerMethodSchema<
|
|
156
|
+
{ applicationId: string; chatSessionId: string; messageIds?: string[]; excludeRequestId?: string },
|
|
157
|
+
{
|
|
158
|
+
chatSessionId: string;
|
|
159
|
+
messageIds: string[];
|
|
160
|
+
messages: AiChatMessageDto[];
|
|
161
|
+
}
|
|
162
|
+
>;
|
|
155
163
|
/** Id of the active chat session, created if the app has none yet. Reads no messages. */
|
|
156
164
|
resolveBuilderBinding: ServerMethodSchema<
|
|
157
|
-
{
|
|
165
|
+
{
|
|
166
|
+
applicationId: string;
|
|
167
|
+
branchName: string;
|
|
168
|
+
preferredHarness: 'clark' | 'codex' | 'claude_code';
|
|
169
|
+
/** The chat the editor shows; the server refuses when another chat is now active. */
|
|
170
|
+
expectedChatSessionId?: string;
|
|
171
|
+
},
|
|
158
172
|
import('../types/ai/index.js').AiBuilderBinding
|
|
159
173
|
>;
|
|
160
174
|
/** Workspace placement for an app branch from the primary chat's existing binding. Creates nothing. */
|
|
@@ -167,7 +181,28 @@ export interface ServerMethods {
|
|
|
167
181
|
void
|
|
168
182
|
>;
|
|
169
183
|
getActiveSessionId: ServerMethodSchema<{ applicationId: string }, { chatSessionId: string }>;
|
|
170
|
-
|
|
184
|
+
/**
|
|
185
|
+
* Archives the active chat and starts a new one. A `builderBinding` from the harness picker is a harness switch
|
|
186
|
+
* instead: it reopens the most recent chat on that harness (`resumed`), which keeps its own model, and starts a
|
|
187
|
+
* new one bound to the harness and `model` (or the harness default) only when there is none.
|
|
188
|
+
*/
|
|
189
|
+
new: ServerMethodSchema<
|
|
190
|
+
{
|
|
191
|
+
applicationId: string;
|
|
192
|
+
branchName?: string | null;
|
|
193
|
+
builderBinding?: { harness: 'clark' | 'codex' | 'claude_code'; model?: string };
|
|
194
|
+
},
|
|
195
|
+
{ chatSessionId: string; resumed?: boolean }
|
|
196
|
+
>;
|
|
197
|
+
/**
|
|
198
|
+
* Changes the model of the caller's active native chat in place, keeping the chat and its native sessions.
|
|
199
|
+
* `expectedChatSessionId` is the chat the editor shows; the change is refused when the active chat is another
|
|
200
|
+
* one, unbound or on Clark, or when the harness does not offer the model.
|
|
201
|
+
*/
|
|
202
|
+
setBuilderModel: ServerMethodSchema<
|
|
203
|
+
{ applicationId: string; branchName?: string | null; expectedChatSessionId: string; model: string },
|
|
204
|
+
{ chatSessionId: string; model: string }
|
|
205
|
+
>;
|
|
171
206
|
/** Makes an existing chat of the caller's branch the active one. */
|
|
172
207
|
switch: ServerMethodSchema<{ applicationId: string; chatSessionId: string }, { chatSessionId: string }>;
|
|
173
208
|
truncateAfterTimestamp: ServerMethodSchema<{ applicationId: string; sinceTimestamp: number }, void>;
|
|
@@ -302,6 +337,7 @@ export interface ServerMethods {
|
|
|
302
337
|
commitMessage?: string;
|
|
303
338
|
checkpointSkipped?: CheckpointSkipReason;
|
|
304
339
|
conflicts?: string[];
|
|
340
|
+
heldPaths?: string[];
|
|
305
341
|
}
|
|
306
342
|
>;
|
|
307
343
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { trace } from '@opentelemetry/api';
|
|
2
2
|
import { describe, expect, it, vi } from 'vitest';
|
|
3
3
|
|
|
4
|
+
import { SyncObjectNotOwnedError } from '../errors/http.js';
|
|
4
5
|
import { INTENTIONAL_CLOSE_CODE, ISocket, REQUEST_ABORTED_SOCKET_ERROR } from './socket.js';
|
|
5
6
|
import { ISocketWithClientAuth } from './socketWithClientAuth.js';
|
|
6
7
|
|
|
@@ -50,6 +51,48 @@ describe('ISocket', () => {
|
|
|
50
51
|
});
|
|
51
52
|
});
|
|
52
53
|
|
|
54
|
+
it('sends the machine-readable reason of an error that has one, and the same message as any other refusal', async () => {
|
|
55
|
+
let messageHandler: ((event: { data: string }) => void) | undefined;
|
|
56
|
+
const ws = {
|
|
57
|
+
addEventListener: vi.fn((event: string, handler: (event: { data: string }) => void) => {
|
|
58
|
+
if (event === 'message') {
|
|
59
|
+
messageHandler = handler;
|
|
60
|
+
}
|
|
61
|
+
}),
|
|
62
|
+
close: vi.fn(),
|
|
63
|
+
send: vi.fn()
|
|
64
|
+
};
|
|
65
|
+
new ISocket(
|
|
66
|
+
ws as never,
|
|
67
|
+
{
|
|
68
|
+
dbfs: {
|
|
69
|
+
putMany: [
|
|
70
|
+
async () => {
|
|
71
|
+
throw new SyncObjectNotOwnedError('Invalid token claims.');
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
setHash: [
|
|
75
|
+
async () => {
|
|
76
|
+
throw new Error('Invalid token claims.');
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
} as never,
|
|
81
|
+
[],
|
|
82
|
+
{ onClose: vi.fn() }
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
messageHandler?.({ data: JSON.stringify({ request: { id: 1, method: 'dbfs.putMany', payload: {} } }) });
|
|
86
|
+
messageHandler?.({ data: JSON.stringify({ request: { id: 2, method: 'dbfs.setHash', payload: {} } }) });
|
|
87
|
+
|
|
88
|
+
await vi.waitFor(() => expect(ws.send).toHaveBeenCalledTimes(2));
|
|
89
|
+
const [owned, binding] = ws.send.mock.calls.map(([sent]) => JSON.parse(sent as string).response.error);
|
|
90
|
+
expect(owned).toMatchObject({ reason: 'sync_object_not_owned' });
|
|
91
|
+
expect(owned.message).toContain('Invalid token claims.');
|
|
92
|
+
expect(binding.message).toContain('Invalid token claims.');
|
|
93
|
+
expect(binding).not.toHaveProperty('reason');
|
|
94
|
+
});
|
|
95
|
+
|
|
53
96
|
it('clears abort cleanup when a no-response timeout rejects the request', async () => {
|
|
54
97
|
vi.useFakeTimers();
|
|
55
98
|
try {
|
package/src/socket/socket.ts
CHANGED
|
@@ -42,6 +42,8 @@ export interface SocketError {
|
|
|
42
42
|
code: number;
|
|
43
43
|
status?: number;
|
|
44
44
|
stack?: string;
|
|
45
|
+
/** Machine-readable cause for callers that act on it; the message stays the human-facing text. */
|
|
46
|
+
reason?: string;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
// Codes in the 4000s are left available by IETF
|
|
@@ -232,7 +234,12 @@ export class ISocket<ImplementedMethods, CallableMethods, RequestContext extends
|
|
|
232
234
|
status: 'status' in structuredError && typeof structuredError.status === 'number' ? structuredError.status : undefined,
|
|
233
235
|
message: structuredError.message
|
|
234
236
|
}
|
|
235
|
-
: {
|
|
237
|
+
: {
|
|
238
|
+
code: 3,
|
|
239
|
+
message: String(error),
|
|
240
|
+
stack: error instanceof Error ? error.stack : undefined,
|
|
241
|
+
...(error instanceof Error && 'reason' in error && typeof error.reason === 'string' ? { reason: error.reason } : {})
|
|
242
|
+
};
|
|
236
243
|
this.logger.error(JSON.stringify(socketError));
|
|
237
244
|
return this.respondError(message.request.id, socketError, error);
|
|
238
245
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Refusal for a prompt sent from an editor that shows a chat the app no longer
|
|
3
|
+
* has as its active chat. Errors cross the editor socket as plain
|
|
4
|
+
* `{ code, message }` objects, so the editor recognizes this one by its message.
|
|
5
|
+
*/
|
|
6
|
+
export const CHAT_CHANGED_ELSEWHERE_MESSAGE = 'This chat was changed in another session. Reload the editor to continue.';
|
|
7
|
+
|
|
8
|
+
export const isChatChangedElsewhereError = (error: unknown): boolean =>
|
|
9
|
+
typeof error === 'object' &&
|
|
10
|
+
error !== null &&
|
|
11
|
+
'message' in error &&
|
|
12
|
+
typeof error.message === 'string' &&
|
|
13
|
+
error.message.includes(CHAT_CHANGED_ELSEWHERE_MESSAGE);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Refusal for a prompt the editor cannot run until its dev server restarts: the active chat moved the app between
|
|
3
|
+
* live-edit and AgentCore workspace placement, and the sidecar picks Vite or the workspace edge only when it starts.
|
|
4
|
+
* Errors cross the editor socket as plain `{ code, message }` objects, so the editor recognizes this one by its message.
|
|
5
|
+
*/
|
|
6
|
+
export const EDITOR_RESTART_REQUIRED_MESSAGE = 'This chat needs the editor restarted. Restart the dev server, then send your prompt again.';
|
|
7
|
+
|
|
8
|
+
export const isEditorRestartRequiredError = (error: unknown): boolean =>
|
|
9
|
+
typeof error === 'object' &&
|
|
10
|
+
error !== null &&
|
|
11
|
+
'message' in error &&
|
|
12
|
+
typeof error.message === 'string' &&
|
|
13
|
+
error.message.includes(EDITOR_RESTART_REQUIRED_MESSAGE);
|
package/src/types/ai/index.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './native-builder-model.js';
|
|
2
2
|
export * from './builder-caller.js';
|
|
3
|
+
export * from './chat-changed-elsewhere.js';
|
|
4
|
+
export * from './editor-restart-required.js';
|
|
3
5
|
import type { DeploymentTypeEnum, RegionEnum } from '../common/index.js';
|
|
4
6
|
|
|
5
7
|
export type AiChatMessagePayload = Record<string, unknown>;
|