@vincemakes/kiso-runtime 0.40.3 → 0.40.5
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.d.ts +5 -0
- package/dist/agent.js +6 -2
- package/package.json +6 -6
package/dist/agent.d.ts
CHANGED
|
@@ -62,6 +62,10 @@ export interface AgentDefinition {
|
|
|
62
62
|
* breakpoints) — OFF by default; the openai-compat path ignores it
|
|
63
63
|
* (that dialect's caching is server-automatic). Type-only additive. */
|
|
64
64
|
readonly promptCaching?: boolean;
|
|
65
|
+
/** Headers the endpoint needs on every request (a gateway's session
|
|
66
|
+
* header, say), passed to whichever provider builds the adapter.
|
|
67
|
+
* Never a credential — that is `apiKey` / `oauth`. Type-only additive. */
|
|
68
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
65
69
|
readonly maxTurns?: number;
|
|
66
70
|
readonly maxTokens?: number;
|
|
67
71
|
readonly temperature?: number;
|
|
@@ -127,4 +131,5 @@ export declare function buildAdapter(provider: "anthropic" | "openai-compat" | "
|
|
|
127
131
|
readonly accountId: string;
|
|
128
132
|
}>;
|
|
129
133
|
readonly promptCacheKey?: string;
|
|
134
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
130
135
|
}): Promise<Adapter>;
|
package/dist/agent.js
CHANGED
|
@@ -227,8 +227,9 @@ function policyHooks(policy) {
|
|
|
227
227
|
* takes effect.
|
|
228
228
|
*/
|
|
229
229
|
export async function buildAdapter(provider, opts = {}) {
|
|
230
|
-
// resolveAdapter consumes only provider
|
|
231
|
-
// definition — the rest is
|
|
230
|
+
// resolveAdapter consumes only the provider-side fields of the
|
|
231
|
+
// definition (credential, endpoint, caching, headers) — the rest is
|
|
232
|
+
// irrelevant for a bare adapter build.
|
|
232
233
|
return resolveAdapter({ provider, ...opts });
|
|
233
234
|
}
|
|
234
235
|
async function resolveAdapter(definition) {
|
|
@@ -246,6 +247,7 @@ async function resolveAdapter(definition) {
|
|
|
246
247
|
...(definition.apiKey !== undefined ? { apiKey: definition.apiKey } : {}),
|
|
247
248
|
...(definition.baseUrl !== undefined ? { baseUrl: definition.baseUrl } : {}),
|
|
248
249
|
...(definition.promptCaching !== undefined ? { promptCaching: definition.promptCaching } : {}),
|
|
250
|
+
...(definition.headers !== undefined ? { headers: definition.headers } : {}),
|
|
249
251
|
});
|
|
250
252
|
}
|
|
251
253
|
case "openai-compat": {
|
|
@@ -256,6 +258,7 @@ async function resolveAdapter(definition) {
|
|
|
256
258
|
return createOpenAICompatProvider({
|
|
257
259
|
...(definition.apiKey !== undefined ? { apiKey: definition.apiKey } : {}),
|
|
258
260
|
...(definition.baseUrl !== undefined ? { baseUrl: definition.baseUrl } : {}),
|
|
261
|
+
...(definition.headers !== undefined ? { headers: definition.headers } : {}),
|
|
259
262
|
...(scope !== undefined
|
|
260
263
|
? { scope: { providerId: scope.providerId, ...(scope.endpoint !== undefined ? { endpoint: scope.endpoint } : {}) } }
|
|
261
264
|
: {}),
|
|
@@ -277,6 +280,7 @@ async function resolveAdapter(definition) {
|
|
|
277
280
|
...(definition.oauth !== undefined ? { oauth: definition.oauth } : {}),
|
|
278
281
|
...(definition.baseUrl !== undefined ? { baseUrl: definition.baseUrl } : {}),
|
|
279
282
|
...(definition.promptCacheKey !== undefined ? { promptCacheKey: definition.promptCacheKey } : {}),
|
|
283
|
+
...(definition.headers !== undefined ? { headers: definition.headers } : {}),
|
|
280
284
|
});
|
|
281
285
|
}
|
|
282
286
|
default:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-runtime",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.5",
|
|
4
4
|
"description": "kiso runtime \u2014 durable multi-turn agent sessions: AgentDefinition, AgentRuntime, AgentSession, Run, append-only JSONL store.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"test": "vitest run"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@vincemakes/kiso-core": "0.40.
|
|
28
|
+
"@vincemakes/kiso-core": "0.40.5"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@vincemakes/kiso-provider-anthropic": "0.40.
|
|
32
|
-
"@vincemakes/kiso-provider-openai": "0.40.
|
|
33
|
-
"@vincemakes/kiso-provider-openai-responses": "0.40.
|
|
31
|
+
"@vincemakes/kiso-provider-anthropic": "0.40.5",
|
|
32
|
+
"@vincemakes/kiso-provider-openai": "0.40.5",
|
|
33
|
+
"@vincemakes/kiso-provider-openai-responses": "0.40.5"
|
|
34
34
|
},
|
|
35
35
|
"peerDependenciesMeta": {
|
|
36
36
|
"@vincemakes/kiso-provider-anthropic": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@vincemakes/kiso-evals": "0.40.
|
|
47
|
+
"@vincemakes/kiso-evals": "0.40.5",
|
|
48
48
|
"@types/node": "^26.1.2",
|
|
49
49
|
"typescript": "^5.7.2",
|
|
50
50
|
"vitest": "^3.0.0"
|