@slates/proto 1.0.0-rc.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/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@slates/proto",
3
+ "version": "1.0.0-rc.1",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "author": "Tobias Herber",
8
+ "license": "Apache 2",
9
+ "type": "module",
10
+ "source": "src/index.ts",
11
+ "exports": {
12
+ "types": "./dist/index.d.ts",
13
+ "require": "./dist/index.cjs",
14
+ "import": "./dist/index.module.js",
15
+ "default": "./dist/index.module.js"
16
+ },
17
+ "main": "./dist/index.cjs",
18
+ "module": "./dist/index.module.js",
19
+ "types": "dist/index.d.ts",
20
+ "unpkg": "./dist/index.umd.js",
21
+ "scripts": {
22
+ "test": "vitest run --passWithNoTests",
23
+ "lint": "prettier src/**/*.ts --check",
24
+ "build": "microbundle"
25
+ },
26
+ "dependencies": {
27
+ "@lowerdeck/emitter": "^1.0.4",
28
+ "@lowerdeck/error": "^1.0.8",
29
+ "@toon-format/toon": "^2.1.0",
30
+ "axios": "^1.13.2",
31
+ "zod": "^4.2.1"
32
+ },
33
+ "devDependencies": {
34
+ "microbundle": "^0.15.1",
35
+ "@slates/tsconfig": "^1.0.0",
36
+ "typescript": "5.8.2",
37
+ "vitest": "^3.1.2"
38
+ }
39
+ }
@@ -0,0 +1 @@
1
+ export * from './provider';
@@ -0,0 +1,162 @@
1
+ import {
2
+ badRequestError,
3
+ internalServerError,
4
+ isServiceError,
5
+ notFoundError,
6
+ validationError
7
+ } from '@lowerdeck/error';
8
+ import z from 'zod';
9
+ import {
10
+ SlatesNotifications,
11
+ slatesNotificationsByMethod,
12
+ SlatesRequests,
13
+ slatesRequestsByMethod,
14
+ SlatesResponsesByMethod
15
+ } from '../messages';
16
+
17
+ export class SlatesProviderProtoHandlerManager {
18
+ #implMap = new Map<
19
+ string,
20
+ {
21
+ type: 'request' | 'notification';
22
+ handler: Function;
23
+ schema: z.ZodType<any>;
24
+ }
25
+ >();
26
+
27
+ onNotification<Method extends SlatesNotifications['method']>(
28
+ method: Method,
29
+ handler: (message: Extract<SlatesNotifications, { method: Method }>) => void
30
+ ) {
31
+ let schema = slatesNotificationsByMethod[method];
32
+ if (!schema) {
33
+ throw new Error(`No schema found for method: ${method}`);
34
+ }
35
+
36
+ this.#implMap.set(method, {
37
+ type: 'notification',
38
+ handler,
39
+ schema
40
+ });
41
+ }
42
+
43
+ onRequest<Method extends SlatesRequests['method']>(
44
+ method: Method,
45
+ cb: (
46
+ message: Extract<SlatesRequests, { method: Method }>
47
+ ) => Promise<SlatesResponsesByMethod[Method]['result']>
48
+ ) {
49
+ let schema = slatesRequestsByMethod[method];
50
+ if (!schema) {
51
+ throw new Error(`No schema found for method: ${method}`);
52
+ }
53
+
54
+ this.#implMap.set(method, {
55
+ type: 'request',
56
+ handler: cb,
57
+ schema
58
+ });
59
+ }
60
+
61
+ private async _handleInput(input: SlatesNotifications | SlatesRequests) {
62
+ try {
63
+ if (typeof input !== 'object' || input === null) {
64
+ return {
65
+ jsonrpc: '2.0' as const,
66
+ id: (input as any).id,
67
+ error: badRequestError({ message: 'Invalid input' })
68
+ };
69
+ }
70
+
71
+ if (input.jsonrpc !== '2.0') {
72
+ return {
73
+ jsonrpc: '2.0' as const,
74
+ id: (input as any).id,
75
+ error: badRequestError({ message: 'Invalid jsonrpc version' })
76
+ };
77
+ }
78
+
79
+ let method = input.method;
80
+ if (typeof method !== 'string') {
81
+ return {
82
+ jsonrpc: '2.0' as const,
83
+ id: (input as any).id,
84
+ error: badRequestError({ message: 'Invalid or missing method' })
85
+ };
86
+ }
87
+
88
+ let impl = this.#implMap.get(input.method);
89
+ if (!impl) {
90
+ return {
91
+ jsonrpc: '2.0' as const,
92
+ id: (input as any).id,
93
+ error: notFoundError('handler', input.method)
94
+ };
95
+ }
96
+
97
+ let parsed = impl.schema.safeParse(input);
98
+ if (!parsed.success) {
99
+ return {
100
+ jsonrpc: '2.0' as const,
101
+ id: (input as any).id,
102
+ error: validationError({
103
+ entity: 'request',
104
+ message: 'Invalid request parameters',
105
+ errors: parsed.error.issues.map(i => ({
106
+ ...i,
107
+ path: i.path.map(p => String(p))
108
+ }))
109
+ })
110
+ };
111
+ }
112
+
113
+ if (impl.type === 'notification') {
114
+ await impl.handler(parsed.data);
115
+ return;
116
+ }
117
+
118
+ let result = await impl.handler(parsed.data);
119
+
120
+ return {
121
+ jsonrpc: '2.0' as const,
122
+ id: parsed.data.id,
123
+ result
124
+ };
125
+ } catch (err) {
126
+ if (isServiceError(err)) {
127
+ return {
128
+ jsonrpc: '2.0' as const,
129
+ id: (input as any).id,
130
+ error: err
131
+ };
132
+ }
133
+
134
+ console.error(err);
135
+
136
+ return {
137
+ jsonrpc: '2.0' as const,
138
+ id: (input as any).id,
139
+ error: internalServerError({ message: 'Internal server error' })
140
+ };
141
+ }
142
+ }
143
+
144
+ static async handleInput(
145
+ manager: SlatesProviderProtoHandlerManager,
146
+ input: SlatesNotifications | SlatesRequests
147
+ ) {
148
+ return manager._handleInput(input);
149
+ }
150
+ }
151
+
152
+ export let createSlatesProviderProtoHandler = (
153
+ cb: (manager: SlatesProviderProtoHandlerManager) => Promise<void>
154
+ ) => ({
155
+ run: async () => {
156
+ let manager = new SlatesProviderProtoHandlerManager();
157
+
158
+ await cb(manager);
159
+
160
+ return manager;
161
+ }
162
+ });
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './handler';
2
+ export * from './messages';
3
+ export * from './types';
@@ -0,0 +1,283 @@
1
+ import z from 'zod';
2
+ import { slatesAction } from '../types';
3
+
4
+ /**
5
+ * List Actions
6
+ */
7
+ export let slatesMessageActionsListRequest = z.object({
8
+ jsonrpc: z.literal('2.0'),
9
+ method: z.literal('slates/actions.list'),
10
+ id: z.string(),
11
+ params: z.object({})
12
+ });
13
+
14
+ export type SlatesMessageActionsListRequest = z.infer<typeof slatesMessageActionsListRequest>;
15
+
16
+ export let slatesMessageActionsListResponse = z.object({
17
+ jsonrpc: z.literal('2.0'),
18
+ id: z.string(),
19
+ result: z.object({
20
+ actions: z.array(slatesAction)
21
+ })
22
+ });
23
+
24
+ export type SlatesMessageActionsListResponse = z.infer<
25
+ typeof slatesMessageActionsListResponse
26
+ >;
27
+
28
+ /**
29
+ * Get Action
30
+ */
31
+ export let slatesMessageActionGetRequest = z.object({
32
+ jsonrpc: z.literal('2.0'),
33
+ method: z.literal('slates/action.get'),
34
+ id: z.string(),
35
+ params: z.object({
36
+ actionId: z.string()
37
+ })
38
+ });
39
+
40
+ export type SlatesMessageActionGetRequest = z.infer<typeof slatesMessageActionGetRequest>;
41
+
42
+ export let slatesMessageActionGetResponse = z.object({
43
+ jsonrpc: z.literal('2.0'),
44
+ id: z.string(),
45
+ result: z.object({
46
+ action: slatesAction
47
+ })
48
+ });
49
+
50
+ export type SlatesMessageActionGetResponse = z.infer<typeof slatesMessageActionGetResponse>;
51
+
52
+ /**
53
+ * Invoke Action
54
+ */
55
+ export let slatesMessageActionInvokeRequest = z.object({
56
+ jsonrpc: z.literal('2.0'),
57
+ method: z.literal('slates/action.tool.invoke'),
58
+ id: z.string(),
59
+ params: z.object({
60
+ actionId: z.string(),
61
+ input: z.record(z.string(), z.any())
62
+ })
63
+ });
64
+
65
+ export type SlatesMessageActionInvokeRequest = z.infer<
66
+ typeof slatesMessageActionInvokeRequest
67
+ >;
68
+
69
+ export let slatesMessageActionInvokeResponse = z.object({
70
+ jsonrpc: z.literal('2.0'),
71
+ id: z.string(),
72
+ result: z.object({
73
+ output: z.record(z.string(), z.any()),
74
+ message: z.string().optional()
75
+ })
76
+ });
77
+
78
+ export type SlatesMessageActionInvokeResponse = z.infer<
79
+ typeof slatesMessageActionInvokeResponse
80
+ >;
81
+
82
+ /**
83
+ * Map Trigger Event
84
+ */
85
+ export let slatesMessageActionTriggerEventMapRequest = z.object({
86
+ jsonrpc: z.literal('2.0'),
87
+ method: z.literal('slates/action.trigger.map_event'),
88
+ id: z.string(),
89
+ params: z.object({
90
+ actionId: z.string(),
91
+ input: z.record(z.string(), z.any())
92
+ })
93
+ });
94
+
95
+ export type SlatesMessageActionTriggerEventMapRequest = z.infer<
96
+ typeof slatesMessageActionTriggerEventMapRequest
97
+ >;
98
+
99
+ export let slatesMessageActionTriggerEventMapResponse = z.object({
100
+ jsonrpc: z.literal('2.0'),
101
+ id: z.string(),
102
+ result: z.object({
103
+ type: z.string(),
104
+ id: z.string(),
105
+ output: z.record(z.string(), z.any())
106
+ })
107
+ });
108
+
109
+ export type SlatesMessageActionTriggerEventMapResponse = z.infer<
110
+ typeof slatesMessageActionTriggerEventMapResponse
111
+ >;
112
+
113
+ /**
114
+ * Poll Trigger Events
115
+ */
116
+ export let slatesMessageActionTriggerEventsPollRequest = z.object({
117
+ jsonrpc: z.literal('2.0'),
118
+ method: z.literal('slates/action.trigger.poll_events'),
119
+ id: z.string(),
120
+ params: z.object({
121
+ actionId: z.string(),
122
+ state: z.any().nullable()
123
+ })
124
+ });
125
+
126
+ export type SlatesMessageActionTriggerEventsPollRequest = z.infer<
127
+ typeof slatesMessageActionTriggerEventsPollRequest
128
+ >;
129
+
130
+ export let slatesMessageActionTriggerEventsPollResponse = z.object({
131
+ jsonrpc: z.literal('2.0'),
132
+ id: z.string(),
133
+ result: z.object({
134
+ inputs: z.array(z.record(z.string(), z.any())),
135
+ updatedState: z.any().nullable().optional()
136
+ })
137
+ });
138
+
139
+ export type SlatesMessageActionTriggerEventsPollResponse = z.infer<
140
+ typeof slatesMessageActionTriggerEventsPollResponse
141
+ >;
142
+
143
+ /**
144
+ * Handle Webhook Request
145
+ */
146
+ export let slatesMessageActionTriggerWebhookHandleRequest = z.object({
147
+ jsonrpc: z.literal('2.0'),
148
+ method: z.literal('slates/action.trigger.webhook_handle'),
149
+ id: z.string(),
150
+ params: z.object({
151
+ actionId: z.string(),
152
+ url: z.string(),
153
+ method: z.string(),
154
+ headers: z.record(z.string(), z.string()),
155
+ body: z
156
+ .object({
157
+ encoding: z.literal('base64'),
158
+ content: z.string()
159
+ })
160
+ .nullable(),
161
+ state: z.any().nullable()
162
+ })
163
+ });
164
+
165
+ export type SlatesMessageActionTriggerWebhookHandleRequest = z.infer<
166
+ typeof slatesMessageActionTriggerWebhookHandleRequest
167
+ >;
168
+
169
+ export let slatesMessageActionTriggerWebhookHandleResponse = z.object({
170
+ jsonrpc: z.literal('2.0'),
171
+ id: z.string(),
172
+ result: z.object({
173
+ inputs: z.array(z.record(z.string(), z.any())),
174
+ updatedState: z.any().nullable().optional()
175
+ })
176
+ });
177
+
178
+ export type SlatesMessageActionTriggerWebhookHandleResponse = z.infer<
179
+ typeof slatesMessageActionTriggerWebhookHandleResponse
180
+ >;
181
+
182
+ /**
183
+ * Handle Webhook Registration
184
+ */
185
+ export let slatesMessageActionTriggerWebhookRegisterRequest = z.object({
186
+ jsonrpc: z.literal('2.0'),
187
+ method: z.literal('slates/action.trigger.webhook_register'),
188
+ id: z.string(),
189
+ params: z.object({
190
+ actionId: z.string(),
191
+ webhookBaseUrl: z.string()
192
+ })
193
+ });
194
+
195
+ export type SlatesMessageActionTriggerWebhookRegisterRequest = z.infer<
196
+ typeof slatesMessageActionTriggerWebhookRegisterRequest
197
+ >;
198
+
199
+ export let slatesMessageActionTriggerWebhookRegisterResponse = z.object({
200
+ jsonrpc: z.literal('2.0'),
201
+ id: z.string(),
202
+ result: z.object({
203
+ registrationDetails: z.any(),
204
+ state: z.any().optional()
205
+ })
206
+ });
207
+
208
+ export type SlatesMessageActionTriggerWebhookRegisterResponse = z.infer<
209
+ typeof slatesMessageActionTriggerWebhookRegisterResponse
210
+ >;
211
+
212
+ /**
213
+ * Handle Webhook Unregistration
214
+ */
215
+ export let slatesMessageActionTriggerWebhookUnregisterRequest = z.object({
216
+ jsonrpc: z.literal('2.0'),
217
+ method: z.literal('slates/action.trigger.webhook_unregister'),
218
+ id: z.string(),
219
+ params: z.object({
220
+ actionId: z.string(),
221
+ webhookBaseUrl: z.string(),
222
+ registrationDetails: z.any(),
223
+ state: z.any().optional()
224
+ })
225
+ });
226
+
227
+ export type SlatesMessageActionTriggerWebhookUnregisterRequest = z.infer<
228
+ typeof slatesMessageActionTriggerWebhookUnregisterRequest
229
+ >;
230
+
231
+ export let slatesMessageActionTriggerWebhookUnregisterResponse = z.object({
232
+ jsonrpc: z.literal('2.0'),
233
+ id: z.string(),
234
+ result: z.object({})
235
+ });
236
+
237
+ export type SlatesMessageActionTriggerWebhookUnregisterResponse = z.infer<
238
+ typeof slatesMessageActionTriggerWebhookUnregisterResponse
239
+ >;
240
+
241
+ export type SlatesActionRequests =
242
+ | SlatesMessageActionsListRequest
243
+ | SlatesMessageActionGetRequest
244
+ | SlatesMessageActionInvokeRequest
245
+ | SlatesMessageActionTriggerEventMapRequest
246
+ | SlatesMessageActionTriggerEventsPollRequest
247
+ | SlatesMessageActionTriggerWebhookHandleRequest
248
+ | SlatesMessageActionTriggerWebhookRegisterRequest
249
+ | SlatesMessageActionTriggerWebhookUnregisterRequest;
250
+
251
+ export type SlatesActionResponses =
252
+ | SlatesMessageActionsListResponse
253
+ | SlatesMessageActionGetResponse
254
+ | SlatesMessageActionInvokeResponse
255
+ | SlatesMessageActionTriggerEventMapResponse
256
+ | SlatesMessageActionTriggerEventsPollResponse
257
+ | SlatesMessageActionTriggerWebhookHandleResponse
258
+ | SlatesMessageActionTriggerWebhookRegisterResponse
259
+ | SlatesMessageActionTriggerWebhookUnregisterResponse;
260
+
261
+ export let slatesActionResponsesByMethod = {
262
+ 'slates/actions.list': slatesMessageActionsListResponse,
263
+ 'slates/action.get': slatesMessageActionGetResponse,
264
+ 'slates/action.tool.invoke': slatesMessageActionInvokeResponse,
265
+ 'slates/action.trigger.map_event': slatesMessageActionTriggerEventMapResponse,
266
+ 'slates/action.trigger.poll_events': slatesMessageActionTriggerEventsPollResponse,
267
+ 'slates/action.trigger.webhook_handle': slatesMessageActionTriggerWebhookHandleResponse,
268
+ 'slates/action.trigger.webhook_register': slatesMessageActionTriggerWebhookRegisterResponse,
269
+ 'slates/action.trigger.webhook_unregister':
270
+ slatesMessageActionTriggerWebhookUnregisterResponse
271
+ };
272
+
273
+ export let slatesActionRequestsByMethod = {
274
+ 'slates/actions.list': slatesMessageActionsListRequest,
275
+ 'slates/action.get': slatesMessageActionGetRequest,
276
+ 'slates/action.tool.invoke': slatesMessageActionInvokeRequest,
277
+ 'slates/action.trigger.map_event': slatesMessageActionTriggerEventMapRequest,
278
+ 'slates/action.trigger.poll_events': slatesMessageActionTriggerEventsPollRequest,
279
+ 'slates/action.trigger.webhook_handle': slatesMessageActionTriggerWebhookHandleRequest,
280
+ 'slates/action.trigger.webhook_register': slatesMessageActionTriggerWebhookRegisterRequest,
281
+ 'slates/action.trigger.webhook_unregister':
282
+ slatesMessageActionTriggerWebhookUnregisterRequest
283
+ };
@@ -0,0 +1,354 @@
1
+ import z from 'zod';
2
+ import { slatesAuthenticationMethod } from '../types';
3
+
4
+ /**
5
+ * Set Authentication
6
+ */
7
+ export let slatesMessageSetAuthNotification = z.object({
8
+ jsonrpc: z.literal('2.0'),
9
+ method: z.literal('slates/auth.set'),
10
+ params: z.object({
11
+ authenticationMethodId: z.string(),
12
+ output: z.record(z.string(), z.any())
13
+ })
14
+ });
15
+
16
+ export type SlatesMessageSetAuthNotification = z.infer<
17
+ typeof slatesMessageSetAuthNotification
18
+ >;
19
+
20
+ /**
21
+ * List Authentication Methods
22
+ */
23
+ export let slatesMessageAuthMethodsListRequest = z.object({
24
+ jsonrpc: z.literal('2.0'),
25
+ method: z.literal('slates/auth.methods.list'),
26
+ id: z.string(),
27
+ params: z.object({})
28
+ });
29
+
30
+ export type SlatesMessageAuthMethodsListRequest = z.infer<
31
+ typeof slatesMessageAuthMethodsListRequest
32
+ >;
33
+
34
+ export let slatesMessageAuthMethodsListResponse = z.object({
35
+ jsonrpc: z.literal('2.0'),
36
+ id: z.string(),
37
+ result: z.object({
38
+ authenticationMethods: z.array(slatesAuthenticationMethod)
39
+ })
40
+ });
41
+
42
+ export type SlatesMessageAuthMethodsListResponse = z.infer<
43
+ typeof slatesMessageAuthMethodsListResponse
44
+ >;
45
+
46
+ /**
47
+ * Get Authentication Method
48
+ */
49
+ export let slatesMessageAuthMethodGetRequest = z.object({
50
+ jsonrpc: z.literal('2.0'),
51
+ method: z.literal('slates/auth.method.get'),
52
+ id: z.string(),
53
+ params: z.object({
54
+ authenticationMethodId: z.string()
55
+ })
56
+ });
57
+
58
+ export type SlatesMessageAuthMethodGetRequest = z.infer<
59
+ typeof slatesMessageAuthMethodGetRequest
60
+ >;
61
+
62
+ export let slatesMessageAuthMethodGetResponse = z.object({
63
+ jsonrpc: z.literal('2.0'),
64
+ id: z.string(),
65
+ result: z.object({
66
+ authenticationMethod: slatesAuthenticationMethod
67
+ })
68
+ });
69
+
70
+ export type SlatesMessageAuthMethodGetResponse = z.infer<
71
+ typeof slatesMessageAuthMethodGetResponse
72
+ >;
73
+
74
+ /**
75
+ * Authentication Input Changed
76
+ */
77
+ export let slatesMessageAuthInputChangedRequest = z.object({
78
+ jsonrpc: z.literal('2.0'),
79
+ method: z.literal('slates/auth.input.changed'),
80
+ id: z.string(),
81
+ params: z.object({
82
+ authenticationMethodId: z.string(),
83
+ previousInput: z.record(z.string(), z.any()).nullable(),
84
+ newInput: z.record(z.string(), z.any())
85
+ })
86
+ });
87
+
88
+ export type SlatesMessageAuthInputChangedRequest = z.infer<
89
+ typeof slatesMessageAuthInputChangedRequest
90
+ >;
91
+
92
+ export let slatesMessageAuthInputChangedResponse = z.object({
93
+ jsonrpc: z.literal('2.0'),
94
+ id: z.string(),
95
+ result: z.object({
96
+ input: z.record(z.string(), z.any()).optional()
97
+ })
98
+ });
99
+
100
+ export type SlatesMessageAuthInputChangedResponse = z.infer<
101
+ typeof slatesMessageAuthInputChangedResponse
102
+ >;
103
+
104
+ /**
105
+ * Get Default Inputs
106
+ */
107
+ export let slatesMessageAuthDefaultInputGetRequest = z.object({
108
+ jsonrpc: z.literal('2.0'),
109
+ method: z.literal('slates/auth.input.get_default'),
110
+ id: z.string(),
111
+ params: z.object({
112
+ authenticationMethodId: z.string()
113
+ })
114
+ });
115
+
116
+ export type SlatesMessageAuthDefaultInputGetRequest = z.infer<
117
+ typeof slatesMessageAuthDefaultInputGetRequest
118
+ >;
119
+
120
+ export let slatesMessageAuthDefaultInputGetResponse = z.object({
121
+ jsonrpc: z.literal('2.0'),
122
+ id: z.string(),
123
+ result: z.object({
124
+ input: z.record(z.string(), z.any())
125
+ })
126
+ });
127
+
128
+ export type SlatesMessageAuthDefaultInputGetResponse = z.infer<
129
+ typeof slatesMessageAuthDefaultInputGetResponse
130
+ >;
131
+
132
+ /**
133
+ * Get Authorization Url
134
+ */
135
+ export let slatesMessageAuthAuthorizationUrlGetRequest = z.object({
136
+ jsonrpc: z.literal('2.0'),
137
+ method: z.literal('slates/auth.authorization_url.get'),
138
+ id: z.string(),
139
+ params: z.object({
140
+ authenticationMethodId: z.string(),
141
+
142
+ redirectUri: z.string(),
143
+ state: z.string(),
144
+ input: z.record(z.string(), z.any()),
145
+ clientId: z.string(),
146
+ clientSecret: z.string(),
147
+ scopes: z.array(z.string())
148
+ })
149
+ });
150
+
151
+ export type SlatesMessageAuthAuthorizationUrlGetRequest = z.infer<
152
+ typeof slatesMessageAuthAuthorizationUrlGetRequest
153
+ >;
154
+
155
+ export let slatesMessageAuthAuthorizationUrlGetResponse = z.object({
156
+ jsonrpc: z.literal('2.0'),
157
+ id: z.string(),
158
+ result: z.object({
159
+ authorizationUrl: z.string(),
160
+ input: z.record(z.string(), z.any()).optional()
161
+ })
162
+ });
163
+
164
+ export type SlatesMessageAuthAuthorizationUrlGetResponse = z.infer<
165
+ typeof slatesMessageAuthAuthorizationUrlGetResponse
166
+ >;
167
+
168
+ /**
169
+ * Handle Authorization Callback
170
+ */
171
+ export let slatesMessageAuthAuthorizationCallbackHandleRequest = z.object({
172
+ jsonrpc: z.literal('2.0'),
173
+ method: z.literal('slates/auth.authorization_callback.handle'),
174
+ id: z.string(),
175
+ params: z.object({
176
+ authenticationMethodId: z.string(),
177
+
178
+ code: z.string(),
179
+ state: z.string(),
180
+ redirectUri: z.string(),
181
+ input: z.record(z.string(), z.any()),
182
+ clientId: z.string(),
183
+ clientSecret: z.string(),
184
+ scopes: z.array(z.string())
185
+ })
186
+ });
187
+
188
+ export type SlatesMessageAuthAuthorizationCallbackHandleRequest = z.infer<
189
+ typeof slatesMessageAuthAuthorizationCallbackHandleRequest
190
+ >;
191
+
192
+ export let slatesMessageAuthAuthorizationCallbackHandleResponse = z.object({
193
+ jsonrpc: z.literal('2.0'),
194
+ id: z.string(),
195
+ result: z.object({
196
+ output: z.record(z.string(), z.any()),
197
+ input: z.record(z.string(), z.any()).optional()
198
+ })
199
+ });
200
+
201
+ export type SlatesMessageAuthAuthorizationCallbackHandleResponse = z.infer<
202
+ typeof slatesMessageAuthAuthorizationCallbackHandleResponse
203
+ >;
204
+
205
+ /**
206
+ * Handle Token Refresh
207
+ */
208
+ export let slatesMessageAuthTokenRefreshHandleRequest = z.object({
209
+ jsonrpc: z.literal('2.0'),
210
+ method: z.literal('slates/auth.token_refresh.handle'),
211
+ id: z.string(),
212
+ params: z.object({
213
+ authenticationMethodId: z.string(),
214
+
215
+ output: z.record(z.string(), z.any()),
216
+ input: z.record(z.string(), z.any()),
217
+ clientId: z.string(),
218
+ clientSecret: z.string(),
219
+ scopes: z.array(z.string())
220
+ })
221
+ });
222
+
223
+ export type SlatesMessageAuthTokenRefreshHandleRequest = z.infer<
224
+ typeof slatesMessageAuthTokenRefreshHandleRequest
225
+ >;
226
+
227
+ export let slatesMessageAuthTokenRefreshHandleResponse = z.object({
228
+ jsonrpc: z.literal('2.0'),
229
+ id: z.string(),
230
+ result: z.object({
231
+ output: z.record(z.string(), z.any()),
232
+ input: z.record(z.string(), z.any()).optional()
233
+ })
234
+ });
235
+
236
+ export type SlatesMessageAuthTokenRefreshHandleResponse = z.infer<
237
+ typeof slatesMessageAuthTokenRefreshHandleResponse
238
+ >;
239
+
240
+ /**
241
+ * Get Profile
242
+ */
243
+ export let slatesMessageAuthProfileGetRequest = z.object({
244
+ jsonrpc: z.literal('2.0'),
245
+ method: z.literal('slates/auth.profile.get'),
246
+ id: z.string(),
247
+ params: z.object({
248
+ authenticationMethodId: z.string(),
249
+
250
+ output: z.record(z.string(), z.any()),
251
+ input: z.record(z.string(), z.any()),
252
+ scopes: z.array(z.string())
253
+ })
254
+ });
255
+
256
+ export type SlatesMessageAuthProfileGetRequest = z.infer<
257
+ typeof slatesMessageAuthProfileGetRequest
258
+ >;
259
+
260
+ export let slatesMessageAuthProfileGetResponse = z.object({
261
+ jsonrpc: z.literal('2.0'),
262
+ id: z.string(),
263
+ result: z.object({
264
+ profile: z.record(z.string(), z.any())
265
+ })
266
+ });
267
+
268
+ export type SlatesMessageAuthProfileGetResponse = z.infer<
269
+ typeof slatesMessageAuthProfileGetResponse
270
+ >;
271
+
272
+ /**
273
+ * Get Auth Output
274
+ */
275
+ export let slatesMessageAuthOutputGetRequest = z.object({
276
+ jsonrpc: z.literal('2.0'),
277
+ method: z.literal('slates/auth.output.get'),
278
+ id: z.string(),
279
+ params: z.object({
280
+ authenticationMethodId: z.string(),
281
+
282
+ input: z.record(z.string(), z.any())
283
+ })
284
+ });
285
+
286
+ export type SlatesMessageAuthOutputGetRequest = z.infer<
287
+ typeof slatesMessageAuthOutputGetRequest
288
+ >;
289
+
290
+ export let slatesMessageAuthOutputGetResponse = z.object({
291
+ jsonrpc: z.literal('2.0'),
292
+ id: z.string(),
293
+ result: z.object({
294
+ output: z.record(z.string(), z.any())
295
+ })
296
+ });
297
+
298
+ export type SlatesMessageAuthOutputGetResponse = z.infer<
299
+ typeof slatesMessageAuthOutputGetResponse
300
+ >;
301
+
302
+ export type SlatesAuthRequests =
303
+ | SlatesMessageAuthMethodsListRequest
304
+ | SlatesMessageAuthMethodGetRequest
305
+ | SlatesMessageAuthInputChangedRequest
306
+ | SlatesMessageAuthDefaultInputGetRequest
307
+ | SlatesMessageAuthAuthorizationUrlGetRequest
308
+ | SlatesMessageAuthAuthorizationCallbackHandleRequest
309
+ | SlatesMessageAuthTokenRefreshHandleRequest
310
+ | SlatesMessageAuthProfileGetRequest
311
+ | SlatesMessageAuthOutputGetRequest;
312
+
313
+ export type SlatesAuthResponses =
314
+ | SlatesMessageAuthMethodsListResponse
315
+ | SlatesMessageAuthMethodGetResponse
316
+ | SlatesMessageAuthInputChangedResponse
317
+ | SlatesMessageAuthDefaultInputGetResponse
318
+ | SlatesMessageAuthAuthorizationUrlGetResponse
319
+ | SlatesMessageAuthAuthorizationCallbackHandleResponse
320
+ | SlatesMessageAuthTokenRefreshHandleResponse
321
+ | SlatesMessageAuthProfileGetResponse
322
+ | SlatesMessageAuthOutputGetResponse;
323
+
324
+ export type SlatesAuthNotifications = SlatesMessageSetAuthNotification;
325
+
326
+ export let slatesAuthResponsesByMethod = {
327
+ 'slates/auth.methods.list': slatesMessageAuthMethodsListResponse,
328
+ 'slates/auth.method.get': slatesMessageAuthMethodGetResponse,
329
+ 'slates/auth.input.changed': slatesMessageAuthInputChangedResponse,
330
+ 'slates/auth.input.get_default': slatesMessageAuthDefaultInputGetResponse,
331
+ 'slates/auth.authorization_url.get': slatesMessageAuthAuthorizationUrlGetResponse,
332
+ 'slates/auth.authorization_callback.handle':
333
+ slatesMessageAuthAuthorizationCallbackHandleResponse,
334
+ 'slates/auth.token_refresh.handle': slatesMessageAuthTokenRefreshHandleResponse,
335
+ 'slates/auth.profile.get': slatesMessageAuthProfileGetResponse,
336
+ 'slates/auth.output.get': slatesMessageAuthOutputGetResponse
337
+ };
338
+
339
+ export let slatesAuthRequestsByMethod = {
340
+ 'slates/auth.methods.list': slatesMessageAuthMethodsListRequest,
341
+ 'slates/auth.method.get': slatesMessageAuthMethodGetRequest,
342
+ 'slates/auth.input.changed': slatesMessageAuthInputChangedRequest,
343
+ 'slates/auth.input.get_default': slatesMessageAuthDefaultInputGetRequest,
344
+ 'slates/auth.authorization_url.get': slatesMessageAuthAuthorizationUrlGetRequest,
345
+ 'slates/auth.authorization_callback.handle':
346
+ slatesMessageAuthAuthorizationCallbackHandleRequest,
347
+ 'slates/auth.token_refresh.handle': slatesMessageAuthTokenRefreshHandleRequest,
348
+ 'slates/auth.profile.get': slatesMessageAuthProfileGetRequest,
349
+ 'slates/auth.output.get': slatesMessageAuthOutputGetRequest
350
+ };
351
+
352
+ export let slatesAuthNotificationsByMethod = {
353
+ 'slates/auth.set': slatesMessageSetAuthNotification
354
+ };
@@ -0,0 +1,134 @@
1
+ import z from 'zod';
2
+
3
+ /**
4
+ * Set Config
5
+ */
6
+ export let slatesMessageSetConfigNotification = z.object({
7
+ jsonrpc: z.literal('2.0'),
8
+ method: z.literal('slates/config.set'),
9
+ params: z.object({
10
+ config: z.record(z.string(), z.any())
11
+ })
12
+ });
13
+
14
+ export type SlatesMessageSetConfigNotification = z.infer<
15
+ typeof slatesMessageSetConfigNotification
16
+ >;
17
+
18
+ /**
19
+ * Get Config Schema
20
+ */
21
+ export let slatesMessageConfigSchemaGetRequest = z.object({
22
+ jsonrpc: z.literal('2.0'),
23
+ method: z.literal('slates/config.schema.get'),
24
+ id: z.string(),
25
+ params: z.object({})
26
+ });
27
+
28
+ export type SlatesMessageConfigSchemaGetRequest = z.infer<
29
+ typeof slatesMessageConfigSchemaGetRequest
30
+ >;
31
+
32
+ export let slatesMessageConfigSchemaGetResponse = z.object({
33
+ jsonrpc: z.literal('2.0'),
34
+ id: z.string(),
35
+ result: z.object({
36
+ schema: z.record(z.string(), z.any())
37
+ })
38
+ });
39
+
40
+ export type SlatesMessageConfigSchemaGetResponse = z.infer<
41
+ typeof slatesMessageConfigSchemaGetResponse
42
+ >;
43
+
44
+ /**
45
+ * Config Changed
46
+ */
47
+ export let slatesMessageConfigChangedRequest = z.object({
48
+ jsonrpc: z.literal('2.0'),
49
+ method: z.literal('slates/config.changed'),
50
+ params: z.object({
51
+ previousConfig: z.record(z.string(), z.any()).nullable(),
52
+ newConfig: z.record(z.string(), z.any())
53
+ })
54
+ });
55
+
56
+ export type SlatesMessageConfigChangedRequest = z.infer<
57
+ typeof slatesMessageConfigChangedRequest
58
+ >;
59
+
60
+ export let slatesMessageConfigChangedResponse = z.object({
61
+ jsonrpc: z.literal('2.0'),
62
+ id: z.string(),
63
+ result: z.object({
64
+ success: z.boolean(),
65
+ config: z.record(z.string(), z.any()).optional(),
66
+ errors: z
67
+ .array(
68
+ z.object({
69
+ code: z.string(),
70
+ message: z.string(),
71
+ path: z.array(z.string()).optional()
72
+ })
73
+ )
74
+ .optional()
75
+ })
76
+ });
77
+
78
+ export type SlatesMessageConfigChangedResponse = z.infer<
79
+ typeof slatesMessageConfigChangedResponse
80
+ >;
81
+
82
+ /**
83
+ * Get Default Config
84
+ */
85
+ export let slatesMessageConfigDefaultGetRequest = z.object({
86
+ jsonrpc: z.literal('2.0'),
87
+ method: z.literal('slates/config.get_default'),
88
+ id: z.string(),
89
+ params: z.object({})
90
+ });
91
+
92
+ export type SlatesMessageConfigDefaultGetRequest = z.infer<
93
+ typeof slatesMessageConfigDefaultGetRequest
94
+ >;
95
+
96
+ export let slatesMessageConfigDefaultGetResponse = z.object({
97
+ jsonrpc: z.literal('2.0'),
98
+ id: z.string(),
99
+ result: z.object({
100
+ config: z.record(z.string(), z.any()).nullable()
101
+ })
102
+ });
103
+
104
+ export type SlatesMessageConfigDefaultGetResponse = z.infer<
105
+ typeof slatesMessageConfigDefaultGetResponse
106
+ >;
107
+
108
+ export type SlatesConfigRequests =
109
+ | SlatesMessageConfigSchemaGetRequest
110
+ | SlatesMessageConfigDefaultGetRequest
111
+ | SlatesMessageConfigChangedRequest;
112
+
113
+ export type SlatesConfigResponses =
114
+ | SlatesMessageConfigSchemaGetResponse
115
+ | SlatesMessageConfigDefaultGetResponse
116
+ | SlatesMessageConfigChangedResponse;
117
+
118
+ export type SlatesConfigNotifications = SlatesMessageSetConfigNotification;
119
+
120
+ export let slatesConfigResponsesByMethod = {
121
+ 'slates/config.schema.get': slatesMessageConfigSchemaGetResponse,
122
+ 'slates/config.get_default': slatesMessageConfigDefaultGetResponse,
123
+ 'slates/config.changed': slatesMessageConfigChangedResponse
124
+ };
125
+
126
+ export let slatesConfigRequestsByMethod = {
127
+ 'slates/config.schema.get': slatesMessageConfigSchemaGetRequest,
128
+ 'slates/config.get_default': slatesMessageConfigDefaultGetRequest,
129
+ 'slates/config.changed': slatesMessageConfigChangedRequest
130
+ };
131
+
132
+ export let slatesConfigNotificationsByMethod = {
133
+ 'slates/config.set': slatesMessageSetConfigNotification
134
+ };
@@ -0,0 +1,48 @@
1
+ import z from 'zod';
2
+ import { slatesParticipant } from '../types';
3
+
4
+ export let slatesMessageHelloNotification = z.object({
5
+ jsonrpc: z.literal('2.0'),
6
+ method: z.literal('slates/hello'),
7
+ params: z.object({
8
+ protocol: z.literal('slates@2026-01-01')
9
+ })
10
+ });
11
+
12
+ export type SlatesMessageHelloNotification = z.infer<typeof slatesMessageHelloNotification>;
13
+
14
+ export let slatesMessageSetParticipantsNotification = z.object({
15
+ jsonrpc: z.literal('2.0'),
16
+ method: z.literal('slates/participant.set'),
17
+ params: z.object({
18
+ participants: z.array(slatesParticipant)
19
+ })
20
+ });
21
+
22
+ export type SlatesMessageSetParticipantsNotification = z.infer<
23
+ typeof slatesMessageSetParticipantsNotification
24
+ >;
25
+
26
+ export let slatesMessageSessionStartNotification = z.object({
27
+ jsonrpc: z.literal('2.0'),
28
+ method: z.literal('slates/session.start'),
29
+ params: z.object({
30
+ sessionId: z.string(),
31
+ state: z.record(z.string(), z.any())
32
+ })
33
+ });
34
+
35
+ export type SlatesMessageSessionStartNotification = z.infer<
36
+ typeof slatesMessageSessionStartNotification
37
+ >;
38
+
39
+ export type SlatesControlFlowNotifications =
40
+ | SlatesMessageHelloNotification
41
+ | SlatesMessageSetParticipantsNotification
42
+ | SlatesMessageSessionStartNotification;
43
+
44
+ export let slatesControlFlowNotificationsByMethod = {
45
+ 'slates/hello': slatesMessageHelloNotification,
46
+ 'slates/participant.set': slatesMessageSetParticipantsNotification,
47
+ 'slates/session.start': slatesMessageSessionStartNotification
48
+ };
@@ -0,0 +1,43 @@
1
+ import z from 'zod';
2
+
3
+ export let slatesMessageProviderIdentifyRequest = z.object({
4
+ jsonrpc: z.literal('2.0'),
5
+ method: z.literal('slates/provider.identify'),
6
+ params: z.object({})
7
+ });
8
+
9
+ export type SlatesMessageProviderIdentifyRequest = z.infer<
10
+ typeof slatesMessageProviderIdentifyRequest
11
+ >;
12
+
13
+ export let slatesMessageProviderIdentifyResponse = z.object({
14
+ jsonrpc: z.literal('2.0'),
15
+ id: z.string(),
16
+ result: z.object({
17
+ protocol: z.literal('slates@2026-01-01'),
18
+
19
+ provider: z.object({
20
+ type: z.literal('provider'),
21
+ id: z.string(),
22
+ name: z.string(),
23
+ description: z.string().optional(),
24
+ metadata: z.record(z.string(), z.any()).optional()
25
+ })
26
+ })
27
+ });
28
+
29
+ export type SlatesMessageProviderIdentifyResponse = z.infer<
30
+ typeof slatesMessageProviderIdentifyResponse
31
+ >;
32
+
33
+ export type SlatesIdentifyRequests = SlatesMessageProviderIdentifyRequest;
34
+
35
+ export type SlatesIdentifyResponses = SlatesMessageProviderIdentifyResponse;
36
+
37
+ export let slatesIdentifyResponsesByMethod = {
38
+ 'slates/provider.identify': slatesMessageProviderIdentifyResponse
39
+ };
40
+
41
+ export let slatesIdentifyRequestsByMethod = {
42
+ 'slates/provider.identify': slatesMessageProviderIdentifyRequest
43
+ };
@@ -0,0 +1,86 @@
1
+ export * from './action';
2
+ export * from './auth';
3
+ export * from './config';
4
+ export * from './controlFlow';
5
+ export * from './identify';
6
+ export * from './log';
7
+
8
+ import { z } from 'zod';
9
+ import {
10
+ SlatesActionRequests,
11
+ slatesActionRequestsByMethod,
12
+ SlatesActionResponses,
13
+ slatesActionResponsesByMethod
14
+ } from './action';
15
+ import {
16
+ SlatesAuthNotifications,
17
+ slatesAuthNotificationsByMethod,
18
+ SlatesAuthRequests,
19
+ slatesAuthRequestsByMethod,
20
+ SlatesAuthResponses,
21
+ slatesAuthResponsesByMethod
22
+ } from './auth';
23
+ import {
24
+ SlatesConfigNotifications,
25
+ slatesConfigNotificationsByMethod,
26
+ SlatesConfigRequests,
27
+ slatesConfigRequestsByMethod,
28
+ SlatesConfigResponses,
29
+ slatesConfigResponsesByMethod
30
+ } from './config';
31
+ import {
32
+ SlatesControlFlowNotifications,
33
+ slatesControlFlowNotificationsByMethod
34
+ } from './controlFlow';
35
+ import {
36
+ SlatesIdentifyRequests,
37
+ slatesIdentifyRequestsByMethod,
38
+ SlatesIdentifyResponses,
39
+ slatesIdentifyResponsesByMethod
40
+ } from './identify';
41
+ import { SlatesLogNotifications, slatesLogNotificationsByMethod } from './log';
42
+
43
+ export type SlatesNotifications =
44
+ | SlatesAuthNotifications
45
+ | SlatesConfigNotifications
46
+ | SlatesControlFlowNotifications
47
+ | SlatesLogNotifications;
48
+
49
+ export type SlatesRequests =
50
+ | SlatesActionRequests
51
+ | SlatesAuthRequests
52
+ | SlatesConfigRequests
53
+ | SlatesIdentifyRequests;
54
+
55
+ export type SlatesResponses =
56
+ | SlatesActionResponses
57
+ | SlatesAuthResponses
58
+ | SlatesConfigResponses
59
+ | SlatesIdentifyResponses;
60
+
61
+ export let slatesResponsesByMethod = {
62
+ ...slatesActionResponsesByMethod,
63
+ ...slatesAuthResponsesByMethod,
64
+ ...slatesConfigResponsesByMethod,
65
+ ...slatesIdentifyResponsesByMethod
66
+ };
67
+
68
+ export let slatesRequestsByMethod = {
69
+ ...slatesActionRequestsByMethod,
70
+ ...slatesAuthRequestsByMethod,
71
+ ...slatesConfigRequestsByMethod,
72
+ ...slatesIdentifyRequestsByMethod
73
+ };
74
+
75
+ export let slatesNotificationsByMethod = {
76
+ ...slatesAuthNotificationsByMethod,
77
+ ...slatesConfigNotificationsByMethod,
78
+ ...slatesControlFlowNotificationsByMethod,
79
+ ...slatesLogNotificationsByMethod
80
+ };
81
+
82
+ export type SlatesResponsesByMethod = {
83
+ [key in keyof typeof slatesResponsesByMethod]: z.infer<
84
+ (typeof slatesResponsesByMethod)[key]
85
+ >;
86
+ };
@@ -0,0 +1,29 @@
1
+ import z from 'zod';
2
+
3
+ /**
4
+ * Send Log
5
+ */
6
+ export let slatesMessageLogSendNotification = z.object({
7
+ jsonrpc: z.literal('2.0'),
8
+ method: z.literal('slates/log.send'),
9
+ params: z.object({
10
+ type: z.union([
11
+ z.literal('info'),
12
+ z.literal('warning'),
13
+ z.literal('error'),
14
+ z.literal('progress')
15
+ ]),
16
+ timestamp: z.string(),
17
+ message: z.string()
18
+ })
19
+ });
20
+
21
+ export type SlatesMessageLogSendNotification = z.infer<
22
+ typeof slatesMessageLogSendNotification
23
+ >;
24
+
25
+ export type SlatesLogNotifications = SlatesMessageLogSendNotification;
26
+
27
+ export let slatesLogNotificationsByMethod = {
28
+ 'slates/log.send': slatesMessageLogSendNotification
29
+ };
@@ -0,0 +1,48 @@
1
+ import z from 'zod';
2
+
3
+ export let slatesActionBase = z.object({
4
+ id: z.string(),
5
+
6
+ name: z.string(),
7
+ description: z.string().optional(),
8
+ instructions: z.array(z.string()).optional(),
9
+ constraints: z.array(z.string()).optional(),
10
+ tags: z
11
+ .object({
12
+ destructive: z.boolean().optional(),
13
+ readOnly: z.boolean().optional()
14
+ })
15
+ .optional(),
16
+ metadata: z.record(z.string(), z.any()).optional(),
17
+
18
+ inputSchema: z.record(z.string(), z.any()),
19
+ outputSchema: z.record(z.string(), z.any())
20
+ });
21
+
22
+ export let slatesActionTool = slatesActionBase.extend({
23
+ type: z.literal('action.tool'),
24
+ capabilities: z.object({})
25
+ });
26
+
27
+ export let slatesActionTrigger = slatesActionBase.extend({
28
+ type: z.literal('action.trigger'),
29
+ capabilities: z.object({}),
30
+
31
+ invocation: z.union([
32
+ z.object({
33
+ type: z.literal('polling'),
34
+ intervalSeconds: z.number().min(15)
35
+ }),
36
+ z.object({
37
+ type: z.literal('webhook'),
38
+ autoRegistration: z.boolean(),
39
+ autoUnregistration: z.boolean()
40
+ })
41
+ ])
42
+ });
43
+
44
+ export let slatesAction = z.union([slatesActionTool, slatesActionTrigger]);
45
+
46
+ export type SlatesAction = z.infer<typeof slatesAction>;
47
+ export type SlatesActionTool = z.infer<typeof slatesActionTool>;
48
+ export type SlatesActionTrigger = z.infer<typeof slatesActionTrigger>;
@@ -0,0 +1,35 @@
1
+ import z from 'zod';
2
+
3
+ export let slatesAuthenticationMethod = z.object({
4
+ id: z.string(),
5
+ name: z.string(),
6
+
7
+ type: z.union([
8
+ z.literal('auth.oauth'),
9
+ z.literal('auth.token'),
10
+ z.literal('auth.service_account'),
11
+ z.literal('auth.custom')
12
+ ]),
13
+
14
+ scopes: z
15
+ .array(
16
+ z.object({
17
+ id: z.string(),
18
+ title: z.string(),
19
+ description: z.string().optional()
20
+ })
21
+ )
22
+ .optional(),
23
+
24
+ inputSchema: z.record(z.string(), z.any()),
25
+ outputSchema: z.record(z.string(), z.any()),
26
+
27
+ capabilities: z.object({
28
+ getDefaultInput: z.object({ enabled: z.boolean() }).optional(),
29
+ handleChangedInput: z.object({ enabled: z.boolean() }).optional(),
30
+ handleTokenRefresh: z.object({ enabled: z.boolean() }).optional(),
31
+ getProfile: z.object({ enabled: z.boolean() }).optional()
32
+ })
33
+ });
34
+
35
+ export type SlateAuthenticationMethod = z.infer<typeof slatesAuthenticationMethod>;
@@ -0,0 +1,3 @@
1
+ export * from './action';
2
+ export * from './authMethod';
3
+ export * from './participant';
@@ -0,0 +1,11 @@
1
+ import z from 'zod';
2
+
3
+ export let slatesParticipant = z.object({
4
+ type: z.union([z.literal('consumer'), z.literal('hub')]),
5
+ id: z.string(),
6
+ name: z.string(),
7
+ description: z.string().optional(),
8
+ metadata: z.record(z.string(), z.any()).optional()
9
+ });
10
+
11
+ export type SlatesParticipant = z.infer<typeof slatesParticipant>;
package/tsconfig.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "@slates/tsconfig/base.json",
4
+ "exclude": ["dist"],
5
+ "compilerOptions": {
6
+ "outDir": "dist"
7
+ }
8
+ }