@vibesdotdev/integrations 0.0.0-stage → 1.0.0-rc.2
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 +18 -0
- package/README.md +100 -2
- package/dist/ai/ai.cloud.plugin.d.ts +5 -0
- package/dist/ai/ai.cloud.plugin.d.ts.map +1 -0
- package/dist/ai/ai.cloud.plugin.js +67 -0
- package/dist/ai/ai.cloud.plugin.js.map +1 -0
- package/dist/ai/ai.plugin.d.ts +5 -0
- package/dist/ai/ai.plugin.d.ts.map +1 -0
- package/dist/ai/ai.plugin.js +97 -0
- package/dist/ai/ai.plugin.js.map +1 -0
- package/dist/base/base.plugin.d.ts +10 -0
- package/dist/base/base.plugin.d.ts.map +1 -0
- package/dist/base/base.plugin.js +23 -0
- package/dist/base/base.plugin.js.map +1 -0
- package/dist/base/index.d.ts +13 -0
- package/dist/base/index.d.ts.map +1 -0
- package/dist/base/index.js +15 -0
- package/dist/base/index.js.map +1 -0
- package/dist/base/resolver.d.ts +13 -0
- package/dist/base/resolver.d.ts.map +1 -0
- package/dist/base/resolver.js +30 -0
- package/dist/base/resolver.js.map +1 -0
- package/dist/base/schemas.d.ts +167 -0
- package/dist/base/schemas.d.ts.map +1 -0
- package/dist/base/schemas.js +48 -0
- package/dist/base/schemas.js.map +1 -0
- package/dist/catalog/index.d.ts +6 -0
- package/dist/catalog/index.d.ts.map +1 -0
- package/dist/catalog/index.js +6 -0
- package/dist/catalog/index.js.map +1 -0
- package/dist/catalog/integration-catalog.capability.d.ts +14 -0
- package/dist/catalog/integration-catalog.capability.d.ts.map +1 -0
- package/dist/catalog/integration-catalog.capability.js +23 -0
- package/dist/catalog/integration-catalog.capability.js.map +1 -0
- package/dist/catalog/integration-catalog.descriptor.d.ts +6 -0
- package/dist/catalog/integration-catalog.descriptor.d.ts.map +1 -0
- package/dist/catalog/integration-catalog.descriptor.js +11 -0
- package/dist/catalog/integration-catalog.descriptor.js.map +1 -0
- package/dist/catalog/integration-catalog.exposure.d.ts +62 -0
- package/dist/catalog/integration-catalog.exposure.d.ts.map +1 -0
- package/dist/catalog/integration-catalog.exposure.js +101 -0
- package/dist/catalog/integration-catalog.exposure.js.map +1 -0
- package/dist/catalog/integration-catalog.http.d.ts +9 -0
- package/dist/catalog/integration-catalog.http.d.ts.map +1 -0
- package/dist/catalog/integration-catalog.http.js +58 -0
- package/dist/catalog/integration-catalog.http.js.map +1 -0
- package/dist/catalog/integration-catalog.kind.d.ts +36 -0
- package/dist/catalog/integration-catalog.kind.d.ts.map +1 -0
- package/dist/catalog/integration-catalog.kind.js +14 -0
- package/dist/catalog/integration-catalog.kind.js.map +1 -0
- package/dist/catalog/queries.d.ts +6 -0
- package/dist/catalog/queries.d.ts.map +1 -0
- package/dist/catalog/queries.js +29 -0
- package/dist/catalog/queries.js.map +1 -0
- package/dist/client/helper.d.ts +5 -0
- package/dist/client/helper.d.ts.map +1 -0
- package/dist/client/helper.js +6 -0
- package/dist/client/helper.js.map +1 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/integrations.runtime-client.browser.d.ts +10 -0
- package/dist/client/integrations.runtime-client.browser.d.ts.map +1 -0
- package/dist/client/integrations.runtime-client.browser.js +13 -0
- package/dist/client/integrations.runtime-client.browser.js.map +1 -0
- package/dist/client/integrations.runtime-client.d.ts +25 -0
- package/dist/client/integrations.runtime-client.d.ts.map +1 -0
- package/dist/client/integrations.runtime-client.descriptor.d.ts +4 -0
- package/dist/client/integrations.runtime-client.descriptor.d.ts.map +1 -0
- package/dist/client/integrations.runtime-client.descriptor.js +13 -0
- package/dist/client/integrations.runtime-client.descriptor.js.map +1 -0
- package/dist/client/integrations.runtime-client.js +41 -0
- package/dist/client/integrations.runtime-client.js.map +1 -0
- package/dist/docs/integrations.docs.descriptor.d.ts +4 -0
- package/dist/docs/integrations.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/integrations.docs.descriptor.js +43 -0
- package/dist/docs/integrations.docs.descriptor.js.map +1 -0
- package/dist/docs/integrations.providers.docs.descriptor.d.ts +4 -0
- package/dist/docs/integrations.providers.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/integrations.providers.docs.descriptor.js +32 -0
- package/dist/docs/integrations.providers.docs.descriptor.js.map +1 -0
- package/dist/http/fetch-with-retry.d.ts +27 -0
- package/dist/http/fetch-with-retry.d.ts.map +1 -0
- package/dist/http/fetch-with-retry.js +76 -0
- package/dist/http/fetch-with-retry.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations.browser.plugin.d.ts +11 -0
- package/dist/integrations.browser.plugin.d.ts.map +1 -0
- package/dist/integrations.browser.plugin.js +26 -0
- package/dist/integrations.browser.plugin.js.map +1 -0
- package/dist/integrations.consumer.plugin.d.ts +3 -0
- package/dist/integrations.consumer.plugin.d.ts.map +1 -0
- package/dist/integrations.consumer.plugin.js +12 -0
- package/dist/integrations.consumer.plugin.js.map +1 -0
- package/dist/integrations.plugin.d.ts +10 -0
- package/dist/integrations.plugin.d.ts.map +1 -0
- package/dist/integrations.plugin.js +67 -0
- package/dist/integrations.plugin.js.map +1 -0
- package/dist/kinds/integration-store.context.descriptor.d.ts +31 -0
- package/dist/kinds/integration-store.context.descriptor.d.ts.map +1 -0
- package/dist/kinds/integration-store.context.descriptor.js +8 -0
- package/dist/kinds/integration-store.context.descriptor.js.map +1 -0
- package/dist/kinds/integration.kind.d.ts +74 -0
- package/dist/kinds/integration.kind.d.ts.map +1 -0
- package/dist/kinds/integration.kind.js +542 -0
- package/dist/kinds/integration.kind.js.map +1 -0
- package/dist/kinds/integration.store.d.ts +30 -0
- package/dist/kinds/integration.store.d.ts.map +1 -0
- package/dist/kinds/integration.store.js +295 -0
- package/dist/kinds/integration.store.js.map +1 -0
- package/dist/schemas/boundary.d.ts +7 -0
- package/dist/schemas/boundary.d.ts.map +1 -0
- package/dist/schemas/boundary.js +16 -0
- package/dist/schemas/boundary.js.map +1 -0
- package/dist/schemas/catalog.d.ts +135 -0
- package/dist/schemas/catalog.d.ts.map +1 -0
- package/dist/schemas/catalog.js +13 -0
- package/dist/schemas/catalog.js.map +1 -0
- package/dist/schemas/credential-resolution.d.ts +35 -0
- package/dist/schemas/credential-resolution.d.ts.map +1 -0
- package/dist/schemas/credential-resolution.js +14 -0
- package/dist/schemas/credential-resolution.js.map +1 -0
- package/dist/schemas/http-retry.d.ts +9 -0
- package/dist/schemas/http-retry.d.ts.map +1 -0
- package/dist/schemas/http-retry.js +8 -0
- package/dist/schemas/http-retry.js.map +1 -0
- package/dist/schemas/integration-connection.d.ts +79 -0
- package/dist/schemas/integration-connection.d.ts.map +1 -0
- package/dist/schemas/integration-connection.js +55 -0
- package/dist/schemas/integration-connection.js.map +1 -0
- package/dist/schemas/integration-descriptor.d.ts +358 -0
- package/dist/schemas/integration-descriptor.d.ts.map +1 -0
- package/dist/schemas/integration-descriptor.js +153 -0
- package/dist/schemas/integration-descriptor.js.map +1 -0
- package/dist/schemas/oauth-state.d.ts +30 -0
- package/dist/schemas/oauth-state.d.ts.map +1 -0
- package/dist/schemas/oauth-state.js +26 -0
- package/dist/schemas/oauth-state.js.map +1 -0
- package/dist/schemas/settings.d.ts +9 -0
- package/dist/schemas/settings.d.ts.map +1 -0
- package/dist/schemas/settings.js +8 -0
- package/dist/schemas/settings.js.map +1 -0
- package/dist/schemas/store.d.ts +68 -0
- package/dist/schemas/store.d.ts.map +1 -0
- package/dist/schemas/store.js +31 -0
- package/dist/schemas/store.js.map +1 -0
- package/dist/server/defaults/system-defaults.kind.d.ts +8 -0
- package/dist/server/defaults/system-defaults.kind.d.ts.map +1 -0
- package/dist/server/defaults/system-defaults.kind.js +13 -0
- package/dist/server/defaults/system-defaults.kind.js.map +1 -0
- package/dist/server/integration-oauth.d.ts +44 -0
- package/dist/server/integration-oauth.d.ts.map +1 -0
- package/dist/server/integration-oauth.js +56 -0
- package/dist/server/integration-oauth.js.map +1 -0
- package/dist/server/integration-secrets.d.ts +11 -0
- package/dist/server/integration-secrets.d.ts.map +1 -0
- package/dist/server/integration-secrets.js +98 -0
- package/dist/server/integration-secrets.js.map +1 -0
- package/dist/server/oauth-state.d.ts +74 -0
- package/dist/server/oauth-state.d.ts.map +1 -0
- package/dist/server/oauth-state.js +208 -0
- package/dist/server/oauth-state.js.map +1 -0
- package/dist/server/schemas/integration-oauth.d.ts +32 -0
- package/dist/server/schemas/integration-oauth.d.ts.map +1 -0
- package/dist/server/schemas/integration-oauth.js +20 -0
- package/dist/server/schemas/integration-oauth.js.map +1 -0
- package/dist/server/schemas/integration-secrets.d.ts +165 -0
- package/dist/server/schemas/integration-secrets.d.ts.map +1 -0
- package/dist/server/schemas/integration-secrets.js +72 -0
- package/dist/server/schemas/integration-secrets.js.map +1 -0
- package/dist/server/schemas/system-defaults.d.ts +124 -0
- package/dist/server/schemas/system-defaults.d.ts.map +1 -0
- package/dist/server/schemas/system-defaults.js +48 -0
- package/dist/server/schemas/system-defaults.js.map +1 -0
- package/dist/server/system-defaults.d.ts +20 -0
- package/dist/server/system-defaults.d.ts.map +1 -0
- package/dist/server/system-defaults.js +58 -0
- package/dist/server/system-defaults.js.map +1 -0
- package/dist/settings/context.d.ts +11 -0
- package/dist/settings/context.d.ts.map +1 -0
- package/dist/settings/context.js +19 -0
- package/dist/settings/context.js.map +1 -0
- package/dist/settings/system-settings-reader.context.descriptor.d.ts +43 -0
- package/dist/settings/system-settings-reader.context.descriptor.d.ts.map +1 -0
- package/dist/settings/system-settings-reader.context.descriptor.js +23 -0
- package/dist/settings/system-settings-reader.context.descriptor.js.map +1 -0
- package/dist/status/integration-connect.availability.d.ts +16 -0
- package/dist/status/integration-connect.availability.d.ts.map +1 -0
- package/dist/status/integration-connect.availability.js +14 -0
- package/dist/status/integration-connect.availability.js.map +1 -0
- package/dist/status/integration-connection-status.d.ts +18 -0
- package/dist/status/integration-connection-status.d.ts.map +1 -0
- package/dist/status/integration-connection-status.js +17 -0
- package/dist/status/integration-connection-status.js.map +1 -0
- package/dist/status/integration-connection.capability.d.ts +19 -0
- package/dist/status/integration-connection.capability.d.ts.map +1 -0
- package/dist/status/integration-connection.capability.js +15 -0
- package/dist/status/integration-connection.capability.js.map +1 -0
- package/dist/status/integration-connection.kind.d.ts +55 -0
- package/dist/status/integration-connection.kind.d.ts.map +1 -0
- package/dist/status/integration-connection.kind.js +31 -0
- package/dist/status/integration-connection.kind.js.map +1 -0
- package/dist/status/integration-connection.queries.d.ts +25 -0
- package/dist/status/integration-connection.queries.d.ts.map +1 -0
- package/dist/status/integration-connection.queries.js +65 -0
- package/dist/status/integration-connection.queries.js.map +1 -0
- package/dist/svelte/components/IntegrationsCatalog.svelte +201 -0
- package/dist/svelte/components/IntegrationsCatalog.svelte.d.ts +5 -0
- package/dist/svelte/components/IntegrationsCatalog.svelte.d.ts.map +1 -0
- package/dist/svelte/components/IntegrationsLoader.svelte +46 -0
- package/dist/svelte/components/IntegrationsLoader.svelte.d.ts +12 -0
- package/dist/svelte/components/IntegrationsLoader.svelte.d.ts.map +1 -0
- package/dist/svelte/connect-action.d.ts +20 -0
- package/dist/svelte/connect-action.d.ts.map +1 -0
- package/dist/svelte/connect-action.js +40 -0
- package/dist/svelte/docs/integrations-svelte.catalog.docs.descriptor.d.ts +4 -0
- package/dist/svelte/docs/integrations-svelte.catalog.docs.descriptor.d.ts.map +1 -0
- package/dist/svelte/docs/integrations-svelte.catalog.docs.descriptor.js +30 -0
- package/dist/svelte/index.d.ts +12 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +7 -0
- package/dist/svelte/integrations-svelte.plugin.d.ts +10 -0
- package/dist/svelte/integrations-svelte.plugin.d.ts.map +1 -0
- package/dist/svelte/integrations-svelte.plugin.js +16 -0
- package/dist/svelte/loaders.d.ts +17 -0
- package/dist/svelte/loaders.d.ts.map +1 -0
- package/dist/svelte/loaders.js +17 -0
- package/dist/svelte/runtime.d.ts +12 -0
- package/dist/svelte/runtime.d.ts.map +1 -0
- package/dist/svelte/runtime.js +11 -0
- package/dist/svelte/state.svelte.d.ts +30 -0
- package/dist/svelte/state.svelte.d.ts.map +1 -0
- package/dist/svelte/state.svelte.js +133 -0
- package/dist/svelte/styles.css +2 -0
- package/dist/svelte/types.d.ts +13 -0
- package/dist/svelte/types.d.ts.map +1 -0
- package/dist/svelte/types.js +1 -0
- package/package.json +223 -4
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { KindContext, VibesRuntime } from '@vibesdotdev/kernel';
|
|
2
|
+
import { BaseRuntimeClient, type RuntimeClient, type RuntimeClientDescriptor } from '@vibesdotdev/kernel/client';
|
|
3
|
+
import type { IntegrationProviderDescriptor } from '../schemas/integration-descriptor.ts';
|
|
4
|
+
import { type IntegrationCatalogListOptions } from '../catalog/integration-catalog.kind.ts';
|
|
5
|
+
/** Catalog filters owned by the integration/catalog capability contract. */
|
|
6
|
+
export type IntegrationProviderCatalogListOptions = IntegrationCatalogListOptions;
|
|
7
|
+
export interface IntegrationProviderCatalog {
|
|
8
|
+
/** List provider descriptors without resolving implementations or credentials. */
|
|
9
|
+
list(options?: IntegrationProviderCatalogListOptions): Promise<IntegrationProviderDescriptor[]>;
|
|
10
|
+
/** Get one declared provider descriptor, including a disabled descriptor. */
|
|
11
|
+
get(id: string): Promise<IntegrationProviderDescriptor | null>;
|
|
12
|
+
}
|
|
13
|
+
export interface IntegrationsClient extends RuntimeClient {
|
|
14
|
+
readonly providers: IntegrationProviderCatalog;
|
|
15
|
+
}
|
|
16
|
+
declare class RuntimeIntegrationsClient extends BaseRuntimeClient<VibesRuntime> implements IntegrationsClient {
|
|
17
|
+
readonly providers: IntegrationProviderCatalog;
|
|
18
|
+
constructor(descriptor?: RuntimeClientDescriptor, context?: KindContext<VibesRuntime>, runtime?: VibesRuntime);
|
|
19
|
+
protected catalogUnavailable(): IntegrationProviderCatalog;
|
|
20
|
+
private catalog;
|
|
21
|
+
private listProviders;
|
|
22
|
+
private getProvider;
|
|
23
|
+
}
|
|
24
|
+
export default RuntimeIntegrationsClient;
|
|
25
|
+
//# sourceMappingURL=integrations.runtime-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.runtime-client.d.ts","sourceRoot":"","sources":["../../src/client/integrations.runtime-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EACN,iBAAiB,EACjB,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAIN,KAAK,6BAA6B,EAClC,MAAM,wCAAwC,CAAC;AAIhD,4EAA4E;AAC5E,MAAM,MAAM,qCAAqC,GAAG,6BAA6B,CAAC;AAElF,MAAM,WAAW,0BAA0B;IAC1C,kFAAkF;IAClF,IAAI,CAAC,OAAO,CAAC,EAAE,qCAAqC,GAAG,OAAO,CAAC,6BAA6B,EAAE,CAAC,CAAC;IAChG,6EAA6E;IAC7E,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,6BAA6B,GAAG,IAAI,CAAC,CAAC;CAC/D;AAED,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACxD,QAAQ,CAAC,SAAS,EAAE,0BAA0B,CAAC;CAC/C;AAED,cAAM,yBAA0B,SAAQ,iBAAiB,CAAC,YAAY,CAAE,YAAW,kBAAkB;IACpG,QAAQ,CAAC,SAAS,EAAE,0BAA0B,CAAC;gBAG9C,UAAU,GAAE,uBAGX,EACD,OAAO,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,EACnC,OAAO,CAAC,EAAE,YAAY;IASvB,SAAS,CAAC,kBAAkB,IAAI,0BAA0B;YAO5C,OAAO;YAaP,aAAa;YAMb,WAAW;CAGzB;AAED,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type RuntimeClientDescriptor } from '@vibesdotdev/kernel/client';
|
|
2
|
+
export declare const integrationsRuntimeClientDescriptor: RuntimeClientDescriptor;
|
|
3
|
+
export default integrationsRuntimeClientDescriptor;
|
|
4
|
+
//# sourceMappingURL=integrations.runtime-client.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.runtime-client.descriptor.d.ts","sourceRoot":"","sources":["../../src/client/integrations.runtime-client.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,uBAAuB,EAC5B,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,mCAAmC,EAAE,uBAW/C,CAAC;AAEJ,eAAe,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RuntimeClientDescriptorSchema } from '@vibesdotdev/kernel/client';
|
|
2
|
+
export const integrationsRuntimeClientDescriptor = RuntimeClientDescriptorSchema.parse({
|
|
3
|
+
id: 'integrations',
|
|
4
|
+
kind: 'runtime/client',
|
|
5
|
+
name: 'Integrations Client',
|
|
6
|
+
description: 'Canonical read client for the descriptor-backed integration provider catalog',
|
|
7
|
+
enabled: true,
|
|
8
|
+
hardware: ['consumer', 'cloud'],
|
|
9
|
+
requiredContext: [],
|
|
10
|
+
optionalContext: ['user', 'surface', 'session']
|
|
11
|
+
});
|
|
12
|
+
export default integrationsRuntimeClientDescriptor;
|
|
13
|
+
//# sourceMappingURL=integrations.runtime-client.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.runtime-client.descriptor.js","sourceRoot":"","sources":["../../src/client/integrations.runtime-client.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,6BAA6B,EAE7B,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,MAAM,mCAAmC,GAC/C,6BAA6B,CAAC,KAAK,CAAC;IACnC,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EACV,8EAA8E;IAC/E,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,eAAe,EAAE,EAAE;IACnB,eAAe,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;CAC/C,CAAC,CAAC;AAEJ,eAAe,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BaseRuntimeClient } from '@vibesdotdev/kernel/client';
|
|
2
|
+
import { INTEGRATION_CATALOG_ID, INTEGRATION_CATALOG_KIND } from "../catalog/integration-catalog.kind.js";
|
|
3
|
+
import { getIntegrationProviderCatalogEntry, listIntegrationProviderCatalog } from "../catalog/queries.js";
|
|
4
|
+
class RuntimeIntegrationsClient extends BaseRuntimeClient {
|
|
5
|
+
providers;
|
|
6
|
+
constructor(descriptor = {
|
|
7
|
+
id: 'integrations',
|
|
8
|
+
kind: 'runtime/client'
|
|
9
|
+
}, context, runtime) {
|
|
10
|
+
super(descriptor, context, runtime);
|
|
11
|
+
this.providers = {
|
|
12
|
+
list: (options = {}) => this.listProviders(options),
|
|
13
|
+
get: (id) => this.getProvider(id)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
catalogUnavailable() {
|
|
17
|
+
return {
|
|
18
|
+
list: async (options = {}) => listIntegrationProviderCatalog(this.runtime, options),
|
|
19
|
+
get: async (id) => getIntegrationProviderCatalogEntry(this.runtime, id)
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
async catalog() {
|
|
23
|
+
if (this.runtime.hasKind(INTEGRATION_CATALOG_KIND)) {
|
|
24
|
+
const capability = await this.runtime
|
|
25
|
+
.query(INTEGRATION_CATALOG_KIND)
|
|
26
|
+
.withId(INTEGRATION_CATALOG_ID)
|
|
27
|
+
.first();
|
|
28
|
+
if (capability)
|
|
29
|
+
return capability;
|
|
30
|
+
}
|
|
31
|
+
return this.catalogUnavailable();
|
|
32
|
+
}
|
|
33
|
+
async listProviders(options) {
|
|
34
|
+
return (await this.catalog()).list(options);
|
|
35
|
+
}
|
|
36
|
+
async getProvider(id) {
|
|
37
|
+
return (await this.catalog()).get(id);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export default RuntimeIntegrationsClient;
|
|
41
|
+
//# sourceMappingURL=integrations.runtime-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.runtime-client.js","sourceRoot":"","sources":["../../src/client/integrations.runtime-client.ts"],"names":[],"mappings":"AACA,OAAO,EACN,iBAAiB,EAGjB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACN,sBAAsB,EACtB,wBAAwB,EAGxB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,kCAAkC,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAgB3G,MAAM,yBAA0B,SAAQ,iBAA+B;IAC7D,SAAS,CAA6B;IAE/C,YACC,aAAsC;QACrC,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,gBAAgB;KACtB,EACD,OAAmC,EACnC,OAAsB;QAEtB,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG;YAChB,IAAI,EAAE,CAAC,OAAO,GAAG,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;YACnD,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;SACjC,CAAC;IACH,CAAC;IAES,kBAAkB;QAC3B,OAAO;YACN,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE,CAAC,8BAA8B,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;YACnF,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,kCAAkC,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;SACvE,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,OAAO;QACpB,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC;YACpD,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,OAAO;iBACnC,KAAK,CACL,wBAAwB,CACxB;iBACA,MAAM,CAAC,sBAAsB,CAAC;iBAC9B,KAAK,EAAE,CAAC;YACV,IAAI,UAAU;gBAAE,OAAO,UAAU,CAAC;QACnC,CAAC;QACD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAClC,CAAC;IAEO,KAAK,CAAC,aAAa,CAC1B,OAA8C;QAE9C,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,EAAU;QACnC,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;CACD;AAED,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.docs.descriptor.d.ts","sourceRoot":"","sources":["../../src/docs/integrations.docs.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAgCvE,QAAA,MAAM,UAAU,EAAE,mBAWjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const integrationsMarkdown = [
|
|
2
|
+
"---",
|
|
3
|
+
"title: Integrations",
|
|
4
|
+
"summary: Third-party integration providers.",
|
|
5
|
+
"order: 11",
|
|
6
|
+
"---",
|
|
7
|
+
"",
|
|
8
|
+
"# Integrations",
|
|
9
|
+
"",
|
|
10
|
+
"This package owns the `integration/provider` and `integration/connection` runtime contracts. Connector packages provide implementations through descriptors and lazy loaders.",
|
|
11
|
+
"",
|
|
12
|
+
"## Credentials and scope",
|
|
13
|
+
"",
|
|
14
|
+
"Provider credential references resolve through `runtime.resolveCredential`; managed credential metadata and writes use the secrets runtime client. A setting-backed credential must be a kernel `CredentialReference`, never a raw value. Managed writes require an explicit scope and scope ID. Organization access uses the current request organization and descriptor scope; absent identity refuses with `PERMISSION_DENIED` / `integration-organization-required`. Host references are read-only.",
|
|
15
|
+
"",
|
|
16
|
+
"Selected accounts use `connectionId`. A provider authorizes that exact ID for the authenticated user or verified delegation. No latest-row or cross-organization fallback is allowed.",
|
|
17
|
+
"",
|
|
18
|
+
"## Connection behavior",
|
|
19
|
+
"",
|
|
20
|
+
"Providers declare authentication mode and connection metadata. A composed `integration/connection` descriptor and resolved implementation are required before the runtime can connect; catalog presence or metadata alone is not authority. The implementation checks host authorization and returns an accepted result or a typed refusal with its code and reason.",
|
|
21
|
+
"",
|
|
22
|
+
"## Defaults",
|
|
23
|
+
"",
|
|
24
|
+
"The generic core ships no vendor defaults. A host declares the provider services it seeds through an explicitly scoped `integration/provider-defaults` descriptor. Seed and cleanup use that same declaration.",
|
|
25
|
+
"",
|
|
26
|
+
"## Entry points",
|
|
27
|
+
"",
|
|
28
|
+
"Use `@vibesdotdev/integrations/kinds/integration` to extend the provider base. The root exposes runtime contracts, not the concrete base class. AI provider aggregation belongs to `@vibesdotdev/integrations-connectors/ai/plugin`; cloud hosts compose that owner's `./ai/cloud.plugin`.",
|
|
29
|
+
].join('\n');
|
|
30
|
+
const descriptor = {
|
|
31
|
+
kind: 'docs/topic',
|
|
32
|
+
id: "integrations",
|
|
33
|
+
title: "Integrations",
|
|
34
|
+
summary: "Runtime-owned contracts for third-party integration providers.",
|
|
35
|
+
body: { type: 'markdown', sourceType: 'raw', source: integrationsMarkdown },
|
|
36
|
+
order: 11,
|
|
37
|
+
tags: ["integrations", "overview"],
|
|
38
|
+
surfaces: ["web", "in-app"],
|
|
39
|
+
hardware: ["consumer", "cloud"],
|
|
40
|
+
enabled: true
|
|
41
|
+
};
|
|
42
|
+
export default descriptor;
|
|
43
|
+
//# sourceMappingURL=integrations.docs.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.docs.descriptor.js","sourceRoot":"","sources":["../../src/docs/integrations.docs.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,oBAAoB,GAAG;IAC5B,KAAK;IACL,qBAAqB;IACrB,6CAA6C;IAC7C,WAAW;IACX,KAAK;IACL,EAAE;IACF,gBAAgB;IAChB,EAAE;IACF,+KAA+K;IAC/K,EAAE;IACF,0BAA0B;IAC1B,EAAE;IACF,yeAAye;IACze,EAAE;IACF,uLAAuL;IACvL,EAAE;IACF,wBAAwB;IACxB,EAAE;IACF,sWAAsW;IACtW,EAAE;IACF,aAAa;IACb,EAAE;IACF,gNAAgN;IAChN,EAAE;IACF,iBAAiB;IACjB,EAAE;IACF,4RAA4R;CAC5R,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,UAAU,GAAwB;IACvC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,cAAc;IACrB,OAAO,EAAE,gEAAgE;IACzE,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE;IAC3E,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,CAAC,cAAc,EAAC,UAAU,CAAC;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAC,QAAQ,CAAC;IAC1B,QAAQ,EAAE,CAAC,UAAU,EAAC,OAAO,CAAC;IAC9B,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.providers.docs.descriptor.d.ts","sourceRoot":"","sources":["../../src/docs/integrations.providers.docs.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAsBvE,QAAA,MAAM,UAAU,EAAE,mBAUjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const body = [
|
|
2
|
+
"# Integration provider catalog",
|
|
3
|
+
"",
|
|
4
|
+
"The integrations client discovers local and runtime-mounted `integration/provider` descriptors without resolving provider implementations or credentials.",
|
|
5
|
+
"",
|
|
6
|
+
"```ts",
|
|
7
|
+
"import { getVibesIntegrationsClient } from '@vibesdotdev/integrations/client';",
|
|
8
|
+
"",
|
|
9
|
+
"const integrations = await getVibesIntegrationsClient(runtime);",
|
|
10
|
+
"const providers = await integrations.providers.list({ category: 'crm' });",
|
|
11
|
+
"const google = await integrations.providers.get('integration.google');",
|
|
12
|
+
"```",
|
|
13
|
+
"",
|
|
14
|
+
"Compose `./plugin` with logging and storage. Add `./consumer.plugin` in a consumer daemon and `./browser.plugin` in its renderer.",
|
|
15
|
+
"",
|
|
16
|
+
"Renderer projection keeps labels, availability, and declared connection metadata while removing configuration, credential references, OAuth endpoints, base URLs, and operation metadata. Before mount or after disconnect the browser catalog refuses with `UNAVAILABLE` / `integration-catalog-renderer-capability-unavailable`.",
|
|
17
|
+
"",
|
|
18
|
+
"Catalog presence is not connection state or authority. A Connect action requires a connectable declaration and a resolved `integration/connection` runtime implementation. Provider ID, category, or credential shape does not admit a connection. The implementation retains host authorization and returns an accepted result or a typed refusal with code and reason.",
|
|
19
|
+
].join('\n');
|
|
20
|
+
const descriptor = {
|
|
21
|
+
kind: 'docs/topic',
|
|
22
|
+
id: "integrations.providers",
|
|
23
|
+
title: "Integration Providers",
|
|
24
|
+
summary: "Discover provider descriptors and resolve connection behavior through the runtime.",
|
|
25
|
+
body: { type: 'markdown', sourceType: 'raw', source: body },
|
|
26
|
+
tags: ["integrations", "providers", "runtime-client"],
|
|
27
|
+
surfaces: ["cli", "web", "in-app"],
|
|
28
|
+
hardware: ["consumer", "cloud"],
|
|
29
|
+
enabled: true
|
|
30
|
+
};
|
|
31
|
+
export default descriptor;
|
|
32
|
+
//# sourceMappingURL=integrations.providers.docs.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.providers.docs.descriptor.js","sourceRoot":"","sources":["../../src/docs/integrations.providers.docs.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAG;IACZ,gCAAgC;IAChC,EAAE;IACF,2JAA2J;IAC3J,EAAE;IACF,OAAO;IACP,gFAAgF;IAChF,EAAE;IACF,iEAAiE;IACjE,2EAA2E;IAC3E,wEAAwE;IACxE,KAAK;IACL,EAAE;IACF,mIAAmI;IACnI,EAAE;IACF,oUAAoU;IACpU,EAAE;IACF,0WAA0W;CAC1W,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,UAAU,GAAwB;IACvC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,wBAAwB;IAC5B,KAAK,EAAE,uBAAuB;IAC9B,OAAO,EAAE,oFAAoF;IAC7F,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;IAC3D,IAAI,EAAE,CAAC,cAAc,EAAC,WAAW,EAAC,gBAAgB,CAAC;IACnD,QAAQ,EAAE,CAAC,KAAK,EAAC,KAAK,EAAC,QAAQ,CAAC;IAChC,QAAQ,EAAE,CAAC,UAAU,EAAC,OAAO,CAAC;IAC9B,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared fetch retry/backoff for vendor integration clients.
|
|
3
|
+
*
|
|
4
|
+
* Third-party APIs (Notion, Linear, …) rate-limit aggressively and emit
|
|
5
|
+
* transient 5xx/network errors. Without backoff a burst hard-fails the whole
|
|
6
|
+
* operation. This wraps a single fetch with bounded retries:
|
|
7
|
+
* - honours `Retry-After` (seconds or HTTP-date) on 429/503,
|
|
8
|
+
* - exponential backoff + jitter on other retryable statuses and network
|
|
9
|
+
* errors,
|
|
10
|
+
* - returns the final Response on success OR after the last attempt (so the
|
|
11
|
+
* caller's own error handling still runs on a terminal 4xx/5xx).
|
|
12
|
+
*
|
|
13
|
+
* Workerd-safe. The bounded in-request backoff waits through the handed
|
|
14
|
+
* runtime's lifecycle (`runtime.lifecycle.delay`), aborting with the caller's
|
|
15
|
+
* signal; it is not a schedule.
|
|
16
|
+
*/
|
|
17
|
+
import { type VibesRuntime } from '@vibesdotdev/kernel';
|
|
18
|
+
import { type RetryOptions } from '../schemas/http-retry.ts';
|
|
19
|
+
export type { RetryOptions } from '../schemas/http-retry.ts';
|
|
20
|
+
export type FetchLike = (url: string, init?: RequestInit) => Promise<Response>;
|
|
21
|
+
/** Parse a `Retry-After` header (delta-seconds or HTTP-date) into ms, or null. */
|
|
22
|
+
export declare function parseRetryAfter(headerValue: string | null, nowMs: number): number | null;
|
|
23
|
+
/**
|
|
24
|
+
* Fetch `url` via `fetchFn`, retrying transient failures. See {@link RetryOptions}.
|
|
25
|
+
*/
|
|
26
|
+
export declare function fetchWithRetry(runtime: Pick<VibesRuntime, 'lifecycle'>, fetchFn: FetchLike, url: string, init?: RequestInit, opts?: RetryOptions): Promise<Response>;
|
|
27
|
+
//# sourceMappingURL=fetch-with-retry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-with-retry.d.ts","sourceRoot":"","sources":["../../src/http/fetch-with-retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAA2B,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEjF,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAQ/E,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOxF;AAED;;GAEG;AACH,wBAAsB,cAAc,CACnC,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,EACxC,OAAO,EAAE,SAAS,EAClB,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,WAAW,EAClB,IAAI,GAAE,YAAiB,GACrB,OAAO,CAAC,QAAQ,CAAC,CAqCnB"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared fetch retry/backoff for vendor integration clients.
|
|
3
|
+
*
|
|
4
|
+
* Third-party APIs (Notion, Linear, …) rate-limit aggressively and emit
|
|
5
|
+
* transient 5xx/network errors. Without backoff a burst hard-fails the whole
|
|
6
|
+
* operation. This wraps a single fetch with bounded retries:
|
|
7
|
+
* - honours `Retry-After` (seconds or HTTP-date) on 429/503,
|
|
8
|
+
* - exponential backoff + jitter on other retryable statuses and network
|
|
9
|
+
* errors,
|
|
10
|
+
* - returns the final Response on success OR after the last attempt (so the
|
|
11
|
+
* caller's own error handling still runs on a terminal 4xx/5xx).
|
|
12
|
+
*
|
|
13
|
+
* Workerd-safe. The bounded in-request backoff waits through the handed
|
|
14
|
+
* runtime's lifecycle (`runtime.lifecycle.delay`), aborting with the caller's
|
|
15
|
+
* signal; it is not a schedule.
|
|
16
|
+
*/
|
|
17
|
+
import { CapabilityError, settle } from '@vibesdotdev/kernel';
|
|
18
|
+
import { RetryOptionsSchema } from "../schemas/http-retry.js";
|
|
19
|
+
import { parseIntegrationBoundary } from "../schemas/boundary.js";
|
|
20
|
+
function backoffDelay(attempt, base, max) {
|
|
21
|
+
const exp = Math.min(max, base * 2 ** (attempt - 1));
|
|
22
|
+
// Full jitter in [exp/2, exp] to avoid thundering-herd alignment.
|
|
23
|
+
return Math.round(exp * (0.5 + Math.random() * 0.5));
|
|
24
|
+
}
|
|
25
|
+
/** Parse a `Retry-After` header (delta-seconds or HTTP-date) into ms, or null. */
|
|
26
|
+
export function parseRetryAfter(headerValue, nowMs) {
|
|
27
|
+
if (!headerValue)
|
|
28
|
+
return null;
|
|
29
|
+
const trimmed = headerValue.trim();
|
|
30
|
+
if (/^\d+$/.test(trimmed))
|
|
31
|
+
return Number(trimmed) * 1000;
|
|
32
|
+
const dateMs = Date.parse(trimmed);
|
|
33
|
+
if (!Number.isNaN(dateMs))
|
|
34
|
+
return Math.max(0, dateMs - nowMs);
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Fetch `url` via `fetchFn`, retrying transient failures. See {@link RetryOptions}.
|
|
39
|
+
*/
|
|
40
|
+
export async function fetchWithRetry(runtime, fetchFn, url, init, opts = {}) {
|
|
41
|
+
const options = parseIntegrationBoundary(RetryOptionsSchema, opts);
|
|
42
|
+
const { maxAttempts, baseDelayMs: base, maxDelayMs: maxDelay, retryStatuses } = options;
|
|
43
|
+
const signal = init?.signal ?? undefined;
|
|
44
|
+
const sleep = (ms) => runtime.lifecycle.delay(ms, signal);
|
|
45
|
+
for (let attempt = 1;; attempt++) {
|
|
46
|
+
signal?.throwIfAborted();
|
|
47
|
+
const result = await settle(() => fetchFn(url, init));
|
|
48
|
+
if (!result.ok) {
|
|
49
|
+
signal?.throwIfAborted();
|
|
50
|
+
if (result.cause instanceof CapabilityError && !result.cause.retryable)
|
|
51
|
+
throw result.cause;
|
|
52
|
+
if (attempt === maxAttempts)
|
|
53
|
+
throw result.cause;
|
|
54
|
+
await sleep(backoffDelay(attempt, base, maxDelay));
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
const response = result.value;
|
|
58
|
+
if (attempt === maxAttempts || !retryStatuses.includes(response.status)) {
|
|
59
|
+
return response;
|
|
60
|
+
}
|
|
61
|
+
// Retryable status with attempts remaining. Honour Retry-After when present.
|
|
62
|
+
const retryAfter = parseRetryAfter(response.headers.get('retry-after'), Date.now());
|
|
63
|
+
const wait = retryAfter !== null ? Math.min(retryAfter, maxDelay) : backoffDelay(attempt, base, maxDelay);
|
|
64
|
+
// Release the prior response before starting another request.
|
|
65
|
+
try {
|
|
66
|
+
await response.body?.cancel();
|
|
67
|
+
}
|
|
68
|
+
catch (cause) {
|
|
69
|
+
throw new CapabilityError('HTTP response cleanup failed.', 'UNAVAILABLE', {
|
|
70
|
+
reason: 'integration-http-body-cleanup-failed', retryable: false, cause
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
await sleep(wait);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=fetch-with-retry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-with-retry.js","sourceRoot":"","sources":["../../src/http/fetch-with-retry.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { integrationsPlugin } from './integrations.plugin.ts';
|
|
2
|
+
export * from './catalog/integration-catalog.kind.ts';
|
|
3
|
+
export * from './catalog/integration-catalog.descriptor.ts';
|
|
4
|
+
export * from './catalog/integration-catalog.exposure.ts';
|
|
5
|
+
export * from './catalog/integration-catalog.http.ts';
|
|
6
|
+
export * from './catalog/queries.ts';
|
|
7
|
+
export { getVibesIntegrationsClient } from './client/index.ts';
|
|
8
|
+
export type { IntegrationProviderCatalog, IntegrationProviderCatalogListOptions, IntegrationsClient } from './client/index.ts';
|
|
9
|
+
export { integrationProviderKind } from './kinds/integration.kind.ts';
|
|
10
|
+
export { IntegrationCategorySchema, IntegrationConnectionActorSchema, IntegrationConnectionSelectorSchema, IntegrationCredentialReferenceCandidatesSchema, IntegrationProviderDescriptorSchema, IntegrationProviderResolvedConfigurationSchema } from './schemas/integration-descriptor.ts';
|
|
11
|
+
export type { IntegrationCategory, IntegrationConfig, IntegrationConfigValue, IntegrationConnectionActor, IntegrationConnectionSelector, IntegrationCredentialReferenceCandidates, IntegrationCredentialSource, IntegrationCredentialWriteMetadata, IntegrationOAuthAuthorization, IntegrationOAuthCompletion, IntegrationOAuthMetadata, IntegrationOAuthStart, IntegrationOperation, IntegrationOperationResult, IntegrationProviderDescriptor, IntegrationProviderDescriptorInput, IntegrationProviderImplementation, IntegrationProviderResolvedConfiguration } from './schemas/integration-descriptor.ts';
|
|
12
|
+
export type { SystemSettingsReader } from './settings/context.ts';
|
|
13
|
+
export { IntegrationAuthModeSchema, IntegrationConnectionMetadataSchema, IntegrationConnectionStatusSchema, IntegrationConnectRequestResultSchema, IntegrationConnectionRefusalSchema } from './status/integration-connection-status.ts';
|
|
14
|
+
export type { IntegrationAuthMode, IntegrationConnectRequestResult, IntegrationConnectionMetadata, IntegrationConnectionRefusal, IntegrationConnectionStatus } from './status/integration-connection-status.ts';
|
|
15
|
+
export { INTEGRATION_CONNECTION_KIND, IntegrationConnectionDescriptorSchema, integrationConnectionKind } from './status/integration-connection.kind.ts';
|
|
16
|
+
export type { IntegrationConnectionDescriptor } from './status/integration-connection.kind.ts';
|
|
17
|
+
export type { IntegrationConnectionCapability } from './status/integration-connection.capability.ts';
|
|
18
|
+
export { integrationConnectionStatus, resolveIntegrationConnection, resolveIntegrationConnectionMetadata } from './status/integration-connection.queries.ts';
|
|
19
|
+
export { isIntegrationProviderConnectable } from './status/integration-connect.availability.ts';
|
|
20
|
+
export { attachSecretToIntegrationService, listIntegrationServiceSecrets, resolveIntegrationServiceSecret, sendIntegrationAuthenticatedRequest } from './server/integration-secrets.ts';
|
|
21
|
+
export type { AttachIntegrationSecretOptions, IntegrationSecretClient, IntegrationSecretReference, ListIntegrationServiceSecretsOptions, ResolveIntegrationSecretOptions } from './server/integration-secrets.ts';
|
|
22
|
+
export { integrationProviderDefaultIds, seedIntegrationProviderServices, cleanIntegrationProviderServices, INTEGRATION_PROVIDER_DEFAULTS_ID, INTEGRATION_PROVIDER_DEFAULTS_KIND, integrationProviderDefaultsKind, DeleteIntegrationProviderServicesInputSchema, IntegrationProviderDefaultDefinitionSchema, IntegrationProviderDefaultScopeSchema, IntegrationProviderDefaultServiceInputSchema, IntegrationProviderDefaultsDescriptorSchema, IntegrationProviderDefaultsStoreSchema } from './server/system-defaults.ts';
|
|
23
|
+
export type { DeleteIntegrationProviderServicesInput, IntegrationProviderDefaultConfig, IntegrationProviderDefaultDefinition, IntegrationProviderDefaultScope, IntegrationProviderDefaultServiceInput, IntegrationProviderDefaultsDescriptor, IntegrationProviderDefaultsStore } from './server/system-defaults.ts';
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,YAAY,EACX,0BAA0B,EAC1B,qCAAqC,EACrC,kBAAkB,EAClB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EACN,yBAAyB,EACzB,gCAAgC,EAChC,mCAAmC,EACnC,8CAA8C,EAC9C,mCAAmC,EACnC,8CAA8C,EAC9C,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EACX,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,0BAA0B,EAC1B,6BAA6B,EAC7B,wCAAwC,EACxC,2BAA2B,EAC3B,kCAAkC,EAClC,6BAA6B,EAC7B,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC1B,6BAA6B,EAC7B,kCAAkC,EAClC,iCAAiC,EACjC,wCAAwC,EACxC,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EACN,yBAAyB,EACzB,mCAAmC,EACnC,iCAAiC,EACjC,qCAAqC,EACrC,kCAAkC,EAClC,MAAM,2CAA2C,CAAC;AACnD,YAAY,EACX,mBAAmB,EACnB,+BAA+B,EAC/B,6BAA6B,EAC7B,4BAA4B,EAC5B,2BAA2B,EAC3B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACN,2BAA2B,EAC3B,qCAAqC,EACrC,yBAAyB,EACzB,MAAM,yCAAyC,CAAC;AACjD,YAAY,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC/F,YAAY,EAAE,+BAA+B,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EACN,2BAA2B,EAC3B,4BAA4B,EAC5B,oCAAoC,EACpC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,gCAAgC,EAAE,MAAM,8CAA8C,CAAC;AAEhG,OAAO,EACN,gCAAgC,EAChC,6BAA6B,EAC7B,+BAA+B,EAC/B,mCAAmC,EACnC,MAAM,iCAAiC,CAAC;AACzC,YAAY,EACX,8BAA8B,EAC9B,uBAAuB,EACvB,0BAA0B,EAC1B,oCAAoC,EACpC,+BAA+B,EAC/B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,6BAA6B,EAC7B,+BAA+B,EAC/B,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,+BAA+B,EAC/B,4CAA4C,EAC5C,0CAA0C,EAC1C,qCAAqC,EACrC,4CAA4C,EAC5C,2CAA2C,EAC3C,sCAAsC,EACtC,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACX,sCAAsC,EACtC,gCAAgC,EAChC,oCAAoC,EACpC,+BAA+B,EAC/B,sCAAsC,EACtC,qCAAqC,EACrC,gCAAgC,EAChC,MAAM,6BAA6B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { integrationsPlugin } from "./integrations.plugin.js";
|
|
2
|
+
export * from "./catalog/integration-catalog.kind.js";
|
|
3
|
+
export * from "./catalog/integration-catalog.descriptor.js";
|
|
4
|
+
export * from "./catalog/integration-catalog.exposure.js";
|
|
5
|
+
export * from "./catalog/integration-catalog.http.js";
|
|
6
|
+
export * from "./catalog/queries.js";
|
|
7
|
+
export { getVibesIntegrationsClient } from "./client/index.js";
|
|
8
|
+
export { integrationProviderKind } from "./kinds/integration.kind.js";
|
|
9
|
+
export { IntegrationCategorySchema, IntegrationConnectionActorSchema, IntegrationConnectionSelectorSchema, IntegrationCredentialReferenceCandidatesSchema, IntegrationProviderDescriptorSchema, IntegrationProviderResolvedConfigurationSchema } from "./schemas/integration-descriptor.js";
|
|
10
|
+
export { IntegrationAuthModeSchema, IntegrationConnectionMetadataSchema, IntegrationConnectionStatusSchema, IntegrationConnectRequestResultSchema, IntegrationConnectionRefusalSchema } from "./status/integration-connection-status.js";
|
|
11
|
+
export { INTEGRATION_CONNECTION_KIND, IntegrationConnectionDescriptorSchema, integrationConnectionKind } from "./status/integration-connection.kind.js";
|
|
12
|
+
export { integrationConnectionStatus, resolveIntegrationConnection, resolveIntegrationConnectionMetadata } from "./status/integration-connection.queries.js";
|
|
13
|
+
export { isIntegrationProviderConnectable } from "./status/integration-connect.availability.js";
|
|
14
|
+
export { attachSecretToIntegrationService, listIntegrationServiceSecrets, resolveIntegrationServiceSecret, sendIntegrationAuthenticatedRequest } from "./server/integration-secrets.js";
|
|
15
|
+
export { integrationProviderDefaultIds, seedIntegrationProviderServices, cleanIntegrationProviderServices, INTEGRATION_PROVIDER_DEFAULTS_ID, INTEGRATION_PROVIDER_DEFAULTS_KIND, integrationProviderDefaultsKind, DeleteIntegrationProviderServicesInputSchema, IntegrationProviderDefaultDefinitionSchema, IntegrationProviderDefaultScopeSchema, IntegrationProviderDefaultServiceInputSchema, IntegrationProviderDefaultsDescriptorSchema, IntegrationProviderDefaultsStoreSchema } from "./server/system-defaults.js";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAO/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EACN,yBAAyB,EACzB,gCAAgC,EAChC,mCAAmC,EACnC,8CAA8C,EAC9C,mCAAmC,EACnC,8CAA8C,EAC9C,MAAM,qCAAqC,CAAC;AAuB7C,OAAO,EACN,yBAAyB,EACzB,mCAAmC,EACnC,iCAAiC,EACjC,qCAAqC,EACrC,kCAAkC,EAClC,MAAM,2CAA2C,CAAC;AAQnD,OAAO,EACN,2BAA2B,EAC3B,qCAAqC,EACrC,yBAAyB,EACzB,MAAM,yCAAyC,CAAC;AAGjD,OAAO,EACN,2BAA2B,EAC3B,4BAA4B,EAC5B,oCAAoC,EACpC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,gCAAgC,EAAE,MAAM,8CAA8C,CAAC;AAEhG,OAAO,EACN,gCAAgC,EAChC,6BAA6B,EAC7B,+BAA+B,EAC/B,mCAAmC,EACnC,MAAM,iCAAiC,CAAC;AAQzC,OAAO,EACN,6BAA6B,EAC7B,+BAA+B,EAC/B,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,+BAA+B,EAC/B,4CAA4C,EAC5C,0CAA0C,EAC1C,qCAAqC,EACrC,4CAA4C,EAC5C,2CAA2C,EAC3C,sCAAsC,EACtC,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Browser-safe integrations composition for renderer catalog surfaces. */
|
|
2
|
+
/**
|
|
3
|
+
* Registers the renderer-facing catalog and connection contracts and the
|
|
4
|
+
* runtime client, without provider implementations. Provider browser plugins
|
|
5
|
+
* may declare and lazily load their own connection behavior into this runtime.
|
|
6
|
+
* Native hosts use the mounted catalog for provider metadata; connection
|
|
7
|
+
* implementations remain responsible for host authorization.
|
|
8
|
+
*/
|
|
9
|
+
export declare const integrationsBrowserPlugin: import("@vibesdotdev/kernel").RuntimePlugin;
|
|
10
|
+
export default integrationsBrowserPlugin;
|
|
11
|
+
//# sourceMappingURL=integrations.browser.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.browser.plugin.d.ts","sourceRoot":"","sources":["../src/integrations.browser.plugin.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAQ3E;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,6CAYpC,CAAC;AAEH,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Browser-safe integrations composition for renderer catalog surfaces. */
|
|
2
|
+
import { createRuntimePlugin, loader } from '@vibesdotdev/kernel/factory';
|
|
3
|
+
import integrationsRuntimeClientDescriptor from "./client/integrations.runtime-client.descriptor.js";
|
|
4
|
+
import integrationCatalogDescriptor from "./catalog/integration-catalog.descriptor.js";
|
|
5
|
+
import { integrationCatalogKind } from "./catalog/integration-catalog.kind.js";
|
|
6
|
+
import { integrationConnectionKind } from "./status/integration-connection.kind.js";
|
|
7
|
+
/**
|
|
8
|
+
* Registers the renderer-facing catalog and connection contracts and the
|
|
9
|
+
* runtime client, without provider implementations. Provider browser plugins
|
|
10
|
+
* may declare and lazily load their own connection behavior into this runtime.
|
|
11
|
+
* Native hosts use the mounted catalog for provider metadata; connection
|
|
12
|
+
* implementations remain responsible for host authorization.
|
|
13
|
+
*/
|
|
14
|
+
export const integrationsBrowserPlugin = createRuntimePlugin({
|
|
15
|
+
id: 'integrations',
|
|
16
|
+
name: 'Integrations (Browser)',
|
|
17
|
+
description: 'Browser client for mounted integration catalog and provider connection capabilities',
|
|
18
|
+
dependencies: ['runtime-client'],
|
|
19
|
+
kinds: [integrationCatalogKind, integrationConnectionKind],
|
|
20
|
+
descriptors: [integrationCatalogDescriptor, integrationsRuntimeClientDescriptor],
|
|
21
|
+
loaders: [
|
|
22
|
+
loader('integrations', { kind: 'runtime/client', scope: 'browser' }, () => import("./client/integrations.runtime-client.browser.js"))
|
|
23
|
+
]
|
|
24
|
+
});
|
|
25
|
+
export default integrationsBrowserPlugin;
|
|
26
|
+
//# sourceMappingURL=integrations.browser.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.browser.plugin.js","sourceRoot":"","sources":["../src/integrations.browser.plugin.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,mCAAmC,MAAM,oDAAoD,CAAC;AACrG,OAAO,4BAA4B,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;IAC5D,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,qFAAqF;IAClG,YAAY,EAAE,CAAC,gBAAgB,CAAC;IAChC,KAAK,EAAE,CAAC,sBAAsB,EAAE,yBAAyB,CAAC;IAC1D,WAAW,EAAE,CAAC,4BAA4B,EAAE,mCAAmC,CAAC;IAChF,OAAO,EAAE;QACR,MAAM,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,CACzE,MAAM,CAAC,iDAAiD,CAAC,CACzD;KACD;CACD,CAAC,CAAC;AAEH,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.consumer.plugin.d.ts","sourceRoot":"","sources":["../src/integrations.consumer.plugin.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,0BAA0B,6CAQrC,CAAC;AACH,eAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRuntimePlugin, loader } from '@vibesdotdev/kernel/factory';
|
|
2
|
+
import { INTEGRATION_CATALOG_ID, INTEGRATION_CATALOG_KIND } from "./catalog/integration-catalog.kind.js";
|
|
3
|
+
export const integrationsConsumerPlugin = createRuntimePlugin({
|
|
4
|
+
id: 'integrations-consumer',
|
|
5
|
+
name: 'Integrations Consumer',
|
|
6
|
+
dependencies: ['integrations'],
|
|
7
|
+
loaders: [
|
|
8
|
+
loader(INTEGRATION_CATALOG_ID, { kind: INTEGRATION_CATALOG_KIND, scope: 'consumer.worker' }, () => import("./catalog/integration-catalog.capability.js"))
|
|
9
|
+
]
|
|
10
|
+
});
|
|
11
|
+
export default integrationsConsumerPlugin;
|
|
12
|
+
//# sourceMappingURL=integrations.consumer.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.consumer.plugin.js","sourceRoot":"","sources":["../src/integrations.consumer.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEzG,MAAM,CAAC,MAAM,0BAA0B,GAAG,mBAAmB,CAAC;IAC7D,EAAE,EAAE,uBAAuB;IAC3B,IAAI,EAAE,uBAAuB;IAC7B,YAAY,EAAE,CAAC,cAAc,CAAC;IAC9B,OAAO,EAAE;QACR,MAAM,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC1F,GAAG,EAAE,CAAC,MAAM,CAAC,6CAA6C,CAAC,CAAC;KAC7D;CACD,CAAC,CAAC;AACH,eAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integrations Plugin
|
|
3
|
+
*
|
|
4
|
+
* Registers the integration/provider runtime kind and makes this package
|
|
5
|
+
* a proper runtime plugin following the runtime-first modules pattern.
|
|
6
|
+
*/
|
|
7
|
+
import { type RuntimePlugin } from '@vibesdotdev/kernel/factory';
|
|
8
|
+
export declare const integrationsPlugin: RuntimePlugin;
|
|
9
|
+
export default integrationsPlugin;
|
|
10
|
+
//# sourceMappingURL=integrations.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.plugin.d.ts","sourceRoot":"","sources":["../src/integrations.plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAA+B,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAuB9F,eAAO,MAAM,kBAAkB,EAAE,aA0C/B,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integrations Plugin
|
|
3
|
+
*
|
|
4
|
+
* Registers the integration/provider runtime kind and makes this package
|
|
5
|
+
* a proper runtime plugin following the runtime-first modules pattern.
|
|
6
|
+
*/
|
|
7
|
+
import { createRuntimePlugin, loader } from '@vibesdotdev/kernel/factory';
|
|
8
|
+
import integrationsRuntimeClientDescriptor from "./client/integrations.runtime-client.descriptor.js";
|
|
9
|
+
import integrationCatalogDescriptor from "./catalog/integration-catalog.descriptor.js";
|
|
10
|
+
import { integrationCatalogRemoteExposure } from "./catalog/integration-catalog.exposure.js";
|
|
11
|
+
import { INTEGRATION_CATALOG_ID, INTEGRATION_CATALOG_KIND, integrationCatalogKind } from "./catalog/integration-catalog.kind.js";
|
|
12
|
+
// The `integrations` section root. It used to sit in the GitHub vendor pack,
|
|
13
|
+
// where nothing registered it — and where it would have made the whole
|
|
14
|
+
// Integrations section disappear for any app that composes Stripe but not
|
|
15
|
+
// GitHub. Its children (`integrations.providers` here, `integrations.github`,
|
|
16
|
+
// `integrations.stripe-billing`) all declare `parent: 'integrations'`, so the
|
|
17
|
+
// root belongs to the package that owns the `integration/provider` kind.
|
|
18
|
+
import integrationsDocsDescriptor from "./docs/integrations.docs.descriptor.js";
|
|
19
|
+
import integrationsProvidersDocsDescriptor from "./docs/integrations.providers.docs.descriptor.js";
|
|
20
|
+
import { integrationProviderKind } from "./kinds/integration.kind.js";
|
|
21
|
+
import { integrationConnectionKind } from "./status/integration-connection.kind.js";
|
|
22
|
+
import { integrationProviderDefaultsKind } from "./server/defaults/system-defaults.kind.js";
|
|
23
|
+
import systemSettingsReaderContextDescriptor from "./settings/system-settings-reader.context.descriptor.js";
|
|
24
|
+
import integrationStoreContextDescriptor from "./kinds/integration-store.context.descriptor.js";
|
|
25
|
+
export const integrationsPlugin = createRuntimePlugin({
|
|
26
|
+
id: 'integrations',
|
|
27
|
+
name: 'Integrations',
|
|
28
|
+
description: 'Third-party service integration layer and provider catalog',
|
|
29
|
+
// `'runtime'` is not a registered plugin — the runtime API is the
|
|
30
|
+
// host, not a plugin. Real hard deps are logging (for getLogger) and
|
|
31
|
+
// storage (the integration store kind delegates to a storage adapter for
|
|
32
|
+
// credentials). `runtime-client` is deliberately not a hard plugin dep:
|
|
33
|
+
// provider-only runtimes can register this plugin without composing a
|
|
34
|
+
// consumer client. The runtime defers the descriptor/loader registrations
|
|
35
|
+
// until that kind exists, and getVibesIntegrationsClient(runtime) installs the
|
|
36
|
+
// canonical runtime-client plugin when a consumer actually asks for it.
|
|
37
|
+
dependencies: ['logging', 'storage'],
|
|
38
|
+
kinds: [integrationProviderKind, integrationCatalogKind, integrationConnectionKind, integrationProviderDefaultsKind],
|
|
39
|
+
// integration/provider declares `contexts: ['system/settings-reader']`
|
|
40
|
+
// in kinds/integration.kind.ts. Without a registered descriptor for
|
|
41
|
+
// that context, runtime.buildContext throws and every consumer route
|
|
42
|
+
// that resolves an integration provider 500s (e.g. casework-web's
|
|
43
|
+
// /api/integrations/[id]/connect). Register the descriptor here so
|
|
44
|
+
// the kind owner is also the context owner. Implementations are
|
|
45
|
+
// optional — BaseIntegrationProvider falls back to
|
|
46
|
+
// createUnavailableSystemSettingsReader() when no impl is wired.
|
|
47
|
+
descriptors: [
|
|
48
|
+
systemSettingsReaderContextDescriptor,
|
|
49
|
+
integrationStoreContextDescriptor,
|
|
50
|
+
integrationCatalogDescriptor,
|
|
51
|
+
integrationsRuntimeClientDescriptor,
|
|
52
|
+
integrationsDocsDescriptor,
|
|
53
|
+
integrationsProvidersDocsDescriptor
|
|
54
|
+
],
|
|
55
|
+
loaders: [
|
|
56
|
+
loader('integrations', { kind: 'runtime/client' }, () => import("./client/integrations.runtime-client.js"))
|
|
57
|
+
],
|
|
58
|
+
remoteExposures: [
|
|
59
|
+
{
|
|
60
|
+
kindId: INTEGRATION_CATALOG_KIND,
|
|
61
|
+
assetId: INTEGRATION_CATALOG_ID,
|
|
62
|
+
exposure: integrationCatalogRemoteExposure
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
});
|
|
66
|
+
export default integrationsPlugin;
|
|
67
|
+
//# sourceMappingURL=integrations.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.plugin.js","sourceRoot":"","sources":["../src/integrations.plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAsB,MAAM,6BAA6B,CAAC;AAC9F,OAAO,mCAAmC,MAAM,oDAAoD,CAAC;AACrG,OAAO,4BAA4B,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EACN,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,MAAM,uCAAuC,CAAC;AAC/C,6EAA6E;AAC7E,uEAAuE;AACvE,0EAA0E;AAC1E,8EAA8E;AAC9E,8EAA8E;AAC9E,yEAAyE;AACzE,OAAO,0BAA0B,MAAM,wCAAwC,CAAC;AAChF,OAAO,mCAAmC,MAAM,kDAAkD,CAAC;AACnG,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAC5F,OAAO,qCAAqC,MAAM,yDAAyD,CAAC;AAC5G,OAAO,iCAAiC,MAAM,iDAAiD,CAAC;AAEhG,MAAM,CAAC,MAAM,kBAAkB,GAAkB,mBAAmB,CAAC;IACpE,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,4DAA4D;IACzE,kEAAkE;IAClE,qEAAqE;IACrE,yEAAyE;IACzE,wEAAwE;IACxE,sEAAsE;IACtE,0EAA0E;IAC1E,+EAA+E;IAC/E,wEAAwE;IACxE,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;IACpC,KAAK,EAAE,CAAC,uBAAuB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,+BAA+B,CAAC;IACpH,uEAAuE;IACvE,oEAAoE;IACpE,qEAAqE;IACrE,kEAAkE;IAClE,mEAAmE;IACnE,gEAAgE;IAChE,mDAAmD;IACnD,iEAAiE;IACjE,WAAW,EAAE;QACZ,qCAAqC;QACrC,iCAAiC;QACjC,4BAA4B;QAC5B,mCAAmC;QACnC,0BAA0B;QAC1B,mCAAmC;KACnC;IACD,OAAO,EAAE;QACR,MAAM,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,GAAG,EAAE,CACvD,MAAM,CAAC,yCAAyC,CAAC,CACjD;KACD;IACD,eAAe,EAAE;QAChB;YACC,MAAM,EAAE,wBAAwB;YAChC,OAAO,EAAE,sBAAsB;YAC/B,QAAQ,EAAE,gCAAgC;SAC1C;KACD;CACD,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const integrationStoreContextId = "integration/store";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: string;
|
|
4
|
+
kind: "context";
|
|
5
|
+
name?: string | undefined;
|
|
6
|
+
description?: string | undefined;
|
|
7
|
+
tags?: string[] | undefined;
|
|
8
|
+
hardware?: string[] | undefined;
|
|
9
|
+
enabled?: boolean | undefined;
|
|
10
|
+
priority?: number | undefined;
|
|
11
|
+
capabilityId?: string | undefined;
|
|
12
|
+
requiredContext?: string[] | undefined;
|
|
13
|
+
optionalContext?: string[] | undefined;
|
|
14
|
+
retention?: string | {
|
|
15
|
+
reason: string;
|
|
16
|
+
maxAgeDays?: number | undefined;
|
|
17
|
+
maxEntries?: number | undefined;
|
|
18
|
+
maxBytes?: number | undefined;
|
|
19
|
+
cascadeFrom?: string | undefined;
|
|
20
|
+
ageField?: string | undefined;
|
|
21
|
+
enforcedBy?: string | undefined;
|
|
22
|
+
} | undefined;
|
|
23
|
+
valueKind?: "service" | "data" | undefined;
|
|
24
|
+
valueSchema?: unknown;
|
|
25
|
+
config?: {
|
|
26
|
+
sources: ("literal" | "workspace" | "floor")[];
|
|
27
|
+
subset?: true | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
};
|
|
30
|
+
export default _default;
|
|
31
|
+
//# sourceMappingURL=integration-store.context.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-store.context.descriptor.d.ts","sourceRoot":"","sources":["../../src/kinds/integration-store.context.descriptor.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE7D,wBAKG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createContextDescriptor } from '@vibesdotdev/kernel/factory/context';
|
|
2
|
+
export const integrationStoreContextId = 'integration/store';
|
|
3
|
+
export default createContextDescriptor({
|
|
4
|
+
id: integrationStoreContextId,
|
|
5
|
+
name: 'Integration Store',
|
|
6
|
+
description: 'Runtime-local host adapter for integration configuration and credential persistence.'
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=integration-store.context.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-store.context.descriptor.js","sourceRoot":"","sources":["../../src/kinds/integration-store.context.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;AAE7D,eAAe,uBAAuB,CAAC;IACtC,EAAE,EAAE,yBAAyB;IAC7B,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACV,sFAAsF;CACvF,CAAC,CAAC"}
|