@tangle-network/agent-runtime 0.86.0 → 0.88.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,6 +1,6 @@
1
1
  import {
2
2
  extractLlmCallEvent
3
- } from "./chunk-4J6RBI3K.js";
3
+ } from "./chunk-FVJ7M3DA.js";
4
4
  import {
5
5
  AnalystError
6
6
  } from "./chunk-YEJR7IXO.js";
@@ -579,4 +579,4 @@ export {
579
579
  iterationsToTraceStore,
580
580
  runAnalystLoop
581
581
  };
582
- //# sourceMappingURL=chunk-YPA5MLVE.js.map
582
+ //# sourceMappingURL=chunk-ZQZX77MM.js.map
package/dist/index.d.ts CHANGED
@@ -143,6 +143,10 @@ declare function createOpenAICompatibleBackend<TInput extends AgentBackendInput
143
143
  * OpenAI Chat Completions `response_format`. Omit for provider default text.
144
144
  */
145
145
  responseFormat?: OpenAIChatResponseFormat;
146
+ /** OpenAI Chat Completions `temperature`. Omit for provider default. */
147
+ temperature?: number;
148
+ /** Maximum completion tokens, sent as OpenAI-compatible `max_tokens`. Omit for provider default. */
149
+ maxTokens?: number;
146
150
  fetchImpl?: typeof fetch;
147
151
  retry?: BackendRetryPolicy;
148
152
  }): AgentExecutionBackend<TInput>;
@@ -1403,8 +1407,9 @@ declare function decideKnowledgeReadiness(report: KnowledgeReadinessReport, opti
1403
1407
  * This resolver is PURE backend selection. Product concerns — credit hard-cuts,
1404
1408
  * fetch-capture shims, D1 platform wiring — stay as product-side WRAPPERS
1405
1409
  * around the returned backend. The OpenAI-compat passthrough fields (`tools`,
1406
- * `toolChoice`, `responseFormat`, `fetchImpl`, `retry`) are forwarded verbatim
1407
- * so a product can advertise its app tools or install a capturing fetch without
1410
+ * `toolChoice`, `responseFormat`, `temperature`, `maxTokens`, `fetchImpl`,
1411
+ * `retry`) are forwarded verbatim so a product can advertise its app tools,
1412
+ * preserve generation settings, or install a capturing fetch without
1408
1413
  * re-opening the branch this consolidation closes.
1409
1414
  */
1410
1415
 
@@ -1416,7 +1421,7 @@ type AgentBackendKind = 'router' | 'tcloud' | 'cli-bridge' | 'sandbox';
1416
1421
  * inputs so a product keeps its tool advertising / capture-fetch without
1417
1422
  * re-implementing the backend branch.
1418
1423
  */
1419
- type OpenAICompatPassthrough = Pick<Parameters<typeof createOpenAICompatibleBackend>[0], 'tools' | 'toolChoice' | 'responseFormat' | 'fetchImpl' | 'retry'>;
1424
+ type OpenAICompatPassthrough = Pick<Parameters<typeof createOpenAICompatibleBackend>[0], 'tools' | 'toolChoice' | 'responseFormat' | 'temperature' | 'maxTokens' | 'fetchImpl' | 'retry'>;
1420
1425
  interface ResolveAgentBackendOptions<TInput extends AgentBackendInput = AgentBackendInput> extends OpenAICompatPassthrough {
1421
1426
  /** The chat transport to resolve. */
1422
1427
  kind: AgentBackendKind;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  mcpToolsForRuntimeMcp,
3
3
  mcpToolsForRuntimeMcpSubset
4
- } from "./chunk-U4TS65XZ.js";
4
+ } from "./chunk-JHULWWQD.js";
5
5
  import {
6
6
  DEFAULT_ROUTER_BASE_URL,
7
7
  cleanModelId,
@@ -20,7 +20,7 @@ import {
20
20
  runLoopRunnerCli,
21
21
  selfImproveLoopRunner,
22
22
  worktreeLoopRunner
23
- } from "./chunk-EJ7MAQN4.js";
23
+ } from "./chunk-HBE77SWV.js";
24
24
  import "./chunk-SGKPNBXE.js";
25
25
  import {
26
26
  InMemoryRuntimeSessionStore,
@@ -31,14 +31,14 @@ import {
31
31
  normalizeBackendStreamEvent,
32
32
  nowIso,
33
33
  touchSession
34
- } from "./chunk-3TZOXS7B.js";
34
+ } from "./chunk-22HPUH77.js";
35
35
  import {
36
36
  assertModelAllowed,
37
37
  composeRuntimeHooks,
38
38
  defineRuntimeHooks,
39
39
  notifyRuntimeDecisionPoint,
40
40
  notifyRuntimeHookEvent
41
- } from "./chunk-F7OO2SKB.js";
41
+ } from "./chunk-LRNRPJAV.js";
42
42
  import {
43
43
  INTELLIGENCE_WIRE_VERSION,
44
44
  buildLoopOtelSpans,
@@ -48,8 +48,8 @@ import {
48
48
  loopEventToOtelSpan
49
49
  } from "./chunk-UD4BHQMI.js";
50
50
  import "./chunk-BZF3KQ6G.js";
51
- import "./chunk-YPA5MLVE.js";
52
- import "./chunk-4J6RBI3K.js";
51
+ import "./chunk-ZQZX77MM.js";
52
+ import "./chunk-FVJ7M3DA.js";
53
53
  import {
54
54
  agenticGenerator,
55
55
  commandVerifier,
@@ -1494,6 +1494,8 @@ function resolveAgentBackend(opts) {
1494
1494
  if (opts.tools !== void 0) passthrough.tools = opts.tools;
1495
1495
  if (opts.toolChoice !== void 0) passthrough.toolChoice = opts.toolChoice;
1496
1496
  if (opts.responseFormat !== void 0) passthrough.responseFormat = opts.responseFormat;
1497
+ if (opts.temperature !== void 0) passthrough.temperature = opts.temperature;
1498
+ if (opts.maxTokens !== void 0) passthrough.maxTokens = opts.maxTokens;
1497
1499
  if (opts.fetchImpl !== void 0) passthrough.fetchImpl = opts.fetchImpl;
1498
1500
  if (opts.retry !== void 0) passthrough.retry = opts.retry;
1499
1501
  return createOpenAICompatibleBackend({