@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.
- package/dist/capabilities/mcp/types.d.ts +1 -1
- package/dist/capabilities/tools/AgentTool/agentMerge.d.ts +8 -0
- package/dist/capabilities/tools/AgentTool/builtInAgents.d.ts +15 -0
- package/dist/capabilities/tools/AgentTool/runAgent.d.ts +13 -2
- package/dist/cli.mjs +477 -244
- package/dist/client.d.ts +10 -0
- package/dist/client.js +466 -216
- package/dist/constants/tools.d.ts +1 -1
- package/dist/controller/hooks.d.ts +17 -2
- package/dist/controller/loop.d.ts +2 -5
- package/dist/entrypoints/sdk/controlSchemas.d.ts +73 -1
- package/dist/entrypoints/sdk/coreSchemas.d.ts +17 -1
- package/dist/entrypoints/sdk/runtimeTypes.d.ts +22 -0
- package/dist/lib/envDynamic.d.ts +1 -1
- package/dist/lib/schemaSanitizer.d.ts +43 -0
- package/dist/providers/anthropic/teleport/api.d.ts +1 -1
- package/dist/providers/codex/shim.d.ts +1 -1
- package/dist/providers/openai/schema.d.ts +1 -1
- package/dist/providers/openai/shim.d.ts +2 -5
- package/dist/providers/openai/wire.d.ts +1 -1
- package/dist/providers/provider.d.ts +2 -5
- package/dist/providers/shared/clientFactory.d.ts +2 -5
- package/dist/providers/shared/routing.d.ts +37 -6
- package/dist/sdk.js +466 -216
- package/dist/session/backgroundAbortRegistry.d.ts +23 -0
- package/dist/types/toolRuntime.d.ts +8 -5
- package/package.json +1 -1
|
@@ -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
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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;
|