panopticon-cli 0.4.13 → 0.4.15

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.
@@ -17,7 +17,7 @@
17
17
  }
18
18
  })();
19
19
  </script>
20
- <script type="module" crossorigin src="/assets/index-Bwu9d0w1.js"></script>
20
+ <script type="module" crossorigin src="/assets/index-CE4Bu8aP.js"></script>
21
21
  <link rel="stylesheet" crossorigin href="/assets/index-Bp7DyPLO.css">
22
22
  </head>
23
23
  <body class="bg-surface text-content transition-colors duration-150">
@@ -51282,10 +51282,23 @@ var init_rally = __esm({
51282
51282
  init_rally_api();
51283
51283
  init_interface();
51284
51284
  STATE_MAP = {
51285
- Defined: "open",
51285
+ // User Stories (ScheduleState)
51286
+ "New": "open",
51287
+ "Idea": "open",
51288
+ "Defined": "open",
51286
51289
  "In-Progress": "in_progress",
51287
- Completed: "closed",
51288
- Accepted: "closed"
51290
+ "Completed": "closed",
51291
+ "Accepted": "closed",
51292
+ // Defects (State)
51293
+ "Submitted": "open",
51294
+ "Open": "in_progress",
51295
+ // "Open" defects are actively being worked
51296
+ "Fixed": "closed",
51297
+ "Closed": "closed",
51298
+ // Features / PortfolioItems (State)
51299
+ "Discovering": "open",
51300
+ "Developing": "in_progress",
51301
+ "Done": "closed"
51289
51302
  };
51290
51303
  QUERYABLE_TYPES = [
51291
51304
  { type: "hierarchicalrequirement", stateField: "ScheduleState", closedStates: ["Completed", "Accepted"] },
@@ -51293,6 +51306,7 @@ var init_rally = __esm({
51293
51306
  { type: "task", stateField: "State", closedStates: ["Completed"] }
51294
51307
  ];
51295
51308
  FETCH_FIELDS = [
51309
+ "ObjectID",
51296
51310
  "FormattedID",
51297
51311
  "Name",
51298
51312
  "Description",
@@ -51623,13 +51637,21 @@ var init_rally = __esm({
51623
51637
  const state = this.mapState(stateValue);
51624
51638
  const labels = [];
51625
51639
  if (rallyArtifact.Tags && rallyArtifact.Tags._tagsNameArray) {
51626
- labels.push(...rallyArtifact.Tags._tagsNameArray);
51640
+ for (const tag of rallyArtifact.Tags._tagsNameArray) {
51641
+ if (typeof tag === "string") {
51642
+ labels.push(tag);
51643
+ } else if (tag?.Name) {
51644
+ labels.push(tag.Name);
51645
+ }
51646
+ }
51627
51647
  }
51628
51648
  const priority = rallyArtifact.Priority ? PRIORITY_MAP[rallyArtifact.Priority] ?? 2 : void 0;
51649
+ const objectId = rallyArtifact.ObjectID || rallyArtifact.FormattedID;
51650
+ const artifactType = rallyArtifact._type || "artifact";
51629
51651
  const baseUrl = this.restApi.server.replace("/slm/webservice/", "");
51630
- const url = `${baseUrl}/#/detail/${rallyArtifact._type.toLowerCase()}/${rallyArtifact.ObjectID}`;
51652
+ const url = `${baseUrl}/#/detail/${artifactType.toLowerCase()}/${objectId}`;
51631
51653
  return {
51632
- id: rallyArtifact.ObjectID,
51654
+ id: String(objectId),
51633
51655
  ref: rallyArtifact.FormattedID,
51634
51656
  title: rallyArtifact.Name || "",
51635
51657
  description: rallyArtifact.Description || "",
@@ -85072,13 +85094,13 @@ function mapGitHubStateToCanonical(state, labels) {
85072
85094
  return "todo";
85073
85095
  return "todo";
85074
85096
  }
85075
- function mapRallyStateToCanonical(scheduleState) {
85076
- const stateLower = scheduleState.toLowerCase();
85077
- if (stateLower === "defined")
85097
+ function mapRallyStateToCanonical(issueState) {
85098
+ if (!issueState)
85078
85099
  return "todo";
85079
- if (stateLower === "in-progress")
85100
+ const stateLower = issueState.toLowerCase();
85101
+ if (stateLower === "in_progress")
85080
85102
  return "in_progress";
85081
- if (stateLower === "completed" || stateLower === "accepted")
85103
+ if (stateLower === "closed")
85082
85104
  return "done";
85083
85105
  return "todo";
85084
85106
  }
@@ -85649,10 +85671,11 @@ var IssueDataService = class {
85649
85671
  });
85650
85672
  const formatted = issues.map((issue) => {
85651
85673
  const canonicalStatus = mapRallyStateToCanonical(issue.state);
85674
+ const identifier = issue.ref || issue.id || "unknown";
85652
85675
  return {
85653
- id: `rally-${issue.id}`,
85654
- identifier: issue.ref,
85655
- title: issue.title,
85676
+ id: `rally-${issue.id || identifier}`,
85677
+ identifier,
85678
+ title: issue.title || "",
85656
85679
  description: issue.description || "",
85657
85680
  status: canonicalStatus === "todo" ? "Todo" : canonicalStatus === "in_progress" ? "In Progress" : canonicalStatus === "done" ? "Done" : "Todo",
85658
85681
  priority: issue.priority ?? 3,
@@ -85660,8 +85683,8 @@ var IssueDataService = class {
85660
85683
  name: issue.assignee,
85661
85684
  email: `${issue.assignee.replace(/\s+/g, ".").toLowerCase()}@rally`
85662
85685
  } : void 0,
85663
- labels: issue.labels || [],
85664
- url: issue.url,
85686
+ labels: Array.isArray(issue.labels) ? issue.labels.filter((l) => typeof l === "string") : [],
85687
+ url: issue.url || "",
85665
85688
  createdAt: issue.createdAt,
85666
85689
  updatedAt: issue.updatedAt,
85667
85690
  project: {
@@ -99468,15 +99491,39 @@ Awaiting initial artifact analysis.
99468
99491
  app.get("/api/mission-control/projects", async (_req, res) => {
99469
99492
  try {
99470
99493
  const projects = listProjects();
99471
- let tmuxSessions = /* @__PURE__ */ new Set();
99494
+ const issueTitleMap = /* @__PURE__ */ new Map();
99472
99495
  try {
99473
- const { stdout } = await execAsync15('tmux list-sessions -F "#{session_name}" 2>/dev/null || true');
99474
- for (const line of stdout.split("\n")) {
99496
+ const allIssues = issueDataService.getIssues();
99497
+ for (const issue of allIssues) {
99498
+ if (issue.identifier && issue.title) {
99499
+ issueTitleMap.set(issue.identifier.toUpperCase(), issue.title);
99500
+ }
99501
+ }
99502
+ } catch {
99503
+ }
99504
+ let tmuxSessions = /* @__PURE__ */ new Set();
99505
+ const [tmuxResult, closedIssuesResult] = await Promise.allSettled([
99506
+ execAsync15('tmux list-sessions -F "#{session_name}" 2>/dev/null || true'),
99507
+ execAsync15('gh issue list --repo eltmon/panopticon-cli --state closed --limit 200 --json number,title 2>/dev/null || echo "[]"')
99508
+ ]);
99509
+ if (tmuxResult.status === "fulfilled") {
99510
+ for (const line of tmuxResult.value.stdout.split("\n")) {
99475
99511
  const trimmed = line.trim();
99476
99512
  if (trimmed)
99477
99513
  tmuxSessions.add(trimmed);
99478
99514
  }
99479
- } catch {
99515
+ }
99516
+ if (closedIssuesResult.status === "fulfilled") {
99517
+ try {
99518
+ const closedIssues = JSON.parse(closedIssuesResult.value.stdout.trim());
99519
+ for (const ci of closedIssues) {
99520
+ const key = `PAN-${ci.number}`;
99521
+ if (!issueTitleMap.has(key) && ci.title) {
99522
+ issueTitleMap.set(key, ci.title.replace(/^PAN-\d+:\s*/i, ""));
99523
+ }
99524
+ }
99525
+ } catch {
99526
+ }
99480
99527
  }
99481
99528
  const projectTree = [];
99482
99529
  const now = Date.now();
@@ -99559,7 +99606,18 @@ app.get("/api/mission-control/projects", async (_req, res) => {
99559
99606
  stateLabel = "Planning";
99560
99607
  else if (hasState)
99561
99608
  stateLabel = "Has Context";
99562
- let title = issueId;
99609
+ let title = issueTitleMap.get(issueId) || "";
99610
+ if (!title && hasPrd) {
99611
+ try {
99612
+ const prdPath = existsSync44(join43(planningDir, "PRD.md")) ? join43(planningDir, "PRD.md") : join43(planningDir, "PLANNING_PROMPT.md");
99613
+ const prdContent = readFileSync37(prdPath, "utf-8");
99614
+ const firstLine = prdContent.split("\n").find((l) => l.trim().length > 0) || "";
99615
+ title = firstLine.replace(/^#+\s*/, "").trim();
99616
+ } catch {
99617
+ }
99618
+ }
99619
+ if (!title)
99620
+ title = issueId;
99563
99621
  features.push({
99564
99622
  issueId,
99565
99623
  title,
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  planSync,
30
30
  restoreBackup,
31
31
  syncHooks
32
- } from "./chunk-ST6W2SQZ.js";
32
+ } from "./chunk-W7FC4DTQ.js";
33
33
  import {
34
34
  PROVIDERS,
35
35
  getAgentCommand,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "panopticon-cli",
3
- "version": "0.4.13",
3
+ "version": "0.4.15",
4
4
  "description": "Multi-agent orchestration for AI coding assistants (Claude Code, Codex, Cursor, Gemini CLI)",
5
5
  "keywords": [
6
6
  "ai-agents",