Marmot-TS
    Preparing search index...

    Type Alias SendResult<TEnvelope>

    SendResult:
        | {
            envelope: TEnvelope;
            kind: "applicationMessage";
            newState: ClientState;
        }
        | { envelope: TEnvelope; kind: "proposal"; pending: PendingState }
        | {
            envelope: TEnvelope;
            kind: "groupEvolution";
            pending: PendingState;
            welcome: MlsWelcomeMessage | undefined;
        }
        | { envelope: TEnvelope; kind: "selfUpdate"; pending: PendingState }
        | {
            kind: "foundingGroupCreated";
            pending: PendingState;
            welcome: MlsWelcomeMessage;
        }

    Engine response to MarmotGroupEngine.send.

    Type Parameters

    • TEnvelope

    Type Declaration

    • { envelope: TEnvelope; kind: "applicationMessage"; newState: ClientState }
    • { envelope: TEnvelope; kind: "proposal"; pending: PendingState }
    • {
          envelope: TEnvelope;
          kind: "groupEvolution";
          pending: PendingState;
          welcome: MlsWelcomeMessage | undefined;
      }
    • { envelope: TEnvelope; kind: "selfUpdate"; pending: PendingState }
    • {
          kind: "foundingGroupCreated";
          pending: PendingState;
          welcome: MlsWelcomeMessage;
      }
      • kind: "foundingGroupCreated"

        Result of a "foundingAdd" send. Deliberately has NO envelope member:

        (a) Per refs/marmot/protocol-core/joining.md lines 21-30 and refs/marmot/protocol-core/publish-lifecycle.md lines 66-78, the founding Add has an empty publication obligation, so no transport envelope exists for it — the absence of this field is the type-level expression of FOUND-01, not merely an unpublished envelope. (b) The caller MUST hand pending straight to confirmPublished() in the same uninterrupted continuation with no intervening await (D-01). This invariant is convention, not enforced by this signature (R-01) — callers must be tested, not trusted. (c) pending.kind is "commit" (see PendingState's doc comment), so the existing commit-recording branch of confirmPublished() applies to it unchanged.

      • pending: PendingState
      • welcome: MlsWelcomeMessage