@trolleroof/tui 0.2.3 → 0.2.5

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,21 @@
1
+ {
2
+ "name": "tui-gamepigeon",
3
+ "version": "0.2.5",
4
+ "description": "Play in a lightweight HTML overlay while Codex works.",
5
+ "author": {
6
+ "name": "Trolleroof"
7
+ },
8
+ "repository": "https://github.com/Trolleroof/tui-gamepigeon",
9
+ "license": "MIT",
10
+ "keywords": ["arcade", "2048", "tetris", "terminal", "game"],
11
+ "skills": "./skills/",
12
+ "interface": {
13
+ "displayName": "GamePigeon Arcade",
14
+ "shortDescription": "Play 2048 or Tetris while Codex works",
15
+ "longDescription": "Open or restore a lightweight 2048 HTML overlay without leaving the active Codex task.",
16
+ "developerName": "Trolleroof",
17
+ "category": "Developer Tools",
18
+ "capabilities": ["Interactive"],
19
+ "defaultPrompt": ["Open the Arcade."]
20
+ }
21
+ }
package/README.md CHANGED
@@ -78,11 +78,13 @@ The preview frames the real overlay UI at the production sizes (**470×650** com
78
78
  For Codex (or another supported harness), the one-command install is:
79
79
 
80
80
  ```bash
81
- npx -y bunx @trolleroof/tui@latest install --codex
81
+ npx -y bun x @trolleroof/tui@latest install --codex
82
82
  ```
83
83
 
84
84
  Replace `--codex` with `--claude`, `--opencode`, `--hermes`, `--openclaw`, or
85
- `--all`. This uses npm to fetch Bun for the command, then writes the harness adapter.
85
+ `--antigravity`, or `--all`. For Antigravity, run it from the project directory;
86
+ it writes that project's `.agents/plugins/tui-gamepigeon` plugin. This uses npm to
87
+ fetch Bun for the command, then writes the harness adapter.
86
88
  Restart the harness when it finishes.
87
89
 
88
90
  Install the plugin from the GitHub marketplace so the normal `claude` command runs
package/dist/index.js CHANGED
@@ -8334,7 +8334,7 @@ function printUsage() {
8334
8334
  console.log("usage: gamepigeon [game]");
8335
8335
  console.log(" gamepigeon auth [signup|login|oauth|status|logout]");
8336
8336
  console.log(" gamepigeon auth oauth <google|github>");
8337
- console.log(" gamepigeon install [--codex|--claude|--opencode|--hermes|--openclaw|--all]");
8337
+ console.log(" gamepigeon install [--codex|--claude|--opencode|--hermes|--openclaw|--antigravity|--all]");
8338
8338
  console.log("");
8339
8339
  console.log("With no argument, opens the arcade overlay menu.");
8340
8340
  console.log(`Available games: ${ids}`);
@@ -8342,6 +8342,7 @@ function printUsage() {
8342
8342
  async function installAdapters(target) {
8343
8343
  const proc = Bun.spawn(["bash", join4(ROOT, "scripts/install-adapters.sh"), target ?? "--all"], {
8344
8344
  cwd: ROOT,
8345
+ env: { ...process.env, GAMEPIGEON_WORKSPACE_DIR: process.cwd() },
8345
8346
  stdin: "ignore",
8346
8347
  stdout: "inherit",
8347
8348
  stderr: "inherit"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trolleroof/tui",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Play familiar single-player games in a lightweight HTML overlay while your agents work.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,6 +9,7 @@
9
9
  "files": [
10
10
  "dist",
11
11
  "scripts",
12
+ ".codex-plugin",
12
13
  "overlay-release.json"
13
14
  ],
14
15
  "packageManager": "bun@1.3.11",
@@ -11,9 +11,9 @@ MARKER="Generated by tui-gamepigeon scripts/install-adapters.sh"
11
11
 
12
12
  usage() {
13
13
  cat <<'EOF'
14
- Usage: scripts/install-adapters.sh [--codex|--claude|--opencode|--hermes|--openclaw|--all]
14
+ Usage: scripts/install-adapters.sh [--codex|--claude|--opencode|--hermes|--openclaw|--antigravity|--all]
15
15
 
16
- Install the Arcade command for Codex, Claude Code, OpenCode, Hermes, OpenClaw, or all of them (the default).
16
+ Install the Arcade command for Codex, Claude Code, OpenCode, Hermes, OpenClaw, Antigravity, or all of them (the default).
17
17
  EOF
18
18
  }
19
19
 
@@ -22,6 +22,7 @@ install_claude=false
22
22
  install_opencode=false
23
23
  install_hermes=false
24
24
  install_openclaw=false
25
+ install_antigravity=false
25
26
 
26
27
  case "${1:---all}" in
27
28
  --all)
@@ -30,6 +31,7 @@ case "${1:---all}" in
30
31
  install_opencode=true
31
32
  install_hermes=true
32
33
  install_openclaw=true
34
+ install_antigravity=true
33
35
  ;;
34
36
  --codex)
35
37
  install_codex=true
@@ -46,6 +48,9 @@ case "${1:---all}" in
46
48
  --openclaw)
47
49
  install_openclaw=true
48
50
  ;;
51
+ --antigravity)
52
+ install_antigravity=true
53
+ ;;
49
54
  -h|--help)
50
55
  usage
51
56
  exit 0
@@ -86,12 +91,18 @@ if [[ "$install_opencode" == true ]]; then
86
91
  files_to_check+=("$opencode_command")
87
92
  fi
88
93
 
89
- for generated_file in "${files_to_check[@]}"; do
90
- if [[ -f "$generated_file" ]] && ! grep -Fq "$MARKER" "$generated_file"; then
91
- echo "Refusing to replace an existing adapter: $generated_file" >&2
92
- exit 1
93
- fi
94
- done
94
+ if (( ${#files_to_check[@]} )); then
95
+ for generated_file in "${files_to_check[@]}"; do
96
+ if [[ -f "$generated_file" ]] && ! grep -Fq "$MARKER" "$generated_file"; then
97
+ echo "Refusing to replace an existing adapter: $generated_file" >&2
98
+ exit 1
99
+ fi
100
+ done
101
+ fi
102
+
103
+ if [[ "$install_antigravity" == true ]]; then
104
+ bash "$ROOT_DIR/scripts/materialize-agents-plugin.sh" "${GAMEPIGEON_WORKSPACE_DIR:-$PWD}"
105
+ fi
95
106
 
96
107
  printf -v launcher_command 'bun %q --enable' "$ROOT_DIR/scripts/overlay.ts"
97
108
 
@@ -10,6 +10,7 @@ CLAUDE_CONFIG_DIR="$TEMP_DIR/claude" \
10
10
  OPENCODE_CONFIG_DIR="$TEMP_DIR/opencode" \
11
11
  HERMES_HOME="$TEMP_DIR/hermes" \
12
12
  OPENCLAW_HOME="$TEMP_DIR/openclaw" \
13
+ GAMEPIGEON_WORKSPACE_DIR="$TEMP_DIR/antigravity" \
13
14
  bash "$ROOT_DIR/scripts/install-adapters.sh"
14
15
 
15
16
  for skill_file in \
@@ -26,6 +27,7 @@ done
26
27
 
27
28
  test -f "$TEMP_DIR/openclaw/hooks/arcade/HOOK.md"
28
29
  test -f "$TEMP_DIR/openclaw/hooks/arcade/handler.js"
30
+ test -f "$TEMP_DIR/antigravity/.agents/plugins/tui-gamepigeon/plugin.json"
29
31
 
30
32
  opencode_command="$TEMP_DIR/opencode/commands/arcade.md"
31
33
  test -f "$opencode_command"
@@ -54,6 +56,14 @@ OPENCLAW_HOME="$TEMP_DIR/cli-openclaw" \
54
56
  bun "$ROOT_DIR/dist/index.js" install --codex
55
57
  test -f "$CLI_CODEX_HOME/skills/arcade/SKILL.md"
56
58
 
59
+ CLI_WORKSPACE="$TEMP_DIR/cli-antigravity"
60
+ mkdir -p "$CLI_WORKSPACE"
61
+ (
62
+ cd "$CLI_WORKSPACE"
63
+ bun "$ROOT_DIR/dist/index.js" install --antigravity
64
+ )
65
+ test -f "$CLI_WORKSPACE/.agents/plugins/tui-gamepigeon/plugin.json"
66
+
57
67
  OPENCODE_ONLY="$TEMP_DIR/opencode-only"
58
68
  CODEX_UNUSED="$TEMP_DIR/codex-unused"
59
69
  CLAUDE_UNUSED_2="$TEMP_DIR/claude-unused-2"
@@ -2,7 +2,8 @@
2
2
  set -euo pipefail
3
3
 
4
4
  ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
- PLUGIN_DIR="$ROOT_DIR/.agents/plugins/tui-gamepigeon"
5
+ WORKSPACE_DIR="${1:-${GAMEPIGEON_WORKSPACE_DIR:-$ROOT_DIR}}"
6
+ PLUGIN_DIR="$WORKSPACE_DIR/.agents/plugins/tui-gamepigeon"
6
7
  MARKER="Generated by tui-gamepigeon scripts/materialize-agents-plugin.sh"
7
8
 
8
9
  printf -v overlay_cmd 'bun %q' "$ROOT_DIR/scripts/overlay.ts"
@@ -13,7 +14,8 @@ rm -f "$PLUGIN_DIR/plugin.json" "$PLUGIN_DIR/hooks.json" "$PLUGIN_DIR/skills"
13
14
  mkdir -p "$PLUGIN_DIR/skills/arcade"
14
15
  install -m 644 "$ROOT_DIR/.codex-plugin/plugin.json" "$PLUGIN_DIR/plugin.json"
15
16
 
16
- cat > "$ROOT_DIR/.agents/plugins/marketplace.json" <<EOF
17
+ mkdir -p "$WORKSPACE_DIR/.agents/plugins"
18
+ cat > "$WORKSPACE_DIR/.agents/plugins/marketplace.json" <<EOF
17
19
  {
18
20
  "name": "tui-gamepigeon-dev",
19
21
  "interface": {
@@ -82,4 +84,4 @@ cat > "$PLUGIN_DIR/hooks.json" <<EOF
82
84
  }
83
85
  EOF
84
86
 
85
- echo "Materialized Codex/Antigravity workspace plugin at $PLUGIN_DIR"
87
+ echo "Materialized Antigravity workspace plugin at $PLUGIN_DIR"