@cydm/happy-elves 0.1.0-beta.284 → 0.1.0-beta.285

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cydm/happy-elves-cli",
3
- "version": "0.1.0-beta.284",
3
+ "version": "0.1.0-beta.285",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cydm/happy-elves-daemon",
3
- "version": "0.1.0-beta.284",
3
+ "version": "0.1.0-beta.285",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }
@@ -230,21 +230,6 @@ export function createRelayContext(options) {
230
230
  .get(claim.account_id, claim.request_id);
231
231
  if (admission && (admission.finished_at !== null || admission.terminal_status !== null))
232
232
  return {};
233
- const session = options.db
234
- .prepare(`SELECT status, current_head, last_turn_id, updated_at
235
- FROM sessions
236
- WHERE account_id = ? AND id = ?`)
237
- .get(claim.account_id, claim.session_id);
238
- if (admission?.dispatch === "delivered" &&
239
- session &&
240
- isSettledSessionProjectionStatus(session.status) &&
241
- session.updated_at > claim.created_at &&
242
- (session.last_turn_id === claim.turn_id || (session.current_head !== claim.turn_id && session.last_turn_id !== claim.turn_id))) {
243
- return {
244
- terminalStatus: terminalStatusForSettledSessionStatus(session.status),
245
- finishedAt: session.updated_at,
246
- };
247
- }
248
233
  const newerTerminal = options.db
249
234
  .prepare(`SELECT 1
250
235
  FROM relay_admissions
@@ -259,16 +244,6 @@ export function createRelayContext(options) {
259
244
  .get(claim.account_id, claim.session_id, claim.request_id, claim.created_at);
260
245
  return newerTerminal ? {} : undefined;
261
246
  }
262
- function terminalStatusForSettledSessionStatus(status) {
263
- if (status === "failed")
264
- return "failed";
265
- if (status === "cancelled" || status === "closed")
266
- return "cancelled";
267
- return "completed";
268
- }
269
- function isSettledSessionProjectionStatus(status) {
270
- return status === "ready" || status === "completed" || status === "cancelled" || status === "closed";
271
- }
272
247
  function claimSessionTurn(params) {
273
248
  const existing = activeSessionClaim(params.accountId, params.sessionId);
274
249
  if (existing && existing.request_id !== params.requestId)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cydm/happy-elves",
3
- "version": "0.1.0-beta.284",
3
+ "version": "0.1.0-beta.285",
4
4
  "description": "Remote controller for local coding agents with hosted or self-hosted relay support.",
5
5
  "type": "module",
6
6
  "bin": {