@@ -1,8 +1,6 @@
11 import type { SpaceMoltClient } from "../client/src/client";
2-import type { EmpireID } from "../client/src/types";
32 import { ACTION_DEFINITIONS, MAX_MISSION_LENGTH } from "./constants";
43 import type { ActionDecision } from "./types";
5-import { isValidEmpire } from "./utils";
64
75 export { MAX_MISSION_LENGTH, PERSONALITY_ARCHETYPES } from "./constants";
86 export type { ActionDecision, PersonalityType } from "./types";
@@ -109,31 +107,6 @@ export function validateAction(decision: unknown): {
109107 }
110108 }
111109
112- if (action === "register") {
113- const username = String(args.username ?? "").trim();
114- const empire = String(args.empire ?? "").trim();
115- if (!username) {
116- return { ok: false, error: "register.username is required" };
117- }
118- if (!empire) {
119- return { ok: false, error: "register.empire is required" };
120- }
121- if (!isValidEmpire(empire)) {
122- return { ok: false, error: "register.empire is invalid" };
123- }
124- }
125-
126- if (action === "login") {
127- const username = String(args.username ?? "").trim();
128- const token = String(args.token ?? "").trim();
129- if (!username) {
130- return { ok: false, error: "login.username is required" };
131- }
132- if (!token) {
133- return { ok: false, error: "login.token is required" };
134- }
135- }
136-
137110 if (action === "forum") {
138111 if (args.page !== undefined) {
139112 const page = Number(args.page);
@@ -234,15 +207,6 @@ export function dispatchAction(
234207 const args = decision.args ?? {};
235208
236209 switch (decision.action) {
237- case "register":
238- client.register(String(args.username), String(args.empire) as EmpireID);
239- return `register ${String(args.username)}`;
240- case "login":
241- client.login(String(args.username), String(args.token));
242- return `login ${String(args.username)}`;
243- case "logout":
244- client.logout();
245- return "logout";
246210 case "travel":
247211 client.travel(String(args.target_poi));
248212 return `travel ${String(args.target_poi)}`;