MCPcopy
hub / github.com/slopus/happy / enqueueMessage

Method enqueueMessage

packages/happy-cli/src/api/apiSession.ts:675–684  ·  view source on GitHub ↗
(content: unknown, invalidate: boolean = true)

Source from the content-addressed store, hash-verified

673 }
674
675 private enqueueMessage(content: unknown, invalidate: boolean = true) {
676 const encrypted = encodeBase64(encrypt(this.encryptionKey, this.encryptionVariant, content));
677 this.pendingOutbox.push({
678 content: encrypted,
679 localId: randomUUID()
680 });
681 if (invalidate) {
682 this.sendSync.invalidate();
683 }
684 }
685
686 private enqueueSessionProtocolEnvelopes(envelopes: SessionEnvelope[], invalidate: boolean = true) {
687 for (let i = 0; i < envelopes.length; i += 1) {

Callers 4

sendCodexMessageMethod · 0.95
sendAgentMessageMethod · 0.95
sendSessionEventMethod · 0.95

Calls 4

encodeBase64Function · 0.90
encryptFunction · 0.90
pushMethod · 0.65
invalidateMethod · 0.45

Tested by

no test coverage detected