Skip to content

Minecraft.Diagnostics ​

Analyze an instance and preview a repair using the launcher’s diagnostic owner. Findings identify suspected conditions; a finding alone does not authorize a write.

Contract: nexa.minecraft.diagnostics/100. API index.

Typical sequence ​

Analyze the selected instance, review the returned findings, then prepare and confirm a supported repair plan. Execute the exact plan and observe its task.

Behavior and limits ​

Custom rule providers remain unmapped. Preserve unresolved findings and failed repairs; do not report an instance healthy simply because a provider could not run.

The recorded Host maps 5 of 5 operations in this group. A mapping is subject to permission, phase, scope, platform and business preconditions. Host snapshot identifies the source revision; negotiate against the actual installed Host.

Operations ​

Analyze · RegisterRuleProvider · PreviewRepair · ExecuteRepair · AnalyzeWithProvider

Analyze ​

EntityRequest → DiagnosticAnalysis

PropertyContract
Local SDK method ID1
KindQuery
Permissionnexa.minecraft.diagnostics.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdEntityIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Diagnostics_Analyze(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Diagnostics_Analyze_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

RegisterRuleProvider ​

ProviderDescriptor → RegistrationRef

PropertyContract
Local SDK method ID2
KindRegistration
Permissionnexa.minecraft.diagnostics.write
Legal phasesInitialize
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Register kind nexa:diagnostics/rules with Analyze: InstanceSummary → DiagnosticAnalysis. AnalyzeWithProvider is the explicit consumer. The callback receives public instance metadata only; it does not acquire log, file or repair authority.

Request fields

FieldTypeMeaning
IdQualifiedIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.
KindQualifiedIdHost-supported provider family. Registration succeeds only for a mapped family.
ContractVersionulongProvider contract version; current catalog read-provider callbacks use 100.
SchemaHashstringDigest of the provider callback envelope schema; current catalog read providers use BusinessProviderCall.
DisplayNameLocalizedTextUser-facing localized label; it is not an authority-bearing identity.
Capabilitiesstring[]Exact capabilities advertised or required by this descriptor, subject to the Host’s accepted table. A bounded collection; do not assume an unbounded result or unspecified ordering.
SupportedScopesstring[]Scopes the provider declares it can handle; declaration does not authorize every target. A bounded collection; do not assume an unbounded result or unspecified ordering.
SelectionSelectionPolicySelection rule; the current catalog callback boundary supports ExplicitRequest.
ConcurrencyConcurrencyPolicyDeclared execution policy. A provider family may reject enum members whose semantics it does not implement.
DeadlineMillisecondslongRequested deadline in milliseconds; queue time consumes this budget and caller deadlines can shorten it.
FailurePolicyProviderFailurePolicyHow this provider family reports callback failures; it does not automatically make retries safe.
ConfigurationSchemaRefSchema for provider configuration, not arbitrary executable Host configuration.
HandlerulongCallback identifier registered by this plugin. A handler alone is not a public action or provider registration.

Successful result

Retain the registration identity for the permitted update/release operation. Staged registrations become visible only at group activation.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Diagnostics_RegisterRuleProvider(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Diagnostics_RegisterRuleProvider_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

PreviewRepair ​

RepairRequest → MutationPlan

PropertyContract
Local SDK method ID3
KindQuery
Permissionnexa.minecraft.diagnostics.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
InstanceEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
FindingsQualifiedId[]Identity or revision in this model’s domain; preserve ownership and exact spelling. A bounded collection; do not assume an unbounded result or unspecified ordering.
ExpectedRevisionRevisionRevision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target.

Successful result

Retain the exact plan ID and revision, review its bound inputs and confirmation requirement, then use the corresponding commit operation.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Diagnostics_PreviewRepair(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Diagnostics_PreviewRepair_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ExecuteRepair ​

PlanRequest → OperationRef

PropertyContract
Local SDK method ID4
KindOperation
Permissionnexa.minecraft.diagnostics.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
PlanEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
ExpectedRevisionRevisionRevision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target.
ConfirmationTokenstring?Domain value named by this field; additional accepted values and bounds are determined by the operation and Host policy. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

Work has been admitted. Read or watch the owned operation through Tasks to establish its terminal result; admission is not completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Diagnostics_ExecuteRepair(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Diagnostics_ExecuteRepair_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

AnalyzeWithProvider ​

ProviderInstanceQuery → DiagnosticAnalysis

PropertyContract
Local SDK method ID5
KindQuery
Permissionnexa.minecraft.diagnostics.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Invoke an active rule provider for an admitted instance and recheck its revision afterward. The result must name that instance and contain at most 128 reports and 128 issues. The Host namespaces report codes and overwrites correlation/operation IDs so a provider cannot impersonate Host diagnostics.

Request fields

FieldTypeMeaning
ProviderQualifiedIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
InstanceEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Diagnostics_AnalyzeWithProvider(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Diagnostics_AnalyzeWithProvider_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.


Source: NexaCL-Plugin-SDK · Apache-2.0.

Site documentation: CC BY-SA 4.0. Imported SDK documents: Apache-2.0 as marked.