@vibesdotdev/integrations 0.0.0-stage → 1.0.0-rc.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/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,72 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { CredentialReferenceSchema } from '@vibesdotdev/kernel/credentials';
|
|
3
|
+
import { managedSecretScopeSchema } from '@vibesdotdev/secrets/schemas';
|
|
4
|
+
export const IntegrationSecretResourceTypeSchema = z.literal('integration');
|
|
5
|
+
export const AttachSecretToResourceInputSchema = z.object({
|
|
6
|
+
secretId: z.string().min(1),
|
|
7
|
+
resourceType: IntegrationSecretResourceTypeSchema,
|
|
8
|
+
resourceId: z.string().min(1),
|
|
9
|
+
attachedBy: z.string().min(1),
|
|
10
|
+
purpose: z.string().nullable().optional()
|
|
11
|
+
}).strict();
|
|
12
|
+
export const ListSecretsForResourceInputSchema = z.object({
|
|
13
|
+
resourceType: IntegrationSecretResourceTypeSchema,
|
|
14
|
+
resourceId: z.string().min(1)
|
|
15
|
+
}).strict();
|
|
16
|
+
export const IntegrationSecretAssociationSchema = z.object({
|
|
17
|
+
secretId: z.string().min(1)
|
|
18
|
+
}).strict();
|
|
19
|
+
export const RecordSecretUsageInputSchema = z.object({
|
|
20
|
+
resourceType: IntegrationSecretResourceTypeSchema,
|
|
21
|
+
resourceId: z.string().min(1),
|
|
22
|
+
secretId: z.string().min(1)
|
|
23
|
+
}).strict();
|
|
24
|
+
/** Association metadata only. Credential values remain owned by secrets/store. */
|
|
25
|
+
export const IntegrationSecretClientSchema = z.object({
|
|
26
|
+
attachSecretToResource: z.function({
|
|
27
|
+
input: [AttachSecretToResourceInputSchema],
|
|
28
|
+
output: z.promise(z.void())
|
|
29
|
+
}),
|
|
30
|
+
listSecretsForResource: z.function({
|
|
31
|
+
input: [ListSecretsForResourceInputSchema],
|
|
32
|
+
output: z.promise(z.array(IntegrationSecretAssociationSchema).readonly())
|
|
33
|
+
}),
|
|
34
|
+
recordSecretUsage: z.function({
|
|
35
|
+
input: [RecordSecretUsageInputSchema],
|
|
36
|
+
output: z.promise(z.void())
|
|
37
|
+
}).optional()
|
|
38
|
+
}).strict();
|
|
39
|
+
const RuntimeRefContractSchema = z.object({
|
|
40
|
+
resolveCredential: z.function(),
|
|
41
|
+
query: z.function()
|
|
42
|
+
}).passthrough();
|
|
43
|
+
const RuntimeRefSchema = z.custom((value) => RuntimeRefContractSchema.safeParse(value).success);
|
|
44
|
+
export const AttachIntegrationSecretOptionsSchema = z.object({
|
|
45
|
+
runtime: RuntimeRefSchema,
|
|
46
|
+
client: IntegrationSecretClientSchema,
|
|
47
|
+
serviceId: z.string().min(1),
|
|
48
|
+
secretId: z.string().min(1),
|
|
49
|
+
attachedBy: z.string().min(1),
|
|
50
|
+
scope: managedSecretScopeSchema,
|
|
51
|
+
scopeId: z.string().trim().min(1),
|
|
52
|
+
purpose: z.string().nullable().optional()
|
|
53
|
+
}).strict();
|
|
54
|
+
export const ListIntegrationServiceSecretsOptionsSchema = z.object({
|
|
55
|
+
runtime: RuntimeRefSchema,
|
|
56
|
+
client: IntegrationSecretClientSchema,
|
|
57
|
+
serviceId: z.string().min(1),
|
|
58
|
+
scope: managedSecretScopeSchema,
|
|
59
|
+
scopeId: z.string().trim().min(1)
|
|
60
|
+
}).strict();
|
|
61
|
+
export const ResolveIntegrationSecretOptionsSchema = z.object({
|
|
62
|
+
runtime: RuntimeRefSchema,
|
|
63
|
+
client: IntegrationSecretClientSchema,
|
|
64
|
+
serviceId: z.string().min(1),
|
|
65
|
+
secretName: z.string().min(1).optional(),
|
|
66
|
+
providerType: z.string().min(1).optional(),
|
|
67
|
+
reference: CredentialReferenceSchema.optional(),
|
|
68
|
+
scope: managedSecretScopeSchema,
|
|
69
|
+
scopeId: z.string().trim().min(1),
|
|
70
|
+
recordUsage: z.boolean().default(false)
|
|
71
|
+
}).strict();
|
|
72
|
+
//# sourceMappingURL=integration-secrets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-secrets.js","sourceRoot":"","sources":["../../../src/server/schemas/integration-secrets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,yBAAyB,EAA4B,MAAM,iCAAiC,CAAC;AACtG,OAAO,EACN,wBAAwB,EAGxB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AAG5E,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,YAAY,EAAE,mCAAmC;IACjD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD,YAAY,EAAE,mCAAmC;IACjD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7B,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CA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AAC,GAAG,CAAC,CAAC,CAAC;IAC5B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACxC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC1C,SAAS,EAAE,yBAAyB,CAAC,QAAQ,EAAE;IAC/C,KAAK,EAAE,wBAAwB;IAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACvC,CAAC,CAAC,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { IntegrationConfigSchema } from '../../schemas/integration-descriptor.ts';
|
|
3
|
+
export type IntegrationProviderDefaultConfig = z.infer<typeof IntegrationConfigSchema>;
|
|
4
|
+
export declare const INTEGRATION_PROVIDER_DEFAULTS_KIND: "integration/provider-defaults";
|
|
5
|
+
export declare const INTEGRATION_PROVIDER_DEFAULTS_ID: "defaults";
|
|
6
|
+
/** The scoped placement every seeded service row carries. */
|
|
7
|
+
export declare const IntegrationProviderDefaultScopeSchema: z.ZodObject<{
|
|
8
|
+
scope: z.ZodEnum<{
|
|
9
|
+
user: "user";
|
|
10
|
+
platform: "platform";
|
|
11
|
+
project: "project";
|
|
12
|
+
org: "org";
|
|
13
|
+
}>;
|
|
14
|
+
scopeId: z.ZodString;
|
|
15
|
+
featureId: z.ZodString;
|
|
16
|
+
serviceKey: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type IntegrationProviderDefaultScope = z.infer<typeof IntegrationProviderDefaultScopeSchema>;
|
|
19
|
+
/** One provider service a host declares for seeding. */
|
|
20
|
+
export declare const IntegrationProviderDefaultDefinitionSchema: z.ZodObject<{
|
|
21
|
+
integrationId: z.ZodString;
|
|
22
|
+
provider: z.ZodString;
|
|
23
|
+
interfaceId: z.ZodDefault<z.ZodString>;
|
|
24
|
+
slug: z.ZodString;
|
|
25
|
+
label: z.ZodString;
|
|
26
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>>>;
|
|
27
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
28
|
+
permissions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
29
|
+
status: z.ZodDefault<z.ZodLiteral<"active">>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type IntegrationProviderDefaultDefinition = z.infer<typeof IntegrationProviderDefaultDefinitionSchema>;
|
|
32
|
+
/**
|
|
33
|
+
* Open, schema-owned descriptor: a host composes one of these to declare
|
|
34
|
+
* which provider services its deployment seeds and cleans. The generic core
|
|
35
|
+
* ships no vendor selection of its own.
|
|
36
|
+
*/
|
|
37
|
+
export declare const IntegrationProviderDefaultsDescriptorSchema: z.ZodObject<{
|
|
38
|
+
id: z.ZodString;
|
|
39
|
+
name: z.ZodOptional<z.ZodString>;
|
|
40
|
+
description: z.ZodOptional<z.ZodString>;
|
|
41
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
|
+
hardware: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
capabilityId: z.ZodOptional<z.ZodString>;
|
|
46
|
+
requiredContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
47
|
+
optionalContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
+
config: z.ZodOptional<z.ZodUnknown>;
|
|
49
|
+
retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
50
|
+
maxAgeDays: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
maxEntries: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
maxBytes: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
cascadeFrom: z.ZodOptional<z.ZodString>;
|
|
54
|
+
ageField: z.ZodOptional<z.ZodString>;
|
|
55
|
+
reason: z.ZodString;
|
|
56
|
+
enforcedBy: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, z.core.$strip>]>>;
|
|
58
|
+
kind: z.ZodLiteral<"integration/provider-defaults">;
|
|
59
|
+
scope: z.ZodObject<{
|
|
60
|
+
scope: z.ZodEnum<{
|
|
61
|
+
user: "user";
|
|
62
|
+
platform: "platform";
|
|
63
|
+
project: "project";
|
|
64
|
+
org: "org";
|
|
65
|
+
}>;
|
|
66
|
+
scopeId: z.ZodString;
|
|
67
|
+
featureId: z.ZodString;
|
|
68
|
+
serviceKey: z.ZodString;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
definitions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
71
|
+
integrationId: z.ZodString;
|
|
72
|
+
provider: z.ZodString;
|
|
73
|
+
interfaceId: z.ZodDefault<z.ZodString>;
|
|
74
|
+
slug: z.ZodString;
|
|
75
|
+
label: z.ZodString;
|
|
76
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>>>;
|
|
77
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
78
|
+
permissions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
79
|
+
status: z.ZodDefault<z.ZodLiteral<"active">>;
|
|
80
|
+
}, z.core.$strip>>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
export type IntegrationProviderDefaultsDescriptor = z.infer<typeof IntegrationProviderDefaultsDescriptorSchema>;
|
|
83
|
+
/** The store operation inputs the seeding owner performs. */
|
|
84
|
+
export declare const IntegrationProviderDefaultServiceInputSchema: z.ZodObject<{
|
|
85
|
+
integrationId: z.ZodString;
|
|
86
|
+
provider: z.ZodString;
|
|
87
|
+
interfaceId: z.ZodDefault<z.ZodString>;
|
|
88
|
+
slug: z.ZodString;
|
|
89
|
+
label: z.ZodString;
|
|
90
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>>>;
|
|
91
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
92
|
+
permissions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
93
|
+
status: z.ZodDefault<z.ZodLiteral<"active">>;
|
|
94
|
+
scope: z.ZodEnum<{
|
|
95
|
+
user: "user";
|
|
96
|
+
platform: "platform";
|
|
97
|
+
project: "project";
|
|
98
|
+
org: "org";
|
|
99
|
+
}>;
|
|
100
|
+
scopeId: z.ZodString;
|
|
101
|
+
featureId: z.ZodString;
|
|
102
|
+
serviceKey: z.ZodString;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
export type IntegrationProviderDefaultServiceInput = z.infer<typeof IntegrationProviderDefaultServiceInputSchema>;
|
|
105
|
+
export declare const DeleteIntegrationProviderServicesInputSchema: z.ZodObject<{
|
|
106
|
+
scope: z.ZodEnum<{
|
|
107
|
+
user: "user";
|
|
108
|
+
platform: "platform";
|
|
109
|
+
project: "project";
|
|
110
|
+
org: "org";
|
|
111
|
+
}>;
|
|
112
|
+
scopeId: z.ZodString;
|
|
113
|
+
featureId: z.ZodString;
|
|
114
|
+
serviceKey: z.ZodString;
|
|
115
|
+
integrationIds: z.ZodArray<z.ZodString>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
export type DeleteIntegrationProviderServicesInput = z.infer<typeof DeleteIntegrationProviderServicesInputSchema>;
|
|
118
|
+
/** The store port the host supplies; seeding never opens a store itself. */
|
|
119
|
+
export declare const IntegrationProviderDefaultsStoreSchema: z.ZodObject<{
|
|
120
|
+
upsertIntegrationProviderService: z.ZodCustom<(input: IntegrationProviderDefaultServiceInput) => Promise<void>, (input: IntegrationProviderDefaultServiceInput) => Promise<void>>;
|
|
121
|
+
deleteIntegrationProviderServices: z.ZodCustom<(input: DeleteIntegrationProviderServicesInput) => Promise<void>, (input: DeleteIntegrationProviderServicesInput) => Promise<void>>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
export type IntegrationProviderDefaultsStore = z.infer<typeof IntegrationProviderDefaultsStoreSchema>;
|
|
124
|
+
//# sourceMappingURL=system-defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-defaults.d.ts","sourceRoot":"","sources":["../../../src/server/schemas/system-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAGlF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEvF,eAAO,MAAM,kCAAkC,EAAG,+BAAwC,CAAC;AAC3F,eAAO,MAAM,gCAAgC,EAAG,UAAmB,CAAC;AAEpE,6DAA6D;AAC7D,eAAO,MAAM,qCAAqC;;;;;;;;;;iBAKhD,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEpG,wDAAwD;AACxD,eAAO,MAAM,0CAA0C;;;;;;;;;;iBAWrD,CAAC;AACH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,CAAC;AAE9G;;;;GAIG;AACH,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAItD,CAAC;AACH,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC;AAEhH,6DAA6D;AAC7D,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;iBACsC,CAAC;AAChG,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4CAA4C,CAAC,CAAC;AAElH,eAAO,MAAM,4CAA4C;;;;;;;;;;;iBAGvD,CAAC;AACH,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4CAA4C,CAAC,CAAC;AAElH,4EAA4E;AAC5E,eAAO,MAAM,sCAAsC;0DACC,sCAAsC,KAAK,OAAO,CAAC,IAAI,CAAC,UAAxD,sCAAsC,KAAK,OAAO,CAAC,IAAI,CAAC;2DAGvD,sCAAsC,KAAK,OAAO,CAAC,IAAI,CAAC,UAAxD,sCAAsC,KAAK,OAAO,CAAC,IAAI,CAAC;iBAG3G,CAAC;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { RuntimeDescriptorSchema } from '@vibesdotdev/kernel/schemas/descriptor';
|
|
3
|
+
import { IntegrationConfigSchema } from "../../schemas/integration-descriptor.js";
|
|
4
|
+
import { managedSecretScopeSchema } from '@vibesdotdev/secrets/schemas';
|
|
5
|
+
export const INTEGRATION_PROVIDER_DEFAULTS_KIND = 'integration/provider-defaults';
|
|
6
|
+
export const INTEGRATION_PROVIDER_DEFAULTS_ID = 'defaults';
|
|
7
|
+
/** The scoped placement every seeded service row carries. */
|
|
8
|
+
export const IntegrationProviderDefaultScopeSchema = z.object({
|
|
9
|
+
scope: managedSecretScopeSchema,
|
|
10
|
+
scopeId: z.string().min(1),
|
|
11
|
+
featureId: z.string().min(1),
|
|
12
|
+
serviceKey: z.string().min(1)
|
|
13
|
+
});
|
|
14
|
+
/** One provider service a host declares for seeding. */
|
|
15
|
+
export const IntegrationProviderDefaultDefinitionSchema = z.object({
|
|
16
|
+
integrationId: z.string().min(1),
|
|
17
|
+
provider: z.string().min(1),
|
|
18
|
+
/** The provider kind the id resolves through. */
|
|
19
|
+
interfaceId: z.string().min(1).default('integration/provider'),
|
|
20
|
+
slug: z.string().min(1),
|
|
21
|
+
label: z.string().min(1),
|
|
22
|
+
config: IntegrationConfigSchema.default({}),
|
|
23
|
+
enabled: z.boolean().default(true),
|
|
24
|
+
permissions: z.array(z.string()).default([]),
|
|
25
|
+
status: z.literal('active').default('active')
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Open, schema-owned descriptor: a host composes one of these to declare
|
|
29
|
+
* which provider services its deployment seeds and cleans. The generic core
|
|
30
|
+
* ships no vendor selection of its own.
|
|
31
|
+
*/
|
|
32
|
+
export const IntegrationProviderDefaultsDescriptorSchema = RuntimeDescriptorSchema.extend({
|
|
33
|
+
kind: z.literal(INTEGRATION_PROVIDER_DEFAULTS_KIND),
|
|
34
|
+
scope: IntegrationProviderDefaultScopeSchema,
|
|
35
|
+
definitions: z.array(IntegrationProviderDefaultDefinitionSchema).default([])
|
|
36
|
+
});
|
|
37
|
+
/** The store operation inputs the seeding owner performs. */
|
|
38
|
+
export const IntegrationProviderDefaultServiceInputSchema = IntegrationProviderDefaultDefinitionSchema.extend(IntegrationProviderDefaultScopeSchema.shape);
|
|
39
|
+
export const DeleteIntegrationProviderServicesInputSchema = z.object({
|
|
40
|
+
integrationIds: z.array(z.string().min(1)).min(1),
|
|
41
|
+
...IntegrationProviderDefaultScopeSchema.shape
|
|
42
|
+
});
|
|
43
|
+
/** The store port the host supplies; seeding never opens a store itself. */
|
|
44
|
+
export const IntegrationProviderDefaultsStoreSchema = z.object({
|
|
45
|
+
upsertIntegrationProviderService: z.custom((value) => value instanceof Function),
|
|
46
|
+
deleteIntegrationProviderServices: z.custom((value) => value instanceof Function)
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=system-defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-defaults.js","sourceRoot":"","sources":["../../../src/server/schemas/system-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAIxE,MAAM,CAAC,MAAM,kCAAkC,GAAG,+BAAwC,CAAC;AAC3F,MAAM,CAAC,MAAM,gCAAgC,GAAG,UAAmB,CAAC;AAEpE,6DAA6D;AAC7D,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7D,KAAK,EAAE,wBAAwB;IAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7B,CAAC,CAAC;AAGH,wDAAwD;AACxD,MAAM,CAAC,MAAM,0CAA0C,GAAG,CAAC,CAAC,MAAM,CAAC;IAClE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,QAAQ,EAAE,CAAC,CAAC,MAAM,E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CAAqC,CAAC,KAAK;CAC9C,CAAC,CAAC;AAGH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9D,gCAAgC,EAAE,CAAC,CAAC,MAAM,CACzC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,YAAY,QAAQ,CACpC;IACD,iCAAiC,EAAE,CAAC,CAAC,MAAM,CAC1C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,YAAY,QAAQ,CACpC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RuntimeRef } from '@vibesdotdev/kernel';
|
|
2
|
+
import { type IntegrationProviderDefaultsStore } from './schemas/system-defaults.ts';
|
|
3
|
+
export { DeleteIntegrationProviderServicesInputSchema, IntegrationProviderDefaultDefinitionSchema, IntegrationProviderDefaultScopeSchema, IntegrationProviderDefaultServiceInputSchema, IntegrationProviderDefaultsDescriptorSchema, IntegrationProviderDefaultsStoreSchema } from './schemas/system-defaults.ts';
|
|
4
|
+
export type { DeleteIntegrationProviderServicesInput, IntegrationProviderDefaultConfig, IntegrationProviderDefaultDefinition, IntegrationProviderDefaultScope, IntegrationProviderDefaultServiceInput, IntegrationProviderDefaultsDescriptor, IntegrationProviderDefaultsStore } from './schemas/system-defaults.ts';
|
|
5
|
+
export { INTEGRATION_PROVIDER_DEFAULTS_ID, INTEGRATION_PROVIDER_DEFAULTS_KIND, integrationProviderDefaultsKind } from './defaults/system-defaults.kind.ts';
|
|
6
|
+
/**
|
|
7
|
+
* The canonical ids of the provider services the composed runtime declares.
|
|
8
|
+
* Terminal export reconciliation derives this from the host's descriptors; it
|
|
9
|
+
* is no longer a fixed list shipped by the generic core.
|
|
10
|
+
*/
|
|
11
|
+
export declare function integrationProviderDefaultIds(runtime: RuntimeRef): Promise<string[]>;
|
|
12
|
+
/** Seed exactly the scoped definitions the host declared. */
|
|
13
|
+
export declare function seedIntegrationProviderServices(runtime: RuntimeRef, store: IntegrationProviderDefaultsStore): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Clean exactly the declared scoped definitions. Cleanup is scoped to the
|
|
16
|
+
* declared ids plus the declared feature/service/scope placement — it never
|
|
17
|
+
* broadens to delete rows the host did not declare.
|
|
18
|
+
*/
|
|
19
|
+
export declare function cleanIntegrationProviderServices(runtime: RuntimeRef, store: IntegrationProviderDefaultsStore): Promise<void>;
|
|
20
|
+
//# sourceMappingURL=system-defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-defaults.d.ts","sourceRoot":"","sources":["../../src/server/system-defaults.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EASN,KAAK,gCAAgC,EACrC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACN,4CAA4C,EAC5C,0CAA0C,EAC1C,qCAAqC,EACrC,4CAA4C,EAC5C,2CAA2C,EAC3C,sCAAsC,EACtC,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EACX,sCAAsC,EACtC,gCAAgC,EAChC,oCAAoC,EACpC,+BAA+B,EAC/B,sCAAsC,EACtC,qCAAqC,EACrC,gCAAgC,EAChC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACN,gCAAgC,EAChC,kCAAkC,EAClC,+BAA+B,EAC/B,MAAM,oCAAoC,CAAC;AAE5C;;;;GAIG;AACH,wBAAsB,6BAA6B,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAI1F;AAED,6DAA6D;AAC7D,wBAAsB,+BAA+B,CACpD,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,gCAAgC,GACrC,OAAO,CAAC,IAAI,CAAC,CASf;AAED;;;;GAIG;AACH,wBAAsB,gCAAgC,CACrD,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,gCAAgC,GACrC,OAAO,CAAC,IAAI,CAAC,CAWf"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
2
|
+
import { parseIntegrationBoundary } from "../schemas/boundary.js";
|
|
3
|
+
import { INTEGRATION_PROVIDER_DEFAULTS_ID, INTEGRATION_PROVIDER_DEFAULTS_KIND, DeleteIntegrationProviderServicesInputSchema, IntegrationProviderDefaultServiceInputSchema, IntegrationProviderDefaultsDescriptorSchema, IntegrationProviderDefaultsStoreSchema } from "./schemas/system-defaults.js";
|
|
4
|
+
export { DeleteIntegrationProviderServicesInputSchema, IntegrationProviderDefaultDefinitionSchema, IntegrationProviderDefaultScopeSchema, IntegrationProviderDefaultServiceInputSchema, IntegrationProviderDefaultsDescriptorSchema, IntegrationProviderDefaultsStoreSchema } from "./schemas/system-defaults.js";
|
|
5
|
+
export { INTEGRATION_PROVIDER_DEFAULTS_ID, INTEGRATION_PROVIDER_DEFAULTS_KIND, integrationProviderDefaultsKind } from "./defaults/system-defaults.kind.js";
|
|
6
|
+
/**
|
|
7
|
+
* The canonical ids of the provider services the composed runtime declares.
|
|
8
|
+
* Terminal export reconciliation derives this from the host's descriptors; it
|
|
9
|
+
* is no longer a fixed list shipped by the generic core.
|
|
10
|
+
*/
|
|
11
|
+
export async function integrationProviderDefaultIds(runtime) {
|
|
12
|
+
return (await declaredProviderDefaults(runtime)).definitions.map((definition) => definition.integrationId);
|
|
13
|
+
}
|
|
14
|
+
/** Seed exactly the scoped definitions the host declared. */
|
|
15
|
+
export async function seedIntegrationProviderServices(runtime, store) {
|
|
16
|
+
const declarations = await declaredProviderDefaults(runtime);
|
|
17
|
+
const scopedStore = parseIntegrationBoundary(IntegrationProviderDefaultsStoreSchema, store);
|
|
18
|
+
for (const definition of declarations.definitions) {
|
|
19
|
+
const input = { ...definition, ...declarations.scope };
|
|
20
|
+
await scopedStore.upsertIntegrationProviderService(parseIntegrationBoundary(IntegrationProviderDefaultServiceInputSchema, input));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Clean exactly the declared scoped definitions. Cleanup is scoped to the
|
|
25
|
+
* declared ids plus the declared feature/service/scope placement — it never
|
|
26
|
+
* broadens to delete rows the host did not declare.
|
|
27
|
+
*/
|
|
28
|
+
export async function cleanIntegrationProviderServices(runtime, store) {
|
|
29
|
+
const declarations = await declaredProviderDefaults(runtime);
|
|
30
|
+
const scopedStore = parseIntegrationBoundary(IntegrationProviderDefaultsStoreSchema, store);
|
|
31
|
+
if (declarations.definitions.length === 0)
|
|
32
|
+
return;
|
|
33
|
+
await scopedStore.deleteIntegrationProviderServices(parseIntegrationBoundary(DeleteIntegrationProviderServicesInputSchema, {
|
|
34
|
+
integrationIds: declarations.definitions.map((definition) => definition.integrationId),
|
|
35
|
+
...declarations.scope
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
async function declaredProviderDefaults(runtime) {
|
|
39
|
+
if (!runtime.hasKind(INTEGRATION_PROVIDER_DEFAULTS_KIND)) {
|
|
40
|
+
throw new CapabilityError('No provider defaults are composed for this runtime.', 'UNAVAILABLE', {
|
|
41
|
+
reason: 'integration-provider-defaults-undeclared',
|
|
42
|
+
retryable: false
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const candidate = await runtime
|
|
46
|
+
.query(INTEGRATION_PROVIDER_DEFAULTS_KIND)
|
|
47
|
+
.withId(INTEGRATION_PROVIDER_DEFAULTS_ID)
|
|
48
|
+
.enabled()
|
|
49
|
+
.firstDescriptorAsync();
|
|
50
|
+
if (!candidate) {
|
|
51
|
+
throw new CapabilityError('No provider defaults are composed for this runtime.', 'UNAVAILABLE', {
|
|
52
|
+
reason: 'integration-provider-defaults-undeclared',
|
|
53
|
+
retryable: false
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return parseIntegrationBoundary(IntegrationProviderDefaultsDescriptorSchema, candidate);
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=system-defaults.js.map
|
|
@@ -0,0 +1 @@
|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
|
2
|
+
import { type SystemSettingsReader } from '../schemas/settings.ts';
|
|
3
|
+
import type { IntegrationConfigValue } from '../schemas/integration-descriptor.ts';
|
|
4
|
+
export type { SystemSettingsReader } from '../schemas/settings.ts';
|
|
5
|
+
export declare const systemSettingsReaderContextId = "system/settings-reader";
|
|
6
|
+
/** An unwired reader confirms absence. Failures from a mounted reader propagate. */
|
|
7
|
+
export declare function createUnavailableSystemSettingsReader(_runtime?: RuntimeRef): SystemSettingsReader;
|
|
8
|
+
export declare function createInMemorySettingsReader(settings?: Record<string, IntegrationConfigValue>): SystemSettingsReader;
|
|
9
|
+
/** Check the context boundary while preserving the host reader's identity and receiver. */
|
|
10
|
+
export declare function isSystemSettingsReader<T>(value: T): value is T & SystemSettingsReader;
|
|
11
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/settings/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAyD,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC1H,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACnF,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,eAAO,MAAM,6BAA6B,2BAA2B,CAAC;AAEtE,oFAAoF;AACpF,wBAAgB,qCAAqC,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,oBAAoB,CAEjG;AAED,wBAAgB,4BAA4B,CAC3C,QAAQ,GAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAM,GACnD,oBAAoB,CAMtB;AAED,2FAA2F;AAC3F,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,oBAAoB,CAGrF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IntegrationSettingsSchema, SystemSettingsReaderSchema } from "../schemas/settings.js";
|
|
2
|
+
export const systemSettingsReaderContextId = 'system/settings-reader';
|
|
3
|
+
/** An unwired reader confirms absence. Failures from a mounted reader propagate. */
|
|
4
|
+
export function createUnavailableSystemSettingsReader(_runtime) {
|
|
5
|
+
return { get: () => undefined, getAll: () => ({}) };
|
|
6
|
+
}
|
|
7
|
+
export function createInMemorySettingsReader(settings = {}) {
|
|
8
|
+
const store = IntegrationSettingsSchema.parse(settings);
|
|
9
|
+
return {
|
|
10
|
+
get: (key) => store[key],
|
|
11
|
+
getAll: () => ({ ...store })
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/** Check the context boundary while preserving the host reader's identity and receiver. */
|
|
15
|
+
export function isSystemSettingsReader(value) {
|
|
16
|
+
const parsed = SystemSettingsReaderSchema.safeParse(value);
|
|
17
|
+
return parsed.success;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/settings/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAA6B,MAAM,wBAAwB,CAAC;AAI1H,MAAM,CAAC,MAAM,6BAA6B,GAAG,wBAAwB,CAAC;AAEtE,oFAAoF;AACpF,MAAM,UAAU,qCAAqC,CAAC,QAAqB;IAC1E,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC3C,WAAmD,EAAE;IAErD,MAAM,KAAK,GAAG,yBAAyB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACxD,OAAO;QACN,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC;QACxB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;KAC5B,CAAC;AACH,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,sBAAsB,CAAI,KAAQ;IACjD,MAAM,MAAM,GAAG,0BAA0B,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC3D,OAAO,MAAM,CAAC,OAAO,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System Settings Reader Context Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Registers the `system/settings-reader` context kind with the runtime.
|
|
5
|
+
*
|
|
6
|
+
* Provider descriptors name this as an optional Kernel context by default.
|
|
7
|
+
* Hosts may provide a real settings reader or explicitly require one.
|
|
8
|
+
*
|
|
9
|
+
* Implementations are optional — `BaseIntegrationProvider` falls back to
|
|
10
|
+
* `createUnavailableSystemSettingsReader()` when no impl is present in the
|
|
11
|
+
* resolved context. A registered implementation's failure propagates; only
|
|
12
|
+
* confirmed absence permits that fallback.
|
|
13
|
+
*/
|
|
14
|
+
declare const systemSettingsReaderDescriptor: {
|
|
15
|
+
id: string;
|
|
16
|
+
kind: "context";
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
description?: string | undefined;
|
|
19
|
+
tags?: string[] | undefined;
|
|
20
|
+
hardware?: string[] | undefined;
|
|
21
|
+
enabled?: boolean | undefined;
|
|
22
|
+
priority?: number | undefined;
|
|
23
|
+
capabilityId?: string | undefined;
|
|
24
|
+
requiredContext?: string[] | undefined;
|
|
25
|
+
optionalContext?: string[] | undefined;
|
|
26
|
+
retention?: string | {
|
|
27
|
+
reason: string;
|
|
28
|
+
maxAgeDays?: number | undefined;
|
|
29
|
+
maxEntries?: number | undefined;
|
|
30
|
+
maxBytes?: number | undefined;
|
|
31
|
+
cascadeFrom?: string | undefined;
|
|
32
|
+
ageField?: string | undefined;
|
|
33
|
+
enforcedBy?: string | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
valueKind?: "service" | "data" | undefined;
|
|
36
|
+
valueSchema?: unknown;
|
|
37
|
+
config?: {
|
|
38
|
+
sources: ("literal" | "workspace" | "floor")[];
|
|
39
|
+
subset?: true | undefined;
|
|
40
|
+
} | undefined;
|
|
41
|
+
};
|
|
42
|
+
export default systemSettingsReaderDescriptor;
|
|
43
|
+
//# sourceMappingURL=system-settings-reader.context.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-settings-reader.context.descriptor.d.ts","sourceRoot":"","sources":["../../src/settings/system-settings-reader.context.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,QAAA,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMlC,CAAC;AAEH,eAAe,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System Settings Reader Context Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Registers the `system/settings-reader` context kind with the runtime.
|
|
5
|
+
*
|
|
6
|
+
* Provider descriptors name this as an optional Kernel context by default.
|
|
7
|
+
* Hosts may provide a real settings reader or explicitly require one.
|
|
8
|
+
*
|
|
9
|
+
* Implementations are optional — `BaseIntegrationProvider` falls back to
|
|
10
|
+
* `createUnavailableSystemSettingsReader()` when no impl is present in the
|
|
11
|
+
* resolved context. A registered implementation's failure propagates; only
|
|
12
|
+
* confirmed absence permits that fallback.
|
|
13
|
+
*/
|
|
14
|
+
import { createContextDescriptor } from '@vibesdotdev/kernel/factory/context';
|
|
15
|
+
import { systemSettingsReaderContextId } from "./context.js";
|
|
16
|
+
const systemSettingsReaderDescriptor = createContextDescriptor({
|
|
17
|
+
id: systemSettingsReaderContextId,
|
|
18
|
+
name: 'System Settings Reader',
|
|
19
|
+
description: 'Read-only access to system-level settings (feature flags, integration config defaults). Required by every integration/provider kind so providers can resolve settings-driven configuration.',
|
|
20
|
+
tags: ['integrations', 'settings', 'context']
|
|
21
|
+
});
|
|
22
|
+
export default systemSettingsReaderDescriptor;
|
|
23
|
+
//# sourceMappingURL=system-settings-reader.context.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-settings-reader.context.descriptor.js","sourceRoot":"","sources":["../../src/settings/system-settings-reader.context.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAE7D,MAAM,8BAA8B,GAAG,uBAAuB,CAAC;IAC9D,EAAE,EAAE,6BAA6B;IACjC,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EACV,6LAA6L;IAC9L,IAAI,EAAE,CAAC,cAAc,EAAE,UAAU,EAAE,SAAS,CAAC;CAC7C,CAAC,CAAC;AAEH,eAAe,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IntegrationConnectionMetadata } from '../schemas/integration-connection.ts';
|
|
2
|
+
import type { IntegrationProviderDescriptor } from '../schemas/integration-descriptor.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Svelte-safe connect availability for one provider descriptor.
|
|
5
|
+
*
|
|
6
|
+
* Availability comes from the provider's DECLARED connection metadata only:
|
|
7
|
+
* `connection.connectable` on the descriptor (the catalog projection keeps
|
|
8
|
+
* this field; configuration, credentials and OAuth endpoints are stripped).
|
|
9
|
+
* There is no provider-id admission list and no credential-shape heuristic:
|
|
10
|
+
* a descriptor that declares nothing is never connectable, and a host
|
|
11
|
+
* reference credential never makes one connectable by itself.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isIntegrationProviderConnectable(provider: Pick<IntegrationProviderDescriptor, 'enabled' | 'connection'>): provider is Pick<IntegrationProviderDescriptor, 'enabled' | 'connection'> & {
|
|
14
|
+
connection: IntegrationConnectionMetadata;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=integration-connect.availability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-connect.availability.d.ts","sourceRoot":"","sources":["../../src/status/integration-connect.availability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AAE1F;;;;;;;;;GASG;AACH,wBAAgB,gCAAgC,CAC/C,QAAQ,EAAE,IAAI,CAAC,6BAA6B,EAAE,SAAS,GAAG,YAAY,CAAC,GACrE,QAAQ,IAAI,IAAI,CAAC,6BAA6B,EAAE,SAAS,GAAG,YAAY,CAAC,GAAG;IAC9E,UAAU,EAAE,6BAA6B,CAAC;CAC1C,CAEA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte-safe connect availability for one provider descriptor.
|
|
3
|
+
*
|
|
4
|
+
* Availability comes from the provider's DECLARED connection metadata only:
|
|
5
|
+
* `connection.connectable` on the descriptor (the catalog projection keeps
|
|
6
|
+
* this field; configuration, credentials and OAuth endpoints are stripped).
|
|
7
|
+
* There is no provider-id admission list and no credential-shape heuristic:
|
|
8
|
+
* a descriptor that declares nothing is never connectable, and a host
|
|
9
|
+
* reference credential never makes one connectable by itself.
|
|
10
|
+
*/
|
|
11
|
+
export function isIntegrationProviderConnectable(provider) {
|
|
12
|
+
return provider.enabled !== false && provider.connection?.connectable === true;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=integration-connect.availability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-connect.availability.js","sourceRoot":"","sources":["../../src/status/integration-connect.availability.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,MAAM,UAAU,gCAAgC,CAC/C,QAAuE;IAIvE,OAAO,QAAQ,CAAC,OAAO,KAAK,KAAK,IAAI,QAAQ,CAAC,UAAU,EAAE,WAAW,KAAK,IAAI,CAAC;AAChF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared connection-status vocabulary.
|
|
3
|
+
*
|
|
4
|
+
* Authentication mode and connect/check support are DECLARED by the provider
|
|
5
|
+
* (descriptor `connection` metadata, or an `integration/connection`
|
|
6
|
+
* capability the host composed) and resolved through the runtime. Nothing
|
|
7
|
+
* here infers behavior from an id suffix, a provider admission list or a
|
|
8
|
+
* credential-value shape: a host-reference credential alone never implies
|
|
9
|
+
* tenant connection support.
|
|
10
|
+
*
|
|
11
|
+
* SECURITY: any producer of `IntegrationConnectionStatus` MUST scope
|
|
12
|
+
* `connected` / `connectionCount` to the calling user/org — never leak
|
|
13
|
+
* whether some OTHER tenant has the provider connected. When in doubt,
|
|
14
|
+
* return `{ connected: false, connectionCount: 0 }`.
|
|
15
|
+
*/
|
|
16
|
+
export { IntegrationAuthModeSchema, IntegrationConnectionStatusSchema, IntegrationConnectionMetadataSchema, IntegrationConnectRequestResultSchema, IntegrationConnectionRefusalSchema } from '../schemas/integration-connection.ts';
|
|
17
|
+
export type { IntegrationAuthMode, IntegrationConnectRequestResult, IntegrationConnectionMetadata, IntegrationConnectionRefusal, IntegrationConnectionStatus } from '../schemas/integration-connection.ts';
|
|
18
|
+
//# sourceMappingURL=integration-connection-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-connection-status.d.ts","sourceRoot":"","sources":["../../src/status/integration-connection-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACN,yBAAyB,EACzB,iCAAiC,EACjC,mCAAmC,EACnC,qCAAqC,EACrC,kCAAkC,EAClC,MAAM,sCAAsC,CAAC;AAE9C,YAAY,EACX,mBAAmB,EACnB,+BAA+B,EAC/B,6BAA6B,EAC7B,4BAA4B,EAC5B,2BAA2B,EAC3B,MAAM,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared connection-status vocabulary.
|
|
3
|
+
*
|
|
4
|
+
* Authentication mode and connect/check support are DECLARED by the provider
|
|
5
|
+
* (descriptor `connection` metadata, or an `integration/connection`
|
|
6
|
+
* capability the host composed) and resolved through the runtime. Nothing
|
|
7
|
+
* here infers behavior from an id suffix, a provider admission list or a
|
|
8
|
+
* credential-value shape: a host-reference credential alone never implies
|
|
9
|
+
* tenant connection support.
|
|
10
|
+
*
|
|
11
|
+
* SECURITY: any producer of `IntegrationConnectionStatus` MUST scope
|
|
12
|
+
* `connected` / `connectionCount` to the calling user/org — never leak
|
|
13
|
+
* whether some OTHER tenant has the provider connected. When in doubt,
|
|
14
|
+
* return `{ connected: false, connectionCount: 0 }`.
|
|
15
|
+
*/
|
|
16
|
+
export { IntegrationAuthModeSchema, IntegrationConnectionStatusSchema, IntegrationConnectionMetadataSchema, IntegrationConnectRequestResultSchema, IntegrationConnectionRefusalSchema } from "../schemas/integration-connection.js";
|
|
17
|
+
//# sourceMappingURL=integration-connection-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-connection-status.js","sourceRoot":"","sources":["../../src/status/integration-connection-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACN,yBAAyB,EACzB,iCAAiC,EACjC,mCAAmC,EACnC,qCAAqC,EACrC,kCAAkC,EAClC,MAAM,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
2
|
+
import type { IntegrationConnectRequestResult, IntegrationConnectionStatus } from '../schemas/integration-connection.ts';
|
|
3
|
+
/**
|
|
4
|
+
* The narrow contract a host (or the Svelte surface) uses for connect
|
|
5
|
+
* availability and requests. Implementations come from the provider's own
|
|
6
|
+
* `integration/connection` descriptor through a lazy loader; the consumer
|
|
7
|
+
* never knows which provider answered.
|
|
8
|
+
*/
|
|
9
|
+
export interface IntegrationConnectionCapability {
|
|
10
|
+
/** Connection state for the calling user/org. */
|
|
11
|
+
status(): Promise<IntegrationConnectionStatus>;
|
|
12
|
+
/** Ask the provider to begin a connect flow; host authorization is retained. */
|
|
13
|
+
requestConnect(): Promise<IntegrationConnectRequestResult>;
|
|
14
|
+
}
|
|
15
|
+
/** Refusal for a provider whose connection behavior no plugin declared. */
|
|
16
|
+
export declare function integrationConnectionUnsupported(integrationId: string): CapabilityError;
|
|
17
|
+
/** Validate a provider implementation's connect outcome at the boundary. */
|
|
18
|
+
export declare function parseIntegrationConnectRequestResult(value: unknown): IntegrationConnectRequestResult;
|
|
19
|
+
//# sourceMappingURL=integration-connection.capability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-connection.capability.d.ts","sourceRoot":"","sources":["../../src/status/integration-connection.capability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EACX,+BAA+B,EAC/B,2BAA2B,EAC3B,MAAM,sCAAsC,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,+BAA+B;IAC/C,iDAAiD;IACjD,MAAM,IAAI,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAC/C,gFAAgF;IAChF,cAAc,IAAI,OAAO,CAAC,+BAA+B,CAAC,CAAC;CAC3D;AAED,2EAA2E;AAC3E,wBAAgB,gCAAgC,CAAC,aAAa,EAAE,MAAM,GAAG,eAAe,CAMvF;AAED,4EAA4E;AAC5E,wBAAgB,oCAAoC,CAAC,KAAK,EAAE,OAAO,GAAG,+BAA+B,CAEpG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
2
|
+
import { IntegrationConnectRequestResultSchema } from "../schemas/integration-connection.js";
|
|
3
|
+
/** Refusal for a provider whose connection behavior no plugin declared. */
|
|
4
|
+
export function integrationConnectionUnsupported(integrationId) {
|
|
5
|
+
return new CapabilityError('This integration declares no connection capability.', 'UNAVAILABLE', {
|
|
6
|
+
reason: 'integration-connection-unsupported',
|
|
7
|
+
retryable: false,
|
|
8
|
+
details: { integrationId }
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/** Validate a provider implementation's connect outcome at the boundary. */
|
|
12
|
+
export function parseIntegrationConnectRequestResult(value) {
|
|
13
|
+
return IntegrationConnectRequestResultSchema.parse(value);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=integration-connection.capability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-connection.capability.js","sourceRoot":"","sources":["../../src/status/integration-connection.capability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,qCAAqC,EAAE,MAAM,sCAAsC,CAAC;AAmB7F,2EAA2E;AAC3E,MAAM,UAAU,gCAAgC,CAAC,aAAqB;IACrE,OAAO,IAAI,eAAe,CAAC,qDAAqD,EAAE,aAAa,EAAE;QAChG,MAAM,EAAE,oCAAoC;QAC5C,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,EAAE,aAAa,EAAE;KAC1B,CAAC,CAAC;AACJ,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,oCAAoC,CAAC,KAAc;IAClE,OAAO,qCAAqC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC3D,CAAC"}
|