@almadar/integrations 2.33.0 → 2.34.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.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { e as IntegrationLogger, c as IntegrationErrorCode, a as IntegrationConfig, B as BaseIntegration, d as IntegrationFactory, g as IntegrationParams, h as IntegrationResult, I as IntegrationCallContext } from './BaseIntegration-BYlbMFlf.js';
2
2
  export { b as IntegrationError, f as IntegrationParamValue, U as UnknownActionError, V as ValidationError, i as ValidationResult, j as getIntegrationFactory, r as resetIntegrationFactory, v as validateParams } from './BaseIntegration-BYlbMFlf.js';
3
- import { e as CredentialStore, d as CredentialPersistence, H as HookDeclaration } from './store-C5nb44iS.js';
4
- export { A as ArxivActions, C as CLIActions, a as CREDENTIAL_ENTITY_TYPE, b as CREDENTIAL_MASTER_KEY_ENV, c as CredentialEntry, D as DatabaseActions, f as DatabaseDriver, g as DatabaseQueryParamValue, h as DatabaseQueryParams, i as DatabaseQueryResult, j as DatabaseRow, k as DeepAgentActions, l as DockerActions, E as EmailActions, G as GitHubActions, I as IconifyActions, m as IntegrationActionName, n as IntegrationContracts, o as IntegrationName, L as LLMIntegrationActions, M as MLActions, O as OAuthActions, p as OtelActions, Q as QueueActions, R as RedisActions, S as StorageActions, q as StripeActions, T as TwilioActions, W as WebhookActions, r as WikimediaActions, Y as YouTubeActions, s as allCredentialEnvVars, t as declaredCredentialEnvVars, u as serviceHooks } from './store-C5nb44iS.js';
3
+ import { e as CredentialStore, d as CredentialPersistence, H as HookDeclaration } from './store-DaPuMedl.js';
4
+ export { A as ArxivActions, C as CLIActions, a as CREDENTIAL_ENTITY_TYPE, b as CREDENTIAL_MASTER_KEY_ENV, c as CredentialEntry, D as DatabaseActions, f as DatabaseDriver, g as DatabaseQueryParamValue, h as DatabaseQueryParams, i as DatabaseQueryResult, j as DatabaseRow, k as DeepAgentActions, l as DockerActions, E as EmailActions, G as GitHubActions, I as IconifyActions, m as IntegrationActionName, n as IntegrationContracts, o as IntegrationName, L as LLMIntegrationActions, M as MLActions, O as OAuthActions, p as OtelActions, Q as QueueActions, R as RedisActions, S as StorageActions, q as StripeActions, T as TwilioActions, W as WebhookActions, r as WikimediaActions, Y as YouTubeActions, s as allCredentialEnvVars, t as declaredCredentialEnvVars, u as serviceHooks } from './store-DaPuMedl.js';
5
5
  import { LogMeta, EntityRow, EventPayload } from '@almadar/core';
6
6
  export { GitHubIntegration } from './integrations/github/index.js';
7
7
 
@@ -1021,4 +1021,14 @@ declare class ArxivIntegration extends BaseIntegration {
1021
1021
  private search;
1022
1022
  }
1023
1023
 
1024
- export { AccountingIntegration, type AlmadarCheckoutSession, type AlmadarCustomer, type AlmadarInvoiceFailure, type AlmadarInvoicePayment, type AlmadarPortalSession, type AlmadarStripeEvent, type AlmadarStripeEventOk, type AlmadarSubscription, type AlmadarSubscriptionStatus, type AlmadarTier, ArxivIntegration, type ArxivResult, BankingIntegration, BaseIntegration, CLIIntegration, CREDENTIALS_FILE_ENV, CalendarIntegration, type CancelSubscriptionInput, ConsoleLogger, type CreateCheckoutInput, type CreateCustomerInput, type CreatePortalInput, CredentialPersistence, CredentialStore, CredentialsIntegration, DatabaseIntegration, DeepAgentIntegration, DockerIntegration, DriveIntegration, EmailIntegration, EsignIntegration, FileCredentialPersistence, HookDeclaration, type HookProviderInput, type HookProviderResult, IconifyIntegration, InMemoryPendingGrantStore, IntegrationCallContext, IntegrationConfig, type IntegrationConstructor, IntegrationErrorCode, IntegrationFactory, IntegrationLogger, IntegrationParams, IntegrationResult, LLMIntegration, MLIntegration, MetaAdsIntegration, OAuthIntegration, OtelIntegration, type PendingGrantStore, PushIntegration, QueueIntegration, RedisIntegration, type RegisteredHookProvider, type RetryConfig, type SqlGuardResult, StorageIntegration, StripeIntegration, type StripePriceMap, TwilioIntegration, type UpdateSubscriptionInput, type VerifyAndParseInput, WebhookIntegration, WikimediaIntegration, YouTubeIntegration, allHookDeclarations, assertReadOnlySelect, getActiveFactory, getInstalledCredentialStore, getIntegration, getRegisteredIntegrations, googleCalendarHookProvider, installActiveFactory, installCredentialStore, installPendingGrantStore, isKnownIntegration, parseCalendarPushNotification, registerIntegration, registeredHookProviders, resolveCredentialRef, uninstallCredentialStore, verifyAndParseStripeEvent, withRetry };
1024
+ declare class RiggerIntegration extends BaseIntegration {
1025
+ private readonly baseUrl;
1026
+ private readonly timeoutMs;
1027
+ constructor(config: IntegrationConfig);
1028
+ execute(action: string, params: IntegrationParams): Promise<IntegrationResult>;
1029
+ private health;
1030
+ private buildMesh;
1031
+ private render;
1032
+ }
1033
+
1034
+ export { AccountingIntegration, type AlmadarCheckoutSession, type AlmadarCustomer, type AlmadarInvoiceFailure, type AlmadarInvoicePayment, type AlmadarPortalSession, type AlmadarStripeEvent, type AlmadarStripeEventOk, type AlmadarSubscription, type AlmadarSubscriptionStatus, type AlmadarTier, ArxivIntegration, type ArxivResult, BankingIntegration, BaseIntegration, CLIIntegration, CREDENTIALS_FILE_ENV, CalendarIntegration, type CancelSubscriptionInput, ConsoleLogger, type CreateCheckoutInput, type CreateCustomerInput, type CreatePortalInput, CredentialPersistence, CredentialStore, CredentialsIntegration, DatabaseIntegration, DeepAgentIntegration, DockerIntegration, DriveIntegration, EmailIntegration, EsignIntegration, FileCredentialPersistence, HookDeclaration, type HookProviderInput, type HookProviderResult, IconifyIntegration, InMemoryPendingGrantStore, IntegrationCallContext, IntegrationConfig, type IntegrationConstructor, IntegrationErrorCode, IntegrationFactory, IntegrationLogger, IntegrationParams, IntegrationResult, LLMIntegration, MLIntegration, MetaAdsIntegration, OAuthIntegration, OtelIntegration, type PendingGrantStore, PushIntegration, QueueIntegration, RedisIntegration, type RegisteredHookProvider, type RetryConfig, RiggerIntegration, type SqlGuardResult, StorageIntegration, StripeIntegration, type StripePriceMap, TwilioIntegration, type UpdateSubscriptionInput, type VerifyAndParseInput, WebhookIntegration, WikimediaIntegration, YouTubeIntegration, allHookDeclarations, assertReadOnlySelect, getActiveFactory, getInstalledCredentialStore, getIntegration, getRegisteredIntegrations, googleCalendarHookProvider, installActiveFactory, installCredentialStore, installPendingGrantStore, isKnownIntegration, parseCalendarPushNotification, registerIntegration, registeredHookProviders, resolveCredentialRef, uninstallCredentialStore, verifyAndParseStripeEvent, withRetry };
package/dist/index.js CHANGED
@@ -158,6 +158,10 @@ var serviceCredentials = {
158
158
  ],
159
159
  arxiv: [
160
160
  { envVar: "ARXIV_TIMEOUT_MS", required: false, description: "Per-request timeout (ms)" }
161
+ ],
162
+ rigger: [
163
+ { envVar: "RIGGER_BASE_URL", required: false, description: "Local rigger service base URL (default http://127.0.0.1:8181)" },
164
+ { envVar: "RIGGER_TIMEOUT_MS", required: false, description: "Per-request timeout (ms)" }
161
165
  ]
162
166
  };
163
167
  function allCredentialEnvVars() {
@@ -5829,6 +5833,90 @@ var ArxivIntegration = class extends BaseIntegration {
5829
5833
  };
5830
5834
  registerIntegration("arxiv", ArxivIntegration);
5831
5835
 
5832
- export { AccountingIntegration, ArxivIntegration, BankingIntegration, BaseIntegration, CLIIntegration, CREDENTIALS_FILE_ENV, CREDENTIAL_ENTITY_TYPE, CREDENTIAL_MASTER_KEY_ENV, CalendarIntegration, ConsoleLogger, CredentialStore, CredentialsIntegration, DatabaseIntegration, DeepAgentIntegration, DockerIntegration, DriveIntegration, EmailIntegration, EsignIntegration, FileCredentialPersistence, GitHubIntegration, IconifyIntegration, InMemoryPendingGrantStore, IntegrationError, IntegrationFactory, LLMIntegration, MLIntegration, MetaAdsIntegration, OAuthIntegration, OtelIntegration, PushIntegration, QueueIntegration, RedisIntegration, StorageIntegration, StripeIntegration, TwilioIntegration, UnknownActionError, WebhookIntegration, WikimediaIntegration, YouTubeIntegration, allCredentialEnvVars, allHookDeclarations, assertReadOnlySelect, declaredCredentialEnvVars, getActiveFactory, getInstalledCredentialStore, getIntegration, getIntegrationFactory, getRegisteredIntegrations, googleCalendarHookProvider, installActiveFactory, installCredentialStore, installPendingGrantStore, isKnownIntegration, parseCalendarPushNotification, registerIntegration, registeredHookProviders, resetIntegrationFactory, resolveCredentialRef, serviceHooks, uninstallCredentialStore, validateParams, verifyAndParseStripeEvent, withRetry };
5836
+ // src/integrations/rigger/index.ts
5837
+ var DEFAULT_BASE_URL = "http://127.0.0.1:8181";
5838
+ var DEFAULT_TIMEOUT_MS5 = 3e4;
5839
+ var RiggerIntegration = class extends BaseIntegration {
5840
+ constructor(config) {
5841
+ super(config);
5842
+ this.baseUrl = config.env.RIGGER_BASE_URL || DEFAULT_BASE_URL;
5843
+ this.timeoutMs = Number(config.env.RIGGER_TIMEOUT_MS) || DEFAULT_TIMEOUT_MS5;
5844
+ this.logger.info("Rigger integration initialized", { baseUrl: this.baseUrl });
5845
+ }
5846
+ async execute(action, params) {
5847
+ const validation = this.validateParams(action, params);
5848
+ if (!validation.valid) {
5849
+ return {
5850
+ success: false,
5851
+ error: {
5852
+ name: "IntegrationError",
5853
+ message: "Validation failed",
5854
+ code: "VALIDATION_ERROR",
5855
+ details: validation.errors
5856
+ },
5857
+ metadata: this.createMetadata(action, 0)
5858
+ };
5859
+ }
5860
+ const startTime = Date.now();
5861
+ try {
5862
+ let data;
5863
+ switch (action) {
5864
+ case "health":
5865
+ data = await this.health();
5866
+ break;
5867
+ case "buildMesh":
5868
+ data = await this.executeWithRetry(() => this.buildMesh(params));
5869
+ break;
5870
+ case "render":
5871
+ data = await this.executeWithRetry(() => this.render(params));
5872
+ break;
5873
+ default:
5874
+ throw new UnknownActionError(this.config.name, action);
5875
+ }
5876
+ return {
5877
+ success: true,
5878
+ data,
5879
+ metadata: this.createMetadata(action, Date.now() - startTime)
5880
+ };
5881
+ } catch (error) {
5882
+ return this.handleError(action, error);
5883
+ }
5884
+ }
5885
+ async health() {
5886
+ const response = await fetch(`${this.baseUrl}/health`, {
5887
+ signal: AbortSignal.timeout(this.timeoutMs)
5888
+ });
5889
+ return { ok: response.ok };
5890
+ }
5891
+ async buildMesh(params) {
5892
+ const { imagePath, rig } = params;
5893
+ const response = await fetch(`${this.baseUrl}/mesh/build`, {
5894
+ method: "POST",
5895
+ headers: { "Content-Type": "application/json" },
5896
+ body: JSON.stringify({ imagePath, rig }),
5897
+ signal: AbortSignal.timeout(this.timeoutMs)
5898
+ });
5899
+ if (!response.ok) {
5900
+ throw new Error(`Rigger /mesh/build returned ${response.status}`);
5901
+ }
5902
+ return await response.json();
5903
+ }
5904
+ async render(params) {
5905
+ const { imagePath, rig, preset, outDir } = params;
5906
+ const response = await fetch(`${this.baseUrl}/render`, {
5907
+ method: "POST",
5908
+ headers: { "Content-Type": "application/json" },
5909
+ body: JSON.stringify({ imagePath, rig, preset, outDir }),
5910
+ signal: AbortSignal.timeout(this.timeoutMs)
5911
+ });
5912
+ if (!response.ok) {
5913
+ throw new Error(`Rigger /render returned ${response.status}`);
5914
+ }
5915
+ return response.json();
5916
+ }
5917
+ };
5918
+ registerIntegration("rigger", RiggerIntegration);
5919
+
5920
+ export { AccountingIntegration, ArxivIntegration, BankingIntegration, BaseIntegration, CLIIntegration, CREDENTIALS_FILE_ENV, CREDENTIAL_ENTITY_TYPE, CREDENTIAL_MASTER_KEY_ENV, CalendarIntegration, ConsoleLogger, CredentialStore, CredentialsIntegration, DatabaseIntegration, DeepAgentIntegration, DockerIntegration, DriveIntegration, EmailIntegration, EsignIntegration, FileCredentialPersistence, GitHubIntegration, IconifyIntegration, InMemoryPendingGrantStore, IntegrationError, IntegrationFactory, LLMIntegration, MLIntegration, MetaAdsIntegration, OAuthIntegration, OtelIntegration, PushIntegration, QueueIntegration, RedisIntegration, RiggerIntegration, StorageIntegration, StripeIntegration, TwilioIntegration, UnknownActionError, WebhookIntegration, WikimediaIntegration, YouTubeIntegration, allCredentialEnvVars, allHookDeclarations, assertReadOnlySelect, declaredCredentialEnvVars, getActiveFactory, getInstalledCredentialStore, getIntegration, getIntegrationFactory, getRegisteredIntegrations, googleCalendarHookProvider, installActiveFactory, installCredentialStore, installPendingGrantStore, isKnownIntegration, parseCalendarPushNotification, registerIntegration, registeredHookProviders, resetIntegrationFactory, resolveCredentialRef, serviceHooks, uninstallCredentialStore, validateParams, verifyAndParseStripeEvent, withRetry };
5833
5921
  //# sourceMappingURL=index.js.map
5834
5922
  //# sourceMappingURL=index.js.map