@opencow-ai/opencow-agent-sdk 0.4.21 → 0.4.22

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.
@@ -105,6 +105,22 @@ export interface ChildContextOverrides {
105
105
  * config).
106
106
  */
107
107
  export declare function runWithChildQueryContext<T>(parent: QueryRuntime, overrides: ChildContextOverrides, fn: () => T): T;
108
+ /**
109
+ * Iterate an async iterable inside a child scope whose ONLY deviation from
110
+ * the parent is `config.env` — every other slot stays reference-shared
111
+ * (unlike `deriveChildQueryContext`, which also resets turn/diagnostics/
112
+ * registries and is therefore the wrong tool for a request-param override).
113
+ *
114
+ * Motivation: provider request params (extra_body, transport) are read from
115
+ * the query-scoped env at request-build time. A subagent with its own
116
+ * `extraBody` must override that env entry for exactly the span of its query
117
+ * iteration, without forking turn/cost accounting.
118
+ *
119
+ * The override wraps each `next()` call rather than iterable creation
120
+ * because async-generator bodies execute during iteration, not at
121
+ * construction.
122
+ */
123
+ export declare function iterateWithQueryEnvOverrides<T>(iterable: AsyncIterable<T>, envOverrides: Record<string, string>): AsyncGenerator<T, void>;
108
124
  /**
109
125
  * Construct a child QueryRuntime from a parent. The per-slot
110
126
  * inheritance policy is the v3 §6.2 contract:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencow-ai/opencow-agent-sdk",
3
- "version": "0.4.21",
3
+ "version": "0.4.22",
4
4
  "description": "Claude Code opened to any LLM — OpenAI, Gemini, DeepSeek, Ollama, and 200+ models",
5
5
  "type": "module",
6
6
  "main": "./dist/sdk.js",