@polterware/polter 0.4.1 → 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/api.js +12 -2
- package/dist/{chunk-ZHVOYB5M.js → chunk-CWBIXRZP.js} +162 -2
- package/dist/{chunk-VYHW3UNY.js → chunk-XCCKD3RZ.js} +1 -1
- package/dist/index.js +294 -151
- package/dist/mcp.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22,6 +22,8 @@ import {
|
|
|
22
22
|
getOrCreateProjectConfig,
|
|
23
23
|
getProcessOutput,
|
|
24
24
|
getProjectConfigPath,
|
|
25
|
+
getSkillContent,
|
|
26
|
+
getSkillPath,
|
|
25
27
|
getSocketPath,
|
|
26
28
|
getToolDisplayName,
|
|
27
29
|
getToolInfo,
|
|
@@ -32,6 +34,7 @@ import {
|
|
|
32
34
|
mcpStatus,
|
|
33
35
|
parsePolterYaml,
|
|
34
36
|
planChanges,
|
|
37
|
+
registerForegroundProcess,
|
|
35
38
|
removeMcpServer,
|
|
36
39
|
removeMcpServerSilent,
|
|
37
40
|
removeProcess,
|
|
@@ -40,18 +43,20 @@ import {
|
|
|
40
43
|
runInteractiveCommand,
|
|
41
44
|
runSupabaseCommand,
|
|
42
45
|
savePipeline,
|
|
46
|
+
setupSkill,
|
|
47
|
+
setupSkillCli,
|
|
43
48
|
startProcess,
|
|
44
49
|
stopProcess,
|
|
45
50
|
translateCommand,
|
|
46
51
|
writeProjectConfig
|
|
47
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-CWBIXRZP.js";
|
|
48
53
|
|
|
49
54
|
// src/index.tsx
|
|
50
|
-
import
|
|
55
|
+
import React29 from "react";
|
|
51
56
|
import { render } from "ink";
|
|
52
57
|
|
|
53
58
|
// src/app.tsx
|
|
54
|
-
import { Box as
|
|
59
|
+
import { Box as Box30, Text as Text34, useApp } from "ink";
|
|
55
60
|
|
|
56
61
|
// src/hooks/useNavigation.ts
|
|
57
62
|
import { useState, useCallback } from "react";
|
|
@@ -916,6 +921,13 @@ function buildHomeItems({
|
|
|
916
921
|
hint: "Free-form args",
|
|
917
922
|
kind: "action"
|
|
918
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
|
+
});
|
|
919
931
|
items.push({
|
|
920
932
|
id: "action-update",
|
|
921
933
|
value: "__action_update__",
|
|
@@ -1030,6 +1042,9 @@ function Home({
|
|
|
1030
1042
|
case "__action_config__":
|
|
1031
1043
|
onNavigate("project-config");
|
|
1032
1044
|
break;
|
|
1045
|
+
case "__action_skill_setup__":
|
|
1046
|
+
onNavigate("skill-setup");
|
|
1047
|
+
break;
|
|
1033
1048
|
case "__action_update__":
|
|
1034
1049
|
onNavigate("self-update");
|
|
1035
1050
|
break;
|
|
@@ -1809,6 +1824,12 @@ function useCommand(execution = "supabase", cwd = process.cwd(), options) {
|
|
|
1809
1824
|
const runOpts = { quiet: options?.quiet, onData };
|
|
1810
1825
|
const handle = runCommand(resolvedExecution, args, cwd, runOpts);
|
|
1811
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
|
+
}
|
|
1812
1833
|
const res = await handle.promise;
|
|
1813
1834
|
abortRef.current = null;
|
|
1814
1835
|
setResult(res);
|
|
@@ -5184,8 +5205,90 @@ function ScriptPicker({
|
|
|
5184
5205
|
] });
|
|
5185
5206
|
}
|
|
5186
5207
|
|
|
5187
|
-
// src/
|
|
5208
|
+
// src/screens/SkillSetup.tsx
|
|
5209
|
+
import { useState as useState26 } from "react";
|
|
5210
|
+
import { Box as Box29, Text as Text33 } from "ink";
|
|
5188
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";
|
|
5189
5292
|
function AppClassic() {
|
|
5190
5293
|
const { screen, params, navigate, goBack, goHome } = useNavigation();
|
|
5191
5294
|
const { exit } = useApp();
|
|
@@ -5200,9 +5303,9 @@ function AppClassic() {
|
|
|
5200
5303
|
const renderScreen = () => {
|
|
5201
5304
|
switch (screen) {
|
|
5202
5305
|
case "home":
|
|
5203
|
-
return /* @__PURE__ */
|
|
5306
|
+
return /* @__PURE__ */ jsx33(Home, { onNavigate: navigate, onExit: handleExit, width, height });
|
|
5204
5307
|
case "command-args":
|
|
5205
|
-
return /* @__PURE__ */
|
|
5308
|
+
return /* @__PURE__ */ jsx33(
|
|
5206
5309
|
CommandArgs,
|
|
5207
5310
|
{
|
|
5208
5311
|
command: params.command ?? "",
|
|
@@ -5213,9 +5316,9 @@ function AppClassic() {
|
|
|
5213
5316
|
}
|
|
5214
5317
|
);
|
|
5215
5318
|
case "custom-command":
|
|
5216
|
-
return /* @__PURE__ */
|
|
5319
|
+
return /* @__PURE__ */ jsx33(CustomCommand, { onNavigate: navigate, onBack: goBack, width });
|
|
5217
5320
|
case "flag-selection":
|
|
5218
|
-
return /* @__PURE__ */
|
|
5321
|
+
return /* @__PURE__ */ jsx33(
|
|
5219
5322
|
FlagSelection,
|
|
5220
5323
|
{
|
|
5221
5324
|
args: params.args ?? [],
|
|
@@ -5227,7 +5330,7 @@ function AppClassic() {
|
|
|
5227
5330
|
);
|
|
5228
5331
|
case "confirm-execute":
|
|
5229
5332
|
case "command-execution":
|
|
5230
|
-
return /* @__PURE__ */
|
|
5333
|
+
return /* @__PURE__ */ jsx33(
|
|
5231
5334
|
CommandExecution,
|
|
5232
5335
|
{
|
|
5233
5336
|
args: params.args ?? [],
|
|
@@ -5243,23 +5346,23 @@ function AppClassic() {
|
|
|
5243
5346
|
}
|
|
5244
5347
|
);
|
|
5245
5348
|
case "self-update":
|
|
5246
|
-
return /* @__PURE__ */
|
|
5349
|
+
return /* @__PURE__ */ jsx33(SelfUpdate, { onBack: goBack, onExit: handleExit, width });
|
|
5247
5350
|
case "tool-status":
|
|
5248
|
-
return /* @__PURE__ */
|
|
5351
|
+
return /* @__PURE__ */ jsx33(ToolStatus, { onBack: goBack, onNavigate: navigate, width });
|
|
5249
5352
|
case "mcp-manage":
|
|
5250
|
-
return /* @__PURE__ */
|
|
5353
|
+
return /* @__PURE__ */ jsx33(McpManage, { onBack: goBack, width });
|
|
5251
5354
|
case "process-list":
|
|
5252
|
-
return /* @__PURE__ */
|
|
5355
|
+
return /* @__PURE__ */ jsx33(ProcessList, { onNavigate: navigate, onBack: goBack, width, height });
|
|
5253
5356
|
case "process-logs":
|
|
5254
|
-
return /* @__PURE__ */
|
|
5357
|
+
return /* @__PURE__ */ jsx33(ProcessLogs, { processId: params.processId ?? "", onBack: goBack, width, height });
|
|
5255
5358
|
case "project-config":
|
|
5256
|
-
return /* @__PURE__ */
|
|
5359
|
+
return /* @__PURE__ */ jsx33(ProjectConfig, { onBack: goBack, width });
|
|
5257
5360
|
case "pipeline-list":
|
|
5258
|
-
return /* @__PURE__ */
|
|
5361
|
+
return /* @__PURE__ */ jsx33(PipelineList, { onNavigate: navigate, onBack: goBack, width });
|
|
5259
5362
|
case "pipeline-builder":
|
|
5260
|
-
return /* @__PURE__ */
|
|
5363
|
+
return /* @__PURE__ */ jsx33(PipelineBuilder, { onBack: goBack, width, height });
|
|
5261
5364
|
case "pipeline-execution":
|
|
5262
|
-
return /* @__PURE__ */
|
|
5365
|
+
return /* @__PURE__ */ jsx33(
|
|
5263
5366
|
PipelineExecution,
|
|
5264
5367
|
{
|
|
5265
5368
|
pipelineId: params.pipelineId ?? "",
|
|
@@ -5269,34 +5372,36 @@ function AppClassic() {
|
|
|
5269
5372
|
}
|
|
5270
5373
|
);
|
|
5271
5374
|
case "declarative-plan":
|
|
5272
|
-
return /* @__PURE__ */
|
|
5375
|
+
return /* @__PURE__ */ jsx33(DeclarativePlan, { onBack: goBack, onNavigate: navigate, width, height });
|
|
5273
5376
|
case "declarative-status":
|
|
5274
|
-
return /* @__PURE__ */
|
|
5377
|
+
return /* @__PURE__ */ jsx33(DeclarativeStatus, { onBack: goBack, width, height });
|
|
5275
5378
|
case "init-scaffold":
|
|
5276
|
-
return /* @__PURE__ */
|
|
5379
|
+
return /* @__PURE__ */ jsx33(InitScaffold, { onBack: goBack, onNavigate: navigate, width, height });
|
|
5277
5380
|
case "script-picker":
|
|
5278
|
-
return /* @__PURE__ */
|
|
5381
|
+
return /* @__PURE__ */ jsx33(ScriptPicker, { onNavigate: navigate, onBack: goBack, width, height });
|
|
5382
|
+
case "skill-setup":
|
|
5383
|
+
return /* @__PURE__ */ jsx33(SkillSetup, { onBack: goBack, width, height });
|
|
5279
5384
|
default:
|
|
5280
|
-
return /* @__PURE__ */
|
|
5385
|
+
return /* @__PURE__ */ jsx33(Box30, { children: /* @__PURE__ */ jsxs32(Text34, { color: "red", children: [
|
|
5281
5386
|
"Unknown screen: ",
|
|
5282
5387
|
screen
|
|
5283
5388
|
] }) });
|
|
5284
5389
|
}
|
|
5285
5390
|
};
|
|
5286
|
-
return /* @__PURE__ */
|
|
5287
|
-
/* @__PURE__ */
|
|
5391
|
+
return /* @__PURE__ */ jsxs32(Box30, { flexDirection: "column", children: [
|
|
5392
|
+
/* @__PURE__ */ jsx33(GhostBanner, { width }),
|
|
5288
5393
|
renderScreen()
|
|
5289
5394
|
] });
|
|
5290
5395
|
}
|
|
5291
5396
|
|
|
5292
5397
|
// src/appPanel.tsx
|
|
5293
|
-
import
|
|
5294
|
-
import { Box as
|
|
5398
|
+
import React28 from "react";
|
|
5399
|
+
import { Box as Box39, Text as Text41, useApp as useApp2, useInput as useInput13 } from "ink";
|
|
5295
5400
|
|
|
5296
5401
|
// src/hooks/usePanelNavigation.ts
|
|
5297
|
-
import { useState as
|
|
5402
|
+
import { useState as useState27, useCallback as useCallback8 } from "react";
|
|
5298
5403
|
function usePanelNavigation() {
|
|
5299
|
-
const [state, setState] =
|
|
5404
|
+
const [state, setState] = useState27({
|
|
5300
5405
|
view: "pipelines",
|
|
5301
5406
|
featureId: "database",
|
|
5302
5407
|
innerScreen: "home",
|
|
@@ -5335,7 +5440,8 @@ function usePanelNavigation() {
|
|
|
5335
5440
|
"self-update": "self-update",
|
|
5336
5441
|
processes: "processes",
|
|
5337
5442
|
scripts: "scripts",
|
|
5338
|
-
declarative: "declarative"
|
|
5443
|
+
declarative: "declarative",
|
|
5444
|
+
"skill-setup": "skill-setup"
|
|
5339
5445
|
};
|
|
5340
5446
|
const view = viewMap[itemId];
|
|
5341
5447
|
if (view) {
|
|
@@ -5402,9 +5508,9 @@ function usePanelNavigation() {
|
|
|
5402
5508
|
}
|
|
5403
5509
|
|
|
5404
5510
|
// src/hooks/usePanelFocus.ts
|
|
5405
|
-
import { useState as
|
|
5511
|
+
import { useState as useState28, useCallback as useCallback9 } from "react";
|
|
5406
5512
|
function usePanelFocus() {
|
|
5407
|
-
const [focused, setFocused] =
|
|
5513
|
+
const [focused, setFocused] = useState28("sidebar");
|
|
5408
5514
|
const toggleFocus = useCallback9(() => {
|
|
5409
5515
|
setFocused((prev) => prev === "sidebar" ? "main" : "sidebar");
|
|
5410
5516
|
}, []);
|
|
@@ -5445,15 +5551,16 @@ function useSidebarItems() {
|
|
|
5445
5551
|
items.push({ id: "declarative", label: "Infrastructure", icon: "\u{1F3D7}\uFE0F", type: "action", section: "system" });
|
|
5446
5552
|
items.push({ id: "tool-status", label: "Tool Status", icon: "\u{1F527}", type: "action", section: "system" });
|
|
5447
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" });
|
|
5448
5555
|
items.push({ id: "self-update", label: "Update", icon: "\u2B06\uFE0F", type: "action", section: "system" });
|
|
5449
5556
|
return items;
|
|
5450
5557
|
}, []);
|
|
5451
5558
|
}
|
|
5452
5559
|
|
|
5453
5560
|
// src/hooks/useModal.ts
|
|
5454
|
-
import { useState as
|
|
5561
|
+
import { useState as useState29, useCallback as useCallback10 } from "react";
|
|
5455
5562
|
function useModal() {
|
|
5456
|
-
const [state, setState] =
|
|
5563
|
+
const [state, setState] = useState29(null);
|
|
5457
5564
|
const openModal = useCallback10((content, title) => {
|
|
5458
5565
|
setState({ content, title });
|
|
5459
5566
|
}, []);
|
|
@@ -5470,8 +5577,8 @@ function useModal() {
|
|
|
5470
5577
|
}
|
|
5471
5578
|
|
|
5472
5579
|
// src/components/PanelLayout.tsx
|
|
5473
|
-
import { Box as
|
|
5474
|
-
import { jsx as
|
|
5580
|
+
import { Box as Box31 } from "ink";
|
|
5581
|
+
import { jsx as jsx34, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
5475
5582
|
function PanelLayout({
|
|
5476
5583
|
header,
|
|
5477
5584
|
footer,
|
|
@@ -5486,19 +5593,19 @@ function PanelLayout({
|
|
|
5486
5593
|
const contentHeight = Math.max(5, height - bannerHeight - footerHeight);
|
|
5487
5594
|
const sidebarWidth = singlePanel ? 0 : panel.sidebarWidth(width);
|
|
5488
5595
|
const mainWidth = singlePanel ? width : width - sidebarWidth;
|
|
5489
|
-
return /* @__PURE__ */
|
|
5596
|
+
return /* @__PURE__ */ jsxs33(Box31, { flexDirection: "column", width, height, children: [
|
|
5490
5597
|
header,
|
|
5491
|
-
/* @__PURE__ */
|
|
5492
|
-
!singlePanel && /* @__PURE__ */
|
|
5493
|
-
/* @__PURE__ */
|
|
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 })
|
|
5494
5601
|
] }),
|
|
5495
|
-
/* @__PURE__ */
|
|
5602
|
+
/* @__PURE__ */ jsx34(Box31, { height: footerHeight, children: footer })
|
|
5496
5603
|
] });
|
|
5497
5604
|
}
|
|
5498
5605
|
|
|
5499
5606
|
// src/components/Panel.tsx
|
|
5500
|
-
import { Box as
|
|
5501
|
-
import { jsx as
|
|
5607
|
+
import { Box as Box32, Text as Text35 } from "ink";
|
|
5608
|
+
import { jsx as jsx35, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5502
5609
|
function Panel({
|
|
5503
5610
|
id,
|
|
5504
5611
|
title,
|
|
@@ -5508,8 +5615,8 @@ function Panel({
|
|
|
5508
5615
|
children
|
|
5509
5616
|
}) {
|
|
5510
5617
|
const borderColor = focused ? panel.borderFocused : panel.borderDim;
|
|
5511
|
-
return /* @__PURE__ */
|
|
5512
|
-
|
|
5618
|
+
return /* @__PURE__ */ jsxs34(
|
|
5619
|
+
Box32,
|
|
5513
5620
|
{
|
|
5514
5621
|
flexDirection: "column",
|
|
5515
5622
|
width,
|
|
@@ -5518,21 +5625,21 @@ function Panel({
|
|
|
5518
5625
|
borderColor,
|
|
5519
5626
|
overflow: "hidden",
|
|
5520
5627
|
children: [
|
|
5521
|
-
title && /* @__PURE__ */
|
|
5628
|
+
title && /* @__PURE__ */ jsx35(Box32, { marginBottom: 0, children: /* @__PURE__ */ jsxs34(Text35, { color: focused ? inkColors.accent : void 0, bold: focused, dimColor: !focused, children: [
|
|
5522
5629
|
" ",
|
|
5523
5630
|
title,
|
|
5524
5631
|
" "
|
|
5525
5632
|
] }) }),
|
|
5526
|
-
/* @__PURE__ */
|
|
5633
|
+
/* @__PURE__ */ jsx35(Box32, { flexDirection: "column", flexGrow: 1, overflow: "hidden", children })
|
|
5527
5634
|
]
|
|
5528
5635
|
}
|
|
5529
5636
|
);
|
|
5530
5637
|
}
|
|
5531
5638
|
|
|
5532
5639
|
// src/components/Sidebar.tsx
|
|
5533
|
-
import { useEffect as useEffect19, useMemo as useMemo10, useState as
|
|
5534
|
-
import { Box as
|
|
5535
|
-
import { jsx as
|
|
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";
|
|
5536
5643
|
function groupSections(items) {
|
|
5537
5644
|
const groups = [];
|
|
5538
5645
|
let current = null;
|
|
@@ -5559,7 +5666,7 @@ function Sidebar({
|
|
|
5559
5666
|
[items]
|
|
5560
5667
|
);
|
|
5561
5668
|
const selectedIdx = selectableItems.findIndex((item) => item.id === selectedId);
|
|
5562
|
-
const [cursorIdx, setCursorIdx] =
|
|
5669
|
+
const [cursorIdx, setCursorIdx] = useState30(Math.max(0, selectedIdx));
|
|
5563
5670
|
const sections = useMemo10(() => groupSections(items), [items]);
|
|
5564
5671
|
useEffect19(() => {
|
|
5565
5672
|
const idx = selectableItems.findIndex((item) => item.id === selectedId);
|
|
@@ -5593,28 +5700,28 @@ function Sidebar({
|
|
|
5593
5700
|
{ isActive: isFocused }
|
|
5594
5701
|
);
|
|
5595
5702
|
let flatIdx = 0;
|
|
5596
|
-
return /* @__PURE__ */
|
|
5703
|
+
return /* @__PURE__ */ jsx36(Box33, { flexDirection: "column", gap: 0, children: sections.map((section) => {
|
|
5597
5704
|
const sectionStartIdx = flatIdx;
|
|
5598
5705
|
const sectionEndIdx = sectionStartIdx + section.items.length - 1;
|
|
5599
5706
|
const hasCursorInSection = isFocused && cursorIdx >= sectionStartIdx && cursorIdx <= sectionEndIdx;
|
|
5600
5707
|
const hasActiveInSection = section.items.some((item) => item.id === selectedId);
|
|
5601
5708
|
const borderColor = hasCursorInSection || hasActiveInSection ? inkColors.accent : "#555555";
|
|
5602
|
-
const rendered = /* @__PURE__ */
|
|
5603
|
-
|
|
5709
|
+
const rendered = /* @__PURE__ */ jsxs35(
|
|
5710
|
+
Box33,
|
|
5604
5711
|
{
|
|
5605
5712
|
flexDirection: "column",
|
|
5606
5713
|
borderStyle: "round",
|
|
5607
5714
|
borderColor,
|
|
5608
5715
|
paddingX: 1,
|
|
5609
5716
|
children: [
|
|
5610
|
-
/* @__PURE__ */
|
|
5717
|
+
/* @__PURE__ */ jsx36(Text36, { dimColor: true, bold: true, children: section.title }),
|
|
5611
5718
|
section.items.map((item) => {
|
|
5612
5719
|
const thisIdx = flatIdx;
|
|
5613
5720
|
flatIdx++;
|
|
5614
5721
|
const isCursor = isFocused && thisIdx === cursorIdx;
|
|
5615
5722
|
const isActive = item.id === selectedId;
|
|
5616
|
-
return /* @__PURE__ */
|
|
5617
|
-
|
|
5723
|
+
return /* @__PURE__ */ jsx36(Box33, { gap: 0, children: /* @__PURE__ */ jsxs35(
|
|
5724
|
+
Text36,
|
|
5618
5725
|
{
|
|
5619
5726
|
color: isCursor ? inkColors.accent : isActive ? inkColors.accent : void 0,
|
|
5620
5727
|
bold: isCursor || isActive,
|
|
@@ -5637,12 +5744,12 @@ function Sidebar({
|
|
|
5637
5744
|
}
|
|
5638
5745
|
|
|
5639
5746
|
// src/components/PanelFooter.tsx
|
|
5640
|
-
import { Box as
|
|
5641
|
-
import { jsx as
|
|
5747
|
+
import { Box as Box34, Text as Text37 } from "ink";
|
|
5748
|
+
import { jsx as jsx37, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
5642
5749
|
function PanelFooter({ hints, width }) {
|
|
5643
|
-
return /* @__PURE__ */
|
|
5644
|
-
/* @__PURE__ */
|
|
5645
|
-
/* @__PURE__ */
|
|
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: [
|
|
5646
5753
|
":",
|
|
5647
5754
|
hint.action
|
|
5648
5755
|
] })
|
|
@@ -5650,8 +5757,8 @@ function PanelFooter({ hints, width }) {
|
|
|
5650
5757
|
}
|
|
5651
5758
|
|
|
5652
5759
|
// src/components/Modal.tsx
|
|
5653
|
-
import { Box as
|
|
5654
|
-
import { jsx as
|
|
5760
|
+
import { Box as Box35, Text as Text38 } from "ink";
|
|
5761
|
+
import { jsx as jsx38, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5655
5762
|
function Modal({
|
|
5656
5763
|
title,
|
|
5657
5764
|
width,
|
|
@@ -5662,10 +5769,10 @@ function Modal({
|
|
|
5662
5769
|
const modalHeight = Math.min(height - 4, 20);
|
|
5663
5770
|
const padX = Math.max(0, Math.floor((width - modalWidth) / 2));
|
|
5664
5771
|
const padY = Math.max(0, Math.floor((height - modalHeight) / 2));
|
|
5665
|
-
return /* @__PURE__ */
|
|
5666
|
-
padY > 0 && /* @__PURE__ */
|
|
5667
|
-
/* @__PURE__ */
|
|
5668
|
-
|
|
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,
|
|
5669
5776
|
{
|
|
5670
5777
|
flexDirection: "column",
|
|
5671
5778
|
width: modalWidth,
|
|
@@ -5674,8 +5781,8 @@ function Modal({
|
|
|
5674
5781
|
borderColor: inkColors.accent,
|
|
5675
5782
|
paddingX: 1,
|
|
5676
5783
|
children: [
|
|
5677
|
-
/* @__PURE__ */
|
|
5678
|
-
/* @__PURE__ */
|
|
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 })
|
|
5679
5786
|
]
|
|
5680
5787
|
}
|
|
5681
5788
|
) })
|
|
@@ -5683,9 +5790,9 @@ function Modal({
|
|
|
5683
5790
|
}
|
|
5684
5791
|
|
|
5685
5792
|
// src/components/FeatureCommands.tsx
|
|
5686
|
-
import { useEffect as useEffect20, useMemo as useMemo11, useState as
|
|
5687
|
-
import { Box as
|
|
5688
|
-
import { jsx as
|
|
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";
|
|
5689
5796
|
function FeatureCommands({
|
|
5690
5797
|
feature,
|
|
5691
5798
|
onNavigate,
|
|
@@ -5696,9 +5803,9 @@ function FeatureCommands({
|
|
|
5696
5803
|
height = 24,
|
|
5697
5804
|
isInputActive = true
|
|
5698
5805
|
}) {
|
|
5699
|
-
const [pinnedCommands, setPinnedCommands2] =
|
|
5700
|
-
const [pinnedRuns, setPinnedRuns2] =
|
|
5701
|
-
const [pinFeedback, setPinFeedback] =
|
|
5806
|
+
const [pinnedCommands, setPinnedCommands2] = useState31(() => getPinnedCommands());
|
|
5807
|
+
const [pinnedRuns, setPinnedRuns2] = useState31(() => getPinnedRuns());
|
|
5808
|
+
const [pinFeedback, setPinFeedback] = useState31();
|
|
5702
5809
|
useEffect20(() => {
|
|
5703
5810
|
if (!pinFeedback) return;
|
|
5704
5811
|
const timeout = setTimeout(() => setPinFeedback(void 0), 1400);
|
|
@@ -5767,12 +5874,12 @@ function FeatureCommands({
|
|
|
5767
5874
|
);
|
|
5768
5875
|
}
|
|
5769
5876
|
};
|
|
5770
|
-
return /* @__PURE__ */
|
|
5771
|
-
pinFeedback && /* @__PURE__ */
|
|
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: [
|
|
5772
5879
|
"\u2713 ",
|
|
5773
5880
|
pinFeedback
|
|
5774
5881
|
] }) }),
|
|
5775
|
-
/* @__PURE__ */
|
|
5882
|
+
/* @__PURE__ */ jsx39(
|
|
5776
5883
|
SelectList,
|
|
5777
5884
|
{
|
|
5778
5885
|
items,
|
|
@@ -5791,9 +5898,9 @@ function FeatureCommands({
|
|
|
5791
5898
|
}
|
|
5792
5899
|
|
|
5793
5900
|
// src/components/PinnedCommands.tsx
|
|
5794
|
-
import { useEffect as useEffect21, useMemo as useMemo12, useState as
|
|
5795
|
-
import { Box as
|
|
5796
|
-
import { jsx as
|
|
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";
|
|
5797
5904
|
function PinnedCommands({
|
|
5798
5905
|
onNavigate,
|
|
5799
5906
|
onBack,
|
|
@@ -5802,9 +5909,9 @@ function PinnedCommands({
|
|
|
5802
5909
|
height = 24,
|
|
5803
5910
|
isInputActive = true
|
|
5804
5911
|
}) {
|
|
5805
|
-
const [pinnedCommands, setPinnedCommands2] =
|
|
5806
|
-
const [pinnedRuns, setPinnedRuns2] =
|
|
5807
|
-
const [pinFeedback, setPinFeedback] =
|
|
5912
|
+
const [pinnedCommands, setPinnedCommands2] = useState32(() => getPinnedCommands());
|
|
5913
|
+
const [pinnedRuns, setPinnedRuns2] = useState32(() => getPinnedRuns());
|
|
5914
|
+
const [pinFeedback, setPinFeedback] = useState32();
|
|
5808
5915
|
useEffect21(() => {
|
|
5809
5916
|
if (!pinFeedback) return;
|
|
5810
5917
|
const timeout = setTimeout(() => setPinFeedback(void 0), 1400);
|
|
@@ -5867,14 +5974,14 @@ function PinnedCommands({
|
|
|
5867
5974
|
}
|
|
5868
5975
|
};
|
|
5869
5976
|
if (items.length === 0) {
|
|
5870
|
-
return /* @__PURE__ */
|
|
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." }) });
|
|
5871
5978
|
}
|
|
5872
|
-
return /* @__PURE__ */
|
|
5873
|
-
pinFeedback && /* @__PURE__ */
|
|
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: [
|
|
5874
5981
|
"\u2713 ",
|
|
5875
5982
|
pinFeedback
|
|
5876
5983
|
] }) }),
|
|
5877
|
-
/* @__PURE__ */
|
|
5984
|
+
/* @__PURE__ */ jsx40(
|
|
5878
5985
|
SelectList,
|
|
5879
5986
|
{
|
|
5880
5987
|
items,
|
|
@@ -5894,8 +6001,8 @@ function PinnedCommands({
|
|
|
5894
6001
|
|
|
5895
6002
|
// src/screens/DeclarativeHome.tsx
|
|
5896
6003
|
import { useMemo as useMemo13 } from "react";
|
|
5897
|
-
import { Box as
|
|
5898
|
-
import { jsx as
|
|
6004
|
+
import { Box as Box38 } from "ink";
|
|
6005
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
5899
6006
|
var ITEMS = [
|
|
5900
6007
|
{ value: "declarative-plan", label: "Plan / Apply", hint: "Diff and apply polter.yaml", kind: "action" },
|
|
5901
6008
|
{ value: "declarative-status", label: "Infrastructure Status", hint: "Live state from CLI tools", kind: "action" },
|
|
@@ -5912,7 +6019,7 @@ function DeclarativeHome({
|
|
|
5912
6019
|
() => (value) => onNavigate(value),
|
|
5913
6020
|
[onNavigate]
|
|
5914
6021
|
);
|
|
5915
|
-
return /* @__PURE__ */
|
|
6022
|
+
return /* @__PURE__ */ jsx41(Box38, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ jsx41(
|
|
5916
6023
|
SelectList,
|
|
5917
6024
|
{
|
|
5918
6025
|
items: ITEMS,
|
|
@@ -5928,7 +6035,7 @@ function DeclarativeHome({
|
|
|
5928
6035
|
}
|
|
5929
6036
|
|
|
5930
6037
|
// src/appPanel.tsx
|
|
5931
|
-
import { jsx as
|
|
6038
|
+
import { jsx as jsx42, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
5932
6039
|
var screenLabels = {
|
|
5933
6040
|
"command-args": "Args",
|
|
5934
6041
|
"flag-selection": "Flags",
|
|
@@ -5947,7 +6054,8 @@ var screenLabels = {
|
|
|
5947
6054
|
"declarative-plan": "Plan/Apply",
|
|
5948
6055
|
"declarative-status": "Status",
|
|
5949
6056
|
"init-scaffold": "Init",
|
|
5950
|
-
"script-picker": "Scripts"
|
|
6057
|
+
"script-picker": "Scripts",
|
|
6058
|
+
"skill-setup": "Skill Setup"
|
|
5951
6059
|
};
|
|
5952
6060
|
function buildBreadcrumb(nav) {
|
|
5953
6061
|
let base;
|
|
@@ -5984,6 +6092,9 @@ function buildBreadcrumb(nav) {
|
|
|
5984
6092
|
case "declarative":
|
|
5985
6093
|
base = "\u{1F3D7}\uFE0F Infrastructure";
|
|
5986
6094
|
break;
|
|
6095
|
+
case "skill-setup":
|
|
6096
|
+
base = "\u{1F9E0} Skill Setup";
|
|
6097
|
+
break;
|
|
5987
6098
|
default:
|
|
5988
6099
|
base = nav.view;
|
|
5989
6100
|
}
|
|
@@ -6016,7 +6127,7 @@ function AppPanel() {
|
|
|
6016
6127
|
const focus = usePanelFocus();
|
|
6017
6128
|
const sidebarItems = useSidebarItems();
|
|
6018
6129
|
const modal = useModal();
|
|
6019
|
-
const refreshPins =
|
|
6130
|
+
const refreshPins = React28.useCallback(() => {
|
|
6020
6131
|
}, []);
|
|
6021
6132
|
const singlePanel = width < 60 || height < 15;
|
|
6022
6133
|
const handleExit = () => {
|
|
@@ -6050,37 +6161,37 @@ function AppPanel() {
|
|
|
6050
6161
|
}
|
|
6051
6162
|
if (input2 === "?") {
|
|
6052
6163
|
modal.openModal(
|
|
6053
|
-
/* @__PURE__ */
|
|
6054
|
-
/* @__PURE__ */
|
|
6055
|
-
/* @__PURE__ */
|
|
6164
|
+
/* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", children: [
|
|
6165
|
+
/* @__PURE__ */ jsxs40(Text41, { children: [
|
|
6166
|
+
/* @__PURE__ */ jsx42(Text41, { bold: true, children: "\u2190/\u2192" }),
|
|
6056
6167
|
" Move between sidebar and main panel"
|
|
6057
6168
|
] }),
|
|
6058
|
-
/* @__PURE__ */
|
|
6059
|
-
/* @__PURE__ */
|
|
6169
|
+
/* @__PURE__ */ jsxs40(Text41, { children: [
|
|
6170
|
+
/* @__PURE__ */ jsx42(Text41, { bold: true, children: "Tab" }),
|
|
6060
6171
|
" Toggle sidebar / main panel"
|
|
6061
6172
|
] }),
|
|
6062
|
-
/* @__PURE__ */
|
|
6063
|
-
/* @__PURE__ */
|
|
6173
|
+
/* @__PURE__ */ jsxs40(Text41, { children: [
|
|
6174
|
+
/* @__PURE__ */ jsx42(Text41, { bold: true, children: "j/k" }),
|
|
6064
6175
|
" Navigate up/down"
|
|
6065
6176
|
] }),
|
|
6066
|
-
/* @__PURE__ */
|
|
6067
|
-
/* @__PURE__ */
|
|
6177
|
+
/* @__PURE__ */ jsxs40(Text41, { children: [
|
|
6178
|
+
/* @__PURE__ */ jsx42(Text41, { bold: true, children: "Enter" }),
|
|
6068
6179
|
" Select item"
|
|
6069
6180
|
] }),
|
|
6070
|
-
/* @__PURE__ */
|
|
6071
|
-
/* @__PURE__ */
|
|
6181
|
+
/* @__PURE__ */ jsxs40(Text41, { children: [
|
|
6182
|
+
/* @__PURE__ */ jsx42(Text41, { bold: true, children: "Esc" }),
|
|
6072
6183
|
" Go back (or return to sidebar)"
|
|
6073
6184
|
] }),
|
|
6074
|
-
/* @__PURE__ */
|
|
6075
|
-
/* @__PURE__ */
|
|
6185
|
+
/* @__PURE__ */ jsxs40(Text41, { children: [
|
|
6186
|
+
/* @__PURE__ */ jsx42(Text41, { bold: true, children: "q" }),
|
|
6076
6187
|
" Quit Polter"
|
|
6077
6188
|
] }),
|
|
6078
|
-
/* @__PURE__ */
|
|
6079
|
-
/* @__PURE__ */
|
|
6189
|
+
/* @__PURE__ */ jsxs40(Text41, { children: [
|
|
6190
|
+
/* @__PURE__ */ jsx42(Text41, { bold: true, children: "?" }),
|
|
6080
6191
|
" Show this help"
|
|
6081
6192
|
] }),
|
|
6082
|
-
/* @__PURE__ */
|
|
6083
|
-
/* @__PURE__ */
|
|
6193
|
+
/* @__PURE__ */ jsxs40(Text41, { children: [
|
|
6194
|
+
/* @__PURE__ */ jsx42(Text41, { bold: true, children: "p" }),
|
|
6084
6195
|
" Pin/unpin command"
|
|
6085
6196
|
] })
|
|
6086
6197
|
] }),
|
|
@@ -6110,6 +6221,8 @@ function AppPanel() {
|
|
|
6110
6221
|
return "scripts";
|
|
6111
6222
|
case "declarative":
|
|
6112
6223
|
return "declarative";
|
|
6224
|
+
case "skill-setup":
|
|
6225
|
+
return "skill-setup";
|
|
6113
6226
|
default:
|
|
6114
6227
|
return nav.featureId;
|
|
6115
6228
|
}
|
|
@@ -6136,7 +6249,7 @@ function AppPanel() {
|
|
|
6136
6249
|
}
|
|
6137
6250
|
switch (nav.view) {
|
|
6138
6251
|
case "pinned":
|
|
6139
|
-
return /* @__PURE__ */
|
|
6252
|
+
return /* @__PURE__ */ jsx42(
|
|
6140
6253
|
PinnedCommands,
|
|
6141
6254
|
{
|
|
6142
6255
|
onNavigate: nav.navigateInner,
|
|
@@ -6150,12 +6263,12 @@ function AppPanel() {
|
|
|
6150
6263
|
case "feature": {
|
|
6151
6264
|
const feature = getFeatureById(nav.featureId);
|
|
6152
6265
|
if (!feature) {
|
|
6153
|
-
return /* @__PURE__ */
|
|
6266
|
+
return /* @__PURE__ */ jsxs40(Text41, { color: "red", children: [
|
|
6154
6267
|
"Feature not found: ",
|
|
6155
6268
|
nav.featureId
|
|
6156
6269
|
] });
|
|
6157
6270
|
}
|
|
6158
|
-
return /* @__PURE__ */
|
|
6271
|
+
return /* @__PURE__ */ jsx42(
|
|
6159
6272
|
FeatureCommands,
|
|
6160
6273
|
{
|
|
6161
6274
|
feature,
|
|
@@ -6170,7 +6283,7 @@ function AppPanel() {
|
|
|
6170
6283
|
);
|
|
6171
6284
|
}
|
|
6172
6285
|
case "custom-command":
|
|
6173
|
-
return /* @__PURE__ */
|
|
6286
|
+
return /* @__PURE__ */ jsx42(
|
|
6174
6287
|
CustomCommand,
|
|
6175
6288
|
{
|
|
6176
6289
|
onNavigate: nav.navigateInner,
|
|
@@ -6182,7 +6295,7 @@ function AppPanel() {
|
|
|
6182
6295
|
}
|
|
6183
6296
|
);
|
|
6184
6297
|
case "pipelines":
|
|
6185
|
-
return /* @__PURE__ */
|
|
6298
|
+
return /* @__PURE__ */ jsx42(
|
|
6186
6299
|
PipelineList,
|
|
6187
6300
|
{
|
|
6188
6301
|
onNavigate: nav.navigateInner,
|
|
@@ -6194,7 +6307,7 @@ function AppPanel() {
|
|
|
6194
6307
|
}
|
|
6195
6308
|
);
|
|
6196
6309
|
case "tool-status":
|
|
6197
|
-
return /* @__PURE__ */
|
|
6310
|
+
return /* @__PURE__ */ jsx42(
|
|
6198
6311
|
ToolStatus,
|
|
6199
6312
|
{
|
|
6200
6313
|
onBack: focus.focusSidebar,
|
|
@@ -6206,7 +6319,7 @@ function AppPanel() {
|
|
|
6206
6319
|
}
|
|
6207
6320
|
);
|
|
6208
6321
|
case "processes":
|
|
6209
|
-
return /* @__PURE__ */
|
|
6322
|
+
return /* @__PURE__ */ jsx42(
|
|
6210
6323
|
ProcessList,
|
|
6211
6324
|
{
|
|
6212
6325
|
onNavigate: nav.navigateInner,
|
|
@@ -6218,7 +6331,7 @@ function AppPanel() {
|
|
|
6218
6331
|
}
|
|
6219
6332
|
);
|
|
6220
6333
|
case "scripts":
|
|
6221
|
-
return /* @__PURE__ */
|
|
6334
|
+
return /* @__PURE__ */ jsx42(
|
|
6222
6335
|
ScriptPicker,
|
|
6223
6336
|
{
|
|
6224
6337
|
onNavigate: nav.navigateInner,
|
|
@@ -6230,7 +6343,7 @@ function AppPanel() {
|
|
|
6230
6343
|
}
|
|
6231
6344
|
);
|
|
6232
6345
|
case "declarative":
|
|
6233
|
-
return /* @__PURE__ */
|
|
6346
|
+
return /* @__PURE__ */ jsx42(
|
|
6234
6347
|
DeclarativeHome,
|
|
6235
6348
|
{
|
|
6236
6349
|
onNavigate: nav.navigateInner,
|
|
@@ -6240,8 +6353,19 @@ function AppPanel() {
|
|
|
6240
6353
|
isInputActive: focus.isMainFocused
|
|
6241
6354
|
}
|
|
6242
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
|
+
);
|
|
6243
6367
|
case "config":
|
|
6244
|
-
return /* @__PURE__ */
|
|
6368
|
+
return /* @__PURE__ */ jsx42(
|
|
6245
6369
|
ProjectConfig,
|
|
6246
6370
|
{
|
|
6247
6371
|
onBack: focus.focusSidebar,
|
|
@@ -6252,7 +6376,7 @@ function AppPanel() {
|
|
|
6252
6376
|
}
|
|
6253
6377
|
);
|
|
6254
6378
|
case "self-update":
|
|
6255
|
-
return /* @__PURE__ */
|
|
6379
|
+
return /* @__PURE__ */ jsx42(
|
|
6256
6380
|
SelfUpdate,
|
|
6257
6381
|
{
|
|
6258
6382
|
onBack: focus.focusSidebar,
|
|
@@ -6264,7 +6388,7 @@ function AppPanel() {
|
|
|
6264
6388
|
}
|
|
6265
6389
|
);
|
|
6266
6390
|
default:
|
|
6267
|
-
return /* @__PURE__ */
|
|
6391
|
+
return /* @__PURE__ */ jsx42(Text41, { children: "Select an item from the sidebar" });
|
|
6268
6392
|
}
|
|
6269
6393
|
};
|
|
6270
6394
|
const renderInnerScreen = () => {
|
|
@@ -6272,7 +6396,7 @@ function AppPanel() {
|
|
|
6272
6396
|
const w = mainContentWidth - 2;
|
|
6273
6397
|
switch (nav.innerScreen) {
|
|
6274
6398
|
case "command-args":
|
|
6275
|
-
return /* @__PURE__ */
|
|
6399
|
+
return /* @__PURE__ */ jsx42(
|
|
6276
6400
|
CommandArgs,
|
|
6277
6401
|
{
|
|
6278
6402
|
command: nav.innerParams.command ?? "",
|
|
@@ -6285,7 +6409,7 @@ function AppPanel() {
|
|
|
6285
6409
|
}
|
|
6286
6410
|
);
|
|
6287
6411
|
case "custom-command":
|
|
6288
|
-
return /* @__PURE__ */
|
|
6412
|
+
return /* @__PURE__ */ jsx42(
|
|
6289
6413
|
CustomCommand,
|
|
6290
6414
|
{
|
|
6291
6415
|
onNavigate: nav.navigateInner,
|
|
@@ -6297,7 +6421,7 @@ function AppPanel() {
|
|
|
6297
6421
|
}
|
|
6298
6422
|
);
|
|
6299
6423
|
case "flag-selection":
|
|
6300
|
-
return /* @__PURE__ */
|
|
6424
|
+
return /* @__PURE__ */ jsx42(
|
|
6301
6425
|
FlagSelection,
|
|
6302
6426
|
{
|
|
6303
6427
|
args: nav.innerParams.args ?? [],
|
|
@@ -6313,7 +6437,7 @@ function AppPanel() {
|
|
|
6313
6437
|
);
|
|
6314
6438
|
case "confirm-execute":
|
|
6315
6439
|
case "command-execution":
|
|
6316
|
-
return /* @__PURE__ */
|
|
6440
|
+
return /* @__PURE__ */ jsx42(
|
|
6317
6441
|
CommandExecution,
|
|
6318
6442
|
{
|
|
6319
6443
|
args: nav.innerParams.args ?? [],
|
|
@@ -6334,7 +6458,7 @@ function AppPanel() {
|
|
|
6334
6458
|
`${nav.view}-${nav.innerParams.tool}-${(nav.innerParams.args ?? []).join("-")}`
|
|
6335
6459
|
);
|
|
6336
6460
|
case "pipeline-list":
|
|
6337
|
-
return /* @__PURE__ */
|
|
6461
|
+
return /* @__PURE__ */ jsx42(
|
|
6338
6462
|
PipelineList,
|
|
6339
6463
|
{
|
|
6340
6464
|
onNavigate: nav.navigateInner,
|
|
@@ -6346,7 +6470,7 @@ function AppPanel() {
|
|
|
6346
6470
|
}
|
|
6347
6471
|
);
|
|
6348
6472
|
case "pipeline-builder":
|
|
6349
|
-
return /* @__PURE__ */
|
|
6473
|
+
return /* @__PURE__ */ jsx42(
|
|
6350
6474
|
PipelineBuilder,
|
|
6351
6475
|
{
|
|
6352
6476
|
onBack: nav.goBackInner,
|
|
@@ -6357,7 +6481,7 @@ function AppPanel() {
|
|
|
6357
6481
|
}
|
|
6358
6482
|
);
|
|
6359
6483
|
case "pipeline-execution":
|
|
6360
|
-
return /* @__PURE__ */
|
|
6484
|
+
return /* @__PURE__ */ jsx42(
|
|
6361
6485
|
PipelineExecution,
|
|
6362
6486
|
{
|
|
6363
6487
|
pipelineId: nav.innerParams.pipelineId ?? "",
|
|
@@ -6369,7 +6493,7 @@ function AppPanel() {
|
|
|
6369
6493
|
}
|
|
6370
6494
|
);
|
|
6371
6495
|
case "self-update":
|
|
6372
|
-
return /* @__PURE__ */
|
|
6496
|
+
return /* @__PURE__ */ jsx42(
|
|
6373
6497
|
SelfUpdate,
|
|
6374
6498
|
{
|
|
6375
6499
|
onBack: nav.goBackInner,
|
|
@@ -6381,7 +6505,7 @@ function AppPanel() {
|
|
|
6381
6505
|
}
|
|
6382
6506
|
);
|
|
6383
6507
|
case "tool-status":
|
|
6384
|
-
return /* @__PURE__ */
|
|
6508
|
+
return /* @__PURE__ */ jsx42(
|
|
6385
6509
|
ToolStatus,
|
|
6386
6510
|
{
|
|
6387
6511
|
onBack: nav.goBackInner,
|
|
@@ -6393,7 +6517,7 @@ function AppPanel() {
|
|
|
6393
6517
|
}
|
|
6394
6518
|
);
|
|
6395
6519
|
case "mcp-manage":
|
|
6396
|
-
return /* @__PURE__ */
|
|
6520
|
+
return /* @__PURE__ */ jsx42(
|
|
6397
6521
|
McpManage,
|
|
6398
6522
|
{
|
|
6399
6523
|
onBack: nav.goBackInner,
|
|
@@ -6404,7 +6528,7 @@ function AppPanel() {
|
|
|
6404
6528
|
}
|
|
6405
6529
|
);
|
|
6406
6530
|
case "process-list":
|
|
6407
|
-
return /* @__PURE__ */
|
|
6531
|
+
return /* @__PURE__ */ jsx42(
|
|
6408
6532
|
ProcessList,
|
|
6409
6533
|
{
|
|
6410
6534
|
onNavigate: nav.navigateInner,
|
|
@@ -6416,7 +6540,7 @@ function AppPanel() {
|
|
|
6416
6540
|
}
|
|
6417
6541
|
);
|
|
6418
6542
|
case "process-logs":
|
|
6419
|
-
return /* @__PURE__ */
|
|
6543
|
+
return /* @__PURE__ */ jsx42(
|
|
6420
6544
|
ProcessLogs,
|
|
6421
6545
|
{
|
|
6422
6546
|
processId: nav.innerParams.processId ?? "",
|
|
@@ -6428,7 +6552,7 @@ function AppPanel() {
|
|
|
6428
6552
|
}
|
|
6429
6553
|
);
|
|
6430
6554
|
case "project-config":
|
|
6431
|
-
return /* @__PURE__ */
|
|
6555
|
+
return /* @__PURE__ */ jsx42(
|
|
6432
6556
|
ProjectConfig,
|
|
6433
6557
|
{
|
|
6434
6558
|
onBack: nav.goBackInner,
|
|
@@ -6439,7 +6563,7 @@ function AppPanel() {
|
|
|
6439
6563
|
}
|
|
6440
6564
|
);
|
|
6441
6565
|
case "declarative-plan":
|
|
6442
|
-
return /* @__PURE__ */
|
|
6566
|
+
return /* @__PURE__ */ jsx42(
|
|
6443
6567
|
DeclarativePlan,
|
|
6444
6568
|
{
|
|
6445
6569
|
onBack: nav.goBackInner,
|
|
@@ -6451,7 +6575,7 @@ function AppPanel() {
|
|
|
6451
6575
|
}
|
|
6452
6576
|
);
|
|
6453
6577
|
case "declarative-status":
|
|
6454
|
-
return /* @__PURE__ */
|
|
6578
|
+
return /* @__PURE__ */ jsx42(
|
|
6455
6579
|
DeclarativeStatus,
|
|
6456
6580
|
{
|
|
6457
6581
|
onBack: nav.goBackInner,
|
|
@@ -6462,7 +6586,7 @@ function AppPanel() {
|
|
|
6462
6586
|
}
|
|
6463
6587
|
);
|
|
6464
6588
|
case "init-scaffold":
|
|
6465
|
-
return /* @__PURE__ */
|
|
6589
|
+
return /* @__PURE__ */ jsx42(
|
|
6466
6590
|
InitScaffold,
|
|
6467
6591
|
{
|
|
6468
6592
|
onBack: nav.goBackInner,
|
|
@@ -6474,7 +6598,7 @@ function AppPanel() {
|
|
|
6474
6598
|
}
|
|
6475
6599
|
);
|
|
6476
6600
|
case "script-picker":
|
|
6477
|
-
return /* @__PURE__ */
|
|
6601
|
+
return /* @__PURE__ */ jsx42(
|
|
6478
6602
|
ScriptPicker,
|
|
6479
6603
|
{
|
|
6480
6604
|
onNavigate: nav.navigateInner,
|
|
@@ -6485,18 +6609,29 @@ function AppPanel() {
|
|
|
6485
6609
|
isInputActive: isActive
|
|
6486
6610
|
}
|
|
6487
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
|
+
);
|
|
6488
6623
|
default:
|
|
6489
|
-
return /* @__PURE__ */
|
|
6624
|
+
return /* @__PURE__ */ jsxs40(Text41, { color: "red", children: [
|
|
6490
6625
|
"Unknown screen: ",
|
|
6491
6626
|
nav.innerScreen
|
|
6492
6627
|
] });
|
|
6493
6628
|
}
|
|
6494
6629
|
};
|
|
6495
6630
|
if (modal.isOpen) {
|
|
6496
|
-
return /* @__PURE__ */
|
|
6631
|
+
return /* @__PURE__ */ jsx42(Box39, { flexDirection: "column", width, height, children: /* @__PURE__ */ jsx42(Modal, { title: modal.modalTitle, width, height, children: modal.modalContent }) });
|
|
6497
6632
|
}
|
|
6498
|
-
const header = /* @__PURE__ */
|
|
6499
|
-
const sidebar = /* @__PURE__ */
|
|
6633
|
+
const header = /* @__PURE__ */ jsx42(GhostBanner, { width, compact: true });
|
|
6634
|
+
const sidebar = /* @__PURE__ */ jsx42(
|
|
6500
6635
|
Panel,
|
|
6501
6636
|
{
|
|
6502
6637
|
id: "sidebar",
|
|
@@ -6504,7 +6639,7 @@ function AppPanel() {
|
|
|
6504
6639
|
width: Math.max(20, Math.min(35, Math.floor(width * 0.3))),
|
|
6505
6640
|
height: Math.max(5, height - bannerHeight - 1),
|
|
6506
6641
|
focused: focus.isSidebarFocused,
|
|
6507
|
-
children: /* @__PURE__ */
|
|
6642
|
+
children: /* @__PURE__ */ jsx42(
|
|
6508
6643
|
Sidebar,
|
|
6509
6644
|
{
|
|
6510
6645
|
items: sidebarItems,
|
|
@@ -6517,7 +6652,7 @@ function AppPanel() {
|
|
|
6517
6652
|
)
|
|
6518
6653
|
}
|
|
6519
6654
|
);
|
|
6520
|
-
const main2 = /* @__PURE__ */
|
|
6655
|
+
const main2 = /* @__PURE__ */ jsx42(
|
|
6521
6656
|
Panel,
|
|
6522
6657
|
{
|
|
6523
6658
|
id: "main",
|
|
@@ -6528,8 +6663,8 @@ function AppPanel() {
|
|
|
6528
6663
|
children: renderMainContent()
|
|
6529
6664
|
}
|
|
6530
6665
|
);
|
|
6531
|
-
const footer = /* @__PURE__ */
|
|
6532
|
-
return /* @__PURE__ */
|
|
6666
|
+
const footer = /* @__PURE__ */ jsx42(PanelFooter, { hints: footerHints, width });
|
|
6667
|
+
return /* @__PURE__ */ jsx42(
|
|
6533
6668
|
PanelLayout,
|
|
6534
6669
|
{
|
|
6535
6670
|
header,
|
|
@@ -6594,6 +6729,9 @@ function parseCliArgs(argv) {
|
|
|
6594
6729
|
if (argv_[0] === "apply") {
|
|
6595
6730
|
return { mode: "apply", options: {} };
|
|
6596
6731
|
}
|
|
6732
|
+
if (argv_[0] === "setup") {
|
|
6733
|
+
return { mode: "setup", options: {} };
|
|
6734
|
+
}
|
|
6597
6735
|
if (argv_[0] === "status") {
|
|
6598
6736
|
return { mode: "status", options: {} };
|
|
6599
6737
|
}
|
|
@@ -6667,6 +6805,7 @@ function printCliHelp() {
|
|
|
6667
6805
|
" polter config --edit Open config in $EDITOR",
|
|
6668
6806
|
" polter plan Show declarative state diff",
|
|
6669
6807
|
" polter apply Apply declarative state changes",
|
|
6808
|
+
" polter setup Install Polter skill for Claude Code",
|
|
6670
6809
|
" polter status Show current tool status",
|
|
6671
6810
|
" polter mcp install Install Polter MCP server into Claude Code (local scope)",
|
|
6672
6811
|
" polter mcp install --project Install for this project only (shared via repo)",
|
|
@@ -7518,6 +7657,10 @@ async function main() {
|
|
|
7518
7657
|
}
|
|
7519
7658
|
return;
|
|
7520
7659
|
}
|
|
7660
|
+
if (parsed.mode === "setup") {
|
|
7661
|
+
setupSkillCli();
|
|
7662
|
+
return;
|
|
7663
|
+
}
|
|
7521
7664
|
if (parsed.mode === "app") {
|
|
7522
7665
|
const exitCode = await runAppCli(parsed.options);
|
|
7523
7666
|
process.exit(exitCode);
|
|
@@ -7646,7 +7789,7 @@ Apply completed with ${errors.length} error(s).
|
|
|
7646
7789
|
const socketPath2 = getSocketPath();
|
|
7647
7790
|
const ipc2 = socketPath2 ? createIpcServer(socketPath2) : null;
|
|
7648
7791
|
if (ipc2) await ipc2.start();
|
|
7649
|
-
const inst = render(
|
|
7792
|
+
const inst = render(React29.createElement(AppComponent2));
|
|
7650
7793
|
await inst.waitUntilExit();
|
|
7651
7794
|
if (ipc2) await ipc2.stop();
|
|
7652
7795
|
process.exit(0);
|
|
@@ -7655,7 +7798,7 @@ Apply completed with ${errors.length} error(s).
|
|
|
7655
7798
|
const socketPath = getSocketPath();
|
|
7656
7799
|
const ipc = socketPath ? createIpcServer(socketPath) : null;
|
|
7657
7800
|
if (ipc) await ipc.start();
|
|
7658
|
-
const instance = render(
|
|
7801
|
+
const instance = render(React29.createElement(AppComponent));
|
|
7659
7802
|
await instance.waitUntilExit();
|
|
7660
7803
|
if (ipc) await ipc.stop();
|
|
7661
7804
|
process.exit(0);
|