@clubnet/seedclub 0.2.21 → 0.2.23

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.
@@ -0,0 +1,39 @@
1
+ import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
2
+
3
+ const TOOL_PROGRESS_LABELS: Record<string, string> = {
4
+ seedclub_find_latest_guest_transcript: "Finding the latest guest transcript",
5
+ seedclub_prepare_clip_packet: "Checking clip readiness",
6
+ seedclub_list_meeting_transcripts: "Checking transcript availability",
7
+ seedclub_list_show_recordings: "Checking show recordings",
8
+ seedclub_list_program_media_assets: "Checking media assets",
9
+ seedclub_export_transcripts: "Exporting transcript files",
10
+ };
11
+
12
+ function humanizeToolName(toolName: string): string {
13
+ const cleaned = toolName.replace(/^seedclub_/, "").replace(/_/g, " ").trim();
14
+ if (!cleaned) return "Processing request";
15
+ return cleaned.charAt(0).toUpperCase() + cleaned.slice(1);
16
+ }
17
+
18
+ export default function toolProgressExtension(pi: ExtensionAPI) {
19
+ let activeTools = 0;
20
+
21
+ pi.on("tool_execution_start", (event, ctx) => {
22
+ if (!ctx.hasUI) return;
23
+ activeTools += 1;
24
+ const label = TOOL_PROGRESS_LABELS[event.toolName] ?? humanizeToolName(event.toolName);
25
+ ctx.ui.setWorkingMessage(`${label}...`);
26
+ });
27
+
28
+ pi.on("tool_execution_end", (_event, ctx) => {
29
+ if (!ctx.hasUI) return;
30
+ activeTools = Math.max(0, activeTools - 1);
31
+ if (activeTools === 0) ctx.ui.setWorkingMessage();
32
+ });
33
+
34
+ pi.on("turn_end", (_event, ctx) => {
35
+ if (!ctx.hasUI) return;
36
+ activeTools = 0;
37
+ ctx.ui.setWorkingMessage();
38
+ });
39
+ }
@@ -286,7 +286,12 @@ function hasSeedConnection(): boolean {
286
286
 
287
287
  function getTerminalTitle(): string {
288
288
  const cwd = basename(process.cwd());
289
- return cwd ? `Seed Club - ${cwd}` : "Seed Club";
289
+ return cwd ? `⦿ - ${cwd}` : "⦿";
290
+ }
291
+
292
+ function applyTerminalTitle(ctx: { hasUI: boolean; ui: { setTitle: (title: string) => void } }) {
293
+ if (!ctx.hasUI) return;
294
+ ctx.ui.setTitle(getTerminalTitle());
290
295
  }
291
296
 
292
297
  function renderTitle(theme: ThemeLike): string {
@@ -398,7 +403,7 @@ export default function (pi: ExtensionAPI, options?: { enableFrame?: boolean })
398
403
 
399
404
  pi.on("session_start", async (_event, ctx) => {
400
405
  if (!ctx.hasUI) return;
401
- ctx.ui.setTitle(getTerminalTitle());
406
+ applyTerminalTitle(ctx);
402
407
  uiState.ready = false;
403
408
  const hasAnyAuth = ctx.modelRegistry.getAvailable().length > 0;
404
409
  const hasSelectedModel = !!ctx.model;
@@ -504,6 +509,22 @@ export default function (pi: ExtensionAPI, options?: { enableFrame?: boolean })
504
509
  });
505
510
  });
506
511
 
512
+ pi.on("turn_start", (_event, ctx) => {
513
+ applyTerminalTitle(ctx);
514
+ });
515
+
516
+ pi.on("turn_end", (_event, ctx) => {
517
+ applyTerminalTitle(ctx);
518
+ });
519
+
520
+ pi.on("model_select", (_event, ctx) => {
521
+ applyTerminalTitle(ctx);
522
+ });
523
+
524
+ pi.on("session_switch", (_event, ctx) => {
525
+ applyTerminalTitle(ctx);
526
+ });
527
+
507
528
  pi.on("before_agent_start", async (event) => {
508
529
  const today = uiState.todayOn11am;
509
530
  if (!today?.guests.length) return;
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
3
  "name": "dark",
4
4
  "vars": {
5
- "brand": "#3EBE4D",
5
+ "brand": 2,
6
6
  "surfaceBg": 8,
7
7
  "userMsgBg": 0,
8
8
  "textMuted": 8
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
3
  "name": "light",
4
4
  "vars": {
5
- "brand": "#3EBE4D",
5
+ "brand": 2,
6
6
  "surfaceBg": 15,
7
7
  "userMsgBg": 7,
8
8
  "textMuted": 8
package/bin/cli.js CHANGED
@@ -10,7 +10,7 @@ const SC_DIR = join(homedir(), ".seedclub", "agent");
10
10
  const VERSION_FILE = join(SC_DIR, ".seedclub-version");
11
11
  const SETTINGS_FILE = join(SC_DIR, "settings.json");
12
12
  const PI_MAIN_LAUNCHER = join(__dirname, "pi-main-launcher.js");
13
- process.title = "seedclub";
13
+ process.title = "⦿";
14
14
  const SEEDCLUB_ENV_EXCLUDE = new Set(["SEEDCLUB_PI_MAIN"]);
15
15
 
16
16
  function printPrivateRegistryHint() {
@@ -499,7 +499,7 @@ if (cmd === "update") {
499
499
  const child = spawn(process.execPath, [piEntry, ...spawnArgs], {
500
500
  stdio: "inherit",
501
501
  env: process.env,
502
- argv0: "seedclub",
502
+ argv0: "⦿",
503
503
  });
504
504
 
505
505
  child.on("exit", (code, signal) => {
@@ -2,22 +2,35 @@
2
2
  "use strict";
3
3
 
4
4
  const { pathToFileURL } = require("url");
5
- const { dirname, join } = require("path");
5
+ const { dirname, join, basename } = require("path");
6
6
  const { existsSync } = require("fs");
7
7
 
8
- process.title = "seedclub";
8
+ process.title = "⦿";
9
9
 
10
10
  const OSC_TITLE_RE = /\x1b\](0|2);([^\x07\x1b]*)(\x07|\x1b\\)/g;
11
11
 
12
12
  function rewriteTerminalTitle(data) {
13
13
  return data.replace(OSC_TITLE_RE, (_match, kind, title, terminator) => {
14
- const nextTitle = title
15
- .replace(/^π(?=\s+-|\s*$)/, "Seed Club")
16
- .replace(/^pi(?=\s+-|\s*$)/i, "Seed Club");
17
- return `\x1b]${kind};${nextTitle}${terminator}`;
14
+ const normalized = String(title || "").trim();
15
+ const branded = normalized.match(/^(?:π|pi|Seed Club)(?:\s+-\s*(.*))?$/i);
16
+ if (branded) {
17
+ const location = (branded[1] || "").trim();
18
+ const nextTitle = location ? `⦿ - ${location}` : "⦿";
19
+ return `\x1b]${kind};${nextTitle}${terminator}`;
20
+ }
21
+ return `\x1b]${kind};${normalized}${terminator}`;
18
22
  });
19
23
  }
20
24
 
25
+ function setInitialTerminalTitle() {
26
+ const cwd = basename(process.cwd());
27
+ const title = cwd ? `⦿ - ${cwd}` : "⦿";
28
+ if (process.stdout && typeof process.stdout.write === "function") {
29
+ process.stdout.write(`\x1b]0;${title}\x07`);
30
+ process.stdout.write(`\x1b]2;${title}\x07`);
31
+ }
32
+ }
33
+
21
34
  function patchTerminalTitleWrites() {
22
35
  const originalWrite = process.stdout.write;
23
36
  process.stdout.write = function (chunk, encoding, callback) {
@@ -64,6 +77,7 @@ async function run() {
64
77
  if (!piMainPath) {
65
78
  throw new Error("Missing SEEDCLUB_PI_MAIN");
66
79
  }
80
+ setInitialTerminalTitle();
67
81
  patchTerminalTitleWrites();
68
82
  await patchInteractiveWarnings(piMainPath);
69
83
  const mainUrl = pathToFileURL(piMainPath).href;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubnet/seedclub",
3
- "version": "0.2.21",
3
+ "version": "0.2.23",
4
4
  "description": "A branded command-line agent wrapper around pi, with integrated Seed Club commands, tools, and app actions",
5
5
  "license": "MIT",
6
6
  "repository": {