@lightdash/common 2.362.2 → 2.363.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 (112) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts +66 -3
  3. package/dist/cjs/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts.map +1 -1
  4. package/dist/cjs/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js +47 -3
  5. package/dist/cjs/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js.map +1 -1
  6. package/dist/cjs/ee/AiAgent/schemas/tools/toolLoadMcpToolsArgs.d.ts +38 -3
  7. package/dist/cjs/ee/AiAgent/schemas/tools/toolLoadMcpToolsArgs.d.ts.map +1 -1
  8. package/dist/cjs/ee/AiAgent/schemas/tools/toolLoadMcpToolsArgs.js +18 -3
  9. package/dist/cjs/ee/AiAgent/schemas/tools/toolLoadMcpToolsArgs.js.map +1 -1
  10. package/dist/cjs/ee/AiAgent/schemas/tools/toolLoadProjectContextArgs.d.ts +117 -3
  11. package/dist/cjs/ee/AiAgent/schemas/tools/toolLoadProjectContextArgs.d.ts.map +1 -1
  12. package/dist/cjs/ee/AiAgent/schemas/tools/toolLoadProjectContextArgs.js +58 -3
  13. package/dist/cjs/ee/AiAgent/schemas/tools/toolLoadProjectContextArgs.js.map +1 -1
  14. package/dist/cjs/ee/AiAgent/schemas/tools/toolLoadSkillArgs.d.ts +62 -3
  15. package/dist/cjs/ee/AiAgent/schemas/tools/toolLoadSkillArgs.d.ts.map +1 -1
  16. package/dist/cjs/ee/AiAgent/schemas/tools/toolLoadSkillArgs.js +29 -3
  17. package/dist/cjs/ee/AiAgent/schemas/tools/toolLoadSkillArgs.js.map +1 -1
  18. package/dist/cjs/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts +57 -0
  19. package/dist/cjs/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts.map +1 -1
  20. package/dist/cjs/ee/AiAgent/schemas/tools/toolReadContentArgs.js +35 -1
  21. package/dist/cjs/ee/AiAgent/schemas/tools/toolReadContentArgs.js.map +1 -1
  22. package/dist/cjs/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.d.ts +27 -0
  23. package/dist/cjs/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.d.ts.map +1 -1
  24. package/dist/cjs/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.js +27 -1
  25. package/dist/cjs/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.js.map +1 -1
  26. package/dist/cjs/ee/AiAgent/schemas/tools/toolResolveUrlArgs.d.ts +39 -3
  27. package/dist/cjs/ee/AiAgent/schemas/tools/toolResolveUrlArgs.d.ts.map +1 -1
  28. package/dist/cjs/ee/AiAgent/schemas/tools/toolResolveUrlArgs.js +18 -3
  29. package/dist/cjs/ee/AiAgent/schemas/tools/toolResolveUrlArgs.js.map +1 -1
  30. package/dist/cjs/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.d.ts +98 -3
  31. package/dist/cjs/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.d.ts.map +1 -1
  32. package/dist/cjs/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.js +59 -3
  33. package/dist/cjs/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.js.map +1 -1
  34. package/dist/cjs/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts +40 -3
  35. package/dist/cjs/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts.map +1 -1
  36. package/dist/cjs/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.js +21 -3
  37. package/dist/cjs/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.js.map +1 -1
  38. package/dist/esm/.tsbuildinfo +1 -1
  39. package/dist/esm/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts +66 -3
  40. package/dist/esm/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts.map +1 -1
  41. package/dist/esm/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js +46 -2
  42. package/dist/esm/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js.map +1 -1
  43. package/dist/esm/ee/AiAgent/schemas/tools/toolLoadMcpToolsArgs.d.ts +38 -3
  44. package/dist/esm/ee/AiAgent/schemas/tools/toolLoadMcpToolsArgs.d.ts.map +1 -1
  45. package/dist/esm/ee/AiAgent/schemas/tools/toolLoadMcpToolsArgs.js +18 -3
  46. package/dist/esm/ee/AiAgent/schemas/tools/toolLoadMcpToolsArgs.js.map +1 -1
  47. package/dist/esm/ee/AiAgent/schemas/tools/toolLoadProjectContextArgs.d.ts +117 -3
  48. package/dist/esm/ee/AiAgent/schemas/tools/toolLoadProjectContextArgs.d.ts.map +1 -1
  49. package/dist/esm/ee/AiAgent/schemas/tools/toolLoadProjectContextArgs.js +58 -3
  50. package/dist/esm/ee/AiAgent/schemas/tools/toolLoadProjectContextArgs.js.map +1 -1
  51. package/dist/esm/ee/AiAgent/schemas/tools/toolLoadSkillArgs.d.ts +62 -3
  52. package/dist/esm/ee/AiAgent/schemas/tools/toolLoadSkillArgs.d.ts.map +1 -1
  53. package/dist/esm/ee/AiAgent/schemas/tools/toolLoadSkillArgs.js +29 -3
  54. package/dist/esm/ee/AiAgent/schemas/tools/toolLoadSkillArgs.js.map +1 -1
  55. package/dist/esm/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts +57 -0
  56. package/dist/esm/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts.map +1 -1
  57. package/dist/esm/ee/AiAgent/schemas/tools/toolReadContentArgs.js +34 -0
  58. package/dist/esm/ee/AiAgent/schemas/tools/toolReadContentArgs.js.map +1 -1
  59. package/dist/esm/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.d.ts +27 -0
  60. package/dist/esm/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.d.ts.map +1 -1
  61. package/dist/esm/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.js +26 -0
  62. package/dist/esm/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.js.map +1 -1
  63. package/dist/esm/ee/AiAgent/schemas/tools/toolResolveUrlArgs.d.ts +39 -3
  64. package/dist/esm/ee/AiAgent/schemas/tools/toolResolveUrlArgs.d.ts.map +1 -1
  65. package/dist/esm/ee/AiAgent/schemas/tools/toolResolveUrlArgs.js +18 -3
  66. package/dist/esm/ee/AiAgent/schemas/tools/toolResolveUrlArgs.js.map +1 -1
  67. package/dist/esm/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.d.ts +98 -3
  68. package/dist/esm/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.d.ts.map +1 -1
  69. package/dist/esm/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.js +59 -3
  70. package/dist/esm/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.js.map +1 -1
  71. package/dist/esm/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts +40 -3
  72. package/dist/esm/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts.map +1 -1
  73. package/dist/esm/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.js +21 -3
  74. package/dist/esm/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.js.map +1 -1
  75. package/dist/types/.tsbuildinfo +1 -1
  76. package/dist/types/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts +66 -3
  77. package/dist/types/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts.map +1 -1
  78. package/dist/types/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js +46 -2
  79. package/dist/types/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js.map +1 -1
  80. package/dist/types/ee/AiAgent/schemas/tools/toolLoadMcpToolsArgs.d.ts +38 -3
  81. package/dist/types/ee/AiAgent/schemas/tools/toolLoadMcpToolsArgs.d.ts.map +1 -1
  82. package/dist/types/ee/AiAgent/schemas/tools/toolLoadMcpToolsArgs.js +18 -3
  83. package/dist/types/ee/AiAgent/schemas/tools/toolLoadMcpToolsArgs.js.map +1 -1
  84. package/dist/types/ee/AiAgent/schemas/tools/toolLoadProjectContextArgs.d.ts +117 -3
  85. package/dist/types/ee/AiAgent/schemas/tools/toolLoadProjectContextArgs.d.ts.map +1 -1
  86. package/dist/types/ee/AiAgent/schemas/tools/toolLoadProjectContextArgs.js +58 -3
  87. package/dist/types/ee/AiAgent/schemas/tools/toolLoadProjectContextArgs.js.map +1 -1
  88. package/dist/types/ee/AiAgent/schemas/tools/toolLoadSkillArgs.d.ts +62 -3
  89. package/dist/types/ee/AiAgent/schemas/tools/toolLoadSkillArgs.d.ts.map +1 -1
  90. package/dist/types/ee/AiAgent/schemas/tools/toolLoadSkillArgs.js +29 -3
  91. package/dist/types/ee/AiAgent/schemas/tools/toolLoadSkillArgs.js.map +1 -1
  92. package/dist/types/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts +57 -0
  93. package/dist/types/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts.map +1 -1
  94. package/dist/types/ee/AiAgent/schemas/tools/toolReadContentArgs.js +34 -0
  95. package/dist/types/ee/AiAgent/schemas/tools/toolReadContentArgs.js.map +1 -1
  96. package/dist/types/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.d.ts +27 -0
  97. package/dist/types/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.d.ts.map +1 -1
  98. package/dist/types/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.js +26 -0
  99. package/dist/types/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.js.map +1 -1
  100. package/dist/types/ee/AiAgent/schemas/tools/toolResolveUrlArgs.d.ts +39 -3
  101. package/dist/types/ee/AiAgent/schemas/tools/toolResolveUrlArgs.d.ts.map +1 -1
  102. package/dist/types/ee/AiAgent/schemas/tools/toolResolveUrlArgs.js +18 -3
  103. package/dist/types/ee/AiAgent/schemas/tools/toolResolveUrlArgs.js.map +1 -1
  104. package/dist/types/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.d.ts +98 -3
  105. package/dist/types/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.d.ts.map +1 -1
  106. package/dist/types/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.js +59 -3
  107. package/dist/types/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.js.map +1 -1
  108. package/dist/types/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts +40 -3
  109. package/dist/types/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts.map +1 -1
  110. package/dist/types/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.js +21 -3
  111. package/dist/types/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.js.map +1 -1
  112. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toolLoadSkillOutputSchema = exports.servedSkillMetadataSchema = exports.toolLoadSkillArgsSchema = exports.TOOL_LOAD_SKILL_DESCRIPTION = void 0;
3
+ exports.toolLoadSkillOutputSchema = exports.toolLoadSkillStructuredContentSchema = exports.servedSkillMetadataSchema = exports.toolLoadSkillArgsSchema = exports.TOOL_LOAD_SKILL_DESCRIPTION = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const outputMetadata_1 = require("../outputMetadata");
6
6
  exports.TOOL_LOAD_SKILL_DESCRIPTION = 'Load a skill by name, or one of its resources. Always load the skill itself first, then resources on demand. When the skill takes arguments, pass what the user asked for in `arguments` so its placeholders are filled.';
@@ -24,10 +24,36 @@ exports.servedSkillMetadataSchema = zod_1.z.object({
24
24
  versionNumber: zod_1.z.number().nullable(),
25
25
  contentHash: zod_1.z.string().nullable(),
26
26
  });
27
- exports.toolLoadSkillOutputSchema = zod_1.z.object({
28
- result: zod_1.z.string(),
27
+ const toolLoadSkillResourceReferenceSchema = zod_1.z.object({
28
+ name: zod_1.z
29
+ .string()
30
+ .describe('Resource name to pass as `resourceName` to load it.'),
31
+ description: zod_1.z.string(),
32
+ });
33
+ exports.toolLoadSkillStructuredContentSchema = zod_1.z.discriminatedUnion('kind', [
34
+ zod_1.z.object({
35
+ kind: zod_1.z.literal('skill'),
36
+ skill: zod_1.z.string().describe('Name of the loaded skill.'),
37
+ body: zod_1.z.string().describe('The skill instructions.'),
38
+ resources: zod_1.z
39
+ .array(toolLoadSkillResourceReferenceSchema)
40
+ .describe('Sub-resources the skill offers; empty when it has none.'),
41
+ }),
42
+ zod_1.z.object({
43
+ kind: zod_1.z.literal('resource'),
44
+ skill: zod_1.z
45
+ .string()
46
+ .describe('Name of the skill the resource belongs to.'),
47
+ resource: zod_1.z.object({
48
+ name: zod_1.z.string(),
49
+ content: zod_1.z.string().describe('The resource file contents.'),
50
+ }),
51
+ }),
52
+ ]);
53
+ exports.toolLoadSkillOutputSchema = (0, outputMetadata_1.structuredToolOutputSchema)({
29
54
  metadata: outputMetadata_1.baseOutputMetadataSchema.extend({
30
55
  skill: exports.servedSkillMetadataSchema.optional(),
31
56
  }),
57
+ structuredContent: exports.toolLoadSkillStructuredContentSchema,
32
58
  });
33
59
  //# sourceMappingURL=toolLoadSkillArgs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolLoadSkillArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolLoadSkillArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sDAA6D;AAEhD,QAAA,2BAA2B,GACpC,0NAA0N,CAAC;AAElN,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IACpE,SAAS,EAAE,OAAC;SACP,MAAM,EAAE;SACR,OAAO,EAAE;SACT,QAAQ,CACL,+GAA+G,CAClH;IACL,YAAY,EAAE,OAAC;SACV,MAAM,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E,CAAC,QAAQ,CAAC,6BAA6B,CAAC;SAC9D,CAAC;KACL,CAAC;CACL,CACJ,CAAC;AACW,QAAA,yBAAyB,GAAG,IAAA,2CAA0B,EAAC;IAChE,QAAQ,EAAE,yCAAwB,CAAC,MAAM,CAAC;QACtC,KAAK,EAAE,QAAA,yBAAyB,CAAC,QAAQ,EAAE;KAC9C,CAAC;IACF,iBAAiB,EAAE,QAAA,oCAAoC;CAC1D,CAAC,CAAC"}
@@ -8,6 +8,33 @@ export declare const toolReadContentArgsSchema: z.ZodObject<{
8
8
  data_app: "data_app";
9
9
  }>;
10
10
  }, z.core.$strip>;
11
+ export declare const toolReadContentStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
12
+ slug: z.ZodString;
13
+ name: z.ZodString;
14
+ href: z.ZodString;
15
+ type: z.ZodLiteral<"dashboard">;
16
+ content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
17
+ }, z.core.$strip>, z.ZodObject<{
18
+ slug: z.ZodString;
19
+ name: z.ZodString;
20
+ href: z.ZodString;
21
+ type: z.ZodLiteral<"chart">;
22
+ content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
23
+ }, z.core.$strip>, z.ZodObject<{
24
+ slug: z.ZodString;
25
+ name: z.ZodString;
26
+ href: z.ZodString;
27
+ type: z.ZodLiteral<"data_app">;
28
+ content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
29
+ }, z.core.$strip>, z.ZodObject<{
30
+ slug: z.ZodString;
31
+ name: z.ZodString;
32
+ href: z.ZodString;
33
+ type: z.ZodLiteral<"document">;
34
+ uuid: z.ZodString;
35
+ versionUuid: z.ZodString;
36
+ content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
37
+ }, z.core.$strip>], "type">;
11
38
  export declare const toolReadContentOutputSchema: z.ZodObject<{
12
39
  result: z.ZodString;
13
40
  metadata: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -18,10 +45,40 @@ export declare const toolReadContentOutputSchema: z.ZodObject<{
18
45
  name: z.ZodString;
19
46
  href: z.ZodString;
20
47
  }, z.core.$strip>], "status">;
48
+ structuredContent: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
49
+ slug: z.ZodString;
50
+ name: z.ZodString;
51
+ href: z.ZodString;
52
+ type: z.ZodLiteral<"dashboard">;
53
+ content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
54
+ }, z.core.$strip>, z.ZodObject<{
55
+ slug: z.ZodString;
56
+ name: z.ZodString;
57
+ href: z.ZodString;
58
+ type: z.ZodLiteral<"chart">;
59
+ content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
60
+ }, z.core.$strip>, z.ZodObject<{
61
+ slug: z.ZodString;
62
+ name: z.ZodString;
63
+ href: z.ZodString;
64
+ type: z.ZodLiteral<"data_app">;
65
+ content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
66
+ }, z.core.$strip>, z.ZodObject<{
67
+ slug: z.ZodString;
68
+ name: z.ZodString;
69
+ href: z.ZodString;
70
+ type: z.ZodLiteral<"document">;
71
+ uuid: z.ZodString;
72
+ versionUuid: z.ZodString;
73
+ content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
74
+ }, z.core.$strip>], "type">, z.ZodObject<{
75
+ error: z.ZodString;
76
+ }, z.core.$strip>]>;
21
77
  }, z.core.$strip>;
22
78
  export type ToolReadContentArgs = z.infer<typeof toolReadContentArgsSchema>;
23
79
  export type ReadContentType = ToolReadContentArgs['type'];
24
80
  /** Human labels for tool-call UI copy. */
25
81
  export declare const READ_CONTENT_TYPE_LABELS: Record<ReadContentType, string>;
82
+ export type ToolReadContentStructuredContent = z.infer<typeof toolReadContentStructuredContentSchema>;
26
83
  export type ToolReadContentOutput = z.infer<typeof toolReadContentOutputSchema>;
27
84
  //# sourceMappingURL=toolReadContentArgs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolReadContentArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolReadContentArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,6BAA6B,mKAC0H,CAAC;AAErK,eAAO,MAAM,yBAAyB;;;;;;;iBAQpC,CAAC;AAYH,eAAO,MAAM,2BAA2B;;;;;;;;;;iBAGtC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAE1D,0CAA0C;AAC1C,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAIpE,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
1
+ {"version":3,"file":"toolReadContentArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolReadContentArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,6BAA6B,mKAC0H,CAAC;AAErK,eAAO,MAAM,yBAAyB;;;;;;;iBAQpC,CAAC;AAoBH,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;2BAkClD,CAAC;AAGF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOtC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAE1D,0CAA0C;AAC1C,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAIpE,CAAC;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,sCAAsC,CAChD,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.READ_CONTENT_TYPE_LABELS = exports.toolReadContentOutputSchema = exports.toolReadContentArgsSchema = exports.TOOL_READ_CONTENT_DESCRIPTION = void 0;
3
+ exports.READ_CONTENT_TYPE_LABELS = exports.toolReadContentOutputSchema = exports.toolReadContentStructuredContentSchema = exports.toolReadContentArgsSchema = exports.TOOL_READ_CONTENT_DESCRIPTION = void 0;
4
4
  const zod_1 = require("zod");
5
+ const outputMetadata_1 = require("../outputMetadata");
5
6
  exports.TOOL_READ_CONTENT_DESCRIPTION = 'Read a dashboard, chart, or data app as JSON using its slug. Call this before editing a dashboard or chart. Data apps are read-only and returned without code.';
6
7
  exports.toolReadContentArgsSchema = zod_1.z.object({
7
8
  slug: zod_1.z
@@ -21,9 +22,42 @@ const toolReadContentMetadataSchema = zod_1.z.discriminatedUnion('status', [
21
22
  href: zod_1.z.string(),
22
23
  }),
23
24
  ]);
25
+ const readContentBaseSchema = zod_1.z.object({
26
+ slug: zod_1.z.string().describe('Slug of the content that was read.'),
27
+ name: zod_1.z.string().describe('Display name of the content.'),
28
+ href: zod_1.z.string().describe('Canonical Lightdash URL of the content.'),
29
+ });
30
+ const contentJsonSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.unknown());
31
+ exports.toolReadContentStructuredContentSchema = zod_1.z.discriminatedUnion('type', [
32
+ readContentBaseSchema.extend({
33
+ type: zod_1.z.literal('dashboard'),
34
+ content: contentJsonSchema.describe('Dashboard as code JSON, exactly as shown in `result`.'),
35
+ }),
36
+ readContentBaseSchema.extend({
37
+ type: zod_1.z.literal('chart'),
38
+ content: contentJsonSchema.describe('Chart as code JSON, exactly as shown in `result`.'),
39
+ }),
40
+ readContentBaseSchema.extend({
41
+ type: zod_1.z.literal('data_app'),
42
+ content: contentJsonSchema.describe('Read-only data app JSON (no code), exactly as shown in `result`.'),
43
+ }),
44
+ readContentBaseSchema.extend({
45
+ type: zod_1.z.literal('document'),
46
+ uuid: zod_1.z.string().describe('UUID of the Document.'),
47
+ versionUuid: zod_1.z
48
+ .string()
49
+ .describe('Latest version UUID of the Document; use it as baseVersionUuid for cell edits.'),
50
+ content: contentJsonSchema.describe('Document as code JSON (schema version 1), exactly as shown in `result`.'),
51
+ }),
52
+ ]);
53
+ // Same envelope as structuredToolOutputSchema, which only accepts object metadata.
24
54
  exports.toolReadContentOutputSchema = zod_1.z.object({
25
55
  result: zod_1.z.string(),
26
56
  metadata: toolReadContentMetadataSchema,
57
+ structuredContent: zod_1.z.union([
58
+ exports.toolReadContentStructuredContentSchema,
59
+ outputMetadata_1.toolErrorStructuredContentSchema,
60
+ ]),
27
61
  });
28
62
  /** Human labels for tool-call UI copy. */
29
63
  exports.READ_CONTENT_TYPE_LABELS = {
@@ -1 +1 @@
1
- {"version":3,"file":"toolReadContentArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolReadContentArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,6BAA6B,GACtC,gKAAgK,CAAC;AAExJ,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,OAAC;SACF,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,oDAAoD,CAAC;IACnE,IAAI,EAAE,OAAC;SACF,IAAI,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;SACxC,QAAQ,CAAC,oCAAoC,CAAC;CACtD,CAAC,CAAC;AAEH,MAAM,6BAA6B,GAAG,OAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IACjE,OAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;IACxC,OAAC,CAAC,MAAM,CAAC;QACL,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAC5B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;KACnB,CAAC;CACL,CAAC,CAAC;AAEU,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,6BAA6B;CAC1C,CAAC,CAAC;AAKH,0CAA0C;AAC7B,QAAA,wBAAwB,GAAoC;IACrE,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACvB,CAAC"}
1
+ {"version":3,"file":"toolReadContentArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolReadContentArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sDAAqE;AAExD,QAAA,6BAA6B,GACtC,gKAAgK,CAAC;AAExJ,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,OAAC;SACF,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,oDAAoD,CAAC;IACnE,IAAI,EAAE,OAAC;SACF,IAAI,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;SACxC,QAAQ,CAAC,oCAAoC,CAAC;CACtD,CAAC,CAAC;AAEH,MAAM,6BAA6B,GAAG,OAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IACjE,OAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;IACxC,OAAC,CAAC,MAAM,CAAC;QACL,MAAM,EAAE,OAAC,CAAC,O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AAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QAClD,WAAW,EAAE,OAAC;aACT,MAAM,EAAE;aACR,QAAQ,CACL,gFAAgF,CACnF;QACL,OAAO,EAAE,iBAAiB,CAAC,QAAQ,CAC/B,yEAAyE,CAC5E;KACJ,CAAC;CACL,CACJ,CAAC;AAEF,mFAAmF;AACtE,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,6BAA6B;IACvC,iBAAiB,EAAE,OAAC,CAAC,KAAK,CAAC;QACvB,QAAA,sCAAsC;QACtC,iDAAgC;KACnC,CAAC;CACL,CAAC,CAAC;AAKH,0CAA0C;AAC7B,QAAA,wBAAwB,GAAoC;IACrE,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACvB,CAAC"}
@@ -4,6 +4,18 @@ export declare const TOOL_READ_PINNED_THREAD_DESCRIPTION: ({ toolName, }: ToolDe
4
4
  export declare const toolReadPinnedThreadArgsSchema: z.ZodObject<{
5
5
  threadUuid: z.ZodString;
6
6
  }, z.core.$strip>;
7
+ export declare const toolReadPinnedThreadStructuredContentSchema: z.ZodObject<{
8
+ threadUuid: z.ZodString;
9
+ messages: z.ZodArray<z.ZodObject<{
10
+ index: z.ZodNumber;
11
+ role: z.ZodEnum<{
12
+ assistant: "assistant";
13
+ user: "user";
14
+ }>;
15
+ createdAt: z.ZodString;
16
+ message: z.ZodString;
17
+ }, z.core.$strip>>;
18
+ }, z.core.$strip>;
7
19
  export declare const toolReadPinnedThreadOutputSchema: z.ZodObject<{
8
20
  result: z.ZodString;
9
21
  metadata: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -12,7 +24,22 @@ export declare const toolReadPinnedThreadOutputSchema: z.ZodObject<{
12
24
  }, z.core.$strip>, z.ZodObject<{
13
25
  status: z.ZodLiteral<"error">;
14
26
  }, z.core.$strip>], "status">;
27
+ structuredContent: z.ZodUnion<readonly [z.ZodObject<{
28
+ threadUuid: z.ZodString;
29
+ messages: z.ZodArray<z.ZodObject<{
30
+ index: z.ZodNumber;
31
+ role: z.ZodEnum<{
32
+ assistant: "assistant";
33
+ user: "user";
34
+ }>;
35
+ createdAt: z.ZodString;
36
+ message: z.ZodString;
37
+ }, z.core.$strip>>;
38
+ }, z.core.$strip>, z.ZodObject<{
39
+ error: z.ZodString;
40
+ }, z.core.$strip>]>;
15
41
  }, z.core.$strip>;
16
42
  export type ToolReadPinnedThreadArgs = z.infer<typeof toolReadPinnedThreadArgsSchema>;
43
+ export type ToolReadPinnedThreadStructuredContent = z.infer<typeof toolReadPinnedThreadStructuredContentSchema>;
17
44
  export type ToolReadPinnedThreadOutput = z.infer<typeof toolReadPinnedThreadOutputSchema>;
18
45
  //# sourceMappingURL=toolReadPinnedThreadArgs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolReadPinnedThreadArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAG5D,eAAO,MAAM,mCAAmC,kBAE7C,sBAAsB,KAAG,MAkB3B,CAAC;AAEF,eAAO,MAAM,8BAA8B;;iBAO/B,CAAC;AAEb,eAAO,MAAM,gCAAgC;;;;;;;;iBAW3C,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,8BAA8B,CACxC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,gCAAgC,CAC1C,CAAC"}
1
+ {"version":3,"file":"toolReadPinnedThreadArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAI5D,eAAO,MAAM,mCAAmC,kBAE7C,sBAAsB,KAAG,MAkB3B,CAAC;AAEF,eAAO,MAAM,8BAA8B;;iBAO/B,CAAC;AAEb,eAAO,MAAM,2CAA2C;;;;;;;;;;;iBAsBtD,CAAC;AAIH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;iBAe3C,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,8BAA8B,CACxC,CAAC;AAEF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,2CAA2C,CACrD,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,gCAAgC,CAC1C,CAAC"}
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toolReadPinnedThreadOutputSchema = exports.toolReadPinnedThreadArgsSchema = exports.TOOL_READ_PINNED_THREAD_DESCRIPTION = void 0;
3
+ exports.toolReadPinnedThreadOutputSchema = exports.toolReadPinnedThreadStructuredContentSchema = exports.toolReadPinnedThreadArgsSchema = exports.TOOL_READ_PINNED_THREAD_DESCRIPTION = void 0;
4
4
  const zod_1 = require("zod");
5
+ const outputMetadata_1 = require("../outputMetadata");
5
6
  const toolSchemaBuilder_1 = require("../toolSchemaBuilder");
6
7
  const TOOL_READ_PINNED_THREAD_DESCRIPTION = ({ toolName, }) => `Tool: ${toolName}
7
8
 
@@ -31,6 +32,27 @@ exports.toolReadPinnedThreadArgsSchema = (0, toolSchemaBuilder_1.createToolSchem
31
32
  .describe('Uuid of the pinned conversation to read.'),
32
33
  })
33
34
  .build();
35
+ exports.toolReadPinnedThreadStructuredContentSchema = zod_1.z.object({
36
+ threadUuid: zod_1.z
37
+ .string()
38
+ .describe('Uuid of the pinned conversation that was read.'),
39
+ messages: zod_1.z
40
+ .array(zod_1.z.object({
41
+ index: zod_1.z
42
+ .number()
43
+ .describe('Zero-based position in the transcript.'),
44
+ role: zod_1.z.enum(['user', 'assistant']),
45
+ createdAt: zod_1.z
46
+ .string()
47
+ .describe('ISO timestamp of when the message was sent.'),
48
+ message: zod_1.z
49
+ .string()
50
+ .describe('Message text, cut to the same per-message and transcript budget as `result`.'),
51
+ }))
52
+ .describe('The transcript in chronological order.'),
53
+ });
54
+ // Composed by hand: `structuredToolOutputSchema` only accepts object metadata,
55
+ // and this tool's metadata is a discriminated union that must stay unchanged.
34
56
  exports.toolReadPinnedThreadOutputSchema = zod_1.z.object({
35
57
  result: zod_1.z.string(),
36
58
  metadata: zod_1.z.discriminatedUnion('status', [
@@ -42,5 +64,9 @@ exports.toolReadPinnedThreadOutputSchema = zod_1.z.object({
42
64
  status: zod_1.z.literal('error'),
43
65
  }),
44
66
  ]),
67
+ structuredContent: zod_1.z.union([
68
+ exports.toolReadPinnedThreadStructuredContentSchema,
69
+ outputMetadata_1.toolErrorStructuredContentSchema,
70
+ ]),
45
71
  });
46
72
  //# sourceMappingURL=toolReadPinnedThreadArgs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolReadPinnedThreadArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,4DAAwD;AAEjD,MAAM,mCAAmC,GAAG,CAAC,EAChD,QAAQ,GACa,EAAU,EAAE,CAAC,SAAS,QAAQ;;;;;;;;;;;;;;;;;;CAkBtD,CAAC;AApBW,QAAA,mCAAmC,GAAnC,mCAAmC,CAoB9C;AAEW,QAAA,8BAA8B,GAAG,IAAA,oCAAgB,GAAE;KAC3D,MAAM,CAAC;IACJ,UAAU,EAAE,OAAC;SACR,MAAM,EAAE;SACR,IAAI,EAAE;SACN,QAAQ,CAAC,0CAA0C,CAAC;CAC5D,CAAC;KACD,KAAK,EAAE,CAAC;AAEA,QAAA,gCAAgC,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,OAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;QACrC,OAAC,CAAC,MAAM,CAAC;YACL,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC;YAC5B,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;SAC3B,CAAC;QACF,OAAC,CAAC,MAAM,CAAC;YACL,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;SAC7B,CAAC;KACL,CAAC;CACL,CAAC,CAAC"}
1
+ {"version":3,"file":"toolReadPinnedThreadArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolReadPinnedThreadArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAAqE;AACrE,4DAAwD;AAEjD,MAAM,mCAAmC,GAAG,CAAC,EAChD,QAAQ,GACa,EAAU,EAAE,CAAC,SAAS,QAAQ;;;;;;;;;;;;;;;;;;CAkBtD,CAAC;AApBW,QAAA,mCAAmC,GAAnC,mCAAmC,CAoB9C;AAEW,QAAA,8BAA8B,GAAG,IAAA,oCAAgB,GAAE;KAC3D,MAAM,CAAC;IACJ,UAAU,EAAE,OAAC;SACR,MAAM,EAAE;SACR,IAAI,EAAE;SACN,QAAQ,CAAC,0CAA0C,CAAC;CAC5D,CAAC;KACD,KAAK,EAAE,CAAC;AAEA,QAAA,2CAA2C,GAAG,OAAC,CAAC,MAAM,CAAC;IAChE,UAAU,EAAE,OAAC;SACR,MAAM,EAAE;SACR,QAAQ,CAAC,gDAAgD,CAAC;IAC/D,QAAQ,EAAE,OAAC;SACN,KAAK,CACF,OAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,OAAC;aACH,MAAM,EAAE;aACR,QAAQ,CAAC,wCAAwC,CAAC;QACvD,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACnC,SAAS,EAAE,OAAC;aACP,MAAM,EAAE;aACR,QAAQ,CAAC,6CAA6C,CAAC;QAC5D,OAAO,EAAE,OAAC;aACL,MAAM,EAAE;aACR,QAAQ,CACL,8EAA8E,CACjF;KACR,CAAC,CACL;SACA,QAAQ,CAAC,wCAAwC,CAAC;CAC1D,CAAC,CAAC;AAEH,+EAA+E;AAC/E,8EAA8E;AACjE,QAAA,gCAAgC,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,OAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;QACrC,OAAC,CAAC,MAAM,CAAC;YACL,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC;YAC5B,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;SAC3B,CAAC;QACF,OAAC,CAAC,MAAM,CAAC;YACL,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;SAC7B,CAAC;KACL,CAAC;IACF,iBAAiB,EAAE,OAAC,CAAC,KAAK,CAAC;QACvB,QAAA,2CAA2C;QAC3C,iDAAgC;KACnC,CAAC;CACL,CAAC,CAAC"}
@@ -4,15 +4,51 @@ export declare const TOOL_RESOLVE_URL_DESCRIPTION: ({ runtime, toolName, }: Tool
4
4
  export declare const toolResolveUrlArgsSchema: z.ZodObject<{
5
5
  url: z.ZodString;
6
6
  }, z.core.$strip>;
7
- export declare const toolResolveUrlOutputSchema: z.ZodObject<{
7
+ export declare const toolResolveUrlStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8
+ url: z.ZodString;
9
+ isShareLink: z.ZodLiteral<true>;
10
+ resolvedUrl: z.ZodString;
11
+ }, z.core.$strip>, z.ZodObject<{
12
+ url: z.ZodString;
13
+ isShareLink: z.ZodLiteral<false>;
14
+ }, z.core.$strip>], "isShareLink">;
15
+ export declare const toolResolveUrlOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
16
+ result: z.ZodString;
17
+ metadata: z.ZodIntersection<z.ZodObject<{
18
+ status: z.ZodEnum<{
19
+ error: "error";
20
+ success: "success";
21
+ }>;
22
+ }, z.core.$strip>, z.ZodObject<{
23
+ status: z.ZodEnum<{
24
+ success: "success";
25
+ }>;
26
+ }, z.core.$strip>>;
27
+ structuredContent: z.ZodDiscriminatedUnion<[z.ZodObject<{
28
+ url: z.ZodString;
29
+ isShareLink: z.ZodLiteral<true>;
30
+ resolvedUrl: z.ZodString;
31
+ }, z.core.$strip>, z.ZodObject<{
32
+ url: z.ZodString;
33
+ isShareLink: z.ZodLiteral<false>;
34
+ }, z.core.$strip>], "isShareLink">;
35
+ }, z.core.$strip>, z.ZodObject<{
8
36
  result: z.ZodString;
9
- metadata: z.ZodObject<{
37
+ metadata: z.ZodIntersection<z.ZodObject<{
10
38
  status: z.ZodEnum<{
11
39
  error: "error";
12
40
  success: "success";
13
41
  }>;
42
+ }, z.core.$strip>, z.ZodObject<{
43
+ status: z.ZodEnum<{
44
+ error: "error";
45
+ }>;
46
+ }, z.core.$strip>>;
47
+ structuredContent: z.ZodObject<{
48
+ error: z.ZodString;
14
49
  }, z.core.$strip>;
15
- }, z.core.$strip>;
50
+ }, z.core.$strip>]>;
16
51
  export type ToolResolveUrlArgs = z.infer<typeof toolResolveUrlArgsSchema>;
52
+ export type ToolResolveUrlStructuredContent = z.infer<typeof toolResolveUrlStructuredContentSchema>;
17
53
  export type ToolResolveUrlOutput = z.infer<typeof toolResolveUrlOutputSchema>;
18
54
  //# sourceMappingURL=toolResolveUrlArgs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolResolveUrlArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolResolveUrlArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAK5D,eAAO,MAAM,4BAA4B,2BAGtC,sBAAsB,KAAG,MAc3B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;iBAOzB,CAAC;AAEb,eAAO,MAAM,0BAA0B;;;;;;;;iBAGrC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"toolResolveUrlArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolResolveUrlArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAQ5D,eAAO,MAAM,4BAA4B,2BAGtC,sBAAsB,KAAG,MAc3B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;iBAOzB,CAAC;AAEb,eAAO,MAAM,qCAAqC;;;;;;;kCAqBjD,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAGrC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,qCAAqC,CAC/C,CAAC;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toolResolveUrlOutputSchema = exports.toolResolveUrlArgsSchema = exports.TOOL_RESOLVE_URL_DESCRIPTION = void 0;
3
+ exports.toolResolveUrlOutputSchema = exports.toolResolveUrlStructuredContentSchema = exports.toolResolveUrlArgsSchema = exports.TOOL_RESOLVE_URL_DESCRIPTION = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const outputMetadata_1 = require("../outputMetadata");
6
6
  const toolSchemaBuilder_1 = require("../toolSchemaBuilder");
@@ -29,8 +29,23 @@ exports.toolResolveUrlArgsSchema = (0, toolSchemaBuilder_1.createToolSchema)()
29
29
  .describe('The Lightdash URL to resolve, exactly as provided.'),
30
30
  })
31
31
  .build();
32
- exports.toolResolveUrlOutputSchema = zod_1.z.object({
33
- result: zod_1.z.string(),
32
+ exports.toolResolveUrlStructuredContentSchema = zod_1.z.discriminatedUnion('isShareLink', [
33
+ zod_1.z.object({
34
+ url: zod_1.z.string().describe('The URL that was resolved, as provided.'),
35
+ isShareLink: zod_1.z.literal(true),
36
+ resolvedUrl: zod_1.z
37
+ .string()
38
+ .describe('The full Lightdash URL the share link expands to; read the identifiers (project uuid, chart or dashboard uuid, explore name) from its path.'),
39
+ }),
40
+ zod_1.z.object({
41
+ url: zod_1.z.string().describe('The URL that was resolved, as provided.'),
42
+ isShareLink: zod_1.z
43
+ .literal(false)
44
+ .describe('The URL is not a share link: its identifiers can be read directly from its path.'),
45
+ }),
46
+ ]);
47
+ exports.toolResolveUrlOutputSchema = (0, outputMetadata_1.structuredToolOutputSchema)({
34
48
  metadata: outputMetadata_1.baseOutputMetadataSchema,
49
+ structuredContent: exports.toolResolveUrlStructuredContentSchema,
35
50
  });
36
51
  //# sourceMappingURL=toolResolveUrlArgs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolResolveUrlArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolResolveUrlArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAA6D;AAC7D,4DA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,CAAC,oDAAoD,CAAC;CACtE,CAAC;KACD,KAAK,EAAE,CAAC;AAEA,QAAA,qCAAqC,GAAG,OAAC,CAAC,kBAAkB,CACrE,aAAa,EACb;IACI,OAAC,CAAC,MAAM,CAAC;QACL,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;QACnE,WAAW,EAAE,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC;QAC5B,WAAW,EAAE,OAAC;aACT,MAAM,EAAE;aACR,QAAQ,CACL,6IAA6I,CAChJ;KACR,CAAC;IACF,OAAC,CAAC,MAAM,CAAC;QACL,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;QACnE,WAAW,EAAE,OAAC;aACT,OAAO,CAAC,KAAK,CAAC;aACd,QAAQ,CACL,kFAAkF,CACrF;KACR,CAAC;CACL,CACJ,CAAC;AAEW,QAAA,0BAA0B,GAAG,IAAA,2CAA0B,EAAC;IACjE,QAAQ,EAAE,yCAAwB;IAClC,iBAAiB,EAAE,QAAA,qCAAqC;CAC3D,CAAC,CAAC"}
@@ -26,15 +26,110 @@ export declare const toolRunContentQueryArgsSchema: z.ZodObject<{
26
26
  }, z.core.$strip>], "type">;
27
27
  }, z.core.$strip>;
28
28
  export type ToolRunContentQueryArgs = z.infer<typeof toolRunContentQueryArgsSchema>;
29
- export declare const toolRunContentQueryOutputSchema: z.ZodObject<{
29
+ export declare const toolRunContentQueryStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
30
+ outcome: z.ZodLiteral<"rows">;
31
+ chart: z.ZodNullable<z.ZodObject<{
32
+ chartUuid: z.ZodString;
33
+ name: z.ZodString;
34
+ exploreName: z.ZodString;
35
+ dimensions: z.ZodArray<z.ZodString>;
36
+ metrics: z.ZodArray<z.ZodString>;
37
+ filters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
38
+ sorts: z.ZodArray<z.ZodObject<{
39
+ fieldId: z.ZodString;
40
+ descending: z.ZodBoolean;
41
+ }, z.core.$strip>>;
42
+ limit: z.ZodNumber;
43
+ tableCalculations: z.ZodArray<z.ZodString>;
44
+ customMetrics: z.ZodArray<z.ZodString>;
45
+ customDimensions: z.ZodArray<z.ZodString>;
46
+ }, z.core.$strip>>;
47
+ rowCount: z.ZodNumber;
48
+ shownRowCount: z.ZodNumber;
49
+ columns: z.ZodArray<z.ZodObject<{
50
+ fieldId: z.ZodString;
51
+ label: z.ZodString;
52
+ }, z.core.$strip>>;
53
+ rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
54
+ }, z.core.$strip>, z.ZodObject<{
55
+ outcome: z.ZodLiteral<"noResults">;
56
+ }, z.core.$strip>, z.ZodObject<{
57
+ outcome: z.ZodLiteral<"dataAccessDisabled">;
58
+ chart: z.ZodNullable<z.ZodObject<{
59
+ chartUuid: z.ZodString;
60
+ name: z.ZodString;
61
+ exploreName: z.ZodString;
62
+ dimensions: z.ZodArray<z.ZodString>;
63
+ metrics: z.ZodArray<z.ZodString>;
64
+ }, z.core.$strip>>;
65
+ }, z.core.$strip>], "outcome">;
66
+ export type ToolRunContentQueryStructuredContent = z.infer<typeof toolRunContentQueryStructuredContentSchema>;
67
+ export declare const toolRunContentQueryOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
30
68
  result: z.ZodString;
31
- metadata: z.ZodObject<{
69
+ metadata: z.ZodIntersection<z.ZodObject<{
32
70
  status: z.ZodEnum<{
33
71
  error: "error";
34
72
  success: "success";
35
73
  }>;
36
74
  queryCacheHit: z.ZodOptional<z.ZodBoolean>;
75
+ }, z.core.$strip>, z.ZodObject<{
76
+ status: z.ZodEnum<{
77
+ success: "success";
78
+ }>;
79
+ }, z.core.$strip>>;
80
+ structuredContent: z.ZodDiscriminatedUnion<[z.ZodObject<{
81
+ outcome: z.ZodLiteral<"rows">;
82
+ chart: z.ZodNullable<z.ZodObject<{
83
+ chartUuid: z.ZodString;
84
+ name: z.ZodString;
85
+ exploreName: z.ZodString;
86
+ dimensions: z.ZodArray<z.ZodString>;
87
+ metrics: z.ZodArray<z.ZodString>;
88
+ filters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
89
+ sorts: z.ZodArray<z.ZodObject<{
90
+ fieldId: z.ZodString;
91
+ descending: z.ZodBoolean;
92
+ }, z.core.$strip>>;
93
+ limit: z.ZodNumber;
94
+ tableCalculations: z.ZodArray<z.ZodString>;
95
+ customMetrics: z.ZodArray<z.ZodString>;
96
+ customDimensions: z.ZodArray<z.ZodString>;
97
+ }, z.core.$strip>>;
98
+ rowCount: z.ZodNumber;
99
+ shownRowCount: z.ZodNumber;
100
+ columns: z.ZodArray<z.ZodObject<{
101
+ fieldId: z.ZodString;
102
+ label: z.ZodString;
103
+ }, z.core.$strip>>;
104
+ rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
105
+ }, z.core.$strip>, z.ZodObject<{
106
+ outcome: z.ZodLiteral<"noResults">;
107
+ }, z.core.$strip>, z.ZodObject<{
108
+ outcome: z.ZodLiteral<"dataAccessDisabled">;
109
+ chart: z.ZodNullable<z.ZodObject<{
110
+ chartUuid: z.ZodString;
111
+ name: z.ZodString;
112
+ exploreName: z.ZodString;
113
+ dimensions: z.ZodArray<z.ZodString>;
114
+ metrics: z.ZodArray<z.ZodString>;
115
+ }, z.core.$strip>>;
116
+ }, z.core.$strip>], "outcome">;
117
+ }, z.core.$strip>, z.ZodObject<{
118
+ result: z.ZodString;
119
+ metadata: z.ZodIntersection<z.ZodObject<{
120
+ status: z.ZodEnum<{
121
+ error: "error";
122
+ success: "success";
123
+ }>;
124
+ queryCacheHit: z.ZodOptional<z.ZodBoolean>;
125
+ }, z.core.$strip>, z.ZodObject<{
126
+ status: z.ZodEnum<{
127
+ error: "error";
128
+ }>;
129
+ }, z.core.$strip>>;
130
+ structuredContent: z.ZodObject<{
131
+ error: z.ZodString;
37
132
  }, z.core.$strip>;
38
- }, z.core.$strip>;
133
+ }, z.core.$strip>]>;
39
134
  export type ToolRunContentQueryOutput = z.infer<typeof toolRunContentQueryOutputSchema>;
40
135
  //# sourceMappingURL=toolRunContentQueryArgs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolRunContentQueryArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,kCAAkC,6aAO0D,CAAC;AAE1G,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;iBAoC9B,CAAC;AAEb,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CACzC,OAAO,6BAA6B,CACvC,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;iBAK1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,+BAA+B,CACzC,CAAC"}
1
+ {"version":3,"file":"toolRunContentQueryArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,kCAAkC,6aAO0D,CAAC;AAE1G,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;iBAoC9B,CAAC;AAEb,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CACzC,OAAO,6BAA6B,CACvC,CAAC;AAuBF,eAAO,MAAM,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAiDtD,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,0CAA0C,CACpD,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAK1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,+BAA+B,CACzC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toolRunContentQueryOutputSchema = exports.toolRunContentQueryArgsSchema = exports.TOOL_RUN_CONTENT_QUERY_DESCRIPTION = void 0;
3
+ exports.toolRunContentQueryOutputSchema = exports.toolRunContentQueryStructuredContentSchema = exports.toolRunContentQueryArgsSchema = exports.TOOL_RUN_CONTENT_QUERY_DESCRIPTION = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const outputMetadata_1 = require("../outputMetadata");
6
6
  const toolSchemaBuilder_1 = require("../toolSchemaBuilder");
@@ -50,10 +50,66 @@ exports.toolRunContentQueryArgsSchema = (0, toolSchemaBuilder_1.createToolSchema
50
50
  ]),
51
51
  })
52
52
  .build();
53
- exports.toolRunContentQueryOutputSchema = zod_1.z.object({
54
- result: zod_1.z.string(),
53
+ const savedChartStructureSchema = zod_1.z.object({
54
+ chartUuid: zod_1.z.string(),
55
+ name: zod_1.z.string(),
56
+ exploreName: zod_1.z.string(),
57
+ dimensions: zod_1.z.array(zod_1.z.string()).describe('Dimension field ids.'),
58
+ metrics: zod_1.z.array(zod_1.z.string()).describe('Metric field ids.'),
59
+ });
60
+ const savedChartSpecSchema = savedChartStructureSchema.extend({
61
+ filters: zod_1.z
62
+ .record(zod_1.z.string(), zod_1.z.unknown())
63
+ .describe('The saved chart filters, as stored.'),
64
+ sorts: zod_1.z.array(zod_1.z.object({ fieldId: zod_1.z.string(), descending: zod_1.z.boolean() })),
65
+ limit: zod_1.z.number().describe('Row limit saved on the chart.'),
66
+ tableCalculations: zod_1.z.array(zod_1.z.string()).describe('Table calculation names.'),
67
+ customMetrics: zod_1.z.array(zod_1.z.string()).describe('Custom metric field ids.'),
68
+ customDimensions: zod_1.z
69
+ .array(zod_1.z.string())
70
+ .describe('Custom dimension field ids.'),
71
+ });
72
+ exports.toolRunContentQueryStructuredContentSchema = zod_1.z.discriminatedUnion('outcome', [
73
+ zod_1.z.object({
74
+ outcome: zod_1.z.literal('rows'),
75
+ chart: savedChartSpecSchema
76
+ .nullable()
77
+ .describe('The saved chart that was run; null when an unsaved metricQuery was run.'),
78
+ rowCount: zod_1.z
79
+ .number()
80
+ .int()
81
+ .nonnegative()
82
+ .describe('Total rows the query returned.'),
83
+ shownRowCount: zod_1.z
84
+ .number()
85
+ .int()
86
+ .nonnegative()
87
+ .describe('Rows included in `rows`; fewer than rowCount when the result was truncated to keep the conversation small.'),
88
+ columns: zod_1.z
89
+ .array(zod_1.z.object({ fieldId: zod_1.z.string(), label: zod_1.z.string() }))
90
+ .describe('Ordered columns: `fieldId` keys each row, `label` is the CSV header shown to the model.'),
91
+ rows: zod_1.z
92
+ .array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()))
93
+ .describe('Result rows keyed by field id.'),
94
+ }),
95
+ zod_1.z.object({
96
+ outcome: zod_1.z
97
+ .literal('noResults')
98
+ .describe('The query ran but returned no rows.'),
99
+ }),
100
+ zod_1.z.object({
101
+ outcome: zod_1.z
102
+ .literal('dataAccessDisabled')
103
+ .describe('Data access is disabled for this agent; no rows were fetched.'),
104
+ chart: savedChartStructureSchema
105
+ .nullable()
106
+ .describe('Structure of the saved chart; null when an unsaved metricQuery was validated instead.'),
107
+ }),
108
+ ]);
109
+ exports.toolRunContentQueryOutputSchema = (0, outputMetadata_1.structuredToolOutputSchema)({
55
110
  metadata: outputMetadata_1.baseOutputMetadataSchema.extend({
56
111
  queryCacheHit: zod_1.z.boolean().optional(),
57
112
  }),
113
+ structuredContent: exports.toolRunContentQueryStructuredContentSchema,
58
114
  });
59
115
  //# sourceMappingURL=toolRunContentQueryArgs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolRunContentQueryArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/sch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CAAC;CACL,CAAC;KACD,KAAK,EAAE,CAAC;AAMA,QAAA,+BAA+B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,yCAAwB,CAAC,MAAM,CAAC;QACtC,aAAa,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACxC,CAAC;CACL,CAAC,CAAC"}
1
+ {"version":3,"file":"toolRunContentQueryArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolRunContentQueryArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sDAG2B;AAC3B,4DAAwD;AACxD,mEAA2E;AAE9D,QAAA,kCAAkC,GAAG;;;;;;;yGAOuD,CAAC;AAE7F,QAAA,6BAA6B,GAAG,IAAA,oCAAgB,GAAE;KAC1D,MAAM,CAAC;IACJ,MAAM,EAAE,OAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;QACjC,OAAC,CAAC,MAAM,CAAC;YACL,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,aAAa,CAAC;YAC9B,SAAS,EAAE,OAAC;iBACP,MAAM,EAAE;iBACR,QAAQ,CAAC,2CAA2C,CAAC;YAC1D,WAAW,EAAE,wDAAgC;YAC7C,UAAU,EAAE,OAAC;iBACR,OAAO,EAAE;iBACT,QAAQ,EAAE;iBACV,QAAQ,EAAE;iBACV,QAAQ,CAAC,2CAA2C,CAAC;SAC7D,CAAC;QACF,OAAC,CAAC,MAAM,CAAC;YACL,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;YACxB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;YAC1D,KAAK,EAAE,OAAC,CAAC,MAAM;iBACV,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,8BAA8B,CAAC;SAChD,CAAC;QACF,OAAC,CAAC,MA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