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
| Property | Contract |
|---|---|
| Local SDK method ID | 1 |
| Kind | Query |
| Permission | nexa.minecraft.diagnostics.read |
| Legal phases | Initialize, PostInitialize, Checkup, Finalize, Active |
| Idempotency | ReadOnly |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Id | EntityId | Identity 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 2 |
| Kind | Registration |
| Permission | nexa.minecraft.diagnostics.write |
| Legal phases | Initialize |
| Idempotency | RequiredKey |
| Host status | Mapped 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
| Field | Type | Meaning |
|---|---|---|
Id | QualifiedId | Identity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path. |
Kind | QualifiedId | Host-supported provider family. Registration succeeds only for a mapped family. |
ContractVersion | ulong | Provider contract version; current catalog read-provider callbacks use 100. |
SchemaHash | string | Digest of the provider callback envelope schema; current catalog read providers use BusinessProviderCall. |
DisplayName | LocalizedText | User-facing localized label; it is not an authority-bearing identity. |
Capabilities | string[] | 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. |
SupportedScopes | string[] | 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. |
Selection | SelectionPolicy | Selection rule; the current catalog callback boundary supports ExplicitRequest. |
Concurrency | ConcurrencyPolicy | Declared execution policy. A provider family may reject enum members whose semantics it does not implement. |
DeadlineMilliseconds | long | Requested deadline in milliseconds; queue time consumes this budget and caller deadlines can shorten it. |
FailurePolicy | ProviderFailurePolicy | How this provider family reports callback failures; it does not automatically make retries safe. |
Configuration | SchemaRef | Schema for provider configuration, not arbitrary executable Host configuration. |
Handler | ulong | Callback 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 3 |
| Kind | Query |
| Permission | nexa.minecraft.diagnostics.read |
| Legal phases | Initialize, PostInitialize, Checkup, Finalize, Active |
| Idempotency | ReadOnly |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Instance | EntityId | Identity or revision in this model’s domain; preserve ownership and exact spelling. |
Findings | QualifiedId[] | 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. |
ExpectedRevision | Revision | Revision 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 4 |
| Kind | Operation |
| Permission | nexa.minecraft.diagnostics.write |
| Legal phases | Active |
| Idempotency | RequiredKey |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Plan | EntityId | Identity or revision in this model’s domain; preserve ownership and exact spelling. |
ExpectedRevision | Revision | Revision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target. |
ConfirmationToken | string? | 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 5 |
| Kind | Query |
| Permission | nexa.minecraft.diagnostics.read |
| Legal phases | Initialize, PostInitialize, Checkup, Finalize, Active |
| Idempotency | ReadOnly |
| Host status | Mapped 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
| Field | Type | Meaning |
|---|---|---|
Provider | QualifiedId | Identity or revision in this model’s domain; preserve ownership and exact spelling. |
Instance | EntityId | Identity 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):
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.