@webinson/peer 0.4.16 → 0.4.17

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,12 @@
1
+ {
2
+ "name": "peer-thread-mark",
3
+ "version": "0.1.0",
4
+ "description": "Share selected Codex threads in Peer and browse their memories.",
5
+ "license": "MIT",
6
+ "hooks": "./hooks/hooks.json",
7
+ "interface": {
8
+ "displayName": "Peer Thread Mark",
9
+ "shortDescription": "Share selected Codex threads in Peer",
10
+ "category": "Productivity"
11
+ }
12
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [{ "hooks": [{ "type": "command", "command": "node \"${PLUGIN_ROOT}/hooks/peer.mjs\"", "timeout": 5 }] }],
4
+ "UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "node \"${PLUGIN_ROOT}/hooks/peer.mjs\"", "timeout": 20 }] }],
5
+ "Stop": [{ "hooks": [{ "type": "command", "command": "node \"${PLUGIN_ROOT}/hooks/peer.mjs\"", "timeout": 5 }] }],
6
+ "Interrupt": [{ "hooks": [{ "type": "command", "command": "node \"${PLUGIN_ROOT}/hooks/peer.mjs\"", "timeout": 3 }] }],
7
+ "SessionEnd": [{ "hooks": [{ "type": "command", "command": "node \"${PLUGIN_ROOT}/hooks/peer.mjs\"", "timeout": 3 }] }]
8
+ }
9
+ }
@@ -0,0 +1,17 @@
1
+ import { spawn } from "node:child_process";
2
+ import { readFileSync } from "node:fs";
3
+ import { homedir } from "node:os";
4
+ import path from "node:path";
5
+
6
+ // Codex installs a copy of this directory, without the npm package beside it.
7
+ const home = process.env.PEER_HOME || path.join(homedir(), ".peer");
8
+ let launch;
9
+ try {
10
+ launch = JSON.parse(readFileSync(path.join(home, "codex-cli.json"), "utf8"));
11
+ } catch {}
12
+ const cli = launch && typeof launch.node === "string" && typeof launch.peer === "string"
13
+ && path.isAbsolute(launch.node) && path.isAbsolute(launch.peer);
14
+ const child = spawn(cli ? launch.node : "peer", [...(cli ? [launch.peer] : []), "hook", "codex"], {
15
+ stdio: ["inherit", "inherit", "ignore"],
16
+ });
17
+ child.on("error", () => {});
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@webinson/peer",
3
- "version": "0.4.16",
4
- "description": "Share chosen Claude Code threads with your team: who has agents running and on what.",
3
+ "version": "0.4.17",
4
+ "description": "Share chosen Claude Code and Codex threads with your team: who has agents running and on what.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "bin": {
8
- "peer": "bin/peer.mjs"
8
+ "peer": "bin/peer.mjs",
9
+ "peer-codex": "mod/codex/client/run.sh"
9
10
  },
10
11
  "files": [
11
12
  "bin",