Kitaru

inspection

Shared runtime inspection and JSON serialization helpers.

attributelogger
= logging.getLogger(__name__)
funcdescribe_local_server() -> str

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

Returns

str
funcis_registered_local_server_url(url) -> bool

Return whether a URL matches the registered local Kitaru server.

paramurlstr | None

Returns

bool
funcconnected_to_local_server_safe() -> bool

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

Returns

bool
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
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(*, include_packages=False, package_names=None, include_environment_type=False) -> RuntimeSnapshot

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

paraminclude_packagesbool
= False
parampackage_namesSequence[str] | None
= None
paraminclude_environment_typebool
= False

Returns

kitaru.inspection.RuntimeSnapshot
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_memory_entry(entry) -> dict[str, Any]

Serialize typed memory-entry metadata for transport layers.

paramentryMemoryEntry

Returns

dict[str, typing.Any]
funcserialize_memory_history(history) -> list[dict[str, Any]]

Serialize a memory history sequence.

paramhistorySequence[MemoryEntry]

Returns

list[dict[str, typing.Any]]
funcserialize_memory_scope_info(info) -> dict[str, Any]

Serialize a discovered memory scope for transport layers.

paraminfoMemoryScopeInfo

Returns

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

Serialize a loaded memory value using the shared artifact-value rules.

paramvalueAny

Returns

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

Serialize a purge result for transport layers.

paramresultPurgeResult

Returns

dict[str, typing.Any]
funcserialize_compaction_record(record) -> dict[str, Any]

Serialize a compaction audit record for transport layers.

paramrecordCompactionRecord

Returns

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

Serialize a compact result for transport layers.

paramresultCompactResult

Returns

dict[str, typing.Any]
funcserialize_memory_reindex_issue(issue) -> dict[str, Any]

Serialize a sampled memory reindex issue for transport layers.

paramissueMemoryReindexIssue

Returns

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

Serialize a memory reindex result for transport layers.

paramresultMemoryReindexResult

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]
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]