Files
praxisandClaude Fable 5.2 8e02dccb86 In-client stack: transport, session lifecycle and engine bridge
175 files, from working commit b1a079a.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 01:32:48 +02:00

172 lines
9.6 KiB
C

#pragma once
/* Separate public, non-secret world diagnostics; legacy pipe ABI unchanged. */
struct gw_pipe_world_control {
unsigned int abi,size,login_sent,received,queued,self_create,ignored,last_legacy,last_modern,last_bytes,trace_count,realm_context_bound;
struct {unsigned int direction,opcode,bytes;} trace[32];
};
/* realm_context_bound is a public bitset; keep the fixed world ABI size. */
#define GW_WORLD_REALM_CONTEXT_BOUND (1u<<0)
#define GW_WORLD_SELF_CREATE_QUEUED (1u<<1)
#define GW_WORLD_ACTIVE_MOVER_QUEUED (1u<<2)
#define GW_WORLD_ACTIVE_MOVER_REQUEST (1u<<3)
#define GW_WORLD_ACTIVE_MOVER_ACCEPTED (1u<<4)
#define GW_WORLD_MOVEMENT_REQUEST (1u<<5)
#define GW_WORLD_MOVEMENT_ACCEPTED (1u<<6)
#define GW_WORLD_MOVEMENT_REJECTED (1u<<7)
/* Forever emits this only after its self-create/ThisIsYou initialization.
* Turtle has no equivalent opcode; this is an observation marker, not a send. */
#define GW_WORLD_MOVE_INIT_COMPLETE (1u<<8)
#define GW_WORLD_MOVE_INIT_COMPLETE_BAD_SIZE (1u<<9)
#include <stdint.h>
/* Public counters and owned clone only. No credentials, keys or packet bodies. */
struct gw_pipe_trace { uint32_t direction,opcode,bytes; };
/* Separate metadata export; the existing pipe ABI and its trace stay intact. */
struct gw_pipe_create_observation { uint32_t abi,size,count,saturated; };
_Static_assert(sizeof(struct gw_pipe_create_observation)==16,"Create observation ABI changed");
struct gw_pipe_control {
uint32_t abi,size;
volatile int32_t stage,error;
uint64_t owner,pipe,connection,queue,original_table,original_read,original_write,reserved;
volatile uint32_t read_calls,write_calls,read_thread,write_thread,challenge_bytes,
auth_request_sent,world_auth,queued,auth_queued,glue_queued,roster_queued,
restrictions_queued,last_in_opcode,last_in_bytes,last_out_opcode,last_out_bytes,
unsupported_in,unsupported_out,enum_sent,pings_sent,pongs_received,closed,
characters,trace_count;
uint64_t methods[10]; /* original RTTI plus all9 original methods */
struct gw_pipe_trace trace[32];
};
struct gw_pipe_view { const unsigned char* data; void* allocation; uint32_t bytes,reserved; uint64_t tail; };
_Static_assert(sizeof(struct gw_pipe_control)==640,"Owned pipe ABI changed");
_Static_assert(sizeof(struct gw_pipe_view)==32,"Engine descriptor ABI changed");
struct gw_pipe_db_query { uint32_t hash,count,captured,reserved,ids[32]; };
struct gw_pipe_db_queries { uint32_t abi,size,count,malformed; struct gw_pipe_db_query rows[8]; };
_Static_assert(sizeof(struct gw_pipe_db_queries)==1168,"Public query metadata ABI changed");
struct gw_pipe_hotfix {uint32_t abi,size,queries,replies,client_build,data_build,push_count,request_bytes,reply_bytes;int32_t result;};
_Static_assert(sizeof(struct gw_pipe_hotfix)==40,"Public hotfix metadata ABI changed");
/* Additive public metadata for the explicit owned initial-world barrier.
* States: 0 off,1 holding,2 flushing,3 released,4 failed,5 canceled.
* No packet bodies, credentials, native addresses or inferred World state. */
struct gw_pipe_spell_locator_barrier {
uint32_t abi,size,state,error,generation,enabled,known_count,required_count,
classified,held_bundles,held_records,held_bytes,submitted,probes,
missing_id,map_reason;
uint64_t source_guid,started_ms;
uint32_t read_bytes,skipped_busy;
};
_Static_assert(sizeof(struct gw_pipe_spell_locator_barrier)==88,"Spell barrier metadata ABI changed");
/* Separate diagnostics; neither the barrier88 nor existing pipe ABIs grow.
* Roles:1 Main header,2 fixed Spell storage,3 selected heap metadata.
* Conditions:1 owner,2 module/base,3 readable header,4 header query,
* 5 header allocation,6 header type,7 header shape,8 header stability,
* 9 read input,10 selected readable span,11 fixed query,12 fixed allocation,
* 13 fixed type,14 fixed bounds,15 mapped header profile,16 pinned header,
* 17 mapping stability,18 fixed state/allocation protection/containment.
* Zero means no failed condition recorded.
* Addresses and native payloads are deliberately absent. */
struct gw_pipe_spell_locator_guard_span {
uint32_t observed,sequence,requested_bytes,readable,vq_result_bytes,
protect,allocation_protect,state,type,allocation_matches_main,
span_contained,win32_error;
};
struct gw_pipe_spell_locator_guard {
uint32_t abi,size,generation,sequence,failed_condition,failed_span,
identity_ok,module_present,module_expected,module_error,
header_valid,header_unchanged;
struct gw_pipe_spell_locator_guard_span header,fixed;
};
_Static_assert(sizeof(struct gw_pipe_spell_locator_guard)==144,"Spell guard diagnostics ABI changed");
/* Appended op45 observation only; existing88/144-byte diagnostics unchanged.
* No spell IDs, pointers or body bytes. SourceGUID/count are published only
* after a bounded nonzero/framed header; they do not grant ownership.
* written_bytes is contract-derived, not an independent copy counter. */
struct gw_pipe_initial_spell_ids_call {
uint32_t abi,size,generation,attempt,bound_step,precondition_flags;
int32_t transport_status,call_result;
uint32_t input_bytes,input_is_null,required,capacity,consumed,
contract_written_known,contract_written_bytes,header_bounds_valid,
header_shape_valid,decoded_count,expected_guid_matches,first_bundle_valid;
uint64_t source_guid;
};
_Static_assert(sizeof(struct gw_pipe_initial_spell_ids_call)==88,"Initial spell call diagnostics ABI changed");
/* Source-derived actor identities only; sent does not mean rendered. */
struct gw_pipe_entities {
uint32_t abi,size,server_creatures,sent_creatures,sent_gameobjects,templates,
pending_batches,pending_requests,removals,unsupported,captured,truncated;
struct {uint64_t legacy;unsigned char modern[16];uint32_t entry,kind,sent,creature_type;} actors[1024];
/* ABI3 appends source-only words after the unchanged48+1024*40 prefix.
* No authentication data, packet bodies, engine pointers or absent fields. */
struct {
uint32_t abi,size,source_packets,total,captured,overwritten,overflow,reserved;
struct {uint64_t legacy;uint32_t sequence,source_packet,opcode,kind,field,value;} rows[64];
} unit_fields;
};
_Static_assert(sizeof(struct gw_pipe_entities)==43088,"Entity diagnostic layout changed");
_Static_assert(sizeof(((struct gw_pipe_entities*)0)->unit_fields)==2080,"Source-field tail layout changed");
_Static_assert(sizeof(((struct gw_pipe_entities*)0)->unit_fields.rows[0])==32,"Source-field row layout changed");
struct gw_pipe_action_diagnostic {
uint64_t action,target,mover;
uint32_t kind,spell,opcode,status,reason,spline,flags,match,available,facing;
uint64_t sequence;
};
_Static_assert(sizeof(struct gw_pipe_action_diagnostic)==72,"Action diagnostic layout changed");
struct gw_pipe_motion {
uint32_t abi,size,received,sent,unknown,rejected,captured,action_count;
struct {uint64_t legacy;unsigned char modern[16];uint32_t id,duration;float start[3],destination[3];uint32_t points,facing;} rows[16];
struct gw_pipe_action_diagnostic actions[16];
};
_Static_assert(sizeof(struct gw_pipe_motion)==2208,"Motion diagnostic layout changed");
/* One bounded gameplay-only specimen for source/compiled-layout comparison.
* Never auth, chat, arbitrary opcodes, credentials or session keys. */
struct gw_pipe_item_request {
uint32_t abi,size,opcode,bytes,captured;int32_t result;
unsigned char payload[256];
};
_Static_assert(sizeof(struct gw_pipe_item_request)==280,"Item request diagnostic layout changed");
struct gw_pipe_cast_result {
uint32_t abi,size,count,opcode,bytes,spell,status,reason,inventory_count,inventory_reason,stand_received,stand_state;
};
_Static_assert(sizeof(struct gw_pipe_cast_result)==48,"Cast result diagnostic layout changed");
struct gw_pipe_inventory {
uint32_t abi,size,items,captured,truncated,value_updates,creates,removals;
struct {uint64_t guid,contained;uint32_t entry,count,durability,max_durability,enchant,duration;} rows[32];
uint32_t templates,pending_queries,queued_queries,profile_replies,profile_missing,last_profile,cooldown_packets,cooldown_modifier_blocks;
};
_Static_assert(sizeof(struct gw_pipe_inventory)==1344,"Inventory diagnostic layout changed");
struct gw_pipe_auras {
uint32_t abi,size,updates_sent,unsupported,known,occupied,shown,reserved;
struct {uint32_t spell,flags,level,applications_minus_one,active_mask,visual_link,shown;} rows[48];
};
_Static_assert(sizeof(struct gw_pipe_auras)==1376,"Aura diagnostic layout changed");
struct gw_pipe_movement_failure {
uint32_t abi,size,opcode,bytes;int32_t result;
uint32_t flags_lo,flags_hi,options,tail,forces,fall_direction,remaining;
};
_Static_assert(sizeof(struct gw_pipe_movement_failure)==48,"Movement failure ABI changed");
/* Public stage/result counters only, never packet bytes or account material. */
struct gw_pipe_world_failure {
uint32_t abi,size,phase;int32_t result;
uint32_t source_opcode,source_bytes,modern_opcode,modern_bytes,required,capacity,count,index;
};
_Static_assert(sizeof(struct gw_pipe_world_failure)==48,"World failure ABI changed");
/* Additive, bounded World-call failure details; no payload or identities. */
struct gw_pipe_world_call_failure {
uint32_t abi,size,present,generation;
int32_t transport_status,call_result;
uint32_t backend_state,source_received;
};
_Static_assert(sizeof(struct gw_pipe_world_call_failure)==32,"World call failure ABI changed");
/* Optional independent diagnostic; phase zero means no backend mark observed. */
struct gw_pipe_world_call_phase {
uint32_t abi,size,present,phase;
};
_Static_assert(sizeof(struct gw_pipe_world_call_phase)==16,"World call phase ABI changed");