@nanocollective/roster 0.1.0-alpha.31 → 0.1.0-alpha.33

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 CHANGED
@@ -2658,7 +2658,8 @@ async function staffRuns(brain, handle, days = 30) {
2658
2658
  "--created",
2659
2659
  `>=${since}`,
2660
2660
  "--limit",
2661
- "100",
2661
+ // Skipped mentions (the gate saying no) count towards the limit, and there are hundreds.
2662
+ kind === "mention" ? "500" : "100",
2662
2663
  "--json",
2663
2664
  "databaseId,conclusion,status,createdAt,updatedAt,url"
2664
2665
  ]).then((res) => ({ kind, res }))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanocollective/roster",
3
- "version": "0.1.0-alpha.31",
3
+ "version": "0.1.0-alpha.33",
4
4
  "description": "An agent-run org, powered by GitHub. Scaffold AI staff members whose brain is a repo.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -361,7 +361,9 @@ function mdAsset(src, opts) {
361
361
  return path ? "/api/file?path=" + encodeURIComponent(opts.file.staffDir + "/" + path) : src;
362
362
  }
363
363
 
364
- const REF_RE = /(^|[\s(>])([\w.-]+\/[\w.-]+)?#(\d+)\b/g;
364
+ /* #123, repo#123 and owner/repo#123. The short repo form is how the staff write about the other
365
+ repos in their own org (pip-web#172), and it was left as plain text. */
366
+ const REF_RE = /(^|[\s(>])((?:[\w.-]+\/)?[\w.-]+)?#(\d+)\b/g;
365
367
  // GitHub's own username shape, plus the short aliases the agents answer to.
366
368
  const AT_RE = /(^|[\s(>])@([a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38})\b/gi;
367
369
 
@@ -381,7 +383,8 @@ export function chips(html, opts = {}) {
381
383
  if (inA) return p;
382
384
  return p
383
385
  .replace(REF_RE, (m, pre, repo, n) => {
384
- const target = repo || opts.repo;
386
+ const owner = String(opts.repo ?? "").split("/")[0];
387
+ const target = !repo ? opts.repo : repo.includes("/") ? repo : owner ? owner + "/" + repo : "";
385
388
  if (!target) return m;
386
389
  // /issues/N redirects to /pull/N when it is a PR, so one form is always right.
387
390
  return pre + '<a class="ref" href="https://github.com/' + target + "/issues/" + n +
@@ -29,6 +29,11 @@ export function viewRuns(m) {
29
29
  return;
30
30
  }
31
31
  paint(m, S.runs);
32
+ /* Kept for the session, it could be days old: a tab opened during a rate limit went on
33
+ showing a two-week-old list. Anything older than a few minutes is asked for again. */
34
+ // Only a read with a time on it can be old, and only one re-read is asked for at a time.
35
+ const at = S.runs.fetchedAt ? new Date(S.runs.fetchedAt).getTime() : 0;
36
+ if (at && Date.now() - at > 5 * 60_000 && !asking) load(true);
32
37
  }
33
38
 
34
39
  let asking = false;