sentinelayer-cli 0.11.2 → 0.11.3

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": "sentinelayer-cli",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "Scaffold Sentinelayer spec/prompt/guide artifacts with secure browser auth and token bootstrap.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -277,8 +277,9 @@ export async function listenSessionEvents({
277
277
  lastReason = "";
278
278
  const events = Array.isArray(result.events) ? result.events : [];
279
279
  const nextCursor = normalizeString(result.cursor) || cursorFromEvents(events, cursor);
280
- const cursorMovedBackward = Boolean(nextCursor && cursor && !cursorAdvances(nextCursor, cursor));
281
- if (cursorMovedBackward) {
280
+ const cursorDidNotAdvance = Boolean(nextCursor && cursor && !cursorAdvances(nextCursor, cursor));
281
+ const cursorFault = cursorDidNotAdvance && (nextCursor !== cursor || events.length > 0);
282
+ if (cursorFault) {
282
283
  lastReason = "cursor_not_advanced";
283
284
  await onError({
284
285
  ok: false,