mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-07 22:44:16 +00:00
docs: clarify agent owner trust defaults
This commit is contained in:
@@ -1054,6 +1054,9 @@ export async function agentCommand(
|
||||
return await agentCommandInternal(
|
||||
{
|
||||
...opts,
|
||||
// agentCommand is the trusted-operator entrypoint used by CLI/local flows.
|
||||
// Ingress callers must opt into owner semantics explicitly via
|
||||
// agentCommandFromIngress so network-facing paths cannot inherit this default by accident.
|
||||
senderIsOwner: opts.senderIsOwner ?? true,
|
||||
},
|
||||
runtime,
|
||||
@@ -1067,6 +1070,8 @@ export async function agentCommandFromIngress(
|
||||
deps: CliDeps = createDefaultDeps(),
|
||||
) {
|
||||
if (typeof opts.senderIsOwner !== "boolean") {
|
||||
// HTTP/WS ingress must declare the trust level explicitly at the boundary.
|
||||
// This keeps network-facing callers from silently picking up the local trusted default.
|
||||
throw new Error("senderIsOwner must be explicitly set for ingress agent runs.");
|
||||
}
|
||||
return await agentCommandInternal(
|
||||
|
||||
Reference in New Issue
Block a user