@sisense/sdk-ai-core 0.17.0 → 0.60.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.
- package/dist/__vite-browser-external-l0sNRNKZ.js +1 -0
- package/dist/constants.d.ts +35 -0
- package/dist/engines/atomic-handle-args.d.ts +45 -0
- package/dist/engines/atomic-tool-requirements.d.ts +38 -0
- package/dist/engines/author-pulse/actions/create.d.ts +9 -0
- package/dist/engines/author-pulse/actions/define.d.ts +9 -0
- package/dist/engines/author-pulse/actions/load-existing.d.ts +9 -0
- package/dist/engines/author-pulse/actions/redefine.d.ts +9 -0
- package/dist/engines/author-pulse/actions/set-receive-notifications.d.ts +8 -0
- package/dist/engines/author-pulse/actions/update-spec.d.ts +11 -0
- package/dist/engines/author-pulse/actions/update-workflow.d.ts +9 -0
- package/dist/engines/author-pulse/atomic-adapter.d.ts +10 -0
- package/dist/engines/author-pulse/atomic-tools.d.ts +362 -0
- package/dist/engines/author-pulse/author-pulse-engine.d.ts +21 -0
- package/dist/engines/author-pulse/index.d.ts +9 -0
- package/dist/engines/author-pulse/shared/adjustment-error.d.ts +15 -0
- package/dist/engines/author-pulse/shared/assemble-create-workflow-payload.d.ts +36 -0
- package/dist/engines/author-pulse/shared/assert-agentic-workflow.d.ts +12 -0
- package/dist/engines/author-pulse/shared/compile-query-from-prompt.d.ts +95 -0
- package/dist/engines/author-pulse/shared/decision-spec-validation.d.ts +84 -0
- package/dist/engines/author-pulse/shared/notification-urls.d.ts +52 -0
- package/dist/engines/author-pulse/shared/pulse-knowledge.d.ts +36 -0
- package/dist/engines/author-pulse/shared/pulse-signature.d.ts +39 -0
- package/dist/engines/author-pulse/shared/resolve-frequency.d.ts +18 -0
- package/dist/engines/author-pulse/shared/staging.d.ts +65 -0
- package/dist/engines/author-pulse/shared/workflow-ownership.d.ts +14 -0
- package/dist/engines/author-pulse/types.d.ts +1385 -0
- package/dist/engines/build-chart/atomic-adapter.d.ts +20 -0
- package/dist/engines/build-chart/atomic-tools.d.ts +214 -0
- package/dist/engines/build-chart/build-chart-engine.d.ts +1 -1
- package/dist/engines/build-chart/chart-tool-name.d.ts +3 -0
- package/dist/engines/build-chart/create-chart/assemble-chart-widget.d.ts +1 -1
- package/dist/engines/build-chart/create-chart/chart-json-axes-mapping.d.ts +1 -1
- package/dist/engines/build-chart/create-chart/create-chart.d.ts +1 -1
- package/dist/engines/build-chart/create-chart/derive-chart-title.d.ts +7 -0
- package/dist/engines/build-chart/create-chart/generate-chart-recommendations.d.ts +2 -2
- package/dist/engines/build-chart/create-chart/resolve-chart-query.d.ts +4 -0
- package/dist/engines/build-chart/shared/normalize-cartesian-axes-mapping.d.ts +1 -1
- package/dist/engines/build-chart/shared/sync-chart-state-measure-flags.d.ts +3 -0
- package/dist/engines/build-chart/types.d.ts +38 -19
- package/dist/engines/build-chart/update-chart/apply-prior-chart-style.d.ts +8 -5
- package/dist/engines/build-chart/update-chart/chart-options-schemas.d.ts +18 -18
- package/dist/engines/build-chart/update-chart/schemas.d.ts +2 -2
- package/dist/engines/build-chart/update-chart/update-chart-data-options.d.ts +7 -2
- package/dist/engines/build-chart/update-chart/update-chart-query.d.ts +1 -1
- package/dist/engines/build-chart/update-chart/update-chart-style-options.d.ts +7 -2
- package/dist/engines/build-chart/update-chart/update-chart-title.d.ts +1 -1
- package/dist/engines/build-chart/update-chart/update-chart-type.d.ts +7 -2
- package/dist/engines/build-csv-model/build-csv-model-engine.d.ts +1 -1
- package/dist/engines/build-csv-model/types.d.ts +1 -1
- package/dist/engines/build-dashboard/add-dashboard-narration.d.ts +50 -0
- package/dist/engines/build-dashboard/add-dashboard-widgets.d.ts +1 -1
- package/dist/engines/build-dashboard/atomic-adapter.d.ts +21 -0
- package/dist/engines/build-dashboard/atomic-tools.d.ts +231 -0
- package/dist/engines/build-dashboard/build-dashboard-engine.d.ts +1 -1
- package/dist/engines/build-dashboard/build-dashboard-service.d.ts +2 -1
- package/dist/engines/build-dashboard/create-dashboard.d.ts +3 -4
- package/dist/engines/build-dashboard/dashboard-filters/manipulate-dashboard-filters.d.ts +2 -1
- package/dist/engines/build-dashboard/dashboard-filters/translate-filters.d.ts +17 -1
- package/dist/engines/build-dashboard/index.d.ts +2 -0
- package/dist/engines/build-dashboard/layout/place-widget.d.ts +53 -0
- package/dist/engines/build-dashboard/load-existing-fusion-dashboard.d.ts +1 -1
- package/dist/engines/build-dashboard/remove-dashboard-widgets.d.ts +4 -0
- package/dist/engines/build-dashboard/resolve-chart-widgets.d.ts +16 -0
- package/dist/engines/build-dashboard/types.d.ts +180 -18
- package/dist/engines/build-data-model/build-data-model-engine.d.ts +1 -1
- package/dist/engines/build-data-model/types.d.ts +1 -1
- package/dist/engines/build-query/build-query-engine.d.ts +33 -5
- package/dist/engines/build-query/index.d.ts +1 -1
- package/dist/engines/build-query/types.d.ts +216 -3
- package/dist/engines/build-status/build-status-engine.d.ts +8 -0
- package/dist/engines/build-status/builds-client.d.ts +44 -0
- package/dist/engines/build-status/index.d.ts +2 -0
- package/dist/engines/build-status/types.d.ts +177 -0
- package/dist/engines/datamodel-graph/data-model-map-text.d.ts +28 -0
- package/dist/engines/datamodel-graph/datamodel-graph-engine.d.ts +31 -0
- package/dist/engines/datamodel-graph/index.d.ts +4 -0
- package/dist/engines/datamodel-graph/summaries.d.ts +97 -0
- package/dist/engines/datamodel-graph/test-fixtures.d.ts +42 -0
- package/dist/engines/datamodel-graph/types.d.ts +190 -0
- package/dist/engines/evaluate-pulse/evaluate-pulse-engine.d.ts +10 -0
- package/dist/engines/evaluate-pulse/index.d.ts +2 -0
- package/dist/engines/evaluate-pulse/types.d.ts +85 -0
- package/dist/engines/get-dashboard-narration/get-dashboard-narration-engine.d.ts +23 -0
- package/dist/engines/get-dashboard-narration/index.d.ts +2 -0
- package/dist/engines/get-dashboard-narration/types.d.ts +64 -0
- package/dist/engines/get-dashboards/get-dashboards-engine.d.ts +1 -1
- package/dist/engines/get-dashboards/types.d.ts +16 -4
- package/dist/engines/get-data-preview/get-data-preview-engine.d.ts +18 -0
- package/dist/engines/get-data-preview/index.d.ts +2 -0
- package/dist/engines/get-data-preview/types.d.ts +35 -0
- package/dist/engines/get-data-source-fields/get-data-source-fields-engine.d.ts +12 -6
- package/dist/engines/get-data-source-fields/index.d.ts +1 -0
- package/dist/engines/get-data-source-fields/model-relations.d.ts +38 -0
- package/dist/engines/get-data-source-fields/types.d.ts +49 -3
- package/dist/engines/get-data-sources/get-data-sources-engine.d.ts +1 -1
- package/dist/engines/get-data-sources/types.d.ts +2 -2
- package/dist/engines/index.d.ts +17 -0
- package/dist/engines/inspect-pulse/atomic-adapter.d.ts +8 -0
- package/dist/engines/inspect-pulse/atomic-tools.d.ts +60 -0
- package/dist/engines/inspect-pulse/index.d.ts +4 -0
- package/dist/engines/inspect-pulse/inspect-pulse-engine.d.ts +7 -0
- package/dist/engines/inspect-pulse/types.d.ts +209 -0
- package/dist/engines/manage-perspectives/manage-perspectives-engine.d.ts +5 -1
- package/dist/engines/manage-perspectives/types.d.ts +13 -8
- package/dist/engines/pulse-tool-words.d.ts +62 -0
- package/dist/engines/recommend-queries/recommend-queries-engine.d.ts +1 -1
- package/dist/engines/recommend-queries/types.d.ts +1 -1
- package/dist/engines/shared/existing-answer-cascade.d.ts +52 -0
- package/dist/engines/shared/get-filters-json-for-llm-summary.d.ts +2 -2
- package/dist/engines/shared/nlq-query-helpers.d.ts +2 -2
- package/dist/engines/shared/project-dashboard-json.d.ts +151 -0
- package/dist/engines/shared/project-widget-json.d.ts +67 -0
- package/dist/engines/shared/projection-helpers.d.ts +19 -0
- package/dist/engines/shared/redact-data-models-closed-to-ai.d.ts +55 -0
- package/dist/engines/shared/redact-hidden-columns-from-ai.d.ts +55 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +57916 -30543
- package/dist/services/ai-access/ai-access-service.d.ts +68 -0
- package/dist/services/dashboards/dashboards-service.d.ts +9 -3
- package/dist/services/dashboards/fusion-dashboards-service.d.ts +34 -4
- package/dist/services/data-sources/data-sources-service.d.ts +131 -2
- package/dist/services/data-sources/find-data-source-by-title.d.ts +8 -0
- package/dist/services/datamodel-graph/datamodel-graph-service.d.ts +457 -0
- package/dist/services/existing-answer/existing-answer-query-service.d.ts +31 -0
- package/dist/services/formulas/formulas-service.d.ts +19 -0
- package/dist/services/hide-from-ai/hide-from-ai.d.ts +31 -0
- package/dist/services/knowledge-graph/knowledge-graph-service.d.ts +96 -0
- package/dist/services/llm/llm-consumption-service.d.ts +7 -2
- package/dist/services/llm/llm-settings-service.d.ts +49 -5
- package/dist/services/nlq/nlq-preview-dataset.d.ts +34 -0
- package/dist/services/nlq/nlq-service.d.ts +138 -3
- package/dist/services/pulse/evaluate-pulse-client.d.ts +78 -0
- package/dist/services/pulse/pulse-alerts-service.d.ts +264 -0
- package/dist/services/pulse/pulse-events-service.d.ts +217 -0
- package/dist/services/semantic-search/semantic-search-service.d.ts +43 -0
- package/dist/services/tool-store/tool-store-service.d.ts +32 -0
- package/dist/services/users-groups-service.d.ts +37 -0
- package/dist/skills/index.d.ts +127 -0
- package/dist/tool-availability/controlled-tools.d.ts +56 -0
- package/dist/tool-availability/index.d.ts +4 -0
- package/dist/tool-availability/offer-tools.d.ts +44 -0
- package/dist/tool-availability/resolve-tool-availability.d.ts +68 -0
- package/dist/tool-availability/withdrawn-text.d.ts +33 -0
- package/dist/tool-catalog/catalog.d.ts +387 -0
- package/dist/tool-catalog/index.d.ts +3 -0
- package/dist/tool-catalog/manifest.d.ts +5 -0
- package/dist/tool-catalog/prototype-lookup.d.ts +10 -0
- package/dist/tool-catalog/types.d.ts +67 -0
- package/dist/tools.manifest.json +826 -0
- package/dist/utils/chat-stream-errors.d.ts +42 -0
- package/dist/utils/create-custom-fetch.d.ts +19 -1
- package/dist/utils/create-stream-completion.d.ts +84 -6
- package/dist/utils/create-structured-completion.d.ts +29 -2
- package/dist/utils/create-tools-completion.d.ts +9 -0
- package/dist/utils/deferred-tools.d.ts +45 -0
- package/dist/utils/dev-debug.d.ts +5 -0
- package/dist/utils/generate-suggestions.d.ts +32 -0
- package/dist/utils/http-client.d.ts +3 -1
- package/dist/utils/llm-call-observer.d.ts +83 -0
- package/dist/utils/llm-client.d.ts +11 -1
- package/dist/utils/quoted-text.d.ts +6 -0
- package/dist/utils/server-error-body.d.ts +23 -0
- package/dist/utils/text-tokens.d.ts +35 -0
- package/dist/utils/user-action-tracking.d.ts +48 -5
- package/dist/utils/zod-utils.d.ts +9 -1
- package/package.json +28 -19
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text that is about a tool without naming it: a sentence holding one of these phrases goes
|
|
3
|
+
* with the tool when it is withdrawn, the same as a sentence naming it (`dropWithdrawnText`).
|
|
4
|
+
* Phrases, never a bare word: "dashboard" or "chart" also describe what the user looks at.
|
|
5
|
+
* Each phrase is pinned to the sentences it removes by the prompt-surface tests.
|
|
6
|
+
*/
|
|
7
|
+
export declare const WITHDRAWN_TOOL_TERMS: Readonly<Partial<Record<string, readonly string[]>>>;
|
|
8
|
+
/**
|
|
9
|
+
* What a withdrawn tool does, in the user's terms, for the `<unavailable_tools>` block. A
|
|
10
|
+
* withdrawn tool missing here is still dropped from the text, only not spoken.
|
|
11
|
+
*/
|
|
12
|
+
export declare const WITHDRAWN_TOOL_ACTIONS: Readonly<Partial<Record<string, string>>>;
|
|
13
|
+
/**
|
|
14
|
+
* `text` without what is about a withdrawn tool (mcp-service's server-instructions rule,
|
|
15
|
+
* extended with `WITHDRAWN_TOOL_TERMS`). By logical line (a wrapped paragraph or list item is
|
|
16
|
+
* one):
|
|
17
|
+
*
|
|
18
|
+
* - a table row naming one goes whole (split at sentences it would lose its cells);
|
|
19
|
+
* - a line whose first sentence names one goes whole: what follows refers back to it;
|
|
20
|
+
* - a lead-in that goes whole (it ends with `:`) takes its list items with it;
|
|
21
|
+
* - otherwise only the sentences naming one go, and the rest is joined on one line.
|
|
22
|
+
*
|
|
23
|
+
* A block left with no lines between its tags goes too. `text` itself when nothing is
|
|
24
|
+
* withdrawn, so a session that loses nothing sends byte-identical text.
|
|
25
|
+
*/
|
|
26
|
+
export declare function dropWithdrawnText(text: string, withdrawn: readonly string[]): string;
|
|
27
|
+
/**
|
|
28
|
+
* Says which of the host's tools this chat does not offer, in the user's terms, so the model
|
|
29
|
+
* answers "not available here" instead of improvising: with the tool gone but the request
|
|
30
|
+
* still asking for it, a model claimed it had built a dashboard it could not build.
|
|
31
|
+
* `''` when no withdrawn tool has an action.
|
|
32
|
+
*/
|
|
33
|
+
export declare function withdrawnToolsInstruction(withdrawn: readonly string[]): string;
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import { ToolAgent, ToolDeclaration, ToolPrototype } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Every certified tool prototype (SNS-136211), by name, each with its versions oldest first: the
|
|
4
|
+
* tools Sisense supports, wherever they are or will be implemented — sdk-ai-core and sdk-assistant
|
|
5
|
+
* here, mcp-service in its own repository. The build writes `tools.manifest.json` from it, one entry
|
|
6
|
+
* per name and version, and the box serves the tools store from that file.
|
|
7
|
+
*
|
|
8
|
+
* This is the one place a tool name is written: `constants.ts` and sdk-assistant check their
|
|
9
|
+
* `TOOL_NAME_*` against {@link ToolName}. A prototype lists the agents where the tool may be called or
|
|
10
|
+
* implemented; it requires none of them to implement it, and it may come before any implementation.
|
|
11
|
+
* An implementation is certified against a prototype that exists — `certified: toolPrototype('buildChart')`
|
|
12
|
+
* for the latest version, `toolPrototype('buildChart', 1)` for an exact one — so an unknown name or
|
|
13
|
+
* version fails the typecheck. A tool without `certified` (one a host lends that Sisense does not
|
|
14
|
+
* ship) is not governed by the tools store.
|
|
15
|
+
*
|
|
16
|
+
* Versions: a new version is a full prototype appended to its tool's list; the old one stays while it
|
|
17
|
+
* is still supported, so an agent implementing it — mcp-service talks to boxes of many versions —
|
|
18
|
+
* knows it may keep doing so.
|
|
19
|
+
*/
|
|
20
|
+
export declare const TOOL_CATALOG: {
|
|
21
|
+
readonly getDataSources: readonly [{
|
|
22
|
+
readonly version: 1;
|
|
23
|
+
readonly title: "Get data sources";
|
|
24
|
+
readonly description: "Lists the data sources the user can query.";
|
|
25
|
+
readonly risk: "Read";
|
|
26
|
+
readonly agents: readonly ["MCP", "STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
27
|
+
}];
|
|
28
|
+
readonly getDataSourceFields: readonly [{
|
|
29
|
+
readonly version: 1;
|
|
30
|
+
readonly title: "Get data source fields";
|
|
31
|
+
readonly description: "Lists the tables and columns of a data source.";
|
|
32
|
+
readonly risk: "Read";
|
|
33
|
+
readonly agents: readonly ["MCP", "STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
34
|
+
}];
|
|
35
|
+
readonly getDataPreview: readonly [{
|
|
36
|
+
readonly version: 1;
|
|
37
|
+
readonly title: "Get data preview";
|
|
38
|
+
readonly description: "Returns sample rows from a data source.";
|
|
39
|
+
readonly risk: "Read";
|
|
40
|
+
readonly agents: readonly ["MCP", "STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
41
|
+
}];
|
|
42
|
+
readonly buildQuery: readonly [{
|
|
43
|
+
readonly version: 1;
|
|
44
|
+
readonly title: "Build query";
|
|
45
|
+
readonly description: "Turns a natural-language question into a query and runs it.";
|
|
46
|
+
readonly risk: "Read";
|
|
47
|
+
readonly agents: readonly ["MCP", "STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
48
|
+
}];
|
|
49
|
+
readonly recommendQueries: readonly [{
|
|
50
|
+
readonly version: 1;
|
|
51
|
+
readonly title: "Recommend queries";
|
|
52
|
+
readonly description: "Suggests questions to ask about a data source.";
|
|
53
|
+
readonly risk: "Read";
|
|
54
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
55
|
+
}];
|
|
56
|
+
readonly loadSkill: readonly [{
|
|
57
|
+
readonly version: 1;
|
|
58
|
+
readonly title: "Load skill";
|
|
59
|
+
readonly description: "Loads the instructions for a task, such as building a query or a chart.";
|
|
60
|
+
readonly risk: "Read";
|
|
61
|
+
readonly agents: readonly ["MCP", "STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
62
|
+
}];
|
|
63
|
+
readonly buildChart: readonly [{
|
|
64
|
+
readonly version: 1;
|
|
65
|
+
readonly title: "Build chart";
|
|
66
|
+
readonly description: "Builds a chart from a natural-language request. Needs Build query.";
|
|
67
|
+
readonly risk: "Read";
|
|
68
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
69
|
+
}];
|
|
70
|
+
readonly buildDashboard: readonly [{
|
|
71
|
+
readonly version: 1;
|
|
72
|
+
readonly title: "Build dashboard";
|
|
73
|
+
readonly description: "Builds a dashboard of charts. Needs Build query and Build chart.";
|
|
74
|
+
readonly risk: "Read";
|
|
75
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
76
|
+
}];
|
|
77
|
+
readonly getDashboards: readonly [{
|
|
78
|
+
readonly version: 1;
|
|
79
|
+
readonly title: "Get dashboards";
|
|
80
|
+
readonly description: "Lists the dashboards the user can access.";
|
|
81
|
+
readonly risk: "Read";
|
|
82
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
83
|
+
}];
|
|
84
|
+
readonly getDashboardNarration: readonly [{
|
|
85
|
+
readonly version: 1;
|
|
86
|
+
readonly title: "Get dashboard narration";
|
|
87
|
+
readonly description: "Writes a narrative summary of a dashboard.";
|
|
88
|
+
readonly risk: "Read";
|
|
89
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
90
|
+
}];
|
|
91
|
+
readonly getSubjectAreas: readonly [{
|
|
92
|
+
readonly version: 1;
|
|
93
|
+
readonly title: "Get subject areas";
|
|
94
|
+
readonly description: "Lists the subject areas of the data model map.";
|
|
95
|
+
readonly risk: "Read";
|
|
96
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
97
|
+
}];
|
|
98
|
+
readonly getSubjectArea: readonly [{
|
|
99
|
+
readonly version: 1;
|
|
100
|
+
readonly title: "Get subject area";
|
|
101
|
+
readonly description: "Returns one subject area of the data model map.";
|
|
102
|
+
readonly risk: "Read";
|
|
103
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
104
|
+
}];
|
|
105
|
+
readonly findSubjectAreas: readonly [{
|
|
106
|
+
readonly version: 1;
|
|
107
|
+
readonly title: "Find subject areas";
|
|
108
|
+
readonly description: "Finds the subject areas that answer a question.";
|
|
109
|
+
readonly risk: "Read";
|
|
110
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
111
|
+
}];
|
|
112
|
+
readonly exploreDataModel: readonly [{
|
|
113
|
+
readonly version: 1;
|
|
114
|
+
readonly title: "Explore data model";
|
|
115
|
+
readonly description: "Returns the tables and fields of a data model from the data model map.";
|
|
116
|
+
readonly risk: "Read";
|
|
117
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
118
|
+
}];
|
|
119
|
+
readonly getWidgetPattern: readonly [{
|
|
120
|
+
readonly version: 1;
|
|
121
|
+
readonly title: "Get widget pattern";
|
|
122
|
+
readonly description: "Returns how existing widgets query a data model.";
|
|
123
|
+
readonly risk: "Read";
|
|
124
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
125
|
+
}];
|
|
126
|
+
readonly buildDataModel: readonly [{
|
|
127
|
+
readonly version: 1;
|
|
128
|
+
readonly title: "Build data model";
|
|
129
|
+
readonly description: "Creates a data model from database tables.";
|
|
130
|
+
readonly risk: "Write";
|
|
131
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
132
|
+
}];
|
|
133
|
+
readonly uploadFiles: readonly [{
|
|
134
|
+
readonly version: 1;
|
|
135
|
+
readonly title: "Upload files";
|
|
136
|
+
readonly description: "Uploads files (e.g. CSV) for use in a data model.";
|
|
137
|
+
readonly risk: "Write";
|
|
138
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
139
|
+
}];
|
|
140
|
+
readonly buildDataModelFromUploads: readonly [{
|
|
141
|
+
readonly version: 1;
|
|
142
|
+
readonly title: "Build data model from uploads";
|
|
143
|
+
readonly description: "Creates a data model from uploaded files. Needs Upload files.";
|
|
144
|
+
readonly risk: "Write";
|
|
145
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
146
|
+
}];
|
|
147
|
+
readonly listDataModels: readonly [{
|
|
148
|
+
readonly version: 1;
|
|
149
|
+
readonly title: "List data models";
|
|
150
|
+
readonly description: "Lists the data models the user can manage.";
|
|
151
|
+
readonly risk: "Read";
|
|
152
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
153
|
+
}];
|
|
154
|
+
readonly getModelSchema: readonly [{
|
|
155
|
+
readonly version: 1;
|
|
156
|
+
readonly title: "Get model schema";
|
|
157
|
+
readonly description: "Returns the tables, columns and relations of a data model.";
|
|
158
|
+
readonly risk: "Read";
|
|
159
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
160
|
+
}];
|
|
161
|
+
readonly addRelation: readonly [{
|
|
162
|
+
readonly version: 1;
|
|
163
|
+
readonly title: "Add relation";
|
|
164
|
+
readonly description: "Adds a relation between tables of a data model.";
|
|
165
|
+
readonly risk: "Admin";
|
|
166
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
167
|
+
}];
|
|
168
|
+
readonly removeRelation: readonly [{
|
|
169
|
+
readonly version: 1;
|
|
170
|
+
readonly title: "Remove relation";
|
|
171
|
+
readonly description: "Removes a relation between tables of a data model.";
|
|
172
|
+
readonly risk: "Admin";
|
|
173
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
174
|
+
}];
|
|
175
|
+
readonly createPerspective: readonly [{
|
|
176
|
+
readonly version: 1;
|
|
177
|
+
readonly title: "Create perspective";
|
|
178
|
+
readonly description: "Creates a perspective on a data model.";
|
|
179
|
+
readonly risk: "Write";
|
|
180
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
181
|
+
}];
|
|
182
|
+
readonly updatePerspective: readonly [{
|
|
183
|
+
readonly version: 1;
|
|
184
|
+
readonly title: "Update perspective";
|
|
185
|
+
readonly description: "Changes an existing perspective of a data model.";
|
|
186
|
+
readonly risk: "Admin";
|
|
187
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
188
|
+
}];
|
|
189
|
+
readonly getPerspective: readonly [{
|
|
190
|
+
readonly version: 1;
|
|
191
|
+
readonly title: "Get perspective";
|
|
192
|
+
readonly description: "Returns one perspective of a data model.";
|
|
193
|
+
readonly risk: "Read";
|
|
194
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
195
|
+
}];
|
|
196
|
+
readonly listPerspectives: readonly [{
|
|
197
|
+
readonly version: 1;
|
|
198
|
+
readonly title: "List perspectives";
|
|
199
|
+
readonly description: "Lists the perspectives of a data model.";
|
|
200
|
+
readonly risk: "Read";
|
|
201
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
202
|
+
}];
|
|
203
|
+
readonly triggerBuild: readonly [{
|
|
204
|
+
readonly version: 1;
|
|
205
|
+
readonly title: "Trigger build";
|
|
206
|
+
readonly description: "Starts a build of a data model.";
|
|
207
|
+
readonly risk: "Admin";
|
|
208
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
209
|
+
}];
|
|
210
|
+
readonly getBuildStatus: readonly [{
|
|
211
|
+
readonly version: 1;
|
|
212
|
+
readonly title: "Get build status";
|
|
213
|
+
readonly description: "Returns the status of a build, or of the latest build of a data model.";
|
|
214
|
+
readonly risk: "Read";
|
|
215
|
+
readonly agents: readonly ["MCP"];
|
|
216
|
+
}];
|
|
217
|
+
readonly listBuilds: readonly [{
|
|
218
|
+
readonly version: 1;
|
|
219
|
+
readonly title: "List builds";
|
|
220
|
+
readonly description: "Lists the recent builds of a data model, with status and duration.";
|
|
221
|
+
readonly risk: "Read";
|
|
222
|
+
readonly agents: readonly ["MCP"];
|
|
223
|
+
}];
|
|
224
|
+
readonly explainBuildFailure: readonly [{
|
|
225
|
+
readonly version: 1;
|
|
226
|
+
readonly title: "Explain build failure";
|
|
227
|
+
readonly description: "Explains why a build of a data model failed.";
|
|
228
|
+
readonly risk: "Read";
|
|
229
|
+
readonly agents: readonly ["MCP"];
|
|
230
|
+
}];
|
|
231
|
+
readonly inspectPulse: readonly [{
|
|
232
|
+
readonly version: 1;
|
|
233
|
+
readonly title: "Inspect Pulse";
|
|
234
|
+
readonly description: "Reads the Pulse alerts the user can see.";
|
|
235
|
+
readonly risk: "Read";
|
|
236
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
237
|
+
}];
|
|
238
|
+
readonly authorPulse: readonly [{
|
|
239
|
+
readonly version: 1;
|
|
240
|
+
readonly title: "Author Pulse";
|
|
241
|
+
readonly description: "Creates or changes an agentic Pulse alert. Needs Build query.";
|
|
242
|
+
readonly risk: "Write";
|
|
243
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
244
|
+
}];
|
|
245
|
+
readonly evaluatePulse: readonly [{
|
|
246
|
+
readonly version: 1;
|
|
247
|
+
readonly title: "Evaluate Pulse";
|
|
248
|
+
readonly description: "Runs a Pulse alert condition against current data.";
|
|
249
|
+
readonly risk: "Admin";
|
|
250
|
+
readonly agents: readonly ["MCP", "STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
251
|
+
}];
|
|
252
|
+
readonly rememberFact: readonly [{
|
|
253
|
+
readonly version: 1;
|
|
254
|
+
readonly title: "Remember fact";
|
|
255
|
+
readonly description: "Saves a fact or preference the user asked the assistant to remember.";
|
|
256
|
+
readonly risk: "Write";
|
|
257
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
258
|
+
}];
|
|
259
|
+
readonly updateMemory: readonly [{
|
|
260
|
+
readonly version: 1;
|
|
261
|
+
readonly title: "Update memory";
|
|
262
|
+
readonly description: "Changes one of the user's saved memories.";
|
|
263
|
+
readonly risk: "Write";
|
|
264
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
265
|
+
}];
|
|
266
|
+
readonly forgetMemory: readonly [{
|
|
267
|
+
readonly version: 1;
|
|
268
|
+
readonly title: "Forget memory";
|
|
269
|
+
readonly description: "Deletes one of the user's saved memories.";
|
|
270
|
+
readonly risk: "Write";
|
|
271
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
272
|
+
}];
|
|
273
|
+
readonly suggestOptions: readonly [{
|
|
274
|
+
readonly version: 1;
|
|
275
|
+
readonly title: "Suggest options";
|
|
276
|
+
readonly description: "Shows the choices a reply leaves to the user as clickable options.";
|
|
277
|
+
readonly risk: "Read";
|
|
278
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
279
|
+
}];
|
|
280
|
+
readonly getDashboard: readonly [{
|
|
281
|
+
readonly version: 1;
|
|
282
|
+
readonly title: "Get dashboard";
|
|
283
|
+
readonly description: "Reads the dashboard the user has open.";
|
|
284
|
+
readonly risk: "Read";
|
|
285
|
+
readonly agents: readonly ["ANALYTICS-ASSISTANT"];
|
|
286
|
+
}];
|
|
287
|
+
readonly addWidget: readonly [{
|
|
288
|
+
readonly version: 1;
|
|
289
|
+
readonly title: "Add widget";
|
|
290
|
+
readonly description: "Adds a chart to the dashboard the user has open.";
|
|
291
|
+
readonly risk: "Write";
|
|
292
|
+
readonly agents: readonly ["ANALYTICS-ASSISTANT"];
|
|
293
|
+
}];
|
|
294
|
+
readonly addNarrationToDashboard: readonly [{
|
|
295
|
+
readonly version: 1;
|
|
296
|
+
readonly title: "Add narration to dashboard";
|
|
297
|
+
readonly description: "Adds a narrative summary to the dashboard the user has open.";
|
|
298
|
+
readonly risk: "Write";
|
|
299
|
+
readonly agents: readonly ["ANALYTICS-ASSISTANT"];
|
|
300
|
+
}];
|
|
301
|
+
readonly openDashboardById: readonly [{
|
|
302
|
+
readonly version: 1;
|
|
303
|
+
readonly title: "Open dashboard";
|
|
304
|
+
readonly description: "Opens a dashboard for the user.";
|
|
305
|
+
readonly risk: "Read";
|
|
306
|
+
readonly agents: readonly ["ANALYTICS-ASSISTANT"];
|
|
307
|
+
}];
|
|
308
|
+
readonly expandedWidget: readonly [{
|
|
309
|
+
readonly version: 1;
|
|
310
|
+
readonly title: "Expanded widget";
|
|
311
|
+
readonly description: "Shows a dashboard widget the user expanded in its own canvas view.";
|
|
312
|
+
readonly risk: "Read";
|
|
313
|
+
readonly agents: readonly ["STUDIO-ASSISTANT"];
|
|
314
|
+
}];
|
|
315
|
+
readonly getCurrentDashboard: readonly [{
|
|
316
|
+
readonly version: 1;
|
|
317
|
+
readonly title: "Get current dashboard";
|
|
318
|
+
readonly description: "Read the dashboard on screen. Retired: kept so past calls still show their card.";
|
|
319
|
+
readonly risk: "Read";
|
|
320
|
+
readonly agents: readonly ["ANALYTICS-ASSISTANT"];
|
|
321
|
+
}];
|
|
322
|
+
readonly recallMemories: readonly [{
|
|
323
|
+
readonly version: 1;
|
|
324
|
+
readonly title: "Recall memories";
|
|
325
|
+
readonly description: "Read the user's saved memories. Retired: kept so past calls still show their card.";
|
|
326
|
+
readonly risk: "Read";
|
|
327
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
328
|
+
}];
|
|
329
|
+
readonly reportUsedMemories: readonly [{
|
|
330
|
+
readonly version: 1;
|
|
331
|
+
readonly title: "Report used memories";
|
|
332
|
+
readonly description: "Reported which memories a reply used. Retired: kept so past calls still show their card.";
|
|
333
|
+
readonly risk: "Read";
|
|
334
|
+
readonly agents: readonly ["STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT"];
|
|
335
|
+
}];
|
|
336
|
+
readonly createWidget: readonly [ToolPrototype<1>];
|
|
337
|
+
readonly updateWidgetTitle: readonly [ToolPrototype<1>];
|
|
338
|
+
readonly updateChartType: readonly [ToolPrototype<1>];
|
|
339
|
+
readonly rebindWidgetQuery: readonly [ToolPrototype<1>];
|
|
340
|
+
readonly updateWidgetSorting: readonly [ToolPrototype<1>];
|
|
341
|
+
readonly updateChartTrendForecast: readonly [ToolPrototype<1>];
|
|
342
|
+
readonly updateWidgetStyle: readonly [ToolPrototype<1>];
|
|
343
|
+
readonly updateWidgetDataOptions: readonly [ToolPrototype<1>];
|
|
344
|
+
readonly updateChartMeasureTypes: readonly [ToolPrototype<1>];
|
|
345
|
+
readonly loadDashboard: readonly [ToolPrototype<1>];
|
|
346
|
+
readonly createDashboard: readonly [ToolPrototype<1>];
|
|
347
|
+
readonly addDashboardWidgets: readonly [ToolPrototype<1>];
|
|
348
|
+
readonly removeDashboardWidgets: readonly [ToolPrototype<1>];
|
|
349
|
+
readonly replaceDashboardWidgets: readonly [ToolPrototype<1>];
|
|
350
|
+
readonly updateDashboardTitle: readonly [ToolPrototype<1>];
|
|
351
|
+
readonly updateDashboardRowHeight: readonly [ToolPrototype<1>];
|
|
352
|
+
readonly addDashboardNarration: readonly [ToolPrototype<1>];
|
|
353
|
+
readonly addDashboardFilters: readonly [ToolPrototype<1>];
|
|
354
|
+
readonly definePulseQuery: readonly [ToolPrototype<1>];
|
|
355
|
+
readonly redefinePulseQuery: readonly [ToolPrototype<1>];
|
|
356
|
+
readonly loadPulse: readonly [ToolPrototype<1>];
|
|
357
|
+
readonly createPulse: readonly [ToolPrototype<1>];
|
|
358
|
+
readonly updatePulseDefinition: readonly [ToolPrototype<1>];
|
|
359
|
+
readonly updatePulseSettings: readonly [ToolPrototype<1>];
|
|
360
|
+
readonly setPulseNotifications: readonly [ToolPrototype<1>];
|
|
361
|
+
readonly listPulses: readonly [ToolPrototype<1>];
|
|
362
|
+
readonly getPulse: readonly [ToolPrototype<1>];
|
|
363
|
+
readonly listPulseNotifications: readonly [ToolPrototype<1>];
|
|
364
|
+
readonly listPulseEvals: readonly [ToolPrototype<1>];
|
|
365
|
+
readonly getPulseEval: readonly [ToolPrototype<1>];
|
|
366
|
+
readonly getPulseEvalResults: readonly [ToolPrototype<1>];
|
|
367
|
+
};
|
|
368
|
+
/** A certified tool's name. */
|
|
369
|
+
export type ToolName = keyof typeof TOOL_CATALOG;
|
|
370
|
+
/**
|
|
371
|
+
* Whether a name is a certified tool's. Such a name is reserved: only that certified tool may be
|
|
372
|
+
* registered under it.
|
|
373
|
+
*/
|
|
374
|
+
export declare function isCertifiedToolName(name: string): name is ToolName;
|
|
375
|
+
/** The versions a tool's prototypes have. */
|
|
376
|
+
export type ToolVersion<TName extends ToolName> = (typeof TOOL_CATALOG)[TName][number]['version'];
|
|
377
|
+
/** Every certified prototype, with its name, in catalog order (each tool's versions oldest first). */
|
|
378
|
+
export declare const CERTIFIED_TOOLS: readonly ToolDeclaration[];
|
|
379
|
+
/**
|
|
380
|
+
* A certified tool's prototype: the latest version, or the one asked for. The same object every
|
|
381
|
+
* time, so an implementation can pass it as `certified`.
|
|
382
|
+
*/
|
|
383
|
+
export declare function toolPrototype<TName extends ToolName>(name: TName, version?: ToolVersion<TName>): ToolDeclaration<TName>;
|
|
384
|
+
/** A prototype's manifest key: `name@version`. */
|
|
385
|
+
export declare function toolCatalogKey({ name, version }: ToolDeclaration): string;
|
|
386
|
+
/** The certified prototypes that may be called or implemented in an agent. */
|
|
387
|
+
export declare function certifiedToolsFor(agent: ToolAgent): ToolDeclaration[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ToolDeclaration, ToolsManifest } from './types';
|
|
2
|
+
/** The file name the build writes the manifest to, at the root of `dist/`. */
|
|
3
|
+
export declare const TOOLS_MANIFEST_FILE_NAME = "tools.manifest.json";
|
|
4
|
+
/** The tools manifest: every certified tool prototype, in catalog order. */
|
|
5
|
+
export declare function buildToolsManifest(sdkAiCoreVersion: string, tools?: readonly ToolDeclaration[]): ToolsManifest;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ToolDeclaration } from './types';
|
|
2
|
+
/** Each tool's prototypes by name, versions oldest first. */
|
|
3
|
+
export type ToolDeclarations = ReadonlyMap<string, readonly ToolDeclaration[]>;
|
|
4
|
+
/** Groups prototypes by name, keeping their order (each tool's versions oldest first). */
|
|
5
|
+
export declare function groupDeclarations(declarations: readonly ToolDeclaration[]): ToolDeclarations;
|
|
6
|
+
/**
|
|
7
|
+
* A tool's prototype: the latest version, or the one asked for. Throws for an unknown name or
|
|
8
|
+
* version. Internal to the catalog (not exported from the package): `toolPrototype` wraps it.
|
|
9
|
+
*/
|
|
10
|
+
export declare function findPrototype(declarations: ToolDeclarations, name: string, version?: number): ToolDeclaration;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agents a tool can be called or implemented in: the `x-interface-name` each host sends, and the
|
|
3
|
+
* `agent` the box's tool store is read for. Same values as ai-integration's `TOOL_AGENTS`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const TOOL_AGENTS: readonly ["MCP", "STUDIO-ASSISTANT", "ANALYTICS-ASSISTANT", "META-ASSISTANT"];
|
|
6
|
+
export type ToolAgent = (typeof TOOL_AGENTS)[number];
|
|
7
|
+
/**
|
|
8
|
+
* What a tool can change in Sisense. Same values as ai-integration's `TOOL_RISK_LEVELS`.
|
|
9
|
+
*
|
|
10
|
+
* `Read` changes nothing in Sisense: a chart or a dashboard being built in the conversation is a
|
|
11
|
+
* draft. `Write` persists something or changes what other users see. MCP is offered `Read` tools
|
|
12
|
+
* only unless the user has `ai.mcpWriteTools` (tenant entitlement and group grant), so a tool that
|
|
13
|
+
* only builds a draft is `Read`. An atomic tool takes its composite's level, so `authorPulse`'s
|
|
14
|
+
* staging tools stay `Write` with the tools that save.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TOOL_RISK_LEVELS: readonly ["Read", "Write", "Admin"];
|
|
17
|
+
export type ToolRiskLevel = (typeof TOOL_RISK_LEVELS)[number];
|
|
18
|
+
/**
|
|
19
|
+
* One version of a certified tool's prototype, as the catalog holds it under the tool's name: what
|
|
20
|
+
* the tools store and its admins know about it. Only the prototype lives in sdk-ai-core; an
|
|
21
|
+
* implementation, in any host (sdk-assistant, mcp-service), takes it instead of a name string.
|
|
22
|
+
*/
|
|
23
|
+
export interface ToolPrototype<TVersion extends number = number> {
|
|
24
|
+
/**
|
|
25
|
+
* An integer from 1. One name may have several versions, oldest first; `name` and `version`
|
|
26
|
+
* together are unique.
|
|
27
|
+
*/
|
|
28
|
+
readonly version: TVersion;
|
|
29
|
+
/** Short name for admins. */
|
|
30
|
+
readonly title: string;
|
|
31
|
+
/** One sentence for admins: what the tool does. Not the model-facing description. */
|
|
32
|
+
readonly description: string;
|
|
33
|
+
readonly risk: ToolRiskLevel;
|
|
34
|
+
/**
|
|
35
|
+
* The agents where the tool may be called or implemented. A declaration only: no agent has to
|
|
36
|
+
* implement it, and a prototype may come before any implementation.
|
|
37
|
+
*/
|
|
38
|
+
readonly agents: readonly ToolAgent[];
|
|
39
|
+
/**
|
|
40
|
+
* For an atomic MCP tool: the composite tool whose access it follows (`createWidget` →
|
|
41
|
+
* `buildChart`). A host allows the atomic tool when the store allows its composite.
|
|
42
|
+
*/
|
|
43
|
+
readonly composite?: string;
|
|
44
|
+
}
|
|
45
|
+
/** A prototype with its tool's name: what `toolPrototype` returns and `certified` takes. */
|
|
46
|
+
export interface ToolDeclaration<TName extends string = string> extends ToolPrototype {
|
|
47
|
+
/** The name the model calls the tool by. */
|
|
48
|
+
readonly name: TName;
|
|
49
|
+
}
|
|
50
|
+
/** The tools manifest: every certified tool prototype, as ai-integration reads it. */
|
|
51
|
+
export interface ToolsManifest {
|
|
52
|
+
/** Bumped when the shape of this file changes. */
|
|
53
|
+
readonly schemaVersion: 1;
|
|
54
|
+
/** The sdk-ai-core version that wrote the file. */
|
|
55
|
+
readonly sdkAiCoreVersion: string;
|
|
56
|
+
readonly tools: readonly ToolsManifestEntry[];
|
|
57
|
+
}
|
|
58
|
+
/** One tool in the manifest. Field names follow ai-integration's tool records. */
|
|
59
|
+
export interface ToolsManifestEntry {
|
|
60
|
+
readonly name: string;
|
|
61
|
+
readonly version: number;
|
|
62
|
+
readonly title: string;
|
|
63
|
+
readonly description: string;
|
|
64
|
+
readonly risk_level: ToolRiskLevel;
|
|
65
|
+
readonly agents: readonly ToolAgent[];
|
|
66
|
+
readonly composite?: string;
|
|
67
|
+
}
|