@pillar-ai/sdk 0.1.22 → 0.1.24

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 (49) hide show
  1. package/README.md +1 -1
  2. package/dist/actions/index.d.ts +1 -1
  3. package/dist/actions/types.d.ts +89 -0
  4. package/dist/api/client.d.ts +4 -0
  5. package/dist/cli/sync.js +34 -4
  6. package/dist/components/PagePilot/styles.d.ts +1 -1
  7. package/dist/components/Panel/styles.d.ts +1 -1
  8. package/dist/core/Pillar.d.ts +7 -13
  9. package/dist/core/config.d.ts +29 -29
  10. package/dist/pillar.esm.js +1 -1
  11. package/dist/tools/index.d.ts +1 -0
  12. package/dist/tools/types.d.ts +54 -7
  13. package/dist/utils/tracing.d.ts +43 -0
  14. package/package.json +6 -3
  15. package/dist/actions/definitions/analytics.d.ts +0 -18
  16. package/dist/actions/definitions/content.d.ts +0 -40
  17. package/dist/actions/definitions/index.d.ts +0 -26
  18. package/dist/actions/definitions/navigation.d.ts +0 -65
  19. package/dist/actions/definitions/settings.d.ts +0 -162
  20. package/dist/actions/definitions/sources.d.ts +0 -44
  21. package/dist/actions/definitions/support.d.ts +0 -15
  22. package/dist/actions/definitions/team.d.ts +0 -120
  23. package/dist/api/ag-ui-adapter.d.ts +0 -76
  24. package/dist/api/ag-ui-bridge.d.ts +0 -49
  25. package/dist/api/ag-ui-client.d.ts +0 -102
  26. package/dist/api/ag-ui-handler.d.ts +0 -89
  27. package/dist/components/Button/FloatingButton.d.ts +0 -46
  28. package/dist/components/Panel/TabNavigation.d.ts +0 -16
  29. package/dist/components/Progress/AGUIProgress.d.ts +0 -15
  30. package/dist/components/Tooltips/Tooltip.d.ts +0 -46
  31. package/dist/components/Tooltips/TooltipManager.d.ts +0 -41
  32. package/dist/components/Tooltips/index.d.ts +0 -6
  33. package/dist/components/Tooltips/styles.d.ts +0 -5
  34. package/dist/components/Views/ArticleChatView.d.ts +0 -10
  35. package/dist/components/Views/ArticleView.d.ts +0 -10
  36. package/dist/components/Views/CategoryView.d.ts +0 -11
  37. package/dist/components/Views/HelpCenterArticles.d.ts +0 -17
  38. package/dist/components/Views/SearchView.d.ts +0 -10
  39. package/dist/components/Views/SupportView.d.ts +0 -15
  40. package/dist/components/shared/ArticleCard.d.ts +0 -17
  41. package/dist/components/shared/CategoryCard.d.ts +0 -17
  42. package/dist/content/extensions/AccordionNode.d.ts +0 -10
  43. package/dist/content/extensions/CalloutNode.d.ts +0 -11
  44. package/dist/content/extensions/index.d.ts +0 -5
  45. package/dist/content/index.d.ts +0 -5
  46. package/dist/content/renderer.d.ts +0 -24
  47. package/dist/store/tooltips.d.ts +0 -21
  48. package/dist/utils/helpdesk.d.ts +0 -33
  49. package/dist/utils/markdown.d.ts +0 -9
@@ -23,5 +23,6 @@
23
23
  *
24
24
  * @module tools
25
25
  */
26
+ export { validateToolName, TOOL_NAME_PATTERN } from './types';
26
27
  export type { ToolType, ToolDataSchema, ToolDataSchemaProperty, ToolDefinition, ToolDefinitions, ToolManifest, ToolManifestEntry, ClientInfo, Platform, SyncToolDefinition, SyncToolDefinitions, ToolTypeDataMap, NavigateToolData, TriggerToolData, InlineUIData, ExternalLinkData, CopyTextData, QueryToolData, ToolDataType, ToolNames, TypedTaskHandler, TypedOnTask, TypedPillarMethods, ToolExecuteResult, ToolSchema, ActionType, ActionDataSchema, ActionDataSchemaProperty, ActionDefinition, ActionDefinitions, ActionManifest, ActionManifestEntry, SyncActionDefinition, SyncActionDefinitions, NavigateActionData, TriggerActionData, QueryActionData, ActionTypeDataMap, ActionDataType, ActionNames, ActionResult, ActionSchema, } from './types';
27
28
  export { setClientInfo, getClientInfo, getHandler, getToolDefinition, hasTool, getToolNames, getManifest, clearRegistry, getToolCount, getActionDefinition, hasAction, getActionNames, getActionCount, } from './registry';
@@ -37,17 +37,17 @@
37
37
  * - start_tutorial: Start a tutorial/walkthrough
38
38
  * - inline_ui: Display inline UI card in chat
39
39
  */
40
- export type ToolType = 'navigate' | 'open_modal' | 'fill_form' | 'trigger_tool' | 'query' | 'copy_text' | 'external_link' | 'start_tutorial' | 'inline_ui';
40
+ export type ToolType = "navigate" | "open_modal" | "fill_form" | "trigger_tool" | "query" | "copy_text" | "external_link" | "start_tutorial" | "inline_ui";
41
41
  /**
42
42
  * Supported platforms for tool deployments.
43
43
  */
44
- export type Platform = 'web' | 'ios' | 'android' | 'desktop';
44
+ export type Platform = "web" | "ios" | "android" | "desktop";
45
45
  /**
46
46
  * Schema property definition for a single field.
47
47
  * Supports nested objects and arrays with items.
48
48
  */
49
49
  export interface ToolDataSchemaProperty {
50
- type: 'string' | 'number' | 'boolean' | 'array' | 'object';
50
+ type: "string" | "number" | "boolean" | "array" | "object";
51
51
  description?: string;
52
52
  enum?: string[];
53
53
  default?: unknown;
@@ -65,7 +65,7 @@ export interface ToolDataSchemaProperty {
65
65
  * and populate the tool's data field before execution.
66
66
  */
67
67
  export interface ToolDataSchema {
68
- type: 'object';
68
+ type: "object";
69
69
  properties: Record<string, ToolDataSchemaProperty>;
70
70
  required?: string[];
71
71
  }
@@ -191,6 +191,7 @@ export type ToolDefinitions = Record<string, ToolDefinition<unknown>>;
191
191
  export interface ToolManifestEntry {
192
192
  name: string;
193
193
  description: string;
194
+ guidance?: string;
194
195
  examples?: string[];
195
196
  type: ToolType;
196
197
  path?: string;
@@ -439,6 +440,28 @@ export interface TypedOnTask<TTools extends SyncToolDefinitions | ToolDefinition
439
440
  export interface TypedPillarMethods<TTools extends SyncToolDefinitions | ToolDefinitions> {
440
441
  onTask: TypedOnTask<TTools>;
441
442
  }
443
+ /**
444
+ * Valid tool name pattern (matches LLM provider requirements).
445
+ *
446
+ * - Must start with a letter or underscore
447
+ * - Can contain: letters, numbers, underscores, dots, colons, dashes
448
+ * - Maximum 64 characters
449
+ *
450
+ * Examples:
451
+ * - Valid: "add_to_cart", "get_user.profile", "api:v2:search"
452
+ * - Invalid: "Increment count" (space), "123_start" (starts with number)
453
+ */
454
+ export declare const TOOL_NAME_PATTERN: RegExp;
455
+ /**
456
+ * Validate a tool name against LLM provider requirements.
457
+ *
458
+ * @param name - Tool name to validate
459
+ * @returns Object with `valid` boolean and optional `error` message
460
+ */
461
+ export declare function validateToolName(name: string): {
462
+ valid: boolean;
463
+ error?: string;
464
+ };
442
465
  /**
443
466
  * Result returned from a tool's execute function.
444
467
  *
@@ -447,10 +470,10 @@ export interface TypedPillarMethods<TTools extends SyncToolDefinitions | ToolDef
447
470
  */
448
471
  export interface ToolExecuteResult {
449
472
  content: Array<{
450
- type: 'text';
473
+ type: "text";
451
474
  text: string;
452
475
  } | {
453
- type: 'image';
476
+ type: "image";
454
477
  data: string;
455
478
  mimeType: string;
456
479
  }>;
@@ -490,6 +513,17 @@ export interface ToolSchema<TInput = Record<string, unknown>> {
490
513
  name: string;
491
514
  /** Human-readable description for AI matching */
492
515
  description: string;
516
+ /**
517
+ * Agent-facing instructions for when/how to use this tool.
518
+ *
519
+ * Appended to the tool description in the LLM's tool list at
520
+ * selection time. Use for disambiguation and prerequisite hints
521
+ * (e.g., "Call get_datasources first to obtain a datasource_uid").
522
+ *
523
+ * Extracted by `pillar-sync --scan` and stored on the backend
524
+ * Action model so the agent sees it without runtime code.
525
+ */
526
+ guidance?: string;
493
527
  /**
494
528
  * Type of tool - determines how the SDK handles it and organizes it in the UI.
495
529
  */
@@ -499,7 +533,7 @@ export interface ToolSchema<TInput = Record<string, unknown>> {
499
533
  * The AI extracts structured data from the conversation to populate these.
500
534
  */
501
535
  inputSchema?: {
502
- type: 'object';
536
+ type: "object";
503
537
  properties: Record<string, unknown>;
504
538
  required?: string[];
505
539
  };
@@ -527,6 +561,19 @@ export interface ToolSchema<TInput = Record<string, unknown>> {
527
561
  * - `void` if the tool has no return value
528
562
  */
529
563
  execute: (input: TInput) => Promise<ToolExecuteResult | unknown | void> | ToolExecuteResult | unknown | void;
564
+ /**
565
+ * Whether to also register this tool with WebMCP (navigator.modelContext).
566
+ *
567
+ * When true, the tool will be exposed to browser-native AI agents and
568
+ * assistive technologies via the W3C WebMCP API. The tool is registered
569
+ * on mount and unregistered on unmount (or when the tool is removed).
570
+ *
571
+ * Only works in browser contexts where `navigator.modelContext` is available
572
+ * (either natively or via polyfill).
573
+ *
574
+ * @default false
575
+ */
576
+ webMCP?: boolean;
530
577
  }
531
578
  /** @deprecated Use ToolType instead */
532
579
  export type ActionType = ToolType;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * OpenTelemetry browser tracing for Pillar SDK.
3
+ *
4
+ * Initialises a WebTracerProvider that exports spans via OTLP/JSON to the
5
+ * backend proxy endpoint (`/mcp/telemetry/v1/traces`). The backend forwards
6
+ * them to Google Cloud Trace so browser and server spans share the same
7
+ * project and can be correlated by trace ID.
8
+ *
9
+ * Tracing is opt-in via `Pillar.init({ tracing: true })` or automatically
10
+ * when `debug: true`.
11
+ */
12
+ import { trace, context, type Tracer, type Span, SpanStatusCode } from '@opentelemetry/api';
13
+ /**
14
+ * Initialise the browser tracing provider.
15
+ *
16
+ * @param apiBaseUrl The SDK's API base URL (e.g. `https://help-api.trypillar.com`)
17
+ * @param attrs Extra resource attributes (product key, visitor id, …)
18
+ */
19
+ export declare function initTracing(apiBaseUrl: string, attrs?: Record<string, string>): Tracer;
20
+ /** Return the active tracer (or a no-op tracer if tracing is not initialised). */
21
+ export declare function getTracer(): Tracer;
22
+ /** Whether tracing has been initialised. */
23
+ export declare function isTracingEnabled(): boolean;
24
+ /**
25
+ * Build a W3C `traceparent` header value from the current active span.
26
+ * Returns `undefined` if there is no active span.
27
+ */
28
+ export declare function getTraceparentHeader(): string | undefined;
29
+ /**
30
+ * Inject `traceparent` (and optionally `tracestate`) into a headers object.
31
+ * Mutates and returns the headers dict.
32
+ */
33
+ export declare function injectTraceHeaders(headers: Record<string, string>): Record<string, string>;
34
+ /**
35
+ * Force-flush any pending spans. Call on page unload or when needed.
36
+ */
37
+ export declare function flushTracing(): Promise<void>;
38
+ /**
39
+ * Shut down the provider (call on SDK destroy).
40
+ */
41
+ export declare function shutdownTracing(): Promise<void>;
42
+ export { trace, context, SpanStatusCode };
43
+ export type { Span };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pillar-ai/sdk",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "Product copilot SDK for SaaS and web apps — AI assistant that executes tasks, not just answers questions",
5
5
  "type": "module",
6
6
  "main": "./dist/pillar.esm.js",
@@ -65,11 +65,14 @@
65
65
  }
66
66
  },
67
67
  "dependencies": {
68
+ "@opentelemetry/api": "^1.9.0",
69
+ "@opentelemetry/context-zone": "^2.5.1",
70
+ "@opentelemetry/exporter-trace-otlp-http": "^0.212.0",
71
+ "@opentelemetry/sdk-trace-web": "^2.5.1",
68
72
  "@preact/signals": "^1.3.1",
69
73
  "marked": "^17.0.1",
70
74
  "preact": "^10.25.4",
71
- "preact-iso": "^2.9.0",
72
- "user": "^0.0.0"
75
+ "preact-iso": "^2.9.0"
73
76
  },
74
77
  "devDependencies": {
75
78
  "@babel/core": "^7.24.0",
@@ -1,18 +0,0 @@
1
- export declare const analyticsActions: {
2
- view_search_analytics: {
3
- description: string;
4
- type: "navigate";
5
- path: string;
6
- autoRun: true;
7
- autoComplete: true;
8
- handler: () => void;
9
- };
10
- view_ai_analytics: {
11
- description: string;
12
- type: "navigate";
13
- path: string;
14
- autoRun: true;
15
- autoComplete: true;
16
- handler: () => void;
17
- };
18
- };
@@ -1,40 +0,0 @@
1
- export declare const contentActions: {
2
- view_all_articles: {
3
- description: string;
4
- type: "navigate";
5
- path: string;
6
- autoRun: true;
7
- autoComplete: true;
8
- handler: () => void;
9
- };
10
- view_article: {
11
- description: string;
12
- type: "trigger_action";
13
- autoRun: false;
14
- autoComplete: false;
15
- defaultData: {
16
- action: string;
17
- };
18
- handler: () => void;
19
- };
20
- filter_stale: {
21
- description: string;
22
- type: "trigger_action";
23
- autoRun: false;
24
- autoComplete: false;
25
- defaultData: {
26
- action: string;
27
- };
28
- handler: () => void;
29
- };
30
- view_categories: {
31
- description: string;
32
- type: "trigger_action";
33
- autoRun: false;
34
- autoComplete: false;
35
- defaultData: {
36
- action: string;
37
- };
38
- handler: () => void;
39
- };
40
- };
@@ -1,26 +0,0 @@
1
- /**
2
- * Action Definitions Index
3
- *
4
- * Imports and registers all action definitions for the Pillar Admin app.
5
- * These are code-first action definitions that get synced to the backend
6
- * during CI/CD builds.
7
- *
8
- * To use in your app:
9
- * 1. Import this file early in your app initialization
10
- * 2. Or create your own action definitions using defineActions()
11
- *
12
- * The action metadata is extracted via `npm run extract-actions` and
13
- * synced to the backend via `npm run sync-actions`.
14
- */
15
- import './navigation';
16
- import './settings';
17
- import './sources';
18
- import './analytics';
19
- import './team';
20
- import './support';
21
- export { navigationActions } from './navigation';
22
- export { settingsActions } from './settings';
23
- export { sourcesActions } from './sources';
24
- export { analyticsActions } from './analytics';
25
- export { teamActions } from './team';
26
- export { supportActions } from './support';
@@ -1,65 +0,0 @@
1
- export declare const navigationActions: {
2
- open_knowledge: {
3
- description: string;
4
- examples: string[];
5
- type: "navigate";
6
- path: string;
7
- autoRun: true;
8
- autoComplete: true;
9
- handler: () => void;
10
- };
11
- open_settings: {
12
- description: string;
13
- examples: string[];
14
- type: "navigate";
15
- path: string;
16
- autoRun: true;
17
- autoComplete: true;
18
- handler: () => void;
19
- };
20
- open_actions: {
21
- description: string;
22
- examples: string[];
23
- type: "navigate";
24
- path: string;
25
- autoRun: true;
26
- autoComplete: true;
27
- handler: () => void;
28
- };
29
- open_analytics: {
30
- description: string;
31
- examples: string[];
32
- type: "navigate";
33
- path: string;
34
- autoRun: true;
35
- autoComplete: true;
36
- handler: () => void;
37
- };
38
- open_ai_tester: {
39
- description: string;
40
- examples: string[];
41
- type: "navigate";
42
- path: string;
43
- autoRun: true;
44
- autoComplete: true;
45
- handler: () => void;
46
- };
47
- open_configure: {
48
- description: string;
49
- examples: string[];
50
- type: "navigate";
51
- path: string;
52
- autoRun: true;
53
- autoComplete: true;
54
- handler: () => void;
55
- };
56
- create_new_action: {
57
- description: string;
58
- examples: string[];
59
- type: "navigate";
60
- path: string;
61
- autoRun: true;
62
- autoComplete: true;
63
- handler: () => void;
64
- };
65
- };
@@ -1,162 +0,0 @@
1
- export declare const settingsActions: {
2
- open_branding_settings: {
3
- description: string;
4
- examples: string[];
5
- type: "navigate";
6
- path: string;
7
- autoRun: true;
8
- autoComplete: true;
9
- handler: () => void;
10
- };
11
- open_layout_settings: {
12
- description: string;
13
- examples: string[];
14
- type: "navigate";
15
- path: string;
16
- autoRun: true;
17
- autoComplete: true;
18
- handler: () => void;
19
- };
20
- open_header_settings: {
21
- description: string;
22
- examples: string[];
23
- type: "navigate";
24
- path: string;
25
- autoRun: true;
26
- autoComplete: true;
27
- handler: () => void;
28
- };
29
- open_footer_settings: {
30
- description: string;
31
- examples: string[];
32
- type: "navigate";
33
- path: string;
34
- autoRun: true;
35
- autoComplete: true;
36
- handler: () => void;
37
- };
38
- open_features_settings: {
39
- description: string;
40
- examples: string[];
41
- type: "navigate";
42
- path: string;
43
- autoRun: true;
44
- autoComplete: true;
45
- handler: () => void;
46
- };
47
- open_ai_settings: {
48
- description: string;
49
- examples: string[];
50
- type: "navigate";
51
- path: string;
52
- autoRun: true;
53
- autoComplete: true;
54
- handler: () => void;
55
- };
56
- open_seo_settings: {
57
- description: string;
58
- examples: string[];
59
- type: "navigate";
60
- path: string;
61
- autoRun: true;
62
- autoComplete: true;
63
- handler: () => void;
64
- };
65
- enable_ai_assistant: {
66
- description: string;
67
- type: "trigger_action";
68
- autoRun: false;
69
- autoComplete: false;
70
- defaultData: {
71
- action: string;
72
- target: string;
73
- };
74
- handler: () => void;
75
- };
76
- disable_ai_assistant: {
77
- description: string;
78
- type: "trigger_action";
79
- autoRun: false;
80
- autoComplete: false;
81
- defaultData: {
82
- action: string;
83
- target: string;
84
- };
85
- handler: () => void;
86
- };
87
- enable_dark_mode: {
88
- description: string;
89
- examples: string[];
90
- type: "trigger_action";
91
- autoRun: true;
92
- autoComplete: true;
93
- defaultData: {
94
- action: string;
95
- theme: string;
96
- };
97
- handler: () => void;
98
- };
99
- disable_dark_mode: {
100
- description: string;
101
- examples: string[];
102
- type: "trigger_action";
103
- autoRun: true;
104
- autoComplete: true;
105
- defaultData: {
106
- action: string;
107
- theme: string;
108
- };
109
- handler: () => void;
110
- };
111
- toggle_dark_mode: {
112
- description: string;
113
- examples: string[];
114
- type: "trigger_action";
115
- autoRun: true;
116
- autoComplete: true;
117
- defaultData: {
118
- action: string;
119
- };
120
- handler: () => void;
121
- };
122
- change_theme: {
123
- description: string;
124
- type: "trigger_action";
125
- autoRun: true;
126
- autoComplete: true;
127
- defaultData: {
128
- action: string;
129
- };
130
- handler: () => void;
131
- };
132
- update_logo: {
133
- description: string;
134
- type: "trigger_action";
135
- autoRun: true;
136
- autoComplete: true;
137
- defaultData: {
138
- action: string;
139
- };
140
- handler: () => void;
141
- };
142
- add_footer_link: {
143
- description: string;
144
- type: "trigger_action";
145
- autoRun: true;
146
- autoComplete: true;
147
- defaultData: {
148
- action: string;
149
- };
150
- handler: () => void;
151
- };
152
- configure_suggested_questions: {
153
- description: string;
154
- type: "trigger_action";
155
- autoRun: true;
156
- autoComplete: true;
157
- defaultData: {
158
- action: string;
159
- };
160
- handler: () => void;
161
- };
162
- };
@@ -1,44 +0,0 @@
1
- export declare const sourcesActions: {
2
- add_new_source: {
3
- description: string;
4
- examples: string[];
5
- type: "navigate";
6
- path: string;
7
- autoRun: true;
8
- autoComplete: true;
9
- dataSchema: {
10
- type: "object";
11
- properties: {
12
- type: {
13
- type: "string";
14
- description: string;
15
- };
16
- url: {
17
- type: "string";
18
- description: string;
19
- };
20
- name: {
21
- type: "string";
22
- description: string;
23
- };
24
- };
25
- };
26
- handler: () => void;
27
- };
28
- crawl_website: {
29
- description: string;
30
- type: "navigate";
31
- path: string;
32
- autoRun: true;
33
- autoComplete: true;
34
- handler: () => void;
35
- };
36
- connect_cloud_storage: {
37
- description: string;
38
- type: "navigate";
39
- path: string;
40
- autoRun: true;
41
- autoComplete: true;
42
- handler: () => void;
43
- };
44
- };
@@ -1,15 +0,0 @@
1
- export declare const supportActions: {
2
- escalate: {
3
- description: string;
4
- examples: string[];
5
- type: "external_link";
6
- externalUrl: string;
7
- handler: () => void;
8
- };
9
- defer: {
10
- description: string;
11
- examples: string[];
12
- type: "trigger_action";
13
- handler: () => void;
14
- };
15
- };
@@ -1,120 +0,0 @@
1
- export declare const teamActions: {
2
- open_team_settings: {
3
- description: string;
4
- type: "navigate";
5
- path: string;
6
- autoRun: true;
7
- autoComplete: true;
8
- handler: () => void;
9
- };
10
- invite_team_member: {
11
- description: string;
12
- type: "inline_ui";
13
- autoRun: false;
14
- autoComplete: false;
15
- defaultData: {
16
- card_type: string;
17
- emails: never[];
18
- role: string;
19
- };
20
- dataSchema: {
21
- type: "object";
22
- properties: {
23
- emails: {
24
- type: "array";
25
- description: string;
26
- };
27
- role: {
28
- type: "string";
29
- description: string;
30
- enum: string[];
31
- };
32
- };
33
- required: string[];
34
- };
35
- requiredContext: {
36
- userRole: string;
37
- };
38
- handler: () => void;
39
- };
40
- view_pending_invitations: {
41
- description: string;
42
- type: "trigger_action";
43
- autoRun: true;
44
- autoComplete: true;
45
- defaultData: {
46
- action: string;
47
- };
48
- requiredContext: {
49
- userRole: string;
50
- };
51
- handler: () => void;
52
- };
53
- resend_invitation: {
54
- description: string;
55
- type: "trigger_action";
56
- autoRun: false;
57
- autoComplete: false;
58
- defaultData: {
59
- action: string;
60
- };
61
- requiredContext: {
62
- userRole: string;
63
- };
64
- handler: () => void;
65
- };
66
- cancel_invitation: {
67
- description: string;
68
- type: "trigger_action";
69
- autoRun: false;
70
- autoComplete: false;
71
- defaultData: {
72
- action: string;
73
- };
74
- requiredContext: {
75
- userRole: string;
76
- };
77
- handler: () => void;
78
- };
79
- remove_team_member: {
80
- description: string;
81
- type: "trigger_action";
82
- autoRun: false;
83
- autoComplete: false;
84
- defaultData: {
85
- action: string;
86
- };
87
- requiredContext: {
88
- userRole: string;
89
- };
90
- handler: () => void;
91
- };
92
- promote_to_admin: {
93
- description: string;
94
- type: "trigger_action";
95
- autoRun: false;
96
- autoComplete: false;
97
- defaultData: {
98
- action: string;
99
- role: string;
100
- };
101
- requiredContext: {
102
- userRole: string;
103
- };
104
- handler: () => void;
105
- };
106
- demote_to_member: {
107
- description: string;
108
- type: "trigger_action";
109
- autoRun: false;
110
- autoComplete: false;
111
- defaultData: {
112
- action: string;
113
- role: string;
114
- };
115
- requiredContext: {
116
- userRole: string;
117
- };
118
- handler: () => void;
119
- };
120
- };