@opencow-ai/opencow-agent-sdk 0.4.23 → 0.4.25
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/SdkTool.d.ts +5 -0
- package/dist/capabilities/tools/AgentTool/AgentTool.d.ts +1 -0
- package/dist/capabilities/tools/AgentTool/agentMerge.d.ts +1 -0
- package/dist/capabilities/tools/AgentTool/runAgent.d.ts +3 -3
- package/dist/cli.mjs +64022 -76785
- package/dist/client.js +31615 -93160
- package/dist/constants/envVars.d.ts +4 -0
- package/dist/controller/dispatch/permissionPreDecision.d.ts +22 -0
- package/dist/controller/loop.d.ts +5 -0
- package/dist/entrypoints/sdk/runtimeTypes.d.ts +11 -0
- package/dist/lib/toolInputNullCoercion.d.ts +1 -1
- package/dist/providers/shared/retry.d.ts +33 -1
- package/dist/sdk.js +31615 -93160
- package/dist/session/forkedAgent.d.ts +2 -1
- package/dist/session/tokens.d.ts +2 -1
- package/dist/types/replayState.d.ts +13 -0
- package/dist/types/toolRuntime.d.ts +18 -0
- package/package.json +1 -1
|
@@ -11,6 +11,11 @@ export interface SdkTool {
|
|
|
11
11
|
* behind the permissive value type.
|
|
12
12
|
*/
|
|
13
13
|
readonly inputSchema: ToolInputSchemaShape;
|
|
14
|
+
/**
|
|
15
|
+
* Runtime policy for object keys that are absent from `inputSchema`.
|
|
16
|
+
* Defaults to `strip`; security-sensitive host tools can opt into `reject`.
|
|
17
|
+
*/
|
|
18
|
+
readonly unknownKeys?: 'strip' | 'reject';
|
|
14
19
|
/**
|
|
15
20
|
* Business logic. Receives validated args plus a structured invocation
|
|
16
21
|
* context. Must return a `CallToolResult`. Exceptions are caught by the
|
|
@@ -99,6 +99,7 @@ export declare const AgentTool: {
|
|
|
99
99
|
isLsp?: boolean;
|
|
100
100
|
shouldDefer?: boolean;
|
|
101
101
|
alwaysLoad?: boolean;
|
|
102
|
+
unknownKeys?: "strip" | "reject";
|
|
102
103
|
outputSchema?: z.ZodType<unknown>;
|
|
103
104
|
call: (args: any, context: import("../../../types/toolRuntime.js").ToolRuntimeContext, canUseTool: import("../../../types/toolRuntime.js").CanUseToolFn, parentMessage: MessageType, onProgress?: import("../../../types/toolRuntime.js").ToolCallProgress<any>) => Promise<import("../../../types/toolRuntime.js").ToolResult<any>>;
|
|
104
105
|
validateInput?: (input: any, context: import("../../../types/toolRuntime.js").ToolRuntimeContext) => Promise<import("../../../types/toolRuntime.js").ValidationResult>;
|
|
@@ -6,3 +6,4 @@ import type { AgentDefinition } from './loadAgentsDir.js';
|
|
|
6
6
|
* host-provided `Options.agents` (`override`).
|
|
7
7
|
*/
|
|
8
8
|
export declare function mergeAgentsByType(base: AgentDefinition[], override: AgentDefinition[]): AgentDefinition[];
|
|
9
|
+
export declare function withDefaultAgentForInvocation(activeAgents: AgentDefinition[], requestedType: string | undefined, defaultAgent: AgentDefinition): AgentDefinition[];
|
|
@@ -71,11 +71,11 @@ export declare function runAgent({ agentDefinition, promptMessages, toolUseConte
|
|
|
71
71
|
* during long single-block streams (e.g. thinking) where no assistant
|
|
72
72
|
* message is yielded for >60s. */
|
|
73
73
|
onQueryProgress?: () => void;
|
|
74
|
-
/** Optional callback fired with a GROWING single-block
|
|
75
|
-
* the sub-agent's text streams
|
|
74
|
+
/** Optional callback fired at most once every 50ms with a GROWING single-block
|
|
75
|
+
* assistant message as the sub-agent's text streams (content_block_delta /
|
|
76
76
|
* text_delta accumulated per content-block index, keyed to the message_start
|
|
77
77
|
* id). The consumer (AgentTool) forwards it via the existing agent_progress
|
|
78
|
-
* onProgress channel so the host renders the sub-conversation
|
|
78
|
+
* onProgress channel so the host renders the sub-conversation progressively
|
|
79
79
|
* instead of block-at-once. Side-channel only: these partials are NOT yielded
|
|
80
80
|
* and NOT recorded to the sidechain transcript — the authoritative whole
|
|
81
81
|
* messages still flow through the normal yield path (graceful degradation:
|