starbridge 0.1.1 → 0.1.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/starbridge.js +16 -8
- package/package.json +1 -1
package/dist/starbridge.js
CHANGED
|
@@ -14359,7 +14359,7 @@ function processAlive(pid) {
|
|
|
14359
14359
|
// package.json
|
|
14360
14360
|
var package_default = {
|
|
14361
14361
|
name: "starbridge",
|
|
14362
|
-
version: "0.1.
|
|
14362
|
+
version: "0.1.2",
|
|
14363
14363
|
description: "Post decisions to your Starbridge devices and upload quota windows from CodexBar",
|
|
14364
14364
|
license: "MIT",
|
|
14365
14365
|
repository: {
|
|
@@ -16946,12 +16946,12 @@ import { mkdirSync as mkdirSync3, readFileSync as readFileSync7, rmSync as rmSyn
|
|
|
16946
16946
|
import { dirname as dirname2, join as join7 } from "node:path";
|
|
16947
16947
|
|
|
16948
16948
|
// ../plugin/hooks/rule.md
|
|
16949
|
-
var rule_default = "I am often away from this terminal and may not read your final message for hours. Reach me through the `starbridge` skill, not here
|
|
16949
|
+
var rule_default = "I am often away from this terminal and may not read your final message for hours. Reach me through the `starbridge` skill, not here, when you need a decision that is mine, and before you end a turn on work that waits on me, such as a PR to review or merge, or a failure only I can fix. In Claude Code, a quick question may use AskUserQuestion instead, since it reaches my devices too. Decide everything else yourself and keep working. Ask here only when `starbridge` fails.\n\nRun a command that blocks me (takes over the screen, keyboard or session, or holds a device I use), or that my instructions ask you to report, whole through `starbridge run`.\n";
|
|
16950
16950
|
|
|
16951
16951
|
// ../plugin/skills/starbridge/SKILL.md
|
|
16952
16952
|
var SKILL_default = `---
|
|
16953
16953
|
name: starbridge
|
|
16954
|
-
description: "Reach your user through Starbridge: a card on their phone that they answer with one tap, sent back into this session. Use it, instead of asking in chat
|
|
16954
|
+
description: "Reach your user through Starbridge: a card on their phone that they answer with one tap, sent back into this session. Use it, instead of asking in chat, whenever you need a decision that is theirs, and before ending a turn on work that waits on them (a PR to review or merge, a failure only they can fix). In Claude Code, a quick question may use AskUserQuestion, which reaches their devices too. Wrap in \`starbridge run\`, unasked, any command that blocks them or that their instructions ask you to report."
|
|
16955
16955
|
compatibility: The \`starbridge\` CLI on PATH, paired with \`starbridge pair\`.
|
|
16956
16956
|
---
|
|
16957
16957
|
|
|
@@ -16974,8 +16974,10 @@ their phone; they read it cold, between other things, and tap an option.
|
|
|
16974
16974
|
report: wrap it in \`starbridge run\` (below).
|
|
16975
16975
|
|
|
16976
16976
|
Decide everything else yourself and say what you did in your final message.
|
|
16977
|
-
Ask one question in one place
|
|
16978
|
-
\`AskUserQuestion
|
|
16977
|
+
Ask one question in one place, never also in the terminal. In Claude Code,
|
|
16978
|
+
\`AskUserQuestion\` reaches their devices too, so a quick question may use it;
|
|
16979
|
+
post a card for a decision they will read cold, or that needs links or
|
|
16980
|
+
images. Ask in the terminal only when \`starbridge\` fails (not
|
|
16979
16981
|
installed, not paired, an error), and say that it failed. A card cannot
|
|
16980
16982
|
approve an action your guidelines say needs the user's yes in this chat
|
|
16981
16983
|
(account settings, external messages, purchases, deleting data), since its
|
|
@@ -17118,7 +17120,7 @@ import { configDir } from "./poller.ts";
|
|
|
17118
17120
|
|
|
17119
17121
|
/** The agent API revision this mod speaks, sent in the \`starbridge-api\` header. */
|
|
17120
17122
|
export const API = 1;
|
|
17121
|
-
export const VERSION = "0.1.
|
|
17123
|
+
export const VERSION = "0.1.2";
|
|
17122
17124
|
const CLIENT = \`starbridge-mod/\${VERSION}\`;
|
|
17123
17125
|
|
|
17124
17126
|
/** Event types this mod submits; others are skipped and left unconfirmed, as the API asks. */
|
|
@@ -19923,6 +19925,11 @@ function isoOrNull(x) {
|
|
|
19923
19925
|
const t = Date.parse(x);
|
|
19924
19926
|
return Number.isNaN(t) ? null : `${new Date(t).toISOString().slice(0, 19)}Z`;
|
|
19925
19927
|
}
|
|
19928
|
+
function named(label, minutes) {
|
|
19929
|
+
if (label !== "Session" || minutes === null || minutes >= 24 * 60 || minutes % 60 !== 0)
|
|
19930
|
+
return label;
|
|
19931
|
+
return `${minutes / 60}-hour`;
|
|
19932
|
+
}
|
|
19926
19933
|
function window2(id, label, raw, now) {
|
|
19927
19934
|
if (!isObj2(raw))
|
|
19928
19935
|
return;
|
|
@@ -19930,11 +19937,12 @@ function window2(id, label, raw, now) {
|
|
|
19930
19937
|
if (typeof used !== "number" || !Number.isFinite(used) || used < 0)
|
|
19931
19938
|
return;
|
|
19932
19939
|
const minutes = raw.windowMinutes;
|
|
19940
|
+
const windowMinutes = typeof minutes === "number" && Number.isFinite(minutes) && minutes >= 1 ? Math.round(minutes) : null;
|
|
19933
19941
|
const w = {
|
|
19934
19942
|
id: clip(id, 100),
|
|
19935
|
-
label: clip(label, 100),
|
|
19943
|
+
label: clip(named(label, windowMinutes), 100),
|
|
19936
19944
|
usedPercent: used,
|
|
19937
|
-
windowMinutes
|
|
19945
|
+
windowMinutes,
|
|
19938
19946
|
resetsAt: isoOrNull(raw.resetsAt)
|
|
19939
19947
|
};
|
|
19940
19948
|
return { ...w, pace: computePace(w, now) };
|