@chipschat/acp 1.0.30 → 1.0.31

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
@@ -39,10 +39,13 @@ need not be there: without them the bridge runs Claude Code or Codex, in the mod
39
39
 
40
40
  Before it takes the link up, which works once, it checks:
41
41
  - the config is there, or is one of those two;
42
- - its command is on this machine's PATH (else how to install it);
42
+ - its command is on this machine's PATH (else how to install it). Claude Code and Codex are also
43
+ looked for in `~/.local/bin`, where their makers' installers put them, since the terminal an
44
+ installer ran in doesn't have that folder on its PATH until a new one is opened;
43
45
  - the agent starts, makes a session, and is signed in: Codex refuses a session while signed out,
44
46
  and Claude Code says it is signed in as nobody (`_auth/status_update`). Signed out, it says how
45
- to sign in: `codex login`, or `claude` then /login.
47
+ to sign in: `codex login` (`codex login --device-auth` on a machine with no screen), or
48
+ `claude auth login`.
46
49
 
47
50
  Anything missing stops it with what to do, and the link is still good. Joined, it says hello in its
48
51
  room once, which the card waits for; a new link from Chips replaces the key it kept. Without a
@@ -1,6 +1,6 @@
1
1
  # Third-party notices
2
2
 
3
- `dist/main.js` in @chipschat/acp 1.0.30 carries these packages, bundled in. Each one's
3
+ `dist/main.js` in @chipschat/acp 1.0.31 carries these packages, bundled in. Each one's
4
4
  licence follows.
5
5
 
6
6
  ## @chipschat/harness 1.0.10 (Apache-2.0)
package/dist/main.js CHANGED
@@ -26722,6 +26722,7 @@ var KNOWN2 = [
26722
26722
  fetches: false,
26723
26723
  agent: "claude",
26724
26724
  installLine: "curl -fsSL https://claude.ai/install.sh | bash",
26725
+ installedIn: ".local/bin",
26725
26726
  mode: "default",
26726
26727
  signIn: "run `claude auth login`",
26727
26728
  signInLine: "claude auth login",
@@ -26736,8 +26737,11 @@ var KNOWN2 = [
26736
26737
  fetches: true,
26737
26738
  agent: "codex",
26738
26739
  installLine: "curl -fsSL https://chatgpt.com/codex/install.sh | sh",
26740
+ installedIn: ".local/bin",
26739
26741
  mode: "workspace-write",
26740
26742
  signIn: "run `codex login`",
26743
+ // Over SSH no browser opens, and the address `codex login` prints calls back to that machine.
26744
+ signInNoScreen: "`codex login --device-auth`",
26741
26745
  signInLine: "codex login",
26742
26746
  signInDoing: SIGN_IN_DOING
26743
26747
  }
@@ -26783,7 +26787,10 @@ function installWords(kind2) {
26783
26787
  }
26784
26788
  function signedOutWords(kind2, info) {
26785
26789
  const known = knownBy(kind2);
26786
- if (known !== void 0) return `${kind2.name} isn't signed in on this machine: ${known.signIn} in a terminal.`;
26790
+ if (known !== void 0) {
26791
+ const noScreen = known.signInNoScreen === void 0 ? "" : `, or ${known.signInNoScreen} on a machine with no screen`;
26792
+ return `${kind2.name} isn't signed in on this machine: ${known.signIn} in a new terminal${noScreen}.`;
26793
+ }
26787
26794
  const ways = (info?.authMethods ?? []).map((method) => method.name);
26788
26795
  return `${kind2.name} isn't signed in on this machine: sign it in its own way${ways.length > 0 ? ` (${ways.join(", ")})` : ""}.`;
26789
26796
  }
@@ -26994,10 +27001,18 @@ async function checkSignIn(kind2, wire, cwd, options = {}) {
26994
27001
  }
26995
27002
 
26996
27003
  // src/adapter.ts
27004
+ var inNewTerminal = (name) => `If ${name} still isn't found, run that command in a new terminal.`;
26997
27005
  var PATIENCE_MS = 20 * 6e4;
26998
27006
  var adapterFolder = (id2, home = homedir5()) => join7(placesOf(home).settings, "adapters", id2);
26999
27007
  var fetchedAt = (id2, program, home) => join7(adapterFolder(id2, home), "node_modules", ".bin", program);
27000
27008
  var pathOf2 = (kind2, env2) => ({ ...env2, ...kind2.env })["PATH"] ?? "";
27009
+ function makersFolder(kind2, env2 = process.env, home = homedir5()) {
27010
+ const known = knownOf(kind2);
27011
+ if (known === void 0 || onPath(known.agent, pathOf2(kind2, env2))) return void 0;
27012
+ const folder2 = join7(home, known.installedIn);
27013
+ return runnable(join7(folder2, known.agent)) ? folder2 : void 0;
27014
+ }
27015
+ var pathWithLast = (path, folder2) => [...(path ?? "").split(delimiter3).filter((each) => each !== ""), folder2].join(delimiter3);
27001
27016
  function withFetchedAdapter(kind2, env2 = process.env, home = homedir5()) {
27002
27017
  const known = knownOf(kind2);
27003
27018
  if (known === void 0 || kind2.command[0] !== known.program || onPath(known.program, pathOf2(kind2, env2))) return kind2;
@@ -27048,7 +27063,10 @@ async function readyAdapter(kind2, options = {}) {
27048
27063
  const path = pathOf2(kind2, env2);
27049
27064
  if (onPath(known.program, path)) return kind2;
27050
27065
  if (!onPath(known.agent, path)) {
27051
- throw new SetupError(`${kind2.name} isn't installed on this machine: run \`${known.installLine}\`. ${STILL_GOOD}`, agentMissingStop(known));
27066
+ throw new SetupError(
27067
+ `${kind2.name} isn't installed on this machine: run \`${known.installLine}\`. ${STILL_GOOD} ${inNewTerminal(kind2.name)}`,
27068
+ agentMissingStop(known)
27069
+ );
27052
27070
  }
27053
27071
  const npm = env2["CHIPS_NPM"];
27054
27072
  if (!known.fetches || npm === void 0 || npm === "") return kind2;
@@ -29846,7 +29864,10 @@ if (!handsOver) moveOld(configTargetOf(words3[0]), log);
29846
29864
  var configPath = configPathOf(words3[0]);
29847
29865
  var kind;
29848
29866
  try {
29849
- kind = withFetchedAdapter(readConfig(configPath));
29867
+ kind = readConfig(configPath);
29868
+ const makers = link === void 0 ? void 0 : makersFolder(kind);
29869
+ if (makers !== void 0) process.env["PATH"] = pathWithLast(process.env["PATH"], makers);
29870
+ kind = withFetchedAdapter(kind);
29850
29871
  mkdirSync6(kind.folder ?? kind.folders, { recursive: true });
29851
29872
  if (link !== void 0) {
29852
29873
  reportStep("checking", { detail: `Looking for ${kind.name}` });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chipschat/acp",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "An agent that speaks the Agent Client Protocol, as a Chips harness of its kind: agents made from Chips, each in a folder of its own, each room a session.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {