@tailorkit/client-platform 0.1.0-beta.17 → 0.1.0-beta.19

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.
@@ -0,0 +1,31 @@
1
+ import { z } from "zod";
2
+ import { type UIMessageChunk } from "ai";
3
+ /** Use the SDK's validator so transport parts stay aligned with its protocol. */
4
+ export declare const agentChunkSchema: z.ZodCustom<UIMessageChunk, UIMessageChunk>;
5
+ export type AgentChunk = UIMessageChunk;
6
+ /** Parts stay extensible; the platform validates their SDK shapes before running. */
7
+ export declare const agentMessagesSchema: z.ZodArray<z.ZodObject<{
8
+ id: z.ZodString;
9
+ role: z.ZodEnum<{
10
+ assistant: "assistant";
11
+ user: "user";
12
+ }>;
13
+ parts: z.ZodArray<z.ZodObject<{
14
+ type: z.ZodString;
15
+ }, z.core.$loose>>;
16
+ metadata: z.ZodOptional<z.ZodUnknown>;
17
+ }, z.core.$strip>>;
18
+ export declare const agentChatSchema: z.ZodObject<{
19
+ appId: z.ZodString;
20
+ messages: z.ZodArray<z.ZodObject<{
21
+ id: z.ZodString;
22
+ role: z.ZodEnum<{
23
+ assistant: "assistant";
24
+ user: "user";
25
+ }>;
26
+ parts: z.ZodArray<z.ZodObject<{
27
+ type: z.ZodString;
28
+ }, z.core.$loose>>;
29
+ metadata: z.ZodOptional<z.ZodUnknown>;
30
+ }, z.core.$strip>>;
31
+ }, z.core.$strip>;
package/dist/agent.js ADDED
@@ -0,0 +1,10 @@
1
+ import {
2
+ agentChatSchema,
3
+ agentChunkSchema,
4
+ agentMessagesSchema
5
+ } from "./chunk-AX5PTMUR.js";
6
+ export {
7
+ agentChatSchema,
8
+ agentChunkSchema,
9
+ agentMessagesSchema
10
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createSseClient
3
- } from "./chunk-TWOK2M2L.js";
3
+ } from "./chunk-HXX7UM4A.js";
4
4
  import {
5
5
  buildUrl,
6
6
  createConfig,
@@ -0,0 +1,23 @@
1
+ // src/agent.ts
2
+ import { z } from "zod";
3
+ import { asSchema, uiMessageChunkSchema } from "ai";
4
+ var chunkSchema = asSchema(uiMessageChunkSchema);
5
+ var agentChunkSchema = z.custom(async (value) => (await chunkSchema.validate?.(value))?.success === true).describe("An AI SDK UIMessageChunk. Fields depend on the chunk type.");
6
+ var agentMessagesSchema = z.array(
7
+ z.object({
8
+ id: z.string().min(1),
9
+ role: z.enum(["user", "assistant"]),
10
+ parts: z.array(z.looseObject({ type: z.string() })).min(1),
11
+ metadata: z.unknown().optional()
12
+ })
13
+ ).min(1);
14
+ var agentChatSchema = z.object({
15
+ appId: z.string().min(1),
16
+ messages: agentMessagesSchema
17
+ });
18
+
19
+ export {
20
+ agentChunkSchema,
21
+ agentMessagesSchema,
22
+ agentChatSchema
23
+ };
@@ -45,7 +45,8 @@ function createSseClient({
45
45
  let buffer = "";
46
46
  const abortHandler = () => {
47
47
  try {
48
- reader.cancel();
48
+ void reader.cancel().catch(() => {
49
+ });
49
50
  } catch {
50
51
  }
51
52
  };
@@ -1,8 +1,16 @@
1
1
  import {
2
2
  client
3
- } from "./chunk-TZBKIIYQ.js";
3
+ } from "./chunk-P5HWCKOQ.js";
4
4
 
5
5
  // src/client/sdk.gen.ts
6
+ var appAgentChat = (options) => (options.client ?? client).sse.post({
7
+ url: "/app-agent/chat",
8
+ ...options,
9
+ headers: {
10
+ "Content-Type": "application/json",
11
+ ...options.headers
12
+ }
13
+ });
6
14
  var appsRuntimeSession = (options) => (options.client ?? client).post({
7
15
  url: "/apps/{appId}/runtime/session",
8
16
  ...options,
@@ -177,6 +185,7 @@ var previewAccepted = (options) => (options.client ?? client).post({
177
185
  });
178
186
 
179
187
  export {
188
+ appAgentChat,
180
189
  appsRuntimeSession,
181
190
  appsList,
182
191
  appsGet,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createClient
3
- } from "./chunk-ZVCWQQGA.js";
3
+ } from "./chunk-3CR3KAER.js";
4
4
  import {
5
5
  createConfig
6
6
  } from "./chunk-MG3GT4SQ.js";
@@ -18,7 +18,15 @@ var previewFileManifestSchema = z.object({
18
18
  sha256: z.string().regex(/^[a-f0-9]{64}$/u)
19
19
  });
20
20
  var previewBuildManifestSchema = z.object({
21
- files: z.array(previewFileManifestSchema).max(100)
21
+ files: z.array(previewFileManifestSchema).max(100),
22
+ views: z.array(
23
+ z.object({
24
+ slot: z.string().min(1).max(255),
25
+ path: z.string().startsWith("/").max(1024),
26
+ instances: z.literal(true).optional(),
27
+ disabled: z.literal(true).optional()
28
+ })
29
+ ).max(1e3).optional()
22
30
  }).superRefine((manifest, context) => {
23
31
  const paths = /* @__PURE__ */ new Set();
24
32
  let total = 0;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createClient
3
- } from "../../chunk-ZVCWQQGA.js";
4
- import "../../chunk-TWOK2M2L.js";
3
+ } from "../../chunk-3CR3KAER.js";
4
+ import "../../chunk-HXX7UM4A.js";
5
5
  import "../../chunk-MG3GT4SQ.js";
6
6
  import "../../chunk-KP5YYTW6.js";
7
7
  import "../../chunk-TZPDFAYB.js";
@@ -1,14 +1,11 @@
1
1
  import "../../chunk-X5TBL4RL.js";
2
- import {
3
- buildClientParams
4
- } from "../../chunk-VUBA7FI4.js";
5
2
  import {
6
3
  serializeQueryKeyValue
7
4
  } from "../../chunk-RRYF7FTJ.js";
8
5
  import {
9
6
  createClient
10
- } from "../../chunk-ZVCWQQGA.js";
11
- import "../../chunk-TWOK2M2L.js";
7
+ } from "../../chunk-3CR3KAER.js";
8
+ import "../../chunk-HXX7UM4A.js";
12
9
  import {
13
10
  createConfig,
14
11
  mergeHeaders
@@ -20,6 +17,9 @@ import {
20
17
  jsonBodySerializer,
21
18
  urlSearchParamsBodySerializer
22
19
  } from "../../chunk-ZLGFMDTV.js";
20
+ import {
21
+ buildClientParams
22
+ } from "../../chunk-VUBA7FI4.js";
23
23
  import "../../chunk-JETBOCXO.js";
24
24
  export {
25
25
  buildClientParams,
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  client
3
- } from "../chunk-TZBKIIYQ.js";
3
+ } from "../chunk-P5HWCKOQ.js";
4
4
  import "../chunk-X5TBL4RL.js";
5
- import "../chunk-VUBA7FI4.js";
6
5
  import "../chunk-RRYF7FTJ.js";
7
- import "../chunk-ZVCWQQGA.js";
8
- import "../chunk-TWOK2M2L.js";
6
+ import "../chunk-3CR3KAER.js";
7
+ import "../chunk-HXX7UM4A.js";
9
8
  import "../chunk-MG3GT4SQ.js";
10
9
  import "../chunk-KP5YYTW6.js";
11
10
  import "../chunk-TZPDFAYB.js";
12
11
  import "../chunk-ZLGFMDTV.js";
12
+ import "../chunk-VUBA7FI4.js";
13
13
  import "../chunk-JETBOCXO.js";
14
14
  export {
15
15
  client
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createSseClient
3
- } from "../../chunk-TWOK2M2L.js";
3
+ } from "../../chunk-HXX7UM4A.js";
4
4
  export {
5
5
  createSseClient
6
6
  };
@@ -1,2 +1,2 @@
1
- export { appsCreate, appsDelete, appsDeploy, appsGet, appsList, appsRuntimeSession, appsUpdate, cliAuthApprove, cliAuthDeny, cliAuthPoll, cliAuthStart, cliAuthVerifyToken, deploymentsCreate, deploymentsGet, deploymentsList, deploymentsPublish, deploymentsRuntime, type Options, previewAccept, previewAccepted, previewInvitation, previewStart, previewStop, } from "./sdk.gen.js";
2
- export type { AppsCreateData, AppsCreateResponse, AppsCreateResponses, AppsDeleteData, AppsDeleteResponse, AppsDeleteResponses, AppsDeployData, AppsDeployResponse, AppsDeployResponses, AppsGetData, AppsGetResponse, AppsGetResponses, AppsListData, AppsListResponse, AppsListResponses, AppsRuntimeSessionData, AppsRuntimeSessionResponse, AppsRuntimeSessionResponses, AppsUpdateData, AppsUpdateResponse, AppsUpdateResponses, CliAuthApproveData, CliAuthApproveResponse, CliAuthApproveResponses, CliAuthDenyData, CliAuthDenyResponse, CliAuthDenyResponses, CliAuthPollData, CliAuthPollResponse, CliAuthPollResponses, CliAuthStartData, CliAuthStartResponse, CliAuthStartResponses, CliAuthVerifyTokenData, CliAuthVerifyTokenResponse, CliAuthVerifyTokenResponses, ClientOptions, DeploymentsCreateData, DeploymentsCreateResponse, DeploymentsCreateResponses, DeploymentsGetData, DeploymentsGetResponse, DeploymentsGetResponses, DeploymentsListData, DeploymentsListResponse, DeploymentsListResponses, DeploymentsPublishData, DeploymentsPublishResponse, DeploymentsPublishResponses, DeploymentsRuntimeData, DeploymentsRuntimeResponse, DeploymentsRuntimeResponses, PreviewAcceptData, PreviewAcceptedData, PreviewAcceptedResponse, PreviewAcceptedResponses, PreviewAcceptResponse, PreviewAcceptResponses, PreviewInvitationData, PreviewInvitationResponse, PreviewInvitationResponses, PreviewStartData, PreviewStartResponse, PreviewStartResponses, PreviewStopData, PreviewStopResponse, PreviewStopResponses, Schema0, } from "./types.gen.js";
1
+ export { appAgentChat, appsCreate, appsDelete, appsDeploy, appsGet, appsList, appsRuntimeSession, appsUpdate, cliAuthApprove, cliAuthDeny, cliAuthPoll, cliAuthStart, cliAuthVerifyToken, deploymentsCreate, deploymentsGet, deploymentsList, deploymentsPublish, deploymentsRuntime, type Options, previewAccept, previewAccepted, previewInvitation, previewStart, previewStop, } from "./sdk.gen.js";
2
+ export type { AppAgentChatData, AppAgentChatResponse, AppAgentChatResponses, AppsCreateData, AppsCreateResponse, AppsCreateResponses, AppsDeleteData, AppsDeleteResponse, AppsDeleteResponses, AppsDeployData, AppsDeployResponse, AppsDeployResponses, AppsGetData, AppsGetResponse, AppsGetResponses, AppsListData, AppsListResponse, AppsListResponses, AppsRuntimeSessionData, AppsRuntimeSessionResponse, AppsRuntimeSessionResponses, AppsUpdateData, AppsUpdateResponse, AppsUpdateResponses, CliAuthApproveData, CliAuthApproveResponse, CliAuthApproveResponses, CliAuthDenyData, CliAuthDenyResponse, CliAuthDenyResponses, CliAuthPollData, CliAuthPollResponse, CliAuthPollResponses, CliAuthStartData, CliAuthStartResponse, CliAuthStartResponses, CliAuthVerifyTokenData, CliAuthVerifyTokenResponse, CliAuthVerifyTokenResponses, ClientOptions, DeploymentsCreateData, DeploymentsCreateResponse, DeploymentsCreateResponses, DeploymentsGetData, DeploymentsGetResponse, DeploymentsGetResponses, DeploymentsListData, DeploymentsListResponse, DeploymentsListResponses, DeploymentsPublishData, DeploymentsPublishResponse, DeploymentsPublishResponses, DeploymentsRuntimeData, DeploymentsRuntimeResponse, DeploymentsRuntimeResponses, PreviewAcceptData, PreviewAcceptedData, PreviewAcceptedResponse, PreviewAcceptedResponses, PreviewAcceptResponse, PreviewAcceptResponses, PreviewInvitationData, PreviewInvitationResponse, PreviewInvitationResponses, PreviewStartData, PreviewStartResponse, PreviewStartResponses, PreviewStopData, PreviewStopResponse, PreviewStopResponses, Schema0, } from "./types.gen.js";
@@ -1,5 +1,6 @@
1
1
  import "../chunk-5X7JZMEF.js";
2
2
  import {
3
+ appAgentChat,
3
4
  appsCreate,
4
5
  appsDelete,
5
6
  appsDeploy,
@@ -22,19 +23,20 @@ import {
22
23
  previewInvitation,
23
24
  previewStart,
24
25
  previewStop
25
- } from "../chunk-MFXQKOYT.js";
26
- import "../chunk-TZBKIIYQ.js";
26
+ } from "../chunk-KF2MA65O.js";
27
+ import "../chunk-P5HWCKOQ.js";
27
28
  import "../chunk-X5TBL4RL.js";
28
- import "../chunk-VUBA7FI4.js";
29
29
  import "../chunk-RRYF7FTJ.js";
30
- import "../chunk-ZVCWQQGA.js";
31
- import "../chunk-TWOK2M2L.js";
30
+ import "../chunk-3CR3KAER.js";
31
+ import "../chunk-HXX7UM4A.js";
32
32
  import "../chunk-MG3GT4SQ.js";
33
33
  import "../chunk-KP5YYTW6.js";
34
34
  import "../chunk-TZPDFAYB.js";
35
35
  import "../chunk-ZLGFMDTV.js";
36
+ import "../chunk-VUBA7FI4.js";
36
37
  import "../chunk-JETBOCXO.js";
37
38
  export {
39
+ appAgentChat,
38
40
  appsCreate,
39
41
  appsDelete,
40
42
  appsDeploy,
@@ -1,5 +1,5 @@
1
- import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from "./client/index.js";
2
- import type { AppsCreateData, AppsCreateResponses, AppsDeleteData, AppsDeleteResponses, AppsDeployData, AppsDeployResponses, AppsGetData, AppsGetResponses, AppsListData, AppsListResponses, AppsRuntimeSessionData, AppsRuntimeSessionResponses, AppsUpdateData, AppsUpdateResponses, CliAuthApproveData, CliAuthApproveResponses, CliAuthDenyData, CliAuthDenyResponses, CliAuthPollData, CliAuthPollResponses, CliAuthStartData, CliAuthStartResponses, CliAuthVerifyTokenData, CliAuthVerifyTokenResponses, DeploymentsCreateData, DeploymentsCreateResponses, DeploymentsGetData, DeploymentsGetResponses, DeploymentsListData, DeploymentsListResponses, DeploymentsPublishData, DeploymentsPublishResponses, DeploymentsRuntimeData, DeploymentsRuntimeResponses, PreviewAcceptData, PreviewAcceptedData, PreviewAcceptedResponses, PreviewAcceptResponses, PreviewInvitationData, PreviewInvitationResponses, PreviewStartData, PreviewStartResponses, PreviewStopData, PreviewStopResponses } from "./types.gen.js";
1
+ import type { Client, ClientMeta, Options as Options2, RequestResult, ServerSentEventsResult, TDataShape } from "./client/index.js";
2
+ import type { AppAgentChatData, AppAgentChatResponse, AppAgentChatResponses, AppsCreateData, AppsCreateResponses, AppsDeleteData, AppsDeleteResponses, AppsDeployData, AppsDeployResponses, AppsGetData, AppsGetResponses, AppsListData, AppsListResponses, AppsRuntimeSessionData, AppsRuntimeSessionResponses, AppsUpdateData, AppsUpdateResponses, CliAuthApproveData, CliAuthApproveResponses, CliAuthDenyData, CliAuthDenyResponses, CliAuthPollData, CliAuthPollResponses, CliAuthStartData, CliAuthStartResponses, CliAuthVerifyTokenData, CliAuthVerifyTokenResponses, DeploymentsCreateData, DeploymentsCreateResponses, DeploymentsGetData, DeploymentsGetResponses, DeploymentsListData, DeploymentsListResponses, DeploymentsPublishData, DeploymentsPublishResponses, DeploymentsRuntimeData, DeploymentsRuntimeResponses, PreviewAcceptData, PreviewAcceptedData, PreviewAcceptedResponses, PreviewAcceptResponses, PreviewInvitationData, PreviewInvitationResponses, PreviewStartData, PreviewStartResponses, PreviewStopData, PreviewStopResponses } from "./types.gen.js";
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -13,6 +13,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
13
13
  */
14
14
  meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
15
15
  };
16
+ export declare const appAgentChat: <ThrowOnError extends boolean = false>(options: Options<AppAgentChatData, ThrowOnError, AppAgentChatResponse>) => Promise<ServerSentEventsResult<AppAgentChatResponses>>;
16
17
  export declare const appsRuntimeSession: <ThrowOnError extends boolean = false>(options: Options<AppsRuntimeSessionData, ThrowOnError>) => RequestResult<AppsRuntimeSessionResponses, unknown, ThrowOnError>;
17
18
  export declare const appsList: <ThrowOnError extends boolean = false>(options: Options<AppsListData, ThrowOnError>) => RequestResult<AppsListResponses, unknown, ThrowOnError>;
18
19
  export declare const appsGet: <ThrowOnError extends boolean = false>(options: Options<AppsGetData, ThrowOnError>) => RequestResult<AppsGetResponses, unknown, ThrowOnError>;
@@ -1,4 +1,5 @@
1
1
  import {
2
+ appAgentChat,
2
3
  appsCreate,
3
4
  appsDelete,
4
5
  appsDeploy,
@@ -21,19 +22,20 @@ import {
21
22
  previewInvitation,
22
23
  previewStart,
23
24
  previewStop
24
- } from "../chunk-MFXQKOYT.js";
25
- import "../chunk-TZBKIIYQ.js";
25
+ } from "../chunk-KF2MA65O.js";
26
+ import "../chunk-P5HWCKOQ.js";
26
27
  import "../chunk-X5TBL4RL.js";
27
- import "../chunk-VUBA7FI4.js";
28
28
  import "../chunk-RRYF7FTJ.js";
29
- import "../chunk-ZVCWQQGA.js";
30
- import "../chunk-TWOK2M2L.js";
29
+ import "../chunk-3CR3KAER.js";
30
+ import "../chunk-HXX7UM4A.js";
31
31
  import "../chunk-MG3GT4SQ.js";
32
32
  import "../chunk-KP5YYTW6.js";
33
33
  import "../chunk-TZPDFAYB.js";
34
34
  import "../chunk-ZLGFMDTV.js";
35
+ import "../chunk-VUBA7FI4.js";
35
36
  import "../chunk-JETBOCXO.js";
36
37
  export {
38
+ appAgentChat,
37
39
  appsCreate,
38
40
  appsDelete,
39
41
  appsDeploy,
@@ -4,6 +4,49 @@ export type ClientOptions = {
4
4
  export type Schema0 = string | number | boolean | null | Array<Schema0> | {
5
5
  [key: string]: Schema0;
6
6
  };
7
+ export type AppAgentChatData = {
8
+ body: {
9
+ appId: string;
10
+ messages: Array<{
11
+ id: string;
12
+ role: "user" | "assistant";
13
+ parts: Array<{
14
+ type: string;
15
+ [key: string]: unknown;
16
+ }>;
17
+ metadata?: unknown;
18
+ }>;
19
+ deployToken: string;
20
+ };
21
+ path?: never;
22
+ query?: never;
23
+ url: "/app-agent/chat";
24
+ };
25
+ export type AppAgentChatResponses = {
26
+ /**
27
+ * OK
28
+ */
29
+ 200: {
30
+ event: "message";
31
+ /**
32
+ * An AI SDK UIMessageChunk. Fields depend on the chunk type.
33
+ */
34
+ data: unknown;
35
+ id?: string;
36
+ retry?: number;
37
+ } | {
38
+ event: "close";
39
+ data?: unknown;
40
+ id?: string;
41
+ retry?: number;
42
+ } | {
43
+ event: "error";
44
+ data?: unknown;
45
+ id?: string;
46
+ retry?: number;
47
+ };
48
+ };
49
+ export type AppAgentChatResponse = AppAgentChatResponses[keyof AppAgentChatResponses];
7
50
  export type AppsRuntimeSessionData = {
8
51
  body: {
9
52
  scopes: Array<{
@@ -73,11 +116,23 @@ export type AppsListResponses = {
73
116
  clientEntryFileId: string | null;
74
117
  logoLightFileId: string | null;
75
118
  logoDarkFileId: string | null;
119
+ views: Array<{
120
+ slot: string;
121
+ path: string;
122
+ instances?: true;
123
+ disabled?: true;
124
+ }>;
76
125
  logoLightPath: string | null;
77
126
  logoDarkPath: string | null;
78
127
  createdAt: string;
79
128
  updatedAt: string;
80
129
  } | null;
130
+ views: Array<{
131
+ slot: string;
132
+ path: string;
133
+ instances?: true;
134
+ disabled?: true;
135
+ }>;
81
136
  clientPath?: string;
82
137
  logoPaths?: {
83
138
  dark?: string;
@@ -134,11 +189,23 @@ export type AppsGetResponses = {
134
189
  clientEntryFileId: string | null;
135
190
  logoLightFileId: string | null;
136
191
  logoDarkFileId: string | null;
192
+ views: Array<{
193
+ slot: string;
194
+ path: string;
195
+ instances?: true;
196
+ disabled?: true;
197
+ }>;
137
198
  logoLightPath: string | null;
138
199
  logoDarkPath: string | null;
139
200
  createdAt: string;
140
201
  updatedAt: string;
141
202
  } | null;
203
+ views: Array<{
204
+ slot: string;
205
+ path: string;
206
+ instances?: true;
207
+ disabled?: true;
208
+ }>;
142
209
  clientPath?: string;
143
210
  logoPaths?: {
144
211
  dark?: string;
@@ -189,11 +256,23 @@ export type AppsCreateResponses = {
189
256
  clientEntryFileId: string | null;
190
257
  logoLightFileId: string | null;
191
258
  logoDarkFileId: string | null;
259
+ views: Array<{
260
+ slot: string;
261
+ path: string;
262
+ instances?: true;
263
+ disabled?: true;
264
+ }>;
192
265
  logoLightPath: string | null;
193
266
  logoDarkPath: string | null;
194
267
  createdAt: string;
195
268
  updatedAt: string;
196
269
  } | null;
270
+ views: Array<{
271
+ slot: string;
272
+ path: string;
273
+ instances?: true;
274
+ disabled?: true;
275
+ }>;
197
276
  clientPath?: string;
198
277
  logoPaths?: {
199
278
  dark?: string;
@@ -270,11 +349,23 @@ export type AppsUpdateResponses = {
270
349
  clientEntryFileId: string | null;
271
350
  logoLightFileId: string | null;
272
351
  logoDarkFileId: string | null;
352
+ views: Array<{
353
+ slot: string;
354
+ path: string;
355
+ instances?: true;
356
+ disabled?: true;
357
+ }>;
273
358
  logoLightPath: string | null;
274
359
  logoDarkPath: string | null;
275
360
  createdAt: string;
276
361
  updatedAt: string;
277
362
  } | null;
363
+ views: Array<{
364
+ slot: string;
365
+ path: string;
366
+ instances?: true;
367
+ disabled?: true;
368
+ }>;
278
369
  clientPath?: string;
279
370
  logoPaths?: {
280
371
  dark?: string;
@@ -326,11 +417,23 @@ export type AppsDeployResponses = {
326
417
  clientEntryFileId: string | null;
327
418
  logoLightFileId: string | null;
328
419
  logoDarkFileId: string | null;
420
+ views: Array<{
421
+ slot: string;
422
+ path: string;
423
+ instances?: true;
424
+ disabled?: true;
425
+ }>;
329
426
  logoLightPath: string | null;
330
427
  logoDarkPath: string | null;
331
428
  createdAt: string;
332
429
  updatedAt: string;
333
430
  } | null;
431
+ views: Array<{
432
+ slot: string;
433
+ path: string;
434
+ instances?: true;
435
+ disabled?: true;
436
+ }>;
334
437
  clientPath?: string;
335
438
  logoPaths?: {
336
439
  dark?: string;
@@ -479,6 +582,12 @@ export type DeploymentsListResponses = {
479
582
  clientEntryFileId: string | null;
480
583
  logoLightFileId: string | null;
481
584
  logoDarkFileId: string | null;
585
+ views: Array<{
586
+ slot: string;
587
+ path: string;
588
+ instances?: true;
589
+ disabled?: true;
590
+ }>;
482
591
  logoLightPath: string | null;
483
592
  logoDarkPath: string | null;
484
593
  createdAt: string;
@@ -519,6 +628,12 @@ export type DeploymentsGetResponses = {
519
628
  clientEntryFileId: string | null;
520
629
  logoLightFileId: string | null;
521
630
  logoDarkFileId: string | null;
631
+ views: Array<{
632
+ slot: string;
633
+ path: string;
634
+ instances?: true;
635
+ disabled?: true;
636
+ }>;
522
637
  logoLightPath: string | null;
523
638
  logoDarkPath: string | null;
524
639
  createdAt: string;
@@ -557,6 +672,12 @@ export type DeploymentsCreateData = {
557
672
  contentType: "image/svg+xml" | "image/png" | "image/webp";
558
673
  };
559
674
  };
675
+ views?: Array<{
676
+ slot: string;
677
+ path: string;
678
+ instances?: true;
679
+ disabled?: true;
680
+ }>;
560
681
  scope: {
561
682
  name: string;
562
683
  value: {
@@ -617,6 +738,12 @@ export type DeploymentsCreateResponses = {
617
738
  clientEntryFileId: string | null;
618
739
  logoLightFileId: string | null;
619
740
  logoDarkFileId: string | null;
741
+ views: Array<{
742
+ slot: string;
743
+ path: string;
744
+ instances?: true;
745
+ disabled?: true;
746
+ }>;
620
747
  logoLightPath: string | null;
621
748
  logoDarkPath: string | null;
622
749
  createdAt: string;
@@ -691,6 +818,12 @@ export type DeploymentsPublishResponses = {
691
818
  clientEntryFileId: string | null;
692
819
  logoLightFileId: string | null;
693
820
  logoDarkFileId: string | null;
821
+ views: Array<{
822
+ slot: string;
823
+ path: string;
824
+ instances?: true;
825
+ disabled?: true;
826
+ }>;
694
827
  logoLightPath: string | null;
695
828
  logoDarkPath: string | null;
696
829
  createdAt: string;
@@ -851,11 +984,23 @@ export type PreviewAcceptedResponses = {
851
984
  clientEntryFileId: string | null;
852
985
  logoLightFileId: string | null;
853
986
  logoDarkFileId: string | null;
987
+ views: Array<{
988
+ slot: string;
989
+ path: string;
990
+ instances?: true;
991
+ disabled?: true;
992
+ }>;
854
993
  logoLightPath: string | null;
855
994
  logoDarkPath: string | null;
856
995
  createdAt: string;
857
996
  updatedAt: string;
858
997
  } | null;
998
+ views: Array<{
999
+ slot: string;
1000
+ path: string;
1001
+ instances?: true;
1002
+ disabled?: true;
1003
+ }>;
859
1004
  clientPath?: string;
860
1005
  logoPaths?: {
861
1006
  dark?: string;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./client/index.js";
2
2
  export * from "./client.js";
3
3
  export * from "./preview.js";
4
+ export * from "./agent.js";
package/dist/index.js CHANGED
@@ -1,3 +1,8 @@
1
+ import {
2
+ agentChatSchema,
3
+ agentChunkSchema,
4
+ agentMessagesSchema
5
+ } from "./chunk-AX5PTMUR.js";
1
6
  import {
2
7
  createClientConfig
3
8
  } from "./chunk-5IRC5P4W.js";
@@ -8,9 +13,10 @@ import {
8
13
  previewEventSchema,
9
14
  previewFileManifestSchema,
10
15
  previewMetadataSchema
11
- } from "./chunk-RFNELX3J.js";
16
+ } from "./chunk-PTDO4GSQ.js";
12
17
  import "./chunk-5X7JZMEF.js";
13
18
  import {
19
+ appAgentChat,
14
20
  appsCreate,
15
21
  appsDelete,
16
22
  appsDeploy,
@@ -33,20 +39,24 @@ import {
33
39
  previewInvitation,
34
40
  previewStart,
35
41
  previewStop
36
- } from "./chunk-MFXQKOYT.js";
37
- import "./chunk-TZBKIIYQ.js";
42
+ } from "./chunk-KF2MA65O.js";
43
+ import "./chunk-P5HWCKOQ.js";
38
44
  import "./chunk-X5TBL4RL.js";
39
- import "./chunk-VUBA7FI4.js";
40
45
  import "./chunk-RRYF7FTJ.js";
41
- import "./chunk-ZVCWQQGA.js";
42
- import "./chunk-TWOK2M2L.js";
46
+ import "./chunk-3CR3KAER.js";
47
+ import "./chunk-HXX7UM4A.js";
43
48
  import "./chunk-MG3GT4SQ.js";
44
49
  import "./chunk-KP5YYTW6.js";
45
50
  import "./chunk-TZPDFAYB.js";
46
51
  import "./chunk-ZLGFMDTV.js";
52
+ import "./chunk-VUBA7FI4.js";
47
53
  import "./chunk-JETBOCXO.js";
48
54
  export {
49
55
  ACTIVE_PREVIEW_CONFLICT_REASON,
56
+ agentChatSchema,
57
+ agentChunkSchema,
58
+ agentMessagesSchema,
59
+ appAgentChat,
50
60
  appsCreate,
51
61
  appsDelete,
52
62
  appsDeploy,
package/dist/preview.d.ts CHANGED
@@ -16,6 +16,12 @@ export declare const previewBuildManifestSchema: z.ZodObject<{
16
16
  chunks: z.ZodNumber;
17
17
  sha256: z.ZodString;
18
18
  }, z.core.$strip>>;
19
+ views: z.ZodOptional<z.ZodArray<z.ZodObject<{
20
+ slot: z.ZodString;
21
+ path: z.ZodString;
22
+ instances: z.ZodOptional<z.ZodLiteral<true>>;
23
+ disabled: z.ZodOptional<z.ZodLiteral<true>>;
24
+ }, z.core.$strip>>>;
19
25
  }, z.core.$strip>;
20
26
  export declare const previewEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
21
27
  type: z.ZodLiteral<"begin">;
@@ -29,6 +35,12 @@ export declare const previewEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
29
35
  chunks: z.ZodNumber;
30
36
  sha256: z.ZodString;
31
37
  }, z.core.$strip>>;
38
+ views: z.ZodOptional<z.ZodArray<z.ZodObject<{
39
+ slot: z.ZodString;
40
+ path: z.ZodString;
41
+ instances: z.ZodOptional<z.ZodLiteral<true>>;
42
+ disabled: z.ZodOptional<z.ZodLiteral<true>>;
43
+ }, z.core.$strip>>>;
32
44
  }, z.core.$strip>;
33
45
  }, z.core.$strip>, z.ZodObject<{
34
46
  type: z.ZodLiteral<"chunk">;
@@ -60,6 +72,12 @@ declare const beginInput: z.ZodObject<{
60
72
  chunks: z.ZodNumber;
61
73
  sha256: z.ZodString;
62
74
  }, z.core.$strip>>;
75
+ views: z.ZodOptional<z.ZodArray<z.ZodObject<{
76
+ slot: z.ZodString;
77
+ path: z.ZodString;
78
+ instances: z.ZodOptional<z.ZodLiteral<true>>;
79
+ disabled: z.ZodOptional<z.ZodLiteral<true>>;
80
+ }, z.core.$strip>>>;
63
81
  }, z.core.$strip>;
64
82
  }, z.core.$strip>;
65
83
  declare const uploadInput: z.ZodObject<{
package/dist/preview.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  previewEventSchema,
6
6
  previewFileManifestSchema,
7
7
  previewMetadataSchema
8
- } from "./chunk-RFNELX3J.js";
8
+ } from "./chunk-PTDO4GSQ.js";
9
9
  export {
10
10
  ACTIVE_PREVIEW_CONFLICT_REASON,
11
11
  createPreviewWebSocketClient,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailorkit/client-platform",
3
- "version": "0.1.0-beta.17",
3
+ "version": "0.1.0-beta.19",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,6 +27,10 @@
27
27
  "./preview": {
28
28
  "types": "./dist/preview.d.ts",
29
29
  "import": "./dist/preview.js"
30
+ },
31
+ "./agent": {
32
+ "types": "./dist/agent.d.ts",
33
+ "import": "./dist/agent.js"
30
34
  }
31
35
  },
32
36
  "publishConfig": {
@@ -34,19 +38,20 @@
34
38
  },
35
39
  "dependencies": {
36
40
  "@orpc/client": "2.0.0-beta.40",
41
+ "ai": "^7.0.127",
37
42
  "zod": "^4.6.5"
38
43
  },
39
44
  "devDependencies": {
40
45
  "@hey-api/openapi-ts": "next",
41
46
  "@tailorkit/api-platform": "0.0.0",
42
47
  "@tailorkit/config": "0.0.0",
43
- "@types/node": "26.6.3",
48
+ "@types/node": "26.6.4",
44
49
  "tsup": "^8.5.1",
45
50
  "typescript": "^7.0.2"
46
51
  },
47
52
  "scripts": {
48
53
  "build": "tsup 'src/**/*.ts' --format esm --target node20 --clean && tsc -p tsconfig.build.json",
49
- "generate": "openapi-ts && node ./scripts/restore-openapi-params.mjs && node ./scripts/normalize-esm-imports.mjs && vp fmt src/client",
54
+ "generate": "openapi-ts && node ./scripts/restore-openapi-params.mjs && node ./scripts/normalize-esm-imports.mjs && node ./scripts/normalize-sse-cancellation.mjs && vp fmt src/client",
50
55
  "check-types": "tsc --noEmit",
51
56
  "test": "vp test run"
52
57
  }