@sisense/sdk-ai-core 0.8.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/constants.d.ts +13 -0
  2. package/dist/constants.d.ts.map +1 -1
  3. package/dist/engines/build-chart/build-chart-engine.d.ts +3 -4
  4. package/dist/engines/build-chart/build-chart-engine.d.ts.map +1 -1
  5. package/dist/engines/build-chart/build-chart-service.d.ts +3 -3
  6. package/dist/engines/build-chart/build-chart-service.d.ts.map +1 -1
  7. package/dist/engines/build-chart/create-chart/create-chart.d.ts +8 -4
  8. package/dist/engines/build-chart/create-chart/create-chart.d.ts.map +1 -1
  9. package/dist/engines/build-chart/create-chart/generate-chart-table.d.ts +21 -2
  10. package/dist/engines/build-chart/create-chart/generate-chart-table.d.ts.map +1 -1
  11. package/dist/engines/build-chart/dataset-from-saved-chart-widget.d.ts +11 -0
  12. package/dist/engines/build-chart/dataset-from-saved-chart-widget.d.ts.map +1 -0
  13. package/dist/engines/build-chart/types.d.ts +55 -39
  14. package/dist/engines/build-chart/types.d.ts.map +1 -1
  15. package/dist/engines/build-chart/update-chart/apply-prior-chart-style.d.ts +10 -0
  16. package/dist/engines/build-chart/update-chart/apply-prior-chart-style.d.ts.map +1 -0
  17. package/dist/engines/build-chart/update-chart/chart-options-schemas.d.ts +2609 -890
  18. package/dist/engines/build-chart/update-chart/chart-options-schemas.d.ts.map +1 -1
  19. package/dist/engines/build-chart/update-chart/schemas.d.ts +9 -9
  20. package/dist/engines/build-chart/update-chart/update-chart-data-options.d.ts.map +1 -1
  21. package/dist/engines/build-chart/update-chart/update-chart-query.d.ts +8 -0
  22. package/dist/engines/build-chart/update-chart/update-chart-query.d.ts.map +1 -0
  23. package/dist/engines/build-chart/update-chart/update-chart-style-options.d.ts.map +1 -1
  24. package/dist/engines/build-chart/update-chart/update-chart-title.d.ts.map +1 -1
  25. package/dist/engines/build-chart/update-chart/update-chart-type.d.ts.map +1 -1
  26. package/dist/engines/build-csv-model/build-csv-model-engine.d.ts +13 -0
  27. package/dist/engines/build-csv-model/build-csv-model-engine.d.ts.map +1 -0
  28. package/dist/engines/build-csv-model/index.d.ts +7 -0
  29. package/dist/engines/build-csv-model/index.d.ts.map +1 -0
  30. package/dist/engines/build-csv-model/infer-relations.d.ts +14 -0
  31. package/dist/engines/build-csv-model/infer-relations.d.ts.map +1 -0
  32. package/dist/engines/build-csv-model/rest-build.d.ts +15 -0
  33. package/dist/engines/build-csv-model/rest-build.d.ts.map +1 -0
  34. package/dist/engines/build-csv-model/types.d.ts +136 -0
  35. package/dist/engines/build-csv-model/types.d.ts.map +1 -0
  36. package/dist/engines/build-dashboard/add-dashboard-filters.d.ts.map +1 -1
  37. package/dist/engines/build-dashboard/add-dashboard-widgets.d.ts.map +1 -1
  38. package/dist/engines/build-dashboard/build-dashboard-engine.d.ts +2 -5
  39. package/dist/engines/build-dashboard/build-dashboard-engine.d.ts.map +1 -1
  40. package/dist/engines/build-dashboard/build-dashboard-service.d.ts.map +1 -1
  41. package/dist/engines/build-dashboard/create-chart-widget.d.ts.map +1 -1
  42. package/dist/engines/build-dashboard/create-dashboard.d.ts.map +1 -1
  43. package/dist/engines/build-dashboard/load-existing-fusion-dashboard.d.ts.map +1 -1
  44. package/dist/engines/build-dashboard/types.d.ts +34 -6
  45. package/dist/engines/build-dashboard/types.d.ts.map +1 -1
  46. package/dist/engines/build-dashboard/update-chart-widget.d.ts.map +1 -1
  47. package/dist/engines/build-dashboard/update-dashboard.d.ts.map +1 -1
  48. package/dist/engines/build-data-model/build-data-model-engine.d.ts +5 -2
  49. package/dist/engines/build-data-model/build-data-model-engine.d.ts.map +1 -1
  50. package/dist/engines/build-query/build-query-engine.d.ts.map +1 -1
  51. package/dist/engines/build-query/types.d.ts +28 -9
  52. package/dist/engines/build-query/types.d.ts.map +1 -1
  53. package/dist/engines/get-dashboards/get-dashboards-engine.d.ts.map +1 -1
  54. package/dist/engines/get-dashboards/types.d.ts +5 -0
  55. package/dist/engines/get-dashboards/types.d.ts.map +1 -1
  56. package/dist/engines/get-data-source-fields/get-data-source-fields-engine.d.ts.map +1 -1
  57. package/dist/engines/get-data-source-fields/types.d.ts +5 -0
  58. package/dist/engines/get-data-source-fields/types.d.ts.map +1 -1
  59. package/dist/engines/get-data-sources/get-data-sources-engine.d.ts.map +1 -1
  60. package/dist/engines/get-data-sources/types.d.ts +13 -4
  61. package/dist/engines/get-data-sources/types.d.ts.map +1 -1
  62. package/dist/engines/index.d.ts +2 -0
  63. package/dist/engines/index.d.ts.map +1 -1
  64. package/dist/engines/manage-perspectives/index.d.ts +3 -0
  65. package/dist/engines/manage-perspectives/index.d.ts.map +1 -0
  66. package/dist/engines/manage-perspectives/manage-perspectives-engine.d.ts +12 -0
  67. package/dist/engines/manage-perspectives/manage-perspectives-engine.d.ts.map +1 -0
  68. package/dist/engines/manage-perspectives/types.d.ts +367 -0
  69. package/dist/engines/manage-perspectives/types.d.ts.map +1 -0
  70. package/dist/engines/recommend-queries/recommend-queries-engine.d.ts.map +1 -1
  71. package/dist/engines/recommend-queries/types.d.ts +5 -0
  72. package/dist/engines/recommend-queries/types.d.ts.map +1 -1
  73. package/dist/engines/shared/get-filters-json-for-llm-summary.d.ts +12 -0
  74. package/dist/engines/shared/get-filters-json-for-llm-summary.d.ts.map +1 -0
  75. package/dist/engines/shared/nlq-query-helpers.d.ts +13 -3
  76. package/dist/engines/shared/nlq-query-helpers.d.ts.map +1 -1
  77. package/dist/index.d.ts +10 -0
  78. package/dist/index.d.ts.map +1 -1
  79. package/dist/index.js +5608 -3588
  80. package/dist/index.js.map +1 -1
  81. package/dist/services/data-models/ecm-service.d.ts.map +1 -1
  82. package/dist/services/data-sources/data-sources-service.d.ts +12 -1
  83. package/dist/services/data-sources/data-sources-service.d.ts.map +1 -1
  84. package/dist/services/llm/llm-consumption-service.d.ts.map +1 -1
  85. package/dist/services/nlq/nlq-service.d.ts +33 -3
  86. package/dist/services/nlq/nlq-service.d.ts.map +1 -1
  87. package/dist/utils/create-custom-fetch.d.ts.map +1 -1
  88. package/dist/utils/dev-debug.d.ts +8 -0
  89. package/dist/utils/dev-debug.d.ts.map +1 -0
  90. package/dist/utils/trusted-base-url.d.ts +2 -0
  91. package/dist/utils/trusted-base-url.d.ts.map +1 -0
  92. package/package.json +1 -1
@@ -1,18 +1,31 @@
1
1
  import { z } from 'zod';
2
2
  import { HttpClient } from '@sisense/sdk-rest-client';
3
- import { ChartState, Dataset, NlqV3Result } from '../../services/nlq/nlq-service';
3
+ import { Dataset, QueryExecutionResult, QueryState } from '../../services/nlq/nlq-service';
4
+ export interface QueryResult {
5
+ queryId: string;
6
+ title: string;
7
+ nlqResult: QueryExecutionResult;
8
+ }
9
+ /**
10
+ * Canonical tool description for buildQuery — reusable by any host (sdk-assistant, MCP server, custom integrations).
11
+ * Hosts may append host-specific notes but should not duplicate or contradict this text.
12
+ */
13
+ export declare const buildQueryToolDescription = "Runs an analytics query from a natural language prompt and returns the results as structured data (tabular exploration, no chart).\n\n**New query** \u2014 Only for the first query in a chain, or when the user clearly abandons the prior result and starts unrelated analysis. Omit `priorQueryId` (or null). Put the full natural-language intent in `queryPrompt`.\n\n**Revise an existing query** \u2014 Use for same-thread follow-ups that adjust the *same* analysis: different breakdown (e.g. by year, by category), added or removed filters, sort order, measure swaps, limits (Top N), trend/forecast, etc. Treat these as revisions, not separate unrelated queries.\n\nFor revisions: \n- Set `priorQueryId` to the exact string in the `queryId` field from the **latest successful** tool result of this tool in the conversation (that value is the same id you pass as `queryId` when wiring a prior tabular result into the chart tool). \n- In `queryPrompt`, pass only the delta vs. that prior query \u2014 do not repeat the full prior specification.\n\nReturn value includes queryId, queryState, and dataset rows. If the dataset includes a \"sample\" key, the full result was size-limited \u2014 call the chart tool with that queryId so the user can explore the complete result in the chart widget.";
4
14
  /**
5
15
  * Schema for buildQuery engine parameters
6
16
  */
7
17
  export declare const buildQuerySchema: z.ZodObject<{
8
18
  dataSourceTitle: z.ZodString;
9
19
  queryPrompt: z.ZodString;
20
+ priorQueryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
21
  }, "strip", z.ZodTypeAny, {
11
22
  dataSourceTitle: string;
12
23
  queryPrompt: string;
24
+ priorQueryId?: string | null | undefined;
13
25
  }, {
14
26
  dataSourceTitle: string;
15
27
  queryPrompt: string;
28
+ priorQueryId?: string | null | undefined;
16
29
  }>;
17
30
  /**
18
31
  * Context interface for buildQueryEngine
@@ -22,19 +35,25 @@ export interface BuildQueryContext {
22
35
  toolCallId: string;
23
36
  /** HTTP client for API calls (optional, uses singleton if not provided) */
24
37
  httpClient?: HttpClient;
25
- /** Translated dashboard filters for NLQ smart-query `commonFilters` (omit when not applying) */
26
- filters?: unknown;
27
- }
28
- export interface QueryResult {
29
- queryId: string;
30
- title: string;
31
- nlqResult: NlqV3Result;
38
+ /** Common filters (e.g., from dashboard filters) to be applied to the query. */
39
+ commonFilters?: unknown;
40
+ /**
41
+ * Resolve a stored query by id when `params.priorQueryId` is set.
42
+ * Required whenever `priorQueryId` is present; prior NLQ state is read from
43
+ * `nlqResult.queryState` only.
44
+ */
45
+ retrieveQuery?: (queryId: string) => QueryResult | null;
46
+ /**
47
+ * When true (default), prior NLQ state is sent as REST `chartState`.
48
+ * When false, prior state is inlined into `text` instead (instances without wire delta support).
49
+ */
50
+ isNlqDeltaEnabled?: boolean;
32
51
  }
33
52
  /** Summary of a query for LLM consumption (tool response and prompt context). */
34
53
  export interface QuerySummary {
35
54
  queryId: string;
36
55
  title: string;
37
- chartState: ChartState;
56
+ queryState: QueryState;
38
57
  dataset: Dataset;
39
58
  }
40
59
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/engines/build-query/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EACN,UAAU,EACV,OAAO,EACP,WAAW,EACX,MAAM,gCAAgC,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;EAS3B,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,gCAAgC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,gGAAgG;IAChG,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,WAAW,CAAC;CACvB;AAED,iFAAiF;AACjF,MAAM,WAAW,YAAY;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC7B,MAAM,EAAE,WAAW,EACnB,cAAc,UAAO,GACnB,YAAY,CASd"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/engines/build-query/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EACN,OAAO,EACP,oBAAoB,EACpB,UAAU,EACV,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,WAAW;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,oBAAoB,CAAC;CAChC;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,6wCAUyM,CAAC;AAEhP;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAgB3B,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,gCAAgC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,gFAAgF;IAChF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,WAAW,GAAG,IAAI,CAAC;IACxD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,iFAAiF;AACjF,MAAM,WAAW,YAAY;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC7B,MAAM,EAAE,WAAW,EACnB,cAAc,UAAO,GACnB,YAAY,CASd"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-dashboards-engine.d.ts","sourceRoot":"","sources":["../../../src/engines/get-dashboards/get-dashboards-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EACN,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACxC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,EAC3C,OAAO,EAAE,oBAAoB,GAC3B,OAAO,CAAC,gBAAgB,CAAC,CAQ3B"}
1
+ {"version":3,"file":"get-dashboards-engine.d.ts","sourceRoot":"","sources":["../../../src/engines/get-dashboards/get-dashboards-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACN,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,MAAM,SAAS,CAAC;AAIjB;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACxC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,EAC3C,OAAO,EAAE,oBAAoB,GAC3B,OAAO,CAAC,gBAAgB,CAAC,CAW3B"}
@@ -1,6 +1,11 @@
1
1
  import { z } from 'zod';
2
2
  import { Dashboard } from '../../services/dashboards/fusion-dashboards-service';
3
3
  import { HttpClient } from '@sisense/sdk-rest-client';
4
+ /**
5
+ * Canonical tool description for getDashboards — reusable by any host (sdk-assistant, MCP server, custom integrations).
6
+ * Hosts may append host-specific notes but should not duplicate or contradict this text.
7
+ */
8
+ export declare const getDashboardsToolDescription = "Get a list of available Fusion dashboards created by the assistant (or exposed by the host).\n\nDo not read the raw tool result as a list to the user. Use it internally, then suggest one or two concrete follow-ups (e.g. which dashboard to open or extend) instead of dumping every title.";
4
9
  /**
5
10
  * Schema for getDashboards engine parameters
6
11
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/engines/get-dashboards/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,mBAAmB,gDAAe,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,UAAU,EAAE,SAAS,EAAE,CAAC;CACxB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/engines/get-dashboards/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,4BAA4B,mSAEsJ,CAAC;AAEhM;;GAEG;AACH,eAAO,MAAM,mBAAmB,gDAAe,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,UAAU,EAAE,SAAS,EAAE,CAAC;CACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-data-source-fields-engine.d.ts","sourceRoot":"","sources":["../../../src/engines/get-data-source-fields/get-data-source-fields-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAEN,8BAA8B,EAC9B,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOpD,OAAO,EACN,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACtB,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC9C,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,EACjD,OAAO,EAAE,0BAA0B,GACjC,OAAO,CAAC,sBAAsB,CAAC,CAiDjC;AAsBD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,SAAS,GAAG,MAAM,CAuCtE;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACzC,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,8BAA8B,EAAE,GAAG,eAAe,EAAE,EAC5D,QAAQ,CAAC,EAAE,SAAS,GAClB,MAAM,CA2BR"}
1
+ {"version":3,"file":"get-data-source-fields-engine.d.ts","sourceRoot":"","sources":["../../../src/engines/get-data-source-fields/get-data-source-fields-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAEN,8BAA8B,EAC9B,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAQpD,OAAO,EACN,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACtB,MAAM,SAAS,CAAC;AAGjB;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC9C,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,EACjD,OAAO,EAAE,0BAA0B,GACjC,OAAO,CAAC,sBAAsB,CAAC,CAiDjC;AAsBD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,SAAS,GAAG,MAAM,CAuCtE;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACzC,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,8BAA8B,EAAE,GAAG,eAAe,EAAE,EAC5D,QAAQ,CAAC,EAAE,SAAS,GAClB,MAAM,CA2BR"}
@@ -2,6 +2,11 @@ import { z } from 'zod';
2
2
  import { DataSourceField, JSONArray } from '@sisense/sdk-data';
3
3
  import { HttpClient } from '@sisense/sdk-rest-client';
4
4
  import { DataSourceFieldWithDescription } from '../../services/data-sources/data-sources-service';
5
+ /**
6
+ * Canonical tool description for getDataSourceFields — reusable by any host (sdk-assistant, MCP server, custom integrations).
7
+ * Hosts may append host-specific notes but should not duplicate or contradict this text.
8
+ */
9
+ export declare const getDataSourceFieldsToolDescription = "Get details of a data source's fields \u2014 tables, columns, and user-created formulas \u2014 as a flat list. Use this metadata to build queries, charts, or dashboards.\n\nNOT the right tool for \"explore / show me / view the model\" as a visual diagram. That is getModelSchema (interactive model diagram when the host supports it). Only call this tool when you need the column list for a downstream query-building step, never as the default exploration action.";
5
10
  /**
6
11
  * Schema for getDataSourceFields engine parameters
7
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/engines/get-data-source-fields/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,8BAA8B,EAAE,MAAM,8CAA8C,CAAC;AAE9F;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,8BAA8B,EAAE,GAAG,eAAe,EAAE,CAAC;IAC7D,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/engines/get-data-source-fields/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,8BAA8B,EAAE,MAAM,8CAA8C,CAAC;AAE9F;;;GAGG;AACH,eAAO,MAAM,kCAAkC,mdAEiP,CAAC;AAEjS;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,8BAA8B,EAAE,GAAG,eAAe,EAAE,CAAC;IAC7D,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-data-sources-engine.d.ts","sourceRoot":"","sources":["../../../src/engines/get-data-sources/get-data-sources-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EACN,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACzC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,EAC5C,OAAO,EAAE,qBAAqB,GAC5B,OAAO,CAAC,iBAAiB,CAAC,CAS5B"}
1
+ {"version":3,"file":"get-data-sources-engine.d.ts","sourceRoot":"","sources":["../../../src/engines/get-data-sources/get-data-sources-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACN,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,SAAS,CAAC;AAIjB;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACzC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,EAC5C,OAAO,EAAE,qBAAqB,GAC5B,OAAO,CAAC,iBAAiB,CAAC,CAe5B"}
@@ -1,6 +1,11 @@
1
1
  import { z } from 'zod';
2
- import { JaqlDataSourceForDto } from '@sisense/sdk-data';
3
2
  import { HttpClient } from '@sisense/sdk-rest-client';
3
+ import { DataSourceWithStatus } from '../../services/data-sources/data-sources-service';
4
+ /**
5
+ * Canonical tool description for getDataSources — reusable by any host (sdk-assistant, MCP server, custom integrations).
6
+ * Hosts may append host-specific notes but should not duplicate or contradict this text.
7
+ */
8
+ export declare const getDataSourcesToolDescription = "Get the available data sources / data models. \"Data sources\" and \"data models\" are the SAME entity \u2014 this is the only discovery tool for both.\n\nBefore promising the user that queries, charts, dashboards, or query recommendations will work on a source, use this tool (or rely on a fresh result from the current conversation) to see what exists and whether each item is ready to query or still a draft.\n\nReturns:\n- dataSourceTitles: every source the user has access to (ready + draft)\n- draftDataSourceTitles: subset that are DRAFT (existing data models that have never been built \u2014 present in metadata but no successful build yet)\n- dataSources: array of { title, oid, status, live }, where:\n * oid is the ELASTICUBE DATAMODEL UUID \u2014 pass this as datamodelOid to getModelSchema, addRelation, createPerspective, updatePerspective, listPerspectives, triggerBuild. NEVER pass the title as datamodelOid.\n * status is 'ready' (built/queryable) or 'draft' (not built yet)\n * live is true for live/external connections (Snowflake, BigQuery, etc.) \u2014 these are NOT elasticubes and have no oid; they cannot be used with schema/perspective tools.\n\nWorkflow rules for drafts:\n- DRAFTS CANNOT BE QUERIED. Do NOT call buildQuery, buildChart, buildDashboard, or recommendQueries on a draft \u2014 the query endpoints will reject it.\n- Drafts CAN be inspected (getModelSchema), have relations edited (addRelation), and have perspectives listed/created (listPerspectives, createPerspective) \u2014 these are metadata operations.\n- \"Show me / view / explore [draft model name]\" \u2192 call getModelSchema with that entry's oid IMMEDIATELY. Do not ask the user \"schema or build?\" \u2014 just render the diagram. Only block on QUERY actions.\n- If the user asks to query/chart/analyze a draft, tell them it must be built first and offer to call triggerBuild.\n\nWhen listing sources to the user, mark drafts explicitly (e.g. \"Sales DB (draft \u2014 not built yet)\").";
4
9
  /**
5
10
  * Schema for getDataSources engine parameters
6
11
  */
@@ -20,12 +25,16 @@ export interface GetDataSourcesContext {
20
25
  */
21
26
  export interface DataSourcesResult {
22
27
  /**
23
- * List of data source titles
28
+ * List of data source titles (includes both ready and draft)
24
29
  */
25
30
  dataSourceTitles: string[];
26
31
  /**
27
- * Full data source objects
32
+ * Subset of titles that are draft (existing models that have never been built — not queryable yet)
33
+ */
34
+ draftDataSourceTitles: string[];
35
+ /**
36
+ * Full data source objects with `status: 'ready' | 'draft'` marker
28
37
  */
29
- dataSources: JaqlDataSourceForDto[];
38
+ dataSources: DataSourceWithStatus[];
30
39
  }
31
40
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/engines/get-data-sources/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,oBAAoB,gDAAe,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B;;OAEG;IACH,WAAW,EAAE,oBAAoB,EAAE,CAAC;CACpC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/engines/get-data-sources/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AAEpF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,o9DAkB0D,CAAC;AAErG;;GAEG;AACH,eAAO,MAAM,oBAAoB,gDAAe,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B;;OAEG;IACH,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC;;OAEG;IACH,WAAW,EAAE,oBAAoB,EAAE,CAAC;CACpC"}
@@ -10,4 +10,6 @@ export * from './get-dashboards';
10
10
  export * from './build-dashboard';
11
11
  export * from './recommend-queries';
12
12
  export * from './build-data-model';
13
+ export * from './manage-perspectives';
14
+ export * from './build-csv-model';
13
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/engines/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAGxE,cAAc,qBAAqB,CAAC;AAGpC,cAAc,eAAe,CAAC;AAG9B,cAAc,mCAAmC,CAAC;AAGlD,OAAO,EACN,yBAAyB,EACzB,uBAAuB,GACvB,MAAM,kDAAkD,CAAC;AAG1D,cAAc,oBAAoB,CAAC;AAGnC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/engines/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAGxE,cAAc,qBAAqB,CAAC;AAGpC,cAAc,eAAe,CAAC;AAG9B,cAAc,mCAAmC,CAAC;AAGlD,OAAO,EACN,yBAAyB,EACzB,uBAAuB,GACvB,MAAM,kDAAkD,CAAC;AAG1D,cAAc,oBAAoB,CAAC;AAGnC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { listDataModelsEngine, getModelSchemaEngine, addRelationEngine, removeRelationEngine, createPerspectiveEngine, updatePerspectiveEngine, getPerspectiveEngine, triggerBuildEngine, listPerspectivesEngine, } from './manage-perspectives-engine';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/engines/manage-perspectives/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,GACtB,MAAM,8BAA8B,CAAC;AACtC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { listDataModelsParamsSchema, getModelSchemaParamsSchema, addRelationParamsSchema, removeRelationParamsSchema, createPerspectiveParamsSchema, updatePerspectiveParamsSchema, getPerspectiveParamsSchema, triggerBuildParamsSchema, listPerspectivesParamsSchema, ListDataModelsResult, ModelSchemaResult, AddRelationResult, RemoveRelationResult, CreatePerspectiveResult, UpdatePerspectiveResult, GetPerspectiveResult, TriggerBuildResult, ListPerspectivesResult, PerspectiveEngineContext } from './types';
3
+ export declare function listDataModelsEngine(_params: z.infer<typeof listDataModelsParamsSchema>, context: PerspectiveEngineContext): Promise<ListDataModelsResult>;
4
+ export declare function getModelSchemaEngine(params: z.infer<typeof getModelSchemaParamsSchema>, context: PerspectiveEngineContext): Promise<ModelSchemaResult>;
5
+ export declare function addRelationEngine(params: z.infer<typeof addRelationParamsSchema>, context: PerspectiveEngineContext): Promise<AddRelationResult>;
6
+ export declare function removeRelationEngine(params: z.infer<typeof removeRelationParamsSchema>, context: PerspectiveEngineContext): Promise<RemoveRelationResult>;
7
+ export declare function createPerspectiveEngine(params: z.infer<typeof createPerspectiveParamsSchema>, context: PerspectiveEngineContext): Promise<CreatePerspectiveResult>;
8
+ export declare function updatePerspectiveEngine(params: z.infer<typeof updatePerspectiveParamsSchema>, context: PerspectiveEngineContext): Promise<UpdatePerspectiveResult>;
9
+ export declare function getPerspectiveEngine(params: z.infer<typeof getPerspectiveParamsSchema>, context: PerspectiveEngineContext): Promise<GetPerspectiveResult>;
10
+ export declare function listPerspectivesEngine(params: z.infer<typeof listPerspectivesParamsSchema>, context: PerspectiveEngineContext): Promise<ListPerspectivesResult>;
11
+ export declare function triggerBuildEngine(params: z.infer<typeof triggerBuildParamsSchema>, context: PerspectiveEngineContext): Promise<TriggerBuildResult>;
12
+ //# sourceMappingURL=manage-perspectives-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manage-perspectives-engine.d.ts","sourceRoot":"","sources":["../../../src/engines/manage-perspectives/manage-perspectives-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,OAAO,EACN,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,MAAM,SAAS,CAAC;AAgGjB,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,EACnD,OAA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EAAE,wBAAwB,GAC/B,OAAO,CAAC,kBAAkB,CAAC,CAuB7B"}
@@ -0,0 +1,367 @@
1
+ import { z } from 'zod';
2
+ import { HttpClient } from '@sisense/sdk-rest-client';
3
+ export declare const listDataModelsParamsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
4
+ export interface DataModelSummary {
5
+ oid: string;
6
+ title: string;
7
+ type: string;
8
+ lastBuildTime: string | null;
9
+ }
10
+ export interface ListDataModelsResult {
11
+ models: DataModelSummary[];
12
+ }
13
+ export declare const getModelSchemaParamsSchema: z.ZodObject<{
14
+ datamodelOid: z.ZodString;
15
+ }, "strip", z.ZodTypeAny, {
16
+ datamodelOid: string;
17
+ }, {
18
+ datamodelOid: string;
19
+ }>;
20
+ export interface ModelColumn {
21
+ oid: string;
22
+ name: string;
23
+ type: number;
24
+ }
25
+ export interface ModelTable {
26
+ oid: string;
27
+ name: string;
28
+ datasetOid: string;
29
+ columns: ModelColumn[];
30
+ }
31
+ export interface ModelRelation {
32
+ oid: string;
33
+ tables: string[];
34
+ }
35
+ export interface ModelSchemaResult {
36
+ datamodelOid: string;
37
+ title: string;
38
+ tables: ModelTable[];
39
+ relations: ModelRelation[];
40
+ }
41
+ export declare const createPerspectiveParamsSchema: z.ZodObject<{
42
+ datamodelOid: z.ZodString;
43
+ name: z.ZodString;
44
+ description: z.ZodOptional<z.ZodString>;
45
+ tables: z.ZodArray<z.ZodObject<{
46
+ oid: z.ZodString;
47
+ diffType: z.ZodEnum<["include", "exclude"]>;
48
+ columnsDiff: z.ZodArray<z.ZodObject<{
49
+ oid: z.ZodString;
50
+ enabled: z.ZodBoolean;
51
+ }, "strip", z.ZodTypeAny, {
52
+ enabled: boolean;
53
+ oid: string;
54
+ }, {
55
+ enabled: boolean;
56
+ oid: string;
57
+ }>, "many">;
58
+ }, "strip", z.ZodTypeAny, {
59
+ oid: string;
60
+ diffType: "include" | "exclude";
61
+ columnsDiff: {
62
+ enabled: boolean;
63
+ oid: string;
64
+ }[];
65
+ }, {
66
+ oid: string;
67
+ diffType: "include" | "exclude";
68
+ columnsDiff: {
69
+ enabled: boolean;
70
+ oid: string;
71
+ }[];
72
+ }>, "many">;
73
+ relations: z.ZodOptional<z.ZodArray<z.ZodObject<{
74
+ oid: z.ZodString;
75
+ }, "strip", z.ZodTypeAny, {
76
+ oid: string;
77
+ }, {
78
+ oid: string;
79
+ }>, "many">>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ name: string;
82
+ tables: {
83
+ oid: string;
84
+ diffType: "include" | "exclude";
85
+ columnsDiff: {
86
+ enabled: boolean;
87
+ oid: string;
88
+ }[];
89
+ }[];
90
+ datamodelOid: string;
91
+ description?: string | undefined;
92
+ relations?: {
93
+ oid: string;
94
+ }[] | undefined;
95
+ }, {
96
+ name: string;
97
+ tables: {
98
+ oid: string;
99
+ diffType: "include" | "exclude";
100
+ columnsDiff: {
101
+ enabled: boolean;
102
+ oid: string;
103
+ }[];
104
+ }[];
105
+ datamodelOid: string;
106
+ description?: string | undefined;
107
+ relations?: {
108
+ oid: string;
109
+ }[] | undefined;
110
+ }>;
111
+ export interface CreatePerspectiveResult {
112
+ perspectiveOid: string;
113
+ name: string;
114
+ datamodelOid: string;
115
+ tableCount: number;
116
+ columnCount: number;
117
+ }
118
+ export declare const addRelationParamsSchema: z.ZodObject<{
119
+ datamodelOid: z.ZodString;
120
+ source: z.ZodObject<{
121
+ dataset: z.ZodString;
122
+ table: z.ZodString;
123
+ column: z.ZodString;
124
+ }, "strip", z.ZodTypeAny, {
125
+ table: string;
126
+ column: string;
127
+ dataset: string;
128
+ }, {
129
+ table: string;
130
+ column: string;
131
+ dataset: string;
132
+ }>;
133
+ target: z.ZodObject<{
134
+ dataset: z.ZodString;
135
+ table: z.ZodString;
136
+ column: z.ZodString;
137
+ }, "strip", z.ZodTypeAny, {
138
+ table: string;
139
+ column: string;
140
+ dataset: string;
141
+ }, {
142
+ table: string;
143
+ column: string;
144
+ dataset: string;
145
+ }>;
146
+ }, "strip", z.ZodTypeAny, {
147
+ source: {
148
+ table: string;
149
+ column: string;
150
+ dataset: string;
151
+ };
152
+ datamodelOid: string;
153
+ target: {
154
+ table: string;
155
+ column: string;
156
+ dataset: string;
157
+ };
158
+ }, {
159
+ source: {
160
+ table: string;
161
+ column: string;
162
+ dataset: string;
163
+ };
164
+ datamodelOid: string;
165
+ target: {
166
+ table: string;
167
+ column: string;
168
+ dataset: string;
169
+ };
170
+ }>;
171
+ export interface AddRelationResult {
172
+ relationOid: string;
173
+ datamodelOid: string;
174
+ }
175
+ export declare const removeRelationParamsSchema: z.ZodObject<{
176
+ datamodelOid: z.ZodString;
177
+ relationOid: z.ZodString;
178
+ }, "strip", z.ZodTypeAny, {
179
+ datamodelOid: string;
180
+ relationOid: string;
181
+ }, {
182
+ datamodelOid: string;
183
+ relationOid: string;
184
+ }>;
185
+ export interface RemoveRelationResult {
186
+ relationOid: string;
187
+ datamodelOid: string;
188
+ }
189
+ export declare const updatePerspectiveParamsSchema: z.ZodObject<{
190
+ perspectiveOid: z.ZodString;
191
+ name: z.ZodOptional<z.ZodString>;
192
+ description: z.ZodOptional<z.ZodString>;
193
+ tables: z.ZodOptional<z.ZodArray<z.ZodObject<{
194
+ oid: z.ZodString;
195
+ diffType: z.ZodEnum<["include", "exclude"]>;
196
+ columnsDiff: z.ZodArray<z.ZodObject<{
197
+ oid: z.ZodString;
198
+ enabled: z.ZodBoolean;
199
+ }, "strip", z.ZodTypeAny, {
200
+ enabled: boolean;
201
+ oid: string;
202
+ }, {
203
+ enabled: boolean;
204
+ oid: string;
205
+ }>, "many">;
206
+ }, "strip", z.ZodTypeAny, {
207
+ oid: string;
208
+ diffType: "include" | "exclude";
209
+ columnsDiff: {
210
+ enabled: boolean;
211
+ oid: string;
212
+ }[];
213
+ }, {
214
+ oid: string;
215
+ diffType: "include" | "exclude";
216
+ columnsDiff: {
217
+ enabled: boolean;
218
+ oid: string;
219
+ }[];
220
+ }>, "many">>;
221
+ relations: z.ZodOptional<z.ZodArray<z.ZodObject<{
222
+ oid: z.ZodString;
223
+ }, "strip", z.ZodTypeAny, {
224
+ oid: string;
225
+ }, {
226
+ oid: string;
227
+ }>, "many">>;
228
+ }, "strip", z.ZodTypeAny, {
229
+ perspectiveOid: string;
230
+ description?: string | undefined;
231
+ name?: string | undefined;
232
+ tables?: {
233
+ oid: string;
234
+ diffType: "include" | "exclude";
235
+ columnsDiff: {
236
+ enabled: boolean;
237
+ oid: string;
238
+ }[];
239
+ }[] | undefined;
240
+ relations?: {
241
+ oid: string;
242
+ }[] | undefined;
243
+ }, {
244
+ perspectiveOid: string;
245
+ description?: string | undefined;
246
+ name?: string | undefined;
247
+ tables?: {
248
+ oid: string;
249
+ diffType: "include" | "exclude";
250
+ columnsDiff: {
251
+ enabled: boolean;
252
+ oid: string;
253
+ }[];
254
+ }[] | undefined;
255
+ relations?: {
256
+ oid: string;
257
+ }[] | undefined;
258
+ }>;
259
+ export interface UpdatePerspectiveResult {
260
+ perspectiveOid: string;
261
+ updated: boolean;
262
+ }
263
+ export declare const getPerspectiveParamsSchema: z.ZodObject<{
264
+ perspectiveOid: z.ZodString;
265
+ }, "strip", z.ZodTypeAny, {
266
+ perspectiveOid: string;
267
+ }, {
268
+ perspectiveOid: string;
269
+ }>;
270
+ export interface GetPerspectiveResult {
271
+ perspectiveOid: string;
272
+ name: string;
273
+ description: string;
274
+ datamodelOid: string;
275
+ tables: Array<{
276
+ oid: string;
277
+ diffType: 'include' | 'exclude';
278
+ columnsDiff: Array<{
279
+ oid: string;
280
+ enabled: boolean;
281
+ }>;
282
+ }>;
283
+ relations: Array<{
284
+ oid: string;
285
+ }>;
286
+ isDefault?: boolean;
287
+ }
288
+ export declare const triggerBuildParamsSchema: z.ZodObject<{
289
+ datamodelOid: z.ZodString;
290
+ wait: z.ZodOptional<z.ZodBoolean>;
291
+ }, "strip", z.ZodTypeAny, {
292
+ datamodelOid: string;
293
+ wait?: boolean | undefined;
294
+ }, {
295
+ datamodelOid: string;
296
+ wait?: boolean | undefined;
297
+ }>;
298
+ export interface TriggerBuildResult {
299
+ datamodelOid: string;
300
+ buildOid: string;
301
+ status: 'queued' | 'done' | 'failed' | 'timeout';
302
+ durationMs?: number;
303
+ }
304
+ export declare const listPerspectivesParamsSchema: z.ZodObject<{
305
+ datamodelOid: z.ZodOptional<z.ZodString>;
306
+ includeDefault: z.ZodOptional<z.ZodBoolean>;
307
+ }, "strip", z.ZodTypeAny, {
308
+ datamodelOid?: string | undefined;
309
+ includeDefault?: boolean | undefined;
310
+ }, {
311
+ datamodelOid?: string | undefined;
312
+ includeDefault?: boolean | undefined;
313
+ }>;
314
+ export interface PerspectiveSummary {
315
+ perspectiveOid: string;
316
+ name: string;
317
+ description: string;
318
+ datamodelOid: string;
319
+ tableCount: number;
320
+ isDefault: boolean;
321
+ lastUpdated?: string;
322
+ }
323
+ export interface ListPerspectivesResult {
324
+ perspectives: PerspectiveSummary[];
325
+ }
326
+ export interface PerspectiveEngineContext {
327
+ toolCallId: string;
328
+ httpClient?: HttpClient;
329
+ }
330
+ /**
331
+ * Canonical tool description for listDataModels — reusable by any host.
332
+ * When getDataSources is also registered, prefer getDataSources for discovery (it includes drafts and live sources); use this tool for Elasticube-only model lists if needed.
333
+ */
334
+ export declare const listDataModelsToolDescription = "Lists all Sisense data models (Elasticubes) available in the instance. Data models and data sources overlap in Sisense \u2014 when getDataSources is available, prefer it for unified discovery.\n\nReturns each model's OID (UUID), title, and type. At the start of a perspective workflow, call this as the ONLY tool in the turn if you use it \u2014 never use an OID from memory, prior context, or examples. After it returns, present the model list and stop; wait for the user to pick a model before calling getModelSchema. Do NOT chain into getModelSchema in the same turn.";
335
+ /**
336
+ * Canonical tool description for getModelSchema — reusable by any host.
337
+ */
338
+ export declare const getModelSchemaToolDescription = "Fetches the full schema of a Sisense data model: all tables with their OIDs and columns (with OIDs and types), plus all relation OIDs.\n\nIMPORTANT: The datamodelOid parameter MUST be a UUID \u2014 use the `oid` field from a `getDataSources` or `listDataModels` result in the current conversation. Never use an OID from memory, context, or examples. Perspective OIDs and legacy datasource string IDs (e.g. \"localhost_aSampleECommerce\") are NOT valid here.\n\nThis is the canonical \"show / explore / view / open the data model\" action (including drafts for inspection). When the user picks a model or uses those verbs about a specific model by name, use the model's oid from the latest getDataSources result. Do not ask \"schema or build?\" for a simple show-model request. Do not use getDataSourceFields as the default exploration action \u2014 that returns a flat field list, not the model diagram.\n\nThis is step 2 of the perspective workflow. After this returns, propose 2-4 concrete perspective ideas (each with: name, tables included, columns hidden, intended audience) and ASK the user which one to create. STOP and wait \u2014 do NOT call createPerspective in the same turn.\n\nPerspective workflow pacing: prefer one major conversational step per assistant reply where possible \u2014 list what exists, inspect and discuss the schema with the user, agree on a design, then call createPerspective in a later focused turn once choices are clear (rather than jumping from first discovery straight to creation in one reply when the user has not confirmed direction).";
339
+ /**
340
+ * Canonical tool description for addRelation — reusable by any host.
341
+ */
342
+ export declare const addRelationToolDescription = "Creates a join relationship between two tables in a Sisense data model.\n\nCall getModelSchema first \u2014 all three IDs (dataset, table, column) must be UUIDs from that response.\nSource = the \"many\" side (fact/transaction table with the FK column).\nTarget = the \"one\" side (dimension/lookup table with the PK column).\n\nCall once per join. The host may refresh the model diagram as each addRelation succeeds.\n\nAfter all addRelation calls succeed in a turn, briefly summarize the joins you created and ASK the user whether to trigger a build now (so the new joins become queryable). Do NOT call triggerBuild automatically \u2014 it requires explicit user agreement.";
343
+ /**
344
+ * Canonical tool description for removeRelation — reusable by any host.
345
+ */
346
+ export declare const removeRelationToolDescription = "Removes a join relationship from a Sisense data model.\n\nCall getModelSchema first to obtain the relations[].oid you want to remove. Pass that as relationOid; the engine validates it exists on the given datamodelOid before sending the mutation.\n\nCall once per relation. The host may refresh the model diagram as each removeRelation succeeds.\n\nAfter all removeRelation calls succeed in a turn, briefly summarize what you removed and ASK the user whether to trigger a build now. Do NOT call triggerBuild automatically \u2014 it requires explicit user agreement.";
347
+ /**
348
+ * Canonical tool description for createPerspective — reusable by any host.
349
+ */
350
+ export declare const createPerspectiveToolDescription = "Creates a new perspective (filtered sub-model) on a Sisense data model. This is step 3 \u2014 the final step \u2014 of the perspective workflow.\n\nFor a new perspective, work in stages: first discover models and wait for the user to pick one, then fetch schema and wait for design agreement, then call this tool in its own turn with OIDs from that schema \u2014 never skip discovery or schema in the same turn as create.\n\nCall getModelSchema first (step 2) to get exact table OIDs, column OIDs, and relation OIDs. Use ONLY OIDs from that schema response \u2014 never invent or guess OIDs.\n\nAfter the user picks a perspective option (or describes a custom one), call this tool IMMEDIATELY in the same turn. Do not ask further confirmation. The host typically opens an interactive diagram of the perspective \u2014 reply with a one-line confirmation; do not narrate the diagram in detail.\n\ndiffType rules:\n- \"include\": allowlist \u2014 only columns listed with enabled:true are visible. Use when exposing a small subset.\n- \"exclude\": denylist \u2014 all columns visible except those listed with enabled:false. Use when hiding a few sensitive columns.\n\ncolumnsDiff must never be empty \u2014 for \"include\" list every visible column with enabled:true; for \"exclude\" list at least one hidden column with enabled:false.\n\nInclude a relation OID only when both connected tables are in the perspective's tables list.";
351
+ /**
352
+ * Canonical tool description for updatePerspective — reusable by any host.
353
+ */
354
+ export declare const updatePerspectiveToolDescription = "Updates an existing Sisense PERSPECTIVE (a saved filtered sub-model / view). This tool does NOT modify the underlying data model \u2014 it only changes which tables/columns/relations a specific perspective exposes.\n\nDO NOT call this tool when the user asks to add, remove, or modify RELATIONS on the data model itself \u2014 that operates on the model, not on a perspective. (To add a relation, use addRelation. To remove a relation, use removeRelation.)\n\nSend only the fields you want to change:\n- To rename a perspective: pass only name.\n- To update column visibility within the perspective: pass the full tables array (it replaces the existing one).\n- To expose another existing table in the perspective: include all existing tables plus the new one in the tables array.\n\nAfter a successful update, call getPerspective with the same perspectiveOid in the next turn so the user sees the refreshed diagram.";
355
+ /**
356
+ * Canonical tool description for getPerspective — reusable by any host.
357
+ */
358
+ export declare const getPerspectiveToolDescription = "Fetches the current state of a Sisense perspective. The host typically renders an interactive diagram when supported.\n\nCall ONLY when the user references a specific perspective by name, asks to view/open/show that perspective, after listPerspectives when they pick one, or directly after a successful updatePerspective.\n\nDo NOT call as a follow-up to getModelSchema for a generic \"show me the model diagram\" \u2014 that is model-level (getModelSchema). Do NOT also call when the user only named the parent data model unless they named a perspective.\n\nThis always fetches fresh state from the server \u2014 never rely on cached args from prior tool calls.\n\nReply with a one-line confirmation; do not narrate the diagram in detail.";
359
+ /**
360
+ * Canonical tool description for triggerBuild — reusable by any host.
361
+ */
362
+ export declare const triggerBuildToolDescription = "Triggers a full build of a Sisense Elasticube and (by default) waits for it to finish.\n\nFull cube rebuilds are disruptive \u2014 long-running and they can block or delay query and chart use on that model until they finish. NEVER call without explicit user agreement in the current conversation.\n\nDESTRUCTIVE / EXPENSIVE: a build recomputes the entire cube and can take 20-90s for small CSV cubes (longer for big ones).\n\nWorkflow rule: after addRelation, table edits, or any other schema change, briefly summarize the change and ASK the user whether to build now. Do not call this tool until the user has explicitly said yes (\"yes, build\", \"go ahead\", \"rebuild now\", etc.). If the user said \"I'll build it myself\" or hasn't responded, do nothing.\n\nPass wait:false only if the user explicitly says \"kick off the build, don't wait\", otherwise leave wait undefined (defaults to true).\n\nConfirm completion in one short line (\"Build done in 32s.\") \u2014 do not narrate progress steps.";
363
+ /**
364
+ * Canonical tool description for listPerspectives — reusable by any host.
365
+ */
366
+ export declare const listPerspectivesToolDescription = "Lists Sisense perspectives. Use whenever the user asks to:\n- \"see / list / show me the perspectives\" (with or without a specific model)\n- \"what perspectives exist on this model\"\n- review existing perspectives before deciding to create / update / delete one\n\nPass datamodelOid to scope to a single model; omit it for a global list across every model the user has access to. Set includeDefault:false to hide the auto-generated Default perspectives.\n\nAfter the result, present the user with a short numbered/bulleted summary (name, table count, default vs custom) and ask which one they want to inspect \u2014 then call getPerspective to render its diagram.";
367
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/engines/manage-perspectives/types.ts"],"names":[],"mappings":"AAA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AAM,CAAC;IACjB,MAAM,EAAE,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,eAAO,MAAM,4BAA4B;;;;;;;;;EAgBvC,CAAC;AAEH,MAAM,WAAW,kBAAkB;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACtC,YAAY,EAAE,kBAAkB,EAAE,CAAC;CACnC;AAID,MAAM,WAAW,wBAAwB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACxB;AAID;;;GAGG;AACH,eAAO,MAAM,6BAA6B,+jBAEwU,CAAC;AAEnX;;GAEG;AACH,eAAO,MAAM,6BAA6B,4iDAQmV,CAAC;AAE9X;;GAEG;AACH,eAAO,MAAM,0BAA0B,wqBAQmN,CAAC;AAE3P;;GAEG;AACH,eAAO,MAAM,6BAA6B,yjBAM0K,CAAC;AAErN;;GAEG;AACH,eAAO,MAAM,gCAAgC,y5CAcgD,CAAC;AAE9F;;GAEG;AACH,eAAO,MAAM,gCAAgC,y5BASwF,CAAC;AAEtI;;GAEG;AACH,eAAO,MAAM,6BAA6B,wuBAQgC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,2BAA2B,8+BAUqD,CAAC;AAE9F;;GAEG;AACH,eAAO,MAAM,+BAA+B,8pBAO8J,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"recommend-queries-engine.d.ts","sourceRoot":"","sources":["../../../src/engines/recommend-queries/recommend-queries-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5C,OAAO,EACN,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EAEtB,6BAA6B,EAG7B,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,wBAAgB,0BAA0B,CACzC,UAAU,EAAE,MAAM,GAChB,SAAS,GAAG,SAAS,CAQvB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACpC,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,EAAE,GACxB,MAAM,GAAG,SAAS,CAyBpB;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAC3C,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,EAC9C,OAAO,EAAE,uBAAuB,EAChC,qBAAqB,CAAC,EAAE,6BAA6B,GACnD,OAAO,CAAC,sBAAsB,CAAC,CAoGjC"}
1
+ {"version":3,"file":"recommend-queries-engine.d.ts","sourceRoot":"","sources":["../../../src/engines/recommend-queries/recommend-queries-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EACN,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EAEtB,6BAA6B,EAG7B,MAAM,SAAS,CAAC;AAIjB;;GAEG;AACH,wBAAgB,0BAA0B,CACzC,UAAU,EAAE,MAAM,GAChB,SAAS,GAAG,SAAS,CAQvB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACpC,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,EAAE,GACxB,MAAM,GAAG,SAAS,CAyBpB;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAC3C,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,EAC9C,OAAO,EAAE,uBAAuB,EAChC,qBAAqB,CAAC,EAAE,6BAA6B,GACnD,OAAO,CAAC,sBAAsB,CAAC,CAsGjC"}
@@ -2,6 +2,11 @@ import { z } from 'zod';
2
2
  import { WidgetProps, ChartType } from '@sisense/sdk-ui';
3
3
  import { HttpClient } from '@sisense/sdk-rest-client';
4
4
  import { OpenAI } from 'openai';
5
+ /**
6
+ * Canonical tool description for recommendQueries — reusable by any host (sdk-assistant, MCP server, custom integrations).
7
+ * Hosts may append host-specific notes but should not duplicate or contradict this text.
8
+ */
9
+ export declare const recommendQueriesToolDescription = "Recommend natural language queries to ask on a data source based on explicit user prompt and context.\n\nIMPORTANT:\n- NEVER assume a data source title is valid. If no fresh getDataSources result exists in this conversation, call getDataSources first to validate the data source exists and is queryable (not draft), or ask the user to specify one.\n- Use userPrompt to filter and prioritize relevant recommendations (e.g. \"revenue dashboard\", \"sales analysis\").\n- Use existingWidgets to avoid duplicate recommendations when adding to existing dashboards.\n- Extract chart types from user prompts (e.g. \"bar chart\", \"line chart\") and pass through to chart generation when the host supports it.\n\nDo not call recommendQueries on a draft data model \u2014 drafts are not queryable until built.";
5
10
  /**
6
11
  * Default number of query recommendations to return
7
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/engines/recommend-queries/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAkBjC,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,UAAU,EAAE,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