@agentshouse/kit 0.2.1-c9a26041e119a → 0.2.1-ca18b01951c3b

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.
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "version": "0.2.1-c9a26041e119a",
3
+ "version": "0.2.1-ca18b01951c3b",
4
4
  "hosts": {
5
5
  "macos": {
6
6
  "asset": {
7
7
  "name": "connect-linux.sh",
8
- "url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-c9a26041e119a/connect-linux.sh"
8
+ "url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-ca18b01951c3b/connect-linux.sh"
9
9
  }
10
10
  },
11
11
  "linux": {
12
12
  "asset": {
13
13
  "name": "connect-linux.sh",
14
- "url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-c9a26041e119a/connect-linux.sh"
14
+ "url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-ca18b01951c3b/connect-linux.sh"
15
15
  }
16
16
  },
17
17
  "windows": {
18
18
  "asset": {
19
19
  "name": "connect-windows.ps1",
20
- "url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-c9a26041e119a/connect-windows.ps1"
20
+ "url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-ca18b01951c3b/connect-windows.ps1"
21
21
  }
22
22
  }
23
23
  }
package/dist/chatgpt.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { parseArgs } from 'node:util';
2
+ import { placeAppGit } from './app-git.js';
2
3
  import { kitHome, readOwnAgent, writeOwnAgent } from './home.js';
3
4
  import { accepted, DEFAULT_HOUSE } from './login.js';
4
5
  const KEY_SOURCE = 'New key for a script on Connections';
@@ -17,10 +18,12 @@ export async function chatgpt(argv) {
17
18
  }
18
19
  if (values.key === undefined)
19
20
  throw new Error(`pass --key with a key from ${KEY_SOURCE}`);
20
- const house = values.house ?? (await readOwnAgent())?.house ?? DEFAULT_HOUSE;
21
+ const before = await readOwnAgent();
22
+ const house = values.house ?? before?.house ?? DEFAULT_HOUSE;
21
23
  if (!(await accepted(house, values.key)))
22
24
  throw new Error(`${house} does not accept this key; pass one from ${KEY_SOURCE}`);
23
25
  const relay = process.env.HOUSE_KIT_RELAY || undefined;
24
26
  await writeOwnAgent({ house, ...(relay === undefined ? {} : { relay }), credential: values.key });
27
+ await placeAppGit(before, await readOwnAgent()).catch((error) => process.stderr.write(`kit: ${error.message}\n`));
25
28
  process.stdout.write(`house now calls ${house} as you, with the key kept in ${kitHome()}.\n`);
26
29
  }
@@ -17,6 +17,14 @@ import { createHowWeWork } from './skills.js';
17
17
  import { transcribe } from './transcription.js';
18
18
  import { workFor } from './work.js';
19
19
  const KILLED = 'the conversation was killed';
20
+ const EXIT_PLAN_MODE = {
21
+ parse(value) {
22
+ if (typeof value !== 'object' || value === null || Array.isArray(value)) {
23
+ throw new Error('_x.ai/exit_plan_mode needs an object');
24
+ }
25
+ return value;
26
+ },
27
+ };
20
28
  export const CONVERSATION_INPUTS = new Set(['open', 'message', 'interrupt', 'kill', 'option', 'answer']);
21
29
  function causeOf(error) {
22
30
  return error instanceof Error ? error.message : String(error);
@@ -348,7 +356,8 @@ export class Conversations {
348
356
  reader.session = sessionId;
349
357
  const app = client({ name: '@agentshouse/kit' })
350
358
  .onRequest('session/request_permission', ({ params, signal }) => this.ask(conversation, 'session/request_permission', params, false, signal))
351
- .onRequest('elicitation/create', ({ params, signal }) => this.ask(conversation, 'elicitation/create', params, asksSecret(params), signal));
359
+ .onRequest('elicitation/create', ({ params, signal }) => this.ask(conversation, 'elicitation/create', params, asksSecret(params), signal))
360
+ .onRequest('_x.ai/exit_plan_mode', EXIT_PLAN_MODE, ({ params, signal }) => this.ask(conversation, '_x.ai/exit_plan_mode', params, false, signal));
352
361
  const cli = await unlessAborted(this.kit.agents.cli(route.kind), conversation.killed.signal);
353
362
  const bridge = await openBridge(this.kit.house, this.kit.copies, conversation.id, conversation.killed.signal);
354
363
  if (conversation.kills > 0) {
@@ -21,8 +21,8 @@ const ARGUMENTS = `the arguments are one JSON object in single quotes, like hous
21
21
  const CLOSED = "this conversation's House connection is closed; nothing to do from here";
22
22
  const SANDBOXED = "your CLI's sandbox kept house from House; run house directly, not through another program";
23
23
  const REVOKED = 'this conversation no longer has House access; nothing to do from here';
24
- const UNCONNECTED = "this computer's own agent has no House connection; run kit login";
25
- const DISCONNECTED = "House no longer accepts this computer's own agent; run kit login";
24
+ const UNCONNECTED = "this computer's own agent has no House connection; run kit login, or kit chatgpt --key <key> with a script key";
25
+ const DISCONNECTED = "House no longer accepts this computer's own agent; run kit login, or kit chatgpt --key <key> with a script key";
26
26
  const UNCONFIRMED = 'with no result; a write may or may not have taken effect, so read before you repeat it';
27
27
  const socketPath = process.env.HOUSE_BRIDGE;
28
28
  const MEDIA_TYPES = new Map([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentshouse/kit",
3
- "version": "0.2.1-c9a26041e119a",
3
+ "version": "0.2.1-ca18b01951c3b",
4
4
  "description": "House Kit connects an Environment to agents.house.",
5
5
  "license": "MIT",
6
6
  "repository": {