ocpipe 0.5.18 → 0.5.19
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/package.json +2 -2
- package/src/claude-code.ts +4 -0
- package/src/index.ts +1 -0
- package/src/types.ts +22 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ocpipe",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.19",
|
|
4
4
|
"description": "SDK for LLM pipelines with OpenCode and Zod",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"zod": "4.3.6",
|
|
34
|
-
"@anthropic-ai/claude-agent-sdk": "0.2.
|
|
34
|
+
"@anthropic-ai/claude-agent-sdk": "0.2.47"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
37
37
|
"@anthropic-ai/claude-agent-sdk": {
|
package/src/claude-code.ts
CHANGED
|
@@ -206,6 +206,10 @@ export async function runClaudeCodeAgent(
|
|
|
206
206
|
hooks: {
|
|
207
207
|
PreToolUse: [{ hooks: [logToolCall] }],
|
|
208
208
|
},
|
|
209
|
+
// Subagent definitions for Task tool dispatch
|
|
210
|
+
...(claudeCode?.agents && { agents: claudeCode.agents }),
|
|
211
|
+
// Tool allow-list (must include 'Task' for subagent dispatch)
|
|
212
|
+
...(claudeCode?.allowedTools && { allowedTools: claudeCode.allowedTools }),
|
|
209
213
|
// bypassPermissions requires explicit opt-in
|
|
210
214
|
...(permissionMode === 'bypassPermissions' &&
|
|
211
215
|
claudeCode?.dangerouslySkipPermissions && {
|
package/src/index.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -18,6 +18,18 @@ export type PermissionMode =
|
|
|
18
18
|
| 'bypassPermissions'
|
|
19
19
|
| 'plan'
|
|
20
20
|
|
|
21
|
+
/** Subagent definition for Claude Code's Task tool dispatch. */
|
|
22
|
+
export interface AgentDefinition {
|
|
23
|
+
/** Natural language description of when to use this agent. */
|
|
24
|
+
description: string
|
|
25
|
+
/** The agent's system prompt defining its role and behavior. */
|
|
26
|
+
prompt: string
|
|
27
|
+
/** Array of allowed tool names. If omitted, inherits all tools from parent. */
|
|
28
|
+
tools?: string[]
|
|
29
|
+
/** Model override for this agent ('sonnet' | 'opus' | 'haiku' | 'inherit'). */
|
|
30
|
+
model?: 'sonnet' | 'opus' | 'haiku' | 'inherit'
|
|
31
|
+
}
|
|
32
|
+
|
|
21
33
|
/** Claude Code specific session options. */
|
|
22
34
|
export interface ClaudeCodeOptions {
|
|
23
35
|
/** Permission mode (default: 'acceptEdits'). */
|
|
@@ -31,6 +43,16 @@ export interface ClaudeCodeOptions {
|
|
|
31
43
|
* Can be a full string or use the preset format with append.
|
|
32
44
|
*/
|
|
33
45
|
systemPrompt?: string | { type: 'preset'; preset: 'claude_code'; append: string }
|
|
46
|
+
/**
|
|
47
|
+
* Subagent definitions for parallel task dispatch via the Task tool.
|
|
48
|
+
* Keys are agent names, values are agent definitions.
|
|
49
|
+
*/
|
|
50
|
+
agents?: Record<string, AgentDefinition>
|
|
51
|
+
/**
|
|
52
|
+
* Tools that are auto-allowed without prompting for permission.
|
|
53
|
+
* Must include 'Task' for subagent dispatch.
|
|
54
|
+
*/
|
|
55
|
+
allowedTools?: string[]
|
|
34
56
|
}
|
|
35
57
|
|
|
36
58
|
/** Model configuration for LLM backends. */
|