@agentshouse/kit 0.2.1-cfb7b543f2af6 → 0.2.1-cfbadfb5b5e28

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 (150) hide show
  1. package/README.md +33 -34
  2. package/dist/acp.js +91 -20
  3. package/dist/afk.js +17 -0
  4. package/dist/agents.js +91 -44
  5. package/dist/api.js +5 -5
  6. package/dist/app-git.js +10 -26
  7. package/dist/authority-main.js +3 -3
  8. package/dist/bridge.js +7 -10
  9. package/dist/building.js +50 -0
  10. package/dist/calls.js +71 -0
  11. package/dist/chunks.js +49 -0
  12. package/dist/clis.js +56 -45
  13. package/dist/connection.js +120 -0
  14. package/dist/content.js +63 -0
  15. package/dist/conversations.js +703 -244
  16. package/dist/copies.js +344 -171
  17. package/dist/end.js +15 -4
  18. package/dist/events.js +746 -210
  19. package/dist/files.js +139 -37
  20. package/dist/git.js +49 -16
  21. package/dist/grok.js +39 -0
  22. package/dist/home.js +27 -20
  23. package/dist/house-cli.js +98 -90
  24. package/dist/house-main.js +3 -3
  25. package/dist/instructions.js +29 -10
  26. package/dist/kit-cli.js +5 -8
  27. package/dist/kit-main.js +3 -3
  28. package/dist/login.js +20 -11
  29. package/dist/logout.js +1 -3
  30. package/dist/mcp.js +6 -2
  31. package/dist/placement.js +19 -36
  32. package/dist/relay.js +21 -0
  33. package/dist/resident.js +118 -52
  34. package/dist/scope.js +15 -4
  35. package/dist/scripts.js +255 -0
  36. package/dist/secret-input.js +1 -1
  37. package/dist/service.js +23 -1
  38. package/dist/sign-in.js +22 -39
  39. package/dist/silence.js +28 -0
  40. package/dist/skills.js +42 -97
  41. package/dist/transcription.js +88 -45
  42. package/dist/translate.js +19 -16
  43. package/dist/update.js +113 -127
  44. package/dist/wire.js +37 -3
  45. package/dist/work.js +12 -7
  46. package/package.json +22 -21
  47. package/dist/bootstrap.json +0 -24
  48. package/dist/chatgpt.js +0 -32
  49. package/dist/clis-main.js +0 -23
  50. package/dist/parts.js +0 -82
  51. package/dist/stream.js +0 -123
  52. package/how-we-work.md +0 -33
  53. package/skills/ask-matt/LICENSE +0 -21
  54. package/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  55. package/skills/ask-matt/SKILL.md +0 -97
  56. package/skills/ask-matt/agents/openai.yaml +0 -5
  57. package/skills/code-review/LICENSE +0 -21
  58. package/skills/code-review/SKILL.md +0 -89
  59. package/skills/code-review/agents/openai.yaml +0 -3
  60. package/skills/codebase-design/DEEPENING.md +0 -37
  61. package/skills/codebase-design/DESIGN-IT-TWICE.md +0 -44
  62. package/skills/codebase-design/LICENSE +0 -21
  63. package/skills/codebase-design/SKILL.md +0 -114
  64. package/skills/codebase-design/agents/openai.yaml +0 -3
  65. package/skills/diagnosing-bugs/LICENSE +0 -21
  66. package/skills/diagnosing-bugs/SKILL.md +0 -138
  67. package/skills/diagnosing-bugs/agents/openai.yaml +0 -3
  68. package/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -44
  69. package/skills/domain-modeling/ADR-FORMAT.md +0 -47
  70. package/skills/domain-modeling/GLOSSARY-FORMAT.md +0 -60
  71. package/skills/domain-modeling/LICENSE +0 -21
  72. package/skills/domain-modeling/SKILL.md +0 -74
  73. package/skills/domain-modeling/agents/openai.yaml +0 -3
  74. package/skills/grill-me/LICENSE +0 -21
  75. package/skills/grill-me/SKILL.md +0 -7
  76. package/skills/grill-me/agents/openai.yaml +0 -5
  77. package/skills/grill-with-docs/LICENSE +0 -21
  78. package/skills/grill-with-docs/SKILL.md +0 -7
  79. package/skills/grill-with-docs/agents/openai.yaml +0 -5
  80. package/skills/grilling/LICENSE +0 -21
  81. package/skills/grilling/SKILL.md +0 -30
  82. package/skills/grilling/agents/openai.yaml +0 -3
  83. package/skills/handoff/LICENSE +0 -21
  84. package/skills/handoff/SKILL.md +0 -16
  85. package/skills/handoff/agents/openai.yaml +0 -5
  86. package/skills/implement/LICENSE +0 -21
  87. package/skills/implement/SKILL.md +0 -17
  88. package/skills/implement/agents/openai.yaml +0 -5
  89. package/skills/implement-spec/LICENSE +0 -21
  90. package/skills/implement-spec/SKILL.md +0 -40
  91. package/skills/implement-spec/agents/openai.yaml +0 -5
  92. package/skills/improve-codebase-architecture/HTML-REPORT.md +0 -123
  93. package/skills/improve-codebase-architecture/LICENSE +0 -21
  94. package/skills/improve-codebase-architecture/SKILL.md +0 -71
  95. package/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
  96. package/skills/pr/CREDITS.md +0 -3
  97. package/skills/pr/LICENSE +0 -21
  98. package/skills/pr/SKILL.md +0 -170
  99. package/skills/pr/agents/openai.yaml +0 -3
  100. package/skills/prototype/LICENSE +0 -21
  101. package/skills/prototype/LOGIC.md +0 -67
  102. package/skills/prototype/SKILL.md +0 -26
  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 -12
  107. package/skills/research/agents/openai.yaml +0 -3
  108. package/skills/retro/LICENSE +0 -21
  109. package/skills/retro/SKILL.md +0 -44
  110. package/skills/retro/agents/openai.yaml +0 -5
  111. package/skills/tdd/LICENSE +0 -21
  112. package/skills/tdd/SKILL.md +0 -38
  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 -140
  122. package/skills/teach/agents/openai.yaml +0 -5
  123. package/skills/to-questionnaire/LICENSE +0 -21
  124. package/skills/to-questionnaire/SKILL.md +0 -54
  125. package/skills/to-questionnaire/agents/openai.yaml +0 -5
  126. package/skills/to-spec/LICENSE +0 -21
  127. package/skills/to-spec/SKILL.md +0 -75
  128. package/skills/to-spec/agents/openai.yaml +0 -5
  129. package/skills/to-tickets/LICENSE +0 -21
  130. package/skills/to-tickets/SKILL.md +0 -105
  131. package/skills/to-tickets/agents/openai.yaml +0 -5
  132. package/skills/triage/AGENT-BRIEF.md +0 -207
  133. package/skills/triage/LICENSE +0 -21
  134. package/skills/triage/OUT-OF-SCOPE.md +0 -105
  135. package/skills/triage/SKILL.md +0 -112
  136. package/skills/triage/agents/openai.yaml +0 -5
  137. package/skills/wait-what/LICENSE +0 -21
  138. package/skills/wait-what/SKILL.md +0 -7
  139. package/skills/wait-what/agents/openai.yaml +0 -5
  140. package/skills/wayfinder/LICENSE +0 -21
  141. package/skills/wayfinder/SKILL.md +0 -128
  142. package/skills/wayfinder/agents/openai.yaml +0 -5
  143. package/skills/wizard/LICENSE +0 -21
  144. package/skills/wizard/SKILL.md +0 -44
  145. package/skills/wizard/agents/openai.yaml +0 -3
  146. package/skills/wizard/template.sh +0 -223
  147. package/skills/writing-for-agents/LICENSE +0 -21
  148. package/skills/writing-for-agents/SKILL-MECHANICS.md +0 -22
  149. package/skills/writing-for-agents/SKILL.md +0 -81
  150. package/skills/writing-for-agents/agents/openai.yaml +0 -3
@@ -0,0 +1,63 @@
1
+ import { applied } from '@agentshouse/session-content';
2
+ function whole(part, parent) {
3
+ return { ...part, parent };
4
+ }
5
+ export class Content {
6
+ parts = [];
7
+ emit;
8
+ keys = new Map();
9
+ writing = new Map();
10
+ planned = null;
11
+ constructor(emit) {
12
+ this.emit = emit;
13
+ }
14
+ index(key) {
15
+ return this.keys.get(key);
16
+ }
17
+ write(type, id, parent, text) {
18
+ if (text === '')
19
+ return;
20
+ const writing = this.writing.get(parent);
21
+ if (writing?.type === type && writing.id === id) {
22
+ this.apply({ op: 'append', index: writing.index, text });
23
+ return;
24
+ }
25
+ const index = this.add(parent, { type, text });
26
+ this.writing.set(parent, { type, id, index });
27
+ }
28
+ put(key, parent, part) {
29
+ const index = this.keys.get(key);
30
+ if (index === undefined) {
31
+ const added = this.add(parent, part);
32
+ this.keys.set(key, added);
33
+ return added;
34
+ }
35
+ const changed = whole(part, this.parts[index].parent);
36
+ if (JSON.stringify(changed) !== JSON.stringify(this.parts[index]))
37
+ this.apply({ op: 'set', index, part: changed });
38
+ return index;
39
+ }
40
+ plan(entries) {
41
+ if (this.planned === null) {
42
+ this.planned = this.add(null, { type: 'plan', entries });
43
+ return;
44
+ }
45
+ this.apply({ op: 'set', index: this.planned, part: { type: 'plan', parent: null, entries } });
46
+ }
47
+ add(parent, part) {
48
+ this.writing.delete(parent);
49
+ return this.arrived(parent, part);
50
+ }
51
+ arrived(parent, part) {
52
+ const index = this.parts.length;
53
+ this.apply({ op: 'start', index, part: whole(part, parent) });
54
+ return index;
55
+ }
56
+ operations() {
57
+ return this.parts.map((part, index) => ({ op: 'start', index, part }));
58
+ }
59
+ apply(operation) {
60
+ this.parts = applied(this.parts, operation);
61
+ this.emit(operation);
62
+ }
63
+ }