lithe-plugin-sdk-java is the official way to write a plugin backend in Java:
the process a plugin starts through a runtime launch
({ "kind": "runtime", "tool": "java", "minimumVersion": "8", "entry": "backend/app.jar" }).
It is the Java twin of the Node.js SDK. Both implement the
following protocols from the
plugin contract, which lives in this repository
next to the SDK and changes with it, with the same rules and error mapping:
litheBuild: typedlithe/build/*requests, for a build system whosemodelordependenciessource isprovider: models and dependency trees, bounded task execution, tests, run and debug preparation, and read-only model inputs.litheFunctions: plugin functions, which are plugin-private actions that Lithe invokes for the same plugin, with progress, cancellation, and registration at runtime; host services such as credentials, workspace contexts, capability discovery, host notifications, and the public document, file, editor, and window methods; and calls to other plugins' functions, which Core relays. A function also learns which plugin called it. The view functions that draw a plugin's tool windows and settings regions are plugin functions too.litheKeymapImport: independently negotiated shortcut import providers reading only explicitly selected source snapshots.litheLogging: typed diagnostics, required in every session.
The Java SDK has no VCS provider API; only the Node.js SDK has one. The SDK
requires Java 8 or newer and has no runtime dependencies. JSON values are plain
Map<String, Object>, List<Object>, String, Long, Double, Boolean,
and null (see Json).
The Lithe desktop declares backend, pluginFunctions and buildSystems
(version 0) and buildProviders (versions 0 and 1), so the function,
host-service and build protocols below run there. It does not declare keymapImportProviders or
buildModelInputs: a plugin whose manifest requires one of them is not offered
for installation there. The Core end-to-end tests still drive those protocols.
Which host services a session may call is reported at run time; see
Host services.
Declare backend.keymapImportProvider(id, handler) before listening. Its
handler receives a KeymapSnapshot with providerId(), snapshotId(),
listInputs() and readChunk(fileId, offset, maximumBytes), plus the normal
call context. Paths returned by listInputs are relative labels; reads use
opaque file IDs. Return a normalized { bindings: [...] } map and observe
the call's cancellation. The host revokes the snapshot when the call ends.
Do not turn conditional or multi-stroke rules into global bindings.
Backend backend = Backend.create("example-backend", "1.0.0");
backend.onModel((params, context) -> {
Map<String, Object> project = new LinkedHashMap<>();
project.put("name", "app");
project.put("path", Json.string(params, "root"));
Map<String, Object> model = new LinkedHashMap<>();
model.put("projects", Collections.singletonList(project));
return model;
});
backend.function("snapshot.refresh", (params, context) -> {
context.progress("Refreshing", 10.0);
Processes.Result result = context.run(Arrays.asList("example-tool", "refresh"));
if (result.exitCode() != 0) {
throw new PluginError("example.refreshFailed", "The refresh failed.");
}
return Collections.singletonMap("refreshedAt", System.currentTimeMillis());
});
backend.listen();examples/sample-build is a complete plugin. It has
a build provider, functions, persistent state, a function registered at
runtime, and cancellation. From the root of this repository,
node shared/plugins/scripts/sdk-e2e.mjs drives it through a real Core session
with the scenario in sdk/e2e, the same one the
Node.js sample answers.
A tool window or settings region whose manifest entry has
view: { function } is drawn by that backend function
(Plugin views). Declare it with
backend.view(id, handler). The handler gets a ViewEvent: kind(),
instance(), toolWindowId() or settingRegionId(), language(), the
effective() and draft() setting values, and the fields of that event.
Params that are not a view event fail the call with sdk.view.invalidEvent
before the handler runs; an optional field that is null counts as absent. The
handler answers a ViewResult:
ViewResult.view(nodes): a whole view. The first answer afterOPENmust be one.ViewResult.patches(patches): edits to the view the host is drawing, built withViewPatch.ViewResult.unchanged()ornull: nothing changed. The SDK answers{}.
Nodes are plain JSON maps shaped as
plugin-ui.schema.json describes.
Core checks every answer, and the host draws nothing that Core refused. Return
view text in event.language(). A host that reports the view's width sends
it as event.width() on every event; a canvas that follows the window lays
itself out at that width, lists resize in its on, and answers
Kind.RESIZE with the scene laid out again
(Canvas).
backend.view("explorer.draw", (event, context) -> {
if (event.kind() == ViewEvent.Kind.OPEN) {
Map<String, Object> label = new LinkedHashMap<>();
label.put("type", "label");
label.put("text", "Modules");
Map<String, Object> refresh = new LinkedHashMap<>();
refresh.put("type", "button");
refresh.put("id", "refresh");
refresh.put("text", "Refresh");
Map<String, Object> row = new LinkedHashMap<>();
row.put("type", "row");
row.put("children", Arrays.asList(label, refresh));
return ViewResult.view(Collections.singletonList(row));
}
if (event.kind() == ViewEvent.Kind.CLICK && "refresh".equals(event.node())) {
return ViewResult.patches(Collections.singletonList(
ViewPatch.set("refresh", Collections.singletonMap("enabled", false))));
}
return null;
});Use the SDK sources from a pinned commit of this repository. The 0.5.0 in
pom.xml is the source version; there is no corresponding
sdk-java-v0.5.0 release to download. The SDK is not published to a Maven
repository.
Vendor the SDK in your plugin repository:
- Check out the reviewed full Core commit SHA, rather than a moving
branch such as
main. Copy the production sources fromplugin-sdk/src/main/javaintovendor/lithe-plugin-sdk-java/src/main/javain your plugin. Copyshared/plugins/LICENSEtovendor/LICENSEas well. - Record the inputs in
sdk.lock.json:schemaVersion: 1,source.repository: "https://github.com/Lithe-IDEA/Lithe-core-rust",source.revisioncontaining that full commit SHA, and afilesarray containing every copied file, including the license. Each entry records itsupstreampath in Core, itspathin your plugin, and thesha256of the exact file bytes. Commit the sources, license, and lock together. - Before compiling, verify every vendored file against the lock. Fail the build on missing, changed, duplicate, or unpinned files. Normal builds check the recorded hashes; they must not regenerate them. An SDK upgrade deliberately updates the reviewed commit, copied files, and lock together, removing files that the new revision no longer supplies.
- Compile the vendored sources together with your backend, targeting Java 8
(for example,
javac --release 8with a newer JDK), and package all the classes in the backend JAR. Include the SDK license in your plugin package. If your build compiles the SDK as a separate local JAR, shade it into the backend asexamples/sample-build/pom.xmldoes.
The Maven plugin's lock and hash verifier show the lock format and build-time check. The Tomcat plugin's packaging script shows how to compile the vendored sources and include the SDK license.
A plugin package is installed read-only and must run offline, so the backend JAR it starts must hold everything it loads.
The SDK requires experimental.litheLogging at initialization and refuses a
host that does not offer it.
See plugin logging for the typed diagnostics
API, host-owned catalog, exact levels, operation correlation and ${logDir}.
Use diagnostics().degraded/recovered for handled fallback or recovery facts.
Function and build terminal facts are automatic; do not log a failure before
returning it to the SDK. Suppress successful high-frequency reads with
suppressSuccessDiagnostics(operation). There is no free-text log API, no
stderr fallback and no plugin-owned file writer.
| API | Purpose |
|---|---|
Backend.create(name, version[, capabilities]) |
Creates the backend. capabilities are standard LSP server capabilities; the SDK negotiates its experimental protocols. |
onModel(handler), onDependencies(handler) |
Implement the typed build requests. The SDK stamps format and version. Core validates the document. litheBuild is answered only when a handler exists. |
onExecute(handler) |
A bounded provider-owned task, returning { exitCode, output }. |
onTest(handler), onDiscoverTests(handler) |
Exact test execution and runnable selectors; the discovery format and version are stamped. |
onPrepareRun(handler), onPrepareDebug(handler) |
Prepare a portable run or debug plan; the host owns the application. |
negotiated().build() |
Whether the host offered litheBuild and the backend declared a build handler; build methods are refused before their handler runs when it is false. |
function(id, handler) |
Declares a function offered in initialize. |
view(id, handler) |
Declares a view function; see Plugin views. |
registerFunction(id, handler), unregisterFunction(id) |
Add or withdraw a function. Called before the initialize answer (for example from onInitialize), they change the initial list. Later calls send lithe/function/register or lithe/function/unregister, in order. Both return a CompletableFuture. Withdrawing a function revokes its running calls. |
negotiated().functions() |
Whether the host offered plugin functions. host().negotiated() reports the same. |
host() |
Host services for work outside a call, such as a command handler. Its calls to other plugins name no parent call. |
onCommand(commandId, handler) |
Runs handler.handle(commandId, workspaceContext) when the user runs one of the plugin's commands. |
onContextsChanged(handler) |
lithe/host/workspace/didChangeContexts with its { revision }. |
onHostNotification(method, handler) |
A lithe/host/* notification a later host adds. The three this SDK routes itself are reserved. |
onInitialize(hook), onShutdown(hook) |
Lifecycle hooks. onInitialize receives the initialize params and what was negotiated. |
onRequest(method, handler), onNotification(method, handler) |
Ordinary LSP methods. Lifecycle and lithe/* methods are reserved. |
sendRequest, sendNotification |
Ordinary LSP messages to the host. lithe/* methods are reserved. |
diagnostics().degraded(operation, code[, count]), .recovered(...) |
Typed handled fallback/recovery; no payload text. |
listen() |
Serves stdio until exit or the end of input, then exits the JVM with the protocol's exit code. listen(in, out, err) serves other streams and returns the code instead. |
PluginError(code, message) |
A failure meant for your own UI. |
Processes.run(command[, options]) |
Runs a process without a shell. Its stdin is closed. Options set the directory, environment, output limits, a cancellation, and output callbacks. |
StateStore.open(directory) |
A small atomic JSON store in a host-provided directory. |
Handlers run on their own threads. Every handler receives a CallContext:
| Member | Meaning |
|---|---|
cancellation(), isCancelled() |
Cancelled when any of these happens: Lithe cancels the call, its deadline passes, the function is withdrawn, the session ends, or the handler finishes. Finishing the handler stops the work it left running. |
throwIfCancelled() |
Throws CancelledException once the call is cancelled. |
run(command[, options]) |
Processes.run bound to the call: cancelling or ending the call stops the process. |
diagnostics() |
Typed diagnostics correlated with this call. |
functionId() |
Functions only. |
host() |
Host services bound to the call: ending the call cancels the requests it left unanswered. Its calls to other plugins name this call as their parent. |
workspaceContext() |
Functions: the { contextID, generation } of the window that invoked the call, or null. |
caller(), callerPluginId() |
Functions: the plugin that called this function through the relay, as an unmodifiable { pluginID } map and as its ID. Null when the host started the call. |
operationId() |
Opaque wire identity for functions and bounded build/test/run-preparation calls; null for other requests. It falls back to the JSON-RPC request ID, so never use it as a parentOperationID. |
progress(message, percentage[, output]) |
Functions use 1024-byte messages. Build/test/run preparation use 4096-byte messages and optional output up to 64 KiB. Percentages are clamped to 0–100. Cancelled or settled calls cannot report. Model/dependency/discovery reports are ignored. |
The typed handlers for task execution, tests, and run and debug preparation
require the corresponding host capabilities (buildProviders); the manifest
requirement and runtime negotiation are both checked, and registering a handler
never bypasses either boundary. See native build workflows
and the no-page Java sample.
Build tool failure is an exit-code result; throwing an error aborts preparation.
Private function results and errors map exactly as in the Node.js SDK; typed build operations follow their domain contract:
- A returned value becomes
result.value. PluginErrorbecomesplugin.function.failedwith your message andpluginErrorCode.- Any other exception is reported with a generic message; automatic diagnostics keep a fixed failure category without its message, cause or stack.
CancelledExceptionends the call as cancelled.- A result larger than 1 MiB of JSON fails like an unexpected error.
A backend may ask the host for services when the host offers plugin
functions (litheFunctions); each is granted by a manifest permission and
refused otherwise. When the host did not offer them, every host request fails
locally with HostError plugin.host.unavailable (-32601), the answer Core
would give, and nothing is sent. Every method returns a CompletableFuture;
wrong arguments fail it rather than throwing.
backend.function("query.run", (params, context) -> {
// Permission credentials.store: the platform's secret store, per plugin.
String password = context.host().credentials().get("connection.prod:password").get();
if (password == null) {
throw new PluginError("query.noPassword", "Sign in first.");
}
// The window the page runs in.
Map<String, Object> workspace = context.workspaceContext();
if (workspace != null && context.host().supports("lithe/host/workspace/getFolders").get()) {
Object folders = context.host().workspace().getFolders(workspace).get().get("folders");
// ...
}
return runQuery(params, password);
});
backend.onCommand("db.refresh", (commandId, workspaceContext) -> {
if (workspaceContext != null) {
backend.host().window().showInformation(workspaceContext, Collections.singletonMap("text", "Refreshed."));
}
});Build plugins may call host.build().getOptions(context, systemId, root)
for their effective options, and host.build().watchConfiguration(context, files, listener) for invalidation of those options and named local files.
Probe each method with host.supports(Protocol.HOST_BUILD_GET_OPTIONS) or
host.supports(Protocol.HOST_BUILD_WATCH_CONFIGURATION). Use the
backend's long-lived host for a subscription that should outlast a function
call. See the build configuration contract.
Host member |
Purpose |
|---|---|
negotiated() |
Whether the host offered plugin functions. When false, every other member fails or reports false locally. |
credentials().get(key), .set(key, secret), .delete(key) |
Secrets in the platform's store. get completes with null when nothing is stored. A key is 1–128 of [A-Za-z0-9._:-], a secret at most 16 KiB; others fail locally. |
capabilities(), supports(method) |
What this session may call, from lithe/host/getCapabilities (asked once). supports is false when the host offered no plugin functions. |
workspace().listContexts(), .getContext(context), .getFolders(context) |
Workspace contexts; only getContext returns, and creates, the context's stateDirectory. |
workspace().readDirectory, .stat, .readFile, .findFiles, .findText, .watch |
Files of a local context, addressed as { rootID, path } from getFolders. |
workspace().getHostPaths(context, rootIds), .processRoots(fullContext) |
Root paths on the remote host of a remote context; see Remote workspaces. |
documents().list, .getSnapshot; editor().getActive, .getSelections, .applyEdits, .replaceSelections, .insertText, .open, .reveal, .registerActions |
Live documents and editors. Edits name the expectedVersion they were computed against. |
documents().save, .saveAs, .close; workspace().create, .rename, .copy, .trash |
Saves, closes, and file changes, with the documents.save and workspace.files.write permissions. Nothing is overwritten, discarded, or deleted permanently; see saving documents and changing files. |
preview().openHtml, browser().openExternal, window().showInformation, .showWarning, .showError |
Preview, browser, and messages. |
functions().providers(functionId), .invoke(context, call) |
Calls to other plugins' functions, relayed by Core. |
request(method, params), subscribe(method, params, listener) |
Any lithe/host/* method, including ones a later host adds. |
subscriptions().dispose(id) |
Ends a subscription; Subscription.dispose() does the same. |
withCancellation(cancellation) |
The same services, cancelled together with cancellation. |
A host registers only the services it implements, and capabilities() lists
exactly those; call supports(method) before depending on one of them. What
the Lithe desktop does not register yet is listed under
Capability versions.
Methods taking a workspace context accept { contextID, generation } or a
whole context from listContexts; their params are the contract's, without
context. The full params and results are in
the contract.
What the SDK does for you, and what it leaves to you:
- Refusals are
HostError. Branch oncode(), such asplugin.host.contextExpired; a code this SDK does not know is still aHostError, anddetails()holds the host's object. OnversionConflictreread and recompute; oncontextExpiredresolve the original target again, never the focused window; retrybusyandrateLimited(afterdetails().get("retryAfterMilliseconds")) with a bound;permissionDeniedandreadOnlyneed the user, and so doesdiskChanged; onalreadyExistspick another target. An unknown param isplugin.host.unsupportedOptionnaming it indetails().get("option"), so you can retry without it. - Cancellation has no rollback. Cancelling the token given to
withCancellation, or ending the call that sent a request, fails it at once withCancelledException, and the SDK also sends$/cancelRequestso the host stops. An edit or an external open may already have taken effect, and the SDK never sends a request again. Cancelling the returned future itself does not reach the host. - At most 16 host requests are unanswered. Further ones wait in the SDK for a free slot instead of being refused.
- Subscriptions route by ID.
workspace().watchandsubscribecall theListenerwith eachHost.Eventin order, one at a time;gap()is true when events were missed, so rescan. Nothing arrives afterdispose()or the end of the session. - Commands are events.
onCommandruns when the user runs one of the plugin's commands; the host waits for no result. A stopped backend is started for it only when the manifest declaresonCommand:<commandID>.
A backend runs on the machine that runs Lithe also when the workspace is on a
remote host. Such a context has authority.kind remote and
authority.platform { os, arch }, and its folders carry no path.
getHostPaths gives their paths on the host. It needs the
workspace.metadata permission, and only a host that serves it lists it, so
check supports("lithe/host/workspace/getHostPaths") first.
Map<String, Object> full = context.host().workspace().getContext(workspace).get();
for (Host.ProcessRoot root : context.host().workspace().processRoots(full).get()) {
if (root.isRemote()) {
Host.HostPath hostPath = root.hostPath(); // a path on the remote host
} else {
String path = root.path(); // a path on this machine
}
}Host.HostPathis its own type, not aString, so it is not passed tojava.io.File,java.nio.file.PathsorProcessBuilderby mistake: the machine that runs the backend has no file there. Givevalue()only to what runs on the host, such as process arguments or a debug configuration; the SDK writes it into JSON as that string.HostPath.oftakes only an absolute POSIX path.processRootstakes a full context. For alocalone it reads the folders without asking the host; otherwise it callsgetHostPaths.getHostPaths(context)asks for every root;getHostPaths(context, rootIds)takes 1–256 distinct root IDs, and others fail locally withsdk.host.invalidParams. An answer without absolute paths issdk.host.invalidResult.plugin.host.remoteDisconnectedmeans the connection was lost while the request ran, so whether it took effect is unknown;plugin.host.platformUnavailablemeans the plugin has nothing for the host's platform. The remote workspaces guide says which services serve a remote context.
A backend may call a function that another plugin exports. The plugin must
declare the call in its manifest, and Core relays it: the backend never talks
to the other plugin. A plugin that declares no call gets
plugin.host.permissionDenied. The exports, the declaration and the checks
Core makes are in the
contract.
backend.function("project.sync", (params, context) -> {
Host.Functions functions = context.host().functions();
Object providers = functions.providers("languageImport.settings").get().get("providers");
// ... choose a provider ...
Map<String, Object> call = new LinkedHashMap<>();
call.put("pluginID", "dev.example.go");
call.put("functionID", "languageImport.settings");
call.put("params", Collections.singletonMap("project", "app"));
call.put("timeoutMilliseconds", 5000L);
// Core decides who may be called for which workspace; use the one the user's call ran in.
Object settings = functions.invoke(context.workspaceContext(), call).get().get("value");
return Collections.singletonMap("settings", settings);
});| Member | Purpose |
|---|---|
functions().providers(functionId) |
Completes with { providers: [{ pluginID, version }] }: the enabled plugins other than yours that export the function, sorted by plugin ID. You must have declared the function. |
functions().invoke(context, call) |
Completes with { value }, the provider's result (value may be null). context is a workspace context, { contextID, generation } or a whole one from listContexts; the call runs for that workspace. call is a map with pluginID and functionID, and optionally params (a map, default {}), timeoutMilliseconds (a positive integer; Core defaults it to 60 000 and caps it at 600 000) and parentOperationID. |
CallContext.caller(), .callerPluginId() |
On the providing side: the plugin that called this function, as { pluginID } and as its ID. Core writes it from the calling session. Null when the host started the call. |
HostError.pluginErrorCode() |
For plugin.function.failed, the provider's own error code (from details.pluginErrorCode); null otherwise. |
What the SDK does for you, and what it leaves to you:
- The relay needs plugin functions. When the host did not offer
litheFunctions,providers,invoke, and arequestfor either method fail at once withHostErrorplugin.host.unavailable(-32601), the answer Core would give, and nothing is sent. Checknegotiated().functions()orsupports(method)first. - The parent call is filled in for you. Inside a function,
context.host()setsparentOperationIDto the wireoperationIDof the function call it belongs to, so Core knows which call the new one is a child of. The ID is used only when it is a string of 1 to 128 bytes; otherwise the field is omitted. The SDK never usesoperationId()for this, because it falls back to the JSON-RPC request ID. AparentOperationIDyou put incallwins.withCancellationkeeps the parent.Backend.host(), which belongs to no call, names none. Without a parent Core treats the new call as a child of every relayed call the backend is serving. - Wrong arguments fail locally. A malformed call completes the future
with
PluginSdkErrorsdk.functions.invalidCall(a missing or wrong workspace context issdk.host.invalidContext) and sends nothing: afunctionIDthat is not a function ID, an emptypluginID,paramsthat is not a map, atimeoutMillisecondsthat is not a positive integer, or aparentOperationIDthat is not 1 to 128 bytes of text. A null optional field counts as absent. Only the fields above are sent; any other key,callerincluded, is dropped, because Core refuses a caller-chosencaller. The SDK does not captimeoutMilliseconds; Core does. - Refusals are
HostError. Besides the host codes, the relay addsplugin.function.notDeclared,.notExported,.providerDisabled,.versionMismatch,.callCycle,.depthExceeded,.tooManyCalls,.payloadTooLarge,.providerUnavailable,.failedand.invalidResult.plugin.function.failedcarries the provider's own code inpluginErrorCode(). A call to a context the host closed fails withplugin.host.contextExpired, and a deadline withplugin.host.timeout; a remote workspace's context is relayed like a local one. Core never retries a call, and neither does the SDK. - Calls end with their caller. Ending or cancelling the function call that
made a relayed call, or cancelling the token given to
withCancellation, fails the future withCancelledExceptionand sends$/cancelRequest, so Core cancels the provider's operation and the calls it made. - Limits are Core's. A chain has at most 4 calls, and a plugin already on
it, the caller included, cannot be called (
callCycle): a provider asked to apply values must not call the asker back inside that call. A caller has at most 8 relayed calls running; params and results are at most 256 KiB. Only local workspaces are supported. A relayed call holds one of the 16 unanswered host-request slots until it ends, which may be 600 seconds, so a backend that starts many long calls delays its other host requests. - Decide by
caller(), never by params. A plugin ID inparamsis data the caller wrote;context.caller()is the identity of the calling session.
These are the Node.js SDK's rules. In Java:
-
Domain capabilities stay typed. Build models and dependency trees go through
onModelandonDependencies, never through a function. -
No calls back into Lithe's dispatch.
sendRequestandsendNotificationrefuse anylithe/*method. Host services go throughhost(), which sends onlylithe/host/*. -
stdout belongs to the protocol.
listen()keeps the real stdout for protocol frames and pointsSystem.outat stderr. Never write toFileDescriptor.out. -
The package is read-only. Keep state under the directories Lithe passes through launch templates (
${stateDir},${workspaceStateDir}).StateStore.openrefuses a directory inside the plugin package. It finds the package by walking up from the SDK's own JAR toplugin.json. Diagnostics use the SDK and host; native log files require an explicitly supplied${logDir}. -
Work ends with its call. Start processes with
context.run, and checkisCancelled()in long loops. On cancellation the SDK first asks the process to stop, then stops it forcibly after a grace period.- macOS and Linux, every Java version: each tool leads its own process
group, as in the Node SDK. The SDK starts it through the system
perl, which callssetpgrpand then becomes the tool. A stop reaches the whole group, and when the tool exits on its own, whatever it left running in its group is killed. - Windows, or no
perl: on Java 9 or newer the SDK stops the descendants still attached to the tool; Java 8 stops only the direct child.
A descendant that leaves the group (
setsid) or that the fallback cannot reach is ended by Lithe's process scope together with the backend. A cancellation listener that throws is logged and does not keep the other listeners or the reply from running.On
shutdown,exit, or the end of input the SDK ends every process it started.Processes.runkeeps Lithe's process-scope markers even whenOptions.environmentreplaces the environment. - macOS and Linux, every Java version: each tool leads its own process
group, as in the Node SDK. The SDK starts it through the system
-
Errors stay presentable. Throw
PluginErrorfor failures the user should see; every other exception is reported generically.
The build protocol accepts the host's optional params.modelInputs snapshot.
A consumer declares exact modelInputs producer slots and requires
buildProviders: 0 plus buildModelInputs: 0. A producer opts into
modelSharing and selects any ordinary build option values it wants to share.
The host supplies normalized projects, targets and content roots; tasks, run
plans, settings and unselected option values are excluded.
Treat revision as an opaque workspace snapshot identity. Recompute cached
work when it changes. A slot can be unavailable, and an instance can be loading,
stale or failed; only ready instances carry facts. Do not invoke another plugin
or install/activate a missing producer. Input sharing grants no process or
private-function authority. Producers cannot consume and re-export
inputs. Core validates the shape and the host revokes in-flight work when its
producer changes.
The two native workflow samples demonstrate independent producer and consumer
backends in the Core end-to-end tests. Their engine is fictional. The Lithe
desktop does not declare buildModelInputs.
The SDK includes wrappers for plugin-owned native terminal create/show/close,
reopen with bounded display history, disposal and exit subscriptions. They
require terminal.create. See
the native terminal guide.
Run these from the root of this repository:
mvn -B -ntp -f shared/plugins/sdk/java/pom.xml verify
# End to end: the sample backends of all four SDKs against this checkout's Core.
node shared/plugins/scripts/sdk-e2e.mjsThis builds the SDK and the sample for Java 8 with any newer JDK, then runs
the JUnit tests. Add -Djvm=/path/to/java8/bin/java to run the tests on a
Java 8 runtime, as CI does.
The end-to-end script needs Rust, Node.js 20.3 or newer, Go 1.27.4 or newer, Java
(LITHE_PLUGIN_SDK_JAVA_RUNTIME or java on PATH) and Maven;
LITHE_PLUGIN_SDK_JAVA_SAMPLE and LITHE_PLUGIN_SDK_JAVA_NATIVE_SAMPLE name
already built sample JARs.
Workflow host methods (quick pick, input, previews, diff, view refresh, output, progress, status, clipboard, reveal and HTTP) are documented in the plugin workflow guide. Discover each method before calling it; wrappers do not grant permissions.