@botpress/adk 1.19.0-beta.14 → 1.19.0-beta.16
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/lock-to-dependencies.d.ts +11 -0
- package/dist/agent-project/lock-to-dependencies.d.ts.map +1 -0
- package/dist/agent-project/types.d.ts +0 -5
- package/dist/agent-project/types.d.ts.map +1 -1
- package/dist/agent0/index.js +13 -26
- 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 +0 -22
- 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 +0 -9
- package/dist/commands/bp-dev-stderr.d.ts.map +1 -1
- package/dist/commands/index.d.ts +0 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/dependencies/dependency-manager.d.ts +16 -31
- 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 +4 -5
- package/dist/dependencies/index.d.ts.map +1 -1
- package/dist/dependencies/index.js +1560 -2081
- package/dist/dependencies/index.js.map +26 -34
- package/dist/dependencies/lock-file.d.ts +15 -0
- package/dist/dependencies/lock-file.d.ts.map +1 -0
- package/dist/dependencies/migration.d.ts +0 -19
- package/dist/dependencies/migration.d.ts.map +1 -1
- package/dist/dependencies/resolvers/integration-resolver.d.ts +3 -4
- 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/types.d.ts +29 -379
- 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 +1764 -2558
- package/dist/index.js.map +36 -44
- package/dist/integrations/config-utils.d.ts +7 -11
- package/dist/integrations/config-utils.d.ts.map +1 -1
- package/dist/integrations/enhanced-cache.d.ts +53 -0
- package/dist/integrations/enhanced-cache.d.ts.map +1 -0
- package/dist/integrations/index.d.ts +2 -1
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/manager.d.ts +53 -19
- 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 +17 -11
- package/dist/interfaces/manager.d.ts.map +1 -1
- package/dist/plugins/enhanced-cache.d.ts +53 -0
- package/dist/plugins/enhanced-cache.d.ts.map +1 -0
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/manager.d.ts +53 -16
- package/dist/plugins/manager.d.ts.map +1 -1
- package/dist/preflight/checker.d.ts.map +1 -1
- package/dist/preflight/index.d.ts +0 -1
- package/dist/preflight/index.d.ts.map +1 -1
- package/dist/preflight/types.d.ts +0 -10
- 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 +0 -10
- package/dist/utils/ids.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/agent-project/dependency-state-to-dependencies.d.ts +0 -11
- package/dist/agent-project/dependency-state-to-dependencies.d.ts.map +0 -1
- package/dist/dependencies/catalog/catalog-service.d.ts +0 -53
- package/dist/dependencies/catalog/catalog-service.d.ts.map +0 -1
- package/dist/dependencies/catalog/client-factory.d.ts +0 -33
- package/dist/dependencies/catalog/client-factory.d.ts.map +0 -1
- package/dist/dependencies/catalog/integration-source.d.ts +0 -34
- package/dist/dependencies/catalog/integration-source.d.ts.map +0 -1
- package/dist/dependencies/catalog/interface-source.d.ts +0 -23
- package/dist/dependencies/catalog/interface-source.d.ts.map +0 -1
- package/dist/dependencies/catalog/plugin-source.d.ts +0 -49
- package/dist/dependencies/catalog/plugin-source.d.ts.map +0 -1
- package/dist/dependencies/catalog/resolution-cache.d.ts +0 -76
- package/dist/dependencies/catalog/resolution-cache.d.ts.map +0 -1
- package/dist/dependencies/legacy-lock-file.d.ts +0 -15
- package/dist/dependencies/legacy-lock-file.d.ts.map +0 -1
- package/dist/dependencies/snapshot-store.d.ts +0 -59
- package/dist/dependencies/snapshot-store.d.ts.map +0 -1
- package/dist/dependencies/status-resolver.d.ts +0 -36
- package/dist/dependencies/status-resolver.d.ts.map +0 -1
- package/dist/dependencies/status.d.ts +0 -214
- package/dist/dependencies/status.d.ts.map +0 -1
- package/dist/preflight/dependency-gate.d.ts +0 -36
- package/dist/preflight/dependency-gate.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/adk",
|
|
3
|
-
"version": "1.19.0-beta.
|
|
3
|
+
"version": "1.19.0-beta.16",
|
|
4
4
|
"description": "Core ADK library for building AI agents on Botpress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adk",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@botpress/cli": "~6.8.6",
|
|
62
62
|
"@botpress/client": "~1.46.0",
|
|
63
63
|
"@botpress/cognitive": "~0.6.0",
|
|
64
|
-
"@botpress/runtime": "^1.19.0-beta.
|
|
64
|
+
"@botpress/runtime": "^1.19.0-beta.16",
|
|
65
65
|
"@botpress/sdk": "~6.11.1",
|
|
66
66
|
"@bpinternal/jex": "^1.2.4",
|
|
67
67
|
"@bpinternal/yargs-extra": "^0.0.21",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { DependencyStateData } from '@botpress/adk/dependencies';
|
|
2
|
-
import type { Dependencies } from './types.js';
|
|
3
|
-
/**
|
|
4
|
-
* Convert per-env dependency snapshot data into the `Dependencies` shape
|
|
5
|
-
* consumed by IntegrationManager / InterfaceManager / PluginManager.
|
|
6
|
-
*
|
|
7
|
-
* The persisted snapshot is keyed by alias with `{ name, version, enabled, config }`.
|
|
8
|
-
* The legacy `Dependencies` shape is keyed by alias with `{ version: "name@version", enabled, config }`.
|
|
9
|
-
*/
|
|
10
|
-
export declare function dependencyStateToDependencies(state: DependencyStateData): Dependencies;
|
|
11
|
-
//# sourceMappingURL=dependency-state-to-dependencies.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-state-to-dependencies.d.ts","sourceRoot":"","sources":["../../src/agent-project/dependency-state-to-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,CAwBtF"}
|
|
@@ -1,53 +0,0 @@
|
|
|
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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;IAQ9D,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAGlC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,76 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;A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AAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,gBAAgB;CAIzB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type DependencyStateData, type Environment } from './types.js';
|
|
2
|
-
export declare class LegacyDependencyLockFile {
|
|
3
|
-
private readonly filePath;
|
|
4
|
-
private readonly env;
|
|
5
|
-
constructor(opts: {
|
|
6
|
-
projectPath: string;
|
|
7
|
-
env: Environment;
|
|
8
|
-
});
|
|
9
|
-
exists(): Promise<boolean>;
|
|
10
|
-
read(options?: {
|
|
11
|
-
tolerant?: boolean;
|
|
12
|
-
}): Promise<DependencyStateData>;
|
|
13
|
-
delete(): Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=legacy-lock-file.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-lock-file.d.ts","sourceRoot":"","sources":["../../src/dependencies/legacy-lock-file.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,KAAK,mBAAmB,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA;AAG9F,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAa;gBAErB,IAAI,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,WAAW,CAAA;KAAE;IAKrD,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAS1B,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAyBpE,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAO9B"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { Client } from '@botpress/client';
|
|
2
|
-
import { type DependencyMigrationMarker, type DependencySnapshotData, type Environment } from './types.js';
|
|
3
|
-
export interface DependencySnapshotStoreOptions {
|
|
4
|
-
projectPath: string;
|
|
5
|
-
}
|
|
6
|
-
export interface DependencySnapshotWarning {
|
|
7
|
-
code: 'SNAPSHOT_CORRUPT';
|
|
8
|
-
message: string;
|
|
9
|
-
env: Environment;
|
|
10
|
-
path: string;
|
|
11
|
-
}
|
|
12
|
-
export interface IntegrationAuthorizationSpecSource {
|
|
13
|
-
getSpec(name: string, version?: string): Promise<unknown>;
|
|
14
|
-
}
|
|
15
|
-
export declare class DependencySnapshotStore {
|
|
16
|
-
private readonly projectPath;
|
|
17
|
-
private readonly dirPath;
|
|
18
|
-
constructor(opts: DependencySnapshotStoreOptions);
|
|
19
|
-
getSnapshotPath(env: Environment): string;
|
|
20
|
-
getMigrationMarkerPath(): string;
|
|
21
|
-
exists(env: Environment): Promise<boolean>;
|
|
22
|
-
read(env: Environment, options?: {
|
|
23
|
-
tolerant?: boolean;
|
|
24
|
-
}): Promise<DependencySnapshotData | null>;
|
|
25
|
-
readOrEmpty(env: Environment, options?: {
|
|
26
|
-
tolerant?: boolean;
|
|
27
|
-
botId?: string;
|
|
28
|
-
fetchedAt?: Date;
|
|
29
|
-
}): Promise<DependencySnapshotData>;
|
|
30
|
-
write(snapshot: DependencySnapshotData): Promise<void>;
|
|
31
|
-
delete(env: Environment): Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
* The migration marker is an existence-only tombstone: present ⟹ the one-way
|
|
34
|
-
* legacy→Cloud migration already ran. Its JSON contents (version, migratedAt,
|
|
35
|
-
* sources) are informational — never parsed for gating, so a corrupt marker
|
|
36
|
-
* still counts as migrated. The CLI's `maybeRunMigration` fast path applies
|
|
37
|
-
* the same existence semantics to the same file.
|
|
38
|
-
*/
|
|
39
|
-
hasMigrationMarker(): Promise<boolean>;
|
|
40
|
-
writeMigrationMarker(marker: DependencyMigrationMarker): Promise<void>;
|
|
41
|
-
refreshFromCloud(opts: {
|
|
42
|
-
client: Client;
|
|
43
|
-
botId: string;
|
|
44
|
-
env: Environment;
|
|
45
|
-
fetchedAt?: Date;
|
|
46
|
-
integrationRegistry?: IntegrationAuthorizationSpecSource;
|
|
47
|
-
onWarning?: (warning: DependencySnapshotWarning) => void;
|
|
48
|
-
}): Promise<DependencySnapshotData>;
|
|
49
|
-
private readForRefresh;
|
|
50
|
-
}
|
|
51
|
-
export declare function emptyDependencySnapshot(env: Environment, botId?: string, fetchedAt?: Date): DependencySnapshotData;
|
|
52
|
-
export declare function dependencySnapshotFromBot(opts: {
|
|
53
|
-
bot: Awaited<ReturnType<Client['getBot']>>['bot'];
|
|
54
|
-
botId: string;
|
|
55
|
-
env: Environment;
|
|
56
|
-
fetchedAt: Date;
|
|
57
|
-
previous?: DependencySnapshotData | null;
|
|
58
|
-
}): DependencySnapshotData;
|
|
59
|
-
//# sourceMappingURL=snapshot-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot-store.d.ts","sourceRoot":"","sources":["../../src/dependencies/snapshot-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAK9C,OAAO,EAGL,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAGjB,MAAM,YAAY,CAAA;AAEnB,MAAM,WAAW,8BAA8B;IAC7C,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,kBAAkB,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,WAAW,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,kCAAkC;IACjD,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CAC1D;AAED,qBAAa,uBAAuB;IAClC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAQ;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAQ;gBAEpB,IAAI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DD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAC9C,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;IACjD,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,WAAW,CAAA;IAChB,SAAS,EAAE,IAAI,CAAA;IACf,QAAQ,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAA;CACzC,GAAG,sBAAsB,CAoGzB"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { DependencySnapshotData, DependencyStateData, DependencyStatus } from './types.js';
|
|
2
|
-
import type { IntegrationDefinition } from '../integrations/types.js';
|
|
3
|
-
import type { PluginDefinition } from '../plugins/types.js';
|
|
4
|
-
/** Minimal registry surface the resolver needs (best-effort spec fetch). */
|
|
5
|
-
interface SpecSource<TDef> {
|
|
6
|
-
getSpec(name: string, version?: string): Promise<TDef>;
|
|
7
|
-
}
|
|
8
|
-
export interface ResolveDependencyStatusesInput {
|
|
9
|
-
/** The per-env dependency snapshot. */
|
|
10
|
-
snapshot: DependencySnapshotData | DependencyStateData;
|
|
11
|
-
/**
|
|
12
|
-
* Directory holding the synced `bp_modules/` (e.g. `<project>/.adk/bot/bp_modules`),
|
|
13
|
-
* used for the on-disk installed check (MODE B). When omitted, dependencies are
|
|
14
|
-
* assumed installed — a fresh checkout that hasn't built yet shouldn't report every
|
|
15
|
-
* dependency `not_installed`; the snapshot + config drives the verdict instead.
|
|
16
|
-
*/
|
|
17
|
-
bpModulesDir?: string;
|
|
18
|
-
/** Optional catalog registries to enrich verdicts with specs. Best-effort: a fetch
|
|
19
|
-
* failure (offline / unauthenticated) degrades to a null spec, never throws. */
|
|
20
|
-
integrationRegistry?: SpecSource<IntegrationDefinition>;
|
|
21
|
-
pluginRegistry?: SpecSource<PluginDefinition>;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Offline-first capability resolver: the single place that turns a dependency snapshot (+ optional
|
|
25
|
-
* catalog specs + on-disk presence) into the flat {@link DependencyStatus} records
|
|
26
|
-
* the CLI (`adk integrations status`, `adk check`), the `adk dev` boot summary, and
|
|
27
|
-
* the deploy gate all consume. It gathers the I/O inputs and delegates the verdict to
|
|
28
|
-
* the pure `compute*Status` functions; integrations are resolved first so each plugin
|
|
29
|
-
* can see its backing integrations' verdicts (the transitive rule).
|
|
30
|
-
*
|
|
31
|
-
* Requires no auth/botId — a missing registry or a fetch failure simply yields a null
|
|
32
|
-
* spec (verdict falls back to Cloud's persisted WS0 verdict, or `unresolved`).
|
|
33
|
-
*/
|
|
34
|
-
export declare function resolveDependencyStatuses(input: ResolveDependencyStatusesInput): Promise<DependencyStatus[]>;
|
|
35
|
-
export {};
|
|
36
|
-
//# sourceMappingURL=status-resolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status-resolver.d.ts","sourceRoot":"","sources":["../../src/dependencies/status-resolver.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC/F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAU3D,4EAA4E;AAC5E,UAAU,UAAU,CAAC,IAAI;IACvB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACvD;AAED,MAAM,WAAW,8BAA8B;IAC7C,uCAAuC;IACvC,QAAQ,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;qFACiF;IACjF,mBAAmB,CAAC,EAAE,UAAU,CAAC,qBAAqB,CAAC,CAAA;IACvD,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAA;CAC9C;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAwElH"}
|