@dreamorosi/agent-timekeeper-claude-code 0.2.0 → 0.2.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-timekeeper",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Claude Code plugin for Agent Timekeeper: records Sessions, Runs, tool calls and Interactions as Signals, and uploads them to your own endpoint",
5
5
  "author": {
6
6
  "name": "Andrea Amorosi"
package/hooks/register.js CHANGED
@@ -21669,6 +21669,20 @@ var placeLookup = (host, {
21669
21669
  };
21670
21670
  };
21671
21671
 
21672
+ // src/toast.ts
21673
+ var toastText = (problem, pending) => {
21674
+ switch (problem.id) {
21675
+ case "config":
21676
+ return "The config can't be used: run /timekeeper for the fix";
21677
+ case "unauthorized":
21678
+ return "The endpoint rejected the token: run /timekeeper for the fix";
21679
+ case "stalled":
21680
+ return `No upload for a day, ${pending} Signals waiting: run /timekeeper`;
21681
+ case "quarantined":
21682
+ return "The endpoint rejected some Signals: run /timekeeper for details";
21683
+ }
21684
+ };
21685
+
21672
21686
  // src/translate.ts
21673
21687
  var ID = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/;
21674
21688
  var id = (value) => typeof value === "string" && ID.test(value) ? value : void 0;
@@ -22019,7 +22033,8 @@ async function checkStatus($, state) {
22019
22033
  if (!state.interactive) return;
22020
22034
  const at = /* @__PURE__ */ new Date();
22021
22035
  const config2 = await loadModConfig(state.host);
22022
- const problem = findProblem(config2, await readModStatus(state.host), at);
22036
+ const status = await readModStatus(state.host);
22037
+ const problem = findProblem(config2, status, at);
22023
22038
  if (problem === void 0) return;
22024
22039
  const shared = await quietly(async () => {
22025
22040
  const text = await $.fs.read(state.toastFile);
@@ -22029,10 +22044,9 @@ async function checkStatus($, state) {
22029
22044
  return;
22030
22045
  }
22031
22046
  state.lastToastHere = at.toISOString();
22032
- $.ui.toast(
22033
- `Agent Timekeeper: ${redact(problem.message, config2.ok ? config2.config.token : void 0)}`,
22034
- { timeoutMs: 1e4 }
22035
- );
22047
+ $.ui.toast(toastText(problem, status?.pendingSignals ?? 0), {
22048
+ timeoutMs: 1e4
22049
+ });
22036
22050
  await quietly(
22037
22051
  () => $.fs.write(
22038
22052
  state.toastFile,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamorosi/agent-timekeeper-claude-code",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Claude Code plugin for Agent Timekeeper: records Sessions, Runs, tool calls and Interactions as Signals, and uploads them to your own endpoint",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {