@howaboua/pi-agent-board 0.0.7 → 0.0.8

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,9 @@
1
1
  # @howaboua/pi-agent-board
2
2
 
3
+ ## 0.0.8
4
+
5
+ - Board catch-up examples no longer prescribe `await`.
6
+
3
7
  ## 0.0.7
4
8
 
5
9
  - Board settings now open on Enabled with On and Off choices.
@@ -22,25 +22,25 @@ const { refresh, moreThreads, moreReplies } = createUpdates(renderer);
22
22
 
23
23
  $("boards").onchange = () => run(() => loadBoard($("boards").value));
24
24
  $("author").onchange = () =>
25
- run(async () => {
25
+ void run(async () => {
26
26
  state.author = $("author").value;
27
27
  await loadList();
28
28
  });
29
29
  $("search-form").onsubmit = (event) => {
30
30
  event.preventDefault();
31
- run(async () => {
31
+ void run(async () => {
32
32
  state.query = $("search").value.trim();
33
33
  state.searchFull = $("search-full").checked;
34
34
  await loadList();
35
35
  });
36
36
  };
37
37
  $("search-full").onchange = () =>
38
- run(async () => {
38
+ void run(async () => {
39
39
  state.searchFull = $("search-full").checked;
40
40
  await loadList();
41
41
  });
42
42
  $("full-discussion").onchange = () =>
43
- run(() => openThread(state.thread, $("full-discussion").checked));
43
+ void run(() => openThread(state.thread, $("full-discussion").checked));
44
44
  $("refresh").onclick = () => run(() => refresh(true));
45
45
  $("back").onclick = () => {
46
46
  document.body.classList.remove("detail-open");
@@ -81,8 +81,8 @@ async function start() {
81
81
  const requestedThread = fragment.get("thread");
82
82
  if (requestedThread) await openThread(requestedThread);
83
83
  }
84
- run(start);
84
+ void run(start);
85
85
  setInterval(() => {
86
86
  if (!document.hidden && $("live").checked && state.board && !busy && !changed)
87
- run(() => refresh());
87
+ void run(() => refresh());
88
88
  }, 5000);
@@ -32,7 +32,7 @@ export function createBoardRenderer(loadList, openThread) {
32
32
  if (channel.posts !== undefined)
33
33
  button.append(node("small", "", String(channel.posts)));
34
34
  button.onclick = () =>
35
- run(async () => {
35
+ void run(async () => {
36
36
  state.channel = channel.name;
37
37
  await loadList();
38
38
  renderBoard();
@@ -106,7 +106,7 @@ export function createBoardRenderer(loadList, openThread) {
106
106
  if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
107
107
  return;
108
108
  event.preventDefault();
109
- run(() => openThread(thread.id));
109
+ void run(() => openThread(thread.id));
110
110
  };
111
111
  return link;
112
112
  }),
package/package.json CHANGED
@@ -1,70 +1,71 @@
1
1
  {
2
- "name": "@howaboua/pi-agent-board",
3
- "version": "0.0.7",
4
- "description": "Standalone agent message boards and a read-only browser viewer for Pi",
5
- "type": "module",
6
- "license": "MIT",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/IgorWarzocha/howaboua-pi-stuff.git",
10
- "directory": "packages/pi-agent-board"
11
- },
12
- "files": [
13
- "index.ts",
14
- "src",
15
- "README.md",
16
- "CHANGELOG.md",
17
- "LICENSE",
18
- "tsconfig.json",
19
- "runtime.ts",
20
- "dist",
21
- "INTEGRATION.md",
22
- "scripts",
23
- "tsconfig.viewer.json"
24
- ],
25
- "main": "index.ts",
26
- "exports": {
27
- ".": "./index.ts",
28
- "./runtime": "./runtime.ts",
29
- "./integration": "./src/board/integration.ts"
30
- },
31
- "pi": {
32
- "extensions": [
33
- "./index.ts"
34
- ]
35
- },
36
- "engines": {
37
- "node": ">=22.19.0"
38
- },
39
- "scripts": {
40
- "build": "node scripts/build-viewer.mjs",
41
- "check": "bun run lint && bun run typecheck",
42
- "lint": "biome check .",
43
- "typecheck": "tsgo --noEmit",
44
- "prepack": "bun run check && bun run build",
45
- "pack:dry": "npm pack --dry-run"
46
- },
47
- "dependencies": {
48
- "@earendil-works/pi-schema": "1.5.2",
49
- "dompurify": "3.4.17",
50
- "marked": "18.2.0",
51
- "unicode-case-folding": "1.1.2"
52
- },
53
- "peerDependencies": {
54
- "@earendil-works/pi-ai": ">=1.1.0",
55
- "@earendil-works/pi-coding-agent": ">=1.5.0",
56
- "@earendil-works/pi-tui": ">=1.1.0",
57
- "@howaboua/pi-codex-conversion": ">=5.0.0"
58
- },
59
- "peerDependenciesMeta": {
60
- "@howaboua/pi-codex-conversion": {
61
- "optional": true
62
- }
63
- },
64
- "publishConfig": {
65
- "access": "public"
66
- },
67
- "devDependencies": {
68
- "@howaboua/pi-codex-conversion": "5.0.0"
69
- }
2
+ "name": "@howaboua/pi-agent-board",
3
+ "version": "0.0.8",
4
+ "description": "Standalone agent message boards and a read-only browser viewer for Pi",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/IgorWarzocha/howaboua-pi-stuff.git",
10
+ "directory": "packages/pi-agent-board"
11
+ },
12
+ "files": [
13
+ "index.ts",
14
+ "src",
15
+ "README.md",
16
+ "CHANGELOG.md",
17
+ "LICENSE",
18
+ "tsconfig.json",
19
+ "runtime.ts",
20
+ "dist",
21
+ "INTEGRATION.md",
22
+ "scripts",
23
+ "tsconfig.viewer.json"
24
+ ],
25
+ "main": "index.ts",
26
+ "exports": {
27
+ ".": "./index.ts",
28
+ "./runtime": "./runtime.ts",
29
+ "./integration": "./src/board/integration.ts"
30
+ },
31
+ "pi": {
32
+ "extensions": [
33
+ "./index.ts"
34
+ ]
35
+ },
36
+ "engines": {
37
+ "node": ">=22.19.0"
38
+ },
39
+ "scripts": {
40
+ "build": "node scripts/build-viewer.mjs",
41
+ "check": "bun run lint && bun run typecheck",
42
+ "lint": "bun run format:check && oxlint --type-aware",
43
+ "typecheck": "tsrs --noEmit",
44
+ "prepack": "bun run check && bun run build",
45
+ "pack:dry": "npm pack --dry-run",
46
+ "format:check": "oxfmt --check '**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,json,jsonc,json5,css}'"
47
+ },
48
+ "dependencies": {
49
+ "@earendil-works/pi-schema": "1.5.2",
50
+ "dompurify": "3.4.17",
51
+ "marked": "18.2.0",
52
+ "unicode-case-folding": "1.1.2"
53
+ },
54
+ "peerDependencies": {
55
+ "@earendil-works/pi-ai": ">=1.1.0",
56
+ "@earendil-works/pi-coding-agent": ">=1.5.0",
57
+ "@earendil-works/pi-tui": ">=1.1.0",
58
+ "@howaboua/pi-codex-conversion": ">=5.0.1"
59
+ },
60
+ "peerDependenciesMeta": {
61
+ "@howaboua/pi-codex-conversion": {
62
+ "optional": true
63
+ }
64
+ },
65
+ "publishConfig": {
66
+ "access": "public"
67
+ },
68
+ "devDependencies": {
69
+ "@howaboua/pi-codex-conversion": "5.0.1"
70
+ }
70
71
  }
@@ -102,6 +102,7 @@ function boardRow(entry: SessionEntry): BoardRow | undefined {
102
102
  label: [label, channel]
103
103
  .filter(Boolean)
104
104
  .join(" · ")
105
+ // oxlint-disable-next-line no-control-regex -- Intentionally matches terminal controls or rejects control characters at the boundary.
105
106
  .replace(/[\r\n\t\x00-\x1f\x7f]/g, " "),
106
107
  detail: () => JSON.stringify(entry.data, null, 2) ?? "",
107
108
  };
@@ -10,12 +10,14 @@ type Delivery =
10
10
  let optionalDelivery: Promise<Delivery | undefined> | undefined;
11
11
 
12
12
  function loadDelivery() {
13
- return (optionalDelivery ??= import(
14
- "@howaboua/pi-codex-conversion/developer-messages"
15
- ).catch((error) => {
16
- if (isMissingOptionalModule(error, "developer-messages")) return undefined;
17
- throw error;
18
- }));
13
+ return (optionalDelivery ??=
14
+ import("@howaboua/pi-codex-conversion/developer-messages").catch(
15
+ (error) => {
16
+ if (isMissingOptionalModule(error, "developer-messages"))
17
+ return undefined;
18
+ throw error;
19
+ },
20
+ ));
19
21
  }
20
22
 
21
23
  export function isMissingOptionalModule(error: unknown, subpath: string) {
@@ -8,9 +8,8 @@ export async function activateBoard(pi: ExtensionAPI, runtime: BoardRuntime) {
8
8
  const tool = createBoardTool(runtime);
9
9
  pi.registerTool(tool);
10
10
  try {
11
- const { registerGptPromptMode, prepareGptPromptMode } = await import(
12
- "@howaboua/pi-codex-conversion/prompt-mode"
13
- );
11
+ const { registerGptPromptMode, prepareGptPromptMode } =
12
+ await import("@howaboua/pi-codex-conversion/prompt-mode");
14
13
  runtime.setPromptModePreparation((ctx) => prepareGptPromptMode(pi, ctx));
15
14
  registerGptPromptMode(pi, (active) => {
16
15
  runtime.gptPromptMode = active;
@@ -78,7 +78,7 @@ export class BoardCatchup {
78
78
  action: "read_thread",
79
79
  thread_id,
80
80
  });
81
- return nested ? `await tools.board(${args})` : `board ${args}`;
81
+ return nested ? `tools.board(${args})` : `board ${args}`;
82
82
  })
83
83
  .join("; ")}`
84
84
  : "",
@@ -22,25 +22,25 @@ const { refresh, moreThreads, moreReplies } = createUpdates(renderer);
22
22
 
23
23
  $("boards").onchange = () => run(() => loadBoard($("boards").value));
24
24
  $("author").onchange = () =>
25
- run(async () => {
25
+ void run(async () => {
26
26
  state.author = $("author").value;
27
27
  await loadList();
28
28
  });
29
29
  $("search-form").onsubmit = (event) => {
30
30
  event.preventDefault();
31
- run(async () => {
31
+ void run(async () => {
32
32
  state.query = $("search").value.trim();
33
33
  state.searchFull = $("search-full").checked;
34
34
  await loadList();
35
35
  });
36
36
  };
37
37
  $("search-full").onchange = () =>
38
- run(async () => {
38
+ void run(async () => {
39
39
  state.searchFull = $("search-full").checked;
40
40
  await loadList();
41
41
  });
42
42
  $("full-discussion").onchange = () =>
43
- run(() => openThread(state.thread, $("full-discussion").checked));
43
+ void run(() => openThread(state.thread, $("full-discussion").checked));
44
44
  $("refresh").onclick = () => run(() => refresh(true));
45
45
  $("back").onclick = () => {
46
46
  document.body.classList.remove("detail-open");
@@ -81,8 +81,8 @@ async function start() {
81
81
  const requestedThread = fragment.get("thread");
82
82
  if (requestedThread) await openThread(requestedThread);
83
83
  }
84
- run(start);
84
+ void run(start);
85
85
  setInterval(() => {
86
86
  if (!document.hidden && $("live").checked && state.board && !busy && !changed)
87
- run(() => refresh());
87
+ void run(() => refresh());
88
88
  }, 5000);
@@ -32,7 +32,7 @@ export function createBoardRenderer(loadList, openThread) {
32
32
  if (channel.posts !== undefined)
33
33
  button.append(node("small", "", String(channel.posts)));
34
34
  button.onclick = () =>
35
- run(async () => {
35
+ void run(async () => {
36
36
  state.channel = channel.name;
37
37
  await loadList();
38
38
  renderBoard();
@@ -106,7 +106,7 @@ export function createBoardRenderer(loadList, openThread) {
106
106
  if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
107
107
  return;
108
108
  event.preventDefault();
109
- run(() => openThread(thread.id));
109
+ void run(() => openThread(thread.id));
110
110
  };
111
111
  return link;
112
112
  }),