ocpipe 0.3.4 → 0.3.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ocpipe",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "SDK for LLM pipelines with OpenCode and Zod",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -29,7 +29,7 @@
29
29
  "bun": ">=1.0.0"
30
30
  },
31
31
  "dependencies": {
32
- "opencode-ai": "1.1.8"
32
+ "opencode-ai": "1.1.20"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "zod": "4.3.5"
@@ -57,7 +57,7 @@
57
57
  "release:version": "npm version patch -m \"release: v%s\" --no-git-tag-version",
58
58
  "release:version:minor": "npm version minor -m \"release: v%s\" --no-git-tag-version",
59
59
  "release:commit": "git reset && git add package.json && git commit -s -m \"release: v$(node -p \"require('./package.json').version\")\" && git tag v$(node -p \"require('./package.json').version\")",
60
- "release:publish": "git push && git push --tags && npm publish"
60
+ "release:publish": "git push && git push --tags"
61
61
  },
62
62
  "files": [
63
63
  "src/",
package/src/agent.ts CHANGED
@@ -65,10 +65,12 @@ export async function runAgent(
65
65
 
66
66
  let newSessionId = sessionId || ''
67
67
  const stdoutChunks: string[] = []
68
+ const stderrChunks: string[] = []
68
69
 
69
70
  // Stream stderr in real-time (OpenCode progress output)
70
71
  proc.stderr.on('data', (data: Buffer) => {
71
72
  const text = data.toString()
73
+ stderrChunks.push(text)
72
74
 
73
75
  // Parse session ID from output
74
76
  for (const line of text.split('\n')) {
@@ -109,7 +111,10 @@ export async function runAgent(
109
111
  if (timeout) clearTimeout(timeout)
110
112
 
111
113
  if (code !== 0) {
112
- reject(new Error(`OpenCode exited with code ${code}`))
114
+ const stderr = stderrChunks.join('').trim()
115
+ const lastLines = stderr.split('\n').slice(-5).join('\n')
116
+ const detail = lastLines ? `\n${lastLines}` : ''
117
+ reject(new Error(`OpenCode exited with code ${code}${detail}`))
113
118
  return
114
119
  }
115
120
 
@@ -1,55 +0,0 @@
1
- {
2
- "sessionId": "20251231_092022",
3
- "startedAt": "2025-12-31T09:20:22.199Z",
4
- "phase": "init",
5
- "steps": [
6
- {
7
- "stepName": "MoodAnalyzer",
8
- "timestamp": "2025-12-31T09:20:25.808Z",
9
- "result": {
10
- "data": {
11
- "mood": "happy",
12
- "keywords": [
13
- "happy",
14
- "so",
15
- "today"
16
- ]
17
- },
18
- "stepName": "MoodAnalyzer",
19
- "duration": 3608,
20
- "sessionId": "ses_48c4aa762ffeP1pxFsOURK4cw2",
21
- "model": {
22
- "providerID": "github-copilot",
23
- "modelID": "grok-code-fast-1"
24
- },
25
- "attempt": 1
26
- }
27
- },
28
- {
29
- "stepName": "ResponseSuggester",
30
- "timestamp": "2025-12-31T09:20:30.186Z",
31
- "result": {
32
- "data": {
33
- "suggestion": "That's wonderful! What's making you so happy today?"
34
- },
35
- "stepName": "ResponseSuggester",
36
- "duration": 4377,
37
- "sessionId": "ses_48c4aa762ffeP1pxFsOURK4cw2",
38
- "model": {
39
- "providerID": "github-copilot",
40
- "modelID": "grok-code-fast-1"
41
- },
42
- "attempt": 1
43
- }
44
- }
45
- ],
46
- "subPipelines": [],
47
- "inputText": "I am so happy today!",
48
- "opencodeSessionId": "ses_48c4aa762ffeP1pxFsOURK4cw2",
49
- "mood": "happy",
50
- "keywords": [
51
- "happy",
52
- "so",
53
- "today"
54
- ]
55
- }