hotsheet 0.5.3 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/channel.js +7435 -408
- package/dist/cli.js +90 -25
- package/dist/client/app.global.js +38 -38
- package/dist/client/styles.css +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -498,16 +498,15 @@ async function isChannelAlive(dataDir2) {
|
|
|
498
498
|
async function triggerChannel(dataDir2, serverPort, message) {
|
|
499
499
|
const port2 = getChannelPort(dataDir2);
|
|
500
500
|
if (!port2) return false;
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
].join("\n");
|
|
501
|
+
const doneSignal = `
|
|
502
|
+
|
|
503
|
+
When you are completely finished (or if there was nothing to do), signal completion by running:
|
|
504
|
+
curl -s -X POST http://localhost:${serverPort}/api/channel/done`;
|
|
505
|
+
const content = message ? message + doneSignal : "Process the Hot Sheet worklist. Run /hotsheet to work through the current Up Next items." + doneSignal;
|
|
507
506
|
try {
|
|
508
507
|
const res = await fetch(`http://127.0.0.1:${port2}/trigger`, {
|
|
509
508
|
method: "POST",
|
|
510
|
-
body:
|
|
509
|
+
body: content
|
|
511
510
|
});
|
|
512
511
|
return res.ok;
|
|
513
512
|
} catch {
|
|
@@ -3074,6 +3073,47 @@ apiRoutes.post("/channel/trigger", async (c) => {
|
|
|
3074
3073
|
const ok = await triggerChannel2(dataDir2, serverPort, body.message);
|
|
3075
3074
|
return c.json({ ok });
|
|
3076
3075
|
});
|
|
3076
|
+
apiRoutes.get("/channel/permission", async (c) => {
|
|
3077
|
+
const { getChannelPort: getChannelPort2 } = await Promise.resolve().then(() => (init_channel_config(), channel_config_exports));
|
|
3078
|
+
const dataDir2 = c.get("dataDir");
|
|
3079
|
+
const port2 = getChannelPort2(dataDir2);
|
|
3080
|
+
if (!port2) return c.json({ pending: null });
|
|
3081
|
+
try {
|
|
3082
|
+
const res = await fetch(`http://127.0.0.1:${port2}/permission`);
|
|
3083
|
+
const data = await res.json();
|
|
3084
|
+
return c.json(data);
|
|
3085
|
+
} catch {
|
|
3086
|
+
return c.json({ pending: null });
|
|
3087
|
+
}
|
|
3088
|
+
});
|
|
3089
|
+
apiRoutes.post("/channel/permission/respond", async (c) => {
|
|
3090
|
+
const { getChannelPort: getChannelPort2 } = await Promise.resolve().then(() => (init_channel_config(), channel_config_exports));
|
|
3091
|
+
const dataDir2 = c.get("dataDir");
|
|
3092
|
+
const port2 = getChannelPort2(dataDir2);
|
|
3093
|
+
if (!port2) return c.json({ error: "Channel not available" }, 503);
|
|
3094
|
+
const body = await c.req.json();
|
|
3095
|
+
try {
|
|
3096
|
+
const res = await fetch(`http://127.0.0.1:${port2}/permission/respond`, {
|
|
3097
|
+
method: "POST",
|
|
3098
|
+
headers: { "Content-Type": "application/json" },
|
|
3099
|
+
body: JSON.stringify(body)
|
|
3100
|
+
});
|
|
3101
|
+
return c.json(await res.json());
|
|
3102
|
+
} catch {
|
|
3103
|
+
return c.json({ error: "Failed to reach channel server" }, 503);
|
|
3104
|
+
}
|
|
3105
|
+
});
|
|
3106
|
+
apiRoutes.post("/channel/permission/dismiss", async (c) => {
|
|
3107
|
+
const { getChannelPort: getChannelPort2 } = await Promise.resolve().then(() => (init_channel_config(), channel_config_exports));
|
|
3108
|
+
const dataDir2 = c.get("dataDir");
|
|
3109
|
+
const port2 = getChannelPort2(dataDir2);
|
|
3110
|
+
if (!port2) return c.json({ ok: true });
|
|
3111
|
+
try {
|
|
3112
|
+
await fetch(`http://127.0.0.1:${port2}/permission/dismiss`, { method: "POST" });
|
|
3113
|
+
} catch {
|
|
3114
|
+
}
|
|
3115
|
+
return c.json({ ok: true });
|
|
3116
|
+
});
|
|
3077
3117
|
apiRoutes.post("/channel/done", async (_c) => {
|
|
3078
3118
|
channelDoneFlag = true;
|
|
3079
3119
|
notifyChange();
|
|
@@ -3438,6 +3478,7 @@ pageRoutes.get("/", (c) => {
|
|
|
3438
3478
|
/* @__PURE__ */ jsx("path", { d: "M2 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 2 18z" })
|
|
3439
3479
|
] }) })
|
|
3440
3480
|
] }) }),
|
|
3481
|
+
/* @__PURE__ */ jsx("div", { id: "channel-commands-container" }),
|
|
3441
3482
|
/* @__PURE__ */ jsx("div", { className: "sidebar-copy-prompt", id: "copy-prompt-section", style: "display:none", children: /* @__PURE__ */ jsx("button", { className: "copy-prompt-btn", id: "copy-prompt-btn", title: "Copy worklist prompt to clipboard", children: [
|
|
3442
3483
|
/* @__PURE__ */ jsx("span", { className: "copy-prompt-icon", id: "copy-prompt-icon", children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3443
3484
|
/* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
|
|
@@ -3661,6 +3702,14 @@ pageRoutes.get("/", (c) => {
|
|
|
3661
3702
|
] }),
|
|
3662
3703
|
/* @__PURE__ */ jsx("span", { children: "Backups" })
|
|
3663
3704
|
] }),
|
|
3705
|
+
/* @__PURE__ */ jsx("button", { className: "settings-tab", "data-tab": "experimental", id: "settings-tab-experimental", style: "display:none", children: [
|
|
3706
|
+
/* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3707
|
+
/* @__PURE__ */ jsx("path", { d: "M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2" }),
|
|
3708
|
+
/* @__PURE__ */ jsx("path", { d: "M8.5 2h7" }),
|
|
3709
|
+
/* @__PURE__ */ jsx("path", { d: "M7 16h10" })
|
|
3710
|
+
] }),
|
|
3711
|
+
/* @__PURE__ */ jsx("span", { children: "Experimental" })
|
|
3712
|
+
] }),
|
|
3664
3713
|
/* @__PURE__ */ jsx("button", { className: "settings-tab", "data-tab": "updates", id: "settings-tab-updates", style: "display:none", children: [
|
|
3665
3714
|
/* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3666
3715
|
/* @__PURE__ */ jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
@@ -3684,24 +3733,7 @@ pageRoutes.get("/", (c) => {
|
|
|
3684
3733
|
/* @__PURE__ */ jsx("div", { className: "settings-field", children: [
|
|
3685
3734
|
/* @__PURE__ */ jsx("label", { children: "Auto-clear verified after (days)" }),
|
|
3686
3735
|
/* @__PURE__ */ jsx("input", { type: "number", id: "settings-verified-days", min: "1", value: "30" })
|
|
3687
|
-
] })
|
|
3688
|
-
/* @__PURE__ */ jsx("div", { id: "settings-channel-section", style: "display:none", children: /* @__PURE__ */ jsx("div", { className: "settings-section", style: "margin-top:16px", children: [
|
|
3689
|
-
/* @__PURE__ */ jsx("h3", { className: "settings-experimental-heading", children: "Experimental" }),
|
|
3690
|
-
/* @__PURE__ */ jsx("div", { className: "settings-field", children: [
|
|
3691
|
-
/* @__PURE__ */ jsx("label", { className: "settings-checkbox-label", children: [
|
|
3692
|
-
/* @__PURE__ */ jsx("input", { type: "checkbox", id: "settings-channel-enabled" }),
|
|
3693
|
-
"Enable Claude Channel integration"
|
|
3694
|
-
] }),
|
|
3695
|
-
/* @__PURE__ */ jsx("span", { className: "settings-hint", id: "settings-channel-hint", children: "Push worklist events to a running Claude Code session via MCP channels." }),
|
|
3696
|
-
/* @__PURE__ */ jsx("div", { id: "settings-channel-instructions", style: "display:none", children: [
|
|
3697
|
-
/* @__PURE__ */ jsx("div", { className: "settings-hint", style: "margin-top:8px", children: "Launch Claude Code with channel support:" }),
|
|
3698
|
-
/* @__PURE__ */ jsx("div", { className: "settings-channel-command", children: [
|
|
3699
|
-
/* @__PURE__ */ jsx("code", { id: "settings-channel-cmd", children: "claude --dangerously-load-development-channels server:hotsheet-channel" }),
|
|
3700
|
-
/* @__PURE__ */ jsx("button", { className: "btn btn-sm", id: "settings-channel-copy-btn", title: "Copy command", children: "Copy" })
|
|
3701
|
-
] })
|
|
3702
|
-
] })
|
|
3703
|
-
] })
|
|
3704
|
-
] }) })
|
|
3736
|
+
] })
|
|
3705
3737
|
] }),
|
|
3706
3738
|
/* @__PURE__ */ jsx("div", { className: "settings-tab-panel", "data-panel": "categories", children: [
|
|
3707
3739
|
/* @__PURE__ */ jsx("div", { className: "settings-section-header", children: [
|
|
@@ -3723,6 +3755,30 @@ pageRoutes.get("/", (c) => {
|
|
|
3723
3755
|
] }),
|
|
3724
3756
|
/* @__PURE__ */ jsx("div", { id: "backup-list", className: "backup-list", children: "Loading backups..." })
|
|
3725
3757
|
] }),
|
|
3758
|
+
/* @__PURE__ */ jsx("div", { className: "settings-tab-panel", "data-panel": "experimental", id: "settings-experimental-panel", style: "display:none", children: [
|
|
3759
|
+
/* @__PURE__ */ jsx("div", { className: "settings-field", children: [
|
|
3760
|
+
/* @__PURE__ */ jsx("label", { className: "settings-checkbox-label", children: [
|
|
3761
|
+
/* @__PURE__ */ jsx("input", { type: "checkbox", id: "settings-channel-enabled" }),
|
|
3762
|
+
"Enable Claude Channel integration"
|
|
3763
|
+
] }),
|
|
3764
|
+
/* @__PURE__ */ jsx("span", { className: "settings-hint", id: "settings-channel-hint", children: "Push worklist events to a running Claude Code session via MCP channels." }),
|
|
3765
|
+
/* @__PURE__ */ jsx("div", { id: "settings-channel-instructions", style: "display:none", children: [
|
|
3766
|
+
/* @__PURE__ */ jsx("div", { className: "settings-hint", style: "margin-top:8px", children: "Launch Claude Code with channel support:" }),
|
|
3767
|
+
/* @__PURE__ */ jsx("div", { className: "settings-channel-command", children: [
|
|
3768
|
+
/* @__PURE__ */ jsx("code", { id: "settings-channel-cmd", children: "claude --dangerously-load-development-channels server:hotsheet-channel" }),
|
|
3769
|
+
/* @__PURE__ */ jsx("button", { className: "btn btn-sm", id: "settings-channel-copy-btn", title: "Copy command", children: "Copy" })
|
|
3770
|
+
] })
|
|
3771
|
+
] })
|
|
3772
|
+
] }),
|
|
3773
|
+
/* @__PURE__ */ jsx("div", { id: "settings-custom-commands-section", style: "display:none", children: /* @__PURE__ */ jsx("div", { className: "settings-section", style: "margin-top:16px", children: [
|
|
3774
|
+
/* @__PURE__ */ jsx("div", { className: "settings-section-header", children: [
|
|
3775
|
+
/* @__PURE__ */ jsx("h3", { children: "Custom Commands" }),
|
|
3776
|
+
/* @__PURE__ */ jsx("button", { className: "btn btn-sm", id: "settings-add-command-btn", children: "Add Command" })
|
|
3777
|
+
] }),
|
|
3778
|
+
/* @__PURE__ */ jsx("span", { className: "settings-hint", children: "Custom buttons that trigger actions in Claude. They appear below the play button in the sidebar." }),
|
|
3779
|
+
/* @__PURE__ */ jsx("div", { id: "settings-commands-list", className: "settings-commands-list", style: "margin-top:8px" })
|
|
3780
|
+
] }) })
|
|
3781
|
+
] }),
|
|
3726
3782
|
/* @__PURE__ */ jsx("div", { className: "settings-tab-panel", "data-panel": "updates", id: "settings-updates-section", style: "display:none", children: [
|
|
3727
3783
|
/* @__PURE__ */ jsx("div", { className: "settings-section-header", children: [
|
|
3728
3784
|
/* @__PURE__ */ jsx("h3", { children: "Software Updates" }),
|
|
@@ -3731,6 +3787,15 @@ pageRoutes.get("/", (c) => {
|
|
|
3731
3787
|
/* @__PURE__ */ jsx("div", { className: "settings-hint", id: "check-updates-status" })
|
|
3732
3788
|
] })
|
|
3733
3789
|
] })
|
|
3790
|
+
] }) }),
|
|
3791
|
+
/* @__PURE__ */ jsx("div", { className: "permission-overlay", id: "permission-overlay", style: "display:none", children: /* @__PURE__ */ jsx("div", { className: "permission-overlay-content", children: [
|
|
3792
|
+
/* @__PURE__ */ jsx("div", { className: "permission-overlay-text", children: "Claude is waiting for permission" }),
|
|
3793
|
+
/* @__PURE__ */ jsx("div", { className: "permission-overlay-detail", id: "permission-overlay-detail" }),
|
|
3794
|
+
/* @__PURE__ */ jsx("div", { className: "permission-overlay-actions", children: [
|
|
3795
|
+
/* @__PURE__ */ jsx("button", { className: "permission-overlay-btn permission-allow", id: "permission-allow-btn", children: "Allow" }),
|
|
3796
|
+
/* @__PURE__ */ jsx("button", { className: "permission-overlay-btn permission-deny", id: "permission-deny-btn", children: "Deny" }),
|
|
3797
|
+
/* @__PURE__ */ jsx("button", { className: "permission-overlay-btn permission-dismiss", id: "permission-dismiss-btn", children: "Dismiss" })
|
|
3798
|
+
] })
|
|
3734
3799
|
] }) })
|
|
3735
3800
|
] });
|
|
3736
3801
|
return c.html(html.toString());
|