Skip to content

Platform ​

Request finite operating-system integration through the Host. Platform availability, user grants and application policy determine which actions can run.

Contract: nexa.platform/100. API index.

Typical sequence ​

Describe the platform or query its facts before presenting optional features. Use explicit URI, file and clipboard operations with the requested data type and scope.

Behavior and limits ​

Opening a URI is an external effect, not arbitrary command execution. Unsupported display/power/clipboard data must remain unavailable rather than being reported as fabricated measurements.

The recorded Host maps 10 of 10 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 ​

Describe · OpenUri · RevealFile · Notify · ReadClipboard · WriteClipboard · PickFile · QueryPower · QueryDisplay · QueryArchitecture

Describe ​

Empty → PlatformDescription

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

Request fields

This model has no fields. Send its encoded empty object, not an arbitrary Null value.

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_Platform_Describe(&reply, request, &options);

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

OpenUri ​

UriRef → Empty

PropertyContract
Local SDK method ID2
KindMutation
Permissionnexa.platform.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

Use the linked request type, including its container or handle ownership rules.

Successful result

There is no result payload beyond the encoded Empty model. Check Success; an empty failure value is not successful 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_Platform_OpenUri(&reply, request, &options);

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

RevealFile ​

FileRef → Empty

PropertyContract
Local SDK method ID3
KindMutation
Permissionnexa.platform.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
TokenGuidOpaque Host-issued handle token. Keep it with its owner and resource type.
LoadInstanceIdGuidIdentity of the admitted load that owns this handle; it is not portable to a replacement load.
ScopestringExplicit target scope. The Host checks that the caller is authorized for it.

Successful result

There is no result payload beyond the encoded Empty model. Check Success; an empty failure value is not successful 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_Platform_RevealFile(&reply, request, &options);

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

Notify ​

UINotification → Empty

PropertyContract
Local SDK method ID4
KindMutation
Permissionnexa.platform.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
TitleLocalizedTextStructured LocalizedText value; follow its linked field contract.
BodyLocalizedTextStructured LocalizedText value; follow its linked field contract.
ActionQualifiedId?Identity or revision in this model’s domain; preserve ownership and exact spelling. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

There is no result payload beyond the encoded Empty model. Check Success; an empty failure value is not successful 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_Platform_Notify(&reply, request, &options);

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

ReadClipboard ​

Empty → ClipboardContent

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

Request fields

This model has no fields. Send its encoded empty object, not an arbitrary Null value.

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_Platform_ReadClipboard(&reply, request, &options);

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

WriteClipboard ​

ClipboardContent → Empty

PropertyContract
Local SDK method ID6
KindMutation
Permissionnexa.platform.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
Textstring?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.
ImageBlobRef?Structured BlobRef value; follow its linked field contract. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

There is no result payload beyond the encoded Empty model. Check Success; an empty failure value is not successful 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_Platform_WriteClipboard(&reply, request, &options);

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

PickFile ​

FilePick → FileRef

PropertyContract
Local SDK method ID7
KindOperation
Permissionnexa.platform.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
TitleLocalizedTextStructured LocalizedText value; follow its linked field contract.
KindFilePickKindUse an exact enum member listed in the reference. The Host can support a subset for a particular operation.
Extensionsstring[]Domain value named by this field; additional accepted values and bounds are determined by the operation and Host policy. A bounded collection; do not assume an unbounded result or unspecified ordering.

Successful result

An opaque file reference within the granted or package scope. It does not grant access to neighboring files.

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_Platform_PickFile(&reply, request, &options);

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

QueryPower ​

Empty → PowerState

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

Request fields

This model has no fields. Send its encoded empty object, not an arbitrary Null value.

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_Platform_QueryPower(&reply, request, &options);

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

QueryDisplay ​

Empty → Page<DisplayInfo> (wrapper, item)

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

Request fields

This model has no fields. Send its encoded empty object, not an arbitrary Null value.

Successful result

Read Items and continue with NextCursor while preserving the original query. An absent cursor ends the sequence; an invalid cursor is an error.

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_Platform_QueryDisplay(&reply, request, &options);

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

QueryArchitecture ​

Empty → ArchitectureInfo

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

Request fields

This model has no fields. Send its encoded empty object, not an arbitrary Null value.

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_Platform_QueryArchitecture(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Platform_QueryArchitecture_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.