@almadar/integrations 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{factory-rMujCO3M.d.ts → BaseIntegration-DNSuiUnG.d.ts} +1 -33
- package/dist/factory-B1QtCI_c.d.ts +37 -0
- package/dist/index.d.ts +5 -59
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/github/index.d.ts +326 -0
- package/dist/integrations/github/index.js +756 -0
- package/dist/integrations/github/index.js.map +1 -0
- package/dist/mocks/index.d.ts +2 -1
- package/dist/mocks/index.js.map +1 -1
- package/dist/runtime/index.d.ts +2 -1
- package/dist/runtime/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -124,36 +124,4 @@ declare abstract class BaseIntegration {
|
|
|
124
124
|
protected executeWithRetry<T>(fn: () => Promise<T>): Promise<T>;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
* Factory for creating and managing integration instances
|
|
129
|
-
*/
|
|
130
|
-
declare class IntegrationFactory {
|
|
131
|
-
private instances;
|
|
132
|
-
private configs;
|
|
133
|
-
/**
|
|
134
|
-
* Configure an integration (doesn't instantiate yet)
|
|
135
|
-
*/
|
|
136
|
-
configure(name: string, config: Omit<IntegrationConfig, 'name'>): void;
|
|
137
|
-
/**
|
|
138
|
-
* Get or create an integration instance
|
|
139
|
-
*/
|
|
140
|
-
get(name: string): BaseIntegration;
|
|
141
|
-
/**
|
|
142
|
-
* Execute an action on an integration
|
|
143
|
-
*/
|
|
144
|
-
execute(integration: string, action: string, params: Record<string, unknown>): Promise<IntegrationResult>;
|
|
145
|
-
/**
|
|
146
|
-
* Check if integration is configured
|
|
147
|
-
*/
|
|
148
|
-
isConfigured(name: string): boolean;
|
|
149
|
-
/**
|
|
150
|
-
* Clear all instances (useful for testing)
|
|
151
|
-
*/
|
|
152
|
-
clear(): void;
|
|
153
|
-
/**
|
|
154
|
-
* Clear all instances and configs
|
|
155
|
-
*/
|
|
156
|
-
reset(): void;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export { BaseIntegration as B, type IntegrationLogger as I, type ValidationError as V, type IntegrationErrorCode as a, type IntegrationConfig as b, type IntegrationResult as c, IntegrationError as d, IntegrationFactory as e, type ValidationResult as f, validateParams as v };
|
|
127
|
+
export { BaseIntegration as B, type IntegrationLogger as I, type ValidationError as V, type IntegrationErrorCode as a, type IntegrationConfig as b, type IntegrationResult as c, IntegrationError as d, type ValidationResult as e, validateParams as v };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { b as IntegrationConfig, B as BaseIntegration, c as IntegrationResult } from './BaseIntegration-DNSuiUnG.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Factory for creating and managing integration instances
|
|
5
|
+
*/
|
|
6
|
+
declare class IntegrationFactory {
|
|
7
|
+
private instances;
|
|
8
|
+
private configs;
|
|
9
|
+
/**
|
|
10
|
+
* Configure an integration (doesn't instantiate yet)
|
|
11
|
+
*/
|
|
12
|
+
configure(name: string, config: Omit<IntegrationConfig, 'name'>): void;
|
|
13
|
+
/**
|
|
14
|
+
* Get or create an integration instance
|
|
15
|
+
*/
|
|
16
|
+
get(name: string): BaseIntegration;
|
|
17
|
+
/**
|
|
18
|
+
* Execute an action on an integration
|
|
19
|
+
*/
|
|
20
|
+
execute(integration: string, action: string, params: Record<string, unknown>): Promise<IntegrationResult>;
|
|
21
|
+
/**
|
|
22
|
+
* Check if integration is configured
|
|
23
|
+
*/
|
|
24
|
+
isConfigured(name: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Clear all instances (useful for testing)
|
|
27
|
+
*/
|
|
28
|
+
clear(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Clear all instances and configs
|
|
31
|
+
*/
|
|
32
|
+
reset(): void;
|
|
33
|
+
}
|
|
34
|
+
declare function getIntegrationFactory(): IntegrationFactory;
|
|
35
|
+
declare function resetIntegrationFactory(): void;
|
|
36
|
+
|
|
37
|
+
export { IntegrationFactory as I, getIntegrationFactory as g, resetIntegrationFactory as r };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { I as IntegrationLogger, a as IntegrationErrorCode, b as IntegrationConfig, B as BaseIntegration, c as IntegrationResult } from './
|
|
2
|
-
export { d as IntegrationError,
|
|
1
|
+
import { I as IntegrationLogger, a as IntegrationErrorCode, b as IntegrationConfig, B as BaseIntegration, c as IntegrationResult } from './BaseIntegration-DNSuiUnG.js';
|
|
2
|
+
export { d as IntegrationError, V as ValidationError, e as ValidationResult, v as validateParams } from './BaseIntegration-DNSuiUnG.js';
|
|
3
|
+
export { I as IntegrationFactory, g as getIntegrationFactory, r as resetIntegrationFactory } from './factory-B1QtCI_c.js';
|
|
4
|
+
export { GitHubIntegration } from './integrations/github/index.js';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Console-based logger implementation
|
|
@@ -140,62 +142,6 @@ declare class DeepAgentIntegration extends BaseIntegration {
|
|
|
140
142
|
private request;
|
|
141
143
|
}
|
|
142
144
|
|
|
143
|
-
/**
|
|
144
|
-
* GitHub Integration for Almadar
|
|
145
|
-
* Provides git operations and GitHub API access for the agent
|
|
146
|
-
*/
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* GitHub integration class
|
|
150
|
-
*/
|
|
151
|
-
declare class GitHubIntegration extends BaseIntegration {
|
|
152
|
-
private token;
|
|
153
|
-
private owner;
|
|
154
|
-
private repo;
|
|
155
|
-
private workDir;
|
|
156
|
-
constructor(config: IntegrationConfig);
|
|
157
|
-
/**
|
|
158
|
-
* Execute a GitHub action
|
|
159
|
-
*/
|
|
160
|
-
execute(action: string, params: Record<string, unknown>): Promise<IntegrationResult>;
|
|
161
|
-
/**
|
|
162
|
-
* Clone a repository
|
|
163
|
-
*/
|
|
164
|
-
private cloneRepo;
|
|
165
|
-
/**
|
|
166
|
-
* Create a branch
|
|
167
|
-
*/
|
|
168
|
-
private createBranch;
|
|
169
|
-
/**
|
|
170
|
-
* Commit changes
|
|
171
|
-
*/
|
|
172
|
-
private commit;
|
|
173
|
-
/**
|
|
174
|
-
* Push branch
|
|
175
|
-
*/
|
|
176
|
-
private push;
|
|
177
|
-
/**
|
|
178
|
-
* Create a pull request
|
|
179
|
-
*/
|
|
180
|
-
private createPR;
|
|
181
|
-
/**
|
|
182
|
-
* Get PR comments
|
|
183
|
-
*/
|
|
184
|
-
private getPRComments;
|
|
185
|
-
/**
|
|
186
|
-
* List issues
|
|
187
|
-
*/
|
|
188
|
-
private listIssues;
|
|
189
|
-
/**
|
|
190
|
-
* Get issue details
|
|
191
|
-
*/
|
|
192
|
-
private getIssue;
|
|
193
|
-
/**
|
|
194
|
-
* Get API config for GitHub API calls
|
|
195
|
-
*/
|
|
196
|
-
private getAPIConfig;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
145
|
/**
|
|
200
146
|
* CLI integration for Almadar CLI commands.
|
|
201
147
|
*
|
|
@@ -365,4 +311,4 @@ declare class DockerIntegration extends BaseIntegration {
|
|
|
365
311
|
private list;
|
|
366
312
|
}
|
|
367
313
|
|
|
368
|
-
export { BaseIntegration, CLIIntegration, ConsoleLogger, DeepAgentIntegration, DockerIntegration, EmailIntegration,
|
|
314
|
+
export { BaseIntegration, CLIIntegration, ConsoleLogger, DeepAgentIntegration, DockerIntegration, EmailIntegration, IntegrationConfig, type IntegrationConstructor, IntegrationErrorCode, IntegrationLogger, IntegrationResult, LLMIntegration, OAuthIntegration, OtelIntegration, QueueIntegration, RedisIntegration, type RetryConfig, StorageIntegration, StripeIntegration, TwilioIntegration, YouTubeIntegration, getIntegration, getRegisteredIntegrations, isKnownIntegration, registerIntegration, withRetry };
|
package/dist/index.js
CHANGED
|
@@ -271,6 +271,17 @@ var IntegrationFactory = class {
|
|
|
271
271
|
this.configs.clear();
|
|
272
272
|
}
|
|
273
273
|
};
|
|
274
|
+
var _factory = null;
|
|
275
|
+
function getIntegrationFactory() {
|
|
276
|
+
if (!_factory) {
|
|
277
|
+
_factory = new IntegrationFactory();
|
|
278
|
+
}
|
|
279
|
+
return _factory;
|
|
280
|
+
}
|
|
281
|
+
function resetIntegrationFactory() {
|
|
282
|
+
_factory?.reset();
|
|
283
|
+
_factory = null;
|
|
284
|
+
}
|
|
274
285
|
var StripeIntegration = class extends BaseIntegration {
|
|
275
286
|
constructor(config) {
|
|
276
287
|
super(config);
|
|
@@ -2683,6 +2694,6 @@ var DockerIntegration = class extends BaseIntegration {
|
|
|
2683
2694
|
};
|
|
2684
2695
|
registerIntegration("docker", DockerIntegration);
|
|
2685
2696
|
|
|
2686
|
-
export { BaseIntegration, CLIIntegration, ConsoleLogger, DeepAgentIntegration, DockerIntegration, EmailIntegration, GitHubIntegration, IntegrationFactory, LLMIntegration, OAuthIntegration, OtelIntegration, QueueIntegration, RedisIntegration, StorageIntegration, StripeIntegration, TwilioIntegration, YouTubeIntegration, getIntegration, getRegisteredIntegrations, isKnownIntegration, registerIntegration, validateParams, withRetry };
|
|
2697
|
+
export { BaseIntegration, CLIIntegration, ConsoleLogger, DeepAgentIntegration, DockerIntegration, EmailIntegration, GitHubIntegration, IntegrationFactory, LLMIntegration, OAuthIntegration, OtelIntegration, QueueIntegration, RedisIntegration, StorageIntegration, StripeIntegration, TwilioIntegration, YouTubeIntegration, getIntegration, getIntegrationFactory, getRegisteredIntegrations, isKnownIntegration, registerIntegration, resetIntegrationFactory, validateParams, withRetry };
|
|
2687
2698
|
//# sourceMappingURL=index.js.map
|
|
2688
2699
|
//# sourceMappingURL=index.js.map
|