ework-daemon 0.4.49 → 0.4.51

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ework-daemon",
3
- "version": "0.4.49",
3
+ "version": "0.4.51",
4
4
  "description": "Issue-driven AI development daemon. Spawns opencode subprocesses to resolve Gitea issues.",
5
5
  "module": "src/index.ts",
6
6
  "type": "module",
package/src/opencode.ts CHANGED
@@ -1520,7 +1520,9 @@ export class Engine {
1520
1520
  ): string {
1521
1521
  const who = authorKind === "bot" ? `@${commentUser} (bot)` : `@${commentUser} (user)`;
1522
1522
  return [
1523
- `New comment from ${who} on ${instructions.issueRef} "${issueTitle}":`,
1523
+ `[SYSTEM FORWARD] User ${who} posted a new comment on ${instructions.issueRef} "${issueTitle}".`,
1524
+ `The platform forwarded it to you; the user cannot see your terminal output —`,
1525
+ `your reply tool posts a \`[bot]\` comment into the thread they read.`,
1524
1526
  ``,
1525
1527
  `---`,
1526
1528
  commentBody,
@@ -1528,7 +1530,7 @@ export class Engine {
1528
1530
  ``,
1529
1531
  `Working directory: ${workdir}`,
1530
1532
  ``,
1531
- `Reply with the \`reply\` tool (posted to the thread as a \`[bot]\` comment).`,
1533
+ `Reply using the \`reply\` tool.`,
1532
1534
  ].join("\n");
1533
1535
  }
1534
1536
 
@@ -99,14 +99,8 @@ export class PiBackend implements RuntimeBackend {
99
99
  }
100
100
 
101
101
  async sessionExists(sessionId: string): Promise<boolean> {
102
- const sessionDir = this.resolveSessionDir();
103
- if (!existsSync(sessionDir)) return false;
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> {