Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

576 B
Raw Blame
/** Which side of an agent turn a folded message belongs to. */
export type MessageAuthor = 'user' | 'agent';

/**
 * The natural key of a folded message within its session.
 *
 * A turn yields at most one message per side of the conversation, so the turn
 * and the side identify a message.
 */
export interface MessageId {
  readonly turn: number;
  readonly author: MessageAuthor;
}

/** Address the other message in this turn without changing the turn. */
export function withAuthor(id: MessageId, author: MessageAuthor): MessageId {
  return { turn: id.turn, author };
}