@lightdash/common 0.2066.0 → 0.2067.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/ee/AiAgent/schemas/tools/toolImproveContext.d.ts +1 -1
  2. package/dist/cjs/ee/AiAgent/schemas/tools/toolImproveContext.d.ts.map +1 -1
  3. package/dist/cjs/ee/AiAgent/schemas/tools/toolImproveContext.js +15 -32
  4. package/dist/cjs/ee/AiAgent/schemas/tools/toolImproveContext.js.map +1 -1
  5. package/dist/cjs/ee/AiAgent/schemas/tools/toolProposeChange.d.ts +1 -1
  6. package/dist/cjs/ee/AiAgent/schemas/tools/toolProposeChange.d.ts.map +1 -1
  7. package/dist/cjs/ee/AiAgent/schemas/tools/toolProposeChange.js +13 -24
  8. package/dist/cjs/ee/AiAgent/schemas/tools/toolProposeChange.js.map +1 -1
  9. package/dist/esm/ee/AiAgent/schemas/tools/toolImproveContext.d.ts +1 -1
  10. package/dist/esm/ee/AiAgent/schemas/tools/toolImproveContext.d.ts.map +1 -1
  11. package/dist/esm/ee/AiAgent/schemas/tools/toolImproveContext.js +15 -32
  12. package/dist/esm/ee/AiAgent/schemas/tools/toolImproveContext.js.map +1 -1
  13. package/dist/esm/ee/AiAgent/schemas/tools/toolProposeChange.d.ts +1 -1
  14. package/dist/esm/ee/AiAgent/schemas/tools/toolProposeChange.d.ts.map +1 -1
  15. package/dist/esm/ee/AiAgent/schemas/tools/toolProposeChange.js +13 -24
  16. package/dist/esm/ee/AiAgent/schemas/tools/toolProposeChange.js.map +1 -1
  17. package/dist/tsconfig.types.tsbuildinfo +1 -1
  18. package/dist/types/ee/AiAgent/schemas/tools/toolImproveContext.d.ts +1 -1
  19. package/dist/types/ee/AiAgent/schemas/tools/toolImproveContext.d.ts.map +1 -1
  20. package/dist/types/ee/AiAgent/schemas/tools/toolProposeChange.d.ts +1 -1
  21. package/dist/types/ee/AiAgent/schemas/tools/toolProposeChange.d.ts.map +1 -1
  22. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { AiResultType } from '../../types';
3
- export declare const TOOL_IMPROVE_CONTEXT_DESCRIPTION = "\n\n - **When to use the Improve Context Tool:**\n - User guides table/explore selection: \"You can use the main_table for summary queries - you don't need the detailed table\"\n - User shares business methodology: \"Generally we use higher-level categories to have fewer groupings\"\n - User clarifies where to find data: \"Use the dimension table to get category details\"\n - User corrects field usage: \"Filter by order_number not order_id\"\n - User corrects terminology: \"Actually, 'total revenue' means revenue_after_tax\"\n - User provides better formatting/structure: \"I'd structure the examples like this: Category: X, Feedback: Y\"\n - User clarifies business rules: \"Customer count should exclude test accounts\"\n - Your confidence this is a learnable correction (not just a new request) is above 0.7\n\n - **Learning Categories and Examples:**\n\n Category: explore_selection\n Feedback: \"Use the sales_data explore instead of the orders table for revenue analysis\"\n Generated instruction: \"For revenue analysis queries, use the sales_data explore instead of the orders table\"\n\n Category: field_selection\n Feedback1: \"No, use net_revenue instead of gross_revenue\"\n Generated instruction1: \"When users ask for revenue, use the net_revenue field instead of gross_revenue\"\n Feedback2: \"Actually, 'total revenue' should always refer to the revenue_after_tax field\"\n Generated instruction2: \"When users mention 'total revenue', they mean the revenue_after_tax field\"\n\n Category: filter_logic\n Feedback: \"The customer_count should exclude test accounts\"\n Generated instruction: \"When calculating customer_count, always exclude test accounts using the filter is_test_account = false\"\n\n Category: other\n Feedback1: \"Always show results in descending order by default\"\n Generated instruction1: \"When showing metric results, default to descending order unless explicitly requested otherwise\"\n Feedback2: \"We prefer to analyze by region rather than individual store locations\"\n Generated instruction2: \"When analyzing geographic data, use region-level aggregations instead of individual store locations\"\n\n ";
3
+ export declare const TOOL_IMPROVE_CONTEXT_DESCRIPTION = "\nCaptures learnings from user corrections, clarifications, and guidance to improve future responses.\n\n**Supported Learning Categories:**\n- explore_selection: Which tables/explores to use for specific types of queries\n- field_selection: Which fields to use for specific metrics or dimensions\n- filter_logic: How to apply filters for calculations\n- calculation: How to perform specific calculations or aggregations\n- other: General preferences, formatting, or methodologies\n\n**Technical Requirements:**\n- Must provide original query context that led to the learning\n- Must capture what was incorrect and what the correct approach is\n- Must categorize the learning into one of the supported categories\n- Must provide a confidence score (0-1) indicating if this is a learnable pattern\n- Must generate a clear, actionable instruction to append to agent settings\n- Instructions should be specific and context-aware (not overly generic)\n";
4
4
  export declare const toolImproveContextArgsSchema: z.ZodObject<{
5
5
  type: z.ZodLiteral<AiResultType.IMPROVE_CONTEXT>;
6
6
  } & {
@@ -1 +1 @@
1
- {"version":3,"file":"toolImproveContext.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolImproveContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,eAAO,MAAM,gCAAgC,yrEAkC3C,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;EAkC7B,CAAC;AAEb,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CACxC,OAAO,4BAA4B,CACtC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;EAGzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,8BAA8B,CACxC,CAAC"}
1
+ {"version":3,"file":"toolImproveContext.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolImproveContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,eAAO,MAAM,gCAAgC,w7BAiB5C,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;EAkC7B,CAAC;AAEb,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CACxC,OAAO,4BAA4B,CACtC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;EAGzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,8BAA8B,CACxC,CAAC"}
@@ -6,40 +6,23 @@ const types_1 = require("../../types");
6
6
  const outputMetadata_1 = require("../outputMetadata");
7
7
  const toolSchemaBuilder_1 = require("../toolSchemaBuilder");
8
8
  exports.TOOL_IMPROVE_CONTEXT_DESCRIPTION = `
9
+ Captures learnings from user corrections, clarifications, and guidance to improve future responses.
9
10
 
10
- - **When to use the Improve Context Tool:**
11
- - User guides table/explore selection: "You can use the main_table for summary queries - you don't need the detailed table"
12
- - User shares business methodology: "Generally we use higher-level categories to have fewer groupings"
13
- - User clarifies where to find data: "Use the dimension table to get category details"
14
- - User corrects field usage: "Filter by order_number not order_id"
15
- - User corrects terminology: "Actually, 'total revenue' means revenue_after_tax"
16
- - User provides better formatting/structure: "I'd structure the examples like this: Category: X, Feedback: Y"
17
- - User clarifies business rules: "Customer count should exclude test accounts"
18
- - Your confidence this is a learnable correction (not just a new request) is above 0.7
11
+ **Supported Learning Categories:**
12
+ - explore_selection: Which tables/explores to use for specific types of queries
13
+ - field_selection: Which fields to use for specific metrics or dimensions
14
+ - filter_logic: How to apply filters for calculations
15
+ - calculation: How to perform specific calculations or aggregations
16
+ - other: General preferences, formatting, or methodologies
19
17
 
20
- - **Learning Categories and Examples:**
21
-
22
- Category: explore_selection
23
- Feedback: "Use the sales_data explore instead of the orders table for revenue analysis"
24
- Generated instruction: "For revenue analysis queries, use the sales_data explore instead of the orders table"
25
-
26
- Category: field_selection
27
- Feedback1: "No, use net_revenue instead of gross_revenue"
28
- Generated instruction1: "When users ask for revenue, use the net_revenue field instead of gross_revenue"
29
- Feedback2: "Actually, 'total revenue' should always refer to the revenue_after_tax field"
30
- Generated instruction2: "When users mention 'total revenue', they mean the revenue_after_tax field"
31
-
32
- Category: filter_logic
33
- Feedback: "The customer_count should exclude test accounts"
34
- Generated instruction: "When calculating customer_count, always exclude test accounts using the filter is_test_account = false"
35
-
36
- Category: other
37
- Feedback1: "Always show results in descending order by default"
38
- Generated instruction1: "When showing metric results, default to descending order unless explicitly requested otherwise"
39
- Feedback2: "We prefer to analyze by region rather than individual store locations"
40
- Generated instruction2: "When analyzing geographic data, use region-level aggregations instead of individual store locations"
41
-
42
- `;
18
+ **Technical Requirements:**
19
+ - Must provide original query context that led to the learning
20
+ - Must capture what was incorrect and what the correct approach is
21
+ - Must categorize the learning into one of the supported categories
22
+ - Must provide a confidence score (0-1) indicating if this is a learnable pattern
23
+ - Must generate a clear, actionable instruction to append to agent settings
24
+ - Instructions should be specific and context-aware (not overly generic)
25
+ `;
43
26
  exports.toolImproveContextArgsSchema = (0, toolSchemaBuilder_1.createToolSchema)(types_1.AiResultType.IMPROVE_CONTEXT, exports.TOOL_IMPROVE_CONTEXT_DESCRIPTION)
44
27
  .extend({
45
28
  originalQuery: zod_1.z
@@ -1 +1 @@
1
- {"version":3,"file":"toolImproveContext.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolImproveContext.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,uCAA2C;AAC3C,sDAA6D;AAC7D,4DAAwD;AAE3C,QAAA,gCAAgC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkC9C,CAAC;AAEU,QAAA,4BAA4B,GAAG,IAAA,oCAAgB,EACxD,oBAAY,CAAC,eAAe,EAC5B,wCAAgC,CACnC;KACI,MAAM,CAAC;IACJ,aAAa,EAAE,OAAC;SACX,MAAM,EAAE;SACR,QAAQ,CAAC,uDAAuD,CAAC;IACtE,iBAAiB,EAAE,OAAC;SACf,MAAM,EAAE;SACR,QAAQ,CAAC,+CAA+C,CAAC;IAC9D,eAAe,EAAE,OAAC;SACb,MAAM,EAAE;SACR,QAAQ,CAAC,sCAAsC,CAAC;IACrD,QAAQ,EAAE,OAAC;SACN,IAAI,CAAC;QACF,mBAAmB;QACnB,iBAAiB;QACjB,cAAc;QACd,aAAa;QACb,OAAO;KACV,CAAC;SACD,QAAQ,CAAC,0BAA0B,CAAC;IACzC,UAAU,EAAE,OAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACL,8EAA8E,CACjF;IACL,oBAAoB,EAAE,OAAC;SAClB,MAAM,EAAE;SACR,QAAQ,CAAC,6CAA6C,CAAC;CAC/D,CAAC;KACD,KAAK,EAAE,CAAC;AAMA,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,yCAAwB;CACrC,CAAC,CAAC"}
1
+ {"version":3,"file":"toolImproveContext.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolImproveContext.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,uCAA2C;AAC3C,sDAA6D;AAC7D,4DAAwD;AAE3C,QAAA,gCAAgC,GAAG;;;;;;;;;;;;;;;;;CAiB/C,CAAC;AAEW,QAAA,4BAA4B,GAAG,IAAA,oCAAgB,EACxD,oBAAY,CAAC,eAAe,EAC5B,wCAAgC,CACnC;KACI,MAAM,CAAC;IACJ,aAAa,EAAE,OAAC;SACX,MAAM,EAAE;SACR,QAAQ,CAAC,uDAAuD,CAAC;IACtE,iBAAiB,EAAE,OAAC;SACf,MAAM,EAAE;SACR,QAAQ,CAAC,+CAA+C,CAAC;IAC9D,eAAe,EAAE,OAAC;SACb,MAAM,EAAE;SACR,QAAQ,CAAC,sCAAsC,CAAC;IACrD,QAAQ,EAAE,OAAC;SACN,IAAI,CAAC;QACF,mBAAmB;QACnB,iBAAiB;QACjB,cAAc;QACd,aAAa;QACb,OAAO;KACV,CAAC;SACD,QAAQ,CAAC,0BAA0B,CAAC;IACzC,UAAU,EAAE,OAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACL,8EAA8E,CACjF;IACL,oBAAoB,EAAE,OAAC;SAClB,MAAM,EAAE;SACR,QAAQ,CAAC,6CAA6C,CAAC;CAC/D,CAAC;KACD,KAAK,EAAE,CAAC;AAMA,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,yCAAwB;CACrC,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { type Dimension, type Metric, type Table } from '../../../..';
3
3
  import { AiResultType } from '../../types';
4
- export declare const TOOL_PROPOSE_CHANGE_DESCRIPTION = "\nUse this tool to propose changes to a table's metadata in the semantic layer. This tool creates a change proposal that can be reviewed and approved before being applied.\n\n- When updating descriptions, ensure to preserve as much original content as possible. Remember that descriptions are enclosed in \"description\" tags and you should take the whole value into account as well as its format.\n- If modifying tables, _always_ use the findExplores tool to check existing descriptions before proposing changes to ensure no important content is removed.\n- If modifying metrics or dimensions, _always_ use the findFields tool to check existing descriptions before proposing changes to ensure no important content is removed.\n- If creating a new metric, _always_ use the findFields tool to check existing metrics before proposing changes to ensure no content is duplicated.\n\n- **When to use the Propose Change Tool:**\n - User requests to update a table description: \"Update the description of the customers table\"\n - User wants to improve a dimension description: \"Add a better description for the customer_name field\"\n - User asks to clarify a metric description: \"Update the total_revenue metric description to explain it's net revenue\"\n - User wants to document business logic in descriptions: \"Add a note that active_users excludes test accounts\"\n\n- **What this tool does:**\n - Creates a change proposal and applies it to a changeset (batch of changes)\n - Changes are applied immediately but can be reviewed and rejected afterward\n - Supports updating descriptions for tables, dimensions, and metrics\n - Supports creating new metrics\n - Tracks who proposed the change and when\n - Applied changes can be reviewed and rejected by authorized users\n\n- **Examples:**\n\n User: \"Update the customers table description to mention it includes both B2B and B2C customers\"\n User: \"The revenue_net field should explain it's after taxes and discounts\"\n User: \"Create a new metric called 'Median Order Amount' that calculates the median order amount\"\n";
4
+ export declare const TOOL_PROPOSE_CHANGE_DESCRIPTION = "\nCreates a change proposal for tables, metrics, and dimensions. Changes are applied immediately but can be reviewed and rejected afterward.\n\n**Supported Operations:**\n- Update table descriptions and labels\n- Update metric/dimension descriptions and labels\n- Create new metrics\n\n**Technical Requirements:**\n- When updating descriptions or labels, must preserve as much original content as possible\n- Descriptions should maintain their original format (preserve complete value and formatting)\n- Must provide entity table name, rationale, and change details\n- Changes are tracked with proposer information and timestamp\n- For updates: use \"replace\" operation with complete updated value (not partial)\n- For adding new properties: use \"add\" operation (creates property if it does not exist)\n- For new metrics: use \"create\" operation with full metric definition\n";
5
5
  type ChangePatch<T> = Partial<Record<keyof T, z.ZodType>>;
6
6
  declare const stringOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
7
7
  op: z.ZodLiteral<"replace">;
@@ -1 +1 @@
1
- {"version":3,"file":"toolProposeChange.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolProposeChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAS3C,eAAO,MAAM,+BAA+B,+iEA2B3C,CAAC;AAMF,KAAK,WAAW,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;AAoC1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;IAA0B,CAAC;AAqF/C,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe5B,CAAC;AAEb,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9E,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AACpD,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;AAElD,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAexC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CACzC,OAAO,6BAA6B,CACvC,CAAC"}
@@ -10,32 +10,21 @@ const toolSchemaBuilder_1 = require("../toolSchemaBuilder");
10
10
  // Tool Description
11
11
  // ============================================================================
12
12
  exports.TOOL_PROPOSE_CHANGE_DESCRIPTION = `
13
- Use this tool to propose changes to a table's metadata in the semantic layer. This tool creates a change proposal that can be reviewed and approved before being applied.
13
+ Creates a change proposal for tables, metrics, and dimensions. Changes are applied immediately but can be reviewed and rejected afterward.
14
14
 
15
- - When updating descriptions, ensure to preserve as much original content as possible. Remember that descriptions are enclosed in "description" tags and you should take the whole value into account as well as its format.
16
- - If modifying tables, _always_ use the findExplores tool to check existing descriptions before proposing changes to ensure no important content is removed.
17
- - If modifying metrics or dimensions, _always_ use the findFields tool to check existing descriptions before proposing changes to ensure no important content is removed.
18
- - If creating a new metric, _always_ use the findFields tool to check existing metrics before proposing changes to ensure no content is duplicated.
15
+ **Supported Operations:**
16
+ - Update table descriptions and labels
17
+ - Update metric/dimension descriptions and labels
18
+ - Create new metrics
19
19
 
20
- - **When to use the Propose Change Tool:**
21
- - User requests to update a table description: "Update the description of the customers table"
22
- - User wants to improve a dimension description: "Add a better description for the customer_name field"
23
- - User asks to clarify a metric description: "Update the total_revenue metric description to explain it's net revenue"
24
- - User wants to document business logic in descriptions: "Add a note that active_users excludes test accounts"
25
-
26
- - **What this tool does:**
27
- - Creates a change proposal and applies it to a changeset (batch of changes)
28
- - Changes are applied immediately but can be reviewed and rejected afterward
29
- - Supports updating descriptions for tables, dimensions, and metrics
30
- - Supports creating new metrics
31
- - Tracks who proposed the change and when
32
- - Applied changes can be reviewed and rejected by authorized users
33
-
34
- - **Examples:**
35
-
36
- User: "Update the customers table description to mention it includes both B2B and B2C customers"
37
- User: "The revenue_net field should explain it's after taxes and discounts"
38
- User: "Create a new metric called 'Median Order Amount' that calculates the median order amount"
20
+ **Technical Requirements:**
21
+ - When updating descriptions or labels, must preserve as much original content as possible
22
+ - Descriptions should maintain their original format (preserve complete value and formatting)
23
+ - Must provide entity table name, rationale, and change details
24
+ - Changes are tracked with proposer information and timestamp
25
+ - For updates: use "replace" operation with complete updated value (not partial)
26
+ - For adding new properties: use "add" operation (creates property if it does not exist)
27
+ - For new metrics: use "create" operation with full metric definition
39
28
  `;
40
29
  const getPatchDescription = (type) => `Patch to apply to the ${type}. You can omit/set-to-null any fields you don't want to change.`;
41
30
  // ============================================================================
@@ -1 +1 @@
1
- {"version":3,"file":"toolProposeChange.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolProposeChange.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,uCAA2C;AAC3C,oDAA0D;AAC1D,wCAA8C;AAC9C,4DAAwD;A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CAAC,MAAM,EAAE;YACtB,YAAY,EAAE,OAAC;iBACV,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;iBAC9B,OAAO,CAAC,UAAU,CAAC;iBACnB,QAAQ,EAAE;SAClB,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":"toolProposeChange.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolProposeChange.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,uCAA2C;AAC3C,oDAA0D;AAC1D,wCAA8C;AAC9C,4DAAwD;AAExD,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAElE,QAAA,+BAA+B,GAAG;;;;;;;;;;;;;;;;CAgB9C,CAAC;AAQF,MAAM,mBAAmB,GAAG,CAAC,IAAsC,EAAE,EAAE,CACnE,yBAAyB,IAAI,iEAAiE,CAAC;AAEnG,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,WAAW,GAAG,CAAyB,IAAO,EAAE,EAAE,CACpD,OAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE;IACvB,OAAC;SACI,MAAM,CAAC,EAAE,EAAE,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;SACjD,QAAQ,CACL;QACI,6CAA6C;QAC7C,mHAAmH;QACnH,2HAA2H;KAC9H,CAAC,IAAI,CAAC,IAAI,CAAC,CACf;IACL,OAAC;SACI,MAAM,CAAC,EAAE,EAAE,EAAE,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;SAC7C,QAAQ,CACL,6EAA6E,CAChF;IACL,aAAa;IACb,2BAA2B;IAC3B,oBAAoB;IACpB,sIA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,EAAE,OAAC;SACb,MAAM,EAAE;SACR,QAAQ,CAAC,8CAA8C,CAAC;IAC7D,SAAS,EAAE,OAAC;SACP,MAAM,EAAE;SACR,QAAQ,CACL,6EAA6E,CAChF;IACL,MAAM,EAAE,YAAY;CACvB,CAAC;KACD,KAAK,EAAE,CAAC;AAQA,QAAA,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,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,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;YACtB,YAAY,EAAE,OAAC;iBACV,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;iBAC9B,OAAO,CAAC,UAAU,CAAC;iBACnB,QAAQ,EAAE;SAClB,CAAC;QACF,OAAC,CAAC,MAAM,CAAC;YACL,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;SAC7B,CAAC;KACL,CAAC;CACL,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { AiResultType } from '../../types';
3
- export declare const TOOL_IMPROVE_CONTEXT_DESCRIPTION = "\n\n - **When to use the Improve Context Tool:**\n - User guides table/explore selection: \"You can use the main_table for summary queries - you don't need the detailed table\"\n - User shares business methodology: \"Generally we use higher-level categories to have fewer groupings\"\n - User clarifies where to find data: \"Use the dimension table to get category details\"\n - User corrects field usage: \"Filter by order_number not order_id\"\n - User corrects terminology: \"Actually, 'total revenue' means revenue_after_tax\"\n - User provides better formatting/structure: \"I'd structure the examples like this: Category: X, Feedback: Y\"\n - User clarifies business rules: \"Customer count should exclude test accounts\"\n - Your confidence this is a learnable correction (not just a new request) is above 0.7\n\n - **Learning Categories and Examples:**\n\n Category: explore_selection\n Feedback: \"Use the sales_data explore instead of the orders table for revenue analysis\"\n Generated instruction: \"For revenue analysis queries, use the sales_data explore instead of the orders table\"\n\n Category: field_selection\n Feedback1: \"No, use net_revenue instead of gross_revenue\"\n Generated instruction1: \"When users ask for revenue, use the net_revenue field instead of gross_revenue\"\n Feedback2: \"Actually, 'total revenue' should always refer to the revenue_after_tax field\"\n Generated instruction2: \"When users mention 'total revenue', they mean the revenue_after_tax field\"\n\n Category: filter_logic\n Feedback: \"The customer_count should exclude test accounts\"\n Generated instruction: \"When calculating customer_count, always exclude test accounts using the filter is_test_account = false\"\n\n Category: other\n Feedback1: \"Always show results in descending order by default\"\n Generated instruction1: \"When showing metric results, default to descending order unless explicitly requested otherwise\"\n Feedback2: \"We prefer to analyze by region rather than individual store locations\"\n Generated instruction2: \"When analyzing geographic data, use region-level aggregations instead of individual store locations\"\n\n ";
3
+ export declare const TOOL_IMPROVE_CONTEXT_DESCRIPTION = "\nCaptures learnings from user corrections, clarifications, and guidance to improve future responses.\n\n**Supported Learning Categories:**\n- explore_selection: Which tables/explores to use for specific types of queries\n- field_selection: Which fields to use for specific metrics or dimensions\n- filter_logic: How to apply filters for calculations\n- calculation: How to perform specific calculations or aggregations\n- other: General preferences, formatting, or methodologies\n\n**Technical Requirements:**\n- Must provide original query context that led to the learning\n- Must capture what was incorrect and what the correct approach is\n- Must categorize the learning into one of the supported categories\n- Must provide a confidence score (0-1) indicating if this is a learnable pattern\n- Must generate a clear, actionable instruction to append to agent settings\n- Instructions should be specific and context-aware (not overly generic)\n";
4
4
  export declare const toolImproveContextArgsSchema: z.ZodObject<{
5
5
  type: z.ZodLiteral<AiResultType.IMPROVE_CONTEXT>;
6
6
  } & {
@@ -1 +1 @@
1
- {"version":3,"file":"toolImproveContext.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolImproveContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,eAAO,MAAM,gCAAgC,yrEAkC3C,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;EAkC7B,CAAC;AAEb,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CACxC,OAAO,4BAA4B,CACtC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;EAGzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,8BAA8B,CACxC,CAAC"}
1
+ {"version":3,"file":"toolImproveContext.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolImproveContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,eAAO,MAAM,gCAAgC,w7BAiB5C,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;EAkC7B,CAAC;AAEb,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CACxC,OAAO,4BAA4B,CACtC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;EAGzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,8BAA8B,CACxC,CAAC"}
@@ -3,40 +3,23 @@ import { AiResultType } from '../../types';
3
3
  import { baseOutputMetadataSchema } from '../outputMetadata';
4
4
  import { createToolSchema } from '../toolSchemaBuilder';
5
5
  export const TOOL_IMPROVE_CONTEXT_DESCRIPTION = `
6
+ Captures learnings from user corrections, clarifications, and guidance to improve future responses.
6
7
 
7
- - **When to use the Improve Context Tool:**
8
- - User guides table/explore selection: "You can use the main_table for summary queries - you don't need the detailed table"
9
- - User shares business methodology: "Generally we use higher-level categories to have fewer groupings"
10
- - User clarifies where to find data: "Use the dimension table to get category details"
11
- - User corrects field usage: "Filter by order_number not order_id"
12
- - User corrects terminology: "Actually, 'total revenue' means revenue_after_tax"
13
- - User provides better formatting/structure: "I'd structure the examples like this: Category: X, Feedback: Y"
14
- - User clarifies business rules: "Customer count should exclude test accounts"
15
- - Your confidence this is a learnable correction (not just a new request) is above 0.7
8
+ **Supported Learning Categories:**
9
+ - explore_selection: Which tables/explores to use for specific types of queries
10
+ - field_selection: Which fields to use for specific metrics or dimensions
11
+ - filter_logic: How to apply filters for calculations
12
+ - calculation: How to perform specific calculations or aggregations
13
+ - other: General preferences, formatting, or methodologies
16
14
 
17
- - **Learning Categories and Examples:**
18
-
19
- Category: explore_selection
20
- Feedback: "Use the sales_data explore instead of the orders table for revenue analysis"
21
- Generated instruction: "For revenue analysis queries, use the sales_data explore instead of the orders table"
22
-
23
- Category: field_selection
24
- Feedback1: "No, use net_revenue instead of gross_revenue"
25
- Generated instruction1: "When users ask for revenue, use the net_revenue field instead of gross_revenue"
26
- Feedback2: "Actually, 'total revenue' should always refer to the revenue_after_tax field"
27
- Generated instruction2: "When users mention 'total revenue', they mean the revenue_after_tax field"
28
-
29
- Category: filter_logic
30
- Feedback: "The customer_count should exclude test accounts"
31
- Generated instruction: "When calculating customer_count, always exclude test accounts using the filter is_test_account = false"
32
-
33
- Category: other
34
- Feedback1: "Always show results in descending order by default"
35
- Generated instruction1: "When showing metric results, default to descending order unless explicitly requested otherwise"
36
- Feedback2: "We prefer to analyze by region rather than individual store locations"
37
- Generated instruction2: "When analyzing geographic data, use region-level aggregations instead of individual store locations"
38
-
39
- `;
15
+ **Technical Requirements:**
16
+ - Must provide original query context that led to the learning
17
+ - Must capture what was incorrect and what the correct approach is
18
+ - Must categorize the learning into one of the supported categories
19
+ - Must provide a confidence score (0-1) indicating if this is a learnable pattern
20
+ - Must generate a clear, actionable instruction to append to agent settings
21
+ - Instructions should be specific and context-aware (not overly generic)
22
+ `;
40
23
  export const toolImproveContextArgsSchema = createToolSchema(AiResultType.IMPROVE_CONTEXT, TOOL_IMPROVE_CONTEXT_DESCRIPTION)
41
24
  .extend({
42
25
  originalQuery: z
@@ -1 +1 @@
1
- {"version":3,"file":"toolImproveContext.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolImproveContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkC9C,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,gBAAgB,CACxD,YAAY,CAAC,eAAe,EAC5B,gCAAgC,CACnC;KACI,MAAM,CAAC;IACJ,aAAa,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,CAAC,uDAAuD,CAAC;IACtE,iBAAiB,EAAE,CAAC;SACf,MAAM,EAAE;SACR,QAAQ,CAAC,+CAA+C,CAAC;IAC9D,eAAe,EAAE,CAAC;SACb,MAAM,EAAE;SACR,QAAQ,CAAC,sCAAsC,CAAC;IACrD,QAAQ,EAAE,CAAC;SACN,IAAI,CAAC;QACF,mBAAmB;QACnB,iBAAiB;QACjB,cAAc;QACd,aAAa;QACb,OAAO;KACV,CAAC;SACD,QAAQ,CAAC,0BAA0B,CAAC;IACzC,UAAU,EAAE,CAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACL,8EAA8E,CACjF;IACL,oBAAoB,EAAE,CAAC;SAClB,MAAM,EAAE;SACR,QAAQ,CAAC,6CAA6C,CAAC;CAC/D,CAAC;KACD,KAAK,EAAE,CAAC;AAMb,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,wBAAwB;CACrC,CAAC,CAAC"}
1
+ {"version":3,"file":"toolImproveContext.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolImproveContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;;;;;;;;CAiB/C,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,gBAAgB,CACxD,YAAY,CAAC,eAAe,EAC5B,gCAAgC,CACnC;KACI,MAAM,CAAC;IACJ,aAAa,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,CAAC,uDAAuD,CAAC;IACtE,iBAAiB,EAAE,CAAC;SACf,MAAM,EAAE;SACR,QAAQ,CAAC,+CAA+C,CAAC;IAC9D,eAAe,EAAE,CAAC;SACb,MAAM,EAAE;SACR,QAAQ,CAAC,sCAAsC,CAAC;IACrD,QAAQ,EAAE,CAAC;SACN,IAAI,CAAC;QACF,mBAAmB;QACnB,iBAAiB;QACjB,cAAc;QACd,aAAa;QACb,OAAO;KACV,CAAC;SACD,QAAQ,CAAC,0BAA0B,CAAC;IACzC,UAAU,EAAE,CAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACL,8EAA8E,CACjF;IACL,oBAAoB,EAAE,CAAC;SAClB,MAAM,EAAE;SACR,QAAQ,CAAC,6CAA6C,CAAC;CAC/D,CAAC;KACD,KAAK,EAAE,CAAC;AAMb,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,wBAAwB;CACrC,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { type Dimension, type Metric, type Table } from '../../../..';
3
3
  import { AiResultType } from '../../types';
4
- export declare const TOOL_PROPOSE_CHANGE_DESCRIPTION = "\nUse this tool to propose changes to a table's metadata in the semantic layer. This tool creates a change proposal that can be reviewed and approved before being applied.\n\n- When updating descriptions, ensure to preserve as much original content as possible. Remember that descriptions are enclosed in \"description\" tags and you should take the whole value into account as well as its format.\n- If modifying tables, _always_ use the findExplores tool to check existing descriptions before proposing changes to ensure no important content is removed.\n- If modifying metrics or dimensions, _always_ use the findFields tool to check existing descriptions before proposing changes to ensure no important content is removed.\n- If creating a new metric, _always_ use the findFields tool to check existing metrics before proposing changes to ensure no content is duplicated.\n\n- **When to use the Propose Change Tool:**\n - User requests to update a table description: \"Update the description of the customers table\"\n - User wants to improve a dimension description: \"Add a better description for the customer_name field\"\n - User asks to clarify a metric description: \"Update the total_revenue metric description to explain it's net revenue\"\n - User wants to document business logic in descriptions: \"Add a note that active_users excludes test accounts\"\n\n- **What this tool does:**\n - Creates a change proposal and applies it to a changeset (batch of changes)\n - Changes are applied immediately but can be reviewed and rejected afterward\n - Supports updating descriptions for tables, dimensions, and metrics\n - Supports creating new metrics\n - Tracks who proposed the change and when\n - Applied changes can be reviewed and rejected by authorized users\n\n- **Examples:**\n\n User: \"Update the customers table description to mention it includes both B2B and B2C customers\"\n User: \"The revenue_net field should explain it's after taxes and discounts\"\n User: \"Create a new metric called 'Median Order Amount' that calculates the median order amount\"\n";
4
+ export declare const TOOL_PROPOSE_CHANGE_DESCRIPTION = "\nCreates a change proposal for tables, metrics, and dimensions. Changes are applied immediately but can be reviewed and rejected afterward.\n\n**Supported Operations:**\n- Update table descriptions and labels\n- Update metric/dimension descriptions and labels\n- Create new metrics\n\n**Technical Requirements:**\n- When updating descriptions or labels, must preserve as much original content as possible\n- Descriptions should maintain their original format (preserve complete value and formatting)\n- Must provide entity table name, rationale, and change details\n- Changes are tracked with proposer information and timestamp\n- For updates: use \"replace\" operation with complete updated value (not partial)\n- For adding new properties: use \"add\" operation (creates property if it does not exist)\n- For new metrics: use \"create\" operation with full metric definition\n";
5
5
  type ChangePatch<T> = Partial<Record<keyof T, z.ZodType>>;
6
6
  declare const stringOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
7
7
  op: z.ZodLiteral<"replace">;
@@ -1 +1 @@
1
- {"version":3,"file":"toolProposeChange.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolProposeChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAS3C,eAAO,MAAM,+BAA+B,+iEA2B3C,CAAC;AAMF,KAAK,WAAW,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;AAoC1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;IAA0B,CAAC;AAqF/C,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe5B,CAAC;AAEb,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9E,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AACpD,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;AAElD,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAexC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CACzC,OAAO,6BAA6B,CACvC,CAAC"}
@@ -7,32 +7,21 @@ import { createToolSchema } from '../toolSchemaBuilder';
7
7
  // Tool Description
8
8
  // ============================================================================
9
9
  export const TOOL_PROPOSE_CHANGE_DESCRIPTION = `
10
- Use this tool to propose changes to a table's metadata in the semantic layer. This tool creates a change proposal that can be reviewed and approved before being applied.
10
+ Creates a change proposal for tables, metrics, and dimensions. Changes are applied immediately but can be reviewed and rejected afterward.
11
11
 
12
- - When updating descriptions, ensure to preserve as much original content as possible. Remember that descriptions are enclosed in "description" tags and you should take the whole value into account as well as its format.
13
- - If modifying tables, _always_ use the findExplores tool to check existing descriptions before proposing changes to ensure no important content is removed.
14
- - If modifying metrics or dimensions, _always_ use the findFields tool to check existing descriptions before proposing changes to ensure no important content is removed.
15
- - If creating a new metric, _always_ use the findFields tool to check existing metrics before proposing changes to ensure no content is duplicated.
12
+ **Supported Operations:**
13
+ - Update table descriptions and labels
14
+ - Update metric/dimension descriptions and labels
15
+ - Create new metrics
16
16
 
17
- - **When to use the Propose Change Tool:**
18
- - User requests to update a table description: "Update the description of the customers table"
19
- - User wants to improve a dimension description: "Add a better description for the customer_name field"
20
- - User asks to clarify a metric description: "Update the total_revenue metric description to explain it's net revenue"
21
- - User wants to document business logic in descriptions: "Add a note that active_users excludes test accounts"
22
-
23
- - **What this tool does:**
24
- - Creates a change proposal and applies it to a changeset (batch of changes)
25
- - Changes are applied immediately but can be reviewed and rejected afterward
26
- - Supports updating descriptions for tables, dimensions, and metrics
27
- - Supports creating new metrics
28
- - Tracks who proposed the change and when
29
- - Applied changes can be reviewed and rejected by authorized users
30
-
31
- - **Examples:**
32
-
33
- User: "Update the customers table description to mention it includes both B2B and B2C customers"
34
- User: "The revenue_net field should explain it's after taxes and discounts"
35
- User: "Create a new metric called 'Median Order Amount' that calculates the median order amount"
17
+ **Technical Requirements:**
18
+ - When updating descriptions or labels, must preserve as much original content as possible
19
+ - Descriptions should maintain their original format (preserve complete value and formatting)
20
+ - Must provide entity table name, rationale, and change details
21
+ - Changes are tracked with proposer information and timestamp
22
+ - For updates: use "replace" operation with complete updated value (not partial)
23
+ - For adding new properties: use "add" operation (creates property if it does not exist)
24
+ - For new metrics: use "create" operation with full metric definition
36
25
  `;
37
26
  const getPatchDescription = (type) => `Patch to apply to the ${type}. You can omit/set-to-null any fields you don't want to change.`;
38
27
  // ============================================================================
@@ -1 +1 @@
1
- {"version":3,"file":"toolProposeChange.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolProposeChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E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EAAE,CAAC;iBACV,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;iBAC9B,OAAO,CAAC,UAAU,CAAC;iBACnB,QAAQ,EAAE;SAClB,CAAC;QACF,CAAC,CAAC,MAAM,CAAC;YACL,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;SAC7B,CAAC;KACL,CAAC;CACL,CAAC,CAAC"}
1
+ {"version":3,"file":"toolProposeChange.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolProposeChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,+BAA+B,GAAG;;;;;;;;;;;;;;;;CAgB9C,CAAC;AAQF,MAAM,mBAAmB,GAAG,CAAC,IAAsC,EAAE,EAAE,CACnE,yBAAyB,IAAI,iEAAiE,CAAC;AAEnG,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,WAAW,GAAG,CAAyB,IAAO,EAAE,EAAE,CACpD,CAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE;IACvB,CAAC;SACI,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;SACjD,QAAQ,CACL;QACI,6CAA6C;QAC7C,mHAAmH;QACnH,2HAA2H;KAC9H,CAAC,IAAI,CAAC,IAAI,CAAC,CACf;IACL,CAAC;SACI,MAAM,CAAC,EAAE,EAAE,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