oc-transcript-save 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/index.ts +8 -9
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -292,15 +292,14 @@ export const TranscriptSavePluginV2 = {
292
292
  const sessionID = resolveSessionId(event)
293
293
  if (!sessionID) return
294
294
 
295
- if (type === 'session.status') {
296
- const status = asObject(asObject(event.data).status)
297
- const statusType = asString(status.type)
298
- if (statusType === 'busy' || statusType === 'retry') return
299
- if (statusType === 'idle') schedule(sessionID)
300
- return
301
- }
302
-
303
- if (type === 'session.idle') {
295
+ // V2 replaced the ephemeral `session.status` / deprecated `session.idle`
296
+ // bus events (never delivered to plugins) with durable
297
+ // `session.execution.*` events. A turn ends in exactly one of these.
298
+ if (
299
+ type === 'session.execution.succeeded'
300
+ || type === 'session.execution.failed'
301
+ || type === 'session.execution.interrupted'
302
+ ) {
304
303
  schedule(sessionID)
305
304
  }
306
305
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oc-transcript-save",
3
3
  "description": "OpenCode plugin that autosaves full transcript in specified directory",
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
7
7
  "module": "./index.ts",