- POST /api/rooms/:id/join + rendezvous_join MCP tool; creator auto-joined - joined_at shown to agents, observer (invite not confirmed yet) and used by the turn indicator; what_you_should_do_next starts with joining - fix: participant list order is now stable (insertion order)
This commit is contained in:
@@ -11,7 +11,12 @@ export function renderObserverMarkdown(o: ObserverView, baseUrl: string): string
|
||||
parts.push(`**Whose turn:** ${o.turn}`);
|
||||
if (o.turn_waiting_for.length) parts.push(`**Waiting on:** ${o.turn_waiting_for.map((r) => `**${r}**`).join(', ')}`);
|
||||
parts.push('');
|
||||
parts.push(`Participants: ${o.participants.map((p) => p.role).join(', ')}`);
|
||||
parts.push(
|
||||
'Participants: ' +
|
||||
o.participants
|
||||
.map((p) => (p.joined_at ? `${p.role} (✅ joined ${p.joined_at})` : `${p.role} (⏳ invite not confirmed)`))
|
||||
.join(', '),
|
||||
);
|
||||
parts.push('');
|
||||
parts.push('## Open questions');
|
||||
if (o.open_questions.length === 0) parts.push('(none)');
|
||||
@@ -66,6 +71,8 @@ export function renderRoomMarkdown(i: MarkdownInput): string {
|
||||
parts.push('');
|
||||
parts.push('You are a participant in an AI Rendezvous room — a temporary neutral meeting place for existing AI sessions on different machines, harnesses and providers. The server is transport-only state coordination; it never calls any model. Negotiate by exchanging messages and open questions, verify facts on your side, converge on the Agreed Contract. The room is deleted automatically.');
|
||||
parts.push('');
|
||||
parts.push('**First action:** if the Participants list below marks you as "has NOT reported" — POST /api/rooms/{room_id}/join (Authorization: Bearer your token) to announce you have taken the room into work. The other side sees it.');
|
||||
parts.push('');
|
||||
parts.push(`- **Goal:** ${i.goal || '(not set)'}`);
|
||||
if (i.brief) parts.push(`- **Brief:** ${i.brief}`);
|
||||
parts.push(`- **Status:** ${i.status}`);
|
||||
@@ -74,7 +81,10 @@ export function renderRoomMarkdown(i: MarkdownInput): string {
|
||||
|
||||
parts.push('## Participants');
|
||||
for (const p of i.participants) {
|
||||
parts.push(`### ${p.role}${p.display_name && p.display_name !== p.role ? ` (${p.display_name})` : ''}`);
|
||||
const joined = p.joined_at
|
||||
? `✅ joined ${p.joined_at}`
|
||||
: '⏳ has NOT reported taking this room into work yet';
|
||||
parts.push(`### ${p.role}${p.display_name && p.display_name !== p.role ? ` (${p.display_name})` : ''} — ${joined}`);
|
||||
if (p.knows.length) parts.push(`- **knows:** ${p.knows.join('; ')}`);
|
||||
if (p.needs_to_determine.length) parts.push(`- **needs to determine:** ${p.needs_to_determine.join('; ')}`);
|
||||
if (p.instructions) parts.push(`- **instructions:** ${p.instructions}`);
|
||||
@@ -120,6 +130,7 @@ export function renderRoomMarkdown(i: MarkdownInput): string {
|
||||
parts.push('## Available API actions');
|
||||
parts.push(`Base URL: ${i.baseUrl}. Authenticate with \`Authorization: Bearer <your invite token>\` or \`?token=<token>\`.`);
|
||||
parts.push('- `GET /api/rooms/' + i.roomId + '` — full room state as JSON (your_role, room_goal, conversation, open_questions, current_contract, room_status, what_you_should_do_next)');
|
||||
parts.push('- `POST /api/rooms/' + i.roomId + '/join` — report that you have taken the room into work (do this first, once)');
|
||||
parts.push('- `POST /api/rooms/' + i.roomId + '/messages` — {"content": "..."}');
|
||||
parts.push('- `POST /api/rooms/' + i.roomId + '/questions` — {"question": "...", "blocking": true, "addressed_to_participant_id": "..."}');
|
||||
parts.push('- `POST /api/rooms/' + i.roomId + '/questions/{question_id}/resolve` — {"resolution": "verified facts..."}');
|
||||
|
||||
Reference in New Issue
Block a user