aui-agent-builder 0.1.0

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 (130) hide show
  1. package/README.md +311 -0
  2. package/bin/aui.js +2 -0
  3. package/dist/api-client/index.d.ts +208 -0
  4. package/dist/api-client/index.d.ts.map +1 -0
  5. package/dist/api-client/index.js +219 -0
  6. package/dist/api-client/index.js.map +1 -0
  7. package/dist/commands/add-integration.d.ts +26 -0
  8. package/dist/commands/add-integration.d.ts.map +1 -0
  9. package/dist/commands/add-integration.js +484 -0
  10. package/dist/commands/add-integration.js.map +1 -0
  11. package/dist/commands/add-param.d.ts +13 -0
  12. package/dist/commands/add-param.d.ts.map +1 -0
  13. package/dist/commands/add-param.js +140 -0
  14. package/dist/commands/add-param.js.map +1 -0
  15. package/dist/commands/add-tool.d.ts +17 -0
  16. package/dist/commands/add-tool.d.ts.map +1 -0
  17. package/dist/commands/add-tool.js +239 -0
  18. package/dist/commands/add-tool.js.map +1 -0
  19. package/dist/commands/connect.d.ts +20 -0
  20. package/dist/commands/connect.d.ts.map +1 -0
  21. package/dist/commands/connect.js +203 -0
  22. package/dist/commands/connect.js.map +1 -0
  23. package/dist/commands/create-agent.d.ts +25 -0
  24. package/dist/commands/create-agent.d.ts.map +1 -0
  25. package/dist/commands/create-agent.js +199 -0
  26. package/dist/commands/create-agent.js.map +1 -0
  27. package/dist/commands/diff.d.ts +17 -0
  28. package/dist/commands/diff.d.ts.map +1 -0
  29. package/dist/commands/diff.js +261 -0
  30. package/dist/commands/diff.js.map +1 -0
  31. package/dist/commands/import-agent.d.ts +21 -0
  32. package/dist/commands/import-agent.d.ts.map +1 -0
  33. package/dist/commands/import-agent.js +274 -0
  34. package/dist/commands/import-agent.js.map +1 -0
  35. package/dist/commands/index.d.ts +15 -0
  36. package/dist/commands/index.d.ts.map +1 -0
  37. package/dist/commands/index.js +27 -0
  38. package/dist/commands/index.js.map +1 -0
  39. package/dist/commands/init.d.ts +18 -0
  40. package/dist/commands/init.d.ts.map +1 -0
  41. package/dist/commands/init.js +173 -0
  42. package/dist/commands/init.js.map +1 -0
  43. package/dist/commands/list-agents.d.ts +12 -0
  44. package/dist/commands/list-agents.d.ts.map +1 -0
  45. package/dist/commands/list-agents.js +68 -0
  46. package/dist/commands/list-agents.js.map +1 -0
  47. package/dist/commands/login.d.ts +26 -0
  48. package/dist/commands/login.d.ts.map +1 -0
  49. package/dist/commands/login.js +200 -0
  50. package/dist/commands/login.js.map +1 -0
  51. package/dist/commands/pull.d.ts +17 -0
  52. package/dist/commands/pull.d.ts.map +1 -0
  53. package/dist/commands/pull.js +65 -0
  54. package/dist/commands/pull.js.map +1 -0
  55. package/dist/commands/push.d.ts +24 -0
  56. package/dist/commands/push.d.ts.map +1 -0
  57. package/dist/commands/push.js +160 -0
  58. package/dist/commands/push.js.map +1 -0
  59. package/dist/commands/status.d.ts +10 -0
  60. package/dist/commands/status.d.ts.map +1 -0
  61. package/dist/commands/status.js +155 -0
  62. package/dist/commands/status.js.map +1 -0
  63. package/dist/commands/sync.d.ts +19 -0
  64. package/dist/commands/sync.d.ts.map +1 -0
  65. package/dist/commands/sync.js +114 -0
  66. package/dist/commands/sync.js.map +1 -0
  67. package/dist/commands/validate.d.ts +20 -0
  68. package/dist/commands/validate.d.ts.map +1 -0
  69. package/dist/commands/validate.js +199 -0
  70. package/dist/commands/validate.js.map +1 -0
  71. package/dist/config/index.d.ts +102 -0
  72. package/dist/config/index.d.ts.map +1 -0
  73. package/dist/config/index.js +205 -0
  74. package/dist/config/index.js.map +1 -0
  75. package/dist/index.d.ts +18 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +163 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/mock-data/entities.aui.json +38 -0
  80. package/dist/mock-data/general_settings.aui.json +11 -0
  81. package/dist/mock-data/integrations.aui.json +806 -0
  82. package/dist/mock-data/parameters.aui.json +586 -0
  83. package/dist/mock-data/rules.aui.json +506 -0
  84. package/dist/mock-data/tools/conversation_forwarding.aui.json +32 -0
  85. package/dist/mock-data/tools/create_fraud_dispute.aui.json +112 -0
  86. package/dist/mock-data/tools/generative_ai.aui.json +29 -0
  87. package/dist/mock-data/tools/policies.aui.json +45 -0
  88. package/dist/mock-data/tools/transaction_and_card_details.aui.json +87 -0
  89. package/dist/mock-data/tools/transaction_search.aui.json +76 -0
  90. package/dist/mock-data/tools/update_credit_card_status.aui.json +45 -0
  91. package/dist/mock-data/tools/user_details.aui.json +57 -0
  92. package/dist/mock-data/tools/web_search.aui.json +54 -0
  93. package/dist/schema/aui.schema.json +418 -0
  94. package/dist/types/agent.d.ts +91 -0
  95. package/dist/types/agent.d.ts.map +1 -0
  96. package/dist/types/agent.js +9 -0
  97. package/dist/types/agent.js.map +1 -0
  98. package/dist/types/base.d.ts +15 -0
  99. package/dist/types/base.d.ts.map +1 -0
  100. package/dist/types/base.js +7 -0
  101. package/dist/types/base.js.map +1 -0
  102. package/dist/types/entity.d.ts +25 -0
  103. package/dist/types/entity.d.ts.map +1 -0
  104. package/dist/types/entity.js +9 -0
  105. package/dist/types/entity.js.map +1 -0
  106. package/dist/types/index.d.ts +11 -0
  107. package/dist/types/index.d.ts.map +1 -0
  108. package/dist/types/index.js +27 -0
  109. package/dist/types/index.js.map +1 -0
  110. package/dist/types/integration.d.ts +151 -0
  111. package/dist/types/integration.d.ts.map +1 -0
  112. package/dist/types/integration.js +9 -0
  113. package/dist/types/integration.js.map +1 -0
  114. package/dist/types/parameter.d.ts +38 -0
  115. package/dist/types/parameter.d.ts.map +1 -0
  116. package/dist/types/parameter.js +10 -0
  117. package/dist/types/parameter.js.map +1 -0
  118. package/dist/types/rule.d.ts +125 -0
  119. package/dist/types/rule.d.ts.map +1 -0
  120. package/dist/types/rule.js +10 -0
  121. package/dist/types/rule.js.map +1 -0
  122. package/dist/types/tool.d.ts +95 -0
  123. package/dist/types/tool.d.ts.map +1 -0
  124. package/dist/types/tool.js +12 -0
  125. package/dist/types/tool.js.map +1 -0
  126. package/dist/utils/index.d.ts +47 -0
  127. package/dist/utils/index.d.ts.map +1 -0
  128. package/dist/utils/index.js +267 -0
  129. package/dist/utils/index.js.map +1 -0
  130. package/package.json +56 -0
@@ -0,0 +1,151 @@
1
+ /**
2
+ * Integration types for AUI Agent Builder
3
+ *
4
+ * Integrations define API connections, RAG knowledge bases, MCP servers,
5
+ * and other external services that tools can invoke.
6
+ */
7
+ import { IntegrationType, HttpMethod, AuthType, ValueSource } from './base';
8
+ /**
9
+ * Authentication configuration for an endpoint
10
+ */
11
+ export interface EndpointAuth {
12
+ /** Authentication method */
13
+ type: AuthType;
14
+ /** Bearer token value or env var reference (e.g. "$MY_TOKEN") */
15
+ token?: string;
16
+ /** API key value or env var reference */
17
+ apiKey?: string;
18
+ /** Custom header name for API key auth */
19
+ headerName?: string;
20
+ /** Username for basic auth */
21
+ username?: string;
22
+ /** Password for basic auth */
23
+ password?: string;
24
+ }
25
+ /**
26
+ * HTTP endpoint configuration
27
+ */
28
+ export interface Endpoint {
29
+ /** URL template - supports {{param}} placeholders (e.g. "https://api.example.com/users/{{id}}") */
30
+ url: string;
31
+ /** HTTP method */
32
+ method: HttpMethod;
33
+ /** Authentication configuration */
34
+ authentication?: EndpointAuth;
35
+ /** Additional headers */
36
+ headers?: Record<string, string>;
37
+ }
38
+ /**
39
+ * A field in the API request schema.
40
+ * Defines what data the integration needs and where it comes from.
41
+ */
42
+ export interface RequestSchemaField {
43
+ /** Field name in the API request */
44
+ key: string;
45
+ /** Whether this field is required */
46
+ required: boolean;
47
+ /** Description of what this field is for */
48
+ description: string;
49
+ /** Data type */
50
+ type: 'STRING' | 'NUMBER' | 'BOOLEAN' | 'ENUM' | 'OBJECT' | 'ARRAY';
51
+ /** Where the value comes from */
52
+ value_source: ValueSource;
53
+ /** Parameter codes to pull value from (for user_profile, context, entities sources) */
54
+ params: string[];
55
+ /** Entity codes to pull value from (for entities source) */
56
+ entities: string[];
57
+ /** Allowed values (for ENUM type) */
58
+ values: string[];
59
+ /** Default value (for default source) */
60
+ default_value: string;
61
+ }
62
+ /**
63
+ * A single field mapping from API response to a parameter
64
+ */
65
+ export interface ResponseFieldMapping {
66
+ /** JSON path keys to the value in the response */
67
+ key: string[];
68
+ /** Human-readable label */
69
+ label: string;
70
+ /** Parameter code to map to */
71
+ param: string;
72
+ /** Whether to show this to the user */
73
+ show: boolean;
74
+ /** Example value from response */
75
+ sample?: unknown;
76
+ }
77
+ /**
78
+ * A group of response mappings (maps response data to an entity)
79
+ */
80
+ export interface ResponseMappingGroup {
81
+ /** Name of the mapping group (usually entity name) */
82
+ name: string;
83
+ /** JSON path prefixes */
84
+ paths: string[];
85
+ /** Field mappings */
86
+ mappings: ResponseFieldMapping[];
87
+ }
88
+ /**
89
+ * Response mapping configuration.
90
+ * Maps API response fields to AUI parameters.
91
+ */
92
+ export interface ResponseMapping {
93
+ [category: string]: ResponseMappingGroup[];
94
+ }
95
+ /**
96
+ * RAG (Retrieval Augmented Generation) settings
97
+ */
98
+ export interface RAGSettings {
99
+ /** Number of top results from search */
100
+ search_top_k: number;
101
+ /** Number of results after reranking */
102
+ ranker_top_k: number;
103
+ /** Reranker model (null for default) */
104
+ ranker_model: string | null;
105
+ /** Minimum confidence threshold */
106
+ confidence_threshold: number;
107
+ /** Knowledge base identifier */
108
+ knowledge_base_id: string;
109
+ /** Parent knowledge base IDs */
110
+ parent_knowledge_base_ids: string[];
111
+ /** Whether to allow multiple RAG calls */
112
+ allow_multiple_calls: boolean;
113
+ /** Placeholder values for RAG queries */
114
+ placeholders: string[];
115
+ }
116
+ /**
117
+ * API integration settings
118
+ */
119
+ export interface APIIntegrationSettings {
120
+ /** HTTP endpoint configuration */
121
+ endpoint: Endpoint | null;
122
+ /** Request schema fields */
123
+ request_schema: RequestSchemaField[];
124
+ /** Response mapping (auto-generated after test_curl execution) */
125
+ response_mapping: ResponseMapping;
126
+ /** Curl command for testing the integration */
127
+ test_curl?: string;
128
+ /** Guidelines for query construction */
129
+ query_guidelines?: string;
130
+ }
131
+ /**
132
+ * Full integration definition
133
+ */
134
+ export interface Integration {
135
+ /** Integration type */
136
+ type: IntegrationType;
137
+ /** Unique code identifier (kebab-case) */
138
+ code: string;
139
+ /** API integration settings (when type is "API") */
140
+ settings?: APIIntegrationSettings | RAGSettings;
141
+ /** Description of what this integration does */
142
+ description?: string;
143
+ }
144
+ /**
145
+ * Integrations file structure (integrations.aui.json)
146
+ */
147
+ export interface IntegrationsFile {
148
+ $schema?: string;
149
+ integrations: Integration[];
150
+ }
151
+ //# sourceMappingURL=integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../src/types/integration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,4BAA4B;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,mGAAmG;IACnG,GAAG,EAAE,MAAM,CAAC;IACZ,kBAAkB;IAClB,MAAM,EAAE,UAAU,CAAC;IACnB,mCAAmC;IACnC,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,oCAAoC;IACpC,GAAG,EAAE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nC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gCAAgC;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gCAAgC;IAChC,yBAAyB,EAAE,MAAM,EAAE,CAAC;IACpC,0CAA0C;IAC1C,oBAAoB,EAAE,OAAO,CAAC;IAC9B,yCAAyC;IACzC,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,kCAAkC;IAClC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,4BAA4B;IAC5B,cAAc,EAAE,kBAAkB,EAAE,CAAC;IACrC,kEAAkE;IAClE,gBAAgB,EAAE,eAAe,CAAC;IAClC,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,uBAAuB;IACvB,IAAI,EAAE,eAAe,CAAC;IACtB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,QAAQ,CAAC,EAAE,sBAAsB,GAAG,WAAW,CAAC;IAChD,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * Integration types for AUI Agent Builder
4
+ *
5
+ * Integrations define API connections, RAG knowledge bases, MCP servers,
6
+ * and other external services that tools can invoke.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ //# sourceMappingURL=integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.js","sourceRoot":"","sources":["../../src/types/integration.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Parameter types for AUI Agent Builder
3
+ *
4
+ * Parameters are the fundamental data units in AUI.
5
+ * They represent pieces of information the agent needs to collect,
6
+ * track, or output during conversations.
7
+ */
8
+ import { ParameterType, UsageType } from './base';
9
+ /**
10
+ * A parameter definition.
11
+ *
12
+ * Parameters are referenced by their `code` (kebab-case identifier) across
13
+ * entities, tools, integrations, and rules.
14
+ */
15
+ export interface Parameter {
16
+ /** Unique identifier (kebab-case, e.g. "transaction-id") */
17
+ code: string;
18
+ /** Human-readable description - also serves as extraction guidance for the LLM */
19
+ description: string;
20
+ /** Data type */
21
+ type: ParameterType;
22
+ /** Whether this is an input, output, or both */
23
+ usage: UsageType;
24
+ /** Allowed values (for enum types) */
25
+ values?: string[];
26
+ /** Nested parameter codes (for object/list_of_objects types) */
27
+ nested_params?: string[];
28
+ /** Question to ask when collecting this parameter */
29
+ question?: string;
30
+ }
31
+ /**
32
+ * Parameters file structure (parameters.aui.json)
33
+ */
34
+ export interface ParametersFile {
35
+ $schema?: string;
36
+ parameters: Parameter[];
37
+ }
38
+ //# sourceMappingURL=parameter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameter.d.ts","sourceRoot":"","sources":["../../src/types/parameter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,kFAAkF;IAClF,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB;IAChB,IAAI,EAAE,aAAa,CAAC;IACpB,gDAAgD;IAChD,KAAK,EAAE,SAAS,CAAC;IACjB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,gEAAgE;IAChE,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * Parameter types for AUI Agent Builder
4
+ *
5
+ * Parameters are the fundamental data units in AUI.
6
+ * They represent pieces of information the agent needs to collect,
7
+ * track, or output during conversations.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ //# sourceMappingURL=parameter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../src/types/parameter.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Rule types for AUI Agent Builder
3
+ *
4
+ * Rules define conditional logic that controls agent behavior:
5
+ * - Pre-rules: Constraints, required parameters, missing info checks
6
+ * - Post-rules (summary): Success/fail handling after integration execution
7
+ */
8
+ import { WhenMethod, OperatorType, ThenAction } from './base';
9
+ /**
10
+ * A single WHEN condition
11
+ */
12
+ export interface Condition {
13
+ /** The method/check to evaluate */
14
+ method?: WhenMethod;
15
+ /** Parameter codes to check */
16
+ params?: string[];
17
+ /** Comparison operator */
18
+ operation?: OperatorType;
19
+ /** Value to compare against */
20
+ value?: string | number | boolean;
21
+ }
22
+ /**
23
+ * Group of conditions supporting AND/OR/NOT nesting
24
+ */
25
+ export interface ConditionGroup {
26
+ /** All conditions must be true (AND) */
27
+ all?: (Condition | ConditionGroup)[];
28
+ /** Any condition must be true (OR) */
29
+ any?: (Condition | ConditionGroup)[];
30
+ /** Negate a condition (NOT) */
31
+ not?: Condition | ConditionGroup;
32
+ /** Shortcut: single condition method (for simple triggers) */
33
+ method?: WhenMethod;
34
+ /** Shortcut: operation for simple conditions */
35
+ operation?: OperatorType;
36
+ /** Shortcut: value for simple conditions */
37
+ value?: string;
38
+ }
39
+ /**
40
+ * THEN clause for tool activation settings
41
+ */
42
+ export interface ToolActivationSettings {
43
+ tools: Array<{
44
+ name: string;
45
+ description: string;
46
+ guidelines?: string | null;
47
+ }>;
48
+ }
49
+ /**
50
+ * THEN action clause
51
+ */
52
+ export interface RuleThen {
53
+ /** Action to take */
54
+ action?: ThenAction;
55
+ /** Message to display or instruction for the LLM */
56
+ message?: string;
57
+ /** Parameters to require */
58
+ params?: {
59
+ mandatory?: string[];
60
+ optional?: string[];
61
+ };
62
+ /** Tool activation settings */
63
+ settings?: ToolActivationSettings;
64
+ }
65
+ /**
66
+ * A complete rule definition
67
+ */
68
+ export interface Rule {
69
+ /** Human-readable description */
70
+ description?: string | null;
71
+ /** WHEN conditions */
72
+ when: ConditionGroup;
73
+ /** THEN action */
74
+ then: RuleThen;
75
+ }
76
+ /**
77
+ * Pre-execution rules (before integration call)
78
+ */
79
+ export interface PreRules {
80
+ /** Constraint rules that block execution */
81
+ constraint?: Rule[];
82
+ /** Rules that dynamically require parameters */
83
+ required_parameters?: Rule[];
84
+ /** Rules that check for missing info */
85
+ missing_info?: Rule[];
86
+ }
87
+ /**
88
+ * Post-execution / summary rules
89
+ */
90
+ export interface SummaryRules {
91
+ /** Rules for successful integration responses */
92
+ success?: Rule[];
93
+ /** Rules for failed integration responses */
94
+ fail?: Rule[];
95
+ /** Rules for missing information after execution */
96
+ missing_info?: Rule[];
97
+ }
98
+ /**
99
+ * Tool-level rules
100
+ */
101
+ export interface ToolRules {
102
+ /** Pre-execution rules */
103
+ pre?: PreRules;
104
+ /** Post-execution / summary rules */
105
+ summary?: SummaryRules;
106
+ }
107
+ /**
108
+ * Global rules (applies across tools, scoped by applies_to)
109
+ */
110
+ export interface GlobalRule extends Rule {
111
+ /** Tool codes this rule applies to (empty = all tools) */
112
+ applies_to?: string[];
113
+ }
114
+ /**
115
+ * Global rules file structure (rules.aui.json)
116
+ */
117
+ export interface RulesFile {
118
+ $schema?: string;
119
+ rules: {
120
+ pre?: {
121
+ constraint?: GlobalRule[];
122
+ };
123
+ };
124
+ }
125
+ //# sourceMappingURL=rule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../src/types/rule.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,mCAAmC;IACnC,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,GAAG,CAAC,EAAE,CAAC,SAAS,GAAG,cAAc,CAAC,EAAE,CAAC;IACrC,sCAAsC;IACtC,GAAG,CAAC,EAAE,CAAC,SAAS,GAAG,cAAc,CAAC,EAAE,CAAC;IACrC,+BAA+B;IAC/B,GAAG,CAAC,EAAE,SAAS,GAAG,cAAc,CAAC;IACjC,8DAA8D;IAC9D,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,gDAAgD;IAChD,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B,CAAC,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,qBAAqB;IACrB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,oDAAoD;IACpD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AC,EAAE,UAAU,EAAE,CAAC;SAC3B,CAAC;KACH,CAAC;CACH"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * Rule types for AUI Agent Builder
4
+ *
5
+ * Rules define conditional logic that controls agent behavior:
6
+ * - Pre-rules: Constraints, required parameters, missing info checks
7
+ * - Post-rules (summary): Success/fail handling after integration execution
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ //# sourceMappingURL=rule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule.js","sourceRoot":"","sources":["../../src/types/rule.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Tool types for AUI Agent Builder
3
+ *
4
+ * Tools are the primary capabilities of an agent. Each tool defines:
5
+ * - When it activates (triggers/objective)
6
+ * - What parameters it needs (required/optional)
7
+ * - What integrations it calls (in order)
8
+ * - Rules for pre/post execution behavior
9
+ */
10
+ import { ConditionGroup, ToolRules } from './rule';
11
+ /**
12
+ * Integration reference within a tool
13
+ */
14
+ export interface ToolIntegrationRef {
15
+ /** Integration code (from integrations.aui.json) */
16
+ code: string;
17
+ }
18
+ /**
19
+ * Trigger configuration
20
+ */
21
+ export interface ToolTrigger {
22
+ when: ConditionGroup;
23
+ }
24
+ /**
25
+ * Tool parameter configuration
26
+ *
27
+ * Required params can be:
28
+ * - A string: that single parameter is required
29
+ * - An array of strings: OR group - at least one must be provided
30
+ *
31
+ * @example
32
+ * required: ["dispute-reason", ["email", "phone"]]
33
+ * // dispute-reason is always required
34
+ * // PLUS either email OR phone must be provided
35
+ */
36
+ export interface ToolParams {
37
+ /** Required parameters (strings or OR-groups as arrays) */
38
+ required: Array<string | string[]>;
39
+ /** Optional parameters */
40
+ optional: string[];
41
+ }
42
+ /**
43
+ * Tool config (triggers + params)
44
+ */
45
+ export interface ToolConfig {
46
+ /** Trigger conditions */
47
+ triggers: ToolTrigger;
48
+ /** Parameter requirements */
49
+ params: ToolParams;
50
+ }
51
+ /**
52
+ * Available context for a tool (entities it can reference)
53
+ */
54
+ export interface ToolAvailableContext {
55
+ entities: string[];
56
+ }
57
+ /**
58
+ * Complete tool definition
59
+ */
60
+ export interface Tool {
61
+ /** Unique identifier (SCREAMING_SNAKE_CASE, e.g. "CREATE_FRAUD_DISPUTE") */
62
+ code: string;
63
+ /** When this tool should activate - natural language description */
64
+ objective: string;
65
+ /** Whether this tool is enabled */
66
+ status: boolean;
67
+ /** Whether the agent can activate this directly (true) or only via triggers/other tools (false) */
68
+ main_tool: boolean;
69
+ /** Whether to ask user for confirmation before executing */
70
+ requires_confirmation: boolean;
71
+ /** Response display type */
72
+ response_type: 'text' | 'text_and_widget';
73
+ /** Response brevity preference */
74
+ brevity: string;
75
+ /** Override agent tone for this tool */
76
+ tone_of_voice: string;
77
+ /** Tool configuration (triggers and params) */
78
+ config: ToolConfig;
79
+ /** Ordered list of integrations to execute */
80
+ integrations: ToolIntegrationRef[];
81
+ /** Available context entities */
82
+ available_context?: ToolAvailableContext;
83
+ /** LLM model override for this tool */
84
+ summary_model?: string;
85
+ /** Tool rules (pre and post/summary) */
86
+ rules: ToolRules;
87
+ }
88
+ /**
89
+ * Tool file structure (tools/*.aui.json)
90
+ */
91
+ export interface ToolFile {
92
+ $schema?: string;
93
+ tool: Tool;
94
+ }
95
+ //# sourceMappingURL=tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/types/tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,UAAU;IACz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defines:
6
+ * - When it activates (triggers/objective)
7
+ * - What parameters it needs (required/optional)
8
+ * - What integrations it calls (in order)
9
+ * - Rules for pre/post execution behavior
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ //# sourceMappingURL=tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool.js","sourceRoot":"","sources":["../../src/types/tool.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Utility functions for AUI Agent Builder
3
+ */
4
+ import { AgentExport } from '../types';
5
+ /**
6
+ * Find all .aui.json files in a directory
7
+ */
8
+ export declare function findAuiFiles(dir: string): Promise<string[]>;
9
+ /**
10
+ * Parse a single .aui.json file
11
+ */
12
+ export declare function parseAuiFile(filePath: string): Record<string, unknown> | null;
13
+ /**
14
+ * Read all agent files from a project directory and build an AgentExport
15
+ */
16
+ export declare function readAgentFiles(projectDir: string): Promise<AgentExport>;
17
+ /**
18
+ * Write agent export data as files to a directory
19
+ */
20
+ export declare function writeAgentFiles(projectDir: string, data: AgentExport): Promise<string[]>;
21
+ /**
22
+ * Write JSON to a file with pretty formatting
23
+ */
24
+ export declare function writeJsonFile(filePath: string, data: unknown): void;
25
+ export interface ValidationIssue {
26
+ type: 'error' | 'warning';
27
+ file?: string;
28
+ path?: string;
29
+ message: string;
30
+ }
31
+ /**
32
+ * Validate cross-file references (parameters referenced in entities, tools, etc.)
33
+ */
34
+ export declare function validateReferences(data: AgentExport): ValidationIssue[];
35
+ /**
36
+ * Format a relative time string
37
+ */
38
+ export declare function formatRelativeTime(iso: string): string;
39
+ /**
40
+ * Convert a string to kebab-case
41
+ */
42
+ export declare function toKebabCase(str: string): string;
43
+ /**
44
+ * Convert a string to SCREAMING_SNAKE_CASE
45
+ */
46
+ export declare function toScreamingSnakeCase(str: string): string;
47
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAML,WAAW,EACZ,MAAM,UAAU,CAAC;AAIlB;;GAEG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAMjE;AAID;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAO7E;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAmC7E;AAID;;GAEG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA2D9F;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAEnE;AAID,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,EAAE,CA8DvE;AAID;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQtD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAK/C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKxD"}