claudemesh-cli 1.12.0 → 1.13.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.
@@ -88,7 +88,7 @@ __export(exports_urls, {
88
88
  VERSION: () => VERSION,
89
89
  URLS: () => URLS
90
90
  });
91
- var URLS, VERSION = "1.12.0", env;
91
+ var URLS, VERSION = "1.13.0", env;
92
92
  var init_urls = __esm(() => {
93
93
  URLS = {
94
94
  BROKER: process.env.CLAUDEMESH_BROKER_URL ?? "wss://ic.claudemesh.com/ws",
@@ -12289,6 +12289,7 @@ var exports_me = {};
12289
12289
  __export(exports_me, {
12290
12290
  runMeTopics: () => runMeTopics,
12291
12291
  runMeNotifications: () => runMeNotifications,
12292
+ runMeActivity: () => runMeActivity,
12292
12293
  runMe: () => runMe
12293
12294
  });
12294
12295
  async function runMe(flags) {
@@ -12407,6 +12408,44 @@ async function runMeNotifications(flags) {
12407
12408
  return EXIT.SUCCESS;
12408
12409
  });
12409
12410
  }
12411
+ async function runMeActivity(flags) {
12412
+ return withRestKey({
12413
+ meshSlug: flags.mesh ?? null,
12414
+ purpose: "workspace-activity",
12415
+ capabilities: ["read"]
12416
+ }, async ({ secret }) => {
12417
+ const params = new URLSearchParams;
12418
+ if (flags.since)
12419
+ params.set("since", flags.since);
12420
+ const path = "/api/v1/me/activity" + (params.toString() ? `?${params.toString()}` : "");
12421
+ const ws = await request({
12422
+ path,
12423
+ token: secret
12424
+ });
12425
+ if (flags.json) {
12426
+ console.log(JSON.stringify(ws, null, 2));
12427
+ return EXIT.SUCCESS;
12428
+ }
12429
+ render.section(`${clay("activity")} — ${ws.totals.events} ${dim(flags.since ? `since ${flags.since}` : "in the last 24h")}`);
12430
+ if (ws.activity.length === 0) {
12431
+ process.stdout.write(dim(` quiet — no activity in window
12432
+ `));
12433
+ return EXIT.SUCCESS;
12434
+ }
12435
+ const slugWidth = Math.max(...ws.activity.map((a) => a.meshSlug.length), 6);
12436
+ for (const a of ws.activity) {
12437
+ const slug = dim(a.meshSlug.padEnd(slugWidth));
12438
+ const topic = cyan(`#${a.topicName}`);
12439
+ const sender = a.senderName ?? "?";
12440
+ const ago = formatRelativeTime(a.createdAt);
12441
+ const snippet = a.snippet ?? (a.ciphertext ? dim("[encrypted]") : dim("[empty]"));
12442
+ process.stdout.write(` ${slug} ${topic} ${dim(sender + " ·")} ${dim(ago)}
12443
+ ` + ` ${snippet.length > 200 ? snippet.slice(0, 200) + "…" : snippet}
12444
+ `);
12445
+ }
12446
+ return EXIT.SUCCESS;
12447
+ });
12448
+ }
12410
12449
  function formatRelativeTime(iso) {
12411
12450
  const then = new Date(iso).getTime();
12412
12451
  const now = Date.now();
@@ -14073,6 +14112,7 @@ Topic (conversation scope, v0.2.0)
14073
14112
  claudemesh me cross-mesh workspace overview (v0.4.0)
14074
14113
  claudemesh me topics cross-mesh topic list [--unread]
14075
14114
  claudemesh me notifications cross-mesh @-mentions [--all] [--since=ISO]
14115
+ claudemesh me activity cross-mesh recent messages [--since=ISO]
14076
14116
  claudemesh member list mesh roster with online state [--online]
14077
14117
  claudemesh notification list recent @-mentions of you [--since <ISO>]
14078
14118
 
@@ -14949,13 +14989,21 @@ async function main() {
14949
14989
  all: !!flags.all,
14950
14990
  since: flags.since
14951
14991
  }));
14992
+ } else if (sub === "activity") {
14993
+ const { runMeActivity: runMeActivity2 } = await Promise.resolve().then(() => (init_me(), exports_me));
14994
+ process.exit(await runMeActivity2({
14995
+ ...f,
14996
+ since: flags.since
14997
+ }));
14952
14998
  } else {
14953
14999
  console.error(`Usage: claudemesh me (cross-mesh overview)
14954
15000
  claudemesh me topics (cross-mesh topic list)
14955
15001
  claudemesh me topics --unread (only unread topics)
14956
15002
  claudemesh me notifications (unread @-mentions, last 7d)
14957
15003
  claudemesh me notifications --all (include already-read)
14958
- claudemesh me notifications --since=ISO (custom window)`);
15004
+ claudemesh me notifications --since=ISO (custom window)
15005
+ claudemesh me activity (recent messages, last 24h)
15006
+ claudemesh me activity --since=ISO (custom window)`);
14959
15007
  process.exit(EXIT.INVALID_ARGS);
14960
15008
  }
14961
15009
  break;
@@ -15025,4 +15073,4 @@ main().catch((err) => {
15025
15073
  process.exit(EXIT.INTERNAL_ERROR);
15026
15074
  });
15027
15075
 
15028
- //# debugId=2102749345F189DF64756E2164756E21
15076
+ //# debugId=E4399AFE3999F90D64756E2164756E21