@discovery-tree/runner 0.1.2 → 0.1.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.
Files changed (2) hide show
  1. package/dist/cli.js +18 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -33,7 +33,7 @@ var RUNNER_EVENT_TEXT_MAX_LENGTH = 64e3;
33
33
  var RUNNER_EVENTS_MAX_BODY_BYTES = 8 * 1024 * 1024;
34
34
 
35
35
  // src/version.ts
36
- var RUNNER_VERSION = true ? "0.1.2" : "0.0.0-dev";
36
+ var RUNNER_VERSION = true ? "0.1.3" : "0.0.0-dev";
37
37
  var RUNNER_PLATFORM = `${process.platform}-${process.arch}`;
38
38
 
39
39
  // src/api.ts
@@ -1627,8 +1627,10 @@ ${text}`;
1627
1627
  const mapped = this.mapper.map(line);
1628
1628
  let dirty = false;
1629
1629
  if (mapped.claudeSessionId) this.sawInitSinceSpawn = true;
1630
+ let learnedSessionId = null;
1630
1631
  if (mapped.claudeSessionId && mapped.claudeSessionId !== this.record.claudeSessionId) {
1631
1632
  this.record.claudeSessionId = mapped.claudeSessionId;
1633
+ learnedSessionId = mapped.claudeSessionId;
1632
1634
  dirty = true;
1633
1635
  }
1634
1636
  if (mapped.turnStarted && !this.record.turnActive) {
@@ -1636,6 +1638,21 @@ ${text}`;
1636
1638
  dirty = true;
1637
1639
  }
1638
1640
  if (dirty) await this.deps.store.save(this.record);
1641
+ if (learnedSessionId) {
1642
+ const at = mapped.events.findIndex((e) => e.type === "status");
1643
+ if (at >= 0) {
1644
+ mapped.events[at] = {
1645
+ ...mapped.events[at],
1646
+ claudeSessionId: learnedSessionId
1647
+ };
1648
+ } else {
1649
+ mapped.events.push({
1650
+ type: "status",
1651
+ status: "running",
1652
+ claudeSessionId: learnedSessionId
1653
+ });
1654
+ }
1655
+ }
1639
1656
  if (mapped.events.length) this.emit(...mapped.events);
1640
1657
  if (mapped.turnEnd && this.resumeNotFound(mapped.turnEnd.isError)) {
1641
1658
  this.planFreshRetry();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@discovery-tree/runner",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "dt-runner: run Discovery Tree agent sessions on your own computer with your own signed-in Claude Code",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {