@maintainer-pro/ai-cli 0.1.13 → 0.1.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.
package/dist/index.cjs CHANGED
@@ -173,9 +173,11 @@ function formatClientContext(context) {
173
173
  "The user currently has this page open. Prefer changing this screen unless they clearly mean another."
174
174
  ];
175
175
  if (context.pageUrl) {
176
- lines.push(`- Page URL: ${context.pageUrl}`);
176
+ lines.push(`- Opened page (browser URL): ${context.pageUrl}`);
177
+ }
178
+ if (context.route) {
179
+ lines.push(`- Route: ${context.route}`);
177
180
  }
178
- lines.push(`- Route: ${context.route}`);
179
181
  lines.push(`- Page title: ${context.pageTitle}`);
180
182
  if (context.visiblePanels?.length) {
181
183
  lines.push(`- Visible panels: ${context.visiblePanels.join(", ")}`);
@@ -1821,6 +1823,20 @@ function createLocalDirectoryStore(baseDir) {
1821
1823
  );
1822
1824
  const next = waiting[0] ?? null;
1823
1825
  if (!next) {
1826
+ const orphan = existing.messages.some((m) => m.provider === "working");
1827
+ if (orphan) {
1828
+ existing.messages = existing.messages.filter(
1829
+ (m) => m.provider !== "working"
1830
+ );
1831
+ existing.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
1832
+ await writeConversation(filePath, existing);
1833
+ return {
1834
+ action: "cleared_orphan_wip",
1835
+ workingId: null,
1836
+ promotedId: null,
1837
+ nextQueued: null
1838
+ };
1839
+ }
1824
1840
  return {
1825
1841
  action: "noop",
1826
1842
  workingId: null,
package/dist/index.js CHANGED
@@ -53,9 +53,11 @@ function formatClientContext(context) {
53
53
  "The user currently has this page open. Prefer changing this screen unless they clearly mean another."
54
54
  ];
55
55
  if (context.pageUrl) {
56
- lines.push(`- Page URL: ${context.pageUrl}`);
56
+ lines.push(`- Opened page (browser URL): ${context.pageUrl}`);
57
+ }
58
+ if (context.route) {
59
+ lines.push(`- Route: ${context.route}`);
57
60
  }
58
- lines.push(`- Route: ${context.route}`);
59
61
  lines.push(`- Page title: ${context.pageTitle}`);
60
62
  if (context.visiblePanels?.length) {
61
63
  lines.push(`- Visible panels: ${context.visiblePanels.join(", ")}`);
@@ -1701,6 +1703,20 @@ function createLocalDirectoryStore(baseDir) {
1701
1703
  );
1702
1704
  const next = waiting[0] ?? null;
1703
1705
  if (!next) {
1706
+ const orphan = existing.messages.some((m) => m.provider === "working");
1707
+ if (orphan) {
1708
+ existing.messages = existing.messages.filter(
1709
+ (m) => m.provider !== "working"
1710
+ );
1711
+ existing.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
1712
+ await writeConversation(filePath, existing);
1713
+ return {
1714
+ action: "cleared_orphan_wip",
1715
+ workingId: null,
1716
+ promotedId: null,
1717
+ nextQueued: null
1718
+ };
1719
+ }
1704
1720
  return {
1705
1721
  action: "noop",
1706
1722
  workingId: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maintainer-pro/ai-cli",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Maintainer Pro server SDK: Claude/Cursor CLI, chat HTTP handlers, and optional SQL persistence",
5
5
  "keywords": [
6
6
  "maintainer-pro",