let-them-talk 5.3.0 → 5.4.1

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 +346 -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 +864 -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 +141 -34
  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 +9577 -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,139 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ const DOC_PATH = path.resolve(__dirname, '..', '..', 'docs', 'architecture', 'branch-semantics.md');
7
+ const DOC_DISPLAY_PATH = 'docs/architecture/branch-semantics.md';
8
+ const USAGE = 'Usage: node agent-bridge/scripts/check-branch-semantics.js [--simulate-missing <key>]';
9
+
10
+ const REQUIRED_HEADINGS = [
11
+ { key: 'two_bucket_scope_model', heading: '## Two-bucket scope model' },
12
+ { key: 'runtime_global_bucket', heading: '### Runtime-global bucket' },
13
+ { key: 'branch_local_bucket', heading: '### Branch-local bucket' },
14
+ { key: 'fork_time_snapshot_semantics', heading: '## Fork-time snapshot semantics' },
15
+ { key: 'inherited_branch_local_state', heading: '### Inherited branch-local state' },
16
+ { key: 'session_and_evidence_snapshot_rules', heading: '### Session and evidence snapshot rules' },
17
+ { key: 'branch_local_read_write_resolution', heading: '## Branch-local read/write resolution' },
18
+ { key: 'read_resolution', heading: '### Read resolution' },
19
+ { key: 'write_resolution', heading: '### Write resolution' },
20
+ { key: 'domain_matrix', heading: '## Domain matrix' },
21
+ { key: 'current_leak_points', heading: '## Current leak points / migration-first priorities' },
22
+ { key: 'validation_path', heading: '## Validation path' },
23
+ ];
24
+
25
+ const REQUIRED_SNIPPETS = [
26
+ { key: 'copy_on_fork_rule', snippet: 'Snapshot inheritance is copy-on-fork, not a live overlay.' },
27
+ { key: 'no_branch_fallback_rule', snippet: 'A branch-local read MUST NOT fall back to another branch, to `main`, or to a shared global collaboration file.' },
28
+ { key: 'active_session_rule', snippet: 'Active sessions do not stay live across a fork, and the target branch does not start with copied session manifests or cloned live execution.' },
29
+ { key: 'governance_branch_local_rule', snippet: '- decisions, KB, reviews, dependencies, votes, rules, and progress,' },
30
+ { key: 'fork_governance_snapshot_rule', snippet: '- governance state such as decisions, KB, reviews, dependencies, votes, rules, and progress,' },
31
+ { key: 'no_remaining_governance_gap_rule', snippet: 'There are no remaining agent-visible collaboration surfaces that intentionally resolve through shared compatibility governance files in the shipped runtime.' },
32
+ { key: 'next_domains_done_rule', snippet: 'Tasks, workflows, delivery/read state, conversation control, non-general channels, workspaces, governance surfaces, sessions, and evidence are already in the shipped branch-local slice.' },
33
+ { key: 'matrix_delivery_row', snippet: '| Delivery/read markers (`consumed-*`, acknowledgements, read receipts, compressed history) |' },
34
+ { key: 'matrix_conversation_row', snippet: '| Conversation metadata and non-general channels |' },
35
+ { key: 'matrix_tasks_row', snippet: '| Tasks |' },
36
+ { key: 'matrix_workflows_row', snippet: '| Workflows |' },
37
+ { key: 'matrix_workspaces_row', snippet: '| Workspaces |' },
38
+ { key: 'matrix_governance_row', snippet: '| Decisions / KB / reviews / dependencies / votes / rules / progress |' },
39
+ { key: 'matrix_sessions_row', snippet: '| Sessions / evidence |' },
40
+ { key: 'matrix_global_row', snippet: '| Agent registry / profiles |' },
41
+ ];
42
+
43
+ function fail(message, exitCode) {
44
+ console.error(message);
45
+ process.exit(exitCode);
46
+ }
47
+
48
+ function parseArgs(argv) {
49
+ if (argv.length === 0) {
50
+ return { simulateMissingKey: null };
51
+ }
52
+
53
+ if (argv.length === 2 && argv[0] === '--simulate-missing') {
54
+ const simulateMissingKey = argv[1];
55
+ const supportedKeys = [
56
+ ...REQUIRED_HEADINGS.map((item) => item.key),
57
+ ...REQUIRED_SNIPPETS.map((item) => item.key),
58
+ ];
59
+
60
+ if (!supportedKeys.includes(simulateMissingKey)) {
61
+ fail(
62
+ [
63
+ `Unknown key for --simulate-missing: ${simulateMissingKey}`,
64
+ `Supported keys: ${supportedKeys.join(', ')}`,
65
+ USAGE,
66
+ ].join('\n'),
67
+ 2
68
+ );
69
+ }
70
+
71
+ return { simulateMissingKey };
72
+ }
73
+
74
+ fail(USAGE, 2);
75
+ }
76
+
77
+ function collectHeadings(markdown) {
78
+ return new Set(
79
+ markdown
80
+ .split(/\r?\n/)
81
+ .map((line) => line.trimEnd())
82
+ .filter((line) => /^(##|###)\s+/.test(line))
83
+ );
84
+ }
85
+
86
+ function main() {
87
+ const { simulateMissingKey } = parseArgs(process.argv.slice(2));
88
+
89
+ if (!fs.existsSync(DOC_PATH)) {
90
+ fail(`Branch semantics validation failed.\nMissing file: ${DOC_DISPLAY_PATH}`, 1);
91
+ }
92
+
93
+ const markdown = fs.readFileSync(DOC_PATH, 'utf8');
94
+ const headings = collectHeadings(markdown);
95
+ const problems = [];
96
+
97
+ for (const item of REQUIRED_HEADINGS) {
98
+ if (item.key === simulateMissingKey) {
99
+ problems.push(`- ${item.key}: ${item.heading}`);
100
+ continue;
101
+ }
102
+
103
+ if (!headings.has(item.heading)) {
104
+ problems.push(`- ${item.key}: ${item.heading}`);
105
+ }
106
+ }
107
+
108
+ for (const item of REQUIRED_SNIPPETS) {
109
+ if (item.key === simulateMissingKey) {
110
+ problems.push(`- ${item.key}: ${item.snippet}`);
111
+ continue;
112
+ }
113
+
114
+ if (!markdown.includes(item.snippet)) {
115
+ problems.push(`- ${item.key}: ${item.snippet}`);
116
+ }
117
+ }
118
+
119
+ if (problems.length > 0) {
120
+ const lines = ['Branch semantics validation failed.', `Checked file: ${DOC_DISPLAY_PATH}`];
121
+
122
+ if (simulateMissingKey) {
123
+ lines.push(`Simulated missing key: ${simulateMissingKey}`);
124
+ }
125
+
126
+ lines.push('Missing required branch semantics contract markers:');
127
+ lines.push(...problems);
128
+ fail(lines.join('\n'), 1);
129
+ }
130
+
131
+ console.log([
132
+ 'Branch semantics validation passed.',
133
+ `Checked file: ${DOC_DISPLAY_PATH}`,
134
+ `Validated ${REQUIRED_HEADINGS.length} required headings.`,
135
+ `Validated ${REQUIRED_SNIPPETS.length} required branch markers.`,
136
+ ].join('\n'));
137
+ }
138
+
139
+ main();