Skip to content

A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.

refactor(plugins): move the example plugin to plugins/example

RoversXee06b78b2c40
diff --git a/Cargo.toml b/Cargo.toml
index 87c70f5b..9e54c825 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,10 +15,10 @@ members = [
"thinkterm-render",
"thinkterm-mobile",
"thinkterm-plugin-channel",
- "thinkterm-plugin-example",
"thinkterm-plugin-panel",
"thinkterm-plugin-sdk",
"thinkterm-plugin-server",
+ "plugins/example",
"thinkterm-session",
"thinkterm-snippets",
"thinkterm-web",
diff --git a/thinkterm-plugin-example/Cargo.toml b/plugins/example/Cargo.toml
similarity index 88%
rename from thinkterm-plugin-example/Cargo.toml
rename to plugins/example/Cargo.toml
index 92d6b0d3..e55597ed 100644
--- a/thinkterm-plugin-example/Cargo.toml
+++ b/plugins/example/Cargo.toml
@@ -12,5 +12,5 @@ publish = false
anyhow = "1.0"
base64 = { version = "0.22", default-features = false, features = ["std"] }
serde_json = "1.0"
-thinkterm-plugin-sdk = { path = "../thinkterm-plugin-sdk" }
+thinkterm-plugin-sdk = { path = "../../thinkterm-plugin-sdk" }
uuid = { version = "1.13", features = ["v4"] }
diff --git a/thinkterm-plugin-example/plugin.toml b/plugins/example/plugin.toml
similarity index 100%
rename from thinkterm-plugin-example/plugin.toml
rename to plugins/example/plugin.toml
diff --git a/thinkterm-plugin-example/src/main.rs b/plugins/example/src/main.rs
similarity index 100%
rename from thinkterm-plugin-example/src/main.rs
rename to plugins/example/src/main.rs
diff --git a/thinkterm-web/smoke/plugins.sh b/thinkterm-web/smoke/plugins.sh
index e4fbae3a..3c2af38a 100755
--- a/thinkterm-web/smoke/plugins.sh
+++ b/thinkterm-web/smoke/plugins.sh
@@ -34,8 +34,8 @@ DATA="$HOME/Library/Application Support/ThinkTerm"
# read; and a second copy of the example under another directory, which
# claims its id and so is listed as not used.
mkdir -p "$DATA/plugins/text-tools" "$DATA/plugins/broken" "$DATA/plugins/twin"
-cp "$REPO/thinkterm-plugin-example/plugin.toml" "$BIN/thinkterm-plugin-example" "$DATA/plugins/text-tools/"
-cp "$REPO/thinkterm-plugin-example/plugin.toml" "$DATA/plugins/twin/"
+cp "$REPO/plugins/example/plugin.toml" "$BIN/thinkterm-plugin-example" "$DATA/plugins/text-tools/"
+cp "$REPO/plugins/example/plugin.toml" "$DATA/plugins/twin/"
echo 'id = ' > "$DATA/plugins/broken/plugin.toml"
"$BIN/thinkterm-mux-server" --config-file "$T/web.lua" --daemonize
i=0; until curl -s -o /dev/null "http://127.0.0.1:$PORT/"; do i=$((i+1)); [ $i -lt 50 ] || { echo "server did not come up" >&2; exit 1; }; sleep 0.2; done
@@ -44,7 +44,7 @@ PLUGIN_CLI="env HOME=$HOME THINKTERM_NO_PRIVACY_DISCLAIM=1 $BIN/thinkterm plugin
URL=$($CLI web-token mint --label plugins --ttl 1h --url-only 2>/dev/null | head -1)
status=0
HOME=$REAL_HOME TEST_HOME="$HOME" MUX_CLI="$CLI" PLUGIN_CLI="$PLUGIN_CLI" PLUGINS_DATA="$DATA" \
- EXAMPLE_DIR="$REPO/thinkterm-plugin-example" EXAMPLE_BIN="$BIN/thinkterm-plugin-example" \
+ EXAMPLE_DIR="$REPO/plugins/example" EXAMPLE_BIN="$BIN/thinkterm-plugin-example" \
node "$REPO/thinkterm-web/smoke/plugins-test.js" "$URL" "$OUT" || status=$?
for p in $(pgrep -f "$T/" || true); do kill "$p" 2>/dev/null || true; done
sleep 0.5