opencode-goal-plugin 0.6.8 → 0.8.0
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/CHANGELOG.md +17 -0
- package/README.md +24 -4
- package/index.d.ts +36 -0
- package/package.json +1 -1
- package/scripts/verify.mjs +9 -1
- package/src/goal-plugin.js +1117 -72
- package/src/opencode-session-api.js +7 -1
|
@@ -8,7 +8,7 @@ const SHAPE_ERROR_PATTERNS = [
|
|
|
8
8
|
// Only read-only operations may be retried with another argument shape. A
|
|
9
9
|
// TypeError can be raised after a mutating SDK call has already reached the
|
|
10
10
|
// host, so replaying create/prompt/update/delete/abort could duplicate side effects.
|
|
11
|
-
const REPLAY_SAFE_OPERATIONS = new Set(["messages", "get"])
|
|
11
|
+
const REPLAY_SAFE_OPERATIONS = new Set(["messages", "get", "children", "status"])
|
|
12
12
|
|
|
13
13
|
function isArgumentShapeError(error) {
|
|
14
14
|
if (!(error instanceof TypeError)) return false
|
|
@@ -70,6 +70,12 @@ export function createOpenCodeSessionApi(client, options = {}) {
|
|
|
70
70
|
{ path: { id: sessionID }, query: options },
|
|
71
71
|
)
|
|
72
72
|
},
|
|
73
|
+
children(sessionID) {
|
|
74
|
+
return invoke("children", { sessionID }, { path: { id: sessionID } })
|
|
75
|
+
},
|
|
76
|
+
status() {
|
|
77
|
+
return invoke("status", {}, { path: {} })
|
|
78
|
+
},
|
|
73
79
|
promptAsync(sessionID, input = {}) {
|
|
74
80
|
return invoke(
|
|
75
81
|
"promptAsync",
|