sortie-dogs 0.5.15 → 0.5.16

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 CHANGED
@@ -20,7 +20,7 @@ Requirements: Node.js 22.6 or newer, npm, and OpenCode.
20
20
 
21
21
  Guides: [日本語](docs/guide-ja.md) · [简体中文](docs/guide-zh-CN.md) · [CLI testing](docs/cli-testing.md)
22
22
 
23
- Release: [v0.5.15](https://github.com/zufall-upon/Sortie-dogs/releases/tag/v0.5.15)
23
+ Release: [v0.5.16](https://github.com/zufall-upon/Sortie-dogs/releases/tag/v0.5.16)
24
24
 
25
25
  ## Quick start
26
26
 
@@ -144,6 +144,7 @@ export interface ContinuationHooks {
144
144
  textComplete(input: {
145
145
  sessionID: string;
146
146
  allowCheckpointContinuation?: boolean;
147
+ allowStepRecoveryFallback?: boolean;
147
148
  }, output: {
148
149
  text: string;
149
150
  }): Promise<void>;
@@ -865,7 +865,9 @@ export function createContinuationHooks(client, directory, policySource, timings
865
865
  }
866
866
  else if (nonTerminalProgress(state.latestCoordinatorReport) ||
867
867
  (state.stepRecoveryActive && !terminalCheckpoint(state.latestCoordinatorReport))) {
868
- scheduleStepRecovery(input.sessionID, state, state.latestCoordinatorReport);
868
+ if (input.allowStepRecoveryFallback !== false) {
869
+ scheduleStepRecovery(input.sessionID, state, state.latestCoordinatorReport);
870
+ }
869
871
  }
870
872
  // The resumed coordinator completed a turn, so no late event from its prior compaction can
871
873
  // compete with the next host-managed compaction.
@@ -1564,13 +1564,14 @@ export const SortieDogsPlugin = async (input, options) => {
1564
1564
  authorization.lease = undefined;
1565
1565
  }
1566
1566
  }
1567
- async function completeContinuationText(sessionID, text) {
1567
+ async function completeContinuationText(sessionID, text, allowStepRecoveryFallback = true) {
1568
1568
  const continuationText = fastLane.manualCompactionForbidden(sessionID)
1569
1569
  ? text.replaceAll(ROLLOVER_MARKER, "").replaceAll(CONTINUATION_MARKER, "").trimEnd()
1570
1570
  : text;
1571
1571
  await continuation.textComplete({
1572
1572
  sessionID,
1573
1573
  allowCheckpointContinuation: fastLane.backlogContinuationAllowed(sessionID),
1574
+ allowStepRecoveryFallback,
1574
1575
  }, { text: continuationText });
1575
1576
  if (fastLane.backlogContinuationAllowed(sessionID) && continuation.blocksTool(sessionID)) {
1576
1577
  fastLane.continuationQueued(sessionID);
@@ -2898,7 +2899,7 @@ export const SortieDogsPlugin = async (input, options) => {
2898
2899
  .replaceAll(CONTINUATION_MARKER, "")
2899
2900
  .trimEnd();
2900
2901
  }
2901
- await completeContinuationText(textInput.sessionID, textOutput.text);
2902
+ await completeContinuationText(textInput.sessionID, textOutput.text, false);
2902
2903
  },
2903
2904
  "experimental.session.compacting": async (compactInput, compactOutput) => {
2904
2905
  await continuation.sessionCompacting(compactInput, compactOutput);
@@ -3517,14 +3518,13 @@ export const SortieDogsPlugin = async (input, options) => {
3517
3518
  completedCoordinatorParts.add(eventPart.id);
3518
3519
  const text = await eventAssistantMessageText(eventSessionID, eventPart.messageID, COORDINATOR_AGENT, eventPart.id);
3519
3520
  if (text !== undefined && text === eventPart.text.trim()) {
3520
- completedCoordinatorMessages.add(eventPart.messageID);
3521
3521
  while (completedCoordinatorParts.size > ACTIVE_SESSION_CACHE.maximum) {
3522
3522
  completedCoordinatorParts.delete(completedCoordinatorParts.values().next().value);
3523
3523
  }
3524
3524
  while (completedCoordinatorMessages.size > ACTIVE_SESSION_CACHE.maximum) {
3525
3525
  completedCoordinatorMessages.delete(completedCoordinatorMessages.values().next().value);
3526
3526
  }
3527
- await completeContinuationText(eventSessionID, text);
3527
+ await completeContinuationText(eventSessionID, text, false);
3528
3528
  return;
3529
3529
  }
3530
3530
  completedCoordinatorParts.delete(eventPart.id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sortie-dogs",
3
- "version": "0.5.15",
3
+ "version": "0.5.16",
4
4
  "description": "Bounded, validated orchestration loop plugin for OpenCode",
5
5
  "keywords": [
6
6
  "opencode",