@magpie-community/opencode-cursor-auth 0.2.21 → 0.2.22
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 +4 -1
- package/native-session.mjs +12 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -153,7 +153,10 @@ as prior usage. Stateless Runs otherwise keep the dashboard accounting above.
|
|
|
153
153
|
`X-Magpie-Cursor-Continuity` identifies `same-run` or `stateless`, with the fallback
|
|
154
154
|
reason where available. A missing native batch count can retry stateless once
|
|
155
155
|
before any output is exposed or native result submitted; progressive output is
|
|
156
|
-
kept and its later errors are surfaced.
|
|
156
|
+
kept and its later errors are surfaced. A step's declared tool batch waits 30
|
|
157
|
+
seconds from Cursor's latest call, count, text or heartbeat, so one long call
|
|
158
|
+
written under heartbeats is not cut off; the failure says how many of the
|
|
159
|
+
declared calls came.
|
|
157
160
|
|
|
158
161
|
The existing request builder and model selection remain in use, including the
|
|
159
162
|
legacy `thinking=false` mapping for explicit `none`/`off`. Retention adds no
|
package/native-session.mjs
CHANGED
|
@@ -768,14 +768,19 @@ class NativeSession {
|
|
|
768
768
|
if (estimate != null) this.stepEstimate = estimate
|
|
769
769
|
}
|
|
770
770
|
// waitForBatch gives the step batchWait from its latest call, answered
|
|
771
|
-
// call or
|
|
772
|
-
// has written its arguments, so a step of many long
|
|
773
|
-
// longer than batchWait while never pausing that long
|
|
771
|
+
// call, count, text or heartbeat, not from its first. Cursor sends each
|
|
772
|
+
// call once the model has written its arguments, so a step of many long
|
|
773
|
+
// calls arrives over longer than batchWait while never pausing that long
|
|
774
|
+
// (#155), and one long call is written with only heartbeats meanwhile
|
|
775
|
+
// (#377); a heartbeat-only stretch is bounded by quiet. The failure says
|
|
776
|
+
// how much of the batch came, so a stall reads apart from a slow call.
|
|
774
777
|
waitForBatch() {
|
|
775
778
|
clearTimeout(this.batchTimer)
|
|
779
|
+
const since = Date.now()
|
|
776
780
|
this.batchTimer = later(() => {
|
|
777
|
-
|
|
778
|
-
|
|
781
|
+
const s = this.segment
|
|
782
|
+
if (s.expected == null && s.calls.length && !this.resultSubmitted) this.missingCount()
|
|
783
|
+
else this.fail({ status: 502, message: `Cursor did not complete its declared native tool batch: ${s.calls.length} of ${s.expected ?? "?"} calls came, ${s.answered} answered here, none since ${Date.now() - since} ms` })
|
|
779
784
|
}, this.limits.batchWait)
|
|
780
785
|
}
|
|
781
786
|
missingCount() {
|
|
@@ -1005,6 +1010,8 @@ class NativeSession {
|
|
|
1005
1010
|
} else if (u.num === 27) {
|
|
1006
1011
|
this.listed(num(uf, 1))
|
|
1007
1012
|
if (this.error) return
|
|
1013
|
+
} else if (u.num === 13) {
|
|
1014
|
+
if (this.batchTimer && !this.terminal && this.state !== "awaiting-results") this.waitForBatch()
|
|
1008
1015
|
}
|
|
1009
1016
|
}
|
|
1010
1017
|
break
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magpie-community/opencode-cursor-auth",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.22",
|
|
4
4
|
"description": "Cursor subscriptions (Pro, Pro+, Ultra, Teams) in OpenCode and magpie, through the API cursor-agent talks to",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.mjs",
|