episoda 0.2.28 → 0.2.30

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.
@@ -2696,7 +2696,7 @@ var require_package = __commonJS({
2696
2696
  "package.json"(exports2, module2) {
2697
2697
  module2.exports = {
2698
2698
  name: "episoda",
2699
- version: "0.2.27",
2699
+ version: "0.2.29",
2700
2700
  description: "CLI tool for Episoda local development workflow orchestration",
2701
2701
  main: "dist/index.js",
2702
2702
  types: "dist/index.d.ts",
@@ -7206,6 +7206,23 @@ var Daemon = class _Daemon {
7206
7206
  return;
7207
7207
  }
7208
7208
  console.log(`[Daemon] EP959: Worktree created for ${moduleUid} at ${createResult.worktreePath}`);
7209
+ if (this.deviceId) {
7210
+ try {
7211
+ const ownershipConfig = await (0, import_core10.loadConfig)();
7212
+ const ownershipApiUrl = ownershipConfig?.api_url || "https://episoda.dev";
7213
+ const ownershipResponse = await fetchWithAuth(`${ownershipApiUrl}/api/modules/${moduleUid}`, {
7214
+ method: "PATCH",
7215
+ body: JSON.stringify({ checkout_machine_id: this.deviceId })
7216
+ });
7217
+ if (ownershipResponse.ok) {
7218
+ console.log(`[Daemon] EP990: Claimed ownership of ${moduleUid} for device ${this.deviceId}`);
7219
+ } else {
7220
+ console.warn(`[Daemon] EP990: Failed to claim ownership of ${moduleUid}: ${ownershipResponse.status}`);
7221
+ }
7222
+ } catch (ownershipError) {
7223
+ console.warn(`[Daemon] EP990: Error claiming ownership of ${moduleUid}:`, ownershipError);
7224
+ }
7225
+ }
7209
7226
  worktree = await getWorktreeInfoForModule(moduleUid);
7210
7227
  if (!worktree || !worktree.exists) {
7211
7228
  console.error(`[Daemon] EP959: Worktree still not found after creation for ${moduleUid}`);