feat(tooling): ✨ add claude-player-mcp tooling
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
db9c0e14e8
commit
300ec0c76d
2 changed files with 1740 additions and 8 deletions
1725
tooling/claude-player-mcp/package-lock.json
generated
Normal file
1725
tooling/claude-player-mcp/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -166,14 +166,21 @@ export class HarnessClient {
|
|||
|
||||
function toResponse(obj: Record<string, unknown>): Response | null {
|
||||
if (obj["ok"] === true && typeof obj["view"] === "object" && obj["view"] !== null) {
|
||||
const ok: OkResponse = {
|
||||
id: (obj["id"] as number | null) ?? null,
|
||||
ok: true,
|
||||
view: obj["view"] as OkResponse["view"],
|
||||
events: Array.isArray(obj["events"])
|
||||
? (obj["events"] as OkResponse["events"])
|
||||
: [],
|
||||
};
|
||||
const events = Array.isArray(obj["events"])
|
||||
? (obj["events"] as Array<Record<string, unknown>>)
|
||||
: undefined;
|
||||
const ok: OkResponse = events === undefined
|
||||
? {
|
||||
id: (obj["id"] as number | null) ?? null,
|
||||
ok: true,
|
||||
view: obj["view"] as OkResponse["view"],
|
||||
}
|
||||
: {
|
||||
id: (obj["id"] as number | null) ?? null,
|
||||
ok: true,
|
||||
view: obj["view"] as OkResponse["view"],
|
||||
events,
|
||||
};
|
||||
return ok;
|
||||
}
|
||||
if (obj["ok"] === false && typeof obj["error"] === "object" && obj["error"] !== null) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue