@agentshouse/kit 0.2.1-c5d36e97b0fea → 0.2.1-c7252abc8a583
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 +23 -23
- package/dist/agents.js +5 -1
- package/dist/api.js +6 -2
- package/dist/bootstrap.json +4 -4
- package/dist/clis.js +33 -7
- package/dist/conversations.js +9 -5
- package/dist/copies.js +18 -18
- package/dist/end.js +17 -3
- package/dist/enrol-main.js +7 -1
- package/dist/home.js +41 -3
- package/dist/house-main.js +76 -36
- package/dist/instructions.js +5 -4
- package/dist/kit-main.js +50 -8
- package/dist/login.js +87 -14
- package/dist/parts.js +34 -16
- package/dist/placement.js +48 -0
- package/dist/relay.js +12 -2
- package/dist/resident.js +13 -4
- package/dist/service-main.js +9 -0
- package/dist/service.js +33 -0
- package/dist/stream.js +9 -4
- package/dist/update.js +27 -6
- package/dist/wire.js +6 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
# House Kit
|
|
2
2
|
|
|
3
|
-
House Kit connects an Environment, a Linux computer or server, to
|
|
4
|
-
|
|
5
|
-
through the agent CLIs you chose and gives each Agent the `house` command.
|
|
3
|
+
House Kit connects an Environment, a Linux computer or server, to [agents.house](https://agents.house). It runs
|
|
4
|
+
your Agents' conversations through the agent CLIs you chose and gives each Agent the `house` command.
|
|
6
5
|
|
|
7
6
|
## Install
|
|
8
7
|
|
|
9
|
-
Run `curl -fsSL agents.house/kit | sh`, or `irm agents.house/kit.ps1 | iex` on
|
|
10
|
-
|
|
11
|
-
installs House Kit natively under your own account, without an admin password,
|
|
8
|
+
Run `curl -fsSL agents.house/kit | sh`, or `irm agents.house/kit.ps1 | iex` on Windows, and again to update;
|
|
9
|
+
options follow `sh -s --`. On macOS and Linux it installs House Kit natively under your own account, without an admin password,
|
|
12
10
|
as a service that runs while you are logged in. `kit` and `house` are then on
|
|
13
11
|
your login shell's `PATH`, and your workspace is `~/AgentsHouse` unless you
|
|
14
12
|
pass `--workspace <path>`.
|
|
@@ -20,7 +18,7 @@ workspace. On Windows 11 the container is the one choice. Append a `kit` or
|
|
|
20
18
|
Running the command for the other choice on a connected computer asks you to
|
|
21
19
|
confirm, then replaces its Environment, whose Agents end, with a new one.
|
|
22
20
|
|
|
23
|
-
On your own
|
|
21
|
+
On your own Linux server, run the Linux command with `--linux` to
|
|
24
22
|
install House Kit natively, with its workspace at `/agents/house`; `kit` and
|
|
25
23
|
`house` are then on the server's `PATH`.
|
|
26
24
|
|
|
@@ -33,22 +31,24 @@ them out; running it again without the flag brings them back.
|
|
|
33
31
|
|
|
34
32
|
## Commands
|
|
35
33
|
|
|
36
|
-
`kit login` opens or prints a link you confirm in any browser, on this
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
34
|
+
`kit login` opens or prints a link you confirm in any browser, on this computer
|
|
35
|
+
or another, continues on its own and keeps the Environment's credential in
|
|
36
|
+
`~/.house-kit`, or in `$HOUSE_KIT_HOME` when it is set. `--environment <id>`
|
|
37
|
+
reconnects an Environment you already have; `--rooms <ref>[,<ref>...]` gives it
|
|
38
|
+
only those Rooms and `--no-private` every Room but your Private Room;
|
|
39
|
+
`--code <code>` connects immediately without a link.
|
|
40
|
+
A login also connects your own agent: outside an Agent conversation, `house <tool>` calls
|
|
41
|
+
House as you and `git` clones and pushes your Apps at `<house>/app/` as you, until you revoke
|
|
42
|
+
that connection on Connections. `house help` lists the Tools. Codex sessions started after a
|
|
43
|
+
login run a lone `house` command outside their sandbox. `kit logout` disconnects this
|
|
44
|
+
computer, stops House Kit and ends your own agent's connection, so `house` and `git` no
|
|
45
|
+
longer act as you here; a later `kit login` reconnects the same Environment.
|
|
46
|
+
|
|
47
|
+
`kit resident` keeps the Environment connected and, as it connects, copies each
|
|
48
|
+
Room you chose for it as a Git repository in the workspace's `local-copies`.
|
|
49
|
+
`house fetch` records House's changes on each copy's `refs/house/received`;
|
|
50
|
+
rebase onto it, commit and run `house push --owner` in the copy, through the
|
|
51
|
+
install command in the container. An Agent runs both, without `--owner`.
|
|
52
52
|
|
|
53
53
|
House Kit turns each audio file of your message to an Agent into text on this
|
|
54
54
|
computer before the Agent reads it. While transcription is on, the speech
|
package/dist/agents.js
CHANGED
|
@@ -3,8 +3,10 @@ import { readFile, realpath } from 'node:fs/promises';
|
|
|
3
3
|
import { startAdapter } from './acp.js';
|
|
4
4
|
import { CLIS, KIT_VERSION, below, installAdapter, installCli, locate, run, versionOf } from './clis.js';
|
|
5
5
|
import { agentBase, kitHome } from './home.js';
|
|
6
|
+
import { updatesItself } from './placement.js';
|
|
6
7
|
import { killTree } from './scope.js';
|
|
7
8
|
import { holdTranscription, transcriptionReport } from './transcription.js';
|
|
9
|
+
import { KIT_WIRE } from './wire.js';
|
|
8
10
|
const SIGNED_OUT = { signed_in: false, models: [], modes: [] };
|
|
9
11
|
function select(options, category) {
|
|
10
12
|
const option = options.find((candidate) => candidate.category === category);
|
|
@@ -257,7 +259,7 @@ export class Agents {
|
|
|
257
259
|
}
|
|
258
260
|
async load(kind) {
|
|
259
261
|
const known = this.readings.get(kind);
|
|
260
|
-
if (known !== undefined && known.failure === null)
|
|
262
|
+
if (known !== undefined && known.failure === null && known.minimum === undefined)
|
|
261
263
|
return;
|
|
262
264
|
await this.examine(kind, SIGNED_OUT, offer);
|
|
263
265
|
}
|
|
@@ -270,6 +272,8 @@ export class Agents {
|
|
|
270
272
|
const body = {
|
|
271
273
|
os: await operatingSystem(),
|
|
272
274
|
kit_version: KIT_VERSION,
|
|
275
|
+
wire: KIT_WIRE,
|
|
276
|
+
updates_itself: await updatesItself(),
|
|
273
277
|
agent_base: agentBase(),
|
|
274
278
|
agents,
|
|
275
279
|
transcription: transcriptionReport(),
|
package/dist/api.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
2
|
-
import {
|
|
2
|
+
import { signInAgain, updateRequired } from './end.js';
|
|
3
3
|
import { readEnrolment } from './home.js';
|
|
4
4
|
import { retryable } from './refusals.js';
|
|
5
5
|
import { relayed } from './relay.js';
|
|
6
|
+
import { KIT_WIRE, KIT_WIRE_HEADER, tooOld } from './wire.js';
|
|
6
7
|
export class HouseRefusal extends Error {
|
|
7
8
|
status;
|
|
8
9
|
text;
|
|
@@ -37,12 +38,15 @@ export async function post(house, path, body, credential, signal) {
|
|
|
37
38
|
method: 'POST',
|
|
38
39
|
headers: {
|
|
39
40
|
'content-type': 'application/json',
|
|
41
|
+
[KIT_WIRE_HEADER]: String(KIT_WIRE),
|
|
40
42
|
...(credential === undefined ? {} : { authorization: `Bearer ${credential}` }),
|
|
41
43
|
},
|
|
42
44
|
body: JSON.stringify(body),
|
|
43
45
|
signal,
|
|
44
46
|
});
|
|
45
47
|
const text = await answer.text();
|
|
48
|
+
if (!answer.ok && tooOld(text))
|
|
49
|
+
updateRequired(house);
|
|
46
50
|
if (!answer.ok)
|
|
47
51
|
throw new HouseRefusal(path, answer.status, text);
|
|
48
52
|
return JSON.parse(text);
|
|
@@ -54,7 +58,7 @@ async function enrolledPost(path, body, signal) {
|
|
|
54
58
|
}
|
|
55
59
|
catch (error) {
|
|
56
60
|
if (error instanceof HouseRefusal && error.status === 401)
|
|
57
|
-
|
|
61
|
+
await signInAgain(credential);
|
|
58
62
|
throw error;
|
|
59
63
|
}
|
|
60
64
|
}
|
package/dist/bootstrap.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
|
-
"version": "0.2.1-
|
|
3
|
+
"version": "0.2.1-c7252abc8a583",
|
|
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-
|
|
8
|
+
"url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-c7252abc8a583/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-
|
|
14
|
+
"url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-c7252abc8a583/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-
|
|
20
|
+
"url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-c7252abc8a583/connect-windows.ps1"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
package/dist/clis.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { constants, readFileSync } from 'node:fs';
|
|
3
|
-
import { access, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { access, mkdir, readFile, rename, writeFile } from 'node:fs/promises';
|
|
4
4
|
import { homedir, userInfo } from 'node:os';
|
|
5
5
|
import { delimiter, isAbsolute, join } from 'node:path';
|
|
6
6
|
import { kitHome } from './home.js';
|
|
7
|
+
const HOUSE_EXECUTABLES = /^host_executable\(name = "house", paths = (\[.*\])\)$/m;
|
|
8
|
+
function houseRule(houses) {
|
|
9
|
+
return `prefix_rule(pattern = ["house"], decision = "allow")\nhost_executable(name = "house", paths = ${JSON.stringify(houses)})\n`;
|
|
10
|
+
}
|
|
7
11
|
const RAW_SUBTYPES = [
|
|
8
12
|
'background_tasks_changed',
|
|
9
13
|
'task_started',
|
|
@@ -22,15 +26,37 @@ async function executable(path) {
|
|
|
22
26
|
return false;
|
|
23
27
|
}
|
|
24
28
|
}
|
|
25
|
-
async function
|
|
29
|
+
async function listedHouses(file) {
|
|
30
|
+
let text;
|
|
31
|
+
try {
|
|
32
|
+
text = await readFile(file, 'utf8');
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
if (error.code === 'ENOENT')
|
|
36
|
+
return [];
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
const listed = JSON.parse(HOUSE_EXECUTABLES.exec(text)?.[1] ?? '[]');
|
|
41
|
+
return Array.isArray(listed) ? listed.filter((house) => typeof house === 'string') : [];
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export async function allowHouseInCodex(path) {
|
|
26
48
|
const candidates = [...new Set(path.split(delimiter).filter((directory) => isAbsolute(directory)))].map((directory) => join(directory, 'house'));
|
|
27
|
-
const houses = [];
|
|
28
|
-
for (const candidate of candidates)
|
|
29
|
-
if (await executable(candidate))
|
|
30
|
-
houses.push(candidate);
|
|
31
49
|
const rules = join(process.env.CODEX_HOME || join(homedir(), '.codex'), 'rules');
|
|
50
|
+
const file = join(rules, 'house.rules');
|
|
51
|
+
const houses = [];
|
|
52
|
+
for (const house of [...(await listedHouses(file)), ...candidates]) {
|
|
53
|
+
if (!houses.includes(house) && (await executable(house)))
|
|
54
|
+
houses.push(house);
|
|
55
|
+
}
|
|
32
56
|
await mkdir(rules, { recursive: true });
|
|
33
|
-
|
|
57
|
+
const temporary = `${file}.${process.pid}`;
|
|
58
|
+
await writeFile(temporary, houseRule(houses));
|
|
59
|
+
await rename(temporary, file);
|
|
34
60
|
}
|
|
35
61
|
async function nothing() { }
|
|
36
62
|
function bridgeInClaudeSandbox(bridge) {
|
package/dist/conversations.js
CHANGED
|
@@ -17,6 +17,7 @@ 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
|
+
export const CONVERSATION_INPUTS = new Set(['open', 'message', 'interrupt', 'kill', 'option', 'answer']);
|
|
20
21
|
function causeOf(error) {
|
|
21
22
|
return error instanceof Error ? error.message : String(error);
|
|
22
23
|
}
|
|
@@ -132,6 +133,9 @@ export class Conversations {
|
|
|
132
133
|
return false;
|
|
133
134
|
return !conversations.some((conversation) => conversation.running?.scope.working() || [...conversation.leftovers].some((scope) => scope.working()));
|
|
134
135
|
}
|
|
136
|
+
quiet() {
|
|
137
|
+
return this.idle() && [...this.conversations.values()].every((conversation) => conversation.open === 0);
|
|
138
|
+
}
|
|
135
139
|
look() {
|
|
136
140
|
for (const conversation of this.conversations.values()) {
|
|
137
141
|
for (const scope of conversation.leftovers) {
|
|
@@ -499,7 +503,7 @@ export class Conversations {
|
|
|
499
503
|
if (conversation.turn === turn)
|
|
500
504
|
conversation.turn = null;
|
|
501
505
|
const body = Promise.allSettled(turn.uploads).then(() => ({
|
|
502
|
-
parts: turn.parts.
|
|
506
|
+
parts: turn.parts.saved(),
|
|
503
507
|
context: turn.parts.context,
|
|
504
508
|
...failed,
|
|
505
509
|
}));
|
|
@@ -644,7 +648,7 @@ export class Conversations {
|
|
|
644
648
|
turn.parts.plan(event.entries);
|
|
645
649
|
return;
|
|
646
650
|
case 'image':
|
|
647
|
-
turn.uploads.push(this.image(conversation, turn, event.data, event.mediaType));
|
|
651
|
+
turn.uploads.push(this.image(conversation, turn, turn.parts.reserve(), event.data, event.mediaType));
|
|
648
652
|
this.kit.changed();
|
|
649
653
|
return;
|
|
650
654
|
}
|
|
@@ -664,7 +668,7 @@ export class Conversations {
|
|
|
664
668
|
else
|
|
665
669
|
conversation.turn.parts.start(part);
|
|
666
670
|
}
|
|
667
|
-
async image(conversation, turn, data, mediaType) {
|
|
671
|
+
async image(conversation, turn, reserved, data, mediaType) {
|
|
668
672
|
const bytes = Buffer.from(data, 'base64');
|
|
669
673
|
const name = `image-${++turn.images}.${mediaType.split('/')[1]}`;
|
|
670
674
|
try {
|
|
@@ -677,10 +681,10 @@ export class Conversations {
|
|
|
677
681
|
const saved = declared.upload === undefined ? declared : await uploadBytes(declared.upload, bytes);
|
|
678
682
|
if (saved.save.status !== 'saved')
|
|
679
683
|
throw new Error(saved.save.failure ?? saved.save.status);
|
|
680
|
-
turn.parts.
|
|
684
|
+
turn.parts.arrive({ type: 'image', file: saved.version, name, media_type: mediaType }, reserved);
|
|
681
685
|
}
|
|
682
686
|
catch (error) {
|
|
683
|
-
turn.parts.
|
|
687
|
+
turn.parts.arrive({ type: 'marker', marker: 'retry', text: `${name} was not saved: ${causeOf(error)}` }, reserved);
|
|
684
688
|
}
|
|
685
689
|
}
|
|
686
690
|
}
|
package/dist/copies.js
CHANGED
|
@@ -42,7 +42,7 @@ function expiredAuthority(error) {
|
|
|
42
42
|
return undefined;
|
|
43
43
|
try {
|
|
44
44
|
const { error: refused } = JSON.parse(error.text);
|
|
45
|
-
return refused?.code === '
|
|
45
|
+
return refused?.code === 'expired' && typeof refused.authority === 'string' ? refused.authority : undefined;
|
|
46
46
|
}
|
|
47
47
|
catch {
|
|
48
48
|
return undefined;
|
|
@@ -168,7 +168,7 @@ export class LocalCopies {
|
|
|
168
168
|
house;
|
|
169
169
|
copies = new Map();
|
|
170
170
|
queues = new Map();
|
|
171
|
-
|
|
171
|
+
answering = Promise.resolve();
|
|
172
172
|
constructor(house) {
|
|
173
173
|
this.house = house;
|
|
174
174
|
this.owner = {
|
|
@@ -200,39 +200,39 @@ export class LocalCopies {
|
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
async mapping() {
|
|
203
|
-
await this.
|
|
203
|
+
await this.answering;
|
|
204
204
|
return [...this.copies.values()]
|
|
205
205
|
.filter((copy) => copy.active)
|
|
206
206
|
.map((copy) => `${rootOf(copy.room_handle)}: ${copy.repository}`)
|
|
207
207
|
.sort();
|
|
208
208
|
}
|
|
209
|
-
async
|
|
210
|
-
const
|
|
211
|
-
if (
|
|
212
|
-
logged(
|
|
209
|
+
async connected() {
|
|
210
|
+
const copied = await this.answered(() => this.fetched(false));
|
|
211
|
+
if (copied.refused)
|
|
212
|
+
logged(copied.text);
|
|
213
213
|
}
|
|
214
214
|
fetch() {
|
|
215
|
-
return this.
|
|
215
|
+
return this.answered(() => this.fetched(true));
|
|
216
216
|
}
|
|
217
|
-
|
|
218
|
-
const
|
|
219
|
-
this.
|
|
220
|
-
return
|
|
217
|
+
answered(work) {
|
|
218
|
+
const answered = this.answering.then(work);
|
|
219
|
+
this.answering = answered.catch(() => undefined);
|
|
220
|
+
return answered;
|
|
221
221
|
}
|
|
222
222
|
async fetched(refreshing) {
|
|
223
|
-
const { local_copy:
|
|
224
|
-
const
|
|
225
|
-
return this.holding([...new Set([...this.copies.keys(), ...
|
|
223
|
+
const { local_copy: answer } = await this.house.post('/kit/local-copy/selection', {});
|
|
224
|
+
const synced = new Map(answer.rooms.map((room) => [`rooms/${room.room_ref}`, room.room_handle]));
|
|
225
|
+
return this.holding([...new Set([...this.copies.keys(), ...synced.keys()])].sort(), async () => {
|
|
226
226
|
const said = [];
|
|
227
227
|
let refused = false;
|
|
228
228
|
for (const copy of this.copies.values()) {
|
|
229
|
-
if (
|
|
229
|
+
if (synced.has(copy.key) || !copy.active)
|
|
230
230
|
continue;
|
|
231
231
|
await this.save({ ...copy, active: false });
|
|
232
232
|
said.push(`${rootOf(copy.room_handle)}: no longer synced to this Environment; its files stay`);
|
|
233
233
|
}
|
|
234
234
|
const current = [];
|
|
235
|
-
for (const [key, handle] of
|
|
235
|
+
for (const [key, handle] of synced) {
|
|
236
236
|
try {
|
|
237
237
|
const held = this.copies.get(key);
|
|
238
238
|
if (held === undefined || !(await exists(held.repository))) {
|
|
@@ -623,7 +623,7 @@ export class LocalCopies {
|
|
|
623
623
|
const { upload, ...unstaged } = copy.push;
|
|
624
624
|
return this.settle(await this.save({ ...copy, push: unstaged }), caller, true);
|
|
625
625
|
}
|
|
626
|
-
if (outcome.refused.code === '
|
|
626
|
+
if (outcome.refused.code === 'expired')
|
|
627
627
|
return this.recovered(copy);
|
|
628
628
|
const rebased = rebaseFixes(outcome.refused);
|
|
629
629
|
let settled = await this.save(without(copy));
|
package/dist/end.js
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
|
+
import { forgetRejected } from './home.js';
|
|
2
|
+
import { installCommand } from './placement.js';
|
|
1
3
|
import { killDescendants } from './scope.js';
|
|
2
4
|
export const REPLACED = 'another Kit started for this Environment';
|
|
3
|
-
|
|
4
|
-
export function end(reason) {
|
|
5
|
+
function exit(reason, status) {
|
|
5
6
|
process.stderr.write(`kit: ${reason}\n`);
|
|
6
7
|
killDescendants();
|
|
7
|
-
process.exit(
|
|
8
|
+
process.exit(status);
|
|
9
|
+
}
|
|
10
|
+
export function end(reason) {
|
|
11
|
+
exit(reason, 0);
|
|
12
|
+
}
|
|
13
|
+
export function restart(reason) {
|
|
14
|
+
exit(reason, 1);
|
|
15
|
+
}
|
|
16
|
+
export function updateRequired(house) {
|
|
17
|
+
end(`This Kit is too old for House. Update it: ${installCommand(house)}`);
|
|
18
|
+
}
|
|
19
|
+
export async function signInAgain(rejected) {
|
|
20
|
+
await forgetRejected(rejected);
|
|
21
|
+
restart('sign in again');
|
|
8
22
|
}
|
package/dist/enrol-main.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { writeEnrolment } from './home.js';
|
|
3
3
|
const [house, environment] = process.argv.slice(2);
|
|
4
|
-
|
|
4
|
+
const relay = process.env.HOUSE_KIT_RELAY || undefined;
|
|
5
|
+
await writeEnrolment({
|
|
6
|
+
house: house,
|
|
7
|
+
...(relay === undefined ? {} : { relay }),
|
|
8
|
+
environment: environment,
|
|
9
|
+
credential: readFileSync(0, 'utf8').trim(),
|
|
10
|
+
});
|
package/dist/home.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { existsSync } from 'node:fs';
|
|
1
|
+
import { existsSync, linkSync, readFileSync, renameSync, rmSync } from 'node:fs';
|
|
2
2
|
import { mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
|
+
import { selectRelay } from './relay.js';
|
|
5
6
|
const ENROLMENT = 'credential.json';
|
|
6
7
|
const DISCONNECTED = 'disconnected.json';
|
|
7
8
|
const CONFIGURATION = 'kit.json';
|
|
8
9
|
const OWN_AGENT = 'own-agent.json';
|
|
10
|
+
const RESTART = 'restart';
|
|
9
11
|
export function kitHome() {
|
|
10
12
|
return process.env.HOUSE_KIT_HOME ?? join(homedir(), '.house-kit');
|
|
11
13
|
}
|
|
@@ -32,8 +34,11 @@ export async function writeHome(name, value) {
|
|
|
32
34
|
await writeFile(temporary, `${JSON.stringify(value)}\n`, { mode: 0o600 });
|
|
33
35
|
await rename(temporary, join(home, name));
|
|
34
36
|
}
|
|
35
|
-
export function readEnrolment() {
|
|
36
|
-
|
|
37
|
+
export async function readEnrolment() {
|
|
38
|
+
const enrolment = await readHome(ENROLMENT);
|
|
39
|
+
if (enrolment !== null)
|
|
40
|
+
selectRelay(process.env.HOUSE_KIT_RELAY || enrolment.relay);
|
|
41
|
+
return enrolment;
|
|
37
42
|
}
|
|
38
43
|
export async function writeEnrolment(enrolment) {
|
|
39
44
|
await writeHome(ENROLMENT, enrolment);
|
|
@@ -46,9 +51,42 @@ export async function forgetEnrolment({ house, environment }) {
|
|
|
46
51
|
await writeHome(DISCONNECTED, { house, environment });
|
|
47
52
|
await rm(join(kitHome(), ENROLMENT), { force: true });
|
|
48
53
|
}
|
|
54
|
+
export async function forgetRejected(rejected) {
|
|
55
|
+
const held = await readHome(ENROLMENT);
|
|
56
|
+
if (held?.credential !== rejected)
|
|
57
|
+
return;
|
|
58
|
+
await writeHome(DISCONNECTED, { house: held.house, environment: held.environment });
|
|
59
|
+
const enrolment = join(kitHome(), ENROLMENT);
|
|
60
|
+
const taken = `${enrolment}.${process.pid}`;
|
|
61
|
+
try {
|
|
62
|
+
renameSync(enrolment, taken);
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
if (error.code === 'ENOENT')
|
|
66
|
+
return;
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
if (JSON.parse(readFileSync(taken, 'utf8')).credential !== rejected) {
|
|
70
|
+
try {
|
|
71
|
+
linkSync(taken, enrolment);
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
if (error.code !== 'EEXIST')
|
|
75
|
+
throw error;
|
|
76
|
+
}
|
|
77
|
+
rmSync(join(kitHome(), DISCONNECTED), { force: true });
|
|
78
|
+
}
|
|
79
|
+
rmSync(taken);
|
|
80
|
+
}
|
|
49
81
|
export function enrolled() {
|
|
50
82
|
return existsSync(join(kitHome(), ENROLMENT));
|
|
51
83
|
}
|
|
84
|
+
export function restartAsked() {
|
|
85
|
+
return existsSync(join(kitHome(), RESTART));
|
|
86
|
+
}
|
|
87
|
+
export function forgetRestart() {
|
|
88
|
+
return rm(join(kitHome(), RESTART), { force: true });
|
|
89
|
+
}
|
|
52
90
|
export function readOwnAgent() {
|
|
53
91
|
return readHome(OWN_AGENT);
|
|
54
92
|
}
|
package/dist/house-main.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { createHash } from 'node:crypto';
|
|
3
3
|
import { readFile } from 'node:fs/promises';
|
|
4
4
|
import { request, setGlobalProxyFromEnv } from 'node:http';
|
|
5
|
-
import {
|
|
5
|
+
import { extname, join } from 'node:path';
|
|
6
6
|
import { HOUSE_REF } from './git.js';
|
|
7
|
-
import { kitHome, readOwnAgent } from './home.js';
|
|
7
|
+
import { kitHome, readEnrolment, readOwnAgent } from './home.js';
|
|
8
8
|
import { callHouse, rpc, UNREACHABLE } from './mcp.js';
|
|
9
9
|
import { refusalOf } from './refusals.js';
|
|
10
10
|
import { relayed } from './relay.js';
|
|
11
|
-
import { parse } from 'yaml';
|
|
11
|
+
import { parse, stringify } from 'yaml';
|
|
12
12
|
const USAGE = "usage: house <tool> ['<arguments as JSON>']";
|
|
13
13
|
const PUSH_USAGE = 'usage: house push [commit] [--owner]';
|
|
14
14
|
const PUSH = "push [commit]: sends the Local copy's committed changes to House";
|
|
@@ -21,6 +21,33 @@ const REVOKED = 'this conversation no longer has House access; nothing to do fro
|
|
|
21
21
|
const UNCONNECTED = "this computer's own agent has no House connection; run kit login";
|
|
22
22
|
const DISCONNECTED = "House no longer accepts this computer's own agent; run kit login";
|
|
23
23
|
const socketPath = process.env.HOUSE_BRIDGE;
|
|
24
|
+
const MEDIA_TYPES = new Map([
|
|
25
|
+
['avif', 'image/avif'],
|
|
26
|
+
['csv', 'text/csv'],
|
|
27
|
+
['docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'],
|
|
28
|
+
['gif', 'image/gif'],
|
|
29
|
+
['heic', 'image/heic'],
|
|
30
|
+
['html', 'text/html'],
|
|
31
|
+
['jpeg', 'image/jpeg'],
|
|
32
|
+
['jpg', 'image/jpeg'],
|
|
33
|
+
['json', 'application/json'],
|
|
34
|
+
['m4a', 'audio/mp4'],
|
|
35
|
+
['md', 'text/markdown'],
|
|
36
|
+
['mov', 'video/quicktime'],
|
|
37
|
+
['mp3', 'audio/mpeg'],
|
|
38
|
+
['mp4', 'video/mp4'],
|
|
39
|
+
['ogg', 'audio/ogg'],
|
|
40
|
+
['pdf', 'application/pdf'],
|
|
41
|
+
['png', 'image/png'],
|
|
42
|
+
['pptx', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'],
|
|
43
|
+
['svg', 'image/svg+xml'],
|
|
44
|
+
['txt', 'text/plain'],
|
|
45
|
+
['wav', 'audio/wav'],
|
|
46
|
+
['webm', 'video/webm'],
|
|
47
|
+
['webp', 'image/webp'],
|
|
48
|
+
['xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
|
|
49
|
+
['zip', 'application/zip'],
|
|
50
|
+
]);
|
|
24
51
|
function refused(path, status, text) {
|
|
25
52
|
const refusal = refusalOf(text);
|
|
26
53
|
if (refusal !== null)
|
|
@@ -56,6 +83,7 @@ async function direct(message) {
|
|
|
56
83
|
const ownAgent = await readOwnAgent();
|
|
57
84
|
if (ownAgent === null)
|
|
58
85
|
throw new Error(UNCONNECTED);
|
|
86
|
+
await readEnrolment();
|
|
59
87
|
setGlobalProxyFromEnv();
|
|
60
88
|
const answer = await callHouse(ownAgent.house, ownAgent.credential, message).catch(() => {
|
|
61
89
|
throw new Error(UNREACHABLE);
|
|
@@ -97,28 +125,43 @@ async function sent(url, bytes, operation) {
|
|
|
97
125
|
return text;
|
|
98
126
|
throw new Error(refused(url, answer.status, text));
|
|
99
127
|
}
|
|
100
|
-
async function upload(
|
|
101
|
-
if (typeof
|
|
102
|
-
throw new Error(
|
|
103
|
-
const bytes = await localFile(
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
128
|
+
async function upload({ file, ...destination }) {
|
|
129
|
+
if (typeof file !== 'string' || file === '')
|
|
130
|
+
throw new Error('upload needs "file", a local file');
|
|
131
|
+
const bytes = await localFile(file);
|
|
132
|
+
const mediaType = MEDIA_TYPES.get(extname(file).slice(1).toLowerCase());
|
|
133
|
+
const answer = await called('upload', {
|
|
134
|
+
...destination,
|
|
107
135
|
bytes: bytes.length,
|
|
108
136
|
sha256: createHash('sha256').update(bytes).digest('hex'),
|
|
109
|
-
|
|
137
|
+
...(mediaType === undefined ? {} : { media_type: mediaType }),
|
|
138
|
+
});
|
|
139
|
+
const declared = parse(answer);
|
|
110
140
|
if (declared.upload === undefined)
|
|
111
|
-
return
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
141
|
+
return answer;
|
|
142
|
+
const written = JSON.parse(await sent(declared.upload.url, bytes, declared.upload.operation));
|
|
143
|
+
return stringify(written, { lineWidth: 0 }).trimEnd();
|
|
144
|
+
}
|
|
145
|
+
function unexpected(argument, usage) {
|
|
146
|
+
return new Error(`unexpected argument ${argument}; ${usage}`);
|
|
147
|
+
}
|
|
148
|
+
function accepted(args, flags, positionals, usage) {
|
|
149
|
+
const given = { flags: new Set(), positionals: [] };
|
|
150
|
+
for (const arg of args) {
|
|
151
|
+
if (flags.includes(arg))
|
|
152
|
+
given.flags.add(arg);
|
|
153
|
+
else if (!arg.startsWith('-') && given.positionals.length < positionals)
|
|
154
|
+
given.positionals.push(arg);
|
|
155
|
+
else
|
|
156
|
+
throw unexpected(arg, usage);
|
|
157
|
+
}
|
|
158
|
+
return given;
|
|
116
159
|
}
|
|
117
160
|
async function push(args) {
|
|
118
|
-
|
|
161
|
+
const { flags, positionals: [commit = 'HEAD'] } = accepted(args, ['--help', '--owner'], 1, PUSH_USAGE);
|
|
162
|
+
if (flags.has('--help'))
|
|
119
163
|
return PUSH_USAGE;
|
|
120
|
-
const owner =
|
|
121
|
-
const commit = args.find((arg) => arg !== '--owner') ?? 'HEAD';
|
|
164
|
+
const owner = flags.has('--owner');
|
|
122
165
|
if (owner && socketPath !== undefined)
|
|
123
166
|
throw new Error('--owner is not for Agent conversations; run house push without it');
|
|
124
167
|
if (!owner && socketPath === undefined)
|
|
@@ -129,7 +172,7 @@ async function push(args) {
|
|
|
129
172
|
return pushed.text;
|
|
130
173
|
}
|
|
131
174
|
async function fetched(args) {
|
|
132
|
-
if (args.
|
|
175
|
+
if (accepted(args, ['--help'], 0, FETCH_USAGE).flags.has('--help'))
|
|
133
176
|
return FETCH_USAGE;
|
|
134
177
|
const answer = JSON.parse(await bridged('/git/fetch', {}, undefined, socketPath ?? join(kitHome(), 'owner.sock')));
|
|
135
178
|
if (answer.refused)
|
|
@@ -150,28 +193,23 @@ function argumentsOf(argument) {
|
|
|
150
193
|
throw new Error(ARGUMENTS);
|
|
151
194
|
return parsed;
|
|
152
195
|
}
|
|
153
|
-
async function house(
|
|
154
|
-
|
|
196
|
+
async function house(args) {
|
|
197
|
+
const { flags, positionals: [verb, argument] } = accepted(args, ['--help'], 2, USAGE);
|
|
198
|
+
if (verb === 'help' && argument !== undefined)
|
|
199
|
+
throw unexpected(argument, USAGE);
|
|
200
|
+
if (flags.has('--help') && argument !== undefined)
|
|
201
|
+
throw unexpected('--help', USAGE);
|
|
202
|
+
if (verb === undefined || verb === 'help') {
|
|
155
203
|
return [USAGE, 'help', PUSH, FETCH, ...(await tools()).map((tool) => (tool.description === undefined ? tool.name : `${tool.name}: ${tool.description}`))].join('\n');
|
|
156
204
|
}
|
|
157
|
-
if (
|
|
205
|
+
if (flags.has('--help')) {
|
|
158
206
|
const tool = (await tools()).find((listed) => listed.name === verb);
|
|
159
207
|
if (tool === undefined)
|
|
160
208
|
throw new Error(`${verb} is no Tool; house find_command '{"query":"${verb}"}' finds Commands`);
|
|
161
209
|
return [...(tool.description === undefined ? [] : [tool.description]), JSON.stringify(tool.inputSchema)].join('\n');
|
|
162
210
|
}
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
return JSON.stringify({ attachment: await upload(args.path, args.room_ref, 'upload needs "path", a local file') });
|
|
166
|
-
}
|
|
167
|
-
if (verb === 'append_record' && Array.isArray(args.attachments)) {
|
|
168
|
-
const attachments = [];
|
|
169
|
-
for (const path of args.attachments) {
|
|
170
|
-
attachments.push(await upload(path, args.room_ref, 'each attachments entry is the path of a local file'));
|
|
171
|
-
}
|
|
172
|
-
args.attachments = attachments;
|
|
173
|
-
}
|
|
174
|
-
return called(verb, args);
|
|
211
|
+
const parsed = argumentsOf(argument);
|
|
212
|
+
return verb === 'upload' ? upload(parsed) : called(verb, parsed);
|
|
175
213
|
}
|
|
176
214
|
async function called(name, args) {
|
|
177
215
|
const result = await mcp('tools/call', { name, arguments: args });
|
|
@@ -181,7 +219,9 @@ async function called(name, args) {
|
|
|
181
219
|
return text;
|
|
182
220
|
}
|
|
183
221
|
const argv = process.argv.slice(2);
|
|
184
|
-
|
|
222
|
+
const named = argv.findIndex((arg) => !arg.startsWith('-'));
|
|
223
|
+
const rest = argv.filter((_arg, index) => index !== named);
|
|
224
|
+
(argv[named] === 'push' ? push(rest) : argv[named] === 'fetch' ? fetched(rest) : house(argv)).then((text) => {
|
|
185
225
|
process.stdout.write(`${text}\n`);
|
|
186
226
|
if (argv[0] === 'shell')
|
|
187
227
|
process.exitCode = Number(/^exit: (\d+)(?:\n|$)/.exec(text)?.[1] ?? 0);
|
package/dist/instructions.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { HOUSE_REF } from './git.js';
|
|
2
2
|
import { HOW_WE_WORK } from './skills.js';
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
3
|
+
const SOURCE_LINE = "From House:";
|
|
4
|
+
const HOUSE_LINE = "Work with House through the `house` CLI: run `house --help`, and `house find_command` for House's guides and formats.";
|
|
5
|
+
const FILE_LINE = 'To give the User a file, upload it with `house upload` and link it; for an App, a Site or a website, follow `house find_command \'{"query":"app"}\'`. Never start a server.';
|
|
6
|
+
const READ_LINE = "Optional per-Room instructions: `/rooms/private/rooms/<handle>/AGENTS.md`.";
|
|
6
7
|
const COPIES_LINE = `House Local copies; before work run \`house fetch\` and rebase onto \`${HOUSE_REF}\`; after it commit, then \`house push\`:`;
|
|
7
8
|
const UNREADABLE = /^(?:\S+: )?(?:path_not_found|room_not_found|operation_denied)\b/;
|
|
8
9
|
const FAILED = /^exit: [1-9]\d*$/;
|
|
@@ -30,6 +31,6 @@ async function howWeWork(bridge) {
|
|
|
30
31
|
return document.replace(/\n$/, '');
|
|
31
32
|
}
|
|
32
33
|
export async function instructions(bridge, base, copies) {
|
|
33
|
-
const lines = [HOUSE_LINE, FILE_LINE, READ_LINE, ...(copies.length === 0 ? [] : [COPIES_LINE, ...copies])];
|
|
34
|
+
const lines = [SOURCE_LINE, HOUSE_LINE, FILE_LINE, READ_LINE, ...(copies.length === 0 ? [] : [COPIES_LINE, ...copies])];
|
|
34
35
|
return [lines.join('\n'), base, await howWeWork(bridge)].filter((part) => part !== '').join('\n\n');
|
|
35
36
|
}
|
package/dist/kit-main.js
CHANGED
|
@@ -1,22 +1,64 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { setGlobalProxyFromEnv } from 'node:http';
|
|
3
|
+
import { parseArgs } from 'node:util';
|
|
3
4
|
import { answerGitCredential } from './app-git.js';
|
|
4
5
|
import { login } from './login.js';
|
|
5
6
|
import { logout } from './logout.js';
|
|
6
7
|
import { resident } from './resident.js';
|
|
8
|
+
const USAGE = 'usage: kit <login|logout|resident>\n';
|
|
9
|
+
const COMMANDS = new Map([
|
|
10
|
+
[
|
|
11
|
+
'logout',
|
|
12
|
+
{
|
|
13
|
+
usage: 'usage: kit logout',
|
|
14
|
+
about: "disconnects this computer, stops House Kit and ends your own agent's connection",
|
|
15
|
+
operands: 0,
|
|
16
|
+
run: logout,
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
[
|
|
20
|
+
'resident',
|
|
21
|
+
{
|
|
22
|
+
usage: 'usage: kit resident',
|
|
23
|
+
about: "keeps this Environment connected; House Kit's service runs it",
|
|
24
|
+
operands: 0,
|
|
25
|
+
run: resident,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
'git-credential',
|
|
30
|
+
{
|
|
31
|
+
usage: 'usage: kit git-credential <get|store|erase>',
|
|
32
|
+
about: "answers git with your own agent's House credential; git runs it",
|
|
33
|
+
operands: 1,
|
|
34
|
+
run: ([operation]) => answerGitCredential(operation),
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
]);
|
|
7
38
|
const [command, ...argv] = process.argv.slice(2);
|
|
8
39
|
setGlobalProxyFromEnv();
|
|
9
40
|
async function run() {
|
|
10
41
|
if (command === 'login')
|
|
11
42
|
return login(argv);
|
|
12
|
-
if (command === '
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
43
|
+
if (command === '--help') {
|
|
44
|
+
parseArgs({ args: argv });
|
|
45
|
+
process.stdout.write(USAGE);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const chosen = COMMANDS.get(command ?? '');
|
|
49
|
+
if (chosen === undefined) {
|
|
50
|
+
process.stderr.write(USAGE);
|
|
51
|
+
process.exitCode = 2;
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const { values, positionals } = parseArgs({ args: argv, options: { help: { type: 'boolean', default: false } }, allowPositionals: true });
|
|
55
|
+
if (positionals.length > chosen.operands)
|
|
56
|
+
throw new Error(`unexpected argument ${positionals[chosen.operands]}; ${chosen.usage}`);
|
|
57
|
+
if (values.help) {
|
|
58
|
+
process.stdout.write(`${chosen.usage}\n ${chosen.about}\n`);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
return chosen.run(positionals);
|
|
20
62
|
}
|
|
21
63
|
run().catch((error) => {
|
|
22
64
|
process.stderr.write(`kit: ${error instanceof Error ? error.message : String(error)}\n`);
|
package/dist/login.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { createHash, randomBytes } from 'node:crypto';
|
|
3
3
|
import { hostname } from 'node:os';
|
|
4
|
+
import { delimiter, dirname } from 'node:path';
|
|
4
5
|
import { parseArgs } from 'node:util';
|
|
5
6
|
import { post, retrying } from './api.js';
|
|
6
7
|
import { placeAppGit } from './app-git.js';
|
|
8
|
+
import { allowHouseInCodex, loginPath } from './clis.js';
|
|
7
9
|
import { forgetOwnAgent, readDisconnected, readEnrolment, readOwnAgent, writeEnrolment, writeOwnAgent } from './home.js';
|
|
8
10
|
import { callHouse, rpc } from './mcp.js';
|
|
11
|
+
import { selectRelay } from './relay.js';
|
|
12
|
+
import { startService } from './service.js';
|
|
13
|
+
import { placeSkillSet } from './skills.js';
|
|
9
14
|
const DEFAULT_HOUSE = 'https://agents.house';
|
|
10
15
|
const OPENER = process.platform === 'darwin' ? 'open' : 'xdg-open';
|
|
11
16
|
// Polling every two seconds brings the User's confirmation to the waiting Kit moments after they give it.
|
|
@@ -23,39 +28,107 @@ async function accepted(house, credential) {
|
|
|
23
28
|
return false;
|
|
24
29
|
throw new Error(`House answered ${checked.status} when Kit checked this computer's own agent's connection: ${checked.text}`);
|
|
25
30
|
}
|
|
31
|
+
const USAGE = `usage: kit login [--house <origin>] [--environment <id>] [--rooms <ref>[,<ref>...] | --no-private]
|
|
32
|
+
kit login [--house <origin>] --code <code>
|
|
33
|
+
--house <origin> the House to connect to, ${DEFAULT_HOUSE} unless one is stored
|
|
34
|
+
--environment <id> reconnect this Environment
|
|
35
|
+
--rooms <ref>[,<ref>...] give this Environment only these Rooms
|
|
36
|
+
--no-private give this Environment every Room but your Private Room
|
|
37
|
+
--code <code> connect this machine with a login code
|
|
38
|
+
`;
|
|
39
|
+
function chosenRooms(rooms, noPrivate) {
|
|
40
|
+
if (rooms !== undefined && noPrivate)
|
|
41
|
+
throw new Error('--rooms and --no-private are two choices of Rooms; pass one');
|
|
42
|
+
if (rooms !== undefined)
|
|
43
|
+
return { rooms: { reach: 'selected', refs: rooms.split(',') } };
|
|
44
|
+
return noPrivate ? { rooms: { reach: 'all_but_private' } } : {};
|
|
45
|
+
}
|
|
26
46
|
export async function login(argv) {
|
|
27
47
|
const { values } = parseArgs({
|
|
28
48
|
args: argv,
|
|
29
49
|
options: {
|
|
30
50
|
house: { type: 'string' },
|
|
31
51
|
environment: { type: 'string' },
|
|
52
|
+
rooms: { type: 'string' },
|
|
53
|
+
'no-private': { type: 'boolean', default: false },
|
|
54
|
+
code: { type: 'string' },
|
|
55
|
+
help: { type: 'boolean', default: false },
|
|
32
56
|
},
|
|
33
57
|
});
|
|
58
|
+
if (values.help) {
|
|
59
|
+
process.stdout.write(USAGE);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (values.code !== undefined && values.rooms !== undefined)
|
|
63
|
+
throw new Error('--code cannot be used with --rooms');
|
|
64
|
+
if (values.code !== undefined && values['no-private'])
|
|
65
|
+
throw new Error('--code cannot be used with --no-private');
|
|
66
|
+
if (values.code !== undefined && values.environment !== undefined)
|
|
67
|
+
throw new Error('--code cannot be used with --environment');
|
|
68
|
+
const rooms = chosenRooms(values.rooms, values['no-private']);
|
|
34
69
|
const enrolled = (await readEnrolment()) ?? (await readDisconnected());
|
|
70
|
+
if (values.code !== undefined && enrolled !== null) {
|
|
71
|
+
throw new Error(`--code connects a new machine; this Kit home records Environment ${enrolled.environment}, so run kit login to reconnect it`);
|
|
72
|
+
}
|
|
73
|
+
const relay = process.env.HOUSE_KIT_RELAY || undefined;
|
|
74
|
+
selectRelay(relay);
|
|
35
75
|
const house = values.house ?? enrolled?.house ?? DEFAULT_HOUSE;
|
|
36
76
|
const replaces = process.env.HOUSE_KIT_REPLACES;
|
|
37
77
|
const environment = replaces === undefined ? (values.environment ?? (enrolled?.house === house ? enrolled.environment : undefined)) : undefined;
|
|
38
78
|
const ownAgent = await readOwnAgent();
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
79
|
+
let held = false;
|
|
80
|
+
let exchanged;
|
|
81
|
+
if (values.code !== undefined) {
|
|
82
|
+
exchanged = await post(house, '/kit/token', { code: values.code, label: hostname() });
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
held = ownAgent !== null && ownAgent.house === house && (await accepted(house, ownAgent.credential));
|
|
86
|
+
const verifier = randomBytes(32).toString('base64url');
|
|
87
|
+
const started = await retrying(() => post(house, '/kit', {
|
|
88
|
+
label: hostname(),
|
|
89
|
+
...(environment === undefined
|
|
90
|
+
? { act: 'new_environment', ...(replaces === undefined ? {} : { replaces }) }
|
|
91
|
+
: { act: 'existing_environment', environment_id: environment }),
|
|
92
|
+
...rooms,
|
|
93
|
+
code_challenge: createHash('sha256').update(verifier).digest('base64url'),
|
|
94
|
+
...(held ? {} : { headless: true }),
|
|
95
|
+
}));
|
|
96
|
+
process.stdout.write(`Open this link and confirm: ${started.start_url}\n`);
|
|
97
|
+
open(started.start_url);
|
|
98
|
+
exchanged = await retrying(() => post(house, '/kit/token', { login: started.login, code_verifier: verifier }), undefined, () => POLL_INTERVAL_MS);
|
|
99
|
+
}
|
|
100
|
+
try {
|
|
101
|
+
await placeSkillSet();
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
process.stderr.write(`kit: the skills could not be placed: ${error.message}\n`);
|
|
105
|
+
}
|
|
106
|
+
try {
|
|
107
|
+
const shell = await loginPath().catch(() => '');
|
|
108
|
+
await allowHouseInCodex([dirname(process.execPath), process.env.PATH ?? '', shell].join(delimiter));
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
process.stderr.write(`kit: Codex's rule for house could not be written: ${error.message}\n`);
|
|
112
|
+
}
|
|
113
|
+
await writeEnrolment({
|
|
114
|
+
house,
|
|
115
|
+
...(relay === undefined ? {} : { relay }),
|
|
116
|
+
environment: exchanged.environment,
|
|
117
|
+
credential: exchanged.credential,
|
|
118
|
+
});
|
|
52
119
|
process.stdout.write(`Environment ${exchanged.environment} is connected to ${house}.\n`);
|
|
53
120
|
if (exchanged.headless_credential !== undefined) {
|
|
54
121
|
await writeOwnAgent({ house, user: exchanged.user, credential: exchanged.headless_credential });
|
|
55
122
|
}
|
|
56
|
-
else if (held && ownAgent.user !== exchanged.user) {
|
|
123
|
+
else if (held && ownAgent !== null && ownAgent.user !== exchanged.user) {
|
|
57
124
|
await forgetOwnAgent();
|
|
58
125
|
process.stdout.write("This computer's own agent was another User's; run kit login again to connect it to you.\n");
|
|
59
126
|
}
|
|
60
127
|
await placeAppGit(ownAgent, await readOwnAgent());
|
|
128
|
+
try {
|
|
129
|
+
startService();
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
process.stderr.write(`kit: ${error.message}\n`);
|
|
133
|
+
}
|
|
61
134
|
}
|
package/dist/parts.js
CHANGED
|
@@ -2,7 +2,10 @@ export class Parts {
|
|
|
2
2
|
parts = [];
|
|
3
3
|
context = null;
|
|
4
4
|
emit;
|
|
5
|
+
made = [];
|
|
6
|
+
events = 0;
|
|
5
7
|
writing = null;
|
|
8
|
+
counting = null;
|
|
6
9
|
planned = null;
|
|
7
10
|
constructor(emit) {
|
|
8
11
|
this.emit = emit;
|
|
@@ -10,32 +13,34 @@ export class Parts {
|
|
|
10
13
|
write(type, id, text) {
|
|
11
14
|
if (text === '')
|
|
12
15
|
return;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
part.text += text;
|
|
17
|
-
this.emit({ op: 'append', index: last, text });
|
|
16
|
+
if (this.writing?.type === type && this.writing.id === id) {
|
|
17
|
+
this.parts[this.writing.index].text += text;
|
|
18
|
+
this.emit({ op: 'append', index: this.writing.index, text });
|
|
18
19
|
return;
|
|
19
20
|
}
|
|
20
|
-
this.start({ type, text });
|
|
21
|
-
this.writing = { type, id };
|
|
21
|
+
this.writing = { type, id, index: this.start({ type, text }) };
|
|
22
22
|
}
|
|
23
23
|
command() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (part?.type !== 'commands') {
|
|
27
|
-
this.start({ type: 'commands', count: 1 });
|
|
24
|
+
if (this.counting === null) {
|
|
25
|
+
this.counting = this.start({ type: 'commands', count: 1 });
|
|
28
26
|
return;
|
|
29
27
|
}
|
|
28
|
+
const part = this.parts[this.counting];
|
|
30
29
|
part.count++;
|
|
31
|
-
this.emit({ op: 'count', index:
|
|
30
|
+
this.emit({ op: 'count', index: this.counting, count: part.count });
|
|
32
31
|
}
|
|
33
32
|
start(part) {
|
|
34
33
|
this.writing = null;
|
|
35
|
-
this.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
this.counting = null;
|
|
35
|
+
return this.add(part, ++this.events);
|
|
36
|
+
}
|
|
37
|
+
reserve() {
|
|
38
|
+
this.writing = null;
|
|
39
|
+
this.counting = null;
|
|
40
|
+
return ++this.events;
|
|
41
|
+
}
|
|
42
|
+
arrive(part, reserved) {
|
|
43
|
+
this.add(part, reserved);
|
|
39
44
|
}
|
|
40
45
|
done(index, result) {
|
|
41
46
|
const part = this.parts[index];
|
|
@@ -55,10 +60,23 @@ export class Parts {
|
|
|
55
60
|
this.context = context;
|
|
56
61
|
this.emit({ op: 'context', ...context });
|
|
57
62
|
}
|
|
63
|
+
saved() {
|
|
64
|
+
return this.parts
|
|
65
|
+
.map((part, index) => ({ part, made: this.made[index] }))
|
|
66
|
+
.sort((a, b) => a.made - b.made)
|
|
67
|
+
.map(({ part }) => part);
|
|
68
|
+
}
|
|
58
69
|
operations() {
|
|
59
70
|
return [
|
|
60
71
|
...this.parts.map((part, index) => ({ op: 'start', index, part })),
|
|
61
72
|
...(this.context === null ? [] : [{ op: 'context', ...this.context }]),
|
|
62
73
|
];
|
|
63
74
|
}
|
|
75
|
+
add(part, made) {
|
|
76
|
+
this.parts.push(part);
|
|
77
|
+
this.made.push(made);
|
|
78
|
+
const index = this.parts.length - 1;
|
|
79
|
+
this.emit({ op: 'start', index, part });
|
|
80
|
+
return index;
|
|
81
|
+
}
|
|
64
82
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { run } from './clis.js';
|
|
4
|
+
import { kitHome } from './home.js';
|
|
5
|
+
import { relayOrigin } from './relay.js';
|
|
6
|
+
export function service() {
|
|
7
|
+
if (process.platform !== 'linux' || !process.env.INVOCATION_ID)
|
|
8
|
+
return null;
|
|
9
|
+
return process.env.MANAGERPID ? 'user' : 'system';
|
|
10
|
+
}
|
|
11
|
+
export function throughSudo() {
|
|
12
|
+
return service() === 'system' && process.getuid() !== 0;
|
|
13
|
+
}
|
|
14
|
+
export async function updatesItself() {
|
|
15
|
+
if (service() === null)
|
|
16
|
+
return false;
|
|
17
|
+
if (!throughSudo())
|
|
18
|
+
return true;
|
|
19
|
+
// sudo answers at once, so ten seconds only bounds a stuck sudo.
|
|
20
|
+
return (await run('sudo', ['-n', 'true'], 10_000)).status === 0;
|
|
21
|
+
}
|
|
22
|
+
function installed() {
|
|
23
|
+
try {
|
|
24
|
+
return readFileSync(join(kitHome(), 'placement'), 'utf8').trim();
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
if (error.code === 'ENOENT')
|
|
28
|
+
return null;
|
|
29
|
+
throw error;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function entries(house) {
|
|
33
|
+
const host = new URL(house).host;
|
|
34
|
+
const relay = relayOrigin();
|
|
35
|
+
if (relay === undefined)
|
|
36
|
+
return [`curl -fsSL ${host}/kit | sh`, `irm ${host}/kit.ps1 | iex`];
|
|
37
|
+
const entry = `${relay}/${host}/kit`;
|
|
38
|
+
return [`curl -fsSL ${entry} | HOUSE_KIT_RELAY=${relay} sh`, `$env:HOUSE_KIT_RELAY='${relay}'; irm ${entry}.ps1 | iex`];
|
|
39
|
+
}
|
|
40
|
+
export function installCommand(house) {
|
|
41
|
+
const [shell, windows] = entries(house);
|
|
42
|
+
const placement = installed();
|
|
43
|
+
if (placement === 'native')
|
|
44
|
+
return shell;
|
|
45
|
+
if (placement === 'server')
|
|
46
|
+
return `${shell} -s -- --linux`;
|
|
47
|
+
return `${shell} -s -- --container, or ${windows} on Windows`;
|
|
48
|
+
}
|
package/dist/relay.js
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
let selected;
|
|
2
|
+
export function selectRelay(relay) {
|
|
3
|
+
selected = relay === undefined || relay === '' ? null : relay;
|
|
4
|
+
}
|
|
5
|
+
export function relayOrigin() {
|
|
6
|
+
if (selected !== undefined)
|
|
7
|
+
return selected ?? undefined;
|
|
8
|
+
const ambient = process.env.HOUSE_KIT_RELAY;
|
|
9
|
+
return ambient === undefined || ambient === '' ? undefined : ambient;
|
|
10
|
+
}
|
|
1
11
|
export function relayed(target) {
|
|
2
12
|
const url = new URL(target);
|
|
3
|
-
const relay =
|
|
4
|
-
if (relay === undefined
|
|
13
|
+
const relay = relayOrigin();
|
|
14
|
+
if (relay === undefined)
|
|
5
15
|
return url;
|
|
6
16
|
const through = new URL(`${url.host}${url.pathname}${url.search}`, `${relay}/`);
|
|
7
17
|
if (url.protocol === 'wss:' || url.protocol === 'ws:')
|
package/dist/resident.js
CHANGED
|
@@ -7,9 +7,10 @@ import { fileURLToPath } from 'node:url';
|
|
|
7
7
|
import { Agents } from './agents.js';
|
|
8
8
|
import { house } from './api.js';
|
|
9
9
|
import { received } from './bridge.js';
|
|
10
|
-
import { Conversations } from './conversations.js';
|
|
10
|
+
import { CONVERSATION_INPUTS, Conversations } from './conversations.js';
|
|
11
11
|
import { LocalCopies } from './copies.js';
|
|
12
|
-
import {
|
|
12
|
+
import { restart } from './end.js';
|
|
13
|
+
import { agentBase, enrolled, forgetRestart, kitHome, restartAsked } from './home.js';
|
|
13
14
|
import { killDescendants } from './scope.js';
|
|
14
15
|
import { quoted } from './shell.js';
|
|
15
16
|
import { SignIns } from './sign-in.js';
|
|
@@ -73,6 +74,7 @@ function connected() {
|
|
|
73
74
|
}
|
|
74
75
|
export async function resident() {
|
|
75
76
|
await connected();
|
|
77
|
+
await forgetRestart();
|
|
76
78
|
watch(kitHome(), () => {
|
|
77
79
|
if (enrolled())
|
|
78
80
|
return;
|
|
@@ -95,6 +97,9 @@ export async function resident() {
|
|
|
95
97
|
if (!idle()) {
|
|
96
98
|
reported = false;
|
|
97
99
|
}
|
|
100
|
+
else if (restartAsked() && conversations.quiet()) {
|
|
101
|
+
restart('restarting for an updated CLI');
|
|
102
|
+
}
|
|
98
103
|
else if (!reported) {
|
|
99
104
|
reported = true;
|
|
100
105
|
logged(house.deliver('/kit/idle', {}, idle));
|
|
@@ -122,7 +127,7 @@ export async function resident() {
|
|
|
122
127
|
opened: () => {
|
|
123
128
|
conversations.opened();
|
|
124
129
|
changed();
|
|
125
|
-
logged(copies.
|
|
130
|
+
logged(copies.connected());
|
|
126
131
|
},
|
|
127
132
|
frame: (arrived) => {
|
|
128
133
|
if (arrived.type === 'watching')
|
|
@@ -135,8 +140,12 @@ export async function resident() {
|
|
|
135
140
|
signIns.start(arrived);
|
|
136
141
|
else if (arrived.kind === 'update')
|
|
137
142
|
updates.start(arrived);
|
|
138
|
-
else
|
|
143
|
+
else if (CONVERSATION_INPUTS.has(arrived.kind))
|
|
139
144
|
conversations.input(arrived);
|
|
145
|
+
else {
|
|
146
|
+
const refused = { refused: `This Kit does not know ${arrived.kind}; update the Kit` };
|
|
147
|
+
logged(house.deliver(`/kit/inputs/${arrived.input_id}/ack`, refused).finally(changed));
|
|
148
|
+
}
|
|
140
149
|
}
|
|
141
150
|
},
|
|
142
151
|
});
|
package/dist/service.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process';
|
|
2
|
+
const UNIT = 'house-kit.service';
|
|
3
|
+
// launchctl and systemctl answer at once, so ten seconds only bounds a stuck service manager.
|
|
4
|
+
const MANAGER_MS = 10_000;
|
|
5
|
+
function manage(command, args) {
|
|
6
|
+
return spawnSync(command, args, { encoding: 'utf8', timeout: MANAGER_MS });
|
|
7
|
+
}
|
|
8
|
+
function start(command, args) {
|
|
9
|
+
const started = manage(command, args);
|
|
10
|
+
if (started.status === 0)
|
|
11
|
+
return;
|
|
12
|
+
const cause = started.error?.message ?? (started.stderr.trim() || `${command} exited with ${started.status ?? 'a signal'}`);
|
|
13
|
+
throw new Error(`the House Kit service could not be started: ${cause}`);
|
|
14
|
+
}
|
|
15
|
+
export function startService() {
|
|
16
|
+
if (process.platform === 'darwin') {
|
|
17
|
+
const service = `gui/${process.getuid()}/house-kit`;
|
|
18
|
+
const printed = manage('launchctl', ['print', service]);
|
|
19
|
+
if (printed.status !== 0 || /^\tstate = running$/m.test(printed.stdout))
|
|
20
|
+
return false;
|
|
21
|
+
start('launchctl', ['kickstart', service]);
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
for (const scope of [['--user'], []]) {
|
|
25
|
+
if (manage('systemctl', [...scope, 'is-enabled', '--quiet', UNIT]).status !== 0)
|
|
26
|
+
continue;
|
|
27
|
+
if (manage('systemctl', [...scope, 'is-active', '--quiet', UNIT]).status === 0)
|
|
28
|
+
return false;
|
|
29
|
+
start('systemctl', [...scope, 'start', UNIT]);
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
}
|
package/dist/stream.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { subscribe } from 'node:diagnostics_channel';
|
|
2
2
|
import { finalRefusal, HouseRefusal, retryDelay } from './api.js';
|
|
3
|
-
import { end, REPLACED,
|
|
3
|
+
import { end, REPLACED, signInAgain, updateRequired } from './end.js';
|
|
4
4
|
import { readEnrolment } from './home.js';
|
|
5
5
|
import { relayed } from './relay.js';
|
|
6
|
+
import { KIT_WIRE, tooOld } from './wire.js';
|
|
6
7
|
const PATH = '/kit/stream';
|
|
7
|
-
const SUBPROTOCOL =
|
|
8
|
+
const SUBPROTOCOL = `house.kit.stream.${KIT_WIRE}`;
|
|
8
9
|
const REFUSAL_HEADER = 'x-house-refusal';
|
|
9
10
|
function streamUrl(house) {
|
|
10
11
|
const url = new URL(PATH, house);
|
|
@@ -52,8 +53,12 @@ export function holdStream(handlers) {
|
|
|
52
53
|
process.stderr.write(`kit: control stream closed ${event.code} ${event.reason}\n`);
|
|
53
54
|
if (event.reason === 'replaced')
|
|
54
55
|
end(REPLACED);
|
|
55
|
-
if (event.reason === 'credential_rejected' || refused?.status === 401)
|
|
56
|
-
|
|
56
|
+
if (event.reason === 'credential_rejected' || refused?.status === 401) {
|
|
57
|
+
void signInAgain(credential);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (refused !== null && tooOld(refused.text))
|
|
61
|
+
updateRequired(house);
|
|
57
62
|
if (finalRefusal(refused))
|
|
58
63
|
end(refused.message);
|
|
59
64
|
// A closed socket reopens in one to three seconds, spread so Kits one restart closed return apart; an opening House refused as retryable or left unanswered backs off on the jittered curve.
|
package/dist/update.js
CHANGED
|
@@ -4,8 +4,8 @@ import { mkdir, readFile, rm, writeFile } from 'node:fs/promises';
|
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
5
|
import { join } from 'node:path';
|
|
6
6
|
import { run } from './clis.js';
|
|
7
|
-
import { kitHome } from './home.js';
|
|
8
|
-
|
|
7
|
+
import { kitHome, workspaceRoot } from './home.js';
|
|
8
|
+
import { service, throughSudo } from './placement.js';
|
|
9
9
|
function logged(error) {
|
|
10
10
|
process.stderr.write(`kit: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
11
11
|
}
|
|
@@ -21,6 +21,21 @@ function outcome() {
|
|
|
21
21
|
function unit(inputId) {
|
|
22
22
|
return `house-kit-update-${inputId}`;
|
|
23
23
|
}
|
|
24
|
+
function manager() {
|
|
25
|
+
return service() === 'user' ? ['--user'] : [];
|
|
26
|
+
}
|
|
27
|
+
function elevated() {
|
|
28
|
+
return throughSudo() ? ['sudo', '-n'] : [];
|
|
29
|
+
}
|
|
30
|
+
function account() {
|
|
31
|
+
return throughSudo() ? [`--uid=${process.getuid()}`, `--gid=${process.getgid()}`] : [];
|
|
32
|
+
}
|
|
33
|
+
function placement() {
|
|
34
|
+
return service() === 'user' ? ['--workspace', workspaceRoot()] : ['--linux'];
|
|
35
|
+
}
|
|
36
|
+
function record() {
|
|
37
|
+
return `outcome=$1; shift; bash "$0" "$@"; printf %s "$?" > "$outcome"; ${[...elevated(), 'systemctl', ...manager(), 'start', 'house-kit.service'].join(' ')}`;
|
|
38
|
+
}
|
|
24
39
|
async function pendingInput() {
|
|
25
40
|
try {
|
|
26
41
|
return JSON.parse(await readFile(pending(), 'utf8')).input_id;
|
|
@@ -41,7 +56,7 @@ async function finished(inputId) {
|
|
|
41
56
|
if (ack !== null)
|
|
42
57
|
return ack;
|
|
43
58
|
// systemctl answers at once, so ten seconds only bounds a stuck service manager.
|
|
44
|
-
if ((await run('systemctl', ['is-active', '--quiet', unit(inputId)], 10_000)).status !== 0) {
|
|
59
|
+
if ((await run('systemctl', [...manager(), 'is-active', '--quiet', unit(inputId)], 10_000)).status !== 0) {
|
|
45
60
|
return (await recorded()) ?? { refused: 'the Kit bootstrap did not finish' };
|
|
46
61
|
}
|
|
47
62
|
// The bootstrap runs for minutes, so checking each second sees its outcome within a second at little cost.
|
|
@@ -50,7 +65,11 @@ async function finished(inputId) {
|
|
|
50
65
|
}
|
|
51
66
|
function rerun(script, inputId, flags) {
|
|
52
67
|
return new Promise((resolve) => {
|
|
53
|
-
const
|
|
68
|
+
const [command, ...args] = [
|
|
69
|
+
...elevated(),
|
|
70
|
+
'systemd-run',
|
|
71
|
+
...manager(),
|
|
72
|
+
...account(),
|
|
54
73
|
'--wait',
|
|
55
74
|
'--collect',
|
|
56
75
|
'--quiet',
|
|
@@ -58,11 +77,13 @@ function rerun(script, inputId, flags) {
|
|
|
58
77
|
`--setenv=HOME=${homedir()}`,
|
|
59
78
|
'/bin/sh',
|
|
60
79
|
'-c',
|
|
61
|
-
|
|
80
|
+
record(),
|
|
62
81
|
script,
|
|
63
82
|
outcome(),
|
|
83
|
+
...placement(),
|
|
64
84
|
...flags,
|
|
65
|
-
]
|
|
85
|
+
];
|
|
86
|
+
const child = spawn(command, args, { stdio: ['ignore', 'ignore', 'inherit'] });
|
|
66
87
|
child.on('error', () => resolve({ refused: 'no service manager runs this Kit' }));
|
|
67
88
|
child.on('close', () => resolve(null));
|
|
68
89
|
});
|
package/dist/wire.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/kit",
|
|
3
|
-
"version": "0.2.1-
|
|
3
|
+
"version": "0.2.1-c7252abc8a583",
|
|
4
4
|
"description": "House Kit connects an Environment to agents.house.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@agentclientprotocol/sdk": "1.7.0",
|
|
30
|
-
"@agentshouse/mdmodel": "0.1.0-
|
|
30
|
+
"@agentshouse/mdmodel": "0.1.0-c68e2039f1ca8",
|
|
31
31
|
"yaml": "2.9.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|