@telepath-computer/television 0.1.196 → 0.1.197

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/dist/cli.cjs CHANGED
@@ -34222,6 +34222,7 @@ var APP_HIDDEN_DIRECTORY = ".television";
34222
34222
  var TELEVISION_STORAGE_PATH_ENV = "TELEVISION_STORAGE_PATH";
34223
34223
  var TELEVISION_PORT_ENV = "TELEVISION_PORT";
34224
34224
  var TELEVISION_ACP_AGENT_ENV = "TELEVISION_ACP_AGENT";
34225
+ var TELEVISION_ACP_COMMAND_ENV = "TELEVISION_ACP_COMMAND";
34225
34226
  var TELEVISION_DEVELOPER_HOME_ENV = "TELEVISION_DEVELOPER_HOME";
34226
34227
  var MAX_PORT = 65535;
34227
34228
  var TELEMETRY_CONTROL_ENV_VARS = [
@@ -34277,6 +34278,23 @@ function getTelevisionPortEnv() {
34277
34278
  return port;
34278
34279
  }
34279
34280
  function resolveACPAgentProfile(env = process.env) {
34281
+ const rawCommand = env[TELEVISION_ACP_COMMAND_ENV];
34282
+ if (rawCommand !== void 0) {
34283
+ const trimmed = rawCommand.trim();
34284
+ if (trimmed.length === 0) {
34285
+ throw new Error(
34286
+ `TELEVISION_ACP_COMMAND is set but empty. Provide a command to launch the ACP agent, e.g. TELEVISION_ACP_COMMAND="pino acp-attach".`
34287
+ );
34288
+ }
34289
+ const [command, ...args] = trimmed.split(/\s+/);
34290
+ return {
34291
+ agent: "command",
34292
+ command,
34293
+ args,
34294
+ envPrefix: "",
34295
+ sessionIdStrategy: "deterministic"
34296
+ };
34297
+ }
34280
34298
  const rawAgent = env[TELEVISION_ACP_AGENT_ENV];
34281
34299
  if (rawAgent === void 0) {
34282
34300
  return null;
@@ -34303,10 +34321,16 @@ function buildPersistedACPEnvironment(env, options = {}) {
34303
34321
  if (!profile) {
34304
34322
  return snapshot;
34305
34323
  }
34306
- snapshot[TELEVISION_ACP_AGENT_ENV] = profile.agent;
34307
- for (const [key, value] of Object.entries(env)) {
34308
- if (key.startsWith(profile.envPrefix) && value !== void 0) {
34309
- snapshot[key] = value;
34324
+ if (profile.agent === "command") {
34325
+ snapshot[TELEVISION_ACP_COMMAND_ENV] = [profile.command, ...profile.args].join(" ");
34326
+ } else {
34327
+ snapshot[TELEVISION_ACP_AGENT_ENV] = profile.agent;
34328
+ }
34329
+ if (profile.envPrefix.length > 0) {
34330
+ for (const [key, value] of Object.entries(env)) {
34331
+ if (key.startsWith(profile.envPrefix) && value !== void 0) {
34332
+ snapshot[key] = value;
34333
+ }
34310
34334
  }
34311
34335
  }
34312
34336
  return snapshot;
@@ -52569,7 +52593,7 @@ function disabledTelemetryRuntime() {
52569
52593
 
52570
52594
  // ../server/src/updates/version.ts
52571
52595
  function readVersionStamp() {
52572
- if ("0.1.196".length > 0) return "0.1.196";
52596
+ if ("0.1.197".length > 0) return "0.1.197";
52573
52597
  return void 0;
52574
52598
  }
52575
52599
  function resolveUpdateReleaseVersion(env = process.env, stamp = readVersionStamp()) {
@@ -53069,8 +53093,8 @@ var Server = class {
53069
53093
  };
53070
53094
  };
53071
53095
  function readServerPackageVersion() {
53072
- if ("0.1.196".length > 0) {
53073
- return telemetryVersion("0.1.196");
53096
+ if ("0.1.197".length > 0) {
53097
+ return telemetryVersion("0.1.197");
53074
53098
  }
53075
53099
  const packageJsonPath = import_node_path11.default.resolve(import_node_path11.default.dirname((0, import_node_url.fileURLToPath)(import_meta.url)), "..", "package.json");
53076
53100
  if (!(0, import_node_fs9.existsSync)(packageJsonPath)) return telemetryVersion("0.0.0");
@@ -54649,8 +54673,8 @@ function resolveVercelSkillsInstallerBin() {
54649
54673
  return localRequire.resolve("skills/bin/cli.mjs");
54650
54674
  }
54651
54675
  function readCLIVersion() {
54652
- if ("0.1.196".length > 0) {
54653
- return "0.1.196";
54676
+ if ("0.1.197".length > 0) {
54677
+ return "0.1.197";
54654
54678
  }
54655
54679
  const devPackageJsonPath = import_node_path17.default.join(getDevPackageDir(), "package.json");
54656
54680
  if (!(0, import_node_fs14.existsSync)(devPackageJsonPath)) {
@@ -55097,8 +55121,9 @@ function createProgram(env, argv = []) {
55097
55121
  }
55098
55122
  daemonEnv[TELEMETRY_LAUNCH_MODE_ENV] = "daemon";
55099
55123
  if (profile2 && !isACPCommandResolvable(profile2.command, daemonEnv)) {
55124
+ const selector = profile2.agent === "command" ? "TELEVISION_ACP_COMMAND" : `TELEVISION_ACP_AGENT=${profile2.agent}`;
55100
55125
  const error48 = createDirectiveError(
55101
- `Could not find ACP agent command \`${profile2.command}\` for \`TELEVISION_ACP_AGENT=${profile2.agent}\` on the persisted PATH. Set TELEVISION_ACP_AGENT to \`openclaw\` or \`hermes\`, and ensure the selected agent binary is available on PATH before running \`tv serve --persist\`.`
55126
+ `Could not find ACP agent command \`${profile2.command}\` for \`${selector}\` on the persisted PATH. Set TELEVISION_ACP_AGENT to \`openclaw\` or \`hermes\`, or TELEVISION_ACP_COMMAND to a custom ACP agent command, and ensure the selected agent binary is available on PATH before running \`tv serve --persist\`.`
55102
55127
  );
55103
55128
  log(storagePath, "server startup refused before binding", { argv, error: error48 });
55104
55129
  throw error48;
@@ -55145,8 +55170,9 @@ function createProgram(env, argv = []) {
55145
55170
  warnForExplicitPortZero(opts.port);
55146
55171
  const profile = resolveACPAgentProfile(process.env);
55147
55172
  if (profile && !isACPCommandResolvable(profile.command, process.env)) {
55173
+ const selector = profile.agent === "command" ? "TELEVISION_ACP_COMMAND" : `TELEVISION_ACP_AGENT=${profile.agent}`;
55148
55174
  const error48 = createDirectiveError(
55149
- `Could not find ACP agent command \`${profile.command}\` for \`TELEVISION_ACP_AGENT=${profile.agent}\` on PATH. Set TELEVISION_ACP_AGENT to \`openclaw\` or \`hermes\`, and ensure the selected agent binary is available on PATH before running \`tv serve\`.`
55175
+ `Could not find ACP agent command \`${profile.command}\` for \`${selector}\` on PATH. Set TELEVISION_ACP_AGENT to \`openclaw\` or \`hermes\`, or TELEVISION_ACP_COMMAND to a custom ACP agent command, and ensure the selected agent binary is available on PATH before running \`tv serve\`.`
55150
55176
  );
55151
55177
  log(storagePathForLogs, "server startup refused before binding", { argv, error: error48 });
55152
55178
  throw error48;