Skip to content

MoralMod live for edgecity-goa: hosted-agent consult + assessment service - #1873

Closed
serefyarar wants to merge 2 commits into
devfrom
feat/moralmod-edgecity-goa
Closed

serefyarar wants to merge 2 commits into
devfrom
feat/moralmod-edgecity-goa

Conversation

@serefyarar

Copy link
Copy Markdown
Contributor

Index hosts the negotiators for edgecity-goa residents, so this wires MoralMod end to end for that one network. Dormant everywhere until MORALMOD_ASSESSMENT_URL is set on hosted-agents.

What's here

  • Agent — negotiate() honours optional per-turn assessment guidance again (the reviewed implementation from PR Idempotent negotiation turns (clientTurnId) + MoralMod decoupling decision #1870's history: tie → plain-worded stall before any model call, validated assessment_choice/divergence/reason, byte-identical without guidance).
  • Hosted agent — builds the moralmod hook from env. Scope is network membership: members of MORALMOD_NETWORK_KEY (default edgecity-goa) get the consult, cached 60s; everyone else untouched. Exposure events land in opportunity_events (moralmod. client types reserved), optional identity-stripped relay.
  • services/moralmod-assessment — the moralmod-consult-0 service: FastAPI around the lab's flexible-moral-reasoning pipeline (f17d52c, with their cooperation). Lab-faithful input rendering (sorted-JSON vignette, no candidate menu — the model infers scientific actions as their production does), mutual-benefit mode by default (no severity calibration), name-folded participant matching, results in the shape @indexnetwork/moralmod validates with per-action descriptions.

Verified locally

Service boot + auth + run lifecycle round-tripped with the real @indexnetwork/moralmod consult client (wrong token refused; keyless run → clean unavailable → client null → hook falls back, so the village never blocks on this service). Full pipeline import path (jax→dspy→modules→service loader) resolves on Python 3.13. agent/moralmod/api: tests green during development, tsc + eslint clean.

To go live (deploy steps)

  1. Railway: new service from services/moralmod-assessment (Dockerfile; build secret github_token for the private pipeline repo), vars per .env.example — needs the lab's TYPESAFE_API_KEY; every run calls their TypeSafe "Jev" model, no flag to skip. Without it: service healthy, all turns fall back plain.
  2. hosted-agents: MORALMOD_ASSESSMENT_URL=http://<service>.railway.internal:8080, MORALMOD_ASSESSMENT_TOKEN.
  3. Confirm the network key: scope defaults to edgecity-goa (networks.key).

🤖 Generated with Claude Code

serefyarar and others added 2 commits October 27, 2026 11:57
…osted agent

The agent's negotiate() honours optional per-turn assessment guidance
again (reviewed state restored from PR #1870 history), and the hosted
agent builds the moralmod hook from env: members of the network named by
MORALMOD_NETWORK_KEY (default edgecity-goa) get the consult; everyone
else and every deployment without MORALMOD_ASSESSMENT_URL runs untouched.
Exposure events land in opportunity_events ('moralmod.' client types are
reserved), with an identity-stripped optional relay.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
services/moralmod-assessment: FastAPI service Index's hosted agent
consults before edgecity-goa members' turns. Wraps
flexible-moral-reasoning @ f17d52c (with the lab's cooperation):
sorted-JSON vignette per the lab's own input conventions, no candidate
menu (the model infers scientific actions, as their production does),
mutual-benefit mode by default, name-folded participant matching, and
results in the DecisionRunResult shape @indexnetwork/moralmod validates,
with per-action descriptions. Runs need OPENROUTER_API_KEY and the lab's
TYPESAFE_API_KEY; without them the service answers unavailable and every
turn falls back to the plain negotiator. Verified locally: boot, auth,
run lifecycle round-tripped with the real consult client, and the full
pipeline import path resolves on Python 3.13.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@serefyarar

Copy link
Copy Markdown
Contributor Author

Superseded: MoralMod will run as a separate custom-negotiator deployment on Railway for edgecity-goa members; nothing embeds in Index.

@serefyarar serefyarar closed this Oct 27, 2026
@serefyarar
serefyarar deleted the feat/moralmod-edgecity-goa branch October 27, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant