@rackbops/plugin-tracker 0.31.3 → 0.31.4

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 CHANGED
@@ -559,6 +559,11 @@ It is served under `/tracker/api/v1/` on the same origin as the web area, and on
559
559
  `TRACKER_WEB_URL` is set. Every write goes through the same functions as the web editor and the
560
560
  slash commands -- the same fields, defaults, limits, caps and messages -- in the same write queue.
561
561
 
562
+ The Claude in Chrome route (#125) is one such program: this repo's `clerk-browser-search` skill
563
+ (`.claude/skills/clerk-browser-search/SKILL.md`) searches eBay and BoardGameGeek in the owner's own
564
+ Chrome, looking only, and sends listings to inbox watches and pages to research requests through
565
+ `scripts/clerk-browser.ts`, which reads the Access service token and the tracker token from files.
566
+
562
567
  **Tokens.** Make one on the web area's `/tokens` page (linked from Settings): a name, and an expiry
563
568
  of 30, 90 (the default) or 365 days -- every token expires. The token -- `trk_` and 43 characters --
564
569
  is sent to you once, by Discord DM from the bot; it never appears in any web page or response, and
package/dist/plugin.js CHANGED
@@ -2842,19 +2842,19 @@ var REVIEW_SCHEMA = {
2842
2842
  },
2843
2843
  answer: {
2844
2844
  ...ANSWER_SCHEMA,
2845
- description: "The answer to send: the draft unchanged on approve, corrected on revise."
2845
+ description: "The corrected answer, on revise only; left out on approve and reject."
2846
2846
  }
2847
2847
  },
2848
2848
  required: ["verdict", "problems"]
2849
2849
  };
2850
- function parseReview(value) {
2850
+ function parseReview(value, draft) {
2851
2851
  if (!isObj2(value) || typeof value.verdict !== "string")
2852
2852
  return null;
2853
2853
  const verdict = VERDICTS.includes(value.verdict) ? value.verdict : null;
2854
2854
  if (!verdict)
2855
2855
  return null;
2856
2856
  const problems = (Array.isArray(value.problems) ? value.problems : []).filter((p) => typeof p === "string").map((p) => clean(p, MAX_PROBLEM_CHARS, true)).filter((p) => p.length > 0).slice(0, MAX_PROBLEMS);
2857
- const answer = parseAnswer(value.answer);
2857
+ const answer = parseAnswer(value.answer) ?? (verdict === "approve" ? draft ?? null : null);
2858
2858
  if (verdict !== "reject" && !answer)
2859
2859
  return null;
2860
2860
  return { verdict, problems, answer: verdict === "reject" ? null : answer };
@@ -3322,7 +3322,7 @@ function reviewJob(config, draft, pages, earlier, options = {}) {
3322
3322
  ...earlier ? updateChecks() : [...answerChecks(), ...categoryChecks()],
3323
3323
  ...earlier || sent ? [] : [...bestSourceChecks(canWait), ...firecrawlChecks()],
3324
3324
  "",
3325
- "Then give a verdict: `approve` if the draft stands as is and covers every part (return it " + "unchanged in `answer`); `revise` if it stands once corrected (return the corrected " + "answer in `answer`); `reject` if editing cannot fix it. List each problem you found in " + "`problems`, one line each."
3325
+ "Then give a verdict: `approve` if the draft stands as is and covers every part (leave " + "`answer` out: the draft is sent as it is); `revise` if it stands once corrected (return the corrected " + "answer in `answer`); `reject` if editing cannot fix it. List each problem you found in " + "`problems`, one line each."
3326
3326
  ].join(`
3327
3327
  `);
3328
3328
  return {
@@ -3418,7 +3418,7 @@ function afterResearch(ctx, state, output) {
3418
3418
  };
3419
3419
  }
3420
3420
  function afterReview(ctx, state, output, canWait) {
3421
- const review = parseReview(output);
3421
+ const review = parseReview(output, state.draft ?? undefined);
3422
3422
  if (!review)
3423
3423
  return failed(ctx, state, "malformed", "no usable verdict in the structured output");
3424
3424
  if (state.pass === 2)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rackbops/plugin-tracker",
3
- "version": "0.31.3",
3
+ "version": "0.31.4",
4
4
  "description": "The task tracker for Rackbops Clerk: reminders, renewals, price drops, one-off research (on the web, or on pages your own browser gathers and sends in through the task API, with a fuller pass on pages the research could not open) and an interest scout (through city-hall, with their findings), a want-list watcher (listing pages you paste, BoardGameGeek through its API once its token is set, and eBay and BoardGameGeek listings you send in through the task API or that eBay's saved-search alert emails forwarded to your alert address carry, which the watcher never opens; with the model checking each new listing and its seller first, through city-hall) by slash command, delivered by DM with buttons, and a daily DM at each person's hour of what is due today and overdue, on docket's SQLite store (/allow, /register, /remind, /renewal, /price, /research, /scout, /want, /tasks, /task, /settings, /web), with a web area for your tasks, history and settings, a web editor to make, change, pause and delete your own tasks (research requests too, made but not changed, and scouts, made and changed), an admin view (with the DMs that did not arrive, raising a person's daily model ceiling, and daily model usage per person), an operator switch that turns the daily budgets off for the alpha, forget-me, and a JSON task API with personal API tokens",
5
5
  "type": "module",
6
6
  "main": "dist/plugin.js",
@@ -11,8 +11,8 @@
11
11
  "directory": "plugins/tracker"
12
12
  },
13
13
  "devDependencies": {
14
- "@rackbops/docket-core": "^0.11.0",
15
- "@rackbops/docket-types": "^0.11.0",
14
+ "@rackbops/docket-core": "^0.11.1",
15
+ "@rackbops/docket-types": "^0.11.1",
16
16
  "@rackbops/styles": "^0.2.42"
17
17
  },
18
18
  "peerDependencies": {