feat(runtime): survival-bot pivot — MC chat is dialog-only (Phase 0) (#12)
Phase 0 of plans/autonomous-survival-bot-prd.md: change the product direction from operator-driven remote control to autonomous survival resident. MC chat is dialog-only for everyone, including OPERATOR_USERNAMES — commands like come/follow/build/pause/stop are recorded in the diary but not dispatched. TUI remains the only local control plane. Runtime changes: - Remove operatorGoalReflex from reflex.js (the come-here chat command). - Replace handleOperatorChat in bot.js with a dialog-only handleChat that answers greetings/status questions and records command-like verbs (en+ru) without dispatching them. - Default MC_VERSION to "auto" in runtime/config.js; mineflayer receives `false` to trigger version auto-detection. - Update auto-escalation prompt's reflex chain summary. Docs: - AGENTS.md: product pivot notice up top; chat-driven scope-trust is flagged as legacy/Pi-only. - README.md / docs/runtime.md: replace operator-chat command list with dialog-only description; update reflex chain summary. - docs/roadmap.md: Phase 2/3 marked superseded by the PRD where they assumed chat-driven control. Co-authored-by: Yuriy Mayatnikov <mayatnikov@me.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit was merged in pull request #12.
This commit is contained in:
+4
-29
@@ -12,7 +12,6 @@ import {
|
||||
fleeFrom,
|
||||
eatBestFood,
|
||||
sleepInBed,
|
||||
goTo,
|
||||
chopNearestTree,
|
||||
wander,
|
||||
craftPlanks,
|
||||
@@ -32,34 +31,11 @@ const REFLEX_LOG = "reflex";
|
||||
// { action: "completed", kind, detail } — fully sync, already done
|
||||
// Reflexes must NEVER throw — they log and return noop on failure.
|
||||
|
||||
// ---- operator goal reflex --------------------------------------------------
|
||||
|
||||
// Highest priority: if the operator gave a "come here" / "follow me" command,
|
||||
// satisfy that before anything else (except defending if HP is critical).
|
||||
function operatorGoalReflex(ctx) {
|
||||
const goal = ctx.operatorGoal;
|
||||
if (!goal) return { action: "noop" };
|
||||
if (goal.kind === "come") {
|
||||
ctx.dispatch(
|
||||
() => goTo(ctx.bot, goal.x, goal.y, goal.z, 2),
|
||||
`operator-come(${goal.from})`,
|
||||
{
|
||||
onComplete: (res) => {
|
||||
if (res.ok) {
|
||||
ctx.bot.chat(`${goal.from}: arrived.`);
|
||||
} else {
|
||||
ctx.bot.chat(`${goal.from}: couldn't reach you (${res.detail}).`);
|
||||
}
|
||||
ctx.clearOperatorGoal();
|
||||
},
|
||||
},
|
||||
);
|
||||
return { action: "dispatched", kind: "operator-come", label: `come ${goal.x},${goal.y},${goal.z}` };
|
||||
}
|
||||
return { action: "noop" };
|
||||
}
|
||||
|
||||
// ---- defend ----------------------------------------------------------------
|
||||
//
|
||||
// Note: MC chat is dialog-only as of Phase 0 of the survival-bot PRD. There is
|
||||
// no operator-goal reflex anymore — operator/player chat cannot create a
|
||||
// movement/build/mining task. TUI is the only local control plane.
|
||||
|
||||
function defendReflex(ctx) {
|
||||
const s = ctx.snapshot;
|
||||
@@ -298,7 +274,6 @@ function idleReflex(ctx) {
|
||||
}
|
||||
|
||||
const REFLEXES = [
|
||||
{ name: "operator-goal", fn: operatorGoalReflex },
|
||||
{ name: "defend", fn: defendReflex },
|
||||
{ name: "eat", fn: eatReflex },
|
||||
{ name: "sleep", fn: sleepReflex },
|
||||
|
||||
Reference in New Issue
Block a user