playerthree/manifest

The game definition contract (SPEC §3 Game description, §10 Adapter contract): the declarative GameManifest (checked by defineManifest), the GameAdapter a game implements, built-in bots, and the GameDefinition that bundles them; plus the fixed caps on agent-served text.

Interfaces

BotCommander

Defined in: packages/playerthree/src/manifest.ts:398

A built-in (developer-written, native) commander. Uses exactly the same intents as agents.

Type Parameters

Type ParameterDefault type
M extends AnyManifestAnyManifest

Methods

init()?
init?(matchData): void;

Defined in: packages/playerthree/src/manifest.ts:400

Runs once before think, with guarded seat-visible match data (null when no schema is declared).

Parameters
ParameterType
matchDataMatchDataOf<M> | null
Returns

void

think()
think(obs): IntentOf<M>[];

Defined in: packages/playerthree/src/manifest.ts:401

Parameters
ParameterType
obsInfer<M["observation"]>
Returns

IntentOf<M>[]


ChatMode

Defined in: packages/playerthree/src/manifest.ts:109

Properties

PropertyModifierTypeDescriptionDefined in
maxSayCharsreadonlynumberLongest agent reply, chars (≤ 280).packages/playerthree/src/manifest.ts:113
maxTellCharsreadonlynumberLongest owner message, chars (≤ 500).packages/playerthree/src/manifest.ts:111
ping?readonlySchemaOptional typed attachment an owner can add to a message, e.g. a map point (closed vocabulary).packages/playerthree/src/manifest.ts:115

ControlModes

Defined in: packages/playerthree/src/manifest.ts:86

manifest.control: the control modes a game offers its seats (absent optional modes are unavailable).

Properties

PropertyModifierTypeDescriptionDefined in
chat?readonlyChatModeOwner ↔ own-agent chat: the seat's owner (and nobody else) can message their agents; agents reply to their owner only (game_say). Third-party text never reaches an agent; policies never receive chat.packages/playerthree/src/manifest.ts:102
intentsreadonlyIntentModeDirect control at LLM pace. Always present.packages/playerthree/src/manifest.ts:88
pausable?readonlyPauseModewhenAbsent: 'pause' is allowed: the host stops stepping while such a seat's agent is absent.packages/playerthree/src/manifest.ts:104
policy?readonlyPolicyLimitsAgent-written code at tick rate.packages/playerthree/src/manifest.ts:91
pool?readonlyPoolModePublish policies so they can fight other people (and humans) when you are offline.packages/playerthree/src/manifest.ts:97
practice?readonlyPracticeLimitsHeadless sparring against built-in opponents.packages/playerthree/src/manifest.ts:95
sequence?readonlySequenceMode-packages/playerthree/src/manifest.ts:89
signals?readonlySignalLimitsTeam signals (with manifest.signals): the per-seat rate, open-signal cap and lifetimes.packages/playerthree/src/manifest.ts:106
stream?readonlyStreamModeDirect control at tick rate (fast/cheap/realtime models).packages/playerthree/src/manifest.ts:93

GameAdapter

Defined in: packages/playerthree/src/manifest.ts:405

One running match of a game.

Type Parameters

Type ParameterDefault type
M extends AnyManifestAnyManifest

Properties

PropertyModifierTypeDefined in
manifestreadonlyMpackages/playerthree/src/manifest.ts:406
tickreadonlynumberpackages/playerthree/src/manifest.ts:407

Methods

apply()
apply(
   seat, 
   intent, 
   context?
): ApplyResult<M>;

Defined in: packages/playerthree/src/manifest.ts:456

Intent is already schema-validated and role-checked. Omitted context means an explicit direct/owner call.

Parameters
ParameterType
seatSeat<M>
intentIntentOf<M>
context?IntentContext
Returns

ApplyResult<M>

clone()?
clone?(): GameAdapter<M>;

Defined in: packages/playerthree/src/manifest.ts:440

Optional independent in-memory checkpoint. Copy all mutable state, RNG and caches; never share them.

Returns

GameAdapter<M>

debugView()?
debugView?(): unknown;

Defined in: packages/playerthree/src/manifest.ts:416

Optional bounded JSON snapshot of unfogged state. Developer-only; never sent to players or agents.

Returns

unknown

end()?
end?(outcomes, ranks): void;

Defined in: packages/playerthree/src/manifest.ts:424

Optional: the host ended the session early (PlayerThreeMatch.end, e.g. from the operator console) with these outcomes and placements for every match team. Adopt them so the game's own outcome, views and reports agree. Without it the host still reports the declared outcomes, but the game's views and reports keep whatever the game last decided.

Parameters
ParameterType
outcomesPartial<Record<TeamOf<M>, FinalOutcome>>
ranksPartial<Record<TeamOf<M>, number>>
Returns

void

events()
events(seat, sinceTick): Infer<M["event"]>[];

Defined in: packages/playerthree/src/manifest.ts:460

Events visible to a seat with tick > sinceTick, oldest first. Each must conform to manifest.event.

Parameters
ParameterType
seatSeat<M>
sinceTicknumber
Returns

Infer<M["event"]>[]

forfeit()?
forfeit?(team): void;

Defined in: packages/playerthree/src/manifest.ts:431

Optional: the match team concedes now (PlayerThreeMatch.forfeit); take it out of play while the others play on, and report its final outcome from outcome(team) once the game decides it (now or at a later step). Called before step() of the current tick and recorded in replays, so it MUST be deterministic like apply. Called at most once per team, only while the team's outcome is not final. Without it PlayerThreeMatch.forfeit fails invalid.

Parameters
ParameterType
teamInfer<M["teams"]>
Returns

void

matchData()?
matchData?(seat): MatchDataOf<M>;

Defined in: packages/playerthree/src/manifest.ts:454

Required when manifest.matchData is declared. Must enforce the seat's perspective.

Parameters
ParameterType
seatSeat<M>
Returns

MatchDataOf<M>

observe()
observe(
   seat, 
   sinceTick, 
   detail
): GameObservationOf<M>;

Defined in: packages/playerthree/src/manifest.ts:446

Must conform to manifest.observation, minus the host-owned signals member when signals are declared. Events after sinceTick; bootstrap is delivered separately. detail: the sections to render in full, in manifest order (empty without observationScope); summarise the others.

Parameters
ParameterType
seatSeat<M>
sinceTicknumber
detailreadonly SectionOf<M>[]
Returns

GameObservationOf<M>

observerView()?
observerView?(): unknown;

Defined in: packages/playerthree/src/manifest.ts:418

Required for omniscient observers when manifest.observer is declared; must conform to that schema.

Returns

unknown

outcome()
outcome(team): Outcome;

Defined in: packages/playerthree/src/manifest.ts:409

Parameters
ParameterType
teamInfer<M["teams"]>
Returns

Outcome

rank()?
rank?(team): number;

Defined in: packages/playerthree/src/manifest.ts:438

Optional final placement of a match team, read once every match team's outcome is final: 1 is best, tied teams share a rank and the next rank skips (1, 2, 2, 4), allies share their alliance's rank, and ranks count alliances (or lone teams), never members. Without it, or when the ranks break these rules, the host ranks by outcome: win, then draw, then loss.

Parameters
ParameterType
teamInfer<M["teams"]>
Returns

number

report()
report(team): Infer<M["report"]>;

Defined in: packages/playerthree/src/manifest.ts:458

Must conform to manifest.report.

Parameters
ParameterType
teamInfer<M["teams"]>
Returns

Infer<M["report"]>

setSeatInfo()
setSeatInfo(seat, info): void;

Defined in: packages/playerthree/src/manifest.ts:462

Server informs the game so it can render controller badges and enforce mandate limits.

Parameters
ParameterType
seatSeat<M>
info{ controller: "human" | "policy" | "agent" | "bot" | "none"; mandate: MandateOf<M>; }
info.controller"human" | "policy" | "agent" | "bot" | "none"
info.mandateMandateOf<M>
Returns

void

signalLimits()?
signalLimits?(): SignalLimits | null;

Defined in: packages/playerthree/src/manifest.ts:452

Optional, with manifest.signals: this match's signal limits, each at most the manifest's control.signals (a match may narrow, never widen them), or null when this match has signals off (every signal intent then fails disabled). Read once when the match (or a replay of it) is created. Without it the manifest's limits apply.

Returns

SignalLimits | null

step()
step(): void;

Defined in: packages/playerthree/src/manifest.ts:408

Returns

void

view()
view(team, opts?): GameViewOf<M>;

Defined in: packages/playerthree/src/manifest.ts:414

Must conform to manifest.view. snapshot is true when a client starts watching (its first view) and false for the periodic broadcast, so a game can send static, slow-changing parts (a map) only when they are needed.

Parameters
ParameterType
teamInfer<M["teams"]>
opts?{ snapshot: boolean; }
opts.snapshotboolean
Returns

GameViewOf<M>


GameDefinition

Defined in: packages/playerthree/src/manifest.ts:484

Factory for matches: used for live rooms and headless practice.

Type Parameters

Type ParameterDefault type
M extends AnyManifestAnyManifest

Properties

PropertyModifierTypeDescriptionDefined in
botOptions?readonlyObjS<Fields>Game-owned schema for deterministic built-in bot strategy options.packages/playerthree/src/manifest.ts:494
manifestreadonlyM-packages/playerthree/src/manifest.ts:485

Methods

create()
create(opts): GameAdapter<M>;

Defined in: packages/playerthree/src/manifest.ts:490

A new match of the given sides (teams ⊆ manifest teams, never empty; alliances only when the match declares them). A game that cannot play a side set throws; the host never invents phantom sides.

Parameters
ParameterType
optsobject & MatchSides<M>
Returns

GameAdapter<M>

createBot()
createBot(
   seat, 
   opponent, 
   options?
): BotCommander<M>;

Defined in: packages/playerthree/src/manifest.ts:492

Built-in bot at a given strength for a seat.

Parameters
ParameterType
seatSeat<M>
opponentInfer<M["opponents"]>
options?Record<string, number | boolean>
Returns

BotCommander<M>

metrics()?
metrics?(game, options?): GameMetricRecorder;

Defined in: packages/playerthree/src/manifest.ts:496

Optional game-owned, observational benchmark recorder for this adapter instance.

Parameters
ParameterType
gameGameAdapter<M>
options?{ sampleEveryTicks?: number; }
options.sampleEveryTicks?number
Returns

GameMetricRecorder


GameManifest

Defined in: packages/playerthree/src/manifest.ts:202

Everything a game exposes to agents. All text here is static developer text (trusted). All data schemas are closed-vocabulary (see schema.ts). The manifest is plain JSON-able data, so non-JS engines can author it and speak the wire protocol directly.

Type Parameters

Type ParameterDefault type
Teams extends EnumSEnumS
Roles extends EnumSEnumS
Intents extends Record<string, IntentDef>Record<string, IntentDef>
Obs extends SchemaSchema
View extends SchemaSchema
Directive extends ObjSObjS
Errors extends EnumSEnumS
Opponents extends EnumSEnumS
Report extends SchemaSchema
Event extends ObjSObjS

Properties

PropertyModifierTypeDescriptionDefined in
controlreadonlyControlModes-packages/playerthree/src/manifest.ts:274
directivereadonlyDirectiveTyped owner → agent guidance. Owner free text is the separate opt-in control.chat mode (own agents only).packages/playerthree/src/manifest.ts:250
docreadonlystringCore rules every seat reads first (≤ DOC_MAX). Details belong in topics.packages/playerthree/src/manifest.ts:218
errorsreadonlyErrorsGame-level apply() failure codes.packages/playerthree/src/manifest.ts:254
eventreadonlyEventOne game event as seen by a seat. MUST have tick: int and kind: enum fields; the host uses them for wait({ until }) and DevTools.packages/playerthree/src/manifest.ts:263
idreadonlystring-packages/playerthree/src/manifest.ts:214
intentsreadonlyIntents-packages/playerthree/src/manifest.ts:229
limits?readonlyObjS<Fields>Owner house rules enforced by the game in apply(); every field must be t.opt.packages/playerthree/src/manifest.ts:252
lobby?readonlyObjS<Fields>Closed pre-match summary of the match a seat is reserved or held for (e.g. map, layout, rules summary), shown to its agent as the lobby state's match (phase lobby). The game supplies it per reservation or match.packages/playerthree/src/manifest.ts:248
matchData?readonlyObjS<Fields>Closed, immutable, seat-visible bootstrap data supplied with an in-match briefing.packages/playerthree/src/manifest.ts:243
matchOptions?readonlyObjS<Fields>Options chosen when a match is created (closed vocabulary, e.g. a map preset). Every field must be t.opt: a missing option means the game's default. The host validates options before create() sees them.packages/playerthree/src/manifest.ts:268
observationreadonlyObsSeat-focused, fogged agent observation. Also the input to policies. A top-level phase field is reserved (lobby state).packages/playerthree/src/manifest.ts:231
observationScope?readonlyObservationScopeOptional observation detail (spec §3 Observation scope): closed section names and, per role, the sections its observation renders in full by default. The rest come as the game's compact summaries; agents widen the detail per call, policies per artifact, built-in bots always get every section. Without it every detail is empty.packages/playerthree/src/manifest.ts:237
observer?readonlySchemaFull battlefield/public side state only; never internal debug, policy, chat or owner state.packages/playerthree/src/manifest.ts:241
opponentsreadonlyOpponentsPractice opponents (built-in bots), weakest first.packages/playerthree/src/manifest.ts:256
reportreadonlyReportAfter-action report for one team.packages/playerthree/src/manifest.ts:258
roleDocsreadonlyobjectPer-role briefing for agents (≤ ROLE_DOC_MAX each). Name the topics a role must read before playing.packages/playerthree/src/manifest.ts:220
rolesreadonlyRoles-packages/playerthree/src/manifest.ts:228
signals?readonlySignalVocabulary<Record<string, SignalKindDef<Fields>>>Team signals: the closed vocabulary of typed teammate requests and each role's card (what it answers). Requires control.signals and the generated members of signalSchemas(roles, signals, control.signals): its intents spread into intents, and its observation / view as the signals member of the observation and view objects.packages/playerthree/src/manifest.ts:280
skillsreadonlyreadonly SkillDef[]Developer-authored Agent Skills (agentskills.io format): how to play, the policy API, example bots. Served over the MCP Skills extension with content digests. Static, trusted developer text.packages/playerthree/src/manifest.ts:273
teamsreadonlyTeams-packages/playerthree/src/manifest.ts:227
tickRatereadonlynumber-packages/playerthree/src/manifest.ts:226
titlereadonlystring-packages/playerthree/src/manifest.ts:216
topicsreadonlyobjectOn-demand briefing topics, in index order ({} allowed). Names match ^[a-z][a-z0-9-]*(/[a-z0-9-]+)*$ (≤ 64) and must not collide with GENERATED_TOPIC_ROOTS. Also served as files of the generated <id>-reference skill.packages/playerthree/src/manifest.ts:225
versionreadonlystring-packages/playerthree/src/manifest.ts:215
viewreadonlyViewTeam-level fogged render state for human clients.packages/playerthree/src/manifest.ts:239

GameMetricRecorder

Defined in: packages/playerthree/src/manifest.ts:472

A recorder must not mutate game state, consume RNG, or change observations.

Methods

collect()
collect(): void;

Defined in: packages/playerthree/src/manifest.ts:474

Called after each benchmark tick, including the terminal tick.

Returns

void

finish()
finish(): GameMetrics;

Defined in: packages/playerthree/src/manifest.ts:476

Called once; maps are snapshotted and bounded by the benchmark runner.

Returns

GameMetrics

intent()?
intent?(row): void;

Defined in: packages/playerthree/src/manifest.ts:480

Observational intent accounting, including rejected attempts.

Parameters
ParameterType
row{ accepted: boolean; code: string; role: string; source: string; team: string; }
row.acceptedboolean
row.codestring
row.rolestring
row.sourcestring
row.teamstring
Returns

void

rows()?
rows?(matchId): Partial<ResultRows>;

Defined in: packages/playerthree/src/manifest.ts:478

Sanitized normalized accounting rows for the generic result service.

Parameters
ParameterType
matchIdstring
Returns

Partial<ResultRows>


GameMetrics

Defined in: packages/playerthree/src/manifest.ts:466

Observational benchmark data: finite numbers only; side keys are declared physical teams.

Properties

PropertyTypeDefined in
matchRecord<string, number>packages/playerthree/src/manifest.ts:467
sidesRecord<string, Record<string, number>>packages/playerthree/src/manifest.ts:468

IntentContext

Defined in: packages/playerthree/src/manifest.ts:391

Host-supplied provenance of one applied intent.

Properties

PropertyModifierTypeDescriptionDefined in
ownerRoles?readonlyreadonly string[]Current same-team roles with verified human control/delegation for this owner; absent means this seat's role only.packages/playerthree/src/manifest.ts:394
sourcereadonly"policy" | "agent" | "bot" | "owner" | "fallback"-packages/playerthree/src/manifest.ts:392

IntentDef

Defined in: packages/playerthree/src/manifest.ts:36

One intent kind of manifest.intents: the roles that may send it and its parameter schema.

Type Parameters

Type ParameterDefault type
P extends FieldsFields

Properties

PropertyModifierTypeDescriptionDefined in
docreadonlystringStatic developer text shown to agents (tool docs). Trusted.packages/playerthree/src/manifest.ts:41
paramsreadonlyP-packages/playerthree/src/manifest.ts:39
rolesreadonlyreadonly string[]Seat roles allowed to issue this intent.packages/playerthree/src/manifest.ts:38

IntentMode

Defined in: packages/playerthree/src/manifest.ts:50

Control modes. A game opts into each mode it supports; agents discover them from the briefing. The set is designed to grow as models get faster and cheaper: today an LLM is a commander that writes policies (seconds per decision); tomorrow it can drive the seat directly every tick (stream). New modes are added as new optional keys — never by changing an existing one.

Properties

PropertyModifierTypeDescriptionDefined in
burstreadonlynumber-packages/playerthree/src/manifest.ts:53
perSecondreadonlynumberPer seat token bucket for intents from tool calls / WS.packages/playerthree/src/manifest.ts:52

MatchSides

Defined in: packages/playerthree/src/manifest.ts:379

The sides of one match: the manifest teams taking part (a subset, in manifest order) and optional named alliances (alliance id → member teams, manifest order; every match team belongs to exactly one). Without alliances every team is on its own: two teams are a duel, more a free-for-all.

Type Parameters

Type ParameterDefault type
M extends AnyManifestAnyManifest

Properties

PropertyModifierTypeDefined in
alliances?readonlyReadonly<Record<string, readonly Infer<M["teams"]>[]>>packages/playerthree/src/manifest.ts:381
teamsreadonlyreadonly Infer<M["teams"]>[]packages/playerthree/src/manifest.ts:380

ObservationScope

Defined in: packages/playerthree/src/manifest.ts:187

Observation sections (spec §3 Observation scope). Plain JSON like the rest of the manifest.

Properties

PropertyModifierTypeDescriptionDefined in
defaultsreadonlyobjectEvery role: the sections its observation renders in full by default (declared names, no repeats; may be empty).packages/playerthree/src/manifest.ts:191
sectionsreadonlyEnumSClosed section names (enum literals), in rendering order.packages/playerthree/src/manifest.ts:189

PauseMode

Defined in: packages/playerthree/src/manifest.ts:80

The game may stand still while an agent is away: owners can then choose whenAbsent: 'pause'. Declare it only when one absent seat may stop the whole session for everyone in it (solo play, turn-based seats that must move).

Properties

PropertyModifierTypeDescriptionDefined in
maxPauseSeconds?readonlynumberLongest pause, wall-clock seconds; then the absent seat falls back to its policy (else its bot). Omit: unbounded.packages/playerthree/src/manifest.ts:82

PolicyLimits

Defined in: packages/playerthree/src/manifest.ts:164

Policy = agent-written code that runs sandboxed at tick rate. This is the StarSkirmish lesson: LLMs are far stronger as bot authors (write → practice → read reports → revise) than as real-time players. Sandboxes have no I/O, no clock, no network; they only map observations to intents.

Properties

PropertyModifierTypeDescriptionDefined in
hzreadonlynumberCalls per second of game time.packages/playerthree/src/manifest.ts:168
maxArtifactBytesreadonlynumberJS source bytes or WASM module bytes.packages/playerthree/src/manifest.ts:173
maxIntentsPerCallreadonlynumber-packages/playerthree/src/manifest.ts:174
maxLogLineBytesreadonlynumber-packages/playerthree/src/manifest.ts:176
maxLogLinesreadonlynumber-packages/playerthree/src/manifest.ts:175
memoryBytesreadonlynumber-packages/playerthree/src/manifest.ts:171
msPerCallreadonlynumberCPU-time budget per call in milliseconds, on the sandbox thread (load-independent; hard kill on overrun).packages/playerthree/src/manifest.ts:170
runtimesreadonlyreadonly ("js" | "wasm")[]Formats this game accepts.packages/playerthree/src/manifest.ts:166

PoolMode

Defined in: packages/playerthree/src/manifest.ts:72

Async bot pool: published policies can be drafted into seats of other players' matches.

Properties

PropertyModifierTypeDefined in
maxPublishedPerPrincipalreadonlynumberpackages/playerthree/src/manifest.ts:73

PracticeLimits

Defined in: packages/playerthree/src/manifest.ts:179

Properties

PropertyModifierTypeDescriptionDefined in
concurrentreadonlynumberConcurrent practice matches per principal.packages/playerthree/src/manifest.ts:183
maxTicksreadonlynumberLongest headless practice match, in ticks.packages/playerthree/src/manifest.ts:181

Seat

Defined in: packages/playerthree/src/manifest.ts:358

One seat: a manifest team and role.

Type Parameters

Type ParameterDefault type
M extends AnyManifestAnyManifest

Properties

PropertyModifierTypeDefined in
rolereadonlyInfer<M["roles"]>packages/playerthree/src/manifest.ts:360
teamreadonlyInfer<M["teams"]>packages/playerthree/src/manifest.ts:359

SequenceMode

Defined in: packages/playerthree/src/manifest.ts:57

A bounded, tick-relative plan; no branching or executable code.

Properties

PropertyModifierTypeDefined in
maxStepsreadonlynumberpackages/playerthree/src/manifest.ts:58
maxTicksAheadreadonlynumberpackages/playerthree/src/manifest.ts:59
minSpacingTicksreadonlynumberpackages/playerthree/src/manifest.ts:60

SkillDef

Defined in: packages/playerthree/src/manifest.ts:283

Properties

PropertyModifierTypeDescriptionDefined in
descriptionreadonlystring-packages/playerthree/src/manifest.ts:286
filesreadonlyobjectRelative path → UTF-8 content. Must include SKILL.md (with frontmatter).packages/playerthree/src/manifest.ts:288
namereadonlystringAgent Skills name: lowercase, digits, hyphens. Also the directory name.packages/playerthree/src/manifest.ts:285

StreamMode

Defined in: packages/playerthree/src/manifest.ts:64

Tick-synchronous direct control: the server pushes observations every N ticks; intents apply on the next tick.

Properties

PropertyModifierTypeDescriptionDefined in
intentsPerTickreadonlynumberMax intents accepted per tick per seat.packages/playerthree/src/manifest.ts:68
maxHzreadonlynumberMax observation pushes per second of game time.packages/playerthree/src/manifest.ts:66

TopicDef

Defined in: packages/playerthree/src/manifest.ts:152

On-demand briefing topic. The index shows name — summary; the text is fetched with game_briefing { topic }.

Properties

PropertyModifierTypeDescriptionDefined in
summaryreadonlystringOne line, ≤ TOPIC_SUMMARY_MAX.packages/playerthree/src/manifest.ts:154
textreadonlystring≤ TOPIC_TEXT_MAX. Static developer text (trusted).packages/playerthree/src/manifest.ts:156

Type Aliases

AnyManifest

type AnyManifest = GameManifest<any, any, any, any, any, any, any, any, any, any>;

Defined in: packages/playerthree/src/manifest.ts:291


ApplyResult

type ApplyResult<M> = 
  | {
  ok: true;
}
  | {
  code: GameErrorOf<M>;
  ok: false;
};

Defined in: packages/playerthree/src/manifest.ts:385

What GameAdapter.apply returns: accepted, or rejected with one of the game's declared error codes.

Type Parameters

Type ParameterDefault type
M extends AnyManifestAnyManifest

Controller

type Controller = typeof CONTROLLERS[number];

Defined in: packages/playerthree/src/manifest.ts:26


DetailRequest

type DetailRequest = readonly string[] | "all";

Defined in: packages/playerthree/src/manifest.ts:195

What a caller asks to see in full besides its role's defaults: section names, or every section.


DirectiveOf

type DirectiveOf<M> = Infer<M["directive"]>;

Defined in: packages/playerthree/src/manifest.ts:302

Type Parameters

Type Parameter
M extends AnyManifest

EventOf

type EventOf<M> = Infer<M["event"]>;

Defined in: packages/playerthree/src/manifest.ts:319

Type Parameters

Type Parameter
M extends AnyManifest

FinalOutcome

type FinalOutcome = Exclude<Outcome, "running">;

Defined in: packages/playerthree/src/manifest.ts:372

A side's decided outcome.


GameErrorOf

type GameErrorOf<M> = Infer<M["errors"]>;

Defined in: packages/playerthree/src/manifest.ts:316

Type Parameters

Type Parameter
M extends AnyManifest

GameObservationOf

type GameObservationOf<M> = M["signals"] extends SignalVocabulary ? Omit<ObservationOf<M>, "signals"> : ObservationOf<M>;

Defined in: packages/playerthree/src/manifest.ts:298

What a game's observe returns: the observation without the host-owned signals member (when signals are declared).

Type Parameters

Type Parameter
M extends AnyManifest

GameViewOf

type GameViewOf<M> = M["signals"] extends SignalVocabulary ? Omit<ViewOf<M>, "signals"> : ViewOf<M>;

Defined in: packages/playerthree/src/manifest.ts:300

What a game's view returns: the view without the host-owned signals member (when signals are declared).

Type Parameters

Type Parameter
M extends AnyManifest

IntentOf

type IntentOf<M> = { [K in keyof M["intents"] & string]: { kind: K } & Infer<ObjS<M["intents"][K]["params"]>> }[keyof M["intents"] & string];

Defined in: packages/playerthree/src/manifest.ts:320

Type Parameters

Type Parameter
M extends AnyManifest

IntentSource

type IntentSource = typeof INTENT_SOURCES[number];

Defined in: packages/playerthree/src/manifest.ts:389


LimitsOf

type LimitsOf<M> = M["limits"] extends ObjS ? Infer<M["limits"]> : Record<string, unknown>;

Defined in: packages/playerthree/src/manifest.ts:303

Type Parameters

Type Parameter
M extends AnyManifest

MandateOf

type MandateOf<M> = Omit<Mandate, "directive" | "limits" | "whenAbsent"> & object;

Defined in: packages/playerthree/src/manifest.ts:311

Type Parameters

Type Parameter
M extends AnyManifest

Type Declaration


MatchDataOf

type MatchDataOf<M> = M["matchData"] extends ObjS ? Infer<M["matchData"]> : Record<string, unknown>;

Defined in: packages/playerthree/src/manifest.ts:301

Type Parameters

Type Parameter
M extends AnyManifest

MatchOptionsOf

type MatchOptionsOf<M> = M["matchOptions"] extends ObjS ? Infer<M["matchOptions"]> : Record<string, unknown>;

Defined in: packages/playerthree/src/manifest.ts:325

Validated match options of a game (the host rejects any options when the manifest declares none).

Type Parameters

Type Parameter
M extends AnyManifest

ObservationOf

type ObservationOf<M> = Infer<M["observation"]>;

Defined in: packages/playerthree/src/manifest.ts:295

Type Parameters

Type Parameter
M extends AnyManifest

OpponentOf

type OpponentOf<M> = Infer<M["opponents"]>;

Defined in: packages/playerthree/src/manifest.ts:317

Type Parameters

Type Parameter
M extends AnyManifest

Outcome

type Outcome = "win" | "loss" | "draw" | "running";

Defined in: packages/playerthree/src/manifest.ts:370


PolicyRuntime

type PolicyRuntime = typeof POLICY_RUNTIMES[number];

Defined in: packages/playerthree/src/manifest.ts:30


ReportOf

type ReportOf<M> = Infer<M["report"]>;

Defined in: packages/playerthree/src/manifest.ts:318

Type Parameters

Type Parameter
M extends AnyManifest

RoleOf

type RoleOf<M> = Infer<M["roles"]>;

Defined in: packages/playerthree/src/manifest.ts:294

Type Parameters

Type Parameter
M extends AnyManifest

SectionOf

type SectionOf<M> = NonNullable<M["observationScope"]> extends object ? Infer<S> : never;

Defined in: packages/playerthree/src/manifest.ts:328

Observation section names of a game (never without observationScope).

Type Parameters

Type Parameter
M extends AnyManifest

TeamOf

type TeamOf<M> = Infer<M["teams"]>;

Defined in: packages/playerthree/src/manifest.ts:293

Type Parameters

Type Parameter
M extends AnyManifest

ViewOf

type ViewOf<M> = Infer<M["view"]>;

Defined in: packages/playerthree/src/manifest.ts:296

Type Parameters

Type Parameter
M extends AnyManifest

WhenAbsentOf

type WhenAbsentOf<M> = 
  | Exclude<Mandate["whenAbsent"], "pause">
  | { [K in keyof M["control"] & "pausable"]: "pause" }[keyof M["control"] & "pausable"];

Defined in: packages/playerthree/src/manifest.ts:308

pause only for games whose control declares pausable (the host rejects it otherwise). A mapped type, not a conditional one, so PlayerThreeMatch<M> stays assignable to PlayerThreeMatch<AnyManifest>.

Type Parameters

Type Parameter
M extends AnyManifest

Variables

CONTROL_PLANE_VERSION

const CONTROL_PLANE_VERSION: 1 = 1;

Defined in: packages/playerthree/src/manifest.ts:122


CONTROLLERS

const CONTROLLERS: readonly ["human", "agent", "policy", "bot", "none"];

Defined in: packages/playerthree/src/manifest.ts:25

Who drives a seat. Fixed by PlayerThree.

  • human: the team owner's client
  • agent: a live LLM harness (issues intents and may deploy a policy)
  • policy: a published policy artifact, no live LLM (async bots: ladders, bot pools, "enemies are other players' bots")
  • bot: the developer's built-in commander
  • none: idle

DOC_MAX

const DOC_MAX: 6000 = 6_000;

Defined in: packages/playerthree/src/manifest.ts:132

manifest.doc: the core rules every seat reads first.


GENERATED_TOPIC_ROOTS

const GENERATED_TOPIC_ROOTS: readonly ["role", "intents", "intent", "observation", "match-data", "events", "report", "mandate", "modes", "schema", "signals"];

Defined in: packages/playerthree/src/manifest.ts:149

Generated topic roots: a game topic must not be one of these or start with <root>/. role/<role>, intent/<kind>, observation/<field>, match-data/fields and schema/<name> live under them.


INTENT_SOURCES

const INTENT_SOURCES: readonly ["owner", "agent", "policy", "bot", "fallback"];

Defined in: packages/playerthree/src/manifest.ts:388

Trusted caller provenance, supplied by the host, never by an intent's untrusted payload.


MATCH_DATA_MAX_BYTES

const MATCH_DATA_MAX_BYTES: number;

Defined in: packages/playerthree/src/manifest.ts:33

Independent UTF-8 JSON bound for match bootstrap, not part of an observation's byte budget.


MAX_POLICY_INCLUDES

const MAX_POLICY_INCLUDES: 16 = 16;

Defined in: packages/playerthree/src/manifest.ts:144

Skill .js files one policy artifact may include.


MAX_SAY_CHARS

const MAX_SAY_CHARS: 280 = 280;

Defined in: packages/playerthree/src/manifest.ts:120


MAX_TELL_CHARS

const MAX_TELL_CHARS: 500 = 500;

Defined in: packages/playerthree/src/manifest.ts:119

Hard caps on chat lengths (manifests may only lower them).


POLICY_RUNTIMES

const POLICY_RUNTIMES: readonly ["js", "wasm"];

Defined in: packages/playerthree/src/manifest.ts:29

Policy artifact formats. js: source run in QuickJS compiled to WASM. wasm: a core WebAssembly module (any language) using the PlayerThree policy ABI.


RESULT_TEXT_MAX

const RESULT_TEXT_MAX: 24000 = 24_000;

Defined in: packages/playerthree/src/manifest.ts:130

Upper bound on any default tool result's MCP text content (core briefing, topic and skill pages, observe pages).


ROLE_DOC_MAX

const ROLE_DOC_MAX: 3500 = 3_500;

Defined in: packages/playerthree/src/manifest.ts:134

Each manifest.roleDocs[role].


SKILL_PAGE_MAX

const SKILL_PAGE_MAX: 20000 = 20_000;

Defined in: packages/playerthree/src/manifest.ts:142

One game_skill page, cut at a newline.


SKILL_PATH_PATTERN

const SKILL_PATH_PATTERN: "^[A-Za-z0-9_-]+(\\.[A-Za-z0-9_-]+)*(/[A-Za-z0-9_-]+(\\.[A-Za-z0-9_-]+)*)*$" = '^[A-Za-z0-9_-]+(\\.[A-Za-z0-9_-]+)*(/[A-Za-z0-9_-]+(\\.[A-Za-z0-9_-]+)*)*$';

Defined in: packages/playerthree/src/manifest.ts:507

Skill file path grammar (also game_skill's path input pattern).


TOPIC_INDEX_MAX

const TOPIC_INDEX_MAX: 5000 = 5_000;

Defined in: packages/playerthree/src/manifest.ts:140

All game-topic index lines (name — summary, newline-joined): keeps the core briefing and reference index small.


TOPIC_SUMMARY_MAX

const TOPIC_SUMMARY_MAX: 160 = 160;

Defined in: packages/playerthree/src/manifest.ts:138

One-line topic summary shown in the index.


TOPIC_TEXT_MAX

const TOPIC_TEXT_MAX: 8000 = 8_000;

Defined in: packages/playerthree/src/manifest.ts:136

Each topic page (game topic text; generated topics are split or paged to fit).

Functions

defineManifest()

function defineManifest<M>(m): M;

Defined in: packages/playerthree/src/manifest.ts:706

Typed identity helper: returns the manifest unchanged (with its inferred schema types) after validating it. Throws a descriptive error at startup for anything PlayerThree cannot serve safely: non-closed schemas, intents for unknown roles, an event schema without tick: int / kind: enum, invalid skills, insane limits.

Type Parameters

Type Parameter
M extends AnyManifest

Parameters

ParameterType
mM

Returns

M


intentSchema()

function intentSchema<M>(m): UnionS<"kind", Record<string, Fields>>;

Defined in: packages/playerthree/src/manifest.ts:364

Wire schema for any intent of this game: a union tagged by kind.

Type Parameters

Type Parameter
M extends AnyManifest

Parameters

ParameterType
mM

Returns

UnionS<"kind", Record<string, Fields>>


observationSections()

function observationSections(m): readonly string[];

Defined in: packages/playerthree/src/manifest.ts:331

Every declared observation section, in manifest order (empty without observationScope): the detail 'all'.

Parameters

ParameterType
mAnyManifest

Returns

readonly string[]


resolveDetail()

function resolveDetail(
   m, 
   role, 
   request
): string[] | null;

Defined in: packages/playerthree/src/manifest.ts:340

The detail a seat of role observes with: its role's defaults united with request (a list of section names, or 'all' for every section; undefined = defaults only), in manifest order. Null when request is neither, names an undeclared section or repeats one — callers answer invalid.

Parameters

ParameterType
mAnyManifest
rolestring
requestunknown

Returns

string[] | null