MCPcopy Index your code
hub / github.com/commandoperator/cmdop-sdk / confirm

Method confirm

python/src/cmdop/streaming.py:209–218  ·  view source on GitHub ↗

Answer a ``confirm_required`` frame. ``accept=True`` resumes the stream onto the same id; ``accept=False`` ends it with a rejected DONE.

(self, token: str, accept: bool)

Source from the content-addressed store, hash-verified

207 )
208
209 async def confirm(self, token: str, accept: bool) -> None:
210 """Answer a ``confirm_required`` frame. ``accept=True`` resumes the
211 stream onto the same id; ``accept=False`` ends it with a rejected DONE."""
212 await self._t.write_answer(
213 pb.Envelope(
214 id=self._require_id(),
215 kind=pb.Envelope.KIND_ANSWER,
216 confirm_answer=m_pb.ConfirmAnswer(token=token, accept=accept),
217 )
218 )
219
220 async def collect(self) -> str:
221 """Drain to the final text (the ``done`` frame's text, else accumulated

Calls 2

_require_idMethod · 0.95
write_answerMethod · 0.80