@astermind/cybernetic-chatbot-client 1.0.6

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 (61) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +667 -0
  3. package/dist/ApiClient.d.ts +86 -0
  4. package/dist/ApiClient.d.ts.map +1 -0
  5. package/dist/CyberneticCache.d.ts +56 -0
  6. package/dist/CyberneticCache.d.ts.map +1 -0
  7. package/dist/CyberneticClient.d.ts +207 -0
  8. package/dist/CyberneticClient.d.ts.map +1 -0
  9. package/dist/CyberneticLocalRAG.d.ts +59 -0
  10. package/dist/CyberneticLocalRAG.d.ts.map +1 -0
  11. package/dist/agentic/CyberneticAgent.d.ts +111 -0
  12. package/dist/agentic/CyberneticAgent.d.ts.map +1 -0
  13. package/dist/agentic/CyberneticIntentClassifier.d.ts +78 -0
  14. package/dist/agentic/CyberneticIntentClassifier.d.ts.map +1 -0
  15. package/dist/agentic/index.d.ts +13 -0
  16. package/dist/agentic/index.d.ts.map +1 -0
  17. package/dist/agentic/register.d.ts +32 -0
  18. package/dist/agentic/register.d.ts.map +1 -0
  19. package/dist/agentic/tools/ClickTool.d.ts +41 -0
  20. package/dist/agentic/tools/ClickTool.d.ts.map +1 -0
  21. package/dist/agentic/tools/FillTool.d.ts +59 -0
  22. package/dist/agentic/tools/FillTool.d.ts.map +1 -0
  23. package/dist/agentic/tools/NavigateTool.d.ts +87 -0
  24. package/dist/agentic/tools/NavigateTool.d.ts.map +1 -0
  25. package/dist/agentic/tools/ScrollTool.d.ts +74 -0
  26. package/dist/agentic/tools/ScrollTool.d.ts.map +1 -0
  27. package/dist/agentic/tools/index.d.ts +9 -0
  28. package/dist/agentic/tools/index.d.ts.map +1 -0
  29. package/dist/agentic/types.d.ts +112 -0
  30. package/dist/agentic/types.d.ts.map +1 -0
  31. package/dist/config.d.ts +10 -0
  32. package/dist/config.d.ts.map +1 -0
  33. package/dist/cybernetic-chatbot-client-full.esm.js +3271 -0
  34. package/dist/cybernetic-chatbot-client-full.esm.js.map +1 -0
  35. package/dist/cybernetic-chatbot-client-full.min.js +2 -0
  36. package/dist/cybernetic-chatbot-client-full.min.js.map +1 -0
  37. package/dist/cybernetic-chatbot-client-full.umd.js +3296 -0
  38. package/dist/cybernetic-chatbot-client-full.umd.js.map +1 -0
  39. package/dist/cybernetic-chatbot-client.esm.js +3265 -0
  40. package/dist/cybernetic-chatbot-client.esm.js.map +1 -0
  41. package/dist/cybernetic-chatbot-client.min.js +2 -0
  42. package/dist/cybernetic-chatbot-client.min.js.map +1 -0
  43. package/dist/cybernetic-chatbot-client.umd.js +3290 -0
  44. package/dist/cybernetic-chatbot-client.umd.js.map +1 -0
  45. package/dist/full.d.ts +15 -0
  46. package/dist/full.d.ts.map +1 -0
  47. package/dist/index.d.ts +15 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/license/base64url.d.ts +24 -0
  50. package/dist/license/base64url.d.ts.map +1 -0
  51. package/dist/license/index.d.ts +5 -0
  52. package/dist/license/index.d.ts.map +1 -0
  53. package/dist/license/licenseManager.d.ts +124 -0
  54. package/dist/license/licenseManager.d.ts.map +1 -0
  55. package/dist/license/types.d.ts +72 -0
  56. package/dist/license/types.d.ts.map +1 -0
  57. package/dist/license/verifier.d.ts +19 -0
  58. package/dist/license/verifier.d.ts.map +1 -0
  59. package/dist/types.d.ts +163 -0
  60. package/dist/types.d.ts.map +1 -0
  61. package/package.json +85 -0
@@ -0,0 +1,41 @@
1
+ import type { ActionResult } from '../types.js';
2
+ /**
3
+ * Options for click action
4
+ */
5
+ export interface ClickOptions {
6
+ /** Wait time before clicking (ms) */
7
+ delay?: number;
8
+ /** Scroll element into view before clicking */
9
+ scrollIntoView?: boolean;
10
+ /** Block behavior for scrollIntoView */
11
+ scrollBlock?: ScrollLogicalPosition;
12
+ }
13
+ /**
14
+ * Tool for clicking DOM elements
15
+ */
16
+ export declare class ClickTool {
17
+ /**
18
+ * Click an element by selector
19
+ *
20
+ * @param selector - CSS selector for the element
21
+ * @param options - Click options
22
+ * @returns Action result
23
+ */
24
+ static execute(selector: string, options?: ClickOptions): Promise<ActionResult>;
25
+ /**
26
+ * Click an element by text content
27
+ *
28
+ * @param text - Text to search for
29
+ * @param tagName - Optional tag name to filter (e.g., 'button', 'a')
30
+ * @returns Action result
31
+ */
32
+ static clickByText(text: string, tagName?: string): Promise<ActionResult>;
33
+ /**
34
+ * Double-click an element
35
+ *
36
+ * @param selector - CSS selector for the element
37
+ * @returns Action result
38
+ */
39
+ static doubleClick(selector: string): Promise<ActionResult>;
40
+ }
41
+ //# sourceMappingURL=ClickTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClickTool.d.ts","sourceRoot":"","sources":["../../../src/agentic/tools/ClickTool.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wCAAwC;IACxC,WAAW,CAAC,EAAE,qBAAqB,CAAC;CACvC;AAED;;GAEG;AACH,qBAAa,SAAS;IAClB;;;;;;OAMG;WACU,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,YAAY,CAAC;IA4DzF;;;;;;OAMG;WACU,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAwC/E;;;;;OAKG;WACU,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;CAgDpE"}
@@ -0,0 +1,59 @@
1
+ import type { ActionResult } from '../types.js';
2
+ /**
3
+ * Options for form fill action
4
+ */
5
+ export interface FillOptions {
6
+ /** Trigger input events after filling */
7
+ triggerEvents?: boolean;
8
+ /** Clear existing value before filling */
9
+ clearFirst?: boolean;
10
+ /** Focus element before filling */
11
+ focus?: boolean;
12
+ }
13
+ /**
14
+ * Tool for filling form fields
15
+ */
16
+ export declare class FillTool {
17
+ /**
18
+ * Fill a form field with a value
19
+ *
20
+ * @param selector - CSS selector for the input element
21
+ * @param value - Value to fill
22
+ * @param options - Fill options
23
+ * @returns Action result
24
+ */
25
+ static execute(selector: string, value: string, options?: FillOptions): Promise<ActionResult>;
26
+ /**
27
+ * Fill a select element
28
+ */
29
+ private static fillSelect;
30
+ /**
31
+ * Trigger input and change events on an element
32
+ */
33
+ private static triggerInputEvents;
34
+ /**
35
+ * Fill multiple form fields at once
36
+ *
37
+ * @param fields - Map of selector to value
38
+ * @param options - Fill options
39
+ * @returns Action result with details for each field
40
+ */
41
+ static fillMany(fields: Record<string, string>, options?: FillOptions): Promise<ActionResult>;
42
+ /**
43
+ * Clear a form field
44
+ *
45
+ * @param selector - CSS selector for the input element
46
+ * @returns Action result
47
+ */
48
+ static clear(selector: string): Promise<ActionResult>;
49
+ /**
50
+ * Type text character by character (simulates typing)
51
+ *
52
+ * @param selector - CSS selector for the input element
53
+ * @param text - Text to type
54
+ * @param delayMs - Delay between characters in ms
55
+ * @returns Action result
56
+ */
57
+ static type(selector: string, text: string, delayMs?: number): Promise<ActionResult>;
58
+ }
59
+ //# sourceMappingURL=FillTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FillTool.d.ts","sourceRoot":"","sources":["../../../src/agentic/tools/FillTool.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,yCAAyC;IACzC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mCAAmC;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,qBAAa,QAAQ;IACjB;;;;;;;OAOG;WACU,OAAO,CAChB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,WAAgB,GAC1B,OAAO,CAAC,YAAY,CAAC;IAsExB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;IA8BzB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAoBjC;;;;;;OAMG;WACU,QAAQ,CACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,OAAO,GAAE,WAAgB,GAC1B,OAAO,CAAC,YAAY,CAAC;IAoBxB;;;;;OAKG;WACU,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAI3D;;;;;;;OAOG;WACU,IAAI,CACb,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,MAAW,GACrB,OAAO,CAAC,YAAY,CAAC;CAqD3B"}
@@ -0,0 +1,87 @@
1
+ import type { ActionResult } from '../types.js';
2
+ /**
3
+ * Options for navigation
4
+ */
5
+ export interface NavigateOptions {
6
+ /** Try client-side navigation first (for SPAs) */
7
+ preferClientSide?: boolean;
8
+ /** Open in new tab */
9
+ newTab?: boolean;
10
+ /** Replace current history entry */
11
+ replace?: boolean;
12
+ /** Query parameters to append */
13
+ params?: Record<string, string | number | boolean>;
14
+ }
15
+ /**
16
+ * Tool for page navigation
17
+ */
18
+ export declare class NavigateTool {
19
+ /**
20
+ * Navigate to a URL
21
+ *
22
+ * @param url - URL or path to navigate to
23
+ * @param options - Navigation options
24
+ * @returns Action result
25
+ */
26
+ static execute(url: string, options?: NavigateOptions): Promise<ActionResult>;
27
+ /**
28
+ * Navigate back in history
29
+ *
30
+ * @returns Action result
31
+ */
32
+ static back(): Promise<ActionResult>;
33
+ /**
34
+ * Navigate forward in history
35
+ *
36
+ * @returns Action result
37
+ */
38
+ static forward(): Promise<ActionResult>;
39
+ /**
40
+ * Reload the current page
41
+ *
42
+ * @param forceFetch - Force reload from server (bypass cache)
43
+ * @returns Action result
44
+ */
45
+ static reload(forceFetch?: boolean): Promise<ActionResult>;
46
+ /**
47
+ * Get the current URL
48
+ *
49
+ * @returns Current URL or null if not in browser
50
+ */
51
+ static getCurrentUrl(): string | null;
52
+ /**
53
+ * Get the current path
54
+ *
55
+ * @returns Current path or null if not in browser
56
+ */
57
+ static getCurrentPath(): string | null;
58
+ /**
59
+ * Check if a URL is valid and safe
60
+ */
61
+ private static isValidUrl;
62
+ /**
63
+ * Check if URL is internal to the current site
64
+ */
65
+ private static isInternalUrl;
66
+ /**
67
+ * Try client-side navigation using History API
68
+ */
69
+ private static tryClientSideNavigation;
70
+ /**
71
+ * Navigate to a hash/anchor on the current page
72
+ *
73
+ * @param hash - Hash/anchor name (without #)
74
+ * @returns Action result
75
+ */
76
+ static toHash(hash: string): Promise<ActionResult>;
77
+ /**
78
+ * Open URL in new window with specific dimensions
79
+ *
80
+ * @param url - URL to open
81
+ * @param width - Window width
82
+ * @param height - Window height
83
+ * @returns Action result
84
+ */
85
+ static openPopup(url: string, width?: number, height?: number): Promise<ActionResult>;
86
+ }
87
+ //# sourceMappingURL=NavigateTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigateTool.d.ts","sourceRoot":"","sources":["../../../src/agentic/tools/NavigateTool.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sBAAsB;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACtD;AAED;;GAEG;AACH,qBAAa,YAAY;IACrB;;;;;;OAMG;WACU,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,YAAY,CAAC;IAmFvF;;;;OAIG;WACU,IAAI,IAAI,OAAO,CAAC,YAAY,CAAC;IAuB1C;;;;OAIG;WACU,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC;IAuB7C;;;;;OAKG;WACU,MAAM,CAAC,UAAU,GAAE,OAAe,GAAG,OAAO,CAAC,YAAY,CAAC;IAuBvE;;;;OAIG;IACH,MAAM,CAAC,aAAa,IAAI,MAAM,GAAG,IAAI;IAOrC;;;;OAIG;IACH,MAAM,CAAC,cAAc,IAAI,MAAM,GAAG,IAAI;IAOtC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;IAQzB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAmB5B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;IA0BtC;;;;;OAKG;WACU,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAuBxD;;;;;;;OAOG;WACU,SAAS,CAClB,GAAG,EAAE,MAAM,EACX,KAAK,GAAE,MAAY,EACnB,MAAM,GAAE,MAAY,GACrB,OAAO,CAAC,YAAY,CAAC;CA0C3B"}
@@ -0,0 +1,74 @@
1
+ import type { ActionResult } from '../types.js';
2
+ /**
3
+ * Options for scroll action
4
+ */
5
+ export interface ScrollOptions {
6
+ /** Scroll behavior */
7
+ behavior?: ScrollBehavior;
8
+ /** Block position for scrollIntoView */
9
+ block?: ScrollLogicalPosition;
10
+ /** Inline position for scrollIntoView */
11
+ inline?: ScrollLogicalPosition;
12
+ }
13
+ /**
14
+ * Tool for scrolling the page or elements
15
+ */
16
+ export declare class ScrollTool {
17
+ /**
18
+ * Scroll to an element
19
+ *
20
+ * @param selector - CSS selector for the element
21
+ * @param options - Scroll options
22
+ * @returns Action result
23
+ */
24
+ static execute(selector: string, options?: ScrollOptions): Promise<ActionResult>;
25
+ /**
26
+ * Scroll to top of page
27
+ *
28
+ * @param behavior - Scroll behavior
29
+ * @returns Action result
30
+ */
31
+ static toTop(behavior?: ScrollBehavior): Promise<ActionResult>;
32
+ /**
33
+ * Scroll to bottom of page
34
+ *
35
+ * @param behavior - Scroll behavior
36
+ * @returns Action result
37
+ */
38
+ static toBottom(behavior?: ScrollBehavior): Promise<ActionResult>;
39
+ /**
40
+ * Scroll by a specific amount
41
+ *
42
+ * @param x - Horizontal scroll amount (pixels)
43
+ * @param y - Vertical scroll amount (pixels)
44
+ * @param behavior - Scroll behavior
45
+ * @returns Action result
46
+ */
47
+ static by(x: number, y: number, behavior?: ScrollBehavior): Promise<ActionResult>;
48
+ /**
49
+ * Scroll to a specific position
50
+ *
51
+ * @param x - Horizontal position (pixels)
52
+ * @param y - Vertical position (pixels)
53
+ * @param behavior - Scroll behavior
54
+ * @returns Action result
55
+ */
56
+ static to(x: number, y: number, behavior?: ScrollBehavior): Promise<ActionResult>;
57
+ /**
58
+ * Scroll within a scrollable container
59
+ *
60
+ * @param containerSelector - CSS selector for the scrollable container
61
+ * @param targetSelector - CSS selector for the target element within container
62
+ * @param options - Scroll options
63
+ * @returns Action result
64
+ */
65
+ static withinContainer(containerSelector: string, targetSelector: string, options?: ScrollOptions): Promise<ActionResult>;
66
+ /**
67
+ * Check if an element is in the viewport
68
+ *
69
+ * @param selector - CSS selector for the element
70
+ * @returns Whether the element is visible
71
+ */
72
+ static isInViewport(selector: string): boolean;
73
+ }
74
+ //# sourceMappingURL=ScrollTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScrollTool.d.ts","sourceRoot":"","sources":["../../../src/agentic/tools/ScrollTool.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,sBAAsB;IACtB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,wCAAwC;IACxC,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,yCAAyC;IACzC,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAClC;AAED;;GAEG;AACH,qBAAa,UAAU;IACnB;;;;;;OAMG;WACU,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,YAAY,CAAC;IAmD1F;;;;;OAKG;WACU,KAAK,CAAC,QAAQ,GAAE,cAAyB,GAAG,OAAO,CAAC,YAAY,CAAC;IAI9E;;;;;OAKG;WACU,QAAQ,CAAC,QAAQ,GAAE,cAAyB,GAAG,OAAO,CAAC,YAAY,CAAC;IAIjF;;;;;;;OAOG;WACU,EAAE,CACX,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,QAAQ,GAAE,cAAyB,GACpC,OAAO,CAAC,YAAY,CAAC;IAuBxB;;;;;;;OAOG;WACU,EAAE,CACX,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,QAAQ,GAAE,cAAyB,GACpC,OAAO,CAAC,YAAY,CAAC;IAuBxB;;;;;;;OAOG;WACU,eAAe,CACxB,iBAAiB,EAAE,MAAM,EACzB,cAAc,EAAE,MAAM,EACtB,OAAO,GAAE,aAAkB,GAC5B,OAAO,CAAC,YAAY,CAAC;IAmDxB;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;CAkBjD"}
@@ -0,0 +1,9 @@
1
+ export { ClickTool } from './ClickTool.js';
2
+ export type { ClickOptions } from './ClickTool.js';
3
+ export { FillTool } from './FillTool.js';
4
+ export type { FillOptions } from './FillTool.js';
5
+ export { ScrollTool } from './ScrollTool.js';
6
+ export type { ScrollOptions } from './ScrollTool.js';
7
+ export { NavigateTool } from './NavigateTool.js';
8
+ export type { NavigateOptions } from './NavigateTool.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agentic/tools/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Action types that can be performed
3
+ */
4
+ export type ActionType = 'navigate' | 'fillForm' | 'clickElement' | 'triggerModal' | 'scroll' | 'highlight' | 'custom';
5
+ /**
6
+ * Agent action definition
7
+ */
8
+ export interface AgentAction {
9
+ /** Unique action ID */
10
+ id: string;
11
+ /** Type of action to perform */
12
+ type: ActionType;
13
+ /** Target - URL, selector, or callback name */
14
+ target: string;
15
+ /** Additional parameters */
16
+ params?: Record<string, unknown>;
17
+ /** Confidence score (0-1) */
18
+ confidence: number;
19
+ /** Human-readable explanation */
20
+ explanation?: string;
21
+ }
22
+ /**
23
+ * Result of action execution
24
+ */
25
+ export interface ActionResult {
26
+ /** Whether action succeeded */
27
+ success: boolean;
28
+ /** Result message */
29
+ message: string;
30
+ /** Error details if failed */
31
+ error?: string;
32
+ }
33
+ /**
34
+ * Intent classification result
35
+ */
36
+ export interface IntentClassification {
37
+ /** Classified action (if any) */
38
+ action: AgentAction | null;
39
+ /** Whether to escalate to backend RAG */
40
+ shouldEscalate: boolean;
41
+ /** Raw confidence before threshold */
42
+ rawConfidence: number;
43
+ /** Matched patterns (for debugging) */
44
+ matchedPatterns?: string[];
45
+ }
46
+ /**
47
+ * Site map entry for navigation
48
+ */
49
+ export interface SiteMapEntry {
50
+ /** URL path pattern */
51
+ path: string;
52
+ /** Display name */
53
+ name: string;
54
+ /** Description for intent matching */
55
+ description?: string;
56
+ /** Allowed query/path parameters */
57
+ params?: Record<string, string[]>;
58
+ /** Whether path has dynamic segments like :id */
59
+ dynamicParams?: boolean;
60
+ /** Aliases for fuzzy matching */
61
+ aliases?: string[];
62
+ }
63
+ /**
64
+ * Form field configuration
65
+ */
66
+ export interface FormFieldConfig {
67
+ /** CSS selector for the field */
68
+ selector: string;
69
+ /** Field name for intent matching */
70
+ name: string;
71
+ /** Aliases for fuzzy matching */
72
+ aliases?: string[];
73
+ }
74
+ /**
75
+ * Modal trigger configuration
76
+ */
77
+ export interface ModalTriggerConfig {
78
+ /** Modal identifier */
79
+ id: string;
80
+ /** CSS selector for trigger element */
81
+ trigger: string;
82
+ /** Aliases for fuzzy matching */
83
+ aliases?: string[];
84
+ }
85
+ /**
86
+ * Agent configuration (extended from core AgenticConfig)
87
+ */
88
+ export interface AgentConfig {
89
+ /** Enable agentic capabilities */
90
+ enabled: boolean;
91
+ /** Confidence threshold for action execution (default: 0.8) */
92
+ confidenceThreshold?: number;
93
+ /** Site map for navigation */
94
+ siteMap?: SiteMapEntry[];
95
+ /** Form field configurations */
96
+ forms?: Record<string, FormFieldConfig>;
97
+ /** Modal trigger configurations */
98
+ modals?: Record<string, ModalTriggerConfig>;
99
+ /** Custom action callbacks */
100
+ customActions?: Record<string, (params?: unknown) => Promise<ActionResult>>;
101
+ /** Enable action preview cards (default: true) */
102
+ requireConfirmation?: boolean;
103
+ /** Allowed DOM actions */
104
+ allowedActions?: ('click' | 'fill' | 'scroll' | 'navigate' | 'select')[];
105
+ /** Maximum actions per conversation turn (default: 5) */
106
+ maxActionsPerTurn?: number;
107
+ /** CSS selectors to never interact with */
108
+ blockedSelectors?: string[];
109
+ /** Only allow actions within these selectors */
110
+ allowedSelectors?: string[];
111
+ }
112
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/agentic/types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,10 @@
1
+ import type { CyberneticConfig } from './types.js';
2
+ /**
3
+ * Validate configuration
4
+ */
5
+ export declare function validateConfig(config: unknown): config is CyberneticConfig;
6
+ /**
7
+ * Load config from window.astermindConfig or script tag data attributes
8
+ */
9
+ export declare function loadConfig(): CyberneticConfig | null;
10
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,gBAAgB,CAoB1E;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,gBAAgB,GAAG,IAAI,CAwBpD"}