panopticon-cli 0.6.0 → 0.6.1

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 (57) hide show
  1. package/dist/cli/index.js +19 -19
  2. package/dist/cli/index.js.map +1 -1
  3. package/dist/dashboard/{event-store-BtuZCLHu.js → event-store-D7kLBd07.js} +1 -1
  4. package/dist/dashboard/{event-store-OS5jH3Eu.js → event-store-O9q0Gweh.js} +2 -2
  5. package/dist/dashboard/{event-store-OS5jH3Eu.js.map → event-store-O9q0Gweh.js.map} +1 -1
  6. package/dist/dashboard/{inspect-agent-CwT4mrvV.js → inspect-agent-B57kGDUV.js} +3 -3
  7. package/dist/dashboard/{inspect-agent-CwT4mrvV.js.map → inspect-agent-B57kGDUV.js.map} +1 -1
  8. package/dist/dashboard/{issue-service-singleton-z78bbRiO.js → issue-service-singleton-DQK42EqH.js} +1 -1
  9. package/dist/dashboard/{issue-service-singleton-0n9hcF71.js → issue-service-singleton-sb2HkB9f.js} +2 -2
  10. package/dist/dashboard/{issue-service-singleton-0n9hcF71.js.map → issue-service-singleton-sb2HkB9f.js.map} +1 -1
  11. package/dist/dashboard/{lifecycle-B6d3AE3n.js → lifecycle-ZTYdrr2O.js} +1 -1
  12. package/dist/dashboard/{merge-agent-DaIEvGJG.js → merge-agent-GLtMEsTu.js} +1 -1
  13. package/dist/dashboard/{merge-agent-CmqR1MFf.js → merge-agent-twroFuAh.js} +2 -2
  14. package/dist/dashboard/{merge-agent-CmqR1MFf.js.map → merge-agent-twroFuAh.js.map} +1 -1
  15. package/dist/dashboard/{projection-cache-Bkzs_90o.js → projection-cache-DQ9zegkK.js} +10 -10
  16. package/dist/dashboard/projection-cache-DQ9zegkK.js.map +1 -0
  17. package/dist/dashboard/public/assets/{dist-D-q87oB4.js → dist-C2sRcZJv.js} +1 -1
  18. package/dist/dashboard/public/assets/{index--G6_upSx.js → index-BCLmEMRf.js} +41 -41
  19. package/dist/dashboard/public/assets/index-BEdq7CFf.css +1 -0
  20. package/dist/dashboard/public/index.html +2 -2
  21. package/dist/dashboard/{review-status-DqJZDthU.js → review-status-CK3eBGyb.js} +1 -1
  22. package/dist/dashboard/{review-status-LQATWF6L.js → review-status-CV55Tl-n.js} +2 -2
  23. package/dist/dashboard/{review-status-LQATWF6L.js.map → review-status-CV55Tl-n.js.map} +1 -1
  24. package/dist/dashboard/server.js +85 -85
  25. package/dist/dashboard/server.js.map +1 -1
  26. package/dist/dashboard/{specialist-context-IX8ZZBxy.js → specialist-context-ColzlmGE.js} +2 -2
  27. package/dist/dashboard/{specialist-context-IX8ZZBxy.js.map → specialist-context-ColzlmGE.js.map} +1 -1
  28. package/dist/dashboard/{specialist-logs-BvOQ3XPt.js → specialist-logs-BhmDpFIq.js} +1 -1
  29. package/dist/dashboard/{specialists-C7Fyhq_j.js → specialists-C6s3U6tX.js} +21 -7
  30. package/dist/dashboard/specialists-C6s3U6tX.js.map +1 -0
  31. package/dist/dashboard/{specialists-B4aDa5xP.js → specialists-Cny632-T.js} +1 -1
  32. package/dist/dashboard/{test-agent-queue-C0WrVdrJ.js → test-agent-queue-tqI4VDsu.js} +3 -3
  33. package/dist/dashboard/{test-agent-queue-C0WrVdrJ.js.map → test-agent-queue-tqI4VDsu.js.map} +1 -1
  34. package/dist/dashboard/workflows-B2ARUpOa.js +2 -0
  35. package/dist/dashboard/{workflows-Cj6tzch6.js → workflows-N1UTipYl.js} +3 -3
  36. package/dist/dashboard/{workflows-Cj6tzch6.js.map → workflows-N1UTipYl.js.map} +1 -1
  37. package/dist/{merge-agent-BCPyotWG.js → merge-agent-VQH9z9t8.js} +2 -2
  38. package/dist/{merge-agent-BCPyotWG.js.map → merge-agent-VQH9z9t8.js.map} +1 -1
  39. package/dist/{review-status-p_HOugvo.js → review-status-2TdtHNcs.js} +1 -1
  40. package/dist/{review-status-BbY22dtx.js → review-status-Bm1bWNEa.js} +2 -2
  41. package/dist/{review-status-BbY22dtx.js.map → review-status-Bm1bWNEa.js.map} +1 -1
  42. package/dist/{specialist-context-CRBBW-z5.js → specialist-context-BdNFsfMG.js} +2 -2
  43. package/dist/{specialist-context-CRBBW-z5.js.map → specialist-context-BdNFsfMG.js.map} +1 -1
  44. package/dist/{specialist-logs-m0UvPm3F.js → specialist-logs-CLztE_bE.js} +1 -1
  45. package/dist/{specialists-ldNesMhg.js → specialists-DEKqgkxp.js} +21 -7
  46. package/dist/specialists-DEKqgkxp.js.map +1 -0
  47. package/dist/{specialists-DXDDLqoY.js → specialists-aUoUVWsN.js} +1 -1
  48. package/package.json +1 -1
  49. package/scripts/record-cost-event.js +15 -0
  50. package/scripts/record-cost-event.js.map +1 -1
  51. package/scripts/record-cost-event.ts +2 -0
  52. package/scripts/work-agent-stop-hook +26 -0
  53. package/dist/dashboard/projection-cache-Bkzs_90o.js.map +0 -1
  54. package/dist/dashboard/public/assets/index-CjpnhB4Q.css +0 -1
  55. package/dist/dashboard/specialists-C7Fyhq_j.js.map +0 -1
  56. package/dist/dashboard/workflows-BsUDQntr.js +0 -2
  57. package/dist/specialists-ldNesMhg.js.map +0 -1
@@ -1,16 +1,16 @@
1
1
  import { a as __toCommonJS, i as __require, o as __toESM, t as __commonJSMin } from "./chunk-DORXReHP.js";
2
2
  import { d as PROJECT_PRDS_COMPLETED_SUBDIR, f as PROJECT_PRDS_PLANNED_SUBDIR, g as init_paths, l as PROJECT_DOCS_SUBDIR, p as PROJECT_PRDS_SUBDIR, s as PANOPTICON_HOME, t as AGENTS_DIR, u as PROJECT_PRDS_ACTIVE_SUBDIR } from "./paths-COdEvoXR.js";
3
- import { i as initEventStore, n as getEventStore } from "./event-store-OS5jH3Eu.js";
3
+ import { i as initEventStore, n as getEventStore } from "./event-store-O9q0Gweh.js";
4
4
  import { a as MODEL_CAPABILITIES, c as init_model_capabilities, d as jsYaml, i as loadConfig$1, l as resolveModelId, o as MODEL_DEPRECATIONS, r as init_config_yaml, t as getGlobalConfigPath, u as init_js_yaml } from "./config-yaml-DSfYpzN6.js";
5
5
  import { t as require_dist } from "./dist-C667LLmq.js";
6
6
  import { a as findProjectByTeam, h as listProjects, i as findProjectByPath, p as init_projects, r as extractTeamPrefix, s as getIssuePrefix, y as resolveProjectFromIssue } from "./projects-Cq3TWdPS.js";
7
7
  import { i as init_tracker_config, n as getLinearApiKey, r as getRallyConfig, t as getGitHubConfig } from "./tracker-config-CNM_5rEf.js";
8
- import { d as runQualityGates, f as resolveGitHubIssue, l as syncMainIntoWorkspace, p as resolveTrackerType, u as DEFAULT_GATES } from "./merge-agent-CmqR1MFf.js";
9
- import { i as startSharedIssueService, n as init_issue_service_singleton, r as issue_service_singleton_exports, t as getSharedIssueService } from "./issue-service-singleton-0n9hcF71.js";
8
+ import { d as runQualityGates, f as resolveGitHubIssue, l as syncMainIntoWorkspace, p as resolveTrackerType, u as DEFAULT_GATES } from "./merge-agent-twroFuAh.js";
9
+ import { i as startSharedIssueService, n as init_issue_service_singleton, r as issue_service_singleton_exports, t as getSharedIssueService } from "./issue-service-singleton-sb2HkB9f.js";
10
10
  import { r as setPipelineHandler, t as init_pipeline_notifier } from "./pipeline-notifier-DM5AHG5Q.js";
11
11
  import { i as init_database, n as getDatabase, t as closeDatabase } from "./database-C0y0hXBx.js";
12
- import { a as loadReviewStatuses, i as init_review_status, n as clearStuckMergeStatuses, o as saveReviewStatuses, r as getReviewStatus, s as setReviewStatus$1, t as clearReviewStatus } from "./review-status-LQATWF6L.js";
13
- import { At as getSessionFiles, Ct as getUnblockedItems, Dt as readSpecialistHandoffs, Et as init_specialist_handoff_logger, Ft as getPricing, It as init_cost, Mt as normalizeModelName, Nt as parseClaudeSession, O as getTmuxSessionName, Ot as getActiveSessionModel, Pt as calculateCost, Tt as getSpecialistHandoffStats, f as getAllProjectSpecialistStatuses, it as wakeSpecialistOrQueue, j as init_specialists, jt as init_jsonl_parser, kt as getProjectDirs, q as setSessionId, r as checkSpecialistQueue, w as getSessionId, wt as init_task_readiness } from "./specialists-C7Fyhq_j.js";
12
+ import { a as loadReviewStatuses, i as init_review_status, n as clearStuckMergeStatuses, o as saveReviewStatuses, r as getReviewStatus, s as setReviewStatus$1, t as clearReviewStatus } from "./review-status-CV55Tl-n.js";
13
+ import { At as getSessionFiles, Ct as getUnblockedItems, Dt as readSpecialistHandoffs, Et as init_specialist_handoff_logger, Ft as getPricing, It as init_cost, Mt as normalizeModelName, Nt as parseClaudeSession, O as getTmuxSessionName, Ot as getActiveSessionModel, Pt as calculateCost, Tt as getSpecialistHandoffStats, f as getAllProjectSpecialistStatuses, it as wakeSpecialistOrQueue, j as init_specialists, jt as init_jsonl_parser, kt as getProjectDirs, q as setSessionId, r as checkSpecialistQueue, w as getSessionId, wt as init_task_readiness } from "./specialists-C6s3U6tX.js";
14
14
  import { t as getAgentCommand } from "./settings-CuHV-wcv.js";
15
15
  import { a as init_providers, i as getProviderForModel, r as getProviderEnv } from "./providers-Ck2sQd_F.js";
16
16
  import { n as spawnPlanningSession } from "./spawn-planning-session-8FFAqLdK.js";
@@ -1242,7 +1242,7 @@ const ReadModelServiceLive = Layer.effect(ReadModelService, Effect.gen(function*
1242
1242
  yield* Effect.gen(function* () {
1243
1243
  let usedProjectionCache = false;
1244
1244
  try {
1245
- const { getProjectionCache } = yield* Effect.promise(() => import("./projection-cache-Bkzs_90o.js"));
1245
+ const { getProjectionCache } = yield* Effect.promise(() => import("./projection-cache-DQ9zegkK.js"));
1246
1246
  projectionCache = getProjectionCache();
1247
1247
  const cached = projectionCache.load();
1248
1248
  if (cached && cached.sequence > 0) {
@@ -1286,8 +1286,8 @@ const ReadModelServiceLive = Layer.effect(ReadModelService, Effect.gen(function*
1286
1286
  if (!usedProjectionCache) {
1287
1287
  const [{ listRunningAgents, warnOnBareNumericIssueIds }, { getAllSpecialists, getSpecialistState }, { loadReviewStatuses, getReviewStatus }, { computeAgentEnrichment }] = yield* Effect.all([
1288
1288
  Effect.promise(() => import("./agents-BVBVCyat.js")),
1289
- Effect.promise(() => import("./specialists-B4aDa5xP.js")),
1290
- Effect.promise(() => import("./review-status-DqJZDthU.js")),
1289
+ Effect.promise(() => import("./specialists-Cny632-T.js")),
1290
+ Effect.promise(() => import("./review-status-CK3eBGyb.js")),
1291
1291
  Effect.promise(() => import("./agent-enrichment-Cq0P1cNZ.js"))
1292
1292
  ]);
1293
1293
  warnOnBareNumericIssueIds();
@@ -1354,7 +1354,7 @@ const ReadModelServiceLive = Layer.effect(ReadModelService, Effect.gen(function*
1354
1354
  };
1355
1355
  let sequence = 0;
1356
1356
  try {
1357
- const { getEventStore } = yield* Effect.promise(() => import("./event-store-BtuZCLHu.js"));
1357
+ const { getEventStore } = yield* Effect.promise(() => import("./event-store-D7kLBd07.js"));
1358
1358
  sequence = getEventStore().getLatestSequence();
1359
1359
  } catch {}
1360
1360
  state = {
@@ -1368,7 +1368,7 @@ const ReadModelServiceLive = Layer.effect(ReadModelService, Effect.gen(function*
1368
1368
  console.log(`[ReadModel] Bootstrapped: ${Object.keys(agentsById).length} agents, ${Object.keys(specialistsByName).length} specialists, ${Object.keys(reviewStatusByIssueId).length} review statuses, seq=${sequence}`);
1369
1369
  }
1370
1370
  try {
1371
- const { getSharedIssueService } = yield* Effect.promise(() => import("./issue-service-singleton-z78bbRiO.js"));
1371
+ const { getSharedIssueService } = yield* Effect.promise(() => import("./issue-service-singleton-DQK42EqH.js"));
1372
1372
  const issueService = getSharedIssueService();
1373
1373
  const currentIssues = JSON.parse(JSON.stringify(issueService.getIssues()));
1374
1374
  if (currentIssues.length > 0 || !usedProjectionCache) state = {
@@ -1383,7 +1383,7 @@ const ReadModelServiceLive = Layer.effect(ReadModelService, Effect.gen(function*
1383
1383
  };
1384
1384
  projectionCache?.save(buildSnapshot());
1385
1385
  try {
1386
- if (!_cachedEventStore) import("./event-store-BtuZCLHu.js").then(({ getEventStore }) => {
1386
+ if (!_cachedEventStore) import("./event-store-D7kLBd07.js").then(({ getEventStore }) => {
1387
1387
  _cachedEventStore = getEventStore();
1388
1388
  try {
1389
1389
  _cachedEventStore.append({
@@ -2212,16 +2212,16 @@ const RallyClientLive = Layer.effect(RallyClient, Effect.gen(function* () {
2212
2212
  /**
2213
2213
  * Layer that provides a no-op RallyClient when Rally is not configured.
2214
2214
  */
2215
- const RallyClientOptionalLive = Layer.effect(RallyClient, Effect.gen(function* () {
2215
+ const RallyClientOptionalLive = Layer.unwrap(Effect.gen(function* () {
2216
2216
  if (!getRallyConfig()) {
2217
2217
  const fail = Effect.fail(new TrackerNotConfigured({ tracker: "rally" }));
2218
- return {
2218
+ return Layer.succeed(RallyClient, {
2219
2219
  getIssue: () => fail,
2220
2220
  updateState: () => fail,
2221
2221
  addComment: () => fail
2222
- };
2222
+ });
2223
2223
  }
2224
- return yield* RallyClient.pipe(Effect.provide(RallyClientLive));
2224
+ return RallyClientLive;
2225
2225
  }));
2226
2226
  //#endregion
2227
2227
  //#region services/issue-lifecycle.ts
@@ -2524,7 +2524,7 @@ const AgentSpawnerLive = Layer.effect(AgentSpawner, Effect.sync(() => ({
2524
2524
  }),
2525
2525
  deepWipe: (issueId, opts) => Effect.tryPromise({
2526
2526
  try: async () => {
2527
- const { deepWipe } = await import("./workflows-BsUDQntr.js");
2527
+ const { deepWipe } = await import("./workflows-B2ARUpOa.js");
2528
2528
  const { resolveProjectFromIssue } = await import("./projects-DyT3vSy-.js");
2529
2529
  const project = resolveProjectFromIssue(issueId);
2530
2530
  await deepWipe({
@@ -8188,8 +8188,7 @@ function extractCostEvents(content, agentId, issueId, sessionType, sessionId) {
8188
8188
  try {
8189
8189
  const entry = JSON.parse(line);
8190
8190
  if (entry.type !== "assistant" || !entry.message?.usage) continue;
8191
- const requestId = entry.requestId;
8192
- if (!requestId) continue;
8191
+ const requestId = entry.requestId ?? void 0;
8193
8192
  const usage = entry.message.usage;
8194
8193
  const model = entry.message.model || "claude-sonnet-4";
8195
8194
  const inputTokens = usage.input_tokens || 0;
@@ -8201,6 +8200,7 @@ function extractCostEvents(content, agentId, issueId, sessionType, sessionId) {
8201
8200
  if (model.includes("gpt")) provider = "openai";
8202
8201
  else if (model.includes("gemini")) provider = "google";
8203
8202
  else if (model.includes("kimi")) provider = "custom";
8203
+ else if (model.toLowerCase().startsWith("minimax")) provider = "custom";
8204
8204
  const pricing = getPricing(provider, model);
8205
8205
  if (!pricing) continue;
8206
8206
  const cost = calculateCost({
@@ -8712,7 +8712,7 @@ const postIssueCloseRoute = HttpRouter.add("POST", "/api/issues/:issueId/close",
8712
8712
  const { reason } = body;
8713
8713
  const issuePrefix = issueId.split("-")[0];
8714
8714
  const projectPath = getProjectPath$4(void 0, issuePrefix);
8715
- const { close: closeWorkflow } = yield* Effect.promise(() => import("./lifecycle-B6d3AE3n.js"));
8715
+ const { close: closeWorkflow } = yield* Effect.promise(() => import("./lifecycle-ZTYdrr2O.js"));
8716
8716
  const githubCheck = isGitHubIssue$1(issueId);
8717
8717
  const issueDataService = getIssueDataService$3();
8718
8718
  const issueSource = issueDataService.getIssueSource(issueId);
@@ -9401,7 +9401,7 @@ const postIssueCancelRoute = HttpRouter.add("POST", "/api/issues/:id/cancel", ht
9401
9401
  });
9402
9402
  if (wipeWorkspace) yield* Effect.promise(async () => {
9403
9403
  try {
9404
- const { deepWipe } = await import("./lifecycle-B6d3AE3n.js");
9404
+ const { deepWipe } = await import("./lifecycle-ZTYdrr2O.js");
9405
9405
  const issuePrefix = extractTeamPrefix(id);
9406
9406
  const projectPath = getProjectPath$4(void 0, issuePrefix);
9407
9407
  const projectConfig = findProjectByTeam(issuePrefix);
@@ -9503,7 +9503,7 @@ const postIssueReopenRoute = HttpRouter.add("POST", "/api/issues/:id/reopen", ht
9503
9503
  yield* Effect.promise(async () => {
9504
9504
  try {
9505
9505
  clearReviewStatus(id.toUpperCase());
9506
- const { checkSpecialistQueue, completeSpecialistTask } = await import("./specialists-B4aDa5xP.js");
9506
+ const { checkSpecialistQueue, completeSpecialistTask } = await import("./specialists-Cny632-T.js");
9507
9507
  for (const specialist of [
9508
9508
  "review-agent",
9509
9509
  "test-agent",
@@ -9514,7 +9514,7 @@ const postIssueReopenRoute = HttpRouter.add("POST", "/api/issues/:id/reopen", ht
9514
9514
  }
9515
9515
  } catch {}
9516
9516
  try {
9517
- const { resetPostMergeState } = await import("./merge-agent-DaIEvGJG.js");
9517
+ const { resetPostMergeState } = await import("./merge-agent-GLtMEsTu.js");
9518
9518
  resetPostMergeState(id);
9519
9519
  resetPostMergeState(id.toUpperCase());
9520
9520
  } catch {}
@@ -9730,7 +9730,7 @@ const postIssueDeepWipeRoute = HttpRouter.add("POST", "/api/issues/:id/deep-wipe
9730
9730
  const body = yield* readJsonBody$9;
9731
9731
  const eventStore = yield* EventStoreService;
9732
9732
  const { deleteWorkspace = false } = body || {};
9733
- const { deepWipe } = yield* Effect.promise(() => import("./lifecycle-B6d3AE3n.js"));
9733
+ const { deepWipe } = yield* Effect.promise(() => import("./lifecycle-ZTYdrr2O.js"));
9734
9734
  const githubCheck = isGitHubIssue$1(id);
9735
9735
  let projectPath = "";
9736
9736
  let projectName = "";
@@ -9831,7 +9831,7 @@ const postIssueDeepWipeRoute = HttpRouter.add("POST", "/api/issues/:id/deep-wipe
9831
9831
  const postIssueCloseOutRoute = HttpRouter.add("POST", "/api/issues/:id/close-out", httpHandler(Effect.gen(function* () {
9832
9832
  const id = (yield* HttpRouter.params)["id"] ?? "";
9833
9833
  const eventStore = yield* EventStoreService;
9834
- const { closeOut } = yield* Effect.promise(() => import("./lifecycle-B6d3AE3n.js"));
9834
+ const { closeOut } = yield* Effect.promise(() => import("./lifecycle-ZTYdrr2O.js"));
9835
9835
  const githubCheck = isGitHubIssue$1(id);
9836
9836
  let projectPath = "";
9837
9837
  if (githubCheck.isGitHub && githubCheck.owner && githubCheck.repo) projectPath = getGitHubLocalPaths$1()[`${githubCheck.owner}/${githubCheck.repo}`] || "";
@@ -12144,7 +12144,7 @@ async function checkOrphanedReviewStatuses() {
12144
12144
  const { resolveProjectFromIssue } = await import("./projects-DyT3vSy-.js");
12145
12145
  const resolved = resolveProjectFromIssue(issueId);
12146
12146
  if (resolved) {
12147
- const { spawnEphemeralSpecialist } = await import("./specialists-B4aDa5xP.js");
12147
+ const { spawnEphemeralSpecialist } = await import("./specialists-Cny632-T.js");
12148
12148
  const result = await spawnEphemeralSpecialist(resolved.projectKey, "review-agent", {
12149
12149
  issueId,
12150
12150
  workspace,
@@ -12157,7 +12157,7 @@ async function checkOrphanedReviewStatuses() {
12157
12157
  actions.push(`Re-dispatched pending review for ${issueId} via ${resolved.projectKey}/review-agent (deacon-orphan-recovery)`);
12158
12158
  console.log(`[deacon] Re-dispatched review for ${issueId} after orphan/pending detection (project: ${resolved.projectKey})`);
12159
12159
  } else if (result.error === "specialist_busy") {
12160
- const { submitToSpecialistQueue } = await import("./specialists-B4aDa5xP.js");
12160
+ const { submitToSpecialistQueue } = await import("./specialists-Cny632-T.js");
12161
12161
  submitToSpecialistQueue("review-agent", {
12162
12162
  priority: "high",
12163
12163
  source: "deacon-orphan-recovery",
@@ -12198,7 +12198,7 @@ async function checkOrphanedReviewStatuses() {
12198
12198
  const { resolveProjectFromIssue } = await import("./projects-DyT3vSy-.js");
12199
12199
  const resolved = resolveProjectFromIssue(issueId);
12200
12200
  if (resolved) {
12201
- const { spawnEphemeralSpecialist } = await import("./specialists-B4aDa5xP.js");
12201
+ const { spawnEphemeralSpecialist } = await import("./specialists-Cny632-T.js");
12202
12202
  const result = await spawnEphemeralSpecialist(resolved.projectKey, "test-agent", {
12203
12203
  issueId,
12204
12204
  workspace,
@@ -12210,7 +12210,7 @@ async function checkOrphanedReviewStatuses() {
12210
12210
  actions.push(`Re-dispatched orphaned test for ${issueId} via ${resolved.projectKey}/test-agent (deacon-orphan-recovery)`);
12211
12211
  console.log(`[deacon] Re-dispatched test for ${issueId} after orphan detection (project: ${resolved.projectKey})`);
12212
12212
  } else if (result.error === "specialist_busy") {
12213
- const { submitToSpecialistQueue } = await import("./specialists-B4aDa5xP.js");
12213
+ const { submitToSpecialistQueue } = await import("./specialists-Cny632-T.js");
12214
12214
  submitToSpecialistQueue("test-agent", {
12215
12215
  priority: "high",
12216
12216
  source: "deacon-orphan-recovery",
@@ -12579,7 +12579,7 @@ async function patrolWorkAgentResolutions() {
12579
12579
  async function checkSpecialistQueues() {
12580
12580
  const actions = [];
12581
12581
  try {
12582
- const { checkSpecialistQueue, spawnEphemeralSpecialist, getTmuxSessionName, isRunning } = await import("./specialists-B4aDa5xP.js");
12582
+ const { checkSpecialistQueue, spawnEphemeralSpecialist, getTmuxSessionName, isRunning } = await import("./specialists-Cny632-T.js");
12583
12583
  const { getAgentRuntimeState } = await import("./agents-BVBVCyat.js");
12584
12584
  const { resolveProjectFromIssue } = await import("./projects-DyT3vSy-.js");
12585
12585
  for (const specialistType of [
@@ -12761,7 +12761,7 @@ async function runPatrol() {
12761
12761
  statuses[issueId].mergeStatus = "merged";
12762
12762
  statuses[issueId].readyForMerge = false;
12763
12763
  writeFileSync(REVIEW_STATUS_FILE, JSON.stringify(statuses, null, 2), "utf-8");
12764
- const { postMergeLifecycle } = await import("./merge-agent-DaIEvGJG.js");
12764
+ const { postMergeLifecycle } = await import("./merge-agent-GLtMEsTu.js");
12765
12765
  postMergeLifecycle(issueId, resolved.projectPath).catch((err) => console.warn(`[deacon] postMergeLifecycle failed for ${issueId}: ${err}`));
12766
12766
  actions.push(`Auto-completed stale merge for ${issueId}`);
12767
12767
  } else {
@@ -13019,7 +13019,7 @@ var CloisterService = class {
13019
13019
  }
13020
13020
  try {
13021
13021
  if (existsSync(AGENTS_DIR)) {
13022
- const { isRunning: isSpecialistRunning } = await import("./specialists-B4aDa5xP.js");
13022
+ const { isRunning: isSpecialistRunning } = await import("./specialists-Cny632-T.js");
13023
13023
  const specialistPattern = /^specialist-(.+)-(review-agent|test-agent|merge-agent)$/;
13024
13024
  const entries = readdirSync(AGENTS_DIR, { withFileTypes: true });
13025
13025
  for (const entry of entries) {
@@ -13051,7 +13051,7 @@ var CloisterService = class {
13051
13051
  try {
13052
13052
  const reviewStatuses = loadReviewStatuses();
13053
13053
  const { resolveProjectFromIssue } = await import("./projects-DyT3vSy-.js");
13054
- const { submitToSpecialistQueue, getTmuxSessionName, getAllProjectSpecialistStatuses } = await import("./specialists-B4aDa5xP.js");
13054
+ const { submitToSpecialistQueue, getTmuxSessionName, getAllProjectSpecialistStatuses } = await import("./specialists-Cny632-T.js");
13055
13055
  const activeReviewIssues = /* @__PURE__ */ new Set();
13056
13056
  try {
13057
13057
  const projSpecs = await getAllProjectSpecialistStatuses();
@@ -13275,7 +13275,7 @@ var CloisterService = class {
13275
13275
  const retryCount = this.processedCompletions.get(dir.name) || 0;
13276
13276
  if (retryCount >= 3) continue;
13277
13277
  const issueId = dir.name.replace("agent-", "").toUpperCase();
13278
- const { getReviewStatus } = await import("./review-status-DqJZDthU.js");
13278
+ const { getReviewStatus } = await import("./review-status-CK3eBGyb.js");
13279
13279
  const existingReview = getReviewStatus(issueId);
13280
13280
  if (existingReview && ["reviewing", "passed"].includes(existingReview.reviewStatus || "")) {
13281
13281
  console.log(`🔔 Cloister: Completion marker for ${issueId} — review already ${existingReview.reviewStatus}, marking processed`);
@@ -16826,7 +16826,7 @@ const postWorkspaceReviewStatusRoute = HttpRouter.add("POST", "/api/workspaces/:
16826
16826
  if (testNotes) update.testNotes = testNotes;
16827
16827
  const status = setReviewStatus(issueId, update);
16828
16828
  console.log(`[review-status] Updated ${issueId}:`, status);
16829
- const { getTmuxSessionName, checkSpecialistQueue: cSQ, completeSpecialistTask } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
16829
+ const { getTmuxSessionName, checkSpecialistQueue: cSQ, completeSpecialistTask } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
16830
16830
  const projectKey = resolveProjectFromIssue(issueId)?.projectKey;
16831
16831
  if (reviewStatus && [
16832
16832
  "passed",
@@ -16884,7 +16884,7 @@ const postWorkspaceReviewStatusRoute = HttpRouter.add("POST", "/api/workspaces/:
16884
16884
  const projectPath = getProjectPath$2(void 0, issuePrefix);
16885
16885
  const testWorkspace = body.workspace || join$1(projectPath, "workspaces", `feature-${issueLower}`);
16886
16886
  const testBranch = body.branch || `feature/${issueLower}`;
16887
- const { autoQueueTestAgentAndNotify } = yield* Effect.promise(() => import("./test-agent-queue-C0WrVdrJ.js"));
16887
+ const { autoQueueTestAgentAndNotify } = yield* Effect.promise(() => import("./test-agent-queue-tqI4VDsu.js"));
16888
16888
  try {
16889
16889
  yield* Effect.promise(() => autoQueueTestAgentAndNotify(issueId, testWorkspace, testBranch, messageAgent));
16890
16890
  yield* Effect.promise(() => Effect.runPromise(eventStore.append({
@@ -17090,7 +17090,7 @@ const postWorkspaceReviewRoute = HttpRouter.add("POST", "/api/workspaces/:issueI
17090
17090
  });
17091
17091
  return;
17092
17092
  }
17093
- const { spawnEphemeralSpecialist: spawnEphemeral, isRunning, getTmuxSessionName, submitToSpecialistQueue } = await import("./specialists-B4aDa5xP.js");
17093
+ const { spawnEphemeralSpecialist: spawnEphemeral, isRunning, getTmuxSessionName, submitToSpecialistQueue } = await import("./specialists-Cny632-T.js");
17094
17094
  const reviewProjectKey = resolveProjectFromIssue(issueId)?.projectKey ?? null;
17095
17095
  const reviewSession = getTmuxSessionName("review-agent", reviewProjectKey ?? void 0);
17096
17096
  const reviewRunning = await isRunning("review-agent", reviewProjectKey ?? void 0);
@@ -17175,7 +17175,7 @@ ${workspaceAccessInstructions}
17175
17175
  if (!reviewResult.success) {
17176
17176
  if (reviewResult.error === "specialist_busy") {
17177
17177
  console.log(`[review] review-agent busy for ${issueId} — queuing for deacon dispatch`);
17178
- const { submitToSpecialistQueue } = await import("./specialists-B4aDa5xP.js");
17178
+ const { submitToSpecialistQueue } = await import("./specialists-Cny632-T.js");
17179
17179
  submitToSpecialistQueue("review-agent", {
17180
17180
  priority: "high",
17181
17181
  source: "review-pipeline",
@@ -17243,7 +17243,7 @@ const postWorkspaceRequestReviewRoute = HttpRouter.add("POST", "/api/workspaces/
17243
17243
  const workspacePath = join$1(resolved.projectPath, "workspaces", `feature-${issueId.toLowerCase()}`);
17244
17244
  const branchName = `feature/${issueId.toLowerCase()}`;
17245
17245
  setReviewStatus(issueId, { testStatus: "testing" });
17246
- const { spawnEphemeralSpecialist } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
17246
+ const { spawnEphemeralSpecialist } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
17247
17247
  const testResult = yield* Effect.promise(() => spawnEphemeralSpecialist(resolved.projectKey, "test-agent", {
17248
17248
  issueId,
17249
17249
  workspace: workspacePath,
@@ -17325,7 +17325,7 @@ const postWorkspaceRequestReviewRoute = HttpRouter.add("POST", "/api/workspaces/
17325
17325
  });
17326
17326
  console.log(`[request-review] Agent requested re-review for ${issueId} (${newCount}/${MAX_AUTO_REQUEUE})${workspaceInfo.isRemote ? ` (remote: ${workspaceInfo.vmName})` : ""}`);
17327
17327
  try {
17328
- const { spawnEphemeralSpecialist } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
17328
+ const { spawnEphemeralSpecialist } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
17329
17329
  const resolved = resolveProjectFromIssue(issueId);
17330
17330
  if (!resolved) return jsonResponse({
17331
17331
  success: false,
@@ -17354,7 +17354,7 @@ const postWorkspaceRequestReviewRoute = HttpRouter.add("POST", "/api/workspaces/
17354
17354
  });
17355
17355
  } else if (result.error === "specialist_busy") {
17356
17356
  console.log(`[request-review] Review specialist busy for ${issueId} — queuing for deacon dispatch`);
17357
- const { submitToSpecialistQueue } = yield* Effect.promise(async () => import("./specialists-B4aDa5xP.js"));
17357
+ const { submitToSpecialistQueue } = yield* Effect.promise(async () => import("./specialists-Cny632-T.js"));
17358
17358
  submitToSpecialistQueue("review-agent", {
17359
17359
  priority: "high",
17360
17360
  source: "request-review",
@@ -17402,7 +17402,7 @@ const postWorkspaceResetReviewRoute = HttpRouter.add("POST", "/api/workspaces/:i
17402
17402
  error: "Workspace does not exist"
17403
17403
  }, { status: 400 });
17404
17404
  console.log(`[reset-review] Human-initiated pipeline reset for ${issueId}`);
17405
- const { checkSpecialistQueue: cSQ, completeSpecialistTask } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
17405
+ const { checkSpecialistQueue: cSQ, completeSpecialistTask } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
17406
17406
  for (const specialist of [
17407
17407
  "review-agent",
17408
17408
  "test-agent",
@@ -17428,13 +17428,13 @@ const postWorkspaceResetReviewRoute = HttpRouter.add("POST", "/api/workspaces/:i
17428
17428
  verificationCycleCount: 0
17429
17429
  });
17430
17430
  try {
17431
- const { resetPostMergeState } = yield* Effect.promise(() => import("./merge-agent-DaIEvGJG.js"));
17431
+ const { resetPostMergeState } = yield* Effect.promise(() => import("./merge-agent-GLtMEsTu.js"));
17432
17432
  resetPostMergeState(issueId);
17433
17433
  } catch {}
17434
17434
  console.log(`[reset-review] Pipeline state reset for ${issueId} — awaiting agent to request review`);
17435
17435
  const rerun = body?.rerun === true;
17436
17436
  if (rerun) try {
17437
- const { dispatchToSpecialist } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
17437
+ const { dispatchToSpecialist } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
17438
17438
  const resolved = resolveProjectFromIssue(issueId);
17439
17439
  if (resolved) {
17440
17440
  const wsInfo = getWorkspaceInfoForIssue(issueId);
@@ -17597,7 +17597,7 @@ async function triggerMerge(issueId) {
17597
17597
  readyForMerge: false
17598
17598
  });
17599
17599
  completePendingOperation(issueId, null);
17600
- const { postMergeLifecycle } = await import("./merge-agent-DaIEvGJG.js");
17600
+ const { postMergeLifecycle } = await import("./merge-agent-GLtMEsTu.js");
17601
17601
  await postMergeLifecycle(issueId, projectPath);
17602
17602
  return {
17603
17603
  success: true,
@@ -17671,7 +17671,7 @@ async function triggerMerge(issueId) {
17671
17671
  console.log(`[merge] Push note for ${repo.name}: ${pushErr.message}`);
17672
17672
  }
17673
17673
  try {
17674
- const { spawnMergeAgentForBranches } = await import("./merge-agent-DaIEvGJG.js");
17674
+ const { spawnMergeAgentForBranches } = await import("./merge-agent-GLtMEsTu.js");
17675
17675
  const mergeResult = await spawnMergeAgentForBranches(repoMainPath, branchName, defaultBranch, issueId, { skipDoneReport: true });
17676
17676
  if (mergeResult.success) mergeResults.push({
17677
17677
  repo: repo.name,
@@ -17712,7 +17712,7 @@ async function triggerMerge(issueId) {
17712
17712
  readyForMerge: false
17713
17713
  });
17714
17714
  completePendingOperation(issueId, null);
17715
- const { postMergeLifecycle } = await import("./merge-agent-DaIEvGJG.js");
17715
+ const { postMergeLifecycle } = await import("./merge-agent-GLtMEsTu.js");
17716
17716
  await postMergeLifecycle(issueId, projectPath);
17717
17717
  return {
17718
17718
  success: true,
@@ -17747,7 +17747,7 @@ async function triggerMerge(issueId) {
17747
17747
  };
17748
17748
  }
17749
17749
  const prNumber = prMatch[1];
17750
- const { spawnRebaseAgentForBranch, postMergeLifecycle } = await import("./merge-agent-DaIEvGJG.js");
17750
+ const { spawnRebaseAgentForBranch, postMergeLifecycle } = await import("./merge-agent-GLtMEsTu.js");
17751
17751
  console.log(`[merge] Rebasing ${branchName} onto main for ${issueId}...`);
17752
17752
  const rebaseResult = await spawnRebaseAgentForBranch(workspacePath, branchName, "main", issueId);
17753
17753
  if (!rebaseResult.success) {
@@ -17883,7 +17883,7 @@ const postWorkspaceApproveRoute = HttpRouter.add("POST", "/api/workspaces/:issue
17883
17883
  completePendingOperation(issueId, error);
17884
17884
  return jsonResponse({ error }, { status: 400 });
17885
17885
  }
17886
- const { wakeSpecialist, spawnEphemeralSpecialist: spawnApproveEphemeral } = await import("./specialists-B4aDa5xP.js");
17886
+ const { wakeSpecialist, spawnEphemeralSpecialist: spawnApproveEphemeral } = await import("./specialists-Cny632-T.js");
17887
17887
  const approveProjectKey = resolveProjectFromIssue(issueId)?.projectKey ?? null;
17888
17888
  console.log(`[approve] Starting specialist pipeline for ${issueId}...`);
17889
17889
  const pipelinePrompt = `STRICT REVIEW WORKFLOW for ${issueId}
@@ -17962,7 +17962,7 @@ curl -X POST http://localhost:${PORT}/api/specialists/test-agent/queue -H "Conte
17962
17962
  }
17963
17963
  console.log(`[approve] Step 3/3: Waking merge-agent for ${issueId}...`);
17964
17964
  try {
17965
- const { spawnMergeAgentForBranches } = await import("./merge-agent-DaIEvGJG.js");
17965
+ const { spawnMergeAgentForBranches } = await import("./merge-agent-GLtMEsTu.js");
17966
17966
  const mergeResult = await spawnMergeAgentForBranches(projectPath, branchName, "main", issueId);
17967
17967
  if (mergeResult.success && mergeResult.testsStatus === "PASS") console.log(`merge-agent successfully merged ${issueId}`);
17968
17968
  else if (mergeResult.success && mergeResult.testsStatus === "SKIP") console.log(`merge-agent merged ${issueId} (tests skipped)`);
@@ -18020,7 +18020,7 @@ curl -X POST http://localhost:${PORT}/api/specialists/test-agent/queue -H "Conte
18020
18020
  completePendingOperation(issueId, error);
18021
18021
  return jsonResponse({ error }, { status: 400 });
18022
18022
  }
18023
- const { approve: lifecycleApprove } = await import("./lifecycle-B6d3AE3n.js");
18023
+ const { approve: lifecycleApprove } = await import("./lifecycle-ZTYdrr2O.js");
18024
18024
  const ghResolved = resolveGitHubIssue(issueId);
18025
18025
  const isGitHubIssueFlag = ghResolved.isGitHub;
18026
18026
  const lifecycleResult = await lifecycleApprove({
@@ -18170,7 +18170,7 @@ function firePostMergeLifecycle(issueId) {
18170
18170
  _postMergeInFlight.add(issueId);
18171
18171
  (async () => {
18172
18172
  try {
18173
- const { postMergeLifecycle } = await import("./merge-agent-DaIEvGJG.js");
18173
+ const { postMergeLifecycle } = await import("./merge-agent-GLtMEsTu.js");
18174
18174
  await postMergeLifecycle(issueId, projectPath);
18175
18175
  console.log(`[merge] post-merge lifecycle completed for ${issueId}`);
18176
18176
  } catch (err) {
@@ -18186,14 +18186,14 @@ function getProjectPathForIssue(issuePrefix) {
18186
18186
  return join$1(homedir(), "Projects");
18187
18187
  }
18188
18188
  const getSpecialistsRoute = HttpRouter.add("GET", "/api/specialists", httpHandler(Effect.gen(function* () {
18189
- const { getAllSpecialistStatus, getAllProjectSpecialistStatuses } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18189
+ const { getAllSpecialistStatus, getAllProjectSpecialistStatuses } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18190
18190
  return jsonResponse({
18191
18191
  specialists: yield* Effect.promise(() => getAllSpecialistStatus()),
18192
18192
  projects: yield* Effect.promise(() => getAllProjectSpecialistStatuses())
18193
18193
  });
18194
18194
  })));
18195
18195
  const postSpecialistsResetAllRoute = HttpRouter.add("POST", "/api/specialists/reset-all", httpHandler(Effect.gen(function* () {
18196
- const { getAllSpecialists, clearSessionId, isRunning, getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18196
+ const { getAllSpecialists, clearSessionId, isRunning, getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18197
18197
  const { clearHook } = yield* Effect.promise(() => import("./hooks-CKhs3N68.js"));
18198
18198
  const specialists = getAllSpecialists();
18199
18199
  const results = [];
@@ -18285,7 +18285,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
18285
18285
  const updatedStatus = setReviewStatus$1(normalizedIssueId, update);
18286
18286
  yield* Effect.promise(async () => {
18287
18287
  try {
18288
- const { getTmuxSessionName, checkSpecialistQueue, completeSpecialistTask } = await import("./specialists-B4aDa5xP.js");
18288
+ const { getTmuxSessionName, checkSpecialistQueue, completeSpecialistTask } = await import("./specialists-Cny632-T.js");
18289
18289
  saveAgentRuntimeState(getTmuxSessionName(`${specialist}-agent`), {
18290
18290
  state: "idle",
18291
18291
  lastActivity: (/* @__PURE__ */ new Date()).toISOString()
@@ -18318,7 +18318,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
18318
18318
  });
18319
18319
  if (specialist === "inspect" && status === "passed") yield* Effect.promise(async () => {
18320
18320
  try {
18321
- const { onInspectComplete } = await import("./inspect-agent-CwT4mrvV.js");
18321
+ const { onInspectComplete } = await import("./inspect-agent-B57kGDUV.js");
18322
18322
  const beadId = (notes?.match(/[Bb]ead\s+(\S+)/))?.[1] || "unknown";
18323
18323
  const project = resolveProjectFromIssue(normalizedIssueId);
18324
18324
  if (project) {
@@ -18442,7 +18442,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
18442
18442
  });
18443
18443
  })));
18444
18444
  const postSpecialistsLogsCleanupAllRoute = HttpRouter.add("POST", "/api/specialists/logs/cleanup-all", httpHandler(Effect.gen(function* () {
18445
- const { cleanupAllLogs } = yield* Effect.promise(() => import("./specialist-logs-BvOQ3XPt.js"));
18445
+ const { cleanupAllLogs } = yield* Effect.promise(() => import("./specialist-logs-BhmDpFIq.js"));
18446
18446
  const results = cleanupAllLogs();
18447
18447
  return jsonResponse({
18448
18448
  success: true,
@@ -18452,7 +18452,7 @@ const postSpecialistsLogsCleanupAllRoute = HttpRouter.add("POST", "/api/speciali
18452
18452
  });
18453
18453
  })));
18454
18454
  const getSpecialistQueuesRoute = HttpRouter.add("GET", "/api/specialists/queues", httpHandler(Effect.gen(function* () {
18455
- const { getAllSpecialists, checkSpecialistQueue } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18455
+ const { getAllSpecialists, checkSpecialistQueue } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18456
18456
  return jsonResponse({ queues: getAllSpecialists().map((specialist) => {
18457
18457
  const queue = checkSpecialistQueue(specialist.name);
18458
18458
  return {
@@ -18465,14 +18465,14 @@ const getSpecialistQueuesRoute = HttpRouter.add("GET", "/api/specialists/queues"
18465
18465
  }) });
18466
18466
  })));
18467
18467
  const getSpecialistsProjectsRoute = HttpRouter.add("GET", "/api/specialists/projects", httpHandler(Effect.gen(function* () {
18468
- const { getAllProjectSpecialistStatuses } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18468
+ const { getAllProjectSpecialistStatuses } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18469
18469
  return jsonResponse(yield* Effect.promise(() => getAllProjectSpecialistStatuses()));
18470
18470
  })));
18471
18471
  const postSpecialistWakeRoute = HttpRouter.add("POST", "/api/specialists/:name/wake", httpHandler(Effect.gen(function* () {
18472
18472
  const name = (yield* HttpRouter.params)["name"];
18473
18473
  const { sessionId } = yield* readJsonBody$6;
18474
18474
  const eventStore = yield* EventStoreService;
18475
- const { getTmuxSessionName, getSessionId, recordWake, isRunning } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18475
+ const { getTmuxSessionName, getSessionId, recordWake, isRunning } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18476
18476
  if (yield* Effect.promise(() => isRunning(name))) return jsonResponse({ error: `Specialist ${name} is already running` }, { status: 400 });
18477
18477
  const existingSessionId = getSessionId(name);
18478
18478
  const tmuxSession = getTmuxSessionName(name);
@@ -18508,7 +18508,7 @@ const postSpecialistWakeRoute = HttpRouter.add("POST", "/api/specialists/:name/w
18508
18508
  const postSpecialistResetRoute = HttpRouter.add("POST", "/api/specialists/:name/reset", httpHandler(Effect.gen(function* () {
18509
18509
  const name = (yield* HttpRouter.params)["name"];
18510
18510
  const { reinitialize = false } = yield* readJsonBody$6;
18511
- const { clearSessionId, isRunning, getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18511
+ const { clearSessionId, isRunning, getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18512
18512
  if (yield* Effect.promise(() => isRunning(name))) return jsonResponse({ error: `Specialist ${name} is currently running. Stop it first (tmux kill-session -t ${getTmuxSessionName(name)})` }, { status: 400 });
18513
18513
  const wasDeleted = clearSessionId(name);
18514
18514
  if (reinitialize) {}
@@ -18520,7 +18520,7 @@ const postSpecialistResetRoute = HttpRouter.add("POST", "/api/specialists/:name/
18520
18520
  })));
18521
18521
  const postSpecialistInitRoute = HttpRouter.add("POST", "/api/specialists/:name/init", httpHandler(Effect.gen(function* () {
18522
18522
  const name = (yield* HttpRouter.params)["name"];
18523
- const { initializeSpecialist } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18523
+ const { initializeSpecialist } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18524
18524
  const result = yield* Effect.promise(() => initializeSpecialist(name));
18525
18525
  if (!result.success) return jsonResponse({ error: result.message }, { status: 400 });
18526
18526
  return jsonResponse({
@@ -18559,7 +18559,7 @@ const postSpecialistReportStatusRoute = HttpRouter.add("POST", "/api/specialists
18559
18559
  "blocked",
18560
18560
  "failed"
18561
18561
  ].includes(status)) {
18562
- const { getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18562
+ const { getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18563
18563
  saveAgentRuntimeState(getTmuxSessionName(name), {
18564
18564
  state: "idle",
18565
18565
  lastActivity: (/* @__PURE__ */ new Date()).toISOString()
@@ -18586,7 +18586,7 @@ const postSpecialistReportStatusRoute = HttpRouter.add("POST", "/api/specialists
18586
18586
  })));
18587
18587
  const getSpecialistCostRoute = HttpRouter.add("GET", "/api/specialists/:name/cost", httpHandler(Effect.gen(function* () {
18588
18588
  const name = (yield* HttpRouter.params)["name"];
18589
- const { getSessionId } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18589
+ const { getSessionId } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18590
18590
  const sessionId = getSessionId(name);
18591
18591
  if (!sessionId) return jsonResponse({
18592
18592
  cost: 0,
@@ -18641,7 +18641,7 @@ const getSpecialistCostRoute = HttpRouter.add("GET", "/api/specialists/:name/cos
18641
18641
  const getSpecialistQueueRoute = HttpRouter.add("GET", "/api/specialists/:name/queue", httpHandler(Effect.gen(function* () {
18642
18642
  const name = (yield* HttpRouter.params)["name"];
18643
18643
  if (!VALID_SPECIALIST_NAMES.includes(name)) return jsonResponse({ error: `Invalid specialist name: ${name}` }, { status: 400 });
18644
- const { checkSpecialistQueue } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18644
+ const { checkSpecialistQueue } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18645
18645
  const queue = checkSpecialistQueue(name);
18646
18646
  return jsonResponse({
18647
18647
  specialistName: name,
@@ -18656,7 +18656,7 @@ const postSpecialistQueueRoute = HttpRouter.add("POST", "/api/specialists/:name/
18656
18656
  const { issueId, workspace, branch, customPrompt, priority = "normal" } = yield* readJsonBody$6;
18657
18657
  if (!VALID_SPECIALIST_NAMES.includes(name)) return jsonResponse({ error: `Invalid specialist name: ${name}` }, { status: 400 });
18658
18658
  if (!issueId) return jsonResponse({ error: "issueId is required" }, { status: 400 });
18659
- const { spawnEphemeralSpecialist, submitToSpecialistQueue } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18659
+ const { spawnEphemeralSpecialist, submitToSpecialistQueue } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18660
18660
  const resolved = resolveProjectFromIssue(issueId);
18661
18661
  if (!resolved) return jsonResponse({ error: `No project configured for ${issueId}. Add it to projects.yaml.` }, { status: 400 });
18662
18662
  const result = yield* Effect.promise(() => spawnEphemeralSpecialist(resolved.projectKey, name, {
@@ -18690,7 +18690,7 @@ const deleteSpecialistQueueItemRoute = HttpRouter.add("DELETE", "/api/specialist
18690
18690
  const name = params["name"];
18691
18691
  const itemId = params["itemId"];
18692
18692
  if (!VALID_SPECIALIST_NAMES.includes(name)) return jsonResponse({ error: `Invalid specialist name: ${name}` }, { status: 400 });
18693
- const { completeSpecialistTask } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18693
+ const { completeSpecialistTask } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18694
18694
  if (!completeSpecialistTask(name, itemId)) return jsonResponse({ error: `Item ${itemId} not found in queue for ${name}` }, { status: 404 });
18695
18695
  return jsonResponse({
18696
18696
  success: true,
@@ -18717,7 +18717,7 @@ const postSpecialistAutoCompleteRoute = HttpRouter.add("POST", "/api/specialists
18717
18717
  if (!issueId || !status) return jsonResponse({ error: "issueId and status required" }, { status: 400 });
18718
18718
  console.log(`[specialists] Auto-detected completion for ${name}: ${issueId} -> ${status}`);
18719
18719
  if (!VALID_SPECIALIST_NAMES.includes(name)) return jsonResponse({ error: `Invalid specialist name: ${name}` }, { status: 400 });
18720
- const { getTmuxSessionName, completeSpecialistTask, wakeSpecialistWithTask, checkSpecialistQueue, submitToSpecialistQueue } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18720
+ const { getTmuxSessionName, completeSpecialistTask, wakeSpecialistWithTask, checkSpecialistQueue, submitToSpecialistQueue } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18721
18721
  saveAgentRuntimeState(getTmuxSessionName(name), {
18722
18722
  state: "idle",
18723
18723
  lastActivity: (/* @__PURE__ */ new Date()).toISOString(),
@@ -18817,7 +18817,7 @@ const getProjectSpecialistStatusRoute = HttpRouter.add("GET", "/api/specialists/
18817
18817
  const project = params["project"];
18818
18818
  const type = params["type"];
18819
18819
  if (!validateSpecialistType(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
18820
- const { getSpecialistStatus } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18820
+ const { getSpecialistStatus } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18821
18821
  return jsonResponse(yield* Effect.promise(() => getSpecialistStatus(type, project)));
18822
18822
  })));
18823
18823
  const postProjectSpecialistKillRoute = HttpRouter.add("POST", "/api/specialists/:project/:type/kill", httpHandler(Effect.gen(function* () {
@@ -18825,7 +18825,7 @@ const postProjectSpecialistKillRoute = HttpRouter.add("POST", "/api/specialists/
18825
18825
  const project = params["project"];
18826
18826
  const type = params["type"];
18827
18827
  if (!validateSpecialistType(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
18828
- const { getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18828
+ const { getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18829
18829
  const tmuxSession = getTmuxSessionName(type, project);
18830
18830
  yield* Effect.promise(() => execAsync$8(`tmux kill-session -t "${tmuxSession}"`).catch(() => {}));
18831
18831
  saveAgentRuntimeState(tmuxSession, {
@@ -18840,7 +18840,7 @@ const postProjectSpecialistKillRoute = HttpRouter.add("POST", "/api/specialists/
18840
18840
  const getProjectSpecialistQueueRoute = HttpRouter.add("GET", "/api/specialists/:project/:type/queue", httpHandler(Effect.gen(function* () {
18841
18841
  const type = (yield* HttpRouter.params)["type"];
18842
18842
  if (!validateSpecialistType(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
18843
- const { checkSpecialistQueue } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18843
+ const { checkSpecialistQueue } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18844
18844
  return jsonResponse(checkSpecialistQueue(type));
18845
18845
  })));
18846
18846
  const postProjectSpecialistSpawnRoute = HttpRouter.add("POST", "/api/specialists/:project/:type/spawn", httpHandler(Effect.gen(function* () {
@@ -18850,7 +18850,7 @@ const postProjectSpecialistSpawnRoute = HttpRouter.add("POST", "/api/specialists
18850
18850
  const { issueId, branch, workspace, prUrl, context } = yield* readJsonBody$6;
18851
18851
  if (!issueId) return jsonResponse({ error: "issueId is required" }, { status: 400 });
18852
18852
  if (!validateSpecialistType(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
18853
- const { spawnEphemeralSpecialist } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18853
+ const { spawnEphemeralSpecialist } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18854
18854
  const result = yield* Effect.promise(() => spawnEphemeralSpecialist(project, type, {
18855
18855
  issueId,
18856
18856
  branch,
@@ -18876,7 +18876,7 @@ const getProjectSpecialistRunsRoute = HttpRouter.add("GET", "/api/specialists/:p
18876
18876
  if (limitParam) limit = parseInt(limitParam, 10);
18877
18877
  if (offsetParam) offset = parseInt(offsetParam, 10);
18878
18878
  }
18879
- const { listRunLogs } = yield* Effect.promise(() => import("./specialist-logs-BvOQ3XPt.js"));
18879
+ const { listRunLogs } = yield* Effect.promise(() => import("./specialist-logs-BhmDpFIq.js"));
18880
18880
  return jsonResponse(listRunLogs(project, type, {
18881
18881
  limit,
18882
18882
  offset
@@ -18887,7 +18887,7 @@ const getProjectSpecialistRunStreamRoute = HttpRouter.add("GET", "/api/specialis
18887
18887
  const project = params["project"];
18888
18888
  const type = params["type"];
18889
18889
  const runId = params["runId"];
18890
- const { getRunLogPath, isRunLogActive } = yield* Effect.promise(() => import("./specialist-logs-BvOQ3XPt.js"));
18890
+ const { getRunLogPath, isRunLogActive } = yield* Effect.promise(() => import("./specialist-logs-BhmDpFIq.js"));
18891
18891
  const logPath = getRunLogPath(project, type, runId);
18892
18892
  if (!existsSync$1(logPath)) return jsonResponse({ error: "Run log not found" }, { status: 404 });
18893
18893
  const encoder = new TextEncoder();
@@ -18946,7 +18946,7 @@ const getProjectSpecialistRunRoute = HttpRouter.add("GET", "/api/specialists/:pr
18946
18946
  const project = params["project"];
18947
18947
  const type = params["type"];
18948
18948
  const runId = params["runId"];
18949
- const { getRunLog, parseLogMetadata } = yield* Effect.promise(() => import("./specialist-logs-BvOQ3XPt.js"));
18949
+ const { getRunLog, parseLogMetadata } = yield* Effect.promise(() => import("./specialist-logs-BhmDpFIq.js"));
18950
18950
  const content = getRunLog(project, type, runId);
18951
18951
  if (!content) return jsonResponse({ error: "Run log not found" }, { status: 404 });
18952
18952
  return jsonResponse({
@@ -18960,7 +18960,7 @@ const postProjectSpecialistRunTerminateRoute = HttpRouter.add("POST", "/api/spec
18960
18960
  const project = params["project"];
18961
18961
  const type = params["type"];
18962
18962
  if (!validateSpecialistType(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
18963
- const { terminateSpecialist } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18963
+ const { terminateSpecialist } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18964
18964
  yield* Effect.promise(() => terminateSpecialist(project, type));
18965
18965
  return jsonResponse({
18966
18966
  success: true,
@@ -18972,7 +18972,7 @@ const postProjectSpecialistGracePauseRoute = HttpRouter.add("POST", "/api/specia
18972
18972
  const project = params["project"];
18973
18973
  const type = params["type"];
18974
18974
  if (!validateSpecialistType(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
18975
- const { pauseGracePeriod } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18975
+ const { pauseGracePeriod } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18976
18976
  if (pauseGracePeriod(project, type)) return jsonResponse({
18977
18977
  success: true,
18978
18978
  message: "Grace period paused"
@@ -18984,7 +18984,7 @@ const postProjectSpecialistGraceResumeRoute = HttpRouter.add("POST", "/api/speci
18984
18984
  const project = params["project"];
18985
18985
  const type = params["type"];
18986
18986
  if (!validateSpecialistType(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
18987
- const { resumeGracePeriod } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18987
+ const { resumeGracePeriod } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
18988
18988
  if (resumeGracePeriod(project, type)) return jsonResponse({
18989
18989
  success: true,
18990
18990
  message: "Grace period resumed"
@@ -18996,7 +18996,7 @@ const postProjectSpecialistGraceExitRoute = HttpRouter.add("POST", "/api/special
18996
18996
  const project = params["project"];
18997
18997
  const type = params["type"];
18998
18998
  if (!validateSpecialistType(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
18999
- const { exitGracePeriod } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
18999
+ const { exitGracePeriod } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
19000
19000
  exitGracePeriod(project, type);
19001
19001
  return jsonResponse({
19002
19002
  success: true,
@@ -19008,7 +19008,7 @@ const getProjectSpecialistGraceRoute = HttpRouter.add("GET", "/api/specialists/:
19008
19008
  const project = params["project"];
19009
19009
  const type = params["type"];
19010
19010
  if (!validateSpecialistType(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
19011
- const { getGracePeriodState } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
19011
+ const { getGracePeriodState } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
19012
19012
  const state = getGracePeriodState(project, type);
19013
19013
  if (state) return jsonResponse(state);
19014
19014
  else return jsonResponse({ error: "No active grace period" }, { status: 404 });
@@ -19017,7 +19017,7 @@ const getProjectSpecialistContextRoute = HttpRouter.add("GET", "/api/specialists
19017
19017
  const params = yield* HttpRouter.params;
19018
19018
  const project = params["project"];
19019
19019
  const type = params["type"];
19020
- const { loadContextDigest } = yield* Effect.promise(() => import("./specialist-context-IX8ZZBxy.js"));
19020
+ const { loadContextDigest } = yield* Effect.promise(() => import("./specialist-context-ColzlmGE.js"));
19021
19021
  const digest = loadContextDigest(project, type);
19022
19022
  if (digest) return jsonResponse({ digest });
19023
19023
  else return jsonResponse({ error: "No context digest found" }, { status: 404 });
@@ -19026,7 +19026,7 @@ const postProjectSpecialistContextRegenerateRoute = HttpRouter.add("POST", "/api
19026
19026
  const params = yield* HttpRouter.params;
19027
19027
  const project = params["project"];
19028
19028
  const type = params["type"];
19029
- const { regenerateContextDigest } = yield* Effect.promise(() => import("./specialist-context-IX8ZZBxy.js"));
19029
+ const { regenerateContextDigest } = yield* Effect.promise(() => import("./specialist-context-ColzlmGE.js"));
19030
19030
  const digest = yield* Effect.promise(() => regenerateContextDigest(project, type));
19031
19031
  if (digest) return jsonResponse({
19032
19032
  digest,
@@ -19045,7 +19045,7 @@ const postProjectSpecialistCompleteRoute = HttpRouter.add("POST", "/api/speciali
19045
19045
  "blocked"
19046
19046
  ].includes(status)) return jsonResponse({ error: "Valid status (passed/failed/blocked) is required" }, { status: 400 });
19047
19047
  if (!validateSpecialistType(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
19048
- const { signalSpecialistCompletion } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
19048
+ const { signalSpecialistCompletion } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
19049
19049
  signalSpecialistCompletion(project, type, {
19050
19050
  status,
19051
19051
  notes
@@ -19079,7 +19079,7 @@ const postProjectSpecialistLogsCleanupRoute = HttpRouter.add("POST", "/api/speci
19079
19079
  const params = yield* HttpRouter.params;
19080
19080
  const project = params["project"];
19081
19081
  const type = params["type"];
19082
- const { cleanupOldLogs } = yield* Effect.promise(() => import("./specialist-logs-BvOQ3XPt.js"));
19082
+ const { cleanupOldLogs } = yield* Effect.promise(() => import("./specialist-logs-BhmDpFIq.js"));
19083
19083
  const { getSpecialistRetention } = yield* Effect.promise(() => import("./projects-DyT3vSy-.js"));
19084
19084
  const deleted = cleanupOldLogs(project, type, getSpecialistRetention(project));
19085
19085
  return jsonResponse({
@@ -19092,7 +19092,7 @@ const postProjectSpecialistResetSessionRoute = HttpRouter.add("POST", "/api/spec
19092
19092
  const params = yield* HttpRouter.params;
19093
19093
  const projectKey = params["project"] ?? "";
19094
19094
  const name = params["name"] ?? "";
19095
- const { bumpSessionGeneration } = yield* Effect.promise(() => import("./specialists-B4aDa5xP.js"));
19095
+ const { bumpSessionGeneration } = yield* Effect.promise(() => import("./specialists-Cny632-T.js"));
19096
19096
  const newGen = bumpSessionGeneration(name, projectKey);
19097
19097
  const tmuxSession = `specialist-${projectKey}-${name}`;
19098
19098
  try {
@@ -23857,7 +23857,7 @@ const PENDING_FILE = join(homedir$1(), ".panopticon", "pending-post-merge.json")
23857
23857
  * loads new content-hashed chunk filenames (no ERR_MODULE_NOT_FOUND after rebuild).
23858
23858
  */
23859
23859
  async function defaultLifecycleRunner(pending) {
23860
- const { postMergeLifecycle, notifyTldrDaemon } = await import("./merge-agent-DaIEvGJG.js");
23860
+ const { postMergeLifecycle, notifyTldrDaemon } = await import("./merge-agent-GLtMEsTu.js");
23861
23861
  await postMergeLifecycle(pending.issueId, pending.projectPath, pending.sourceBranch, { skipDeploy: true });
23862
23862
  if (pending.sourceBranch) await notifyTldrDaemon(pending.projectPath, pending.sourceBranch);
23863
23863
  }