@almadar/llm 2.59.0 → 2.60.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.
- package/dist/index.d.ts +6 -3
- package/package.json +4 -4
- package/src/contracts.ts +6 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { L as LLMFinishReason, a as LLMClient, C as ChatCompletionMessage, b as ChatCompletionToolDef, c as LLMUsage } from './client-CZGQAqSM.js';
|
|
2
2
|
export { A as ANTHROPIC_MODELS, d as CacheAwareLLMCallOptions, e as CacheableBlock, f as ChatCompletionChoice, g as ChatCompletionResponse, h as ChatCompletionRole, i as ChatCompletionToolCall, j as ChatCompletionUsage, D as DEEPSEEK_MODELS, K as KIMI_MODELS, k as LLMCallOptions, l as LLMClientOptions, m as LLMProvider, n as LLMResponse, o as LLMStreamChunk, p as LLMStreamOptions, q as LLM_PROVIDER_API_KEY_ENV, O as OPENAI_MODELS, r as OPENROUTER_MODELS, P as PROVIDER_CATALOG, s as ProviderCatalogEntry, t as ProviderConfig, V as VisionCallOptions, u as VisionImageMediaType, v as VisionImagePart, w as buildVisionMessageContent, x as createAnthropicClient, y as createCreativeClient, z as createDeepSeekClient, B as createFixClient, E as createKimiClient, F as createOpenAIClient, G as createOpenRouterClient, H as createRequirementsClient, I as createZhipuClient, J as getAvailableProvider, M as getSharedLLMClient, N as isProviderAvailable, Q as listLmstudioModels, R as listSelectableProviders, S as parseChatCompletionResponse, T as resetSharedLLMClient } from './client-CZGQAqSM.js';
|
|
3
3
|
export { E as EstimateCostTokens, a as RateLimiter, R as RateLimiterOptions, b as TokenTracker, T as TokenUsage, e as estimateCostUSD, g as getGlobalRateLimiter, c as getGlobalTokenTracker, r as resetGlobalRateLimiter, d as resetGlobalTokenTracker } from './rate-limiter-Bz0iSJgZ.js';
|
|
4
|
-
import { JsonValue, TraceActivity, ServiceParams, ServiceContract, ServiceParamsValue } from '@almadar/core';
|
|
4
|
+
import { JsonValue, TraceActivity, ServiceParams, EventAddress, ServiceContract, ServiceParamsValue } from '@almadar/core';
|
|
5
5
|
export { autoCloseJson, extractJsonFromText, isValidJson, parseJsonResponse, safeParseJson } from './json-parser.js';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
export { JsonSchema, STRUCTURED_OUTPUT_MODELS, StructuredGenerationOptions, StructuredGenerationResult, StructuredOutputClient, StructuredOutputOptions, getStructuredOutputClient, isStructuredOutputAvailable, resetStructuredOutputClient } from './structured-output.js';
|
|
@@ -388,11 +388,14 @@ interface AgentChatMessage extends ServiceParams {
|
|
|
388
388
|
* What the model may use in `call-tools`. Exactly one of:
|
|
389
389
|
* `event` — a declared external input, addressed like a `listens` source
|
|
390
390
|
* (`EVENT`, `Trait.EVENT`, `Orbital.Trait.EVENT`), fired as the caller;
|
|
391
|
-
* `read` — an entity whose rows the caller may read
|
|
391
|
+
* `read` — an entity whose rows the caller may read;
|
|
392
|
+
* `scope: "declared"` — every declared external input of the program, plus one
|
|
393
|
+
* read tool over every persisted entity (rows still filtered by `@read`).
|
|
392
394
|
*/
|
|
393
395
|
interface AgentTool extends ServiceParams {
|
|
394
|
-
event?:
|
|
396
|
+
event?: EventAddress;
|
|
395
397
|
read?: string;
|
|
398
|
+
scope?: "declared";
|
|
396
399
|
}
|
|
397
400
|
/**
|
|
398
401
|
* One thing a `call-tools` run did, in order: each model call (`llm_response`),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/llm",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.60.0",
|
|
4
4
|
"description": "Multi-provider LLM client with rate limiting, token tracking, structured outputs, and continuation handling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"src"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@almadar/logger": "^1.
|
|
39
|
+
"@almadar/logger": "^1.16.0",
|
|
40
40
|
"@anthropic-ai/sdk": "^0.52.0",
|
|
41
41
|
"@langchain/anthropic": "^1.3.23",
|
|
42
42
|
"@langchain/core": "^1.1.32",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"zod": "^3.22.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@almadar/core": "^10.
|
|
50
|
+
"@almadar/core": "^10.117.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@almadar/core": "^10.
|
|
53
|
+
"@almadar/core": "^10.117.0",
|
|
54
54
|
"@almadar/eslint-plugin": "^2.21.0",
|
|
55
55
|
"@types/node": "^22.0.0",
|
|
56
56
|
"@typescript-eslint/parser": "8.65.0",
|
package/src/contracts.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type { ServiceContract, ServiceParams, ServiceParamsValue, TraceActivity } from "@almadar/core";
|
|
11
|
+
import type { EventAddress, ServiceContract, ServiceParams, ServiceParamsValue, TraceActivity } from "@almadar/core";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* JSON Schema definition for structured extraction.
|
|
@@ -47,11 +47,14 @@ export interface AgentChatMessage extends ServiceParams {
|
|
|
47
47
|
* What the model may use in `call-tools`. Exactly one of:
|
|
48
48
|
* `event` — a declared external input, addressed like a `listens` source
|
|
49
49
|
* (`EVENT`, `Trait.EVENT`, `Orbital.Trait.EVENT`), fired as the caller;
|
|
50
|
-
* `read` — an entity whose rows the caller may read
|
|
50
|
+
* `read` — an entity whose rows the caller may read;
|
|
51
|
+
* `scope: "declared"` — every declared external input of the program, plus one
|
|
52
|
+
* read tool over every persisted entity (rows still filtered by `@read`).
|
|
51
53
|
*/
|
|
52
54
|
export interface AgentTool extends ServiceParams {
|
|
53
|
-
event?:
|
|
55
|
+
event?: EventAddress;
|
|
54
56
|
read?: string;
|
|
57
|
+
scope?: "declared";
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
/**
|