Files
next-tjwater-agent/.opencode/tools/reply_agent_message.ts
T
jiang 6a49d2209e feat(agent): unify MCP tools and adopt Responses delivery
Move project and host queries into native MCP with host-owned OAuth/context,
while retaining memory, skills, actions and publication plugins. Add nearby-model
queries and explicit chat/task/learning model defaults.

Adopt Responses HTTP/SSE and native steer/queue inbox delivery, preserving scoped
session ownership, pending input edits and investigation communication.

Disable local-provider discovery: Server /health allowed native vLLM to probe
/v1/models on port 8000. A native before/after regression prevents recurrence.

Validation: 170 focused Bun tests; service/plugin typechecks; native discovery,
provider-discovery and input-inbox smoke checks; no paid model inference.
2026-10-19 18:46:58 +08:00

12 lines
975 B
TypeScript

import { agentMessageTool } from "../agent-messages.js";
import { tool } from "../tool.js";
export default agentMessageTool("reply", {
description: "Reply to a specific stable message_id returned by mcp_tjwater_read_agent_messages in this conversation's authorized thread or bound investigation run. Use a stable UUID request_id reused for retries. Provide a useful substantive response, not automatic acknowledgement ping-pong. The bridge resolves the recipient from the original message; no arbitrary session target is accepted. Queued means accepted for delivery, not processed. A reply retains originalMessage provenance, does not create human evidence or a new investigation round, and does not wake an idle main conversation.",
args: {
message_id: tool.schema.string().uuid(),
message: tool.schema.string().min(1).max(8000),
request_id: tool.schema.string().uuid().describe("Stable UUID idempotency key; reuse when retrying this same reply"),
},
});