ework-daemon 0.4.50 → 0.4.52
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 +1 -1
- package/src/opencode.ts +11 -0
- package/src/runtime/pi-backend.ts +2 -8
package/package.json
CHANGED
package/src/opencode.ts
CHANGED
|
@@ -1148,6 +1148,17 @@ export class Engine {
|
|
|
1148
1148
|
// Update session state
|
|
1149
1149
|
await this.store.updateSession(session.id, { state: "running" });
|
|
1150
1150
|
|
|
1151
|
+
// Every execution path funnels through here (opened, commented, new-session
|
|
1152
|
+
// on comment, preempt re-run, retry) — the badge must flip for all of them,
|
|
1153
|
+
// not only for the initial issue-opened ack.
|
|
1154
|
+
const tracker = this.trackers.get(issue.trackerType);
|
|
1155
|
+
if (tracker) {
|
|
1156
|
+
void tracker.updateStatus(
|
|
1157
|
+
{ trackerType: issue.trackerType, scope: issue.trackerScope, issueId: issue.trackerIssueId },
|
|
1158
|
+
"processing",
|
|
1159
|
+
);
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1151
1162
|
void this.execProcess(k, session, issue, msg);
|
|
1152
1163
|
}
|
|
1153
1164
|
|
|
@@ -99,14 +99,8 @@ export class PiBackend implements RuntimeBackend {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
async sessionExists(sessionId: string): Promise<boolean> {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
try {
|
|
105
|
-
const files = readdirSync(sessionDir);
|
|
106
|
-
return files.some((f) => f.includes(sessionId) && f.endsWith(".jsonl"));
|
|
107
|
-
} catch {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
102
|
+
if (!sessionId) return false;
|
|
103
|
+
return this.findSessionFile(sessionId) !== null;
|
|
110
104
|
}
|
|
111
105
|
|
|
112
106
|
async getSessionOutputTokens(sessionId: string | undefined): Promise<SessionOutputResult> {
|