@botpress/adk 1.19.0-beta.13 → 1.19.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-project/agent-project.d.ts.map +1 -1
- package/dist/agent-project/config-writer.d.ts +1 -1
- package/dist/agent-project/dependency-state-to-dependencies.d.ts +11 -0
- package/dist/agent-project/dependency-state-to-dependencies.d.ts.map +1 -0
- package/dist/agent-project/types.d.ts +5 -0
- package/dist/agent-project/types.d.ts.map +1 -1
- package/dist/agent0/index.js +26 -13
- package/dist/agent0/index.js.map +5 -5
- package/dist/agent0/runtime/client.d.ts.map +1 -1
- package/dist/bot-generator/generator.d.ts +22 -0
- package/dist/bot-generator/generator.d.ts.map +1 -1
- package/dist/bot-generator/plugin-sync.d.ts.map +1 -1
- package/dist/commands/bp-dev-stderr.d.ts +9 -0
- package/dist/commands/bp-dev-stderr.d.ts.map +1 -1
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/dependencies/catalog/catalog-service.d.ts +53 -0
- package/dist/dependencies/catalog/catalog-service.d.ts.map +1 -0
- package/dist/dependencies/catalog/client-factory.d.ts +33 -0
- package/dist/dependencies/catalog/client-factory.d.ts.map +1 -0
- package/dist/dependencies/catalog/integration-source.d.ts +34 -0
- package/dist/dependencies/catalog/integration-source.d.ts.map +1 -0
- package/dist/dependencies/catalog/interface-source.d.ts +23 -0
- package/dist/dependencies/catalog/interface-source.d.ts.map +1 -0
- package/dist/dependencies/catalog/plugin-source.d.ts +49 -0
- package/dist/dependencies/catalog/plugin-source.d.ts.map +1 -0
- package/dist/dependencies/catalog/resolution-cache.d.ts +76 -0
- package/dist/dependencies/catalog/resolution-cache.d.ts.map +1 -0
- package/dist/dependencies/dependency-manager.d.ts +31 -16
- package/dist/dependencies/dependency-manager.d.ts.map +1 -1
- package/dist/dependencies/errors.d.ts +2 -2
- package/dist/dependencies/errors.d.ts.map +1 -1
- package/dist/dependencies/index.d.ts +5 -4
- package/dist/dependencies/index.d.ts.map +1 -1
- package/dist/dependencies/index.js +2062 -1541
- package/dist/dependencies/index.js.map +34 -26
- package/dist/dependencies/legacy-lock-file.d.ts +15 -0
- package/dist/dependencies/legacy-lock-file.d.ts.map +1 -0
- package/dist/dependencies/migration.d.ts +19 -0
- package/dist/dependencies/migration.d.ts.map +1 -1
- package/dist/dependencies/resolvers/integration-resolver.d.ts +4 -3
- package/dist/dependencies/resolvers/integration-resolver.d.ts.map +1 -1
- package/dist/dependencies/resolvers/plugin-resolver.d.ts +4 -4
- package/dist/dependencies/resolvers/plugin-resolver.d.ts.map +1 -1
- package/dist/dependencies/snapshot-store.d.ts +59 -0
- package/dist/dependencies/snapshot-store.d.ts.map +1 -0
- package/dist/dependencies/status-resolver.d.ts +36 -0
- package/dist/dependencies/status-resolver.d.ts.map +1 -0
- package/dist/dependencies/status.d.ts +214 -0
- package/dist/dependencies/status.d.ts.map +1 -0
- package/dist/dependencies/types.d.ts +379 -29
- package/dist/dependencies/types.d.ts.map +1 -1
- package/dist/file-watcher/watcher.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2540 -1746
- package/dist/index.js.map +44 -36
- package/dist/integrations/config-utils.d.ts +11 -7
- package/dist/integrations/config-utils.d.ts.map +1 -1
- package/dist/integrations/index.d.ts +1 -2
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/manager.d.ts +19 -53
- package/dist/integrations/manager.d.ts.map +1 -1
- package/dist/interfaces/enhanced-cache.d.ts +7 -7
- package/dist/interfaces/enhanced-cache.d.ts.map +1 -1
- package/dist/interfaces/manager.d.ts +11 -17
- package/dist/interfaces/manager.d.ts.map +1 -1
- package/dist/plugins/index.d.ts +0 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/manager.d.ts +16 -53
- package/dist/plugins/manager.d.ts.map +1 -1
- package/dist/preflight/checker.d.ts.map +1 -1
- package/dist/preflight/dependency-gate.d.ts +36 -0
- package/dist/preflight/dependency-gate.d.ts.map +1 -0
- package/dist/preflight/index.d.ts +1 -0
- package/dist/preflight/index.d.ts.map +1 -1
- package/dist/preflight/types.d.ts +10 -0
- package/dist/preflight/types.d.ts.map +1 -1
- package/dist/runner/script-runner.d.ts.map +1 -1
- package/dist/templates/botpress-desk/evals/index.eval.ts +1 -1
- package/dist/templates/template.config.json +3 -3
- package/dist/utils/ids.d.ts +10 -0
- package/dist/utils/ids.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/agent-project/lock-to-dependencies.d.ts +0 -11
- package/dist/agent-project/lock-to-dependencies.d.ts.map +0 -1
- package/dist/dependencies/lock-file.d.ts +0 -15
- package/dist/dependencies/lock-file.d.ts.map +0 -1
- package/dist/integrations/enhanced-cache.d.ts +0 -53
- package/dist/integrations/enhanced-cache.d.ts.map +0 -1
- package/dist/plugins/enhanced-cache.d.ts +0 -53
- package/dist/plugins/enhanced-cache.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/agent0/runtime/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,KAAK,EAAyB,4BAA4B,EAAE,MAAM,cAAc,CAAA;AAGvF,OAAO,KAAK,EACV,wBAAwB,EAExB,uBAAuB,EACvB,wBAAwB,EACxB,aAAa,EASb,wBAAwB,EAExB,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,kBAAkB,EAClB,+BAA+B,EAC/B,sBAAsB,EACtB,aAAa,EACb,8BAA8B,EAG9B,uBAAuB,EAExB,MAAM,aAAa,CAAA;AAEpB,MAAM,MAAM,kBAAkB,GAAG,SAAS,CAAA;AAC1C,MAAM,MAAM,4BAA4B,GAAG,oBAAoB,GAAG,mBAAmB,GAAG,yBAAyB,CAAA;AACjH,MAAM,MAAM,kBAA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AmB,CA+MxG"}
|
|
@@ -14,10 +14,30 @@ export declare class BotGenerator {
|
|
|
14
14
|
private outputPath;
|
|
15
15
|
private adkCommand?;
|
|
16
16
|
private callbacks?;
|
|
17
|
+
/**
|
|
18
|
+
* Per-alias capability verdicts computed during `generateBotDefinition` (which
|
|
19
|
+
* already resolves `enabled` + merged config), then consumed by
|
|
20
|
+
* `generateIntegrationsDefinition` / `generatePluginsDefinition` to emit the
|
|
21
|
+
* `IntegrationStatuses` / `PluginStatuses` carriers. Keyed by alias. The verdict
|
|
22
|
+
* is the whole carrier — enabledness is derivable (`state === 'available'`), so
|
|
23
|
+
* there is deliberately no parallel `enabled` flag to keep in sync.
|
|
24
|
+
*/
|
|
25
|
+
private integrationStatuses;
|
|
26
|
+
private pluginStatuses;
|
|
17
27
|
constructor(options: BotGeneratorOptions);
|
|
18
28
|
private listFilesRecursive;
|
|
19
29
|
private removeEmptyDirectories;
|
|
20
30
|
generate(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Emit the three `bp_modules`-gated files (`bot.definition.ts`, `integrations.ts`,
|
|
33
|
+
* `plugins.ts`). Must run **after** the `bp add` syncs have populated `bp_modules`:
|
|
34
|
+
* the existsSync gating in these emitters is only accurate post-sync (a clean/CI
|
|
35
|
+
* build starts with an empty `bp_modules`, so a pre-sync emission would classify
|
|
36
|
+
* every dependency `not_installed`). `generateBotProject` validates that every
|
|
37
|
+
* dependency module is actually on disk before calling this, so the MODE B stub path
|
|
38
|
+
* below survives only as a fail-safe for out-of-band deletions.
|
|
39
|
+
*/
|
|
40
|
+
emitDependencyArtifacts(): Promise<void>;
|
|
21
41
|
private generateIntegrationsTypes;
|
|
22
42
|
private generatePluginsTypes;
|
|
23
43
|
private generateTableTypes;
|
|
@@ -36,6 +56,8 @@ export declare class BotGenerator {
|
|
|
36
56
|
private generateClientWrapper;
|
|
37
57
|
private generateRuntimeTypes;
|
|
38
58
|
private generateInterfacesTypes;
|
|
59
|
+
/** Serialize the per-alias carrier verdicts to a JS object literal body. */
|
|
60
|
+
private buildStatusEntries;
|
|
39
61
|
private generateIntegrationsDefinition;
|
|
40
62
|
private generatePluginsDefinition;
|
|
41
63
|
private generateInterfacesDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/bot-generator/generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/bot-generator/generator.ts"],"names":[],"mappings":"AAuBA,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAsCD,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,CAAA;IACnD,SAAS,CAAC,EAAE,aAAa,CAAA;CAC1B;AA4CD,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,UAAU,CAAC,CAAwC;IAC3D,OAAO,CAAC,SAAS,CAAC,CAAe;IAEjC;;;;;;;OAOG;IACH,OAAO,CAAC,mBAAmB,CAAoC;IAC/D,OAAO,CAAC,cAAc,CAAoC;gBAE9C,OAAO,EAAE,mBAAmB;YAO1B,kBAAkB;YAuBlB,sBAAsB;IAwB9B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAqC/B;;;;;;;;OAQG;IACG,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC;YAShC,yBAAyB;YAoEzB,oBAAoB;YAgEpB,kBAAkB;YAKlB,oBAAoB;YAKpB,gBAAgB;YAKhB,kBAAkB;YAKlB,0BAA0B;YAK1B,mBAAmB;YAKnB,kBAAkB;YAKlB,qBAAqB;YAKrB,yBAAyB;YAKzB,sBAAsB;YAKtB,mBAAmB;YAMnB,8BAA8B;YAM9B,yBAAyB;YAKzB,qBAAqB;YAKrB,oBAAoB;YAyEpB,uBAAuB;IAoGrC,4EAA4E;IAC5E,OAAO,CAAC,kBAAkB;YAmBZ,8BAA8B;YA8C9B,yBAAyB;YA2CzB,4BAA4B;IA2B1C;;;;;;OAMG;IACH,OAAO,CAAC,sBAAsB;YAiDhB,qBAAqB;YA4nBrB,gBAAgB;YA4ChB,mBAAmB;YAenB,gBAAgB;YAmChB,mBAAmB;YAyBnB,UAAU;YAWV,aAAa;IAgBrB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;YA8f3B,0BAA0B;IAgBlC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAqBzC;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgGpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-sync.d.ts","sourceRoot":"","sources":["../../src/bot-generator/plugin-sync.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-sync.d.ts","sourceRoot":"","sources":["../../src/bot-generator/plugin-sync.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,UAAU,EAAE,CAAA;IACpB,MAAM,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAChD;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,aAAa,CAAQ;IAG7B,OAAO,CAAC,kBAAkB,CAA8D;gBAE5E,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;IAMvD,OAAO,CAAC,cAAc;IAUtB;;OAEG;YACW,YAAY;IA0B1B;;OAEG;YACW,cAAc;IA4B5B;;OAEG;YACW,aAAa;IAiB3B;;OAEG;YACW,kBAAkB;IAmBhC;;OAEG;YACW,kBAAkB;IAQhC;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAsC/C"}
|
|
@@ -18,4 +18,13 @@ export declare const REQUEST_HANDLING_ERROR_MARKER: RegExp;
|
|
|
18
18
|
* `ECONNREFUSED`, which would otherwise trip this rule.
|
|
19
19
|
*/
|
|
20
20
|
export declare function classifyFatalStderr(text: string, port: string): string | null;
|
|
21
|
+
export interface RecoverableRegistrationFailure {
|
|
22
|
+
/** Integration alias `bp` reported as `registration_failed`. */
|
|
23
|
+
name: string;
|
|
24
|
+
/** `bp`'s `statusReason` for the failure (OAuth, missing config, …); '' when none was printed. */
|
|
25
|
+
reason: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function classifyRecoverableDeployError(text: string): {
|
|
28
|
+
failures: RecoverableRegistrationFailure[];
|
|
29
|
+
} | null;
|
|
21
30
|
//# sourceMappingURL=bp-dev-stderr.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bp-dev-stderr.d.ts","sourceRoot":"","sources":["../../src/commands/bp-dev-stderr.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B,QAA8C,CAAA;AAExF;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkB7E"}
|
|
1
|
+
{"version":3,"file":"bp-dev-stderr.d.ts","sourceRoot":"","sources":["../../src/commands/bp-dev-stderr.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B,QAA8C,CAAA;AAExF;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkB7E;AA2BD,MAAM,WAAW,8BAA8B;IAC7C,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAA;IACZ,kGAAkG;IAClG,MAAM,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,8BAA8B,EAAE,CAAA;CAAE,GAAG,IAAI,CAgBlH"}
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -10,5 +10,6 @@ export { BpDevCommand } from './bp-dev-command.js';
|
|
|
10
10
|
export type { BpDevCommandOptions, BpDevProgressEvent } from './bp-dev-command.js';
|
|
11
11
|
export { BpChatCommand } from './bp-chat-command.js';
|
|
12
12
|
export type { BpChatCommandOptions } from './bp-chat-command.js';
|
|
13
|
+
export { classifyFatalStderr, classifyRecoverableDeployError, REQUEST_HANDLING_ERROR_MARKER } from './bp-dev-stderr.js';
|
|
13
14
|
export { BP_CLI_BIN_PATH, BP_CLI_VERSION, BP_CLI_INSTALL_DIR } from './bp-cli.js';
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CA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sB,CAAA;AAEhE,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAEvH,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ResolutionCache, type ResolutionCacheConfig } from './resolution-cache.js';
|
|
2
|
+
/** A catalog ref always carries a name + version, and optionally a workspace scope. */
|
|
3
|
+
export interface CatalogRef {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
workspace?: string;
|
|
7
|
+
}
|
|
8
|
+
/** The identity + definition a source resolves a ref to. */
|
|
9
|
+
export interface ResolvedSpec<TDef> {
|
|
10
|
+
id: string;
|
|
11
|
+
updatedAt: string;
|
|
12
|
+
definition: TDef;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The per-type cloud-fetch logic (integrations, plugins, interfaces). A source
|
|
16
|
+
* knows how to turn a ref into a definition from cloud and how to build a typed,
|
|
17
|
+
* actionable error when the ref can't be resolved — but it owns no caching. That
|
|
18
|
+
* lives once in {@link CatalogService}.
|
|
19
|
+
*/
|
|
20
|
+
export interface CatalogSource<TDef, TRef extends CatalogRef = CatalogRef> {
|
|
21
|
+
/** Cache bucket + on-disk id-field name for this resource type. */
|
|
22
|
+
readonly cacheConfig: ResolutionCacheConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Resolve a ref to its identity + definition from cloud. MUST throw a typed
|
|
25
|
+
* `AdkError` (not return null) when the ref cannot be resolved, so the caller
|
|
26
|
+
* gets an actionable message.
|
|
27
|
+
*/
|
|
28
|
+
fetchByRef(ref: TRef): Promise<ResolvedSpec<TDef>>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Generic catalog fetch + cache orchestration, unifying the
|
|
32
|
+
* `fetch{Integration,Plugin,Interface}` methods the three managers each
|
|
33
|
+
* duplicated: check the two-level {@link ResolutionCache}, fall through to the
|
|
34
|
+
* source on a miss, then write both cache levels. The type-specific cloud calls
|
|
35
|
+
* and search/list operations live on the concrete {@link CatalogSource}; only the
|
|
36
|
+
* cache-orchestrated definition fetch is generic here.
|
|
37
|
+
*/
|
|
38
|
+
export declare class CatalogService<TDef, TRef extends CatalogRef = CatalogRef> {
|
|
39
|
+
private readonly source;
|
|
40
|
+
readonly cache: ResolutionCache<TDef>;
|
|
41
|
+
constructor(source: CatalogSource<TDef, TRef>, noCache?: boolean);
|
|
42
|
+
/** Fetch a definition by ref, preferring the cache (resolution → definition). */
|
|
43
|
+
getDefinition(ref: TRef): Promise<TDef>;
|
|
44
|
+
/** Read a cached definition ignoring the resolution TTL, or null if none is cached. */
|
|
45
|
+
private getStaleDefinition;
|
|
46
|
+
/** Combined resolution + definition cache stats (matches the managers' getCacheStats). */
|
|
47
|
+
getCacheStats(): Promise<{
|
|
48
|
+
count: number;
|
|
49
|
+
sizeBytes: number;
|
|
50
|
+
}>;
|
|
51
|
+
clearCache(): Promise<void>;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=catalog-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-service.d.ts","sourceRoot":"","sources":["../../../src/dependencies/catalog/catalog-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAEnF,uFAAuF;AACvF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,4DAA4D;AAC5D,MAAM,WAAW,YAAY,CAAC,IAAI;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,IAAI,CAAA;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa,CAAC,IAAI,EAAE,IAAI,SAAS,UAAU,GAAG,UAAU;IACvE,mEAAmE;IACnE,QAAQ,CAAC,WAAW,EAAE,qBAAqB,CAAA;IAC3C;;;;OAIG;IACH,UAAU,CAAC,GAAG,EAAE,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAA;CACnD;AAED;;;;;;;GAOG;AACH,qBAAa,cAAc,CAAC,IAAI,EAAE,IAAI,SAAS,UAAU,GAAG,UAAU;IAIlE,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHzB,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;gBAGlB,MAAM,EAAE,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,EAClD,OAAO,GAAE,OAAe;IAK1B,iFAAiF;IAC3E,aAAa,CAAC,GAAG,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAkC7C,uFAAuF;YACzE,kBAAkB;IAMhC,0FAA0F;IACpF,aAAa,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAQ9D,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAGlC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Client } from '@botpress/client';
|
|
2
|
+
import { type Credentials, type ProjectCredentialsContext } from '../../auth/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Connection options shared by every catalog source (integrations, plugins,
|
|
5
|
+
* interfaces). These are the credential/scope fields the three managers used to
|
|
6
|
+
* each carry independently.
|
|
7
|
+
*/
|
|
8
|
+
export interface CatalogClientOptions {
|
|
9
|
+
project?: ProjectCredentialsContext;
|
|
10
|
+
apiUrl?: string;
|
|
11
|
+
workspaceId?: string;
|
|
12
|
+
credentials?: Credentials;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Single place that builds the authenticated `@botpress/client` for catalog
|
|
16
|
+
* lookups. Collapses the byte-for-byte `getClient()` ladder previously copied
|
|
17
|
+
* into IntegrationManager / PluginManager: project-scoped → `getProjectClient`;
|
|
18
|
+
* bare credentials → a direct `Client`; otherwise the ambient project client. The
|
|
19
|
+
* client is built lazily and memoized per factory instance.
|
|
20
|
+
*
|
|
21
|
+
* Note: the old InterfaceManager always routed through `getProjectClient` (it had
|
|
22
|
+
* no bare-credentials branch). Interfaces now use this same 3-branch ladder. This
|
|
23
|
+
* is behavior-equivalent for every current caller (none construct an interface
|
|
24
|
+
* source with credentials-only and no project/workspace scope); a future
|
|
25
|
+
* credentials-only interface caller would take the direct-`Client` branch instead.
|
|
26
|
+
*/
|
|
27
|
+
export declare class CatalogClientFactory {
|
|
28
|
+
readonly options: CatalogClientOptions;
|
|
29
|
+
private client?;
|
|
30
|
+
constructor(options?: CatalogClientOptions);
|
|
31
|
+
getClient(): Promise<Client>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=client-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-factory.d.ts","sourceRoot":"","sources":["../../../src/dependencies/catalog/client-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAoB,KAAK,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AAExG;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,yBAAyB,CAAA;IACnC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AAKD;;;;;;;;;;;;GAYG;AACH,qBAAa,oBAAoB;aAGH,OAAO,EAAE,oBAAoB;IAFzD,OAAO,CAAC,MAAM,CAAC,CAAQ;gBAEK,OAAO,GAAE,oBAAyB;IAExD,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;CA2BnC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { IntegrationDefinition, IntegrationRef } from '../../integrations/types.js';
|
|
2
|
+
import type { HubCacheEntry } from '../../integrations/hub-cache.js';
|
|
3
|
+
import { CatalogClientFactory } from './client-factory.js';
|
|
4
|
+
import type { CatalogSource, ResolvedSpec } from './catalog-service.js';
|
|
5
|
+
/**
|
|
6
|
+
* Cloud-fetch logic for integrations (private workspace first, then public hub),
|
|
7
|
+
* plus hub search / interface-implementer lookup / version listing. Moved verbatim
|
|
8
|
+
* from the old IntegrationManager; the cache orchestration now lives in
|
|
9
|
+
* {@link CatalogService}.
|
|
10
|
+
*/
|
|
11
|
+
export declare class IntegrationCatalogSource implements CatalogSource<IntegrationDefinition, IntegrationRef> {
|
|
12
|
+
private readonly clientFactory;
|
|
13
|
+
readonly cacheConfig: {
|
|
14
|
+
cacheType: string;
|
|
15
|
+
idField: string;
|
|
16
|
+
};
|
|
17
|
+
constructor(clientFactory: CatalogClientFactory);
|
|
18
|
+
fetchByRef(ref: IntegrationRef): Promise<ResolvedSpec<IntegrationDefinition>>;
|
|
19
|
+
/** Search public integrations in the Botpress hub. */
|
|
20
|
+
search(query: string, limit?: number): Promise<HubCacheEntry[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Find public integrations that implement a given interface (by interface name).
|
|
23
|
+
* Returns the latest version per integration name, ranked by Cloud's popularity.
|
|
24
|
+
*/
|
|
25
|
+
findImplementersOfInterface(interfaceName: string, limit?: number): Promise<HubCacheEntry[]>;
|
|
26
|
+
/** List known public versions for an integration name. */
|
|
27
|
+
listVersions(name: string): Promise<string[]>;
|
|
28
|
+
private _findPrivateOrPublicIntegration;
|
|
29
|
+
private _findPrivateIntegration;
|
|
30
|
+
private _findPublicIntegration;
|
|
31
|
+
private _isResourceNotFoundError;
|
|
32
|
+
private _buildIntegrationNotFoundError;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=integration-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-source.d.ts","sourceRoot":"","sources":["../../../src/dependencies/catalog/integration-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACxF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAOpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEvE;;;;;GAKG;AACH,qBAAa,wBAAyB,YAAW,aAAa,CAAC,qBAAqB,EAAE,cAAc,CAAC;IAGvF,OAAO,CAAC,QAAQ,CAAC,aAAa;IAF1C,QAAQ,CAAC,WAAW;;;MAA0D;gBAEjD,aAAa,EAAE,oBAAoB;IAE1D,UAAU,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;IAUnF,sDAAsD;IAChD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IA4BzE;;;OAGG;IACG,2BAA2B,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAgBtG,0DAA0D;IACpD,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAerC,+BAA+B;YAe/B,uBAAuB;YAqBvB,sBAAsB;IAkBpC,OAAO,CAAC,wBAAwB;YAOlB,8BAA8B;CAuE7C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { InterfaceDefinition, InterfaceRef } from '../../interfaces/types.js';
|
|
2
|
+
import { CatalogClientFactory } from './client-factory.js';
|
|
3
|
+
import type { CatalogSource, ResolvedSpec } from './catalog-service.js';
|
|
4
|
+
/**
|
|
5
|
+
* Cloud-fetch logic for interfaces — **fetch-by-ref ONLY**. Moved verbatim from
|
|
6
|
+
* the old InterfaceManager.fetchInterface.
|
|
7
|
+
*
|
|
8
|
+
* Deliberately exposes no `search` / `listVersions` / enumeration: the set of
|
|
9
|
+
* interfaces an ADK project can use is fixed by the `BUILTIN_INTERFACES` constant
|
|
10
|
+
* (see `InterfaceRegistry`, which stays constants-only). This source only resolves
|
|
11
|
+
* a known `name@version` ref to its cloud definition; it must never grow a listing
|
|
12
|
+
* API, or it would undermine the built-in-interface-immutable invariant.
|
|
13
|
+
*/
|
|
14
|
+
export declare class InterfaceCatalogSource implements CatalogSource<InterfaceDefinition, InterfaceRef> {
|
|
15
|
+
private readonly clientFactory;
|
|
16
|
+
readonly cacheConfig: {
|
|
17
|
+
cacheType: string;
|
|
18
|
+
idField: string;
|
|
19
|
+
};
|
|
20
|
+
constructor(clientFactory: CatalogClientFactory);
|
|
21
|
+
fetchByRef(ref: InterfaceRef): Promise<ResolvedSpec<InterfaceDefinition>>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=interface-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface-source.d.ts","sourceRoot":"","sources":["../../../src/dependencies/catalog/interface-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEvE;;;;;;;;;GASG;AACH,qBAAa,sBAAuB,YAAW,aAAa,CAAC,mBAAmB,EAAE,YAAY,CAAC;IAGjF,OAAO,CAAC,QAAQ,CAAC,aAAa;IAF1C,QAAQ,CAAC,WAAW;;;MAAsD;gBAE7C,aAAa,EAAE,oBAAoB;IAE1D,UAAU,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;CA2DhF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { PluginDefinition, PluginRef } from '../../plugins/types.js';
|
|
2
|
+
import { CatalogClientFactory } from './client-factory.js';
|
|
3
|
+
import type { CatalogSource, ResolvedSpec } from './catalog-service.js';
|
|
4
|
+
export interface PluginSearchResult {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
version: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
iconUrl: string;
|
|
13
|
+
readmeUrl: string;
|
|
14
|
+
public: boolean;
|
|
15
|
+
visibility: 'public' | 'private' | 'unlisted';
|
|
16
|
+
lifecycleStatus: 'published' | 'deprecated';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Cloud-fetch logic for plugins (public Botpress Hub only), plus hub search and
|
|
20
|
+
* version listing. Moved verbatim from the old PluginManager; cache orchestration
|
|
21
|
+
* now lives in {@link CatalogService}.
|
|
22
|
+
*/
|
|
23
|
+
export declare class PluginCatalogSource implements CatalogSource<PluginDefinition, PluginRef> {
|
|
24
|
+
private readonly clientFactory;
|
|
25
|
+
readonly cacheConfig: {
|
|
26
|
+
cacheType: string;
|
|
27
|
+
idField: string;
|
|
28
|
+
};
|
|
29
|
+
constructor(clientFactory: CatalogClientFactory);
|
|
30
|
+
fetchByRef(ref: PluginRef): Promise<ResolvedSpec<PluginDefinition>>;
|
|
31
|
+
/**
|
|
32
|
+
* Search public plugins in the Botpress hub.
|
|
33
|
+
*
|
|
34
|
+
* The public plugin list API does not expose server-side search yet, so this
|
|
35
|
+
* filters the catalog client-side. The catalog is small, and callers cap
|
|
36
|
+
* results to keep CLI output compact.
|
|
37
|
+
*/
|
|
38
|
+
search(query: string, limit?: number): Promise<PluginSearchResult[]>;
|
|
39
|
+
/** List known public versions for a plugin name. */
|
|
40
|
+
listVersions(name: string): Promise<string[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Distinguish "plugin doesn't exist" from "this version doesn't exist",
|
|
43
|
+
* mirroring the integration source's not-found error.
|
|
44
|
+
*/
|
|
45
|
+
private _buildPluginNotFoundMessage;
|
|
46
|
+
private _findPublicPlugin;
|
|
47
|
+
private _isResourceNotFoundError;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=plugin-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-source.d.ts","sourceRoot":"","sources":["../../../src/dependencies/catalog/plugin-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAOzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEvE,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAA;IAC7C,eAAe,EAAE,WAAW,GAAG,YAAY,CAAA;CAC5C;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,YAAW,aAAa,CAAC,gBAAgB,EAAE,SAAS,CAAC;IAGxE,OAAO,CAAC,QAAQ,CAAC,aAAa;IAF1C,QAAQ,CAAC,WAAW;;;MAAgD;gBAEvC,aAAa,EAAE,oBAAoB;IAE1D,UAAU,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAezE;;;;;;OAMG;IACG,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAW9E,oDAAoD;IAC9C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAWnD;;;OAGG;YACW,2BAA2B;YAU3B,iBAAiB;IAe/B,OAAO,CAAC,wBAAwB;CAMjC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A resolved (name@version) → (id, updatedAt) mapping. The on-disk field that
|
|
3
|
+
* holds the id is type-specific (`integrationId` / `interfaceId` / `pluginId`)
|
|
4
|
+
* for byte-compatibility with caches written by the pre-WS4 managers; callers
|
|
5
|
+
* always see the uniform `id`.
|
|
6
|
+
*/
|
|
7
|
+
export interface VersionResolution {
|
|
8
|
+
id: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
cachedAt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ResolutionCacheConfig {
|
|
13
|
+
/** Subdirectory under the cache root — `integrations` | `interfaces` | `plugins`. */
|
|
14
|
+
cacheType: string;
|
|
15
|
+
/**
|
|
16
|
+
* Field name the resolution value is stored under on disk. Kept type-specific
|
|
17
|
+
* (e.g. `integrationId`) so the unified cache reads/writes byte-identically to
|
|
18
|
+
* the three separate caches it replaces — no cache invalidation on upgrade.
|
|
19
|
+
*/
|
|
20
|
+
idField: string;
|
|
21
|
+
/**
|
|
22
|
+
* Cache root directory. Defaults to `~/.adk/cache` (the production path the
|
|
23
|
+
* pre-WS4 caches used); overridable only so tests can run against a temp dir
|
|
24
|
+
* without mocking `os.homedir()`.
|
|
25
|
+
*/
|
|
26
|
+
cacheRoot?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Generic two-level on-disk catalog cache, unifying the three byte-identical
|
|
30
|
+
* `Enhanced{Integration,Interface,Plugin}Cache` classes.
|
|
31
|
+
*
|
|
32
|
+
* - **Resolution cache** (`resolutions/`): `name@version[+workspace]` →
|
|
33
|
+
* `{ id, updatedAt }`, {@link RESOLUTION_TTL_MINUTES}-minute TTL (checked on
|
|
34
|
+
* read; stale entries silently miss).
|
|
35
|
+
* - **Definition cache** (`definitions/`): `id+updatedAt` → full definition, no
|
|
36
|
+
* expiry — the `(id, updatedAt)` tuple is content-addressed (same tuple ⇒ same
|
|
37
|
+
* spec), so it is immutable by contract.
|
|
38
|
+
*
|
|
39
|
+
* Paths, key sanitization (`[^a-zA-Z0-9_-] → _`), TTL, and compact JSON
|
|
40
|
+
* serialization match the pre-WS4 caches exactly. `noCache` disables reads (and,
|
|
41
|
+
* matching the old behavior, still allows writes through `set*`).
|
|
42
|
+
*/
|
|
43
|
+
export declare class ResolutionCache<TDef> {
|
|
44
|
+
private readonly cacheDir;
|
|
45
|
+
private readonly resolutionsDir;
|
|
46
|
+
private readonly definitionsDir;
|
|
47
|
+
private readonly idField;
|
|
48
|
+
private readonly noCache;
|
|
49
|
+
constructor(config: ResolutionCacheConfig, noCache?: boolean);
|
|
50
|
+
private ensureCacheDirs;
|
|
51
|
+
/**
|
|
52
|
+
* @param allowStale when true, ignore the {@link RESOLUTION_TTL_MINUTES} TTL and
|
|
53
|
+
* return an expired entry. Used by the cloud-failure fallback so a stale-but-
|
|
54
|
+
* present resolution can recover a cached definition instead of hard-failing.
|
|
55
|
+
*/
|
|
56
|
+
getResolution(name: string, version: string, workspace?: string, options?: {
|
|
57
|
+
allowStale?: boolean;
|
|
58
|
+
}): Promise<VersionResolution | null>;
|
|
59
|
+
setResolution(name: string, version: string, workspace: string | undefined, id: string, updatedAt: string): Promise<void>;
|
|
60
|
+
getDefinition(id: string, updatedAt: string): Promise<TDef | null>;
|
|
61
|
+
setDefinition(id: string, updatedAt: string, definition: TDef): Promise<void>;
|
|
62
|
+
clear(): Promise<void>;
|
|
63
|
+
getStats(): Promise<{
|
|
64
|
+
resolutions: {
|
|
65
|
+
count: number;
|
|
66
|
+
sizeBytes: number;
|
|
67
|
+
};
|
|
68
|
+
definitions: {
|
|
69
|
+
count: number;
|
|
70
|
+
sizeBytes: number;
|
|
71
|
+
};
|
|
72
|
+
}>;
|
|
73
|
+
private getResolutionKey;
|
|
74
|
+
private getDefinitionKey;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=resolution-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolution-cache.d.ts","sourceRoot":"","sources":["../../../src/dependencies/catalog/resolution-cache.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,qFAAqF;IACrF,SAAS,EAAE,MAAM,CAAA;IACjB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAUD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,eAAe,CAAC,IAAI;IAC/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAQ;IACvC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAQ;IACvC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAQ;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAErB,MAAM,EAAE,qBAAqB,EAAE,OAAO,GAAE,OAAe;YASrD,eAAe;IAK7B;;;;OAIG;IACG,aAAa,CACjB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,GACjC,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IA8B9B,aAAa,CACjB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;IAgBV,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAkBlE,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAc7E,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAYtB,QAAQ,IAAI,OAAO,CAAC;QACxB,WAAW,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,CAAA;QACjD,WAAW,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,CAAA;KAClD,CAAC;IAyBF,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,gBAAgB;CAIzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client } from '@botpress/client';
|
|
2
|
-
import type { Environment, ResourceType, AddSpec, MutationResult, ConfigPatch, DiffResult,
|
|
2
|
+
import type { Environment, ResourceType, AddSpec, MutationResult, DependencyStateData, ConfigPatch, DiffResult, ApplyResult } from './types.js';
|
|
3
3
|
import { IntegrationResolver } from './resolvers/integration-resolver.js';
|
|
4
4
|
import { PluginResolver } from './resolvers/plugin-resolver.js';
|
|
5
5
|
import { IntegrationRegistry } from './registry/integration-registry.js';
|
|
@@ -21,8 +21,15 @@ export interface DependencyManagerOptions {
|
|
|
21
21
|
integrationResolver?: IntegrationResolver;
|
|
22
22
|
pluginResolver?: PluginResolver;
|
|
23
23
|
}
|
|
24
|
+
export interface CopyOptions {
|
|
25
|
+
from: Environment;
|
|
26
|
+
to: Environment;
|
|
27
|
+
dryRun?: boolean;
|
|
28
|
+
yes?: boolean;
|
|
29
|
+
sourceBotId?: string;
|
|
30
|
+
}
|
|
24
31
|
export declare class DependencyManager {
|
|
25
|
-
private readonly
|
|
32
|
+
private readonly snapshotStore;
|
|
26
33
|
private readonly env;
|
|
27
34
|
private readonly client;
|
|
28
35
|
private readonly projectPath;
|
|
@@ -40,7 +47,18 @@ export declare class DependencyManager {
|
|
|
40
47
|
pluginRegistry?: PluginRegistry;
|
|
41
48
|
integrationResolver?: IntegrationResolver;
|
|
42
49
|
pluginResolver?: PluginResolver;
|
|
50
|
+
botId?: string;
|
|
43
51
|
}): Promise<DependencyManager>;
|
|
52
|
+
private static getProjectBotId;
|
|
53
|
+
private getProjectBotId;
|
|
54
|
+
private readSnapshot;
|
|
55
|
+
private writeSnapshot;
|
|
56
|
+
private readCloudSnapshot;
|
|
57
|
+
snapshotStateFromCloud(): Promise<DependencyStateData>;
|
|
58
|
+
applyState(state: DependencyStateData, opts?: {
|
|
59
|
+
dryRun?: boolean;
|
|
60
|
+
yes?: boolean;
|
|
61
|
+
}): Promise<ApplyResult>;
|
|
44
62
|
list(type?: ResourceType): Promise<ResourceEntry[]>;
|
|
45
63
|
get(type: ResourceType, alias: string): Promise<ResourceEntry | undefined>;
|
|
46
64
|
add(type: ResourceType, spec: AddSpec): Promise<MutationResult>;
|
|
@@ -53,7 +71,7 @@ export declare class DependencyManager {
|
|
|
53
71
|
private applyEntry;
|
|
54
72
|
/**
|
|
55
73
|
* For each interface the plugin requires that is NOT in `userDeps`, scan
|
|
56
|
-
* the
|
|
74
|
+
* the current snapshot's installed integrations to find one that implements it.
|
|
57
75
|
*
|
|
58
76
|
* - Exactly one match → auto-resolve (no prompt needed).
|
|
59
77
|
* - Multiple matches → throw AMBIGUOUS_DEPENDENCY (caller / CLI should prompt
|
|
@@ -67,23 +85,20 @@ export declare class DependencyManager {
|
|
|
67
85
|
* the real MISSING_DEPENDENCY error with a network error).
|
|
68
86
|
*/
|
|
69
87
|
private findHubImplementersSafely;
|
|
70
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Whether the integration's catalog spec gates on an OAuth/connection identifier.
|
|
90
|
+
* Best-effort: an unreachable spec returns `false` so the caller falls back to
|
|
91
|
+
* rethrowing the original error (we never *classify* on an unknown).
|
|
92
|
+
*/
|
|
93
|
+
private specRequiresAuthorization;
|
|
94
|
+
private refreshSnapshotFromCloud;
|
|
95
|
+
private integrationEntriesMatch;
|
|
96
|
+
private pluginEntriesMatch;
|
|
71
97
|
diff(): Promise<DiffResult>;
|
|
72
|
-
sync(opts?: {
|
|
73
|
-
dryRun?: boolean;
|
|
74
|
-
}): Promise<SyncResult>;
|
|
75
98
|
apply(opts?: {
|
|
76
99
|
dryRun?: boolean;
|
|
77
100
|
yes?: boolean;
|
|
78
101
|
}): Promise<ApplyResult>;
|
|
79
|
-
copy(opts:
|
|
80
|
-
from: Environment;
|
|
81
|
-
to: Environment;
|
|
82
|
-
dryRun?: boolean;
|
|
83
|
-
yes?: boolean;
|
|
84
|
-
}): Promise<ApplyResult>;
|
|
85
|
-
private readCloudAsLockShape;
|
|
86
|
-
private cloudToLockShape;
|
|
87
|
-
private chooseCloudAlias;
|
|
102
|
+
copy(opts: CopyOptions): Promise<ApplyResult>;
|
|
88
103
|
}
|
|
89
104
|
//# sourceMappingURL=dependency-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-manager.d.ts","sourceRoot":"","sources":["../../src/dependencies/dependency-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"dependency-manager.d.ts","sourceRoot":"","sources":["../../src/dependencies/dependency-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAI9C,OAAO,KAAK,EACV,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,GAAG,OAAO,CAAC,cAAc,CAAC;IAiBlE,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAsBrF,MAAM,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAIlE,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;YAI3D,aAAa;IAmCrB,SAAS,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC;YA0BjF,UAAU;IAsBxB;;;;;;;;OAQG;YACW,yBAAyB;IAyFvC;;;;OAIG;YACW,yBAAyB;IAevC;;;;OAIG;YACW,yBAAyB;YAUzB,wBAAwB;IAStC,OAAO,CAAC,uBAAuB;IAI/B,OAAO,CAAC,kBAAkB;IAIpB,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC;IAmC3B,KAAK,CAAC,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IA6KvE,IAAI,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;CAkDpD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdkError } from '@botpress/analytics';
|
|
2
|
-
export declare const DEPENDENCY_ERROR_CODES: readonly ["AUTH_REQUIRED", "INTEGRATION_NOT_FOUND", "PLUGIN_NOT_FOUND", "INTERFACE_NOT_FOUND", "VERSION_NOT_FOUND", "MISSING_INPUT", "MISSING_DEPENDENCY", "AMBIGUOUS_DEPENDENCY", "INTERFACE_NOT_IMPLEMENTED", "
|
|
2
|
+
export declare const DEPENDENCY_ERROR_CODES: readonly ["AUTH_REQUIRED", "INTEGRATION_NOT_FOUND", "PLUGIN_NOT_FOUND", "INTERFACE_NOT_FOUND", "VERSION_NOT_FOUND", "MISSING_INPUT", "MISSING_DEPENDENCY", "AMBIGUOUS_DEPENDENCY", "INTERFACE_NOT_IMPLEMENTED", "SNAPSHOT_DRIFT", "UNINSTALL_REQUIRES_CONFIRMATION", "SAME_SOURCE_TARGET", "SOURCE_SNAPSHOT_MISSING", "MIGRATION_CONFLICT", "INVALID_CONFIG", "BOT_NOT_FOUND", "BUILTIN_INTERFACE_IMMUTABLE", "PROD_CONFIRMATION_REQUIRED", "UNCONFIGURED_DEPENDENCIES"];
|
|
3
3
|
export type DependencyErrorCode = (typeof DEPENDENCY_ERROR_CODES)[number];
|
|
4
4
|
/**
|
|
5
5
|
* Dependency-resolution failures are user/environment conditions (missing or
|
|
@@ -14,6 +14,6 @@ export declare class DependencyError extends AdkError<DependencyErrorCode> {
|
|
|
14
14
|
suggestion?: string;
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
export declare const DEPENDENCY_WARNING_CODES: readonly ["
|
|
17
|
+
export declare const DEPENDENCY_WARNING_CODES: readonly ["MIGRATED_DEPENDENCIES", "CLOUD_FETCH_PARTIAL", "NO_PROD_BOT"];
|
|
18
18
|
export type DependencyWarningCode = (typeof DEPENDENCY_WARNING_CODES)[number];
|
|
19
19
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/dependencies/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE9C,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/dependencies/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE9C,eAAO,MAAM,sBAAsB,0cAoBzB,CAAA;AAEV,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEzE;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,QAAQ,CAAC,mBAAmB,CAAC;gBACpD,IAAI,EAAE;QAChB,IAAI,EAAE,mBAAmB,CAAA;QACzB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QACjC,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB;CAGF;AAED,eAAO,MAAM,wBAAwB,0EAA2E,CAAA;AAChH,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { DependencyManager } from './dependency-manager.js';
|
|
2
2
|
export type { DependencyManagerOptions, ResourceEntry } from './dependency-manager.js';
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
5
|
-
export {
|
|
3
|
+
export { dependencyStateSchema, type Environment, type ResourceType, type IntegrationDependencyEntry, type PluginDependencyEntry, type IntegrationSnapshotEntry, type PluginSnapshotEntry, type PluginDependencyMapping, type DependencyStateData, type DependencySnapshotData, type DependencyMigrationMarker, type AddSpec, type ConfigPatch, type MutationResult, type DiffResult, type ApplyAction, type ApplyResult, type MigrationResult, type DependencyStatus, } from './types.js';
|
|
4
|
+
export { computeIntegrationStatus, computePluginStatus, isCallable } from './status.js';
|
|
5
|
+
export { resolveDependencyStatuses, type ResolveDependencyStatusesInput } from './status-resolver.js';
|
|
6
6
|
export { DependencyError, DEPENDENCY_ERROR_CODES, DEPENDENCY_WARNING_CODES } from './errors.js';
|
|
7
7
|
export type { DependencyErrorCode, DependencyWarningCode } from './errors.js';
|
|
8
8
|
export { sortKeysDeep, jsonEqual } from './json-utils.js';
|
|
@@ -12,6 +12,7 @@ export { InterfaceRegistry } from './registry/interface-registry.js';
|
|
|
12
12
|
export type { InterfaceInfo } from './registry/interface-registry.js';
|
|
13
13
|
export { IntegrationResolver } from './resolvers/integration-resolver.js';
|
|
14
14
|
export { PluginResolver } from './resolvers/plugin-resolver.js';
|
|
15
|
-
export {
|
|
15
|
+
export { DependencySnapshotStore, emptyDependencySnapshot, dependencySnapshotFromBot, type IntegrationAuthorizationSpecSource, type DependencySnapshotWarning, type DependencySnapshotStoreOptions, } from './snapshot-store.js';
|
|
16
|
+
export { DependencyMigrationManager, migrateFromConfig } from './migration.js';
|
|
16
17
|
export type { MigrateOptions } from './migration.js';
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dependencies/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,YAAY,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEtF,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dependencies/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,YAAY,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEtF,OAAO,EACL,qBAAqB,EACrB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,Y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