@agentshouse/kit 0.2.1-ca18b01951c3b → 0.2.1-cab5821cf0a77
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 +33 -33
- package/dist/acp.js +90 -19
- package/dist/agents.js +101 -45
- package/dist/api.js +5 -5
- package/dist/app-git.js +10 -26
- package/dist/authority-main.js +2 -2
- package/dist/bridge.js +4 -7
- package/dist/building.js +50 -0
- package/dist/calls.js +71 -0
- package/dist/chatgpt.js +4 -1
- package/dist/clis.js +43 -40
- package/dist/{stream.js → connection.js} +34 -52
- package/dist/conversations.js +516 -175
- package/dist/copies.js +77 -50
- package/dist/end.js +15 -4
- package/dist/events.js +33 -8
- package/dist/files.js +139 -37
- package/dist/git.js +5 -6
- package/dist/home.js +27 -20
- package/dist/house-cli.js +299 -0
- package/dist/house-main.js +7 -289
- package/dist/instructions.js +29 -8
- package/dist/kit-cli.js +68 -0
- package/dist/kit-main.js +8 -67
- package/dist/login.js +18 -9
- package/dist/logout.js +0 -2
- package/dist/mcp.js +6 -2
- package/dist/placement.js +19 -36
- package/dist/relay.js +21 -0
- package/dist/resident.js +97 -42
- package/dist/scope.js +15 -4
- package/dist/scripts.js +255 -0
- package/dist/service.js +23 -1
- package/dist/sign-in.js +22 -39
- package/dist/silence.js +28 -0
- package/dist/skills.js +42 -97
- package/dist/transcription.js +83 -43
- package/dist/translate.js +2 -8
- package/dist/update.js +113 -127
- package/dist/wire.js +37 -3
- package/dist/work.js +3 -5
- package/package.json +20 -21
- package/dist/bootstrap.json +0 -24
- package/dist/clis-main.js +0 -23
- package/how-we-work.md +0 -33
- package/skills/ask-matt/LICENSE +0 -21
- package/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/skills/ask-matt/SKILL.md +0 -97
- package/skills/ask-matt/agents/openai.yaml +0 -5
- package/skills/code-review/LICENSE +0 -21
- package/skills/code-review/SKILL.md +0 -89
- package/skills/code-review/agents/openai.yaml +0 -3
- package/skills/codebase-design/DEEPENING.md +0 -37
- package/skills/codebase-design/DESIGN-IT-TWICE.md +0 -44
- package/skills/codebase-design/LICENSE +0 -21
- package/skills/codebase-design/SKILL.md +0 -114
- package/skills/codebase-design/agents/openai.yaml +0 -3
- package/skills/diagnosing-bugs/LICENSE +0 -21
- package/skills/diagnosing-bugs/SKILL.md +0 -138
- package/skills/diagnosing-bugs/agents/openai.yaml +0 -3
- package/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -44
- package/skills/domain-modeling/ADR-FORMAT.md +0 -47
- package/skills/domain-modeling/GLOSSARY-FORMAT.md +0 -60
- package/skills/domain-modeling/LICENSE +0 -21
- package/skills/domain-modeling/SKILL.md +0 -74
- package/skills/domain-modeling/agents/openai.yaml +0 -3
- package/skills/grill-me/LICENSE +0 -21
- package/skills/grill-me/SKILL.md +0 -7
- package/skills/grill-me/agents/openai.yaml +0 -5
- package/skills/grill-with-docs/LICENSE +0 -21
- package/skills/grill-with-docs/SKILL.md +0 -7
- package/skills/grill-with-docs/agents/openai.yaml +0 -5
- package/skills/grilling/LICENSE +0 -21
- package/skills/grilling/SKILL.md +0 -30
- package/skills/grilling/agents/openai.yaml +0 -3
- package/skills/handoff/LICENSE +0 -21
- package/skills/handoff/SKILL.md +0 -16
- package/skills/handoff/agents/openai.yaml +0 -5
- package/skills/implement/LICENSE +0 -21
- package/skills/implement/SKILL.md +0 -17
- package/skills/implement/agents/openai.yaml +0 -5
- package/skills/implement-spec/LICENSE +0 -21
- package/skills/implement-spec/SKILL.md +0 -40
- package/skills/implement-spec/agents/openai.yaml +0 -5
- package/skills/improve-codebase-architecture/HTML-REPORT.md +0 -123
- package/skills/improve-codebase-architecture/LICENSE +0 -21
- package/skills/improve-codebase-architecture/SKILL.md +0 -71
- package/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
- package/skills/pr/CREDITS.md +0 -3
- package/skills/pr/LICENSE +0 -21
- package/skills/pr/SKILL.md +0 -170
- package/skills/pr/agents/openai.yaml +0 -3
- package/skills/prototype/LICENSE +0 -21
- package/skills/prototype/LOGIC.md +0 -67
- package/skills/prototype/SKILL.md +0 -26
- package/skills/prototype/UI.md +0 -112
- package/skills/prototype/agents/openai.yaml +0 -3
- package/skills/research/LICENSE +0 -21
- package/skills/research/SKILL.md +0 -12
- package/skills/research/agents/openai.yaml +0 -3
- package/skills/retro/LICENSE +0 -21
- package/skills/retro/SKILL.md +0 -44
- package/skills/retro/agents/openai.yaml +0 -5
- package/skills/tdd/LICENSE +0 -21
- package/skills/tdd/SKILL.md +0 -38
- package/skills/tdd/agents/openai.yaml +0 -3
- package/skills/tdd/mocking.md +0 -59
- package/skills/tdd/tests.md +0 -77
- package/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/skills/teach/LICENSE +0 -21
- package/skills/teach/MISSION-FORMAT.md +0 -31
- package/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/skills/teach/SKILL.md +0 -140
- package/skills/teach/agents/openai.yaml +0 -5
- package/skills/to-questionnaire/LICENSE +0 -21
- package/skills/to-questionnaire/SKILL.md +0 -54
- package/skills/to-questionnaire/agents/openai.yaml +0 -5
- package/skills/to-spec/LICENSE +0 -21
- package/skills/to-spec/SKILL.md +0 -75
- package/skills/to-spec/agents/openai.yaml +0 -5
- package/skills/to-tickets/LICENSE +0 -21
- package/skills/to-tickets/SKILL.md +0 -105
- package/skills/to-tickets/agents/openai.yaml +0 -5
- package/skills/triage/AGENT-BRIEF.md +0 -207
- package/skills/triage/LICENSE +0 -21
- package/skills/triage/OUT-OF-SCOPE.md +0 -105
- package/skills/triage/SKILL.md +0 -112
- package/skills/triage/agents/openai.yaml +0 -5
- package/skills/wait-what/LICENSE +0 -21
- package/skills/wait-what/SKILL.md +0 -7
- package/skills/wait-what/agents/openai.yaml +0 -5
- package/skills/wayfinder/LICENSE +0 -21
- package/skills/wayfinder/SKILL.md +0 -128
- package/skills/wayfinder/agents/openai.yaml +0 -5
- package/skills/wizard/LICENSE +0 -21
- package/skills/wizard/SKILL.md +0 -44
- package/skills/wizard/agents/openai.yaml +0 -3
- package/skills/wizard/template.sh +0 -223
- package/skills/writing-for-agents/LICENSE +0 -21
- package/skills/writing-for-agents/SKILL-MECHANICS.md +0 -22
- package/skills/writing-for-agents/SKILL.md +0 -81
- package/skills/writing-for-agents/agents/openai.yaml +0 -3
package/dist/update.js
CHANGED
|
@@ -1,141 +1,127 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
|
-
import {
|
|
3
|
-
import { mkdir, readFile, rm, writeFile } from 'node:fs/promises';
|
|
4
|
-
import { homedir } from 'node:os';
|
|
2
|
+
import { mkdir } from 'node:fs/promises';
|
|
5
3
|
import { join } from 'node:path';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
import { downloadServed, servedRelease } from './building.js';
|
|
5
|
+
import { KIT_RELEASE } from './clis.js';
|
|
6
|
+
import { restart, updateLine } from './end.js';
|
|
7
|
+
import { kitHome, readEnrolment } from './home.js';
|
|
8
|
+
import { placedPrefix } from './placement.js';
|
|
9
|
+
import { childEnvironment, relayOrigin } from './relay.js';
|
|
10
|
+
const INSTALLER_BYTES = 1_000_000;
|
|
11
|
+
// A release's Node.js, Kit package and adapters are about a hundred megabytes, so an hour carries them at thirty kilobytes a second, and a placement still running then has hung.
|
|
12
|
+
const PLACEMENT_MS = 60 * 60_000;
|
|
13
|
+
// A refused Kit is offline until its placement succeeds, so it tries again within five minutes of its Building or this computer recovering, while a placement that fails only after its hundred-megabyte download runs at most twelve times an hour.
|
|
14
|
+
export const PLACEMENT_RETRY_MS = 5 * 60_000;
|
|
15
|
+
const REFUSED = 'kit_bootstrap_refused: ';
|
|
16
|
+
const OUTPUT_CHARACTERS = 4000;
|
|
17
|
+
function causeOf(error) {
|
|
18
|
+
if (error instanceof TypeError && error.cause instanceof Error)
|
|
19
|
+
return `the Building did not answer: ${error.cause.message}`;
|
|
20
|
+
return error instanceof Error ? error.message : String(error);
|
|
11
21
|
}
|
|
12
|
-
function
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
22
|
+
function placing(installer, house, prefix, signal) {
|
|
23
|
+
return new Promise((resolve) => {
|
|
24
|
+
const relay = relayOrigin();
|
|
25
|
+
const child = spawn('bash', [installer, '--house', house, '--place', prefix], {
|
|
26
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
27
|
+
env: { ...childEnvironment(), ...(relay === undefined ? {} : { HOUSE_KIT_RELAY: relay }) },
|
|
28
|
+
detached: true,
|
|
29
|
+
});
|
|
30
|
+
const stop = () => {
|
|
31
|
+
try {
|
|
32
|
+
process.kill(-child.pid, 'SIGKILL');
|
|
33
|
+
}
|
|
34
|
+
catch { }
|
|
35
|
+
};
|
|
36
|
+
signal.addEventListener('abort', stop, { once: true });
|
|
37
|
+
if (signal.aborted)
|
|
38
|
+
stop();
|
|
39
|
+
let output = '';
|
|
40
|
+
for (const stream of [child.stdout, child.stderr]) {
|
|
41
|
+
stream.setEncoding('utf8').on('data', (chunk) => {
|
|
42
|
+
output = (output + chunk).slice(-OUTPUT_CHARACTERS);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const ended = (failure) => {
|
|
46
|
+
signal.removeEventListener('abort', stop);
|
|
47
|
+
resolve(failure);
|
|
48
|
+
};
|
|
49
|
+
child.on('error', (error) => ended(error.message));
|
|
50
|
+
child.on('close', (status) => {
|
|
51
|
+
if (status === 0)
|
|
52
|
+
return ended(null);
|
|
53
|
+
if (signal.aborted)
|
|
54
|
+
return ended(`the placement did not end within ${PLACEMENT_MS / 1000} seconds`);
|
|
55
|
+
const lines = output.split('\n').filter((line) => line.trim() !== '');
|
|
56
|
+
const refused = lines.findLast((line) => line.startsWith(REFUSED));
|
|
57
|
+
ended(refused?.slice(REFUSED.length) ?? lines.at(-1) ?? `the placement ended with status ${status ?? 'a signal'}`);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
38
60
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
61
|
+
export class KitUpdate {
|
|
62
|
+
calls;
|
|
63
|
+
queue = Promise.resolve();
|
|
64
|
+
placed = null;
|
|
65
|
+
constructor(calls) {
|
|
66
|
+
this.calls = calls;
|
|
42
67
|
}
|
|
43
|
-
|
|
44
|
-
|
|
68
|
+
take(call) {
|
|
69
|
+
void this.calls.carry(call.input_id, async () => ({ result: await this.queued(() => this.update(call.release)) }));
|
|
45
70
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
async function finished(inputId) {
|
|
54
|
-
for (;;) {
|
|
55
|
-
const ack = await recorded();
|
|
56
|
-
if (ack !== null)
|
|
57
|
-
return ack;
|
|
58
|
-
// systemctl answers at once, so ten seconds only bounds a stuck service manager.
|
|
59
|
-
if ((await run('systemctl', [...manager(), 'is-active', '--quiet', unit(inputId)], 10_000)).status !== 0) {
|
|
60
|
-
return (await recorded()) ?? { refused: 'the Kit bootstrap did not finish' };
|
|
71
|
+
async takeRefused(release) {
|
|
72
|
+
for (;;) {
|
|
73
|
+
const failure = await this.queued(async () => (this.placed === null ? this.place(release, 'served') : null));
|
|
74
|
+
if (failure === null)
|
|
75
|
+
restart(`Kit ${this.placed} is placed; its supervisor starts it`);
|
|
76
|
+
process.stderr.write(`kit: ${updateLine(`Kit ${KIT_RELEASE} stays offline and tries again in ${PLACEMENT_RETRY_MS / 60_000} minutes`)}\n`);
|
|
77
|
+
await new Promise((resolve) => setTimeout(resolve, PLACEMENT_RETRY_MS));
|
|
61
78
|
}
|
|
62
|
-
// The bootstrap runs for minutes, so checking each second sees its outcome within a second at little cost.
|
|
63
|
-
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
64
79
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return new Promise((resolve) => {
|
|
68
|
-
const [command, ...args] = [
|
|
69
|
-
...elevated(),
|
|
70
|
-
'systemd-run',
|
|
71
|
-
...manager(),
|
|
72
|
-
...account(),
|
|
73
|
-
'--wait',
|
|
74
|
-
'--collect',
|
|
75
|
-
'--quiet',
|
|
76
|
-
`--unit=${unit(inputId)}`,
|
|
77
|
-
`--setenv=HOME=${homedir()}`,
|
|
78
|
-
`--setenv=HOUSE_KIT_HOME=${kitHome()}`,
|
|
79
|
-
'/bin/sh',
|
|
80
|
-
'-c',
|
|
81
|
-
record(),
|
|
82
|
-
script,
|
|
83
|
-
outcome(),
|
|
84
|
-
...placement(),
|
|
85
|
-
...flags,
|
|
86
|
-
];
|
|
87
|
-
const child = spawn(command, args, { stdio: ['ignore', 'ignore', 'inherit'] });
|
|
88
|
-
child.on('error', () => resolve({ refused: 'no service manager runs this Kit' }));
|
|
89
|
-
child.on('close', () => resolve(null));
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
export class Updates {
|
|
93
|
-
house;
|
|
94
|
-
held = new Set();
|
|
95
|
-
queue = Promise.resolve();
|
|
96
|
-
constructor(house) {
|
|
97
|
-
this.house = house;
|
|
80
|
+
placedRelease() {
|
|
81
|
+
return this.placed;
|
|
98
82
|
}
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
await this.acknowledge(inputId, await finished(inputId));
|
|
83
|
+
queued(work) {
|
|
84
|
+
const taken = this.queue.then(work);
|
|
85
|
+
this.queue = taken.catch(() => undefined);
|
|
86
|
+
return taken;
|
|
104
87
|
}
|
|
105
|
-
|
|
106
|
-
if (this.
|
|
107
|
-
return;
|
|
108
|
-
this.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
88
|
+
async update(release) {
|
|
89
|
+
if (release === (this.placed ?? KIT_RELEASE))
|
|
90
|
+
return {};
|
|
91
|
+
if (this.placed !== null)
|
|
92
|
+
return { refused: `Kit ${this.placed} is placed and starts first, once no turn is open` };
|
|
93
|
+
const failure = await this.place(release, 'named');
|
|
94
|
+
if (failure !== null)
|
|
95
|
+
return { refused: failure };
|
|
96
|
+
process.stderr.write(`kit: Kit ${release} is placed; it starts once no turn is open\n`);
|
|
97
|
+
return {};
|
|
114
98
|
}
|
|
115
|
-
async
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
99
|
+
async place(release, which) {
|
|
100
|
+
const signal = AbortSignal.timeout(PLACEMENT_MS);
|
|
101
|
+
let version = release;
|
|
102
|
+
let failure;
|
|
103
|
+
try {
|
|
104
|
+
const prefix = placedPrefix();
|
|
105
|
+
const served = await servedRelease(signal);
|
|
106
|
+
if (which === 'named' && served.version !== release)
|
|
107
|
+
throw new Error(`the Building serves Kit ${served.version}, not Kit ${release}`);
|
|
108
|
+
version = served.version;
|
|
109
|
+
if (version === KIT_RELEASE)
|
|
110
|
+
throw new Error(`the Building serves Kit ${KIT_RELEASE}, which this Kit runs`);
|
|
111
|
+
await mkdir(join(kitHome(), 'update'), { recursive: true, mode: 0o700 });
|
|
112
|
+
const installer = join(kitHome(), 'update', served.installer);
|
|
113
|
+
await downloadServed(served.installer, served.sha256, installer, signal, INSTALLER_BYTES);
|
|
114
|
+
failure = await placing(installer, (await readEnrolment()).house, prefix, signal);
|
|
124
115
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
refused
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
await this.house.deliver(`/kit/inputs/${inputId}/ack`, ack);
|
|
136
|
-
if ((await pendingInput()) !== inputId)
|
|
137
|
-
return;
|
|
138
|
-
await rm(pending(), { force: true });
|
|
139
|
-
await rm(outcome(), { force: true });
|
|
116
|
+
catch (error) {
|
|
117
|
+
failure = signal.aborted ? `the placement did not end within ${PLACEMENT_MS / 1000} seconds` : causeOf(error);
|
|
118
|
+
}
|
|
119
|
+
if (failure !== null) {
|
|
120
|
+
const refused = `Kit ${version} could not be placed: ${failure}`;
|
|
121
|
+
process.stderr.write(`kit: ${refused}\n`);
|
|
122
|
+
return refused;
|
|
123
|
+
}
|
|
124
|
+
this.placed = version;
|
|
125
|
+
return null;
|
|
140
126
|
}
|
|
141
127
|
}
|
package/dist/wire.js
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
|
+
import { newerThanHouse, updateRequired } from './end.js';
|
|
2
|
+
import { machine } from './placement.js';
|
|
1
3
|
import { refusalOf } from './refusals.js';
|
|
2
|
-
export const KIT_WIRE =
|
|
4
|
+
export const KIT_WIRE = 4;
|
|
3
5
|
export const KIT_WIRE_HEADER = 'x-house-kit-wire';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
let take = null;
|
|
7
|
+
let taken = false;
|
|
8
|
+
function unservedBy(text) {
|
|
9
|
+
let body;
|
|
10
|
+
try {
|
|
11
|
+
body = JSON.parse(text);
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
const error = body?.error;
|
|
17
|
+
if (error?.code !== 'kit_update_required' && error?.code !== 'kit_newer_than_house')
|
|
18
|
+
return null;
|
|
19
|
+
return typeof error.release === 'string' ? error : null;
|
|
20
|
+
}
|
|
21
|
+
export function takeUnservedRelease(taking) {
|
|
22
|
+
take = taking;
|
|
23
|
+
}
|
|
24
|
+
export function unserved() {
|
|
25
|
+
return taken;
|
|
26
|
+
}
|
|
27
|
+
export function endUnserved(text) {
|
|
28
|
+
const refused = unservedBy(text);
|
|
29
|
+
if (refused !== null && take !== null) {
|
|
30
|
+
if (!taken) {
|
|
31
|
+
taken = true;
|
|
32
|
+
take(refused.release);
|
|
33
|
+
}
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (refusalOf(text)?.code === 'kit_update_required')
|
|
37
|
+
updateRequired();
|
|
38
|
+
if (refused?.code === 'kit_newer_than_house')
|
|
39
|
+
newerThanHouse(refused.release, refused.commands[machine()]);
|
|
6
40
|
}
|
package/dist/work.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { once } from 'node:events';
|
|
3
3
|
import { readFileSync } from 'node:fs';
|
|
4
|
-
import {
|
|
4
|
+
import { rm } from 'node:fs/promises';
|
|
5
5
|
import { createServer } from 'node:net';
|
|
6
6
|
import { join } from 'node:path';
|
|
7
7
|
import { RUNNING_JOB } from './events.js';
|
|
8
|
-
import { kitHome } from './home.js';
|
|
8
|
+
import { kitHome, socketDirectory } from './home.js';
|
|
9
9
|
const ENDED_TASK = new Set(['completed', 'failed', 'killed']);
|
|
10
10
|
const SCHEDULING = new Set(['CronCreate', 'CronDelete', 'ScheduleWakeup']);
|
|
11
11
|
const QUEUE_LIST = 'house-kit-queue-';
|
|
@@ -194,9 +194,7 @@ class CodexWork extends Work {
|
|
|
194
194
|
proving = -1;
|
|
195
195
|
proven = -1;
|
|
196
196
|
async open(cli) {
|
|
197
|
-
|
|
198
|
-
await mkdir(sockets, { recursive: true, mode: 0o700 });
|
|
199
|
-
this.path = join(sockets, `${randomUUID()}.sock`);
|
|
197
|
+
this.path = join(socketDirectory(), `${randomUUID()}.sock`);
|
|
200
198
|
this.server = createServer((socket) => this.connected(socket));
|
|
201
199
|
this.server.listen(this.path);
|
|
202
200
|
await once(this.server, 'listening');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/kit",
|
|
3
|
-
"version": "0.2.1-
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.1-cab5821cf0a77",
|
|
4
|
+
"description": "Kit connects an Environment to agents.house.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -12,28 +12,27 @@
|
|
|
12
12
|
"kit": "dist/kit-main.js",
|
|
13
13
|
"house": "dist/house-main.js"
|
|
14
14
|
},
|
|
15
|
-
"exports": {
|
|
16
|
-
"./bootstrap": "./dist/bootstrap.json"
|
|
17
|
-
},
|
|
18
15
|
"files": [
|
|
19
|
-
"dist"
|
|
20
|
-
"how-we-work.md",
|
|
21
|
-
"skills"
|
|
16
|
+
"dist"
|
|
22
17
|
],
|
|
23
18
|
"scripts": {
|
|
24
|
-
"
|
|
19
|
+
"bootstrap-manifest": "node scripts/bootstrap-manifest.mjs",
|
|
20
|
+
"build": "tsc -p tsconfig.build.json",
|
|
25
21
|
"engine": "mkdir -p tmp/engine && docker run --rm -v \"$PWD:/kit\" -w /kit alpine:3.24@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6 sh scripts/engine.sh tmp/engine",
|
|
26
|
-
"
|
|
22
|
+
"follow-skills": "node scripts/follow-skills.mjs",
|
|
23
|
+
"release-files": "node scripts/release-files.mjs",
|
|
27
24
|
"test": "tsc -p tsconfig.json && vitest run"
|
|
28
25
|
},
|
|
29
26
|
"dependencies": {
|
|
30
|
-
"@agentclientprotocol/sdk": "
|
|
31
|
-
"@agentshouse/mdmodel": "0.1.0-
|
|
27
|
+
"@agentclientprotocol/sdk": "2.0.1",
|
|
28
|
+
"@agentshouse/mdmodel": "0.1.0-c4f4d37bc9d6a",
|
|
29
|
+
"@agentshouse/skills": "0.1.0-c4476617b690f",
|
|
30
|
+
"@lydell/node-pty": "1.2.0-beta.15",
|
|
32
31
|
"yaml": "2.9.1"
|
|
33
32
|
},
|
|
34
33
|
"peerDependencies": {
|
|
35
|
-
"@agentclientprotocol/claude-agent-acp": "0.
|
|
36
|
-
"@agentclientprotocol/codex-acp": "2.
|
|
34
|
+
"@agentclientprotocol/claude-agent-acp": "0.94.0",
|
|
35
|
+
"@agentclientprotocol/codex-acp": "2.2.2"
|
|
37
36
|
},
|
|
38
37
|
"peerDependenciesMeta": {
|
|
39
38
|
"@agentclientprotocol/claude-agent-acp": {
|
|
@@ -44,26 +43,26 @@
|
|
|
44
43
|
}
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
|
-
"@types/node": "24.
|
|
46
|
+
"@types/node": "24.19.2",
|
|
48
47
|
"@types/ws": "8.18.2",
|
|
49
48
|
"typescript": "7.0.2",
|
|
50
|
-
"vitest": "5.0.
|
|
49
|
+
"vitest": "5.0.5",
|
|
51
50
|
"ws": "8.22.0"
|
|
52
51
|
},
|
|
53
|
-
"packageManager": "npm@11.19.
|
|
52
|
+
"packageManager": "npm@11.19.1",
|
|
54
53
|
"engines": {
|
|
55
|
-
"node": "24.
|
|
56
|
-
"npm": "11.19.
|
|
54
|
+
"node": "24.22.1",
|
|
55
|
+
"npm": "11.19.1"
|
|
57
56
|
},
|
|
58
57
|
"devEngines": {
|
|
59
58
|
"runtime": {
|
|
60
59
|
"name": "node",
|
|
61
|
-
"version": "24.
|
|
60
|
+
"version": "24.22.1",
|
|
62
61
|
"onFail": "error"
|
|
63
62
|
},
|
|
64
63
|
"packageManager": {
|
|
65
64
|
"name": "npm",
|
|
66
|
-
"version": "11.19.
|
|
65
|
+
"version": "11.19.1",
|
|
67
66
|
"onFail": "error"
|
|
68
67
|
}
|
|
69
68
|
}
|
package/dist/bootstrap.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 2,
|
|
3
|
-
"version": "0.2.1-ca18b01951c3b",
|
|
4
|
-
"hosts": {
|
|
5
|
-
"macos": {
|
|
6
|
-
"asset": {
|
|
7
|
-
"name": "connect-linux.sh",
|
|
8
|
-
"url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-ca18b01951c3b/connect-linux.sh"
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
"linux": {
|
|
12
|
-
"asset": {
|
|
13
|
-
"name": "connect-linux.sh",
|
|
14
|
-
"url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-ca18b01951c3b/connect-linux.sh"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"windows": {
|
|
18
|
-
"asset": {
|
|
19
|
-
"name": "connect-windows.ps1",
|
|
20
|
-
"url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-ca18b01951c3b/connect-windows.ps1"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
package/dist/clis-main.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { setGlobalProxyFromEnv } from 'node:http';
|
|
2
|
-
import { post } from './api.js';
|
|
3
|
-
import { CLIS, below, locate, versionOf } from './clis.js';
|
|
4
|
-
import { readEnrolment } from './home.js';
|
|
5
|
-
setGlobalProxyFromEnv();
|
|
6
|
-
try {
|
|
7
|
-
const { house, credential } = (await readEnrolment());
|
|
8
|
-
const { agents } = await post(house, '/kit/agents/desired', {}, credential);
|
|
9
|
-
for (const kind of agents) {
|
|
10
|
-
const cli = await locate(kind);
|
|
11
|
-
if (cli === null)
|
|
12
|
-
continue;
|
|
13
|
-
const release = await versionOf(cli);
|
|
14
|
-
if (release === null)
|
|
15
|
-
continue;
|
|
16
|
-
const { bin, minimum } = CLIS[kind];
|
|
17
|
-
process.stdout.write(`${[bin, cli, release, minimum, below(release, minimum) ? 'old' : 'current'].join('\t')}\n`);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
process.stderr.write(`kit: ${error.message}\n`);
|
|
22
|
-
process.exitCode = 1;
|
|
23
|
-
}
|
package/how-we-work.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# How we work
|
|
2
|
-
|
|
3
|
-
A Room is where information people share is kept; it is not the place for
|
|
4
|
-
private information. Work goes into the Room it belongs to, or the First Room
|
|
5
|
-
when none is named.
|
|
6
|
-
|
|
7
|
-
Every House answer carries the `url` of what it names; send the User that link.
|
|
8
|
-
|
|
9
|
-
The skills are already set up; never run `setup-matt-pocock-skills`.
|
|
10
|
-
|
|
11
|
-
## Where skill output goes
|
|
12
|
-
|
|
13
|
-
- Glossary (`GLOSSARY.md`): `glossary.md`
|
|
14
|
-
- Decisions (ADRs): `decisions/NNNN-<slug>.md`
|
|
15
|
-
- Plan (spec): `projects/<name>/plan.md`
|
|
16
|
-
- Tasks (tickets): `projects/<name>/tasks/NN-<slug>.md`, with a
|
|
17
|
-
`Status:` line (`needs-triage`, `needs-info`, `ready-for-agent`,
|
|
18
|
-
`ready-for-human`, `wontfix`, or `done` once implemented), a
|
|
19
|
-
`Category:` line (`bug`, `enhancement`), a `Blocked by:` line and comments
|
|
20
|
-
under `## Comments`; triage takes no pull requests
|
|
21
|
-
- Rejected requests (triage): `out-of-scope/<concept>.md`
|
|
22
|
-
- Implementation notes (implement-spec): `projects/<name>/notes/`
|
|
23
|
-
- PR bodies (pr): `projects/<name>/prs/<branch>.md`
|
|
24
|
-
- Map (Wayfinding): `projects/<name>/map.md`, its tasks under
|
|
25
|
-
`tasks/` with `Type:`, `Status: claimed|resolved` and `Blocked by:` lines
|
|
26
|
-
- Research: `research/<slug>.md`
|
|
27
|
-
- Architecture reports (improve-codebase-architecture): `architecture/<slug>.html`
|
|
28
|
-
- Handoffs: `handoffs/<slug>.md`
|
|
29
|
-
- Questionnaires: `questionnaires/<slug>.md`
|
|
30
|
-
- Retrospectives (retro): `retros/<date>-<slug>.md`
|
|
31
|
-
- Wizards: `wizards/<slug>.sh`; the values they capture stay out of the Room
|
|
32
|
-
- Learning: `learning/<topic>/`
|
|
33
|
-
- Prototype: one HTML file with every variant on one page.
|
package/skills/ask-matt/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Matt Pocock
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# Phase boundaries
|
|
2
|
-
|
|
3
|
-
A **phase** is a chunk of work inside a session: the grilling, the implementation, the QA. The definition is fuzzy on purpose: a phase ends when you think *"ok, we're done with that"*.
|
|
4
|
-
|
|
5
|
-
The **phase boundary** is the gap between two phases, and it is the only place this decision belongs. Mid-phase there is no decision to make: continue, or split the work that's left into subagents. Compacting mid-phase makes the agent lose the thread.
|
|
6
|
-
|
|
7
|
-
## The five options
|
|
8
|
-
|
|
9
|
-
| Option | What it does |
|
|
10
|
-
| ------------ | --------------------------------------------------------------- |
|
|
11
|
-
| **Continue** | Stay in the session. No context switch at all. |
|
|
12
|
-
| **`/clear`** | Empty the context window and start from nothing. |
|
|
13
|
-
| **`/handoff`** | Write a portable markdown file and seed a session anywhere with it. |
|
|
14
|
-
| **Subagent** | Send the task to its own context window and get a report back. |
|
|
15
|
-
| **`/compact`** | Compress this context and seed a fresh session with the summary. |
|
|
16
|
-
|
|
17
|
-
## The tree
|
|
18
|
-
|
|
19
|
-
Work top to bottom at the boundary. The first **yes** wins.
|
|
20
|
-
|
|
21
|
-
**1. Can you continue in this session?** Two things make the answer yes: the next phase needs this phase as a **primary source**, or you have enough [smart zone](https://www.aihero.dev/ai-coding-dictionary/smart-zone) left (~150k tokens) for the next phase to fit. Grilling → implementation is the standard yes: the implementation wants the reasoning verbatim, not a summary of it. Continue costs nothing and loses nothing, so rule it out before anything else.
|
|
22
|
-
|
|
23
|
-
**2. Is the context irrelevant to what comes next?** Is everything in this session (the exploration, the decisions, the dead ends) disposable? If so, **`/clear`**. It is the cheapest move on the board: it takes no time and hands back the whole window. `/clear` also isn't terminal: the old session stays resumable.
|
|
24
|
-
|
|
25
|
-
The cost of getting this wrong is one-way. Clear a *relevant* context and you lose the **why** behind what you built, and no amount of reading the diff back gets it returned.
|
|
26
|
-
|
|
27
|
-
**3. Do you need to hand off?** `/handoff` is narrow. You need it only when you are:
|
|
28
|
-
|
|
29
|
-
- swapping to a **new harness** (Claude → Codex),
|
|
30
|
-
- moving to a **new directory** or repo,
|
|
31
|
-
- sending the work to a **colleague**,
|
|
32
|
-
- or forking a side task you found **mid-phase** without derailing what you're doing.
|
|
33
|
-
|
|
34
|
-
That list is the whole clause. What `/handoff` buys is **portability**: a file that travels. If nothing is travelling, you don't need it.
|
|
35
|
-
|
|
36
|
-
**4. Can the task be done AFK?** Is it scoped tightly enough to run with you away from the keyboard, no steering? Then send it to a **subagent** and leave this session untouched. Automated review is the standard case: the agent reads the diff and reports, and you aren't needed while it does.
|
|
37
|
-
|
|
38
|
-
**5. Otherwise, `/compact`.** Relevant context, same harness, same directory, and you need to stay in the loop: this is where the tree lands, and it lands here often. Pass it an instruction (`/compact we're going to QA this area`) so the summary keeps what the next phase needs.
|
|
39
|
-
|
|
40
|
-
`/compact` is the **default, not the first reach**. It sits at the bottom because the four questions above it are all cheaper or more precise. The failure mode when people start here is a fresh session that is confidently wrong about a decision the summary flattened.
|
|
41
|
-
|
|
42
|
-
## Primary and secondary sources
|
|
43
|
-
|
|
44
|
-
Every move except **Continue** turns a **primary source** into a **secondary source**: the session as it happened, replaced by a summary of it. The trade is always the same shape:
|
|
45
|
-
|
|
46
|
-
| Source | Information | Noise | Room to move |
|
|
47
|
-
| --------------------------------- | ----------- | ----- | ------------ |
|
|
48
|
-
| Primary (Continue) | Full | Lots | Little |
|
|
49
|
-
| Secondary (`/compact`, `/handoff`) | Lossy | Less | Lots |
|
|
50
|
-
|
|
51
|
-
This is why question 1 comes first. You only pay the lossiness when staying costs more than it saves.
|
|
52
|
-
|
|
53
|
-
## These are judgement calls
|
|
54
|
-
|
|
55
|
-
The questions are not objective: each has taste in it, and the same boundary can go two ways on two days. The value is in asking them **in order**, at the boundary rather than in the middle of the work.
|