Kitaru

inspection

Shared runtime inspection and JSON serialization helpers.

func_sdk_version() -> str

Resolve the installed SDK version lazily.

Returns

str
funcdescribe_local_server() -> str

Summarize the state of the local Kitaru-compatible server, if any.

Returns

str
funcconnected_to_local_server_safe() -> bool

Safely check whether the current client is bound to a local server.

Returns

bool
func_build_snapshot_without_local_store(_gc, _exc) -> RuntimeSnapshot

Build a degraded snapshot when local runtime support is unavailable.

param_gcGlobalConfiguration
param_excException

Returns

kitaru.inspection.RuntimeSnapshot
funcuses_stale_local_server_url(server_url, local_server_status) -> bool

Check for a localhost URL that points at a stopped local server.

paramserver_urlstr | None
paramlocal_server_statusstr | None

Returns

bool
func_legacy_runner_env_warning() -> str | None

Return a warning when the legacy stack-selection env var is still set.

Returns

str | None
funclog_store_mismatch_details(preferred) -> tuple[str | None, str | None]

Return status-row + warning text when preferred and active backends differ.

parampreferredResolvedLogStore

Returns

tuple[str | None, str | None]
funccombine_warnings(*warnings) -> str | None

Combine non-empty warning messages into one multiline block.

paramwarningsstr | None
= ()

Returns

str | None
funcbuild_runtime_snapshot() -> RuntimeSnapshot

Resolve the current Kitaru runtime state from ZenML-backed config.

Returns

kitaru.inspection.RuntimeSnapshot
func_qualified_type_name(value) -> str

Return the fully qualified runtime type name for a value.

paramvalueAny

Returns

str
functo_jsonable(value, *, fallback_repr) -> Any

Convert a value into a JSON-serializable representation.

paramvalueAny
paramfallback_reprbool

Returns

typing.Any
funcserialize_failure(failure) -> dict[str, Any] | None

Serialize optional failure details.

paramfailureFailureInfo | None

Returns

dict[str, typing.Any] | None
funcserialize_pending_wait(wait) -> dict[str, Any] | None

Serialize optional pending wait details.

paramwaitPendingWait | None

Returns

dict[str, typing.Any] | None
funcserialize_artifact_ref(artifact) -> dict[str, Any]

Serialize artifact metadata.

paramartifactArtifactRef

Returns

dict[str, typing.Any]
funcserialize_artifact_value(value) -> dict[str, Any]

Serialize an artifact payload value for MCP transport.

paramvalueAny

Returns

dict[str, typing.Any]
funcserialize_checkpoint_attempt(attempt) -> dict[str, Any]

Serialize checkpoint-attempt details.

paramattemptCheckpointAttempt

Returns

dict[str, typing.Any]
funcserialize_checkpoint_call(checkpoint) -> dict[str, Any]

Serialize checkpoint-call details.

paramcheckpointCheckpointCall

Returns

dict[str, typing.Any]
funcserialize_execution_summary(execution) -> dict[str, Any]

Serialize execution list-item details.

paramexecutionExecution

Returns

dict[str, typing.Any]
funcserialize_execution(execution) -> dict[str, Any]

Serialize full execution details.

paramexecutionExecution

Returns

dict[str, typing.Any]
funcserialize_stack(stack, *, is_managed=None) -> dict[str, Any]

Serialize stack information for structured output.

paramstackStackInfo
paramis_managedbool | None
= None

Returns

dict[str, typing.Any]
funcserialize_stack_create_result(result) -> dict[str, Any]

Serialize stack-create operation details.

paramresult_StackCreateResult

Returns

dict[str, typing.Any]
funcserialize_stack_delete_result(result) -> dict[str, Any]

Serialize stack-delete operation details.

paramresult_StackDeleteResult

Returns

dict[str, typing.Any]
func_serialize_stack_component_details(component) -> dict[str, Any]

Serialize one translated stack component for structured stack output.

paramcomponentStackComponentDetails

Returns

dict[str, typing.Any]
funcserialize_stack_details(details) -> dict[str, Any]

Serialize stack inspection details for stack show style output.

paramdetailsStackDetails

Returns

dict[str, typing.Any]
funcserialize_runtime_snapshot(snapshot) -> dict[str, Any]

Serialize runtime status details for structured output.

paramsnapshotRuntimeSnapshot

Returns

dict[str, typing.Any]
funcserialize_log_entry(entry) -> dict[str, Any]

Serialize one log entry for JSON output.

paramentryLogEntry

Returns

dict[str, typing.Any]
funcserialize_model_alias(entry) -> dict[str, Any]

Serialize model alias information.

paramentryModelAliasEntry

Returns

dict[str, typing.Any]
funcsecret_visibility(secret) -> str

Return a human-readable visibility label for a secret.

paramsecretSecretResponse

Returns

str
funcserialize_secret_summary(secret) -> dict[str, Any]

Serialize secret summary information.

paramsecretSecretResponse

Returns

dict[str, typing.Any]
funcserialize_secret_detail(secret, *, show_values) -> dict[str, Any]

Serialize secret detail information.

paramsecretSecretResponse
paramshow_valuesbool

Returns

dict[str, typing.Any]
funcserialize_resolved_log_store(snapshot, *, active_store=None, warning=None) -> dict[str, Any]

Serialize effective log-store information.

paramsnapshotResolvedLogStore
paramactive_storeActiveStackLogStore | None
= None
paramwarningstr | None
= None

Returns

dict[str, typing.Any]