@almadar/integrations 1.0.15 → 2.0.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.
- package/LICENSE +21 -72
- package/dist/index.d.ts +155 -1
- package/dist/index.js +1224 -1
- package/dist/index.js.map +1 -1
- package/package.json +11 -6
package/LICENSE
CHANGED
|
@@ -1,72 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
23
|
-
available distribution of a specific version of the Licensed Work under this
|
|
24
|
-
License, whichever comes first, the Licensor hereby grants you rights under
|
|
25
|
-
the terms of the Change License, and the rights granted in the paragraph
|
|
26
|
-
above terminate.
|
|
27
|
-
|
|
28
|
-
If your use of the Licensed Work does not comply with the requirements
|
|
29
|
-
currently in effect as described in this License, you must purchase a
|
|
30
|
-
commercial license from the Licensor, its affiliated entities, or authorized
|
|
31
|
-
resellers, or you must refrain from using the Licensed Work.
|
|
32
|
-
|
|
33
|
-
All copies of the original and modified Licensed Work, and derivative works
|
|
34
|
-
of the Licensed Work, are subject to this License. This License applies
|
|
35
|
-
separately for each version of the Licensed Work and the Change Date may vary
|
|
36
|
-
for each version of the Licensed Work released by Licensor.
|
|
37
|
-
|
|
38
|
-
You must conspicuously display this License on each original or modified copy
|
|
39
|
-
of the Licensed Work. If you receive the Licensed Work in original or
|
|
40
|
-
modified form from a third party, the terms and conditions set forth in this
|
|
41
|
-
License apply to your use of that work.
|
|
42
|
-
|
|
43
|
-
Any use of the Licensed Work in violation of this License will automatically
|
|
44
|
-
terminate your rights under this License for the current and all other
|
|
45
|
-
versions of the Licensed Work.
|
|
46
|
-
|
|
47
|
-
This License does not grant you any right in any trademark or logo of
|
|
48
|
-
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
49
|
-
Licensor as expressly required by this License).
|
|
50
|
-
|
|
51
|
-
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
52
|
-
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
53
|
-
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
54
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
55
|
-
TITLE.
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
|
|
60
|
-
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
61
|
-
|
|
62
|
-
ADDITIONAL TERMS:
|
|
63
|
-
|
|
64
|
-
Documentation (builder/packages/website/docs/) is licensed under CC BY 4.0.
|
|
65
|
-
|
|
66
|
-
TRADEMARKS:
|
|
67
|
-
|
|
68
|
-
"Orbital", "KFlow", "Almadar", and the Almadar logo are trademarks of
|
|
69
|
-
Almadar FZE. You may not use these trademarks without prior written
|
|
70
|
-
permission from Almadar FZE.
|
|
71
|
-
|
|
72
|
-
For licensing inquiries: licensing@almadar.io
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Almadar Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
CHANGED
|
@@ -211,4 +211,158 @@ declare class CLIIntegration extends BaseIntegration {
|
|
|
211
211
|
private validate;
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
|
|
214
|
+
/**
|
|
215
|
+
* Redis / Cache integration with in-memory default backend.
|
|
216
|
+
*
|
|
217
|
+
* When `REDIS_URL` is provided in `config.env`, a warning is logged and the
|
|
218
|
+
* integration falls back to the in-memory store (real Redis client support is
|
|
219
|
+
* not yet implemented). When `REDIS_URL` is absent the in-memory store is
|
|
220
|
+
* used silently — this is the expected development mode.
|
|
221
|
+
*/
|
|
222
|
+
declare class RedisIntegration extends BaseIntegration {
|
|
223
|
+
private store;
|
|
224
|
+
private locks;
|
|
225
|
+
private channels;
|
|
226
|
+
constructor(config: IntegrationConfig);
|
|
227
|
+
execute(action: string, params: Record<string, unknown>): Promise<IntegrationResult>;
|
|
228
|
+
/** Remove expired entries on access and return whether a key is alive. */
|
|
229
|
+
private isAlive;
|
|
230
|
+
/** Generate a unique lock identifier. */
|
|
231
|
+
private generateLockId;
|
|
232
|
+
private getKey;
|
|
233
|
+
private setKey;
|
|
234
|
+
private deleteKey;
|
|
235
|
+
private acquireLock;
|
|
236
|
+
private releaseLock;
|
|
237
|
+
private incrementKey;
|
|
238
|
+
private expireKey;
|
|
239
|
+
private publishMessage;
|
|
240
|
+
private subscribeChannel;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Queue integration with in-memory backend.
|
|
245
|
+
*
|
|
246
|
+
* Provides job queue semantics: enqueue, dequeue, status tracking,
|
|
247
|
+
* completion, failure, cancellation, and size queries.
|
|
248
|
+
*/
|
|
249
|
+
declare class QueueIntegration extends BaseIntegration {
|
|
250
|
+
/** Map from queue name to ordered list of job IDs */
|
|
251
|
+
private queues;
|
|
252
|
+
/** Map from job ID to job data */
|
|
253
|
+
private jobs;
|
|
254
|
+
constructor(config: IntegrationConfig);
|
|
255
|
+
execute(action: string, params: Record<string, unknown>): Promise<IntegrationResult>;
|
|
256
|
+
/** Generate a unique job identifier. */
|
|
257
|
+
private generateJobId;
|
|
258
|
+
/** Get or create the queue array for a given queue name. */
|
|
259
|
+
private getQueue;
|
|
260
|
+
private enqueue;
|
|
261
|
+
private dequeue;
|
|
262
|
+
private status;
|
|
263
|
+
private complete;
|
|
264
|
+
private failJob;
|
|
265
|
+
private cancel;
|
|
266
|
+
private size;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* OpenTelemetry integration with in-memory backend.
|
|
271
|
+
*
|
|
272
|
+
* Tracks spans and metrics internally for development and testing purposes.
|
|
273
|
+
* No actual OpenTelemetry SDK dependency is required.
|
|
274
|
+
*/
|
|
275
|
+
declare class OtelIntegration extends BaseIntegration {
|
|
276
|
+
private spans;
|
|
277
|
+
private metrics;
|
|
278
|
+
constructor(config: IntegrationConfig);
|
|
279
|
+
execute(action: string, params: Record<string, unknown>): Promise<IntegrationResult>;
|
|
280
|
+
private startSpan;
|
|
281
|
+
private endSpan;
|
|
282
|
+
private addEvent;
|
|
283
|
+
private recordMetric;
|
|
284
|
+
private getSpan;
|
|
285
|
+
private getAllMetrics;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* OAuth2/OIDC integration with in-memory mock backend.
|
|
290
|
+
*
|
|
291
|
+
* This is a development/mock implementation. No actual OAuth library is used.
|
|
292
|
+
* State tokens, access tokens, and refresh tokens are generated in-memory and
|
|
293
|
+
* tracked via Maps. Useful for testing OAuth flows without external providers.
|
|
294
|
+
*/
|
|
295
|
+
declare class OAuthIntegration extends BaseIntegration {
|
|
296
|
+
/** Maps state token -> provider for pending authorization flows */
|
|
297
|
+
private states;
|
|
298
|
+
/** Maps access token -> token set */
|
|
299
|
+
private tokens;
|
|
300
|
+
/** Maps refresh token -> access token for refresh lookups */
|
|
301
|
+
private refreshIndex;
|
|
302
|
+
/** Maps access token -> mock user session */
|
|
303
|
+
private sessions;
|
|
304
|
+
constructor(config: IntegrationConfig);
|
|
305
|
+
execute(action: string, params: Record<string, unknown>): Promise<IntegrationResult>;
|
|
306
|
+
/** Generate a random hex token of the given byte length. */
|
|
307
|
+
private generateToken;
|
|
308
|
+
/** Generate a mock user profile from a provider and access token. */
|
|
309
|
+
private generateMockUser;
|
|
310
|
+
private authorize;
|
|
311
|
+
private token;
|
|
312
|
+
private refresh;
|
|
313
|
+
private revoke;
|
|
314
|
+
private userinfo;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Storage integration with in-memory backend for development/testing.
|
|
319
|
+
*
|
|
320
|
+
* Provides S3-compatible object storage operations (upload, download, list,
|
|
321
|
+
* delete, getSignedUrl) backed by an in-memory Map. No cloud SDK dependencies
|
|
322
|
+
* are required.
|
|
323
|
+
*/
|
|
324
|
+
declare class StorageIntegration extends BaseIntegration {
|
|
325
|
+
private objects;
|
|
326
|
+
constructor(config: IntegrationConfig);
|
|
327
|
+
execute(action: string, params: Record<string, unknown>): Promise<IntegrationResult>;
|
|
328
|
+
/** Build a composite key from bucket and object key. */
|
|
329
|
+
private compositeKey;
|
|
330
|
+
/** Generate a deterministic etag from content. */
|
|
331
|
+
private generateEtag;
|
|
332
|
+
/** Compute the byte size of content. */
|
|
333
|
+
private computeSize;
|
|
334
|
+
private upload;
|
|
335
|
+
private download;
|
|
336
|
+
private list;
|
|
337
|
+
private deleteObject;
|
|
338
|
+
private getSignedUrl;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Docker/Container integration with in-memory backend for development/testing.
|
|
343
|
+
*
|
|
344
|
+
* Provides container lifecycle operations (build, run, stop, remove, logs,
|
|
345
|
+
* status, list) backed by an in-memory Map. No Docker SDK or daemon connection
|
|
346
|
+
* is required.
|
|
347
|
+
*/
|
|
348
|
+
declare class DockerIntegration extends BaseIntegration {
|
|
349
|
+
private containers;
|
|
350
|
+
private images;
|
|
351
|
+
constructor(config: IntegrationConfig);
|
|
352
|
+
execute(action: string, params: Record<string, unknown>): Promise<IntegrationResult>;
|
|
353
|
+
/** Generate a random hex container/image ID. */
|
|
354
|
+
private generateId;
|
|
355
|
+
/** Find a container by ID (prefix match supported). */
|
|
356
|
+
private findContainer;
|
|
357
|
+
/** Generate realistic log lines for a container. */
|
|
358
|
+
private generateLogLines;
|
|
359
|
+
private build;
|
|
360
|
+
private run;
|
|
361
|
+
private stop;
|
|
362
|
+
private removeContainer;
|
|
363
|
+
private logs;
|
|
364
|
+
private status;
|
|
365
|
+
private list;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export { BaseIntegration, CLIIntegration, ConsoleLogger, DeepAgentIntegration, DockerIntegration, EmailIntegration, GitHubIntegration, IntegrationConfig, type IntegrationConstructor, IntegrationErrorCode, IntegrationLogger, IntegrationResult, LLMIntegration, OAuthIntegration, OtelIntegration, QueueIntegration, RedisIntegration, type RetryConfig, StorageIntegration, StripeIntegration, TwilioIntegration, YouTubeIntegration, getIntegration, getRegisteredIntegrations, isKnownIntegration, registerIntegration, withRetry };
|