@owlmeans/llm-common 0.1.18-rc.1 → 0.1.18-rc.11
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/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/llm-common/SKILL.md +5 -4
- package/build/consts.d.ts +7 -0
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +7 -0
- package/build/consts.js.map +1 -1
- package/build/files/types.d.ts +10 -0
- package/build/files/types.d.ts.map +1 -1
- package/build/files/utils.d.ts.map +1 -1
- package/build/types.d.ts +19 -0
- package/build/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/consts.ts +8 -0
- package/src/files/types.ts +11 -0
- package/src/types.ts +19 -0
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/llm-common",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-
|
|
4
|
+
"version": "0.1.18-rc.11",
|
|
5
|
+
"generatedAt": "2026-09-01T22:50:56.459Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/llm-common
|
|
9
9
|
|
|
10
10
|
**Layer:** Core
|
|
11
|
-
**Install:** `"@owlmeans/llm-common": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/llm-common": "^0.1.18-rc.11"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
The contracts half of the LLM stack. **No `@langchain/*` runtime dependency** — importable
|
|
14
14
|
from a browser bundle, a queue worker, or any package that must not pull an inference SDK.
|
|
@@ -25,15 +25,16 @@ The dependency direction is one-way: a domain contracts package extends these;
|
|
|
25
25
|
| `StructuredMode` | `Native` (provider JSON-schema mode) vs `Tool` (forced tool call). |
|
|
26
26
|
| `SpectatorContentType`, `SPECTATOR_GENERAL` | Observability record enums/defaults. |
|
|
27
27
|
| `ModelRole` | Open `string` — declare your own enum, its values stay assignable. |
|
|
28
|
-
| `ModelConfigPatch` / `ModelConfigOverride` | The JSON-safe config subset; never credentials. |
|
|
29
|
-
| `ModelPolicy` | `{ effort, roleOverrides?, modelOverrides? }` — inherited by every refinement. |
|
|
28
|
+
| `ModelConfigPatch` / `ModelConfigOverride` | The JSON-safe config subset; never credentials. Carries the model-capability fields (`contextWindow`, `maxOutput`, `combinedWindow`) alongside the budget ones — see the `llm` skill for what each means. |
|
|
29
|
+
| `ModelPolicy` | `{ effort, roleOverrides?, modelOverrides?, utilityRole? }` — inherited by every refinement. |
|
|
30
|
+
| `UTILITY_ROLE` | `'utility'` — the conventional cheap tier for side calls (a relevance pick, a classification). `ModelPolicy.utilityRole` points it at another alias; `ExecutionService.utility` resolves it. |
|
|
30
31
|
| `ExecutionState` / `TaskExecutionState` | The persistable core (`level`/`purpose`/`policy`, plus `phase`/`completed`/`cursor`/`data`). |
|
|
31
32
|
| `LlmPurpose` | `{ type?, dedication? }` — metadata carried on every model call. |
|
|
32
33
|
| `PromptBlock`, `PROMPT_BLOCK_ORDER`, `DEFAULT_SKILL_ORDER` | The ordered sections of a composed system prompt — the order IS the cache key. |
|
|
33
34
|
| `SkillDefinition` | One named block of reusable prompt knowledge. `body` must be a pure constant. |
|
|
34
35
|
| `PromptPolicy` | `{ role?, skills?, cacheSystem?, cacheTtl? }` — carried on `ExecutionState`, merged downward. |
|
|
35
36
|
| `CacheTtl`, `CacheUsage` | `'5m' \| '1h'`; normalized prompt-cache accounting. |
|
|
36
|
-
| `LlmFileProvider`, `FileProviderRef`, `resolveFileProvider` | The minimal read/write file contract prompt plugins work against. |
|
|
37
|
+
| `LlmFileProvider`, `FileProviderRef`, `resolveFileProvider` | The minimal read/write file contract prompt plugins work against. Its optional `key` is the provider's stable identity (project root, sandbox id) — the only thing a plugin caching per-project reads can key on, since providers are rebuilt per request. |
|
|
37
38
|
| `NullCapture`, `NullKind` | Full diagnostics of a call that returned nothing usable. |
|
|
38
39
|
| `SpectatorArgument`, `SpectatorEntry`, `SpectatorEntryLogged`, `SpectatorEntryMessage` | What an observability sink stores. |
|
|
39
40
|
|
package/build/consts.d.ts
CHANGED
|
@@ -82,4 +82,11 @@ export declare enum PromptBlock {
|
|
|
82
82
|
export declare const PROMPT_BLOCK_ORDER: readonly PromptBlock[];
|
|
83
83
|
/** Sort weight of a skill that declares none — see `SkillDefinition.order`. */
|
|
84
84
|
export declare const DEFAULT_SKILL_ORDER = 100;
|
|
85
|
+
/**
|
|
86
|
+
* Conventional {@link ModelRole} for the cheap side calls the layer makes on its own
|
|
87
|
+
* behalf — a relevance pick, a classification, a one-line judgement — rather than for the
|
|
88
|
+
* work a caller asked for. A deployment that names its cheap tier differently points
|
|
89
|
+
* `ModelPolicy.utilityRole` at its own alias; nothing else has to change.
|
|
90
|
+
*/
|
|
91
|
+
export declare const UTILITY_ROLE = "utility";
|
|
85
92
|
//# sourceMappingURL=consts.d.ts.map
|
package/build/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,oBAAY,aAAa;IACvB,yFAAyF;IACzF,MAAM,WAAW;IACjB,8BAA8B;IAC9B,SAAS,cAAc;IACvB,yFAAyF;IACzF,UAAU,eAAe;CAC1B;AAED;;;GAGG;AACH,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED;;;;GAIG;AACH,oBAAY,eAAe;IACzB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,GAAG,QAAQ;CACZ;AAED;;;;;;;;;GASG;AACH,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,0DAA0D;AAC1D,oBAAY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,eAAO,MAAM,mBAAmB,MAAM,CAAA;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,YAAY,YAAY,CAAA"}
|
package/build/consts.js
CHANGED
|
@@ -93,4 +93,11 @@ export const PROMPT_BLOCK_ORDER = [
|
|
|
93
93
|
];
|
|
94
94
|
/** Sort weight of a skill that declares none — see `SkillDefinition.order`. */
|
|
95
95
|
export const DEFAULT_SKILL_ORDER = 100;
|
|
96
|
+
/**
|
|
97
|
+
* Conventional {@link ModelRole} for the cheap side calls the layer makes on its own
|
|
98
|
+
* behalf — a relevance pick, a classification, a one-line judgement — rather than for the
|
|
99
|
+
* work a caller asked for. A deployment that names its cheap tier differently points
|
|
100
|
+
* `ModelPolicy.utilityRole` at its own alias; nothing else has to change.
|
|
101
|
+
*/
|
|
102
|
+
export const UTILITY_ROLE = 'utility';
|
|
96
103
|
//# sourceMappingURL=consts.js.map
|
package/build/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,yFAAyF;IACzF,kCAAiB,CAAA;IACjB,8BAA8B;IAC9B,wCAAuB,CAAA;IACvB,yFAAyF;IACzF,0CAAyB,CAAA;AAC3B,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;IACb,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,gCAAa,CAAA;IACb,8BAAW,CAAA;AACb,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED;;;;;;;;;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,QAIzB;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,gCAAa,CAAA;IACb,8BAAW,CAAA;AACb,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,0DAA0D;AAC1D,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,qCAAa,CAAA;IACb,8CAAsB,CAAA;AACxB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AAED,mFAAmF;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,SAAS,CAAA;AAE1C;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;AACrB,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA2B;IACxD,WAAW,CAAC,IAAI;IAChB,WAAW,CAAC,MAAM;IAClB,WAAW,CAAC,QAAQ;IACpB,WAAW,CAAC,OAAO;CACX,CAAA;AAEV,+EAA+E;AAC/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAEtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAA"}
|
package/build/files/types.d.ts
CHANGED
|
@@ -17,6 +17,16 @@
|
|
|
17
17
|
* that stops a rich helper from satisfying this one.
|
|
18
18
|
*/
|
|
19
19
|
export interface LlmFileProvider {
|
|
20
|
+
/**
|
|
21
|
+
* Stable identity of WHAT this provider reads — a project root, a sandbox id.
|
|
22
|
+
*
|
|
23
|
+
* A prompt plugin that caches resolved reads across calls has nothing else to key on:
|
|
24
|
+
* providers are late-bound and often rebuilt per request, so object identity says
|
|
25
|
+
* nothing, and a cache shared between two projects serves the first one's files to the
|
|
26
|
+
* second. A provider that supplies no key is treated as uncacheable rather than as one
|
|
27
|
+
* more anonymous member of a shared bucket.
|
|
28
|
+
*/
|
|
29
|
+
key?: string;
|
|
20
30
|
/** Read a file relative to the root. With `noThrow`, a missing file yields `''`. */
|
|
21
31
|
readFile: (filePath: string, noThrow?: boolean) => Promise<string>;
|
|
22
32
|
/** Glob for files relative to the root. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/files/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,eAAe;IAC9B,oFAAoF;IACpF,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAElE,2CAA2C;IAC3C,aAAa,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAEtD,gFAAgF;IAChF,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAE/D,qFAAqF;IACrF,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACnE;AAED;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG,CAAC,MAAM,eAAe,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/files/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,oFAAoF;IACpF,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAElE,2CAA2C;IAC3C,aAAa,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAEtD,gFAAgF;IAChF,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAE/D,qFAAqF;IACrF,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACnE;AAED;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG,CAAC,MAAM,eAAe,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/files/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAElE,qEAAqE;AACrE,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/files/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAElE,qEAAqE;AACrE,eAAO,MAAM,mBAAmB,GAC9B,KAAK,eAAe,GAAG,SAAS,KAC/B,eAAe,GAAG,SAAoD,CAAA"}
|
package/build/types.d.ts
CHANGED
|
@@ -29,6 +29,12 @@ export interface ModelConfigPatch {
|
|
|
29
29
|
maxTokensCap?: number;
|
|
30
30
|
topP?: number;
|
|
31
31
|
disableThinking?: boolean;
|
|
32
|
+
/** Total window the model accepts (input + output). Informational / validation only. */
|
|
33
|
+
contextWindow?: number;
|
|
34
|
+
/** What the PROVIDER can emit in one request. Hard ceiling for `maxTokens`/`maxTokensCap`. */
|
|
35
|
+
maxOutput?: number;
|
|
36
|
+
/** The window is shared between input and output rather than input-only. */
|
|
37
|
+
combinedWindow?: boolean;
|
|
32
38
|
}
|
|
33
39
|
/** A JSON-safe model override: a config alias, or a partial config patch. */
|
|
34
40
|
export type ModelConfigOverride = string | ModelConfigPatch;
|
|
@@ -44,6 +50,12 @@ export interface ModelPolicy {
|
|
|
44
50
|
roleOverrides?: Partial<Record<ModelRole, ModelRole>>;
|
|
45
51
|
/** "Pin a role to a specific model/config" — alias or partial config override. */
|
|
46
52
|
modelOverrides?: Partial<Record<ModelRole, ModelConfigOverride>>;
|
|
53
|
+
/**
|
|
54
|
+
* Role resolved by `ExecutionService.utility` for cheap side calls. Defaults to
|
|
55
|
+
* `UTILITY_ROLE`; name another alias when the deployment calls its cheap tier
|
|
56
|
+
* something else. `roleOverrides` still applies on top of whichever one is used.
|
|
57
|
+
*/
|
|
58
|
+
utilityRole?: ModelRole;
|
|
47
59
|
}
|
|
48
60
|
/**
|
|
49
61
|
* Lifetime of a provider-side prompt cache entry. `'1h'` costs roughly twice as much to
|
|
@@ -171,11 +183,18 @@ export interface NullCapture {
|
|
|
171
183
|
tool_calls?: unknown;
|
|
172
184
|
} | null;
|
|
173
185
|
diagnostics: {
|
|
186
|
+
/** Whatever the provider called it — OpenAI's `finish_reason` or Anthropic's `stop_reason`. */
|
|
174
187
|
finishReason?: string;
|
|
175
188
|
inputTokens?: number;
|
|
176
189
|
outputTokens?: number;
|
|
177
190
|
reasoningTokens?: number;
|
|
178
191
|
contentEmpty: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Content arrived, but none of it was text — the shape of an answer that was all reasoning.
|
|
194
|
+
* Distinguishes "spent the budget thinking" from "returned nothing at all", which
|
|
195
|
+
* `contentEmpty` alone cannot.
|
|
196
|
+
*/
|
|
197
|
+
thinkingOnly?: boolean;
|
|
179
198
|
hadToolCall: boolean;
|
|
180
199
|
};
|
|
181
200
|
}
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE/E;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAE9B;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,eAAe,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE/E;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAE9B;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MA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11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@langchain/core": "^1.
|
|
24
|
+
"@langchain/core": "^1.2.9",
|
|
25
25
|
"@owlmeans/dep-config": "workspace:*",
|
|
26
26
|
"nodemon": "^3.1.14",
|
|
27
27
|
"typescript": "^7.0.2"
|
package/src/consts.ts
CHANGED
|
@@ -96,3 +96,11 @@ export const PROMPT_BLOCK_ORDER: readonly PromptBlock[] = [
|
|
|
96
96
|
|
|
97
97
|
/** Sort weight of a skill that declares none — see `SkillDefinition.order`. */
|
|
98
98
|
export const DEFAULT_SKILL_ORDER = 100
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Conventional {@link ModelRole} for the cheap side calls the layer makes on its own
|
|
102
|
+
* behalf — a relevance pick, a classification, a one-line judgement — rather than for the
|
|
103
|
+
* work a caller asked for. A deployment that names its cheap tier differently points
|
|
104
|
+
* `ModelPolicy.utilityRole` at its own alias; nothing else has to change.
|
|
105
|
+
*/
|
|
106
|
+
export const UTILITY_ROLE = 'utility'
|
package/src/files/types.ts
CHANGED
|
@@ -17,6 +17,17 @@
|
|
|
17
17
|
* that stops a rich helper from satisfying this one.
|
|
18
18
|
*/
|
|
19
19
|
export interface LlmFileProvider {
|
|
20
|
+
/**
|
|
21
|
+
* Stable identity of WHAT this provider reads — a project root, a sandbox id.
|
|
22
|
+
*
|
|
23
|
+
* A prompt plugin that caches resolved reads across calls has nothing else to key on:
|
|
24
|
+
* providers are late-bound and often rebuilt per request, so object identity says
|
|
25
|
+
* nothing, and a cache shared between two projects serves the first one's files to the
|
|
26
|
+
* second. A provider that supplies no key is treated as uncacheable rather than as one
|
|
27
|
+
* more anonymous member of a shared bucket.
|
|
28
|
+
*/
|
|
29
|
+
key?: string
|
|
30
|
+
|
|
20
31
|
/** Read a file relative to the root. With `noThrow`, a missing file yields `''`. */
|
|
21
32
|
readFile: (filePath: string, noThrow?: boolean) => Promise<string>
|
|
22
33
|
|
package/src/types.ts
CHANGED
|
@@ -32,6 +32,12 @@ export interface ModelConfigPatch {
|
|
|
32
32
|
maxTokensCap?: number
|
|
33
33
|
topP?: number
|
|
34
34
|
disableThinking?: boolean
|
|
35
|
+
/** Total window the model accepts (input + output). Informational / validation only. */
|
|
36
|
+
contextWindow?: number
|
|
37
|
+
/** What the PROVIDER can emit in one request. Hard ceiling for `maxTokens`/`maxTokensCap`. */
|
|
38
|
+
maxOutput?: number
|
|
39
|
+
/** The window is shared between input and output rather than input-only. */
|
|
40
|
+
combinedWindow?: boolean
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
/** A JSON-safe model override: a config alias, or a partial config patch. */
|
|
@@ -49,6 +55,12 @@ export interface ModelPolicy {
|
|
|
49
55
|
roleOverrides?: Partial<Record<ModelRole, ModelRole>>
|
|
50
56
|
/** "Pin a role to a specific model/config" — alias or partial config override. */
|
|
51
57
|
modelOverrides?: Partial<Record<ModelRole, ModelConfigOverride>>
|
|
58
|
+
/**
|
|
59
|
+
* Role resolved by `ExecutionService.utility` for cheap side calls. Defaults to
|
|
60
|
+
* `UTILITY_ROLE`; name another alias when the deployment calls its cheap tier
|
|
61
|
+
* something else. `roleOverrides` still applies on top of whichever one is used.
|
|
62
|
+
*/
|
|
63
|
+
utilityRole?: ModelRole
|
|
52
64
|
}
|
|
53
65
|
|
|
54
66
|
/**
|
|
@@ -181,11 +193,18 @@ export interface NullCapture {
|
|
|
181
193
|
tool_calls?: unknown
|
|
182
194
|
} | null
|
|
183
195
|
diagnostics: {
|
|
196
|
+
/** Whatever the provider called it — OpenAI's `finish_reason` or Anthropic's `stop_reason`. */
|
|
184
197
|
finishReason?: string
|
|
185
198
|
inputTokens?: number
|
|
186
199
|
outputTokens?: number
|
|
187
200
|
reasoningTokens?: number
|
|
188
201
|
contentEmpty: boolean
|
|
202
|
+
/**
|
|
203
|
+
* Content arrived, but none of it was text — the shape of an answer that was all reasoning.
|
|
204
|
+
* Distinguishes "spent the budget thinking" from "returned nothing at all", which
|
|
205
|
+
* `contentEmpty` alone cannot.
|
|
206
|
+
*/
|
|
207
|
+
thinkingOnly?: boolean
|
|
189
208
|
hadToolCall: boolean
|
|
190
209
|
}
|
|
191
210
|
}
|