@ductape/sdk 0.1.20 → 0.1.21
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/agents/agents.service.d.ts +2 -0
- package/dist/agents/agents.service.js +26 -3
- package/dist/agents/agents.service.js.map +1 -1
- package/dist/api/services/logsApi.service.js +5 -1
- package/dist/api/services/logsApi.service.js.map +1 -1
- package/dist/api/services/productsApi.service.d.ts +111 -0
- package/dist/api/services/productsApi.service.js +90 -0
- package/dist/api/services/productsApi.service.js.map +1 -1
- package/dist/api/urls.d.ts +7 -0
- package/dist/api/urls.js +14 -7
- package/dist/api/urls.js.map +1 -1
- package/dist/apps/services/app.service.js +7 -2
- package/dist/apps/services/app.service.js.map +1 -1
- package/dist/brokers/brokers.service.js +20 -12
- package/dist/brokers/brokers.service.js.map +1 -1
- package/dist/database/adapters/mysql.adapter.js +8 -3
- package/dist/database/adapters/mysql.adapter.js.map +1 -1
- package/dist/database/adapters/postgresql.adapter.js +6 -2
- package/dist/database/adapters/postgresql.adapter.js.map +1 -1
- package/dist/database/databases.service.d.ts +10 -1
- package/dist/database/databases.service.js +84 -27
- package/dist/database/databases.service.js.map +1 -1
- package/dist/graph/graphs.service.d.ts +7 -3
- package/dist/graph/graphs.service.js +67 -31
- package/dist/graph/graphs.service.js.map +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.js +32 -93
- package/dist/index.js.map +1 -1
- package/dist/logs/logs.service.d.ts +3 -1
- package/dist/logs/logs.service.js +12 -2
- package/dist/logs/logs.service.js.map +1 -1
- package/dist/logs/logs.types.d.ts +4 -0
- package/dist/logs/logs.types.js.map +1 -1
- package/dist/notifications/notifications.service.d.ts +6 -0
- package/dist/notifications/notifications.service.js +54 -17
- package/dist/notifications/notifications.service.js.map +1 -1
- package/dist/processor/services/processor.service.d.ts +0 -14
- package/dist/processor/services/processor.service.js +6 -72
- package/dist/processor/services/processor.service.js.map +1 -1
- package/dist/products/bootstrap-cache.d.ts +22 -0
- package/dist/products/bootstrap-cache.js +78 -0
- package/dist/products/bootstrap-cache.js.map +1 -0
- package/dist/products/services/products.service.d.ts +46 -3
- package/dist/products/services/products.service.js +304 -125
- package/dist/products/services/products.service.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productFallback.validator.js +1 -1
- package/dist/products/validators/joi-validators/create.productGraph.validator.js +7 -0
- package/dist/products/validators/joi-validators/create.productGraph.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productQuota.validator.js +1 -1
- package/dist/products/validators/joi-validators/create.productVector.validator.js +6 -0
- package/dist/products/validators/joi-validators/create.productVector.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.productFallback.validator.js +1 -1
- package/dist/products/validators/joi-validators/update.productGraph.validator.js +9 -0
- package/dist/products/validators/joi-validators/update.productGraph.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.productQuota.validator.js +1 -1
- package/dist/resilience/fallback.service.d.ts +3 -0
- package/dist/resilience/fallback.service.js +49 -14
- package/dist/resilience/fallback.service.js.map +1 -1
- package/dist/resilience/healthcheck.service.d.ts +3 -0
- package/dist/resilience/healthcheck.service.js +57 -7
- package/dist/resilience/healthcheck.service.js.map +1 -1
- package/dist/resilience/quota.service.d.ts +3 -0
- package/dist/resilience/quota.service.js +49 -14
- package/dist/resilience/quota.service.js.map +1 -1
- package/dist/resilience/resilience-execution.utils.d.ts +22 -0
- package/dist/resilience/resilience-execution.utils.js +81 -0
- package/dist/resilience/resilience-execution.utils.js.map +1 -0
- package/dist/sessions/sessions.service.d.ts +9 -1
- package/dist/sessions/sessions.service.js +125 -49
- package/dist/sessions/sessions.service.js.map +1 -1
- package/dist/types/index.types.d.ts +8 -0
- package/dist/types/index.types.js.map +1 -1
- package/dist/types/processor.types.d.ts +3 -0
- package/dist/types/processor.types.js.map +1 -1
- package/dist/types/requests.types.d.ts +4 -0
- package/dist/vector/vector-database.service.d.ts +6 -0
- package/dist/vector/vector-database.service.js +66 -8
- package/dist/vector/vector-database.service.js.map +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RedisClientType } from 'redis';
|
|
2
|
+
import type { IBootstrapWorkflowStep } from '../api/services/productsApi.service';
|
|
3
|
+
/** TTL for bootstrap cache (same component version = same bootstrap). 5 minutes. */
|
|
4
|
+
export declare const BOOTSTRAP_CACHE_TTL_MS: number;
|
|
5
|
+
export declare const BOOTSTRAP_REDIS_PREFIX = "ductape:bootstrap:";
|
|
6
|
+
export type BootstrapDomain = 'action' | 'notification' | 'storage' | 'session' | 'database' | 'broker' | 'graph' | 'vector' | 'resilience' | 'intelligence' | 'workflow';
|
|
7
|
+
export declare function buildBootstrapCacheKey(domain: BootstrapDomain, workspaceId: string, parts: Array<string | undefined | null>): string;
|
|
8
|
+
export declare function hashWorkflowSteps(steps: IBootstrapWorkflowStep[]): string;
|
|
9
|
+
/**
|
|
10
|
+
* Tiered bootstrap response cache: in-memory first, optional Redis (encrypted with workspace key).
|
|
11
|
+
* Keys: domain:workspaceId:product:env:tag…
|
|
12
|
+
*/
|
|
13
|
+
export declare class BootstrapCache {
|
|
14
|
+
private readonly workspaceId;
|
|
15
|
+
private readonly redisClient?;
|
|
16
|
+
private readonly encryptionKey?;
|
|
17
|
+
private readonly internal;
|
|
18
|
+
constructor(workspaceId: string, redisClient?: RedisClientType, encryptionKey?: string | null);
|
|
19
|
+
get<T>(key: string): Promise<T | null>;
|
|
20
|
+
set(key: string, data: unknown): void;
|
|
21
|
+
clear(): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BootstrapCache = exports.BOOTSTRAP_REDIS_PREFIX = exports.BOOTSTRAP_CACHE_TTL_MS = void 0;
|
|
4
|
+
exports.buildBootstrapCacheKey = buildBootstrapCacheKey;
|
|
5
|
+
exports.hashWorkflowSteps = hashWorkflowSteps;
|
|
6
|
+
const crypto_1 = require("crypto");
|
|
7
|
+
const processor_utils_1 = require("../processor/utils/processor.utils");
|
|
8
|
+
/** TTL for bootstrap cache (same component version = same bootstrap). 5 minutes. */
|
|
9
|
+
exports.BOOTSTRAP_CACHE_TTL_MS = 5 * 60 * 1000;
|
|
10
|
+
exports.BOOTSTRAP_REDIS_PREFIX = 'ductape:bootstrap:';
|
|
11
|
+
function buildBootstrapCacheKey(domain, workspaceId, parts) {
|
|
12
|
+
const scope = parts
|
|
13
|
+
.map((p) => (p == null ? '' : String(p)))
|
|
14
|
+
.join(':');
|
|
15
|
+
return `${exports.BOOTSTRAP_REDIS_PREFIX}${domain}:${workspaceId}:${scope}`;
|
|
16
|
+
}
|
|
17
|
+
function hashWorkflowSteps(steps) {
|
|
18
|
+
const stable = [...steps].sort((a, b) => a.step_tag.localeCompare(b.step_tag));
|
|
19
|
+
return (0, crypto_1.createHash)('sha256').update(JSON.stringify(stable)).digest('hex').slice(0, 16);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Tiered bootstrap response cache: in-memory first, optional Redis (encrypted with workspace key).
|
|
23
|
+
* Keys: domain:workspaceId:product:env:tag…
|
|
24
|
+
*/
|
|
25
|
+
class BootstrapCache {
|
|
26
|
+
constructor(workspaceId, redisClient, encryptionKey) {
|
|
27
|
+
this.workspaceId = workspaceId;
|
|
28
|
+
this.redisClient = redisClient;
|
|
29
|
+
this.encryptionKey = encryptionKey;
|
|
30
|
+
this.internal = new Map();
|
|
31
|
+
}
|
|
32
|
+
async get(key) {
|
|
33
|
+
const now = Date.now();
|
|
34
|
+
const entry = this.internal.get(key);
|
|
35
|
+
if (entry && now - entry.storedAt < exports.BOOTSTRAP_CACHE_TTL_MS) {
|
|
36
|
+
return entry.data;
|
|
37
|
+
}
|
|
38
|
+
if (entry) {
|
|
39
|
+
this.internal.delete(key);
|
|
40
|
+
}
|
|
41
|
+
if (!this.redisClient || !this.encryptionKey) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
const redis = this.redisClient;
|
|
46
|
+
const raw = await redis.get(key);
|
|
47
|
+
if (!raw)
|
|
48
|
+
return null;
|
|
49
|
+
const decrypted = (0, processor_utils_1.decrypt)(raw, this.encryptionKey);
|
|
50
|
+
const data = JSON.parse(decrypted);
|
|
51
|
+
this.internal.set(key, { data, storedAt: now });
|
|
52
|
+
return data;
|
|
53
|
+
}
|
|
54
|
+
catch (_a) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
set(key, data) {
|
|
59
|
+
const now = Date.now();
|
|
60
|
+
this.internal.set(key, { data, storedAt: now });
|
|
61
|
+
if (!this.redisClient || !this.encryptionKey)
|
|
62
|
+
return;
|
|
63
|
+
const ttlSeconds = Math.ceil(exports.BOOTSTRAP_CACHE_TTL_MS / 1000);
|
|
64
|
+
try {
|
|
65
|
+
const redis = this.redisClient;
|
|
66
|
+
const encrypted = (0, processor_utils_1.encrypt)(JSON.stringify(data), this.encryptionKey);
|
|
67
|
+
redis.setEx(key, ttlSeconds, encrypted).catch(() => undefined);
|
|
68
|
+
}
|
|
69
|
+
catch (_a) {
|
|
70
|
+
// ignore
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
clear() {
|
|
74
|
+
this.internal.clear();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.BootstrapCache = BootstrapCache;
|
|
78
|
+
//# sourceMappingURL=bootstrap-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap-cache.js","sourceRoot":"","sources":["../../src/products/bootstrap-cache.ts"],"names":[],"mappings":";;;AAsBA,wDASC;AAED,8CAGC;AApCD,mCAAoC;AAGpC,wEAAsE;AAEtE,oFAAoF;AACvE,QAAA,sBAAsB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AACvC,QAAA,sBAAsB,GAAG,oBAAoB,CAAC;AAe3D,SAAgB,sBAAsB,CACpC,MAA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ElB,CAAC;YACF,MAAM,SAAS,GAAG,IAAA,yBAAO,EAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;YACpE,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,KAAK,CAAC,GAAc,EAAE,CAAC,SAAS,CAAC,CAAC;QAC5E,CAAC;QAAC,WAAM,CAAC;YACP,SAAS;QACX,CAAC;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;CACF;AArDD,wCAqDC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBootstrapActionParams, IBootstrapActionResponse, IBootstrapNotificationParams, IBootstrapNotificationResponse, IBootstrapStorageParams, IBootstrapStorageResponse, IBootstrapWorkflowParams, IGenerateExecutablePayloadParams, IGenerateExecutablePayloadResponse } from '../../api/services/productsApi.service';
|
|
1
|
+
import { IBootstrapActionParams, IBootstrapActionResponse, IBootstrapNotificationParams, IBootstrapNotificationResponse, IBootstrapStorageParams, IBootstrapStorageResponse, IBootstrapSessionParams, IBootstrapSessionResponse, IBootstrapDatabaseParams, IBootstrapDatabaseResponse, IBootstrapBrokerParams, IBootstrapBrokerResponse, IBootstrapGraphParams, IBootstrapGraphResponse, IBootstrapVectorParams, IBootstrapVectorResponse, IBootstrapResilienceParams, IBootstrapResilienceResponse, IBootstrapIntelligenceParams, IBootstrapIntelligenceResponse, IBootstrapWorkflowParams, IGenerateExecutablePayloadParams, IGenerateExecutablePayloadResponse } from '../../api/services/productsApi.service';
|
|
2
2
|
import { IApp, IAppAccess, IAppAction, IAppWebhook, ISample, IVersion } from '../../types/appBuilder.types';
|
|
3
3
|
import { IBuilderInit } from '../../types/index.types';
|
|
4
4
|
import { IActionDataParserInput, IActionRequest, ICreateProductsBuilder, IFeatureEvent, IFeatureInput, IFeatureSequence, IProduct, IProductApp, IProductCache, IProductDatabase, IProductDatabaseAction, IProductEnv, IProductFeature, IProductFunction, IProductJobs, IParseActionEventInput, IParseInputStringInput, IParseInputStringMetaData, IProductStorage, IDbActionRequest, INotificationRequest, IProductQuota, IProductFallback, IProductDatabaseMigration, IQuotaOptions, IFallbackOptions, IProductSession, IFetchFilesPayload, IFetchUsersPayload, IProductAppHealth, IProductGraph, IProductWorkflow, IProductVector, IProductAgent, IProductLLMModel, IProductDatabaseTrigger, IProductVectorAction } from '../../types/productsBuilder.types';
|
|
@@ -19,6 +19,13 @@ export interface IProductsBuilderService {
|
|
|
19
19
|
applyBootstrapActionResult(result: IBootstrapActionResponse, product_tag?: string): void;
|
|
20
20
|
bootstrapNotification(params: IBootstrapNotificationParams): Promise<IBootstrapNotificationResponse>;
|
|
21
21
|
bootstrapStorage(params: IBootstrapStorageParams): Promise<IBootstrapStorageResponse>;
|
|
22
|
+
bootstrapSession(params: IBootstrapSessionParams): Promise<IBootstrapSessionResponse>;
|
|
23
|
+
bootstrapDatabase(params: IBootstrapDatabaseParams): Promise<IBootstrapDatabaseResponse>;
|
|
24
|
+
bootstrapBroker(params: IBootstrapBrokerParams): Promise<IBootstrapBrokerResponse>;
|
|
25
|
+
bootstrapGraph(params: IBootstrapGraphParams): Promise<IBootstrapGraphResponse>;
|
|
26
|
+
bootstrapVector(params: IBootstrapVectorParams): Promise<IBootstrapVectorResponse>;
|
|
27
|
+
bootstrapResilience(params: IBootstrapResilienceParams): Promise<IBootstrapResilienceResponse>;
|
|
28
|
+
bootstrapIntelligence(params: IBootstrapIntelligenceParams): Promise<IBootstrapIntelligenceResponse>;
|
|
22
29
|
bootstrapWorkflow(params: Omit<IBootstrapWorkflowParams, 'workspace_id'>): Promise<Record<string, unknown>>;
|
|
23
30
|
generateExecutablePayload(params: IGenerateExecutablePayloadParams): Promise<IGenerateExecutablePayloadResponse>;
|
|
24
31
|
createEnv(data: Partial<IProductEnv>): Promise<void>;
|
|
@@ -127,7 +134,7 @@ export interface IProductsBuilderService {
|
|
|
127
134
|
fetchWorkflow(tag: string): Promise<IProductWorkflow | null>;
|
|
128
135
|
fetchWorkflows(): Promise<Array<IProductWorkflow>>;
|
|
129
136
|
deleteWorkflow(tag: string): Promise<void>;
|
|
130
|
-
createAppAccessTag(app_tag: string): Promise<IAppAccess>;
|
|
137
|
+
createAppAccessTag(app_tag: string, known_app_id?: string): Promise<IAppAccess>;
|
|
131
138
|
extractStages(input: string): Array<string | number>;
|
|
132
139
|
updateDataValidation(tag: string, update: Partial<IParsedSample>): Promise<boolean>;
|
|
133
140
|
fetchStorageFiles(filter: IFetchFilesPayload): Promise<Array<IFileURLPayload>>;
|
|
@@ -160,10 +167,13 @@ export default class ProductsBuilderService implements IProductsBuilderService {
|
|
|
160
167
|
/** In-memory cache for the current product run (cleared on init) to avoid repeated API calls in workflows */
|
|
161
168
|
private brokerCache;
|
|
162
169
|
private envCache;
|
|
170
|
+
private readonly bootstrapCache;
|
|
163
171
|
/** Only log when DUCTAPE_DEBUG is set (avoids sync I/O cost in workflow hot path) */
|
|
164
172
|
private static _debug;
|
|
165
173
|
private _debugLog;
|
|
166
174
|
constructor({ workspace_id, public_key, user_id, token, env_type, redis_client, queues, access_key, workspace_private_key }: IBuilderInit);
|
|
175
|
+
private applyBootstrapProductContext;
|
|
176
|
+
private cachedBootstrap;
|
|
167
177
|
fetchPrivateKey(): string;
|
|
168
178
|
fetchWorkspaceId(): string;
|
|
169
179
|
fetchProductId(): string;
|
|
@@ -177,6 +187,14 @@ export default class ProductsBuilderService implements IProductsBuilderService {
|
|
|
177
187
|
healthcheck?: string;
|
|
178
188
|
check_interval?: number;
|
|
179
189
|
}): Promise<void>;
|
|
190
|
+
/** Validate a quota/fallback action provider (app action or product workflow). */
|
|
191
|
+
validateQuotaFallbackProvider(option: {
|
|
192
|
+
type?: string;
|
|
193
|
+
app?: string | null;
|
|
194
|
+
event: string;
|
|
195
|
+
healthcheck?: string;
|
|
196
|
+
check_interval?: number;
|
|
197
|
+
}): Promise<void>;
|
|
180
198
|
/** Keep in-memory product component arrays in sync after component CRUD (components API can lag). */
|
|
181
199
|
private mergeProductComponent;
|
|
182
200
|
/**
|
|
@@ -199,6 +217,20 @@ export default class ProductsBuilderService implements IProductsBuilderService {
|
|
|
199
217
|
}>;
|
|
200
218
|
onFailure?: any;
|
|
201
219
|
}): Promise<void>;
|
|
220
|
+
updateHealthcheckFromSchema(schema: {
|
|
221
|
+
tag: string;
|
|
222
|
+
name?: string;
|
|
223
|
+
description?: string;
|
|
224
|
+
probe?: any;
|
|
225
|
+
interval: number;
|
|
226
|
+
retries: number;
|
|
227
|
+
envs: Array<{
|
|
228
|
+
slug: string;
|
|
229
|
+
input?: any;
|
|
230
|
+
[k: string]: any;
|
|
231
|
+
}>;
|
|
232
|
+
onFailure?: any;
|
|
233
|
+
}): Promise<void>;
|
|
202
234
|
updateDataValidation(selector: string, update: Partial<IParsedSample>): Promise<boolean>;
|
|
203
235
|
createProduct(data: ICreateProductsBuilder): Promise<IProduct>;
|
|
204
236
|
initializeWorkspace(subCheck?: boolean): Promise<void>;
|
|
@@ -222,6 +254,13 @@ export default class ProductsBuilderService implements IProductsBuilderService {
|
|
|
222
254
|
applyBootstrapActionResult(result: IBootstrapActionResponse, product_tag?: string): void;
|
|
223
255
|
bootstrapNotification(params: IBootstrapNotificationParams): Promise<IBootstrapNotificationResponse>;
|
|
224
256
|
bootstrapStorage(params: IBootstrapStorageParams): Promise<IBootstrapStorageResponse>;
|
|
257
|
+
bootstrapSession(params: IBootstrapSessionParams): Promise<IBootstrapSessionResponse>;
|
|
258
|
+
bootstrapDatabase(params: IBootstrapDatabaseParams): Promise<IBootstrapDatabaseResponse>;
|
|
259
|
+
bootstrapBroker(params: IBootstrapBrokerParams): Promise<IBootstrapBrokerResponse>;
|
|
260
|
+
bootstrapGraph(params: IBootstrapGraphParams): Promise<IBootstrapGraphResponse>;
|
|
261
|
+
bootstrapVector(params: IBootstrapVectorParams): Promise<IBootstrapVectorResponse>;
|
|
262
|
+
bootstrapResilience(params: IBootstrapResilienceParams): Promise<IBootstrapResilienceResponse>;
|
|
263
|
+
bootstrapIntelligence(params: IBootstrapIntelligenceParams): Promise<IBootstrapIntelligenceResponse>;
|
|
225
264
|
/**
|
|
226
265
|
* Bootstrap workflow - fetch all action/notification/storage data for multiple steps in one API call
|
|
227
266
|
*/
|
|
@@ -407,7 +446,8 @@ export default class ProductsBuilderService implements IProductsBuilderService {
|
|
|
407
446
|
private validateVariablesValues;
|
|
408
447
|
private validateAppEnvs;
|
|
409
448
|
private validateAppAuth;
|
|
410
|
-
createAppAccessTag(app_tag: string): Promise<IAppAccess>;
|
|
449
|
+
createAppAccessTag(app_tag: string, known_app_id?: string): Promise<IAppAccess>;
|
|
450
|
+
private accessAppIsLive;
|
|
411
451
|
addApp(app: IProductApp, throwErrorIfExists?: boolean): Promise<void>;
|
|
412
452
|
fetchAppWebhooks(access_tag: string): Promise<Array<IAppWebhook>>;
|
|
413
453
|
updateApp(access_tag: string, data: Partial<IProductApp>): Promise<void>;
|
|
@@ -494,6 +534,9 @@ export default class ProductsBuilderService implements IProductsBuilderService {
|
|
|
494
534
|
updateDatabase(tag: string, data: Partial<IProductDatabase>): Promise<void>;
|
|
495
535
|
fetchDatabases(): Promise<Array<IProductDatabase>>;
|
|
496
536
|
fetchDatabase(tag: string): Promise<IProductDatabase | null>;
|
|
537
|
+
/** Resolve database config from in-memory product cache, falling back to API fetch. */
|
|
538
|
+
private resolveDatabaseConfig;
|
|
539
|
+
private normalizeDatabaseTriggers;
|
|
497
540
|
deleteDatabase(tag: string): Promise<void>;
|
|
498
541
|
createGraph(data: Partial<IProductGraph>, throwErrorIfExists?: boolean): Promise<void>;
|
|
499
542
|
updateGraph(tag: string, data: Partial<IProductGraph>): Promise<void>;
|