flyspace-cli 0.1.21 → 0.1.25

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.
@@ -0,0 +1,39 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
2
+ <g transform="translate(0.000000,1024.000000) scale(0.100000,-0.100000)" fill="#5052f2" stroke="none">
3
+ <path d="M8237 8664 c-4 -4 -7 -16 -7 -27 0 -12 -5 -34 -10 -51 -6 -17 -26
4
+ -83 -45 -146 -19 -63 -40 -133 -47 -155 -7 -24 -34 -62 -68 -96 -47 -47 -67
5
+ -59 -140 -83 -75 -25 -198 -60 -298 -86 -19 -4 -36 -11 -39 -13 -9 -10 8 -27
6
+ 26 -27 10 0 41 -7 67 -15 27 -8 96 -29 154 -46 153 -47 200 -70 246 -122 42
7
+ -48 75 -135 129 -342 43 -164 48 -165 85 -20 42 165 96 314 127 354 47 60 173
8
+ 113 408 173 136 35 133 40 -50 88 -174 46 -292 93 -332 132 -18 18 -44 55 -57
9
+ 83 -26 55 -109 321 -118 379 -3 21 -20 31 -31 20z m31 -87 c6 -6 14 -26 17
10
+ -42 9 -38 52 -176 73 -235 24 -69 68 -127 117 -155 47 -28 205 -85 295 -106
11
+ 64 -15 90 -33 72 -51 -6 -6 -64 -26 -129 -45 -186 -53 -262 -91 -307 -153 -32
12
+ -43 -105 -245 -121 -332 -16 -83 -51 -64 -79 42 -61 226 -101 308 -173 353
13
+ -43 27 -239 95 -320 112 -17 3 -37 13 -44 21 -19 23 5 39 86 59 83 21 223 68
14
+ 263 89 70 36 115 113 162 276 12 41 25 85 31 98 5 13 9 31 9 40 0 18 18 42 31
15
+ 42 4 0 11 -6 17 -13z M7855 7619 c-47 -30 -225 -105 -353 -150 -477 -165
16
+ -1133 -275 -1907 -320 -104 -6 -529 -13 -942 -16 -600 -4 -753 -8 -753 -18 0
17
+ -7 -39 -134 -86 -281 -47 -148 -120 -375 -161 -504 -41 -129 -110 -345 -153
18
+ -480 -43 -135 -146 -461 -230 -725 -83 -264 -194 -615 -247 -780 -52 -165
19
+ -122 -385 -155 -490 -32 -104 -90 -287 -128 -405 -70 -220 -343 -1081 -431
20
+ -1361 -27 -86 -49 -159 -49 -162 0 -3 70 42 155 101 425 294 601 415 1085 746
21
+ 135 93 255 178 267 190 13 13 39 76 66 161 163 506 297 933 297 943 0 15 -19
22
+ 15 -175 -3 -132 -16 -306 -53 -369 -79 -30 -12 -37 -12 -46 -1 -32 38 307 194
23
+ 550 254 47 11 172 37 279 56 308 56 496 109 746 210 590 238 1142 654 1519
24
+ 1144 31 41 54 76 52 78 -3 3 -19 -5 -35 -17 -80 -56 -353 -163 -571 -224 -341
25
+ -94 -821 -160 -1355 -185 -131 -6 -173 -5 -184 4 -11 11 2 60 78 295 50 155
26
+ 91 287 91 292 0 26 -350 -19 -508 -65 -65 -19 -84 -21 -92 -11 -14 15 16 37
27
+ 125 91 202 101 443 169 720 203 334 40 559 83 813 156 749 213 1424 617 1948
28
+ 1166 115 121 190 208 177 207 -4 0 -21 -9 -38 -20z"/>
29
+ </g>
30
+ <g transform="translate(0.000000,1024.000000) scale(0.100000,-0.100000)" fill="#9da7fe" stroke="none">
31
+ <path d="M8247 8640 c-4 -8 -13 -40 -21 -70 -8 -30 -22 -77 -30 -105 -8 -27
32
+ -21 -73 -29 -100 -33 -119 -84 -197 -151 -232 -42 -22 -156 -60 -261 -88 -50
33
+ -13 -104 -29 -120 -35 l-30 -12 65 -19 c36 -11 83 -24 105 -31 102 -29 223
34
+ -73 258 -95 75 -47 113 -129 182 -388 14 -55 29 -107 32 -115 3 -8 16 26 28
35
+ 75 43 169 97 319 131 365 30 41 54 58 151 103 18 8 102 35 188 59 85 23 155
36
+ 46 155 49 0 3 -42 16 -92 28 -129 32 -281 85 -333 116 -47 27 -93 86 -114 145
37
+ -27 75 -81 257 -101 335 -5 21 -9 25 -13 15z"/>
38
+ </g>
39
+ </svg>
Binary file
@@ -600,6 +600,10 @@ async function updateChannelById(id, patch) {
600
600
  if (existing?.isDefault && (patch.visibility === "private" || patch.archivedAt || patch.isDefault === false || patch.name !== void 0 && patch.name.trim() !== existing.name)) {
601
601
  throw new DefaultChannelError();
602
602
  }
603
+ if (patch.cwd !== void 0 && existing && patch.cwd === existing.cwd) {
604
+ const { cwd: _unchanged, ...rest } = patch;
605
+ patch = rest;
606
+ }
603
607
  if (patch.cwd !== void 0) {
604
608
  patch = { ...patch, cwd: await assertCwdInWorkspace(existing?.profile ?? getProfile(), patch.cwd) };
605
609
  }
@@ -655,6 +659,9 @@ async function upsertChannelByAgentName(input) {
655
659
  { onConflict: "profile,agent_name" }
656
660
  ).select().single();
657
661
  if (error) throw new Error(error.message);
662
+ if (data.profile !== getProfile()) {
663
+ throw new Error(`agent DM upsert for ${input.agentName} resolved to another workspace's channel`);
664
+ }
658
665
  await refreshChannelRegistry();
659
666
  return rowToChannel(data);
660
667
  }
@@ -2563,13 +2570,14 @@ var workspaceCache = /* @__PURE__ */ new Map();
2563
2570
  async function getWorkspaceBySlug(slug) {
2564
2571
  const cached = workspaceCache.get(slug);
2565
2572
  if (cached && cached.expiresAt > Date.now()) return cached.workspace;
2566
- const { data, error } = await getSupabaseClient().from("workspaces").select("id, slug, agent_connected_at, projects_setup_at").eq("slug", slug).maybeSingle();
2573
+ const { data, error } = await getSupabaseClient().from("workspaces").select("id, slug, agent_connected_at, projects_setup_at, plan").eq("slug", slug).maybeSingle();
2567
2574
  if (error) throw new Error(`getWorkspaceBySlug(${slug}): ${error.message}`);
2568
2575
  const workspace = data ? {
2569
2576
  id: data.id,
2570
2577
  slug: data.slug,
2571
2578
  agentConnectedAt: data.agent_connected_at,
2572
- projectsSetupAt: data.projects_setup_at
2579
+ projectsSetupAt: data.projects_setup_at,
2580
+ plan: data.plan ?? null
2573
2581
  } : null;
2574
2582
  workspaceCache.set(slug, { workspace, expiresAt: Date.now() + WORKSPACE_CACHE_TTL_MS });
2575
2583
  return workspace;