@opencow-ai/opencow-agent-sdk 0.4.17 → 0.4.18
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/README.md +6 -0
- package/dist/Tool.d.ts +5 -11
- package/dist/capabilities/mcp/utils.d.ts +6 -6
- package/dist/capabilities/shell/posixShellDetection.d.ts +1 -0
- package/dist/capabilities/shell/powershellDetection.d.ts +1 -10
- package/dist/capabilities/shell/shellCapabilities.d.ts +33 -0
- package/dist/capabilities/shell/shellProvider.d.ts +0 -1
- package/dist/capabilities/shell/shellToolUtils.d.ts +0 -10
- package/dist/cli.mjs +173031 -172948
- package/dist/client.js +4604 -4486
- package/dist/constants/envVars.d.ts +0 -1
- package/dist/constants/prompts.d.ts +6 -4
- package/dist/entrypoints/sdk/runtimeTypes.d.ts +9 -0
- package/dist/lib/frontmatterParser.d.ts +4 -4
- package/dist/lib/windowsPaths.d.ts +12 -10
- package/dist/sdk.js +4604 -4486
- package/dist/session/collapseReadSearch.d.ts +2 -1
- package/dist/session/promptShellExecution.d.ts +3 -5
- package/dist/session/settings/types.d.ts +0 -4
- package/dist/state/AppStateStore.d.ts +3 -2
- package/dist/tasks/LocalAgentTask/LocalAgentTask.d.ts +3 -3
- package/dist/tools.d.ts +6 -7
- package/package.json +1 -1
|
@@ -225,7 +225,6 @@ export declare const ENV_VARS: {
|
|
|
225
225
|
readonly USE_GITHUB: EnvVarSpec;
|
|
226
226
|
readonly USE_NATIVE_FILE_SEARCH: EnvVarSpec;
|
|
227
227
|
readonly USE_OPENAI: EnvVarSpec;
|
|
228
|
-
readonly USE_POWERSHELL_TOOL: EnvVarSpec;
|
|
229
228
|
readonly USE_VERTEX: EnvVarSpec;
|
|
230
229
|
readonly VERIFY_PLAN: EnvVarSpec;
|
|
231
230
|
readonly WEBSOCKET_AUTH_FILE_DESCRIPTOR: EnvVarSpec;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ToolRuntimes } from '../types/toolRuntime.js';
|
|
2
2
|
import type { MCPServerConnection } from '../capabilities/mcp/types.js';
|
|
3
3
|
export declare const CLAUDE_CODE_DOCS_MAP_URL = "https://code.claude.com/docs/en/claude_code_docs_map.md";
|
|
4
4
|
/**
|
|
@@ -12,9 +12,11 @@ export declare const CLAUDE_CODE_DOCS_MAP_URL = "https://code.claude.com/docs/en
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const SYSTEM_PROMPT_DYNAMIC_BOUNDARY = "__SYSTEM_PROMPT_DYNAMIC_BOUNDARY__";
|
|
14
14
|
export declare function prependBullets(items: Array<string | string[]>): string[];
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function
|
|
17
|
-
export declare function
|
|
15
|
+
export declare function getUsingYourToolsSection(enabledTools: Set<string>): string;
|
|
16
|
+
export declare function getSystemPrompt(tools: ToolRuntimes, model: string, additionalWorkingDirectories?: string[], mcpClients?: MCPServerConnection[]): Promise<string[]>;
|
|
17
|
+
export declare function computeEnvInfo(modelId: string, additionalWorkingDirectories?: string[], enabledToolNames?: ReadonlySet<string>): Promise<string>;
|
|
18
|
+
export declare function computeSimpleEnvInfo(modelId: string, additionalWorkingDirectories?: string[], enabledToolNames?: ReadonlySet<string>): Promise<string>;
|
|
19
|
+
export declare function getShellInfoLine(enabledToolNames?: ReadonlySet<string>): string | null;
|
|
18
20
|
export declare function getUnameSR(): string;
|
|
19
21
|
export declare const DEFAULT_AGENT_PROMPT = "You are an agent for OpenCow, an open-source fork of Claude Code. Given the user's message, you should use the tools available to complete the task. Complete the task fully\u2014don't gold-plate, but don't leave it half-done. When you complete the task, respond with a concise report covering what was done and any key findings \u2014 the caller will relay this to the user, so it only needs the essentials.";
|
|
20
22
|
export declare function enhanceSystemPromptWithEnvDetails(existingSystemPrompt: string[], model: string, additionalWorkingDirectories?: string[], enabledToolNames?: ReadonlySet<string>): Promise<string[]>;
|
|
@@ -123,6 +123,7 @@ export type SdkMcpToolDefinition<Schema extends AnyZodRawShape = AnyZodRawShape>
|
|
|
123
123
|
_meta?: Record<string, unknown>;
|
|
124
124
|
};
|
|
125
125
|
export type SettingSource = 'user' | 'project' | 'local';
|
|
126
|
+
export type BuiltInToolPreset = 'default' | 'none';
|
|
126
127
|
import type { SdkTool } from '../../capabilities/SdkTool.js';
|
|
127
128
|
import type { LayoutProfile } from '../../session/layout/LayoutProfile.js';
|
|
128
129
|
import type { SdkRule } from '../../session/rules/SdkRule.js';
|
|
@@ -202,6 +203,14 @@ export type Options = {
|
|
|
202
203
|
permissionMode?: string;
|
|
203
204
|
canUseTool?: SdkCanUseTool;
|
|
204
205
|
mcpServers?: Record<string, McpServerConfig>;
|
|
206
|
+
/**
|
|
207
|
+
* Selects the SDK-owned built-in tool set for this query.
|
|
208
|
+
*
|
|
209
|
+
* Omitted preserves the embedding contract and injects no SDK built-ins.
|
|
210
|
+
* `'default'` resolves the capability-aware SDK defaults, while `'none'`
|
|
211
|
+
* explicitly selects an empty built-in set.
|
|
212
|
+
*/
|
|
213
|
+
builtInToolPreset?: BuiltInToolPreset;
|
|
205
214
|
/**
|
|
206
215
|
* Phase 1B.5b — host-facing inline tools. Each `SdkTool` is converted to
|
|
207
216
|
* an internal `Tool` via `src/session/toInternalTool.ts` at query setup time
|
|
@@ -80,9 +80,9 @@ export type FrontmatterShell = 'bash' | 'powershell';
|
|
|
80
80
|
/**
|
|
81
81
|
* Parse and validate the `shell:` frontmatter field.
|
|
82
82
|
*
|
|
83
|
-
* Returns undefined for absent/null/empty
|
|
84
|
-
* Logs a warning and returns undefined for unrecognized values
|
|
85
|
-
*
|
|
86
|
-
*
|
|
83
|
+
* Returns undefined for absent/null/empty so the caller uses the detected
|
|
84
|
+
* default shell. Logs a warning and returns undefined for unrecognized values
|
|
85
|
+
* rather than failing the skill load, matching how `effort` and other fields
|
|
86
|
+
* degrade.
|
|
87
87
|
*/
|
|
88
88
|
export declare function parseShellFrontmatter(value: unknown, source: string): FrontmatterShell | undefined;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
export type GitBashSource = 'env' | 'standard-path' | 'path';
|
|
2
|
+
export type GitBashExecutable = {
|
|
3
|
+
path: string;
|
|
4
|
+
source: GitBashSource;
|
|
5
|
+
};
|
|
6
|
+
export declare class InvalidGitBashPathError extends Error {
|
|
7
|
+
readonly configuredPath: string;
|
|
8
|
+
readonly code = "INVALID_GIT_BASH_PATH";
|
|
9
|
+
constructor(configuredPath: string);
|
|
10
|
+
}
|
|
11
|
+
/** Resolve Git Bash without terminating the embedding process. */
|
|
12
|
+
export declare function findGitBash(): GitBashExecutable | null;
|
|
11
13
|
/** Convert a Windows path to a POSIX path using pure JS. */
|
|
12
14
|
export declare const windowsPathToPosixPath: {
|
|
13
15
|
(p: string): string;
|