Python stable API

Every name in witwin_server.api, the stable Python API for Plugins, generated from the server code.

from witwin_server.api import <name> reaches every name below. Signature changes fail server/tests/test_stable_api_snapshot.py; the snapshot is server/tests/snapshots/stable_api.json. How the layers fit together: Python API.

215 names.

Plugin context and lifecycle#

NameKindWhat it isPublic members
ContributingPlugin(plugin_id, root, runs_in_process)classThe Plugin whose manifest is being read.
ContributionHandlersclassProcess-wide table of contributes keys served by a system Plugin.listing, load, provide
Disposable(args, kwargs)classdispose
DisposableStore()classOwns disposables and releases them in reverse registration order.add, append, dispose, disposed, extend
FunctionDisposable(callback)classDisposable backed by a single callback.dispose
PluginContext(plugin_id, path, api, tool_policy=…, tool_namespaces=…, system=…)classcomplete_walkthrough, console, dispose, on_startup, scene, startup_hooks, track, viewport
Registry(kind, stamp=…, on_change=…)classKeyed, Plugin-owned, shadowing registry.clear, get, items, keys, owned_by, owner, register, set_owner, unregister, values
StartupEvent(server, tools=…, shared=…)classWhat a startup step receives.
track_disposable(disposable)functionAttach a registration handle to the active plugin-load store, if any.

Project files#

NameKindWhat it isPublic members
ProjectFs(root=…)classRead and write Project files by Project path.delete, exists, ignore_next_change, is_dir, is_file, list, mkdir, read_bytes, read_text, relative, rename, resolve, root, watch, write_bytes, write_text
ProjectPathError(code, message, path=…)classA path that is not a Project path.
resolve_project_path(root, path, strict=…, allow_root=…, allow_hidden=…, allow_runtime=…)functionThe resolved file for Project path path under root.

Logging#

NameKindWhat it isPublic members
add_log_handler(handler)functionAttach handler to the witwin logger; dispose the result to detach it.
get_logger(module_name=…)functionGet a logger for a specific module.
take_recent_log_records()functionReturn the records logged since the last call, oldest first, and forget them.

Agent Tools#

NameKindWhat it isPublic members
AGENT_HIDDEN_TAGvalue
CallerIdentity(authority_id, user_id, caller_kind, client_id, project_id, …)classhas_scope
ConfirmationErrorclassA challenge or grant is missing, invalid, expired, or already consumed.
Tool(name, description, input_schema, output_schema, run, …)classcall, freeze_authorization, implementation_hash, is_concurrency_safe, to_schema, validate_input
ToolError(message, code=…, detail=…)classGeneric tool failure carrying a structured code/detail.
ToolInvoker(server)classcall, list_tools, renew_challenge
ToolRegistry()classclear, get, list, names, register, restore, revision, snapshot, to_schema_list, transaction, unregister
close_names(name, candidates, limit=…)functionCandidates that look like name: close spellings first, then substring hits.
execution_denial(identity, operation, data)functiondenial for an RPC method or HTTP route; operation is a key of PATH_GUARDED_MESSAGES.
execution_http_refusal(server, request, msg_type, data)function403 JSONResponse when an HTTP write must be refused, else None.
get_tool_registry()function
profile_owner(profile_id)functionThe Plugin that registered profile_id, or None for core and unknown ids.
profile_tools(profile_id)functionThe allowlist of a profile, or () when the profile is unknown.
rank_tools(registry, query, limit=…)functionReturn [{name, score}] for the top limit tools by meaning similarity to query.
request_identity(server, request)functionIdentity for one HTTP request from its assertion header; None if absent.
surface_run_progress(executor, store, event)functionMirror a surfaced run's lifecycle onto Notifications.progress (RFC-009 C).
tool(name, description, input_schema, output_schema=…, side_effects=…, …)functionDecorator turning a function into a Tool (does not auto-register).
tool_ranker_is_warm()functionTrue once the index is built, i.e.

Scene#

NameKindWhat it isPublic members
ObjectFactoryclassFactory for creating scene objects with predefined configurations.create_camera, create_cube, create_cylinder, create_empty, create_light, create_sphere
Scene(scene_id=…, role=…, source_object_id=…, name=…, capabilities=…, stage=…)classScene containing all objects and their relationships.add_object, allocate_id, begin_batch, build_children_order, by_type, clear, collapse_refs, create_entity, end_batch, expand_refs, from_dict, get_object, get_object_by_name, off, on, parameters, remove_component, remove_object, reorder_sibling, request_trace, resolve_dep, scene_refs, set_parent, to_dict, update_transform, update_visibility
SceneObject(id=…, name=…, parent_id=…, mesh_type=…, mesh_path=…, …)classEnhanced scene object with dictionary-style component access.add_component, allow_add_components, disable_transform, entity_type, from_dict, from_object_dict, get_all_components, get_component, has_component, locked, mesh_type, name, remove_component, system, tag, to_dict, to_object_dict, update, visible
SceneStreamclassStatic forwarders to the provider studio.scene registers.provide
switch_current_scene(server, scene_id, as_holder=…)functionSave, unload and load scene_id; refused while another task lock holder uses the Scene.
task_lock_for(server)functionThe server's task lock, created on first use.

Components and fields#

NameKindWhat it isPublic members
CLAY_COLORvalue
Component(kwargs)classBase class for all components using PyTorch tensors.add_callback, click_button, facets, from_dict, from_properties_dict, get_definition, get_referenced_component, get_widget_config, is_group_enabled, name, on_value_change, owner, remove_callback, scene, set_field, set_group_enabled, set_widget_config, start, to_dict, to_properties_dict, update
ComponentFacet(component, id, owner, display_name, fields, …)classOne registered facet.asset_order, asset_path, to_dict
ComponentFieldInfo(name, display_name, field_type, default, readonly=…, …)classOne field of a registered component type, as ComponentsApi.catalog lists it.
ComponentFieldTypeclassField types supported by the component system.
ComponentRegistryclassGlobal registry for all components.create_instance, get, get_all, get_base_classes, get_definitions, get_subclasses, is_subclass_of, plugin_owners
ComponentTypeInfo(name, display_name, category, plugin_id, abstract, …)classOne registered component type, as ComponentsApi.catalog lists it.to_dict
ComponentsApi(plugin_id, track)classPlugin-scoped component registration (ctx.components).add_facet, catalog, facets, register
FREQUENCY_UNITSvalue
Field(default_value, metadata)classField descriptor for component fields with metadata.
Figure(_owner=…, _field_name=…)classMatplotlib-style figure object for building plots.area, bar, batch, batch2d, boxplot, clear, contour, errorbar, hist, imshow, legend, line, pie, polar, radar, scatter, set_plot_data, stem, surface, table, text, title, to_dict, to_plot_data, update, xlabel, xscale, xticks, ylabel, yscale, yticks
GizmoContext(component)classContext for drawing gizmos in on_draw_gizmos() method.draw_arrow, draw_box, draw_circle, draw_cone, draw_frustum, draw_line, draw_mesh, draw_sphere, gizmos
LightComponentclassLight component for illumination.
MaterialComponent(kwargs)classRender appearance; the asset path optionally overrides the inline values.asset_field_values, from_properties_dict, load_material_asset_dict, set_field, to_dict, to_dict_for_frontend, to_material_asset_dict, to_properties_dict
MeshComponent(mesh_type=…, kwargs)classMesh component for geometry.create_cube, create_cylinder, create_sphere, drjit_faces, drjit_vertices, face_count, from_dict, from_properties_dict, get_bounds, get_drjit_data, get_faces_numpy, get_mesh_data, get_normals_numpy, get_uvs_numpy, get_vertices_numpy, is_empty, load_from_file, load_mesh_data, set_generated_mesh_source_runtime, set_generated_mesh_source_scene_binary, set_mesh_data, set_project_mesh_source, to_dict, to_properties_dict, vertex_count
PBR_TEXTURE_FIELDSvalue
PlatformGeometryComponentclassLossless platform geometry (kind + per-kind parameters).
PlotData(plot_type, data, title=…, xlabel=…, ylabel=…, …)classContainer for a single plot's data.to_dict
RenderSpec(geometry, material=…, passes=…)classA declarative render description pushed via api.viewport.set_render_spec.to_dict
ScalarGridResourcePublisher(kwargs)classMixin/base for components that publish 3D scalar grids as binary assets.export_volume_data, from_properties_dict, load_from_file, set_complex_volume_data, set_volume_data, start, to_dict, to_properties_dict
ScriptGeometryComponent(kwargs)classBodies generated by a Project model file; parameters are bindable fields.bodies, copy_to_project, from_properties_dict, param_names, param_values, quiet, regenerate, schema, set_field, set_schema, set_status, start
ScriptGeometryHooksclassWhat the component calls; studio.modeling installs the real one.approve_and_regenerate, copy_component_to_project, request
Series(x=…, y=…, label=…, color=…, kwargs)classType-safe series data container, replacing dict.to_dict
SkinnedMeshComponent(kwargs)classSkinned mesh component with bone-based vertex deformation.bone_ids, compute_skinned_vertices, compute_skinned_vertices_numpy, from_dict, from_properties_dict, get_drjit_data, get_mesh_data, get_skinning_data, inverse_bind_matrices_tensor, on_value_change, root_bone_id, set_skinning_data, start, to_dict, to_properties_dict
StructureMetaComponentclassStable Core identity plus priority, visibility, tags, and metadata.metadata
TransformComponent(kwargs)classTransform component with position, rotation, and scale.get_quaternion, get_transformation_matrix, set_parent, set_quaternion, to_dict
WidgetRegistryclassRegistry for widget type selection rules.resolve_widget
bool_field(default=…, common_params)functionCreate a boolean field (checkbox).
button(display_name=…, description=…, icon=…, style=…, command=…, …)functionDecorator to mark a method as a button.
color_field(default=…, common_params)functionCreate a color field (RGBA color picker).
component(name=…, display_name=…, category=…, abstract=…)functionDecorator for registering components.
component_facets(component)functionFacets registered on the component named component, in registration order.
component_field(component_type, common_params)functionCreate a component reference field.
data_source_ref_field(default=…, default_channel=…, mode=…, kind=…, auto_subscribe=…, …)functionCreate a data source reference field.
define_group(group_def)functionRegister a group definition during component class definition.
design_spec_entries(spec)functionDESIGN_SPEC schema entries plus the widget a parameter field of the same kind gets.
figure(common_params)functionDeclare a Figure for matplotlib-style plotting.
float_field(default=…, min=…, max=…, step=…, units=…, …)functionCreate a float field.
foldout_group(name, display_name=…, collapsed=…, description=…)functionCreate a foldout (collapsible) group definition.
image_field(common_params)functionCreate an image preview field.
int_field(default=…, min=…, max=…, step=…, common_params)functionCreate an integer field.
list_field(element_field, default=…, common_params)functionCreate a list field containing elements of a specific type.
ray_batch_geometry(segment_count, binary=…, positions=…, colors_type=…, colors_gain=…, …)functionA flat batch of N line segments rendered as ONE LineSegments draw call.
ray_batch_material(line_width=…, additive=…)functionMaterial for :func:ray_batch_geometry.
serialize_value(value, field_meta=…)functionSerialize a value for WebSocket transmission.
set_script_geometry_hooks(hooks)functionInstall the regeneration service's hooks (None restores the inert default).
string_field(default=…, options=…, enum_toggle=…, widget=…, asset_kind=…, …)functionCreate a string field.
tab_group(name, tabs, display_name=…, description=…, sync_field=…, tab_conditions=…)functionCreate a tab group definition.
vector2_field(default=…, min=…, max=…, step=…, units=…, …)functionCreate a Vector2 field (2D vector).
vector3_field(default=…, min=…, max=…, step=…, units=…, …)functionCreate a Vector3 field (3D vector).
vector4_field(default=…, min=…, max=…, step=…, units=…, …)functionCreate a Vector4 field (4D vector).

Binary assets#

NameKindWhat it isPublic members
BinaryAssetService(persistence=…)classcache_bytes, cache_info, cache_size, clear, get_bytes, register_bytes, resolve_file

Binary frames#

NameKindWhat it isPublic members
WtbMessage(type, v=…, meta=…, buffers=…, offsets=…)classA decoded binary payload.buffer, bytes_of
wtb_decode(data, buffers=…)functionRead one WTB1 payload into a WtbMessage.
wtb_encode(type, buffers=…, meta=…, v=…)functionEncode one WTB1 payload.
wtb_peek_type(data)functionSubtype of a payload without materialising buffers (None if unknown).

Timeline#

NameKindWhat it isPublic members
normalize_data_channel_descriptor(channel)function
normalize_data_source_descriptor(descriptor, channels=…)functionNormalize a data source descriptor to the frontend wire shape.
source_from_stream_descriptor(stream, source_id=…, default_channel=…)functionBuild a stream-backed DataSourceDescriptor from a StreamDescriptor.

Solvers and Scene references#

NameKindWhat it isPublic members
make_scene_ref(scene, scene_snapshots=…, ref_dir=…, at_time=…)functionBuild the solver-facing scene reference payload.

Solver-platform bridge#

NameKindWhat it isPublic members
FieldVizclassConsistent 2D/3D scalar-field display onto the studio surfaces.show_2d, show_3d
GeometryMapclassBidirectional map between platform geometry and studio geometry.fill_component, to_platform, to_studio
MaterialMapclassScalar core.PhysicalMaterial <-> unified Material component fields.fill_component, to_platform, to_studio
StructureMapclasscore.Structure <-> studio SceneObject (geometry + material + transform + meta).to_platform, to_studio
TransformMapclassQuaternion [w,x,y,z] <-> studio Euler ZXY (radians).euler_to_quat, quat_to_euler
hydrate_project_meshes(studio_scene, project_root, strict=…)functionRestore persisted project_mesh payloads using Studio's real loader.
register_platform_adapter(domain, adapter)functionMake platform_scene.load / platform_scene.export dispatch domain to adapter.

Project and Scene helpers#

NameKindWhat it isPublic members
file_importer(extension)functionThe function Studio runs for a file of extension dropped on the viewport.
get_world_transform(obj)functionobj's 4x4 world matrix (numpy float), parents' Transforms included.
hydrate_skinned_meshes(scene, project)functionLoad the skin (vertices, weights, bones) of every skinned GLB mesh in scene.
loaded_plugins()functionThe Plugins whose contributions are registered now (LoadedPlugin: manifest, path).
open_project_scene(project, scene_id)functionOpen <project>/scenes/<scene_id>.wtscene as Studio opens it, without a server.
plugin_roots(project_dir)function{plugin_id: root folder} of the Plugins a ProjectServer for project_dir would load.
project_dir()functionThe opened Project's root folder.
runtime_dir()functionThe opened Project's hidden runtime folder (<project>/.witwin).
save_project_scene(project, scene, scene_id=…, name=…)functionWrite scene to <project>/scenes/<scene_id>.wtscene as Studio's save does.

User feedback and Library#

NameKindWhat it isPublic members
ConsoleclassStatic Console API; forwards to the provider studio.console registers.clear, create_output_channel, error, get_history, log, provide, register_command, unregister_command, unregister_plugin_channels, unregister_plugin_commands, warn
Library(server)classHandler for library management with static API.categories, category, create_from_library, get_library_data, item_ids, register, register_category, register_item, setup_routes, unregister_category, unregister_item
Notifications(server)classHandler for system notifications.clear, clear_task, error, get_notifications, get_unread_count, info, is_cancelled, progress, register_cancel_callback, register_process, register_task, request_cancel, success, warn, warning
install_turn_notices(server, turns, label_for)functionRecord turn ends (TurnManager finish listener) and Run ends (run event listener).
record_approval(server, turn_id, session_id, call_id, tool_name)functionA Tool call waits for approval.

Panels#

NameKindWhat it isPublic members
PanelclassA dockable schema panel.on_menu_click
SettingsclassA Settings-page entry (a schema panel with placement = "settings").
WebviewController(panel_id=…)classBase class for a webview panel's Python side.complete_walkthrough, global_state, on_close, on_message, on_open, plugin_id, post_message, reload, scene, scene_id, server, set_server, state, workspace_state
panel(id, display_name=…, icon=…, menu_path=…, placement=…, …)functionDecorator for registering panels.
settings(id, display_name=…, category_path=…, icon=…, group=…)functionDecorator for registering plugin settings.
webview_panel(id, title=…, icon=…, menu_path=…, entry=…, …)functionRegister a :class:WebviewController subclass as a webview panel.

RPC#

NameKindWhat it isPublic members
PluginRpc(plugin_id, tracker=…, target=…, system=…, server=…)classctx.rpc for plugins.forget, include, publish, register, register_domain, topic, topic_head
RpcContext(hub, connection, request_id, spec, cancel_token=…, _chunk_n=…)classWhat an RPC method receives as ctx: the caller, cancel state and the hub.call_client, cancelled, client_id, emit, pick_client, publish, raise_if_cancelled, server, stream_client
RpcError(code, message, retryable=…, data=…)classRaise from a handler to reply with a typed error instead of internal.code, from_wire
WireModelclassBase for every params / result / chunk / event model.
hub_for(server)functionThe server's hub, created on first use.
rpc(name, scope, lock=…, stream=…, export=…, …)functionDeclare a core RPC method.
scene_operation_lock(server)functionThe per-project scene operation lock (app/websocket.py shares it), created on first use.
topic(name, mode, events, capacity=…, export=…, target=…)functionDeclare a topic and the event models it may carry.

Agent hooks#

NameKindWhat it isPublic members
AgentModelclassStatic facade over studio.agent's model relay; forwards to the provider.complete, provide
RequestScope(exclusive=…, denied=…, schemas=…, retrieval_text=…, reason=…)classWhat a plugin request policy wants for this request (§5.6).
ToolArgumentRejected(message, code=…, detail=…)classRaised by an argument policy to refuse a call; the model sees the message.
get_agent_hooks()functionThe process-wide hook registry.

Agent Sessions#

NameKindWhat it isPublic members
DEFAULT_PLAN_POLICYvalue
OperationConflict(operation_id)class
PLAN_POLICIESvalue
ProjectSessionStore(path)classSQLite Session authority for one ProjectServer.add_listener, append, append_trace, checkpoint_get, create, delete, descendants, fork, get, last_plan_messages, list, list_children, list_started, proposals_before, rename, replace, set_archived, trace_get, trace_list, traces, update_metadata, usage_totals
RESUMABLE_TURN_REQUESTvalue
RevisionConflict(session_id, expected, current)class
STORE_ONLY_KEYSvalue
SessionNotFound(session_id)class
TraceRecorder(turn_id, session_id, attempt=…)classbuild, live, note, observe
stored_copy(message)functionmessage as the store will return it: keys sorted at every level.
write_trace(server, recorder, status, error)function

Other#

NameKindWhat it isPublic members
AssetInputRefclass
CancellationToken(request_id)classdispose, is_cancelled, is_set, on_cancelled, reason, throw_if_cancelled, wait_cancelled
ClientRef(id, transport=…)classOpaque client identity used by handlers and transport adapters.
ComputeClient(server_url, attachment_token, compute_server_id, timeout=…, connect=…, …)classSynchronous authenticated client used from RunQueue worker threads.execute, interrupt, restart, update_callback_target
ComputeContractModelclassStrict snake_case model shared by host and provider adapters.
ContentHash(args, kwargs)functionRuntime representation of an annotated type.
DetachedProcess(pid, create_time, started, exit_path)classA waiter process started by :func:spawn.exit_code, from_json, kill_tree, running, to_json
FileImportersclassStatic registry; every method is safe from any thread.get, listing, on_changed, register, unregister, unregister_plugin
Handler(server)classBase class for the server's domain Handlers.broadcast, on_disconnect, on_shutdown, on_startup, scene, setup_routes, verbose
HmacObjectGrantService(base_url, secret, default_ttl=…, maximum_ttl=…, clock=…)classIssue and verify method/key/hash/size-bound signed object URLs.issue, verify, verify_request
HostedRefusal(what)classRaised where code would start on a hosted ProjectServer.
ImmutableInputRefvalue
InterpolationTypeclassInterpolation mode between keyframes.
LocalObjectStore(root)classImmutable filesystem-backed object store rooted at one directory.get, put, put_stream, stat
MAX_LOCAL_OBJECT_BYTESvalue
MaterializedInputRefclassOne immutable Project reference plus its short-lived download grant.validate_grant_binding
MeshAssetsclassStatic forwarders to the provider studio.assets registers.provide
OperationCancelledclassRaised when a cancellable operation observes a cancelled token.
POINT_CLOUD_FORMATvalue
ParametersApi(plugin_id, api)classRead and edit the current Scene's parameters through scene ops (ctx.parameters).delete, get, list, rename, set, set_values
PatchError(message, code)classA patch that cannot be parsed or does not apply; code says which.
ProjectMaterializedRunclassProject-owned portion of a RunSpec returned after grant authorization.validate_bounded_payload
RenderResourceRef(asset_id, uri, kind, format, byte_length, …)classto_dict
ResultRefclass
SNAPSHOT_ENVIRONMENT_FILESvalue
SceneClockclassStatic forwarders to the provider studio.timeline registers.provide
SceneInputRefclass
SceneWriteRejected(scene_id, operation, mode)classAn authored write was refused because the Scene is not in edit mode.
SnapshotManifest(files, created_at, base_snapshot_id=…)classfrom_json, hashes, snapshot_id, to_json, total_bytes
TerminalRunCallbackclassMetadata-only terminal Run callback sent to ProjectServer.validate_result_run
TimelineManager(scene)classManages animation playback and recording for a scene.apply_to_scene, batch_clip_updates, build_mesh_cache, build_mesh_cache_message, clear, clear_mesh_cache, current_frame, duration, estimate_mesh_cache_vertices, fps, from_dict, get_animated_state_at, get_full_state_at, get_mesh_at_time, get_object_state_at, get_playback_range, get_track_info, move_keyframe, move_keyframes, off, on, pause, play, record_keyframe, record_keyframes, remove_keyframe, remove_object_tracks, set_recording, set_time, stop, tick, to_dict, total_frames
VOLUME_FLOAT32_FORMATvalue
VersionMismatch(scene_id, expected, received)classA client sent a stale state_version for a Scene's time state.
apply_hunks(original, hunks, rel_path)functionoriginal with hunks (from parse_unified_patch) applied.
authored_scene_payload(scene)functionReturn a serialization copy with tracked fields owned by their tracks.
build_snapshot_manifest(root, previous=…, previous_stats=…, base_snapshot_id=…)functionHash the Project.
builtin_skills_dir()functionSkills shipped with witwin (witwin/witwin/skills).
content_hash_of(payload)function
current_script_mesh_dir()functionThe active run's folder (resolved), or None outside a script run.
default_db_path()functionPath to the AI-native SQLite DB (.witwin/ai_native.db).
extend_object_payload(extender)functionCall extender(scene, obj, data) on every object payload the server builds.
fetch_snapshot_files(root, manifest, paths, download_urls, download)functionDownload paths atomically: each file lands under a temp name, is verified, then renamed.
files_changed(paths, root=…)functionAnnounce that paths under root changed.
get_cancellation_registry()function
global_skills_dir()functionUser-global skills dir (~/.witwin/skills).
keeping_files(keeper)functionMake keeper receive note_file_change calls while the block runs.
load_scene_ref(scene_ref, scene=…)functionWhat a solver's solve(ctx, scene, config) receives.
local_skill_paths()functionExplicit local Skill paths; never infer sibling or current-directory sources.
note_file_change(path)functionLet the active keeper copy path before a Tool changes or deletes it.
on_field_written(listener)functionCall listener(scene, object_id, target, before, after) after update_component wrote a field.
on_files_changed(listener)functionCall listener(paths, root) after every files_changed.
parse_unified_patch(patch)functionOne {"oldPath", "path", "hunks"} per file in patch.
plugin_index_text(loader=…)functionThe plugin index for the turn context: one line per active Plugin; "" when none.
project_installed_skills_dir()functionProject-selected installed Skill packages under disposable runtime state.
project_skills_dir()functionVisible, user-owned Project Skills dir (<project>/skills).
provide_tool_scope(scope)functionMake scope(server, turn_id, session_id, tool, args) wrap writing Agent Tool calls.
push_snapshot(root, manifest, missing, upload)functionUpload blobs the store lacks.
refuse_when_hosted(what)functionRaise HostedRefusal on a hosted ProjectServer; do nothing elsewhere.
satisfies(version, range_spec)functionReturn True if version satisfies the (AND-ed) range_spec.
script_mesh_dir(folder)functionAccept create_mesh files from folder while the block runs (one script run).
secret_env_get(name)functionA sealed secret, else the environment variable (tests, unsealed hosts).
secret_env_lookup()functionThe environment with the sealed secrets on top, for env.get(...) readers.
select_snapshot(manifest, patterns, with_environment=…)functionThe part of manifest a Run stages in; no patterns means the whole Project.
server_versionvalue
short_id(prefix, n=…)functionTier-2 id {prefix}_{n Crockford base32 chars} (dev_docs/ID_DESIGN.md §6).
spawn_detached(argv, cwd, env, stdout, stderr, exit_path)functionStart argv outside the server's process tree.

Test helpers: witwin_server.api.testing#

NameKindWhat it is
testing.SceneTimeService(on_clear_runtime=…)classSingle authority for per-scene mode/time and L1 write gates.
testing.activate_system_plugins(project=…)functionActivate Studio's system Plugins (studio.*) as a ProjectServer does; idempotent.
testing.agent_hooks(plugin_id)functionAn empty, private set of Agent hooks for one test.
testing.build_project_mesh_cache(project, asset)functionBuild the mesh cache of a Project mesh asset (asset + .wtimport), as import does.
testing.component_types()functionEvery registered Component type, by name (copy).
testing.library_item_ids()functionIds of every Library item registered so far, with or without a running server.
testing.load_plugin(root, activate=…, force_enabled=…)functionLoad the Plugin at root with Studio's real loader; unload it on exit.
testing.read_manifest(path)functionParse a witwin.toml the way the loader does; returns its PluginManifest.
testing.select_tools(tools, user_text, history=…, context=…, policy=…, …)functionPick the Tools the model sees for one turn.