@almadar/integrations 2.40.0 → 2.42.0

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.
@@ -1,5 +1,6 @@
1
- import { ServiceParamsValue, ServiceParams, EventPayload, EntityRow } from '@almadar/core';
2
- import { f as IntegrationParamValue, g as IntegrationParams } from './BaseIntegration-CWdas-N_.js';
1
+ import { ServiceParams, EventPayload, EntityRow } from '@almadar/core';
2
+ import { LLMServiceActions, MLServiceActions } from '@almadar/llm';
3
+ import { f as IntegrationParamValue, g as IntegrationParams } from './BaseIntegration-D_iNTesu.js';
3
4
 
4
5
  /** Scalar value admissible as a SQL bind parameter. */
5
6
  type DatabaseQueryParamValue = string | number | boolean | Date | null;
@@ -264,105 +265,10 @@ type StripeActions = {
264
265
  };
265
266
  };
266
267
  };
267
- type LLMIntegrationActions = {
268
- /** Generate free-form text from a prompt via the configured LLM provider (default 'You are a helpful assistant.' system prompt). */
269
- generate: {
270
- params: {
271
- /** The user/task prompt sent to the model. */
272
- userPrompt: string;
273
- /** System prompt steering the model's behavior; defaults to a generic assistant prompt. */
274
- systemPrompt?: string;
275
- /** Model id override; when set, a fresh client is built for this call instead of the shared one. */
276
- model?: string;
277
- /** Sampling temperature (0-1ish, provider-dependent); higher is more random. */
278
- temperature?: number;
279
- /** Maximum tokens to generate; defaults to 1024. */
280
- maxTokens?: number;
281
- };
282
- result: {
283
- content: string;
284
- usage: {
285
- promptTokens?: number;
286
- completionTokens?: number;
287
- totalTokens?: number;
288
- tokens?: number;
289
- };
290
- };
291
- };
292
- /** Classify text into exactly one of a caller-supplied category list, with a confidence score and reasoning. */
293
- classify: {
294
- params: {
295
- /** Text to classify. */
296
- text: string;
297
- /** Closed set of category labels the model must choose from. */
298
- categories: string[];
299
- /** Model id override. */
300
- model?: string;
301
- };
302
- result: {
303
- category: string;
304
- confidence: number;
305
- reasoning: string;
306
- };
307
- };
308
- /** Extract structured data from text according to a JSON-schema-shaped description; returned data is not validated against the schema. */
309
- extract: {
310
- params: {
311
- /** Source text to extract data from. */
312
- text: string;
313
- /** JSON-schema-like description of the fields to extract; passed to the model as a prompt, not enforced structurally. */
314
- schema: IntegrationParams;
315
- /** Model id override. */
316
- model?: string;
317
- };
318
- result: IntegrationParams;
319
- };
320
- /** Summarize text, optionally constrained by length and style, returning a summary plus key points. */
321
- summarize: {
322
- params: {
323
- /** Text to summarize. */
324
- text: string;
325
- /** Target maximum summary length in words. */
326
- maxLength?: number;
327
- /** Summary style: 'bullet' for bullet points, 'detailed' for thorough, otherwise concise. */
328
- style?: string;
329
- /** Model id override. */
330
- model?: string;
331
- };
332
- result: {
333
- summary: string;
334
- keyPoints: string[];
335
- };
336
- };
337
- /** Generate embedding vectors for an array of texts via the configured embedding model (default baai/bge-base-en-v1.5 on OpenRouter, independent of the chat provider). */
338
- embed: {
339
- params: {
340
- /** Texts to embed, one vector per entry, in order. */
341
- texts: string[];
342
- /** Embedding model id override. */
343
- model?: string;
344
- };
345
- result: {
346
- embeddings: number[][];
347
- };
348
- };
349
- };
350
- type MLActions = {
351
- /** Run inference against a deployed model-serving orbital by posting an INFER event and reading the prediction back out of the emitted INFERRED result; may cold-start (up to 60s default timeout). */
352
- infer: {
353
- params: {
354
- /** Checkpoint or model identifier the serving orbital resolves. */
355
- model: string;
356
- /** JSON-safe model input payload. */
357
- input: ServiceParamsValue;
358
- };
359
- result: {
360
- output: ServiceParamsValue;
361
- confidence: number;
362
- violations: ServiceParamsValue[];
363
- };
364
- };
365
- };
268
+ /** The llm service's actions, declared once by the service owner (`@almadar/llm`). */
269
+ type LLMIntegrationActions = LLMServiceActions;
270
+ /** The ml service's actions, declared once by the service owner (`@almadar/llm`). */
271
+ type MLActions = MLServiceActions;
366
272
  type YouTubeActions = {
367
273
  /** Search YouTube via the Data API and return matching video snippets. */
368
274
  search: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/integrations",
3
- "version": "2.40.0",
3
+ "version": "2.42.0",
4
4
  "description": "External service integrations for Almadar applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -33,8 +33,8 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@almadar/core": "^10.111.0",
37
- "@almadar/llm": "^2.56.0",
36
+ "@almadar/core": "^10.114.0",
37
+ "@almadar/llm": "^2.57.0",
38
38
  "@almadar/logger": "^1.15.0",
39
39
  "@aws-sdk/client-s3": "^3.700.0",
40
40
  "@aws-sdk/s3-request-presigner": "^3.700.0",
@@ -50,7 +50,7 @@
50
50
  "zod": "^3.23.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@almadar/eslint-plugin": "^2.20.0",
53
+ "@almadar/eslint-plugin": "^2.21.0",
54
54
  "@types/node": "^20.0.0",
55
55
  "@types/pg": "^8.11.10",
56
56
  "@types/web-push": "^3.6.4",