Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(handoff): let an agent hand its thread off to a fresh one #8492

Closedmfattakhov(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/8492/headopened View on GitHub

Showing 35 changed files with 79 additions and 0 deletions (loading 32).

x
0 of 35 viewed, 35 left
5 additions and 0 deletionsapps/server/claude-plugin/.claude-plugin/plugin.jsonAdded
View file
@@ -0,0 +1,5 @@
+{
+ "name": "t3",
+ "description": "Skills T3 Code ships into every session it spawns.",
+ "version": "0.1.0"
+}
22 additions and 0 deletionsapps/server/claude-plugin/bin/t3Added
View file
@@ -0,0 +1,22 @@
+#!/bin/sh
+# t3 CLI shim, shipped with the T3 Code Claude plugin. Sessions have no
+# installed `t3` on PATH, so T3 Code injects this shim's path as $T3_CLI.
+#
+# The server also injects the exact CLI entry ($T3_CLI_ENTRY) and the runtime
+# to read it with ($T3_CLI_RUNTIME): in a packaged desktop app the entry lives
+# inside an asar archive, which only the Electron binary can read, and it does
+# so through ELECTRON_RUN_AS_NODE (a plain `node` ignores that variable).
+if [ -n "$T3_CLI_ENTRY" ]; then
+ ELECTRON_RUN_AS_NODE=1 exec "${T3_CLI_RUNTIME:-node}" "$T3_CLI_ENTRY" "$@"
+fi
+​
+# Fallback for sessions spawned without that env: resolve the entry relative to
+# this shim, source layout first, then the bundled dist layout.
+dir="$(cd "$(dirname "$0")" && pwd)"
+for entry in "$dir/../../src/bin.ts" "$dir/../../bin.mjs"; do
+ if [ -f "$entry" ]; then
+ exec node "$entry" "$@"
+ fi
+done
+echo "t3 CLI entry point not found next to $dir" >&2
+exit 127