@subshell-ai/plugin-oh-my-pi 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.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../plugin-api/dist/types-CW2dMAMW.d.ts
1
+ //#region ../../plugin-api/dist/types-DPriUYLa.d.ts
2
2
  /** How the plugin learns about children: harness lifecycle hooks, or a loaded extension. */
3
3
  type HarnessSubagentDiscovery = "hooks" | "extension";
4
4
  /** Whether the sidebar can move the parent's own view to a child, or the harness keeps that in-app. */
@@ -397,6 +397,19 @@ interface SubshellPlugin {
397
397
  * used as-is, which is right for every harness that prints just a version.
398
398
  */
399
399
  parseVersion?(raw: string): string | null;
400
+ /**
401
+ * Turns the harness's own terminal title into the subshell name the rail
402
+ * shows.
403
+ *
404
+ * The host removes escape sequences and control bytes and trims the result
405
+ * before calling this, so `raw` is safe text. Interpret what the title adds
406
+ * around the session name — a brand, a run-state separator, a cycling
407
+ * status glyph — and return the name behind it. Return "" when the title
408
+ * names nothing, and the caller keeps the name the pane already had. Omit
409
+ * the member when the harness titles its pane with the name the host
410
+ * supplied, which needs no interpretation.
411
+ */
412
+ parsePaneTitle?(raw: string): string;
400
413
  /** Overrides manifest-driven detection. Almost no plugin needs this. */
401
414
  detect?(): Promise<DetectionResult>;
402
415
  /** Restart-resume support. Declare the `resume` capability with it. */
package/dist/index.js CHANGED
@@ -285,7 +285,7 @@ function validateGenericPreset(preset) {
285
285
  const parsed = parseManifest({
286
286
  name: "@subshell-ai/plugin-oh-my-pi",
287
287
  description: "Oh My Pi harness plugin for Subshell",
288
- version: "0.2.0",
288
+ version: "0.2.1",
289
289
  license: "Apache-2.0",
290
290
  type: "module",
291
291
  main: "dist/index.js",
@@ -315,7 +315,7 @@ const parsed = parseManifest({
315
315
  "@internal/tsconfig": "workspace:*",
316
316
  "@subshell-ai/plugin-api": "workspace:*",
317
317
  "@types/bun": "1.3.14",
318
- "hash-runner": "4.0.0",
318
+ "hash-runner": "5.0.0",
319
319
  "tsdown": "0.22.14",
320
320
  "typescript": "7.0.2"
321
321
  },
@@ -375,12 +375,36 @@ const SETTINGS = [
375
375
  }
376
376
  ];
377
377
  /**
378
+ * omp composes its terminal title from a brand, one column of run state, and
379
+ * the session label (title-generator's `buildTerminalTitleWithState`):
380
+ * `π > label` while idle, `π <spinner> label` while working, `π ! label` when
381
+ * blocked, and `π : label` when the working separator is pinned to the static
382
+ * colon (WSL, or a spinner pinned off); with titles disabled the form is
383
+ * `π: label`. The brand and the state separator describe the terminal, not the
384
+ * session, and mirroring the whole string read `π ⠋ 🚌 Fix the thing` in the
385
+ * rail — a stuck-looking spinner in front of every name (operator screenshot,
386
+ * 2026-11-09). The label keeps its emoji: the generator starts the session
387
+ * name with one.
388
+ *
389
+ * The whitespace is required where the generator writes one (brand, space,
390
+ * separator), and the disabled form's colon is followed by a space, so a label
391
+ * that merely starts with the brand — `π-calculus`, `π/2`, `π:notes` — keeps
392
+ * it. A bare brand appears for a moment before the session name lands; it
393
+ * parses to nothing, and the caller keeps the name it already had. The spinner
394
+ * set covers every style omp ships: braille frames (U+2801–U+28FF, which holds
395
+ * the activity and dots sets), the pulse moon, and the plain-ASCII line
396
+ * frames.
397
+ */
398
+ const TITLE_PREFIX = /^π(?:$|\s+(?:[>!:]|[⠁-⣿]|[◔◑◕○●]|[-\\/|])|:(?=\s|$))\s*/u;
399
+ /**
378
400
  * Oh My Pi uses its own executable and native MCP discovery, independently of
379
401
  * pi. An explicit extension directory contributes mcp.json without redirecting
380
402
  * the user's config or credentials. Verified against omp 18.12.6.
381
403
  */
382
404
  const createPlugin = () => ({
383
405
  capabilities: () => ["mcp", "settings"],
406
+ /** `π <state> <label>`: the label behind the brand and run state is the name. */
407
+ parsePaneTitle: (raw) => raw.replace(TITLE_PREFIX, "").trim(),
384
408
  buildCommand({ binary, preset, extraFlags, mcp }) {
385
409
  const args = [binary, ...mcp?.args ?? []];
386
410
  const settings = preset.settings ?? {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@subshell-ai/plugin-oh-my-pi",
3
3
  "description": "Oh My Pi harness plugin for Subshell",
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "@internal/tsconfig": "workspace:*",
36
36
  "@subshell-ai/plugin-api": "workspace:*",
37
37
  "@types/bun": "1.3.14",
38
- "hash-runner": "4.0.0",
38
+ "hash-runner": "5.0.0",
39
39
  "tsdown": "0.22.14",
40
40
  "typescript": "7.0.2"
41
41
  },