@sisense/sdk-ai-core 0.15.1 → 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.
Files changed (169) hide show
  1. package/dist/__vite-browser-external-l0sNRNKZ.js +1 -0
  2. package/dist/constants.d.ts +36 -0
  3. package/dist/engines/atomic-handle-args.d.ts +45 -0
  4. package/dist/engines/atomic-tool-requirements.d.ts +38 -0
  5. package/dist/engines/author-pulse/actions/create.d.ts +9 -0
  6. package/dist/engines/author-pulse/actions/define.d.ts +9 -0
  7. package/dist/engines/author-pulse/actions/load-existing.d.ts +9 -0
  8. package/dist/engines/author-pulse/actions/redefine.d.ts +9 -0
  9. package/dist/engines/author-pulse/actions/set-receive-notifications.d.ts +8 -0
  10. package/dist/engines/author-pulse/actions/update-spec.d.ts +11 -0
  11. package/dist/engines/author-pulse/actions/update-workflow.d.ts +9 -0
  12. package/dist/engines/author-pulse/atomic-adapter.d.ts +10 -0
  13. package/dist/engines/author-pulse/atomic-tools.d.ts +362 -0
  14. package/dist/engines/author-pulse/author-pulse-engine.d.ts +21 -0
  15. package/dist/engines/author-pulse/index.d.ts +9 -0
  16. package/dist/engines/author-pulse/shared/adjustment-error.d.ts +15 -0
  17. package/dist/engines/author-pulse/shared/assemble-create-workflow-payload.d.ts +36 -0
  18. package/dist/engines/author-pulse/shared/assert-agentic-workflow.d.ts +12 -0
  19. package/dist/engines/author-pulse/shared/compile-query-from-prompt.d.ts +95 -0
  20. package/dist/engines/author-pulse/shared/decision-spec-validation.d.ts +84 -0
  21. package/dist/engines/author-pulse/shared/notification-urls.d.ts +52 -0
  22. package/dist/engines/author-pulse/shared/pulse-knowledge.d.ts +36 -0
  23. package/dist/engines/author-pulse/shared/pulse-signature.d.ts +39 -0
  24. package/dist/engines/author-pulse/shared/resolve-frequency.d.ts +18 -0
  25. package/dist/engines/author-pulse/shared/staging.d.ts +65 -0
  26. package/dist/engines/author-pulse/shared/workflow-ownership.d.ts +14 -0
  27. package/dist/engines/author-pulse/types.d.ts +1385 -0
  28. package/dist/engines/build-chart/atomic-adapter.d.ts +20 -0
  29. package/dist/engines/build-chart/atomic-tools.d.ts +214 -0
  30. package/dist/engines/build-chart/build-chart-engine.d.ts +1 -1
  31. package/dist/engines/build-chart/chart-tool-name.d.ts +3 -0
  32. package/dist/engines/build-chart/create-chart/assemble-chart-widget.d.ts +1 -1
  33. package/dist/engines/build-chart/create-chart/chart-json-axes-mapping.d.ts +1 -1
  34. package/dist/engines/build-chart/create-chart/create-chart.d.ts +1 -1
  35. package/dist/engines/build-chart/create-chart/derive-chart-title.d.ts +7 -0
  36. package/dist/engines/build-chart/create-chart/generate-chart-recommendations.d.ts +2 -2
  37. package/dist/engines/build-chart/create-chart/resolve-chart-query.d.ts +4 -0
  38. package/dist/engines/build-chart/shared/normalize-cartesian-axes-mapping.d.ts +1 -1
  39. package/dist/engines/build-chart/shared/sync-chart-state-measure-flags.d.ts +3 -0
  40. package/dist/engines/build-chart/types.d.ts +49 -19
  41. package/dist/engines/build-chart/update-chart/apply-prior-chart-style.d.ts +8 -5
  42. package/dist/engines/build-chart/update-chart/chart-options-schemas.d.ts +18 -18
  43. package/dist/engines/build-chart/update-chart/schemas.d.ts +2 -2
  44. package/dist/engines/build-chart/update-chart/update-chart-data-options.d.ts +7 -2
  45. package/dist/engines/build-chart/update-chart/update-chart-query.d.ts +1 -1
  46. package/dist/engines/build-chart/update-chart/update-chart-style-options.d.ts +7 -2
  47. package/dist/engines/build-chart/update-chart/update-chart-title.d.ts +1 -1
  48. package/dist/engines/build-chart/update-chart/update-chart-type.d.ts +7 -2
  49. package/dist/engines/build-csv-model/build-csv-model-engine.d.ts +1 -1
  50. package/dist/engines/build-csv-model/types.d.ts +1 -1
  51. package/dist/engines/build-dashboard/add-dashboard-narration.d.ts +50 -0
  52. package/dist/engines/build-dashboard/add-dashboard-widgets.d.ts +1 -1
  53. package/dist/engines/build-dashboard/atomic-adapter.d.ts +21 -0
  54. package/dist/engines/build-dashboard/atomic-tools.d.ts +231 -0
  55. package/dist/engines/build-dashboard/build-dashboard-engine.d.ts +1 -1
  56. package/dist/engines/build-dashboard/build-dashboard-service.d.ts +2 -1
  57. package/dist/engines/build-dashboard/create-dashboard.d.ts +3 -4
  58. package/dist/engines/build-dashboard/dashboard-filters/manipulate-dashboard-filters.d.ts +2 -1
  59. package/dist/engines/build-dashboard/dashboard-filters/translate-filters.d.ts +17 -1
  60. package/dist/engines/build-dashboard/index.d.ts +2 -0
  61. package/dist/engines/build-dashboard/layout/place-widget.d.ts +53 -0
  62. package/dist/engines/build-dashboard/load-existing-fusion-dashboard.d.ts +1 -1
  63. package/dist/engines/build-dashboard/remove-dashboard-widgets.d.ts +4 -0
  64. package/dist/engines/build-dashboard/resolve-chart-widgets.d.ts +16 -0
  65. package/dist/engines/build-dashboard/types.d.ts +180 -18
  66. package/dist/engines/build-data-model/build-data-model-engine.d.ts +1 -1
  67. package/dist/engines/build-data-model/types.d.ts +1 -1
  68. package/dist/engines/build-query/build-query-engine.d.ts +33 -5
  69. package/dist/engines/build-query/index.d.ts +1 -1
  70. package/dist/engines/build-query/types.d.ts +216 -3
  71. package/dist/engines/build-status/build-status-engine.d.ts +8 -0
  72. package/dist/engines/build-status/builds-client.d.ts +44 -0
  73. package/dist/engines/build-status/index.d.ts +2 -0
  74. package/dist/engines/build-status/types.d.ts +177 -0
  75. package/dist/engines/datamodel-graph/data-model-map-text.d.ts +28 -0
  76. package/dist/engines/datamodel-graph/datamodel-graph-engine.d.ts +31 -0
  77. package/dist/engines/datamodel-graph/index.d.ts +4 -0
  78. package/dist/engines/datamodel-graph/summaries.d.ts +97 -0
  79. package/dist/engines/datamodel-graph/test-fixtures.d.ts +42 -0
  80. package/dist/engines/datamodel-graph/types.d.ts +190 -0
  81. package/dist/engines/evaluate-pulse/evaluate-pulse-engine.d.ts +10 -0
  82. package/dist/engines/evaluate-pulse/index.d.ts +2 -0
  83. package/dist/engines/evaluate-pulse/types.d.ts +85 -0
  84. package/dist/engines/get-dashboard-narration/get-dashboard-narration-engine.d.ts +23 -0
  85. package/dist/engines/get-dashboard-narration/index.d.ts +2 -0
  86. package/dist/engines/get-dashboard-narration/types.d.ts +64 -0
  87. package/dist/engines/get-dashboards/get-dashboards-engine.d.ts +1 -1
  88. package/dist/engines/get-dashboards/types.d.ts +16 -4
  89. package/dist/engines/get-data-preview/get-data-preview-engine.d.ts +18 -0
  90. package/dist/engines/get-data-preview/index.d.ts +2 -0
  91. package/dist/engines/get-data-preview/types.d.ts +35 -0
  92. package/dist/engines/get-data-source-fields/get-data-source-fields-engine.d.ts +12 -6
  93. package/dist/engines/get-data-source-fields/index.d.ts +1 -0
  94. package/dist/engines/get-data-source-fields/model-relations.d.ts +38 -0
  95. package/dist/engines/get-data-source-fields/types.d.ts +53 -3
  96. package/dist/engines/get-data-sources/get-data-sources-engine.d.ts +1 -1
  97. package/dist/engines/get-data-sources/types.d.ts +2 -2
  98. package/dist/engines/index.d.ts +17 -0
  99. package/dist/engines/inspect-pulse/atomic-adapter.d.ts +8 -0
  100. package/dist/engines/inspect-pulse/atomic-tools.d.ts +60 -0
  101. package/dist/engines/inspect-pulse/index.d.ts +4 -0
  102. package/dist/engines/inspect-pulse/inspect-pulse-engine.d.ts +7 -0
  103. package/dist/engines/inspect-pulse/types.d.ts +209 -0
  104. package/dist/engines/manage-perspectives/manage-perspectives-engine.d.ts +5 -1
  105. package/dist/engines/manage-perspectives/types.d.ts +13 -8
  106. package/dist/engines/pulse-tool-words.d.ts +62 -0
  107. package/dist/engines/recommend-queries/recommend-queries-engine.d.ts +1 -1
  108. package/dist/engines/recommend-queries/types.d.ts +1 -1
  109. package/dist/engines/shared/existing-answer-cascade.d.ts +52 -0
  110. package/dist/engines/shared/get-filters-json-for-llm-summary.d.ts +2 -2
  111. package/dist/engines/shared/nlq-query-helpers.d.ts +2 -2
  112. package/dist/engines/shared/project-dashboard-json.d.ts +151 -0
  113. package/dist/engines/shared/project-widget-json.d.ts +67 -0
  114. package/dist/engines/shared/projection-helpers.d.ts +19 -0
  115. package/dist/engines/shared/redact-data-models-closed-to-ai.d.ts +55 -0
  116. package/dist/engines/shared/redact-hidden-columns-from-ai.d.ts +55 -0
  117. package/dist/index.d.ts +21 -0
  118. package/dist/index.js +56879 -27530
  119. package/dist/services/ai-access/ai-access-service.d.ts +68 -0
  120. package/dist/services/dashboards/dashboards-service.d.ts +9 -3
  121. package/dist/services/dashboards/fusion-dashboards-service.d.ts +34 -4
  122. package/dist/services/data-sources/data-sources-service.d.ts +149 -5
  123. package/dist/services/data-sources/find-data-source-by-title.d.ts +8 -0
  124. package/dist/services/datamodel-graph/datamodel-graph-service.d.ts +457 -0
  125. package/dist/services/existing-answer/existing-answer-query-service.d.ts +31 -0
  126. package/dist/services/formulas/formulas-service.d.ts +19 -0
  127. package/dist/services/hide-from-ai/hide-from-ai.d.ts +31 -0
  128. package/dist/services/knowledge-graph/knowledge-graph-service.d.ts +96 -0
  129. package/dist/services/llm/llm-consumption-service.d.ts +7 -2
  130. package/dist/services/llm/llm-models-service.d.ts +10 -2
  131. package/dist/services/llm/llm-settings-service.d.ts +73 -0
  132. package/dist/services/nlq/nlq-preview-dataset.d.ts +34 -0
  133. package/dist/services/nlq/nlq-service.d.ts +138 -3
  134. package/dist/services/pulse/evaluate-pulse-client.d.ts +78 -0
  135. package/dist/services/pulse/pulse-alerts-service.d.ts +264 -0
  136. package/dist/services/pulse/pulse-events-service.d.ts +217 -0
  137. package/dist/services/semantic-search/semantic-search-service.d.ts +43 -0
  138. package/dist/services/tool-store/tool-store-service.d.ts +32 -0
  139. package/dist/services/users-groups-service.d.ts +37 -0
  140. package/dist/skills/index.d.ts +127 -0
  141. package/dist/tool-availability/controlled-tools.d.ts +56 -0
  142. package/dist/tool-availability/index.d.ts +4 -0
  143. package/dist/tool-availability/offer-tools.d.ts +44 -0
  144. package/dist/tool-availability/resolve-tool-availability.d.ts +68 -0
  145. package/dist/tool-availability/withdrawn-text.d.ts +33 -0
  146. package/dist/tool-catalog/catalog.d.ts +387 -0
  147. package/dist/tool-catalog/index.d.ts +3 -0
  148. package/dist/tool-catalog/manifest.d.ts +5 -0
  149. package/dist/tool-catalog/prototype-lookup.d.ts +10 -0
  150. package/dist/tool-catalog/types.d.ts +67 -0
  151. package/dist/tools.manifest.json +826 -0
  152. package/dist/utils/chat-stream-errors.d.ts +42 -0
  153. package/dist/utils/create-custom-fetch.d.ts +19 -1
  154. package/dist/utils/create-stream-completion.d.ts +84 -6
  155. package/dist/utils/create-structured-completion.d.ts +29 -2
  156. package/dist/utils/create-tools-completion.d.ts +9 -0
  157. package/dist/utils/deferred-tools.d.ts +45 -0
  158. package/dist/utils/dev-debug.d.ts +5 -0
  159. package/dist/utils/generate-suggestions.d.ts +32 -0
  160. package/dist/utils/http-client.d.ts +3 -1
  161. package/dist/utils/llm-call-observer.d.ts +83 -0
  162. package/dist/utils/llm-client.d.ts +11 -1
  163. package/dist/utils/llm-model-override.d.ts +41 -0
  164. package/dist/utils/quoted-text.d.ts +6 -0
  165. package/dist/utils/server-error-body.d.ts +23 -0
  166. package/dist/utils/text-tokens.d.ts +35 -0
  167. package/dist/utils/user-action-tracking.d.ts +48 -5
  168. package/dist/utils/zod-utils.d.ts +9 -1
  169. package/package.json +28 -18
@@ -5,7 +5,9 @@ export declare const TOOL_NAME_RECOMMEND_QUERIES = "recommendQueries";
5
5
  export declare const TOOL_NAME_GET_DASHBOARDS = "getDashboards";
6
6
  export declare const TOOL_NAME_GET_DATA_SOURCES = "getDataSources";
7
7
  export declare const TOOL_NAME_GET_DATA_SOURCE_FIELDS = "getDataSourceFields";
8
+ export declare const TOOL_NAME_GET_DATA_PREVIEW = "getDataPreview";
8
9
  export declare const TOOL_NAME_BUILD_QUERY = "buildQuery";
10
+ export declare const TOOL_NAME_CREATE_WIDGET = "createWidget";
9
11
  export declare const TOOL_NAME_LIST_DATA_MODELS = "listDataModels";
10
12
  export declare const TOOL_NAME_GET_MODEL_SCHEMA = "getModelSchema";
11
13
  export declare const TOOL_NAME_ADD_RELATION = "addRelation";
@@ -17,15 +19,49 @@ export declare const TOOL_NAME_TRIGGER_BUILD = "triggerBuild";
17
19
  export declare const TOOL_NAME_LIST_PERSPECTIVES = "listPerspectives";
18
20
  export declare const TOOL_NAME_UPLOAD_FILES = "uploadFiles";
19
21
  export declare const TOOL_NAME_BUILD_CSV_MODEL = "buildDataModelFromUploads";
22
+ export declare const TOOL_NAME_INSPECT_PULSE = "inspectPulse";
23
+ export declare const TOOL_NAME_AUTHOR_PULSE = "authorPulse";
24
+ export declare const TOOL_NAME_EVALUATE_PULSE = "evaluatePulse";
25
+ export declare const TOOL_NAME_LOAD_SKILL = "loadSkill";
26
+ export declare const TOOL_NAME_GET_SUBJECT_AREAS = "getSubjectAreas";
27
+ export declare const TOOL_NAME_GET_SUBJECT_AREA = "getSubjectArea";
28
+ export declare const TOOL_NAME_EXPLORE_DATA_MODEL = "exploreDataModel";
29
+ export declare const TOOL_NAME_GET_WIDGET_PATTERN = "getWidgetPattern";
30
+ export declare const TOOL_NAME_FIND_SUBJECT_AREAS = "findSubjectAreas";
31
+ export declare const TOOL_NAME_GET_DASHBOARD_NARRATION = "getDashboardNarration";
32
+ export declare const TOOL_NAME_GET_BUILD_STATUS = "getBuildStatus";
33
+ export declare const TOOL_NAME_LIST_BUILDS = "listBuilds";
34
+ export declare const TOOL_NAME_EXPLAIN_BUILD_FAILURE = "explainBuildFailure";
35
+ export declare const TOOL_NAME_AGENT = "agent";
36
+ export declare const TOOL_NAME_COMPACT_HISTORY = "compactHistory";
37
+ export declare const MAX_DASHBOARD_NARRATION_WIDGETS = 50;
20
38
  /** Debug label for `engineCall` traces (e.g. `buildChart` → `buildChartEngine`). */
21
39
  export declare const toEngineName: (toolName: string) => string;
22
40
  export declare const TOOL_CONTEXT_MAX_ASSETS = 10;
23
41
  export declare const MAX_DATA_SOURCE_FIELDS_SUMMARY = 200;
24
42
  export declare const MAX_DATA_SOURCE_FORMULAS_SUMMARY = 50;
43
+ export declare const MAX_MODEL_RELATIONS_SUMMARY = 60;
44
+ export declare const MAX_QUERY_DATASET_ROWS = 50;
45
+ export declare const DEFAULT_NLQ_QUERY_COUNT = 5000;
46
+ export declare const MAX_AGENTIC_QUERY_ROWS = 300;
47
+ export declare const MIN_FORECAST_POINTS = 30;
48
+ export declare const DEFAULT_FORECAST_HORIZON = 3;
49
+ export declare const MAX_DASHBOARDS_SUMMARY = 50;
25
50
  export declare const DEFAULT_LLM = "LLM_PLACEHOLDER";
26
51
  export declare const HEADER_USER_ACTION_ID = "x-user-action-id";
27
52
  export declare const HEADER_TRACEPARENT = "traceparent";
28
53
  export declare const HEADER_INTERFACE_NAME = "x-interface-name";
29
54
  export declare const HEADER_FEATURE_NAME = "x-feature-name";
30
55
  export declare const HEADER_QUOTA_ID = "x-quota-id";
56
+ export declare const HEADER_TOOL_NAME = "x-tool-name";
57
+ export declare const HEADER_SESSION_ID = "x-session-id";
58
+ export declare const HEADER_LLM_MODEL_OVERRIDE = "x-llm-model-override";
31
59
  export declare const ALLOWED_HEADERS: string[];
60
+ export declare const KG_SIMILARITY_SCORE_THRESHOLD = 0.8;
61
+ export declare const WIDGET_SEARCH_COSINE_THRESHOLD = 0.65;
62
+ export declare const WIDGET_SEARCH_MIN_TERM_COVERAGE = 0.5;
63
+ export declare const WIDGET_SEARCH_MIN_OVERLAPPING_TERMS = 2;
64
+ export declare const WIDGET_SEARCH_STRONG_COSINE = 0.78;
65
+ export declare const EXISTING_ANSWER_CASCADE_TIMEOUT_MS = 4000;
66
+ export declare const KG_SIMILAR_RESULT_LIMIT = 5;
67
+ export declare const WIDGET_SEARCH_RESULT_LIMIT = 5;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Argument names of the atomic tools versus the composite ones (SNS-135308).
3
+ *
4
+ * The atomic tools call what `createWidget` returns a `widgetId`; `buildChart` and `buildDashboard`
5
+ * call it `chartId`. A layout cell of a dashboard points to its widget by the widget's id, so the
6
+ * composite's `widgetId` in `layoutGrid` and in the layout arguments is that same widget id and is
7
+ * left as it is. A tool's call is mapped back to the composite's names before it reaches the
8
+ * engine, so the engines, the sessions and the assistants never see the widget vocabulary.
9
+ *
10
+ * TODO(SNS-136059): temporary. Once the chart and dashboard engines name the widget handle `widgetId` themselves
11
+ * (a change to `buildChart` and `buildDashboard` that the assistants must take too), remove this file
12
+ * and the `argRenames` of the atomic tools.
13
+ */
14
+ /** How one argument is renamed, and how the arguments nested inside its value are. */
15
+ export interface ArgRename {
16
+ to: string;
17
+ /** For an object, or an array of objects, held by the argument. */
18
+ nested?: ArgRenames;
19
+ }
20
+ /** Atomic argument name to its composite counterpart; an argument that is not listed keeps its name. */
21
+ export type ArgRenames = Readonly<Record<string, ArgRename>>;
22
+ /**
23
+ * Renames the keys of `fields` by `renames`. All keys are renamed in a single pass, so a name that
24
+ * is both renamed and the target of another rename is not rewritten twice.
25
+ */
26
+ export declare function renameFields(fields: Record<string, unknown>, renames: ArgRenames): Record<string, unknown>;
27
+ /** Renames the keys of `value`, or of each object in an array, by `renames`; other values pass through. */
28
+ export declare function renameArgs(value: unknown, renames: ArgRenames): unknown;
29
+ /** The chart-editing tools take the chart handle as `priorWidgetId`. */
30
+ export declare const PRIOR_WIDGET_ID_RENAMES: ArgRenames;
31
+ /**
32
+ * TODO(SNS-136059): temporary, until the engines say `widgetId` (see the top of this file).
33
+ *
34
+ * A result message in the atomic tools' words: the engines write `chartId` for the widget handle,
35
+ * and the model has been told `widgetId`. The layout's `widgetId` is already that word.
36
+ */
37
+ export declare function inWidgetWords(message: string): string;
38
+ /**
39
+ * TODO(SNS-136059): temporary, until the engines say `widgetId` (see the top of this file).
40
+ *
41
+ * Runs an engine and gives the message of an error it throws in the atomic tools' words, the way
42
+ * `inWidgetWords` does for a result message. The error keeps its type and stack; a thrown value
43
+ * that is not an `Error` passes through.
44
+ */
45
+ export declare function withWidgetWords<T>(run: () => Promise<T>, translate: (message: string) => string): Promise<T>;
@@ -0,0 +1,38 @@
1
+ import { TOOL_NAME_EVALUATE_PULSE } from '../constants';
2
+ import { AtomicChartToolName } from './build-chart/atomic-tools';
3
+ import { AtomicDashboardToolName } from './build-dashboard/atomic-tools';
4
+ import { AtomicAuthorPulseToolName } from './author-pulse/atomic-tools';
5
+ import { AtomicInspectPulseToolName } from './inspect-pulse/atomic-tools';
6
+ /**
7
+ * How the atomic chart, dashboard (SNS-135308) and Pulse (SNS-136028) tools depend on each other and on
8
+ * the composites,
9
+ * for a host that offers them. They sit beside the tool definitions and not in `TOOL_REQUIREMENTS`,
10
+ * so the lists the assistants read are unchanged: a host passes the two together to
11
+ * `resolveToolAvailability` as `{ ...TOOL_REQUIREMENTS, ...ATOMIC_TOOL_REQUIREMENTS }`.
12
+ */
13
+ export type AtomicToolName = AtomicChartToolName | AtomicDashboardToolName | AtomicAuthorPulseToolName | AtomicInspectPulseToolName;
14
+ /** The composite tool each atomic tool replaces; a host allows the atomic tool when it allows this one. */
15
+ export declare const ATOMIC_TOOL_COMPOSITES: Readonly<Record<AtomicToolName, string>>;
16
+ /**
17
+ * The tools each atomic tool needs offered, in the form of `TOOL_REQUIREMENTS`.
18
+ *
19
+ * - `createWidget` charts a `queryId`, which only `buildQuery` returns, as `buildChart` does.
20
+ * - A chart can only be revised through the `chartId` `createWidget` returned, so every other chart
21
+ * tool needs it; `rebindWidgetQuery` also needs a new `queryId`.
22
+ * - The dashboard tools need `createWidget`, mirroring the composite: `buildDashboard` requires the
23
+ * chart tool through its playbook. `loadDashboard` and the edits that take no chart could work
24
+ * without it. Kept strict on purpose for stage 1 (SNS-135308): a dashboard tool is offered only
25
+ * when the chart tools are. TODO: decide later whether `loadDashboard` and the chart-free edits
26
+ * (title, row height, narration) should drop that requirement, so they survive a box without
27
+ * `createWidget`; it is one entry per tool below.
28
+ * - The Pulse staging tools need a `queryId`, which only `buildQuery` returns; `redefinePulseQuery`
29
+ * also works on what `definePulseQuery` staged. The other authoring tools need `definePulseQuery`,
30
+ * the way the dashboard tools need `createWidget`: a Pulse tool is offered only when Pulse authoring
31
+ * is. The read tools need nothing.
32
+ * - `evaluatePulse` is not atomic, but it acts on a `workflowId`, which `TOOL_REQUIREMENTS` says only
33
+ * `inspectPulse` lists. A host that offers `listPulses` in place of `inspectPulse` needs this entry,
34
+ * which replaces that one when spread after it.
35
+ */
36
+ export declare const ATOMIC_TOOL_REQUIREMENTS: Readonly<Record<AtomicToolName | typeof TOOL_NAME_EVALUATE_PULSE, readonly string[]>>;
37
+ /** Every atomic tool name: chart, dashboard, then Pulse authoring and Pulse read tools. */
38
+ export declare const ATOMIC_TOOL_NAMES: readonly AtomicToolName[];
@@ -0,0 +1,9 @@
1
+ import { AuthorPulseAction, AuthorPulseContext, AuthorPulseResult } from '../types';
2
+ /**
3
+ * `action.type === 'create'` — assembles the workflow staged under `action.workflowId` and persists it
4
+ * immediately, chaining straight into its first evaluation before returning. Not staging-only —
5
+ * see `authorPulseEngine`'s own docstring.
6
+ */
7
+ export declare function createAgenticWorkflow(action: Extract<AuthorPulseAction, {
8
+ type: 'create';
9
+ }>, context: AuthorPulseContext): Promise<AuthorPulseResult>;
@@ -0,0 +1,9 @@
1
+ import { AuthorPulseAction, AuthorPulseContext, AuthorPulseResult } from '../types';
2
+ /**
3
+ * `action.type === 'define'` — compiles one new query and stages it. Omitting `action.workflowId`
4
+ * starts a brand-new workflow draft (mints a fresh staging id); passing one back adds another query
5
+ * to the SAME in-progress workflow. See `authorPulseToolDescription`.
6
+ */
7
+ export declare function defineQuery(action: Extract<AuthorPulseAction, {
8
+ type: 'define';
9
+ }>, context: AuthorPulseContext): Promise<AuthorPulseResult>;
@@ -0,0 +1,9 @@
1
+ import { AuthorPulseAction, AuthorPulseContext, AuthorPulseResult } from '../types';
2
+ /**
3
+ * `action.type === 'load-existing'` — loads an already-persisted workflow into staging so it can be
4
+ * `redefine`d/`update-spec`'d like one created this session. Mirrors `buildDashboard`'s
5
+ * `load-existing` exactly: fetch, stage under the SAME id, no special-casing needed downstream.
6
+ */
7
+ export declare function loadExistingWorkflow(action: Extract<AuthorPulseAction, {
8
+ type: 'load-existing';
9
+ }>, context: AuthorPulseContext): Promise<AuthorPulseResult>;
@@ -0,0 +1,9 @@
1
+ import { AuthorPulseAction, AuthorPulseContext, AuthorPulseResult } from '../types';
2
+ /**
3
+ * `action.type === 'redefine'` — re-compiles one query already staged under `action.workflowId` and
4
+ * classifies the change against its previous compiled form. Stages only (never persists) — see
5
+ * `updateWorkflowSpec` for the commit step.
6
+ */
7
+ export declare function redefineQuery(action: Extract<AuthorPulseAction, {
8
+ type: 'redefine';
9
+ }>, context: AuthorPulseContext): Promise<AuthorPulseResult>;
@@ -0,0 +1,8 @@
1
+ import { AuthorPulseAction, AuthorPulseContext, AuthorPulseResult } from '../types';
2
+ /**
3
+ * `action.type === 'set-receive-notifications'` — mutes/unmutes the workflow for the calling user
4
+ * only. The one change a non-owner recipient can make, so there's no ownership pre-check here.
5
+ */
6
+ export declare function setReceiveNotifications(action: Extract<AuthorPulseAction, {
7
+ type: 'set-receive-notifications';
8
+ }>, context: AuthorPulseContext): Promise<AuthorPulseResult>;
@@ -0,0 +1,11 @@
1
+ import { AuthorPulseAction, AuthorPulseContext, AuthorPulseResult } from '../types';
2
+ /**
3
+ * `action.type === 'update-spec'` — persists the workflow currently staged under `action.workflowId`
4
+ * (plus any partial patch on skill/decisionSpec/crossQueryTransforms) — a read-modify-write against
5
+ * staging, never a fresh fetch. `removedQueryNames` is the only lever on the query SET itself;
6
+ * a query's own definition AND its transforms only ever change via `define`/`redefine` — this
7
+ * action has no per-query concern at all.
8
+ */
9
+ export declare function updateWorkflowSpec(action: Extract<AuthorPulseAction, {
10
+ type: 'update-spec';
11
+ }>, context: AuthorPulseContext): Promise<AuthorPulseResult>;
@@ -0,0 +1,9 @@
1
+ import { AuthorPulseAction, AuthorPulseContext, AuthorPulseResult } from '../types';
2
+ /**
3
+ * `action.type === 'update-workflow'` — name/enabled/frequency/recipients/notification channels.
4
+ * Never touches `context.queries[]`, so it reads the live workflow directly (`assertAgenticWorkflow`)
5
+ * rather than staging — there is nothing to stage.
6
+ */
7
+ export declare function updateWorkflowDetails(action: Extract<AuthorPulseAction, {
8
+ type: 'update-workflow';
9
+ }>, context: AuthorPulseContext): Promise<AuthorPulseResult>;
@@ -0,0 +1,10 @@
1
+ import { AtomicAuthorPulseToolName } from './atomic-tools';
2
+ import { AuthorPulseContext, AuthorPulseResult } from './types';
3
+ /**
4
+ * Adapter from an atomic Pulse authoring tool to the composite `authorPulse` engine (SNS-136028),
5
+ * like `atomicChartAdapter`: it validates the tool's flat arguments, turns them into the matching
6
+ * `authorPulse` action and runs the existing engine, so both tool shapes do the same work. Invalid
7
+ * arguments are an `AuthorPulseAdjustmentError`, as they are on the composite. Messages in results
8
+ * and errors name the atomic tools.
9
+ */
10
+ export declare function atomicAuthorPulseAdapter(toolName: AtomicAuthorPulseToolName, args: unknown, context: AuthorPulseContext): Promise<AuthorPulseResult>;
@@ -0,0 +1,362 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * The authorPulse operations as one tool each (SNS-136028), for hosts that must expose every
4
+ * model-callable operation separately (MCP), on the pattern of the atomic chart and dashboard tools
5
+ * (`build-chart/atomic-tools.ts`). The composite `authorPulse` tool is unchanged: the assistants keep
6
+ * calling it until they move to these tools too.
7
+ *
8
+ * Each input schema is the matching `action.type` variant of the composite, built from the same field
9
+ * factories (`authorPulseActionVariants`) without its `type`, so the two cannot drift; only the
10
+ * descriptions differ, naming these tools where the composite names its actions
11
+ * (`../pulse-tool-words.ts`). The arguments keep the engine's names (`workflowId`): a Pulse is an
12
+ * agentic workflow, so no rename is needed.
13
+ *
14
+ * `writes` describes what a tool changes in Sisense, for any host that annotates or gates writes. The
15
+ * staging tools have none: they change only the conversation's draft.
16
+ *
17
+ * TODO(SNS-135925): add the live-LLM e2e for the atomic Pulse tools with the chart and dashboard ones.
18
+ */
19
+ /** What a tool changes outside the conversation. Absent: it changes nothing. */
20
+ export interface PulseToolWrites {
21
+ /** Can overwrite, revoke access, or send something that cannot be taken back. */
22
+ destructive: boolean;
23
+ /** Can reach a destination outside the caller's Sisense tenant, such as a webhook URL. */
24
+ openWorld: boolean;
25
+ }
26
+ /** One atomic Pulse tool: its name, the composite action it stands for, and what the model sees. */
27
+ export interface AtomicPulseTool {
28
+ name: string;
29
+ /** The `action.type` of the composite tool this operation corresponds to. */
30
+ actionType: string;
31
+ description: string;
32
+ inputSchema: z.ZodObject<Record<string, z.ZodType>>;
33
+ writes?: PulseToolWrites;
34
+ }
35
+ export declare const definePulseQueryToolDescription = "Stages one new query for a Pulse from a prior buildQuery result (this tool never runs NLQ), with its optional transforms. Omit workflowId for the first query of a new Pulse; a staging workflowId is returned. Pass it back to add another query to the same Pulse, and remember it and each query's name for later calls. Stages only: nothing in Sisense changes until createPulse or updatePulseDefinition.";
36
+ export declare const redefinePulseQueryToolDescription = "Re-stages one query already staged under a workflowId with a new buildQuery result, and reports whether the query changed. Call buildQuery first for the revised data. For a Pulse not yet touched in this conversation, call loadPulse first. Stages only: nothing in Sisense changes until createPulse or updatePulseDefinition.";
37
+ export declare const loadPulseToolDescription = "Loads an existing Pulse (workflowId = its _id, e.g. from listPulses) into staging, so its queries can be redefined and its definition updated. Call it first for a Pulse not yet touched in this conversation. Changes nothing in Sisense.";
38
+ export declare const createPulseToolDescription = "Creates a new Pulse from the queries staged under a workflowId, with a name, a judgment rule (skill), a decisionSpec and, for a live source, a frequency. If the request names no measure, decline in chat.\n\nCRITICAL: this creates a real Pulse in Sisense and runs its first evaluation right away, with no undo. Always confirm first, even when the request already states the whole Pulse: show the staged queries and transforms and the plain-language rule, then wait for an explicit yes. Report the result through its message field.";
39
+ export declare const updatePulseDefinitionToolDescription = "Saves what an existing Pulse checks: the queries staged under its workflowId (after loadPulse and redefinePulseQuery), and optionally a new skill, decisionSpec or crossQueryTransforms. Overwrites the live Pulse immediately. A query's own transforms change only through definePulseQuery or redefinePulseQuery, never here.";
40
+ export declare const updatePulseSettingsToolDescription = "Changes how an existing Pulse runs and who hears about it: name, message, enabled (pause or resume), frequency, recipients, muted recipients and notification channels (email, mobile, feed, Slack, Zapier, webhooks). Reads and updates the live Pulse immediately; set only what changes.";
41
+ export declare const setPulseNotificationsToolDescription = "Turns the calling user's own notifications from a Pulse off (receive: false) or back on (receive: true). Affects only the caller, and any recipient can use it. To change who receives a Pulse, or through which channels, use updatePulseSettings.";
42
+ /** In the order the composite tool's actions are documented. */
43
+ export declare const ATOMIC_AUTHOR_PULSE_TOOLS: readonly [{
44
+ readonly name: "definePulseQuery";
45
+ readonly actionType: "define";
46
+ readonly description: "Stages one new query for a Pulse from a prior buildQuery result (this tool never runs NLQ), with its optional transforms. Omit workflowId for the first query of a new Pulse; a staging workflowId is returned. Pass it back to add another query to the same Pulse, and remember it and each query's name for later calls. Stages only: nothing in Sisense changes until createPulse or updatePulseDefinition.";
47
+ readonly inputSchema: z.ZodObject<{
48
+ name: z.ZodString;
49
+ queryId: z.ZodString;
50
+ workflowId: z.ZodOptional<z.ZodString>;
51
+ purpose: z.ZodOptional<z.ZodString>;
52
+ sourceId: z.ZodString;
53
+ transforms: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
54
+ type: z.ZodLiteral<"diff">;
55
+ baseline: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
56
+ lastFired: "lastFired";
57
+ previousPeriod: "previousPeriod";
58
+ sameTimeLastWeek: "sameTimeLastWeek";
59
+ previousCycle: "previousCycle";
60
+ }>, z.ZodObject<{
61
+ cyclesAgo: z.ZodNumber;
62
+ }, z.core.$strip>]>>;
63
+ }, z.core.$strip>, z.ZodObject<{
64
+ type: z.ZodLiteral<"topNCheck">;
65
+ rankField: z.ZodString;
66
+ topN: z.ZodOptional<z.ZodNumber>;
67
+ }, z.core.$strip>, z.ZodObject<{
68
+ type: z.ZodLiteral<"anomalyCheck">;
69
+ method: z.ZodOptional<z.ZodEnum<{
70
+ zscore: "zscore";
71
+ }>>;
72
+ window: z.ZodOptional<z.ZodNumber>;
73
+ threshold: z.ZodOptional<z.ZodNumber>;
74
+ }, z.core.$strip>, z.ZodObject<{
75
+ window: z.ZodOptional<z.ZodNumber>;
76
+ ignoreAnomalies: z.ZodOptional<z.ZodBoolean>;
77
+ modelType: z.ZodOptional<z.ZodEnum<{
78
+ logarithmic: "logarithmic";
79
+ advancedSmoothing: "advancedSmoothing";
80
+ linear: "linear";
81
+ localEstimates: "localEstimates";
82
+ }>>;
83
+ type: z.ZodLiteral<"trendCheck">;
84
+ }, z.core.$strip>, z.ZodObject<{
85
+ confidenceInterval: z.ZodOptional<z.ZodNumber>;
86
+ endDate: z.ZodOptional<z.ZodString>;
87
+ forecastHorizon: z.ZodOptional<z.ZodNumber>;
88
+ lowerBound: z.ZodOptional<z.ZodNumber>;
89
+ modelType: z.ZodOptional<z.ZodEnum<{
90
+ auto: "auto";
91
+ autoArima: "autoArima";
92
+ holtWinters: "holtWinters";
93
+ prophet: "prophet";
94
+ }>>;
95
+ roundToInt: z.ZodOptional<z.ZodBoolean>;
96
+ startDate: z.ZodOptional<z.ZodString>;
97
+ upperBound: z.ZodOptional<z.ZodNumber>;
98
+ type: z.ZodLiteral<"forecastCheck">;
99
+ }, z.core.$strip>], "type">>>;
100
+ }, z.core.$strip>;
101
+ }, {
102
+ readonly name: "redefinePulseQuery";
103
+ readonly actionType: "redefine";
104
+ readonly description: "Re-stages one query already staged under a workflowId with a new buildQuery result, and reports whether the query changed. Call buildQuery first for the revised data. For a Pulse not yet touched in this conversation, call loadPulse first. Stages only: nothing in Sisense changes until createPulse or updatePulseDefinition.";
105
+ readonly inputSchema: z.ZodObject<{
106
+ name: z.ZodString;
107
+ queryId: z.ZodString;
108
+ workflowId: z.ZodString;
109
+ purpose: z.ZodOptional<z.ZodString>;
110
+ sourceId: z.ZodString;
111
+ transforms: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
112
+ type: z.ZodLiteral<"diff">;
113
+ baseline: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
114
+ lastFired: "lastFired";
115
+ previousPeriod: "previousPeriod";
116
+ sameTimeLastWeek: "sameTimeLastWeek";
117
+ previousCycle: "previousCycle";
118
+ }>, z.ZodObject<{
119
+ cyclesAgo: z.ZodNumber;
120
+ }, z.core.$strip>]>>;
121
+ }, z.core.$strip>, z.ZodObject<{
122
+ type: z.ZodLiteral<"topNCheck">;
123
+ rankField: z.ZodString;
124
+ topN: z.ZodOptional<z.ZodNumber>;
125
+ }, z.core.$strip>, z.ZodObject<{
126
+ type: z.ZodLiteral<"anomalyCheck">;
127
+ method: z.ZodOptional<z.ZodEnum<{
128
+ zscore: "zscore";
129
+ }>>;
130
+ window: z.ZodOptional<z.ZodNumber>;
131
+ threshold: z.ZodOptional<z.ZodNumber>;
132
+ }, z.core.$strip>, z.ZodObject<{
133
+ window: z.ZodOptional<z.ZodNumber>;
134
+ ignoreAnomalies: z.ZodOptional<z.ZodBoolean>;
135
+ modelType: z.ZodOptional<z.ZodEnum<{
136
+ logarithmic: "logarithmic";
137
+ advancedSmoothing: "advancedSmoothing";
138
+ linear: "linear";
139
+ localEstimates: "localEstimates";
140
+ }>>;
141
+ type: z.ZodLiteral<"trendCheck">;
142
+ }, z.core.$strip>, z.ZodObject<{
143
+ confidenceInterval: z.ZodOptional<z.ZodNumber>;
144
+ endDate: z.ZodOptional<z.ZodString>;
145
+ forecastHorizon: z.ZodOptional<z.ZodNumber>;
146
+ lowerBound: z.ZodOptional<z.ZodNumber>;
147
+ modelType: z.ZodOptional<z.ZodEnum<{
148
+ auto: "auto";
149
+ autoArima: "autoArima";
150
+ holtWinters: "holtWinters";
151
+ prophet: "prophet";
152
+ }>>;
153
+ roundToInt: z.ZodOptional<z.ZodBoolean>;
154
+ startDate: z.ZodOptional<z.ZodString>;
155
+ upperBound: z.ZodOptional<z.ZodNumber>;
156
+ type: z.ZodLiteral<"forecastCheck">;
157
+ }, z.core.$strip>], "type">>>;
158
+ }, z.core.$strip>;
159
+ }, {
160
+ readonly name: "loadPulse";
161
+ readonly actionType: "load-existing";
162
+ readonly description: "Loads an existing Pulse (workflowId = its _id, e.g. from listPulses) into staging, so its queries can be redefined and its definition updated. Call it first for a Pulse not yet touched in this conversation. Changes nothing in Sisense.";
163
+ readonly inputSchema: z.ZodObject<{
164
+ workflowId: z.ZodString;
165
+ }, z.core.$strip>;
166
+ }, {
167
+ readonly name: "createPulse";
168
+ readonly actionType: "create";
169
+ readonly description: "Creates a new Pulse from the queries staged under a workflowId, with a name, a judgment rule (skill), a decisionSpec and, for a live source, a frequency. If the request names no measure, decline in chat.\n\nCRITICAL: this creates a real Pulse in Sisense and runs its first evaluation right away, with no undo. Always confirm first, even when the request already states the whole Pulse: show the staged queries and transforms and the plain-language rule, then wait for an explicit yes. Report the result through its message field.";
170
+ readonly inputSchema: z.ZodObject<{
171
+ name: z.ZodString;
172
+ skill: z.ZodString;
173
+ decisionSpec: z.ZodRecord<z.ZodString, z.ZodUnknown>;
174
+ crossQueryTransforms: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
175
+ type: z.ZodLiteral<"arithmetic">;
176
+ name: z.ZodString;
177
+ op: z.ZodEnum<{
178
+ diff: "diff";
179
+ ratio: "ratio";
180
+ pctDiff: "pctDiff";
181
+ }>;
182
+ left: z.ZodString;
183
+ right: z.ZodString;
184
+ }, z.core.$strip>, z.ZodObject<{
185
+ type: z.ZodLiteral<"rankCompare">;
186
+ name: z.ZodString;
187
+ left: z.ZodString;
188
+ right: z.ZodString;
189
+ keyField: z.ZodString;
190
+ rightKeyField: z.ZodOptional<z.ZodString>;
191
+ topN: z.ZodOptional<z.ZodNumber>;
192
+ }, z.core.$strip>, z.ZodObject<{
193
+ type: z.ZodLiteral<"valueCompare">;
194
+ name: z.ZodString;
195
+ left: z.ZodString;
196
+ right: z.ZodString;
197
+ keyField: z.ZodString;
198
+ rightKeyField: z.ZodOptional<z.ZodString>;
199
+ valueField: z.ZodString;
200
+ rightValueField: z.ZodOptional<z.ZodString>;
201
+ op: z.ZodEnum<{
202
+ diff: "diff";
203
+ ratio: "ratio";
204
+ pctDiff: "pctDiff";
205
+ }>;
206
+ breachWhen: z.ZodObject<{
207
+ operator: z.ZodEnum<{
208
+ lessThan: "lessThan";
209
+ lessThanInclusive: "lessThanInclusive";
210
+ greaterThan: "greaterThan";
211
+ greaterThanInclusive: "greaterThanInclusive";
212
+ }>;
213
+ value: z.ZodNumber;
214
+ }, z.core.$strip>;
215
+ }, z.core.$strip>], "type">>>;
216
+ workflowId: z.ZodString;
217
+ frequency: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
218
+ periodMode: z.ZodEnum<{
219
+ minutes: "minutes";
220
+ hours: "hours";
221
+ days: "days";
222
+ }>;
223
+ periodValue: z.ZodNumber;
224
+ }, z.core.$strip>, z.ZodObject<{
225
+ periodMode: z.ZodLiteral<"cron">;
226
+ cron: z.ZodString;
227
+ timeZone: z.ZodOptional<z.ZodString>;
228
+ }, z.core.$strip>], "periodMode">>;
229
+ removedQueryNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
230
+ evaluateNow: z.ZodOptional<z.ZodBoolean>;
231
+ }, z.core.$strip>;
232
+ readonly writes: {
233
+ readonly destructive: false;
234
+ readonly openWorld: false;
235
+ };
236
+ }, {
237
+ readonly name: "updatePulseDefinition";
238
+ readonly actionType: "update-spec";
239
+ readonly description: "Saves what an existing Pulse checks: the queries staged under its workflowId (after loadPulse and redefinePulseQuery), and optionally a new skill, decisionSpec or crossQueryTransforms. Overwrites the live Pulse immediately. A query's own transforms change only through definePulseQuery or redefinePulseQuery, never here.";
240
+ readonly inputSchema: z.ZodObject<{
241
+ skill: z.ZodOptional<z.ZodString>;
242
+ decisionSpec: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
243
+ crossQueryTransforms: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
244
+ type: z.ZodLiteral<"arithmetic">;
245
+ name: z.ZodString;
246
+ op: z.ZodEnum<{
247
+ diff: "diff";
248
+ ratio: "ratio";
249
+ pctDiff: "pctDiff";
250
+ }>;
251
+ left: z.ZodString;
252
+ right: z.ZodString;
253
+ }, z.core.$strip>, z.ZodObject<{
254
+ type: z.ZodLiteral<"rankCompare">;
255
+ name: z.ZodString;
256
+ left: z.ZodString;
257
+ right: z.ZodString;
258
+ keyField: z.ZodString;
259
+ rightKeyField: z.ZodOptional<z.ZodString>;
260
+ topN: z.ZodOptional<z.ZodNumber>;
261
+ }, z.core.$strip>, z.ZodObject<{
262
+ type: z.ZodLiteral<"valueCompare">;
263
+ name: z.ZodString;
264
+ left: z.ZodString;
265
+ right: z.ZodString;
266
+ keyField: z.ZodString;
267
+ rightKeyField: z.ZodOptional<z.ZodString>;
268
+ valueField: z.ZodString;
269
+ rightValueField: z.ZodOptional<z.ZodString>;
270
+ op: z.ZodEnum<{
271
+ diff: "diff";
272
+ ratio: "ratio";
273
+ pctDiff: "pctDiff";
274
+ }>;
275
+ breachWhen: z.ZodObject<{
276
+ operator: z.ZodEnum<{
277
+ lessThan: "lessThan";
278
+ lessThanInclusive: "lessThanInclusive";
279
+ greaterThan: "greaterThan";
280
+ greaterThanInclusive: "greaterThanInclusive";
281
+ }>;
282
+ value: z.ZodNumber;
283
+ }, z.core.$strip>;
284
+ }, z.core.$strip>], "type">>>;
285
+ workflowId: z.ZodString;
286
+ removedQueryNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
287
+ }, z.core.$strip>;
288
+ readonly writes: {
289
+ readonly destructive: true;
290
+ readonly openWorld: false;
291
+ };
292
+ }, {
293
+ readonly name: "updatePulseSettings";
294
+ readonly actionType: "update-workflow";
295
+ readonly description: "Changes how an existing Pulse runs and who hears about it: name, message, enabled (pause or resume), frequency, recipients, muted recipients and notification channels (email, mobile, feed, Slack, Zapier, webhooks). Reads and updates the live Pulse immediately; set only what changes.";
296
+ readonly inputSchema: z.ZodObject<{
297
+ name: z.ZodOptional<z.ZodString>;
298
+ message: z.ZodOptional<z.ZodString>;
299
+ enabled: z.ZodOptional<z.ZodBoolean>;
300
+ workflowId: z.ZodString;
301
+ frequency: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
302
+ periodMode: z.ZodEnum<{
303
+ minutes: "minutes";
304
+ hours: "hours";
305
+ days: "days";
306
+ }>;
307
+ periodValue: z.ZodNumber;
308
+ }, z.core.$strip>, z.ZodObject<{
309
+ periodMode: z.ZodLiteral<"cron">;
310
+ cron: z.ZodString;
311
+ timeZone: z.ZodOptional<z.ZodString>;
312
+ }, z.core.$strip>], "periodMode">>;
313
+ disabledUserIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
314
+ notifications: z.ZodOptional<z.ZodObject<{
315
+ email: z.ZodOptional<z.ZodBoolean>;
316
+ mobile: z.ZodOptional<z.ZodBoolean>;
317
+ feed: z.ZodOptional<z.ZodBoolean>;
318
+ slack: z.ZodOptional<z.ZodObject<{
319
+ active: z.ZodBoolean;
320
+ url: z.ZodOptional<z.ZodString>;
321
+ channels: z.ZodOptional<z.ZodString>;
322
+ }, z.core.$strip>>;
323
+ zapier: z.ZodOptional<z.ZodObject<{
324
+ active: z.ZodBoolean;
325
+ url: z.ZodOptional<z.ZodString>;
326
+ }, z.core.$strip>>;
327
+ webhooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
328
+ name: z.ZodString;
329
+ url: z.ZodOptional<z.ZodString>;
330
+ active: z.ZodBoolean;
331
+ }, z.core.$strip>>>;
332
+ }, z.core.$strip>>;
333
+ addRecipients: z.ZodOptional<z.ZodArray<z.ZodObject<{
334
+ type: z.ZodEnum<{
335
+ user: "user";
336
+ group: "group";
337
+ adgroup: "adgroup";
338
+ }>;
339
+ id: z.ZodOptional<z.ZodString>;
340
+ email: z.ZodOptional<z.ZodString>;
341
+ name: z.ZodOptional<z.ZodString>;
342
+ }, z.core.$strip>>>;
343
+ removeRecipientIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
344
+ }, z.core.$strip>;
345
+ readonly writes: {
346
+ readonly destructive: true;
347
+ readonly openWorld: true;
348
+ };
349
+ }, {
350
+ readonly name: "setPulseNotifications";
351
+ readonly actionType: "set-receive-notifications";
352
+ readonly description: "Turns the calling user's own notifications from a Pulse off (receive: false) or back on (receive: true). Affects only the caller, and any recipient can use it. To change who receives a Pulse, or through which channels, use updatePulseSettings.";
353
+ readonly inputSchema: z.ZodObject<{
354
+ workflowId: z.ZodString;
355
+ receive: z.ZodBoolean;
356
+ }, z.core.$strip>;
357
+ readonly writes: {
358
+ readonly destructive: false;
359
+ readonly openWorld: false;
360
+ };
361
+ }];
362
+ export type AtomicAuthorPulseToolName = (typeof ATOMIC_AUTHOR_PULSE_TOOLS)[number]['name'];
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ import { AuthorPulseContext, AuthorPulseResult, authorPulseSchema } from './types';
3
+ /**
4
+ * Standalone author Pulse workflow engine - completely decoupled from any UI or store: every host
5
+ * (sdk-assistant, MCP server, custom integration) supplies its own `retrieveAgenticWorkflow`/
6
+ * `saveAgenticWorkflow` on `context`, backed by whatever storage it already has — the engine never
7
+ * assumes a particular one. `define`/`redefine`/`load-existing` only STAGE — they read/write
8
+ * exclusively through those two callbacks and never call vnext/Galaxy's workflow-creation or
9
+ * workflow-update API; persisting the result is the caller's (tool's confirm action) job, gated
10
+ * behind explicit user approval. `create`, by contrast, persists immediately: it calls
11
+ * `createAlert` and chains straight into the workflow's first evaluation, both before this function
12
+ * returns. `update-spec`/`update-workflow` likewise persist immediately via
13
+ * `updateAlertCondition`/`updateAlert` — `update-spec` still reads from staging (never a fresh
14
+ * fetch), `update-workflow` reads the live workflow directly (it never touches `context.queries[]`, so
15
+ * there is nothing to stage). Each action's own implementation lives in its own file under
16
+ * `./actions/`; cross-action building blocks (query compilation, staging, decisionSpec
17
+ * validation, the create-payload assembler) live under `./shared/`. Raw `jaql` and the raw
18
+ * `CustomSuperJSON` `csdkJSON` envelope are never returned to a caller from any action — see
19
+ * `StagedQuerySummary`.
20
+ */
21
+ export declare function authorPulseEngine(params: z.infer<typeof authorPulseSchema>, context: AuthorPulseContext): Promise<AuthorPulseResult>;
@@ -0,0 +1,9 @@
1
+ export { authorPulseEngine } from './author-pulse-engine';
2
+ export * from './atomic-tools';
3
+ export * from './atomic-adapter';
4
+ export * from './types';
5
+ export { stageQueryFromPersisted, toAgenticQuery, toStagedQuerySummary, } from './shared/staging';
6
+ export { buildTrendForecastChartValue, getDateLevelDimension, } from './shared/compile-query-from-prompt';
7
+ export { AuthorPulseAdjustmentError, isAuthorPulseAdjustmentError, } from './shared/adjustment-error';
8
+ export type { PulseKnowledge, PulseMeasureKnowledge, } from './shared/pulse-knowledge';
9
+ export type { PulseRangeSuggestion } from './shared/pulse-signature';