@termhub/agent 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -21,7 +21,8 @@ termhub-agent connect --url https://app.termhub.dev
21
21
 
22
22
  You'll be prompted to paste an agent token generated from the termhub web app (Machines → Add
23
23
  machine). `--token <token>` and the `TERMHUB_URL`/`TERMHUB_TOKEN` environment variables work too,
24
- for non-interactive setups. On success the agent keeps running in the foreground until Ctrl-C.
24
+ for non-interactive setups. On success the pairing is saved and the command exits; start the agent
25
+ with `termhub-agent service install` (background) or `termhub-agent run` (foreground).
25
26
 
26
27
  ## Run as a background service
27
28
 
package/dist/cli.js CHANGED
@@ -689,6 +689,7 @@ function createPtyManager(deps) {
689
689
  const spawn = await resolveSpawn();
690
690
  proc = spawn(tmux, ["-u", "new-session", "-A", "-s", params.session, "-c", cwd], { name: "xterm-256color", cols, rows, cwd, env });
691
691
  } catch (err) {
692
+ deps.log("pty open failed", { ch, session: params.session, tmux, cwd: params.cwd, error: err instanceof Error ? err.message : String(err) });
692
693
  socket.sendControl({
693
694
  type: "open_error",
694
695
  ch,
@@ -961,7 +962,7 @@ async function status(deps = {}) {
961
962
  }
962
963
 
963
964
  // src/version.ts
964
- var AGENT_VERSION = "0.1.0";
965
+ var AGENT_VERSION = "0.1.1";
965
966
 
966
967
  // src/run.ts
967
968
  function detectOs(platform = process.platform) {
@@ -1134,8 +1135,11 @@ async function connectCommand(values, log2) {
1134
1135
  }
1135
1136
  const config = { url, token, machine_id: "", machine_name: "", created_at: (/* @__PURE__ */ new Date()).toISOString() };
1136
1137
  writeConfig(config);
1137
- console.log("Conectado. Agora rode: termhub-agent service install");
1138
- await runForegroundUntilSignal(config, log2);
1138
+ console.log("Conectado. Configura\xE7\xE3o salva.");
1139
+ console.log("Pr\xF3ximos passos:");
1140
+ console.log(" termhub-agent service install # mant\xE9m o agente rodando em segundo plano");
1141
+ console.log(" termhub-agent doctor # confere tmux e acesso \xE0s pastas");
1142
+ console.log("(ou termhub-agent run para rodar em primeiro plano)");
1139
1143
  }
1140
1144
 
1141
1145
  // src/commands/disconnect.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@termhub/agent",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Agente do termhub: conecta esta máquina ao servidor por WebSocket de saída (sem SSH) e expõe os terminais tmux no navegador.",
5
5
  "license": "MIT",
6
6
  "private": false,