hotsheet 0.7.0 → 0.8.0
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/cli.js +33 -6
- package/dist/client/app.global.js +45 -45
- package/dist/client/assets/icon-default.png +0 -0
- package/dist/client/assets/icon-variant-1.png +0 -0
- package/dist/client/assets/icon-variant-2.png +0 -0
- package/dist/client/assets/icon-variant-3.png +0 -0
- package/dist/client/assets/icon-variant-4.png +0 -0
- package/dist/client/assets/icon-variant-5.png +0 -0
- package/dist/client/assets/icon-variant-6.png +0 -0
- package/dist/client/assets/icon-variant-7.png +0 -0
- package/dist/client/assets/icon-variant-8.png +0 -0
- package/dist/client/assets/icon-variant-9.png +0 -0
- package/dist/client/styles.css +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -519,10 +519,17 @@ async function isChannelAlive(dataDir2) {
|
|
|
519
519
|
async function triggerChannel(dataDir2, serverPort, message) {
|
|
520
520
|
const port2 = getChannelPort(dataDir2);
|
|
521
521
|
if (!port2) return false;
|
|
522
|
+
let secretHeader = "";
|
|
523
|
+
try {
|
|
524
|
+
const { readFileSettings: readFileSettings2 } = await Promise.resolve().then(() => (init_file_settings(), file_settings_exports));
|
|
525
|
+
const settings = readFileSettings2(dataDir2);
|
|
526
|
+
if (settings.secret) secretHeader = ` -H "X-Hotsheet-Secret: ${settings.secret}"`;
|
|
527
|
+
} catch {
|
|
528
|
+
}
|
|
522
529
|
const doneSignal = `
|
|
523
530
|
|
|
524
531
|
When you are completely finished (or if there was nothing to do), signal completion by running:
|
|
525
|
-
curl -s -X POST http://localhost:${serverPort}/api/channel/done`;
|
|
532
|
+
curl -s -X POST http://localhost:${serverPort}/api/channel/done${secretHeader}`;
|
|
526
533
|
const content = message ? message + doneSignal : "Process the Hot Sheet worklist. Run /hotsheet to work through the current Up Next items." + doneSignal;
|
|
527
534
|
try {
|
|
528
535
|
const res = await fetch(`http://127.0.0.1:${port2}/trigger`, {
|
|
@@ -3837,7 +3844,7 @@ pageRoutes.get("/", (c) => {
|
|
|
3837
3844
|
/* @__PURE__ */ jsx("div", { id: "detail-attachments", className: "detail-attachments" }),
|
|
3838
3845
|
/* @__PURE__ */ jsx("label", { className: "btn btn-sm upload-btn", children: [
|
|
3839
3846
|
"Attach File",
|
|
3840
|
-
/* @__PURE__ */ jsx("input", { type: "file", id: "detail-file-input", style: "display:none" })
|
|
3847
|
+
/* @__PURE__ */ jsx("input", { type: "file", id: "detail-file-input", style: "display:none", multiple: true })
|
|
3841
3848
|
] })
|
|
3842
3849
|
] }),
|
|
3843
3850
|
/* @__PURE__ */ jsx("div", { className: "detail-field detail-field-full", id: "detail-notes-section", children: [
|
|
@@ -3862,7 +3869,7 @@ pageRoutes.get("/", (c) => {
|
|
|
3862
3869
|
/* @__PURE__ */ jsx("kbd", { children: "Enter" }),
|
|
3863
3870
|
" new ticket"
|
|
3864
3871
|
] }),
|
|
3865
|
-
/* @__PURE__ */ jsx("span", { children: [
|
|
3872
|
+
/* @__PURE__ */ jsx("span", { "data-hint": "category", children: [
|
|
3866
3873
|
/* @__PURE__ */ jsx("kbd", { children: [
|
|
3867
3874
|
"\u2318",
|
|
3868
3875
|
"I/B/F/R/K/G"
|
|
@@ -3958,7 +3965,10 @@ pageRoutes.get("/", (c) => {
|
|
|
3958
3965
|
/* @__PURE__ */ jsx("div", { className: "settings-tab-panel active", "data-panel": "general", children: [
|
|
3959
3966
|
/* @__PURE__ */ jsx("div", { className: "settings-field", children: [
|
|
3960
3967
|
/* @__PURE__ */ jsx("label", { children: "App name" }),
|
|
3961
|
-
/* @__PURE__ */ jsx("
|
|
3968
|
+
/* @__PURE__ */ jsx("div", { className: "settings-app-name-row", children: [
|
|
3969
|
+
/* @__PURE__ */ jsx("button", { className: "app-icon-picker-btn", id: "app-icon-picker-btn", title: "Change app icon", children: /* @__PURE__ */ jsx("img", { id: "app-icon-preview", src: "/static/assets/icon-default.png", width: "28", height: "28" }) }),
|
|
3970
|
+
/* @__PURE__ */ jsx("input", { type: "text", id: "settings-app-name", placeholder: "Hot Sheet" })
|
|
3971
|
+
] }),
|
|
3962
3972
|
/* @__PURE__ */ jsx("span", { className: "settings-hint", id: "settings-app-name-hint", children: "Custom name shown in the title bar. Leave empty for default." })
|
|
3963
3973
|
] }),
|
|
3964
3974
|
/* @__PURE__ */ jsx("div", { className: "settings-field", children: [
|
|
@@ -4098,15 +4108,32 @@ async function startServer(port2, dataDir2, options) {
|
|
|
4098
4108
|
return new Response(content, { headers: { "Content-Type": mimeTypes[ext || ""] || "application/octet-stream", "Cache-Control": "max-age=86400" } });
|
|
4099
4109
|
});
|
|
4100
4110
|
app.use("/api/*", async (c, next) => {
|
|
4111
|
+
const settings = readFileSettings(dataDir2);
|
|
4112
|
+
const expectedSecret = settings.secret;
|
|
4113
|
+
if (!expectedSecret) {
|
|
4114
|
+
await next();
|
|
4115
|
+
return;
|
|
4116
|
+
}
|
|
4101
4117
|
const headerSecret = c.req.header("X-Hotsheet-Secret");
|
|
4118
|
+
const method = c.req.method;
|
|
4119
|
+
const isMutation = method === "POST" || method === "PATCH" || method === "PUT" || method === "DELETE";
|
|
4102
4120
|
if (headerSecret) {
|
|
4103
|
-
|
|
4104
|
-
if (settings.secret && headerSecret !== settings.secret) {
|
|
4121
|
+
if (headerSecret !== expectedSecret) {
|
|
4105
4122
|
return c.json({
|
|
4106
4123
|
error: "Secret mismatch \u2014 you may be connecting to the wrong Hot Sheet instance.",
|
|
4107
4124
|
recovery: "Re-read .hotsheet/settings.json to get the correct port and secret, and re-read your skill files (e.g. .claude/skills/hotsheet/SKILL.md) for updated instructions."
|
|
4108
4125
|
}, 403);
|
|
4109
4126
|
}
|
|
4127
|
+
} else if (isMutation) {
|
|
4128
|
+
const origin = c.req.header("Origin");
|
|
4129
|
+
const referer = c.req.header("Referer");
|
|
4130
|
+
const isBrowser = !!(origin || referer);
|
|
4131
|
+
if (!isBrowser) {
|
|
4132
|
+
return c.json({
|
|
4133
|
+
error: "Missing X-Hotsheet-Secret header. Read .hotsheet/settings.json for the correct port and secret.",
|
|
4134
|
+
recovery: "Re-read .hotsheet/settings.json to get the correct port and secret, and re-read your skill files for updated instructions."
|
|
4135
|
+
}, 403);
|
|
4136
|
+
}
|
|
4110
4137
|
}
|
|
4111
4138
|
await next();
|
|
4112
4139
|
});
|