let-them-talk 5.3.0 → 5.4.0

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 (166) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/README.md +158 -592
  3. package/SECURITY.md +3 -3
  4. package/USAGE.md +151 -0
  5. package/agent-contracts.js +447 -0
  6. package/api-agents.js +760 -0
  7. package/autonomy/decision-v2.js +380 -0
  8. package/autonomy/watchdog-policy.js +572 -0
  9. package/cli.js +454 -298
  10. package/conversation-templates/autonomous-feature.json +83 -22
  11. package/conversation-templates/code-review.json +69 -21
  12. package/conversation-templates/debug-squad.json +69 -21
  13. package/conversation-templates/feature-build.json +69 -21
  14. package/conversation-templates/research-write.json +69 -21
  15. package/dashboard.html +3148 -174
  16. package/dashboard.js +823 -786
  17. package/data-dir.js +58 -0
  18. package/docs/architecture/branch-semantics.md +157 -0
  19. package/docs/architecture/canonical-event-schema.md +88 -0
  20. package/docs/architecture/markdown-workspace.md +183 -0
  21. package/docs/architecture/runtime-contract.md +459 -0
  22. package/docs/architecture/runtime-migration-hardening.md +64 -0
  23. package/events/hooks.js +154 -0
  24. package/events/log.js +457 -0
  25. package/events/replay.js +33 -0
  26. package/events/schema.js +432 -0
  27. package/managed-team-integration.js +261 -0
  28. package/office/agents.js +704 -597
  29. package/office/animation.js +1 -1
  30. package/office/assets/arcade-cabinet.js +141 -0
  31. package/office/assets/archway.js +77 -0
  32. package/office/assets/bar-counter.js +91 -0
  33. package/office/assets/bar-stool.js +71 -0
  34. package/office/assets/beanbag.js +64 -0
  35. package/office/assets/bench.js +99 -0
  36. package/office/assets/bollard.js +87 -0
  37. package/office/assets/cactus.js +100 -0
  38. package/office/assets/carpet-tile.js +46 -0
  39. package/office/assets/chair.js +123 -0
  40. package/office/assets/chandelier.js +107 -0
  41. package/office/assets/coffee-machine.js +95 -0
  42. package/office/assets/coffee-table.js +81 -0
  43. package/office/assets/column.js +95 -0
  44. package/office/assets/desk-lamp.js +102 -0
  45. package/office/assets/desk.js +76 -0
  46. package/office/assets/dining-table.js +105 -0
  47. package/office/assets/door.js +70 -0
  48. package/office/assets/dual-monitor.js +72 -0
  49. package/office/assets/fence.js +76 -0
  50. package/office/assets/filing-cabinet.js +111 -0
  51. package/office/assets/floor-lamp.js +69 -0
  52. package/office/assets/floor-tile.js +54 -0
  53. package/office/assets/flower-pot.js +76 -0
  54. package/office/assets/foosball.js +95 -0
  55. package/office/assets/fridge.js +99 -0
  56. package/office/assets/gaming-chair.js +154 -0
  57. package/office/assets/gaming-desk.js +105 -0
  58. package/office/assets/glass-door.js +72 -0
  59. package/office/assets/glass-wall.js +64 -0
  60. package/office/assets/half-wall.js +49 -0
  61. package/office/assets/hanging-plant.js +112 -0
  62. package/office/assets/index.js +151 -0
  63. package/office/assets/indoor-tree.js +90 -0
  64. package/office/assets/l-sofa.js +153 -0
  65. package/office/assets/marble-floor.js +64 -0
  66. package/office/assets/materials.js +40 -0
  67. package/office/assets/meeting-table.js +88 -0
  68. package/office/assets/microwave.js +94 -0
  69. package/office/assets/monitor.js +67 -0
  70. package/office/assets/neon-strip.js +73 -0
  71. package/office/assets/painting.js +84 -0
  72. package/office/assets/palm-tree.js +108 -0
  73. package/office/assets/pc-tower.js +91 -0
  74. package/office/assets/pendant-light.js +67 -0
  75. package/office/assets/ping-pong.js +114 -0
  76. package/office/assets/plant.js +72 -0
  77. package/office/assets/planter-box.js +95 -0
  78. package/office/assets/pool-table.js +94 -0
  79. package/office/assets/printer.js +113 -0
  80. package/office/assets/reception-desk.js +133 -0
  81. package/office/assets/rug.js +78 -0
  82. package/office/assets/sculpture.js +85 -0
  83. package/office/assets/server-rack.js +98 -0
  84. package/office/assets/sink.js +109 -0
  85. package/office/assets/sofa.js +106 -0
  86. package/office/assets/speaker.js +83 -0
  87. package/office/assets/spotlight.js +83 -0
  88. package/office/assets/street-lamp.js +97 -0
  89. package/office/assets/trash-can.js +83 -0
  90. package/office/assets/treadmill.js +126 -0
  91. package/office/assets/trophy.js +89 -0
  92. package/office/assets/tv-screen.js +79 -0
  93. package/office/assets/vase.js +84 -0
  94. package/office/assets/wall-clock.js +84 -0
  95. package/office/assets/wall.js +53 -0
  96. package/office/assets/water-cooler.js +146 -0
  97. package/office/assets/whiteboard.js +115 -0
  98. package/office/assets.js +3 -431
  99. package/office/builder.js +791 -355
  100. package/office/campus-env.js +1012 -1119
  101. package/office/environment.js +2 -0
  102. package/office/gallery.js +997 -0
  103. package/office/index.js +165 -61
  104. package/office/navigation.js +173 -152
  105. package/office/player.js +178 -68
  106. package/office/robot-character.js +272 -0
  107. package/office/spectator-camera.js +33 -10
  108. package/office/state.js +2 -0
  109. package/office/world-save.js +35 -4
  110. package/package.json +57 -3
  111. package/providers/comfyui.js +383 -0
  112. package/providers/dalle.js +79 -0
  113. package/providers/gemini.js +181 -0
  114. package/providers/ollama.js +184 -0
  115. package/providers/replicate.js +115 -0
  116. package/providers/zai.js +183 -0
  117. package/runtime-descriptor.js +270 -0
  118. package/scripts/check-agent-contract-advisory.js +132 -0
  119. package/scripts/check-api-agent-parity.js +277 -0
  120. package/scripts/check-autonomy-v2-decision.js +207 -0
  121. package/scripts/check-autonomy-v2-execution.js +588 -0
  122. package/scripts/check-autonomy-v2-watchdog.js +224 -0
  123. package/scripts/check-branch-fork-snapshot.js +337 -0
  124. package/scripts/check-branch-isolation.js +787 -0
  125. package/scripts/check-branch-semantics.js +139 -0
  126. package/scripts/check-dashboard-control-plane.js +1304 -0
  127. package/scripts/check-docs-onboarding.js +490 -0
  128. package/scripts/check-event-schema.js +276 -0
  129. package/scripts/check-evidence-completion.js +239 -0
  130. package/scripts/check-invariants.js +992 -0
  131. package/scripts/check-lifecycle-hooks.js +525 -0
  132. package/scripts/check-managed-team-integration.js +166 -0
  133. package/scripts/check-markdown-workspace-export.js +548 -0
  134. package/scripts/check-markdown-workspace-safety.js +347 -0
  135. package/scripts/check-markdown-workspace.js +136 -0
  136. package/scripts/check-message-replay.js +429 -0
  137. package/scripts/check-migration-hardening.js +300 -0
  138. package/scripts/check-performance-indexing.js +272 -0
  139. package/scripts/check-provider-capabilities.js +316 -0
  140. package/scripts/check-runtime-contract.js +109 -0
  141. package/scripts/check-session-aware-context.js +172 -0
  142. package/scripts/check-session-lifecycle.js +210 -0
  143. package/scripts/export-markdown-workspace.js +84 -0
  144. package/scripts/fixtures/message-replay/clean.jsonl +2 -0
  145. package/scripts/fixtures/message-replay/corrupt-correction-payload.jsonl +1 -0
  146. package/scripts/fixtures/message-replay/corrupt-jsonl.jsonl +1 -0
  147. package/scripts/fixtures/message-replay/corrupt-payload.jsonl +1 -0
  148. package/scripts/fixtures/message-replay/out-of-order.jsonl +2 -0
  149. package/scripts/migrate-legacy-to-canonical.js +201 -0
  150. package/scripts/run-verification-suite.js +242 -0
  151. package/scripts/sync-packaged-docs.js +69 -0
  152. package/server.js +9546 -7216
  153. package/state/agents.js +161 -0
  154. package/state/canonical.js +3068 -0
  155. package/state/dashboard-queries.js +441 -0
  156. package/state/evidence.js +56 -0
  157. package/state/io.js +69 -0
  158. package/state/markdown-workspace.js +951 -0
  159. package/state/messages.js +669 -0
  160. package/state/sessions.js +683 -0
  161. package/state/tasks-workflows.js +92 -0
  162. package/templates/debate.json +2 -2
  163. package/templates/managed.json +4 -4
  164. package/templates/pair.json +2 -2
  165. package/templates/review.json +2 -2
  166. package/templates/team.json +3 -3
@@ -0,0 +1,242 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require('child_process');
4
+ const path = require('path');
5
+
6
+ const PACKAGE_ROOT = path.resolve(__dirname, '..');
7
+ const USAGE = 'Usage: node agent-bridge/scripts/run-verification-suite.js <replay-negative|dashboard-semantic-gap|smoke>';
8
+
9
+ const SUITES = Object.freeze({
10
+ 'replay-negative': Object.freeze({
11
+ title: 'Replay negative verification suite',
12
+ successLine: 'Expected-failure replay scenarios rejected invalid fixtures deterministically.',
13
+ steps: Object.freeze([
14
+ Object.freeze({
15
+ label: 'corrupt-jsonl',
16
+ args: ['scripts/check-message-replay.js', '--scenario', 'corrupt-jsonl'],
17
+ expectedExitCode: 1,
18
+ }),
19
+ Object.freeze({
20
+ label: 'corrupt-payload',
21
+ args: ['scripts/check-message-replay.js', '--scenario', 'corrupt-payload'],
22
+ expectedExitCode: 1,
23
+ }),
24
+ Object.freeze({
25
+ label: 'corrupt-correction-payload',
26
+ args: ['scripts/check-message-replay.js', '--scenario', 'corrupt-correction-payload'],
27
+ expectedExitCode: 1,
28
+ }),
29
+ Object.freeze({
30
+ label: 'out-of-order',
31
+ args: ['scripts/check-message-replay.js', '--scenario', 'out-of-order'],
32
+ expectedExitCode: 1,
33
+ }),
34
+ ]),
35
+ }),
36
+ 'dashboard-semantic-gap': Object.freeze({
37
+ title: 'Dashboard semantic-gap verification suite',
38
+ successLine: 'Dashboard semantic-gap coverage now passes with canonical edit/delete replay behavior.',
39
+ steps: Object.freeze([
40
+ Object.freeze({
41
+ label: 'edit-delete-semantic-gap',
42
+ args: ['scripts/check-dashboard-control-plane.js', '--scenario', 'edit-delete-semantic-gap'],
43
+ expectedExitCode: 0,
44
+ }),
45
+ ]),
46
+ }),
47
+ smoke: Object.freeze({
48
+ title: 'Verification smoke suite',
49
+ successLine: 'Representative verification smoke checks passed.',
50
+ steps: Object.freeze([
51
+ Object.freeze({
52
+ label: 'runtime-contract',
53
+ args: ['scripts/check-runtime-contract.js'],
54
+ expectedExitCode: 0,
55
+ }),
56
+ Object.freeze({
57
+ label: 'event-schema',
58
+ args: ['scripts/check-event-schema.js'],
59
+ expectedExitCode: 0,
60
+ }),
61
+ Object.freeze({
62
+ label: 'markdown-workspace-contract',
63
+ args: ['scripts/check-markdown-workspace.js'],
64
+ expectedExitCode: 0,
65
+ }),
66
+ Object.freeze({
67
+ label: 'message-replay-healthy',
68
+ args: ['scripts/check-message-replay.js', '--scenario', 'healthy'],
69
+ expectedExitCode: 0,
70
+ }),
71
+ Object.freeze({
72
+ label: 'authority-invariants',
73
+ args: ['scripts/check-invariants.js', '--suite', 'authority'],
74
+ expectedExitCode: 0,
75
+ }),
76
+ Object.freeze({
77
+ label: 'dashboard-control-plane',
78
+ args: ['scripts/check-dashboard-control-plane.js'],
79
+ expectedExitCode: 0,
80
+ }),
81
+ Object.freeze({
82
+ label: 'performance-indexing',
83
+ args: ['scripts/check-performance-indexing.js'],
84
+ expectedExitCode: 0,
85
+ }),
86
+ Object.freeze({
87
+ label: 'provider-capabilities',
88
+ args: ['scripts/check-provider-capabilities.js'],
89
+ expectedExitCode: 0,
90
+ }),
91
+ Object.freeze({
92
+ label: 'api-agent-parity',
93
+ args: ['scripts/check-api-agent-parity.js'],
94
+ expectedExitCode: 0,
95
+ }),
96
+ Object.freeze({
97
+ label: 'dashboard-semantic-gap',
98
+ args: ['scripts/check-dashboard-control-plane.js', '--scenario', 'edit-delete-semantic-gap'],
99
+ expectedExitCode: 0,
100
+ }),
101
+ Object.freeze({
102
+ label: 'migration-hardening',
103
+ args: ['scripts/check-migration-hardening.js'],
104
+ expectedExitCode: 0,
105
+ }),
106
+ Object.freeze({
107
+ label: 'session-lifecycle',
108
+ args: ['scripts/check-session-lifecycle.js'],
109
+ expectedExitCode: 0,
110
+ }),
111
+ Object.freeze({
112
+ label: 'autonomy-v2-decision',
113
+ args: ['scripts/check-autonomy-v2-decision.js'],
114
+ expectedExitCode: 0,
115
+ }),
116
+ Object.freeze({
117
+ label: 'autonomy-v2-watchdog',
118
+ args: ['scripts/check-autonomy-v2-watchdog.js'],
119
+ expectedExitCode: 0,
120
+ }),
121
+ Object.freeze({
122
+ label: 'autonomy-v2-execution',
123
+ args: ['scripts/check-autonomy-v2-execution.js'],
124
+ expectedExitCode: 0,
125
+ }),
126
+ Object.freeze({
127
+ label: 'agent-contract-advisory',
128
+ args: ['scripts/check-agent-contract-advisory.js'],
129
+ expectedExitCode: 0,
130
+ }),
131
+ Object.freeze({
132
+ label: 'managed-team-integration',
133
+ args: ['scripts/check-managed-team-integration.js'],
134
+ expectedExitCode: 0,
135
+ }),
136
+ Object.freeze({
137
+ label: 'lifecycle-hooks',
138
+ args: ['scripts/check-lifecycle-hooks.js'],
139
+ expectedExitCode: 0,
140
+ }),
141
+ Object.freeze({
142
+ label: 'markdown-workspace-safety',
143
+ args: ['scripts/check-markdown-workspace-safety.js'],
144
+ expectedExitCode: 0,
145
+ }),
146
+ Object.freeze({
147
+ label: 'docs-onboarding',
148
+ args: ['scripts/check-docs-onboarding.js'],
149
+ expectedExitCode: 0,
150
+ }),
151
+ Object.freeze({
152
+ label: 'docs-onboarding-stale-reference',
153
+ args: ['scripts/check-docs-onboarding.js', '--simulate-stale', 'launcher_lan'],
154
+ expectedExitCode: 1,
155
+ }),
156
+ ]),
157
+ }),
158
+ });
159
+
160
+ function fail(lines, exitCode = 1) {
161
+ process.stderr.write(lines.join('\n') + '\n');
162
+ process.exit(exitCode);
163
+ }
164
+
165
+ function parseArgs(argv) {
166
+ if (argv.length !== 1) {
167
+ fail([USAGE], 2);
168
+ }
169
+
170
+ const suiteName = argv[0];
171
+ if (!SUITES[suiteName]) {
172
+ fail([
173
+ `Unknown verification suite: ${suiteName}`,
174
+ `Supported suites: ${Object.keys(SUITES).join(', ')}`,
175
+ USAGE,
176
+ ], 2);
177
+ }
178
+
179
+ return suiteName;
180
+ }
181
+
182
+ function formatCapturedOutput(label, output) {
183
+ if (!output || !output.trim()) return [];
184
+ return [
185
+ ` ${label}:`,
186
+ ...output.trimEnd().split(/\r?\n/).map((line) => ` ${line}`),
187
+ ];
188
+ }
189
+
190
+ function runStep(step) {
191
+ const result = spawnSync(process.execPath, step.args, {
192
+ cwd: PACKAGE_ROOT,
193
+ encoding: 'utf8',
194
+ });
195
+
196
+ return {
197
+ status: typeof result.status === 'number' ? result.status : null,
198
+ stdout: result.stdout || '',
199
+ stderr: result.stderr || '',
200
+ error: result.error || null,
201
+ };
202
+ }
203
+
204
+ function main() {
205
+ const suiteName = parseArgs(process.argv.slice(2));
206
+ const suite = SUITES[suiteName];
207
+ const successLines = [suite.title];
208
+
209
+ for (const step of suite.steps) {
210
+ const result = runStep(step);
211
+
212
+ if (result.error) {
213
+ fail([
214
+ `${suite.title} failed.`,
215
+ `Step: ${step.label}`,
216
+ `Command: node ${step.args.join(' ')}`,
217
+ `Process error: ${result.error.message}`,
218
+ ...formatCapturedOutput('stdout', result.stdout),
219
+ ...formatCapturedOutput('stderr', result.stderr),
220
+ ]);
221
+ }
222
+
223
+ if (result.status !== step.expectedExitCode) {
224
+ fail([
225
+ `${suite.title} failed.`,
226
+ `Step: ${step.label}`,
227
+ `Command: node ${step.args.join(' ')}`,
228
+ `Expected exit code: ${step.expectedExitCode}`,
229
+ `Actual exit code: ${result.status === null ? 'null' : result.status}`,
230
+ ...formatCapturedOutput('stdout', result.stdout),
231
+ ...formatCapturedOutput('stderr', result.stderr),
232
+ ]);
233
+ }
234
+
235
+ successLines.push(`- ${step.label} (exit ${step.expectedExitCode} as expected)`);
236
+ }
237
+
238
+ successLines.push(suite.successLine);
239
+ console.log(successLines.join('\n'));
240
+ }
241
+
242
+ main();
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ const REPO_ROOT = path.resolve(__dirname, '..', '..');
7
+ const PACKAGE_ROOT = path.resolve(__dirname, '..');
8
+
9
+ const ARCHITECTURE_DOCS = [
10
+ 'runtime-contract.md',
11
+ 'branch-semantics.md',
12
+ 'canonical-event-schema.md',
13
+ 'markdown-workspace.md',
14
+ 'runtime-migration-hardening.md',
15
+ ];
16
+
17
+ function ensureTrailingNewline(text) {
18
+ return text.endsWith('\n') ? text : `${text}\n`;
19
+ }
20
+
21
+ function removePackagePrefix(text) {
22
+ return text.replace(/(^|[^.])agent-bridge\//gm, '$1');
23
+ }
24
+
25
+ function buildGeneratedHeader(sourceRelativePath) {
26
+ return `<!-- Generated from ${sourceRelativePath} by scripts/sync-packaged-docs.js for published package consumers. -->\n\n`;
27
+ }
28
+
29
+ function transformArchitectureDoc(text) {
30
+ return removePackagePrefix(text);
31
+ }
32
+
33
+ function transformUsageDoc(text) {
34
+ return removePackagePrefix(text)
35
+ .replace(/npm --prefix agent-bridge test/g, 'npm test')
36
+ .replace(/npm --prefix agent-bridge run /g, 'npm run ')
37
+ .replace('Repo root:', 'Package directory:')
38
+ .replace('- `CLAUDE.md`\n', '');
39
+ }
40
+
41
+ function syncFile({ sourcePath, targetPath, sourceRelativePath, transform }) {
42
+ const sourceText = fs.readFileSync(sourcePath, 'utf8');
43
+ const transformedText = ensureTrailingNewline(
44
+ buildGeneratedHeader(sourceRelativePath) + transform(sourceText)
45
+ );
46
+
47
+ fs.mkdirSync(path.dirname(targetPath), { recursive: true });
48
+ fs.writeFileSync(targetPath, transformedText, 'utf8');
49
+ }
50
+
51
+ function main() {
52
+ for (const docName of ARCHITECTURE_DOCS) {
53
+ syncFile({
54
+ sourcePath: path.join(REPO_ROOT, 'docs', 'architecture', docName),
55
+ targetPath: path.join(PACKAGE_ROOT, 'docs', 'architecture', docName),
56
+ sourceRelativePath: path.posix.join('..', 'docs', 'architecture', docName),
57
+ transform: transformArchitectureDoc,
58
+ });
59
+ }
60
+
61
+ syncFile({
62
+ sourcePath: path.join(REPO_ROOT, 'USAGE.md'),
63
+ targetPath: path.join(PACKAGE_ROOT, 'USAGE.md'),
64
+ sourceRelativePath: path.posix.join('..', 'USAGE.md'),
65
+ transform: transformUsageDoc,
66
+ });
67
+ }
68
+
69
+ main();