syntaur 0.25.0 → 0.26.0

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.
Files changed (65) hide show
  1. package/dashboard/dist/assets/{_basePickBy-CN0iXrRl.js → _basePickBy-jPItyrQO.js} +1 -1
  2. package/dashboard/dist/assets/{_baseUniq-f5KgmPS-.js → _baseUniq-pEwUwurC.js} +1 -1
  3. package/dashboard/dist/assets/{arc-Is_GQHDi.js → arc-ZZtp507S.js} +1 -1
  4. package/dashboard/dist/assets/{architectureDiagram-2XIMDMQ5-GnMoIbkq.js → architectureDiagram-2XIMDMQ5-BNUerPqd.js} +1 -1
  5. package/dashboard/dist/assets/{blockDiagram-WCTKOSBZ-C6FJCqER.js → blockDiagram-WCTKOSBZ-CQyovXFv.js} +1 -1
  6. package/dashboard/dist/assets/{c4Diagram-IC4MRINW-CbzB6xiI.js → c4Diagram-IC4MRINW-wNQ6EHeF.js} +1 -1
  7. package/dashboard/dist/assets/channel-BYnzdl2x.js +1 -0
  8. package/dashboard/dist/assets/{chunk-4BX2VUAB-DfVhtiVZ.js → chunk-4BX2VUAB-ZaueC30R.js} +1 -1
  9. package/dashboard/dist/assets/{chunk-55IACEB6-yDuI8WJG.js → chunk-55IACEB6-BjsRB0t8.js} +1 -1
  10. package/dashboard/dist/assets/{chunk-FMBD7UC4-ClMCd4y0.js → chunk-FMBD7UC4-BHuSr-Tl.js} +1 -1
  11. package/dashboard/dist/assets/{chunk-JSJVCQXG-x0Ds2VxI.js → chunk-JSJVCQXG-SHNJA0es.js} +1 -1
  12. package/dashboard/dist/assets/{chunk-KX2RTZJC-BtLBfEbM.js → chunk-KX2RTZJC-JXFPjeo4.js} +1 -1
  13. package/dashboard/dist/assets/{chunk-NQ4KR5QH-BR_YJ2O0.js → chunk-NQ4KR5QH-BiJqWT0B.js} +1 -1
  14. package/dashboard/dist/assets/{chunk-QZHKN3VN-CpJrMBfa.js → chunk-QZHKN3VN-DoXWBqP2.js} +1 -1
  15. package/dashboard/dist/assets/{chunk-WL4C6EOR-COlZCEcU.js → chunk-WL4C6EOR-Dqtf_5it.js} +1 -1
  16. package/dashboard/dist/assets/classDiagram-VBA2DB6C-BnPZbM4g.js +1 -0
  17. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-BnPZbM4g.js +1 -0
  18. package/dashboard/dist/assets/clone-DYNFxLr3.js +1 -0
  19. package/dashboard/dist/assets/{cose-bilkent-S5V4N54A-Be49cOHu.js → cose-bilkent-S5V4N54A-Cr6bkSKq.js} +1 -1
  20. package/dashboard/dist/assets/{dagre-KLK3FWXG-kMJYOzRh.js → dagre-KLK3FWXG-oXpXFuJQ.js} +1 -1
  21. package/dashboard/dist/assets/{diagram-E7M64L7V-16A5Ru0f.js → diagram-E7M64L7V-Bq_xdDbg.js} +1 -1
  22. package/dashboard/dist/assets/{diagram-IFDJBPK2-BcnW30go.js → diagram-IFDJBPK2-N7Er4Dui.js} +1 -1
  23. package/dashboard/dist/assets/{diagram-P4PSJMXO-H00u_5yZ.js → diagram-P4PSJMXO-BU0Zm2Fn.js} +1 -1
  24. package/dashboard/dist/assets/{erDiagram-INFDFZHY-DLJRqyow.js → erDiagram-INFDFZHY-BSgZb5me.js} +1 -1
  25. package/dashboard/dist/assets/{flowDiagram-PKNHOUZH-CMNpPp6k.js → flowDiagram-PKNHOUZH-Bn7pEu0U.js} +1 -1
  26. package/dashboard/dist/assets/{ganttDiagram-A5KZAMGK-CM1TPA1M.js → ganttDiagram-A5KZAMGK-B8Xq9tyM.js} +1 -1
  27. package/dashboard/dist/assets/{gitGraphDiagram-K3NZZRJ6-CaZU57JT.js → gitGraphDiagram-K3NZZRJ6-BoLUjYDa.js} +1 -1
  28. package/dashboard/dist/assets/{graph-E2a2RZr0.js → graph-Pde_ni_y.js} +1 -1
  29. package/dashboard/dist/assets/index-7rNWNKq7.css +1 -0
  30. package/dashboard/dist/assets/{index-87em5uVQ.js → index-Nc9kfSW-.js} +122 -122
  31. package/dashboard/dist/assets/{infoDiagram-LFFYTUFH-DNNTGL3j.js → infoDiagram-LFFYTUFH-Brv2khjP.js} +1 -1
  32. package/dashboard/dist/assets/{ishikawaDiagram-PHBUUO56-CDOwhxyG.js → ishikawaDiagram-PHBUUO56-D5hxQ0Ke.js} +1 -1
  33. package/dashboard/dist/assets/{journeyDiagram-4ABVD52K-DfktCUGL.js → journeyDiagram-4ABVD52K-CUevv5jA.js} +1 -1
  34. package/dashboard/dist/assets/{kanban-definition-K7BYSVSG-Cef-JH0v.js → kanban-definition-K7BYSVSG-Cf6XyrAC.js} +1 -1
  35. package/dashboard/dist/assets/{layout-DX6aMfnc.js → layout-Bc8RP2w3.js} +1 -1
  36. package/dashboard/dist/assets/{linear-VHsqclP8.js → linear-Cd_XUbl7.js} +1 -1
  37. package/dashboard/dist/assets/{mermaid.core-SHnQ4DTm.js → mermaid.core-Bx8MuMEM.js} +4 -4
  38. package/dashboard/dist/assets/{mindmap-definition-YRQLILUH-B6rPgI2_.js → mindmap-definition-YRQLILUH-D_4Pl3Mu.js} +1 -1
  39. package/dashboard/dist/assets/{pieDiagram-SKSYHLDU-FeFYwJd1.js → pieDiagram-SKSYHLDU-DRVbjwxO.js} +1 -1
  40. package/dashboard/dist/assets/{quadrantDiagram-337W2JSQ-C8ToaX6X.js → quadrantDiagram-337W2JSQ-BciLlBMH.js} +1 -1
  41. package/dashboard/dist/assets/{requirementDiagram-Z7DCOOCP-DcQFgBUh.js → requirementDiagram-Z7DCOOCP-Bprwe8Z2.js} +1 -1
  42. package/dashboard/dist/assets/{sankeyDiagram-WA2Y5GQK-tg-fe8h0.js → sankeyDiagram-WA2Y5GQK-DI0t8Uiu.js} +1 -1
  43. package/dashboard/dist/assets/{sequenceDiagram-2WXFIKYE-DvK0Qr3p.js → sequenceDiagram-2WXFIKYE-CpCLCs5J.js} +1 -1
  44. package/dashboard/dist/assets/{stateDiagram-RAJIS63D-CA0uNmJC.js → stateDiagram-RAJIS63D-V-1VCApT.js} +1 -1
  45. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-B6S2ctrX.js +1 -0
  46. package/dashboard/dist/assets/{timeline-definition-YZTLITO2-BvSG2mgT.js → timeline-definition-YZTLITO2-DCAo6tA7.js} +1 -1
  47. package/dashboard/dist/assets/{treemap-KZPCXAKY-DKSXIxeb.js → treemap-KZPCXAKY-CKlbZ6Y_.js} +1 -1
  48. package/dashboard/dist/assets/{vennDiagram-LZ73GAT5-DbftUvFP.js → vennDiagram-LZ73GAT5-CJSijre_.js} +1 -1
  49. package/dashboard/dist/assets/{xychartDiagram-JWTSCODW-DewVggKf.js → xychartDiagram-JWTSCODW-DXd1BBmK.js} +1 -1
  50. package/dashboard/dist/index.html +2 -2
  51. package/dist/dashboard/server.js +190 -22
  52. package/dist/dashboard/server.js.map +1 -1
  53. package/dist/index.js +215 -23
  54. package/dist/index.js.map +1 -1
  55. package/dist/launch/index.d.ts +6 -0
  56. package/dist/launch/index.js +89 -3
  57. package/dist/launch/index.js.map +1 -1
  58. package/package.json +1 -1
  59. package/scripts/install-macos-url-handler.mjs +14 -1
  60. package/dashboard/dist/assets/channel-I1qzkKSE.js +0 -1
  61. package/dashboard/dist/assets/classDiagram-VBA2DB6C-Br3zoueH.js +0 -1
  62. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-Br3zoueH.js +0 -1
  63. package/dashboard/dist/assets/clone-BNiIx-eM.js +0 -1
  64. package/dashboard/dist/assets/index-3X9xvPGn.css +0 -1
  65. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-CiCui2CK.js +0 -1
package/dist/index.js CHANGED
@@ -806,6 +806,31 @@ var init_terminal_schema = __esm({
806
806
  }
807
807
  });
808
808
 
809
+ // src/utils/workspace-visibility-schema.ts
810
+ function normalizeHiddenList(input4) {
811
+ if (!Array.isArray(input4)) return [];
812
+ const seen = /* @__PURE__ */ new Set();
813
+ const out = [];
814
+ for (const raw of input4) {
815
+ if (typeof raw !== "string") continue;
816
+ const name = raw.trim();
817
+ if (name.length === 0) continue;
818
+ if (name.length > MAX_WORKSPACE_NAME_LENGTH) continue;
819
+ if (/[\r\n]/.test(name)) continue;
820
+ if (seen.has(name)) continue;
821
+ seen.add(name);
822
+ out.push(name);
823
+ }
824
+ return out;
825
+ }
826
+ var MAX_WORKSPACE_NAME_LENGTH;
827
+ var init_workspace_visibility_schema = __esm({
828
+ "src/utils/workspace-visibility-schema.ts"() {
829
+ "use strict";
830
+ MAX_WORKSPACE_NAME_LENGTH = 256;
831
+ }
832
+ });
833
+
809
834
  // src/utils/config.ts
810
835
  var config_exports = {};
811
836
  __export(config_exports, {
@@ -821,6 +846,7 @@ __export(config_exports, {
821
846
  deleteStatusConfig: () => deleteStatusConfig,
822
847
  deleteTerminalConfig: () => deleteTerminalConfig,
823
848
  deleteThemeConfig: () => deleteThemeConfig,
849
+ deleteWorkspaceVisibilityConfig: () => deleteWorkspaceVisibilityConfig,
824
850
  getAgents: () => getAgents,
825
851
  getAssignmentTypes: () => getAssignmentTypes,
826
852
  getTerminal: () => getTerminal,
@@ -837,7 +863,8 @@ __export(config_exports, {
837
863
  writeHotkeyBindingsConfig: () => writeHotkeyBindingsConfig,
838
864
  writeStatusConfig: () => writeStatusConfig,
839
865
  writeTerminalConfig: () => writeTerminalConfig,
840
- writeThemeConfig: () => writeThemeConfig
866
+ writeThemeConfig: () => writeThemeConfig,
867
+ writeWorkspaceVisibilityConfig: () => writeWorkspaceVisibilityConfig
841
868
  });
842
869
  import { readFile as readFile3 } from "fs/promises";
843
870
  import { spawnSync } from "child_process";
@@ -938,7 +965,10 @@ function cloneDefaultConfig() {
938
965
  },
939
966
  theme: DEFAULT_CONFIG.theme ? { ...DEFAULT_CONFIG.theme } : null,
940
967
  hotkeys: DEFAULT_CONFIG.hotkeys ? { bindings: { ...DEFAULT_CONFIG.hotkeys.bindings } } : null,
941
- terminal: DEFAULT_CONFIG.terminal
968
+ terminal: DEFAULT_CONFIG.terminal,
969
+ workspaceVisibility: {
970
+ hidden: [...DEFAULT_CONFIG.workspaceVisibility.hidden]
971
+ }
942
972
  };
943
973
  }
944
974
  function parseFrontmatter(content) {
@@ -1270,6 +1300,93 @@ ${cleanedFm}
1270
1300
  ---${afterFrontmatter}`;
1271
1301
  await writeFileForce(configPath, newContent);
1272
1302
  }
1303
+ function serializeWorkspaceVisibilityConfig(cfg) {
1304
+ const hidden = normalizeHiddenList(cfg.hidden);
1305
+ if (hidden.length === 0) return null;
1306
+ const lines = ["workspaceVisibility:", " hidden:"];
1307
+ for (const name of hidden) {
1308
+ lines.push(` - ${JSON.stringify(name)}`);
1309
+ }
1310
+ return lines.join("\n");
1311
+ }
1312
+ function parseWorkspaceVisibilityConfig(fmBlock) {
1313
+ const blockStart = fmBlock.match(/^workspaceVisibility:\s*$/m);
1314
+ if (!blockStart) {
1315
+ return { hidden: [] };
1316
+ }
1317
+ const startIdx = fmBlock.indexOf(blockStart[0]) + blockStart[0].length;
1318
+ const remaining = fmBlock.slice(startIdx).split("\n");
1319
+ const hidden = [];
1320
+ let currentSection = null;
1321
+ for (const line of remaining) {
1322
+ const trimmed = line.trimStart();
1323
+ const indent = line.length - trimmed.length;
1324
+ if (indent === 0 && trimmed.length > 0) break;
1325
+ if (trimmed === "") continue;
1326
+ if (indent === 2 && trimmed.startsWith("hidden:")) {
1327
+ currentSection = "hidden";
1328
+ continue;
1329
+ }
1330
+ if (currentSection === "hidden" && indent >= 4 && trimmed.startsWith("- ")) {
1331
+ const rest = trimmed.slice(2).trim();
1332
+ if (rest.length === 0) continue;
1333
+ let name;
1334
+ if (rest.startsWith('"')) {
1335
+ try {
1336
+ name = JSON.parse(rest);
1337
+ } catch {
1338
+ name = rest.replace(/^["']|["']$/g, "");
1339
+ }
1340
+ } else {
1341
+ name = rest;
1342
+ }
1343
+ hidden.push(name);
1344
+ continue;
1345
+ }
1346
+ }
1347
+ return { hidden: normalizeHiddenList(hidden) };
1348
+ }
1349
+ async function writeWorkspaceVisibilityConfig(cfg) {
1350
+ const configPath = resolve3(syntaurRoot(), "config.md");
1351
+ const block = serializeWorkspaceVisibilityConfig(cfg);
1352
+ const existing = await fileExists(configPath) ? await readFile3(configPath, "utf-8") : renderConfig({ defaultProjectDir: defaultProjectDir() });
1353
+ const fmMatch = existing.match(/^(---\n)([\s\S]*?)\n(---)/);
1354
+ if (!fmMatch) {
1355
+ const bodyBlock = block ? `${block}
1356
+ ` : "";
1357
+ const content = `---
1358
+ version: "2.0"
1359
+ defaultProjectDir: ${defaultProjectDir()}
1360
+ ${bodyBlock}---
1361
+ ${existing}`;
1362
+ await writeFileForce(configPath, content);
1363
+ return;
1364
+ }
1365
+ const fmBlock = fmMatch[2];
1366
+ const afterFrontmatter = existing.slice(fmMatch[0].length);
1367
+ const cleanedFm = stripTopLevelBlock(fmBlock, "workspaceVisibility");
1368
+ const newFm = block ? `${cleanedFm}
1369
+ ${block}`.replace(/^\n+/, "") : cleanedFm;
1370
+ const normalizedFm = newFm.replace(/\n+$/, "");
1371
+ const newContent = `---
1372
+ ${normalizedFm}
1373
+ ---${afterFrontmatter}`;
1374
+ await writeFileForce(configPath, newContent);
1375
+ }
1376
+ async function deleteWorkspaceVisibilityConfig() {
1377
+ const configPath = resolve3(syntaurRoot(), "config.md");
1378
+ if (!await fileExists(configPath)) return;
1379
+ const existing = await readFile3(configPath, "utf-8");
1380
+ const fmMatch = existing.match(/^(---\n)([\s\S]*?)\n(---)/);
1381
+ if (!fmMatch) return;
1382
+ const fmBlock = fmMatch[2];
1383
+ const afterFrontmatter = existing.slice(fmMatch[0].length);
1384
+ const cleanedFm = stripTopLevelBlock(fmBlock, "workspaceVisibility");
1385
+ const newContent = `---
1386
+ ${cleanedFm}
1387
+ ---${afterFrontmatter}`;
1388
+ await writeFileForce(configPath, newContent);
1389
+ }
1273
1390
  function stripTopLevelScalar(fmBlock, key) {
1274
1391
  const lines = fmBlock.split("\n");
1275
1392
  const keyRegex = new RegExp(`^${key}:\\s*\\S`);
@@ -1986,7 +2103,8 @@ async function readConfig() {
1986
2103
  console.warn(`Warning: ${msg} \u2014 falling back to default`);
1987
2104
  return null;
1988
2105
  }
1989
- })()
2106
+ })(),
2107
+ workspaceVisibility: parseWorkspaceVisibilityConfig(fmBlock)
1990
2108
  };
1991
2109
  }
1992
2110
  function getAssignmentTypes(config) {
@@ -2060,6 +2178,7 @@ var init_config2 = __esm({
2060
2178
  init_hotkeysCatalog();
2061
2179
  init_agents_schema();
2062
2180
  init_terminal_schema();
2181
+ init_workspace_visibility_schema();
2063
2182
  DEFAULT_ASSIGNMENT_TYPES = {
2064
2183
  definitions: [
2065
2184
  { id: "feature", label: "Feature" },
@@ -2095,7 +2214,10 @@ var init_config2 = __esm({
2095
2214
  },
2096
2215
  theme: null,
2097
2216
  hotkeys: null,
2098
- terminal: null
2217
+ terminal: null,
2218
+ workspaceVisibility: {
2219
+ hidden: []
2220
+ }
2099
2221
  };
2100
2222
  AUTO_CREATE_WORKTREE_VALUES = ["skip", "ask", "always"];
2101
2223
  AgentConfigError = class extends Error {
@@ -8673,9 +8795,17 @@ function buildTerminalDispatch(installedTerminals) {
8673
8795
  branches.push({
8674
8796
  id: "terminal-app",
8675
8797
  block: [
8798
+ ' set wasRunning to application "Terminal" is running',
8676
8799
  ' tell application "Terminal"',
8677
8800
  " activate",
8678
- " do script shellCmd",
8801
+ " if wasRunning then",
8802
+ " do script shellCmd",
8803
+ " else",
8804
+ " repeat until (count of windows) > 0",
8805
+ " delay 0.1",
8806
+ " end repeat",
8807
+ " do script shellCmd in window 1",
8808
+ " end if",
8679
8809
  " end tell"
8680
8810
  ]
8681
8811
  });
@@ -13891,10 +14021,55 @@ function createTerminalConfigRouter() {
13891
14021
  return router;
13892
14022
  }
13893
14023
 
14024
+ // src/dashboard/api-workspace-visibility-config.ts
14025
+ init_config2();
14026
+ init_workspace_visibility_schema();
14027
+ import { Router as Router8 } from "express";
14028
+ function createWorkspaceVisibilityConfigRouter() {
14029
+ const router = Router8();
14030
+ router.get("/", async (_req, res) => {
14031
+ try {
14032
+ const config = await readConfig();
14033
+ const hidden = config.workspaceVisibility.hidden;
14034
+ res.json({ hidden, custom: hidden.length > 0 });
14035
+ } catch (error) {
14036
+ console.error("Error getting workspace-visibility config:", error);
14037
+ res.status(500).json({ error: "Failed to get workspace-visibility config" });
14038
+ }
14039
+ });
14040
+ router.post("/", async (req, res) => {
14041
+ try {
14042
+ const { hidden } = req.body ?? {};
14043
+ if (!Array.isArray(hidden) || hidden.some((h) => typeof h !== "string")) {
14044
+ res.status(400).json({
14045
+ error: "hidden must be an array of strings"
14046
+ });
14047
+ return;
14048
+ }
14049
+ const normalized = normalizeHiddenList(hidden);
14050
+ await writeWorkspaceVisibilityConfig({ hidden: normalized });
14051
+ res.json({ hidden: normalized, custom: normalized.length > 0 });
14052
+ } catch (error) {
14053
+ console.error("Error saving workspace-visibility config:", error);
14054
+ res.status(500).json({ error: "Failed to save workspace-visibility config" });
14055
+ }
14056
+ });
14057
+ router.delete("/", async (_req, res) => {
14058
+ try {
14059
+ await deleteWorkspaceVisibilityConfig();
14060
+ res.json({ hidden: [], custom: false });
14061
+ } catch (error) {
14062
+ console.error("Error resetting workspace-visibility config:", error);
14063
+ res.status(500).json({ error: "Failed to reset workspace-visibility config" });
14064
+ }
14065
+ });
14066
+ return router;
14067
+ }
14068
+
13894
14069
  // src/dashboard/api-status-config.ts
13895
14070
  init_config2();
13896
14071
  init_api();
13897
- import { Router as Router8 } from "express";
14072
+ import { Router as Router9 } from "express";
13898
14073
 
13899
14074
  // src/utils/status-config-resolution.ts
13900
14075
  init_frontmatter();
@@ -14256,7 +14431,7 @@ function mapResolutionErrorToHttp(err2, applied) {
14256
14431
  }
14257
14432
  }
14258
14433
  function createStatusConfigRouter(projectsDir2, assignmentsDir2) {
14259
- const router = Router8();
14434
+ const router = Router9();
14260
14435
  installRecordsInvalidation(router);
14261
14436
  router.get("/", async (_req, res) => {
14262
14437
  try {
@@ -14437,7 +14612,7 @@ function createStatusConfigRouter(projectsDir2, assignmentsDir2) {
14437
14612
  }
14438
14613
 
14439
14614
  // src/dashboard/api-leases.ts
14440
- import { Router as Router9 } from "express";
14615
+ import { Router as Router10 } from "express";
14441
14616
 
14442
14617
  // src/db/leases-db.ts
14443
14618
  init_paths();
@@ -15068,7 +15243,7 @@ function releaseLeasesByRequestedFor(tag) {
15068
15243
 
15069
15244
  // src/dashboard/api-leases.ts
15070
15245
  function createLeasesRouter(broadcast) {
15071
- const router = Router9();
15246
+ const router = Router10();
15072
15247
  router.get("/", (_req, res) => {
15073
15248
  try {
15074
15249
  initLeasesDb();
@@ -15123,7 +15298,7 @@ function createLeasesRouter(broadcast) {
15123
15298
  }
15124
15299
 
15125
15300
  // src/dashboard/api-usage.ts
15126
- import { Router as Router10 } from "express";
15301
+ import { Router as Router11 } from "express";
15127
15302
 
15128
15303
  // src/db/usage-db.ts
15129
15304
  init_paths();
@@ -15343,7 +15518,7 @@ function listDaily(filter = {}) {
15343
15518
 
15344
15519
  // src/dashboard/api-usage.ts
15345
15520
  function createUsageRouter() {
15346
- const router = Router10();
15521
+ const router = Router11();
15347
15522
  router.get("/", (req, res) => {
15348
15523
  try {
15349
15524
  initUsageDb();
@@ -15508,7 +15683,7 @@ init_timestamp();
15508
15683
  init_fs();
15509
15684
  init_playbook();
15510
15685
  init_playbooks();
15511
- import { Router as Router11 } from "express";
15686
+ import { Router as Router12 } from "express";
15512
15687
  import { resolve as resolve26 } from "path";
15513
15688
  import { readFile as readFile18 } from "fs/promises";
15514
15689
  function statusForPlaybookError(code) {
@@ -15524,7 +15699,7 @@ function statusForPlaybookError(code) {
15524
15699
  }
15525
15700
  }
15526
15701
  function createPlaybooksRouter(playbooksDir3) {
15527
- const router = Router11();
15702
+ const router = Router12();
15528
15703
  router.get("/", async (_req, res) => {
15529
15704
  try {
15530
15705
  const playbooks = await listPlaybooks(playbooksDir3);
@@ -15688,7 +15863,7 @@ init_fs_migration();
15688
15863
  init_parser2();
15689
15864
  init_fs();
15690
15865
  init_paths();
15691
- import { Router as Router12 } from "express";
15866
+ import { Router as Router13 } from "express";
15692
15867
  import { readdir as readdir11 } from "fs/promises";
15693
15868
  import { resolve as resolvePath, dirname as dirname6 } from "path";
15694
15869
  import { rename as rename5, mkdir as mkdir2 } from "fs/promises";
@@ -15708,7 +15883,7 @@ function touchItem3(item) {
15708
15883
  item.updatedAt = now;
15709
15884
  }
15710
15885
  function createTodosRouter(todosDir2, broadcast, projectsDir2) {
15711
- const router = Router12();
15886
+ const router = Router13();
15712
15887
  installRecordsInvalidation(router);
15713
15888
  function broadcastUpdate() {
15714
15889
  broadcast({ type: "todos-updated", timestamp: (/* @__PURE__ */ new Date()).toISOString() });
@@ -16453,7 +16628,7 @@ init_parser2();
16453
16628
  init_fs();
16454
16629
  init_paths();
16455
16630
  init_slug();
16456
- import { Router as Router13 } from "express";
16631
+ import { Router as Router14 } from "express";
16457
16632
  import { mkdir as mkdir3, readFile as readFile19, rename as rename6 } from "fs/promises";
16458
16633
  import { resolve as resolve27, dirname as dirname7 } from "path";
16459
16634
  init_promote_todos();
@@ -16505,7 +16680,7 @@ function notFound(res, slug) {
16505
16680
  res.status(404).json({ error: `Project "${slug}" not found` });
16506
16681
  }
16507
16682
  function createProjectTodosRouter(projectsDir2, broadcast, workspaceTodosDir) {
16508
- const router = Router13({ mergeParams: true });
16683
+ const router = Router14({ mergeParams: true });
16509
16684
  installRecordsInvalidation(router);
16510
16685
  function broadcastUpdate(projectSlug) {
16511
16686
  broadcast({ type: "todos-updated", projectSlug, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
@@ -17331,7 +17506,7 @@ workspace: ${slug}
17331
17506
  }
17332
17507
 
17333
17508
  // src/dashboard/api-bundles.ts
17334
- import { Router as Router14 } from "express";
17509
+ import { Router as Router15 } from "express";
17335
17510
  import { readdir as readdir12 } from "fs/promises";
17336
17511
 
17337
17512
  // src/todos/bundle-parser.ts
@@ -17482,7 +17657,7 @@ function annotate(bundle, items) {
17482
17657
  }
17483
17658
  function createBundlesRouter(todosDir2, broadcast) {
17484
17659
  void broadcast;
17485
- const router = Router14();
17660
+ const router = Router15();
17486
17661
  function validateWorkspace(req, res, next) {
17487
17662
  const workspace = getWorkspaceParam2(req.params.workspace);
17488
17663
  if (workspace && !WORKSPACE_REGEX3.test(workspace)) {
@@ -17548,7 +17723,7 @@ function createBundlesRouter(todosDir2, broadcast) {
17548
17723
  init_fs();
17549
17724
  init_paths();
17550
17725
  init_slug();
17551
- import { Router as Router15 } from "express";
17726
+ import { Router as Router16 } from "express";
17552
17727
  import { resolve as resolve28 } from "path";
17553
17728
  init_parser2();
17554
17729
  function deriveStatus2(bundle, items) {
@@ -17578,7 +17753,7 @@ function notFound2(res, slug) {
17578
17753
  }
17579
17754
  function createProjectBundlesRouter(projectsDir2, broadcast) {
17580
17755
  void broadcast;
17581
- const router = Router15({ mergeParams: true });
17756
+ const router = Router16({ mergeParams: true });
17582
17757
  function validateProjectId(req, res, next) {
17583
17758
  const slug = getProjectIdParam2(req.params.projectId);
17584
17759
  if (!slug || !isValidSlug(slug)) {
@@ -17612,7 +17787,7 @@ function createProjectBundlesRouter(projectsDir2, broadcast) {
17612
17787
  init_config2();
17613
17788
  init_api();
17614
17789
  init_scanner();
17615
- import { Router as Router16 } from "express";
17790
+ import { Router as Router17 } from "express";
17616
17791
 
17617
17792
  // src/utils/github-backup.ts
17618
17793
  init_paths();
@@ -17935,7 +18110,7 @@ async function getBackupStatus() {
17935
18110
 
17936
18111
  // src/dashboard/api-backup.ts
17937
18112
  function createBackupRouter() {
17938
- const router = Router16();
18113
+ const router = Router17();
17939
18114
  router.get("/", async (_req, res) => {
17940
18115
  try {
17941
18116
  const status = await getBackupStatus();
@@ -18358,6 +18533,7 @@ function createDashboardServer(options) {
18358
18533
  }
18359
18534
  });
18360
18535
  app.use("/api/config/terminal", createTerminalConfigRouter());
18536
+ app.use("/api/config/workspace-visibility", createWorkspaceVisibilityConfigRouter());
18361
18537
  app.get("/api/config/hotkeys", async (_req, res) => {
18362
18538
  try {
18363
18539
  const config = await readConfig();
@@ -21089,13 +21265,29 @@ function buildTerminalInvocation(plan) {
21089
21265
  return {
21090
21266
  command: "osascript",
21091
21267
  args: [
21268
+ "-e",
21269
+ 'set wasRunning to application "Terminal" is running',
21092
21270
  "-e",
21093
21271
  'tell application "Terminal"',
21094
21272
  "-e",
21095
21273
  "activate",
21096
21274
  "-e",
21275
+ "if wasRunning then",
21276
+ "-e",
21097
21277
  `do script ${appleScriptString(cdAndRun)}`,
21098
21278
  "-e",
21279
+ "else",
21280
+ "-e",
21281
+ "repeat until (count of windows) > 0",
21282
+ "-e",
21283
+ "delay 0.1",
21284
+ "-e",
21285
+ "end repeat",
21286
+ "-e",
21287
+ `do script ${appleScriptString(cdAndRun)} in window 1`,
21288
+ "-e",
21289
+ "end if",
21290
+ "-e",
21099
21291
  "end tell"
21100
21292
  ]
21101
21293
  };