@agentshouse/kit 0.2.1-cd9cbd8b6428c → 0.2.1-cdc3937dea52e
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 +46 -49
- package/dist/acp.js +101 -108
- package/dist/afk.js +17 -0
- package/dist/agents.js +271 -73
- package/dist/api.js +43 -6
- package/dist/app-git.js +48 -0
- package/dist/bridge.js +42 -62
- package/dist/building.js +50 -0
- package/dist/calls.js +88 -0
- package/dist/chunks.js +49 -0
- package/dist/clis.js +179 -95
- package/dist/codex-main.js +58 -0
- package/dist/connect.js +108 -0
- package/dist/connection.js +120 -0
- package/dist/content.js +106 -0
- package/dist/conversations.js +817 -333
- package/dist/copies.js +451 -251
- package/dist/earlier.js +263 -0
- package/dist/end.js +26 -0
- package/dist/events.js +793 -0
- package/dist/files.js +139 -17
- package/dist/git-main.js +24 -29
- package/dist/git.js +57 -21
- package/dist/grok.js +39 -0
- package/dist/home.js +134 -9
- package/dist/house-cli.js +362 -0
- package/dist/house-main.js +7 -159
- package/dist/instructions.js +7 -11
- package/dist/keys.js +238 -0
- package/dist/kit-cli.js +78 -0
- package/dist/kit-main.js +8 -19
- package/dist/login.js +133 -104
- package/dist/logout.js +15 -14
- package/dist/mcp.js +6 -2
- package/dist/owner.js +46 -0
- package/dist/placement.js +25 -0
- package/dist/refusals.js +12 -0
- package/dist/relay.js +33 -2
- package/dist/resident.js +161 -61
- package/dist/scope.js +214 -0
- package/dist/scripts.js +303 -0
- package/dist/secret-input.js +5 -2
- package/dist/settings.js +188 -0
- package/dist/shell.js +3 -0
- package/dist/sign-in.js +85 -32
- package/dist/silence.js +28 -0
- package/dist/skills.js +49 -35
- package/dist/supervisor.js +163 -0
- package/dist/transcription.js +131 -40
- package/dist/translate.js +19 -16
- package/dist/update.js +119 -100
- package/dist/wire.js +32 -0
- package/dist/work.js +353 -0
- package/dist/workspace.js +103 -0
- package/package.json +26 -21
- package/dist/authority-main.js +0 -22
- package/dist/blocks.js +0 -51
- package/dist/bootstrap.json +0 -24
- package/dist/clis-main.js +0 -23
- package/dist/configure-main.js +0 -6
- package/dist/enrol-main.js +0 -4
- package/dist/stream.js +0 -47
- package/how-we-work.md +0 -23
- package/skills/ask-matt/LICENSE +0 -21
- package/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/skills/ask-matt/SKILL.md +0 -91
- package/skills/ask-matt/agents/openai.yaml +0 -4
- 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 -116
- package/skills/codebase-design/agents/openai.yaml +0 -3
- package/skills/diagnosing-bugs/LICENSE +0 -21
- package/skills/diagnosing-bugs/SKILL.md +0 -140
- 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/CONTEXT-FORMAT.md +0 -60
- package/skills/domain-modeling/LICENSE +0 -21
- package/skills/domain-modeling/SKILL.md +0 -76
- package/skills/domain-modeling/agents/openai.yaml +0 -3
- package/skills/grill-me/LICENSE +0 -21
- package/skills/grill-me/SKILL.md +0 -8
- package/skills/grill-me/agents/openai.yaml +0 -4
- package/skills/grill-with-docs/LICENSE +0 -21
- package/skills/grill-with-docs/SKILL.md +0 -8
- package/skills/grill-with-docs/agents/openai.yaml +0 -4
- 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 -17
- package/skills/handoff/agents/openai.yaml +0 -4
- package/skills/implement/LICENSE +0 -21
- package/skills/implement/SKILL.md +0 -16
- package/skills/implement/agents/openai.yaml +0 -4
- 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 -72
- package/skills/improve-codebase-architecture/agents/openai.yaml +0 -4
- package/skills/prototype/LICENSE +0 -21
- package/skills/prototype/LOGIC.md +0 -67
- package/skills/prototype/SKILL.md +0 -28
- 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 -14
- package/skills/research/agents/openai.yaml +0 -3
- package/skills/resolving-merge-conflicts/LICENSE +0 -21
- package/skills/resolving-merge-conflicts/SKILL.md +0 -16
- package/skills/resolving-merge-conflicts/agents/openai.yaml +0 -3
- package/skills/tdd/LICENSE +0 -21
- package/skills/tdd/SKILL.md +0 -40
- 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 -141
- package/skills/teach/agents/openai.yaml +0 -4
- package/skills/to-questionnaire/LICENSE +0 -21
- package/skills/to-questionnaire/SKILL.md +0 -55
- package/skills/to-questionnaire/agents/openai.yaml +0 -4
- package/skills/to-spec/LICENSE +0 -21
- package/skills/to-spec/SKILL.md +0 -76
- package/skills/to-spec/agents/openai.yaml +0 -4
- package/skills/to-tickets/LICENSE +0 -21
- package/skills/to-tickets/SKILL.md +0 -106
- package/skills/to-tickets/agents/openai.yaml +0 -4
- package/skills/wait-what/LICENSE +0 -21
- package/skills/wait-what/SKILL.md +0 -8
- package/skills/wait-what/agents/openai.yaml +0 -4
- package/skills/wayfinder/LICENSE +0 -21
- package/skills/wayfinder/SKILL.md +0 -129
- package/skills/wayfinder/agents/openai.yaml +0 -4
- 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 -83
- package/skills/writing-for-agents/agents/openai.yaml +0 -3
package/dist/content.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { applied } from '@agentshouse/session-content';
|
|
2
|
+
function filesOf(files) {
|
|
3
|
+
const held = new Map();
|
|
4
|
+
for (const { path, added, removed } of files) {
|
|
5
|
+
const before = held.get(path);
|
|
6
|
+
held.set(path, { added: (before?.added ?? 0) + added, removed: (before?.removed ?? 0) + removed });
|
|
7
|
+
}
|
|
8
|
+
return held;
|
|
9
|
+
}
|
|
10
|
+
function none() {
|
|
11
|
+
return { type: 'counts', commands: 0, edited: 0, other: 0, added: 0, removed: 0, failed: 0 };
|
|
12
|
+
}
|
|
13
|
+
export class Content {
|
|
14
|
+
parts = [];
|
|
15
|
+
emit;
|
|
16
|
+
calls = new Map();
|
|
17
|
+
writing = null;
|
|
18
|
+
stretch = null;
|
|
19
|
+
constructor(emit) {
|
|
20
|
+
this.emit = emit;
|
|
21
|
+
}
|
|
22
|
+
holds(key) {
|
|
23
|
+
return this.calls.has(key);
|
|
24
|
+
}
|
|
25
|
+
write(id, text) {
|
|
26
|
+
if (text === '')
|
|
27
|
+
return;
|
|
28
|
+
if (this.writing !== null && this.writing.id === id) {
|
|
29
|
+
this.apply({ op: 'append', index: this.writing.index, text });
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
this.stretch = null;
|
|
33
|
+
this.writing = { id, index: this.started({ type: 'text', text }) };
|
|
34
|
+
}
|
|
35
|
+
add(part) {
|
|
36
|
+
this.writing = null;
|
|
37
|
+
this.started(part);
|
|
38
|
+
}
|
|
39
|
+
arrived(part) {
|
|
40
|
+
this.started(part);
|
|
41
|
+
}
|
|
42
|
+
call(key, parent, called) {
|
|
43
|
+
const held = this.calls.get(key);
|
|
44
|
+
if (held !== undefined) {
|
|
45
|
+
held.files = filesOf(called.files);
|
|
46
|
+
held.failed = called.failed;
|
|
47
|
+
this.settle(this.tally());
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (parent !== null && !this.calls.has(parent))
|
|
51
|
+
return;
|
|
52
|
+
if (parent === null)
|
|
53
|
+
this.writing = null;
|
|
54
|
+
const stretch = parent === null ? this.stretch : this.calls.get(parent).stretch;
|
|
55
|
+
const at = stretch ?? this.parts.length;
|
|
56
|
+
this.calls.set(key, { stretch: at, kind: called.kind, files: filesOf(called.files), failed: called.failed });
|
|
57
|
+
const tallied = this.tally();
|
|
58
|
+
if (stretch === null)
|
|
59
|
+
this.stretch = this.started(tallied.get(at));
|
|
60
|
+
this.settle(tallied);
|
|
61
|
+
}
|
|
62
|
+
operations() {
|
|
63
|
+
return this.parts.map((part, index) => ({ op: 'start', index, part }));
|
|
64
|
+
}
|
|
65
|
+
tally() {
|
|
66
|
+
const stretches = new Map();
|
|
67
|
+
const first = new Set();
|
|
68
|
+
for (const call of this.calls.values()) {
|
|
69
|
+
const counts = stretches.get(call.stretch) ?? none();
|
|
70
|
+
stretches.set(call.stretch, counts);
|
|
71
|
+
if (call.kind === 'command')
|
|
72
|
+
counts.commands += 1;
|
|
73
|
+
if (call.kind === 'other')
|
|
74
|
+
counts.other += 1;
|
|
75
|
+
if (call.failed)
|
|
76
|
+
counts.failed += 1;
|
|
77
|
+
if (call.kind !== 'edit')
|
|
78
|
+
continue;
|
|
79
|
+
if (call.files.size === 0)
|
|
80
|
+
counts.edited += 1;
|
|
81
|
+
for (const [path, lines] of call.files) {
|
|
82
|
+
if (!first.has(path))
|
|
83
|
+
counts.edited += 1;
|
|
84
|
+
first.add(path);
|
|
85
|
+
counts.added += lines.added;
|
|
86
|
+
counts.removed += lines.removed;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return stretches;
|
|
90
|
+
}
|
|
91
|
+
settle(tallied) {
|
|
92
|
+
for (const [index, counts] of tallied) {
|
|
93
|
+
if (JSON.stringify(counts) !== JSON.stringify(this.parts[index]))
|
|
94
|
+
this.apply({ op: 'set', index, part: counts });
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
started(part) {
|
|
98
|
+
const index = this.parts.length;
|
|
99
|
+
this.apply({ op: 'start', index, part });
|
|
100
|
+
return index;
|
|
101
|
+
}
|
|
102
|
+
apply(operation) {
|
|
103
|
+
this.parts = applied(this.parts, operation);
|
|
104
|
+
this.emit(operation);
|
|
105
|
+
}
|
|
106
|
+
}
|