ZERA AI OS Back to SDK

DEVELOPER DOCUMENTATION

SpaceSDK Windows API, permissions, and recovery

On this page1. Entry points and common parameters2. Agent and Team employments3. Sessions, messages, and Teams4. Acceptance, recovery, and events5. Business handlers6. Dock7. Scheduling limitations8. Optional KBrain extension9. Error handling

Baseline: SpaceSDK 0.1.0-preview.1, September 6, 2026, Developer API 1. This page documents the public ports and call semantics. Complete fields ship in dist/*.d.ts. An SDK port does not by itself prove real Host acceptance; see release and support scope.

1. Entry points and common parameters

@lumii/spacesdk/chat exports createNativeApplicationRuntimeContext, createNativeApplicationRuntimePlatform, NativeDeveloperBridgeCallError, mountApplicationChat, and ApplicationChatController. Complete contracts and other types are in @lumii/spacesdk. Both are browser-bundleable ESM and do not include a Gateway client. SPACESDK_API_VERSION is the unified protocol constant; LUMII_DEVELOPER_API_VERSION remains for compatibility.

2. Agent and Team employments

platform.employments is limited to bindings owned by the current application and account.

MethodPermissionMeaning
listOwnBindings({ cursor, limit })employment.readLists admitted application employments with pagination.
getOwnBinding(bindingId)employment.readReads one current binding and state.

A binding contains an opaque bindingId, application employment ID, display name, agent or team kind, state, and revision. Show the list and require explicit user selection. Do not choose the first item, infer by display name, or persist a foundation identity as a replacement for the binding.

3. Sessions, messages, and Teams

platform.sessions provides application-scoped session operations. Creating and sending require session.manage or session.send; reading and history require the corresponding read grants.

OperationNotes
createCreates a fresh session for an explicitly selected active binding. Do not silently reuse “the latest” session.
list / getReturns only sessions authorized to this application; list results are paginated.
sendSubmits an Agent message. Acceptance is not completion.
executeTeamRequires explicit member selection and targets. It never guesses a manager or falls back to a normal Agent send.
historyReads only the authorized history range for the application session reference.
cancelRequests cancellation; the terminal receipt determines the actual outcome.

Use sessionRef, requestRef, and member result references as opaque values. The SDK has no public attach(sessionKey) escape hatch.

4. Acceptance, recovery, and events

A returned acceptance receipt means the Host admitted the request, not that model or tool work succeeded. Persist the receipt before displaying durable progress. After a disconnect, recover with the same requestRef; do not create a duplicate request simply because the response was lost.

5. Business handlers

platform.handlers.invoke requires business.invoke and calls only a Plugin dependency declared and linked by this application.

const result = await platform.handlers.invoke({
  dependencyId: "inventory-tools",
  operation: "inventory_application",
  input: { operation: "products.list", input: {} },
  requestId: crypto.randomUUID(),
});

The Host verifies application identity, grants, dependency linkage, and runtime scope. The Plugin owns the actual operation contract. Validate isError and the Plugin-specific result shape. Generic TypeScript parameters do not validate runtime data. The application remains responsible for business authorization, input validation, concurrency control, transactions, and business idempotency.

6. Dock

platform.dock requires dock.manage. An application can register, update, or remove only its own declared Dock entry. The Host owns final placement and lifecycle state. A successful SDK call does not authorize another application's route or icon.

7. Scheduling limitations

platform.schedules requires schedule.manage. The current SDK can describe limited schedule records, but the Host has no generic sandbox task executor for application work. schedule.runNow is explicitly unsupported, and active creation or resume must not be presented as executable merely because their types exist. Surface the concrete Host error instead of substituting another execution path.

8. Optional KBrain extension

platform.knowledge is optional and must be capability-checked. It is not a business database API and does not expose raw Memory, Wiki, or Dreaming administration. A declared port does not prove that the required Native/Core extension version and authorization are available on a target Host.

9. Error handling

Native calls reject with NativeDeveloperBridgeCallError. Preserve and display the concrete code, message, retryability, and request reference where provided.

ClassResponse
Admission or identity failureStop the operation and ask the user to reopen or reconfigure through the trusted Host/DStore flow.
Missing grantExplain the exact capability. Do not request unrelated global permissions.
Unsupported operationDisable the action for this Host/SDK combination; do not silently fall back.
Retryable transport lossRecover the same request with its reference before considering a new submission.
Business handler errorUse the Plugin contract and reload authoritative business state, especially after partial success.
Stale binding or caller generationDiscard cached identity and obtain a fresh Host context.

Do not turn failures into false success. Log enough correlation data to diagnose the exact SDK, Host, application, Plugin release, and request without exposing credentials or cross-application identities.