@agentshouse/kit 0.2.1-alpha.17 → 0.2.1-alpha.18

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/acp.js CHANGED
@@ -9,7 +9,7 @@ export async function startAdapter(kind, cli, cwd, app, jobs = () => undefined,
9
9
  const adapter = CLIS[kind].adapter;
10
10
  const child = spawn(adapter === null ? cli : adapterCommand(kind), CLIS[kind].args, {
11
11
  cwd,
12
- env: { ...withoutProxy(), ...(adapter === null ? {} : { [adapter.executable]: cli }), ...added },
12
+ env: { ...withoutProxy(), ...(adapter === null ? {} : { ...adapter.env, [adapter.executable]: cli }), ...added },
13
13
  stdio: ['pipe', 'pipe', 'pipe'],
14
14
  detached: true,
15
15
  });
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "0.2.1-alpha.17",
3
+ "version": "0.2.1-alpha.18",
4
4
  "hosts": {
5
5
  "linux": {
6
- "command": "bash <(curl -fsSL https://github.com/agentshouse/kit/releases/download/v0.2.1-alpha.17/connect-linux.sh)",
6
+ "command": "bash <(curl -fsSL https://github.com/agentshouse/kit/releases/download/v0.2.1-alpha.18/connect-linux.sh)",
7
7
  "asset": {
8
8
  "name": "connect-linux.sh",
9
- "url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-alpha.17/connect-linux.sh"
9
+ "url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-alpha.18/connect-linux.sh"
10
10
  },
11
11
  "workspace": {
12
12
  "argument": "--workspace",
@@ -17,10 +17,10 @@
17
17
  }
18
18
  },
19
19
  "windows": {
20
- "command": "& ([scriptblock]::Create((irm https://github.com/agentshouse/kit/releases/download/v0.2.1-alpha.17/connect-windows.ps1)))",
20
+ "command": "& ([scriptblock]::Create((irm https://github.com/agentshouse/kit/releases/download/v0.2.1-alpha.18/connect-windows.ps1)))",
21
21
  "asset": {
22
22
  "name": "connect-windows.ps1",
23
- "url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-alpha.17/connect-windows.ps1"
23
+ "url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-alpha.18/connect-windows.ps1"
24
24
  },
25
25
  "workspace": {
26
26
  "argument": "--workspace",
package/dist/bridge.js CHANGED
@@ -4,9 +4,10 @@ import { setTimeout as delay } from 'node:timers/promises';
4
4
  import { mkdir } from 'node:fs/promises';
5
5
  import { createServer, request as httpRequest } from 'node:http';
6
6
  import { request as httpsRequest } from 'node:https';
7
- import { delimiter, join } from 'node:path';
7
+ import { delimiter, dirname, join } from 'node:path';
8
8
  import { parse } from 'yaml';
9
9
  import { HouseRefusal, retryDelay } from './api.js';
10
+ import { loginPath } from './clis.js';
10
11
  import { changedPaths, } from './copies.js';
11
12
  import { kitHome, readEnrolment } from './home.js';
12
13
  import { callHouse, mcpBody, rpc, UNREACHABLE } from './mcp.js';
@@ -85,6 +86,7 @@ function editAnswer(forwarded) {
85
86
  };
86
87
  }
87
88
  export async function openBridge(house, copies, conversationId, signal) {
89
+ const path = [join(kitHome(), 'shim'), dirname(process.execPath), await loginPath()].join(delimiter);
88
90
  const origin = (await readEnrolment()).house;
89
91
  const { credential } = await house.post(`/kit/conversations/${conversationId}/credential`, {}, signal);
90
92
  const closed = new AbortController();
@@ -221,7 +223,7 @@ export async function openBridge(house, copies, conversationId, signal) {
221
223
  return {
222
224
  env: {
223
225
  HOUSE_BRIDGE: socketPath,
224
- PATH: `${join(kitHome(), 'shim')}${delimiter}${process.env.PATH ?? ''}`,
226
+ PATH: path,
225
227
  GIT_CONFIG_COUNT: '1',
226
228
  GIT_CONFIG_KEY_0: `url.${proxy}/app/.insteadOf`,
227
229
  GIT_CONFIG_VALUE_0: app,
package/dist/clis.js CHANGED
@@ -34,7 +34,7 @@ export const CLIS = {
34
34
  bin: 'codex',
35
35
  minimum: '0.159.1',
36
36
  install: 'curl -fsSL https://chatgpt.com/codex/install.sh | sh',
37
- adapter: { package: '@agentclientprotocol/codex-acp', bin: 'codex-acp', executable: 'CODEX_PATH' },
37
+ adapter: { package: '@agentclientprotocol/codex-acp', bin: 'codex-acp', executable: 'CODEX_PATH', env: {} },
38
38
  args: [],
39
39
  signedIn: { command: ['login', 'status'] },
40
40
  login: { args: ['login', '--device-auth'], code: 'show' },
@@ -52,6 +52,7 @@ export const CLIS = {
52
52
  package: '@agentclientprotocol/claude-agent-acp',
53
53
  bin: 'claude-agent-acp',
54
54
  executable: 'CLAUDE_CODE_EXECUTABLE',
55
+ env: { CLAUDE_CODE_ENTRYPOINT: 'claude-agent-acp' },
55
56
  },
56
57
  args: [],
57
58
  signedIn: { command: ['auth', 'status'] },
@@ -153,10 +154,19 @@ function loginShell() {
153
154
  }
154
155
  const FOUND = 'house-kit-cli ';
155
156
  const LOOKUP = `found=$(command -v "$1") || exit 0; case $found in /*) ;; *) found=$(pwd -P)/$found ;; esac; printf "${FOUND}%s\\n" "$found"`;
157
+ const USER_BIN = 'case ":$PATH:" in *":$HOME/.local/bin:"*) ;; *) PATH="$PATH:$HOME/.local/bin" ;; esac; export PATH';
158
+ function inLoginShell(script, argument = '') {
159
+ return run(loginShell(), ['-l', '-i', '-c', `exec /bin/sh -c '${USER_BIN}; ${script}' sh ${argument}`], READ_MS, true);
160
+ }
156
161
  export async function locate(kind) {
157
- const ran = await run(loginShell(), ['-l', '-i', '-c', `exec /bin/sh -c '${LOOKUP}' sh ${CLIS[kind].bin}`], READ_MS, true);
162
+ const ran = await inLoginShell(LOOKUP, CLIS[kind].bin);
158
163
  return ran.stdout.split('\n').findLast((line) => line.startsWith(FOUND))?.slice(FOUND.length) ?? null;
159
164
  }
165
+ export async function loginPath() {
166
+ const marker = 'house-kit-path ';
167
+ const ran = await inLoginShell(`printf "${marker}%s\\n" "$PATH"`);
168
+ return ran.stdout.split('\n').findLast((line) => line.startsWith(marker)).slice(marker.length);
169
+ }
160
170
  export async function versionOf(path) {
161
171
  return VERSION.exec((await run(path, ['--version'], READ_MS)).stdout)?.[0] ?? null;
162
172
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentshouse/kit",
3
- "version": "0.2.1-alpha.17",
3
+ "version": "0.2.1-alpha.18",
4
4
  "description": "House Kit connects an Environment to agents.house.",
5
5
  "license": "MIT",
6
6
  "repository": {