@polterware/polter 0.4.0 → 0.4.2

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.js CHANGED
@@ -3,6 +3,7 @@ import {
3
3
  allCommands,
4
4
  applyActions,
5
5
  commandExists,
6
+ createIpcServer,
6
7
  detectPkgManager,
7
8
  executePipeline,
8
9
  features,
@@ -21,6 +22,9 @@ import {
21
22
  getOrCreateProjectConfig,
22
23
  getProcessOutput,
23
24
  getProjectConfigPath,
25
+ getSkillContent,
26
+ getSkillPath,
27
+ getSocketPath,
24
28
  getToolDisplayName,
25
29
  getToolInfo,
26
30
  getToolLinkInfo,
@@ -30,6 +34,7 @@ import {
30
34
  mcpStatus,
31
35
  parsePolterYaml,
32
36
  planChanges,
37
+ registerForegroundProcess,
33
38
  removeMcpServer,
34
39
  removeMcpServerSilent,
35
40
  removeProcess,
@@ -38,18 +43,20 @@ import {
38
43
  runInteractiveCommand,
39
44
  runSupabaseCommand,
40
45
  savePipeline,
46
+ setupSkill,
47
+ setupSkillCli,
41
48
  startProcess,
42
49
  stopProcess,
43
50
  translateCommand,
44
51
  writeProjectConfig
45
- } from "./chunk-YNOZDU75.js";
52
+ } from "./chunk-CWBIXRZP.js";
46
53
 
47
54
  // src/index.tsx
48
- import React28 from "react";
55
+ import React29 from "react";
49
56
  import { render } from "ink";
50
57
 
51
58
  // src/app.tsx
52
- import { Box as Box29, Text as Text33, useApp } from "ink";
59
+ import { Box as Box30, Text as Text34, useApp } from "ink";
53
60
 
54
61
  // src/hooks/useNavigation.ts
55
62
  import { useState, useCallback } from "react";
@@ -914,6 +921,13 @@ function buildHomeItems({
914
921
  hint: "Free-form args",
915
922
  kind: "action"
916
923
  });
924
+ items.push({
925
+ id: "action-skill-setup",
926
+ value: "__action_skill_setup__",
927
+ label: "Skill Setup",
928
+ hint: "Install Claude Code skill",
929
+ kind: "action"
930
+ });
917
931
  items.push({
918
932
  id: "action-update",
919
933
  value: "__action_update__",
@@ -1028,6 +1042,9 @@ function Home({
1028
1042
  case "__action_config__":
1029
1043
  onNavigate("project-config");
1030
1044
  break;
1045
+ case "__action_skill_setup__":
1046
+ onNavigate("skill-setup");
1047
+ break;
1031
1048
  case "__action_update__":
1032
1049
  onNavigate("self-update");
1033
1050
  break;
@@ -1659,26 +1676,11 @@ function FlagSelection({
1659
1676
 
1660
1677
  // src/screens/CommandExecution.tsx
1661
1678
  import { useState as useState12, useEffect as useEffect9 } from "react";
1662
- import { Box as Box13, Text as Text17, useInput as useInput8 } from "ink";
1663
-
1664
- // src/components/Spinner.tsx
1665
- import { Text as Text12 } from "ink";
1666
- import InkSpinner from "ink-spinner";
1667
- import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1668
- function Spinner({
1669
- label = "Running...",
1670
- color = inkColors.accent
1671
- }) {
1672
- return /* @__PURE__ */ jsxs11(Text12, { children: [
1673
- /* @__PURE__ */ jsx12(Text12, { color, children: /* @__PURE__ */ jsx12(InkSpinner, { type: "dots" }) }),
1674
- " ",
1675
- /* @__PURE__ */ jsx12(Text12, { children: label })
1676
- ] });
1677
- }
1679
+ import { Box as Box13, Text as Text15, useInput as useInput8 } from "ink";
1678
1680
 
1679
1681
  // src/components/ConfirmPrompt.tsx
1680
- import { Box as Box11, Text as Text13, useInput as useInput6 } from "ink";
1681
- import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1682
+ import { Box as Box11, Text as Text12, useInput as useInput6 } from "ink";
1683
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1682
1684
  function ConfirmPrompt({
1683
1685
  message,
1684
1686
  defaultValue = true,
@@ -1704,16 +1706,16 @@ function ConfirmPrompt({
1704
1706
  onConfirm(defaultValue);
1705
1707
  }
1706
1708
  }, { isActive: isInputActive });
1707
- return /* @__PURE__ */ jsxs12(Box11, { gap: 1, children: [
1708
- /* @__PURE__ */ jsx13(Text13, { color: inkColors.accent, bold: true, children: "?" }),
1709
- /* @__PURE__ */ jsx13(Text13, { children: message }),
1710
- /* @__PURE__ */ jsx13(Text13, { dimColor: true, children: defaultValue ? "(Y/n)" : "(y/N)" })
1709
+ return /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
1710
+ /* @__PURE__ */ jsx12(Text12, { color: inkColors.accent, bold: true, children: "?" }),
1711
+ /* @__PURE__ */ jsx12(Text12, { children: message }),
1712
+ /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: defaultValue ? "(Y/n)" : "(y/N)" })
1711
1713
  ] });
1712
1714
  }
1713
1715
 
1714
1716
  // src/components/Divider.tsx
1715
- import { Text as Text14 } from "ink";
1716
- import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1717
+ import { Text as Text13 } from "ink";
1718
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1717
1719
  function Divider({
1718
1720
  label,
1719
1721
  width
@@ -1724,7 +1726,7 @@ function Divider({
1724
1726
  const sideLen = Math.max(2, Math.floor((effectiveWidth - labelLen) / 2));
1725
1727
  const left = "\u2500".repeat(sideLen);
1726
1728
  const right = "\u2500".repeat(sideLen);
1727
- return /* @__PURE__ */ jsxs13(Text14, { dimColor: true, children: [
1729
+ return /* @__PURE__ */ jsxs12(Text13, { dimColor: true, children: [
1728
1730
  left,
1729
1731
  " ",
1730
1732
  label,
@@ -1732,16 +1734,13 @@ function Divider({
1732
1734
  right
1733
1735
  ] });
1734
1736
  }
1735
- return /* @__PURE__ */ jsx14(Text14, { dimColor: true, children: "\u2500".repeat(effectiveWidth) });
1737
+ return /* @__PURE__ */ jsx13(Text13, { dimColor: true, children: "\u2500".repeat(effectiveWidth) });
1736
1738
  }
1737
1739
 
1738
- // src/components/CommandOutput.tsx
1739
- import { Text as Text16 } from "ink";
1740
-
1741
1740
  // src/components/ScrollableBox.tsx
1742
1741
  import { useState as useState10, useEffect as useEffect6, useRef } from "react";
1743
- import { Box as Box12, Text as Text15, useInput as useInput7 } from "ink";
1744
- import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
1742
+ import { Box as Box12, Text as Text14, useInput as useInput7 } from "ink";
1743
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1745
1744
  function ScrollableBox({
1746
1745
  height,
1747
1746
  isActive = true,
@@ -1780,42 +1779,10 @@ function ScrollableBox({
1780
1779
  const showScrollUp = scrollOffset > 0;
1781
1780
  const showScrollDown = scrollOffset + visibleCount < totalItems;
1782
1781
  const visible = children.slice(scrollOffset, scrollOffset + visibleCount);
1783
- return /* @__PURE__ */ jsxs14(Box12, { flexDirection: "column", height, children: [
1784
- showScrollUp && /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: " \u2191 more" }),
1782
+ return /* @__PURE__ */ jsxs13(Box12, { flexDirection: "column", height, children: [
1783
+ showScrollUp && /* @__PURE__ */ jsx14(Text14, { dimColor: true, children: " \u2191 more" }),
1785
1784
  visible,
1786
- showScrollDown && /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: " \u2193 more" })
1787
- ] });
1788
- }
1789
-
1790
- // src/lib/ansi.ts
1791
- var ANSI_RE = (
1792
- // biome-ignore lint/suspicious/noControlCharactersInRegex: intentional ANSI stripping
1793
- /[\u001B\u009B][[\]()#;?]*(?:(?:(?:[a-zA-Z\d]*(?:;[-a-zA-Z\d/#&.:=?%@~_]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))/g
1794
- );
1795
- function stripAnsi(text) {
1796
- return text.replace(ANSI_RE, "");
1797
- }
1798
-
1799
- // src/components/CommandOutput.tsx
1800
- import { jsx as jsx16 } from "react/jsx-runtime";
1801
- function cleanLines(raw) {
1802
- const stripped = stripAnsi(raw);
1803
- return stripped.replace(/\r/g, "").split("\n").filter((line) => line.length > 0);
1804
- }
1805
- function CommandOutput({
1806
- stdout,
1807
- stderr,
1808
- height,
1809
- isActive = false
1810
- }) {
1811
- const outLines = stdout ? cleanLines(stdout) : [];
1812
- const errLines = stderr ? cleanLines(stderr) : [];
1813
- if (outLines.length === 0 && errLines.length === 0) {
1814
- return null;
1815
- }
1816
- return /* @__PURE__ */ jsx16(ScrollableBox, { height: Math.max(3, height), isActive, children: [
1817
- ...outLines.map((line, i) => /* @__PURE__ */ jsx16(Text16, { children: line }, `o-${i}`)),
1818
- ...errLines.map((line, i) => /* @__PURE__ */ jsx16(Text16, { color: "red", children: line }, `e-${i}`))
1785
+ showScrollDown && /* @__PURE__ */ jsx14(Text14, { dimColor: true, children: " \u2193 more" })
1819
1786
  ] });
1820
1787
  }
1821
1788
 
@@ -1857,6 +1824,12 @@ function useCommand(execution = "supabase", cwd = process.cwd(), options) {
1857
1824
  const runOpts = { quiet: options?.quiet, onData };
1858
1825
  const handle = runCommand(resolvedExecution, args, cwd, runOpts);
1859
1826
  abortRef.current = handle.abort;
1827
+ const cmdStr = typeof resolvedExecution === "string" ? resolvedExecution : resolvedExecution.command;
1828
+ const processId = generateProcessId(cmdStr, args);
1829
+ try {
1830
+ registerForegroundProcess(processId, cmdStr, args, cwd, handle.child);
1831
+ } catch {
1832
+ }
1860
1833
  const res = await handle.promise;
1861
1834
  abortRef.current = null;
1862
1835
  setResult(res);
@@ -1945,6 +1918,15 @@ async function copyToClipboard(text) {
1945
1918
  });
1946
1919
  }
1947
1920
 
1921
+ // src/lib/ansi.ts
1922
+ var ANSI_RE = (
1923
+ // biome-ignore lint/suspicious/noControlCharactersInRegex: intentional ANSI stripping
1924
+ /[\u001B\u009B][[\]()#;?]*(?:(?:(?:[a-zA-Z\d]*(?:;[-a-zA-Z\d/#&.:=?%@~_]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))/g
1925
+ );
1926
+ function stripAnsi(text) {
1927
+ return text.replace(ANSI_RE, "");
1928
+ }
1929
+
1948
1930
  // src/lib/errorSuggestions.ts
1949
1931
  var KNOWN_TOOLS = ["supabase", "gh", "vercel", "git"];
1950
1932
  var BACKTICK_CMD = /(?:try\s+)?(?:run(?:ning)?|use|execute)\s+`([^`]+)`/gi;
@@ -1991,7 +1973,7 @@ ${stderr}`);
1991
1973
  }
1992
1974
 
1993
1975
  // src/screens/CommandExecution.tsx
1994
- import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
1976
+ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
1995
1977
  function CommandExecution({
1996
1978
  args: initialArgs,
1997
1979
  tool = "supabase",
@@ -2016,27 +1998,38 @@ function CommandExecution({
2016
1998
  const { runInteractive } = useInteractiveRun();
2017
1999
  const [outputFocused, setOutputFocused] = useState12(false);
2018
2000
  const [copyMessage, setCopyMessage] = useState12();
2001
+ const [feedback, setFeedback] = useState12();
2002
+ const [aborting, setAborting] = useState12(false);
2019
2003
  const cmdDisplay = rawCommand ? `${rawCommand} ${currentArgs.join(" ")}`.trim() : `${getToolDisplayName(tool)} ${currentArgs.join(" ")}`;
2020
2004
  const runCommand2 = currentArgs.join(" ");
2021
2005
  useInput8(
2022
- (_input, key) => {
2006
+ (input2, key) => {
2023
2007
  if (key.escape) {
2024
2008
  abort();
2025
2009
  onBack();
2010
+ return;
2011
+ }
2012
+ if (input2 === "x" && !aborting) {
2013
+ abort();
2014
+ setAborting(true);
2015
+ setFeedback("Aborting...");
2016
+ return;
2017
+ }
2018
+ if (input2 === "c") {
2019
+ const output2 = [partialStdout, partialStderr].filter(Boolean).join("\n");
2020
+ copyToClipboard(output2).then(() => setFeedback("Copied to clipboard"));
2021
+ return;
2026
2022
  }
2027
2023
  },
2028
2024
  { isActive: isInputActive && phase === "running" }
2029
2025
  );
2030
2026
  useInput8(
2031
- (input2, key) => {
2032
- if (input2 === "o" && !outputFocused) {
2033
- setOutputFocused(true);
2034
- }
2035
- if (key.escape && outputFocused) {
2036
- setOutputFocused(false);
2027
+ (input2, _key) => {
2028
+ if (input2 === "/") {
2029
+ setOutputFocused((prev) => !prev);
2037
2030
  }
2038
2031
  },
2039
- { isActive: isInputActive && phase === "error-menu" }
2032
+ { isActive: isInputActive && (phase === "error-menu" || phase === "success") }
2040
2033
  );
2041
2034
  useEffect9(() => {
2042
2035
  if (phase === "background-started") {
@@ -2070,6 +2063,12 @@ function CommandExecution({
2070
2063
  setPhase("error-menu");
2071
2064
  }
2072
2065
  }, [phase, runCommand2, status]);
2066
+ useEffect9(() => {
2067
+ if (feedback) {
2068
+ const timer = setTimeout(() => setFeedback(void 0), 2e3);
2069
+ return () => clearTimeout(timer);
2070
+ }
2071
+ }, [feedback]);
2073
2072
  if (phase === "confirm") {
2074
2073
  const pinned = isPinnedRun(runCommand2);
2075
2074
  const confirmItems = [
@@ -2086,17 +2085,17 @@ function CommandExecution({
2086
2085
  },
2087
2086
  { value: "cancel", label: "\u2190 Cancel" }
2088
2087
  ];
2089
- const confirmContent = /* @__PURE__ */ jsxs15(Box13, { flexDirection: "column", children: [
2090
- /* @__PURE__ */ jsxs15(Box13, { marginBottom: 1, gap: 1, children: [
2091
- /* @__PURE__ */ jsxs15(Text17, { color: inkColors.accent, bold: true, children: [
2088
+ const confirmContent = /* @__PURE__ */ jsxs14(Box13, { flexDirection: "column", children: [
2089
+ /* @__PURE__ */ jsxs14(Box13, { marginBottom: 1, gap: 1, children: [
2090
+ /* @__PURE__ */ jsxs14(Text15, { color: inkColors.accent, bold: true, children: [
2092
2091
  "\u25B6",
2093
2092
  " ",
2094
2093
  cmdDisplay
2095
2094
  ] }),
2096
- /* @__PURE__ */ jsx17(ToolBadge, { tool })
2095
+ /* @__PURE__ */ jsx15(ToolBadge, { tool })
2097
2096
  ] }),
2098
- pinMessage && /* @__PURE__ */ jsx17(Box13, { marginBottom: 1, children: /* @__PURE__ */ jsx17(Text17, { color: inkColors.accent, children: pinMessage }) }),
2099
- /* @__PURE__ */ jsx17(
2097
+ pinMessage && /* @__PURE__ */ jsx15(Box13, { marginBottom: 1, children: /* @__PURE__ */ jsx15(Text15, { color: inkColors.accent, children: pinMessage }) }),
2098
+ /* @__PURE__ */ jsx15(
2100
2099
  SelectList,
2101
2100
  {
2102
2101
  items: confirmItems,
@@ -2139,7 +2138,7 @@ function CommandExecution({
2139
2138
  }
2140
2139
  )
2141
2140
  ] });
2142
- return /* @__PURE__ */ jsx17(Box13, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: panelMode ? /* @__PURE__ */ jsx17(
2141
+ return /* @__PURE__ */ jsx15(Box13, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: panelMode ? /* @__PURE__ */ jsx15(
2143
2142
  Box13,
2144
2143
  {
2145
2144
  flexDirection: "column",
@@ -2152,54 +2151,71 @@ function CommandExecution({
2152
2151
  ) : confirmContent });
2153
2152
  }
2154
2153
  if (phase === "background-started") {
2155
- return /* @__PURE__ */ jsxs15(Box13, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: [
2156
- /* @__PURE__ */ jsxs15(Box13, { marginY: 1, gap: 1, children: [
2157
- /* @__PURE__ */ jsx17(Text17, { color: "#3ECF8E", bold: true, children: "\u2713" }),
2158
- /* @__PURE__ */ jsx17(Text17, { color: "#3ECF8E", bold: true, children: "Started in background" })
2154
+ return /* @__PURE__ */ jsxs14(Box13, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: [
2155
+ /* @__PURE__ */ jsxs14(Box13, { marginY: 1, gap: 1, children: [
2156
+ /* @__PURE__ */ jsx15(Text15, { color: "#3ECF8E", bold: true, children: "\u2713" }),
2157
+ /* @__PURE__ */ jsx15(Text15, { color: "#3ECF8E", bold: true, children: "Started in background" })
2159
2158
  ] }),
2160
- /* @__PURE__ */ jsxs15(Box13, { children: [
2161
- /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: "Command: " }),
2162
- /* @__PURE__ */ jsx17(Text17, { children: cmdDisplay })
2159
+ /* @__PURE__ */ jsxs14(Box13, { children: [
2160
+ /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "Command: " }),
2161
+ /* @__PURE__ */ jsx15(Text15, { children: cmdDisplay })
2163
2162
  ] })
2164
2163
  ] });
2165
2164
  }
2166
2165
  if (phase === "running") {
2167
- const hasPartialOutput = partialStdout.length > 0 || partialStderr.length > 0;
2168
- const streamOutputHeight = Math.max(3, height - 10);
2169
- return /* @__PURE__ */ jsxs15(Box13, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: [
2170
- /* @__PURE__ */ jsx17(Divider, { width: panelMode ? width - 4 : width }),
2171
- /* @__PURE__ */ jsxs15(Box13, { marginY: 1, gap: 1, children: [
2172
- /* @__PURE__ */ jsx17(Text17, { color: inkColors.accent, bold: true, children: "\u25B6" }),
2173
- /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: "Running:" }),
2174
- /* @__PURE__ */ jsx17(Text17, { children: cmdDisplay }),
2175
- /* @__PURE__ */ jsx17(ToolBadge, { tool })
2166
+ const outputText = [partialStdout, partialStderr].filter(Boolean).join("\n");
2167
+ const outputLines = outputText ? stripAnsi(outputText).split("\n") : [];
2168
+ const logBoxHeight = Math.max(3, height - 7);
2169
+ const cardWidth = Math.max(30, (panelMode ? width - 4 : width) - 2);
2170
+ return /* @__PURE__ */ jsxs14(Box13, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: [
2171
+ /* @__PURE__ */ jsxs14(Box13, { marginBottom: 1, gap: 1, children: [
2172
+ /* @__PURE__ */ jsxs14(Text15, { color: inkColors.accent, bold: true, children: [
2173
+ "\u25B6",
2174
+ " ",
2175
+ cmdDisplay
2176
+ ] }),
2177
+ /* @__PURE__ */ jsx15(ToolBadge, { tool }),
2178
+ /* @__PURE__ */ jsxs14(Text15, { color: aborting ? "yellow" : "green", children: [
2179
+ "\u25CF ",
2180
+ aborting ? "aborting" : "running"
2181
+ ] })
2176
2182
  ] }),
2177
- /* @__PURE__ */ jsx17(Divider, { width: panelMode ? width - 4 : width }),
2178
- /* @__PURE__ */ jsx17(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx17(Spinner, { label: `Executing ${cmdDisplay}...` }) }),
2179
- hasPartialOutput && /* @__PURE__ */ jsx17(
2180
- CommandOutput,
2183
+ /* @__PURE__ */ jsx15(
2184
+ Box13,
2181
2185
  {
2182
- stdout: partialStdout,
2183
- stderr: partialStderr,
2184
- height: streamOutputHeight,
2185
- isActive: false
2186
+ flexDirection: "column",
2187
+ borderStyle: "round",
2188
+ borderColor: inkColors.accent,
2189
+ paddingX: 1,
2190
+ width: cardWidth,
2191
+ children: /* @__PURE__ */ jsx15(
2192
+ ScrollableBox,
2193
+ {
2194
+ height: logBoxHeight,
2195
+ isActive: isInputActive,
2196
+ autoScrollToBottom: true,
2197
+ children: outputLines.length === 0 ? [/* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "Waiting for output..." }, "empty")] : outputLines.map((line, i) => /* @__PURE__ */ jsx15(Text15, { wrap: "truncate", children: line }, i))
2198
+ }
2199
+ )
2186
2200
  }
2187
2201
  ),
2188
- /* @__PURE__ */ jsxs15(Box13, { marginTop: 1, children: [
2189
- /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: "Press " }),
2190
- /* @__PURE__ */ jsx17(Text17, { color: inkColors.accent, children: "Esc" }),
2191
- /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: " to abort" })
2202
+ feedback && /* @__PURE__ */ jsx15(Box13, { children: /* @__PURE__ */ jsx15(Text15, { color: inkColors.accent, children: feedback }) }),
2203
+ /* @__PURE__ */ jsxs14(Box13, { marginTop: 1, gap: 2, children: [
2204
+ /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "\u2191\u2193:scroll" }),
2205
+ /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "x:abort" }),
2206
+ /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "c:copy" }),
2207
+ /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "Esc:back" })
2192
2208
  ] })
2193
2209
  ] });
2194
2210
  }
2195
2211
  if (phase === "success-pin-offer") {
2196
- return /* @__PURE__ */ jsxs15(Box13, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: [
2197
- /* @__PURE__ */ jsx17(Divider, { width: panelMode ? width - 4 : width }),
2198
- /* @__PURE__ */ jsxs15(Box13, { marginY: 1, gap: 1, children: [
2199
- /* @__PURE__ */ jsx17(Text17, { color: inkColors.accent, bold: true, children: "\u2713" }),
2200
- /* @__PURE__ */ jsx17(Text17, { color: inkColors.accent, bold: true, children: "Command completed successfully!" })
2212
+ return /* @__PURE__ */ jsxs14(Box13, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: [
2213
+ /* @__PURE__ */ jsx15(Divider, { width: panelMode ? width - 4 : width }),
2214
+ /* @__PURE__ */ jsxs14(Box13, { marginY: 1, gap: 1, children: [
2215
+ /* @__PURE__ */ jsx15(Text15, { color: inkColors.accent, bold: true, children: "\u2713" }),
2216
+ /* @__PURE__ */ jsx15(Text15, { color: inkColors.accent, bold: true, children: "Command completed successfully!" })
2201
2217
  ] }),
2202
- /* @__PURE__ */ jsx17(
2218
+ /* @__PURE__ */ jsx15(
2203
2219
  ConfirmPrompt,
2204
2220
  {
2205
2221
  message: "Pin this exact command?",
@@ -2222,24 +2238,49 @@ function CommandExecution({
2222
2238
  const successItems = [
2223
2239
  { value: "__back__", label: "\u2190 Back to menu" }
2224
2240
  ];
2225
- const outputHeight = Math.max(3, height - 12);
2226
- return /* @__PURE__ */ jsxs15(Box13, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: [
2227
- /* @__PURE__ */ jsx17(Divider, { width: panelMode ? width - 4 : width }),
2228
- /* @__PURE__ */ jsxs15(Box13, { marginY: 1, gap: 1, children: [
2229
- /* @__PURE__ */ jsx17(Text17, { color: inkColors.accent, bold: true, children: "\u2713" }),
2230
- /* @__PURE__ */ jsx17(Text17, { color: inkColors.accent, bold: true, children: "Command completed successfully!" })
2241
+ const successOutput = [result?.stdout, result?.stderr].filter(Boolean).join("\n");
2242
+ const successLines = successOutput ? stripAnsi(successOutput).split("\n") : [];
2243
+ const successLogHeight = Math.max(3, height - 9 - (pinMessage ? 1 : 0));
2244
+ const successCardWidth = Math.max(30, (panelMode ? width - 4 : width) - 2);
2245
+ return /* @__PURE__ */ jsxs14(Box13, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: [
2246
+ /* @__PURE__ */ jsxs14(Box13, { marginBottom: 1, gap: 1, children: [
2247
+ /* @__PURE__ */ jsxs14(Text15, { color: inkColors.accent, bold: true, children: [
2248
+ "\u2713",
2249
+ " ",
2250
+ cmdDisplay
2251
+ ] }),
2252
+ /* @__PURE__ */ jsx15(ToolBadge, { tool }),
2253
+ /* @__PURE__ */ jsx15(Text15, { color: "green", children: "\u25CF completed" })
2231
2254
  ] }),
2232
- pinMessage && /* @__PURE__ */ jsx17(Box13, { marginBottom: 1, children: /* @__PURE__ */ jsx17(Text17, { color: inkColors.accent, children: pinMessage }) }),
2233
- /* @__PURE__ */ jsx17(
2234
- CommandOutput,
2255
+ pinMessage && /* @__PURE__ */ jsx15(Box13, { marginBottom: 1, children: /* @__PURE__ */ jsx15(Text15, { color: inkColors.accent, children: pinMessage }) }),
2256
+ /* @__PURE__ */ jsx15(
2257
+ Box13,
2235
2258
  {
2236
- stdout: result?.stdout,
2237
- stderr: result?.stderr,
2238
- height: outputHeight,
2239
- isActive: isInputActive
2259
+ flexDirection: "column",
2260
+ borderStyle: "round",
2261
+ borderColor: outputFocused ? inkColors.accent : panel.borderDim,
2262
+ paddingX: 1,
2263
+ width: successCardWidth,
2264
+ children: /* @__PURE__ */ jsx15(
2265
+ ScrollableBox,
2266
+ {
2267
+ height: successLogHeight,
2268
+ isActive: isInputActive && outputFocused,
2269
+ autoScrollToBottom: true,
2270
+ children: successLines.length === 0 ? [/* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "No output" }, "empty")] : successLines.map((line, i) => /* @__PURE__ */ jsx15(Text15, { wrap: "truncate", children: line }, i))
2271
+ }
2272
+ )
2240
2273
  }
2241
2274
  ),
2242
- /* @__PURE__ */ jsx17(
2275
+ /* @__PURE__ */ jsxs14(Box13, { marginTop: 1, gap: 2, children: [
2276
+ /* @__PURE__ */ jsxs14(Text15, { dimColor: true, children: [
2277
+ "/:",
2278
+ outputFocused ? "menu" : "scroll"
2279
+ ] }),
2280
+ outputFocused && /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "\u2191\u2193:scroll" }),
2281
+ /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "Esc:back" })
2282
+ ] }),
2283
+ /* @__PURE__ */ jsx15(
2243
2284
  SelectList,
2244
2285
  {
2245
2286
  items: successItems,
@@ -2247,10 +2288,10 @@ function CommandExecution({
2247
2288
  onCancel: onHome ?? onBack,
2248
2289
  width: panelMode ? Math.max(20, width - 4) : width,
2249
2290
  maxVisible: panelMode ? Math.max(6, height - 6) : void 0,
2250
- isInputActive,
2291
+ isInputActive: isInputActive && !outputFocused,
2251
2292
  arrowNavigation: panelMode,
2252
2293
  boxedSections: panelMode,
2253
- panelFocused: isInputActive
2294
+ panelFocused: isInputActive && !outputFocused
2254
2295
  }
2255
2296
  )
2256
2297
  ] });
@@ -2313,65 +2354,67 @@ function CommandExecution({
2313
2354
  value: "menu",
2314
2355
  label: "\u2190 Back to menu"
2315
2356
  });
2316
- return /* @__PURE__ */ jsxs15(Box13, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: [
2317
- /* @__PURE__ */ jsx17(Divider, { width: panelMode ? width - 4 : width }),
2318
- result?.spawnError ? /* @__PURE__ */ jsxs15(Box13, { flexDirection: "column", marginY: 1, children: [
2319
- /* @__PURE__ */ jsxs15(Box13, { gap: 1, children: [
2320
- /* @__PURE__ */ jsx17(Text17, { color: "red", bold: true, children: "\u2717" }),
2321
- /* @__PURE__ */ jsx17(Text17, { color: "red", bold: true, children: "Failed to start command" })
2322
- ] }),
2323
- /* @__PURE__ */ jsxs15(Box13, { marginLeft: 2, marginTop: 1, children: [
2324
- /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: "Error: " }),
2325
- /* @__PURE__ */ jsx17(Text17, { color: "red", children: result.spawnError })
2326
- ] }),
2327
- (result.spawnError.includes("ENOENT") || result.spawnError.includes("not found")) && /* @__PURE__ */ jsx17(Box13, { flexDirection: "column", marginLeft: 2, marginTop: 1, children: /* @__PURE__ */ jsxs15(Text17, { color: inkColors.accent, bold: true, children: [
2328
- "\u{1F4A1}",
2357
+ const errorOutput = [result?.stdout, result?.stderr].filter(Boolean).join("\n");
2358
+ const errorLines = errorOutput ? stripAnsi(errorOutput).split("\n") : [];
2359
+ const errorLogHeight = Math.max(3, height - 8 - Math.min(errorItems.length, 6) - (copyMessage ? 1 : 0));
2360
+ const errorCardWidth = Math.max(30, (panelMode ? width - 4 : width) - 2);
2361
+ const errorStatusLabel = result?.spawnError ? "spawn error" : `exit ${result?.exitCode}`;
2362
+ return /* @__PURE__ */ jsxs14(Box13, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: [
2363
+ /* @__PURE__ */ jsxs14(Box13, { marginBottom: 1, gap: 1, children: [
2364
+ /* @__PURE__ */ jsxs14(Text15, { color: "red", bold: true, children: [
2365
+ "\u2717",
2329
2366
  " ",
2367
+ cmdDisplay
2368
+ ] }),
2369
+ /* @__PURE__ */ jsx15(ToolBadge, { tool }),
2370
+ /* @__PURE__ */ jsxs14(Text15, { color: "red", children: [
2371
+ "\u25CF ",
2372
+ errorStatusLabel
2373
+ ] })
2374
+ ] }),
2375
+ result?.spawnError && /* @__PURE__ */ jsxs14(Box13, { marginBottom: 1, children: [
2376
+ /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "Error: " }),
2377
+ /* @__PURE__ */ jsx15(Text15, { color: "red", children: result.spawnError }),
2378
+ (result.spawnError.includes("ENOENT") || result.spawnError.includes("not found")) && /* @__PURE__ */ jsxs14(Text15, { color: inkColors.accent, children: [
2379
+ " \u2014 ",
2330
2380
  tool,
2331
2381
  " CLI not found in this repository or PATH"
2332
- ] }) })
2333
- ] }) : /* @__PURE__ */ jsxs15(Box13, { flexDirection: "column", marginY: 1, children: [
2334
- /* @__PURE__ */ jsxs15(Box13, { gap: 1, children: [
2335
- /* @__PURE__ */ jsx17(Text17, { color: "red", bold: true, children: "\u2717" }),
2336
- /* @__PURE__ */ jsx17(Text17, { color: "red", children: "Command failed " }),
2337
- /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: "(exit code " }),
2338
- /* @__PURE__ */ jsx17(Text17, { color: "red", bold: true, children: String(result?.exitCode) }),
2339
- /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: ")" })
2340
- ] }),
2341
- /* @__PURE__ */ jsxs15(Box13, { marginLeft: 2, marginTop: 1, children: [
2342
- /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: "Command: " }),
2343
- /* @__PURE__ */ jsx17(Text17, { children: cmdDisplay })
2344
- ] }),
2345
- !hasDebug && /* @__PURE__ */ jsxs15(Box13, { marginLeft: 2, marginTop: 1, gap: 1, children: [
2346
- /* @__PURE__ */ jsxs15(Text17, { dimColor: true, children: [
2347
- "\u{1F4A1}",
2348
- " Tip: retry with"
2349
- ] }),
2350
- /* @__PURE__ */ jsx17(Text17, { color: inkColors.accent, children: "--debug" }),
2351
- /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: "to see detailed logs" })
2352
2382
  ] })
2353
2383
  ] }),
2354
- /* @__PURE__ */ jsx17(
2355
- CommandOutput,
2384
+ !result?.spawnError && !hasDebug && /* @__PURE__ */ jsxs14(Box13, { marginBottom: 1, gap: 1, children: [
2385
+ /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "\u{1F4A1} Tip: retry with" }),
2386
+ /* @__PURE__ */ jsx15(Text15, { color: inkColors.accent, children: "--debug" }),
2387
+ /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "to see detailed logs" })
2388
+ ] }),
2389
+ /* @__PURE__ */ jsx15(
2390
+ Box13,
2356
2391
  {
2357
- stdout: result?.stdout,
2358
- stderr: result?.stderr,
2359
- height: Math.max(3, height - 14 - errorItems.length - (suggestions.length > 0 ? suggestions.length + 4 : 0) - (copyMessage ? 1 : 0)),
2360
- isActive: isInputActive && outputFocused
2392
+ flexDirection: "column",
2393
+ borderStyle: "round",
2394
+ borderColor: outputFocused ? "red" : panel.borderDim,
2395
+ paddingX: 1,
2396
+ width: errorCardWidth,
2397
+ children: /* @__PURE__ */ jsx15(
2398
+ ScrollableBox,
2399
+ {
2400
+ height: errorLogHeight,
2401
+ isActive: isInputActive && outputFocused,
2402
+ autoScrollToBottom: true,
2403
+ children: errorLines.length === 0 ? [/* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "No output" }, "empty")] : errorLines.map((line, i) => /* @__PURE__ */ jsx15(Text15, { wrap: "truncate", children: line }, i))
2404
+ }
2405
+ )
2361
2406
  }
2362
2407
  ),
2363
- copyMessage && /* @__PURE__ */ jsx17(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx17(Text17, { color: inkColors.accent, children: copyMessage }) }),
2364
- outputFocused ? /* @__PURE__ */ jsxs15(Box13, { marginTop: 1, children: [
2365
- /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: "j/k scroll \xB7 " }),
2366
- /* @__PURE__ */ jsx17(Text17, { color: inkColors.accent, children: "Esc" }),
2367
- /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: " back to menu" })
2368
- ] }) : /* @__PURE__ */ jsxs15(Box13, { marginTop: 1, marginBottom: 1, children: [
2369
- /* @__PURE__ */ jsx17(Text17, { bold: true, children: "What would you like to do?" }),
2370
- /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: " (press " }),
2371
- /* @__PURE__ */ jsx17(Text17, { color: inkColors.accent, children: "o" }),
2372
- /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: " to scroll output)" })
2408
+ copyMessage && /* @__PURE__ */ jsx15(Box13, { children: /* @__PURE__ */ jsx15(Text15, { color: inkColors.accent, children: copyMessage }) }),
2409
+ /* @__PURE__ */ jsxs14(Box13, { marginTop: 1, gap: 2, children: [
2410
+ /* @__PURE__ */ jsxs14(Text15, { dimColor: true, children: [
2411
+ "/:",
2412
+ outputFocused ? "menu" : "scroll"
2413
+ ] }),
2414
+ outputFocused && /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "\u2191\u2193:scroll" }),
2415
+ /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: "Esc:back" })
2373
2416
  ] }),
2374
- /* @__PURE__ */ jsx17(
2417
+ /* @__PURE__ */ jsx15(
2375
2418
  SelectList,
2376
2419
  {
2377
2420
  items: errorItems,
@@ -2395,6 +2438,8 @@ function CommandExecution({
2395
2438
  case "retry":
2396
2439
  setPinMessage(void 0);
2397
2440
  setCopyMessage(void 0);
2441
+ setAborting(false);
2442
+ setFeedback(void 0);
2398
2443
  reset();
2399
2444
  setPhase("running");
2400
2445
  break;
@@ -2403,6 +2448,8 @@ function CommandExecution({
2403
2448
  setCurrentArgs(newArgs);
2404
2449
  setPinMessage(void 0);
2405
2450
  setCopyMessage(void 0);
2451
+ setAborting(false);
2452
+ setFeedback(void 0);
2406
2453
  reset();
2407
2454
  setPhase("running");
2408
2455
  break;
@@ -2441,13 +2488,54 @@ function CommandExecution({
2441
2488
  panelFocused: isInputActive && !outputFocused
2442
2489
  }
2443
2490
  ),
2444
- !panelMode && /* @__PURE__ */ jsx17(StatusBar, { width })
2491
+ !panelMode && /* @__PURE__ */ jsx15(StatusBar, { width })
2445
2492
  ] });
2446
2493
  }
2447
2494
 
2448
2495
  // src/screens/SelfUpdate.tsx
2449
2496
  import { useEffect as useEffect10, useState as useState13 } from "react";
2450
2497
  import { Box as Box14, Text as Text18 } from "ink";
2498
+
2499
+ // src/components/Spinner.tsx
2500
+ import { Text as Text16 } from "ink";
2501
+ import InkSpinner from "ink-spinner";
2502
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
2503
+ function Spinner({
2504
+ label = "Running...",
2505
+ color = inkColors.accent
2506
+ }) {
2507
+ return /* @__PURE__ */ jsxs15(Text16, { children: [
2508
+ /* @__PURE__ */ jsx16(Text16, { color, children: /* @__PURE__ */ jsx16(InkSpinner, { type: "dots" }) }),
2509
+ " ",
2510
+ /* @__PURE__ */ jsx16(Text16, { children: label })
2511
+ ] });
2512
+ }
2513
+
2514
+ // src/components/CommandOutput.tsx
2515
+ import { Text as Text17 } from "ink";
2516
+ import { jsx as jsx17 } from "react/jsx-runtime";
2517
+ function cleanLines(raw) {
2518
+ const stripped = stripAnsi(raw);
2519
+ return stripped.replace(/\r/g, "").split("\n").filter((line) => line.length > 0);
2520
+ }
2521
+ function CommandOutput({
2522
+ stdout,
2523
+ stderr,
2524
+ height,
2525
+ isActive = false
2526
+ }) {
2527
+ const outLines = stdout ? cleanLines(stdout) : [];
2528
+ const errLines = stderr ? cleanLines(stderr) : [];
2529
+ if (outLines.length === 0 && errLines.length === 0) {
2530
+ return null;
2531
+ }
2532
+ return /* @__PURE__ */ jsx17(ScrollableBox, { height: Math.max(3, height), isActive, children: [
2533
+ ...outLines.map((line, i) => /* @__PURE__ */ jsx17(Text17, { children: line }, `o-${i}`)),
2534
+ ...errLines.map((line, i) => /* @__PURE__ */ jsx17(Text17, { color: "red", children: line }, `e-${i}`))
2535
+ ] });
2536
+ }
2537
+
2538
+ // src/screens/SelfUpdate.tsx
2451
2539
  import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
2452
2540
  var packageName = "@polterware/polter";
2453
2541
  var globalUpdateArgs = ["install", "-g", `${packageName}@latest`];
@@ -5117,8 +5205,90 @@ function ScriptPicker({
5117
5205
  ] });
5118
5206
  }
5119
5207
 
5120
- // src/app.tsx
5208
+ // src/screens/SkillSetup.tsx
5209
+ import { useState as useState26 } from "react";
5210
+ import { Box as Box29, Text as Text33 } from "ink";
5121
5211
  import { jsx as jsx32, jsxs as jsxs31 } from "react/jsx-runtime";
5212
+ function SkillSetup({
5213
+ onBack,
5214
+ width = 80,
5215
+ height = 24,
5216
+ panelMode = false,
5217
+ isInputActive = true
5218
+ }) {
5219
+ const [phase, setPhase] = useState26("preview");
5220
+ const [resultStatus, setResultStatus] = useState26(null);
5221
+ const skillPath = getSkillPath();
5222
+ if (phase === "preview") {
5223
+ const content = getSkillContent();
5224
+ const previewLines = content.split("\n").slice(0, Math.max(8, height - 12));
5225
+ const items2 = [
5226
+ { value: "install", label: "Install skill", kind: "action" },
5227
+ ...!panelMode ? [{ value: "__back__", label: "\u2190 Back" }] : []
5228
+ ];
5229
+ const handleSelect = (value) => {
5230
+ if (value === "install") {
5231
+ const result = setupSkill();
5232
+ setResultStatus(result.status);
5233
+ setPhase("done");
5234
+ } else {
5235
+ onBack();
5236
+ }
5237
+ };
5238
+ return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: [
5239
+ /* @__PURE__ */ jsx32(Box29, { marginBottom: 1, children: /* @__PURE__ */ jsx32(Text33, { bold: true, color: inkColors.accent, children: "Preview: ~/.claude/skills/polter/SKILL.md" }) }),
5240
+ /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", marginBottom: 1, marginLeft: panelMode ? 1 : 2, children: [
5241
+ previewLines.map((line, i) => /* @__PURE__ */ jsx32(Text33, { dimColor: true, children: line }, i)),
5242
+ content.split("\n").length > previewLines.length && /* @__PURE__ */ jsx32(Text33, { dimColor: true, children: " ..." })
5243
+ ] }),
5244
+ /* @__PURE__ */ jsx32(Box29, { marginBottom: 1, children: /* @__PURE__ */ jsxs31(Text33, { dimColor: true, children: [
5245
+ "Path: ",
5246
+ skillPath
5247
+ ] }) }),
5248
+ /* @__PURE__ */ jsx32(
5249
+ SelectList,
5250
+ {
5251
+ items: items2,
5252
+ onSelect: handleSelect,
5253
+ onCancel: onBack,
5254
+ width: panelMode ? Math.max(20, width - 4) : width,
5255
+ isInputActive,
5256
+ arrowNavigation: panelMode,
5257
+ panelFocused: panelMode ? isInputActive : void 0
5258
+ }
5259
+ ),
5260
+ !panelMode && /* @__PURE__ */ jsx32(StatusBar, { hint: "Enter select \\u00B7 Esc back", width })
5261
+ ] });
5262
+ }
5263
+ const statusMessage = resultStatus === "created" ? "\u2713 Skill installed successfully!" : resultStatus === "updated" ? "\u2713 Skill updated successfully!" : "\u2713 Skill already up to date.";
5264
+ const items = [
5265
+ ...!panelMode ? [{ value: "__back__", label: "\u2190 Back" }] : []
5266
+ ];
5267
+ return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", paddingX: panelMode ? 1 : 0, children: [
5268
+ /* @__PURE__ */ jsx32(Box29, { marginBottom: 1, children: /* @__PURE__ */ jsx32(Text33, { color: inkColors.accent, children: statusMessage }) }),
5269
+ /* @__PURE__ */ jsx32(Box29, { marginBottom: 1, children: /* @__PURE__ */ jsxs31(Text33, { dimColor: true, children: [
5270
+ "Path: ",
5271
+ skillPath
5272
+ ] }) }),
5273
+ /* @__PURE__ */ jsx32(Box29, { marginBottom: 1, children: /* @__PURE__ */ jsx32(Text33, { dimColor: true, children: "Use /polter in Claude Code to activate the skill." }) }),
5274
+ items.length > 0 && /* @__PURE__ */ jsx32(
5275
+ SelectList,
5276
+ {
5277
+ items,
5278
+ onSelect: onBack,
5279
+ onCancel: onBack,
5280
+ width: panelMode ? Math.max(20, width - 4) : width,
5281
+ isInputActive,
5282
+ arrowNavigation: panelMode,
5283
+ panelFocused: panelMode ? isInputActive : void 0
5284
+ }
5285
+ ),
5286
+ !panelMode && /* @__PURE__ */ jsx32(StatusBar, { hint: "Esc back", width })
5287
+ ] });
5288
+ }
5289
+
5290
+ // src/app.tsx
5291
+ import { jsx as jsx33, jsxs as jsxs32 } from "react/jsx-runtime";
5122
5292
  function AppClassic() {
5123
5293
  const { screen, params, navigate, goBack, goHome } = useNavigation();
5124
5294
  const { exit } = useApp();
@@ -5133,9 +5303,9 @@ function AppClassic() {
5133
5303
  const renderScreen = () => {
5134
5304
  switch (screen) {
5135
5305
  case "home":
5136
- return /* @__PURE__ */ jsx32(Home, { onNavigate: navigate, onExit: handleExit, width, height });
5306
+ return /* @__PURE__ */ jsx33(Home, { onNavigate: navigate, onExit: handleExit, width, height });
5137
5307
  case "command-args":
5138
- return /* @__PURE__ */ jsx32(
5308
+ return /* @__PURE__ */ jsx33(
5139
5309
  CommandArgs,
5140
5310
  {
5141
5311
  command: params.command ?? "",
@@ -5146,9 +5316,9 @@ function AppClassic() {
5146
5316
  }
5147
5317
  );
5148
5318
  case "custom-command":
5149
- return /* @__PURE__ */ jsx32(CustomCommand, { onNavigate: navigate, onBack: goBack, width });
5319
+ return /* @__PURE__ */ jsx33(CustomCommand, { onNavigate: navigate, onBack: goBack, width });
5150
5320
  case "flag-selection":
5151
- return /* @__PURE__ */ jsx32(
5321
+ return /* @__PURE__ */ jsx33(
5152
5322
  FlagSelection,
5153
5323
  {
5154
5324
  args: params.args ?? [],
@@ -5160,7 +5330,7 @@ function AppClassic() {
5160
5330
  );
5161
5331
  case "confirm-execute":
5162
5332
  case "command-execution":
5163
- return /* @__PURE__ */ jsx32(
5333
+ return /* @__PURE__ */ jsx33(
5164
5334
  CommandExecution,
5165
5335
  {
5166
5336
  args: params.args ?? [],
@@ -5176,23 +5346,23 @@ function AppClassic() {
5176
5346
  }
5177
5347
  );
5178
5348
  case "self-update":
5179
- return /* @__PURE__ */ jsx32(SelfUpdate, { onBack: goBack, onExit: handleExit, width });
5349
+ return /* @__PURE__ */ jsx33(SelfUpdate, { onBack: goBack, onExit: handleExit, width });
5180
5350
  case "tool-status":
5181
- return /* @__PURE__ */ jsx32(ToolStatus, { onBack: goBack, onNavigate: navigate, width });
5351
+ return /* @__PURE__ */ jsx33(ToolStatus, { onBack: goBack, onNavigate: navigate, width });
5182
5352
  case "mcp-manage":
5183
- return /* @__PURE__ */ jsx32(McpManage, { onBack: goBack, width });
5353
+ return /* @__PURE__ */ jsx33(McpManage, { onBack: goBack, width });
5184
5354
  case "process-list":
5185
- return /* @__PURE__ */ jsx32(ProcessList, { onNavigate: navigate, onBack: goBack, width, height });
5355
+ return /* @__PURE__ */ jsx33(ProcessList, { onNavigate: navigate, onBack: goBack, width, height });
5186
5356
  case "process-logs":
5187
- return /* @__PURE__ */ jsx32(ProcessLogs, { processId: params.processId ?? "", onBack: goBack, width, height });
5357
+ return /* @__PURE__ */ jsx33(ProcessLogs, { processId: params.processId ?? "", onBack: goBack, width, height });
5188
5358
  case "project-config":
5189
- return /* @__PURE__ */ jsx32(ProjectConfig, { onBack: goBack, width });
5359
+ return /* @__PURE__ */ jsx33(ProjectConfig, { onBack: goBack, width });
5190
5360
  case "pipeline-list":
5191
- return /* @__PURE__ */ jsx32(PipelineList, { onNavigate: navigate, onBack: goBack, width });
5361
+ return /* @__PURE__ */ jsx33(PipelineList, { onNavigate: navigate, onBack: goBack, width });
5192
5362
  case "pipeline-builder":
5193
- return /* @__PURE__ */ jsx32(PipelineBuilder, { onBack: goBack, width, height });
5363
+ return /* @__PURE__ */ jsx33(PipelineBuilder, { onBack: goBack, width, height });
5194
5364
  case "pipeline-execution":
5195
- return /* @__PURE__ */ jsx32(
5365
+ return /* @__PURE__ */ jsx33(
5196
5366
  PipelineExecution,
5197
5367
  {
5198
5368
  pipelineId: params.pipelineId ?? "",
@@ -5202,34 +5372,36 @@ function AppClassic() {
5202
5372
  }
5203
5373
  );
5204
5374
  case "declarative-plan":
5205
- return /* @__PURE__ */ jsx32(DeclarativePlan, { onBack: goBack, onNavigate: navigate, width, height });
5375
+ return /* @__PURE__ */ jsx33(DeclarativePlan, { onBack: goBack, onNavigate: navigate, width, height });
5206
5376
  case "declarative-status":
5207
- return /* @__PURE__ */ jsx32(DeclarativeStatus, { onBack: goBack, width, height });
5377
+ return /* @__PURE__ */ jsx33(DeclarativeStatus, { onBack: goBack, width, height });
5208
5378
  case "init-scaffold":
5209
- return /* @__PURE__ */ jsx32(InitScaffold, { onBack: goBack, onNavigate: navigate, width, height });
5379
+ return /* @__PURE__ */ jsx33(InitScaffold, { onBack: goBack, onNavigate: navigate, width, height });
5210
5380
  case "script-picker":
5211
- return /* @__PURE__ */ jsx32(ScriptPicker, { onNavigate: navigate, onBack: goBack, width, height });
5381
+ return /* @__PURE__ */ jsx33(ScriptPicker, { onNavigate: navigate, onBack: goBack, width, height });
5382
+ case "skill-setup":
5383
+ return /* @__PURE__ */ jsx33(SkillSetup, { onBack: goBack, width, height });
5212
5384
  default:
5213
- return /* @__PURE__ */ jsx32(Box29, { children: /* @__PURE__ */ jsxs31(Text33, { color: "red", children: [
5385
+ return /* @__PURE__ */ jsx33(Box30, { children: /* @__PURE__ */ jsxs32(Text34, { color: "red", children: [
5214
5386
  "Unknown screen: ",
5215
5387
  screen
5216
5388
  ] }) });
5217
5389
  }
5218
5390
  };
5219
- return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", children: [
5220
- /* @__PURE__ */ jsx32(GhostBanner, { width }),
5391
+ return /* @__PURE__ */ jsxs32(Box30, { flexDirection: "column", children: [
5392
+ /* @__PURE__ */ jsx33(GhostBanner, { width }),
5221
5393
  renderScreen()
5222
5394
  ] });
5223
5395
  }
5224
5396
 
5225
5397
  // src/appPanel.tsx
5226
- import React27 from "react";
5227
- import { Box as Box38, Text as Text40, useApp as useApp2, useInput as useInput13 } from "ink";
5398
+ import React28 from "react";
5399
+ import { Box as Box39, Text as Text41, useApp as useApp2, useInput as useInput13 } from "ink";
5228
5400
 
5229
5401
  // src/hooks/usePanelNavigation.ts
5230
- import { useState as useState26, useCallback as useCallback8 } from "react";
5402
+ import { useState as useState27, useCallback as useCallback8 } from "react";
5231
5403
  function usePanelNavigation() {
5232
- const [state, setState] = useState26({
5404
+ const [state, setState] = useState27({
5233
5405
  view: "pipelines",
5234
5406
  featureId: "database",
5235
5407
  innerScreen: "home",
@@ -5268,7 +5440,8 @@ function usePanelNavigation() {
5268
5440
  "self-update": "self-update",
5269
5441
  processes: "processes",
5270
5442
  scripts: "scripts",
5271
- declarative: "declarative"
5443
+ declarative: "declarative",
5444
+ "skill-setup": "skill-setup"
5272
5445
  };
5273
5446
  const view = viewMap[itemId];
5274
5447
  if (view) {
@@ -5335,9 +5508,9 @@ function usePanelNavigation() {
5335
5508
  }
5336
5509
 
5337
5510
  // src/hooks/usePanelFocus.ts
5338
- import { useState as useState27, useCallback as useCallback9 } from "react";
5511
+ import { useState as useState28, useCallback as useCallback9 } from "react";
5339
5512
  function usePanelFocus() {
5340
- const [focused, setFocused] = useState27("sidebar");
5513
+ const [focused, setFocused] = useState28("sidebar");
5341
5514
  const toggleFocus = useCallback9(() => {
5342
5515
  setFocused((prev) => prev === "sidebar" ? "main" : "sidebar");
5343
5516
  }, []);
@@ -5378,15 +5551,16 @@ function useSidebarItems() {
5378
5551
  items.push({ id: "declarative", label: "Infrastructure", icon: "\u{1F3D7}\uFE0F", type: "action", section: "system" });
5379
5552
  items.push({ id: "tool-status", label: "Tool Status", icon: "\u{1F527}", type: "action", section: "system" });
5380
5553
  items.push({ id: "config", label: "Config", icon: "\u2699\uFE0F", type: "action", section: "system" });
5554
+ items.push({ id: "skill-setup", label: "Skill Setup", icon: "\u{1F9E0}", type: "action", section: "system" });
5381
5555
  items.push({ id: "self-update", label: "Update", icon: "\u2B06\uFE0F", type: "action", section: "system" });
5382
5556
  return items;
5383
5557
  }, []);
5384
5558
  }
5385
5559
 
5386
5560
  // src/hooks/useModal.ts
5387
- import { useState as useState28, useCallback as useCallback10 } from "react";
5561
+ import { useState as useState29, useCallback as useCallback10 } from "react";
5388
5562
  function useModal() {
5389
- const [state, setState] = useState28(null);
5563
+ const [state, setState] = useState29(null);
5390
5564
  const openModal = useCallback10((content, title) => {
5391
5565
  setState({ content, title });
5392
5566
  }, []);
@@ -5403,8 +5577,8 @@ function useModal() {
5403
5577
  }
5404
5578
 
5405
5579
  // src/components/PanelLayout.tsx
5406
- import { Box as Box30 } from "ink";
5407
- import { jsx as jsx33, jsxs as jsxs32 } from "react/jsx-runtime";
5580
+ import { Box as Box31 } from "ink";
5581
+ import { jsx as jsx34, jsxs as jsxs33 } from "react/jsx-runtime";
5408
5582
  function PanelLayout({
5409
5583
  header,
5410
5584
  footer,
@@ -5419,19 +5593,19 @@ function PanelLayout({
5419
5593
  const contentHeight = Math.max(5, height - bannerHeight - footerHeight);
5420
5594
  const sidebarWidth = singlePanel ? 0 : panel.sidebarWidth(width);
5421
5595
  const mainWidth = singlePanel ? width : width - sidebarWidth;
5422
- return /* @__PURE__ */ jsxs32(Box30, { flexDirection: "column", width, height, children: [
5596
+ return /* @__PURE__ */ jsxs33(Box31, { flexDirection: "column", width, height, children: [
5423
5597
  header,
5424
- /* @__PURE__ */ jsxs32(Box30, { flexDirection: "row", height: contentHeight, children: [
5425
- !singlePanel && /* @__PURE__ */ jsx33(Box30, { width: sidebarWidth, height: contentHeight, children: sidebar }),
5426
- /* @__PURE__ */ jsx33(Box30, { width: mainWidth, height: contentHeight, children: main2 })
5598
+ /* @__PURE__ */ jsxs33(Box31, { flexDirection: "row", height: contentHeight, children: [
5599
+ !singlePanel && /* @__PURE__ */ jsx34(Box31, { width: sidebarWidth, height: contentHeight, children: sidebar }),
5600
+ /* @__PURE__ */ jsx34(Box31, { width: mainWidth, height: contentHeight, children: main2 })
5427
5601
  ] }),
5428
- /* @__PURE__ */ jsx33(Box30, { height: footerHeight, children: footer })
5602
+ /* @__PURE__ */ jsx34(Box31, { height: footerHeight, children: footer })
5429
5603
  ] });
5430
5604
  }
5431
5605
 
5432
5606
  // src/components/Panel.tsx
5433
- import { Box as Box31, Text as Text34 } from "ink";
5434
- import { jsx as jsx34, jsxs as jsxs33 } from "react/jsx-runtime";
5607
+ import { Box as Box32, Text as Text35 } from "ink";
5608
+ import { jsx as jsx35, jsxs as jsxs34 } from "react/jsx-runtime";
5435
5609
  function Panel({
5436
5610
  id,
5437
5611
  title,
@@ -5441,8 +5615,8 @@ function Panel({
5441
5615
  children
5442
5616
  }) {
5443
5617
  const borderColor = focused ? panel.borderFocused : panel.borderDim;
5444
- return /* @__PURE__ */ jsxs33(
5445
- Box31,
5618
+ return /* @__PURE__ */ jsxs34(
5619
+ Box32,
5446
5620
  {
5447
5621
  flexDirection: "column",
5448
5622
  width,
@@ -5451,21 +5625,21 @@ function Panel({
5451
5625
  borderColor,
5452
5626
  overflow: "hidden",
5453
5627
  children: [
5454
- title && /* @__PURE__ */ jsx34(Box31, { marginBottom: 0, children: /* @__PURE__ */ jsxs33(Text34, { color: focused ? inkColors.accent : void 0, bold: focused, dimColor: !focused, children: [
5628
+ title && /* @__PURE__ */ jsx35(Box32, { marginBottom: 0, children: /* @__PURE__ */ jsxs34(Text35, { color: focused ? inkColors.accent : void 0, bold: focused, dimColor: !focused, children: [
5455
5629
  " ",
5456
5630
  title,
5457
5631
  " "
5458
5632
  ] }) }),
5459
- /* @__PURE__ */ jsx34(Box31, { flexDirection: "column", flexGrow: 1, overflow: "hidden", children })
5633
+ /* @__PURE__ */ jsx35(Box32, { flexDirection: "column", flexGrow: 1, overflow: "hidden", children })
5460
5634
  ]
5461
5635
  }
5462
5636
  );
5463
5637
  }
5464
5638
 
5465
5639
  // src/components/Sidebar.tsx
5466
- import { useEffect as useEffect19, useMemo as useMemo10, useState as useState29 } from "react";
5467
- import { Box as Box32, Text as Text35, useInput as useInput12 } from "ink";
5468
- import { jsx as jsx35, jsxs as jsxs34 } from "react/jsx-runtime";
5640
+ import { useEffect as useEffect19, useMemo as useMemo10, useState as useState30 } from "react";
5641
+ import { Box as Box33, Text as Text36, useInput as useInput12 } from "ink";
5642
+ import { jsx as jsx36, jsxs as jsxs35 } from "react/jsx-runtime";
5469
5643
  function groupSections(items) {
5470
5644
  const groups = [];
5471
5645
  let current = null;
@@ -5492,7 +5666,7 @@ function Sidebar({
5492
5666
  [items]
5493
5667
  );
5494
5668
  const selectedIdx = selectableItems.findIndex((item) => item.id === selectedId);
5495
- const [cursorIdx, setCursorIdx] = useState29(Math.max(0, selectedIdx));
5669
+ const [cursorIdx, setCursorIdx] = useState30(Math.max(0, selectedIdx));
5496
5670
  const sections = useMemo10(() => groupSections(items), [items]);
5497
5671
  useEffect19(() => {
5498
5672
  const idx = selectableItems.findIndex((item) => item.id === selectedId);
@@ -5526,28 +5700,28 @@ function Sidebar({
5526
5700
  { isActive: isFocused }
5527
5701
  );
5528
5702
  let flatIdx = 0;
5529
- return /* @__PURE__ */ jsx35(Box32, { flexDirection: "column", gap: 0, children: sections.map((section) => {
5703
+ return /* @__PURE__ */ jsx36(Box33, { flexDirection: "column", gap: 0, children: sections.map((section) => {
5530
5704
  const sectionStartIdx = flatIdx;
5531
5705
  const sectionEndIdx = sectionStartIdx + section.items.length - 1;
5532
5706
  const hasCursorInSection = isFocused && cursorIdx >= sectionStartIdx && cursorIdx <= sectionEndIdx;
5533
5707
  const hasActiveInSection = section.items.some((item) => item.id === selectedId);
5534
5708
  const borderColor = hasCursorInSection || hasActiveInSection ? inkColors.accent : "#555555";
5535
- const rendered = /* @__PURE__ */ jsxs34(
5536
- Box32,
5709
+ const rendered = /* @__PURE__ */ jsxs35(
5710
+ Box33,
5537
5711
  {
5538
5712
  flexDirection: "column",
5539
5713
  borderStyle: "round",
5540
5714
  borderColor,
5541
5715
  paddingX: 1,
5542
5716
  children: [
5543
- /* @__PURE__ */ jsx35(Text35, { dimColor: true, bold: true, children: section.title }),
5717
+ /* @__PURE__ */ jsx36(Text36, { dimColor: true, bold: true, children: section.title }),
5544
5718
  section.items.map((item) => {
5545
5719
  const thisIdx = flatIdx;
5546
5720
  flatIdx++;
5547
5721
  const isCursor = isFocused && thisIdx === cursorIdx;
5548
5722
  const isActive = item.id === selectedId;
5549
- return /* @__PURE__ */ jsx35(Box32, { gap: 0, children: /* @__PURE__ */ jsxs34(
5550
- Text35,
5723
+ return /* @__PURE__ */ jsx36(Box33, { gap: 0, children: /* @__PURE__ */ jsxs35(
5724
+ Text36,
5551
5725
  {
5552
5726
  color: isCursor ? inkColors.accent : isActive ? inkColors.accent : void 0,
5553
5727
  bold: isCursor || isActive,
@@ -5570,12 +5744,12 @@ function Sidebar({
5570
5744
  }
5571
5745
 
5572
5746
  // src/components/PanelFooter.tsx
5573
- import { Box as Box33, Text as Text36 } from "ink";
5574
- import { jsx as jsx36, jsxs as jsxs35 } from "react/jsx-runtime";
5747
+ import { Box as Box34, Text as Text37 } from "ink";
5748
+ import { jsx as jsx37, jsxs as jsxs36 } from "react/jsx-runtime";
5575
5749
  function PanelFooter({ hints, width }) {
5576
- return /* @__PURE__ */ jsx36(Box33, { width, children: /* @__PURE__ */ jsx36(Box33, { gap: 1, children: hints.map((hint) => /* @__PURE__ */ jsxs35(Box33, { gap: 0, children: [
5577
- /* @__PURE__ */ jsx36(Text36, { color: inkColors.accent, bold: true, children: hint.key }),
5578
- /* @__PURE__ */ jsxs35(Text36, { dimColor: true, children: [
5750
+ return /* @__PURE__ */ jsx37(Box34, { width, children: /* @__PURE__ */ jsx37(Box34, { gap: 1, children: hints.map((hint) => /* @__PURE__ */ jsxs36(Box34, { gap: 0, children: [
5751
+ /* @__PURE__ */ jsx37(Text37, { color: inkColors.accent, bold: true, children: hint.key }),
5752
+ /* @__PURE__ */ jsxs36(Text37, { dimColor: true, children: [
5579
5753
  ":",
5580
5754
  hint.action
5581
5755
  ] })
@@ -5583,8 +5757,8 @@ function PanelFooter({ hints, width }) {
5583
5757
  }
5584
5758
 
5585
5759
  // src/components/Modal.tsx
5586
- import { Box as Box34, Text as Text37 } from "ink";
5587
- import { jsx as jsx37, jsxs as jsxs36 } from "react/jsx-runtime";
5760
+ import { Box as Box35, Text as Text38 } from "ink";
5761
+ import { jsx as jsx38, jsxs as jsxs37 } from "react/jsx-runtime";
5588
5762
  function Modal({
5589
5763
  title,
5590
5764
  width,
@@ -5595,10 +5769,10 @@ function Modal({
5595
5769
  const modalHeight = Math.min(height - 4, 20);
5596
5770
  const padX = Math.max(0, Math.floor((width - modalWidth) / 2));
5597
5771
  const padY = Math.max(0, Math.floor((height - modalHeight) / 2));
5598
- return /* @__PURE__ */ jsxs36(Box34, { flexDirection: "column", width, height, children: [
5599
- padY > 0 && /* @__PURE__ */ jsx37(Box34, { height: padY }),
5600
- /* @__PURE__ */ jsx37(Box34, { marginLeft: padX, children: /* @__PURE__ */ jsxs36(
5601
- Box34,
5772
+ return /* @__PURE__ */ jsxs37(Box35, { flexDirection: "column", width, height, children: [
5773
+ padY > 0 && /* @__PURE__ */ jsx38(Box35, { height: padY }),
5774
+ /* @__PURE__ */ jsx38(Box35, { marginLeft: padX, children: /* @__PURE__ */ jsxs37(
5775
+ Box35,
5602
5776
  {
5603
5777
  flexDirection: "column",
5604
5778
  width: modalWidth,
@@ -5607,8 +5781,8 @@ function Modal({
5607
5781
  borderColor: inkColors.accent,
5608
5782
  paddingX: 1,
5609
5783
  children: [
5610
- /* @__PURE__ */ jsx37(Box34, { marginBottom: 1, children: /* @__PURE__ */ jsx37(Text37, { color: inkColors.accent, bold: true, children: title }) }),
5611
- /* @__PURE__ */ jsx37(Box34, { flexDirection: "column", flexGrow: 1, overflow: "hidden", children })
5784
+ /* @__PURE__ */ jsx38(Box35, { marginBottom: 1, children: /* @__PURE__ */ jsx38(Text38, { color: inkColors.accent, bold: true, children: title }) }),
5785
+ /* @__PURE__ */ jsx38(Box35, { flexDirection: "column", flexGrow: 1, overflow: "hidden", children })
5612
5786
  ]
5613
5787
  }
5614
5788
  ) })
@@ -5616,9 +5790,9 @@ function Modal({
5616
5790
  }
5617
5791
 
5618
5792
  // src/components/FeatureCommands.tsx
5619
- import { useEffect as useEffect20, useMemo as useMemo11, useState as useState30 } from "react";
5620
- import { Box as Box35, Text as Text38 } from "ink";
5621
- import { jsx as jsx38, jsxs as jsxs37 } from "react/jsx-runtime";
5793
+ import { useEffect as useEffect20, useMemo as useMemo11, useState as useState31 } from "react";
5794
+ import { Box as Box36, Text as Text39 } from "ink";
5795
+ import { jsx as jsx39, jsxs as jsxs38 } from "react/jsx-runtime";
5622
5796
  function FeatureCommands({
5623
5797
  feature,
5624
5798
  onNavigate,
@@ -5629,9 +5803,9 @@ function FeatureCommands({
5629
5803
  height = 24,
5630
5804
  isInputActive = true
5631
5805
  }) {
5632
- const [pinnedCommands, setPinnedCommands2] = useState30(() => getPinnedCommands());
5633
- const [pinnedRuns, setPinnedRuns2] = useState30(() => getPinnedRuns());
5634
- const [pinFeedback, setPinFeedback] = useState30();
5806
+ const [pinnedCommands, setPinnedCommands2] = useState31(() => getPinnedCommands());
5807
+ const [pinnedRuns, setPinnedRuns2] = useState31(() => getPinnedRuns());
5808
+ const [pinFeedback, setPinFeedback] = useState31();
5635
5809
  useEffect20(() => {
5636
5810
  if (!pinFeedback) return;
5637
5811
  const timeout = setTimeout(() => setPinFeedback(void 0), 1400);
@@ -5700,12 +5874,12 @@ function FeatureCommands({
5700
5874
  );
5701
5875
  }
5702
5876
  };
5703
- return /* @__PURE__ */ jsxs37(Box35, { flexDirection: "column", paddingX: 1, children: [
5704
- pinFeedback && /* @__PURE__ */ jsx38(Box35, { marginBottom: 1, children: /* @__PURE__ */ jsxs37(Text38, { color: inkColors.accent, children: [
5877
+ return /* @__PURE__ */ jsxs38(Box36, { flexDirection: "column", paddingX: 1, children: [
5878
+ pinFeedback && /* @__PURE__ */ jsx39(Box36, { marginBottom: 1, children: /* @__PURE__ */ jsxs38(Text39, { color: inkColors.accent, children: [
5705
5879
  "\u2713 ",
5706
5880
  pinFeedback
5707
5881
  ] }) }),
5708
- /* @__PURE__ */ jsx38(
5882
+ /* @__PURE__ */ jsx39(
5709
5883
  SelectList,
5710
5884
  {
5711
5885
  items,
@@ -5724,9 +5898,9 @@ function FeatureCommands({
5724
5898
  }
5725
5899
 
5726
5900
  // src/components/PinnedCommands.tsx
5727
- import { useEffect as useEffect21, useMemo as useMemo12, useState as useState31 } from "react";
5728
- import { Box as Box36, Text as Text39 } from "ink";
5729
- import { jsx as jsx39, jsxs as jsxs38 } from "react/jsx-runtime";
5901
+ import { useEffect as useEffect21, useMemo as useMemo12, useState as useState32 } from "react";
5902
+ import { Box as Box37, Text as Text40 } from "ink";
5903
+ import { jsx as jsx40, jsxs as jsxs39 } from "react/jsx-runtime";
5730
5904
  function PinnedCommands({
5731
5905
  onNavigate,
5732
5906
  onBack,
@@ -5735,9 +5909,9 @@ function PinnedCommands({
5735
5909
  height = 24,
5736
5910
  isInputActive = true
5737
5911
  }) {
5738
- const [pinnedCommands, setPinnedCommands2] = useState31(() => getPinnedCommands());
5739
- const [pinnedRuns, setPinnedRuns2] = useState31(() => getPinnedRuns());
5740
- const [pinFeedback, setPinFeedback] = useState31();
5912
+ const [pinnedCommands, setPinnedCommands2] = useState32(() => getPinnedCommands());
5913
+ const [pinnedRuns, setPinnedRuns2] = useState32(() => getPinnedRuns());
5914
+ const [pinFeedback, setPinFeedback] = useState32();
5741
5915
  useEffect21(() => {
5742
5916
  if (!pinFeedback) return;
5743
5917
  const timeout = setTimeout(() => setPinFeedback(void 0), 1400);
@@ -5800,14 +5974,14 @@ function PinnedCommands({
5800
5974
  }
5801
5975
  };
5802
5976
  if (items.length === 0) {
5803
- return /* @__PURE__ */ jsx39(Box36, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ jsx39(Text39, { color: "gray", children: "No pinned items. Press p on any command to pin it." }) });
5977
+ return /* @__PURE__ */ jsx40(Box37, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ jsx40(Text40, { color: "gray", children: "No pinned items. Press p on any command to pin it." }) });
5804
5978
  }
5805
- return /* @__PURE__ */ jsxs38(Box36, { flexDirection: "column", paddingX: 1, children: [
5806
- pinFeedback && /* @__PURE__ */ jsx39(Box36, { marginBottom: 1, children: /* @__PURE__ */ jsxs38(Text39, { color: inkColors.accent, children: [
5979
+ return /* @__PURE__ */ jsxs39(Box37, { flexDirection: "column", paddingX: 1, children: [
5980
+ pinFeedback && /* @__PURE__ */ jsx40(Box37, { marginBottom: 1, children: /* @__PURE__ */ jsxs39(Text40, { color: inkColors.accent, children: [
5807
5981
  "\u2713 ",
5808
5982
  pinFeedback
5809
5983
  ] }) }),
5810
- /* @__PURE__ */ jsx39(
5984
+ /* @__PURE__ */ jsx40(
5811
5985
  SelectList,
5812
5986
  {
5813
5987
  items,
@@ -5827,8 +6001,8 @@ function PinnedCommands({
5827
6001
 
5828
6002
  // src/screens/DeclarativeHome.tsx
5829
6003
  import { useMemo as useMemo13 } from "react";
5830
- import { Box as Box37 } from "ink";
5831
- import { jsx as jsx40 } from "react/jsx-runtime";
6004
+ import { Box as Box38 } from "ink";
6005
+ import { jsx as jsx41 } from "react/jsx-runtime";
5832
6006
  var ITEMS = [
5833
6007
  { value: "declarative-plan", label: "Plan / Apply", hint: "Diff and apply polter.yaml", kind: "action" },
5834
6008
  { value: "declarative-status", label: "Infrastructure Status", hint: "Live state from CLI tools", kind: "action" },
@@ -5845,7 +6019,7 @@ function DeclarativeHome({
5845
6019
  () => (value) => onNavigate(value),
5846
6020
  [onNavigate]
5847
6021
  );
5848
- return /* @__PURE__ */ jsx40(Box37, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ jsx40(
6022
+ return /* @__PURE__ */ jsx41(Box38, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ jsx41(
5849
6023
  SelectList,
5850
6024
  {
5851
6025
  items: ITEMS,
@@ -5861,7 +6035,7 @@ function DeclarativeHome({
5861
6035
  }
5862
6036
 
5863
6037
  // src/appPanel.tsx
5864
- import { jsx as jsx41, jsxs as jsxs39 } from "react/jsx-runtime";
6038
+ import { jsx as jsx42, jsxs as jsxs40 } from "react/jsx-runtime";
5865
6039
  var screenLabels = {
5866
6040
  "command-args": "Args",
5867
6041
  "flag-selection": "Flags",
@@ -5880,7 +6054,8 @@ var screenLabels = {
5880
6054
  "declarative-plan": "Plan/Apply",
5881
6055
  "declarative-status": "Status",
5882
6056
  "init-scaffold": "Init",
5883
- "script-picker": "Scripts"
6057
+ "script-picker": "Scripts",
6058
+ "skill-setup": "Skill Setup"
5884
6059
  };
5885
6060
  function buildBreadcrumb(nav) {
5886
6061
  let base;
@@ -5917,6 +6092,9 @@ function buildBreadcrumb(nav) {
5917
6092
  case "declarative":
5918
6093
  base = "\u{1F3D7}\uFE0F Infrastructure";
5919
6094
  break;
6095
+ case "skill-setup":
6096
+ base = "\u{1F9E0} Skill Setup";
6097
+ break;
5920
6098
  default:
5921
6099
  base = nav.view;
5922
6100
  }
@@ -5949,7 +6127,7 @@ function AppPanel() {
5949
6127
  const focus = usePanelFocus();
5950
6128
  const sidebarItems = useSidebarItems();
5951
6129
  const modal = useModal();
5952
- const refreshPins = React27.useCallback(() => {
6130
+ const refreshPins = React28.useCallback(() => {
5953
6131
  }, []);
5954
6132
  const singlePanel = width < 60 || height < 15;
5955
6133
  const handleExit = () => {
@@ -5983,37 +6161,37 @@ function AppPanel() {
5983
6161
  }
5984
6162
  if (input2 === "?") {
5985
6163
  modal.openModal(
5986
- /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", children: [
5987
- /* @__PURE__ */ jsxs39(Text40, { children: [
5988
- /* @__PURE__ */ jsx41(Text40, { bold: true, children: "\u2190/\u2192" }),
6164
+ /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", children: [
6165
+ /* @__PURE__ */ jsxs40(Text41, { children: [
6166
+ /* @__PURE__ */ jsx42(Text41, { bold: true, children: "\u2190/\u2192" }),
5989
6167
  " Move between sidebar and main panel"
5990
6168
  ] }),
5991
- /* @__PURE__ */ jsxs39(Text40, { children: [
5992
- /* @__PURE__ */ jsx41(Text40, { bold: true, children: "Tab" }),
6169
+ /* @__PURE__ */ jsxs40(Text41, { children: [
6170
+ /* @__PURE__ */ jsx42(Text41, { bold: true, children: "Tab" }),
5993
6171
  " Toggle sidebar / main panel"
5994
6172
  ] }),
5995
- /* @__PURE__ */ jsxs39(Text40, { children: [
5996
- /* @__PURE__ */ jsx41(Text40, { bold: true, children: "j/k" }),
6173
+ /* @__PURE__ */ jsxs40(Text41, { children: [
6174
+ /* @__PURE__ */ jsx42(Text41, { bold: true, children: "j/k" }),
5997
6175
  " Navigate up/down"
5998
6176
  ] }),
5999
- /* @__PURE__ */ jsxs39(Text40, { children: [
6000
- /* @__PURE__ */ jsx41(Text40, { bold: true, children: "Enter" }),
6177
+ /* @__PURE__ */ jsxs40(Text41, { children: [
6178
+ /* @__PURE__ */ jsx42(Text41, { bold: true, children: "Enter" }),
6001
6179
  " Select item"
6002
6180
  ] }),
6003
- /* @__PURE__ */ jsxs39(Text40, { children: [
6004
- /* @__PURE__ */ jsx41(Text40, { bold: true, children: "Esc" }),
6181
+ /* @__PURE__ */ jsxs40(Text41, { children: [
6182
+ /* @__PURE__ */ jsx42(Text41, { bold: true, children: "Esc" }),
6005
6183
  " Go back (or return to sidebar)"
6006
6184
  ] }),
6007
- /* @__PURE__ */ jsxs39(Text40, { children: [
6008
- /* @__PURE__ */ jsx41(Text40, { bold: true, children: "q" }),
6185
+ /* @__PURE__ */ jsxs40(Text41, { children: [
6186
+ /* @__PURE__ */ jsx42(Text41, { bold: true, children: "q" }),
6009
6187
  " Quit Polter"
6010
6188
  ] }),
6011
- /* @__PURE__ */ jsxs39(Text40, { children: [
6012
- /* @__PURE__ */ jsx41(Text40, { bold: true, children: "?" }),
6189
+ /* @__PURE__ */ jsxs40(Text41, { children: [
6190
+ /* @__PURE__ */ jsx42(Text41, { bold: true, children: "?" }),
6013
6191
  " Show this help"
6014
6192
  ] }),
6015
- /* @__PURE__ */ jsxs39(Text40, { children: [
6016
- /* @__PURE__ */ jsx41(Text40, { bold: true, children: "p" }),
6193
+ /* @__PURE__ */ jsxs40(Text41, { children: [
6194
+ /* @__PURE__ */ jsx42(Text41, { bold: true, children: "p" }),
6017
6195
  " Pin/unpin command"
6018
6196
  ] })
6019
6197
  ] }),
@@ -6043,6 +6221,8 @@ function AppPanel() {
6043
6221
  return "scripts";
6044
6222
  case "declarative":
6045
6223
  return "declarative";
6224
+ case "skill-setup":
6225
+ return "skill-setup";
6046
6226
  default:
6047
6227
  return nav.featureId;
6048
6228
  }
@@ -6069,7 +6249,7 @@ function AppPanel() {
6069
6249
  }
6070
6250
  switch (nav.view) {
6071
6251
  case "pinned":
6072
- return /* @__PURE__ */ jsx41(
6252
+ return /* @__PURE__ */ jsx42(
6073
6253
  PinnedCommands,
6074
6254
  {
6075
6255
  onNavigate: nav.navigateInner,
@@ -6083,12 +6263,12 @@ function AppPanel() {
6083
6263
  case "feature": {
6084
6264
  const feature = getFeatureById(nav.featureId);
6085
6265
  if (!feature) {
6086
- return /* @__PURE__ */ jsxs39(Text40, { color: "red", children: [
6266
+ return /* @__PURE__ */ jsxs40(Text41, { color: "red", children: [
6087
6267
  "Feature not found: ",
6088
6268
  nav.featureId
6089
6269
  ] });
6090
6270
  }
6091
- return /* @__PURE__ */ jsx41(
6271
+ return /* @__PURE__ */ jsx42(
6092
6272
  FeatureCommands,
6093
6273
  {
6094
6274
  feature,
@@ -6103,7 +6283,7 @@ function AppPanel() {
6103
6283
  );
6104
6284
  }
6105
6285
  case "custom-command":
6106
- return /* @__PURE__ */ jsx41(
6286
+ return /* @__PURE__ */ jsx42(
6107
6287
  CustomCommand,
6108
6288
  {
6109
6289
  onNavigate: nav.navigateInner,
@@ -6115,7 +6295,7 @@ function AppPanel() {
6115
6295
  }
6116
6296
  );
6117
6297
  case "pipelines":
6118
- return /* @__PURE__ */ jsx41(
6298
+ return /* @__PURE__ */ jsx42(
6119
6299
  PipelineList,
6120
6300
  {
6121
6301
  onNavigate: nav.navigateInner,
@@ -6127,7 +6307,7 @@ function AppPanel() {
6127
6307
  }
6128
6308
  );
6129
6309
  case "tool-status":
6130
- return /* @__PURE__ */ jsx41(
6310
+ return /* @__PURE__ */ jsx42(
6131
6311
  ToolStatus,
6132
6312
  {
6133
6313
  onBack: focus.focusSidebar,
@@ -6139,7 +6319,7 @@ function AppPanel() {
6139
6319
  }
6140
6320
  );
6141
6321
  case "processes":
6142
- return /* @__PURE__ */ jsx41(
6322
+ return /* @__PURE__ */ jsx42(
6143
6323
  ProcessList,
6144
6324
  {
6145
6325
  onNavigate: nav.navigateInner,
@@ -6151,7 +6331,7 @@ function AppPanel() {
6151
6331
  }
6152
6332
  );
6153
6333
  case "scripts":
6154
- return /* @__PURE__ */ jsx41(
6334
+ return /* @__PURE__ */ jsx42(
6155
6335
  ScriptPicker,
6156
6336
  {
6157
6337
  onNavigate: nav.navigateInner,
@@ -6163,7 +6343,7 @@ function AppPanel() {
6163
6343
  }
6164
6344
  );
6165
6345
  case "declarative":
6166
- return /* @__PURE__ */ jsx41(
6346
+ return /* @__PURE__ */ jsx42(
6167
6347
  DeclarativeHome,
6168
6348
  {
6169
6349
  onNavigate: nav.navigateInner,
@@ -6173,8 +6353,19 @@ function AppPanel() {
6173
6353
  isInputActive: focus.isMainFocused
6174
6354
  }
6175
6355
  );
6356
+ case "skill-setup":
6357
+ return /* @__PURE__ */ jsx42(
6358
+ SkillSetup,
6359
+ {
6360
+ onBack: focus.focusSidebar,
6361
+ width: mainContentWidth - 2,
6362
+ height: mainContentHeight,
6363
+ panelMode: true,
6364
+ isInputActive: focus.isMainFocused
6365
+ }
6366
+ );
6176
6367
  case "config":
6177
- return /* @__PURE__ */ jsx41(
6368
+ return /* @__PURE__ */ jsx42(
6178
6369
  ProjectConfig,
6179
6370
  {
6180
6371
  onBack: focus.focusSidebar,
@@ -6185,7 +6376,7 @@ function AppPanel() {
6185
6376
  }
6186
6377
  );
6187
6378
  case "self-update":
6188
- return /* @__PURE__ */ jsx41(
6379
+ return /* @__PURE__ */ jsx42(
6189
6380
  SelfUpdate,
6190
6381
  {
6191
6382
  onBack: focus.focusSidebar,
@@ -6197,7 +6388,7 @@ function AppPanel() {
6197
6388
  }
6198
6389
  );
6199
6390
  default:
6200
- return /* @__PURE__ */ jsx41(Text40, { children: "Select an item from the sidebar" });
6391
+ return /* @__PURE__ */ jsx42(Text41, { children: "Select an item from the sidebar" });
6201
6392
  }
6202
6393
  };
6203
6394
  const renderInnerScreen = () => {
@@ -6205,7 +6396,7 @@ function AppPanel() {
6205
6396
  const w = mainContentWidth - 2;
6206
6397
  switch (nav.innerScreen) {
6207
6398
  case "command-args":
6208
- return /* @__PURE__ */ jsx41(
6399
+ return /* @__PURE__ */ jsx42(
6209
6400
  CommandArgs,
6210
6401
  {
6211
6402
  command: nav.innerParams.command ?? "",
@@ -6218,7 +6409,7 @@ function AppPanel() {
6218
6409
  }
6219
6410
  );
6220
6411
  case "custom-command":
6221
- return /* @__PURE__ */ jsx41(
6412
+ return /* @__PURE__ */ jsx42(
6222
6413
  CustomCommand,
6223
6414
  {
6224
6415
  onNavigate: nav.navigateInner,
@@ -6230,7 +6421,7 @@ function AppPanel() {
6230
6421
  }
6231
6422
  );
6232
6423
  case "flag-selection":
6233
- return /* @__PURE__ */ jsx41(
6424
+ return /* @__PURE__ */ jsx42(
6234
6425
  FlagSelection,
6235
6426
  {
6236
6427
  args: nav.innerParams.args ?? [],
@@ -6246,7 +6437,7 @@ function AppPanel() {
6246
6437
  );
6247
6438
  case "confirm-execute":
6248
6439
  case "command-execution":
6249
- return /* @__PURE__ */ jsx41(
6440
+ return /* @__PURE__ */ jsx42(
6250
6441
  CommandExecution,
6251
6442
  {
6252
6443
  args: nav.innerParams.args ?? [],
@@ -6267,7 +6458,7 @@ function AppPanel() {
6267
6458
  `${nav.view}-${nav.innerParams.tool}-${(nav.innerParams.args ?? []).join("-")}`
6268
6459
  );
6269
6460
  case "pipeline-list":
6270
- return /* @__PURE__ */ jsx41(
6461
+ return /* @__PURE__ */ jsx42(
6271
6462
  PipelineList,
6272
6463
  {
6273
6464
  onNavigate: nav.navigateInner,
@@ -6279,7 +6470,7 @@ function AppPanel() {
6279
6470
  }
6280
6471
  );
6281
6472
  case "pipeline-builder":
6282
- return /* @__PURE__ */ jsx41(
6473
+ return /* @__PURE__ */ jsx42(
6283
6474
  PipelineBuilder,
6284
6475
  {
6285
6476
  onBack: nav.goBackInner,
@@ -6290,7 +6481,7 @@ function AppPanel() {
6290
6481
  }
6291
6482
  );
6292
6483
  case "pipeline-execution":
6293
- return /* @__PURE__ */ jsx41(
6484
+ return /* @__PURE__ */ jsx42(
6294
6485
  PipelineExecution,
6295
6486
  {
6296
6487
  pipelineId: nav.innerParams.pipelineId ?? "",
@@ -6302,7 +6493,7 @@ function AppPanel() {
6302
6493
  }
6303
6494
  );
6304
6495
  case "self-update":
6305
- return /* @__PURE__ */ jsx41(
6496
+ return /* @__PURE__ */ jsx42(
6306
6497
  SelfUpdate,
6307
6498
  {
6308
6499
  onBack: nav.goBackInner,
@@ -6314,7 +6505,7 @@ function AppPanel() {
6314
6505
  }
6315
6506
  );
6316
6507
  case "tool-status":
6317
- return /* @__PURE__ */ jsx41(
6508
+ return /* @__PURE__ */ jsx42(
6318
6509
  ToolStatus,
6319
6510
  {
6320
6511
  onBack: nav.goBackInner,
@@ -6326,7 +6517,7 @@ function AppPanel() {
6326
6517
  }
6327
6518
  );
6328
6519
  case "mcp-manage":
6329
- return /* @__PURE__ */ jsx41(
6520
+ return /* @__PURE__ */ jsx42(
6330
6521
  McpManage,
6331
6522
  {
6332
6523
  onBack: nav.goBackInner,
@@ -6337,7 +6528,7 @@ function AppPanel() {
6337
6528
  }
6338
6529
  );
6339
6530
  case "process-list":
6340
- return /* @__PURE__ */ jsx41(
6531
+ return /* @__PURE__ */ jsx42(
6341
6532
  ProcessList,
6342
6533
  {
6343
6534
  onNavigate: nav.navigateInner,
@@ -6349,7 +6540,7 @@ function AppPanel() {
6349
6540
  }
6350
6541
  );
6351
6542
  case "process-logs":
6352
- return /* @__PURE__ */ jsx41(
6543
+ return /* @__PURE__ */ jsx42(
6353
6544
  ProcessLogs,
6354
6545
  {
6355
6546
  processId: nav.innerParams.processId ?? "",
@@ -6361,7 +6552,7 @@ function AppPanel() {
6361
6552
  }
6362
6553
  );
6363
6554
  case "project-config":
6364
- return /* @__PURE__ */ jsx41(
6555
+ return /* @__PURE__ */ jsx42(
6365
6556
  ProjectConfig,
6366
6557
  {
6367
6558
  onBack: nav.goBackInner,
@@ -6372,7 +6563,7 @@ function AppPanel() {
6372
6563
  }
6373
6564
  );
6374
6565
  case "declarative-plan":
6375
- return /* @__PURE__ */ jsx41(
6566
+ return /* @__PURE__ */ jsx42(
6376
6567
  DeclarativePlan,
6377
6568
  {
6378
6569
  onBack: nav.goBackInner,
@@ -6384,7 +6575,7 @@ function AppPanel() {
6384
6575
  }
6385
6576
  );
6386
6577
  case "declarative-status":
6387
- return /* @__PURE__ */ jsx41(
6578
+ return /* @__PURE__ */ jsx42(
6388
6579
  DeclarativeStatus,
6389
6580
  {
6390
6581
  onBack: nav.goBackInner,
@@ -6395,7 +6586,7 @@ function AppPanel() {
6395
6586
  }
6396
6587
  );
6397
6588
  case "init-scaffold":
6398
- return /* @__PURE__ */ jsx41(
6589
+ return /* @__PURE__ */ jsx42(
6399
6590
  InitScaffold,
6400
6591
  {
6401
6592
  onBack: nav.goBackInner,
@@ -6407,7 +6598,7 @@ function AppPanel() {
6407
6598
  }
6408
6599
  );
6409
6600
  case "script-picker":
6410
- return /* @__PURE__ */ jsx41(
6601
+ return /* @__PURE__ */ jsx42(
6411
6602
  ScriptPicker,
6412
6603
  {
6413
6604
  onNavigate: nav.navigateInner,
@@ -6418,18 +6609,29 @@ function AppPanel() {
6418
6609
  isInputActive: isActive
6419
6610
  }
6420
6611
  );
6612
+ case "skill-setup":
6613
+ return /* @__PURE__ */ jsx42(
6614
+ SkillSetup,
6615
+ {
6616
+ onBack: nav.goBackInner,
6617
+ width: w,
6618
+ height: mainContentHeight,
6619
+ panelMode: true,
6620
+ isInputActive: isActive
6621
+ }
6622
+ );
6421
6623
  default:
6422
- return /* @__PURE__ */ jsxs39(Text40, { color: "red", children: [
6624
+ return /* @__PURE__ */ jsxs40(Text41, { color: "red", children: [
6423
6625
  "Unknown screen: ",
6424
6626
  nav.innerScreen
6425
6627
  ] });
6426
6628
  }
6427
6629
  };
6428
6630
  if (modal.isOpen) {
6429
- return /* @__PURE__ */ jsx41(Box38, { flexDirection: "column", width, height, children: /* @__PURE__ */ jsx41(Modal, { title: modal.modalTitle, width, height, children: modal.modalContent }) });
6631
+ return /* @__PURE__ */ jsx42(Box39, { flexDirection: "column", width, height, children: /* @__PURE__ */ jsx42(Modal, { title: modal.modalTitle, width, height, children: modal.modalContent }) });
6430
6632
  }
6431
- const header = /* @__PURE__ */ jsx41(GhostBanner, { width, compact: true });
6432
- const sidebar = /* @__PURE__ */ jsx41(
6633
+ const header = /* @__PURE__ */ jsx42(GhostBanner, { width, compact: true });
6634
+ const sidebar = /* @__PURE__ */ jsx42(
6433
6635
  Panel,
6434
6636
  {
6435
6637
  id: "sidebar",
@@ -6437,7 +6639,7 @@ function AppPanel() {
6437
6639
  width: Math.max(20, Math.min(35, Math.floor(width * 0.3))),
6438
6640
  height: Math.max(5, height - bannerHeight - 1),
6439
6641
  focused: focus.isSidebarFocused,
6440
- children: /* @__PURE__ */ jsx41(
6642
+ children: /* @__PURE__ */ jsx42(
6441
6643
  Sidebar,
6442
6644
  {
6443
6645
  items: sidebarItems,
@@ -6450,7 +6652,7 @@ function AppPanel() {
6450
6652
  )
6451
6653
  }
6452
6654
  );
6453
- const main2 = /* @__PURE__ */ jsx41(
6655
+ const main2 = /* @__PURE__ */ jsx42(
6454
6656
  Panel,
6455
6657
  {
6456
6658
  id: "main",
@@ -6461,8 +6663,8 @@ function AppPanel() {
6461
6663
  children: renderMainContent()
6462
6664
  }
6463
6665
  );
6464
- const footer = /* @__PURE__ */ jsx41(PanelFooter, { hints: footerHints, width });
6465
- return /* @__PURE__ */ jsx41(
6666
+ const footer = /* @__PURE__ */ jsx42(PanelFooter, { hints: footerHints, width });
6667
+ return /* @__PURE__ */ jsx42(
6466
6668
  PanelLayout,
6467
6669
  {
6468
6670
  header,
@@ -6527,6 +6729,9 @@ function parseCliArgs(argv) {
6527
6729
  if (argv_[0] === "apply") {
6528
6730
  return { mode: "apply", options: {} };
6529
6731
  }
6732
+ if (argv_[0] === "setup") {
6733
+ return { mode: "setup", options: {} };
6734
+ }
6530
6735
  if (argv_[0] === "status") {
6531
6736
  return { mode: "status", options: {} };
6532
6737
  }
@@ -6600,6 +6805,7 @@ function printCliHelp() {
6600
6805
  " polter config --edit Open config in $EDITOR",
6601
6806
  " polter plan Show declarative state diff",
6602
6807
  " polter apply Apply declarative state changes",
6808
+ " polter setup Install Polter skill for Claude Code",
6603
6809
  " polter status Show current tool status",
6604
6810
  " polter mcp install Install Polter MCP server into Claude Code (local scope)",
6605
6811
  " polter mcp install --project Install for this project only (shared via repo)",
@@ -7451,6 +7657,10 @@ async function main() {
7451
7657
  }
7452
7658
  return;
7453
7659
  }
7660
+ if (parsed.mode === "setup") {
7661
+ setupSkillCli();
7662
+ return;
7663
+ }
7454
7664
  if (parsed.mode === "app") {
7455
7665
  const exitCode = await runAppCli(parsed.options);
7456
7666
  process.exit(exitCode);
@@ -7576,13 +7786,21 @@ Apply completed with ${errors.length} error(s).
7576
7786
  process.exit(result.exitCode ?? 0);
7577
7787
  }
7578
7788
  const AppComponent2 = parsed.classic ? AppClassic : AppPanel;
7579
- const inst = render(React28.createElement(AppComponent2));
7789
+ const socketPath2 = getSocketPath();
7790
+ const ipc2 = socketPath2 ? createIpcServer(socketPath2) : null;
7791
+ if (ipc2) await ipc2.start();
7792
+ const inst = render(React29.createElement(AppComponent2));
7580
7793
  await inst.waitUntilExit();
7794
+ if (ipc2) await ipc2.stop();
7581
7795
  process.exit(0);
7582
7796
  }
7583
7797
  const AppComponent = parsed.classic ? AppClassic : AppPanel;
7584
- const instance = render(React28.createElement(AppComponent));
7798
+ const socketPath = getSocketPath();
7799
+ const ipc = socketPath ? createIpcServer(socketPath) : null;
7800
+ if (ipc) await ipc.start();
7801
+ const instance = render(React29.createElement(AppComponent));
7585
7802
  await instance.waitUntilExit();
7803
+ if (ipc) await ipc.stop();
7586
7804
  process.exit(0);
7587
7805
  }
7588
7806
  main().catch((error) => {