@agentshouse/kit 0.2.1-cd646adba3f64 → 0.2.1-cdc381ebf021f

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.
Files changed (141) hide show
  1. package/README.md +42 -48
  2. package/dist/acp.js +102 -108
  3. package/dist/afk.js +17 -0
  4. package/dist/agents.js +227 -68
  5. package/dist/api.js +19 -10
  6. package/dist/app-git.js +10 -26
  7. package/dist/bridge.js +18 -47
  8. package/dist/building.js +50 -0
  9. package/dist/calls.js +88 -0
  10. package/dist/chunks.js +49 -0
  11. package/dist/clis.js +157 -100
  12. package/dist/codex-main.js +58 -0
  13. package/dist/connect.js +108 -0
  14. package/dist/connection.js +120 -0
  15. package/dist/content.js +106 -0
  16. package/dist/conversations.js +815 -335
  17. package/dist/copies.js +439 -232
  18. package/dist/earlier.js +263 -0
  19. package/dist/end.js +23 -5
  20. package/dist/events.js +793 -0
  21. package/dist/files.js +139 -17
  22. package/dist/git.js +57 -21
  23. package/dist/grok.js +39 -0
  24. package/dist/home.js +122 -8
  25. package/dist/house-cli.js +359 -0
  26. package/dist/house-main.js +7 -159
  27. package/dist/instructions.js +7 -11
  28. package/dist/kit-cli.js +78 -0
  29. package/dist/kit-main.js +8 -22
  30. package/dist/login.js +132 -107
  31. package/dist/logout.js +15 -17
  32. package/dist/mcp.js +6 -2
  33. package/dist/owner.js +46 -0
  34. package/dist/placement.js +25 -0
  35. package/dist/relay.js +33 -2
  36. package/dist/resident.js +160 -58
  37. package/dist/scope.js +214 -0
  38. package/dist/scripts.js +303 -0
  39. package/dist/secret-input.js +1 -1
  40. package/dist/settings.js +188 -0
  41. package/dist/sign-in.js +40 -33
  42. package/dist/silence.js +28 -0
  43. package/dist/skills.js +49 -35
  44. package/dist/supervisor.js +163 -0
  45. package/dist/transcription.js +90 -47
  46. package/dist/translate.js +19 -16
  47. package/dist/update.js +119 -102
  48. package/dist/wire.js +32 -0
  49. package/dist/work.js +353 -0
  50. package/dist/workspace.js +103 -0
  51. package/package.json +25 -21
  52. package/dist/authority-main.js +0 -22
  53. package/dist/blocks.js +0 -51
  54. package/dist/bootstrap.json +0 -24
  55. package/dist/clis-main.js +0 -23
  56. package/dist/configure-main.js +0 -6
  57. package/dist/enrol-main.js +0 -4
  58. package/dist/stream.js +0 -72
  59. package/how-we-work.md +0 -23
  60. package/skills/ask-matt/LICENSE +0 -21
  61. package/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  62. package/skills/ask-matt/SKILL.md +0 -91
  63. package/skills/ask-matt/agents/openai.yaml +0 -4
  64. package/skills/code-review/LICENSE +0 -21
  65. package/skills/code-review/SKILL.md +0 -89
  66. package/skills/code-review/agents/openai.yaml +0 -3
  67. package/skills/codebase-design/DEEPENING.md +0 -37
  68. package/skills/codebase-design/DESIGN-IT-TWICE.md +0 -44
  69. package/skills/codebase-design/LICENSE +0 -21
  70. package/skills/codebase-design/SKILL.md +0 -116
  71. package/skills/codebase-design/agents/openai.yaml +0 -3
  72. package/skills/diagnosing-bugs/LICENSE +0 -21
  73. package/skills/diagnosing-bugs/SKILL.md +0 -140
  74. package/skills/diagnosing-bugs/agents/openai.yaml +0 -3
  75. package/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -44
  76. package/skills/domain-modeling/ADR-FORMAT.md +0 -47
  77. package/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
  78. package/skills/domain-modeling/LICENSE +0 -21
  79. package/skills/domain-modeling/SKILL.md +0 -76
  80. package/skills/domain-modeling/agents/openai.yaml +0 -3
  81. package/skills/grill-me/LICENSE +0 -21
  82. package/skills/grill-me/SKILL.md +0 -8
  83. package/skills/grill-me/agents/openai.yaml +0 -4
  84. package/skills/grill-with-docs/LICENSE +0 -21
  85. package/skills/grill-with-docs/SKILL.md +0 -8
  86. package/skills/grill-with-docs/agents/openai.yaml +0 -4
  87. package/skills/grilling/LICENSE +0 -21
  88. package/skills/grilling/SKILL.md +0 -30
  89. package/skills/grilling/agents/openai.yaml +0 -3
  90. package/skills/handoff/LICENSE +0 -21
  91. package/skills/handoff/SKILL.md +0 -17
  92. package/skills/handoff/agents/openai.yaml +0 -4
  93. package/skills/implement/LICENSE +0 -21
  94. package/skills/implement/SKILL.md +0 -16
  95. package/skills/implement/agents/openai.yaml +0 -4
  96. package/skills/improve-codebase-architecture/HTML-REPORT.md +0 -123
  97. package/skills/improve-codebase-architecture/LICENSE +0 -21
  98. package/skills/improve-codebase-architecture/SKILL.md +0 -72
  99. package/skills/improve-codebase-architecture/agents/openai.yaml +0 -4
  100. package/skills/prototype/LICENSE +0 -21
  101. package/skills/prototype/LOGIC.md +0 -67
  102. package/skills/prototype/SKILL.md +0 -28
  103. package/skills/prototype/UI.md +0 -112
  104. package/skills/prototype/agents/openai.yaml +0 -3
  105. package/skills/research/LICENSE +0 -21
  106. package/skills/research/SKILL.md +0 -14
  107. package/skills/research/agents/openai.yaml +0 -3
  108. package/skills/resolving-merge-conflicts/LICENSE +0 -21
  109. package/skills/resolving-merge-conflicts/SKILL.md +0 -16
  110. package/skills/resolving-merge-conflicts/agents/openai.yaml +0 -3
  111. package/skills/tdd/LICENSE +0 -21
  112. package/skills/tdd/SKILL.md +0 -40
  113. package/skills/tdd/agents/openai.yaml +0 -3
  114. package/skills/tdd/mocking.md +0 -59
  115. package/skills/tdd/tests.md +0 -77
  116. package/skills/teach/GLOSSARY-FORMAT.md +0 -35
  117. package/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  118. package/skills/teach/LICENSE +0 -21
  119. package/skills/teach/MISSION-FORMAT.md +0 -31
  120. package/skills/teach/RESOURCES-FORMAT.md +0 -32
  121. package/skills/teach/SKILL.md +0 -141
  122. package/skills/teach/agents/openai.yaml +0 -4
  123. package/skills/to-questionnaire/LICENSE +0 -21
  124. package/skills/to-questionnaire/SKILL.md +0 -55
  125. package/skills/to-questionnaire/agents/openai.yaml +0 -4
  126. package/skills/to-spec/LICENSE +0 -21
  127. package/skills/to-spec/SKILL.md +0 -76
  128. package/skills/to-spec/agents/openai.yaml +0 -4
  129. package/skills/to-tickets/LICENSE +0 -21
  130. package/skills/to-tickets/SKILL.md +0 -106
  131. package/skills/to-tickets/agents/openai.yaml +0 -4
  132. package/skills/wait-what/LICENSE +0 -21
  133. package/skills/wait-what/SKILL.md +0 -8
  134. package/skills/wait-what/agents/openai.yaml +0 -4
  135. package/skills/wayfinder/LICENSE +0 -21
  136. package/skills/wayfinder/SKILL.md +0 -129
  137. package/skills/wayfinder/agents/openai.yaml +0 -4
  138. package/skills/writing-for-agents/LICENSE +0 -21
  139. package/skills/writing-for-agents/SKILL-MECHANICS.md +0 -22
  140. package/skills/writing-for-agents/SKILL.md +0 -83
  141. package/skills/writing-for-agents/agents/openai.yaml +0 -3
@@ -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
+ }