@tian.zuo/pi-rex 0.2.0 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @tian.zuo/pi-rex
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#207](https://github.com/TianZuo555/pi-extensions/pull/207) [`9b6cf44`](https://github.com/TianZuo555/pi-extensions/commit/9b6cf44c29505b8c4fad9d874a6120514efd2d1c) Thanks [@TianZuo555](https://github.com/TianZuo555)! - Name the Rex session after the project folder instead of a task label. A linked git worktree uses `Wrktree—<main repository folder>—<branch>`. The tab keeps the model-generated task label, and the session is renamed even when the model call fails.
8
+
9
+ - [#206](https://github.com/TianZuo555/pi-extensions/pull/206) [`d128174`](https://github.com/TianZuo555/pi-extensions/commit/d128174b5f0938e1997e529af7f505b882e33bd8) Thanks [@TianZuo555](https://github.com/TianZuo555)! - Resume pi in its Rex pane after a Rex restart. In TUI mode, the extension records the pi session of each Rex pane in `~/.pi/agent/rex-resume/<block id>`. The record stays when pi stops because of SIGHUP, SIGTERM, or a lost terminal, and for `/reload`, `/resume`, and `/fork`. It is removed when you quit pi and when `/new` replaces the session. A shell hook, shown in the README for fish, reads the record when Rex starts a new shell in the restored pane and runs `pi --session <file>`.
10
+
3
11
  ## 0.2.0
4
12
 
5
13
  ### Minor Changes
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Release notes: [changelog](https://github.com/TianZuo555/pi-extensions/blob/main/packages/pi-rex/CHANGELOG.md) · [GitHub releases](https://github.com/TianZuo555/pi-extensions/releases)
4
4
 
5
- The [Rex](https://www.superlogical.com/rex/docs/automate/agent-skill) session-start hook for the [pi coding agent](https://pi.dev). The extension also names the Rex session and tab from the first prompt.
5
+ The [Rex](https://www.superlogical.com/rex/docs/automate/agent-skill) session-start hook for the [pi coding agent](https://pi.dev). The extension also names the Rex session after the project folder or worktree, names the tab from the first prompt, and records each pane's pi session so pi can resume after a Rex restart.
6
6
 
7
7
  ```bash
8
8
  pi install npm:@tian.zuo/pi-rex
@@ -24,36 +24,77 @@ Run `rex skill setup` to install the skill. This extension does not install the
24
24
 
25
25
  ## Naming
26
26
 
27
- Rex gives each session and each tab a generated name. The extension replaces these names with task names. The agent does not run a rename command.
27
+ Rex gives each session and each tab a generated name. The extension names the session after the project folder, and gives each tab a task name from the first prompt. The agent does not run a rename command.
28
28
 
29
- On the first user prompt of a pi session, the extension runs `rex whoami --json` as a cheap check that the Rex server answers. If it does, the extension makes one model call on the current session model. The call asks for a label: 2 to 4 lowercase English words, joined by hyphens. The call runs in the background, so the first response is not delayed. After the model replies, the extension reads the current labels and runs:
29
+ The session name is the current folder name, as-is. In a linked git worktree, the name is `Wrktree—<main repository folder>—<branch>`, such as `Wrktree—pi-tian-extensions—docs/pi-layerfs-spec`. A detached worktree uses the first seven characters of the commit. The extension finds the worktree with `git worktree list --porcelain`. If git fails or the folder is not a git repository, the folder name is used.
30
+
31
+ On the first user prompt of a pi session, the extension runs `rex whoami --json` as a cheap check that the Rex server answers. If it does, the extension reads the folder and worktree, then makes one model call on the current session model. The call asks for a tab label: 2 to 4 lowercase English words, joined by hyphens. The call runs in the background, so the first response is not delayed. After the model replies, the extension reads the current labels and runs:
30
32
 
31
33
  ```bash
32
34
  rex session inspect "$REX_SESSION" --json
33
- rex session rename "$REX_SESSION" LABEL # first tab only
34
- rex window rename -s "$REX_SESSION" WINDOW_ID LABEL
35
+ rex session rename "$REX_SESSION" SESSION_LABEL # first tab only
36
+ rex window rename -s "$REX_SESSION" WINDOW_ID TAB_LABEL
35
37
  ```
36
38
 
39
+ The session name does not depend on the model. If the model call fails or returns no label, the session is still renamed; only the tab keeps its old name.
40
+
37
41
  The labels are read after the model call. A rename made while the call runs wins.
38
42
 
39
43
  Rex orders tabs by ID, which comes from the creation time. The first tab carries the session label. A later tab gets its own label and never renames the parent session.
40
44
 
41
45
  The extension replaces a label only when the label is still generated:
42
46
 
43
- - A session label is generated when it is two lowercase words, such as `shy-strait`.
47
+ - A session label is generated when it is two lowercase words, such as `shy-strait`, or a worktree label from this extension that starts with `Wrktree—`.
44
48
  - A tab label is generated when it is `Window <id>`, such as `Window 629d2113`.
45
49
 
46
- A hand-set label is kept. Naming runs once per pi session. If the model call or a Rex command fails, the old name stays and the agent continues.
50
+ A hand-set label is kept. A one-word folder label, such as `repo`, is not recognized as generated, so a later pi session in the same tab keeps it. Naming runs once per pi session. If a Rex command fails, the old name stays and the agent continues.
47
51
 
48
52
  Because the extension names the session, it removes the Rex naming paragraph from the `<rex>` section. It adds one line instead: the names are automatic, and the agent must not rename them unless the user asks. This also overrides the `rex` skill rule that says to rename only when the user asks.
49
53
 
54
+ ## Resume after a Rex restart
55
+
56
+ Rex restores sessions, tabs, panes, and scrollback after a restart. Each pane keeps its block ID, but Rex starts a new shell in the pane, not pi. The extension records the pi session of each pane, so a shell hook can start pi again.
57
+
58
+ When `REX_BLOCK` is set in TUI mode, the extension writes `~/.pi/agent/rex-resume/<block id>` (below `PI_CODING_AGENT_DIR` when it is set). It writes the record when a session starts and after each prompt, because pi creates the session file only after the first message. The record holds the working directory on line 1, then the command, one argument per line:
59
+
60
+ ```text
61
+ /Users/you/src/app
62
+ pi
63
+ --session
64
+ /Users/you/.pi/agent/sessions/--Users-you-src-app--/2026-11-05T05-52-27-656Z_01a1....jsonl
65
+ ```
66
+
67
+ The record stays when pi stops because of SIGHUP or SIGTERM, or because the terminal is gone. A Rex restart does one of these. The record stays for `/reload`, `/resume`, and `/fork`, and the next session writes its own record. `/new` removes the record until the new session has a file, so a restart right after `/new` does not reopen the previous session. The record is removed when you quit pi (Ctrl+D, Ctrl+C twice, `/quit`). Print, JSON, and RPC runs write no record.
68
+
69
+ The extension cannot start a program in a Rex pane, so the shell must read the record. Add this hook to `~/.config/fish/config.fish` (or a file in `conf.d/`):
70
+
71
+ ```fish
72
+ if status is-interactive; and set -q REX_BLOCK
73
+ function __rex_resume --on-event fish_prompt
74
+ functions -e __rex_resume
75
+ set -l agent_dir $HOME/.pi/agent
76
+ # Expand ~ as pi does: fish does not expand it inside a variable.
77
+ set -q PI_CODING_AGENT_DIR; and set agent_dir (string replace -r -- '^~(?=/|$)' $HOME $PI_CODING_AGENT_DIR)
78
+ set -l file $agent_dir/rex-resume/(string replace -- 'block:' '' $REX_BLOCK)
79
+ test -f $file; or return
80
+ set -l record (cat $file)
81
+ test -n "$record[1]"; or return
82
+ cd -- $record[1]; or return
83
+ rm -f $file
84
+ $record[2..]
85
+ end
86
+ end
87
+ ```
88
+
89
+ The hook runs once, before the first prompt, after the rest of the config is loaded. A new pane has a new block ID, so it has no record. Only a pane that Rex restored while pi ran in it has one. The hook removes the record before it starts pi, and pi writes a new one. The hook always runs `pi --session <file>`: it does not restore the flags of the first launch, so a pane that ran `pi -e ./packages/pi-rex` resumes with plain `pi`.
90
+
50
91
  ## Settings
51
92
 
52
93
  The extension reads the `rex` section of the pi settings file. Add the section to `~/.pi/agent/settings.json`.
53
94
 
54
- | Key | Type | Default | Description |
55
- | -------------- | ------- | ------- | -------------------------------------------------------------------------------------------------------- |
56
- | `rex.autoName` | boolean | `true` | Name the Rex tab and session from the first prompt. `false` keeps the Rex names and the Rex naming text. |
95
+ | Key | Type | Default | Description |
96
+ | -------------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
97
+ | `rex.autoName` | boolean | `true` | Name the Rex session after the folder or worktree, and the tab from the first prompt. `false` keeps the Rex names and the Rex naming text. |
57
98
 
58
99
  Example:
59
100
 
@@ -70,9 +111,15 @@ Any value other than `false` keeps automatic naming on.
70
111
  ## Known limits
71
112
 
72
113
  - The extension decides "generated" from the shape of the label. A hand-set two-word session label, such as `fix-login`, is replaced.
73
- - The model reply must be one label. A prose reply leaves the old name in place.
114
+ - A one-word folder label is not recognized as generated. If you start a new pi session in another folder in the same Rex tab, the session keeps the old folder name.
115
+ - The model reply must be one tab label. A prose reply leaves the old tab name in place; the session is still renamed.
74
116
  - The naming call uses the current session model. A reasoning model can spend part of the token budget before it writes the label.
75
117
  - The `<rex>` removal reads one string from the Rex output: the paragraph that holds `rex session rename`. A change to that wording stops the removal.
118
+ - Resume needs the shell hook. Without it, the records do nothing.
119
+ - The hook starts `pi --session <file>`, so it does not restore the flags of the first launch. A pane that ran `pi -e ./packages/pi-rex` resumes without the local extension.
120
+ - A second interactive fish in the same pane, started while pi runs, also reads the record. It can start a second pi on the same session and remove the record; the next prompt in the first pi writes the record again.
121
+ - When you close a pane while pi runs in it, pi gets SIGHUP and its record stays. The file is small, and Rex never reuses a block ID.
122
+ - A pi started by the fish hook runs inside a prompt event, so Ctrl+Z may not suspend it.
76
123
 
77
124
  ## License
78
125
 
package/index.ts CHANGED
@@ -5,15 +5,20 @@
5
5
  // in. Rex has no hook for pi, so this extension runs the same command and adds
6
6
  // its output to the system prompt as a `<rex>` section.
7
7
  //
8
- // The extension also names the Rex tab and session. On the first user prompt of
9
- // a pi session it asks the current model for one short label, then runs
10
- // `rex window rename` and, for the first tab of a session, `rex session
11
- // rename`. Naming runs in the background, so the first response is not delayed.
12
- // Set `rex.autoName` to false to turn it off.
8
+ // The extension also names the Rex session and tab. The session takes its name
9
+ // from the project folder, or from the worktree and branch. On the first user
10
+ // prompt of a pi session it asks the current model for one short tab label,
11
+ // then runs `rex window rename` and, for the first tab of a session,
12
+ // `rex session rename`. Naming runs in the background, so the first response is
13
+ // not delayed. Set `rex.autoName` to false to turn it off.
14
+ //
15
+ // The extension also records the pi session of each Rex pane, so a shell hook
16
+ // can resume pi in that pane after a Rex restart. See `lib/resume.ts`.
13
17
 
14
18
  import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
15
19
  import { nameSession, REX_TIMEOUT_MS, type ExecResult } from "./lib/naming.ts";
16
20
  import { AUTO_NAME_INSTRUCTION, REX_SECTION } from "./lib/prompt.ts";
21
+ import { registerResume } from "./lib/resume.ts";
17
22
  import { stripSessionNaming } from "./lib/rex-output.ts";
18
23
 
19
24
  /** Timeout for the naming model call. */
@@ -65,6 +70,8 @@ export default function rexExtension(pi: ExtensionAPI): void {
65
70
  let autoName = true;
66
71
  let naming: Promise<void> | undefined;
67
72
 
73
+ registerResume(pi);
74
+
68
75
  pi.on("session_start", async (_event, ctx) => {
69
76
  context = "";
70
77
  autoName = true;
package/lib/naming.ts CHANGED
@@ -1,11 +1,13 @@
1
- // Orchestrates automatic Rex naming. The extension asks the session model for
2
- // one label, then renames the tab and, for the first tab, the session.
1
+ // Orchestrates automatic Rex naming. The extension names the session after the
2
+ // project folder, or after the worktree and its branch, and asks the session
3
+ // model for one tab label.
3
4
  //
4
5
  // Every Rex call is best-effort: a failing command or model call leaves the
5
6
  // generated name in place and does not block the main agent run.
6
7
 
7
8
  import { namingPrompt } from "./prompt.ts";
8
9
  import { parseInspect, parseWhoami, type RexInspect, type RexWindow } from "./rex-output.ts";
10
+ import { sessionLabel } from "./session-name.ts";
9
11
 
10
12
  /** Upper bound for the task text sent to the naming model. */
11
13
  export const MAX_TASK_LENGTH = 4000;
@@ -16,6 +18,9 @@ export const REX_TIMEOUT_MS = 5000;
16
18
  /** Default Rex session labels are two lowercase words, such as `shy-strait`. */
17
19
  const SESSION_LABEL = /^[a-z]+-[a-z]+$/;
18
20
 
21
+ /** Worktree labels this extension writes, so a branch change can replace them. */
22
+ const WORKTREE_LABEL = /^Wrktree—/;
23
+
19
24
  /** Default Rex tab labels are `Window <id suffix>`. */
20
25
  const WINDOW_LABEL = /^Window [0-9a-f]{4,}$/;
21
26
 
@@ -43,7 +48,7 @@ export interface NameSessionInput {
43
48
 
44
49
  /** A generated session label may be replaced. A hand-set label may not. */
45
50
  export function isGeneratedSessionLabel(label: string): boolean {
46
- return SESSION_LABEL.test(label);
51
+ return SESSION_LABEL.test(label) || WORKTREE_LABEL.test(label);
47
52
  }
48
53
 
49
54
  /** A generated tab label may be replaced. A hand-set label may not. */
@@ -84,13 +89,16 @@ export async function nameSession(input: NameSessionInput): Promise<void> {
84
89
  const whoami = parseWhoami((await rex(["whoami", "--json"])).stdout);
85
90
  if (!whoami) return;
86
91
 
87
- let label: string | undefined;
92
+ // The session label comes from the folder and the worktree, not the model.
93
+ // A model failure then still renames the session.
94
+ const nextSessionLabel = await sessionLabel(exec, cwd, REX_TIMEOUT_MS);
95
+
96
+ let tabLabel: string | undefined;
88
97
  try {
89
- label = parseLabel(await input.ask(namingPrompt(task)));
98
+ tabLabel = parseLabel(await input.ask(namingPrompt(task)));
90
99
  } catch {
91
- return;
100
+ tabLabel = undefined;
92
101
  }
93
- if (!label) return;
94
102
 
95
103
  // Read the labels after the model call. A user or the main agent can rename
96
104
  // while it runs, and those labels must win.
@@ -99,11 +107,15 @@ export async function nameSession(input: NameSessionInput): Promise<void> {
99
107
  const current = findWindow(state, whoami);
100
108
  if (!current) return;
101
109
 
102
- if (isGeneratedSessionLabel(state.label) && isFirstWindow(state, whoami)) {
103
- await rex(["session", "rename", session, label]);
110
+ if (
111
+ state.label !== nextSessionLabel &&
112
+ isGeneratedSessionLabel(state.label) &&
113
+ isFirstWindow(state, whoami)
114
+ ) {
115
+ await rex(["session", "rename", session, nextSessionLabel]);
104
116
  }
105
- if (current.label === undefined || isGeneratedWindowLabel(current.label)) {
106
- await rex(["window", "rename", "-s", session, whoami, label]);
117
+ if (tabLabel && (current.label === undefined || isGeneratedWindowLabel(current.label))) {
118
+ await rex(["window", "rename", "-s", session, whoami, tabLabel]);
107
119
  }
108
120
  }
109
121
 
package/lib/resume.ts ADDED
@@ -0,0 +1,90 @@
1
+ // Resume pi in its Rex pane after a Rex restart.
2
+ //
3
+ // Rex restores sessions, tabs, panes, and scrollback after a restart. Each
4
+ // pane keeps its block ID, but Rex starts a new shell in it, not the program
5
+ // that ran there. This module records the pi session of the pane in
6
+ // `<agent dir>/rex-resume/<block id>`. A shell hook (see the README) reads the
7
+ // record when a new shell starts in the pane and runs the command.
8
+ //
9
+ // The record is the working directory on line 1, then the command, one
10
+ // argument per line. It stays when pi stops because of SIGHUP or SIGTERM, or
11
+ // because the terminal is gone, which is what a Rex restart does. It is removed
12
+ // when the user quits pi, and when `/new` replaces the session.
13
+
14
+ import { existsSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
15
+ import path from "node:path";
16
+ import {
17
+ getAgentDir,
18
+ type ExtensionAPI,
19
+ type ExtensionContext,
20
+ } from "@earendil-works/pi-coding-agent";
21
+
22
+ /** Folder below the pi agent directory that holds one record per Rex pane. */
23
+ export const RESUME_DIR = "rex-resume";
24
+
25
+ const SIGNALS = ["SIGHUP", "SIGTERM"] as const;
26
+ /** A block ID becomes a file name, so accept a plain ID and not a path. */
27
+ const BLOCK_ID = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
28
+
29
+ /** Record file for a Rex block, such as `block:01a1...`. Undefined for a malformed ID. */
30
+ export function recordPath(agentDir: string, block: string): string | undefined {
31
+ const id = block.replace(/^block:/, "");
32
+ if (!BLOCK_ID.test(id)) return undefined;
33
+ return path.join(agentDir, RESUME_DIR, id);
34
+ }
35
+
36
+ /** Record text: the working directory, then the resume command, one argument per line. */
37
+ export function recordText(cwd: string, sessionFile: string): string {
38
+ return `${[cwd, "pi", "--session", sessionFile].join("\n")}\n`;
39
+ }
40
+
41
+ export function registerResume(pi: ExtensionAPI, agentDir: string = getAgentDir()): void {
42
+ let record: string | undefined;
43
+ let signaled = false;
44
+ const onSignal = (): void => {
45
+ signaled = true;
46
+ };
47
+
48
+ // Pi writes the session file only after the first message, so save again
49
+ // after each prompt. Until then, remove the record: after `/new` it still
50
+ // names the previous session, which the hook must not reopen.
51
+ const save = (ctx: ExtensionContext): void => {
52
+ if (!record) return;
53
+ const session = ctx.sessionManager.getSessionFile();
54
+ // The hook runs the last lines as one command. A line break in a path
55
+ // would move the arguments, so write no record for such a path.
56
+ if (!session || !existsSync(session) || /[\r\n]/.test(ctx.cwd) || /[\r\n]/.test(session)) {
57
+ rmSync(record, { force: true });
58
+ return;
59
+ }
60
+ mkdirSync(path.dirname(record), { recursive: true });
61
+ // Write and rename, so a stop during the write cannot leave half a record.
62
+ const temp = `${record}.tmp`;
63
+ writeFileSync(temp, recordText(ctx.cwd, session));
64
+ renameSync(temp, record);
65
+ };
66
+
67
+ pi.on("session_start", (_event, ctx) => {
68
+ const block = process.env.REX_BLOCK;
69
+ // Print, JSON, and RPC runs inherit REX_BLOCK from the agent's shell, but
70
+ // they are not the agent of the pane. `hasUI` is also true in RPC mode.
71
+ record = block && ctx.mode === "tui" ? recordPath(agentDir, block) : undefined;
72
+ if (!record) return;
73
+ signaled = false;
74
+ for (const signal of SIGNALS) process.on(signal, onSignal);
75
+ save(ctx);
76
+ });
77
+
78
+ pi.on("agent_end", (_event, ctx) => save(ctx));
79
+
80
+ pi.on("session_shutdown", async (event) => {
81
+ if (!record) return;
82
+ // Pi's own signal handler runs first and starts the shutdown. Wait one tick
83
+ // so onSignal, a later listener for the same signal, can set the flag.
84
+ await new Promise((resolve) => setImmediate(resolve));
85
+ for (const signal of SIGNALS) process.off(signal, onSignal);
86
+ // `/new` replaces the session, so the record must not reopen the old one.
87
+ if (event.reason === "new" || (event.reason === "quit" && !signaled))
88
+ rmSync(record, { force: true });
89
+ });
90
+ }
@@ -0,0 +1,63 @@
1
+ // Session labels from the project folder, or from the worktree and its branch.
2
+ //
3
+ // Rex labels a new session with two lowercase words. The extension replaces
4
+ // that name with the folder name, so the session matches the project. A linked
5
+ // worktree adds the main repository folder and the branch, because the folder
6
+ // alone does not tell two worktrees apart: `Wrktree—<repo>—<branch>`.
7
+
8
+ import path from "node:path";
9
+
10
+ export type GitExec = (
11
+ command: string,
12
+ args: string[],
13
+ options: { cwd: string; timeout: number },
14
+ ) => Promise<{ code: number; stdout: string }>;
15
+
16
+ export interface WorktreeEntry {
17
+ readonly path: string;
18
+ readonly head: string;
19
+ readonly branch?: string;
20
+ }
21
+
22
+ /** Parse `git worktree list --porcelain` into one entry per worktree. */
23
+ export function parseWorktrees(porcelain: string): WorktreeEntry[] {
24
+ const entries: WorktreeEntry[] = [];
25
+ let current: { path: string; head: string; branch?: string } | undefined;
26
+ for (const line of porcelain.split(/\r?\n/)) {
27
+ if (line.startsWith("worktree ")) {
28
+ current = { path: line.slice("worktree ".length), head: "" };
29
+ entries.push(current);
30
+ } else if (current && line.startsWith("HEAD ")) {
31
+ current.head = line.slice("HEAD ".length);
32
+ } else if (current && line.startsWith("branch ")) {
33
+ current.branch = line.slice("branch ".length);
34
+ }
35
+ }
36
+ return entries;
37
+ }
38
+
39
+ /** Session label: the folder name, or the worktree label inside a linked worktree. */
40
+ export async function sessionLabel(exec: GitExec, cwd: string, timeout: number): Promise<string> {
41
+ const folder = path.basename(cwd) || cwd;
42
+ let entries: WorktreeEntry[];
43
+ try {
44
+ const result = await exec("git", ["worktree", "list", "--porcelain"], { cwd, timeout });
45
+ if (result.code !== 0) return folder;
46
+ entries = parseWorktrees(result.stdout);
47
+ } catch {
48
+ return folder;
49
+ }
50
+ const main = entries[0];
51
+ const current = entries.find((entry) => contains(entry.path, cwd));
52
+ // A main checkout keeps the folder name. A linked worktree adds the branch.
53
+ if (!main || !current || current === main) return folder;
54
+ const branch = current.branch?.replace(/^refs\/heads\//, "") || current.head.slice(0, 7);
55
+ if (!branch) return folder;
56
+ return `Wrktree—${path.basename(main.path) || main.path}—${branch}`;
57
+ }
58
+
59
+ /** True when `cwd` is `root` or inside it. */
60
+ function contains(root: string, cwd: string): boolean {
61
+ const relative = path.relative(root, cwd);
62
+ return relative === "" || (!relative.startsWith("..") && !path.isAbsolute(relative));
63
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tian.zuo/pi-rex",
3
- "version": "0.2.0",
4
- "description": "Tells the pi coding agent that it runs in a Rex terminal, and names the Rex session and tab from the first prompt.",
3
+ "version": "0.3.0",
4
+ "description": "Tells the pi coding agent that it runs in a Rex terminal, names the Rex session after the project folder or worktree, names the tab from the first prompt, and resumes pi after a Rex restart.",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "pi",