UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

21 lines • 816 B
/** * The answers the delegated-connection gate gives (senpi#5632, senpi#4249 R-1b d1): an ordinary response in the * router's error shape, or, for a private presenter record on a delegated connection, the private reply shape * `handleMcpForm` writes, so a forwarder routes it by type and never to a pending command. */ export function requestId(record) { const id = Reflect.get(record, "id"); return typeof id === "string" ? id : undefined; } export function refused(id, command, code, message, data) { return { ...(id === undefined ? {} : { id }), type: "response", command, success: false, error: `${code}: ${message}`, errorCode: code, ...(data === undefined ? {} : { errorData: data }), }; } //# sourceMappingURL=delegation-wire.js.map