@turns/dev 0.0.12 → 0.0.13

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.
@@ -595,6 +595,7 @@ class CodexAppServerTransport extends LineTransport {
595
595
  : 'workspace-write',
596
596
  approvalPolicy: this.anchor.permissionMode === 'bypassPermissions' ? 'never' : 'on-request',
597
597
  };
598
+ const resumePath = !createSession && fs.existsSync(this.anchor.transcriptPath) ? this.anchor.transcriptPath : '';
598
599
  const opened = createSession
599
600
  ? await this.request('thread/start', {
600
601
  ...configuration,
@@ -606,6 +607,13 @@ class CodexAppServerTransport extends LineTransport {
606
607
  }, 90_000)
607
608
  : await this.request('thread/resume', {
608
609
  threadId: this.threadId,
610
+ // Codex's thread registry may not include a still-existing rollout
611
+ // after an upgrade. Supplying the descriptor path lets Codex resume
612
+ // the exact on-disk history instead of rejecting every later
613
+ // queued turn as "thread not found". Do not send Turns' temporary
614
+ // placeholder for a newly bound session: a non-empty path takes
615
+ // precedence over a valid thread id in the app-server protocol.
616
+ ...(resumePath ? { path: resumePath } : {}),
609
617
  ...configuration,
610
618
  ...(this.anchor.model && this.anchor.model !== 'auto' ? { model: this.anchor.model } : {}),
611
619
  ...(this.anchor.thinkingLevel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turns/dev",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Upload local AI agent sessions to turns.dev",
5
5
  "license": "MIT",
6
6
  "type": "module",