ocpipe 0.5.16 → 0.5.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/DESIGN.md +1 -1
- package/package.json +3 -3
- package/src/agent.ts +1 -1
- package/src/claude-code.ts +9 -1
- package/src/pipeline.ts +1 -1
package/DESIGN.md
CHANGED
|
@@ -10,7 +10,7 @@ A Signature declares **what** an LLM interaction does - its inputs, outputs, and
|
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
12
|
import { signature, field } from 'ocpipe'
|
|
13
|
-
import { z } from 'zod'
|
|
13
|
+
import { z } from 'zod/v4'
|
|
14
14
|
|
|
15
15
|
const AnalyzeCode = signature({
|
|
16
16
|
doc: 'Analyze code for potential issues and improvements.',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ocpipe",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.18",
|
|
4
4
|
"description": "SDK for LLM pipelines with OpenCode and Zod",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@anthropic-ai/claude-agent-sdk": "^0.2.
|
|
42
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.47",
|
|
43
43
|
"@eslint/js": "^10.0.1",
|
|
44
44
|
"bun-types": "^1.3.9",
|
|
45
45
|
"eslint": "^10.0.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"prettier": "^3.8.1",
|
|
49
49
|
"typescript": "^5.0.0",
|
|
50
50
|
"typescript-eslint": "^8.56.0",
|
|
51
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
51
|
+
"@typescript/native-preview": "^7.0.0-dev.20260218.1",
|
|
52
52
|
"vitest": "^4.0.18"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
package/src/agent.ts
CHANGED
|
@@ -34,7 +34,7 @@ export async function runAgent(
|
|
|
34
34
|
async function runOpencodeAgent(
|
|
35
35
|
options: RunAgentOptions,
|
|
36
36
|
): Promise<RunAgentResult> {
|
|
37
|
-
const { prompt, agent, model, sessionId, timeoutSec =
|
|
37
|
+
const { prompt, agent, model, sessionId, timeoutSec = 3600, workdir, signal } = options
|
|
38
38
|
|
|
39
39
|
if (!model.providerID) {
|
|
40
40
|
throw new Error('providerID is required for OpenCode backend')
|
package/src/claude-code.ts
CHANGED
|
@@ -150,7 +150,7 @@ export async function runClaudeCodeAgent(
|
|
|
150
150
|
agent,
|
|
151
151
|
model,
|
|
152
152
|
sessionId,
|
|
153
|
-
timeoutSec =
|
|
153
|
+
timeoutSec = 3600,
|
|
154
154
|
workdir,
|
|
155
155
|
claudeCode,
|
|
156
156
|
signal,
|
|
@@ -185,10 +185,18 @@ export async function runClaudeCodeAgent(
|
|
|
185
185
|
)
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
// Strip CLAUDECODE env var to allow nested Claude Code sessions.
|
|
189
|
+
// The parent session sets this to block nesting, but SDK-spawned subagents
|
|
190
|
+
// are independent processes that should be allowed to run.
|
|
191
|
+
const cleanEnv = Object.fromEntries(
|
|
192
|
+
Object.entries(process.env).filter(([key]) => key !== 'CLAUDECODE'),
|
|
193
|
+
)
|
|
194
|
+
|
|
188
195
|
const queryOptions: Options = {
|
|
189
196
|
model: modelStr,
|
|
190
197
|
permissionMode,
|
|
191
198
|
abortController,
|
|
199
|
+
env: cleanEnv,
|
|
192
200
|
// v1 persistSession defaults to true, but set explicitly for clarity
|
|
193
201
|
persistSession: true,
|
|
194
202
|
...(workdir && { cwd: workdir }),
|
package/src/pipeline.ts
CHANGED
|
@@ -31,7 +31,7 @@ export class Pipeline<S extends BaseState> {
|
|
|
31
31
|
sessionId: undefined,
|
|
32
32
|
defaultModel: config.defaultModel,
|
|
33
33
|
defaultAgent: config.defaultAgent,
|
|
34
|
-
timeoutSec: config.timeoutSec ??
|
|
34
|
+
timeoutSec: config.timeoutSec ?? 3600,
|
|
35
35
|
workdir: config.workdir,
|
|
36
36
|
claudeCode: config.claudeCode,
|
|
37
37
|
}
|