@opencow-ai/opencow-agent-sdk 0.4.5 → 0.4.7

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.
@@ -0,0 +1,23 @@
1
+ export declare function registerBackgroundAgentAbort(agentId: string, controller: AbortController): void;
2
+ export declare function unregisterBackgroundAgentAbort(agentId: string): void;
3
+ /**
4
+ * Abort a background sub-agent by id. Returns true if a live controller was
5
+ * found and signalled, false if the agent is unknown / already settled.
6
+ * The entry stays registered until the run's finally unregisters it — the
7
+ * run is still draining at this point and its terminal delivery (and any
8
+ * late natural-stop marking) still needs the per-run state.
9
+ */
10
+ export declare function abortBackgroundAgentById(agentId: string): boolean;
11
+ /**
12
+ * Record that the natural-stop path delivered SubagentStop for this run.
13
+ * No-op when the run is gone (e.g. the fallback delivery in runAgent's
14
+ * finally re-enters executeStopHooks after the entry was unregistered) —
15
+ * marking is only meaningful while the run is alive.
16
+ */
17
+ export declare function markSubagentStopFired(agentId: string): void;
18
+ /**
19
+ * Whether the natural-stop path already delivered SubagentStop for this run.
20
+ * Read by runAgent's finally to decide whether its terminal fallback delivery
21
+ * is still needed. Purely a read — the per-run state dies with the entry.
22
+ */
23
+ export declare function hasSubagentStopFired(agentId: string): boolean;
@@ -20,6 +20,7 @@ import type { AgentDefinition, AgentDefinitionsResult } from '../capabilities/to
20
20
  import type { AssistantMessage, AttachmentMessage, Message, ProgressMessage, SystemMessage, UserMessage } from './message.js';
21
21
  import type { AdditionalWorkingDirectory, PermissionMode, PermissionResult, ToolPermissionRulesBySource } from './permissions.js';
22
22
  import type { ToolProgressData } from './tools.js';
23
+ import type { ModelProviders, ProviderOverride } from '../providers/shared/routing.js';
23
24
  import type { HookProgress, PromptRequest, PromptResponse } from './hooks.js';
24
25
  import type { AgentId } from './ids.js';
25
26
  import type { DeepImmutable } from './utils.js';
@@ -100,11 +101,13 @@ export type ToolRuntimeContext = {
100
101
  appendSystemPrompt?: string;
101
102
  querySource?: QuerySource;
102
103
  refreshTools?: () => ToolRuntimes;
103
- providerOverride?: {
104
- model: string;
105
- baseURL: string;
106
- apiKey: string;
107
- };
104
+ providerOverride?: ProviderOverride;
105
+ /**
106
+ * Host-supplied model → provider-route catalog. Consulted by runAgent
107
+ * after subagent model resolution so a tier model living on a different
108
+ * wire/endpoint than the main session gets its own provider override.
109
+ */
110
+ modelProviders?: ModelProviders;
108
111
  };
109
112
  abortController: AbortController;
110
113
  readFileState: FileStateCache;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencow-ai/opencow-agent-sdk",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
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",