@lightdash/common 2.58.0 → 2.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts +21 -8
  3. package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts.map +1 -1
  4. package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js +30 -15
  5. package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js.map +1 -1
  6. package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.test.js +8 -1
  7. package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.test.js.map +1 -1
  8. package/dist/esm/.tsbuildinfo +1 -1
  9. package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts +21 -8
  10. package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts.map +1 -1
  11. package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js +29 -14
  12. package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js.map +1 -1
  13. package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.test.js +8 -1
  14. package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.test.js.map +1 -1
  15. package/dist/types/.tsbuildinfo +1 -1
  16. package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts +21 -8
  17. package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts.map +1 -1
  18. package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js +29 -14
  19. package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js.map +1 -1
  20. package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.test.js +8 -1
  21. package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.test.js.map +1 -1
  22. package/package.json +1 -1
@@ -2,14 +2,17 @@ import { z } from 'zod';
2
2
  import { type AppVersionStatus } from '../../../apps/types';
3
3
  /** Builds run minutes, not seconds: a pending result older than this is stale. */
4
4
  export declare const AI_DATA_APP_BUILD_PENDING_GRACE_MS: number;
5
- export declare const DATA_APP_BUILD_TEMPLATES: readonly ['dashboard', 'slideshow', 'pdf', 'custom'];
5
+ /** Builder starter templates the AI agent may pick; the viz renderer template is internal. */
6
+ export declare const DATA_APP_BUILD_TEMPLATES: readonly ["dashboard", "slideshow", "pdf", "custom"];
6
7
  export type DataAppBuildTemplate = (typeof DATA_APP_BUILD_TEMPLATES)[number];
8
+ /** How a prior visualization's query travels in the brief; shared with the system prompt. */
9
+ export declare const DATA_APP_VIZ_LINE_FORMAT = "[viz title][explore; metrics; dimensions; filters; sort]";
7
10
  export declare const TOOL_GENERATE_DATA_APP_DESCRIPTION: string;
8
11
  export declare const toolGenerateDataAppArgsSchema: z.ZodObject<{
9
12
  prompt: z.ZodString;
10
- template: z.ZodNullable<z.ZodEnum<["dashboard", "slideshow", "pdf", "custom"]>>;
11
- dashboardSlug: z.ZodNullable<z.ZodString>;
12
- chartSlugs: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
13
+ template: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["dashboard", "slideshow", "pdf", "custom"]>>>>;
14
+ dashboardSlug: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
15
+ chartSlugs: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
13
16
  }, "strip", z.ZodTypeAny, {
14
17
  prompt: string;
15
18
  template: "custom" | "dashboard" | "pdf" | "slideshow" | null;
@@ -17,9 +20,9 @@ export declare const toolGenerateDataAppArgsSchema: z.ZodObject<{
17
20
  chartSlugs: string[] | null;
18
21
  }, {
19
22
  prompt: string;
20
- template: "custom" | "dashboard" | "pdf" | "slideshow" | null;
21
- dashboardSlug: string | null;
22
- chartSlugs: string[] | null;
23
+ template?: "custom" | "dashboard" | "pdf" | "slideshow" | null | undefined;
24
+ dashboardSlug?: string | null | undefined;
25
+ chartSlugs?: string[] | null | undefined;
23
26
  }>;
24
27
  export declare const toolGenerateDataAppOutputSchema: z.ZodObject<{
25
28
  result: z.ZodString;
@@ -55,12 +58,18 @@ export declare const toolGenerateDataAppOutputSchema: z.ZodObject<{
55
58
  href: string;
56
59
  }>, z.ZodObject<{
57
60
  status: z.ZodLiteral<"error">;
61
+ appUuid: z.ZodNullable<z.ZodString>;
62
+ reason: z.ZodEnum<["failed", "cancelled"]>;
58
63
  message: z.ZodString;
59
64
  }, "strip", z.ZodTypeAny, {
60
65
  status: "error";
66
+ appUuid: string | null;
67
+ reason: "cancelled" | "failed";
61
68
  message: string;
62
69
  }, {
63
70
  status: "error";
71
+ appUuid: string | null;
72
+ reason: "cancelled" | "failed";
64
73
  message: string;
65
74
  }>]>;
66
75
  }, "strip", z.ZodTypeAny, {
@@ -77,6 +86,8 @@ export declare const toolGenerateDataAppOutputSchema: z.ZodObject<{
77
86
  href: string;
78
87
  } | {
79
88
  status: "error";
89
+ appUuid: string | null;
90
+ reason: "cancelled" | "failed";
80
91
  message: string;
81
92
  };
82
93
  }, {
@@ -93,6 +104,8 @@ export declare const toolGenerateDataAppOutputSchema: z.ZodObject<{
93
104
  href: string;
94
105
  } | {
95
106
  status: "error";
107
+ appUuid: string | null;
108
+ reason: "cancelled" | "failed";
96
109
  message: string;
97
110
  };
98
111
  }>;
@@ -126,6 +139,6 @@ export declare const getGenerateDataAppBuildOutcome: ({ siteUrl, projectUuid, ap
126
139
  error: string | null;
127
140
  statusMessage: string | null;
128
141
  }) => ToolGenerateDataAppTerminalResult | null;
129
- export declare const getExpiredGenerateDataAppBuildOutcome: () => ToolGenerateDataAppTerminalResult;
142
+ export declare const getExpiredGenerateDataAppBuildOutcome: (appUuid: string) => ToolGenerateDataAppTerminalResult;
130
143
  export {};
131
144
  //# sourceMappingURL=toolGenerateDataAppArgs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolGenerateDataAppArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGH,KAAK,gBAAgB,EACxB,MAAM,qBAAqB,CAAC;AAE7B,kFAAkF;AAClF,eAAO,MAAM,kCAAkC,QAAiB,CAAC;AAEjE,eAAO,MAAM,wBAAwB,YACjC,WAAW,EACX,WAAW,EACX,KAAK,EACL,QAAQ,CACF,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E,eAAO,MAAM,kCAAkC,QAKpC,CAAC;AAEZ,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;EAwBxC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoB1C,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CACzC,OAAO,6BAA6B,CACvC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,+BAA+B,CACzC,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CACb,yBAAyB,CAAC,UAAU,CAAC,EACrC;QAAE,MAAM,EAAE,SAAS,CAAA;KAAE,CACxB,CAAC;CACL,CAAC;AAEF,KAAK,6BAA6B,GAAG;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EACF,yBAAyB,CAAC,UAAU,CAAC,GACrC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,IAAI,CAAC;CACd,CAAC;AAEF,KAAK,yBAAyB,GAAG,6BAA6B,GAAG;IAC7D,QAAQ,EAAE,UAAU,CAAC;IACrB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,EAAE,yBAAyB,CAAC,UAAU,CAAC,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACpC,CAAC,SAAS,6BAA6B,UAE/B,CAAC,KACV,MAAM,IAAI,CAAC,GAAG,yBAID,CAAC;AAEjB,eAAO,MAAM,qBAAqB,gBAAiB,MAAM,WAAW,MAAM,WAC5B,CAAC;AAI/C,eAAO,MAAM,8BAA8B,oFASxC;IACC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,KAAG,iCAAiC,GAAG,IAoBvC,CAAC;AAEF,eAAO,MAAM,qCAAqC,QAC1C,iCAQH,CAAC"}
1
+ {"version":3,"file":"toolGenerateDataAppArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGH,KAAK,gBAAgB,EAExB,MAAM,qBAAqB,CAAC;AAE7B,kFAAkF;AAClF,eAAO,MAAM,kCAAkC,QAAiB,CAAC;AAEjE,8FAA8F;AAC9F,eAAO,MAAM,wBAAwB,sDAKU,CAAC;AAChD,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAA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B,CAAC;AAI/C,eAAO,MAAM,8BAA8B,oFASxC;IACC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,KAAG,iCAAiC,GAAG,IAyBvC,CAAC;AAEF,eAAO,MAAM,qCAAqC,YACrC,MAAM,KAChB,iCAQF,CAAC"}
@@ -1,38 +1,44 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getExpiredGenerateDataAppBuildOutcome = exports.getGenerateDataAppBuildOutcome = exports.getDataAppBuilderPath = exports.isToolGenerateDataAppResult = exports.toolGenerateDataAppOutputSchema = exports.toolGenerateDataAppArgsSchema = exports.TOOL_GENERATE_DATA_APP_DESCRIPTION = exports.DATA_APP_BUILD_TEMPLATES = exports.AI_DATA_APP_BUILD_PENDING_GRACE_MS = void 0;
3
+ exports.getExpiredGenerateDataAppBuildOutcome = exports.getGenerateDataAppBuildOutcome = exports.getDataAppBuilderPath = exports.isToolGenerateDataAppResult = exports.toolGenerateDataAppOutputSchema = exports.toolGenerateDataAppArgsSchema = exports.TOOL_GENERATE_DATA_APP_DESCRIPTION = exports.DATA_APP_VIZ_LINE_FORMAT = exports.DATA_APP_BUILD_TEMPLATES = exports.AI_DATA_APP_BUILD_PENDING_GRACE_MS = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const types_1 = require("../../../apps/types");
6
6
  /** Builds run minutes, not seconds: a pending result older than this is stale. */
7
7
  exports.AI_DATA_APP_BUILD_PENDING_GRACE_MS = 30 * 60 * 1000;
8
+ /** Builder starter templates the AI agent may pick; the viz renderer template is internal. */
8
9
  exports.DATA_APP_BUILD_TEMPLATES = [
9
10
  'dashboard',
10
11
  'slideshow',
11
12
  'pdf',
12
13
  'custom',
13
14
  ];
15
+ /** How a prior visualization's query travels in the brief; shared with the system prompt. */
16
+ exports.DATA_APP_VIZ_LINE_FORMAT = '[viz title][explore; metrics; dimensions; filters; sort]';
14
17
  exports.TOOL_GENERATE_DATA_APP_DESCRIPTION = [
15
- "Start building a data app — an interactive application generated from a prompt on top of this project's semantic layer.",
16
- 'Use it ONLY when the user asks to build, make, or generate a data app (or an app, slide show, or PDF report). Do NOT use it for questions, charts, dashboards, or other saved content.',
17
- 'The build runs in the background for several minutes, so the call returns as soon as it has started (status: "pending"). Tell the user the build has started and that you will be able to link them to the app afterwards, then end your turn. Never wait, poll, or call this tool again for the same request: one request, one call.',
18
+ "Start building a data app — an interactive application generated from a brief on top of this project's semantic layer.",
19
+ 'Use it when the user asks to build, make, or generate a data app (or an app, slide show, or PDF report); questions, charts, dashboards, and other saved content have their own tools.',
20
+ 'The build runs in the background for several minutes, so the call returns as soon as it has started (status: "pending"). One request, one call: tell the user the build has started and that you will link them to the app afterwards, then end your turn — never wait, poll, or call this tool again for the same request.',
18
21
  'A later turn sees the outcome on this call\'s result: "success" carries the app name and the builder link (href) to share; "error" carries the failure message.',
19
22
  ].join(' ');
20
23
  exports.toolGenerateDataAppArgsSchema = zod_1.z.object({
21
24
  prompt: zod_1.z
22
25
  .string()
23
- .describe('A self-contained brief for the coding agent that builds the app: what the app shows, for whom, and how it should behave. Fold in what this thread found — for each visualization the app should include, add a line like `[viz name][metric query]` with the explore, metrics, dimensions, filters and sort. The coding agent sees the semantic layer but not this conversation, so include every detail it needs.'),
26
+ .describe(`A self-contained brief for the coding agent that builds the app: what the app shows, for whom, and how it behaves. Carry this thread's analysis in as a collection of visualizations — for each one, its title, a one-line description, and a metric query line \`${exports.DATA_APP_VIZ_LINE_FORMAT}\`. The coding agent sees the semantic layer but not this conversation, so include every detail it needs.`),
24
27
  template: zod_1.z
25
28
  .enum(exports.DATA_APP_BUILD_TEMPLATES)
26
- .nullable()
27
- .describe('Starting template: "dashboard" for a dashboard-style app, "slideshow" for a slide show, "pdf" for a PDF report, "custom" (or null) for anything else.'),
29
+ .nullish()
30
+ .default(null)
31
+ .describe('Starter template the builder would use: "dashboard" for a dashboard-style app, "slideshow" for a slide show, "pdf" for a PDF report, "custom" for anything else. Omit when the user did not ask for one.'),
28
32
  dashboardSlug: zod_1.z
29
33
  .string()
30
- .nullable()
31
- .describe("Generate from an existing dashboard: its slug (from findContent). The app starts from the dashboard's layout and charts. Null when not generating from a dashboard."),
34
+ .nullish()
35
+ .default(null)
36
+ .describe("Generate from an existing dashboard: its slug (from findContent). The app starts from the dashboard's layout and charts; the dashboard itself stays unchanged. Omit when not generating from a dashboard."),
32
37
  chartSlugs: zod_1.z
33
38
  .array(zod_1.z.string())
34
- .nullable()
35
- .describe('Saved charts (slugs from findContent) whose queries the app should be built on. Null when not building on saved charts.'),
39
+ .nullish()
40
+ .default(null)
41
+ .describe('Saved charts (slugs from findContent) whose queries the app is built on; the charts themselves stay unchanged. Omit when not building on saved charts.'),
36
42
  });
37
43
  exports.toolGenerateDataAppOutputSchema = zod_1.z.object({
38
44
  result: zod_1.z.string(),
@@ -51,6 +57,9 @@ exports.toolGenerateDataAppOutputSchema = zod_1.z.object({
51
57
  }),
52
58
  zod_1.z.object({
53
59
  status: zod_1.z.literal('error'),
60
+ // Null when the build never started, so no app exists to open.
61
+ appUuid: zod_1.z.string().nullable(),
62
+ reason: zod_1.z.enum(['failed', 'cancelled']),
54
63
  message: zod_1.z.string(),
55
64
  }),
56
65
  ]),
@@ -76,20 +85,26 @@ const getGenerateDataAppBuildOutcome = ({ siteUrl, projectUuid, appUuid, version
76
85
  metadata: { status: 'success', appUuid, version, name, href },
77
86
  };
78
87
  }
79
- const message = error === types_1.APP_VERSION_CANCELLED_BY_USER
88
+ const cancelled = error === types_1.APP_VERSION_CANCELLED_BY_USER;
89
+ const message = cancelled
80
90
  ? 'The build was cancelled.'
81
91
  : (statusMessage ?? 'The build failed.');
82
92
  return {
83
93
  result: `The data app build did not finish: ${message}`,
84
- metadata: { status: 'error', message },
94
+ metadata: {
95
+ status: 'error',
96
+ appUuid,
97
+ reason: cancelled ? 'cancelled' : 'failed',
98
+ message,
99
+ },
85
100
  };
86
101
  };
87
102
  exports.getGenerateDataAppBuildOutcome = getGenerateDataAppBuildOutcome;
88
- const getExpiredGenerateDataAppBuildOutcome = () => {
103
+ const getExpiredGenerateDataAppBuildOutcome = (appUuid) => {
89
104
  const message = `The build did not report an outcome within ${exports.AI_DATA_APP_BUILD_PENDING_GRACE_MS / 60000} minutes.`;
90
105
  return {
91
106
  result: `The data app build did not finish: ${message}`,
92
- metadata: { status: 'error', message },
107
+ metadata: { status: 'error', appUuid, reason: 'failed', message },
93
108
  };
94
109
  };
95
110
  exports.getExpiredGenerateDataAppBuildOutcome = getExpiredGenerateDataAppBuildOutcome;
@@ -1 +1 @@
1
- {"version":3,"file":"toolGenerateDataAppArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+CAI6B;AAE7B,kFAAkF;AACrE,QAAA,kCAAkC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEpD,QAAA,wBAAwB,GAAG;IACpC,WAAW;IACX,WAAW;IACX,KAAK;IACL,QAAQ;CACF,CAAC;AAGE,QAAA,kCAAkC,GAAG;IAC9C,yHAAyH;IACzH,wLAAwL;IACxL,uUAAuU;IACvU,iKAAiK;CACpK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEC,QAAA,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,MAAM,EAAE,OAAC;SACJ,MAAM,EAAE;SACR,QAAQ,CACL,oZAAoZ,CACvZ;IACL,QAAQ,EAAE,OAAC;SACN,IAAI,CAAC,QAAA,wBAAwB,CAAC;SAC9B,QAAQ,EAAE;SACV,QAAQ,CACL,u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,CAAC;IACZ,OAAO;QACH,MAAM,EAAE,sCAAsC,OAAO,EAAE;QACvD,QAAQ,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE;KACzC,CAAC;AACN,CAAC,CAAC;AATO,QAAA,qCAAqC,GAArC,qCAAqC,CAS5C"}
1
+ {"version":3,"file":"toolGenerateDataAppArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+CAK6B;AAE7B,kFAAkF;AACrE,QAAA,kCAAkC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEjE,8FAA8F;AACjF,QAAA,wBAAwB,GAAG;IACpC,WAAW;IACX,WAAW;IACX,KAAK;IACL,QAAQ;CACmC,CAAC;AAGhD,6FAA6F;AAChF,QAAA,wBAAwB,GACjC,0DAA0D,CAAC;AAElD,QAAA,kCAAkC,GAAG;IAC9C,wHAAwH;IACxH,uLAAuL;IACvL,6TAA6T;IAC7T,iKAAiK;CACpK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEC,QAAA,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,MAAM,EAAE,OAAC;SACJ,MAAM,EAAE;SACR,QAAQ,CACL,qQAAqQ,QAAA,wBAAwB,2GAA2G,CAC3Y;IACL,QAAQ,EAAE,OAAC;SACN,IAAI,CAAC,QAAA,wBAAwB,CAAC;SAC9B,OAAO,EAAE;SACT,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CACL,0MAA0M,CAC7M;IACL,aAAa,EAAE,OAAC;SACX,MAAM,EAAE;SACR,OAAO,EAAE;SACT,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CACL,2MAA2M,CAC9M;IACL,UAAU,EAAE,OAAC;SACR,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACjB,OAAO,EAAE;SACT,OAAO,CAAC,IAAI,CAAC;SACb,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AAG,CACjD,OAAe,EACkB,EAAE;IACnC,MAAM,OAAO,GAAG,8CACZ,QAAA,kCAAkC,GAAG,KACzC,WAAW,CAAC;IACZ,OAAO;QACH,MAAM,EAAE,sCAAsC,OAAO,EAAE;QACvD,QAAQ,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE;KACpE,CAAC;AACN,CAAC,CAAC;AAVW,QAAA,qCAAqC,GAArC,qCAAqC,CAUhD"}
@@ -33,6 +33,8 @@ describe('getGenerateDataAppBuildOutcome', () => {
33
33
  statusMessage: 'Failed to deploy your app. Please try again.',
34
34
  })?.metadata).toEqual({
35
35
  status: 'error',
36
+ appUuid: 'app-1',
37
+ reason: 'failed',
36
38
  message: 'Failed to deploy your app. Please try again.',
37
39
  });
38
40
  });
@@ -42,7 +44,12 @@ describe('getGenerateDataAppBuildOutcome', () => {
42
44
  status: 'error',
43
45
  error: types_1.APP_VERSION_CANCELLED_BY_USER,
44
46
  statusMessage: types_1.APP_VERSION_CANCELLED_BY_USER,
45
- })?.metadata).toEqual({ status: 'error', message: 'The build was cancelled.' });
47
+ })?.metadata).toEqual({
48
+ status: 'error',
49
+ appUuid: 'app-1',
50
+ reason: 'cancelled',
51
+ message: 'The build was cancelled.',
52
+ });
46
53
  });
47
54
  });
48
55
  //# sourceMappingURL=toolGenerateDataAppArgs.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolGenerateDataAppArgs.test.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.test.ts"],"names":[],"mappings":";;AAAA,+CAAoE;AACpE,uEAA2E;AAE3E,MAAM,IAAI,GAAG;IACT,OAAO,EAAE,wBAAwB;IACjC,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,CAAC;IACV,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,IAAI;IACX,aAAa,EAAE,IAAI;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C,CAAC,CAAC"}
1
+ {"version":3,"file":"toolGenerateDataAppArgs.test.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.test.ts"],"names":[],"mappings":";;AAAA,+CAAoE;AACpE,uEAA2E;AAE3E,MAAM,IAAI,GAAG;IACT,OAAO,EAAE,wBAAwB;IACjC,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,CAAC;IACV,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,IAAI;IACX,aAAa,EAAE,IAAI;CACtB,CAAC;AAEF,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;IAC5C,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;QAC9C,MAAM,CACF,IAAA,wDAA8B,EAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CACpE,CAAC,QAAQ,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACnD,MAAM,CACF,IAAA,wDAA8B,EAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;YACxD,EAAE,QAAQ,CACjB,CAAC,OAAO,CAAC;YACN,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,CAAC;YACV,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,mDAAmD;SAC5D,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC5D,MAAM,CACF,IAAA,wDAA8B,EAAC;YAC3B,GAAG,IAAI;YACP,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,aAAa;YACpB,aAAa,EAAE,8CAA8C;SAChE,CAAC,EAAE,QAAQ,CACf,CAAC,OAAO,CAAC;YACN,MAAM,EAAE,OAAO;YACf,OAAO,EAAE,OAAO;YAChB,MAA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